@uipath/apollo-react 3.49.0 → 3.49.1
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.
|
@@ -108,7 +108,8 @@ const ApButton = /*#__PURE__*/ external_react_default().forwardRef((props, ref)=
|
|
|
108
108
|
const shouldShowLoadingAsStartIcon = loading && hasStartIcon;
|
|
109
109
|
const shouldShowLoadingAsEndIcon = loading && !hasStartIcon && hasEndIcon;
|
|
110
110
|
const shouldShowLoadingAsLabel = loading && !hasStartIcon && !hasEndIcon;
|
|
111
|
-
const
|
|
111
|
+
const { sx: variantSx, ...restVariantProps } = variantToProps[variant];
|
|
112
|
+
const { sx: userSx, ...restProps } = rest;
|
|
112
113
|
const loadingIndicator = loading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ButtonLoadingIndicator, {
|
|
113
114
|
"aria-label": label
|
|
114
115
|
}) : null;
|
|
@@ -136,16 +137,20 @@ const ApButton = /*#__PURE__*/ external_react_default().forwardRef((props, ref)=
|
|
|
136
137
|
onBlur: onBlur,
|
|
137
138
|
startIcon: loading && shouldShowLoadingAsStartIcon ? loadingIndicator : startIcon,
|
|
138
139
|
endIcon: loading && shouldShowLoadingAsEndIcon ? loadingIndicator : endIcon,
|
|
139
|
-
...
|
|
140
|
+
...restVariantProps,
|
|
141
|
+
sx: [
|
|
142
|
+
variantSx ?? {},
|
|
143
|
+
userSx ?? {}
|
|
144
|
+
],
|
|
140
145
|
tabIndex: tabIndex ?? (loading ? -1 : void 0),
|
|
141
146
|
"aria-disabled": disabled || loading ? 'true' : void 0,
|
|
142
147
|
"aria-expanded": expanded,
|
|
143
148
|
title: title,
|
|
144
|
-
className: joinClasses(
|
|
149
|
+
className: joinClasses(restVariantProps?.className, loading && 'loading'),
|
|
145
150
|
href: href,
|
|
146
151
|
customSize: size,
|
|
147
152
|
customWidth: widthMode,
|
|
148
|
-
...
|
|
153
|
+
...restProps,
|
|
149
154
|
children: [
|
|
150
155
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
151
156
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApButton.d.ts","sourceRoot":"","sources":["../../../../src/material/components/ap-button/ApButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,kBAAkB,CAAC;AAgDtE,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"ApButton.d.ts","sourceRoot":"","sources":["../../../../src/material/components/ap-button/ApButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,kBAAkB,CAAC;AAgDtE,eAAO,MAAM,QAAQ,sGAoFnB,CAAC"}
|
|
@@ -68,7 +68,8 @@ const ApButton = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
|
68
68
|
const shouldShowLoadingAsStartIcon = loading && hasStartIcon;
|
|
69
69
|
const shouldShowLoadingAsEndIcon = loading && !hasStartIcon && hasEndIcon;
|
|
70
70
|
const shouldShowLoadingAsLabel = loading && !hasStartIcon && !hasEndIcon;
|
|
71
|
-
const
|
|
71
|
+
const { sx: variantSx, ...restVariantProps } = variantToProps[variant];
|
|
72
|
+
const { sx: userSx, ...restProps } = rest;
|
|
72
73
|
const loadingIndicator = loading ? /*#__PURE__*/ jsx(ButtonLoadingIndicator, {
|
|
73
74
|
"aria-label": label
|
|
74
75
|
}) : null;
|
|
@@ -96,16 +97,20 @@ const ApButton = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
|
96
97
|
onBlur: onBlur,
|
|
97
98
|
startIcon: loading && shouldShowLoadingAsStartIcon ? loadingIndicator : startIcon,
|
|
98
99
|
endIcon: loading && shouldShowLoadingAsEndIcon ? loadingIndicator : endIcon,
|
|
99
|
-
...
|
|
100
|
+
...restVariantProps,
|
|
101
|
+
sx: [
|
|
102
|
+
variantSx ?? {},
|
|
103
|
+
userSx ?? {}
|
|
104
|
+
],
|
|
100
105
|
tabIndex: tabIndex ?? (loading ? -1 : void 0),
|
|
101
106
|
"aria-disabled": disabled || loading ? 'true' : void 0,
|
|
102
107
|
"aria-expanded": expanded,
|
|
103
108
|
title: title,
|
|
104
|
-
className: joinClasses(
|
|
109
|
+
className: joinClasses(restVariantProps?.className, loading && 'loading'),
|
|
105
110
|
href: href,
|
|
106
111
|
customSize: size,
|
|
107
112
|
customWidth: widthMode,
|
|
108
|
-
...
|
|
113
|
+
...restProps,
|
|
109
114
|
children: [
|
|
110
115
|
/*#__PURE__*/ jsx("span", {
|
|
111
116
|
style: {
|