oops-ui 0.0.13 → 1.0.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 +13 -1
- package/README.md +139 -0
- package/client.mjs +10 -0
- package/client.mjs.map +1 -0
- package/index.mjs +3 -0
- package/layoutUtil.mjs +10 -0
- package/layoutUtil.mjs.map +1 -0
- package/package.json +57 -108
- package/server.mjs +8 -0
- package/server.mjs.map +1 -0
- package/styles/common.css +1 -0
- package/styles/common.scss +131 -0
- package/styles/flex.scss +38 -0
- package/styles/header.scss +54 -0
- package/styles/image.scss +10 -0
- package/styles/input.scss +131 -0
- package/styles/loading-keyframes.scss +242 -0
- package/styles/reset.css +1 -0
- package/styles/reset.scss +94 -0
- package/styles/respond.scss +54 -0
- package/styles/root-normal-dark.scss +85 -0
- package/styles/root-normal-light.scss +83 -0
- package/styles/root-weird-dark.scss +1 -0
- package/styles/root.scss +326 -0
- package/styles/text.scss +61 -0
- package/styles/vars-color.scss +295 -0
- package/styles/vars-size.scss +6 -0
- package/type/components/ThemeContext/index.d.ts +25 -0
- package/type/components/ThemeContext/types.d.ts +28 -0
- package/type/components/button/button.d.ts +10 -0
- package/type/components/button/index.d.ts +9 -0
- package/type/components/image/index.d.ts +11 -0
- package/type/components/image/types.d.ts +13 -0
- package/type/components/image/useSrcChange.d.ts +11 -0
- package/type/components/layout/content.d.ts +17 -0
- package/type/components/layout/footer.d.ts +21 -0
- package/type/components/layout/get-value.d.ts +10 -0
- package/type/components/layout/header.d.ts +23 -0
- package/type/components/layout/index.d.ts +8 -0
- package/type/components/layout/is-fragment.d.ts +9 -0
- package/type/components/layout/layout.d.ts +55 -0
- package/type/components/layout/sidebar.d.ts +29 -0
- package/type/components/layout/types.d.ts +101 -0
- package/type/components/marquee/MarqueeEle.d.ts +15 -0
- package/type/components/marquee/index.d.ts +7 -0
- package/type/components/marquee/type.d.ts +9 -0
- package/type/components/menu/index.d.ts +6 -0
- package/type/components/menu/menu.d.ts +6 -0
- package/type/components/ripples/Content.d.ts +8 -0
- package/type/components/ripples/LazyRippleEle.d.ts +42 -0
- package/type/components/ripples/RipplesEle.d.ts +42 -0
- package/type/components/ripples/index.d.ts +11 -0
- package/type/components/ripples/types.d.ts +17 -0
- package/type/components/ripples/useOptionUpdate.d.ts +12 -0
- package/type/components/shared/EnLayoutContent/index.d.ts +19 -0
- package/type/components/shared/EnLayoutContent/types.d.ts +17 -0
- package/type/components/switch/SwitchContainer.d.ts +7 -0
- package/type/components/switch/SwitchContent.d.ts +10 -0
- package/type/components/switch/SwitchLabel.d.ts +9 -0
- package/type/components/switch/index.d.ts +14 -0
- package/type/customHooks/use-xcn/index.d.ts +14 -0
- package/type/customHooks/useAnimationFrame.d.ts +58 -0
- package/type/customHooks/useInputIsComposing.d.ts +44 -0
- package/type/customHooks/useRipples/buildBackground/create-background-color.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/create-linear-gradient.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/default-background/_createImageData.d.ts +13 -0
- package/type/customHooks/useRipples/buildBackground/default-background/circleDataList.d.ts +24 -0
- package/type/customHooks/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +8 -0
- package/type/customHooks/useRipples/buildBackground/default-background/createDefault.d.ts +8 -0
- package/type/customHooks/useRipples/buildBackground/default-background/index.d.ts +18 -0
- package/type/customHooks/useRipples/buildBackground/load-image.d.ts +19 -0
- package/type/customHooks/useRipples/buildBackground/run-side.d.ts +15 -0
- package/type/customHooks/useRipples/buildBackground/type.d.ts +37 -0
- package/type/customHooks/useRipples/buildBackground/utils/bind-image.d.ts +10 -0
- package/type/customHooks/useRipples/buildBackground/utils/create-canvas-element.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/utils/create-image-by-src.d.ts +8 -0
- package/type/customHooks/useRipples/buildBackground/utils/get-background-style.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/utils/hide-css-background.d.ts +16 -0
- package/type/customHooks/useRipples/buildBackground/utils/restore-css-background.d.ts +13 -0
- package/type/customHooks/useRipples/callback/can-side.d.ts +14 -0
- package/type/customHooks/useRipples/callback/destroy.d.ts +9 -0
- package/type/customHooks/useRipples/callback/drop.d.ts +9 -0
- package/type/customHooks/useRipples/callback/extract-url.d.ts +8 -0
- package/type/customHooks/useRipples/callback/fade.d.ts +9 -0
- package/type/customHooks/useRipples/callback/get-new-image.d.ts +14 -0
- package/type/customHooks/useRipples/callback/reload-background.d.ts +12 -0
- package/type/customHooks/useRipples/callback/scale.d.ts +8 -0
- package/type/customHooks/useRipples/index.d.ts +45 -0
- package/type/customHooks/useRipples/init/index.d.ts +11 -0
- package/type/customHooks/useRipples/init/initEvent.d.ts +11 -0
- package/type/customHooks/useRipples/init/initShaders.d.ts +13 -0
- package/type/customHooks/useRipples/init/initTexture.d.ts +13 -0
- package/type/customHooks/useRipples/render/computeTextureBoundaries.d.ts +9 -0
- package/type/customHooks/useRipples/render/draw.d.ts +13 -0
- package/type/customHooks/useRipples/render/drawQuad.d.ts +13 -0
- package/{dist/types → type}/customHooks/useRipples/render/dropAtPointer.d.ts +8 -2
- package/type/customHooks/useRipples/render/index.d.ts +12 -0
- package/type/customHooks/useRipples/render/swapBufferIndices.d.ts +11 -0
- package/type/customHooks/useRipples/render/update.d.ts +11 -0
- package/type/customHooks/useRipples/rippersData/defaultData.d.ts +11 -0
- package/type/customHooks/useRipples/rippersData/fadeData.d.ts +51 -0
- package/{dist/types → type}/customHooks/useRipples/rippersData/index.d.ts +24 -18
- package/{dist/types → type}/customHooks/useRipples/rippersData/loadConfig.d.ts +12 -2
- package/type/customHooks/useRipples/rippersData/renderData.d.ts +80 -0
- package/type/customHooks/useRipples/rippersData/useOptions.d.ts +91 -0
- package/{dist/types → type}/customHooks/useRipples/rippersData/vertexSource.d.ts +17 -11
- package/type/customHooks/useRipples/ripple.html.d.ts +12 -0
- package/type/customHooks/useRipples/ripplesClass.d.ts +57 -0
- package/{dist/types → type}/customHooks/useRipples/tools.d.ts +18 -8
- package/type/customHooks/useRipples/types.d.ts +209 -0
- package/type/customHooks/useRipples/use-lazy-ripple.d.ts +15 -0
- package/{dist/types → type}/customHooks/useTimeId.d.ts +10 -6
- package/type/dog.d.ts +8 -0
- package/type/index.client.d.ts +20 -0
- package/type/index.d.ts +8 -0
- package/type/index.server.d.ts +8 -0
- package/type/storage/main-logic .d.ts +26 -0
- package/type/storage/storage-store.d.ts +14 -0
- package/type/utilities/cookie.d.ts +21 -0
- package/type/utilities/sys.d.ts +41 -0
- package/ReadMe.md +0 -17
- package/dist/BackgroundRipple/index.cjs +0 -1
- package/dist/BackgroundRipple/index.mjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
- package/dist/styles/common.css +0 -353
- package/dist/styles/common.scss +0 -504
- package/dist/types/components/button/button.d.ts +0 -2
- package/dist/types/components/button/index.d.ts +0 -3
- package/dist/types/components/button/style/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +0 -1
- package/dist/types/components/layout/header.d.ts +0 -4
- package/dist/types/components/layout/index.d.ts +0 -0
- package/dist/types/components/layout/interface.d.ts +0 -8
- package/dist/types/components/layout/layout.d.ts +0 -14
- package/dist/types/components/menu/index.d.ts +0 -0
- package/dist/types/components/menu/menu.d.ts +0 -0
- package/dist/types/components/menu/style/index.d.ts +0 -0
- package/dist/types/components/ripples/RipplesEle.d.ts +0 -33
- package/dist/types/components/ripples/index.d.ts +0 -2
- package/dist/types/components/ripples/style/index.d.ts +0 -0
- package/dist/types/customHooks/index.d.ts +0 -5
- package/dist/types/customHooks/useAnimationFrame.d.ts +0 -41
- package/dist/types/customHooks/useInputIsComposing.d.ts +0 -45
- package/dist/types/customHooks/useRipples/defaultData.d.ts +0 -5
- package/dist/types/customHooks/useRipples/index.d.ts +0 -46
- package/dist/types/customHooks/useRipples/init/hideCssBackground.d.ts +0 -9
- package/dist/types/customHooks/useRipples/init/initEvent.d.ts +0 -5
- package/dist/types/customHooks/useRipples/init/initGL.d.ts +0 -5
- package/dist/types/customHooks/useRipples/init/initShaders.d.ts +0 -7
- package/dist/types/customHooks/useRipples/init/initTexture.d.ts +0 -7
- package/dist/types/customHooks/useRipples/init/loadImage.d.ts +0 -13
- package/dist/types/customHooks/useRipples/render/computeTextureBoundaries.d.ts +0 -7
- package/dist/types/customHooks/useRipples/render/drawQuad.d.ts +0 -7
- package/dist/types/customHooks/useRipples/render/render.d.ts +0 -7
- package/dist/types/customHooks/useRipples/render/step.d.ts +0 -6
- package/dist/types/customHooks/useRipples/render/swapBufferIndices.d.ts +0 -2
- package/dist/types/customHooks/useRipples/render/update.d.ts +0 -2
- package/dist/types/customHooks/useRipples/rippersData/createImageData.d.ts +0 -4
- package/dist/types/customHooks/useRipples/rippersData/renderData.d.ts +0 -85
- package/dist/types/customHooks/useRipples/ripple.html.d.ts +0 -3
- package/dist/types/customHooks/useRipples/ripplesClass.d.ts +0 -120
- package/dist/types/index.d.ts +0 -3
- package/dist/useAnimationFrame/index.cjs +0 -1
- package/dist/useAnimationFrame/index.mjs +0 -1
- package/dist/useInputIsComposing/index.cjs +0 -1
- package/dist/useInputIsComposing/index.mjs +0 -1
- package/dist/useRipples/index.cjs +0 -1
- package/dist/useRipples/index.mjs +0 -1
- package/dist/useTimeId/index.cjs +0 -1
- package/dist/useTimeId/index.mjs +0 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
// 亮度值
|
|
2
|
+
|
|
3
|
+
// function a(str,...other) {
|
|
4
|
+
// str =str[0];
|
|
5
|
+
|
|
6
|
+
// return str.split(';').map(e=> e.trim()).filter(e=> e.length > 5).reduce((v,e)=> {
|
|
7
|
+
// const [tag, item] = e.split(':').map(e=> e.trim());
|
|
8
|
+
// const r = Number('0x' + item.slice(1,3));
|
|
9
|
+
// const g = Number('0x' + item.slice(3,5));
|
|
10
|
+
// const b = Number('0x' + item.slice(5));
|
|
11
|
+
// return v + e + ';' + tag + '-rgb' + ':' + r + ',' + g + ',' + b + ';'
|
|
12
|
+
// },'');
|
|
13
|
+
// }
|
|
14
|
+
|
|
15
|
+
$en-color-darkness-10: #fefefe;
|
|
16
|
+
$en-color-darkness-10-rgb: 251, 251, 251;
|
|
17
|
+
$en-color-darkness-15: #efefef;
|
|
18
|
+
$en-color-darkness-15-rgb: 235, 235, 235;
|
|
19
|
+
$en-color-darkness-20: #e0e0e0;
|
|
20
|
+
$en-color-darkness-20-rgb: 219, 219, 219;
|
|
21
|
+
$en-color-darkness-25: #d3d3d3;
|
|
22
|
+
$en-color-darkness-25-rgb: 203, 203, 203;
|
|
23
|
+
$en-color-darkness-30: #c3c3c3;
|
|
24
|
+
$en-color-darkness-30-rgb: 188, 188, 188;
|
|
25
|
+
$en-color-darkness-35: #b3b3b3;
|
|
26
|
+
$en-color-darkness-35-rgb: 172, 172, 172;
|
|
27
|
+
$en-color-darkness-40: #a3a3a3;
|
|
28
|
+
$en-color-darkness-40-rgb: 156, 156, 156;
|
|
29
|
+
$en-color-darkness-45: #939393;
|
|
30
|
+
$en-color-darkness-45-rgb: 141, 141, 141;
|
|
31
|
+
$en-color-darkness-50: #838383;
|
|
32
|
+
$en-color-darkness-50-rgb: 125, 125, 125;
|
|
33
|
+
$en-color-darkness-55: #737373;
|
|
34
|
+
$en-color-darkness-55-rgb: 110, 110, 110;
|
|
35
|
+
$en-color-darkness-60: #636363;
|
|
36
|
+
$en-color-darkness-60-rgb: 94, 94, 94;
|
|
37
|
+
$en-color-darkness-65: #535353;
|
|
38
|
+
$en-color-darkness-65-rgb: 79, 79, 79;
|
|
39
|
+
$en-color-darkness-70: #434343;
|
|
40
|
+
$en-color-darkness-70-rgb: 64, 64, 64;
|
|
41
|
+
$en-color-darkness-75: #333333;
|
|
42
|
+
$en-color-darkness-75-rgb: 49, 49, 49;
|
|
43
|
+
$en-color-darkness-80: #232323;
|
|
44
|
+
$en-color-darkness-80-rgb: 34, 34, 34;
|
|
45
|
+
$en-color-darkness-85: #131313;
|
|
46
|
+
$en-color-darkness-85-rgb: 19, 19, 19;
|
|
47
|
+
$en-color-darkness-90: #030303;
|
|
48
|
+
$en-color-darkness-90-rgb: 3, 3, 3;
|
|
49
|
+
// 纯色
|
|
50
|
+
$en-color-blue: #0085f2;
|
|
51
|
+
$en-color-blue-rgb: 0, 133, 242;
|
|
52
|
+
$en-color-cyan: #36cfc9;
|
|
53
|
+
$en-color-cyan-rgb: 54, 207, 201;
|
|
54
|
+
$en-color-lime: #bae637;
|
|
55
|
+
$en-color-lime-rgb: 186, 230, 55;
|
|
56
|
+
$en-color-green: #009a46;
|
|
57
|
+
$en-color-green-rgb: 0, 154, 70;
|
|
58
|
+
$en-color-yellow: #928700;
|
|
59
|
+
$en-color-yellow-rgb: 146, 135, 0;
|
|
60
|
+
$en-color-volcano: #ff7a45;
|
|
61
|
+
$en-color-volcano-rgb: 255, 122, 69;
|
|
62
|
+
$en-color-gold: #ffc53d;
|
|
63
|
+
$en-color-gold-rgb: 255, 197, 61;
|
|
64
|
+
$en-color-orange: #ffa940;
|
|
65
|
+
$en-color-orange-rgb: 255, 169, 64;
|
|
66
|
+
$en-color-red: #d30038;
|
|
67
|
+
$en-color-red-rgb: 211, 0, 56;
|
|
68
|
+
$en-color-violet: #9b65ff;
|
|
69
|
+
$en-color-violet-rgb: 155, 101, 255;
|
|
70
|
+
$en-color-pink: #d00058;
|
|
71
|
+
$en-color-pink-rgb: 208, 0, 88;
|
|
72
|
+
$en-color-beige: #f0f2e6;
|
|
73
|
+
$en-color-beige-rgb: 240, 242, 230;
|
|
74
|
+
$en-color-black: #000000;
|
|
75
|
+
$en-color-black-rgb: 0, 0, 0;
|
|
76
|
+
$en-color-white: #ffffff;
|
|
77
|
+
$en-color-white-rgb: 255, 255, 255;
|
|
78
|
+
// mac 关闭按钮的色
|
|
79
|
+
$en-color-close-button: rgb(252, 71, 70);
|
|
80
|
+
$en-color-close-button-rgb: 252, 71, 70;
|
|
81
|
+
// mac 关闭最小化的色
|
|
82
|
+
$en-color-mini-size-button: rgb(245, 191, 79);
|
|
83
|
+
$en-color-mini-size-button-rgb: 245, 191, 79;
|
|
84
|
+
// mac 关闭最大化的色
|
|
85
|
+
$en-color-full-size-button: rgb(99, 200, 86);
|
|
86
|
+
$en-color-full-size-button-rgb: 99, 200, 86;
|
|
87
|
+
|
|
88
|
+
$en-color-blue-10: #dce2f2;
|
|
89
|
+
$en-color-blue-10-rgb: 220, 226, 242;
|
|
90
|
+
$en-color-blue-20: #c1cff1;
|
|
91
|
+
$en-color-blue-20-rgb: 193, 207, 241;
|
|
92
|
+
$en-color-blue-30: #8cb4ff;
|
|
93
|
+
$en-color-blue-30-rgb: 140, 180, 255;
|
|
94
|
+
$en-color-blue-40: #5e9eff;
|
|
95
|
+
$en-color-blue-40-rgb: 94, 158, 255;
|
|
96
|
+
$en-color-blue-50: #0085f2;
|
|
97
|
+
$en-color-blue-50-rgb: 0, 133, 242;
|
|
98
|
+
$en-color-blue-60: #0069c2;
|
|
99
|
+
$en-color-blue-60-rgb: 0, 105, 194;
|
|
100
|
+
$en-color-blue-70: #004d92;
|
|
101
|
+
$en-color-blue-70-rgb: 0, 77, 146;
|
|
102
|
+
$en-color-blue-80: #003465;
|
|
103
|
+
$en-color-blue-80-rgb: 0, 52, 101;
|
|
104
|
+
$en-color-blue-90: #001b3a;
|
|
105
|
+
$en-color-blue-90-rgb: 0, 27, 58;
|
|
106
|
+
|
|
107
|
+
$en-color-cyan-10: #e6fffb;
|
|
108
|
+
$en-color-cyan-10-rgb: 230, 255, 251;
|
|
109
|
+
$en-color-cyan-20: #b5f5ec;
|
|
110
|
+
$en-color-cyan-20-rgb: 181, 245, 236;
|
|
111
|
+
$en-color-cyan-30: #87e8de;
|
|
112
|
+
$en-color-cyan-30-rgb: 135, 232, 222;
|
|
113
|
+
$en-color-cyan-40: #5cdbd3;
|
|
114
|
+
$en-color-cyan-40-rgb: 92, 219, 211;
|
|
115
|
+
$en-color-cyan-50: #13c2c2;
|
|
116
|
+
$en-color-cyan-50-rgb: 19, 194, 194;
|
|
117
|
+
$en-color-cyan-60: #08979c;
|
|
118
|
+
$en-color-cyan-60-rgb: 8, 151, 156;
|
|
119
|
+
$en-color-cyan-70: #006d75;
|
|
120
|
+
$en-color-cyan-70-rgb: 0, 109, 117;
|
|
121
|
+
$en-color-cyan-80: #00474f;
|
|
122
|
+
$en-color-cyan-80-rgb: 0, 71, 79;
|
|
123
|
+
$en-color-cyan-90: #002329;
|
|
124
|
+
$en-color-cyan-90-rgb: 0, 35, 41;
|
|
125
|
+
|
|
126
|
+
$en-color-lime-10: #fcffe6;
|
|
127
|
+
$en-color-lime-10-rgb: 252, 255, 230;
|
|
128
|
+
$en-color-lime-20: #f4ffb8;
|
|
129
|
+
$en-color-lime-20-rgb: 244, 255, 184;
|
|
130
|
+
$en-color-lime-30: #eaff8f;
|
|
131
|
+
$en-color-lime-30-rgb: 234, 255, 143;
|
|
132
|
+
$en-color-lime-40: #d3f261;
|
|
133
|
+
$en-color-lime-40-rgb: 211, 242, 97;
|
|
134
|
+
$en-color-lime-50: #a0d911;
|
|
135
|
+
$en-color-lime-50-rgb: 160, 217, 17;
|
|
136
|
+
$en-color-lime-60: #7cb305;
|
|
137
|
+
$en-color-lime-60-rgb: 124, 179, 5;
|
|
138
|
+
$en-color-lime-70: #5b8c00;
|
|
139
|
+
$en-color-lime-70-rgb: 91, 140, 0;
|
|
140
|
+
$en-color-lime-80: #3f6600;
|
|
141
|
+
$en-color-lime-80-rgb: 63, 102, 0;
|
|
142
|
+
$en-color-lime-90: #254000;
|
|
143
|
+
$en-color-lime-90-rgb: 37, 64, 0;
|
|
144
|
+
|
|
145
|
+
$en-color-green-10: #a9f3ba;
|
|
146
|
+
$en-color-green-10-rgb: 169, 243, 186;
|
|
147
|
+
$en-color-green-20: #73e693;
|
|
148
|
+
$en-color-green-20-rgb: 115, 230, 147;
|
|
149
|
+
$en-color-green-30: #00d061;
|
|
150
|
+
$en-color-green-30-rgb: 0, 208, 97;
|
|
151
|
+
$en-color-green-40: #00b755;
|
|
152
|
+
$en-color-green-40-rgb: 0, 183, 85;
|
|
153
|
+
$en-color-green-50: #009a46;
|
|
154
|
+
$en-color-green-50-rgb: 0, 154, 70;
|
|
155
|
+
$en-color-green-60: #007936;
|
|
156
|
+
$en-color-green-60-rgb: 0, 121, 54;
|
|
157
|
+
$en-color-green-70: #005a26;
|
|
158
|
+
$en-color-green-70-rgb: 0, 90, 38;
|
|
159
|
+
$en-color-green-80: #003d18;
|
|
160
|
+
$en-color-green-80-rgb: 0, 61, 24;
|
|
161
|
+
$en-color-green-90: #00210a;
|
|
162
|
+
$en-color-green-90-rgb: 0, 33, 10;
|
|
163
|
+
|
|
164
|
+
$en-color-orange-10: #fff7e6;
|
|
165
|
+
$en-color-orange-10-rgb: 255, 247, 230;
|
|
166
|
+
$en-color-orange-20: #ffe7ba;
|
|
167
|
+
$en-color-orange-20-rgb: 255, 231, 186;
|
|
168
|
+
$en-color-orange-30: #ffd591;
|
|
169
|
+
$en-color-orange-30-rgb: 255, 213, 145;
|
|
170
|
+
$en-color-orange-40: #ffc069;
|
|
171
|
+
$en-color-orange-40-rgb: 255, 192, 105;
|
|
172
|
+
$en-color-orange-50: #fa8c16;
|
|
173
|
+
$en-color-orange-50-rgb: 250, 140, 22;
|
|
174
|
+
$en-color-orange-60: #fa8c16;
|
|
175
|
+
$en-color-orange-60-rgb: 250, 140, 22;
|
|
176
|
+
$en-color-orange-70: #ad4e00;
|
|
177
|
+
$en-color-orange-70-rgb: 173, 78, 0;
|
|
178
|
+
$en-color-orange-80: #873800;
|
|
179
|
+
$en-color-orange-80-rgb: 135, 56, 0;
|
|
180
|
+
$en-color-orange-90: #612500;
|
|
181
|
+
$en-color-orange-90-rgb: 97, 37, 0;
|
|
182
|
+
|
|
183
|
+
$en-color-gold-10: #fff7e6;
|
|
184
|
+
$en-color-gold-10-rgb: 255, 247, 230;
|
|
185
|
+
$en-color-gold-20: #ffe7ba;
|
|
186
|
+
$en-color-gold-20-rgb: 255, 231, 186;
|
|
187
|
+
$en-color-gold-30: #ffd591;
|
|
188
|
+
$en-color-gold-30-rgb: 255, 213, 145;
|
|
189
|
+
$en-color-gold-40: #ffc069;
|
|
190
|
+
$en-color-gold-40-rgb: 255, 192, 105;
|
|
191
|
+
$en-color-gold-50: #fa8c16;
|
|
192
|
+
$en-color-gold-50-rgb: 250, 140, 22;
|
|
193
|
+
$en-color-gold-60: #fa8c16;
|
|
194
|
+
$en-color-gold-60-rgb: 250, 140, 22;
|
|
195
|
+
$en-color-gold-70: #ad4e00;
|
|
196
|
+
$en-color-gold-70-rgb: 173, 78, 0;
|
|
197
|
+
$en-color-gold-80: #873800;
|
|
198
|
+
$en-color-gold-80-rgb: 135, 56, 0;
|
|
199
|
+
$en-color-gold-90: #612500;
|
|
200
|
+
$en-color-gold-90-rgb: 97, 37, 0;
|
|
201
|
+
|
|
202
|
+
$en-color-yellow-10: #f0e498;
|
|
203
|
+
$en-color-yellow-10-rgb: 240, 228, 152;
|
|
204
|
+
$en-color-yellow-20: #dfd172;
|
|
205
|
+
$en-color-yellow-20-rgb: 223, 209, 114;
|
|
206
|
+
$en-color-yellow-30: #c7b700;
|
|
207
|
+
$en-color-yellow-30-rgb: 199, 183, 0;
|
|
208
|
+
$en-color-yellow-40: #afa100;
|
|
209
|
+
$en-color-yellow-40-rgb: 175, 161, 0;
|
|
210
|
+
$en-color-yellow-50: #938700;
|
|
211
|
+
$en-color-yellow-50-rgb: 147, 135, 0;
|
|
212
|
+
$en-color-yellow-60: #746a00;
|
|
213
|
+
$en-color-yellow-60-rgb: 116, 106, 0;
|
|
214
|
+
$en-color-yellow-70: #564e00;
|
|
215
|
+
$en-color-yellow-70-rgb: 86, 78, 0;
|
|
216
|
+
$en-color-yellow-80: #3a3500;
|
|
217
|
+
$en-color-yellow-80-rgb: 58, 53, 0;
|
|
218
|
+
$en-color-yellow-90: #1f1c00;
|
|
219
|
+
$en-color-yellow-90-rgb: 31, 28, 0;
|
|
220
|
+
|
|
221
|
+
$en-color-volcano-10: #fff2e8;
|
|
222
|
+
$en-color-volcano-10-rgb: 255, 242, 232;
|
|
223
|
+
$en-color-volcano-20: #ffd8bf;
|
|
224
|
+
$en-color-volcano-20-rgb: 255, 216, 191;
|
|
225
|
+
$en-color-volcano-30: #ffbb96;
|
|
226
|
+
$en-color-volcano-30-rgb: 255, 187, 150;
|
|
227
|
+
$en-color-volcano-40: #ff9c6e;
|
|
228
|
+
$en-color-volcano-40-rgb: 255, 156, 110;
|
|
229
|
+
$en-color-volcano-50: #fa541c;
|
|
230
|
+
$en-color-volcano-50-rgb: 250, 84, 28;
|
|
231
|
+
$en-color-volcano-60: #d4380d;
|
|
232
|
+
$en-color-volcano-60-rgb: 212, 56, 13;
|
|
233
|
+
$en-color-volcano-70: #ad2102;
|
|
234
|
+
$en-color-volcano-70-rgb: 173, 33, 2;
|
|
235
|
+
$en-color-volcano-80: #871400;
|
|
236
|
+
$en-color-volcano-80-rgb: 135, 20, 0;
|
|
237
|
+
$en-color-volcano-90: #610b00;
|
|
238
|
+
$en-color-volcano-90-rgb: 97, 11, 0;
|
|
239
|
+
|
|
240
|
+
$en-color-red-10: #ffd9dc;
|
|
241
|
+
$en-color-red-10-rgb: 255, 217, 220;
|
|
242
|
+
$en-color-red-20: #ffc0c4;
|
|
243
|
+
$en-color-red-20-rgb: 255, 192, 196;
|
|
244
|
+
$en-color-red-30: #ff97a0;
|
|
245
|
+
$en-color-red-30-rgb: 255, 151, 160;
|
|
246
|
+
$en-color-red-40: #ff707f;
|
|
247
|
+
$en-color-red-40-rgb: 255, 112, 127;
|
|
248
|
+
$en-color-red-50: #ff2a51;
|
|
249
|
+
$en-color-red-50-rgb: 255, 42, 81;
|
|
250
|
+
$en-color-red-60: #d30038;
|
|
251
|
+
$en-color-red-60-rgb: 211, 0, 56;
|
|
252
|
+
$en-color-red-70: #9e0027;
|
|
253
|
+
$en-color-red-70-rgb: 158, 0, 39;
|
|
254
|
+
$en-color-red-80: #6f0019;
|
|
255
|
+
$en-color-red-80-rgb: 111, 0, 25;
|
|
256
|
+
$en-color-red-90: #40000a;
|
|
257
|
+
$en-color-red-90-rgb: 64, 0, 10;
|
|
258
|
+
|
|
259
|
+
$en-color-violet-10: #e6deff;
|
|
260
|
+
$en-color-violet-10-rgb: 230, 222, 255;
|
|
261
|
+
$en-color-violet-20: #d4c5ff;
|
|
262
|
+
$en-color-violet-20-rgb: 212, 197, 255;
|
|
263
|
+
$en-color-violet-30: #bea5ff;
|
|
264
|
+
$en-color-violet-30-rgb: 190, 165, 255;
|
|
265
|
+
$en-color-violet-40: #ae8aff;
|
|
266
|
+
$en-color-violet-40-rgb: 174, 138, 255;
|
|
267
|
+
$en-color-violet-50: #9b65ff;
|
|
268
|
+
$en-color-violet-50-rgb: 155, 101, 255;
|
|
269
|
+
$en-color-violet-60: #872bff;
|
|
270
|
+
$en-color-violet-60-rgb: 135, 43, 255;
|
|
271
|
+
$en-color-violet-70: #6800cf;
|
|
272
|
+
$en-color-violet-70-rgb: 104, 0, 207;
|
|
273
|
+
$en-color-violet-80: #480091;
|
|
274
|
+
$en-color-violet-80-rgb: 72, 0, 145;
|
|
275
|
+
$en-color-violet-90: #280056;
|
|
276
|
+
$en-color-violet-90-rgb: 40, 0, 86;
|
|
277
|
+
|
|
278
|
+
$en-color-pink-10: #ffd9df;
|
|
279
|
+
$en-color-pink-10-rgb: 255, 217, 223;
|
|
280
|
+
$en-color-pink-20: #ffbbc8;
|
|
281
|
+
$en-color-pink-20-rgb: 255, 187, 200;
|
|
282
|
+
$en-color-pink-30: #ff93aa;
|
|
283
|
+
$en-color-pink-30-rgb: 255, 147, 170;
|
|
284
|
+
$en-color-pink-40: #ff6d91;
|
|
285
|
+
$en-color-pink-40-rgb: 255, 109, 145;
|
|
286
|
+
$en-color-pink-50: #ff1f72;
|
|
287
|
+
$en-color-pink-50-rgb: 255, 31, 114;
|
|
288
|
+
$en-color-pink-60: #d00058;
|
|
289
|
+
$en-color-pink-60-rgb: 208, 0, 88;
|
|
290
|
+
$en-color-pink-70: #9e0041;
|
|
291
|
+
$en-color-pink-70-rgb: 158, 0, 65;
|
|
292
|
+
$en-color-pink-80: #6d002b;
|
|
293
|
+
$en-color-pink-80-rgb: 109, 0, 43;
|
|
294
|
+
$en-color-pink-90: #3f0015;
|
|
295
|
+
$en-color-pink-90-rgb: 63, 0, 21;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/ThemeContext/index.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { ThemeColorModeProviderProps, ThemeContextType } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* 使用主题颜色模式
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* interface ThemeContextType {
|
|
13
|
+
* autoColorMode: boolean;
|
|
14
|
+
* colorMode: ColorMode;
|
|
15
|
+
* colorModeClassName: string;
|
|
16
|
+
* toggleColorMode: () => ColorMode;
|
|
17
|
+
* setColorMode: (newColorMode: ColorMode) => ColorMode;
|
|
18
|
+
* // 清理主题设置,让主题跟随系统
|
|
19
|
+
* clearColorMode: () => void;
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function useColorMode(): ThemeContextType;
|
|
24
|
+
/** */
|
|
25
|
+
export declare function ThemeColorModeProvider({ children, initialTheme }: ThemeColorModeProviderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/ThemeContext/types.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/** 颜色模式 */
|
|
8
|
+
export type ColorMode = 'light' | 'dark';
|
|
9
|
+
/** 主题 */
|
|
10
|
+
export type ThemeContextType = {
|
|
11
|
+
/** 是否为自动模式 */
|
|
12
|
+
autoColorMode: boolean;
|
|
13
|
+
/** 获取颜色模式 */
|
|
14
|
+
colorMode: ColorMode;
|
|
15
|
+
/** 展示的当前颜色模型样式类 */
|
|
16
|
+
colorModeClassName: string;
|
|
17
|
+
/** 切换颜色模式 */
|
|
18
|
+
toggleColorMode: () => ColorMode;
|
|
19
|
+
/** 设置颜色模式(仅允许设置为 'dark'、或 `light`) */
|
|
20
|
+
setColorMode: (newColorMode: ColorMode) => ColorMode;
|
|
21
|
+
/** 设置为跟随系统 */
|
|
22
|
+
clearColorMode: () => void;
|
|
23
|
+
};
|
|
24
|
+
export type ThemeColorModeProviderProps = {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/** 初始化默认的主题值 */
|
|
27
|
+
initialTheme: ColorMode;
|
|
28
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/image/index.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { EnImageProps } from './types';
|
|
8
|
+
/** 简单的图像 */
|
|
9
|
+
declare const Image: import("react").ForwardRefExoticComponent<Omit<EnImageProps, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
10
|
+
export { Image };
|
|
11
|
+
export type { EnImageProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/image/types.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { DetailedHTMLProps, ImgHTMLAttributes } from 'react';
|
|
8
|
+
export type EnImageProps = {
|
|
9
|
+
/** 下载错误时展示的图像 */
|
|
10
|
+
errorSrc?: string;
|
|
11
|
+
/** 加载中的图像 */
|
|
12
|
+
loadingSrc?: string;
|
|
13
|
+
} & DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/image/useSrcChange.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/** 当地址触发变更 */
|
|
8
|
+
export declare function useSrcChange(src: string, fallbackSrc?: string): {
|
|
9
|
+
resultSrc: string;
|
|
10
|
+
loadComplete: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/layout/content.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLAttributes } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* layout content
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @param {string} className 布局的类名
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
declare const InternalValueC: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export { InternalValueC };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/layout/footer.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { LayoutFooterProps } from './types';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* layout footer
|
|
11
|
+
*
|
|
12
|
+
* 布局底部
|
|
13
|
+
*
|
|
14
|
+
* @param className 自定义类名
|
|
15
|
+
* @param height 自定义高度
|
|
16
|
+
* @param props 其他属性
|
|
17
|
+
* @returns ReactElement
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
declare const InternalValueF: import("react").ForwardRefExoticComponent<LayoutFooterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export { InternalValueF };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/layout/header.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { LayoutHeaderProps } from './types';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* layout header
|
|
11
|
+
*
|
|
12
|
+
* 布局头部
|
|
13
|
+
*
|
|
14
|
+
* @param className 自定义类名
|
|
15
|
+
* @param height 高度
|
|
16
|
+
* 缺省值为 2.8rem,当未在 `Layout` 中使用,该值不起作用
|
|
17
|
+
* @param noSticky 是否取消悬挂粘连
|
|
18
|
+
* 缺省值为 false
|
|
19
|
+
* @param props 其他属性
|
|
20
|
+
* @returns ReactElement
|
|
21
|
+
*/
|
|
22
|
+
declare const InternalValueH: import("react").ForwardRefExoticComponent<LayoutHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export { InternalValueH };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/layout/index.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
export { Layout, Layout as EnLayout, LayoutContent, LayoutContent as EnLayoutContent, LayoutHeader, LayoutHeader as EnLayoutHeader, LayoutFooter, LayoutFooter as EnLayoutFooter, LayoutSideBar, LayoutSideBar as EnLayoutSideBar, } from './layout';
|
|
8
|
+
export type { LayoutProps, LayoutSideBarProps, LayoutHeaderProps, LayoutFooterProps, } from './types';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/layout/layout.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { InternalValueH as LayoutHeader } from './header';
|
|
8
|
+
import { InternalValueS as LayoutSideBar } from './sidebar';
|
|
9
|
+
import { InternalValueC as LayoutContent } from './content';
|
|
10
|
+
import { InternalValueF as LayoutFooter } from './footer';
|
|
11
|
+
import { LayoutProps } from './types';
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* ## layout
|
|
15
|
+
*
|
|
16
|
+
* 布局组件,用于构建页面布局。
|
|
17
|
+
*
|
|
18
|
+
* ***为了照顾在 next.js 中的服务端组件中使用,在拥有 `side bar` 时 `Layout` 的 `height` 为百分比时会触发 side bar 滚动***
|
|
19
|
+
*
|
|
20
|
+
* @param {string} className 布局的类名
|
|
21
|
+
* @param {CSSProperties} style 布局的样式
|
|
22
|
+
* @param {string | number} width 布局的宽
|
|
23
|
+
* @param {string | number} height 布局的高
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <Layout>
|
|
28
|
+
* <LayoutHeader> 头部 </LayoutHeader>
|
|
29
|
+
* <LayoutSideBar> 侧边栏 </LayoutSideBar>
|
|
30
|
+
* <LayoutContent> 内容区 </LayoutContent>
|
|
31
|
+
* <LayoutFooter> 页脚 </LayoutFooter>
|
|
32
|
+
* </Layout>
|
|
33
|
+
*
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* 该组件仅接受 `LayoutHeader`、`LayoutSideBar`、`LayoutContent` 和 `LayoutFooter` 作为(直接)子组件。
|
|
37
|
+
*
|
|
38
|
+
* 可任意搭配使用,但不推荐使用无 `LayoutContent` 使用。
|
|
39
|
+
*
|
|
40
|
+
* 目前已知当 `Layout` 嵌套 `Layout` 时,需要设定内部 `Layout` 的 `width` 和 `height`。
|
|
41
|
+
*
|
|
42
|
+
* ```jsx
|
|
43
|
+
* <Layout width="100%" height="100%">
|
|
44
|
+
* <Layout width="100%" height="100%">
|
|
45
|
+
* <LayoutSideBar width="150px"> 侧边栏 </LayoutSideBar>
|
|
46
|
+
* <LayoutContent> 内容区 </LayoutContent>
|
|
47
|
+
* </Layout>
|
|
48
|
+
* <LayoutFooter> 页脚 </LayoutFooter>
|
|
49
|
+
* </Layout>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
declare const Layout: import("react").ForwardRefExoticComponent<LayoutProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
|
+
export { Layout, LayoutHeader, LayoutSideBar, LayoutContent, LayoutFooter };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/components/layout/sidebar.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { LayoutSideBarProps } from './types';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* children side bar
|
|
11
|
+
*
|
|
12
|
+
* 侧边栏
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @param children 子元素
|
|
16
|
+
* @param ref 组件引用
|
|
17
|
+
* @param props 组件属性
|
|
18
|
+
* @param className 自定义类名
|
|
19
|
+
* @param width 侧边栏的宽度
|
|
20
|
+
* 缺省值为 `150px`
|
|
21
|
+
* @param right 是否居右
|
|
22
|
+
* 缺省值为 `false`
|
|
23
|
+
* @param full 是否占用所有空间
|
|
24
|
+
* 缺省值为 `false`
|
|
25
|
+
* @returns `ReactElement`;
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
declare const InternalValueS: import("react").ForwardRefExoticComponent<LayoutSideBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export { InternalValueS };
|