@simplybusiness/mobius 3.3.1 → 3.3.2

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 CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file, or link in
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.3.2] - 2023-02-07
9
+
10
+ ### Fixed
11
+
12
+ - PasswordField did not reveal text after clicking 'show'
13
+
8
14
  ## [3.3.1] - 2023-01-24
9
15
 
10
16
  ### Changed
@@ -160,6 +166,7 @@ Additionally, mobius and themes are available on the public NPM registry and can
160
166
 
161
167
  ## Github Links
162
168
 
169
+ [3.3.2]: https://github.com/simplybusiness/mobius/releases/tag/v3.3.2
163
170
  [3.3.1]: https://github.com/simplybusiness/mobius/releases/tag/v3.3.1
164
171
  [3.3.0]: https://github.com/simplybusiness/mobius/releases/tag/v3.3.0
165
172
  [3.2.3]: https://github.com/simplybusiness/mobius/releases/tag/v3.2.3
@@ -26,12 +26,12 @@ exports.PasswordField = (0, react_1.forwardRef)((_a, ref) => {
26
26
  const [show, setShow] = (0, react_1.useState)(false);
27
27
  const type = show ? "text" : "password";
28
28
  const classNames = (0, clsx_1.default)("mobius/PasswordField", className);
29
- const localRef = (0, react_1.useRef)();
29
+ const localRef = (0, react_1.useRef)(null);
30
30
  const handleShowHideButtonClick = () => {
31
31
  var _a;
32
32
  setShow(oldShow => !oldShow);
33
33
  (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
34
34
  };
35
- return ((0, jsx_runtime_1.jsx)(TextField_1.TextField, Object.assign({ ref: (0, mergeRefs_1.mergeRefs)([localRef, ref]), type: type, className: classNames }, props, { children: (0, jsx_runtime_1.jsx)(ShowHideButton_1.ShowHideButton, { onClick: handleShowHideButtonClick, show: show }) })));
35
+ return ((0, jsx_runtime_1.jsx)(TextField_1.TextField, Object.assign({ ref: (0, mergeRefs_1.mergeRefs)([localRef, ref]), className: classNames }, props, { type: type }, { children: (0, jsx_runtime_1.jsx)(ShowHideButton_1.ShowHideButton, { onClick: handleShowHideButtonClick, show: show }) })));
36
36
  });
37
37
  //# sourceMappingURL=PasswordField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,iCAAqD;AACrD,qDAAkD;AAClD,4CAKsB;AACtB,qDAAkD;AAMrC,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CAAC,EAA2C,EAAE,GAAiB,EAAE,EAAE;QAAlE,EAAE,SAAS,OAAgC,EAA3B,KAAK,cAArB,aAAuB,CAAF;IACpB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;IACxC,MAAM,UAAU,GAAG,IAAA,cAAI,EAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAG,IAAA,cAAM,GAAwB,CAAC;IAEhD,MAAM,yBAAyB,GAAG,GAAG,EAAE;;QACrC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;QAC7B,MAAA,QAAQ,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,qBAAS,kBACR,GAAG,EAAE,IAAA,qBAAS,EAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,EAC/B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,UAAU,IACjB,KAAK,cAET,uBAAC,+BAAc,IAAC,OAAO,EAAE,yBAAyB,EAAE,IAAI,EAAE,IAAI,GAAI,IACxD,CACb,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,iCAAqD;AACrD,qDAAkD;AAClD,4CAKsB;AACtB,qDAAkD;AAMrC,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CAAC,EAA2C,EAAE,GAAiB,EAAE,EAAE;QAAlE,EAAE,SAAS,OAAgC,EAA3B,KAAK,cAArB,aAAuB,CAAF;IACpB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;IACxC,MAAM,UAAU,GAAG,IAAA,cAAI,EAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAuB,IAAI,CAAC,CAAC;IAEpD,MAAM,yBAAyB,GAAG,GAAG,EAAE;;QACrC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;QAC7B,MAAA,QAAQ,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,qBAAS,kBACR,GAAG,EAAE,IAAA,qBAAS,EAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,EAC/B,SAAS,EAAE,UAAU,IACjB,KAAK,IACT,IAAI,EAAE,IAAI,gBAEV,uBAAC,+BAAc,IAAC,OAAO,EAAE,yBAAyB,EAAE,IAAI,EAAE,IAAI,GAAI,IACxD,CACb,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -20,12 +20,12 @@ export const PasswordField = forwardRef((_a, ref) => {
20
20
  const [show, setShow] = useState(false);
21
21
  const type = show ? "text" : "password";
22
22
  const classNames = clsx("mobius/PasswordField", className);
23
- const localRef = useRef();
23
+ const localRef = useRef(null);
24
24
  const handleShowHideButtonClick = () => {
25
25
  var _a;
26
26
  setShow(oldShow => !oldShow);
27
27
  (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
28
28
  };
29
- return (_jsx(TextField, Object.assign({ ref: mergeRefs([localRef, ref]), type: type, className: classNames }, props, { children: _jsx(ShowHideButton, { onClick: handleShowHideButtonClick, show: show }) })));
29
+ return (_jsx(TextField, Object.assign({ ref: mergeRefs([localRef, ref]), className: classNames }, props, { type: type }, { children: _jsx(ShowHideButton, { onClick: handleShowHideButtonClick, show: show }) })));
30
30
  });
31
31
  //# sourceMappingURL=PasswordField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EACL,SAAS,GAIV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,CAAC,EAA2C,EAAE,GAAiB,EAAE,EAAE;QAAlE,EAAE,SAAS,OAAgC,EAA3B,KAAK,cAArB,aAAuB,CAAF;IACpB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IAC3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IAC3D,MAAM,QAAQ,GAAG,MAAM,CAAuB,IAAI,CAAC,CAAC;IAEpD,MAAM,yBAAyB,GAAG,GAAG,EAAE;;QACrC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;QAC7B,MAAA,QAAQ,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,kBACR,GAAG,EAAE,SAAS,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,EAC/B,SAAS,EAAE,UAAU,IACjB,KAAK,IACT,IAAI,EAAE,IAAI,gBAEV,KAAC,cAAc,IAAC,OAAO,EAAE,yBAAyB,EAAE,IAAI,EAAE,IAAI,GAAI,IACxD,CACb,CAAC;AACJ,CAAC,CACF,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simplybusiness/mobius",
3
3
  "license": "UNLICENSED",
4
- "version": "3.3.1",
4
+ "version": "3.3.2",
5
5
  "description": "Core library of Mobius react components",
6
6
  "repository": {
7
7
  "type": "git",
@@ -18,7 +18,7 @@ export const PasswordField = forwardRef(
18
18
  const [show, setShow] = useState(false);
19
19
  const type = show ? "text" : "password";
20
20
  const classNames = clsx("mobius/PasswordField", className);
21
- const localRef = useRef<TextFieldElementType>();
21
+ const localRef = useRef<TextFieldElementType>(null);
22
22
 
23
23
  const handleShowHideButtonClick = () => {
24
24
  setShow(oldShow => !oldShow);
@@ -28,9 +28,9 @@ export const PasswordField = forwardRef(
28
28
  return (
29
29
  <TextField
30
30
  ref={mergeRefs([localRef, ref])}
31
- type={type}
32
31
  className={classNames}
33
32
  {...props}
33
+ type={type}
34
34
  >
35
35
  <ShowHideButton onClick={handleShowHideButtonClick} show={show} />
36
36
  </TextField>