@gympass/yoga 7.130.0 → 7.131.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/cjs/ActionRequirement/native/ActionRequirement.js +29 -16
- package/cjs/Avatar/native/Avatar.js +12 -18
- package/cjs/Banner/native/Banner.js +44 -36
- package/cjs/Button/native/Button.js +79 -81
- package/cjs/Button/native/Icon.js +6 -14
- package/cjs/Button/native/Link.js +18 -5
- package/cjs/Button/native/Outline.js +11 -17
- package/cjs/Button/native/withTouchable.js +5 -11
- package/cjs/Card/native/Card/Card.js +2 -8
- package/cjs/Card/native/EventCard/EventCard.js +13 -18
- package/cjs/Card/native/GymCard/CheckIn/CheckIn.js +1 -4
- package/cjs/Card/native/PlanCard/Content.js +7 -14
- package/cjs/Card/native/PlanCard/List.js +3 -8
- package/cjs/Card/native/PlanCard/PlanCard.js +7 -5
- package/cjs/Checkbox/native/Checkbox.js +11 -22
- package/cjs/Checkbox/native/Switch.js +3 -8
- package/cjs/Chips/native/Chips.js +6 -15
- package/cjs/Divider/native/Divider.js +1 -4
- package/cjs/Dropdown/native/Backdrop.js +4 -9
- package/cjs/Dropdown/native/Dropdown.js +8 -17
- package/cjs/Dropdown/native/Options.android.js +2 -6
- package/cjs/Dropdown/native/Options.ios.js +5 -10
- package/cjs/Input/native/Helper.js +8 -18
- package/cjs/Input/native/Input.js +18 -35
- package/cjs/Input/native/Password.js +7 -14
- package/cjs/Input/web/Input.js +9 -3
- package/cjs/Input/web/Input.test.js +9 -0
- package/cjs/List/native/ListItem.js +3 -8
- package/cjs/Progress/native/Progress.js +14 -10
- package/cjs/RadioGroup/native/Button/RadioButton.js +1 -4
- package/cjs/RadioGroup/native/Radio/Radio.js +1 -5
- package/cjs/RadioGroup/native/RadioGroup.js +12 -7
- package/cjs/Rating/native/Rating.js +8 -17
- package/cjs/Result/native/Attendances.js +1 -5
- package/cjs/Result/native/Details.js +4 -9
- package/cjs/Result/native/Result/index.js +7 -16
- package/cjs/Result/native/Tags.js +1 -4
- package/cjs/Skeleton/native/Skeleton.js +10 -7
- package/cjs/Slider/native/Label.js +1 -4
- package/cjs/Slider/native/Marker.js +15 -20
- package/cjs/Slider/native/Slider.js +8 -18
- package/cjs/Slider/native/Step.js +1 -4
- package/cjs/Slider/native/Tooltip.js +9 -6
- package/cjs/Snackbar/native/Snackbar.js +9 -20
- package/cjs/Snackbar/native/SnackbarAnimationWrapper.js +1 -4
- package/cjs/Stepper/native/Dots.js +1 -6
- package/cjs/Stepper/native/Line.js +1 -6
- package/cjs/Stepper/native/Stepper.js +1 -6
- package/cjs/Tag/native/Informative.js +4 -10
- package/cjs/Tag/native/Tag.js +11 -6
- package/cjs/Text/native/Text.js +40 -9
- package/cjs/TextArea/native/TextArea.js +38 -17
- package/esm/ActionRequirement/native/ActionRequirement.js +29 -16
- package/esm/Avatar/native/Avatar.js +12 -18
- package/esm/Banner/native/Banner.js +44 -36
- package/esm/Button/native/Button.js +79 -81
- package/esm/Button/native/Icon.js +6 -14
- package/esm/Button/native/Link.js +18 -5
- package/esm/Button/native/Outline.js +11 -17
- package/esm/Button/native/withTouchable.js +5 -11
- package/esm/Card/native/Card/Card.js +2 -8
- package/esm/Card/native/EventCard/EventCard.js +13 -18
- package/esm/Card/native/GymCard/CheckIn/CheckIn.js +1 -4
- package/esm/Card/native/PlanCard/Content.js +7 -14
- package/esm/Card/native/PlanCard/List.js +3 -8
- package/esm/Card/native/PlanCard/PlanCard.js +7 -5
- package/esm/Checkbox/native/Checkbox.js +11 -22
- package/esm/Checkbox/native/Switch.js +3 -8
- package/esm/Chips/native/Chips.js +6 -15
- package/esm/Divider/native/Divider.js +1 -4
- package/esm/Dropdown/native/Backdrop.js +4 -9
- package/esm/Dropdown/native/Dropdown.js +8 -17
- package/esm/Dropdown/native/Options.android.js +2 -6
- package/esm/Dropdown/native/Options.ios.js +5 -10
- package/esm/Input/native/Helper.js +8 -18
- package/esm/Input/native/Input.js +18 -35
- package/esm/Input/native/Password.js +7 -14
- package/esm/Input/web/Input.js +9 -3
- package/esm/Input/web/Input.test.js +9 -0
- package/esm/List/native/ListItem.js +3 -8
- package/esm/Progress/native/Progress.js +14 -10
- package/esm/RadioGroup/native/Button/RadioButton.js +1 -4
- package/esm/RadioGroup/native/Radio/Radio.js +1 -5
- package/esm/RadioGroup/native/RadioGroup.js +12 -7
- package/esm/Rating/native/Rating.js +8 -17
- package/esm/Result/native/Attendances.js +1 -5
- package/esm/Result/native/Details.js +4 -9
- package/esm/Result/native/Result/index.js +7 -16
- package/esm/Result/native/Tags.js +1 -4
- package/esm/Skeleton/native/Skeleton.js +10 -7
- package/esm/Slider/native/Label.js +1 -4
- package/esm/Slider/native/Marker.js +15 -20
- package/esm/Slider/native/Slider.js +8 -18
- package/esm/Slider/native/Step.js +1 -4
- package/esm/Slider/native/Tooltip.js +9 -6
- package/esm/Snackbar/native/Snackbar.js +9 -20
- package/esm/Snackbar/native/SnackbarAnimationWrapper.js +1 -4
- package/esm/Stepper/native/Dots.js +1 -6
- package/esm/Stepper/native/Line.js +1 -6
- package/esm/Stepper/native/Stepper.js +1 -6
- package/esm/Tag/native/Informative.js +4 -10
- package/esm/Tag/native/Tag.js +11 -6
- package/esm/Text/native/Text.js +40 -9
- package/esm/TextArea/native/TextArea.js +38 -17
- package/package.json +2 -2
|
@@ -75,21 +75,21 @@ const EnhancePrice = styled.View`
|
|
|
75
75
|
const PlanCardContent = (_a) => {
|
|
76
76
|
var _b = _a, {
|
|
77
77
|
title,
|
|
78
|
-
subtitle,
|
|
79
|
-
description,
|
|
80
|
-
currency,
|
|
81
|
-
suffix,
|
|
82
78
|
price,
|
|
83
79
|
period,
|
|
84
|
-
|
|
80
|
+
subtitle = null,
|
|
81
|
+
description = null,
|
|
82
|
+
currency = null,
|
|
83
|
+
suffix = null,
|
|
84
|
+
children = null
|
|
85
85
|
} = _b, rest = __objRest(_b, [
|
|
86
86
|
"title",
|
|
87
|
+
"price",
|
|
88
|
+
"period",
|
|
87
89
|
"subtitle",
|
|
88
90
|
"description",
|
|
89
91
|
"currency",
|
|
90
92
|
"suffix",
|
|
91
|
-
"price",
|
|
92
|
-
"period",
|
|
93
93
|
"children"
|
|
94
94
|
]);
|
|
95
95
|
return /* @__PURE__ */ jsxs(Content, __spreadProps(__spreadValues({}, rest), { children: [
|
|
@@ -120,13 +120,6 @@ PlanCardContent.propTypes = {
|
|
|
120
120
|
subtitle: string,
|
|
121
121
|
children: node
|
|
122
122
|
};
|
|
123
|
-
PlanCardContent.defaultProps = {
|
|
124
|
-
children: null,
|
|
125
|
-
description: null,
|
|
126
|
-
subtitle: null,
|
|
127
|
-
currency: null,
|
|
128
|
-
suffix: null
|
|
129
|
-
};
|
|
130
123
|
PlanCardContent.displayName = "PlanCard.Content";
|
|
131
124
|
var Content_default = PlanCardContent;
|
|
132
125
|
export {
|
|
@@ -66,10 +66,10 @@ const ListItem = withTheme(
|
|
|
66
66
|
(_a) => {
|
|
67
67
|
var {
|
|
68
68
|
text,
|
|
69
|
-
variant,
|
|
69
|
+
variant = void 0,
|
|
70
70
|
theme: yogaTheme,
|
|
71
|
-
icon,
|
|
72
|
-
buttonProps: _b
|
|
71
|
+
icon = void 0,
|
|
72
|
+
buttonProps: _b = {}
|
|
73
73
|
} = _a, _c = _b, { children } = _c, buttonProps = __objRest(_c, ["children"]);
|
|
74
74
|
const itemColor = get(yogaTheme.yoga.colors, variant);
|
|
75
75
|
if (variant && !itemColor)
|
|
@@ -102,11 +102,6 @@ ListItem.propTypes = {
|
|
|
102
102
|
*/
|
|
103
103
|
variant: string
|
|
104
104
|
};
|
|
105
|
-
ListItem.defaultProps = {
|
|
106
|
-
icon: void 0,
|
|
107
|
-
buttonProps: {},
|
|
108
|
-
variant: void 0
|
|
109
|
-
};
|
|
110
105
|
export {
|
|
111
106
|
List,
|
|
112
107
|
ListItem
|
|
@@ -71,7 +71,13 @@ const Border = styled.View`
|
|
|
71
71
|
}) => color};
|
|
72
72
|
`;
|
|
73
73
|
const PlanCard = (_a) => {
|
|
74
|
-
var _b = _a, {
|
|
74
|
+
var _b = _a, {
|
|
75
|
+
children = void 0,
|
|
76
|
+
variant = "deepPurple"
|
|
77
|
+
} = _b, rest = __objRest(_b, [
|
|
78
|
+
"children",
|
|
79
|
+
"variant"
|
|
80
|
+
]);
|
|
75
81
|
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Plan, __spreadProps(__spreadValues({}, rest), { children: [
|
|
76
82
|
/* @__PURE__ */ jsx(Border, { variant }),
|
|
77
83
|
children
|
|
@@ -102,10 +108,6 @@ PlanCard.propTypes = {
|
|
|
102
108
|
"white"
|
|
103
109
|
])
|
|
104
110
|
};
|
|
105
|
-
PlanCard.defaultProps = {
|
|
106
|
-
children: void 0,
|
|
107
|
-
variant: "deepPurple"
|
|
108
|
-
};
|
|
109
111
|
PlanCard.displayName = "PlanCard";
|
|
110
112
|
var PlanCard_default = PlanCard;
|
|
111
113
|
export {
|
|
@@ -173,15 +173,17 @@ const CheckArea = styled.View(
|
|
|
173
173
|
);
|
|
174
174
|
const Checkbox = (_a) => {
|
|
175
175
|
var _b = _a, {
|
|
176
|
-
label,
|
|
177
|
-
helper,
|
|
178
|
-
disabled,
|
|
179
|
-
checked,
|
|
180
|
-
error,
|
|
181
|
-
style,
|
|
182
|
-
onPressIn
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
label = void 0,
|
|
177
|
+
helper = void 0,
|
|
178
|
+
disabled = false,
|
|
179
|
+
checked = false,
|
|
180
|
+
error = void 0,
|
|
181
|
+
style = {},
|
|
182
|
+
onPressIn = () => {
|
|
183
|
+
},
|
|
184
|
+
onPressOut = () => {
|
|
185
|
+
},
|
|
186
|
+
inverted = false,
|
|
185
187
|
theme: {
|
|
186
188
|
yoga: {
|
|
187
189
|
components: { checkbox },
|
|
@@ -256,19 +258,6 @@ Checkbox.propTypes = {
|
|
|
256
258
|
onPressIn: func,
|
|
257
259
|
onPressOut: func
|
|
258
260
|
};
|
|
259
|
-
Checkbox.defaultProps = {
|
|
260
|
-
label: void 0,
|
|
261
|
-
helper: void 0,
|
|
262
|
-
checked: false,
|
|
263
|
-
disabled: false,
|
|
264
|
-
inverted: false,
|
|
265
|
-
error: void 0,
|
|
266
|
-
style: {},
|
|
267
|
-
onPressIn: () => {
|
|
268
|
-
},
|
|
269
|
-
onPressOut: () => {
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
261
|
Checkbox.displayName = "Checkbox";
|
|
273
262
|
var Checkbox_default = withTheme(Checkbox);
|
|
274
263
|
export {
|
|
@@ -65,9 +65,9 @@ const SwitchThumb = styled(Box).attrs(
|
|
|
65
65
|
})
|
|
66
66
|
)``;
|
|
67
67
|
const CheckboxSwitch = ({
|
|
68
|
-
checked,
|
|
69
|
-
pressed,
|
|
70
|
-
disabled,
|
|
68
|
+
checked = false,
|
|
69
|
+
pressed = false,
|
|
70
|
+
disabled = false,
|
|
71
71
|
theme: {
|
|
72
72
|
yoga: {
|
|
73
73
|
components: { checkboxswitch }
|
|
@@ -154,11 +154,6 @@ CheckboxSwitch.propTypes = {
|
|
|
154
154
|
disabled: bool,
|
|
155
155
|
pressed: bool
|
|
156
156
|
};
|
|
157
|
-
CheckboxSwitch.defaultProps = {
|
|
158
|
-
checked: false,
|
|
159
|
-
disabled: false,
|
|
160
|
-
pressed: false
|
|
161
|
-
};
|
|
162
157
|
CheckboxSwitch.displayName = "Checkbox.Switch";
|
|
163
158
|
var Switch_default = withTouchable(withTheme(CheckboxSwitch));
|
|
164
159
|
export {
|
|
@@ -89,12 +89,12 @@ const StyledChips = styled(Text)`
|
|
|
89
89
|
const Chips = React.forwardRef(
|
|
90
90
|
(_a, ref) => {
|
|
91
91
|
var _b = _a, {
|
|
92
|
-
children,
|
|
93
|
-
selected,
|
|
94
|
-
counter,
|
|
95
|
-
icons,
|
|
96
|
-
disabled,
|
|
97
|
-
onToggle,
|
|
92
|
+
children = void 0,
|
|
93
|
+
selected = false,
|
|
94
|
+
counter = void 0,
|
|
95
|
+
icons = [],
|
|
96
|
+
disabled = false,
|
|
97
|
+
onToggle = void 0,
|
|
98
98
|
onPress = onToggle,
|
|
99
99
|
theme: {
|
|
100
100
|
yoga: { spacing, colors }
|
|
@@ -185,15 +185,6 @@ Chips.propTypes = {
|
|
|
185
185
|
onToggle: func,
|
|
186
186
|
onPress: func
|
|
187
187
|
};
|
|
188
|
-
Chips.defaultProps = {
|
|
189
|
-
children: void 0,
|
|
190
|
-
selected: false,
|
|
191
|
-
disabled: false,
|
|
192
|
-
counter: void 0,
|
|
193
|
-
icons: [],
|
|
194
|
-
onToggle: void 0,
|
|
195
|
-
onPress: void 0
|
|
196
|
-
};
|
|
197
188
|
var Chips_default = withTheme(Chips);
|
|
198
189
|
export {
|
|
199
190
|
Chips_default as default
|
|
@@ -17,16 +17,13 @@ const StyledDivider = styled.View`
|
|
|
17
17
|
`;
|
|
18
18
|
}}
|
|
19
19
|
`;
|
|
20
|
-
const Divider = React.forwardRef(({ vertical }, ref) => {
|
|
20
|
+
const Divider = React.forwardRef(({ vertical = false }, ref) => {
|
|
21
21
|
return /* @__PURE__ */ jsx(StyledDivider, { vertical, ref });
|
|
22
22
|
});
|
|
23
23
|
Divider.propTypes = {
|
|
24
24
|
/** If this value is defined, the divider will be in vertical when the flexDirection is row type */
|
|
25
25
|
vertical: bool
|
|
26
26
|
};
|
|
27
|
-
Divider.defaultProps = {
|
|
28
|
-
vertical: false
|
|
29
|
-
};
|
|
30
27
|
var Divider_default = withTheme(Divider);
|
|
31
28
|
export {
|
|
32
29
|
Divider_default as default
|
|
@@ -97,10 +97,11 @@ const Title = styled(Text.Bold)`
|
|
|
97
97
|
`;
|
|
98
98
|
const Backdrop = (_a) => {
|
|
99
99
|
var _b = _a, {
|
|
100
|
-
visible,
|
|
101
|
-
title,
|
|
100
|
+
visible = false,
|
|
101
|
+
title = null,
|
|
102
102
|
children,
|
|
103
|
-
onClose
|
|
103
|
+
onClose = () => {
|
|
104
|
+
},
|
|
104
105
|
theme: {
|
|
105
106
|
yoga: {
|
|
106
107
|
transition,
|
|
@@ -145,12 +146,6 @@ Backdrop.propTypes = {
|
|
|
145
146
|
children: node.isRequired,
|
|
146
147
|
onClose: func
|
|
147
148
|
};
|
|
148
|
-
Backdrop.defaultProps = {
|
|
149
|
-
visible: false,
|
|
150
|
-
title: null,
|
|
151
|
-
onClose: () => {
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
149
|
var Backdrop_default = withTheme(Backdrop);
|
|
155
150
|
export {
|
|
156
151
|
Backdrop_default as default
|
|
@@ -100,14 +100,15 @@ const getSelectedOption = (options) => options.find((item) => item.selected ===
|
|
|
100
100
|
const Dropdown = React.forwardRef(
|
|
101
101
|
(_a, ref) => {
|
|
102
102
|
var _b = _a, {
|
|
103
|
-
error,
|
|
104
|
-
label,
|
|
105
|
-
disabled,
|
|
106
|
-
full,
|
|
103
|
+
error = void 0,
|
|
104
|
+
label = "",
|
|
105
|
+
disabled = false,
|
|
106
|
+
full = false,
|
|
107
107
|
options,
|
|
108
|
-
cancelActionLabel,
|
|
109
|
-
confirmActionLabel,
|
|
110
|
-
onChange
|
|
108
|
+
cancelActionLabel = "Cancel",
|
|
109
|
+
confirmActionLabel = "Confirm",
|
|
110
|
+
onChange = () => {
|
|
111
|
+
},
|
|
111
112
|
theme: {
|
|
112
113
|
yoga: {
|
|
113
114
|
components: { dropdown }
|
|
@@ -204,16 +205,6 @@ Dropdown.propTypes = {
|
|
|
204
205
|
confirmActionLabel: string,
|
|
205
206
|
onChange: func
|
|
206
207
|
};
|
|
207
|
-
Dropdown.defaultProps = {
|
|
208
|
-
label: "",
|
|
209
|
-
error: void 0,
|
|
210
|
-
full: false,
|
|
211
|
-
cancelActionLabel: "Cancel",
|
|
212
|
-
confirmActionLabel: "Confirm",
|
|
213
|
-
disabled: false,
|
|
214
|
-
onChange: () => {
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
208
|
var Dropdown_default = withTheme(Dropdown);
|
|
218
209
|
export {
|
|
219
210
|
Dropdown_default as default
|
|
@@ -38,7 +38,8 @@ const OptionText = styled(Text.Body2)`
|
|
|
38
38
|
color: ${isSelected ? `${dropdown.selected.option.font.color}` : `${dropdown.option.font.color}`};
|
|
39
39
|
`}
|
|
40
40
|
`;
|
|
41
|
-
const Options = ({ options, selectedOption, onSelect
|
|
41
|
+
const Options = ({ options, selectedOption = null, onSelect = () => {
|
|
42
|
+
} }) => /* @__PURE__ */ jsx(
|
|
42
43
|
List,
|
|
43
44
|
{
|
|
44
45
|
style: { height: 60 * 3.6 },
|
|
@@ -70,11 +71,6 @@ Options.propTypes = {
|
|
|
70
71
|
selectedOption: shape(optionShape),
|
|
71
72
|
onSelect: func
|
|
72
73
|
};
|
|
73
|
-
Options.defaultProps = {
|
|
74
|
-
selectedOption: null,
|
|
75
|
-
onSelect: () => {
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
74
|
var Options_android_default = Options;
|
|
79
75
|
export {
|
|
80
76
|
Options_android_default as default
|
|
@@ -44,11 +44,13 @@ const PickerActions = styled.View`
|
|
|
44
44
|
`;
|
|
45
45
|
const Options = ({
|
|
46
46
|
options,
|
|
47
|
-
selectedOption,
|
|
47
|
+
selectedOption = null,
|
|
48
48
|
cancelActionLabel,
|
|
49
49
|
confirmActionLabel,
|
|
50
|
-
onSelect
|
|
51
|
-
|
|
50
|
+
onSelect = () => {
|
|
51
|
+
},
|
|
52
|
+
onClose = () => {
|
|
53
|
+
},
|
|
52
54
|
theme: {
|
|
53
55
|
yoga: { baseFont }
|
|
54
56
|
}
|
|
@@ -84,13 +86,6 @@ Options.propTypes = {
|
|
|
84
86
|
onSelect: func,
|
|
85
87
|
onClose: func
|
|
86
88
|
};
|
|
87
|
-
Options.defaultProps = {
|
|
88
|
-
selectedOption: null,
|
|
89
|
-
onSelect: () => {
|
|
90
|
-
},
|
|
91
|
-
onClose: () => {
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
89
|
var Options_ios_default = withTheme(Options);
|
|
95
90
|
export {
|
|
96
91
|
Options_ios_default as default
|
|
@@ -45,14 +45,14 @@ const Info = styled(Text.Caption)(
|
|
|
45
45
|
);
|
|
46
46
|
const Helper = React.forwardRef(
|
|
47
47
|
({
|
|
48
|
-
full,
|
|
49
|
-
error,
|
|
50
|
-
helper,
|
|
51
|
-
disabled,
|
|
52
|
-
focused,
|
|
53
|
-
maxLength,
|
|
54
|
-
length,
|
|
55
|
-
hideMaxLength
|
|
48
|
+
full = false,
|
|
49
|
+
error = void 0,
|
|
50
|
+
helper = void 0,
|
|
51
|
+
disabled = void 0,
|
|
52
|
+
focused = false,
|
|
53
|
+
maxLength = void 0,
|
|
54
|
+
length = void 0,
|
|
55
|
+
hideMaxLength = false
|
|
56
56
|
}, ref) => /* @__PURE__ */ jsxs(HelperWrapper, { ref, full, disabled, children: [
|
|
57
57
|
(error || helper) && /* @__PURE__ */ jsx(Info, { disabled, focused, error, children: error || helper }),
|
|
58
58
|
!hideMaxLength && maxLength && /* @__PURE__ */ jsxs(Info, { disabled, focused, error, children: [
|
|
@@ -72,16 +72,6 @@ Helper.propTypes = {
|
|
|
72
72
|
length: number,
|
|
73
73
|
hideMaxLength: bool
|
|
74
74
|
};
|
|
75
|
-
Helper.defaultProps = {
|
|
76
|
-
disabled: void 0,
|
|
77
|
-
error: void 0,
|
|
78
|
-
focused: false,
|
|
79
|
-
full: false,
|
|
80
|
-
helper: void 0,
|
|
81
|
-
maxLength: void 0,
|
|
82
|
-
length: void 0,
|
|
83
|
-
hideMaxLength: false
|
|
84
|
-
};
|
|
85
75
|
var Helper_default = Helper;
|
|
86
76
|
export {
|
|
87
77
|
Helper_default as default
|
|
@@ -171,21 +171,24 @@ const CloseIcon = styled.View(
|
|
|
171
171
|
const Input = React.forwardRef(
|
|
172
172
|
(_a, ref) => {
|
|
173
173
|
var _b = _a, {
|
|
174
|
-
cleanable,
|
|
175
|
-
disabled,
|
|
176
|
-
error,
|
|
177
|
-
full,
|
|
178
|
-
helper,
|
|
179
|
-
label,
|
|
180
|
-
maxLength,
|
|
181
|
-
readOnly,
|
|
182
|
-
style,
|
|
183
|
-
textContentType,
|
|
184
|
-
value,
|
|
185
|
-
onBlur
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
174
|
+
cleanable = true,
|
|
175
|
+
disabled = false,
|
|
176
|
+
error = void 0,
|
|
177
|
+
full = false,
|
|
178
|
+
helper = void 0,
|
|
179
|
+
label = "",
|
|
180
|
+
maxLength = void 0,
|
|
181
|
+
readOnly = false,
|
|
182
|
+
style = {},
|
|
183
|
+
textContentType = void 0,
|
|
184
|
+
value = "",
|
|
185
|
+
onBlur = () => {
|
|
186
|
+
},
|
|
187
|
+
onClean = () => {
|
|
188
|
+
},
|
|
189
|
+
onFocus = () => {
|
|
190
|
+
},
|
|
191
|
+
hideMaxLength = false,
|
|
189
192
|
theme: {
|
|
190
193
|
yoga: {
|
|
191
194
|
colors,
|
|
@@ -344,26 +347,6 @@ Input.propTypes = {
|
|
|
344
347
|
onFocus: func,
|
|
345
348
|
hideMaxLength: bool
|
|
346
349
|
};
|
|
347
|
-
Input.defaultProps = {
|
|
348
|
-
cleanable: true,
|
|
349
|
-
disabled: false,
|
|
350
|
-
error: void 0,
|
|
351
|
-
full: false,
|
|
352
|
-
helper: void 0,
|
|
353
|
-
label: "",
|
|
354
|
-
maxLength: void 0,
|
|
355
|
-
readOnly: false,
|
|
356
|
-
style: {},
|
|
357
|
-
textContentType: void 0,
|
|
358
|
-
value: "",
|
|
359
|
-
onBlur: () => {
|
|
360
|
-
},
|
|
361
|
-
onClean: () => {
|
|
362
|
-
},
|
|
363
|
-
onFocus: () => {
|
|
364
|
-
},
|
|
365
|
-
hideMaxLength: false
|
|
366
|
-
};
|
|
367
350
|
var Input_default = withTheme(Input);
|
|
368
351
|
export {
|
|
369
352
|
Input_default as default
|
|
@@ -67,11 +67,13 @@ const IconWrapper = styled.View(
|
|
|
67
67
|
const Password = React.forwardRef(
|
|
68
68
|
(_a, ref) => {
|
|
69
69
|
var _b = _a, {
|
|
70
|
-
disabled,
|
|
71
|
-
style,
|
|
72
|
-
full,
|
|
73
|
-
onBlur
|
|
74
|
-
|
|
70
|
+
disabled = false,
|
|
71
|
+
style = void 0,
|
|
72
|
+
full = false,
|
|
73
|
+
onBlur = () => {
|
|
74
|
+
},
|
|
75
|
+
onFocus = () => {
|
|
76
|
+
},
|
|
75
77
|
theme: {
|
|
76
78
|
yoga: {
|
|
77
79
|
colors,
|
|
@@ -151,15 +153,6 @@ Password.propTypes = {
|
|
|
151
153
|
onBlur: func,
|
|
152
154
|
onFocus: func
|
|
153
155
|
};
|
|
154
|
-
Password.defaultProps = {
|
|
155
|
-
disabled: false,
|
|
156
|
-
full: false,
|
|
157
|
-
style: void 0,
|
|
158
|
-
onBlur: () => {
|
|
159
|
-
},
|
|
160
|
-
onFocus: () => {
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
156
|
var Password_default = withTheme(Password);
|
|
164
157
|
export {
|
|
165
158
|
Password_default as default
|
package/esm/Input/web/Input.js
CHANGED
|
@@ -135,7 +135,8 @@ const Input = React.forwardRef(
|
|
|
135
135
|
a11yId,
|
|
136
136
|
closeAriaLabel = "Clear",
|
|
137
137
|
includeAriaAttributes = true,
|
|
138
|
-
leftElement
|
|
138
|
+
leftElement,
|
|
139
|
+
clearButtonAriaLabel = "Clear"
|
|
139
140
|
} = _b, props = __objRest(_b, [
|
|
140
141
|
"cleanable",
|
|
141
142
|
"children",
|
|
@@ -156,7 +157,8 @@ const Input = React.forwardRef(
|
|
|
156
157
|
"a11yId",
|
|
157
158
|
"closeAriaLabel",
|
|
158
159
|
"includeAriaAttributes",
|
|
159
|
-
"leftElement"
|
|
160
|
+
"leftElement",
|
|
161
|
+
"clearButtonAriaLabel"
|
|
160
162
|
]);
|
|
161
163
|
const inputRef = ref || useRef(null);
|
|
162
164
|
const cleanField = (e) => {
|
|
@@ -235,6 +237,8 @@ const Input = React.forwardRef(
|
|
|
235
237
|
height: 20,
|
|
236
238
|
role: "button",
|
|
237
239
|
hasIconRight: !!rightIcon,
|
|
240
|
+
"aria-label": clearButtonAriaLabel,
|
|
241
|
+
"data-testid": "clearButtonAriaLabel",
|
|
238
242
|
children: /* @__PURE__ */ jsx(Close, { "aria-label": closeAriaLabel })
|
|
239
243
|
}
|
|
240
244
|
),
|
|
@@ -299,7 +303,9 @@ Input.propTypes = {
|
|
|
299
303
|
/** this prop will be used in the aria-label of the clear input button. */
|
|
300
304
|
closeAriaLabel: string,
|
|
301
305
|
/** element on the left */
|
|
302
|
-
leftElement: node
|
|
306
|
+
leftElement: node,
|
|
307
|
+
/** aria label for close button */
|
|
308
|
+
clearButtonAriaLabel: string
|
|
303
309
|
};
|
|
304
310
|
var Input_default = Input;
|
|
305
311
|
export {
|
|
@@ -164,5 +164,14 @@ describe("<Input />", () => {
|
|
|
164
164
|
expect(inputElement).toBeInTheDocument();
|
|
165
165
|
expect(inputElement).toHaveAttribute("aria-label", value);
|
|
166
166
|
});
|
|
167
|
+
it("should have close aria label", () => {
|
|
168
|
+
const value = "test label clear";
|
|
169
|
+
const { getByTestId } = render(
|
|
170
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Input, { label: "abc123", value: "foo", clearButtonAriaLabel: value }) })
|
|
171
|
+
);
|
|
172
|
+
const inputElement = getByTestId("clearButtonAriaLabel");
|
|
173
|
+
expect(inputElement).toBeInTheDocument();
|
|
174
|
+
expect(inputElement).toHaveAttribute("aria-label", value);
|
|
175
|
+
});
|
|
167
176
|
});
|
|
168
177
|
});
|
|
@@ -70,9 +70,9 @@ const ListItem = (_a) => {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
small,
|
|
74
|
-
divided,
|
|
75
|
-
onPress
|
|
73
|
+
small = false,
|
|
74
|
+
divided = true,
|
|
75
|
+
onPress = void 0
|
|
76
76
|
} = _b, rest = __objRest(_b, [
|
|
77
77
|
"theme",
|
|
78
78
|
"small",
|
|
@@ -97,11 +97,6 @@ ListItem.propTypes = {
|
|
|
97
97
|
divided: PropTypes.bool,
|
|
98
98
|
onPress: PropTypes.func
|
|
99
99
|
};
|
|
100
|
-
ListItem.defaultProps = {
|
|
101
|
-
small: false,
|
|
102
|
-
divided: true,
|
|
103
|
-
onPress: void 0
|
|
104
|
-
};
|
|
105
100
|
ListItem.displayName = "List.Item";
|
|
106
101
|
var ListItem_default = withTheme(ListItem);
|
|
107
102
|
export {
|
|
@@ -134,7 +134,20 @@ const Label = styled.Text`
|
|
|
134
134
|
`;
|
|
135
135
|
const Progress = React.forwardRef(
|
|
136
136
|
(_a, ref) => {
|
|
137
|
-
var _b = _a, {
|
|
137
|
+
var _b = _a, {
|
|
138
|
+
label = {
|
|
139
|
+
value: void 0,
|
|
140
|
+
placement: "left"
|
|
141
|
+
},
|
|
142
|
+
max = 1,
|
|
143
|
+
value = void 0,
|
|
144
|
+
variant = "verve"
|
|
145
|
+
} = _b, props = __objRest(_b, [
|
|
146
|
+
"label",
|
|
147
|
+
"max",
|
|
148
|
+
"value",
|
|
149
|
+
"variant"
|
|
150
|
+
]);
|
|
138
151
|
const isNumber = !/[a-zA-Z]/g.test(label.value);
|
|
139
152
|
const align = label.placement || "left";
|
|
140
153
|
return /* @__PURE__ */ jsxs(ProgressWrapper, __spreadProps(__spreadValues({ ref }, props), { isNumber, align, children: [
|
|
@@ -183,15 +196,6 @@ Progress.propTypes = {
|
|
|
183
196
|
"white"
|
|
184
197
|
])
|
|
185
198
|
};
|
|
186
|
-
Progress.defaultProps = {
|
|
187
|
-
label: {
|
|
188
|
-
value: void 0,
|
|
189
|
-
placement: "left"
|
|
190
|
-
},
|
|
191
|
-
max: 1,
|
|
192
|
-
value: void 0,
|
|
193
|
-
variant: "verve"
|
|
194
|
-
};
|
|
195
199
|
var Progress_default = Progress;
|
|
196
200
|
export {
|
|
197
201
|
Progress_default as default
|
|
@@ -83,7 +83,7 @@ const Text = styled.Text(
|
|
|
83
83
|
);
|
|
84
84
|
const RadioGroupButton = React.forwardRef(
|
|
85
85
|
(_a, ref) => {
|
|
86
|
-
var _b = _a, { value, children } = _b, rest = __objRest(_b, ["value", "children"]);
|
|
86
|
+
var _b = _a, { value = "", children } = _b, rest = __objRest(_b, ["value", "children"]);
|
|
87
87
|
const _a2 = useContext(RadioGroupContext), { onChange, small, selectedValue } = _a2, context = __objRest(_a2, ["onChange", "small", "selectedValue"]);
|
|
88
88
|
const inputValue = value || children;
|
|
89
89
|
const checked = inputValue === selectedValue;
|
|
@@ -104,9 +104,6 @@ RadioGroupButton.propTypes = {
|
|
|
104
104
|
value: oneOfType([string, number]),
|
|
105
105
|
children: node.isRequired
|
|
106
106
|
};
|
|
107
|
-
RadioGroupButton.defaultProps = {
|
|
108
|
-
value: ""
|
|
109
|
-
};
|
|
110
107
|
var RadioButton_default = RadioGroupButton;
|
|
111
108
|
export {
|
|
112
109
|
RadioButton_default as default
|
|
@@ -119,7 +119,7 @@ const Shadow = styled.View(
|
|
|
119
119
|
);
|
|
120
120
|
const RadioGroupRadio = React.forwardRef(
|
|
121
121
|
(_a, ref) => {
|
|
122
|
-
var _b = _a, { value, disabled } = _b, rest = __objRest(_b, ["value", "disabled"]);
|
|
122
|
+
var _b = _a, { value = "", disabled = false } = _b, rest = __objRest(_b, ["value", "disabled"]);
|
|
123
123
|
const _a2 = useContext(RadioGroupContext), { onChange, small, selectedValue } = _a2, context = __objRest(_a2, ["onChange", "small", "selectedValue"]);
|
|
124
124
|
const [pressing, togglePressing] = useState(false);
|
|
125
125
|
const inputValue = value;
|
|
@@ -161,10 +161,6 @@ RadioGroupRadio.propTypes = {
|
|
|
161
161
|
disabled: bool,
|
|
162
162
|
value: oneOfType([string, number])
|
|
163
163
|
};
|
|
164
|
-
RadioGroupRadio.defaultProps = {
|
|
165
|
-
disabled: false,
|
|
166
|
-
value: ""
|
|
167
|
-
};
|
|
168
164
|
var Radio_default = RadioGroupRadio;
|
|
169
165
|
export {
|
|
170
166
|
Radio_default as default
|
|
@@ -59,7 +59,18 @@ const GrayLine = styled.View(
|
|
|
59
59
|
`
|
|
60
60
|
);
|
|
61
61
|
const RadioGroup = (_a) => {
|
|
62
|
-
var _b = _a, {
|
|
62
|
+
var _b = _a, {
|
|
63
|
+
onChange = () => {
|
|
64
|
+
},
|
|
65
|
+
selectedValue = "",
|
|
66
|
+
small = false,
|
|
67
|
+
children
|
|
68
|
+
} = _b, rest = __objRest(_b, [
|
|
69
|
+
"onChange",
|
|
70
|
+
"selectedValue",
|
|
71
|
+
"small",
|
|
72
|
+
"children"
|
|
73
|
+
]);
|
|
63
74
|
const [groupSize, setGroupSize] = useState(0);
|
|
64
75
|
const isButton = React.Children.map(children, (child) => child.type).every(
|
|
65
76
|
(child) => child === RadioButton
|
|
@@ -95,12 +106,6 @@ RadioGroup.propTypes = {
|
|
|
95
106
|
small: bool,
|
|
96
107
|
children: node.isRequired
|
|
97
108
|
};
|
|
98
|
-
RadioGroup.defaultProps = {
|
|
99
|
-
onChange: () => {
|
|
100
|
-
},
|
|
101
|
-
selectedValue: "",
|
|
102
|
-
small: false
|
|
103
|
-
};
|
|
104
109
|
var RadioGroup_default = RadioGroup;
|
|
105
110
|
export {
|
|
106
111
|
RadioGroup_default as default
|