@appquality/unguess-design-system 2.11.13 → 2.11.16

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
@@ -1,3 +1,42 @@
1
+ # v2.11.16 (Tue Sep 13 2022)
2
+
3
+ #### ⚠️ Pushed to `master`
4
+
5
+ - Merge branch 'master' of github.com:AppQuality/unguess-design-system ([@cannarocks](https://github.com/cannarocks))
6
+ - refactor(toggle-input): update text size prop ([@cannarocks](https://github.com/cannarocks))
7
+
8
+ #### Authors: 1
9
+
10
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
11
+
12
+ ---
13
+
14
+ # v2.11.15 (Mon Sep 12 2022)
15
+
16
+ #### ⚠️ Pushed to `master`
17
+
18
+ - Merge branch 'master' of github.com:AppQuality/unguess-design-system ([@cannarocks](https://github.com/cannarocks))
19
+ - minor fix ([@cannarocks](https://github.com/cannarocks))
20
+
21
+ #### Authors: 1
22
+
23
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
24
+
25
+ ---
26
+
27
+ # v2.11.14 (Mon Sep 12 2022)
28
+
29
+ #### ⚠️ Pushed to `master`
30
+
31
+ - Merge branch 'master' of github.com:AppQuality/unguess-design-system ([@cannarocks](https://github.com/cannarocks))
32
+ - fix(input-toggle): fix initialFocus props ignored ([@cannarocks](https://github.com/cannarocks))
33
+
34
+ #### Authors: 1
35
+
36
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
37
+
38
+ ---
39
+
1
40
  # v2.11.13 (Mon Sep 12 2022)
2
41
 
3
42
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -1571,10 +1571,15 @@ var InputToggle = function (_a) {
1571
1571
  setIsEditing(true);
1572
1572
  (_a = container.current) === null || _a === void 0 ? void 0 : _a.focus();
1573
1573
  };
1574
+ React.useEffect(function () {
1575
+ if (isFocused) {
1576
+ handleClick();
1577
+ }
1578
+ }, []);
1574
1579
  return (jsxRuntime.jsx(ToggleContext.Provider, __assign({ value: context }, { children: jsxRuntime.jsx(Wrapper, __assign({ ref: container, onClick: handleClick, onBlur: function () { return setIsEditing(false); } }, props)) })));
1575
1580
  };
1576
1581
  var InputItem = function (props) {
1577
- var _a = props.placeholder, placeholder = _a === void 0 ? "Insert a value" : _a, value = props.value, style = props.style, _b = props.size, size = _b === void 0 ? 22 : _b;
1582
+ var _a = props.placeholder, placeholder = _a === void 0 ? "Insert a value" : _a, value = props.value, style = props.style, _b = props.textSize, textSize = _b === void 0 ? '22px' : _b;
1578
1583
  var _c = React.useState(), input = _c[0], setInput = _c[1];
1579
1584
  var isEditing = React.useContext(ToggleContext).isEditing;
1580
1585
  React.useEffect(function () {
@@ -1582,7 +1587,7 @@ var InputItem = function (props) {
1582
1587
  input.focus();
1583
1588
  }
1584
1589
  }, [isEditing, input]);
1585
- return isEditing ? (jsxRuntime.jsx(StyledInput, __assign({ ref: setInput }, props, { style: __assign({ fontSize: "".concat(size, "px"), fontWeight: 500 }, style) }))) : (jsxRuntime.jsxs(StyledText$1, __assign({ isBold: true }, { children: [!value ? placeholder : value, " ", jsxRuntime.jsx(SvgNotesStroke, {})] })));
1590
+ return isEditing ? (jsxRuntime.jsx(StyledInput, __assign({ ref: setInput }, props, { style: __assign({ fontSize: textSize, fontWeight: 500 }, style) }))) : (jsxRuntime.jsxs(StyledText$1, __assign({ isBold: true, style: __assign({ fontSize: textSize, fontWeight: 500 }, style) }, { children: [!value ? placeholder : value, " ", jsxRuntime.jsx(SvgNotesStroke, {})] })));
1586
1591
  };
1587
1592
  InputToggle.Item = InputItem;
1588
1593
  InputToggle.Label = StyledLabel;
@@ -5,7 +5,7 @@ export interface InputToggleArgs extends IInputProps {
5
5
  /** Applies validation state styling */
6
6
  validation?: 'success' | 'warning' | 'error';
7
7
  /** Sets input size */
8
- size?: number;
8
+ textSize?: string;
9
9
  /** Sets the initial focus */
10
10
  isFocused?: boolean;
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.11.13",
3
+ "version": "2.11.16",
4
4
  "dependencies": {
5
5
  "@tiptap/extension-bubble-menu": "^2.0.0-beta.61",
6
6
  "@tiptap/extension-character-count": "^2.0.0-beta.31",