@lobehub/ui 1.1.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/LICENSE +21 -0
- package/README.md +144 -0
- package/es/ActionIcon/index.d.ts +15 -0
- package/es/ActionIcon/index.js +84 -0
- package/es/DraggablePanel/index.d.ts +26 -0
- package/es/DraggablePanel/index.js +197 -0
- package/es/DraggablePanel/style.d.ts +18 -0
- package/es/DraggablePanel/style.js +30 -0
- package/es/DraggablePanel/utils.d.ts +2 -0
- package/es/DraggablePanel/utils.js +12 -0
- package/es/Logo/Logo3D.d.ts +4 -0
- package/es/Logo/Logo3D.js +11 -0
- package/es/Logo/LogoFlat.d.ts +4 -0
- package/es/Logo/LogoFlat.js +104 -0
- package/es/Logo/LogoHighContrast.d.ts +4 -0
- package/es/Logo/LogoHighContrast.js +26 -0
- package/es/Logo/LogoText.d.ts +4 -0
- package/es/Logo/LogoText.js +18 -0
- package/es/Logo/index.d.ts +8 -0
- package/es/Logo/index.js +54 -0
- package/es/SideNav/index.d.ts +9 -0
- package/es/SideNav/index.js +44 -0
- package/es/Template/index.d.ts +7 -0
- package/es/Template/index.js +15 -0
- package/es/ThemeProvider/GlobalStyle.d.ts +3 -0
- package/es/ThemeProvider/GlobalStyle.js +19 -0
- package/es/ThemeProvider/index.d.ts +11 -0
- package/es/ThemeProvider/index.js +40 -0
- package/es/ThemeProvider/token.d.ts +3 -0
- package/es/ThemeProvider/token.js +45 -0
- package/es/index.d.ts +6 -0
- package/es/index.js +6 -0
- package/es/styles/algorithms/colorRelationship.d.ts +6 -0
- package/es/styles/algorithms/colorRelationship.js +88 -0
- package/es/styles/algorithms/index.d.ts +15 -0
- package/es/styles/algorithms/index.js +67 -0
- package/es/styles/algorithms/paletteGenerator.d.ts +51 -0
- package/es/styles/algorithms/paletteGenerator.js +74 -0
- package/es/styles/antdTheme.d.ts +2 -0
- package/es/styles/antdTheme.js +4 -0
- package/es/styles/customStylish.d.ts +17 -0
- package/es/styles/customStylish.js +19 -0
- package/es/styles/customToken.d.ts +65 -0
- package/es/styles/customToken.js +24 -0
- package/es/styles/index.d.ts +3 -0
- package/es/styles/index.js +3 -0
- package/es/styles/theme/dark.d.ts +4 -0
- package/es/styles/theme/dark.js +82 -0
- package/es/styles/theme/index.d.ts +2 -0
- package/es/styles/theme/index.js +2 -0
- package/es/styles/theme/light.d.ts +4 -0
- package/es/styles/theme/light.js +36 -0
- package/es/types/index.d.ts +9 -0
- package/es/types/index.js +1 -0
- package/es/utils/colorUtils.d.ts +1 -0
- package/es/utils/colorUtils.js +10 -0
- package/lib/ActionIcon/index.d.ts +15 -0
- package/lib/ActionIcon/index.js +110 -0
- package/lib/DraggablePanel/index.d.ts +26 -0
- package/lib/DraggablePanel/index.js +217 -0
- package/lib/DraggablePanel/style.d.ts +18 -0
- package/lib/DraggablePanel/style.js +287 -0
- package/lib/DraggablePanel/utils.d.ts +2 -0
- package/lib/DraggablePanel/utils.js +40 -0
- package/lib/Logo/Logo3D.d.ts +4 -0
- package/lib/Logo/Logo3D.js +45 -0
- package/lib/Logo/LogoFlat.d.ts +4 -0
- package/lib/Logo/LogoFlat.js +130 -0
- package/lib/Logo/LogoHighContrast.d.ts +4 -0
- package/lib/Logo/LogoHighContrast.js +58 -0
- package/lib/Logo/LogoText.d.ts +4 -0
- package/lib/Logo/LogoText.js +49 -0
- package/lib/Logo/index.d.ts +8 -0
- package/lib/Logo/index.js +54 -0
- package/lib/SideNav/index.d.ts +9 -0
- package/lib/SideNav/index.js +58 -0
- package/lib/Template/index.d.ts +7 -0
- package/lib/Template/index.js +41 -0
- package/lib/ThemeProvider/GlobalStyle.d.ts +3 -0
- package/lib/ThemeProvider/GlobalStyle.js +80 -0
- package/lib/ThemeProvider/index.d.ts +11 -0
- package/lib/ThemeProvider/index.js +68 -0
- package/lib/ThemeProvider/token.d.ts +3 -0
- package/lib/ThemeProvider/token.js +73 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +54 -0
- package/lib/styles/algorithms/colorRelationship.d.ts +6 -0
- package/lib/styles/algorithms/colorRelationship.js +87 -0
- package/lib/styles/algorithms/index.d.ts +15 -0
- package/lib/styles/algorithms/index.js +81 -0
- package/lib/styles/algorithms/paletteGenerator.d.ts +51 -0
- package/lib/styles/algorithms/paletteGenerator.js +91 -0
- package/lib/styles/antdTheme.d.ts +2 -0
- package/lib/styles/antdTheme.js +30 -0
- package/lib/styles/customStylish.d.ts +17 -0
- package/lib/styles/customStylish.js +117 -0
- package/lib/styles/customToken.d.ts +65 -0
- package/lib/styles/customToken.js +54 -0
- package/lib/styles/index.d.ts +3 -0
- package/lib/styles/index.js +21 -0
- package/lib/styles/theme/dark.d.ts +4 -0
- package/lib/styles/theme/dark.js +131 -0
- package/lib/styles/theme/index.d.ts +2 -0
- package/lib/styles/theme/index.js +32 -0
- package/lib/styles/theme/light.d.ts +4 -0
- package/lib/styles/theme/light.js +64 -0
- package/lib/types/index.d.ts +9 -0
- package/lib/types/index.js +17 -0
- package/lib/utils/colorUtils.d.ts +1 -0
- package/lib/utils/colorUtils.js +52 -0
- package/package.json +122 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertAlphaToSolid: (foreground: string, background: string) => string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/utils/colorUtils.ts
|
|
30
|
+
var colorUtils_exports = {};
|
|
31
|
+
__export(colorUtils_exports, {
|
|
32
|
+
convertAlphaToSolid: () => convertAlphaToSolid
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(colorUtils_exports);
|
|
35
|
+
var import_chroma_js = __toESM(require("chroma-js"));
|
|
36
|
+
var convertAlphaToSolid = (foreground, background) => {
|
|
37
|
+
const fgColor = (0, import_chroma_js.default)(foreground);
|
|
38
|
+
const bgColor = (0, import_chroma_js.default)(background);
|
|
39
|
+
const alpha = fgColor.alpha();
|
|
40
|
+
const alphaComplement = 1 - alpha;
|
|
41
|
+
const mixedColor = [
|
|
42
|
+
fgColor.get("rgb.r") * alpha + bgColor.get("rgb.r") * alphaComplement,
|
|
43
|
+
fgColor.get("rgb.g") * alpha + bgColor.get("rgb.g") * alphaComplement,
|
|
44
|
+
fgColor.get("rgb.b") * alpha + bgColor.get("rgb.b") * alphaComplement
|
|
45
|
+
];
|
|
46
|
+
const resultColor = (0, import_chroma_js.default)(mixedColor);
|
|
47
|
+
return resultColor.hex();
|
|
48
|
+
};
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
convertAlphaToSolid
|
|
52
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lobehub/ui",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "ui kit for lobehub",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"npm",
|
|
7
|
+
"template"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/lobehub/lobe-ui",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/lobehub/lobe-ui/issues/new"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/lobehub/lobe-ui.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "LobeHub",
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"main": "lib/index.js",
|
|
21
|
+
"module": "es/index.js",
|
|
22
|
+
"types": "lib/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"lib",
|
|
25
|
+
"es"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "father build",
|
|
29
|
+
"build:theme": "npm run build --prefix=packages/dumi-theme-lobehub",
|
|
30
|
+
"build:watch": "father dev",
|
|
31
|
+
"ci": "npm run lint && npm run type-check",
|
|
32
|
+
"clean": "rm -rf es lib dist coverage .dumi/tmp .eslintcache",
|
|
33
|
+
"dev": "dumi dev",
|
|
34
|
+
"dev:theme": "npm run dev --prefix=packages/dumi-theme-lobehub",
|
|
35
|
+
"docs:build": "npm run build:theme && dumi build",
|
|
36
|
+
"doctor": "father doctor",
|
|
37
|
+
"lint": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
38
|
+
"prepare": "husky install && npm run setup",
|
|
39
|
+
"prepublishOnly": "father doctor && npm run build",
|
|
40
|
+
"prettier": "prettier -c --write \"**/**\"",
|
|
41
|
+
"release": "semantic-release",
|
|
42
|
+
"setup": "dumi setup",
|
|
43
|
+
"start": "dumi dev",
|
|
44
|
+
"test": "vitest --passWithNoTests",
|
|
45
|
+
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
46
|
+
"test:update": "vitest -u",
|
|
47
|
+
"type-check": "tsc -p tsconfig-check.json"
|
|
48
|
+
},
|
|
49
|
+
"lint-staged": {
|
|
50
|
+
"*.{md,json}": [
|
|
51
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
52
|
+
],
|
|
53
|
+
"*.{js,jsx}": [
|
|
54
|
+
"eslint --fix",
|
|
55
|
+
"prettier --write"
|
|
56
|
+
],
|
|
57
|
+
"*.{ts,tsx}": [
|
|
58
|
+
"eslint --fix",
|
|
59
|
+
"prettier --parser=typescript --write"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@babel/runtime": "^7",
|
|
64
|
+
"ahooks": "^3",
|
|
65
|
+
"antd-style": "^3",
|
|
66
|
+
"chroma-js": "^2",
|
|
67
|
+
"copy-to-clipboard": "^3",
|
|
68
|
+
"lodash": "^4",
|
|
69
|
+
"lucide-react": "latest",
|
|
70
|
+
"polished": "^4",
|
|
71
|
+
"re-resizable": "^6",
|
|
72
|
+
"react-layout-kit": "^1",
|
|
73
|
+
"react-rnd": "^10",
|
|
74
|
+
"styled-components": "^6.0.0-rc.1",
|
|
75
|
+
"use-merge-value": "^1",
|
|
76
|
+
"zustand": "^4"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@commitlint/cli": "^17",
|
|
80
|
+
"@testing-library/react": "^13",
|
|
81
|
+
"@types/chroma-js": "^2",
|
|
82
|
+
"@types/lodash": "^4",
|
|
83
|
+
"@types/react": "^18",
|
|
84
|
+
"@types/react-dom": "^18",
|
|
85
|
+
"@umijs/lint": "^4",
|
|
86
|
+
"@vitest/coverage-c8": "latest",
|
|
87
|
+
"antd": "^5",
|
|
88
|
+
"commitlint": "^17",
|
|
89
|
+
"commitlint-config-gitmoji": "^2",
|
|
90
|
+
"concurrently": "^7",
|
|
91
|
+
"cross-env": "^7",
|
|
92
|
+
"dumi": "^2",
|
|
93
|
+
"dumi-assets-types": "^1",
|
|
94
|
+
"dumi-theme-lobehub": "latest",
|
|
95
|
+
"eslint": "^8",
|
|
96
|
+
"eslint-import-resolver-alias": "^1",
|
|
97
|
+
"eslint-import-resolver-typescript": "^2",
|
|
98
|
+
"father": "^4",
|
|
99
|
+
"husky": "^8",
|
|
100
|
+
"jsdom": "^22",
|
|
101
|
+
"lint-staged": "^13",
|
|
102
|
+
"prettier": "^2",
|
|
103
|
+
"prettier-plugin-organize-imports": "^3",
|
|
104
|
+
"prettier-plugin-packagejson": "^2",
|
|
105
|
+
"react": "^18",
|
|
106
|
+
"react-dom": "^18",
|
|
107
|
+
"semantic-release": "^20",
|
|
108
|
+
"semantic-release-config-gitmoji": "^1",
|
|
109
|
+
"stylelint": "^14",
|
|
110
|
+
"typescript": "^5",
|
|
111
|
+
"vitest": "latest"
|
|
112
|
+
},
|
|
113
|
+
"peerDependencies": {
|
|
114
|
+
"antd": ">=5",
|
|
115
|
+
"react": ">=18",
|
|
116
|
+
"react-dom": ">=18"
|
|
117
|
+
},
|
|
118
|
+
"publishConfig": {
|
|
119
|
+
"access": "public",
|
|
120
|
+
"registry": "https://registry.npmjs.org"
|
|
121
|
+
}
|
|
122
|
+
}
|