@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.js
CHANGED
|
@@ -275,6 +275,7 @@ __export(src_exports, {
|
|
|
275
275
|
PersonAddIcon: () => PersonAddIcon,
|
|
276
276
|
PersonIcon: () => PersonIcon,
|
|
277
277
|
PersonShieldedIcon: () => PersonShieldedIcon,
|
|
278
|
+
PhoneInput: () => PhoneInput,
|
|
278
279
|
PinIcon: () => PinIcon,
|
|
279
280
|
PlusCircledIcon: () => PlusCircledIcon,
|
|
280
281
|
PlusIcon: () => PlusIcon,
|
|
@@ -363,6 +364,7 @@ __export(src_exports, {
|
|
|
363
364
|
ZoomOutIcon: () => ZoomOutIcon,
|
|
364
365
|
calendarDateToNativeDate: () => calendarDateToNativeDate,
|
|
365
366
|
cn: () => cn,
|
|
367
|
+
countryOptions: () => countryOptions,
|
|
366
368
|
createSelectOptions: () => createSelectOptions,
|
|
367
369
|
dangerInputfield: () => dangerInputfield,
|
|
368
370
|
dateValueToNativeDate: () => dateValueToNativeDate,
|
|
@@ -865,7 +867,7 @@ var Input_default = {
|
|
|
865
867
|
"input--with-affix": "Input_input--with-affix",
|
|
866
868
|
label: "Input_label",
|
|
867
869
|
"char-counter": "Input_char-counter",
|
|
868
|
-
|
|
870
|
+
"input-group__absolute-element": "Input_input-group__absolute-element"
|
|
869
871
|
};
|
|
870
872
|
|
|
871
873
|
// src/components/Typography/Caption/Caption.tsx
|
|
@@ -2504,7 +2506,7 @@ var import_react15 = require("react");
|
|
|
2504
2506
|
var import_react6 = require("react");
|
|
2505
2507
|
function useCombinedRef(...refs) {
|
|
2506
2508
|
return (0, import_react6.useCallback)((element) => {
|
|
2507
|
-
refs.forEach((ref) => {
|
|
2509
|
+
refs.filter(Boolean).forEach((ref) => {
|
|
2508
2510
|
if (typeof ref === "function") ref(element);
|
|
2509
2511
|
else if (ref && typeof ref === "object")
|
|
2510
2512
|
ref.current = element;
|
|
@@ -5732,6 +5734,17 @@ Card.displayName = "Card";
|
|
|
5732
5734
|
|
|
5733
5735
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
5734
5736
|
var import_react45 = require("react");
|
|
5737
|
+
|
|
5738
|
+
// src/components/Card/CardAccordion/CardAccordion.module.css
|
|
5739
|
+
var CardAccordion_default = {
|
|
5740
|
+
container: "CardAccordion_container",
|
|
5741
|
+
"header-button": "CardAccordion_header-button",
|
|
5742
|
+
"header-container": "CardAccordion_header-container",
|
|
5743
|
+
body: "CardAccordion_body",
|
|
5744
|
+
body__content: "CardAccordion_body__content"
|
|
5745
|
+
};
|
|
5746
|
+
|
|
5747
|
+
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
5735
5748
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
5736
5749
|
var CardAccordion = (0, import_react45.forwardRef)(
|
|
5737
5750
|
(props, ref) => {
|
|
@@ -5755,7 +5768,12 @@ var CardAccordion = (0, import_react45.forwardRef)(
|
|
|
5755
5768
|
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
5756
5769
|
"div",
|
|
5757
5770
|
{
|
|
5758
|
-
...getBaseHTMLProps(
|
|
5771
|
+
...getBaseHTMLProps(
|
|
5772
|
+
accordionId,
|
|
5773
|
+
cn(className, CardAccordion_default["container"]),
|
|
5774
|
+
htmlProps,
|
|
5775
|
+
rest
|
|
5776
|
+
),
|
|
5759
5777
|
ref,
|
|
5760
5778
|
children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
5761
5779
|
AccordionContextProvider,
|
|
@@ -5777,16 +5795,6 @@ CardAccordion.displayName = "CardAccordion";
|
|
|
5777
5795
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
5778
5796
|
var import_dds_design_tokens14 = require("@norges-domstoler/dds-design-tokens");
|
|
5779
5797
|
var import_react46 = require("react");
|
|
5780
|
-
|
|
5781
|
-
// src/components/Card/CardAccordion/CardAccordion.module.css
|
|
5782
|
-
var CardAccordion_default = {
|
|
5783
|
-
"header-button": "CardAccordion_header-button",
|
|
5784
|
-
"header-container": "CardAccordion_header-container",
|
|
5785
|
-
body: "CardAccordion_body",
|
|
5786
|
-
body__content: "CardAccordion_body__content"
|
|
5787
|
-
};
|
|
5788
|
-
|
|
5789
|
-
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
5790
5798
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
5791
5799
|
var CardAccordionHeader = (0, import_react46.forwardRef)((props, ref) => {
|
|
5792
5800
|
const {
|
|
@@ -10022,7 +10030,10 @@ var DDSControl = (props, componentSize, readOnly, icon, dataTestId) => {
|
|
|
10022
10030
|
{
|
|
10023
10031
|
icon,
|
|
10024
10032
|
iconSize: getFormInputIconSize(componentSize),
|
|
10025
|
-
className: cn(
|
|
10033
|
+
className: cn(
|
|
10034
|
+
Input_default["input-group__absolute-element"],
|
|
10035
|
+
Select_default[`icon--${componentSize}`]
|
|
10036
|
+
)
|
|
10026
10037
|
}
|
|
10027
10038
|
),
|
|
10028
10039
|
props.children
|
|
@@ -10531,10 +10542,936 @@ var Pagination = (0, import_react107.forwardRef)(
|
|
|
10531
10542
|
);
|
|
10532
10543
|
Pagination.displayName = "Pagination";
|
|
10533
10544
|
|
|
10534
|
-
// src/components/
|
|
10545
|
+
// src/components/PhoneInput/PhoneInput.tsx
|
|
10535
10546
|
var import_dds_design_tokens15 = require("@norges-domstoler/dds-design-tokens");
|
|
10536
10547
|
var import_react108 = require("react");
|
|
10537
10548
|
|
|
10549
|
+
// src/components/PhoneInput/constants.ts
|
|
10550
|
+
var COUNTRIES = {
|
|
10551
|
+
AF: {
|
|
10552
|
+
name: "Afghanistan (\u202B\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646\u202C\u200E)",
|
|
10553
|
+
id: "AF",
|
|
10554
|
+
dialCode: "+93"
|
|
10555
|
+
},
|
|
10556
|
+
AL: {
|
|
10557
|
+
name: "Albania (Shqip\xEBri)",
|
|
10558
|
+
id: "AL",
|
|
10559
|
+
dialCode: "+355"
|
|
10560
|
+
},
|
|
10561
|
+
DZ: {
|
|
10562
|
+
name: "Algeria (\u202B\u0627\u0644\u062C\u0632\u0627\u0626\u0631\u202C\u200E)",
|
|
10563
|
+
id: "DZ",
|
|
10564
|
+
dialCode: "+213"
|
|
10565
|
+
},
|
|
10566
|
+
AS: {
|
|
10567
|
+
name: "American Samoa",
|
|
10568
|
+
id: "AS",
|
|
10569
|
+
dialCode: "+1684"
|
|
10570
|
+
},
|
|
10571
|
+
AD: { name: "Andorra", id: "AD", dialCode: "+376" },
|
|
10572
|
+
AO: { name: "Angola", id: "AO", dialCode: "+244" },
|
|
10573
|
+
AI: { name: "Anguilla", id: "AI", dialCode: "+1264" },
|
|
10574
|
+
AG: {
|
|
10575
|
+
name: "Antigua and Barbuda",
|
|
10576
|
+
id: "AG",
|
|
10577
|
+
dialCode: "+1268"
|
|
10578
|
+
},
|
|
10579
|
+
AR: { name: "Argentina", id: "AR", dialCode: "+54" },
|
|
10580
|
+
AM: {
|
|
10581
|
+
name: "Armenia (\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576)",
|
|
10582
|
+
id: "AM",
|
|
10583
|
+
dialCode: "+374"
|
|
10584
|
+
},
|
|
10585
|
+
AW: { name: "Aruba", id: "AW", dialCode: "+297" },
|
|
10586
|
+
AU: { name: "Australia", id: "AU", dialCode: "+61" },
|
|
10587
|
+
AT: {
|
|
10588
|
+
name: "Austria (\xD6sterreich)",
|
|
10589
|
+
id: "AT",
|
|
10590
|
+
dialCode: "+43"
|
|
10591
|
+
},
|
|
10592
|
+
AZ: {
|
|
10593
|
+
name: "Azerbaijan (Az\u0259rbaycan)",
|
|
10594
|
+
id: "AZ",
|
|
10595
|
+
dialCode: "+994"
|
|
10596
|
+
},
|
|
10597
|
+
BS: { name: "Bahamas", id: "BS", dialCode: "+1242" },
|
|
10598
|
+
BH: {
|
|
10599
|
+
name: "Bahrain (\u202B\u0627\u0644\u0628\u062D\u0631\u064A\u0646\u202C\u200E)",
|
|
10600
|
+
id: "BH",
|
|
10601
|
+
dialCode: "+973"
|
|
10602
|
+
},
|
|
10603
|
+
BD: {
|
|
10604
|
+
name: "Bangladesh (\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6)",
|
|
10605
|
+
id: "BD",
|
|
10606
|
+
dialCode: "+880"
|
|
10607
|
+
},
|
|
10608
|
+
BB: { name: "Barbados", id: "BB", dialCode: "+1246" },
|
|
10609
|
+
BY: {
|
|
10610
|
+
name: "Belarus (\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u044C)",
|
|
10611
|
+
id: "BY",
|
|
10612
|
+
dialCode: "+375"
|
|
10613
|
+
},
|
|
10614
|
+
BE: { name: "Belgium (Belgi\xEB)", id: "BE", dialCode: "+32" },
|
|
10615
|
+
BZ: { name: "Belize", id: "BZ", dialCode: "+501" },
|
|
10616
|
+
BJ: { name: "Benin (B\xE9nin)", id: "BJ", dialCode: "+229" },
|
|
10617
|
+
BM: { name: "Bermuda", id: "BM", dialCode: "+1441" },
|
|
10618
|
+
BT: { name: "Bhutan (\u0F60\u0F56\u0FB2\u0F74\u0F42)", id: "BT", dialCode: "+975" },
|
|
10619
|
+
BO: { name: "Bolivia", id: "BO", dialCode: "+591" },
|
|
10620
|
+
BA: {
|
|
10621
|
+
name: "Bosnia and Herzegovina (\u0411\u043E\u0441\u043D\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430)",
|
|
10622
|
+
id: "BA",
|
|
10623
|
+
dialCode: "+387"
|
|
10624
|
+
},
|
|
10625
|
+
BW: { name: "Botswana", id: "BW", dialCode: "+267" },
|
|
10626
|
+
BR: { name: "Brazil (Brasil)", id: "BR", dialCode: "+55" },
|
|
10627
|
+
IO: {
|
|
10628
|
+
name: "British Indian Ocean Territory",
|
|
10629
|
+
id: "IO",
|
|
10630
|
+
dialCode: "+246"
|
|
10631
|
+
},
|
|
10632
|
+
VG: {
|
|
10633
|
+
name: "British Virgin Islands",
|
|
10634
|
+
id: "VG",
|
|
10635
|
+
dialCode: "+1284"
|
|
10636
|
+
},
|
|
10637
|
+
BN: { name: "Brunei", id: "BN", dialCode: "+673" },
|
|
10638
|
+
BG: {
|
|
10639
|
+
name: "Bulgaria (\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F)",
|
|
10640
|
+
id: "BG",
|
|
10641
|
+
dialCode: "+359"
|
|
10642
|
+
},
|
|
10643
|
+
BF: { name: "Burkina Faso", id: "BF", dialCode: "+226" },
|
|
10644
|
+
BI: {
|
|
10645
|
+
name: "Burundi (Uburundi)",
|
|
10646
|
+
id: "BI",
|
|
10647
|
+
dialCode: "+257"
|
|
10648
|
+
},
|
|
10649
|
+
KH: {
|
|
10650
|
+
name: "Cambodia (\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6)",
|
|
10651
|
+
id: "KH",
|
|
10652
|
+
dialCode: "+855"
|
|
10653
|
+
},
|
|
10654
|
+
CM: {
|
|
10655
|
+
name: "Cameroon (Cameroun)",
|
|
10656
|
+
id: "CM",
|
|
10657
|
+
dialCode: "+237"
|
|
10658
|
+
},
|
|
10659
|
+
CA: { name: "Canada", id: "CA", dialCode: "+1" },
|
|
10660
|
+
CV: {
|
|
10661
|
+
name: "Cape Verde (Kabu Verdi)",
|
|
10662
|
+
id: "CV",
|
|
10663
|
+
dialCode: "+238"
|
|
10664
|
+
},
|
|
10665
|
+
KY: {
|
|
10666
|
+
name: "Cayman Islands",
|
|
10667
|
+
id: "KY",
|
|
10668
|
+
dialCode: "+1345"
|
|
10669
|
+
},
|
|
10670
|
+
CF: {
|
|
10671
|
+
name: "Central African Republic (R\xE9publique centrafricaine)",
|
|
10672
|
+
id: "CF",
|
|
10673
|
+
dialCode: "+236"
|
|
10674
|
+
},
|
|
10675
|
+
TD: { name: "Chad (Tchad)", id: "TD", dialCode: "+235" },
|
|
10676
|
+
CL: { name: "Chile", id: "CL", dialCode: "+56" },
|
|
10677
|
+
CN: { name: "China (\u4E2D\u56FD)", id: "CN", dialCode: "+86" },
|
|
10678
|
+
CX: { name: "Christmas Island", id: "CX", dialCode: "+61" },
|
|
10679
|
+
CC: {
|
|
10680
|
+
name: "Cocos (Keeling) Islands",
|
|
10681
|
+
id: "CC",
|
|
10682
|
+
dialCode: "+61"
|
|
10683
|
+
},
|
|
10684
|
+
CO: { name: "Colombia", id: "CO", dialCode: "+57" },
|
|
10685
|
+
KM: {
|
|
10686
|
+
name: "Comoros (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)",
|
|
10687
|
+
id: "KM",
|
|
10688
|
+
dialCode: "+269"
|
|
10689
|
+
},
|
|
10690
|
+
CD: {
|
|
10691
|
+
name: "Congo (DRC) (Jamhuri ya Kisoemokrasia ya Kongo)",
|
|
10692
|
+
id: "CD",
|
|
10693
|
+
dialCode: "+243"
|
|
10694
|
+
},
|
|
10695
|
+
CG: {
|
|
10696
|
+
name: "Congo (Republic) (Congo-Brazzaville)",
|
|
10697
|
+
id: "CG",
|
|
10698
|
+
dialCode: "+242"
|
|
10699
|
+
},
|
|
10700
|
+
CK: { name: "Cook Islands", id: "CK", dialCode: "+682" },
|
|
10701
|
+
CR: { name: "Costa Rica", id: "CR", dialCode: "+506" },
|
|
10702
|
+
CI: { name: "C\xF4te d\u2019Ivoire", id: "CI", dialCode: "+225" },
|
|
10703
|
+
HR: {
|
|
10704
|
+
name: "Croatia (Hrvatska)",
|
|
10705
|
+
id: "HR",
|
|
10706
|
+
dialCode: "+385"
|
|
10707
|
+
},
|
|
10708
|
+
CU: { name: "Cuba", id: "CU", dialCode: "+53" },
|
|
10709
|
+
CW: { name: "Cura\xE7ao", id: "CW", dialCode: "+599" },
|
|
10710
|
+
CY: {
|
|
10711
|
+
name: "Cyprus (\u039A\u03CD\u03C0\u03C1\u03BF\u03C2)",
|
|
10712
|
+
id: "CY",
|
|
10713
|
+
dialCode: "+357"
|
|
10714
|
+
},
|
|
10715
|
+
CZ: {
|
|
10716
|
+
name: "Czech Republic (\u010Cesk\xE1 republika)",
|
|
10717
|
+
id: "CZ",
|
|
10718
|
+
dialCode: "+420"
|
|
10719
|
+
},
|
|
10720
|
+
DK: {
|
|
10721
|
+
name: "Denmark (Danmark)",
|
|
10722
|
+
id: "DK",
|
|
10723
|
+
dialCode: "+45"
|
|
10724
|
+
},
|
|
10725
|
+
DJ: { name: "Djibouti", id: "DJ", dialCode: "+253" },
|
|
10726
|
+
DM: { name: "Dominica", id: "DM", dialCode: "+1767" },
|
|
10727
|
+
DO: {
|
|
10728
|
+
name: "Dominican Republic (Rep\xFAblica Dominicana)",
|
|
10729
|
+
id: "DO",
|
|
10730
|
+
dialCode: "+1"
|
|
10731
|
+
},
|
|
10732
|
+
EC: { name: "Ecuador", id: "EC", dialCode: "+593" },
|
|
10733
|
+
EG: { name: "Egypt (\u202B\u0645\u0635\u0631\u202C\u200E)", id: "EG", dialCode: "+20" },
|
|
10734
|
+
SV: { name: "El Salvador", id: "SV", dialCode: "+503" },
|
|
10735
|
+
GQ: {
|
|
10736
|
+
name: "Equatorial Guinea (Guinea Ecuatorial)",
|
|
10737
|
+
id: "GQ",
|
|
10738
|
+
dialCode: "+240"
|
|
10739
|
+
},
|
|
10740
|
+
ER: { name: "Eritrea", id: "ER", dialCode: "+291" },
|
|
10741
|
+
EE: {
|
|
10742
|
+
name: "Estonia (Eesti)",
|
|
10743
|
+
id: "EE",
|
|
10744
|
+
dialCode: "+372"
|
|
10745
|
+
},
|
|
10746
|
+
ET: { name: "Ethiopia", id: "ET", dialCode: "+251" },
|
|
10747
|
+
FK: {
|
|
10748
|
+
name: "Falkland Islands (Islas Malvinas)",
|
|
10749
|
+
id: "FK",
|
|
10750
|
+
dialCode: "+500"
|
|
10751
|
+
},
|
|
10752
|
+
FO: {
|
|
10753
|
+
name: "Faroe Islands (F\xF8royar)",
|
|
10754
|
+
id: "FO",
|
|
10755
|
+
dialCode: "+298"
|
|
10756
|
+
},
|
|
10757
|
+
FJ: { name: "Fiji", id: "FJ", dialCode: "+679" },
|
|
10758
|
+
FI: {
|
|
10759
|
+
name: "Finland (Suomi)",
|
|
10760
|
+
id: "FI",
|
|
10761
|
+
dialCode: "+358"
|
|
10762
|
+
},
|
|
10763
|
+
FR: { name: "France", id: "FR", dialCode: "+33" },
|
|
10764
|
+
GF: {
|
|
10765
|
+
name: "French Guiana (Guyane fran\xE7aise)",
|
|
10766
|
+
id: "GF",
|
|
10767
|
+
dialCode: "+594"
|
|
10768
|
+
},
|
|
10769
|
+
PF: {
|
|
10770
|
+
name: "French Polynesia (Polyn\xE9sie fran\xE7aise)",
|
|
10771
|
+
id: "PF",
|
|
10772
|
+
dialCode: "+689"
|
|
10773
|
+
},
|
|
10774
|
+
GA: { name: "Gabon", id: "GA", dialCode: "+241" },
|
|
10775
|
+
GM: { name: "Gambia", id: "GM", dialCode: "+220" },
|
|
10776
|
+
GE: {
|
|
10777
|
+
name: "Georgia (\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD)",
|
|
10778
|
+
id: "GE",
|
|
10779
|
+
dialCode: "+995"
|
|
10780
|
+
},
|
|
10781
|
+
DE: {
|
|
10782
|
+
name: "Germany (Deutschland)",
|
|
10783
|
+
id: "DE",
|
|
10784
|
+
dialCode: "+49"
|
|
10785
|
+
},
|
|
10786
|
+
GH: { name: "Ghana (Gaana)", id: "GH", dialCode: "+233" },
|
|
10787
|
+
GI: { name: "Gibraltar", id: "GI", dialCode: "+350" },
|
|
10788
|
+
GR: { name: "Greece (\u0395\u03BB\u03BB\u03AC\u03B4\u03B1)", id: "GR", dialCode: "+30" },
|
|
10789
|
+
GL: {
|
|
10790
|
+
name: "Greenland (Kalaallit Nunaat)",
|
|
10791
|
+
id: "GL",
|
|
10792
|
+
dialCode: "+299"
|
|
10793
|
+
},
|
|
10794
|
+
GD: { name: "Grenada", id: "GD", dialCode: "+1473" },
|
|
10795
|
+
GP: { name: "Guadeloupe", id: "GP", dialCode: "+590" },
|
|
10796
|
+
GU: { name: "Guam", id: "GU", dialCode: "+1671" },
|
|
10797
|
+
GT: { name: "Guatemala", id: "GT", dialCode: "+502" },
|
|
10798
|
+
GG: { name: "Guernsey", id: "GG", dialCode: "+44" },
|
|
10799
|
+
GN: {
|
|
10800
|
+
name: "Guinea (Guin\xE9e)",
|
|
10801
|
+
id: "GN",
|
|
10802
|
+
dialCode: "+224"
|
|
10803
|
+
},
|
|
10804
|
+
GW: {
|
|
10805
|
+
name: "Guinea-Bissau (Guin\xE9 Bissau)",
|
|
10806
|
+
id: "GW",
|
|
10807
|
+
dialCode: "+245"
|
|
10808
|
+
},
|
|
10809
|
+
GY: { name: "Guyana", id: "GY", dialCode: "+592" },
|
|
10810
|
+
HT: { name: "Haiti", id: "HT", dialCode: "+509" },
|
|
10811
|
+
HN: { name: "Honduras", id: "HN", dialCode: "+504" },
|
|
10812
|
+
HK: {
|
|
10813
|
+
name: "Hong Kong (\u9999\u6E2F)",
|
|
10814
|
+
id: "HK",
|
|
10815
|
+
dialCode: "+852"
|
|
10816
|
+
},
|
|
10817
|
+
HU: {
|
|
10818
|
+
name: "Hungary (Magyarorsz\xE1g)",
|
|
10819
|
+
id: "HU",
|
|
10820
|
+
dialCode: "+36"
|
|
10821
|
+
},
|
|
10822
|
+
IS: {
|
|
10823
|
+
name: "Iceland (\xCDsland)",
|
|
10824
|
+
id: "IS",
|
|
10825
|
+
dialCode: "+354"
|
|
10826
|
+
},
|
|
10827
|
+
IN: { name: "India (\u092D\u093E\u0930\u0924)", id: "IN", dialCode: "+91" },
|
|
10828
|
+
ID: { name: "Indonesia", id: "ID", dialCode: "+62" },
|
|
10829
|
+
IR: { name: "Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)", id: "IR", dialCode: "+98" },
|
|
10830
|
+
IQ: {
|
|
10831
|
+
name: "Iraq (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)",
|
|
10832
|
+
id: "IQ",
|
|
10833
|
+
dialCode: "+964"
|
|
10834
|
+
},
|
|
10835
|
+
IE: { name: "Ireland", id: "IE", dialCode: "+353" },
|
|
10836
|
+
IM: { name: "Isle of Man", id: "IM", dialCode: "+44" },
|
|
10837
|
+
IL: {
|
|
10838
|
+
name: "Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)",
|
|
10839
|
+
id: "IL",
|
|
10840
|
+
dialCode: "+972"
|
|
10841
|
+
},
|
|
10842
|
+
IT: { name: "Italy (Italia)", id: "IT", dialCode: "+39" },
|
|
10843
|
+
JM: { name: "Jamaica", id: "JM", dialCode: "+1" },
|
|
10844
|
+
JP: { name: "Japan (\u65E5\u672C)", id: "JP", dialCode: "+81" },
|
|
10845
|
+
JE: { name: "Jersey", id: "JE", dialCode: "+44" },
|
|
10846
|
+
JO: {
|
|
10847
|
+
name: "Jordan (\u202B\u0627\u0644\u0623\u0631\u062F\u0646\u202C\u200E)",
|
|
10848
|
+
id: "JO",
|
|
10849
|
+
dialCode: "+962"
|
|
10850
|
+
},
|
|
10851
|
+
KZ: {
|
|
10852
|
+
name: "Kazakhstan (\u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D)",
|
|
10853
|
+
id: "KZ",
|
|
10854
|
+
dialCode: "+7"
|
|
10855
|
+
},
|
|
10856
|
+
KE: { name: "Kenya", id: "KE", dialCode: "+254" },
|
|
10857
|
+
KI: { name: "Kiribati", id: "KI", dialCode: "+686" },
|
|
10858
|
+
XK: { name: "Kosovo", id: "XK", dialCode: "+383" },
|
|
10859
|
+
KW: {
|
|
10860
|
+
name: "Kuwait (\u202B\u0627\u0644\u0643\u0648\u064A\u062A\u202C\u200E)",
|
|
10861
|
+
id: "KW",
|
|
10862
|
+
dialCode: "+965"
|
|
10863
|
+
},
|
|
10864
|
+
KG: {
|
|
10865
|
+
name: "Kyrgyzstan (\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D)",
|
|
10866
|
+
id: "KG",
|
|
10867
|
+
dialCode: "+996"
|
|
10868
|
+
},
|
|
10869
|
+
LA: { name: "Laos (\u0EA5\u0EB2\u0EA7)", id: "LA", dialCode: "+856" },
|
|
10870
|
+
LV: {
|
|
10871
|
+
name: "Latvia (Latvija)",
|
|
10872
|
+
id: "LV",
|
|
10873
|
+
dialCode: "+371"
|
|
10874
|
+
},
|
|
10875
|
+
LB: {
|
|
10876
|
+
name: "Lebanon (\u202B\u0644\u0628\u0646\u0627\u0646\u202C\u200E)",
|
|
10877
|
+
id: "LB",
|
|
10878
|
+
dialCode: "+961"
|
|
10879
|
+
},
|
|
10880
|
+
LS: { name: "Lesotho", id: "LS", dialCode: "+266" },
|
|
10881
|
+
LR: { name: "Liberia", id: "LR", dialCode: "+231" },
|
|
10882
|
+
LY: {
|
|
10883
|
+
name: "Libya (\u202B\u0644\u064A\u0628\u064A\u0627\u202C\u200E)",
|
|
10884
|
+
id: "LY",
|
|
10885
|
+
dialCode: "+218"
|
|
10886
|
+
},
|
|
10887
|
+
LI: { name: "Liechtenstein", id: "LI", dialCode: "+423" },
|
|
10888
|
+
LT: {
|
|
10889
|
+
name: "Lithuania (Lietuva)",
|
|
10890
|
+
id: "LT",
|
|
10891
|
+
dialCode: "+370"
|
|
10892
|
+
},
|
|
10893
|
+
LU: { name: "Luxembourg", id: "LU", dialCode: "+352" },
|
|
10894
|
+
MO: { name: "Macau (\u6FB3\u9580)", id: "MO", dialCode: "+853" },
|
|
10895
|
+
MK: {
|
|
10896
|
+
name: "North Macedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
|
|
10897
|
+
id: "MK",
|
|
10898
|
+
dialCode: "+389"
|
|
10899
|
+
},
|
|
10900
|
+
MG: {
|
|
10901
|
+
name: "Madagascar (Madagasikara)",
|
|
10902
|
+
id: "MG",
|
|
10903
|
+
dialCode: "+261"
|
|
10904
|
+
},
|
|
10905
|
+
MW: { name: "Malawi", id: "MW", dialCode: "+265" },
|
|
10906
|
+
MY: { name: "Malaysia", id: "MY", dialCode: "+60" },
|
|
10907
|
+
MV: { name: "Maldives", id: "MV", dialCode: "+960" },
|
|
10908
|
+
ML: { name: "Mali", id: "ML", dialCode: "+223" },
|
|
10909
|
+
MT: { name: "Malta", id: "MT", dialCode: "+356" },
|
|
10910
|
+
MH: {
|
|
10911
|
+
name: "Marshall Islands",
|
|
10912
|
+
id: "MH",
|
|
10913
|
+
dialCode: "+692"
|
|
10914
|
+
},
|
|
10915
|
+
MQ: { name: "Martinique", id: "MQ", dialCode: "+596" },
|
|
10916
|
+
MR: {
|
|
10917
|
+
name: "Mauritania (\u202B\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627\u202C\u200E)",
|
|
10918
|
+
id: "MR",
|
|
10919
|
+
dialCode: "+222"
|
|
10920
|
+
},
|
|
10921
|
+
MU: {
|
|
10922
|
+
name: "Mauritius (Moris)",
|
|
10923
|
+
id: "MU",
|
|
10924
|
+
dialCode: "+230"
|
|
10925
|
+
},
|
|
10926
|
+
YT: { name: "Mayotte", id: "YT", dialCode: "+262" },
|
|
10927
|
+
MX: { name: "Mexico (M\xE9xico)", id: "MX", dialCode: "+52" },
|
|
10928
|
+
FM: { name: "Micronesia", id: "FM", dialCode: "+691" },
|
|
10929
|
+
MD: {
|
|
10930
|
+
name: "Moldova (Republica Moldova)",
|
|
10931
|
+
id: "MD",
|
|
10932
|
+
dialCode: "+373"
|
|
10933
|
+
},
|
|
10934
|
+
MC: { name: "Monaco", id: "MC", dialCode: "+377" },
|
|
10935
|
+
MN: {
|
|
10936
|
+
name: "Mongolia (\u041C\u043E\u043D\u0433\u043E\u043B)",
|
|
10937
|
+
id: "MN",
|
|
10938
|
+
dialCode: "+976"
|
|
10939
|
+
},
|
|
10940
|
+
ME: {
|
|
10941
|
+
name: "Montenegro (Crna Gora)",
|
|
10942
|
+
id: "ME",
|
|
10943
|
+
dialCode: "+382"
|
|
10944
|
+
},
|
|
10945
|
+
MS: { name: "Montserrat", id: "MS", dialCode: "+1664" },
|
|
10946
|
+
MA: {
|
|
10947
|
+
name: "Morocco (\u202B\u0627\u0644\u0645\u063A\u0631\u0628\u202C\u200E)",
|
|
10948
|
+
id: "MA",
|
|
10949
|
+
dialCode: "+212"
|
|
10950
|
+
},
|
|
10951
|
+
MZ: {
|
|
10952
|
+
name: "Mozambique (Mo\xE7ambique)",
|
|
10953
|
+
id: "MZ",
|
|
10954
|
+
dialCode: "+258"
|
|
10955
|
+
},
|
|
10956
|
+
MM: {
|
|
10957
|
+
name: "Myanmar (Burma) (\u1019\u103C\u1014\u103A\u1019\u102C)",
|
|
10958
|
+
id: "MM",
|
|
10959
|
+
dialCode: "+95"
|
|
10960
|
+
},
|
|
10961
|
+
NA: {
|
|
10962
|
+
name: "Namibia (Namibi\xEB)",
|
|
10963
|
+
id: "NA",
|
|
10964
|
+
dialCode: "+264"
|
|
10965
|
+
},
|
|
10966
|
+
NR: { name: "Nauru", id: "NR", dialCode: "+674" },
|
|
10967
|
+
NP: { name: "Nepal (\u0928\u0947\u092A\u093E\u0932)", id: "NP", dialCode: "+977" },
|
|
10968
|
+
NL: {
|
|
10969
|
+
name: "Netherlands (Nederland)",
|
|
10970
|
+
id: "NL",
|
|
10971
|
+
dialCode: "+31"
|
|
10972
|
+
},
|
|
10973
|
+
NC: {
|
|
10974
|
+
name: "New Caledonia (Nouvelle-Cal\xE9donie)",
|
|
10975
|
+
id: "NC",
|
|
10976
|
+
dialCode: "+687"
|
|
10977
|
+
},
|
|
10978
|
+
NZ: { name: "New Zealand", id: "NZ", dialCode: "+64" },
|
|
10979
|
+
NI: { name: "Nicaragua", id: "NI", dialCode: "+505" },
|
|
10980
|
+
NE: { name: "Niger (Nijar)", id: "NE", dialCode: "+227" },
|
|
10981
|
+
NG: { name: "Nigeria", id: "NG", dialCode: "+234" },
|
|
10982
|
+
NU: { name: "Niue", id: "NU", dialCode: "+683" },
|
|
10983
|
+
NF: { name: "Norfolk Island", id: "NF", dialCode: "+672" },
|
|
10984
|
+
KP: {
|
|
10985
|
+
name: "North Korea (\uC870\uC120 \uBBFC\uC8FC\uC8FC\uC758 \uC778\uBBFC \uACF5\uD654\uAD6D)",
|
|
10986
|
+
id: "KP",
|
|
10987
|
+
dialCode: "+850"
|
|
10988
|
+
},
|
|
10989
|
+
MP: {
|
|
10990
|
+
name: "Northern Mariana Islands",
|
|
10991
|
+
id: "MP",
|
|
10992
|
+
dialCode: "+1670"
|
|
10993
|
+
},
|
|
10994
|
+
NO: { name: "Norway (Norge)", id: "NO", dialCode: "+47" },
|
|
10995
|
+
OM: {
|
|
10996
|
+
name: "Oman (\u202B\u0639\u064F\u0645\u0627\u0646\u202C\u200E)",
|
|
10997
|
+
id: "OM",
|
|
10998
|
+
dialCode: "+968"
|
|
10999
|
+
},
|
|
11000
|
+
PK: {
|
|
11001
|
+
name: "Pakistan (\u202B\u067E\u0627\u06A9\u0633\u062A\u0627\u0646\u202C\u200E)",
|
|
11002
|
+
id: "PK",
|
|
11003
|
+
dialCode: "+92"
|
|
11004
|
+
},
|
|
11005
|
+
PW: { name: "Palau", id: "PW", dialCode: "+680" },
|
|
11006
|
+
PS: {
|
|
11007
|
+
name: "Palestine (\u202B\u0641\u0644\u0633\u0637\u064A\u0646\u202C\u200E)",
|
|
11008
|
+
id: "PS",
|
|
11009
|
+
dialCode: "+970"
|
|
11010
|
+
},
|
|
11011
|
+
PA: {
|
|
11012
|
+
name: "Panama (Panam\xE1)",
|
|
11013
|
+
id: "PA",
|
|
11014
|
+
dialCode: "+507"
|
|
11015
|
+
},
|
|
11016
|
+
PG: {
|
|
11017
|
+
name: "Papua New Guinea",
|
|
11018
|
+
id: "PG",
|
|
11019
|
+
dialCode: "+675"
|
|
11020
|
+
},
|
|
11021
|
+
PY: { name: "Paraguay", id: "PY", dialCode: "+595" },
|
|
11022
|
+
PE: { name: "Peru (Per\xFA)", id: "PE", dialCode: "+51" },
|
|
11023
|
+
PH: { name: "Philippines", id: "PH", dialCode: "+63" },
|
|
11024
|
+
PL: { name: "Poland (Polska)", id: "PL", dialCode: "+48" },
|
|
11025
|
+
PT: { name: "Portugal", id: "PT", dialCode: "+351" },
|
|
11026
|
+
PR: { name: "Puerto Rico", id: "PR", dialCode: "+1" },
|
|
11027
|
+
QA: { name: "Qatar (\u202B\u0642\u0637\u0631\u202C\u200E)", id: "QA", dialCode: "+974" },
|
|
11028
|
+
RE: {
|
|
11029
|
+
name: "R\xE9union (La R\xE9union)",
|
|
11030
|
+
id: "RE",
|
|
11031
|
+
dialCode: "+262"
|
|
11032
|
+
},
|
|
11033
|
+
RO: {
|
|
11034
|
+
name: "Romania (Rom\xE2nia)",
|
|
11035
|
+
id: "RO",
|
|
11036
|
+
dialCode: "+40"
|
|
11037
|
+
},
|
|
11038
|
+
RU: { name: "Russia (\u0420\u043E\u0441\u0441\u0438\u044F)", id: "RU", dialCode: "+7" },
|
|
11039
|
+
RW: { name: "Rwanda", id: "RW", dialCode: "+250" },
|
|
11040
|
+
BL: {
|
|
11041
|
+
name: "Saint Barth\xE9lemy",
|
|
11042
|
+
id: "BL",
|
|
11043
|
+
dialCode: "+590"
|
|
11044
|
+
},
|
|
11045
|
+
SH: { name: "Saint Helena", id: "SH", dialCode: "+290" },
|
|
11046
|
+
KN: {
|
|
11047
|
+
name: "Saint Kitts and Nevis",
|
|
11048
|
+
id: "KN",
|
|
11049
|
+
dialCode: "+1869"
|
|
11050
|
+
},
|
|
11051
|
+
LC: { name: "Saint Lucia", id: "LC", dialCode: "+1758" },
|
|
11052
|
+
MF: {
|
|
11053
|
+
name: "Saint Martin (Saint-Martin (partie fran\xE7aise))",
|
|
11054
|
+
id: "MF",
|
|
11055
|
+
dialCode: "+590"
|
|
11056
|
+
},
|
|
11057
|
+
PM: {
|
|
11058
|
+
name: "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",
|
|
11059
|
+
id: "PM",
|
|
11060
|
+
dialCode: "+508"
|
|
11061
|
+
},
|
|
11062
|
+
VC: {
|
|
11063
|
+
name: "Saint Vincent and the Grenadines",
|
|
11064
|
+
id: "VC",
|
|
11065
|
+
dialCode: "+1784"
|
|
11066
|
+
},
|
|
11067
|
+
WS: { name: "Samoa", id: "WS", dialCode: "+685" },
|
|
11068
|
+
SM: { name: "San Marino", id: "SM", dialCode: "+378" },
|
|
11069
|
+
ST: {
|
|
11070
|
+
name: "S\xE3o Tom\xE9 and Pr\xEDncipe (S\xE3o Tom\xE9 e Pr\xEDncipe)",
|
|
11071
|
+
id: "ST",
|
|
11072
|
+
dialCode: "+239"
|
|
11073
|
+
},
|
|
11074
|
+
SA: {
|
|
11075
|
+
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)",
|
|
11076
|
+
id: "SA",
|
|
11077
|
+
dialCode: "+966"
|
|
11078
|
+
},
|
|
11079
|
+
SN: {
|
|
11080
|
+
name: "Senegal (S\xE9n\xE9gal)",
|
|
11081
|
+
id: "SN",
|
|
11082
|
+
dialCode: "+221"
|
|
11083
|
+
},
|
|
11084
|
+
RS: {
|
|
11085
|
+
name: "Serbia (\u0421\u0440\u0431\u0438\u0458\u0430)",
|
|
11086
|
+
id: "RS",
|
|
11087
|
+
dialCode: "+381"
|
|
11088
|
+
},
|
|
11089
|
+
SC: { name: "Seychelles", id: "SC", dialCode: "+248" },
|
|
11090
|
+
SL: { name: "Sierra Leone", id: "SL", dialCode: "+232" },
|
|
11091
|
+
SG: { name: "Singapore", id: "SG", dialCode: "+65" },
|
|
11092
|
+
SX: { name: "Sint Maarten", id: "SX", dialCode: "+1721" },
|
|
11093
|
+
SK: {
|
|
11094
|
+
name: "Slovakia (Slovensko)",
|
|
11095
|
+
id: "SK",
|
|
11096
|
+
dialCode: "+421"
|
|
11097
|
+
},
|
|
11098
|
+
SI: {
|
|
11099
|
+
name: "Slovenia (Slovenija)",
|
|
11100
|
+
id: "SI",
|
|
11101
|
+
dialCode: "+386"
|
|
11102
|
+
},
|
|
11103
|
+
SB: {
|
|
11104
|
+
name: "Solomon Islands",
|
|
11105
|
+
id: "SB",
|
|
11106
|
+
dialCode: "+677"
|
|
11107
|
+
},
|
|
11108
|
+
SO: {
|
|
11109
|
+
name: "Somalia (Soomaaliya)",
|
|
11110
|
+
id: "SO",
|
|
11111
|
+
dialCode: "+252"
|
|
11112
|
+
},
|
|
11113
|
+
ZA: { name: "South Africa", id: "ZA", dialCode: "+27" },
|
|
11114
|
+
KR: {
|
|
11115
|
+
name: "South Korea (\uB300\uD55C\uBBFC\uAD6D)",
|
|
11116
|
+
id: "KR",
|
|
11117
|
+
dialCode: "+82"
|
|
11118
|
+
},
|
|
11119
|
+
SS: {
|
|
11120
|
+
name: "South Sudan (\u202B\u062C\u0646\u0648\u0628 \u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",
|
|
11121
|
+
id: "SS",
|
|
11122
|
+
dialCode: "+211"
|
|
11123
|
+
},
|
|
11124
|
+
ES: { name: "Spain (Espa\xF1a)", id: "ES", dialCode: "+34" },
|
|
11125
|
+
LK: {
|
|
11126
|
+
name: "Sri Lanka (\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0)",
|
|
11127
|
+
id: "LK",
|
|
11128
|
+
dialCode: "+94"
|
|
11129
|
+
},
|
|
11130
|
+
SD: {
|
|
11131
|
+
name: "Sudan (\u202B\u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",
|
|
11132
|
+
id: "SD",
|
|
11133
|
+
dialCode: "+249"
|
|
11134
|
+
},
|
|
11135
|
+
SR: { name: "Suriname", id: "SR", dialCode: "+597" },
|
|
11136
|
+
SJ: {
|
|
11137
|
+
name: "Svalbard and Jan Mayen",
|
|
11138
|
+
id: "SJ",
|
|
11139
|
+
dialCode: "+47"
|
|
11140
|
+
},
|
|
11141
|
+
SZ: { name: "Swaziland", id: "SZ", dialCode: "+268" },
|
|
11142
|
+
SE: { name: "Sweden (Sverige)", id: "SE", dialCode: "+46" },
|
|
11143
|
+
CH: {
|
|
11144
|
+
name: "Switzerland (Schweiz)",
|
|
11145
|
+
id: "CH",
|
|
11146
|
+
dialCode: "+41"
|
|
11147
|
+
},
|
|
11148
|
+
SY: {
|
|
11149
|
+
name: "Syria (\u202B\u0633\u0648\u0631\u064A\u0627\u202C\u200E)",
|
|
11150
|
+
id: "SY",
|
|
11151
|
+
dialCode: "+963"
|
|
11152
|
+
},
|
|
11153
|
+
TW: { name: "Taiwan (\u53F0\u7063)", id: "TW", dialCode: "+886" },
|
|
11154
|
+
TJ: { name: "Tajikistan", id: "TJ", dialCode: "+992" },
|
|
11155
|
+
TZ: { name: "Tanzania", id: "TZ", dialCode: "+255" },
|
|
11156
|
+
TH: { name: "Thailand (\u0E44\u0E17\u0E22)", id: "TH", dialCode: "+66" },
|
|
11157
|
+
TL: { name: "Timor-Leste", id: "TL", dialCode: "+670" },
|
|
11158
|
+
TG: { name: "Togo", id: "TG", dialCode: "+228" },
|
|
11159
|
+
TK: { name: "Tokelau", id: "TK", dialCode: "+690" },
|
|
11160
|
+
TO: { name: "Tonga", id: "TO", dialCode: "+676" },
|
|
11161
|
+
TT: {
|
|
11162
|
+
name: "Trinisoad and Tobago",
|
|
11163
|
+
id: "TT",
|
|
11164
|
+
dialCode: "+1868"
|
|
11165
|
+
},
|
|
11166
|
+
TN: {
|
|
11167
|
+
name: "Tunisia (\u202B\u062A\u0648\u0646\u0633\u202C\u200E)",
|
|
11168
|
+
id: "TN",
|
|
11169
|
+
dialCode: "+216"
|
|
11170
|
+
},
|
|
11171
|
+
TR: { name: "Turkey (T\xFCrkiye)", id: "TR", dialCode: "+90" },
|
|
11172
|
+
TM: { name: "Turkmenistan", id: "TM", dialCode: "+993" },
|
|
11173
|
+
TC: {
|
|
11174
|
+
name: "Turks and Caicos Islands",
|
|
11175
|
+
id: "TC",
|
|
11176
|
+
dialCode: "+1649"
|
|
11177
|
+
},
|
|
11178
|
+
TV: { name: "Tuvalu", id: "TV", dialCode: "+688" },
|
|
11179
|
+
VI: {
|
|
11180
|
+
name: "U.S. Virgin Islands",
|
|
11181
|
+
id: "VI",
|
|
11182
|
+
dialCode: "+1340"
|
|
11183
|
+
},
|
|
11184
|
+
UG: { name: "Uganda", id: "UG", dialCode: "+256" },
|
|
11185
|
+
UA: {
|
|
11186
|
+
name: "Ukraine (\u0423\u043A\u0440\u0430\u0457\u043D\u0430)",
|
|
11187
|
+
id: "UA",
|
|
11188
|
+
dialCode: "+380"
|
|
11189
|
+
},
|
|
11190
|
+
AE: {
|
|
11191
|
+
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)",
|
|
11192
|
+
id: "AE",
|
|
11193
|
+
dialCode: "+971"
|
|
11194
|
+
},
|
|
11195
|
+
GB: { name: "United Kingdom", id: "GB", dialCode: "+44" },
|
|
11196
|
+
US: { name: "United States", id: "US", dialCode: "+1" },
|
|
11197
|
+
UY: { name: "Uruguay", id: "UY", dialCode: "+598" },
|
|
11198
|
+
UZ: {
|
|
11199
|
+
name: "Uzbekistan (O\u02BBzbekiston)",
|
|
11200
|
+
id: "UZ",
|
|
11201
|
+
dialCode: "+998"
|
|
11202
|
+
},
|
|
11203
|
+
VU: { name: "Vanuatu", id: "VU", dialCode: "+678" },
|
|
11204
|
+
VA: {
|
|
11205
|
+
name: "Vatican City (Citt\xE0 del Vaticano)",
|
|
11206
|
+
id: "VA",
|
|
11207
|
+
dialCode: "+39"
|
|
11208
|
+
},
|
|
11209
|
+
VE: { name: "Venezuela", id: "VE", dialCode: "+58" },
|
|
11210
|
+
VN: {
|
|
11211
|
+
name: "Vietnam (Vi\u1EC7t Nam)",
|
|
11212
|
+
id: "VN",
|
|
11213
|
+
dialCode: "+84"
|
|
11214
|
+
},
|
|
11215
|
+
WF: {
|
|
11216
|
+
name: "Wallis and Futuna (Wallis-et-Futuna)",
|
|
11217
|
+
id: "WF",
|
|
11218
|
+
dialCode: "+681"
|
|
11219
|
+
},
|
|
11220
|
+
YE: {
|
|
11221
|
+
name: "Yemen (\u202B\u0627\u0644\u064A\u0645\u0646\u202C\u200E)",
|
|
11222
|
+
id: "YE",
|
|
11223
|
+
dialCode: "+967"
|
|
11224
|
+
},
|
|
11225
|
+
ZM: { name: "Zambia", id: "ZM", dialCode: "+260" },
|
|
11226
|
+
ZW: { name: "Zimbabwe", id: "ZW", dialCode: "+263" },
|
|
11227
|
+
AX: { name: "\xC5land Islands", id: "AX", dialCode: "+358" }
|
|
11228
|
+
};
|
|
11229
|
+
|
|
11230
|
+
// src/components/PhoneInput/PhoneInput.module.css
|
|
11231
|
+
var PhoneInput_default = {
|
|
11232
|
+
"inputs-container": "PhoneInput_inputs-container",
|
|
11233
|
+
input: "PhoneInput_input",
|
|
11234
|
+
select: "PhoneInput_select",
|
|
11235
|
+
"select--tiny": "PhoneInput_select--tiny",
|
|
11236
|
+
"inputs-container--small-screen-xs": "PhoneInput_inputs-container--small-screen-xs",
|
|
11237
|
+
"inputs-container--small-screen-sm": "PhoneInput_inputs-container--small-screen-sm",
|
|
11238
|
+
"inputs-container--small-screen-md": "PhoneInput_inputs-container--small-screen-md",
|
|
11239
|
+
"inputs-container--small-screen-lg": "PhoneInput_inputs-container--small-screen-lg",
|
|
11240
|
+
"inputs-container--small-screen-xl": "PhoneInput_inputs-container--small-screen-xl",
|
|
11241
|
+
"calling-code": "PhoneInput_calling-code"
|
|
11242
|
+
};
|
|
11243
|
+
|
|
11244
|
+
// src/components/PhoneInput/PhoneInput.tsx
|
|
11245
|
+
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
11246
|
+
var prioritizedCountries = [
|
|
11247
|
+
COUNTRIES.NO,
|
|
11248
|
+
COUNTRIES.SE,
|
|
11249
|
+
COUNTRIES.DK,
|
|
11250
|
+
COUNTRIES.FI
|
|
11251
|
+
];
|
|
11252
|
+
var prioritizedCountryOptions = prioritizedCountries.map((country) => {
|
|
11253
|
+
return {
|
|
11254
|
+
label: `${country.name} ${country.dialCode}`,
|
|
11255
|
+
countryCode: country.id
|
|
11256
|
+
};
|
|
11257
|
+
});
|
|
11258
|
+
var sortedCountryOptions = Object.values(
|
|
11259
|
+
COUNTRIES
|
|
11260
|
+
).sort((a2, b) => +a2.name - +b.name).map((country) => ({
|
|
11261
|
+
countryCode: country.id,
|
|
11262
|
+
label: `${country.name} ${country.dialCode}`
|
|
11263
|
+
})).filter(
|
|
11264
|
+
(country) => !prioritizedCountryOptions.some(
|
|
11265
|
+
(pCountry) => pCountry.countryCode === country.countryCode
|
|
11266
|
+
)
|
|
11267
|
+
);
|
|
11268
|
+
var countryOptions = [
|
|
11269
|
+
...prioritizedCountryOptions,
|
|
11270
|
+
...sortedCountryOptions
|
|
11271
|
+
];
|
|
11272
|
+
var PhoneInput = (0, import_react108.forwardRef)(
|
|
11273
|
+
({
|
|
11274
|
+
label,
|
|
11275
|
+
readOnly,
|
|
11276
|
+
errorMessage,
|
|
11277
|
+
tip,
|
|
11278
|
+
required,
|
|
11279
|
+
width,
|
|
11280
|
+
componentSize = "medium",
|
|
11281
|
+
name,
|
|
11282
|
+
className,
|
|
11283
|
+
style,
|
|
11284
|
+
value,
|
|
11285
|
+
selectLabel = "Landskode",
|
|
11286
|
+
selectRef,
|
|
11287
|
+
onChange,
|
|
11288
|
+
defaultValue,
|
|
11289
|
+
"aria-required": ariaRequired,
|
|
11290
|
+
"aria-describedby": ariaDescribedby,
|
|
11291
|
+
groupLabel = "Landskode og telefonnummer",
|
|
11292
|
+
...props
|
|
11293
|
+
}, ref) => {
|
|
11294
|
+
var _a;
|
|
11295
|
+
const generatedId = (0, import_react108.useId)();
|
|
11296
|
+
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11297
|
+
const phoneInputId = `${uniqueId}-phone-input`;
|
|
11298
|
+
const phoneNumberId = `${uniqueId}-phone-number`;
|
|
11299
|
+
const selectId = `${uniqueId}-country-code`;
|
|
11300
|
+
const hasErrorMessage = !!errorMessage;
|
|
11301
|
+
const hasTip = !!tip;
|
|
11302
|
+
const hasLabel = !!label;
|
|
11303
|
+
const hasMessage = hasErrorMessage || hasTip;
|
|
11304
|
+
const tipId = derivativeIdGenerator(phoneInputId, "tip");
|
|
11305
|
+
const errorMessageId = derivativeIdGenerator(phoneInputId, "errorMessage");
|
|
11306
|
+
const [callingCode, setCallingCode] = (0, import_react108.useState)("");
|
|
11307
|
+
const [selectedCountryCodeText, setSelectedCountryCodeText] = (0, import_react108.useState)("");
|
|
11308
|
+
const [internalValue, setInternalValue] = (0, import_react108.useState)(
|
|
11309
|
+
defaultValue != null ? defaultValue : {
|
|
11310
|
+
countryCode: "",
|
|
11311
|
+
phoneNumber: ""
|
|
11312
|
+
}
|
|
11313
|
+
);
|
|
11314
|
+
const isControlled = value !== void 0;
|
|
11315
|
+
const [callingCodeWidth, setCallingCodeWidth] = (0, import_react108.useState)(0);
|
|
11316
|
+
const callingCodeRef = (0, import_react108.useRef)(null);
|
|
11317
|
+
(0, import_react108.useLayoutEffect)(() => {
|
|
11318
|
+
if (callingCodeRef.current) {
|
|
11319
|
+
setCallingCodeWidth(callingCodeRef.current.offsetWidth);
|
|
11320
|
+
}
|
|
11321
|
+
}, [callingCode]);
|
|
11322
|
+
const callingCodeInlineStart = callingCodeWidth ? import_dds_design_tokens15.ddsTokens.ddsSpacingX1NumberPx + callingCodeWidth + "px" : void 0;
|
|
11323
|
+
const styleVariables = {
|
|
11324
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11325
|
+
["--dds-phone-input-width"]: width ? width : componentSize === "tiny" ? "131px" : "194px"
|
|
11326
|
+
};
|
|
11327
|
+
const internalSelectRef = (0, import_react108.useRef)(null);
|
|
11328
|
+
const combinedSelectRef = useCombinedRef(selectRef, internalSelectRef);
|
|
11329
|
+
const displayedValue = isControlled ? value : internalValue;
|
|
11330
|
+
(0, import_react108.useEffect)(() => {
|
|
11331
|
+
const selectEl = internalSelectRef.current;
|
|
11332
|
+
if (selectEl && selectEl.value) {
|
|
11333
|
+
const { options, selectedIndex } = selectEl;
|
|
11334
|
+
const content = options[selectedIndex].innerHTML;
|
|
11335
|
+
setSelectedCountryCodeText(content);
|
|
11336
|
+
setCallingCode(getCallingCode(content));
|
|
11337
|
+
}
|
|
11338
|
+
}, [displayedValue == null ? void 0 : displayedValue.countryCode]);
|
|
11339
|
+
const handleCountryCodeChange = (e) => {
|
|
11340
|
+
var _a2;
|
|
11341
|
+
const newValue = {
|
|
11342
|
+
countryCode: e.target.value,
|
|
11343
|
+
phoneNumber: (_a2 = displayedValue == null ? void 0 : displayedValue.phoneNumber) != null ? _a2 : ""
|
|
11344
|
+
};
|
|
11345
|
+
const { options, selectedIndex } = e.target;
|
|
11346
|
+
const content = options[selectedIndex].innerHTML;
|
|
11347
|
+
setCallingCode(getCallingCode(content));
|
|
11348
|
+
if (isControlled && onChange) {
|
|
11349
|
+
onChange(newValue);
|
|
11350
|
+
} else {
|
|
11351
|
+
setInternalValue(newValue);
|
|
11352
|
+
}
|
|
11353
|
+
};
|
|
11354
|
+
const handlePhoneNumberChange = (e) => {
|
|
11355
|
+
var _a2;
|
|
11356
|
+
const newValue = {
|
|
11357
|
+
countryCode: (_a2 = displayedValue == null ? void 0 : displayedValue.countryCode) != null ? _a2 : "",
|
|
11358
|
+
phoneNumber: e.target.value
|
|
11359
|
+
};
|
|
11360
|
+
if (isControlled && onChange) {
|
|
11361
|
+
onChange(newValue);
|
|
11362
|
+
} else {
|
|
11363
|
+
setInternalValue(newValue);
|
|
11364
|
+
}
|
|
11365
|
+
};
|
|
11366
|
+
const commonProps = {
|
|
11367
|
+
required,
|
|
11368
|
+
"aria-required": ariaRequired,
|
|
11369
|
+
disabled: props.disabled,
|
|
11370
|
+
readOnly,
|
|
11371
|
+
componentSize
|
|
11372
|
+
};
|
|
11373
|
+
const showRequiredStyling = !!(required || ariaRequired);
|
|
11374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)("div", { className: cn(className, Input_default.container), style, children: [
|
|
11375
|
+
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11376
|
+
Label,
|
|
11377
|
+
{
|
|
11378
|
+
htmlFor: phoneNumberId,
|
|
11379
|
+
showRequiredStyling,
|
|
11380
|
+
className: Input_default.label,
|
|
11381
|
+
readOnly,
|
|
11382
|
+
children: label
|
|
11383
|
+
}
|
|
11384
|
+
),
|
|
11385
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
11386
|
+
"div",
|
|
11387
|
+
{
|
|
11388
|
+
className: cn(
|
|
11389
|
+
PhoneInput_default["inputs-container"],
|
|
11390
|
+
!!props.smallScreenBreakpoint && PhoneInput_default[`inputs-container--small-screen-${props.smallScreenBreakpoint}`]
|
|
11391
|
+
),
|
|
11392
|
+
style: styleVariables,
|
|
11393
|
+
role: "group",
|
|
11394
|
+
"aria-label": groupLabel,
|
|
11395
|
+
children: [
|
|
11396
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)("label", { className: utilStyles_default["visually-hidden"], htmlFor: selectId, children: selectLabel }),
|
|
11397
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11398
|
+
NativeSelect,
|
|
11399
|
+
{
|
|
11400
|
+
...commonProps,
|
|
11401
|
+
ref: combinedSelectRef,
|
|
11402
|
+
id: selectId,
|
|
11403
|
+
className: cn(
|
|
11404
|
+
PhoneInput_default.select,
|
|
11405
|
+
componentSize === "tiny" && PhoneInput_default["select--tiny"]
|
|
11406
|
+
),
|
|
11407
|
+
onChange: handleCountryCodeChange,
|
|
11408
|
+
defaultValue: defaultValue == null ? void 0 : defaultValue.countryCode,
|
|
11409
|
+
value: (displayedValue == null ? void 0 : displayedValue.countryCode) || "",
|
|
11410
|
+
title: selectedCountryCodeText,
|
|
11411
|
+
name: `${name}-country-code`,
|
|
11412
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
11413
|
+
hasTip ? tipId : void 0,
|
|
11414
|
+
ariaDescribedby
|
|
11415
|
+
]),
|
|
11416
|
+
children: countryOptions.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("option", { value: item.countryCode, children: item.label }, index))
|
|
11417
|
+
}
|
|
11418
|
+
),
|
|
11419
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
11420
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11421
|
+
"span",
|
|
11422
|
+
{
|
|
11423
|
+
className: cn(
|
|
11424
|
+
typographyStyles_default[getTypographyCn(inputTypographyTypes[componentSize])],
|
|
11425
|
+
Input_default["input-group__absolute-element"],
|
|
11426
|
+
PhoneInput_default["calling-code"]
|
|
11427
|
+
),
|
|
11428
|
+
ref: callingCodeRef,
|
|
11429
|
+
children: callingCode
|
|
11430
|
+
}
|
|
11431
|
+
),
|
|
11432
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11433
|
+
StatefulInput,
|
|
11434
|
+
{
|
|
11435
|
+
ref,
|
|
11436
|
+
type: "tel",
|
|
11437
|
+
...commonProps,
|
|
11438
|
+
id: phoneNumberId,
|
|
11439
|
+
value: (displayedValue == null ? void 0 : displayedValue.phoneNumber) || "",
|
|
11440
|
+
defaultValue: defaultValue == null ? void 0 : defaultValue.phoneNumber,
|
|
11441
|
+
name: `${name}-phone-number`,
|
|
11442
|
+
onChange: handlePhoneNumberChange,
|
|
11443
|
+
style: {
|
|
11444
|
+
...styleVariables,
|
|
11445
|
+
paddingInlineStart: callingCodeInlineStart
|
|
11446
|
+
},
|
|
11447
|
+
className: PhoneInput_default.input,
|
|
11448
|
+
hasErrorMessage,
|
|
11449
|
+
"aria-invalid": hasErrorMessage ? true : void 0,
|
|
11450
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
11451
|
+
hasTip ? tipId : void 0,
|
|
11452
|
+
hasErrorMessage ? errorMessageId : void 0,
|
|
11453
|
+
ariaDescribedby
|
|
11454
|
+
])
|
|
11455
|
+
}
|
|
11456
|
+
)
|
|
11457
|
+
] })
|
|
11458
|
+
]
|
|
11459
|
+
}
|
|
11460
|
+
),
|
|
11461
|
+
hasMessage && renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
11462
|
+
] });
|
|
11463
|
+
}
|
|
11464
|
+
);
|
|
11465
|
+
PhoneInput.displayName = "PhoneInput";
|
|
11466
|
+
var getCallingCode = (s2) => {
|
|
11467
|
+
var _a;
|
|
11468
|
+
return (_a = s2.substring(s2.indexOf("+"), s2.length)) != null ? _a : "";
|
|
11469
|
+
};
|
|
11470
|
+
|
|
11471
|
+
// src/components/Popover/Popover.tsx
|
|
11472
|
+
var import_dds_design_tokens16 = require("@norges-domstoler/dds-design-tokens");
|
|
11473
|
+
var import_react109 = require("react");
|
|
11474
|
+
|
|
10538
11475
|
// src/components/Popover/Popover.module.css
|
|
10539
11476
|
var Popover_default = {
|
|
10540
11477
|
container: "Popover_container",
|
|
@@ -10544,8 +11481,8 @@ var Popover_default = {
|
|
|
10544
11481
|
};
|
|
10545
11482
|
|
|
10546
11483
|
// src/components/Popover/Popover.tsx
|
|
10547
|
-
var
|
|
10548
|
-
var Popover = (0,
|
|
11484
|
+
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
11485
|
+
var Popover = (0, import_react109.forwardRef)(
|
|
10549
11486
|
(props, ref) => {
|
|
10550
11487
|
const {
|
|
10551
11488
|
title,
|
|
@@ -10557,7 +11494,7 @@ var Popover = (0, import_react108.forwardRef)(
|
|
|
10557
11494
|
anchorElement,
|
|
10558
11495
|
children,
|
|
10559
11496
|
placement = "bottom",
|
|
10560
|
-
offset =
|
|
11497
|
+
offset = import_dds_design_tokens16.ddsTokens.ddsSpacingX05NumberPx,
|
|
10561
11498
|
sizeProps,
|
|
10562
11499
|
id,
|
|
10563
11500
|
className,
|
|
@@ -10585,7 +11522,7 @@ var Popover = (0, import_react108.forwardRef)(
|
|
|
10585
11522
|
useOnClickOutside(elements, () => {
|
|
10586
11523
|
if (isOpen) onClose && onClose();
|
|
10587
11524
|
});
|
|
10588
|
-
return isOpen || hasTransitionedIn ? /* @__PURE__ */ (0,
|
|
11525
|
+
return isOpen || hasTransitionedIn ? /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
|
|
10589
11526
|
Paper,
|
|
10590
11527
|
{
|
|
10591
11528
|
...getBaseHTMLProps(
|
|
@@ -10607,15 +11544,15 @@ var Popover = (0, import_react108.forwardRef)(
|
|
|
10607
11544
|
elevation: 3,
|
|
10608
11545
|
border: "subtle",
|
|
10609
11546
|
children: [
|
|
10610
|
-
title && /* @__PURE__ */ (0,
|
|
10611
|
-
/* @__PURE__ */ (0,
|
|
11547
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("div", { className: Popover_default.title, children: typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(Heading, { level: 2, typographyType: "headingSans02", children: title }) : title }),
|
|
11548
|
+
/* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
|
|
10612
11549
|
"div",
|
|
10613
11550
|
{
|
|
10614
11551
|
className: !hasTitle && withCloseButton ? Popover_default["content--closable--no-title"] : "",
|
|
10615
11552
|
children
|
|
10616
11553
|
}
|
|
10617
11554
|
),
|
|
10618
|
-
withCloseButton && /* @__PURE__ */ (0,
|
|
11555
|
+
withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
|
|
10619
11556
|
Button,
|
|
10620
11557
|
{
|
|
10621
11558
|
icon: CloseIcon,
|
|
@@ -10634,8 +11571,8 @@ var Popover = (0, import_react108.forwardRef)(
|
|
|
10634
11571
|
Popover.displayName = "Popover";
|
|
10635
11572
|
|
|
10636
11573
|
// src/components/Popover/PopoverGroup.tsx
|
|
10637
|
-
var
|
|
10638
|
-
var
|
|
11574
|
+
var import_react110 = require("react");
|
|
11575
|
+
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
10639
11576
|
var PopoverGroup = ({
|
|
10640
11577
|
isOpen = false,
|
|
10641
11578
|
onCloseButtonClick,
|
|
@@ -10643,8 +11580,8 @@ var PopoverGroup = ({
|
|
|
10643
11580
|
children,
|
|
10644
11581
|
popoverId
|
|
10645
11582
|
}) => {
|
|
10646
|
-
const [open, setOpen] = (0,
|
|
10647
|
-
const generatedId = (0,
|
|
11583
|
+
const [open, setOpen] = (0, import_react110.useState)(isOpen);
|
|
11584
|
+
const generatedId = (0, import_react110.useId)();
|
|
10648
11585
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
10649
11586
|
const handleOnCloseButtonClick = () => {
|
|
10650
11587
|
setOpen(false);
|
|
@@ -10654,8 +11591,8 @@ var PopoverGroup = ({
|
|
|
10654
11591
|
setOpen(!open);
|
|
10655
11592
|
onTriggerClick && onTriggerClick();
|
|
10656
11593
|
};
|
|
10657
|
-
const buttonRef = (0,
|
|
10658
|
-
const popoverRef = (0,
|
|
11594
|
+
const buttonRef = (0, import_react110.useRef)(null);
|
|
11595
|
+
const popoverRef = (0, import_react110.useRef)(null);
|
|
10659
11596
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
10660
11597
|
var _a;
|
|
10661
11598
|
if (open) {
|
|
@@ -10664,14 +11601,14 @@ var PopoverGroup = ({
|
|
|
10664
11601
|
}
|
|
10665
11602
|
});
|
|
10666
11603
|
const handleClose = () => setOpen(false);
|
|
10667
|
-
const Children8 =
|
|
10668
|
-
return (0,
|
|
11604
|
+
const Children8 = import_react110.Children.map(children, (child, childIndex) => {
|
|
11605
|
+
return (0, import_react110.isValidElement)(child) && (childIndex === 0 ? (0, import_react110.cloneElement)(child, {
|
|
10669
11606
|
"aria-haspopup": "dialog",
|
|
10670
11607
|
"aria-controls": uniquePopoverId,
|
|
10671
11608
|
"aria-expanded": open,
|
|
10672
11609
|
onClick: handleOnTriggerClick,
|
|
10673
11610
|
ref: buttonRef
|
|
10674
|
-
}) : (0,
|
|
11611
|
+
}) : (0, import_react110.cloneElement)(child, {
|
|
10675
11612
|
isOpen: open,
|
|
10676
11613
|
"aria-hidden": !open,
|
|
10677
11614
|
id: uniquePopoverId,
|
|
@@ -10681,21 +11618,21 @@ var PopoverGroup = ({
|
|
|
10681
11618
|
onClose: handleClose
|
|
10682
11619
|
}));
|
|
10683
11620
|
});
|
|
10684
|
-
return /* @__PURE__ */ (0,
|
|
11621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_jsx_runtime270.Fragment, { children: Children8 });
|
|
10685
11622
|
};
|
|
10686
11623
|
PopoverGroup.displayName = "PopoverGroup";
|
|
10687
11624
|
|
|
10688
11625
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
10689
|
-
var
|
|
11626
|
+
var import_react113 = require("react");
|
|
10690
11627
|
|
|
10691
11628
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
10692
|
-
var
|
|
10693
|
-
var ProgressTrackerContext = (0,
|
|
11629
|
+
var import_react111 = require("react");
|
|
11630
|
+
var ProgressTrackerContext = (0, import_react111.createContext)(
|
|
10694
11631
|
{
|
|
10695
11632
|
activeStep: 0
|
|
10696
11633
|
}
|
|
10697
11634
|
);
|
|
10698
|
-
var useProgressTrackerContext = () => (0,
|
|
11635
|
+
var useProgressTrackerContext = () => (0, import_react111.useContext)(ProgressTrackerContext);
|
|
10699
11636
|
|
|
10700
11637
|
// src/components/ProgressTracker/ProgressTracker.module.css
|
|
10701
11638
|
var ProgressTracker_default = {
|
|
@@ -10719,8 +11656,8 @@ var ProgressTracker_default = {
|
|
|
10719
11656
|
};
|
|
10720
11657
|
|
|
10721
11658
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
10722
|
-
var
|
|
10723
|
-
var
|
|
11659
|
+
var import_react112 = require("react");
|
|
11660
|
+
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
10724
11661
|
var toItemState = (active, completed, disabled) => {
|
|
10725
11662
|
if (disabled) {
|
|
10726
11663
|
return "disabled";
|
|
@@ -10761,17 +11698,17 @@ var ProgressTrackerItem = (props) => {
|
|
|
10761
11698
|
handleStepChange && handleStepChange(index);
|
|
10762
11699
|
}
|
|
10763
11700
|
};
|
|
10764
|
-
const stepNumberContent = (0,
|
|
11701
|
+
const stepNumberContent = (0, import_react112.useMemo)(() => {
|
|
10765
11702
|
if (completed) {
|
|
10766
|
-
return /* @__PURE__ */ (0,
|
|
11703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
10767
11704
|
}
|
|
10768
11705
|
if (icon !== void 0) {
|
|
10769
|
-
return /* @__PURE__ */ (0,
|
|
11706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Icon, { icon, iconSize: "small" });
|
|
10770
11707
|
}
|
|
10771
11708
|
return index + 1;
|
|
10772
11709
|
}, [completed, icon, index]);
|
|
10773
|
-
const stepContent = /* @__PURE__ */ (0,
|
|
10774
|
-
/* @__PURE__ */ (0,
|
|
11710
|
+
const stepContent = /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(import_jsx_runtime271.Fragment, { children: [
|
|
11711
|
+
/* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
10775
11712
|
"div",
|
|
10776
11713
|
{
|
|
10777
11714
|
"aria-hidden": true,
|
|
@@ -10783,7 +11720,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
10783
11720
|
children: stepNumberContent
|
|
10784
11721
|
}
|
|
10785
11722
|
),
|
|
10786
|
-
/* @__PURE__ */ (0,
|
|
11723
|
+
/* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(
|
|
10787
11724
|
"div",
|
|
10788
11725
|
{
|
|
10789
11726
|
className: cn(
|
|
@@ -10792,13 +11729,13 @@ var ProgressTrackerItem = (props) => {
|
|
|
10792
11729
|
typographyStyles_default["body-sans-03"]
|
|
10793
11730
|
),
|
|
10794
11731
|
children: [
|
|
10795
|
-
/* @__PURE__ */ (0,
|
|
11732
|
+
/* @__PURE__ */ (0, import_jsx_runtime271.jsx)(VisuallyHidden, { as: "span", children: getVisuallyHiddenText(active, completed, index) }),
|
|
10796
11733
|
children
|
|
10797
11734
|
]
|
|
10798
11735
|
}
|
|
10799
11736
|
)
|
|
10800
11737
|
] });
|
|
10801
|
-
return /* @__PURE__ */ (0,
|
|
11738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("li", { "aria-current": active ? "step" : void 0, className: ProgressTracker_default.item, children: handleStepChange ? /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
10802
11739
|
"button",
|
|
10803
11740
|
{
|
|
10804
11741
|
...getBaseHTMLProps(
|
|
@@ -10811,7 +11748,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
10811
11748
|
disabled,
|
|
10812
11749
|
children: stepContent
|
|
10813
11750
|
}
|
|
10814
|
-
) : /* @__PURE__ */ (0,
|
|
11751
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
10815
11752
|
"div",
|
|
10816
11753
|
{
|
|
10817
11754
|
...getBaseHTMLProps(
|
|
@@ -10827,9 +11764,9 @@ var ProgressTrackerItem = (props) => {
|
|
|
10827
11764
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
10828
11765
|
|
|
10829
11766
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
10830
|
-
var
|
|
11767
|
+
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
10831
11768
|
var ProgressTracker = (() => {
|
|
10832
|
-
const Res = (0,
|
|
11769
|
+
const Res = (0, import_react113.forwardRef)((props, ref) => {
|
|
10833
11770
|
const {
|
|
10834
11771
|
id,
|
|
10835
11772
|
activeStep = 0,
|
|
@@ -10839,12 +11776,12 @@ var ProgressTracker = (() => {
|
|
|
10839
11776
|
htmlProps,
|
|
10840
11777
|
...rest
|
|
10841
11778
|
} = props;
|
|
10842
|
-
const [thisActiveStep, setActiveStep] = (0,
|
|
11779
|
+
const [thisActiveStep, setActiveStep] = (0, import_react113.useState)(activeStep);
|
|
10843
11780
|
const handleChange = (step) => {
|
|
10844
11781
|
setActiveStep(step);
|
|
10845
11782
|
onStepChange && onStepChange(step);
|
|
10846
11783
|
};
|
|
10847
|
-
(0,
|
|
11784
|
+
(0, import_react113.useEffect)(() => {
|
|
10848
11785
|
if (activeStep !== void 0 && activeStep != thisActiveStep) {
|
|
10849
11786
|
setActiveStep(activeStep);
|
|
10850
11787
|
}
|
|
@@ -10853,20 +11790,20 @@ var ProgressTracker = (() => {
|
|
|
10853
11790
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
10854
11791
|
ref
|
|
10855
11792
|
};
|
|
10856
|
-
const steps = (0,
|
|
11793
|
+
const steps = (0, import_react113.useMemo)(() => {
|
|
10857
11794
|
const validChildren = removeInvalidChildren(children);
|
|
10858
11795
|
const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
|
|
10859
11796
|
const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
|
|
10860
11797
|
return itemsWithConnectorsBetween;
|
|
10861
11798
|
}, [children]);
|
|
10862
|
-
return /* @__PURE__ */ (0,
|
|
11799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
|
|
10863
11800
|
ProgressTrackerContext.Provider,
|
|
10864
11801
|
{
|
|
10865
11802
|
value: {
|
|
10866
11803
|
activeStep: thisActiveStep,
|
|
10867
11804
|
handleStepChange: handleChange
|
|
10868
11805
|
},
|
|
10869
|
-
children: /* @__PURE__ */ (0,
|
|
11806
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { role: "group", "aria-label": "progress", ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("ol", { className: ProgressTracker_default.list, children: steps }) })
|
|
10870
11807
|
}
|
|
10871
11808
|
);
|
|
10872
11809
|
});
|
|
@@ -10875,29 +11812,29 @@ var ProgressTracker = (() => {
|
|
|
10875
11812
|
return Res;
|
|
10876
11813
|
})();
|
|
10877
11814
|
function removeInvalidChildren(children) {
|
|
10878
|
-
return
|
|
11815
|
+
return import_react113.Children.toArray(children).filter(import_react113.isValidElement);
|
|
10879
11816
|
}
|
|
10880
11817
|
function passIndexPropToProgressTrackerItem(children) {
|
|
10881
|
-
return
|
|
11818
|
+
return import_react113.Children.map(
|
|
10882
11819
|
children,
|
|
10883
|
-
(item, index) => (0,
|
|
11820
|
+
(item, index) => (0, import_react113.cloneElement)(item, {
|
|
10884
11821
|
...item.props,
|
|
10885
11822
|
index
|
|
10886
11823
|
})
|
|
10887
11824
|
);
|
|
10888
11825
|
}
|
|
10889
|
-
var intersperseItemsWithConnector = (children) =>
|
|
11826
|
+
var intersperseItemsWithConnector = (children) => import_react113.Children.map(children, (child, index) => {
|
|
10890
11827
|
if (index === 0) {
|
|
10891
11828
|
return child;
|
|
10892
11829
|
}
|
|
10893
|
-
return /* @__PURE__ */ (0,
|
|
10894
|
-
/* @__PURE__ */ (0,
|
|
11830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(import_react113.Fragment, { children: [
|
|
11831
|
+
/* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { "aria-hidden": true, className: ProgressTracker_default.connector }),
|
|
10895
11832
|
child
|
|
10896
11833
|
] }, index);
|
|
10897
11834
|
});
|
|
10898
11835
|
|
|
10899
11836
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10900
|
-
var
|
|
11837
|
+
var import_react114 = require("react");
|
|
10901
11838
|
|
|
10902
11839
|
// src/components/ProgressBar/ProgressBar.module.css
|
|
10903
11840
|
var ProgressBar_default = {
|
|
@@ -10913,8 +11850,8 @@ var ProgressBar_default = {
|
|
|
10913
11850
|
};
|
|
10914
11851
|
|
|
10915
11852
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10916
|
-
var
|
|
10917
|
-
var ProgressBar = (0,
|
|
11853
|
+
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
11854
|
+
var ProgressBar = (0, import_react114.forwardRef)(
|
|
10918
11855
|
(props, ref) => {
|
|
10919
11856
|
const {
|
|
10920
11857
|
label,
|
|
@@ -10930,7 +11867,7 @@ var ProgressBar = (0, import_react113.forwardRef)(
|
|
|
10930
11867
|
style,
|
|
10931
11868
|
...rest
|
|
10932
11869
|
} = props;
|
|
10933
|
-
const generatedId = (0,
|
|
11870
|
+
const generatedId = (0, import_react114.useId)();
|
|
10934
11871
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
10935
11872
|
const hasErrorMessage = !!errorMessage;
|
|
10936
11873
|
const hasTip = !!tip;
|
|
@@ -10948,9 +11885,9 @@ var ProgressBar = (0, import_react113.forwardRef)(
|
|
|
10948
11885
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10949
11886
|
["--dds-progressbar-fill-width"]: fillPrecentage != null ? fillPrecentage : 0
|
|
10950
11887
|
};
|
|
10951
|
-
return /* @__PURE__ */ (0,
|
|
10952
|
-
hasLabel ? /* @__PURE__ */ (0,
|
|
10953
|
-
/* @__PURE__ */ (0,
|
|
11888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: cn(className, ProgressBar_default.container), style, children: [
|
|
11889
|
+
hasLabel ? /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Label, { htmlFor: uniqueId, children: label }) : void 0,
|
|
11890
|
+
/* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
10954
11891
|
"progress",
|
|
10955
11892
|
{
|
|
10956
11893
|
ref,
|
|
@@ -10967,12 +11904,12 @@ var ProgressBar = (0, import_react113.forwardRef)(
|
|
|
10967
11904
|
children: fillPrecentage
|
|
10968
11905
|
}
|
|
10969
11906
|
),
|
|
10970
|
-
/* @__PURE__ */ (0,
|
|
11907
|
+
/* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
10971
11908
|
"div",
|
|
10972
11909
|
{
|
|
10973
11910
|
style: progressStyleVariables,
|
|
10974
11911
|
className: cn(ProgressBar_default.progress, ProgressBar_default[`progress--${size2}`]),
|
|
10975
|
-
children: /* @__PURE__ */ (0,
|
|
11912
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
10976
11913
|
"div",
|
|
10977
11914
|
{
|
|
10978
11915
|
style: fillStyleVariables,
|
|
@@ -10993,13 +11930,13 @@ var ProgressBar = (0, import_react113.forwardRef)(
|
|
|
10993
11930
|
ProgressBar.displayName = "ProgressBar";
|
|
10994
11931
|
|
|
10995
11932
|
// src/components/Search/Search.tsx
|
|
10996
|
-
var
|
|
11933
|
+
var import_react118 = require("react");
|
|
10997
11934
|
|
|
10998
11935
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
10999
|
-
var
|
|
11000
|
-
var AutocompleteSearchContext = (0,
|
|
11936
|
+
var import_react115 = require("react");
|
|
11937
|
+
var AutocompleteSearchContext = (0, import_react115.createContext)({});
|
|
11001
11938
|
var useAutocompleteSearch = () => {
|
|
11002
|
-
return (0,
|
|
11939
|
+
return (0, import_react115.useContext)(AutocompleteSearchContext);
|
|
11003
11940
|
};
|
|
11004
11941
|
|
|
11005
11942
|
// src/components/Search/Search.module.css
|
|
@@ -11049,22 +11986,22 @@ function createEmptyChangeEvent(inputElementId) {
|
|
|
11049
11986
|
}
|
|
11050
11987
|
|
|
11051
11988
|
// src/components/Search/SearchSuggestions.tsx
|
|
11052
|
-
var
|
|
11989
|
+
var import_react117 = require("react");
|
|
11053
11990
|
|
|
11054
11991
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
11055
|
-
var
|
|
11056
|
-
var
|
|
11057
|
-
var SearchSuggestionItem = (0,
|
|
11992
|
+
var import_react116 = require("react");
|
|
11993
|
+
var import_jsx_runtime274 = require("react/jsx-runtime");
|
|
11994
|
+
var SearchSuggestionItem = (0, import_react116.forwardRef)((props, ref) => {
|
|
11058
11995
|
const { focus, className, ...rest } = props;
|
|
11059
|
-
const itemRef = (0,
|
|
11996
|
+
const itemRef = (0, import_react116.useRef)(null);
|
|
11060
11997
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
11061
|
-
(0,
|
|
11998
|
+
(0, import_react116.useEffect)(() => {
|
|
11062
11999
|
var _a;
|
|
11063
12000
|
if (focus) {
|
|
11064
12001
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
11065
12002
|
}
|
|
11066
12003
|
}, [focus]);
|
|
11067
|
-
return /* @__PURE__ */ (0,
|
|
12004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
11068
12005
|
"button",
|
|
11069
12006
|
{
|
|
11070
12007
|
ref: combinedRef,
|
|
@@ -11083,8 +12020,8 @@ var SearchSuggestionItem = (0, import_react115.forwardRef)((props, ref) => {
|
|
|
11083
12020
|
SearchSuggestionItem.displayName = "SearchSuggestionItem";
|
|
11084
12021
|
|
|
11085
12022
|
// src/components/Search/SearchSuggestions.tsx
|
|
11086
|
-
var
|
|
11087
|
-
var SearchSuggestions = (0,
|
|
12023
|
+
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
12024
|
+
var SearchSuggestions = (0, import_react117.forwardRef)((props, ref) => {
|
|
11088
12025
|
const {
|
|
11089
12026
|
id,
|
|
11090
12027
|
searchId,
|
|
@@ -11103,7 +12040,7 @@ var SearchSuggestions = (0, import_react116.forwardRef)((props, ref) => {
|
|
|
11103
12040
|
);
|
|
11104
12041
|
const [focus] = useRoveFocus(suggestions == null ? void 0 : suggestions.length, showSuggestions);
|
|
11105
12042
|
const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
|
|
11106
|
-
return /* @__PURE__ */ (0,
|
|
12043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(
|
|
11107
12044
|
Paper,
|
|
11108
12045
|
{
|
|
11109
12046
|
...getBaseHTMLProps(
|
|
@@ -11122,7 +12059,7 @@ var SearchSuggestions = (0, import_react116.forwardRef)((props, ref) => {
|
|
|
11122
12059
|
"aria-hidden": !showSuggestions,
|
|
11123
12060
|
border: "default",
|
|
11124
12061
|
children: [
|
|
11125
|
-
/* @__PURE__ */ (0,
|
|
12062
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
11126
12063
|
"span",
|
|
11127
12064
|
{
|
|
11128
12065
|
id: suggestionsHeaderId,
|
|
@@ -11133,14 +12070,14 @@ var SearchSuggestions = (0, import_react116.forwardRef)((props, ref) => {
|
|
|
11133
12070
|
children: "S\xF8keforslag"
|
|
11134
12071
|
}
|
|
11135
12072
|
),
|
|
11136
|
-
/* @__PURE__ */ (0,
|
|
12073
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
11137
12074
|
"ul",
|
|
11138
12075
|
{
|
|
11139
12076
|
role: "listbox",
|
|
11140
12077
|
"aria-labelledby": suggestionsHeaderId,
|
|
11141
12078
|
className: utilStyles_default["remove-list-styling"],
|
|
11142
12079
|
children: suggestionsToRender.map((suggestion, index) => {
|
|
11143
|
-
return /* @__PURE__ */ (0,
|
|
12080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("li", { role: "option", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
11144
12081
|
SearchSuggestionItem,
|
|
11145
12082
|
{
|
|
11146
12083
|
index,
|
|
@@ -11163,7 +12100,7 @@ var SearchSuggestions = (0, import_react116.forwardRef)((props, ref) => {
|
|
|
11163
12100
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
11164
12101
|
|
|
11165
12102
|
// src/components/Search/Search.tsx
|
|
11166
|
-
var
|
|
12103
|
+
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
11167
12104
|
var getIconSize = (size2) => {
|
|
11168
12105
|
switch (size2) {
|
|
11169
12106
|
case "large":
|
|
@@ -11174,7 +12111,7 @@ var getIconSize = (size2) => {
|
|
|
11174
12111
|
return "small";
|
|
11175
12112
|
}
|
|
11176
12113
|
};
|
|
11177
|
-
var Search = (0,
|
|
12114
|
+
var Search = (0, import_react118.forwardRef)(
|
|
11178
12115
|
({
|
|
11179
12116
|
componentSize = "medium",
|
|
11180
12117
|
buttonProps,
|
|
@@ -11190,7 +12127,7 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11190
12127
|
...rest
|
|
11191
12128
|
}, ref) => {
|
|
11192
12129
|
var _a;
|
|
11193
|
-
const generatedId = (0,
|
|
12130
|
+
const generatedId = (0, import_react118.useId)();
|
|
11194
12131
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
11195
12132
|
const hasLabel = !!label;
|
|
11196
12133
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
@@ -11199,7 +12136,7 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11199
12136
|
uniqueId,
|
|
11200
12137
|
"suggestions-description"
|
|
11201
12138
|
);
|
|
11202
|
-
const [hasValue, setHasValue] = (0,
|
|
12139
|
+
const [hasValue, setHasValue] = (0, import_react118.useState)(!!value);
|
|
11203
12140
|
const context = useAutocompleteSearch();
|
|
11204
12141
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
11205
12142
|
const handleChange = (e) => {
|
|
@@ -11218,10 +12155,10 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11218
12155
|
} = buttonProps != null ? buttonProps : {};
|
|
11219
12156
|
const hasSuggestions = !!context.suggestions;
|
|
11220
12157
|
const showSearchButton = !!buttonProps && !!onClick;
|
|
11221
|
-
return /* @__PURE__ */ (0,
|
|
11222
|
-
hasLabel && /* @__PURE__ */ (0,
|
|
11223
|
-
/* @__PURE__ */ (0,
|
|
11224
|
-
/* @__PURE__ */ (0,
|
|
12158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)("div", { className: Search_default.container, children: [
|
|
12159
|
+
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(Label, { htmlFor: uniqueId, children: label }),
|
|
12160
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsxs)("div", { children: [
|
|
12161
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(
|
|
11225
12162
|
"div",
|
|
11226
12163
|
{
|
|
11227
12164
|
className: cn(
|
|
@@ -11230,16 +12167,19 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11230
12167
|
),
|
|
11231
12168
|
style,
|
|
11232
12169
|
children: [
|
|
11233
|
-
/* @__PURE__ */ (0,
|
|
11234
|
-
/* @__PURE__ */ (0,
|
|
12170
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsxs)("div", { className: Search_default["input-group"], children: [
|
|
12171
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
11235
12172
|
Icon,
|
|
11236
12173
|
{
|
|
11237
12174
|
icon: SearchIcon,
|
|
11238
12175
|
iconSize: getIconSize(componentSize),
|
|
11239
|
-
className: cn(
|
|
12176
|
+
className: cn(
|
|
12177
|
+
Input_default["input-group__absolute-element"],
|
|
12178
|
+
Search_default["search-icon"]
|
|
12179
|
+
)
|
|
11240
12180
|
}
|
|
11241
12181
|
),
|
|
11242
|
-
/* @__PURE__ */ (0,
|
|
12182
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
11243
12183
|
Input,
|
|
11244
12184
|
{
|
|
11245
12185
|
...rest,
|
|
@@ -11266,8 +12206,8 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11266
12206
|
)
|
|
11267
12207
|
}
|
|
11268
12208
|
),
|
|
11269
|
-
hasSuggestions && /* @__PURE__ */ (0,
|
|
11270
|
-
/* @__PURE__ */ (0,
|
|
12209
|
+
hasSuggestions && /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_jsx_runtime276.Fragment, { children: [
|
|
12210
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
11271
12211
|
SearchSuggestions,
|
|
11272
12212
|
{
|
|
11273
12213
|
id: suggestionsId,
|
|
@@ -11279,9 +12219,9 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11279
12219
|
componentSize
|
|
11280
12220
|
}
|
|
11281
12221
|
),
|
|
11282
|
-
/* @__PURE__ */ (0,
|
|
12222
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsx)(VisuallyHidden, { id: suggestionsDescriptionId, as: "span", children: "Bla i s\xF8keforslag med piltaster n\xE5r listen er utvidet." })
|
|
11283
12223
|
] }),
|
|
11284
|
-
hasValue && /* @__PURE__ */ (0,
|
|
12224
|
+
hasValue && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
11285
12225
|
Button,
|
|
11286
12226
|
{
|
|
11287
12227
|
icon: CloseSmallIcon,
|
|
@@ -11293,7 +12233,7 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11293
12233
|
}
|
|
11294
12234
|
)
|
|
11295
12235
|
] }),
|
|
11296
|
-
showSearchButton && /* @__PURE__ */ (0,
|
|
12236
|
+
showSearchButton && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
11297
12237
|
Button,
|
|
11298
12238
|
{
|
|
11299
12239
|
size: componentSize,
|
|
@@ -11313,8 +12253,8 @@ var Search = (0, import_react117.forwardRef)(
|
|
|
11313
12253
|
Search.displayName = "Search";
|
|
11314
12254
|
|
|
11315
12255
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
11316
|
-
var
|
|
11317
|
-
var
|
|
12256
|
+
var import_react119 = require("react");
|
|
12257
|
+
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
11318
12258
|
var SearchAutocompleteWrapper = (props) => {
|
|
11319
12259
|
const {
|
|
11320
12260
|
value,
|
|
@@ -11325,12 +12265,12 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11325
12265
|
onSuggestionSelection,
|
|
11326
12266
|
children
|
|
11327
12267
|
} = props;
|
|
11328
|
-
const [inputValue, setInputValue] = (0,
|
|
11329
|
-
const [suggestions, setSuggestions] = (0,
|
|
11330
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
12268
|
+
const [inputValue, setInputValue] = (0, import_react119.useState)(value != null ? value : "");
|
|
12269
|
+
const [suggestions, setSuggestions] = (0, import_react119.useState)([]);
|
|
12270
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react119.useState)(false);
|
|
11331
12271
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
11332
12272
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
11333
|
-
(0,
|
|
12273
|
+
(0, import_react119.useEffect)(() => {
|
|
11334
12274
|
if (suggestions.length > 0) {
|
|
11335
12275
|
openSuggestions();
|
|
11336
12276
|
} else {
|
|
@@ -11375,8 +12315,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11375
12315
|
const handleSetInputValue = (value2) => {
|
|
11376
12316
|
setInputValue(value2 != null ? value2 : "");
|
|
11377
12317
|
};
|
|
11378
|
-
const inputRef = (0,
|
|
11379
|
-
const suggestionsRef = (0,
|
|
12318
|
+
const inputRef = (0, import_react119.useRef)(null);
|
|
12319
|
+
const suggestionsRef = (0, import_react119.useRef)(null);
|
|
11380
12320
|
useOnClickOutside([inputRef.current, suggestionsRef.current], () => {
|
|
11381
12321
|
closeSuggestions();
|
|
11382
12322
|
});
|
|
@@ -11390,7 +12330,7 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11390
12330
|
inputValue,
|
|
11391
12331
|
onSugggestionClick: handleSuggestionClick
|
|
11392
12332
|
};
|
|
11393
|
-
return /* @__PURE__ */ (0,
|
|
12333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(AutocompleteSearchContext.Provider, { value: contextProps, children });
|
|
11394
12334
|
};
|
|
11395
12335
|
SearchAutocompleteWrapper.displayName = "SearchAutocompleteWrapper";
|
|
11396
12336
|
|
|
@@ -11400,17 +12340,17 @@ Search2.AutocompleteWrapper = SearchAutocompleteWrapper;
|
|
|
11400
12340
|
Search2.Suggestions = SearchSuggestions;
|
|
11401
12341
|
|
|
11402
12342
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
11403
|
-
var
|
|
12343
|
+
var import_react122 = require("react");
|
|
11404
12344
|
|
|
11405
12345
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
11406
|
-
var
|
|
11407
|
-
var CheckboxGroupContext = (0,
|
|
12346
|
+
var import_react120 = require("react");
|
|
12347
|
+
var CheckboxGroupContext = (0, import_react120.createContext)(null);
|
|
11408
12348
|
var useCheckboxGroup = () => {
|
|
11409
|
-
return (0,
|
|
12349
|
+
return (0, import_react120.useContext)(CheckboxGroupContext);
|
|
11410
12350
|
};
|
|
11411
12351
|
|
|
11412
12352
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
11413
|
-
var
|
|
12353
|
+
var import_react121 = require("react");
|
|
11414
12354
|
|
|
11415
12355
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
11416
12356
|
var SelectionControl_default = {
|
|
@@ -11430,10 +12370,10 @@ var SelectionControl_default = {
|
|
|
11430
12370
|
};
|
|
11431
12371
|
|
|
11432
12372
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
11433
|
-
var
|
|
11434
|
-
var SelectionControl = (0,
|
|
12373
|
+
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
12374
|
+
var SelectionControl = (0, import_react121.forwardRef)((props, ref) => {
|
|
11435
12375
|
const { controlType, className, ...rest } = props;
|
|
11436
|
-
return /* @__PURE__ */ (0,
|
|
12376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
11437
12377
|
"span",
|
|
11438
12378
|
{
|
|
11439
12379
|
ref,
|
|
@@ -11446,7 +12386,7 @@ var SelectionControl = (0, import_react120.forwardRef)((props, ref) => {
|
|
|
11446
12386
|
}
|
|
11447
12387
|
);
|
|
11448
12388
|
});
|
|
11449
|
-
var Label2 = (0,
|
|
12389
|
+
var Label2 = (0, import_react121.forwardRef)(
|
|
11450
12390
|
(props, ref) => {
|
|
11451
12391
|
const {
|
|
11452
12392
|
disabled,
|
|
@@ -11457,7 +12397,7 @@ var Label2 = (0, import_react120.forwardRef)(
|
|
|
11457
12397
|
className,
|
|
11458
12398
|
...rest
|
|
11459
12399
|
} = props;
|
|
11460
|
-
return /* @__PURE__ */ (0,
|
|
12400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
11461
12401
|
"label",
|
|
11462
12402
|
{
|
|
11463
12403
|
ref,
|
|
@@ -11488,8 +12428,8 @@ var selectionControlTypographyProps = {
|
|
|
11488
12428
|
};
|
|
11489
12429
|
|
|
11490
12430
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
11491
|
-
var
|
|
11492
|
-
var Checkbox = (0,
|
|
12431
|
+
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
12432
|
+
var Checkbox = (0, import_react122.forwardRef)(
|
|
11493
12433
|
(props, ref) => {
|
|
11494
12434
|
const {
|
|
11495
12435
|
id,
|
|
@@ -11504,7 +12444,7 @@ var Checkbox = (0, import_react121.forwardRef)(
|
|
|
11504
12444
|
htmlProps = {},
|
|
11505
12445
|
...rest
|
|
11506
12446
|
} = props;
|
|
11507
|
-
const generatedId = (0,
|
|
12447
|
+
const generatedId = (0, import_react122.useId)();
|
|
11508
12448
|
const uniqueId = id != null ? id : `${generatedId}-checkbox`;
|
|
11509
12449
|
const checkboxGroup = useCheckboxGroup();
|
|
11510
12450
|
const hasLabel = !!label;
|
|
@@ -11516,7 +12456,7 @@ var Checkbox = (0, import_react121.forwardRef)(
|
|
|
11516
12456
|
const isReadOnly = readOnly || (checkboxGroup == null ? void 0 : checkboxGroup.readOnly);
|
|
11517
12457
|
const hasError = error || (checkboxGroup == null ? void 0 : checkboxGroup.error);
|
|
11518
12458
|
const isDisabled = disabled || (checkboxGroup == null ? void 0 : checkboxGroup.disabled);
|
|
11519
|
-
return /* @__PURE__ */ (0,
|
|
12459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)(
|
|
11520
12460
|
Label2,
|
|
11521
12461
|
{
|
|
11522
12462
|
hasError,
|
|
@@ -11528,7 +12468,7 @@ var Checkbox = (0, import_react121.forwardRef)(
|
|
|
11528
12468
|
className: cn(className, htmlPropsClassName),
|
|
11529
12469
|
style,
|
|
11530
12470
|
children: [
|
|
11531
|
-
/* @__PURE__ */ (0,
|
|
12471
|
+
/* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
|
|
11532
12472
|
"input",
|
|
11533
12473
|
{
|
|
11534
12474
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -11558,14 +12498,14 @@ var Checkbox = (0, import_react121.forwardRef)(
|
|
|
11558
12498
|
onClick: readOnlyClickHandler(isReadOnly, htmlProps.onClick)
|
|
11559
12499
|
}
|
|
11560
12500
|
),
|
|
11561
|
-
/* @__PURE__ */ (0,
|
|
12501
|
+
/* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
|
|
11562
12502
|
SelectionControl,
|
|
11563
12503
|
{
|
|
11564
12504
|
controlType: "checkbox",
|
|
11565
12505
|
className: focus_default["focus-styled-sibling"]
|
|
11566
12506
|
}
|
|
11567
12507
|
),
|
|
11568
|
-
hasLabel && /* @__PURE__ */ (0,
|
|
12508
|
+
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(Typography, { ...selectionControlTypographyProps, children: label })
|
|
11569
12509
|
]
|
|
11570
12510
|
}
|
|
11571
12511
|
);
|
|
@@ -11574,8 +12514,8 @@ var Checkbox = (0, import_react121.forwardRef)(
|
|
|
11574
12514
|
Checkbox.displayName = "Checkbox";
|
|
11575
12515
|
|
|
11576
12516
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
11577
|
-
var
|
|
11578
|
-
var
|
|
12517
|
+
var import_react123 = require("react");
|
|
12518
|
+
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
11579
12519
|
var CheckboxGroup = (props) => {
|
|
11580
12520
|
const {
|
|
11581
12521
|
label,
|
|
@@ -11593,7 +12533,7 @@ var CheckboxGroup = (props) => {
|
|
|
11593
12533
|
...rest
|
|
11594
12534
|
} = props;
|
|
11595
12535
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
11596
|
-
const generatedId = (0,
|
|
12536
|
+
const generatedId = (0, import_react123.useId)();
|
|
11597
12537
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
11598
12538
|
const hasErrorMessage = !!errorMessage;
|
|
11599
12539
|
const showRequiredMarker = required || ariaRequired;
|
|
@@ -11607,7 +12547,7 @@ var CheckboxGroup = (props) => {
|
|
|
11607
12547
|
disabled,
|
|
11608
12548
|
readOnly
|
|
11609
12549
|
};
|
|
11610
|
-
return /* @__PURE__ */ (0,
|
|
12550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
|
|
11611
12551
|
"div",
|
|
11612
12552
|
{
|
|
11613
12553
|
...getBaseHTMLProps(
|
|
@@ -11617,7 +12557,7 @@ var CheckboxGroup = (props) => {
|
|
|
11617
12557
|
rest
|
|
11618
12558
|
),
|
|
11619
12559
|
children: [
|
|
11620
|
-
/* @__PURE__ */ (0,
|
|
12560
|
+
/* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
|
|
11621
12561
|
Typography,
|
|
11622
12562
|
{
|
|
11623
12563
|
as: "span",
|
|
@@ -11625,15 +12565,15 @@ var CheckboxGroup = (props) => {
|
|
|
11625
12565
|
id: uniqueGroupId,
|
|
11626
12566
|
className: readOnly ? Label_default["read-only"] : void 0,
|
|
11627
12567
|
children: [
|
|
11628
|
-
readOnly && /* @__PURE__ */ (0,
|
|
12568
|
+
readOnly && /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(Icon, { icon: LockIcon, className: Label_default["read-only__icon"] }),
|
|
11629
12569
|
label,
|
|
11630
12570
|
" ",
|
|
11631
|
-
showRequiredMarker && /* @__PURE__ */ (0,
|
|
12571
|
+
showRequiredMarker && /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(RequiredMarker, {})
|
|
11632
12572
|
]
|
|
11633
12573
|
}
|
|
11634
12574
|
),
|
|
11635
12575
|
renderInputMessage(tip, tipId),
|
|
11636
|
-
/* @__PURE__ */ (0,
|
|
12576
|
+
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)(CheckboxGroupContext.Provider, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
|
|
11637
12577
|
"div",
|
|
11638
12578
|
{
|
|
11639
12579
|
role: "group",
|
|
@@ -11651,17 +12591,17 @@ var CheckboxGroup = (props) => {
|
|
|
11651
12591
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
11652
12592
|
|
|
11653
12593
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
11654
|
-
var
|
|
12594
|
+
var import_react125 = require("react");
|
|
11655
12595
|
|
|
11656
12596
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
11657
|
-
var
|
|
11658
|
-
var RadioButtonGroupContext = (0,
|
|
12597
|
+
var import_react124 = require("react");
|
|
12598
|
+
var RadioButtonGroupContext = (0, import_react124.createContext)(null);
|
|
11659
12599
|
var useRadioButtonGroup = () => {
|
|
11660
|
-
return (0,
|
|
12600
|
+
return (0, import_react124.useContext)(RadioButtonGroupContext);
|
|
11661
12601
|
};
|
|
11662
12602
|
|
|
11663
12603
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
11664
|
-
var
|
|
12604
|
+
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
11665
12605
|
var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
11666
12606
|
if (typeof value !== "undefined" && value !== null && group) {
|
|
11667
12607
|
if (typeof value === "number") {
|
|
@@ -11671,7 +12611,7 @@ var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
|
11671
12611
|
}
|
|
11672
12612
|
return !!value;
|
|
11673
12613
|
};
|
|
11674
|
-
var RadioButton = (0,
|
|
12614
|
+
var RadioButton = (0, import_react125.forwardRef)(
|
|
11675
12615
|
(props, ref) => {
|
|
11676
12616
|
const {
|
|
11677
12617
|
id,
|
|
@@ -11695,7 +12635,7 @@ var RadioButton = (0, import_react124.forwardRef)(
|
|
|
11695
12635
|
style,
|
|
11696
12636
|
...restHtmlProps
|
|
11697
12637
|
} = htmlProps;
|
|
11698
|
-
const generatedId = (0,
|
|
12638
|
+
const generatedId = (0, import_react125.useId)();
|
|
11699
12639
|
const uniqueId = id != null ? id : `${generatedId}-radioButton`;
|
|
11700
12640
|
const hasLabel = !!label;
|
|
11701
12641
|
const radioButtonGroup = useRadioButtonGroup();
|
|
@@ -11710,7 +12650,7 @@ var RadioButton = (0, import_react124.forwardRef)(
|
|
|
11710
12650
|
const isReadOnly = readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly);
|
|
11711
12651
|
const isDisabled = disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled);
|
|
11712
12652
|
const hasError = error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error);
|
|
11713
|
-
return /* @__PURE__ */ (0,
|
|
12653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(
|
|
11714
12654
|
Label2,
|
|
11715
12655
|
{
|
|
11716
12656
|
hasError,
|
|
@@ -11722,7 +12662,7 @@ var RadioButton = (0, import_react124.forwardRef)(
|
|
|
11722
12662
|
htmlFor: uniqueId,
|
|
11723
12663
|
controlType: "radio",
|
|
11724
12664
|
children: [
|
|
11725
|
-
/* @__PURE__ */ (0,
|
|
12665
|
+
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
11726
12666
|
"input",
|
|
11727
12667
|
{
|
|
11728
12668
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -11748,14 +12688,14 @@ var RadioButton = (0, import_react124.forwardRef)(
|
|
|
11748
12688
|
onClick: readOnlyClickHandler(isReadOnly, htmlProps.onClick)
|
|
11749
12689
|
}
|
|
11750
12690
|
),
|
|
11751
|
-
/* @__PURE__ */ (0,
|
|
12691
|
+
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
11752
12692
|
SelectionControl,
|
|
11753
12693
|
{
|
|
11754
12694
|
controlType: "radio",
|
|
11755
12695
|
className: focus_default["focus-styled-sibling"]
|
|
11756
12696
|
}
|
|
11757
12697
|
),
|
|
11758
|
-
/* @__PURE__ */ (0,
|
|
12698
|
+
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(Typography, { ...selectionControlTypographyProps, children: children != null ? children : label })
|
|
11759
12699
|
]
|
|
11760
12700
|
}
|
|
11761
12701
|
);
|
|
@@ -11764,8 +12704,8 @@ var RadioButton = (0, import_react124.forwardRef)(
|
|
|
11764
12704
|
RadioButton.displayName = "RadioButton";
|
|
11765
12705
|
|
|
11766
12706
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
11767
|
-
var
|
|
11768
|
-
var
|
|
12707
|
+
var import_react126 = require("react");
|
|
12708
|
+
var import_jsx_runtime282 = require("react/jsx-runtime");
|
|
11769
12709
|
var RadioButtonGroupInner = (props, ref) => {
|
|
11770
12710
|
const {
|
|
11771
12711
|
name,
|
|
@@ -11786,8 +12726,8 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11786
12726
|
...rest
|
|
11787
12727
|
} = props;
|
|
11788
12728
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
11789
|
-
const [groupValue, setGroupValue] = (0,
|
|
11790
|
-
const generatedId = (0,
|
|
12729
|
+
const [groupValue, setGroupValue] = (0, import_react126.useState)(value);
|
|
12730
|
+
const generatedId = (0, import_react126.useId)();
|
|
11791
12731
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
|
|
11792
12732
|
const handleChange = combineHandlers(
|
|
11793
12733
|
(e) => setGroupValue(e.target.value),
|
|
@@ -11807,7 +12747,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11807
12747
|
value: groupValue,
|
|
11808
12748
|
onChange: handleChange
|
|
11809
12749
|
};
|
|
11810
|
-
return /* @__PURE__ */ (0,
|
|
12750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(
|
|
11811
12751
|
"div",
|
|
11812
12752
|
{
|
|
11813
12753
|
...getBaseHTMLProps(
|
|
@@ -11818,7 +12758,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11818
12758
|
),
|
|
11819
12759
|
ref,
|
|
11820
12760
|
children: [
|
|
11821
|
-
/* @__PURE__ */ (0,
|
|
12761
|
+
/* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(
|
|
11822
12762
|
Typography,
|
|
11823
12763
|
{
|
|
11824
12764
|
as: "span",
|
|
@@ -11826,15 +12766,15 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11826
12766
|
id: uniqueGroupId,
|
|
11827
12767
|
className: readOnly ? Label_default["read-only"] : void 0,
|
|
11828
12768
|
children: [
|
|
11829
|
-
readOnly && /* @__PURE__ */ (0,
|
|
12769
|
+
readOnly && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(Icon, { icon: LockIcon, className: Label_default["read-only__icon"] }),
|
|
11830
12770
|
label,
|
|
11831
12771
|
" ",
|
|
11832
|
-
showRequiredMarker && /* @__PURE__ */ (0,
|
|
12772
|
+
showRequiredMarker && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(RequiredMarker, {})
|
|
11833
12773
|
]
|
|
11834
12774
|
}
|
|
11835
12775
|
),
|
|
11836
12776
|
renderInputMessage(tip, tipId),
|
|
11837
|
-
/* @__PURE__ */ (0,
|
|
12777
|
+
/* @__PURE__ */ (0, import_jsx_runtime282.jsx)(RadioButtonGroupContext.Provider, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
|
|
11838
12778
|
"div",
|
|
11839
12779
|
{
|
|
11840
12780
|
role: "radiogroup",
|
|
@@ -11850,11 +12790,11 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11850
12790
|
}
|
|
11851
12791
|
);
|
|
11852
12792
|
};
|
|
11853
|
-
var RadioButtonGroup = (0,
|
|
12793
|
+
var RadioButtonGroup = (0, import_react126.forwardRef)(RadioButtonGroupInner);
|
|
11854
12794
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
11855
12795
|
|
|
11856
12796
|
// src/components/Skeleton/Skeleton.tsx
|
|
11857
|
-
var
|
|
12797
|
+
var import_react127 = require("react");
|
|
11858
12798
|
|
|
11859
12799
|
// src/components/Skeleton/Skeleton.module.css
|
|
11860
12800
|
var Skeleton_default = {
|
|
@@ -11863,8 +12803,8 @@ var Skeleton_default = {
|
|
|
11863
12803
|
};
|
|
11864
12804
|
|
|
11865
12805
|
// src/components/Skeleton/Skeleton.tsx
|
|
11866
|
-
var
|
|
11867
|
-
var Skeleton = (0,
|
|
12806
|
+
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
12807
|
+
var Skeleton = (0, import_react127.forwardRef)(
|
|
11868
12808
|
(props, ref) => {
|
|
11869
12809
|
const {
|
|
11870
12810
|
width,
|
|
@@ -11874,7 +12814,7 @@ var Skeleton = (0, import_react126.forwardRef)(
|
|
|
11874
12814
|
style,
|
|
11875
12815
|
...rest
|
|
11876
12816
|
} = props;
|
|
11877
|
-
return /* @__PURE__ */ (0,
|
|
12817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
|
|
11878
12818
|
"div",
|
|
11879
12819
|
{
|
|
11880
12820
|
ref,
|
|
@@ -11888,7 +12828,7 @@ var Skeleton = (0, import_react126.forwardRef)(
|
|
|
11888
12828
|
Skeleton.displayName = "Skeleton";
|
|
11889
12829
|
|
|
11890
12830
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
11891
|
-
var
|
|
12831
|
+
var import_react128 = require("react");
|
|
11892
12832
|
|
|
11893
12833
|
// src/components/SkipToContent/SkipToContent.module.css
|
|
11894
12834
|
var SkipToContent_default = {
|
|
@@ -11896,8 +12836,8 @@ var SkipToContent_default = {
|
|
|
11896
12836
|
};
|
|
11897
12837
|
|
|
11898
12838
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
11899
|
-
var
|
|
11900
|
-
var SkipToContent = (0,
|
|
12839
|
+
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
12840
|
+
var SkipToContent = (0, import_react128.forwardRef)(
|
|
11901
12841
|
(props, ref) => {
|
|
11902
12842
|
const {
|
|
11903
12843
|
text = "Til hovedinnhold",
|
|
@@ -11912,12 +12852,12 @@ var SkipToContent = (0, import_react127.forwardRef)(
|
|
|
11912
12852
|
style,
|
|
11913
12853
|
...restHtmlProps
|
|
11914
12854
|
} = htmlProps;
|
|
11915
|
-
return /* @__PURE__ */ (0,
|
|
12855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
|
|
11916
12856
|
Contrast,
|
|
11917
12857
|
{
|
|
11918
12858
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
11919
12859
|
style: { ...style, top },
|
|
11920
|
-
children: /* @__PURE__ */ (0,
|
|
12860
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(Link, { ...getBaseHTMLProps(id, restHtmlProps, rest), ref, children: text })
|
|
11921
12861
|
}
|
|
11922
12862
|
);
|
|
11923
12863
|
}
|
|
@@ -11925,7 +12865,7 @@ var SkipToContent = (0, import_react127.forwardRef)(
|
|
|
11925
12865
|
SkipToContent.displayName = "SkipToContent";
|
|
11926
12866
|
|
|
11927
12867
|
// src/components/SplitButton/SplitButton.tsx
|
|
11928
|
-
var
|
|
12868
|
+
var import_react129 = require("react");
|
|
11929
12869
|
|
|
11930
12870
|
// src/components/SplitButton/SplitButton.module.css
|
|
11931
12871
|
var SplitButton_default = {
|
|
@@ -11936,8 +12876,8 @@ var SplitButton_default = {
|
|
|
11936
12876
|
};
|
|
11937
12877
|
|
|
11938
12878
|
// src/components/SplitButton/SplitButton.tsx
|
|
11939
|
-
var
|
|
11940
|
-
var SplitButton = (0,
|
|
12879
|
+
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
12880
|
+
var SplitButton = (0, import_react129.forwardRef)(
|
|
11941
12881
|
(props, ref) => {
|
|
11942
12882
|
const {
|
|
11943
12883
|
size: size2,
|
|
@@ -11947,13 +12887,13 @@ var SplitButton = (0, import_react128.forwardRef)(
|
|
|
11947
12887
|
className,
|
|
11948
12888
|
...rest
|
|
11949
12889
|
} = props;
|
|
11950
|
-
const [isOpen, setIsOpen] = (0,
|
|
12890
|
+
const [isOpen, setIsOpen] = (0, import_react129.useState)(false);
|
|
11951
12891
|
const buttonStyleProps = {
|
|
11952
12892
|
purpose,
|
|
11953
12893
|
size: size2
|
|
11954
12894
|
};
|
|
11955
|
-
return /* @__PURE__ */ (0,
|
|
11956
|
-
/* @__PURE__ */ (0,
|
|
12895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)("div", { ref, className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
12896
|
+
/* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
|
|
11957
12897
|
Button,
|
|
11958
12898
|
{
|
|
11959
12899
|
...buttonStyleProps,
|
|
@@ -11962,8 +12902,8 @@ var SplitButton = (0, import_react128.forwardRef)(
|
|
|
11962
12902
|
className: SplitButton_default.main
|
|
11963
12903
|
}
|
|
11964
12904
|
),
|
|
11965
|
-
/* @__PURE__ */ (0,
|
|
11966
|
-
/* @__PURE__ */ (0,
|
|
12905
|
+
/* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(OverflowMenuGroup, { onToggle: () => setIsOpen(!isOpen), children: [
|
|
12906
|
+
/* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
|
|
11967
12907
|
Button,
|
|
11968
12908
|
{
|
|
11969
12909
|
...buttonStyleProps,
|
|
@@ -11976,7 +12916,7 @@ var SplitButton = (0, import_react128.forwardRef)(
|
|
|
11976
12916
|
)
|
|
11977
12917
|
}
|
|
11978
12918
|
),
|
|
11979
|
-
/* @__PURE__ */ (0,
|
|
12919
|
+
/* @__PURE__ */ (0, import_jsx_runtime285.jsx)(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(OverflowMenuButton, { ...item, children: item.children }, index)) }) })
|
|
11980
12920
|
] })
|
|
11981
12921
|
] });
|
|
11982
12922
|
}
|
|
@@ -11984,41 +12924,41 @@ var SplitButton = (0, import_react128.forwardRef)(
|
|
|
11984
12924
|
SplitButton.displayName = "SplitButton";
|
|
11985
12925
|
|
|
11986
12926
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
11987
|
-
var
|
|
12927
|
+
var import_react139 = require("react");
|
|
11988
12928
|
|
|
11989
12929
|
// src/components/Table/collapsible/Table.context.tsx
|
|
11990
|
-
var
|
|
11991
|
-
var CollapsibleTableContext = (0,
|
|
12930
|
+
var import_react130 = require("react");
|
|
12931
|
+
var CollapsibleTableContext = (0, import_react130.createContext)({
|
|
11992
12932
|
headerValues: [],
|
|
11993
12933
|
definingColumnIndex: [0]
|
|
11994
12934
|
});
|
|
11995
|
-
var useCollapsibleTableContext = () => (0,
|
|
12935
|
+
var useCollapsibleTableContext = () => (0, import_react130.useContext)(CollapsibleTableContext);
|
|
11996
12936
|
|
|
11997
12937
|
// src/components/Table/normal/Body.tsx
|
|
11998
|
-
var
|
|
11999
|
-
var
|
|
12000
|
-
var Body = (0,
|
|
12938
|
+
var import_react131 = require("react");
|
|
12939
|
+
var import_jsx_runtime286 = require("react/jsx-runtime");
|
|
12940
|
+
var Body = (0, import_react131.forwardRef)(
|
|
12001
12941
|
(props, ref) => {
|
|
12002
|
-
return /* @__PURE__ */ (0,
|
|
12942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)("tbody", { ref, ...props });
|
|
12003
12943
|
}
|
|
12004
12944
|
);
|
|
12005
12945
|
Body.displayName = "Table.Body";
|
|
12006
12946
|
|
|
12007
12947
|
// src/components/Table/normal/Cell.tsx
|
|
12008
|
-
var
|
|
12948
|
+
var import_react133 = require("react");
|
|
12009
12949
|
|
|
12010
12950
|
// src/components/Table/normal/Head.tsx
|
|
12011
|
-
var
|
|
12012
|
-
var
|
|
12013
|
-
var Head = (0,
|
|
12951
|
+
var import_react132 = require("react");
|
|
12952
|
+
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
12953
|
+
var Head = (0, import_react132.forwardRef)(
|
|
12014
12954
|
({ children, ...rest }, ref) => {
|
|
12015
|
-
return /* @__PURE__ */ (0,
|
|
12955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("thead", { ref, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(HeadContext.Provider, { value: true, children }) });
|
|
12016
12956
|
}
|
|
12017
12957
|
);
|
|
12018
12958
|
Head.displayName = "Table.Head";
|
|
12019
|
-
var HeadContext = (0,
|
|
12959
|
+
var HeadContext = (0, import_react132.createContext)(false);
|
|
12020
12960
|
function useIsInTableHead() {
|
|
12021
|
-
const isInTableHead = (0,
|
|
12961
|
+
const isInTableHead = (0, import_react132.useContext)(HeadContext);
|
|
12022
12962
|
return isInTableHead;
|
|
12023
12963
|
}
|
|
12024
12964
|
|
|
@@ -12048,8 +12988,8 @@ var Table_default = {
|
|
|
12048
12988
|
};
|
|
12049
12989
|
|
|
12050
12990
|
// src/components/Table/normal/Cell.tsx
|
|
12051
|
-
var
|
|
12052
|
-
var Cell = (0,
|
|
12991
|
+
var import_jsx_runtime288 = require("react/jsx-runtime");
|
|
12992
|
+
var Cell = (0, import_react133.forwardRef)(
|
|
12053
12993
|
({
|
|
12054
12994
|
children,
|
|
12055
12995
|
type: _type,
|
|
@@ -12062,7 +13002,7 @@ var Cell = (0, import_react132.forwardRef)(
|
|
|
12062
13002
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
12063
13003
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
12064
13004
|
const isComplexLayout = layout === "text and icon";
|
|
12065
|
-
return isCollapsibleChild ? /* @__PURE__ */ (0,
|
|
13005
|
+
return isCollapsibleChild ? /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
12066
13006
|
"th",
|
|
12067
13007
|
{
|
|
12068
13008
|
ref,
|
|
@@ -12072,15 +13012,15 @@ var Cell = (0, import_react132.forwardRef)(
|
|
|
12072
13012
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
12073
13013
|
Table_default["cell--head"]
|
|
12074
13014
|
),
|
|
12075
|
-
children: isComplexLayout ? /* @__PURE__ */ (0,
|
|
13015
|
+
children: isComplexLayout ? /* @__PURE__ */ (0, import_jsx_runtime288.jsx)("div", { className: Table_default.cell__inner, children }) : children
|
|
12076
13016
|
}
|
|
12077
|
-
) : /* @__PURE__ */ (0,
|
|
13017
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
12078
13018
|
"td",
|
|
12079
13019
|
{
|
|
12080
13020
|
ref,
|
|
12081
13021
|
...rest,
|
|
12082
13022
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
12083
|
-
children: isComplexLayout ? /* @__PURE__ */ (0,
|
|
13023
|
+
children: isComplexLayout ? /* @__PURE__ */ (0, import_jsx_runtime288.jsx)("div", { className: Table_default.cell__inner, children }) : children
|
|
12084
13024
|
}
|
|
12085
13025
|
);
|
|
12086
13026
|
}
|
|
@@ -12088,23 +13028,23 @@ var Cell = (0, import_react132.forwardRef)(
|
|
|
12088
13028
|
Cell.displayName = "Table.Cell";
|
|
12089
13029
|
|
|
12090
13030
|
// src/components/Table/normal/Foot.tsx
|
|
12091
|
-
var
|
|
12092
|
-
var
|
|
12093
|
-
var Foot = (0,
|
|
13031
|
+
var import_react134 = require("react");
|
|
13032
|
+
var import_jsx_runtime289 = require("react/jsx-runtime");
|
|
13033
|
+
var Foot = (0, import_react134.forwardRef)(
|
|
12094
13034
|
(props, ref) => {
|
|
12095
|
-
return /* @__PURE__ */ (0,
|
|
13035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)("tfoot", { ref, ...props });
|
|
12096
13036
|
}
|
|
12097
13037
|
);
|
|
12098
13038
|
Foot.displayName = "Table.Foot";
|
|
12099
13039
|
|
|
12100
13040
|
// src/components/Table/normal/Row.tsx
|
|
12101
|
-
var
|
|
12102
|
-
var
|
|
12103
|
-
var Row = (0,
|
|
13041
|
+
var import_react135 = require("react");
|
|
13042
|
+
var import_jsx_runtime290 = require("react/jsx-runtime");
|
|
13043
|
+
var Row = (0, import_react135.forwardRef)(
|
|
12104
13044
|
({ type: _type, mode = "normal", hoverable, selected, className, ...rest }, ref) => {
|
|
12105
13045
|
const isInHeader = useIsInTableHead();
|
|
12106
13046
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
12107
|
-
return /* @__PURE__ */ (0,
|
|
13047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
12108
13048
|
"tr",
|
|
12109
13049
|
{
|
|
12110
13050
|
ref,
|
|
@@ -12127,23 +13067,23 @@ var Row = (0, import_react134.forwardRef)(
|
|
|
12127
13067
|
Row.displayName = "Table.Row";
|
|
12128
13068
|
|
|
12129
13069
|
// src/components/Table/normal/SortCell.tsx
|
|
12130
|
-
var
|
|
12131
|
-
var
|
|
13070
|
+
var import_react136 = require("react");
|
|
13071
|
+
var import_jsx_runtime291 = require("react/jsx-runtime");
|
|
12132
13072
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
12133
13073
|
if (!isSorted || !sortOrder) {
|
|
12134
|
-
return /* @__PURE__ */ (0,
|
|
13074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
12135
13075
|
}
|
|
12136
|
-
return sortOrder === "ascending" ? /* @__PURE__ */ (0,
|
|
13076
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
12137
13077
|
};
|
|
12138
|
-
var SortCell = (0,
|
|
12139
|
-
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ (0,
|
|
13078
|
+
var SortCell = (0, import_react136.forwardRef)(
|
|
13079
|
+
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
12140
13080
|
Cell,
|
|
12141
13081
|
{
|
|
12142
13082
|
ref,
|
|
12143
13083
|
type: "head",
|
|
12144
13084
|
"aria-sort": isSorted && sortOrder ? sortOrder : void 0,
|
|
12145
13085
|
...rest,
|
|
12146
|
-
children: /* @__PURE__ */ (0,
|
|
13086
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
|
|
12147
13087
|
"button",
|
|
12148
13088
|
{
|
|
12149
13089
|
onClick,
|
|
@@ -12167,8 +13107,8 @@ var SortCell = (0, import_react135.forwardRef)(
|
|
|
12167
13107
|
SortCell.displayName = "Table.SortCell";
|
|
12168
13108
|
|
|
12169
13109
|
// src/components/Table/normal/Table.tsx
|
|
12170
|
-
var
|
|
12171
|
-
var
|
|
13110
|
+
var import_react137 = require("react");
|
|
13111
|
+
var import_jsx_runtime292 = require("react/jsx-runtime");
|
|
12172
13112
|
function getDensityCn2(value) {
|
|
12173
13113
|
switch (value) {
|
|
12174
13114
|
case "normal":
|
|
@@ -12178,7 +13118,7 @@ function getDensityCn2(value) {
|
|
|
12178
13118
|
return "extra-compact";
|
|
12179
13119
|
}
|
|
12180
13120
|
}
|
|
12181
|
-
var Table = (0,
|
|
13121
|
+
var Table = (0, import_react137.forwardRef)(
|
|
12182
13122
|
({
|
|
12183
13123
|
density = "normal",
|
|
12184
13124
|
stickyHeader,
|
|
@@ -12187,7 +13127,7 @@ var Table = (0, import_react136.forwardRef)(
|
|
|
12187
13127
|
children,
|
|
12188
13128
|
...rest
|
|
12189
13129
|
}, ref) => {
|
|
12190
|
-
return /* @__PURE__ */ (0,
|
|
13130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
12191
13131
|
"table",
|
|
12192
13132
|
{
|
|
12193
13133
|
ref,
|
|
@@ -12208,30 +13148,30 @@ var Table = (0, import_react136.forwardRef)(
|
|
|
12208
13148
|
Table.displayName = "Table";
|
|
12209
13149
|
|
|
12210
13150
|
// src/components/Table/normal/TableWrapper.tsx
|
|
12211
|
-
var
|
|
12212
|
-
var
|
|
13151
|
+
var import_react138 = require("react");
|
|
13152
|
+
var import_jsx_runtime293 = require("react/jsx-runtime");
|
|
12213
13153
|
var TableWrapper = ({ className, ...rest }) => {
|
|
12214
|
-
const [overflowX, setOverflowX] = (0,
|
|
12215
|
-
const [windowWidth, setWindowWidth] = (0,
|
|
13154
|
+
const [overflowX, setOverflowX] = (0, import_react138.useState)(false);
|
|
13155
|
+
const [windowWidth, setWindowWidth] = (0, import_react138.useState)(window.innerWidth);
|
|
12216
13156
|
function isOverflowingX(event) {
|
|
12217
13157
|
return event.offsetWidth < event.scrollWidth;
|
|
12218
13158
|
}
|
|
12219
|
-
const wrapperRef = (0,
|
|
12220
|
-
(0,
|
|
13159
|
+
const wrapperRef = (0, import_react138.useRef)(null);
|
|
13160
|
+
(0, import_react138.useEffect)(() => {
|
|
12221
13161
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
12222
13162
|
setOverflowX(true);
|
|
12223
13163
|
return;
|
|
12224
13164
|
}
|
|
12225
13165
|
setOverflowX(false);
|
|
12226
13166
|
}, [windowWidth]);
|
|
12227
|
-
(0,
|
|
13167
|
+
(0, import_react138.useEffect)(() => {
|
|
12228
13168
|
function handleResize() {
|
|
12229
13169
|
setWindowWidth(window.innerWidth);
|
|
12230
13170
|
}
|
|
12231
13171
|
window.addEventListener("resize", handleResize);
|
|
12232
13172
|
return () => window.removeEventListener("resize", handleResize);
|
|
12233
13173
|
});
|
|
12234
|
-
return /* @__PURE__ */ (0,
|
|
13174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
12235
13175
|
"div",
|
|
12236
13176
|
{
|
|
12237
13177
|
ref: wrapperRef,
|
|
@@ -12258,8 +13198,8 @@ Table2.Row = Row;
|
|
|
12258
13198
|
Table2.Foot = Foot;
|
|
12259
13199
|
|
|
12260
13200
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12261
|
-
var
|
|
12262
|
-
var CollapsibleRow = (0,
|
|
13201
|
+
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
13202
|
+
var CollapsibleRow = (0, import_react139.forwardRef)(
|
|
12263
13203
|
({
|
|
12264
13204
|
type: _type,
|
|
12265
13205
|
className,
|
|
@@ -12272,8 +13212,8 @@ var CollapsibleRow = (0, import_react138.forwardRef)(
|
|
|
12272
13212
|
const isInHead = useIsInTableHead();
|
|
12273
13213
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
12274
13214
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
12275
|
-
const [childrenCollapsed, setChildrenCollapsed] = (0,
|
|
12276
|
-
(0,
|
|
13215
|
+
const [childrenCollapsed, setChildrenCollapsed] = (0, import_react139.useState)(true);
|
|
13216
|
+
(0, import_react139.useEffect)(() => {
|
|
12277
13217
|
!isCollapsed && setChildrenCollapsed(true);
|
|
12278
13218
|
}, [isCollapsed]);
|
|
12279
13219
|
const rowProps = (isOpenCollapsibleHeader) => {
|
|
@@ -12291,7 +13231,7 @@ var CollapsibleRow = (0, import_react138.forwardRef)(
|
|
|
12291
13231
|
const collapsedHeaderValues = headerValues.filter(
|
|
12292
13232
|
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
12293
13233
|
);
|
|
12294
|
-
const childrenArray =
|
|
13234
|
+
const childrenArray = import_react139.Children.toArray(children);
|
|
12295
13235
|
const collapsedChildren = childrenArray.filter(
|
|
12296
13236
|
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
12297
13237
|
);
|
|
@@ -12300,33 +13240,33 @@ var CollapsibleRow = (0, import_react138.forwardRef)(
|
|
|
12300
13240
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
12301
13241
|
const id = derivativeIdGenerator(prefix3, index.toString());
|
|
12302
13242
|
collapsibleIds.push(id);
|
|
12303
|
-
return /* @__PURE__ */ (0,
|
|
12304
|
-
/* @__PURE__ */ (0,
|
|
12305
|
-
(0,
|
|
13243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_react139.Fragment, { children: [
|
|
13244
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
13245
|
+
(0, import_react139.isValidElement)(child) && (0, import_react139.cloneElement)(child, {
|
|
12306
13246
|
collapsibleProps: { isCollapsibleChild: true }
|
|
12307
13247
|
})
|
|
12308
13248
|
] }, `DL-${index}`);
|
|
12309
13249
|
}) : null;
|
|
12310
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0,
|
|
13250
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Row, { ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
12311
13251
|
const definingColumnCells = childrenArray.slice().filter((column2, index) => definingColumnIndex.indexOf(index) > -1).sort((a2, b) => {
|
|
12312
13252
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a2)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
12313
13253
|
});
|
|
12314
13254
|
const headerRow = () => {
|
|
12315
13255
|
if (type !== "head" || !isCollapsed) return null;
|
|
12316
|
-
return /* @__PURE__ */ (0,
|
|
13256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Row, { ref, ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_jsx_runtime294.Fragment, { children: [
|
|
12317
13257
|
definingColumnCells,
|
|
12318
|
-
/* @__PURE__ */ (0,
|
|
13258
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Table2.Cell, { type: "head", layout: "center", children: [
|
|
12319
13259
|
"Utvid",
|
|
12320
|
-
/* @__PURE__ */ (0,
|
|
13260
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(VisuallyHidden, { as: "span", children: "raden" })
|
|
12321
13261
|
] })
|
|
12322
13262
|
] }) });
|
|
12323
13263
|
};
|
|
12324
13264
|
const idList = spaceSeparatedIdListGenerator(collapsibleIds);
|
|
12325
13265
|
const rowWithChevron = () => {
|
|
12326
13266
|
if (type !== "body" || !isCollapsed) return null;
|
|
12327
|
-
return /* @__PURE__ */ (0,
|
|
13267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
12328
13268
|
definingColumnCells,
|
|
12329
|
-
/* @__PURE__ */ (0,
|
|
13269
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Table2.Cell, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
12330
13270
|
"button",
|
|
12331
13271
|
{
|
|
12332
13272
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
@@ -12338,7 +13278,7 @@ var CollapsibleRow = (0, import_react138.forwardRef)(
|
|
|
12338
13278
|
utilStyles_default["remove-button-styling"],
|
|
12339
13279
|
focusable
|
|
12340
13280
|
),
|
|
12341
|
-
children: /* @__PURE__ */ (0,
|
|
13281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
12342
13282
|
AnimatedChevronUpDown,
|
|
12343
13283
|
{
|
|
12344
13284
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -12350,28 +13290,28 @@ var CollapsibleRow = (0, import_react138.forwardRef)(
|
|
|
12350
13290
|
) })
|
|
12351
13291
|
] });
|
|
12352
13292
|
};
|
|
12353
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0,
|
|
13293
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_jsx_runtime294.Fragment, { children: [
|
|
12354
13294
|
headerRow(),
|
|
12355
|
-
type === "body" && /* @__PURE__ */ (0,
|
|
13295
|
+
type === "body" && /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_jsx_runtime294.Fragment, { children: [
|
|
12356
13296
|
rowWithChevron(),
|
|
12357
13297
|
childrenCollapsed ? null : collapsedRows
|
|
12358
13298
|
] })
|
|
12359
|
-
] }) : /* @__PURE__ */ (0,
|
|
13299
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Row, { ref, ...rowProps(), children });
|
|
12360
13300
|
}
|
|
12361
13301
|
);
|
|
12362
13302
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
12363
13303
|
|
|
12364
13304
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
12365
|
-
var
|
|
12366
|
-
var
|
|
12367
|
-
var CollapsibleTable = (0,
|
|
13305
|
+
var import_react140 = require("react");
|
|
13306
|
+
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
13307
|
+
var CollapsibleTable = (0, import_react140.forwardRef)((props, ref) => {
|
|
12368
13308
|
const {
|
|
12369
13309
|
isCollapsed,
|
|
12370
13310
|
headerValues,
|
|
12371
13311
|
definingColumnIndex = [0],
|
|
12372
13312
|
...rest
|
|
12373
13313
|
} = props;
|
|
12374
|
-
return /* @__PURE__ */ (0,
|
|
13314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
12375
13315
|
CollapsibleTableContext.Provider,
|
|
12376
13316
|
{
|
|
12377
13317
|
value: {
|
|
@@ -12379,7 +13319,7 @@ var CollapsibleTable = (0, import_react139.forwardRef)((props, ref) => {
|
|
|
12379
13319
|
headerValues,
|
|
12380
13320
|
definingColumnIndex
|
|
12381
13321
|
},
|
|
12382
|
-
children: /* @__PURE__ */ (0,
|
|
13322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(Table2, { ref, ...rest })
|
|
12383
13323
|
}
|
|
12384
13324
|
);
|
|
12385
13325
|
});
|
|
@@ -12390,11 +13330,11 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
12390
13330
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
12391
13331
|
|
|
12392
13332
|
// src/components/Tabs/Tabs.tsx
|
|
12393
|
-
var
|
|
13333
|
+
var import_react142 = require("react");
|
|
12394
13334
|
|
|
12395
13335
|
// src/components/Tabs/Tabs.context.tsx
|
|
12396
|
-
var
|
|
12397
|
-
var TabsContext = (0,
|
|
13336
|
+
var import_react141 = require("react");
|
|
13337
|
+
var TabsContext = (0, import_react141.createContext)({
|
|
12398
13338
|
activeTab: 0,
|
|
12399
13339
|
tabsId: "",
|
|
12400
13340
|
handleTabChange: () => null,
|
|
@@ -12404,7 +13344,7 @@ var TabsContext = (0, import_react140.createContext)({
|
|
|
12404
13344
|
setHasTabFocus: () => null,
|
|
12405
13345
|
tabContentDirection: "row"
|
|
12406
13346
|
});
|
|
12407
|
-
var useTabsContext = () => (0,
|
|
13347
|
+
var useTabsContext = () => (0, import_react141.useContext)(TabsContext);
|
|
12408
13348
|
|
|
12409
13349
|
// src/components/Tabs/Tabs.module.css
|
|
12410
13350
|
var Tabs_default = {
|
|
@@ -12420,8 +13360,8 @@ var Tabs_default = {
|
|
|
12420
13360
|
};
|
|
12421
13361
|
|
|
12422
13362
|
// src/components/Tabs/Tabs.tsx
|
|
12423
|
-
var
|
|
12424
|
-
var Tabs = (0,
|
|
13363
|
+
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
13364
|
+
var Tabs = (0, import_react142.forwardRef)((props, ref) => {
|
|
12425
13365
|
const {
|
|
12426
13366
|
id,
|
|
12427
13367
|
activeTab,
|
|
@@ -12433,17 +13373,17 @@ var Tabs = (0, import_react141.forwardRef)((props, ref) => {
|
|
|
12433
13373
|
htmlProps,
|
|
12434
13374
|
...rest
|
|
12435
13375
|
} = props;
|
|
12436
|
-
const generatedId = (0,
|
|
13376
|
+
const generatedId = (0, import_react142.useId)();
|
|
12437
13377
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
12438
|
-
const [thisActiveTab, setActiveTab] = (0,
|
|
12439
|
-
const [hasTabFocus, setHasTabFocus] = (0,
|
|
12440
|
-
const tabListRef = (0,
|
|
12441
|
-
const tabPanelsRef = (0,
|
|
13378
|
+
const [thisActiveTab, setActiveTab] = (0, import_react142.useState)(activeTab != null ? activeTab : 0);
|
|
13379
|
+
const [hasTabFocus, setHasTabFocus] = (0, import_react142.useState)(false);
|
|
13380
|
+
const tabListRef = (0, import_react142.useRef)(null);
|
|
13381
|
+
const tabPanelsRef = (0, import_react142.useRef)(null);
|
|
12442
13382
|
const handleTabChange = (index) => {
|
|
12443
13383
|
setActiveTab(index);
|
|
12444
13384
|
onChange && onChange(index);
|
|
12445
13385
|
};
|
|
12446
|
-
(0,
|
|
13386
|
+
(0, import_react142.useEffect)(() => {
|
|
12447
13387
|
if (activeTab !== void 0 && activeTab !== thisActiveTab) {
|
|
12448
13388
|
setActiveTab(activeTab);
|
|
12449
13389
|
}
|
|
@@ -12452,7 +13392,7 @@ var Tabs = (0, import_react141.forwardRef)((props, ref) => {
|
|
|
12452
13392
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12453
13393
|
["--dds-tabs-width"]: width
|
|
12454
13394
|
};
|
|
12455
|
-
return /* @__PURE__ */ (0,
|
|
13395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
12456
13396
|
TabsContext.Provider,
|
|
12457
13397
|
{
|
|
12458
13398
|
value: {
|
|
@@ -12465,7 +13405,7 @@ var Tabs = (0, import_react141.forwardRef)((props, ref) => {
|
|
|
12465
13405
|
setHasTabFocus,
|
|
12466
13406
|
tabContentDirection
|
|
12467
13407
|
},
|
|
12468
|
-
children: /* @__PURE__ */ (0,
|
|
13408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
12469
13409
|
"div",
|
|
12470
13410
|
{
|
|
12471
13411
|
ref,
|
|
@@ -12485,17 +13425,17 @@ var Tabs = (0, import_react141.forwardRef)((props, ref) => {
|
|
|
12485
13425
|
Tabs.displayName = "Tabs";
|
|
12486
13426
|
|
|
12487
13427
|
// src/components/Tabs/Tab.tsx
|
|
12488
|
-
var
|
|
13428
|
+
var import_react144 = require("react");
|
|
12489
13429
|
|
|
12490
13430
|
// src/components/Tabs/TabWidthContext.tsx
|
|
12491
|
-
var
|
|
12492
|
-
var
|
|
12493
|
-
var TabContext = (0,
|
|
13431
|
+
var import_react143 = require("react");
|
|
13432
|
+
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
13433
|
+
var TabContext = (0, import_react143.createContext)(null);
|
|
12494
13434
|
function TabWidthContextProvider({
|
|
12495
13435
|
children,
|
|
12496
13436
|
onChangeWidths
|
|
12497
13437
|
}) {
|
|
12498
|
-
return /* @__PURE__ */ (0,
|
|
13438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
12499
13439
|
TabContext.Provider,
|
|
12500
13440
|
{
|
|
12501
13441
|
value: {
|
|
@@ -12519,16 +13459,16 @@ function TabWidthContextProvider({
|
|
|
12519
13459
|
);
|
|
12520
13460
|
}
|
|
12521
13461
|
function useSetTabWidth(index, width) {
|
|
12522
|
-
const context = (0,
|
|
12523
|
-
(0,
|
|
13462
|
+
const context = (0, import_react143.useContext)(TabContext);
|
|
13463
|
+
(0, import_react143.useLayoutEffect)(() => {
|
|
12524
13464
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
12525
13465
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
12526
13466
|
}, [index, width]);
|
|
12527
13467
|
}
|
|
12528
13468
|
|
|
12529
13469
|
// src/components/Tabs/Tab.tsx
|
|
12530
|
-
var
|
|
12531
|
-
var Tab = (0,
|
|
13470
|
+
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
13471
|
+
var Tab = (0, import_react144.forwardRef)((props, ref) => {
|
|
12532
13472
|
const {
|
|
12533
13473
|
active = false,
|
|
12534
13474
|
icon,
|
|
@@ -12545,16 +13485,16 @@ var Tab = (0, import_react143.forwardRef)((props, ref) => {
|
|
|
12545
13485
|
...rest
|
|
12546
13486
|
} = props;
|
|
12547
13487
|
useSetTabWidth(index, width);
|
|
12548
|
-
const itemRef = (0,
|
|
13488
|
+
const itemRef = (0, import_react144.useRef)(null);
|
|
12549
13489
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
12550
13490
|
const { tabContentDirection } = useTabsContext();
|
|
12551
|
-
(0,
|
|
13491
|
+
(0, import_react144.useEffect)(() => {
|
|
12552
13492
|
var _a;
|
|
12553
13493
|
if (focus) {
|
|
12554
13494
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
12555
13495
|
}
|
|
12556
13496
|
}, [focus]);
|
|
12557
|
-
const handleSelect = (0,
|
|
13497
|
+
const handleSelect = (0, import_react144.useCallback)(() => {
|
|
12558
13498
|
if (setFocus && index) {
|
|
12559
13499
|
setFocus(index);
|
|
12560
13500
|
}
|
|
@@ -12567,7 +13507,7 @@ var Tab = (0, import_react143.forwardRef)((props, ref) => {
|
|
|
12567
13507
|
handleSelect();
|
|
12568
13508
|
onKeyDown && onKeyDown(e);
|
|
12569
13509
|
};
|
|
12570
|
-
return /* @__PURE__ */ (0,
|
|
13510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)(
|
|
12571
13511
|
"button",
|
|
12572
13512
|
{
|
|
12573
13513
|
...getBaseHTMLProps(
|
|
@@ -12590,8 +13530,8 @@ var Tab = (0, import_react143.forwardRef)((props, ref) => {
|
|
|
12590
13530
|
onKeyDown: handleOnKeyDown,
|
|
12591
13531
|
tabIndex: focus ? 0 : -1,
|
|
12592
13532
|
children: [
|
|
12593
|
-
icon && /* @__PURE__ */ (0,
|
|
12594
|
-
/* @__PURE__ */ (0,
|
|
13533
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(Icon, { icon, iconSize: "inherit" }),
|
|
13534
|
+
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("span", { children })
|
|
12595
13535
|
]
|
|
12596
13536
|
}
|
|
12597
13537
|
);
|
|
@@ -12599,9 +13539,9 @@ var Tab = (0, import_react143.forwardRef)((props, ref) => {
|
|
|
12599
13539
|
Tab.displayName = "Tab";
|
|
12600
13540
|
|
|
12601
13541
|
// src/components/Tabs/TabList.tsx
|
|
12602
|
-
var
|
|
12603
|
-
var
|
|
12604
|
-
var TabList = (0,
|
|
13542
|
+
var import_react145 = require("react");
|
|
13543
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
13544
|
+
var TabList = (0, import_react145.forwardRef)(
|
|
12605
13545
|
({ children, id, style, onFocus, ...rest }, ref) => {
|
|
12606
13546
|
const {
|
|
12607
13547
|
activeTab,
|
|
@@ -12612,11 +13552,11 @@ var TabList = (0, import_react144.forwardRef)(
|
|
|
12612
13552
|
setHasTabFocus
|
|
12613
13553
|
} = useTabsContext();
|
|
12614
13554
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
12615
|
-
const childrenArray =
|
|
13555
|
+
const childrenArray = import_react145.Children.toArray(children).length;
|
|
12616
13556
|
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
12617
13557
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
12618
|
-
const tabListChildren =
|
|
12619
|
-
return (0,
|
|
13558
|
+
const tabListChildren = import_react145.Children.map(children, (child, index) => {
|
|
13559
|
+
return (0, import_react145.isValidElement)(child) && (0, import_react145.cloneElement)(child, {
|
|
12620
13560
|
id: `${tabsId}-tab-${index}`,
|
|
12621
13561
|
"aria-controls": `${tabsId}-panel-${index}`,
|
|
12622
13562
|
active: activeTab === index,
|
|
@@ -12626,7 +13566,7 @@ var TabList = (0, import_react144.forwardRef)(
|
|
|
12626
13566
|
onClick: () => handleTabChange(index)
|
|
12627
13567
|
});
|
|
12628
13568
|
});
|
|
12629
|
-
const [widths, setWidths] = (0,
|
|
13569
|
+
const [widths, setWidths] = (0, import_react145.useState)([]);
|
|
12630
13570
|
const handleOnFocus = (event) => {
|
|
12631
13571
|
setHasTabFocus(true);
|
|
12632
13572
|
onFocus && onFocus(event);
|
|
@@ -12644,7 +13584,7 @@ var TabList = (0, import_react144.forwardRef)(
|
|
|
12644
13584
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12645
13585
|
["--dds-tab-widths"]: widths.join(" ")
|
|
12646
13586
|
};
|
|
12647
|
-
return /* @__PURE__ */ (0,
|
|
13587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
12648
13588
|
"div",
|
|
12649
13589
|
{
|
|
12650
13590
|
...rest,
|
|
@@ -12670,11 +13610,11 @@ var TabList = (0, import_react144.forwardRef)(
|
|
|
12670
13610
|
TabList.displayName = "TabList";
|
|
12671
13611
|
|
|
12672
13612
|
// src/components/Tabs/TabPanel.tsx
|
|
12673
|
-
var
|
|
12674
|
-
var
|
|
12675
|
-
var TabPanel = (0,
|
|
13613
|
+
var import_react146 = require("react");
|
|
13614
|
+
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
13615
|
+
var TabPanel = (0, import_react146.forwardRef)(
|
|
12676
13616
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
12677
|
-
return /* @__PURE__ */ (0,
|
|
13617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
12678
13618
|
"div",
|
|
12679
13619
|
{
|
|
12680
13620
|
...getBaseHTMLProps(
|
|
@@ -12695,28 +13635,28 @@ var TabPanel = (0, import_react145.forwardRef)(
|
|
|
12695
13635
|
TabPanel.displayName = "TabPanel";
|
|
12696
13636
|
|
|
12697
13637
|
// src/components/Tabs/TabPanels.tsx
|
|
12698
|
-
var
|
|
12699
|
-
var
|
|
12700
|
-
var TabPanels = (0,
|
|
13638
|
+
var import_react147 = require("react");
|
|
13639
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
13640
|
+
var TabPanels = (0, import_react147.forwardRef)(
|
|
12701
13641
|
({ children, ...rest }, ref) => {
|
|
12702
13642
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
12703
13643
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
12704
|
-
const panelChildren =
|
|
13644
|
+
const panelChildren = import_react147.Children.map(children, (child, index) => {
|
|
12705
13645
|
const active = index === activeTab;
|
|
12706
|
-
return (0,
|
|
13646
|
+
return (0, import_react147.isValidElement)(child) && (0, import_react147.cloneElement)(child, {
|
|
12707
13647
|
id: `${tabsId}-panel-${index}`,
|
|
12708
13648
|
"aria-labelledby": `${tabsId}-tab-${index}`,
|
|
12709
13649
|
active,
|
|
12710
13650
|
"aria-expanded": active
|
|
12711
13651
|
});
|
|
12712
13652
|
});
|
|
12713
|
-
return /* @__PURE__ */ (0,
|
|
13653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("div", { ref: combinedRef, ...rest, children: panelChildren });
|
|
12714
13654
|
}
|
|
12715
13655
|
);
|
|
12716
13656
|
TabPanels.displayName = "TabPanels";
|
|
12717
13657
|
|
|
12718
13658
|
// src/components/Tag/Tag.tsx
|
|
12719
|
-
var
|
|
13659
|
+
var import_react148 = require("react");
|
|
12720
13660
|
|
|
12721
13661
|
// src/components/Tag/Tag.module.css
|
|
12722
13662
|
var Tag_default = {
|
|
@@ -12735,7 +13675,7 @@ var Tag_default = {
|
|
|
12735
13675
|
};
|
|
12736
13676
|
|
|
12737
13677
|
// src/components/Tag/Tag.tsx
|
|
12738
|
-
var
|
|
13678
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
12739
13679
|
var icons3 = {
|
|
12740
13680
|
info: InfoIcon,
|
|
12741
13681
|
danger: ErrorIcon,
|
|
@@ -12743,7 +13683,7 @@ var icons3 = {
|
|
|
12743
13683
|
success: CheckCircledIcon,
|
|
12744
13684
|
default: void 0
|
|
12745
13685
|
};
|
|
12746
|
-
var Tag = (0,
|
|
13686
|
+
var Tag = (0, import_react148.forwardRef)((props, ref) => {
|
|
12747
13687
|
const {
|
|
12748
13688
|
text,
|
|
12749
13689
|
purpose = "default",
|
|
@@ -12756,7 +13696,7 @@ var Tag = (0, import_react147.forwardRef)((props, ref) => {
|
|
|
12756
13696
|
...rest
|
|
12757
13697
|
} = props;
|
|
12758
13698
|
const icon = icons3[purpose];
|
|
12759
|
-
return /* @__PURE__ */ (0,
|
|
13699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
|
|
12760
13700
|
TextOverflowEllipsisWrapper,
|
|
12761
13701
|
{
|
|
12762
13702
|
...getBaseHTMLProps(
|
|
@@ -12773,8 +13713,8 @@ var Tag = (0, import_react147.forwardRef)((props, ref) => {
|
|
|
12773
13713
|
),
|
|
12774
13714
|
ref,
|
|
12775
13715
|
children: [
|
|
12776
|
-
withIcon && icon && /* @__PURE__ */ (0,
|
|
12777
|
-
/* @__PURE__ */ (0,
|
|
13716
|
+
withIcon && icon && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(Icon, { icon, iconSize: "small" }),
|
|
13717
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
12778
13718
|
]
|
|
12779
13719
|
}
|
|
12780
13720
|
);
|
|
@@ -12782,8 +13722,8 @@ var Tag = (0, import_react147.forwardRef)((props, ref) => {
|
|
|
12782
13722
|
Tag.displayName = "Tag";
|
|
12783
13723
|
|
|
12784
13724
|
// src/components/TextInput/TextInput.tsx
|
|
12785
|
-
var
|
|
12786
|
-
var
|
|
13725
|
+
var import_dds_design_tokens17 = require("@norges-domstoler/dds-design-tokens");
|
|
13726
|
+
var import_react149 = require("react");
|
|
12787
13727
|
|
|
12788
13728
|
// src/components/TextInput/TextInput.module.css
|
|
12789
13729
|
var TextInput_default = {
|
|
@@ -12810,8 +13750,8 @@ var TextInput_default = {
|
|
|
12810
13750
|
};
|
|
12811
13751
|
|
|
12812
13752
|
// src/components/TextInput/TextInput.tsx
|
|
12813
|
-
var
|
|
12814
|
-
var TextInput = (0,
|
|
13753
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
13754
|
+
var TextInput = (0, import_react149.forwardRef)(
|
|
12815
13755
|
({
|
|
12816
13756
|
label,
|
|
12817
13757
|
disabled,
|
|
@@ -12837,14 +13777,14 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12837
13777
|
suffix,
|
|
12838
13778
|
...rest
|
|
12839
13779
|
}, ref) => {
|
|
12840
|
-
const [text, setText] = (0,
|
|
13780
|
+
const [text, setText] = (0, import_react149.useState)(
|
|
12841
13781
|
getDefaultText(value, defaultValue)
|
|
12842
13782
|
);
|
|
12843
|
-
const prefixRef = (0,
|
|
12844
|
-
const suffixRef = (0,
|
|
12845
|
-
const [prefixLength, setPrefixLength] = (0,
|
|
12846
|
-
const [suffixLength, setSuffixLength] = (0,
|
|
12847
|
-
(0,
|
|
13783
|
+
const prefixRef = (0, import_react149.useRef)(null);
|
|
13784
|
+
const suffixRef = (0, import_react149.useRef)(null);
|
|
13785
|
+
const [prefixLength, setPrefixLength] = (0, import_react149.useState)(0);
|
|
13786
|
+
const [suffixLength, setSuffixLength] = (0, import_react149.useState)(0);
|
|
13787
|
+
(0, import_react149.useLayoutEffect)(() => {
|
|
12848
13788
|
if (prefixRef.current) {
|
|
12849
13789
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
12850
13790
|
}
|
|
@@ -12858,7 +13798,7 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12858
13798
|
onChange(event);
|
|
12859
13799
|
}
|
|
12860
13800
|
};
|
|
12861
|
-
const generatedId = (0,
|
|
13801
|
+
const generatedId = (0, import_react149.useId)();
|
|
12862
13802
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
12863
13803
|
const hasErrorMessage = !!errorMessage;
|
|
12864
13804
|
const hasTip = !!tip;
|
|
@@ -12896,25 +13836,28 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12896
13836
|
...rest
|
|
12897
13837
|
};
|
|
12898
13838
|
const showRequiredStyling = !!(required || ariaRequired);
|
|
12899
|
-
const preffixPaddingInlineStart = readOnly && prefixLength ? prefixLength + "px" : prefixLength ?
|
|
12900
|
-
const suffixPaddingInlineEnd = readOnly && suffixLength ? suffixLength + "px" : suffixLength ?
|
|
13839
|
+
const preffixPaddingInlineStart = readOnly && prefixLength ? prefixLength + "px" : prefixLength ? import_dds_design_tokens17.ddsTokens.ddsSpacingX1NumberPx + prefixLength + "px" : void 0;
|
|
13840
|
+
const suffixPaddingInlineEnd = readOnly && suffixLength ? suffixLength + "px" : suffixLength ? import_dds_design_tokens17.ddsTokens.ddsSpacingX1NumberPx + suffixLength + "px" : void 0;
|
|
12901
13841
|
let extendedInput = null;
|
|
12902
13842
|
if (hasIcon) {
|
|
12903
|
-
extendedInput = /* @__PURE__ */ (0,
|
|
13843
|
+
extendedInput = /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
12904
13844
|
"div",
|
|
12905
13845
|
{
|
|
12906
13846
|
className: cn(TextInput_default["input-width"], Input_default["input-group"]),
|
|
12907
13847
|
style: styleVariables,
|
|
12908
13848
|
children: [
|
|
12909
|
-
/* @__PURE__ */ (0,
|
|
13849
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
12910
13850
|
Icon,
|
|
12911
13851
|
{
|
|
12912
13852
|
icon,
|
|
12913
13853
|
iconSize: getFormInputIconSize(componentSize),
|
|
12914
|
-
className: cn(
|
|
13854
|
+
className: cn(
|
|
13855
|
+
Input_default["input-group__absolute-element"],
|
|
13856
|
+
TextInput_default[`icon--${componentSize}`]
|
|
13857
|
+
)
|
|
12915
13858
|
}
|
|
12916
13859
|
),
|
|
12917
|
-
/* @__PURE__ */ (0,
|
|
13860
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
12918
13861
|
StatefulInput,
|
|
12919
13862
|
{
|
|
12920
13863
|
ref,
|
|
@@ -12933,13 +13876,13 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12933
13876
|
}
|
|
12934
13877
|
);
|
|
12935
13878
|
} else if (hasAffix) {
|
|
12936
|
-
extendedInput = /* @__PURE__ */ (0,
|
|
13879
|
+
extendedInput = /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
12937
13880
|
"div",
|
|
12938
13881
|
{
|
|
12939
13882
|
className: cn(TextInput_default["affix-container"], TextInput_default["input-width"]),
|
|
12940
13883
|
style: styleVariables,
|
|
12941
13884
|
children: [
|
|
12942
|
-
prefix3 && /* @__PURE__ */ (0,
|
|
13885
|
+
prefix3 && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
12943
13886
|
"span",
|
|
12944
13887
|
{
|
|
12945
13888
|
ref: prefixRef,
|
|
@@ -12952,7 +13895,7 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12952
13895
|
children: prefix3
|
|
12953
13896
|
}
|
|
12954
13897
|
),
|
|
12955
|
-
/* @__PURE__ */ (0,
|
|
13898
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
12956
13899
|
StatefulInput,
|
|
12957
13900
|
{
|
|
12958
13901
|
ref,
|
|
@@ -12967,7 +13910,7 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12967
13910
|
className: TextInput_default["input--extended"]
|
|
12968
13911
|
}
|
|
12969
13912
|
),
|
|
12970
|
-
suffix && /* @__PURE__ */ (0,
|
|
13913
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
12971
13914
|
"span",
|
|
12972
13915
|
{
|
|
12973
13916
|
ref: suffixRef,
|
|
@@ -12984,7 +13927,7 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12984
13927
|
}
|
|
12985
13928
|
);
|
|
12986
13929
|
}
|
|
12987
|
-
return /* @__PURE__ */ (0,
|
|
13930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
12988
13931
|
"div",
|
|
12989
13932
|
{
|
|
12990
13933
|
className: cn(
|
|
@@ -12996,7 +13939,7 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
12996
13939
|
),
|
|
12997
13940
|
style,
|
|
12998
13941
|
children: [
|
|
12999
|
-
hasLabel && /* @__PURE__ */ (0,
|
|
13942
|
+
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
13000
13943
|
Label,
|
|
13001
13944
|
{
|
|
13002
13945
|
htmlFor: uniqueId,
|
|
@@ -13006,7 +13949,7 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
13006
13949
|
children: label
|
|
13007
13950
|
}
|
|
13008
13951
|
),
|
|
13009
|
-
extendedInput ? extendedInput : /* @__PURE__ */ (0,
|
|
13952
|
+
extendedInput ? extendedInput : /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
13010
13953
|
StatefulInput,
|
|
13011
13954
|
{
|
|
13012
13955
|
ref,
|
|
@@ -13018,7 +13961,7 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
13018
13961
|
className: TextInput_default["input-width"]
|
|
13019
13962
|
}
|
|
13020
13963
|
),
|
|
13021
|
-
hasMessage && /* @__PURE__ */ (0,
|
|
13964
|
+
hasMessage && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: TextInput_default["message-container"], children: [
|
|
13022
13965
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
13023
13966
|
renderCharCounter(
|
|
13024
13967
|
characterCounterId,
|
|
@@ -13035,14 +13978,14 @@ var TextInput = (0, import_react148.forwardRef)(
|
|
|
13035
13978
|
TextInput.displayName = "TextInput";
|
|
13036
13979
|
|
|
13037
13980
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
13038
|
-
var
|
|
13981
|
+
var import_react151 = require("react");
|
|
13039
13982
|
|
|
13040
13983
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
13041
|
-
var
|
|
13042
|
-
var ToggleBarContext = (0,
|
|
13984
|
+
var import_react150 = require("react");
|
|
13985
|
+
var ToggleBarContext = (0, import_react150.createContext)({
|
|
13043
13986
|
size: "medium"
|
|
13044
13987
|
});
|
|
13045
|
-
var useToggleBarContext = () => (0,
|
|
13988
|
+
var useToggleBarContext = () => (0, import_react150.useContext)(ToggleBarContext);
|
|
13046
13989
|
|
|
13047
13990
|
// src/components/ToggleBar/ToggleBar.module.css
|
|
13048
13991
|
var ToggleBar_default = {
|
|
@@ -13061,7 +14004,7 @@ var ToggleBar_default = {
|
|
|
13061
14004
|
};
|
|
13062
14005
|
|
|
13063
14006
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
13064
|
-
var
|
|
14007
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
13065
14008
|
var ToggleBar = (props) => {
|
|
13066
14009
|
const {
|
|
13067
14010
|
children,
|
|
@@ -13076,15 +14019,15 @@ var ToggleBar = (props) => {
|
|
|
13076
14019
|
id,
|
|
13077
14020
|
...rest
|
|
13078
14021
|
} = props;
|
|
13079
|
-
const generatedId = (0,
|
|
14022
|
+
const generatedId = (0, import_react151.useId)();
|
|
13080
14023
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
13081
|
-
const [groupValue, setGroupValue] = (0,
|
|
14024
|
+
const [groupValue, setGroupValue] = (0, import_react151.useState)(value);
|
|
13082
14025
|
const handleChange = combineHandlers(
|
|
13083
14026
|
(e) => setGroupValue(e.target.value),
|
|
13084
14027
|
(e) => onChange && onChange(e, e.target.value)
|
|
13085
14028
|
);
|
|
13086
14029
|
const labelId = label && `${uniqueId}-label`;
|
|
13087
|
-
return /* @__PURE__ */ (0,
|
|
14030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
13088
14031
|
ToggleBarContext.Provider,
|
|
13089
14032
|
{
|
|
13090
14033
|
value: {
|
|
@@ -13093,7 +14036,7 @@ var ToggleBar = (props) => {
|
|
|
13093
14036
|
name,
|
|
13094
14037
|
value: groupValue
|
|
13095
14038
|
},
|
|
13096
|
-
children: /* @__PURE__ */ (0,
|
|
14039
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)(
|
|
13097
14040
|
"div",
|
|
13098
14041
|
{
|
|
13099
14042
|
...getBaseHTMLProps(
|
|
@@ -13106,8 +14049,8 @@ var ToggleBar = (props) => {
|
|
|
13106
14049
|
role: "radiogroup",
|
|
13107
14050
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
13108
14051
|
children: [
|
|
13109
|
-
label && /* @__PURE__ */ (0,
|
|
13110
|
-
/* @__PURE__ */ (0,
|
|
14052
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(Label, { id: labelId, children: label }),
|
|
14053
|
+
/* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: ToggleBar_default.bar, children })
|
|
13111
14054
|
]
|
|
13112
14055
|
}
|
|
13113
14056
|
)
|
|
@@ -13117,8 +14060,8 @@ var ToggleBar = (props) => {
|
|
|
13117
14060
|
ToggleBar.displayName = "ToggleBar";
|
|
13118
14061
|
|
|
13119
14062
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
13120
|
-
var
|
|
13121
|
-
var
|
|
14063
|
+
var import_react152 = require("react");
|
|
14064
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
13122
14065
|
var typographyTypes4 = {
|
|
13123
14066
|
large: "bodySans04",
|
|
13124
14067
|
medium: "bodySans02",
|
|
@@ -13135,7 +14078,7 @@ var calculateChecked = (value, group, checked) => {
|
|
|
13135
14078
|
}
|
|
13136
14079
|
return !!value;
|
|
13137
14080
|
};
|
|
13138
|
-
var ToggleRadio = (0,
|
|
14081
|
+
var ToggleRadio = (0, import_react152.forwardRef)(
|
|
13139
14082
|
(props, ref) => {
|
|
13140
14083
|
const {
|
|
13141
14084
|
value,
|
|
@@ -13151,7 +14094,7 @@ var ToggleRadio = (0, import_react151.forwardRef)(
|
|
|
13151
14094
|
id,
|
|
13152
14095
|
...rest
|
|
13153
14096
|
} = props;
|
|
13154
|
-
const generatedId = (0,
|
|
14097
|
+
const generatedId = (0, import_react152.useId)();
|
|
13155
14098
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
13156
14099
|
const group = useToggleBarContext();
|
|
13157
14100
|
const handleChange = (event) => {
|
|
@@ -13159,8 +14102,8 @@ var ToggleRadio = (0, import_react151.forwardRef)(
|
|
|
13159
14102
|
(group == null ? void 0 : group.onChange) && group.onChange(event);
|
|
13160
14103
|
};
|
|
13161
14104
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
13162
|
-
return /* @__PURE__ */ (0,
|
|
13163
|
-
/* @__PURE__ */ (0,
|
|
14105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
14106
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
13164
14107
|
"input",
|
|
13165
14108
|
{
|
|
13166
14109
|
...getBaseHTMLProps(
|
|
@@ -13183,7 +14126,7 @@ var ToggleRadio = (0, import_react151.forwardRef)(
|
|
|
13183
14126
|
"aria-labelledby": ariaLabelledBy
|
|
13184
14127
|
}
|
|
13185
14128
|
),
|
|
13186
|
-
/* @__PURE__ */ (0,
|
|
14129
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
|
|
13187
14130
|
Typography,
|
|
13188
14131
|
{
|
|
13189
14132
|
as: "span",
|
|
@@ -13194,8 +14137,8 @@ var ToggleRadio = (0, import_react151.forwardRef)(
|
|
|
13194
14137
|
focus_default["focus-styled-sibling"]
|
|
13195
14138
|
),
|
|
13196
14139
|
children: [
|
|
13197
|
-
icon && /* @__PURE__ */ (0,
|
|
13198
|
-
label && /* @__PURE__ */ (0,
|
|
14140
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(Icon, { icon, iconSize: "inherit" }),
|
|
14141
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { children: label })
|
|
13199
14142
|
]
|
|
13200
14143
|
}
|
|
13201
14144
|
)
|
|
@@ -13205,7 +14148,7 @@ var ToggleRadio = (0, import_react151.forwardRef)(
|
|
|
13205
14148
|
ToggleRadio.displayName = "ToggleRadio";
|
|
13206
14149
|
|
|
13207
14150
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
13208
|
-
var
|
|
14151
|
+
var import_react153 = require("react");
|
|
13209
14152
|
|
|
13210
14153
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
13211
14154
|
var ToggleButton_default = {
|
|
@@ -13219,14 +14162,14 @@ var ToggleButton_default = {
|
|
|
13219
14162
|
};
|
|
13220
14163
|
|
|
13221
14164
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
13222
|
-
var
|
|
13223
|
-
var ToggleButton = (0,
|
|
14165
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
14166
|
+
var ToggleButton = (0, import_react153.forwardRef)(
|
|
13224
14167
|
({ id, label, icon, className, htmlProps, ...rest }, ref) => {
|
|
13225
|
-
const generatedId = (0,
|
|
14168
|
+
const generatedId = (0, import_react153.useId)();
|
|
13226
14169
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
13227
14170
|
const hasIcon = !!icon;
|
|
13228
|
-
return /* @__PURE__ */ (0,
|
|
13229
|
-
/* @__PURE__ */ (0,
|
|
14171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("label", { htmlFor: uniqueId, className: ToggleButton_default.container, children: [
|
|
14172
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
13230
14173
|
"input",
|
|
13231
14174
|
{
|
|
13232
14175
|
...getBaseHTMLProps(
|
|
@@ -13243,7 +14186,7 @@ var ToggleButton = (0, import_react152.forwardRef)(
|
|
|
13243
14186
|
type: "checkbox"
|
|
13244
14187
|
}
|
|
13245
14188
|
),
|
|
13246
|
-
/* @__PURE__ */ (0,
|
|
14189
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
|
|
13247
14190
|
"span",
|
|
13248
14191
|
{
|
|
13249
14192
|
className: cn(
|
|
@@ -13253,7 +14196,7 @@ var ToggleButton = (0, import_react152.forwardRef)(
|
|
|
13253
14196
|
focus_default["focus-styled-sibling"]
|
|
13254
14197
|
),
|
|
13255
14198
|
children: [
|
|
13256
|
-
hasIcon && /* @__PURE__ */ (0,
|
|
14199
|
+
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(Icon, { icon, iconSize: "inherit" }),
|
|
13257
14200
|
" ",
|
|
13258
14201
|
label
|
|
13259
14202
|
]
|
|
@@ -13265,8 +14208,8 @@ var ToggleButton = (0, import_react152.forwardRef)(
|
|
|
13265
14208
|
ToggleButton.displayName = "ToggleButton";
|
|
13266
14209
|
|
|
13267
14210
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
13268
|
-
var
|
|
13269
|
-
var
|
|
14211
|
+
var import_react154 = require("react");
|
|
14212
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
13270
14213
|
var ToggleButtonGroup = (props) => {
|
|
13271
14214
|
const {
|
|
13272
14215
|
children,
|
|
@@ -13278,9 +14221,9 @@ var ToggleButtonGroup = (props) => {
|
|
|
13278
14221
|
htmlProps,
|
|
13279
14222
|
...rest
|
|
13280
14223
|
} = props;
|
|
13281
|
-
const generatedId = (0,
|
|
14224
|
+
const generatedId = (0, import_react154.useId)();
|
|
13282
14225
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
13283
|
-
return /* @__PURE__ */ (0,
|
|
14226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(
|
|
13284
14227
|
"div",
|
|
13285
14228
|
{
|
|
13286
14229
|
...getBaseHTMLProps(
|
|
@@ -13292,7 +14235,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
13292
14235
|
role: "group",
|
|
13293
14236
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
13294
14237
|
children: [
|
|
13295
|
-
!!label && /* @__PURE__ */ (0,
|
|
14238
|
+
!!label && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
13296
14239
|
Typography,
|
|
13297
14240
|
{
|
|
13298
14241
|
as: "span",
|
|
@@ -13301,7 +14244,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
13301
14244
|
children: label
|
|
13302
14245
|
}
|
|
13303
14246
|
),
|
|
13304
|
-
/* @__PURE__ */ (0,
|
|
14247
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)("div", { className: cn(ToggleButton_default.group, ToggleButton_default[`group--${direction}`]), children })
|
|
13305
14248
|
]
|
|
13306
14249
|
}
|
|
13307
14250
|
);
|
|
@@ -13512,6 +14455,7 @@ ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
|
13512
14455
|
PersonAddIcon,
|
|
13513
14456
|
PersonIcon,
|
|
13514
14457
|
PersonShieldedIcon,
|
|
14458
|
+
PhoneInput,
|
|
13515
14459
|
PinIcon,
|
|
13516
14460
|
PlusCircledIcon,
|
|
13517
14461
|
PlusIcon,
|
|
@@ -13600,6 +14544,7 @@ ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
|
13600
14544
|
ZoomOutIcon,
|
|
13601
14545
|
calendarDateToNativeDate,
|
|
13602
14546
|
cn,
|
|
14547
|
+
countryOptions,
|
|
13603
14548
|
createSelectOptions,
|
|
13604
14549
|
dangerInputfield,
|
|
13605
14550
|
dateValueToNativeDate,
|