@xsolla/xui-status-dropdown 0.172.0 → 0.172.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.d.mts +2 -0
- package/native/index.d.ts +2 -0
- package/native/index.js +32 -11
- package/native/index.js.map +1 -1
- package/native/index.mjs +32 -11
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.d.mts +2 -0
- package/web/index.d.ts +2 -0
- package/web/index.js +32 -11
- package/web/index.js.map +1 -1
- package/web/index.mjs +32 -11
- package/web/index.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-status-dropdown",
|
|
3
|
-
"version": "0.172.
|
|
3
|
+
"version": "0.172.1",
|
|
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.172.
|
|
17
|
-
"@xsolla/xui-core": "0.172.
|
|
18
|
-
"@xsolla/xui-primitives-core": "0.172.
|
|
19
|
-
"@xsolla/xui-status": "0.172.
|
|
16
|
+
"@xsolla/xui-context-menu": "0.172.1",
|
|
17
|
+
"@xsolla/xui-core": "0.172.1",
|
|
18
|
+
"@xsolla/xui-primitives-core": "0.172.1",
|
|
19
|
+
"@xsolla/xui-status": "0.172.1"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": ">=16.8.0",
|
package/web/index.d.mts
CHANGED
|
@@ -10,6 +10,8 @@ interface StatusDropdownProps extends ThemeOverrideProps {
|
|
|
10
10
|
palette?: StatusDropdownPalette;
|
|
11
11
|
/** Size of the trigger */
|
|
12
12
|
size?: StatusDropdownSize;
|
|
13
|
+
/** Max width of the trigger. The label truncates with an ellipsis when it exceeds this. Accepts any layout width value (number or string). */
|
|
14
|
+
maxWidth?: number | string;
|
|
13
15
|
/** Whether to show the status dot */
|
|
14
16
|
dot?: boolean;
|
|
15
17
|
/** Dropdown menu content (usually ContextMenuItem components) */
|
package/web/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ interface StatusDropdownProps extends ThemeOverrideProps {
|
|
|
10
10
|
palette?: StatusDropdownPalette;
|
|
11
11
|
/** Size of the trigger */
|
|
12
12
|
size?: StatusDropdownSize;
|
|
13
|
+
/** Max width of the trigger. The label truncates with an ellipsis when it exceeds this. Accepts any layout width value (number or string). */
|
|
14
|
+
maxWidth?: number | string;
|
|
13
15
|
/** Whether to show the status dot */
|
|
14
16
|
dot?: boolean;
|
|
15
17
|
/** Dropdown menu content (usually ContextMenuItem components) */
|
package/web/index.js
CHANGED
|
@@ -1182,6 +1182,7 @@ var StatusDropdown = (0, import_react3.forwardRef)(
|
|
|
1182
1182
|
label,
|
|
1183
1183
|
palette = "Neutral",
|
|
1184
1184
|
size = "xs",
|
|
1185
|
+
maxWidth,
|
|
1185
1186
|
dot = false,
|
|
1186
1187
|
children,
|
|
1187
1188
|
isOpen: propIsOpen,
|
|
@@ -1235,6 +1236,8 @@ var StatusDropdown = (0, import_react3.forwardRef)(
|
|
|
1235
1236
|
height: sizeStyles.height,
|
|
1236
1237
|
paddingHorizontal: sizeStyles.padding,
|
|
1237
1238
|
gap,
|
|
1239
|
+
minWidth: 0,
|
|
1240
|
+
maxWidth,
|
|
1238
1241
|
...isWeb ? {
|
|
1239
1242
|
onFocus: (event) => {
|
|
1240
1243
|
const target = event?.target;
|
|
@@ -1283,19 +1286,36 @@ var StatusDropdown = (0, import_react3.forwardRef)(
|
|
|
1283
1286
|
)
|
|
1284
1287
|
}
|
|
1285
1288
|
),
|
|
1286
|
-
/* @__PURE__ */ (0, import_jsx_runtime725.jsx)(
|
|
1287
|
-
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime725.jsx)(
|
|
1290
|
+
Box,
|
|
1288
1291
|
{
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1292
|
+
paddingHorizontal: gap,
|
|
1293
|
+
flexShrink: 1,
|
|
1294
|
+
minWidth: 0,
|
|
1295
|
+
...isWeb ? { overflow: "hidden" } : {},
|
|
1296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime725.jsx)(
|
|
1297
|
+
Text,
|
|
1298
|
+
{
|
|
1299
|
+
color: contentColor,
|
|
1300
|
+
fontSize: sizeStyles.fontSize,
|
|
1301
|
+
fontWeight: "500",
|
|
1302
|
+
numberOfLines: 1,
|
|
1303
|
+
style: {
|
|
1304
|
+
lineHeight: `${sizeStyles.lineHeight}px`,
|
|
1305
|
+
// Text primitive ignores numberOfLines on web, so enforce
|
|
1306
|
+
// single-line truncation with real CSS.
|
|
1307
|
+
...isWeb ? {
|
|
1308
|
+
display: "block",
|
|
1309
|
+
whiteSpace: "nowrap",
|
|
1310
|
+
overflow: "hidden",
|
|
1311
|
+
textOverflow: "ellipsis"
|
|
1312
|
+
} : {}
|
|
1313
|
+
},
|
|
1314
|
+
children: label
|
|
1315
|
+
}
|
|
1316
|
+
)
|
|
1297
1317
|
}
|
|
1298
|
-
)
|
|
1318
|
+
),
|
|
1299
1319
|
/* @__PURE__ */ (0, import_jsx_runtime725.jsx)(
|
|
1300
1320
|
Box,
|
|
1301
1321
|
{
|
|
@@ -1303,6 +1323,7 @@ var StatusDropdown = (0, import_react3.forwardRef)(
|
|
|
1303
1323
|
height: sizeStyles.iconSize,
|
|
1304
1324
|
alignItems: "center",
|
|
1305
1325
|
justifyContent: "center",
|
|
1326
|
+
flexShrink: 0,
|
|
1306
1327
|
children: /* @__PURE__ */ (0, import_jsx_runtime725.jsx)(
|
|
1307
1328
|
Icon,
|
|
1308
1329
|
{
|