diff --git a/.gitignore b/.gitignore index d994b3794c9ab583182ba1960f3b1ca8334d0056..14d44d182c7326226da21a64a810170cf9f4032d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ pnpm-debug.log* lerna-debug.log* node_modules +/output dist dist-ssr *.local diff --git a/.vscode/opendesign.token.code-snippets b/.vscode/opendesign.token.code-snippets index d527caa3569b48de17d4421e88308a454863e900..d6c0a210a3eb2d4225df054b663e23634dbb073a 100644 --- a/.vscode/opendesign.token.code-snippets +++ b/.vscode/opendesign.token.code-snippets @@ -15,164 +15,84 @@ "description": "[light: 0, 0, 0, dark: 0, 0, 0]", "scope": "css,scss,less" }, - "--o-blue-1": { - "prefix": [ - "var(--o-blue-1)" - ], - "body": "var(--o-blue-1)", - "description": "[light: 227, 234, 246, dark: 0, 18, 85]", - "scope": "css,scss,less" - }, - "--o-blue-2": { - "prefix": [ - "var(--o-blue-2)" - ], - "body": "var(--o-blue-2)", - "description": "[light: 190, 206, 237, dark: 0, 24, 106]", - "scope": "css,scss,less" - }, - "--o-blue-3": { - "prefix": [ - "var(--o-blue-3)" - ], - "body": "var(--o-blue-3)", - "description": "[light: 132, 161, 220, dark: 0, 31, 126]", - "scope": "css,scss,less" - }, - "--o-blue-4": { - "prefix": [ - "var(--o-blue-4)" - ], - "body": "var(--o-blue-4)", - "description": "[light: 81, 119, 202, dark: 0, 39, 147]", - "scope": "css,scss,less" - }, - "--o-blue-5": { - "prefix": [ - "var(--o-blue-5)" - ], - "body": "var(--o-blue-5)", - "description": "[light: 37, 81, 185, dark: 0, 47, 167]", - "scope": "css,scss,less" - }, - "--o-blue-6": { - "prefix": [ - "var(--o-blue-6)" - ], - "body": "var(--o-blue-6)", - "description": "[light: 0, 47, 167, dark: 37, 81, 185]", - "scope": "css,scss,less" - }, - "--o-blue-7": { - "prefix": [ - "var(--o-blue-7)" - ], - "body": "var(--o-blue-7)", - "description": "[light: 0, 39, 147, dark: 81, 119, 202]", - "scope": "css,scss,less" - }, - "--o-blue-8": { - "prefix": [ - "var(--o-blue-8)" - ], - "body": "var(--o-blue-8)", - "description": "[light: 0, 31, 126, dark: 132, 161, 220]", - "scope": "css,scss,less" - }, - "--o-blue-9": { - "prefix": [ - "var(--o-blue-9)" - ], - "body": "var(--o-blue-9)", - "description": "[light: 0, 24, 106, dark: 190, 206, 237]", - "scope": "css,scss,less" - }, - "--o-blue-10": { + "--o-deepblue-1": { "prefix": [ - "var(--o-blue-10)" - ], - "body": "var(--o-blue-10)", - "description": "[light: 0, 18, 85, dark: 227, 234, 246]", - "scope": "css,scss,less" - }, - "--o-yellow-1": { - "prefix": [ - "var(--o-yellow-1)" + "var(--o-deepblue-1)" ], - "body": "var(--o-yellow-1)", - "description": "[light: 254, 252, 233, dark: 80, 47, 0]", + "body": "var(--o-deepblue-1)", + "description": "[light: 232, 240, 255, dark: 0, 4, 77]", "scope": "css,scss,less" }, - "--o-yellow-2": { + "--o-deepblue-2": { "prefix": [ - "var(--o-yellow-2)" + "var(--o-deepblue-2)" ], - "body": "var(--o-yellow-2)", - "description": "[light: 252, 248, 202, dark: 120, 76, 0]", + "body": "var(--o-deepblue-2)", + "description": "[light: 194, 213, 254, dark: 6, 15, 120]", "scope": "css,scss,less" }, - "--o-yellow-3": { + "--o-deepblue-3": { "prefix": [ - "var(--o-yellow-3)" + "var(--o-deepblue-3)" ], - "body": "var(--o-yellow-3)", - "description": "[light: 249, 237, 149, dark: 160, 109, 0]", + "body": "var(--o-deepblue-3)", + "description": "[light: 157, 184, 253, dark: 20, 37, 163]", "scope": "css,scss,less" }, - "--o-yellow-4": { + "--o-deepblue-4": { "prefix": [ - "var(--o-yellow-4)" + "var(--o-deepblue-4)" ], - "body": "var(--o-yellow-4)", - "description": "[light: 246, 224, 98, dark: 200, 147, 0]", + "body": "var(--o-deepblue-4)", + "description": "[light: 120, 153, 252, dark: 40, 65, 207]", "scope": "css,scss,less" }, - "--o-yellow-5": { + "--o-deepblue-5": { "prefix": [ - "var(--o-yellow-5)" + "var(--o-deepblue-5)" ], - "body": "var(--o-yellow-5)", - "description": "[light: 243, 207, 49, dark: 240, 188, 0]", + "body": "var(--o-deepblue-5)", + "description": "[light: 83, 119, 251, dark: 66, 99, 250]", "scope": "css,scss,less" }, - "--o-yellow-6": { + "--o-deepblue-6": { "prefix": [ - "var(--o-yellow-6)" + "var(--o-deepblue-6)" ], - "body": "var(--o-yellow-6)", - "description": "[light: 240, 188, 0, dark: 243, 207, 49]", + "body": "var(--o-deepblue-6)", + "description": "[light: 46, 83, 250, dark: 84, 120, 251]", "scope": "css,scss,less" }, - "--o-yellow-7": { + "--o-deepblue-7": { "prefix": [ - "var(--o-yellow-7)" + "var(--o-deepblue-7)" ], - "body": "var(--o-yellow-7)", - "description": "[light: 200, 147, 0, dark: 246, 224, 98]", + "body": "var(--o-deepblue-7)", + "description": "[light: 29, 55, 207, dark: 122, 154, 252]", "scope": "css,scss,less" }, - "--o-yellow-8": { + "--o-deepblue-8": { "prefix": [ - "var(--o-yellow-8)" + "var(--o-deepblue-8)" ], - "body": "var(--o-yellow-8)", - "description": "[light: 160, 109, 0, dark: 249, 237, 149]", + "body": "var(--o-deepblue-8)", + "description": "[light: 15, 32, 163, dark: 160, 186, 253]", "scope": "css,scss,less" }, - "--o-yellow-9": { + "--o-deepblue-9": { "prefix": [ - "var(--o-yellow-9)" + "var(--o-deepblue-9)" ], - "body": "var(--o-yellow-9)", - "description": "[light: 120, 76, 0, dark: 252, 248, 202]", + "body": "var(--o-deepblue-9)", + "description": "[light: 6, 15, 120, dark: 199, 217, 254]", "scope": "css,scss,less" }, - "--o-yellow-10": { + "--o-deepblue-10": { "prefix": [ - "var(--o-yellow-10)" + "var(--o-deepblue-10)" ], - "body": "var(--o-yellow-10)", - "description": "[light: 80, 47, 0, dark: 254, 252, 233]", + "body": "var(--o-deepblue-10)", + "description": "[light: 0, 4, 47, dark: 238, 244, 255]", "scope": "css,scss,less" }, "--o-green-1": { @@ -180,7 +100,7 @@ "var(--o-green-1)" ], "body": "var(--o-green-1)", - "description": "[light: 233, 247, 231, dark: 7, 60, 9]", + "description": "[light: 232, 255, 238, dark: 0, 77, 42]", "scope": "css,scss,less" }, "--o-green-2": { @@ -188,7 +108,7 @@ "var(--o-green-2)" ], "body": "var(--o-green-2)", - "description": "[light: 203, 240, 199, dark: 11, 90, 13]", + "description": "[light: 177, 239, 195, dark: 2, 102, 53]", "scope": "css,scss,less" }, "--o-green-3": { @@ -196,7 +116,7 @@ "var(--o-green-3)" ], "body": "var(--o-green-3)", - "description": "[light: 154, 225, 148, dark: 16, 119, 16]", + "description": "[light: 128, 224, 158, dark: 10, 127, 66]", "scope": "css,scss,less" }, "--o-green-4": { @@ -204,7 +124,7 @@ "var(--o-green-4)" ], "body": "var(--o-green-4)", - "description": "[light: 109, 209, 103, dark: 22, 149, 21]", + "description": "[light: 84, 208, 127, dark: 22, 152, 80]", "scope": "css,scss,less" }, "--o-green-5": { @@ -212,7 +132,7 @@ "var(--o-green-5)" ], "body": "var(--o-green-5)", - "description": "[light: 68, 194, 62, dark: 31, 179, 27]", + "description": "[light: 45, 193, 101, dark: 36, 177, 95]", "scope": "css,scss,less" }, "--o-green-6": { @@ -220,7 +140,7 @@ "var(--o-green-6)" ], "body": "var(--o-green-6)", - "description": "[light: 31, 179, 27, dark: 68, 194, 62]", + "description": "[light: 11, 177, 81, dark: 51, 193, 104]", "scope": "css,scss,less" }, "--o-green-7": { @@ -228,7 +148,7 @@ "var(--o-green-7)" ], "body": "var(--o-green-7)", - "description": "[light: 22, 149, 21, dark: 109, 209, 103]", + "description": "[light: 7, 152, 72, dark: 90, 208, 131]", "scope": "css,scss,less" }, "--o-green-8": { @@ -236,7 +156,7 @@ "var(--o-green-8)" ], "body": "var(--o-green-8)", - "description": "[light: 16, 119, 16, dark: 154, 225, 148]", + "description": "[light: 4, 127, 63, dark: 135, 224, 163]", "scope": "css,scss,less" }, "--o-green-9": { @@ -244,7 +164,7 @@ "var(--o-green-9)" ], "body": "var(--o-green-9)", - "description": "[light: 11, 90, 13, dark: 203, 240, 199]", + "description": "[light: 2, 102, 53, dark: 185, 239, 200]", "scope": "css,scss,less" }, "--o-green-10": { @@ -252,7 +172,7 @@ "var(--o-green-10)" ], "body": "var(--o-green-10)", - "description": "[light: 7, 60, 9, dark: 233, 247, 231]", + "description": "[light: 0, 77, 42, dark: 240, 255, 244]", "scope": "css,scss,less" }, "--o-orange-1": { @@ -260,7 +180,7 @@ "var(--o-orange-1)" ], "body": "var(--o-orange-1)", - "description": "[light: 254, 246, 233, dark: 99, 25, 0]", + "description": "[light: 255, 246, 232, dark: 77, 24, 0]", "scope": "css,scss,less" }, "--o-orange-2": { @@ -268,7 +188,7 @@ "var(--o-orange-2)" ], "body": "var(--o-orange-2)", - "description": "[light: 252, 232, 202, dark: 135, 41, 0]", + "description": "[light: 254, 226, 186, dark: 120, 42, 1]", "scope": "css,scss,less" }, "--o-orange-3": { @@ -276,7 +196,7 @@ "var(--o-orange-3)" ], "body": "var(--o-orange-3)", - "description": "[light: 250, 205, 150, dark: 171, 60, 0]", + "description": "[light: 253, 202, 140, dark: 163, 68, 8]", "scope": "css,scss,less" }, "--o-orange-4": { @@ -284,7 +204,7 @@ "var(--o-orange-4)" ], "body": "var(--o-orange-4)", - "description": "[light: 247, 176, 99, dark: 206, 83, 0]", + "description": "[light: 252, 176, 95, dark: 207, 97, 19]", "scope": "css,scss,less" }, "--o-orange-5": { @@ -292,7 +212,7 @@ "var(--o-orange-5)" ], "body": "var(--o-orange-5)", - "description": "[light: 245, 144, 49, dark: 242, 110, 0]", + "description": "[light: 251, 147, 50, dark: 250, 130, 33]", "scope": "css,scss,less" }, "--o-orange-6": { @@ -300,7 +220,7 @@ "var(--o-orange-6)" ], "body": "var(--o-orange-6)", - "description": "[light: 242, 110, 0, dark: 245, 144, 49]", + "description": "[light: 250, 115, 5, dark: 251, 143, 32]", "scope": "css,scss,less" }, "--o-orange-7": { @@ -308,7 +228,7 @@ "var(--o-orange-7)" ], "body": "var(--o-orange-7)", - "description": "[light: 206, 83, 0, dark: 247, 176, 99]", + "description": "[light: 207, 88, 3, dark: 252, 174, 91]", "scope": "css,scss,less" }, "--o-orange-8": { @@ -316,7 +236,7 @@ "var(--o-orange-8)" ], "body": "var(--o-orange-8)", - "description": "[light: 171, 60, 0, dark: 250, 205, 150]", + "description": "[light: 163, 64, 2, dark: 253, 202, 139]", "scope": "css,scss,less" }, "--o-orange-9": { @@ -324,7 +244,7 @@ "var(--o-orange-9)" ], "body": "var(--o-orange-9)", - "description": "[light: 135, 41, 0, dark: 252, 232, 202]", + "description": "[light: 120, 42, 1, dark: 254, 227, 188]", "scope": "css,scss,less" }, "--o-orange-10": { @@ -332,7 +252,7 @@ "var(--o-orange-10)" ], "body": "var(--o-orange-10)", - "description": "[light: 99, 25, 0, dark: 254, 246, 233]", + "description": "[light: 77, 24, 0, dark: 255, 248, 237]", "scope": "css,scss,less" }, "--o-red-1": { @@ -340,7 +260,7 @@ "var(--o-red-1)" ], "body": "var(--o-red-1)", - "description": "[light: 253, 237, 233, dark: 96, 0, 10]", + "description": "[light: 255, 234, 232, dark: 77, 0, 17]", "scope": "css,scss,less" }, "--o-red-2": { @@ -348,7 +268,7 @@ "var(--o-red-2)" ], "body": "var(--o-red-2)", - "description": "[light: 252, 209, 201, dark: 132, 0, 10]", + "description": "[light: 250, 185, 182, dark: 115, 3, 24]", "scope": "css,scss,less" }, "--o-red-3": { @@ -356,7 +276,7 @@ "var(--o-red-3)" ], "body": "var(--o-red-3)", - "description": "[light: 249, 162, 149, dark: 168, 0, 7]", + "description": "[light: 245, 136, 134, dark: 153, 9, 31]", "scope": "css,scss,less" }, "--o-red-4": { @@ -364,7 +284,7 @@ "var(--o-red-4)" ], "body": "var(--o-red-4)", - "description": "[light: 245, 112, 98, dark: 203, 0, 2]", + "description": "[light: 240, 87, 90, dark: 192, 17, 37]", "scope": "css,scss,less" }, "--o-red-5": { @@ -372,7 +292,7 @@ "var(--o-red-5)" ], "body": "var(--o-red-5)", - "description": "[light: 242, 60, 48, dark: 239, 6, 0]", + "description": "[light: 235, 43, 52, dark: 230, 28, 43]", "scope": "css,scss,less" }, "--o-red-6": { @@ -380,7 +300,7 @@ "var(--o-red-6)" ], "body": "var(--o-red-6)", - "description": "[light: 239, 6, 0, dark: 242, 60, 48]", + "description": "[light: 230, 0, 18, dark: 235, 35, 45]", "scope": "css,scss,less" }, "--o-red-7": { @@ -388,7 +308,7 @@ "var(--o-red-7)" ], "body": "var(--o-red-7)", - "description": "[light: 203, 0, 2, dark: 245, 112, 98]", + "description": "[light: 192, 0, 22, dark: 240, 82, 85]", "scope": "css,scss,less" }, "--o-red-8": { @@ -396,7 +316,7 @@ "var(--o-red-8)" ], "body": "var(--o-red-8)", - "description": "[light: 168, 0, 7, dark: 249, 162, 149]", + "description": "[light: 153, 0, 23, dark: 245, 132, 130]", "scope": "css,scss,less" }, "--o-red-9": { @@ -404,7 +324,7 @@ "var(--o-red-9)" ], "body": "var(--o-red-9)", - "description": "[light: 132, 0, 10, dark: 252, 209, 201]", + "description": "[light: 115, 0, 21, dark: 250, 183, 180]", "scope": "css,scss,less" }, "--o-red-10": { @@ -412,7 +332,15 @@ "var(--o-red-10)" ], "body": "var(--o-red-10)", - "description": "[light: 96, 0, 10, dark: 253, 237, 233]", + "description": "[light: 77, 0, 17, dark: 255, 234, 232]", + "scope": "css,scss,less" + }, + "--o-red-huawei": { + "prefix": [ + "var(--o-red-huawei)" + ], + "body": "var(--o-red-huawei)", + "description": "[light: 199, 0, 11, dark: 199, 0, 11]", "scope": "css,scss,less" }, "--o-gray-1": { @@ -428,7 +356,7 @@ "var(--o-gray-2)" ], "body": "var(--o-gray-2)", - "description": "[light: 238, 238, 238, dark: 36, 36, 36]", + "description": "[light: 247, 247, 247, dark: 20, 20, 20]", "scope": "css,scss,less" }, "--o-gray-3": { @@ -436,7 +364,7 @@ "var(--o-gray-3)" ], "body": "var(--o-gray-3)", - "description": "[light: 221, 221, 221, dark: 57, 57, 57]", + "description": "[light: 242, 242, 242, dark: 28, 28, 28]", "scope": "css,scss,less" }, "--o-gray-4": { @@ -444,7 +372,7 @@ "var(--o-gray-4)" ], "body": "var(--o-gray-4)", - "description": "[light: 198, 198, 198, dark: 94, 94, 94]", + "description": "[light: 237, 237, 237, dark: 39, 39, 39]", "scope": "css,scss,less" }, "--o-gray-5": { @@ -452,7 +380,7 @@ "var(--o-gray-5)" ], "body": "var(--o-gray-5)", - "description": "[light: 139, 139, 139, dark: 119, 119, 122]", + "description": "[light: 227, 227, 227, dark: 47, 47, 47]", "scope": "css,scss,less" }, "--o-gray-6": { @@ -460,7 +388,7 @@ "var(--o-gray-6)" ], "body": "var(--o-gray-6)", - "description": "[light: 119, 119, 119, dark: 166, 166, 166]", + "description": "[light: 214, 214, 214, dark: 57, 57, 57]", "scope": "css,scss,less" }, "--o-gray-7": { @@ -468,7 +396,7 @@ "var(--o-gray-7)" ], "body": "var(--o-gray-7)", - "description": "[light: 94, 94, 94, dark: 221, 221, 221]", + "description": "[light: 186, 186, 186, dark: 67, 67, 67]", "scope": "css,scss,less" }, "--o-gray-8": { @@ -476,7 +404,7 @@ "var(--o-gray-8)" ], "body": "var(--o-gray-8)", - "description": "[light: 75, 75, 75, dark: 238, 238, 238]", + "description": "[light: 148, 148, 148, dark: 88, 88, 88]", "scope": "css,scss,less" }, "--o-gray-9": { @@ -484,7 +412,7 @@ "var(--o-gray-9)" ], "body": "var(--o-gray-9)", - "description": "[light: 44, 44, 44, dark: 243, 243, 243]", + "description": "[light: 110, 110, 110, dark: 122, 122, 122]", "scope": "css,scss,less" }, "--o-gray-10": { @@ -492,6 +420,38 @@ "var(--o-gray-10)" ], "body": "var(--o-gray-10)", + "description": "[light: 79, 79, 79, dark: 159, 159, 159]", + "scope": "css,scss,less" + }, + "--o-gray-11": { + "prefix": [ + "var(--o-gray-11)" + ], + "body": "var(--o-gray-11)", + "description": "[light: 48, 48, 48, dark: 185, 185, 185]", + "scope": "css,scss,less" + }, + "--o-gray-12": { + "prefix": [ + "var(--o-gray-12)" + ], + "body": "var(--o-gray-12)", + "description": "[light: 36, 36, 36, dark: 210, 210, 210]", + "scope": "css,scss,less" + }, + "--o-gray-13": { + "prefix": [ + "var(--o-gray-13)" + ], + "body": "var(--o-gray-13)", + "description": "[light: 18, 18, 18, dark: 238, 238, 238]", + "scope": "css,scss,less" + }, + "--o-gray-14": { + "prefix": [ + "var(--o-gray-14)" + ], + "body": "var(--o-gray-14)", "description": "[light: 0, 0, 0, dark: 255, 255, 255]", "scope": "css,scss,less" }, @@ -500,7 +460,7 @@ "var(--o-mixedgray-1)" ], "body": "var(--o-mixedgray-1)", - "description": "[light: 249, 249, 249, dark: 28, 30, 35]", + "description": "[light: 255, 255, 255, dark: 0, 0, 0]", "scope": "css,scss,less" }, "--o-mixedgray-2": { @@ -508,7 +468,7 @@ "var(--o-mixedgray-2)" ], "body": "var(--o-mixedgray-2)", - "description": "[light: 230, 231, 234, dark: 46, 48, 56]", + "description": "[light: 244, 245, 247, dark: 16, 28, 20]", "scope": "css,scss,less" }, "--o-mixedgray-3": { @@ -516,7 +476,7 @@ "var(--o-mixedgray-3)" ], "body": "var(--o-mixedgray-3)", - "description": "[light: 198, 200, 205, dark: 65, 68, 76]", + "description": "[light: 237, 239, 242, dark: 23, 25, 28]", "scope": "css,scss,less" }, "--o-mixedgray-4": { @@ -524,7 +484,7 @@ "var(--o-mixedgray-4)" ], "body": "var(--o-mixedgray-4)", - "description": "[light: 167, 170, 176, dark: 85, 89, 97]", + "description": "[light: 232, 234, 237, dark: 33, 35, 39]", "scope": "css,scss,less" }, "--o-mixedgray-5": { @@ -532,7 +492,7 @@ "var(--o-mixedgray-5)" ], "body": "var(--o-mixedgray-5)", - "description": "[light: 136, 139, 146, dark: 107, 110, 117]", + "description": "[light: 224, 226, 230, dark: 40, 42, 47]", "scope": "css,scss,less" }, "--o-mixedgray-6": { @@ -540,7 +500,7 @@ "var(--o-mixedgray-6)" ], "body": "var(--o-mixedgray-6)", - "description": "[light: 107, 110, 117, dark: 136, 139, 146]", + "description": "[light: 209, 214, 219, dark: 50, 53, 57]", "scope": "css,scss,less" }, "--o-mixedgray-7": { @@ -548,7 +508,7 @@ "var(--o-mixedgray-7)" ], "body": "var(--o-mixedgray-7)", - "description": "[light: 85, 89, 97, dark: 167, 170, 176]", + "description": "[light: 179, 185, 191, dark: 61, 63, 67]", "scope": "css,scss,less" }, "--o-mixedgray-8": { @@ -556,7 +516,7 @@ "var(--o-mixedgray-8)" ], "body": "var(--o-mixedgray-8)", - "description": "[light: 65, 68, 76, dark: 198, 200, 205]", + "description": "[light: 144, 150, 158, dark: 80, 84, 88]", "scope": "css,scss,less" }, "--o-mixedgray-9": { @@ -564,7 +524,7 @@ "var(--o-mixedgray-9)" ], "body": "var(--o-mixedgray-9)", - "description": "[light: 46, 48, 56, dark: 230, 231, 234]", + "description": "[light: 104, 109, 117, dark: 113, 117, 122]", "scope": "css,scss,less" }, "--o-mixedgray-10": { @@ -572,284 +532,692 @@ "var(--o-mixedgray-10)" ], "body": "var(--o-mixedgray-10)", - "description": "[light: 28, 30, 35, dark: 249, 249, 249]", + "description": "[light: 79, 84, 92, dark: 147, 152, 159]", "scope": "css,scss,less" }, - "--o-color-info1": { + "--o-mixedgray-11": { "prefix": [ - "var(--o-color-info1)" + "var(--o-mixedgray-11)" ], - "body": "var(--o-color-info1)", - "description": "一级/强调/标题[light: rgb(var(--o-gray-10)), dark: rgb(var(--o-gray-10))]", + "body": "var(--o-mixedgray-11)", + "description": "[light: 55, 59, 66, dark: 172, 177, 185]", "scope": "css,scss,less" }, - "--o-color-info2": { + "--o-mixedgray-12": { "prefix": [ - "var(--o-color-info2)" + "var(--o-mixedgray-12)" ], - "body": "var(--o-color-info2)", - "description": "二级/次强调/正文[light: rgb(var(--o-gray-8)), dark: rgb(var(--o-gray-8))]", + "body": "var(--o-mixedgray-12)", + "description": "[light: 32, 35, 41, dark: 198, 202, 210]", "scope": "css,scss,less" }, - "--o-color-info3": { + "--o-mixedgray-13": { "prefix": [ - "var(--o-color-info3)" + "var(--o-mixedgray-13)" ], - "body": "var(--o-color-info3)", - "description": "三级/辅助信息[light: rgb(var(--o-gray-6)), dark: rgb(var(--o-gray-6))]", + "body": "var(--o-mixedgray-13)", + "description": "[light: 18, 20, 23, dark: 231, 234, 238]", "scope": "css,scss,less" }, - "--o-color-info4": { + "--o-mixedgray-14": { "prefix": [ - "var(--o-color-info4)" + "var(--o-mixedgray-14)" ], - "body": "var(--o-color-info4)", - "description": "置灰/禁用[light: rgb(var(--o-gray-4)), dark: rgb(var(--o-gray-4))]", + "body": "var(--o-mixedgray-14)", + "description": "[light: 0, 0, 0, dark: 255, 255, 255]", "scope": "css,scss,less" }, - "--o-color-info1-inverse": { + "--o-yellow-1": { "prefix": [ - "var(--o-color-info1-inverse)" + "var(--o-yellow-1)" ], - "body": "var(--o-color-info1-inverse)", - "description": "一级/次强调/正文反色[light: rgb(var(--o-gray-1)), dark: rgb(var(--o-gray-1))]", + "body": "var(--o-yellow-1)", + "description": "[light: 255, 255, 232, dark: 77, 54, 0]", "scope": "css,scss,less" }, - "--o-color-info2-inverse": { + "--o-yellow-2": { "prefix": [ - "var(--o-color-info2-inverse)" + "var(--o-yellow-2)" ], - "body": "var(--o-color-info2-inverse)", - "description": "二级/辅助信息反色[light: rgb(var(--o-gray-3)), dark: rgb(var(--o-gray-3))]", + "body": "var(--o-yellow-2)", + "description": "[light: 253, 251, 185, dark: 119, 87, 2]", "scope": "css,scss,less" }, - "--o-color-info3-inverse": { + "--o-yellow-3": { "prefix": [ - "var(--o-color-info3-inverse)" + "var(--o-yellow-3)" ], - "body": "var(--o-color-info3-inverse)", - "description": "三级/辅助信息反色[light: rgb(var(--o-gray-5)), dark: rgb(var(--o-gray-5))]", + "body": "var(--o-yellow-3)", + "description": "[light: 251, 244, 139, dark: 161, 126, 11]", "scope": "css,scss,less" }, - "--o-color-info4-inverse": { + "--o-yellow-4": { "prefix": [ - "var(--o-color-info4-inverse)" + "var(--o-yellow-4)" ], - "body": "var(--o-color-info4-inverse)", - "description": "置灰/禁用反色[light: rgb(var(--o-gray-7)), dark: rgb(var(--o-gray-7))]", + "body": "var(--o-yellow-4)", + "description": "[light: 249, 233, 94, dark: 203, 167, 24]", "scope": "css,scss,less" }, - "--o-color-mask1": { + "--o-yellow-5": { "prefix": [ - "var(--o-color-mask1)" + "var(--o-yellow-5)" ], - "body": "var(--o-color-mask1)", - "description": "全局遮罩[light: rgba(var(--o-gray-10), .2), dark: rgba(var(--o-gray-10), .2)]", + "body": "var(--o-yellow-5)", + "description": "[light: 247, 221, 49, dark: 245, 211, 42]", "scope": "css,scss,less" }, - "--o-color-mask2": { + "--o-yellow-6": { "prefix": [ - "var(--o-color-mask2)" + "var(--o-yellow-6)" ], - "body": "var(--o-color-mask2)", - "description": "局部遮罩[light: rgba(var(--o-gray-10), .1), dark: rgba(var(--o-gray-10), .1)]", + "body": "var(--o-yellow-6)", + "description": "[light: 245, 205, 5, dark: 247, 222, 54]", "scope": "css,scss,less" }, - "--o-color-fill1": { + "--o-yellow-7": { "prefix": [ - "var(--o-color-fill1)" + "var(--o-yellow-7)" ], - "body": "var(--o-color-fill1)", - "description": "一级填充/页面背景[light: rgb(var(--o-mixedgray-1)), dark: rgb(var(--o-mixedgray-1))]", + "body": "var(--o-yellow-7)", + "description": "[light: 203, 163, 3, dark: 249, 234, 100]", "scope": "css,scss,less" }, - "--o-color-fill2": { + "--o-yellow-8": { "prefix": [ - "var(--o-color-fill2)" + "var(--o-yellow-8)" ], - "body": "var(--o-color-fill2)", - "description": "二级填充/区块、卡片[light: rgb(var(--o-gray-1)), dark: rgb(var(--o-gray-1))]", + "body": "var(--o-yellow-8)", + "description": "[light: 161, 124, 2, dark: 251, 244, 146]", "scope": "css,scss,less" }, - "--o-color-fill3": { + "--o-yellow-9": { "prefix": [ - "var(--o-color-fill3)" + "var(--o-yellow-9)" ], - "body": "var(--o-color-fill3)", - "description": "三级填充/卡片[light: rgb(var(--o-mixedgray-3)), dark: rgb(var(--o-mixedgray-3))]", + "body": "var(--o-yellow-9)", + "description": "[light: 119, 87, 1, dark: 253, 251, 192]", "scope": "css,scss,less" }, - "--o-color-fill4": { + "--o-yellow-10": { "prefix": [ - "var(--o-color-fill4)" + "var(--o-yellow-10)" ], - "body": "var(--o-color-fill4)", - "description": "四级填充/禁用[light: rgb(var(--o-mixedgray-4)), dark: rgb(var(--o-mixedgray-4))]", + "body": "var(--o-yellow-10)", + "description": "[light: 77, 54, 0, dark: 255, 255, 240]", "scope": "css,scss,less" }, - "--o-color-control-light": { + "--o-lime-1": { "prefix": [ - "var(--o-color-control-light)" + "var(--o-lime-1)" ], - "body": "var(--o-color-control-light)", - "description": "很浅背景[light: rgb(var(--o-gray-1)), dark: rgb(var(--o-gray-1))]", + "body": "var(--o-lime-1)", + "description": "[light: 251, 255, 232, dark: 41, 77, 0]", "scope": "css,scss,less" }, - "--o-color-control1": { + "--o-lime-2": { "prefix": [ - "var(--o-color-control1)" + "var(--o-lime-2)" ], - "body": "var(--o-color-control1)", - "description": "常规,常用于边框[light: rgb(var(--o-mixedgray-3)), dark: rgb(var(--o-mixedgray-3))]", + "body": "var(--o-lime-2)", + "description": "[light: 233, 245, 184, dark: 63, 109, 3]", "scope": "css,scss,less" }, - "--o-color-control2": { + "--o-lime-3": { "prefix": [ - "var(--o-color-control2)" + "var(--o-lime-3)" ], - "body": "var(--o-color-control2)", - "description": "悬浮[light: rgb(var(--o-mixedgray-4)), dark: rgb(var(--o-mixedgray-4))]", + "body": "var(--o-lime-3)", + "description": "[light: 213, 236, 139, dark: 91, 142, 14]", "scope": "css,scss,less" }, - "--o-color-control3": { + "--o-lime-4": { "prefix": [ - "var(--o-color-control3)" + "var(--o-lime-4)" ], - "body": "var(--o-color-control3)", - "description": "激活[light: rgb(var(--o-mixedgray-6)), dark: rgb(var(--o-mixedgray-6))]", + "body": "var(--o-lime-4)", + "description": "[light: 192, 226, 97, dark: 121, 174, 30]", "scope": "css,scss,less" }, - "--o-color-control4": { + "--o-lime-5": { "prefix": [ - "var(--o-color-control4)" + "var(--o-lime-5)" ], - "body": "var(--o-color-control4)", - "description": "禁用[light: rgb(var(--o-mixedgray-5)), dark: rgb(var(--o-mixedgray-5))]", + "body": "var(--o-lime-5)", + "description": "[light: 169, 217, 59, dark: 155, 207, 50]", "scope": "css,scss,less" }, - "--o-color-control1-light": { + "--o-lime-6": { "prefix": [ - "var(--o-color-control1-light)" + "var(--o-lime-6)" ], - "body": "var(--o-color-control1-light)", - "description": "常规-浅,常用于背景[light: rgb(var(--o-mixedgray-3)), dark: rgb(var(--o-mixedgray-3))]", + "body": "var(--o-lime-6)", + "description": "[light: 146, 207, 23, dark: 172, 217, 68]", "scope": "css,scss,less" }, - "--o-color-control2-light": { + "--o-lime-7": { "prefix": [ - "var(--o-color-control2-light)" + "var(--o-lime-7)" ], - "body": "var(--o-color-control2-light)", - "description": "悬浮-浅[light: rgb(var(--o-mixedgray-4)), dark: rgb(var(--o-mixedgray-4))]", + "body": "var(--o-lime-7)", + "description": "[light: 116, 174, 15, dark: 194, 226, 104]", "scope": "css,scss,less" }, - "--o-color-control3-light": { + "--o-lime-8": { "prefix": [ - "var(--o-color-control3-light)" + "var(--o-lime-8)" ], - "body": "var(--o-color-control3-light)", - "description": "激活-浅[light: rgb(var(--o-mixedgray-5)), dark: rgb(var(--o-mixedgray-5))]", + "body": "var(--o-lime-8)", + "description": "[light: 88, 142, 8, dark: 214, 236, 144]", "scope": "css,scss,less" }, - "--o-color-control4-light": { + "--o-lime-9": { "prefix": [ - "var(--o-color-control4-light)" + "var(--o-lime-9)" ], - "body": "var(--o-color-control4-light)", - "description": "禁用-浅[light: rgb(var(--o-mixedgray-2)), dark: rgb(var(--o-mixedgray-2))]", + "body": "var(--o-lime-9)", + "description": "[light: 63, 109, 3, dark: 233, 245, 186]", "scope": "css,scss,less" }, - "--o-color-primary1": { + "--o-lime-10": { "prefix": [ - "var(--o-color-primary1)" + "var(--o-lime-10)" ], - "body": "var(--o-color-primary1)", - "description": "常规[light: rgb(var(--o-blue-6)), dark: rgb(var(--o-blue-6))]", + "body": "var(--o-lime-10)", + "description": "[light: 41, 77, 0, dark: 251, 255, 232]", "scope": "css,scss,less" }, - "--o-color-primary2": { + "--o-cyan-1": { "prefix": [ - "var(--o-color-primary2)" + "var(--o-cyan-1)" ], - "body": "var(--o-color-primary2)", - "description": "悬浮[light: rgb(var(--o-blue-5)), dark: rgb(var(--o-blue-5))]", + "body": "var(--o-cyan-1)", + "description": "[light: 232, 255, 249, dark: 0, 73, 77]", "scope": "css,scss,less" }, - "--o-color-primary3": { + "--o-cyan-2": { "prefix": [ - "var(--o-color-primary3)" + "var(--o-cyan-2)" ], - "body": "var(--o-color-primary3)", - "description": "激活[light: rgb(var(--o-blue-7)), dark: rgb(var(--o-blue-7))]", + "body": "var(--o-cyan-2)", + "description": "[light: 176, 240, 226, dark: 2, 101, 103]", "scope": "css,scss,less" }, - "--o-color-primary4": { + "--o-cyan-3": { "prefix": [ - "var(--o-color-primary4)" + "var(--o-cyan-3)" ], - "body": "var(--o-color-primary4)", - "description": "禁用[light: rgb(var(--o-blue-3)), dark: rgb(var(--o-blue-3))]", + "body": "var(--o-cyan-3)", + "description": "[light: 125, 225, 207, dark: 9, 129, 127]", "scope": "css,scss,less" }, - "--o-color-primary1-light": { + "--o-cyan-4": { "prefix": [ - "var(--o-color-primary1-light)" + "var(--o-cyan-4)" ], - "body": "var(--o-color-primary1-light)", - "description": "浅/常规[light: rgb(var(--o-blue-2)), dark: rgb(var(--o-blue-2))]", + "body": "var(--o-cyan-4)", + "description": "[light: 79, 221, 191, dark: 18, 155, 148]", "scope": "css,scss,less" }, - "--o-color-primary2-light": { + "--o-cyan-5": { "prefix": [ - "var(--o-color-primary2-light)" + "var(--o-cyan-5)" ], - "body": "var(--o-color-primary2-light)", - "description": "浅/悬浮[light: rgb(var(--o-blue-3)), dark: rgb(var(--o-blue-3))]", + "body": "var(--o-cyan-5)", + "description": "[light: 38, 196, 177, dark: 30, 181, 167]", "scope": "css,scss,less" }, - "--o-color-primary3-light": { + "--o-cyan-6": { "prefix": [ - "var(--o-color-primary3-light)" + "var(--o-cyan-6)" ], - "body": "var(--o-color-primary3-light)", - "description": "浅/激活[light: rgb(var(--o-blue-4)), dark: rgb(var(--o-blue-4))]", + "body": "var(--o-cyan-6)", + "description": "[light: 3, 181, 165, dark: 42, 196, 178]", "scope": "css,scss,less" }, - "--o-color-primary4-light": { + "--o-cyan-7": { "prefix": [ - "var(--o-color-primary4-light)" + "var(--o-cyan-7)" ], - "body": "var(--o-color-primary4-light)", - "description": "浅/禁用[light: rgb(var(--o-blue-1)), dark: rgb(var(--o-blue-1))]", + "body": "var(--o-cyan-7)", + "description": "[light: 2, 155, 147, dark: 84, 211, 192]", "scope": "css,scss,less" }, - "--o-color-success1": { + "--o-cyan-8": { "prefix": [ - "var(--o-color-success1)" + "var(--o-cyan-8)" ], - "body": "var(--o-color-success1)", - "description": "常规[light: rgb(var(--o-green-6)), dark: rgb(var(--o-green-6))]", + "body": "var(--o-cyan-8)", + "description": "[light: 1, 129, 127, dark: 130, 255, 208]", "scope": "css,scss,less" }, - "--o-color-success2": { + "--o-cyan-9": { "prefix": [ - "var(--o-color-success2)" + "var(--o-cyan-9)" ], - "body": "var(--o-color-success2)", - "description": "悬浮[light: rgb(var(--o-green-5)), dark: rgb(var(--o-green-5))]", + "body": "var(--o-cyan-9)", + "description": "[light: 0, 101, 103, dark: 182, 240, 227]", "scope": "css,scss,less" }, - "--o-color-success3": { + "--o-cyan-10": { "prefix": [ - "var(--o-color-success3)" + "var(--o-cyan-10)" ], - "body": "var(--o-color-success3)", - "description": "激活[light: rgb(var(--o-green-7)), dark: rgb(var(--o-green-7))]", + "body": "var(--o-cyan-10)", + "description": "[light: 0, 73, 77, dark: 239, 255, 251]", "scope": "css,scss,less" }, - "--o-color-success4": { + "--o-blue-1": { "prefix": [ - "var(--o-color-success4)" + "var(--o-blue-1)" + ], + "body": "var(--o-blue-1)", + "description": "[light: 232, 249, 255, dark: 0, 34, 77]", + "scope": "css,scss,less" + }, + "--o-blue-2": { + "prefix": [ + "var(--o-blue-2)" + ], + "body": "var(--o-blue-2)", + "description": "[light: 185, 233, 252, dark: 1, 57, 117]", + "scope": "css,scss,less" + }, + "--o-blue-3": { + "prefix": [ + "var(--o-blue-3)" + ], + "body": "var(--o-blue-3)", + "description": "[light: 138, 214, 249, dark: 8, 86, 158]", + "scope": "css,scss,less" + }, + "--o-blue-4": { + "prefix": [ + "var(--o-blue-4)" + ], + "body": "var(--o-blue-4)", + "description": "[light: 93, 192, 246, dark: 18, 118, 199]", + "scope": "css,scss,less" + }, + "--o-blue-5": { + "prefix": [ + "var(--o-blue-5)" + ], + "body": "var(--o-blue-5)", + "description": "[light: 48, 168, 243, dark: 31, 153, 240]", + "scope": "css,scss,less" + }, + "--o-blue-6": { + "prefix": [ + "var(--o-blue-6)" + ], + "body": "var(--o-blue-6)", + "description": "[light: 5, 142, 240, dark: 42, 166, 243]", + "scope": "css,scss,less" + }, + "--o-blue-7": { + "prefix": [ + "var(--o-blue-7)" + ], + "body": "var(--o-blue-7)", + "description": "[light: 3, 111, 199, dark: 89, 191, 246]", + "scope": "css,scss,less" + }, + "--o-blue-8": { + "prefix": [ + "var(--o-blue-8)" + ], + "body": "var(--o-blue-8)", + "description": "[light: 2, 83, 158, dark: 137, 214, 249]", + "scope": "css,scss,less" + }, + "--o-blue-9": { + "prefix": [ + "var(--o-blue-9)" + ], + "body": "var(--o-blue-9)", + "description": "[light: 1, 57, 117, dark: 187, 233, 252]", + "scope": "css,scss,less" + }, + "--o-blue-10": { + "prefix": [ + "var(--o-blue-10)" + ], + "body": "var(--o-blue-10)", + "description": "[light: 0, 34, 77, dark: 237, 250, 255]", + "scope": "css,scss,less" + }, + "--o-purple-1": { + "prefix": [ + "var(--o-purple-1)" + ], + "body": "var(--o-purple-1)", + "description": "[light: 245, 232, 255, dark: 22, 0, 77]", + "scope": "css,scss,less" + }, + "--o-purple-2": { + "prefix": [ + "var(--o-purple-2)" + ], + "body": "var(--o-purple-2)", + "description": "[light: 225, 192, 253, dark: 40, 3, 118]", + "scope": "css,scss,less" + }, + "--o-purple-3": { + "prefix": [ + "var(--o-purple-3)" + ], + "body": "var(--o-purple-3)", + "description": "[light: 203, 152, 251, dark: 66, 15, 160]", + "scope": "css,scss,less" + }, + "--o-purple-4": { + "prefix": [ + "var(--o-purple-4)" + ], + "body": "var(--o-purple-4)", + "description": "[light: 178, 113, 248, dark: 98, 33, 202]", + "scope": "css,scss,less" + }, + "--o-purple-5": { + "prefix": [ + "var(--o-purple-5)" + ], + "body": "var(--o-purple-5)", + "description": "[light: 152, 75, 246, dark: 134, 57, 244]", + "scope": "css,scss,less" + }, + "--o-purple-6": { + "prefix": [ + "var(--o-purple-6)" + ], + "body": "var(--o-purple-6)", + "description": "[light: 123, 37, 244, dark: 152, 74, 246]", + "scope": "css,scss,less" + }, + "--o-purple-7": { + "prefix": [ + "var(--o-purple-7)" + ], + "body": "var(--o-purple-7)", + "description": "[light: 92, 23, 202, dark: 179, 114, 248]", + "scope": "css,scss,less" + }, + "--o-purple-8": { + "prefix": [ + "var(--o-purple-8)" + ], + "body": "var(--o-purple-8)", + "description": "[light: 64, 12, 160, dark: 205, 156, 251]", + "scope": "css,scss,less" + }, + "--o-purple-9": { + "prefix": [ + "var(--o-purple-9)" + ], + "body": "var(--o-purple-9)", + "description": "[light: 41, 4, 118, dark: 228, 198, 253]", + "scope": "css,scss,less" + }, + "--o-purple-10": { + "prefix": [ + "var(--o-purple-10)" + ], + "body": "var(--o-purple-10)", + "description": "[light: 22, 0, 77, dark: 249, 240, 255]", + "scope": "css,scss,less" + }, + "--o-pink-1": { + "prefix": [ + "var(--o-pink-1)" + ], + "body": "var(--o-pink-1)", + "description": "[light: 255, 232, 253, dark: 61, 0, 77]", + "scope": "css,scss,less" + }, + "--o-pink-2": { + "prefix": [ + "var(--o-pink-2)" + ], + "body": "var(--o-pink-2)", + "description": "[light: 246, 188, 243, dark: 93, 5, 110]", + "scope": "css,scss,less" + }, + "--o-pink-3": { + "prefix": [ + "var(--o-pink-3)" + ], + "body": "var(--o-pink-3)", + "description": "[light: 238, 146, 235, dark: 127, 16, 144]", + "scope": "css,scss,less" + }, + "--o-pink-4": { + "prefix": [ + "var(--o-pink-4)" + ], + "body": "var(--o-pink-4)", + "description": "[light: 229, 107, 229, dark: 164, 33, 178]", + "scope": "css,scss,less" + }, + "--o-pink-5": { + "prefix": [ + "var(--o-pink-5)" + ], + "body": "var(--o-pink-5)", + "description": "[light: 216, 71, 221, dark: 200, 54, 212]", + "scope": "css,scss,less" + }, + "--o-pink-6": { + "prefix": [ + "var(--o-pink-6)" + ], + "body": "var(--o-pink-6)", + "description": "[light: 199, 37, 212, dark: 216, 72, 221]", + "scope": "css,scss,less" + }, + "--o-pink-7": { + "prefix": [ + "var(--o-pink-7)" + ], + "body": "var(--o-pink-7)", + "description": "[light: 163, 23, 178, dark: 229, 109, 229]", + "scope": "css,scss,less" + }, + "--o-pink-8": { + "prefix": [ + "var(--o-pink-8)" + ], + "body": "var(--o-pink-8)", + "description": "[light: 127, 13, 144, dark: 238, 149, 235]", + "scope": "css,scss,less" + }, + "--o-pink-9": { + "prefix": [ + "var(--o-pink-9)" + ], + "body": "var(--o-pink-9)", + "description": "[light: 93, 5, 110, dark: 246, 191, 243]", + "scope": "css,scss,less" + }, + "--o-pink-10": { + "prefix": [ + "var(--o-pink-10)" + ], + "body": "var(--o-pink-10)", + "description": "[light: 61, 0, 77, dark: 255, 236, 253]", + "scope": "css,scss,less" + }, + "--o-rosyred-1": { + "prefix": [ + "var(--o-rosyred-1)" + ], + "body": "var(--o-rosyred-1)", + "description": "[light: 255, 232, 240, dark: 77, 0, 48]", + "scope": "css,scss,less" + }, + "--o-rosyred-2": { + "prefix": [ + "var(--o-rosyred-2)" + ], + "body": "var(--o-rosyred-2)", + "description": "[light: 249, 185, 209, dark: 114, 3, 70]", + "scope": "css,scss,less" + }, + "--o-rosyred-3": { + "prefix": [ + "var(--o-rosyred-3)" + ], + "body": "var(--o-rosyred-3)", + "description": "[light: 243, 141, 182, dark: 151, 12, 91]", + "scope": "css,scss,less" + }, + "--o-rosyred-4": { + "prefix": [ + "var(--o-rosyred-4)" + ], + "body": "var(--o-rosyred-4)", + "description": "[light: 238, 98, 158, dark: 189, 25, 112]", + "scope": "css,scss,less" + }, + "--o-rosyred-5": { + "prefix": [ + "var(--o-rosyred-5)" + ], + "body": "var(--o-rosyred-5)", + "description": "[light: 232, 57, 139, dark: 226, 41, 133]", + "scope": "css,scss,less" + }, + "--o-rosyred-6": { + "prefix": [ + "var(--o-rosyred-6)" + ], + "body": "var(--o-rosyred-6)", + "description": "[light: 226, 18, 122, dark: 232, 53, 137]", + "scope": "css,scss,less" + }, + "--o-rosyred-7": { + "prefix": [ + "var(--o-rosyred-7)" + ], + "body": "var(--o-rosyred-7)", + "description": "[light: 189, 11, 106, dark: 238, 97, 158]", + "scope": "css,scss,less" + }, + "--o-rosyred-8": { + "prefix": [ + "var(--o-rosyred-8)" + ], + "body": "var(--o-rosyred-8)", + "description": "[light: 151, 6, 88, dark: 243, 143, 183]", + "scope": "css,scss,less" + }, + "--o-rosyred-9": { + "prefix": [ + "var(--o-rosyred-9)" + ], + "body": "var(--o-rosyred-9)", + "description": "[light: 114, 2, 69, dark: 249, 192, 213]", + "scope": "css,scss,less" + }, + "--o-rosyred-10": { + "prefix": [ + "var(--o-rosyred-10)" + ], + "body": "var(--o-rosyred-10)", + "description": "[light: 77, 0, 48, dark: 255, 242, 247]", + "scope": "css,scss,less" + }, + "--o-color-primary1": { + "prefix": [ + "var(--o-color-primary1)" + ], + "body": "var(--o-color-primary1)", + "description": "常规[light: rgb(var(--o-deepblue-6)), dark: rgb(var(--o-deepblue-6))]", + "scope": "css,scss,less" + }, + "--o-color-primary2": { + "prefix": [ + "var(--o-color-primary2)" + ], + "body": "var(--o-color-primary2)", + "description": "悬浮[light: rgb(var(--o-deepblue-5)), dark: rgb(var(--o-deepblue-5))]", + "scope": "css,scss,less" + }, + "--o-color-primary3": { + "prefix": [ + "var(--o-color-primary3)" + ], + "body": "var(--o-color-primary3)", + "description": "激活[light: rgb(var(--o-deepblue-7)), dark: rgb(var(--o-deepblue-7))]", + "scope": "css,scss,less" + }, + "--o-color-primary4": { + "prefix": [ + "var(--o-color-primary4)" + ], + "body": "var(--o-color-primary4)", + "description": "禁用[light: rgb(var(--o-deepblue-3)), dark: rgb(var(--o-deepblue-3))]", + "scope": "css,scss,less" + }, + "--o-color-primary1-light": { + "prefix": [ + "var(--o-color-primary1-light)" + ], + "body": "var(--o-color-primary1-light)", + "description": "浅/常规[light: rgb(var(--o-deepblue-2)), dark: rgb(var(--o-deepblue-2))]", + "scope": "css,scss,less" + }, + "--o-color-primary2-light": { + "prefix": [ + "var(--o-color-primary2-light)" + ], + "body": "var(--o-color-primary2-light)", + "description": "浅/悬浮[light: rgb(var(--o-deepblue-3)), dark: rgb(var(--o-deepblue-3))]", + "scope": "css,scss,less" + }, + "--o-color-primary3-light": { + "prefix": [ + "var(--o-color-primary3-light)" + ], + "body": "var(--o-color-primary3-light)", + "description": "浅/激活[light: rgb(var(--o-deepblue-4)), dark: rgb(var(--o-deepblue-4))]", + "scope": "css,scss,less" + }, + "--o-color-primary4-light": { + "prefix": [ + "var(--o-color-primary4-light)" + ], + "body": "var(--o-color-primary4-light)", + "description": "浅/禁用[light: rgb(var(--o-deepblue-1)), dark: rgb(var(--o-deepblue-1))]", + "scope": "css,scss,less" + }, + "--o-color-success1": { + "prefix": [ + "var(--o-color-success1)" + ], + "body": "var(--o-color-success1)", + "description": "常规[light: rgb(var(--o-green-6)), dark: rgb(var(--o-green-6))]", + "scope": "css,scss,less" + }, + "--o-color-success2": { + "prefix": [ + "var(--o-color-success2)" + ], + "body": "var(--o-color-success2)", + "description": "悬浮[light: rgb(var(--o-green-4)), dark: rgb(var(--o-green-4))]", + "scope": "css,scss,less" + }, + "--o-color-success3": { + "prefix": [ + "var(--o-color-success3)" + ], + "body": "var(--o-color-success3)", + "description": "激活[light: rgb(var(--o-green-7)), dark: rgb(var(--o-green-7))]", + "scope": "css,scss,less" + }, + "--o-color-success4": { + "prefix": [ + "var(--o-color-success4)" ], "body": "var(--o-color-success4)", "description": "禁用[light: rgb(var(--o-green-3)), dark: rgb(var(--o-green-3))]", @@ -860,7 +1228,7 @@ "var(--o-color-success1-light)" ], "body": "var(--o-color-success1-light)", - "description": "浅/常规[light: rgb(var(--o-green-2)), dark: rgb(var(--o-green-2))]", + "description": "常规-浅[light: rgb(var(--o-green-2)), dark: rgb(var(--o-green-2))]", "scope": "css,scss,less" }, "--o-color-success2-light": { @@ -868,7 +1236,7 @@ "var(--o-color-success2-light)" ], "body": "var(--o-color-success2-light)", - "description": "浅/悬浮[light: rgb(var(--o-green-3)), dark: rgb(var(--o-green-3))]", + "description": "悬浮-浅[light: rgb(var(--o-green-3)), dark: rgb(var(--o-green-3))]", "scope": "css,scss,less" }, "--o-color-success3-light": { @@ -876,7 +1244,7 @@ "var(--o-color-success3-light)" ], "body": "var(--o-color-success3-light)", - "description": "浅/激活[light: rgb(var(--o-green-4)), dark: rgb(var(--o-green-4))]", + "description": "激活-浅[light: rgb(var(--o-green-4)), dark: rgb(var(--o-green-4))]", "scope": "css,scss,less" }, "--o-color-success4-light": { @@ -884,7 +1252,7 @@ "var(--o-color-success4-light)" ], "body": "var(--o-color-success4-light)", - "description": "浅/禁用[light: rgb(var(--o-green-1)), dark: rgb(var(--o-green-1))]", + "description": "禁用-浅[light: rgb(var(--o-green-1)), dark: rgb(var(--o-green-1))]", "scope": "css,scss,less" }, "--o-color-warning1": { @@ -900,7 +1268,7 @@ "var(--o-color-warning2)" ], "body": "var(--o-color-warning2)", - "description": "悬浮[light: rgb(var(--o-orange-5)), dark: rgb(var(--o-orange-5))]", + "description": "悬浮[light: rgb(var(--o-orange-4)), dark: rgb(var(--o-orange-4))]", "scope": "css,scss,less" }, "--o-color-warning3": { @@ -924,7 +1292,7 @@ "var(--o-color-warning1-light)" ], "body": "var(--o-color-warning1-light)", - "description": "浅/常规[light: rgb(var(--o-orange-2)), dark: rgb(var(--o-orange-2))]", + "description": "常规-浅[light: rgb(var(--o-orange-2)), dark: rgb(var(--o-orange-2))]", "scope": "css,scss,less" }, "--o-color-warning2-light": { @@ -932,7 +1300,7 @@ "var(--o-color-warning2-light)" ], "body": "var(--o-color-warning2-light)", - "description": "浅/悬浮[light: rgb(var(--o-orange-3)), dark: rgb(var(--o-orange-3))]", + "description": "悬浮-浅[light: rgb(var(--o-orange-3)), dark: rgb(var(--o-orange-3))]", "scope": "css,scss,less" }, "--o-color-warning3-light": { @@ -940,7 +1308,7 @@ "var(--o-color-warning3-light)" ], "body": "var(--o-color-warning3-light)", - "description": "浅/激活[light: rgb(var(--o-orange-4)), dark: rgb(var(--o-orange-4))]", + "description": "激活-浅[light: rgb(var(--o-orange-4)), dark: rgb(var(--o-orange-4))]", "scope": "css,scss,less" }, "--o-color-warning4-light": { @@ -948,7 +1316,7 @@ "var(--o-color-warning4-light)" ], "body": "var(--o-color-warning4-light)", - "description": "浅/禁用[light: rgb(var(--o-orange-1)), dark: rgb(var(--o-orange-1))]", + "description": "禁用-浅[light: rgb(var(--o-orange-1)), dark: rgb(var(--o-orange-1))]", "scope": "css,scss,less" }, "--o-color-danger1": { @@ -964,7 +1332,7 @@ "var(--o-color-danger2)" ], "body": "var(--o-color-danger2)", - "description": "悬浮[light: rgb(var(--o-red-5)), dark: rgb(var(--o-red-5))]", + "description": "悬浮[light: rgb(var(--o-red-4)), dark: rgb(var(--o-red-4))]", "scope": "css,scss,less" }, "--o-color-danger3": { @@ -988,7 +1356,7 @@ "var(--o-color-danger1-light)" ], "body": "var(--o-color-danger1-light)", - "description": "浅/常规[light: rgb(var(--o-red-2)), dark: rgb(var(--o-red-2))]", + "description": "常规-浅[light: rgb(var(--o-red-2)), dark: rgb(var(--o-red-2))]", "scope": "css,scss,less" }, "--o-color-danger2-light": { @@ -996,7 +1364,7 @@ "var(--o-color-danger2-light)" ], "body": "var(--o-color-danger2-light)", - "description": "浅/悬浮[light: rgb(var(--o-red-3)), dark: rgb(var(--o-red-3))]", + "description": "悬浮-浅[light: rgb(var(--o-red-3)), dark: rgb(var(--o-red-3))]", "scope": "css,scss,less" }, "--o-color-danger3-light": { @@ -1004,7 +1372,7 @@ "var(--o-color-danger3-light)" ], "body": "var(--o-color-danger3-light)", - "description": "浅/激活[light: rgb(var(--o-red-4)), dark: rgb(var(--o-red-4))]", + "description": "激活-浅[light: rgb(var(--o-red-4)), dark: rgb(var(--o-red-4))]", "scope": "css,scss,less" }, "--o-color-danger4-light": { @@ -1012,7 +1380,215 @@ "var(--o-color-danger4-light)" ], "body": "var(--o-color-danger4-light)", - "description": "浅/禁用[light: rgb(var(--o-red-1)), dark: rgb(var(--o-red-1))]", + "description": "禁用-浅[light: rgb(var(--o-red-1)), dark: rgb(var(--o-red-1))]", + "scope": "css,scss,less" + }, + "--o-color-fill1": { + "prefix": [ + "var(--o-color-fill1)" + ], + "body": "var(--o-color-fill1)", + "description": "一级填充:页面背景[light: rgb(var(--o-mixedgray-2)), dark: rgb(var(--o-mixedgray-3))]", + "scope": "css,scss,less" + }, + "--o-color-fill2": { + "prefix": [ + "var(--o-color-fill2)" + ], + "body": "var(--o-color-fill2)", + "description": "二级填充:区块/卡片[light: rgb(var(--o-mixedgray-1)), dark: rgb(var(--o-mixedgray-4))]", + "scope": "css,scss,less" + }, + "--o-color-fill3": { + "prefix": [ + "var(--o-color-fill3)" + ], + "body": "var(--o-color-fill3)", + "description": "三级填充:卡片[light: rgb(var(--o-mixedgray-3)), dark: rgb(var(--o-mixedgray-5))]", + "scope": "css,scss,less" + }, + "--o-color-control1": { + "prefix": [ + "var(--o-color-control1)" + ], + "body": "var(--o-color-control1)", + "description": "常规,常用于边框[light: rgba(var(--o-mixedgray-14), 0.25), dark: rgba(var(--o-mixedgray-14), 0.25)]", + "scope": "css,scss,less" + }, + "--o-color-control2": { + "prefix": [ + "var(--o-color-control2)" + ], + "body": "var(--o-color-control2)", + "description": "悬浮,常用于边框[light: rgba(var(--o-mixedgray-14), 0.6), dark: rgba(var(--o-mixedgray-14), 0.6)]", + "scope": "css,scss,less" + }, + "--o-color-control3": { + "prefix": [ + "var(--o-color-control3)" + ], + "body": "var(--o-color-control3)", + "description": "激活,常用于边框[light: rgba(var(--o-mixedgray-14), 0.8), dark: rgba(var(--o-mixedgray-14), 0.8)]", + "scope": "css,scss,less" + }, + "--o-color-control4": { + "prefix": [ + "var(--o-color-control4)" + ], + "body": "var(--o-color-control4)", + "description": "禁用,常用于边框[light: rgba(var(--o-mixedgray-14), 0.15), dark: rgba(var(--o-mixedgray-14), 0.15)]", + "scope": "css,scss,less" + }, + "--o-color-control1-light": { + "prefix": [ + "var(--o-color-control1-light)" + ], + "body": "var(--o-color-control1-light)", + "description": "常规-浅,常用于背景[light: rgb(var(--o-mixedgray-5)), dark: rgb(var(--o-mixedgray-7))]", + "scope": "css,scss,less" + }, + "--o-color-control2-light": { + "prefix": [ + "var(--o-color-control2-light)" + ], + "body": "var(--o-color-control2-light)", + "description": "悬浮-浅,常用于背景[light: rgb(var(--o-mixedgray-3)), dark: rgb(var(--o-mixedgray-5))]", + "scope": "css,scss,less" + }, + "--o-color-control3-light": { + "prefix": [ + "var(--o-color-control3-light)" + ], + "body": "var(--o-color-control3-light)", + "description": "激活-浅,常用于背景[light: rgb(var(--o-mixedgray-4)), dark: rgb(var(--o-mixedgray-6))]", + "scope": "css,scss,less" + }, + "--o-color-control4-light": { + "prefix": [ + "var(--o-color-control4-light)" + ], + "body": "var(--o-color-control4-light)", + "description": "禁用-浅,常用于背景[light: rgb(var(--o-mixedgray-3)), dark: rgb(var(--o-mixedgray-5))]", + "scope": "css,scss,less" + }, + "--o-color-control-light": { + "prefix": [ + "var(--o-color-control-light)" + ], + "body": "var(--o-color-control-light)", + "description": "很浅,常用于表格背景色[light: rgb(var(--o-mixedgray-1)), dark: rgb(var(--o-mixedgray-4))]", + "scope": "css,scss,less" + }, + "--o-color-info1": { + "prefix": [ + "var(--o-color-info1)" + ], + "body": "var(--o-color-info1)", + "description": "一级/强调/标题[light: rgba(var(--o-mixedgray-14), 1.0), dark: rgba(var(--o-mixedgray-14), 1.0)]", + "scope": "css,scss,less" + }, + "--o-color-info2": { + "prefix": [ + "var(--o-color-info2)" + ], + "body": "var(--o-color-info2)", + "description": "二级/次强调/正文[light: rgba(var(--o-mixedgray-14), 0.8), dark: rgba(var(--o-mixedgray-14), 0.8)]", + "scope": "css,scss,less" + }, + "--o-color-info3": { + "prefix": [ + "var(--o-color-info3)" + ], + "body": "var(--o-color-info3)", + "description": "三级/辅助信息[light: rgba(var(--o-mixedgray-14), 0.6), dark: rgba(var(--o-mixedgray-14), 0.6)]", + "scope": "css,scss,less" + }, + "--o-color-info4": { + "prefix": [ + "var(--o-color-info4)" + ], + "body": "var(--o-color-info4)", + "description": "置灰/禁用[light: rgba(var(--o-mixedgray-14), 0.4), dark: rgba(var(--o-mixedgray-14), 0.4)]", + "scope": "css,scss,less" + }, + "--o-color-info1-inverse": { + "prefix": [ + "var(--o-color-info1-inverse)" + ], + "body": "var(--o-color-info1-inverse)", + "description": "一级/次强调/正文反色[light: rgba(var(--o-mixedgray-1), 1.0), dark: rgba(var(--o-mixedgray-1), 1.0)]", + "scope": "css,scss,less" + }, + "--o-color-info2-inverse": { + "prefix": [ + "var(--o-color-info2-inverse)" + ], + "body": "var(--o-color-info2-inverse)", + "description": "二级/辅助信息反色[light: rgba(var(--o-mixedgray-1), 0.8), dark: rgba(var(--o-mixedgray-1), 0.8)]", + "scope": "css,scss,less" + }, + "--o-color-info3-inverse": { + "prefix": [ + "var(--o-color-info3-inverse)" + ], + "body": "var(--o-color-info3-inverse)", + "description": "三级/辅助信息反色[light: rgba(var(--o-mixedgray-1), 0.6), dark: rgba(var(--o-mixedgray-1), 0.6)]", + "scope": "css,scss,less" + }, + "--o-color-info4-inverse": { + "prefix": [ + "var(--o-color-info4-inverse)" + ], + "body": "var(--o-color-info4-inverse)", + "description": "置灰/禁用反色[light: rgba(var(--o-mixedgray-1), 0.4), dark: rgba(var(--o-mixedgray-1), 0.4)]", + "scope": "css,scss,less" + }, + "--o-color-mask1": { + "prefix": [ + "var(--o-color-mask1)" + ], + "body": "var(--o-color-mask1)", + "description": "全局遮罩[light: rgba(var(--o-mixedgray-14), 0.4), dark: rgba(var(--o-mixedgray-1), 0.4)]", + "scope": "css,scss,less" + }, + "--o-color-mask2": { + "prefix": [ + "var(--o-color-mask2)" + ], + "body": "var(--o-color-mask2)", + "description": "局部遮罩[light: rgba(var(--o-mixedgray-1), 0.2), dark: rgba(var(--o-mixedgray-4), 0.2)]", + "scope": "css,scss,less" + }, + "--o-color-link1": { + "prefix": [ + "var(--o-color-link1)" + ], + "body": "var(--o-color-link1)", + "description": "常规[light: rgba(var(--o-deepblue-6), 1.0), dark: rgba(var(--o-deepblue-6), 1.0)]", + "scope": "css,scss,less" + }, + "--o-color-link2": { + "prefix": [ + "var(--o-color-link2)" + ], + "body": "var(--o-color-link2)", + "description": "悬浮[light: rgba(var(--o-deepblue-6), 0.7), dark: rgba(var(--o-deepblue-6), 0.7)]", + "scope": "css,scss,less" + }, + "--o-color-link3": { + "prefix": [ + "var(--o-color-link3)" + ], + "body": "var(--o-color-link3)", + "description": "激活[light: rgba(var(--o-deepblue-6), 0.9), dark: rgba(var(--o-deepblue-6), 0.9)]", + "scope": "css,scss,less" + }, + "--o-color-link4": { + "prefix": [ + "var(--o-color-link4)" + ], + "body": "var(--o-color-link4)", + "description": "禁用[light: rgba(var(--o-deepblue-6), 0.4), dark: rgba(var(--o-deepblue-6), 0.4)]", "scope": "css,scss,less" }, "--o-shadow-1": { @@ -1020,7 +1596,7 @@ "var(--o-shadow-1)" ], "body": "var(--o-shadow-1)", - "description": "用于卡片、小弹窗、楼层阴影[light: 0 1px 5px rgba(var(--o-gray-10), 0.1), dark: 0 1px 7px rgba(var(--o-gray-10), 0.3)]", + "description": "用于卡片、小弹窗、楼层阴影[light: 0 3px 8px rgba(var(--o-mixedgray-13), 0.08), dark: 0 3px 8px rgba(var(--o-mixedgray-13), 0.08)]", "scope": "css,scss,less" }, "--o-shadow-2": { @@ -1028,7 +1604,7 @@ "var(--o-shadow-2)" ], "body": "var(--o-shadow-2)", - "description": "用于卡片悬浮阴影[light: 0 6px 18px rgba(var(--o-gray-10), 0.14), dark: 0 6px 18px rgba(var(--o-gray-10), 0.42)]", + "description": "用于卡片悬浮阴影[light: 0 6px 24px rgba(var(--o-mixedgray-13), 0.08), dark: 0 6px 24px rgba(var(--o-mixedgray-13), 0.08)]", "scope": "css,scss,less" }, "--o-shadow-3": { @@ -1036,7 +1612,7 @@ "var(--o-shadow-3)" ], "body": "var(--o-shadow-3)", - "description": "用于提示阴影[light: 0 10px 32px rgba(var(--o-gray-10), 0.18), dark: 0 10px 32px rgba(var(--o-gray-10), 0.54)]", + "description": "用于提示阴影[light: 0 10px 40px rgba(var(--o-mixedgray-13), 0.08), dark: 0 10px 40px rgba(var(--o-mixedgray-13), 0.08)]", "scope": "css,scss,less" }, "--o-gap-1": { @@ -1103,59 +1679,59 @@ "description": "用于组件之间的间距8[light: 64px, dark: 64px]", "scope": "css,scss,less" }, - "--o-size-xxs": { + "--o-control_size-2xs": { "prefix": [ - "var(--o-size-xxs)" + "var(--o-control_size-2xs)" ], - "body": "var(--o-size-xxs)", + "body": "var(--o-control_size-2xs)", "description": "小尺寸[light: 12px, dark: 12px]", "scope": "css,scss,less" }, - "--o-size-xs": { + "--o-control_size-xs": { "prefix": [ - "var(--o-size-xs)" + "var(--o-control_size-xs)" ], - "body": "var(--o-size-xs)", + "body": "var(--o-control_size-xs)", "description": "小尺寸[light: 18px, dark: 18px]", "scope": "css,scss,less" }, - "--o-size-s": { + "--o-control_size-s": { "prefix": [ - "var(--o-size-s)" + "var(--o-control_size-s)" ], - "body": "var(--o-size-s)", + "body": "var(--o-control_size-s)", "description": "小尺寸[light: 24px, dark: 24px]", "scope": "css,scss,less" }, - "--o-size-m": { + "--o-control_size-m": { "prefix": [ - "var(--o-size-m)" + "var(--o-control_size-m)" ], - "body": "var(--o-size-m)", + "body": "var(--o-control_size-m)", "description": "尺寸[light: 32px, dark: 32px]", "scope": "css,scss,less" }, - "--o-size-l": { + "--o-control_size-l": { "prefix": [ - "var(--o-size-l)" + "var(--o-control_size-l)" ], - "body": "var(--o-size-l)", + "body": "var(--o-control_size-l)", "description": "尺寸[light: 40px, dark: 40px]", "scope": "css,scss,less" }, - "--o-size-xl": { + "--o-control_size-xl": { "prefix": [ - "var(--o-size-xl)" + "var(--o-control_size-xl)" ], - "body": "var(--o-size-xl)", + "body": "var(--o-control_size-xl)", "description": "尺寸[light: 48px, dark: 48px]", "scope": "css,scss,less" }, - "--o-icon_size-xxs": { + "--o-icon_size-2xs": { "prefix": [ - "var(--o-icon_size-xxs)" + "var(--o-icon_size-2xs)" ], - "body": "var(--o-icon_size-xxs)", + "body": "var(--o-icon_size-2xs)", "description": "小尺寸[light: 12px, dark: 12px]", "scope": "css,scss,less" }, @@ -1391,27 +1967,27 @@ "description": "大尺寸圆角[light: 8px, dark: 8px]", "scope": "css,scss,less" }, - "--o-radius-control-s": { + "--o-radius_control-s": { "prefix": [ - "var(--o-radius-control-s)" + "var(--o-radius_control-s)" ], - "body": "var(--o-radius-control-s)", + "body": "var(--o-radius_control-s)", "description": "小尺寸控件圆角[light: var(--o-radius-s), dark: var(--o-radius-s)]", "scope": "css,scss,less" }, - "--o-radius-control-m": { + "--o-radius_control-m": { "prefix": [ - "var(--o-radius-control-m)" + "var(--o-radius_control-m)" ], - "body": "var(--o-radius-control-m)", + "body": "var(--o-radius_control-m)", "description": "中尺寸控件圆角[light: var(--o-radius-m), dark: var(--o-radius-m)]", "scope": "css,scss,less" }, - "--o-radius-control-l": { + "--o-radius_control-l": { "prefix": [ - "var(--o-radius-control-l)" + "var(--o-radius_control-l)" ], - "body": "var(--o-radius-control-l)", + "body": "var(--o-radius_control-l)", "description": "大尺寸控件圆角[light: var(--o-radius-l), dark: var(--o-radius-l)]", "scope": "css,scss,less" }, diff --git a/package.json b/package.json index 1cd8d0569d6afbfc55cb6950d66a4f5a5c681240..6cdf86b2a2bc38fea2e411b80a813a0164affceb 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "pnpm --filter portal dev", - "dev:portal": "pnpm --filter portal dev", + "dev:ak": "pnpm --filter portal-ak dev", "dev:lib": "pnpm --filter @opensig/opendesign dev" }, "keywords": [], diff --git a/packages/docs/ReleaesNote.md b/packages/docs/ReleaesNote.md index 32ca0f984926de868e953793bf50b912782a327b..80bd39422954e97dc76097256fe5cef6defcc603 100644 --- a/packages/docs/ReleaesNote.md +++ b/packages/docs/ReleaesNote.md @@ -1,9 +1,20 @@ # 0.0.26 -## card +1. Card 去掉 titleMaxRow、detailMaxRow 属性,使用 css 变量设置: --card-title-max-row,--card-detail-max-row +2. Figure 去掉 position、fit 属性,使用 css 变量设置:--figure-fit --figure-position -- 去掉 titleMaxRow、detailMaxRow 属性,使用 css 变量设置: --card-title-max-row,--card-detail-max-row +# 0.0.50 - 0620 -## figure +1. 优化 clickoutside,支持 touch,popover 支持移动端 touch 触发隐藏 +2. popup 宽度限制改为相对于屏幕 +3. 修复上传组件重复选择同一文件,不触发 change 事件问题 +4. invalid 属性从 input-number 组件移到 input 组件 -- 去掉 position、fit 属性,使用 css 变量设置:--figure-fit --figure-position +# 0.0.51 - + +1. 修复 layer 组件在卸载时,未移除挂载目标的相关类; +2. 表格插槽支持自定义 td、th 内容; +3. 修复 pagination 跳转输入框能输入小数问题; +4. todo carousel 增加鼠标 hover 停止轮播功能,支持是否循环 todo +5. upload 增加 beforeSelect 入参 +6. 浮层蒙层共用,解决闪烁问题 todo diff --git a/packages/docs/badge.md b/packages/docs/badge.md index b0e72ebf4b04e4396ccb8800f8487c8382c24036..ba3d381a4f504c8eda4403a7387b214e7d175146 100644 --- a/packages/docs/badge.md +++ b/packages/docs/badge.md @@ -1,8 +1,18 @@ # Badge 徽标 -| name | type | 默认值 | 说明 | -| :----- | :--------------- | :----- | -------------------------------------------------------------------- | -| value | string \| number | '' | 可选,显示值 | -| max | number | 99 | 可选,最大值,超过最大值显示${max}+(仅当 value 类型为 number 时生效) | -| offset | number [] | [] | 可选,徽标位置偏移量 | -| dot | boolean | fasle | 可选,是否显示为小红点 | +## props + +| name | type | 默认值 | 说明 | +| :----- | :-------------------------------------------------------- | :------- | -------------------------------------------------------------------- | +| value | string \| number | '' | 可选,显示值 | +| max | number | 99 | 可选,最大值,超过最大值显示${max}+(仅当 value 类型为 number 时生效) | +| offset | number [] | [] | 可选,徽标位置偏移量 | +| dot | boolean | fasle | 可选,是否显示为小红点 | +| color | 'normal' \| 'primary' \|'success'\| 'warning' \| 'danger' | 'normal' | 可选,颜色 | + +## slot + +| name | 参数 | 说明 | +| :------ | :--- | :----------- | +| default | | 徽标包裹内容 | +| content | | 徽标具体内容 | diff --git a/packages/docs/button.md b/packages/docs/button.md index ac5149bb9df4a650fe2aa831ce8459e0652b3e0c..bc5a8fe86401d0cbfb3497e7130a11f87f2938fa 100644 --- a/packages/docs/button.md +++ b/packages/docs/button.md @@ -1,20 +1,38 @@ -# Button 按钮 +# Button 按钮 组件设计 -## props +# 组件介绍 -| name | type | 默认值 | 说明 | -| :------ | :--------------------------------------- | :-------- | :------------- | -| shape | 'large' \| 'normal' \| 'small' | 'normal' | 可选,形状 | -| size | 'mini' \| 'small' \| 'medium' \| 'large' | 'medium' | 可选,尺寸 | -| type | 'primary' \|'outline'\| 'text' \|'link' | 'outline' | 可选,状态 | -| loading | boolean | false | 可选,加载状态 | +页面中常用的按钮 -## event +1. 支持设置不同状态颜色,设置边框、填充样式,以及圆角值(也支持全局设置); +2. 支持加载状态 +3. 支持设置链接跳转,图标 -## expose +## props 入参 -## slot +| name | type | 默认值 | 说明 | +| :------- | :---------------------------------------------------------- | :-------- | :------------------------- | +| color | "normal" \| "primary" \| "success" \| "warning" \| "danger" | 'normal' | 可选,颜色类型 | +| size | 'mini' \| 'small' \| 'medium' \| 'large' | 'medium' | 可选,按钮尺寸 | +| variant | "solid" \| "outline" \| "text" | 'outline' | 可选,按钮类型 | +| loading | boolean | false | 可选,加载状态 | +| disabled | boolean | false | 可选,是否为禁用状态 | +| href | string | -- | 可选,链接跳转 | +| icon | Component | -- | 可选,前缀图标 | +| tag | string | 'button' | 可选,自定义元素 html 标签 | -| name | 说明 | -| :--- | :------- | -| icon | 按钮图标 | +## event 事件 + +| name | 参数 | 返回值 | 说明 | +| :---- | :------------- | :----- | :------- | +| click | (e:MouseEvent) | -- | 点击事件 | + +## slot 插槽 + +| name | 说明 | +| :------ | :----------- | +| default | 按钮内容 | +| icon | 前缀按钮图标 | +| suffix | 后缀 | + +## expose 导出 diff --git a/packages/docs/checkbox.md b/packages/docs/checkbox.md index cbeac67d1c932aa3c8373ae336b4efe3ab7359a6..92fb834678b73a2a2b5a4724167d3e9be38167f9 100644 --- a/packages/docs/checkbox.md +++ b/packages/docs/checkbox.md @@ -18,15 +18,16 @@ ## expose -| name | 说明 | -| :------ | :------------- | -| checked | 多选框是否选中 | +| name | type | 说明 | +| :------ | :------ | :------------- | +| checked | boolean | 多选框是否选中 | ## slot -| name | 参数 | 说明 | -| :------- | :--------------------------------- | :----------- | -| checkbox | checked:boolean; disabled: boolean | 自定义多选框 | +| name | 参数 | 说明 | +| :------- | :--------------------------------- | :------------- | +| checkbox | checked:boolean; disabled: boolean | 自定义多选框 | +| default | | 多选框文字内容 | # CheckboxGroup 多选框组 @@ -47,6 +48,8 @@ | :----- | :----------------------------- | :------------- | | change | val: Array | 状态切换后触发 | -## expose - ## slot + +| name | 参数 | 说明 | +| :------ | :--- | :----------- | +| default | | 多选框组内容 | diff --git a/packages/docs/divider.md b/packages/docs/divider.md index c11106c6577db57be90a484e9de52bb7c6191d04..66af2e549e102148a54c910c0e4df3a2157daf79 100644 --- a/packages/docs/divider.md +++ b/packages/docs/divider.md @@ -7,3 +7,9 @@ | variant | 'solid' \| 'dashed' \| 'dotted' | 'solid' | 可选,分割线类型 | | direction | 'h' \| 'v' | 'h' | 可选,分割线方向 | | labelPosition | 'left' \| 'center' \| 'right' | 'center' | 可选,自定义内容位置 | + +## slot + +| name | 参数 | 说明 | +| :------ | :--- | :------------- | +| default | | 分割线文字内容 | diff --git a/packages/docs/global.md b/packages/docs/global.md index d67b52f6ee80dc77ecc00c3a8bd1556f3b0abe67..ee01ad06970e9817722a5f5e9c8ae5e3e77688d4 100644 --- a/packages/docs/global.md +++ b/packages/docs/global.md @@ -1,28 +1,24 @@ -# 全局配置 +# 全局配置设计 + +组件可以通过全局配置部分样式属性,同时支持动态设置。 + +## 方案设计 + +1. 设置全局默认值,同时暴露接口进行默认值修改,基于 vue 响应式,实现全局配置动态化 +2. 组件内部图标统一配置,并支持接口修改,实现组件深度定制 ## 配置全局样式 -| 方法名 | 参数 | 返回值 | 说明 | -| :-------- | :------------------------------------- | :----- | :--------------- | -| initSize | (type: 'large' \| 'normal' \| 'small') | -- | 设置全局组件尺寸 | -| initRound | (type: 'pill' \| '') | -- | 设置全局组件圆角 | +| 方法名 | 参数 | 返回值 | 说明 | +| :------------- | :-------------------------------------- | :----- | :----------------------- | +| initSize | (type: 'large' \| 'medium' \| 'small') | -- | 设置全局组件尺寸 | +| initRound | (type: 'pill' \| '') | -- | 设置全局组件圆角 | +| initZIndex | (val: number) | -- | 设置全局组件初始 z-index | +| initMediaPoint | point: Record<'phone' \| 'pad', number> | -- | 设置全局组件响应式断点 | ## 配置全局图标 -| 方法名 | 参数 | 返回值 | 说明 | -| :----------------- | :---------------- | :----- | :--------------------- | -| initLoadingIcon | (icon: Component) | -- | 设置全局加载按钮图标 | -| initLinkArrowIcon | (icon: Component) | -- | 设置 link 组件箭头图标 | -| initLinkPrefixIcon | (icon: Component) | -- | 设置 link 组件前缀图标 | -| initCloseIcon | (icon: Component) | -- | 设置全局关闭图标 | -| initAddIcon | (icon: Component) | -- | 设置全局添加图标 | - -| 方法名 | 参数 | 默认值 | -| :------ | :------------------------------------ | :-------- | -| color | normal primary success warning danger | normal | -| variant | fill outline text | outline | -| rounded | undefined string 'pill' | undefined | -| size | small normal large | normal | +具体接口见[`init-icons.ts`](../opendesign/src/_utils/init-icons.ts) # 变量定义都在 var.scss 里,同时使用最外层内定义; diff --git a/packages/docs/input-number.md b/packages/docs/input-number.md index 0ceb8d2cae562699395b42a3223925ef80b25ee3..fc6ba92b65c520b7776e7613952e2e6efac08ebe 100644 --- a/packages/docs/input-number.md +++ b/packages/docs/input-number.md @@ -1,4 +1,4 @@ -# Divider 分割线 +# input-number 数字输入框 ## 说明 @@ -36,5 +36,3 @@ parse/format 1. 当 change 事件时,执行 format - -2. diff --git a/packages/docs/input.md b/packages/docs/input.md index 77b3ab07f023ce79c6d34d7c4c75dec1dfe3d65c..96214b66abdf1725f8bb1b345e586c6b8b7d3e10 100644 --- a/packages/docs/input.md +++ b/packages/docs/input.md @@ -10,7 +10,7 @@ > 数字非法判断:非 number 字符串(Number 无法转换为数字)、不在[min, max]范围内; -## 设计 +## 组件交互设计 1. 初始化 realValue @@ -44,3 +44,46 @@ - 触发`pressEnter`事件,参数:`(realValue, KeyboardEvent)`; - 如果值改变,触发`change`事件,参数: `(realValue)` - 触发`update:modelValue`事件,参数: `(realValue)` + +## props 入参 + +| name | type | 默认值 | 说明 | +| :------------- | :---------------------------------------------------------- | :---------- | :--------------------------------------------------------------- | +| modelValue | String, Number | -- | 可选,输入框的值 v-model | +| defaultValue | String, Number | -- | 可选,输入框的默认值 | +| type | 'text' \| 'password' | 'text' | 可选,输入框类型 | +| color | "normal" \| "primary" \| "success" \| "warning" \| "danger" | 'normal' | 可选,颜色类型 | +| size | 'mini' \| 'small' \| 'medium' \| 'large' | 'medium' | 可选,按钮尺寸 | +| variant | "solid" \| "outline" \| "text" | 'outline' | 可选,按钮类型 | +| disabled | boolean | false | 可选,是否为禁用状态 | +| readonly | boolean | false | 可选,是否为只读状态 | +| invalid | boolean | false | 可选,是否为非法值状态 | +| clearable | boolean | true | 可选,是否是否可以清除 | +| autoWidth | boolean | true | 可选,是否自动增加宽度 | +| placeholder | string | -- | 可选,提示文本 | +| showPasswordOn | 'click' \| 'mousedown' | 'mousedown' | 可选,显示密码的方式 | +| parse | (value: string) => string | -- | 可选,解析输入框的值 | +| format | (value: string \| number) => string \| number | -- | 可选,对值格式化,控制显示格式,需搭配 parse 处理,保证值的正确性 | + +## event 事件 + +| name | 参数 | 返回值 | 说明 | +| :---------------- | :--------------------------------- | :----- | :------------- | +| update:modelValue | (value: string) | -- | 值更新事件 | +| change | (value: string) | -- | 值变化事件 | +| input | (value: string,evt: Event) | -- | 输入事件 | +| blur | (value: string,evt: FocusEvent) | -- | 失焦事件 | +| focus | (value: string,evt: FocusEvent) | -- | 聚焦事件 | +| clear | (evt: Event) | -- | 清除输入框事件 | +| pressEnter | (value: string,evt: KeyboardEvent) | -- | 回车事件 | + +## slot 插槽 + +| name | 说明 | +| :------ | :------- | +| prepend | 前置插槽 | +| prefix | 前缀插槽 | +| suffix | 后缀插槽 | +| append | 后置插槽 | + +## expose 导出 diff --git a/packages/docs/opendesign.md b/packages/docs/opendesign.md new file mode 100644 index 0000000000000000000000000000000000000000..db1c66efcd2848f18972aba4af440322fcd8d6c2 --- /dev/null +++ b/packages/docs/opendesign.md @@ -0,0 +1,66 @@ +# opendesign 组件设计 + +## 需求背景 + +为了支撑 openEuler 社区前端体验提升,帮助更多开发者、Sig 组快速搭建自己的前端页面,故设计开发了一套前端组件库。 +该组件库需要支持: + +1. 强大的皮肤定制能力,支持开发者快速定制皮肤,实现页面风格一致; +2. 上手难度低,开箱即用,提供示例模版,能快速搭建项目页面; + +## 方案设计 + +1. 基于当前开发者能力现状(国内 vue 开发者最多),采用 vue3 作为组件开发框架,组件实现采用逻辑与 UI 分离; +2. 基于 Css Variables,结合 opendesign 设计体系,设计变量体系,定义全局变量以及每个组件变量,实现全局+局部皮肤定制能力; +3. 针对尺寸、颜色、圆角、图标等设置,提供全局配置接口,基于 vue 响应式机制,实现配置动态化 +4. 组件避免依赖 dom,支持服务端渲染; + +## 方案实现 + +### 变量体系 Token + +#### 1. 全局变量 + +- 色盘 Palette +- 颜色 Color + - 基础色 + - 状态色 + - 控件色 + - 填充色 + - 信息色 +- 阴影 Shadow +- 字体 Font +- 尺寸 Size + - 组件尺寸 + - 图标尺寸 + - 圆角尺寸 +- 间距 Gap +- 动画 Animation + - 动画曲线 + - 持续时间 + +> 例: [light.token.css](../opendesign/src/_styles/light.token.css) + +#### 2. 组件变量 + +基于每个组件状态、类型,定义组件变量,值引用全局变量. + +> 例: [button/var.css](../opendesign/src/button/style/var.scss) + +### 动态全局配置 + +1. 设置全局默认值,同时暴露接口进行默认值修改 +2. 组件内部图标统一配置,并支持接口修改,实现组件深度定制 + +#### 1. 配置全局样式 + +| 方法名 | 参数 | 返回值 | 说明 | +| :------------- | :-------------------------------------- | :----- | :----------------------- | +| initSize | (type: 'large' \| 'medium' \| 'small') | -- | 设置全局组件尺寸 | +| initRound | (type: 'pill' \| '') | -- | 设置全局组件圆角 | +| initZIndex | (val: number) | -- | 设置全局组件初始 z-index | +| initMediaPoint | point: Record<'phone' \| 'pad', number> | -- | 设置全局组件响应式断点 | + +#### 2. 配置全局图标 + +具体接口见[`init-icons.ts`](../opendesign/src/_utils/init-icons.ts) diff --git a/packages/docs/radio.md b/packages/docs/radio.md index 4eb7e222a6771204dbb77bb836bda5ef8489872b..dbb47a1727603ade19470e3a49eefba859316f8e 100644 --- a/packages/docs/radio.md +++ b/packages/docs/radio.md @@ -23,9 +23,10 @@ ## slot -| name | 参数 | 说明 | -| :---- | :--------------------------------- | :----------- | -| radio | checked:boolean; disabled: boolean | 自定义单选框 | +| name | 参数 | 说明 | +| :------ | :--------------------------------- | :------------- | +| radio | checked:boolean; disabled: boolean | 自定义单选框 | +| default | | 单选框文字内容 | # RadioGroup 单选框组 @@ -44,6 +45,8 @@ | :----- | :------------------------------- | :------------- | | change | val: string \| number \| boolean | 状态切换后触发 | -## expose - ## slot + +| name | 参数 | 说明 | +| :------ | :--- | :----------- | +| default | | 单选框组内容 | diff --git a/packages/docs/rate.md b/packages/docs/rate.md index de58c4814c0e3db8da9c34b30eaf870b9c79c0ac..02e258ba0a795573d07bcdf52cb453bce0242c09 100644 --- a/packages/docs/rate.md +++ b/packages/docs/rate.md @@ -2,26 +2,26 @@ ## props -| name | type | 默认值 | 说明 | -| :------------------ | :--------------------------------------------- | :------- | -------------------------- | -| count | number | 5 | 可选,评分数量 | -| modelValue(v-model) | number | - | 可选,双向绑定值 | -| defaultValue | number | 0 | 可选,非受控状态时,默认值 | -| size | 'large' \| 'normal' \| 'small' | 'normal' | 标签尺寸 | -| color | 'normal' \| 'primary' \| 'warning' \| 'danger' | 'normal' | 标签颜色 | -| readonly | boolean | false | 可选,是否只读 | -| allowHalf | boolean | false | 可选,是否支持半选 | -| clearable | boolean | false | 可选,是否支持可清 | -| 空 | +| name | type | 默认值 | 说明 | +| :------------------ | :--------------------------------------------- | :------- | --------------------------------------------------- | +| count | number | 5 | 可选,评分数量 | +| modelValue(v-model) | number | - | 可选,双向绑定值 | +| defaultValue | number | 0 | 可选,非受控状态时,默认值 | +| size | 'large' \| 'normal' \| 'small' | 'normal' | 评分尺寸 | +| color | 'normal' \| 'primary' \| 'warning' \| 'danger' | 'normal' | 评分颜色 | +| readonly | boolean | false | 可选,是否只读 | +| allowHalf | boolean | false | 可选,是否支持半选 | +| clearable | boolean | false | 可选,是否支持可清空 | +| labels | Array | - | 提示文字,当且仅当提示文字数组长度等于 count 时生效 | ## event -| name | 参数 | 说明 | -| :----- | :---------- | :------------------- | -| change | val: number | 双向绑定值改变时触发 | +| name | 参数 | 说明 | +| :----- | :------------ | :------------------- | +| change | index: number | 双向绑定值改变时触发 | ## slot -| name | 参数 | 说明 | -| :--- | :--- | :------------- | -| icon | - | 自定义评分图标 | +| name | 参数 | 说明 | +| :--- | :---------------------------- | :------------- | +| icon | index: number; status: string | 自定义评分图标 | diff --git a/packages/docs/result.md b/packages/docs/result.md new file mode 100644 index 0000000000000000000000000000000000000000..ff6727e9ec45055f6ade8f929da1fd334bbde0d9 --- /dev/null +++ b/packages/docs/result.md @@ -0,0 +1,19 @@ +# result 结果页 + +## props + +| name | type | 默认值 | 说明 | +| :---------- | :------------------------------------------- | :----- | ---------------- | +| status | 'info' \| 'success' \| 'warning' \| 'danger' | - | 可选,结果页状态 | +| title | string | - | 可选,结果页标题 | +| description | string | - | 可选,结果页描述 | + +## slot + +| name | 参数 | 说明 | +| :---------- | :--- | :--------------- | +| icon | | 自定义图标 | +| title | | 自定义标题 | +| description | | 自定义描述 | +| extra | | 自定义操作区域 | +| default | | 自定义结果页内容 | diff --git a/packages/docs/switch.md b/packages/docs/switch.md index eb0a7e4a56f61e881f98ab32dcc82ec2de2e0dba..4d13f3ebb1ca4a7ef37761e70a81e3255fec2353 100644 --- a/packages/docs/switch.md +++ b/packages/docs/switch.md @@ -2,23 +2,23 @@ ## props -| name | type | 默认值 | 说明 | -| :------------------ | :-------------------------------------------- | :------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| modelValue(v-model) | string \| number \| boolean | - | 可选,双向绑定值 | -| checkedValue | string \| number \| boolean | true | 可选,选中状态对应值 | -| uncheckedValue | string \| number \| boolean | false | 可选,未选中状态对应值 | -| defaultChecked | boolean | false | 非受控状态时,默认是否选中 | -| size | 'large' \| 'normal' \| 'small' | 'normal' | 可选,开关尺寸 | -| shape | 'normal' \| 'round' | 'normal' | 可选,开关形状 | -| disabled | boolean | false | 可选,是否禁用 | -| loading | boolean | false | 可选,是否加载中 | -| beforeChange | (val: boolean): Promise\ \| boolean | - | 状态改变前的钩子函数,返回 true 或者返回 promise 且 resolve(true)则继续切换,返回 false 或者返回 promise 且被 reject 或 resolve(false)则阻止切换, | +| name | type | 默认值 | 说明 | +| :------------------ | :-------------------------------------------- | :------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| modelValue(v-model) | string \| number \| boolean | - | 可选,双向绑定值 | +| checkedValue | string \| number \| boolean | true | 可选,选中状态对应值 | +| uncheckedValue | string \| number \| boolean | false | 可选,未选中状态对应值 | +| defaultChecked | boolean | false | 非受控状态时,默认是否选中 | +| size | 'large' \| 'normal' \| 'small' | 'normal' | 可选,开关尺寸 | +| round | string | - | 可选,开关圆角 | +| disabled | boolean | false | 可选,是否禁用 | +| loading | boolean | false | 可选,是否加载中 | +| beforeChange | (val: boolean): Promise\ \| boolean | - | 可选,状态改变前的钩子函数,返回 true 或者返回 promise 且 resolve(true)则继续切换,返回 false 或者返回 promise 且被 reject 或 resolve(false)则阻止切换, | ## event -| name | 参数 | 说明 | -| :----- | :-------------- | :------------- | -| change | value: boolean; | 状态切换后触发 | +| name | 参数 | 说明 | +| :----- | :------------------------------------------ | :------------- | +| change | val: string \| number \| boolean, ev: Event | 状态切换后触发 | ## expose diff --git a/packages/docs/tab.md b/packages/docs/tab.md index 31433bf092ab3600650e39ed58753a1138bc6bde..9a44187befc70caaa1ba91a97e420686ac5ed49c 100644 --- a/packages/docs/tab.md +++ b/packages/docs/tab.md @@ -4,11 +4,14 @@ ### OTab -| name | type | 默认值 | 说明 | -| :--------- | :-------------------------- | :----- | ------------------------------------ | -| modelValue | string \| number(v-model) | '' | 可选,开关状态 | -| lazy | boolean | false | 可选,是否在首次激活标签时再挂载内容 | -| addable | boolean | false | 可选,是否可以添加页签 | +| name | type | 默认值 | 说明 | +| :---------- | :----------------------------- | :-------- | ------------------------------------ | +| modelValue | string \| number(v-model) | '' | 可选,开关状态 | +| lazy | boolean | false | 可选,是否在首次激活标签时再挂载内容 | +| addable | boolean | false | 可选,是否可以添加页签 | +| variant | "solid" \| "outline" \| "text" | 'outline' | 可选,按钮类型 | +| addInactive | boolean | false | 可选,不激活新添加页签 | +| line | boolean | true | 可选,是否展示 nav 线 | ### OTabPane @@ -26,10 +29,12 @@ ### OTab -| name | 参数 | 说明 | -| :----- | :---------------------------------------------------- | :------------- | -| change | (value: string \| number, oldValue: string \| number) | 页签切换后触发 | -| delete | (value: string \| number ) | 页签删除后触发 | +| name | 参数 | 说明 | +| :----- | :------------------------------------------------------ | :--------------- | +| change | (value: string \| number, oldValue: string \| number) | 页签切换后触发 | +| change | (value: string \| number, oldValue?: string \| number ) | 页签切换变化触发 | +| delete | (value: string \| number ) | 页签删除后触发 | +| add | (evt: MouseEvent ) | 页签添加后触发 | ## expose @@ -37,12 +42,15 @@ ### OTab -| name | 说明 | -| :--- | :------------------- | -| act | 页签右侧额外内容插槽 | +| name | 说明 | +| :----- | :------- | +| prefix | 前缀插槽 | +| suffix | 后缀插槽 | +| archor | 高亮插槽 | ### OTabPane -| name | 说明 | -| :--- | :------- | -| nav | 页签插槽 | +| name | 说明 | +| :------ | :----------- | +| nav | 页签头部插槽 | +| default | 页签内容插槽 | diff --git a/packages/docs/table.md b/packages/docs/table.md index 86a7e653ab297984485a6d8de4b614cb03be1475..0f43cc5b3ef3bfd79a208f06951f79ad0d27d38c 100644 --- a/packages/docs/table.md +++ b/packages/docs/table.md @@ -2,47 +2,8 @@ ## props -### OTab - -| name | type | 默认值 | 说明 | -| :--------- | :-------------------------- | :----- | ------------------------------------ | -| modelValue | string \| number(v-model) | '' | 可选,开关状态 | -| lazy | boolean | false | 可选,是否在首次激活标签时再挂载内容 | -| addable | boolean | false | 可选,是否可以添加页签 | - -### OTabPane - -| name | type | 默认值 | 说明 | -| :------------ | :--------------- | :-------------- | ------------------------------------ | -| value | string \| number | instance.uid | 可选,tab id | -| label | string | undefined | 可选,页签文本 | -| transition | string | o-fade-up-enter | 可选,页签切换时过渡动画 | -| lazy | boolean | false | 可选,是否在首次激活标签时再挂载内容 | -| unmountOnHide | boolean | false | 可选,是否在未激活时卸载页签内容 | -| disabled | boolean | false | 可选,是否禁用选中 | -| closable | boolean | false | 可选,是否可以删除 | - ## event -### OTab - -| name | 参数 | 说明 | -| :----- | :---------------------------------------------------- | :------------- | -| change | (value: string \| number, oldValue: string \| number) | 页签切换后触发 | -| delete | (value: string \| number ) | 页签删除后触发 | - ## expose ## slot - -### OTab - -| name | 说明 | -| :--- | :------------------- | -| act | 页签右侧额外内容插槽 | - -### OTabPane - -| name | 说明 | -| :--- | :------- | -| nav | 页签插槽 | diff --git a/packages/docs/tag.md b/packages/docs/tag.md index 53dd9197f642208cabf09b3e3768318aadcfc512..cd36edfb8ebf4c0d35e7f892adfa9869a4250369 100644 --- a/packages/docs/tag.md +++ b/packages/docs/tag.md @@ -2,26 +2,27 @@ ## props -| name | type | 默认值 | 说明 | -| :--------------- | :--------------------------------------------- | :------- | ------------------------------------------------------- | -| status | 'normal' \| 'success' \| 'warning' \| 'danger' | 'normal' | 标签状态 | -| bordered | boolean | false | 是否有边框 | -| size | 'large' \| 'normal' \| 'small' | 'normal' | 标签尺寸 | -| shape | 'normal' \| 'round' | 'normal' | 标签形状 | -| closable | boolean | false | 是否可关闭 | -| checkable | boolean | false | 是否可选中 | -| checked(v-model) | boolean | false | 是否被选中(仅 checkable 为 true 生效) | -| defaultChecked | boolean | false | 非受控状态时,默认是否选中(仅 checkable 为 true 生效) | +| name | type | 默认值 | 说明 | +| :--------------- | :--------------------------------------------- | :------- | ------------------------------------------------------------- | +| color | 'normal' \| 'success' \| 'warning' \| 'danger' | 'normal' | 可选,标签颜色 | +| variant | 'solid'\|'outline' | 'solid' | 可选,标签类型 | +| size | 'large' \| 'normal' \| 'small' | 'normal' | 可选,标签尺寸 | +| round | string | - | 可选,标签圆角 | +| closable | boolean | false | 可选,是否可关闭 | +| checkable | boolean | false | 可选,是否可选中 | +| checked(v-model) | boolean | false | 可选,是否被选中(仅 checkable 为 true 生效) | +| defaultChecked | boolean | false | 可选,非受控状态时,默认是否选中(仅 checkable 为 true 生效) | ## event -| name | 参数 | 说明 | -| :---- | :----------- | :----------- | -| close | | 值改变时触发 | -| check | val: boolean | 选中时触发 | +| name | 参数 | 说明 | +| :----- | :--------------------------- | :----------- | +| change | val: boolean, ev: MouseEvent | 值改变时触发 | +| close | ev: MouseEvent | 关闭时触发 | ## slot -| name | 说明 | -| :--- | :------- | -| icon | 按钮图标 | +| name | 说明 | +| :------ | :------------- | +| icon | 自定义图标 | +| default | 自定义标签内容 | diff --git a/packages/opendesign/.gitignore b/packages/opendesign/.gitignore index 6a2ad8ec3f2502941132e8dd783cf878eb3a0bc7..abcfe591f2bc9eb29306939345ca50aac1abc32f 100644 --- a/packages/opendesign/.gitignore +++ b/packages/opendesign/.gitignore @@ -23,6 +23,6 @@ dist-ssr *.sln *.sw? -src/components/icon +icon-components es lib \ No newline at end of file diff --git a/packages/opendesign/src/icons/cleansvg.config.ts b/packages/opendesign/icons/cleansvg.config.ts similarity index 100% rename from packages/opendesign/src/icons/cleansvg.config.ts rename to packages/opendesign/icons/cleansvg.config.ts diff --git a/packages/opendesign/src/icons/icon.config.ts b/packages/opendesign/icons/icon.config.ts similarity index 32% rename from packages/opendesign/src/icons/icon.config.ts rename to packages/opendesign/icons/icon.config.ts index 5fdb86973a255bced063f9d039de644ca7563188..c5f316277c8fed07f9c76e34a595fc14485b63dd 100644 --- a/packages/opendesign/src/icons/icon.config.ts +++ b/packages/opendesign/icons/icon.config.ts @@ -1,4 +1,6 @@ module.exports = { input: './svgs', - output: '../components/icon/', + output: '../src/icon-components/', + componentClass: 'o-svg-icon', + prefix: 'o-', }; diff --git a/packages/opendesign/src/icons/svgs/color/ascend.svg b/packages/opendesign/icons/svgs/color/ascend.svg similarity index 100% rename from packages/opendesign/src/icons/svgs/color/ascend.svg rename to packages/opendesign/icons/svgs/color/ascend.svg diff --git a/packages/opendesign/icons/svgs/color/danger.svg b/packages/opendesign/icons/svgs/color/danger.svg new file mode 100644 index 0000000000000000000000000000000000000000..3724f7598b862f47ab4c1d470fad7f7f37ac261e --- /dev/null +++ b/packages/opendesign/icons/svgs/color/danger.svg @@ -0,0 +1,5 @@ + +danger + + + diff --git a/packages/opendesign/icons/svgs/color/info.svg b/packages/opendesign/icons/svgs/color/info.svg new file mode 100644 index 0000000000000000000000000000000000000000..d4b556f9873844711ba5edd057624ef95ecdf168 --- /dev/null +++ b/packages/opendesign/icons/svgs/color/info.svg @@ -0,0 +1,5 @@ + +info + + + diff --git a/packages/opendesign/src/icons/svgs/color/kunpeng.svg b/packages/opendesign/icons/svgs/color/kunpeng.svg similarity index 100% rename from packages/opendesign/src/icons/svgs/color/kunpeng.svg rename to packages/opendesign/icons/svgs/color/kunpeng.svg diff --git a/packages/opendesign/icons/svgs/color/skill.svg b/packages/opendesign/icons/svgs/color/skill.svg new file mode 100644 index 0000000000000000000000000000000000000000..25b987ee66e3a46ebde218a62fc7ff4487df9dcb --- /dev/null +++ b/packages/opendesign/icons/svgs/color/skill.svg @@ -0,0 +1,12 @@ + +skill + + + + + + + + + + diff --git a/packages/opendesign/icons/svgs/color/success.svg b/packages/opendesign/icons/svgs/color/success.svg new file mode 100644 index 0000000000000000000000000000000000000000..c155c2a03c24136721c62f8248b726a479d390fd --- /dev/null +++ b/packages/opendesign/icons/svgs/color/success.svg @@ -0,0 +1,5 @@ + +success + + + diff --git a/packages/opendesign/icons/svgs/color/warning.svg b/packages/opendesign/icons/svgs/color/warning.svg new file mode 100644 index 0000000000000000000000000000000000000000..b3f948c7b58213d18fbe853fa71df1708a30431a --- /dev/null +++ b/packages/opendesign/icons/svgs/color/warning.svg @@ -0,0 +1,5 @@ + +warning + + + diff --git a/packages/opendesign/icons/svgs/fill/add.svg b/packages/opendesign/icons/svgs/fill/add.svg new file mode 100644 index 0000000000000000000000000000000000000000..82f7277d8fb48fad37233de8101b30ee9e559242 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/add.svg @@ -0,0 +1,4 @@ + +add + + diff --git a/packages/opendesign/icons/svgs/fill/arrow-down.svg b/packages/opendesign/icons/svgs/fill/arrow-down.svg new file mode 100644 index 0000000000000000000000000000000000000000..ab36a371549314c89c4d50122379229a46be0146 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/arrow-down.svg @@ -0,0 +1,4 @@ + +arrow-down + + diff --git a/packages/opendesign/icons/svgs/fill/arrow-left.svg b/packages/opendesign/icons/svgs/fill/arrow-left.svg new file mode 100644 index 0000000000000000000000000000000000000000..2c78dea2ea34b35193506e532644521195241eac --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/arrow-left.svg @@ -0,0 +1,4 @@ + +arrow-left + + diff --git a/packages/opendesign/icons/svgs/fill/arrow-right.svg b/packages/opendesign/icons/svgs/fill/arrow-right.svg new file mode 100644 index 0000000000000000000000000000000000000000..1dfb5d84f786fdd2a96072452809a8065a74e556 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/arrow-right.svg @@ -0,0 +1,4 @@ + +arrow-right + + diff --git a/packages/opendesign/icons/svgs/fill/arrow-up.svg b/packages/opendesign/icons/svgs/fill/arrow-up.svg new file mode 100644 index 0000000000000000000000000000000000000000..59622894329855ae686a22a1641dbef31ff37a36 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/arrow-up.svg @@ -0,0 +1,4 @@ + +arrow-up + + diff --git a/packages/opendesign/icons/svgs/fill/calendar.svg b/packages/opendesign/icons/svgs/fill/calendar.svg new file mode 100644 index 0000000000000000000000000000000000000000..426baebd156e24d10a9582d25435a8681d8e932a --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/calendar.svg @@ -0,0 +1,4 @@ + +calendar + + diff --git a/packages/opendesign/src/icons/svgs/fill/arrow-traingle-down.svg b/packages/opendesign/icons/svgs/fill/caret-down.svg similarity index 91% rename from packages/opendesign/src/icons/svgs/fill/arrow-traingle-down.svg rename to packages/opendesign/icons/svgs/fill/caret-down.svg index 9360f1bfbca925457182093e1fe03121388a994d..d76256d8b56f6e4acfc88f1b62eee975cbcf1253 100644 --- a/packages/opendesign/src/icons/svgs/fill/arrow-traingle-down.svg +++ b/packages/opendesign/icons/svgs/fill/caret-down.svg @@ -1,4 +1,4 @@ -arrow-traingle-down +caret-down diff --git a/packages/opendesign/icons/svgs/fill/caret-left.svg b/packages/opendesign/icons/svgs/fill/caret-left.svg new file mode 100644 index 0000000000000000000000000000000000000000..9151eb2335337c67c305d9e53a68c10c30e63f74 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/caret-left.svg @@ -0,0 +1,4 @@ + +caret-left + + diff --git a/packages/opendesign/src/icons/svgs/fill/arrow-traingle-right.svg b/packages/opendesign/icons/svgs/fill/caret-right.svg similarity index 91% rename from packages/opendesign/src/icons/svgs/fill/arrow-traingle-right.svg rename to packages/opendesign/icons/svgs/fill/caret-right.svg index 397259fe7380a1fba590a07bc629235ff89743d9..07fe289199101458b1556d579a71209b0d9872f2 100644 --- a/packages/opendesign/src/icons/svgs/fill/arrow-traingle-right.svg +++ b/packages/opendesign/icons/svgs/fill/caret-right.svg @@ -1,4 +1,4 @@ -arrow-traingle-right +caret-right diff --git a/packages/opendesign/src/icons/svgs/fill/arrow-traingle-up.svg b/packages/opendesign/icons/svgs/fill/caret-up.svg similarity index 91% rename from packages/opendesign/src/icons/svgs/fill/arrow-traingle-up.svg rename to packages/opendesign/icons/svgs/fill/caret-up.svg index 89e87a21dd0dbfc306afa6c34b8dcb63f8e0d9d0..36e3132a22a06db90d14de602dae4437f0d61884 100644 --- a/packages/opendesign/src/icons/svgs/fill/arrow-traingle-up.svg +++ b/packages/opendesign/icons/svgs/fill/caret-up.svg @@ -1,4 +1,4 @@ -arrow-traingle-up +caret-Up diff --git a/packages/opendesign/icons/svgs/fill/checked.svg b/packages/opendesign/icons/svgs/fill/checked.svg new file mode 100644 index 0000000000000000000000000000000000000000..b856f24e0d966a8701e28bb8f522904bff0e848a --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/checked.svg @@ -0,0 +1,4 @@ + +checked + + diff --git a/packages/opendesign/icons/svgs/fill/chevron-down.svg b/packages/opendesign/icons/svgs/fill/chevron-down.svg new file mode 100644 index 0000000000000000000000000000000000000000..f91a7df723c2988958c22284e6effe27b07a72b3 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/chevron-down.svg @@ -0,0 +1,4 @@ + +chevron-down + + diff --git a/packages/opendesign/icons/svgs/fill/chevron-left.svg b/packages/opendesign/icons/svgs/fill/chevron-left.svg new file mode 100644 index 0000000000000000000000000000000000000000..ad71998f1dd94835adb920a394aa941fcfb69d89 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/chevron-left.svg @@ -0,0 +1,4 @@ + +chevron-left + + diff --git a/packages/opendesign/icons/svgs/fill/chevron-right.svg b/packages/opendesign/icons/svgs/fill/chevron-right.svg new file mode 100644 index 0000000000000000000000000000000000000000..03202ca16ffbb96dc84edec19ac61e6432208bd5 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/chevron-right.svg @@ -0,0 +1,4 @@ + +chevron-right + + diff --git a/packages/opendesign/icons/svgs/fill/chevron-up.svg b/packages/opendesign/icons/svgs/fill/chevron-up.svg new file mode 100644 index 0000000000000000000000000000000000000000..964c0ed2ae8e1ab9ce41c2b3942b4cd817da78c9 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/chevron-up.svg @@ -0,0 +1,4 @@ + +chevron-up + + diff --git a/packages/opendesign/icons/svgs/fill/close.svg b/packages/opendesign/icons/svgs/fill/close.svg new file mode 100644 index 0000000000000000000000000000000000000000..e21d10567e3db40a64ca72800b2032b036fd488c --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/close.svg @@ -0,0 +1,4 @@ + +close + + diff --git a/packages/opendesign/icons/svgs/fill/delete.svg b/packages/opendesign/icons/svgs/fill/delete.svg new file mode 100644 index 0000000000000000000000000000000000000000..aed4df7e497ccb7243f25e484455fc6917d7935a --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/delete.svg @@ -0,0 +1,4 @@ + +delete + + diff --git a/packages/opendesign/icons/svgs/fill/done.svg b/packages/opendesign/icons/svgs/fill/done.svg new file mode 100644 index 0000000000000000000000000000000000000000..a48f1b615dc9a08e63fef3051cb44b7a31d0ee79 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/done.svg @@ -0,0 +1,4 @@ + +done + + diff --git a/packages/opendesign/icons/svgs/fill/double-arrow-down.svg b/packages/opendesign/icons/svgs/fill/double-arrow-down.svg new file mode 100644 index 0000000000000000000000000000000000000000..5f58bb2d409c25226534ee66e78b05cc97234672 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/double-arrow-down.svg @@ -0,0 +1,4 @@ + +double-arrow-down + + diff --git a/packages/opendesign/icons/svgs/fill/double-arrow-left.svg b/packages/opendesign/icons/svgs/fill/double-arrow-left.svg new file mode 100644 index 0000000000000000000000000000000000000000..425e512dbdaa5cd553ffff63ec5b32de8752effb --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/double-arrow-left.svg @@ -0,0 +1,4 @@ + +double-arrow-left + + diff --git a/packages/opendesign/icons/svgs/fill/double-arrow-right.svg b/packages/opendesign/icons/svgs/fill/double-arrow-right.svg new file mode 100644 index 0000000000000000000000000000000000000000..b713ae84436cf87821390716a7f4ab94b7da700f --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/double-arrow-right.svg @@ -0,0 +1,4 @@ + +double-arrow-right + + diff --git a/packages/opendesign/icons/svgs/fill/double-arrow-up.svg b/packages/opendesign/icons/svgs/fill/double-arrow-up.svg new file mode 100644 index 0000000000000000000000000000000000000000..815b367e53e6be02726f1b7ea3c6d1e4f5ef0ed3 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/double-arrow-up.svg @@ -0,0 +1,4 @@ + +double-arrow-up + + diff --git a/packages/opendesign/icons/svgs/fill/edit.svg b/packages/opendesign/icons/svgs/fill/edit.svg new file mode 100644 index 0000000000000000000000000000000000000000..92711cd45472445bbf588fadbda86666c8c6ca75 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/edit.svg @@ -0,0 +1,4 @@ + +edit + + diff --git a/packages/opendesign/icons/svgs/fill/ellipsis.svg b/packages/opendesign/icons/svgs/fill/ellipsis.svg new file mode 100644 index 0000000000000000000000000000000000000000..5bc4f5c9c0cbce76fd5d8202e673acfa3a41af82 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/ellipsis.svg @@ -0,0 +1,4 @@ + +ellipsis + + diff --git a/packages/opendesign/icons/svgs/fill/eye-off.svg b/packages/opendesign/icons/svgs/fill/eye-off.svg new file mode 100644 index 0000000000000000000000000000000000000000..712184b1d413839aa16f3fd7a885d817e0543363 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/eye-off.svg @@ -0,0 +1,4 @@ + +eye-off + + diff --git a/packages/opendesign/icons/svgs/fill/eye.svg b/packages/opendesign/icons/svgs/fill/eye.svg new file mode 100644 index 0000000000000000000000000000000000000000..54be9baa7ed3ee24bf34a8bc68b401455a956c88 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/eye.svg @@ -0,0 +1,4 @@ + +eye + + diff --git a/packages/opendesign/icons/svgs/fill/file.svg b/packages/opendesign/icons/svgs/fill/file.svg new file mode 100644 index 0000000000000000000000000000000000000000..2401ae213428ce51382b588f35ed1af408035547 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/file.svg @@ -0,0 +1,4 @@ + +file + + diff --git a/packages/opendesign/icons/svgs/fill/filter.svg b/packages/opendesign/icons/svgs/fill/filter.svg new file mode 100644 index 0000000000000000000000000000000000000000..3fb973fe9d32145886f3b0d313c1d9133b722e00 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/filter.svg @@ -0,0 +1,4 @@ + +filter + + diff --git a/packages/opendesign/icons/svgs/fill/image-error.svg b/packages/opendesign/icons/svgs/fill/image-error.svg new file mode 100644 index 0000000000000000000000000000000000000000..f4784baf500d0c434da3ed8a1df31b0f5ae18494 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/image-error.svg @@ -0,0 +1,4 @@ + +image-error + + diff --git a/packages/opendesign/icons/svgs/fill/link.svg b/packages/opendesign/icons/svgs/fill/link.svg new file mode 100644 index 0000000000000000000000000000000000000000..f032c634dcdb06063899d50fa2946fc075fb352d --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/link.svg @@ -0,0 +1,4 @@ + +link + + diff --git a/packages/opendesign/icons/svgs/fill/loading.svg b/packages/opendesign/icons/svgs/fill/loading.svg new file mode 100644 index 0000000000000000000000000000000000000000..74fba60b992a5e6371621fd111b6ceae58f11523 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/loading.svg @@ -0,0 +1,5 @@ + +loading + + + diff --git a/packages/opendesign/src/icons/svgs/fill/minus.svg b/packages/opendesign/icons/svgs/fill/minus.svg similarity index 36% rename from packages/opendesign/src/icons/svgs/fill/minus.svg rename to packages/opendesign/icons/svgs/fill/minus.svg index 4ed5b3ce202033de2b32c3c7cb60c6ec86ce4ff1..ae76b5d3942e3d16945e7898c6bca122696accf0 100644 --- a/packages/opendesign/src/icons/svgs/fill/minus.svg +++ b/packages/opendesign/icons/svgs/fill/minus.svg @@ -1,4 +1,4 @@ minus - + diff --git a/packages/opendesign/icons/svgs/fill/refresh.svg b/packages/opendesign/icons/svgs/fill/refresh.svg new file mode 100644 index 0000000000000000000000000000000000000000..dc271e18f59012237fde089aa62ae4cfeef08518 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/refresh.svg @@ -0,0 +1,4 @@ + +refresh + + diff --git a/packages/opendesign/icons/svgs/fill/search.svg b/packages/opendesign/icons/svgs/fill/search.svg new file mode 100644 index 0000000000000000000000000000000000000000..045de032bba4d5e2f78437a1f9898f88156a8f3f --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/search.svg @@ -0,0 +1,4 @@ + +search + + diff --git a/packages/opendesign/icons/svgs/fill/star.svg b/packages/opendesign/icons/svgs/fill/star.svg new file mode 100644 index 0000000000000000000000000000000000000000..a943238896d655698f97f5ff16621a2547e72b67 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/star.svg @@ -0,0 +1,6 @@ + +star + + + + diff --git a/packages/opendesign/icons/svgs/fill/time.svg b/packages/opendesign/icons/svgs/fill/time.svg new file mode 100644 index 0000000000000000000000000000000000000000..85f4810c65216831e19aebbb6eca7584ccfa6906 --- /dev/null +++ b/packages/opendesign/icons/svgs/fill/time.svg @@ -0,0 +1,4 @@ + +time + + diff --git a/packages/opendesign/package.json b/packages/opendesign/package.json index e332b52f4cc67877e5561e6b2abef9f321ad537e..fc2b7b02640c555ebc48cafa963e38a44b26f98b 100644 --- a/packages/opendesign/package.json +++ b/packages/opendesign/package.json @@ -1,6 +1,6 @@ { "name": "@opensig/opendesign", - "version": "0.0.38", + "version": "0.0.50", "main": "lib/index.js", "module": "es/index.mjs", "types": "es/index.d.ts", @@ -16,9 +16,9 @@ "vue3 components" ], "scripts": { - "gen:token": "opensig-scripts gen:token --config ./src/tokens/token.config.ts", - "gen:icon": "opensig-scripts gen:icon --config ./src/icons/icon.config.ts", - "clean:svg": "opensig-scripts clean:svg --config ./src/icons/cleansvg.config.ts", + "gen:token": "opensig-scripts gen:token --config ./tokens/token.config.ts", + "gen:icon": "opensig-scripts gen:icon --config ./icons/icon.config.ts", + "clean:svg": "opensig-scripts clean:svg --config ./icons/cleansvg.config.ts", "build:component": "opensig-scripts build:component", "build:style": "opensig-scripts build:style", "build": "pnpm gen:icon && pnpm build:component && pnpm build:style" @@ -27,10 +27,12 @@ "vue": "^3.1.0" }, "devDependencies": { - "@opensig/opensig-scripts": "workspace:^0.0.8", + "@opensig/opensig-scripts": "workspace:^", "typescript": "^4.6.4", - "vue": "^3.2.41", + "vue": "^3.2.45", "vue-tsc": "^1.0.13" }, - "dependencies": {} + "dependencies": { + "date-fns": "^2.30.0" + } } diff --git a/packages/opendesign/src/components/_shared/components/client-only.ts b/packages/opendesign/src/_components/client-only.ts similarity index 100% rename from packages/opendesign/src/components/_shared/components/client-only.ts rename to packages/opendesign/src/_components/client-only.ts diff --git a/packages/opendesign/src/components/_shared/components/html-tag.ts b/packages/opendesign/src/_components/html-tag.ts similarity index 100% rename from packages/opendesign/src/components/_shared/components/html-tag.ts rename to packages/opendesign/src/_components/html-tag.ts diff --git a/packages/opendesign/src/_components/inner-frame/InnerFrame.vue b/packages/opendesign/src/_components/inner-frame/InnerFrame.vue new file mode 100644 index 0000000000000000000000000000000000000000..a3d811ba1560791b70da8be9348781e0e1feba0f --- /dev/null +++ b/packages/opendesign/src/_components/inner-frame/InnerFrame.vue @@ -0,0 +1,50 @@ + + diff --git a/packages/opendesign/src/_components/inner-frame/index.ts b/packages/opendesign/src/_components/inner-frame/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..39244cbe671a31d0e20967f14e4688df2b91ebe1 --- /dev/null +++ b/packages/opendesign/src/_components/inner-frame/index.ts @@ -0,0 +1,3 @@ +import InnerFrame from './InnerFrame.vue'; + +export { InnerFrame }; diff --git a/packages/opendesign/src/_components/inner-frame/style/index.scss b/packages/opendesign/src/_components/inner-frame/style/index.scss new file mode 100644 index 0000000000000000000000000000000000000000..975ed95ed80934e7ba204a82a1c79c87344edd41 --- /dev/null +++ b/packages/opendesign/src/_components/inner-frame/style/index.scss @@ -0,0 +1,118 @@ +@use '../../../_styles/mixin.scss' as *; +@use './var.scss'; + +.o-i-frame { + color: var(--if-color); + display: inline-flex; + height: var(--if-height); + font-size: var(--if-text-size); + line-height: var(--if-text-height); +} + +.o-if-main { + display: flex; + padding: var(--if-padding); + width: 100%; + overflow: hidden; + position: relative; + border-radius: var(--if-radius); + border: var(--if-bd); + background-color: var(--if-bg-color); + transition: all var(--o-duration-s) var(--o-easing-standard); + + cursor: pointer; + @include hover { + &:hover { + border-color: var(--if-bd-color-hover); + background-color: var(--if-bg-color-hover); + } + } + + .o-if-focused & { + border-color: var(--if-bd-color-focus); + background-color: var(--if-bg-color-focus); + } + + .o-if-disabled &, + .o-if-readonly & { + color: var(--if-color-disabled); + border-color: var(--if-bd-color-disabled); + background-color: var(--if-bg-color-disabled); + } + .o-if-disabled & { + cursor: not-allowed; + } + .o-if-readonly & { + cursor: default; + } + + &.has-prepend { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + &.has-append { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } +} + +.o-if-append, +.o-if-prepend { + display: flex; + align-items: center; + border: var(--if-ap-bd); + background-color: var(--if-ap-bg-color); + + .o-if-readonly &, + .o-if-disabled & { + border: var(--if-ap-bd-disabled); + } +} + +.o-if-append { + flex-shrink: 0; + padding: var(--if-append-padding); + border-top-right-radius: var(--if-radius); + border-bottom-right-radius: var(--if-radius); +} + +.o-if-prepend { + flex-shrink: 0; + padding: var(--if-prepend-padding); + border-top-left-radius: var(--if-radius); + border-bottom-left-radius: var(--if-radius); +} + +.o-if-solid { + .o-if-prepend { + border-left-width: 0; + border-top-width: 0; + border-bottom-width: 0; + } + .o-if-append { + border-right-width: 0; + border-top-width: 0; + border-bottom-width: 0; + } +} + +.o-if-outline { + .o-if-prepend { + border-right-width: 0; + } + .o-if-append { + border-left-width: 0; + } +} +.o-if-text { + .o-if-main { + border-right-width: 0; + border-top-width: 0; + border-left-width: 0; + } +} +.o-if-prefix, +.o-if-suffix { + display: flex; + align-items: center; +} diff --git a/packages/opendesign/src/_components/inner-frame/style/index.ts b/packages/opendesign/src/_components/inner-frame/style/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..344262c5f18d6cd0c596ab87ee967be2975f582d --- /dev/null +++ b/packages/opendesign/src/_components/inner-frame/style/index.ts @@ -0,0 +1,2 @@ +import '../../../_styles'; +import './index.scss'; diff --git a/packages/opendesign/src/_components/inner-frame/style/var.scss b/packages/opendesign/src/_components/inner-frame/style/var.scss new file mode 100644 index 0000000000000000000000000000000000000000..f54a579779cd00b3b9d855adb7d4f337d10afa02 --- /dev/null +++ b/packages/opendesign/src/_components/inner-frame/style/var.scss @@ -0,0 +1,167 @@ +.o-i-frame { + --if-color: var(--o-color-info2); + --if-color-disabled: var(--o-color-info4); + --icon-color: var(--o-color-info2); + --icon-color-hover: var(--o-color-info2); + --icon-color-disabled: var(--o-color-info4); + + --if-ap-bd: 1px solid var(--if-ap-bd-color); + --if-ap-bd-disabled: 1px solid var(--if-ap-bd-color-disabled); + + --if-bd: 1px solid var(--if-bd-color); + --if-bd-hover: 1px solid var(--if-bd-color-hover); + --if-bd-focus: 1px solid var(--if-bd-color-focus); + --if-bd-disabled: 1px solid var(--if-bd-color-disabled); +} + +.o-if-text, +.o-if-outline { + --if-bg-color: transparent; + --if-bg-color-hover: var(--o-color-control-light); + --if-bg-color-focus: var(--o-color-control-light); + + &.o-if-normal { + --if-bd-color: var(--o-color-control1); + --if-bd-color-hover: var(--o-color-primary2); + --if-bd-color-focus: var(--o-color-primary3); + --if-bd-color-disabled: var(--o-color-control4); + } + &.o-if-success { + --if-bd-color: var(--o-color-success1); + --if-bd-color-hover: var(--o-color-success2); + --if-bd-color-focus: var(--o-color-success3); + --if-bd-color-disabled: var(--o-color-success4); + } + &.o-if-warning { + --if-bd-color: var(--o-color-warning1); + --if-bd-color-hover: var(--o-color-warning2); + --if-bd-color-focus: var(--o-color-warning3); + --if-bd-color-disabled: var(--o-color-warning4); + } + + &.o-if-danger { + --if-bd-color: var(--o-color-danger1); + --if-bd-color-hover: var(--o-color-danger2); + --if-bd-color-focus: var(--o-color-danger3); + --if-bd-color-disabled: var(--o-color-danger4); + } +} +.o-if-outline { + --if-ap-bd-color: var(--o-color-control1); + --if-ap-bd-color-disabled: var(--o-color-control4); +} + +.o-if-solid { + --if-ap-bg-color: var(--o-color-control1-light); + --if-ap-bd-color: var(--o-color-control2-light); + --if-ap-bd-color-disabled: var(--o-color-control2-light); + + &.o-if-normal { + --if-bd-color: var(--o-color-control1-light); + --if-bd-color-hover: var(--o-color-primary2-light); + --if-bd-color-focus: var(--o-color-primary3-light); + --if-bd-color-disabled: var(--o-color-control4-light); + + --if-bg-color: var(--o-color-control1-light); + --if-bg-color-hover: var(--o-color-control-light); + --if-bg-color-disabled: var(--o-color-control4-light); + } + &.o-if-success { + --if-bd-color: var(--o-color-success1-light); + --if-bd-color-hover: var(--o-color-success2-light); + --if-bd-color-focus: var(--o-color-success3-light); + --if-bd-color-disabled: var(--o-color-success4-light); + + --if-bg-color: var(--o-color-success1-light); + --if-bg-color-hover: var(--o-color-control-light); + --if-bg-color-disabled: var(--o-color-success4-light); + } + &.o-if-warning { + --if-bd-color: var(--o-color-warning1-light); + --if-bd-color-hover: var(--o-color-warning2-light); + --if-bd-color-focus: var(--o-color-warning3-light); + --if-bd-color-disabled: var(--o-color-warning4-light); + + --if-bg-color: var(--o-color-warning1-light); + --if-bg-color-hover: var(--o-color-control-light); + --if-bg-color-disabled: var(--o-color-warning4-light); + } + + &.o-if-danger { + --if-bd-color: var(--o-color-danger1-light); + --if-bd-color-hover: var(--o-color-danger2-light); + --if-bd-color-focus: var(--o-color-danger3-light); + --if-bd-color-disabled: var(--o-color-danger4-light); + + --if-bg-color: var(--o-color-danger1-light); + --if-bg-color-hover: var(--o-color-control-light); + --if-bg-color-disabled: var(--o-color-danger4-light); + } +} + +.o-if-small { + --if-height: var(--o-control_size-s); + --if-text-size: var(--o-font_size-tip1); + --if-text-height: var(--o-line_height-tip1); + --icon-size: var(--o-icon_size-xs); + + --if-padding: 0 7px; + --if-prepend-padding: 0 3px 0 4px; + --if-append-padding: 0 4px 0 3px; + --if-radius: var(--o-radius_control-s); + + --icon-c &.o-if-round-pill { + --if-padding: 0 9px; + --if-prepend-padding: 0 4px 0 8px; + --if-append-padding: 0 8px 0 4px; + } +} +.o-if-medium { + --if-height: var(--o-control_size-m); + --if-text-size: var(--o-font_size-text1); + --if-text-height: var(--o-line_height-text1); + --icon-size: var(--o-icon_size-s); + + --if-padding: 0 11px; + --if-radius: var(--o-radius_control-m); + + --if-prepend-padding: 0 7px 0 8px; + --if-append-padding: 0 8px 0 7px; + + &.o-if-round-pill { + --if-prepend-padding: 0 8px 0 11px; + --if-append-padding: 0 11px 0 8px; + } +} +.o-if-large { + --if-height: var(--o-control_size-l); + --if-text-size: var(--o-font_size-text2); + --if-text-height: var(--o-line_height-text2); + --icon-size: var(--o-icon_size-s); + + --if-padding: 0 15px; + --if-prepend-padding: 0 11px 0 12px; + --if-append-padding: 0 12px 0 11px; + --if-radius: var(--o-radius_control-l); + + &.o-if-round-pill { + --if-prepend-padding: 0 12px 0 15px; + --if-append-padding: 0 15px 0 12px; + } +} + +.o-if-round-pill { + --if-radius: var(--o-control_size-l); +} + +.o-if-text { + --if-bd-color: var(--o-color-control1); + --if-bd-color-disabled: var(--o-color-control4); + --if-radius: 0; + + &, + &.o-if-round-pill { + --if-prepend-padding: 0 8px 0 0; + --if-append-padding: 0 0 0 8px; + } +} diff --git a/packages/opendesign/src/_components/inner-frame/types.ts b/packages/opendesign/src/_components/inner-frame/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..b02ac04993eda126ae3b9ce59dfe1b528e92fff9 --- /dev/null +++ b/packages/opendesign/src/_components/inner-frame/types.ts @@ -0,0 +1,57 @@ +import { ExtractPropTypes, PropType } from 'vue'; +import type { SizeT, RoundT, VariantT, Color2T } from '../../_utils/types'; + +export const innerFrameProps = { + /** + * 大小 SizeT + */ + size: { + type: String as PropType, + }, + /** + * 圆角值 RoundT + */ + round: { + type: String as PropType, + }, + /** + * 颜色类型 Color2T + */ + color: { + type: String as PropType, + default: 'normal', + }, + /** + * 按钮类型 VariantT + */ + variant: { + type: String as PropType, + default: 'outline', + }, + /** + * 是否聚焦 + */ + focused: { + type: Boolean, + }, + /** + * 是否禁用 + */ + disabled: { + type: Boolean, + }, + /** + * 是否只读 + */ + readonly: { + type: Boolean, + }, + /** + * 关联 input + */ + for: { + type: String, + }, +}; + +export type InnerFrameProps = ExtractPropTypes; diff --git a/packages/opendesign/src/_components/inner-input/InnerInput.vue b/packages/opendesign/src/_components/inner-input/InnerInput.vue new file mode 100644 index 0000000000000000000000000000000000000000..ce53f38e2ee604cce8e71461aa2b04c111705d47 --- /dev/null +++ b/packages/opendesign/src/_components/inner-input/InnerInput.vue @@ -0,0 +1,247 @@ + + diff --git a/packages/opendesign/src/_components/inner-input/index.ts b/packages/opendesign/src/_components/inner-input/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..0b8a6340f19a67678cec79d165b5a9ec97426538 --- /dev/null +++ b/packages/opendesign/src/_components/inner-input/index.ts @@ -0,0 +1,3 @@ +import InnerInput from './InnerInput.vue'; + +export { InnerInput }; diff --git a/packages/opendesign/src/_components/inner-input/input.ts b/packages/opendesign/src/_components/inner-input/input.ts new file mode 100644 index 0000000000000000000000000000000000000000..20a9493fdc1758141c281892347ea450036f4cc3 --- /dev/null +++ b/packages/opendesign/src/_components/inner-input/input.ts @@ -0,0 +1,8 @@ +import { isNull, isUndefined } from '../../_utils/is'; + +export function toInputString(val: unknown): string { + if (isUndefined(val) || isNull(val) || (typeof val === 'number' && isNaN(val as number))) { + return ''; + } + return String(val); +} diff --git a/packages/opendesign/src/_components/inner-input/style/index.scss b/packages/opendesign/src/_components/inner-input/style/index.scss new file mode 100644 index 0000000000000000000000000000000000000000..70a7831a0ee917c5e0ca4917580867e4cf39b9e4 --- /dev/null +++ b/packages/opendesign/src/_components/inner-input/style/index.scss @@ -0,0 +1,112 @@ +@use '../../../_styles/mixin.scss' as *; +@use './var.scss'; +.o-i-input { + display: flex; + width: 100%; +} +.o-ii-input { + outline: none; + border: none; + color: inherit; + cursor: inherit; + background-color: transparent; + display: inline-flex; + padding: 0; + line-height: inherit; + height: 100%; + width: 100%; + font-size: inherit; + min-width: 20px; + + &::-webkit-input-placeholder { + color: var(--ii-placeholder-color); + } +} + +.o-ii-suffix { + display: flex; + flex-shrink: 0; + align-items: center; + position: relative; + margin-left: 4px; +} +.o-ii-prefix { + display: flex; + align-items: center; + margin-right: 4px; +} + +.o-ii-suffix-icon { + display: flex; + transition: all var(--o-duration-m1) var(--o-easing-standard-out); +} + +.o-ii-clear { + visibility: hidden; + flex-shrink: 0; + opacity: 0; + display: flex; + align-items: center; + justify-content: center; + color: var(--icon-color); + font-size: var(--icon-size); + @include hover { + &:hover { + color: var(--icon-color-hover); + transform: rotate(180deg); + } + .o-ii-suffix-icon + & { + position: absolute; + } + } +} +.o-ii-clearable { + @include hover { + &:hover { + .o-ii-suffix-icon { + visibility: hidden; + opacity: 0; + transition: none; + } + .o-ii-clear { + visibility: visible; + opacity: 1; + transition: all var(--o-duration-m1) var(--o-easing-standard-in); + } + } + } + @include hover(none) { + .o-ii-suffix-icon, + .o-ii-clear { + visibility: visible; + opacity: 1; + } + } +} +.o-ii-eye { + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + font-size: var(--icon-size); + color: var(--icon-color); + margin-left: 4px; + + @include hover { + &:hover { + color: var(--icon-color-hover); + } + } + + :first-child { + margin-left: 0; + } + .o-ii-disabled &, + .o-ii-readonly & { + color: var(--icon-color-disabled); + } +} + +.o-ii-password { + font-family: Arial, 'Helvetica Neue', Helvetica, system-ui, -apple-system, BlinkMacSystemFont, sans-serif; +} diff --git a/packages/opendesign/src/_components/inner-input/style/index.ts b/packages/opendesign/src/_components/inner-input/style/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..344262c5f18d6cd0c596ab87ee967be2975f582d --- /dev/null +++ b/packages/opendesign/src/_components/inner-input/style/index.ts @@ -0,0 +1,2 @@ +import '../../../_styles'; +import './index.scss'; diff --git a/packages/opendesign/src/_components/inner-input/style/var.scss b/packages/opendesign/src/_components/inner-input/style/var.scss new file mode 100644 index 0000000000000000000000000000000000000000..457e76bdc67e958991719c12f4524e1e3d87a4cf --- /dev/null +++ b/packages/opendesign/src/_components/inner-input/style/var.scss @@ -0,0 +1,3 @@ +.o-i-input { + --ii-placeholder-color: var(--o-color-info4); +} diff --git a/packages/opendesign/src/_components/inner-input/types.ts b/packages/opendesign/src/_components/inner-input/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b6e3374f0fe91e8c0fec815289c3defd371196c --- /dev/null +++ b/packages/opendesign/src/_components/inner-input/types.ts @@ -0,0 +1,90 @@ +import { ExtractPropTypes, PropType } from 'vue'; +import type { SizeT } from '../../_utils/types'; + +export const innerInputProps = { + /** + * 大小 SizeT + */ + size: { + type: String as PropType, + }, + /** + * 下拉框的值 + * v-model + */ + modelValue: { + type: [String, Number], + }, + /** + * 下拉框的默认值 + * 非受控 + */ + defaultValue: { + type: [String, Number], + }, + /** + * 是否是密码输入 + */ + type: { + type: String as PropType<'text' | 'password'>, + default: 'text', + }, + /** + * 提示文本 + */ + placeholder: { + type: String, + }, + /** + * input id, 用于label关联 + */ + inputId: { + type: String, + }, + /** + * 是否禁用 + */ + disabled: { + type: Boolean, + }, + /** + * 是否只读 + */ + readonly: { + type: Boolean, + }, + /** + * 是否非法 + */ + invalid: { + type: Boolean, + }, + /** + * 是否可以清除 + */ + clearable: { + type: Boolean, + }, + /** + * 解析输入框的值 + */ + parse: { + type: Function as PropType<(value: string) => string>, + }, + /** + * 对值格式化,控制显示格式 + * 需搭配parse处理,保证值的正确性 + */ + format: { + type: Function as PropType<(value: string | number) => string | number>, + }, + /** + * 显示密码的方式 + */ + showPasswordEvent: { + type: String as PropType<'click' | 'pointerdown'>, + default: 'pointerdown', + }, +}; + +export type InnerInputProps = ExtractPropTypes; diff --git a/packages/opendesign/src/_components/inner-panel/InnerPanel.vue b/packages/opendesign/src/_components/inner-panel/InnerPanel.vue new file mode 100644 index 0000000000000000000000000000000000000000..fd3bc5d8274b5558d6b5d08f51d60b9a5b1071b2 --- /dev/null +++ b/packages/opendesign/src/_components/inner-panel/InnerPanel.vue @@ -0,0 +1,79 @@ + + diff --git a/packages/opendesign/src/_components/inner-panel/index.ts b/packages/opendesign/src/_components/inner-panel/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..7cd048ab32b129e88b23713cf3f8a0b28e81db24 --- /dev/null +++ b/packages/opendesign/src/_components/inner-panel/index.ts @@ -0,0 +1,3 @@ +import InnerPanel from './InnerPanel.vue'; + +export { InnerPanel }; diff --git a/packages/opendesign/src/_components/inner-panel/style/index.scss b/packages/opendesign/src/_components/inner-panel/style/index.scss new file mode 100644 index 0000000000000000000000000000000000000000..1221e1274a5cb155dda3c5081d31615db76ce05e --- /dev/null +++ b/packages/opendesign/src/_components/inner-panel/style/index.scss @@ -0,0 +1,2 @@ +@use '../../../_styles/mixin.scss' as *; +@use './var.scss'; diff --git a/packages/opendesign/src/_components/inner-panel/style/index.ts b/packages/opendesign/src/_components/inner-panel/style/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..344262c5f18d6cd0c596ab87ee967be2975f582d --- /dev/null +++ b/packages/opendesign/src/_components/inner-panel/style/index.ts @@ -0,0 +1,2 @@ +import '../../../_styles'; +import './index.scss'; diff --git a/packages/opendesign/src/_components/inner-panel/style/var.scss b/packages/opendesign/src/_components/inner-panel/style/var.scss new file mode 100644 index 0000000000000000000000000000000000000000..3e96ce2ce56a2ec487d8fb798aa75125512c793a --- /dev/null +++ b/packages/opendesign/src/_components/inner-panel/style/var.scss @@ -0,0 +1,8 @@ +.o-i-panel { + --popup-bg-color: var(--o-color-fill2); + --popup-shadow: var(--o-shadow-1); + --popup-radius: var(--o-radius_control-m); + --popup-bd: none; + // --popup-min-width: 312px; + --popup-padding: 0; +} diff --git a/packages/opendesign/src/_components/inner-panel/types.ts b/packages/opendesign/src/_components/inner-panel/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..f6d752636fac72ae67a5f4939b8049c2d15b0224 --- /dev/null +++ b/packages/opendesign/src/_components/inner-panel/types.ts @@ -0,0 +1,19 @@ +import { ExtractPropTypes } from 'vue'; +import { popupProps } from '../../popup/types'; + +popupProps.trigger.default = 'click-outclick'; +popupProps.position.default = 'bl'; +popupProps.anchor.default = false; +popupProps.offset.default = 4; + +export const innerPanelProps = { + ...popupProps, + /** + * 下拉浮层是否响应式 + */ + noResponsive: { + type: Boolean, + }, +}; + +export type InnerPanelProps = ExtractPropTypes; diff --git a/packages/opendesign/src/components/style/animation.scss b/packages/opendesign/src/_styles/animation.scss similarity index 71% rename from packages/opendesign/src/components/style/animation.scss rename to packages/opendesign/src/_styles/animation.scss index 0553eef0d6b04ed48b6df583e317f04983d53ecc..aab2366e335331f3f1447e4a88303c510efb5aa9 100644 --- a/packages/opendesign/src/components/style/animation.scss +++ b/packages/opendesign/src/_styles/animation.scss @@ -9,12 +9,12 @@ } .o-rotating { - animation: o-rotating 2s var(--o-easing-linear) infinite; + animation: o-rotating var(--o-rotate-duration, 1s) var(--o-easing-linear) infinite; } @keyframes o-zoom-fade-in { 0% { - transform: scale(0.95); + transform: scale(var(--init-scale)); opacity: 0; } 100% { @@ -24,9 +24,20 @@ } .o-zoom-fade-enter-active { + --init-scale: 0.95; animation: o-zoom-fade-in var(--o-duration-m1) var(--o-easing-standard-in); } .o-zoom-fade-leave-active { + --init-scale: 0.95; + animation: o-zoom-fade-in var(--o-duration-s) var(--o-easing-standard-out) reverse; +} + +.o-zoom-fade2-enter-active { + --init-scale: 0.8; + animation: o-zoom-fade-in var(--o-duration-m1) var(--o-easing-standard-in); +} +.o-zoom-fade2-leave-active { + --init-scale: 0.8; animation: o-zoom-fade-in var(--o-duration-s) var(--o-easing-standard-out) reverse; } diff --git a/packages/opendesign/src/components/style/common.scss b/packages/opendesign/src/_styles/common.scss similarity index 52% rename from packages/opendesign/src/components/style/common.scss rename to packages/opendesign/src/_styles/common.scss index c27cd72d5db0ce67c1e4faaf99bb46eb3b92f798..51db64c5e0a0981f4a55b2e5c8b2dad1dc0f0e63 100644 --- a/packages/opendesign/src/components/style/common.scss +++ b/packages/opendesign/src/_styles/common.scss @@ -13,3 +13,22 @@ $text-types: display1, display2, display3, display4, display5, h1, h2, h3, h4, t display: none; } } + +.o-svg-icon { + --icon-g1: var(--o-color-info1); + --icon-g2: var(--o-color-primary1); + + display: inline-block; + width: 1em; + height: 1em; + vertical-align: -0.2em; + color: inherit; + font-style: normal; + outline: none; + &.type-stroke { + stroke: currentColor; + } + &.type-fill { + fill: currentColor; + } +} diff --git a/packages/opendesign/src/components/style/dark.token.css b/packages/opendesign/src/_styles/dark.token.css similarity index 60% rename from packages/opendesign/src/components/style/dark.token.css rename to packages/opendesign/src/_styles/dark.token.css index bd316f88415e5c0e448ef52f9b58868bc35a7ff6..ecdb86d0b53487edb4a3e7f6beac89596dd91ed3 100644 --- a/packages/opendesign/src/components/style/dark.token.css +++ b/packages/opendesign/src/_styles/dark.token.css @@ -17,724 +17,1046 @@ /** * @name * @type palette - * @group blue - * @description - */ - --o-blue-1: 0, 18, 85; - /** - * @name - * @type palette - * @group blue - * @description - */ - --o-blue-2: 0, 24, 106; - /** - * @name - * @type palette - * @group blue - * @description - */ - --o-blue-3: 0, 31, 126; - /** - * @name - * @type palette - * @group blue - * @description - */ - --o-blue-4: 0, 39, 147; - /** - * @name - * @type palette - * @group blue - * @description - */ - --o-blue-5: 0, 47, 167; - /** - * @name - * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-6: 37, 81, 185; + --o-deepblue-1: 0, 4, 77; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-7: 81, 119, 202; + --o-deepblue-2: 6, 15, 120; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-8: 132, 161, 220; + --o-deepblue-3: 20, 37, 163; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-9: 190, 206, 237; + --o-deepblue-4: 40, 65, 207; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-10: 227, 234, 246; + --o-deepblue-5: 66, 99, 250; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-1: 80, 47, 0; + --o-deepblue-6: 84, 120, 251; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-2: 120, 76, 0; + --o-deepblue-7: 122, 154, 252; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-3: 160, 109, 0; + --o-deepblue-8: 160, 186, 253; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-4: 200, 147, 0; + --o-deepblue-9: 199, 217, 254; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-5: 240, 188, 0; + --o-deepblue-10: 238, 244, 255; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-6: 243, 207, 49; + --o-green-1: 0, 77, 42; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-7: 246, 224, 98; + --o-green-2: 2, 102, 53; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-8: 249, 237, 149; + --o-green-3: 10, 127, 66; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-9: 252, 248, 202; + --o-green-4: 22, 152, 80; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-10: 254, 252, 233; + --o-green-5: 36, 177, 95; /** * @name * @type palette * @group green * @description */ - --o-green-1: 7, 60, 9; + --o-green-6: 51, 193, 104; /** * @name * @type palette * @group green * @description */ - --o-green-2: 11, 90, 13; + --o-green-7: 90, 208, 131; /** * @name * @type palette * @group green * @description */ - --o-green-3: 16, 119, 16; + --o-green-8: 135, 224, 163; /** * @name * @type palette * @group green * @description */ - --o-green-4: 22, 149, 21; + --o-green-9: 185, 239, 200; /** * @name * @type palette * @group green * @description */ - --o-green-5: 31, 179, 27; + --o-green-10: 240, 255, 244; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-6: 68, 194, 62; + --o-orange-1: 77, 24, 0; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-7: 109, 209, 103; + --o-orange-2: 120, 42, 1; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-8: 154, 225, 148; + --o-orange-3: 163, 68, 8; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-9: 203, 240, 199; + --o-orange-4: 207, 97, 19; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-10: 233, 247, 231; + --o-orange-5: 250, 130, 33; /** * @name * @type palette * @group orange * @description */ - --o-orange-1: 99, 25, 0; + --o-orange-6: 251, 143, 32; /** * @name * @type palette * @group orange * @description */ - --o-orange-2: 135, 41, 0; + --o-orange-7: 252, 174, 91; /** * @name * @type palette * @group orange * @description */ - --o-orange-3: 171, 60, 0; + --o-orange-8: 253, 202, 139; /** * @name * @type palette * @group orange * @description */ - --o-orange-4: 206, 83, 0; + --o-orange-9: 254, 227, 188; /** * @name * @type palette * @group orange * @description */ - --o-orange-5: 242, 110, 0; + --o-orange-10: 255, 248, 237; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-6: 245, 144, 49; + --o-red-1: 77, 0, 17; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-7: 247, 176, 99; + --o-red-2: 115, 3, 24; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-8: 250, 205, 150; + --o-red-3: 153, 9, 31; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-9: 252, 232, 202; + --o-red-4: 192, 17, 37; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-10: 254, 246, 233; + --o-red-5: 230, 28, 43; /** * @name * @type palette * @group red * @description */ - --o-red-1: 96, 0, 10; + --o-red-6: 235, 35, 45; /** * @name * @type palette * @group red * @description */ - --o-red-2: 132, 0, 10; + --o-red-7: 240, 82, 85; /** * @name * @type palette * @group red * @description */ - --o-red-3: 168, 0, 7; + --o-red-8: 245, 132, 130; /** * @name * @type palette * @group red * @description */ - --o-red-4: 203, 0, 2; + --o-red-9: 250, 183, 180; /** * @name * @type palette * @group red * @description */ - --o-red-5: 239, 6, 0; + --o-red-10: 255, 234, 232; /** * @name * @type palette - * @group red + * @group huaweired * @description */ - --o-red-6: 242, 60, 48; + --o-red-huawei: 199, 0, 11; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-7: 245, 112, 98; + --o-gray-1: 0, 0, 0; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-8: 249, 162, 149; + --o-gray-2: 20, 20, 20; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-9: 252, 209, 201; + --o-gray-3: 28, 28, 28; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-10: 253, 237, 233; + --o-gray-4: 39, 39, 39; /** * @name * @type palette * @group gray * @description */ - --o-gray-1: 0, 0, 0; + --o-gray-5: 47, 47, 47; /** * @name * @type palette * @group gray * @description */ - --o-gray-2: 36, 36, 36; + --o-gray-6: 57, 57, 57; /** * @name * @type palette * @group gray * @description */ - --o-gray-3: 57, 57, 57; + --o-gray-7: 67, 67, 67; /** * @name * @type palette * @group gray * @description */ - --o-gray-4: 94, 94, 94; + --o-gray-8: 88, 88, 88; /** * @name * @type palette * @group gray * @description */ - --o-gray-5: 119, 119, 122; + --o-gray-9: 122, 122, 122; /** * @name * @type palette * @group gray * @description */ - --o-gray-6: 166, 166, 166; + --o-gray-10: 159, 159, 159; /** * @name * @type palette * @group gray * @description */ - --o-gray-7: 221, 221, 221; + --o-gray-11: 185, 185, 185; /** * @name * @type palette * @group gray * @description */ - --o-gray-8: 238, 238, 238; + --o-gray-12: 210, 210, 210; /** * @name * @type palette * @group gray * @description */ - --o-gray-9: 243, 243, 243; + --o-gray-13: 238, 238, 238; /** * @name * @type palette * @group gray * @description */ - --o-gray-10: 255, 255, 255; + --o-gray-14: 255, 255, 255; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-1: 28, 30, 35; + --o-mixedgray-1: 0, 0, 0; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-2: 46, 48, 56; + --o-mixedgray-2: 16, 28, 20; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-3: 65, 68, 76; + --o-mixedgray-3: 23, 25, 28; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-4: 85, 89, 97; + --o-mixedgray-4: 33, 35, 39; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-5: 107, 110, 117; + --o-mixedgray-5: 40, 42, 47; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-6: 136, 139, 146; + --o-mixedgray-6: 50, 53, 57; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-7: 167, 170, 176; + --o-mixedgray-7: 61, 63, 67; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-8: 198, 200, 205; + --o-mixedgray-8: 80, 84, 88; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-9: 230, 231, 234; + --o-mixedgray-9: 113, 117, 122; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-10: 249, 249, 249; + --o-mixedgray-10: 147, 152, 159; /** * @name - * @type color - * @group info - * @description 一级/强调/标题 + * @type palette + * @group mixedgray + * @description */ - --o-color-info1: rgb(var(--o-gray-10)); + --o-mixedgray-11: 172, 177, 185; /** * @name - * @type color - * @group info - * @description 二级/次强调/正文 + * @type palette + * @group mixedgray + * @description */ - --o-color-info2: rgb(var(--o-gray-8)); + --o-mixedgray-12: 198, 202, 210; /** * @name - * @type color - * @group info - * @description 三级/辅助信息 + * @type palette + * @group mixedgray + * @description */ - --o-color-info3: rgb(var(--o-gray-6)); + --o-mixedgray-13: 231, 234, 238; /** * @name - * @type color - * @group info - * @description 置灰/禁用 + * @type palette + * @group mixedgray + * @description */ - --o-color-info4: rgb(var(--o-gray-4)); + --o-mixedgray-14: 255, 255, 255; /** * @name - * @type color - * @group info - * @description 一级/次强调/正文反色 + * @type palette + * @group yellow + * @description */ - --o-color-info1-inverse: rgb(var(--o-gray-1)); + --o-yellow-1: 77, 54, 0; /** * @name - * @type color - * @group info - * @description 二级/辅助信息反色 + * @type palette + * @group yellow + * @description */ - --o-color-info2-inverse: rgb(var(--o-gray-3)); + --o-yellow-2: 119, 87, 2; /** * @name - * @type color - * @group info - * @description 三级/辅助信息反色 + * @type palette + * @group yellow + * @description */ - --o-color-info3-inverse: rgb(var(--o-gray-5)); + --o-yellow-3: 161, 126, 11; /** * @name - * @type color - * @group info - * @description 置灰/禁用反色 + * @type palette + * @group yellow + * @description */ - --o-color-info4-inverse: rgb(var(--o-gray-7)); + --o-yellow-4: 203, 167, 24; /** * @name - * @type color - * @group mask - * @description 全局遮罩 + * @type palette + * @group yellow + * @description */ - --o-color-mask1: rgba(var(--o-gray-10), .2); + --o-yellow-5: 245, 211, 42; /** * @name - * @type color - * @group mask - * @description 局部遮罩 + * @type palette + * @group yellow + * @description */ - --o-color-mask2: rgba(var(--o-gray-10), .1); + --o-yellow-6: 247, 222, 54; /** * @name - * @type color - * @group fill - * @description 一级填充/页面背景 + * @type palette + * @group yellow + * @description */ - --o-color-fill1: rgb(var(--o-mixedgray-1)); + --o-yellow-7: 249, 234, 100; /** * @name - * @type color - * @group fill - * @description 二级填充/区块、卡片 + * @type palette + * @group yellow + * @description */ - --o-color-fill2: rgb(var(--o-gray-1)); + --o-yellow-8: 251, 244, 146; /** * @name - * @type color - * @group fill - * @description 三级填充/卡片 + * @type palette + * @group yellow + * @description */ - --o-color-fill3: rgb(var(--o-mixedgray-3)); + --o-yellow-9: 253, 251, 192; /** * @name - * @type color - * @group fill - * @description 四级填充/禁用 + * @type palette + * @group yellow + * @description */ - --o-color-fill4: rgb(var(--o-mixedgray-4)); + --o-yellow-10: 255, 255, 240; /** * @name - * @type color - * @group control - * @description 很浅背景 + * @type palette + * @group lime + * @description */ - --o-color-control-light: rgb(var(--o-gray-1)); + --o-lime-1: 41, 77, 0; /** * @name - * @type color - * @group control - * @description 常规,常用于边框 + * @type palette + * @group lime + * @description */ - --o-color-control1: rgb(var(--o-mixedgray-3)); + --o-lime-2: 63, 109, 3; /** * @name - * @type color - * @group control - * @description 悬浮 + * @type palette + * @group lime + * @description */ - --o-color-control2: rgb(var(--o-mixedgray-4)); + --o-lime-3: 91, 142, 14; /** * @name - * @type color - * @group control - * @description 激活 + * @type palette + * @group lime + * @description */ - --o-color-control3: rgb(var(--o-mixedgray-6)); + --o-lime-4: 121, 174, 30; /** * @name - * @type color - * @group control - * @description 禁用 + * @type palette + * @group lime + * @description */ - --o-color-control4: rgb(var(--o-mixedgray-5)); + --o-lime-5: 155, 207, 50; /** * @name - * @type color - * @group control - * @description 常规-浅,常用于背景 + * @type palette + * @group lime + * @description */ - --o-color-control1-light: rgb(var(--o-mixedgray-3)); + --o-lime-6: 172, 217, 68; /** * @name - * @type color - * @group control - * @description 悬浮-浅 + * @type palette + * @group lime + * @description */ - --o-color-control2-light: rgb(var(--o-mixedgray-4)); + --o-lime-7: 194, 226, 104; /** * @name - * @type color - * @group control - * @description 激活-浅 + * @type palette + * @group lime + * @description */ - --o-color-control3-light: rgb(var(--o-mixedgray-5)); + --o-lime-8: 214, 236, 144; /** * @name - * @type color - * @group control - * @description 禁用-浅 + * @type palette + * @group lime + * @description */ - --o-color-control4-light: rgb(var(--o-mixedgray-2)); + --o-lime-9: 233, 245, 186; /** * @name - * @type color - * @group primary - * @description 常规 + * @type palette + * @group lime + * @description */ - --o-color-primary1: rgb(var(--o-blue-6)); + --o-lime-10: 251, 255, 232; /** * @name - * @type color - * @group primary - * @description 悬浮 + * @type palette + * @group cyan + * @description */ - --o-color-primary2: rgb(var(--o-blue-5)); + --o-cyan-1: 0, 73, 77; /** * @name - * @type color - * @group primary - * @description 激活 + * @type palette + * @group cyan + * @description */ - --o-color-primary3: rgb(var(--o-blue-7)); + --o-cyan-2: 2, 101, 103; /** * @name - * @type color - * @group primary - * @description 禁用 + * @type palette + * @group cyan + * @description */ - --o-color-primary4: rgb(var(--o-blue-3)); + --o-cyan-3: 9, 129, 127; /** * @name - * @type color - * @group primary - * @description 浅/常规 + * @type palette + * @group cyan + * @description */ - --o-color-primary1-light: rgb(var(--o-blue-2)); + --o-cyan-4: 18, 155, 148; /** * @name - * @type color - * @group primary - * @description 浅/悬浮 + * @type palette + * @group cyan + * @description */ - --o-color-primary2-light: rgb(var(--o-blue-3)); + --o-cyan-5: 30, 181, 167; /** * @name - * @type color - * @group primary - * @description 浅/激活 + * @type palette + * @group cyan + * @description */ - --o-color-primary3-light: rgb(var(--o-blue-4)); + --o-cyan-6: 42, 196, 178; /** * @name - * @type color - * @group primary - * @description 浅/禁用 + * @type palette + * @group cyan + * @description */ - --o-color-primary4-light: rgb(var(--o-blue-1)); + --o-cyan-7: 84, 211, 192; /** * @name - * @type color - * @group success - * @description 常规 + * @type palette + * @group cyan + * @description */ - --o-color-success1: rgb(var(--o-green-6)); + --o-cyan-8: 130, 255, 208; /** * @name - * @type color - * @group success - * @description 悬浮 + * @type palette + * @group cyan + * @description */ - --o-color-success2: rgb(var(--o-green-5)); + --o-cyan-9: 182, 240, 227; + /** + * @name + * @type palette + * @group cyan + * @description + */ + --o-cyan-10: 239, 255, 251; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-1: 0, 34, 77; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-2: 1, 57, 117; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-3: 8, 86, 158; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-4: 18, 118, 199; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-5: 31, 153, 240; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-6: 42, 166, 243; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-7: 89, 191, 246; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-8: 137, 214, 249; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-9: 187, 233, 252; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-10: 237, 250, 255; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-1: 22, 0, 77; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-2: 40, 3, 118; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-3: 66, 15, 160; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-4: 98, 33, 202; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-5: 134, 57, 244; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-6: 152, 74, 246; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-7: 179, 114, 248; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-8: 205, 156, 251; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-9: 228, 198, 253; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-10: 249, 240, 255; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-1: 61, 0, 77; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-2: 93, 5, 110; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-3: 127, 16, 144; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-4: 164, 33, 178; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-5: 200, 54, 212; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-6: 216, 72, 221; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-7: 229, 109, 229; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-8: 238, 149, 235; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-9: 246, 191, 243; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-10: 255, 236, 253; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-1: 77, 0, 48; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-2: 114, 3, 70; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-3: 151, 12, 91; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-4: 189, 25, 112; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-5: 226, 41, 133; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-6: 232, 53, 137; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-7: 238, 97, 158; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-8: 243, 143, 183; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-9: 249, 192, 213; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-10: 255, 242, 247; + /** + * @name + * @type color + * @group primary + * @description 常规 + */ + --o-color-primary1: rgb(var(--o-deepblue-6)); + /** + * @name + * @type color + * @group primary + * @description 悬浮 + */ + --o-color-primary2: rgb(var(--o-deepblue-5)); + /** + * @name + * @type color + * @group primary + * @description 激活 + */ + --o-color-primary3: rgb(var(--o-deepblue-7)); + /** + * @name + * @type color + * @group primary + * @description 禁用 + */ + --o-color-primary4: rgb(var(--o-deepblue-3)); + /** + * @name + * @type color + * @group primary + * @description 浅/常规 + */ + --o-color-primary1-light: rgb(var(--o-deepblue-2)); + /** + * @name + * @type color + * @group primary + * @description 浅/悬浮 + */ + --o-color-primary2-light: rgb(var(--o-deepblue-3)); + /** + * @name + * @type color + * @group primary + * @description 浅/激活 + */ + --o-color-primary3-light: rgb(var(--o-deepblue-4)); + /** + * @name + * @type color + * @group primary + * @description 浅/禁用 + */ + --o-color-primary4-light: rgb(var(--o-deepblue-1)); + /** + * @name + * @type color + * @group success + * @description 常规 + */ + --o-color-success1: rgb(var(--o-green-6)); + /** + * @name + * @type color + * @group success + * @description 悬浮 + */ + --o-color-success2: rgb(var(--o-green-4)); /** * @name * @type color @@ -753,28 +1075,28 @@ * @name * @type color * @group success - * @description 浅/常规 + * @description 常规-浅 */ --o-color-success1-light: rgb(var(--o-green-2)); /** * @name * @type color * @group success - * @description 浅/悬浮 + * @description 悬浮-浅 */ --o-color-success2-light: rgb(var(--o-green-3)); /** * @name * @type color * @group success - * @description 浅/激活 + * @description 激活-浅 */ --o-color-success3-light: rgb(var(--o-green-4)); /** * @name * @type color * @group success - * @description 浅/禁用 + * @description 禁用-浅 */ --o-color-success4-light: rgb(var(--o-green-1)); /** @@ -790,7 +1112,7 @@ * @group warning * @description 悬浮 */ - --o-color-warning2: rgb(var(--o-orange-5)); + --o-color-warning2: rgb(var(--o-orange-4)); /** * @name * @type color @@ -809,28 +1131,28 @@ * @name * @type color * @group warning - * @description 浅/常规 + * @description 常规-浅 */ --o-color-warning1-light: rgb(var(--o-orange-2)); /** * @name * @type color * @group warning - * @description 浅/悬浮 + * @description 悬浮-浅 */ --o-color-warning2-light: rgb(var(--o-orange-3)); /** * @name * @type color * @group warning - * @description 浅/激活 + * @description 激活-浅 */ --o-color-warning3-light: rgb(var(--o-orange-4)); /** * @name * @type color * @group warning - * @description 浅/禁用 + * @description 禁用-浅 */ --o-color-warning4-light: rgb(var(--o-orange-1)); /** @@ -846,7 +1168,7 @@ * @group danger * @description 悬浮 */ - --o-color-danger2: rgb(var(--o-red-5)); + --o-color-danger2: rgb(var(--o-red-4)); /** * @name * @type color @@ -865,51 +1187,233 @@ * @name * @type color * @group danger - * @description 浅/常规 + * @description 常规-浅 */ --o-color-danger1-light: rgb(var(--o-red-2)); /** * @name * @type color * @group danger - * @description 浅/悬浮 + * @description 悬浮-浅 */ --o-color-danger2-light: rgb(var(--o-red-3)); /** * @name * @type color * @group danger - * @description 浅/激活 + * @description 激活-浅 */ --o-color-danger3-light: rgb(var(--o-red-4)); /** * @name * @type color * @group danger - * @description 浅/禁用 + * @description 禁用-浅 */ --o-color-danger4-light: rgb(var(--o-red-1)); + /** + * @name + * @type color + * @group fill + * @description 一级填充:页面背景 + */ + --o-color-fill1: rgb(var(--o-mixedgray-3)); + /** + * @name + * @type color + * @group fill + * @description 二级填充:区块/卡片 + */ + --o-color-fill2: rgb(var(--o-mixedgray-4)); + /** + * @name + * @type color + * @group fill + * @description 三级填充:卡片 + */ + --o-color-fill3: rgb(var(--o-mixedgray-5)); + /** + * @name + * @type color + * @group control + * @description 常规,常用于边框 + */ + --o-color-control1: rgba(var(--o-mixedgray-14), 0.25); + /** + * @name + * @type color + * @group control + * @description 悬浮,常用于边框 + */ + --o-color-control2: rgba(var(--o-mixedgray-14), 0.6); + /** + * @name + * @type color + * @group control + * @description 激活,常用于边框 + */ + --o-color-control3: rgba(var(--o-mixedgray-14), 0.8); + /** + * @name + * @type color + * @group control + * @description 禁用,常用于边框 + */ + --o-color-control4: rgba(var(--o-mixedgray-14), 0.15); + /** + * @name + * @type color + * @group control + * @description 常规-浅,常用于背景 + */ + --o-color-control1-light: rgb(var(--o-mixedgray-7)); + /** + * @name + * @type color + * @group control + * @description 悬浮-浅,常用于背景 + */ + --o-color-control2-light: rgb(var(--o-mixedgray-5)); + /** + * @name + * @type color + * @group control + * @description 激活-浅,常用于背景 + */ + --o-color-control3-light: rgb(var(--o-mixedgray-6)); + /** + * @name + * @type color + * @group control + * @description 禁用-浅,常用于背景 + */ + --o-color-control4-light: rgb(var(--o-mixedgray-5)); + /** + * @name + * @type color + * @group control + * @description 很浅,常用于表格背景色 + */ + --o-color-control-light: rgb(var(--o-mixedgray-4)); + /** + * @name + * @type color + * @group info + * @description 一级/强调/标题 + */ + --o-color-info1: rgba(var(--o-mixedgray-14), 1.0); + /** + * @name + * @type color + * @group info + * @description 二级/次强调/正文 + */ + --o-color-info2: rgba(var(--o-mixedgray-14), 0.8); + /** + * @name + * @type color + * @group info + * @description 三级/辅助信息 + */ + --o-color-info3: rgba(var(--o-mixedgray-14), 0.6); + /** + * @name + * @type color + * @group info + * @description 置灰/禁用 + */ + --o-color-info4: rgba(var(--o-mixedgray-14), 0.4); + /** + * @name + * @type color + * @group info + * @description 一级/次强调/正文反色 + */ + --o-color-info1-inverse: rgba(var(--o-mixedgray-1), 1.0); + /** + * @name + * @type color + * @group info + * @description 二级/辅助信息反色 + */ + --o-color-info2-inverse: rgba(var(--o-mixedgray-1), 0.8); + /** + * @name + * @type color + * @group info + * @description 三级/辅助信息反色 + */ + --o-color-info3-inverse: rgba(var(--o-mixedgray-1), 0.6); + /** + * @name + * @type color + * @group info + * @description 置灰/禁用反色 + */ + --o-color-info4-inverse: rgba(var(--o-mixedgray-1), 0.4); + /** + * @name + * @type color + * @group mask + * @description 全局遮罩 + */ + --o-color-mask1: rgba(var(--o-mixedgray-1), 0.4); + /** + * @name + * @type color + * @group mask + * @description 局部遮罩 + */ + --o-color-mask2: rgba(var(--o-mixedgray-4), 0.2); + /** + * @name + * @type color + * @group link + * @description 常规 + */ + --o-color-link1: rgba(var(--o-deepblue-6), 1.0); + /** + * @name + * @type color + * @group link + * @description 悬浮 + */ + --o-color-link2: rgba(var(--o-deepblue-6), 0.7); + /** + * @name + * @type color + * @group link + * @description 激活 + */ + --o-color-link3: rgba(var(--o-deepblue-6), 0.9); + /** + * @name + * @type color + * @group link + * @description 禁用 + */ + --o-color-link4: rgba(var(--o-deepblue-6), 0.4); /** * @name 阴影1 * @type shadow * @group shadow * @description 用于卡片、小弹窗、楼层阴影 */ - --o-shadow-1: 0 1px 7px rgba(var(--o-gray-10), 0.3); + --o-shadow-1: 0 3px 8px rgba(var(--o-mixedgray-13), 0.08); /** * @name 阴影2 * @type shadow * @group shadow * @description 用于卡片悬浮阴影 */ - --o-shadow-2: 0 6px 18px rgba(var(--o-gray-10), 0.42); + --o-shadow-2: 0 6px 24px rgba(var(--o-mixedgray-13), 0.08); /** * @name 阴影3 * @type shadow * @group shadow * @description 用于提示阴影 */ - --o-shadow-3: 0 10px 32px rgba(var(--o-gray-10), 0.54); + --o-shadow-3: 0 10px 40px rgba(var(--o-mixedgray-13), 0.08); /** * @name 间距1 * @type gap @@ -969,52 +1473,52 @@ /** * @name 小尺寸 * @type size - * @group size + * @group control_size * @description 小尺寸 */ - --o-size-xxs: 12px; + --o-control_size-2xs: 12px; /** * @name 小尺寸 * @type size - * @group size + * @group control_size * @description 小尺寸 */ - --o-size-xs: 18px; + --o-control_size-xs: 18px; /** * @name 小尺寸 * @type size - * @group size + * @group control_size * @description 小尺寸 */ - --o-size-s: 24px; + --o-control_size-s: 24px; /** * @name 中尺寸 * @type size - * @group size + * @group control_size * @description 尺寸 */ - --o-size-m: 32px; + --o-control_size-m: 32px; /** * @name 大尺寸 * @type size - * @group size + * @group control_size * @description 尺寸 */ - --o-size-l: 40px; + --o-control_size-l: 40px; /** * @name 大尺寸 * @type size - * @group size + * @group control_size * @description 尺寸 */ - --o-size-xl: 48px; + --o-control_size-xl: 48px; /** * @name 超小尺寸图标 * @type size * @group icon_size * @description 小尺寸 */ - --o-icon_size-xxs: 12px; + --o-icon_size-2xs: 12px; /** * @name 超小尺寸图标 * @type size @@ -1224,21 +1728,21 @@ * @group radius * @description 小尺寸控件圆角 */ - --o-radius-control-s: var(--o-radius-s); + --o-radius_control-s: var(--o-radius-s); /** * @name 中尺寸控件圆角 * @type size * @group radius * @description 中尺寸控件圆角 */ - --o-radius-control-m: var(--o-radius-m); + --o-radius_control-m: var(--o-radius-m); /** * @name 大尺寸控件圆角 * @type size * @group radius * @description 大尺寸控件圆角 */ - --o-radius-control-l: var(--o-radius-l); + --o-radius_control-l: var(--o-radius-l); /** * @name 持续时间 * @type animation diff --git a/packages/opendesign/src/components/style/index.scss b/packages/opendesign/src/_styles/index.scss similarity index 88% rename from packages/opendesign/src/components/style/index.scss rename to packages/opendesign/src/_styles/index.scss index 724464332cd0bfbd5954da2ae4ba6bed0c43c2ff..6a26f4d35c4f0e47c3c6fe463d1ff977e000cb36 100644 --- a/packages/opendesign/src/components/style/index.scss +++ b/packages/opendesign/src/_styles/index.scss @@ -1,6 +1,5 @@ @use './animation.scss'; @use './common.scss'; -@use './icon.scss'; [class^='o-'] { box-sizing: border-box; diff --git a/packages/opendesign/src/components/style/index.ts b/packages/opendesign/src/_styles/index.ts similarity index 100% rename from packages/opendesign/src/components/style/index.ts rename to packages/opendesign/src/_styles/index.ts diff --git a/packages/opendesign/src/components/style/default-light.token.css b/packages/opendesign/src/_styles/light.token.css similarity index 60% rename from packages/opendesign/src/components/style/default-light.token.css rename to packages/opendesign/src/_styles/light.token.css index 03a32ef4c83e404ca604dc7682f9d7a713f07f6b..22ff7d2df5ba125fc2815827a22fc80dd07b52d8 100644 --- a/packages/opendesign/src/components/style/default-light.token.css +++ b/packages/opendesign/src/_styles/light.token.css @@ -1,5 +1,4 @@ -/* theme: default|light */ -:root, +/* theme: light */ [data-o-theme="light"] { /** * @name @@ -18,724 +17,1046 @@ /** * @name * @type palette - * @group blue - * @description - */ - --o-blue-1: 227, 234, 246; - /** - * @name - * @type palette - * @group blue - * @description - */ - --o-blue-2: 190, 206, 237; - /** - * @name - * @type palette - * @group blue - * @description - */ - --o-blue-3: 132, 161, 220; - /** - * @name - * @type palette - * @group blue - * @description - */ - --o-blue-4: 81, 119, 202; - /** - * @name - * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-5: 37, 81, 185; + --o-deepblue-1: 232, 240, 255; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-6: 0, 47, 167; + --o-deepblue-2: 194, 213, 254; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-7: 0, 39, 147; + --o-deepblue-3: 157, 184, 253; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-8: 0, 31, 126; + --o-deepblue-4: 120, 153, 252; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-9: 0, 24, 106; + --o-deepblue-5: 83, 119, 251; /** * @name * @type palette - * @group blue + * @group deepblue * @description */ - --o-blue-10: 0, 18, 85; + --o-deepblue-6: 46, 83, 250; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-1: 254, 252, 233; + --o-deepblue-7: 29, 55, 207; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-2: 252, 248, 202; + --o-deepblue-8: 15, 32, 163; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-3: 249, 237, 149; + --o-deepblue-9: 6, 15, 120; /** * @name * @type palette - * @group yellow + * @group deepblue * @description */ - --o-yellow-4: 246, 224, 98; + --o-deepblue-10: 0, 4, 47; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-5: 243, 207, 49; + --o-green-1: 232, 255, 238; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-6: 240, 188, 0; + --o-green-2: 177, 239, 195; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-7: 200, 147, 0; + --o-green-3: 128, 224, 158; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-8: 160, 109, 0; + --o-green-4: 84, 208, 127; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-9: 120, 76, 0; + --o-green-5: 45, 193, 101; /** * @name * @type palette - * @group yellow + * @group green * @description */ - --o-yellow-10: 80, 47, 0; + --o-green-6: 11, 177, 81; /** * @name * @type palette * @group green * @description */ - --o-green-1: 233, 247, 231; + --o-green-7: 7, 152, 72; /** * @name * @type palette * @group green * @description */ - --o-green-2: 203, 240, 199; + --o-green-8: 4, 127, 63; /** * @name * @type palette * @group green * @description */ - --o-green-3: 154, 225, 148; + --o-green-9: 2, 102, 53; /** * @name * @type palette * @group green * @description */ - --o-green-4: 109, 209, 103; + --o-green-10: 0, 77, 42; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-5: 68, 194, 62; + --o-orange-1: 255, 246, 232; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-6: 31, 179, 27; + --o-orange-2: 254, 226, 186; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-7: 22, 149, 21; + --o-orange-3: 253, 202, 140; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-8: 16, 119, 16; + --o-orange-4: 252, 176, 95; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-9: 11, 90, 13; + --o-orange-5: 251, 147, 50; /** * @name * @type palette - * @group green + * @group orange * @description */ - --o-green-10: 7, 60, 9; + --o-orange-6: 250, 115, 5; /** * @name * @type palette * @group orange * @description */ - --o-orange-1: 254, 246, 233; + --o-orange-7: 207, 88, 3; /** * @name * @type palette * @group orange * @description */ - --o-orange-2: 252, 232, 202; + --o-orange-8: 163, 64, 2; /** * @name * @type palette * @group orange * @description */ - --o-orange-3: 250, 205, 150; + --o-orange-9: 120, 42, 1; /** * @name * @type palette * @group orange * @description */ - --o-orange-4: 247, 176, 99; + --o-orange-10: 77, 24, 0; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-5: 245, 144, 49; + --o-red-1: 255, 234, 232; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-6: 242, 110, 0; + --o-red-2: 250, 185, 182; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-7: 206, 83, 0; + --o-red-3: 245, 136, 134; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-8: 171, 60, 0; + --o-red-4: 240, 87, 90; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-9: 135, 41, 0; + --o-red-5: 235, 43, 52; /** * @name * @type palette - * @group orange + * @group red * @description */ - --o-orange-10: 99, 25, 0; + --o-red-6: 230, 0, 18; /** * @name * @type palette * @group red * @description */ - --o-red-1: 253, 237, 233; + --o-red-7: 192, 0, 22; /** * @name * @type palette * @group red * @description */ - --o-red-2: 252, 209, 201; + --o-red-8: 153, 0, 23; /** * @name * @type palette * @group red * @description */ - --o-red-3: 249, 162, 149; + --o-red-9: 115, 0, 21; /** * @name * @type palette * @group red * @description */ - --o-red-4: 245, 112, 98; + --o-red-10: 77, 0, 17; /** * @name * @type palette - * @group red + * @group huaweired * @description */ - --o-red-5: 242, 60, 48; + --o-red-huawei: 199, 0, 11; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-6: 239, 6, 0; + --o-gray-1: 255, 255, 255; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-7: 203, 0, 2; + --o-gray-2: 247, 247, 247; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-8: 168, 0, 7; + --o-gray-3: 242, 242, 242; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-9: 132, 0, 10; + --o-gray-4: 237, 237, 237; /** * @name * @type palette - * @group red + * @group gray * @description */ - --o-red-10: 96, 0, 10; + --o-gray-5: 227, 227, 227; /** * @name * @type palette * @group gray * @description */ - --o-gray-1: 255, 255, 255; + --o-gray-6: 214, 214, 214; /** * @name * @type palette * @group gray * @description */ - --o-gray-2: 238, 238, 238; + --o-gray-7: 186, 186, 186; /** * @name * @type palette * @group gray * @description */ - --o-gray-3: 221, 221, 221; + --o-gray-8: 148, 148, 148; /** * @name * @type palette * @group gray * @description */ - --o-gray-4: 198, 198, 198; + --o-gray-9: 110, 110, 110; /** * @name * @type palette * @group gray * @description */ - --o-gray-5: 139, 139, 139; + --o-gray-10: 79, 79, 79; /** * @name * @type palette * @group gray * @description */ - --o-gray-6: 119, 119, 119; + --o-gray-11: 48, 48, 48; /** * @name * @type palette * @group gray * @description */ - --o-gray-7: 94, 94, 94; + --o-gray-12: 36, 36, 36; /** * @name * @type palette * @group gray * @description */ - --o-gray-8: 75, 75, 75; + --o-gray-13: 18, 18, 18; /** * @name * @type palette * @group gray * @description */ - --o-gray-9: 44, 44, 44; + --o-gray-14: 0, 0, 0; /** * @name * @type palette - * @group gray + * @group mixedgray * @description */ - --o-gray-10: 0, 0, 0; + --o-mixedgray-1: 255, 255, 255; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-1: 249, 249, 249; + --o-mixedgray-2: 244, 245, 247; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-2: 230, 231, 234; + --o-mixedgray-3: 237, 239, 242; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-3: 198, 200, 205; + --o-mixedgray-4: 232, 234, 237; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-4: 167, 170, 176; + --o-mixedgray-5: 224, 226, 230; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-5: 136, 139, 146; + --o-mixedgray-6: 209, 214, 219; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-6: 107, 110, 117; + --o-mixedgray-7: 179, 185, 191; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-7: 85, 89, 97; + --o-mixedgray-8: 144, 150, 158; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-8: 65, 68, 76; + --o-mixedgray-9: 104, 109, 117; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-9: 46, 48, 56; + --o-mixedgray-10: 79, 84, 92; /** * @name * @type palette * @group mixedgray * @description */ - --o-mixedgray-10: 28, 30, 35; + --o-mixedgray-11: 55, 59, 66; /** * @name - * @type color - * @group info - * @description 一级/强调/标题 + * @type palette + * @group mixedgray + * @description */ - --o-color-info1: rgb(var(--o-gray-10)); + --o-mixedgray-12: 32, 35, 41; /** * @name - * @type color - * @group info - * @description 二级/次强调/正文 + * @type palette + * @group mixedgray + * @description */ - --o-color-info2: rgb(var(--o-gray-8)); + --o-mixedgray-13: 18, 20, 23; /** * @name - * @type color - * @group info - * @description 三级/辅助信息 + * @type palette + * @group mixedgray + * @description */ - --o-color-info3: rgb(var(--o-gray-6)); + --o-mixedgray-14: 0, 0, 0; /** * @name - * @type color - * @group info - * @description 置灰/禁用 + * @type palette + * @group yellow + * @description */ - --o-color-info4: rgb(var(--o-gray-4)); + --o-yellow-1: 255, 255, 232; /** * @name - * @type color - * @group info - * @description 一级/次强调/正文反色 + * @type palette + * @group yellow + * @description */ - --o-color-info1-inverse: rgb(var(--o-gray-1)); + --o-yellow-2: 253, 251, 185; /** * @name - * @type color - * @group info - * @description 二级/辅助信息反色 + * @type palette + * @group yellow + * @description */ - --o-color-info2-inverse: rgb(var(--o-gray-3)); + --o-yellow-3: 251, 244, 139; /** * @name - * @type color - * @group info - * @description 三级/辅助信息反色 + * @type palette + * @group yellow + * @description */ - --o-color-info3-inverse: rgb(var(--o-gray-5)); + --o-yellow-4: 249, 233, 94; /** * @name - * @type color - * @group info - * @description 置灰/禁用反色 + * @type palette + * @group yellow + * @description */ - --o-color-info4-inverse: rgb(var(--o-gray-7)); + --o-yellow-5: 247, 221, 49; /** * @name - * @type color - * @group mask - * @description 全局遮罩 + * @type palette + * @group yellow + * @description */ - --o-color-mask1: rgba(var(--o-gray-10), .2); + --o-yellow-6: 245, 205, 5; /** * @name - * @type color - * @group mask - * @description 局部遮罩 + * @type palette + * @group yellow + * @description */ - --o-color-mask2: rgba(var(--o-gray-10), .1); + --o-yellow-7: 203, 163, 3; /** * @name - * @type color - * @group fill - * @description 一级填充/页面背景 + * @type palette + * @group yellow + * @description */ - --o-color-fill1: rgb(var(--o-mixedgray-1)); + --o-yellow-8: 161, 124, 2; /** * @name - * @type color - * @group fill - * @description 二级填充/区块、卡片 + * @type palette + * @group yellow + * @description */ - --o-color-fill2: rgb(var(--o-gray-1)); + --o-yellow-9: 119, 87, 1; /** * @name - * @type color - * @group fill - * @description 三级填充/卡片 + * @type palette + * @group yellow + * @description */ - --o-color-fill3: rgb(var(--o-mixedgray-3)); + --o-yellow-10: 77, 54, 0; /** * @name - * @type color - * @group fill - * @description 四级填充/禁用 + * @type palette + * @group lime + * @description */ - --o-color-fill4: rgb(var(--o-mixedgray-4)); + --o-lime-1: 251, 255, 232; /** * @name - * @type color - * @group control - * @description 很浅背景 + * @type palette + * @group lime + * @description */ - --o-color-control-light: rgb(var(--o-gray-1)); + --o-lime-2: 233, 245, 184; /** * @name - * @type color - * @group control - * @description 常规,常用于边框 + * @type palette + * @group lime + * @description */ - --o-color-control1: rgb(var(--o-mixedgray-3)); + --o-lime-3: 213, 236, 139; /** * @name - * @type color - * @group control - * @description 悬浮 + * @type palette + * @group lime + * @description */ - --o-color-control2: rgb(var(--o-mixedgray-4)); + --o-lime-4: 192, 226, 97; /** * @name - * @type color - * @group control - * @description 激活 + * @type palette + * @group lime + * @description */ - --o-color-control3: rgb(var(--o-mixedgray-6)); + --o-lime-5: 169, 217, 59; /** * @name - * @type color - * @group control - * @description 禁用 + * @type palette + * @group lime + * @description */ - --o-color-control4: rgb(var(--o-mixedgray-5)); + --o-lime-6: 146, 207, 23; /** * @name - * @type color - * @group control - * @description 常规-浅,常用于背景 + * @type palette + * @group lime + * @description */ - --o-color-control1-light: rgb(var(--o-mixedgray-3)); + --o-lime-7: 116, 174, 15; /** * @name - * @type color - * @group control - * @description 悬浮-浅 + * @type palette + * @group lime + * @description */ - --o-color-control2-light: rgb(var(--o-mixedgray-4)); + --o-lime-8: 88, 142, 8; /** * @name - * @type color - * @group control - * @description 激活-浅 + * @type palette + * @group lime + * @description */ - --o-color-control3-light: rgb(var(--o-mixedgray-5)); + --o-lime-9: 63, 109, 3; /** * @name - * @type color - * @group control - * @description 禁用-浅 + * @type palette + * @group lime + * @description */ - --o-color-control4-light: rgb(var(--o-mixedgray-2)); + --o-lime-10: 41, 77, 0; /** * @name - * @type color - * @group primary - * @description 常规 + * @type palette + * @group cyan + * @description */ - --o-color-primary1: rgb(var(--o-blue-6)); + --o-cyan-1: 232, 255, 249; /** * @name - * @type color - * @group primary - * @description 悬浮 + * @type palette + * @group cyan + * @description */ - --o-color-primary2: rgb(var(--o-blue-5)); + --o-cyan-2: 176, 240, 226; /** * @name - * @type color - * @group primary - * @description 激活 + * @type palette + * @group cyan + * @description */ - --o-color-primary3: rgb(var(--o-blue-7)); + --o-cyan-3: 125, 225, 207; /** * @name - * @type color - * @group primary - * @description 禁用 + * @type palette + * @group cyan + * @description */ - --o-color-primary4: rgb(var(--o-blue-3)); + --o-cyan-4: 79, 221, 191; /** * @name - * @type color - * @group primary - * @description 浅/常规 + * @type palette + * @group cyan + * @description */ - --o-color-primary1-light: rgb(var(--o-blue-2)); + --o-cyan-5: 38, 196, 177; /** * @name - * @type color - * @group primary - * @description 浅/悬浮 + * @type palette + * @group cyan + * @description */ - --o-color-primary2-light: rgb(var(--o-blue-3)); + --o-cyan-6: 3, 181, 165; /** * @name - * @type color - * @group primary - * @description 浅/激活 + * @type palette + * @group cyan + * @description */ - --o-color-primary3-light: rgb(var(--o-blue-4)); + --o-cyan-7: 2, 155, 147; /** * @name - * @type color - * @group primary - * @description 浅/禁用 + * @type palette + * @group cyan + * @description */ - --o-color-primary4-light: rgb(var(--o-blue-1)); + --o-cyan-8: 1, 129, 127; /** * @name - * @type color - * @group success - * @description 常规 + * @type palette + * @group cyan + * @description */ - --o-color-success1: rgb(var(--o-green-6)); + --o-cyan-9: 0, 101, 103; /** * @name - * @type color + * @type palette + * @group cyan + * @description + */ + --o-cyan-10: 0, 73, 77; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-1: 232, 249, 255; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-2: 185, 233, 252; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-3: 138, 214, 249; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-4: 93, 192, 246; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-5: 48, 168, 243; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-6: 5, 142, 240; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-7: 3, 111, 199; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-8: 2, 83, 158; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-9: 1, 57, 117; + /** + * @name + * @type palette + * @group blue + * @description + */ + --o-blue-10: 0, 34, 77; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-1: 245, 232, 255; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-2: 225, 192, 253; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-3: 203, 152, 251; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-4: 178, 113, 248; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-5: 152, 75, 246; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-6: 123, 37, 244; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-7: 92, 23, 202; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-8: 64, 12, 160; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-9: 41, 4, 118; + /** + * @name + * @type palette + * @group purple + * @description + */ + --o-purple-10: 22, 0, 77; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-1: 255, 232, 253; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-2: 246, 188, 243; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-3: 238, 146, 235; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-4: 229, 107, 229; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-5: 216, 71, 221; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-6: 199, 37, 212; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-7: 163, 23, 178; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-8: 127, 13, 144; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-9: 93, 5, 110; + /** + * @name + * @type palette + * @group pink + * @description + */ + --o-pink-10: 61, 0, 77; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-1: 255, 232, 240; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-2: 249, 185, 209; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-3: 243, 141, 182; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-4: 238, 98, 158; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-5: 232, 57, 139; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-6: 226, 18, 122; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-7: 189, 11, 106; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-8: 151, 6, 88; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-9: 114, 2, 69; + /** + * @name + * @type palette + * @group rosyred + * @description + */ + --o-rosyred-10: 77, 0, 48; + /** + * @name + * @type color + * @group primary + * @description 常规 + */ + --o-color-primary1: rgb(var(--o-deepblue-6)); + /** + * @name + * @type color + * @group primary + * @description 悬浮 + */ + --o-color-primary2: rgb(var(--o-deepblue-5)); + /** + * @name + * @type color + * @group primary + * @description 激活 + */ + --o-color-primary3: rgb(var(--o-deepblue-7)); + /** + * @name + * @type color + * @group primary + * @description 禁用 + */ + --o-color-primary4: rgb(var(--o-deepblue-3)); + /** + * @name + * @type color + * @group primary + * @description 浅/常规 + */ + --o-color-primary1-light: rgb(var(--o-deepblue-2)); + /** + * @name + * @type color + * @group primary + * @description 浅/悬浮 + */ + --o-color-primary2-light: rgb(var(--o-deepblue-3)); + /** + * @name + * @type color + * @group primary + * @description 浅/激活 + */ + --o-color-primary3-light: rgb(var(--o-deepblue-4)); + /** + * @name + * @type color + * @group primary + * @description 浅/禁用 + */ + --o-color-primary4-light: rgb(var(--o-deepblue-1)); + /** + * @name + * @type color + * @group success + * @description 常规 + */ + --o-color-success1: rgb(var(--o-green-6)); + /** + * @name + * @type color * @group success * @description 悬浮 */ - --o-color-success2: rgb(var(--o-green-5)); + --o-color-success2: rgb(var(--o-green-4)); /** * @name * @type color @@ -754,28 +1075,28 @@ * @name * @type color * @group success - * @description 浅/常规 + * @description 常规-浅 */ --o-color-success1-light: rgb(var(--o-green-2)); /** * @name * @type color * @group success - * @description 浅/悬浮 + * @description 悬浮-浅 */ --o-color-success2-light: rgb(var(--o-green-3)); /** * @name * @type color * @group success - * @description 浅/激活 + * @description 激活-浅 */ --o-color-success3-light: rgb(var(--o-green-4)); /** * @name * @type color * @group success - * @description 浅/禁用 + * @description 禁用-浅 */ --o-color-success4-light: rgb(var(--o-green-1)); /** @@ -791,7 +1112,7 @@ * @group warning * @description 悬浮 */ - --o-color-warning2: rgb(var(--o-orange-5)); + --o-color-warning2: rgb(var(--o-orange-4)); /** * @name * @type color @@ -810,28 +1131,28 @@ * @name * @type color * @group warning - * @description 浅/常规 + * @description 常规-浅 */ --o-color-warning1-light: rgb(var(--o-orange-2)); /** * @name * @type color * @group warning - * @description 浅/悬浮 + * @description 悬浮-浅 */ --o-color-warning2-light: rgb(var(--o-orange-3)); /** * @name * @type color * @group warning - * @description 浅/激活 + * @description 激活-浅 */ --o-color-warning3-light: rgb(var(--o-orange-4)); /** * @name * @type color * @group warning - * @description 浅/禁用 + * @description 禁用-浅 */ --o-color-warning4-light: rgb(var(--o-orange-1)); /** @@ -847,7 +1168,7 @@ * @group danger * @description 悬浮 */ - --o-color-danger2: rgb(var(--o-red-5)); + --o-color-danger2: rgb(var(--o-red-4)); /** * @name * @type color @@ -866,51 +1187,233 @@ * @name * @type color * @group danger - * @description 浅/常规 + * @description 常规-浅 */ --o-color-danger1-light: rgb(var(--o-red-2)); /** * @name * @type color * @group danger - * @description 浅/悬浮 + * @description 悬浮-浅 */ --o-color-danger2-light: rgb(var(--o-red-3)); /** * @name * @type color * @group danger - * @description 浅/激活 + * @description 激活-浅 */ --o-color-danger3-light: rgb(var(--o-red-4)); /** * @name * @type color * @group danger - * @description 浅/禁用 + * @description 禁用-浅 */ --o-color-danger4-light: rgb(var(--o-red-1)); + /** + * @name + * @type color + * @group fill + * @description 一级填充:页面背景 + */ + --o-color-fill1: rgb(var(--o-mixedgray-2)); + /** + * @name + * @type color + * @group fill + * @description 二级填充:区块/卡片 + */ + --o-color-fill2: rgb(var(--o-mixedgray-1)); + /** + * @name + * @type color + * @group fill + * @description 三级填充:卡片 + */ + --o-color-fill3: rgb(var(--o-mixedgray-3)); + /** + * @name + * @type color + * @group control + * @description 常规,常用于边框 + */ + --o-color-control1: rgba(var(--o-mixedgray-14), 0.25); + /** + * @name + * @type color + * @group control + * @description 悬浮,常用于边框 + */ + --o-color-control2: rgba(var(--o-mixedgray-14), 0.6); + /** + * @name + * @type color + * @group control + * @description 激活,常用于边框 + */ + --o-color-control3: rgba(var(--o-mixedgray-14), 0.8); + /** + * @name + * @type color + * @group control + * @description 禁用,常用于边框 + */ + --o-color-control4: rgba(var(--o-mixedgray-14), 0.15); + /** + * @name + * @type color + * @group control + * @description 常规-浅,常用于背景 + */ + --o-color-control1-light: rgb(var(--o-mixedgray-5)); + /** + * @name + * @type color + * @group control + * @description 悬浮-浅,常用于背景 + */ + --o-color-control2-light: rgb(var(--o-mixedgray-3)); + /** + * @name + * @type color + * @group control + * @description 激活-浅,常用于背景 + */ + --o-color-control3-light: rgb(var(--o-mixedgray-4)); + /** + * @name + * @type color + * @group control + * @description 禁用-浅,常用于背景 + */ + --o-color-control4-light: rgb(var(--o-mixedgray-3)); + /** + * @name + * @type color + * @group control + * @description 很浅,常用于表格背景色 + */ + --o-color-control-light: rgb(var(--o-mixedgray-1)); + /** + * @name + * @type color + * @group info + * @description 一级/强调/标题 + */ + --o-color-info1: rgba(var(--o-mixedgray-14), 1.0); + /** + * @name + * @type color + * @group info + * @description 二级/次强调/正文 + */ + --o-color-info2: rgba(var(--o-mixedgray-14), 0.8); + /** + * @name + * @type color + * @group info + * @description 三级/辅助信息 + */ + --o-color-info3: rgba(var(--o-mixedgray-14), 0.6); + /** + * @name + * @type color + * @group info + * @description 置灰/禁用 + */ + --o-color-info4: rgba(var(--o-mixedgray-14), 0.4); + /** + * @name + * @type color + * @group info + * @description 一级/次强调/正文反色 + */ + --o-color-info1-inverse: rgba(var(--o-mixedgray-1), 1.0); + /** + * @name + * @type color + * @group info + * @description 二级/辅助信息反色 + */ + --o-color-info2-inverse: rgba(var(--o-mixedgray-1), 0.8); + /** + * @name + * @type color + * @group info + * @description 三级/辅助信息反色 + */ + --o-color-info3-inverse: rgba(var(--o-mixedgray-1), 0.6); + /** + * @name + * @type color + * @group info + * @description 置灰/禁用反色 + */ + --o-color-info4-inverse: rgba(var(--o-mixedgray-1), 0.4); + /** + * @name + * @type color + * @group mask + * @description 全局遮罩 + */ + --o-color-mask1: rgba(var(--o-mixedgray-14), 0.4); + /** + * @name + * @type color + * @group mask + * @description 局部遮罩 + */ + --o-color-mask2: rgba(var(--o-mixedgray-1), 0.2); + /** + * @name + * @type color + * @group link + * @description 常规 + */ + --o-color-link1: rgba(var(--o-deepblue-6), 1.0); + /** + * @name + * @type color + * @group link + * @description 悬浮 + */ + --o-color-link2: rgba(var(--o-deepblue-6), 0.7); + /** + * @name + * @type color + * @group link + * @description 激活 + */ + --o-color-link3: rgba(var(--o-deepblue-6), 0.9); + /** + * @name + * @type color + * @group link + * @description 禁用 + */ + --o-color-link4: rgba(var(--o-deepblue-6), 0.4); /** * @name 阴影1 * @type shadow * @group shadow * @description 用于卡片、小弹窗、楼层阴影 */ - --o-shadow-1: 0 1px 5px rgba(var(--o-gray-10), 0.1); + --o-shadow-1: 0 3px 8px rgba(var(--o-mixedgray-13), 0.08); /** * @name 阴影2 * @type shadow * @group shadow * @description 用于卡片悬浮阴影 */ - --o-shadow-2: 0 6px 18px rgba(var(--o-gray-10), 0.14); + --o-shadow-2: 0 6px 24px rgba(var(--o-mixedgray-13), 0.08); /** * @name 阴影3 * @type shadow * @group shadow * @description 用于提示阴影 */ - --o-shadow-3: 0 10px 32px rgba(var(--o-gray-10), 0.18); + --o-shadow-3: 0 10px 40px rgba(var(--o-mixedgray-13), 0.08); /** * @name 间距1 * @type gap @@ -970,52 +1473,52 @@ /** * @name 小尺寸 * @type size - * @group size + * @group control_size * @description 小尺寸 */ - --o-size-xxs: 12px; + --o-control_size-2xs: 12px; /** * @name 小尺寸 * @type size - * @group size + * @group control_size * @description 小尺寸 */ - --o-size-xs: 18px; + --o-control_size-xs: 18px; /** * @name 小尺寸 * @type size - * @group size + * @group control_size * @description 小尺寸 */ - --o-size-s: 24px; + --o-control_size-s: 24px; /** * @name 中尺寸 * @type size - * @group size + * @group control_size * @description 尺寸 */ - --o-size-m: 32px; + --o-control_size-m: 32px; /** * @name 大尺寸 * @type size - * @group size + * @group control_size * @description 尺寸 */ - --o-size-l: 40px; + --o-control_size-l: 40px; /** * @name 大尺寸 * @type size - * @group size + * @group control_size * @description 尺寸 */ - --o-size-xl: 48px; + --o-control_size-xl: 48px; /** * @name 超小尺寸图标 * @type size * @group icon_size * @description 小尺寸 */ - --o-icon_size-xxs: 12px; + --o-icon_size-2xs: 12px; /** * @name 超小尺寸图标 * @type size @@ -1225,21 +1728,21 @@ * @group radius * @description 小尺寸控件圆角 */ - --o-radius-control-s: var(--o-radius-s); + --o-radius_control-s: var(--o-radius-s); /** * @name 中尺寸控件圆角 * @type size * @group radius * @description 中尺寸控件圆角 */ - --o-radius-control-m: var(--o-radius-m); + --o-radius_control-m: var(--o-radius-m); /** * @name 大尺寸控件圆角 * @type size * @group radius * @description 大尺寸控件圆角 */ - --o-radius-control-l: var(--o-radius-l); + --o-radius_control-l: var(--o-radius-l); /** * @name 持续时间 * @type animation diff --git a/packages/opendesign/src/_styles/mixin.scss b/packages/opendesign/src/_styles/mixin.scss new file mode 100644 index 0000000000000000000000000000000000000000..58ea5930e07e88b459f82ecb4bc2dbc00a29fde3 --- /dev/null +++ b/packages/opendesign/src/_styles/mixin.scss @@ -0,0 +1,90 @@ +// 断点定义 +$breakpoints: ( + 'phone': ( + 0, + 720px, + ), + 'phone-v': ( + 0, + 576px, + ), + 'phone-h': ( + 577px, + 720px, + ), + 'up-phone': 720px, + 'pad': ( + 721px, + 1200px, + ), + 'pad-v': ( + 721px, + 960px, + ), + 'pad-h': ( + 961px, + 1200px, + ), + 'phone-pad': ( + 0, + 1200px, + ), + 'up-pad': 1201px, + 'laptop': ( + 1201px, + 1440px, + ), + 'pc': 1441px, +); + +@mixin respond-to($breakname) { + $bp: map-get($breakpoints, $breakname); + @if type-of($bp) == 'list' { + $min: nth($bp, 1); + $max: nth($bp, 2); + @if $min == 0 { + @media (max-width: $max) { + @content; + } + } @else { + @media (min-width: $min) and (max-width: $max) { + @content; + } + } + } @else { + @media (min-width: $bp) { + @content; + } + } +} + +@mixin hover($hover: hover) { + @media (hover: $hover) { + @content; + } +} + +@mixin on-hover() { + @media (hover: hover) { + &:hover { + @content; + } + } +} +@mixin me-on-hover() { + @content; + @media (hover: hover) { + &:hover { + @content; + } + } +} + +@mixin x-hover() { + transition: all var(--o-duration-m1) var(--o-easing-standard-in); + @include hover { + &:hover { + transform: rotate(180deg); + } + } +} diff --git a/packages/opendesign/src/_utils/date.ts b/packages/opendesign/src/_utils/date.ts new file mode 100644 index 0000000000000000000000000000000000000000..2bef42c065952e2aa662185279fcf274f0ae9588 --- /dev/null +++ b/packages/opendesign/src/_utils/date.ts @@ -0,0 +1,51 @@ +import { startOfMonth, addYears, subYears, addMonths, subMonths } from 'date-fns'; + +export const WEEK_DAYS = 7; +export const MINUTE_TIME = 60 * 1000; +export const HOUR_TIME = 60 * MINUTE_TIME; +export const DAY_TIME = 24 * HOUR_TIME; +export const WEEK_TIME = WEEK_DAYS * DAY_TIME; + +/** + * 根据传入日期获取连续几周的日期 + * @param date 传入日期 + * @param length 周数量 + * @param param { + * weekStartsOn: 0|1|2|3|4|5|6 0代表星期日 + * } + */ +export function getWeeksByDate( + date: Date, + length: number = 1, + { + weekStartsOn = 0, + parse = (d: Date) => d as T, + }: { + weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6; + parse?: (d: Date) => T; + } = {} +): Array { + const time = date.getTime(); + const day = date.getDay(); + + const weeks: Array = []; + const dis = (weekStartsOn % WEEK_DAYS) - day; + const first = time + DAY_TIME * dis; + + for (let i = 0; i < WEEK_DAYS * length; i++) { + if (i === dis) { + weeks.push(parse(date)); + } else { + const d = new Date(first + DAY_TIME * i); + weeks.push(parse(d)); + } + } + + return weeks; +} + +export { startOfMonth, addYears, subYears, addMonths, subMonths }; + +export function isSameDate(date1: Date, date2: Date): boolean { + return date1.getTime() === date2.getTime(); +} diff --git a/packages/opendesign/src/components/_shared/dom.ts b/packages/opendesign/src/_utils/dom.ts similarity index 94% rename from packages/opendesign/src/components/_shared/dom.ts rename to packages/opendesign/src/_utils/dom.ts index 0694d5f356c627c77994f57b467bf27eeabea039..b070815d4ec109ced331fe1f441d9b1db2fe0294 100644 --- a/packages/opendesign/src/components/_shared/dom.ts +++ b/packages/opendesign/src/_utils/dom.ts @@ -1,6 +1,5 @@ import { isArray } from './is'; - -export type DirectionT = 'left' | 'right' | 'top' | 'bottom'; +import { PositionT } from './types'; export function isHtmlElement(el: any) { return typeof HTMLElement === 'object' @@ -74,9 +73,9 @@ export function getElementSize(el: HTMLElement | Window) { }; } -export function getElementBorder(el: HTMLElement, dir?: DirectionT | DirectionT[]) { +export function getElementBorder(el: HTMLElement, dir?: PositionT | PositionT[]) { const style = window.getComputedStyle(el); - let d: DirectionT[] = []; + let d: PositionT[] = []; if (typeof dir === 'string') { d = [dir]; @@ -108,7 +107,7 @@ export function mergeClass(...classList: Array) { let rlt: any[] = []; classList.forEach((item) => { - if (Array.isArray(item)) { + if (isArray(item)) { rlt = rlt.concat(item); } else { rlt.push(item); diff --git a/packages/opendesign/src/components/_shared/event.ts b/packages/opendesign/src/_utils/event.ts similarity index 100% rename from packages/opendesign/src/components/_shared/event.ts rename to packages/opendesign/src/_utils/event.ts diff --git a/packages/opendesign/src/components/_shared/export.ts b/packages/opendesign/src/_utils/export.ts similarity index 32% rename from packages/opendesign/src/components/_shared/export.ts rename to packages/opendesign/src/_utils/export.ts index 1551a1ff0dd1831ebe071eedfae38c53bef479d2..b78a3e5b124ff0ba3ad5520d7bfc53c3bf66e6c4 100644 --- a/packages/opendesign/src/components/_shared/export.ts +++ b/packages/opendesign/src/_utils/export.ts @@ -1,7 +1,9 @@ -export { initSize, initRound } from './global'; +export * from './types'; + +export { initSize, initRound, initZIndex } from './global'; export * from './init-icons'; export * from './is'; -export * from './utils'; +export * from './helper'; diff --git a/packages/opendesign/src/_utils/global.ts b/packages/opendesign/src/_utils/global.ts new file mode 100644 index 0000000000000000000000000000000000000000..6f97cce07b80df479d9b72995b20ad31f6b54ac7 --- /dev/null +++ b/packages/opendesign/src/_utils/global.ts @@ -0,0 +1,60 @@ +import { ref, computed } from 'vue'; +import { ColorPool } from './helper'; +import { SizeT } from './types'; +import { isClient, isTouchDevice } from './is'; + +// popup\popover\layer\dialog的初始z-index +export const defaultZIndex = ref(1000); +export function initZIndex(val: number) { + defaultZIndex.value = val; +} + +// 尺寸 +export const defaultSize = ref('medium'); +export function initSize(val: SizeT) { + defaultSize.value = val; +} + +// 圆角 +export const defaultRound = ref<'pill' | undefined>(); +export function initRound(type?: 'pill') { + defaultRound.value = type; +} + +// 随机颜色池 +const defaultPrestColor = ['#d9e6c3', '#ebd5be', '#d1e6de', '#e0ceeb', '#ebd3c7', '#e6dada', '#e3deeb', '#dedae6', '#cad0e8', '#cedeeb']; +export const defaultPrestColorPool = ref(new ColorPool(defaultPrestColor)); +export function initPrestColor(colors: string[]) { + defaultPrestColorPool.value = new ColorPool(colors); +} + +// 断点 +export const mediaPoint = ref>({ + phone: 720, + pad: 1200, +}); +export function initMediaPoint(point: Record<'phone' | 'pad', number>) { + mediaPoint.value = point; +} + +// 当前是否为pad +export const isPadSize = computed(() => { + if (isClient) { + const { innerWidth } = window; + return innerWidth > mediaPoint.value.phone && innerWidth <= mediaPoint.value.pad; + } + return false; +}); + +// 当前是否为手机 +export const isPhoneSize = computed(() => { + if (isClient) { + const { innerWidth } = window; + return innerWidth <= mediaPoint.value.phone; + } + return false; +}); + +export const isPhonePad = computed(() => { + return isTouchDevice && (isPadSize.value || isPhoneSize.value); +}); diff --git a/packages/opendesign/src/components/_shared/utils.ts b/packages/opendesign/src/_utils/helper.ts similarity index 65% rename from packages/opendesign/src/components/_shared/utils.ts rename to packages/opendesign/src/_utils/helper.ts index 9e240eb13216f33bf1b9081208add098ab1c88b1..96e830ea49b092979a6506aab25079cc3ecca8cc 100644 --- a/packages/opendesign/src/components/_shared/utils.ts +++ b/packages/opendesign/src/_utils/helper.ts @@ -1,3 +1,5 @@ +import { arrayBuffer } from 'stream/consumers'; + // 防抖 时间为一个一帧 export function debounceRAF) => any>(fn: T) { let handle = 0; @@ -66,3 +68,35 @@ export class ColorPool { return color; } } +/** + * 生成随机字符串 + * @param prefix 前缀 + * @param length 字符串长度 + */ +export function uniqueId(prefix: string = '', length: number = 8): string { + const gen = (len: number): string => { + if (len <= 11) { + return Math.random() + .toString(36) + .slice(2, 2 + len) + .padEnd(len, '0'); + } else { + return gen(11) + gen(len - 11); + } + }; + return prefix ? `${prefix}-${gen(length)}` : gen(length); +} + +/** + * 将数组拆分成多个指定长度的区块 + * @param arr 被拆分数组 + * @param size 区块长度 + */ +export function chunk(arr: any[] = [], size = 1) { + return Array.from( + { + length: Math.ceil(arr.length / size), + }, + (v, i) => arr.slice(i * size, i * size + size) + ); +} diff --git a/packages/opendesign/src/_utils/icons.ts b/packages/opendesign/src/_utils/icons.ts new file mode 100644 index 0000000000000000000000000000000000000000..e6cf12171b5b1ec4a51c2a76f33499a2031e5271 --- /dev/null +++ b/packages/opendesign/src/_utils/icons.ts @@ -0,0 +1,193 @@ +/** + * 定义全局图标,支持全局初始化自定义 + */ +import { Component, shallowRef } from 'vue'; +import { + OIconArrowUp, + OIconArrowDown, + OIconArrowLeft, + OIconArrowRight, + OIconChevronUp, + OIconChevronDown, + OIconChevronLeft, + OIconChevronRight, + OIconInfo, + OIconSuccess, + OIconWarning, + OIconDanger, + OIconLoading, + OIconLink, + OIconClose, + OIconAdd, + OIconMinus, + OIconDone, + OIconEllipsis, + OIconStar, + OIconRefresh, + OIconDelete, + OIconEye, + OIconEyeOff, + OIconFile, + OIconEdit, + OIconImageError, + OIconChecked, + OIconCalendar, + OIconDoubleArrowLeft, + OIconDoubleArrowRight, +} from '../icon-components'; + +/** + * 向上箭头图标 + */ +export const IconArrowUp = shallowRef(OIconArrowUp); + +/** + * 向右箭头图标 + */ +export const IconArrowDown = shallowRef(OIconArrowDown); + +/** + * 向左箭头图标 + */ +export const IconArrowLeft = shallowRef(OIconArrowLeft); + +/** + * 向右箭头图标 + */ +export const IconArrowRight = shallowRef(OIconArrowRight); + +/** + * v形向上图标 + */ +export const IconChevronUp = shallowRef(OIconChevronUp); + +/** + * v形向下图标 + */ +export const IconChevronDown = shallowRef(OIconChevronDown); + +/** + * v形向左图标 + */ +export const IconChevronLeft = shallowRef(OIconChevronLeft); + +/** + * v形向右图标 + */ +export const IconChevronRight = shallowRef(OIconChevronRight); + +/** + * info图标 + */ +export const IconInfo = shallowRef(OIconInfo); + +/** + * success图标 + */ +export const IconSuccess = shallowRef(OIconSuccess); + +/** + * warning图标 + */ +export const IconWarning = shallowRef(OIconWarning); + +/** + * danger图标 + */ +export const IconDanger = shallowRef(OIconDanger); + +/** + * 全局loading图标 + */ +export const IconLoading = shallowRef(OIconLoading); + +/** + * link前缀图标 + */ +export const IconLinkPrefix = shallowRef(OIconLink); + +/** + * link箭头图标 + */ +export const IconLinkArrow = shallowRef(OIconArrowRight); + +/** + * done图标 + */ +export const IconDone = shallowRef(OIconDone); + +/** + * close图标 + */ +export const IconClose = shallowRef(OIconClose); + +/** + * add图标 + */ +export const IconAdd = shallowRef(OIconAdd); + +/** + * minus图标 + */ +export const IconMinus = shallowRef(OIconMinus); + +/** + * 更多...图标,用于pagition + */ +export const IconEllipsis = shallowRef(OIconEllipsis); + +/** + * star图标 + */ +export const IconStar = shallowRef(OIconStar); + +/** + * 刷新图标 + */ +export const IconRefresh = shallowRef(OIconRefresh); + +/** + * 删除图标 + */ +export const IconDelete = shallowRef(OIconDelete); + +/** + * 预览图标 + */ +export const IconPreview = shallowRef(OIconEye); + +/** + * 文件图标 + */ +export const IconFile = shallowRef(OIconFile); + +/** + * 编辑图标 + */ +export const IconEdit = shallowRef(OIconEdit); + +/** + * 可见图标,用于密码框等 + */ +export const IconEyeOn = shallowRef(OIconEye); + +/** + * 不可见图标,用于密码框等 + */ +export const IconEyeOff = shallowRef(OIconEyeOff); + +/** + * 加载失败的图片 + */ +export const IconImageError = shallowRef(OIconImageError); + +export const IconChecked = shallowRef(OIconChecked); + +/** + * 日期组件图标 + */ +export const IconCalendar = shallowRef(OIconCalendar); +export const IconCalendarPrevYear = shallowRef(OIconDoubleArrowLeft); +export const IconCalendarNextYear = shallowRef(OIconDoubleArrowRight); +export const IconCalendarPrevMonth = shallowRef(OIconChevronLeft); +export const IconCalendarNextMonth = shallowRef(OIconChevronRight); diff --git a/packages/opendesign/src/components/_shared/init-icons.ts b/packages/opendesign/src/_utils/init-icons.ts similarity index 100% rename from packages/opendesign/src/components/_shared/init-icons.ts rename to packages/opendesign/src/_utils/init-icons.ts diff --git a/packages/opendesign/src/components/_shared/is.ts b/packages/opendesign/src/_utils/is.ts similarity index 74% rename from packages/opendesign/src/components/_shared/is.ts rename to packages/opendesign/src/_utils/is.ts index b7ad608940700183324303375a9400aeb677fca3..8bbfc2fa726b21abe3aa455f475d6d12bcb2dcd8 100644 --- a/packages/opendesign/src/components/_shared/is.ts +++ b/packages/opendesign/src/_utils/is.ts @@ -1,4 +1,3 @@ - const opt = Object.prototype.toString; export function isUndefined(val: unknown): val is undefined { @@ -18,7 +17,7 @@ export function isString(val: unknown): val is string { } export function isNumber(val: unknown): val is number { - return opt.call(val) === '[object Number]' && !isNaN(val as number); + return opt.call(val) === '[object Number]' && !Number.isNaN(val as number); } export function isFunction(val: unknown): val is Function { @@ -28,6 +27,13 @@ export function isFunction(val: unknown): val is Function { export function isArray(val: unknown): val is Array { return Array.isArray(val); } +/** + * 判断日期是否合法 + * @param d + */ +export function isValidDate(val: Date): val is Date { + return val instanceof Date && !Number.isNaN(val.valueOf()); +} // 是否是对象或者数组等(key:value 形式) export function isObject(val: unknown): val is Record { @@ -41,4 +47,8 @@ export function isPlainObject(val: unknown): val is object { export const isPromise = (val: unknown): val is Promise => { return isObject(val) && isFunction(val.then) && isFunction(val.catch); -}; \ No newline at end of file +}; + +export const isClient = typeof window !== 'undefined'; + +export const isTouchDevice = isClient ? 'ontouchstart' in document.documentElement : false; diff --git a/packages/opendesign/src/components/_shared/keycode.ts b/packages/opendesign/src/_utils/keycode.ts similarity index 100% rename from packages/opendesign/src/components/_shared/keycode.ts rename to packages/opendesign/src/_utils/keycode.ts diff --git a/packages/opendesign/src/components/_shared/pointer.ts b/packages/opendesign/src/_utils/pointer.ts similarity index 92% rename from packages/opendesign/src/components/_shared/pointer.ts rename to packages/opendesign/src/_utils/pointer.ts index cbbb0890cbc986ebd156661c365aafbb905adad8..2002f9f23c2eb44fd25bb5ee2ed77286e4de13fa 100644 --- a/packages/opendesign/src/components/_shared/pointer.ts +++ b/packages/opendesign/src/_utils/pointer.ts @@ -1,20 +1,12 @@ -export interface PointT { - x: number; - y: number; -} -export interface PointMoveT { - x: number; - y: number; - dx: number; - dy: number; -} +import type { PointT, PointMoveT } from './types'; + interface TouchOptionsT { onStart?: (pos: PointT, e: TouchEvent) => void; onMove?: (pos: PointMoveT, e: TouchEvent) => void; onEnd?: (pos: PointMoveT, e: TouchEvent) => void; } function noop() {} -export class OTouch { +export class OPointer { private el: HTMLElement; private x1: number; private y1: number; diff --git a/packages/opendesign/src/components/_shared/style-class.ts b/packages/opendesign/src/_utils/style-class.ts similarity index 80% rename from packages/opendesign/src/components/_shared/style-class.ts rename to packages/opendesign/src/_utils/style-class.ts index dd85fdad1cb92f95d4a1105ef1fd07e157c210bc..4661326f12201014ed1199ca20d30224b8d141b7 100644 --- a/packages/opendesign/src/components/_shared/style-class.ts +++ b/packages/opendesign/src/_utils/style-class.ts @@ -1,8 +1,7 @@ import { computed } from 'vue'; -import { defaultRound } from '../_shared/global'; +import { defaultRound } from '../_utils/global'; export function getRoundClass(props: any, name: string) { - return { class: computed(() => { if (props.round === 'pill' || (!props.round && defaultRound.value === 'pill')) { @@ -13,10 +12,10 @@ export function getRoundClass(props: any, name: string) { style: computed(() => { if (props.round && props.round !== 'pill') { return { - [`--${name}-radius`]: props.round + [`--${name}-radius`]: props.round, }; } return {}; - }) + }), }; -} \ No newline at end of file +} diff --git a/packages/opendesign/src/components/_shared/tree.ts b/packages/opendesign/src/_utils/tree.ts similarity index 100% rename from packages/opendesign/src/components/_shared/tree.ts rename to packages/opendesign/src/_utils/tree.ts diff --git a/packages/opendesign/src/components/_shared/global.ts b/packages/opendesign/src/_utils/types.ts similarity index 33% rename from packages/opendesign/src/components/_shared/global.ts rename to packages/opendesign/src/_utils/types.ts index 7a850a52344fb648770fa191a7145346a73c3366..d22b38dc3724ea5bfe2f5e6afbf3fa84a10362c7 100644 --- a/packages/opendesign/src/components/_shared/global.ts +++ b/packages/opendesign/src/_utils/types.ts @@ -1,37 +1,41 @@ -import { ref } from 'vue'; -import { ColorPool } from './utils'; +export interface PointT { + x: number; + y: number; +} +export interface PointMoveT { + x: number; + y: number; + dx: number; + dy: number; +} +export interface Point3DT { + x: number; + y: number; + z: number; +} // 尺寸 export const SizeTypes = ['large', 'medium', 'small'] as const; -export type SizeT = typeof SizeTypes[number]; -export const defaultSize = ref('medium'); -export function initSize(val: SizeT) { - defaultSize.value = val; -} +export type SizeT = (typeof SizeTypes)[number]; // 圆角 export type RoundT = 'pill' | string; -export const defaultRound = ref<'pill' | string>(''); -export function initRound(type: RoundT) { - defaultRound.value = type; -} // 方向 export const DirectionTypes = ['h', 'v'] as const; -export type DirectionT = typeof DirectionTypes[number]; +export type DirectionT = (typeof DirectionTypes)[number]; + +// 位置 +export const PositionTypes = ['left', 'right', 'top', 'bottom'] as const; +export type PositionT = (typeof PositionTypes)[number]; +// 形状 export const VariantTypes = ['solid', 'outline', 'text'] as const; -export type VariantT = typeof VariantTypes[number]; +export type VariantT = (typeof VariantTypes)[number]; +// 颜色 export const ColorTypes = ['normal', 'primary', 'success', 'warning', 'danger'] as const; -export type ColorT = typeof ColorTypes[number]; +export type ColorT = (typeof ColorTypes)[number]; export const Color2Types = ['normal', 'success', 'warning', 'danger'] as const; -export type Color2T = typeof ColorTypes[number]; - -// 随机颜色池 -const PrestColor = ['#d9e6c3', '#ebd5be', '#d1e6de', '#e0ceeb', '#ebd3c7', '#e6dada', '#e3deeb', '#dedae6', '#cad0e8', '#cedeeb']; -export const PrestColorPool = ref(new ColorPool(PrestColor)); -export function initPrestColor(colors: string[]) { - PrestColorPool.value = new ColorPool(colors); -} +export type Color2T = (typeof ColorTypes)[number]; diff --git a/packages/opendesign/src/components/_shared/vue-utils.ts b/packages/opendesign/src/_utils/vue-utils.ts similarity index 88% rename from packages/opendesign/src/components/_shared/vue-utils.ts rename to packages/opendesign/src/_utils/vue-utils.ts index 50ac3a4b8620455f547a2f88652521bee3c63949..b8e1ed4959a380bb7075f4a63a7629e4a5d11990 100644 --- a/packages/opendesign/src/components/_shared/vue-utils.ts +++ b/packages/opendesign/src/_utils/vue-utils.ts @@ -1,4 +1,4 @@ -import { Component, onMounted, ref, Slots, VNode, VNodeTypes, Comment, ComponentPublicInstance, watchEffect, Ref } from 'vue'; +import { Component, onMounted, ref, Slots, Slot, VNode, VNodeTypes, Comment, ComponentPublicInstance, watchEffect, Ref } from 'vue'; import { isArray } from './is'; import { isHtmlElement } from './dom'; @@ -59,7 +59,6 @@ export function useSlotElement(componentName?: string) { onMounted(() => { children?.forEach((child) => { - // console.log(child, isComponent(child)); if (isComponent(child, child.type)) { if (componentName && child.type.name === componentName) { components.push(child); @@ -135,21 +134,19 @@ export const getFirstElement = (vn: VNode | VNode[]): HTMLElement | null => { return null; }; -export function useSlotFirstElement() { +export function useSlotFirstElement(): { setSlot: (nodes: VNode[] | undefined) => void; fistElement: Ref } { let children: VNode[] | null = null; const fistElement = ref(null); onMounted(() => { if (children) { fistElement.value = getFirstElement(children); - // console.log(fistElement.value); } }); return { setSlot(nodes: VNode[] | undefined) { if (nodes) { children = nodes; - // console.log(children); } }, fistElement, @@ -173,3 +170,23 @@ export const getHtmlElement = (elRef: Ref { + if (!slot) { + return true; + } + const children = slot(); + + if (children.length > 1) { + return false; + } + + if (children.length === 0) { + return true; + } + // TODO: 如何判断是否为注释节点 + if (children.length === 1 && isTextElement(children[0]) && !children[0].children) { + return true; + } + return false; +}; diff --git a/packages/opendesign/src/_utils/z-index.ts b/packages/opendesign/src/_utils/z-index.ts new file mode 100644 index 0000000000000000000000000000000000000000..cd3e44170e5b5696642f974e4d6480a0791f0438 --- /dev/null +++ b/packages/opendesign/src/_utils/z-index.ts @@ -0,0 +1,27 @@ +import { watchEffect } from 'vue'; +import { defaultZIndex } from './global'; + +let topZIndex = 100; + +watchEffect(() => { + topZIndex = defaultZIndex.value; +}); + +export function getZIndex() { + return topZIndex; +} + +export function createTopZIndex() { + topZIndex += 1; + return topZIndex; +} +/** + * 减少顶层值 + * @param current 当前zindex值,如果传入,则只有当topZIndex与current相等时,才减1 + */ +export function removeZIndex(current?: number) { + if (current === undefined || current === topZIndex) { + topZIndex -= 1; + } + return topZIndex; +} diff --git a/packages/opendesign/src/components/badge/OBadge.vue b/packages/opendesign/src/badge/OBadge.vue similarity index 85% rename from packages/opendesign/src/components/badge/OBadge.vue rename to packages/opendesign/src/badge/OBadge.vue index 0d4408f3f6f35d5ecd157c54e3fcf8d526235e31..f2179454c98f6937e1cf3e0e974406f1cfe5040e 100644 --- a/packages/opendesign/src/components/badge/OBadge.vue +++ b/packages/opendesign/src/badge/OBadge.vue @@ -2,7 +2,7 @@ import { computed } from 'vue'; import { badgeProps } from './types'; -import { isNumber } from '../_shared/is'; +import { isNumber } from '../_utils/is'; const props = defineProps(badgeProps); @@ -31,7 +31,9 @@ const style = computed(() => {
- {{ content }} + +
{{ content }}
+
diff --git a/packages/opendesign/src/components/badge/__demo__/BadgeBasic.vue b/packages/opendesign/src/badge/__demo__/BadgeBasic.vue similarity index 95% rename from packages/opendesign/src/components/badge/__demo__/BadgeBasic.vue rename to packages/opendesign/src/badge/__demo__/BadgeBasic.vue index dbc79427a955604c1fced6e91ebe321a3cb4e7c5..634e4cafbdd29e0458238bc219d37fc00863e870 100644 --- a/packages/opendesign/src/components/badge/__demo__/BadgeBasic.vue +++ b/packages/opendesign/src/badge/__demo__/BadgeBasic.vue @@ -7,7 +7,7 @@ import { OBadge } from '../index';