@app-studio/web 0.8.2 → 0.8.4
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.cjs.development.js +25 -21
- 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 +25 -21
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +25 -21
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +3 -3
|
@@ -1447,11 +1447,6 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
1447
1447
|
_ref$setIsHovered = _ref.setIsHovered,
|
|
1448
1448
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
1449
1449
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
1450
|
-
console.log({
|
|
1451
|
-
button: props,
|
|
1452
|
-
size: size,
|
|
1453
|
-
isDisabled: isDisabled
|
|
1454
|
-
});
|
|
1455
1450
|
var _useTheme = appStudio.useTheme(),
|
|
1456
1451
|
getColor = _useTheme.getColor;
|
|
1457
1452
|
var handleHover = function handleHover() {
|
|
@@ -1508,9 +1503,7 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
1508
1503
|
var scaleWidth = {
|
|
1509
1504
|
width: isAuto ? 'fit-content' : isFilled ? '100%' : buttonSizeStyles.width
|
|
1510
1505
|
};
|
|
1511
|
-
var changePadding =
|
|
1512
|
-
padding: isIconRounded ? IconSizes$1[size].padding : ButtonSizes[size].padding
|
|
1513
|
-
};
|
|
1506
|
+
var changePadding = isIconRounded ? IconSizes$1[size] : ButtonSizes[size];
|
|
1514
1507
|
var content = React__default.createElement(Horizontal, {
|
|
1515
1508
|
gap: 10
|
|
1516
1509
|
}, isLoading && loaderPosition === 'left' && React__default.createElement(Loader, Object.assign({}, loaderProps)), icon && iconPosition === 'left' && !isLoading && icon, children, icon && iconPosition === 'right' && !isLoading && icon, isLoading && loaderPosition === 'right' && React__default.createElement(Loader, Object.assign({}, loaderProps)));
|
|
@@ -1523,17 +1516,18 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
1523
1516
|
display: "flex",
|
|
1524
1517
|
alignItems: "center",
|
|
1525
1518
|
justifyContent: "center",
|
|
1526
|
-
|
|
1519
|
+
"aria-label": ariaLabel,
|
|
1527
1520
|
backgroundColor: buttonColor,
|
|
1528
1521
|
borderRadius: ButtonShapes[shape],
|
|
1529
1522
|
onClick: (_props$onClick = props.onClick) != null ? _props$onClick : onClick,
|
|
1530
1523
|
onMouseEnter: handleHover,
|
|
1531
1524
|
onMouseLeave: handleHover,
|
|
1532
1525
|
cursor: isActive ? 'pointer' : 'default',
|
|
1533
|
-
filter: hovering ? 'brightness(0.85)' : 'brightness(1)'
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1526
|
+
filter: hovering ? 'brightness(0.85)' : 'brightness(1)'
|
|
1527
|
+
}, hovering && !props.isDisabled ? {
|
|
1528
|
+
transition: 'transform 0.3s ease',
|
|
1529
|
+
transform: 'translateY(-5px)'
|
|
1530
|
+
} : {}, defaultNativeProps, buttonSizeStyles, buttonVariant, scaleWidth, changePadding, shadow, props), variant === 'link' && externalHref ? React__default.createElement(Link, {
|
|
1537
1531
|
href: externalHref,
|
|
1538
1532
|
textDecorationColor: colorScheme,
|
|
1539
1533
|
colorScheme: colorScheme,
|
|
@@ -2422,7 +2416,7 @@ var SliderPadding = {
|
|
|
2422
2416
|
}
|
|
2423
2417
|
};
|
|
2424
2418
|
|
|
2425
|
-
var _excluded$s = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
|
|
2419
|
+
var _excluded$s = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "styles"];
|
|
2426
2420
|
var SwitchContent = function SwitchContent(props) {
|
|
2427
2421
|
return React__default.createElement(appStudio.Input, Object.assign({
|
|
2428
2422
|
type: "checkbox"
|
|
@@ -2450,6 +2444,8 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
2450
2444
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
2451
2445
|
_ref$isReadOnly = _ref.isReadOnly,
|
|
2452
2446
|
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
2447
|
+
on = _ref.on,
|
|
2448
|
+
setOn = _ref.setOn,
|
|
2453
2449
|
onChange = _ref.onChange,
|
|
2454
2450
|
_ref$setValue = _ref.setValue,
|
|
2455
2451
|
setValue = _ref$setValue === void 0 ? function () {} : _ref$setValue,
|
|
@@ -2465,6 +2461,7 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
2465
2461
|
var handleToggle = function handleToggle(event) {
|
|
2466
2462
|
if (!isReadOnly) {
|
|
2467
2463
|
setValue(!value);
|
|
2464
|
+
setOn(!on);
|
|
2468
2465
|
if (onChange) onChange(event.target.checked);
|
|
2469
2466
|
}
|
|
2470
2467
|
};
|
|
@@ -3044,9 +3041,10 @@ var CheckboxView = function CheckboxView(_ref) {
|
|
|
3044
3041
|
borderColor: error ? 'theme.error' : isHovered ? 'color.gray.500' : 'color.gray.300',
|
|
3045
3042
|
borderStyle: 'solid'
|
|
3046
3043
|
}, {
|
|
3047
|
-
borderRadius: 3
|
|
3048
|
-
|
|
3049
|
-
|
|
3044
|
+
borderRadius: 3
|
|
3045
|
+
}, isHovered ? {
|
|
3046
|
+
filter: 'brightness(0.9)'
|
|
3047
|
+
} : {}, Sizes[size], shadow, styles['checkbox'])
|
|
3050
3048
|
};
|
|
3051
3049
|
return React__default.createElement(Label, Object.assign({
|
|
3052
3050
|
htmlFor: id,
|
|
@@ -5102,7 +5100,8 @@ var getInputTypeProps = function getInputTypeProps(type) {
|
|
|
5102
5100
|
case 'email':
|
|
5103
5101
|
return {
|
|
5104
5102
|
autoCorrect: 'off',
|
|
5105
|
-
keyboardType: 'email-address',
|
|
5103
|
+
// keyboardType: 'email-address',
|
|
5104
|
+
inputmode: 'email',
|
|
5106
5105
|
autoCapitalize: 'none'
|
|
5107
5106
|
};
|
|
5108
5107
|
case 'password':
|
|
@@ -5113,7 +5112,13 @@ var getInputTypeProps = function getInputTypeProps(type) {
|
|
|
5113
5112
|
};
|
|
5114
5113
|
case 'digits':
|
|
5115
5114
|
return {
|
|
5116
|
-
keyboardType: 'phone-pad'
|
|
5115
|
+
// keyboardType: 'phone-pad',
|
|
5116
|
+
inputmode: 'tel'
|
|
5117
|
+
};
|
|
5118
|
+
case 'numeric':
|
|
5119
|
+
return {
|
|
5120
|
+
// keyboardType: 'phone-pad',
|
|
5121
|
+
inputmode: 'numeric'
|
|
5117
5122
|
};
|
|
5118
5123
|
case 'name':
|
|
5119
5124
|
return {
|
|
@@ -6485,8 +6490,7 @@ var ToggleGroupView = function ToggleGroupView(_ref) {
|
|
|
6485
6490
|
onToggle: function onToggle(state) {
|
|
6486
6491
|
return handleToggle(item.id, state);
|
|
6487
6492
|
},
|
|
6488
|
-
isDisabled: item.isDisabled
|
|
6489
|
-
isIntern: true
|
|
6493
|
+
isDisabled: item.isDisabled
|
|
6490
6494
|
}, item.value);
|
|
6491
6495
|
}));
|
|
6492
6496
|
};
|