@xsolla/xui-rich-icon-web 0.64.0-pr56.1768348754

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/index.d.mts ADDED
@@ -0,0 +1,46 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { BoxProps, TextProps } from '@xsolla/xui-primitives-core';
4
+
5
+ type RichIconVariant = "circle" | "rounded" | "square";
6
+ type RichIconSize = "sm" | "md" | "lg" | "xl";
7
+ interface RichIconProps extends BoxProps {
8
+ children: ReactNode;
9
+ /**
10
+ * Shape variant of the icon
11
+ * @default "rounded"
12
+ */
13
+ variant?: RichIconVariant;
14
+ /**
15
+ * Size variant
16
+ * @default "md"
17
+ */
18
+ size?: RichIconSize;
19
+ }
20
+ interface RichIconIconProps extends BoxProps {
21
+ /**
22
+ * Source URL for an image
23
+ */
24
+ src?: string;
25
+ /**
26
+ * Custom component (e.g., Lucide icon)
27
+ */
28
+ component?: ReactNode;
29
+ /**
30
+ * Color for the icon (if using component)
31
+ */
32
+ color?: string;
33
+ }
34
+ interface RichIconTextProps extends TextProps {
35
+ children: ReactNode;
36
+ }
37
+
38
+ declare const RichIconRoot: ({ children, variant, size, ...props }: RichIconProps) => react_jsx_runtime.JSX.Element;
39
+ declare const RichIconIcon: ({ src, component, color, children, ...props }: RichIconIconProps) => react_jsx_runtime.JSX.Element;
40
+ declare const RichIconText: ({ children, ...props }: RichIconTextProps) => react_jsx_runtime.JSX.Element;
41
+ declare const RichIcon: (({ children, variant, size, ...props }: RichIconProps) => react_jsx_runtime.JSX.Element) & {
42
+ Icon: ({ src, component, color, children, ...props }: RichIconIconProps) => react_jsx_runtime.JSX.Element;
43
+ Text: ({ children, ...props }: RichIconTextProps) => react_jsx_runtime.JSX.Element;
44
+ };
45
+
46
+ export { RichIcon, RichIconIcon, type RichIconIconProps, type RichIconProps, RichIconRoot, type RichIconSize, RichIconText, type RichIconTextProps, type RichIconVariant };
package/index.d.ts ADDED
@@ -0,0 +1,46 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { BoxProps, TextProps } from '@xsolla/xui-primitives-core';
4
+
5
+ type RichIconVariant = "circle" | "rounded" | "square";
6
+ type RichIconSize = "sm" | "md" | "lg" | "xl";
7
+ interface RichIconProps extends BoxProps {
8
+ children: ReactNode;
9
+ /**
10
+ * Shape variant of the icon
11
+ * @default "rounded"
12
+ */
13
+ variant?: RichIconVariant;
14
+ /**
15
+ * Size variant
16
+ * @default "md"
17
+ */
18
+ size?: RichIconSize;
19
+ }
20
+ interface RichIconIconProps extends BoxProps {
21
+ /**
22
+ * Source URL for an image
23
+ */
24
+ src?: string;
25
+ /**
26
+ * Custom component (e.g., Lucide icon)
27
+ */
28
+ component?: ReactNode;
29
+ /**
30
+ * Color for the icon (if using component)
31
+ */
32
+ color?: string;
33
+ }
34
+ interface RichIconTextProps extends TextProps {
35
+ children: ReactNode;
36
+ }
37
+
38
+ declare const RichIconRoot: ({ children, variant, size, ...props }: RichIconProps) => react_jsx_runtime.JSX.Element;
39
+ declare const RichIconIcon: ({ src, component, color, children, ...props }: RichIconIconProps) => react_jsx_runtime.JSX.Element;
40
+ declare const RichIconText: ({ children, ...props }: RichIconTextProps) => react_jsx_runtime.JSX.Element;
41
+ declare const RichIcon: (({ children, variant, size, ...props }: RichIconProps) => react_jsx_runtime.JSX.Element) & {
42
+ Icon: ({ src, component, color, children, ...props }: RichIconIconProps) => react_jsx_runtime.JSX.Element;
43
+ Text: ({ children, ...props }: RichIconTextProps) => react_jsx_runtime.JSX.Element;
44
+ };
45
+
46
+ export { RichIcon, RichIconIcon, type RichIconIconProps, type RichIconProps, RichIconRoot, type RichIconSize, RichIconText, type RichIconTextProps, type RichIconVariant };