@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.
package/dist/web.esm.js
CHANGED
|
@@ -4111,7 +4111,7 @@ var SliderPadding = {
|
|
|
4111
4111
|
}
|
|
4112
4112
|
};
|
|
4113
4113
|
|
|
4114
|
-
var _excluded$s = ["id", "name", "inActiveChild", "activeChild", "shadow", "size", "colorScheme", "
|
|
4114
|
+
var _excluded$s = ["id", "name", "inActiveChild", "activeChild", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
|
|
4115
4115
|
var SwitchContent = function SwitchContent(props) {
|
|
4116
4116
|
return React.createElement(Input, Object.assign({
|
|
4117
4117
|
type: "checkbox"
|
|
@@ -4128,8 +4128,8 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4128
4128
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
4129
4129
|
_ref$colorScheme = _ref.colorScheme,
|
|
4130
4130
|
colorScheme = _ref$colorScheme === void 0 ? 'theme.primary' : _ref$colorScheme,
|
|
4131
|
-
_ref$
|
|
4132
|
-
|
|
4131
|
+
_ref$value = _ref.value,
|
|
4132
|
+
value = _ref$value === void 0 ? false : _ref$value,
|
|
4133
4133
|
_ref$isHovered = _ref.isHovered,
|
|
4134
4134
|
isHovered = _ref$isHovered === void 0 ? false : _ref$isHovered,
|
|
4135
4135
|
_ref$isDisabled = _ref.isDisabled,
|
|
@@ -4137,9 +4137,8 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4137
4137
|
_ref$isReadOnly = _ref.isReadOnly,
|
|
4138
4138
|
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
4139
4139
|
onChange = _ref.onChange,
|
|
4140
|
-
|
|
4141
|
-
_ref$
|
|
4142
|
-
setOn = _ref$setOn === void 0 ? function () {} : _ref$setOn,
|
|
4140
|
+
_ref$setValue = _ref.setValue,
|
|
4141
|
+
setValue = _ref$setValue === void 0 ? function () {} : _ref$setValue,
|
|
4143
4142
|
_ref$setIsHovered = _ref.setIsHovered,
|
|
4144
4143
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
4145
4144
|
_ref$styles = _ref.styles,
|
|
@@ -4150,7 +4149,7 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4150
4149
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
4151
4150
|
var handleToggle = function handleToggle(event) {
|
|
4152
4151
|
if (!isReadOnly) {
|
|
4153
|
-
|
|
4152
|
+
setValue(!value);
|
|
4154
4153
|
if (onChange) onChange(event.target.checked);
|
|
4155
4154
|
}
|
|
4156
4155
|
};
|
|
@@ -4167,26 +4166,24 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4167
4166
|
opacity: 0,
|
|
4168
4167
|
width: 0,
|
|
4169
4168
|
height: 0,
|
|
4170
|
-
checked:
|
|
4169
|
+
checked: value,
|
|
4171
4170
|
onChange: handleToggle,
|
|
4172
4171
|
disabled: isDisabled,
|
|
4173
4172
|
readOnly: isReadOnly
|
|
4174
|
-
}, onValueChange && {
|
|
4175
|
-
onValueChange: handleToggle
|
|
4176
4173
|
}, props)), React.createElement(View, Object.assign({
|
|
4177
4174
|
display: "flex",
|
|
4178
4175
|
cursor: "pointer",
|
|
4179
4176
|
alignItems: "center",
|
|
4180
4177
|
borderRadius: 24,
|
|
4181
4178
|
marginBottom: 5,
|
|
4182
|
-
filter: isHovered &&
|
|
4179
|
+
filter: isHovered && value ? 'brightness(0.9)' : 'brightness(1)',
|
|
4183
4180
|
transition: "justify-content 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
4184
|
-
backgroundColor: isDisabled ? 'disabled' :
|
|
4185
|
-
justifyContent: activeChild ? 'space-between' :
|
|
4186
|
-
}, shadow, SliderPadding[size], SliderSizes[size], styles['slider']), activeChild &&
|
|
4181
|
+
backgroundColor: isDisabled ? 'disabled' : value ? colorScheme : 'lightgray',
|
|
4182
|
+
justifyContent: activeChild ? 'space-between' : value ? 'flex-end' : 'flex-start'
|
|
4183
|
+
}, shadow, SliderPadding[size], SliderSizes[size], styles['slider']), activeChild && value && React.createElement(View, null, activeChild), React.createElement(View, Object.assign({
|
|
4187
4184
|
borderRadius: "50%",
|
|
4188
4185
|
backgroundColor: "white"
|
|
4189
|
-
}, KnobSizes[size], styles['circle'])), inActiveChild && !
|
|
4186
|
+
}, KnobSizes[size], styles['circle'])), inActiveChild && !value && React.createElement(View, null, inActiveChild)));
|
|
4190
4187
|
};
|
|
4191
4188
|
|
|
4192
4189
|
var SwitchComponent = function SwitchComponent(props) {
|
|
@@ -4571,12 +4568,8 @@ var SelectComponent$1 = function SelectComponent(props) {
|
|
|
4571
4568
|
*/
|
|
4572
4569
|
var FormikSelect = SelectComponent$1;
|
|
4573
4570
|
|
|
4574
|
-
var _excluded$w = ["value"];
|
|
4575
4571
|
var SwitchComponent$1 = function SwitchComponent(props) {
|
|
4576
|
-
var
|
|
4577
|
-
value = _useFormikInput.value,
|
|
4578
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$w);
|
|
4579
|
-
formProps.isChecked = value;
|
|
4572
|
+
var formProps = useFormikInput(props);
|
|
4580
4573
|
var switchStates = useSwitchState(props);
|
|
4581
4574
|
return React.createElement(SwitchView, Object.assign({}, switchStates, formProps));
|
|
4582
4575
|
};
|
|
@@ -4592,11 +4585,11 @@ var TextAreaComponent$1 = function TextAreaComponent(props) {
|
|
|
4592
4585
|
*/
|
|
4593
4586
|
var FormikTextArea = TextAreaComponent$1;
|
|
4594
4587
|
|
|
4595
|
-
var _excluded$
|
|
4588
|
+
var _excluded$w = ["value"];
|
|
4596
4589
|
var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
4597
4590
|
var formProps = useFormikInput(props);
|
|
4598
4591
|
var _useTextFieldState = useTextFieldState(props),
|
|
4599
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
4592
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$w);
|
|
4600
4593
|
return React.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
4601
4594
|
};
|
|
4602
4595
|
/**
|
|
@@ -4604,7 +4597,7 @@ var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
|
4604
4597
|
*/
|
|
4605
4598
|
var FormikTextField = TextFieldComponent$1;
|
|
4606
4599
|
|
|
4607
|
-
var _excluded$
|
|
4600
|
+
var _excluded$x = ["visibleIcon", "hiddenIcon"],
|
|
4608
4601
|
_excluded2$3 = ["isVisible", "setIsVisible"];
|
|
4609
4602
|
var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
4610
4603
|
var _ref$visibleIcon = _ref.visibleIcon,
|
|
@@ -4615,7 +4608,7 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
|
4615
4608
|
hiddenIcon = _ref$hiddenIcon === void 0 ? React.createElement(CloseEyeSvg, {
|
|
4616
4609
|
size: 14
|
|
4617
4610
|
}) : _ref$hiddenIcon,
|
|
4618
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4611
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
4619
4612
|
var formProps = useFormikInput(props);
|
|
4620
4613
|
var _usePasswordState = usePasswordState(formProps),
|
|
4621
4614
|
isVisible = _usePasswordState.isVisible,
|
|
@@ -4723,7 +4716,7 @@ var HeaderIconSizes = {
|
|
|
4723
4716
|
xl: 28
|
|
4724
4717
|
};
|
|
4725
4718
|
|
|
4726
|
-
var _excluded$
|
|
4719
|
+
var _excluded$y = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
|
|
4727
4720
|
_excluded2$4 = ["children", "shadow", "isFullScreen", "shape"],
|
|
4728
4721
|
_excluded3$2 = ["children", "buttonColor", "iconSize", "buttonPosition"],
|
|
4729
4722
|
_excluded4$2 = ["children"],
|
|
@@ -4739,7 +4732,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
4739
4732
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
4740
4733
|
_ref$position = _ref.position,
|
|
4741
4734
|
position = _ref$position === void 0 ? 'center' : _ref$position,
|
|
4742
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4735
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
4743
4736
|
var handleClick = function handleClick() {
|
|
4744
4737
|
if (!isClosePrevented) onClose();
|
|
4745
4738
|
};
|
|
@@ -4895,12 +4888,12 @@ Modal.Body = ModalBody;
|
|
|
4895
4888
|
Modal.Footer = ModalFooter;
|
|
4896
4889
|
Modal.Layout = ModalLayout;
|
|
4897
4890
|
|
|
4898
|
-
var _excluded$
|
|
4891
|
+
var _excluded$z = ["src", "color"],
|
|
4899
4892
|
_excluded2$5 = ["path"];
|
|
4900
4893
|
var FileSVG = function FileSVG(_ref) {
|
|
4901
4894
|
var src = _ref.src,
|
|
4902
4895
|
color = _ref.color,
|
|
4903
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4896
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
4904
4897
|
var _useTheme = useTheme(),
|
|
4905
4898
|
getColor = _useTheme.getColor;
|
|
4906
4899
|
var Colorprops = color ? {
|