@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
|
@@ -1442,11 +1442,6 @@
|
|
|
1442
1442
|
_ref$setIsHovered = _ref.setIsHovered,
|
|
1443
1443
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
1444
1444
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
1445
|
-
console.log({
|
|
1446
|
-
button: props,
|
|
1447
|
-
size: size,
|
|
1448
|
-
isDisabled: isDisabled
|
|
1449
|
-
});
|
|
1450
1445
|
var _useTheme = appStudio.useTheme(),
|
|
1451
1446
|
getColor = _useTheme.getColor;
|
|
1452
1447
|
var handleHover = function handleHover() {
|
|
@@ -1503,9 +1498,7 @@
|
|
|
1503
1498
|
var scaleWidth = {
|
|
1504
1499
|
width: isAuto ? 'fit-content' : isFilled ? '100%' : buttonSizeStyles.width
|
|
1505
1500
|
};
|
|
1506
|
-
var changePadding =
|
|
1507
|
-
padding: isIconRounded ? IconSizes$1[size].padding : ButtonSizes[size].padding
|
|
1508
|
-
};
|
|
1501
|
+
var changePadding = isIconRounded ? IconSizes$1[size] : ButtonSizes[size];
|
|
1509
1502
|
var content = React__default.createElement(Horizontal, {
|
|
1510
1503
|
gap: 10
|
|
1511
1504
|
}, 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)));
|
|
@@ -1518,17 +1511,18 @@
|
|
|
1518
1511
|
display: "flex",
|
|
1519
1512
|
alignItems: "center",
|
|
1520
1513
|
justifyContent: "center",
|
|
1521
|
-
|
|
1514
|
+
"aria-label": ariaLabel,
|
|
1522
1515
|
backgroundColor: buttonColor,
|
|
1523
1516
|
borderRadius: ButtonShapes[shape],
|
|
1524
1517
|
onClick: (_props$onClick = props.onClick) != null ? _props$onClick : onClick,
|
|
1525
1518
|
onMouseEnter: handleHover,
|
|
1526
1519
|
onMouseLeave: handleHover,
|
|
1527
1520
|
cursor: isActive ? 'pointer' : 'default',
|
|
1528
|
-
filter: hovering ? 'brightness(0.85)' : 'brightness(1)'
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1521
|
+
filter: hovering ? 'brightness(0.85)' : 'brightness(1)'
|
|
1522
|
+
}, hovering && !props.isDisabled ? {
|
|
1523
|
+
transition: 'transform 0.3s ease',
|
|
1524
|
+
transform: 'translateY(-5px)'
|
|
1525
|
+
} : {}, defaultNativeProps, buttonSizeStyles, buttonVariant, scaleWidth, changePadding, shadow, props), variant === 'link' && externalHref ? React__default.createElement(Link, {
|
|
1532
1526
|
href: externalHref,
|
|
1533
1527
|
textDecorationColor: colorScheme,
|
|
1534
1528
|
colorScheme: colorScheme,
|
|
@@ -2417,7 +2411,7 @@
|
|
|
2417
2411
|
}
|
|
2418
2412
|
};
|
|
2419
2413
|
|
|
2420
|
-
var _excluded$s = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
|
|
2414
|
+
var _excluded$s = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "styles"];
|
|
2421
2415
|
var SwitchContent = function SwitchContent(props) {
|
|
2422
2416
|
return React__default.createElement(appStudio.Input, Object.assign({
|
|
2423
2417
|
type: "checkbox"
|
|
@@ -2445,6 +2439,8 @@
|
|
|
2445
2439
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
2446
2440
|
_ref$isReadOnly = _ref.isReadOnly,
|
|
2447
2441
|
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
2442
|
+
on = _ref.on,
|
|
2443
|
+
setOn = _ref.setOn,
|
|
2448
2444
|
onChange = _ref.onChange,
|
|
2449
2445
|
_ref$setValue = _ref.setValue,
|
|
2450
2446
|
setValue = _ref$setValue === void 0 ? function () {} : _ref$setValue,
|
|
@@ -2460,6 +2456,7 @@
|
|
|
2460
2456
|
var handleToggle = function handleToggle(event) {
|
|
2461
2457
|
if (!isReadOnly) {
|
|
2462
2458
|
setValue(!value);
|
|
2459
|
+
setOn(!on);
|
|
2463
2460
|
if (onChange) onChange(event.target.checked);
|
|
2464
2461
|
}
|
|
2465
2462
|
};
|
|
@@ -3039,9 +3036,10 @@
|
|
|
3039
3036
|
borderColor: error ? 'theme.error' : isHovered ? 'color.gray.500' : 'color.gray.300',
|
|
3040
3037
|
borderStyle: 'solid'
|
|
3041
3038
|
}, {
|
|
3042
|
-
borderRadius: 3
|
|
3043
|
-
|
|
3044
|
-
|
|
3039
|
+
borderRadius: 3
|
|
3040
|
+
}, isHovered ? {
|
|
3041
|
+
filter: 'brightness(0.9)'
|
|
3042
|
+
} : {}, Sizes[size], shadow, styles['checkbox'])
|
|
3045
3043
|
};
|
|
3046
3044
|
return React__default.createElement(Label, Object.assign({
|
|
3047
3045
|
htmlFor: id,
|
|
@@ -5097,7 +5095,8 @@
|
|
|
5097
5095
|
case 'email':
|
|
5098
5096
|
return {
|
|
5099
5097
|
autoCorrect: 'off',
|
|
5100
|
-
keyboardType: 'email-address',
|
|
5098
|
+
// keyboardType: 'email-address',
|
|
5099
|
+
inputmode: 'email',
|
|
5101
5100
|
autoCapitalize: 'none'
|
|
5102
5101
|
};
|
|
5103
5102
|
case 'password':
|
|
@@ -5108,7 +5107,13 @@
|
|
|
5108
5107
|
};
|
|
5109
5108
|
case 'digits':
|
|
5110
5109
|
return {
|
|
5111
|
-
keyboardType: 'phone-pad'
|
|
5110
|
+
// keyboardType: 'phone-pad',
|
|
5111
|
+
inputmode: 'tel'
|
|
5112
|
+
};
|
|
5113
|
+
case 'numeric':
|
|
5114
|
+
return {
|
|
5115
|
+
// keyboardType: 'phone-pad',
|
|
5116
|
+
inputmode: 'numeric'
|
|
5112
5117
|
};
|
|
5113
5118
|
case 'name':
|
|
5114
5119
|
return {
|
|
@@ -6480,8 +6485,7 @@
|
|
|
6480
6485
|
onToggle: function onToggle(state) {
|
|
6481
6486
|
return handleToggle(item.id, state);
|
|
6482
6487
|
},
|
|
6483
|
-
isDisabled: item.isDisabled
|
|
6484
|
-
isIntern: true
|
|
6488
|
+
isDisabled: item.isDisabled
|
|
6485
6489
|
}, item.value);
|
|
6486
6490
|
}));
|
|
6487
6491
|
};
|