oops-ui 0.0.12 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/LICENSE +13 -1
  2. package/README.md +139 -0
  3. package/client.mjs +10 -0
  4. package/client.mjs.map +1 -0
  5. package/index.mjs +3 -0
  6. package/layoutUtil.mjs +10 -0
  7. package/layoutUtil.mjs.map +1 -0
  8. package/package.json +57 -108
  9. package/server.mjs +8 -0
  10. package/server.mjs.map +1 -0
  11. package/styles/common.css +1 -0
  12. package/styles/common.scss +131 -0
  13. package/styles/flex.scss +38 -0
  14. package/styles/header.scss +54 -0
  15. package/styles/image.scss +10 -0
  16. package/styles/input.scss +131 -0
  17. package/styles/loading-keyframes.scss +242 -0
  18. package/styles/reset.css +1 -0
  19. package/styles/reset.scss +94 -0
  20. package/styles/respond.scss +54 -0
  21. package/styles/root-normal-dark.scss +85 -0
  22. package/styles/root-normal-light.scss +83 -0
  23. package/styles/root-weird-dark.scss +1 -0
  24. package/styles/root.scss +326 -0
  25. package/styles/text.scss +61 -0
  26. package/styles/vars-color.scss +295 -0
  27. package/styles/vars-size.scss +6 -0
  28. package/type/components/ThemeContext/index.d.ts +25 -0
  29. package/type/components/ThemeContext/types.d.ts +28 -0
  30. package/type/components/button/button.d.ts +10 -0
  31. package/type/components/button/index.d.ts +9 -0
  32. package/type/components/image/index.d.ts +11 -0
  33. package/type/components/image/types.d.ts +13 -0
  34. package/type/components/image/useSrcChange.d.ts +11 -0
  35. package/type/components/layout/content.d.ts +17 -0
  36. package/type/components/layout/footer.d.ts +21 -0
  37. package/type/components/layout/get-value.d.ts +10 -0
  38. package/type/components/layout/header.d.ts +23 -0
  39. package/type/components/layout/index.d.ts +8 -0
  40. package/type/components/layout/is-fragment.d.ts +9 -0
  41. package/type/components/layout/layout.d.ts +55 -0
  42. package/type/components/layout/sidebar.d.ts +29 -0
  43. package/type/components/layout/types.d.ts +101 -0
  44. package/type/components/marquee/MarqueeEle.d.ts +15 -0
  45. package/type/components/marquee/index.d.ts +7 -0
  46. package/type/components/marquee/type.d.ts +9 -0
  47. package/type/components/menu/index.d.ts +6 -0
  48. package/type/components/menu/menu.d.ts +6 -0
  49. package/type/components/ripples/Content.d.ts +8 -0
  50. package/type/components/ripples/LazyRippleEle.d.ts +42 -0
  51. package/type/components/ripples/RipplesEle.d.ts +42 -0
  52. package/type/components/ripples/index.d.ts +11 -0
  53. package/type/components/ripples/types.d.ts +17 -0
  54. package/type/components/ripples/useOptionUpdate.d.ts +12 -0
  55. package/type/components/shared/EnLayoutContent/index.d.ts +19 -0
  56. package/type/components/shared/EnLayoutContent/types.d.ts +17 -0
  57. package/type/components/switch/SwitchContainer.d.ts +7 -0
  58. package/type/components/switch/SwitchContent.d.ts +10 -0
  59. package/type/components/switch/SwitchLabel.d.ts +9 -0
  60. package/type/components/switch/index.d.ts +14 -0
  61. package/type/customHooks/use-xcn/index.d.ts +14 -0
  62. package/type/customHooks/useAnimationFrame.d.ts +58 -0
  63. package/type/customHooks/useInputIsComposing.d.ts +44 -0
  64. package/type/customHooks/useRipples/buildBackground/create-background-color.d.ts +9 -0
  65. package/type/customHooks/useRipples/buildBackground/create-linear-gradient.d.ts +9 -0
  66. package/type/customHooks/useRipples/buildBackground/default-background/_createImageData.d.ts +13 -0
  67. package/type/customHooks/useRipples/buildBackground/default-background/circleDataList.d.ts +24 -0
  68. package/type/customHooks/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +8 -0
  69. package/type/customHooks/useRipples/buildBackground/default-background/createDefault.d.ts +8 -0
  70. package/type/customHooks/useRipples/buildBackground/default-background/index.d.ts +18 -0
  71. package/type/customHooks/useRipples/buildBackground/load-image.d.ts +19 -0
  72. package/type/customHooks/useRipples/buildBackground/run-side.d.ts +15 -0
  73. package/type/customHooks/useRipples/buildBackground/type.d.ts +37 -0
  74. package/type/customHooks/useRipples/buildBackground/utils/bind-image.d.ts +10 -0
  75. package/type/customHooks/useRipples/buildBackground/utils/create-canvas-element.d.ts +9 -0
  76. package/type/customHooks/useRipples/buildBackground/utils/create-image-by-src.d.ts +8 -0
  77. package/type/customHooks/useRipples/buildBackground/utils/get-background-style.d.ts +9 -0
  78. package/type/customHooks/useRipples/buildBackground/utils/hide-css-background.d.ts +16 -0
  79. package/type/customHooks/useRipples/buildBackground/utils/restore-css-background.d.ts +13 -0
  80. package/type/customHooks/useRipples/callback/can-side.d.ts +14 -0
  81. package/type/customHooks/useRipples/callback/destroy.d.ts +9 -0
  82. package/type/customHooks/useRipples/callback/drop.d.ts +9 -0
  83. package/type/customHooks/useRipples/callback/extract-url.d.ts +8 -0
  84. package/type/customHooks/useRipples/callback/fade.d.ts +9 -0
  85. package/type/customHooks/useRipples/callback/get-new-image.d.ts +14 -0
  86. package/type/customHooks/useRipples/callback/reload-background.d.ts +12 -0
  87. package/type/customHooks/useRipples/callback/scale.d.ts +8 -0
  88. package/type/customHooks/useRipples/index.d.ts +45 -0
  89. package/type/customHooks/useRipples/init/index.d.ts +11 -0
  90. package/type/customHooks/useRipples/init/initEvent.d.ts +11 -0
  91. package/type/customHooks/useRipples/init/initShaders.d.ts +13 -0
  92. package/type/customHooks/useRipples/init/initTexture.d.ts +13 -0
  93. package/type/customHooks/useRipples/render/computeTextureBoundaries.d.ts +9 -0
  94. package/type/customHooks/useRipples/render/draw.d.ts +13 -0
  95. package/type/customHooks/useRipples/render/drawQuad.d.ts +13 -0
  96. package/{dist/types → type}/customHooks/useRipples/render/dropAtPointer.d.ts +8 -2
  97. package/type/customHooks/useRipples/render/index.d.ts +12 -0
  98. package/type/customHooks/useRipples/render/swapBufferIndices.d.ts +11 -0
  99. package/type/customHooks/useRipples/render/update.d.ts +11 -0
  100. package/type/customHooks/useRipples/rippersData/defaultData.d.ts +11 -0
  101. package/type/customHooks/useRipples/rippersData/fadeData.d.ts +51 -0
  102. package/{dist/types → type}/customHooks/useRipples/rippersData/index.d.ts +24 -18
  103. package/{dist/types → type}/customHooks/useRipples/rippersData/loadConfig.d.ts +12 -2
  104. package/type/customHooks/useRipples/rippersData/renderData.d.ts +80 -0
  105. package/type/customHooks/useRipples/rippersData/useOptions.d.ts +91 -0
  106. package/{dist/types → type}/customHooks/useRipples/rippersData/vertexSource.d.ts +17 -11
  107. package/type/customHooks/useRipples/ripple.html.d.ts +12 -0
  108. package/type/customHooks/useRipples/ripplesClass.d.ts +57 -0
  109. package/{dist/types → type}/customHooks/useRipples/tools.d.ts +18 -8
  110. package/type/customHooks/useRipples/types.d.ts +209 -0
  111. package/type/customHooks/useRipples/use-lazy-ripple.d.ts +15 -0
  112. package/{dist/types → type}/customHooks/useTimeId.d.ts +10 -6
  113. package/type/dog.d.ts +8 -0
  114. package/type/index.client.d.ts +20 -0
  115. package/type/index.d.ts +8 -0
  116. package/type/index.server.d.ts +8 -0
  117. package/type/storage/main-logic .d.ts +26 -0
  118. package/type/storage/storage-store.d.ts +14 -0
  119. package/type/utilities/cookie.d.ts +21 -0
  120. package/type/utilities/sys.d.ts +41 -0
  121. package/ReadMe.md +0 -17
  122. package/dist/BackgroundRipple/index.cjs +0 -1
  123. package/dist/index.cjs +0 -1
  124. package/dist/index.js +0 -1
  125. package/dist/index.mjs +0 -1
  126. package/dist/styles/common.css +0 -353
  127. package/dist/styles/common.scss +0 -504
  128. package/dist/types/components/button/button.d.ts +0 -2
  129. package/dist/types/components/button/index.d.ts +0 -3
  130. package/dist/types/components/button/style/index.d.ts +0 -1
  131. package/dist/types/components/index.d.ts +0 -1
  132. package/dist/types/components/layout/header.d.ts +0 -4
  133. package/dist/types/components/layout/index.d.ts +0 -0
  134. package/dist/types/components/layout/interface.d.ts +0 -8
  135. package/dist/types/components/layout/layout.d.ts +0 -14
  136. package/dist/types/components/menu/index.d.ts +0 -0
  137. package/dist/types/components/menu/menu.d.ts +0 -0
  138. package/dist/types/components/menu/style/index.d.ts +0 -0
  139. package/dist/types/components/ripples/RipplesEle.d.ts +0 -33
  140. package/dist/types/components/ripples/index.d.ts +0 -2
  141. package/dist/types/components/ripples/style/index.d.ts +0 -0
  142. package/dist/types/customHooks/index.d.ts +0 -5
  143. package/dist/types/customHooks/useAnimationFrame.d.ts +0 -41
  144. package/dist/types/customHooks/useInputIsComposing.d.ts +0 -45
  145. package/dist/types/customHooks/useRipples/defaultData.d.ts +0 -5
  146. package/dist/types/customHooks/useRipples/index.d.ts +0 -46
  147. package/dist/types/customHooks/useRipples/init/hideCssBackground.d.ts +0 -9
  148. package/dist/types/customHooks/useRipples/init/initEvent.d.ts +0 -5
  149. package/dist/types/customHooks/useRipples/init/initGL.d.ts +0 -5
  150. package/dist/types/customHooks/useRipples/init/initShaders.d.ts +0 -7
  151. package/dist/types/customHooks/useRipples/init/initTexture.d.ts +0 -7
  152. package/dist/types/customHooks/useRipples/init/loadImage.d.ts +0 -13
  153. package/dist/types/customHooks/useRipples/render/computeTextureBoundaries.d.ts +0 -7
  154. package/dist/types/customHooks/useRipples/render/drawQuad.d.ts +0 -7
  155. package/dist/types/customHooks/useRipples/render/render.d.ts +0 -7
  156. package/dist/types/customHooks/useRipples/render/step.d.ts +0 -6
  157. package/dist/types/customHooks/useRipples/render/swapBufferIndices.d.ts +0 -2
  158. package/dist/types/customHooks/useRipples/render/update.d.ts +0 -2
  159. package/dist/types/customHooks/useRipples/rippersData/createImageData.d.ts +0 -4
  160. package/dist/types/customHooks/useRipples/rippersData/renderData.d.ts +0 -85
  161. package/dist/types/customHooks/useRipples/ripple.html.d.ts +0 -3
  162. package/dist/types/customHooks/useRipples/ripplesClass.d.ts +0 -120
  163. package/dist/types/index.d.ts +0 -3
  164. package/dist/useAnimationFrame/index.cjs +0 -1
  165. package/dist/useInputIsComposing/index.cjs +0 -1
  166. package/dist/useRipples/index.cjs +0 -1
  167. package/dist/useTimeId/index.cjs +0 -1
@@ -0,0 +1,38 @@
1
+ .en-flex,
2
+ .en-flex-row,
3
+ .en-flex-column,
4
+ .en-flex-row-reverse,
5
+ .en-flex-column-reverse {
6
+ display: flex;
7
+ flex-wrap: nowrap;
8
+ flex: 1;
9
+ }
10
+
11
+ .en-flex,
12
+ .en-flex-row {
13
+ flex-direction: row;
14
+ }
15
+
16
+ .en-flex-row-reverse {
17
+ flex-direction: row-reverse;
18
+ }
19
+
20
+ .en-flex-column {
21
+ flex-direction: column;
22
+ }
23
+
24
+ .en-flex-column-reverse {
25
+ flex-direction: column-reverse;
26
+ }
27
+
28
+ .en-flex-wrap {
29
+ flex-wrap: wrap;
30
+ }
31
+
32
+ .en-flex-nowrap {
33
+ flex-wrap: nowrap;
34
+ }
35
+
36
+ .en-flex-warp-reverse {
37
+ flex-wrap: wrap-reverse;
38
+ }
@@ -0,0 +1,54 @@
1
+ .en-h1,
2
+ h1.en-h1,
3
+ .en-style h1 {
4
+ font-size: 2.8rem;
5
+ line-height: 3rem;
6
+ margin-block: 0.87rem;
7
+ font-weight: 800;
8
+ text-align: center;
9
+ }
10
+
11
+ .en-h2,
12
+ h2.en-h2,
13
+ .en-style h2 {
14
+ font-size: 2.2rem;
15
+ line-height: 2.4rem;
16
+ margin-block: 0.94rem;
17
+ font-weight: 700;
18
+ }
19
+
20
+ .en-h3,
21
+ h3.en-h3,
22
+ .en-style h3 {
23
+ font-size: 1.6rem;
24
+ line-height: 1.8rem;
25
+ margin-block: 1rem;
26
+ font-weight: 600;
27
+ }
28
+
29
+ .en-h4,
30
+ h4.en-h4,
31
+ .en-style h4 {
32
+ font-size: 1.2rem;
33
+ line-height: 1.4rem;
34
+ margin-block: 1.02rem;
35
+ font-weight: 600;
36
+ }
37
+
38
+ .en-h5,
39
+ h5.en-h5,
40
+ .en-style h5 {
41
+ font-size: 0.94rem;
42
+ line-height: 1.14rem;
43
+ margin-block: 1.42rem;
44
+ font-weight: 600;
45
+ }
46
+
47
+ .en-h6,
48
+ h6.en-h6,
49
+ .en-style h6 {
50
+ font-size: 0.84rem;
51
+ line-height: 1.04rem;
52
+ margin-block: 2.12rem;
53
+ font-weight: 600;
54
+ }
@@ -0,0 +1,10 @@
1
+ img.en-img,
2
+ .en-img,
3
+ .en-style img {
4
+ -webkit-touch-callout: none;
5
+ -webkit-user-select: none;
6
+ -khtml-user-select: none;
7
+ -moz-user-select: none;
8
+ -ms-user-select: none;
9
+ user-select: none;
10
+ }
@@ -0,0 +1,131 @@
1
+ .en-input-focus-visible-none,
2
+ input.en-input-focus-visible-none,
3
+ .en-style input:focus-visible {
4
+ outline: none;
5
+ }
6
+
7
+ .en-style input[type='button'],
8
+ .cursor-pointer input[type='button'].cursor-pointer {
9
+ cursor: pointer;
10
+ }
11
+
12
+ .en-input-type-text-revers,
13
+ input[type='text'].en-input-type-text-revers,
14
+ .en-input-type-text-primary,
15
+ input[type='text'].en-input-type-text-primary,
16
+ .en-style input[type='text'] {
17
+ width: calc(var(--en-spacing) * 40);
18
+ border-radius: var(--en-spacing-3);
19
+ padding: var(--en-spacing-1) var(--en-spacing-3);
20
+
21
+ &:focus::placeholder {
22
+ color: transparent;
23
+ }
24
+ }
25
+
26
+ .en-input-type-text-primary,
27
+ input[type='text'].en-input-type-text-primary,
28
+ .en-style input[type='text'] {
29
+ background-color: var(--en-input-primary-background);
30
+ color: var(--en-input-primary-text);
31
+ border-style: outset;
32
+
33
+ &::placeholder {
34
+ color: var(--en-input-primary-placeholder-text);
35
+ }
36
+
37
+ &:focus-visible {
38
+ outline: var(--en-input-primary-focus-visible-outline);
39
+ border-color: transparent;
40
+ box-shadow: 0 2px 24px rgba(var(--en-input-primary-text-rgb), 0.6);
41
+ }
42
+ }
43
+
44
+ input[type='text'].en-input-type-text-revers,
45
+ .en-input-type-text-revers {
46
+ background-color: var(--en-input-revers-background);
47
+ color: var(--en-input-revers-text);
48
+ border-style: outset;
49
+
50
+ &::placeholder {
51
+ color: var(--en-input-revers-placeholder-text);
52
+ }
53
+
54
+ &:focus-visible {
55
+ outline: var(--en-input-revers-focus-visible-outline);
56
+ border-color: transparent;
57
+ box-shadow: 0 2px 12px rgba(var(--en-input-revers-text-rgb), 0.6);
58
+ }
59
+ }
60
+
61
+ .en-input-type-radio-primary,
62
+ .en-style input[type='radio'] {
63
+ width: 0;
64
+ height: 0;
65
+ overflow: hidden;
66
+
67
+ + label {
68
+ padding-left: 15px;
69
+
70
+ &::before,
71
+ &::after {
72
+ content: '';
73
+ position: absolute;
74
+ border-radius: 50%;
75
+ top: 50%;
76
+ transform: translate(0, -50%);
77
+ overflow: hidden;
78
+ }
79
+
80
+ $with: var(--en-spacing-base);
81
+
82
+ // 默认/未选中的前置
83
+ &::before {
84
+ left: 0px;
85
+ height: $with;
86
+ width: $with;
87
+ box-shadow: 1px 1px 3px var(--en-text-primary);
88
+ z-index: 1;
89
+ }
90
+
91
+ // 选中的项的额外涂色
92
+ &::after {
93
+ font-size: $with;
94
+ line-height: $with;
95
+ z-index: 2;
96
+ left: 0px;
97
+ height: $with;
98
+ width: $with;
99
+ color: var(--en-background-primary);
100
+ background-color: var(--en-text-primary);
101
+ clip-path: circle(0%);
102
+ transition: all var(--en-transition-slow);
103
+ }
104
+ }
105
+
106
+ &:checked {
107
+ color: #f00;
108
+
109
+ & + label {
110
+ color: var(--en-color-green-30);
111
+
112
+ &::before {
113
+ box-shadow:
114
+ 1px 1px 3px var(--en-color-green-10),
115
+ -1px -1px 3px var(--en-color-green-10);
116
+ }
117
+
118
+ &::after {
119
+ background-color: var(--en-color-green-30);
120
+ clip-path: circle(100%);
121
+ transition: all 0.8s;
122
+ }
123
+ }
124
+ }
125
+ }
126
+
127
+ .en-input-type-image-primary,
128
+ .en-style input[type='image'] {
129
+ -webkit-user-select: none;
130
+ user-select: none;
131
+ }
@@ -0,0 +1,242 @@
1
+ @keyframes loading {
2
+ // 45 - 25 * Math.sin((Math.PI * 5) / 12)
3
+ // 位置公式 35 - 25 * Math.cos((Math.PI * 5) / 12)
4
+
5
+ 100%,
6
+ 0% {
7
+ background-size:
8
+ 10% 10%,
9
+ 10% 10%,
10
+ 10% 10%,
11
+ 10% 10%;
12
+ background-position:
13
+ 25% 45%,
14
+ 41.7% 45%,
15
+ 58.3% 45%,
16
+ 75% 45%;
17
+ }
18
+
19
+ 20%,
20
+ 80% {
21
+ background-size: 2.5% 2.5%;
22
+ background-position: 25% 45%;
23
+ }
24
+
25
+ 22% {
26
+ background-size:
27
+ 3.75% 3.75%,
28
+ 2.5% 2.5%,
29
+ 2.5% 2.5%,
30
+ 2.5% 2.5%;
31
+ background-position:
32
+ // 位置 1
33
+ 25.85% 38.53%,
34
+ 25% 45%,
35
+ 25% 45%,
36
+ 25% 45%;
37
+ }
38
+
39
+ 24% {
40
+ background-size:
41
+ 5% 5%,
42
+ 2.5% 2.5%,
43
+ 2.5% 2.5%,
44
+ 2.5% 2.5%;
45
+ background-position:
46
+ // 位置 2
47
+ 28.35% 32.5%,
48
+ 25% 45%,
49
+ 25% 45%,
50
+ 25% 45%;
51
+ }
52
+
53
+ 26% {
54
+ background-size:
55
+ 6.25% 6.25%,
56
+ 2.5% 2.5%,
57
+ 2.5% 2.5%,
58
+ 2.5% 2.5%;
59
+ background-position:
60
+ // 位置 3
61
+ 32.32% 27.32%,
62
+ 25% 45%,
63
+ 25% 45%,
64
+ 25% 45%;
65
+ }
66
+
67
+ 28% {
68
+ background-size:
69
+ 7.5% 7.5%,
70
+ 3.75% 3.75%,
71
+ 2.5% 2.5%,
72
+ 2.5% 2.5%;
73
+ background-position:
74
+ // 位置 4
75
+ 37.5% 23.35%,
76
+ // 位置 1
77
+ 25.85% 38.53%,
78
+ 25% 45%,
79
+ 25% 45%;
80
+ }
81
+
82
+ 30% {
83
+ background-size:
84
+ 8.75% 8.75%,
85
+ 5% 5%,
86
+ 2.5% 2.5%,
87
+ 2.5% 2.5%;
88
+ background-position:
89
+ // 位置 5
90
+ 43.53% 20.85%,
91
+ // 位置 2
92
+ 28.35% 32.5%,
93
+ 25% 45%,
94
+ 25% 45%;
95
+ }
96
+
97
+ 32% {
98
+ background-size:
99
+ 10% 10%,
100
+ 6.25% 6.25%,
101
+ 3.75% 3.75%,
102
+ 2.5% 2.5%;
103
+ background-position:
104
+ // 位置 6
105
+ 50% 20%,
106
+ // 位置 3
107
+ 32.32% 27.32%,
108
+ // 位置 1
109
+ 25.85% 38.53%,
110
+ 25% 45%;
111
+ }
112
+
113
+ 34% {
114
+ background-size:
115
+ 10% 10%,
116
+ 7.5% 7.5%,
117
+ 5% 5%,
118
+ 2.5% 2.5%;
119
+ background-position:
120
+ // 位置 7
121
+ 56.47% 20.85%,
122
+ // 位置 4
123
+ 37.32% 23.35%,
124
+ // 位置 2
125
+ 28.35% 32.5%,
126
+ // 位置 1
127
+ 25.85% 38.53%;
128
+ }
129
+
130
+ $Pi: 3.1415926;
131
+
132
+ @for $i from 18 through 33 {
133
+ #{calc($i / 50 * 100%)} {
134
+ background-position: #{(50 - (25 * cos(($Pi * ($i - 10)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 10)) / 12)) * 1%},
135
+ #{(50 - (25 * cos(($Pi * ($i - 13)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 13)) / 12)) * 1%},
136
+ #{(50 - (25 * cos(($Pi * ($i - 15)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 15)) / 12)) * 1%},
137
+ #{(50 - (25 * cos(($Pi * ($i - 17)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 17)) / 12)) * 1%};
138
+ }
139
+ }
140
+
141
+ 68% {
142
+ background-size:
143
+ 10% 10%,
144
+ 7.5% 7.5%,
145
+ 5% 5%,
146
+ 2.5% 2.5%;
147
+ background-position:
148
+ // 位置 0
149
+ 25% 45%,
150
+ // 位置 22
151
+ 28.35% 57.45%,
152
+ // 位置 20
153
+ 37.45% 66.65%,
154
+ // 位置 18
155
+ 48% 70%;
156
+ }
157
+
158
+ 70% {
159
+ background-size:
160
+ 8.75% 8.75%,
161
+ 7.5% 7.5%,
162
+ 5% 5%,
163
+ 2.5% 2.5%;
164
+ background-position:
165
+ // 位置 0
166
+ 25% 45%,
167
+ // 位置 23
168
+ 25.85% 51.47%,
169
+ // 位置 21
170
+ 32.32% 62.68%,
171
+ // 位置 19
172
+ 43.53% 69.15%;
173
+ }
174
+
175
+ 72% {
176
+ background-size:
177
+ 7.5% 7.5%,
178
+ 7.5% 7.5%,
179
+ 5% 5%,
180
+ 2.5% 2.5%;
181
+ background-position:
182
+ // 位置 0
183
+ 25% 45%,
184
+ // 位置 0
185
+ 25% 45%,
186
+ // 位置 22
187
+ 28.35% 57.45%,
188
+ // 位置 20
189
+ 37.45% 66.65%;
190
+ }
191
+
192
+ 74% {
193
+ background-size:
194
+ 6.25% 6.25%,
195
+ 6.25% 6.25%,
196
+ 5% 5%,
197
+ 2.5% 2.5%;
198
+ background-position:
199
+ // 位置 0
200
+ 25% 45%,
201
+ // 位置 0
202
+ 25% 45%,
203
+ // 位置 23
204
+ 25.85% 51.47%,
205
+ // 位置 21
206
+ 32.32% 62.68%;
207
+ }
208
+
209
+ 76% {
210
+ background-size:
211
+ 5% 5%,
212
+ 5% 5%,
213
+ 5% 5%,
214
+ 2.5% 2.5%;
215
+ background-position:
216
+ // 位置 0
217
+ 25% 45%,
218
+ // 位置 0
219
+ 25% 45%,
220
+ // 位置 0
221
+ 25% 45%,
222
+ // 位置 22
223
+ 28.35% 57.45%;
224
+ }
225
+
226
+ 78% {
227
+ background-size:
228
+ 3.75% 3.75%,
229
+ 3.75% 3.75%,
230
+ 3.75% 3.75%,
231
+ 2.5% 2.5%;
232
+ background-position:
233
+ // 位置 0
234
+ 25% 45%,
235
+ // 位置 0
236
+ 25% 45%,
237
+ // 位置 0
238
+ 25% 45%,
239
+ // 位置 23
240
+ 25.85% 51.47%;
241
+ }
242
+ }
@@ -0,0 +1 @@
1
+ *,*::before,*::after{box-sizing:border-box;position:relative}html,body,figure,blockquote,dl,dd{margin:0}html{scroll-behavior:smooth}body{font-family:var(--en-font-body);font-size:var(--en-base-font-size);line-height:var(--en-font-content-line-height);text-rendering:optimizeSpeed;scroll-behavior:smooth}a:not([class]){text-decoration-skip-ink:auto}a{text-decoration:none}img,picture{display:block;max-width:100%}em{font-variation-settings:"slnt"-10}input,button,textarea,select{font:inherit}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition-delay:99999s;transition:color 99999s ease-out,background-color 99999s ease-out;-webkit-transition-delay:99999s;-webkit-transition:color 99999s ease-out,background-color 99999s ease-out;-webkit-text-fill-color:var(--en-text-primary)}@media(prefers-reduced-motion: reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;scroll-behavior:auto !important;transition-duration:.01ms !important}}
@@ -0,0 +1,94 @@
1
+ @use './vars-color.scss' as *;
2
+
3
+ /* 盒模型 规则 */
4
+ *,
5
+ *::before,
6
+ *::after {
7
+ box-sizing: border-box;
8
+ position: relative;
9
+ }
10
+
11
+ /* 移除默认的 margin 外边距 */
12
+ html,
13
+ body,
14
+ figure,
15
+ blockquote,
16
+ dl,
17
+ dd {
18
+ margin: 0;
19
+ }
20
+
21
+ /* 设置根元素 html 默认样式 */
22
+ html {
23
+ scroll-behavior: smooth;
24
+ }
25
+
26
+ /* 设置默认的 body 元素的样式 */
27
+ body {
28
+ font-family: var(--en-font-body);
29
+ font-size: var(--en-base-font-size);
30
+ line-height: var(--en-font-content-line-height);
31
+ text-rendering: optimizeSpeed; // 文本渲染,是快速还是清晰
32
+ scroll-behavior: smooth;
33
+ }
34
+
35
+ /* 链接元素没有 class 类时的展示 */
36
+ a:not([class]) {
37
+ text-decoration-skip-ink: auto;
38
+ }
39
+
40
+ a {
41
+ text-decoration: none;
42
+ }
43
+
44
+ /* 设置图片样式 */
45
+ img,
46
+ picture {
47
+ display: block;
48
+ max-width: 100%;
49
+ }
50
+
51
+ /* Fix Inter font bug: 'em' not slanted in Safari. See issue: https://github.com/mdn/yari/issues/7203 */
52
+ em {
53
+ font-variation-settings: 'slnt'-10;
54
+ }
55
+
56
+ /* Inherit fonts for inputs and buttons */
57
+ input,
58
+ button,
59
+ textarea,
60
+ select {
61
+ font: inherit;
62
+ }
63
+
64
+ /* 自动填充的密码的背景色设置动画已取消背景色 */
65
+ input:-webkit-autofill,
66
+ input:-webkit-autofill:hover,
67
+ input:-webkit-autofill:focus,
68
+ input:-webkit-autofill:active {
69
+ transition-delay: 99999s;
70
+ transition:
71
+ color 99999s ease-out,
72
+ background-color 99999s ease-out;
73
+ -webkit-transition-delay: 99999s;
74
+ -webkit-transition:
75
+ color 99999s ease-out,
76
+ background-color 99999s ease-out;
77
+ -webkit-text-fill-color: var(--en-text-primary);
78
+ }
79
+
80
+ /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
81
+ @media (prefers-reduced-motion: reduce) {
82
+ html {
83
+ scroll-behavior: auto;
84
+ }
85
+
86
+ *,
87
+ *::before,
88
+ *::after {
89
+ animation-duration: 0.01ms !important;
90
+ animation-iteration-count: 1 !important;
91
+ scroll-behavior: auto !important;
92
+ transition-duration: 0.01ms !important;
93
+ }
94
+ }
@@ -0,0 +1,54 @@
1
+ @use "./vars-color.scss" as *;
2
+
3
+ // 响应式断点变量
4
+ $breakpoints: (
5
+ // 手机竖屏
6
+ sm: 576px,
7
+ // 平板,大手机
8
+ md: 768px,
9
+ // 小桌面
10
+ lg: 992px,
11
+ // 标准桌面
12
+ xl: 1200px,
13
+ // 大桌面
14
+ xxl: 1400px
15
+ );
16
+
17
+ // 移动优先
18
+ // 基础媒体查询混入
19
+ @mixin respond-to($breakpoint) {
20
+ $value: map-get($breakpoints, $breakpoint);
21
+
22
+ @if $value {
23
+ @media screen and (min-width: $value) {
24
+ @content;
25
+ }
26
+ } @else {
27
+ @error "为定义的断点:`#{$breakpoint}`。";
28
+ }
29
+ }
30
+
31
+ // 悬停能力检测混入 - 移动优先
32
+ @mixin hover-supported {
33
+ @media (hover: hover) and (pointer: fine) {
34
+ &:hover {
35
+ @content;
36
+ }
37
+ }
38
+ }
39
+
40
+ // 混合响应式和悬停的复合混入
41
+ @mixin respond-with-hover($breakpoint) {
42
+ @include respond-to($breakpoint) {
43
+ @include hover-supported {
44
+ @content;
45
+ }
46
+ }
47
+ }
48
+
49
+ // 禁用动画
50
+ @mixin hover-forbidden {
51
+ @media (hover: none) {
52
+ @content;
53
+ }
54
+ }
@@ -0,0 +1,85 @@
1
+ @use './vars-color.scss' as color;
2
+
3
+ @mixin dark {
4
+ // 主要文本色(正文、标题)
5
+ --en-text-primary: var(--en-color-beige);
6
+ --en-text-primary-rgb: var(--en-color-beige-rgb);
7
+ // 次要文本色(辅助说明)
8
+ --en-text-secondary: var(--en-color-darkness-20);
9
+ --en-text-secondary-rgb: var(--en-color-darkness-20-rgb);
10
+ // 备注、浇注的文本色
11
+ --en-text-tertiary: var(--en-color-darkness-40);
12
+ --en-text-tertiary-rgb: var(--en-color-darkness-40-rgb);
13
+ --en-text-active: var(--en-color-darkness-50);
14
+ --en-text-active-rgb: var(--en-color-darkness-50-rgb);
15
+ --en-text-inactive: rgba(var(--en-color-darkness-20-rgb), 0.76);
16
+ --en-text-inactive-rgb: var(--en-color-darkness-20-rgb);
17
+ --en-text-link: var(--en-color-blue-30);
18
+ --en-text-link-rgb: var(--en-color-blue-30-rgb);
19
+ --en-text-invert: var(--en-color-darkness-90); // 文本反转色
20
+ --en-text-invert-rgb: var(--en-color-darkness-90-rgb); // 文本反转色
21
+ --en-text-muted: var(--en-color-darkness-60); // 温和文本色
22
+ --en-text-muted-rgb: var(--en-color-darkness-60-rgb); // 温和文本色
23
+ // 背景色
24
+ --en-background-primary: var(--en-color-darkness-90);
25
+ --en-background-primary-rgb: var(--en-color-darkness-90-rgb);
26
+ --en-background-secondary: var(--en-color-darkness-75);
27
+ --en-background-secondary-rgb: var(--en-color-darkness-75-rgb);
28
+ --en-background-tertiary: var(--en-color-darkness-60);
29
+ --en-background-tertiary-rgb: var(--en-color-darkness-60-rgb);
30
+ --en-background-weird: var(--en-color-darkness-70);
31
+ --en-background-weird-rgb: var(--en-color-darkness-70-rgb);
32
+ // 边框
33
+ --en-border-primary: var(--en-color-darkness-50);
34
+ --en-border-primary-rgb: var(--en-color-darkness-50-rgb);
35
+ --en-border-secondary: var(--en-color-darkness-60);
36
+ --en-border-secondary-rgb: var(--en-color-darkness-60-rgb);
37
+ // 成功盒子的提示框
38
+ --en-border-success: var(--en-color-green-20);
39
+ --en-border-success-rgb: var(--en-color-green-20-rgb);
40
+ // 按钮
41
+ --en-button-primary: var(--en-color-darkness-10);
42
+ --en-button-primary-rgb: var(--en-color-darkness-10-rgb);
43
+ --en-button-primary-hover: var(--en-color-darkness-15);
44
+ --en-button-primary-hover-rgb: var(--en-color-darkness-15-rgb);
45
+ --en-button-primary-active: var(--en-color-darkness-30);
46
+ --en-button-primary-active-rgb: var(--en-color-darkness-30-rgb);
47
+ --en-button-primary-inactive: var(--en-color-white);
48
+ --en-button-primary-inactive-rgb: var(--en-color-white-rgb);
49
+ --en-button-secondary: var(--en-color-darkness-70);
50
+ --en-button-secondary-rgb: var(--en-color-darkness-70-rgb);
51
+ --en-button-secondary-hover: var(--en-color-darkness-50);
52
+ --en-button-secondary-hover-rgb: var(--en-color-darkness-50-rgb);
53
+ --en-button-secondary-active: var(--en-color-darkness-40);
54
+ --en-button-secondary-active-rgb: var(--en-color-darkness-40-rgb);
55
+ --en-button-secondary-inactive: var(--en-color-darkness-70);
56
+ --en-button-secondary-inactive-rgb: var(--en-color-darkness-70-rgb);
57
+ --en-button-secondary-border-focus: var(--en-color-blue-60);
58
+ --en-button-secondary-border-focus-rgb: var(--en-color-blue-60-rgb);
59
+ // 红框按钮
60
+ --en-button-secondary-border-red: var(--en-color-red-30);
61
+ --en-button-secondary-border-red-rgb: var(--en-color-red-30-rgb);
62
+ --en-button-secondary-border-red-focus: var(--en-color-red-10);
63
+ --en-button-secondary-border-red-focus-rgb: var(--en-color-red-10-rgb);
64
+ --en-box-shadow-light: 0 1px 2px rgba(var(--en-color-darkness-10), 0.2);
65
+ --en-box-shadow-dark: 0 1px 6px rgba(var(--en-color-darkness-10), 0.2);
66
+ // ios 风格的按钮组
67
+ --en-close-button: var(--en-color-close-button);
68
+ // 输入框
69
+ --en-input-primary-text: var(--en-text-primary);
70
+ --en-input-primary-text-rgb: var(--en-text-primary-rgb);
71
+ --en-input-primary-background: var(--en-color-darkness-80);
72
+ --en-input-primary-background-rgb: var(--en-color-darkness-80-rgb);
73
+ --en-input-primary-placeholder-text: var(--en-color-darkness-45);
74
+ --en-input-primary-focus-visible-outline: var(--en-color-green-60) outset 1.5px;
75
+ --en-input-revers-text: var(--en-color-green-30);
76
+ --en-input-revers-text-rgb: var(--en-color-green-30-rgb);
77
+ --en-input-revers-background: var(--en-color-darkness-80);
78
+ --en-input-revers-background-rgb: var(--en-color-darkness-80-rgb);
79
+ --en-input-revers-placeholder-text: var(--en-color-darkness-45);
80
+ --en-input-revers-focus-visible-outline: var(--en-color-green-80) solid 2px;
81
+
82
+ color-scheme: dark;
83
+ color: var(--en-text-primary, #f0f2e5);
84
+ background-color: var(--en-background-primary, #333333);
85
+ }