@xsolla/xui-button 0.201.4 → 0.202.0

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/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
- overflow-x: ${(props) => props.overflowX || "visible"};
198
- overflow-y: ${(props) => props.overflowY || "visible"};
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",
@@ -1004,8 +1009,8 @@ var FlexButton = (0, import_react5.forwardRef)(
1004
1009
  const getVariantColors = (currentState) => {
1005
1010
  if (isDisabled) {
1006
1011
  return {
1007
- bg: background ? theme.colors.overlay.mono : "transparent",
1008
- text: theme.colors.control.text.disable,
1012
+ bg: background ? theme.colors.control.brand.primary.bgDisable : "transparent",
1013
+ text: theme.colors.control.brand.text.disable,
1009
1014
  border: void 0
1010
1015
  };
1011
1016
  }