@xsolla/xui-button 0.201.5 → 0.202.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.
- package/native/index.js +2 -0
- package/native/index.js.map +1 -1
- package/native/index.mjs +2 -0
- package/native/index.mjs.map +1 -1
- package/package.json +4 -4
- package/web/index.js +8 -3
- package/web/index.js.map +1 -1
- package/web/index.mjs +8 -3
- package/web/index.mjs.map +1 -1
package/web/index.js
CHANGED
|
@@ -84,6 +84,7 @@ var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
|
84
84
|
"strokeWidth",
|
|
85
85
|
// CSS properties that pass isPropValid but are used as component props
|
|
86
86
|
"overflow",
|
|
87
|
+
"opacity",
|
|
87
88
|
"cursor",
|
|
88
89
|
"fontSize",
|
|
89
90
|
"fontWeight",
|
|
@@ -193,11 +194,14 @@ var StyledBox = (0, import_styled_components.default)(FilteredDiv)`
|
|
|
193
194
|
flex-shrink: ${(props) => props.flexShrink ?? 1};
|
|
194
195
|
gap: ${(props) => typeof props.gap === "number" ? `${props.gap}px` : props.gap || 0};
|
|
195
196
|
align-self: ${(props) => props.alignSelf || "auto"};
|
|
197
|
+
/* Only emit overflow-x/y when explicitly set. Defaulting them to
|
|
198
|
+
visible after overflow would override the shorthand and break
|
|
199
|
+
clipping (e.g. OtherCard bottom-right promo image). */
|
|
196
200
|
overflow: ${(props) => props.overflow || "visible"};
|
|
197
|
-
|
|
198
|
-
|
|
201
|
+
${(props) => props.overflowX != null ? `overflow-x: ${props.overflowX};` : ""}
|
|
202
|
+
${(props) => props.overflowY != null ? `overflow-y: ${props.overflowY};` : ""}
|
|
199
203
|
z-index: ${(props) => props.zIndex};
|
|
200
|
-
opacity: ${(props) => props.disabled ? 0.5 : 1};
|
|
204
|
+
opacity: ${(props) => props.opacity != null ? props.opacity : props.disabled ? 0.5 : 1};
|
|
201
205
|
pointer-events: ${(props) => props.disabled ? "none" : "auto"};
|
|
202
206
|
|
|
203
207
|
&:hover {
|
|
@@ -248,6 +252,7 @@ var Box = import_react2.default.forwardRef(
|
|
|
248
252
|
alt: alt || "",
|
|
249
253
|
onError,
|
|
250
254
|
onLoad,
|
|
255
|
+
"data-testid": dataTestId || testID,
|
|
251
256
|
style: {
|
|
252
257
|
display: "block",
|
|
253
258
|
objectFit: "cover",
|