@onesy/ui-react 1.0.114 → 1.0.115
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/TextField/TextField.js +2 -1
- package/esm/TextField/TextField.js +2 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
package/TextField/TextField.js
CHANGED
|
@@ -364,6 +364,7 @@ const useStyle = (0, style_react_1.style)(theme => {
|
|
|
364
364
|
const TextField = react_1.default.forwardRef((props_, ref) => {
|
|
365
365
|
var _a, _b, _c, _d, _e, _f;
|
|
366
366
|
const theme = (0, style_react_1.useOnesyTheme)();
|
|
367
|
+
const l = theme.l;
|
|
367
368
|
const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyTextField) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
|
|
368
369
|
const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
|
|
369
370
|
const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
|
|
@@ -838,7 +839,7 @@ const TextField = react_1.default.forwardRef((props_, ref) => {
|
|
|
838
839
|
HelperTextProps === null || HelperTextProps === void 0 ? void 0 : HelperTextProps.className,
|
|
839
840
|
classes.helperText,
|
|
840
841
|
error && classes.error_color
|
|
841
|
-
]) }, { children: helperText !== undefined ? helperText : required ? '
|
|
842
|
+
]) }, { children: helperText !== undefined ? helperText : required ? `*${l('required')}` : '' }))), counter && ((0, jsx_runtime_1.jsxs)(Type, Object.assign({ version: 'b3', className: (0, style_react_1.classNames)([
|
|
842
843
|
(0, utils_2.staticClassName)('TextField', theme) && [
|
|
843
844
|
'onesy-TextField-counter'
|
|
844
845
|
],
|
|
@@ -443,6 +443,7 @@ const useStyle = styleMethod(theme => {
|
|
|
443
443
|
});
|
|
444
444
|
const TextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
445
445
|
const theme = useOnesyTheme();
|
|
446
|
+
const l = theme.l;
|
|
446
447
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyTextField?.props?.default), props_), [props_]);
|
|
447
448
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
|
448
449
|
const Type = React.useMemo(() => theme?.elements?.Type || TypeElement, [theme]);
|
|
@@ -861,7 +862,7 @@ const TextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
861
862
|
version: "b3"
|
|
862
863
|
}, HelperTextProps, {
|
|
863
864
|
className: classNames([staticClassName('TextField', theme) && ['onesy-TextField-helper-text', error && 'onesy-TextField-error'], HelperTextProps?.className, classes.helperText, error && classes.error_color])
|
|
864
|
-
}), helperText !== undefined ? helperText : required ? '
|
|
865
|
+
}), helperText !== undefined ? helperText : required ? `*${l('required')}` : ''), counter && /*#__PURE__*/React.createElement(Type, {
|
|
865
866
|
version: "b3",
|
|
866
867
|
className: classNames([staticClassName('TextField', theme) && ['onesy-TextField-counter'], classes.counterText, error && classes.error_color])
|
|
867
868
|
}, String(value)?.length || 0, "/", counter)), footer_));
|
package/esm/index.js
CHANGED