@app-studio/web 0.3.58 → 0.3.59
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.
|
@@ -4118,7 +4118,7 @@ var SliderPadding = {
|
|
|
4118
4118
|
}
|
|
4119
4119
|
};
|
|
4120
4120
|
|
|
4121
|
-
var _excluded$s = ["id", "name", "inActiveChild", "activeChild", "shadow", "size", "colorScheme", "
|
|
4121
|
+
var _excluded$s = ["id", "name", "inActiveChild", "activeChild", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
|
|
4122
4122
|
var SwitchContent = function SwitchContent(props) {
|
|
4123
4123
|
return React__default.createElement(appStudio.Input, Object.assign({
|
|
4124
4124
|
type: "checkbox"
|
|
@@ -4135,8 +4135,8 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4135
4135
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
4136
4136
|
_ref$colorScheme = _ref.colorScheme,
|
|
4137
4137
|
colorScheme = _ref$colorScheme === void 0 ? 'theme.primary' : _ref$colorScheme,
|
|
4138
|
-
_ref$
|
|
4139
|
-
|
|
4138
|
+
_ref$value = _ref.value,
|
|
4139
|
+
value = _ref$value === void 0 ? false : _ref$value,
|
|
4140
4140
|
_ref$isHovered = _ref.isHovered,
|
|
4141
4141
|
isHovered = _ref$isHovered === void 0 ? false : _ref$isHovered,
|
|
4142
4142
|
_ref$isDisabled = _ref.isDisabled,
|
|
@@ -4144,9 +4144,8 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4144
4144
|
_ref$isReadOnly = _ref.isReadOnly,
|
|
4145
4145
|
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
4146
4146
|
onChange = _ref.onChange,
|
|
4147
|
-
|
|
4148
|
-
_ref$
|
|
4149
|
-
setOn = _ref$setOn === void 0 ? function () {} : _ref$setOn,
|
|
4147
|
+
_ref$setValue = _ref.setValue,
|
|
4148
|
+
setValue = _ref$setValue === void 0 ? function () {} : _ref$setValue,
|
|
4150
4149
|
_ref$setIsHovered = _ref.setIsHovered,
|
|
4151
4150
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
4152
4151
|
_ref$styles = _ref.styles,
|
|
@@ -4157,7 +4156,7 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4157
4156
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
4158
4157
|
var handleToggle = function handleToggle(event) {
|
|
4159
4158
|
if (!isReadOnly) {
|
|
4160
|
-
|
|
4159
|
+
setValue(!value);
|
|
4161
4160
|
if (onChange) onChange(event.target.checked);
|
|
4162
4161
|
}
|
|
4163
4162
|
};
|
|
@@ -4174,26 +4173,24 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4174
4173
|
opacity: 0,
|
|
4175
4174
|
width: 0,
|
|
4176
4175
|
height: 0,
|
|
4177
|
-
checked:
|
|
4176
|
+
checked: value,
|
|
4178
4177
|
onChange: handleToggle,
|
|
4179
4178
|
disabled: isDisabled,
|
|
4180
4179
|
readOnly: isReadOnly
|
|
4181
|
-
}, onValueChange && {
|
|
4182
|
-
onValueChange: handleToggle
|
|
4183
4180
|
}, props)), React__default.createElement(View, Object.assign({
|
|
4184
4181
|
display: "flex",
|
|
4185
4182
|
cursor: "pointer",
|
|
4186
4183
|
alignItems: "center",
|
|
4187
4184
|
borderRadius: 24,
|
|
4188
4185
|
marginBottom: 5,
|
|
4189
|
-
filter: isHovered &&
|
|
4186
|
+
filter: isHovered && value ? 'brightness(0.9)' : 'brightness(1)',
|
|
4190
4187
|
transition: "justify-content 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
4191
|
-
backgroundColor: isDisabled ? 'disabled' :
|
|
4192
|
-
justifyContent: activeChild ? 'space-between' :
|
|
4193
|
-
}, shadow, SliderPadding[size], SliderSizes[size], styles['slider']), activeChild &&
|
|
4188
|
+
backgroundColor: isDisabled ? 'disabled' : value ? colorScheme : 'lightgray',
|
|
4189
|
+
justifyContent: activeChild ? 'space-between' : value ? 'flex-end' : 'flex-start'
|
|
4190
|
+
}, shadow, SliderPadding[size], SliderSizes[size], styles['slider']), activeChild && value && React__default.createElement(View, null, activeChild), React__default.createElement(View, Object.assign({
|
|
4194
4191
|
borderRadius: "50%",
|
|
4195
4192
|
backgroundColor: "white"
|
|
4196
|
-
}, KnobSizes[size], styles['circle'])), inActiveChild && !
|
|
4193
|
+
}, KnobSizes[size], styles['circle'])), inActiveChild && !value && React__default.createElement(View, null, inActiveChild)));
|
|
4197
4194
|
};
|
|
4198
4195
|
|
|
4199
4196
|
var SwitchComponent = function SwitchComponent(props) {
|
|
@@ -4578,12 +4575,8 @@ var SelectComponent$1 = function SelectComponent(props) {
|
|
|
4578
4575
|
*/
|
|
4579
4576
|
var FormikSelect = SelectComponent$1;
|
|
4580
4577
|
|
|
4581
|
-
var _excluded$w = ["value"];
|
|
4582
4578
|
var SwitchComponent$1 = function SwitchComponent(props) {
|
|
4583
|
-
var
|
|
4584
|
-
value = _useFormikInput.value,
|
|
4585
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$w);
|
|
4586
|
-
formProps.isChecked = value;
|
|
4579
|
+
var formProps = useFormikInput(props);
|
|
4587
4580
|
var switchStates = useSwitchState(props);
|
|
4588
4581
|
return React__default.createElement(SwitchView, Object.assign({}, switchStates, formProps));
|
|
4589
4582
|
};
|
|
@@ -4599,11 +4592,11 @@ var TextAreaComponent$1 = function TextAreaComponent(props) {
|
|
|
4599
4592
|
*/
|
|
4600
4593
|
var FormikTextArea = TextAreaComponent$1;
|
|
4601
4594
|
|
|
4602
|
-
var _excluded$
|
|
4595
|
+
var _excluded$w = ["value"];
|
|
4603
4596
|
var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
4604
4597
|
var formProps = useFormikInput(props);
|
|
4605
4598
|
var _useTextFieldState = useTextFieldState(props),
|
|
4606
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
4599
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$w);
|
|
4607
4600
|
return React__default.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
4608
4601
|
};
|
|
4609
4602
|
/**
|
|
@@ -4611,7 +4604,7 @@ var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
|
4611
4604
|
*/
|
|
4612
4605
|
var FormikTextField = TextFieldComponent$1;
|
|
4613
4606
|
|
|
4614
|
-
var _excluded$
|
|
4607
|
+
var _excluded$x = ["visibleIcon", "hiddenIcon"],
|
|
4615
4608
|
_excluded2$3 = ["isVisible", "setIsVisible"];
|
|
4616
4609
|
var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
4617
4610
|
var _ref$visibleIcon = _ref.visibleIcon,
|
|
@@ -4622,7 +4615,7 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
|
4622
4615
|
hiddenIcon = _ref$hiddenIcon === void 0 ? React__default.createElement(CloseEyeSvg, {
|
|
4623
4616
|
size: 14
|
|
4624
4617
|
}) : _ref$hiddenIcon,
|
|
4625
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4618
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
4626
4619
|
var formProps = useFormikInput(props);
|
|
4627
4620
|
var _usePasswordState = usePasswordState(formProps),
|
|
4628
4621
|
isVisible = _usePasswordState.isVisible,
|
|
@@ -4730,7 +4723,7 @@ var HeaderIconSizes = {
|
|
|
4730
4723
|
xl: 28
|
|
4731
4724
|
};
|
|
4732
4725
|
|
|
4733
|
-
var _excluded$
|
|
4726
|
+
var _excluded$y = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
|
|
4734
4727
|
_excluded2$4 = ["children", "shadow", "isFullScreen", "shape"],
|
|
4735
4728
|
_excluded3$2 = ["children", "buttonColor", "iconSize", "buttonPosition"],
|
|
4736
4729
|
_excluded4$2 = ["children"],
|
|
@@ -4746,7 +4739,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
4746
4739
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
4747
4740
|
_ref$position = _ref.position,
|
|
4748
4741
|
position = _ref$position === void 0 ? 'center' : _ref$position,
|
|
4749
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4742
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
4750
4743
|
var handleClick = function handleClick() {
|
|
4751
4744
|
if (!isClosePrevented) onClose();
|
|
4752
4745
|
};
|
|
@@ -4902,12 +4895,12 @@ Modal.Body = ModalBody;
|
|
|
4902
4895
|
Modal.Footer = ModalFooter;
|
|
4903
4896
|
Modal.Layout = ModalLayout;
|
|
4904
4897
|
|
|
4905
|
-
var _excluded$
|
|
4898
|
+
var _excluded$z = ["src", "color"],
|
|
4906
4899
|
_excluded2$5 = ["path"];
|
|
4907
4900
|
var FileSVG = function FileSVG(_ref) {
|
|
4908
4901
|
var src = _ref.src,
|
|
4909
4902
|
color = _ref.color,
|
|
4910
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4903
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
4911
4904
|
var _useTheme = appStudio.useTheme(),
|
|
4912
4905
|
getColor = _useTheme.getColor;
|
|
4913
4906
|
var Colorprops = color ? {
|