@hxdhxd/harmony-flow-ui 0.1.0 → 0.1.1
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 +14 -4
- package/dist/index.cjs +38 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +95 -152
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +38 -3
- package/dist/index.js.map +1 -1
- package/package.json +14 -1
package/dist/index.d.cts
CHANGED
|
@@ -9,8 +9,16 @@ interface ThemeTokens {
|
|
|
9
9
|
colorText: string;
|
|
10
10
|
colorTextMuted: string;
|
|
11
11
|
colorBorder: string;
|
|
12
|
+
radiusControl?: string;
|
|
13
|
+
radiusPanel?: string;
|
|
14
|
+
radiusOverlay?: string;
|
|
15
|
+
shadowPopover?: string;
|
|
16
|
+
shadowModal?: string;
|
|
17
|
+
/** @deprecated COMPAT: 兼容现有消费者;项目内引用清零并进入下一主版本后移除。请改用 radiusControl 或 radiusPanel。 */
|
|
12
18
|
radiusMd: string;
|
|
19
|
+
/** @deprecated COMPAT: 兼容现有消费者;项目内引用清零并进入下一主版本后移除。请改用 radiusPanel 或 radiusOverlay。 */
|
|
13
20
|
radiusLg: string;
|
|
21
|
+
/** @deprecated COMPAT: 兼容现有消费者;项目内引用清零并进入下一主版本后移除。请改用 shadowPopover 或 shadowModal。 */
|
|
14
22
|
shadowElevated: string;
|
|
15
23
|
motionDuration: string;
|
|
16
24
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,16 @@ interface ThemeTokens {
|
|
|
9
9
|
colorText: string;
|
|
10
10
|
colorTextMuted: string;
|
|
11
11
|
colorBorder: string;
|
|
12
|
+
radiusControl?: string;
|
|
13
|
+
radiusPanel?: string;
|
|
14
|
+
radiusOverlay?: string;
|
|
15
|
+
shadowPopover?: string;
|
|
16
|
+
shadowModal?: string;
|
|
17
|
+
/** @deprecated COMPAT: 兼容现有消费者;项目内引用清零并进入下一主版本后移除。请改用 radiusControl 或 radiusPanel。 */
|
|
12
18
|
radiusMd: string;
|
|
19
|
+
/** @deprecated COMPAT: 兼容现有消费者;项目内引用清零并进入下一主版本后移除。请改用 radiusPanel 或 radiusOverlay。 */
|
|
13
20
|
radiusLg: string;
|
|
21
|
+
/** @deprecated COMPAT: 兼容现有消费者;项目内引用清零并进入下一主版本后移除。请改用 shadowPopover 或 shadowModal。 */
|
|
14
22
|
shadowElevated: string;
|
|
15
23
|
motionDuration: string;
|
|
16
24
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,43 @@ var defaultTheme = {
|
|
|
7
7
|
colorText: "#142033",
|
|
8
8
|
colorTextMuted: "#66758c",
|
|
9
9
|
colorBorder: "#dce9f7",
|
|
10
|
+
radiusControl: "6px",
|
|
11
|
+
radiusPanel: "8px",
|
|
12
|
+
radiusOverlay: "10px",
|
|
13
|
+
shadowPopover: "0 8px 24px rgba(41, 106, 168, 0.12)",
|
|
14
|
+
shadowModal: "0 18px 48px rgba(41, 106, 168, 0.16)",
|
|
10
15
|
radiusMd: "14px",
|
|
11
16
|
radiusLg: "24px",
|
|
12
17
|
shadowElevated: "0 18px 48px rgba(41, 106, 168, 0.16)",
|
|
13
18
|
motionDuration: "180ms"
|
|
14
19
|
};
|
|
15
|
-
var darkTheme = {
|
|
16
|
-
|
|
20
|
+
var darkTheme = {
|
|
21
|
+
...defaultTheme,
|
|
22
|
+
colorPrimary: "#58a9ff",
|
|
23
|
+
colorPrimaryHover: "#7cbbff",
|
|
24
|
+
colorBackground: "#0d1724",
|
|
25
|
+
colorSurface: "#152337",
|
|
26
|
+
colorText: "#f4f8fc",
|
|
27
|
+
colorTextMuted: "#a9bad0",
|
|
28
|
+
colorBorder: "#30445b",
|
|
29
|
+
shadowPopover: "0 8px 24px rgba(0, 0, 0, 0.32)",
|
|
30
|
+
shadowModal: "0 20px 54px rgba(0, 0, 0, 0.46)",
|
|
31
|
+
shadowElevated: "0 20px 54px rgba(0, 0, 0, 0.46)"
|
|
32
|
+
};
|
|
33
|
+
var highContrastTheme = {
|
|
34
|
+
...defaultTheme,
|
|
35
|
+
colorPrimary: "#005fcc",
|
|
36
|
+
colorPrimaryHover: "#004a9f",
|
|
37
|
+
colorBackground: "#ffffff",
|
|
38
|
+
colorSurface: "#ffffff",
|
|
39
|
+
colorText: "#000000",
|
|
40
|
+
colorTextMuted: "#303030",
|
|
41
|
+
colorBorder: "#000000",
|
|
42
|
+
shadowPopover: "0 0 0 2px #000000",
|
|
43
|
+
shadowModal: "0 0 0 2px #000000",
|
|
44
|
+
shadowElevated: "0 0 0 2px #000000",
|
|
45
|
+
motionDuration: "0ms"
|
|
46
|
+
};
|
|
17
47
|
var tokenVariables = {
|
|
18
48
|
colorPrimary: "--hf-color-primary",
|
|
19
49
|
colorPrimaryHover: "--hf-color-primary-hover",
|
|
@@ -22,6 +52,11 @@ var tokenVariables = {
|
|
|
22
52
|
colorText: "--hf-color-text",
|
|
23
53
|
colorTextMuted: "--hf-color-text-muted",
|
|
24
54
|
colorBorder: "--hf-color-border",
|
|
55
|
+
radiusControl: "--hf-radius-control",
|
|
56
|
+
radiusPanel: "--hf-radius-panel",
|
|
57
|
+
radiusOverlay: "--hf-radius-overlay",
|
|
58
|
+
shadowPopover: "--hf-shadow-popover",
|
|
59
|
+
shadowModal: "--hf-shadow-modal",
|
|
25
60
|
radiusMd: "--hf-radius-md",
|
|
26
61
|
radiusLg: "--hf-radius-lg",
|
|
27
62
|
shadowElevated: "--hf-shadow-elevated",
|
|
@@ -51,7 +86,7 @@ function ThemeProvider({ children, tokens, mode = "light", className = "", style
|
|
|
51
86
|
// src/components/Button.tsx
|
|
52
87
|
import { forwardRef } from "react";
|
|
53
88
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
54
|
-
var Button = forwardRef(function Button2({ children, className = "", variant = "primary", size = "md", shape = "
|
|
89
|
+
var Button = forwardRef(function Button2({ children, className = "", variant = "primary", size = "md", shape = "rounded", fullWidth = false, loading = false, leadingIcon, trailingIcon, iconOnly = false, disabled, ...props }, ref) {
|
|
55
90
|
return /* @__PURE__ */ jsxs(
|
|
56
91
|
"button",
|
|
57
92
|
{
|