@app-studio/web 0.3.34 → 0.3.36
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/dist/components/Form/Password/Password/Password.props.d.ts +10 -0
- package/dist/components/Form/Password/Password/Password.state.d.ts +10 -1
- package/dist/web.cjs.development.js +44 -50
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +44 -50
- package/dist/web.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Form/Password/Password/Password.view.d.ts +0 -4
package/dist/web.esm.js
CHANGED
|
@@ -3128,16 +3128,6 @@ var DatePickerComponent = function DatePickerComponent(props) {
|
|
|
3128
3128
|
*/
|
|
3129
3129
|
var DatePicker = DatePickerComponent;
|
|
3130
3130
|
|
|
3131
|
-
var usePasswordState = function usePasswordState() {
|
|
3132
|
-
var _useState = useState(false),
|
|
3133
|
-
isVisible = _useState[0],
|
|
3134
|
-
setIsVisible = _useState[1];
|
|
3135
|
-
return {
|
|
3136
|
-
isVisible: isVisible,
|
|
3137
|
-
setIsVisible: setIsVisible
|
|
3138
|
-
};
|
|
3139
|
-
};
|
|
3140
|
-
|
|
3141
3131
|
var useTextFieldState = function useTextFieldState(_ref) {
|
|
3142
3132
|
var label = _ref.label,
|
|
3143
3133
|
placeholder = _ref.placeholder,
|
|
@@ -3166,6 +3156,17 @@ var useTextFieldState = function useTextFieldState(_ref) {
|
|
|
3166
3156
|
};
|
|
3167
3157
|
};
|
|
3168
3158
|
|
|
3159
|
+
var usePasswordState = function usePasswordState(props) {
|
|
3160
|
+
var textFieldStates = useTextFieldState(props);
|
|
3161
|
+
var _useState = useState(false),
|
|
3162
|
+
isVisible = _useState[0],
|
|
3163
|
+
setIsVisible = _useState[1];
|
|
3164
|
+
return _extends({
|
|
3165
|
+
isVisible: isVisible,
|
|
3166
|
+
setIsVisible: setIsVisible
|
|
3167
|
+
}, textFieldStates);
|
|
3168
|
+
};
|
|
3169
|
+
|
|
3169
3170
|
var _excluded$o = ["id", "name", "label", "value", "hint", "inputValue", "onChange", "leftChild", "rightChild", "helperText", "placeholder", "onChangeText", "shadow", "styles", "size", "shape", "variant", "colorScheme", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isClearable", "isAutoFocus", "setHint", "setIsFocused", "setIsHovered", "setInputValue", "onClick", "onFocus", "onBlur"];
|
|
3170
3171
|
var TextFieldInput = function TextFieldInput(props) {
|
|
3171
3172
|
return React.createElement(Input, Object.assign({
|
|
@@ -3342,19 +3343,10 @@ var TextFieldView = function TextFieldView(_ref) {
|
|
|
3342
3343
|
}))));
|
|
3343
3344
|
};
|
|
3344
3345
|
|
|
3345
|
-
var
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
/**
|
|
3350
|
-
* TextField is used to capture text data from users.
|
|
3351
|
-
*/
|
|
3352
|
-
var TextField = TextFieldComponent;
|
|
3353
|
-
|
|
3354
|
-
var _excluded$p = ["name", "visibleIcon", "hiddenIcon", "isDisabled"];
|
|
3355
|
-
var PasswordView = function PasswordView(_ref) {
|
|
3356
|
-
var name = _ref.name,
|
|
3357
|
-
_ref$visibleIcon = _ref.visibleIcon,
|
|
3346
|
+
var _excluded$p = ["visibleIcon", "hiddenIcon"],
|
|
3347
|
+
_excluded2 = ["isVisible", "setIsVisible"];
|
|
3348
|
+
var PasswordComponent = function PasswordComponent(_ref) {
|
|
3349
|
+
var _ref$visibleIcon = _ref.visibleIcon,
|
|
3358
3350
|
visibleIcon = _ref$visibleIcon === void 0 ? React.createElement(OpenEyeSvg, {
|
|
3359
3351
|
size: 14
|
|
3360
3352
|
}) : _ref$visibleIcon,
|
|
@@ -3362,29 +3354,22 @@ var PasswordView = function PasswordView(_ref) {
|
|
|
3362
3354
|
hiddenIcon = _ref$hiddenIcon === void 0 ? React.createElement(CloseEyeSvg, {
|
|
3363
3355
|
size: 14
|
|
3364
3356
|
}) : _ref$hiddenIcon,
|
|
3365
|
-
_ref$isDisabled = _ref.isDisabled,
|
|
3366
|
-
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
3367
3357
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
3368
|
-
var
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
type:
|
|
3374
|
-
|
|
3358
|
+
var _usePasswordState = usePasswordState(props),
|
|
3359
|
+
isVisible = _usePasswordState.isVisible,
|
|
3360
|
+
setIsVisible = _usePasswordState.setIsVisible,
|
|
3361
|
+
passwordState = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2);
|
|
3362
|
+
return React.createElement(TextFieldView, Object.assign({
|
|
3363
|
+
type: isVisible ? 'text' : 'password',
|
|
3364
|
+
isClearable: false,
|
|
3365
|
+
rightChild: React.createElement(View$1, {
|
|
3375
3366
|
onClick: function onClick() {
|
|
3376
|
-
if (!isDisabled) {
|
|
3377
|
-
|
|
3367
|
+
if (!props.isDisabled) {
|
|
3368
|
+
setIsVisible(!isVisible);
|
|
3378
3369
|
}
|
|
3379
3370
|
}
|
|
3380
|
-
},
|
|
3381
|
-
|
|
3382
|
-
}, props));
|
|
3383
|
-
};
|
|
3384
|
-
|
|
3385
|
-
var PasswordComponent = function PasswordComponent(props) {
|
|
3386
|
-
var passwordState = usePasswordState();
|
|
3387
|
-
return React.createElement(PasswordView, Object.assign({}, passwordState, props));
|
|
3371
|
+
}, isVisible ? visibleIcon : hiddenIcon)
|
|
3372
|
+
}, passwordState, props));
|
|
3388
3373
|
};
|
|
3389
3374
|
/**
|
|
3390
3375
|
* To allow users to securely enter sensitive information
|
|
@@ -3438,7 +3423,7 @@ var IconSizes$4 = {
|
|
|
3438
3423
|
};
|
|
3439
3424
|
|
|
3440
3425
|
var _excluded$q = ["isHovered", "setIsHovered", "option", "size", "callback"],
|
|
3441
|
-
_excluded2 = ["id", "name", "selected", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
3426
|
+
_excluded2$1 = ["id", "name", "selected", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
3442
3427
|
_excluded3 = ["option", "size", "removeOption"],
|
|
3443
3428
|
_excluded4 = ["id", "name", "label", "selected", "placeholder", "helperText", "hide", "error", "isMulti", "isFocused", "isHovered", "isDisabled", "isReadOnly", "options", "shadow", "size", "colorScheme", "shape", "variant", "styles", "onChange", "setHide", "setSelected", "setIsHovered", "setIsFocused"];
|
|
3444
3429
|
var Item = function Item(_ref) {
|
|
@@ -3519,7 +3504,7 @@ var HiddenSelect = function HiddenSelect(_ref3) {
|
|
|
3519
3504
|
isReadOnly = _ref3$isReadOnly === void 0 ? false : _ref3$isReadOnly,
|
|
3520
3505
|
_ref3$options = _ref3.options,
|
|
3521
3506
|
options = _ref3$options === void 0 ? [] : _ref3$options,
|
|
3522
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
3507
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$1);
|
|
3523
3508
|
var handleChange = function handleChange(event) {
|
|
3524
3509
|
if (onChange) onChange(event);
|
|
3525
3510
|
};
|
|
@@ -4188,6 +4173,15 @@ var TextAreaComponent = function TextAreaComponent(props) {
|
|
|
4188
4173
|
*/
|
|
4189
4174
|
var TextArea = TextAreaComponent;
|
|
4190
4175
|
|
|
4176
|
+
var TextFieldComponent = function TextFieldComponent(props) {
|
|
4177
|
+
var textFieldStates = useTextFieldState(props);
|
|
4178
|
+
return React.createElement(TextFieldView, Object.assign({}, textFieldStates, props));
|
|
4179
|
+
};
|
|
4180
|
+
/**
|
|
4181
|
+
* TextField is used to capture text data from users.
|
|
4182
|
+
*/
|
|
4183
|
+
var TextField = TextFieldComponent;
|
|
4184
|
+
|
|
4191
4185
|
var DefaultSizes = {
|
|
4192
4186
|
xs: 14,
|
|
4193
4187
|
sm: 18,
|
|
@@ -4207,7 +4201,7 @@ var DefaultSpeeds = {
|
|
|
4207
4201
|
};
|
|
4208
4202
|
|
|
4209
4203
|
var _excluded$t = ["size", "speed", "color"],
|
|
4210
|
-
_excluded2$
|
|
4204
|
+
_excluded2$2 = ["size", "speed", "color"],
|
|
4211
4205
|
_excluded3$1 = ["size", "speed", "color"],
|
|
4212
4206
|
_excluded4$1 = ["size", "children", "textColor", "loaderColor", "type", "speed", "textPosition"];
|
|
4213
4207
|
var DefaultSpinner = function DefaultSpinner(_ref) {
|
|
@@ -4267,7 +4261,7 @@ var Dotted = function Dotted(_ref2) {
|
|
|
4267
4261
|
speed = _ref2$speed === void 0 ? 'normal' : _ref2$speed,
|
|
4268
4262
|
_ref2$color = _ref2.color,
|
|
4269
4263
|
color = _ref2$color === void 0 ? 'theme.loading' : _ref2$color,
|
|
4270
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
4264
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$2);
|
|
4271
4265
|
var theme = useTheme();
|
|
4272
4266
|
var colorStyle = theme.getColor(color);
|
|
4273
4267
|
var sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
@@ -4468,7 +4462,7 @@ var HeaderIconSizes = {
|
|
|
4468
4462
|
};
|
|
4469
4463
|
|
|
4470
4464
|
var _excluded$u = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
|
|
4471
|
-
_excluded2$
|
|
4465
|
+
_excluded2$3 = ["children", "shadow", "isFullScreen", "shape"],
|
|
4472
4466
|
_excluded3$2 = ["children", "buttonColor", "iconSize", "buttonPosition"],
|
|
4473
4467
|
_excluded4$2 = ["children"],
|
|
4474
4468
|
_excluded5 = ["children"];
|
|
@@ -4517,7 +4511,7 @@ var ModalContainer = function ModalContainer(_ref2) {
|
|
|
4517
4511
|
isFullScreen = _ref2$isFullScreen === void 0 ? false : _ref2$isFullScreen,
|
|
4518
4512
|
_ref2$shape = _ref2.shape,
|
|
4519
4513
|
shape = _ref2$shape === void 0 ? 'rounded' : _ref2$shape,
|
|
4520
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
4514
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
|
|
4521
4515
|
var defaultShadow = typeof document !== undefined ? {
|
|
4522
4516
|
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.3)'
|
|
4523
4517
|
} : {
|
|
@@ -4641,7 +4635,7 @@ Modal.Footer = ModalFooter;
|
|
|
4641
4635
|
Modal.Layout = ModalLayout;
|
|
4642
4636
|
|
|
4643
4637
|
var _excluded$v = ["src", "color"],
|
|
4644
|
-
_excluded2$
|
|
4638
|
+
_excluded2$4 = ["path"];
|
|
4645
4639
|
var FileSVG = function FileSVG(_ref) {
|
|
4646
4640
|
var src = _ref.src,
|
|
4647
4641
|
color = _ref.color,
|
|
@@ -4660,7 +4654,7 @@ var FileSVG = function FileSVG(_ref) {
|
|
|
4660
4654
|
};
|
|
4661
4655
|
var FileImage = function FileImage(_ref2) {
|
|
4662
4656
|
var path = _ref2.path,
|
|
4663
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
4657
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
|
|
4664
4658
|
return React.createElement(Image, Object.assign({
|
|
4665
4659
|
src: path
|
|
4666
4660
|
}, props));
|