hy-app 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +2 -1
  2. package/components/hy-back-top/index.scss +1 -10
  3. package/components/hy-badge/index.scss +5 -5
  4. package/components/hy-button/hy-button.vue +6 -7
  5. package/components/hy-button/index.scss +0 -11
  6. package/components/hy-calendar/index.scss +21 -24
  7. package/components/hy-calendar/month.vue +28 -6
  8. package/components/hy-calendar/props.ts +1 -1
  9. package/components/hy-card/index.scss +2 -11
  10. package/components/hy-cell/index.scss +9 -22
  11. package/components/hy-checkbox/hy-checkbox.vue +9 -6
  12. package/components/hy-checkbox/index.scss +14 -17
  13. package/components/hy-config-provider/hy-config-provider.vue +3 -1
  14. package/components/hy-config-provider/index.scss +2 -6
  15. package/components/hy-count-down/index.scss +0 -9
  16. package/components/hy-count-to/index.scss +1 -9
  17. package/components/hy-divider/index.scss +2 -1
  18. package/components/hy-divider/props.ts +2 -2
  19. package/components/hy-dropdown/index.scss +1 -1
  20. package/components/hy-dropdown-item/index.scss +3 -18
  21. package/components/hy-empty/index.scss +1 -10
  22. package/components/hy-float-button/index.scss +4 -9
  23. package/components/hy-form/index.scss +1 -8
  24. package/components/hy-grid/index.scss +1 -1
  25. package/components/hy-icon/index.scss +3 -9
  26. package/components/hy-image/hy-image.vue +5 -5
  27. package/components/hy-image/index.scss +2 -2
  28. package/components/hy-image/props.ts +1 -1
  29. package/components/hy-input/hy-input.vue +9 -14
  30. package/components/hy-input/index.scss +10 -12
  31. package/components/hy-input/props.ts +1 -1
  32. package/components/hy-line/index.scss +1 -0
  33. package/components/hy-line/props.ts +1 -1
  34. package/components/hy-line-progress/index.scss +1 -12
  35. package/components/hy-loading/index.scss +2 -2
  36. package/components/hy-modal/hy-modal.vue +3 -0
  37. package/components/hy-modal/index.scss +8 -20
  38. package/components/hy-modal/props.ts +3 -3
  39. package/components/hy-navbar/index.scss +3 -14
  40. package/components/hy-notice-bar/index.scss +31 -41
  41. package/components/hy-notice-bar/props.ts +2 -2
  42. package/components/hy-number-step/index.scss +6 -24
  43. package/components/hy-picker/index.scss +1 -1
  44. package/components/hy-popup/index.scss +1 -10
  45. package/components/hy-price/index.scss +0 -6
  46. package/components/hy-qrcode/index.scss +1 -1
  47. package/components/hy-radio/hy-radio.vue +8 -5
  48. package/components/hy-radio/index.scss +16 -18
  49. package/components/hy-rate/index.scss +1 -6
  50. package/components/hy-read-more/index.scss +3 -20
  51. package/components/hy-search/index.scss +5 -24
  52. package/components/hy-slider/index.scss +1 -1
  53. package/components/hy-slider/props.ts +2 -2
  54. package/components/hy-steps/hy-steps.vue +38 -20
  55. package/components/hy-steps/index.scss +6 -17
  56. package/components/hy-submit-bar/index.scss +1 -9
  57. package/components/hy-subsection/index.scss +2 -16
  58. package/components/hy-swipe-action/index.scss +0 -9
  59. package/components/hy-swiper/index.scss +0 -10
  60. package/components/hy-switch/index.scss +19 -18
  61. package/components/hy-switch/props.ts +0 -1
  62. package/components/hy-tabs/index.scss +2 -16
  63. package/components/hy-tag/index.scss +3 -3
  64. package/components/hy-text/hy-text.vue +5 -4
  65. package/components/hy-text/index.scss +3 -15
  66. package/components/hy-textarea/index.scss +4 -15
  67. package/components/hy-toast/index.scss +5 -22
  68. package/components/hy-tooltip/index.scss +5 -3
  69. package/components/hy-upload/index.scss +4 -14
  70. package/index.scss +1 -0
  71. package/libs/css/mixin.scss +6 -0
  72. package/libs/css/vars.css +47 -0
  73. package/package.json +1 -1
  74. package/theme.scss +41 -30
@@ -51,13 +51,13 @@
51
51
 
52
52
  <script lang="ts">
53
53
  export default {
54
- name: 'hy-text',
54
+ name: "hy-text",
55
55
  options: {
56
56
  addGlobalClass: true,
57
57
  virtualHost: true,
58
- styleIsolation: 'shared'
59
- }
60
- }
58
+ styleIsolation: "shared",
59
+ },
60
+ };
61
61
  </script>
62
62
 
63
63
  <script setup lang="ts">
@@ -243,6 +243,7 @@ const toLink = () => {
243
243
  <style scoped lang="scss">
244
244
  @import "./index.scss";
245
245
  @import "../../libs/css/mixin.scss";
246
+ /*超出出现省略号*/
246
247
  .hy-text__value--lines {
247
248
  @include multiEllipsis(v-bind(lines));
248
249
  }
@@ -1,23 +1,16 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- @include b(theme){
6
- @include m(dark) {
7
- @include b(text) {
8
- color: $hy-dark-color;
9
- }
10
- }
11
- }
12
4
 
13
5
  @include b(text) {
14
6
  @include flex(row);
15
7
  align-items: center;
16
8
  flex-wrap: nowrap;
9
+ color: $hy-text-color;
17
10
 
18
11
  &__price {
19
12
  font-size: 14px;
20
- color: $hy-text-color-grey;
13
+ color: $hy-text-color--grey;
21
14
  }
22
15
 
23
16
  &__value {
@@ -34,18 +27,13 @@
34
27
  color: $hy-primary;
35
28
  }
36
29
 
37
- /*超出出现省略号*/
38
- &--lines {
39
- @include multiEllipsis(v-bind(lines));
40
- }
41
-
42
30
  @include themeColor(primary, "", "", $hy-primary);
43
31
  @include themeColor(warning, "", "", $hy-warning);
44
32
  @include themeColor(success, "", "", $hy-success);
45
33
  @include themeColor(info, "", "", $hy-info);
46
34
  @include themeColor(error, "", "", $hy-error);
47
35
  @include themeColor(main, "", "", $hy-light-color);
48
- @include themeColor(content, "", "", $hy-text-color-grey);
36
+ @include themeColor(content, "", "", $hy-text-color--grey);
49
37
  @include themeColor(tips, "", "",$hy-tips-color);
50
38
  @include themeColor(light, "", "", $hy-border-color-light);
51
39
 
@@ -1,18 +1,6 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- @include b(theme){
6
- @include m(dark) {
7
- @include b(textarea) {
8
- color: $hy-dark-color;
9
- &--count {
10
- background-color: $hy-dark-background--container;
11
- }
12
- }
13
- }
14
- }
15
-
16
4
  @include b(textarea) {
17
5
  border-radius: $hy-border-radius-sm;
18
6
  position: relative;
@@ -29,7 +17,8 @@
29
17
  }
30
18
 
31
19
  &--disabled {
32
- background-color: $hy-light-background-disabled;
20
+ background-color: $hy-background--disabled;
21
+ color: $hy-text-color--disabled;
33
22
  }
34
23
 
35
24
  &__field {
@@ -43,8 +32,8 @@
43
32
  right: 5px;
44
33
  bottom: 2px;
45
34
  font-size: 12px;
46
- color: $hy-tips-color;
47
- background-color: #ffffff;
35
+ color: $hy-text-color--2;
36
+ background-color: $hy-background--3;
48
37
  padding: 1px 4px;
49
38
  border-radius: $hy-border-radius-sm;
50
39
  }
@@ -46,29 +46,12 @@
46
46
  }
47
47
  }
48
48
 
49
- @include m(success) {
50
- color: $hy-success;
51
- background-color: $hy-success-light;
52
- border: 1px solid #bef5c8;
53
- }
54
-
55
- @include m(primary) {
56
- color: $hy-primary;
57
- background-color: $hy-primary-light;
58
- border: 1px solid rgb(215, 234, 254);
59
- }
49
+ @include themeColor(success, $hy-success-light, #bef5c8, $hy-success);
50
+ @include themeColor(primary, $hy-primary-light, rgb(215, 234, 254), $hy-primary);
51
+ @include themeColor(error, $hy-error-light, #fde2e2, $hy-error);
52
+ @include themeColor(warning, $hy-warning-light, #faecd8, $hy-warning);
53
+ @include themeColor(info, $hy-info-light, $hy-info, $hy-info);
60
54
 
61
- @include m(error) {
62
- color: $hy-error;
63
- background-color: $hy-error-light;
64
- border: 1px solid #fde2e2;
65
- }
66
-
67
- @include m(warning) {
68
- color: $hy-warning;
69
- background-color: $hy-warning-light;
70
- border: 1px solid #faecd8;
71
- }
72
55
 
73
56
  @include m(default) {
74
57
  color: #ffffff;
@@ -31,14 +31,16 @@
31
31
  overflow: hidden;
32
32
 
33
33
  &__btn {
34
- padding: $hy-border-margin-padding-base;
34
+ padding: $hy-border-margin-padding-sm $hy-border-margin-padding-base;
35
+ display: flex;
36
+ justify-content: center;
37
+ align-items: center;
35
38
 
36
39
  &--hover {
37
- background-color: $hy-text-color-hover;
40
+ background-color: $hy-background--hover;
38
41
  }
39
42
 
40
43
  &__text {
41
- line-height: 12px;
42
44
  font-size: 13px;
43
45
  color: #ffffff;
44
46
  }
@@ -4,16 +4,6 @@
4
4
  $hy-upload-image-width: 80px !default;
5
5
  $hy-upload-text-font-size: 11px !default;
6
6
 
7
- /* 暗色主题 */
8
- @include b(theme){
9
- @include m(dark) {
10
- @include b(upload) {
11
- &__button {
12
- background-color: $hy-dark-background--container;
13
- }
14
- }
15
- }
16
- }
17
7
 
18
8
  @include b(upload) {
19
9
  @include flex(column);
@@ -110,7 +100,7 @@ $hy-upload-text-font-size: 11px !default;
110
100
  justify-content: center;
111
101
  width: $hy-upload-image-width;
112
102
  height: $hy-upload-image-width;
113
- background-color: rgb(244, 245, 247);
103
+ background-color: $hy-background--empty;
114
104
  border-radius: 2px;
115
105
  margin: 0 8px 8px 0;
116
106
  /* #ifndef APP-NVUE */
@@ -119,12 +109,12 @@ $hy-upload-text-font-size: 11px !default;
119
109
 
120
110
  &__text {
121
111
  font-size: $hy-upload-text-font-size;
122
- color: $hy-tips-color;
112
+ color: $hy-text-color--grey;
123
113
  margin-top: 2px;
124
114
  }
125
115
 
126
116
  &--hover {
127
- background-color: rgb(230, 231, 233);
117
+ background-color: $hy-background--hover;
128
118
  }
129
119
 
130
120
  &--disabled {
@@ -153,6 +143,6 @@ $hy-upload-text-font-size: 11px !default;
153
143
 
154
144
  .tips-text {
155
145
  font-size: 12px;
156
- color: #b99c65;
146
+ color: $hy-primary;
157
147
  }
158
148
  }
package/index.scss CHANGED
@@ -1,2 +1,3 @@
1
1
  @use "./libs/css/common.scss";
2
+ @use "./libs/css/vars.css";
2
3
  //@use "./libs/css/mixin.scss" as HyMixin;
@@ -33,6 +33,12 @@ $modifier-separator: '--';
33
33
  background-color: $bg-color;
34
34
  border: 1px solid $border-color;
35
35
  color: $color;
36
+
37
+ :deep() {
38
+ @include b(icon) {
39
+ color: $color;
40
+ }
41
+ }
36
42
  }
37
43
  }
38
44
 
@@ -0,0 +1,47 @@
1
+ .hy-theme--light {
2
+ --hy-warning--light: #fdf6ec;
3
+
4
+ --hy-text-color: #000000;
5
+ --hy-text-color--2: #67676c;
6
+ --hy-text-color--3: #929295;
7
+ --hy-text-color--4: rgba(0, 0, 0, 0.1);
8
+ --hy-icon-color: #606266;
9
+ --hy-text-color--placeholder: rgba(0, 0, 0, 0.25);
10
+ --hy-text-color--disabled: rgba(0, 0, 0, 0.25);
11
+
12
+ --hy-background: #f8f8f8;
13
+ --hy-background--2: #FFFFFF;
14
+ --hy-background--3: rgb(238, 238, 239);
15
+ --hy-background--container: #FFFFFF;
16
+ --hy-background--disabled: rgba(0, 0, 0, 0.04);
17
+ --hy-background--empty: #F3F3F3;
18
+ --hy-background--hover: rgba(0,0,0,0.2);
19
+
20
+ --hy-border-line: 1rpx solid #c2c2c4;
21
+ }
22
+
23
+ .hy-theme--dark {
24
+ --hy-warning--light: rgba(255, 153, 0, 0.3);
25
+ --hy-theme--light: rgba(41, 121, 255, 0.3);
26
+ --hy-success--light: rgba(25, 190, 107, 0.3);
27
+ --hy-error--light: rgba(250, 53, 52, 0.3);
28
+ --hy-info--light: rgba(144, 147, 153, 0.3);
29
+
30
+ --hy-text-color: #ffffff;
31
+ --hy-text-color-2: #98989f;
32
+ --hy-text-color-3: #6a6a71;
33
+ --hy-text-color--4: rgba(255, 255, 255, 0.1);
34
+ --hy-icon-color: #FFFFFF;
35
+ --hy-text-color--placeholder: rgba(255, 255, 255, 0.25);
36
+ --hy-text-color--disabled: rgba(255, 255, 255, 0.25);
37
+
38
+ --hy-background: #1b1b1f;
39
+ --hy-background--2: #161616;
40
+ --hy-background--3: #646566;
41
+ --hy-background--container: #242424;
42
+ --hy-background--disabled: rgba(255, 255, 255, 0.08);
43
+ --hy-background--empty: #3A3A44;
44
+ --hy-background--hover: rgba(255,255,255,0.2);
45
+
46
+ --hy-border-line: 1rpx solid #3c3f44;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "全局主题色配置",
5
5
  "main": "./index.ts",
6
6
  "private": false,
package/theme.scss CHANGED
@@ -1,38 +1,29 @@
1
1
  /* 主题是相关颜色 */
2
2
  $hy-primary: var(--hy-theme-color, #2979ff) !default;
3
- $hy-primary-dark: var(--hy-theme-dark, #2b85e4) !default;
4
- $hy-primary-disabled: var(--hy-theme-disabled, #a0cfff) !default;
5
- $hy-primary-light: var(--hy-theme-color--light, #ecf5ff) !default;
3
+ $hy-primary-dark: var(--hy-theme--dark, #2b85e4) !default;
4
+ $hy-primary-disabled: var(--hy-theme--disabled, #a0cfff) !default;
5
+ $hy-primary-light: var(--hy-theme--light, #ecf5ff) !default;
6
6
 
7
7
  $hy-warning: var(--hy-warning, #ff9900) !default;
8
- $hy-warning-dark: var(--hy-warning-dark, #f29100) !default;
9
- $hy-warning-disabled: var(--hy-warning-disabled, #fcbd71) !default;
10
- $hy-warning-light: var(--hy-warning-light, #fdf6ec) !default;
8
+ $hy-warning-dark: var(--hy-warning--dark, #f29100) !default;
9
+ $hy-warning-disabled: var(--hy-warning--disabled, #fcbd71) !default;
10
+ $hy-warning-light: var(--hy-warning--light, #fdf6ec) !default;
11
11
 
12
12
  $hy-success: var(--hy-success, #19be6b) !default;
13
- $hy-success-dark: var(--hy-success-dark, #18b566) !default;
14
- $hy-success-disabled: var(--hy-success-disabled, #71d5a1) !default;
15
- $hy-success-light: var(--hy-success-light, #dbf1e1) !default;
13
+ $hy-success-dark: var(--hy-success--dark, #18b566) !default;
14
+ $hy-success-disabled: var(--hy-success--disabled, #71d5a1) !default;
15
+ $hy-success-light: var(--hy-success--light, #dbf1e1) !default;
16
16
 
17
17
  $hy-error: var(--hy-error, #fa3534) !default;
18
- $hy-error-dark: var(--hy-error-dark, #dd6161) !default;
19
- $hy-error-disabled: var(--hy-error-disabled, #fab6b6) !default;
20
- $hy-error-light: var(--hy-error-light, #fef0f0) !default;
18
+ $hy-error-dark: var(--hy-error--dark, #dd6161) !default;
19
+ $hy-error-disabled: var(--hy-error--disabled, #fab6b6) !default;
20
+ $hy-error-light: var(--hy-error--light, #fef0f0) !default;
21
21
 
22
22
  $hy-info: var(--hy-info, #909399) !default;
23
- $hy-info-dark: var(--hy-info-dark, #82848a) !default;
24
- $hy-info-disabled: var(--hy-info-disabled, #c8c9cc) !default;
25
- $hy-info-light: var(--hy-info-light, #f4f4f5) !default;
26
-
27
- /* 暗黑模式 */
28
- $hy-dark-background: var(--hy-dark-background, #131313) !default; // 背景色
29
- $hy-dark-background--2: var(--hy-dark-background--2, #161616) !default; // 弹窗背景色
30
- $hy-dark-background--container: var(--hy-dark-background--container, #242424) !default;
31
- $hy-dark-background--track: var(--hy-dark-background--track, #646566) !default;
32
- $hy-dark-background--empty: var(--hy-dark-background--empty, #3A3A44) !default; // 搜索背景色
33
- $hy-dark-background--hover: var(--hy-dark-background--hover, #707070) !default; // 点击状态
34
- $hy-dark-background3: #141414 !default;
35
- $hy-dark-background6: #380e08 !default;
23
+ $hy-info-dark: var(--hy-info--dark, #82848a) !default;
24
+ $hy-info-disabled: var(--hy-info--disabled, #c8c9cc) !default;
25
+ $hy-info-light: var(--hy-info--light, #f4f4f5) !default;
26
+
36
27
 
37
28
  $hy-dark-bg-disabled: rgba(48, 48, 56, 0.51) !default;
38
29
  $hy-dark-color: #ffffff !default;
@@ -53,9 +44,6 @@ $hy-light-background-image: var(--hy-light-background-image, #F3F3F3) !default;
53
44
 
54
45
  /* 文字基本颜色 */
55
46
  $hy-light-color: var(--hy-light-color, #333) !default; //基本色
56
- $hy-text-color-grey: var(--hy-text-color-grey, #999) !default; //辅助灰色,如加载更多的提示信息
57
- $hy-text-color-placeholder: var(--hy-text-color-placeholder, #808080) !default; // 输入框提示颜色
58
- $hy-text-color-disable: var(--hy-text-color-disable, #c0c0c0) !default; // 禁用文字颜色
59
47
  $hy-text-color-hover: var(--hy-text-color-hover, #58595b)!default;
60
48
 
61
49
  $hy-tips-color: #909193FF;
@@ -89,7 +77,7 @@ $hy-img-size-lg: var(--hy-img-size-lg, 120rpx) !default;
89
77
 
90
78
  /* 头像大小 */
91
79
  $hy-avatar-size-sm: var(--hy-avatar-size-sm, 80rpx) !default;
92
- $hy-avatar-size-base: 100rpx var(--hy-avatar-size-base, 100rpx) !default;
80
+ $hy-avatar-size-base: var(--hy-avatar-size-base, 100rpx) !default;
93
81
  $hy-avatar-size-lg: var(--hy-avatar-size-lg, 120rpx) !default;
94
82
 
95
83
  /* 透明度 */
@@ -109,4 +97,27 @@ $hy-border-margin-padding-sm: var(--hy-border-margin-padding-sm, 10rpx) !default
109
97
  $hy-border-margin-padding-base: var(--hy-border-margin-padding-base, 20rpx) !default;
110
98
  $hy-border-margin-padding-lg: var(--hy-border-margin-padding-lg, 30rpx) !default;
111
99
  /* 底部线条 */
112
- $hy-border-line: var(--hy-border-line, 1rpx solid #dadbde) !default;
100
+ $hy-border-line: var(--hy-border-line, 1rpx solid #dadbde) !default;
101
+
102
+
103
+ /* 字体 */
104
+ $hy-text-color: var(--hy-text-color, #3c3c43) !default; // 一般用于文字
105
+ $hy-text-color--2: var(--hy-text-color--2, #67676c) !default; // 一般用于icon
106
+ $hy-text-color--3: var(--hy-text-color--3, #929295) !default; // 一般用于icon
107
+ $hy-text-color--4: var(--hy-text-color--4, #929295) !default; // 一般用于icon
108
+ $hy-icon-color: var(--hy-icon-color, #606266) !default; // 一般用于icon
109
+ $hy-text-color--grey: var(--hy-text-color-3, #999) !default; // 辅助灰色,如加载更多的提示信息
110
+ $hy-text-color--placeholder: var(--hy-text-color--placeholder, #808080) !default; // 输入框提示颜色
111
+ $hy-text-color--disabled: var(--hy-text-color--disabled, #c0c0c0) !default; // 禁用文字颜色
112
+ $hy-border-color: var(--hy-border-color, #c0c0c0) !default;
113
+
114
+
115
+ /* 背景色 */
116
+ $hy-background: var(--hy-background, #f8f8f8) !default; // 背景色
117
+ $hy-background--2: var(--hy-background--2, #ffffff) !default; // 弹窗背景色
118
+ $hy-background--3: var(--hy-background--3, #646566) !default; // 弹窗背景色
119
+ $hy-background--container: var(--hy-background--container, #ffffff) !default; // 容器背景色
120
+ $hy-background--disabled: var(--hy-background--disabled, #F5F5F5); // 禁用背景色
121
+ $hy-background--track: var(--hy-background--track, #c6c7cb) !default;
122
+ $hy-background--empty: var(--hy-background--empty, #f6f6f7) !default; // 搜索背景色
123
+ $hy-background--hover: var(--hy-background--hover, #707070) !default; // 点击状态