@yoka-ui/ui 1.1.1 → 1.1.5
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/@Docs-yoka/exports.generated.md +53 -4
- package/dist/es/assets/image/skills.zip +0 -0
- package/dist/es/business/AiChat/index.js +15 -13
- package/dist/es/business/AiChat/index.js.map +2 -2
- package/dist/es/business/AiChat/useAiChat.js +41 -24
- package/dist/es/business/AiChat/useAiChat.js.map +2 -2
- package/dist/es/business/Editor/index.d.ts +2 -2
- package/dist/es/business/Editor/index.js.map +2 -2
- package/dist/es/business/Empty/index.d.ts +1 -1
- package/dist/es/business/Empty/index.js.map +1 -1
- package/dist/es/business/ModCommonFilter/index.d.ts +1 -0
- package/dist/es/business/ModCommonFilter/index.js.map +2 -2
- package/dist/es/business/YkLoginModule/index.d.ts +1 -0
- package/dist/es/business/YkLoginModule/index.js.map +2 -2
- package/dist/es/business/YkPorjectSelect/index.d.ts +3 -3
- package/dist/es/business/YkPorjectSelect/index.js +37 -51
- package/dist/es/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/es/business/YkSqlEdit/index.d.ts +1 -0
- package/dist/es/business/YkSqlEdit/index.js.map +2 -2
- package/dist/es/components/Clock/index.d.ts +2 -2
- package/dist/es/components/Clock/index.js.map +2 -2
- package/dist/es/components/DebounceInput/index.d.ts +2 -2
- package/dist/es/components/DebounceInput/index.js.map +2 -2
- package/dist/es/components/MultipleSelect/index.d.ts +2 -2
- package/dist/es/components/MultipleSelect/index.js.map +2 -2
- package/dist/es/components/RefreshButton/index.d.ts +2 -2
- package/dist/es/components/RefreshButton/index.js.map +2 -2
- package/dist/es/components/SearchWithHistory/index.d.ts +1 -1
- package/dist/es/components/SearchWithHistory/index.js.map +1 -1
- package/dist/es/components/TextWithInput/index.d.ts +2 -5
- package/dist/es/components/TextWithInput/index.js.map +2 -2
- package/dist/es/components/TextWithToolTip/index.d.ts +2 -2
- package/dist/es/components/TextWithToolTip/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/index.d.ts +1 -0
- package/dist/es/components/TreeTransfer/index.js.map +2 -2
- package/dist/es/index.d.ts +29 -0
- package/dist/es/index.js.map +2 -2
- package/dist/es/index.less +1 -0
- package/dist/es/layout/YkContainer/index.d.ts +24 -14
- package/dist/es/layout/YkContainer/index.js +7 -41
- package/dist/es/layout/YkContainer/index.js.map +2 -2
- package/dist/es/layout/YkContainer/index.module.less +73 -0
- package/dist/lib/assets/image/skills.zip +0 -0
- package/dist/lib/business/AiChat/index.js +15 -13
- package/dist/lib/business/AiChat/index.js.map +2 -2
- package/dist/lib/business/AiChat/useAiChat.js +40 -22
- package/dist/lib/business/AiChat/useAiChat.js.map +2 -2
- package/dist/lib/business/Editor/index.d.ts +2 -2
- package/dist/lib/business/Editor/index.js.map +2 -2
- package/dist/lib/business/Empty/index.d.ts +1 -1
- package/dist/lib/business/Empty/index.js.map +1 -1
- package/dist/lib/business/ModCommonFilter/index.d.ts +1 -0
- package/dist/lib/business/ModCommonFilter/index.js.map +2 -2
- package/dist/lib/business/YkLoginModule/index.d.ts +1 -0
- package/dist/lib/business/YkLoginModule/index.js.map +2 -2
- package/dist/lib/business/YkPorjectSelect/index.d.ts +3 -3
- package/dist/lib/business/YkPorjectSelect/index.js +33 -27
- package/dist/lib/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/lib/business/YkSqlEdit/index.d.ts +1 -0
- package/dist/lib/business/YkSqlEdit/index.js.map +2 -2
- package/dist/lib/components/Clock/index.d.ts +2 -2
- package/dist/lib/components/Clock/index.js.map +2 -2
- package/dist/lib/components/DebounceInput/index.d.ts +2 -2
- package/dist/lib/components/DebounceInput/index.js.map +2 -2
- package/dist/lib/components/MultipleSelect/index.d.ts +2 -2
- package/dist/lib/components/MultipleSelect/index.js.map +2 -2
- package/dist/lib/components/RefreshButton/index.d.ts +2 -2
- package/dist/lib/components/RefreshButton/index.js.map +2 -2
- package/dist/lib/components/SearchWithHistory/index.d.ts +1 -1
- package/dist/lib/components/SearchWithHistory/index.js.map +1 -1
- package/dist/lib/components/TextWithInput/index.d.ts +2 -5
- package/dist/lib/components/TextWithInput/index.js.map +2 -2
- package/dist/lib/components/TextWithToolTip/index.d.ts +2 -2
- package/dist/lib/components/TextWithToolTip/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/index.d.ts +1 -0
- package/dist/lib/components/TreeTransfer/index.js.map +2 -2
- package/dist/lib/index.d.ts +29 -0
- package/dist/lib/index.js.map +2 -2
- package/dist/lib/index.less +1 -0
- package/dist/lib/layout/YkContainer/index.d.ts +24 -14
- package/dist/lib/layout/YkContainer/index.js +6 -39
- package/dist/lib/layout/YkContainer/index.js.map +3 -3
- package/dist/lib/layout/YkContainer/index.module.less +73 -0
- package/package.json +6 -5
|
@@ -34,45 +34,12 @@ __export(YkContainer_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(YkContainer_exports);
|
|
35
35
|
var import_classnames = __toESM(require("classnames"));
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
justifyContent: "space-between",
|
|
44
|
-
gap: 12,
|
|
45
|
-
minHeight: 60,
|
|
46
|
-
padding: "10px 20px",
|
|
47
|
-
boxSizing: "border-box",
|
|
48
|
-
background: "#fff"
|
|
49
|
-
};
|
|
50
|
-
var titleStyle = {
|
|
51
|
-
margin: 0,
|
|
52
|
-
fontSize: 18,
|
|
53
|
-
fontWeight: 600,
|
|
54
|
-
lineHeight: "24px",
|
|
55
|
-
color: "#3b82fe"
|
|
56
|
-
};
|
|
57
|
-
var YkContainer = import_react.default.forwardRef(
|
|
58
|
-
({ className, style, children, title, headerLeft, headerRight, showHeader = true, ...rest }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
ref,
|
|
62
|
-
className: (0, import_classnames.default)("yoka-container", className),
|
|
63
|
-
style: {
|
|
64
|
-
display: "flex",
|
|
65
|
-
flexDirection: "column",
|
|
66
|
-
gap: 10,
|
|
67
|
-
padding: "0 10px 10px",
|
|
68
|
-
boxSizing: "border-box",
|
|
69
|
-
...style
|
|
70
|
-
},
|
|
71
|
-
...rest
|
|
72
|
-
},
|
|
73
|
-
showHeader ? /* @__PURE__ */ import_react.default.createElement("header", { style: headerBarStyle, className: "yoka-yk-container-header" }, /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center" } }, headerLeft !== void 0 && headerLeft !== null ? headerLeft : title != null && title !== "" ? /* @__PURE__ */ import_react.default.createElement("div", { style: titleStyle }, title) : null), headerRight ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flexShrink: 0, display: "flex", alignItems: "center" } }, headerRight) : null) : null,
|
|
74
|
-
children
|
|
75
|
-
)
|
|
37
|
+
var import_index_module = __toESM(require("./index.module.less"));
|
|
38
|
+
var YkContainer = (0, import_react.memo)(
|
|
39
|
+
(0, import_react.forwardRef)((props, ref) => {
|
|
40
|
+
const { className, style, children, title, subTitle, headerLeft, headerRight, showHeader = true, ...rest } = props;
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { ref, className: (0, import_classnames.default)("yoka-container", import_index_module.default.containerWrap, className), style, ...rest }, showHeader && /* @__PURE__ */ import_react.default.createElement("header", { className: import_index_module.default.headerBar }, /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.headerLeftWrap }, headerLeft ?? /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.titleRow }, title && /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.mainTitle }, title), subTitle && /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.subTitle }, subTitle))), headerRight && /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.headerRightWrap }, headerRight)), /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.contentWrap }, children));
|
|
42
|
+
})
|
|
76
43
|
);
|
|
77
44
|
YkContainer.displayName = "YkContainer";
|
|
78
45
|
var YkContainer_default = YkContainer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/layout/YkContainer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import classNames from 'classnames';\nimport React from 'react';\n\nexport type YkContainerProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> & {\n /**
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAuB;AACvB,
|
|
6
|
-
"names": ["React", "classNames"]
|
|
4
|
+
"sourcesContent": ["import classNames from 'classnames';\nimport React, { forwardRef, memo, ReactNode } from 'react';\nimport styles from './index.module.less';\n\nexport type YkContainerProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> & {\n /** 页头左侧主标题,字号18px、#3b82fe;headerLeft存在时不展示title与subTitle */\n title?: React.ReactNode;\n /** 页头左侧二级副标题,与title同行、下边线对齐;headerLeft优先级更高 */\n subTitle?: React.ReactNode;\n /** 自定义左侧整区域,优先级 > title+subTitle */\n headerLeft?: React.ReactNode;\n /** 右侧操作插槽:元素过多自动换行展示为两行及以上 */\n headerRight?: React.ReactNode;\n /** 是否渲染顶部固定页头,默认true */\n showHeader?: boolean;\n};\n\n/**\n * Yoka页面全局容器组件\n * 1. 顶部sticky吸顶页头:左侧主/副标题同行下边线对齐、右侧自适应操作区(按钮过多自动换行两行)\n * 2. 容器内部上下左右留白,子内容纵向间距10px,适配BI报表页面布局\n * 3. 遵循项目antd/yoka-ui规范,样式使用CSS Modules Less\n * @param title 主标题\n * @param subTitle 二级副标题,与title同行\n * @param headerLeft 自定义左侧全量插槽\n * @param headerRight 右侧操作区域,内容自动换行\n * @param showHeader 是否显示头部\n */\nconst YkContainer = memo(\n forwardRef<HTMLDivElement, YkContainerProps>((props, ref) => {\n const { className, style, children, title, subTitle, headerLeft, headerRight, showHeader = true, ...rest } = props;\n\n return (\n <div ref={ref} className={classNames('yoka-container', styles.containerWrap, className)} style={style} {...rest}>\n {showHeader && (\n <header className={styles.headerBar}>\n {/* 左侧标题区 */}\n <div className={styles.headerLeftWrap}>\n {headerLeft ?? (\n <div className={styles.titleRow}>\n {title && <div className={styles.mainTitle}>{title}</div>}\n {subTitle && <div className={styles.subTitle}>{subTitle}</div>}\n </div>\n )}\n </div>\n {/* 右侧操作区:核心flex-wrap:wrap 超出自动换行两行 */}\n {headerRight && <div className={styles.headerRightWrap}>{headerRight}</div>}\n </header>\n )}\n {/* 页面主体内容 */}\n <div className={styles.contentWrap}>{children}</div>\n </div>\n );\n }),\n);\n\nYkContainer.displayName = 'YkContainer';\nexport default YkContainer;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAuB;AACvB,mBAAmD;AACnD,0BAAmB;AA0BnB,IAAM,kBAAc;AAAA,MAClB,yBAA6C,CAAC,OAAO,QAAQ;AAC3D,UAAM,EAAE,WAAW,OAAO,UAAU,OAAO,UAAU,YAAY,aAAa,aAAa,MAAM,GAAG,KAAK,IAAI;AAE7G,WACE,6BAAAA,QAAA,cAAC,SAAI,KAAU,eAAW,kBAAAC,SAAW,kBAAkB,oBAAAC,QAAO,eAAe,SAAS,GAAG,OAAe,GAAG,QACxG,cACC,6BAAAF,QAAA,cAAC,YAAO,WAAW,oBAAAE,QAAO,aAExB,6BAAAF,QAAA,cAAC,SAAI,WAAW,oBAAAE,QAAO,kBACpB,cACC,6BAAAF,QAAA,cAAC,SAAI,WAAW,oBAAAE,QAAO,YACpB,SAAS,6BAAAF,QAAA,cAAC,SAAI,WAAW,oBAAAE,QAAO,aAAY,KAAM,GAClD,YAAY,6BAAAF,QAAA,cAAC,SAAI,WAAW,oBAAAE,QAAO,YAAW,QAAS,CAC1D,CAEJ,GAEC,eAAe,6BAAAF,QAAA,cAAC,SAAI,WAAW,oBAAAE,QAAO,mBAAkB,WAAY,CACvE,GAGF,6BAAAF,QAAA,cAAC,SAAI,WAAW,oBAAAE,QAAO,eAAc,QAAS,CAChD;AAAA,EAEJ,CAAC;AACH;AAEA,YAAY,cAAc;AAC1B,IAAO,sBAAQ;",
|
|
6
|
+
"names": ["React", "classNames", "styles"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.containerWrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 10px;
|
|
5
|
+
padding: 0 10px 10px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// 顶部吸顶头部容器
|
|
10
|
+
.headerBar {
|
|
11
|
+
position: sticky;
|
|
12
|
+
top: 0;
|
|
13
|
+
z-index: 10;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
padding: 10px 20px;
|
|
18
|
+
min-height: 60px;
|
|
19
|
+
background: #fff;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
gap: 12px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 左侧标题区域
|
|
25
|
+
.headerLeftWrap {
|
|
26
|
+
flex: 1;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
|
|
29
|
+
.titleRow {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: baseline;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mainTitle {
|
|
36
|
+
margin: 0;
|
|
37
|
+
font-size: 18px;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
line-height: 24px;
|
|
40
|
+
color: #3b82fe;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.subTitle {
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
line-height: 24px;
|
|
48
|
+
color: #666;
|
|
49
|
+
word-break: break-all;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 右侧操作区【关键:自动换行】
|
|
54
|
+
.headerRightWrap {
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-wrap: wrap; // 空间不足自动换行,实现两行布局
|
|
58
|
+
justify-content: flex-end;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 8px; // 按钮横向间距
|
|
61
|
+
row-gap: 8px; // 换行后两行纵向间距
|
|
62
|
+
max-width: 55%; // 限制最大宽度,避免挤压左侧标题
|
|
63
|
+
|
|
64
|
+
// 适配antd/yoka-ui按钮、标签等组件
|
|
65
|
+
:global(.ant-btn, .yoka-btn) {
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 页面内容区
|
|
71
|
+
.contentWrap {
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoka-ui/ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "",
|
|
@@ -102,10 +102,11 @@
|
|
|
102
102
|
"@changesets/cli": "^2.27.1",
|
|
103
103
|
"@commitlint/cli": "^20.5.0",
|
|
104
104
|
"@commitlint/config-conventional": "^20.5.0",
|
|
105
|
-
"@storybook/addon-a11y": "10.
|
|
106
|
-
"@storybook/addon-docs": "10.
|
|
105
|
+
"@storybook/addon-a11y": "10.4.1",
|
|
106
|
+
"@storybook/addon-docs": "10.4.1",
|
|
107
107
|
"@storybook/addon-webpack5-compiler-swc": "4.0.3",
|
|
108
|
-
"@storybook/react
|
|
108
|
+
"@storybook/react": "10.4.1",
|
|
109
|
+
"@storybook/react-webpack5": "10.4.1",
|
|
109
110
|
"@storybook/test-runner": "0.24.3",
|
|
110
111
|
"@testing-library/jest-dom": "^6.9.1",
|
|
111
112
|
"@testing-library/react": "^13.4.0",
|
|
@@ -128,7 +129,7 @@
|
|
|
128
129
|
"less-loader": "^12.3.2",
|
|
129
130
|
"lint-staged": "^16.2.7",
|
|
130
131
|
"rimraf": "^6.1.2",
|
|
131
|
-
"storybook": "^10.
|
|
132
|
+
"storybook": "^10.4.1",
|
|
132
133
|
"style-loader": "^4.0.0",
|
|
133
134
|
"stylelint": "^14",
|
|
134
135
|
"ts-node": "^10.9.1",
|