@telus-uds/components-base 1.85.0 → 1.86.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/CHANGELOG.md +24 -2
- package/lib/Footnote/FootnoteLink.js +4 -0
- package/lib/Link/TextButton.js +17 -7
- package/lib/List/ListItemContent.js +3 -2
- package/lib/Modal/ModalContent.js +6 -8
- package/lib/Select/Picker.js +4 -0
- package/lib/Select/Select.js +1 -1
- package/lib-module/Footnote/FootnoteLink.js +4 -0
- package/lib-module/Link/TextButton.js +17 -7
- package/lib-module/List/ListItemContent.js +3 -2
- package/lib-module/Modal/ModalContent.js +6 -8
- package/lib-module/Select/Picker.js +5 -1
- package/lib-module/Select/Select.js +2 -2
- package/package.json +2 -2
- package/src/Footnote/FootnoteLink.jsx +4 -1
- package/src/Link/TextButton.jsx +17 -9
- package/src/List/ListItemContent.jsx +2 -2
- package/src/Modal/ModalContent.jsx +3 -5
- package/src/Select/Picker.jsx +6 -1
- package/src/Select/Select.jsx +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri,
|
|
3
|
+
This log was last generated on Fri, 07 Jun 2024 22:36:16 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.86.0
|
|
8
|
+
|
|
9
|
+
Fri, 07 Jun 2024 22:36:16 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- `List`: Add `itemTextColor` token (kristina.kirpichnikova@telus.com)
|
|
14
|
+
- Select: data-di-mask attribute added (35577399+JoshHC@users.noreply.github.com)
|
|
15
|
+
- Bump @telus-uds/system-theme-tokens to v2.57.0
|
|
16
|
+
|
|
17
|
+
### Patches
|
|
18
|
+
|
|
19
|
+
- `Modal`: `cancelButtonText` wrapping fixed when rendered with longer text (35577399+JoshHC@users.noreply.github.com)
|
|
20
|
+
|
|
21
|
+
## 1.85.1
|
|
22
|
+
|
|
23
|
+
Thu, 23 May 2024 16:30:28 GMT
|
|
24
|
+
|
|
25
|
+
### Patches
|
|
26
|
+
|
|
27
|
+
- `Footnote`: fix inline render (guillermo.peitzner@telus.com)
|
|
28
|
+
|
|
7
29
|
## 1.85.0
|
|
8
30
|
|
|
9
|
-
Fri, 17 May 2024 16:
|
|
31
|
+
Fri, 17 May 2024 16:34:46 GMT
|
|
10
32
|
|
|
11
33
|
### Minor changes
|
|
12
34
|
|
|
@@ -61,6 +61,7 @@ const FootnoteLink = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
61
61
|
});
|
|
62
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
63
63
|
ref: ref,
|
|
64
|
+
style: staticStyles.container,
|
|
64
65
|
children: numbers.map((num, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
65
66
|
accessibilityLabel: getCopy('a11yLabel'),
|
|
66
67
|
ref: refs[index],
|
|
@@ -107,5 +108,8 @@ const staticStyles = _StyleSheet.default.create({
|
|
|
107
108
|
text: {
|
|
108
109
|
position: 'relative',
|
|
109
110
|
textDecorationLine: 'underline'
|
|
111
|
+
},
|
|
112
|
+
container: {
|
|
113
|
+
flexDirection: 'row'
|
|
110
114
|
}
|
|
111
115
|
});
|
package/lib/Link/TextButton.js
CHANGED
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
|
|
10
|
+
var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
|
|
9
11
|
var _ThemeProvider = require("../ThemeProvider");
|
|
10
12
|
var _LinkBase = _interopRequireDefault(require("./LinkBase"));
|
|
11
13
|
var _utils = require("../utils");
|
|
@@ -25,15 +27,23 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
25
27
|
...linkProps
|
|
26
28
|
} = _ref;
|
|
27
29
|
const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('Link', tokens, variant);
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
31
|
+
style: styles.textButton,
|
|
32
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinkBase.default, {
|
|
33
|
+
onPress: onPress,
|
|
34
|
+
accessibilityRole: accessibilityRole,
|
|
35
|
+
tokens: getTokens,
|
|
36
|
+
ref: ref,
|
|
37
|
+
...linkProps,
|
|
38
|
+
children: children
|
|
39
|
+
})
|
|
35
40
|
});
|
|
36
41
|
});
|
|
42
|
+
const styles = _StyleSheet.default.create({
|
|
43
|
+
textButton: {
|
|
44
|
+
flex: 1
|
|
45
|
+
}
|
|
46
|
+
});
|
|
37
47
|
TextButton.displayName = 'TextButton';
|
|
38
48
|
TextButton.propTypes = {
|
|
39
49
|
..._LinkBase.default.propTypes,
|
|
@@ -26,10 +26,11 @@ const selectItemTextStyles = (_ref, themeOptions) => {
|
|
|
26
26
|
itemFontSize,
|
|
27
27
|
itemLineHeight,
|
|
28
28
|
itemFontName,
|
|
29
|
-
itemFontColor
|
|
29
|
+
itemFontColor,
|
|
30
|
+
itemTextColor
|
|
30
31
|
} = _ref;
|
|
31
32
|
return (0, _ThemeProvider.applyTextStyles)({
|
|
32
|
-
fontColor: itemFontColor,
|
|
33
|
+
fontColor: itemFontColor || itemTextColor,
|
|
33
34
|
fontWeight: itemFontWeight,
|
|
34
35
|
fontSize: itemFontSize,
|
|
35
36
|
lineHeight: itemLineHeight,
|
|
@@ -141,14 +141,12 @@ const ModalContent = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
141
141
|
},
|
|
142
142
|
onPress: onConfirm,
|
|
143
143
|
children: confirmButtonText
|
|
144
|
-
}), hasCancelButton ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
children: cancelButtonText
|
|
151
|
-
})
|
|
144
|
+
}), hasCancelButton ? /*#__PURE__*/(0, _jsxRuntime.jsx)(CancelButton, {
|
|
145
|
+
tokens: {
|
|
146
|
+
color: cancelButtonColor
|
|
147
|
+
},
|
|
148
|
+
onPress: onCancel,
|
|
149
|
+
children: cancelButtonText
|
|
152
150
|
}) : null]
|
|
153
151
|
})]
|
|
154
152
|
});
|
package/lib/Select/Picker.js
CHANGED
|
@@ -9,6 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _utils = require("../utils");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.htmlAttrs]);
|
|
12
13
|
const Picker = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
13
14
|
let {
|
|
14
15
|
value,
|
|
@@ -25,6 +26,7 @@ const Picker = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
25
26
|
testID,
|
|
26
27
|
...rest
|
|
27
28
|
} = _ref;
|
|
29
|
+
const selectedProps = selectProps(rest);
|
|
28
30
|
const {
|
|
29
31
|
accessibilityLabel,
|
|
30
32
|
accessibilityDescribedBy,
|
|
@@ -45,6 +47,7 @@ const Picker = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
45
47
|
"aria-describedby": accessibilityDescribedBy,
|
|
46
48
|
"aria-invalid": accessibilityInvalid,
|
|
47
49
|
"data-testid": testID,
|
|
50
|
+
...selectedProps,
|
|
48
51
|
children: [placeholder !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
|
|
49
52
|
value: placeholder.value,
|
|
50
53
|
disabled: true,
|
|
@@ -57,6 +60,7 @@ Picker.displayName = 'Picker';
|
|
|
57
60
|
var _default = Picker;
|
|
58
61
|
exports.default = _default;
|
|
59
62
|
Picker.propTypes = {
|
|
63
|
+
...selectedSystemPropTypes,
|
|
60
64
|
value: _propTypes.default.string,
|
|
61
65
|
onChange: _propTypes.default.func,
|
|
62
66
|
onFocus: _propTypes.default.func,
|
package/lib/Select/Select.js
CHANGED
|
@@ -16,7 +16,7 @@ var _InputSupports = _interopRequireDefault(require("../InputSupports"));
|
|
|
16
16
|
var _constants = require("./constants");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.inputSupportsProps, _utils.viewProps]);
|
|
19
|
+
const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.inputSupportsProps, _utils.viewProps, _utils.htmlAttrs]);
|
|
20
20
|
const selectInputStyles = (_ref, themeOptions, inactive) => {
|
|
21
21
|
let {
|
|
22
22
|
backgroundColor,
|
|
@@ -54,6 +54,7 @@ const FootnoteLink = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
54
54
|
});
|
|
55
55
|
return /*#__PURE__*/_jsx(View, {
|
|
56
56
|
ref: ref,
|
|
57
|
+
style: staticStyles.container,
|
|
57
58
|
children: numbers.map((num, index) => /*#__PURE__*/_jsx(View, {
|
|
58
59
|
accessibilityLabel: getCopy('a11yLabel'),
|
|
59
60
|
ref: refs[index],
|
|
@@ -99,5 +100,8 @@ const staticStyles = StyleSheet.create({
|
|
|
99
100
|
text: {
|
|
100
101
|
position: 'relative',
|
|
101
102
|
textDecorationLine: 'underline'
|
|
103
|
+
},
|
|
104
|
+
container: {
|
|
105
|
+
flexDirection: 'row'
|
|
102
106
|
}
|
|
103
107
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import View from "react-native-web/dist/exports/View";
|
|
4
|
+
import StyleSheet from "react-native-web/dist/exports/StyleSheet";
|
|
3
5
|
import { useThemeTokensCallback } from '../ThemeProvider';
|
|
4
6
|
import LinkBase from './LinkBase';
|
|
5
7
|
import { variantProp } from '../utils';
|
|
@@ -20,15 +22,23 @@ const TextButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
20
22
|
...linkProps
|
|
21
23
|
} = _ref;
|
|
22
24
|
const getTokens = useThemeTokensCallback('Link', tokens, variant);
|
|
23
|
-
return /*#__PURE__*/_jsx(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
return /*#__PURE__*/_jsx(View, {
|
|
26
|
+
style: styles.textButton,
|
|
27
|
+
children: /*#__PURE__*/_jsx(LinkBase, {
|
|
28
|
+
onPress: onPress,
|
|
29
|
+
accessibilityRole: accessibilityRole,
|
|
30
|
+
tokens: getTokens,
|
|
31
|
+
ref: ref,
|
|
32
|
+
...linkProps,
|
|
33
|
+
children: children
|
|
34
|
+
})
|
|
30
35
|
});
|
|
31
36
|
});
|
|
37
|
+
const styles = StyleSheet.create({
|
|
38
|
+
textButton: {
|
|
39
|
+
flex: 1
|
|
40
|
+
}
|
|
41
|
+
});
|
|
32
42
|
TextButton.displayName = 'TextButton';
|
|
33
43
|
TextButton.propTypes = {
|
|
34
44
|
...LinkBase.propTypes,
|
|
@@ -18,10 +18,11 @@ const selectItemTextStyles = (_ref, themeOptions) => {
|
|
|
18
18
|
itemFontSize,
|
|
19
19
|
itemLineHeight,
|
|
20
20
|
itemFontName,
|
|
21
|
-
itemFontColor
|
|
21
|
+
itemFontColor,
|
|
22
|
+
itemTextColor
|
|
22
23
|
} = _ref;
|
|
23
24
|
return applyTextStyles({
|
|
24
|
-
fontColor: itemFontColor,
|
|
25
|
+
fontColor: itemFontColor || itemTextColor,
|
|
25
26
|
fontWeight: itemFontWeight,
|
|
26
27
|
fontSize: itemFontSize,
|
|
27
28
|
lineHeight: itemLineHeight,
|
|
@@ -135,14 +135,12 @@ const ModalContent = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
135
135
|
},
|
|
136
136
|
onPress: onConfirm,
|
|
137
137
|
children: confirmButtonText
|
|
138
|
-
}), hasCancelButton ? /*#__PURE__*/_jsx(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
children: cancelButtonText
|
|
145
|
-
})
|
|
138
|
+
}), hasCancelButton ? /*#__PURE__*/_jsx(CancelButton, {
|
|
139
|
+
tokens: {
|
|
140
|
+
color: cancelButtonColor
|
|
141
|
+
},
|
|
142
|
+
onPress: onCancel,
|
|
143
|
+
children: cancelButtonText
|
|
146
144
|
}) : null]
|
|
147
145
|
})]
|
|
148
146
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { componentPropType } from '../utils';
|
|
3
|
+
import { componentPropType, selectSystemProps, htmlAttrs } from '../utils';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
6
7
|
const Picker = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
7
8
|
let {
|
|
8
9
|
value,
|
|
@@ -19,6 +20,7 @@ const Picker = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
19
20
|
testID,
|
|
20
21
|
...rest
|
|
21
22
|
} = _ref;
|
|
23
|
+
const selectedProps = selectProps(rest);
|
|
22
24
|
const {
|
|
23
25
|
accessibilityLabel,
|
|
24
26
|
accessibilityDescribedBy,
|
|
@@ -39,6 +41,7 @@ const Picker = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
39
41
|
"aria-describedby": accessibilityDescribedBy,
|
|
40
42
|
"aria-invalid": accessibilityInvalid,
|
|
41
43
|
"data-testid": testID,
|
|
44
|
+
...selectedProps,
|
|
42
45
|
children: [placeholder !== undefined && /*#__PURE__*/_jsx("option", {
|
|
43
46
|
value: placeholder.value,
|
|
44
47
|
disabled: true,
|
|
@@ -50,6 +53,7 @@ const Picker = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
50
53
|
Picker.displayName = 'Picker';
|
|
51
54
|
export default Picker;
|
|
52
55
|
Picker.propTypes = {
|
|
56
|
+
...selectedSystemPropTypes,
|
|
53
57
|
value: PropTypes.string,
|
|
54
58
|
onChange: PropTypes.func,
|
|
55
59
|
onFocus: PropTypes.func,
|
|
@@ -4,13 +4,13 @@ import Platform from "react-native-web/dist/exports/Platform";
|
|
|
4
4
|
import StyleSheet from "react-native-web/dist/exports/StyleSheet";
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { applyTextStyles, useThemeTokens, applyOuterBorder, useTheme } from '../ThemeProvider';
|
|
7
|
-
import { a11yProps, componentPropType, getTokensPropType, inputSupportsProps, selectSystemProps, useInputValue, variantProp, viewProps } from '../utils';
|
|
7
|
+
import { a11yProps, componentPropType, getTokensPropType, inputSupportsProps, selectSystemProps, useInputValue, variantProp, viewProps, htmlAttrs } from '../utils';
|
|
8
8
|
import Picker from './Picker';
|
|
9
9
|
import InputSupports from '../InputSupports';
|
|
10
10
|
import { ANDROID_VALIDATION_ICON_CONTAINER_OFFSET } from './constants';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, inputSupportsProps, viewProps]);
|
|
13
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, inputSupportsProps, viewProps, htmlAttrs]);
|
|
14
14
|
const selectInputStyles = (_ref, themeOptions, inactive) => {
|
|
15
15
|
let {
|
|
16
16
|
backgroundColor,
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@floating-ui/react-native": "^0.8.1",
|
|
12
12
|
"@gorhom/portal": "^1.0.14",
|
|
13
13
|
"@telus-uds/system-constants": "^1.3.0",
|
|
14
|
-
"@telus-uds/system-theme-tokens": "^2.
|
|
14
|
+
"@telus-uds/system-theme-tokens": "^2.57.0",
|
|
15
15
|
"airbnb-prop-types": "^2.16.0",
|
|
16
16
|
"css-mediaquery": "^0.1.2",
|
|
17
17
|
"expo-linear-gradient": "^12.5.0",
|
|
@@ -85,6 +85,6 @@
|
|
|
85
85
|
"standard-engine": {
|
|
86
86
|
"skip": true
|
|
87
87
|
},
|
|
88
|
-
"version": "1.
|
|
88
|
+
"version": "1.86.0",
|
|
89
89
|
"types": "types/index.d.ts"
|
|
90
90
|
}
|
|
@@ -45,7 +45,7 @@ const FootnoteLink = React.forwardRef(
|
|
|
45
45
|
const getCopy = useCopy({ dictionary, copy })
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
<View ref={ref}>
|
|
48
|
+
<View ref={ref} style={staticStyles.container}>
|
|
49
49
|
{numbers.map((num, index) => (
|
|
50
50
|
<View
|
|
51
51
|
accessibilityLabel={getCopy('a11yLabel')}
|
|
@@ -103,5 +103,8 @@ const staticStyles = StyleSheet.create({
|
|
|
103
103
|
text: {
|
|
104
104
|
position: 'relative',
|
|
105
105
|
textDecorationLine: 'underline'
|
|
106
|
+
},
|
|
107
|
+
container: {
|
|
108
|
+
flexDirection: 'row'
|
|
106
109
|
}
|
|
107
110
|
})
|
package/src/Link/TextButton.jsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
4
|
import { useThemeTokensCallback } from '../ThemeProvider'
|
|
4
5
|
import LinkBase from './LinkBase'
|
|
5
6
|
import { variantProp } from '../utils'
|
|
@@ -13,18 +14,25 @@ const TextButton = React.forwardRef(
|
|
|
13
14
|
({ onPress, children, variant, tokens, accessibilityRole = 'button', ...linkProps }, ref) => {
|
|
14
15
|
const getTokens = useThemeTokensCallback('Link', tokens, variant)
|
|
15
16
|
return (
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
<View style={styles.textButton}>
|
|
18
|
+
<LinkBase
|
|
19
|
+
onPress={onPress}
|
|
20
|
+
accessibilityRole={accessibilityRole}
|
|
21
|
+
tokens={getTokens}
|
|
22
|
+
ref={ref}
|
|
23
|
+
{...linkProps}
|
|
24
|
+
>
|
|
25
|
+
{children}
|
|
26
|
+
</LinkBase>
|
|
27
|
+
</View>
|
|
25
28
|
)
|
|
26
29
|
}
|
|
27
30
|
)
|
|
31
|
+
const styles = StyleSheet.create({
|
|
32
|
+
textButton: {
|
|
33
|
+
flex: 1
|
|
34
|
+
}
|
|
35
|
+
})
|
|
28
36
|
TextButton.displayName = 'TextButton'
|
|
29
37
|
|
|
30
38
|
TextButton.propTypes = {
|
|
@@ -14,11 +14,11 @@ export const tokenTypes = {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const selectItemTextStyles = (
|
|
17
|
-
{ itemFontWeight, itemFontSize, itemLineHeight, itemFontName, itemFontColor },
|
|
17
|
+
{ itemFontWeight, itemFontSize, itemLineHeight, itemFontName, itemFontColor, itemTextColor },
|
|
18
18
|
themeOptions
|
|
19
19
|
) =>
|
|
20
20
|
applyTextStyles({
|
|
21
|
-
fontColor: itemFontColor,
|
|
21
|
+
fontColor: itemFontColor || itemTextColor,
|
|
22
22
|
fontWeight: itemFontWeight,
|
|
23
23
|
fontSize: itemFontSize,
|
|
24
24
|
lineHeight: itemLineHeight,
|
|
@@ -133,11 +133,9 @@ const ModalContent = React.forwardRef(
|
|
|
133
133
|
</Button>
|
|
134
134
|
)}
|
|
135
135
|
{hasCancelButton ? (
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
</CancelButton>
|
|
140
|
-
</View>
|
|
136
|
+
<CancelButton tokens={{ color: cancelButtonColor }} onPress={onCancel}>
|
|
137
|
+
{cancelButtonText}
|
|
138
|
+
</CancelButton>
|
|
141
139
|
) : null}
|
|
142
140
|
</View>
|
|
143
141
|
)}
|
package/src/Select/Picker.jsx
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
|
-
import { componentPropType } from '../utils'
|
|
4
|
+
import { componentPropType, selectSystemProps, htmlAttrs } from '../utils'
|
|
5
|
+
|
|
6
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
5
7
|
|
|
6
8
|
const Picker = React.forwardRef(
|
|
7
9
|
(
|
|
@@ -22,6 +24,7 @@ const Picker = React.forwardRef(
|
|
|
22
24
|
},
|
|
23
25
|
ref
|
|
24
26
|
) => {
|
|
27
|
+
const selectedProps = selectProps(rest)
|
|
25
28
|
const { accessibilityLabel, accessibilityDescribedBy, accessibilityInvalid } = rest
|
|
26
29
|
|
|
27
30
|
return (
|
|
@@ -40,6 +43,7 @@ const Picker = React.forwardRef(
|
|
|
40
43
|
aria-describedby={accessibilityDescribedBy}
|
|
41
44
|
aria-invalid={accessibilityInvalid}
|
|
42
45
|
data-testid={testID}
|
|
46
|
+
{...selectedProps}
|
|
43
47
|
>
|
|
44
48
|
{placeholder !== undefined && (
|
|
45
49
|
<option value={placeholder.value} disabled hidden>
|
|
@@ -56,6 +60,7 @@ Picker.displayName = 'Picker'
|
|
|
56
60
|
export default Picker
|
|
57
61
|
|
|
58
62
|
Picker.propTypes = {
|
|
63
|
+
...selectedSystemPropTypes,
|
|
59
64
|
value: PropTypes.string,
|
|
60
65
|
onChange: PropTypes.func,
|
|
61
66
|
onFocus: PropTypes.func,
|
package/src/Select/Select.jsx
CHANGED
|
@@ -11,7 +11,8 @@ import {
|
|
|
11
11
|
selectSystemProps,
|
|
12
12
|
useInputValue,
|
|
13
13
|
variantProp,
|
|
14
|
-
viewProps
|
|
14
|
+
viewProps,
|
|
15
|
+
htmlAttrs
|
|
15
16
|
} from '../utils'
|
|
16
17
|
import Picker from './Picker'
|
|
17
18
|
import InputSupports from '../InputSupports'
|
|
@@ -21,7 +22,8 @@ import { ANDROID_VALIDATION_ICON_CONTAINER_OFFSET } from './constants'
|
|
|
21
22
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([
|
|
22
23
|
a11yProps,
|
|
23
24
|
inputSupportsProps,
|
|
24
|
-
viewProps
|
|
25
|
+
viewProps,
|
|
26
|
+
htmlAttrs
|
|
25
27
|
])
|
|
26
28
|
|
|
27
29
|
const selectInputStyles = (
|