tango-ui-cw 1.0.10 → 1.1.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 +127 -126
- package/dist/component/CSSFab/index.d.ts +55 -55
- package/dist/component/CSSFab/useTangoStyle.d.ts +1 -1
- package/dist/component/TBanner/index.d.ts +52 -50
- package/dist/component/TButton/index.d.ts +107 -107
- package/dist/component/TColorPicker/index.d.ts +41 -41
- package/dist/component/TDate/index.d.ts +41 -41
- package/dist/component/TDatePicker/index.d.ts +49 -49
- package/dist/component/TDrawer/index.d.ts +58 -58
- package/dist/component/TInput/index.d.ts +81 -81
- package/dist/component/TLayout/index.d.ts +133 -133
- package/dist/component/TLine/index.d.ts +33 -33
- package/dist/component/TMark/index.d.ts +38 -38
- package/dist/component/TModal/index.d.ts +52 -52
- package/dist/component/TNotice/index.d.ts +30 -30
- package/dist/component/TSearch/index.d.ts +42 -42
- package/dist/component/TSpace/index.d.ts +57 -59
- package/dist/component/TTable/index.d.ts +76 -76
- package/dist/component/TTooltip/index.d.ts +31 -31
- package/dist/component/TUpload/index.d.ts +45 -45
- package/dist/component/index.d.ts +146 -146
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1380 -1373
- package/dist/providers/NoticeProvider/NoticeProvider.d.ts +19 -19
- package/dist/providers/TangoI18nProvider/TangoI18nProvider.d.ts +27 -27
- package/dist/providers/ThemeProvider/ThemeProvider.d.ts +21 -21
- package/dist/scripts/check-peers.js +82 -82
- package/dist/styles/base.css +353 -353
- package/dist/styles/global.css +353 -353
- package/dist/styles/style.css +1 -1
- package/dist/styles/theme.css +13 -13
- package/dist/styles/utilities.css +1 -1
- package/package.json +68 -68
package/README.md
CHANGED
|
@@ -1,126 +1,127 @@
|
|
|
1
|
-
# Tango UI
|
|
2
|
-
|
|
3
|
-
A lightweight React UI library for Next.js, powered by Tailwind CSS. Pre-compiled utilities — no Tailwind setup required for consumers.
|
|
4
|
-
|
|
5
|
-
**Author**: ClayW
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Official Docs
|
|
10
|
-
|
|
11
|
-
🔗 [https://
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install tango-ui-cw
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Peer Dependencies
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install react@>=18 next@>=14 tailwind-merge@^3.6.0
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
> `next` and `react-dom` are optional peers — only required if you use SSR/SSG features.
|
|
28
|
-
>
|
|
29
|
-
> `tailwindcss` is an optional peer — not required. All Tailwind utility classes are pre-compiled and bundled in `style.css`. Only install it if your own project also uses Tailwind.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Quick Start
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
// Import components
|
|
37
|
-
import { Button, Input, Layout, Upload } from "tango-ui-cw";
|
|
38
|
-
|
|
39
|
-
// Import styles (required)
|
|
40
|
-
import "tango-ui-cw/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- **
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- **
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
- **
|
|
86
|
-
- **
|
|
87
|
-
- **
|
|
88
|
-
- **
|
|
89
|
-
- **
|
|
90
|
-
- **
|
|
91
|
-
- **
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
- **
|
|
95
|
-
- **
|
|
96
|
-
- **
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
- **
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
106
|
-
- **
|
|
107
|
-
- **
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
- **
|
|
119
|
-
-
|
|
120
|
-
- **
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
1
|
+
# Tango UI
|
|
2
|
+
|
|
3
|
+
A lightweight React UI library for Next.js, powered by Tailwind CSS. Pre-compiled utilities — no Tailwind setup required for consumers.
|
|
4
|
+
|
|
5
|
+
**Author**: ClayW
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Official Docs
|
|
10
|
+
|
|
11
|
+
🔗 [https://www.tangoui.me/](https://www.tangoui.me/)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install tango-ui-cw
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Peer Dependencies
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install react@>=18 next@>=14 tailwind-merge@^3.6.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
> `next` and `react-dom` are optional peers — only required if you use SSR/SSG features.
|
|
28
|
+
>
|
|
29
|
+
> `tailwindcss` is an optional peer — not required. All Tailwind utility classes are pre-compiled and bundled in `style.css`. Only install it if your own project also uses Tailwind.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
// Import components
|
|
37
|
+
import { Button, Input, Layout, Upload } from "tango-ui-cw";
|
|
38
|
+
|
|
39
|
+
// Import styles (required)
|
|
40
|
+
import "tango-ui-cw/base.css"; // ← 必须在 globals.css 之前
|
|
41
|
+
import "./globals.css";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Compound Components
|
|
45
|
+
|
|
46
|
+
```jsx
|
|
47
|
+
import { Button, Layout } from "tango-ui-cw";
|
|
48
|
+
|
|
49
|
+
const { MaterialButton } = Button
|
|
50
|
+
const { Header, Content } = Layout
|
|
51
|
+
|
|
52
|
+
// Access sub-components via dot notation
|
|
53
|
+
<MaterialButton>Click</MaterialButton>
|
|
54
|
+
<Header>...</Header>
|
|
55
|
+
<Content>...</Content>
|
|
56
|
+
|
|
57
|
+
// Or import directly
|
|
58
|
+
import { MaterialButton, Header, Content } from "tango-ui-cw";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Compatible Versions
|
|
64
|
+
|
|
65
|
+
| Package | Version | Note |
|
|
66
|
+
|---------|---------|------|
|
|
67
|
+
| React | >= 18 | Required |
|
|
68
|
+
| Next.js | >= 14 | Supported |
|
|
69
|
+
| React DOM | >= 18 | Required for SSR/SSG |
|
|
70
|
+
| tailwind-merge | ^3.6.0 | Required |
|
|
71
|
+
| Tailwind CSS | ^4 | Not required — utilities are pre-compiled |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Features
|
|
76
|
+
|
|
77
|
+
- **Zero-config Tailwind** — all utility classes are pre-compiled into the package; consumers don't need Tailwind installed
|
|
78
|
+
- **18+ components** — Button, Input, Layout, Upload, Modal, Drawer, Table, DatePicker, ColorPicker, Search, Tooltip, Notice, Banner, Space, Line, Mark, and more
|
|
79
|
+
- **`sx` prop styling** — three input forms: Tailwind string, CSS shorthand object, or slot-structured object for per-slot control
|
|
80
|
+
- **70+ CSS shorthand properties** — `useTangoStyle()` auto-resolves shorthand like `mt`, `bgc`, `aic` to full CSS properties
|
|
81
|
+
- **Slot-based architecture** — every component declares named slots, `normalizeSxSlots()` decomposes `sx` into per-slot `{ tw, css }`
|
|
82
|
+
- **CSS variable token system** — use `$primary`, `$border` in `sx` values, auto-expanded to `var(--primary)`
|
|
83
|
+
- **Tailwind CSS powered** — `mergeTwClassNames()` for intelligent class conflict resolution via tailwind-merge
|
|
84
|
+
- **Material Design variants** — `Button.MaterialButton` with ripple effect, `Input.MaterialInput` with floating label
|
|
85
|
+
- **Compound component pattern** — `Layout.Header`, `Layout.Sider`, `Button.MaterialButton` etc., also available as named exports
|
|
86
|
+
- **Theme customization** — light/dark mode via `ThemeProvider`, runtime token overrides with `setThemeTokens()` / `setThemeColor()`
|
|
87
|
+
- **100+ CSS custom properties** — oklch color space, semantic tokens for every component, responsive breakpoints
|
|
88
|
+
- **Smooth theme transitions** — automatic transition animation when switching light/dark mode
|
|
89
|
+
- **i18n built-in** — `TangoI18nProvider` with zh-CN / en-US packs, custom message merging, dot-path `t()` lookup
|
|
90
|
+
- **Imperative notifications** — `useNotice()` with success / fail / caution variants and auto-dismiss
|
|
91
|
+
- **Neumorphism support** — Button `enu` variant with soft-UI shadow effects
|
|
92
|
+
- **Controlled & uncontrolled** — Input, DatePicker, ColorPicker, Tooltip all support both patterns
|
|
93
|
+
- **`'use client'` ready** — all components marked as client components, fully compatible with Next.js RSC
|
|
94
|
+
- **forwardRef support** — ref forwarding on Layout sub-components, Space, Tooltip, Notice, Upload, and more
|
|
95
|
+
- **Data attributes** — `data-variant`, `data-size` on Button for external CSS selector hooks
|
|
96
|
+
- **Tree-shakable** — ESM first with CJS fallback
|
|
97
|
+
- **TypeScript ready** — full `.d.ts` type declarations included and Support editor auto-inference
|
|
98
|
+
|
|
99
|
+
### 特性(中文)
|
|
100
|
+
|
|
101
|
+
- **零配置 Tailwind** — 所有工具类已预编译打包,消费者无需安装 Tailwind
|
|
102
|
+
- **18+ 组件** — Button、Input、Layout、Upload、Modal、Drawer、Table、DatePicker、ColorPicker、Search、Tooltip、Notice、Banner、Space、Line、Mark 等
|
|
103
|
+
- **`sx` 属性样式** — 三种输入形式:Tailwind 字符串、CSS 简写对象、或按 slot 分层的结构化对象
|
|
104
|
+
- **70+ CSS 简写属性** — `useTangoStyle()` 自动将 `mt`、`bgc`、`aic` 等简写解析为完整 CSS 属性
|
|
105
|
+
- **Slot 架构** — 每个组件声明命名 slot,`normalizeSxSlots()` 将 `sx` 分解为每个 slot 的 `{ tw, css }`
|
|
106
|
+
- **CSS 变量 Token 系统** — 在 `sx` 值中使用 `$primary`、`$border`,自动展开为 `var(--primary)`
|
|
107
|
+
- **Tailwind CSS 驱动** — `mergeTwClassNames()` 基于 tailwind-merge 智能解决类名冲突
|
|
108
|
+
- **Material Design 变体** — `Button.MaterialButton` 带涟漪效果,`Input.MaterialInput` 带浮动标签
|
|
109
|
+
- **复合组件模式** — `Layout.Header`、`Layout.Sider`、`Button.MaterialButton` 等,同时支持命名导出
|
|
110
|
+
- **主题定制** — 通过 `ThemeProvider` 切换亮/暗模式,`setThemeTokens()` / `setThemeColor()` 运行时覆盖 token
|
|
111
|
+
- **100+ CSS 自定义属性** — oklch 色彩空间,每个组件的语义化 token,响应式断点
|
|
112
|
+
- **平滑主题过渡** — 切换亮/暗模式时自动播放过渡动画
|
|
113
|
+
- **内置国际化** — `TangoI18nProvider` 支持 zh-CN / en-US 语言包,自定义消息合并,点路径 `t()` 查找
|
|
114
|
+
- **命令式通知** — `useNotice()` 提供 success / fail / caution 变体,支持自动消失
|
|
115
|
+
- **拟物风支持** — Button `enu` 变体带柔和 UI 阴影效果
|
|
116
|
+
- **受控与非受控** — Input、DatePicker、ColorPicker、Tooltip 均支持两种模式
|
|
117
|
+
- **`'use client'` 就绪** — 所有组件标记为客户端组件,完全兼容 Next.js RSC
|
|
118
|
+
- **forwardRef 支持** — Layout 子组件、Space、Tooltip、Notice、Upload 等支持 ref 转发
|
|
119
|
+
- **Data 属性** — Button 上的 `data-variant`、`data-size` 可用于外部 CSS 选择器
|
|
120
|
+
- **可 Tree-shaking** — ESM 优先,同时提供 CJS 回退
|
|
121
|
+
- **TypeScript 就绪** — 包含完整的 `.d.ts` 类型声明,支持编辑器自动推断
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { CSSProperties } from "react";
|
|
2
|
-
|
|
3
|
-
export type SxStyleObject = CSSProperties & {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export type SxSlotValue =
|
|
8
|
-
| string
|
|
9
|
-
| SxStyleObject
|
|
10
|
-
| {
|
|
11
|
-
tw?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
css?: SxStyleObject;
|
|
14
|
-
style?: SxStyleObject;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type SxValue =
|
|
18
|
-
| string
|
|
19
|
-
| SxStyleObject
|
|
20
|
-
| {
|
|
21
|
-
root?: SxSlotValue;
|
|
22
|
-
slots?: Record<string, SxSlotValue>;
|
|
23
|
-
tw?: string;
|
|
24
|
-
className?: string;
|
|
25
|
-
css?: SxStyleObject;
|
|
26
|
-
style?: SxStyleObject;
|
|
27
|
-
[slotOrStyle: string]: unknown;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type NormalizedSxSlot = {
|
|
31
|
-
tw: string;
|
|
32
|
-
css: SxStyleObject;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export declare const useTangoStyle: (sx?: SxStyleObject) => SxStyleObject;
|
|
36
|
-
|
|
37
|
-
export declare const mergeTwClassNames: (
|
|
38
|
-
...inputs: Array<string | null | undefined | false>
|
|
39
|
-
) => string;
|
|
40
|
-
|
|
41
|
-
export declare const normalizeSxSlots: (
|
|
42
|
-
sx: SxValue,
|
|
43
|
-
slotNames?: string[]
|
|
44
|
-
) => Record<string, NormalizedSxSlot>;
|
|
45
|
-
|
|
46
|
-
export declare const createSlotProps: (options?: {
|
|
47
|
-
baseClassName?: string;
|
|
48
|
-
className?: string;
|
|
49
|
-
baseStyle?: SxStyleObject;
|
|
50
|
-
style?: SxStyleObject;
|
|
51
|
-
sxSlot?: NormalizedSxSlot;
|
|
52
|
-
}) => {
|
|
53
|
-
className: string;
|
|
54
|
-
style: SxStyleObject;
|
|
55
|
-
};
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
|
|
3
|
+
export type SxStyleObject = CSSProperties & {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type SxSlotValue =
|
|
8
|
+
| string
|
|
9
|
+
| SxStyleObject
|
|
10
|
+
| {
|
|
11
|
+
tw?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
css?: SxStyleObject;
|
|
14
|
+
style?: SxStyleObject;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type SxValue =
|
|
18
|
+
| string
|
|
19
|
+
| SxStyleObject
|
|
20
|
+
| {
|
|
21
|
+
root?: SxSlotValue;
|
|
22
|
+
slots?: Record<string, SxSlotValue>;
|
|
23
|
+
tw?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
css?: SxStyleObject;
|
|
26
|
+
style?: SxStyleObject;
|
|
27
|
+
[slotOrStyle: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type NormalizedSxSlot = {
|
|
31
|
+
tw: string;
|
|
32
|
+
css: SxStyleObject;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export declare const useTangoStyle: (sx?: SxStyleObject) => SxStyleObject;
|
|
36
|
+
|
|
37
|
+
export declare const mergeTwClassNames: (
|
|
38
|
+
...inputs: Array<string | null | undefined | false>
|
|
39
|
+
) => string;
|
|
40
|
+
|
|
41
|
+
export declare const normalizeSxSlots: (
|
|
42
|
+
sx: SxValue,
|
|
43
|
+
slotNames?: string[]
|
|
44
|
+
) => Record<string, NormalizedSxSlot>;
|
|
45
|
+
|
|
46
|
+
export declare const createSlotProps: (options?: {
|
|
47
|
+
baseClassName?: string;
|
|
48
|
+
className?: string;
|
|
49
|
+
baseStyle?: SxStyleObject;
|
|
50
|
+
style?: SxStyleObject;
|
|
51
|
+
sxSlot?: NormalizedSxSlot;
|
|
52
|
+
}) => {
|
|
53
|
+
className: string;
|
|
54
|
+
style: SxStyleObject;
|
|
55
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./index";
|
|
1
|
+
export * from "./index";
|
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
-
import type { SxValue } from "../CSSFab";
|
|
3
|
-
|
|
4
|
-
export type BannerLevel = "info" | "success" | "warning" | "error";
|
|
5
|
-
export type BannerSize = "small" | "normal" | "large";
|
|
6
|
-
|
|
7
|
-
export type BannerI18nKey = "cancel" | "action" | (string & {});
|
|
8
|
-
|
|
9
|
-
export type BannerLocaleText = Partial<
|
|
10
|
-
Record<"cancel" | "action" | string, string>
|
|
11
|
-
>;
|
|
12
|
-
|
|
13
|
-
export interface BannerProps
|
|
14
|
-
extends Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "className" | "children"> {
|
|
15
|
-
/** Banner content text; falls back to i18n cancel text if omitted */
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
/** Fired when close/cancel button is clicked */
|
|
18
|
-
onCancel?: () => void;
|
|
19
|
-
/** Fired when action button is clicked */
|
|
20
|
-
onAction?: () => void;
|
|
21
|
-
/** Banner size variant */
|
|
22
|
-
size?: BannerSize;
|
|
23
|
-
/** Custom cancel button text (overrides i18n) */
|
|
24
|
-
cancelText?: string;
|
|
25
|
-
/** Custom action button text (overrides i18n) */
|
|
26
|
-
actionText?: string;
|
|
27
|
-
/** Level determines icon & color scheme */
|
|
28
|
-
level?: BannerLevel;
|
|
29
|
-
/** Transparent mode: background becomes transparent, text turns gray */
|
|
30
|
-
transparent?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/** Custom
|
|
34
|
-
|
|
35
|
-
/** Custom
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import type { SxValue } from "../CSSFab";
|
|
3
|
+
|
|
4
|
+
export type BannerLevel = "info" | "success" | "warning" | "error";
|
|
5
|
+
export type BannerSize = "small" | "normal" | "large";
|
|
6
|
+
|
|
7
|
+
export type BannerI18nKey = "cancel" | "action" | (string & {});
|
|
8
|
+
|
|
9
|
+
export type BannerLocaleText = Partial<
|
|
10
|
+
Record<"cancel" | "action" | string, string>
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
export interface BannerProps
|
|
14
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "className" | "children"> {
|
|
15
|
+
/** Banner content text; falls back to i18n cancel text if omitted */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/** Fired when close/cancel button is clicked */
|
|
18
|
+
onCancel?: () => void;
|
|
19
|
+
/** Fired when action button is clicked */
|
|
20
|
+
onAction?: () => void;
|
|
21
|
+
/** Banner size variant */
|
|
22
|
+
size?: BannerSize;
|
|
23
|
+
/** Custom cancel button text (overrides i18n) */
|
|
24
|
+
cancelText?: string;
|
|
25
|
+
/** Custom action button text (overrides i18n) */
|
|
26
|
+
actionText?: string;
|
|
27
|
+
/** Level determines icon & color scheme */
|
|
28
|
+
level?: BannerLevel;
|
|
29
|
+
/** Transparent mode: background becomes transparent, text turns gray */
|
|
30
|
+
transparent?: boolean;
|
|
31
|
+
/** Whether to show cancel/action buttons; keep only X icon when false */
|
|
32
|
+
showActionButtons?: boolean;
|
|
33
|
+
/** Custom background color (overrides level default) */
|
|
34
|
+
bannerBgColor?: string;
|
|
35
|
+
/** Custom border color (overrides level default) */
|
|
36
|
+
bannerBorderColor?: string;
|
|
37
|
+
/** Custom icon color (overrides level default) */
|
|
38
|
+
bannerIconColor?: string;
|
|
39
|
+
/** Style extension via CSSFab sx (string / object / slot) */
|
|
40
|
+
sx?: SxValue;
|
|
41
|
+
style?: CSSProperties;
|
|
42
|
+
className?: string;
|
|
43
|
+
/** i18n key for built-in text lookup */
|
|
44
|
+
i18nKey?: BannerI18nKey;
|
|
45
|
+
/** Override locale text map */
|
|
46
|
+
localeText?: BannerLocaleText;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare function Banner(props: BannerProps): JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { Banner };
|
|
52
|
+
export default Banner;
|