@equinor/eds-core-react 0.21.0 → 0.23.0-dev.20221003
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/eds-core-react.cjs.js +233 -174
- package/dist/esm/components/Accordion/Accordion.js +1 -1
- package/dist/esm/components/Accordion/AccordionHeader.js +1 -1
- package/dist/esm/components/Accordion/AccordionItem.js +2 -2
- package/dist/esm/components/Autocomplete/Autocomplete.js +10 -9
- package/dist/esm/components/Autocomplete/Option.js +1 -1
- package/dist/esm/components/Banner/Banner.js +3 -3
- package/dist/esm/components/Banner/BannerMessage.js +1 -1
- package/dist/esm/components/Breadcrumbs/Breadcrumb.js +2 -2
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/esm/components/Button/Button.js +1 -1
- package/dist/esm/components/Button/ToggleButton/ToggleButton.js +55 -0
- package/dist/esm/components/Button/index.js +3 -0
- package/dist/esm/components/Button/tokens/button.js +10 -10
- package/dist/esm/components/Button/tokens/contained.js +1 -1
- package/dist/esm/components/Button/tokens/contained_icon.js +3 -3
- package/dist/esm/components/Button/tokens/ghost.js +1 -1
- package/dist/esm/components/Button/tokens/icon.js +4 -4
- package/dist/esm/components/Button/tokens/outlined.js +2 -2
- package/dist/esm/components/Card/Card.js +1 -1
- package/dist/esm/components/Card/CardActions.js +1 -1
- package/dist/esm/components/Checkbox/Input.js +3 -3
- package/dist/esm/components/Dialog/Dialog.js +29 -22
- package/dist/esm/components/Dialog/DialogContent.js +1 -1
- package/dist/esm/components/Dialog/DialogHeader.js +1 -1
- package/dist/esm/components/Divider/Divider.js +15 -7
- package/dist/esm/components/Divider/Divider.tokens.js +5 -16
- package/dist/esm/components/EdsProvider/eds.context.js +5 -3
- package/dist/esm/components/Icon/Icon.js +7 -7
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/esm/components/Menu/Menu.context.js +1 -1
- package/dist/esm/components/Menu/Menu.js +6 -6
- package/dist/esm/components/Menu/MenuSection.js +1 -1
- package/dist/esm/components/Pagination/Pagination.js +12 -7
- package/dist/esm/components/Popover/Popover.js +10 -10
- package/dist/esm/components/Popover/PopoverActions.js +1 -1
- package/dist/esm/components/Popover/PopoverContent.js +1 -1
- package/dist/esm/components/Popover/PopoverHeader.js +1 -1
- package/dist/esm/components/Progress/Circular/CircularProgress.js +2 -2
- package/dist/esm/components/Progress/Linear/LinearProgress.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Scrim/Scrim.js +6 -11
- package/dist/esm/components/Scrim/Scrim.tokens.js +0 -2
- package/dist/esm/components/Search/Search.js +2 -2
- package/dist/esm/components/Select/MultiSelect/MultiSelect.js +4 -4
- package/dist/esm/components/Select/NativeSelect/NativeSelect.js +2 -2
- package/dist/esm/components/Select/SingleSelect/SingleSelect.js +3 -3
- package/dist/esm/components/Select/commonStyles.js +1 -1
- package/dist/esm/components/SideSheet/SideSheet.js +1 -1
- package/dist/esm/components/Slider/Slider.js +4 -4
- package/dist/esm/components/Snackbar/Snackbar.js +1 -1
- package/dist/esm/components/Switch/Switch.js +1 -1
- package/dist/esm/components/Switch/Switch.tokens.js +4 -4
- package/dist/esm/components/Table/Cell.js +2 -2
- package/dist/esm/components/Table/DataCell/DataCell.js +1 -1
- package/dist/esm/components/Table/DataCell/DataCell.tokens.js +5 -5
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +1 -1
- package/dist/esm/components/Table/HeaderCell/HeaderCell.tokens.js +5 -5
- package/dist/esm/components/Table/index.js +1 -1
- package/dist/esm/components/TableOfContents/TableOfContents.js +2 -2
- package/dist/esm/components/Tabs/TabList.js +2 -2
- package/dist/esm/components/Tabs/TabPanels.js +2 -2
- package/dist/esm/components/Tabs/Tabs.js +1 -1
- package/dist/esm/components/Tabs/Tabs.tokens.js +1 -1
- package/dist/esm/components/TextField/Field.js +5 -5
- package/dist/esm/components/TextField/HelperText/HelperText.js +2 -2
- package/dist/esm/components/TextField/TextField.context.js +1 -1
- package/dist/esm/components/TextField/TextField.js +3 -3
- package/dist/esm/components/Textarea/Textarea.js +3 -3
- package/dist/esm/components/Tooltip/Tooltip.js +4 -4
- package/dist/esm/components/TopBar/TopBar.js +7 -4
- package/dist/esm/components/Typography/Typography.js +3 -3
- package/dist/esm/index.js +14 -14
- package/dist/esm/node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js +3 -1
- package/dist/types/components/Button/ToggleButton/ToggleButton.d.ts +18 -0
- package/dist/types/components/Button/ToggleButton/index.d.ts +1 -0
- package/dist/types/components/Button/index.d.ts +3 -1
- package/dist/types/components/Divider/Divider.d.ts +4 -0
- package/dist/types/components/Divider/Divider.tokens.d.ts +0 -1
- package/dist/types/components/EdsProvider/eds.context.d.ts +1 -0
- package/dist/types/components/Select/commonStyles.d.ts +5 -0
- package/dist/types/components/TopBar/TopBar.d.ts +4 -0
- package/package.json +41 -43
|
@@ -8,8 +8,8 @@ var edsTokens = require('@equinor/eds-tokens');
|
|
|
8
8
|
var edsUtils = require('@equinor/eds-utils');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
var edsIcons = require('@equinor/eds-icons');
|
|
11
|
-
var ReactDom = require('react-dom');
|
|
12
11
|
var reactDomInteractions = require('@floating-ui/react-dom-interactions');
|
|
12
|
+
var ReactDom = require('react-dom');
|
|
13
13
|
var downshift = require('downshift');
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -82,29 +82,29 @@ const {
|
|
|
82
82
|
} = edsTokens.tokens;
|
|
83
83
|
const button = {
|
|
84
84
|
background: 'transparent',
|
|
85
|
-
height:
|
|
85
|
+
height: `var(--eds_button__height, ${buttonHeight})`,
|
|
86
86
|
typography: { ...buttonTypography,
|
|
87
87
|
textAlign: 'center',
|
|
88
|
-
fontSize:
|
|
88
|
+
fontSize: `var(--eds_button__font_size, ${buttonTypography.fontSize})`
|
|
89
89
|
},
|
|
90
90
|
border: {
|
|
91
91
|
type: 'border',
|
|
92
|
-
width:
|
|
92
|
+
width: `var(--eds_button__border_width, 1px)`,
|
|
93
93
|
color: 'transparent',
|
|
94
|
-
radius:
|
|
94
|
+
radius: `var(--eds_button__radius, ${buttonBorderRadius$2})`,
|
|
95
95
|
style: 'solid'
|
|
96
96
|
},
|
|
97
97
|
spacings: {
|
|
98
98
|
top: 'var(--eds_button__padding_y, 0)',
|
|
99
99
|
bottom: 'var(--eds_button__padding_y, 0)',
|
|
100
|
-
left:
|
|
101
|
-
right:
|
|
100
|
+
left: `var(--eds_button__padding_x, ${medium$6})`,
|
|
101
|
+
right: `var(--eds_button__padding_x, ${medium$6})`
|
|
102
102
|
},
|
|
103
103
|
clickbound: {
|
|
104
104
|
height: clicboundHeight$2,
|
|
105
105
|
width: '100%',
|
|
106
106
|
offset: {
|
|
107
|
-
top:
|
|
107
|
+
top: `${(parseInt(clicboundHeight$2) - parseInt(buttonHeight)) / 2 + 1}px`,
|
|
108
108
|
left: '0'
|
|
109
109
|
}
|
|
110
110
|
},
|
|
@@ -120,7 +120,7 @@ const button = {
|
|
|
120
120
|
type: 'border',
|
|
121
121
|
width: '1px',
|
|
122
122
|
color: 'transparent',
|
|
123
|
-
radius:
|
|
123
|
+
radius: `var(--eds_button__radius, ${buttonBorderRadius$2})`,
|
|
124
124
|
style: 'solid'
|
|
125
125
|
}
|
|
126
126
|
},
|
|
@@ -149,7 +149,7 @@ const button = {
|
|
|
149
149
|
},
|
|
150
150
|
modes: {
|
|
151
151
|
compact: {
|
|
152
|
-
height:
|
|
152
|
+
height: `var(--eds_button__height_compact, ${compactButtonHeight})`,
|
|
153
153
|
spacings: {
|
|
154
154
|
top: 'var(--eds_button__padding_y_compact, 0)',
|
|
155
155
|
bottom: 'var(--eds_button__padding_y_compact, 0)'
|
|
@@ -158,7 +158,7 @@ const button = {
|
|
|
158
158
|
height: compactClickboundHeight$2,
|
|
159
159
|
width: '100%',
|
|
160
160
|
offset: {
|
|
161
|
-
top:
|
|
161
|
+
top: `${(parseInt(compactClickboundHeight$2) - parseInt(compactButtonHeight)) / 2 + 1}px`,
|
|
162
162
|
left: '0'
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -386,6 +386,8 @@ var mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {
|
|
|
386
386
|
}, lObj, rObj);
|
|
387
387
|
});
|
|
388
388
|
|
|
389
|
+
var mergeDeepRight$1 = mergeDeepRight;
|
|
390
|
+
|
|
389
391
|
const {
|
|
390
392
|
colors: {
|
|
391
393
|
text: {
|
|
@@ -420,7 +422,7 @@ const {
|
|
|
420
422
|
}
|
|
421
423
|
}
|
|
422
424
|
} = edsTokens.tokens;
|
|
423
|
-
const primary$a = mergeDeepRight(button, {
|
|
425
|
+
const primary$a = mergeDeepRight$1(button, {
|
|
424
426
|
background: primaryColor$8,
|
|
425
427
|
typography: {
|
|
426
428
|
color: primaryWhite
|
|
@@ -430,7 +432,7 @@ const primary$a = mergeDeepRight(button, {
|
|
|
430
432
|
style: 'solid',
|
|
431
433
|
width: '1px',
|
|
432
434
|
color: primaryColor$8,
|
|
433
|
-
radius:
|
|
435
|
+
radius: `var(--eds_button__radius, ${buttonBorderRadius$1})`
|
|
434
436
|
},
|
|
435
437
|
states: {
|
|
436
438
|
hover: {
|
|
@@ -438,7 +440,7 @@ const primary$a = mergeDeepRight(button, {
|
|
|
438
440
|
}
|
|
439
441
|
}
|
|
440
442
|
});
|
|
441
|
-
const secondary$5 = mergeDeepRight(primary$a, {
|
|
443
|
+
const secondary$5 = mergeDeepRight$1(primary$a, {
|
|
442
444
|
background: secondaryColor$3,
|
|
443
445
|
border: {
|
|
444
446
|
color: secondaryColor$3
|
|
@@ -452,7 +454,7 @@ const secondary$5 = mergeDeepRight(primary$a, {
|
|
|
452
454
|
}
|
|
453
455
|
}
|
|
454
456
|
});
|
|
455
|
-
const danger$6 = mergeDeepRight(primary$a, {
|
|
457
|
+
const danger$6 = mergeDeepRight$1(primary$a, {
|
|
456
458
|
background: dangerColor$3,
|
|
457
459
|
border: {
|
|
458
460
|
color: dangerColor$3
|
|
@@ -505,7 +507,7 @@ const {
|
|
|
505
507
|
}
|
|
506
508
|
}
|
|
507
509
|
} = edsTokens.tokens;
|
|
508
|
-
const primary$9 = mergeDeepRight(button, {
|
|
510
|
+
const primary$9 = mergeDeepRight$1(button, {
|
|
509
511
|
typography: {
|
|
510
512
|
color: primaryColor$7
|
|
511
513
|
},
|
|
@@ -514,7 +516,7 @@ const primary$9 = mergeDeepRight(button, {
|
|
|
514
516
|
style: 'solid',
|
|
515
517
|
width: '1px',
|
|
516
518
|
color: primaryColor$7,
|
|
517
|
-
radius:
|
|
519
|
+
radius: `var(--eds_button__radius, ${buttonBorderRadius})`
|
|
518
520
|
},
|
|
519
521
|
states: {
|
|
520
522
|
hover: {
|
|
@@ -534,7 +536,7 @@ const primary$9 = mergeDeepRight(button, {
|
|
|
534
536
|
}
|
|
535
537
|
}
|
|
536
538
|
});
|
|
537
|
-
const secondary$4 = mergeDeepRight(primary$9, {
|
|
539
|
+
const secondary$4 = mergeDeepRight$1(primary$9, {
|
|
538
540
|
typography: {
|
|
539
541
|
color: secondaryColor$2
|
|
540
542
|
},
|
|
@@ -553,7 +555,7 @@ const secondary$4 = mergeDeepRight(primary$9, {
|
|
|
553
555
|
}
|
|
554
556
|
}
|
|
555
557
|
});
|
|
556
|
-
const danger$5 = mergeDeepRight(primary$9, {
|
|
558
|
+
const danger$5 = mergeDeepRight$1(primary$9, {
|
|
557
559
|
typography: {
|
|
558
560
|
color: dangerColor$2
|
|
559
561
|
},
|
|
@@ -606,7 +608,7 @@ const {
|
|
|
606
608
|
}
|
|
607
609
|
}
|
|
608
610
|
} = edsTokens.tokens;
|
|
609
|
-
const primary$8 = mergeDeepRight(button, {
|
|
611
|
+
const primary$8 = mergeDeepRight$1(button, {
|
|
610
612
|
typography: {
|
|
611
613
|
color: primaryColor$6
|
|
612
614
|
},
|
|
@@ -625,7 +627,7 @@ const primary$8 = mergeDeepRight(button, {
|
|
|
625
627
|
}
|
|
626
628
|
}
|
|
627
629
|
});
|
|
628
|
-
const secondary$3 = mergeDeepRight(primary$8, {
|
|
630
|
+
const secondary$3 = mergeDeepRight$1(primary$8, {
|
|
629
631
|
typography: {
|
|
630
632
|
color: secondaryColor$1
|
|
631
633
|
},
|
|
@@ -638,7 +640,7 @@ const secondary$3 = mergeDeepRight(primary$8, {
|
|
|
638
640
|
}
|
|
639
641
|
}
|
|
640
642
|
});
|
|
641
|
-
const danger$4 = mergeDeepRight(primary$8, {
|
|
643
|
+
const danger$4 = mergeDeepRight$1(primary$8, {
|
|
642
644
|
typography: {
|
|
643
645
|
color: dangerColor$1
|
|
644
646
|
},
|
|
@@ -692,7 +694,7 @@ const {
|
|
|
692
694
|
}
|
|
693
695
|
}
|
|
694
696
|
} = edsTokens.tokens;
|
|
695
|
-
const primary$7 = mergeDeepRight(button, {
|
|
697
|
+
const primary$7 = mergeDeepRight$1(button, {
|
|
696
698
|
height: shape$4.icon_button.minHeight,
|
|
697
699
|
width: shape$4.icon_button.minWidth,
|
|
698
700
|
typography: {
|
|
@@ -711,7 +713,7 @@ const primary$7 = mergeDeepRight(button, {
|
|
|
711
713
|
width: clicboundHeight$1,
|
|
712
714
|
offset: {
|
|
713
715
|
top: '0',
|
|
714
|
-
left:
|
|
716
|
+
left: `${(parseInt(clicboundHeight$1) - parseInt(shape$4.icon_button.minWidth)) / 2}px`
|
|
715
717
|
}
|
|
716
718
|
},
|
|
717
719
|
states: {
|
|
@@ -730,7 +732,7 @@ const primary$7 = mergeDeepRight(button, {
|
|
|
730
732
|
},
|
|
731
733
|
focus: {
|
|
732
734
|
outline: {
|
|
733
|
-
offset:
|
|
735
|
+
offset: `-${parseInt(focusOutlineWidth$8)}px`
|
|
734
736
|
}
|
|
735
737
|
}
|
|
736
738
|
},
|
|
@@ -742,13 +744,13 @@ const primary$7 = mergeDeepRight(button, {
|
|
|
742
744
|
width: compactClickboundHeight$1,
|
|
743
745
|
offset: {
|
|
744
746
|
top: '0',
|
|
745
|
-
left:
|
|
747
|
+
left: `${(parseInt(compactClickboundHeight$1) - parseInt(shape$4._modes.compact.icon_button.minWidth)) / 2}px`
|
|
746
748
|
}
|
|
747
749
|
}
|
|
748
750
|
}
|
|
749
751
|
}
|
|
750
752
|
});
|
|
751
|
-
const secondary$2 = mergeDeepRight(primary$7, {
|
|
753
|
+
const secondary$2 = mergeDeepRight$1(primary$7, {
|
|
752
754
|
typography: {
|
|
753
755
|
color: secondaryColor
|
|
754
756
|
},
|
|
@@ -761,7 +763,7 @@ const secondary$2 = mergeDeepRight(primary$7, {
|
|
|
761
763
|
}
|
|
762
764
|
}
|
|
763
765
|
});
|
|
764
|
-
const danger$3 = mergeDeepRight(primary$7, {
|
|
766
|
+
const danger$3 = mergeDeepRight$1(primary$7, {
|
|
765
767
|
typography: {
|
|
766
768
|
color: dangerColor
|
|
767
769
|
},
|
|
@@ -797,7 +799,7 @@ const contained_icon = {
|
|
|
797
799
|
width: clicboundHeight,
|
|
798
800
|
offset: {
|
|
799
801
|
top: '0',
|
|
800
|
-
left:
|
|
802
|
+
left: `${(parseInt(clicboundHeight) - parseInt('40px')) / 2}px`
|
|
801
803
|
}
|
|
802
804
|
},
|
|
803
805
|
states: {
|
|
@@ -816,15 +818,15 @@ const contained_icon = {
|
|
|
816
818
|
width: compactClickboundHeight,
|
|
817
819
|
offset: {
|
|
818
820
|
top: '0',
|
|
819
|
-
left:
|
|
821
|
+
left: `${(parseInt(compactClickboundHeight) - parseInt(shape$3._modes.compact.icon_button.minWidth)) / 2}px`
|
|
820
822
|
}
|
|
821
823
|
}
|
|
822
824
|
}
|
|
823
825
|
}
|
|
824
826
|
};
|
|
825
|
-
const primary$6 = mergeDeepRight(primary$a, contained_icon);
|
|
826
|
-
const secondary$1 = mergeDeepRight(secondary$5, contained_icon);
|
|
827
|
-
const danger$2 = mergeDeepRight(danger$6, contained_icon);
|
|
827
|
+
const primary$6 = mergeDeepRight$1(primary$a, contained_icon);
|
|
828
|
+
const secondary$1 = mergeDeepRight$1(secondary$5, contained_icon);
|
|
829
|
+
const danger$2 = mergeDeepRight$1(danger$6, contained_icon);
|
|
828
830
|
|
|
829
831
|
const token$5 = {
|
|
830
832
|
primary: {
|
|
@@ -873,16 +875,17 @@ const InnerFullWidth = /*#__PURE__*/react.forwardRef(function InnerFullWidth(_re
|
|
|
873
875
|
});
|
|
874
876
|
|
|
875
877
|
const initalState$3 = {
|
|
878
|
+
/** Density for all components inside `EdsProvider` */
|
|
876
879
|
density: 'comfortable'
|
|
877
880
|
};
|
|
878
881
|
const EdsContext = /*#__PURE__*/react.createContext(initalState$3);
|
|
879
882
|
const EdsProvider = _ref => {
|
|
880
883
|
let {
|
|
881
884
|
children,
|
|
882
|
-
density
|
|
885
|
+
density
|
|
883
886
|
} = _ref;
|
|
884
887
|
const [state, setState] = react.useState({ ...initalState$3,
|
|
885
|
-
density
|
|
888
|
+
density: density || 'comfortable'
|
|
886
889
|
});
|
|
887
890
|
|
|
888
891
|
const setDensity = density => setState(prevState => ({ ...prevState,
|
|
@@ -895,7 +898,8 @@ const EdsProvider = _ref => {
|
|
|
895
898
|
}
|
|
896
899
|
}, [density, state.density]);
|
|
897
900
|
const value = {
|
|
898
|
-
density: state.density
|
|
901
|
+
density: state.density,
|
|
902
|
+
setDensity
|
|
899
903
|
};
|
|
900
904
|
return /*#__PURE__*/jsxRuntime.jsx(EdsContext.Provider, {
|
|
901
905
|
value: value,
|
|
@@ -1048,9 +1052,60 @@ const ButtonGroup = /*#__PURE__*/react.forwardRef(function ButtonGroup(_ref2, re
|
|
|
1048
1052
|
});
|
|
1049
1053
|
});
|
|
1050
1054
|
|
|
1055
|
+
const ToggleButton = /*#__PURE__*/react.forwardRef(function ToggleButton(_ref, ref) {
|
|
1056
|
+
let {
|
|
1057
|
+
children,
|
|
1058
|
+
multiple,
|
|
1059
|
+
selectedIndexes,
|
|
1060
|
+
onChange,
|
|
1061
|
+
...props
|
|
1062
|
+
} = _ref;
|
|
1063
|
+
const [pickedIndexes, setPickedIndexes] = react.useState(selectedIndexes || []);
|
|
1064
|
+
react.useEffect(() => {
|
|
1065
|
+
if (Array.isArray(selectedIndexes)) {
|
|
1066
|
+
setPickedIndexes(selectedIndexes);
|
|
1067
|
+
}
|
|
1068
|
+
}, [selectedIndexes]);
|
|
1069
|
+
const updatedChildren = react.Children.map(children, (child, index) => {
|
|
1070
|
+
const isSelected = pickedIndexes.includes(index);
|
|
1071
|
+
const childElement = child;
|
|
1072
|
+
|
|
1073
|
+
if ( /*#__PURE__*/react.isValidElement(child) && child.type === Button$1) {
|
|
1074
|
+
const buttonProps = {
|
|
1075
|
+
'aria-pressed': isSelected ? true : undefined,
|
|
1076
|
+
variant: isSelected ? 'contained' : 'outlined',
|
|
1077
|
+
onClick: e => {
|
|
1078
|
+
var _childElement$props, _childElement$props$o;
|
|
1079
|
+
|
|
1080
|
+
(_childElement$props = childElement.props) === null || _childElement$props === void 0 ? void 0 : (_childElement$props$o = _childElement$props.onClick) === null || _childElement$props$o === void 0 ? void 0 : _childElement$props$o.call(_childElement$props, e);
|
|
1081
|
+
let updatedSelection = [index];
|
|
1082
|
+
|
|
1083
|
+
if (multiple) {
|
|
1084
|
+
updatedSelection = pickedIndexes.includes(index) ? pickedIndexes.filter(i => i !== index) : [...pickedIndexes, index];
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
setPickedIndexes(updatedSelection);
|
|
1088
|
+
|
|
1089
|
+
if (onChange) {
|
|
1090
|
+
onChange(updatedSelection);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
return /*#__PURE__*/react.cloneElement(child, buttonProps);
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
return /*#__PURE__*/jsxRuntime.jsx(ButtonGroup, {
|
|
1098
|
+
ref: ref,
|
|
1099
|
+
...props,
|
|
1100
|
+
children: updatedChildren
|
|
1101
|
+
});
|
|
1102
|
+
});
|
|
1103
|
+
|
|
1051
1104
|
const Button = Button$1;
|
|
1052
1105
|
Button.Group = ButtonGroup;
|
|
1106
|
+
Button.Toggle = ToggleButton;
|
|
1053
1107
|
Button.Group.displayName = 'Button.Group';
|
|
1108
|
+
Button.Toggle.displayName = 'Button.Toggle';
|
|
1054
1109
|
|
|
1055
1110
|
const {
|
|
1056
1111
|
typography: typography$i,
|
|
@@ -1158,7 +1213,7 @@ const toVariantName = function (variant) {
|
|
|
1158
1213
|
let bold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1159
1214
|
let italic = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1160
1215
|
let link = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1161
|
-
return
|
|
1216
|
+
return `${variant}${bold ? '_bold' : ''}${italic ? '_italic' : ''}${link ? '_link' : ''}`;
|
|
1162
1217
|
};
|
|
1163
1218
|
|
|
1164
1219
|
const StyledTypography$1 = styled__default["default"].p.withConfig({
|
|
@@ -1207,7 +1262,7 @@ const Typography = /*#__PURE__*/react.forwardRef(function Typography(_ref5, ref)
|
|
|
1207
1262
|
const typography = findTypography(variantName, group);
|
|
1208
1263
|
|
|
1209
1264
|
if (typeof typography === 'undefined') {
|
|
1210
|
-
throw new Error(
|
|
1265
|
+
throw new Error(`Typography variant not found for variant "${variantName}" ("${variant}") & group "${group || ''}"`);
|
|
1211
1266
|
}
|
|
1212
1267
|
|
|
1213
1268
|
return /*#__PURE__*/jsxRuntime.jsx(StyledTypography$1, {
|
|
@@ -1293,12 +1348,12 @@ const tableCell = {
|
|
|
1293
1348
|
spacings: {
|
|
1294
1349
|
top: 'var(--eds_table__cell__padding_y, 0)',
|
|
1295
1350
|
bottom: 'var(--eds_table__cell__padding_y, 0)',
|
|
1296
|
-
left:
|
|
1297
|
-
right:
|
|
1351
|
+
left: `var(--eds_table__cell__padding_x, ${medium$5})`,
|
|
1352
|
+
right: `var(--eds_table__cell__padding_x, ${medium$5})`
|
|
1298
1353
|
},
|
|
1299
1354
|
typography: { ...cellTypography$1,
|
|
1300
1355
|
color: typographyColor$1,
|
|
1301
|
-
fontSize:
|
|
1356
|
+
fontSize: `var(--eds_table__font_size, ${cellTypography$1.fontSize})`
|
|
1302
1357
|
},
|
|
1303
1358
|
states: {
|
|
1304
1359
|
active: {
|
|
@@ -1344,8 +1399,8 @@ const tableCell = {
|
|
|
1344
1399
|
spacings: {
|
|
1345
1400
|
top: 'var(--eds_table__cell__padding_y_compact, 0)',
|
|
1346
1401
|
bottom: 'var(--eds_table__cell__padding_y_compact, 0)',
|
|
1347
|
-
left:
|
|
1348
|
-
right:
|
|
1402
|
+
left: `var(--eds_table__cell__padding_x_compact, ${medium$5})`,
|
|
1403
|
+
right: `var(--eds_table__cell__padding_x_compact, ${medium$5})`
|
|
1349
1404
|
}
|
|
1350
1405
|
}
|
|
1351
1406
|
},
|
|
@@ -1372,7 +1427,7 @@ const tableCell = {
|
|
|
1372
1427
|
const applyVariant = (variant, token) => {
|
|
1373
1428
|
switch (variant) {
|
|
1374
1429
|
case 'numeric':
|
|
1375
|
-
return mergeDeepRight(token, token.variants.numeric);
|
|
1430
|
+
return mergeDeepRight$1(token, token.variants.numeric);
|
|
1376
1431
|
|
|
1377
1432
|
default:
|
|
1378
1433
|
return token;
|
|
@@ -1519,7 +1574,7 @@ const token$4 = {
|
|
|
1519
1574
|
},
|
|
1520
1575
|
typography: { ...cellTypography,
|
|
1521
1576
|
color: typographyColor,
|
|
1522
|
-
fontSize:
|
|
1577
|
+
fontSize: `var(--eds_table__font_size, ${cellTypography.fontSize})`
|
|
1523
1578
|
},
|
|
1524
1579
|
border: {
|
|
1525
1580
|
type: 'bordergroup',
|
|
@@ -1533,8 +1588,8 @@ const token$4 = {
|
|
|
1533
1588
|
spacings: {
|
|
1534
1589
|
top: 'var(--eds_table__cell__padding_y, 0)',
|
|
1535
1590
|
bottom: 'var(--eds_table__cell__padding_y, 0)',
|
|
1536
|
-
left:
|
|
1537
|
-
right:
|
|
1591
|
+
left: `var(--eds_table__cell__padding_x, ${medium$4})`,
|
|
1592
|
+
right: `var(--eds_table__cell__padding_x, ${medium$4})`
|
|
1538
1593
|
},
|
|
1539
1594
|
states: {
|
|
1540
1595
|
active: {
|
|
@@ -1579,8 +1634,8 @@ const token$4 = {
|
|
|
1579
1634
|
spacings: {
|
|
1580
1635
|
top: 'var(--eds_table__cell__padding_y_compact, 0)',
|
|
1581
1636
|
bottom: 'var(--eds_table__cell__padding_y_compact, 0)',
|
|
1582
|
-
left:
|
|
1583
|
-
right:
|
|
1637
|
+
left: `var(--eds_table__cell__padding_x_compact, ${medium$4})`,
|
|
1638
|
+
right: `var(--eds_table__cell__padding_x_compact, ${medium$4})`
|
|
1584
1639
|
}
|
|
1585
1640
|
}
|
|
1586
1641
|
}
|
|
@@ -1825,17 +1880,6 @@ const {
|
|
|
1825
1880
|
}
|
|
1826
1881
|
}
|
|
1827
1882
|
} = edsTokens.tokens;
|
|
1828
|
-
const dividerHeight = 1;
|
|
1829
|
-
|
|
1830
|
-
const reduceByValue = subtractValue => valueWithUnit => {
|
|
1831
|
-
const valueAndUnit = valueWithUnit.split(/(\d+)/).filter(val => val.length > 0);
|
|
1832
|
-
return "".concat(parseInt(valueAndUnit[0]) - subtractValue) + valueAndUnit[1];
|
|
1833
|
-
};
|
|
1834
|
-
|
|
1835
|
-
const reduceValueByDividerHeight = reduceByValue(dividerHeight);
|
|
1836
|
-
const baseDivider$1 = {
|
|
1837
|
-
height: "".concat(dividerHeight, "px")
|
|
1838
|
-
};
|
|
1839
1883
|
const divider$1 = {
|
|
1840
1884
|
lighter: {
|
|
1841
1885
|
background: lighter
|
|
@@ -1847,47 +1891,54 @@ const divider$1 = {
|
|
|
1847
1891
|
background: mediumColor
|
|
1848
1892
|
}
|
|
1849
1893
|
};
|
|
1850
|
-
const small$7 = {
|
|
1894
|
+
const small$7 = {
|
|
1851
1895
|
spacings: {
|
|
1852
1896
|
top: spacingSmall$5,
|
|
1853
|
-
bottom:
|
|
1897
|
+
bottom: spacingSmall$5
|
|
1854
1898
|
}
|
|
1855
1899
|
};
|
|
1856
|
-
const medium$3 = {
|
|
1900
|
+
const medium$3 = {
|
|
1857
1901
|
spacings: {
|
|
1858
1902
|
top: spacingMedium$9,
|
|
1859
|
-
bottom:
|
|
1903
|
+
bottom: spacingMedium$9
|
|
1860
1904
|
}
|
|
1861
1905
|
};
|
|
1862
1906
|
|
|
1863
1907
|
var tokens$7 = /*#__PURE__*/Object.freeze({
|
|
1864
1908
|
__proto__: null,
|
|
1865
|
-
baseDivider: baseDivider$1,
|
|
1866
1909
|
divider: divider$1,
|
|
1867
1910
|
small: small$7,
|
|
1868
1911
|
medium: medium$3
|
|
1869
1912
|
});
|
|
1870
1913
|
|
|
1871
1914
|
const {
|
|
1872
|
-
divider
|
|
1873
|
-
baseDivider
|
|
1915
|
+
divider
|
|
1874
1916
|
} = tokens$7;
|
|
1875
1917
|
const StyledDivider$3 = styled__default["default"].hr.withConfig({
|
|
1876
1918
|
displayName: "Divider__StyledDivider",
|
|
1877
1919
|
componentId: "sc-1d8osde-0"
|
|
1878
|
-
})(
|
|
1879
|
-
|
|
1920
|
+
})(_ref => {
|
|
1921
|
+
let {
|
|
1922
|
+
backgroundColor,
|
|
1923
|
+
marginTop,
|
|
1924
|
+
marginBottom,
|
|
1925
|
+
dividerHeight
|
|
1926
|
+
} = _ref;
|
|
1927
|
+
return styled.css(["border:none;background-color:", ";margin-top:", ";margin-bottom:calc(", " - ", "px);height:", "px;"], backgroundColor, marginTop, marginBottom, dividerHeight, dividerHeight);
|
|
1928
|
+
});
|
|
1929
|
+
const Divider = /*#__PURE__*/react.forwardRef(function Divider(_ref2, ref) {
|
|
1880
1930
|
let {
|
|
1881
1931
|
color = 'medium',
|
|
1882
1932
|
variant = 'medium',
|
|
1933
|
+
size = '1',
|
|
1883
1934
|
...rest
|
|
1884
|
-
} =
|
|
1935
|
+
} = _ref2;
|
|
1885
1936
|
const colorValue = color === 'medium' ? 'mediumColor' : color;
|
|
1886
1937
|
const props = {
|
|
1887
1938
|
backgroundColor: divider[colorValue].background,
|
|
1888
1939
|
marginTop: tokens$7[variant].spacings.top,
|
|
1889
1940
|
marginBottom: tokens$7[variant].spacings.bottom,
|
|
1890
|
-
dividerHeight:
|
|
1941
|
+
dividerHeight: parseInt(size),
|
|
1891
1942
|
...rest
|
|
1892
1943
|
};
|
|
1893
1944
|
return /*#__PURE__*/jsxRuntime.jsx(StyledDivider$3, { ...props,
|
|
@@ -2021,7 +2072,7 @@ const input$2 = {
|
|
|
2021
2072
|
}
|
|
2022
2073
|
}
|
|
2023
2074
|
};
|
|
2024
|
-
const error$4 = mergeDeepRight(input$2, {
|
|
2075
|
+
const error$4 = mergeDeepRight$1(input$2, {
|
|
2025
2076
|
boxShadow: 'inset 0px -1px 0px 0px transparent',
|
|
2026
2077
|
states: {
|
|
2027
2078
|
active: {
|
|
@@ -2044,7 +2095,7 @@ const error$4 = mergeDeepRight(input$2, {
|
|
|
2044
2095
|
}
|
|
2045
2096
|
}
|
|
2046
2097
|
});
|
|
2047
|
-
const warning$4 = mergeDeepRight(input$2, {
|
|
2098
|
+
const warning$4 = mergeDeepRight$1(input$2, {
|
|
2048
2099
|
boxShadow: 'inset 0px -1px 0px 0px transparent',
|
|
2049
2100
|
states: {
|
|
2050
2101
|
active: {
|
|
@@ -2067,7 +2118,7 @@ const warning$4 = mergeDeepRight(input$2, {
|
|
|
2067
2118
|
}
|
|
2068
2119
|
}
|
|
2069
2120
|
});
|
|
2070
|
-
const success$1 = mergeDeepRight(input$2, {
|
|
2121
|
+
const success$1 = mergeDeepRight$1(input$2, {
|
|
2071
2122
|
boxShadow: 'inset 0px -1px 0px 0px transparent',
|
|
2072
2123
|
states: {
|
|
2073
2124
|
active: {
|
|
@@ -2397,7 +2448,7 @@ const Variation$2 = _ref => {
|
|
|
2397
2448
|
} = _ref;
|
|
2398
2449
|
|
|
2399
2450
|
if (!variant) {
|
|
2400
|
-
return
|
|
2451
|
+
return ``;
|
|
2401
2452
|
}
|
|
2402
2453
|
|
|
2403
2454
|
const {
|
|
@@ -2483,10 +2534,10 @@ const Variation$1 = _ref => {
|
|
|
2483
2534
|
} = _ref;
|
|
2484
2535
|
|
|
2485
2536
|
if (!variant) {
|
|
2486
|
-
return
|
|
2537
|
+
return ``;
|
|
2487
2538
|
}
|
|
2488
2539
|
|
|
2489
|
-
return styled.css(["box-shadow:", ";", ""], isFocused ?
|
|
2540
|
+
return styled.css(["box-shadow:", ";", ""], isFocused ? `none` : variant === 'default' ? `inset 0 -1px 0 0 ${((_token$border = token.border) === null || _token$border === void 0 ? void 0 : _token$border.type) === 'border' && ((_token$border2 = token.border) === null || _token$border2 === void 0 ? void 0 : _token$border2.color)}` : `0 0 0 1px ${((_token$border3 = token.border) === null || _token$border3 === void 0 ? void 0 : _token$border3.type) === 'border' && ((_token$border4 = token.border) === null || _token$border4 === void 0 ? void 0 : _token$border4.color)}`, isFocused && edsUtils.outlineTemplate(token.states.focus.outline));
|
|
2490
2541
|
};
|
|
2491
2542
|
|
|
2492
2543
|
const StrippedInput = styled__default["default"](Input$4).withConfig({
|
|
@@ -2733,7 +2784,7 @@ const Variation = _ref => {
|
|
|
2733
2784
|
} = _ref;
|
|
2734
2785
|
|
|
2735
2786
|
if (!variant) {
|
|
2736
|
-
return
|
|
2787
|
+
return ``;
|
|
2737
2788
|
}
|
|
2738
2789
|
|
|
2739
2790
|
const {
|
|
@@ -2906,7 +2957,7 @@ const transform = _ref => {
|
|
|
2906
2957
|
let {
|
|
2907
2958
|
rotation
|
|
2908
2959
|
} = _ref;
|
|
2909
|
-
return rotation ?
|
|
2960
|
+
return rotation ? `transform: rotate(${rotation}deg)` : '';
|
|
2910
2961
|
};
|
|
2911
2962
|
|
|
2912
2963
|
const StyledSvg = styled__default["default"].svg.attrs(_ref2 => {
|
|
@@ -2918,8 +2969,8 @@ const StyledSvg = styled__default["default"].svg.attrs(_ref2 => {
|
|
|
2918
2969
|
return {
|
|
2919
2970
|
name: null,
|
|
2920
2971
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
2921
|
-
height:
|
|
2922
|
-
width:
|
|
2972
|
+
height: `${height}px`,
|
|
2973
|
+
width: `${width}px`,
|
|
2923
2974
|
fill
|
|
2924
2975
|
};
|
|
2925
2976
|
}).withConfig({
|
|
@@ -2935,7 +2986,7 @@ const StyledPath$2 = styled__default["default"].path.attrs(_ref3 => {
|
|
|
2935
2986
|
size: null,
|
|
2936
2987
|
fillRule: 'evenodd',
|
|
2937
2988
|
clipRule: 'evenodd',
|
|
2938
|
-
transform: size / height !== 1 ?
|
|
2989
|
+
transform: size / height !== 1 ? `scale(${size / height})` : null
|
|
2939
2990
|
};
|
|
2940
2991
|
}).withConfig({
|
|
2941
2992
|
displayName: "Icon__StyledPath",
|
|
@@ -2984,7 +3035,7 @@ const Icon$2 = /*#__PURE__*/react.forwardRef(function Icon(_ref4, ref) {
|
|
|
2984
3035
|
} = findIcon(name, data, size);
|
|
2985
3036
|
|
|
2986
3037
|
if (typeof icon === 'undefined') {
|
|
2987
|
-
throw Error(
|
|
3038
|
+
throw Error(`Icon "${name}" not found. Have you added it using Icon.add() or using data props?`);
|
|
2988
3039
|
}
|
|
2989
3040
|
|
|
2990
3041
|
const height = size ? size : parseInt(icon.width);
|
|
@@ -2993,7 +3044,7 @@ const Icon$2 = /*#__PURE__*/react.forwardRef(function Icon(_ref4, ref) {
|
|
|
2993
3044
|
height,
|
|
2994
3045
|
width,
|
|
2995
3046
|
fill: color,
|
|
2996
|
-
viewBox:
|
|
3047
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
2997
3048
|
rotation,
|
|
2998
3049
|
name,
|
|
2999
3050
|
'aria-hidden': true
|
|
@@ -3007,7 +3058,7 @@ const Icon$2 = /*#__PURE__*/react.forwardRef(function Icon(_ref4, ref) {
|
|
|
3007
3058
|
let titleId = '';
|
|
3008
3059
|
|
|
3009
3060
|
if (title) {
|
|
3010
|
-
titleId =
|
|
3061
|
+
titleId = `${icon.prefix}-${icon.name}-${count}`;
|
|
3011
3062
|
svgProps = { ...svgProps,
|
|
3012
3063
|
title,
|
|
3013
3064
|
role: 'img',
|
|
@@ -3258,8 +3309,8 @@ const AccordionItem = /*#__PURE__*/react.forwardRef(function AccordionItem(_ref,
|
|
|
3258
3309
|
};
|
|
3259
3310
|
|
|
3260
3311
|
const Children = react.Children.map(children, (child, childIndex) => {
|
|
3261
|
-
const headerId =
|
|
3262
|
-
const panelId =
|
|
3312
|
+
const headerId = `${accordionId}-header-${index + 1}`;
|
|
3313
|
+
const panelId = `${accordionId}-panel-${index + 1}`;
|
|
3263
3314
|
return childIndex === 0 ? /*#__PURE__*/react.cloneElement(child, {
|
|
3264
3315
|
isExpanded: expanded,
|
|
3265
3316
|
toggleExpanded,
|
|
@@ -3486,7 +3537,7 @@ const AccordionHeader = /*#__PURE__*/react.forwardRef(function AccordionHeader(_
|
|
|
3486
3537
|
size: 24,
|
|
3487
3538
|
chevronPosition: chevronPosition,
|
|
3488
3539
|
color: disabled ? chevronToken.states.disabled.background : chevronToken.background
|
|
3489
|
-
},
|
|
3540
|
+
}, `${id}-icon`);
|
|
3490
3541
|
|
|
3491
3542
|
const headerChildren = react.Children.map(children, child => {
|
|
3492
3543
|
if (typeof child === 'string') {
|
|
@@ -3712,7 +3763,7 @@ const token$1 = {
|
|
|
3712
3763
|
outline: {
|
|
3713
3764
|
type: 'outline',
|
|
3714
3765
|
width: focusOutlineWidth$5,
|
|
3715
|
-
offset:
|
|
3766
|
+
offset: `-${parseInt(focusOutlineWidth$5)}px`,
|
|
3716
3767
|
style: 'dashed',
|
|
3717
3768
|
color: focusOutlineColor$5
|
|
3718
3769
|
}
|
|
@@ -3885,8 +3936,8 @@ const TabList = /*#__PURE__*/react.forwardRef(function TabsList(_ref3, ref) {
|
|
|
3885
3936
|
const Tabs = react.Children.map(children, (child, index) => {
|
|
3886
3937
|
const tabRef = index === activeTab ? edsUtils.mergeRefs(child.ref, selectedTabRef) : child.ref;
|
|
3887
3938
|
return /*#__PURE__*/react.cloneElement(child, {
|
|
3888
|
-
id:
|
|
3889
|
-
'aria-controls':
|
|
3939
|
+
id: `${tabsId}-tab-${index + 1}`,
|
|
3940
|
+
'aria-controls': `${tabsId}-panel-${index + 1}`,
|
|
3890
3941
|
active: index === activeTab,
|
|
3891
3942
|
index,
|
|
3892
3943
|
onClick: () => handleChange(index),
|
|
@@ -3981,8 +4032,8 @@ const TabPanels = /*#__PURE__*/react.forwardRef(function TabPanels(_ref, ref) {
|
|
|
3981
4032
|
tabsId
|
|
3982
4033
|
} = react.useContext(TabsContext);
|
|
3983
4034
|
const Panels = react.Children.map(children, (child, index) => /*#__PURE__*/react.cloneElement(child, {
|
|
3984
|
-
id:
|
|
3985
|
-
'aria-labelledby':
|
|
4035
|
+
id: `${tabsId}-panel-${index + 1}`,
|
|
4036
|
+
'aria-labelledby': `${tabsId}-tab-${index + 1}`,
|
|
3986
4037
|
hidden: activeTab !== index
|
|
3987
4038
|
}));
|
|
3988
4039
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -4323,14 +4374,16 @@ const StyledTopBar = styled__default["default"](Paper).withConfig({
|
|
|
4323
4374
|
componentId: "sc-1yj236q-0"
|
|
4324
4375
|
})(_ref => {
|
|
4325
4376
|
let {
|
|
4326
|
-
theme
|
|
4377
|
+
theme,
|
|
4378
|
+
sticky
|
|
4327
4379
|
} = _ref;
|
|
4328
|
-
return styled.css(["height:", ";
|
|
4380
|
+
return styled.css(["height:", ";background:", ";box-sizing:border-box;display:grid;grid-column-gap:", ";grid-template-columns:auto 1fr auto;grid-template-areas:'left center right';align-items:center;", " ", ";", " ", ""], theme.height, theme.background, theme.spacings.left, edsUtils.bordersTemplate(theme.border), edsUtils.spacingsTemplate(theme.spacings), edsUtils.typographyTemplate(theme.typography), sticky && styled.css(["position:sticky;top:0;z-index:1100;"]));
|
|
4329
4381
|
});
|
|
4330
4382
|
const TopBar$1 = /*#__PURE__*/react.forwardRef(function TopBar(_ref2, ref) {
|
|
4331
4383
|
let {
|
|
4332
4384
|
children,
|
|
4333
4385
|
elevation = 'none',
|
|
4386
|
+
sticky = true,
|
|
4334
4387
|
...props
|
|
4335
4388
|
} = _ref2;
|
|
4336
4389
|
const {
|
|
@@ -4347,6 +4400,7 @@ const TopBar$1 = /*#__PURE__*/react.forwardRef(function TopBar(_ref2, ref) {
|
|
|
4347
4400
|
children: /*#__PURE__*/jsxRuntime.jsx(StyledTopBar, {
|
|
4348
4401
|
forwardedAs: 'header',
|
|
4349
4402
|
elevation: elevation,
|
|
4403
|
+
sticky: sticky,
|
|
4350
4404
|
...rest,
|
|
4351
4405
|
children: children
|
|
4352
4406
|
})
|
|
@@ -4419,20 +4473,16 @@ const {
|
|
|
4419
4473
|
}
|
|
4420
4474
|
} = edsTokens.tokens;
|
|
4421
4475
|
const scrim = {
|
|
4422
|
-
width: '100%',
|
|
4423
|
-
height: '100%',
|
|
4424
4476
|
background: background$a
|
|
4425
4477
|
};
|
|
4426
4478
|
|
|
4427
4479
|
const {
|
|
4428
|
-
height: height$1,
|
|
4429
|
-
width,
|
|
4430
4480
|
background: background$9
|
|
4431
4481
|
} = scrim;
|
|
4432
|
-
const StyledScrim = styled__default["default"].
|
|
4482
|
+
const StyledScrim = styled__default["default"](reactDomInteractions.FloatingOverlay).withConfig({
|
|
4433
4483
|
displayName: "Scrim__StyledScrim",
|
|
4434
4484
|
componentId: "sc-1fr7uvy-0"
|
|
4435
|
-
})(["
|
|
4485
|
+
})(["background:", ";z-index:1300;align-items:center;justify-content:center;display:flex;"], background$9);
|
|
4436
4486
|
const ScrimContent = styled__default["default"].div.withConfig({
|
|
4437
4487
|
displayName: "Scrim__ScrimContent",
|
|
4438
4488
|
componentId: "sc-1fr7uvy-1"
|
|
@@ -4447,11 +4497,6 @@ const Scrim = /*#__PURE__*/react.forwardRef(function Scrim(_ref, ref) {
|
|
|
4447
4497
|
} = _ref;
|
|
4448
4498
|
const scrimRef = react.useRef(null);
|
|
4449
4499
|
const combinedScrimRef = react.useMemo(() => edsUtils.mergeRefs(scrimRef, ref), [scrimRef, ref]);
|
|
4450
|
-
const props = { ...rest,
|
|
4451
|
-
open,
|
|
4452
|
-
isDismissable
|
|
4453
|
-
};
|
|
4454
|
-
edsUtils.useHideBodyScroll(open);
|
|
4455
4500
|
edsUtils.useGlobalKeyPress('Escape', () => {
|
|
4456
4501
|
if (isDismissable && onClose && open) {
|
|
4457
4502
|
onClose();
|
|
@@ -4471,9 +4516,10 @@ const Scrim = /*#__PURE__*/react.forwardRef(function Scrim(_ref, ref) {
|
|
|
4471
4516
|
}
|
|
4472
4517
|
|
|
4473
4518
|
return /*#__PURE__*/jsxRuntime.jsx(StyledScrim, {
|
|
4519
|
+
lockScroll: true,
|
|
4474
4520
|
onClick: handleMouseClose,
|
|
4475
4521
|
ref: combinedScrimRef,
|
|
4476
|
-
...
|
|
4522
|
+
...rest,
|
|
4477
4523
|
children: /*#__PURE__*/jsxRuntime.jsx(ScrimContent, {
|
|
4478
4524
|
children: children
|
|
4479
4525
|
})
|
|
@@ -4568,39 +4614,46 @@ const Dialog$1 = /*#__PURE__*/react.forwardRef(function Dialog(_ref2, ref) {
|
|
|
4568
4614
|
isDismissable = false,
|
|
4569
4615
|
...props
|
|
4570
4616
|
} = _ref2;
|
|
4571
|
-
const rest = { ...props,
|
|
4572
|
-
open,
|
|
4573
|
-
ref
|
|
4574
|
-
};
|
|
4575
4617
|
const {
|
|
4576
4618
|
density
|
|
4577
4619
|
} = useEds();
|
|
4578
4620
|
const token = edsUtils.useToken({
|
|
4579
4621
|
density
|
|
4580
4622
|
}, dialog);
|
|
4623
|
+
const {
|
|
4624
|
+
floating,
|
|
4625
|
+
context
|
|
4626
|
+
} = reactDomInteractions.useFloating();
|
|
4581
4627
|
|
|
4582
4628
|
const handleDismiss = () => {
|
|
4583
4629
|
onClose && onClose();
|
|
4584
4630
|
};
|
|
4585
4631
|
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
4591
|
-
|
|
4632
|
+
const dialogRef = react.useMemo(() => edsUtils.mergeRefs(floating, ref), [floating, ref]);
|
|
4633
|
+
const rest = { ...props,
|
|
4634
|
+
open
|
|
4635
|
+
};
|
|
4636
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingPortal, {
|
|
4637
|
+
id: "eds-dialog-container",
|
|
4638
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
4592
4639
|
theme: token,
|
|
4593
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Scrim, {
|
|
4640
|
+
children: open && /*#__PURE__*/jsxRuntime.jsx(Scrim, {
|
|
4594
4641
|
open: true,
|
|
4595
4642
|
isDismissable: isDismissable,
|
|
4596
4643
|
onClose: handleDismiss,
|
|
4597
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4644
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingFocusManager, {
|
|
4645
|
+
context: context,
|
|
4646
|
+
modal: true,
|
|
4647
|
+
returnFocus: true,
|
|
4648
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledDialog, {
|
|
4649
|
+
elevation: "above_scrim",
|
|
4650
|
+
...rest,
|
|
4651
|
+
ref: dialogRef,
|
|
4652
|
+
children: children
|
|
4653
|
+
})
|
|
4601
4654
|
})
|
|
4602
4655
|
})
|
|
4603
|
-
})
|
|
4656
|
+
})
|
|
4604
4657
|
});
|
|
4605
4658
|
}); // Dialog.displayName = 'EdsDialog'
|
|
4606
4659
|
|
|
@@ -5932,7 +5985,7 @@ const {
|
|
|
5932
5985
|
} = slider;
|
|
5933
5986
|
const fakeTrackBg = styled.css(["background-image:url(\"data:image/svg+xml,<svg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'><rect x='0' y='11' fill='", "' width='100%' height='4' rx='2' /></svg>\");background-size:cover;background-repeat:no-repeat;"], track.background);
|
|
5934
5987
|
const fakeTrackBgHover = styled.css({
|
|
5935
|
-
backgroundImage:
|
|
5988
|
+
backgroundImage: `url("data:image/svg+xml,<svg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'><rect x='0' y='11' fill='${track.states.hover.background}' width='100%' height='4' rx='2' /></svg>")`
|
|
5936
5989
|
});
|
|
5937
5990
|
const trackFill = styled.css(["grid-column:1 / span 2;grid-row:2;height:", ";margin-bottom:", ";align-self:end;content:'';"], track.height, track.spacings.bottom);
|
|
5938
5991
|
const wrapperGrid = styled.css(["display:grid;grid-template-rows:max-content 24px;grid-template-columns:1fr 1fr;width:100%;position:relative;"]);
|
|
@@ -6109,9 +6162,9 @@ const Slider = /*#__PURE__*/react.forwardRef(function Slider(_ref10, ref) {
|
|
|
6109
6162
|
|
|
6110
6163
|
if (rest['id']) {
|
|
6111
6164
|
const overrideId = rest['id'];
|
|
6112
|
-
inputIdA =
|
|
6113
|
-
inputIdB =
|
|
6114
|
-
inputId =
|
|
6165
|
+
inputIdA = `${overrideId}-thumb-a`;
|
|
6166
|
+
inputIdB = `${overrideId}-thumb-b`;
|
|
6167
|
+
inputId = `${overrideId}-thumb`;
|
|
6115
6168
|
}
|
|
6116
6169
|
|
|
6117
6170
|
const getAriaLabelledby = react.useCallback(() => {
|
|
@@ -6373,8 +6426,8 @@ const Tooltip = /*#__PURE__*/react.forwardRef(function Tooltip(_ref, ref) {
|
|
|
6373
6426
|
|
|
6374
6427
|
if (arrowRef.current) {
|
|
6375
6428
|
Object.assign(arrowRef.current.style, {
|
|
6376
|
-
left: arrowX != null ?
|
|
6377
|
-
top: arrowY != null ?
|
|
6429
|
+
left: arrowX != null ? `${arrowX}px` : '',
|
|
6430
|
+
top: arrowY != null ? `${arrowY}px` : '',
|
|
6378
6431
|
right: '',
|
|
6379
6432
|
bottom: '',
|
|
6380
6433
|
[staticSide]: '-6px',
|
|
@@ -6395,8 +6448,8 @@ const Tooltip = /*#__PURE__*/react.forwardRef(function Tooltip(_ref, ref) {
|
|
|
6395
6448
|
ref: tooltipRef,
|
|
6396
6449
|
style: { ...style,
|
|
6397
6450
|
position: strategy,
|
|
6398
|
-
top: y
|
|
6399
|
-
left: x
|
|
6451
|
+
top: y || 0,
|
|
6452
|
+
left: x || 0
|
|
6400
6453
|
}
|
|
6401
6454
|
}),
|
|
6402
6455
|
children: [title, /*#__PURE__*/jsxRuntime.jsx(ArrowWrapper$1, {
|
|
@@ -6643,9 +6696,9 @@ const PopoverPaper = styled__default["default"](Paper).withConfig({
|
|
|
6643
6696
|
theme,
|
|
6644
6697
|
open
|
|
6645
6698
|
} = _ref;
|
|
6646
|
-
return styled.css(["", " ", "
|
|
6647
|
-
|
|
6648
|
-
}, edsUtils.typographyTemplate(theme.typography), theme.background,
|
|
6699
|
+
return styled.css(["", " ", " background:", ";", " z-index:1400;"], {
|
|
6700
|
+
display: open ? 'block' : 'none'
|
|
6701
|
+
}, edsUtils.typographyTemplate(theme.typography), theme.background, edsUtils.bordersTemplate(theme.border));
|
|
6649
6702
|
});
|
|
6650
6703
|
const ArrowWrapper = styled__default["default"].div.withConfig({
|
|
6651
6704
|
displayName: "Popover__ArrowWrapper",
|
|
@@ -6663,7 +6716,7 @@ const InnerWrapper = styled__default["default"].div.withConfig({
|
|
|
6663
6716
|
let {
|
|
6664
6717
|
theme
|
|
6665
6718
|
} = _ref3;
|
|
6666
|
-
return styled.css(["display:grid;grid-gap:", ";"], theme.spacings.bottom);
|
|
6719
|
+
return styled.css(["display:grid;grid-gap:", ";max-height:", ";width:max-content;max-width:", ";overflow:auto;"], theme.spacings.bottom, theme.maxHeight, theme.maxWidth);
|
|
6667
6720
|
});
|
|
6668
6721
|
const PopoverArrow = styled__default["default"].svg.withConfig({
|
|
6669
6722
|
displayName: "Popover__PopoverArrow",
|
|
@@ -6751,8 +6804,8 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
|
|
|
6751
6804
|
|
|
6752
6805
|
if (arrowRef.current) {
|
|
6753
6806
|
Object.assign(arrowRef.current.style, {
|
|
6754
|
-
left: arrowX != null ?
|
|
6755
|
-
top: arrowY != null ?
|
|
6807
|
+
left: arrowX != null ? `${arrowX}px` : '',
|
|
6808
|
+
top: arrowY != null ? `${arrowY}px` : '',
|
|
6756
6809
|
right: '',
|
|
6757
6810
|
bottom: '',
|
|
6758
6811
|
[staticSide]: '-6px',
|
|
@@ -6779,8 +6832,8 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
|
|
|
6779
6832
|
ref: popoverRef,
|
|
6780
6833
|
style: { ...style,
|
|
6781
6834
|
position: strategy,
|
|
6782
|
-
top: y
|
|
6783
|
-
left: x
|
|
6835
|
+
top: y || 0,
|
|
6836
|
+
left: x || 0
|
|
6784
6837
|
}
|
|
6785
6838
|
}),
|
|
6786
6839
|
children: [/*#__PURE__*/jsxRuntime.jsx(ArrowWrapper, {
|
|
@@ -6828,7 +6881,7 @@ const ContentWrapper = styled__default["default"].div.withConfig({
|
|
|
6828
6881
|
let {
|
|
6829
6882
|
theme
|
|
6830
6883
|
} = _ref;
|
|
6831
|
-
return styled.css(["
|
|
6884
|
+
return styled.css(["padding:0 ", " 0 ", ";:first-child{padding-top:", ";}:last-child{padding-bottom:", ";}"], theme.spacings.right, theme.spacings.left, theme.spacings.top, theme.spacings.bottom);
|
|
6832
6885
|
});
|
|
6833
6886
|
const PopoverContent = /*#__PURE__*/react.forwardRef(function PopoverContent(_ref2, ref) {
|
|
6834
6887
|
let {
|
|
@@ -6880,7 +6933,7 @@ const StyledPopoverActions = styled__default["default"].div.withConfig({
|
|
|
6880
6933
|
let {
|
|
6881
6934
|
theme
|
|
6882
6935
|
} = _ref;
|
|
6883
|
-
return styled.css(["display:grid;grid-gap:8px;grid-auto-flow:column;align-items:center;padding:0 ", " 0 ", ";:
|
|
6936
|
+
return styled.css(["display:grid;grid-gap:8px;grid-auto-flow:column;align-items:center;padding:0 ", " 0 ", ";:first-child{padding-top:", ";}:last-child{padding-bottom:", ";}"], theme.spacings.right, theme.spacings.left, theme.spacings.top, theme.spacings.bottom);
|
|
6884
6937
|
});
|
|
6885
6938
|
const PopoverActions = /*#__PURE__*/react.forwardRef(function PopoverActions(_ref2, ref) {
|
|
6886
6939
|
let {
|
|
@@ -7207,7 +7260,7 @@ const LinearProgress = /*#__PURE__*/react.forwardRef(function LinearProgress(_re
|
|
|
7207
7260
|
props['aria-valuemin'] = 0;
|
|
7208
7261
|
props['aria-valuemax'] = 100;
|
|
7209
7262
|
const transform = value - 100;
|
|
7210
|
-
barStyle =
|
|
7263
|
+
barStyle = `translateX(${transform}%)`;
|
|
7211
7264
|
}
|
|
7212
7265
|
}
|
|
7213
7266
|
|
|
@@ -7229,7 +7282,7 @@ const LinearProgress = /*#__PURE__*/react.forwardRef(function LinearProgress(_re
|
|
|
7229
7282
|
}, [value, variant]);
|
|
7230
7283
|
|
|
7231
7284
|
const getProgressFormatted = () => {
|
|
7232
|
-
return
|
|
7285
|
+
return `Loading ${srProgress}%`;
|
|
7233
7286
|
};
|
|
7234
7287
|
|
|
7235
7288
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -7348,7 +7401,7 @@ const CircularProgress = /*#__PURE__*/react.forwardRef(function CircularProgress
|
|
|
7348
7401
|
|
|
7349
7402
|
if (variant === 'determinate') {
|
|
7350
7403
|
trackStyle.stroke = circumference.toFixed(3);
|
|
7351
|
-
trackStyle.strokeDashoffset =
|
|
7404
|
+
trackStyle.strokeDashoffset = `${((100 - progress) / 100 * circumference).toFixed(3)}px`;
|
|
7352
7405
|
props['aria-valuenow'] = progress;
|
|
7353
7406
|
|
|
7354
7407
|
if (value !== undefined) {
|
|
@@ -7373,7 +7426,7 @@ const CircularProgress = /*#__PURE__*/react.forwardRef(function CircularProgress
|
|
|
7373
7426
|
}, [progress, variant]);
|
|
7374
7427
|
|
|
7375
7428
|
const getProgressFormatted = () => {
|
|
7376
|
-
return
|
|
7429
|
+
return `Loading ${srProgress}%`;
|
|
7377
7430
|
};
|
|
7378
7431
|
|
|
7379
7432
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -7693,7 +7746,7 @@ const Breadcrumbs$1 = /*#__PURE__*/react.forwardRef(function Breadcrumbs(_ref, r
|
|
|
7693
7746
|
children: "/"
|
|
7694
7747
|
})
|
|
7695
7748
|
})]
|
|
7696
|
-
},
|
|
7749
|
+
}, `breadcrumb-${index}`));
|
|
7697
7750
|
return /*#__PURE__*/jsxRuntime.jsx("nav", { ...props,
|
|
7698
7751
|
"aria-label": "breadcrumbs",
|
|
7699
7752
|
children: /*#__PURE__*/jsxRuntime.jsx(OrderedList$1, {
|
|
@@ -8159,12 +8212,12 @@ const {
|
|
|
8159
8212
|
const MenuPaper = styled__default["default"](Paper).withConfig({
|
|
8160
8213
|
displayName: "Menu__MenuPaper",
|
|
8161
8214
|
componentId: "sc-1vlnqcj-0"
|
|
8162
|
-
})(["position:absolute;z-index:1400;width:fit-content;min-width:fit-content;", ";", ""], edsUtils.bordersTemplate(border), _ref => {
|
|
8215
|
+
})(["position:absolute;z-index:1400;width:fit-content;min-width:fit-content;", ";", ";"], edsUtils.bordersTemplate(border), _ref => {
|
|
8163
8216
|
let {
|
|
8164
8217
|
open
|
|
8165
8218
|
} = _ref;
|
|
8166
8219
|
return styled.css({
|
|
8167
|
-
|
|
8220
|
+
display: open ? 'block' : 'none'
|
|
8168
8221
|
});
|
|
8169
8222
|
});
|
|
8170
8223
|
const MenuContainer = /*#__PURE__*/react.forwardRef(function MenuContainer(_ref2, ref) {
|
|
@@ -8304,8 +8357,8 @@ const Menu$1 = /*#__PURE__*/react.forwardRef(function Menu(_ref3, ref) {
|
|
|
8304
8357
|
ref: popoverRef,
|
|
8305
8358
|
style: { ...style,
|
|
8306
8359
|
position: strategy,
|
|
8307
|
-
top: y
|
|
8308
|
-
left: x
|
|
8360
|
+
top: y || 0,
|
|
8361
|
+
left: x || 0
|
|
8309
8362
|
}
|
|
8310
8363
|
}),
|
|
8311
8364
|
children: /*#__PURE__*/jsxRuntime.jsx(MenuProvider, {
|
|
@@ -8469,7 +8522,7 @@ const Text = styled__default["default"](Typography).withConfig({
|
|
|
8469
8522
|
})(["white-space:nowrap;"]);
|
|
8470
8523
|
|
|
8471
8524
|
function getAriaLabel(page, selected) {
|
|
8472
|
-
return
|
|
8525
|
+
return `${selected === page ? 'Current page, ' : 'Go to '}page ${page}`;
|
|
8473
8526
|
}
|
|
8474
8527
|
|
|
8475
8528
|
const Pagination = /*#__PURE__*/react.forwardRef(function Pagination(_ref2, ref) {
|
|
@@ -8521,7 +8574,7 @@ const Pagination = /*#__PURE__*/react.forwardRef(function Pagination(_ref2, ref)
|
|
|
8521
8574
|
...props,
|
|
8522
8575
|
children: /*#__PURE__*/jsxRuntime.jsxs(OrderedList, {
|
|
8523
8576
|
style: {
|
|
8524
|
-
gridTemplateColumns:
|
|
8577
|
+
gridTemplateColumns: `repeat(${columns}, 48px)`
|
|
8525
8578
|
},
|
|
8526
8579
|
children: [/*#__PURE__*/jsxRuntime.jsx(ListItem, {
|
|
8527
8580
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
@@ -8539,7 +8592,7 @@ const Pagination = /*#__PURE__*/react.forwardRef(function Pagination(_ref2, ref)
|
|
|
8539
8592
|
/*#__PURE__*/
|
|
8540
8593
|
// eslint-disable-next-line react/no-array-index-key
|
|
8541
8594
|
jsxRuntime.jsx(ListItem, {
|
|
8542
|
-
children: /*#__PURE__*/jsxRuntime.jsx(PaginationItem, {
|
|
8595
|
+
children: /*#__PURE__*/jsxRuntime.jsx(PaginationItem, {
|
|
8543
8596
|
"aria-label": getAriaLabel(page, activePage),
|
|
8544
8597
|
"aria-current": activePage,
|
|
8545
8598
|
page: page,
|
|
@@ -8548,13 +8601,13 @@ const Pagination = /*#__PURE__*/react.forwardRef(function Pagination(_ref2, ref)
|
|
|
8548
8601
|
onPageChange(event, page);
|
|
8549
8602
|
}
|
|
8550
8603
|
})
|
|
8551
|
-
},
|
|
8604
|
+
}, `list-item ${index}`) : /*#__PURE__*/jsxRuntime.jsx(ListItem // eslint-disable-next-line react/no-array-index-key
|
|
8552
8605
|
, {
|
|
8553
8606
|
children: /*#__PURE__*/jsxRuntime.jsx(StyledIcon, {
|
|
8554
8607
|
name: "more_horizontal",
|
|
8555
8608
|
"aria-label": "Ellipsis of pages"
|
|
8556
8609
|
})
|
|
8557
|
-
},
|
|
8610
|
+
}, `ellipsis-${index}`)) : undefined, /*#__PURE__*/jsxRuntime.jsx(ListItem, {
|
|
8558
8611
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
8559
8612
|
variant: "ghost_icon",
|
|
8560
8613
|
onClick: activePage < pages ? event => {
|
|
@@ -8572,7 +8625,12 @@ const Pagination = /*#__PURE__*/react.forwardRef(function Pagination(_ref2, ref)
|
|
|
8572
8625
|
|
|
8573
8626
|
return withItemIndicator ? /*#__PURE__*/jsxRuntime.jsxs(FlexContainer, {
|
|
8574
8627
|
children: [/*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
8575
|
-
children: currentItemFirst !== currentItemLast ?
|
|
8628
|
+
children: currentItemFirst !== currentItemLast ? `${currentItemFirst}
|
|
8629
|
+
${' - '}
|
|
8630
|
+
${currentItemLast}
|
|
8631
|
+
${' of '}
|
|
8632
|
+
${totalItems}
|
|
8633
|
+
${' items'}` : `${currentItemFirst} ${' of '} ${totalItems} ${' items'}`
|
|
8576
8634
|
}), pagination]
|
|
8577
8635
|
}) : pagination;
|
|
8578
8636
|
});
|
|
@@ -8781,7 +8839,7 @@ const select = {
|
|
|
8781
8839
|
}
|
|
8782
8840
|
}
|
|
8783
8841
|
};
|
|
8784
|
-
const multiSelect$1 = mergeDeepRight(select, {
|
|
8842
|
+
const multiSelect$1 = mergeDeepRight$1(select, {
|
|
8785
8843
|
spacings: {
|
|
8786
8844
|
top: '0',
|
|
8787
8845
|
bottom: '0',
|
|
@@ -8979,7 +9037,7 @@ const SingleSelect = /*#__PURE__*/react.forwardRef(function SingleSelect(_ref2,
|
|
|
8979
9037
|
disabled: disabled
|
|
8980
9038
|
}),
|
|
8981
9039
|
children: item
|
|
8982
|
-
},
|
|
9040
|
+
}, `${item}`))
|
|
8983
9041
|
})]
|
|
8984
9042
|
})
|
|
8985
9043
|
});
|
|
@@ -9191,7 +9249,7 @@ const CheckboxInput = /*#__PURE__*/react.forwardRef(function CheckboxInput(_ref1
|
|
|
9191
9249
|
}), indeterminate ? /*#__PURE__*/jsxRuntime.jsx(Svg$1, {
|
|
9192
9250
|
width: iconSize,
|
|
9193
9251
|
height: iconSize,
|
|
9194
|
-
viewBox:
|
|
9252
|
+
viewBox: `0 0 ${iconSize} ${iconSize}`,
|
|
9195
9253
|
fill: fill,
|
|
9196
9254
|
"aria-hidden": true,
|
|
9197
9255
|
children: /*#__PURE__*/jsxRuntime.jsx(StyledPath$1, {
|
|
@@ -9201,7 +9259,7 @@ const CheckboxInput = /*#__PURE__*/react.forwardRef(function CheckboxInput(_ref1
|
|
|
9201
9259
|
}) : /*#__PURE__*/jsxRuntime.jsxs(Svg$1, {
|
|
9202
9260
|
width: iconSize,
|
|
9203
9261
|
height: iconSize,
|
|
9204
|
-
viewBox:
|
|
9262
|
+
viewBox: `0 0 ${iconSize} ${iconSize}`,
|
|
9205
9263
|
fill: fill,
|
|
9206
9264
|
"aria-hidden": true,
|
|
9207
9265
|
children: [/*#__PURE__*/jsxRuntime.jsx(StyledPath$1, {
|
|
@@ -9339,7 +9397,7 @@ const MultiSelect = /*#__PURE__*/react.forwardRef(function MultiSelect(_ref2, re
|
|
|
9339
9397
|
}
|
|
9340
9398
|
}
|
|
9341
9399
|
});
|
|
9342
|
-
const placeholderText = items.length > 0 ?
|
|
9400
|
+
const placeholderText = items.length > 0 ? `${selectedItems.length}/${items.length} selected` : '';
|
|
9343
9401
|
|
|
9344
9402
|
const openSelect = () => {
|
|
9345
9403
|
if (!isOpen && !(disabled || readOnly)) {
|
|
@@ -9412,7 +9470,7 @@ const MultiSelect = /*#__PURE__*/react.forwardRef(function MultiSelect(_ref2, re
|
|
|
9412
9470
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
9413
9471
|
children: item
|
|
9414
9472
|
})]
|
|
9415
|
-
},
|
|
9473
|
+
}, `${item}`))
|
|
9416
9474
|
})]
|
|
9417
9475
|
})
|
|
9418
9476
|
});
|
|
@@ -9670,7 +9728,7 @@ const Radio = /*#__PURE__*/react.forwardRef(function Radio(_ref12, ref) {
|
|
|
9670
9728
|
return /*#__PURE__*/jsxRuntime.jsxs(Svg, {
|
|
9671
9729
|
width: iconSize,
|
|
9672
9730
|
height: iconSize,
|
|
9673
|
-
viewBox:
|
|
9731
|
+
viewBox: `0 0 ${iconSize} ${iconSize}`,
|
|
9674
9732
|
fill: fill,
|
|
9675
9733
|
"aria-hidden": true,
|
|
9676
9734
|
children: [/*#__PURE__*/jsxRuntime.jsx(StyledPath, {
|
|
@@ -9955,8 +10013,8 @@ const comfortable = {
|
|
|
9955
10013
|
height: clickbounds.default__base,
|
|
9956
10014
|
width: clickbounds.default__base,
|
|
9957
10015
|
offset: {
|
|
9958
|
-
top:
|
|
9959
|
-
left:
|
|
10016
|
+
top: `${(parseInt(clickbounds.default__base) - parseInt(circle.minHeight)) / 2}px`,
|
|
10017
|
+
left: `${(parseInt(clickbounds.default__base) - parseInt(circle.minWidth)) / 2}px`
|
|
9960
10018
|
}
|
|
9961
10019
|
},
|
|
9962
10020
|
entities: {
|
|
@@ -10005,8 +10063,8 @@ const comfortable = {
|
|
|
10005
10063
|
height: clickbounds.compact__standard,
|
|
10006
10064
|
width: clickbounds.compact__standard,
|
|
10007
10065
|
offset: {
|
|
10008
|
-
top:
|
|
10009
|
-
left:
|
|
10066
|
+
top: `${(parseInt(clickbounds.compact__standard) - parseInt(compactIconButton.minHeight)) / 2}px`,
|
|
10067
|
+
left: `${(parseInt(clickbounds.compact__standard) - parseInt(compactIconButton.minWidth)) / 2}px`
|
|
10010
10068
|
}
|
|
10011
10069
|
},
|
|
10012
10070
|
entities: {
|
|
@@ -10204,7 +10262,7 @@ const selectTokens = {
|
|
|
10204
10262
|
}
|
|
10205
10263
|
}
|
|
10206
10264
|
};
|
|
10207
|
-
const multiSelect = mergeDeepRight(selectTokens, {
|
|
10265
|
+
const multiSelect = mergeDeepRight$1(selectTokens, {
|
|
10208
10266
|
spacings: {
|
|
10209
10267
|
top: '0',
|
|
10210
10268
|
bottom: '0',
|
|
@@ -10583,7 +10641,7 @@ function AutocompleteInner(props, ref) {
|
|
|
10583
10641
|
}
|
|
10584
10642
|
|
|
10585
10643
|
if (multiple) {
|
|
10586
|
-
placeholderText = typeof placeholderText !== 'undefined' ? placeholderText :
|
|
10644
|
+
placeholderText = typeof placeholderText !== 'undefined' ? placeholderText : `${selectedItems.length}/${options.length - disabledItems.length} selected`;
|
|
10587
10645
|
comboBoxProps = { ...comboBoxProps,
|
|
10588
10646
|
selectedItem: null,
|
|
10589
10647
|
stateReducer: (state, actionAndChanges) => {
|
|
@@ -10680,10 +10738,10 @@ function AutocompleteInner(props, ref) {
|
|
|
10680
10738
|
availableHeight,
|
|
10681
10739
|
elements
|
|
10682
10740
|
} = _ref10;
|
|
10683
|
-
const anchorWidth =
|
|
10741
|
+
const anchorWidth = `${rects.reference.width}px`;
|
|
10684
10742
|
Object.assign(elements.floating.style, {
|
|
10685
|
-
width:
|
|
10686
|
-
maxHeight:
|
|
10743
|
+
width: `${autoWidth ? anchorWidth : 'auto'}`,
|
|
10744
|
+
maxHeight: `${availableHeight}px`
|
|
10687
10745
|
});
|
|
10688
10746
|
},
|
|
10689
10747
|
|
|
@@ -10714,8 +10772,9 @@ function AutocompleteInner(props, ref) {
|
|
|
10714
10772
|
ref: floating,
|
|
10715
10773
|
style: {
|
|
10716
10774
|
position: strategy,
|
|
10717
|
-
top: y
|
|
10718
|
-
left: x
|
|
10775
|
+
top: y || 0,
|
|
10776
|
+
left: x || 0,
|
|
10777
|
+
zIndex: 1400
|
|
10719
10778
|
}
|
|
10720
10779
|
}),
|
|
10721
10780
|
children: /*#__PURE__*/jsxRuntime.jsx(StyledList, { ...getMenuProps({
|