@norges-domstoler/dds-components 0.0.0-dev-20240604132618 → 0.0.0-dev-20240605101112
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.js +1760 -489
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1398 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -11
package/dist/index.js
CHANGED
|
@@ -6,15 +6,18 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
9
12
|
var __export = (target, all) => {
|
|
10
13
|
for (var name in all)
|
|
11
14
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
15
|
};
|
|
13
|
-
var __copyProps = (to,
|
|
14
|
-
if (
|
|
15
|
-
for (let key of __getOwnPropNames(
|
|
16
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
17
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from2))
|
|
16
19
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () =>
|
|
20
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
18
21
|
}
|
|
19
22
|
return to;
|
|
20
23
|
};
|
|
@@ -28,6 +31,44 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
31
|
));
|
|
29
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
33
|
|
|
34
|
+
// ../../node_modules/.pnpm/shallowequal@1.1.0/node_modules/shallowequal/index.js
|
|
35
|
+
var require_shallowequal = __commonJS({
|
|
36
|
+
"../../node_modules/.pnpm/shallowequal@1.1.0/node_modules/shallowequal/index.js"(exports2, module2) {
|
|
37
|
+
"use strict";
|
|
38
|
+
module2.exports = function shallowEqual(objA, objB, compare, compareContext) {
|
|
39
|
+
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
|
40
|
+
if (ret !== void 0) {
|
|
41
|
+
return !!ret;
|
|
42
|
+
}
|
|
43
|
+
if (objA === objB) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
var keysA = Object.keys(objA);
|
|
50
|
+
var keysB = Object.keys(objB);
|
|
51
|
+
if (keysA.length !== keysB.length) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
|
55
|
+
for (var idx = 0; idx < keysA.length; idx++) {
|
|
56
|
+
var key = keysA[idx];
|
|
57
|
+
if (!bHasOwnProperty(key)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
var valueA = objA[key];
|
|
61
|
+
var valueB = objB[key];
|
|
62
|
+
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
|
63
|
+
if (ret === false || ret === void 0 && valueA !== valueB) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
31
72
|
// src/index.ts
|
|
32
73
|
var src_exports = {};
|
|
33
74
|
__export(src_exports, {
|
|
@@ -490,8 +531,7 @@ function isTextColor(color) {
|
|
|
490
531
|
return textColorsArray.indexOf(color) !== -1;
|
|
491
532
|
}
|
|
492
533
|
var getTextColor = (color) => {
|
|
493
|
-
if (isTextColor(color))
|
|
494
|
-
return textColors[color];
|
|
534
|
+
if (isTextColor(color)) return textColors[color];
|
|
495
535
|
return color;
|
|
496
536
|
};
|
|
497
537
|
|
|
@@ -532,7 +572,7 @@ var getFormInputIconSize = (componentSize) => {
|
|
|
532
572
|
};
|
|
533
573
|
|
|
534
574
|
// src/utils/idGenerator.tsx
|
|
535
|
-
var derivativeIdGenerator = (
|
|
575
|
+
var derivativeIdGenerator = (prefix3, suffix) => `${prefix3}-${suffix}`;
|
|
536
576
|
var spaceSeparatedIdListGenerator = (values) => {
|
|
537
577
|
const filtered = values.filter(Boolean);
|
|
538
578
|
return filtered.length > 0 ? filtered.join(" ") : void 0;
|
|
@@ -2417,8 +2457,7 @@ var import_react5 = require("react");
|
|
|
2417
2457
|
function useCombinedRef(...refs) {
|
|
2418
2458
|
return (0, import_react5.useCallback)((element) => {
|
|
2419
2459
|
refs.forEach((ref) => {
|
|
2420
|
-
if (typeof ref === "function")
|
|
2421
|
-
ref(element);
|
|
2460
|
+
if (typeof ref === "function") ref(element);
|
|
2422
2461
|
else if (ref && typeof ref === "object")
|
|
2423
2462
|
ref.current = element;
|
|
2424
2463
|
});
|
|
@@ -2435,7 +2474,7 @@ var useFloatPosition = (arrowRef, options = {}) => {
|
|
|
2435
2474
|
offset = defaultOffset,
|
|
2436
2475
|
placement = "bottom"
|
|
2437
2476
|
} = options;
|
|
2438
|
-
const
|
|
2477
|
+
const middleware2 = [
|
|
2439
2478
|
(0, import_react_dom.offset)(offset),
|
|
2440
2479
|
(0, import_react_dom.flip)(),
|
|
2441
2480
|
(0, import_react_dom.shift)(),
|
|
@@ -2443,15 +2482,15 @@ var useFloatPosition = (arrowRef, options = {}) => {
|
|
|
2443
2482
|
...arrowRef ? [(0, import_react_dom.arrow)({ element: arrowRef })] : []
|
|
2444
2483
|
];
|
|
2445
2484
|
const {
|
|
2446
|
-
x,
|
|
2447
|
-
y,
|
|
2485
|
+
x: x2,
|
|
2486
|
+
y: y2,
|
|
2448
2487
|
strategy,
|
|
2449
2488
|
middlewareData,
|
|
2450
2489
|
placement: actualPlacement,
|
|
2451
2490
|
refs
|
|
2452
2491
|
} = (0, import_react_dom.useFloating)({
|
|
2453
2492
|
placement,
|
|
2454
|
-
middleware,
|
|
2493
|
+
middleware: middleware2,
|
|
2455
2494
|
whileElementsMounted: (reference, floating, update) => (0, import_react_dom.autoUpdate)(reference, floating, update, { animationFrame })
|
|
2456
2495
|
});
|
|
2457
2496
|
return {
|
|
@@ -2459,8 +2498,8 @@ var useFloatPosition = (arrowRef, options = {}) => {
|
|
|
2459
2498
|
styles: {
|
|
2460
2499
|
floating: {
|
|
2461
2500
|
position: strategy,
|
|
2462
|
-
top:
|
|
2463
|
-
left:
|
|
2501
|
+
top: y2 != null ? y2 : "",
|
|
2502
|
+
left: x2 != null ? x2 : ""
|
|
2464
2503
|
},
|
|
2465
2504
|
arrow: middlewareData.arrow ? getArrowStyling(strategy, actualPlacement, middlewareData.arrow) : void 0
|
|
2466
2505
|
}
|
|
@@ -2516,8 +2555,7 @@ function useFocusTrap(active, initialFocusRef = void 0) {
|
|
|
2516
2555
|
const elementRef = (0, import_react6.useRef)(null);
|
|
2517
2556
|
(0, import_react6.useEffect)(() => {
|
|
2518
2557
|
function handleFocus(e) {
|
|
2519
|
-
if (e.key !== "Tab" || !active || !elementRef.current)
|
|
2520
|
-
return;
|
|
2558
|
+
if (e.key !== "Tab" || !active || !elementRef.current) return;
|
|
2521
2559
|
const focusableElements = getFocusableElements(elementRef);
|
|
2522
2560
|
const firstElement = focusableElements[0];
|
|
2523
2561
|
const lastElement = focusableElements[focusableElements.length - 1];
|
|
@@ -2565,8 +2603,7 @@ var useMountTransition = (isMounted, unmountDelay) => {
|
|
|
2565
2603
|
const [hasTransitionedIn, setHasTransitionedIn] = (0, import_react8.useState)(false);
|
|
2566
2604
|
(0, import_react8.useEffect)(() => {
|
|
2567
2605
|
let timeoutId;
|
|
2568
|
-
if (isMounted && !hasTransitionedIn)
|
|
2569
|
-
setHasTransitionedIn(true);
|
|
2606
|
+
if (isMounted && !hasTransitionedIn) setHasTransitionedIn(true);
|
|
2570
2607
|
else if (!isMounted && hasTransitionedIn) {
|
|
2571
2608
|
timeoutId = setTimeout(() => setHasTransitionedIn(false), unmountDelay);
|
|
2572
2609
|
}
|
|
@@ -2589,8 +2626,7 @@ function useOnClickOutside(element, handler) {
|
|
|
2589
2626
|
const clickedOnSomethingInDocument = document.contains(
|
|
2590
2627
|
event.target
|
|
2591
2628
|
);
|
|
2592
|
-
if (hasClickedInside || !clickedOnSomethingInDocument)
|
|
2593
|
-
return;
|
|
2629
|
+
if (hasClickedInside || !clickedOnSomethingInDocument) return;
|
|
2594
2630
|
handler(event);
|
|
2595
2631
|
};
|
|
2596
2632
|
document.addEventListener("mousedown", listener);
|
|
@@ -2657,17 +2693,15 @@ function useRoveFocus(size2, active, direction = "column") {
|
|
|
2657
2693
|
const previousKey = direction === "row" ? "ArrowLeft" : "ArrowUp";
|
|
2658
2694
|
const handleKeyDown = (0, import_react12.useCallback)(
|
|
2659
2695
|
(e) => {
|
|
2660
|
-
if (!size2 || !isKeyboardEvent(e))
|
|
2661
|
-
return;
|
|
2696
|
+
if (!size2 || !isKeyboardEvent(e)) return;
|
|
2662
2697
|
if (e.key === nextKey) {
|
|
2663
2698
|
e.preventDefault();
|
|
2664
|
-
setCurrentFocusIndex((
|
|
2699
|
+
setCurrentFocusIndex((prev2) => prev2 === size2 - 1 ? 0 : prev2 + 1);
|
|
2665
2700
|
} else if (e.key === previousKey) {
|
|
2666
2701
|
e.preventDefault();
|
|
2667
|
-
setCurrentFocusIndex((
|
|
2668
|
-
if (
|
|
2669
|
-
|
|
2670
|
-
return prev - 1;
|
|
2702
|
+
setCurrentFocusIndex((prev2) => {
|
|
2703
|
+
if (prev2 === -1 || prev2 === 0) return size2 - 1;
|
|
2704
|
+
return prev2 - 1;
|
|
2671
2705
|
});
|
|
2672
2706
|
}
|
|
2673
2707
|
},
|
|
@@ -3134,10 +3168,1262 @@ var selection = {
|
|
|
3134
3168
|
backgroundColor: import_dds_design_tokens10.ddsTokens.DdsColorSurfaceHighlightedDefault
|
|
3135
3169
|
};
|
|
3136
3170
|
|
|
3171
|
+
// ../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs
|
|
3172
|
+
var __assign = function() {
|
|
3173
|
+
__assign = Object.assign || function __assign2(t) {
|
|
3174
|
+
for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
|
|
3175
|
+
s2 = arguments[i2];
|
|
3176
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t[p2] = s2[p2];
|
|
3177
|
+
}
|
|
3178
|
+
return t;
|
|
3179
|
+
};
|
|
3180
|
+
return __assign.apply(this, arguments);
|
|
3181
|
+
};
|
|
3182
|
+
function __spreadArray(to, from2, pack) {
|
|
3183
|
+
if (pack || arguments.length === 2) for (var i2 = 0, l2 = from2.length, ar; i2 < l2; i2++) {
|
|
3184
|
+
if (ar || !(i2 in from2)) {
|
|
3185
|
+
if (!ar) ar = Array.prototype.slice.call(from2, 0, i2);
|
|
3186
|
+
ar[i2] = from2[i2];
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
return to.concat(ar || Array.prototype.slice.call(from2));
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3192
|
+
// ../../node_modules/.pnpm/@emotion+memoize@0.8.1/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
3193
|
+
function memoize(fn) {
|
|
3194
|
+
var cache = /* @__PURE__ */ Object.create(null);
|
|
3195
|
+
return function(arg) {
|
|
3196
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
3197
|
+
return cache[arg];
|
|
3198
|
+
};
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
// ../../node_modules/.pnpm/@emotion+is-prop-valid@1.2.2/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
|
|
3202
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
3203
|
+
var isPropValid = /* @__PURE__ */ memoize(
|
|
3204
|
+
function(prop) {
|
|
3205
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
3206
|
+
}
|
|
3207
|
+
/* Z+1 */
|
|
3208
|
+
);
|
|
3209
|
+
|
|
3210
|
+
// ../../node_modules/.pnpm/styled-components@6.1.11_react-dom@18.3.1_react@18.3.1/node_modules/styled-components/dist/styled-components.esm.js
|
|
3211
|
+
var import_react21 = __toESM(require("react"));
|
|
3212
|
+
var import_shallowequal = __toESM(require_shallowequal());
|
|
3213
|
+
|
|
3214
|
+
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Enum.js
|
|
3215
|
+
var MS = "-ms-";
|
|
3216
|
+
var MOZ = "-moz-";
|
|
3217
|
+
var WEBKIT = "-webkit-";
|
|
3218
|
+
var COMMENT = "comm";
|
|
3219
|
+
var RULESET = "rule";
|
|
3220
|
+
var DECLARATION = "decl";
|
|
3221
|
+
var IMPORT = "@import";
|
|
3222
|
+
var KEYFRAMES = "@keyframes";
|
|
3223
|
+
var LAYER = "@layer";
|
|
3224
|
+
|
|
3225
|
+
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Utility.js
|
|
3226
|
+
var abs = Math.abs;
|
|
3227
|
+
var from = String.fromCharCode;
|
|
3228
|
+
var assign = Object.assign;
|
|
3229
|
+
function hash(value, length2) {
|
|
3230
|
+
return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
3231
|
+
}
|
|
3232
|
+
function trim(value) {
|
|
3233
|
+
return value.trim();
|
|
3234
|
+
}
|
|
3235
|
+
function match(value, pattern) {
|
|
3236
|
+
return (value = pattern.exec(value)) ? value[0] : value;
|
|
3237
|
+
}
|
|
3238
|
+
function replace(value, pattern, replacement) {
|
|
3239
|
+
return value.replace(pattern, replacement);
|
|
3240
|
+
}
|
|
3241
|
+
function indexof(value, search, position2) {
|
|
3242
|
+
return value.indexOf(search, position2);
|
|
3243
|
+
}
|
|
3244
|
+
function charat(value, index) {
|
|
3245
|
+
return value.charCodeAt(index) | 0;
|
|
3246
|
+
}
|
|
3247
|
+
function substr(value, begin, end) {
|
|
3248
|
+
return value.slice(begin, end);
|
|
3249
|
+
}
|
|
3250
|
+
function strlen(value) {
|
|
3251
|
+
return value.length;
|
|
3252
|
+
}
|
|
3253
|
+
function sizeof(value) {
|
|
3254
|
+
return value.length;
|
|
3255
|
+
}
|
|
3256
|
+
function append(value, array) {
|
|
3257
|
+
return array.push(value), value;
|
|
3258
|
+
}
|
|
3259
|
+
function combine(array, callback) {
|
|
3260
|
+
return array.map(callback).join("");
|
|
3261
|
+
}
|
|
3262
|
+
function filter(array, pattern) {
|
|
3263
|
+
return array.filter(function(value) {
|
|
3264
|
+
return !match(value, pattern);
|
|
3265
|
+
});
|
|
3266
|
+
}
|
|
3267
|
+
|
|
3268
|
+
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Tokenizer.js
|
|
3269
|
+
var line = 1;
|
|
3270
|
+
var column = 1;
|
|
3271
|
+
var length = 0;
|
|
3272
|
+
var position = 0;
|
|
3273
|
+
var character = 0;
|
|
3274
|
+
var characters = "";
|
|
3275
|
+
function node(value, root, parent, type, props, children, length2, siblings) {
|
|
3276
|
+
return { value, root, parent, type, props, children, line, column, length: length2, return: "", siblings };
|
|
3277
|
+
}
|
|
3278
|
+
function copy(root, props) {
|
|
3279
|
+
return assign(node("", null, null, "", null, null, 0, root.siblings), root, { length: -root.length }, props);
|
|
3280
|
+
}
|
|
3281
|
+
function lift(root) {
|
|
3282
|
+
while (root.root)
|
|
3283
|
+
root = copy(root.root, { children: [root] });
|
|
3284
|
+
append(root, root.siblings);
|
|
3285
|
+
}
|
|
3286
|
+
function char() {
|
|
3287
|
+
return character;
|
|
3288
|
+
}
|
|
3289
|
+
function prev() {
|
|
3290
|
+
character = position > 0 ? charat(characters, --position) : 0;
|
|
3291
|
+
if (column--, character === 10)
|
|
3292
|
+
column = 1, line--;
|
|
3293
|
+
return character;
|
|
3294
|
+
}
|
|
3295
|
+
function next() {
|
|
3296
|
+
character = position < length ? charat(characters, position++) : 0;
|
|
3297
|
+
if (column++, character === 10)
|
|
3298
|
+
column = 1, line++;
|
|
3299
|
+
return character;
|
|
3300
|
+
}
|
|
3301
|
+
function peek() {
|
|
3302
|
+
return charat(characters, position);
|
|
3303
|
+
}
|
|
3304
|
+
function caret() {
|
|
3305
|
+
return position;
|
|
3306
|
+
}
|
|
3307
|
+
function slice(begin, end) {
|
|
3308
|
+
return substr(characters, begin, end);
|
|
3309
|
+
}
|
|
3310
|
+
function token(type) {
|
|
3311
|
+
switch (type) {
|
|
3312
|
+
case 0:
|
|
3313
|
+
case 9:
|
|
3314
|
+
case 10:
|
|
3315
|
+
case 13:
|
|
3316
|
+
case 32:
|
|
3317
|
+
return 5;
|
|
3318
|
+
case 33:
|
|
3319
|
+
case 43:
|
|
3320
|
+
case 44:
|
|
3321
|
+
case 47:
|
|
3322
|
+
case 62:
|
|
3323
|
+
case 64:
|
|
3324
|
+
case 126:
|
|
3325
|
+
case 59:
|
|
3326
|
+
case 123:
|
|
3327
|
+
case 125:
|
|
3328
|
+
return 4;
|
|
3329
|
+
case 58:
|
|
3330
|
+
return 3;
|
|
3331
|
+
case 34:
|
|
3332
|
+
case 39:
|
|
3333
|
+
case 40:
|
|
3334
|
+
case 91:
|
|
3335
|
+
return 2;
|
|
3336
|
+
case 41:
|
|
3337
|
+
case 93:
|
|
3338
|
+
return 1;
|
|
3339
|
+
}
|
|
3340
|
+
return 0;
|
|
3341
|
+
}
|
|
3342
|
+
function alloc(value) {
|
|
3343
|
+
return line = column = 1, length = strlen(characters = value), position = 0, [];
|
|
3344
|
+
}
|
|
3345
|
+
function dealloc(value) {
|
|
3346
|
+
return characters = "", value;
|
|
3347
|
+
}
|
|
3348
|
+
function delimit(type) {
|
|
3349
|
+
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
3350
|
+
}
|
|
3351
|
+
function whitespace(type) {
|
|
3352
|
+
while (character = peek())
|
|
3353
|
+
if (character < 33)
|
|
3354
|
+
next();
|
|
3355
|
+
else
|
|
3356
|
+
break;
|
|
3357
|
+
return token(type) > 2 || token(character) > 3 ? "" : " ";
|
|
3358
|
+
}
|
|
3359
|
+
function escaping(index, count) {
|
|
3360
|
+
while (--count && next())
|
|
3361
|
+
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
|
|
3362
|
+
break;
|
|
3363
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
3364
|
+
}
|
|
3365
|
+
function delimiter(type) {
|
|
3366
|
+
while (next())
|
|
3367
|
+
switch (character) {
|
|
3368
|
+
case type:
|
|
3369
|
+
return position;
|
|
3370
|
+
case 34:
|
|
3371
|
+
case 39:
|
|
3372
|
+
if (type !== 34 && type !== 39)
|
|
3373
|
+
delimiter(character);
|
|
3374
|
+
break;
|
|
3375
|
+
case 40:
|
|
3376
|
+
if (type === 41)
|
|
3377
|
+
delimiter(type);
|
|
3378
|
+
break;
|
|
3379
|
+
case 92:
|
|
3380
|
+
next();
|
|
3381
|
+
break;
|
|
3382
|
+
}
|
|
3383
|
+
return position;
|
|
3384
|
+
}
|
|
3385
|
+
function commenter(type, index) {
|
|
3386
|
+
while (next())
|
|
3387
|
+
if (type + character === 47 + 10)
|
|
3388
|
+
break;
|
|
3389
|
+
else if (type + character === 42 + 42 && peek() === 47)
|
|
3390
|
+
break;
|
|
3391
|
+
return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
|
|
3392
|
+
}
|
|
3393
|
+
function identifier(index) {
|
|
3394
|
+
while (!token(peek()))
|
|
3395
|
+
next();
|
|
3396
|
+
return slice(index, position);
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3399
|
+
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Parser.js
|
|
3400
|
+
function compile(value) {
|
|
3401
|
+
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
|
|
3402
|
+
}
|
|
3403
|
+
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
3404
|
+
var index = 0;
|
|
3405
|
+
var offset = 0;
|
|
3406
|
+
var length2 = pseudo;
|
|
3407
|
+
var atrule = 0;
|
|
3408
|
+
var property = 0;
|
|
3409
|
+
var previous = 0;
|
|
3410
|
+
var variable = 1;
|
|
3411
|
+
var scanning = 1;
|
|
3412
|
+
var ampersand = 1;
|
|
3413
|
+
var character2 = 0;
|
|
3414
|
+
var type = "";
|
|
3415
|
+
var props = rules;
|
|
3416
|
+
var children = rulesets;
|
|
3417
|
+
var reference = rule;
|
|
3418
|
+
var characters2 = type;
|
|
3419
|
+
while (scanning)
|
|
3420
|
+
switch (previous = character2, character2 = next()) {
|
|
3421
|
+
case 40:
|
|
3422
|
+
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
|
|
3423
|
+
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1)
|
|
3424
|
+
ampersand = -1;
|
|
3425
|
+
break;
|
|
3426
|
+
}
|
|
3427
|
+
case 34:
|
|
3428
|
+
case 39:
|
|
3429
|
+
case 91:
|
|
3430
|
+
characters2 += delimit(character2);
|
|
3431
|
+
break;
|
|
3432
|
+
case 9:
|
|
3433
|
+
case 10:
|
|
3434
|
+
case 13:
|
|
3435
|
+
case 32:
|
|
3436
|
+
characters2 += whitespace(previous);
|
|
3437
|
+
break;
|
|
3438
|
+
case 92:
|
|
3439
|
+
characters2 += escaping(caret() - 1, 7);
|
|
3440
|
+
continue;
|
|
3441
|
+
case 47:
|
|
3442
|
+
switch (peek()) {
|
|
3443
|
+
case 42:
|
|
3444
|
+
case 47:
|
|
3445
|
+
append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
|
|
3446
|
+
break;
|
|
3447
|
+
default:
|
|
3448
|
+
characters2 += "/";
|
|
3449
|
+
}
|
|
3450
|
+
break;
|
|
3451
|
+
case 123 * variable:
|
|
3452
|
+
points[index++] = strlen(characters2) * ampersand;
|
|
3453
|
+
case 125 * variable:
|
|
3454
|
+
case 59:
|
|
3455
|
+
case 0:
|
|
3456
|
+
switch (character2) {
|
|
3457
|
+
case 0:
|
|
3458
|
+
case 125:
|
|
3459
|
+
scanning = 0;
|
|
3460
|
+
case 59 + offset:
|
|
3461
|
+
if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
|
|
3462
|
+
if (property > 0 && strlen(characters2) - length2)
|
|
3463
|
+
append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
|
|
3464
|
+
break;
|
|
3465
|
+
case 59:
|
|
3466
|
+
characters2 += ";";
|
|
3467
|
+
default:
|
|
3468
|
+
append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
|
|
3469
|
+
if (character2 === 123)
|
|
3470
|
+
if (offset === 0)
|
|
3471
|
+
parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
|
|
3472
|
+
else
|
|
3473
|
+
switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
|
|
3474
|
+
case 100:
|
|
3475
|
+
case 108:
|
|
3476
|
+
case 109:
|
|
3477
|
+
case 115:
|
|
3478
|
+
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
|
|
3479
|
+
break;
|
|
3480
|
+
default:
|
|
3481
|
+
parse(characters2, reference, reference, reference, [""], children, 0, points, children);
|
|
3482
|
+
}
|
|
3483
|
+
}
|
|
3484
|
+
index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
|
|
3485
|
+
break;
|
|
3486
|
+
case 58:
|
|
3487
|
+
length2 = 1 + strlen(characters2), property = previous;
|
|
3488
|
+
default:
|
|
3489
|
+
if (variable < 1) {
|
|
3490
|
+
if (character2 == 123)
|
|
3491
|
+
--variable;
|
|
3492
|
+
else if (character2 == 125 && variable++ == 0 && prev() == 125)
|
|
3493
|
+
continue;
|
|
3494
|
+
}
|
|
3495
|
+
switch (characters2 += from(character2), character2 * variable) {
|
|
3496
|
+
case 38:
|
|
3497
|
+
ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
|
|
3498
|
+
break;
|
|
3499
|
+
case 44:
|
|
3500
|
+
points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
|
|
3501
|
+
break;
|
|
3502
|
+
case 64:
|
|
3503
|
+
if (peek() === 45)
|
|
3504
|
+
characters2 += delimit(next());
|
|
3505
|
+
atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
|
|
3506
|
+
break;
|
|
3507
|
+
case 45:
|
|
3508
|
+
if (previous === 45 && strlen(characters2) == 2)
|
|
3509
|
+
variable = 0;
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
return rulesets;
|
|
3513
|
+
}
|
|
3514
|
+
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2, siblings) {
|
|
3515
|
+
var post = offset - 1;
|
|
3516
|
+
var rule = offset === 0 ? rules : [""];
|
|
3517
|
+
var size2 = sizeof(rule);
|
|
3518
|
+
for (var i2 = 0, j2 = 0, k2 = 0; i2 < index; ++i2)
|
|
3519
|
+
for (var x2 = 0, y2 = substr(value, post + 1, post = abs(j2 = points[i2])), z2 = value; x2 < size2; ++x2)
|
|
3520
|
+
if (z2 = trim(j2 > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2])))
|
|
3521
|
+
props[k2++] = z2;
|
|
3522
|
+
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2, siblings);
|
|
3523
|
+
}
|
|
3524
|
+
function comment(value, root, parent, siblings) {
|
|
3525
|
+
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
|
|
3526
|
+
}
|
|
3527
|
+
function declaration(value, root, parent, length2, siblings) {
|
|
3528
|
+
return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
|
|
3529
|
+
}
|
|
3530
|
+
|
|
3531
|
+
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Prefixer.js
|
|
3532
|
+
function prefix(value, length2, children) {
|
|
3533
|
+
switch (hash(value, length2)) {
|
|
3534
|
+
case 5103:
|
|
3535
|
+
return WEBKIT + "print-" + value + value;
|
|
3536
|
+
case 5737:
|
|
3537
|
+
case 4201:
|
|
3538
|
+
case 3177:
|
|
3539
|
+
case 3433:
|
|
3540
|
+
case 1641:
|
|
3541
|
+
case 4457:
|
|
3542
|
+
case 2921:
|
|
3543
|
+
case 5572:
|
|
3544
|
+
case 6356:
|
|
3545
|
+
case 5844:
|
|
3546
|
+
case 3191:
|
|
3547
|
+
case 6645:
|
|
3548
|
+
case 3005:
|
|
3549
|
+
case 6391:
|
|
3550
|
+
case 5879:
|
|
3551
|
+
case 5623:
|
|
3552
|
+
case 6135:
|
|
3553
|
+
case 4599:
|
|
3554
|
+
case 4855:
|
|
3555
|
+
case 4215:
|
|
3556
|
+
case 6389:
|
|
3557
|
+
case 5109:
|
|
3558
|
+
case 5365:
|
|
3559
|
+
case 5621:
|
|
3560
|
+
case 3829:
|
|
3561
|
+
return WEBKIT + value + value;
|
|
3562
|
+
case 4789:
|
|
3563
|
+
return MOZ + value + value;
|
|
3564
|
+
case 5349:
|
|
3565
|
+
case 4246:
|
|
3566
|
+
case 4810:
|
|
3567
|
+
case 6968:
|
|
3568
|
+
case 2756:
|
|
3569
|
+
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
3570
|
+
case 5936:
|
|
3571
|
+
switch (charat(value, length2 + 11)) {
|
|
3572
|
+
case 114:
|
|
3573
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
|
|
3574
|
+
case 108:
|
|
3575
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
|
|
3576
|
+
case 45:
|
|
3577
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
|
|
3578
|
+
}
|
|
3579
|
+
case 6828:
|
|
3580
|
+
case 4268:
|
|
3581
|
+
case 2903:
|
|
3582
|
+
return WEBKIT + value + MS + value + value;
|
|
3583
|
+
case 6165:
|
|
3584
|
+
return WEBKIT + value + MS + "flex-" + value + value;
|
|
3585
|
+
case 5187:
|
|
3586
|
+
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
|
|
3587
|
+
case 5443:
|
|
3588
|
+
return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/g, "") + (!match(value, /flex-|baseline/) ? MS + "grid-row-" + replace(value, /flex-|-self/g, "") : "") + value;
|
|
3589
|
+
case 4675:
|
|
3590
|
+
return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/g, "") + value;
|
|
3591
|
+
case 5548:
|
|
3592
|
+
return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
|
|
3593
|
+
case 5292:
|
|
3594
|
+
return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
|
|
3595
|
+
case 6060:
|
|
3596
|
+
return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
|
|
3597
|
+
case 4554:
|
|
3598
|
+
return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
|
|
3599
|
+
case 6187:
|
|
3600
|
+
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
|
|
3601
|
+
case 5495:
|
|
3602
|
+
case 3959:
|
|
3603
|
+
return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
|
|
3604
|
+
case 4968:
|
|
3605
|
+
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
|
|
3606
|
+
case 4200:
|
|
3607
|
+
if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length2) + value;
|
|
3608
|
+
break;
|
|
3609
|
+
case 2592:
|
|
3610
|
+
case 3360:
|
|
3611
|
+
return MS + replace(value, "template-", "") + value;
|
|
3612
|
+
case 4384:
|
|
3613
|
+
case 3616:
|
|
3614
|
+
if (children && children.some(function(element, index) {
|
|
3615
|
+
return length2 = index, match(element.props, /grid-\w+-end/);
|
|
3616
|
+
})) {
|
|
3617
|
+
return ~indexof(value + (children = children[length2].value), "span", 0) ? value : MS + replace(value, "-start", "") + value + MS + "grid-row-span:" + (~indexof(children, "span", 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ";";
|
|
3618
|
+
}
|
|
3619
|
+
return MS + replace(value, "-start", "") + value;
|
|
3620
|
+
case 4896:
|
|
3621
|
+
case 4128:
|
|
3622
|
+
return children && children.some(function(element) {
|
|
3623
|
+
return match(element.props, /grid-\w+-start/);
|
|
3624
|
+
}) ? value : MS + replace(replace(value, "-end", "-span"), "span ", "") + value;
|
|
3625
|
+
case 4095:
|
|
3626
|
+
case 3583:
|
|
3627
|
+
case 4068:
|
|
3628
|
+
case 2532:
|
|
3629
|
+
return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
|
|
3630
|
+
case 8116:
|
|
3631
|
+
case 7059:
|
|
3632
|
+
case 5753:
|
|
3633
|
+
case 5535:
|
|
3634
|
+
case 5445:
|
|
3635
|
+
case 5701:
|
|
3636
|
+
case 4933:
|
|
3637
|
+
case 4677:
|
|
3638
|
+
case 5533:
|
|
3639
|
+
case 5789:
|
|
3640
|
+
case 5021:
|
|
3641
|
+
case 4765:
|
|
3642
|
+
if (strlen(value) - 1 - length2 > 6)
|
|
3643
|
+
switch (charat(value, length2 + 1)) {
|
|
3644
|
+
case 109:
|
|
3645
|
+
if (charat(value, length2 + 4) !== 45)
|
|
3646
|
+
break;
|
|
3647
|
+
case 102:
|
|
3648
|
+
return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
|
|
3649
|
+
case 115:
|
|
3650
|
+
return ~indexof(value, "stretch", 0) ? prefix(replace(value, "stretch", "fill-available"), length2, children) + value : value;
|
|
3651
|
+
}
|
|
3652
|
+
break;
|
|
3653
|
+
case 5152:
|
|
3654
|
+
case 5920:
|
|
3655
|
+
return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a3, b, c2, d, e, f2) {
|
|
3656
|
+
return MS + a3 + ":" + b + f2 + (c2 ? MS + a3 + "-span:" + (d ? e : +e - +b) + f2 : "") + value;
|
|
3657
|
+
});
|
|
3658
|
+
case 4949:
|
|
3659
|
+
if (charat(value, length2 + 6) === 121)
|
|
3660
|
+
return replace(value, ":", ":" + WEBKIT) + value;
|
|
3661
|
+
break;
|
|
3662
|
+
case 6444:
|
|
3663
|
+
switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
|
|
3664
|
+
case 120:
|
|
3665
|
+
return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
|
|
3666
|
+
case 100:
|
|
3667
|
+
return replace(value, ":", ":" + MS) + value;
|
|
3668
|
+
}
|
|
3669
|
+
break;
|
|
3670
|
+
case 5719:
|
|
3671
|
+
case 2647:
|
|
3672
|
+
case 2135:
|
|
3673
|
+
case 3927:
|
|
3674
|
+
case 2391:
|
|
3675
|
+
return replace(value, "scroll-", "scroll-snap-") + value;
|
|
3676
|
+
}
|
|
3677
|
+
return value;
|
|
3678
|
+
}
|
|
3679
|
+
|
|
3680
|
+
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Serializer.js
|
|
3681
|
+
function serialize(children, callback) {
|
|
3682
|
+
var output = "";
|
|
3683
|
+
for (var i2 = 0; i2 < children.length; i2++)
|
|
3684
|
+
output += callback(children[i2], i2, children, callback) || "";
|
|
3685
|
+
return output;
|
|
3686
|
+
}
|
|
3687
|
+
function stringify(element, index, children, callback) {
|
|
3688
|
+
switch (element.type) {
|
|
3689
|
+
case LAYER:
|
|
3690
|
+
if (element.children.length) break;
|
|
3691
|
+
case IMPORT:
|
|
3692
|
+
case DECLARATION:
|
|
3693
|
+
return element.return = element.return || element.value;
|
|
3694
|
+
case COMMENT:
|
|
3695
|
+
return "";
|
|
3696
|
+
case KEYFRAMES:
|
|
3697
|
+
return element.return = element.value + "{" + serialize(element.children, callback) + "}";
|
|
3698
|
+
case RULESET:
|
|
3699
|
+
if (!strlen(element.value = element.props.join(","))) return "";
|
|
3700
|
+
}
|
|
3701
|
+
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
|
|
3702
|
+
}
|
|
3703
|
+
|
|
3704
|
+
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Middleware.js
|
|
3705
|
+
function middleware(collection) {
|
|
3706
|
+
var length2 = sizeof(collection);
|
|
3707
|
+
return function(element, index, children, callback) {
|
|
3708
|
+
var output = "";
|
|
3709
|
+
for (var i2 = 0; i2 < length2; i2++)
|
|
3710
|
+
output += collection[i2](element, index, children, callback) || "";
|
|
3711
|
+
return output;
|
|
3712
|
+
};
|
|
3713
|
+
}
|
|
3714
|
+
function rulesheet(callback) {
|
|
3715
|
+
return function(element) {
|
|
3716
|
+
if (!element.root) {
|
|
3717
|
+
if (element = element.return)
|
|
3718
|
+
callback(element);
|
|
3719
|
+
}
|
|
3720
|
+
};
|
|
3721
|
+
}
|
|
3722
|
+
function prefixer(element, index, children, callback) {
|
|
3723
|
+
if (element.length > -1) {
|
|
3724
|
+
if (!element.return)
|
|
3725
|
+
switch (element.type) {
|
|
3726
|
+
case DECLARATION:
|
|
3727
|
+
element.return = prefix(element.value, element.length, children);
|
|
3728
|
+
return;
|
|
3729
|
+
case KEYFRAMES:
|
|
3730
|
+
return serialize([copy(element, { value: replace(element.value, "@", "@" + WEBKIT) })], callback);
|
|
3731
|
+
case RULESET:
|
|
3732
|
+
if (element.length)
|
|
3733
|
+
return combine(children = element.props, function(value) {
|
|
3734
|
+
switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
|
|
3735
|
+
case ":read-only":
|
|
3736
|
+
case ":read-write":
|
|
3737
|
+
lift(copy(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] }));
|
|
3738
|
+
lift(copy(element, { props: [value] }));
|
|
3739
|
+
assign(element, { props: filter(children, callback) });
|
|
3740
|
+
break;
|
|
3741
|
+
case "::placeholder":
|
|
3742
|
+
lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] }));
|
|
3743
|
+
lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] }));
|
|
3744
|
+
lift(copy(element, { props: [replace(value, /:(plac\w+)/, MS + "input-$1")] }));
|
|
3745
|
+
lift(copy(element, { props: [value] }));
|
|
3746
|
+
assign(element, { props: filter(children, callback) });
|
|
3747
|
+
break;
|
|
3748
|
+
}
|
|
3749
|
+
return "";
|
|
3750
|
+
});
|
|
3751
|
+
}
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3754
|
+
|
|
3755
|
+
// ../../node_modules/.pnpm/@emotion+unitless@0.8.1/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
|
|
3756
|
+
var unitlessKeys = {
|
|
3757
|
+
animationIterationCount: 1,
|
|
3758
|
+
aspectRatio: 1,
|
|
3759
|
+
borderImageOutset: 1,
|
|
3760
|
+
borderImageSlice: 1,
|
|
3761
|
+
borderImageWidth: 1,
|
|
3762
|
+
boxFlex: 1,
|
|
3763
|
+
boxFlexGroup: 1,
|
|
3764
|
+
boxOrdinalGroup: 1,
|
|
3765
|
+
columnCount: 1,
|
|
3766
|
+
columns: 1,
|
|
3767
|
+
flex: 1,
|
|
3768
|
+
flexGrow: 1,
|
|
3769
|
+
flexPositive: 1,
|
|
3770
|
+
flexShrink: 1,
|
|
3771
|
+
flexNegative: 1,
|
|
3772
|
+
flexOrder: 1,
|
|
3773
|
+
gridRow: 1,
|
|
3774
|
+
gridRowEnd: 1,
|
|
3775
|
+
gridRowSpan: 1,
|
|
3776
|
+
gridRowStart: 1,
|
|
3777
|
+
gridColumn: 1,
|
|
3778
|
+
gridColumnEnd: 1,
|
|
3779
|
+
gridColumnSpan: 1,
|
|
3780
|
+
gridColumnStart: 1,
|
|
3781
|
+
msGridRow: 1,
|
|
3782
|
+
msGridRowSpan: 1,
|
|
3783
|
+
msGridColumn: 1,
|
|
3784
|
+
msGridColumnSpan: 1,
|
|
3785
|
+
fontWeight: 1,
|
|
3786
|
+
lineHeight: 1,
|
|
3787
|
+
opacity: 1,
|
|
3788
|
+
order: 1,
|
|
3789
|
+
orphans: 1,
|
|
3790
|
+
tabSize: 1,
|
|
3791
|
+
widows: 1,
|
|
3792
|
+
zIndex: 1,
|
|
3793
|
+
zoom: 1,
|
|
3794
|
+
WebkitLineClamp: 1,
|
|
3795
|
+
// SVG-related properties
|
|
3796
|
+
fillOpacity: 1,
|
|
3797
|
+
floodOpacity: 1,
|
|
3798
|
+
stopOpacity: 1,
|
|
3799
|
+
strokeDasharray: 1,
|
|
3800
|
+
strokeDashoffset: 1,
|
|
3801
|
+
strokeMiterlimit: 1,
|
|
3802
|
+
strokeOpacity: 1,
|
|
3803
|
+
strokeWidth: 1
|
|
3804
|
+
};
|
|
3805
|
+
|
|
3806
|
+
// ../../node_modules/.pnpm/styled-components@6.1.11_react-dom@18.3.1_react@18.3.1/node_modules/styled-components/dist/styled-components.esm.js
|
|
3807
|
+
var f = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled";
|
|
3808
|
+
var m = "active";
|
|
3809
|
+
var y = "data-styled-version";
|
|
3810
|
+
var v = "6.1.11";
|
|
3811
|
+
var g = "/*!sc*/\n";
|
|
3812
|
+
var S = "undefined" != typeof window && "HTMLElement" in window;
|
|
3813
|
+
var w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : "production" !== process.env.NODE_ENV);
|
|
3814
|
+
var E = /invalid hook call/i;
|
|
3815
|
+
var N = /* @__PURE__ */ new Set();
|
|
3816
|
+
var P = function(t, n) {
|
|
3817
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
3818
|
+
var o2 = n ? ' with the id of "'.concat(n, '"') : "", s2 = "The component ".concat(t).concat(o2, " has been created dynamically.\n") + "You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.", i2 = console.error;
|
|
3819
|
+
try {
|
|
3820
|
+
var a3 = true;
|
|
3821
|
+
console.error = function(t2) {
|
|
3822
|
+
for (var n2 = [], o3 = 1; o3 < arguments.length; o3++) n2[o3 - 1] = arguments[o3];
|
|
3823
|
+
E.test(t2) ? (a3 = false, N.delete(s2)) : i2.apply(void 0, __spreadArray([t2], n2, false));
|
|
3824
|
+
}, (0, import_react21.useRef)(), a3 && !N.has(s2) && (console.warn(s2), N.add(s2));
|
|
3825
|
+
} catch (e) {
|
|
3826
|
+
E.test(e.message) && N.delete(s2);
|
|
3827
|
+
} finally {
|
|
3828
|
+
console.error = i2;
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3831
|
+
};
|
|
3832
|
+
var _ = Object.freeze([]);
|
|
3833
|
+
var C = Object.freeze({});
|
|
3834
|
+
function I(e, t, n) {
|
|
3835
|
+
return void 0 === n && (n = C), e.theme !== n.theme && e.theme || t || n.theme;
|
|
3836
|
+
}
|
|
3837
|
+
var A = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]);
|
|
3838
|
+
var O = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g;
|
|
3839
|
+
var D = /(^-|-$)/g;
|
|
3840
|
+
function R(e) {
|
|
3841
|
+
return e.replace(O, "-").replace(D, "");
|
|
3842
|
+
}
|
|
3843
|
+
var T = /(a)(d)/gi;
|
|
3844
|
+
var k = 52;
|
|
3845
|
+
var j = function(e) {
|
|
3846
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
3847
|
+
};
|
|
3848
|
+
function x(e) {
|
|
3849
|
+
var t, n = "";
|
|
3850
|
+
for (t = Math.abs(e); t > k; t = t / k | 0) n = j(t % k) + n;
|
|
3851
|
+
return (j(t % k) + n).replace(T, "$1-$2");
|
|
3852
|
+
}
|
|
3853
|
+
var V;
|
|
3854
|
+
var F = 5381;
|
|
3855
|
+
var M = function(e, t) {
|
|
3856
|
+
for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
|
|
3857
|
+
return e;
|
|
3858
|
+
};
|
|
3859
|
+
var z = function(e) {
|
|
3860
|
+
return M(F, e);
|
|
3861
|
+
};
|
|
3862
|
+
function $(e) {
|
|
3863
|
+
return x(z(e) >>> 0);
|
|
3864
|
+
}
|
|
3865
|
+
function B(e) {
|
|
3866
|
+
return "production" !== process.env.NODE_ENV && "string" == typeof e && e || e.displayName || e.name || "Component";
|
|
3867
|
+
}
|
|
3868
|
+
function L(e) {
|
|
3869
|
+
return "string" == typeof e && ("production" === process.env.NODE_ENV || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
3870
|
+
}
|
|
3871
|
+
var G = "function" == typeof Symbol && Symbol.for;
|
|
3872
|
+
var Y = G ? Symbol.for("react.memo") : 60115;
|
|
3873
|
+
var q = G ? Symbol.for("react.forward_ref") : 60112;
|
|
3874
|
+
var W = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true };
|
|
3875
|
+
var H = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true };
|
|
3876
|
+
var U = { $$typeof: true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true };
|
|
3877
|
+
var J = ((V = {})[q] = { $$typeof: true, render: true, defaultProps: true, displayName: true, propTypes: true }, V[Y] = U, V);
|
|
3878
|
+
function X(e) {
|
|
3879
|
+
return ("type" in (t = e) && t.type.$$typeof) === Y ? U : "$$typeof" in e ? J[e.$$typeof] : W;
|
|
3880
|
+
var t;
|
|
3881
|
+
}
|
|
3882
|
+
var Z = Object.defineProperty;
|
|
3883
|
+
var K = Object.getOwnPropertyNames;
|
|
3884
|
+
var Q = Object.getOwnPropertySymbols;
|
|
3885
|
+
var ee = Object.getOwnPropertyDescriptor;
|
|
3886
|
+
var te = Object.getPrototypeOf;
|
|
3887
|
+
var ne = Object.prototype;
|
|
3888
|
+
function oe(e, t, n) {
|
|
3889
|
+
if ("string" != typeof t) {
|
|
3890
|
+
if (ne) {
|
|
3891
|
+
var o2 = te(t);
|
|
3892
|
+
o2 && o2 !== ne && oe(e, o2, n);
|
|
3893
|
+
}
|
|
3894
|
+
var r2 = K(t);
|
|
3895
|
+
Q && (r2 = r2.concat(Q(t)));
|
|
3896
|
+
for (var s2 = X(e), i2 = X(t), a3 = 0; a3 < r2.length; ++a3) {
|
|
3897
|
+
var c2 = r2[a3];
|
|
3898
|
+
if (!(c2 in H || n && n[c2] || i2 && c2 in i2 || s2 && c2 in s2)) {
|
|
3899
|
+
var l2 = ee(t, c2);
|
|
3900
|
+
try {
|
|
3901
|
+
Z(e, c2, l2);
|
|
3902
|
+
} catch (e2) {
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3907
|
+
return e;
|
|
3908
|
+
}
|
|
3909
|
+
function re(e) {
|
|
3910
|
+
return "function" == typeof e;
|
|
3911
|
+
}
|
|
3912
|
+
function se(e) {
|
|
3913
|
+
return "object" == typeof e && "styledComponentId" in e;
|
|
3914
|
+
}
|
|
3915
|
+
function ie(e, t) {
|
|
3916
|
+
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
3917
|
+
}
|
|
3918
|
+
function ae(e, t) {
|
|
3919
|
+
if (0 === e.length) return "";
|
|
3920
|
+
for (var n = e[0], o2 = 1; o2 < e.length; o2++) n += t ? t + e[o2] : e[o2];
|
|
3921
|
+
return n;
|
|
3922
|
+
}
|
|
3923
|
+
function ce(e) {
|
|
3924
|
+
return null !== e && "object" == typeof e && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
3925
|
+
}
|
|
3926
|
+
function le(e, t, n) {
|
|
3927
|
+
if (void 0 === n && (n = false), !n && !ce(e) && !Array.isArray(e)) return t;
|
|
3928
|
+
if (Array.isArray(t)) for (var o2 = 0; o2 < t.length; o2++) e[o2] = le(e[o2], t[o2]);
|
|
3929
|
+
else if (ce(t)) for (var o2 in t) e[o2] = le(e[o2], t[o2]);
|
|
3930
|
+
return e;
|
|
3931
|
+
}
|
|
3932
|
+
function ue(e, t) {
|
|
3933
|
+
Object.defineProperty(e, "toString", { value: t });
|
|
3934
|
+
}
|
|
3935
|
+
var pe = "production" !== process.env.NODE_ENV ? { 1: "Cannot create styled-component for component: %s.\n\n", 2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n", 3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", 4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n", 5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n", 6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n", 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: 'ThemeProvider: Please make your "theme" prop an object.\n\n', 9: "Missing document `<head>`\n\n", 10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", 11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n", 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n", 14: 'ThemeProvider: "theme" prop is required.\n\n', 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n", 17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n", 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
|
|
3936
|
+
function de() {
|
|
3937
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3938
|
+
for (var n = e[0], o2 = [], r2 = 1, s2 = e.length; r2 < s2; r2 += 1) o2.push(e[r2]);
|
|
3939
|
+
return o2.forEach(function(e2) {
|
|
3940
|
+
n = n.replace(/%[a-z]/, e2);
|
|
3941
|
+
}), n;
|
|
3942
|
+
}
|
|
3943
|
+
function he(t) {
|
|
3944
|
+
for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
|
|
3945
|
+
return "production" === process.env.NODE_ENV ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(n.length > 0 ? " Args: ".concat(n.join(", ")) : "")) : new Error(de.apply(void 0, __spreadArray([pe[t]], n, false)).trim());
|
|
3946
|
+
}
|
|
3947
|
+
var fe = function() {
|
|
3948
|
+
function e(e2) {
|
|
3949
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e2;
|
|
3950
|
+
}
|
|
3951
|
+
return e.prototype.indexOfGroup = function(e2) {
|
|
3952
|
+
for (var t = 0, n = 0; n < e2; n++) t += this.groupSizes[n];
|
|
3953
|
+
return t;
|
|
3954
|
+
}, e.prototype.insertRules = function(e2, t) {
|
|
3955
|
+
if (e2 >= this.groupSizes.length) {
|
|
3956
|
+
for (var n = this.groupSizes, o2 = n.length, r2 = o2; e2 >= r2; ) if ((r2 <<= 1) < 0) throw he(16, "".concat(e2));
|
|
3957
|
+
this.groupSizes = new Uint32Array(r2), this.groupSizes.set(n), this.length = r2;
|
|
3958
|
+
for (var s2 = o2; s2 < r2; s2++) this.groupSizes[s2] = 0;
|
|
3959
|
+
}
|
|
3960
|
+
for (var i2 = this.indexOfGroup(e2 + 1), a3 = (s2 = 0, t.length); s2 < a3; s2++) this.tag.insertRule(i2, t[s2]) && (this.groupSizes[e2]++, i2++);
|
|
3961
|
+
}, e.prototype.clearGroup = function(e2) {
|
|
3962
|
+
if (e2 < this.length) {
|
|
3963
|
+
var t = this.groupSizes[e2], n = this.indexOfGroup(e2), o2 = n + t;
|
|
3964
|
+
this.groupSizes[e2] = 0;
|
|
3965
|
+
for (var r2 = n; r2 < o2; r2++) this.tag.deleteRule(n);
|
|
3966
|
+
}
|
|
3967
|
+
}, e.prototype.getGroup = function(e2) {
|
|
3968
|
+
var t = "";
|
|
3969
|
+
if (e2 >= this.length || 0 === this.groupSizes[e2]) return t;
|
|
3970
|
+
for (var n = this.groupSizes[e2], o2 = this.indexOfGroup(e2), r2 = o2 + n, s2 = o2; s2 < r2; s2++) t += "".concat(this.tag.getRule(s2)).concat(g);
|
|
3971
|
+
return t;
|
|
3972
|
+
}, e;
|
|
3973
|
+
}();
|
|
3974
|
+
var me = 1 << 30;
|
|
3975
|
+
var ye = /* @__PURE__ */ new Map();
|
|
3976
|
+
var ve = /* @__PURE__ */ new Map();
|
|
3977
|
+
var ge = 1;
|
|
3978
|
+
var Se = function(e) {
|
|
3979
|
+
if (ye.has(e)) return ye.get(e);
|
|
3980
|
+
for (; ve.has(ge); ) ge++;
|
|
3981
|
+
var t = ge++;
|
|
3982
|
+
if ("production" !== process.env.NODE_ENV && ((0 | t) < 0 || t > me)) throw he(16, "".concat(t));
|
|
3983
|
+
return ye.set(e, t), ve.set(t, e), t;
|
|
3984
|
+
};
|
|
3985
|
+
var we = function(e, t) {
|
|
3986
|
+
ge = t + 1, ye.set(e, t), ve.set(t, e);
|
|
3987
|
+
};
|
|
3988
|
+
var be = "style[".concat(f, "][").concat(y, '="').concat(v, '"]');
|
|
3989
|
+
var Ee = new RegExp("^".concat(f, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'));
|
|
3990
|
+
var Ne = function(e, t, n) {
|
|
3991
|
+
for (var o2, r2 = n.split(","), s2 = 0, i2 = r2.length; s2 < i2; s2++) (o2 = r2[s2]) && e.registerName(t, o2);
|
|
3992
|
+
};
|
|
3993
|
+
var Pe = function(e, t) {
|
|
3994
|
+
for (var n, o2 = (null !== (n = t.textContent) && void 0 !== n ? n : "").split(g), r2 = [], s2 = 0, i2 = o2.length; s2 < i2; s2++) {
|
|
3995
|
+
var a3 = o2[s2].trim();
|
|
3996
|
+
if (a3) {
|
|
3997
|
+
var c2 = a3.match(Ee);
|
|
3998
|
+
if (c2) {
|
|
3999
|
+
var l2 = 0 | parseInt(c2[1], 10), u2 = c2[2];
|
|
4000
|
+
0 !== l2 && (we(u2, l2), Ne(e, u2, c2[3]), e.getTag().insertRules(l2, r2)), r2.length = 0;
|
|
4001
|
+
} else r2.push(a3);
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
};
|
|
4005
|
+
function _e() {
|
|
4006
|
+
return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : null;
|
|
4007
|
+
}
|
|
4008
|
+
var Ce = function(e) {
|
|
4009
|
+
var t = document.head, n = e || t, o2 = document.createElement("style"), r2 = function(e2) {
|
|
4010
|
+
var t2 = Array.from(e2.querySelectorAll("style[".concat(f, "]")));
|
|
4011
|
+
return t2[t2.length - 1];
|
|
4012
|
+
}(n), s2 = void 0 !== r2 ? r2.nextSibling : null;
|
|
4013
|
+
o2.setAttribute(f, m), o2.setAttribute(y, v);
|
|
4014
|
+
var i2 = _e();
|
|
4015
|
+
return i2 && o2.setAttribute("nonce", i2), n.insertBefore(o2, s2), o2;
|
|
4016
|
+
};
|
|
4017
|
+
var Ie = function() {
|
|
4018
|
+
function e(e2) {
|
|
4019
|
+
this.element = Ce(e2), this.element.appendChild(document.createTextNode("")), this.sheet = function(e3) {
|
|
4020
|
+
if (e3.sheet) return e3.sheet;
|
|
4021
|
+
for (var t = document.styleSheets, n = 0, o2 = t.length; n < o2; n++) {
|
|
4022
|
+
var r2 = t[n];
|
|
4023
|
+
if (r2.ownerNode === e3) return r2;
|
|
4024
|
+
}
|
|
4025
|
+
throw he(17);
|
|
4026
|
+
}(this.element), this.length = 0;
|
|
4027
|
+
}
|
|
4028
|
+
return e.prototype.insertRule = function(e2, t) {
|
|
4029
|
+
try {
|
|
4030
|
+
return this.sheet.insertRule(t, e2), this.length++, true;
|
|
4031
|
+
} catch (e3) {
|
|
4032
|
+
return false;
|
|
4033
|
+
}
|
|
4034
|
+
}, e.prototype.deleteRule = function(e2) {
|
|
4035
|
+
this.sheet.deleteRule(e2), this.length--;
|
|
4036
|
+
}, e.prototype.getRule = function(e2) {
|
|
4037
|
+
var t = this.sheet.cssRules[e2];
|
|
4038
|
+
return t && t.cssText ? t.cssText : "";
|
|
4039
|
+
}, e;
|
|
4040
|
+
}();
|
|
4041
|
+
var Ae = function() {
|
|
4042
|
+
function e(e2) {
|
|
4043
|
+
this.element = Ce(e2), this.nodes = this.element.childNodes, this.length = 0;
|
|
4044
|
+
}
|
|
4045
|
+
return e.prototype.insertRule = function(e2, t) {
|
|
4046
|
+
if (e2 <= this.length && e2 >= 0) {
|
|
4047
|
+
var n = document.createTextNode(t);
|
|
4048
|
+
return this.element.insertBefore(n, this.nodes[e2] || null), this.length++, true;
|
|
4049
|
+
}
|
|
4050
|
+
return false;
|
|
4051
|
+
}, e.prototype.deleteRule = function(e2) {
|
|
4052
|
+
this.element.removeChild(this.nodes[e2]), this.length--;
|
|
4053
|
+
}, e.prototype.getRule = function(e2) {
|
|
4054
|
+
return e2 < this.length ? this.nodes[e2].textContent : "";
|
|
4055
|
+
}, e;
|
|
4056
|
+
}();
|
|
4057
|
+
var Oe = function() {
|
|
4058
|
+
function e(e2) {
|
|
4059
|
+
this.rules = [], this.length = 0;
|
|
4060
|
+
}
|
|
4061
|
+
return e.prototype.insertRule = function(e2, t) {
|
|
4062
|
+
return e2 <= this.length && (this.rules.splice(e2, 0, t), this.length++, true);
|
|
4063
|
+
}, e.prototype.deleteRule = function(e2) {
|
|
4064
|
+
this.rules.splice(e2, 1), this.length--;
|
|
4065
|
+
}, e.prototype.getRule = function(e2) {
|
|
4066
|
+
return e2 < this.length ? this.rules[e2] : "";
|
|
4067
|
+
}, e;
|
|
4068
|
+
}();
|
|
4069
|
+
var De = S;
|
|
4070
|
+
var Re = { isServer: !S, useCSSOMInjection: !w };
|
|
4071
|
+
var Te = function() {
|
|
4072
|
+
function e(e2, n, o2) {
|
|
4073
|
+
void 0 === e2 && (e2 = C), void 0 === n && (n = {});
|
|
4074
|
+
var r2 = this;
|
|
4075
|
+
this.options = __assign(__assign({}, Re), e2), this.gs = n, this.names = new Map(o2), this.server = !!e2.isServer, !this.server && S && De && (De = false, function(e3) {
|
|
4076
|
+
for (var t = document.querySelectorAll(be), n2 = 0, o3 = t.length; n2 < o3; n2++) {
|
|
4077
|
+
var r3 = t[n2];
|
|
4078
|
+
r3 && r3.getAttribute(f) !== m && (Pe(e3, r3), r3.parentNode && r3.parentNode.removeChild(r3));
|
|
4079
|
+
}
|
|
4080
|
+
}(this)), ue(this, function() {
|
|
4081
|
+
return function(e3) {
|
|
4082
|
+
for (var t = e3.getTag(), n2 = t.length, o3 = "", r3 = function(n3) {
|
|
4083
|
+
var r4 = function(e4) {
|
|
4084
|
+
return ve.get(e4);
|
|
4085
|
+
}(n3);
|
|
4086
|
+
if (void 0 === r4) return "continue";
|
|
4087
|
+
var s3 = e3.names.get(r4), i2 = t.getGroup(n3);
|
|
4088
|
+
if (void 0 === s3 || 0 === i2.length) return "continue";
|
|
4089
|
+
var a3 = "".concat(f, ".g").concat(n3, '[id="').concat(r4, '"]'), c2 = "";
|
|
4090
|
+
void 0 !== s3 && s3.forEach(function(e4) {
|
|
4091
|
+
e4.length > 0 && (c2 += "".concat(e4, ","));
|
|
4092
|
+
}), o3 += "".concat(i2).concat(a3, '{content:"').concat(c2, '"}').concat(g);
|
|
4093
|
+
}, s2 = 0; s2 < n2; s2++) r3(s2);
|
|
4094
|
+
return o3;
|
|
4095
|
+
}(r2);
|
|
4096
|
+
});
|
|
4097
|
+
}
|
|
4098
|
+
return e.registerId = function(e2) {
|
|
4099
|
+
return Se(e2);
|
|
4100
|
+
}, e.prototype.reconstructWithOptions = function(n, o2) {
|
|
4101
|
+
return void 0 === o2 && (o2 = true), new e(__assign(__assign({}, this.options), n), this.gs, o2 && this.names || void 0);
|
|
4102
|
+
}, e.prototype.allocateGSInstance = function(e2) {
|
|
4103
|
+
return this.gs[e2] = (this.gs[e2] || 0) + 1;
|
|
4104
|
+
}, e.prototype.getTag = function() {
|
|
4105
|
+
return this.tag || (this.tag = (e2 = function(e3) {
|
|
4106
|
+
var t = e3.useCSSOMInjection, n = e3.target;
|
|
4107
|
+
return e3.isServer ? new Oe(n) : t ? new Ie(n) : new Ae(n);
|
|
4108
|
+
}(this.options), new fe(e2)));
|
|
4109
|
+
var e2;
|
|
4110
|
+
}, e.prototype.hasNameForId = function(e2, t) {
|
|
4111
|
+
return this.names.has(e2) && this.names.get(e2).has(t);
|
|
4112
|
+
}, e.prototype.registerName = function(e2, t) {
|
|
4113
|
+
if (Se(e2), this.names.has(e2)) this.names.get(e2).add(t);
|
|
4114
|
+
else {
|
|
4115
|
+
var n = /* @__PURE__ */ new Set();
|
|
4116
|
+
n.add(t), this.names.set(e2, n);
|
|
4117
|
+
}
|
|
4118
|
+
}, e.prototype.insertRules = function(e2, t, n) {
|
|
4119
|
+
this.registerName(e2, t), this.getTag().insertRules(Se(e2), n);
|
|
4120
|
+
}, e.prototype.clearNames = function(e2) {
|
|
4121
|
+
this.names.has(e2) && this.names.get(e2).clear();
|
|
4122
|
+
}, e.prototype.clearRules = function(e2) {
|
|
4123
|
+
this.getTag().clearGroup(Se(e2)), this.clearNames(e2);
|
|
4124
|
+
}, e.prototype.clearTag = function() {
|
|
4125
|
+
this.tag = void 0;
|
|
4126
|
+
}, e;
|
|
4127
|
+
}();
|
|
4128
|
+
var ke = /&/g;
|
|
4129
|
+
var je = /^\s*\/\/.*$/gm;
|
|
4130
|
+
function xe(e, t) {
|
|
4131
|
+
return e.map(function(e2) {
|
|
4132
|
+
return "rule" === e2.type && (e2.value = "".concat(t, " ").concat(e2.value), e2.value = e2.value.replaceAll(",", ",".concat(t, " ")), e2.props = e2.props.map(function(e3) {
|
|
4133
|
+
return "".concat(t, " ").concat(e3);
|
|
4134
|
+
})), Array.isArray(e2.children) && "@keyframes" !== e2.type && (e2.children = xe(e2.children, t)), e2;
|
|
4135
|
+
});
|
|
4136
|
+
}
|
|
4137
|
+
function Ve(e) {
|
|
4138
|
+
var t, n, o2, r2 = void 0 === e ? C : e, s2 = r2.options, i2 = void 0 === s2 ? C : s2, a3 = r2.plugins, c2 = void 0 === a3 ? _ : a3, l2 = function(e2, o3, r3) {
|
|
4139
|
+
return r3.startsWith(n) && r3.endsWith(n) && r3.replaceAll(n, "").length > 0 ? ".".concat(t) : e2;
|
|
4140
|
+
}, u2 = c2.slice();
|
|
4141
|
+
u2.push(function(e2) {
|
|
4142
|
+
e2.type === RULESET && e2.value.includes("&") && (e2.props[0] = e2.props[0].replace(ke, n).replace(o2, l2));
|
|
4143
|
+
}), i2.prefix && u2.push(prefixer), u2.push(stringify);
|
|
4144
|
+
var p2 = function(e2, r3, s3, a4) {
|
|
4145
|
+
void 0 === r3 && (r3 = ""), void 0 === s3 && (s3 = ""), void 0 === a4 && (a4 = "&"), t = a4, n = r3, o2 = new RegExp("\\".concat(n, "\\b"), "g");
|
|
4146
|
+
var c3 = e2.replace(je, ""), l3 = compile(s3 || r3 ? "".concat(s3, " ").concat(r3, " { ").concat(c3, " }") : c3);
|
|
4147
|
+
i2.namespace && (l3 = xe(l3, i2.namespace));
|
|
4148
|
+
var p3 = [];
|
|
4149
|
+
return serialize(l3, middleware(u2.concat(rulesheet(function(e3) {
|
|
4150
|
+
return p3.push(e3);
|
|
4151
|
+
})))), p3;
|
|
4152
|
+
};
|
|
4153
|
+
return p2.hash = c2.length ? c2.reduce(function(e2, t2) {
|
|
4154
|
+
return t2.name || he(15), M(e2, t2.name);
|
|
4155
|
+
}, F).toString() : "", p2;
|
|
4156
|
+
}
|
|
4157
|
+
var Fe = new Te();
|
|
4158
|
+
var Me = Ve();
|
|
4159
|
+
var ze = import_react21.default.createContext({ shouldForwardProp: void 0, styleSheet: Fe, stylis: Me });
|
|
4160
|
+
var $e = ze.Consumer;
|
|
4161
|
+
var Be = import_react21.default.createContext(void 0);
|
|
4162
|
+
function Le() {
|
|
4163
|
+
return (0, import_react21.useContext)(ze);
|
|
4164
|
+
}
|
|
4165
|
+
function Ge(e) {
|
|
4166
|
+
var t = (0, import_react21.useState)(e.stylisPlugins), n = t[0], r2 = t[1], c2 = Le().styleSheet, l2 = (0, import_react21.useMemo)(function() {
|
|
4167
|
+
var t2 = c2;
|
|
4168
|
+
return e.sheet ? t2 = e.sheet : e.target && (t2 = t2.reconstructWithOptions({ target: e.target }, false)), e.disableCSSOMInjection && (t2 = t2.reconstructWithOptions({ useCSSOMInjection: false })), t2;
|
|
4169
|
+
}, [e.disableCSSOMInjection, e.sheet, e.target, c2]), u2 = (0, import_react21.useMemo)(function() {
|
|
4170
|
+
return Ve({ options: { namespace: e.namespace, prefix: e.enableVendorPrefixes }, plugins: n });
|
|
4171
|
+
}, [e.enableVendorPrefixes, e.namespace, n]);
|
|
4172
|
+
(0, import_react21.useEffect)(function() {
|
|
4173
|
+
(0, import_shallowequal.default)(n, e.stylisPlugins) || r2(e.stylisPlugins);
|
|
4174
|
+
}, [e.stylisPlugins]);
|
|
4175
|
+
var d = (0, import_react21.useMemo)(function() {
|
|
4176
|
+
return { shouldForwardProp: e.shouldForwardProp, styleSheet: l2, stylis: u2 };
|
|
4177
|
+
}, [e.shouldForwardProp, l2, u2]);
|
|
4178
|
+
return import_react21.default.createElement(ze.Provider, { value: d }, import_react21.default.createElement(Be.Provider, { value: u2 }, e.children));
|
|
4179
|
+
}
|
|
4180
|
+
var Ye = function() {
|
|
4181
|
+
function e(e2, t) {
|
|
4182
|
+
var n = this;
|
|
4183
|
+
this.inject = function(e3, t2) {
|
|
4184
|
+
void 0 === t2 && (t2 = Me);
|
|
4185
|
+
var o2 = n.name + t2.hash;
|
|
4186
|
+
e3.hasNameForId(n.id, o2) || e3.insertRules(n.id, o2, t2(n.rules, o2, "@keyframes"));
|
|
4187
|
+
}, this.name = e2, this.id = "sc-keyframes-".concat(e2), this.rules = t, ue(this, function() {
|
|
4188
|
+
throw he(12, String(n.name));
|
|
4189
|
+
});
|
|
4190
|
+
}
|
|
4191
|
+
return e.prototype.getName = function(e2) {
|
|
4192
|
+
return void 0 === e2 && (e2 = Me), this.name + e2.hash;
|
|
4193
|
+
}, e;
|
|
4194
|
+
}();
|
|
4195
|
+
var qe = function(e) {
|
|
4196
|
+
return e >= "A" && e <= "Z";
|
|
4197
|
+
};
|
|
4198
|
+
function We(e) {
|
|
4199
|
+
for (var t = "", n = 0; n < e.length; n++) {
|
|
4200
|
+
var o2 = e[n];
|
|
4201
|
+
if (1 === n && "-" === o2 && "-" === e[0]) return e;
|
|
4202
|
+
qe(o2) ? t += "-" + o2.toLowerCase() : t += o2;
|
|
4203
|
+
}
|
|
4204
|
+
return t.startsWith("ms-") ? "-" + t : t;
|
|
4205
|
+
}
|
|
4206
|
+
var He = function(e) {
|
|
4207
|
+
return null == e || false === e || "" === e;
|
|
4208
|
+
};
|
|
4209
|
+
var Ue = function(t) {
|
|
4210
|
+
var n, o2, r2 = [];
|
|
4211
|
+
for (var s2 in t) {
|
|
4212
|
+
var i2 = t[s2];
|
|
4213
|
+
t.hasOwnProperty(s2) && !He(i2) && (Array.isArray(i2) && i2.isCss || re(i2) ? r2.push("".concat(We(s2), ":"), i2, ";") : ce(i2) ? r2.push.apply(r2, __spreadArray(__spreadArray(["".concat(s2, " {")], Ue(i2), false), ["}"], false)) : r2.push("".concat(We(s2), ": ").concat((n = s2, null == (o2 = i2) || "boolean" == typeof o2 || "" === o2 ? "" : "number" != typeof o2 || 0 === o2 || n in unitlessKeys || n.startsWith("--") ? String(o2).trim() : "".concat(o2, "px")), ";")));
|
|
4214
|
+
}
|
|
4215
|
+
return r2;
|
|
4216
|
+
};
|
|
4217
|
+
function Je(e, t, n, o2) {
|
|
4218
|
+
if (He(e)) return [];
|
|
4219
|
+
if (se(e)) return [".".concat(e.styledComponentId)];
|
|
4220
|
+
if (re(e)) {
|
|
4221
|
+
if (!re(s2 = e) || s2.prototype && s2.prototype.isReactComponent || !t) return [e];
|
|
4222
|
+
var r2 = e(t);
|
|
4223
|
+
return "production" === process.env.NODE_ENV || "object" != typeof r2 || Array.isArray(r2) || r2 instanceof Ye || ce(r2) || null === r2 || console.error("".concat(B(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Je(r2, t, n, o2);
|
|
4224
|
+
}
|
|
4225
|
+
var s2;
|
|
4226
|
+
return e instanceof Ye ? n ? (e.inject(n, o2), [e.getName(o2)]) : [e] : ce(e) ? Ue(e) : Array.isArray(e) ? Array.prototype.concat.apply(_, e.map(function(e2) {
|
|
4227
|
+
return Je(e2, t, n, o2);
|
|
4228
|
+
})) : [e.toString()];
|
|
4229
|
+
}
|
|
4230
|
+
function Xe(e) {
|
|
4231
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
4232
|
+
var n = e[t];
|
|
4233
|
+
if (re(n) && !se(n)) return false;
|
|
4234
|
+
}
|
|
4235
|
+
return true;
|
|
4236
|
+
}
|
|
4237
|
+
var Ze = z(v);
|
|
4238
|
+
var Ke = function() {
|
|
4239
|
+
function e(e2, t, n) {
|
|
4240
|
+
this.rules = e2, this.staticRulesId = "", this.isStatic = "production" === process.env.NODE_ENV && (void 0 === n || n.isStatic) && Xe(e2), this.componentId = t, this.baseHash = M(Ze, t), this.baseStyle = n, Te.registerId(t);
|
|
4241
|
+
}
|
|
4242
|
+
return e.prototype.generateAndInjectStyles = function(e2, t, n) {
|
|
4243
|
+
var o2 = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e2, t, n) : "";
|
|
4244
|
+
if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o2 = ie(o2, this.staticRulesId);
|
|
4245
|
+
else {
|
|
4246
|
+
var r2 = ae(Je(this.rules, e2, t, n)), s2 = x(M(this.baseHash, r2) >>> 0);
|
|
4247
|
+
if (!t.hasNameForId(this.componentId, s2)) {
|
|
4248
|
+
var i2 = n(r2, ".".concat(s2), void 0, this.componentId);
|
|
4249
|
+
t.insertRules(this.componentId, s2, i2);
|
|
4250
|
+
}
|
|
4251
|
+
o2 = ie(o2, s2), this.staticRulesId = s2;
|
|
4252
|
+
}
|
|
4253
|
+
else {
|
|
4254
|
+
for (var a3 = M(this.baseHash, n.hash), c2 = "", l2 = 0; l2 < this.rules.length; l2++) {
|
|
4255
|
+
var u2 = this.rules[l2];
|
|
4256
|
+
if ("string" == typeof u2) c2 += u2, "production" !== process.env.NODE_ENV && (a3 = M(a3, u2));
|
|
4257
|
+
else if (u2) {
|
|
4258
|
+
var p2 = ae(Je(u2, e2, t, n));
|
|
4259
|
+
a3 = M(a3, p2 + l2), c2 += p2;
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4262
|
+
if (c2) {
|
|
4263
|
+
var d = x(a3 >>> 0);
|
|
4264
|
+
t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c2, ".".concat(d), void 0, this.componentId)), o2 = ie(o2, d);
|
|
4265
|
+
}
|
|
4266
|
+
}
|
|
4267
|
+
return o2;
|
|
4268
|
+
}, e;
|
|
4269
|
+
}();
|
|
4270
|
+
var Qe = import_react21.default.createContext(void 0);
|
|
4271
|
+
var et = Qe.Consumer;
|
|
4272
|
+
var ot = {};
|
|
4273
|
+
var rt = /* @__PURE__ */ new Set();
|
|
4274
|
+
function st(e, r2, s2) {
|
|
4275
|
+
var i2 = se(e), a3 = e, c2 = !L(e), p2 = r2.attrs, d = void 0 === p2 ? _ : p2, h = r2.componentId, f2 = void 0 === h ? function(e2, t) {
|
|
4276
|
+
var n = "string" != typeof e2 ? "sc" : R(e2);
|
|
4277
|
+
ot[n] = (ot[n] || 0) + 1;
|
|
4278
|
+
var o2 = "".concat(n, "-").concat($(v + n + ot[n]));
|
|
4279
|
+
return t ? "".concat(t, "-").concat(o2) : o2;
|
|
4280
|
+
}(r2.displayName, r2.parentComponentId) : h, m2 = r2.displayName, y2 = void 0 === m2 ? function(e2) {
|
|
4281
|
+
return L(e2) ? "styled.".concat(e2) : "Styled(".concat(B(e2), ")");
|
|
4282
|
+
}(e) : m2, g2 = r2.displayName && r2.componentId ? "".concat(R(r2.displayName), "-").concat(r2.componentId) : r2.componentId || f2, S2 = i2 && a3.attrs ? a3.attrs.concat(d).filter(Boolean) : d, w2 = r2.shouldForwardProp;
|
|
4283
|
+
if (i2 && a3.shouldForwardProp) {
|
|
4284
|
+
var b = a3.shouldForwardProp;
|
|
4285
|
+
if (r2.shouldForwardProp) {
|
|
4286
|
+
var E2 = r2.shouldForwardProp;
|
|
4287
|
+
w2 = function(e2, t) {
|
|
4288
|
+
return b(e2, t) && E2(e2, t);
|
|
4289
|
+
};
|
|
4290
|
+
} else w2 = b;
|
|
4291
|
+
}
|
|
4292
|
+
var N2 = new Ke(s2, g2, i2 ? a3.componentStyle : void 0);
|
|
4293
|
+
function O2(e2, r3) {
|
|
4294
|
+
return function(e3, r4, s3) {
|
|
4295
|
+
var i3 = e3.attrs, a4 = e3.componentStyle, c3 = e3.defaultProps, p3 = e3.foldedComponentIds, d2 = e3.styledComponentId, h2 = e3.target, f3 = import_react21.default.useContext(Qe), m3 = Le(), y3 = e3.shouldForwardProp || m3.shouldForwardProp;
|
|
4296
|
+
"production" !== process.env.NODE_ENV && (0, import_react21.useDebugValue)(d2);
|
|
4297
|
+
var v2 = I(r4, f3, c3) || C, g3 = function(e4, n, o2) {
|
|
4298
|
+
for (var r5, s4 = __assign(__assign({}, n), { className: void 0, theme: o2 }), i4 = 0; i4 < e4.length; i4 += 1) {
|
|
4299
|
+
var a5 = re(r5 = e4[i4]) ? r5(s4) : r5;
|
|
4300
|
+
for (var c4 in a5) s4[c4] = "className" === c4 ? ie(s4[c4], a5[c4]) : "style" === c4 ? __assign(__assign({}, s4[c4]), a5[c4]) : a5[c4];
|
|
4301
|
+
}
|
|
4302
|
+
return n.className && (s4.className = ie(s4.className, n.className)), s4;
|
|
4303
|
+
}(i3, r4, v2), S3 = g3.as || h2, w3 = {};
|
|
4304
|
+
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) || rt.has(b2) || !A.has(S3) || (rt.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.)')))));
|
|
4305
|
+
var E3 = function(e4, t) {
|
|
4306
|
+
var n = Le(), o2 = e4.generateAndInjectStyles(t, n.styleSheet, n.stylis);
|
|
4307
|
+
return "production" !== process.env.NODE_ENV && (0, import_react21.useDebugValue)(o2), o2;
|
|
4308
|
+
}(a4, g3);
|
|
4309
|
+
"production" !== process.env.NODE_ENV && e3.warnTooManyClasses && e3.warnTooManyClasses(E3);
|
|
4310
|
+
var N3 = ie(p3, d2);
|
|
4311
|
+
return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[L(S3) && !A.has(S3) ? "class" : "className"] = N3, w3.ref = s3, (0, import_react21.createElement)(S3, w3);
|
|
4312
|
+
}(D2, e2, r3);
|
|
4313
|
+
}
|
|
4314
|
+
O2.displayName = y2;
|
|
4315
|
+
var D2 = import_react21.default.forwardRef(O2);
|
|
4316
|
+
return D2.attrs = S2, D2.componentStyle = N2, D2.displayName = y2, D2.shouldForwardProp = w2, D2.foldedComponentIds = i2 ? ie(a3.foldedComponentIds, a3.styledComponentId) : "", D2.styledComponentId = g2, D2.target = i2 ? a3.target : e, Object.defineProperty(D2, "defaultProps", { get: function() {
|
|
4317
|
+
return this._foldedDefaultProps;
|
|
4318
|
+
}, set: function(e2) {
|
|
4319
|
+
this._foldedDefaultProps = i2 ? function(e3) {
|
|
4320
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
4321
|
+
for (var o2 = 0, r3 = t; o2 < r3.length; o2++) le(e3, r3[o2], true);
|
|
4322
|
+
return e3;
|
|
4323
|
+
}({}, a3.defaultProps, e2) : e2;
|
|
4324
|
+
} }), "production" !== process.env.NODE_ENV && (P(y2, g2), D2.warnTooManyClasses = /* @__PURE__ */ function(e2, t) {
|
|
4325
|
+
var n = {}, o2 = false;
|
|
4326
|
+
return function(r3) {
|
|
4327
|
+
if (!o2 && (n[r3] = true, Object.keys(n).length >= 200)) {
|
|
4328
|
+
var s3 = t ? ' with the id of "'.concat(t, '"') : "";
|
|
4329
|
+
console.warn("Over ".concat(200, " classes were generated for component ").concat(e2).concat(s3, ".\n") + "Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"), o2 = true, n = {};
|
|
4330
|
+
}
|
|
4331
|
+
};
|
|
4332
|
+
}(y2, g2)), ue(D2, function() {
|
|
4333
|
+
return ".".concat(D2.styledComponentId);
|
|
4334
|
+
}), c2 && oe(D2, e, { attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, shouldForwardProp: true, styledComponentId: true, target: true }), D2;
|
|
4335
|
+
}
|
|
4336
|
+
function it(e, t) {
|
|
4337
|
+
for (var n = [e[0]], o2 = 0, r2 = t.length; o2 < r2; o2 += 1) n.push(t[o2], e[o2 + 1]);
|
|
4338
|
+
return n;
|
|
4339
|
+
}
|
|
4340
|
+
var at = function(e) {
|
|
4341
|
+
return Object.assign(e, { isCss: true });
|
|
4342
|
+
};
|
|
4343
|
+
function ct(t) {
|
|
4344
|
+
for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
|
|
4345
|
+
if (re(t) || ce(t)) return at(Je(it(_, __spreadArray([t], n, true))));
|
|
4346
|
+
var r2 = t;
|
|
4347
|
+
return 0 === n.length && 1 === r2.length && "string" == typeof r2[0] ? Je(r2) : at(Je(it(r2, n)));
|
|
4348
|
+
}
|
|
4349
|
+
function lt(n, o2, r2) {
|
|
4350
|
+
if (void 0 === r2 && (r2 = C), !o2) throw he(1, o2);
|
|
4351
|
+
var s2 = function(t) {
|
|
4352
|
+
for (var s3 = [], i2 = 1; i2 < arguments.length; i2++) s3[i2 - 1] = arguments[i2];
|
|
4353
|
+
return n(o2, r2, ct.apply(void 0, __spreadArray([t], s3, false)));
|
|
4354
|
+
};
|
|
4355
|
+
return s2.attrs = function(e) {
|
|
4356
|
+
return lt(n, o2, __assign(__assign({}, r2), { attrs: Array.prototype.concat(r2.attrs, e).filter(Boolean) }));
|
|
4357
|
+
}, s2.withConfig = function(e) {
|
|
4358
|
+
return lt(n, o2, __assign(__assign({}, r2), e));
|
|
4359
|
+
}, s2;
|
|
4360
|
+
}
|
|
4361
|
+
var ut = function(e) {
|
|
4362
|
+
return lt(st, e);
|
|
4363
|
+
};
|
|
4364
|
+
var pt = ut;
|
|
4365
|
+
A.forEach(function(e) {
|
|
4366
|
+
pt[e] = ut(e);
|
|
4367
|
+
});
|
|
4368
|
+
var dt = function() {
|
|
4369
|
+
function e(e2, t) {
|
|
4370
|
+
this.rules = e2, this.componentId = t, this.isStatic = Xe(e2), Te.registerId(this.componentId + 1);
|
|
4371
|
+
}
|
|
4372
|
+
return e.prototype.createStyles = function(e2, t, n, o2) {
|
|
4373
|
+
var r2 = o2(ae(Je(this.rules, t, n, o2)), ""), s2 = this.componentId + e2;
|
|
4374
|
+
n.insertRules(s2, s2, r2);
|
|
4375
|
+
}, e.prototype.removeStyles = function(e2, t) {
|
|
4376
|
+
t.clearRules(this.componentId + e2);
|
|
4377
|
+
}, e.prototype.renderStyles = function(e2, t, n, o2) {
|
|
4378
|
+
e2 > 2 && Te.registerId(this.componentId + e2), this.removeStyles(e2, n), this.createStyles(e2, t, n, o2);
|
|
4379
|
+
}, e;
|
|
4380
|
+
}();
|
|
4381
|
+
var yt = /^\s*<\/[a-z]/i;
|
|
4382
|
+
var vt = function() {
|
|
4383
|
+
function e() {
|
|
4384
|
+
var e2 = this;
|
|
4385
|
+
this._emitSheetCSS = function() {
|
|
4386
|
+
var t = e2.instance.toString(), n = _e(), o2 = ae([n && 'nonce="'.concat(n, '"'), "".concat(f, '="true"'), "".concat(y, '="').concat(v, '"')].filter(Boolean), " ");
|
|
4387
|
+
return "<style ".concat(o2, ">").concat(t, "</style>");
|
|
4388
|
+
}, this.getStyleTags = function() {
|
|
4389
|
+
if (e2.sealed) throw he(2);
|
|
4390
|
+
return e2._emitSheetCSS();
|
|
4391
|
+
}, this.getStyleElement = function() {
|
|
4392
|
+
var n;
|
|
4393
|
+
if (e2.sealed) throw he(2);
|
|
4394
|
+
var r2 = ((n = {})[f] = "", n[y] = v, n.dangerouslySetInnerHTML = { __html: e2.instance.toString() }, n), s2 = _e();
|
|
4395
|
+
return s2 && (r2.nonce = s2), [import_react21.default.createElement("style", __assign({}, r2, { key: "sc-0-0" }))];
|
|
4396
|
+
}, this.seal = function() {
|
|
4397
|
+
e2.sealed = true;
|
|
4398
|
+
}, this.instance = new Te({ isServer: true }), this.sealed = false;
|
|
4399
|
+
}
|
|
4400
|
+
return e.prototype.collectStyles = function(e2) {
|
|
4401
|
+
if (this.sealed) throw he(2);
|
|
4402
|
+
return import_react21.default.createElement(Ge, { sheet: this.instance }, e2);
|
|
4403
|
+
}, e.prototype.interleaveWithNodeStream = function(e2) {
|
|
4404
|
+
if (S) throw he(3);
|
|
4405
|
+
if (this.sealed) throw he(2);
|
|
4406
|
+
this.seal();
|
|
4407
|
+
var t = require("stream").Transform, n = e2, o2 = this.instance, r2 = this._emitSheetCSS, s2 = new t({ transform: function(e3, t2, n2) {
|
|
4408
|
+
var s3 = e3.toString(), i2 = r2();
|
|
4409
|
+
if (o2.clearTag(), yt.test(s3)) {
|
|
4410
|
+
var a3 = s3.indexOf(">") + 1, c2 = s3.slice(0, a3), l2 = s3.slice(a3);
|
|
4411
|
+
this.push(c2 + i2 + l2);
|
|
4412
|
+
} else this.push(i2 + s3);
|
|
4413
|
+
n2();
|
|
4414
|
+
} });
|
|
4415
|
+
return n.on("error", function(e3) {
|
|
4416
|
+
s2.emit("error", e3);
|
|
4417
|
+
}), n.pipe(s2);
|
|
4418
|
+
}, e;
|
|
4419
|
+
}();
|
|
4420
|
+
"production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");
|
|
4421
|
+
var St = "__sc-".concat(f, "__");
|
|
4422
|
+
"production" !== process.env.NODE_ENV && "test" !== process.env.NODE_ENV && "undefined" != typeof window && (window[St] || (window[St] = 0), 1 === window[St] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."), window[St] += 1);
|
|
4423
|
+
|
|
3137
4424
|
// src/components/helpers/styling/visibilityTransition.tsx
|
|
3138
|
-
var import_styled_components = require("styled-components");
|
|
3139
4425
|
var visibilityTransition = (open) => {
|
|
3140
|
-
return
|
|
4426
|
+
return ct`
|
|
3141
4427
|
@media (prefers-reduced-motion: no-preference) {
|
|
3142
4428
|
transition:
|
|
3143
4429
|
visibility 0.4s,
|
|
@@ -3149,7 +4435,7 @@ var visibilityTransition = (open) => {
|
|
|
3149
4435
|
};
|
|
3150
4436
|
|
|
3151
4437
|
// src/components/BackLink/BackLink.tsx
|
|
3152
|
-
var
|
|
4438
|
+
var import_react22 = require("react");
|
|
3153
4439
|
|
|
3154
4440
|
// src/components/BackLink/BackLink.module.css
|
|
3155
4441
|
var BackLink_default = {
|
|
@@ -3158,7 +4444,7 @@ var BackLink_default = {
|
|
|
3158
4444
|
|
|
3159
4445
|
// src/components/BackLink/BackLink.tsx
|
|
3160
4446
|
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
3161
|
-
var BackLink = (0,
|
|
4447
|
+
var BackLink = (0, import_react22.forwardRef)((props, ref) => {
|
|
3162
4448
|
return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("nav", { ref, "aria-label": "g\xE5 tilbake", children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(Link, { href: props.href, className: BackLink_default.link, children: [
|
|
3163
4449
|
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Icon, { icon: ArrowLeftIcon, iconSize: "small" }),
|
|
3164
4450
|
props.label
|
|
@@ -3167,12 +4453,12 @@ var BackLink = (0, import_react21.forwardRef)((props, ref) => {
|
|
|
3167
4453
|
BackLink.displayName = "BackLink";
|
|
3168
4454
|
|
|
3169
4455
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
3170
|
-
var
|
|
4456
|
+
var import_react23 = require("react");
|
|
3171
4457
|
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
3172
4458
|
var isAnchorTypographyProps = (props) => {
|
|
3173
4459
|
return props.href != void 0;
|
|
3174
4460
|
};
|
|
3175
|
-
var Breadcrumb = (0,
|
|
4461
|
+
var Breadcrumb = (0, import_react23.forwardRef)(
|
|
3176
4462
|
(props, ref) => {
|
|
3177
4463
|
const { children, ...rest } = props;
|
|
3178
4464
|
if (isAnchorTypographyProps(props)) {
|
|
@@ -3184,7 +4470,7 @@ var Breadcrumb = (0, import_react22.forwardRef)(
|
|
|
3184
4470
|
Breadcrumb.displayName = "Breadcrumb";
|
|
3185
4471
|
|
|
3186
4472
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
3187
|
-
var
|
|
4473
|
+
var import_react30 = require("react");
|
|
3188
4474
|
|
|
3189
4475
|
// src/components/Breadcrumbs/Breadcrumbs.module.css
|
|
3190
4476
|
var Breadcrumbs_default = {
|
|
@@ -3196,7 +4482,7 @@ var Breadcrumbs_default = {
|
|
|
3196
4482
|
|
|
3197
4483
|
// src/components/Button/Button.tsx
|
|
3198
4484
|
var import_dds_design_tokens12 = require("@norges-domstoler/dds-design-tokens");
|
|
3199
|
-
var
|
|
4485
|
+
var import_react25 = require("react");
|
|
3200
4486
|
|
|
3201
4487
|
// src/components/Button/Button.module.css
|
|
3202
4488
|
var Button_default = {
|
|
@@ -3268,7 +4554,7 @@ var buttonTokens = {
|
|
|
3268
4554
|
};
|
|
3269
4555
|
|
|
3270
4556
|
// src/components/Spinner/Spinner.tsx
|
|
3271
|
-
var
|
|
4557
|
+
var import_react24 = require("react");
|
|
3272
4558
|
|
|
3273
4559
|
// src/components/Spinner/Spinner.module.css
|
|
3274
4560
|
var Spinner_default = {
|
|
@@ -3290,10 +4576,10 @@ function Spinner(props) {
|
|
|
3290
4576
|
htmlProps,
|
|
3291
4577
|
...rest
|
|
3292
4578
|
} = props;
|
|
3293
|
-
const mountTime = (0,
|
|
4579
|
+
const mountTime = (0, import_react24.useRef)(Date.now());
|
|
3294
4580
|
const outerAnimationDelay = -(mountTime.current % 2e3);
|
|
3295
4581
|
const innerAnimationDelay = -(mountTime.current % 1500);
|
|
3296
|
-
const generatedId = (0,
|
|
4582
|
+
const generatedId = (0, import_react24.useId)();
|
|
3297
4583
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
3298
4584
|
return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
|
|
3299
4585
|
"svg",
|
|
@@ -3340,7 +4626,7 @@ var typographyTypes = {
|
|
|
3340
4626
|
tiny: "supportingStyleTiny01"
|
|
3341
4627
|
};
|
|
3342
4628
|
var { button: button2 } = buttonTokens;
|
|
3343
|
-
var Button = (0,
|
|
4629
|
+
var Button = (0, import_react25.forwardRef)(
|
|
3344
4630
|
(props, ref) => {
|
|
3345
4631
|
const {
|
|
3346
4632
|
children,
|
|
@@ -3455,7 +4741,7 @@ Button.displayName = "Button";
|
|
|
3455
4741
|
|
|
3456
4742
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
3457
4743
|
var import_dds_design_tokens13 = require("@norges-domstoler/dds-design-tokens");
|
|
3458
|
-
var
|
|
4744
|
+
var import_react28 = require("react");
|
|
3459
4745
|
|
|
3460
4746
|
// src/components/OverflowMenu/OverflowMenu.module.css
|
|
3461
4747
|
var OverflowMenu_default = {
|
|
@@ -3468,11 +4754,11 @@ var OverflowMenu_default = {
|
|
|
3468
4754
|
};
|
|
3469
4755
|
|
|
3470
4756
|
// src/components/OverflowMenu/OverflowMenuItem.tsx
|
|
3471
|
-
var
|
|
4757
|
+
var import_react26 = require("react");
|
|
3472
4758
|
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
3473
4759
|
var isAnchorProps2 = (props) => props.href !== void 0;
|
|
3474
4760
|
var isButtonProps = (props) => props.href === void 0 && props.onClick !== void 0;
|
|
3475
|
-
var OverflowMenuItem = (0,
|
|
4761
|
+
var OverflowMenuItem = (0, import_react26.forwardRef)((props, ref) => {
|
|
3476
4762
|
const { title, icon: icon2, focus, id, className, htmlProps = {}, ...rest } = props;
|
|
3477
4763
|
let href;
|
|
3478
4764
|
let onClick;
|
|
@@ -3481,9 +4767,9 @@ var OverflowMenuItem = (0, import_react25.forwardRef)((props, ref) => {
|
|
|
3481
4767
|
} else if (isButtonProps(props)) {
|
|
3482
4768
|
onClick = props.onClick;
|
|
3483
4769
|
}
|
|
3484
|
-
const itemRef = (0,
|
|
4770
|
+
const itemRef = (0, import_react26.useRef)(null);
|
|
3485
4771
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
3486
|
-
(0,
|
|
4772
|
+
(0, import_react26.useEffect)(() => {
|
|
3487
4773
|
var _a;
|
|
3488
4774
|
if (focus) {
|
|
3489
4775
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
@@ -3548,7 +4834,7 @@ var OverflowMenuItem = (0, import_react25.forwardRef)((props, ref) => {
|
|
|
3548
4834
|
OverflowMenuItem.displayName = "OverflowMenuItem";
|
|
3549
4835
|
|
|
3550
4836
|
// src/components/Divider/Divider.tsx
|
|
3551
|
-
var
|
|
4837
|
+
var import_react27 = require("react");
|
|
3552
4838
|
|
|
3553
4839
|
// src/components/Divider/Divider.module.css
|
|
3554
4840
|
var Divider_default = {
|
|
@@ -3560,7 +4846,7 @@ var Divider_default = {
|
|
|
3560
4846
|
|
|
3561
4847
|
// src/components/Divider/Divider.tsx
|
|
3562
4848
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
3563
|
-
var Divider = (0,
|
|
4849
|
+
var Divider = (0, import_react27.forwardRef)((props, ref) => {
|
|
3564
4850
|
const { color = "default", id, className, htmlProps, ...rest } = props;
|
|
3565
4851
|
const colorCn = color === "default" || color === "subtle" ? color : "on-inverse";
|
|
3566
4852
|
const lineProps = {
|
|
@@ -3578,7 +4864,7 @@ Divider.displayName = "Divider";
|
|
|
3578
4864
|
|
|
3579
4865
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
3580
4866
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
3581
|
-
var OverflowMenu = (0,
|
|
4867
|
+
var OverflowMenu = (0, import_react28.forwardRef)(
|
|
3582
4868
|
(props, ref) => {
|
|
3583
4869
|
var _a, _b;
|
|
3584
4870
|
const {
|
|
@@ -3601,7 +4887,7 @@ var OverflowMenu = (0, import_react27.forwardRef)(
|
|
|
3601
4887
|
offset
|
|
3602
4888
|
});
|
|
3603
4889
|
const combinedRef = useCombinedRef(ref, refs.setFloating);
|
|
3604
|
-
(0,
|
|
4890
|
+
(0, import_react28.useEffect)(() => {
|
|
3605
4891
|
anchorRef ? refs.setReference(anchorRef.current) : refs.setReference(null);
|
|
3606
4892
|
}, [anchorRef]);
|
|
3607
4893
|
useOnClickOutside(
|
|
@@ -3674,7 +4960,7 @@ var OverflowMenu = (0, import_react27.forwardRef)(
|
|
|
3674
4960
|
}
|
|
3675
4961
|
};
|
|
3676
4962
|
const { style = {}, ...restHTMLProps } = htmlProps;
|
|
3677
|
-
const generatedId = (0,
|
|
4963
|
+
const generatedId = (0, import_react28.useId)();
|
|
3678
4964
|
return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
|
|
3679
4965
|
Paper,
|
|
3680
4966
|
{
|
|
@@ -3706,7 +4992,7 @@ var OverflowMenu = (0, import_react27.forwardRef)(
|
|
|
3706
4992
|
OverflowMenu.displayName = "OverflowMenu";
|
|
3707
4993
|
|
|
3708
4994
|
// src/components/OverflowMenu/OverflowMenuGroup.tsx
|
|
3709
|
-
var
|
|
4995
|
+
var import_react29 = require("react");
|
|
3710
4996
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
3711
4997
|
var OverflowMenuGroup = ({
|
|
3712
4998
|
children,
|
|
@@ -3715,11 +5001,11 @@ var OverflowMenuGroup = ({
|
|
|
3715
5001
|
onOpen,
|
|
3716
5002
|
overflowMenuId
|
|
3717
5003
|
}) => {
|
|
3718
|
-
const [isOpen, setIsOpen] = (0,
|
|
5004
|
+
const [isOpen, setIsOpen] = (0, import_react29.useState)(false);
|
|
3719
5005
|
const toggle = () => setIsOpen(!isOpen);
|
|
3720
5006
|
const close = () => setIsOpen(false);
|
|
3721
|
-
const buttonRef = (0,
|
|
3722
|
-
const generatedId = (0,
|
|
5007
|
+
const buttonRef = (0, import_react29.useRef)(null);
|
|
5008
|
+
const generatedId = (0, import_react29.useId)();
|
|
3723
5009
|
const uniqueOverflowMenuId = overflowMenuId != null ? overflowMenuId : `${generatedId}-overflowMenu`;
|
|
3724
5010
|
const handleClose = () => {
|
|
3725
5011
|
onClose && onClose();
|
|
@@ -3731,14 +5017,14 @@ var OverflowMenuGroup = ({
|
|
|
3731
5017
|
onToggle && onToggle();
|
|
3732
5018
|
toggle();
|
|
3733
5019
|
};
|
|
3734
|
-
const Children8 =
|
|
3735
|
-
return (0,
|
|
5020
|
+
const Children8 = import_react29.Children.map(children, (child, childIndex) => {
|
|
5021
|
+
return (0, import_react29.isValidElement)(child) && (childIndex === 0 ? (0, import_react29.cloneElement)(child, {
|
|
3736
5022
|
"aria-haspopup": "menu",
|
|
3737
5023
|
"aria-controls": uniqueOverflowMenuId,
|
|
3738
5024
|
"aria-expanded": isOpen,
|
|
3739
5025
|
onClick: handleToggle,
|
|
3740
5026
|
ref: buttonRef
|
|
3741
|
-
}) : (0,
|
|
5027
|
+
}) : (0, import_react29.cloneElement)(child, {
|
|
3742
5028
|
isOpen,
|
|
3743
5029
|
id: uniqueOverflowMenuId,
|
|
3744
5030
|
onClose: handleClose,
|
|
@@ -3752,7 +5038,7 @@ OverflowMenuGroup.displayName = "OverflowMenuGroup";
|
|
|
3752
5038
|
|
|
3753
5039
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
3754
5040
|
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
3755
|
-
var Breadcrumbs = (0,
|
|
5041
|
+
var Breadcrumbs = (0, import_react30.forwardRef)(
|
|
3756
5042
|
(props, ref) => {
|
|
3757
5043
|
const { children, smallScreen, id, className, htmlProps, ...rest } = props;
|
|
3758
5044
|
const chevronIcon = /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
@@ -3763,7 +5049,7 @@ var Breadcrumbs = (0, import_react29.forwardRef)(
|
|
|
3763
5049
|
icon: ChevronRightIcon
|
|
3764
5050
|
}
|
|
3765
5051
|
);
|
|
3766
|
-
const childrenArray =
|
|
5052
|
+
const childrenArray = import_react30.Children.toArray(children);
|
|
3767
5053
|
const listItemCn = cn(
|
|
3768
5054
|
Breadcrumbs_default["list-item"],
|
|
3769
5055
|
!smallScreen && Breadcrumbs_default[`list-item--large-screen`]
|
|
@@ -3775,7 +5061,7 @@ var Breadcrumbs = (0, import_react29.forwardRef)(
|
|
|
3775
5061
|
] }, `breadcrumb-${index}`);
|
|
3776
5062
|
});
|
|
3777
5063
|
const breadcrumbChildrenTruncated = childrenArray.length > 2 ? childrenArray.slice(1, childrenArray.length - 1).map((item) => {
|
|
3778
|
-
if ((0,
|
|
5064
|
+
if ((0, import_react30.isValidElement)(item))
|
|
3779
5065
|
return {
|
|
3780
5066
|
title: item.props.children,
|
|
3781
5067
|
href: item.props.href
|
|
@@ -3817,7 +5103,7 @@ var Breadcrumbs = (0, import_react29.forwardRef)(
|
|
|
3817
5103
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
3818
5104
|
|
|
3819
5105
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
3820
|
-
var
|
|
5106
|
+
var import_react31 = require("react");
|
|
3821
5107
|
|
|
3822
5108
|
// src/components/ButtonGroup/ButtonGroup.module.css
|
|
3823
5109
|
var ButtonGroup_default = {
|
|
@@ -3828,7 +5114,7 @@ var ButtonGroup_default = {
|
|
|
3828
5114
|
|
|
3829
5115
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
3830
5116
|
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
3831
|
-
var ButtonGroup = (0,
|
|
5117
|
+
var ButtonGroup = (0, import_react31.forwardRef)(
|
|
3832
5118
|
(props, ref) => {
|
|
3833
5119
|
const {
|
|
3834
5120
|
children,
|
|
@@ -3840,8 +5126,8 @@ var ButtonGroup = (0, import_react30.forwardRef)(
|
|
|
3840
5126
|
role = "group",
|
|
3841
5127
|
...rest
|
|
3842
5128
|
} = props;
|
|
3843
|
-
const Children8 =
|
|
3844
|
-
return (0,
|
|
5129
|
+
const Children8 = import_react31.Children.map(children, (child) => {
|
|
5130
|
+
return (0, import_react31.isValidElement)(child) && (0, import_react31.cloneElement)(child, {
|
|
3845
5131
|
purpose: "secondary",
|
|
3846
5132
|
size: buttonSize
|
|
3847
5133
|
});
|
|
@@ -3914,12 +5200,12 @@ var Card = (props) => {
|
|
|
3914
5200
|
Card.displayName = "Card";
|
|
3915
5201
|
|
|
3916
5202
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
3917
|
-
var
|
|
5203
|
+
var import_react33 = require("react");
|
|
3918
5204
|
|
|
3919
5205
|
// src/components/Card/CardAccordion/CardAccordionContext.tsx
|
|
3920
|
-
var
|
|
5206
|
+
var import_react32 = require("react");
|
|
3921
5207
|
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
3922
|
-
var CardAccordionContext = (0,
|
|
5208
|
+
var CardAccordionContext = (0, import_react32.createContext)({});
|
|
3923
5209
|
var CardAccordionContextProvider = ({
|
|
3924
5210
|
children,
|
|
3925
5211
|
...values
|
|
@@ -3927,7 +5213,7 @@ var CardAccordionContextProvider = ({
|
|
|
3927
5213
|
return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(CardAccordionContext.Provider, { value: values, children });
|
|
3928
5214
|
};
|
|
3929
5215
|
var useCardAccordionContext = () => {
|
|
3930
|
-
const context = (0,
|
|
5216
|
+
const context = (0, import_react32.useContext)(CardAccordionContext);
|
|
3931
5217
|
if (!context) {
|
|
3932
5218
|
throw new Error(
|
|
3933
5219
|
"useCardAccordionContext must be used within a CardAccordionContextProvider. Have you wrapped <CardAccordionHeader> and <CardAccordionBody> inside a <CardAccordion>?"
|
|
@@ -3938,7 +5224,7 @@ var useCardAccordionContext = () => {
|
|
|
3938
5224
|
|
|
3939
5225
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
3940
5226
|
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
3941
|
-
var CardAccordion = (0,
|
|
5227
|
+
var CardAccordion = (0, import_react33.forwardRef)(
|
|
3942
5228
|
(props, ref) => {
|
|
3943
5229
|
const {
|
|
3944
5230
|
isExpanded = false,
|
|
@@ -3949,13 +5235,13 @@ var CardAccordion = (0, import_react32.forwardRef)(
|
|
|
3949
5235
|
htmlProps,
|
|
3950
5236
|
...rest
|
|
3951
5237
|
} = props;
|
|
3952
|
-
const [expanded, setExpanded] = (0,
|
|
3953
|
-
const generatedId = (0,
|
|
5238
|
+
const [expanded, setExpanded] = (0, import_react33.useState)(isExpanded);
|
|
5239
|
+
const generatedId = (0, import_react33.useId)();
|
|
3954
5240
|
const accordionId = id != null ? id : `${generatedId}-cardAccordion`;
|
|
3955
|
-
(0,
|
|
5241
|
+
(0, import_react33.useEffect)(() => {
|
|
3956
5242
|
setExpanded(isExpanded);
|
|
3957
5243
|
}, [isExpanded]);
|
|
3958
|
-
const toggleExpanded = (0,
|
|
5244
|
+
const toggleExpanded = (0, import_react33.useCallback)(() => {
|
|
3959
5245
|
setExpanded((prevExpanded) => {
|
|
3960
5246
|
const newExpanded = !prevExpanded;
|
|
3961
5247
|
if (onChange) {
|
|
@@ -3980,7 +5266,7 @@ CardAccordion.displayName = "CardAccordion";
|
|
|
3980
5266
|
|
|
3981
5267
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
3982
5268
|
var import_dds_design_tokens14 = require("@norges-domstoler/dds-design-tokens");
|
|
3983
|
-
var
|
|
5269
|
+
var import_react34 = require("react");
|
|
3984
5270
|
|
|
3985
5271
|
// src/components/Card/CardAccordion/CardAccordion.module.css
|
|
3986
5272
|
var CardAccordion_default = {
|
|
@@ -3996,7 +5282,7 @@ var CardAccordion_default = {
|
|
|
3996
5282
|
|
|
3997
5283
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
3998
5284
|
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
3999
|
-
var CardAccordionHeader = (0,
|
|
5285
|
+
var CardAccordionHeader = (0, import_react34.forwardRef)((props, ref) => {
|
|
4000
5286
|
const {
|
|
4001
5287
|
children,
|
|
4002
5288
|
className,
|
|
@@ -4064,15 +5350,14 @@ var CardAccordionHeader = (0, import_react33.forwardRef)((props, ref) => {
|
|
|
4064
5350
|
CardAccordionHeader.displayName = "CardAccordionHeader";
|
|
4065
5351
|
|
|
4066
5352
|
// src/components/Card/CardAccordion/CardAccordionBody.tsx
|
|
4067
|
-
var
|
|
5353
|
+
var import_react36 = require("react");
|
|
4068
5354
|
|
|
4069
5355
|
// src/components/Card/CardAccordion/useElementHeight.ts
|
|
4070
|
-
var
|
|
5356
|
+
var import_react35 = require("react");
|
|
4071
5357
|
function useElementHeight(element) {
|
|
4072
|
-
const [height, setHeight] = (0,
|
|
4073
|
-
(0,
|
|
4074
|
-
if (!element)
|
|
4075
|
-
return;
|
|
5358
|
+
const [height, setHeight] = (0, import_react35.useState)(null);
|
|
5359
|
+
(0, import_react35.useEffect)(() => {
|
|
5360
|
+
if (!element) return;
|
|
4076
5361
|
const resizeObserver = new ResizeObserver(() => {
|
|
4077
5362
|
setHeight(element.offsetHeight);
|
|
4078
5363
|
});
|
|
@@ -4084,21 +5369,21 @@ function useElementHeight(element) {
|
|
|
4084
5369
|
|
|
4085
5370
|
// src/components/Card/CardAccordion/CardAccordionBody.tsx
|
|
4086
5371
|
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
4087
|
-
var CardAccordionBody = (0,
|
|
5372
|
+
var CardAccordionBody = (0, import_react36.forwardRef)((props, ref) => {
|
|
4088
5373
|
var _a;
|
|
4089
5374
|
const { children, className, htmlProps, padding, ...rest } = props;
|
|
4090
5375
|
const { headerId, isExpanded, bodyId: id } = useCardAccordionContext();
|
|
4091
|
-
const bodyRef = (0,
|
|
4092
|
-
const [animate, setAnimate] = (0,
|
|
5376
|
+
const bodyRef = (0, import_react36.useRef)(null);
|
|
5377
|
+
const [animate, setAnimate] = (0, import_react36.useState)(false);
|
|
4093
5378
|
const isMounted = useIsMounted();
|
|
4094
5379
|
const height = useElementHeight(bodyRef.current);
|
|
4095
|
-
const [initialExpandedHeight, setIntialExpandedHeight] = (0,
|
|
4096
|
-
(0,
|
|
5380
|
+
const [initialExpandedHeight, setIntialExpandedHeight] = (0, import_react36.useState)(null);
|
|
5381
|
+
(0, import_react36.useLayoutEffect)(() => {
|
|
4097
5382
|
if (bodyRef.current && isExpanded) {
|
|
4098
5383
|
setIntialExpandedHeight(bodyRef.current.scrollHeight);
|
|
4099
5384
|
}
|
|
4100
5385
|
}, []);
|
|
4101
|
-
(0,
|
|
5386
|
+
(0, import_react36.useEffect)(() => {
|
|
4102
5387
|
if (isMounted()) {
|
|
4103
5388
|
setAnimate(true);
|
|
4104
5389
|
}
|
|
@@ -4146,7 +5431,7 @@ var CardAccordionBody = (0, import_react35.forwardRef)((props, ref) => {
|
|
|
4146
5431
|
CardAccordionBody.displayName = "CardAccordionBody";
|
|
4147
5432
|
|
|
4148
5433
|
// src/components/Chip/Chip.tsx
|
|
4149
|
-
var
|
|
5434
|
+
var import_react37 = require("react");
|
|
4150
5435
|
|
|
4151
5436
|
// src/components/Chip/Chip.module.css
|
|
4152
5437
|
var Chip_default = {
|
|
@@ -4156,10 +5441,10 @@ var Chip_default = {
|
|
|
4156
5441
|
|
|
4157
5442
|
// src/components/Chip/Chip.tsx
|
|
4158
5443
|
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
4159
|
-
var Chip = (0,
|
|
5444
|
+
var Chip = (0, import_react37.forwardRef)((props, ref) => {
|
|
4160
5445
|
const { text, onClose, id, className, htmlProps = {}, ...rest } = props;
|
|
4161
5446
|
const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
|
|
4162
|
-
const [isOpen, setIsOpen] = (0,
|
|
5447
|
+
const [isOpen, setIsOpen] = (0, import_react37.useState)(true);
|
|
4163
5448
|
const onClick = () => {
|
|
4164
5449
|
setIsOpen(false);
|
|
4165
5450
|
onClose && onClose();
|
|
@@ -4199,11 +5484,11 @@ var Chip = (0, import_react36.forwardRef)((props, ref) => {
|
|
|
4199
5484
|
Chip.displayName = "Chip";
|
|
4200
5485
|
|
|
4201
5486
|
// src/components/Chip/ChipGroup.tsx
|
|
4202
|
-
var
|
|
5487
|
+
var import_react38 = require("react");
|
|
4203
5488
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
4204
|
-
var ChipGroup = (0,
|
|
5489
|
+
var ChipGroup = (0, import_react38.forwardRef)(
|
|
4205
5490
|
({ children, className, ...rest }, ref) => {
|
|
4206
|
-
const childrenArray =
|
|
5491
|
+
const childrenArray = import_react38.Children.toArray(children);
|
|
4207
5492
|
return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
4208
5493
|
"ul",
|
|
4209
5494
|
{
|
|
@@ -4226,7 +5511,7 @@ var import_date4 = require("@internationalized/date");
|
|
|
4226
5511
|
var import_calendar3 = require("@react-aria/calendar");
|
|
4227
5512
|
var import_i18n2 = require("@react-aria/i18n");
|
|
4228
5513
|
var import_calendar4 = require("@react-stately/calendar");
|
|
4229
|
-
var
|
|
5514
|
+
var import_react41 = require("react");
|
|
4230
5515
|
|
|
4231
5516
|
// src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
|
|
4232
5517
|
var import_date3 = require("@internationalized/date");
|
|
@@ -4236,7 +5521,7 @@ var import_i18n = require("@react-aria/i18n");
|
|
|
4236
5521
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
4237
5522
|
var import_date = require("@internationalized/date");
|
|
4238
5523
|
var import_calendar = require("@react-aria/calendar");
|
|
4239
|
-
var
|
|
5524
|
+
var import_react40 = require("react");
|
|
4240
5525
|
|
|
4241
5526
|
// src/components/date-inputs/common/DateInput.module.css
|
|
4242
5527
|
var DateInput_default = {
|
|
@@ -4271,9 +5556,9 @@ var DateInput_default = {
|
|
|
4271
5556
|
};
|
|
4272
5557
|
|
|
4273
5558
|
// src/components/date-inputs/DatePicker/CalendarPopover.tsx
|
|
4274
|
-
var
|
|
5559
|
+
var import_react39 = require("react");
|
|
4275
5560
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
4276
|
-
var CalendarPopoverContext = (0,
|
|
5561
|
+
var CalendarPopoverContext = (0, import_react39.createContext)({
|
|
4277
5562
|
anchorRef: null,
|
|
4278
5563
|
isOpen: false,
|
|
4279
5564
|
onClose: () => null
|
|
@@ -4283,32 +5568,31 @@ var CalendarPopover = ({
|
|
|
4283
5568
|
isOpen,
|
|
4284
5569
|
onClose
|
|
4285
5570
|
}) => {
|
|
4286
|
-
const anchorRef = (0,
|
|
5571
|
+
const anchorRef = (0, import_react39.useRef)(null);
|
|
4287
5572
|
useOnKeyDown("Escape", onClose);
|
|
4288
5573
|
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(CalendarPopoverContext.Provider, { value: { anchorRef, isOpen, onClose }, children });
|
|
4289
5574
|
};
|
|
4290
5575
|
var CalendarPopoverAnchor = ({
|
|
4291
5576
|
children
|
|
4292
5577
|
}) => {
|
|
4293
|
-
const { anchorRef } = (0,
|
|
5578
|
+
const { anchorRef } = (0, import_react39.useContext)(CalendarPopoverContext);
|
|
4294
5579
|
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { ref: anchorRef != null ? anchorRef : void 0, children });
|
|
4295
5580
|
};
|
|
4296
5581
|
var CalendarPopoverContent = ({
|
|
4297
5582
|
children
|
|
4298
5583
|
}) => {
|
|
4299
|
-
const ref = (0,
|
|
5584
|
+
const ref = (0, import_react39.useRef)(null);
|
|
4300
5585
|
const { refs, styles: floatingStyles } = useFloatPosition(null, {
|
|
4301
5586
|
placement: "bottom-start"
|
|
4302
5587
|
});
|
|
4303
|
-
const { isOpen, onClose, anchorRef } = (0,
|
|
5588
|
+
const { isOpen, onClose, anchorRef } = (0, import_react39.useContext)(CalendarPopoverContext);
|
|
4304
5589
|
const combinedRef = useCombinedRef(refs.setFloating, ref);
|
|
4305
5590
|
useOnClickOutside(ref.current, onClose);
|
|
4306
|
-
(0,
|
|
5591
|
+
(0, import_react39.useEffect)(() => {
|
|
4307
5592
|
var _a;
|
|
4308
5593
|
refs.setReference((_a = anchorRef == null ? void 0 : anchorRef.current) != null ? _a : null);
|
|
4309
5594
|
}, []);
|
|
4310
|
-
if (!isOpen)
|
|
4311
|
-
return null;
|
|
5595
|
+
if (!isOpen) return null;
|
|
4312
5596
|
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
4313
5597
|
"div",
|
|
4314
5598
|
{
|
|
@@ -4327,7 +5611,7 @@ var timezone = "Europe/Oslo";
|
|
|
4327
5611
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
4328
5612
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
4329
5613
|
function CalendarCell({ date, state }) {
|
|
4330
|
-
const ref = (0,
|
|
5614
|
+
const ref = (0, import_react40.useRef)(null);
|
|
4331
5615
|
const {
|
|
4332
5616
|
buttonProps,
|
|
4333
5617
|
cellProps,
|
|
@@ -4340,7 +5624,7 @@ function CalendarCell({ date, state }) {
|
|
|
4340
5624
|
if (isDisabled) {
|
|
4341
5625
|
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("td", { ...cellProps });
|
|
4342
5626
|
}
|
|
4343
|
-
const { onClose } = (0,
|
|
5627
|
+
const { onClose } = (0, import_react40.useContext)(CalendarPopoverContext);
|
|
4344
5628
|
const variant = isSelected ? "selected" : isUnavailable || isDisabled ? "unavailable" : "default";
|
|
4345
5629
|
const closeOnKeyboardBlurForward = (event) => {
|
|
4346
5630
|
if (event.key === "Tab" && event.shiftKey === false) {
|
|
@@ -4446,7 +5730,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
4446
5730
|
}
|
|
4447
5731
|
),
|
|
4448
5732
|
datesInWeek.map(
|
|
4449
|
-
(date,
|
|
5733
|
+
(date, i2) => date ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(CalendarCell, { state, date }, i2) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("td", {}, i2)
|
|
4450
5734
|
)
|
|
4451
5735
|
] }, weekIndex);
|
|
4452
5736
|
}) })
|
|
@@ -4458,12 +5742,12 @@ CalendarGrid.displayName = "CalendarGrid";
|
|
|
4458
5742
|
|
|
4459
5743
|
// src/components/date-inputs/DatePicker/Calendar/Calendar.tsx
|
|
4460
5744
|
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
4461
|
-
function createCalendar(
|
|
4462
|
-
switch (
|
|
5745
|
+
function createCalendar(identifier2) {
|
|
5746
|
+
switch (identifier2) {
|
|
4463
5747
|
case "gregory":
|
|
4464
5748
|
return new import_date4.GregorianCalendar();
|
|
4465
5749
|
default:
|
|
4466
|
-
throw new Error(`Unsupported calendar ${
|
|
5750
|
+
throw new Error(`Unsupported calendar ${identifier2}`);
|
|
4467
5751
|
}
|
|
4468
5752
|
}
|
|
4469
5753
|
function Calendar(props) {
|
|
@@ -4479,7 +5763,7 @@ function Calendar(props) {
|
|
|
4479
5763
|
nextButtonProps: { onPress: onNext, "aria-label": nextAriaLabel },
|
|
4480
5764
|
title
|
|
4481
5765
|
} = (0, import_calendar3.useCalendar)(props, state);
|
|
4482
|
-
const { onClose } = (0,
|
|
5766
|
+
const { onClose } = (0, import_react41.useContext)(CalendarPopoverContext);
|
|
4483
5767
|
const closeOnKeyboardBlurBack = (event) => {
|
|
4484
5768
|
if (event.key === "Tab" && event.shiftKey === true) {
|
|
4485
5769
|
onClose();
|
|
@@ -4531,24 +5815,24 @@ Calendar.displayName = "Calendar";
|
|
|
4531
5815
|
var import_datepicker4 = require("@react-aria/datepicker");
|
|
4532
5816
|
var import_i18n4 = require("@react-aria/i18n");
|
|
4533
5817
|
var import_datepicker5 = require("@react-stately/datepicker");
|
|
4534
|
-
var
|
|
5818
|
+
var import_react48 = require("react");
|
|
4535
5819
|
|
|
4536
5820
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
4537
5821
|
var import_date5 = require("@internationalized/date");
|
|
4538
5822
|
var import_datepicker2 = require("@react-aria/datepicker");
|
|
4539
5823
|
var import_i18n3 = require("@react-aria/i18n");
|
|
4540
5824
|
var import_datepicker3 = require("@react-stately/datepicker");
|
|
4541
|
-
var
|
|
5825
|
+
var import_react46 = require("react");
|
|
4542
5826
|
|
|
4543
5827
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
4544
5828
|
var import_button = require("@react-aria/button");
|
|
4545
|
-
var
|
|
5829
|
+
var import_react42 = require("react");
|
|
4546
5830
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
4547
5831
|
function CalendarButton({
|
|
4548
5832
|
componentSize,
|
|
4549
5833
|
...props
|
|
4550
5834
|
}) {
|
|
4551
|
-
const ref = (0,
|
|
5835
|
+
const ref = (0, import_react42.useRef)(null);
|
|
4552
5836
|
const { buttonProps } = (0, import_button.useButton)(props, ref);
|
|
4553
5837
|
const size2 = componentSize === "medium" ? "medium" : "small";
|
|
4554
5838
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
@@ -4578,7 +5862,7 @@ function CalendarButton({
|
|
|
4578
5862
|
|
|
4579
5863
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
4580
5864
|
var import_datepicker = require("@react-aria/datepicker");
|
|
4581
|
-
var
|
|
5865
|
+
var import_react43 = require("react");
|
|
4582
5866
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
4583
5867
|
var typographyTypes2 = {
|
|
4584
5868
|
medium: "bodySans02",
|
|
@@ -4596,7 +5880,7 @@ function DateSegment({
|
|
|
4596
5880
|
componentSize
|
|
4597
5881
|
}) {
|
|
4598
5882
|
var _a;
|
|
4599
|
-
const ref = (0,
|
|
5883
|
+
const ref = (0, import_react43.useRef)(null);
|
|
4600
5884
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
4601
5885
|
return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(
|
|
4602
5886
|
"div",
|
|
@@ -4633,10 +5917,10 @@ function DateSegment({
|
|
|
4633
5917
|
DateSegment.displayName = "DateSegment";
|
|
4634
5918
|
|
|
4635
5919
|
// src/components/date-inputs/common/DateInput.tsx
|
|
4636
|
-
var
|
|
5920
|
+
var import_react45 = require("react");
|
|
4637
5921
|
|
|
4638
5922
|
// src/components/InputMessage/InputMessage.tsx
|
|
4639
|
-
var
|
|
5923
|
+
var import_react44 = require("react");
|
|
4640
5924
|
|
|
4641
5925
|
// src/components/InputMessage/InputMessage.module.css
|
|
4642
5926
|
var InputMessage_default = {
|
|
@@ -4648,7 +5932,7 @@ var InputMessage_default = {
|
|
|
4648
5932
|
|
|
4649
5933
|
// src/components/InputMessage/InputMessage.tsx
|
|
4650
5934
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
4651
|
-
var InputMessage = (0,
|
|
5935
|
+
var InputMessage = (0, import_react44.forwardRef)(
|
|
4652
5936
|
(props, ref) => {
|
|
4653
5937
|
const { message, messageType, id, className, htmlProps, ...rest } = props;
|
|
4654
5938
|
const isError = messageType === "error";
|
|
@@ -4716,7 +6000,7 @@ function _DateInput({
|
|
|
4716
6000
|
const hasTip = !!tip;
|
|
4717
6001
|
const hasLabel = props.label != null;
|
|
4718
6002
|
const hasMessage = hasErrorMessage || hasTip;
|
|
4719
|
-
const { isOpen } = (0,
|
|
6003
|
+
const { isOpen } = (0, import_react45.useContext)(CalendarPopoverContext);
|
|
4720
6004
|
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
4721
6005
|
"div",
|
|
4722
6006
|
{
|
|
@@ -4768,7 +6052,7 @@ function _DateInput({
|
|
|
4768
6052
|
}
|
|
4769
6053
|
);
|
|
4770
6054
|
}
|
|
4771
|
-
var DateInput = (0,
|
|
6055
|
+
var DateInput = (0, import_react45.forwardRef)(_DateInput);
|
|
4772
6056
|
DateInput.displayName = "DateInput";
|
|
4773
6057
|
|
|
4774
6058
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
@@ -4785,7 +6069,7 @@ function _DateField({
|
|
|
4785
6069
|
locale: locale2,
|
|
4786
6070
|
createCalendar: import_date5.createCalendar
|
|
4787
6071
|
});
|
|
4788
|
-
const ref = (0,
|
|
6072
|
+
const ref = (0, import_react46.useRef)(null);
|
|
4789
6073
|
const { labelProps, fieldProps } = (0, import_datepicker2.useDateField)(props, state, ref);
|
|
4790
6074
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
4791
6075
|
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
@@ -4810,27 +6094,27 @@ function _DateField({
|
|
|
4810
6094
|
),
|
|
4811
6095
|
labelProps,
|
|
4812
6096
|
fieldProps,
|
|
4813
|
-
children: state.segments.map((segment,
|
|
6097
|
+
children: state.segments.map((segment, i2) => /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
4814
6098
|
DateSegment,
|
|
4815
6099
|
{
|
|
4816
6100
|
componentSize,
|
|
4817
6101
|
segment,
|
|
4818
6102
|
state
|
|
4819
6103
|
},
|
|
4820
|
-
|
|
6104
|
+
i2
|
|
4821
6105
|
))
|
|
4822
6106
|
}
|
|
4823
6107
|
);
|
|
4824
6108
|
}
|
|
4825
|
-
var DateField = (0,
|
|
6109
|
+
var DateField = (0, import_react46.forwardRef)(_DateField);
|
|
4826
6110
|
DateField.displayName = "DateField";
|
|
4827
6111
|
|
|
4828
6112
|
// src/components/date-inputs/utils/useFocusManagerRef.ts
|
|
4829
6113
|
var import_focus11 = require("@react-aria/focus");
|
|
4830
|
-
var
|
|
6114
|
+
var import_react47 = require("react");
|
|
4831
6115
|
function useFocusManagerRef(ref) {
|
|
4832
|
-
const domRef = (0,
|
|
4833
|
-
(0,
|
|
6116
|
+
const domRef = (0, import_react47.useRef)(null);
|
|
6117
|
+
(0, import_react47.useImperativeHandle)(ref, () => ({
|
|
4834
6118
|
...createDOMRef(domRef),
|
|
4835
6119
|
focus() {
|
|
4836
6120
|
(0, import_focus11.createFocusManager)(domRef).focusFirst({ tabbable: true });
|
|
@@ -4854,9 +6138,9 @@ var refIsFocusable = (ref) => {
|
|
|
4854
6138
|
function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props }, forwardedRef) {
|
|
4855
6139
|
const state = (0, import_datepicker5.useDatePickerState)(props);
|
|
4856
6140
|
const domRef = useFocusManagerRef(
|
|
4857
|
-
refIsFocusable(
|
|
6141
|
+
refIsFocusable(import_react48.forwardRef) ? forwardedRef : null
|
|
4858
6142
|
);
|
|
4859
|
-
const ref = (0,
|
|
6143
|
+
const ref = (0, import_react48.useRef)(null);
|
|
4860
6144
|
const combinedRef = useCombinedRef(ref, domRef);
|
|
4861
6145
|
const { buttonProps, calendarProps, fieldProps, groupProps } = (0, import_datepicker4.useDatePicker)(
|
|
4862
6146
|
{ ...props, granularity: "day" },
|
|
@@ -4883,16 +6167,16 @@ function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props
|
|
|
4883
6167
|
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(CalendarPopoverContent, { children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Calendar, { ...calendarProps }) })
|
|
4884
6168
|
] }) });
|
|
4885
6169
|
}
|
|
4886
|
-
var DatePicker = (0,
|
|
6170
|
+
var DatePicker = (0, import_react48.forwardRef)(_DatePicker);
|
|
4887
6171
|
DatePicker.displayName = "DatePicker";
|
|
4888
6172
|
|
|
4889
6173
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
4890
6174
|
var import_datepicker6 = require("@react-aria/datepicker");
|
|
4891
6175
|
var import_datepicker7 = require("@react-stately/datepicker");
|
|
4892
|
-
var
|
|
6176
|
+
var import_react49 = require("react");
|
|
4893
6177
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
4894
6178
|
function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef) {
|
|
4895
|
-
const ref = (0,
|
|
6179
|
+
const ref = (0, import_react49.useRef)(null);
|
|
4896
6180
|
const state = (0, import_datepicker7.useTimeFieldState)({
|
|
4897
6181
|
...props,
|
|
4898
6182
|
locale
|
|
@@ -4927,19 +6211,19 @@ function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef
|
|
|
4927
6211
|
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(Icon, { icon: TimeIcon, iconSize })
|
|
4928
6212
|
}
|
|
4929
6213
|
),
|
|
4930
|
-
children: state.segments.map((segment,
|
|
6214
|
+
children: state.segments.map((segment, i2) => /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
4931
6215
|
DateSegment,
|
|
4932
6216
|
{
|
|
4933
6217
|
componentSize,
|
|
4934
6218
|
segment,
|
|
4935
6219
|
state
|
|
4936
6220
|
},
|
|
4937
|
-
|
|
6221
|
+
i2
|
|
4938
6222
|
))
|
|
4939
6223
|
}
|
|
4940
6224
|
);
|
|
4941
6225
|
}
|
|
4942
|
-
var TimePicker = (0,
|
|
6226
|
+
var TimePicker = (0, import_react49.forwardRef)(_TimePicker);
|
|
4943
6227
|
TimePicker.displayName = "TimePicker";
|
|
4944
6228
|
|
|
4945
6229
|
// src/components/date-inputs/utils/transform.ts
|
|
@@ -4972,7 +6256,7 @@ function calendarDateToNativeDate(date, time = new import_date6.Time(12, 0, 0, 0
|
|
|
4972
6256
|
}
|
|
4973
6257
|
|
|
4974
6258
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
4975
|
-
var
|
|
6259
|
+
var import_react50 = require("react");
|
|
4976
6260
|
|
|
4977
6261
|
// src/components/DescriptionList/DescriptionList.module.css
|
|
4978
6262
|
var DescriptionList_default = {
|
|
@@ -4987,7 +6271,7 @@ var DescriptionList_default = {
|
|
|
4987
6271
|
|
|
4988
6272
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
4989
6273
|
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
4990
|
-
var DescriptionList = (0,
|
|
6274
|
+
var DescriptionList = (0, import_react50.forwardRef)((props, ref) => {
|
|
4991
6275
|
const {
|
|
4992
6276
|
appearance = "default",
|
|
4993
6277
|
direction = "column",
|
|
@@ -5019,17 +6303,17 @@ var DescriptionList = (0, import_react49.forwardRef)((props, ref) => {
|
|
|
5019
6303
|
DescriptionList.displayName = "DescriptionList";
|
|
5020
6304
|
|
|
5021
6305
|
// src/components/DescriptionList/DescriptionListTerm.tsx
|
|
5022
|
-
var
|
|
6306
|
+
var import_react51 = require("react");
|
|
5023
6307
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
5024
|
-
var DescriptionListTerm = (0,
|
|
6308
|
+
var DescriptionListTerm = (0, import_react51.forwardRef)(({ ...rest }, ref) => {
|
|
5025
6309
|
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("dt", { ref, ...rest });
|
|
5026
6310
|
});
|
|
5027
6311
|
DescriptionListTerm.displayName = "DescriptionListTerm";
|
|
5028
6312
|
|
|
5029
6313
|
// src/components/DescriptionList/DescriptionListDesc.tsx
|
|
5030
|
-
var
|
|
6314
|
+
var import_react52 = require("react");
|
|
5031
6315
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
5032
|
-
var DescriptionListDesc = (0,
|
|
6316
|
+
var DescriptionListDesc = (0, import_react52.forwardRef)((props, ref) => {
|
|
5033
6317
|
const { children, icon: icon2, id, className, htmlProps, ...rest } = props;
|
|
5034
6318
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
5035
6319
|
"dd",
|
|
@@ -5047,9 +6331,9 @@ var DescriptionListDesc = (0, import_react51.forwardRef)((props, ref) => {
|
|
|
5047
6331
|
DescriptionListDesc.displayName = "DescriptionListDesc";
|
|
5048
6332
|
|
|
5049
6333
|
// src/components/DescriptionList/DescriptionListGroup.tsx
|
|
5050
|
-
var
|
|
6334
|
+
var import_react53 = require("react");
|
|
5051
6335
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
5052
|
-
var DescriptionListGroup = (0,
|
|
6336
|
+
var DescriptionListGroup = (0, import_react53.forwardRef)((props, ref) => {
|
|
5053
6337
|
const {
|
|
5054
6338
|
children,
|
|
5055
6339
|
margin,
|
|
@@ -5073,7 +6357,7 @@ var DescriptionListGroup = (0, import_react52.forwardRef)((props, ref) => {
|
|
|
5073
6357
|
DescriptionListGroup.displayName = "DescriptionListGroup";
|
|
5074
6358
|
|
|
5075
6359
|
// src/components/Drawer/Drawer.tsx
|
|
5076
|
-
var
|
|
6360
|
+
var import_react54 = require("react");
|
|
5077
6361
|
var import_react_dom2 = require("react-dom");
|
|
5078
6362
|
|
|
5079
6363
|
// src/components/Drawer/Drawer.module.css
|
|
@@ -5094,7 +6378,7 @@ var Drawer_default = {
|
|
|
5094
6378
|
|
|
5095
6379
|
// src/components/Drawer/Drawer.tsx
|
|
5096
6380
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
5097
|
-
var Drawer = (0,
|
|
6381
|
+
var Drawer = (0, import_react54.forwardRef)((props, ref) => {
|
|
5098
6382
|
const {
|
|
5099
6383
|
children,
|
|
5100
6384
|
onClose,
|
|
@@ -5110,7 +6394,7 @@ var Drawer = (0, import_react53.forwardRef)((props, ref) => {
|
|
|
5110
6394
|
widthProps,
|
|
5111
6395
|
...rest
|
|
5112
6396
|
} = props;
|
|
5113
|
-
const generatedId = (0,
|
|
6397
|
+
const generatedId = (0, import_react54.useId)();
|
|
5114
6398
|
const uniqueId = id != null ? id : `${generatedId}-drawer`;
|
|
5115
6399
|
const hasHeader = !!header;
|
|
5116
6400
|
const headerId = hasHeader ? `${uniqueId}-header` : void 0;
|
|
@@ -5126,8 +6410,7 @@ var Drawer = (0, import_react53.forwardRef)((props, ref) => {
|
|
|
5126
6410
|
const elements = [
|
|
5127
6411
|
drawerRef.current
|
|
5128
6412
|
];
|
|
5129
|
-
if (triggerRef)
|
|
5130
|
-
elements.push(triggerRef.current);
|
|
6413
|
+
if (triggerRef) elements.push(triggerRef.current);
|
|
5131
6414
|
useOnClickOutside(elements, () => {
|
|
5132
6415
|
if (isOpen) {
|
|
5133
6416
|
onClose == null ? void 0 : onClose();
|
|
@@ -5190,7 +6473,7 @@ var Drawer = (0, import_react53.forwardRef)((props, ref) => {
|
|
|
5190
6473
|
Drawer.displayName = "Drawer";
|
|
5191
6474
|
|
|
5192
6475
|
// src/components/Drawer/DrawerGroup.tsx
|
|
5193
|
-
var
|
|
6476
|
+
var import_react55 = require("react");
|
|
5194
6477
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
5195
6478
|
var DrawerGroup = ({
|
|
5196
6479
|
children,
|
|
@@ -5198,10 +6481,10 @@ var DrawerGroup = ({
|
|
|
5198
6481
|
onOpen,
|
|
5199
6482
|
onClose
|
|
5200
6483
|
}) => {
|
|
5201
|
-
const generatedId = (0,
|
|
6484
|
+
const generatedId = (0, import_react55.useId)();
|
|
5202
6485
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
5203
|
-
const buttonRef = (0,
|
|
5204
|
-
const [closed, setClosed] = (0,
|
|
6486
|
+
const buttonRef = (0, import_react55.useRef)(null);
|
|
6487
|
+
const [closed, setClosed] = (0, import_react55.useState)(true);
|
|
5205
6488
|
const open = () => setClosed(false);
|
|
5206
6489
|
const close = () => setClosed(true);
|
|
5207
6490
|
const handleOpen = () => {
|
|
@@ -5212,14 +6495,14 @@ var DrawerGroup = ({
|
|
|
5212
6495
|
close();
|
|
5213
6496
|
onClose && onClose();
|
|
5214
6497
|
};
|
|
5215
|
-
const Children8 =
|
|
5216
|
-
return (0,
|
|
6498
|
+
const Children8 = import_react55.Children.map(children, (child, childIndex) => {
|
|
6499
|
+
return (0, import_react55.isValidElement)(child) && (childIndex === 0 ? (0, import_react55.cloneElement)(child, {
|
|
5217
6500
|
"aria-haspopup": "dialog",
|
|
5218
6501
|
"aria-controls": uniqueDrawerId,
|
|
5219
6502
|
"aria-expanded": !closed,
|
|
5220
6503
|
ref: buttonRef,
|
|
5221
6504
|
onClick: handleOpen
|
|
5222
|
-
}) : (0,
|
|
6505
|
+
}) : (0, import_react55.cloneElement)(child, {
|
|
5223
6506
|
id: uniqueDrawerId,
|
|
5224
6507
|
triggerRef: buttonRef,
|
|
5225
6508
|
isOpen: !closed,
|
|
@@ -5258,7 +6541,7 @@ function EmptyContent({
|
|
|
5258
6541
|
EmptyContent.displayName = "EmptyContent";
|
|
5259
6542
|
|
|
5260
6543
|
// src/components/FavStar/FavStar.tsx
|
|
5261
|
-
var
|
|
6544
|
+
var import_react58 = require("react");
|
|
5262
6545
|
|
|
5263
6546
|
// src/components/FavStar/FavStar.module.css
|
|
5264
6547
|
var FavStar_default = {
|
|
@@ -5270,16 +6553,16 @@ var FavStar_default = {
|
|
|
5270
6553
|
};
|
|
5271
6554
|
|
|
5272
6555
|
// src/hooks/useControllableState.ts
|
|
5273
|
-
var
|
|
6556
|
+
var import_react57 = require("react");
|
|
5274
6557
|
|
|
5275
6558
|
// src/hooks/useCallbackRef.ts
|
|
5276
|
-
var
|
|
6559
|
+
var import_react56 = require("react");
|
|
5277
6560
|
function useCallbackRef(callback, deps = []) {
|
|
5278
|
-
const callbackRef = (0,
|
|
5279
|
-
(0,
|
|
6561
|
+
const callbackRef = (0, import_react56.useRef)(callback);
|
|
6562
|
+
(0, import_react56.useEffect)(() => {
|
|
5280
6563
|
callbackRef.current = callback;
|
|
5281
6564
|
});
|
|
5282
|
-
return (0,
|
|
6565
|
+
return (0, import_react56.useCallback)((...args) => {
|
|
5283
6566
|
var _a;
|
|
5284
6567
|
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
5285
6568
|
}, deps);
|
|
@@ -5289,13 +6572,13 @@ function useCallbackRef(callback, deps = []) {
|
|
|
5289
6572
|
function useControllableState(props) {
|
|
5290
6573
|
const { value: valueProp, defaultValue, onChange } = props;
|
|
5291
6574
|
const onChangeProp = useCallbackRef(onChange);
|
|
5292
|
-
const [uncontrolledState, setUncontrolledState] = (0,
|
|
6575
|
+
const [uncontrolledState, setUncontrolledState] = (0, import_react57.useState)(defaultValue);
|
|
5293
6576
|
const controlled = valueProp !== void 0;
|
|
5294
6577
|
const value = controlled ? valueProp : uncontrolledState;
|
|
5295
6578
|
const setValue = useCallbackRef(
|
|
5296
|
-
(
|
|
5297
|
-
const setter =
|
|
5298
|
-
const nextValue = typeof
|
|
6579
|
+
(next2) => {
|
|
6580
|
+
const setter = next2;
|
|
6581
|
+
const nextValue = typeof next2 === "function" ? setter(value) : next2;
|
|
5299
6582
|
if (!controlled) {
|
|
5300
6583
|
setUncontrolledState(nextValue);
|
|
5301
6584
|
}
|
|
@@ -5308,7 +6591,7 @@ function useControllableState(props) {
|
|
|
5308
6591
|
|
|
5309
6592
|
// src/components/FavStar/FavStar.tsx
|
|
5310
6593
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
5311
|
-
var FavStar = (0,
|
|
6594
|
+
var FavStar = (0, import_react58.forwardRef)(
|
|
5312
6595
|
({
|
|
5313
6596
|
id,
|
|
5314
6597
|
className,
|
|
@@ -5326,7 +6609,7 @@ var FavStar = (0, import_react57.forwardRef)(
|
|
|
5326
6609
|
htmlProps,
|
|
5327
6610
|
rest
|
|
5328
6611
|
);
|
|
5329
|
-
const generatedId = (0,
|
|
6612
|
+
const generatedId = (0, import_react58.useId)();
|
|
5330
6613
|
const [checked, setChecked] = useControllableState({
|
|
5331
6614
|
value: checkedProp,
|
|
5332
6615
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
@@ -5374,7 +6657,7 @@ var FavStar = (0, import_react57.forwardRef)(
|
|
|
5374
6657
|
FavStar.displayName = "FavStar";
|
|
5375
6658
|
|
|
5376
6659
|
// src/components/Feedback/Feedback.tsx
|
|
5377
|
-
var
|
|
6660
|
+
var import_react62 = require("react");
|
|
5378
6661
|
|
|
5379
6662
|
// src/components/Feedback/CommentComponent.tsx
|
|
5380
6663
|
var import_dds_design_tokens15 = require("@norges-domstoler/dds-design-tokens");
|
|
@@ -5389,7 +6672,7 @@ var Feedback_default = {
|
|
|
5389
6672
|
};
|
|
5390
6673
|
|
|
5391
6674
|
// src/components/Stack/Stack.tsx
|
|
5392
|
-
var
|
|
6675
|
+
var import_react59 = require("react");
|
|
5393
6676
|
|
|
5394
6677
|
// src/components/Stack/Stack.module.css
|
|
5395
6678
|
var Stack_default = {
|
|
@@ -5426,7 +6709,7 @@ var Stack_default = {
|
|
|
5426
6709
|
|
|
5427
6710
|
// src/components/Stack/Stack.tsx
|
|
5428
6711
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
5429
|
-
var HStack = (0,
|
|
6712
|
+
var HStack = (0, import_react59.forwardRef)(
|
|
5430
6713
|
({
|
|
5431
6714
|
id,
|
|
5432
6715
|
className,
|
|
@@ -5465,7 +6748,7 @@ var HStack = (0, import_react58.forwardRef)(
|
|
|
5465
6748
|
}
|
|
5466
6749
|
);
|
|
5467
6750
|
HStack.displayName = "HStack";
|
|
5468
|
-
var VStack = (0,
|
|
6751
|
+
var VStack = (0, import_react59.forwardRef)(
|
|
5469
6752
|
({
|
|
5470
6753
|
id,
|
|
5471
6754
|
className,
|
|
@@ -5509,7 +6792,7 @@ function spacingPropToCn(value) {
|
|
|
5509
6792
|
}
|
|
5510
6793
|
|
|
5511
6794
|
// src/components/TextArea/TextArea.tsx
|
|
5512
|
-
var
|
|
6795
|
+
var import_react60 = require("react");
|
|
5513
6796
|
|
|
5514
6797
|
// src/components/TextArea/TextArea.module.css
|
|
5515
6798
|
var TextArea_default = {
|
|
@@ -5519,7 +6802,7 @@ var TextArea_default = {
|
|
|
5519
6802
|
|
|
5520
6803
|
// src/components/TextArea/TextArea.tsx
|
|
5521
6804
|
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
5522
|
-
var TextArea = (0,
|
|
6805
|
+
var TextArea = (0, import_react60.forwardRef)(
|
|
5523
6806
|
(props, ref) => {
|
|
5524
6807
|
const {
|
|
5525
6808
|
id,
|
|
@@ -5538,14 +6821,14 @@ var TextArea = (0, import_react59.forwardRef)(
|
|
|
5538
6821
|
width,
|
|
5539
6822
|
...rest
|
|
5540
6823
|
} = props;
|
|
5541
|
-
const generatedId = (0,
|
|
6824
|
+
const generatedId = (0, import_react60.useId)();
|
|
5542
6825
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
5543
|
-
const textAreaRef = (0,
|
|
6826
|
+
const textAreaRef = (0, import_react60.useRef)(null);
|
|
5544
6827
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
5545
|
-
const [text, setText] = (0,
|
|
6828
|
+
const [text, setText] = (0, import_react60.useState)(
|
|
5546
6829
|
getDefaultText(value, defaultValue)
|
|
5547
6830
|
);
|
|
5548
|
-
(0,
|
|
6831
|
+
(0, import_react60.useEffect)(() => {
|
|
5549
6832
|
if (textAreaRef == null ? void 0 : textAreaRef.current) {
|
|
5550
6833
|
textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
|
|
5551
6834
|
}
|
|
@@ -5658,7 +6941,7 @@ var CommentComponent = ({
|
|
|
5658
6941
|
};
|
|
5659
6942
|
|
|
5660
6943
|
// src/components/Tooltip/Tooltip.tsx
|
|
5661
|
-
var
|
|
6944
|
+
var import_react61 = require("react");
|
|
5662
6945
|
|
|
5663
6946
|
// src/components/Tooltip/Tooltip.module.css
|
|
5664
6947
|
var Tooltip_default = {
|
|
@@ -5670,7 +6953,7 @@ var Tooltip_default = {
|
|
|
5670
6953
|
|
|
5671
6954
|
// src/components/Tooltip/Tooltip.tsx
|
|
5672
6955
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
5673
|
-
var Tooltip = (0,
|
|
6956
|
+
var Tooltip = (0, import_react61.forwardRef)(
|
|
5674
6957
|
(props, ref) => {
|
|
5675
6958
|
const {
|
|
5676
6959
|
text,
|
|
@@ -5686,35 +6969,33 @@ var Tooltip = (0, import_react60.forwardRef)(
|
|
|
5686
6969
|
htmlProps,
|
|
5687
6970
|
...rest
|
|
5688
6971
|
} = props;
|
|
5689
|
-
const generatedId = (0,
|
|
6972
|
+
const generatedId = (0, import_react61.useId)();
|
|
5690
6973
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
5691
|
-
const [open, setOpen] = (0,
|
|
5692
|
-
const [inView, setInView] = (0,
|
|
5693
|
-
const [arrowElement, setArrowElement] = (0,
|
|
6974
|
+
const [open, setOpen] = (0, import_react61.useState)(false);
|
|
6975
|
+
const [inView, setInView] = (0, import_react61.useState)(false);
|
|
6976
|
+
const [arrowElement, setArrowElement] = (0, import_react61.useState)(null);
|
|
5694
6977
|
const { refs, styles: positionStyles } = useFloatPosition(arrowElement, {
|
|
5695
6978
|
placement
|
|
5696
6979
|
});
|
|
5697
|
-
const tooltipRef = (0,
|
|
6980
|
+
const tooltipRef = (0, import_react61.useRef)(null);
|
|
5698
6981
|
const combinedRef = useCombinedRef(ref, refs.setFloating, tooltipRef);
|
|
5699
6982
|
const closeWhenNotInView = (entries) => {
|
|
5700
6983
|
const [entry] = entries;
|
|
5701
6984
|
entry.isIntersecting ? setInView(true) : setInView(false);
|
|
5702
6985
|
};
|
|
5703
|
-
(0,
|
|
6986
|
+
(0, import_react61.useEffect)(() => {
|
|
5704
6987
|
const options = {
|
|
5705
6988
|
root: null,
|
|
5706
6989
|
rootMargin: "0px"
|
|
5707
6990
|
};
|
|
5708
6991
|
const ref2 = tooltipRef.current;
|
|
5709
6992
|
const observer = new IntersectionObserver(closeWhenNotInView, options);
|
|
5710
|
-
if (ref2)
|
|
5711
|
-
observer.observe(ref2);
|
|
6993
|
+
if (ref2) observer.observe(ref2);
|
|
5712
6994
|
return () => {
|
|
5713
|
-
if (ref2)
|
|
5714
|
-
observer.unobserve(ref2);
|
|
6995
|
+
if (ref2) observer.unobserve(ref2);
|
|
5715
6996
|
};
|
|
5716
6997
|
}, [tooltipRef]);
|
|
5717
|
-
(0,
|
|
6998
|
+
(0, import_react61.useEffect)(() => {
|
|
5718
6999
|
if (tooltipRef.current) {
|
|
5719
7000
|
window.addEventListener("scroll", () => {
|
|
5720
7001
|
closeTooltip();
|
|
@@ -5727,14 +7008,13 @@ var Tooltip = (0, import_react60.forwardRef)(
|
|
|
5727
7008
|
};
|
|
5728
7009
|
}, []);
|
|
5729
7010
|
let timer;
|
|
5730
|
-
(0,
|
|
7011
|
+
(0, import_react61.useEffect)(() => {
|
|
5731
7012
|
return () => {
|
|
5732
7013
|
clearTimeout(timer);
|
|
5733
7014
|
};
|
|
5734
7015
|
}, []);
|
|
5735
7016
|
useOnKeyDown(["Escape", "Esc"], () => {
|
|
5736
|
-
if (open)
|
|
5737
|
-
setOpen(false);
|
|
7017
|
+
if (open) setOpen(false);
|
|
5738
7018
|
});
|
|
5739
7019
|
const closeTooltip = () => {
|
|
5740
7020
|
clearTimeout(timer);
|
|
@@ -5747,8 +7027,8 @@ var Tooltip = (0, import_react60.forwardRef)(
|
|
|
5747
7027
|
}
|
|
5748
7028
|
};
|
|
5749
7029
|
const anchorProps = children.props;
|
|
5750
|
-
const anchorElement =
|
|
5751
|
-
(0,
|
|
7030
|
+
const anchorElement = import_react61.Children.only(
|
|
7031
|
+
(0, import_react61.isValidElement)(children) && (0, import_react61.cloneElement)(children, {
|
|
5752
7032
|
ref: refs.setReference,
|
|
5753
7033
|
onFocus: combineHandlers(openTooltip, anchorProps.onFocus),
|
|
5754
7034
|
onBlur: combineHandlers(closeTooltip, anchorProps.onBlur),
|
|
@@ -5882,16 +7162,16 @@ var Feedback = ({
|
|
|
5882
7162
|
onFeedbackTextChange,
|
|
5883
7163
|
onSubmit
|
|
5884
7164
|
}) => {
|
|
5885
|
-
const [rating, setRating] = (0,
|
|
5886
|
-
const [feedbackText, setFeedbackText] = (0,
|
|
5887
|
-
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0,
|
|
5888
|
-
(0,
|
|
7165
|
+
const [rating, setRating] = (0, import_react62.useState)(null);
|
|
7166
|
+
const [feedbackText, setFeedbackText] = (0, import_react62.useState)();
|
|
7167
|
+
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, import_react62.useState)(false);
|
|
7168
|
+
(0, import_react62.useEffect)(() => {
|
|
5889
7169
|
ratingProp !== void 0 && setRating(ratingProp);
|
|
5890
7170
|
}, [ratingProp]);
|
|
5891
|
-
(0,
|
|
7171
|
+
(0, import_react62.useEffect)(() => {
|
|
5892
7172
|
feedbackTextProp !== void 0 && setFeedbackText(feedbackTextProp);
|
|
5893
7173
|
}, [feedbackTextProp]);
|
|
5894
|
-
(0,
|
|
7174
|
+
(0, import_react62.useEffect)(() => {
|
|
5895
7175
|
isSubmittedProp !== void 0 && setIsFeedbackSubmitted(isSubmittedProp);
|
|
5896
7176
|
}, [isSubmittedProp]);
|
|
5897
7177
|
const handleRatingChange = (newRating) => {
|
|
@@ -5940,7 +7220,7 @@ var Feedback = ({
|
|
|
5940
7220
|
};
|
|
5941
7221
|
|
|
5942
7222
|
// src/components/Fieldset/Fieldset.tsx
|
|
5943
|
-
var
|
|
7223
|
+
var import_react63 = require("react");
|
|
5944
7224
|
|
|
5945
7225
|
// src/components/Fieldset/Fieldset.module.css
|
|
5946
7226
|
var Fieldset_default = {
|
|
@@ -5949,7 +7229,7 @@ var Fieldset_default = {
|
|
|
5949
7229
|
|
|
5950
7230
|
// src/components/Fieldset/Fieldset.tsx
|
|
5951
7231
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
5952
|
-
var Fieldset = (0,
|
|
7232
|
+
var Fieldset = (0, import_react63.forwardRef)(
|
|
5953
7233
|
(props, ref) => {
|
|
5954
7234
|
const { id, className, htmlProps, ...rest } = props;
|
|
5955
7235
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
@@ -5968,7 +7248,7 @@ var Fieldset = (0, import_react62.forwardRef)(
|
|
|
5968
7248
|
);
|
|
5969
7249
|
|
|
5970
7250
|
// src/components/FileUploader/FileUploader.tsx
|
|
5971
|
-
var
|
|
7251
|
+
var import_react65 = require("react");
|
|
5972
7252
|
|
|
5973
7253
|
// src/components/FileUploader/ErrorList.tsx
|
|
5974
7254
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
@@ -6048,7 +7328,7 @@ var File = (props) => {
|
|
|
6048
7328
|
|
|
6049
7329
|
// src/components/FileUploader/useFileUploader.ts
|
|
6050
7330
|
var import_file_selector = require("file-selector");
|
|
6051
|
-
var
|
|
7331
|
+
var import_react64 = require("react");
|
|
6052
7332
|
|
|
6053
7333
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
6054
7334
|
var fileUploaderReducer = (state, action) => {
|
|
@@ -6147,18 +7427,18 @@ var useFileUploader = (props) => {
|
|
|
6147
7427
|
disabled,
|
|
6148
7428
|
errorMessage
|
|
6149
7429
|
} = props;
|
|
6150
|
-
const rootRef = (0,
|
|
6151
|
-
const inputRef = (0,
|
|
6152
|
-
const buttonRef = (0,
|
|
7430
|
+
const rootRef = (0, import_react64.useRef)(null);
|
|
7431
|
+
const inputRef = (0, import_react64.useRef)(null);
|
|
7432
|
+
const buttonRef = (0, import_react64.useRef)(null);
|
|
6153
7433
|
const isControlled = !!value;
|
|
6154
|
-
const initialFileUploaderFiles = (0,
|
|
6155
|
-
() => (initialFiles != null ? initialFiles : []).map((
|
|
6156
|
-
file:
|
|
7434
|
+
const initialFileUploaderFiles = (0, import_react64.useMemo)(
|
|
7435
|
+
() => (initialFiles != null ? initialFiles : []).map((f2) => ({
|
|
7436
|
+
file: f2,
|
|
6157
7437
|
errors: []
|
|
6158
7438
|
})),
|
|
6159
7439
|
[initialFiles]
|
|
6160
7440
|
);
|
|
6161
|
-
const [state, dispatch] = (0,
|
|
7441
|
+
const [state, dispatch] = (0, import_react64.useReducer)(fileUploaderReducer, {
|
|
6162
7442
|
files: initialFileUploaderFiles,
|
|
6163
7443
|
isFocused: false,
|
|
6164
7444
|
isFileDialogActive: false,
|
|
@@ -6170,7 +7450,7 @@ var useFileUploader = (props) => {
|
|
|
6170
7450
|
)
|
|
6171
7451
|
});
|
|
6172
7452
|
const { files: stateFiles } = state;
|
|
6173
|
-
(0,
|
|
7453
|
+
(0, import_react64.useEffect)(() => {
|
|
6174
7454
|
if (isControlled) {
|
|
6175
7455
|
const files = value.map((file) => {
|
|
6176
7456
|
const accepted = isFileAccepted(file, accept);
|
|
@@ -6185,31 +7465,30 @@ var useFileUploader = (props) => {
|
|
|
6185
7465
|
});
|
|
6186
7466
|
}
|
|
6187
7467
|
}, [value, isControlled, accept, dispatch]);
|
|
6188
|
-
(0,
|
|
7468
|
+
(0, import_react64.useEffect)(() => {
|
|
6189
7469
|
dispatch({
|
|
6190
7470
|
type: "setRootErrors",
|
|
6191
7471
|
payload: calcRootErrors(stateFiles, maxFiles, errorMessage)
|
|
6192
7472
|
});
|
|
6193
7473
|
}, [dispatch, stateFiles, maxFiles, errorMessage]);
|
|
6194
|
-
const onRootFocus = (0,
|
|
7474
|
+
const onRootFocus = (0, import_react64.useCallback)(
|
|
6195
7475
|
() => dispatch({ type: "focus" }),
|
|
6196
7476
|
[dispatch]
|
|
6197
7477
|
);
|
|
6198
|
-
const onRootBlur = (0,
|
|
6199
|
-
const onRootDragEnter = (0,
|
|
7478
|
+
const onRootBlur = (0, import_react64.useCallback)(() => dispatch({ type: "blur" }), [dispatch]);
|
|
7479
|
+
const onRootDragEnter = (0, import_react64.useCallback)(
|
|
6200
7480
|
async (evt) => {
|
|
6201
7481
|
preventDefaults(evt);
|
|
6202
7482
|
if (isEventWithFiles(evt)) {
|
|
6203
7483
|
const files = await (0, import_file_selector.fromEvent)(evt);
|
|
6204
7484
|
const fileCount = files.length;
|
|
6205
|
-
if (fileCount === 0)
|
|
6206
|
-
return;
|
|
7485
|
+
if (fileCount === 0) return;
|
|
6207
7486
|
dispatch({ type: "dragEnter" });
|
|
6208
7487
|
}
|
|
6209
7488
|
},
|
|
6210
7489
|
[dispatch, accept, maxFiles]
|
|
6211
7490
|
);
|
|
6212
|
-
const onRootDragOver = (0,
|
|
7491
|
+
const onRootDragOver = (0, import_react64.useCallback)((evt) => {
|
|
6213
7492
|
preventDefaults(evt);
|
|
6214
7493
|
const hasFiles = isEventWithFiles(evt);
|
|
6215
7494
|
if (hasFiles && evt.dataTransfer) {
|
|
@@ -6219,31 +7498,30 @@ var useFileUploader = (props) => {
|
|
|
6219
7498
|
}
|
|
6220
7499
|
}
|
|
6221
7500
|
}, []);
|
|
6222
|
-
const onRootDragLeave = (0,
|
|
7501
|
+
const onRootDragLeave = (0, import_react64.useCallback)(
|
|
6223
7502
|
(evt) => {
|
|
6224
7503
|
preventDefaults(evt);
|
|
6225
|
-
if (evt.currentTarget.contains(evt.relatedTarget))
|
|
6226
|
-
return;
|
|
7504
|
+
if (evt.currentTarget.contains(evt.relatedTarget)) return;
|
|
6227
7505
|
dispatch({ type: "dragLeave" });
|
|
6228
7506
|
},
|
|
6229
7507
|
[dispatch]
|
|
6230
7508
|
);
|
|
6231
|
-
const setFiles = (0,
|
|
7509
|
+
const setFiles = (0, import_react64.useCallback)(
|
|
6232
7510
|
async (evt) => {
|
|
6233
7511
|
evt.preventDefault();
|
|
6234
7512
|
if (isEventWithFiles(evt)) {
|
|
6235
|
-
const existingFileNames = stateFiles.map((
|
|
7513
|
+
const existingFileNames = stateFiles.map((f2) => f2.file.name);
|
|
6236
7514
|
const filesFromEvent = await (0, import_file_selector.fromEvent)(
|
|
6237
7515
|
evt
|
|
6238
7516
|
);
|
|
6239
|
-
const newFiles = filesFromEvent.filter((
|
|
7517
|
+
const newFiles = filesFromEvent.filter((f2) => !existingFileNames.includes(f2.name)).map((file) => {
|
|
6240
7518
|
const accepted = isFileAccepted(file, accept);
|
|
6241
7519
|
return {
|
|
6242
7520
|
file,
|
|
6243
7521
|
errors: accepted ? [] : [getInvalidFileTypeErrorMessage()]
|
|
6244
7522
|
};
|
|
6245
7523
|
}).concat(stateFiles);
|
|
6246
|
-
onChange(newFiles.map((
|
|
7524
|
+
onChange(newFiles.map((f2) => f2.file));
|
|
6247
7525
|
if (!isControlled) {
|
|
6248
7526
|
dispatch({
|
|
6249
7527
|
type: "onSetFiles",
|
|
@@ -6262,17 +7540,17 @@ var useFileUploader = (props) => {
|
|
|
6262
7540
|
dispatch
|
|
6263
7541
|
]
|
|
6264
7542
|
);
|
|
6265
|
-
const openFileDialog = (0,
|
|
7543
|
+
const openFileDialog = (0, import_react64.useCallback)(() => {
|
|
6266
7544
|
if (inputRef.current) {
|
|
6267
7545
|
inputRef.current.value = "";
|
|
6268
7546
|
inputRef.current.click();
|
|
6269
7547
|
}
|
|
6270
7548
|
}, [inputRef]);
|
|
6271
|
-
const removeFile = (0,
|
|
7549
|
+
const removeFile = (0, import_react64.useCallback)(
|
|
6272
7550
|
(file) => {
|
|
6273
7551
|
const newFiles = [...stateFiles];
|
|
6274
7552
|
newFiles.splice(stateFiles.indexOf(file), 1);
|
|
6275
|
-
onChange(newFiles.map((
|
|
7553
|
+
onChange(newFiles.map((f2) => f2.file));
|
|
6276
7554
|
if (!isControlled) {
|
|
6277
7555
|
dispatch({
|
|
6278
7556
|
type: "onRemoveFile",
|
|
@@ -6282,7 +7560,7 @@ var useFileUploader = (props) => {
|
|
|
6282
7560
|
},
|
|
6283
7561
|
[stateFiles, isControlled, maxFiles, errorMessage, onChange, dispatch]
|
|
6284
7562
|
);
|
|
6285
|
-
const getRootProps = (0,
|
|
7563
|
+
const getRootProps = (0, import_react64.useCallback)(
|
|
6286
7564
|
() => ({
|
|
6287
7565
|
onBlur: onRootBlur,
|
|
6288
7566
|
onFocus: onRootFocus,
|
|
@@ -6304,14 +7582,14 @@ var useFileUploader = (props) => {
|
|
|
6304
7582
|
disabled
|
|
6305
7583
|
]
|
|
6306
7584
|
);
|
|
6307
|
-
const getButtonProps = (0,
|
|
7585
|
+
const getButtonProps = (0, import_react64.useCallback)(
|
|
6308
7586
|
() => ({
|
|
6309
7587
|
onClick: openFileDialog,
|
|
6310
7588
|
ref: buttonRef
|
|
6311
7589
|
}),
|
|
6312
7590
|
[openFileDialog, buttonRef]
|
|
6313
7591
|
);
|
|
6314
|
-
const getInputProps = (0,
|
|
7592
|
+
const getInputProps = (0, import_react64.useCallback)(
|
|
6315
7593
|
() => ({
|
|
6316
7594
|
type: "file",
|
|
6317
7595
|
style: { display: "none" },
|
|
@@ -6369,7 +7647,7 @@ var FileUploader = (props) => {
|
|
|
6369
7647
|
className,
|
|
6370
7648
|
...rest
|
|
6371
7649
|
} = props;
|
|
6372
|
-
const generatedId = (0,
|
|
7650
|
+
const generatedId = (0, import_react65.useId)();
|
|
6373
7651
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
6374
7652
|
const {
|
|
6375
7653
|
state: { files: stateFiles, isDragActive, rootErrors },
|
|
@@ -6476,7 +7754,7 @@ var FileUploader = (props) => {
|
|
|
6476
7754
|
FileUploader.displayName = "FileUploader";
|
|
6477
7755
|
|
|
6478
7756
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
6479
|
-
var
|
|
7757
|
+
var import_react66 = require("react");
|
|
6480
7758
|
|
|
6481
7759
|
// src/components/GlobalMessage/GlobalMessage.module.css
|
|
6482
7760
|
var GlobalMessage_default = {
|
|
@@ -6502,7 +7780,7 @@ var purposeVariants = {
|
|
|
6502
7780
|
icon: WarningIcon
|
|
6503
7781
|
}
|
|
6504
7782
|
};
|
|
6505
|
-
var GlobalMessage = (0,
|
|
7783
|
+
var GlobalMessage = (0, import_react66.forwardRef)(
|
|
6506
7784
|
(props, ref) => {
|
|
6507
7785
|
const {
|
|
6508
7786
|
message,
|
|
@@ -6515,7 +7793,7 @@ var GlobalMessage = (0, import_react65.forwardRef)(
|
|
|
6515
7793
|
htmlProps,
|
|
6516
7794
|
...rest
|
|
6517
7795
|
} = props;
|
|
6518
|
-
const [isClosed, setClosed] = (0,
|
|
7796
|
+
const [isClosed, setClosed] = (0, import_react66.useState)(false);
|
|
6519
7797
|
return !isClosed ? /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
|
|
6520
7798
|
"div",
|
|
6521
7799
|
{
|
|
@@ -6623,8 +7901,7 @@ var isRelativeGridColumn = (type) => {
|
|
|
6623
7901
|
return type === "all" || type === "firstHalf" || type === "secondHalf";
|
|
6624
7902
|
};
|
|
6625
7903
|
var isGridColumn = (type) => {
|
|
6626
|
-
if (type === void 0)
|
|
6627
|
-
return false;
|
|
7904
|
+
if (type === void 0) return false;
|
|
6628
7905
|
return type.xs !== void 0 || type.sm !== void 0 || type.md !== void 0 || type.lg !== void 0 || type.xl !== void 0;
|
|
6629
7906
|
};
|
|
6630
7907
|
var GridChild = (props) => {
|
|
@@ -6690,7 +7967,7 @@ var GridChild = (props) => {
|
|
|
6690
7967
|
GridChild.displayName = "GridChild";
|
|
6691
7968
|
|
|
6692
7969
|
// src/components/InlineButton/InlineButton.tsx
|
|
6693
|
-
var
|
|
7970
|
+
var import_react67 = require("react");
|
|
6694
7971
|
|
|
6695
7972
|
// src/components/InlineButton/InlineButton.module.css
|
|
6696
7973
|
var InlineButton_default = {
|
|
@@ -6699,7 +7976,7 @@ var InlineButton_default = {
|
|
|
6699
7976
|
|
|
6700
7977
|
// src/components/InlineButton/InlineButton.tsx
|
|
6701
7978
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
6702
|
-
var InlineButton = (0,
|
|
7979
|
+
var InlineButton = (0, import_react67.forwardRef)(
|
|
6703
7980
|
(props, ref) => {
|
|
6704
7981
|
const { className, ...rest } = props;
|
|
6705
7982
|
return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
@@ -6721,10 +7998,10 @@ var InlineButton = (0, import_react66.forwardRef)(
|
|
|
6721
7998
|
);
|
|
6722
7999
|
|
|
6723
8000
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
6724
|
-
var
|
|
8001
|
+
var import_react70 = require("react");
|
|
6725
8002
|
|
|
6726
8003
|
// src/components/InlineEdit/InlineEdit.tsx
|
|
6727
|
-
var
|
|
8004
|
+
var import_react68 = require("react");
|
|
6728
8005
|
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
6729
8006
|
var InlineEdit = (props) => {
|
|
6730
8007
|
const {
|
|
@@ -6737,8 +8014,8 @@ var InlineEdit = (props) => {
|
|
|
6737
8014
|
inputRef,
|
|
6738
8015
|
children
|
|
6739
8016
|
} = props;
|
|
6740
|
-
const [editingValue, setEditingValue] = (0,
|
|
6741
|
-
const [isEditing, setIsEditing] = (0,
|
|
8017
|
+
const [editingValue, setEditingValue] = (0, import_react68.useState)(value != null ? value : "");
|
|
8018
|
+
const [isEditing, setIsEditing] = (0, import_react68.useState)(false);
|
|
6742
8019
|
const onChangeHandler = (e) => {
|
|
6743
8020
|
setEditingValue(e.target.value);
|
|
6744
8021
|
onChange && onChange();
|
|
@@ -6765,8 +8042,8 @@ var InlineEdit = (props) => {
|
|
|
6765
8042
|
useOnKeyDown(["Enter"], () => onExitHandler());
|
|
6766
8043
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
6767
8044
|
useOnClickOutside(inputRef.current, () => onExitHandler());
|
|
6768
|
-
const inputChild =
|
|
6769
|
-
(0,
|
|
8045
|
+
const inputChild = import_react68.Children.only(
|
|
8046
|
+
(0, import_react68.isValidElement)(children) && (0, import_react68.cloneElement)(children, {
|
|
6770
8047
|
onChange: onChangeHandler,
|
|
6771
8048
|
onBlur: onBlurHandler,
|
|
6772
8049
|
onFocus: onFocusHandler,
|
|
@@ -6780,7 +8057,7 @@ var InlineEdit = (props) => {
|
|
|
6780
8057
|
InlineEdit.displayName = "InlineEdit";
|
|
6781
8058
|
|
|
6782
8059
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
6783
|
-
var
|
|
8060
|
+
var import_react69 = require("react");
|
|
6784
8061
|
|
|
6785
8062
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
6786
8063
|
var InlineEdit_default = {
|
|
@@ -6802,7 +8079,7 @@ var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ (0, import_jsx
|
|
|
6802
8079
|
|
|
6803
8080
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
6804
8081
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
6805
|
-
var InlineTextArea = (0,
|
|
8082
|
+
var InlineTextArea = (0, import_react69.forwardRef)((props, ref) => {
|
|
6806
8083
|
const {
|
|
6807
8084
|
id,
|
|
6808
8085
|
error,
|
|
@@ -6814,14 +8091,14 @@ var InlineTextArea = (0, import_react68.forwardRef)((props, ref) => {
|
|
|
6814
8091
|
hideIcon,
|
|
6815
8092
|
...rest
|
|
6816
8093
|
} = props;
|
|
6817
|
-
const genereatedId = (0,
|
|
8094
|
+
const genereatedId = (0, import_react69.useId)();
|
|
6818
8095
|
const uniqueId = id != null ? id : `${genereatedId}-InlineTextArea`;
|
|
6819
8096
|
const hasErrorMessage = !!errorMessage;
|
|
6820
8097
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
6821
8098
|
const hasError = !!error;
|
|
6822
8099
|
const hasErrorState = hasError || hasErrorMessage;
|
|
6823
8100
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
6824
|
-
const inputRef = (0,
|
|
8101
|
+
const inputRef = (0, import_react69.useRef)(null);
|
|
6825
8102
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
6826
8103
|
return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
6827
8104
|
/* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
@@ -6869,9 +8146,9 @@ InlineTextArea.displayName = "InlineTextArea";
|
|
|
6869
8146
|
|
|
6870
8147
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
6871
8148
|
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
6872
|
-
var InlineEditTextArea = (0,
|
|
8149
|
+
var InlineEditTextArea = (0, import_react70.forwardRef)((props, ref) => {
|
|
6873
8150
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
6874
|
-
const textareaRef = (0,
|
|
8151
|
+
const textareaRef = (0, import_react70.useRef)(null);
|
|
6875
8152
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
6876
8153
|
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
6877
8154
|
InlineEdit,
|
|
@@ -6889,12 +8166,12 @@ var InlineEditTextArea = (0, import_react69.forwardRef)((props, ref) => {
|
|
|
6889
8166
|
});
|
|
6890
8167
|
|
|
6891
8168
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
6892
|
-
var
|
|
8169
|
+
var import_react72 = require("react");
|
|
6893
8170
|
|
|
6894
8171
|
// src/components/InlineEdit/InlineInput.tsx
|
|
6895
|
-
var
|
|
8172
|
+
var import_react71 = require("react");
|
|
6896
8173
|
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
6897
|
-
var InlineInput = (0,
|
|
8174
|
+
var InlineInput = (0, import_react71.forwardRef)(
|
|
6898
8175
|
(props, ref) => {
|
|
6899
8176
|
const {
|
|
6900
8177
|
id,
|
|
@@ -6907,14 +8184,14 @@ var InlineInput = (0, import_react70.forwardRef)(
|
|
|
6907
8184
|
hideIcon,
|
|
6908
8185
|
...rest
|
|
6909
8186
|
} = props;
|
|
6910
|
-
const genereatedId = (0,
|
|
8187
|
+
const genereatedId = (0, import_react71.useId)();
|
|
6911
8188
|
const uniqueId = id != null ? id : `${genereatedId}-InlineInput`;
|
|
6912
8189
|
const hasErrorMessage = !!errorMessage;
|
|
6913
8190
|
const hasError = !!error;
|
|
6914
8191
|
const hasErrorState = hasError || hasErrorMessage;
|
|
6915
8192
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
6916
8193
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
6917
|
-
const inputRef = (0,
|
|
8194
|
+
const inputRef = (0, import_react71.useRef)(null);
|
|
6918
8195
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
6919
8196
|
return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
6920
8197
|
/* @__PURE__ */ (0, import_jsx_runtime229.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
@@ -6961,9 +8238,9 @@ InlineInput.displayName = "InlineInput";
|
|
|
6961
8238
|
|
|
6962
8239
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
6963
8240
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
6964
|
-
var InlineEditInput = (0,
|
|
8241
|
+
var InlineEditInput = (0, import_react72.forwardRef)((props, ref) => {
|
|
6965
8242
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
6966
|
-
const inputRef = (0,
|
|
8243
|
+
const inputRef = (0, import_react72.useRef)(null);
|
|
6967
8244
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
6968
8245
|
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
6969
8246
|
InlineEdit,
|
|
@@ -6981,7 +8258,7 @@ var InlineEditInput = (0, import_react71.forwardRef)((props, ref) => {
|
|
|
6981
8258
|
});
|
|
6982
8259
|
|
|
6983
8260
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
6984
|
-
var
|
|
8261
|
+
var import_react74 = require("react");
|
|
6985
8262
|
|
|
6986
8263
|
// src/components/InternalHeader/InternalHeader.module.css
|
|
6987
8264
|
var InternalHeader_default = {
|
|
@@ -6999,9 +8276,9 @@ var InternalHeader_default = {
|
|
|
6999
8276
|
};
|
|
7000
8277
|
|
|
7001
8278
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
7002
|
-
var
|
|
8279
|
+
var import_react73 = require("react");
|
|
7003
8280
|
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
7004
|
-
var NavigationItem = (0,
|
|
8281
|
+
var NavigationItem = (0, import_react73.forwardRef)(({ title, isCurrent, ...rest }, ref) => {
|
|
7005
8282
|
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
7006
8283
|
"a",
|
|
7007
8284
|
{
|
|
@@ -7037,11 +8314,11 @@ var InternalHeader = (props) => {
|
|
|
7037
8314
|
htmlProps,
|
|
7038
8315
|
...rest
|
|
7039
8316
|
} = props;
|
|
7040
|
-
const [contextMenuIsClosed, setContextMenuIsClosed] = (0,
|
|
7041
|
-
const [currentPage, setCurrentPage] = (0,
|
|
8317
|
+
const [contextMenuIsClosed, setContextMenuIsClosed] = (0, import_react74.useState)(true);
|
|
8318
|
+
const [currentPage, setCurrentPage] = (0, import_react74.useState)(
|
|
7042
8319
|
currentPageHref
|
|
7043
8320
|
);
|
|
7044
|
-
const buttonRef = (0,
|
|
8321
|
+
const buttonRef = (0, import_react74.useRef)(null);
|
|
7045
8322
|
const handleCurrentPageChange = (href) => {
|
|
7046
8323
|
setCurrentPage(href);
|
|
7047
8324
|
onCurrentPageChange && onCurrentPageChange();
|
|
@@ -7137,7 +8414,7 @@ var InternalHeader = (props) => {
|
|
|
7137
8414
|
InternalHeader.displayName = "InternalHeader";
|
|
7138
8415
|
|
|
7139
8416
|
// src/components/List/List.tsx
|
|
7140
|
-
var
|
|
8417
|
+
var import_react75 = require("react");
|
|
7141
8418
|
|
|
7142
8419
|
// src/components/List/List.module.css
|
|
7143
8420
|
var List_default = {
|
|
@@ -7150,7 +8427,7 @@ var List_default = {
|
|
|
7150
8427
|
|
|
7151
8428
|
// src/components/List/List.tsx
|
|
7152
8429
|
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
7153
|
-
var List = (0,
|
|
8430
|
+
var List = (0, import_react75.forwardRef)((props, ref) => {
|
|
7154
8431
|
const {
|
|
7155
8432
|
listType = "unordered",
|
|
7156
8433
|
typographyType = "inherit",
|
|
@@ -7178,9 +8455,9 @@ var List = (0, import_react74.forwardRef)((props, ref) => {
|
|
|
7178
8455
|
List.displayName = "List";
|
|
7179
8456
|
|
|
7180
8457
|
// src/components/List/ListItem.tsx
|
|
7181
|
-
var
|
|
8458
|
+
var import_react76 = require("react");
|
|
7182
8459
|
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
7183
|
-
var ListItem = (0,
|
|
8460
|
+
var ListItem = (0, import_react76.forwardRef)(
|
|
7184
8461
|
({ className, ...rest }, ref) => {
|
|
7185
8462
|
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("li", { ref, ...rest, className: cn(className, List_default.li) });
|
|
7186
8463
|
}
|
|
@@ -7188,7 +8465,7 @@ var ListItem = (0, import_react75.forwardRef)(
|
|
|
7188
8465
|
ListItem.displayName = "ListItem";
|
|
7189
8466
|
|
|
7190
8467
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
7191
|
-
var
|
|
8468
|
+
var import_react77 = require("react");
|
|
7192
8469
|
|
|
7193
8470
|
// src/components/LocalMessage/LocalMessage.module.css
|
|
7194
8471
|
var LocalMessage_default = {
|
|
@@ -7227,7 +8504,7 @@ var purposeVariants2 = {
|
|
|
7227
8504
|
icon: TipIcon
|
|
7228
8505
|
}
|
|
7229
8506
|
};
|
|
7230
|
-
var LocalMessage = (0,
|
|
8507
|
+
var LocalMessage = (0, import_react77.forwardRef)(
|
|
7231
8508
|
(props, ref) => {
|
|
7232
8509
|
const {
|
|
7233
8510
|
message,
|
|
@@ -7242,7 +8519,7 @@ var LocalMessage = (0, import_react76.forwardRef)(
|
|
|
7242
8519
|
htmlProps,
|
|
7243
8520
|
...rest
|
|
7244
8521
|
} = props;
|
|
7245
|
-
const [isClosed, setClosed] = (0,
|
|
8522
|
+
const [isClosed, setClosed] = (0, import_react77.useState)(false);
|
|
7246
8523
|
if (isClosed) {
|
|
7247
8524
|
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(import_jsx_runtime235.Fragment, {});
|
|
7248
8525
|
}
|
|
@@ -7295,7 +8572,7 @@ var LocalMessage = (0, import_react76.forwardRef)(
|
|
|
7295
8572
|
LocalMessage.displayName = "LocalMessage";
|
|
7296
8573
|
|
|
7297
8574
|
// src/components/Modal/Modal.tsx
|
|
7298
|
-
var
|
|
8575
|
+
var import_react78 = require("react");
|
|
7299
8576
|
var import_react_dom3 = require("react-dom");
|
|
7300
8577
|
|
|
7301
8578
|
// src/components/Modal/Backdrop/Backdrop.utils.tsx
|
|
@@ -7334,7 +8611,7 @@ var Modal_default = {
|
|
|
7334
8611
|
|
|
7335
8612
|
// src/components/Modal/Modal.tsx
|
|
7336
8613
|
var import_jsx_runtime236 = require("react/jsx-runtime");
|
|
7337
|
-
var Modal = (0,
|
|
8614
|
+
var Modal = (0, import_react78.forwardRef)((props, ref) => {
|
|
7338
8615
|
const {
|
|
7339
8616
|
isOpen = false,
|
|
7340
8617
|
parentElement = document.body,
|
|
@@ -7348,7 +8625,7 @@ var Modal = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
7348
8625
|
htmlProps,
|
|
7349
8626
|
...rest
|
|
7350
8627
|
} = props;
|
|
7351
|
-
const generatedId = (0,
|
|
8628
|
+
const generatedId = (0, import_react78.useId)();
|
|
7352
8629
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
7353
8630
|
const headerId = `${modalId}-header`;
|
|
7354
8631
|
const modalRef = useFocusTrap(isOpen, initialFocusRef);
|
|
@@ -7360,7 +8637,7 @@ var Modal = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
7360
8637
|
onClose();
|
|
7361
8638
|
}
|
|
7362
8639
|
};
|
|
7363
|
-
(0,
|
|
8640
|
+
(0, import_react78.useEffect)(() => {
|
|
7364
8641
|
if (isOpen) {
|
|
7365
8642
|
handleElementWithBackdropMount(document.body);
|
|
7366
8643
|
} else {
|
|
@@ -7423,9 +8700,9 @@ var Modal = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
7423
8700
|
Modal.displayName = "Modal";
|
|
7424
8701
|
|
|
7425
8702
|
// src/components/Modal/ModalBody.tsx
|
|
7426
|
-
var
|
|
8703
|
+
var import_react79 = require("react");
|
|
7427
8704
|
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
7428
|
-
var ModalBody = (0,
|
|
8705
|
+
var ModalBody = (0, import_react79.forwardRef)(
|
|
7429
8706
|
(props, ref) => {
|
|
7430
8707
|
const { children, id, className, scrollable, htmlProps, height, ...rest } = props;
|
|
7431
8708
|
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
@@ -7452,9 +8729,9 @@ var ModalBody = (0, import_react78.forwardRef)(
|
|
|
7452
8729
|
ModalBody.displayName = "ModalBody";
|
|
7453
8730
|
|
|
7454
8731
|
// src/components/Modal/ModalActions.tsx
|
|
7455
|
-
var
|
|
8732
|
+
var import_react80 = require("react");
|
|
7456
8733
|
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
7457
|
-
var ModalActions = (0,
|
|
8734
|
+
var ModalActions = (0, import_react80.forwardRef)(
|
|
7458
8735
|
({ className, ...rest }, ref) => {
|
|
7459
8736
|
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)("div", { ref, ...rest, className: cn(className, Modal_default.actions) });
|
|
7460
8737
|
}
|
|
@@ -7462,7 +8739,7 @@ var ModalActions = (0, import_react79.forwardRef)(
|
|
|
7462
8739
|
ModalActions.displayName = "ModalActions";
|
|
7463
8740
|
|
|
7464
8741
|
// src/components/Pagination/Pagination.tsx
|
|
7465
|
-
var
|
|
8742
|
+
var import_react82 = require("react");
|
|
7466
8743
|
|
|
7467
8744
|
// src/components/Pagination/Pagination.module.css
|
|
7468
8745
|
var Pagination_default = {
|
|
@@ -7478,8 +8755,8 @@ var Pagination_default = {
|
|
|
7478
8755
|
|
|
7479
8756
|
// src/components/Pagination/paginationGenerator.tsx
|
|
7480
8757
|
var arrayRange = (start, end) => {
|
|
7481
|
-
const
|
|
7482
|
-
return Array.from({ length }, (
|
|
8758
|
+
const length2 = end - start + 1;
|
|
8759
|
+
return Array.from({ length: length2 }, (_2, idx) => idx + start);
|
|
7483
8760
|
};
|
|
7484
8761
|
function PaginationGenerator(pagesAmount, activePage) {
|
|
7485
8762
|
const siblingsCount = 1;
|
|
@@ -7510,7 +8787,7 @@ function PaginationGenerator(pagesAmount, activePage) {
|
|
|
7510
8787
|
}
|
|
7511
8788
|
|
|
7512
8789
|
// src/components/Select/Select.tsx
|
|
7513
|
-
var
|
|
8790
|
+
var import_react81 = require("react");
|
|
7514
8791
|
var import_react_select2 = __toESM(require("react-select"));
|
|
7515
8792
|
|
|
7516
8793
|
// src/components/Select/Select.module.css
|
|
@@ -7700,7 +8977,7 @@ var {
|
|
|
7700
8977
|
noOptionsMessage: noOptionsMessage2,
|
|
7701
8978
|
valueContainer: valueContainer2
|
|
7702
8979
|
} = selectTokens;
|
|
7703
|
-
var
|
|
8980
|
+
var prefix2 = "dds-select";
|
|
7704
8981
|
function getContainerControlPadding(componentSize, isMulti) {
|
|
7705
8982
|
return isMulti ? control2.isMulti.sizes[componentSize].padding : control2.sizes[componentSize].padding;
|
|
7706
8983
|
}
|
|
@@ -7989,7 +9266,7 @@ function SelectInner(props, ref) {
|
|
|
7989
9266
|
"data-testid": dataTestId,
|
|
7990
9267
|
...rest
|
|
7991
9268
|
} = props;
|
|
7992
|
-
const generatedId = (0,
|
|
9269
|
+
const generatedId = (0, import_react81.useId)();
|
|
7993
9270
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
7994
9271
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
7995
9272
|
const hasLabel = !!label;
|
|
@@ -8008,7 +9285,7 @@ function SelectInner(props, ref) {
|
|
|
8008
9285
|
isMulti,
|
|
8009
9286
|
inputId: uniqueId,
|
|
8010
9287
|
name: uniqueId,
|
|
8011
|
-
classNamePrefix:
|
|
9288
|
+
classNamePrefix: prefix2,
|
|
8012
9289
|
styles: getCustomStyles(componentSize, hasErrorMessage, readOnly),
|
|
8013
9290
|
filterOption: (option3, inputValue) => {
|
|
8014
9291
|
const { label: label2 } = option3;
|
|
@@ -8054,15 +9331,15 @@ function SelectInner(props, ref) {
|
|
|
8054
9331
|
}
|
|
8055
9332
|
);
|
|
8056
9333
|
}
|
|
8057
|
-
var Select = (0,
|
|
9334
|
+
var Select = (0, import_react81.forwardRef)(SelectInner);
|
|
8058
9335
|
Select.displayName = "Select";
|
|
8059
9336
|
|
|
8060
9337
|
// src/components/Select/utils.ts
|
|
8061
|
-
var createSelectOptions = (...args) => args.map((
|
|
9338
|
+
var createSelectOptions = (...args) => args.map((v2) => ({ label: v2, value: v2 }));
|
|
8062
9339
|
|
|
8063
9340
|
// src/components/Pagination/Pagination.tsx
|
|
8064
9341
|
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
8065
|
-
var Pagination = (0,
|
|
9342
|
+
var Pagination = (0, import_react82.forwardRef)(
|
|
8066
9343
|
(props, ref) => {
|
|
8067
9344
|
const {
|
|
8068
9345
|
itemsAmount,
|
|
@@ -8085,8 +9362,8 @@ var Pagination = (0, import_react81.forwardRef)(
|
|
|
8085
9362
|
htmlProps,
|
|
8086
9363
|
...rest
|
|
8087
9364
|
} = props;
|
|
8088
|
-
const [activePage, setActivePage] = (0,
|
|
8089
|
-
const [itemsPerPage, setItemsPerPage] = (0,
|
|
9365
|
+
const [activePage, setActivePage] = (0, import_react82.useState)(defaultActivePage);
|
|
9366
|
+
const [itemsPerPage, setItemsPerPage] = (0, import_react82.useState)(defaultItemsPerPage);
|
|
8090
9367
|
const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
|
|
8091
9368
|
const items = PaginationGenerator(pagesLength, activePage);
|
|
8092
9369
|
const onPageChange = (event, page) => {
|
|
@@ -8103,7 +9380,7 @@ var Pagination = (0, import_react81.forwardRef)(
|
|
|
8103
9380
|
onSelectOptionChange(option3);
|
|
8104
9381
|
}
|
|
8105
9382
|
};
|
|
8106
|
-
const listItems = items.length > 0 ? items.map((item,
|
|
9383
|
+
const listItems = items.length > 0 ? items.map((item, i2) => {
|
|
8107
9384
|
const isActive = item === activePage;
|
|
8108
9385
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)("li", { className: Pagination_default.list__item, children: item !== "truncator" ? /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
8109
9386
|
Button,
|
|
@@ -8122,7 +9399,7 @@ var Pagination = (0, import_react81.forwardRef)(
|
|
|
8122
9399
|
icon: MoreHorizontalIcon,
|
|
8123
9400
|
className: Pagination_default["truncation-icon"]
|
|
8124
9401
|
}
|
|
8125
|
-
) }, `pagination-item-${
|
|
9402
|
+
) }, `pagination-item-${i2}`);
|
|
8126
9403
|
}) : void 0;
|
|
8127
9404
|
const previousPageButton = /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
8128
9405
|
Button,
|
|
@@ -8308,7 +9585,7 @@ Pagination.displayName = "Pagination";
|
|
|
8308
9585
|
|
|
8309
9586
|
// src/components/Popover/Popover.tsx
|
|
8310
9587
|
var import_dds_design_tokens17 = require("@norges-domstoler/dds-design-tokens");
|
|
8311
|
-
var
|
|
9588
|
+
var import_react83 = require("react");
|
|
8312
9589
|
|
|
8313
9590
|
// src/components/Popover/Popover.module.css
|
|
8314
9591
|
var Popover_default = {
|
|
@@ -8320,7 +9597,7 @@ var Popover_default = {
|
|
|
8320
9597
|
|
|
8321
9598
|
// src/components/Popover/Popover.tsx
|
|
8322
9599
|
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
8323
|
-
var Popover = (0,
|
|
9600
|
+
var Popover = (0, import_react83.forwardRef)(
|
|
8324
9601
|
(props, ref) => {
|
|
8325
9602
|
const {
|
|
8326
9603
|
title,
|
|
@@ -8355,12 +9632,10 @@ var Popover = (0, import_react82.forwardRef)(
|
|
|
8355
9632
|
);
|
|
8356
9633
|
const multiRef = useCombinedRef(ref, popoverRef, refs.setFloating);
|
|
8357
9634
|
const elements = [popoverRef.current];
|
|
8358
|
-
if (anchorElement)
|
|
8359
|
-
elements.push(anchorElement);
|
|
9635
|
+
if (anchorElement) elements.push(anchorElement);
|
|
8360
9636
|
const hasTitle = !!title;
|
|
8361
9637
|
useOnClickOutside(elements, () => {
|
|
8362
|
-
if (isOpen)
|
|
8363
|
-
onClose && onClose();
|
|
9638
|
+
if (isOpen) onClose && onClose();
|
|
8364
9639
|
});
|
|
8365
9640
|
return isOpen || hasTransitionedIn ? /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(
|
|
8366
9641
|
Paper,
|
|
@@ -8406,7 +9681,7 @@ var Popover = (0, import_react82.forwardRef)(
|
|
|
8406
9681
|
Popover.displayName = "Popover";
|
|
8407
9682
|
|
|
8408
9683
|
// src/components/Popover/PopoverGroup.tsx
|
|
8409
|
-
var
|
|
9684
|
+
var import_react84 = require("react");
|
|
8410
9685
|
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
8411
9686
|
var PopoverGroup = ({
|
|
8412
9687
|
isOpen = false,
|
|
@@ -8415,8 +9690,8 @@ var PopoverGroup = ({
|
|
|
8415
9690
|
children,
|
|
8416
9691
|
popoverId
|
|
8417
9692
|
}) => {
|
|
8418
|
-
const [open, setOpen] = (0,
|
|
8419
|
-
const generatedId = (0,
|
|
9693
|
+
const [open, setOpen] = (0, import_react84.useState)(isOpen);
|
|
9694
|
+
const generatedId = (0, import_react84.useId)();
|
|
8420
9695
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
8421
9696
|
const handleOnCloseButtonClick = () => {
|
|
8422
9697
|
setOpen(false);
|
|
@@ -8426,8 +9701,8 @@ var PopoverGroup = ({
|
|
|
8426
9701
|
setOpen(!open);
|
|
8427
9702
|
onTriggerClick && onTriggerClick();
|
|
8428
9703
|
};
|
|
8429
|
-
const buttonRef = (0,
|
|
8430
|
-
const popoverRef = (0,
|
|
9704
|
+
const buttonRef = (0, import_react84.useRef)(null);
|
|
9705
|
+
const popoverRef = (0, import_react84.useRef)(null);
|
|
8431
9706
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
8432
9707
|
var _a;
|
|
8433
9708
|
if (open) {
|
|
@@ -8436,14 +9711,14 @@ var PopoverGroup = ({
|
|
|
8436
9711
|
}
|
|
8437
9712
|
});
|
|
8438
9713
|
const handleClose = () => setOpen(false);
|
|
8439
|
-
const Children8 =
|
|
8440
|
-
return (0,
|
|
9714
|
+
const Children8 = import_react84.Children.map(children, (child, childIndex) => {
|
|
9715
|
+
return (0, import_react84.isValidElement)(child) && (childIndex === 0 ? (0, import_react84.cloneElement)(child, {
|
|
8441
9716
|
"aria-haspopup": "dialog",
|
|
8442
9717
|
"aria-controls": uniquePopoverId,
|
|
8443
9718
|
"aria-expanded": open,
|
|
8444
9719
|
onClick: handleOnTriggerClick,
|
|
8445
9720
|
ref: buttonRef
|
|
8446
|
-
}) : (0,
|
|
9721
|
+
}) : (0, import_react84.cloneElement)(child, {
|
|
8447
9722
|
isOpen: open,
|
|
8448
9723
|
"aria-hidden": !open,
|
|
8449
9724
|
id: uniquePopoverId,
|
|
@@ -8458,16 +9733,16 @@ var PopoverGroup = ({
|
|
|
8458
9733
|
PopoverGroup.displayName = "PopoverGroup";
|
|
8459
9734
|
|
|
8460
9735
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
8461
|
-
var
|
|
9736
|
+
var import_react87 = require("react");
|
|
8462
9737
|
|
|
8463
9738
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
8464
|
-
var
|
|
8465
|
-
var ProgressTrackerContext = (0,
|
|
9739
|
+
var import_react85 = require("react");
|
|
9740
|
+
var ProgressTrackerContext = (0, import_react85.createContext)(
|
|
8466
9741
|
{
|
|
8467
9742
|
activeStep: 0
|
|
8468
9743
|
}
|
|
8469
9744
|
);
|
|
8470
|
-
var useProgressTrackerContext = () => (0,
|
|
9745
|
+
var useProgressTrackerContext = () => (0, import_react85.useContext)(ProgressTrackerContext);
|
|
8471
9746
|
|
|
8472
9747
|
// src/components/ProgressTracker/ProgressTracker.module.css
|
|
8473
9748
|
var ProgressTracker_default = {
|
|
@@ -8491,7 +9766,7 @@ var ProgressTracker_default = {
|
|
|
8491
9766
|
};
|
|
8492
9767
|
|
|
8493
9768
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
8494
|
-
var
|
|
9769
|
+
var import_react86 = require("react");
|
|
8495
9770
|
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
8496
9771
|
var toItemState = (active, completed, disabled) => {
|
|
8497
9772
|
if (disabled) {
|
|
@@ -8522,7 +9797,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
8522
9797
|
const { activeStep, handleStepChange } = useProgressTrackerContext();
|
|
8523
9798
|
const active = activeStep === index;
|
|
8524
9799
|
const itemState = toItemState(active, completed, disabled);
|
|
8525
|
-
const stepNumberContent = (0,
|
|
9800
|
+
const stepNumberContent = (0, import_react86.useMemo)(() => {
|
|
8526
9801
|
if (completed) {
|
|
8527
9802
|
return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
8528
9803
|
}
|
|
@@ -8574,7 +9849,7 @@ ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
|
8574
9849
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
8575
9850
|
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
8576
9851
|
var ProgressTracker = (() => {
|
|
8577
|
-
const Res = (0,
|
|
9852
|
+
const Res = (0, import_react87.forwardRef)((props, ref) => {
|
|
8578
9853
|
const {
|
|
8579
9854
|
id,
|
|
8580
9855
|
activeStep = 0,
|
|
@@ -8584,12 +9859,12 @@ var ProgressTracker = (() => {
|
|
|
8584
9859
|
htmlProps,
|
|
8585
9860
|
...rest
|
|
8586
9861
|
} = props;
|
|
8587
|
-
const [thisActiveStep, setActiveStep] = (0,
|
|
9862
|
+
const [thisActiveStep, setActiveStep] = (0, import_react87.useState)(activeStep);
|
|
8588
9863
|
const handleChange = (step) => {
|
|
8589
9864
|
setActiveStep(step);
|
|
8590
9865
|
onStepChange && onStepChange(step);
|
|
8591
9866
|
};
|
|
8592
|
-
(0,
|
|
9867
|
+
(0, import_react87.useEffect)(() => {
|
|
8593
9868
|
if (activeStep !== void 0 && activeStep != thisActiveStep) {
|
|
8594
9869
|
setActiveStep(activeStep);
|
|
8595
9870
|
}
|
|
@@ -8598,7 +9873,7 @@ var ProgressTracker = (() => {
|
|
|
8598
9873
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
8599
9874
|
ref
|
|
8600
9875
|
};
|
|
8601
|
-
const steps = (0,
|
|
9876
|
+
const steps = (0, import_react87.useMemo)(() => {
|
|
8602
9877
|
const validChildren = removeInvalidChildren(children);
|
|
8603
9878
|
const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
|
|
8604
9879
|
const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
|
|
@@ -8620,35 +9895,35 @@ var ProgressTracker = (() => {
|
|
|
8620
9895
|
return Res;
|
|
8621
9896
|
})();
|
|
8622
9897
|
function removeInvalidChildren(children) {
|
|
8623
|
-
return
|
|
9898
|
+
return import_react87.Children.toArray(children).filter(import_react87.isValidElement);
|
|
8624
9899
|
}
|
|
8625
9900
|
function passIndexPropToProgressTrackerItem(children) {
|
|
8626
|
-
return
|
|
9901
|
+
return import_react87.Children.map(
|
|
8627
9902
|
children,
|
|
8628
|
-
(item, index) => (0,
|
|
9903
|
+
(item, index) => (0, import_react87.cloneElement)(item, {
|
|
8629
9904
|
...item.props,
|
|
8630
9905
|
index
|
|
8631
9906
|
})
|
|
8632
9907
|
);
|
|
8633
9908
|
}
|
|
8634
|
-
var intersperseItemsWithConnector = (children) =>
|
|
9909
|
+
var intersperseItemsWithConnector = (children) => import_react87.Children.map(children, (child, index) => {
|
|
8635
9910
|
if (index === 0) {
|
|
8636
9911
|
return child;
|
|
8637
9912
|
}
|
|
8638
|
-
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(
|
|
9913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(import_react87.Fragment, { children: [
|
|
8639
9914
|
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)("div", { "aria-hidden": true, className: ProgressTracker_default.connector }),
|
|
8640
9915
|
child
|
|
8641
9916
|
] }, index);
|
|
8642
9917
|
});
|
|
8643
9918
|
|
|
8644
9919
|
// src/components/Search/Search.tsx
|
|
8645
|
-
var
|
|
9920
|
+
var import_react90 = require("react");
|
|
8646
9921
|
|
|
8647
9922
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
8648
|
-
var
|
|
8649
|
-
var AutocompleteSearchContext = (0,
|
|
9923
|
+
var import_react88 = require("react");
|
|
9924
|
+
var AutocompleteSearchContext = (0, import_react88.createContext)({});
|
|
8650
9925
|
var useAutocompleteSearch = () => {
|
|
8651
|
-
return (0,
|
|
9926
|
+
return (0, import_react88.useContext)(AutocompleteSearchContext);
|
|
8652
9927
|
};
|
|
8653
9928
|
|
|
8654
9929
|
// src/components/Search/Search.module.css
|
|
@@ -8698,9 +9973,9 @@ function createEmptyChangeEvent(inputElementId) {
|
|
|
8698
9973
|
}
|
|
8699
9974
|
|
|
8700
9975
|
// src/components/Search/SearchSuggestions.tsx
|
|
8701
|
-
var
|
|
9976
|
+
var import_react89 = require("react");
|
|
8702
9977
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
8703
|
-
var SearchSuggestions = (0,
|
|
9978
|
+
var SearchSuggestions = (0, import_react89.forwardRef)((props, ref) => {
|
|
8704
9979
|
const {
|
|
8705
9980
|
id,
|
|
8706
9981
|
searchId,
|
|
@@ -8791,7 +10066,7 @@ var getIconSize = (size2) => {
|
|
|
8791
10066
|
return "small";
|
|
8792
10067
|
}
|
|
8793
10068
|
};
|
|
8794
|
-
var Search = (0,
|
|
10069
|
+
var Search = (0, import_react90.forwardRef)(
|
|
8795
10070
|
({
|
|
8796
10071
|
componentSize = "medium",
|
|
8797
10072
|
buttonProps,
|
|
@@ -8807,7 +10082,7 @@ var Search = (0, import_react89.forwardRef)(
|
|
|
8807
10082
|
...rest
|
|
8808
10083
|
}, ref) => {
|
|
8809
10084
|
var _a;
|
|
8810
|
-
const generatedId = (0,
|
|
10085
|
+
const generatedId = (0, import_react90.useId)();
|
|
8811
10086
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
8812
10087
|
const hasLabel = !!label;
|
|
8813
10088
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
@@ -8816,7 +10091,7 @@ var Search = (0, import_react89.forwardRef)(
|
|
|
8816
10091
|
uniqueId,
|
|
8817
10092
|
"suggestions-description"
|
|
8818
10093
|
);
|
|
8819
|
-
const [hasValue, setHasValue] = (0,
|
|
10094
|
+
const [hasValue, setHasValue] = (0, import_react90.useState)(!!value);
|
|
8820
10095
|
const context = useAutocompleteSearch();
|
|
8821
10096
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
8822
10097
|
const handleChange = (e) => {
|
|
@@ -8931,24 +10206,24 @@ var Search = (0, import_react89.forwardRef)(
|
|
|
8931
10206
|
Search.displayName = "Search";
|
|
8932
10207
|
|
|
8933
10208
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
8934
|
-
var
|
|
10209
|
+
var import_react91 = require("react");
|
|
8935
10210
|
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
8936
10211
|
var SearchAutocompleteWrapper = (props) => {
|
|
8937
10212
|
const {
|
|
8938
10213
|
value,
|
|
8939
10214
|
data,
|
|
8940
|
-
filter,
|
|
10215
|
+
filter: filter2,
|
|
8941
10216
|
queryLength = 2,
|
|
8942
10217
|
onChange,
|
|
8943
10218
|
onSuggestionSelection,
|
|
8944
10219
|
children
|
|
8945
10220
|
} = props;
|
|
8946
|
-
const [inputValue, setInputValue] = (0,
|
|
8947
|
-
const [suggestions, setSuggestions] = (0,
|
|
8948
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
10221
|
+
const [inputValue, setInputValue] = (0, import_react91.useState)(value != null ? value : "");
|
|
10222
|
+
const [suggestions, setSuggestions] = (0, import_react91.useState)([]);
|
|
10223
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react91.useState)(false);
|
|
8949
10224
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
8950
10225
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
8951
|
-
(0,
|
|
10226
|
+
(0, import_react91.useEffect)(() => {
|
|
8952
10227
|
if (suggestions.length > 0) {
|
|
8953
10228
|
openSuggestions();
|
|
8954
10229
|
} else {
|
|
@@ -8965,16 +10240,16 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
8965
10240
|
if (isWeightedValueData(data)) {
|
|
8966
10241
|
const { sortFunction, array } = data;
|
|
8967
10242
|
const filteredSuggestions = array.filter(
|
|
8968
|
-
(suggestion) =>
|
|
10243
|
+
(suggestion) => filter2 ? filter2(suggestion.text, query) : searchFilter(suggestion.text, query)
|
|
8969
10244
|
);
|
|
8970
|
-
finalSuggestions = filteredSuggestions.sort(sortFunction ? (
|
|
10245
|
+
finalSuggestions = filteredSuggestions.sort(sortFunction ? (a3, b) => sortFunction(a3, b) : void 0).map((item) => item.text);
|
|
8971
10246
|
} else {
|
|
8972
10247
|
const { sortFunction, array } = data;
|
|
8973
10248
|
const filteredSuggestions = array.filter(
|
|
8974
|
-
(suggestion) =>
|
|
10249
|
+
(suggestion) => filter2 ? filter2(suggestion, query) : searchFilter(suggestion, query)
|
|
8975
10250
|
);
|
|
8976
10251
|
finalSuggestions = filteredSuggestions.sort(
|
|
8977
|
-
sortFunction ? (
|
|
10252
|
+
sortFunction ? (a3, b) => sortFunction(a3, b) : void 0
|
|
8978
10253
|
);
|
|
8979
10254
|
}
|
|
8980
10255
|
}
|
|
@@ -8993,8 +10268,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
8993
10268
|
const handleSetInputValue = (value2) => {
|
|
8994
10269
|
setInputValue(value2 != null ? value2 : "");
|
|
8995
10270
|
};
|
|
8996
|
-
const inputRef = (0,
|
|
8997
|
-
const suggestionsRef = (0,
|
|
10271
|
+
const inputRef = (0, import_react91.useRef)(null);
|
|
10272
|
+
const suggestionsRef = (0, import_react91.useRef)(null);
|
|
8998
10273
|
useOnClickOutside([inputRef.current, suggestionsRef.current], () => {
|
|
8999
10274
|
closeSuggestions();
|
|
9000
10275
|
});
|
|
@@ -9018,17 +10293,17 @@ Search2.AutocompleteWrapper = SearchAutocompleteWrapper;
|
|
|
9018
10293
|
Search2.Suggestions = SearchSuggestions;
|
|
9019
10294
|
|
|
9020
10295
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
9021
|
-
var
|
|
10296
|
+
var import_react94 = require("react");
|
|
9022
10297
|
|
|
9023
10298
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
9024
|
-
var
|
|
9025
|
-
var CheckboxGroupContext = (0,
|
|
10299
|
+
var import_react92 = require("react");
|
|
10300
|
+
var CheckboxGroupContext = (0, import_react92.createContext)(null);
|
|
9026
10301
|
var useCheckboxGroup = () => {
|
|
9027
|
-
return (0,
|
|
10302
|
+
return (0, import_react92.useContext)(CheckboxGroupContext);
|
|
9028
10303
|
};
|
|
9029
10304
|
|
|
9030
10305
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
9031
|
-
var
|
|
10306
|
+
var import_react93 = require("react");
|
|
9032
10307
|
|
|
9033
10308
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
9034
10309
|
var SelectionControl_default = {
|
|
@@ -9049,7 +10324,7 @@ var SelectionControl_default = {
|
|
|
9049
10324
|
|
|
9050
10325
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
9051
10326
|
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
9052
|
-
var SelectionControl = (0,
|
|
10327
|
+
var SelectionControl = (0, import_react93.forwardRef)((props, ref) => {
|
|
9053
10328
|
const { controlType, className, ...rest } = props;
|
|
9054
10329
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
9055
10330
|
"span",
|
|
@@ -9064,7 +10339,7 @@ var SelectionControl = (0, import_react92.forwardRef)((props, ref) => {
|
|
|
9064
10339
|
}
|
|
9065
10340
|
);
|
|
9066
10341
|
});
|
|
9067
|
-
var Label2 = (0,
|
|
10342
|
+
var Label2 = (0, import_react93.forwardRef)(
|
|
9068
10343
|
(props, ref) => {
|
|
9069
10344
|
const {
|
|
9070
10345
|
disabled,
|
|
@@ -9107,7 +10382,7 @@ var selectionControlTypographyProps = {
|
|
|
9107
10382
|
|
|
9108
10383
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
9109
10384
|
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
9110
|
-
var Checkbox = (0,
|
|
10385
|
+
var Checkbox = (0, import_react94.forwardRef)(
|
|
9111
10386
|
(props, ref) => {
|
|
9112
10387
|
const {
|
|
9113
10388
|
id,
|
|
@@ -9122,7 +10397,7 @@ var Checkbox = (0, import_react93.forwardRef)(
|
|
|
9122
10397
|
htmlProps = {},
|
|
9123
10398
|
...rest
|
|
9124
10399
|
} = props;
|
|
9125
|
-
const generatedId = (0,
|
|
10400
|
+
const generatedId = (0, import_react94.useId)();
|
|
9126
10401
|
const uniqueId = id != null ? id : `${generatedId}-checkbox`;
|
|
9127
10402
|
const checkboxGroup = useCheckboxGroup();
|
|
9128
10403
|
const hasLabel = !!label;
|
|
@@ -9183,7 +10458,7 @@ var Checkbox = (0, import_react93.forwardRef)(
|
|
|
9183
10458
|
Checkbox.displayName = "Checkbox";
|
|
9184
10459
|
|
|
9185
10460
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
9186
|
-
var
|
|
10461
|
+
var import_react95 = require("react");
|
|
9187
10462
|
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
9188
10463
|
var CheckboxGroup = (props) => {
|
|
9189
10464
|
const {
|
|
@@ -9202,7 +10477,7 @@ var CheckboxGroup = (props) => {
|
|
|
9202
10477
|
...rest
|
|
9203
10478
|
} = props;
|
|
9204
10479
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
9205
|
-
const generatedId = (0,
|
|
10480
|
+
const generatedId = (0, import_react95.useId)();
|
|
9206
10481
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
9207
10482
|
const hasErrorMessage = !!errorMessage;
|
|
9208
10483
|
const showRequiredMarker = required || ariaRequired;
|
|
@@ -9258,13 +10533,13 @@ var CheckboxGroup = (props) => {
|
|
|
9258
10533
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
9259
10534
|
|
|
9260
10535
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
9261
|
-
var
|
|
10536
|
+
var import_react97 = require("react");
|
|
9262
10537
|
|
|
9263
10538
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
9264
|
-
var
|
|
9265
|
-
var RadioButtonGroupContext = (0,
|
|
10539
|
+
var import_react96 = require("react");
|
|
10540
|
+
var RadioButtonGroupContext = (0, import_react96.createContext)(null);
|
|
9266
10541
|
var useRadioButtonGroup = () => {
|
|
9267
|
-
return (0,
|
|
10542
|
+
return (0, import_react96.useContext)(RadioButtonGroupContext);
|
|
9268
10543
|
};
|
|
9269
10544
|
|
|
9270
10545
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
@@ -9278,7 +10553,7 @@ var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
|
9278
10553
|
}
|
|
9279
10554
|
return !!value;
|
|
9280
10555
|
};
|
|
9281
|
-
var RadioButton = (0,
|
|
10556
|
+
var RadioButton = (0, import_react97.forwardRef)(
|
|
9282
10557
|
(props, ref) => {
|
|
9283
10558
|
const {
|
|
9284
10559
|
id,
|
|
@@ -9302,7 +10577,7 @@ var RadioButton = (0, import_react96.forwardRef)(
|
|
|
9302
10577
|
style,
|
|
9303
10578
|
...restHtmlProps
|
|
9304
10579
|
} = htmlProps;
|
|
9305
|
-
const generatedId = (0,
|
|
10580
|
+
const generatedId = (0, import_react97.useId)();
|
|
9306
10581
|
const uniqueId = id != null ? id : `${generatedId}-radioButton`;
|
|
9307
10582
|
const hasLabel = !!label;
|
|
9308
10583
|
const radioButtonGroup = useRadioButtonGroup();
|
|
@@ -9313,8 +10588,7 @@ var RadioButton = (0, import_react96.forwardRef)(
|
|
|
9313
10588
|
const describedByIds = [];
|
|
9314
10589
|
if (radioButtonGroup == null ? void 0 : radioButtonGroup.errorMessageId)
|
|
9315
10590
|
describedByIds.push(radioButtonGroup == null ? void 0 : radioButtonGroup.errorMessageId);
|
|
9316
|
-
if (ariaDescribedby)
|
|
9317
|
-
describedByIds.push(ariaDescribedby);
|
|
10591
|
+
if (ariaDescribedby) describedByIds.push(ariaDescribedby);
|
|
9318
10592
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
9319
10593
|
Label2,
|
|
9320
10594
|
{
|
|
@@ -9363,7 +10637,7 @@ var RadioButton = (0, import_react96.forwardRef)(
|
|
|
9363
10637
|
RadioButton.displayName = "RadioButton";
|
|
9364
10638
|
|
|
9365
10639
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
9366
|
-
var
|
|
10640
|
+
var import_react98 = require("react");
|
|
9367
10641
|
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
9368
10642
|
var RadioButtonGroupInner = (props, ref) => {
|
|
9369
10643
|
const {
|
|
@@ -9385,8 +10659,8 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
9385
10659
|
...rest
|
|
9386
10660
|
} = props;
|
|
9387
10661
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
9388
|
-
const [groupValue, setGroupValue] = (0,
|
|
9389
|
-
const generatedId = (0,
|
|
10662
|
+
const [groupValue, setGroupValue] = (0, import_react98.useState)(value);
|
|
10663
|
+
const generatedId = (0, import_react98.useId)();
|
|
9390
10664
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
|
|
9391
10665
|
const handleChange = combineHandlers(
|
|
9392
10666
|
(e) => setGroupValue(e.target.value),
|
|
@@ -9447,11 +10721,11 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
9447
10721
|
}
|
|
9448
10722
|
);
|
|
9449
10723
|
};
|
|
9450
|
-
var RadioButtonGroup = (0,
|
|
10724
|
+
var RadioButtonGroup = (0, import_react98.forwardRef)(RadioButtonGroupInner);
|
|
9451
10725
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
9452
10726
|
|
|
9453
10727
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
9454
|
-
var
|
|
10728
|
+
var import_react99 = require("react");
|
|
9455
10729
|
|
|
9456
10730
|
// src/components/SkipToContent/SkipToContent.module.css
|
|
9457
10731
|
var SkipToContent_default = {
|
|
@@ -9461,7 +10735,7 @@ var SkipToContent_default = {
|
|
|
9461
10735
|
|
|
9462
10736
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
9463
10737
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
9464
|
-
var SkipToContent = (0,
|
|
10738
|
+
var SkipToContent = (0, import_react99.forwardRef)(
|
|
9465
10739
|
(props, ref) => {
|
|
9466
10740
|
const {
|
|
9467
10741
|
text = "Til hovedinnhold",
|
|
@@ -9498,7 +10772,7 @@ var SkipToContent = (0, import_react98.forwardRef)(
|
|
|
9498
10772
|
SkipToContent.displayName = "SkipToContent";
|
|
9499
10773
|
|
|
9500
10774
|
// src/components/SplitButton/SplitButton.tsx
|
|
9501
|
-
var
|
|
10775
|
+
var import_react100 = require("react");
|
|
9502
10776
|
|
|
9503
10777
|
// src/components/SplitButton/SplitButton.module.css
|
|
9504
10778
|
var SplitButton_default = {
|
|
@@ -9510,7 +10784,7 @@ var SplitButton_default = {
|
|
|
9510
10784
|
|
|
9511
10785
|
// src/components/SplitButton/SplitButton.tsx
|
|
9512
10786
|
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
9513
|
-
var SplitButton = (0,
|
|
10787
|
+
var SplitButton = (0, import_react100.forwardRef)(
|
|
9514
10788
|
(props, ref) => {
|
|
9515
10789
|
const {
|
|
9516
10790
|
size: size2,
|
|
@@ -9520,7 +10794,7 @@ var SplitButton = (0, import_react99.forwardRef)(
|
|
|
9520
10794
|
className,
|
|
9521
10795
|
...rest
|
|
9522
10796
|
} = props;
|
|
9523
|
-
const [isOpen, setIsOpen] = (0,
|
|
10797
|
+
const [isOpen, setIsOpen] = (0, import_react100.useState)(false);
|
|
9524
10798
|
const buttonStyleProps = {
|
|
9525
10799
|
purpose,
|
|
9526
10800
|
size: size2
|
|
@@ -9557,20 +10831,20 @@ var SplitButton = (0, import_react99.forwardRef)(
|
|
|
9557
10831
|
SplitButton.displayName = "SplitButton";
|
|
9558
10832
|
|
|
9559
10833
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
9560
|
-
var
|
|
10834
|
+
var import_react110 = require("react");
|
|
9561
10835
|
|
|
9562
10836
|
// src/components/Table/collapsible/Table.context.tsx
|
|
9563
|
-
var
|
|
9564
|
-
var CollapsibleTableContext = (0,
|
|
10837
|
+
var import_react101 = require("react");
|
|
10838
|
+
var CollapsibleTableContext = (0, import_react101.createContext)({
|
|
9565
10839
|
headerValues: [],
|
|
9566
10840
|
definingColumnIndex: [0]
|
|
9567
10841
|
});
|
|
9568
|
-
var useCollapsibleTableContext = () => (0,
|
|
10842
|
+
var useCollapsibleTableContext = () => (0, import_react101.useContext)(CollapsibleTableContext);
|
|
9569
10843
|
|
|
9570
10844
|
// src/components/Table/normal/Body.tsx
|
|
9571
|
-
var
|
|
10845
|
+
var import_react102 = require("react");
|
|
9572
10846
|
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
9573
|
-
var Body = (0,
|
|
10847
|
+
var Body = (0, import_react102.forwardRef)(
|
|
9574
10848
|
(props, ref) => {
|
|
9575
10849
|
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)("tbody", { ref, ...props });
|
|
9576
10850
|
}
|
|
@@ -9578,20 +10852,20 @@ var Body = (0, import_react101.forwardRef)(
|
|
|
9578
10852
|
Body.displayName = "Table.Body";
|
|
9579
10853
|
|
|
9580
10854
|
// src/components/Table/normal/Cell.tsx
|
|
9581
|
-
var
|
|
10855
|
+
var import_react104 = require("react");
|
|
9582
10856
|
|
|
9583
10857
|
// src/components/Table/normal/Head.tsx
|
|
9584
|
-
var
|
|
10858
|
+
var import_react103 = require("react");
|
|
9585
10859
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
9586
|
-
var Head = (0,
|
|
10860
|
+
var Head = (0, import_react103.forwardRef)(
|
|
9587
10861
|
({ children, ...rest }, ref) => {
|
|
9588
10862
|
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)("thead", { ref, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(HeadContext.Provider, { value: true, children }) });
|
|
9589
10863
|
}
|
|
9590
10864
|
);
|
|
9591
10865
|
Head.displayName = "Table.Head";
|
|
9592
|
-
var HeadContext = (0,
|
|
10866
|
+
var HeadContext = (0, import_react103.createContext)(false);
|
|
9593
10867
|
function useIsInTableHead() {
|
|
9594
|
-
const isInTableHead = (0,
|
|
10868
|
+
const isInTableHead = (0, import_react103.useContext)(HeadContext);
|
|
9595
10869
|
return isInTableHead;
|
|
9596
10870
|
}
|
|
9597
10871
|
|
|
@@ -9622,7 +10896,7 @@ var Table_default = {
|
|
|
9622
10896
|
|
|
9623
10897
|
// src/components/Table/normal/Cell.tsx
|
|
9624
10898
|
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
9625
|
-
var Cell = (0,
|
|
10899
|
+
var Cell = (0, import_react104.forwardRef)(
|
|
9626
10900
|
({
|
|
9627
10901
|
children,
|
|
9628
10902
|
type: _type,
|
|
@@ -9661,9 +10935,9 @@ var Cell = (0, import_react103.forwardRef)(
|
|
|
9661
10935
|
Cell.displayName = "Table.Cell";
|
|
9662
10936
|
|
|
9663
10937
|
// src/components/Table/normal/Foot.tsx
|
|
9664
|
-
var
|
|
10938
|
+
var import_react105 = require("react");
|
|
9665
10939
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
9666
|
-
var Foot = (0,
|
|
10940
|
+
var Foot = (0, import_react105.forwardRef)(
|
|
9667
10941
|
(props, ref) => {
|
|
9668
10942
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("tfoot", { ref, ...props });
|
|
9669
10943
|
}
|
|
@@ -9671,9 +10945,9 @@ var Foot = (0, import_react104.forwardRef)(
|
|
|
9671
10945
|
Foot.displayName = "Table.Foot";
|
|
9672
10946
|
|
|
9673
10947
|
// src/components/Table/normal/Row.tsx
|
|
9674
|
-
var
|
|
10948
|
+
var import_react106 = require("react");
|
|
9675
10949
|
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
9676
|
-
var Row = (0,
|
|
10950
|
+
var Row = (0, import_react106.forwardRef)(
|
|
9677
10951
|
({ type: _type, mode = "normal", hoverable, selected, className, ...rest }, ref) => {
|
|
9678
10952
|
const isInHeader = useIsInTableHead();
|
|
9679
10953
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
@@ -9700,7 +10974,7 @@ var Row = (0, import_react105.forwardRef)(
|
|
|
9700
10974
|
Row.displayName = "Table.Row";
|
|
9701
10975
|
|
|
9702
10976
|
// src/components/Table/normal/SortCell.tsx
|
|
9703
|
-
var
|
|
10977
|
+
var import_react107 = require("react");
|
|
9704
10978
|
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
9705
10979
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
9706
10980
|
if (!isSorted || !sortOrder) {
|
|
@@ -9708,7 +10982,7 @@ var makeSortIcon = (isSorted, sortOrder) => {
|
|
|
9708
10982
|
}
|
|
9709
10983
|
return sortOrder === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
9710
10984
|
};
|
|
9711
|
-
var SortCell = (0,
|
|
10985
|
+
var SortCell = (0, import_react107.forwardRef)(
|
|
9712
10986
|
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
9713
10987
|
Cell,
|
|
9714
10988
|
{
|
|
@@ -9740,7 +11014,7 @@ var SortCell = (0, import_react106.forwardRef)(
|
|
|
9740
11014
|
SortCell.displayName = "Table.SortCell";
|
|
9741
11015
|
|
|
9742
11016
|
// src/components/Table/normal/Table.tsx
|
|
9743
|
-
var
|
|
11017
|
+
var import_react108 = require("react");
|
|
9744
11018
|
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
9745
11019
|
function getDensityCn(value) {
|
|
9746
11020
|
switch (value) {
|
|
@@ -9751,7 +11025,7 @@ function getDensityCn(value) {
|
|
|
9751
11025
|
return "extra-compact";
|
|
9752
11026
|
}
|
|
9753
11027
|
}
|
|
9754
|
-
var Table = (0,
|
|
11028
|
+
var Table = (0, import_react108.forwardRef)(
|
|
9755
11029
|
({
|
|
9756
11030
|
density = "normal",
|
|
9757
11031
|
stickyHeader,
|
|
@@ -9781,23 +11055,23 @@ var Table = (0, import_react107.forwardRef)(
|
|
|
9781
11055
|
Table.displayName = "Table";
|
|
9782
11056
|
|
|
9783
11057
|
// src/components/Table/normal/TableWrapper.tsx
|
|
9784
|
-
var
|
|
11058
|
+
var import_react109 = require("react");
|
|
9785
11059
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
9786
11060
|
var TableWrapper = ({ className, ...rest }) => {
|
|
9787
|
-
const [overflowX, setOverflowX] = (0,
|
|
9788
|
-
const [windowWidth, setWindowWidth] = (0,
|
|
11061
|
+
const [overflowX, setOverflowX] = (0, import_react109.useState)(false);
|
|
11062
|
+
const [windowWidth, setWindowWidth] = (0, import_react109.useState)(window.innerWidth);
|
|
9789
11063
|
function isOverflowingX(event) {
|
|
9790
11064
|
return event.offsetWidth < event.scrollWidth;
|
|
9791
11065
|
}
|
|
9792
|
-
const wrapperRef = (0,
|
|
9793
|
-
(0,
|
|
11066
|
+
const wrapperRef = (0, import_react109.useRef)(null);
|
|
11067
|
+
(0, import_react109.useEffect)(() => {
|
|
9794
11068
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
9795
11069
|
setOverflowX(true);
|
|
9796
11070
|
return;
|
|
9797
11071
|
}
|
|
9798
11072
|
setOverflowX(false);
|
|
9799
11073
|
}, [windowWidth]);
|
|
9800
|
-
(0,
|
|
11074
|
+
(0, import_react109.useEffect)(() => {
|
|
9801
11075
|
function handleResize() {
|
|
9802
11076
|
setWindowWidth(window.innerWidth);
|
|
9803
11077
|
}
|
|
@@ -9832,7 +11106,7 @@ Table2.Foot = Foot;
|
|
|
9832
11106
|
|
|
9833
11107
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
9834
11108
|
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
9835
|
-
var CollapsibleRow = (0,
|
|
11109
|
+
var CollapsibleRow = (0, import_react110.forwardRef)(
|
|
9836
11110
|
({
|
|
9837
11111
|
type: _type,
|
|
9838
11112
|
className,
|
|
@@ -9845,8 +11119,8 @@ var CollapsibleRow = (0, import_react109.forwardRef)(
|
|
|
9845
11119
|
const isInHead = useIsInTableHead();
|
|
9846
11120
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
9847
11121
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
9848
|
-
const [childrenCollapsed, setChildrenCollapsed] = (0,
|
|
9849
|
-
(0,
|
|
11122
|
+
const [childrenCollapsed, setChildrenCollapsed] = (0, import_react110.useState)(true);
|
|
11123
|
+
(0, import_react110.useEffect)(() => {
|
|
9850
11124
|
!isCollapsed && setChildrenCollapsed(true);
|
|
9851
11125
|
}, [isCollapsed]);
|
|
9852
11126
|
const rowProps = (isOpenCollapsibleHeader) => {
|
|
@@ -9862,31 +11136,30 @@ var CollapsibleRow = (0, import_react109.forwardRef)(
|
|
|
9862
11136
|
};
|
|
9863
11137
|
};
|
|
9864
11138
|
const collapsedHeaderValues = headerValues.filter(
|
|
9865
|
-
(
|
|
11139
|
+
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
9866
11140
|
);
|
|
9867
|
-
const childrenArray =
|
|
11141
|
+
const childrenArray = import_react110.Children.toArray(children);
|
|
9868
11142
|
const collapsedChildren = childrenArray.filter(
|
|
9869
|
-
(
|
|
11143
|
+
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
9870
11144
|
);
|
|
9871
|
-
const
|
|
11145
|
+
const prefix3 = "collapsibleRow";
|
|
9872
11146
|
const collapsibleIds = [];
|
|
9873
11147
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
9874
|
-
const id = derivativeIdGenerator(
|
|
11148
|
+
const id = derivativeIdGenerator(prefix3, index.toString());
|
|
9875
11149
|
collapsibleIds.push(id);
|
|
9876
|
-
return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
|
|
11150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(import_react110.Fragment, { children: [
|
|
9877
11151
|
/* @__PURE__ */ (0, import_jsx_runtime264.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
9878
|
-
(0,
|
|
11152
|
+
(0, import_react110.isValidElement)(child) && (0, import_react110.cloneElement)(child, {
|
|
9879
11153
|
collapsibleProps: { isCollapsibleChild: true }
|
|
9880
11154
|
})
|
|
9881
11155
|
] }, `DL-${index}`);
|
|
9882
11156
|
}) : null;
|
|
9883
11157
|
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(Row, { ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
9884
|
-
const definingColumnCells = childrenArray.slice().filter((
|
|
9885
|
-
return definingColumnIndex.indexOf(childrenArray.indexOf(
|
|
11158
|
+
const definingColumnCells = childrenArray.slice().filter((column2, index) => definingColumnIndex.indexOf(index) > -1).sort((a3, b) => {
|
|
11159
|
+
return definingColumnIndex.indexOf(childrenArray.indexOf(a3)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
9886
11160
|
});
|
|
9887
11161
|
const headerRow = () => {
|
|
9888
|
-
if (type !== "head" || !isCollapsed)
|
|
9889
|
-
return null;
|
|
11162
|
+
if (type !== "head" || !isCollapsed) return null;
|
|
9890
11163
|
return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(Row, { ref, ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(import_jsx_runtime264.Fragment, { children: [
|
|
9891
11164
|
definingColumnCells,
|
|
9892
11165
|
/* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(Table2.Cell, { type: "head", layout: "center", children: [
|
|
@@ -9897,8 +11170,7 @@ var CollapsibleRow = (0, import_react109.forwardRef)(
|
|
|
9897
11170
|
};
|
|
9898
11171
|
const idList = spaceSeparatedIdListGenerator(collapsibleIds);
|
|
9899
11172
|
const rowWithChevron = () => {
|
|
9900
|
-
if (type !== "body" || !isCollapsed)
|
|
9901
|
-
return null;
|
|
11173
|
+
if (type !== "body" || !isCollapsed) return null;
|
|
9902
11174
|
return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
9903
11175
|
definingColumnCells,
|
|
9904
11176
|
/* @__PURE__ */ (0, import_jsx_runtime264.jsx)(Table2.Cell, { children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
|
|
@@ -9937,9 +11209,9 @@ var CollapsibleRow = (0, import_react109.forwardRef)(
|
|
|
9937
11209
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
9938
11210
|
|
|
9939
11211
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
9940
|
-
var
|
|
11212
|
+
var import_react111 = require("react");
|
|
9941
11213
|
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
9942
|
-
var CollapsibleTable = (0,
|
|
11214
|
+
var CollapsibleTable = (0, import_react111.forwardRef)((props, ref) => {
|
|
9943
11215
|
const {
|
|
9944
11216
|
isCollapsed,
|
|
9945
11217
|
headerValues,
|
|
@@ -9965,11 +11237,11 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
9965
11237
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
9966
11238
|
|
|
9967
11239
|
// src/components/Tabs/Tabs.tsx
|
|
9968
|
-
var
|
|
11240
|
+
var import_react113 = require("react");
|
|
9969
11241
|
|
|
9970
11242
|
// src/components/Tabs/Tabs.context.tsx
|
|
9971
|
-
var
|
|
9972
|
-
var TabsContext = (0,
|
|
11243
|
+
var import_react112 = require("react");
|
|
11244
|
+
var TabsContext = (0, import_react112.createContext)({
|
|
9973
11245
|
activeTab: 0,
|
|
9974
11246
|
tabsId: "",
|
|
9975
11247
|
handleTabChange: () => null,
|
|
@@ -9979,7 +11251,7 @@ var TabsContext = (0, import_react111.createContext)({
|
|
|
9979
11251
|
setHasTabFocus: () => null,
|
|
9980
11252
|
tabContentDirection: "row"
|
|
9981
11253
|
});
|
|
9982
|
-
var useTabsContext = () => (0,
|
|
11254
|
+
var useTabsContext = () => (0, import_react112.useContext)(TabsContext);
|
|
9983
11255
|
|
|
9984
11256
|
// src/components/Tabs/Tabs.module.css
|
|
9985
11257
|
var Tabs_default = {
|
|
@@ -9997,7 +11269,7 @@ var Tabs_default = {
|
|
|
9997
11269
|
|
|
9998
11270
|
// src/components/Tabs/Tabs.tsx
|
|
9999
11271
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
10000
|
-
var Tabs = (0,
|
|
11272
|
+
var Tabs = (0, import_react113.forwardRef)((props, ref) => {
|
|
10001
11273
|
const {
|
|
10002
11274
|
id,
|
|
10003
11275
|
activeTab,
|
|
@@ -10009,17 +11281,17 @@ var Tabs = (0, import_react112.forwardRef)((props, ref) => {
|
|
|
10009
11281
|
htmlProps,
|
|
10010
11282
|
...rest
|
|
10011
11283
|
} = props;
|
|
10012
|
-
const generatedId = (0,
|
|
11284
|
+
const generatedId = (0, import_react113.useId)();
|
|
10013
11285
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
10014
|
-
const [thisActiveTab, setActiveTab] = (0,
|
|
10015
|
-
const [hasTabFocus, setHasTabFocus] = (0,
|
|
10016
|
-
const tabListRef = (0,
|
|
10017
|
-
const tabPanelsRef = (0,
|
|
11286
|
+
const [thisActiveTab, setActiveTab] = (0, import_react113.useState)(activeTab != null ? activeTab : 0);
|
|
11287
|
+
const [hasTabFocus, setHasTabFocus] = (0, import_react113.useState)(false);
|
|
11288
|
+
const tabListRef = (0, import_react113.useRef)(null);
|
|
11289
|
+
const tabPanelsRef = (0, import_react113.useRef)(null);
|
|
10018
11290
|
const handleTabChange = (index) => {
|
|
10019
11291
|
setActiveTab(index);
|
|
10020
11292
|
onChange && onChange(index);
|
|
10021
11293
|
};
|
|
10022
|
-
(0,
|
|
11294
|
+
(0, import_react113.useEffect)(() => {
|
|
10023
11295
|
if (activeTab !== void 0 && activeTab !== thisActiveTab) {
|
|
10024
11296
|
setActiveTab(activeTab);
|
|
10025
11297
|
}
|
|
@@ -10061,12 +11333,12 @@ var Tabs = (0, import_react112.forwardRef)((props, ref) => {
|
|
|
10061
11333
|
Tabs.displayName = "Tabs";
|
|
10062
11334
|
|
|
10063
11335
|
// src/components/Tabs/Tab.tsx
|
|
10064
|
-
var
|
|
11336
|
+
var import_react115 = require("react");
|
|
10065
11337
|
|
|
10066
11338
|
// src/components/Tabs/TabWidthContext.tsx
|
|
10067
|
-
var
|
|
11339
|
+
var import_react114 = require("react");
|
|
10068
11340
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
10069
|
-
var TabContext = (0,
|
|
11341
|
+
var TabContext = (0, import_react114.createContext)(null);
|
|
10070
11342
|
function TabWidthContextProvider({
|
|
10071
11343
|
children,
|
|
10072
11344
|
onChangeWidths
|
|
@@ -10076,15 +11348,15 @@ function TabWidthContextProvider({
|
|
|
10076
11348
|
{
|
|
10077
11349
|
value: {
|
|
10078
11350
|
updateWidth: (index, newWidth) => {
|
|
10079
|
-
onChangeWidths((
|
|
10080
|
-
const newValue = [...
|
|
11351
|
+
onChangeWidths((prev2) => {
|
|
11352
|
+
const newValue = [...prev2];
|
|
10081
11353
|
newValue[index] = newWidth;
|
|
10082
11354
|
return newValue;
|
|
10083
11355
|
});
|
|
10084
11356
|
},
|
|
10085
11357
|
removeTab: (index) => {
|
|
10086
|
-
onChangeWidths((
|
|
10087
|
-
const newValue = [...
|
|
11358
|
+
onChangeWidths((prev2) => {
|
|
11359
|
+
const newValue = [...prev2];
|
|
10088
11360
|
newValue.splice(index, 1);
|
|
10089
11361
|
return newValue;
|
|
10090
11362
|
});
|
|
@@ -10095,8 +11367,8 @@ function TabWidthContextProvider({
|
|
|
10095
11367
|
);
|
|
10096
11368
|
}
|
|
10097
11369
|
function useSetTabWidth(index, width) {
|
|
10098
|
-
const context = (0,
|
|
10099
|
-
(0,
|
|
11370
|
+
const context = (0, import_react114.useContext)(TabContext);
|
|
11371
|
+
(0, import_react114.useLayoutEffect)(() => {
|
|
10100
11372
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
10101
11373
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
10102
11374
|
}, [index, width]);
|
|
@@ -10104,7 +11376,7 @@ function useSetTabWidth(index, width) {
|
|
|
10104
11376
|
|
|
10105
11377
|
// src/components/Tabs/Tab.tsx
|
|
10106
11378
|
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
10107
|
-
var Tab = (0,
|
|
11379
|
+
var Tab = (0, import_react115.forwardRef)((props, ref) => {
|
|
10108
11380
|
const {
|
|
10109
11381
|
active = false,
|
|
10110
11382
|
icon: icon2,
|
|
@@ -10121,16 +11393,16 @@ var Tab = (0, import_react114.forwardRef)((props, ref) => {
|
|
|
10121
11393
|
...rest
|
|
10122
11394
|
} = props;
|
|
10123
11395
|
useSetTabWidth(index, width);
|
|
10124
|
-
const itemRef = (0,
|
|
11396
|
+
const itemRef = (0, import_react115.useRef)(null);
|
|
10125
11397
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
10126
11398
|
const { tabContentDirection } = useTabsContext();
|
|
10127
|
-
(0,
|
|
11399
|
+
(0, import_react115.useEffect)(() => {
|
|
10128
11400
|
var _a;
|
|
10129
11401
|
if (focus) {
|
|
10130
11402
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
10131
11403
|
}
|
|
10132
11404
|
}, [focus]);
|
|
10133
|
-
const handleSelect = (0,
|
|
11405
|
+
const handleSelect = (0, import_react115.useCallback)(() => {
|
|
10134
11406
|
if (setFocus && index) {
|
|
10135
11407
|
setFocus(index);
|
|
10136
11408
|
}
|
|
@@ -10175,9 +11447,9 @@ var Tab = (0, import_react114.forwardRef)((props, ref) => {
|
|
|
10175
11447
|
Tab.displayName = "Tab";
|
|
10176
11448
|
|
|
10177
11449
|
// src/components/Tabs/TabList.tsx
|
|
10178
|
-
var
|
|
11450
|
+
var import_react116 = require("react");
|
|
10179
11451
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
10180
|
-
var TabList = (0,
|
|
11452
|
+
var TabList = (0, import_react116.forwardRef)(
|
|
10181
11453
|
({ children, id, style, onFocus, ...rest }, ref) => {
|
|
10182
11454
|
const {
|
|
10183
11455
|
activeTab,
|
|
@@ -10188,11 +11460,11 @@ var TabList = (0, import_react115.forwardRef)(
|
|
|
10188
11460
|
setHasTabFocus
|
|
10189
11461
|
} = useTabsContext();
|
|
10190
11462
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
10191
|
-
const childrenArray =
|
|
11463
|
+
const childrenArray = import_react116.Children.toArray(children).length;
|
|
10192
11464
|
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
10193
11465
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
10194
|
-
const tabListChildren =
|
|
10195
|
-
return (0,
|
|
11466
|
+
const tabListChildren = import_react116.Children.map(children, (child, index) => {
|
|
11467
|
+
return (0, import_react116.isValidElement)(child) && (0, import_react116.cloneElement)(child, {
|
|
10196
11468
|
id: `${tabsId}-tab-${index}`,
|
|
10197
11469
|
"aria-controls": `${tabsId}-panel-${index}`,
|
|
10198
11470
|
active: activeTab === index,
|
|
@@ -10202,7 +11474,7 @@ var TabList = (0, import_react115.forwardRef)(
|
|
|
10202
11474
|
onClick: () => handleTabChange(index)
|
|
10203
11475
|
});
|
|
10204
11476
|
});
|
|
10205
|
-
const [widths, setWidths] = (0,
|
|
11477
|
+
const [widths, setWidths] = (0, import_react116.useState)([]);
|
|
10206
11478
|
const handleOnFocus = (event) => {
|
|
10207
11479
|
setHasTabFocus(true);
|
|
10208
11480
|
onFocus && onFocus(event);
|
|
@@ -10246,9 +11518,9 @@ var TabList = (0, import_react115.forwardRef)(
|
|
|
10246
11518
|
TabList.displayName = "TabList";
|
|
10247
11519
|
|
|
10248
11520
|
// src/components/Tabs/TabPanel.tsx
|
|
10249
|
-
var
|
|
11521
|
+
var import_react117 = require("react");
|
|
10250
11522
|
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
10251
|
-
var TabPanel = (0,
|
|
11523
|
+
var TabPanel = (0, import_react117.forwardRef)(
|
|
10252
11524
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
10253
11525
|
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
10254
11526
|
"div",
|
|
@@ -10275,15 +11547,15 @@ var TabPanel = (0, import_react116.forwardRef)(
|
|
|
10275
11547
|
TabPanel.displayName = "TabPanel";
|
|
10276
11548
|
|
|
10277
11549
|
// src/components/Tabs/TabPanels.tsx
|
|
10278
|
-
var
|
|
11550
|
+
var import_react118 = require("react");
|
|
10279
11551
|
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
10280
|
-
var TabPanels = (0,
|
|
11552
|
+
var TabPanels = (0, import_react118.forwardRef)(
|
|
10281
11553
|
({ children, ...rest }, ref) => {
|
|
10282
11554
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
10283
11555
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
10284
|
-
const panelChildren =
|
|
11556
|
+
const panelChildren = import_react118.Children.map(children, (child, index) => {
|
|
10285
11557
|
const active = index === activeTab;
|
|
10286
|
-
return (0,
|
|
11558
|
+
return (0, import_react118.isValidElement)(child) && (0, import_react118.cloneElement)(child, {
|
|
10287
11559
|
id: `${tabsId}-panel-${index}`,
|
|
10288
11560
|
"aria-labelledby": `${tabsId}-tab-${index}`,
|
|
10289
11561
|
active,
|
|
@@ -10296,7 +11568,7 @@ var TabPanels = (0, import_react117.forwardRef)(
|
|
|
10296
11568
|
TabPanels.displayName = "TabPanels";
|
|
10297
11569
|
|
|
10298
11570
|
// src/components/Tag/Tag.tsx
|
|
10299
|
-
var
|
|
11571
|
+
var import_react119 = require("react");
|
|
10300
11572
|
|
|
10301
11573
|
// src/components/Tag/Tag.module.css
|
|
10302
11574
|
var Tag_default = {
|
|
@@ -10333,7 +11605,7 @@ var purposeVariants3 = {
|
|
|
10333
11605
|
icon: void 0
|
|
10334
11606
|
}
|
|
10335
11607
|
};
|
|
10336
|
-
var Tag = (0,
|
|
11608
|
+
var Tag = (0, import_react119.forwardRef)((props, ref) => {
|
|
10337
11609
|
const {
|
|
10338
11610
|
text,
|
|
10339
11611
|
purpose = "default",
|
|
@@ -10373,10 +11645,10 @@ Tag.displayName = "Tag";
|
|
|
10373
11645
|
|
|
10374
11646
|
// src/components/TextInput/TextInput.tsx
|
|
10375
11647
|
var import_dds_design_tokens18 = require("@norges-domstoler/dds-design-tokens");
|
|
10376
|
-
var
|
|
11648
|
+
var import_react121 = require("react");
|
|
10377
11649
|
|
|
10378
11650
|
// src/components/TextInput/CharCounter.tsx
|
|
10379
|
-
var
|
|
11651
|
+
var import_react120 = require("react");
|
|
10380
11652
|
|
|
10381
11653
|
// src/components/TextInput/TextInput.module.css
|
|
10382
11654
|
var TextInput_default = {
|
|
@@ -10404,7 +11676,7 @@ var TextInput_default = {
|
|
|
10404
11676
|
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
10405
11677
|
function CharCounter(props) {
|
|
10406
11678
|
const { current, max, id, className, htmlProps, ...rest } = props;
|
|
10407
|
-
const generatedId = (0,
|
|
11679
|
+
const generatedId = (0, import_react120.useId)();
|
|
10408
11680
|
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
10409
11681
|
return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(
|
|
10410
11682
|
Typography,
|
|
@@ -10430,7 +11702,7 @@ var CharCounter_default = CharCounter;
|
|
|
10430
11702
|
|
|
10431
11703
|
// src/components/TextInput/TextInput.tsx
|
|
10432
11704
|
var import_jsx_runtime274 = require("react/jsx-runtime");
|
|
10433
|
-
var TextInput = (0,
|
|
11705
|
+
var TextInput = (0, import_react121.forwardRef)(
|
|
10434
11706
|
({
|
|
10435
11707
|
label,
|
|
10436
11708
|
disabled,
|
|
@@ -10452,39 +11724,39 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10452
11724
|
"aria-required": ariaRequired,
|
|
10453
11725
|
"aria-describedby": ariaDescribedby,
|
|
10454
11726
|
icon: icon2,
|
|
10455
|
-
prefix:
|
|
11727
|
+
prefix: prefix3,
|
|
10456
11728
|
suffix,
|
|
10457
11729
|
...rest
|
|
10458
11730
|
}, ref) => {
|
|
10459
|
-
const [text, setText] = (0,
|
|
11731
|
+
const [text, setText] = (0, import_react121.useState)(
|
|
10460
11732
|
getDefaultText(value, defaultValue)
|
|
10461
11733
|
);
|
|
10462
|
-
const prefixRef = (0,
|
|
10463
|
-
const suffixRef = (0,
|
|
10464
|
-
const [prefixLength, setPrefixLength] = (0,
|
|
10465
|
-
const [suffixLength, setSuffixLength] = (0,
|
|
10466
|
-
(0,
|
|
11734
|
+
const prefixRef = (0, import_react121.useRef)(null);
|
|
11735
|
+
const suffixRef = (0, import_react121.useRef)(null);
|
|
11736
|
+
const [prefixLength, setPrefixLength] = (0, import_react121.useState)(0);
|
|
11737
|
+
const [suffixLength, setSuffixLength] = (0, import_react121.useState)(0);
|
|
11738
|
+
(0, import_react121.useLayoutEffect)(() => {
|
|
10467
11739
|
if (prefixRef.current) {
|
|
10468
11740
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
10469
11741
|
}
|
|
10470
11742
|
if (suffixRef.current) {
|
|
10471
11743
|
setSuffixLength(suffixRef.current.offsetWidth);
|
|
10472
11744
|
}
|
|
10473
|
-
}, [
|
|
11745
|
+
}, [prefix3, suffix, readOnly]);
|
|
10474
11746
|
const onChangeHandler = (event) => {
|
|
10475
11747
|
setText(event.target.value);
|
|
10476
11748
|
if (onChange) {
|
|
10477
11749
|
onChange(event);
|
|
10478
11750
|
}
|
|
10479
11751
|
};
|
|
10480
|
-
const generatedId = (0,
|
|
11752
|
+
const generatedId = (0, import_react121.useId)();
|
|
10481
11753
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
10482
11754
|
const hasErrorMessage = !!errorMessage;
|
|
10483
11755
|
const hasTip = !!tip;
|
|
10484
11756
|
const hasLabel = !!label;
|
|
10485
11757
|
const hasMessage = hasErrorMessage || hasTip || !!maxLength;
|
|
10486
11758
|
const hasIcon = !!icon2;
|
|
10487
|
-
const hasAffix = !!(
|
|
11759
|
+
const hasAffix = !!(prefix3 != null ? prefix3 : suffix);
|
|
10488
11760
|
const hasCharCounter = !!maxLength && Number.isInteger(maxLength) && maxLength > 0 && withCharacterCounter;
|
|
10489
11761
|
const characterCounterId = derivativeIdGenerator(
|
|
10490
11762
|
uniqueId,
|
|
@@ -10541,7 +11813,7 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10541
11813
|
] });
|
|
10542
11814
|
} else if (hasAffix) {
|
|
10543
11815
|
extendedInput = /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)("div", { className: TextInput_default["affix-container"], children: [
|
|
10544
|
-
|
|
11816
|
+
prefix3 && /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
10545
11817
|
"span",
|
|
10546
11818
|
{
|
|
10547
11819
|
ref: prefixRef,
|
|
@@ -10551,7 +11823,7 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10551
11823
|
TextInput_default.prefix,
|
|
10552
11824
|
readOnly && TextInput_default["prefix--readonly"]
|
|
10553
11825
|
),
|
|
10554
|
-
children:
|
|
11826
|
+
children: prefix3
|
|
10555
11827
|
}
|
|
10556
11828
|
),
|
|
10557
11829
|
/* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
@@ -10623,14 +11895,14 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10623
11895
|
TextInput.displayName = "TextInput";
|
|
10624
11896
|
|
|
10625
11897
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
10626
|
-
var
|
|
11898
|
+
var import_react123 = require("react");
|
|
10627
11899
|
|
|
10628
11900
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
10629
|
-
var
|
|
10630
|
-
var ToggleBarContext = (0,
|
|
11901
|
+
var import_react122 = require("react");
|
|
11902
|
+
var ToggleBarContext = (0, import_react122.createContext)({
|
|
10631
11903
|
size: "medium"
|
|
10632
11904
|
});
|
|
10633
|
-
var useToggleBarContext = () => (0,
|
|
11905
|
+
var useToggleBarContext = () => (0, import_react122.useContext)(ToggleBarContext);
|
|
10634
11906
|
|
|
10635
11907
|
// src/components/ToggleBar/ToggleBar.module.css
|
|
10636
11908
|
var ToggleBar_default = {
|
|
@@ -10664,9 +11936,9 @@ var ToggleBar = (props) => {
|
|
|
10664
11936
|
id,
|
|
10665
11937
|
...rest
|
|
10666
11938
|
} = props;
|
|
10667
|
-
const generatedId = (0,
|
|
11939
|
+
const generatedId = (0, import_react123.useId)();
|
|
10668
11940
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
10669
|
-
const [groupValue, setGroupValue] = (0,
|
|
11941
|
+
const [groupValue, setGroupValue] = (0, import_react123.useState)(value);
|
|
10670
11942
|
const handleChange = combineHandlers(
|
|
10671
11943
|
(e) => setGroupValue(e.target.value),
|
|
10672
11944
|
(e) => onChange && onChange(e, e.target.value)
|
|
@@ -10705,7 +11977,7 @@ var ToggleBar = (props) => {
|
|
|
10705
11977
|
ToggleBar.displayName = "ToggleBar";
|
|
10706
11978
|
|
|
10707
11979
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
10708
|
-
var
|
|
11980
|
+
var import_react124 = require("react");
|
|
10709
11981
|
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
10710
11982
|
var typographyTypes5 = {
|
|
10711
11983
|
large: "bodySans04",
|
|
@@ -10714,8 +11986,7 @@ var typographyTypes5 = {
|
|
|
10714
11986
|
tiny: "supportingStyleTiny01"
|
|
10715
11987
|
};
|
|
10716
11988
|
var calculateChecked = (value, group, checked) => {
|
|
10717
|
-
if (typeof checked !== "undefined")
|
|
10718
|
-
return checked;
|
|
11989
|
+
if (typeof checked !== "undefined") return checked;
|
|
10719
11990
|
if (typeof value !== "undefined" && value !== null && group) {
|
|
10720
11991
|
if (typeof value === "number") {
|
|
10721
11992
|
return value === Number(group == null ? void 0 : group.value);
|
|
@@ -10724,7 +11995,7 @@ var calculateChecked = (value, group, checked) => {
|
|
|
10724
11995
|
}
|
|
10725
11996
|
return !!value;
|
|
10726
11997
|
};
|
|
10727
|
-
var ToggleRadio = (0,
|
|
11998
|
+
var ToggleRadio = (0, import_react124.forwardRef)(
|
|
10728
11999
|
(props, ref) => {
|
|
10729
12000
|
const {
|
|
10730
12001
|
value,
|
|
@@ -10740,7 +12011,7 @@ var ToggleRadio = (0, import_react123.forwardRef)(
|
|
|
10740
12011
|
id,
|
|
10741
12012
|
...rest
|
|
10742
12013
|
} = props;
|
|
10743
|
-
const generatedId = (0,
|
|
12014
|
+
const generatedId = (0, import_react124.useId)();
|
|
10744
12015
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
10745
12016
|
const group = useToggleBarContext();
|
|
10746
12017
|
const handleChange = (event) => {
|
|
@@ -10794,7 +12065,7 @@ var ToggleRadio = (0, import_react123.forwardRef)(
|
|
|
10794
12065
|
ToggleRadio.displayName = "ToggleRadio";
|
|
10795
12066
|
|
|
10796
12067
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
10797
|
-
var
|
|
12068
|
+
var import_react125 = require("react");
|
|
10798
12069
|
|
|
10799
12070
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
10800
12071
|
var ToggleButton_default = {
|
|
@@ -10808,9 +12079,9 @@ var ToggleButton_default = {
|
|
|
10808
12079
|
|
|
10809
12080
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
10810
12081
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
10811
|
-
var ToggleButton = (0,
|
|
12082
|
+
var ToggleButton = (0, import_react125.forwardRef)(
|
|
10812
12083
|
({ id, label, icon: icon2, className, htmlProps, ...rest }, ref) => {
|
|
10813
|
-
const generatedId = (0,
|
|
12084
|
+
const generatedId = (0, import_react125.useId)();
|
|
10814
12085
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
10815
12086
|
return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("label", { htmlFor: uniqueId, className: ToggleButton_default.container, children: [
|
|
10816
12087
|
/* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
|
|
@@ -10851,7 +12122,7 @@ var ToggleButton = (0, import_react124.forwardRef)(
|
|
|
10851
12122
|
ToggleButton.displayName = "ToggleButton";
|
|
10852
12123
|
|
|
10853
12124
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
10854
|
-
var
|
|
12125
|
+
var import_react126 = require("react");
|
|
10855
12126
|
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
10856
12127
|
var ToggleButtonGroup = (props) => {
|
|
10857
12128
|
const {
|
|
@@ -10864,7 +12135,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
10864
12135
|
htmlProps,
|
|
10865
12136
|
...rest
|
|
10866
12137
|
} = props;
|
|
10867
|
-
const generatedId = (0,
|
|
12138
|
+
const generatedId = (0, import_react126.useId)();
|
|
10868
12139
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
10869
12140
|
return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
|
|
10870
12141
|
"div",
|