@norges-domstoler/dds-components 0.0.0-dev-20240605061318 → 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 +1739 -446
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1377 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -8
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, {
|
|
@@ -531,7 +572,7 @@ var getFormInputIconSize = (componentSize) => {
|
|
|
531
572
|
};
|
|
532
573
|
|
|
533
574
|
// src/utils/idGenerator.tsx
|
|
534
|
-
var derivativeIdGenerator = (
|
|
575
|
+
var derivativeIdGenerator = (prefix3, suffix) => `${prefix3}-${suffix}`;
|
|
535
576
|
var spaceSeparatedIdListGenerator = (values) => {
|
|
536
577
|
const filtered = values.filter(Boolean);
|
|
537
578
|
return filtered.length > 0 ? filtered.join(" ") : void 0;
|
|
@@ -2433,7 +2474,7 @@ var useFloatPosition = (arrowRef, options = {}) => {
|
|
|
2433
2474
|
offset = defaultOffset,
|
|
2434
2475
|
placement = "bottom"
|
|
2435
2476
|
} = options;
|
|
2436
|
-
const
|
|
2477
|
+
const middleware2 = [
|
|
2437
2478
|
(0, import_react_dom.offset)(offset),
|
|
2438
2479
|
(0, import_react_dom.flip)(),
|
|
2439
2480
|
(0, import_react_dom.shift)(),
|
|
@@ -2441,15 +2482,15 @@ var useFloatPosition = (arrowRef, options = {}) => {
|
|
|
2441
2482
|
...arrowRef ? [(0, import_react_dom.arrow)({ element: arrowRef })] : []
|
|
2442
2483
|
];
|
|
2443
2484
|
const {
|
|
2444
|
-
x,
|
|
2445
|
-
y,
|
|
2485
|
+
x: x2,
|
|
2486
|
+
y: y2,
|
|
2446
2487
|
strategy,
|
|
2447
2488
|
middlewareData,
|
|
2448
2489
|
placement: actualPlacement,
|
|
2449
2490
|
refs
|
|
2450
2491
|
} = (0, import_react_dom.useFloating)({
|
|
2451
2492
|
placement,
|
|
2452
|
-
middleware,
|
|
2493
|
+
middleware: middleware2,
|
|
2453
2494
|
whileElementsMounted: (reference, floating, update) => (0, import_react_dom.autoUpdate)(reference, floating, update, { animationFrame })
|
|
2454
2495
|
});
|
|
2455
2496
|
return {
|
|
@@ -2457,8 +2498,8 @@ var useFloatPosition = (arrowRef, options = {}) => {
|
|
|
2457
2498
|
styles: {
|
|
2458
2499
|
floating: {
|
|
2459
2500
|
position: strategy,
|
|
2460
|
-
top:
|
|
2461
|
-
left:
|
|
2501
|
+
top: y2 != null ? y2 : "",
|
|
2502
|
+
left: x2 != null ? x2 : ""
|
|
2462
2503
|
},
|
|
2463
2504
|
arrow: middlewareData.arrow ? getArrowStyling(strategy, actualPlacement, middlewareData.arrow) : void 0
|
|
2464
2505
|
}
|
|
@@ -2655,12 +2696,12 @@ function useRoveFocus(size2, active, direction = "column") {
|
|
|
2655
2696
|
if (!size2 || !isKeyboardEvent(e)) return;
|
|
2656
2697
|
if (e.key === nextKey) {
|
|
2657
2698
|
e.preventDefault();
|
|
2658
|
-
setCurrentFocusIndex((
|
|
2699
|
+
setCurrentFocusIndex((prev2) => prev2 === size2 - 1 ? 0 : prev2 + 1);
|
|
2659
2700
|
} else if (e.key === previousKey) {
|
|
2660
2701
|
e.preventDefault();
|
|
2661
|
-
setCurrentFocusIndex((
|
|
2662
|
-
if (
|
|
2663
|
-
return
|
|
2702
|
+
setCurrentFocusIndex((prev2) => {
|
|
2703
|
+
if (prev2 === -1 || prev2 === 0) return size2 - 1;
|
|
2704
|
+
return prev2 - 1;
|
|
2664
2705
|
});
|
|
2665
2706
|
}
|
|
2666
2707
|
},
|
|
@@ -3127,10 +3168,1262 @@ var selection = {
|
|
|
3127
3168
|
backgroundColor: import_dds_design_tokens10.ddsTokens.DdsColorSurfaceHighlightedDefault
|
|
3128
3169
|
};
|
|
3129
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
|
+
|
|
3130
4424
|
// src/components/helpers/styling/visibilityTransition.tsx
|
|
3131
|
-
var import_styled_components = require("styled-components");
|
|
3132
4425
|
var visibilityTransition = (open) => {
|
|
3133
|
-
return
|
|
4426
|
+
return ct`
|
|
3134
4427
|
@media (prefers-reduced-motion: no-preference) {
|
|
3135
4428
|
transition:
|
|
3136
4429
|
visibility 0.4s,
|
|
@@ -3142,7 +4435,7 @@ var visibilityTransition = (open) => {
|
|
|
3142
4435
|
};
|
|
3143
4436
|
|
|
3144
4437
|
// src/components/BackLink/BackLink.tsx
|
|
3145
|
-
var
|
|
4438
|
+
var import_react22 = require("react");
|
|
3146
4439
|
|
|
3147
4440
|
// src/components/BackLink/BackLink.module.css
|
|
3148
4441
|
var BackLink_default = {
|
|
@@ -3151,7 +4444,7 @@ var BackLink_default = {
|
|
|
3151
4444
|
|
|
3152
4445
|
// src/components/BackLink/BackLink.tsx
|
|
3153
4446
|
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
3154
|
-
var BackLink = (0,
|
|
4447
|
+
var BackLink = (0, import_react22.forwardRef)((props, ref) => {
|
|
3155
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: [
|
|
3156
4449
|
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Icon, { icon: ArrowLeftIcon, iconSize: "small" }),
|
|
3157
4450
|
props.label
|
|
@@ -3160,12 +4453,12 @@ var BackLink = (0, import_react21.forwardRef)((props, ref) => {
|
|
|
3160
4453
|
BackLink.displayName = "BackLink";
|
|
3161
4454
|
|
|
3162
4455
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
3163
|
-
var
|
|
4456
|
+
var import_react23 = require("react");
|
|
3164
4457
|
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
3165
4458
|
var isAnchorTypographyProps = (props) => {
|
|
3166
4459
|
return props.href != void 0;
|
|
3167
4460
|
};
|
|
3168
|
-
var Breadcrumb = (0,
|
|
4461
|
+
var Breadcrumb = (0, import_react23.forwardRef)(
|
|
3169
4462
|
(props, ref) => {
|
|
3170
4463
|
const { children, ...rest } = props;
|
|
3171
4464
|
if (isAnchorTypographyProps(props)) {
|
|
@@ -3177,7 +4470,7 @@ var Breadcrumb = (0, import_react22.forwardRef)(
|
|
|
3177
4470
|
Breadcrumb.displayName = "Breadcrumb";
|
|
3178
4471
|
|
|
3179
4472
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
3180
|
-
var
|
|
4473
|
+
var import_react30 = require("react");
|
|
3181
4474
|
|
|
3182
4475
|
// src/components/Breadcrumbs/Breadcrumbs.module.css
|
|
3183
4476
|
var Breadcrumbs_default = {
|
|
@@ -3189,7 +4482,7 @@ var Breadcrumbs_default = {
|
|
|
3189
4482
|
|
|
3190
4483
|
// src/components/Button/Button.tsx
|
|
3191
4484
|
var import_dds_design_tokens12 = require("@norges-domstoler/dds-design-tokens");
|
|
3192
|
-
var
|
|
4485
|
+
var import_react25 = require("react");
|
|
3193
4486
|
|
|
3194
4487
|
// src/components/Button/Button.module.css
|
|
3195
4488
|
var Button_default = {
|
|
@@ -3261,7 +4554,7 @@ var buttonTokens = {
|
|
|
3261
4554
|
};
|
|
3262
4555
|
|
|
3263
4556
|
// src/components/Spinner/Spinner.tsx
|
|
3264
|
-
var
|
|
4557
|
+
var import_react24 = require("react");
|
|
3265
4558
|
|
|
3266
4559
|
// src/components/Spinner/Spinner.module.css
|
|
3267
4560
|
var Spinner_default = {
|
|
@@ -3283,10 +4576,10 @@ function Spinner(props) {
|
|
|
3283
4576
|
htmlProps,
|
|
3284
4577
|
...rest
|
|
3285
4578
|
} = props;
|
|
3286
|
-
const mountTime = (0,
|
|
4579
|
+
const mountTime = (0, import_react24.useRef)(Date.now());
|
|
3287
4580
|
const outerAnimationDelay = -(mountTime.current % 2e3);
|
|
3288
4581
|
const innerAnimationDelay = -(mountTime.current % 1500);
|
|
3289
|
-
const generatedId = (0,
|
|
4582
|
+
const generatedId = (0, import_react24.useId)();
|
|
3290
4583
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
3291
4584
|
return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
|
|
3292
4585
|
"svg",
|
|
@@ -3333,7 +4626,7 @@ var typographyTypes = {
|
|
|
3333
4626
|
tiny: "supportingStyleTiny01"
|
|
3334
4627
|
};
|
|
3335
4628
|
var { button: button2 } = buttonTokens;
|
|
3336
|
-
var Button = (0,
|
|
4629
|
+
var Button = (0, import_react25.forwardRef)(
|
|
3337
4630
|
(props, ref) => {
|
|
3338
4631
|
const {
|
|
3339
4632
|
children,
|
|
@@ -3448,7 +4741,7 @@ Button.displayName = "Button";
|
|
|
3448
4741
|
|
|
3449
4742
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
3450
4743
|
var import_dds_design_tokens13 = require("@norges-domstoler/dds-design-tokens");
|
|
3451
|
-
var
|
|
4744
|
+
var import_react28 = require("react");
|
|
3452
4745
|
|
|
3453
4746
|
// src/components/OverflowMenu/OverflowMenu.module.css
|
|
3454
4747
|
var OverflowMenu_default = {
|
|
@@ -3461,11 +4754,11 @@ var OverflowMenu_default = {
|
|
|
3461
4754
|
};
|
|
3462
4755
|
|
|
3463
4756
|
// src/components/OverflowMenu/OverflowMenuItem.tsx
|
|
3464
|
-
var
|
|
4757
|
+
var import_react26 = require("react");
|
|
3465
4758
|
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
3466
4759
|
var isAnchorProps2 = (props) => props.href !== void 0;
|
|
3467
4760
|
var isButtonProps = (props) => props.href === void 0 && props.onClick !== void 0;
|
|
3468
|
-
var OverflowMenuItem = (0,
|
|
4761
|
+
var OverflowMenuItem = (0, import_react26.forwardRef)((props, ref) => {
|
|
3469
4762
|
const { title, icon: icon2, focus, id, className, htmlProps = {}, ...rest } = props;
|
|
3470
4763
|
let href;
|
|
3471
4764
|
let onClick;
|
|
@@ -3474,9 +4767,9 @@ var OverflowMenuItem = (0, import_react25.forwardRef)((props, ref) => {
|
|
|
3474
4767
|
} else if (isButtonProps(props)) {
|
|
3475
4768
|
onClick = props.onClick;
|
|
3476
4769
|
}
|
|
3477
|
-
const itemRef = (0,
|
|
4770
|
+
const itemRef = (0, import_react26.useRef)(null);
|
|
3478
4771
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
3479
|
-
(0,
|
|
4772
|
+
(0, import_react26.useEffect)(() => {
|
|
3480
4773
|
var _a;
|
|
3481
4774
|
if (focus) {
|
|
3482
4775
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
@@ -3541,7 +4834,7 @@ var OverflowMenuItem = (0, import_react25.forwardRef)((props, ref) => {
|
|
|
3541
4834
|
OverflowMenuItem.displayName = "OverflowMenuItem";
|
|
3542
4835
|
|
|
3543
4836
|
// src/components/Divider/Divider.tsx
|
|
3544
|
-
var
|
|
4837
|
+
var import_react27 = require("react");
|
|
3545
4838
|
|
|
3546
4839
|
// src/components/Divider/Divider.module.css
|
|
3547
4840
|
var Divider_default = {
|
|
@@ -3553,7 +4846,7 @@ var Divider_default = {
|
|
|
3553
4846
|
|
|
3554
4847
|
// src/components/Divider/Divider.tsx
|
|
3555
4848
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
3556
|
-
var Divider = (0,
|
|
4849
|
+
var Divider = (0, import_react27.forwardRef)((props, ref) => {
|
|
3557
4850
|
const { color = "default", id, className, htmlProps, ...rest } = props;
|
|
3558
4851
|
const colorCn = color === "default" || color === "subtle" ? color : "on-inverse";
|
|
3559
4852
|
const lineProps = {
|
|
@@ -3571,7 +4864,7 @@ Divider.displayName = "Divider";
|
|
|
3571
4864
|
|
|
3572
4865
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
3573
4866
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
3574
|
-
var OverflowMenu = (0,
|
|
4867
|
+
var OverflowMenu = (0, import_react28.forwardRef)(
|
|
3575
4868
|
(props, ref) => {
|
|
3576
4869
|
var _a, _b;
|
|
3577
4870
|
const {
|
|
@@ -3594,7 +4887,7 @@ var OverflowMenu = (0, import_react27.forwardRef)(
|
|
|
3594
4887
|
offset
|
|
3595
4888
|
});
|
|
3596
4889
|
const combinedRef = useCombinedRef(ref, refs.setFloating);
|
|
3597
|
-
(0,
|
|
4890
|
+
(0, import_react28.useEffect)(() => {
|
|
3598
4891
|
anchorRef ? refs.setReference(anchorRef.current) : refs.setReference(null);
|
|
3599
4892
|
}, [anchorRef]);
|
|
3600
4893
|
useOnClickOutside(
|
|
@@ -3667,7 +4960,7 @@ var OverflowMenu = (0, import_react27.forwardRef)(
|
|
|
3667
4960
|
}
|
|
3668
4961
|
};
|
|
3669
4962
|
const { style = {}, ...restHTMLProps } = htmlProps;
|
|
3670
|
-
const generatedId = (0,
|
|
4963
|
+
const generatedId = (0, import_react28.useId)();
|
|
3671
4964
|
return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
|
|
3672
4965
|
Paper,
|
|
3673
4966
|
{
|
|
@@ -3699,7 +4992,7 @@ var OverflowMenu = (0, import_react27.forwardRef)(
|
|
|
3699
4992
|
OverflowMenu.displayName = "OverflowMenu";
|
|
3700
4993
|
|
|
3701
4994
|
// src/components/OverflowMenu/OverflowMenuGroup.tsx
|
|
3702
|
-
var
|
|
4995
|
+
var import_react29 = require("react");
|
|
3703
4996
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
3704
4997
|
var OverflowMenuGroup = ({
|
|
3705
4998
|
children,
|
|
@@ -3708,11 +5001,11 @@ var OverflowMenuGroup = ({
|
|
|
3708
5001
|
onOpen,
|
|
3709
5002
|
overflowMenuId
|
|
3710
5003
|
}) => {
|
|
3711
|
-
const [isOpen, setIsOpen] = (0,
|
|
5004
|
+
const [isOpen, setIsOpen] = (0, import_react29.useState)(false);
|
|
3712
5005
|
const toggle = () => setIsOpen(!isOpen);
|
|
3713
5006
|
const close = () => setIsOpen(false);
|
|
3714
|
-
const buttonRef = (0,
|
|
3715
|
-
const generatedId = (0,
|
|
5007
|
+
const buttonRef = (0, import_react29.useRef)(null);
|
|
5008
|
+
const generatedId = (0, import_react29.useId)();
|
|
3716
5009
|
const uniqueOverflowMenuId = overflowMenuId != null ? overflowMenuId : `${generatedId}-overflowMenu`;
|
|
3717
5010
|
const handleClose = () => {
|
|
3718
5011
|
onClose && onClose();
|
|
@@ -3724,14 +5017,14 @@ var OverflowMenuGroup = ({
|
|
|
3724
5017
|
onToggle && onToggle();
|
|
3725
5018
|
toggle();
|
|
3726
5019
|
};
|
|
3727
|
-
const Children8 =
|
|
3728
|
-
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, {
|
|
3729
5022
|
"aria-haspopup": "menu",
|
|
3730
5023
|
"aria-controls": uniqueOverflowMenuId,
|
|
3731
5024
|
"aria-expanded": isOpen,
|
|
3732
5025
|
onClick: handleToggle,
|
|
3733
5026
|
ref: buttonRef
|
|
3734
|
-
}) : (0,
|
|
5027
|
+
}) : (0, import_react29.cloneElement)(child, {
|
|
3735
5028
|
isOpen,
|
|
3736
5029
|
id: uniqueOverflowMenuId,
|
|
3737
5030
|
onClose: handleClose,
|
|
@@ -3745,7 +5038,7 @@ OverflowMenuGroup.displayName = "OverflowMenuGroup";
|
|
|
3745
5038
|
|
|
3746
5039
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
3747
5040
|
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
3748
|
-
var Breadcrumbs = (0,
|
|
5041
|
+
var Breadcrumbs = (0, import_react30.forwardRef)(
|
|
3749
5042
|
(props, ref) => {
|
|
3750
5043
|
const { children, smallScreen, id, className, htmlProps, ...rest } = props;
|
|
3751
5044
|
const chevronIcon = /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
@@ -3756,7 +5049,7 @@ var Breadcrumbs = (0, import_react29.forwardRef)(
|
|
|
3756
5049
|
icon: ChevronRightIcon
|
|
3757
5050
|
}
|
|
3758
5051
|
);
|
|
3759
|
-
const childrenArray =
|
|
5052
|
+
const childrenArray = import_react30.Children.toArray(children);
|
|
3760
5053
|
const listItemCn = cn(
|
|
3761
5054
|
Breadcrumbs_default["list-item"],
|
|
3762
5055
|
!smallScreen && Breadcrumbs_default[`list-item--large-screen`]
|
|
@@ -3768,7 +5061,7 @@ var Breadcrumbs = (0, import_react29.forwardRef)(
|
|
|
3768
5061
|
] }, `breadcrumb-${index}`);
|
|
3769
5062
|
});
|
|
3770
5063
|
const breadcrumbChildrenTruncated = childrenArray.length > 2 ? childrenArray.slice(1, childrenArray.length - 1).map((item) => {
|
|
3771
|
-
if ((0,
|
|
5064
|
+
if ((0, import_react30.isValidElement)(item))
|
|
3772
5065
|
return {
|
|
3773
5066
|
title: item.props.children,
|
|
3774
5067
|
href: item.props.href
|
|
@@ -3810,7 +5103,7 @@ var Breadcrumbs = (0, import_react29.forwardRef)(
|
|
|
3810
5103
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
3811
5104
|
|
|
3812
5105
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
3813
|
-
var
|
|
5106
|
+
var import_react31 = require("react");
|
|
3814
5107
|
|
|
3815
5108
|
// src/components/ButtonGroup/ButtonGroup.module.css
|
|
3816
5109
|
var ButtonGroup_default = {
|
|
@@ -3821,7 +5114,7 @@ var ButtonGroup_default = {
|
|
|
3821
5114
|
|
|
3822
5115
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
3823
5116
|
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
3824
|
-
var ButtonGroup = (0,
|
|
5117
|
+
var ButtonGroup = (0, import_react31.forwardRef)(
|
|
3825
5118
|
(props, ref) => {
|
|
3826
5119
|
const {
|
|
3827
5120
|
children,
|
|
@@ -3833,8 +5126,8 @@ var ButtonGroup = (0, import_react30.forwardRef)(
|
|
|
3833
5126
|
role = "group",
|
|
3834
5127
|
...rest
|
|
3835
5128
|
} = props;
|
|
3836
|
-
const Children8 =
|
|
3837
|
-
return (0,
|
|
5129
|
+
const Children8 = import_react31.Children.map(children, (child) => {
|
|
5130
|
+
return (0, import_react31.isValidElement)(child) && (0, import_react31.cloneElement)(child, {
|
|
3838
5131
|
purpose: "secondary",
|
|
3839
5132
|
size: buttonSize
|
|
3840
5133
|
});
|
|
@@ -3907,12 +5200,12 @@ var Card = (props) => {
|
|
|
3907
5200
|
Card.displayName = "Card";
|
|
3908
5201
|
|
|
3909
5202
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
3910
|
-
var
|
|
5203
|
+
var import_react33 = require("react");
|
|
3911
5204
|
|
|
3912
5205
|
// src/components/Card/CardAccordion/CardAccordionContext.tsx
|
|
3913
|
-
var
|
|
5206
|
+
var import_react32 = require("react");
|
|
3914
5207
|
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
3915
|
-
var CardAccordionContext = (0,
|
|
5208
|
+
var CardAccordionContext = (0, import_react32.createContext)({});
|
|
3916
5209
|
var CardAccordionContextProvider = ({
|
|
3917
5210
|
children,
|
|
3918
5211
|
...values
|
|
@@ -3920,7 +5213,7 @@ var CardAccordionContextProvider = ({
|
|
|
3920
5213
|
return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(CardAccordionContext.Provider, { value: values, children });
|
|
3921
5214
|
};
|
|
3922
5215
|
var useCardAccordionContext = () => {
|
|
3923
|
-
const context = (0,
|
|
5216
|
+
const context = (0, import_react32.useContext)(CardAccordionContext);
|
|
3924
5217
|
if (!context) {
|
|
3925
5218
|
throw new Error(
|
|
3926
5219
|
"useCardAccordionContext must be used within a CardAccordionContextProvider. Have you wrapped <CardAccordionHeader> and <CardAccordionBody> inside a <CardAccordion>?"
|
|
@@ -3931,7 +5224,7 @@ var useCardAccordionContext = () => {
|
|
|
3931
5224
|
|
|
3932
5225
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
3933
5226
|
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
3934
|
-
var CardAccordion = (0,
|
|
5227
|
+
var CardAccordion = (0, import_react33.forwardRef)(
|
|
3935
5228
|
(props, ref) => {
|
|
3936
5229
|
const {
|
|
3937
5230
|
isExpanded = false,
|
|
@@ -3942,13 +5235,13 @@ var CardAccordion = (0, import_react32.forwardRef)(
|
|
|
3942
5235
|
htmlProps,
|
|
3943
5236
|
...rest
|
|
3944
5237
|
} = props;
|
|
3945
|
-
const [expanded, setExpanded] = (0,
|
|
3946
|
-
const generatedId = (0,
|
|
5238
|
+
const [expanded, setExpanded] = (0, import_react33.useState)(isExpanded);
|
|
5239
|
+
const generatedId = (0, import_react33.useId)();
|
|
3947
5240
|
const accordionId = id != null ? id : `${generatedId}-cardAccordion`;
|
|
3948
|
-
(0,
|
|
5241
|
+
(0, import_react33.useEffect)(() => {
|
|
3949
5242
|
setExpanded(isExpanded);
|
|
3950
5243
|
}, [isExpanded]);
|
|
3951
|
-
const toggleExpanded = (0,
|
|
5244
|
+
const toggleExpanded = (0, import_react33.useCallback)(() => {
|
|
3952
5245
|
setExpanded((prevExpanded) => {
|
|
3953
5246
|
const newExpanded = !prevExpanded;
|
|
3954
5247
|
if (onChange) {
|
|
@@ -3973,7 +5266,7 @@ CardAccordion.displayName = "CardAccordion";
|
|
|
3973
5266
|
|
|
3974
5267
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
3975
5268
|
var import_dds_design_tokens14 = require("@norges-domstoler/dds-design-tokens");
|
|
3976
|
-
var
|
|
5269
|
+
var import_react34 = require("react");
|
|
3977
5270
|
|
|
3978
5271
|
// src/components/Card/CardAccordion/CardAccordion.module.css
|
|
3979
5272
|
var CardAccordion_default = {
|
|
@@ -3989,7 +5282,7 @@ var CardAccordion_default = {
|
|
|
3989
5282
|
|
|
3990
5283
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
3991
5284
|
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
3992
|
-
var CardAccordionHeader = (0,
|
|
5285
|
+
var CardAccordionHeader = (0, import_react34.forwardRef)((props, ref) => {
|
|
3993
5286
|
const {
|
|
3994
5287
|
children,
|
|
3995
5288
|
className,
|
|
@@ -4057,13 +5350,13 @@ var CardAccordionHeader = (0, import_react33.forwardRef)((props, ref) => {
|
|
|
4057
5350
|
CardAccordionHeader.displayName = "CardAccordionHeader";
|
|
4058
5351
|
|
|
4059
5352
|
// src/components/Card/CardAccordion/CardAccordionBody.tsx
|
|
4060
|
-
var
|
|
5353
|
+
var import_react36 = require("react");
|
|
4061
5354
|
|
|
4062
5355
|
// src/components/Card/CardAccordion/useElementHeight.ts
|
|
4063
|
-
var
|
|
5356
|
+
var import_react35 = require("react");
|
|
4064
5357
|
function useElementHeight(element) {
|
|
4065
|
-
const [height, setHeight] = (0,
|
|
4066
|
-
(0,
|
|
5358
|
+
const [height, setHeight] = (0, import_react35.useState)(null);
|
|
5359
|
+
(0, import_react35.useEffect)(() => {
|
|
4067
5360
|
if (!element) return;
|
|
4068
5361
|
const resizeObserver = new ResizeObserver(() => {
|
|
4069
5362
|
setHeight(element.offsetHeight);
|
|
@@ -4076,21 +5369,21 @@ function useElementHeight(element) {
|
|
|
4076
5369
|
|
|
4077
5370
|
// src/components/Card/CardAccordion/CardAccordionBody.tsx
|
|
4078
5371
|
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
4079
|
-
var CardAccordionBody = (0,
|
|
5372
|
+
var CardAccordionBody = (0, import_react36.forwardRef)((props, ref) => {
|
|
4080
5373
|
var _a;
|
|
4081
5374
|
const { children, className, htmlProps, padding, ...rest } = props;
|
|
4082
5375
|
const { headerId, isExpanded, bodyId: id } = useCardAccordionContext();
|
|
4083
|
-
const bodyRef = (0,
|
|
4084
|
-
const [animate, setAnimate] = (0,
|
|
5376
|
+
const bodyRef = (0, import_react36.useRef)(null);
|
|
5377
|
+
const [animate, setAnimate] = (0, import_react36.useState)(false);
|
|
4085
5378
|
const isMounted = useIsMounted();
|
|
4086
5379
|
const height = useElementHeight(bodyRef.current);
|
|
4087
|
-
const [initialExpandedHeight, setIntialExpandedHeight] = (0,
|
|
4088
|
-
(0,
|
|
5380
|
+
const [initialExpandedHeight, setIntialExpandedHeight] = (0, import_react36.useState)(null);
|
|
5381
|
+
(0, import_react36.useLayoutEffect)(() => {
|
|
4089
5382
|
if (bodyRef.current && isExpanded) {
|
|
4090
5383
|
setIntialExpandedHeight(bodyRef.current.scrollHeight);
|
|
4091
5384
|
}
|
|
4092
5385
|
}, []);
|
|
4093
|
-
(0,
|
|
5386
|
+
(0, import_react36.useEffect)(() => {
|
|
4094
5387
|
if (isMounted()) {
|
|
4095
5388
|
setAnimate(true);
|
|
4096
5389
|
}
|
|
@@ -4138,7 +5431,7 @@ var CardAccordionBody = (0, import_react35.forwardRef)((props, ref) => {
|
|
|
4138
5431
|
CardAccordionBody.displayName = "CardAccordionBody";
|
|
4139
5432
|
|
|
4140
5433
|
// src/components/Chip/Chip.tsx
|
|
4141
|
-
var
|
|
5434
|
+
var import_react37 = require("react");
|
|
4142
5435
|
|
|
4143
5436
|
// src/components/Chip/Chip.module.css
|
|
4144
5437
|
var Chip_default = {
|
|
@@ -4148,10 +5441,10 @@ var Chip_default = {
|
|
|
4148
5441
|
|
|
4149
5442
|
// src/components/Chip/Chip.tsx
|
|
4150
5443
|
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
4151
|
-
var Chip = (0,
|
|
5444
|
+
var Chip = (0, import_react37.forwardRef)((props, ref) => {
|
|
4152
5445
|
const { text, onClose, id, className, htmlProps = {}, ...rest } = props;
|
|
4153
5446
|
const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
|
|
4154
|
-
const [isOpen, setIsOpen] = (0,
|
|
5447
|
+
const [isOpen, setIsOpen] = (0, import_react37.useState)(true);
|
|
4155
5448
|
const onClick = () => {
|
|
4156
5449
|
setIsOpen(false);
|
|
4157
5450
|
onClose && onClose();
|
|
@@ -4191,11 +5484,11 @@ var Chip = (0, import_react36.forwardRef)((props, ref) => {
|
|
|
4191
5484
|
Chip.displayName = "Chip";
|
|
4192
5485
|
|
|
4193
5486
|
// src/components/Chip/ChipGroup.tsx
|
|
4194
|
-
var
|
|
5487
|
+
var import_react38 = require("react");
|
|
4195
5488
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
4196
|
-
var ChipGroup = (0,
|
|
5489
|
+
var ChipGroup = (0, import_react38.forwardRef)(
|
|
4197
5490
|
({ children, className, ...rest }, ref) => {
|
|
4198
|
-
const childrenArray =
|
|
5491
|
+
const childrenArray = import_react38.Children.toArray(children);
|
|
4199
5492
|
return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
4200
5493
|
"ul",
|
|
4201
5494
|
{
|
|
@@ -4218,7 +5511,7 @@ var import_date4 = require("@internationalized/date");
|
|
|
4218
5511
|
var import_calendar3 = require("@react-aria/calendar");
|
|
4219
5512
|
var import_i18n2 = require("@react-aria/i18n");
|
|
4220
5513
|
var import_calendar4 = require("@react-stately/calendar");
|
|
4221
|
-
var
|
|
5514
|
+
var import_react41 = require("react");
|
|
4222
5515
|
|
|
4223
5516
|
// src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
|
|
4224
5517
|
var import_date3 = require("@internationalized/date");
|
|
@@ -4228,7 +5521,7 @@ var import_i18n = require("@react-aria/i18n");
|
|
|
4228
5521
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
4229
5522
|
var import_date = require("@internationalized/date");
|
|
4230
5523
|
var import_calendar = require("@react-aria/calendar");
|
|
4231
|
-
var
|
|
5524
|
+
var import_react40 = require("react");
|
|
4232
5525
|
|
|
4233
5526
|
// src/components/date-inputs/common/DateInput.module.css
|
|
4234
5527
|
var DateInput_default = {
|
|
@@ -4263,9 +5556,9 @@ var DateInput_default = {
|
|
|
4263
5556
|
};
|
|
4264
5557
|
|
|
4265
5558
|
// src/components/date-inputs/DatePicker/CalendarPopover.tsx
|
|
4266
|
-
var
|
|
5559
|
+
var import_react39 = require("react");
|
|
4267
5560
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
4268
|
-
var CalendarPopoverContext = (0,
|
|
5561
|
+
var CalendarPopoverContext = (0, import_react39.createContext)({
|
|
4269
5562
|
anchorRef: null,
|
|
4270
5563
|
isOpen: false,
|
|
4271
5564
|
onClose: () => null
|
|
@@ -4275,27 +5568,27 @@ var CalendarPopover = ({
|
|
|
4275
5568
|
isOpen,
|
|
4276
5569
|
onClose
|
|
4277
5570
|
}) => {
|
|
4278
|
-
const anchorRef = (0,
|
|
5571
|
+
const anchorRef = (0, import_react39.useRef)(null);
|
|
4279
5572
|
useOnKeyDown("Escape", onClose);
|
|
4280
5573
|
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(CalendarPopoverContext.Provider, { value: { anchorRef, isOpen, onClose }, children });
|
|
4281
5574
|
};
|
|
4282
5575
|
var CalendarPopoverAnchor = ({
|
|
4283
5576
|
children
|
|
4284
5577
|
}) => {
|
|
4285
|
-
const { anchorRef } = (0,
|
|
5578
|
+
const { anchorRef } = (0, import_react39.useContext)(CalendarPopoverContext);
|
|
4286
5579
|
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { ref: anchorRef != null ? anchorRef : void 0, children });
|
|
4287
5580
|
};
|
|
4288
5581
|
var CalendarPopoverContent = ({
|
|
4289
5582
|
children
|
|
4290
5583
|
}) => {
|
|
4291
|
-
const ref = (0,
|
|
5584
|
+
const ref = (0, import_react39.useRef)(null);
|
|
4292
5585
|
const { refs, styles: floatingStyles } = useFloatPosition(null, {
|
|
4293
5586
|
placement: "bottom-start"
|
|
4294
5587
|
});
|
|
4295
|
-
const { isOpen, onClose, anchorRef } = (0,
|
|
5588
|
+
const { isOpen, onClose, anchorRef } = (0, import_react39.useContext)(CalendarPopoverContext);
|
|
4296
5589
|
const combinedRef = useCombinedRef(refs.setFloating, ref);
|
|
4297
5590
|
useOnClickOutside(ref.current, onClose);
|
|
4298
|
-
(0,
|
|
5591
|
+
(0, import_react39.useEffect)(() => {
|
|
4299
5592
|
var _a;
|
|
4300
5593
|
refs.setReference((_a = anchorRef == null ? void 0 : anchorRef.current) != null ? _a : null);
|
|
4301
5594
|
}, []);
|
|
@@ -4318,7 +5611,7 @@ var timezone = "Europe/Oslo";
|
|
|
4318
5611
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
4319
5612
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
4320
5613
|
function CalendarCell({ date, state }) {
|
|
4321
|
-
const ref = (0,
|
|
5614
|
+
const ref = (0, import_react40.useRef)(null);
|
|
4322
5615
|
const {
|
|
4323
5616
|
buttonProps,
|
|
4324
5617
|
cellProps,
|
|
@@ -4331,7 +5624,7 @@ function CalendarCell({ date, state }) {
|
|
|
4331
5624
|
if (isDisabled) {
|
|
4332
5625
|
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("td", { ...cellProps });
|
|
4333
5626
|
}
|
|
4334
|
-
const { onClose } = (0,
|
|
5627
|
+
const { onClose } = (0, import_react40.useContext)(CalendarPopoverContext);
|
|
4335
5628
|
const variant = isSelected ? "selected" : isUnavailable || isDisabled ? "unavailable" : "default";
|
|
4336
5629
|
const closeOnKeyboardBlurForward = (event) => {
|
|
4337
5630
|
if (event.key === "Tab" && event.shiftKey === false) {
|
|
@@ -4437,7 +5730,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
4437
5730
|
}
|
|
4438
5731
|
),
|
|
4439
5732
|
datesInWeek.map(
|
|
4440
|
-
(date,
|
|
5733
|
+
(date, i2) => date ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(CalendarCell, { state, date }, i2) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("td", {}, i2)
|
|
4441
5734
|
)
|
|
4442
5735
|
] }, weekIndex);
|
|
4443
5736
|
}) })
|
|
@@ -4449,12 +5742,12 @@ CalendarGrid.displayName = "CalendarGrid";
|
|
|
4449
5742
|
|
|
4450
5743
|
// src/components/date-inputs/DatePicker/Calendar/Calendar.tsx
|
|
4451
5744
|
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
4452
|
-
function createCalendar(
|
|
4453
|
-
switch (
|
|
5745
|
+
function createCalendar(identifier2) {
|
|
5746
|
+
switch (identifier2) {
|
|
4454
5747
|
case "gregory":
|
|
4455
5748
|
return new import_date4.GregorianCalendar();
|
|
4456
5749
|
default:
|
|
4457
|
-
throw new Error(`Unsupported calendar ${
|
|
5750
|
+
throw new Error(`Unsupported calendar ${identifier2}`);
|
|
4458
5751
|
}
|
|
4459
5752
|
}
|
|
4460
5753
|
function Calendar(props) {
|
|
@@ -4470,7 +5763,7 @@ function Calendar(props) {
|
|
|
4470
5763
|
nextButtonProps: { onPress: onNext, "aria-label": nextAriaLabel },
|
|
4471
5764
|
title
|
|
4472
5765
|
} = (0, import_calendar3.useCalendar)(props, state);
|
|
4473
|
-
const { onClose } = (0,
|
|
5766
|
+
const { onClose } = (0, import_react41.useContext)(CalendarPopoverContext);
|
|
4474
5767
|
const closeOnKeyboardBlurBack = (event) => {
|
|
4475
5768
|
if (event.key === "Tab" && event.shiftKey === true) {
|
|
4476
5769
|
onClose();
|
|
@@ -4522,24 +5815,24 @@ Calendar.displayName = "Calendar";
|
|
|
4522
5815
|
var import_datepicker4 = require("@react-aria/datepicker");
|
|
4523
5816
|
var import_i18n4 = require("@react-aria/i18n");
|
|
4524
5817
|
var import_datepicker5 = require("@react-stately/datepicker");
|
|
4525
|
-
var
|
|
5818
|
+
var import_react48 = require("react");
|
|
4526
5819
|
|
|
4527
5820
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
4528
5821
|
var import_date5 = require("@internationalized/date");
|
|
4529
5822
|
var import_datepicker2 = require("@react-aria/datepicker");
|
|
4530
5823
|
var import_i18n3 = require("@react-aria/i18n");
|
|
4531
5824
|
var import_datepicker3 = require("@react-stately/datepicker");
|
|
4532
|
-
var
|
|
5825
|
+
var import_react46 = require("react");
|
|
4533
5826
|
|
|
4534
5827
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
4535
5828
|
var import_button = require("@react-aria/button");
|
|
4536
|
-
var
|
|
5829
|
+
var import_react42 = require("react");
|
|
4537
5830
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
4538
5831
|
function CalendarButton({
|
|
4539
5832
|
componentSize,
|
|
4540
5833
|
...props
|
|
4541
5834
|
}) {
|
|
4542
|
-
const ref = (0,
|
|
5835
|
+
const ref = (0, import_react42.useRef)(null);
|
|
4543
5836
|
const { buttonProps } = (0, import_button.useButton)(props, ref);
|
|
4544
5837
|
const size2 = componentSize === "medium" ? "medium" : "small";
|
|
4545
5838
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
@@ -4569,7 +5862,7 @@ function CalendarButton({
|
|
|
4569
5862
|
|
|
4570
5863
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
4571
5864
|
var import_datepicker = require("@react-aria/datepicker");
|
|
4572
|
-
var
|
|
5865
|
+
var import_react43 = require("react");
|
|
4573
5866
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
4574
5867
|
var typographyTypes2 = {
|
|
4575
5868
|
medium: "bodySans02",
|
|
@@ -4587,7 +5880,7 @@ function DateSegment({
|
|
|
4587
5880
|
componentSize
|
|
4588
5881
|
}) {
|
|
4589
5882
|
var _a;
|
|
4590
|
-
const ref = (0,
|
|
5883
|
+
const ref = (0, import_react43.useRef)(null);
|
|
4591
5884
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
4592
5885
|
return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(
|
|
4593
5886
|
"div",
|
|
@@ -4624,10 +5917,10 @@ function DateSegment({
|
|
|
4624
5917
|
DateSegment.displayName = "DateSegment";
|
|
4625
5918
|
|
|
4626
5919
|
// src/components/date-inputs/common/DateInput.tsx
|
|
4627
|
-
var
|
|
5920
|
+
var import_react45 = require("react");
|
|
4628
5921
|
|
|
4629
5922
|
// src/components/InputMessage/InputMessage.tsx
|
|
4630
|
-
var
|
|
5923
|
+
var import_react44 = require("react");
|
|
4631
5924
|
|
|
4632
5925
|
// src/components/InputMessage/InputMessage.module.css
|
|
4633
5926
|
var InputMessage_default = {
|
|
@@ -4639,7 +5932,7 @@ var InputMessage_default = {
|
|
|
4639
5932
|
|
|
4640
5933
|
// src/components/InputMessage/InputMessage.tsx
|
|
4641
5934
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
4642
|
-
var InputMessage = (0,
|
|
5935
|
+
var InputMessage = (0, import_react44.forwardRef)(
|
|
4643
5936
|
(props, ref) => {
|
|
4644
5937
|
const { message, messageType, id, className, htmlProps, ...rest } = props;
|
|
4645
5938
|
const isError = messageType === "error";
|
|
@@ -4707,7 +6000,7 @@ function _DateInput({
|
|
|
4707
6000
|
const hasTip = !!tip;
|
|
4708
6001
|
const hasLabel = props.label != null;
|
|
4709
6002
|
const hasMessage = hasErrorMessage || hasTip;
|
|
4710
|
-
const { isOpen } = (0,
|
|
6003
|
+
const { isOpen } = (0, import_react45.useContext)(CalendarPopoverContext);
|
|
4711
6004
|
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
4712
6005
|
"div",
|
|
4713
6006
|
{
|
|
@@ -4759,7 +6052,7 @@ function _DateInput({
|
|
|
4759
6052
|
}
|
|
4760
6053
|
);
|
|
4761
6054
|
}
|
|
4762
|
-
var DateInput = (0,
|
|
6055
|
+
var DateInput = (0, import_react45.forwardRef)(_DateInput);
|
|
4763
6056
|
DateInput.displayName = "DateInput";
|
|
4764
6057
|
|
|
4765
6058
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
@@ -4776,7 +6069,7 @@ function _DateField({
|
|
|
4776
6069
|
locale: locale2,
|
|
4777
6070
|
createCalendar: import_date5.createCalendar
|
|
4778
6071
|
});
|
|
4779
|
-
const ref = (0,
|
|
6072
|
+
const ref = (0, import_react46.useRef)(null);
|
|
4780
6073
|
const { labelProps, fieldProps } = (0, import_datepicker2.useDateField)(props, state, ref);
|
|
4781
6074
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
4782
6075
|
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
@@ -4801,27 +6094,27 @@ function _DateField({
|
|
|
4801
6094
|
),
|
|
4802
6095
|
labelProps,
|
|
4803
6096
|
fieldProps,
|
|
4804
|
-
children: state.segments.map((segment,
|
|
6097
|
+
children: state.segments.map((segment, i2) => /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
4805
6098
|
DateSegment,
|
|
4806
6099
|
{
|
|
4807
6100
|
componentSize,
|
|
4808
6101
|
segment,
|
|
4809
6102
|
state
|
|
4810
6103
|
},
|
|
4811
|
-
|
|
6104
|
+
i2
|
|
4812
6105
|
))
|
|
4813
6106
|
}
|
|
4814
6107
|
);
|
|
4815
6108
|
}
|
|
4816
|
-
var DateField = (0,
|
|
6109
|
+
var DateField = (0, import_react46.forwardRef)(_DateField);
|
|
4817
6110
|
DateField.displayName = "DateField";
|
|
4818
6111
|
|
|
4819
6112
|
// src/components/date-inputs/utils/useFocusManagerRef.ts
|
|
4820
6113
|
var import_focus11 = require("@react-aria/focus");
|
|
4821
|
-
var
|
|
6114
|
+
var import_react47 = require("react");
|
|
4822
6115
|
function useFocusManagerRef(ref) {
|
|
4823
|
-
const domRef = (0,
|
|
4824
|
-
(0,
|
|
6116
|
+
const domRef = (0, import_react47.useRef)(null);
|
|
6117
|
+
(0, import_react47.useImperativeHandle)(ref, () => ({
|
|
4825
6118
|
...createDOMRef(domRef),
|
|
4826
6119
|
focus() {
|
|
4827
6120
|
(0, import_focus11.createFocusManager)(domRef).focusFirst({ tabbable: true });
|
|
@@ -4845,9 +6138,9 @@ var refIsFocusable = (ref) => {
|
|
|
4845
6138
|
function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props }, forwardedRef) {
|
|
4846
6139
|
const state = (0, import_datepicker5.useDatePickerState)(props);
|
|
4847
6140
|
const domRef = useFocusManagerRef(
|
|
4848
|
-
refIsFocusable(
|
|
6141
|
+
refIsFocusable(import_react48.forwardRef) ? forwardedRef : null
|
|
4849
6142
|
);
|
|
4850
|
-
const ref = (0,
|
|
6143
|
+
const ref = (0, import_react48.useRef)(null);
|
|
4851
6144
|
const combinedRef = useCombinedRef(ref, domRef);
|
|
4852
6145
|
const { buttonProps, calendarProps, fieldProps, groupProps } = (0, import_datepicker4.useDatePicker)(
|
|
4853
6146
|
{ ...props, granularity: "day" },
|
|
@@ -4874,16 +6167,16 @@ function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props
|
|
|
4874
6167
|
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(CalendarPopoverContent, { children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Calendar, { ...calendarProps }) })
|
|
4875
6168
|
] }) });
|
|
4876
6169
|
}
|
|
4877
|
-
var DatePicker = (0,
|
|
6170
|
+
var DatePicker = (0, import_react48.forwardRef)(_DatePicker);
|
|
4878
6171
|
DatePicker.displayName = "DatePicker";
|
|
4879
6172
|
|
|
4880
6173
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
4881
6174
|
var import_datepicker6 = require("@react-aria/datepicker");
|
|
4882
6175
|
var import_datepicker7 = require("@react-stately/datepicker");
|
|
4883
|
-
var
|
|
6176
|
+
var import_react49 = require("react");
|
|
4884
6177
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
4885
6178
|
function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef) {
|
|
4886
|
-
const ref = (0,
|
|
6179
|
+
const ref = (0, import_react49.useRef)(null);
|
|
4887
6180
|
const state = (0, import_datepicker7.useTimeFieldState)({
|
|
4888
6181
|
...props,
|
|
4889
6182
|
locale
|
|
@@ -4918,19 +6211,19 @@ function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef
|
|
|
4918
6211
|
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(Icon, { icon: TimeIcon, iconSize })
|
|
4919
6212
|
}
|
|
4920
6213
|
),
|
|
4921
|
-
children: state.segments.map((segment,
|
|
6214
|
+
children: state.segments.map((segment, i2) => /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
4922
6215
|
DateSegment,
|
|
4923
6216
|
{
|
|
4924
6217
|
componentSize,
|
|
4925
6218
|
segment,
|
|
4926
6219
|
state
|
|
4927
6220
|
},
|
|
4928
|
-
|
|
6221
|
+
i2
|
|
4929
6222
|
))
|
|
4930
6223
|
}
|
|
4931
6224
|
);
|
|
4932
6225
|
}
|
|
4933
|
-
var TimePicker = (0,
|
|
6226
|
+
var TimePicker = (0, import_react49.forwardRef)(_TimePicker);
|
|
4934
6227
|
TimePicker.displayName = "TimePicker";
|
|
4935
6228
|
|
|
4936
6229
|
// src/components/date-inputs/utils/transform.ts
|
|
@@ -4963,7 +6256,7 @@ function calendarDateToNativeDate(date, time = new import_date6.Time(12, 0, 0, 0
|
|
|
4963
6256
|
}
|
|
4964
6257
|
|
|
4965
6258
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
4966
|
-
var
|
|
6259
|
+
var import_react50 = require("react");
|
|
4967
6260
|
|
|
4968
6261
|
// src/components/DescriptionList/DescriptionList.module.css
|
|
4969
6262
|
var DescriptionList_default = {
|
|
@@ -4978,7 +6271,7 @@ var DescriptionList_default = {
|
|
|
4978
6271
|
|
|
4979
6272
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
4980
6273
|
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
4981
|
-
var DescriptionList = (0,
|
|
6274
|
+
var DescriptionList = (0, import_react50.forwardRef)((props, ref) => {
|
|
4982
6275
|
const {
|
|
4983
6276
|
appearance = "default",
|
|
4984
6277
|
direction = "column",
|
|
@@ -5010,17 +6303,17 @@ var DescriptionList = (0, import_react49.forwardRef)((props, ref) => {
|
|
|
5010
6303
|
DescriptionList.displayName = "DescriptionList";
|
|
5011
6304
|
|
|
5012
6305
|
// src/components/DescriptionList/DescriptionListTerm.tsx
|
|
5013
|
-
var
|
|
6306
|
+
var import_react51 = require("react");
|
|
5014
6307
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
5015
|
-
var DescriptionListTerm = (0,
|
|
6308
|
+
var DescriptionListTerm = (0, import_react51.forwardRef)(({ ...rest }, ref) => {
|
|
5016
6309
|
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("dt", { ref, ...rest });
|
|
5017
6310
|
});
|
|
5018
6311
|
DescriptionListTerm.displayName = "DescriptionListTerm";
|
|
5019
6312
|
|
|
5020
6313
|
// src/components/DescriptionList/DescriptionListDesc.tsx
|
|
5021
|
-
var
|
|
6314
|
+
var import_react52 = require("react");
|
|
5022
6315
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
5023
|
-
var DescriptionListDesc = (0,
|
|
6316
|
+
var DescriptionListDesc = (0, import_react52.forwardRef)((props, ref) => {
|
|
5024
6317
|
const { children, icon: icon2, id, className, htmlProps, ...rest } = props;
|
|
5025
6318
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
5026
6319
|
"dd",
|
|
@@ -5038,9 +6331,9 @@ var DescriptionListDesc = (0, import_react51.forwardRef)((props, ref) => {
|
|
|
5038
6331
|
DescriptionListDesc.displayName = "DescriptionListDesc";
|
|
5039
6332
|
|
|
5040
6333
|
// src/components/DescriptionList/DescriptionListGroup.tsx
|
|
5041
|
-
var
|
|
6334
|
+
var import_react53 = require("react");
|
|
5042
6335
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
5043
|
-
var DescriptionListGroup = (0,
|
|
6336
|
+
var DescriptionListGroup = (0, import_react53.forwardRef)((props, ref) => {
|
|
5044
6337
|
const {
|
|
5045
6338
|
children,
|
|
5046
6339
|
margin,
|
|
@@ -5064,7 +6357,7 @@ var DescriptionListGroup = (0, import_react52.forwardRef)((props, ref) => {
|
|
|
5064
6357
|
DescriptionListGroup.displayName = "DescriptionListGroup";
|
|
5065
6358
|
|
|
5066
6359
|
// src/components/Drawer/Drawer.tsx
|
|
5067
|
-
var
|
|
6360
|
+
var import_react54 = require("react");
|
|
5068
6361
|
var import_react_dom2 = require("react-dom");
|
|
5069
6362
|
|
|
5070
6363
|
// src/components/Drawer/Drawer.module.css
|
|
@@ -5085,7 +6378,7 @@ var Drawer_default = {
|
|
|
5085
6378
|
|
|
5086
6379
|
// src/components/Drawer/Drawer.tsx
|
|
5087
6380
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
5088
|
-
var Drawer = (0,
|
|
6381
|
+
var Drawer = (0, import_react54.forwardRef)((props, ref) => {
|
|
5089
6382
|
const {
|
|
5090
6383
|
children,
|
|
5091
6384
|
onClose,
|
|
@@ -5101,7 +6394,7 @@ var Drawer = (0, import_react53.forwardRef)((props, ref) => {
|
|
|
5101
6394
|
widthProps,
|
|
5102
6395
|
...rest
|
|
5103
6396
|
} = props;
|
|
5104
|
-
const generatedId = (0,
|
|
6397
|
+
const generatedId = (0, import_react54.useId)();
|
|
5105
6398
|
const uniqueId = id != null ? id : `${generatedId}-drawer`;
|
|
5106
6399
|
const hasHeader = !!header;
|
|
5107
6400
|
const headerId = hasHeader ? `${uniqueId}-header` : void 0;
|
|
@@ -5180,7 +6473,7 @@ var Drawer = (0, import_react53.forwardRef)((props, ref) => {
|
|
|
5180
6473
|
Drawer.displayName = "Drawer";
|
|
5181
6474
|
|
|
5182
6475
|
// src/components/Drawer/DrawerGroup.tsx
|
|
5183
|
-
var
|
|
6476
|
+
var import_react55 = require("react");
|
|
5184
6477
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
5185
6478
|
var DrawerGroup = ({
|
|
5186
6479
|
children,
|
|
@@ -5188,10 +6481,10 @@ var DrawerGroup = ({
|
|
|
5188
6481
|
onOpen,
|
|
5189
6482
|
onClose
|
|
5190
6483
|
}) => {
|
|
5191
|
-
const generatedId = (0,
|
|
6484
|
+
const generatedId = (0, import_react55.useId)();
|
|
5192
6485
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
5193
|
-
const buttonRef = (0,
|
|
5194
|
-
const [closed, setClosed] = (0,
|
|
6486
|
+
const buttonRef = (0, import_react55.useRef)(null);
|
|
6487
|
+
const [closed, setClosed] = (0, import_react55.useState)(true);
|
|
5195
6488
|
const open = () => setClosed(false);
|
|
5196
6489
|
const close = () => setClosed(true);
|
|
5197
6490
|
const handleOpen = () => {
|
|
@@ -5202,14 +6495,14 @@ var DrawerGroup = ({
|
|
|
5202
6495
|
close();
|
|
5203
6496
|
onClose && onClose();
|
|
5204
6497
|
};
|
|
5205
|
-
const Children8 =
|
|
5206
|
-
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, {
|
|
5207
6500
|
"aria-haspopup": "dialog",
|
|
5208
6501
|
"aria-controls": uniqueDrawerId,
|
|
5209
6502
|
"aria-expanded": !closed,
|
|
5210
6503
|
ref: buttonRef,
|
|
5211
6504
|
onClick: handleOpen
|
|
5212
|
-
}) : (0,
|
|
6505
|
+
}) : (0, import_react55.cloneElement)(child, {
|
|
5213
6506
|
id: uniqueDrawerId,
|
|
5214
6507
|
triggerRef: buttonRef,
|
|
5215
6508
|
isOpen: !closed,
|
|
@@ -5248,7 +6541,7 @@ function EmptyContent({
|
|
|
5248
6541
|
EmptyContent.displayName = "EmptyContent";
|
|
5249
6542
|
|
|
5250
6543
|
// src/components/FavStar/FavStar.tsx
|
|
5251
|
-
var
|
|
6544
|
+
var import_react58 = require("react");
|
|
5252
6545
|
|
|
5253
6546
|
// src/components/FavStar/FavStar.module.css
|
|
5254
6547
|
var FavStar_default = {
|
|
@@ -5260,16 +6553,16 @@ var FavStar_default = {
|
|
|
5260
6553
|
};
|
|
5261
6554
|
|
|
5262
6555
|
// src/hooks/useControllableState.ts
|
|
5263
|
-
var
|
|
6556
|
+
var import_react57 = require("react");
|
|
5264
6557
|
|
|
5265
6558
|
// src/hooks/useCallbackRef.ts
|
|
5266
|
-
var
|
|
6559
|
+
var import_react56 = require("react");
|
|
5267
6560
|
function useCallbackRef(callback, deps = []) {
|
|
5268
|
-
const callbackRef = (0,
|
|
5269
|
-
(0,
|
|
6561
|
+
const callbackRef = (0, import_react56.useRef)(callback);
|
|
6562
|
+
(0, import_react56.useEffect)(() => {
|
|
5270
6563
|
callbackRef.current = callback;
|
|
5271
6564
|
});
|
|
5272
|
-
return (0,
|
|
6565
|
+
return (0, import_react56.useCallback)((...args) => {
|
|
5273
6566
|
var _a;
|
|
5274
6567
|
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
5275
6568
|
}, deps);
|
|
@@ -5279,13 +6572,13 @@ function useCallbackRef(callback, deps = []) {
|
|
|
5279
6572
|
function useControllableState(props) {
|
|
5280
6573
|
const { value: valueProp, defaultValue, onChange } = props;
|
|
5281
6574
|
const onChangeProp = useCallbackRef(onChange);
|
|
5282
|
-
const [uncontrolledState, setUncontrolledState] = (0,
|
|
6575
|
+
const [uncontrolledState, setUncontrolledState] = (0, import_react57.useState)(defaultValue);
|
|
5283
6576
|
const controlled = valueProp !== void 0;
|
|
5284
6577
|
const value = controlled ? valueProp : uncontrolledState;
|
|
5285
6578
|
const setValue = useCallbackRef(
|
|
5286
|
-
(
|
|
5287
|
-
const setter =
|
|
5288
|
-
const nextValue = typeof
|
|
6579
|
+
(next2) => {
|
|
6580
|
+
const setter = next2;
|
|
6581
|
+
const nextValue = typeof next2 === "function" ? setter(value) : next2;
|
|
5289
6582
|
if (!controlled) {
|
|
5290
6583
|
setUncontrolledState(nextValue);
|
|
5291
6584
|
}
|
|
@@ -5298,7 +6591,7 @@ function useControllableState(props) {
|
|
|
5298
6591
|
|
|
5299
6592
|
// src/components/FavStar/FavStar.tsx
|
|
5300
6593
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
5301
|
-
var FavStar = (0,
|
|
6594
|
+
var FavStar = (0, import_react58.forwardRef)(
|
|
5302
6595
|
({
|
|
5303
6596
|
id,
|
|
5304
6597
|
className,
|
|
@@ -5316,7 +6609,7 @@ var FavStar = (0, import_react57.forwardRef)(
|
|
|
5316
6609
|
htmlProps,
|
|
5317
6610
|
rest
|
|
5318
6611
|
);
|
|
5319
|
-
const generatedId = (0,
|
|
6612
|
+
const generatedId = (0, import_react58.useId)();
|
|
5320
6613
|
const [checked, setChecked] = useControllableState({
|
|
5321
6614
|
value: checkedProp,
|
|
5322
6615
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
@@ -5364,7 +6657,7 @@ var FavStar = (0, import_react57.forwardRef)(
|
|
|
5364
6657
|
FavStar.displayName = "FavStar";
|
|
5365
6658
|
|
|
5366
6659
|
// src/components/Feedback/Feedback.tsx
|
|
5367
|
-
var
|
|
6660
|
+
var import_react62 = require("react");
|
|
5368
6661
|
|
|
5369
6662
|
// src/components/Feedback/CommentComponent.tsx
|
|
5370
6663
|
var import_dds_design_tokens15 = require("@norges-domstoler/dds-design-tokens");
|
|
@@ -5379,7 +6672,7 @@ var Feedback_default = {
|
|
|
5379
6672
|
};
|
|
5380
6673
|
|
|
5381
6674
|
// src/components/Stack/Stack.tsx
|
|
5382
|
-
var
|
|
6675
|
+
var import_react59 = require("react");
|
|
5383
6676
|
|
|
5384
6677
|
// src/components/Stack/Stack.module.css
|
|
5385
6678
|
var Stack_default = {
|
|
@@ -5416,7 +6709,7 @@ var Stack_default = {
|
|
|
5416
6709
|
|
|
5417
6710
|
// src/components/Stack/Stack.tsx
|
|
5418
6711
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
5419
|
-
var HStack = (0,
|
|
6712
|
+
var HStack = (0, import_react59.forwardRef)(
|
|
5420
6713
|
({
|
|
5421
6714
|
id,
|
|
5422
6715
|
className,
|
|
@@ -5455,7 +6748,7 @@ var HStack = (0, import_react58.forwardRef)(
|
|
|
5455
6748
|
}
|
|
5456
6749
|
);
|
|
5457
6750
|
HStack.displayName = "HStack";
|
|
5458
|
-
var VStack = (0,
|
|
6751
|
+
var VStack = (0, import_react59.forwardRef)(
|
|
5459
6752
|
({
|
|
5460
6753
|
id,
|
|
5461
6754
|
className,
|
|
@@ -5499,7 +6792,7 @@ function spacingPropToCn(value) {
|
|
|
5499
6792
|
}
|
|
5500
6793
|
|
|
5501
6794
|
// src/components/TextArea/TextArea.tsx
|
|
5502
|
-
var
|
|
6795
|
+
var import_react60 = require("react");
|
|
5503
6796
|
|
|
5504
6797
|
// src/components/TextArea/TextArea.module.css
|
|
5505
6798
|
var TextArea_default = {
|
|
@@ -5509,7 +6802,7 @@ var TextArea_default = {
|
|
|
5509
6802
|
|
|
5510
6803
|
// src/components/TextArea/TextArea.tsx
|
|
5511
6804
|
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
5512
|
-
var TextArea = (0,
|
|
6805
|
+
var TextArea = (0, import_react60.forwardRef)(
|
|
5513
6806
|
(props, ref) => {
|
|
5514
6807
|
const {
|
|
5515
6808
|
id,
|
|
@@ -5528,14 +6821,14 @@ var TextArea = (0, import_react59.forwardRef)(
|
|
|
5528
6821
|
width,
|
|
5529
6822
|
...rest
|
|
5530
6823
|
} = props;
|
|
5531
|
-
const generatedId = (0,
|
|
6824
|
+
const generatedId = (0, import_react60.useId)();
|
|
5532
6825
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
5533
|
-
const textAreaRef = (0,
|
|
6826
|
+
const textAreaRef = (0, import_react60.useRef)(null);
|
|
5534
6827
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
5535
|
-
const [text, setText] = (0,
|
|
6828
|
+
const [text, setText] = (0, import_react60.useState)(
|
|
5536
6829
|
getDefaultText(value, defaultValue)
|
|
5537
6830
|
);
|
|
5538
|
-
(0,
|
|
6831
|
+
(0, import_react60.useEffect)(() => {
|
|
5539
6832
|
if (textAreaRef == null ? void 0 : textAreaRef.current) {
|
|
5540
6833
|
textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
|
|
5541
6834
|
}
|
|
@@ -5648,7 +6941,7 @@ var CommentComponent = ({
|
|
|
5648
6941
|
};
|
|
5649
6942
|
|
|
5650
6943
|
// src/components/Tooltip/Tooltip.tsx
|
|
5651
|
-
var
|
|
6944
|
+
var import_react61 = require("react");
|
|
5652
6945
|
|
|
5653
6946
|
// src/components/Tooltip/Tooltip.module.css
|
|
5654
6947
|
var Tooltip_default = {
|
|
@@ -5660,7 +6953,7 @@ var Tooltip_default = {
|
|
|
5660
6953
|
|
|
5661
6954
|
// src/components/Tooltip/Tooltip.tsx
|
|
5662
6955
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
5663
|
-
var Tooltip = (0,
|
|
6956
|
+
var Tooltip = (0, import_react61.forwardRef)(
|
|
5664
6957
|
(props, ref) => {
|
|
5665
6958
|
const {
|
|
5666
6959
|
text,
|
|
@@ -5676,21 +6969,21 @@ var Tooltip = (0, import_react60.forwardRef)(
|
|
|
5676
6969
|
htmlProps,
|
|
5677
6970
|
...rest
|
|
5678
6971
|
} = props;
|
|
5679
|
-
const generatedId = (0,
|
|
6972
|
+
const generatedId = (0, import_react61.useId)();
|
|
5680
6973
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
5681
|
-
const [open, setOpen] = (0,
|
|
5682
|
-
const [inView, setInView] = (0,
|
|
5683
|
-
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);
|
|
5684
6977
|
const { refs, styles: positionStyles } = useFloatPosition(arrowElement, {
|
|
5685
6978
|
placement
|
|
5686
6979
|
});
|
|
5687
|
-
const tooltipRef = (0,
|
|
6980
|
+
const tooltipRef = (0, import_react61.useRef)(null);
|
|
5688
6981
|
const combinedRef = useCombinedRef(ref, refs.setFloating, tooltipRef);
|
|
5689
6982
|
const closeWhenNotInView = (entries) => {
|
|
5690
6983
|
const [entry] = entries;
|
|
5691
6984
|
entry.isIntersecting ? setInView(true) : setInView(false);
|
|
5692
6985
|
};
|
|
5693
|
-
(0,
|
|
6986
|
+
(0, import_react61.useEffect)(() => {
|
|
5694
6987
|
const options = {
|
|
5695
6988
|
root: null,
|
|
5696
6989
|
rootMargin: "0px"
|
|
@@ -5702,7 +6995,7 @@ var Tooltip = (0, import_react60.forwardRef)(
|
|
|
5702
6995
|
if (ref2) observer.unobserve(ref2);
|
|
5703
6996
|
};
|
|
5704
6997
|
}, [tooltipRef]);
|
|
5705
|
-
(0,
|
|
6998
|
+
(0, import_react61.useEffect)(() => {
|
|
5706
6999
|
if (tooltipRef.current) {
|
|
5707
7000
|
window.addEventListener("scroll", () => {
|
|
5708
7001
|
closeTooltip();
|
|
@@ -5715,7 +7008,7 @@ var Tooltip = (0, import_react60.forwardRef)(
|
|
|
5715
7008
|
};
|
|
5716
7009
|
}, []);
|
|
5717
7010
|
let timer;
|
|
5718
|
-
(0,
|
|
7011
|
+
(0, import_react61.useEffect)(() => {
|
|
5719
7012
|
return () => {
|
|
5720
7013
|
clearTimeout(timer);
|
|
5721
7014
|
};
|
|
@@ -5734,8 +7027,8 @@ var Tooltip = (0, import_react60.forwardRef)(
|
|
|
5734
7027
|
}
|
|
5735
7028
|
};
|
|
5736
7029
|
const anchorProps = children.props;
|
|
5737
|
-
const anchorElement =
|
|
5738
|
-
(0,
|
|
7030
|
+
const anchorElement = import_react61.Children.only(
|
|
7031
|
+
(0, import_react61.isValidElement)(children) && (0, import_react61.cloneElement)(children, {
|
|
5739
7032
|
ref: refs.setReference,
|
|
5740
7033
|
onFocus: combineHandlers(openTooltip, anchorProps.onFocus),
|
|
5741
7034
|
onBlur: combineHandlers(closeTooltip, anchorProps.onBlur),
|
|
@@ -5869,16 +7162,16 @@ var Feedback = ({
|
|
|
5869
7162
|
onFeedbackTextChange,
|
|
5870
7163
|
onSubmit
|
|
5871
7164
|
}) => {
|
|
5872
|
-
const [rating, setRating] = (0,
|
|
5873
|
-
const [feedbackText, setFeedbackText] = (0,
|
|
5874
|
-
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0,
|
|
5875
|
-
(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)(() => {
|
|
5876
7169
|
ratingProp !== void 0 && setRating(ratingProp);
|
|
5877
7170
|
}, [ratingProp]);
|
|
5878
|
-
(0,
|
|
7171
|
+
(0, import_react62.useEffect)(() => {
|
|
5879
7172
|
feedbackTextProp !== void 0 && setFeedbackText(feedbackTextProp);
|
|
5880
7173
|
}, [feedbackTextProp]);
|
|
5881
|
-
(0,
|
|
7174
|
+
(0, import_react62.useEffect)(() => {
|
|
5882
7175
|
isSubmittedProp !== void 0 && setIsFeedbackSubmitted(isSubmittedProp);
|
|
5883
7176
|
}, [isSubmittedProp]);
|
|
5884
7177
|
const handleRatingChange = (newRating) => {
|
|
@@ -5927,7 +7220,7 @@ var Feedback = ({
|
|
|
5927
7220
|
};
|
|
5928
7221
|
|
|
5929
7222
|
// src/components/Fieldset/Fieldset.tsx
|
|
5930
|
-
var
|
|
7223
|
+
var import_react63 = require("react");
|
|
5931
7224
|
|
|
5932
7225
|
// src/components/Fieldset/Fieldset.module.css
|
|
5933
7226
|
var Fieldset_default = {
|
|
@@ -5936,7 +7229,7 @@ var Fieldset_default = {
|
|
|
5936
7229
|
|
|
5937
7230
|
// src/components/Fieldset/Fieldset.tsx
|
|
5938
7231
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
5939
|
-
var Fieldset = (0,
|
|
7232
|
+
var Fieldset = (0, import_react63.forwardRef)(
|
|
5940
7233
|
(props, ref) => {
|
|
5941
7234
|
const { id, className, htmlProps, ...rest } = props;
|
|
5942
7235
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
@@ -5955,7 +7248,7 @@ var Fieldset = (0, import_react62.forwardRef)(
|
|
|
5955
7248
|
);
|
|
5956
7249
|
|
|
5957
7250
|
// src/components/FileUploader/FileUploader.tsx
|
|
5958
|
-
var
|
|
7251
|
+
var import_react65 = require("react");
|
|
5959
7252
|
|
|
5960
7253
|
// src/components/FileUploader/ErrorList.tsx
|
|
5961
7254
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
@@ -6035,7 +7328,7 @@ var File = (props) => {
|
|
|
6035
7328
|
|
|
6036
7329
|
// src/components/FileUploader/useFileUploader.ts
|
|
6037
7330
|
var import_file_selector = require("file-selector");
|
|
6038
|
-
var
|
|
7331
|
+
var import_react64 = require("react");
|
|
6039
7332
|
|
|
6040
7333
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
6041
7334
|
var fileUploaderReducer = (state, action) => {
|
|
@@ -6134,18 +7427,18 @@ var useFileUploader = (props) => {
|
|
|
6134
7427
|
disabled,
|
|
6135
7428
|
errorMessage
|
|
6136
7429
|
} = props;
|
|
6137
|
-
const rootRef = (0,
|
|
6138
|
-
const inputRef = (0,
|
|
6139
|
-
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);
|
|
6140
7433
|
const isControlled = !!value;
|
|
6141
|
-
const initialFileUploaderFiles = (0,
|
|
6142
|
-
() => (initialFiles != null ? initialFiles : []).map((
|
|
6143
|
-
file:
|
|
7434
|
+
const initialFileUploaderFiles = (0, import_react64.useMemo)(
|
|
7435
|
+
() => (initialFiles != null ? initialFiles : []).map((f2) => ({
|
|
7436
|
+
file: f2,
|
|
6144
7437
|
errors: []
|
|
6145
7438
|
})),
|
|
6146
7439
|
[initialFiles]
|
|
6147
7440
|
);
|
|
6148
|
-
const [state, dispatch] = (0,
|
|
7441
|
+
const [state, dispatch] = (0, import_react64.useReducer)(fileUploaderReducer, {
|
|
6149
7442
|
files: initialFileUploaderFiles,
|
|
6150
7443
|
isFocused: false,
|
|
6151
7444
|
isFileDialogActive: false,
|
|
@@ -6157,7 +7450,7 @@ var useFileUploader = (props) => {
|
|
|
6157
7450
|
)
|
|
6158
7451
|
});
|
|
6159
7452
|
const { files: stateFiles } = state;
|
|
6160
|
-
(0,
|
|
7453
|
+
(0, import_react64.useEffect)(() => {
|
|
6161
7454
|
if (isControlled) {
|
|
6162
7455
|
const files = value.map((file) => {
|
|
6163
7456
|
const accepted = isFileAccepted(file, accept);
|
|
@@ -6172,18 +7465,18 @@ var useFileUploader = (props) => {
|
|
|
6172
7465
|
});
|
|
6173
7466
|
}
|
|
6174
7467
|
}, [value, isControlled, accept, dispatch]);
|
|
6175
|
-
(0,
|
|
7468
|
+
(0, import_react64.useEffect)(() => {
|
|
6176
7469
|
dispatch({
|
|
6177
7470
|
type: "setRootErrors",
|
|
6178
7471
|
payload: calcRootErrors(stateFiles, maxFiles, errorMessage)
|
|
6179
7472
|
});
|
|
6180
7473
|
}, [dispatch, stateFiles, maxFiles, errorMessage]);
|
|
6181
|
-
const onRootFocus = (0,
|
|
7474
|
+
const onRootFocus = (0, import_react64.useCallback)(
|
|
6182
7475
|
() => dispatch({ type: "focus" }),
|
|
6183
7476
|
[dispatch]
|
|
6184
7477
|
);
|
|
6185
|
-
const onRootBlur = (0,
|
|
6186
|
-
const onRootDragEnter = (0,
|
|
7478
|
+
const onRootBlur = (0, import_react64.useCallback)(() => dispatch({ type: "blur" }), [dispatch]);
|
|
7479
|
+
const onRootDragEnter = (0, import_react64.useCallback)(
|
|
6187
7480
|
async (evt) => {
|
|
6188
7481
|
preventDefaults(evt);
|
|
6189
7482
|
if (isEventWithFiles(evt)) {
|
|
@@ -6195,7 +7488,7 @@ var useFileUploader = (props) => {
|
|
|
6195
7488
|
},
|
|
6196
7489
|
[dispatch, accept, maxFiles]
|
|
6197
7490
|
);
|
|
6198
|
-
const onRootDragOver = (0,
|
|
7491
|
+
const onRootDragOver = (0, import_react64.useCallback)((evt) => {
|
|
6199
7492
|
preventDefaults(evt);
|
|
6200
7493
|
const hasFiles = isEventWithFiles(evt);
|
|
6201
7494
|
if (hasFiles && evt.dataTransfer) {
|
|
@@ -6205,7 +7498,7 @@ var useFileUploader = (props) => {
|
|
|
6205
7498
|
}
|
|
6206
7499
|
}
|
|
6207
7500
|
}, []);
|
|
6208
|
-
const onRootDragLeave = (0,
|
|
7501
|
+
const onRootDragLeave = (0, import_react64.useCallback)(
|
|
6209
7502
|
(evt) => {
|
|
6210
7503
|
preventDefaults(evt);
|
|
6211
7504
|
if (evt.currentTarget.contains(evt.relatedTarget)) return;
|
|
@@ -6213,22 +7506,22 @@ var useFileUploader = (props) => {
|
|
|
6213
7506
|
},
|
|
6214
7507
|
[dispatch]
|
|
6215
7508
|
);
|
|
6216
|
-
const setFiles = (0,
|
|
7509
|
+
const setFiles = (0, import_react64.useCallback)(
|
|
6217
7510
|
async (evt) => {
|
|
6218
7511
|
evt.preventDefault();
|
|
6219
7512
|
if (isEventWithFiles(evt)) {
|
|
6220
|
-
const existingFileNames = stateFiles.map((
|
|
7513
|
+
const existingFileNames = stateFiles.map((f2) => f2.file.name);
|
|
6221
7514
|
const filesFromEvent = await (0, import_file_selector.fromEvent)(
|
|
6222
7515
|
evt
|
|
6223
7516
|
);
|
|
6224
|
-
const newFiles = filesFromEvent.filter((
|
|
7517
|
+
const newFiles = filesFromEvent.filter((f2) => !existingFileNames.includes(f2.name)).map((file) => {
|
|
6225
7518
|
const accepted = isFileAccepted(file, accept);
|
|
6226
7519
|
return {
|
|
6227
7520
|
file,
|
|
6228
7521
|
errors: accepted ? [] : [getInvalidFileTypeErrorMessage()]
|
|
6229
7522
|
};
|
|
6230
7523
|
}).concat(stateFiles);
|
|
6231
|
-
onChange(newFiles.map((
|
|
7524
|
+
onChange(newFiles.map((f2) => f2.file));
|
|
6232
7525
|
if (!isControlled) {
|
|
6233
7526
|
dispatch({
|
|
6234
7527
|
type: "onSetFiles",
|
|
@@ -6247,17 +7540,17 @@ var useFileUploader = (props) => {
|
|
|
6247
7540
|
dispatch
|
|
6248
7541
|
]
|
|
6249
7542
|
);
|
|
6250
|
-
const openFileDialog = (0,
|
|
7543
|
+
const openFileDialog = (0, import_react64.useCallback)(() => {
|
|
6251
7544
|
if (inputRef.current) {
|
|
6252
7545
|
inputRef.current.value = "";
|
|
6253
7546
|
inputRef.current.click();
|
|
6254
7547
|
}
|
|
6255
7548
|
}, [inputRef]);
|
|
6256
|
-
const removeFile = (0,
|
|
7549
|
+
const removeFile = (0, import_react64.useCallback)(
|
|
6257
7550
|
(file) => {
|
|
6258
7551
|
const newFiles = [...stateFiles];
|
|
6259
7552
|
newFiles.splice(stateFiles.indexOf(file), 1);
|
|
6260
|
-
onChange(newFiles.map((
|
|
7553
|
+
onChange(newFiles.map((f2) => f2.file));
|
|
6261
7554
|
if (!isControlled) {
|
|
6262
7555
|
dispatch({
|
|
6263
7556
|
type: "onRemoveFile",
|
|
@@ -6267,7 +7560,7 @@ var useFileUploader = (props) => {
|
|
|
6267
7560
|
},
|
|
6268
7561
|
[stateFiles, isControlled, maxFiles, errorMessage, onChange, dispatch]
|
|
6269
7562
|
);
|
|
6270
|
-
const getRootProps = (0,
|
|
7563
|
+
const getRootProps = (0, import_react64.useCallback)(
|
|
6271
7564
|
() => ({
|
|
6272
7565
|
onBlur: onRootBlur,
|
|
6273
7566
|
onFocus: onRootFocus,
|
|
@@ -6289,14 +7582,14 @@ var useFileUploader = (props) => {
|
|
|
6289
7582
|
disabled
|
|
6290
7583
|
]
|
|
6291
7584
|
);
|
|
6292
|
-
const getButtonProps = (0,
|
|
7585
|
+
const getButtonProps = (0, import_react64.useCallback)(
|
|
6293
7586
|
() => ({
|
|
6294
7587
|
onClick: openFileDialog,
|
|
6295
7588
|
ref: buttonRef
|
|
6296
7589
|
}),
|
|
6297
7590
|
[openFileDialog, buttonRef]
|
|
6298
7591
|
);
|
|
6299
|
-
const getInputProps = (0,
|
|
7592
|
+
const getInputProps = (0, import_react64.useCallback)(
|
|
6300
7593
|
() => ({
|
|
6301
7594
|
type: "file",
|
|
6302
7595
|
style: { display: "none" },
|
|
@@ -6354,7 +7647,7 @@ var FileUploader = (props) => {
|
|
|
6354
7647
|
className,
|
|
6355
7648
|
...rest
|
|
6356
7649
|
} = props;
|
|
6357
|
-
const generatedId = (0,
|
|
7650
|
+
const generatedId = (0, import_react65.useId)();
|
|
6358
7651
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
6359
7652
|
const {
|
|
6360
7653
|
state: { files: stateFiles, isDragActive, rootErrors },
|
|
@@ -6461,7 +7754,7 @@ var FileUploader = (props) => {
|
|
|
6461
7754
|
FileUploader.displayName = "FileUploader";
|
|
6462
7755
|
|
|
6463
7756
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
6464
|
-
var
|
|
7757
|
+
var import_react66 = require("react");
|
|
6465
7758
|
|
|
6466
7759
|
// src/components/GlobalMessage/GlobalMessage.module.css
|
|
6467
7760
|
var GlobalMessage_default = {
|
|
@@ -6487,7 +7780,7 @@ var purposeVariants = {
|
|
|
6487
7780
|
icon: WarningIcon
|
|
6488
7781
|
}
|
|
6489
7782
|
};
|
|
6490
|
-
var GlobalMessage = (0,
|
|
7783
|
+
var GlobalMessage = (0, import_react66.forwardRef)(
|
|
6491
7784
|
(props, ref) => {
|
|
6492
7785
|
const {
|
|
6493
7786
|
message,
|
|
@@ -6500,7 +7793,7 @@ var GlobalMessage = (0, import_react65.forwardRef)(
|
|
|
6500
7793
|
htmlProps,
|
|
6501
7794
|
...rest
|
|
6502
7795
|
} = props;
|
|
6503
|
-
const [isClosed, setClosed] = (0,
|
|
7796
|
+
const [isClosed, setClosed] = (0, import_react66.useState)(false);
|
|
6504
7797
|
return !isClosed ? /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
|
|
6505
7798
|
"div",
|
|
6506
7799
|
{
|
|
@@ -6674,7 +7967,7 @@ var GridChild = (props) => {
|
|
|
6674
7967
|
GridChild.displayName = "GridChild";
|
|
6675
7968
|
|
|
6676
7969
|
// src/components/InlineButton/InlineButton.tsx
|
|
6677
|
-
var
|
|
7970
|
+
var import_react67 = require("react");
|
|
6678
7971
|
|
|
6679
7972
|
// src/components/InlineButton/InlineButton.module.css
|
|
6680
7973
|
var InlineButton_default = {
|
|
@@ -6683,7 +7976,7 @@ var InlineButton_default = {
|
|
|
6683
7976
|
|
|
6684
7977
|
// src/components/InlineButton/InlineButton.tsx
|
|
6685
7978
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
6686
|
-
var InlineButton = (0,
|
|
7979
|
+
var InlineButton = (0, import_react67.forwardRef)(
|
|
6687
7980
|
(props, ref) => {
|
|
6688
7981
|
const { className, ...rest } = props;
|
|
6689
7982
|
return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
@@ -6705,10 +7998,10 @@ var InlineButton = (0, import_react66.forwardRef)(
|
|
|
6705
7998
|
);
|
|
6706
7999
|
|
|
6707
8000
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
6708
|
-
var
|
|
8001
|
+
var import_react70 = require("react");
|
|
6709
8002
|
|
|
6710
8003
|
// src/components/InlineEdit/InlineEdit.tsx
|
|
6711
|
-
var
|
|
8004
|
+
var import_react68 = require("react");
|
|
6712
8005
|
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
6713
8006
|
var InlineEdit = (props) => {
|
|
6714
8007
|
const {
|
|
@@ -6721,8 +8014,8 @@ var InlineEdit = (props) => {
|
|
|
6721
8014
|
inputRef,
|
|
6722
8015
|
children
|
|
6723
8016
|
} = props;
|
|
6724
|
-
const [editingValue, setEditingValue] = (0,
|
|
6725
|
-
const [isEditing, setIsEditing] = (0,
|
|
8017
|
+
const [editingValue, setEditingValue] = (0, import_react68.useState)(value != null ? value : "");
|
|
8018
|
+
const [isEditing, setIsEditing] = (0, import_react68.useState)(false);
|
|
6726
8019
|
const onChangeHandler = (e) => {
|
|
6727
8020
|
setEditingValue(e.target.value);
|
|
6728
8021
|
onChange && onChange();
|
|
@@ -6749,8 +8042,8 @@ var InlineEdit = (props) => {
|
|
|
6749
8042
|
useOnKeyDown(["Enter"], () => onExitHandler());
|
|
6750
8043
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
6751
8044
|
useOnClickOutside(inputRef.current, () => onExitHandler());
|
|
6752
|
-
const inputChild =
|
|
6753
|
-
(0,
|
|
8045
|
+
const inputChild = import_react68.Children.only(
|
|
8046
|
+
(0, import_react68.isValidElement)(children) && (0, import_react68.cloneElement)(children, {
|
|
6754
8047
|
onChange: onChangeHandler,
|
|
6755
8048
|
onBlur: onBlurHandler,
|
|
6756
8049
|
onFocus: onFocusHandler,
|
|
@@ -6764,7 +8057,7 @@ var InlineEdit = (props) => {
|
|
|
6764
8057
|
InlineEdit.displayName = "InlineEdit";
|
|
6765
8058
|
|
|
6766
8059
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
6767
|
-
var
|
|
8060
|
+
var import_react69 = require("react");
|
|
6768
8061
|
|
|
6769
8062
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
6770
8063
|
var InlineEdit_default = {
|
|
@@ -6786,7 +8079,7 @@ var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ (0, import_jsx
|
|
|
6786
8079
|
|
|
6787
8080
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
6788
8081
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
6789
|
-
var InlineTextArea = (0,
|
|
8082
|
+
var InlineTextArea = (0, import_react69.forwardRef)((props, ref) => {
|
|
6790
8083
|
const {
|
|
6791
8084
|
id,
|
|
6792
8085
|
error,
|
|
@@ -6798,14 +8091,14 @@ var InlineTextArea = (0, import_react68.forwardRef)((props, ref) => {
|
|
|
6798
8091
|
hideIcon,
|
|
6799
8092
|
...rest
|
|
6800
8093
|
} = props;
|
|
6801
|
-
const genereatedId = (0,
|
|
8094
|
+
const genereatedId = (0, import_react69.useId)();
|
|
6802
8095
|
const uniqueId = id != null ? id : `${genereatedId}-InlineTextArea`;
|
|
6803
8096
|
const hasErrorMessage = !!errorMessage;
|
|
6804
8097
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
6805
8098
|
const hasError = !!error;
|
|
6806
8099
|
const hasErrorState = hasError || hasErrorMessage;
|
|
6807
8100
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
6808
|
-
const inputRef = (0,
|
|
8101
|
+
const inputRef = (0, import_react69.useRef)(null);
|
|
6809
8102
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
6810
8103
|
return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
6811
8104
|
/* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
@@ -6853,9 +8146,9 @@ InlineTextArea.displayName = "InlineTextArea";
|
|
|
6853
8146
|
|
|
6854
8147
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
6855
8148
|
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
6856
|
-
var InlineEditTextArea = (0,
|
|
8149
|
+
var InlineEditTextArea = (0, import_react70.forwardRef)((props, ref) => {
|
|
6857
8150
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
6858
|
-
const textareaRef = (0,
|
|
8151
|
+
const textareaRef = (0, import_react70.useRef)(null);
|
|
6859
8152
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
6860
8153
|
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
6861
8154
|
InlineEdit,
|
|
@@ -6873,12 +8166,12 @@ var InlineEditTextArea = (0, import_react69.forwardRef)((props, ref) => {
|
|
|
6873
8166
|
});
|
|
6874
8167
|
|
|
6875
8168
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
6876
|
-
var
|
|
8169
|
+
var import_react72 = require("react");
|
|
6877
8170
|
|
|
6878
8171
|
// src/components/InlineEdit/InlineInput.tsx
|
|
6879
|
-
var
|
|
8172
|
+
var import_react71 = require("react");
|
|
6880
8173
|
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
6881
|
-
var InlineInput = (0,
|
|
8174
|
+
var InlineInput = (0, import_react71.forwardRef)(
|
|
6882
8175
|
(props, ref) => {
|
|
6883
8176
|
const {
|
|
6884
8177
|
id,
|
|
@@ -6891,14 +8184,14 @@ var InlineInput = (0, import_react70.forwardRef)(
|
|
|
6891
8184
|
hideIcon,
|
|
6892
8185
|
...rest
|
|
6893
8186
|
} = props;
|
|
6894
|
-
const genereatedId = (0,
|
|
8187
|
+
const genereatedId = (0, import_react71.useId)();
|
|
6895
8188
|
const uniqueId = id != null ? id : `${genereatedId}-InlineInput`;
|
|
6896
8189
|
const hasErrorMessage = !!errorMessage;
|
|
6897
8190
|
const hasError = !!error;
|
|
6898
8191
|
const hasErrorState = hasError || hasErrorMessage;
|
|
6899
8192
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
6900
8193
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
6901
|
-
const inputRef = (0,
|
|
8194
|
+
const inputRef = (0, import_react71.useRef)(null);
|
|
6902
8195
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
6903
8196
|
return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
6904
8197
|
/* @__PURE__ */ (0, import_jsx_runtime229.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
@@ -6945,9 +8238,9 @@ InlineInput.displayName = "InlineInput";
|
|
|
6945
8238
|
|
|
6946
8239
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
6947
8240
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
6948
|
-
var InlineEditInput = (0,
|
|
8241
|
+
var InlineEditInput = (0, import_react72.forwardRef)((props, ref) => {
|
|
6949
8242
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
6950
|
-
const inputRef = (0,
|
|
8243
|
+
const inputRef = (0, import_react72.useRef)(null);
|
|
6951
8244
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
6952
8245
|
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
6953
8246
|
InlineEdit,
|
|
@@ -6965,7 +8258,7 @@ var InlineEditInput = (0, import_react71.forwardRef)((props, ref) => {
|
|
|
6965
8258
|
});
|
|
6966
8259
|
|
|
6967
8260
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
6968
|
-
var
|
|
8261
|
+
var import_react74 = require("react");
|
|
6969
8262
|
|
|
6970
8263
|
// src/components/InternalHeader/InternalHeader.module.css
|
|
6971
8264
|
var InternalHeader_default = {
|
|
@@ -6983,9 +8276,9 @@ var InternalHeader_default = {
|
|
|
6983
8276
|
};
|
|
6984
8277
|
|
|
6985
8278
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
6986
|
-
var
|
|
8279
|
+
var import_react73 = require("react");
|
|
6987
8280
|
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
6988
|
-
var NavigationItem = (0,
|
|
8281
|
+
var NavigationItem = (0, import_react73.forwardRef)(({ title, isCurrent, ...rest }, ref) => {
|
|
6989
8282
|
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
6990
8283
|
"a",
|
|
6991
8284
|
{
|
|
@@ -7021,11 +8314,11 @@ var InternalHeader = (props) => {
|
|
|
7021
8314
|
htmlProps,
|
|
7022
8315
|
...rest
|
|
7023
8316
|
} = props;
|
|
7024
|
-
const [contextMenuIsClosed, setContextMenuIsClosed] = (0,
|
|
7025
|
-
const [currentPage, setCurrentPage] = (0,
|
|
8317
|
+
const [contextMenuIsClosed, setContextMenuIsClosed] = (0, import_react74.useState)(true);
|
|
8318
|
+
const [currentPage, setCurrentPage] = (0, import_react74.useState)(
|
|
7026
8319
|
currentPageHref
|
|
7027
8320
|
);
|
|
7028
|
-
const buttonRef = (0,
|
|
8321
|
+
const buttonRef = (0, import_react74.useRef)(null);
|
|
7029
8322
|
const handleCurrentPageChange = (href) => {
|
|
7030
8323
|
setCurrentPage(href);
|
|
7031
8324
|
onCurrentPageChange && onCurrentPageChange();
|
|
@@ -7121,7 +8414,7 @@ var InternalHeader = (props) => {
|
|
|
7121
8414
|
InternalHeader.displayName = "InternalHeader";
|
|
7122
8415
|
|
|
7123
8416
|
// src/components/List/List.tsx
|
|
7124
|
-
var
|
|
8417
|
+
var import_react75 = require("react");
|
|
7125
8418
|
|
|
7126
8419
|
// src/components/List/List.module.css
|
|
7127
8420
|
var List_default = {
|
|
@@ -7134,7 +8427,7 @@ var List_default = {
|
|
|
7134
8427
|
|
|
7135
8428
|
// src/components/List/List.tsx
|
|
7136
8429
|
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
7137
|
-
var List = (0,
|
|
8430
|
+
var List = (0, import_react75.forwardRef)((props, ref) => {
|
|
7138
8431
|
const {
|
|
7139
8432
|
listType = "unordered",
|
|
7140
8433
|
typographyType = "inherit",
|
|
@@ -7162,9 +8455,9 @@ var List = (0, import_react74.forwardRef)((props, ref) => {
|
|
|
7162
8455
|
List.displayName = "List";
|
|
7163
8456
|
|
|
7164
8457
|
// src/components/List/ListItem.tsx
|
|
7165
|
-
var
|
|
8458
|
+
var import_react76 = require("react");
|
|
7166
8459
|
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
7167
|
-
var ListItem = (0,
|
|
8460
|
+
var ListItem = (0, import_react76.forwardRef)(
|
|
7168
8461
|
({ className, ...rest }, ref) => {
|
|
7169
8462
|
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("li", { ref, ...rest, className: cn(className, List_default.li) });
|
|
7170
8463
|
}
|
|
@@ -7172,7 +8465,7 @@ var ListItem = (0, import_react75.forwardRef)(
|
|
|
7172
8465
|
ListItem.displayName = "ListItem";
|
|
7173
8466
|
|
|
7174
8467
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
7175
|
-
var
|
|
8468
|
+
var import_react77 = require("react");
|
|
7176
8469
|
|
|
7177
8470
|
// src/components/LocalMessage/LocalMessage.module.css
|
|
7178
8471
|
var LocalMessage_default = {
|
|
@@ -7211,7 +8504,7 @@ var purposeVariants2 = {
|
|
|
7211
8504
|
icon: TipIcon
|
|
7212
8505
|
}
|
|
7213
8506
|
};
|
|
7214
|
-
var LocalMessage = (0,
|
|
8507
|
+
var LocalMessage = (0, import_react77.forwardRef)(
|
|
7215
8508
|
(props, ref) => {
|
|
7216
8509
|
const {
|
|
7217
8510
|
message,
|
|
@@ -7226,7 +8519,7 @@ var LocalMessage = (0, import_react76.forwardRef)(
|
|
|
7226
8519
|
htmlProps,
|
|
7227
8520
|
...rest
|
|
7228
8521
|
} = props;
|
|
7229
|
-
const [isClosed, setClosed] = (0,
|
|
8522
|
+
const [isClosed, setClosed] = (0, import_react77.useState)(false);
|
|
7230
8523
|
if (isClosed) {
|
|
7231
8524
|
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(import_jsx_runtime235.Fragment, {});
|
|
7232
8525
|
}
|
|
@@ -7279,7 +8572,7 @@ var LocalMessage = (0, import_react76.forwardRef)(
|
|
|
7279
8572
|
LocalMessage.displayName = "LocalMessage";
|
|
7280
8573
|
|
|
7281
8574
|
// src/components/Modal/Modal.tsx
|
|
7282
|
-
var
|
|
8575
|
+
var import_react78 = require("react");
|
|
7283
8576
|
var import_react_dom3 = require("react-dom");
|
|
7284
8577
|
|
|
7285
8578
|
// src/components/Modal/Backdrop/Backdrop.utils.tsx
|
|
@@ -7318,7 +8611,7 @@ var Modal_default = {
|
|
|
7318
8611
|
|
|
7319
8612
|
// src/components/Modal/Modal.tsx
|
|
7320
8613
|
var import_jsx_runtime236 = require("react/jsx-runtime");
|
|
7321
|
-
var Modal = (0,
|
|
8614
|
+
var Modal = (0, import_react78.forwardRef)((props, ref) => {
|
|
7322
8615
|
const {
|
|
7323
8616
|
isOpen = false,
|
|
7324
8617
|
parentElement = document.body,
|
|
@@ -7332,7 +8625,7 @@ var Modal = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
7332
8625
|
htmlProps,
|
|
7333
8626
|
...rest
|
|
7334
8627
|
} = props;
|
|
7335
|
-
const generatedId = (0,
|
|
8628
|
+
const generatedId = (0, import_react78.useId)();
|
|
7336
8629
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
7337
8630
|
const headerId = `${modalId}-header`;
|
|
7338
8631
|
const modalRef = useFocusTrap(isOpen, initialFocusRef);
|
|
@@ -7344,7 +8637,7 @@ var Modal = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
7344
8637
|
onClose();
|
|
7345
8638
|
}
|
|
7346
8639
|
};
|
|
7347
|
-
(0,
|
|
8640
|
+
(0, import_react78.useEffect)(() => {
|
|
7348
8641
|
if (isOpen) {
|
|
7349
8642
|
handleElementWithBackdropMount(document.body);
|
|
7350
8643
|
} else {
|
|
@@ -7407,9 +8700,9 @@ var Modal = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
7407
8700
|
Modal.displayName = "Modal";
|
|
7408
8701
|
|
|
7409
8702
|
// src/components/Modal/ModalBody.tsx
|
|
7410
|
-
var
|
|
8703
|
+
var import_react79 = require("react");
|
|
7411
8704
|
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
7412
|
-
var ModalBody = (0,
|
|
8705
|
+
var ModalBody = (0, import_react79.forwardRef)(
|
|
7413
8706
|
(props, ref) => {
|
|
7414
8707
|
const { children, id, className, scrollable, htmlProps, height, ...rest } = props;
|
|
7415
8708
|
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
@@ -7436,9 +8729,9 @@ var ModalBody = (0, import_react78.forwardRef)(
|
|
|
7436
8729
|
ModalBody.displayName = "ModalBody";
|
|
7437
8730
|
|
|
7438
8731
|
// src/components/Modal/ModalActions.tsx
|
|
7439
|
-
var
|
|
8732
|
+
var import_react80 = require("react");
|
|
7440
8733
|
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
7441
|
-
var ModalActions = (0,
|
|
8734
|
+
var ModalActions = (0, import_react80.forwardRef)(
|
|
7442
8735
|
({ className, ...rest }, ref) => {
|
|
7443
8736
|
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)("div", { ref, ...rest, className: cn(className, Modal_default.actions) });
|
|
7444
8737
|
}
|
|
@@ -7446,7 +8739,7 @@ var ModalActions = (0, import_react79.forwardRef)(
|
|
|
7446
8739
|
ModalActions.displayName = "ModalActions";
|
|
7447
8740
|
|
|
7448
8741
|
// src/components/Pagination/Pagination.tsx
|
|
7449
|
-
var
|
|
8742
|
+
var import_react82 = require("react");
|
|
7450
8743
|
|
|
7451
8744
|
// src/components/Pagination/Pagination.module.css
|
|
7452
8745
|
var Pagination_default = {
|
|
@@ -7462,8 +8755,8 @@ var Pagination_default = {
|
|
|
7462
8755
|
|
|
7463
8756
|
// src/components/Pagination/paginationGenerator.tsx
|
|
7464
8757
|
var arrayRange = (start, end) => {
|
|
7465
|
-
const
|
|
7466
|
-
return Array.from({ length }, (
|
|
8758
|
+
const length2 = end - start + 1;
|
|
8759
|
+
return Array.from({ length: length2 }, (_2, idx) => idx + start);
|
|
7467
8760
|
};
|
|
7468
8761
|
function PaginationGenerator(pagesAmount, activePage) {
|
|
7469
8762
|
const siblingsCount = 1;
|
|
@@ -7494,7 +8787,7 @@ function PaginationGenerator(pagesAmount, activePage) {
|
|
|
7494
8787
|
}
|
|
7495
8788
|
|
|
7496
8789
|
// src/components/Select/Select.tsx
|
|
7497
|
-
var
|
|
8790
|
+
var import_react81 = require("react");
|
|
7498
8791
|
var import_react_select2 = __toESM(require("react-select"));
|
|
7499
8792
|
|
|
7500
8793
|
// src/components/Select/Select.module.css
|
|
@@ -7684,7 +8977,7 @@ var {
|
|
|
7684
8977
|
noOptionsMessage: noOptionsMessage2,
|
|
7685
8978
|
valueContainer: valueContainer2
|
|
7686
8979
|
} = selectTokens;
|
|
7687
|
-
var
|
|
8980
|
+
var prefix2 = "dds-select";
|
|
7688
8981
|
function getContainerControlPadding(componentSize, isMulti) {
|
|
7689
8982
|
return isMulti ? control2.isMulti.sizes[componentSize].padding : control2.sizes[componentSize].padding;
|
|
7690
8983
|
}
|
|
@@ -7973,7 +9266,7 @@ function SelectInner(props, ref) {
|
|
|
7973
9266
|
"data-testid": dataTestId,
|
|
7974
9267
|
...rest
|
|
7975
9268
|
} = props;
|
|
7976
|
-
const generatedId = (0,
|
|
9269
|
+
const generatedId = (0, import_react81.useId)();
|
|
7977
9270
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
7978
9271
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
7979
9272
|
const hasLabel = !!label;
|
|
@@ -7992,7 +9285,7 @@ function SelectInner(props, ref) {
|
|
|
7992
9285
|
isMulti,
|
|
7993
9286
|
inputId: uniqueId,
|
|
7994
9287
|
name: uniqueId,
|
|
7995
|
-
classNamePrefix:
|
|
9288
|
+
classNamePrefix: prefix2,
|
|
7996
9289
|
styles: getCustomStyles(componentSize, hasErrorMessage, readOnly),
|
|
7997
9290
|
filterOption: (option3, inputValue) => {
|
|
7998
9291
|
const { label: label2 } = option3;
|
|
@@ -8038,15 +9331,15 @@ function SelectInner(props, ref) {
|
|
|
8038
9331
|
}
|
|
8039
9332
|
);
|
|
8040
9333
|
}
|
|
8041
|
-
var Select = (0,
|
|
9334
|
+
var Select = (0, import_react81.forwardRef)(SelectInner);
|
|
8042
9335
|
Select.displayName = "Select";
|
|
8043
9336
|
|
|
8044
9337
|
// src/components/Select/utils.ts
|
|
8045
|
-
var createSelectOptions = (...args) => args.map((
|
|
9338
|
+
var createSelectOptions = (...args) => args.map((v2) => ({ label: v2, value: v2 }));
|
|
8046
9339
|
|
|
8047
9340
|
// src/components/Pagination/Pagination.tsx
|
|
8048
9341
|
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
8049
|
-
var Pagination = (0,
|
|
9342
|
+
var Pagination = (0, import_react82.forwardRef)(
|
|
8050
9343
|
(props, ref) => {
|
|
8051
9344
|
const {
|
|
8052
9345
|
itemsAmount,
|
|
@@ -8069,8 +9362,8 @@ var Pagination = (0, import_react81.forwardRef)(
|
|
|
8069
9362
|
htmlProps,
|
|
8070
9363
|
...rest
|
|
8071
9364
|
} = props;
|
|
8072
|
-
const [activePage, setActivePage] = (0,
|
|
8073
|
-
const [itemsPerPage, setItemsPerPage] = (0,
|
|
9365
|
+
const [activePage, setActivePage] = (0, import_react82.useState)(defaultActivePage);
|
|
9366
|
+
const [itemsPerPage, setItemsPerPage] = (0, import_react82.useState)(defaultItemsPerPage);
|
|
8074
9367
|
const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
|
|
8075
9368
|
const items = PaginationGenerator(pagesLength, activePage);
|
|
8076
9369
|
const onPageChange = (event, page) => {
|
|
@@ -8087,7 +9380,7 @@ var Pagination = (0, import_react81.forwardRef)(
|
|
|
8087
9380
|
onSelectOptionChange(option3);
|
|
8088
9381
|
}
|
|
8089
9382
|
};
|
|
8090
|
-
const listItems = items.length > 0 ? items.map((item,
|
|
9383
|
+
const listItems = items.length > 0 ? items.map((item, i2) => {
|
|
8091
9384
|
const isActive = item === activePage;
|
|
8092
9385
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)("li", { className: Pagination_default.list__item, children: item !== "truncator" ? /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
8093
9386
|
Button,
|
|
@@ -8106,7 +9399,7 @@ var Pagination = (0, import_react81.forwardRef)(
|
|
|
8106
9399
|
icon: MoreHorizontalIcon,
|
|
8107
9400
|
className: Pagination_default["truncation-icon"]
|
|
8108
9401
|
}
|
|
8109
|
-
) }, `pagination-item-${
|
|
9402
|
+
) }, `pagination-item-${i2}`);
|
|
8110
9403
|
}) : void 0;
|
|
8111
9404
|
const previousPageButton = /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
8112
9405
|
Button,
|
|
@@ -8292,7 +9585,7 @@ Pagination.displayName = "Pagination";
|
|
|
8292
9585
|
|
|
8293
9586
|
// src/components/Popover/Popover.tsx
|
|
8294
9587
|
var import_dds_design_tokens17 = require("@norges-domstoler/dds-design-tokens");
|
|
8295
|
-
var
|
|
9588
|
+
var import_react83 = require("react");
|
|
8296
9589
|
|
|
8297
9590
|
// src/components/Popover/Popover.module.css
|
|
8298
9591
|
var Popover_default = {
|
|
@@ -8304,7 +9597,7 @@ var Popover_default = {
|
|
|
8304
9597
|
|
|
8305
9598
|
// src/components/Popover/Popover.tsx
|
|
8306
9599
|
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
8307
|
-
var Popover = (0,
|
|
9600
|
+
var Popover = (0, import_react83.forwardRef)(
|
|
8308
9601
|
(props, ref) => {
|
|
8309
9602
|
const {
|
|
8310
9603
|
title,
|
|
@@ -8388,7 +9681,7 @@ var Popover = (0, import_react82.forwardRef)(
|
|
|
8388
9681
|
Popover.displayName = "Popover";
|
|
8389
9682
|
|
|
8390
9683
|
// src/components/Popover/PopoverGroup.tsx
|
|
8391
|
-
var
|
|
9684
|
+
var import_react84 = require("react");
|
|
8392
9685
|
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
8393
9686
|
var PopoverGroup = ({
|
|
8394
9687
|
isOpen = false,
|
|
@@ -8397,8 +9690,8 @@ var PopoverGroup = ({
|
|
|
8397
9690
|
children,
|
|
8398
9691
|
popoverId
|
|
8399
9692
|
}) => {
|
|
8400
|
-
const [open, setOpen] = (0,
|
|
8401
|
-
const generatedId = (0,
|
|
9693
|
+
const [open, setOpen] = (0, import_react84.useState)(isOpen);
|
|
9694
|
+
const generatedId = (0, import_react84.useId)();
|
|
8402
9695
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
8403
9696
|
const handleOnCloseButtonClick = () => {
|
|
8404
9697
|
setOpen(false);
|
|
@@ -8408,8 +9701,8 @@ var PopoverGroup = ({
|
|
|
8408
9701
|
setOpen(!open);
|
|
8409
9702
|
onTriggerClick && onTriggerClick();
|
|
8410
9703
|
};
|
|
8411
|
-
const buttonRef = (0,
|
|
8412
|
-
const popoverRef = (0,
|
|
9704
|
+
const buttonRef = (0, import_react84.useRef)(null);
|
|
9705
|
+
const popoverRef = (0, import_react84.useRef)(null);
|
|
8413
9706
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
8414
9707
|
var _a;
|
|
8415
9708
|
if (open) {
|
|
@@ -8418,14 +9711,14 @@ var PopoverGroup = ({
|
|
|
8418
9711
|
}
|
|
8419
9712
|
});
|
|
8420
9713
|
const handleClose = () => setOpen(false);
|
|
8421
|
-
const Children8 =
|
|
8422
|
-
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, {
|
|
8423
9716
|
"aria-haspopup": "dialog",
|
|
8424
9717
|
"aria-controls": uniquePopoverId,
|
|
8425
9718
|
"aria-expanded": open,
|
|
8426
9719
|
onClick: handleOnTriggerClick,
|
|
8427
9720
|
ref: buttonRef
|
|
8428
|
-
}) : (0,
|
|
9721
|
+
}) : (0, import_react84.cloneElement)(child, {
|
|
8429
9722
|
isOpen: open,
|
|
8430
9723
|
"aria-hidden": !open,
|
|
8431
9724
|
id: uniquePopoverId,
|
|
@@ -8440,16 +9733,16 @@ var PopoverGroup = ({
|
|
|
8440
9733
|
PopoverGroup.displayName = "PopoverGroup";
|
|
8441
9734
|
|
|
8442
9735
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
8443
|
-
var
|
|
9736
|
+
var import_react87 = require("react");
|
|
8444
9737
|
|
|
8445
9738
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
8446
|
-
var
|
|
8447
|
-
var ProgressTrackerContext = (0,
|
|
9739
|
+
var import_react85 = require("react");
|
|
9740
|
+
var ProgressTrackerContext = (0, import_react85.createContext)(
|
|
8448
9741
|
{
|
|
8449
9742
|
activeStep: 0
|
|
8450
9743
|
}
|
|
8451
9744
|
);
|
|
8452
|
-
var useProgressTrackerContext = () => (0,
|
|
9745
|
+
var useProgressTrackerContext = () => (0, import_react85.useContext)(ProgressTrackerContext);
|
|
8453
9746
|
|
|
8454
9747
|
// src/components/ProgressTracker/ProgressTracker.module.css
|
|
8455
9748
|
var ProgressTracker_default = {
|
|
@@ -8473,7 +9766,7 @@ var ProgressTracker_default = {
|
|
|
8473
9766
|
};
|
|
8474
9767
|
|
|
8475
9768
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
8476
|
-
var
|
|
9769
|
+
var import_react86 = require("react");
|
|
8477
9770
|
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
8478
9771
|
var toItemState = (active, completed, disabled) => {
|
|
8479
9772
|
if (disabled) {
|
|
@@ -8504,7 +9797,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
8504
9797
|
const { activeStep, handleStepChange } = useProgressTrackerContext();
|
|
8505
9798
|
const active = activeStep === index;
|
|
8506
9799
|
const itemState = toItemState(active, completed, disabled);
|
|
8507
|
-
const stepNumberContent = (0,
|
|
9800
|
+
const stepNumberContent = (0, import_react86.useMemo)(() => {
|
|
8508
9801
|
if (completed) {
|
|
8509
9802
|
return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
8510
9803
|
}
|
|
@@ -8556,7 +9849,7 @@ ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
|
8556
9849
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
8557
9850
|
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
8558
9851
|
var ProgressTracker = (() => {
|
|
8559
|
-
const Res = (0,
|
|
9852
|
+
const Res = (0, import_react87.forwardRef)((props, ref) => {
|
|
8560
9853
|
const {
|
|
8561
9854
|
id,
|
|
8562
9855
|
activeStep = 0,
|
|
@@ -8566,12 +9859,12 @@ var ProgressTracker = (() => {
|
|
|
8566
9859
|
htmlProps,
|
|
8567
9860
|
...rest
|
|
8568
9861
|
} = props;
|
|
8569
|
-
const [thisActiveStep, setActiveStep] = (0,
|
|
9862
|
+
const [thisActiveStep, setActiveStep] = (0, import_react87.useState)(activeStep);
|
|
8570
9863
|
const handleChange = (step) => {
|
|
8571
9864
|
setActiveStep(step);
|
|
8572
9865
|
onStepChange && onStepChange(step);
|
|
8573
9866
|
};
|
|
8574
|
-
(0,
|
|
9867
|
+
(0, import_react87.useEffect)(() => {
|
|
8575
9868
|
if (activeStep !== void 0 && activeStep != thisActiveStep) {
|
|
8576
9869
|
setActiveStep(activeStep);
|
|
8577
9870
|
}
|
|
@@ -8580,7 +9873,7 @@ var ProgressTracker = (() => {
|
|
|
8580
9873
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
8581
9874
|
ref
|
|
8582
9875
|
};
|
|
8583
|
-
const steps = (0,
|
|
9876
|
+
const steps = (0, import_react87.useMemo)(() => {
|
|
8584
9877
|
const validChildren = removeInvalidChildren(children);
|
|
8585
9878
|
const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
|
|
8586
9879
|
const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
|
|
@@ -8602,35 +9895,35 @@ var ProgressTracker = (() => {
|
|
|
8602
9895
|
return Res;
|
|
8603
9896
|
})();
|
|
8604
9897
|
function removeInvalidChildren(children) {
|
|
8605
|
-
return
|
|
9898
|
+
return import_react87.Children.toArray(children).filter(import_react87.isValidElement);
|
|
8606
9899
|
}
|
|
8607
9900
|
function passIndexPropToProgressTrackerItem(children) {
|
|
8608
|
-
return
|
|
9901
|
+
return import_react87.Children.map(
|
|
8609
9902
|
children,
|
|
8610
|
-
(item, index) => (0,
|
|
9903
|
+
(item, index) => (0, import_react87.cloneElement)(item, {
|
|
8611
9904
|
...item.props,
|
|
8612
9905
|
index
|
|
8613
9906
|
})
|
|
8614
9907
|
);
|
|
8615
9908
|
}
|
|
8616
|
-
var intersperseItemsWithConnector = (children) =>
|
|
9909
|
+
var intersperseItemsWithConnector = (children) => import_react87.Children.map(children, (child, index) => {
|
|
8617
9910
|
if (index === 0) {
|
|
8618
9911
|
return child;
|
|
8619
9912
|
}
|
|
8620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(
|
|
9913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(import_react87.Fragment, { children: [
|
|
8621
9914
|
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)("div", { "aria-hidden": true, className: ProgressTracker_default.connector }),
|
|
8622
9915
|
child
|
|
8623
9916
|
] }, index);
|
|
8624
9917
|
});
|
|
8625
9918
|
|
|
8626
9919
|
// src/components/Search/Search.tsx
|
|
8627
|
-
var
|
|
9920
|
+
var import_react90 = require("react");
|
|
8628
9921
|
|
|
8629
9922
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
8630
|
-
var
|
|
8631
|
-
var AutocompleteSearchContext = (0,
|
|
9923
|
+
var import_react88 = require("react");
|
|
9924
|
+
var AutocompleteSearchContext = (0, import_react88.createContext)({});
|
|
8632
9925
|
var useAutocompleteSearch = () => {
|
|
8633
|
-
return (0,
|
|
9926
|
+
return (0, import_react88.useContext)(AutocompleteSearchContext);
|
|
8634
9927
|
};
|
|
8635
9928
|
|
|
8636
9929
|
// src/components/Search/Search.module.css
|
|
@@ -8680,9 +9973,9 @@ function createEmptyChangeEvent(inputElementId) {
|
|
|
8680
9973
|
}
|
|
8681
9974
|
|
|
8682
9975
|
// src/components/Search/SearchSuggestions.tsx
|
|
8683
|
-
var
|
|
9976
|
+
var import_react89 = require("react");
|
|
8684
9977
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
8685
|
-
var SearchSuggestions = (0,
|
|
9978
|
+
var SearchSuggestions = (0, import_react89.forwardRef)((props, ref) => {
|
|
8686
9979
|
const {
|
|
8687
9980
|
id,
|
|
8688
9981
|
searchId,
|
|
@@ -8773,7 +10066,7 @@ var getIconSize = (size2) => {
|
|
|
8773
10066
|
return "small";
|
|
8774
10067
|
}
|
|
8775
10068
|
};
|
|
8776
|
-
var Search = (0,
|
|
10069
|
+
var Search = (0, import_react90.forwardRef)(
|
|
8777
10070
|
({
|
|
8778
10071
|
componentSize = "medium",
|
|
8779
10072
|
buttonProps,
|
|
@@ -8789,7 +10082,7 @@ var Search = (0, import_react89.forwardRef)(
|
|
|
8789
10082
|
...rest
|
|
8790
10083
|
}, ref) => {
|
|
8791
10084
|
var _a;
|
|
8792
|
-
const generatedId = (0,
|
|
10085
|
+
const generatedId = (0, import_react90.useId)();
|
|
8793
10086
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
8794
10087
|
const hasLabel = !!label;
|
|
8795
10088
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
@@ -8798,7 +10091,7 @@ var Search = (0, import_react89.forwardRef)(
|
|
|
8798
10091
|
uniqueId,
|
|
8799
10092
|
"suggestions-description"
|
|
8800
10093
|
);
|
|
8801
|
-
const [hasValue, setHasValue] = (0,
|
|
10094
|
+
const [hasValue, setHasValue] = (0, import_react90.useState)(!!value);
|
|
8802
10095
|
const context = useAutocompleteSearch();
|
|
8803
10096
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
8804
10097
|
const handleChange = (e) => {
|
|
@@ -8913,24 +10206,24 @@ var Search = (0, import_react89.forwardRef)(
|
|
|
8913
10206
|
Search.displayName = "Search";
|
|
8914
10207
|
|
|
8915
10208
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
8916
|
-
var
|
|
10209
|
+
var import_react91 = require("react");
|
|
8917
10210
|
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
8918
10211
|
var SearchAutocompleteWrapper = (props) => {
|
|
8919
10212
|
const {
|
|
8920
10213
|
value,
|
|
8921
10214
|
data,
|
|
8922
|
-
filter,
|
|
10215
|
+
filter: filter2,
|
|
8923
10216
|
queryLength = 2,
|
|
8924
10217
|
onChange,
|
|
8925
10218
|
onSuggestionSelection,
|
|
8926
10219
|
children
|
|
8927
10220
|
} = props;
|
|
8928
|
-
const [inputValue, setInputValue] = (0,
|
|
8929
|
-
const [suggestions, setSuggestions] = (0,
|
|
8930
|
-
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);
|
|
8931
10224
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
8932
10225
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
8933
|
-
(0,
|
|
10226
|
+
(0, import_react91.useEffect)(() => {
|
|
8934
10227
|
if (suggestions.length > 0) {
|
|
8935
10228
|
openSuggestions();
|
|
8936
10229
|
} else {
|
|
@@ -8947,16 +10240,16 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
8947
10240
|
if (isWeightedValueData(data)) {
|
|
8948
10241
|
const { sortFunction, array } = data;
|
|
8949
10242
|
const filteredSuggestions = array.filter(
|
|
8950
|
-
(suggestion) =>
|
|
10243
|
+
(suggestion) => filter2 ? filter2(suggestion.text, query) : searchFilter(suggestion.text, query)
|
|
8951
10244
|
);
|
|
8952
|
-
finalSuggestions = filteredSuggestions.sort(sortFunction ? (
|
|
10245
|
+
finalSuggestions = filteredSuggestions.sort(sortFunction ? (a3, b) => sortFunction(a3, b) : void 0).map((item) => item.text);
|
|
8953
10246
|
} else {
|
|
8954
10247
|
const { sortFunction, array } = data;
|
|
8955
10248
|
const filteredSuggestions = array.filter(
|
|
8956
|
-
(suggestion) =>
|
|
10249
|
+
(suggestion) => filter2 ? filter2(suggestion, query) : searchFilter(suggestion, query)
|
|
8957
10250
|
);
|
|
8958
10251
|
finalSuggestions = filteredSuggestions.sort(
|
|
8959
|
-
sortFunction ? (
|
|
10252
|
+
sortFunction ? (a3, b) => sortFunction(a3, b) : void 0
|
|
8960
10253
|
);
|
|
8961
10254
|
}
|
|
8962
10255
|
}
|
|
@@ -8975,8 +10268,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
8975
10268
|
const handleSetInputValue = (value2) => {
|
|
8976
10269
|
setInputValue(value2 != null ? value2 : "");
|
|
8977
10270
|
};
|
|
8978
|
-
const inputRef = (0,
|
|
8979
|
-
const suggestionsRef = (0,
|
|
10271
|
+
const inputRef = (0, import_react91.useRef)(null);
|
|
10272
|
+
const suggestionsRef = (0, import_react91.useRef)(null);
|
|
8980
10273
|
useOnClickOutside([inputRef.current, suggestionsRef.current], () => {
|
|
8981
10274
|
closeSuggestions();
|
|
8982
10275
|
});
|
|
@@ -9000,17 +10293,17 @@ Search2.AutocompleteWrapper = SearchAutocompleteWrapper;
|
|
|
9000
10293
|
Search2.Suggestions = SearchSuggestions;
|
|
9001
10294
|
|
|
9002
10295
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
9003
|
-
var
|
|
10296
|
+
var import_react94 = require("react");
|
|
9004
10297
|
|
|
9005
10298
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
9006
|
-
var
|
|
9007
|
-
var CheckboxGroupContext = (0,
|
|
10299
|
+
var import_react92 = require("react");
|
|
10300
|
+
var CheckboxGroupContext = (0, import_react92.createContext)(null);
|
|
9008
10301
|
var useCheckboxGroup = () => {
|
|
9009
|
-
return (0,
|
|
10302
|
+
return (0, import_react92.useContext)(CheckboxGroupContext);
|
|
9010
10303
|
};
|
|
9011
10304
|
|
|
9012
10305
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
9013
|
-
var
|
|
10306
|
+
var import_react93 = require("react");
|
|
9014
10307
|
|
|
9015
10308
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
9016
10309
|
var SelectionControl_default = {
|
|
@@ -9031,7 +10324,7 @@ var SelectionControl_default = {
|
|
|
9031
10324
|
|
|
9032
10325
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
9033
10326
|
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
9034
|
-
var SelectionControl = (0,
|
|
10327
|
+
var SelectionControl = (0, import_react93.forwardRef)((props, ref) => {
|
|
9035
10328
|
const { controlType, className, ...rest } = props;
|
|
9036
10329
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
9037
10330
|
"span",
|
|
@@ -9046,7 +10339,7 @@ var SelectionControl = (0, import_react92.forwardRef)((props, ref) => {
|
|
|
9046
10339
|
}
|
|
9047
10340
|
);
|
|
9048
10341
|
});
|
|
9049
|
-
var Label2 = (0,
|
|
10342
|
+
var Label2 = (0, import_react93.forwardRef)(
|
|
9050
10343
|
(props, ref) => {
|
|
9051
10344
|
const {
|
|
9052
10345
|
disabled,
|
|
@@ -9089,7 +10382,7 @@ var selectionControlTypographyProps = {
|
|
|
9089
10382
|
|
|
9090
10383
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
9091
10384
|
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
9092
|
-
var Checkbox = (0,
|
|
10385
|
+
var Checkbox = (0, import_react94.forwardRef)(
|
|
9093
10386
|
(props, ref) => {
|
|
9094
10387
|
const {
|
|
9095
10388
|
id,
|
|
@@ -9104,7 +10397,7 @@ var Checkbox = (0, import_react93.forwardRef)(
|
|
|
9104
10397
|
htmlProps = {},
|
|
9105
10398
|
...rest
|
|
9106
10399
|
} = props;
|
|
9107
|
-
const generatedId = (0,
|
|
10400
|
+
const generatedId = (0, import_react94.useId)();
|
|
9108
10401
|
const uniqueId = id != null ? id : `${generatedId}-checkbox`;
|
|
9109
10402
|
const checkboxGroup = useCheckboxGroup();
|
|
9110
10403
|
const hasLabel = !!label;
|
|
@@ -9165,7 +10458,7 @@ var Checkbox = (0, import_react93.forwardRef)(
|
|
|
9165
10458
|
Checkbox.displayName = "Checkbox";
|
|
9166
10459
|
|
|
9167
10460
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
9168
|
-
var
|
|
10461
|
+
var import_react95 = require("react");
|
|
9169
10462
|
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
9170
10463
|
var CheckboxGroup = (props) => {
|
|
9171
10464
|
const {
|
|
@@ -9184,7 +10477,7 @@ var CheckboxGroup = (props) => {
|
|
|
9184
10477
|
...rest
|
|
9185
10478
|
} = props;
|
|
9186
10479
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
9187
|
-
const generatedId = (0,
|
|
10480
|
+
const generatedId = (0, import_react95.useId)();
|
|
9188
10481
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
9189
10482
|
const hasErrorMessage = !!errorMessage;
|
|
9190
10483
|
const showRequiredMarker = required || ariaRequired;
|
|
@@ -9240,13 +10533,13 @@ var CheckboxGroup = (props) => {
|
|
|
9240
10533
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
9241
10534
|
|
|
9242
10535
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
9243
|
-
var
|
|
10536
|
+
var import_react97 = require("react");
|
|
9244
10537
|
|
|
9245
10538
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
9246
|
-
var
|
|
9247
|
-
var RadioButtonGroupContext = (0,
|
|
10539
|
+
var import_react96 = require("react");
|
|
10540
|
+
var RadioButtonGroupContext = (0, import_react96.createContext)(null);
|
|
9248
10541
|
var useRadioButtonGroup = () => {
|
|
9249
|
-
return (0,
|
|
10542
|
+
return (0, import_react96.useContext)(RadioButtonGroupContext);
|
|
9250
10543
|
};
|
|
9251
10544
|
|
|
9252
10545
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
@@ -9260,7 +10553,7 @@ var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
|
9260
10553
|
}
|
|
9261
10554
|
return !!value;
|
|
9262
10555
|
};
|
|
9263
|
-
var RadioButton = (0,
|
|
10556
|
+
var RadioButton = (0, import_react97.forwardRef)(
|
|
9264
10557
|
(props, ref) => {
|
|
9265
10558
|
const {
|
|
9266
10559
|
id,
|
|
@@ -9284,7 +10577,7 @@ var RadioButton = (0, import_react96.forwardRef)(
|
|
|
9284
10577
|
style,
|
|
9285
10578
|
...restHtmlProps
|
|
9286
10579
|
} = htmlProps;
|
|
9287
|
-
const generatedId = (0,
|
|
10580
|
+
const generatedId = (0, import_react97.useId)();
|
|
9288
10581
|
const uniqueId = id != null ? id : `${generatedId}-radioButton`;
|
|
9289
10582
|
const hasLabel = !!label;
|
|
9290
10583
|
const radioButtonGroup = useRadioButtonGroup();
|
|
@@ -9344,7 +10637,7 @@ var RadioButton = (0, import_react96.forwardRef)(
|
|
|
9344
10637
|
RadioButton.displayName = "RadioButton";
|
|
9345
10638
|
|
|
9346
10639
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
9347
|
-
var
|
|
10640
|
+
var import_react98 = require("react");
|
|
9348
10641
|
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
9349
10642
|
var RadioButtonGroupInner = (props, ref) => {
|
|
9350
10643
|
const {
|
|
@@ -9366,8 +10659,8 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
9366
10659
|
...rest
|
|
9367
10660
|
} = props;
|
|
9368
10661
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
9369
|
-
const [groupValue, setGroupValue] = (0,
|
|
9370
|
-
const generatedId = (0,
|
|
10662
|
+
const [groupValue, setGroupValue] = (0, import_react98.useState)(value);
|
|
10663
|
+
const generatedId = (0, import_react98.useId)();
|
|
9371
10664
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
|
|
9372
10665
|
const handleChange = combineHandlers(
|
|
9373
10666
|
(e) => setGroupValue(e.target.value),
|
|
@@ -9428,11 +10721,11 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
9428
10721
|
}
|
|
9429
10722
|
);
|
|
9430
10723
|
};
|
|
9431
|
-
var RadioButtonGroup = (0,
|
|
10724
|
+
var RadioButtonGroup = (0, import_react98.forwardRef)(RadioButtonGroupInner);
|
|
9432
10725
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
9433
10726
|
|
|
9434
10727
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
9435
|
-
var
|
|
10728
|
+
var import_react99 = require("react");
|
|
9436
10729
|
|
|
9437
10730
|
// src/components/SkipToContent/SkipToContent.module.css
|
|
9438
10731
|
var SkipToContent_default = {
|
|
@@ -9442,7 +10735,7 @@ var SkipToContent_default = {
|
|
|
9442
10735
|
|
|
9443
10736
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
9444
10737
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
9445
|
-
var SkipToContent = (0,
|
|
10738
|
+
var SkipToContent = (0, import_react99.forwardRef)(
|
|
9446
10739
|
(props, ref) => {
|
|
9447
10740
|
const {
|
|
9448
10741
|
text = "Til hovedinnhold",
|
|
@@ -9479,7 +10772,7 @@ var SkipToContent = (0, import_react98.forwardRef)(
|
|
|
9479
10772
|
SkipToContent.displayName = "SkipToContent";
|
|
9480
10773
|
|
|
9481
10774
|
// src/components/SplitButton/SplitButton.tsx
|
|
9482
|
-
var
|
|
10775
|
+
var import_react100 = require("react");
|
|
9483
10776
|
|
|
9484
10777
|
// src/components/SplitButton/SplitButton.module.css
|
|
9485
10778
|
var SplitButton_default = {
|
|
@@ -9491,7 +10784,7 @@ var SplitButton_default = {
|
|
|
9491
10784
|
|
|
9492
10785
|
// src/components/SplitButton/SplitButton.tsx
|
|
9493
10786
|
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
9494
|
-
var SplitButton = (0,
|
|
10787
|
+
var SplitButton = (0, import_react100.forwardRef)(
|
|
9495
10788
|
(props, ref) => {
|
|
9496
10789
|
const {
|
|
9497
10790
|
size: size2,
|
|
@@ -9501,7 +10794,7 @@ var SplitButton = (0, import_react99.forwardRef)(
|
|
|
9501
10794
|
className,
|
|
9502
10795
|
...rest
|
|
9503
10796
|
} = props;
|
|
9504
|
-
const [isOpen, setIsOpen] = (0,
|
|
10797
|
+
const [isOpen, setIsOpen] = (0, import_react100.useState)(false);
|
|
9505
10798
|
const buttonStyleProps = {
|
|
9506
10799
|
purpose,
|
|
9507
10800
|
size: size2
|
|
@@ -9538,20 +10831,20 @@ var SplitButton = (0, import_react99.forwardRef)(
|
|
|
9538
10831
|
SplitButton.displayName = "SplitButton";
|
|
9539
10832
|
|
|
9540
10833
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
9541
|
-
var
|
|
10834
|
+
var import_react110 = require("react");
|
|
9542
10835
|
|
|
9543
10836
|
// src/components/Table/collapsible/Table.context.tsx
|
|
9544
|
-
var
|
|
9545
|
-
var CollapsibleTableContext = (0,
|
|
10837
|
+
var import_react101 = require("react");
|
|
10838
|
+
var CollapsibleTableContext = (0, import_react101.createContext)({
|
|
9546
10839
|
headerValues: [],
|
|
9547
10840
|
definingColumnIndex: [0]
|
|
9548
10841
|
});
|
|
9549
|
-
var useCollapsibleTableContext = () => (0,
|
|
10842
|
+
var useCollapsibleTableContext = () => (0, import_react101.useContext)(CollapsibleTableContext);
|
|
9550
10843
|
|
|
9551
10844
|
// src/components/Table/normal/Body.tsx
|
|
9552
|
-
var
|
|
10845
|
+
var import_react102 = require("react");
|
|
9553
10846
|
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
9554
|
-
var Body = (0,
|
|
10847
|
+
var Body = (0, import_react102.forwardRef)(
|
|
9555
10848
|
(props, ref) => {
|
|
9556
10849
|
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)("tbody", { ref, ...props });
|
|
9557
10850
|
}
|
|
@@ -9559,20 +10852,20 @@ var Body = (0, import_react101.forwardRef)(
|
|
|
9559
10852
|
Body.displayName = "Table.Body";
|
|
9560
10853
|
|
|
9561
10854
|
// src/components/Table/normal/Cell.tsx
|
|
9562
|
-
var
|
|
10855
|
+
var import_react104 = require("react");
|
|
9563
10856
|
|
|
9564
10857
|
// src/components/Table/normal/Head.tsx
|
|
9565
|
-
var
|
|
10858
|
+
var import_react103 = require("react");
|
|
9566
10859
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
9567
|
-
var Head = (0,
|
|
10860
|
+
var Head = (0, import_react103.forwardRef)(
|
|
9568
10861
|
({ children, ...rest }, ref) => {
|
|
9569
10862
|
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)("thead", { ref, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(HeadContext.Provider, { value: true, children }) });
|
|
9570
10863
|
}
|
|
9571
10864
|
);
|
|
9572
10865
|
Head.displayName = "Table.Head";
|
|
9573
|
-
var HeadContext = (0,
|
|
10866
|
+
var HeadContext = (0, import_react103.createContext)(false);
|
|
9574
10867
|
function useIsInTableHead() {
|
|
9575
|
-
const isInTableHead = (0,
|
|
10868
|
+
const isInTableHead = (0, import_react103.useContext)(HeadContext);
|
|
9576
10869
|
return isInTableHead;
|
|
9577
10870
|
}
|
|
9578
10871
|
|
|
@@ -9603,7 +10896,7 @@ var Table_default = {
|
|
|
9603
10896
|
|
|
9604
10897
|
// src/components/Table/normal/Cell.tsx
|
|
9605
10898
|
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
9606
|
-
var Cell = (0,
|
|
10899
|
+
var Cell = (0, import_react104.forwardRef)(
|
|
9607
10900
|
({
|
|
9608
10901
|
children,
|
|
9609
10902
|
type: _type,
|
|
@@ -9642,9 +10935,9 @@ var Cell = (0, import_react103.forwardRef)(
|
|
|
9642
10935
|
Cell.displayName = "Table.Cell";
|
|
9643
10936
|
|
|
9644
10937
|
// src/components/Table/normal/Foot.tsx
|
|
9645
|
-
var
|
|
10938
|
+
var import_react105 = require("react");
|
|
9646
10939
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
9647
|
-
var Foot = (0,
|
|
10940
|
+
var Foot = (0, import_react105.forwardRef)(
|
|
9648
10941
|
(props, ref) => {
|
|
9649
10942
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("tfoot", { ref, ...props });
|
|
9650
10943
|
}
|
|
@@ -9652,9 +10945,9 @@ var Foot = (0, import_react104.forwardRef)(
|
|
|
9652
10945
|
Foot.displayName = "Table.Foot";
|
|
9653
10946
|
|
|
9654
10947
|
// src/components/Table/normal/Row.tsx
|
|
9655
|
-
var
|
|
10948
|
+
var import_react106 = require("react");
|
|
9656
10949
|
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
9657
|
-
var Row = (0,
|
|
10950
|
+
var Row = (0, import_react106.forwardRef)(
|
|
9658
10951
|
({ type: _type, mode = "normal", hoverable, selected, className, ...rest }, ref) => {
|
|
9659
10952
|
const isInHeader = useIsInTableHead();
|
|
9660
10953
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
@@ -9681,7 +10974,7 @@ var Row = (0, import_react105.forwardRef)(
|
|
|
9681
10974
|
Row.displayName = "Table.Row";
|
|
9682
10975
|
|
|
9683
10976
|
// src/components/Table/normal/SortCell.tsx
|
|
9684
|
-
var
|
|
10977
|
+
var import_react107 = require("react");
|
|
9685
10978
|
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
9686
10979
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
9687
10980
|
if (!isSorted || !sortOrder) {
|
|
@@ -9689,7 +10982,7 @@ var makeSortIcon = (isSorted, sortOrder) => {
|
|
|
9689
10982
|
}
|
|
9690
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" });
|
|
9691
10984
|
};
|
|
9692
|
-
var SortCell = (0,
|
|
10985
|
+
var SortCell = (0, import_react107.forwardRef)(
|
|
9693
10986
|
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
9694
10987
|
Cell,
|
|
9695
10988
|
{
|
|
@@ -9721,7 +11014,7 @@ var SortCell = (0, import_react106.forwardRef)(
|
|
|
9721
11014
|
SortCell.displayName = "Table.SortCell";
|
|
9722
11015
|
|
|
9723
11016
|
// src/components/Table/normal/Table.tsx
|
|
9724
|
-
var
|
|
11017
|
+
var import_react108 = require("react");
|
|
9725
11018
|
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
9726
11019
|
function getDensityCn(value) {
|
|
9727
11020
|
switch (value) {
|
|
@@ -9732,7 +11025,7 @@ function getDensityCn(value) {
|
|
|
9732
11025
|
return "extra-compact";
|
|
9733
11026
|
}
|
|
9734
11027
|
}
|
|
9735
|
-
var Table = (0,
|
|
11028
|
+
var Table = (0, import_react108.forwardRef)(
|
|
9736
11029
|
({
|
|
9737
11030
|
density = "normal",
|
|
9738
11031
|
stickyHeader,
|
|
@@ -9762,23 +11055,23 @@ var Table = (0, import_react107.forwardRef)(
|
|
|
9762
11055
|
Table.displayName = "Table";
|
|
9763
11056
|
|
|
9764
11057
|
// src/components/Table/normal/TableWrapper.tsx
|
|
9765
|
-
var
|
|
11058
|
+
var import_react109 = require("react");
|
|
9766
11059
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
9767
11060
|
var TableWrapper = ({ className, ...rest }) => {
|
|
9768
|
-
const [overflowX, setOverflowX] = (0,
|
|
9769
|
-
const [windowWidth, setWindowWidth] = (0,
|
|
11061
|
+
const [overflowX, setOverflowX] = (0, import_react109.useState)(false);
|
|
11062
|
+
const [windowWidth, setWindowWidth] = (0, import_react109.useState)(window.innerWidth);
|
|
9770
11063
|
function isOverflowingX(event) {
|
|
9771
11064
|
return event.offsetWidth < event.scrollWidth;
|
|
9772
11065
|
}
|
|
9773
|
-
const wrapperRef = (0,
|
|
9774
|
-
(0,
|
|
11066
|
+
const wrapperRef = (0, import_react109.useRef)(null);
|
|
11067
|
+
(0, import_react109.useEffect)(() => {
|
|
9775
11068
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
9776
11069
|
setOverflowX(true);
|
|
9777
11070
|
return;
|
|
9778
11071
|
}
|
|
9779
11072
|
setOverflowX(false);
|
|
9780
11073
|
}, [windowWidth]);
|
|
9781
|
-
(0,
|
|
11074
|
+
(0, import_react109.useEffect)(() => {
|
|
9782
11075
|
function handleResize() {
|
|
9783
11076
|
setWindowWidth(window.innerWidth);
|
|
9784
11077
|
}
|
|
@@ -9813,7 +11106,7 @@ Table2.Foot = Foot;
|
|
|
9813
11106
|
|
|
9814
11107
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
9815
11108
|
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
9816
|
-
var CollapsibleRow = (0,
|
|
11109
|
+
var CollapsibleRow = (0, import_react110.forwardRef)(
|
|
9817
11110
|
({
|
|
9818
11111
|
type: _type,
|
|
9819
11112
|
className,
|
|
@@ -9826,8 +11119,8 @@ var CollapsibleRow = (0, import_react109.forwardRef)(
|
|
|
9826
11119
|
const isInHead = useIsInTableHead();
|
|
9827
11120
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
9828
11121
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
9829
|
-
const [childrenCollapsed, setChildrenCollapsed] = (0,
|
|
9830
|
-
(0,
|
|
11122
|
+
const [childrenCollapsed, setChildrenCollapsed] = (0, import_react110.useState)(true);
|
|
11123
|
+
(0, import_react110.useEffect)(() => {
|
|
9831
11124
|
!isCollapsed && setChildrenCollapsed(true);
|
|
9832
11125
|
}, [isCollapsed]);
|
|
9833
11126
|
const rowProps = (isOpenCollapsibleHeader) => {
|
|
@@ -9843,27 +11136,27 @@ var CollapsibleRow = (0, import_react109.forwardRef)(
|
|
|
9843
11136
|
};
|
|
9844
11137
|
};
|
|
9845
11138
|
const collapsedHeaderValues = headerValues.filter(
|
|
9846
|
-
(
|
|
11139
|
+
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
9847
11140
|
);
|
|
9848
|
-
const childrenArray =
|
|
11141
|
+
const childrenArray = import_react110.Children.toArray(children);
|
|
9849
11142
|
const collapsedChildren = childrenArray.filter(
|
|
9850
|
-
(
|
|
11143
|
+
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
9851
11144
|
);
|
|
9852
|
-
const
|
|
11145
|
+
const prefix3 = "collapsibleRow";
|
|
9853
11146
|
const collapsibleIds = [];
|
|
9854
11147
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
9855
|
-
const id = derivativeIdGenerator(
|
|
11148
|
+
const id = derivativeIdGenerator(prefix3, index.toString());
|
|
9856
11149
|
collapsibleIds.push(id);
|
|
9857
|
-
return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
|
|
11150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(import_react110.Fragment, { children: [
|
|
9858
11151
|
/* @__PURE__ */ (0, import_jsx_runtime264.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
9859
|
-
(0,
|
|
11152
|
+
(0, import_react110.isValidElement)(child) && (0, import_react110.cloneElement)(child, {
|
|
9860
11153
|
collapsibleProps: { isCollapsibleChild: true }
|
|
9861
11154
|
})
|
|
9862
11155
|
] }, `DL-${index}`);
|
|
9863
11156
|
}) : null;
|
|
9864
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;
|
|
9865
|
-
const definingColumnCells = childrenArray.slice().filter((
|
|
9866
|
-
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));
|
|
9867
11160
|
});
|
|
9868
11161
|
const headerRow = () => {
|
|
9869
11162
|
if (type !== "head" || !isCollapsed) return null;
|
|
@@ -9916,9 +11209,9 @@ var CollapsibleRow = (0, import_react109.forwardRef)(
|
|
|
9916
11209
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
9917
11210
|
|
|
9918
11211
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
9919
|
-
var
|
|
11212
|
+
var import_react111 = require("react");
|
|
9920
11213
|
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
9921
|
-
var CollapsibleTable = (0,
|
|
11214
|
+
var CollapsibleTable = (0, import_react111.forwardRef)((props, ref) => {
|
|
9922
11215
|
const {
|
|
9923
11216
|
isCollapsed,
|
|
9924
11217
|
headerValues,
|
|
@@ -9944,11 +11237,11 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
9944
11237
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
9945
11238
|
|
|
9946
11239
|
// src/components/Tabs/Tabs.tsx
|
|
9947
|
-
var
|
|
11240
|
+
var import_react113 = require("react");
|
|
9948
11241
|
|
|
9949
11242
|
// src/components/Tabs/Tabs.context.tsx
|
|
9950
|
-
var
|
|
9951
|
-
var TabsContext = (0,
|
|
11243
|
+
var import_react112 = require("react");
|
|
11244
|
+
var TabsContext = (0, import_react112.createContext)({
|
|
9952
11245
|
activeTab: 0,
|
|
9953
11246
|
tabsId: "",
|
|
9954
11247
|
handleTabChange: () => null,
|
|
@@ -9958,7 +11251,7 @@ var TabsContext = (0, import_react111.createContext)({
|
|
|
9958
11251
|
setHasTabFocus: () => null,
|
|
9959
11252
|
tabContentDirection: "row"
|
|
9960
11253
|
});
|
|
9961
|
-
var useTabsContext = () => (0,
|
|
11254
|
+
var useTabsContext = () => (0, import_react112.useContext)(TabsContext);
|
|
9962
11255
|
|
|
9963
11256
|
// src/components/Tabs/Tabs.module.css
|
|
9964
11257
|
var Tabs_default = {
|
|
@@ -9976,7 +11269,7 @@ var Tabs_default = {
|
|
|
9976
11269
|
|
|
9977
11270
|
// src/components/Tabs/Tabs.tsx
|
|
9978
11271
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
9979
|
-
var Tabs = (0,
|
|
11272
|
+
var Tabs = (0, import_react113.forwardRef)((props, ref) => {
|
|
9980
11273
|
const {
|
|
9981
11274
|
id,
|
|
9982
11275
|
activeTab,
|
|
@@ -9988,17 +11281,17 @@ var Tabs = (0, import_react112.forwardRef)((props, ref) => {
|
|
|
9988
11281
|
htmlProps,
|
|
9989
11282
|
...rest
|
|
9990
11283
|
} = props;
|
|
9991
|
-
const generatedId = (0,
|
|
11284
|
+
const generatedId = (0, import_react113.useId)();
|
|
9992
11285
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
9993
|
-
const [thisActiveTab, setActiveTab] = (0,
|
|
9994
|
-
const [hasTabFocus, setHasTabFocus] = (0,
|
|
9995
|
-
const tabListRef = (0,
|
|
9996
|
-
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);
|
|
9997
11290
|
const handleTabChange = (index) => {
|
|
9998
11291
|
setActiveTab(index);
|
|
9999
11292
|
onChange && onChange(index);
|
|
10000
11293
|
};
|
|
10001
|
-
(0,
|
|
11294
|
+
(0, import_react113.useEffect)(() => {
|
|
10002
11295
|
if (activeTab !== void 0 && activeTab !== thisActiveTab) {
|
|
10003
11296
|
setActiveTab(activeTab);
|
|
10004
11297
|
}
|
|
@@ -10040,12 +11333,12 @@ var Tabs = (0, import_react112.forwardRef)((props, ref) => {
|
|
|
10040
11333
|
Tabs.displayName = "Tabs";
|
|
10041
11334
|
|
|
10042
11335
|
// src/components/Tabs/Tab.tsx
|
|
10043
|
-
var
|
|
11336
|
+
var import_react115 = require("react");
|
|
10044
11337
|
|
|
10045
11338
|
// src/components/Tabs/TabWidthContext.tsx
|
|
10046
|
-
var
|
|
11339
|
+
var import_react114 = require("react");
|
|
10047
11340
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
10048
|
-
var TabContext = (0,
|
|
11341
|
+
var TabContext = (0, import_react114.createContext)(null);
|
|
10049
11342
|
function TabWidthContextProvider({
|
|
10050
11343
|
children,
|
|
10051
11344
|
onChangeWidths
|
|
@@ -10055,15 +11348,15 @@ function TabWidthContextProvider({
|
|
|
10055
11348
|
{
|
|
10056
11349
|
value: {
|
|
10057
11350
|
updateWidth: (index, newWidth) => {
|
|
10058
|
-
onChangeWidths((
|
|
10059
|
-
const newValue = [...
|
|
11351
|
+
onChangeWidths((prev2) => {
|
|
11352
|
+
const newValue = [...prev2];
|
|
10060
11353
|
newValue[index] = newWidth;
|
|
10061
11354
|
return newValue;
|
|
10062
11355
|
});
|
|
10063
11356
|
},
|
|
10064
11357
|
removeTab: (index) => {
|
|
10065
|
-
onChangeWidths((
|
|
10066
|
-
const newValue = [...
|
|
11358
|
+
onChangeWidths((prev2) => {
|
|
11359
|
+
const newValue = [...prev2];
|
|
10067
11360
|
newValue.splice(index, 1);
|
|
10068
11361
|
return newValue;
|
|
10069
11362
|
});
|
|
@@ -10074,8 +11367,8 @@ function TabWidthContextProvider({
|
|
|
10074
11367
|
);
|
|
10075
11368
|
}
|
|
10076
11369
|
function useSetTabWidth(index, width) {
|
|
10077
|
-
const context = (0,
|
|
10078
|
-
(0,
|
|
11370
|
+
const context = (0, import_react114.useContext)(TabContext);
|
|
11371
|
+
(0, import_react114.useLayoutEffect)(() => {
|
|
10079
11372
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
10080
11373
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
10081
11374
|
}, [index, width]);
|
|
@@ -10083,7 +11376,7 @@ function useSetTabWidth(index, width) {
|
|
|
10083
11376
|
|
|
10084
11377
|
// src/components/Tabs/Tab.tsx
|
|
10085
11378
|
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
10086
|
-
var Tab = (0,
|
|
11379
|
+
var Tab = (0, import_react115.forwardRef)((props, ref) => {
|
|
10087
11380
|
const {
|
|
10088
11381
|
active = false,
|
|
10089
11382
|
icon: icon2,
|
|
@@ -10100,16 +11393,16 @@ var Tab = (0, import_react114.forwardRef)((props, ref) => {
|
|
|
10100
11393
|
...rest
|
|
10101
11394
|
} = props;
|
|
10102
11395
|
useSetTabWidth(index, width);
|
|
10103
|
-
const itemRef = (0,
|
|
11396
|
+
const itemRef = (0, import_react115.useRef)(null);
|
|
10104
11397
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
10105
11398
|
const { tabContentDirection } = useTabsContext();
|
|
10106
|
-
(0,
|
|
11399
|
+
(0, import_react115.useEffect)(() => {
|
|
10107
11400
|
var _a;
|
|
10108
11401
|
if (focus) {
|
|
10109
11402
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
10110
11403
|
}
|
|
10111
11404
|
}, [focus]);
|
|
10112
|
-
const handleSelect = (0,
|
|
11405
|
+
const handleSelect = (0, import_react115.useCallback)(() => {
|
|
10113
11406
|
if (setFocus && index) {
|
|
10114
11407
|
setFocus(index);
|
|
10115
11408
|
}
|
|
@@ -10154,9 +11447,9 @@ var Tab = (0, import_react114.forwardRef)((props, ref) => {
|
|
|
10154
11447
|
Tab.displayName = "Tab";
|
|
10155
11448
|
|
|
10156
11449
|
// src/components/Tabs/TabList.tsx
|
|
10157
|
-
var
|
|
11450
|
+
var import_react116 = require("react");
|
|
10158
11451
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
10159
|
-
var TabList = (0,
|
|
11452
|
+
var TabList = (0, import_react116.forwardRef)(
|
|
10160
11453
|
({ children, id, style, onFocus, ...rest }, ref) => {
|
|
10161
11454
|
const {
|
|
10162
11455
|
activeTab,
|
|
@@ -10167,11 +11460,11 @@ var TabList = (0, import_react115.forwardRef)(
|
|
|
10167
11460
|
setHasTabFocus
|
|
10168
11461
|
} = useTabsContext();
|
|
10169
11462
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
10170
|
-
const childrenArray =
|
|
11463
|
+
const childrenArray = import_react116.Children.toArray(children).length;
|
|
10171
11464
|
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
10172
11465
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
10173
|
-
const tabListChildren =
|
|
10174
|
-
return (0,
|
|
11466
|
+
const tabListChildren = import_react116.Children.map(children, (child, index) => {
|
|
11467
|
+
return (0, import_react116.isValidElement)(child) && (0, import_react116.cloneElement)(child, {
|
|
10175
11468
|
id: `${tabsId}-tab-${index}`,
|
|
10176
11469
|
"aria-controls": `${tabsId}-panel-${index}`,
|
|
10177
11470
|
active: activeTab === index,
|
|
@@ -10181,7 +11474,7 @@ var TabList = (0, import_react115.forwardRef)(
|
|
|
10181
11474
|
onClick: () => handleTabChange(index)
|
|
10182
11475
|
});
|
|
10183
11476
|
});
|
|
10184
|
-
const [widths, setWidths] = (0,
|
|
11477
|
+
const [widths, setWidths] = (0, import_react116.useState)([]);
|
|
10185
11478
|
const handleOnFocus = (event) => {
|
|
10186
11479
|
setHasTabFocus(true);
|
|
10187
11480
|
onFocus && onFocus(event);
|
|
@@ -10225,9 +11518,9 @@ var TabList = (0, import_react115.forwardRef)(
|
|
|
10225
11518
|
TabList.displayName = "TabList";
|
|
10226
11519
|
|
|
10227
11520
|
// src/components/Tabs/TabPanel.tsx
|
|
10228
|
-
var
|
|
11521
|
+
var import_react117 = require("react");
|
|
10229
11522
|
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
10230
|
-
var TabPanel = (0,
|
|
11523
|
+
var TabPanel = (0, import_react117.forwardRef)(
|
|
10231
11524
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
10232
11525
|
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
10233
11526
|
"div",
|
|
@@ -10254,15 +11547,15 @@ var TabPanel = (0, import_react116.forwardRef)(
|
|
|
10254
11547
|
TabPanel.displayName = "TabPanel";
|
|
10255
11548
|
|
|
10256
11549
|
// src/components/Tabs/TabPanels.tsx
|
|
10257
|
-
var
|
|
11550
|
+
var import_react118 = require("react");
|
|
10258
11551
|
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
10259
|
-
var TabPanels = (0,
|
|
11552
|
+
var TabPanels = (0, import_react118.forwardRef)(
|
|
10260
11553
|
({ children, ...rest }, ref) => {
|
|
10261
11554
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
10262
11555
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
10263
|
-
const panelChildren =
|
|
11556
|
+
const panelChildren = import_react118.Children.map(children, (child, index) => {
|
|
10264
11557
|
const active = index === activeTab;
|
|
10265
|
-
return (0,
|
|
11558
|
+
return (0, import_react118.isValidElement)(child) && (0, import_react118.cloneElement)(child, {
|
|
10266
11559
|
id: `${tabsId}-panel-${index}`,
|
|
10267
11560
|
"aria-labelledby": `${tabsId}-tab-${index}`,
|
|
10268
11561
|
active,
|
|
@@ -10275,7 +11568,7 @@ var TabPanels = (0, import_react117.forwardRef)(
|
|
|
10275
11568
|
TabPanels.displayName = "TabPanels";
|
|
10276
11569
|
|
|
10277
11570
|
// src/components/Tag/Tag.tsx
|
|
10278
|
-
var
|
|
11571
|
+
var import_react119 = require("react");
|
|
10279
11572
|
|
|
10280
11573
|
// src/components/Tag/Tag.module.css
|
|
10281
11574
|
var Tag_default = {
|
|
@@ -10312,7 +11605,7 @@ var purposeVariants3 = {
|
|
|
10312
11605
|
icon: void 0
|
|
10313
11606
|
}
|
|
10314
11607
|
};
|
|
10315
|
-
var Tag = (0,
|
|
11608
|
+
var Tag = (0, import_react119.forwardRef)((props, ref) => {
|
|
10316
11609
|
const {
|
|
10317
11610
|
text,
|
|
10318
11611
|
purpose = "default",
|
|
@@ -10352,10 +11645,10 @@ Tag.displayName = "Tag";
|
|
|
10352
11645
|
|
|
10353
11646
|
// src/components/TextInput/TextInput.tsx
|
|
10354
11647
|
var import_dds_design_tokens18 = require("@norges-domstoler/dds-design-tokens");
|
|
10355
|
-
var
|
|
11648
|
+
var import_react121 = require("react");
|
|
10356
11649
|
|
|
10357
11650
|
// src/components/TextInput/CharCounter.tsx
|
|
10358
|
-
var
|
|
11651
|
+
var import_react120 = require("react");
|
|
10359
11652
|
|
|
10360
11653
|
// src/components/TextInput/TextInput.module.css
|
|
10361
11654
|
var TextInput_default = {
|
|
@@ -10383,7 +11676,7 @@ var TextInput_default = {
|
|
|
10383
11676
|
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
10384
11677
|
function CharCounter(props) {
|
|
10385
11678
|
const { current, max, id, className, htmlProps, ...rest } = props;
|
|
10386
|
-
const generatedId = (0,
|
|
11679
|
+
const generatedId = (0, import_react120.useId)();
|
|
10387
11680
|
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
10388
11681
|
return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(
|
|
10389
11682
|
Typography,
|
|
@@ -10409,7 +11702,7 @@ var CharCounter_default = CharCounter;
|
|
|
10409
11702
|
|
|
10410
11703
|
// src/components/TextInput/TextInput.tsx
|
|
10411
11704
|
var import_jsx_runtime274 = require("react/jsx-runtime");
|
|
10412
|
-
var TextInput = (0,
|
|
11705
|
+
var TextInput = (0, import_react121.forwardRef)(
|
|
10413
11706
|
({
|
|
10414
11707
|
label,
|
|
10415
11708
|
disabled,
|
|
@@ -10431,39 +11724,39 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10431
11724
|
"aria-required": ariaRequired,
|
|
10432
11725
|
"aria-describedby": ariaDescribedby,
|
|
10433
11726
|
icon: icon2,
|
|
10434
|
-
prefix:
|
|
11727
|
+
prefix: prefix3,
|
|
10435
11728
|
suffix,
|
|
10436
11729
|
...rest
|
|
10437
11730
|
}, ref) => {
|
|
10438
|
-
const [text, setText] = (0,
|
|
11731
|
+
const [text, setText] = (0, import_react121.useState)(
|
|
10439
11732
|
getDefaultText(value, defaultValue)
|
|
10440
11733
|
);
|
|
10441
|
-
const prefixRef = (0,
|
|
10442
|
-
const suffixRef = (0,
|
|
10443
|
-
const [prefixLength, setPrefixLength] = (0,
|
|
10444
|
-
const [suffixLength, setSuffixLength] = (0,
|
|
10445
|
-
(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)(() => {
|
|
10446
11739
|
if (prefixRef.current) {
|
|
10447
11740
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
10448
11741
|
}
|
|
10449
11742
|
if (suffixRef.current) {
|
|
10450
11743
|
setSuffixLength(suffixRef.current.offsetWidth);
|
|
10451
11744
|
}
|
|
10452
|
-
}, [
|
|
11745
|
+
}, [prefix3, suffix, readOnly]);
|
|
10453
11746
|
const onChangeHandler = (event) => {
|
|
10454
11747
|
setText(event.target.value);
|
|
10455
11748
|
if (onChange) {
|
|
10456
11749
|
onChange(event);
|
|
10457
11750
|
}
|
|
10458
11751
|
};
|
|
10459
|
-
const generatedId = (0,
|
|
11752
|
+
const generatedId = (0, import_react121.useId)();
|
|
10460
11753
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
10461
11754
|
const hasErrorMessage = !!errorMessage;
|
|
10462
11755
|
const hasTip = !!tip;
|
|
10463
11756
|
const hasLabel = !!label;
|
|
10464
11757
|
const hasMessage = hasErrorMessage || hasTip || !!maxLength;
|
|
10465
11758
|
const hasIcon = !!icon2;
|
|
10466
|
-
const hasAffix = !!(
|
|
11759
|
+
const hasAffix = !!(prefix3 != null ? prefix3 : suffix);
|
|
10467
11760
|
const hasCharCounter = !!maxLength && Number.isInteger(maxLength) && maxLength > 0 && withCharacterCounter;
|
|
10468
11761
|
const characterCounterId = derivativeIdGenerator(
|
|
10469
11762
|
uniqueId,
|
|
@@ -10520,7 +11813,7 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10520
11813
|
] });
|
|
10521
11814
|
} else if (hasAffix) {
|
|
10522
11815
|
extendedInput = /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)("div", { className: TextInput_default["affix-container"], children: [
|
|
10523
|
-
|
|
11816
|
+
prefix3 && /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
10524
11817
|
"span",
|
|
10525
11818
|
{
|
|
10526
11819
|
ref: prefixRef,
|
|
@@ -10530,7 +11823,7 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10530
11823
|
TextInput_default.prefix,
|
|
10531
11824
|
readOnly && TextInput_default["prefix--readonly"]
|
|
10532
11825
|
),
|
|
10533
|
-
children:
|
|
11826
|
+
children: prefix3
|
|
10534
11827
|
}
|
|
10535
11828
|
),
|
|
10536
11829
|
/* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
@@ -10602,14 +11895,14 @@ var TextInput = (0, import_react120.forwardRef)(
|
|
|
10602
11895
|
TextInput.displayName = "TextInput";
|
|
10603
11896
|
|
|
10604
11897
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
10605
|
-
var
|
|
11898
|
+
var import_react123 = require("react");
|
|
10606
11899
|
|
|
10607
11900
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
10608
|
-
var
|
|
10609
|
-
var ToggleBarContext = (0,
|
|
11901
|
+
var import_react122 = require("react");
|
|
11902
|
+
var ToggleBarContext = (0, import_react122.createContext)({
|
|
10610
11903
|
size: "medium"
|
|
10611
11904
|
});
|
|
10612
|
-
var useToggleBarContext = () => (0,
|
|
11905
|
+
var useToggleBarContext = () => (0, import_react122.useContext)(ToggleBarContext);
|
|
10613
11906
|
|
|
10614
11907
|
// src/components/ToggleBar/ToggleBar.module.css
|
|
10615
11908
|
var ToggleBar_default = {
|
|
@@ -10643,9 +11936,9 @@ var ToggleBar = (props) => {
|
|
|
10643
11936
|
id,
|
|
10644
11937
|
...rest
|
|
10645
11938
|
} = props;
|
|
10646
|
-
const generatedId = (0,
|
|
11939
|
+
const generatedId = (0, import_react123.useId)();
|
|
10647
11940
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
10648
|
-
const [groupValue, setGroupValue] = (0,
|
|
11941
|
+
const [groupValue, setGroupValue] = (0, import_react123.useState)(value);
|
|
10649
11942
|
const handleChange = combineHandlers(
|
|
10650
11943
|
(e) => setGroupValue(e.target.value),
|
|
10651
11944
|
(e) => onChange && onChange(e, e.target.value)
|
|
@@ -10684,7 +11977,7 @@ var ToggleBar = (props) => {
|
|
|
10684
11977
|
ToggleBar.displayName = "ToggleBar";
|
|
10685
11978
|
|
|
10686
11979
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
10687
|
-
var
|
|
11980
|
+
var import_react124 = require("react");
|
|
10688
11981
|
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
10689
11982
|
var typographyTypes5 = {
|
|
10690
11983
|
large: "bodySans04",
|
|
@@ -10702,7 +11995,7 @@ var calculateChecked = (value, group, checked) => {
|
|
|
10702
11995
|
}
|
|
10703
11996
|
return !!value;
|
|
10704
11997
|
};
|
|
10705
|
-
var ToggleRadio = (0,
|
|
11998
|
+
var ToggleRadio = (0, import_react124.forwardRef)(
|
|
10706
11999
|
(props, ref) => {
|
|
10707
12000
|
const {
|
|
10708
12001
|
value,
|
|
@@ -10718,7 +12011,7 @@ var ToggleRadio = (0, import_react123.forwardRef)(
|
|
|
10718
12011
|
id,
|
|
10719
12012
|
...rest
|
|
10720
12013
|
} = props;
|
|
10721
|
-
const generatedId = (0,
|
|
12014
|
+
const generatedId = (0, import_react124.useId)();
|
|
10722
12015
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
10723
12016
|
const group = useToggleBarContext();
|
|
10724
12017
|
const handleChange = (event) => {
|
|
@@ -10772,7 +12065,7 @@ var ToggleRadio = (0, import_react123.forwardRef)(
|
|
|
10772
12065
|
ToggleRadio.displayName = "ToggleRadio";
|
|
10773
12066
|
|
|
10774
12067
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
10775
|
-
var
|
|
12068
|
+
var import_react125 = require("react");
|
|
10776
12069
|
|
|
10777
12070
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
10778
12071
|
var ToggleButton_default = {
|
|
@@ -10786,9 +12079,9 @@ var ToggleButton_default = {
|
|
|
10786
12079
|
|
|
10787
12080
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
10788
12081
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
10789
|
-
var ToggleButton = (0,
|
|
12082
|
+
var ToggleButton = (0, import_react125.forwardRef)(
|
|
10790
12083
|
({ id, label, icon: icon2, className, htmlProps, ...rest }, ref) => {
|
|
10791
|
-
const generatedId = (0,
|
|
12084
|
+
const generatedId = (0, import_react125.useId)();
|
|
10792
12085
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
10793
12086
|
return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("label", { htmlFor: uniqueId, className: ToggleButton_default.container, children: [
|
|
10794
12087
|
/* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
|
|
@@ -10829,7 +12122,7 @@ var ToggleButton = (0, import_react124.forwardRef)(
|
|
|
10829
12122
|
ToggleButton.displayName = "ToggleButton";
|
|
10830
12123
|
|
|
10831
12124
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
10832
|
-
var
|
|
12125
|
+
var import_react126 = require("react");
|
|
10833
12126
|
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
10834
12127
|
var ToggleButtonGroup = (props) => {
|
|
10835
12128
|
const {
|
|
@@ -10842,7 +12135,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
10842
12135
|
htmlProps,
|
|
10843
12136
|
...rest
|
|
10844
12137
|
} = props;
|
|
10845
|
-
const generatedId = (0,
|
|
12138
|
+
const generatedId = (0, import_react126.useId)();
|
|
10846
12139
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
10847
12140
|
return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
|
|
10848
12141
|
"div",
|