@hero-design/rn 8.110.0 → 8.110.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +6 -0
- package/es/index.js +27 -13
- package/lib/index.js +27 -13
- package/package.json +7 -7
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +40 -24
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +60 -36
- package/src/components/Accordion/index.tsx +6 -1
- package/src/components/AppCue/__tests__/__snapshots__/StyledAppCue.tsx.snap +121 -97
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +6 -3
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +18 -18
- package/src/components/Chip/index.tsx +6 -0
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +8 -5
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +20 -12
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +13 -9
- package/src/components/PinInput/index.tsx +6 -1
- package/src/components/Radio/RadioGroup.tsx +6 -1
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +84 -48
- package/src/components/Search/SearchOneLine.tsx +6 -0
- package/src/components/Search/SearchTwoLine.tsx +6 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +6 -3
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +6 -3
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +9 -6
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +210 -138
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +98 -62
- package/src/components/Toolbar/ToolbarGroup.tsx +10 -2
- package/src/components/Toolbar/__tests__/ToolbarGroup.spec.tsx +34 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +3 -0
- package/stats/8.110.1/rn-stats.html +4844 -0
- package/types/components/Accordion/index.d.ts +5 -1
- package/types/components/Chip/index.d.ts +5 -1
- package/types/components/PinInput/index.d.ts +4 -0
- package/types/components/Radio/RadioGroup.d.ts +5 -1
- package/types/components/Radio/index.d.ts +1 -1
- package/types/components/Search/SearchOneLine.d.ts +4 -0
- package/types/components/Search/SearchTwoLine.d.ts +4 -0
- package/types/components/Toolbar/ToolbarGroup.d.ts +5 -1
- package/types/components/Toolbar/index.d.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:2754) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
@@ -9,9 +9,9 @@ node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/sr
|
|
|
9
9
|
...and 12 more
|
|
10
10
|
[1m[33m(!) [plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
11
11
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/_work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
12
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [1m2m
|
|
12
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m2m 13.6s[22m[39m
|
|
13
13
|
[36m
|
|
14
14
|
[1m/home/runner/_work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/types.ts[22m → [1m., .[22m...[39m
|
|
15
15
|
[1m[33m(!) Generated empty chunks[39m[22m
|
|
16
16
|
"locales/types" and "locales/types"
|
|
17
|
-
[32mcreated [1m., .[22m in [1m35.
|
|
17
|
+
[32mcreated [1m., .[22m in [1m35.8s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.110.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4262](https://github.com/Thinkei/hero-design/pull/4262) [`7fbdf8736b42b9a9cb1c7ee203c69192b6d12a1f`](https://github.com/Thinkei/hero-design/commit/7fbdf8736b42b9a9cb1c7ee203c69192b6d12a1f) Thanks [@ttkien](https://github.com/ttkien)! - Upgrade react-native 0.77.3
|
|
8
|
+
|
|
3
9
|
## 8.110.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/es/index.js
CHANGED
|
@@ -8903,7 +8903,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8903
8903
|
_ref$variant = _ref.variant,
|
|
8904
8904
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
8905
8905
|
style = _ref.style,
|
|
8906
|
-
testID = _ref.testID
|
|
8906
|
+
testID = _ref.testID,
|
|
8907
|
+
accessible = _ref.accessible;
|
|
8907
8908
|
var defaultValue = useMemo(function () {
|
|
8908
8909
|
return typeof activeItemKey === 'number' ? NaN : '';
|
|
8909
8910
|
}, [activeItemKey]);
|
|
@@ -8913,7 +8914,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8913
8914
|
_onItemPress = _usePropsOrInternalSt2[1];
|
|
8914
8915
|
return /*#__PURE__*/React__default.createElement(StyledWrapper$e, {
|
|
8915
8916
|
style: style,
|
|
8916
|
-
testID: testID
|
|
8917
|
+
testID: testID,
|
|
8918
|
+
accessible: accessible
|
|
8917
8919
|
}, items.map(function (_ref2, index) {
|
|
8918
8920
|
var key = _ref2.key,
|
|
8919
8921
|
props = _objectWithoutProperties(_ref2, _excluded$I);
|
|
@@ -20012,7 +20014,7 @@ var StyledChipIcon = index$c(Icon)(function (_ref2) {
|
|
|
20012
20014
|
};
|
|
20013
20015
|
});
|
|
20014
20016
|
|
|
20015
|
-
var _excluded$u = ["label", "variant", "selected", "icon", "onPress", "showSelectedIcon"];
|
|
20017
|
+
var _excluded$u = ["label", "variant", "selected", "icon", "onPress", "showSelectedIcon", "accessible"];
|
|
20016
20018
|
var getChipLabel = function getChipLabel(label) {
|
|
20017
20019
|
if (typeof label === 'string') {
|
|
20018
20020
|
return /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
@@ -20045,6 +20047,7 @@ var Chip = function Chip(_ref) {
|
|
|
20045
20047
|
onPress = _ref.onPress,
|
|
20046
20048
|
_ref$showSelectedIcon = _ref.showSelectedIcon,
|
|
20047
20049
|
showSelectedIcon = _ref$showSelectedIcon === void 0 ? true : _ref$showSelectedIcon,
|
|
20050
|
+
accessible = _ref.accessible,
|
|
20048
20051
|
otherProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
20049
20052
|
useDeprecation('Chip variant `outlined` and `filled` are deprecated.', variant === 'outlined' || variant === 'filled');
|
|
20050
20053
|
var renamedVariant = getChipVariant(variant);
|
|
@@ -20055,7 +20058,8 @@ var Chip = function Chip(_ref) {
|
|
|
20055
20058
|
return /*#__PURE__*/React__default.createElement(StyledChipWrapper, _extends$1({
|
|
20056
20059
|
onPress: onPress,
|
|
20057
20060
|
themeVariant: renamedVariant,
|
|
20058
|
-
themeSelected: selected
|
|
20061
|
+
themeSelected: selected,
|
|
20062
|
+
accessible: accessible
|
|
20059
20063
|
}, otherProps), icon && /*#__PURE__*/React__default.createElement(Box, {
|
|
20060
20064
|
marginRight: "small"
|
|
20061
20065
|
}, /*#__PURE__*/React__default.createElement(StyledChipIcon, {
|
|
@@ -24958,7 +24962,8 @@ var PinInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
24958
24962
|
style = _ref2.style,
|
|
24959
24963
|
testID = _ref2.testID,
|
|
24960
24964
|
textContentType = _ref2.textContentType,
|
|
24961
|
-
autoComplete = _ref2.autoComplete
|
|
24965
|
+
autoComplete = _ref2.autoComplete,
|
|
24966
|
+
accessible = _ref2.accessible;
|
|
24962
24967
|
var inputRef = useRef(null);
|
|
24963
24968
|
var _useState = useState(autoFocus),
|
|
24964
24969
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -25019,7 +25024,8 @@ var PinInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
25019
25024
|
}, [trimmedValue]);
|
|
25020
25025
|
return /*#__PURE__*/React__default.createElement(StyledWrapper$6, {
|
|
25021
25026
|
style: style,
|
|
25022
|
-
testID: testID
|
|
25027
|
+
testID: testID,
|
|
25028
|
+
accessible: accessible
|
|
25023
25029
|
}, /*#__PURE__*/React__default.createElement(StyledPinWrapper, {
|
|
25024
25030
|
onPress: focus,
|
|
25025
25031
|
disabled: disabled,
|
|
@@ -25829,11 +25835,13 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
25829
25835
|
keyExtractor = _ref.keyExtractor,
|
|
25830
25836
|
style = _ref.style,
|
|
25831
25837
|
testID = _ref.testID,
|
|
25838
|
+
accessible = _ref.accessible,
|
|
25832
25839
|
_ref$inactiveIntent = _ref.inactiveIntent,
|
|
25833
25840
|
inactiveIntent = _ref$inactiveIntent === void 0 ? 'light' : _ref$inactiveIntent;
|
|
25834
25841
|
return /*#__PURE__*/React__default.createElement(View, {
|
|
25835
25842
|
style: style,
|
|
25836
|
-
testID: testID
|
|
25843
|
+
testID: testID,
|
|
25844
|
+
accessible: accessible
|
|
25837
25845
|
}, options.map(function (option, index) {
|
|
25838
25846
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
25839
25847
|
key: getKey(option, index, keyExtractor)
|
|
@@ -28168,10 +28176,12 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
|
|
|
28168
28176
|
var _ref$align = _ref.align,
|
|
28169
28177
|
align = _ref$align === void 0 ? 'right' : _ref$align,
|
|
28170
28178
|
_ref$items = _ref.items,
|
|
28171
|
-
items = _ref$items === void 0 ? [] : _ref$items
|
|
28179
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
28180
|
+
accessible = _ref.accessible;
|
|
28172
28181
|
useDeprecation("Toolbar's align prop is deprecated for 'left' and 'center' alignment. Please use 'right' instead.", align !== 'right');
|
|
28173
28182
|
return /*#__PURE__*/React__default.createElement(ToolbarGroupWrapper, {
|
|
28174
|
-
align: align
|
|
28183
|
+
align: align,
|
|
28184
|
+
accessible: accessible
|
|
28175
28185
|
}, items.map(function (_ref2) {
|
|
28176
28186
|
var label = _ref2.label,
|
|
28177
28187
|
icon = _ref2.icon,
|
|
@@ -48142,10 +48152,12 @@ var SearchTwoLine = function SearchTwoLine(props) {
|
|
|
48142
48152
|
content = props.content,
|
|
48143
48153
|
testID = props.testID,
|
|
48144
48154
|
_props$variant = props.variant,
|
|
48145
|
-
variant = _props$variant === void 0 ? 'basic' : _props$variant
|
|
48155
|
+
variant = _props$variant === void 0 ? 'basic' : _props$variant,
|
|
48156
|
+
accessible = props.accessible;
|
|
48146
48157
|
return /*#__PURE__*/React__default.createElement(StyledContainer, {
|
|
48147
48158
|
style: style,
|
|
48148
|
-
testID: testID
|
|
48159
|
+
testID: testID,
|
|
48160
|
+
accessible: accessible
|
|
48149
48161
|
}, /*#__PURE__*/React__default.createElement(StyledInputContainer, {
|
|
48150
48162
|
themeVariant: variant
|
|
48151
48163
|
}, renderPrefix({
|
|
@@ -48157,7 +48169,7 @@ var SearchTwoLine = function SearchTwoLine(props) {
|
|
|
48157
48169
|
})));
|
|
48158
48170
|
};
|
|
48159
48171
|
|
|
48160
|
-
var _excluded$2 = ["prefix", "suffix", "style", "allowFontScaling", "accessibilityLabelledBy", "editable", "maxLength", "value", "defaultValue", "placeholder", "disabled", "testID", "variant", "clearable"];
|
|
48172
|
+
var _excluded$2 = ["prefix", "suffix", "style", "allowFontScaling", "accessibilityLabelledBy", "editable", "maxLength", "value", "defaultValue", "placeholder", "disabled", "testID", "variant", "clearable", "accessible"];
|
|
48161
48173
|
var getState = function getState(_ref) {
|
|
48162
48174
|
var disabled = _ref.disabled,
|
|
48163
48175
|
editable = _ref.editable,
|
|
@@ -48201,6 +48213,7 @@ var SearchOneLine = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48201
48213
|
variant = _props$variant === void 0 ? 'basic' : _props$variant,
|
|
48202
48214
|
_props$clearable = props.clearable,
|
|
48203
48215
|
clearable = _props$clearable === void 0 ? false : _props$clearable,
|
|
48216
|
+
accessible = props.accessible,
|
|
48204
48217
|
nativeProps = _objectWithoutProperties(props, _excluded$2);
|
|
48205
48218
|
var _React$useState = React__default.useState(false),
|
|
48206
48219
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -48262,7 +48275,8 @@ var SearchOneLine = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48262
48275
|
return /*#__PURE__*/React__default.createElement(StyledContainer, {
|
|
48263
48276
|
pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
|
|
48264
48277
|
testID: testID,
|
|
48265
|
-
style: style
|
|
48278
|
+
style: style,
|
|
48279
|
+
accessible: accessible
|
|
48266
48280
|
}, /*#__PURE__*/React__default.createElement(StyledInputContainer, {
|
|
48267
48281
|
themeVariant: variant
|
|
48268
48282
|
}, renderPrefix({
|
package/lib/index.js
CHANGED
|
@@ -8932,7 +8932,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8932
8932
|
_ref$variant = _ref.variant,
|
|
8933
8933
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
8934
8934
|
style = _ref.style,
|
|
8935
|
-
testID = _ref.testID
|
|
8935
|
+
testID = _ref.testID,
|
|
8936
|
+
accessible = _ref.accessible;
|
|
8936
8937
|
var defaultValue = React.useMemo(function () {
|
|
8937
8938
|
return typeof activeItemKey === 'number' ? NaN : '';
|
|
8938
8939
|
}, [activeItemKey]);
|
|
@@ -8942,7 +8943,8 @@ var Accordion = function Accordion(_ref) {
|
|
|
8942
8943
|
_onItemPress = _usePropsOrInternalSt2[1];
|
|
8943
8944
|
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$e, {
|
|
8944
8945
|
style: style,
|
|
8945
|
-
testID: testID
|
|
8946
|
+
testID: testID,
|
|
8947
|
+
accessible: accessible
|
|
8946
8948
|
}, items.map(function (_ref2, index) {
|
|
8947
8949
|
var key = _ref2.key,
|
|
8948
8950
|
props = _objectWithoutProperties(_ref2, _excluded$I);
|
|
@@ -20041,7 +20043,7 @@ var StyledChipIcon = index$c(Icon)(function (_ref2) {
|
|
|
20041
20043
|
};
|
|
20042
20044
|
});
|
|
20043
20045
|
|
|
20044
|
-
var _excluded$u = ["label", "variant", "selected", "icon", "onPress", "showSelectedIcon"];
|
|
20046
|
+
var _excluded$u = ["label", "variant", "selected", "icon", "onPress", "showSelectedIcon", "accessible"];
|
|
20045
20047
|
var getChipLabel = function getChipLabel(label) {
|
|
20046
20048
|
if (typeof label === 'string') {
|
|
20047
20049
|
return /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
@@ -20074,6 +20076,7 @@ var Chip = function Chip(_ref) {
|
|
|
20074
20076
|
onPress = _ref.onPress,
|
|
20075
20077
|
_ref$showSelectedIcon = _ref.showSelectedIcon,
|
|
20076
20078
|
showSelectedIcon = _ref$showSelectedIcon === void 0 ? true : _ref$showSelectedIcon,
|
|
20079
|
+
accessible = _ref.accessible,
|
|
20077
20080
|
otherProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
20078
20081
|
useDeprecation('Chip variant `outlined` and `filled` are deprecated.', variant === 'outlined' || variant === 'filled');
|
|
20079
20082
|
var renamedVariant = getChipVariant(variant);
|
|
@@ -20084,7 +20087,8 @@ var Chip = function Chip(_ref) {
|
|
|
20084
20087
|
return /*#__PURE__*/React__namespace.default.createElement(StyledChipWrapper, _extends$1({
|
|
20085
20088
|
onPress: onPress,
|
|
20086
20089
|
themeVariant: renamedVariant,
|
|
20087
|
-
themeSelected: selected
|
|
20090
|
+
themeSelected: selected,
|
|
20091
|
+
accessible: accessible
|
|
20088
20092
|
}, otherProps), icon && /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
20089
20093
|
marginRight: "small"
|
|
20090
20094
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledChipIcon, {
|
|
@@ -24987,7 +24991,8 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
24987
24991
|
style = _ref2.style,
|
|
24988
24992
|
testID = _ref2.testID,
|
|
24989
24993
|
textContentType = _ref2.textContentType,
|
|
24990
|
-
autoComplete = _ref2.autoComplete
|
|
24994
|
+
autoComplete = _ref2.autoComplete,
|
|
24995
|
+
accessible = _ref2.accessible;
|
|
24991
24996
|
var inputRef = React.useRef(null);
|
|
24992
24997
|
var _useState = React.useState(autoFocus),
|
|
24993
24998
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -25048,7 +25053,8 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
25048
25053
|
}, [trimmedValue]);
|
|
25049
25054
|
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$6, {
|
|
25050
25055
|
style: style,
|
|
25051
|
-
testID: testID
|
|
25056
|
+
testID: testID,
|
|
25057
|
+
accessible: accessible
|
|
25052
25058
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledPinWrapper, {
|
|
25053
25059
|
onPress: focus,
|
|
25054
25060
|
disabled: disabled,
|
|
@@ -25858,11 +25864,13 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
25858
25864
|
keyExtractor = _ref.keyExtractor,
|
|
25859
25865
|
style = _ref.style,
|
|
25860
25866
|
testID = _ref.testID,
|
|
25867
|
+
accessible = _ref.accessible,
|
|
25861
25868
|
_ref$inactiveIntent = _ref.inactiveIntent,
|
|
25862
25869
|
inactiveIntent = _ref$inactiveIntent === void 0 ? 'light' : _ref$inactiveIntent;
|
|
25863
25870
|
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
25864
25871
|
style: style,
|
|
25865
|
-
testID: testID
|
|
25872
|
+
testID: testID,
|
|
25873
|
+
accessible: accessible
|
|
25866
25874
|
}, options.map(function (option, index) {
|
|
25867
25875
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, {
|
|
25868
25876
|
key: getKey(option, index, keyExtractor)
|
|
@@ -28197,10 +28205,12 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
|
|
|
28197
28205
|
var _ref$align = _ref.align,
|
|
28198
28206
|
align = _ref$align === void 0 ? 'right' : _ref$align,
|
|
28199
28207
|
_ref$items = _ref.items,
|
|
28200
|
-
items = _ref$items === void 0 ? [] : _ref$items
|
|
28208
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
28209
|
+
accessible = _ref.accessible;
|
|
28201
28210
|
useDeprecation("Toolbar's align prop is deprecated for 'left' and 'center' alignment. Please use 'right' instead.", align !== 'right');
|
|
28202
28211
|
return /*#__PURE__*/React__namespace.default.createElement(ToolbarGroupWrapper, {
|
|
28203
|
-
align: align
|
|
28212
|
+
align: align,
|
|
28213
|
+
accessible: accessible
|
|
28204
28214
|
}, items.map(function (_ref2) {
|
|
28205
28215
|
var label = _ref2.label,
|
|
28206
28216
|
icon = _ref2.icon,
|
|
@@ -48171,10 +48181,12 @@ var SearchTwoLine = function SearchTwoLine(props) {
|
|
|
48171
48181
|
content = props.content,
|
|
48172
48182
|
testID = props.testID,
|
|
48173
48183
|
_props$variant = props.variant,
|
|
48174
|
-
variant = _props$variant === void 0 ? 'basic' : _props$variant
|
|
48184
|
+
variant = _props$variant === void 0 ? 'basic' : _props$variant,
|
|
48185
|
+
accessible = props.accessible;
|
|
48175
48186
|
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer, {
|
|
48176
48187
|
style: style,
|
|
48177
|
-
testID: testID
|
|
48188
|
+
testID: testID,
|
|
48189
|
+
accessible: accessible
|
|
48178
48190
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledInputContainer, {
|
|
48179
48191
|
themeVariant: variant
|
|
48180
48192
|
}, renderPrefix({
|
|
@@ -48186,7 +48198,7 @@ var SearchTwoLine = function SearchTwoLine(props) {
|
|
|
48186
48198
|
})));
|
|
48187
48199
|
};
|
|
48188
48200
|
|
|
48189
|
-
var _excluded$2 = ["prefix", "suffix", "style", "allowFontScaling", "accessibilityLabelledBy", "editable", "maxLength", "value", "defaultValue", "placeholder", "disabled", "testID", "variant", "clearable"];
|
|
48201
|
+
var _excluded$2 = ["prefix", "suffix", "style", "allowFontScaling", "accessibilityLabelledBy", "editable", "maxLength", "value", "defaultValue", "placeholder", "disabled", "testID", "variant", "clearable", "accessible"];
|
|
48190
48202
|
var getState = function getState(_ref) {
|
|
48191
48203
|
var disabled = _ref.disabled,
|
|
48192
48204
|
editable = _ref.editable,
|
|
@@ -48230,6 +48242,7 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
48230
48242
|
variant = _props$variant === void 0 ? 'basic' : _props$variant,
|
|
48231
48243
|
_props$clearable = props.clearable,
|
|
48232
48244
|
clearable = _props$clearable === void 0 ? false : _props$clearable,
|
|
48245
|
+
accessible = props.accessible,
|
|
48233
48246
|
nativeProps = _objectWithoutProperties(props, _excluded$2);
|
|
48234
48247
|
var _React$useState = React__namespace.default.useState(false),
|
|
48235
48248
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -48291,7 +48304,8 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
48291
48304
|
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer, {
|
|
48292
48305
|
pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
|
|
48293
48306
|
testID: testID,
|
|
48294
|
-
style: style
|
|
48307
|
+
style: style,
|
|
48308
|
+
accessible: accessible
|
|
48295
48309
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledInputContainer, {
|
|
48296
48310
|
themeVariant: variant
|
|
48297
48311
|
}, renderPrefix({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.110.
|
|
3
|
+
"version": "8.110.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@react-native-community/datetimepicker": "^3.5.2 || ^7.6.1",
|
|
35
35
|
"@react-native-community/slider": "^4.5.1",
|
|
36
36
|
"react": "18.3.1",
|
|
37
|
-
"react-native": "0.76.9",
|
|
37
|
+
"react-native": "0.77.3 || 0.76.9",
|
|
38
38
|
"react-native-gesture-handler": "~2.20.2",
|
|
39
39
|
"react-native-linear-gradient": "^2.8.3",
|
|
40
40
|
"react-native-pager-view": "^6.7.0",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"@react-native-community/cli-platform-ios": "15.0.1",
|
|
65
65
|
"@react-native-community/datetimepicker": "8.2.0",
|
|
66
66
|
"@react-native-community/slider": "^4.5.1",
|
|
67
|
-
"@react-native/babel-preset": "0.
|
|
68
|
-
"@react-native/eslint-config": "0.
|
|
69
|
-
"@react-native/metro-config": "0.
|
|
70
|
-
"@react-native/typescript-config": "0.
|
|
67
|
+
"@react-native/babel-preset": "0.77.3",
|
|
68
|
+
"@react-native/eslint-config": "0.77.3",
|
|
69
|
+
"@react-native/metro-config": "0.77.3",
|
|
70
|
+
"@react-native/typescript-config": "0.77.3",
|
|
71
71
|
"@rollup/plugin-babel": "^6.0.4",
|
|
72
72
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
73
73
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"prettier-config-hd": "8.42.4",
|
|
105
105
|
"react": "18.3.1",
|
|
106
106
|
"react-dom": "^18.2.0",
|
|
107
|
-
"react-native": "0.
|
|
107
|
+
"react-native": "0.77.3",
|
|
108
108
|
"react-native-gesture-handler": "~2.20.2",
|
|
109
109
|
"react-native-linear-gradient": "2.8.3",
|
|
110
110
|
"react-native-pager-view": "6.5.1",
|
|
@@ -96,12 +96,16 @@ exports[`AccordionItem renders correctly when header is an element 1`] = `
|
|
|
96
96
|
collapsable={false}
|
|
97
97
|
onLayout={[Function]}
|
|
98
98
|
style={
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
[
|
|
100
|
+
{
|
|
101
|
+
"margin": 0,
|
|
102
|
+
"overflow": "hidden",
|
|
103
|
+
"padding": 0,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"height": 0,
|
|
107
|
+
},
|
|
108
|
+
]
|
|
105
109
|
}
|
|
106
110
|
>
|
|
107
111
|
<View
|
|
@@ -274,12 +278,16 @@ exports[`AccordionItem renders correctly when header is string 1`] = `
|
|
|
274
278
|
collapsable={false}
|
|
275
279
|
onLayout={[Function]}
|
|
276
280
|
style={
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
[
|
|
282
|
+
{
|
|
283
|
+
"margin": 0,
|
|
284
|
+
"overflow": "hidden",
|
|
285
|
+
"padding": 0,
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"height": 0,
|
|
289
|
+
},
|
|
290
|
+
]
|
|
283
291
|
}
|
|
284
292
|
>
|
|
285
293
|
<View
|
|
@@ -452,12 +460,16 @@ exports[`AccordionItem renders correctly when open 1`] = `
|
|
|
452
460
|
collapsable={false}
|
|
453
461
|
onLayout={[Function]}
|
|
454
462
|
style={
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
[
|
|
464
|
+
{
|
|
465
|
+
"margin": 0,
|
|
466
|
+
"overflow": "hidden",
|
|
467
|
+
"padding": 0,
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"height": 0,
|
|
471
|
+
},
|
|
472
|
+
]
|
|
461
473
|
}
|
|
462
474
|
>
|
|
463
475
|
<View
|
|
@@ -630,12 +642,16 @@ exports[`AccordionItem renders correctly when variant is card 1`] = `
|
|
|
630
642
|
collapsable={false}
|
|
631
643
|
onLayout={[Function]}
|
|
632
644
|
style={
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
645
|
+
[
|
|
646
|
+
{
|
|
647
|
+
"margin": 0,
|
|
648
|
+
"overflow": "hidden",
|
|
649
|
+
"padding": 0,
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"height": 0,
|
|
653
|
+
},
|
|
654
|
+
]
|
|
639
655
|
}
|
|
640
656
|
>
|
|
641
657
|
<View
|
|
@@ -104,12 +104,16 @@ exports[`Accordion allows fully controlled 1`] = `
|
|
|
104
104
|
collapsable={false}
|
|
105
105
|
onLayout={[Function]}
|
|
106
106
|
style={
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
[
|
|
108
|
+
{
|
|
109
|
+
"margin": 0,
|
|
110
|
+
"overflow": "hidden",
|
|
111
|
+
"padding": 0,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"height": 0,
|
|
115
|
+
},
|
|
116
|
+
]
|
|
113
117
|
}
|
|
114
118
|
>
|
|
115
119
|
<View
|
|
@@ -251,12 +255,16 @@ exports[`Accordion allows fully controlled 1`] = `
|
|
|
251
255
|
collapsable={false}
|
|
252
256
|
onLayout={[Function]}
|
|
253
257
|
style={
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
[
|
|
259
|
+
{
|
|
260
|
+
"margin": 0,
|
|
261
|
+
"overflow": "hidden",
|
|
262
|
+
"padding": 0,
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"height": 0,
|
|
266
|
+
},
|
|
267
|
+
]
|
|
260
268
|
}
|
|
261
269
|
>
|
|
262
270
|
<View
|
|
@@ -438,12 +446,16 @@ exports[`Accordion renders correctly 1`] = `
|
|
|
438
446
|
collapsable={false}
|
|
439
447
|
onLayout={[Function]}
|
|
440
448
|
style={
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
449
|
+
[
|
|
450
|
+
{
|
|
451
|
+
"margin": 0,
|
|
452
|
+
"overflow": "hidden",
|
|
453
|
+
"padding": 0,
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"height": 0,
|
|
457
|
+
},
|
|
458
|
+
]
|
|
447
459
|
}
|
|
448
460
|
>
|
|
449
461
|
<View
|
|
@@ -585,12 +597,16 @@ exports[`Accordion renders correctly 1`] = `
|
|
|
585
597
|
collapsable={false}
|
|
586
598
|
onLayout={[Function]}
|
|
587
599
|
style={
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
600
|
+
[
|
|
601
|
+
{
|
|
602
|
+
"margin": 0,
|
|
603
|
+
"overflow": "hidden",
|
|
604
|
+
"padding": 0,
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"height": 0,
|
|
608
|
+
},
|
|
609
|
+
]
|
|
594
610
|
}
|
|
595
611
|
>
|
|
596
612
|
<View
|
|
@@ -772,12 +788,16 @@ exports[`Accordion renders correctly when variant is card 1`] = `
|
|
|
772
788
|
collapsable={false}
|
|
773
789
|
onLayout={[Function]}
|
|
774
790
|
style={
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
791
|
+
[
|
|
792
|
+
{
|
|
793
|
+
"margin": 0,
|
|
794
|
+
"overflow": "hidden",
|
|
795
|
+
"padding": 0,
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"height": 0,
|
|
799
|
+
},
|
|
800
|
+
]
|
|
781
801
|
}
|
|
782
802
|
>
|
|
783
803
|
<View
|
|
@@ -930,12 +950,16 @@ exports[`Accordion renders correctly when variant is card 1`] = `
|
|
|
930
950
|
collapsable={false}
|
|
931
951
|
onLayout={[Function]}
|
|
932
952
|
style={
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
953
|
+
[
|
|
954
|
+
{
|
|
955
|
+
"margin": 0,
|
|
956
|
+
"overflow": "hidden",
|
|
957
|
+
"padding": 0,
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"height": 0,
|
|
961
|
+
},
|
|
962
|
+
]
|
|
939
963
|
}
|
|
940
964
|
>
|
|
941
965
|
<View
|
|
@@ -38,6 +38,10 @@ export interface AccordionProps<K extends Key> {
|
|
|
38
38
|
* Testing id of the component.
|
|
39
39
|
*/
|
|
40
40
|
testID?: string;
|
|
41
|
+
/**
|
|
42
|
+
* If true, indicates that the Accordion is accessible to screen readers.
|
|
43
|
+
*/
|
|
44
|
+
accessible?: boolean;
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
const Accordion = <K extends Key>({
|
|
@@ -47,6 +51,7 @@ const Accordion = <K extends Key>({
|
|
|
47
51
|
variant = 'default',
|
|
48
52
|
style,
|
|
49
53
|
testID,
|
|
54
|
+
accessible,
|
|
50
55
|
}: AccordionProps<K>) => {
|
|
51
56
|
const defaultValue = useMemo(
|
|
52
57
|
() => (typeof activeItemKey === 'number' ? NaN : '') as K,
|
|
@@ -59,7 +64,7 @@ const Accordion = <K extends Key>({
|
|
|
59
64
|
);
|
|
60
65
|
|
|
61
66
|
return (
|
|
62
|
-
<StyledWrapper style={style} testID={testID}>
|
|
67
|
+
<StyledWrapper style={style} testID={testID} accessible={accessible}>
|
|
63
68
|
{items.map(({ key, ...props }, index) => {
|
|
64
69
|
const open = _activeItemKey === key;
|
|
65
70
|
return (
|