@app-studio/web 0.9.62 → 0.9.65
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/Button/Button/Button.props.d.ts +4 -1
- package/dist/components/Button/Button/Button.style.d.ts +1 -1
- package/dist/components/Title/Title/SlideEffect.d.ts +1 -0
- package/dist/components/Title/Title/Title.props.d.ts +5 -0
- package/dist/components/Title/Title/TypewriterEffect.d.ts +1 -0
- package/dist/web.cjs.development.js +384 -309
- 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 +384 -309
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +384 -309
- 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 +2 -2
- package/dist/components/Title/Title/useInView.d.ts +0 -9
|
@@ -4797,6 +4797,11 @@ var LoaderView = _ref4 => {
|
|
|
4797
4797
|
views
|
|
4798
4798
|
} = _ref4,
|
|
4799
4799
|
props = _objectWithoutPropertiesLoose(_ref4, _excluded4$2);
|
|
4800
|
+
var {
|
|
4801
|
+
getColor
|
|
4802
|
+
} = appStudio.useTheme();
|
|
4803
|
+
loaderColor = getColor(loaderColor || props.color || 'theme.loading');
|
|
4804
|
+
textColor = getColor(textColor || props.color || 'theme.loading');
|
|
4800
4805
|
var style = {
|
|
4801
4806
|
size,
|
|
4802
4807
|
speed,
|
|
@@ -4910,12 +4915,19 @@ var IconSizes$1 = {
|
|
|
4910
4915
|
padding: 14
|
|
4911
4916
|
}
|
|
4912
4917
|
};
|
|
4913
|
-
var getButtonVariants = function getButtonVariants(color, isLight,
|
|
4918
|
+
var getButtonVariants = function getButtonVariants(color, isLight, reversed) {
|
|
4919
|
+
if (reversed === void 0) {
|
|
4920
|
+
reversed = false;
|
|
4921
|
+
}
|
|
4914
4922
|
var textColor = isLight ? '#000000' : '#FFFFFF';
|
|
4923
|
+
// Determine effective colors based on reversed state
|
|
4924
|
+
var effectiveBg = reversed ? textColor : color;
|
|
4925
|
+
var effectiveContent = reversed ? color : textColor;
|
|
4926
|
+
var effectiveBorder = reversed ? textColor : color;
|
|
4915
4927
|
return {
|
|
4916
4928
|
filled: {
|
|
4917
|
-
backgroundColor:
|
|
4918
|
-
color:
|
|
4929
|
+
backgroundColor: effectiveBg,
|
|
4930
|
+
color: effectiveContent,
|
|
4919
4931
|
borderWidth: 1,
|
|
4920
4932
|
borderStyle: 'solid',
|
|
4921
4933
|
borderColor: 'transparent',
|
|
@@ -4927,57 +4939,57 @@ var getButtonVariants = function getButtonVariants(color, isLight, isThemeLight)
|
|
|
4927
4939
|
},
|
|
4928
4940
|
_focusVisible: {
|
|
4929
4941
|
outline: 'none',
|
|
4930
|
-
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " +
|
|
4942
|
+
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " + effectiveBg
|
|
4931
4943
|
},
|
|
4932
4944
|
transition: 'background-color 0.2s ease, opacity 0.2s ease'
|
|
4933
4945
|
},
|
|
4934
|
-
|
|
4935
|
-
backgroundColor:
|
|
4936
|
-
color:
|
|
4946
|
+
empty: {
|
|
4947
|
+
backgroundColor: 'transparent',
|
|
4948
|
+
color: effectiveBorder,
|
|
4937
4949
|
borderWidth: 1,
|
|
4938
4950
|
borderStyle: 'solid',
|
|
4939
|
-
borderColor:
|
|
4951
|
+
borderColor: effectiveBorder,
|
|
4940
4952
|
_hover: {
|
|
4941
4953
|
opacity: 0.9
|
|
4942
4954
|
},
|
|
4943
4955
|
_active: {
|
|
4944
4956
|
opacity: 0.95
|
|
4945
4957
|
},
|
|
4958
|
+
_focusVisible: {
|
|
4959
|
+
outline: 'none',
|
|
4960
|
+
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " + effectiveBorder
|
|
4961
|
+
},
|
|
4946
4962
|
transition: 'background-color 0.2s ease, opacity 0.2s ease'
|
|
4947
4963
|
},
|
|
4948
4964
|
outline: {
|
|
4949
4965
|
backgroundColor: 'transparent',
|
|
4950
|
-
color:
|
|
4966
|
+
color: effectiveBorder,
|
|
4951
4967
|
borderWidth: 1,
|
|
4952
4968
|
borderStyle: 'solid',
|
|
4953
|
-
borderColor:
|
|
4969
|
+
borderColor: effectiveBorder,
|
|
4954
4970
|
_hover: {
|
|
4955
|
-
backgroundColor: color,
|
|
4956
|
-
color: textColor,
|
|
4957
4971
|
opacity: 0.9
|
|
4958
4972
|
},
|
|
4959
4973
|
_active: {
|
|
4960
|
-
backgroundColor: color,
|
|
4961
|
-
color: textColor,
|
|
4962
4974
|
opacity: 0.95
|
|
4963
4975
|
},
|
|
4964
4976
|
_focusVisible: {
|
|
4965
4977
|
outline: 'none',
|
|
4966
|
-
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " +
|
|
4978
|
+
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " + effectiveBorder
|
|
4967
4979
|
},
|
|
4968
4980
|
transition: 'background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease'
|
|
4969
4981
|
},
|
|
4970
4982
|
ghost: {
|
|
4971
4983
|
backgroundColor: 'transparent',
|
|
4972
|
-
color:
|
|
4984
|
+
color: effectiveBorder,
|
|
4973
4985
|
borderWidth: 1,
|
|
4974
4986
|
borderStyle: 'solid',
|
|
4975
4987
|
borderColor: 'transparent',
|
|
4976
4988
|
_hover: {
|
|
4977
4989
|
borderWidth: 1,
|
|
4978
4990
|
borderStyle: 'solid',
|
|
4979
|
-
borderColor:
|
|
4980
|
-
color:
|
|
4991
|
+
borderColor: effectiveBorder,
|
|
4992
|
+
color: effectiveBorder,
|
|
4981
4993
|
opacity: 0.9
|
|
4982
4994
|
},
|
|
4983
4995
|
_active: {
|
|
@@ -4985,20 +4997,20 @@ var getButtonVariants = function getButtonVariants(color, isLight, isThemeLight)
|
|
|
4985
4997
|
},
|
|
4986
4998
|
_focusVisible: {
|
|
4987
4999
|
outline: 'none',
|
|
4988
|
-
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " +
|
|
5000
|
+
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " + effectiveBorder
|
|
4989
5001
|
},
|
|
4990
5002
|
transition: 'background-color 0.2s ease, opacity 0.2s ease'
|
|
4991
5003
|
},
|
|
4992
5004
|
link: {
|
|
4993
5005
|
backgroundColor: 'transparent',
|
|
4994
|
-
color:
|
|
5006
|
+
color: effectiveBorder,
|
|
4995
5007
|
borderWidth: 0,
|
|
4996
5008
|
borderStyle: 'none',
|
|
4997
5009
|
borderColor: 'transparent',
|
|
4998
5010
|
textDecoration: 'underline',
|
|
4999
5011
|
textUnderlineOffset: '2px',
|
|
5000
5012
|
textDecorationThickness: '1px',
|
|
5001
|
-
textDecorationColor:
|
|
5013
|
+
textDecorationColor: effectiveBorder,
|
|
5002
5014
|
_hover: {
|
|
5003
5015
|
opacity: 0.8
|
|
5004
5016
|
},
|
|
@@ -5007,83 +5019,35 @@ var getButtonVariants = function getButtonVariants(color, isLight, isThemeLight)
|
|
|
5007
5019
|
},
|
|
5008
5020
|
_focusVisible: {
|
|
5009
5021
|
outline: 'none',
|
|
5010
|
-
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " +
|
|
5011
|
-
},
|
|
5012
|
-
transition: 'opacity 0.2s ease'
|
|
5013
|
-
},
|
|
5014
|
-
borderMoving: {
|
|
5015
|
-
position: 'relative',
|
|
5016
|
-
backgroundColor: 'black',
|
|
5017
|
-
color: textColor,
|
|
5018
|
-
overflow: 'hidden',
|
|
5019
|
-
borderWidth: 0,
|
|
5020
|
-
borderStyle: 'none',
|
|
5021
|
-
borderColor: 'transparent',
|
|
5022
|
-
_hover: {
|
|
5023
|
-
color: textColor
|
|
5024
|
-
},
|
|
5025
|
-
_active: {
|
|
5026
|
-
color: textColor
|
|
5027
|
-
},
|
|
5028
|
-
_focusVisible: {
|
|
5029
|
-
outline: 'none',
|
|
5030
|
-
boxShadow: '0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(0, 0, 0, 0.8)'
|
|
5031
|
-
},
|
|
5032
|
-
transition: 'opacity 0.2s ease'
|
|
5033
|
-
},
|
|
5034
|
-
animatedStroke: {
|
|
5035
|
-
display: 'inline-block',
|
|
5036
|
-
margin: '0 auto',
|
|
5037
|
-
textAlign: 'center',
|
|
5038
|
-
textDecoration: 'none',
|
|
5039
|
-
position: 'relative',
|
|
5040
|
-
cursor: 'pointer',
|
|
5041
|
-
backgroundColor: 'transparent',
|
|
5042
|
-
color: color,
|
|
5043
|
-
borderWidth: 0,
|
|
5044
|
-
borderStyle: 'none',
|
|
5045
|
-
borderColor: 'transparent',
|
|
5046
|
-
_hover: {
|
|
5047
|
-
color: color
|
|
5048
|
-
},
|
|
5049
|
-
_active: {
|
|
5050
|
-
color: color
|
|
5051
|
-
},
|
|
5052
|
-
_focusVisible: {
|
|
5053
|
-
outline: 'none',
|
|
5054
|
-
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " + color
|
|
5022
|
+
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " + effectiveBorder
|
|
5055
5023
|
},
|
|
5056
5024
|
transition: 'opacity 0.2s ease'
|
|
5057
5025
|
},
|
|
5058
5026
|
subtle: {
|
|
5059
|
-
backgroundColor:
|
|
5060
|
-
color:
|
|
5027
|
+
backgroundColor: reversed ? "color-mix(in srgb, " + effectiveBorder + " 20%, transparent)" : "color-mix(in srgb, " + effectiveBorder + " 5%, transparent)",
|
|
5028
|
+
color: effectiveBorder,
|
|
5061
5029
|
borderWidth: 1,
|
|
5062
5030
|
borderStyle: 'solid',
|
|
5063
|
-
borderColor:
|
|
5064
|
-
paddingHorizontal: 12,
|
|
5065
|
-
paddingVertical: 6,
|
|
5066
|
-
borderRadius: 6,
|
|
5067
|
-
fontWeight: 500,
|
|
5031
|
+
borderColor: effectiveBorder,
|
|
5068
5032
|
_hover: {
|
|
5069
|
-
backgroundColor:
|
|
5033
|
+
backgroundColor: reversed ? "color-mix(in srgb, " + effectiveBorder + " 40%, transparent)" : "color-mix(in srgb, " + effectiveBorder + " 15%, transparent)"
|
|
5070
5034
|
},
|
|
5071
5035
|
_active: {
|
|
5072
|
-
backgroundColor: 'rgba(0, 0, 0, 0.
|
|
5036
|
+
backgroundColor: reversed ? 'rgba(255, 255, 255, 0.3)' : 'rgba(0, 0, 0, 0.15)'
|
|
5073
5037
|
},
|
|
5074
5038
|
_focusVisible: {
|
|
5075
5039
|
outline: 'none',
|
|
5076
|
-
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " +
|
|
5040
|
+
boxShadow: "0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px " + effectiveBorder
|
|
5077
5041
|
},
|
|
5078
5042
|
transition: 'all 0.2s ease'
|
|
5079
5043
|
}
|
|
5080
5044
|
};
|
|
5081
5045
|
};
|
|
5082
5046
|
|
|
5083
|
-
var _excluded$d = ["
|
|
5084
|
-
_excluded2$3 = ["
|
|
5085
|
-
_excluded3$3 = ["variant", "to", "isDisabled", "isLoading", "isAuto", "isFilled", "isExternal", "shape", "shadow", "onClick", "views", "baseStyles", "sizeStyles", "iconPad", "resolvedTextColor", "content", "size"],
|
|
5086
|
-
_excluded4$3 = ["variant", "size", "shape", "iconPosition", "loaderPosition", "backgroundColor", "color", "isAuto", "isFilled", "isDisabled", "isLoading", "isIconRounded", "icon", "children", "to", "isExternal", "shadow", "onClick", "views", "
|
|
5047
|
+
var _excluded$d = ["asComponent", "isDisabled", "isLoading", "isWrapped", "borderRadius", "width", "height", "baseStyles", "sizeStyles", "iconPad", "mainTone", "resolvedTextColor", "children", "borderWidth"],
|
|
5048
|
+
_excluded2$3 = ["shape", "isDisabled", "onClick", "shadow", "borderWidth", "isAuto", "isFilled", "views", "children"],
|
|
5049
|
+
_excluded3$3 = ["variant", "animation", "to", "isDisabled", "isLoading", "isAuto", "isFilled", "isExternal", "shape", "shadow", "onClick", "views", "baseStyles", "sizeStyles", "iconPad", "resolvedTextColor", "content", "size", "mainTone", "tone", "borderMovingDuration", "borderMovingGradientColors", "animatedStrokeAccentColor", "animatedStrokeTextColor", "getColor"],
|
|
5050
|
+
_excluded4$3 = ["variant", "size", "shape", "iconPosition", "loaderPosition", "backgroundColor", "color", "scheme", "reversed", "isAuto", "isFilled", "isDisabled", "isLoading", "isIconRounded", "icon", "children", "to", "isExternal", "shadow", "onClick", "views", "borderMovingDuration", "borderMovingGradientColors", "animatedStrokeAccentColor", "animatedStrokeTextColor"];
|
|
5087
5051
|
// --- Helper: Button Content ---
|
|
5088
5052
|
// Renders the inner content: Loader, Icon, and Children.
|
|
5089
5053
|
var ButtonContent = _ref => {
|
|
@@ -5107,176 +5071,95 @@ var ButtonContent = _ref => {
|
|
|
5107
5071
|
justifyContent: "center"
|
|
5108
5072
|
}, sizeStyles, iconPad, views == null ? void 0 : views.content), isLoading && loaderPosition === 'left' && (/*#__PURE__*/React__default.createElement(Loader, Object.assign({
|
|
5109
5073
|
size: size === 'xs' || size === 'sm' ? 'sm' : 'md',
|
|
5110
|
-
color:
|
|
5074
|
+
color: resolvedTextColor
|
|
5111
5075
|
}, views == null ? void 0 : views.loader))), icon && ['left', 'top'].includes(iconPosition) && !isLoading && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
5112
|
-
color:
|
|
5076
|
+
color: resolvedTextColor
|
|
5113
5077
|
}, views == null ? void 0 : views.icon), icon)), children, icon && ['right', 'bottom'].includes(iconPosition) && !isLoading && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
5114
|
-
color:
|
|
5078
|
+
color: resolvedTextColor
|
|
5115
5079
|
}, views == null ? void 0 : views.icon), icon)), isLoading && loaderPosition === 'right' && (/*#__PURE__*/React__default.createElement(Loader, Object.assign({
|
|
5116
5080
|
size: size === 'xs' || size === 'sm' ? 'sm' : 'md',
|
|
5117
|
-
color:
|
|
5081
|
+
color: resolvedTextColor
|
|
5118
5082
|
}, views == null ? void 0 : views.loader))));
|
|
5119
5083
|
};
|
|
5120
|
-
// ---
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5084
|
+
// --- Animation Logic moved to StandardButton ---
|
|
5085
|
+
// --- Variant: Standard Button ---
|
|
5086
|
+
// --- Helpers ---
|
|
5087
|
+
// Helper to calculate numeric border radius
|
|
5088
|
+
var getNumericBorderRadius = shape => {
|
|
5089
|
+
var shapeValue = ButtonShapes[shape];
|
|
5090
|
+
if (typeof shapeValue === 'number') return shapeValue;
|
|
5091
|
+
if (typeof shapeValue === 'string') return parseInt(shapeValue, 10) || 0;
|
|
5092
|
+
return 0;
|
|
5093
|
+
};
|
|
5094
|
+
// Common Inner Button Surface
|
|
5095
|
+
var InnerButton = _ref2 => {
|
|
5096
|
+
var {
|
|
5097
|
+
asComponent,
|
|
5125
5098
|
isDisabled,
|
|
5126
|
-
|
|
5127
|
-
|
|
5099
|
+
isLoading,
|
|
5100
|
+
isWrapped = false,
|
|
5101
|
+
borderRadius,
|
|
5102
|
+
width,
|
|
5103
|
+
height,
|
|
5104
|
+
baseStyles,
|
|
5105
|
+
sizeStyles,
|
|
5106
|
+
iconPad,
|
|
5128
5107
|
mainTone,
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
content,
|
|
5133
|
-
shadow
|
|
5108
|
+
resolvedTextColor,
|
|
5109
|
+
children,
|
|
5110
|
+
borderWidth = 0
|
|
5134
5111
|
} = _ref2,
|
|
5135
5112
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$d);
|
|
5136
|
-
var sizeStyles = ButtonSizes[size];
|
|
5137
|
-
var borderWidth = 3;
|
|
5138
|
-
var numericWidth = typeof sizeStyles.width === 'number' ? sizeStyles.width : 300;
|
|
5139
|
-
var numericHeight = typeof sizeStyles.height === 'number' ? sizeStyles.height : 64;
|
|
5140
|
-
var numericBorderRadius = (() => {
|
|
5141
|
-
var shapeValue = ButtonShapes[shape];
|
|
5142
|
-
if (typeof shapeValue === 'number') {
|
|
5143
|
-
return shapeValue;
|
|
5144
|
-
}
|
|
5145
|
-
if (typeof shapeValue === 'string') {
|
|
5146
|
-
return parseInt(shapeValue, 10) || 50;
|
|
5147
|
-
}
|
|
5148
|
-
return 50;
|
|
5149
|
-
})();
|
|
5150
|
-
var containerBg = mainTone;
|
|
5151
|
-
// Use high contrast text color for this variant
|
|
5152
|
-
var borderMovingTextColor = tone === 'light' ? '#000000' : '#FFFFFF';
|
|
5153
|
-
// Create gradient string for border animation
|
|
5154
|
-
var gradientColors = borderMovingGradientColors.join(', ');
|
|
5155
|
-
// Animation sequence for the moving border effect
|
|
5156
|
-
var borderAnimation = {
|
|
5157
|
-
from: {
|
|
5158
|
-
backgroundPosition: '0% 50%'
|
|
5159
|
-
},
|
|
5160
|
-
to: {
|
|
5161
|
-
backgroundPosition: '200% 50%'
|
|
5162
|
-
},
|
|
5163
|
-
duration: borderMovingDuration + "s",
|
|
5164
|
-
timingFunction: 'linear',
|
|
5165
|
-
iterationCount: 'infinite'
|
|
5166
|
-
};
|
|
5167
5113
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
5168
|
-
|
|
5169
|
-
|
|
5114
|
+
as: asComponent,
|
|
5115
|
+
disabled: Boolean(isDisabled || isLoading),
|
|
5116
|
+
display: isWrapped ? 'flex' : 'inline-flex',
|
|
5170
5117
|
alignItems: "center",
|
|
5171
5118
|
justifyContent: "center",
|
|
5172
|
-
borderRadius:
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
alignItems: "center",
|
|
5183
|
-
justifyContent: "center",
|
|
5184
|
-
backgroundColor: containerBg,
|
|
5185
|
-
borderRadius: Math.max(0, numericBorderRadius - borderWidth),
|
|
5186
|
-
width: "100%",
|
|
5187
|
-
height: "100%",
|
|
5188
|
-
minWidth: numericWidth - borderWidth * 2,
|
|
5189
|
-
minHeight: numericHeight - borderWidth * 2,
|
|
5190
|
-
color: borderMovingTextColor,
|
|
5191
|
-
fontSize: 14,
|
|
5192
|
-
cursor: "pointer"
|
|
5193
|
-
}, content));
|
|
5119
|
+
borderRadius: borderRadius,
|
|
5120
|
+
width: width,
|
|
5121
|
+
height: height
|
|
5122
|
+
}, baseStyles, sizeStyles, iconPad, {
|
|
5123
|
+
// Ensure background is solid for wrapped buttons if baseStyles doesn't provide it
|
|
5124
|
+
backgroundColor: (baseStyles == null ? void 0 : baseStyles.backgroundColor) || (isWrapped ? mainTone : undefined),
|
|
5125
|
+
color: resolvedTextColor,
|
|
5126
|
+
borderWidth: isWrapped ? 0 : undefined,
|
|
5127
|
+
cursor: isDisabled ? 'default' : 'pointer'
|
|
5128
|
+
}, props), children);
|
|
5194
5129
|
};
|
|
5195
|
-
//
|
|
5196
|
-
var
|
|
5130
|
+
// Common Header for Border Animations
|
|
5131
|
+
var BorderWrapper = _ref3 => {
|
|
5197
5132
|
var {
|
|
5198
|
-
|
|
5133
|
+
shape,
|
|
5134
|
+
isDisabled,
|
|
5199
5135
|
onClick,
|
|
5136
|
+
shadow,
|
|
5137
|
+
borderWidth,
|
|
5138
|
+
isAuto,
|
|
5139
|
+
isFilled,
|
|
5200
5140
|
views,
|
|
5201
|
-
children
|
|
5202
|
-
size = 'md',
|
|
5203
|
-
accentColor,
|
|
5204
|
-
textColor,
|
|
5205
|
-
getColor,
|
|
5206
|
-
shadow
|
|
5141
|
+
children
|
|
5207
5142
|
} = _ref3,
|
|
5208
5143
|
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$3);
|
|
5209
|
-
var resolvedAccentColor = getColor(accentColor);
|
|
5210
|
-
var resolvedTextColor = getColor(textColor);
|
|
5211
|
-
var sizeStyles = ButtonSizes[size];
|
|
5212
|
-
var numericWidth = typeof sizeStyles.width === 'number' ? sizeStyles.width : 300;
|
|
5213
|
-
var numericHeight = typeof sizeStyles.height === 'number' ? sizeStyles.height : 60;
|
|
5214
|
-
var strokeAnimation = {
|
|
5215
|
-
from: {
|
|
5216
|
-
strokeWidth: '8px',
|
|
5217
|
-
strokeDasharray: '0 500',
|
|
5218
|
-
strokeDashoffset: -454
|
|
5219
|
-
},
|
|
5220
|
-
to: {
|
|
5221
|
-
strokeWidth: '3px',
|
|
5222
|
-
strokeDasharray: '760',
|
|
5223
|
-
strokeDashoffset: 0
|
|
5224
|
-
},
|
|
5225
|
-
duration: '0.9s',
|
|
5226
|
-
timingFunction: 'ease-in',
|
|
5227
|
-
fillMode: 'forwards'
|
|
5228
|
-
};
|
|
5229
5144
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
5230
|
-
as:
|
|
5231
|
-
href: to ? to : undefined,
|
|
5232
|
-
onClick: onClick,
|
|
5233
|
-
display: "inline-block",
|
|
5234
|
-
maxWidth: "20rem",
|
|
5235
|
-
margin: "0 auto",
|
|
5236
|
-
textAlign: "center",
|
|
5237
|
-
textDecoration: "none",
|
|
5145
|
+
as: "div",
|
|
5238
5146
|
position: "relative",
|
|
5239
|
-
|
|
5240
|
-
boxShadow: shadow
|
|
5241
|
-
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
5242
|
-
as: "svg",
|
|
5243
|
-
display: "block",
|
|
5244
|
-
height: numericHeight,
|
|
5245
|
-
width: numericWidth,
|
|
5246
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
5247
|
-
}, /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
5248
|
-
as: "rect",
|
|
5249
|
-
height: numericHeight,
|
|
5250
|
-
width: numericWidth,
|
|
5251
|
-
fill: "transparent",
|
|
5252
|
-
stroke: resolvedAccentColor,
|
|
5253
|
-
strokeWidth: "8px",
|
|
5254
|
-
strokeDasharray: "0 500",
|
|
5255
|
-
strokeDashoffset: -454,
|
|
5256
|
-
on: {
|
|
5257
|
-
hover: {
|
|
5258
|
-
animate: strokeAnimation
|
|
5259
|
-
}
|
|
5260
|
-
}
|
|
5261
|
-
})), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
5262
|
-
position: "absolute",
|
|
5263
|
-
top: 0,
|
|
5264
|
-
right: 0,
|
|
5265
|
-
bottom: 0,
|
|
5266
|
-
left: 0,
|
|
5267
|
-
display: "flex",
|
|
5147
|
+
display: "inline-flex",
|
|
5268
5148
|
alignItems: "center",
|
|
5269
5149
|
justifyContent: "center",
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5150
|
+
borderRadius: ButtonShapes[shape],
|
|
5151
|
+
cursor: isDisabled ? 'default' : 'pointer',
|
|
5152
|
+
onClick: onClick,
|
|
5153
|
+
boxShadow: shadow,
|
|
5154
|
+
padding: borderWidth,
|
|
5155
|
+
width: isAuto ? 'fit-content' : isFilled ? '100%' : undefined
|
|
5156
|
+
}, views == null ? void 0 : views.container, props), children);
|
|
5275
5157
|
};
|
|
5276
5158
|
// --- Variant: Standard Button ---
|
|
5277
5159
|
var StandardButton = _ref4 => {
|
|
5278
5160
|
var {
|
|
5279
5161
|
variant,
|
|
5162
|
+
animation,
|
|
5280
5163
|
to,
|
|
5281
5164
|
isDisabled,
|
|
5282
5165
|
isLoading,
|
|
@@ -5290,9 +5173,220 @@ var StandardButton = _ref4 => {
|
|
|
5290
5173
|
baseStyles,
|
|
5291
5174
|
sizeStyles,
|
|
5292
5175
|
iconPad,
|
|
5293
|
-
|
|
5176
|
+
resolvedTextColor,
|
|
5177
|
+
content,
|
|
5178
|
+
mainTone,
|
|
5179
|
+
borderMovingDuration = 2,
|
|
5180
|
+
borderMovingGradientColors = ['#705CFF', '#FF5C97', '#FFC75C'],
|
|
5181
|
+
animatedStrokeAccentColor = '#705CFF',
|
|
5182
|
+
animatedStrokeTextColor = '#333333',
|
|
5183
|
+
getColor = c => c
|
|
5294
5184
|
} = _ref4,
|
|
5295
5185
|
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$3);
|
|
5186
|
+
// --- Common Helpers ---
|
|
5187
|
+
var numericBorderRadius = getNumericBorderRadius(shape);
|
|
5188
|
+
var linkOrContent = to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
5189
|
+
to: to,
|
|
5190
|
+
isExternal: isExternal,
|
|
5191
|
+
color: "currentColor",
|
|
5192
|
+
textDecoration: "inherit",
|
|
5193
|
+
_hover: {
|
|
5194
|
+
color: 'currentColor'
|
|
5195
|
+
}
|
|
5196
|
+
}, views == null ? void 0 : views.link), content)) : content;
|
|
5197
|
+
var innerProps = {
|
|
5198
|
+
isDisabled,
|
|
5199
|
+
isLoading,
|
|
5200
|
+
baseStyles,
|
|
5201
|
+
sizeStyles,
|
|
5202
|
+
iconPad,
|
|
5203
|
+
resolvedTextColor,
|
|
5204
|
+
mainTone,
|
|
5205
|
+
children: linkOrContent
|
|
5206
|
+
};
|
|
5207
|
+
// --- Animation: Border Moving ---
|
|
5208
|
+
if (animation === 'borderMoving' && borderMovingGradientColors) {
|
|
5209
|
+
var borderWidth = 3;
|
|
5210
|
+
var borderAnimation = {
|
|
5211
|
+
from: {
|
|
5212
|
+
backgroundPosition: '0% 50%'
|
|
5213
|
+
},
|
|
5214
|
+
to: {
|
|
5215
|
+
backgroundPosition: '200% 50%'
|
|
5216
|
+
},
|
|
5217
|
+
duration: borderMovingDuration + "s",
|
|
5218
|
+
timingFunction: 'linear',
|
|
5219
|
+
iterationCount: 'infinite'
|
|
5220
|
+
};
|
|
5221
|
+
return /*#__PURE__*/React__default.createElement(BorderWrapper, Object.assign({
|
|
5222
|
+
shape: shape,
|
|
5223
|
+
isDisabled: isDisabled,
|
|
5224
|
+
onClick: onClick,
|
|
5225
|
+
shadow: shadow,
|
|
5226
|
+
borderWidth: borderWidth,
|
|
5227
|
+
isAuto: isAuto,
|
|
5228
|
+
isFilled: isFilled,
|
|
5229
|
+
views: views,
|
|
5230
|
+
background: "linear-gradient(90deg, " + borderMovingGradientColors[0] + ", " + borderMovingGradientColors[1] + ", " + borderMovingGradientColors[2] + ", " + borderMovingGradientColors[0] + ")",
|
|
5231
|
+
backgroundSize: "200% 100%",
|
|
5232
|
+
animate: borderAnimation
|
|
5233
|
+
}, props), /*#__PURE__*/React__default.createElement(InnerButton, Object.assign({
|
|
5234
|
+
asComponent: to ? 'div' : 'button',
|
|
5235
|
+
isWrapped: true,
|
|
5236
|
+
borderRadius: Math.max(0, numericBorderRadius - borderWidth),
|
|
5237
|
+
width: "100%",
|
|
5238
|
+
height: "100%"
|
|
5239
|
+
}, innerProps)));
|
|
5240
|
+
}
|
|
5241
|
+
// --- Animation: Animated Stroke ---
|
|
5242
|
+
if (animation === 'animatedStroke') {
|
|
5243
|
+
var _views$container;
|
|
5244
|
+
var resolvedAccentColor = getColor(animatedStrokeAccentColor);
|
|
5245
|
+
var resolvedStrokeTextColor = getColor(animatedStrokeTextColor);
|
|
5246
|
+
var strokePathLength = 1000;
|
|
5247
|
+
var strokeAnimation = {
|
|
5248
|
+
from: {
|
|
5249
|
+
strokeWidth: '8px',
|
|
5250
|
+
strokeDasharray: "0 " + strokePathLength,
|
|
5251
|
+
strokeDashoffset: -Math.round(strokePathLength * 0.63)
|
|
5252
|
+
},
|
|
5253
|
+
to: {
|
|
5254
|
+
strokeWidth: '3px',
|
|
5255
|
+
strokeDasharray: "" + strokePathLength,
|
|
5256
|
+
strokeDashoffset: 0
|
|
5257
|
+
},
|
|
5258
|
+
duration: '0.9s',
|
|
5259
|
+
timingFunction: 'ease-in',
|
|
5260
|
+
fillMode: 'forwards'
|
|
5261
|
+
};
|
|
5262
|
+
var mergedClassName = ['group', views == null || (_views$container = views.container) == null ? void 0 : _views$container.className, props == null ? void 0 : props.className].filter(Boolean).join(' ');
|
|
5263
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
5264
|
+
as: to ? 'div' : 'button',
|
|
5265
|
+
type: to ? undefined : 'button',
|
|
5266
|
+
disabled: Boolean(!to && (isDisabled || isLoading)),
|
|
5267
|
+
onClick: onClick,
|
|
5268
|
+
position: "relative",
|
|
5269
|
+
display: "inline-flex",
|
|
5270
|
+
alignItems: "center",
|
|
5271
|
+
justifyContent: "center",
|
|
5272
|
+
width: isAuto ? 'fit-content' : isFilled ? '100%' : undefined,
|
|
5273
|
+
borderRadius: ButtonShapes[shape],
|
|
5274
|
+
boxShadow: shadow,
|
|
5275
|
+
transition: "all 0.2s ease",
|
|
5276
|
+
cursor: isDisabled ? 'default' : 'pointer',
|
|
5277
|
+
color: resolvedStrokeTextColor,
|
|
5278
|
+
backgroundColor: "transparent",
|
|
5279
|
+
borderWidth: 0
|
|
5280
|
+
}, views == null ? void 0 : views.container, props, {
|
|
5281
|
+
className: mergedClassName
|
|
5282
|
+
}), /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
5283
|
+
as: "svg",
|
|
5284
|
+
position: "absolute",
|
|
5285
|
+
top: 0,
|
|
5286
|
+
right: 0,
|
|
5287
|
+
bottom: 0,
|
|
5288
|
+
left: 0,
|
|
5289
|
+
width: "100%",
|
|
5290
|
+
height: "100%",
|
|
5291
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5292
|
+
pointerEvents: "none",
|
|
5293
|
+
zIndex: 1,
|
|
5294
|
+
"aria-hidden": "true"
|
|
5295
|
+
}, /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
5296
|
+
as: "rect",
|
|
5297
|
+
x: "0",
|
|
5298
|
+
y: "0",
|
|
5299
|
+
height: "100%",
|
|
5300
|
+
width: "100%",
|
|
5301
|
+
rx: numericBorderRadius,
|
|
5302
|
+
ry: numericBorderRadius,
|
|
5303
|
+
fill: "transparent",
|
|
5304
|
+
stroke: resolvedAccentColor,
|
|
5305
|
+
strokeWidth: "8px",
|
|
5306
|
+
strokeDasharray: "0 " + strokePathLength,
|
|
5307
|
+
strokeDashoffset: -Math.round(strokePathLength * 0.63),
|
|
5308
|
+
pathLength: strokePathLength,
|
|
5309
|
+
on: {
|
|
5310
|
+
groupHover: {
|
|
5311
|
+
animate: strokeAnimation
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
})), /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
5315
|
+
position: "relative",
|
|
5316
|
+
zIndex: 0
|
|
5317
|
+
}, linkOrContent));
|
|
5318
|
+
}
|
|
5319
|
+
// --- Animation: Border Reveal ---
|
|
5320
|
+
if (animation === 'borderReveal') {
|
|
5321
|
+
var _borderWidth = 3;
|
|
5322
|
+
// Use the first color from gradient colors or fall back to mainTone
|
|
5323
|
+
var activeColor = (borderMovingGradientColors == null ? void 0 : borderMovingGradientColors[0]) || mainTone || '#000000';
|
|
5324
|
+
// Sides duration
|
|
5325
|
+
// The default duration (2s) is too slow for a hover interaction.
|
|
5326
|
+
// We scale it by 0.25 to make it responsive (0.5s total).
|
|
5327
|
+
var effectiveDuration = borderMovingDuration * 0.75;
|
|
5328
|
+
var sideDuration = effectiveDuration / 4;
|
|
5329
|
+
// Gradients for each side (color 50%, transparent 50%)
|
|
5330
|
+
var topGrad = "linear-gradient(90deg, " + activeColor + " 50%, transparent 50%)";
|
|
5331
|
+
var rightGrad = "linear-gradient(180deg, " + activeColor + " 50%, transparent 50%)";
|
|
5332
|
+
var bottomGrad = "linear-gradient(270deg, " + activeColor + " 50%, transparent 50%)";
|
|
5333
|
+
var leftGrad = "linear-gradient(0deg, " + activeColor + " 50%, transparent 50%)";
|
|
5334
|
+
// Coordinates:
|
|
5335
|
+
// Top (L->R): 100% 0 -> 0 0
|
|
5336
|
+
// Right (T->B): 100% 100% -> 100% 0
|
|
5337
|
+
// Bottom (R->L): 0 100% -> 100% 100%
|
|
5338
|
+
// Left (B->T): 0 0 -> 0 100%
|
|
5339
|
+
var bgPosStart = "100% 0, 100% 100%, 0 100%, 0 0";
|
|
5340
|
+
var bgPosEnd = "0 0, 100% 0, 100% 100%, 0 100%";
|
|
5341
|
+
// Delays:
|
|
5342
|
+
// Enter (Forward): Top(0), Right(1), Bottom(2), Left(3)
|
|
5343
|
+
var delayEnter = "0s, " + sideDuration + "s, " + sideDuration * 2 + "s, " + sideDuration * 2 + "s";
|
|
5344
|
+
// Exit (Reverse): Top(3), Right(2), Bottom(1), Left(0)
|
|
5345
|
+
var delayExit = sideDuration * 2 + "s, " + sideDuration * 2 + "s, " + sideDuration + "s, 0s";
|
|
5346
|
+
// Use slightly larger gradient size to overlap with button content (avoid gaps)
|
|
5347
|
+
var gradientSize = _borderWidth + 1;
|
|
5348
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
5349
|
+
as: "div",
|
|
5350
|
+
position: "relative",
|
|
5351
|
+
display: "inline-flex",
|
|
5352
|
+
alignItems: "center",
|
|
5353
|
+
justifyContent: "center",
|
|
5354
|
+
borderRadius: ButtonShapes[shape],
|
|
5355
|
+
cursor: isDisabled ? 'default' : 'pointer',
|
|
5356
|
+
onClick: onClick,
|
|
5357
|
+
boxShadow: shadow,
|
|
5358
|
+
padding: _borderWidth,
|
|
5359
|
+
background: "\n " + topGrad + " no-repeat,\n " + rightGrad + " no-repeat,\n " + bottomGrad + " no-repeat,\n " + leftGrad + " no-repeat\n ",
|
|
5360
|
+
backgroundSize: "200% " + gradientSize + "px, " + gradientSize + "px 200%, 200% " + gradientSize + "px, " + gradientSize + "px 200%",
|
|
5361
|
+
// Default State (Hidden)
|
|
5362
|
+
backgroundPosition: bgPosStart,
|
|
5363
|
+
transitionProperty: "background-position",
|
|
5364
|
+
transitionDuration: sideDuration + "s",
|
|
5365
|
+
transitionTimingFunction: "linear",
|
|
5366
|
+
transitionDelay: delayExit,
|
|
5367
|
+
// Hover State (Visible)
|
|
5368
|
+
_hover: {
|
|
5369
|
+
backgroundPosition: bgPosEnd,
|
|
5370
|
+
transitionDelay: delayEnter
|
|
5371
|
+
},
|
|
5372
|
+
width: isAuto ? 'fit-content' : isFilled ? '100%' : undefined
|
|
5373
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
5374
|
+
as: to ? 'div' : 'button',
|
|
5375
|
+
disabled: Boolean(isDisabled || isLoading),
|
|
5376
|
+
display: "flex",
|
|
5377
|
+
alignItems: "center",
|
|
5378
|
+
justifyContent: "center",
|
|
5379
|
+
borderRadius: Math.max(0, numericBorderRadius - _borderWidth),
|
|
5380
|
+
width: "100%",
|
|
5381
|
+
height: "100%"
|
|
5382
|
+
}, baseStyles, sizeStyles, iconPad, {
|
|
5383
|
+
backgroundColor: (baseStyles == null ? void 0 : baseStyles.backgroundColor) || mainTone,
|
|
5384
|
+
color: resolvedTextColor,
|
|
5385
|
+
borderWidth: 0,
|
|
5386
|
+
cursor: isDisabled ? 'default' : 'pointer'
|
|
5387
|
+
}), linkOrContent));
|
|
5388
|
+
}
|
|
5389
|
+
// --- Default: Standard Button ---
|
|
5296
5390
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
5297
5391
|
as: variant === 'link' && to ? 'div' : 'button',
|
|
5298
5392
|
type: variant === 'link' && to ? undefined : 'button',
|
|
@@ -5308,19 +5402,12 @@ var StandardButton = _ref4 => {
|
|
|
5308
5402
|
transition: "all 0.2s ease",
|
|
5309
5403
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
5310
5404
|
onClick: onClick
|
|
5311
|
-
}, baseStyles, views == null ? void 0 : views.container, props),
|
|
5312
|
-
to: to,
|
|
5313
|
-
isExternal: isExternal,
|
|
5314
|
-
color: "currentColor",
|
|
5315
|
-
textDecoration: "inherit",
|
|
5316
|
-
_hover: {
|
|
5317
|
-
color: 'currentColor'
|
|
5318
|
-
}
|
|
5319
|
-
}, views == null ? void 0 : views.link), content)) : content);
|
|
5405
|
+
}, baseStyles, views == null ? void 0 : views.container, props), linkOrContent);
|
|
5320
5406
|
};
|
|
5321
5407
|
// --- Main Component ---
|
|
5408
|
+
// --- Main Component ---
|
|
5322
5409
|
var ButtonView = _ref5 => {
|
|
5323
|
-
var _ref6, _base$color;
|
|
5410
|
+
var _ref6, _ref7, _base$color;
|
|
5324
5411
|
var {
|
|
5325
5412
|
/* behaviour */
|
|
5326
5413
|
variant = 'filled',
|
|
@@ -5332,6 +5419,10 @@ var ButtonView = _ref5 => {
|
|
|
5332
5419
|
// primary candidate for main color
|
|
5333
5420
|
color,
|
|
5334
5421
|
// 2nd candidate for main color (NOT text‑color)
|
|
5422
|
+
scheme,
|
|
5423
|
+
// New scheme prop
|
|
5424
|
+
reversed = false,
|
|
5425
|
+
// New reversed prop
|
|
5335
5426
|
isAuto = true,
|
|
5336
5427
|
isFilled,
|
|
5337
5428
|
isDisabled,
|
|
@@ -5347,7 +5438,6 @@ var ButtonView = _ref5 => {
|
|
|
5347
5438
|
shadow,
|
|
5348
5439
|
onClick,
|
|
5349
5440
|
views = {},
|
|
5350
|
-
themeMode: elementMode,
|
|
5351
5441
|
/* effect props */
|
|
5352
5442
|
borderMovingDuration = 2,
|
|
5353
5443
|
borderMovingGradientColors = ['#705CFF', '#FF5C97', '#FFC75C'],
|
|
@@ -5357,20 +5447,22 @@ var ButtonView = _ref5 => {
|
|
|
5357
5447
|
props = _objectWithoutPropertiesLoose(_ref5, _excluded4$3);
|
|
5358
5448
|
/* theme helpers */
|
|
5359
5449
|
var {
|
|
5360
|
-
|
|
5450
|
+
getColorHex,
|
|
5361
5451
|
themeMode
|
|
5362
5452
|
} = appStudio.useTheme();
|
|
5363
|
-
var mode = elementMode != null ? elementMode : themeMode;
|
|
5364
5453
|
/* MAIN COLOR – determines the entire palette */
|
|
5365
|
-
var mainColorKey = (_ref6 = backgroundColor != null ? backgroundColor : color) != null ? _ref6 : 'theme.primary';
|
|
5366
|
-
var mainTone =
|
|
5367
|
-
themeMode: mode
|
|
5368
|
-
});
|
|
5454
|
+
var mainColorKey = (_ref6 = (_ref7 = backgroundColor != null ? backgroundColor : color) != null ? _ref7 : scheme) != null ? _ref6 : 'theme.primary';
|
|
5455
|
+
var mainTone = getColorHex(isDisabled ? 'theme.disabled' : mainColorKey);
|
|
5369
5456
|
var tone = contrast(mainTone);
|
|
5370
5457
|
/* text color with mixBlendMode for maximum visibility */
|
|
5371
|
-
var textColor
|
|
5458
|
+
var textColor;
|
|
5459
|
+
if (tone === 'light') {
|
|
5460
|
+
textColor = '#000000';
|
|
5461
|
+
} else {
|
|
5462
|
+
textColor = '#FFFFFF';
|
|
5463
|
+
}
|
|
5372
5464
|
/* variant palette */
|
|
5373
|
-
var palette = React.useMemo(() => getButtonVariants(mainTone, tone === 'light'), [mainTone, tone,
|
|
5465
|
+
var palette = React.useMemo(() => getButtonVariants(mainTone, tone === 'light', reversed), [mainTone, tone, reversed]);
|
|
5374
5466
|
var base = palette[variant];
|
|
5375
5467
|
var resolvedTextColor = (_base$color = base == null ? void 0 : base.color) != null ? _base$color : textColor;
|
|
5376
5468
|
// Render content logic safely
|
|
@@ -5384,39 +5476,12 @@ var ButtonView = _ref5 => {
|
|
|
5384
5476
|
isIconRounded: isIconRounded,
|
|
5385
5477
|
views: views
|
|
5386
5478
|
}, children);
|
|
5387
|
-
// Dispatch to the correct variant component
|
|
5388
|
-
if (variant === 'borderMoving') {
|
|
5389
|
-
return /*#__PURE__*/React__default.createElement(BorderMovingButton, Object.assign({
|
|
5390
|
-
variant: variant,
|
|
5391
|
-
shape: shape,
|
|
5392
|
-
size: size,
|
|
5393
|
-
isDisabled: isDisabled,
|
|
5394
|
-
onClick: onClick,
|
|
5395
|
-
views: views,
|
|
5396
|
-
mainTone: mainTone,
|
|
5397
|
-
tone: tone,
|
|
5398
|
-
borderMovingGradientColors: borderMovingGradientColors,
|
|
5399
|
-
borderMovingDuration: borderMovingDuration,
|
|
5400
|
-
content: content
|
|
5401
|
-
}, props));
|
|
5402
|
-
}
|
|
5403
|
-
if (variant === 'animatedStroke') {
|
|
5404
|
-
return /*#__PURE__*/React__default.createElement(AnimatedStrokeButton, Object.assign({
|
|
5405
|
-
variant: variant,
|
|
5406
|
-
to: to,
|
|
5407
|
-
onClick: onClick,
|
|
5408
|
-
views: views,
|
|
5409
|
-
size: size,
|
|
5410
|
-
accentColor: animatedStrokeAccentColor,
|
|
5411
|
-
textColor: animatedStrokeTextColor,
|
|
5412
|
-
getColor: getColor
|
|
5413
|
-
}, props), children);
|
|
5414
|
-
}
|
|
5415
5479
|
// Standard variants (filled, outline, ghost, link)
|
|
5416
5480
|
var sizeStyles = ButtonSizes[size];
|
|
5417
5481
|
var iconPad = isIconRounded ? IconSizes$1[size] : {};
|
|
5418
5482
|
return /*#__PURE__*/React__default.createElement(StandardButton, Object.assign({
|
|
5419
5483
|
variant: variant,
|
|
5484
|
+
animation: props.animation,
|
|
5420
5485
|
to: to,
|
|
5421
5486
|
isDisabled: isDisabled,
|
|
5422
5487
|
isLoading: isLoading,
|
|
@@ -5432,7 +5497,14 @@ var ButtonView = _ref5 => {
|
|
|
5432
5497
|
iconPad: iconPad,
|
|
5433
5498
|
resolvedTextColor: resolvedTextColor,
|
|
5434
5499
|
content: content,
|
|
5435
|
-
size: size
|
|
5500
|
+
size: size,
|
|
5501
|
+
mainTone: mainTone,
|
|
5502
|
+
tone: tone,
|
|
5503
|
+
borderMovingDuration: borderMovingDuration,
|
|
5504
|
+
borderMovingGradientColors: borderMovingGradientColors,
|
|
5505
|
+
animatedStrokeAccentColor: animatedStrokeAccentColor,
|
|
5506
|
+
animatedStrokeTextColor: animatedStrokeTextColor,
|
|
5507
|
+
getColor: getColorHex
|
|
5436
5508
|
}, props));
|
|
5437
5509
|
};
|
|
5438
5510
|
|
|
@@ -16623,16 +16695,16 @@ var SliderView = _ref => {
|
|
|
16623
16695
|
} = _ref,
|
|
16624
16696
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$S);
|
|
16625
16697
|
var {
|
|
16626
|
-
|
|
16698
|
+
getColorHex,
|
|
16627
16699
|
themeMode
|
|
16628
16700
|
} = appStudio.useTheme();
|
|
16629
|
-
var themeColor =
|
|
16701
|
+
var themeColor = getColorHex(backgroundColor, {
|
|
16630
16702
|
themeMode: elementMode || themeMode
|
|
16631
16703
|
});
|
|
16632
|
-
var disabledColor =
|
|
16704
|
+
var disabledColor = getColorHex('theme.disabled', {
|
|
16633
16705
|
themeMode: elementMode || themeMode
|
|
16634
16706
|
});
|
|
16635
|
-
var trackColor =
|
|
16707
|
+
var trackColor = getColorHex(SliderVariants[variant].backgroundColor, {
|
|
16636
16708
|
themeMode: elementMode || themeMode
|
|
16637
16709
|
});
|
|
16638
16710
|
var isVertical = orientation === 'vertical';
|
|
@@ -16804,7 +16876,7 @@ var SliderView = _ref => {
|
|
|
16804
16876
|
height: thumbSize + "px",
|
|
16805
16877
|
borderRadius: "50%",
|
|
16806
16878
|
backgroundColor: isDisabled ? disabledColor : themeColor,
|
|
16807
|
-
border: "2px solid
|
|
16879
|
+
border: "2px solid color.white",
|
|
16808
16880
|
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.2)",
|
|
16809
16881
|
cursor: isDisabled ? 'not-allowed' : 'grab',
|
|
16810
16882
|
transform: isVertical ? 'translateX(-50%)' : 'translateY(-50%)',
|
|
@@ -16823,8 +16895,8 @@ var SliderView = _ref => {
|
|
|
16823
16895
|
}, views == null ? void 0 : views.thumb), showTooltip && (isHovered || isDragging) && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
16824
16896
|
position: "absolute",
|
|
16825
16897
|
padding: "4px 8px",
|
|
16826
|
-
backgroundColor:
|
|
16827
|
-
color:
|
|
16898
|
+
backgroundColor: 'color.black',
|
|
16899
|
+
color: 'color.white',
|
|
16828
16900
|
borderRadius: "4px",
|
|
16829
16901
|
whiteSpace: "nowrap",
|
|
16830
16902
|
zIndex: 3
|
|
@@ -19122,20 +19194,16 @@ var ResponsiveTypography = {
|
|
|
19122
19194
|
// xl maps to H1 - Largest heading
|
|
19123
19195
|
xl: {
|
|
19124
19196
|
fontWeight: 500,
|
|
19125
|
-
marginBottom: 20,
|
|
19126
19197
|
letterSpacing: 1.25,
|
|
19127
19198
|
media: {
|
|
19128
19199
|
mobile: {
|
|
19129
|
-
fontSize:
|
|
19130
|
-
width: '100%'
|
|
19200
|
+
fontSize: 60
|
|
19131
19201
|
},
|
|
19132
19202
|
tablet: {
|
|
19133
|
-
fontSize:
|
|
19134
|
-
width: '100%'
|
|
19203
|
+
fontSize: 60
|
|
19135
19204
|
},
|
|
19136
19205
|
desktop: {
|
|
19137
|
-
fontSize:
|
|
19138
|
-
minWidth: '60%'
|
|
19206
|
+
fontSize: 96
|
|
19139
19207
|
}
|
|
19140
19208
|
}
|
|
19141
19209
|
},
|
|
@@ -19144,13 +19212,13 @@ var ResponsiveTypography = {
|
|
|
19144
19212
|
fontWeight: 500,
|
|
19145
19213
|
media: {
|
|
19146
19214
|
mobile: {
|
|
19147
|
-
fontSize:
|
|
19215
|
+
fontSize: 48
|
|
19148
19216
|
},
|
|
19149
19217
|
tablet: {
|
|
19150
|
-
fontSize:
|
|
19218
|
+
fontSize: 48
|
|
19151
19219
|
},
|
|
19152
19220
|
desktop: {
|
|
19153
|
-
fontSize:
|
|
19221
|
+
fontSize: 70
|
|
19154
19222
|
}
|
|
19155
19223
|
}
|
|
19156
19224
|
},
|
|
@@ -19159,13 +19227,13 @@ var ResponsiveTypography = {
|
|
|
19159
19227
|
fontWeight: 500,
|
|
19160
19228
|
media: {
|
|
19161
19229
|
mobile: {
|
|
19162
|
-
fontSize:
|
|
19230
|
+
fontSize: 32
|
|
19163
19231
|
},
|
|
19164
19232
|
tablet: {
|
|
19165
|
-
fontSize:
|
|
19233
|
+
fontSize: 40
|
|
19166
19234
|
},
|
|
19167
19235
|
desktop: {
|
|
19168
|
-
fontSize:
|
|
19236
|
+
fontSize: 56
|
|
19169
19237
|
}
|
|
19170
19238
|
}
|
|
19171
19239
|
},
|
|
@@ -19175,10 +19243,10 @@ var ResponsiveTypography = {
|
|
|
19175
19243
|
letterSpacing: -0.2,
|
|
19176
19244
|
media: {
|
|
19177
19245
|
mobile: {
|
|
19178
|
-
fontSize:
|
|
19246
|
+
fontSize: 20
|
|
19179
19247
|
},
|
|
19180
19248
|
tablet: {
|
|
19181
|
-
fontSize:
|
|
19249
|
+
fontSize: 24
|
|
19182
19250
|
},
|
|
19183
19251
|
desktop: {
|
|
19184
19252
|
fontSize: 32
|
|
@@ -19191,13 +19259,13 @@ var ResponsiveTypography = {
|
|
|
19191
19259
|
letterSpacing: -0.2,
|
|
19192
19260
|
media: {
|
|
19193
19261
|
mobile: {
|
|
19194
|
-
fontSize:
|
|
19262
|
+
fontSize: 14
|
|
19195
19263
|
},
|
|
19196
19264
|
tablet: {
|
|
19197
19265
|
fontSize: 18
|
|
19198
19266
|
},
|
|
19199
19267
|
desktop: {
|
|
19200
|
-
fontSize:
|
|
19268
|
+
fontSize: 20
|
|
19201
19269
|
}
|
|
19202
19270
|
}
|
|
19203
19271
|
}
|
|
@@ -19239,7 +19307,7 @@ var HighlightStyles = {
|
|
|
19239
19307
|
})
|
|
19240
19308
|
};
|
|
19241
19309
|
|
|
19242
|
-
var _excluded$Z = ["text", "typingSpeed", "pauseTime", "onComplete", "showCursor", "cursorColor", "textStyle", "as"];
|
|
19310
|
+
var _excluded$Z = ["text", "typingSpeed", "pauseTime", "onComplete", "showCursor", "cursorColor", "textStyle", "textComponent", "as"];
|
|
19243
19311
|
/**
|
|
19244
19312
|
* A component that creates a typewriter effect for text
|
|
19245
19313
|
*/
|
|
@@ -19251,9 +19319,11 @@ var TypewriterEffect = _ref => {
|
|
|
19251
19319
|
onComplete,
|
|
19252
19320
|
showCursor = true,
|
|
19253
19321
|
cursorColor = 'currentColor',
|
|
19254
|
-
textStyle
|
|
19322
|
+
textStyle,
|
|
19323
|
+
textComponent
|
|
19255
19324
|
} = _ref,
|
|
19256
19325
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$Z);
|
|
19326
|
+
var TextComponent = textComponent || appStudio.Text;
|
|
19257
19327
|
// Convert text to array if it's a string
|
|
19258
19328
|
var textArray = Array.isArray(text) ? text : [text];
|
|
19259
19329
|
// State for the currently displayed text
|
|
@@ -19306,7 +19376,7 @@ var TypewriterEffect = _ref => {
|
|
|
19306
19376
|
}, [textArray, currentTextIndex, charIndex, isComplete, onComplete, pauseTime, typingSpeed]);
|
|
19307
19377
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, displayedText.map((text, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
19308
19378
|
key: index
|
|
19309
|
-
}, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(
|
|
19379
|
+
}, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
|
|
19310
19380
|
as: "span",
|
|
19311
19381
|
display: "inline-block",
|
|
19312
19382
|
width: "0.1em",
|
|
@@ -19319,7 +19389,7 @@ var TypewriterEffect = _ref => {
|
|
|
19319
19389
|
}, textStyle))))))));
|
|
19320
19390
|
};
|
|
19321
19391
|
|
|
19322
|
-
var _excluded$_ = ["text", "duration", "direction", "stagger", "sequential", "textStyle", "as", "wordProps"],
|
|
19392
|
+
var _excluded$_ = ["text", "duration", "direction", "stagger", "sequential", "textStyle", "as", "wordProps", "textComponent"],
|
|
19323
19393
|
_excluded2$g = ["style"];
|
|
19324
19394
|
var SlideEffect = _ref => {
|
|
19325
19395
|
var {
|
|
@@ -19329,12 +19399,14 @@ var SlideEffect = _ref => {
|
|
|
19329
19399
|
stagger = 50,
|
|
19330
19400
|
sequential = false,
|
|
19331
19401
|
textStyle,
|
|
19332
|
-
wordProps
|
|
19402
|
+
wordProps,
|
|
19403
|
+
textComponent
|
|
19333
19404
|
} = _ref,
|
|
19334
19405
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$_);
|
|
19335
19406
|
var [displayedText, setDisplayedText] = React.useState(text);
|
|
19336
19407
|
var [phase, setPhase] = React.useState('entering');
|
|
19337
19408
|
var [animKey, setAnimKey] = React.useState(0);
|
|
19409
|
+
var TextComponent = textComponent || appStudio.Text;
|
|
19338
19410
|
var pendingTextRef = React.useRef(null);
|
|
19339
19411
|
var timeoutRef = React.useRef(null);
|
|
19340
19412
|
// Handle text changes
|
|
@@ -19488,7 +19560,7 @@ var SlideEffect = _ref => {
|
|
|
19488
19560
|
transform: phase === 'visible' ? 'translateY(0)' : undefined,
|
|
19489
19561
|
opacity: phase === 'visible' ? 1 : undefined
|
|
19490
19562
|
});
|
|
19491
|
-
return /*#__PURE__*/React__default.createElement(
|
|
19563
|
+
return /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
|
|
19492
19564
|
key: animKey + "-" + index,
|
|
19493
19565
|
as: "span",
|
|
19494
19566
|
animate: wordAnimation
|
|
@@ -19496,7 +19568,7 @@ var SlideEffect = _ref => {
|
|
|
19496
19568
|
})));
|
|
19497
19569
|
};
|
|
19498
19570
|
|
|
19499
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential", "themeMode"];
|
|
19571
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential", "themeMode", "textComponent"];
|
|
19500
19572
|
function escapeRegExp(string) {
|
|
19501
19573
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19502
19574
|
}
|
|
@@ -19520,7 +19592,8 @@ var TitleView = _ref => {
|
|
|
19520
19592
|
highlightSlideDuration = 500,
|
|
19521
19593
|
highlightSlideStagger = 50,
|
|
19522
19594
|
highlightSlideSequential = true,
|
|
19523
|
-
themeMode: elementMode
|
|
19595
|
+
themeMode: elementMode,
|
|
19596
|
+
textComponent
|
|
19524
19597
|
} = _ref,
|
|
19525
19598
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$$);
|
|
19526
19599
|
var {
|
|
@@ -19574,6 +19647,7 @@ var TitleView = _ref => {
|
|
|
19574
19647
|
highlightSlideStagger,
|
|
19575
19648
|
highlightSlideSequential
|
|
19576
19649
|
}, props));
|
|
19650
|
+
var TextComponent = textComponent || appStudio.Text;
|
|
19577
19651
|
// Common style calculations
|
|
19578
19652
|
var useResponsive = responsive && !props.media;
|
|
19579
19653
|
var fontSize = TitleSizes[size];
|
|
@@ -19622,8 +19696,8 @@ var TitleView = _ref => {
|
|
|
19622
19696
|
return /*#__PURE__*/React__default.createElement(TypewriterEffect, Object.assign({
|
|
19623
19697
|
text: content,
|
|
19624
19698
|
typingSpeed: Math.max(30, highlightTypewriterDuration / (content.length * 10)),
|
|
19625
|
-
|
|
19626
|
-
|
|
19699
|
+
cursorColor: "currentColor",
|
|
19700
|
+
textComponent: TextComponent
|
|
19627
19701
|
}, highlightProps));
|
|
19628
19702
|
}
|
|
19629
19703
|
if (highlightSlide) {
|
|
@@ -19635,7 +19709,8 @@ var TitleView = _ref => {
|
|
|
19635
19709
|
direction: "up",
|
|
19636
19710
|
fontSize: useResponsive ? undefined : fontSize,
|
|
19637
19711
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19638
|
-
wordProps: highlightProps
|
|
19712
|
+
wordProps: highlightProps,
|
|
19713
|
+
textComponent: TextComponent
|
|
19639
19714
|
});
|
|
19640
19715
|
}
|
|
19641
19716
|
return content;
|
|
@@ -19655,7 +19730,7 @@ var TitleView = _ref => {
|
|
|
19655
19730
|
lastIndex = match.index + match[0].length;
|
|
19656
19731
|
}
|
|
19657
19732
|
if (lastIndex < text.length) parts.push(text.substring(lastIndex));
|
|
19658
|
-
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(
|
|
19733
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
|
|
19659
19734
|
key: "highlight-" + idx,
|
|
19660
19735
|
as: "span",
|
|
19661
19736
|
display: "inline",
|
|
@@ -19665,7 +19740,7 @@ var TitleView = _ref => {
|
|
|
19665
19740
|
}
|
|
19666
19741
|
// Case 2: Has highlight style but no highlight target - apply style to entire title
|
|
19667
19742
|
if (highlightStyle && !activeHighlightTarget) {
|
|
19668
|
-
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(
|
|
19743
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
|
|
19669
19744
|
as: "span",
|
|
19670
19745
|
fontSize: fontSize,
|
|
19671
19746
|
display: "inline",
|
|
@@ -19673,7 +19748,7 @@ var TitleView = _ref => {
|
|
|
19673
19748
|
}, !highlightSlide ? highlightProps : {}, views == null ? void 0 : views.highlight), renderHighlightedContent(text)));
|
|
19674
19749
|
}
|
|
19675
19750
|
// Case 3: Default - no highlighting
|
|
19676
|
-
return /*#__PURE__*/React__default.createElement(
|
|
19751
|
+
return /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), text);
|
|
19677
19752
|
};
|
|
19678
19753
|
|
|
19679
19754
|
/**
|