@cloudtower/eagle 0.27.32 → 0.27.35

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.
@@ -0,0 +1,10 @@
1
+ export declare const DoubleRowOptionStyleWrapper: import("@linaria/core").LinariaClassName;
2
+ export declare const CascaderDefaultOptionLabel: import("@linaria/core").LinariaClassName;
3
+ export declare const CascaderNotData: import("@linaria/core").LinariaClassName;
4
+ export declare const CascaderDefaultHeaderSearch: import("@linaria/core").LinariaClassName;
5
+ export declare const CascaderInputStyle: import("@linaria/core").LinariaClassName;
6
+ export declare const CascaderDefaultHeaderContainer: import("@linaria/core").LinariaClassName;
7
+ export declare const CascaderDefaultHeader: import("@linaria/core").LinariaClassName;
8
+ export declare const CascaderDropdown: import("@linaria/core").LinariaClassName;
9
+ export declare const CascaderSmallDropdown: import("@linaria/core").LinariaClassName;
10
+ export declare const CascaderLargeDropdown: import("@linaria/core").LinariaClassName;
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ import { SearchInputProps } from "@src/spec/base";
3
+ import type { CascaderProps as Antd5CascaderProps } from "antd5/lib/cascader";
4
+ export type { Antd5SizeType } from "@src/utils/type";
5
+ export type PresetCascaderRenderProps = {
6
+ menus: Parameters<NonNullable<CascaderProps["dropdownRender"]>>[0];
7
+ header?: React.ReactNode;
8
+ footer?: React.ReactNode;
9
+ presetHeaderProps?: {
10
+ searchProps?: SearchInputProps;
11
+ defaultContent?: {
12
+ hide?: boolean;
13
+ label?: React.ReactNode;
14
+ onClickAll?: (selectedAll: boolean) => void;
15
+ };
16
+ };
17
+ };
18
+ export type CascaderProps = Antd5CascaderProps & {
19
+ /**
20
+ * 自定义下拉菜单内容,具体可以参考[antd5](https://ant.design/components/cascader-cn/#API)
21
+ * 注意:如果需要自定义下拉菜单,会覆盖掉已有的 header / footer 表现。
22
+ */
23
+ dropdownRender?: Antd5CascaderProps["dropdownRender"];
24
+ /**
25
+ * 新增 props: 自定义空白状态时的显示内容, 默认水平垂直居中。如果需要自定义样式,可以使用 notFoundContent
26
+ */
27
+ NotData?: string | React.ReactNode;
28
+ /**
29
+ * 新增 props: 透传参数给预设的级联下拉菜单内容
30
+ */
31
+ presetCascaderRenderProps?: Omit<PresetCascaderRenderProps, "menus">;
32
+ };
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { PresetCascaderRenderProps, CascaderProps } from "./cascader.type";
3
+ export declare const NotDataContent: React.FC<{
4
+ content: React.ReactNode | string;
5
+ }>;
6
+ export declare const PresetCascaderHeader: React.FC<PresetCascaderRenderProps["presetHeaderProps"]>;
7
+ export declare const PresetCascaderRender: React.FC<PresetCascaderRenderProps>;
8
+ export declare const CascaderDoubleRowOption: React.FC<{
9
+ leftTop?: React.ReactNode;
10
+ leftBottom?: React.ReactNode;
11
+ rightTop?: React.ReactNode;
12
+ rightBottom?: React.ReactNode;
13
+ }>;
14
+ export declare const CascaderOptionWithCount: React.FC<{
15
+ label?: React.ReactNode;
16
+ count?: {
17
+ selected: number;
18
+ total: number;
19
+ };
20
+ }>;
21
+ export declare const defaultTagRender: CascaderProps["tagRender"];
@@ -1,4 +1,4 @@
1
- import { CascaderProps } from "antd5";
2
1
  import React from "react";
2
+ import { CascaderProps } from "./cascader.type";
3
3
  declare const Cascader: React.FC<CascaderProps>;
4
4
  export default Cascader;
@@ -0,0 +1,2 @@
1
+ export declare const CheckboxStyleContent = "\n.ant-checkbox {\n height: 22px;\n display: flex;\n align-items: center;\n top: 0;\n}\n.ant-checkbox-checked::after {\n border: none;\n}\n&.ant-checkbox-wrapper:hover .ant-checkbox-inner,\n&.ant-checkbox-wrapper.__pseudo-states-hover .ant-checkbox-inner,\n.ant-checkbox:hover .ant-checkbox-inner {\n border-color: $fills-light-general-general;\n}\n\n.ant-checkbox .ant-checkbox-inner {\n border: 1px solid $strokes-light-trans-4;\n}\n.ant-checkbox.ant-checkbox-checked,\n.ant-checkbox.ant-checkbox-indeterminate {\n .ant-checkbox-inner {\n border: 1px solid $fills-light-general-general;\n }\n}\n\n.ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner {\n background: $fills-light-general-general;\n &:after {\n background-color: $white;\n height: 2px;\n width: 10px;\n border-radius: 2px;\n }\n}\n\n&.ant-checkbox-wrapper-disabled {\n opacity: 0.5;\n .ant-checkbox-disabled .ant-checkbox-inner {\n background: $fills-light-trans-3;\n border-color: $strokes-light-trans-4 !important;\n }\n .ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner:after {\n border-color: $text-primary-light;\n }\n .ant-checkbox-disabled.ant-checkbox-indeterminate\n .ant-checkbox-inner:after {\n background: $text-primary-light;\n }\n}\n\n.ant-checkbox + span,\n.ant-checkbox-disabled + span {\n padding: 0;\n .main {\n display: inline-block;\n margin-left: 12px;\n color: $text-primary-light;\n }\n .sub {\n margin-left: 28px;\n color: $text-secondary-light;\n }\n}\n\n&.compact {\n .ant-checkbox + span,\n .ant-checkbox-disabled + span {\n .main {\n margin-left: 8px;\n }\n .sub {\n margin-left: 24px;\n }\n }\n}\n";
2
+ export declare const CheckboxStyle: import("@linaria/core").LinariaClassName;
@@ -297,7 +297,7 @@ export type ModalProps = Omit<AntdModalProps, "okType"> & {
297
297
  disablePrevStep?: boolean;
298
298
  } | boolean;
299
299
  };
300
- type SearchInputProps = Omit<InputProps, "onChange"> & {
300
+ export type SearchInputProps = Omit<InputProps, "onChange"> & {
301
301
  onChange: (value: string) => void;
302
302
  debounceWait?: number;
303
303
  };
@@ -3,3 +3,4 @@ export declare const EMPTY_ARRAY: never[];
3
3
  export declare const EMPTY_OBJECT: {};
4
4
  export declare const EMPTY_COMPONENT: () => null;
5
5
  export declare const DAYJS_I18N_MAP: Record<string, string>;
6
+ export declare const Antd5PrefixCls = "antd5";
@@ -0,0 +1,62 @@
1
+ import Cascader from "@src/components/Cascader";
2
+ import { CascaderProps } from "@src/components/Cascader/cascader.type";
3
+ import type { StoryObj } from "@storybook/react";
4
+ import React from "react";
5
+ /**
6
+ * * antd5 组件
7
+ * * 更多 props 请参考:https://ant.design/components/cascader-cn#api
8
+ * * 自定义 props 已在表格进行说明
9
+ *
10
+ */
11
+ declare const meta: {
12
+ component: React.FC<CascaderProps>;
13
+ title: "Core/Cascader | 级联组件";
14
+ args: {
15
+ options: {
16
+ value: string;
17
+ label: string;
18
+ children: {
19
+ value: string;
20
+ label: string;
21
+ }[];
22
+ }[];
23
+ };
24
+ parameters: {
25
+ design: {
26
+ type: string;
27
+ url: string;
28
+ };
29
+ };
30
+ };
31
+ export default meta;
32
+ type Story = StoryObj<typeof Cascader>;
33
+ /**
34
+ * 注意: 全选需要自行封装相关实现, 非组件默认行为
35
+ */
36
+ export declare const Size: Story;
37
+ /**
38
+ * 需要展示空白状态时,可以通过 NotData 来处理。
39
+ */
40
+ export declare const Empty: Story;
41
+ /**
42
+ * NotData 同样可以接受 React.ReactNode 类型,来自定义空白状态里的内容。例如常见的加载失败。
43
+ */
44
+ export declare const FetchError: Story;
45
+ /**
46
+ * UI-KIT 同时提供了 CascaderDoubleRowOption 组件,当需要使用 double row 时,可以自行封装
47
+ *
48
+ * option 中的 label 如果是 ReactNode 的情况下,可以通过 label[0].props 获取到一些额外自定义在组件上的属性来进一步处理。例如示例中的 data-label-text
49
+ */
50
+ export declare const DoubleRow: Story;
51
+ /**
52
+ * 通过 children 来覆盖 cascader 自带的 input 组件
53
+ */
54
+ export declare const FilterIcon: Story;
55
+ /**
56
+ * 示例: 根据数据中心分级,选择多个集群
57
+ */
58
+ export declare const Multiple: Story;
59
+ /**
60
+ * 示例:根据可用域分级,筛选主机
61
+ */
62
+ export declare const Filter: Story;
@@ -0,0 +1,10 @@
1
+ import type { Meta, Args } from "@storybook/react";
2
+ type CoreTitle = `Core/${string} | ${string}`;
3
+ export type CoreMeta<TCmpOrArgs = Args> = Meta<TCmpOrArgs> & {
4
+ title: CoreTitle;
5
+ };
6
+ type CoreXTitle = `CoreX/${string} | ${string}`;
7
+ export type CoreXMeta<TCmpOrArgs = Args> = Meta<TCmpOrArgs> & {
8
+ title: CoreXTitle;
9
+ };
10
+ export {};