@pingux/astro 2.196.0 → 2.198.7-alpha.0
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/lib/cjs/components/ComboBox/ComboBoxInput.js +3 -2
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +1 -1
- package/lib/cjs/components/HelpHint/HelpHint.js +3 -18
- package/lib/cjs/components/IconButton/IconButton.styles.d.ts +2 -2
- package/lib/cjs/components/IconWrapper/IconWrapper.js +1 -3
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +9 -6
- package/lib/cjs/components/LinkSelectField/LinkSelectField.test.js +18 -0
- package/lib/cjs/components/Modal/Modal.styles.d.ts +0 -4
- package/lib/cjs/components/Modal/Modal.styles.js +1 -3
- package/lib/cjs/components/Modal/ModalHeader.js +15 -7
- package/lib/cjs/components/MultivaluesField/CondensedMultivaluesField.js +3 -3
- package/lib/cjs/components/PanelHeader/PanelHeader.js +2 -2
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +6 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +2 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +2 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +3 -0
- package/lib/cjs/styles/themeOverrides/onyxDarkUiLibraryOverride.js +3 -1
- package/lib/cjs/styles/themeOverrides/onyxSideNav.d.ts +2 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +2 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.js +21 -1
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +3 -0
- package/lib/cjs/styles/themes/astro/customProperties/index.js +3 -1
- package/lib/cjs/styles/themes/next-gen/colors/colors.js +1 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/customSizes.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/customSizes.js +3 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.js +1 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +3 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +27 -6
- package/lib/cjs/styles/themes/next-gen/next-gen.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +3 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.js +3 -0
- package/lib/cjs/styles/themes/next-gen/variants/iconWrapper.d.ts +10 -0
- package/lib/cjs/styles/themes/next-gen/variants/iconWrapper.js +2 -0
- package/lib/cjs/styles/themes/next-gen/variants/messages.d.ts +0 -1
- package/lib/cjs/styles/themes/next-gen/variants/messages.js +1 -2
- package/lib/cjs/styles/themes/next-gen/variants/panelHeader.d.ts +0 -3
- package/lib/cjs/styles/themes/next-gen/variants/panelHeader.js +1 -5
- package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +7 -0
- package/lib/cjs/styles/themes/next-gen/variants/text.js +4 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +14 -5
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +5 -2
- package/lib/cjs/types/Modal.d.ts +2 -0
- package/lib/components/ComboBox/ComboBoxInput.js +3 -2
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +1 -1
- package/lib/components/HelpHint/HelpHint.js +4 -19
- package/lib/components/IconWrapper/IconWrapper.js +1 -3
- package/lib/components/LinkSelectField/LinkSelectField.js +9 -6
- package/lib/components/LinkSelectField/LinkSelectField.test.js +18 -0
- package/lib/components/Modal/Modal.styles.js +1 -3
- package/lib/components/Modal/ModalHeader.js +15 -7
- package/lib/components/MultivaluesField/CondensedMultivaluesField.js +3 -3
- package/lib/components/PanelHeader/PanelHeader.js +2 -2
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +2 -2
- package/lib/styles/themeOverrides/onyxDarkUiLibraryOverride.js +3 -1
- package/lib/styles/themes/astro/customProperties/icons.js +21 -1
- package/lib/styles/themes/astro/customProperties/index.js +3 -1
- package/lib/styles/themes/next-gen/colors/colors.js +1 -1
- package/lib/styles/themes/next-gen/customProperties/customSizes.js +3 -1
- package/lib/styles/themes/next-gen/customProperties/icons.js +1 -1
- package/lib/styles/themes/next-gen/next-gen.js +1 -1
- package/lib/styles/themes/next-gen/variants/button.js +3 -0
- package/lib/styles/themes/next-gen/variants/iconWrapper.js +2 -0
- package/lib/styles/themes/next-gen/variants/messages.js +1 -2
- package/lib/styles/themes/next-gen/variants/panelHeader.js +1 -5
- package/lib/styles/themes/next-gen/variants/text.js +4 -0
- package/lib/styles/themes/next-gen/variants/variants.js +5 -2
- package/package.json +1 -1
|
@@ -1542,6 +1542,9 @@ declare const _default: {
|
|
|
1542
1542
|
alignSelf: string;
|
|
1543
1543
|
};
|
|
1544
1544
|
hintButton: {
|
|
1545
|
+
maxWidth: string;
|
|
1546
|
+
maxHeight: string;
|
|
1547
|
+
borderRadius: string;
|
|
1545
1548
|
backgroundColor: string;
|
|
1546
1549
|
path: {
|
|
1547
1550
|
fill: string;
|
|
@@ -2901,7 +2904,7 @@ declare const _default: {
|
|
|
2901
2904
|
};
|
|
2902
2905
|
lineHeights: {
|
|
2903
2906
|
body: any;
|
|
2904
|
-
xs:
|
|
2907
|
+
xs: any;
|
|
2905
2908
|
sm: string;
|
|
2906
2909
|
md: string;
|
|
2907
2910
|
};
|
|
@@ -3052,6 +3055,13 @@ declare const _default: {
|
|
|
3052
3055
|
base: {
|
|
3053
3056
|
lineHeight: string;
|
|
3054
3057
|
};
|
|
3058
|
+
modalTitle: {
|
|
3059
|
+
lineHeight: string;
|
|
3060
|
+
fontSize: any;
|
|
3061
|
+
fontWeight: number;
|
|
3062
|
+
color: string;
|
|
3063
|
+
fontFamily: string;
|
|
3064
|
+
};
|
|
3055
3065
|
buttonSubtitle: {
|
|
3056
3066
|
fontSize: string;
|
|
3057
3067
|
fontWeight: number;
|
|
@@ -3176,6 +3186,8 @@ declare const _default: {
|
|
|
3176
3186
|
SuccessCircle: string;
|
|
3177
3187
|
userExperienceIcon: string;
|
|
3178
3188
|
WarningIcon: string;
|
|
3189
|
+
helpHint: string;
|
|
3190
|
+
ModalCloseIcon: string;
|
|
3179
3191
|
};
|
|
3180
3192
|
fonts: {
|
|
3181
3193
|
standard: string;
|
|
@@ -5400,6 +5412,8 @@ declare const _default: {
|
|
|
5400
5412
|
};
|
|
5401
5413
|
iconWrapper: {
|
|
5402
5414
|
xs: {
|
|
5415
|
+
justifyContent: string;
|
|
5416
|
+
alignItems: string;
|
|
5403
5417
|
'&.is-circle': {
|
|
5404
5418
|
borderRadius: string;
|
|
5405
5419
|
};
|
|
@@ -5411,6 +5425,8 @@ declare const _default: {
|
|
|
5411
5425
|
fontSize: any;
|
|
5412
5426
|
};
|
|
5413
5427
|
sm: {
|
|
5428
|
+
justifyContent: string;
|
|
5429
|
+
alignItems: string;
|
|
5414
5430
|
'&.is-circle': {
|
|
5415
5431
|
borderRadius: string;
|
|
5416
5432
|
};
|
|
@@ -5422,6 +5438,8 @@ declare const _default: {
|
|
|
5422
5438
|
fontSize: any;
|
|
5423
5439
|
};
|
|
5424
5440
|
md: {
|
|
5441
|
+
justifyContent: string;
|
|
5442
|
+
alignItems: string;
|
|
5425
5443
|
'&.is-circle': {
|
|
5426
5444
|
borderRadius: string;
|
|
5427
5445
|
};
|
|
@@ -5433,6 +5451,8 @@ declare const _default: {
|
|
|
5433
5451
|
fontSize: any;
|
|
5434
5452
|
};
|
|
5435
5453
|
lg: {
|
|
5454
|
+
justifyContent: string;
|
|
5455
|
+
alignItems: string;
|
|
5436
5456
|
'&.is-circle': {
|
|
5437
5457
|
borderRadius: string;
|
|
5438
5458
|
};
|
|
@@ -5444,6 +5464,8 @@ declare const _default: {
|
|
|
5444
5464
|
fontSize: any;
|
|
5445
5465
|
};
|
|
5446
5466
|
xl: {
|
|
5467
|
+
justifyContent: string;
|
|
5468
|
+
alignItems: string;
|
|
5447
5469
|
'&.is-circle': {
|
|
5448
5470
|
borderRadius: string;
|
|
5449
5471
|
};
|
|
@@ -5457,13 +5479,15 @@ declare const _default: {
|
|
|
5457
5479
|
};
|
|
5458
5480
|
listBox: {
|
|
5459
5481
|
container: {
|
|
5460
|
-
|
|
5482
|
+
pl: string;
|
|
5483
|
+
pr: number;
|
|
5461
5484
|
py: string;
|
|
5462
5485
|
};
|
|
5463
5486
|
option: {
|
|
5464
5487
|
py: string;
|
|
5465
5488
|
pl: string;
|
|
5466
5489
|
pr: string;
|
|
5490
|
+
mr: string;
|
|
5467
5491
|
justifyContent: string;
|
|
5468
5492
|
borderRadius: string;
|
|
5469
5493
|
lineHeight: string;
|
|
@@ -5731,7 +5755,6 @@ declare const _default: {
|
|
|
5731
5755
|
message: {
|
|
5732
5756
|
wrapper: {
|
|
5733
5757
|
gap: string;
|
|
5734
|
-
right: string;
|
|
5735
5758
|
};
|
|
5736
5759
|
item: {
|
|
5737
5760
|
maxWidth: number;
|
|
@@ -5850,6 +5873,7 @@ declare const _default: {
|
|
|
5850
5873
|
borderTopColor: string;
|
|
5851
5874
|
borderRadius: string;
|
|
5852
5875
|
p: string;
|
|
5876
|
+
flexDirection: string;
|
|
5853
5877
|
};
|
|
5854
5878
|
footerContainer: {
|
|
5855
5879
|
borderTop: string;
|
|
@@ -6069,9 +6093,6 @@ declare const _default: {
|
|
|
6069
6093
|
alignSelf: string;
|
|
6070
6094
|
mr: string;
|
|
6071
6095
|
};
|
|
6072
|
-
wrapper: {
|
|
6073
|
-
mr: string;
|
|
6074
|
-
};
|
|
6075
6096
|
};
|
|
6076
6097
|
popoverMenu: {
|
|
6077
6098
|
container: {
|
|
@@ -410,6 +410,9 @@ var onyxIconButton = _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
|
410
410
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
411
411
|
});
|
|
412
412
|
var hintButton = {
|
|
413
|
+
maxWidth: 'unset',
|
|
414
|
+
maxHeight: 'unset',
|
|
415
|
+
borderRadius: '28px',
|
|
413
416
|
backgroundColor: 'transparent',
|
|
414
417
|
path: {
|
|
415
418
|
fill: 'dark'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
xs: {
|
|
3
|
+
justifyContent: string;
|
|
4
|
+
alignItems: string;
|
|
3
5
|
'&.is-circle': {
|
|
4
6
|
borderRadius: string;
|
|
5
7
|
};
|
|
@@ -11,6 +13,8 @@ declare const _default: {
|
|
|
11
13
|
fontSize: any;
|
|
12
14
|
};
|
|
13
15
|
sm: {
|
|
16
|
+
justifyContent: string;
|
|
17
|
+
alignItems: string;
|
|
14
18
|
'&.is-circle': {
|
|
15
19
|
borderRadius: string;
|
|
16
20
|
};
|
|
@@ -22,6 +26,8 @@ declare const _default: {
|
|
|
22
26
|
fontSize: any;
|
|
23
27
|
};
|
|
24
28
|
md: {
|
|
29
|
+
justifyContent: string;
|
|
30
|
+
alignItems: string;
|
|
25
31
|
'&.is-circle': {
|
|
26
32
|
borderRadius: string;
|
|
27
33
|
};
|
|
@@ -33,6 +39,8 @@ declare const _default: {
|
|
|
33
39
|
fontSize: any;
|
|
34
40
|
};
|
|
35
41
|
lg: {
|
|
42
|
+
justifyContent: string;
|
|
43
|
+
alignItems: string;
|
|
36
44
|
'&.is-circle': {
|
|
37
45
|
borderRadius: string;
|
|
38
46
|
};
|
|
@@ -44,6 +52,8 @@ declare const _default: {
|
|
|
44
52
|
fontSize: any;
|
|
45
53
|
};
|
|
46
54
|
xl: {
|
|
55
|
+
justifyContent: string;
|
|
56
|
+
alignItems: string;
|
|
47
57
|
'&.is-circle': {
|
|
48
58
|
borderRadius: string;
|
|
49
59
|
};
|
|
@@ -18,6 +18,8 @@ var _sizes = _interopRequireDefault(require("../sizes"));
|
|
|
18
18
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
20
|
var circle = {
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
alignItems: 'center',
|
|
21
23
|
'&.is-circle': {
|
|
22
24
|
borderRadius: '50%'
|
|
23
25
|
}
|
|
@@ -145,6 +145,13 @@ export declare const text: {
|
|
|
145
145
|
base: {
|
|
146
146
|
lineHeight: string;
|
|
147
147
|
};
|
|
148
|
+
modalTitle: {
|
|
149
|
+
lineHeight: string;
|
|
150
|
+
fontSize: any;
|
|
151
|
+
fontWeight: number;
|
|
152
|
+
color: string;
|
|
153
|
+
fontFamily: string;
|
|
154
|
+
};
|
|
148
155
|
buttonSubtitle: {
|
|
149
156
|
fontSize: string;
|
|
150
157
|
fontWeight: number;
|
|
@@ -123,10 +123,14 @@ var stepperTabContent = {
|
|
|
123
123
|
var stepperTabContentHeader = _objectSpread(_objectSpread({}, hTags.H2), {}, {
|
|
124
124
|
color: 'font.base'
|
|
125
125
|
});
|
|
126
|
+
var modalTitle = _objectSpread(_objectSpread({}, hTags.H3), {}, {
|
|
127
|
+
lineHeight: '2rem'
|
|
128
|
+
});
|
|
126
129
|
var text = exports.text = _objectSpread(_objectSpread({
|
|
127
130
|
base: {
|
|
128
131
|
lineHeight: 'body'
|
|
129
132
|
},
|
|
133
|
+
modalTitle: modalTitle,
|
|
130
134
|
buttonSubtitle: buttonSubtitle,
|
|
131
135
|
buttonTitle: buttonTitle,
|
|
132
136
|
pageHeaderBody: {
|
|
@@ -757,6 +757,8 @@ declare const _default: {
|
|
|
757
757
|
};
|
|
758
758
|
iconWrapper: {
|
|
759
759
|
xs: {
|
|
760
|
+
justifyContent: string;
|
|
761
|
+
alignItems: string;
|
|
760
762
|
'&.is-circle': {
|
|
761
763
|
borderRadius: string;
|
|
762
764
|
};
|
|
@@ -768,6 +770,8 @@ declare const _default: {
|
|
|
768
770
|
fontSize: any;
|
|
769
771
|
};
|
|
770
772
|
sm: {
|
|
773
|
+
justifyContent: string;
|
|
774
|
+
alignItems: string;
|
|
771
775
|
'&.is-circle': {
|
|
772
776
|
borderRadius: string;
|
|
773
777
|
};
|
|
@@ -779,6 +783,8 @@ declare const _default: {
|
|
|
779
783
|
fontSize: any;
|
|
780
784
|
};
|
|
781
785
|
md: {
|
|
786
|
+
justifyContent: string;
|
|
787
|
+
alignItems: string;
|
|
782
788
|
'&.is-circle': {
|
|
783
789
|
borderRadius: string;
|
|
784
790
|
};
|
|
@@ -790,6 +796,8 @@ declare const _default: {
|
|
|
790
796
|
fontSize: any;
|
|
791
797
|
};
|
|
792
798
|
lg: {
|
|
799
|
+
justifyContent: string;
|
|
800
|
+
alignItems: string;
|
|
793
801
|
'&.is-circle': {
|
|
794
802
|
borderRadius: string;
|
|
795
803
|
};
|
|
@@ -801,6 +809,8 @@ declare const _default: {
|
|
|
801
809
|
fontSize: any;
|
|
802
810
|
};
|
|
803
811
|
xl: {
|
|
812
|
+
justifyContent: string;
|
|
813
|
+
alignItems: string;
|
|
804
814
|
'&.is-circle': {
|
|
805
815
|
borderRadius: string;
|
|
806
816
|
};
|
|
@@ -814,13 +824,15 @@ declare const _default: {
|
|
|
814
824
|
};
|
|
815
825
|
listBox: {
|
|
816
826
|
container: {
|
|
817
|
-
|
|
827
|
+
pl: string;
|
|
828
|
+
pr: number;
|
|
818
829
|
py: string;
|
|
819
830
|
};
|
|
820
831
|
option: {
|
|
821
832
|
py: string;
|
|
822
833
|
pl: string;
|
|
823
834
|
pr: string;
|
|
835
|
+
mr: string;
|
|
824
836
|
justifyContent: string;
|
|
825
837
|
borderRadius: string;
|
|
826
838
|
lineHeight: string;
|
|
@@ -1088,7 +1100,6 @@ declare const _default: {
|
|
|
1088
1100
|
message: {
|
|
1089
1101
|
wrapper: {
|
|
1090
1102
|
gap: string;
|
|
1091
|
-
right: string;
|
|
1092
1103
|
};
|
|
1093
1104
|
item: {
|
|
1094
1105
|
maxWidth: number;
|
|
@@ -1207,6 +1218,7 @@ declare const _default: {
|
|
|
1207
1218
|
borderTopColor: string;
|
|
1208
1219
|
borderRadius: string;
|
|
1209
1220
|
p: string;
|
|
1221
|
+
flexDirection: string;
|
|
1210
1222
|
};
|
|
1211
1223
|
footerContainer: {
|
|
1212
1224
|
borderTop: string;
|
|
@@ -1426,9 +1438,6 @@ declare const _default: {
|
|
|
1426
1438
|
alignSelf: string;
|
|
1427
1439
|
mr: string;
|
|
1428
1440
|
};
|
|
1429
|
-
wrapper: {
|
|
1430
|
-
mr: string;
|
|
1431
|
-
};
|
|
1432
1441
|
};
|
|
1433
1442
|
popoverMenu: {
|
|
1434
1443
|
container: {
|
|
@@ -149,7 +149,8 @@ var modal = {
|
|
|
149
149
|
borderTop: '1px solid',
|
|
150
150
|
borderTopColor: 'gray-200',
|
|
151
151
|
borderRadius: '0px 0px 1em 1em',
|
|
152
|
-
p: 'lg'
|
|
152
|
+
p: 'lg',
|
|
153
|
+
flexDirection: 'row-reverse !important'
|
|
153
154
|
},
|
|
154
155
|
footerContainer: {
|
|
155
156
|
borderTop: '1px solid',
|
|
@@ -159,13 +160,15 @@ var modal = {
|
|
|
159
160
|
};
|
|
160
161
|
var listBox = {
|
|
161
162
|
container: {
|
|
162
|
-
|
|
163
|
+
pl: 'sm',
|
|
164
|
+
pr: 0,
|
|
163
165
|
py: 'xs'
|
|
164
166
|
},
|
|
165
167
|
option: {
|
|
166
168
|
py: '.75rem',
|
|
167
169
|
pl: '.75rem',
|
|
168
170
|
pr: 'md',
|
|
171
|
+
mr: 'sm',
|
|
169
172
|
justifyContent: 'space-between',
|
|
170
173
|
borderRadius: '4px',
|
|
171
174
|
lineHeight: 'body',
|
package/lib/cjs/types/Modal.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AstroOverlayTriggerState } from '../hooks/useModalState/useModalState';
|
|
|
3
3
|
import { DOMAttributes } from './shared/dom';
|
|
4
4
|
import { ModalSizeProps, StyleProps } from './shared/style';
|
|
5
5
|
import { TestingAttributes } from './shared/test';
|
|
6
|
+
import { IconButtonProps } from './iconButton';
|
|
6
7
|
export interface ModalProps extends DOMAttributes, TestingAttributes {
|
|
7
8
|
/** Used in tandem with `hasCloseButton` to customize how the close button is rendered. */
|
|
8
9
|
closeButton?: ReactNode;
|
|
@@ -70,6 +71,7 @@ export interface ModalHeaderProps extends StyleProps {
|
|
|
70
71
|
onClose?: () => void;
|
|
71
72
|
title?: ReactNode;
|
|
72
73
|
hasNoSeparator?: boolean;
|
|
74
|
+
closeButtonProps?: IconButtonProps;
|
|
73
75
|
}
|
|
74
76
|
export type ModalFooterProps = {
|
|
75
77
|
onSubmit?: () => void;
|
|
@@ -93,8 +93,9 @@ var ComboBoxInput = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
93
93
|
transform: 'rotate(180deg)'
|
|
94
94
|
} : null,
|
|
95
95
|
title: {
|
|
96
|
-
name: '
|
|
97
|
-
}
|
|
96
|
+
name: ''
|
|
97
|
+
},
|
|
98
|
+
"aria-hidden": "true"
|
|
98
99
|
}))));
|
|
99
100
|
return ___EmotionJSX(FocusRing, {
|
|
100
101
|
within: true,
|
|
@@ -273,7 +273,7 @@ var EnvironmentBreadcrumb = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
273
273
|
onChange: function onChange(val) {
|
|
274
274
|
return setSearchValue(val);
|
|
275
275
|
},
|
|
276
|
-
p: "
|
|
276
|
+
p: "sm"
|
|
277
277
|
}, searchProps)), ___EmotionJSX(VisuallyHidden, {
|
|
278
278
|
role: "alert",
|
|
279
279
|
"aria-live": "polite",
|
|
@@ -9,27 +9,10 @@ import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
|
9
9
|
import { FocusScope, mergeProps, useFocusRing, useFocusWithin, useOverlayPosition, useOverlayTrigger } from 'react-aria';
|
|
10
10
|
import { useOverlayTriggerState } from 'react-stately';
|
|
11
11
|
import { useHover } from '@react-aria/interactions';
|
|
12
|
-
import { v4 as uuid } from 'uuid';
|
|
13
12
|
import { Box, Icon, IconButton, PopoverContainer } from '../..';
|
|
14
|
-
import { useLocalOrForwardRef, useStatusClasses } from '../../hooks';
|
|
13
|
+
import { useGetTheme, useLocalOrForwardRef, useStatusClasses } from '../../hooks';
|
|
15
14
|
import { isSafari } from '../../styles/safariAgent';
|
|
16
15
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
-
var HelpIcon = function HelpIcon() {
|
|
18
|
-
var uid = uuid();
|
|
19
|
-
return ___EmotionJSX("svg", {
|
|
20
|
-
width: "7",
|
|
21
|
-
height: "9",
|
|
22
|
-
viewBox: "0 0 7 9",
|
|
23
|
-
fill: "none",
|
|
24
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
-
"aria-labelledby": uid
|
|
26
|
-
}, ___EmotionJSX("title", {
|
|
27
|
-
id: uid
|
|
28
|
-
}, "Help Icon"), ___EmotionJSX("path", {
|
|
29
|
-
d: "M2.56685 7.306V9H4.29385V7.306H2.56685ZM0.795848 3.676H2.41285C2.41285 3.478 2.43485 3.29467 2.47885 3.126C2.52285 2.95 2.58885 2.79967 2.67685 2.675C2.77218 2.543 2.88951 2.44033 3.02885 2.367C3.17551 2.28633 3.34785 2.246 3.54585 2.246C3.83918 2.246 4.06651 2.32667 4.22785 2.488C4.39651 2.64933 4.48085 2.89867 4.48085 3.236C4.48818 3.434 4.45151 3.599 4.37085 3.731C4.29751 3.863 4.19851 3.984 4.07385 4.094C3.94918 4.204 3.81351 4.314 3.66685 4.424C3.52018 4.534 3.38085 4.666 3.24885 4.82C3.11685 4.96667 2.99951 5.14633 2.89685 5.359C2.80151 5.57167 2.74285 5.83567 2.72085 6.151V6.646H4.20585V6.228C4.23518 6.008 4.30485 5.82467 4.41485 5.678C4.53218 5.53133 4.66418 5.403 4.81085 5.293C4.95751 5.17567 5.11151 5.062 5.27285 4.952C5.44151 4.83467 5.59185 4.69533 5.72385 4.534C5.86318 4.37267 5.97685 4.17833 6.06485 3.951C6.16018 3.72367 6.20785 3.434 6.20785 3.082C6.20785 2.86933 6.16018 2.642 6.06485 2.4C5.97685 2.15067 5.82651 1.91967 5.61385 1.707C5.40118 1.49433 5.11885 1.31833 4.76685 1.179C4.42218 1.03233 3.98951 0.959 3.46885 0.959C3.06551 0.959 2.69885 1.02867 2.36885 1.168C2.04618 1.3 1.76751 1.487 1.53285 1.729C1.30551 1.971 1.12585 2.257 0.993848 2.587C0.869181 2.917 0.803181 3.28 0.795848 3.676Z",
|
|
30
|
-
fill: "#3B4A58"
|
|
31
|
-
}));
|
|
32
|
-
};
|
|
33
16
|
var HelpHint = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
34
17
|
var _context;
|
|
35
18
|
var align = props.align,
|
|
@@ -45,6 +28,8 @@ var HelpHint = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
45
28
|
popoverProps = props.popoverProps,
|
|
46
29
|
tooltipProps = props.tooltipProps,
|
|
47
30
|
others = _objectWithoutProperties(props, _excluded);
|
|
31
|
+
var _useGetTheme = useGetTheme(),
|
|
32
|
+
icons = _useGetTheme.icons;
|
|
48
33
|
var _useState = useState(false),
|
|
49
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
50
35
|
isFocusWithinOverlay = _useState2[0],
|
|
@@ -133,7 +118,7 @@ var HelpHint = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
133
118
|
"data-testid": "help-hint__button",
|
|
134
119
|
variant: "hintButton"
|
|
135
120
|
}, mergeProps(triggerProps, iconButtonProps, focusProps, hoverProps)), ___EmotionJSX(Icon, {
|
|
136
|
-
icon:
|
|
121
|
+
icon: icons.helpHint
|
|
137
122
|
})), ___EmotionJSX(PopoverContainer, _extends({
|
|
138
123
|
arrowCrossOffset: arrowCrossOffset,
|
|
139
124
|
arrowProps: {
|
|
@@ -53,9 +53,7 @@ var IconWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
53
53
|
sx: _objectSpread({
|
|
54
54
|
backgroundColor: "iconWrapper.wrapper.".concat(finalColor)
|
|
55
55
|
}, sx),
|
|
56
|
-
className: classNames
|
|
57
|
-
justifyContent: "center",
|
|
58
|
-
alignItems: "center"
|
|
56
|
+
className: classNames
|
|
59
57
|
}, wrapperProps), ___EmotionJSX(Icon, _extends({
|
|
60
58
|
icon: icon,
|
|
61
59
|
size: sizeProps.size,
|
|
@@ -31,8 +31,10 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
31
31
|
isDisabled = props.isDisabled,
|
|
32
32
|
status = props.status,
|
|
33
33
|
helperText = props.helperText,
|
|
34
|
+
iconProps = props.iconProps,
|
|
34
35
|
hasInlineLoader = props.hasInlineLoader,
|
|
35
|
-
popoverWidth = props.popoverWidth
|
|
36
|
+
popoverWidth = props.popoverWidth,
|
|
37
|
+
triggerProps = props.triggerProps;
|
|
36
38
|
var _getAriaAttributeProp = getAriaAttributeProps(props),
|
|
37
39
|
ariaProps = _getAriaAttributeProp.ariaProps;
|
|
38
40
|
var _useGetTheme = useGetTheme(),
|
|
@@ -53,14 +55,14 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
53
55
|
var fieldControlInputProps = selectFieldProps.fieldControlInputProps,
|
|
54
56
|
isLoadingInitial = selectFieldProps.isLoadingInitial,
|
|
55
57
|
state = selectFieldProps.state,
|
|
56
|
-
|
|
58
|
+
raTriggerProps = selectFieldProps.triggerProps,
|
|
57
59
|
triggerRef = selectFieldProps.triggerRef;
|
|
58
60
|
var trigger = ___EmotionJSX(Button, _extends({
|
|
59
61
|
className: fieldControlInputProps.className,
|
|
60
62
|
ref: triggerRef,
|
|
61
63
|
variant: "link",
|
|
62
64
|
tabIndex: isDisabled ? -1 : 0
|
|
63
|
-
}, getPendoID(displayName), triggerProps, ariaProps, {
|
|
65
|
+
}, getPendoID(displayName), triggerProps, raTriggerProps, ariaProps, {
|
|
64
66
|
"aria-describedby": helperText && helperTextId
|
|
65
67
|
}), ___EmotionJSX(Text, {
|
|
66
68
|
variant: "label",
|
|
@@ -73,15 +75,16 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
73
75
|
as: "span",
|
|
74
76
|
"aria-hidden": "true",
|
|
75
77
|
variant: "forms.select.arrow"
|
|
76
|
-
}, ___EmotionJSX(Icon, {
|
|
78
|
+
}, ___EmotionJSX(Icon, _extends({
|
|
77
79
|
icon: MenuDown,
|
|
78
80
|
title: {
|
|
79
81
|
name: 'Menu Down Icon'
|
|
80
|
-
}
|
|
82
|
+
}
|
|
83
|
+
}, iconProps, {
|
|
81
84
|
sx: state.isOpen ? {
|
|
82
85
|
transform: 'rotate(180deg)'
|
|
83
86
|
} : null
|
|
84
|
-
}))), ___EmotionJSX(VisuallyHidden, {
|
|
87
|
+
})))), ___EmotionJSX(VisuallyHidden, {
|
|
85
88
|
"aria-live": "polite",
|
|
86
89
|
id: helperTextId
|
|
87
90
|
}, helperText));
|
|
@@ -228,6 +228,24 @@ test('passing helper text should display it and correct aria attributes on input
|
|
|
228
228
|
var helperTextID = helper.getAttribute('id');
|
|
229
229
|
expect(screen.getByRole('button')).toHaveAttribute('aria-describedby', helperTextID);
|
|
230
230
|
});
|
|
231
|
+
test('iconProps are spread to the icon element', function () {
|
|
232
|
+
var iconTestId = 'custom-icon';
|
|
233
|
+
getComponent({
|
|
234
|
+
iconProps: {
|
|
235
|
+
'data-testid': iconTestId
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
expect(screen.getByTestId(iconTestId)).toBeInTheDocument();
|
|
239
|
+
});
|
|
240
|
+
test('triggerProps are spread to the trigger button', function () {
|
|
241
|
+
getComponent({
|
|
242
|
+
triggerProps: {
|
|
243
|
+
'data-custom': 'custom-trigger'
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
var button = screen.getByRole('button');
|
|
247
|
+
expect(button).toHaveAttribute('data-custom', 'custom-trigger');
|
|
248
|
+
});
|
|
231
249
|
|
|
232
250
|
// Needs to be added to each components test file
|
|
233
251
|
universalComponentTests({
|
|
@@ -9,11 +9,11 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
|
9
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
10
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
11
11
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
12
|
-
var _excluded = ["closeButton", "hasCloseButton", "title", "onClose", "containerProps", "titleProps", "hasNoSeparator"];
|
|
12
|
+
var _excluded = ["closeButton", "hasCloseButton", "title", "onClose", "containerProps", "titleProps", "hasNoSeparator", "closeButtonProps"];
|
|
13
13
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
15
|
import React, { forwardRef } from 'react';
|
|
16
|
-
import
|
|
16
|
+
import { useGetTheme } from '../../hooks';
|
|
17
17
|
import Box from '../Box';
|
|
18
18
|
import Icon from '../Icon';
|
|
19
19
|
import IconButton from '../IconButton';
|
|
@@ -27,10 +27,17 @@ var ModalHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
27
27
|
containerProps = props.containerProps,
|
|
28
28
|
titleProps = props.titleProps,
|
|
29
29
|
hasNoSeparator = props.hasNoSeparator,
|
|
30
|
+
closeButtonProps = props.closeButtonProps,
|
|
30
31
|
rest = _objectWithoutProperties(props, _excluded);
|
|
32
|
+
var _useGetTheme = useGetTheme(),
|
|
33
|
+
icons = _useGetTheme.icons,
|
|
34
|
+
modalCloseIconSize = _useGetTheme.modalCloseIconSize;
|
|
35
|
+
var ModalCloseIcon = icons.ModalCloseIcon;
|
|
31
36
|
var titleContent = typeof title === 'string' && title ? ___EmotionJSX(Box, {
|
|
32
37
|
flex: "1"
|
|
33
|
-
}, ___EmotionJSX(Text, _extends({
|
|
38
|
+
}, ___EmotionJSX(Text, _extends({
|
|
39
|
+
as: "h3"
|
|
40
|
+
}, titleProps, {
|
|
34
41
|
variant: "modalTitle",
|
|
35
42
|
role: "heading",
|
|
36
43
|
"aria-level": 1
|
|
@@ -45,16 +52,17 @@ var ModalHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
45
52
|
sx: _objectSpread({
|
|
46
53
|
borderBottomWidth: hasNoSeparator ? '0px' : '1px'
|
|
47
54
|
}, rest.sx)
|
|
48
|
-
}, containerProps, rest), titleContent, hasCloseButton && (closeButton !== null && closeButton !== void 0 ? closeButton : ___EmotionJSX(IconButton, {
|
|
55
|
+
}, containerProps, rest), titleContent, hasCloseButton && (closeButton !== null && closeButton !== void 0 ? closeButton : ___EmotionJSX(IconButton, _extends({
|
|
49
56
|
"aria-label": "Close modal window",
|
|
50
57
|
"data-id": "icon-button__close-modal-window",
|
|
51
58
|
variant: "modalHeaderCloseButton",
|
|
52
59
|
onPress: onClose
|
|
53
|
-
}, ___EmotionJSX(Icon, {
|
|
54
|
-
icon:
|
|
60
|
+
}, closeButtonProps), ___EmotionJSX(Icon, {
|
|
61
|
+
icon: ModalCloseIcon,
|
|
55
62
|
title: {
|
|
56
63
|
name: 'Close Icon'
|
|
57
|
-
}
|
|
64
|
+
},
|
|
65
|
+
size: modalCloseIconSize
|
|
58
66
|
}))));
|
|
59
67
|
});
|
|
60
68
|
ModalHeader.displayName = 'ModalHeader';
|
|
@@ -382,15 +382,15 @@ var CondensedMultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
382
382
|
onClick: handleButtonPress,
|
|
383
383
|
sx: {
|
|
384
384
|
border: 'none'
|
|
385
|
+
},
|
|
386
|
+
title: {
|
|
387
|
+
name: ''
|
|
385
388
|
}
|
|
386
389
|
}, ___EmotionJSX(Icon, _extends({
|
|
387
390
|
icon: isOpen ? MenuUp : MenuDown
|
|
388
391
|
}, isOnyx && {
|
|
389
392
|
size: 'sm'
|
|
390
393
|
}, {
|
|
391
|
-
title: {
|
|
392
|
-
name: ''
|
|
393
|
-
},
|
|
394
394
|
"aria-hidden": "true"
|
|
395
395
|
}))));
|
|
396
396
|
return ___EmotionJSX(MultivaluesContext.Provider, {
|