@xsolla/xui-status-dropdown 0.216.1 → 0.217.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-status-dropdown",
3
- "version": "0.216.1",
3
+ "version": "0.217.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,10 +13,10 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-context-menu": "0.216.1",
17
- "@xsolla/xui-core": "0.216.1",
18
- "@xsolla/xui-primitives-core": "0.216.1",
19
- "@xsolla/xui-status": "0.216.1"
16
+ "@xsolla/xui-context-menu": "0.217.0",
17
+ "@xsolla/xui-core": "0.217.0",
18
+ "@xsolla/xui-primitives-core": "0.217.0",
19
+ "@xsolla/xui-status": "0.217.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": ">=16.8.0",
package/web/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { ThemeOverrideProps } from '@xsolla/xui-core';
2
+ import { ThemeOverrideProps, ThemeMode } from '@xsolla/xui-core';
3
3
  import { ContextMenuPlacement } from '@xsolla/xui-context-menu';
4
4
 
5
5
  type StatusDropdownPalette = "Neutral" | "Success" | "Warning" | "Alert" | "Brand";
@@ -17,6 +17,14 @@ interface StatusDropdownProps extends ThemeOverrideProps {
17
17
  dot?: boolean;
18
18
  /** Dropdown menu content (usually ContextMenuItem components) */
19
19
  children: ReactNode;
20
+ /**
21
+ * Theme mode for the trigger only, overriding the context menu's `themeMode`
22
+ * for the trigger. When omitted, the trigger falls back to `themeMode` (which
23
+ * inherits from XUIProvider), so trigger and menu match by default. Set
24
+ * `triggerThemeMode="light"` to keep the trigger light while the menu is dark,
25
+ * matching Figma (FEP-898).
26
+ */
27
+ triggerThemeMode?: ThemeMode;
20
28
  /** Menu placement relative to the trigger. Defaults to `"bottom-start"`. */
21
29
  placement?: ContextMenuPlacement;
22
30
  /** Whether the dropdown is open (controlled) */
package/web/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { ThemeOverrideProps } from '@xsolla/xui-core';
2
+ import { ThemeOverrideProps, ThemeMode } from '@xsolla/xui-core';
3
3
  import { ContextMenuPlacement } from '@xsolla/xui-context-menu';
4
4
 
5
5
  type StatusDropdownPalette = "Neutral" | "Success" | "Warning" | "Alert" | "Brand";
@@ -17,6 +17,14 @@ interface StatusDropdownProps extends ThemeOverrideProps {
17
17
  dot?: boolean;
18
18
  /** Dropdown menu content (usually ContextMenuItem components) */
19
19
  children: ReactNode;
20
+ /**
21
+ * Theme mode for the trigger only, overriding the context menu's `themeMode`
22
+ * for the trigger. When omitted, the trigger falls back to `themeMode` (which
23
+ * inherits from XUIProvider), so trigger and menu match by default. Set
24
+ * `triggerThemeMode="light"` to keep the trigger light while the menu is dark,
25
+ * matching Figma (FEP-898).
26
+ */
27
+ triggerThemeMode?: ThemeMode;
20
28
  /** Menu placement relative to the trigger. Defaults to `"bottom-start"`. */
21
29
  placement?: ContextMenuPlacement;
22
30
  /** Whether the dropdown is open (controlled) */
package/web/index.js CHANGED
@@ -1242,6 +1242,7 @@ var StatusDropdown = (0, import_react3.forwardRef)(
1242
1242
  maxWidth,
1243
1243
  dot = false,
1244
1244
  children,
1245
+ triggerThemeMode,
1245
1246
  placement = "bottom-start",
1246
1247
  isOpen: propIsOpen,
1247
1248
  onOpenChange,
@@ -1252,7 +1253,7 @@ var StatusDropdown = (0, import_react3.forwardRef)(
1252
1253
  themeProductContext
1253
1254
  }, ref) => {
1254
1255
  const { theme: rawTheme } = (0, import_xui_core.useResolvedTheme)({
1255
- themeMode,
1256
+ themeMode: triggerThemeMode ?? themeMode,
1256
1257
  themeProductContext
1257
1258
  });
1258
1259
  const theme = rawTheme;