@lobehub/ui 5.50.2 → 5.51.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/es/base-ui/Input/style.d.mts +2 -2
- package/es/base-ui/Segmented/style.mjs +4 -0
- package/es/base-ui/Segmented/style.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs +130 -132
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/style.mjs +360 -237
- package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/ConsoleBrand.mjs +1 -3
- package/es/dashboard/ConsoleShell/ConsoleBrand.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/style.mjs +16 -12
- package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
- package/es/eslint/index.d.mts +12 -4
- package/es/eslint/index.mjs +108 -51
- package/es/eslint/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleBrand.mjs","names":[],"sources":["../../../src/dashboard/ConsoleShell/ConsoleBrand.tsx"],"sourcesContent":["'use client';\n\nimport { useConsoleShellState } from './context';\nimport { styles } from './style';\nimport type { ConsoleBrandProps } from './type';\n\nfunction ConsoleBrand({ href = '/', label, logo, renderLink, title }: ConsoleBrandProps) {\n const shell = useConsoleShellState();\n const
|
|
1
|
+
{"version":3,"file":"ConsoleBrand.mjs","names":[],"sources":["../../../src/dashboard/ConsoleShell/ConsoleBrand.tsx"],"sourcesContent":["'use client';\n\nimport { useConsoleShellState } from './context';\nimport { styles } from './style';\nimport type { ConsoleBrandProps } from './type';\n\nfunction ConsoleBrand({ href = '/', label, logo, renderLink, title }: ConsoleBrandProps) {\n const shell = useConsoleShellState();\n const content =\n title == null || title === false || title === '' ? (\n logo\n ) : (\n <span className={styles.brandLockup}>\n {logo}\n <span className={styles.brandName}>{title}</span>\n </span>\n );\n const linkProps = {\n 'aria-label': label ?? (typeof title === 'string' ? title : 'Home'),\n 'children': content,\n 'className': styles.brandAnchor,\n href,\n 'onClick': () => shell?.closeNavigation(),\n };\n if (renderLink) return renderLink(linkProps);\n return (\n <a\n aria-label={linkProps['aria-label']}\n className={linkProps.className}\n href={href}\n onClick={linkProps.onClick}\n >\n {content}\n </a>\n );\n}\n\nConsoleBrand.displayName = 'ConsoleBrand';\n\nexport default ConsoleBrand;\n"],"mappings":";;;;;AAMA,SAAS,aAAa,EAAE,OAAO,KAAK,OAAO,MAAM,YAAY,SAA4B;CACvF,MAAM,QAAQ,qBAAqB;CACnC,MAAM,UACJ,SAAS,QAAQ,UAAU,SAAS,UAAU,KAC5C,OAEA,qBAAC,QAAD;EAAM,WAAW,OAAO;EAAxB,UAAA,CACG,MACD,oBAAC,QAAD;GAAM,WAAW,OAAO;GAAY,UAAA;EAAY,CAAA,CAC5C;;CAEV,MAAM,YAAY;EAChB,cAAc,UAAU,OAAO,UAAU,WAAW,QAAQ;EAC5D,YAAY;EACZ,aAAa,OAAO;EACpB;EACA,iBAAiB,OAAO,gBAAgB;CAC1C;CACA,IAAI,YAAY,OAAO,WAAW,SAAS;CAC3C,OACE,oBAAC,KAAD;EACE,cAAY,UAAU;EACtB,WAAW,UAAU;EACf;EACN,SAAS,UAAU;EAElB,UAAA;CACA,CAAA;AAEP;AAEA,aAAa,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createStaticStyles } from "antd-style";
|
|
2
2
|
//#region src/dashboard/ConsoleShell/style.ts
|
|
3
3
|
const SIDEBAR_INLINE_SIZE = 248;
|
|
4
|
-
const SIDEBAR_RAIL_INLINE_SIZE =
|
|
4
|
+
const SIDEBAR_RAIL_INLINE_SIZE = 54;
|
|
5
5
|
const WORKSPACE_INSET = 8;
|
|
6
6
|
/**
|
|
7
7
|
* `responsive.laptop`, not `responsive.tablet`. The aliases are named for
|
|
@@ -15,19 +15,10 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
|
|
|
15
15
|
|
|
16
16
|
block-size: 56px;
|
|
17
17
|
margin-block-start: ${WORKSPACE_INSET}px;
|
|
18
|
-
padding-inline:
|
|
18
|
+
padding-inline: 15px;
|
|
19
19
|
|
|
20
20
|
color: ${cssVar.colorText};
|
|
21
|
-
|
|
22
|
-
&[data-collapsed='true'] {
|
|
23
|
-
justify-content: center;
|
|
24
|
-
padding-inline: 0;
|
|
25
|
-
|
|
26
|
-
> * {
|
|
27
|
-
justify-content: center;
|
|
28
|
-
inline-size: auto;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
21
|
+
white-space: nowrap;
|
|
31
22
|
|
|
32
23
|
${responsive.laptop} {
|
|
33
24
|
margin-block-start: 0;
|
|
@@ -58,6 +49,18 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
|
|
|
58
49
|
color: ${cssVar.colorText};
|
|
59
50
|
text-overflow: ellipsis;
|
|
60
51
|
white-space: nowrap;
|
|
52
|
+
|
|
53
|
+
transition: opacity 120ms ease 80ms;
|
|
54
|
+
|
|
55
|
+
[data-collapsed='true'] & {
|
|
56
|
+
text-overflow: clip;
|
|
57
|
+
opacity: 0;
|
|
58
|
+
transition-delay: 0s;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media (prefers-reduced-motion: reduce) {
|
|
62
|
+
transition: none;
|
|
63
|
+
}
|
|
61
64
|
`,
|
|
62
65
|
main: css`
|
|
63
66
|
overflow: auto;
|
|
@@ -102,6 +105,7 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
|
|
|
102
105
|
background: ${cssVar.colorBgLayout};
|
|
103
106
|
`,
|
|
104
107
|
sidebar: css`
|
|
108
|
+
overflow: hidden;
|
|
105
109
|
display: flex;
|
|
106
110
|
flex: none;
|
|
107
111
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleShell/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nconst SIDEBAR_INLINE_SIZE = 248;\nconst SIDEBAR_RAIL_INLINE_SIZE =
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/ConsoleShell/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nconst SIDEBAR_INLINE_SIZE = 248;\n// Twice the nav icon inset (8px nav padding + 10px item padding) plus the 18px icon, so the icons\n// land centered on the rail without moving sideways.\nconst SIDEBAR_RAIL_INLINE_SIZE = 54;\nconst WORKSPACE_INSET = 8;\n\n/**\n * `responsive.laptop`, not `responsive.tablet`. The aliases are named for\n * devices, and only `laptop` (max-width 991px) lines up with `useIsCompact`.\n */\nexport const styles = createStaticStyles(({ css, cssVar, responsive }) => ({\n brand: css`\n display: flex;\n flex: none;\n align-items: center;\n\n block-size: 56px;\n margin-block-start: ${WORKSPACE_INSET}px;\n padding-inline: 15px;\n\n color: ${cssVar.colorText};\n white-space: nowrap;\n\n ${responsive.laptop} {\n margin-block-start: 0;\n }\n `,\n brandAnchor: css`\n display: flex;\n align-items: center;\n\n inline-size: 100%;\n min-inline-size: 0;\n\n color: inherit;\n text-decoration: none;\n `,\n brandLockup: css`\n display: flex;\n gap: 10px;\n align-items: center;\n min-inline-size: 0;\n `,\n brandName: css`\n overflow: hidden;\n\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n color: ${cssVar.colorText};\n text-overflow: ellipsis;\n white-space: nowrap;\n\n transition: opacity 120ms ease 80ms;\n\n [data-collapsed='true'] & {\n text-overflow: clip;\n opacity: 0;\n transition-delay: 0s;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `,\n main: css`\n overflow: auto;\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 20px;\n\n min-inline-size: 0;\n min-block-size: 0;\n padding: 24px;\n\n /*\n * A page that owns a full-height split sets data-page-layout=\"flush\" and\n * takes over padding and scrolling, so its sidebar can sit on the card edge.\n */\n &:has([data-page-layout='flush']) {\n overflow: hidden;\n gap: 0;\n padding: 0;\n }\n\n ${responsive.mobile} {\n gap: 16px;\n padding: 16px;\n }\n `,\n navSlot: css`\n display: flex;\n flex: 1;\n flex-direction: column;\n min-block-size: 0;\n `,\n shell: css`\n overflow: hidden;\n display: flex;\n flex: 1;\n\n block-size: 100%;\n min-block-size: 0;\n\n background: ${cssVar.colorBgLayout};\n `,\n sidebar: css`\n overflow: hidden;\n display: flex;\n flex: none;\n flex-direction: column;\n\n inline-size: ${SIDEBAR_INLINE_SIZE}px;\n block-size: 100%;\n min-block-size: 0;\n\n transition: inline-size 200ms ease;\n\n &[data-collapsed='true'] {\n inline-size: ${SIDEBAR_RAIL_INLINE_SIZE}px;\n }\n\n &[data-instant='true'] {\n transition: none;\n }\n\n ${responsive.laptop} {\n display: none;\n }\n `,\n sidebarBottom: css`\n flex: none;\n padding: 8px;\n `,\n skipLink: css`\n position: fixed;\n z-index: 2000;\n inset-block-start: -100px;\n inset-inline-start: 12px;\n\n padding-block: 8px;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n\n color: ${cssVar.colorText};\n\n background: ${cssVar.colorBgElevated};\n\n &:focus {\n inset-block-start: 12px;\n }\n `,\n topbar: css`\n display: flex;\n flex: none;\n gap: 8px;\n align-items: center;\n\n block-size: 56px;\n padding-inline: 12px;\n border-block-end: 1px solid ${cssVar.colorBorderSecondary};\n `,\n topbarDivider: css`\n flex: none;\n\n inline-size: 1px;\n block-size: 18px;\n margin-inline: 2px;\n\n background: ${cssVar.colorBorderSecondary};\n `,\n topbarMain: css`\n display: flex;\n flex: 1;\n align-items: center;\n min-inline-size: 0;\n `,\n tools: css`\n display: flex;\n flex: none;\n gap: 6px;\n align-items: center;\n\n margin-inline-start: auto;\n `,\n workspace: css`\n overflow: hidden;\n display: flex;\n flex: 1;\n flex-direction: column;\n\n min-inline-size: 0;\n min-block-size: 0;\n margin-block: ${WORKSPACE_INSET}px;\n margin-inline: 0 ${WORKSPACE_INSET}px;\n border: 1px solid ${cssVar.colorBorderSecondary};\n border-radius: ${cssVar.borderRadiusLG};\n\n background: ${cssVar.colorBgContainer};\n box-shadow: ${cssVar.boxShadowTertiary};\n\n ${responsive.laptop} {\n margin: 0;\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n `,\n}));\n"],"mappings":";;AAEA,MAAM,sBAAsB;AAG5B,MAAM,2BAA2B;AACjC,MAAM,kBAAkB;;;;;AAMxB,MAAa,SAAS,oBAAoB,EAAE,KAAK,QAAQ,kBAAkB;CACzE,OAAO,GAAG;;;;;;0BAMc,gBAAgB;;;aAG7B,OAAO,UAAU;;;MAGxB,WAAW,OAAO;;;;CAItB,aAAa,GAAG;;;;;;;;;;CAUhB,aAAa,GAAG;;;;;;CAMhB,WAAW,GAAG;;;;;;aAMH,OAAO,UAAU;;;;;;;;;;;;;;;;CAgB5B,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;MAqBL,WAAW,OAAO;;;;;CAKtB,SAAS,GAAG;;;;;;CAMZ,OAAO,GAAG;;;;;;;;kBAQM,OAAO,cAAc;;CAErC,SAAS,GAAG;;;;;;mBAMK,oBAAoB;;;;;;;qBAOlB,yBAAyB;;;;;;;MAOxC,WAAW,OAAO;;;;CAItB,eAAe,GAAG;;;;CAIlB,UAAU,GAAG;;;;;;;;qBAQM,OAAO,aAAa;;aAE5B,OAAO,UAAU;;kBAEZ,OAAO,gBAAgB;;;;;;CAMvC,QAAQ,GAAG;;;;;;;;kCAQqB,OAAO,qBAAqB;;CAE5D,eAAe,GAAG;;;;;;;kBAOF,OAAO,qBAAqB;;CAE5C,YAAY,GAAG;;;;;;CAMf,OAAO,GAAG;;;;;;;;CAQV,WAAW,GAAG;;;;;;;;oBAQI,gBAAgB;uBACb,gBAAgB;wBACf,OAAO,qBAAqB;qBAC/B,OAAO,eAAe;;kBAEzB,OAAO,iBAAiB;kBACxB,OAAO,kBAAkB;;MAErC,WAAW,OAAO;;;;;;;AAOxB,EAAE"}
|
package/es/eslint/index.d.mts
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
declare const restrictedImports: {
|
|
3
3
|
rules: {
|
|
4
4
|
'no-restricted-imports': (string | {
|
|
5
|
-
paths: {
|
|
5
|
+
paths: ({
|
|
6
6
|
importNames: string[];
|
|
7
7
|
message: string;
|
|
8
8
|
name: string;
|
|
9
|
-
}
|
|
9
|
+
} | {
|
|
10
|
+
message: string;
|
|
11
|
+
name: string;
|
|
12
|
+
importNames?: undefined;
|
|
13
|
+
})[];
|
|
10
14
|
patterns: {
|
|
11
15
|
group: string[];
|
|
12
16
|
message: string;
|
|
@@ -17,11 +21,15 @@ declare const restrictedImports: {
|
|
|
17
21
|
declare const _default: {
|
|
18
22
|
rules: {
|
|
19
23
|
'no-restricted-imports': (string | {
|
|
20
|
-
paths: {
|
|
24
|
+
paths: ({
|
|
21
25
|
importNames: string[];
|
|
22
26
|
message: string;
|
|
23
27
|
name: string;
|
|
24
|
-
}
|
|
28
|
+
} | {
|
|
29
|
+
message: string;
|
|
30
|
+
name: string;
|
|
31
|
+
importNames?: undefined;
|
|
32
|
+
})[];
|
|
25
33
|
patterns: {
|
|
26
34
|
group: string[];
|
|
27
35
|
message: string;
|
package/es/eslint/index.mjs
CHANGED
|
@@ -40,6 +40,103 @@ const DEPRECATED_UI_COMPONENTS = [
|
|
|
40
40
|
"Text",
|
|
41
41
|
"Tree"
|
|
42
42
|
];
|
|
43
|
+
const DEPRECATED_ANTD_ONLY = [
|
|
44
|
+
"Badge",
|
|
45
|
+
"Empty",
|
|
46
|
+
"Pagination",
|
|
47
|
+
"Popover",
|
|
48
|
+
"Progress",
|
|
49
|
+
"Result",
|
|
50
|
+
"Spin",
|
|
51
|
+
"Tooltip",
|
|
52
|
+
"Upload"
|
|
53
|
+
];
|
|
54
|
+
const DEPRECATED_ANTD_COMPONENT_PATHS = [
|
|
55
|
+
"antd/es/alert",
|
|
56
|
+
"antd/es/alert/*",
|
|
57
|
+
"antd/es/auto-complete",
|
|
58
|
+
"antd/es/auto-complete/*",
|
|
59
|
+
"antd/es/badge",
|
|
60
|
+
"antd/es/badge/*",
|
|
61
|
+
"antd/es/checkbox",
|
|
62
|
+
"antd/es/checkbox/*",
|
|
63
|
+
"antd/es/collapse",
|
|
64
|
+
"antd/es/collapse/*",
|
|
65
|
+
"antd/es/dropdown",
|
|
66
|
+
"antd/es/dropdown/*",
|
|
67
|
+
"antd/es/empty",
|
|
68
|
+
"antd/es/empty/*",
|
|
69
|
+
"antd/es/message",
|
|
70
|
+
"antd/es/message/*",
|
|
71
|
+
"antd/es/notification",
|
|
72
|
+
"antd/es/notification/*",
|
|
73
|
+
"antd/es/pagination",
|
|
74
|
+
"antd/es/pagination/*",
|
|
75
|
+
"antd/es/popover",
|
|
76
|
+
"antd/es/popover/*",
|
|
77
|
+
"antd/es/progress",
|
|
78
|
+
"antd/es/progress/*",
|
|
79
|
+
"antd/es/radio",
|
|
80
|
+
"antd/es/radio/*",
|
|
81
|
+
"antd/es/result",
|
|
82
|
+
"antd/es/result/*",
|
|
83
|
+
"antd/es/skeleton",
|
|
84
|
+
"antd/es/skeleton/*",
|
|
85
|
+
"antd/es/slider",
|
|
86
|
+
"antd/es/slider/*",
|
|
87
|
+
"antd/es/spin",
|
|
88
|
+
"antd/es/spin/*",
|
|
89
|
+
"antd/es/switch",
|
|
90
|
+
"antd/es/switch/*",
|
|
91
|
+
"antd/es/tooltip",
|
|
92
|
+
"antd/es/tooltip/*",
|
|
93
|
+
"antd/es/tree",
|
|
94
|
+
"antd/es/tree/*",
|
|
95
|
+
"antd/es/upload",
|
|
96
|
+
"antd/es/upload/*",
|
|
97
|
+
"antd/lib/alert",
|
|
98
|
+
"antd/lib/alert/*",
|
|
99
|
+
"antd/lib/auto-complete",
|
|
100
|
+
"antd/lib/auto-complete/*",
|
|
101
|
+
"antd/lib/badge",
|
|
102
|
+
"antd/lib/badge/*",
|
|
103
|
+
"antd/lib/checkbox",
|
|
104
|
+
"antd/lib/checkbox/*",
|
|
105
|
+
"antd/lib/collapse",
|
|
106
|
+
"antd/lib/collapse/*",
|
|
107
|
+
"antd/lib/dropdown",
|
|
108
|
+
"antd/lib/dropdown/*",
|
|
109
|
+
"antd/lib/empty",
|
|
110
|
+
"antd/lib/empty/*",
|
|
111
|
+
"antd/lib/message",
|
|
112
|
+
"antd/lib/message/*",
|
|
113
|
+
"antd/lib/notification",
|
|
114
|
+
"antd/lib/notification/*",
|
|
115
|
+
"antd/lib/pagination",
|
|
116
|
+
"antd/lib/pagination/*",
|
|
117
|
+
"antd/lib/popover",
|
|
118
|
+
"antd/lib/popover/*",
|
|
119
|
+
"antd/lib/progress",
|
|
120
|
+
"antd/lib/progress/*",
|
|
121
|
+
"antd/lib/radio",
|
|
122
|
+
"antd/lib/radio/*",
|
|
123
|
+
"antd/lib/result",
|
|
124
|
+
"antd/lib/result/*",
|
|
125
|
+
"antd/lib/skeleton",
|
|
126
|
+
"antd/lib/skeleton/*",
|
|
127
|
+
"antd/lib/slider",
|
|
128
|
+
"antd/lib/slider/*",
|
|
129
|
+
"antd/lib/spin",
|
|
130
|
+
"antd/lib/spin/*",
|
|
131
|
+
"antd/lib/switch",
|
|
132
|
+
"antd/lib/switch/*",
|
|
133
|
+
"antd/lib/tooltip",
|
|
134
|
+
"antd/lib/tooltip/*",
|
|
135
|
+
"antd/lib/tree",
|
|
136
|
+
"antd/lib/tree/*",
|
|
137
|
+
"antd/lib/upload",
|
|
138
|
+
"antd/lib/upload/*"
|
|
139
|
+
];
|
|
43
140
|
const restrictedImports = { rules: { "no-restricted-imports": ["error", {
|
|
44
141
|
paths: [
|
|
45
142
|
{
|
|
@@ -53,7 +150,7 @@ const restrictedImports = { rules: { "no-restricted-imports": ["error", {
|
|
|
53
150
|
name: "antd-style"
|
|
54
151
|
},
|
|
55
152
|
{
|
|
56
|
-
importNames: DEPRECATED_UI_COMPONENTS,
|
|
153
|
+
importNames: [...DEPRECATED_UI_COMPONENTS, ...DEPRECATED_ANTD_ONLY],
|
|
57
154
|
message: "Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.",
|
|
58
155
|
name: "antd"
|
|
59
156
|
},
|
|
@@ -61,59 +158,19 @@ const restrictedImports = { rules: { "no-restricted-imports": ["error", {
|
|
|
61
158
|
importNames: ["message", "notification"],
|
|
62
159
|
message: "antd feedback APIs are deprecated. Use `toast` from \"@lobehub/ui/base-ui\".",
|
|
63
160
|
name: "antd"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
importNames: ["LoadingOutlined"],
|
|
164
|
+
message: "Use `Spin` from \"@lobehub/ui/base-ui\" instead of a hand-rolled spinner.",
|
|
165
|
+
name: "@ant-design/icons"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
message: "Use `Spin variant=\"network\"` from \"@lobehub/ui/base-ui\" instead.",
|
|
169
|
+
name: "thinking-orbs"
|
|
64
170
|
}
|
|
65
171
|
],
|
|
66
172
|
patterns: [{
|
|
67
|
-
group:
|
|
68
|
-
"antd/es/alert",
|
|
69
|
-
"antd/es/alert/*",
|
|
70
|
-
"antd/es/auto-complete",
|
|
71
|
-
"antd/es/auto-complete/*",
|
|
72
|
-
"antd/es/checkbox",
|
|
73
|
-
"antd/es/checkbox/*",
|
|
74
|
-
"antd/es/collapse",
|
|
75
|
-
"antd/es/collapse/*",
|
|
76
|
-
"antd/es/dropdown",
|
|
77
|
-
"antd/es/dropdown/*",
|
|
78
|
-
"antd/es/message",
|
|
79
|
-
"antd/es/message/*",
|
|
80
|
-
"antd/es/notification",
|
|
81
|
-
"antd/es/notification/*",
|
|
82
|
-
"antd/es/radio",
|
|
83
|
-
"antd/es/radio/*",
|
|
84
|
-
"antd/es/skeleton",
|
|
85
|
-
"antd/es/skeleton/*",
|
|
86
|
-
"antd/es/slider",
|
|
87
|
-
"antd/es/slider/*",
|
|
88
|
-
"antd/es/switch",
|
|
89
|
-
"antd/es/switch/*",
|
|
90
|
-
"antd/es/tree",
|
|
91
|
-
"antd/es/tree/*",
|
|
92
|
-
"antd/lib/alert",
|
|
93
|
-
"antd/lib/alert/*",
|
|
94
|
-
"antd/lib/auto-complete",
|
|
95
|
-
"antd/lib/auto-complete/*",
|
|
96
|
-
"antd/lib/checkbox",
|
|
97
|
-
"antd/lib/checkbox/*",
|
|
98
|
-
"antd/lib/collapse",
|
|
99
|
-
"antd/lib/collapse/*",
|
|
100
|
-
"antd/lib/dropdown",
|
|
101
|
-
"antd/lib/dropdown/*",
|
|
102
|
-
"antd/lib/message",
|
|
103
|
-
"antd/lib/message/*",
|
|
104
|
-
"antd/lib/notification",
|
|
105
|
-
"antd/lib/notification/*",
|
|
106
|
-
"antd/lib/radio",
|
|
107
|
-
"antd/lib/radio/*",
|
|
108
|
-
"antd/lib/skeleton",
|
|
109
|
-
"antd/lib/skeleton/*",
|
|
110
|
-
"antd/lib/slider",
|
|
111
|
-
"antd/lib/slider/*",
|
|
112
|
-
"antd/lib/switch",
|
|
113
|
-
"antd/lib/switch/*",
|
|
114
|
-
"antd/lib/tree",
|
|
115
|
-
"antd/lib/tree/*"
|
|
116
|
-
],
|
|
173
|
+
group: DEPRECATED_ANTD_COMPONENT_PATHS,
|
|
117
174
|
message: "Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead."
|
|
118
175
|
}]
|
|
119
176
|
}] } };
|
package/es/eslint/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'Accordion',\n 'AccordionItem',\n 'ActionIcon',\n 'Alert',\n 'AutoComplete',\n 'Avatar',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Collapse',\n 'DraggablePanel',\n 'DraggablePanelBody',\n 'DraggablePanelContainer',\n 'DraggablePanelFooter',\n 'DraggablePanelHeader',\n 'Drawer',\n 'Dropdown',\n 'FormSubmitFooter',\n 'FormTitle',\n 'InputOPT',\n 'Modal',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Skeleton',\n 'SkeletonAvatar',\n 'SkeletonBlock',\n 'SkeletonButton',\n 'SkeletonParagraph',\n 'SkeletonTags',\n 'SkeletonTitle',\n 'Slider',\n 'SliderWithInput',\n 'Switch',\n 'Tabs',\n 'Tag',\n 'Text',\n 'Tree',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/alert',\n 'antd/es/alert/*',\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/collapse',\n 'antd/es/collapse/*',\n 'antd/es/dropdown',\n 'antd/es/dropdown/*',\n 'antd/es/message',\n 'antd/es/message/*',\n 'antd/es/notification',\n 'antd/es/notification/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/skeleton',\n 'antd/es/skeleton/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/es/switch',\n 'antd/es/switch/*',\n 'antd/es/tree',\n 'antd/es/tree/*',\n 'antd/lib/alert',\n 'antd/lib/alert/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/collapse',\n 'antd/lib/collapse/*',\n 'antd/lib/dropdown',\n 'antd/lib/dropdown/*',\n 'antd/lib/message',\n 'antd/lib/message/*',\n 'antd/lib/notification',\n 'antd/lib/notification/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/skeleton',\n 'antd/lib/skeleton/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n 'antd/lib/switch',\n 'antd/lib/switch/*',\n 'antd/lib/tree',\n 'antd/lib/tree/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n {\n importNames: ['message', 'notification'],\n message: 'antd feedback APIs are deprecated. Use `toast` from \"@lobehub/ui/base-ui\".',\n name: 'antd',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'Accordion',\n 'AccordionItem',\n 'ActionIcon',\n 'Alert',\n 'AutoComplete',\n 'Avatar',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Collapse',\n 'DraggablePanel',\n 'DraggablePanelBody',\n 'DraggablePanelContainer',\n 'DraggablePanelFooter',\n 'DraggablePanelHeader',\n 'Drawer',\n 'Dropdown',\n 'FormSubmitFooter',\n 'FormTitle',\n 'InputOPT',\n 'Modal',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Skeleton',\n 'SkeletonAvatar',\n 'SkeletonBlock',\n 'SkeletonButton',\n 'SkeletonParagraph',\n 'SkeletonTags',\n 'SkeletonTitle',\n 'Slider',\n 'SliderWithInput',\n 'Switch',\n 'Tabs',\n 'Tag',\n 'Text',\n 'Tree',\n];\n\nconst DEPRECATED_ANTD_ONLY = [\n 'Badge',\n 'Empty',\n 'Pagination',\n 'Popover',\n 'Progress',\n 'Result',\n 'Spin',\n 'Tooltip',\n 'Upload',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/alert',\n 'antd/es/alert/*',\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/badge',\n 'antd/es/badge/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/collapse',\n 'antd/es/collapse/*',\n 'antd/es/dropdown',\n 'antd/es/dropdown/*',\n 'antd/es/empty',\n 'antd/es/empty/*',\n 'antd/es/message',\n 'antd/es/message/*',\n 'antd/es/notification',\n 'antd/es/notification/*',\n 'antd/es/pagination',\n 'antd/es/pagination/*',\n 'antd/es/popover',\n 'antd/es/popover/*',\n 'antd/es/progress',\n 'antd/es/progress/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/result',\n 'antd/es/result/*',\n 'antd/es/skeleton',\n 'antd/es/skeleton/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/es/spin',\n 'antd/es/spin/*',\n 'antd/es/switch',\n 'antd/es/switch/*',\n 'antd/es/tooltip',\n 'antd/es/tooltip/*',\n 'antd/es/tree',\n 'antd/es/tree/*',\n 'antd/es/upload',\n 'antd/es/upload/*',\n 'antd/lib/alert',\n 'antd/lib/alert/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/badge',\n 'antd/lib/badge/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/collapse',\n 'antd/lib/collapse/*',\n 'antd/lib/dropdown',\n 'antd/lib/dropdown/*',\n 'antd/lib/empty',\n 'antd/lib/empty/*',\n 'antd/lib/message',\n 'antd/lib/message/*',\n 'antd/lib/notification',\n 'antd/lib/notification/*',\n 'antd/lib/pagination',\n 'antd/lib/pagination/*',\n 'antd/lib/popover',\n 'antd/lib/popover/*',\n 'antd/lib/progress',\n 'antd/lib/progress/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/result',\n 'antd/lib/result/*',\n 'antd/lib/skeleton',\n 'antd/lib/skeleton/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n 'antd/lib/spin',\n 'antd/lib/spin/*',\n 'antd/lib/switch',\n 'antd/lib/switch/*',\n 'antd/lib/tooltip',\n 'antd/lib/tooltip/*',\n 'antd/lib/tree',\n 'antd/lib/tree/*',\n 'antd/lib/upload',\n 'antd/lib/upload/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: [...DEPRECATED_UI_COMPONENTS, ...DEPRECATED_ANTD_ONLY],\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n {\n importNames: ['message', 'notification'],\n message: 'antd feedback APIs are deprecated. Use `toast` from \"@lobehub/ui/base-ui\".',\n name: 'antd',\n },\n {\n importNames: ['LoadingOutlined'],\n message: 'Use `Spin` from \"@lobehub/ui/base-ui\" instead of a hand-rolled spinner.',\n name: '@ant-design/icons',\n },\n {\n message: 'Use `Spin variant=\"network\"` from \"@lobehub/ui/base-ui\" instead.',\n name: 'thinking-orbs',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,kCAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,GAAG,0BAA0B,GAAG,oBAAoB;GAClE,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,WAAW,cAAc;GACvC,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,iBAAiB;GAC/B,SAAS;GACT,MAAM;EACR;EACA;GACE,SAAS;GACT,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,IAAA,iBAAe,CAAC,iBAAiB"}
|