@xsolla/xui-b2b-collapsible 0.158.0 → 0.159.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/README.md +41 -38
- package/native/index.d.mts +2 -0
- package/native/index.d.ts +2 -0
- package/native/index.js +13 -4
- package/native/index.js.map +1 -1
- package/native/index.mjs +13 -4
- package/native/index.mjs.map +1 -1
- package/package.json +4 -4
- package/web/index.d.mts +2 -0
- package/web/index.d.ts +2 -0
- package/web/index.js +15 -5
- package/web/index.js.map +1 -1
- package/web/index.mjs +15 -5
- package/web/index.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
Collapsible,
|
|
16
16
|
type CollapsibleProps,
|
|
17
17
|
type CollapsibleView,
|
|
18
|
-
} from
|
|
18
|
+
} from "@xsolla/xui-b2b-collapsible";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Quick start
|
|
22
22
|
|
|
23
23
|
```tsx
|
|
24
|
-
import { Collapsible } from
|
|
24
|
+
import { Collapsible } from "@xsolla/xui-b2b-collapsible";
|
|
25
25
|
|
|
26
26
|
<Collapsible title="Setup" caption="Step 1 of 3" view="white-surface">
|
|
27
27
|
<p>Body content goes here.</p>
|
|
@@ -32,43 +32,44 @@ import { Collapsible } from '@xsolla/xui-b2b-collapsible';
|
|
|
32
32
|
|
|
33
33
|
### `<Collapsible>`
|
|
34
34
|
|
|
35
|
-
| Prop
|
|
36
|
-
|
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
35
|
+
| Prop | Type | Default | Description |
|
|
36
|
+
| -------------- | ------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
37
|
+
| `testID` | `string` | — | Test ID for testing frameworks. On web this renders as `data-testid`; on React Native it renders as `testID`. |
|
|
38
|
+
| `title` | `ReactNode` | — | Required. Title text or node in the trigger row. |
|
|
39
|
+
| `children` | `ReactNode` | — | Required. Body content shown when expanded. |
|
|
40
|
+
| `view` | `CollapsibleView` | `"without-surface"` | Visual surface style. |
|
|
41
|
+
| `caption` | `ReactNode` | — | Secondary text rendered below the title. |
|
|
42
|
+
| `icon` | `ReactNode` | — | Optional 32×32 left slot. Consumer controls styling — wrap with `IconWrapper` or pass a `Checkbox`. Click events on this slot are stopped before they reach the trigger. |
|
|
43
|
+
| `trailing` | `ReactNode` | — | Content to the right of the text, before the chevron (e.g. `Status`). |
|
|
44
|
+
| `defaultOpen` | `boolean` | `false` | Initial open state for uncontrolled usage. |
|
|
45
|
+
| `open` | `boolean` | — | Controlled open state. |
|
|
46
|
+
| `onOpenChange` | `(open: boolean) => void` | — | Called when open state changes. |
|
|
47
|
+
| `className` | `string` | — | CSS class applied to the root element. |
|
|
48
|
+
| `aria-label` | `string` | auto | Accessible label for the trigger. Defaults to `title` when it is a string. |
|
|
48
49
|
|
|
49
50
|
Inherits `ThemeOverrideProps` (`themeMode`, `themeProductContext`).
|
|
50
51
|
|
|
51
52
|
### `CollapsibleView`
|
|
52
53
|
|
|
53
54
|
```ts
|
|
54
|
-
type CollapsibleView =
|
|
55
|
+
type CollapsibleView = "without-surface" | "white-surface" | "grey-surface";
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
| Value
|
|
58
|
-
|
|
|
59
|
-
| `without-surface` | No background; bottom border divider.
|
|
60
|
-
| `white-surface`
|
|
61
|
-
| `grey-surface`
|
|
58
|
+
| Value | Appearance |
|
|
59
|
+
| ----------------- | ---------------------------------------------- |
|
|
60
|
+
| `without-surface` | No background; bottom border divider. |
|
|
61
|
+
| `white-surface` | White card with rounded corners. |
|
|
62
|
+
| `grey-surface` | Tinted overlay-mono card with rounded corners. |
|
|
62
63
|
|
|
63
64
|
### Deprecated props
|
|
64
65
|
|
|
65
66
|
The following are still accepted for migration from `@xsolla/publisher-account-core` and trigger an IDE `@deprecated` warning:
|
|
66
67
|
|
|
67
|
-
| Deprecated
|
|
68
|
-
|
|
|
69
|
-
| `onChange`
|
|
70
|
-
| `statusIcon`
|
|
71
|
-
| `description` | `caption`
|
|
68
|
+
| Deprecated | Replacement | Notes |
|
|
69
|
+
| ------------- | -------------- | ------------------------------------------- |
|
|
70
|
+
| `onChange` | `onOpenChange` | Same `(isOpen: boolean) => void` signature. |
|
|
71
|
+
| `statusIcon` | `trailing` | Same shape. |
|
|
72
|
+
| `description` | `caption` | Covers the legacy `lg`-size `description`. |
|
|
72
73
|
|
|
73
74
|
Props with no equivalent (intentional redesign): `backgroundColor`, `size`, `childContentPadding`, `label` (sm size), `openingState` (use `open` / `defaultOpen`).
|
|
74
75
|
|
|
@@ -77,7 +78,7 @@ Props with no equivalent (intentional redesign): `backgroundColor`, `size`, `chi
|
|
|
77
78
|
### Three view variants
|
|
78
79
|
|
|
79
80
|
```tsx
|
|
80
|
-
import { Collapsible } from
|
|
81
|
+
import { Collapsible } from "@xsolla/xui-b2b-collapsible";
|
|
81
82
|
|
|
82
83
|
<>
|
|
83
84
|
<Collapsible title="Without surface" view="without-surface">
|
|
@@ -95,7 +96,7 @@ import { Collapsible } from '@xsolla/xui-b2b-collapsible';
|
|
|
95
96
|
### Open by default
|
|
96
97
|
|
|
97
98
|
```tsx
|
|
98
|
-
import { Collapsible } from
|
|
99
|
+
import { Collapsible } from "@xsolla/xui-b2b-collapsible";
|
|
99
100
|
|
|
100
101
|
<Collapsible title="Pre-expanded" view="white-surface" defaultOpen>
|
|
101
102
|
<p>Visible on first render.</p>
|
|
@@ -105,9 +106,9 @@ import { Collapsible } from '@xsolla/xui-b2b-collapsible';
|
|
|
105
106
|
### With icon slot
|
|
106
107
|
|
|
107
108
|
```tsx
|
|
108
|
-
import { Collapsible } from
|
|
109
|
-
import { IconWrapper } from
|
|
110
|
-
import { ReverseLeft } from
|
|
109
|
+
import { Collapsible } from "@xsolla/xui-b2b-collapsible";
|
|
110
|
+
import { IconWrapper } from "@xsolla/xui-icon-wrapper";
|
|
111
|
+
import { ReverseLeft } from "@xsolla/xui-icons-base";
|
|
111
112
|
|
|
112
113
|
<Collapsible
|
|
113
114
|
title="Setup"
|
|
@@ -125,15 +126,17 @@ import { ReverseLeft } from '@xsolla/xui-icons-base';
|
|
|
125
126
|
### With trailing slot
|
|
126
127
|
|
|
127
128
|
```tsx
|
|
128
|
-
import { Collapsible } from
|
|
129
|
-
import { Status } from
|
|
129
|
+
import { Collapsible } from "@xsolla/xui-b2b-collapsible";
|
|
130
|
+
import { Status } from "@xsolla/xui-status";
|
|
130
131
|
|
|
131
132
|
<Collapsible
|
|
132
133
|
title="Publish your game store page"
|
|
133
134
|
caption="Publishing"
|
|
134
135
|
view="white-surface"
|
|
135
136
|
trailing={
|
|
136
|
-
<Status palette="warning" size="md" labelType="dot-color">
|
|
137
|
+
<Status palette="warning" size="md" labelType="dot-color">
|
|
138
|
+
In progress
|
|
139
|
+
</Status>
|
|
137
140
|
}
|
|
138
141
|
>
|
|
139
142
|
<p>Content</p>
|
|
@@ -143,8 +146,8 @@ import { Status } from '@xsolla/xui-status';
|
|
|
143
146
|
### Controlled
|
|
144
147
|
|
|
145
148
|
```tsx
|
|
146
|
-
import { useState } from
|
|
147
|
-
import { Collapsible } from
|
|
149
|
+
import { useState } from "react";
|
|
150
|
+
import { Collapsible } from "@xsolla/xui-b2b-collapsible";
|
|
148
151
|
|
|
149
152
|
function ControlledCollapsible() {
|
|
150
153
|
const [open, setOpen] = useState(false);
|
|
@@ -173,7 +176,7 @@ Migrating from `@xsolla/publisher-account-core`:
|
|
|
173
176
|
|
|
174
177
|
```tsx
|
|
175
178
|
// Before
|
|
176
|
-
import { Collapsible } from
|
|
179
|
+
import { Collapsible } from "@xsolla/publisher-account-core";
|
|
177
180
|
|
|
178
181
|
<Collapsible
|
|
179
182
|
title="Setup"
|
|
@@ -188,7 +191,7 @@ import { Collapsible } from '@xsolla/publisher-account-core';
|
|
|
188
191
|
</Collapsible>;
|
|
189
192
|
|
|
190
193
|
// After
|
|
191
|
-
import { Collapsible } from
|
|
194
|
+
import { Collapsible } from "@xsolla/xui-b2b-collapsible";
|
|
192
195
|
|
|
193
196
|
<Collapsible
|
|
194
197
|
title="Setup"
|
package/native/index.d.mts
CHANGED
|
@@ -25,6 +25,8 @@ interface CollapsibleProps extends ThemeOverrideProps {
|
|
|
25
25
|
statusIcon?: ReactNode;
|
|
26
26
|
/** @deprecated Use `caption` instead. */
|
|
27
27
|
description?: string;
|
|
28
|
+
/** Test ID for testing frameworks */
|
|
29
|
+
testID?: string;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
declare const Collapsible: react.ForwardRefExoticComponent<CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
|
package/native/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ interface CollapsibleProps extends ThemeOverrideProps {
|
|
|
25
25
|
statusIcon?: ReactNode;
|
|
26
26
|
/** @deprecated Use `caption` instead. */
|
|
27
27
|
description?: string;
|
|
28
|
+
/** Test ID for testing frameworks */
|
|
29
|
+
testID?: string;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
declare const Collapsible: react.ForwardRefExoticComponent<CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
|
package/native/index.js
CHANGED
|
@@ -238,6 +238,8 @@ var Text = ({
|
|
|
238
238
|
numberOfLines,
|
|
239
239
|
id,
|
|
240
240
|
role,
|
|
241
|
+
testID,
|
|
242
|
+
"data-testid": dataTestId,
|
|
241
243
|
style: styleProp,
|
|
242
244
|
...props
|
|
243
245
|
}) => {
|
|
@@ -267,7 +269,7 @@ var Text = ({
|
|
|
267
269
|
{
|
|
268
270
|
style: baseStyle,
|
|
269
271
|
numberOfLines,
|
|
270
|
-
testID: id,
|
|
272
|
+
testID: dataTestId || testID || id,
|
|
271
273
|
accessibilityRole,
|
|
272
274
|
children
|
|
273
275
|
}
|
|
@@ -278,7 +280,13 @@ var Text = ({
|
|
|
278
280
|
var import_react = __toESM(require("react"));
|
|
279
281
|
var import_react_native3 = require("react-native");
|
|
280
282
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
281
|
-
var Icon = ({
|
|
283
|
+
var Icon = ({
|
|
284
|
+
children,
|
|
285
|
+
color,
|
|
286
|
+
size,
|
|
287
|
+
testID,
|
|
288
|
+
"data-testid": dataTestId
|
|
289
|
+
}) => {
|
|
282
290
|
const style = {
|
|
283
291
|
width: typeof size === "number" ? size : void 0,
|
|
284
292
|
height: typeof size === "number" ? size : void 0,
|
|
@@ -295,7 +303,7 @@ var Icon = ({ children, color, size }) => {
|
|
|
295
303
|
}
|
|
296
304
|
return child;
|
|
297
305
|
});
|
|
298
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style, children: childrenWithProps });
|
|
306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style, testID: dataTestId || testID, children: childrenWithProps });
|
|
299
307
|
};
|
|
300
308
|
|
|
301
309
|
// src/Collapsible.tsx
|
|
@@ -317,6 +325,7 @@ var Collapsible = (0, import_react2.forwardRef)(
|
|
|
317
325
|
children,
|
|
318
326
|
className,
|
|
319
327
|
"aria-label": ariaLabel,
|
|
328
|
+
testID,
|
|
320
329
|
themeMode,
|
|
321
330
|
themeProductContext,
|
|
322
331
|
// deprecated aliases
|
|
@@ -406,7 +415,7 @@ var Collapsible = (0, import_react2.forwardRef)(
|
|
|
406
415
|
Box,
|
|
407
416
|
{
|
|
408
417
|
ref,
|
|
409
|
-
|
|
418
|
+
testID: testID || "collapsible",
|
|
410
419
|
"data-open": open,
|
|
411
420
|
className,
|
|
412
421
|
width: "100%",
|
package/native/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../src/Collapsible.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/Icon.tsx"],"sourcesContent":["export { Collapsible } from \"./Collapsible\";\nexport type { CollapsibleProps, CollapsibleView } from \"./types\";\n","import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n data-testid=\"collapsible\"\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA0D;;;ACC1D,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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A,wBAAC;AAAA;AAAA,0BACC,OAAO,MAAM,OAAO,QAAQ;AAAA,0BAC5B,UAAU,OAAO;AAAA,0BACjB,YAAY,OAAO;AAAA,0BACnB,YAAW;AAAA,0BAEV;AAAA;AAAA,sBACH,IAEA;AAAA;AAAA;AAAA,gBAEN;AAAA,gBAGA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO;AAAA,sBACL,SAAS;AAAA,sBACT,eAAe;AAAA,sBACf,YAAY;AAAA,sBACZ,KAAK,OAAO;AAAA,sBACZ,YAAY;AAAA,oBACd;AAAA,oBAEC;AAAA,kCACC;AAAA,wBAAC;AAAA;AAAA,0BACC,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BAClC,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BACpC,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BAClC,OAAO,EAAE,SAAS,QAAQ,YAAY,SAAS;AAAA,0BAE9C;AAAA;AAAA,sBACH;AAAA,sBAEF;AAAA,wBAAC;AAAA;AAAA,0BACC,OAAO;AAAA,4BACL,WAAW,OAAO,mBAAmB;AAAA,4BACrC,YAAY;AAAA,4BACZ,SAAS;AAAA,4BACT,YAAY;AAAA,0BACd;AAAA,0BAEA;AAAA,4BAAC;AAAA;AAAA,8BACC,OAAO,MAAM,OAAO,QAAQ;AAAA,8BAC5B,MAAM,OAAO;AAAA,8BAEb,uDAAC,qCAAY;AAAA;AAAA,0BACf;AAAA;AAAA,sBACF;AAAA;AAAA;AAAA,gBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA,UAGA,6CAAC,SAAI,IAAI,SAAS,OAAO,gBACvB,uDAAC,SAAI,OAAO,iBACV,uDAAC,SAAI,OAAO,mBAAoB,UAAS,GAC3C,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["import_react","import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","React","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/Collapsible.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/Icon.tsx"],"sourcesContent":["export { Collapsible } from \"./Collapsible\";\nexport type { CollapsibleProps, CollapsibleView } from \"./types\";\n","import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n testID={testID || \"collapsible\"}\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n testID,\n \"data-testid\": dataTestId,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={dataTestId || testID || id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({\n children,\n color,\n size,\n testID,\n \"data-testid\": dataTestId,\n}) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return (\n <View style={style} testID={dataTestId || testID}>\n {childrenWithProps}\n </View>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA0D;;;ACC1D,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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BACF;AAAA;AAAA;AAAA,gBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA,UAGA,6CAAC,SAAI,IAAI,SAAS,OAAO,gBACvB,uDAAC,SAAI,OAAO,iBACV,uDAAC,SAAI,OAAO,mBAAoB,UAAS,GAC3C,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["import_react","import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","React","import_jsx_runtime"]}
|
package/native/index.mjs
CHANGED
|
@@ -209,6 +209,8 @@ var Text = ({
|
|
|
209
209
|
numberOfLines,
|
|
210
210
|
id,
|
|
211
211
|
role,
|
|
212
|
+
testID,
|
|
213
|
+
"data-testid": dataTestId,
|
|
212
214
|
style: styleProp,
|
|
213
215
|
...props
|
|
214
216
|
}) => {
|
|
@@ -238,7 +240,7 @@ var Text = ({
|
|
|
238
240
|
{
|
|
239
241
|
style: baseStyle,
|
|
240
242
|
numberOfLines,
|
|
241
|
-
testID: id,
|
|
243
|
+
testID: dataTestId || testID || id,
|
|
242
244
|
accessibilityRole,
|
|
243
245
|
children
|
|
244
246
|
}
|
|
@@ -249,7 +251,13 @@ var Text = ({
|
|
|
249
251
|
import React from "react";
|
|
250
252
|
import { View as View2 } from "react-native";
|
|
251
253
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
252
|
-
var Icon = ({
|
|
254
|
+
var Icon = ({
|
|
255
|
+
children,
|
|
256
|
+
color,
|
|
257
|
+
size,
|
|
258
|
+
testID,
|
|
259
|
+
"data-testid": dataTestId
|
|
260
|
+
}) => {
|
|
253
261
|
const style = {
|
|
254
262
|
width: typeof size === "number" ? size : void 0,
|
|
255
263
|
height: typeof size === "number" ? size : void 0,
|
|
@@ -266,7 +274,7 @@ var Icon = ({ children, color, size }) => {
|
|
|
266
274
|
}
|
|
267
275
|
return child;
|
|
268
276
|
});
|
|
269
|
-
return /* @__PURE__ */ jsx3(View2, { style, children: childrenWithProps });
|
|
277
|
+
return /* @__PURE__ */ jsx3(View2, { style, testID: dataTestId || testID, children: childrenWithProps });
|
|
270
278
|
};
|
|
271
279
|
|
|
272
280
|
// src/Collapsible.tsx
|
|
@@ -288,6 +296,7 @@ var Collapsible = forwardRef(
|
|
|
288
296
|
children,
|
|
289
297
|
className,
|
|
290
298
|
"aria-label": ariaLabel,
|
|
299
|
+
testID,
|
|
291
300
|
themeMode,
|
|
292
301
|
themeProductContext,
|
|
293
302
|
// deprecated aliases
|
|
@@ -377,7 +386,7 @@ var Collapsible = forwardRef(
|
|
|
377
386
|
Box,
|
|
378
387
|
{
|
|
379
388
|
ref,
|
|
380
|
-
|
|
389
|
+
testID: testID || "collapsible",
|
|
381
390
|
"data-open": open,
|
|
382
391
|
className,
|
|
383
392
|
width: "100%",
|
package/native/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Collapsible.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/Icon.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n data-testid=\"collapsible\"\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n"],"mappings":";AAAA,SAAS,YAAY,UAAU,aAAa,cAAc;;;ACC1D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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A;AAAA,wBAAC;AAAA;AAAA,0BACC,OAAO;AAAA,4BACL,WAAW,OAAO,mBAAmB;AAAA,4BACrC,YAAY;AAAA,4BACZ,SAAS;AAAA,4BACT,YAAY;AAAA,0BACd;AAAA,0BAEA,0BAAAA;AAAA,4BAAC;AAAA;AAAA,8BACC,OAAO,MAAM,OAAO,QAAQ;AAAA,8BAC5B,MAAM,OAAO;AAAA,8BAEb,0BAAAA,KAAC,eAAY;AAAA;AAAA,0BACf;AAAA;AAAA,sBACF;AAAA;AAAA;AAAA,gBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA,UAGA,gBAAAA,KAAC,SAAI,IAAI,SAAS,OAAO,gBACvB,0BAAAA,KAAC,SAAI,OAAO,iBACV,0BAAAA,KAAC,SAAI,OAAO,mBAAoB,UAAS,GAC3C,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["jsx","View","jsx","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Collapsible.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/Icon.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n testID={testID || \"collapsible\"}\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n testID,\n \"data-testid\": dataTestId,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={dataTestId || testID || id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({\n children,\n color,\n size,\n testID,\n \"data-testid\": dataTestId,\n}) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return (\n <View style={style} testID={dataTestId || testID}>\n {childrenWithProps}\n </View>\n );\n};\n"],"mappings":";AAAA,SAAS,YAAY,UAAU,aAAa,cAAc;;;ACC1D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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;AAAA,oBAEC;AAAA,kCACC,gBAAAA;AAAA,wBAAC;AAAA;AAAA,0BACC,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BAClC,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BACpC,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BAClC,OAAO,EAAE,SAAS,QAAQ,YAAY,SAAS;AAAA,0BAE9C;AAAA;AAAA,sBACH;AAAA,sBAEF,gBAAAA;AAAA,wBAAC;AAAA;AAAA,0BACC,OAAO;AAAA,4BACL,WAAW,OAAO,mBAAmB;AAAA,4BACrC,YAAY;AAAA,4BACZ,SAAS;AAAA,4BACT,YAAY;AAAA,0BACd;AAAA,0BAEA,0BAAAA;AAAA,4BAAC;AAAA;AAAA,8BACC,OAAO,MAAM,OAAO,QAAQ;AAAA,8BAC5B,MAAM,OAAO;AAAA,8BAEb,0BAAAA,KAAC,eAAY;AAAA;AAAA,0BACf;AAAA;AAAA,sBACF;AAAA;AAAA;AAAA,gBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA,UAGA,gBAAAA,KAAC,SAAI,IAAI,SAAS,OAAO,gBACvB,0BAAAA,KAAC,SAAI,OAAO,iBACV,0BAAAA,KAAC,SAAI,OAAO,mBAAoB,UAAS,GAC3C,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["jsx","View","jsx","jsx"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-b2b-collapsible",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.159.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-core": "0.
|
|
17
|
-
"@xsolla/xui-icons-base": "0.
|
|
18
|
-
"@xsolla/xui-primitives-core": "0.
|
|
16
|
+
"@xsolla/xui-core": "0.159.0",
|
|
17
|
+
"@xsolla/xui-icons-base": "0.159.0",
|
|
18
|
+
"@xsolla/xui-primitives-core": "0.159.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=16.8.0",
|
package/web/index.d.mts
CHANGED
|
@@ -25,6 +25,8 @@ interface CollapsibleProps extends ThemeOverrideProps {
|
|
|
25
25
|
statusIcon?: ReactNode;
|
|
26
26
|
/** @deprecated Use `caption` instead. */
|
|
27
27
|
description?: string;
|
|
28
|
+
/** Test ID for testing frameworks */
|
|
29
|
+
testID?: string;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
declare const Collapsible: react.ForwardRefExoticComponent<CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
|
package/web/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ interface CollapsibleProps extends ThemeOverrideProps {
|
|
|
25
25
|
statusIcon?: ReactNode;
|
|
26
26
|
/** @deprecated Use `caption` instead. */
|
|
27
27
|
description?: string;
|
|
28
|
+
/** Test ID for testing frameworks */
|
|
29
|
+
testID?: string;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
declare const Collapsible: react.ForwardRefExoticComponent<CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
|
package/web/index.js
CHANGED
|
@@ -249,7 +249,8 @@ var Box = import_react2.default.forwardRef(
|
|
|
249
249
|
top: typeof props.top === "number" ? `${props.top}px` : props.top,
|
|
250
250
|
left: typeof props.left === "number" ? `${props.left}px` : props.left,
|
|
251
251
|
right: typeof props.right === "number" ? `${props.right}px` : props.right,
|
|
252
|
-
bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom
|
|
252
|
+
bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom,
|
|
253
|
+
...props.style
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
256
|
);
|
|
@@ -306,6 +307,8 @@ var Text = ({
|
|
|
306
307
|
className,
|
|
307
308
|
id,
|
|
308
309
|
role,
|
|
310
|
+
testID,
|
|
311
|
+
"data-testid": dataTestId,
|
|
309
312
|
numberOfLines: _numberOfLines,
|
|
310
313
|
...props
|
|
311
314
|
}) => {
|
|
@@ -316,7 +319,8 @@ var Text = ({
|
|
|
316
319
|
style,
|
|
317
320
|
className,
|
|
318
321
|
id,
|
|
319
|
-
role
|
|
322
|
+
role,
|
|
323
|
+
"data-testid": dataTestId || testID
|
|
320
324
|
}
|
|
321
325
|
);
|
|
322
326
|
};
|
|
@@ -340,8 +344,13 @@ var StyledIcon = (0, import_styled_components3.default)(FilteredDiv2)`
|
|
|
340
344
|
stroke: currentColor;
|
|
341
345
|
}
|
|
342
346
|
`;
|
|
343
|
-
var Icon = ({
|
|
344
|
-
|
|
347
|
+
var Icon = ({
|
|
348
|
+
children,
|
|
349
|
+
testID,
|
|
350
|
+
"data-testid": dataTestId,
|
|
351
|
+
...props
|
|
352
|
+
}) => {
|
|
353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StyledIcon, { "data-testid": dataTestId || testID, ...props, children });
|
|
345
354
|
};
|
|
346
355
|
|
|
347
356
|
// src/Collapsible.tsx
|
|
@@ -363,6 +372,7 @@ var Collapsible = (0, import_react3.forwardRef)(
|
|
|
363
372
|
children,
|
|
364
373
|
className,
|
|
365
374
|
"aria-label": ariaLabel,
|
|
375
|
+
testID,
|
|
366
376
|
themeMode,
|
|
367
377
|
themeProductContext,
|
|
368
378
|
// deprecated aliases
|
|
@@ -452,7 +462,7 @@ var Collapsible = (0, import_react3.forwardRef)(
|
|
|
452
462
|
Box,
|
|
453
463
|
{
|
|
454
464
|
ref,
|
|
455
|
-
|
|
465
|
+
testID: testID || "collapsible",
|
|
456
466
|
"data-open": open,
|
|
457
467
|
className,
|
|
458
468
|
width: "100%",
|
package/web/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../src/Collapsible.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../../foundation/primitives-web/src/Text.tsx","../../../../foundation/primitives-web/src/Icon.tsx"],"sourcesContent":["export { Collapsible } from \"./Collapsible\";\nexport type { CollapsibleProps, CollapsibleView } from \"./types\";\n","import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n data-testid=\"collapsible\"\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA0D;;;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,MAAM,OAAO,QAAQ;AAAA,8BAC5B,MAAM,OAAO;AAAA,8BAEb,uDAAC,qCAAY;AAAA;AAAA,0BACf;AAAA;AAAA,sBACF;AAAA;AAAA;AAAA,gBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA,UAGA,6CAAC,SAAI,IAAI,SAAS,OAAO,gBACvB,uDAAC,SAAI,OAAO,iBACV,uDAAC,SAAI,OAAO,mBAAoB,UAAS,GAC3C,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["import_react","import_react","React","styled","React","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","FilteredDiv","styled","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/Collapsible.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../../foundation/primitives-web/src/Text.tsx","../../../../foundation/primitives-web/src/Icon.tsx"],"sourcesContent":["export { Collapsible } from \"./Collapsible\";\nexport type { CollapsibleProps, CollapsibleView } from \"./types\";\n","import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n testID={testID || \"collapsible\"}\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n testID,\n \"data-testid\": dataTestId,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n data-testid={dataTestId || testID}\n />\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({\n children,\n testID,\n \"data-testid\": dataTestId,\n ...props\n}) => {\n return (\n <StyledIcon data-testid={dataTestId || testID} {...props}>\n {children}\n </StyledIcon>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA0D;;;ACA1D,IAAAC,gBAAkB;AAClB,+BAAmB;;;ACDnB,mBAAkB;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAAC,IAAI;AAAA,EAC1B;AAAA;AAEA;AAEA,IAAO,4BAAQ;;;AFRR,IAAM,2BAA2B,oBAAI,IAAI;AAAA;AAAA,EAE9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;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B,YAAW;AAAA,0BAEV;AAAA;AAAA,sBACH,IAEA;AAAA;AAAA;AAAA,gBAEN;AAAA,gBAGA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO;AAAA,sBACL,SAAS;AAAA,sBACT,eAAe;AAAA,sBACf,YAAY;AAAA,sBACZ,KAAK,OAAO;AAAA,sBACZ,YAAY;AAAA,oBACd;AAAA,oBAEC;AAAA,kCACC;AAAA,wBAAC;AAAA;AAAA,0BACC,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BAClC,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BACpC,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,0BAClC,OAAO,EAAE,SAAS,QAAQ,YAAY,SAAS;AAAA,0BAE9C;AAAA;AAAA,sBACH;AAAA,sBAEF;AAAA,wBAAC;AAAA;AAAA,0BACC,OAAO;AAAA,4BACL,WAAW,OAAO,mBAAmB;AAAA,4BACrC,YAAY;AAAA,4BACZ,SAAS;AAAA,4BACT,YAAY;AAAA,0BACd;AAAA,0BAEA;AAAA,4BAAC;AAAA;AAAA,8BACC,OAAO,MAAM,OAAO,QAAQ;AAAA,8BAC5B,MAAM,OAAO;AAAA,8BAEb,uDAAC,qCAAY;AAAA;AAAA,0BACf;AAAA;AAAA,sBACF;AAAA;AAAA;AAAA,gBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA,UAGA,6CAAC,SAAI,IAAI,SAAS,OAAO,gBACvB,uDAAC,SAAI,OAAO,iBACV,uDAAC,SAAI,OAAO,mBAAoB,UAAS,GAC3C,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["import_react","import_react","React","styled","React","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","FilteredDiv","styled","import_jsx_runtime"]}
|
package/web/index.mjs
CHANGED
|
@@ -213,7 +213,8 @@ var Box = React2.forwardRef(
|
|
|
213
213
|
top: typeof props.top === "number" ? `${props.top}px` : props.top,
|
|
214
214
|
left: typeof props.left === "number" ? `${props.left}px` : props.left,
|
|
215
215
|
right: typeof props.right === "number" ? `${props.right}px` : props.right,
|
|
216
|
-
bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom
|
|
216
|
+
bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom,
|
|
217
|
+
...props.style
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
);
|
|
@@ -270,6 +271,8 @@ var Text = ({
|
|
|
270
271
|
className,
|
|
271
272
|
id,
|
|
272
273
|
role,
|
|
274
|
+
testID,
|
|
275
|
+
"data-testid": dataTestId,
|
|
273
276
|
numberOfLines: _numberOfLines,
|
|
274
277
|
...props
|
|
275
278
|
}) => {
|
|
@@ -280,7 +283,8 @@ var Text = ({
|
|
|
280
283
|
style,
|
|
281
284
|
className,
|
|
282
285
|
id,
|
|
283
|
-
role
|
|
286
|
+
role,
|
|
287
|
+
"data-testid": dataTestId || testID
|
|
284
288
|
}
|
|
285
289
|
);
|
|
286
290
|
};
|
|
@@ -304,8 +308,13 @@ var StyledIcon = styled3(FilteredDiv2)`
|
|
|
304
308
|
stroke: currentColor;
|
|
305
309
|
}
|
|
306
310
|
`;
|
|
307
|
-
var Icon = ({
|
|
308
|
-
|
|
311
|
+
var Icon = ({
|
|
312
|
+
children,
|
|
313
|
+
testID,
|
|
314
|
+
"data-testid": dataTestId,
|
|
315
|
+
...props
|
|
316
|
+
}) => {
|
|
317
|
+
return /* @__PURE__ */ jsx3(StyledIcon, { "data-testid": dataTestId || testID, ...props, children });
|
|
309
318
|
};
|
|
310
319
|
|
|
311
320
|
// src/Collapsible.tsx
|
|
@@ -327,6 +336,7 @@ var Collapsible = forwardRef(
|
|
|
327
336
|
children,
|
|
328
337
|
className,
|
|
329
338
|
"aria-label": ariaLabel,
|
|
339
|
+
testID,
|
|
330
340
|
themeMode,
|
|
331
341
|
themeProductContext,
|
|
332
342
|
// deprecated aliases
|
|
@@ -416,7 +426,7 @@ var Collapsible = forwardRef(
|
|
|
416
426
|
Box,
|
|
417
427
|
{
|
|
418
428
|
ref,
|
|
419
|
-
|
|
429
|
+
testID: testID || "collapsible",
|
|
420
430
|
"data-open": open,
|
|
421
431
|
className,
|
|
422
432
|
width: "100%",
|
package/web/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Collapsible.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../../foundation/primitives-web/src/Text.tsx","../../../../foundation/primitives-web/src/Icon.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n data-testid=\"collapsible\"\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props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Y;AAAA,4BACZ,SAAS;AAAA,4BACT,YAAY;AAAA,0BACd;AAAA,0BAEA,0BAAAA;AAAA,4BAAC;AAAA;AAAA,8BACC,OAAO,MAAM,OAAO,QAAQ;AAAA,8BAC5B,MAAM,OAAO;AAAA,8BAEb,0BAAAA,KAAC,eAAY;AAAA;AAAA,0BACf;AAAA;AAAA,sBACF;AAAA;AAAA;AAAA,gBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA,UAGA,gBAAAA,KAAC,SAAI,IAAI,SAAS,OAAO,gBACvB,0BAAAA,KAAC,SAAI,OAAO,iBACV,0BAAAA,KAAC,SAAI,OAAO,mBAAoB,UAAS,GAC3C,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["React","React","styled","jsx","styled","styled","jsx","FilteredDiv","styled","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Collapsible.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../../foundation/primitives-web/src/Text.tsx","../../../../foundation/primitives-web/src/Icon.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, useRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { ChevronDown, ChevronUp } from \"@xsolla/xui-icons-base\";\nimport type { CollapsibleProps } from \"./types\";\n\nconst PANEL_TRANSITION =\n \"grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\nconst CHEVRON_TRANSITION = \"transform 280ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\nexport const Collapsible = forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n title,\n caption: captionProp,\n icon,\n trailing: trailingProp,\n view = \"without-surface\",\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n className,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n // deprecated aliases\n onChange,\n statusIcon,\n description,\n ...rest\n },\n ref\n ) => {\n const caption = captionProp ?? description;\n const trailing = trailingProp ?? statusIcon;\n const resolvedOnOpenChange = onOpenChange ?? onChange;\n\n // Stable panel ID — React 16 compatible (no useId)\n const panelIdRef = useRef<string>();\n if (!panelIdRef.current) {\n panelIdRef.current = `collapsible-panel-${Math.random().toString(36).slice(2, 10)}`;\n }\n const panelId = panelIdRef.current;\n\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.collapsibleB2b();\n\n const isControlled = openProp !== undefined;\n const [openState, setOpenState] = useState(defaultOpen);\n const open = isControlled ? openProp! : openState;\n\n const handleToggle = useCallback(() => {\n const next = !open;\n if (!isControlled) setOpenState(next);\n resolvedOnOpenChange?.(next);\n }, [open, isControlled, resolvedOnOpenChange]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleToggle();\n } else if (e.key === \" \") {\n e.preventDefault();\n }\n },\n [handleToggle]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n const isWhite = view === \"white-surface\";\n const isGrey = view === \"grey-surface\";\n const isWithout = view === \"without-surface\";\n\n // Root is always column — avoids flex-direction flip that breaks width\n const rootStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout ? sizing.surfaceRadius : undefined,\n borderBottom: isWithout\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n const cellStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.triggerGap,\n width: \"100%\",\n minHeight: isWithout ? sizing.triggerMinHeight : undefined,\n padding: !isWithout ? sizing.triggerPadding : 0,\n backgroundColor: isWhite\n ? theme.colors.background.primary\n : isGrey\n ? theme.colors.overlay.mono\n : undefined,\n borderRadius: !isWithout\n ? open\n ? `${sizing.cellRadius}px ${sizing.cellRadius}px 0 0`\n : sizing.cellRadius\n : undefined,\n borderBottom: open\n ? `1px solid ${theme.colors.border.secondary}`\n : undefined,\n };\n\n // grid-template-rows trick: 0fr (collapsed) ↔ 1fr (expanded)\n // The inner div has overflow:hidden so content is clipped during transition\n const panelGridStyle: React.CSSProperties = {\n display: \"grid\",\n gridTemplateRows: open ? \"1fr\" : \"0fr\",\n transition: PANEL_TRANSITION,\n width: \"100%\",\n };\n\n const panelInnerStyle: React.CSSProperties = {\n overflow: \"hidden\",\n };\n\n const panelContentStyle: React.CSSProperties = {\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: sizing.panelPadding,\n };\n\n return (\n <Box\n ref={ref}\n testID={testID || \"collapsible\"}\n data-open={open}\n className={className}\n width=\"100%\"\n style={rootStyle}\n {...rest}\n >\n {/* Trigger */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={open}\n aria-controls={panelId}\n aria-label={\n ariaLabel ?? (typeof title === \"string\" ? title : undefined)\n }\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n style={{ boxSizing: \"border-box\", width: \"100%\", cursor: \"pointer\" }}\n >\n <div style={cellStyle}>\n {/* Left icon slot — consumer is responsible for icon/checkbox styling */}\n {icon && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ flexShrink: 0, display: \"flex\", alignItems: \"center\" }}\n >\n {icon}\n </div>\n )}\n\n {/* Title + caption */}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: sizing.textGap,\n minWidth: 0,\n }}\n >\n {typeof title === \"string\" || typeof title === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={sizing.titleFontSize}\n lineHeight={sizing.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n ) : (\n title\n )}\n {caption !== undefined &&\n (typeof caption === \"string\" || typeof caption === \"number\" ? (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n fontWeight=\"400\"\n >\n {caption}\n </Text>\n ) : (\n caption\n ))}\n </div>\n\n {/* Trailing slot + animated chevron */}\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: sizing.trailingGap,\n flexShrink: 0,\n }}\n >\n {trailing && (\n <div\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n onKeyUp={(e) => e.stopPropagation()}\n style={{ display: \"flex\", alignItems: \"center\" }}\n >\n {trailing}\n </div>\n )}\n <div\n style={{\n transform: open ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: CHEVRON_TRANSITION,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Icon\n color={theme.colors.content.primary}\n size={sizing.chevronSize}\n >\n <ChevronDown />\n </Icon>\n </div>\n </div>\n </div>\n </div>\n\n {/* Animated panel using grid-template-rows trick */}\n <div id={panelId} style={panelGridStyle}>\n <div style={panelInnerStyle}>\n <div style={panelContentStyle}>{children}</div>\n </div>\n </div>\n </Box>\n );\n }\n);\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n onError={onError}\n onLoad={onLoad}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n testID,\n \"data-testid\": dataTestId,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n data-testid={dataTestId || testID}\n />\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({\n children,\n testID,\n \"data-testid\": dataTestId,\n ...props\n}) => {\n return (\n <StyledIcon data-testid={dataTestId || testID} {...props}>\n {children}\n </StyledIcon>\n );\n};\n"],"mappings":";AAAA,SAAS,YAAY,UAAU,aAAa,cAAc;;;ACA1D,OAAOA,YAAW;AAClB,OAAO,YAAY;;;ACDnB,OAAO,WAAW;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAAC,IAAI;AAAA,EAC1B;AAAA;AAEA;AAEA,IAAO,4BAAQ;;;AFRR,IAAM,2BAA2B,oBAAI,IAAI;AAAA;AAAA,EAE9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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