@cloudtower/eagle 0.33.13 → 0.33.14
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/dist/cjs/core/Banner/banner.style.js +11 -0
- package/dist/cjs/core/Banner/index.js +32 -0
- package/dist/cjs/index.js +55 -53
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2932 -2904
- package/dist/esm/core/Banner/banner.style.js +6 -0
- package/dist/esm/core/Banner/index.js +25 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +3422 -3394
- package/dist/src/core/Banner/banner.style.d.ts +4 -0
- package/dist/src/core/Banner/banner.types.d.ts +28 -0
- package/dist/src/core/Banner/index.d.ts +3 -0
- package/dist/src/core/index.d.ts +1 -0
- package/dist/stories/docs/core/Banner.stories.d.ts +53 -0
- package/dist/style.css +2736 -2709
- package/package.json +4 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const BasicBanner: import("@linaria/core").LinariaClassName;
|
|
2
|
+
export declare const ErrorBanner: import("@linaria/core").LinariaClassName;
|
|
3
|
+
export declare const InfoBanner: import("@linaria/core").LinariaClassName;
|
|
4
|
+
export declare const WarningBanner: import("@linaria/core").LinariaClassName;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { ButtonProps } from "../Button";
|
|
3
|
+
/**
|
|
4
|
+
* Banner组件的属性
|
|
5
|
+
* @property {('error' | 'info' | 'warning')} type - Banner的类型,决定背景色和样式
|
|
6
|
+
* @property {string} message - Banner显示的消息内容
|
|
7
|
+
* @property {object} [btnProps] - 按钮相关配置,包含文本、点击事件和显示控制
|
|
8
|
+
* @property {function} [btnProps.onClick] - 按钮点击事件的回调函数
|
|
9
|
+
* @property {string} btnProps.text - 按钮显示的文本
|
|
10
|
+
* @property {boolean} [btnProps.hide] - 是否隐藏按钮,默认为false
|
|
11
|
+
* @example
|
|
12
|
+
* {
|
|
13
|
+
* type: "warning",
|
|
14
|
+
* message: "系统将在30分钟后进行维护",
|
|
15
|
+
* btnProps: {
|
|
16
|
+
* text: "了解详情",
|
|
17
|
+
* onClick: () => { console.log("查看详情") }
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
export type BannerProps = HTMLAttributes<"DIV"> & {
|
|
22
|
+
type: "error" | "info" | "warning";
|
|
23
|
+
message: string;
|
|
24
|
+
btnProps?: Pick<ButtonProps, "onClick"> & {
|
|
25
|
+
text: string;
|
|
26
|
+
hide?: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import { Banner } from "../../../src/core/Banner";
|
|
4
|
+
/**
|
|
5
|
+
* * Banner 组件
|
|
6
|
+
* * 用于在页面顶部显示重要的系统通知或警告信息
|
|
7
|
+
* * 支持三种不同类型:错误(error)、信息(info)和警告(warning)
|
|
8
|
+
* * 可配置按钮文本和点击事件
|
|
9
|
+
*/
|
|
10
|
+
declare const meta: {
|
|
11
|
+
title: string;
|
|
12
|
+
component: React.FC<import("../../../src/core/Banner/banner.types").BannerProps>;
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
tags: string[];
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof Banner>;
|
|
24
|
+
/**
|
|
25
|
+
* 错误类型横幅
|
|
26
|
+
* 用于显示系统错误、严重问题或操作失败等紧急信息
|
|
27
|
+
*/
|
|
28
|
+
export declare const Error: Story;
|
|
29
|
+
/**
|
|
30
|
+
* 信息类型横幅
|
|
31
|
+
* 用于显示一般性的系统通知或提示信息
|
|
32
|
+
*/
|
|
33
|
+
export declare const Info: Story;
|
|
34
|
+
/**
|
|
35
|
+
* 警告类型横幅
|
|
36
|
+
* 用于显示需要用户注意的警告信息
|
|
37
|
+
*/
|
|
38
|
+
export declare const Warning: Story;
|
|
39
|
+
/**
|
|
40
|
+
* 无按钮横幅
|
|
41
|
+
* 展示不带操作按钮的纯通知横幅
|
|
42
|
+
*/
|
|
43
|
+
export declare const WithoutButton: Story;
|
|
44
|
+
/**
|
|
45
|
+
* 长文本横幅
|
|
46
|
+
* 展示包含较长文本内容的横幅
|
|
47
|
+
*/
|
|
48
|
+
export declare const LongMessage: Story;
|
|
49
|
+
/**
|
|
50
|
+
* 自定义样式
|
|
51
|
+
* 展示如何为Banner添加自定义样式
|
|
52
|
+
*/
|
|
53
|
+
export declare const CustomStyle: Story;
|