hy-app 0.2.0 → 0.2.2

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 (104) 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 +4 -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-code-input/hy-code-input.vue +223 -0
  14. package/components/hy-code-input/index.scss +108 -0
  15. package/components/hy-code-input/props.ts +21 -0
  16. package/components/hy-code-input/typing.d.ts +65 -0
  17. package/components/hy-config-provider/hy-config-provider.vue +2 -1
  18. package/components/hy-config-provider/index.scss +2 -6
  19. package/components/hy-count-down/index.scss +0 -9
  20. package/components/hy-count-to/index.scss +1 -9
  21. package/components/hy-divider/index.scss +2 -1
  22. package/components/hy-divider/props.ts +2 -2
  23. package/components/hy-dropdown/index.scss +1 -1
  24. package/components/hy-dropdown/props.ts +1 -1
  25. package/components/hy-dropdown-item/hy-dropdown-item.vue +2 -5
  26. package/components/hy-dropdown-item/index.scss +13 -30
  27. package/components/hy-empty/index.scss +1 -10
  28. package/components/hy-float-button/index.scss +4 -9
  29. package/components/hy-form/index.scss +1 -8
  30. package/components/hy-grid/hy-grid.vue +5 -5
  31. package/components/hy-grid/index.scss +1 -1
  32. package/components/hy-icon/index.scss +4 -9
  33. package/components/hy-image/hy-image.vue +5 -5
  34. package/components/hy-image/index.scss +2 -2
  35. package/components/hy-image/props.ts +1 -1
  36. package/components/hy-input/hy-input.vue +9 -14
  37. package/components/hy-input/index.scss +10 -12
  38. package/components/hy-input/props.ts +1 -1
  39. package/components/hy-line/index.scss +1 -0
  40. package/components/hy-line/props.ts +1 -1
  41. package/components/hy-line-progress/index.scss +1 -12
  42. package/components/hy-loading/index.scss +2 -2
  43. package/components/hy-modal/hy-modal.vue +8 -5
  44. package/components/hy-modal/index.scss +7 -25
  45. package/components/hy-modal/props.ts +3 -3
  46. package/components/hy-navbar/index.scss +3 -14
  47. package/components/hy-notice-bar/index.scss +31 -41
  48. package/components/hy-notice-bar/props.ts +2 -2
  49. package/components/hy-notify/hy-notify.vue +169 -0
  50. package/components/hy-notify/index.scss +25 -0
  51. package/components/hy-notify/props.ts +14 -0
  52. package/components/hy-notify/typing.d.ts +44 -0
  53. package/components/hy-number-step/index.scss +6 -24
  54. package/components/hy-pagination/hy-pagination.vue +125 -0
  55. package/components/hy-pagination/index.scss +46 -0
  56. package/components/hy-pagination/props.ts +15 -0
  57. package/components/hy-pagination/typing.d.ts +44 -0
  58. package/components/hy-picker/index.scss +5 -1
  59. package/components/hy-popup/index.scss +1 -10
  60. package/components/hy-price/index.scss +0 -6
  61. package/components/hy-qrcode/index.scss +1 -1
  62. package/components/hy-radio/hy-radio.vue +8 -5
  63. package/components/hy-radio/index.scss +16 -18
  64. package/components/hy-rate/index.scss +1 -6
  65. package/components/hy-read-more/index.scss +3 -20
  66. package/components/hy-scroll-list/index.scss +1 -1
  67. package/components/hy-search/index.scss +6 -26
  68. package/components/hy-signature/canvasHelper.ts +51 -0
  69. package/components/hy-signature/hy-signature.vue +656 -0
  70. package/components/hy-signature/index.scss +31 -0
  71. package/components/hy-signature/props.ts +28 -0
  72. package/components/hy-signature/typing.d.ts +177 -0
  73. package/components/hy-slider/index.scss +6 -2
  74. package/components/hy-slider/props.ts +2 -2
  75. package/components/hy-steps/hy-steps.vue +38 -20
  76. package/components/hy-steps/index.scss +6 -17
  77. package/components/hy-submit-bar/index.scss +1 -9
  78. package/components/hy-subsection/index.scss +2 -16
  79. package/components/hy-swipe-action/hy-swipe-action.vue +288 -248
  80. package/components/hy-swipe-action/index.scss +32 -7
  81. package/components/hy-swipe-action/index.ts +34 -0
  82. package/components/hy-swipe-action/props.ts +15 -9
  83. package/components/hy-swipe-action/typing.d.ts +20 -22
  84. package/components/hy-swiper/index.scss +5 -10
  85. package/components/hy-switch/index.scss +19 -18
  86. package/components/hy-switch/props.ts +0 -1
  87. package/components/hy-tabs/index.scss +4 -18
  88. package/components/hy-tag/index.scss +3 -3
  89. package/components/hy-text/hy-text.vue +5 -4
  90. package/components/hy-text/index.scss +3 -15
  91. package/components/hy-textarea/hy-textarea.vue +5 -5
  92. package/components/hy-textarea/index.scss +8 -20
  93. package/components/hy-toast/index.scss +5 -22
  94. package/components/hy-tooltip/index.scss +7 -5
  95. package/components/hy-upload/index.scss +5 -15
  96. package/composables/index.ts +1 -0
  97. package/composables/useTouch.ts +48 -0
  98. package/index.scss +1 -0
  99. package/libs/css/mixin.scss +58 -13
  100. package/libs/css/vars.css +53 -0
  101. package/package.json +2 -2
  102. package/theme.scss +42 -54
  103. package/components/hy-swipe-action/index.wxs +0 -235
  104. package/components/hy-swipe-action/wxs.js +0 -15
@@ -1,17 +1,10 @@
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(form) {
8
- color: $hy-dark-color;
9
- }
10
- }
11
- }
12
4
 
13
5
  @include b(form) {
14
6
  @include m(item) {
7
+ color: $hy-text-color;
15
8
  display: flex;
16
9
  //align-items: center;
17
10
  margin-bottom: $hy-border-margin-padding-lg;
@@ -13,7 +13,7 @@
13
13
  :name="item?.icon"
14
14
  label-pos="bottom"
15
15
  :label="item?.name"
16
- :space="item?.iconConfig?.space || iconConfig?.space || 12"
16
+ :space="item?.iconConfig?.space || iconConfig?.space || 8"
17
17
  :color="item?.iconConfig?.color || iconConfig?.color"
18
18
  :size="item?.iconConfig?.size || iconConfig?.size || 30"
19
19
  :bold="item?.iconConfig?.bold || iconConfig?.bold"
@@ -37,13 +37,13 @@
37
37
 
38
38
  <script lang="ts">
39
39
  export default {
40
- name: 'hy-grid',
40
+ name: "hy-grid",
41
41
  options: {
42
42
  addGlobalClass: true,
43
43
  virtualHost: true,
44
- styleIsolation: 'shared'
45
- }
46
- }
44
+ styleIsolation: "shared",
45
+ },
46
+ };
47
47
  </script>
48
48
 
49
49
  <script setup lang="ts">
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  &__title {
35
- color: #000;
35
+ color: $hy-text-color;
36
36
  line-height: 60rpx;
37
37
  font-size: $hy-font-size-sm;
38
38
  }
@@ -2,21 +2,13 @@
2
2
  @use "../../public/font/iconfont.css" as *;
3
3
  @use "../../theme.scss" as *;
4
4
 
5
- /* 暗色主题 */
6
- @include b(theme){
7
- @include m(dark) {
8
- @include b(icon) {
9
- color: $hy-dark-color;
10
- }
11
- }
12
- }
13
5
 
14
6
  @include b(icon) {
15
7
  /* #ifndef APP-NVUE */
16
8
  display: flex;
17
9
  /* #endif */
18
10
  align-items: center;
19
- color: $hy-text-color-grey;
11
+ color: $hy-icon-color;
20
12
 
21
13
  @include m(left) {
22
14
  flex-direction: row-reverse;
@@ -42,6 +34,7 @@
42
34
  position: relative;
43
35
  @include flex;
44
36
  align-items: center;
37
+ vertical-align: -100%;
45
38
 
46
39
  &--primary {
47
40
  color: $hy-primary;
@@ -77,6 +70,8 @@
77
70
  /* #ifndef APP-NVUE */
78
71
  line-height: 1;
79
72
  /* #endif */
73
+ color: $hy-text-color--grey;
74
+ font-size: 12px;
80
75
  }
81
76
  }
82
77
  @include b(rotate) {
@@ -56,13 +56,13 @@
56
56
 
57
57
  <script lang="ts">
58
58
  export default {
59
- name: 'hy-image',
59
+ name: "hy-image",
60
60
  options: {
61
61
  addGlobalClass: true,
62
62
  virtualHost: true,
63
- styleIsolation: 'shared'
64
- }
65
- }
63
+ styleIsolation: "shared",
64
+ },
65
+ };
66
66
  </script>
67
67
 
68
68
  <script setup lang="ts">
@@ -217,7 +217,7 @@ const onLoadHandler = (e: Event) => {
217
217
  const removeBgColor = () => {
218
218
  // 淡入动画过渡完成后,将背景设置为透明色,否则png图片会看到灰色的背景
219
219
  backgroundStyle.value = {
220
- backgroundColor: bgColor.value || "#ffffff",
220
+ backgroundColor: bgColor.value || "",
221
221
  };
222
222
  };
223
223
  </script>
@@ -20,8 +20,8 @@
20
20
  @include flex;
21
21
  align-items: center;
22
22
  justify-content: center;
23
- background-color: $hy-light-background-image;
24
- color: $hy-text-color-grey;
23
+ background-color: $hy-background--empty;
24
+ color: $hy-text-color--grey;
25
25
  font-size: 46px;
26
26
  }
27
27
  }
@@ -17,7 +17,7 @@ const defaultProps: IProps = {
17
17
  fade: true,
18
18
  webp: false,
19
19
  duration: 500,
20
- bgColor: "#f3f4f6",
20
+ bgColor: "",
21
21
  previewImage: false,
22
22
  };
23
23
 
@@ -101,13 +101,13 @@
101
101
 
102
102
  <script lang="ts">
103
103
  export default {
104
- name: 'hy-input',
104
+ name: "hy-input",
105
105
  options: {
106
106
  addGlobalClass: true,
107
107
  virtualHost: true,
108
- styleIsolation: 'shared'
109
- }
110
- }
108
+ styleIsolation: "shared",
109
+ },
110
+ };
111
111
  </script>
112
112
 
113
113
  <script setup lang="ts">
@@ -204,6 +204,7 @@ const inputClass = computed((): string => {
204
204
  classes.push(`hy-input--${shape}`);
205
205
  border === "bottom" &&
206
206
  (classes = classes.concat(["hy-border__bottom", "hy-input--no-radius"]));
207
+ disabled.value && classes.push("hy-input--disabled");
207
208
  return classes.join(" ");
208
209
  });
209
210
 
@@ -212,17 +213,11 @@ const inputClass = computed((): string => {
212
213
  * */
213
214
  const wrapperStyle = computed((): CSSProperties => {
214
215
  const style: CSSProperties = {};
216
+ style.paddingTop = "6px";
217
+ style.paddingBottom = "6px";
218
+ style.paddingLeft = "9px";
219
+ style.paddingRight = "9px";
215
220
  // 禁用状态下,被背景色加上对应的样式
216
- // 无边框时,去除内边距
217
- if (border.value === "none") {
218
- style.padding = "0";
219
- } else {
220
- // 由于uni-app的iOS开发者能力有限,导致需要分开写才有效
221
- style.paddingTop = "6px";
222
- style.paddingBottom = "6px";
223
- style.paddingLeft = "9px";
224
- style.paddingRight = "9px";
225
- }
226
221
  if (disabled.value) {
227
222
  style.backgroundColor = disabledColor.value;
228
223
  }
@@ -1,28 +1,26 @@
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(input) {
8
- color: $hy-dark-color;
9
- }
10
- }
11
- }
12
-
13
4
  @include b(input) {
14
5
  @include flex(row);
15
6
  align-items: center;
16
7
  justify-content: space-between;
17
8
  flex: 1;
18
- color:
19
- $hy-light-color;
9
+ color: $hy-text-color;
20
10
 
21
11
  &--radius,
22
12
  &--square {
23
13
  border-radius: 4px;
24
14
  }
25
15
 
16
+ @include m(disabled) {
17
+ background-color: $hy-background--disabled;
18
+ color: $hy-text-color--disabled;
19
+ :deep(.hy-icon) {
20
+ color: $hy-text-color--disabled;
21
+ }
22
+ }
23
+
26
24
  &--no-radius {
27
25
  border-radius: 0;
28
26
  }
@@ -56,7 +54,7 @@ $hy-light-color;
56
54
  width: 20px;
57
55
  height: 20px;
58
56
  border-radius: 100px;
59
- background-color: #c6c7cb;
57
+ background-color: $hy-background--track;
60
58
  @include flex(row);
61
59
  align-items: center;
62
60
  justify-content: center;
@@ -5,7 +5,7 @@ const defaultProps: IProps = {
5
5
  type: "text",
6
6
  fixed: false,
7
7
  disabled: false,
8
- disabledColor: "#F5F5F5",
8
+ disabledColor: "",
9
9
  clearable: false,
10
10
  password: false,
11
11
  maxlength: 140,
@@ -5,4 +5,5 @@
5
5
  /* #ifndef APP-NVUE */
6
6
  vertical-align: middle;
7
7
  /* #endif */
8
+ border-color: $hy-border-color;
8
9
  }
@@ -1,7 +1,7 @@
1
1
  import type IProps from "./typing";
2
2
 
3
3
  const defaultProps: IProps = {
4
- color: "#dcdfe6",
4
+ color: "",
5
5
  length: "100%",
6
6
  direction: "row",
7
7
  hairline: true,
@@ -1,17 +1,6 @@
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(line-progress) {
8
- &__background {
9
- background-color: $hy-dark-background--track;
10
- }
11
- }
12
- }
13
- }
14
-
15
4
  @include b(line-progress) {
16
5
  align-items: stretch;
17
6
  position: relative;
@@ -21,7 +10,7 @@
21
10
  border-radius: $hy-border-radius-semicircle;
22
11
 
23
12
  &__background {
24
- background-color: $hy-info-light;
13
+ background-color: $hy-background--empty;
25
14
  border-radius: $hy-border-radius-semicircle;
26
15
  flex: 1;
27
16
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  &__text {
12
12
  margin-left: 4px;
13
- color: $hy-text-color-grey;
13
+ color: $hy-text-color--grey;
14
14
  font-size: 14px;
15
15
  line-height: 20px;
16
16
  }
@@ -59,7 +59,7 @@
59
59
 
60
60
  &--vertical &__text {
61
61
  margin: 6px 0 0;
62
- color: $hy-text-color-grey;
62
+ color: $hy-text-color--grey;
63
63
  }
64
64
 
65
65
  &__dot {
@@ -65,10 +65,11 @@
65
65
  >{{ cancelText }}</text
66
66
  >
67
67
  </view>
68
- <view
69
- class="hy-modal__button-group__wrapper--line"
68
+ <hy-line
70
69
  v-if="showConfirmButton && showCancelButton"
71
- ></view>
70
+ length="48px"
71
+ direction="column"
72
+ ></hy-line>
72
73
  <view
73
74
  class="hy-modal__button-group__wrapper hy-modal__button-group__wrapper--confirm"
74
75
  :hover-stay-time="150"
@@ -113,10 +114,9 @@ import { ref, toRefs, watch } from "vue";
113
114
  import defaultProps from "./props";
114
115
  import type IProps from "./typing";
115
116
  import { addUnit } from "../../utils";
116
- import { IconConfig } from "../../config";
117
117
 
118
118
  // 组件
119
- import HyIcon from "../hy-icon/hy-icon.vue";
119
+ import HyLine from "../hy-line/hy-line.vue";
120
120
  import HyPopup from "../hy-popup/hy-popup.vue";
121
121
  import HyLoading from "../hy-loading/hy-loading.vue";
122
122
 
@@ -167,4 +167,7 @@ const clickHandler = () => {
167
167
 
168
168
  <style lang="scss" scoped>
169
169
  @import "./index.scss";
170
+ .modal__content__text {
171
+ text-align: v-bind(contentTextAlign);
172
+ }
170
173
  </style>
@@ -1,20 +1,8 @@
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(modal) {
8
- color: $hy-dark-color;
9
- &__button-group__wrapper--hover {
10
- background-color: $hy-dark-background--hover;
11
- }
12
- }
13
- }
14
- }
15
-
16
4
  @include b(modal) {
17
- width: 650rpx;
5
+ max-width: 650rpx;
18
6
  border-radius: $hy-border-radius-base;
19
7
  overflow: hidden;
20
8
 
@@ -25,21 +13,21 @@
25
13
  align-items: center;
26
14
  font-size: 16px;
27
15
  font-weight: bold;
28
- color: $hy-color-title;
16
+ color: $hy-text-color;
29
17
  text-align: center;
30
18
  padding-top: 25px;
31
19
  }
32
20
 
33
21
  &__content {
34
- padding: 30px 40px;
22
+ padding: 20px;
35
23
  @include flex;
36
24
  justify-content: center;
37
25
 
38
26
  &__text {
39
- text-align: v-bind(contentTextAlign);
40
27
  font-size: 15px;
41
- color: $hy-text-color-grey;
28
+ color: $hy-text-color--grey;
42
29
  flex: 1;
30
+ text-align: center;
43
31
  }
44
32
  }
45
33
 
@@ -59,12 +47,6 @@
59
47
  align-items: center;
60
48
  height: 48px;
61
49
 
62
- &--line {
63
- background: $hy-border-color-light;
64
- width: 1px;
65
- height: 48px;
66
- }
67
-
68
50
  &--confirm,
69
51
  &--only-cancel {
70
52
  border-bottom-right-radius: $hy-border-radius-base;
@@ -76,11 +58,11 @@
76
58
  }
77
59
 
78
60
  &--hover {
79
- background-color: $hy-light-background-hover;
61
+ background-color: $hy-background--hover;
80
62
  }
81
63
 
82
64
  &__text {
83
- color: $hy-color-subtitle;
65
+ color: $hy-text-color--2;
84
66
  font-size: 16px;
85
67
  text-align: center;
86
68
  }
@@ -9,14 +9,14 @@ const defaultProps: IProps = {
9
9
  cancelText: "取消",
10
10
  showConfirmButton: true,
11
11
  showCancelButton: false,
12
- confirmColor: ColorConfig.primary,
13
- cancelColor: "#606266",
12
+ confirmColor: "",
13
+ cancelColor: "",
14
14
  buttonReverse: false,
15
15
  zoom: true,
16
16
  asyncClose: false,
17
17
  closeOnClickOverlay: false,
18
18
  negativeTop: 0,
19
- width: "650rpx",
19
+ width: "550rpx",
20
20
  confirmButtonShape: "",
21
21
  contentTextAlign: "left",
22
22
  };
@@ -1,20 +1,9 @@
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(navbar) {
8
- &__content {
9
- color: $hy-dark-color;
10
- background-color: $hy-dark-background;
11
- }
12
- }
13
- }
14
- }
15
4
 
16
5
  @include b(navbar) {
17
- &--fixed {
6
+ @include m(fixed) {
18
7
  position: fixed;
19
8
  left: 0;
20
9
  right: 0;
@@ -26,7 +15,7 @@
26
15
  @include flex(row);
27
16
  align-items: center;
28
17
  height: 44px;
29
- background-color: #F8F8F8;
18
+ background-color: $hy-background;
30
19
  position: relative;
31
20
  justify-content: center;
32
21
 
@@ -62,7 +51,7 @@
62
51
  }
63
52
  &--sub {
64
53
  font-size: $hy-font-size-hint;
65
- color: $hy-color-hint;
54
+ color: $hy-text-color--grey;
66
55
  }
67
56
  }
68
57
 
@@ -7,9 +7,21 @@
7
7
  align-items: center;
8
8
  justify-content: space-between;
9
9
 
10
+ &-bar {
11
+ overflow: hidden;
12
+ padding: 9px 12px;
13
+ flex: 1;
14
+ background-color: $hy-warning-light;
15
+ color: $hy-warning;
16
+ border-radius: $hy-border-radius-sm;
17
+ }
18
+
10
19
  &__left-icon {
11
20
  align-items: center;
12
21
  margin-right: 5px;
22
+ :deep(.hy-icon) {
23
+ color: $hy-warning;
24
+ }
13
25
  }
14
26
 
15
27
  &__right-icon {
@@ -38,6 +50,24 @@
38
50
  line-height: 100%;
39
51
  }
40
52
  }
53
+
54
+ &__swiper {
55
+ height: 16px;
56
+ @include flex;
57
+ align-items: center;
58
+ flex: 1;
59
+
60
+ &__item {
61
+ @include flex;
62
+ align-items: center;
63
+ overflow: hidden;
64
+
65
+ &__text {
66
+ font-size: 14px;
67
+ color: $u-warning;
68
+ }
69
+ }
70
+ }
41
71
  }
42
72
 
43
73
  /* #ifndef APP-NVUE */
@@ -50,44 +80,4 @@
50
80
  transform: translate3d(-100%, 0, 0);
51
81
  }
52
82
  }
53
- /* #endif */
54
-
55
- @include b(notice-bar) {
56
- overflow: hidden;
57
- padding: 9px 12px;
58
- flex: 1;
59
- }
60
-
61
- //.hy-notice {
62
- // @include flex;
63
- // align-items: center;
64
- // justify-content: space-between;
65
- //
66
- // &__left-icon {
67
- // align-items: center;
68
- // margin-right: 5px;
69
- // }
70
- //
71
- // &__right-icon {
72
- // margin-left: 5px;
73
- // align-items: center;
74
- // }
75
- //
76
- // &__swiper {
77
- // height: 16px;
78
- // @include flex;
79
- // align-items: center;
80
- // flex: 1;
81
- //
82
- // &__item {
83
- // @include flex;
84
- // align-items: center;
85
- // overflow: hidden;
86
- //
87
- // &__text {
88
- // font-size: 14px;
89
- // color: $hy-warning;
90
- // }
91
- // }
92
- // }
93
- //}
83
+ /* #endif */
@@ -7,8 +7,8 @@ const defaultProps: IProps = {
7
7
  step: false,
8
8
  icon: IconConfig.NOTIFICATION_FILL,
9
9
  mode: "",
10
- color: "#f9ae3d",
11
- bgColor: "#fdf6ec",
10
+ color: "",
11
+ bgColor: "",
12
12
  speed: 80,
13
13
  fontSize: 14,
14
14
  duration: 2000,