@onesy/ui-react 1.0.122 → 1.0.123
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/LICENSE +1 -1
- package/README.MD +0 -2
- package/TextField/TextField.js +36 -18
- package/esm/TextField/TextField.js +45 -17
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025 Lazar Erić,
|
|
3
|
+
Copyright (c) 2025 Lazar Erić, lazareric1@proton.me
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.MD
CHANGED
package/TextField/TextField.js
CHANGED
|
@@ -18,7 +18,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
19
|
const utils_1 = require("@onesy/utils");
|
|
20
20
|
const style_react_1 = require("@onesy/style-react");
|
|
21
|
+
const IconMaterialPassword2W100_1 = __importDefault(require("@onesy/icons-material-rounded-react/IconMaterialPassword2W100"));
|
|
22
|
+
const IconMaterialPassword2OffW100_1 = __importDefault(require("@onesy/icons-material-rounded-react/IconMaterialPassword2OffW100"));
|
|
21
23
|
const IconMaterialCloseW100_1 = __importDefault(require("@onesy/icons-material-rounded-react/IconMaterialCloseW100"));
|
|
24
|
+
const Tooltip_1 = __importDefault(require("../Tooltip"));
|
|
25
|
+
const IconButton_1 = __importDefault(require("../IconButton"));
|
|
22
26
|
const Type_1 = __importDefault(require("../Type"));
|
|
23
27
|
const Line_1 = __importDefault(require("../Line"));
|
|
24
28
|
const useMediaQuery_1 = __importDefault(require("../useMediaQuery"));
|
|
@@ -76,7 +80,7 @@ const useStyle = (0, style_react_1.style)(theme => {
|
|
|
76
80
|
},
|
|
77
81
|
inputWrapper: Object.assign({
|
|
78
82
|
// Reset
|
|
79
|
-
margin: '0', border: '0', fontFamily: 'inherit', fontSize: '100%', lineHeight: '1.15', overflow: 'visible', boxSizing: 'border-box', display: 'flex', flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', opacity: '0', transition: theme.methods.transitions.make('opacity'), borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`, cursor: 'text', flex: '1 1 auto' }, theme.typography.values.b2),
|
|
83
|
+
margin: '0', border: '0', fontFamily: 'inherit', fontSize: '100%', lineHeight: '1.15', overflow: 'visible', boxSizing: 'border-box', display: 'flex', flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', opacity: '0', transition: theme.methods.transitions.make('opacity'), borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`, cursor: 'text', zIndex: '1', flex: '1 1 auto' }, theme.typography.values.b2),
|
|
80
84
|
inputWrapper_focus: {
|
|
81
85
|
opacity: '1'
|
|
82
86
|
},
|
|
@@ -144,7 +148,7 @@ const useStyle = (0, style_react_1.style)(theme => {
|
|
|
144
148
|
input_align_end: {
|
|
145
149
|
textAlign: 'end'
|
|
146
150
|
},
|
|
147
|
-
label: Object.assign(Object.assign({ position: 'absolute', insetInlineStart: '16px', transformOrigin: 'top left', transition: theme.methods.transitions.make(['color', 'inset', 'margin', 'transform']), pointerEvents: 'none', userSelect: 'none' }, overflow), { width: 'auto' }),
|
|
151
|
+
label: Object.assign(Object.assign({ position: 'absolute', insetInlineStart: '16px', transformOrigin: 'top left', transition: theme.methods.transitions.make(['color', 'inset', 'margin', 'transform']), pointerEvents: 'none', userSelect: 'none', zIndex: '1' }, overflow), { width: 'auto' }),
|
|
148
152
|
label_regular: {
|
|
149
153
|
top: '50%',
|
|
150
154
|
transform: 'translate(0px, -50%) scale(1)'
|
|
@@ -187,14 +191,14 @@ const useStyle = (0, style_react_1.style)(theme => {
|
|
|
187
191
|
insetInlineStart: '15px',
|
|
188
192
|
transform: 'translate(0, 6px) scale(0.667)'
|
|
189
193
|
},
|
|
190
|
-
background: Object.assign(Object.assign({}, other), { background: 'currentColor', borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`, opacity: theme.palette.light ? theme.palette.visual_contrast.default.opacity.hover : theme.palette.visual_contrast.default.opacity.selected, zIndex: '
|
|
194
|
+
background: Object.assign(Object.assign({}, other), { background: 'currentColor', borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`, opacity: theme.palette.light ? theme.palette.visual_contrast.default.opacity.hover : theme.palette.visual_contrast.default.opacity.selected, zIndex: '0', transition: theme.methods.transitions.make(['opacity']) }),
|
|
191
195
|
background_hover: {
|
|
192
196
|
opacity: theme.palette.visual_contrast.default.opacity.focus
|
|
193
197
|
},
|
|
194
198
|
background_focus: {
|
|
195
199
|
opacity: theme.palette.light ? theme.palette.visual_contrast.default.opacity.hover : theme.palette.visual_contrast.default.opacity.selected
|
|
196
200
|
},
|
|
197
|
-
border: Object.assign(Object.assign({}, other), { borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`, boxShadow: 'inset 0px -1px 0px 0px currentColor', transition: theme.methods.transitions.make(['box-shadow']) }),
|
|
201
|
+
border: Object.assign(Object.assign({}, other), { borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`, boxShadow: 'inset 0px -1px 0px 0px currentColor', zIndex: '1', transition: theme.methods.transitions.make(['box-shadow']) }),
|
|
198
202
|
border_focus: {
|
|
199
203
|
boxShadow: 'inset 0px -2px 0px 0px currentColor'
|
|
200
204
|
},
|
|
@@ -368,6 +372,8 @@ const TextField = react_1.default.forwardRef((props_, ref) => {
|
|
|
368
372
|
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_]);
|
|
369
373
|
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]);
|
|
370
374
|
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]);
|
|
375
|
+
const Tooltip = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Tooltip) || Tooltip_1.default; }, [theme]);
|
|
376
|
+
const IconButton = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.IconButton) || IconButton_1.default; }, [theme]);
|
|
371
377
|
const { tonal = true, color = 'primary', version = 'filled', size = 'regular', rootRef, valueDefault, value: value_, onChange, name, label: label_, align, start, startVerticalAlign = 'start', end: end_, endVerticalAlign: endVerticalAlign_ = 'start', placeholder, fullWidth: fullWidth_, helperText, counter, prefix, sufix, noPrefixMargin, noSufixMargin, enabled, autoFocus, autoComplete, type: type_ = 'text', required, optional, optionalText = 'optional', error, multiline, rows: rows_, minRows = 1, maxRows, clear, focus: focus_, footer: footer_, subscription, controlled, minimal, restoreSelection = false, minWidth, readOnly, disabled, onInput: onInput_, onFocus: onFocus_, onBlur: onBlur_, onMouseEnter: onMouseEnter_, onMouseLeave: onMouseLeave_, inputProps = {}, InputWrapperProps = {}, HelperTextProps, IconProps, IconClear = IconMaterialCloseW100_1.default, InputComponent: InputComponent_, WrapperComponent = 'div', Component = 'div', className, style, children,
|
|
372
378
|
// Other
|
|
373
379
|
colorUnchecked } = props, other = __rest(props, ["tonal", "color", "version", "size", "rootRef", "valueDefault", "value", "onChange", "name", "label", "align", "start", "startVerticalAlign", "end", "endVerticalAlign", "placeholder", "fullWidth", "helperText", "counter", "prefix", "sufix", "noPrefixMargin", "noSufixMargin", "enabled", "autoFocus", "autoComplete", "type", "required", "optional", "optionalText", "error", "multiline", "rows", "minRows", "maxRows", "clear", "focus", "footer", "subscription", "controlled", "minimal", "restoreSelection", "minWidth", "readOnly", "disabled", "onInput", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "inputProps", "InputWrapperProps", "HelperTextProps", "IconProps", "IconClear", "InputComponent", "WrapperComponent", "Component", "className", "style", "children", "colorUnchecked"]);
|
|
@@ -417,7 +423,7 @@ const TextField = react_1.default.forwardRef((props_, ref) => {
|
|
|
417
423
|
const [hover, setHover] = react_1.default.useState(false);
|
|
418
424
|
const [row, setRow] = react_1.default.useState(rowValue);
|
|
419
425
|
const [rows, setRows] = react_1.default.useState(1);
|
|
420
|
-
|
|
426
|
+
const [visible, setVisible] = react_1.default.useState(false);
|
|
421
427
|
let type = type_;
|
|
422
428
|
const styles = {
|
|
423
429
|
root: {},
|
|
@@ -473,6 +479,9 @@ const TextField = react_1.default.forwardRef((props_, ref) => {
|
|
|
473
479
|
subscription.unsubscribe(method);
|
|
474
480
|
};
|
|
475
481
|
}, [subscription]);
|
|
482
|
+
const onToggleVisible = react_1.default.useCallback(() => {
|
|
483
|
+
setVisible((item) => !item);
|
|
484
|
+
}, []);
|
|
476
485
|
const onUpdateRows = () => {
|
|
477
486
|
if (multiline && row !== undefined) {
|
|
478
487
|
const heightValue = refs.input.current.style.height;
|
|
@@ -582,19 +591,6 @@ const TextField = react_1.default.forwardRef((props_, ref) => {
|
|
|
582
591
|
const Wrapper = footer ? WrapperComponent : react_1.default.Fragment;
|
|
583
592
|
let ComponentProps = {};
|
|
584
593
|
let WrapperProps = {};
|
|
585
|
-
if (value && clear) {
|
|
586
|
-
if (!Array.isArray(end))
|
|
587
|
-
end = [end].filter(Boolean);
|
|
588
|
-
const exists = end === null || end === void 0 ? void 0 : end.find(item => item.key === refs.ids.clear);
|
|
589
|
-
if (!exists) {
|
|
590
|
-
if (props.endVerticalAlign === undefined)
|
|
591
|
-
endVerticalAlign = 'center';
|
|
592
|
-
end.push((0, jsx_runtime_1.jsx)(IconClear, Object.assign({ color: 'inherit', onClick: onClear }, IconProps, { className: (0, style_react_1.classNames)([
|
|
593
|
-
IconProps === null || IconProps === void 0 ? void 0 : IconProps.className,
|
|
594
|
-
classes.clear
|
|
595
|
-
]) }), refs.ids.clear));
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
594
|
if (footer) {
|
|
599
595
|
WrapperProps = Object.assign({}, other);
|
|
600
596
|
WrapperProps.ref = item => {
|
|
@@ -659,6 +655,28 @@ const TextField = react_1.default.forwardRef((props_, ref) => {
|
|
|
659
655
|
if (!['input', 'textarea'].includes(InputComponent)) {
|
|
660
656
|
inputProps.onInput = onInput;
|
|
661
657
|
}
|
|
658
|
+
const iconProps = {
|
|
659
|
+
size
|
|
660
|
+
};
|
|
661
|
+
const end = react_1.default.useMemo(() => {
|
|
662
|
+
const endItems = (Array.isArray(end_) ? end_ : [end_]).filter(Boolean);
|
|
663
|
+
const password = type === 'password';
|
|
664
|
+
if (value && clear) {
|
|
665
|
+
const exists = endItems === null || endItems === void 0 ? void 0 : endItems.find(item => item.key === refs.ids.clear);
|
|
666
|
+
if (!exists) {
|
|
667
|
+
if (props.endVerticalAlign === undefined)
|
|
668
|
+
endVerticalAlign = 'center';
|
|
669
|
+
endItems.push((0, jsx_runtime_1.jsx)(IconClear, Object.assign({ color: 'inherit', onClick: onClear }, IconProps, { className: (0, style_react_1.classNames)([
|
|
670
|
+
IconProps === null || IconProps === void 0 ? void 0 : IconProps.className,
|
|
671
|
+
classes.clear
|
|
672
|
+
]) }), refs.ids.clear));
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
const iconButtonPassword = ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: visible ? l('Hide password') : l('View password'), color: 'inverted' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onToggleVisible, color: 'default', size: 'small' }, { children: visible ? (0, jsx_runtime_1.jsx)(IconMaterialPassword2OffW100_1.default, Object.assign({}, iconProps)) : (0, jsx_runtime_1.jsx)(IconMaterialPassword2W100_1.default, Object.assign({}, iconProps)) })) })));
|
|
676
|
+
if (password)
|
|
677
|
+
endItems.unshift(iconButtonPassword);
|
|
678
|
+
return endItems;
|
|
679
|
+
}, [visible, onClear, type, end_]);
|
|
662
680
|
const valueWithData = value !== undefined && String(value);
|
|
663
681
|
return ((0, jsx_runtime_1.jsxs)(Wrapper, Object.assign({}, WrapperProps, { children: [(0, jsx_runtime_1.jsxs)(Component, Object.assign({ onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onTouchStart: onMouseEnter, onTouchEnd: onMouseLeave, role: 'textbox', "aria-multiline": multiline, "aria-labelledby": refs.ids.label }, ComponentProps, { className: (0, style_react_1.classNames)([
|
|
664
682
|
(0, utils_2.staticClassName)('TextField', theme) && [
|
|
@@ -7,7 +7,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { clamp, is, isEnvironment, unique } from '@onesy/utils';
|
|
9
9
|
import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-react';
|
|
10
|
+
import IconMaterialPassword2 from '@onesy/icons-material-rounded-react/IconMaterialPassword2W100';
|
|
11
|
+
import IconMaterialPassword2Off from '@onesy/icons-material-rounded-react/IconMaterialPassword2OffW100';
|
|
10
12
|
import IconMaterialClose from '@onesy/icons-material-rounded-react/IconMaterialCloseW100';
|
|
13
|
+
import TooltipElement from '../Tooltip';
|
|
14
|
+
import IconButtonElement from '../IconButton';
|
|
11
15
|
import TypeElement from '../Type';
|
|
12
16
|
import LineElement from '../Line';
|
|
13
17
|
import useMediaQuery from '../useMediaQuery';
|
|
@@ -100,6 +104,7 @@ const useStyle = styleMethod(theme => {
|
|
|
100
104
|
transition: theme.methods.transitions.make('opacity'),
|
|
101
105
|
borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`,
|
|
102
106
|
cursor: 'text',
|
|
107
|
+
zIndex: '1',
|
|
103
108
|
flex: '1 1 auto'
|
|
104
109
|
}, theme.typography.values.b2),
|
|
105
110
|
inputWrapper_focus: {
|
|
@@ -182,7 +187,8 @@ const useStyle = styleMethod(theme => {
|
|
|
182
187
|
transformOrigin: 'top left',
|
|
183
188
|
transition: theme.methods.transitions.make(['color', 'inset', 'margin', 'transform']),
|
|
184
189
|
pointerEvents: 'none',
|
|
185
|
-
userSelect: 'none'
|
|
190
|
+
userSelect: 'none',
|
|
191
|
+
zIndex: '1'
|
|
186
192
|
}, overflow), {}, {
|
|
187
193
|
width: 'auto'
|
|
188
194
|
}),
|
|
@@ -232,7 +238,7 @@ const useStyle = styleMethod(theme => {
|
|
|
232
238
|
background: 'currentColor',
|
|
233
239
|
borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`,
|
|
234
240
|
opacity: theme.palette.light ? theme.palette.visual_contrast.default.opacity.hover : theme.palette.visual_contrast.default.opacity.selected,
|
|
235
|
-
zIndex: '
|
|
241
|
+
zIndex: '0',
|
|
236
242
|
transition: theme.methods.transitions.make(['opacity'])
|
|
237
243
|
}),
|
|
238
244
|
background_hover: {
|
|
@@ -244,6 +250,7 @@ const useStyle = styleMethod(theme => {
|
|
|
244
250
|
border: _objectSpread(_objectSpread({}, other), {}, {
|
|
245
251
|
borderRadius: `${theme.shape.radius.unit}px ${theme.shape.radius.unit}px 0 0`,
|
|
246
252
|
boxShadow: 'inset 0px -1px 0px 0px currentColor',
|
|
253
|
+
zIndex: '1',
|
|
247
254
|
transition: theme.methods.transitions.make(['box-shadow'])
|
|
248
255
|
}),
|
|
249
256
|
border_focus: {
|
|
@@ -447,6 +454,8 @@ const TextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
447
454
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyTextField?.props?.default), props_), [props_]);
|
|
448
455
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
|
449
456
|
const Type = React.useMemo(() => theme?.elements?.Type || TypeElement, [theme]);
|
|
457
|
+
const Tooltip = React.useMemo(() => theme?.elements?.Tooltip || TooltipElement, [theme]);
|
|
458
|
+
const IconButton = React.useMemo(() => theme?.elements?.IconButton || IconButtonElement, [theme]);
|
|
450
459
|
const {
|
|
451
460
|
tonal = true,
|
|
452
461
|
color = 'primary',
|
|
@@ -561,7 +570,7 @@ const TextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
561
570
|
const [hover, setHover] = React.useState(false);
|
|
562
571
|
const [row, setRow] = React.useState(rowValue);
|
|
563
572
|
const [rows, setRows] = React.useState(1);
|
|
564
|
-
|
|
573
|
+
const [visible, setVisible] = React.useState(false);
|
|
565
574
|
let type = type_;
|
|
566
575
|
const styles = {
|
|
567
576
|
root: {},
|
|
@@ -614,6 +623,9 @@ const TextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
614
623
|
if (subscription) subscription.unsubscribe(method);
|
|
615
624
|
};
|
|
616
625
|
}, [subscription]);
|
|
626
|
+
const onToggleVisible = React.useCallback(() => {
|
|
627
|
+
setVisible(item => !item);
|
|
628
|
+
}, []);
|
|
617
629
|
const onUpdateRows = () => {
|
|
618
630
|
if (multiline && row !== undefined) {
|
|
619
631
|
const heightValue = refs.input.current.style.height;
|
|
@@ -715,20 +727,6 @@ const TextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
715
727
|
const Wrapper = footer ? WrapperComponent : React.Fragment;
|
|
716
728
|
let ComponentProps = {};
|
|
717
729
|
let WrapperProps = {};
|
|
718
|
-
if (value && clear) {
|
|
719
|
-
if (!Array.isArray(end)) end = [end].filter(Boolean);
|
|
720
|
-
const exists = end?.find(item => item.key === refs.ids.clear);
|
|
721
|
-
if (!exists) {
|
|
722
|
-
if (props.endVerticalAlign === undefined) endVerticalAlign = 'center';
|
|
723
|
-
end.push(/*#__PURE__*/React.createElement(IconClear, _extends({
|
|
724
|
-
key: refs.ids.clear,
|
|
725
|
-
color: "inherit",
|
|
726
|
-
onClick: onClear
|
|
727
|
-
}, IconProps, {
|
|
728
|
-
className: classNames([IconProps?.className, classes.clear])
|
|
729
|
-
})));
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
730
|
if (footer) {
|
|
733
731
|
WrapperProps = _objectSpread({}, other);
|
|
734
732
|
WrapperProps.ref = item => {
|
|
@@ -775,6 +773,36 @@ const TextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
775
773
|
if (!['input', 'textarea'].includes(InputComponent)) {
|
|
776
774
|
inputProps.onInput = onInput;
|
|
777
775
|
}
|
|
776
|
+
const iconProps = {
|
|
777
|
+
size
|
|
778
|
+
};
|
|
779
|
+
const end = React.useMemo(() => {
|
|
780
|
+
const endItems = (Array.isArray(end_) ? end_ : [end_]).filter(Boolean);
|
|
781
|
+
const password = type === 'password';
|
|
782
|
+
if (value && clear) {
|
|
783
|
+
const exists = endItems?.find(item => item.key === refs.ids.clear);
|
|
784
|
+
if (!exists) {
|
|
785
|
+
if (props.endVerticalAlign === undefined) endVerticalAlign = 'center';
|
|
786
|
+
endItems.push(/*#__PURE__*/React.createElement(IconClear, _extends({
|
|
787
|
+
key: refs.ids.clear,
|
|
788
|
+
color: "inherit",
|
|
789
|
+
onClick: onClear
|
|
790
|
+
}, IconProps, {
|
|
791
|
+
className: classNames([IconProps?.className, classes.clear])
|
|
792
|
+
})));
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
const iconButtonPassword = /*#__PURE__*/React.createElement(Tooltip, {
|
|
796
|
+
name: visible ? l('Hide password') : l('View password'),
|
|
797
|
+
color: "inverted"
|
|
798
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
799
|
+
onClick: onToggleVisible,
|
|
800
|
+
color: "default",
|
|
801
|
+
size: "small"
|
|
802
|
+
}, visible ? /*#__PURE__*/React.createElement(IconMaterialPassword2Off, iconProps) : /*#__PURE__*/React.createElement(IconMaterialPassword2, iconProps)));
|
|
803
|
+
if (password) endItems.unshift(iconButtonPassword);
|
|
804
|
+
return endItems;
|
|
805
|
+
}, [visible, onClear, type, end_]);
|
|
778
806
|
const valueWithData = value !== undefined && String(value);
|
|
779
807
|
return /*#__PURE__*/React.createElement(Wrapper, WrapperProps, /*#__PURE__*/React.createElement(Component, _extends({
|
|
780
808
|
onMouseEnter: onMouseEnter,
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onesy/ui-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.123",
|
|
4
4
|
"description": "UI for React",
|
|
5
5
|
"repository": "https://github.com/onesy-me/onesy.git",
|
|
6
|
-
"author": "Lazar <
|
|
6
|
+
"author": "Lazar Erić <lazareric1@proton.me>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": false,
|
|
9
9
|
"main": "./index.js",
|
|
@@ -54,4 +54,4 @@
|
|
|
54
54
|
"node": ">=12.0.0",
|
|
55
55
|
"yarn": ">=1.22"
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
}
|