@appquality/unguess-design-system 2.11.15 → 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,16 @@
|
|
|
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
|
+
|
|
1
14
|
# v2.11.15 (Mon Sep 12 2022)
|
|
2
15
|
|
|
3
16
|
#### ⚠️ Pushed to `master`
|
package/build/index.js
CHANGED
|
@@ -1579,7 +1579,7 @@ var InputToggle = function (_a) {
|
|
|
1579
1579
|
return (jsxRuntime.jsx(ToggleContext.Provider, __assign({ value: context }, { children: jsxRuntime.jsx(Wrapper, __assign({ ref: container, onClick: handleClick, onBlur: function () { return setIsEditing(false); } }, props)) })));
|
|
1580
1580
|
};
|
|
1581
1581
|
var InputItem = function (props) {
|
|
1582
|
-
var _a = props.placeholder, placeholder = _a === void 0 ? "Insert a value" : _a, value = props.value, style = props.style, _b = props.
|
|
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;
|
|
1583
1583
|
var _c = React.useState(), input = _c[0], setInput = _c[1];
|
|
1584
1584
|
var isEditing = React.useContext(ToggleContext).isEditing;
|
|
1585
1585
|
React.useEffect(function () {
|
|
@@ -1587,7 +1587,7 @@ var InputItem = function (props) {
|
|
|
1587
1587
|
input.focus();
|
|
1588
1588
|
}
|
|
1589
1589
|
}, [isEditing, input]);
|
|
1590
|
-
return isEditing ? (jsxRuntime.jsx(StyledInput, __assign({ ref: setInput }, props, { style: __assign({ fontSize:
|
|
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, {})] })));
|
|
1591
1591
|
};
|
|
1592
1592
|
InputToggle.Item = InputItem;
|
|
1593
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
|
-
|
|
8
|
+
textSize?: string;
|
|
9
9
|
/** Sets the initial focus */
|
|
10
10
|
isFocused?: boolean;
|
|
11
11
|
}
|