@norges-domstoler/dds-components 17.4.0 → 17.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +119 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +89 -5
- package/dist/index.d.ts +89 -5
- package/dist/index.js +1304 -359
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1293 -343
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -516,7 +516,7 @@ var Input_default = {
|
|
|
516
516
|
"input--with-affix": "Input_input--with-affix",
|
|
517
517
|
label: "Input_label",
|
|
518
518
|
"char-counter": "Input_char-counter",
|
|
519
|
-
|
|
519
|
+
"input-group__absolute-element": "Input_input-group__absolute-element"
|
|
520
520
|
};
|
|
521
521
|
|
|
522
522
|
// src/components/Typography/Caption/Caption.tsx
|
|
@@ -2157,7 +2157,7 @@ import { forwardRef as forwardRef5 } from "react";
|
|
|
2157
2157
|
import { useCallback } from "react";
|
|
2158
2158
|
function useCombinedRef(...refs) {
|
|
2159
2159
|
return useCallback((element) => {
|
|
2160
|
-
refs.forEach((ref) => {
|
|
2160
|
+
refs.filter(Boolean).forEach((ref) => {
|
|
2161
2161
|
if (typeof ref === "function") ref(element);
|
|
2162
2162
|
else if (ref && typeof ref === "object")
|
|
2163
2163
|
ref.current = element;
|
|
@@ -5427,6 +5427,17 @@ Card.displayName = "Card";
|
|
|
5427
5427
|
|
|
5428
5428
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
5429
5429
|
import { forwardRef as forwardRef28 } from "react";
|
|
5430
|
+
|
|
5431
|
+
// src/components/Card/CardAccordion/CardAccordion.module.css
|
|
5432
|
+
var CardAccordion_default = {
|
|
5433
|
+
container: "CardAccordion_container",
|
|
5434
|
+
"header-button": "CardAccordion_header-button",
|
|
5435
|
+
"header-container": "CardAccordion_header-container",
|
|
5436
|
+
body: "CardAccordion_body",
|
|
5437
|
+
body__content: "CardAccordion_body__content"
|
|
5438
|
+
};
|
|
5439
|
+
|
|
5440
|
+
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
5430
5441
|
import { jsx as jsx198 } from "react/jsx-runtime";
|
|
5431
5442
|
var CardAccordion = forwardRef28(
|
|
5432
5443
|
(props, ref) => {
|
|
@@ -5450,7 +5461,12 @@ var CardAccordion = forwardRef28(
|
|
|
5450
5461
|
return /* @__PURE__ */ jsx198(
|
|
5451
5462
|
"div",
|
|
5452
5463
|
{
|
|
5453
|
-
...getBaseHTMLProps(
|
|
5464
|
+
...getBaseHTMLProps(
|
|
5465
|
+
accordionId,
|
|
5466
|
+
cn(className, CardAccordion_default["container"]),
|
|
5467
|
+
htmlProps,
|
|
5468
|
+
rest
|
|
5469
|
+
),
|
|
5454
5470
|
ref,
|
|
5455
5471
|
children: /* @__PURE__ */ jsx198(
|
|
5456
5472
|
AccordionContextProvider,
|
|
@@ -5472,16 +5488,6 @@ CardAccordion.displayName = "CardAccordion";
|
|
|
5472
5488
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
5473
5489
|
import { ddsTokens as ddsTokens14 } from "@norges-domstoler/dds-design-tokens";
|
|
5474
5490
|
import { forwardRef as forwardRef29 } from "react";
|
|
5475
|
-
|
|
5476
|
-
// src/components/Card/CardAccordion/CardAccordion.module.css
|
|
5477
|
-
var CardAccordion_default = {
|
|
5478
|
-
"header-button": "CardAccordion_header-button",
|
|
5479
|
-
"header-container": "CardAccordion_header-container",
|
|
5480
|
-
body: "CardAccordion_body",
|
|
5481
|
-
body__content: "CardAccordion_body__content"
|
|
5482
|
-
};
|
|
5483
|
-
|
|
5484
|
-
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
5485
5491
|
import { jsx as jsx199, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5486
5492
|
var CardAccordionHeader = forwardRef29((props, ref) => {
|
|
5487
5493
|
const {
|
|
@@ -9783,7 +9789,10 @@ var DDSControl = (props, componentSize, readOnly, icon, dataTestId) => {
|
|
|
9783
9789
|
{
|
|
9784
9790
|
icon,
|
|
9785
9791
|
iconSize: getFormInputIconSize(componentSize),
|
|
9786
|
-
className: cn(
|
|
9792
|
+
className: cn(
|
|
9793
|
+
Input_default["input-group__absolute-element"],
|
|
9794
|
+
Select_default[`icon--${componentSize}`]
|
|
9795
|
+
)
|
|
9787
9796
|
}
|
|
9788
9797
|
),
|
|
9789
9798
|
props.children
|
|
@@ -10292,9 +10301,942 @@ var Pagination = forwardRef76(
|
|
|
10292
10301
|
);
|
|
10293
10302
|
Pagination.displayName = "Pagination";
|
|
10294
10303
|
|
|
10295
|
-
// src/components/
|
|
10304
|
+
// src/components/PhoneInput/PhoneInput.tsx
|
|
10296
10305
|
import { ddsTokens as ddsTokens15 } from "@norges-domstoler/dds-design-tokens";
|
|
10297
|
-
import {
|
|
10306
|
+
import {
|
|
10307
|
+
forwardRef as forwardRef77,
|
|
10308
|
+
useEffect as useEffect23,
|
|
10309
|
+
useId as useId17,
|
|
10310
|
+
useLayoutEffect as useLayoutEffect2,
|
|
10311
|
+
useRef as useRef27,
|
|
10312
|
+
useState as useState19
|
|
10313
|
+
} from "react";
|
|
10314
|
+
|
|
10315
|
+
// src/components/PhoneInput/constants.ts
|
|
10316
|
+
var COUNTRIES = {
|
|
10317
|
+
AF: {
|
|
10318
|
+
name: "Afghanistan (\u202B\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646\u202C\u200E)",
|
|
10319
|
+
id: "AF",
|
|
10320
|
+
dialCode: "+93"
|
|
10321
|
+
},
|
|
10322
|
+
AL: {
|
|
10323
|
+
name: "Albania (Shqip\xEBri)",
|
|
10324
|
+
id: "AL",
|
|
10325
|
+
dialCode: "+355"
|
|
10326
|
+
},
|
|
10327
|
+
DZ: {
|
|
10328
|
+
name: "Algeria (\u202B\u0627\u0644\u062C\u0632\u0627\u0626\u0631\u202C\u200E)",
|
|
10329
|
+
id: "DZ",
|
|
10330
|
+
dialCode: "+213"
|
|
10331
|
+
},
|
|
10332
|
+
AS: {
|
|
10333
|
+
name: "American Samoa",
|
|
10334
|
+
id: "AS",
|
|
10335
|
+
dialCode: "+1684"
|
|
10336
|
+
},
|
|
10337
|
+
AD: { name: "Andorra", id: "AD", dialCode: "+376" },
|
|
10338
|
+
AO: { name: "Angola", id: "AO", dialCode: "+244" },
|
|
10339
|
+
AI: { name: "Anguilla", id: "AI", dialCode: "+1264" },
|
|
10340
|
+
AG: {
|
|
10341
|
+
name: "Antigua and Barbuda",
|
|
10342
|
+
id: "AG",
|
|
10343
|
+
dialCode: "+1268"
|
|
10344
|
+
},
|
|
10345
|
+
AR: { name: "Argentina", id: "AR", dialCode: "+54" },
|
|
10346
|
+
AM: {
|
|
10347
|
+
name: "Armenia (\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576)",
|
|
10348
|
+
id: "AM",
|
|
10349
|
+
dialCode: "+374"
|
|
10350
|
+
},
|
|
10351
|
+
AW: { name: "Aruba", id: "AW", dialCode: "+297" },
|
|
10352
|
+
AU: { name: "Australia", id: "AU", dialCode: "+61" },
|
|
10353
|
+
AT: {
|
|
10354
|
+
name: "Austria (\xD6sterreich)",
|
|
10355
|
+
id: "AT",
|
|
10356
|
+
dialCode: "+43"
|
|
10357
|
+
},
|
|
10358
|
+
AZ: {
|
|
10359
|
+
name: "Azerbaijan (Az\u0259rbaycan)",
|
|
10360
|
+
id: "AZ",
|
|
10361
|
+
dialCode: "+994"
|
|
10362
|
+
},
|
|
10363
|
+
BS: { name: "Bahamas", id: "BS", dialCode: "+1242" },
|
|
10364
|
+
BH: {
|
|
10365
|
+
name: "Bahrain (\u202B\u0627\u0644\u0628\u062D\u0631\u064A\u0646\u202C\u200E)",
|
|
10366
|
+
id: "BH",
|
|
10367
|
+
dialCode: "+973"
|
|
10368
|
+
},
|
|
10369
|
+
BD: {
|
|
10370
|
+
name: "Bangladesh (\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6)",
|
|
10371
|
+
id: "BD",
|
|
10372
|
+
dialCode: "+880"
|
|
10373
|
+
},
|
|
10374
|
+
BB: { name: "Barbados", id: "BB", dialCode: "+1246" },
|
|
10375
|
+
BY: {
|
|
10376
|
+
name: "Belarus (\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u044C)",
|
|
10377
|
+
id: "BY",
|
|
10378
|
+
dialCode: "+375"
|
|
10379
|
+
},
|
|
10380
|
+
BE: { name: "Belgium (Belgi\xEB)", id: "BE", dialCode: "+32" },
|
|
10381
|
+
BZ: { name: "Belize", id: "BZ", dialCode: "+501" },
|
|
10382
|
+
BJ: { name: "Benin (B\xE9nin)", id: "BJ", dialCode: "+229" },
|
|
10383
|
+
BM: { name: "Bermuda", id: "BM", dialCode: "+1441" },
|
|
10384
|
+
BT: { name: "Bhutan (\u0F60\u0F56\u0FB2\u0F74\u0F42)", id: "BT", dialCode: "+975" },
|
|
10385
|
+
BO: { name: "Bolivia", id: "BO", dialCode: "+591" },
|
|
10386
|
+
BA: {
|
|
10387
|
+
name: "Bosnia and Herzegovina (\u0411\u043E\u0441\u043D\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430)",
|
|
10388
|
+
id: "BA",
|
|
10389
|
+
dialCode: "+387"
|
|
10390
|
+
},
|
|
10391
|
+
BW: { name: "Botswana", id: "BW", dialCode: "+267" },
|
|
10392
|
+
BR: { name: "Brazil (Brasil)", id: "BR", dialCode: "+55" },
|
|
10393
|
+
IO: {
|
|
10394
|
+
name: "British Indian Ocean Territory",
|
|
10395
|
+
id: "IO",
|
|
10396
|
+
dialCode: "+246"
|
|
10397
|
+
},
|
|
10398
|
+
VG: {
|
|
10399
|
+
name: "British Virgin Islands",
|
|
10400
|
+
id: "VG",
|
|
10401
|
+
dialCode: "+1284"
|
|
10402
|
+
},
|
|
10403
|
+
BN: { name: "Brunei", id: "BN", dialCode: "+673" },
|
|
10404
|
+
BG: {
|
|
10405
|
+
name: "Bulgaria (\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F)",
|
|
10406
|
+
id: "BG",
|
|
10407
|
+
dialCode: "+359"
|
|
10408
|
+
},
|
|
10409
|
+
BF: { name: "Burkina Faso", id: "BF", dialCode: "+226" },
|
|
10410
|
+
BI: {
|
|
10411
|
+
name: "Burundi (Uburundi)",
|
|
10412
|
+
id: "BI",
|
|
10413
|
+
dialCode: "+257"
|
|
10414
|
+
},
|
|
10415
|
+
KH: {
|
|
10416
|
+
name: "Cambodia (\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6)",
|
|
10417
|
+
id: "KH",
|
|
10418
|
+
dialCode: "+855"
|
|
10419
|
+
},
|
|
10420
|
+
CM: {
|
|
10421
|
+
name: "Cameroon (Cameroun)",
|
|
10422
|
+
id: "CM",
|
|
10423
|
+
dialCode: "+237"
|
|
10424
|
+
},
|
|
10425
|
+
CA: { name: "Canada", id: "CA", dialCode: "+1" },
|
|
10426
|
+
CV: {
|
|
10427
|
+
name: "Cape Verde (Kabu Verdi)",
|
|
10428
|
+
id: "CV",
|
|
10429
|
+
dialCode: "+238"
|
|
10430
|
+
},
|
|
10431
|
+
KY: {
|
|
10432
|
+
name: "Cayman Islands",
|
|
10433
|
+
id: "KY",
|
|
10434
|
+
dialCode: "+1345"
|
|
10435
|
+
},
|
|
10436
|
+
CF: {
|
|
10437
|
+
name: "Central African Republic (R\xE9publique centrafricaine)",
|
|
10438
|
+
id: "CF",
|
|
10439
|
+
dialCode: "+236"
|
|
10440
|
+
},
|
|
10441
|
+
TD: { name: "Chad (Tchad)", id: "TD", dialCode: "+235" },
|
|
10442
|
+
CL: { name: "Chile", id: "CL", dialCode: "+56" },
|
|
10443
|
+
CN: { name: "China (\u4E2D\u56FD)", id: "CN", dialCode: "+86" },
|
|
10444
|
+
CX: { name: "Christmas Island", id: "CX", dialCode: "+61" },
|
|
10445
|
+
CC: {
|
|
10446
|
+
name: "Cocos (Keeling) Islands",
|
|
10447
|
+
id: "CC",
|
|
10448
|
+
dialCode: "+61"
|
|
10449
|
+
},
|
|
10450
|
+
CO: { name: "Colombia", id: "CO", dialCode: "+57" },
|
|
10451
|
+
KM: {
|
|
10452
|
+
name: "Comoros (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)",
|
|
10453
|
+
id: "KM",
|
|
10454
|
+
dialCode: "+269"
|
|
10455
|
+
},
|
|
10456
|
+
CD: {
|
|
10457
|
+
name: "Congo (DRC) (Jamhuri ya Kisoemokrasia ya Kongo)",
|
|
10458
|
+
id: "CD",
|
|
10459
|
+
dialCode: "+243"
|
|
10460
|
+
},
|
|
10461
|
+
CG: {
|
|
10462
|
+
name: "Congo (Republic) (Congo-Brazzaville)",
|
|
10463
|
+
id: "CG",
|
|
10464
|
+
dialCode: "+242"
|
|
10465
|
+
},
|
|
10466
|
+
CK: { name: "Cook Islands", id: "CK", dialCode: "+682" },
|
|
10467
|
+
CR: { name: "Costa Rica", id: "CR", dialCode: "+506" },
|
|
10468
|
+
CI: { name: "C\xF4te d\u2019Ivoire", id: "CI", dialCode: "+225" },
|
|
10469
|
+
HR: {
|
|
10470
|
+
name: "Croatia (Hrvatska)",
|
|
10471
|
+
id: "HR",
|
|
10472
|
+
dialCode: "+385"
|
|
10473
|
+
},
|
|
10474
|
+
CU: { name: "Cuba", id: "CU", dialCode: "+53" },
|
|
10475
|
+
CW: { name: "Cura\xE7ao", id: "CW", dialCode: "+599" },
|
|
10476
|
+
CY: {
|
|
10477
|
+
name: "Cyprus (\u039A\u03CD\u03C0\u03C1\u03BF\u03C2)",
|
|
10478
|
+
id: "CY",
|
|
10479
|
+
dialCode: "+357"
|
|
10480
|
+
},
|
|
10481
|
+
CZ: {
|
|
10482
|
+
name: "Czech Republic (\u010Cesk\xE1 republika)",
|
|
10483
|
+
id: "CZ",
|
|
10484
|
+
dialCode: "+420"
|
|
10485
|
+
},
|
|
10486
|
+
DK: {
|
|
10487
|
+
name: "Denmark (Danmark)",
|
|
10488
|
+
id: "DK",
|
|
10489
|
+
dialCode: "+45"
|
|
10490
|
+
},
|
|
10491
|
+
DJ: { name: "Djibouti", id: "DJ", dialCode: "+253" },
|
|
10492
|
+
DM: { name: "Dominica", id: "DM", dialCode: "+1767" },
|
|
10493
|
+
DO: {
|
|
10494
|
+
name: "Dominican Republic (Rep\xFAblica Dominicana)",
|
|
10495
|
+
id: "DO",
|
|
10496
|
+
dialCode: "+1"
|
|
10497
|
+
},
|
|
10498
|
+
EC: { name: "Ecuador", id: "EC", dialCode: "+593" },
|
|
10499
|
+
EG: { name: "Egypt (\u202B\u0645\u0635\u0631\u202C\u200E)", id: "EG", dialCode: "+20" },
|
|
10500
|
+
SV: { name: "El Salvador", id: "SV", dialCode: "+503" },
|
|
10501
|
+
GQ: {
|
|
10502
|
+
name: "Equatorial Guinea (Guinea Ecuatorial)",
|
|
10503
|
+
id: "GQ",
|
|
10504
|
+
dialCode: "+240"
|
|
10505
|
+
},
|
|
10506
|
+
ER: { name: "Eritrea", id: "ER", dialCode: "+291" },
|
|
10507
|
+
EE: {
|
|
10508
|
+
name: "Estonia (Eesti)",
|
|
10509
|
+
id: "EE",
|
|
10510
|
+
dialCode: "+372"
|
|
10511
|
+
},
|
|
10512
|
+
ET: { name: "Ethiopia", id: "ET", dialCode: "+251" },
|
|
10513
|
+
FK: {
|
|
10514
|
+
name: "Falkland Islands (Islas Malvinas)",
|
|
10515
|
+
id: "FK",
|
|
10516
|
+
dialCode: "+500"
|
|
10517
|
+
},
|
|
10518
|
+
FO: {
|
|
10519
|
+
name: "Faroe Islands (F\xF8royar)",
|
|
10520
|
+
id: "FO",
|
|
10521
|
+
dialCode: "+298"
|
|
10522
|
+
},
|
|
10523
|
+
FJ: { name: "Fiji", id: "FJ", dialCode: "+679" },
|
|
10524
|
+
FI: {
|
|
10525
|
+
name: "Finland (Suomi)",
|
|
10526
|
+
id: "FI",
|
|
10527
|
+
dialCode: "+358"
|
|
10528
|
+
},
|
|
10529
|
+
FR: { name: "France", id: "FR", dialCode: "+33" },
|
|
10530
|
+
GF: {
|
|
10531
|
+
name: "French Guiana (Guyane fran\xE7aise)",
|
|
10532
|
+
id: "GF",
|
|
10533
|
+
dialCode: "+594"
|
|
10534
|
+
},
|
|
10535
|
+
PF: {
|
|
10536
|
+
name: "French Polynesia (Polyn\xE9sie fran\xE7aise)",
|
|
10537
|
+
id: "PF",
|
|
10538
|
+
dialCode: "+689"
|
|
10539
|
+
},
|
|
10540
|
+
GA: { name: "Gabon", id: "GA", dialCode: "+241" },
|
|
10541
|
+
GM: { name: "Gambia", id: "GM", dialCode: "+220" },
|
|
10542
|
+
GE: {
|
|
10543
|
+
name: "Georgia (\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD)",
|
|
10544
|
+
id: "GE",
|
|
10545
|
+
dialCode: "+995"
|
|
10546
|
+
},
|
|
10547
|
+
DE: {
|
|
10548
|
+
name: "Germany (Deutschland)",
|
|
10549
|
+
id: "DE",
|
|
10550
|
+
dialCode: "+49"
|
|
10551
|
+
},
|
|
10552
|
+
GH: { name: "Ghana (Gaana)", id: "GH", dialCode: "+233" },
|
|
10553
|
+
GI: { name: "Gibraltar", id: "GI", dialCode: "+350" },
|
|
10554
|
+
GR: { name: "Greece (\u0395\u03BB\u03BB\u03AC\u03B4\u03B1)", id: "GR", dialCode: "+30" },
|
|
10555
|
+
GL: {
|
|
10556
|
+
name: "Greenland (Kalaallit Nunaat)",
|
|
10557
|
+
id: "GL",
|
|
10558
|
+
dialCode: "+299"
|
|
10559
|
+
},
|
|
10560
|
+
GD: { name: "Grenada", id: "GD", dialCode: "+1473" },
|
|
10561
|
+
GP: { name: "Guadeloupe", id: "GP", dialCode: "+590" },
|
|
10562
|
+
GU: { name: "Guam", id: "GU", dialCode: "+1671" },
|
|
10563
|
+
GT: { name: "Guatemala", id: "GT", dialCode: "+502" },
|
|
10564
|
+
GG: { name: "Guernsey", id: "GG", dialCode: "+44" },
|
|
10565
|
+
GN: {
|
|
10566
|
+
name: "Guinea (Guin\xE9e)",
|
|
10567
|
+
id: "GN",
|
|
10568
|
+
dialCode: "+224"
|
|
10569
|
+
},
|
|
10570
|
+
GW: {
|
|
10571
|
+
name: "Guinea-Bissau (Guin\xE9 Bissau)",
|
|
10572
|
+
id: "GW",
|
|
10573
|
+
dialCode: "+245"
|
|
10574
|
+
},
|
|
10575
|
+
GY: { name: "Guyana", id: "GY", dialCode: "+592" },
|
|
10576
|
+
HT: { name: "Haiti", id: "HT", dialCode: "+509" },
|
|
10577
|
+
HN: { name: "Honduras", id: "HN", dialCode: "+504" },
|
|
10578
|
+
HK: {
|
|
10579
|
+
name: "Hong Kong (\u9999\u6E2F)",
|
|
10580
|
+
id: "HK",
|
|
10581
|
+
dialCode: "+852"
|
|
10582
|
+
},
|
|
10583
|
+
HU: {
|
|
10584
|
+
name: "Hungary (Magyarorsz\xE1g)",
|
|
10585
|
+
id: "HU",
|
|
10586
|
+
dialCode: "+36"
|
|
10587
|
+
},
|
|
10588
|
+
IS: {
|
|
10589
|
+
name: "Iceland (\xCDsland)",
|
|
10590
|
+
id: "IS",
|
|
10591
|
+
dialCode: "+354"
|
|
10592
|
+
},
|
|
10593
|
+
IN: { name: "India (\u092D\u093E\u0930\u0924)", id: "IN", dialCode: "+91" },
|
|
10594
|
+
ID: { name: "Indonesia", id: "ID", dialCode: "+62" },
|
|
10595
|
+
IR: { name: "Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)", id: "IR", dialCode: "+98" },
|
|
10596
|
+
IQ: {
|
|
10597
|
+
name: "Iraq (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)",
|
|
10598
|
+
id: "IQ",
|
|
10599
|
+
dialCode: "+964"
|
|
10600
|
+
},
|
|
10601
|
+
IE: { name: "Ireland", id: "IE", dialCode: "+353" },
|
|
10602
|
+
IM: { name: "Isle of Man", id: "IM", dialCode: "+44" },
|
|
10603
|
+
IL: {
|
|
10604
|
+
name: "Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)",
|
|
10605
|
+
id: "IL",
|
|
10606
|
+
dialCode: "+972"
|
|
10607
|
+
},
|
|
10608
|
+
IT: { name: "Italy (Italia)", id: "IT", dialCode: "+39" },
|
|
10609
|
+
JM: { name: "Jamaica", id: "JM", dialCode: "+1" },
|
|
10610
|
+
JP: { name: "Japan (\u65E5\u672C)", id: "JP", dialCode: "+81" },
|
|
10611
|
+
JE: { name: "Jersey", id: "JE", dialCode: "+44" },
|
|
10612
|
+
JO: {
|
|
10613
|
+
name: "Jordan (\u202B\u0627\u0644\u0623\u0631\u062F\u0646\u202C\u200E)",
|
|
10614
|
+
id: "JO",
|
|
10615
|
+
dialCode: "+962"
|
|
10616
|
+
},
|
|
10617
|
+
KZ: {
|
|
10618
|
+
name: "Kazakhstan (\u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D)",
|
|
10619
|
+
id: "KZ",
|
|
10620
|
+
dialCode: "+7"
|
|
10621
|
+
},
|
|
10622
|
+
KE: { name: "Kenya", id: "KE", dialCode: "+254" },
|
|
10623
|
+
KI: { name: "Kiribati", id: "KI", dialCode: "+686" },
|
|
10624
|
+
XK: { name: "Kosovo", id: "XK", dialCode: "+383" },
|
|
10625
|
+
KW: {
|
|
10626
|
+
name: "Kuwait (\u202B\u0627\u0644\u0643\u0648\u064A\u062A\u202C\u200E)",
|
|
10627
|
+
id: "KW",
|
|
10628
|
+
dialCode: "+965"
|
|
10629
|
+
},
|
|
10630
|
+
KG: {
|
|
10631
|
+
name: "Kyrgyzstan (\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D)",
|
|
10632
|
+
id: "KG",
|
|
10633
|
+
dialCode: "+996"
|
|
10634
|
+
},
|
|
10635
|
+
LA: { name: "Laos (\u0EA5\u0EB2\u0EA7)", id: "LA", dialCode: "+856" },
|
|
10636
|
+
LV: {
|
|
10637
|
+
name: "Latvia (Latvija)",
|
|
10638
|
+
id: "LV",
|
|
10639
|
+
dialCode: "+371"
|
|
10640
|
+
},
|
|
10641
|
+
LB: {
|
|
10642
|
+
name: "Lebanon (\u202B\u0644\u0628\u0646\u0627\u0646\u202C\u200E)",
|
|
10643
|
+
id: "LB",
|
|
10644
|
+
dialCode: "+961"
|
|
10645
|
+
},
|
|
10646
|
+
LS: { name: "Lesotho", id: "LS", dialCode: "+266" },
|
|
10647
|
+
LR: { name: "Liberia", id: "LR", dialCode: "+231" },
|
|
10648
|
+
LY: {
|
|
10649
|
+
name: "Libya (\u202B\u0644\u064A\u0628\u064A\u0627\u202C\u200E)",
|
|
10650
|
+
id: "LY",
|
|
10651
|
+
dialCode: "+218"
|
|
10652
|
+
},
|
|
10653
|
+
LI: { name: "Liechtenstein", id: "LI", dialCode: "+423" },
|
|
10654
|
+
LT: {
|
|
10655
|
+
name: "Lithuania (Lietuva)",
|
|
10656
|
+
id: "LT",
|
|
10657
|
+
dialCode: "+370"
|
|
10658
|
+
},
|
|
10659
|
+
LU: { name: "Luxembourg", id: "LU", dialCode: "+352" },
|
|
10660
|
+
MO: { name: "Macau (\u6FB3\u9580)", id: "MO", dialCode: "+853" },
|
|
10661
|
+
MK: {
|
|
10662
|
+
name: "North Macedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
|
|
10663
|
+
id: "MK",
|
|
10664
|
+
dialCode: "+389"
|
|
10665
|
+
},
|
|
10666
|
+
MG: {
|
|
10667
|
+
name: "Madagascar (Madagasikara)",
|
|
10668
|
+
id: "MG",
|
|
10669
|
+
dialCode: "+261"
|
|
10670
|
+
},
|
|
10671
|
+
MW: { name: "Malawi", id: "MW", dialCode: "+265" },
|
|
10672
|
+
MY: { name: "Malaysia", id: "MY", dialCode: "+60" },
|
|
10673
|
+
MV: { name: "Maldives", id: "MV", dialCode: "+960" },
|
|
10674
|
+
ML: { name: "Mali", id: "ML", dialCode: "+223" },
|
|
10675
|
+
MT: { name: "Malta", id: "MT", dialCode: "+356" },
|
|
10676
|
+
MH: {
|
|
10677
|
+
name: "Marshall Islands",
|
|
10678
|
+
id: "MH",
|
|
10679
|
+
dialCode: "+692"
|
|
10680
|
+
},
|
|
10681
|
+
MQ: { name: "Martinique", id: "MQ", dialCode: "+596" },
|
|
10682
|
+
MR: {
|
|
10683
|
+
name: "Mauritania (\u202B\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627\u202C\u200E)",
|
|
10684
|
+
id: "MR",
|
|
10685
|
+
dialCode: "+222"
|
|
10686
|
+
},
|
|
10687
|
+
MU: {
|
|
10688
|
+
name: "Mauritius (Moris)",
|
|
10689
|
+
id: "MU",
|
|
10690
|
+
dialCode: "+230"
|
|
10691
|
+
},
|
|
10692
|
+
YT: { name: "Mayotte", id: "YT", dialCode: "+262" },
|
|
10693
|
+
MX: { name: "Mexico (M\xE9xico)", id: "MX", dialCode: "+52" },
|
|
10694
|
+
FM: { name: "Micronesia", id: "FM", dialCode: "+691" },
|
|
10695
|
+
MD: {
|
|
10696
|
+
name: "Moldova (Republica Moldova)",
|
|
10697
|
+
id: "MD",
|
|
10698
|
+
dialCode: "+373"
|
|
10699
|
+
},
|
|
10700
|
+
MC: { name: "Monaco", id: "MC", dialCode: "+377" },
|
|
10701
|
+
MN: {
|
|
10702
|
+
name: "Mongolia (\u041C\u043E\u043D\u0433\u043E\u043B)",
|
|
10703
|
+
id: "MN",
|
|
10704
|
+
dialCode: "+976"
|
|
10705
|
+
},
|
|
10706
|
+
ME: {
|
|
10707
|
+
name: "Montenegro (Crna Gora)",
|
|
10708
|
+
id: "ME",
|
|
10709
|
+
dialCode: "+382"
|
|
10710
|
+
},
|
|
10711
|
+
MS: { name: "Montserrat", id: "MS", dialCode: "+1664" },
|
|
10712
|
+
MA: {
|
|
10713
|
+
name: "Morocco (\u202B\u0627\u0644\u0645\u063A\u0631\u0628\u202C\u200E)",
|
|
10714
|
+
id: "MA",
|
|
10715
|
+
dialCode: "+212"
|
|
10716
|
+
},
|
|
10717
|
+
MZ: {
|
|
10718
|
+
name: "Mozambique (Mo\xE7ambique)",
|
|
10719
|
+
id: "MZ",
|
|
10720
|
+
dialCode: "+258"
|
|
10721
|
+
},
|
|
10722
|
+
MM: {
|
|
10723
|
+
name: "Myanmar (Burma) (\u1019\u103C\u1014\u103A\u1019\u102C)",
|
|
10724
|
+
id: "MM",
|
|
10725
|
+
dialCode: "+95"
|
|
10726
|
+
},
|
|
10727
|
+
NA: {
|
|
10728
|
+
name: "Namibia (Namibi\xEB)",
|
|
10729
|
+
id: "NA",
|
|
10730
|
+
dialCode: "+264"
|
|
10731
|
+
},
|
|
10732
|
+
NR: { name: "Nauru", id: "NR", dialCode: "+674" },
|
|
10733
|
+
NP: { name: "Nepal (\u0928\u0947\u092A\u093E\u0932)", id: "NP", dialCode: "+977" },
|
|
10734
|
+
NL: {
|
|
10735
|
+
name: "Netherlands (Nederland)",
|
|
10736
|
+
id: "NL",
|
|
10737
|
+
dialCode: "+31"
|
|
10738
|
+
},
|
|
10739
|
+
NC: {
|
|
10740
|
+
name: "New Caledonia (Nouvelle-Cal\xE9donie)",
|
|
10741
|
+
id: "NC",
|
|
10742
|
+
dialCode: "+687"
|
|
10743
|
+
},
|
|
10744
|
+
NZ: { name: "New Zealand", id: "NZ", dialCode: "+64" },
|
|
10745
|
+
NI: { name: "Nicaragua", id: "NI", dialCode: "+505" },
|
|
10746
|
+
NE: { name: "Niger (Nijar)", id: "NE", dialCode: "+227" },
|
|
10747
|
+
NG: { name: "Nigeria", id: "NG", dialCode: "+234" },
|
|
10748
|
+
NU: { name: "Niue", id: "NU", dialCode: "+683" },
|
|
10749
|
+
NF: { name: "Norfolk Island", id: "NF", dialCode: "+672" },
|
|
10750
|
+
KP: {
|
|
10751
|
+
name: "North Korea (\uC870\uC120 \uBBFC\uC8FC\uC8FC\uC758 \uC778\uBBFC \uACF5\uD654\uAD6D)",
|
|
10752
|
+
id: "KP",
|
|
10753
|
+
dialCode: "+850"
|
|
10754
|
+
},
|
|
10755
|
+
MP: {
|
|
10756
|
+
name: "Northern Mariana Islands",
|
|
10757
|
+
id: "MP",
|
|
10758
|
+
dialCode: "+1670"
|
|
10759
|
+
},
|
|
10760
|
+
NO: { name: "Norway (Norge)", id: "NO", dialCode: "+47" },
|
|
10761
|
+
OM: {
|
|
10762
|
+
name: "Oman (\u202B\u0639\u064F\u0645\u0627\u0646\u202C\u200E)",
|
|
10763
|
+
id: "OM",
|
|
10764
|
+
dialCode: "+968"
|
|
10765
|
+
},
|
|
10766
|
+
PK: {
|
|
10767
|
+
name: "Pakistan (\u202B\u067E\u0627\u06A9\u0633\u062A\u0627\u0646\u202C\u200E)",
|
|
10768
|
+
id: "PK",
|
|
10769
|
+
dialCode: "+92"
|
|
10770
|
+
},
|
|
10771
|
+
PW: { name: "Palau", id: "PW", dialCode: "+680" },
|
|
10772
|
+
PS: {
|
|
10773
|
+
name: "Palestine (\u202B\u0641\u0644\u0633\u0637\u064A\u0646\u202C\u200E)",
|
|
10774
|
+
id: "PS",
|
|
10775
|
+
dialCode: "+970"
|
|
10776
|
+
},
|
|
10777
|
+
PA: {
|
|
10778
|
+
name: "Panama (Panam\xE1)",
|
|
10779
|
+
id: "PA",
|
|
10780
|
+
dialCode: "+507"
|
|
10781
|
+
},
|
|
10782
|
+
PG: {
|
|
10783
|
+
name: "Papua New Guinea",
|
|
10784
|
+
id: "PG",
|
|
10785
|
+
dialCode: "+675"
|
|
10786
|
+
},
|
|
10787
|
+
PY: { name: "Paraguay", id: "PY", dialCode: "+595" },
|
|
10788
|
+
PE: { name: "Peru (Per\xFA)", id: "PE", dialCode: "+51" },
|
|
10789
|
+
PH: { name: "Philippines", id: "PH", dialCode: "+63" },
|
|
10790
|
+
PL: { name: "Poland (Polska)", id: "PL", dialCode: "+48" },
|
|
10791
|
+
PT: { name: "Portugal", id: "PT", dialCode: "+351" },
|
|
10792
|
+
PR: { name: "Puerto Rico", id: "PR", dialCode: "+1" },
|
|
10793
|
+
QA: { name: "Qatar (\u202B\u0642\u0637\u0631\u202C\u200E)", id: "QA", dialCode: "+974" },
|
|
10794
|
+
RE: {
|
|
10795
|
+
name: "R\xE9union (La R\xE9union)",
|
|
10796
|
+
id: "RE",
|
|
10797
|
+
dialCode: "+262"
|
|
10798
|
+
},
|
|
10799
|
+
RO: {
|
|
10800
|
+
name: "Romania (Rom\xE2nia)",
|
|
10801
|
+
id: "RO",
|
|
10802
|
+
dialCode: "+40"
|
|
10803
|
+
},
|
|
10804
|
+
RU: { name: "Russia (\u0420\u043E\u0441\u0441\u0438\u044F)", id: "RU", dialCode: "+7" },
|
|
10805
|
+
RW: { name: "Rwanda", id: "RW", dialCode: "+250" },
|
|
10806
|
+
BL: {
|
|
10807
|
+
name: "Saint Barth\xE9lemy",
|
|
10808
|
+
id: "BL",
|
|
10809
|
+
dialCode: "+590"
|
|
10810
|
+
},
|
|
10811
|
+
SH: { name: "Saint Helena", id: "SH", dialCode: "+290" },
|
|
10812
|
+
KN: {
|
|
10813
|
+
name: "Saint Kitts and Nevis",
|
|
10814
|
+
id: "KN",
|
|
10815
|
+
dialCode: "+1869"
|
|
10816
|
+
},
|
|
10817
|
+
LC: { name: "Saint Lucia", id: "LC", dialCode: "+1758" },
|
|
10818
|
+
MF: {
|
|
10819
|
+
name: "Saint Martin (Saint-Martin (partie fran\xE7aise))",
|
|
10820
|
+
id: "MF",
|
|
10821
|
+
dialCode: "+590"
|
|
10822
|
+
},
|
|
10823
|
+
PM: {
|
|
10824
|
+
name: "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",
|
|
10825
|
+
id: "PM",
|
|
10826
|
+
dialCode: "+508"
|
|
10827
|
+
},
|
|
10828
|
+
VC: {
|
|
10829
|
+
name: "Saint Vincent and the Grenadines",
|
|
10830
|
+
id: "VC",
|
|
10831
|
+
dialCode: "+1784"
|
|
10832
|
+
},
|
|
10833
|
+
WS: { name: "Samoa", id: "WS", dialCode: "+685" },
|
|
10834
|
+
SM: { name: "San Marino", id: "SM", dialCode: "+378" },
|
|
10835
|
+
ST: {
|
|
10836
|
+
name: "S\xE3o Tom\xE9 and Pr\xEDncipe (S\xE3o Tom\xE9 e Pr\xEDncipe)",
|
|
10837
|
+
id: "ST",
|
|
10838
|
+
dialCode: "+239"
|
|
10839
|
+
},
|
|
10840
|
+
SA: {
|
|
10841
|
+
name: "Saudi Arabia (\u202B\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629\u202C\u200E)",
|
|
10842
|
+
id: "SA",
|
|
10843
|
+
dialCode: "+966"
|
|
10844
|
+
},
|
|
10845
|
+
SN: {
|
|
10846
|
+
name: "Senegal (S\xE9n\xE9gal)",
|
|
10847
|
+
id: "SN",
|
|
10848
|
+
dialCode: "+221"
|
|
10849
|
+
},
|
|
10850
|
+
RS: {
|
|
10851
|
+
name: "Serbia (\u0421\u0440\u0431\u0438\u0458\u0430)",
|
|
10852
|
+
id: "RS",
|
|
10853
|
+
dialCode: "+381"
|
|
10854
|
+
},
|
|
10855
|
+
SC: { name: "Seychelles", id: "SC", dialCode: "+248" },
|
|
10856
|
+
SL: { name: "Sierra Leone", id: "SL", dialCode: "+232" },
|
|
10857
|
+
SG: { name: "Singapore", id: "SG", dialCode: "+65" },
|
|
10858
|
+
SX: { name: "Sint Maarten", id: "SX", dialCode: "+1721" },
|
|
10859
|
+
SK: {
|
|
10860
|
+
name: "Slovakia (Slovensko)",
|
|
10861
|
+
id: "SK",
|
|
10862
|
+
dialCode: "+421"
|
|
10863
|
+
},
|
|
10864
|
+
SI: {
|
|
10865
|
+
name: "Slovenia (Slovenija)",
|
|
10866
|
+
id: "SI",
|
|
10867
|
+
dialCode: "+386"
|
|
10868
|
+
},
|
|
10869
|
+
SB: {
|
|
10870
|
+
name: "Solomon Islands",
|
|
10871
|
+
id: "SB",
|
|
10872
|
+
dialCode: "+677"
|
|
10873
|
+
},
|
|
10874
|
+
SO: {
|
|
10875
|
+
name: "Somalia (Soomaaliya)",
|
|
10876
|
+
id: "SO",
|
|
10877
|
+
dialCode: "+252"
|
|
10878
|
+
},
|
|
10879
|
+
ZA: { name: "South Africa", id: "ZA", dialCode: "+27" },
|
|
10880
|
+
KR: {
|
|
10881
|
+
name: "South Korea (\uB300\uD55C\uBBFC\uAD6D)",
|
|
10882
|
+
id: "KR",
|
|
10883
|
+
dialCode: "+82"
|
|
10884
|
+
},
|
|
10885
|
+
SS: {
|
|
10886
|
+
name: "South Sudan (\u202B\u062C\u0646\u0648\u0628 \u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",
|
|
10887
|
+
id: "SS",
|
|
10888
|
+
dialCode: "+211"
|
|
10889
|
+
},
|
|
10890
|
+
ES: { name: "Spain (Espa\xF1a)", id: "ES", dialCode: "+34" },
|
|
10891
|
+
LK: {
|
|
10892
|
+
name: "Sri Lanka (\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0)",
|
|
10893
|
+
id: "LK",
|
|
10894
|
+
dialCode: "+94"
|
|
10895
|
+
},
|
|
10896
|
+
SD: {
|
|
10897
|
+
name: "Sudan (\u202B\u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",
|
|
10898
|
+
id: "SD",
|
|
10899
|
+
dialCode: "+249"
|
|
10900
|
+
},
|
|
10901
|
+
SR: { name: "Suriname", id: "SR", dialCode: "+597" },
|
|
10902
|
+
SJ: {
|
|
10903
|
+
name: "Svalbard and Jan Mayen",
|
|
10904
|
+
id: "SJ",
|
|
10905
|
+
dialCode: "+47"
|
|
10906
|
+
},
|
|
10907
|
+
SZ: { name: "Swaziland", id: "SZ", dialCode: "+268" },
|
|
10908
|
+
SE: { name: "Sweden (Sverige)", id: "SE", dialCode: "+46" },
|
|
10909
|
+
CH: {
|
|
10910
|
+
name: "Switzerland (Schweiz)",
|
|
10911
|
+
id: "CH",
|
|
10912
|
+
dialCode: "+41"
|
|
10913
|
+
},
|
|
10914
|
+
SY: {
|
|
10915
|
+
name: "Syria (\u202B\u0633\u0648\u0631\u064A\u0627\u202C\u200E)",
|
|
10916
|
+
id: "SY",
|
|
10917
|
+
dialCode: "+963"
|
|
10918
|
+
},
|
|
10919
|
+
TW: { name: "Taiwan (\u53F0\u7063)", id: "TW", dialCode: "+886" },
|
|
10920
|
+
TJ: { name: "Tajikistan", id: "TJ", dialCode: "+992" },
|
|
10921
|
+
TZ: { name: "Tanzania", id: "TZ", dialCode: "+255" },
|
|
10922
|
+
TH: { name: "Thailand (\u0E44\u0E17\u0E22)", id: "TH", dialCode: "+66" },
|
|
10923
|
+
TL: { name: "Timor-Leste", id: "TL", dialCode: "+670" },
|
|
10924
|
+
TG: { name: "Togo", id: "TG", dialCode: "+228" },
|
|
10925
|
+
TK: { name: "Tokelau", id: "TK", dialCode: "+690" },
|
|
10926
|
+
TO: { name: "Tonga", id: "TO", dialCode: "+676" },
|
|
10927
|
+
TT: {
|
|
10928
|
+
name: "Trinisoad and Tobago",
|
|
10929
|
+
id: "TT",
|
|
10930
|
+
dialCode: "+1868"
|
|
10931
|
+
},
|
|
10932
|
+
TN: {
|
|
10933
|
+
name: "Tunisia (\u202B\u062A\u0648\u0646\u0633\u202C\u200E)",
|
|
10934
|
+
id: "TN",
|
|
10935
|
+
dialCode: "+216"
|
|
10936
|
+
},
|
|
10937
|
+
TR: { name: "Turkey (T\xFCrkiye)", id: "TR", dialCode: "+90" },
|
|
10938
|
+
TM: { name: "Turkmenistan", id: "TM", dialCode: "+993" },
|
|
10939
|
+
TC: {
|
|
10940
|
+
name: "Turks and Caicos Islands",
|
|
10941
|
+
id: "TC",
|
|
10942
|
+
dialCode: "+1649"
|
|
10943
|
+
},
|
|
10944
|
+
TV: { name: "Tuvalu", id: "TV", dialCode: "+688" },
|
|
10945
|
+
VI: {
|
|
10946
|
+
name: "U.S. Virgin Islands",
|
|
10947
|
+
id: "VI",
|
|
10948
|
+
dialCode: "+1340"
|
|
10949
|
+
},
|
|
10950
|
+
UG: { name: "Uganda", id: "UG", dialCode: "+256" },
|
|
10951
|
+
UA: {
|
|
10952
|
+
name: "Ukraine (\u0423\u043A\u0440\u0430\u0457\u043D\u0430)",
|
|
10953
|
+
id: "UA",
|
|
10954
|
+
dialCode: "+380"
|
|
10955
|
+
},
|
|
10956
|
+
AE: {
|
|
10957
|
+
name: "United Arab Emirates (\u202B\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629\u202C\u200E)",
|
|
10958
|
+
id: "AE",
|
|
10959
|
+
dialCode: "+971"
|
|
10960
|
+
},
|
|
10961
|
+
GB: { name: "United Kingdom", id: "GB", dialCode: "+44" },
|
|
10962
|
+
US: { name: "United States", id: "US", dialCode: "+1" },
|
|
10963
|
+
UY: { name: "Uruguay", id: "UY", dialCode: "+598" },
|
|
10964
|
+
UZ: {
|
|
10965
|
+
name: "Uzbekistan (O\u02BBzbekiston)",
|
|
10966
|
+
id: "UZ",
|
|
10967
|
+
dialCode: "+998"
|
|
10968
|
+
},
|
|
10969
|
+
VU: { name: "Vanuatu", id: "VU", dialCode: "+678" },
|
|
10970
|
+
VA: {
|
|
10971
|
+
name: "Vatican City (Citt\xE0 del Vaticano)",
|
|
10972
|
+
id: "VA",
|
|
10973
|
+
dialCode: "+39"
|
|
10974
|
+
},
|
|
10975
|
+
VE: { name: "Venezuela", id: "VE", dialCode: "+58" },
|
|
10976
|
+
VN: {
|
|
10977
|
+
name: "Vietnam (Vi\u1EC7t Nam)",
|
|
10978
|
+
id: "VN",
|
|
10979
|
+
dialCode: "+84"
|
|
10980
|
+
},
|
|
10981
|
+
WF: {
|
|
10982
|
+
name: "Wallis and Futuna (Wallis-et-Futuna)",
|
|
10983
|
+
id: "WF",
|
|
10984
|
+
dialCode: "+681"
|
|
10985
|
+
},
|
|
10986
|
+
YE: {
|
|
10987
|
+
name: "Yemen (\u202B\u0627\u0644\u064A\u0645\u0646\u202C\u200E)",
|
|
10988
|
+
id: "YE",
|
|
10989
|
+
dialCode: "+967"
|
|
10990
|
+
},
|
|
10991
|
+
ZM: { name: "Zambia", id: "ZM", dialCode: "+260" },
|
|
10992
|
+
ZW: { name: "Zimbabwe", id: "ZW", dialCode: "+263" },
|
|
10993
|
+
AX: { name: "\xC5land Islands", id: "AX", dialCode: "+358" }
|
|
10994
|
+
};
|
|
10995
|
+
|
|
10996
|
+
// src/components/PhoneInput/PhoneInput.module.css
|
|
10997
|
+
var PhoneInput_default = {
|
|
10998
|
+
"inputs-container": "PhoneInput_inputs-container",
|
|
10999
|
+
input: "PhoneInput_input",
|
|
11000
|
+
select: "PhoneInput_select",
|
|
11001
|
+
"select--tiny": "PhoneInput_select--tiny",
|
|
11002
|
+
"inputs-container--small-screen-xs": "PhoneInput_inputs-container--small-screen-xs",
|
|
11003
|
+
"inputs-container--small-screen-sm": "PhoneInput_inputs-container--small-screen-sm",
|
|
11004
|
+
"inputs-container--small-screen-md": "PhoneInput_inputs-container--small-screen-md",
|
|
11005
|
+
"inputs-container--small-screen-lg": "PhoneInput_inputs-container--small-screen-lg",
|
|
11006
|
+
"inputs-container--small-screen-xl": "PhoneInput_inputs-container--small-screen-xl",
|
|
11007
|
+
"calling-code": "PhoneInput_calling-code"
|
|
11008
|
+
};
|
|
11009
|
+
|
|
11010
|
+
// src/components/PhoneInput/PhoneInput.tsx
|
|
11011
|
+
import { jsx as jsx266, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
11012
|
+
var prioritizedCountries = [
|
|
11013
|
+
COUNTRIES.NO,
|
|
11014
|
+
COUNTRIES.SE,
|
|
11015
|
+
COUNTRIES.DK,
|
|
11016
|
+
COUNTRIES.FI
|
|
11017
|
+
];
|
|
11018
|
+
var prioritizedCountryOptions = prioritizedCountries.map((country) => {
|
|
11019
|
+
return {
|
|
11020
|
+
label: `${country.name} ${country.dialCode}`,
|
|
11021
|
+
countryCode: country.id
|
|
11022
|
+
};
|
|
11023
|
+
});
|
|
11024
|
+
var sortedCountryOptions = Object.values(
|
|
11025
|
+
COUNTRIES
|
|
11026
|
+
).sort((a2, b) => +a2.name - +b.name).map((country) => ({
|
|
11027
|
+
countryCode: country.id,
|
|
11028
|
+
label: `${country.name} ${country.dialCode}`
|
|
11029
|
+
})).filter(
|
|
11030
|
+
(country) => !prioritizedCountryOptions.some(
|
|
11031
|
+
(pCountry) => pCountry.countryCode === country.countryCode
|
|
11032
|
+
)
|
|
11033
|
+
);
|
|
11034
|
+
var countryOptions = [
|
|
11035
|
+
...prioritizedCountryOptions,
|
|
11036
|
+
...sortedCountryOptions
|
|
11037
|
+
];
|
|
11038
|
+
var PhoneInput = forwardRef77(
|
|
11039
|
+
({
|
|
11040
|
+
label,
|
|
11041
|
+
readOnly,
|
|
11042
|
+
errorMessage,
|
|
11043
|
+
tip,
|
|
11044
|
+
required,
|
|
11045
|
+
width,
|
|
11046
|
+
componentSize = "medium",
|
|
11047
|
+
name,
|
|
11048
|
+
className,
|
|
11049
|
+
style,
|
|
11050
|
+
value,
|
|
11051
|
+
selectLabel = "Landskode",
|
|
11052
|
+
selectRef,
|
|
11053
|
+
onChange,
|
|
11054
|
+
defaultValue,
|
|
11055
|
+
"aria-required": ariaRequired,
|
|
11056
|
+
"aria-describedby": ariaDescribedby,
|
|
11057
|
+
groupLabel = "Landskode og telefonnummer",
|
|
11058
|
+
...props
|
|
11059
|
+
}, ref) => {
|
|
11060
|
+
var _a;
|
|
11061
|
+
const generatedId = useId17();
|
|
11062
|
+
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11063
|
+
const phoneInputId = `${uniqueId}-phone-input`;
|
|
11064
|
+
const phoneNumberId = `${uniqueId}-phone-number`;
|
|
11065
|
+
const selectId = `${uniqueId}-country-code`;
|
|
11066
|
+
const hasErrorMessage = !!errorMessage;
|
|
11067
|
+
const hasTip = !!tip;
|
|
11068
|
+
const hasLabel = !!label;
|
|
11069
|
+
const hasMessage = hasErrorMessage || hasTip;
|
|
11070
|
+
const tipId = derivativeIdGenerator(phoneInputId, "tip");
|
|
11071
|
+
const errorMessageId = derivativeIdGenerator(phoneInputId, "errorMessage");
|
|
11072
|
+
const [callingCode, setCallingCode] = useState19("");
|
|
11073
|
+
const [selectedCountryCodeText, setSelectedCountryCodeText] = useState19("");
|
|
11074
|
+
const [internalValue, setInternalValue] = useState19(
|
|
11075
|
+
defaultValue != null ? defaultValue : {
|
|
11076
|
+
countryCode: "",
|
|
11077
|
+
phoneNumber: ""
|
|
11078
|
+
}
|
|
11079
|
+
);
|
|
11080
|
+
const isControlled = value !== void 0;
|
|
11081
|
+
const [callingCodeWidth, setCallingCodeWidth] = useState19(0);
|
|
11082
|
+
const callingCodeRef = useRef27(null);
|
|
11083
|
+
useLayoutEffect2(() => {
|
|
11084
|
+
if (callingCodeRef.current) {
|
|
11085
|
+
setCallingCodeWidth(callingCodeRef.current.offsetWidth);
|
|
11086
|
+
}
|
|
11087
|
+
}, [callingCode]);
|
|
11088
|
+
const callingCodeInlineStart = callingCodeWidth ? ddsTokens15.ddsSpacingX1NumberPx + callingCodeWidth + "px" : void 0;
|
|
11089
|
+
const styleVariables = {
|
|
11090
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11091
|
+
["--dds-phone-input-width"]: width ? width : componentSize === "tiny" ? "131px" : "194px"
|
|
11092
|
+
};
|
|
11093
|
+
const internalSelectRef = useRef27(null);
|
|
11094
|
+
const combinedSelectRef = useCombinedRef(selectRef, internalSelectRef);
|
|
11095
|
+
const displayedValue = isControlled ? value : internalValue;
|
|
11096
|
+
useEffect23(() => {
|
|
11097
|
+
const selectEl = internalSelectRef.current;
|
|
11098
|
+
if (selectEl && selectEl.value) {
|
|
11099
|
+
const { options, selectedIndex } = selectEl;
|
|
11100
|
+
const content = options[selectedIndex].innerHTML;
|
|
11101
|
+
setSelectedCountryCodeText(content);
|
|
11102
|
+
setCallingCode(getCallingCode(content));
|
|
11103
|
+
}
|
|
11104
|
+
}, [displayedValue == null ? void 0 : displayedValue.countryCode]);
|
|
11105
|
+
const handleCountryCodeChange = (e) => {
|
|
11106
|
+
var _a2;
|
|
11107
|
+
const newValue = {
|
|
11108
|
+
countryCode: e.target.value,
|
|
11109
|
+
phoneNumber: (_a2 = displayedValue == null ? void 0 : displayedValue.phoneNumber) != null ? _a2 : ""
|
|
11110
|
+
};
|
|
11111
|
+
const { options, selectedIndex } = e.target;
|
|
11112
|
+
const content = options[selectedIndex].innerHTML;
|
|
11113
|
+
setCallingCode(getCallingCode(content));
|
|
11114
|
+
if (isControlled && onChange) {
|
|
11115
|
+
onChange(newValue);
|
|
11116
|
+
} else {
|
|
11117
|
+
setInternalValue(newValue);
|
|
11118
|
+
}
|
|
11119
|
+
};
|
|
11120
|
+
const handlePhoneNumberChange = (e) => {
|
|
11121
|
+
var _a2;
|
|
11122
|
+
const newValue = {
|
|
11123
|
+
countryCode: (_a2 = displayedValue == null ? void 0 : displayedValue.countryCode) != null ? _a2 : "",
|
|
11124
|
+
phoneNumber: e.target.value
|
|
11125
|
+
};
|
|
11126
|
+
if (isControlled && onChange) {
|
|
11127
|
+
onChange(newValue);
|
|
11128
|
+
} else {
|
|
11129
|
+
setInternalValue(newValue);
|
|
11130
|
+
}
|
|
11131
|
+
};
|
|
11132
|
+
const commonProps = {
|
|
11133
|
+
required,
|
|
11134
|
+
"aria-required": ariaRequired,
|
|
11135
|
+
disabled: props.disabled,
|
|
11136
|
+
readOnly,
|
|
11137
|
+
componentSize
|
|
11138
|
+
};
|
|
11139
|
+
const showRequiredStyling = !!(required || ariaRequired);
|
|
11140
|
+
return /* @__PURE__ */ jsxs62("div", { className: cn(className, Input_default.container), style, children: [
|
|
11141
|
+
hasLabel && /* @__PURE__ */ jsx266(
|
|
11142
|
+
Label,
|
|
11143
|
+
{
|
|
11144
|
+
htmlFor: phoneNumberId,
|
|
11145
|
+
showRequiredStyling,
|
|
11146
|
+
className: Input_default.label,
|
|
11147
|
+
readOnly,
|
|
11148
|
+
children: label
|
|
11149
|
+
}
|
|
11150
|
+
),
|
|
11151
|
+
/* @__PURE__ */ jsxs62(
|
|
11152
|
+
"div",
|
|
11153
|
+
{
|
|
11154
|
+
className: cn(
|
|
11155
|
+
PhoneInput_default["inputs-container"],
|
|
11156
|
+
!!props.smallScreenBreakpoint && PhoneInput_default[`inputs-container--small-screen-${props.smallScreenBreakpoint}`]
|
|
11157
|
+
),
|
|
11158
|
+
style: styleVariables,
|
|
11159
|
+
role: "group",
|
|
11160
|
+
"aria-label": groupLabel,
|
|
11161
|
+
children: [
|
|
11162
|
+
/* @__PURE__ */ jsx266("label", { className: utilStyles_default["visually-hidden"], htmlFor: selectId, children: selectLabel }),
|
|
11163
|
+
/* @__PURE__ */ jsx266(
|
|
11164
|
+
NativeSelect,
|
|
11165
|
+
{
|
|
11166
|
+
...commonProps,
|
|
11167
|
+
ref: combinedSelectRef,
|
|
11168
|
+
id: selectId,
|
|
11169
|
+
className: cn(
|
|
11170
|
+
PhoneInput_default.select,
|
|
11171
|
+
componentSize === "tiny" && PhoneInput_default["select--tiny"]
|
|
11172
|
+
),
|
|
11173
|
+
onChange: handleCountryCodeChange,
|
|
11174
|
+
defaultValue: defaultValue == null ? void 0 : defaultValue.countryCode,
|
|
11175
|
+
value: (displayedValue == null ? void 0 : displayedValue.countryCode) || "",
|
|
11176
|
+
title: selectedCountryCodeText,
|
|
11177
|
+
name: `${name}-country-code`,
|
|
11178
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
11179
|
+
hasTip ? tipId : void 0,
|
|
11180
|
+
ariaDescribedby
|
|
11181
|
+
]),
|
|
11182
|
+
children: countryOptions.map((item, index) => /* @__PURE__ */ jsx266("option", { value: item.countryCode, children: item.label }, index))
|
|
11183
|
+
}
|
|
11184
|
+
),
|
|
11185
|
+
/* @__PURE__ */ jsxs62("div", { className: Input_default["input-group"], children: [
|
|
11186
|
+
/* @__PURE__ */ jsx266(
|
|
11187
|
+
"span",
|
|
11188
|
+
{
|
|
11189
|
+
className: cn(
|
|
11190
|
+
typographyStyles_default[getTypographyCn(inputTypographyTypes[componentSize])],
|
|
11191
|
+
Input_default["input-group__absolute-element"],
|
|
11192
|
+
PhoneInput_default["calling-code"]
|
|
11193
|
+
),
|
|
11194
|
+
ref: callingCodeRef,
|
|
11195
|
+
children: callingCode
|
|
11196
|
+
}
|
|
11197
|
+
),
|
|
11198
|
+
/* @__PURE__ */ jsx266(
|
|
11199
|
+
StatefulInput,
|
|
11200
|
+
{
|
|
11201
|
+
ref,
|
|
11202
|
+
type: "tel",
|
|
11203
|
+
...commonProps,
|
|
11204
|
+
id: phoneNumberId,
|
|
11205
|
+
value: (displayedValue == null ? void 0 : displayedValue.phoneNumber) || "",
|
|
11206
|
+
defaultValue: defaultValue == null ? void 0 : defaultValue.phoneNumber,
|
|
11207
|
+
name: `${name}-phone-number`,
|
|
11208
|
+
onChange: handlePhoneNumberChange,
|
|
11209
|
+
style: {
|
|
11210
|
+
...styleVariables,
|
|
11211
|
+
paddingInlineStart: callingCodeInlineStart
|
|
11212
|
+
},
|
|
11213
|
+
className: PhoneInput_default.input,
|
|
11214
|
+
hasErrorMessage,
|
|
11215
|
+
"aria-invalid": hasErrorMessage ? true : void 0,
|
|
11216
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
11217
|
+
hasTip ? tipId : void 0,
|
|
11218
|
+
hasErrorMessage ? errorMessageId : void 0,
|
|
11219
|
+
ariaDescribedby
|
|
11220
|
+
])
|
|
11221
|
+
}
|
|
11222
|
+
)
|
|
11223
|
+
] })
|
|
11224
|
+
]
|
|
11225
|
+
}
|
|
11226
|
+
),
|
|
11227
|
+
hasMessage && renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
11228
|
+
] });
|
|
11229
|
+
}
|
|
11230
|
+
);
|
|
11231
|
+
PhoneInput.displayName = "PhoneInput";
|
|
11232
|
+
var getCallingCode = (s2) => {
|
|
11233
|
+
var _a;
|
|
11234
|
+
return (_a = s2.substring(s2.indexOf("+"), s2.length)) != null ? _a : "";
|
|
11235
|
+
};
|
|
11236
|
+
|
|
11237
|
+
// src/components/Popover/Popover.tsx
|
|
11238
|
+
import { ddsTokens as ddsTokens16 } from "@norges-domstoler/dds-design-tokens";
|
|
11239
|
+
import { forwardRef as forwardRef78 } from "react";
|
|
10298
11240
|
|
|
10299
11241
|
// src/components/Popover/Popover.module.css
|
|
10300
11242
|
var Popover_default = {
|
|
@@ -10305,8 +11247,8 @@ var Popover_default = {
|
|
|
10305
11247
|
};
|
|
10306
11248
|
|
|
10307
11249
|
// src/components/Popover/Popover.tsx
|
|
10308
|
-
import { jsx as
|
|
10309
|
-
var Popover =
|
|
11250
|
+
import { jsx as jsx267, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
11251
|
+
var Popover = forwardRef78(
|
|
10310
11252
|
(props, ref) => {
|
|
10311
11253
|
const {
|
|
10312
11254
|
title,
|
|
@@ -10318,7 +11260,7 @@ var Popover = forwardRef77(
|
|
|
10318
11260
|
anchorElement,
|
|
10319
11261
|
children,
|
|
10320
11262
|
placement = "bottom",
|
|
10321
|
-
offset =
|
|
11263
|
+
offset = ddsTokens16.ddsSpacingX05NumberPx,
|
|
10322
11264
|
sizeProps,
|
|
10323
11265
|
id,
|
|
10324
11266
|
className,
|
|
@@ -10346,7 +11288,7 @@ var Popover = forwardRef77(
|
|
|
10346
11288
|
useOnClickOutside(elements, () => {
|
|
10347
11289
|
if (isOpen) onClose && onClose();
|
|
10348
11290
|
});
|
|
10349
|
-
return isOpen || hasTransitionedIn ? /* @__PURE__ */
|
|
11291
|
+
return isOpen || hasTransitionedIn ? /* @__PURE__ */ jsxs63(
|
|
10350
11292
|
Paper,
|
|
10351
11293
|
{
|
|
10352
11294
|
...getBaseHTMLProps(
|
|
@@ -10368,15 +11310,15 @@ var Popover = forwardRef77(
|
|
|
10368
11310
|
elevation: 3,
|
|
10369
11311
|
border: "subtle",
|
|
10370
11312
|
children: [
|
|
10371
|
-
title && /* @__PURE__ */
|
|
10372
|
-
/* @__PURE__ */
|
|
11313
|
+
title && /* @__PURE__ */ jsx267("div", { className: Popover_default.title, children: typeof title === "string" ? /* @__PURE__ */ jsx267(Heading, { level: 2, typographyType: "headingSans02", children: title }) : title }),
|
|
11314
|
+
/* @__PURE__ */ jsx267(
|
|
10373
11315
|
"div",
|
|
10374
11316
|
{
|
|
10375
11317
|
className: !hasTitle && withCloseButton ? Popover_default["content--closable--no-title"] : "",
|
|
10376
11318
|
children
|
|
10377
11319
|
}
|
|
10378
11320
|
),
|
|
10379
|
-
withCloseButton && /* @__PURE__ */
|
|
11321
|
+
withCloseButton && /* @__PURE__ */ jsx267(
|
|
10380
11322
|
Button,
|
|
10381
11323
|
{
|
|
10382
11324
|
icon: CloseIcon,
|
|
@@ -10399,11 +11341,11 @@ import {
|
|
|
10399
11341
|
Children as ReactChildren5,
|
|
10400
11342
|
cloneElement as cloneElement6,
|
|
10401
11343
|
isValidElement as isValidElement7,
|
|
10402
|
-
useId as
|
|
10403
|
-
useRef as
|
|
10404
|
-
useState as
|
|
11344
|
+
useId as useId18,
|
|
11345
|
+
useRef as useRef28,
|
|
11346
|
+
useState as useState20
|
|
10405
11347
|
} from "react";
|
|
10406
|
-
import { Fragment as Fragment9, jsx as
|
|
11348
|
+
import { Fragment as Fragment9, jsx as jsx268 } from "react/jsx-runtime";
|
|
10407
11349
|
var PopoverGroup = ({
|
|
10408
11350
|
isOpen = false,
|
|
10409
11351
|
onCloseButtonClick,
|
|
@@ -10411,8 +11353,8 @@ var PopoverGroup = ({
|
|
|
10411
11353
|
children,
|
|
10412
11354
|
popoverId
|
|
10413
11355
|
}) => {
|
|
10414
|
-
const [open, setOpen] =
|
|
10415
|
-
const generatedId =
|
|
11356
|
+
const [open, setOpen] = useState20(isOpen);
|
|
11357
|
+
const generatedId = useId18();
|
|
10416
11358
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
10417
11359
|
const handleOnCloseButtonClick = () => {
|
|
10418
11360
|
setOpen(false);
|
|
@@ -10422,8 +11364,8 @@ var PopoverGroup = ({
|
|
|
10422
11364
|
setOpen(!open);
|
|
10423
11365
|
onTriggerClick && onTriggerClick();
|
|
10424
11366
|
};
|
|
10425
|
-
const buttonRef =
|
|
10426
|
-
const popoverRef =
|
|
11367
|
+
const buttonRef = useRef28(null);
|
|
11368
|
+
const popoverRef = useRef28(null);
|
|
10427
11369
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
10428
11370
|
var _a;
|
|
10429
11371
|
if (open) {
|
|
@@ -10449,7 +11391,7 @@ var PopoverGroup = ({
|
|
|
10449
11391
|
onClose: handleClose
|
|
10450
11392
|
}));
|
|
10451
11393
|
});
|
|
10452
|
-
return /* @__PURE__ */
|
|
11394
|
+
return /* @__PURE__ */ jsx268(Fragment9, { children: Children8 });
|
|
10453
11395
|
};
|
|
10454
11396
|
PopoverGroup.displayName = "PopoverGroup";
|
|
10455
11397
|
|
|
@@ -10458,11 +11400,11 @@ import {
|
|
|
10458
11400
|
Children as Children4,
|
|
10459
11401
|
Fragment as Fragment11,
|
|
10460
11402
|
cloneElement as cloneElement7,
|
|
10461
|
-
forwardRef as
|
|
11403
|
+
forwardRef as forwardRef79,
|
|
10462
11404
|
isValidElement as isValidElement8,
|
|
10463
|
-
useEffect as
|
|
11405
|
+
useEffect as useEffect24,
|
|
10464
11406
|
useMemo as useMemo3,
|
|
10465
|
-
useState as
|
|
11407
|
+
useState as useState21
|
|
10466
11408
|
} from "react";
|
|
10467
11409
|
|
|
10468
11410
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
@@ -10497,7 +11439,7 @@ var ProgressTracker_default = {
|
|
|
10497
11439
|
|
|
10498
11440
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
10499
11441
|
import { useMemo as useMemo2 } from "react";
|
|
10500
|
-
import { Fragment as Fragment10, jsx as
|
|
11442
|
+
import { Fragment as Fragment10, jsx as jsx269, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
10501
11443
|
var toItemState = (active, completed, disabled) => {
|
|
10502
11444
|
if (disabled) {
|
|
10503
11445
|
return "disabled";
|
|
@@ -10540,15 +11482,15 @@ var ProgressTrackerItem = (props) => {
|
|
|
10540
11482
|
};
|
|
10541
11483
|
const stepNumberContent = useMemo2(() => {
|
|
10542
11484
|
if (completed) {
|
|
10543
|
-
return /* @__PURE__ */
|
|
11485
|
+
return /* @__PURE__ */ jsx269(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
10544
11486
|
}
|
|
10545
11487
|
if (icon !== void 0) {
|
|
10546
|
-
return /* @__PURE__ */
|
|
11488
|
+
return /* @__PURE__ */ jsx269(Icon, { icon, iconSize: "small" });
|
|
10547
11489
|
}
|
|
10548
11490
|
return index + 1;
|
|
10549
11491
|
}, [completed, icon, index]);
|
|
10550
|
-
const stepContent = /* @__PURE__ */
|
|
10551
|
-
/* @__PURE__ */
|
|
11492
|
+
const stepContent = /* @__PURE__ */ jsxs64(Fragment10, { children: [
|
|
11493
|
+
/* @__PURE__ */ jsx269(
|
|
10552
11494
|
"div",
|
|
10553
11495
|
{
|
|
10554
11496
|
"aria-hidden": true,
|
|
@@ -10560,7 +11502,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
10560
11502
|
children: stepNumberContent
|
|
10561
11503
|
}
|
|
10562
11504
|
),
|
|
10563
|
-
/* @__PURE__ */
|
|
11505
|
+
/* @__PURE__ */ jsxs64(
|
|
10564
11506
|
"div",
|
|
10565
11507
|
{
|
|
10566
11508
|
className: cn(
|
|
@@ -10569,13 +11511,13 @@ var ProgressTrackerItem = (props) => {
|
|
|
10569
11511
|
typographyStyles_default["body-sans-03"]
|
|
10570
11512
|
),
|
|
10571
11513
|
children: [
|
|
10572
|
-
/* @__PURE__ */
|
|
11514
|
+
/* @__PURE__ */ jsx269(VisuallyHidden, { as: "span", children: getVisuallyHiddenText(active, completed, index) }),
|
|
10573
11515
|
children
|
|
10574
11516
|
]
|
|
10575
11517
|
}
|
|
10576
11518
|
)
|
|
10577
11519
|
] });
|
|
10578
|
-
return /* @__PURE__ */
|
|
11520
|
+
return /* @__PURE__ */ jsx269("li", { "aria-current": active ? "step" : void 0, className: ProgressTracker_default.item, children: handleStepChange ? /* @__PURE__ */ jsx269(
|
|
10579
11521
|
"button",
|
|
10580
11522
|
{
|
|
10581
11523
|
...getBaseHTMLProps(
|
|
@@ -10588,7 +11530,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
10588
11530
|
disabled,
|
|
10589
11531
|
children: stepContent
|
|
10590
11532
|
}
|
|
10591
|
-
) : /* @__PURE__ */
|
|
11533
|
+
) : /* @__PURE__ */ jsx269(
|
|
10592
11534
|
"div",
|
|
10593
11535
|
{
|
|
10594
11536
|
...getBaseHTMLProps(
|
|
@@ -10604,9 +11546,9 @@ var ProgressTrackerItem = (props) => {
|
|
|
10604
11546
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
10605
11547
|
|
|
10606
11548
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
10607
|
-
import { jsx as
|
|
11549
|
+
import { jsx as jsx270, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
10608
11550
|
var ProgressTracker = (() => {
|
|
10609
|
-
const Res =
|
|
11551
|
+
const Res = forwardRef79((props, ref) => {
|
|
10610
11552
|
const {
|
|
10611
11553
|
id,
|
|
10612
11554
|
activeStep = 0,
|
|
@@ -10616,12 +11558,12 @@ var ProgressTracker = (() => {
|
|
|
10616
11558
|
htmlProps,
|
|
10617
11559
|
...rest
|
|
10618
11560
|
} = props;
|
|
10619
|
-
const [thisActiveStep, setActiveStep] =
|
|
11561
|
+
const [thisActiveStep, setActiveStep] = useState21(activeStep);
|
|
10620
11562
|
const handleChange = (step) => {
|
|
10621
11563
|
setActiveStep(step);
|
|
10622
11564
|
onStepChange && onStepChange(step);
|
|
10623
11565
|
};
|
|
10624
|
-
|
|
11566
|
+
useEffect24(() => {
|
|
10625
11567
|
if (activeStep !== void 0 && activeStep != thisActiveStep) {
|
|
10626
11568
|
setActiveStep(activeStep);
|
|
10627
11569
|
}
|
|
@@ -10636,14 +11578,14 @@ var ProgressTracker = (() => {
|
|
|
10636
11578
|
const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
|
|
10637
11579
|
return itemsWithConnectorsBetween;
|
|
10638
11580
|
}, [children]);
|
|
10639
|
-
return /* @__PURE__ */
|
|
11581
|
+
return /* @__PURE__ */ jsx270(
|
|
10640
11582
|
ProgressTrackerContext.Provider,
|
|
10641
11583
|
{
|
|
10642
11584
|
value: {
|
|
10643
11585
|
activeStep: thisActiveStep,
|
|
10644
11586
|
handleStepChange: handleChange
|
|
10645
11587
|
},
|
|
10646
|
-
children: /* @__PURE__ */
|
|
11588
|
+
children: /* @__PURE__ */ jsx270("div", { role: "group", "aria-label": "progress", ...containerProps, children: /* @__PURE__ */ jsx270("ol", { className: ProgressTracker_default.list, children: steps }) })
|
|
10647
11589
|
}
|
|
10648
11590
|
);
|
|
10649
11591
|
});
|
|
@@ -10667,14 +11609,14 @@ var intersperseItemsWithConnector = (children) => Children4.map(children, (child
|
|
|
10667
11609
|
if (index === 0) {
|
|
10668
11610
|
return child;
|
|
10669
11611
|
}
|
|
10670
|
-
return /* @__PURE__ */
|
|
10671
|
-
/* @__PURE__ */
|
|
11612
|
+
return /* @__PURE__ */ jsxs65(Fragment11, { children: [
|
|
11613
|
+
/* @__PURE__ */ jsx270("div", { "aria-hidden": true, className: ProgressTracker_default.connector }),
|
|
10672
11614
|
child
|
|
10673
11615
|
] }, index);
|
|
10674
11616
|
});
|
|
10675
11617
|
|
|
10676
11618
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10677
|
-
import { forwardRef as
|
|
11619
|
+
import { forwardRef as forwardRef80, useId as useId19 } from "react";
|
|
10678
11620
|
|
|
10679
11621
|
// src/components/ProgressBar/ProgressBar.module.css
|
|
10680
11622
|
var ProgressBar_default = {
|
|
@@ -10690,8 +11632,8 @@ var ProgressBar_default = {
|
|
|
10690
11632
|
};
|
|
10691
11633
|
|
|
10692
11634
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10693
|
-
import { jsx as
|
|
10694
|
-
var ProgressBar =
|
|
11635
|
+
import { jsx as jsx271, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
11636
|
+
var ProgressBar = forwardRef80(
|
|
10695
11637
|
(props, ref) => {
|
|
10696
11638
|
const {
|
|
10697
11639
|
label,
|
|
@@ -10707,7 +11649,7 @@ var ProgressBar = forwardRef79(
|
|
|
10707
11649
|
style,
|
|
10708
11650
|
...rest
|
|
10709
11651
|
} = props;
|
|
10710
|
-
const generatedId =
|
|
11652
|
+
const generatedId = useId19();
|
|
10711
11653
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
10712
11654
|
const hasErrorMessage = !!errorMessage;
|
|
10713
11655
|
const hasTip = !!tip;
|
|
@@ -10725,9 +11667,9 @@ var ProgressBar = forwardRef79(
|
|
|
10725
11667
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10726
11668
|
["--dds-progressbar-fill-width"]: fillPrecentage != null ? fillPrecentage : 0
|
|
10727
11669
|
};
|
|
10728
|
-
return /* @__PURE__ */
|
|
10729
|
-
hasLabel ? /* @__PURE__ */
|
|
10730
|
-
/* @__PURE__ */
|
|
11670
|
+
return /* @__PURE__ */ jsxs66("div", { className: cn(className, ProgressBar_default.container), style, children: [
|
|
11671
|
+
hasLabel ? /* @__PURE__ */ jsx271(Label, { htmlFor: uniqueId, children: label }) : void 0,
|
|
11672
|
+
/* @__PURE__ */ jsx271(
|
|
10731
11673
|
"progress",
|
|
10732
11674
|
{
|
|
10733
11675
|
ref,
|
|
@@ -10744,12 +11686,12 @@ var ProgressBar = forwardRef79(
|
|
|
10744
11686
|
children: fillPrecentage
|
|
10745
11687
|
}
|
|
10746
11688
|
),
|
|
10747
|
-
/* @__PURE__ */
|
|
11689
|
+
/* @__PURE__ */ jsx271(
|
|
10748
11690
|
"div",
|
|
10749
11691
|
{
|
|
10750
11692
|
style: progressStyleVariables,
|
|
10751
11693
|
className: cn(ProgressBar_default.progress, ProgressBar_default[`progress--${size2}`]),
|
|
10752
|
-
children: /* @__PURE__ */
|
|
11694
|
+
children: /* @__PURE__ */ jsx271(
|
|
10753
11695
|
"div",
|
|
10754
11696
|
{
|
|
10755
11697
|
style: fillStyleVariables,
|
|
@@ -10771,9 +11713,9 @@ ProgressBar.displayName = "ProgressBar";
|
|
|
10771
11713
|
|
|
10772
11714
|
// src/components/Search/Search.tsx
|
|
10773
11715
|
import {
|
|
10774
|
-
forwardRef as
|
|
10775
|
-
useId as
|
|
10776
|
-
useState as
|
|
11716
|
+
forwardRef as forwardRef83,
|
|
11717
|
+
useId as useId20,
|
|
11718
|
+
useState as useState22
|
|
10777
11719
|
} from "react";
|
|
10778
11720
|
|
|
10779
11721
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
@@ -10833,26 +11775,26 @@ function createEmptyChangeEvent(inputElementId) {
|
|
|
10833
11775
|
}
|
|
10834
11776
|
|
|
10835
11777
|
// src/components/Search/SearchSuggestions.tsx
|
|
10836
|
-
import { forwardRef as
|
|
11778
|
+
import { forwardRef as forwardRef82 } from "react";
|
|
10837
11779
|
|
|
10838
11780
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
10839
11781
|
import {
|
|
10840
|
-
forwardRef as
|
|
10841
|
-
useEffect as
|
|
10842
|
-
useRef as
|
|
11782
|
+
forwardRef as forwardRef81,
|
|
11783
|
+
useEffect as useEffect25,
|
|
11784
|
+
useRef as useRef29
|
|
10843
11785
|
} from "react";
|
|
10844
|
-
import { jsx as
|
|
10845
|
-
var SearchSuggestionItem =
|
|
11786
|
+
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
11787
|
+
var SearchSuggestionItem = forwardRef81((props, ref) => {
|
|
10846
11788
|
const { focus, className, ...rest } = props;
|
|
10847
|
-
const itemRef =
|
|
11789
|
+
const itemRef = useRef29(null);
|
|
10848
11790
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
10849
|
-
|
|
11791
|
+
useEffect25(() => {
|
|
10850
11792
|
var _a;
|
|
10851
11793
|
if (focus) {
|
|
10852
11794
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
10853
11795
|
}
|
|
10854
11796
|
}, [focus]);
|
|
10855
|
-
return /* @__PURE__ */
|
|
11797
|
+
return /* @__PURE__ */ jsx272(
|
|
10856
11798
|
"button",
|
|
10857
11799
|
{
|
|
10858
11800
|
ref: combinedRef,
|
|
@@ -10871,8 +11813,8 @@ var SearchSuggestionItem = forwardRef80((props, ref) => {
|
|
|
10871
11813
|
SearchSuggestionItem.displayName = "SearchSuggestionItem";
|
|
10872
11814
|
|
|
10873
11815
|
// src/components/Search/SearchSuggestions.tsx
|
|
10874
|
-
import { jsx as
|
|
10875
|
-
var SearchSuggestions =
|
|
11816
|
+
import { jsx as jsx273, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
11817
|
+
var SearchSuggestions = forwardRef82((props, ref) => {
|
|
10876
11818
|
const {
|
|
10877
11819
|
id,
|
|
10878
11820
|
searchId,
|
|
@@ -10891,7 +11833,7 @@ var SearchSuggestions = forwardRef81((props, ref) => {
|
|
|
10891
11833
|
);
|
|
10892
11834
|
const [focus] = useRoveFocus(suggestions == null ? void 0 : suggestions.length, showSuggestions);
|
|
10893
11835
|
const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
|
|
10894
|
-
return /* @__PURE__ */
|
|
11836
|
+
return /* @__PURE__ */ jsxs67(
|
|
10895
11837
|
Paper,
|
|
10896
11838
|
{
|
|
10897
11839
|
...getBaseHTMLProps(
|
|
@@ -10910,7 +11852,7 @@ var SearchSuggestions = forwardRef81((props, ref) => {
|
|
|
10910
11852
|
"aria-hidden": !showSuggestions,
|
|
10911
11853
|
border: "default",
|
|
10912
11854
|
children: [
|
|
10913
|
-
/* @__PURE__ */
|
|
11855
|
+
/* @__PURE__ */ jsx273(
|
|
10914
11856
|
"span",
|
|
10915
11857
|
{
|
|
10916
11858
|
id: suggestionsHeaderId,
|
|
@@ -10921,14 +11863,14 @@ var SearchSuggestions = forwardRef81((props, ref) => {
|
|
|
10921
11863
|
children: "S\xF8keforslag"
|
|
10922
11864
|
}
|
|
10923
11865
|
),
|
|
10924
|
-
/* @__PURE__ */
|
|
11866
|
+
/* @__PURE__ */ jsx273(
|
|
10925
11867
|
"ul",
|
|
10926
11868
|
{
|
|
10927
11869
|
role: "listbox",
|
|
10928
11870
|
"aria-labelledby": suggestionsHeaderId,
|
|
10929
11871
|
className: utilStyles_default["remove-list-styling"],
|
|
10930
11872
|
children: suggestionsToRender.map((suggestion, index) => {
|
|
10931
|
-
return /* @__PURE__ */
|
|
11873
|
+
return /* @__PURE__ */ jsx273("li", { role: "option", children: /* @__PURE__ */ jsx273(
|
|
10932
11874
|
SearchSuggestionItem,
|
|
10933
11875
|
{
|
|
10934
11876
|
index,
|
|
@@ -10951,7 +11893,7 @@ var SearchSuggestions = forwardRef81((props, ref) => {
|
|
|
10951
11893
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
10952
11894
|
|
|
10953
11895
|
// src/components/Search/Search.tsx
|
|
10954
|
-
import { Fragment as Fragment12, jsx as
|
|
11896
|
+
import { Fragment as Fragment12, jsx as jsx274, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
10955
11897
|
var getIconSize = (size2) => {
|
|
10956
11898
|
switch (size2) {
|
|
10957
11899
|
case "large":
|
|
@@ -10962,7 +11904,7 @@ var getIconSize = (size2) => {
|
|
|
10962
11904
|
return "small";
|
|
10963
11905
|
}
|
|
10964
11906
|
};
|
|
10965
|
-
var Search =
|
|
11907
|
+
var Search = forwardRef83(
|
|
10966
11908
|
({
|
|
10967
11909
|
componentSize = "medium",
|
|
10968
11910
|
buttonProps,
|
|
@@ -10978,7 +11920,7 @@ var Search = forwardRef82(
|
|
|
10978
11920
|
...rest
|
|
10979
11921
|
}, ref) => {
|
|
10980
11922
|
var _a;
|
|
10981
|
-
const generatedId =
|
|
11923
|
+
const generatedId = useId20();
|
|
10982
11924
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
10983
11925
|
const hasLabel = !!label;
|
|
10984
11926
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
@@ -10987,7 +11929,7 @@ var Search = forwardRef82(
|
|
|
10987
11929
|
uniqueId,
|
|
10988
11930
|
"suggestions-description"
|
|
10989
11931
|
);
|
|
10990
|
-
const [hasValue, setHasValue] =
|
|
11932
|
+
const [hasValue, setHasValue] = useState22(!!value);
|
|
10991
11933
|
const context = useAutocompleteSearch();
|
|
10992
11934
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
10993
11935
|
const handleChange = (e) => {
|
|
@@ -11006,10 +11948,10 @@ var Search = forwardRef82(
|
|
|
11006
11948
|
} = buttonProps != null ? buttonProps : {};
|
|
11007
11949
|
const hasSuggestions = !!context.suggestions;
|
|
11008
11950
|
const showSearchButton = !!buttonProps && !!onClick;
|
|
11009
|
-
return /* @__PURE__ */
|
|
11010
|
-
hasLabel && /* @__PURE__ */
|
|
11011
|
-
/* @__PURE__ */
|
|
11012
|
-
/* @__PURE__ */
|
|
11951
|
+
return /* @__PURE__ */ jsxs68("div", { className: Search_default.container, children: [
|
|
11952
|
+
hasLabel && /* @__PURE__ */ jsx274(Label, { htmlFor: uniqueId, children: label }),
|
|
11953
|
+
/* @__PURE__ */ jsxs68("div", { children: [
|
|
11954
|
+
/* @__PURE__ */ jsxs68(
|
|
11013
11955
|
"div",
|
|
11014
11956
|
{
|
|
11015
11957
|
className: cn(
|
|
@@ -11018,16 +11960,19 @@ var Search = forwardRef82(
|
|
|
11018
11960
|
),
|
|
11019
11961
|
style,
|
|
11020
11962
|
children: [
|
|
11021
|
-
/* @__PURE__ */
|
|
11022
|
-
/* @__PURE__ */
|
|
11963
|
+
/* @__PURE__ */ jsxs68("div", { className: Search_default["input-group"], children: [
|
|
11964
|
+
/* @__PURE__ */ jsx274(
|
|
11023
11965
|
Icon,
|
|
11024
11966
|
{
|
|
11025
11967
|
icon: SearchIcon,
|
|
11026
11968
|
iconSize: getIconSize(componentSize),
|
|
11027
|
-
className: cn(
|
|
11969
|
+
className: cn(
|
|
11970
|
+
Input_default["input-group__absolute-element"],
|
|
11971
|
+
Search_default["search-icon"]
|
|
11972
|
+
)
|
|
11028
11973
|
}
|
|
11029
11974
|
),
|
|
11030
|
-
/* @__PURE__ */
|
|
11975
|
+
/* @__PURE__ */ jsx274(
|
|
11031
11976
|
Input,
|
|
11032
11977
|
{
|
|
11033
11978
|
...rest,
|
|
@@ -11054,8 +11999,8 @@ var Search = forwardRef82(
|
|
|
11054
11999
|
)
|
|
11055
12000
|
}
|
|
11056
12001
|
),
|
|
11057
|
-
hasSuggestions && /* @__PURE__ */
|
|
11058
|
-
/* @__PURE__ */
|
|
12002
|
+
hasSuggestions && /* @__PURE__ */ jsxs68(Fragment12, { children: [
|
|
12003
|
+
/* @__PURE__ */ jsx274(
|
|
11059
12004
|
SearchSuggestions,
|
|
11060
12005
|
{
|
|
11061
12006
|
id: suggestionsId,
|
|
@@ -11067,9 +12012,9 @@ var Search = forwardRef82(
|
|
|
11067
12012
|
componentSize
|
|
11068
12013
|
}
|
|
11069
12014
|
),
|
|
11070
|
-
/* @__PURE__ */
|
|
12015
|
+
/* @__PURE__ */ jsx274(VisuallyHidden, { id: suggestionsDescriptionId, as: "span", children: "Bla i s\xF8keforslag med piltaster n\xE5r listen er utvidet." })
|
|
11071
12016
|
] }),
|
|
11072
|
-
hasValue && /* @__PURE__ */
|
|
12017
|
+
hasValue && /* @__PURE__ */ jsx274(
|
|
11073
12018
|
Button,
|
|
11074
12019
|
{
|
|
11075
12020
|
icon: CloseSmallIcon,
|
|
@@ -11081,7 +12026,7 @@ var Search = forwardRef82(
|
|
|
11081
12026
|
}
|
|
11082
12027
|
)
|
|
11083
12028
|
] }),
|
|
11084
|
-
showSearchButton && /* @__PURE__ */
|
|
12029
|
+
showSearchButton && /* @__PURE__ */ jsx274(
|
|
11085
12030
|
Button,
|
|
11086
12031
|
{
|
|
11087
12032
|
size: componentSize,
|
|
@@ -11102,11 +12047,11 @@ Search.displayName = "Search";
|
|
|
11102
12047
|
|
|
11103
12048
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
11104
12049
|
import {
|
|
11105
|
-
useEffect as
|
|
11106
|
-
useRef as
|
|
11107
|
-
useState as
|
|
12050
|
+
useEffect as useEffect26,
|
|
12051
|
+
useRef as useRef30,
|
|
12052
|
+
useState as useState23
|
|
11108
12053
|
} from "react";
|
|
11109
|
-
import { jsx as
|
|
12054
|
+
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
11110
12055
|
var SearchAutocompleteWrapper = (props) => {
|
|
11111
12056
|
const {
|
|
11112
12057
|
value,
|
|
@@ -11117,12 +12062,12 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11117
12062
|
onSuggestionSelection,
|
|
11118
12063
|
children
|
|
11119
12064
|
} = props;
|
|
11120
|
-
const [inputValue, setInputValue] =
|
|
11121
|
-
const [suggestions, setSuggestions] =
|
|
11122
|
-
const [showSuggestions, setShowSuggestions] =
|
|
12065
|
+
const [inputValue, setInputValue] = useState23(value != null ? value : "");
|
|
12066
|
+
const [suggestions, setSuggestions] = useState23([]);
|
|
12067
|
+
const [showSuggestions, setShowSuggestions] = useState23(false);
|
|
11123
12068
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
11124
12069
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
11125
|
-
|
|
12070
|
+
useEffect26(() => {
|
|
11126
12071
|
if (suggestions.length > 0) {
|
|
11127
12072
|
openSuggestions();
|
|
11128
12073
|
} else {
|
|
@@ -11167,8 +12112,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11167
12112
|
const handleSetInputValue = (value2) => {
|
|
11168
12113
|
setInputValue(value2 != null ? value2 : "");
|
|
11169
12114
|
};
|
|
11170
|
-
const inputRef =
|
|
11171
|
-
const suggestionsRef =
|
|
12115
|
+
const inputRef = useRef30(null);
|
|
12116
|
+
const suggestionsRef = useRef30(null);
|
|
11172
12117
|
useOnClickOutside([inputRef.current, suggestionsRef.current], () => {
|
|
11173
12118
|
closeSuggestions();
|
|
11174
12119
|
});
|
|
@@ -11182,7 +12127,7 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11182
12127
|
inputValue,
|
|
11183
12128
|
onSugggestionClick: handleSuggestionClick
|
|
11184
12129
|
};
|
|
11185
|
-
return /* @__PURE__ */
|
|
12130
|
+
return /* @__PURE__ */ jsx275(AutocompleteSearchContext.Provider, { value: contextProps, children });
|
|
11186
12131
|
};
|
|
11187
12132
|
SearchAutocompleteWrapper.displayName = "SearchAutocompleteWrapper";
|
|
11188
12133
|
|
|
@@ -11192,7 +12137,7 @@ Search2.AutocompleteWrapper = SearchAutocompleteWrapper;
|
|
|
11192
12137
|
Search2.Suggestions = SearchSuggestions;
|
|
11193
12138
|
|
|
11194
12139
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
11195
|
-
import { forwardRef as
|
|
12140
|
+
import { forwardRef as forwardRef85, useId as useId21 } from "react";
|
|
11196
12141
|
|
|
11197
12142
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
11198
12143
|
import { createContext as createContext6, useContext as useContext9 } from "react";
|
|
@@ -11203,7 +12148,7 @@ var useCheckboxGroup = () => {
|
|
|
11203
12148
|
|
|
11204
12149
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
11205
12150
|
import {
|
|
11206
|
-
forwardRef as
|
|
12151
|
+
forwardRef as forwardRef84
|
|
11207
12152
|
} from "react";
|
|
11208
12153
|
|
|
11209
12154
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
@@ -11224,10 +12169,10 @@ var SelectionControl_default = {
|
|
|
11224
12169
|
};
|
|
11225
12170
|
|
|
11226
12171
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
11227
|
-
import { jsx as
|
|
11228
|
-
var SelectionControl =
|
|
12172
|
+
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
12173
|
+
var SelectionControl = forwardRef84((props, ref) => {
|
|
11229
12174
|
const { controlType, className, ...rest } = props;
|
|
11230
|
-
return /* @__PURE__ */
|
|
12175
|
+
return /* @__PURE__ */ jsx276(
|
|
11231
12176
|
"span",
|
|
11232
12177
|
{
|
|
11233
12178
|
ref,
|
|
@@ -11240,7 +12185,7 @@ var SelectionControl = forwardRef83((props, ref) => {
|
|
|
11240
12185
|
}
|
|
11241
12186
|
);
|
|
11242
12187
|
});
|
|
11243
|
-
var Label2 =
|
|
12188
|
+
var Label2 = forwardRef84(
|
|
11244
12189
|
(props, ref) => {
|
|
11245
12190
|
const {
|
|
11246
12191
|
disabled,
|
|
@@ -11251,7 +12196,7 @@ var Label2 = forwardRef83(
|
|
|
11251
12196
|
className,
|
|
11252
12197
|
...rest
|
|
11253
12198
|
} = props;
|
|
11254
|
-
return /* @__PURE__ */
|
|
12199
|
+
return /* @__PURE__ */ jsx276(
|
|
11255
12200
|
"label",
|
|
11256
12201
|
{
|
|
11257
12202
|
ref,
|
|
@@ -11282,8 +12227,8 @@ var selectionControlTypographyProps = {
|
|
|
11282
12227
|
};
|
|
11283
12228
|
|
|
11284
12229
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
11285
|
-
import { jsx as
|
|
11286
|
-
var Checkbox =
|
|
12230
|
+
import { jsx as jsx277, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
12231
|
+
var Checkbox = forwardRef85(
|
|
11287
12232
|
(props, ref) => {
|
|
11288
12233
|
const {
|
|
11289
12234
|
id,
|
|
@@ -11298,7 +12243,7 @@ var Checkbox = forwardRef84(
|
|
|
11298
12243
|
htmlProps = {},
|
|
11299
12244
|
...rest
|
|
11300
12245
|
} = props;
|
|
11301
|
-
const generatedId =
|
|
12246
|
+
const generatedId = useId21();
|
|
11302
12247
|
const uniqueId = id != null ? id : `${generatedId}-checkbox`;
|
|
11303
12248
|
const checkboxGroup = useCheckboxGroup();
|
|
11304
12249
|
const hasLabel = !!label;
|
|
@@ -11310,7 +12255,7 @@ var Checkbox = forwardRef84(
|
|
|
11310
12255
|
const isReadOnly = readOnly || (checkboxGroup == null ? void 0 : checkboxGroup.readOnly);
|
|
11311
12256
|
const hasError = error || (checkboxGroup == null ? void 0 : checkboxGroup.error);
|
|
11312
12257
|
const isDisabled = disabled || (checkboxGroup == null ? void 0 : checkboxGroup.disabled);
|
|
11313
|
-
return /* @__PURE__ */
|
|
12258
|
+
return /* @__PURE__ */ jsxs69(
|
|
11314
12259
|
Label2,
|
|
11315
12260
|
{
|
|
11316
12261
|
hasError,
|
|
@@ -11322,7 +12267,7 @@ var Checkbox = forwardRef84(
|
|
|
11322
12267
|
className: cn(className, htmlPropsClassName),
|
|
11323
12268
|
style,
|
|
11324
12269
|
children: [
|
|
11325
|
-
/* @__PURE__ */
|
|
12270
|
+
/* @__PURE__ */ jsx277(
|
|
11326
12271
|
"input",
|
|
11327
12272
|
{
|
|
11328
12273
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -11352,14 +12297,14 @@ var Checkbox = forwardRef84(
|
|
|
11352
12297
|
onClick: readOnlyClickHandler(isReadOnly, htmlProps.onClick)
|
|
11353
12298
|
}
|
|
11354
12299
|
),
|
|
11355
|
-
/* @__PURE__ */
|
|
12300
|
+
/* @__PURE__ */ jsx277(
|
|
11356
12301
|
SelectionControl,
|
|
11357
12302
|
{
|
|
11358
12303
|
controlType: "checkbox",
|
|
11359
12304
|
className: focus_default["focus-styled-sibling"]
|
|
11360
12305
|
}
|
|
11361
12306
|
),
|
|
11362
|
-
hasLabel && /* @__PURE__ */
|
|
12307
|
+
hasLabel && /* @__PURE__ */ jsx277(Typography, { ...selectionControlTypographyProps, children: label })
|
|
11363
12308
|
]
|
|
11364
12309
|
}
|
|
11365
12310
|
);
|
|
@@ -11368,8 +12313,8 @@ var Checkbox = forwardRef84(
|
|
|
11368
12313
|
Checkbox.displayName = "Checkbox";
|
|
11369
12314
|
|
|
11370
12315
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
11371
|
-
import { useId as
|
|
11372
|
-
import { jsx as
|
|
12316
|
+
import { useId as useId22 } from "react";
|
|
12317
|
+
import { jsx as jsx278, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
11373
12318
|
var CheckboxGroup = (props) => {
|
|
11374
12319
|
const {
|
|
11375
12320
|
label,
|
|
@@ -11387,7 +12332,7 @@ var CheckboxGroup = (props) => {
|
|
|
11387
12332
|
...rest
|
|
11388
12333
|
} = props;
|
|
11389
12334
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
11390
|
-
const generatedId =
|
|
12335
|
+
const generatedId = useId22();
|
|
11391
12336
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
11392
12337
|
const hasErrorMessage = !!errorMessage;
|
|
11393
12338
|
const showRequiredMarker = required || ariaRequired;
|
|
@@ -11401,7 +12346,7 @@ var CheckboxGroup = (props) => {
|
|
|
11401
12346
|
disabled,
|
|
11402
12347
|
readOnly
|
|
11403
12348
|
};
|
|
11404
|
-
return /* @__PURE__ */
|
|
12349
|
+
return /* @__PURE__ */ jsxs70(
|
|
11405
12350
|
"div",
|
|
11406
12351
|
{
|
|
11407
12352
|
...getBaseHTMLProps(
|
|
@@ -11411,7 +12356,7 @@ var CheckboxGroup = (props) => {
|
|
|
11411
12356
|
rest
|
|
11412
12357
|
),
|
|
11413
12358
|
children: [
|
|
11414
|
-
/* @__PURE__ */
|
|
12359
|
+
/* @__PURE__ */ jsxs70(
|
|
11415
12360
|
Typography,
|
|
11416
12361
|
{
|
|
11417
12362
|
as: "span",
|
|
@@ -11419,15 +12364,15 @@ var CheckboxGroup = (props) => {
|
|
|
11419
12364
|
id: uniqueGroupId,
|
|
11420
12365
|
className: readOnly ? Label_default["read-only"] : void 0,
|
|
11421
12366
|
children: [
|
|
11422
|
-
readOnly && /* @__PURE__ */
|
|
12367
|
+
readOnly && /* @__PURE__ */ jsx278(Icon, { icon: LockIcon, className: Label_default["read-only__icon"] }),
|
|
11423
12368
|
label,
|
|
11424
12369
|
" ",
|
|
11425
|
-
showRequiredMarker && /* @__PURE__ */
|
|
12370
|
+
showRequiredMarker && /* @__PURE__ */ jsx278(RequiredMarker, {})
|
|
11426
12371
|
]
|
|
11427
12372
|
}
|
|
11428
12373
|
),
|
|
11429
12374
|
renderInputMessage(tip, tipId),
|
|
11430
|
-
/* @__PURE__ */
|
|
12375
|
+
/* @__PURE__ */ jsx278(CheckboxGroupContext.Provider, { value: { ...contextProps }, children: /* @__PURE__ */ jsx278(
|
|
11431
12376
|
"div",
|
|
11432
12377
|
{
|
|
11433
12378
|
role: "group",
|
|
@@ -11445,7 +12390,7 @@ var CheckboxGroup = (props) => {
|
|
|
11445
12390
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
11446
12391
|
|
|
11447
12392
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
11448
|
-
import { forwardRef as
|
|
12393
|
+
import { forwardRef as forwardRef86, useId as useId23 } from "react";
|
|
11449
12394
|
|
|
11450
12395
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
11451
12396
|
import { createContext as createContext7, useContext as useContext10 } from "react";
|
|
@@ -11455,7 +12400,7 @@ var useRadioButtonGroup = () => {
|
|
|
11455
12400
|
};
|
|
11456
12401
|
|
|
11457
12402
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
11458
|
-
import { jsx as
|
|
12403
|
+
import { jsx as jsx279, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
11459
12404
|
var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
11460
12405
|
if (typeof value !== "undefined" && value !== null && group) {
|
|
11461
12406
|
if (typeof value === "number") {
|
|
@@ -11465,7 +12410,7 @@ var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
|
11465
12410
|
}
|
|
11466
12411
|
return !!value;
|
|
11467
12412
|
};
|
|
11468
|
-
var RadioButton =
|
|
12413
|
+
var RadioButton = forwardRef86(
|
|
11469
12414
|
(props, ref) => {
|
|
11470
12415
|
const {
|
|
11471
12416
|
id,
|
|
@@ -11489,7 +12434,7 @@ var RadioButton = forwardRef85(
|
|
|
11489
12434
|
style,
|
|
11490
12435
|
...restHtmlProps
|
|
11491
12436
|
} = htmlProps;
|
|
11492
|
-
const generatedId =
|
|
12437
|
+
const generatedId = useId23();
|
|
11493
12438
|
const uniqueId = id != null ? id : `${generatedId}-radioButton`;
|
|
11494
12439
|
const hasLabel = !!label;
|
|
11495
12440
|
const radioButtonGroup = useRadioButtonGroup();
|
|
@@ -11504,7 +12449,7 @@ var RadioButton = forwardRef85(
|
|
|
11504
12449
|
const isReadOnly = readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly);
|
|
11505
12450
|
const isDisabled = disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled);
|
|
11506
12451
|
const hasError = error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error);
|
|
11507
|
-
return /* @__PURE__ */
|
|
12452
|
+
return /* @__PURE__ */ jsxs71(
|
|
11508
12453
|
Label2,
|
|
11509
12454
|
{
|
|
11510
12455
|
hasError,
|
|
@@ -11516,7 +12461,7 @@ var RadioButton = forwardRef85(
|
|
|
11516
12461
|
htmlFor: uniqueId,
|
|
11517
12462
|
controlType: "radio",
|
|
11518
12463
|
children: [
|
|
11519
|
-
/* @__PURE__ */
|
|
12464
|
+
/* @__PURE__ */ jsx279(
|
|
11520
12465
|
"input",
|
|
11521
12466
|
{
|
|
11522
12467
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -11542,14 +12487,14 @@ var RadioButton = forwardRef85(
|
|
|
11542
12487
|
onClick: readOnlyClickHandler(isReadOnly, htmlProps.onClick)
|
|
11543
12488
|
}
|
|
11544
12489
|
),
|
|
11545
|
-
/* @__PURE__ */
|
|
12490
|
+
/* @__PURE__ */ jsx279(
|
|
11546
12491
|
SelectionControl,
|
|
11547
12492
|
{
|
|
11548
12493
|
controlType: "radio",
|
|
11549
12494
|
className: focus_default["focus-styled-sibling"]
|
|
11550
12495
|
}
|
|
11551
12496
|
),
|
|
11552
|
-
/* @__PURE__ */
|
|
12497
|
+
/* @__PURE__ */ jsx279(Typography, { ...selectionControlTypographyProps, children: children != null ? children : label })
|
|
11553
12498
|
]
|
|
11554
12499
|
}
|
|
11555
12500
|
);
|
|
@@ -11559,11 +12504,11 @@ RadioButton.displayName = "RadioButton";
|
|
|
11559
12504
|
|
|
11560
12505
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
11561
12506
|
import {
|
|
11562
|
-
forwardRef as
|
|
11563
|
-
useId as
|
|
11564
|
-
useState as
|
|
12507
|
+
forwardRef as forwardRef87,
|
|
12508
|
+
useId as useId24,
|
|
12509
|
+
useState as useState24
|
|
11565
12510
|
} from "react";
|
|
11566
|
-
import { jsx as
|
|
12511
|
+
import { jsx as jsx280, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
11567
12512
|
var RadioButtonGroupInner = (props, ref) => {
|
|
11568
12513
|
const {
|
|
11569
12514
|
name,
|
|
@@ -11584,8 +12529,8 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11584
12529
|
...rest
|
|
11585
12530
|
} = props;
|
|
11586
12531
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
11587
|
-
const [groupValue, setGroupValue] =
|
|
11588
|
-
const generatedId =
|
|
12532
|
+
const [groupValue, setGroupValue] = useState24(value);
|
|
12533
|
+
const generatedId = useId24();
|
|
11589
12534
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
|
|
11590
12535
|
const handleChange = combineHandlers(
|
|
11591
12536
|
(e) => setGroupValue(e.target.value),
|
|
@@ -11605,7 +12550,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11605
12550
|
value: groupValue,
|
|
11606
12551
|
onChange: handleChange
|
|
11607
12552
|
};
|
|
11608
|
-
return /* @__PURE__ */
|
|
12553
|
+
return /* @__PURE__ */ jsxs72(
|
|
11609
12554
|
"div",
|
|
11610
12555
|
{
|
|
11611
12556
|
...getBaseHTMLProps(
|
|
@@ -11616,7 +12561,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11616
12561
|
),
|
|
11617
12562
|
ref,
|
|
11618
12563
|
children: [
|
|
11619
|
-
/* @__PURE__ */
|
|
12564
|
+
/* @__PURE__ */ jsxs72(
|
|
11620
12565
|
Typography,
|
|
11621
12566
|
{
|
|
11622
12567
|
as: "span",
|
|
@@ -11624,15 +12569,15 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11624
12569
|
id: uniqueGroupId,
|
|
11625
12570
|
className: readOnly ? Label_default["read-only"] : void 0,
|
|
11626
12571
|
children: [
|
|
11627
|
-
readOnly && /* @__PURE__ */
|
|
12572
|
+
readOnly && /* @__PURE__ */ jsx280(Icon, { icon: LockIcon, className: Label_default["read-only__icon"] }),
|
|
11628
12573
|
label,
|
|
11629
12574
|
" ",
|
|
11630
|
-
showRequiredMarker && /* @__PURE__ */
|
|
12575
|
+
showRequiredMarker && /* @__PURE__ */ jsx280(RequiredMarker, {})
|
|
11631
12576
|
]
|
|
11632
12577
|
}
|
|
11633
12578
|
),
|
|
11634
12579
|
renderInputMessage(tip, tipId),
|
|
11635
|
-
/* @__PURE__ */
|
|
12580
|
+
/* @__PURE__ */ jsx280(RadioButtonGroupContext.Provider, { value: { ...contextProps }, children: /* @__PURE__ */ jsx280(
|
|
11636
12581
|
"div",
|
|
11637
12582
|
{
|
|
11638
12583
|
role: "radiogroup",
|
|
@@ -11648,11 +12593,11 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11648
12593
|
}
|
|
11649
12594
|
);
|
|
11650
12595
|
};
|
|
11651
|
-
var RadioButtonGroup =
|
|
12596
|
+
var RadioButtonGroup = forwardRef87(RadioButtonGroupInner);
|
|
11652
12597
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
11653
12598
|
|
|
11654
12599
|
// src/components/Skeleton/Skeleton.tsx
|
|
11655
|
-
import { forwardRef as
|
|
12600
|
+
import { forwardRef as forwardRef88 } from "react";
|
|
11656
12601
|
|
|
11657
12602
|
// src/components/Skeleton/Skeleton.module.css
|
|
11658
12603
|
var Skeleton_default = {
|
|
@@ -11661,8 +12606,8 @@ var Skeleton_default = {
|
|
|
11661
12606
|
};
|
|
11662
12607
|
|
|
11663
12608
|
// src/components/Skeleton/Skeleton.tsx
|
|
11664
|
-
import { jsx as
|
|
11665
|
-
var Skeleton =
|
|
12609
|
+
import { jsx as jsx281 } from "react/jsx-runtime";
|
|
12610
|
+
var Skeleton = forwardRef88(
|
|
11666
12611
|
(props, ref) => {
|
|
11667
12612
|
const {
|
|
11668
12613
|
width,
|
|
@@ -11672,7 +12617,7 @@ var Skeleton = forwardRef87(
|
|
|
11672
12617
|
style,
|
|
11673
12618
|
...rest
|
|
11674
12619
|
} = props;
|
|
11675
|
-
return /* @__PURE__ */
|
|
12620
|
+
return /* @__PURE__ */ jsx281(
|
|
11676
12621
|
"div",
|
|
11677
12622
|
{
|
|
11678
12623
|
ref,
|
|
@@ -11686,7 +12631,7 @@ var Skeleton = forwardRef87(
|
|
|
11686
12631
|
Skeleton.displayName = "Skeleton";
|
|
11687
12632
|
|
|
11688
12633
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
11689
|
-
import { forwardRef as
|
|
12634
|
+
import { forwardRef as forwardRef89 } from "react";
|
|
11690
12635
|
|
|
11691
12636
|
// src/components/SkipToContent/SkipToContent.module.css
|
|
11692
12637
|
var SkipToContent_default = {
|
|
@@ -11694,8 +12639,8 @@ var SkipToContent_default = {
|
|
|
11694
12639
|
};
|
|
11695
12640
|
|
|
11696
12641
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
11697
|
-
import { jsx as
|
|
11698
|
-
var SkipToContent =
|
|
12642
|
+
import { jsx as jsx282 } from "react/jsx-runtime";
|
|
12643
|
+
var SkipToContent = forwardRef89(
|
|
11699
12644
|
(props, ref) => {
|
|
11700
12645
|
const {
|
|
11701
12646
|
text = "Til hovedinnhold",
|
|
@@ -11710,12 +12655,12 @@ var SkipToContent = forwardRef88(
|
|
|
11710
12655
|
style,
|
|
11711
12656
|
...restHtmlProps
|
|
11712
12657
|
} = htmlProps;
|
|
11713
|
-
return /* @__PURE__ */
|
|
12658
|
+
return /* @__PURE__ */ jsx282(
|
|
11714
12659
|
Contrast,
|
|
11715
12660
|
{
|
|
11716
12661
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
11717
12662
|
style: { ...style, top },
|
|
11718
|
-
children: /* @__PURE__ */
|
|
12663
|
+
children: /* @__PURE__ */ jsx282(Link, { ...getBaseHTMLProps(id, restHtmlProps, rest), ref, children: text })
|
|
11719
12664
|
}
|
|
11720
12665
|
);
|
|
11721
12666
|
}
|
|
@@ -11723,7 +12668,7 @@ var SkipToContent = forwardRef88(
|
|
|
11723
12668
|
SkipToContent.displayName = "SkipToContent";
|
|
11724
12669
|
|
|
11725
12670
|
// src/components/SplitButton/SplitButton.tsx
|
|
11726
|
-
import { forwardRef as
|
|
12671
|
+
import { forwardRef as forwardRef90, useState as useState25 } from "react";
|
|
11727
12672
|
|
|
11728
12673
|
// src/components/SplitButton/SplitButton.module.css
|
|
11729
12674
|
var SplitButton_default = {
|
|
@@ -11734,8 +12679,8 @@ var SplitButton_default = {
|
|
|
11734
12679
|
};
|
|
11735
12680
|
|
|
11736
12681
|
// src/components/SplitButton/SplitButton.tsx
|
|
11737
|
-
import { jsx as
|
|
11738
|
-
var SplitButton =
|
|
12682
|
+
import { jsx as jsx283, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
12683
|
+
var SplitButton = forwardRef90(
|
|
11739
12684
|
(props, ref) => {
|
|
11740
12685
|
const {
|
|
11741
12686
|
size: size2,
|
|
@@ -11745,13 +12690,13 @@ var SplitButton = forwardRef89(
|
|
|
11745
12690
|
className,
|
|
11746
12691
|
...rest
|
|
11747
12692
|
} = props;
|
|
11748
|
-
const [isOpen, setIsOpen] =
|
|
12693
|
+
const [isOpen, setIsOpen] = useState25(false);
|
|
11749
12694
|
const buttonStyleProps = {
|
|
11750
12695
|
purpose,
|
|
11751
12696
|
size: size2
|
|
11752
12697
|
};
|
|
11753
|
-
return /* @__PURE__ */
|
|
11754
|
-
/* @__PURE__ */
|
|
12698
|
+
return /* @__PURE__ */ jsxs73("div", { ref, className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
12699
|
+
/* @__PURE__ */ jsx283(
|
|
11755
12700
|
Button,
|
|
11756
12701
|
{
|
|
11757
12702
|
...buttonStyleProps,
|
|
@@ -11760,8 +12705,8 @@ var SplitButton = forwardRef89(
|
|
|
11760
12705
|
className: SplitButton_default.main
|
|
11761
12706
|
}
|
|
11762
12707
|
),
|
|
11763
|
-
/* @__PURE__ */
|
|
11764
|
-
/* @__PURE__ */
|
|
12708
|
+
/* @__PURE__ */ jsxs73(OverflowMenuGroup, { onToggle: () => setIsOpen(!isOpen), children: [
|
|
12709
|
+
/* @__PURE__ */ jsx283(
|
|
11765
12710
|
Button,
|
|
11766
12711
|
{
|
|
11767
12712
|
...buttonStyleProps,
|
|
@@ -11774,7 +12719,7 @@ var SplitButton = forwardRef89(
|
|
|
11774
12719
|
)
|
|
11775
12720
|
}
|
|
11776
12721
|
),
|
|
11777
|
-
/* @__PURE__ */
|
|
12722
|
+
/* @__PURE__ */ jsx283(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ jsx283(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ jsx283(OverflowMenuButton, { ...item, children: item.children }, index)) }) })
|
|
11778
12723
|
] })
|
|
11779
12724
|
] });
|
|
11780
12725
|
}
|
|
@@ -11786,10 +12731,10 @@ import {
|
|
|
11786
12731
|
Children as Children5,
|
|
11787
12732
|
Fragment as Fragment13,
|
|
11788
12733
|
cloneElement as cloneElement8,
|
|
11789
|
-
forwardRef as
|
|
12734
|
+
forwardRef as forwardRef98,
|
|
11790
12735
|
isValidElement as isValidElement9,
|
|
11791
|
-
useEffect as
|
|
11792
|
-
useState as
|
|
12736
|
+
useEffect as useEffect28,
|
|
12737
|
+
useState as useState27
|
|
11793
12738
|
} from "react";
|
|
11794
12739
|
|
|
11795
12740
|
// src/components/Table/collapsible/Table.context.tsx
|
|
@@ -11801,30 +12746,30 @@ var CollapsibleTableContext = createContext8({
|
|
|
11801
12746
|
var useCollapsibleTableContext = () => useContext11(CollapsibleTableContext);
|
|
11802
12747
|
|
|
11803
12748
|
// src/components/Table/normal/Body.tsx
|
|
11804
|
-
import { forwardRef as
|
|
11805
|
-
import { jsx as
|
|
11806
|
-
var Body =
|
|
12749
|
+
import { forwardRef as forwardRef91 } from "react";
|
|
12750
|
+
import { jsx as jsx284 } from "react/jsx-runtime";
|
|
12751
|
+
var Body = forwardRef91(
|
|
11807
12752
|
(props, ref) => {
|
|
11808
|
-
return /* @__PURE__ */
|
|
12753
|
+
return /* @__PURE__ */ jsx284("tbody", { ref, ...props });
|
|
11809
12754
|
}
|
|
11810
12755
|
);
|
|
11811
12756
|
Body.displayName = "Table.Body";
|
|
11812
12757
|
|
|
11813
12758
|
// src/components/Table/normal/Cell.tsx
|
|
11814
12759
|
import {
|
|
11815
|
-
forwardRef as
|
|
12760
|
+
forwardRef as forwardRef93
|
|
11816
12761
|
} from "react";
|
|
11817
12762
|
|
|
11818
12763
|
// src/components/Table/normal/Head.tsx
|
|
11819
12764
|
import {
|
|
11820
12765
|
createContext as createContext9,
|
|
11821
|
-
forwardRef as
|
|
12766
|
+
forwardRef as forwardRef92,
|
|
11822
12767
|
useContext as useContext12
|
|
11823
12768
|
} from "react";
|
|
11824
|
-
import { jsx as
|
|
11825
|
-
var Head =
|
|
12769
|
+
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
12770
|
+
var Head = forwardRef92(
|
|
11826
12771
|
({ children, ...rest }, ref) => {
|
|
11827
|
-
return /* @__PURE__ */
|
|
12772
|
+
return /* @__PURE__ */ jsx285("thead", { ref, ...rest, children: /* @__PURE__ */ jsx285(HeadContext.Provider, { value: true, children }) });
|
|
11828
12773
|
}
|
|
11829
12774
|
);
|
|
11830
12775
|
Head.displayName = "Table.Head";
|
|
@@ -11860,8 +12805,8 @@ var Table_default = {
|
|
|
11860
12805
|
};
|
|
11861
12806
|
|
|
11862
12807
|
// src/components/Table/normal/Cell.tsx
|
|
11863
|
-
import { jsx as
|
|
11864
|
-
var Cell =
|
|
12808
|
+
import { jsx as jsx286 } from "react/jsx-runtime";
|
|
12809
|
+
var Cell = forwardRef93(
|
|
11865
12810
|
({
|
|
11866
12811
|
children,
|
|
11867
12812
|
type: _type,
|
|
@@ -11874,7 +12819,7 @@ var Cell = forwardRef92(
|
|
|
11874
12819
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
11875
12820
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
11876
12821
|
const isComplexLayout = layout === "text and icon";
|
|
11877
|
-
return isCollapsibleChild ? /* @__PURE__ */
|
|
12822
|
+
return isCollapsibleChild ? /* @__PURE__ */ jsx286(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ jsx286(
|
|
11878
12823
|
"th",
|
|
11879
12824
|
{
|
|
11880
12825
|
ref,
|
|
@@ -11884,15 +12829,15 @@ var Cell = forwardRef92(
|
|
|
11884
12829
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
11885
12830
|
Table_default["cell--head"]
|
|
11886
12831
|
),
|
|
11887
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
12832
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx286("div", { className: Table_default.cell__inner, children }) : children
|
|
11888
12833
|
}
|
|
11889
|
-
) : /* @__PURE__ */
|
|
12834
|
+
) : /* @__PURE__ */ jsx286(
|
|
11890
12835
|
"td",
|
|
11891
12836
|
{
|
|
11892
12837
|
ref,
|
|
11893
12838
|
...rest,
|
|
11894
12839
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
11895
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
12840
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx286("div", { className: Table_default.cell__inner, children }) : children
|
|
11896
12841
|
}
|
|
11897
12842
|
);
|
|
11898
12843
|
}
|
|
@@ -11900,23 +12845,23 @@ var Cell = forwardRef92(
|
|
|
11900
12845
|
Cell.displayName = "Table.Cell";
|
|
11901
12846
|
|
|
11902
12847
|
// src/components/Table/normal/Foot.tsx
|
|
11903
|
-
import { forwardRef as
|
|
11904
|
-
import { jsx as
|
|
11905
|
-
var Foot =
|
|
12848
|
+
import { forwardRef as forwardRef94 } from "react";
|
|
12849
|
+
import { jsx as jsx287 } from "react/jsx-runtime";
|
|
12850
|
+
var Foot = forwardRef94(
|
|
11906
12851
|
(props, ref) => {
|
|
11907
|
-
return /* @__PURE__ */
|
|
12852
|
+
return /* @__PURE__ */ jsx287("tfoot", { ref, ...props });
|
|
11908
12853
|
}
|
|
11909
12854
|
);
|
|
11910
12855
|
Foot.displayName = "Table.Foot";
|
|
11911
12856
|
|
|
11912
12857
|
// src/components/Table/normal/Row.tsx
|
|
11913
|
-
import { forwardRef as
|
|
11914
|
-
import { jsx as
|
|
11915
|
-
var Row =
|
|
12858
|
+
import { forwardRef as forwardRef95 } from "react";
|
|
12859
|
+
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
12860
|
+
var Row = forwardRef95(
|
|
11916
12861
|
({ type: _type, mode = "normal", hoverable, selected, className, ...rest }, ref) => {
|
|
11917
12862
|
const isInHeader = useIsInTableHead();
|
|
11918
12863
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
11919
|
-
return /* @__PURE__ */
|
|
12864
|
+
return /* @__PURE__ */ jsx288(
|
|
11920
12865
|
"tr",
|
|
11921
12866
|
{
|
|
11922
12867
|
ref,
|
|
@@ -11939,23 +12884,23 @@ var Row = forwardRef94(
|
|
|
11939
12884
|
Row.displayName = "Table.Row";
|
|
11940
12885
|
|
|
11941
12886
|
// src/components/Table/normal/SortCell.tsx
|
|
11942
|
-
import { forwardRef as
|
|
11943
|
-
import { jsx as
|
|
12887
|
+
import { forwardRef as forwardRef96 } from "react";
|
|
12888
|
+
import { jsx as jsx289, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
11944
12889
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
11945
12890
|
if (!isSorted || !sortOrder) {
|
|
11946
|
-
return /* @__PURE__ */
|
|
12891
|
+
return /* @__PURE__ */ jsx289(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
11947
12892
|
}
|
|
11948
|
-
return sortOrder === "ascending" ? /* @__PURE__ */
|
|
12893
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ jsx289(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ jsx289(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
11949
12894
|
};
|
|
11950
|
-
var SortCell =
|
|
11951
|
-
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */
|
|
12895
|
+
var SortCell = forwardRef96(
|
|
12896
|
+
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ jsx289(
|
|
11952
12897
|
Cell,
|
|
11953
12898
|
{
|
|
11954
12899
|
ref,
|
|
11955
12900
|
type: "head",
|
|
11956
12901
|
"aria-sort": isSorted && sortOrder ? sortOrder : void 0,
|
|
11957
12902
|
...rest,
|
|
11958
|
-
children: /* @__PURE__ */
|
|
12903
|
+
children: /* @__PURE__ */ jsxs74(
|
|
11959
12904
|
"button",
|
|
11960
12905
|
{
|
|
11961
12906
|
onClick,
|
|
@@ -11979,8 +12924,8 @@ var SortCell = forwardRef95(
|
|
|
11979
12924
|
SortCell.displayName = "Table.SortCell";
|
|
11980
12925
|
|
|
11981
12926
|
// src/components/Table/normal/Table.tsx
|
|
11982
|
-
import { forwardRef as
|
|
11983
|
-
import { jsx as
|
|
12927
|
+
import { forwardRef as forwardRef97 } from "react";
|
|
12928
|
+
import { jsx as jsx290 } from "react/jsx-runtime";
|
|
11984
12929
|
function getDensityCn2(value) {
|
|
11985
12930
|
switch (value) {
|
|
11986
12931
|
case "normal":
|
|
@@ -11990,7 +12935,7 @@ function getDensityCn2(value) {
|
|
|
11990
12935
|
return "extra-compact";
|
|
11991
12936
|
}
|
|
11992
12937
|
}
|
|
11993
|
-
var Table =
|
|
12938
|
+
var Table = forwardRef97(
|
|
11994
12939
|
({
|
|
11995
12940
|
density = "normal",
|
|
11996
12941
|
stickyHeader,
|
|
@@ -11999,7 +12944,7 @@ var Table = forwardRef96(
|
|
|
11999
12944
|
children,
|
|
12000
12945
|
...rest
|
|
12001
12946
|
}, ref) => {
|
|
12002
|
-
return /* @__PURE__ */
|
|
12947
|
+
return /* @__PURE__ */ jsx290(
|
|
12003
12948
|
"table",
|
|
12004
12949
|
{
|
|
12005
12950
|
ref,
|
|
@@ -12020,30 +12965,30 @@ var Table = forwardRef96(
|
|
|
12020
12965
|
Table.displayName = "Table";
|
|
12021
12966
|
|
|
12022
12967
|
// src/components/Table/normal/TableWrapper.tsx
|
|
12023
|
-
import { useEffect as
|
|
12024
|
-
import { jsx as
|
|
12968
|
+
import { useEffect as useEffect27, useRef as useRef31, useState as useState26 } from "react";
|
|
12969
|
+
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
12025
12970
|
var TableWrapper = ({ className, ...rest }) => {
|
|
12026
|
-
const [overflowX, setOverflowX] =
|
|
12027
|
-
const [windowWidth, setWindowWidth] =
|
|
12971
|
+
const [overflowX, setOverflowX] = useState26(false);
|
|
12972
|
+
const [windowWidth, setWindowWidth] = useState26(window.innerWidth);
|
|
12028
12973
|
function isOverflowingX(event) {
|
|
12029
12974
|
return event.offsetWidth < event.scrollWidth;
|
|
12030
12975
|
}
|
|
12031
|
-
const wrapperRef =
|
|
12032
|
-
|
|
12976
|
+
const wrapperRef = useRef31(null);
|
|
12977
|
+
useEffect27(() => {
|
|
12033
12978
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
12034
12979
|
setOverflowX(true);
|
|
12035
12980
|
return;
|
|
12036
12981
|
}
|
|
12037
12982
|
setOverflowX(false);
|
|
12038
12983
|
}, [windowWidth]);
|
|
12039
|
-
|
|
12984
|
+
useEffect27(() => {
|
|
12040
12985
|
function handleResize() {
|
|
12041
12986
|
setWindowWidth(window.innerWidth);
|
|
12042
12987
|
}
|
|
12043
12988
|
window.addEventListener("resize", handleResize);
|
|
12044
12989
|
return () => window.removeEventListener("resize", handleResize);
|
|
12045
12990
|
});
|
|
12046
|
-
return /* @__PURE__ */
|
|
12991
|
+
return /* @__PURE__ */ jsx291(
|
|
12047
12992
|
"div",
|
|
12048
12993
|
{
|
|
12049
12994
|
ref: wrapperRef,
|
|
@@ -12070,8 +13015,8 @@ Table2.Row = Row;
|
|
|
12070
13015
|
Table2.Foot = Foot;
|
|
12071
13016
|
|
|
12072
13017
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12073
|
-
import { Fragment as Fragment14, jsx as
|
|
12074
|
-
var CollapsibleRow =
|
|
13018
|
+
import { Fragment as Fragment14, jsx as jsx292, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
13019
|
+
var CollapsibleRow = forwardRef98(
|
|
12075
13020
|
({
|
|
12076
13021
|
type: _type,
|
|
12077
13022
|
className,
|
|
@@ -12084,8 +13029,8 @@ var CollapsibleRow = forwardRef97(
|
|
|
12084
13029
|
const isInHead = useIsInTableHead();
|
|
12085
13030
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
12086
13031
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
12087
|
-
const [childrenCollapsed, setChildrenCollapsed] =
|
|
12088
|
-
|
|
13032
|
+
const [childrenCollapsed, setChildrenCollapsed] = useState27(true);
|
|
13033
|
+
useEffect28(() => {
|
|
12089
13034
|
!isCollapsed && setChildrenCollapsed(true);
|
|
12090
13035
|
}, [isCollapsed]);
|
|
12091
13036
|
const rowProps = (isOpenCollapsibleHeader) => {
|
|
@@ -12112,33 +13057,33 @@ var CollapsibleRow = forwardRef97(
|
|
|
12112
13057
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
12113
13058
|
const id = derivativeIdGenerator(prefix3, index.toString());
|
|
12114
13059
|
collapsibleIds.push(id);
|
|
12115
|
-
return /* @__PURE__ */
|
|
12116
|
-
/* @__PURE__ */
|
|
13060
|
+
return /* @__PURE__ */ jsxs75(Fragment13, { children: [
|
|
13061
|
+
/* @__PURE__ */ jsx292(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
12117
13062
|
isValidElement9(child) && cloneElement8(child, {
|
|
12118
13063
|
collapsibleProps: { isCollapsibleChild: true }
|
|
12119
13064
|
})
|
|
12120
13065
|
] }, `DL-${index}`);
|
|
12121
13066
|
}) : null;
|
|
12122
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
13067
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx292(Row, { ...rowProps(), children: /* @__PURE__ */ jsx292(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx292(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
12123
13068
|
const definingColumnCells = childrenArray.slice().filter((column2, index) => definingColumnIndex.indexOf(index) > -1).sort((a2, b) => {
|
|
12124
13069
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a2)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
12125
13070
|
});
|
|
12126
13071
|
const headerRow = () => {
|
|
12127
13072
|
if (type !== "head" || !isCollapsed) return null;
|
|
12128
|
-
return /* @__PURE__ */
|
|
13073
|
+
return /* @__PURE__ */ jsx292(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs75(Fragment14, { children: [
|
|
12129
13074
|
definingColumnCells,
|
|
12130
|
-
/* @__PURE__ */
|
|
13075
|
+
/* @__PURE__ */ jsxs75(Table2.Cell, { type: "head", layout: "center", children: [
|
|
12131
13076
|
"Utvid",
|
|
12132
|
-
/* @__PURE__ */
|
|
13077
|
+
/* @__PURE__ */ jsx292(VisuallyHidden, { as: "span", children: "raden" })
|
|
12133
13078
|
] })
|
|
12134
13079
|
] }) });
|
|
12135
13080
|
};
|
|
12136
13081
|
const idList = spaceSeparatedIdListGenerator(collapsibleIds);
|
|
12137
13082
|
const rowWithChevron = () => {
|
|
12138
13083
|
if (type !== "body" || !isCollapsed) return null;
|
|
12139
|
-
return /* @__PURE__ */
|
|
13084
|
+
return /* @__PURE__ */ jsxs75(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
12140
13085
|
definingColumnCells,
|
|
12141
|
-
/* @__PURE__ */
|
|
13086
|
+
/* @__PURE__ */ jsx292(Table2.Cell, { children: /* @__PURE__ */ jsx292(
|
|
12142
13087
|
"button",
|
|
12143
13088
|
{
|
|
12144
13089
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
@@ -12150,7 +13095,7 @@ var CollapsibleRow = forwardRef97(
|
|
|
12150
13095
|
utilStyles_default["remove-button-styling"],
|
|
12151
13096
|
focusable
|
|
12152
13097
|
),
|
|
12153
|
-
children: /* @__PURE__ */
|
|
13098
|
+
children: /* @__PURE__ */ jsx292(
|
|
12154
13099
|
AnimatedChevronUpDown,
|
|
12155
13100
|
{
|
|
12156
13101
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -12162,28 +13107,28 @@ var CollapsibleRow = forwardRef97(
|
|
|
12162
13107
|
) })
|
|
12163
13108
|
] });
|
|
12164
13109
|
};
|
|
12165
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
13110
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs75(Fragment14, { children: [
|
|
12166
13111
|
headerRow(),
|
|
12167
|
-
type === "body" && /* @__PURE__ */
|
|
13112
|
+
type === "body" && /* @__PURE__ */ jsxs75(Fragment14, { children: [
|
|
12168
13113
|
rowWithChevron(),
|
|
12169
13114
|
childrenCollapsed ? null : collapsedRows
|
|
12170
13115
|
] })
|
|
12171
|
-
] }) : /* @__PURE__ */
|
|
13116
|
+
] }) : /* @__PURE__ */ jsx292(Row, { ref, ...rowProps(), children });
|
|
12172
13117
|
}
|
|
12173
13118
|
);
|
|
12174
13119
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
12175
13120
|
|
|
12176
13121
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
12177
|
-
import { forwardRef as
|
|
12178
|
-
import { jsx as
|
|
12179
|
-
var CollapsibleTable =
|
|
13122
|
+
import { forwardRef as forwardRef99 } from "react";
|
|
13123
|
+
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
13124
|
+
var CollapsibleTable = forwardRef99((props, ref) => {
|
|
12180
13125
|
const {
|
|
12181
13126
|
isCollapsed,
|
|
12182
13127
|
headerValues,
|
|
12183
13128
|
definingColumnIndex = [0],
|
|
12184
13129
|
...rest
|
|
12185
13130
|
} = props;
|
|
12186
|
-
return /* @__PURE__ */
|
|
13131
|
+
return /* @__PURE__ */ jsx293(
|
|
12187
13132
|
CollapsibleTableContext.Provider,
|
|
12188
13133
|
{
|
|
12189
13134
|
value: {
|
|
@@ -12191,7 +13136,7 @@ var CollapsibleTable = forwardRef98((props, ref) => {
|
|
|
12191
13136
|
headerValues,
|
|
12192
13137
|
definingColumnIndex
|
|
12193
13138
|
},
|
|
12194
|
-
children: /* @__PURE__ */
|
|
13139
|
+
children: /* @__PURE__ */ jsx293(Table2, { ref, ...rest })
|
|
12195
13140
|
}
|
|
12196
13141
|
);
|
|
12197
13142
|
});
|
|
@@ -12203,11 +13148,11 @@ CollapsibleTable2.Row = CollapsibleRow;
|
|
|
12203
13148
|
|
|
12204
13149
|
// src/components/Tabs/Tabs.tsx
|
|
12205
13150
|
import {
|
|
12206
|
-
forwardRef as
|
|
12207
|
-
useEffect as
|
|
12208
|
-
useId as
|
|
12209
|
-
useRef as
|
|
12210
|
-
useState as
|
|
13151
|
+
forwardRef as forwardRef100,
|
|
13152
|
+
useEffect as useEffect29,
|
|
13153
|
+
useId as useId25,
|
|
13154
|
+
useRef as useRef32,
|
|
13155
|
+
useState as useState28
|
|
12211
13156
|
} from "react";
|
|
12212
13157
|
|
|
12213
13158
|
// src/components/Tabs/Tabs.context.tsx
|
|
@@ -12238,8 +13183,8 @@ var Tabs_default = {
|
|
|
12238
13183
|
};
|
|
12239
13184
|
|
|
12240
13185
|
// src/components/Tabs/Tabs.tsx
|
|
12241
|
-
import { jsx as
|
|
12242
|
-
var Tabs =
|
|
13186
|
+
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
13187
|
+
var Tabs = forwardRef100((props, ref) => {
|
|
12243
13188
|
const {
|
|
12244
13189
|
id,
|
|
12245
13190
|
activeTab,
|
|
@@ -12251,17 +13196,17 @@ var Tabs = forwardRef99((props, ref) => {
|
|
|
12251
13196
|
htmlProps,
|
|
12252
13197
|
...rest
|
|
12253
13198
|
} = props;
|
|
12254
|
-
const generatedId =
|
|
13199
|
+
const generatedId = useId25();
|
|
12255
13200
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
12256
|
-
const [thisActiveTab, setActiveTab] =
|
|
12257
|
-
const [hasTabFocus, setHasTabFocus] =
|
|
12258
|
-
const tabListRef =
|
|
12259
|
-
const tabPanelsRef =
|
|
13201
|
+
const [thisActiveTab, setActiveTab] = useState28(activeTab != null ? activeTab : 0);
|
|
13202
|
+
const [hasTabFocus, setHasTabFocus] = useState28(false);
|
|
13203
|
+
const tabListRef = useRef32(null);
|
|
13204
|
+
const tabPanelsRef = useRef32(null);
|
|
12260
13205
|
const handleTabChange = (index) => {
|
|
12261
13206
|
setActiveTab(index);
|
|
12262
13207
|
onChange && onChange(index);
|
|
12263
13208
|
};
|
|
12264
|
-
|
|
13209
|
+
useEffect29(() => {
|
|
12265
13210
|
if (activeTab !== void 0 && activeTab !== thisActiveTab) {
|
|
12266
13211
|
setActiveTab(activeTab);
|
|
12267
13212
|
}
|
|
@@ -12270,7 +13215,7 @@ var Tabs = forwardRef99((props, ref) => {
|
|
|
12270
13215
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12271
13216
|
["--dds-tabs-width"]: width
|
|
12272
13217
|
};
|
|
12273
|
-
return /* @__PURE__ */
|
|
13218
|
+
return /* @__PURE__ */ jsx294(
|
|
12274
13219
|
TabsContext.Provider,
|
|
12275
13220
|
{
|
|
12276
13221
|
value: {
|
|
@@ -12283,7 +13228,7 @@ var Tabs = forwardRef99((props, ref) => {
|
|
|
12283
13228
|
setHasTabFocus,
|
|
12284
13229
|
tabContentDirection
|
|
12285
13230
|
},
|
|
12286
|
-
children: /* @__PURE__ */
|
|
13231
|
+
children: /* @__PURE__ */ jsx294(
|
|
12287
13232
|
"div",
|
|
12288
13233
|
{
|
|
12289
13234
|
ref,
|
|
@@ -12304,25 +13249,25 @@ Tabs.displayName = "Tabs";
|
|
|
12304
13249
|
|
|
12305
13250
|
// src/components/Tabs/Tab.tsx
|
|
12306
13251
|
import {
|
|
12307
|
-
forwardRef as
|
|
13252
|
+
forwardRef as forwardRef101,
|
|
12308
13253
|
useCallback as useCallback7,
|
|
12309
|
-
useEffect as
|
|
12310
|
-
useRef as
|
|
13254
|
+
useEffect as useEffect30,
|
|
13255
|
+
useRef as useRef33
|
|
12311
13256
|
} from "react";
|
|
12312
13257
|
|
|
12313
13258
|
// src/components/Tabs/TabWidthContext.tsx
|
|
12314
13259
|
import {
|
|
12315
13260
|
createContext as createContext11,
|
|
12316
13261
|
useContext as useContext14,
|
|
12317
|
-
useLayoutEffect as
|
|
13262
|
+
useLayoutEffect as useLayoutEffect3
|
|
12318
13263
|
} from "react";
|
|
12319
|
-
import { jsx as
|
|
13264
|
+
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
12320
13265
|
var TabContext = createContext11(null);
|
|
12321
13266
|
function TabWidthContextProvider({
|
|
12322
13267
|
children,
|
|
12323
13268
|
onChangeWidths
|
|
12324
13269
|
}) {
|
|
12325
|
-
return /* @__PURE__ */
|
|
13270
|
+
return /* @__PURE__ */ jsx295(
|
|
12326
13271
|
TabContext.Provider,
|
|
12327
13272
|
{
|
|
12328
13273
|
value: {
|
|
@@ -12347,15 +13292,15 @@ function TabWidthContextProvider({
|
|
|
12347
13292
|
}
|
|
12348
13293
|
function useSetTabWidth(index, width) {
|
|
12349
13294
|
const context = useContext14(TabContext);
|
|
12350
|
-
|
|
13295
|
+
useLayoutEffect3(() => {
|
|
12351
13296
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
12352
13297
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
12353
13298
|
}, [index, width]);
|
|
12354
13299
|
}
|
|
12355
13300
|
|
|
12356
13301
|
// src/components/Tabs/Tab.tsx
|
|
12357
|
-
import { jsx as
|
|
12358
|
-
var Tab =
|
|
13302
|
+
import { jsx as jsx296, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
13303
|
+
var Tab = forwardRef101((props, ref) => {
|
|
12359
13304
|
const {
|
|
12360
13305
|
active = false,
|
|
12361
13306
|
icon,
|
|
@@ -12372,10 +13317,10 @@ var Tab = forwardRef100((props, ref) => {
|
|
|
12372
13317
|
...rest
|
|
12373
13318
|
} = props;
|
|
12374
13319
|
useSetTabWidth(index, width);
|
|
12375
|
-
const itemRef =
|
|
13320
|
+
const itemRef = useRef33(null);
|
|
12376
13321
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
12377
13322
|
const { tabContentDirection } = useTabsContext();
|
|
12378
|
-
|
|
13323
|
+
useEffect30(() => {
|
|
12379
13324
|
var _a;
|
|
12380
13325
|
if (focus) {
|
|
12381
13326
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
@@ -12394,7 +13339,7 @@ var Tab = forwardRef100((props, ref) => {
|
|
|
12394
13339
|
handleSelect();
|
|
12395
13340
|
onKeyDown && onKeyDown(e);
|
|
12396
13341
|
};
|
|
12397
|
-
return /* @__PURE__ */
|
|
13342
|
+
return /* @__PURE__ */ jsxs76(
|
|
12398
13343
|
"button",
|
|
12399
13344
|
{
|
|
12400
13345
|
...getBaseHTMLProps(
|
|
@@ -12417,8 +13362,8 @@ var Tab = forwardRef100((props, ref) => {
|
|
|
12417
13362
|
onKeyDown: handleOnKeyDown,
|
|
12418
13363
|
tabIndex: focus ? 0 : -1,
|
|
12419
13364
|
children: [
|
|
12420
|
-
icon && /* @__PURE__ */
|
|
12421
|
-
/* @__PURE__ */
|
|
13365
|
+
icon && /* @__PURE__ */ jsx296(Icon, { icon, iconSize: "inherit" }),
|
|
13366
|
+
/* @__PURE__ */ jsx296("span", { children })
|
|
12422
13367
|
]
|
|
12423
13368
|
}
|
|
12424
13369
|
);
|
|
@@ -12429,12 +13374,12 @@ Tab.displayName = "Tab";
|
|
|
12429
13374
|
import {
|
|
12430
13375
|
Children as Children6,
|
|
12431
13376
|
cloneElement as cloneElement9,
|
|
12432
|
-
forwardRef as
|
|
13377
|
+
forwardRef as forwardRef102,
|
|
12433
13378
|
isValidElement as isValidElement10,
|
|
12434
|
-
useState as
|
|
13379
|
+
useState as useState29
|
|
12435
13380
|
} from "react";
|
|
12436
|
-
import { jsx as
|
|
12437
|
-
var TabList =
|
|
13381
|
+
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
13382
|
+
var TabList = forwardRef102(
|
|
12438
13383
|
({ children, id, style, onFocus, ...rest }, ref) => {
|
|
12439
13384
|
const {
|
|
12440
13385
|
activeTab,
|
|
@@ -12459,7 +13404,7 @@ var TabList = forwardRef101(
|
|
|
12459
13404
|
onClick: () => handleTabChange(index)
|
|
12460
13405
|
});
|
|
12461
13406
|
});
|
|
12462
|
-
const [widths, setWidths] =
|
|
13407
|
+
const [widths, setWidths] = useState29([]);
|
|
12463
13408
|
const handleOnFocus = (event) => {
|
|
12464
13409
|
setHasTabFocus(true);
|
|
12465
13410
|
onFocus && onFocus(event);
|
|
@@ -12477,7 +13422,7 @@ var TabList = forwardRef101(
|
|
|
12477
13422
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12478
13423
|
["--dds-tab-widths"]: widths.join(" ")
|
|
12479
13424
|
};
|
|
12480
|
-
return /* @__PURE__ */
|
|
13425
|
+
return /* @__PURE__ */ jsx297(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsx297(
|
|
12481
13426
|
"div",
|
|
12482
13427
|
{
|
|
12483
13428
|
...rest,
|
|
@@ -12503,11 +13448,11 @@ var TabList = forwardRef101(
|
|
|
12503
13448
|
TabList.displayName = "TabList";
|
|
12504
13449
|
|
|
12505
13450
|
// src/components/Tabs/TabPanel.tsx
|
|
12506
|
-
import { forwardRef as
|
|
12507
|
-
import { jsx as
|
|
12508
|
-
var TabPanel =
|
|
13451
|
+
import { forwardRef as forwardRef103 } from "react";
|
|
13452
|
+
import { jsx as jsx298 } from "react/jsx-runtime";
|
|
13453
|
+
var TabPanel = forwardRef103(
|
|
12509
13454
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
12510
|
-
return /* @__PURE__ */
|
|
13455
|
+
return /* @__PURE__ */ jsx298(
|
|
12511
13456
|
"div",
|
|
12512
13457
|
{
|
|
12513
13458
|
...getBaseHTMLProps(
|
|
@@ -12531,11 +13476,11 @@ TabPanel.displayName = "TabPanel";
|
|
|
12531
13476
|
import {
|
|
12532
13477
|
Children as Children7,
|
|
12533
13478
|
cloneElement as cloneElement10,
|
|
12534
|
-
forwardRef as
|
|
13479
|
+
forwardRef as forwardRef104,
|
|
12535
13480
|
isValidElement as isValidElement11
|
|
12536
13481
|
} from "react";
|
|
12537
|
-
import { jsx as
|
|
12538
|
-
var TabPanels =
|
|
13482
|
+
import { jsx as jsx299 } from "react/jsx-runtime";
|
|
13483
|
+
var TabPanels = forwardRef104(
|
|
12539
13484
|
({ children, ...rest }, ref) => {
|
|
12540
13485
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
12541
13486
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
@@ -12548,13 +13493,13 @@ var TabPanels = forwardRef103(
|
|
|
12548
13493
|
"aria-expanded": active
|
|
12549
13494
|
});
|
|
12550
13495
|
});
|
|
12551
|
-
return /* @__PURE__ */
|
|
13496
|
+
return /* @__PURE__ */ jsx299("div", { ref: combinedRef, ...rest, children: panelChildren });
|
|
12552
13497
|
}
|
|
12553
13498
|
);
|
|
12554
13499
|
TabPanels.displayName = "TabPanels";
|
|
12555
13500
|
|
|
12556
13501
|
// src/components/Tag/Tag.tsx
|
|
12557
|
-
import { forwardRef as
|
|
13502
|
+
import { forwardRef as forwardRef105 } from "react";
|
|
12558
13503
|
|
|
12559
13504
|
// src/components/Tag/Tag.module.css
|
|
12560
13505
|
var Tag_default = {
|
|
@@ -12573,7 +13518,7 @@ var Tag_default = {
|
|
|
12573
13518
|
};
|
|
12574
13519
|
|
|
12575
13520
|
// src/components/Tag/Tag.tsx
|
|
12576
|
-
import { jsx as
|
|
13521
|
+
import { jsx as jsx300, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
12577
13522
|
var icons3 = {
|
|
12578
13523
|
info: InfoIcon,
|
|
12579
13524
|
danger: ErrorIcon,
|
|
@@ -12581,7 +13526,7 @@ var icons3 = {
|
|
|
12581
13526
|
success: CheckCircledIcon,
|
|
12582
13527
|
default: void 0
|
|
12583
13528
|
};
|
|
12584
|
-
var Tag =
|
|
13529
|
+
var Tag = forwardRef105((props, ref) => {
|
|
12585
13530
|
const {
|
|
12586
13531
|
text,
|
|
12587
13532
|
purpose = "default",
|
|
@@ -12594,7 +13539,7 @@ var Tag = forwardRef104((props, ref) => {
|
|
|
12594
13539
|
...rest
|
|
12595
13540
|
} = props;
|
|
12596
13541
|
const icon = icons3[purpose];
|
|
12597
|
-
return /* @__PURE__ */
|
|
13542
|
+
return /* @__PURE__ */ jsxs77(
|
|
12598
13543
|
TextOverflowEllipsisWrapper,
|
|
12599
13544
|
{
|
|
12600
13545
|
...getBaseHTMLProps(
|
|
@@ -12611,8 +13556,8 @@ var Tag = forwardRef104((props, ref) => {
|
|
|
12611
13556
|
),
|
|
12612
13557
|
ref,
|
|
12613
13558
|
children: [
|
|
12614
|
-
withIcon && icon && /* @__PURE__ */
|
|
12615
|
-
/* @__PURE__ */
|
|
13559
|
+
withIcon && icon && /* @__PURE__ */ jsx300(Icon, { icon, iconSize: "small" }),
|
|
13560
|
+
/* @__PURE__ */ jsx300(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
12616
13561
|
]
|
|
12617
13562
|
}
|
|
12618
13563
|
);
|
|
@@ -12620,13 +13565,13 @@ var Tag = forwardRef104((props, ref) => {
|
|
|
12620
13565
|
Tag.displayName = "Tag";
|
|
12621
13566
|
|
|
12622
13567
|
// src/components/TextInput/TextInput.tsx
|
|
12623
|
-
import { ddsTokens as
|
|
13568
|
+
import { ddsTokens as ddsTokens17 } from "@norges-domstoler/dds-design-tokens";
|
|
12624
13569
|
import {
|
|
12625
|
-
forwardRef as
|
|
12626
|
-
useId as
|
|
12627
|
-
useLayoutEffect as
|
|
12628
|
-
useRef as
|
|
12629
|
-
useState as
|
|
13570
|
+
forwardRef as forwardRef106,
|
|
13571
|
+
useId as useId26,
|
|
13572
|
+
useLayoutEffect as useLayoutEffect4,
|
|
13573
|
+
useRef as useRef34,
|
|
13574
|
+
useState as useState30
|
|
12630
13575
|
} from "react";
|
|
12631
13576
|
|
|
12632
13577
|
// src/components/TextInput/TextInput.module.css
|
|
@@ -12654,8 +13599,8 @@ var TextInput_default = {
|
|
|
12654
13599
|
};
|
|
12655
13600
|
|
|
12656
13601
|
// src/components/TextInput/TextInput.tsx
|
|
12657
|
-
import { jsx as
|
|
12658
|
-
var TextInput =
|
|
13602
|
+
import { jsx as jsx301, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
13603
|
+
var TextInput = forwardRef106(
|
|
12659
13604
|
({
|
|
12660
13605
|
label,
|
|
12661
13606
|
disabled,
|
|
@@ -12681,14 +13626,14 @@ var TextInput = forwardRef105(
|
|
|
12681
13626
|
suffix,
|
|
12682
13627
|
...rest
|
|
12683
13628
|
}, ref) => {
|
|
12684
|
-
const [text, setText] =
|
|
13629
|
+
const [text, setText] = useState30(
|
|
12685
13630
|
getDefaultText(value, defaultValue)
|
|
12686
13631
|
);
|
|
12687
|
-
const prefixRef =
|
|
12688
|
-
const suffixRef =
|
|
12689
|
-
const [prefixLength, setPrefixLength] =
|
|
12690
|
-
const [suffixLength, setSuffixLength] =
|
|
12691
|
-
|
|
13632
|
+
const prefixRef = useRef34(null);
|
|
13633
|
+
const suffixRef = useRef34(null);
|
|
13634
|
+
const [prefixLength, setPrefixLength] = useState30(0);
|
|
13635
|
+
const [suffixLength, setSuffixLength] = useState30(0);
|
|
13636
|
+
useLayoutEffect4(() => {
|
|
12692
13637
|
if (prefixRef.current) {
|
|
12693
13638
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
12694
13639
|
}
|
|
@@ -12702,7 +13647,7 @@ var TextInput = forwardRef105(
|
|
|
12702
13647
|
onChange(event);
|
|
12703
13648
|
}
|
|
12704
13649
|
};
|
|
12705
|
-
const generatedId =
|
|
13650
|
+
const generatedId = useId26();
|
|
12706
13651
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
12707
13652
|
const hasErrorMessage = !!errorMessage;
|
|
12708
13653
|
const hasTip = !!tip;
|
|
@@ -12740,25 +13685,28 @@ var TextInput = forwardRef105(
|
|
|
12740
13685
|
...rest
|
|
12741
13686
|
};
|
|
12742
13687
|
const showRequiredStyling = !!(required || ariaRequired);
|
|
12743
|
-
const preffixPaddingInlineStart = readOnly && prefixLength ? prefixLength + "px" : prefixLength ?
|
|
12744
|
-
const suffixPaddingInlineEnd = readOnly && suffixLength ? suffixLength + "px" : suffixLength ?
|
|
13688
|
+
const preffixPaddingInlineStart = readOnly && prefixLength ? prefixLength + "px" : prefixLength ? ddsTokens17.ddsSpacingX1NumberPx + prefixLength + "px" : void 0;
|
|
13689
|
+
const suffixPaddingInlineEnd = readOnly && suffixLength ? suffixLength + "px" : suffixLength ? ddsTokens17.ddsSpacingX1NumberPx + suffixLength + "px" : void 0;
|
|
12745
13690
|
let extendedInput = null;
|
|
12746
13691
|
if (hasIcon) {
|
|
12747
|
-
extendedInput = /* @__PURE__ */
|
|
13692
|
+
extendedInput = /* @__PURE__ */ jsxs78(
|
|
12748
13693
|
"div",
|
|
12749
13694
|
{
|
|
12750
13695
|
className: cn(TextInput_default["input-width"], Input_default["input-group"]),
|
|
12751
13696
|
style: styleVariables,
|
|
12752
13697
|
children: [
|
|
12753
|
-
/* @__PURE__ */
|
|
13698
|
+
/* @__PURE__ */ jsx301(
|
|
12754
13699
|
Icon,
|
|
12755
13700
|
{
|
|
12756
13701
|
icon,
|
|
12757
13702
|
iconSize: getFormInputIconSize(componentSize),
|
|
12758
|
-
className: cn(
|
|
13703
|
+
className: cn(
|
|
13704
|
+
Input_default["input-group__absolute-element"],
|
|
13705
|
+
TextInput_default[`icon--${componentSize}`]
|
|
13706
|
+
)
|
|
12759
13707
|
}
|
|
12760
13708
|
),
|
|
12761
|
-
/* @__PURE__ */
|
|
13709
|
+
/* @__PURE__ */ jsx301(
|
|
12762
13710
|
StatefulInput,
|
|
12763
13711
|
{
|
|
12764
13712
|
ref,
|
|
@@ -12777,13 +13725,13 @@ var TextInput = forwardRef105(
|
|
|
12777
13725
|
}
|
|
12778
13726
|
);
|
|
12779
13727
|
} else if (hasAffix) {
|
|
12780
|
-
extendedInput = /* @__PURE__ */
|
|
13728
|
+
extendedInput = /* @__PURE__ */ jsxs78(
|
|
12781
13729
|
"div",
|
|
12782
13730
|
{
|
|
12783
13731
|
className: cn(TextInput_default["affix-container"], TextInput_default["input-width"]),
|
|
12784
13732
|
style: styleVariables,
|
|
12785
13733
|
children: [
|
|
12786
|
-
prefix3 && /* @__PURE__ */
|
|
13734
|
+
prefix3 && /* @__PURE__ */ jsx301(
|
|
12787
13735
|
"span",
|
|
12788
13736
|
{
|
|
12789
13737
|
ref: prefixRef,
|
|
@@ -12796,7 +13744,7 @@ var TextInput = forwardRef105(
|
|
|
12796
13744
|
children: prefix3
|
|
12797
13745
|
}
|
|
12798
13746
|
),
|
|
12799
|
-
/* @__PURE__ */
|
|
13747
|
+
/* @__PURE__ */ jsx301(
|
|
12800
13748
|
StatefulInput,
|
|
12801
13749
|
{
|
|
12802
13750
|
ref,
|
|
@@ -12811,7 +13759,7 @@ var TextInput = forwardRef105(
|
|
|
12811
13759
|
className: TextInput_default["input--extended"]
|
|
12812
13760
|
}
|
|
12813
13761
|
),
|
|
12814
|
-
suffix && /* @__PURE__ */
|
|
13762
|
+
suffix && /* @__PURE__ */ jsx301(
|
|
12815
13763
|
"span",
|
|
12816
13764
|
{
|
|
12817
13765
|
ref: suffixRef,
|
|
@@ -12828,7 +13776,7 @@ var TextInput = forwardRef105(
|
|
|
12828
13776
|
}
|
|
12829
13777
|
);
|
|
12830
13778
|
}
|
|
12831
|
-
return /* @__PURE__ */
|
|
13779
|
+
return /* @__PURE__ */ jsxs78(
|
|
12832
13780
|
"div",
|
|
12833
13781
|
{
|
|
12834
13782
|
className: cn(
|
|
@@ -12840,7 +13788,7 @@ var TextInput = forwardRef105(
|
|
|
12840
13788
|
),
|
|
12841
13789
|
style,
|
|
12842
13790
|
children: [
|
|
12843
|
-
hasLabel && /* @__PURE__ */
|
|
13791
|
+
hasLabel && /* @__PURE__ */ jsx301(
|
|
12844
13792
|
Label,
|
|
12845
13793
|
{
|
|
12846
13794
|
htmlFor: uniqueId,
|
|
@@ -12850,7 +13798,7 @@ var TextInput = forwardRef105(
|
|
|
12850
13798
|
children: label
|
|
12851
13799
|
}
|
|
12852
13800
|
),
|
|
12853
|
-
extendedInput ? extendedInput : /* @__PURE__ */
|
|
13801
|
+
extendedInput ? extendedInput : /* @__PURE__ */ jsx301(
|
|
12854
13802
|
StatefulInput,
|
|
12855
13803
|
{
|
|
12856
13804
|
ref,
|
|
@@ -12862,7 +13810,7 @@ var TextInput = forwardRef105(
|
|
|
12862
13810
|
className: TextInput_default["input-width"]
|
|
12863
13811
|
}
|
|
12864
13812
|
),
|
|
12865
|
-
hasMessage && /* @__PURE__ */
|
|
13813
|
+
hasMessage && /* @__PURE__ */ jsxs78("div", { className: TextInput_default["message-container"], children: [
|
|
12866
13814
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
12867
13815
|
renderCharCounter(
|
|
12868
13816
|
characterCounterId,
|
|
@@ -12879,7 +13827,7 @@ var TextInput = forwardRef105(
|
|
|
12879
13827
|
TextInput.displayName = "TextInput";
|
|
12880
13828
|
|
|
12881
13829
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
12882
|
-
import { useId as
|
|
13830
|
+
import { useId as useId27, useState as useState31 } from "react";
|
|
12883
13831
|
|
|
12884
13832
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
12885
13833
|
import { createContext as createContext12, useContext as useContext15 } from "react";
|
|
@@ -12905,7 +13853,7 @@ var ToggleBar_default = {
|
|
|
12905
13853
|
};
|
|
12906
13854
|
|
|
12907
13855
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
12908
|
-
import { jsx as
|
|
13856
|
+
import { jsx as jsx302, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
12909
13857
|
var ToggleBar = (props) => {
|
|
12910
13858
|
const {
|
|
12911
13859
|
children,
|
|
@@ -12920,15 +13868,15 @@ var ToggleBar = (props) => {
|
|
|
12920
13868
|
id,
|
|
12921
13869
|
...rest
|
|
12922
13870
|
} = props;
|
|
12923
|
-
const generatedId =
|
|
13871
|
+
const generatedId = useId27();
|
|
12924
13872
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
12925
|
-
const [groupValue, setGroupValue] =
|
|
13873
|
+
const [groupValue, setGroupValue] = useState31(value);
|
|
12926
13874
|
const handleChange = combineHandlers(
|
|
12927
13875
|
(e) => setGroupValue(e.target.value),
|
|
12928
13876
|
(e) => onChange && onChange(e, e.target.value)
|
|
12929
13877
|
);
|
|
12930
13878
|
const labelId = label && `${uniqueId}-label`;
|
|
12931
|
-
return /* @__PURE__ */
|
|
13879
|
+
return /* @__PURE__ */ jsx302(
|
|
12932
13880
|
ToggleBarContext.Provider,
|
|
12933
13881
|
{
|
|
12934
13882
|
value: {
|
|
@@ -12937,7 +13885,7 @@ var ToggleBar = (props) => {
|
|
|
12937
13885
|
name,
|
|
12938
13886
|
value: groupValue
|
|
12939
13887
|
},
|
|
12940
|
-
children: /* @__PURE__ */
|
|
13888
|
+
children: /* @__PURE__ */ jsxs79(
|
|
12941
13889
|
"div",
|
|
12942
13890
|
{
|
|
12943
13891
|
...getBaseHTMLProps(
|
|
@@ -12950,8 +13898,8 @@ var ToggleBar = (props) => {
|
|
|
12950
13898
|
role: "radiogroup",
|
|
12951
13899
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
12952
13900
|
children: [
|
|
12953
|
-
label && /* @__PURE__ */
|
|
12954
|
-
/* @__PURE__ */
|
|
13901
|
+
label && /* @__PURE__ */ jsx302(Label, { id: labelId, children: label }),
|
|
13902
|
+
/* @__PURE__ */ jsx302("div", { className: ToggleBar_default.bar, children })
|
|
12955
13903
|
]
|
|
12956
13904
|
}
|
|
12957
13905
|
)
|
|
@@ -12962,10 +13910,10 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
12962
13910
|
|
|
12963
13911
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
12964
13912
|
import {
|
|
12965
|
-
forwardRef as
|
|
12966
|
-
useId as
|
|
13913
|
+
forwardRef as forwardRef107,
|
|
13914
|
+
useId as useId28
|
|
12967
13915
|
} from "react";
|
|
12968
|
-
import { jsx as
|
|
13916
|
+
import { jsx as jsx303, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
12969
13917
|
var typographyTypes4 = {
|
|
12970
13918
|
large: "bodySans04",
|
|
12971
13919
|
medium: "bodySans02",
|
|
@@ -12982,7 +13930,7 @@ var calculateChecked = (value, group, checked) => {
|
|
|
12982
13930
|
}
|
|
12983
13931
|
return !!value;
|
|
12984
13932
|
};
|
|
12985
|
-
var ToggleRadio =
|
|
13933
|
+
var ToggleRadio = forwardRef107(
|
|
12986
13934
|
(props, ref) => {
|
|
12987
13935
|
const {
|
|
12988
13936
|
value,
|
|
@@ -12998,7 +13946,7 @@ var ToggleRadio = forwardRef106(
|
|
|
12998
13946
|
id,
|
|
12999
13947
|
...rest
|
|
13000
13948
|
} = props;
|
|
13001
|
-
const generatedId =
|
|
13949
|
+
const generatedId = useId28();
|
|
13002
13950
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
13003
13951
|
const group = useToggleBarContext();
|
|
13004
13952
|
const handleChange = (event) => {
|
|
@@ -13006,8 +13954,8 @@ var ToggleRadio = forwardRef106(
|
|
|
13006
13954
|
(group == null ? void 0 : group.onChange) && group.onChange(event);
|
|
13007
13955
|
};
|
|
13008
13956
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
13009
|
-
return /* @__PURE__ */
|
|
13010
|
-
/* @__PURE__ */
|
|
13957
|
+
return /* @__PURE__ */ jsxs80("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
13958
|
+
/* @__PURE__ */ jsx303(
|
|
13011
13959
|
"input",
|
|
13012
13960
|
{
|
|
13013
13961
|
...getBaseHTMLProps(
|
|
@@ -13030,7 +13978,7 @@ var ToggleRadio = forwardRef106(
|
|
|
13030
13978
|
"aria-labelledby": ariaLabelledBy
|
|
13031
13979
|
}
|
|
13032
13980
|
),
|
|
13033
|
-
/* @__PURE__ */
|
|
13981
|
+
/* @__PURE__ */ jsxs80(
|
|
13034
13982
|
Typography,
|
|
13035
13983
|
{
|
|
13036
13984
|
as: "span",
|
|
@@ -13041,8 +13989,8 @@ var ToggleRadio = forwardRef106(
|
|
|
13041
13989
|
focus_default["focus-styled-sibling"]
|
|
13042
13990
|
),
|
|
13043
13991
|
children: [
|
|
13044
|
-
icon && /* @__PURE__ */
|
|
13045
|
-
label && /* @__PURE__ */
|
|
13992
|
+
icon && /* @__PURE__ */ jsx303(Icon, { icon, iconSize: "inherit" }),
|
|
13993
|
+
label && /* @__PURE__ */ jsx303("span", { children: label })
|
|
13046
13994
|
]
|
|
13047
13995
|
}
|
|
13048
13996
|
)
|
|
@@ -13052,7 +14000,7 @@ var ToggleRadio = forwardRef106(
|
|
|
13052
14000
|
ToggleRadio.displayName = "ToggleRadio";
|
|
13053
14001
|
|
|
13054
14002
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
13055
|
-
import { forwardRef as
|
|
14003
|
+
import { forwardRef as forwardRef108, useId as useId29 } from "react";
|
|
13056
14004
|
|
|
13057
14005
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
13058
14006
|
var ToggleButton_default = {
|
|
@@ -13066,14 +14014,14 @@ var ToggleButton_default = {
|
|
|
13066
14014
|
};
|
|
13067
14015
|
|
|
13068
14016
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
13069
|
-
import { jsx as
|
|
13070
|
-
var ToggleButton =
|
|
14017
|
+
import { jsx as jsx304, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
14018
|
+
var ToggleButton = forwardRef108(
|
|
13071
14019
|
({ id, label, icon, className, htmlProps, ...rest }, ref) => {
|
|
13072
|
-
const generatedId =
|
|
14020
|
+
const generatedId = useId29();
|
|
13073
14021
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
13074
14022
|
const hasIcon = !!icon;
|
|
13075
|
-
return /* @__PURE__ */
|
|
13076
|
-
/* @__PURE__ */
|
|
14023
|
+
return /* @__PURE__ */ jsxs81("label", { htmlFor: uniqueId, className: ToggleButton_default.container, children: [
|
|
14024
|
+
/* @__PURE__ */ jsx304(
|
|
13077
14025
|
"input",
|
|
13078
14026
|
{
|
|
13079
14027
|
...getBaseHTMLProps(
|
|
@@ -13090,7 +14038,7 @@ var ToggleButton = forwardRef107(
|
|
|
13090
14038
|
type: "checkbox"
|
|
13091
14039
|
}
|
|
13092
14040
|
),
|
|
13093
|
-
/* @__PURE__ */
|
|
14041
|
+
/* @__PURE__ */ jsxs81(
|
|
13094
14042
|
"span",
|
|
13095
14043
|
{
|
|
13096
14044
|
className: cn(
|
|
@@ -13100,7 +14048,7 @@ var ToggleButton = forwardRef107(
|
|
|
13100
14048
|
focus_default["focus-styled-sibling"]
|
|
13101
14049
|
),
|
|
13102
14050
|
children: [
|
|
13103
|
-
hasIcon && /* @__PURE__ */
|
|
14051
|
+
hasIcon && /* @__PURE__ */ jsx304(Icon, { icon, iconSize: "inherit" }),
|
|
13104
14052
|
" ",
|
|
13105
14053
|
label
|
|
13106
14054
|
]
|
|
@@ -13112,8 +14060,8 @@ var ToggleButton = forwardRef107(
|
|
|
13112
14060
|
ToggleButton.displayName = "ToggleButton";
|
|
13113
14061
|
|
|
13114
14062
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
13115
|
-
import { useId as
|
|
13116
|
-
import { jsx as
|
|
14063
|
+
import { useId as useId30 } from "react";
|
|
14064
|
+
import { jsx as jsx305, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
13117
14065
|
var ToggleButtonGroup = (props) => {
|
|
13118
14066
|
const {
|
|
13119
14067
|
children,
|
|
@@ -13125,9 +14073,9 @@ var ToggleButtonGroup = (props) => {
|
|
|
13125
14073
|
htmlProps,
|
|
13126
14074
|
...rest
|
|
13127
14075
|
} = props;
|
|
13128
|
-
const generatedId =
|
|
14076
|
+
const generatedId = useId30();
|
|
13129
14077
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
13130
|
-
return /* @__PURE__ */
|
|
14078
|
+
return /* @__PURE__ */ jsxs82(
|
|
13131
14079
|
"div",
|
|
13132
14080
|
{
|
|
13133
14081
|
...getBaseHTMLProps(
|
|
@@ -13139,7 +14087,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
13139
14087
|
role: "group",
|
|
13140
14088
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
13141
14089
|
children: [
|
|
13142
|
-
!!label && /* @__PURE__ */
|
|
14090
|
+
!!label && /* @__PURE__ */ jsx305(
|
|
13143
14091
|
Typography,
|
|
13144
14092
|
{
|
|
13145
14093
|
as: "span",
|
|
@@ -13148,7 +14096,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
13148
14096
|
children: label
|
|
13149
14097
|
}
|
|
13150
14098
|
),
|
|
13151
|
-
/* @__PURE__ */
|
|
14099
|
+
/* @__PURE__ */ jsx305("div", { className: cn(ToggleButton_default.group, ToggleButton_default[`group--${direction}`]), children })
|
|
13152
14100
|
]
|
|
13153
14101
|
}
|
|
13154
14102
|
);
|
|
@@ -13358,6 +14306,7 @@ export {
|
|
|
13358
14306
|
PersonAddIcon,
|
|
13359
14307
|
PersonIcon,
|
|
13360
14308
|
PersonShieldedIcon,
|
|
14309
|
+
PhoneInput,
|
|
13361
14310
|
PinIcon,
|
|
13362
14311
|
PlusCircledIcon,
|
|
13363
14312
|
PlusIcon,
|
|
@@ -13446,6 +14395,7 @@ export {
|
|
|
13446
14395
|
ZoomOutIcon,
|
|
13447
14396
|
calendarDateToNativeDate,
|
|
13448
14397
|
cn,
|
|
14398
|
+
countryOptions,
|
|
13449
14399
|
createSelectOptions,
|
|
13450
14400
|
dangerInputfield,
|
|
13451
14401
|
dateValueToNativeDate,
|