@xsolla/xui-b2b-notification-panel 0.190.0 → 0.192.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 +34 -11
- package/native/index.d.mts +19 -4
- package/native/index.d.ts +19 -4
- package/native/index.js +237 -53
- package/native/index.js.map +1 -1
- package/native/index.mjs +237 -53
- package/native/index.mjs.map +1 -1
- package/package.json +6 -6
- package/web/index.d.mts +19 -4
- package/web/index.d.ts +19 -4
- package/web/index.js +237 -53
- package/web/index.js.map +1 -1
- package/web/index.mjs +237 -53
- package/web/index.mjs.map +1 -1
package/native/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../src/NotificationPanel.tsx","../../../../foundation/primitives-native/src/Box.tsx"],"sourcesContent":["export { NotificationPanel } from \"./NotificationPanel\";\nexport type {\n NotificationPanelProps,\n ActionButtonElement,\n} from \"./NotificationPanel\";\n","import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport {\n IconButton,\n type ButtonProps,\n type IconButtonProps,\n type FlexButtonProps,\n} from \"@xsolla/xui-button\";\nimport { Typography } from \"@xsolla/xui-typography\";\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 | FlexButtonProps\n>;\n\nexport interface NotificationPanelProps extends ThemeOverrideProps {\n /**\n * Layout variant.\n * - `notification` (default): full-height banner with an icon frame and a\n * stacked title/description.\n * - `announcement`: slim, single-line bar with an inline icon and the\n * title/description on one row.\n */\n variant?: \"notification\" | \"announcement\";\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 */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Vertical alignment of the close button — \"top\" (default) or \"center\" */\n closeButtonAlign?: \"center\" | \"top\";\n testID?: string;\n}\n\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n variant = \"notification\",\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n closeButtonAlign = \"top\",\n testID,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const config = theme.sizing.notificationPanel();\n\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n /** Background of the slim announcement bar (and inline icon area). */\n announcementBg: 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 announcementBg: theme.colors.background.alert.secondary,\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 announcementBg: theme.colors.background.warning.secondary,\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 announcementBg: theme.colors.background.success.secondary,\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 announcementBg: theme.colors.background.neutral.secondary,\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 announcementBg: theme.colors.background.brand.secondary,\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 const ariaProps = {\n role: type === \"alert\" ? \"alert\" : \"status\",\n \"aria-label\": `${type} ${variant}`,\n } as const;\n\n if (variant === \"announcement\") {\n return (\n <Box\n backgroundColor={currentConfig.announcementBg}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n padding={config.announcementPadding}\n gap={config.announcementGap}\n overflow=\"hidden\"\n testID={testID}\n style={{\n backdropFilter: `blur(${config.announcementBlurRadius}px)`,\n }}\n {...ariaProps}\n >\n {/* Inline content: icon + title + description on a single row */}\n <Box\n flex={1}\n minWidth={0}\n overflow=\"hidden\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementContentGap}\n >\n {showIcon &&\n (icon || (\n <IconComponent\n size={config.announcementIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n ))}\n {title && (\n <Typography\n variant=\"bodyXsAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"bodyXs\" color={theme.colors.content.secondary}>\n {description}\n </Typography>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box\n flexShrink={0}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementButtonsGap}\n >\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n size: \"xs\",\n // Announcement uses a text-only FlexButton (Primary palette →\n // content.primary text, no fill), per the Figma \"Flex Button\"\n // node. hoverBackground is left at its default so the subtle\n // mono hover overlay from the design is preserved.\n variant: \"primary\",\n background: false,\n })}\n\n {showCloseButton && (\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"xs\"\n onPress={onClose}\n aria-label=\"Close notification\"\n icon={<Remove size={config.announcementCloseIconSize} />}\n hoverBackground=\"none\"\n />\n )}\n </Box>\n )}\n </Box>\n );\n }\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 {...ariaProps}\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 <Typography\n variant=\"bodyMdAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"bodySm\" color={theme.colors.content.tertiary}>\n {description}\n </Typography>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box\n flexDirection=\"row\"\n alignSelf={closeButtonAlign === \"top\" ? \"stretch\" : \"center\"}\n alignItems={closeButtonAlign === \"top\" ? \"flex-start\" : \"center\"}\n justifyContent=\"flex-start\"\n paddingVertical={closeButtonAlign === \"top\" ? 4 : 0}\n gap={config.buttonsGap}\n >\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n size: \"xs\",\n variant: \"tertiary\",\n tone: \"mono\",\n })}\n\n {showCloseButton && (\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"xs\"\n onPress={onClose}\n aria-label=\"Close notification\"\n icon={<Remove size={18} />}\n hoverBackground=\"none\"\n />\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 minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAoD;;;ACCpD,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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,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ACV;AAAA;AAAA,QAEJ;AAAA,QAIF;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,eAAc;AAAA,YACd,YAAW;AAAA,YACX,mBAAmB,OAAO;AAAA,YAC1B,iBAAiB,OAAO;AAAA,YACxB,KAAK,OAAO;AAAA,YAGZ;AAAA,4DAAC,OAAI,MAAM,GAAG,KAAK,OAAO,SACvB;AAAA,yBACC;AAAA,kBAAC;AAAA;AAAA,oBACC,SAAQ;AAAA,oBACR,OAAO,MAAM,OAAO,QAAQ;AAAA,oBAE3B;AAAA;AAAA,gBACH;AAAA,gBAED,eACC,6CAAC,oCAAW,SAAQ,UAAS,OAAO,MAAM,OAAO,QAAQ,UACtD,uBACH;AAAA,iBAEJ;AAAA,eAGE,gBAAgB,oBAChB;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAc;AAAA,kBACd,WAAW,qBAAqB,QAAQ,YAAY;AAAA,kBACpD,YAAY,qBAAqB,QAAQ,eAAe;AAAA,kBACxD,gBAAe;AAAA,kBACf,iBAAiB,qBAAqB,QAAQ,IAAI;AAAA,kBAClD,KAAK,OAAO;AAAA,kBAEX;AAAA,qDAAe,YAAY,SAC1B,2BAAa,cAAqC;AAAA,sBAChD,MAAM;AAAA,sBACN,SAAS;AAAA,sBACT,MAAM;AAAA,oBACR,CAAC;AAAA,oBAEF,mBACC;AAAA,sBAAC;AAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,MAAK;AAAA,wBACL,MAAK;AAAA,wBACL,SAAS;AAAA,wBACT,cAAW;AAAA,wBACX,MAAM,6CAAC,gCAAO,MAAM,IAAI;AAAA,wBACxB,iBAAgB;AAAA;AAAA,oBAClB;AAAA;AAAA;AAAA,cAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/NotificationPanel.tsx","../../../../foundation/primitives-native/src/Box.tsx"],"sourcesContent":["export { NotificationPanel } from \"./NotificationPanel\";\nexport type {\n NotificationPanelProps,\n NotificationPanelDevice,\n ActionButtonElement,\n} from \"./NotificationPanel\";\n","import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport {\n IconButton,\n type ButtonProps,\n type IconButtonProps,\n type FlexButtonProps,\n} from \"@xsolla/xui-button\";\nimport { Typography } from \"@xsolla/xui-typography\";\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 | FlexButtonProps\n>;\n\nexport type NotificationPanelDevice = \"desktop\" | \"mobile\";\n\nexport interface NotificationPanelProps extends ThemeOverrideProps {\n /**\n * Layout variant.\n * - `notification` (default): full-height banner with an icon frame and a\n * stacked title/description.\n * - `announcement`: slim, single-line bar with an inline icon and the\n * title/description on one row.\n */\n variant?: \"notification\" | \"announcement\";\n /**\n * Device layout mode.\n * - `desktop` (default): horizontal layout with actions on the right.\n * - `mobile`: Figma mobile layout — `notification` uses a three-column row\n * (icon | stacked text + action | close); `announcement` puts icon, title,\n * on one row with description below; action and close are grouped on the\n * right, top-aligned with the title row.\n */\n device?: NotificationPanelDevice;\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/FlexButton component).\n * `size` — plus `variant` and `background` for non-IconButton actions — falls\n * back to a panel default, but any value you set on the button element itself\n * takes precedence. `tone` is never overridden by the panel.\n */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /**\n * Vertical alignment of the action/close button group — \"center\" (default) or\n * \"top\". Applies to the desktop `notification` variant only.\n */\n closeButtonAlign?: \"center\" | \"top\";\n testID?: string;\n}\n\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n variant = \"notification\",\n device = \"desktop\",\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n closeButtonAlign = \"center\",\n testID,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const config = theme.sizing.notificationPanel(device);\n\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n /** Background of the slim announcement bar (and inline icon area). */\n announcementBg: 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 announcementBg: theme.colors.background.alert.secondary,\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 announcementBg: theme.colors.background.warning.secondary,\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 announcementBg: theme.colors.background.success.secondary,\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 announcementBg: theme.colors.background.neutral.secondary,\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 announcementBg: theme.colors.background.brand.secondary,\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 const ariaProps = {\n role: type === \"alert\" ? \"alert\" : \"status\",\n \"aria-label\": `${type} ${variant} ${device}`,\n } as const;\n\n // IconButton (Box-based) stays RN-safe; FlexButton is web-DOM-only.\n const renderCloseButton = (iconSize: number) =>\n showCloseButton ? (\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"xs\"\n onPress={onClose}\n aria-label=\"Close notification\"\n icon={<Remove size={iconSize} />}\n hoverBackground=\"none\"\n />\n ) : null;\n\n const renderActionButton = () => {\n if (!isValidElement(actionButton)) return null;\n\n const element = actionButton as ActionButtonElement;\n const isIconButton =\n (element.type as { displayName?: string }).displayName === \"IconButton\";\n\n // Caller-supplied props on the element win; the values below are defaults\n // applied only when the caller omits them. (Previously they were hard-coded,\n // and cloneElement's second argument overrides the element's own props, so a\n // passed-in size/variant was silently ignored.)\n const props = element.props as Partial<\n ButtonProps & IconButtonProps & FlexButtonProps\n >;\n\n return cloneElement(\n element,\n isIconButton\n ? { size: props.size ?? \"xs\" }\n : {\n size: props.size ?? \"xs\",\n // Non-IconButton actions default to a text-only FlexButton (Primary\n // palette → content.primary text, no fill), per the Figma \"Flex\n // Button\" node. hoverBackground is left at its default so the subtle\n // mono hover overlay from the design is preserved.\n variant: props.variant ?? \"primary\",\n background: props.background ?? false,\n }\n );\n };\n\n if (variant === \"announcement\") {\n const isMobileAnnouncement = device === \"mobile\";\n\n if (isMobileAnnouncement) {\n const descriptionIndent = showIcon\n ? config.announcementIconSize + config.announcementContentGap\n : 0;\n\n return (\n <Box\n backgroundColor={currentConfig.announcementBg}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n padding={config.announcementPadding}\n gap={config.announcementGap}\n overflow=\"hidden\"\n testID={testID}\n style={{\n backdropFilter: `blur(${config.announcementBlurRadius}px)`,\n }}\n {...ariaProps}\n >\n <Box\n flex={1}\n minWidth={0}\n flexDirection=\"column\"\n gap={config.textGap}\n >\n <Box\n flexDirection=\"row\"\n alignItems=\"flex-start\"\n gap={config.announcementContentGap}\n >\n {showIcon &&\n (icon || (\n <IconComponent\n size={config.announcementIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n ))}\n {title && (\n <Box flex={1} minWidth={0}>\n <Typography\n variant=\"bodyXsAccent\"\n color={theme.colors.content.primary}\n noWrap\n >\n {title}\n </Typography>\n </Box>\n )}\n </Box>\n\n {description && (\n <Box paddingLeft={descriptionIndent}>\n <Typography\n variant=\"bodyXs\"\n color={theme.colors.content.secondary}\n noWrap\n >\n {description}\n </Typography>\n </Box>\n )}\n </Box>\n\n {(actionButton || showCloseButton) && (\n <Box\n flexShrink={0}\n alignSelf=\"flex-start\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementButtonsGap}\n >\n {renderActionButton()}\n {renderCloseButton(config.announcementCloseIconSize)}\n </Box>\n )}\n </Box>\n );\n }\n\n return (\n <Box\n backgroundColor={currentConfig.announcementBg}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n padding={config.announcementPadding}\n gap={config.announcementGap}\n overflow=\"hidden\"\n testID={testID}\n style={{\n backdropFilter: `blur(${config.announcementBlurRadius}px)`,\n }}\n {...ariaProps}\n >\n <Box\n flex={1}\n minWidth={0}\n overflow=\"hidden\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementContentGap}\n >\n {showIcon &&\n (icon || (\n <IconComponent\n size={config.announcementIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n ))}\n <Box\n flex={1}\n minWidth={0}\n overflow=\"hidden\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementContentGap}\n >\n {title && (\n <Typography\n variant=\"bodyXsAccent\"\n color={theme.colors.content.primary}\n noWrap\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography\n variant=\"bodyXs\"\n color={theme.colors.content.secondary}\n noWrap\n >\n {description}\n </Typography>\n )}\n </Box>\n </Box>\n\n {(actionButton || showCloseButton) && (\n <Box\n flexShrink={0}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementButtonsGap}\n >\n {renderActionButton()}\n {renderCloseButton(config.announcementCloseIconSize)}\n </Box>\n )}\n </Box>\n );\n }\n\n if (device === \"mobile\") {\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"flex-start\"\n justifyContent=\"space-between\"\n overflow=\"hidden\"\n testID={testID}\n {...ariaProps}\n >\n {showIcon && (\n <Box\n alignSelf=\"stretch\"\n paddingTop={config.mobileIconColumnPaddingVertical}\n paddingBottom={config.mobileIconColumnPaddingVertical}\n paddingLeft={config.mobileIconColumnPaddingLeft}\n alignItems=\"flex-start\"\n justifyContent=\"flex-start\"\n >\n {icon || (\n <IconComponent\n size={config.mobileIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n <Box\n flex={1}\n minWidth={0}\n paddingHorizontal={config.mobileBodyPaddingHorizontal}\n paddingVertical={config.mobileBodyPaddingVertical}\n flexDirection=\"column\"\n alignItems=\"flex-start\"\n justifyContent=\"center\"\n gap={config.mobileBodyContentGap}\n >\n {(title || description) && (\n <Box alignSelf=\"stretch\" gap={config.textGap}>\n {title && (\n <Typography\n variant=\"bodySmAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography\n variant=\"bodyXs\"\n color={theme.colors.content.tertiary}\n >\n {description}\n </Typography>\n )}\n </Box>\n )}\n\n {actionButton && (\n <Box marginLeft={config.mobileNotificationActionButtonOffsetLeft}>\n {renderActionButton()}\n </Box>\n )}\n </Box>\n\n {showCloseButton && (\n <Box\n alignSelf=\"stretch\"\n flexDirection=\"row\"\n paddingTop={config.mobileCloseColumnPaddingVertical}\n paddingBottom={config.mobileCloseColumnPaddingVertical}\n paddingRight={config.mobileCloseColumnPaddingRight}\n alignItems=\"flex-start\"\n justifyContent=\"flex-end\"\n >\n {renderCloseButton(config.notificationCloseIconSize)}\n </Box>\n )}\n </Box>\n );\n }\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 {...ariaProps}\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 <Typography\n variant=\"bodyMdAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"bodySm\" color={theme.colors.content.tertiary}>\n {description}\n </Typography>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box\n flexDirection=\"row\"\n alignSelf={closeButtonAlign === \"top\" ? \"flex-start\" : undefined}\n alignItems=\"center\"\n flexShrink={0}\n gap={config.buttonsGap}\n >\n {renderActionButton()}\n {renderCloseButton(config.notificationCloseIconSize)}\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 minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";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KAAK,OAAO;AAAA,kBAEX;AAAA,uCAAmB;AAAA,oBACnB,kBAAkB,OAAO,yBAAyB;AAAA;AAAA;AAAA,cACrD;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["import_jsx_runtime"]}
|
package/native/index.mjs
CHANGED
|
@@ -194,6 +194,7 @@ import {
|
|
|
194
194
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
195
195
|
var NotificationPanel = ({
|
|
196
196
|
variant = "notification",
|
|
197
|
+
device = "desktop",
|
|
197
198
|
type = "neutral",
|
|
198
199
|
title,
|
|
199
200
|
description,
|
|
@@ -202,13 +203,13 @@ var NotificationPanel = ({
|
|
|
202
203
|
actionButton,
|
|
203
204
|
showCloseButton = true,
|
|
204
205
|
onClose,
|
|
205
|
-
closeButtonAlign = "
|
|
206
|
+
closeButtonAlign = "center",
|
|
206
207
|
testID,
|
|
207
208
|
themeMode,
|
|
208
209
|
themeProductContext
|
|
209
210
|
}) => {
|
|
210
211
|
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
211
|
-
const config = theme.sizing.notificationPanel();
|
|
212
|
+
const config = theme.sizing.notificationPanel(device);
|
|
212
213
|
const typeConfig = {
|
|
213
214
|
alert: {
|
|
214
215
|
panelBg: theme.colors.overlay.alert,
|
|
@@ -255,16 +256,129 @@ var NotificationPanel = ({
|
|
|
255
256
|
const IconComponent = currentConfig.IconComponent;
|
|
256
257
|
const ariaProps = {
|
|
257
258
|
role: type === "alert" ? "alert" : "status",
|
|
258
|
-
"aria-label": `${type} ${variant}`
|
|
259
|
+
"aria-label": `${type} ${variant} ${device}`
|
|
260
|
+
};
|
|
261
|
+
const renderCloseButton = (iconSize) => showCloseButton ? /* @__PURE__ */ jsx2(
|
|
262
|
+
IconButton,
|
|
263
|
+
{
|
|
264
|
+
variant: "tertiary",
|
|
265
|
+
tone: "mono",
|
|
266
|
+
size: "xs",
|
|
267
|
+
onPress: onClose,
|
|
268
|
+
"aria-label": "Close notification",
|
|
269
|
+
icon: /* @__PURE__ */ jsx2(Remove, { size: iconSize }),
|
|
270
|
+
hoverBackground: "none"
|
|
271
|
+
}
|
|
272
|
+
) : null;
|
|
273
|
+
const renderActionButton = () => {
|
|
274
|
+
if (!isValidElement(actionButton)) return null;
|
|
275
|
+
const element = actionButton;
|
|
276
|
+
const isIconButton = element.type.displayName === "IconButton";
|
|
277
|
+
const props = element.props;
|
|
278
|
+
return cloneElement(
|
|
279
|
+
element,
|
|
280
|
+
isIconButton ? { size: props.size ?? "xs" } : {
|
|
281
|
+
size: props.size ?? "xs",
|
|
282
|
+
// Non-IconButton actions default to a text-only FlexButton (Primary
|
|
283
|
+
// palette → content.primary text, no fill), per the Figma "Flex
|
|
284
|
+
// Button" node. hoverBackground is left at its default so the subtle
|
|
285
|
+
// mono hover overlay from the design is preserved.
|
|
286
|
+
variant: props.variant ?? "primary",
|
|
287
|
+
background: props.background ?? false
|
|
288
|
+
}
|
|
289
|
+
);
|
|
259
290
|
};
|
|
260
291
|
if (variant === "announcement") {
|
|
292
|
+
const isMobileAnnouncement = device === "mobile";
|
|
293
|
+
if (isMobileAnnouncement) {
|
|
294
|
+
const descriptionIndent = showIcon ? config.announcementIconSize + config.announcementContentGap : 0;
|
|
295
|
+
return /* @__PURE__ */ jsxs(
|
|
296
|
+
Box,
|
|
297
|
+
{
|
|
298
|
+
backgroundColor: currentConfig.announcementBg,
|
|
299
|
+
flexDirection: "row",
|
|
300
|
+
alignItems: "stretch",
|
|
301
|
+
padding: config.announcementPadding,
|
|
302
|
+
gap: config.announcementGap,
|
|
303
|
+
overflow: "hidden",
|
|
304
|
+
testID,
|
|
305
|
+
style: {
|
|
306
|
+
backdropFilter: `blur(${config.announcementBlurRadius}px)`
|
|
307
|
+
},
|
|
308
|
+
...ariaProps,
|
|
309
|
+
children: [
|
|
310
|
+
/* @__PURE__ */ jsxs(
|
|
311
|
+
Box,
|
|
312
|
+
{
|
|
313
|
+
flex: 1,
|
|
314
|
+
minWidth: 0,
|
|
315
|
+
flexDirection: "column",
|
|
316
|
+
gap: config.textGap,
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ jsxs(
|
|
319
|
+
Box,
|
|
320
|
+
{
|
|
321
|
+
flexDirection: "row",
|
|
322
|
+
alignItems: "flex-start",
|
|
323
|
+
gap: config.announcementContentGap,
|
|
324
|
+
children: [
|
|
325
|
+
showIcon && (icon || /* @__PURE__ */ jsx2(
|
|
326
|
+
IconComponent,
|
|
327
|
+
{
|
|
328
|
+
size: config.announcementIconSize,
|
|
329
|
+
color: currentConfig.iconColor,
|
|
330
|
+
variant: "solid"
|
|
331
|
+
}
|
|
332
|
+
)),
|
|
333
|
+
title && /* @__PURE__ */ jsx2(Box, { flex: 1, minWidth: 0, children: /* @__PURE__ */ jsx2(
|
|
334
|
+
Typography,
|
|
335
|
+
{
|
|
336
|
+
variant: "bodyXsAccent",
|
|
337
|
+
color: theme.colors.content.primary,
|
|
338
|
+
noWrap: true,
|
|
339
|
+
children: title
|
|
340
|
+
}
|
|
341
|
+
) })
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
description && /* @__PURE__ */ jsx2(Box, { paddingLeft: descriptionIndent, children: /* @__PURE__ */ jsx2(
|
|
346
|
+
Typography,
|
|
347
|
+
{
|
|
348
|
+
variant: "bodyXs",
|
|
349
|
+
color: theme.colors.content.secondary,
|
|
350
|
+
noWrap: true,
|
|
351
|
+
children: description
|
|
352
|
+
}
|
|
353
|
+
) })
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
),
|
|
357
|
+
(actionButton || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
358
|
+
Box,
|
|
359
|
+
{
|
|
360
|
+
flexShrink: 0,
|
|
361
|
+
alignSelf: "flex-start",
|
|
362
|
+
flexDirection: "row",
|
|
363
|
+
alignItems: "center",
|
|
364
|
+
gap: config.announcementButtonsGap,
|
|
365
|
+
children: [
|
|
366
|
+
renderActionButton(),
|
|
367
|
+
renderCloseButton(config.announcementCloseIconSize)
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
);
|
|
374
|
+
}
|
|
261
375
|
return /* @__PURE__ */ jsxs(
|
|
262
376
|
Box,
|
|
263
377
|
{
|
|
264
378
|
backgroundColor: currentConfig.announcementBg,
|
|
265
379
|
flexDirection: "row",
|
|
266
380
|
alignItems: "center",
|
|
267
|
-
justifyContent: "
|
|
381
|
+
justifyContent: "flex-start",
|
|
268
382
|
padding: config.announcementPadding,
|
|
269
383
|
gap: config.announcementGap,
|
|
270
384
|
overflow: "hidden",
|
|
@@ -292,15 +406,37 @@ var NotificationPanel = ({
|
|
|
292
406
|
variant: "solid"
|
|
293
407
|
}
|
|
294
408
|
)),
|
|
295
|
-
|
|
296
|
-
|
|
409
|
+
/* @__PURE__ */ jsxs(
|
|
410
|
+
Box,
|
|
297
411
|
{
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
412
|
+
flex: 1,
|
|
413
|
+
minWidth: 0,
|
|
414
|
+
overflow: "hidden",
|
|
415
|
+
flexDirection: "row",
|
|
416
|
+
alignItems: "center",
|
|
417
|
+
gap: config.announcementContentGap,
|
|
418
|
+
children: [
|
|
419
|
+
title && /* @__PURE__ */ jsx2(
|
|
420
|
+
Typography,
|
|
421
|
+
{
|
|
422
|
+
variant: "bodyXsAccent",
|
|
423
|
+
color: theme.colors.content.primary,
|
|
424
|
+
noWrap: true,
|
|
425
|
+
children: title
|
|
426
|
+
}
|
|
427
|
+
),
|
|
428
|
+
description && /* @__PURE__ */ jsx2(
|
|
429
|
+
Typography,
|
|
430
|
+
{
|
|
431
|
+
variant: "bodyXs",
|
|
432
|
+
color: theme.colors.content.secondary,
|
|
433
|
+
noWrap: true,
|
|
434
|
+
children: description
|
|
435
|
+
}
|
|
436
|
+
)
|
|
437
|
+
]
|
|
301
438
|
}
|
|
302
|
-
)
|
|
303
|
-
description && /* @__PURE__ */ jsx2(Typography, { variant: "bodyXs", color: theme.colors.content.secondary, children: description })
|
|
439
|
+
)
|
|
304
440
|
]
|
|
305
441
|
}
|
|
306
442
|
),
|
|
@@ -312,27 +448,8 @@ var NotificationPanel = ({
|
|
|
312
448
|
alignItems: "center",
|
|
313
449
|
gap: config.announcementButtonsGap,
|
|
314
450
|
children: [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
// Announcement uses a text-only FlexButton (Primary palette →
|
|
318
|
-
// content.primary text, no fill), per the Figma "Flex Button"
|
|
319
|
-
// node. hoverBackground is left at its default so the subtle
|
|
320
|
-
// mono hover overlay from the design is preserved.
|
|
321
|
-
variant: "primary",
|
|
322
|
-
background: false
|
|
323
|
-
}),
|
|
324
|
-
showCloseButton && /* @__PURE__ */ jsx2(
|
|
325
|
-
IconButton,
|
|
326
|
-
{
|
|
327
|
-
variant: "tertiary",
|
|
328
|
-
tone: "mono",
|
|
329
|
-
size: "xs",
|
|
330
|
-
onPress: onClose,
|
|
331
|
-
"aria-label": "Close notification",
|
|
332
|
-
icon: /* @__PURE__ */ jsx2(Remove, { size: config.announcementCloseIconSize }),
|
|
333
|
-
hoverBackground: "none"
|
|
334
|
-
}
|
|
335
|
-
)
|
|
451
|
+
renderActionButton(),
|
|
452
|
+
renderCloseButton(config.announcementCloseIconSize)
|
|
336
453
|
]
|
|
337
454
|
}
|
|
338
455
|
)
|
|
@@ -340,6 +457,89 @@ var NotificationPanel = ({
|
|
|
340
457
|
}
|
|
341
458
|
);
|
|
342
459
|
}
|
|
460
|
+
if (device === "mobile") {
|
|
461
|
+
return /* @__PURE__ */ jsxs(
|
|
462
|
+
Box,
|
|
463
|
+
{
|
|
464
|
+
backgroundColor: currentConfig.panelBg,
|
|
465
|
+
borderRadius: config.borderRadius,
|
|
466
|
+
flexDirection: "row",
|
|
467
|
+
alignItems: "flex-start",
|
|
468
|
+
justifyContent: "space-between",
|
|
469
|
+
overflow: "hidden",
|
|
470
|
+
testID,
|
|
471
|
+
...ariaProps,
|
|
472
|
+
children: [
|
|
473
|
+
showIcon && /* @__PURE__ */ jsx2(
|
|
474
|
+
Box,
|
|
475
|
+
{
|
|
476
|
+
alignSelf: "stretch",
|
|
477
|
+
paddingTop: config.mobileIconColumnPaddingVertical,
|
|
478
|
+
paddingBottom: config.mobileIconColumnPaddingVertical,
|
|
479
|
+
paddingLeft: config.mobileIconColumnPaddingLeft,
|
|
480
|
+
alignItems: "flex-start",
|
|
481
|
+
justifyContent: "flex-start",
|
|
482
|
+
children: icon || /* @__PURE__ */ jsx2(
|
|
483
|
+
IconComponent,
|
|
484
|
+
{
|
|
485
|
+
size: config.mobileIconSize,
|
|
486
|
+
color: currentConfig.iconColor,
|
|
487
|
+
variant: "solid"
|
|
488
|
+
}
|
|
489
|
+
)
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
/* @__PURE__ */ jsxs(
|
|
493
|
+
Box,
|
|
494
|
+
{
|
|
495
|
+
flex: 1,
|
|
496
|
+
minWidth: 0,
|
|
497
|
+
paddingHorizontal: config.mobileBodyPaddingHorizontal,
|
|
498
|
+
paddingVertical: config.mobileBodyPaddingVertical,
|
|
499
|
+
flexDirection: "column",
|
|
500
|
+
alignItems: "flex-start",
|
|
501
|
+
justifyContent: "center",
|
|
502
|
+
gap: config.mobileBodyContentGap,
|
|
503
|
+
children: [
|
|
504
|
+
(title || description) && /* @__PURE__ */ jsxs(Box, { alignSelf: "stretch", gap: config.textGap, children: [
|
|
505
|
+
title && /* @__PURE__ */ jsx2(
|
|
506
|
+
Typography,
|
|
507
|
+
{
|
|
508
|
+
variant: "bodySmAccent",
|
|
509
|
+
color: theme.colors.content.primary,
|
|
510
|
+
children: title
|
|
511
|
+
}
|
|
512
|
+
),
|
|
513
|
+
description && /* @__PURE__ */ jsx2(
|
|
514
|
+
Typography,
|
|
515
|
+
{
|
|
516
|
+
variant: "bodyXs",
|
|
517
|
+
color: theme.colors.content.tertiary,
|
|
518
|
+
children: description
|
|
519
|
+
}
|
|
520
|
+
)
|
|
521
|
+
] }),
|
|
522
|
+
actionButton && /* @__PURE__ */ jsx2(Box, { marginLeft: config.mobileNotificationActionButtonOffsetLeft, children: renderActionButton() })
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
),
|
|
526
|
+
showCloseButton && /* @__PURE__ */ jsx2(
|
|
527
|
+
Box,
|
|
528
|
+
{
|
|
529
|
+
alignSelf: "stretch",
|
|
530
|
+
flexDirection: "row",
|
|
531
|
+
paddingTop: config.mobileCloseColumnPaddingVertical,
|
|
532
|
+
paddingBottom: config.mobileCloseColumnPaddingVertical,
|
|
533
|
+
paddingRight: config.mobileCloseColumnPaddingRight,
|
|
534
|
+
alignItems: "flex-start",
|
|
535
|
+
justifyContent: "flex-end",
|
|
536
|
+
children: renderCloseButton(config.notificationCloseIconSize)
|
|
537
|
+
}
|
|
538
|
+
)
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
);
|
|
542
|
+
}
|
|
343
543
|
return /* @__PURE__ */ jsxs(
|
|
344
544
|
Box,
|
|
345
545
|
{
|
|
@@ -397,29 +597,13 @@ var NotificationPanel = ({
|
|
|
397
597
|
Box,
|
|
398
598
|
{
|
|
399
599
|
flexDirection: "row",
|
|
400
|
-
alignSelf: closeButtonAlign === "top" ? "
|
|
401
|
-
alignItems:
|
|
402
|
-
|
|
403
|
-
paddingVertical: closeButtonAlign === "top" ? 4 : 0,
|
|
600
|
+
alignSelf: closeButtonAlign === "top" ? "flex-start" : void 0,
|
|
601
|
+
alignItems: "center",
|
|
602
|
+
flexShrink: 0,
|
|
404
603
|
gap: config.buttonsGap,
|
|
405
604
|
children: [
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
variant: "tertiary",
|
|
409
|
-
tone: "mono"
|
|
410
|
-
}),
|
|
411
|
-
showCloseButton && /* @__PURE__ */ jsx2(
|
|
412
|
-
IconButton,
|
|
413
|
-
{
|
|
414
|
-
variant: "tertiary",
|
|
415
|
-
tone: "mono",
|
|
416
|
-
size: "xs",
|
|
417
|
-
onPress: onClose,
|
|
418
|
-
"aria-label": "Close notification",
|
|
419
|
-
icon: /* @__PURE__ */ jsx2(Remove, { size: 18 }),
|
|
420
|
-
hoverBackground: "none"
|
|
421
|
-
}
|
|
422
|
-
)
|
|
605
|
+
renderActionButton(),
|
|
606
|
+
renderCloseButton(config.notificationCloseIconSize)
|
|
423
607
|
]
|
|
424
608
|
}
|
|
425
609
|
)
|
package/native/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/NotificationPanel.tsx","../../../../foundation/primitives-native/src/Box.tsx"],"sourcesContent":["import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport {\n IconButton,\n type ButtonProps,\n type IconButtonProps,\n type FlexButtonProps,\n} from \"@xsolla/xui-button\";\nimport { Typography } from \"@xsolla/xui-typography\";\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 | FlexButtonProps\n>;\n\nexport interface NotificationPanelProps extends ThemeOverrideProps {\n /**\n * Layout variant.\n * - `notification` (default): full-height banner with an icon frame and a\n * stacked title/description.\n * - `announcement`: slim, single-line bar with an inline icon and the\n * title/description on one row.\n */\n variant?: \"notification\" | \"announcement\";\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 */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /** Vertical alignment of the close button — \"top\" (default) or \"center\" */\n closeButtonAlign?: \"center\" | \"top\";\n testID?: string;\n}\n\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n variant = \"notification\",\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n closeButtonAlign = \"top\",\n testID,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const config = theme.sizing.notificationPanel();\n\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n /** Background of the slim announcement bar (and inline icon area). */\n announcementBg: 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 announcementBg: theme.colors.background.alert.secondary,\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 announcementBg: theme.colors.background.warning.secondary,\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 announcementBg: theme.colors.background.success.secondary,\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 announcementBg: theme.colors.background.neutral.secondary,\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 announcementBg: theme.colors.background.brand.secondary,\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 const ariaProps = {\n role: type === \"alert\" ? \"alert\" : \"status\",\n \"aria-label\": `${type} ${variant}`,\n } as const;\n\n if (variant === \"announcement\") {\n return (\n <Box\n backgroundColor={currentConfig.announcementBg}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n padding={config.announcementPadding}\n gap={config.announcementGap}\n overflow=\"hidden\"\n testID={testID}\n style={{\n backdropFilter: `blur(${config.announcementBlurRadius}px)`,\n }}\n {...ariaProps}\n >\n {/* Inline content: icon + title + description on a single row */}\n <Box\n flex={1}\n minWidth={0}\n overflow=\"hidden\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementContentGap}\n >\n {showIcon &&\n (icon || (\n <IconComponent\n size={config.announcementIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n ))}\n {title && (\n <Typography\n variant=\"bodyXsAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"bodyXs\" color={theme.colors.content.secondary}>\n {description}\n </Typography>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box\n flexShrink={0}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementButtonsGap}\n >\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n size: \"xs\",\n // Announcement uses a text-only FlexButton (Primary palette →\n // content.primary text, no fill), per the Figma \"Flex Button\"\n // node. hoverBackground is left at its default so the subtle\n // mono hover overlay from the design is preserved.\n variant: \"primary\",\n background: false,\n })}\n\n {showCloseButton && (\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"xs\"\n onPress={onClose}\n aria-label=\"Close notification\"\n icon={<Remove size={config.announcementCloseIconSize} />}\n hoverBackground=\"none\"\n />\n )}\n </Box>\n )}\n </Box>\n );\n }\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 {...ariaProps}\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 <Typography\n variant=\"bodyMdAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"bodySm\" color={theme.colors.content.tertiary}>\n {description}\n </Typography>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box\n flexDirection=\"row\"\n alignSelf={closeButtonAlign === \"top\" ? \"stretch\" : \"center\"}\n alignItems={closeButtonAlign === \"top\" ? \"flex-start\" : \"center\"}\n justifyContent=\"flex-start\"\n paddingVertical={closeButtonAlign === \"top\" ? 4 : 0}\n gap={config.buttonsGap}\n >\n {isValidElement(actionButton) &&\n cloneElement(actionButton as ActionButtonElement, {\n size: \"xs\",\n variant: \"tertiary\",\n tone: \"mono\",\n })}\n\n {showCloseButton && (\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"xs\"\n onPress={onClose}\n aria-label=\"Close notification\"\n icon={<Remove size={18} />}\n hoverBackground=\"none\"\n />\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 minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";AAAA,SAAgB,cAAc,sBAAsB;;;ACCpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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AAA;AAAA,YACC,MAAM;AAAA,YACN,eAAc;AAAA,YACd,YAAW;AAAA,YACX,mBAAmB,OAAO;AAAA,YAC1B,iBAAiB,OAAO;AAAA,YACxB,KAAK,OAAO;AAAA,YAGZ;AAAA,mCAAC,OAAI,MAAM,GAAG,KAAK,OAAO,SACvB;AAAA,yBACC,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,SAAQ;AAAA,oBACR,OAAO,MAAM,OAAO,QAAQ;AAAA,oBAE3B;AAAA;AAAA,gBACH;AAAA,gBAED,eACC,gBAAAA,KAAC,cAAW,SAAQ,UAAS,OAAO,MAAM,OAAO,QAAQ,UACtD,uBACH;AAAA,iBAEJ;AAAA,eAGE,gBAAgB,oBAChB;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAc;AAAA,kBACd,WAAW,qBAAqB,QAAQ,YAAY;AAAA,kBACpD,YAAY,qBAAqB,QAAQ,eAAe;AAAA,kBACxD,gBAAe;AAAA,kBACf,iBAAiB,qBAAqB,QAAQ,IAAI;AAAA,kBAClD,KAAK,OAAO;AAAA,kBAEX;AAAA,mCAAe,YAAY,KAC1B,aAAa,cAAqC;AAAA,sBAChD,MAAM;AAAA,sBACN,SAAS;AAAA,sBACT,MAAM;AAAA,oBACR,CAAC;AAAA,oBAEF,mBACC,gBAAAA;AAAA,sBAAC;AAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,MAAK;AAAA,wBACL,MAAK;AAAA,wBACL,SAAS;AAAA,wBACT,cAAW;AAAA,wBACX,MAAM,gBAAAA,KAAC,UAAO,MAAM,IAAI;AAAA,wBACxB,iBAAgB;AAAA;AAAA,oBAClB;AAAA;AAAA;AAAA,cAEJ;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/NotificationPanel.tsx","../../../../foundation/primitives-native/src/Box.tsx"],"sourcesContent":["import React, { cloneElement, isValidElement } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport {\n IconButton,\n type ButtonProps,\n type IconButtonProps,\n type FlexButtonProps,\n} from \"@xsolla/xui-button\";\nimport { Typography } from \"@xsolla/xui-typography\";\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 | FlexButtonProps\n>;\n\nexport type NotificationPanelDevice = \"desktop\" | \"mobile\";\n\nexport interface NotificationPanelProps extends ThemeOverrideProps {\n /**\n * Layout variant.\n * - `notification` (default): full-height banner with an icon frame and a\n * stacked title/description.\n * - `announcement`: slim, single-line bar with an inline icon and the\n * title/description on one row.\n */\n variant?: \"notification\" | \"announcement\";\n /**\n * Device layout mode.\n * - `desktop` (default): horizontal layout with actions on the right.\n * - `mobile`: Figma mobile layout — `notification` uses a three-column row\n * (icon | stacked text + action | close); `announcement` puts icon, title,\n * on one row with description below; action and close are grouped on the\n * right, top-aligned with the title row.\n */\n device?: NotificationPanelDevice;\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/FlexButton component).\n * `size` — plus `variant` and `background` for non-IconButton actions — falls\n * back to a panel default, but any value you set on the button element itself\n * takes precedence. `tone` is never overridden by the panel.\n */\n actionButton?: React.ReactElement;\n /** Show/hide close button */\n showCloseButton?: boolean;\n /** Close button click handler */\n onClose?: () => void;\n /**\n * Vertical alignment of the action/close button group — \"center\" (default) or\n * \"top\". Applies to the desktop `notification` variant only.\n */\n closeButtonAlign?: \"center\" | \"top\";\n testID?: string;\n}\n\nexport const NotificationPanel: React.FC<NotificationPanelProps> = ({\n variant = \"notification\",\n device = \"desktop\",\n type = \"neutral\",\n title,\n description,\n showIcon = true,\n icon,\n actionButton,\n showCloseButton = true,\n onClose,\n closeButtonAlign = \"center\",\n testID,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const config = theme.sizing.notificationPanel(device);\n\n const typeConfig: Record<\n NonNullable<NotificationPanelProps[\"type\"]>,\n {\n panelBg: string;\n /** Background of the slim announcement bar (and inline icon area). */\n announcementBg: 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 announcementBg: theme.colors.background.alert.secondary,\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 announcementBg: theme.colors.background.warning.secondary,\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 announcementBg: theme.colors.background.success.secondary,\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 announcementBg: theme.colors.background.neutral.secondary,\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 announcementBg: theme.colors.background.brand.secondary,\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 const ariaProps = {\n role: type === \"alert\" ? \"alert\" : \"status\",\n \"aria-label\": `${type} ${variant} ${device}`,\n } as const;\n\n // IconButton (Box-based) stays RN-safe; FlexButton is web-DOM-only.\n const renderCloseButton = (iconSize: number) =>\n showCloseButton ? (\n <IconButton\n variant=\"tertiary\"\n tone=\"mono\"\n size=\"xs\"\n onPress={onClose}\n aria-label=\"Close notification\"\n icon={<Remove size={iconSize} />}\n hoverBackground=\"none\"\n />\n ) : null;\n\n const renderActionButton = () => {\n if (!isValidElement(actionButton)) return null;\n\n const element = actionButton as ActionButtonElement;\n const isIconButton =\n (element.type as { displayName?: string }).displayName === \"IconButton\";\n\n // Caller-supplied props on the element win; the values below are defaults\n // applied only when the caller omits them. (Previously they were hard-coded,\n // and cloneElement's second argument overrides the element's own props, so a\n // passed-in size/variant was silently ignored.)\n const props = element.props as Partial<\n ButtonProps & IconButtonProps & FlexButtonProps\n >;\n\n return cloneElement(\n element,\n isIconButton\n ? { size: props.size ?? \"xs\" }\n : {\n size: props.size ?? \"xs\",\n // Non-IconButton actions default to a text-only FlexButton (Primary\n // palette → content.primary text, no fill), per the Figma \"Flex\n // Button\" node. hoverBackground is left at its default so the subtle\n // mono hover overlay from the design is preserved.\n variant: props.variant ?? \"primary\",\n background: props.background ?? false,\n }\n );\n };\n\n if (variant === \"announcement\") {\n const isMobileAnnouncement = device === \"mobile\";\n\n if (isMobileAnnouncement) {\n const descriptionIndent = showIcon\n ? config.announcementIconSize + config.announcementContentGap\n : 0;\n\n return (\n <Box\n backgroundColor={currentConfig.announcementBg}\n flexDirection=\"row\"\n alignItems=\"stretch\"\n padding={config.announcementPadding}\n gap={config.announcementGap}\n overflow=\"hidden\"\n testID={testID}\n style={{\n backdropFilter: `blur(${config.announcementBlurRadius}px)`,\n }}\n {...ariaProps}\n >\n <Box\n flex={1}\n minWidth={0}\n flexDirection=\"column\"\n gap={config.textGap}\n >\n <Box\n flexDirection=\"row\"\n alignItems=\"flex-start\"\n gap={config.announcementContentGap}\n >\n {showIcon &&\n (icon || (\n <IconComponent\n size={config.announcementIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n ))}\n {title && (\n <Box flex={1} minWidth={0}>\n <Typography\n variant=\"bodyXsAccent\"\n color={theme.colors.content.primary}\n noWrap\n >\n {title}\n </Typography>\n </Box>\n )}\n </Box>\n\n {description && (\n <Box paddingLeft={descriptionIndent}>\n <Typography\n variant=\"bodyXs\"\n color={theme.colors.content.secondary}\n noWrap\n >\n {description}\n </Typography>\n </Box>\n )}\n </Box>\n\n {(actionButton || showCloseButton) && (\n <Box\n flexShrink={0}\n alignSelf=\"flex-start\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementButtonsGap}\n >\n {renderActionButton()}\n {renderCloseButton(config.announcementCloseIconSize)}\n </Box>\n )}\n </Box>\n );\n }\n\n return (\n <Box\n backgroundColor={currentConfig.announcementBg}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n padding={config.announcementPadding}\n gap={config.announcementGap}\n overflow=\"hidden\"\n testID={testID}\n style={{\n backdropFilter: `blur(${config.announcementBlurRadius}px)`,\n }}\n {...ariaProps}\n >\n <Box\n flex={1}\n minWidth={0}\n overflow=\"hidden\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementContentGap}\n >\n {showIcon &&\n (icon || (\n <IconComponent\n size={config.announcementIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n ))}\n <Box\n flex={1}\n minWidth={0}\n overflow=\"hidden\"\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementContentGap}\n >\n {title && (\n <Typography\n variant=\"bodyXsAccent\"\n color={theme.colors.content.primary}\n noWrap\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography\n variant=\"bodyXs\"\n color={theme.colors.content.secondary}\n noWrap\n >\n {description}\n </Typography>\n )}\n </Box>\n </Box>\n\n {(actionButton || showCloseButton) && (\n <Box\n flexShrink={0}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={config.announcementButtonsGap}\n >\n {renderActionButton()}\n {renderCloseButton(config.announcementCloseIconSize)}\n </Box>\n )}\n </Box>\n );\n }\n\n if (device === \"mobile\") {\n return (\n <Box\n backgroundColor={currentConfig.panelBg}\n borderRadius={config.borderRadius}\n flexDirection=\"row\"\n alignItems=\"flex-start\"\n justifyContent=\"space-between\"\n overflow=\"hidden\"\n testID={testID}\n {...ariaProps}\n >\n {showIcon && (\n <Box\n alignSelf=\"stretch\"\n paddingTop={config.mobileIconColumnPaddingVertical}\n paddingBottom={config.mobileIconColumnPaddingVertical}\n paddingLeft={config.mobileIconColumnPaddingLeft}\n alignItems=\"flex-start\"\n justifyContent=\"flex-start\"\n >\n {icon || (\n <IconComponent\n size={config.mobileIconSize}\n color={currentConfig.iconColor}\n variant=\"solid\"\n />\n )}\n </Box>\n )}\n\n <Box\n flex={1}\n minWidth={0}\n paddingHorizontal={config.mobileBodyPaddingHorizontal}\n paddingVertical={config.mobileBodyPaddingVertical}\n flexDirection=\"column\"\n alignItems=\"flex-start\"\n justifyContent=\"center\"\n gap={config.mobileBodyContentGap}\n >\n {(title || description) && (\n <Box alignSelf=\"stretch\" gap={config.textGap}>\n {title && (\n <Typography\n variant=\"bodySmAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography\n variant=\"bodyXs\"\n color={theme.colors.content.tertiary}\n >\n {description}\n </Typography>\n )}\n </Box>\n )}\n\n {actionButton && (\n <Box marginLeft={config.mobileNotificationActionButtonOffsetLeft}>\n {renderActionButton()}\n </Box>\n )}\n </Box>\n\n {showCloseButton && (\n <Box\n alignSelf=\"stretch\"\n flexDirection=\"row\"\n paddingTop={config.mobileCloseColumnPaddingVertical}\n paddingBottom={config.mobileCloseColumnPaddingVertical}\n paddingRight={config.mobileCloseColumnPaddingRight}\n alignItems=\"flex-start\"\n justifyContent=\"flex-end\"\n >\n {renderCloseButton(config.notificationCloseIconSize)}\n </Box>\n )}\n </Box>\n );\n }\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 {...ariaProps}\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 <Typography\n variant=\"bodyMdAccent\"\n color={theme.colors.content.primary}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"bodySm\" color={theme.colors.content.tertiary}>\n {description}\n </Typography>\n )}\n </Box>\n\n {/* Buttons */}\n {(actionButton || showCloseButton) && (\n <Box\n flexDirection=\"row\"\n alignSelf={closeButtonAlign === \"top\" ? \"flex-start\" : undefined}\n alignItems=\"center\"\n flexShrink={0}\n gap={config.buttonsGap}\n >\n {renderActionButton()}\n {renderCloseButton(config.notificationCloseIconSize)}\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 minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";AAAA,SAAgB,cAAc,sBAAsB;;;ACCpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AA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,eAAc;AAAA,kBACd,WAAW,qBAAqB,QAAQ,eAAe;AAAA,kBACvD,YAAW;AAAA,kBACX,YAAY;AAAA,kBACZ,KAAK,OAAO;AAAA,kBAEX;AAAA,uCAAmB;AAAA,oBACnB,kBAAkB,OAAO,yBAAyB;AAAA;AAAA;AAAA,cACrD;AAAA;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;","names":["jsx"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-b2b-notification-panel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.192.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-button": "0.
|
|
17
|
-
"@xsolla/xui-core": "0.
|
|
18
|
-
"@xsolla/xui-icons-base": "0.
|
|
19
|
-
"@xsolla/xui-primitives-core": "0.
|
|
20
|
-
"@xsolla/xui-typography": "0.
|
|
16
|
+
"@xsolla/xui-button": "0.192.0",
|
|
17
|
+
"@xsolla/xui-core": "0.192.0",
|
|
18
|
+
"@xsolla/xui-icons-base": "0.192.0",
|
|
19
|
+
"@xsolla/xui-primitives-core": "0.192.0",
|
|
20
|
+
"@xsolla/xui-typography": "0.192.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=16.8.0",
|