@gympass/yoga 7.120.1 → 7.121.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/cjs/Input/web/Helper.js
CHANGED
|
@@ -96,7 +96,7 @@ const Helper = ({
|
|
|
96
96
|
a11yId
|
|
97
97
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Wrapper, { disabled, error, children: [
|
|
98
98
|
(error || helper) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, __spreadProps(__spreadValues({ as: "span", "aria-live": "polite" }, a11yId && { id: a11yId }), { children: error || helper })),
|
|
99
|
-
maxLength && !hideMaxLength && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Info, { as: "span", children: [
|
|
99
|
+
maxLength && !hideMaxLength && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Info, { as: "span", "aria-hidden": true, children: [
|
|
100
100
|
length,
|
|
101
101
|
"/",
|
|
102
102
|
maxLength
|
package/cjs/Input/web/Input.js
CHANGED
|
@@ -152,6 +152,7 @@ const Input = import_react.default.forwardRef(
|
|
|
152
152
|
hideMaxLength,
|
|
153
153
|
rightIcon,
|
|
154
154
|
a11yId,
|
|
155
|
+
closeAriaLabel,
|
|
155
156
|
includeAriaAttributes,
|
|
156
157
|
leftElement
|
|
157
158
|
} = _b, props = __objRest(_b, [
|
|
@@ -171,6 +172,7 @@ const Input = import_react.default.forwardRef(
|
|
|
171
172
|
"hideMaxLength",
|
|
172
173
|
"rightIcon",
|
|
173
174
|
"a11yId",
|
|
175
|
+
"closeAriaLabel",
|
|
174
176
|
"includeAriaAttributes",
|
|
175
177
|
"leftElement"
|
|
176
178
|
]);
|
|
@@ -250,7 +252,7 @@ const Input = import_react.default.forwardRef(
|
|
|
250
252
|
height: 20,
|
|
251
253
|
role: "button",
|
|
252
254
|
hasIconRight: !!rightIcon,
|
|
253
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga_icons.Close, { "aria-label":
|
|
255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga_icons.Close, { "aria-label": closeAriaLabel })
|
|
254
256
|
}
|
|
255
257
|
),
|
|
256
258
|
!!rightIcon && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -310,6 +312,8 @@ Input.propTypes = {
|
|
|
310
312
|
a11yId: import_prop_types.string,
|
|
311
313
|
/** useful for components that extend the Input component and have their own ARIA attributes implementation (e.g. Dropdown) */
|
|
312
314
|
includeAriaAttributes: import_prop_types.bool,
|
|
315
|
+
/** this prop will be used in the aria-label of the clear input button. */
|
|
316
|
+
closeAriaLabel: import_prop_types.string,
|
|
313
317
|
/** element on the left */
|
|
314
318
|
leftElement: import_prop_types.node
|
|
315
319
|
};
|
|
@@ -334,6 +338,7 @@ Input.defaultProps = {
|
|
|
334
338
|
placeholder: void 0,
|
|
335
339
|
rightIcon: void 0,
|
|
336
340
|
a11yId: void 0,
|
|
341
|
+
closeAriaLabel: "Clear",
|
|
337
342
|
includeAriaAttributes: true,
|
|
338
343
|
leftElement: void 0
|
|
339
344
|
};
|
|
@@ -130,7 +130,21 @@ const IconWrapper = import_styled_components.default.div`
|
|
|
130
130
|
`}
|
|
131
131
|
`;
|
|
132
132
|
const Password = (_a) => {
|
|
133
|
-
var _b = _a, {
|
|
133
|
+
var _b = _a, {
|
|
134
|
+
disabled,
|
|
135
|
+
style,
|
|
136
|
+
className,
|
|
137
|
+
full,
|
|
138
|
+
showPasswordAriaLabel,
|
|
139
|
+
hidePasswordAriaLabel
|
|
140
|
+
} = _b, props = __objRest(_b, [
|
|
141
|
+
"disabled",
|
|
142
|
+
"style",
|
|
143
|
+
"className",
|
|
144
|
+
"full",
|
|
145
|
+
"showPasswordAriaLabel",
|
|
146
|
+
"hidePasswordAriaLabel"
|
|
147
|
+
]);
|
|
134
148
|
const [showPassword, toggleShowPassword] = (0, import_react.useState)(false);
|
|
135
149
|
const inputRef = (0, import_react.useRef)(null);
|
|
136
150
|
(0, import_react.useEffect)(() => {
|
|
@@ -167,6 +181,7 @@ const Password = (_a) => {
|
|
|
167
181
|
onKeyDown: togglePassword,
|
|
168
182
|
disabled,
|
|
169
183
|
role: "button",
|
|
184
|
+
"aria-label": showPassword ? showPasswordAriaLabel : hidePasswordAriaLabel,
|
|
170
185
|
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga_icons.Visibility, { width: 20, height: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga_icons.VisibilityOff, { width: 20, height: 20 })
|
|
171
186
|
}
|
|
172
187
|
)
|
|
@@ -176,12 +191,16 @@ Password.propTypes = {
|
|
|
176
191
|
className: import_prop_types.string,
|
|
177
192
|
disabled: import_prop_types.bool,
|
|
178
193
|
full: import_prop_types.bool,
|
|
194
|
+
showPasswordAriaLabel: import_prop_types.string,
|
|
195
|
+
hidePasswordAriaLabel: import_prop_types.string,
|
|
179
196
|
style: (0, import_prop_types.shape)({})
|
|
180
197
|
};
|
|
181
198
|
Password.defaultProps = {
|
|
182
199
|
className: void 0,
|
|
183
200
|
disabled: false,
|
|
184
201
|
full: false,
|
|
185
|
-
style: void 0
|
|
202
|
+
style: void 0,
|
|
203
|
+
showPasswordAriaLabel: void 0,
|
|
204
|
+
hidePasswordAriaLabel: void 0
|
|
186
205
|
};
|
|
187
206
|
var Password_default = Password;
|
package/esm/Input/web/Helper.js
CHANGED
|
@@ -64,7 +64,7 @@ const Helper = ({
|
|
|
64
64
|
a11yId
|
|
65
65
|
}) => /* @__PURE__ */ jsxs(Wrapper, { disabled, error, children: [
|
|
66
66
|
(error || helper) && /* @__PURE__ */ jsx(Info, __spreadProps(__spreadValues({ as: "span", "aria-live": "polite" }, a11yId && { id: a11yId }), { children: error || helper })),
|
|
67
|
-
maxLength && !hideMaxLength && /* @__PURE__ */ jsxs(Info, { as: "span", children: [
|
|
67
|
+
maxLength && !hideMaxLength && /* @__PURE__ */ jsxs(Info, { as: "span", "aria-hidden": true, children: [
|
|
68
68
|
length,
|
|
69
69
|
"/",
|
|
70
70
|
maxLength
|
package/esm/Input/web/Input.js
CHANGED
|
@@ -130,6 +130,7 @@ const Input = React.forwardRef(
|
|
|
130
130
|
hideMaxLength,
|
|
131
131
|
rightIcon,
|
|
132
132
|
a11yId,
|
|
133
|
+
closeAriaLabel,
|
|
133
134
|
includeAriaAttributes,
|
|
134
135
|
leftElement
|
|
135
136
|
} = _b, props = __objRest(_b, [
|
|
@@ -149,6 +150,7 @@ const Input = React.forwardRef(
|
|
|
149
150
|
"hideMaxLength",
|
|
150
151
|
"rightIcon",
|
|
151
152
|
"a11yId",
|
|
153
|
+
"closeAriaLabel",
|
|
152
154
|
"includeAriaAttributes",
|
|
153
155
|
"leftElement"
|
|
154
156
|
]);
|
|
@@ -228,7 +230,7 @@ const Input = React.forwardRef(
|
|
|
228
230
|
height: 20,
|
|
229
231
|
role: "button",
|
|
230
232
|
hasIconRight: !!rightIcon,
|
|
231
|
-
children: /* @__PURE__ */ jsx(Close, { "aria-label":
|
|
233
|
+
children: /* @__PURE__ */ jsx(Close, { "aria-label": closeAriaLabel })
|
|
232
234
|
}
|
|
233
235
|
),
|
|
234
236
|
!!rightIcon && !readOnly && /* @__PURE__ */ jsx(
|
|
@@ -288,6 +290,8 @@ Input.propTypes = {
|
|
|
288
290
|
a11yId: string,
|
|
289
291
|
/** useful for components that extend the Input component and have their own ARIA attributes implementation (e.g. Dropdown) */
|
|
290
292
|
includeAriaAttributes: bool,
|
|
293
|
+
/** this prop will be used in the aria-label of the clear input button. */
|
|
294
|
+
closeAriaLabel: string,
|
|
291
295
|
/** element on the left */
|
|
292
296
|
leftElement: node
|
|
293
297
|
};
|
|
@@ -312,6 +316,7 @@ Input.defaultProps = {
|
|
|
312
316
|
placeholder: void 0,
|
|
313
317
|
rightIcon: void 0,
|
|
314
318
|
a11yId: void 0,
|
|
319
|
+
closeAriaLabel: "Clear",
|
|
315
320
|
includeAriaAttributes: true,
|
|
316
321
|
leftElement: void 0
|
|
317
322
|
};
|
|
@@ -99,7 +99,21 @@ const IconWrapper = styled.div`
|
|
|
99
99
|
`}
|
|
100
100
|
`;
|
|
101
101
|
const Password = (_a) => {
|
|
102
|
-
var _b = _a, {
|
|
102
|
+
var _b = _a, {
|
|
103
|
+
disabled,
|
|
104
|
+
style,
|
|
105
|
+
className,
|
|
106
|
+
full,
|
|
107
|
+
showPasswordAriaLabel,
|
|
108
|
+
hidePasswordAriaLabel
|
|
109
|
+
} = _b, props = __objRest(_b, [
|
|
110
|
+
"disabled",
|
|
111
|
+
"style",
|
|
112
|
+
"className",
|
|
113
|
+
"full",
|
|
114
|
+
"showPasswordAriaLabel",
|
|
115
|
+
"hidePasswordAriaLabel"
|
|
116
|
+
]);
|
|
103
117
|
const [showPassword, toggleShowPassword] = useState(false);
|
|
104
118
|
const inputRef = useRef(null);
|
|
105
119
|
useEffect(() => {
|
|
@@ -136,6 +150,7 @@ const Password = (_a) => {
|
|
|
136
150
|
onKeyDown: togglePassword,
|
|
137
151
|
disabled,
|
|
138
152
|
role: "button",
|
|
153
|
+
"aria-label": showPassword ? showPasswordAriaLabel : hidePasswordAriaLabel,
|
|
139
154
|
children: showPassword ? /* @__PURE__ */ jsx(Visibility, { width: 20, height: 20 }) : /* @__PURE__ */ jsx(VisibilityOff, { width: 20, height: 20 })
|
|
140
155
|
}
|
|
141
156
|
)
|
|
@@ -145,13 +160,17 @@ Password.propTypes = {
|
|
|
145
160
|
className: string,
|
|
146
161
|
disabled: bool,
|
|
147
162
|
full: bool,
|
|
163
|
+
showPasswordAriaLabel: string,
|
|
164
|
+
hidePasswordAriaLabel: string,
|
|
148
165
|
style: shape({})
|
|
149
166
|
};
|
|
150
167
|
Password.defaultProps = {
|
|
151
168
|
className: void 0,
|
|
152
169
|
disabled: false,
|
|
153
170
|
full: false,
|
|
154
|
-
style: void 0
|
|
171
|
+
style: void 0,
|
|
172
|
+
showPasswordAriaLabel: void 0,
|
|
173
|
+
hidePasswordAriaLabel: void 0
|
|
155
174
|
};
|
|
156
175
|
var Password_default = Password;
|
|
157
176
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.121.0",
|
|
4
4
|
"description": "Gympass component library",
|
|
5
5
|
"main": "./cjs",
|
|
6
6
|
"types": "./typings/index.d.ts",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"react-native": "0.72.3",
|
|
59
59
|
"styled-components": "^4.4.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "fa860d8aeb60bf924787fcabc93a8cdbe52cd416",
|
|
62
62
|
"module": "./esm",
|
|
63
63
|
"private": false,
|
|
64
64
|
"react-native": "./cjs/index.native.js"
|