@xsolla/xui-notification-panel 0.104.0 → 0.105.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 CHANGED
@@ -53,6 +53,7 @@ export default function NotificationPanelTypes() {
53
53
  ```tsx
54
54
  import * as React from 'react';
55
55
  import { NotificationPanel } from '@xsolla/xui-notification-panel';
56
+ import { Button } from '@xsolla/xui-button';
56
57
 
57
58
  export default function ActionNotificationPanel() {
58
59
  return (
@@ -60,32 +61,64 @@ export default function ActionNotificationPanel() {
60
61
  type="warning"
61
62
  title="Session Expiring"
62
63
  description="Your session will expire in 5 minutes."
63
- actionLabel="Extend Session"
64
- actionProps={{ onPress: () => console.log('Session extended') }}
64
+ actionButton={
65
+ <Button onPress={() => console.log('Session extended')}>
66
+ Extend Session
67
+ </Button>
68
+ }
65
69
  onClose={() => console.log('Dismissed')}
66
70
  />
67
71
  );
68
72
  }
69
73
  ```
70
74
 
71
- ### With Button Icon and Divider
75
+ ### With Button Icon Right
72
76
 
73
77
  ```tsx
74
78
  import * as React from 'react';
75
79
  import { NotificationPanel } from '@xsolla/xui-notification-panel';
76
- import { ArrowRight } from '@xsolla/xui-icons-base';
80
+ import { Button } from '@xsolla/xui-button';
81
+ import { ArrowRight } from '@xsolla/xui-icons';
77
82
 
78
83
  export default function IconButtonNotificationPanel() {
79
84
  return (
80
85
  <NotificationPanel
81
86
  type="neutral"
82
87
  description="Check our guide to view all webhooks"
83
- actionLabel="Open documentation"
84
- actionProps={{
85
- iconRight: <ArrowRight />,
86
- divider: true,
87
- onPress: () => console.log('Open docs'),
88
- }}
88
+ actionButton={
89
+ <Button
90
+ iconRight={<ArrowRight />}
91
+ onPress={() => console.log('Open docs')}
92
+ >
93
+ Open documentation
94
+ </Button>
95
+ }
96
+ />
97
+ );
98
+ }
99
+ ```
100
+
101
+ ### With IconButton
102
+
103
+ ```tsx
104
+ import * as React from 'react';
105
+ import { NotificationPanel } from '@xsolla/xui-notification-panel';
106
+ import { IconButton } from '@xsolla/xui-button';
107
+ import { ArrowRight } from '@xsolla/xui-icons';
108
+
109
+ export default function IconButtonNotificationPanel() {
110
+ return (
111
+ <NotificationPanel
112
+ type="neutral"
113
+ title="Quick action available"
114
+ description="Click the arrow to view more details"
115
+ actionButton={
116
+ <IconButton
117
+ icon={<ArrowRight />}
118
+ onPress={() => console.log('Navigate')}
119
+ />
120
+ }
121
+ showCloseButton={false}
89
122
  />
90
123
  );
91
124
  }
@@ -172,22 +205,20 @@ export default function PersistentNotificationPanel() {
172
205
  | description | `string` | - | Description text (optional). |
173
206
  | showIcon | `boolean` | `true` | Show/hide the icon frame. |
174
207
  | icon | `React.ReactNode` | - | Custom icon override (optional). |
175
- | actionLabel | `string` | - | Action button label (hides button if not provided). |
176
- | actionProps | `ActionButtonProps` | - | Additional props to pass to the action Button. |
208
+ | actionButton | `React.ReactElement` | - | Action button (Button or IconButton). `tone`, `size`, and `variant` are auto-applied. |
177
209
  | showCloseButton | `boolean` | `true` | Show/hide close button. |
178
210
  | onClose | `() => void` | - | Close button click handler. |
179
211
  | testID | `string` | - | Test ID for testing frameworks. |
180
212
 
181
- ### ActionButtonProps
213
+ ### Auto-Applied Button Props
182
214
 
183
- `ActionButtonProps` extends `ButtonProps` but excludes `children`, `size`, `variant`, and `tone` which are controlled by NotificationPanel.
215
+ When passing a `Button` or `IconButton` to `actionButton`, the following props are automatically injected:
184
216
 
185
- | Prop | Type | Description |
186
- | :--- | :--- | :---------- |
187
- | onPress | `() => void` | Button press handler. |
188
- | iconRight | `React.ReactNode` | Icon to display on the right side of the button. |
189
- | divider | `boolean` | Show divider between button text and icon. |
190
- | disabled | `boolean` | Disable the button. |
217
+ | Prop | Value | Description |
218
+ | :--- | :---- | :---------- |
219
+ | tone | Based on `type` | Matches notification type (see table below). |
220
+ | size | `"xs"` | Extra small size for compact appearance. |
221
+ | variant | `"secondary"` | Secondary button variant. |
191
222
 
192
223
  ### Type Values
193
224
 
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
- import { ButtonProps } from '@xsolla/xui-button';
3
2
 
4
- /** Props for the action button, excluding children which is set via actionLabel */
5
- type ActionButtonProps = Omit<ButtonProps, "children" | "size" | "variant" | "tone">;
6
3
  interface NotificationPanelProps {
7
4
  /** Visual variant/tone of the notification */
8
5
  type?: "alert" | "warning" | "success" | "neutral" | "brand";
@@ -14,25 +11,18 @@ interface NotificationPanelProps {
14
11
  showIcon?: boolean;
15
12
  /** Custom icon override (optional) */
16
13
  icon?: React.ReactNode;
17
- /** Action button label (optional - hides button if not provided) */
18
- actionLabel?: string;
19
14
  /**
20
- * Additional props to pass to the action Button component.
21
- * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).
22
- * Use this to add icons, dividers, or other Button customizations.
15
+ * Action button (optional - pass any Button/IconButton component).
16
+ * The `tone`, `size`, and `variant` props will be automatically set.
23
17
  * @example
24
18
  * ```tsx
25
19
  * <NotificationPanel
26
- * actionLabel="Open documentation"
27
- * actionProps={{
28
- * iconRight: <ArrowRight />,
29
- * divider: true,
30
- * onPress: () => openDocs()
31
- * }}
20
+ * type="alert"
21
+ * actionButton={<Button onPress={handleAction}>Open documentation</Button>}
32
22
  * />
33
23
  * ```
34
24
  */
35
- actionProps?: ActionButtonProps;
25
+ actionButton?: React.ReactElement;
36
26
  /** Show/hide close button */
37
27
  showCloseButton?: boolean;
38
28
  /** Close button click handler */
@@ -60,24 +50,18 @@ interface NotificationPanelProps {
60
50
  * type="success"
61
51
  * title="Success!"
62
52
  * description="Your changes have been saved."
63
- * actionLabel="Undo"
64
- * actionProps={{ onPress: () => handleUndo() }}
53
+ * actionButton={<Button onPress={() => {}}>Undo</Button>}
65
54
  * onClose={() => dismiss()}
66
55
  * />
67
56
  *
68
- * // With button icon and divider
57
+ * // With IconButton
69
58
  * <NotificationPanel
70
59
  * type="warning"
71
60
  * description="Check our guide to view all webhooks"
72
- * actionLabel="Open documentation"
73
- * actionProps={{
74
- * iconRight: <ArrowRight />,
75
- * divider: true,
76
- * onPress: () => openDocs()
77
- * }}
61
+ * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}
78
62
  * />
79
63
  * ```
80
64
  */
81
65
  declare const NotificationPanel: React.FC<NotificationPanelProps>;
82
66
 
83
- export { type ActionButtonProps, NotificationPanel, type NotificationPanelProps };
67
+ export { NotificationPanel, type NotificationPanelProps };
package/native/index.d.ts CHANGED
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
- import { ButtonProps } from '@xsolla/xui-button';
3
2
 
4
- /** Props for the action button, excluding children which is set via actionLabel */
5
- type ActionButtonProps = Omit<ButtonProps, "children" | "size" | "variant" | "tone">;
6
3
  interface NotificationPanelProps {
7
4
  /** Visual variant/tone of the notification */
8
5
  type?: "alert" | "warning" | "success" | "neutral" | "brand";
@@ -14,25 +11,18 @@ interface NotificationPanelProps {
14
11
  showIcon?: boolean;
15
12
  /** Custom icon override (optional) */
16
13
  icon?: React.ReactNode;
17
- /** Action button label (optional - hides button if not provided) */
18
- actionLabel?: string;
19
14
  /**
20
- * Additional props to pass to the action Button component.
21
- * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).
22
- * Use this to add icons, dividers, or other Button customizations.
15
+ * Action button (optional - pass any Button/IconButton component).
16
+ * The `tone`, `size`, and `variant` props will be automatically set.
23
17
  * @example
24
18
  * ```tsx
25
19
  * <NotificationPanel
26
- * actionLabel="Open documentation"
27
- * actionProps={{
28
- * iconRight: <ArrowRight />,
29
- * divider: true,
30
- * onPress: () => openDocs()
31
- * }}
20
+ * type="alert"
21
+ * actionButton={<Button onPress={handleAction}>Open documentation</Button>}
32
22
  * />
33
23
  * ```
34
24
  */
35
- actionProps?: ActionButtonProps;
25
+ actionButton?: React.ReactElement;
36
26
  /** Show/hide close button */
37
27
  showCloseButton?: boolean;
38
28
  /** Close button click handler */
@@ -60,24 +50,18 @@ interface NotificationPanelProps {
60
50
  * type="success"
61
51
  * title="Success!"
62
52
  * description="Your changes have been saved."
63
- * actionLabel="Undo"
64
- * actionProps={{ onPress: () => handleUndo() }}
53
+ * actionButton={<Button onPress={() => {}}>Undo</Button>}
65
54
  * onClose={() => dismiss()}
66
55
  * />
67
56
  *
68
- * // With button icon and divider
57
+ * // With IconButton
69
58
  * <NotificationPanel
70
59
  * type="warning"
71
60
  * description="Check our guide to view all webhooks"
72
- * actionLabel="Open documentation"
73
- * actionProps={{
74
- * iconRight: <ArrowRight />,
75
- * divider: true,
76
- * onPress: () => openDocs()
77
- * }}
61
+ * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}
78
62
  * />
79
63
  * ```
80
64
  */
81
65
  declare const NotificationPanel: React.FC<NotificationPanelProps>;
82
66
 
83
- export { type ActionButtonProps, NotificationPanel, type NotificationPanelProps };
67
+ export { NotificationPanel, type NotificationPanelProps };
package/native/index.js CHANGED
@@ -24,6 +24,9 @@ __export(index_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(index_exports);
26
26
 
27
+ // src/NotificationPanel.tsx
28
+ var import_react = require("react");
29
+
27
30
  // ../primitives-native/src/Box.tsx
28
31
  var import_react_native = require("react-native");
29
32
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -236,8 +239,7 @@ var NotificationPanel = ({
236
239
  description,
237
240
  showIcon = true,
238
241
  icon,
239
- actionLabel,
240
- actionProps,
242
+ actionButton,
241
243
  showCloseButton = true,
242
244
  onClose,
243
245
  testID
@@ -347,17 +349,12 @@ var NotificationPanel = ({
347
349
  }
348
350
  )
349
351
  ] }),
350
- (actionLabel || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
351
- actionLabel && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
352
- import_xui_button.Button,
353
- {
354
- size: "xs",
355
- variant: "secondary",
356
- tone: currentConfig.buttonTone,
357
- ...actionProps,
358
- children: actionLabel
359
- }
360
- ),
352
+ (actionButton || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
353
+ (0, import_react.isValidElement)(actionButton) && (0, import_react.cloneElement)(actionButton, {
354
+ tone: currentConfig.buttonTone,
355
+ size: "xs",
356
+ variant: "secondary"
357
+ }),
361
358
  showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
362
359
  Box,
363
360
  {
@@ -6,15 +6,6 @@
6
6
  */
7
7
 
8
8
  import React from "react";
9
- import { ButtonProps } from "@xsolla/xui-button";
10
-
11
- /**
12
- * Props for the action button, excluding children which is set via actionLabel
13
- */
14
- declare type ActionButtonProps = $Diff<
15
- ButtonProps,
16
- { children: any, size: any, variant: any, tone: any }
17
- >;
18
9
  declare interface NotificationPanelProps {
19
10
  /**
20
11
  * Visual variant/tone of the notification
@@ -42,26 +33,16 @@ declare interface NotificationPanelProps {
42
33
  icon?: React.ReactNode;
43
34
 
44
35
  /**
45
- * Action button label (optional - hides button if not provided)
46
- */
47
- actionLabel?: string;
48
-
49
- /**
50
- * Additional props to pass to the action Button component.
51
- * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).
52
- * Use this to add icons, dividers, or other Button customizations.
36
+ * Action button (optional - pass any Button/IconButton component).
37
+ * The `tone`, `size`, and `variant` props will be automatically set.
53
38
  * @example ```tsx
54
39
  * <NotificationPanel
55
- * actionLabel="Open documentation"
56
- * actionProps={{
57
- * iconRight: <ArrowRight />,
58
- * divider: true,
59
- * onPress: () => openDocs()
60
- * }}
40
+ * type="alert"
41
+ * actionButton={<Button onPress={handleAction}>Open documentation</Button>}
61
42
  * />
62
43
  * ```
63
44
  */
64
- actionProps?: ActionButtonProps;
45
+ actionButton?: React.ReactElement;
65
46
 
66
47
  /**
67
48
  * Show/hide close button
@@ -98,24 +79,18 @@ declare interface NotificationPanelProps {
98
79
  * type="success"
99
80
  * title="Success!"
100
81
  * description="Your changes have been saved."
101
- * actionLabel="Undo"
102
- * actionProps={{ onPress: () => handleUndo() }}
82
+ * actionButton={<Button onPress={() => {}}>Undo</Button>}
103
83
  * onClose={() => dismiss()}
104
84
  * />
105
85
  *
106
- * // With button icon and divider
86
+ * // With IconButton
107
87
  * <NotificationPanel
108
88
  * type="warning"
109
89
  * description="Check our guide to view all webhooks"
110
- * actionLabel="Open documentation"
111
- * actionProps={{
112
- * iconRight: <ArrowRight />,
113
- * divider: true,
114
- * onPress: () => openDocs()
115
- * }}
90
+ * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}
116
91
  * />
117
92
  * ```
118
93
  */
119
94
  declare var NotificationPanel: React.FC<NotificationPanelProps>;
120
- export type { ActionButtonProps, NotificationPanelProps };
95
+ export type { NotificationPanelProps };
121
96
  declare export { NotificationPanel };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../src/NotificationPanel.tsx"],"sourcesContent":["export { NotificationPanel } from \"./NotificationPanel\";\nexport type {\n NotificationPanelProps,\n ActionButtonProps,\n} from \"./NotificationPanel\";\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 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 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 { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, fall back to the system font\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n 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 };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport { Button, FlexButton, type ButtonProps } from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\n/** Props for the action button, excluding children which is set via actionLabel */\nexport type ActionButtonProps = Omit<\n ButtonProps,\n \"children\" | \"size\" | \"variant\" | \"tone\"\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /** Action button label (optional - hides button if not provided) */\n actionLabel?: string;\n /**\n * Additional props to pass to the action Button component.\n * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).\n * Use this to add icons, dividers, or other Button customizations.\n * @example\n * ```tsx\n * <NotificationPanel\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\n actionProps?: ActionButtonProps;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionLabel=\"Undo\"\n * actionProps={{ onPress: () => handleUndo() }}\n * onClose={() => dismiss()}\n * />\n *\n * // With button icon and divider\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionLabel,\n actionProps,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionLabel || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {actionLabel && (\n <Button\n size=\"xs\"\n variant=\"secondary\"\n tone={currentConfig.buttonTone}\n {...actionProps}\n >\n {actionLabel}\n </Button>\n )}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,0BAQO;AAmID;AAhIC,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,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,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AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["import_react_native","import_jsx_runtime","RNText","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/NotificationPanel.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx"],"sourcesContent":["export { NotificationPanel } from \"./NotificationPanel\";\nexport type { NotificationPanelProps } from \"./NotificationPanel\";\n","import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n FlexButton,\n type ButtonProps,\n type IconButtonProps,\n} from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\nexport type ActionButtonElement = React.ReactElement<\n ButtonProps | IconButtonProps\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /**\n * Action button (optional - pass any Button/IconButton component).\n * The `tone`, `size`, and `variant` props will be automatically set.\n * @example\n * ```tsx\n * <NotificationPanel\n * type=\"alert\"\n * actionButton={<Button onPress={handleAction}>Open documentation</Button>}\n * />\n * ```\n */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionButton={<Button onPress={() => {}}>Undo</Button>}\n * onClose={() => dismiss()}\n * />\n *\n * // With IconButton\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n tone: currentConfig.buttonTone,\n size: \"xs\",\n variant: \"secondary\",\n })}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\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 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 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 { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, fall back to the system font\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n 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 };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAoD;;;ACCpD,0BAQO;AAmID;AAhIC,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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AY,OAAO;AAAA,oBAElB;AAAA;AAAA,gBACH;AAAA,iBAEJ;AAAA,eAGE,gBAAgB,oBAChB,8CAAC,OAAI,eAAc,OAAM,YAAW,UAAS,KAAK,OAAO,YACtD;AAAA,iDAAe,YAAY,SAC1B,2BAAa,cAAqC;AAAA,kBAChD,MAAM,cAAc;AAAA,kBACpB,MAAM;AAAA,kBACN,SAAS;AAAA,gBACX,CAAC;AAAA,gBAEF,mBACC;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,OAAO;AAAA,oBACd,QAAQ,OAAO;AAAA,oBACf,YAAW;AAAA,oBACX,gBAAe;AAAA,oBAEf;AAAA,sBAAC;AAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,MAAK;AAAA,wBACL,SAAS;AAAA,wBACT,cAAW;AAAA,wBACX,WAAW,6CAAC,gCAAO;AAAA,wBACnB,UAAU;AAAA;AAAA,oBACZ;AAAA;AAAA,gBACF;AAAA,iBAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["import_react_native","import_jsx_runtime","RNText","import_jsx_runtime"]}
package/native/index.mjs CHANGED
@@ -1,3 +1,6 @@
1
+ // src/NotificationPanel.tsx
2
+ import { cloneElement, isValidElement } from "react";
3
+
1
4
  // ../primitives-native/src/Box.tsx
2
5
  import {
3
6
  View,
@@ -205,7 +208,9 @@ var Text = ({
205
208
 
206
209
  // src/NotificationPanel.tsx
207
210
  import { useDesignSystem } from "@xsolla/xui-core";
208
- import { Button, FlexButton } from "@xsolla/xui-button";
211
+ import {
212
+ FlexButton
213
+ } from "@xsolla/xui-button";
209
214
  import {
210
215
  ExclamationMarkSq,
211
216
  InfoSq,
@@ -219,8 +224,7 @@ var NotificationPanel = ({
219
224
  description,
220
225
  showIcon = true,
221
226
  icon,
222
- actionLabel,
223
- actionProps,
227
+ actionButton,
224
228
  showCloseButton = true,
225
229
  onClose,
226
230
  testID
@@ -330,17 +334,12 @@ var NotificationPanel = ({
330
334
  }
331
335
  )
332
336
  ] }),
333
- (actionLabel || showCloseButton) && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
334
- actionLabel && /* @__PURE__ */ jsx3(
335
- Button,
336
- {
337
- size: "xs",
338
- variant: "secondary",
339
- tone: currentConfig.buttonTone,
340
- ...actionProps,
341
- children: actionLabel
342
- }
343
- ),
337
+ (actionButton || showCloseButton) && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
338
+ isValidElement(actionButton) && cloneElement(actionButton, {
339
+ tone: currentConfig.buttonTone,
340
+ size: "xs",
341
+ variant: "secondary"
342
+ }),
344
343
  showCloseButton && /* @__PURE__ */ jsx3(
345
344
  Box,
346
345
  {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../src/NotificationPanel.tsx"],"sourcesContent":["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 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 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 { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, fall back to the system font\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n 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 };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport { Button, FlexButton, type ButtonProps } from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\n/** Props for the action button, excluding children which is set via actionLabel */\nexport type ActionButtonProps = Omit<\n ButtonProps,\n \"children\" | \"size\" | \"variant\" | \"tone\"\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /** Action button label (optional - hides button if not provided) */\n actionLabel?: string;\n /**\n * Additional props to pass to the action Button component.\n * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).\n * Use this to add icons, dividers, or other Button customizations.\n * @example\n * ```tsx\n * <NotificationPanel\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\n actionProps?: ActionButtonProps;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionLabel=\"Undo\"\n * actionProps={{ onPress: () => handleUndo() }}\n * onClose={() => dismiss()}\n * />\n *\n * // With button icon and divider\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionLabel,\n actionProps,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionLabel || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {actionLabel && (\n <Button\n size=\"xs\"\n variant=\"secondary\"\n tone={currentConfig.buttonTone}\n {...actionProps}\n >\n {actionLabel}\n </Button>\n )}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\n"],"mappings":";AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAmID;AAhIC,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,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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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AA;AAAA,gBACF;AAAA,iBAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["jsx","jsx"]}
1
+ {"version":3,"sources":["../../src/NotificationPanel.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx"],"sourcesContent":["import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n FlexButton,\n type ButtonProps,\n type IconButtonProps,\n} from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\nexport type ActionButtonElement = React.ReactElement<\n ButtonProps | IconButtonProps\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /**\n * Action button (optional - pass any Button/IconButton component).\n * The `tone`, `size`, and `variant` props will be automatically set.\n * @example\n * ```tsx\n * <NotificationPanel\n * type=\"alert\"\n * actionButton={<Button onPress={handleAction}>Open documentation</Button>}\n * />\n * ```\n */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionButton={<Button onPress={() => {}}>Undo</Button>}\n * onClose={() => dismiss()}\n * />\n *\n * // With IconButton\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n tone: currentConfig.buttonTone,\n size: \"xs\",\n variant: \"secondary\",\n })}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\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 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 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 { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, fall back to the system font\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n 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 };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n"],"mappings":";AAAA,SAAgB,cAAc,sBAAsB;;;ACCpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAmID;AAhIC,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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,OAAO,QAAQ;AAAA,oBAC5B,UAAU,OAAO;AAAA,oBACjB,YAAY,OAAO;AAAA,oBAElB;AAAA;AAAA,gBACH;AAAA,iBAEJ;AAAA,eAGE,gBAAgB,oBAChB,qBAAC,OAAI,eAAc,OAAM,YAAW,UAAS,KAAK,OAAO,YACtD;AAAA,+BAAe,YAAY,KAC1B,aAAa,cAAqC;AAAA,kBAChD,MAAM,cAAc;AAAA,kBACpB,MAAM;AAAA,kBACN,SAAS;AAAA,gBACX,CAAC;AAAA,gBAEF,mBACC,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,OAAO;AAAA,oBACd,QAAQ,OAAO;AAAA,oBACf,YAAW;AAAA,oBACX,gBAAe;AAAA,oBAEf,0BAAAA;AAAA,sBAAC;AAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,MAAK;AAAA,wBACL,SAAS;AAAA,wBACT,cAAW;AAAA,wBACX,WAAW,gBAAAA,KAAC,UAAO;AAAA,wBACnB,UAAU;AAAA;AAAA,oBACZ;AAAA;AAAA,gBACF;AAAA,iBAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["jsx","jsx"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-notification-panel",
3
- "version": "0.104.0",
3
+ "version": "0.105.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,10 +13,10 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-button": "0.104.0",
17
- "@xsolla/xui-core": "0.104.0",
18
- "@xsolla/xui-icons-base": "0.104.0",
19
- "@xsolla/xui-primitives-core": "0.104.0"
16
+ "@xsolla/xui-button": "0.105.0",
17
+ "@xsolla/xui-core": "0.105.0",
18
+ "@xsolla/xui-icons-base": "0.105.0",
19
+ "@xsolla/xui-primitives-core": "0.105.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": ">=16.8.0",
package/web/index.d.mts CHANGED
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
- import { ButtonProps } from '@xsolla/xui-button';
3
2
 
4
- /** Props for the action button, excluding children which is set via actionLabel */
5
- type ActionButtonProps = Omit<ButtonProps, "children" | "size" | "variant" | "tone">;
6
3
  interface NotificationPanelProps {
7
4
  /** Visual variant/tone of the notification */
8
5
  type?: "alert" | "warning" | "success" | "neutral" | "brand";
@@ -14,25 +11,18 @@ interface NotificationPanelProps {
14
11
  showIcon?: boolean;
15
12
  /** Custom icon override (optional) */
16
13
  icon?: React.ReactNode;
17
- /** Action button label (optional - hides button if not provided) */
18
- actionLabel?: string;
19
14
  /**
20
- * Additional props to pass to the action Button component.
21
- * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).
22
- * Use this to add icons, dividers, or other Button customizations.
15
+ * Action button (optional - pass any Button/IconButton component).
16
+ * The `tone`, `size`, and `variant` props will be automatically set.
23
17
  * @example
24
18
  * ```tsx
25
19
  * <NotificationPanel
26
- * actionLabel="Open documentation"
27
- * actionProps={{
28
- * iconRight: <ArrowRight />,
29
- * divider: true,
30
- * onPress: () => openDocs()
31
- * }}
20
+ * type="alert"
21
+ * actionButton={<Button onPress={handleAction}>Open documentation</Button>}
32
22
  * />
33
23
  * ```
34
24
  */
35
- actionProps?: ActionButtonProps;
25
+ actionButton?: React.ReactElement;
36
26
  /** Show/hide close button */
37
27
  showCloseButton?: boolean;
38
28
  /** Close button click handler */
@@ -60,24 +50,18 @@ interface NotificationPanelProps {
60
50
  * type="success"
61
51
  * title="Success!"
62
52
  * description="Your changes have been saved."
63
- * actionLabel="Undo"
64
- * actionProps={{ onPress: () => handleUndo() }}
53
+ * actionButton={<Button onPress={() => {}}>Undo</Button>}
65
54
  * onClose={() => dismiss()}
66
55
  * />
67
56
  *
68
- * // With button icon and divider
57
+ * // With IconButton
69
58
  * <NotificationPanel
70
59
  * type="warning"
71
60
  * description="Check our guide to view all webhooks"
72
- * actionLabel="Open documentation"
73
- * actionProps={{
74
- * iconRight: <ArrowRight />,
75
- * divider: true,
76
- * onPress: () => openDocs()
77
- * }}
61
+ * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}
78
62
  * />
79
63
  * ```
80
64
  */
81
65
  declare const NotificationPanel: React.FC<NotificationPanelProps>;
82
66
 
83
- export { type ActionButtonProps, NotificationPanel, type NotificationPanelProps };
67
+ export { NotificationPanel, type NotificationPanelProps };
package/web/index.d.ts CHANGED
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
- import { ButtonProps } from '@xsolla/xui-button';
3
2
 
4
- /** Props for the action button, excluding children which is set via actionLabel */
5
- type ActionButtonProps = Omit<ButtonProps, "children" | "size" | "variant" | "tone">;
6
3
  interface NotificationPanelProps {
7
4
  /** Visual variant/tone of the notification */
8
5
  type?: "alert" | "warning" | "success" | "neutral" | "brand";
@@ -14,25 +11,18 @@ interface NotificationPanelProps {
14
11
  showIcon?: boolean;
15
12
  /** Custom icon override (optional) */
16
13
  icon?: React.ReactNode;
17
- /** Action button label (optional - hides button if not provided) */
18
- actionLabel?: string;
19
14
  /**
20
- * Additional props to pass to the action Button component.
21
- * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).
22
- * Use this to add icons, dividers, or other Button customizations.
15
+ * Action button (optional - pass any Button/IconButton component).
16
+ * The `tone`, `size`, and `variant` props will be automatically set.
23
17
  * @example
24
18
  * ```tsx
25
19
  * <NotificationPanel
26
- * actionLabel="Open documentation"
27
- * actionProps={{
28
- * iconRight: <ArrowRight />,
29
- * divider: true,
30
- * onPress: () => openDocs()
31
- * }}
20
+ * type="alert"
21
+ * actionButton={<Button onPress={handleAction}>Open documentation</Button>}
32
22
  * />
33
23
  * ```
34
24
  */
35
- actionProps?: ActionButtonProps;
25
+ actionButton?: React.ReactElement;
36
26
  /** Show/hide close button */
37
27
  showCloseButton?: boolean;
38
28
  /** Close button click handler */
@@ -60,24 +50,18 @@ interface NotificationPanelProps {
60
50
  * type="success"
61
51
  * title="Success!"
62
52
  * description="Your changes have been saved."
63
- * actionLabel="Undo"
64
- * actionProps={{ onPress: () => handleUndo() }}
53
+ * actionButton={<Button onPress={() => {}}>Undo</Button>}
65
54
  * onClose={() => dismiss()}
66
55
  * />
67
56
  *
68
- * // With button icon and divider
57
+ * // With IconButton
69
58
  * <NotificationPanel
70
59
  * type="warning"
71
60
  * description="Check our guide to view all webhooks"
72
- * actionLabel="Open documentation"
73
- * actionProps={{
74
- * iconRight: <ArrowRight />,
75
- * divider: true,
76
- * onPress: () => openDocs()
77
- * }}
61
+ * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}
78
62
  * />
79
63
  * ```
80
64
  */
81
65
  declare const NotificationPanel: React.FC<NotificationPanelProps>;
82
66
 
83
- export { type ActionButtonProps, NotificationPanel, type NotificationPanelProps };
67
+ export { NotificationPanel, type NotificationPanelProps };
package/web/index.js CHANGED
@@ -34,6 +34,9 @@ __export(index_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
37
+ // src/NotificationPanel.tsx
38
+ var import_react2 = require("react");
39
+
37
40
  // ../primitives-web/src/Box.tsx
38
41
  var import_react = __toESM(require("react"));
39
42
  var import_styled_components = __toESM(require("styled-components"));
@@ -246,8 +249,7 @@ var NotificationPanel = ({
246
249
  description,
247
250
  showIcon = true,
248
251
  icon,
249
- actionLabel,
250
- actionProps,
252
+ actionButton,
251
253
  showCloseButton = true,
252
254
  onClose,
253
255
  testID
@@ -357,17 +359,12 @@ var NotificationPanel = ({
357
359
  }
358
360
  )
359
361
  ] }),
360
- (actionLabel || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
361
- actionLabel && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
362
- import_xui_button.Button,
363
- {
364
- size: "xs",
365
- variant: "secondary",
366
- tone: currentConfig.buttonTone,
367
- ...actionProps,
368
- children: actionLabel
369
- }
370
- ),
362
+ (actionButton || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
363
+ (0, import_react2.isValidElement)(actionButton) && (0, import_react2.cloneElement)(actionButton, {
364
+ tone: currentConfig.buttonTone,
365
+ size: "xs",
366
+ variant: "secondary"
367
+ }),
371
368
  showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
372
369
  Box,
373
370
  {
package/web/index.js.flow CHANGED
@@ -6,15 +6,6 @@
6
6
  */
7
7
 
8
8
  import React from "react";
9
- import { ButtonProps } from "@xsolla/xui-button";
10
-
11
- /**
12
- * Props for the action button, excluding children which is set via actionLabel
13
- */
14
- declare type ActionButtonProps = $Diff<
15
- ButtonProps,
16
- { children: any, size: any, variant: any, tone: any }
17
- >;
18
9
  declare interface NotificationPanelProps {
19
10
  /**
20
11
  * Visual variant/tone of the notification
@@ -42,26 +33,16 @@ declare interface NotificationPanelProps {
42
33
  icon?: React.ReactNode;
43
34
 
44
35
  /**
45
- * Action button label (optional - hides button if not provided)
46
- */
47
- actionLabel?: string;
48
-
49
- /**
50
- * Additional props to pass to the action Button component.
51
- * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).
52
- * Use this to add icons, dividers, or other Button customizations.
36
+ * Action button (optional - pass any Button/IconButton component).
37
+ * The `tone`, `size`, and `variant` props will be automatically set.
53
38
  * @example ```tsx
54
39
  * <NotificationPanel
55
- * actionLabel="Open documentation"
56
- * actionProps={{
57
- * iconRight: <ArrowRight />,
58
- * divider: true,
59
- * onPress: () => openDocs()
60
- * }}
40
+ * type="alert"
41
+ * actionButton={<Button onPress={handleAction}>Open documentation</Button>}
61
42
  * />
62
43
  * ```
63
44
  */
64
- actionProps?: ActionButtonProps;
45
+ actionButton?: React.ReactElement;
65
46
 
66
47
  /**
67
48
  * Show/hide close button
@@ -98,24 +79,18 @@ declare interface NotificationPanelProps {
98
79
  * type="success"
99
80
  * title="Success!"
100
81
  * description="Your changes have been saved."
101
- * actionLabel="Undo"
102
- * actionProps={{ onPress: () => handleUndo() }}
82
+ * actionButton={<Button onPress={() => {}}>Undo</Button>}
103
83
  * onClose={() => dismiss()}
104
84
  * />
105
85
  *
106
- * // With button icon and divider
86
+ * // With IconButton
107
87
  * <NotificationPanel
108
88
  * type="warning"
109
89
  * description="Check our guide to view all webhooks"
110
- * actionLabel="Open documentation"
111
- * actionProps={{
112
- * iconRight: <ArrowRight />,
113
- * divider: true,
114
- * onPress: () => openDocs()
115
- * }}
90
+ * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}
116
91
  * />
117
92
  * ```
118
93
  */
119
94
  declare var NotificationPanel: React.FC<NotificationPanelProps>;
120
- export type { ActionButtonProps, NotificationPanelProps };
95
+ export type { NotificationPanelProps };
121
96
  declare export { NotificationPanel };
package/web/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx","../../src/NotificationPanel.tsx"],"sourcesContent":["export { NotificationPanel } from \"./NotificationPanel\";\nexport type {\n NotificationPanelProps,\n ActionButtonProps,\n} from \"./NotificationPanel\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<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\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 type,\n disabled,\n id,\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 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 as={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 {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<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 ...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\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport { Button, FlexButton, type ButtonProps } from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\n/** Props for the action button, excluding children which is set via actionLabel */\nexport type ActionButtonProps = Omit<\n ButtonProps,\n \"children\" | \"size\" | \"variant\" | \"tone\"\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /** Action button label (optional - hides button if not provided) */\n actionLabel?: string;\n /**\n * Additional props to pass to the action Button component.\n * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).\n * Use this to add icons, dividers, or other Button customizations.\n * @example\n * ```tsx\n * <NotificationPanel\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\n actionProps?: ActionButtonProps;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionLabel=\"Undo\"\n * actionProps={{ onPress: () => handleUndo() }}\n * onClose={() => dismiss()}\n * />\n *\n * // With button icon and divider\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionLabel,\n actionProps,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionLabel || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {actionLabel && (\n <Button\n size=\"xs\"\n variant=\"secondary\"\n tone={currentConfig.buttonTone}\n {...actionProps}\n >\n {actionLabel}\n </Button>\n )}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAClB,+BAAmB;AAuMX;AApMR,IAAM,YAAY,yBAAAA,QAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,GAAG,MAAM,iBAAiB,OAAO,MAAM,iBAAiB;AAAA,2BACtG,MAAM,qBAAqB,MAAM,eAAe,aAAa;AAAA;AAAA,GAErF;AAAA,IACC,CAAC,UACD,MAAM,mBAAmB,UACzB;AAAA,wBACoB,OAAO,MAAM,mBAAmB,WAAW,GAAG,MAAM,cAAc,OAAO,MAAM,cAAc;AAAA,wBAC7F,MAAM,kBAAkB,MAAM,eAAe,aAAa;AAAA;AAAA,GAE/E;AAAA,IACC,CAAC,UACD,MAAM,oBAAoB,UAC1B;AAAA,yBACqB,OAAO,MAAM,oBAAoB,WAAW,GAAG,MAAM,eAAe,OAAO,MAAM,eAAe;AAAA,yBAChG,MAAM,mBAAmB,MAAM,eAAe,aAAa;AAAA;AAAA,GAEjF;AAAA,IACC,CAAC,U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,oBACR,MAAM,cAAc;AAAA,oBACnB,GAAG;AAAA,oBAEH;AAAA;AAAA,gBACH;AAAA,gBAGD,mBACC;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,OAAO;AAAA,oBACd,QAAQ,OAAO;AAAA,oBACf,YAAW;AAAA,oBACX,gBAAe;AAAA,oBAEf;AAAA,sBAAC;AAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,MAAK;AAAA,wBACL,SAAS;AAAA,wBACT,cAAW;AAAA,wBACX,WAAW,6CAAC,gCAAO;AAAA,wBACnB,UAAU;AAAA;AAAA,oBACZ;AAAA;AAAA,gBACF;AAAA,iBAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["styled","React","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/NotificationPanel.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["export { NotificationPanel } from \"./NotificationPanel\";\nexport type { NotificationPanelProps } from \"./NotificationPanel\";\n","import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n FlexButton,\n type ButtonProps,\n type IconButtonProps,\n} from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\nexport type ActionButtonElement = React.ReactElement<\n ButtonProps | IconButtonProps\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /**\n * Action button (optional - pass any Button/IconButton component).\n * The `tone`, `size`, and `variant` props will be automatically set.\n * @example\n * ```tsx\n * <NotificationPanel\n * type=\"alert\"\n * actionButton={<Button onPress={handleAction}>Open documentation</Button>}\n * />\n * ```\n */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionButton={<Button onPress={() => {}}>Undo</Button>}\n * onClose={() => dismiss()}\n * />\n *\n * // With IconButton\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n tone: currentConfig.buttonTone,\n size: \"xs\",\n variant: \"secondary\",\n })}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<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\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 type,\n disabled,\n id,\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 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 as={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 {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<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 ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\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AW,6CAAC,gCAAO;AAAA,wBACnB,UAAU;AAAA;AAAA,oBACZ;AAAA;AAAA,gBACF;AAAA,iBAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["import_react","styled","React","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime"]}
package/web/index.mjs CHANGED
@@ -1,3 +1,6 @@
1
+ // src/NotificationPanel.tsx
2
+ import { cloneElement, isValidElement } from "react";
3
+
1
4
  // ../primitives-web/src/Box.tsx
2
5
  import React from "react";
3
6
  import styled from "styled-components";
@@ -201,7 +204,9 @@ var Text = ({
201
204
 
202
205
  // src/NotificationPanel.tsx
203
206
  import { useDesignSystem } from "@xsolla/xui-core";
204
- import { Button, FlexButton } from "@xsolla/xui-button";
207
+ import {
208
+ FlexButton
209
+ } from "@xsolla/xui-button";
205
210
  import {
206
211
  ExclamationMarkSq,
207
212
  InfoSq,
@@ -215,8 +220,7 @@ var NotificationPanel = ({
215
220
  description,
216
221
  showIcon = true,
217
222
  icon,
218
- actionLabel,
219
- actionProps,
223
+ actionButton,
220
224
  showCloseButton = true,
221
225
  onClose,
222
226
  testID
@@ -326,17 +330,12 @@ var NotificationPanel = ({
326
330
  }
327
331
  )
328
332
  ] }),
329
- (actionLabel || showCloseButton) && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
330
- actionLabel && /* @__PURE__ */ jsx3(
331
- Button,
332
- {
333
- size: "xs",
334
- variant: "secondary",
335
- tone: currentConfig.buttonTone,
336
- ...actionProps,
337
- children: actionLabel
338
- }
339
- ),
333
+ (actionButton || showCloseButton) && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: config.buttonsGap, children: [
334
+ isValidElement(actionButton) && cloneElement(actionButton, {
335
+ tone: currentConfig.buttonTone,
336
+ size: "xs",
337
+ variant: "secondary"
338
+ }),
340
339
  showCloseButton && /* @__PURE__ */ jsx3(
341
340
  Box,
342
341
  {
package/web/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx","../../src/NotificationPanel.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<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\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 type,\n disabled,\n id,\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 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 as={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 {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<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 ...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\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport { Button, FlexButton, type ButtonProps } from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\n/** Props for the action button, excluding children which is set via actionLabel */\nexport type ActionButtonProps = Omit<\n ButtonProps,\n \"children\" | \"size\" | \"variant\" | \"tone\"\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /** Action button label (optional - hides button if not provided) */\n actionLabel?: string;\n /**\n * Additional props to pass to the action Button component.\n * Supports all Button props except children, size, variant, and tone (which are controlled by NotificationPanel).\n * Use this to add icons, dividers, or other Button customizations.\n * @example\n * ```tsx\n * <NotificationPanel\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\n actionProps?: ActionButtonProps;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionLabel=\"Undo\"\n * actionProps={{ onPress: () => handleUndo() }}\n * onClose={() => dismiss()}\n * />\n *\n * // With button icon and divider\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionLabel=\"Open documentation\"\n * actionProps={{\n * iconRight: <ArrowRight />,\n * divider: true,\n * onPress: () => openDocs()\n * }}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionLabel,\n actionProps,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionLabel || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {actionLabel && (\n <Button\n size=\"xs\"\n variant=\"secondary\"\n tone={currentConfig.buttonTone}\n {...actionProps}\n >\n {actionLabel}\n </Button>\n )}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\n"],"mappings":";AAAA,OAAO,WAAW;AAClB,OAAO,YAAY;AAuMX;AApMR,IAAM,YAAY,OAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,W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AAAA,YACxB,KAAK,OAAO;AAAA,YAGZ;AAAA,mCAAC,OAAI,MAAM,GAAG,KAAK,OAAO,SACvB;AAAA,yBACC,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,MAAM,OAAO,QAAQ;AAAA,oBAC5B,UAAU,OAAO;AAAA,oBACjB,YAAY,OAAO;AAAA,oBACnB,YAAW;AAAA,oBAEV;AAAA;AAAA,gBACH;AAAA,gBAED,eACC,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,MAAM,OAAO,QAAQ;AAAA,oBAC5B,UAAU,OAAO;AAAA,oBACjB,YAAY,OAAO;AAAA,oBAElB;AAAA;AAAA,gBACH;AAAA,iBAEJ;AAAA,eAGE,eAAe,oBACf,qBAAC,OAAI,eAAc,OAAM,YAAW,UAAS,KAAK,OAAO,YACtD;AAAA,+BACC,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,SAAQ;AAAA,oBACR,MAAM,cAAc;AAAA,oBACnB,GAAG;AAAA,oBAEH;AAAA;AAAA,gBACH;AAAA,gBAGD,mBACC,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,OAAO;AAAA,oBACd,QAAQ,OAAO;AAAA,oBACf,YAAW;AAAA,oBACX,gBAAe;AAAA,oBAEf,0BAAAA;AAAA,sBAAC;AAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,MAAK;AAAA,wBACL,SAAS;AAAA,wBACT,cAAW;AAAA,wBACX,WAAW,gBAAAA,KAAC,UAAO;AAAA,wBACnB,UAAU;AAAA;AAAA,oBACZ;AAAA;AAAA,gBACF;AAAA,iBAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["styled","jsx","jsx"]}
1
+ {"version":3,"sources":["../../src/NotificationPanel.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n FlexButton,\n type ButtonProps,\n type IconButtonProps,\n} from \"@xsolla/xui-button\";\nimport {\n ExclamationMarkSq,\n InfoSq,\n CheckCr,\n Remove,\n type BaseIconComponent,\n} from \"@xsolla/xui-icons-base\";\n\nexport type ActionButtonElement = React.ReactElement<\n ButtonProps | IconButtonProps\n>;\n\nexport interface NotificationPanelProps {\n /** Visual variant/tone of the notification */\n type?: \"alert\" | \"warning\" | \"success\" | \"neutral\" | \"brand\";\n /** Title text (optional) */\n title?: string;\n /** Description text (optional) */\n description?: string;\n /** Show/hide the icon frame */\n showIcon?: boolean;\n /** Custom icon override (optional) */\n icon?: React.ReactNode;\n /**\n * Action button (optional - pass any Button/IconButton component).\n * The `tone`, `size`, and `variant` props will be automatically set.\n * @example\n * ```tsx\n * <NotificationPanel\n * type=\"alert\"\n * actionButton={<Button onPress={handleAction}>Open documentation</Button>}\n * />\n * ```\n */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Test ID for testing frameworks */\n testID?: string;\n}\n\n/**\n * NotificationPanel - A full-width notification bar for displaying contextual feedback.\n *\n * Unlike the Notification component (designed for toast popups), NotificationPanel\n * is a horizontal banner intended for persistent inline notifications within page layouts.\n *\n * ## Features\n * - 5 visual variants: alert, warning, success, neutral, brand\n * - Optional icon frame with type-specific coloring\n * - Optional action button with type-matched styling\n * - Optional close button\n * - Accessible: uses role=\"status\" for screen reader announcements\n *\n * ## Usage\n * ```tsx\n * // Simple usage\n * <NotificationPanel\n * type=\"success\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * actionButton={<Button onPress={() => {}}>Undo</Button>}\n * onClose={() => dismiss()}\n * />\n *\n * // With IconButton\n * <NotificationPanel\n * type=\"warning\"\n * description=\"Check our guide to view all webhooks\"\n * actionButton={<IconButton icon={<ArrowRight />} onPress={() => {}} />}\n * />\n * ```\n */\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n const config = theme.sizing.notificationPanel();\n\n // Type-specific styling configuration\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n iconFrameBg: string;\n iconColor: string;\n buttonTone: \"brand\" | \"brandExtra\" | \"alert\" | \"mono\";\n IconComponent: BaseIconComponent;\n }\n > = {\n alert: {\n panelBg: theme.colors.overlay.alert,\n iconFrameBg: theme.colors.overlay.alert,\n iconColor: theme.colors.content.primary,\n buttonTone: \"alert\",\n IconComponent: ExclamationMarkSq,\n },\n warning: {\n panelBg: theme.colors.overlay.warning,\n iconFrameBg: theme.colors.background.warning.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: ExclamationMarkSq,\n },\n success: {\n panelBg: theme.colors.overlay.success,\n iconFrameBg: theme.colors.background.success.primary,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brandExtra\",\n IconComponent: CheckCr,\n },\n neutral: {\n panelBg: theme.colors.overlay.mono,\n iconFrameBg: theme.colors.overlay.mono,\n iconColor: theme.colors.content.primary,\n buttonTone: \"mono\",\n IconComponent: InfoSq,\n },\n brand: {\n panelBg: theme.colors.overlay.brand,\n iconFrameBg: theme.colors.overlay.brand,\n iconColor: theme.colors.content.primary,\n buttonTone: \"brand\",\n IconComponent: InfoSq,\n },\n };\n\n const currentConfig = typeConfig[type];\n const IconComponent = currentConfig.IconComponent;\n\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n overflow=\"hidden\"\n testID={testID}\n role=\"status\"\n aria-label={`${type} notification`}\n >\n {/* Icon Frame */}\n {showIcon && (\n <Box\n backgroundColor={currentConfig.iconFrameBg}\n width={config.iconFrameWidth}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={{\n borderTopLeftRadius: config.borderRadius,\n borderBottomLeftRadius: config.borderRadius,\n }}\n >\n {icon || (\n <IconComponent\n size={config.iconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n {/* Body */}\n <Box\n flex={1}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={config.bodyPaddingHorizontal}\n paddingVertical={config.bodyPaddingVertical}\n gap={config.contentGap}\n >\n {/* Text Content */}\n <Box flex={1} gap={config.textGap}>\n {title && (\n <Text\n color={theme.colors.content.primary}\n fontSize={config.titleFontSize}\n lineHeight={config.titleLineHeight}\n fontWeight=\"500\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={theme.colors.content.tertiary}\n fontSize={config.descriptionFontSize}\n lineHeight={config.descriptionLineHeight}\n >\n {description}\n </Text>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={config.buttonsGap}>\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n tone: currentConfig.buttonTone,\n size: \"xs\",\n variant: \"secondary\",\n })}\n\n {showCloseButton && (\n <Box\n width={config.closeButtonSize}\n height={config.closeButtonSize}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <FlexButton\n variant=\"primary\"\n size=\"sm\"\n onPress={onClose}\n aria-label=\"Close notification\"\n iconRight={<Remove />}\n children={null}\n />\n </Box>\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nNotificationPanel.displayName = \"NotificationPanel\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<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\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 type,\n disabled,\n id,\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 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 as={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 {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<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 ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";AAAA,SAAgB,cAAc,sBAAsB;;;ACApD,OAAO,WAAW;AAClB,OAAO,YAAY;AAuMX;AApMR,IAAM,YAAY,OAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,GAAG,MAAM,iBAAiB,OAAO,MAAM,iBAAiB;AAAA,2BACtG,MAAM,qBAAqB,MAAM,eAAe,aAAa;AAAA;AAAA,GAErF;AAAA,IACC,CAAC,UACD,MAAM,mBAAmB,UACzB;AAAA,wBACoB,OAAO,MAAM,mBAAmB,WAAW,GAAG,MAAM,cAAc,OAAO,MAAM,cAAc;AAAA,wBAC7F,MAAM,kBAAkB,MAAM,eAAe,aAAa;AAAA;AAAA,GAE/E;AAAA,IACC,CAAC,UACD,MAAM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