renusify 1.0.5 → 1.0.8

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 (53) hide show
  1. package/components/app/index.vue +23 -32
  2. package/components/app/style.scss +7 -18
  3. package/components/bar/bottomNavigationCircle.vue +75 -81
  4. package/components/bar/scss/bottomNav.scss +4 -13
  5. package/components/bar/scss/toolbar.scss +4 -9
  6. package/components/breadcrumb/style.scss +3 -9
  7. package/components/button/buttonConfirm.vue +44 -0
  8. package/components/button/style.scss +13 -38
  9. package/components/calendar/index.vue +5 -35
  10. package/components/card/style.scss +8 -17
  11. package/components/chat/chatInput.vue +4 -10
  12. package/components/chat/chatMsg.vue +222 -225
  13. package/components/chat/index.vue +104 -109
  14. package/components/chip/style.scss +27 -33
  15. package/components/codeEditor/index.vue +29 -15
  16. package/components/codeEditor/run.vue +1 -1
  17. package/components/container/style.scss +9 -11
  18. package/components/form/camInput.vue +1 -1
  19. package/components/form/checkbox.vue +115 -121
  20. package/components/form/colorPicker/picker.vue +9 -24
  21. package/components/form/datePicker/index.vue +9 -42
  22. package/components/form/fileUploader/single.vue +196 -197
  23. package/components/form/inputTel/index.vue +3 -7
  24. package/components/form/radioInput.vue +3 -9
  25. package/components/form/scss/input.scss +4 -29
  26. package/components/form/scss/rating.scss +1 -6
  27. package/components/form/scss/switch.scss +1 -6
  28. package/components/form/text-editor/style.scss +4 -22
  29. package/components/form/timepicker/timepicker.vue +11 -16
  30. package/components/form/unit-input.vue +98 -101
  31. package/components/icon/style.scss +2 -6
  32. package/components/index.js +2 -0
  33. package/components/infinite/index.vue +1 -1
  34. package/components/list/style.scss +2 -16
  35. package/components/map/route.vue +1 -1
  36. package/components/menu/index.vue +24 -19
  37. package/components/modal/style.scss +3 -12
  38. package/components/progress/style.scss +5 -21
  39. package/components/skeleton/index.vue +77 -0
  40. package/components/swiper/index.vue +8 -4
  41. package/components/table/style.scss +19 -111
  42. package/components/tabs/index.vue +116 -130
  43. package/components/timeline/index.vue +13 -18
  44. package/components/tree/index.vue +11 -15
  45. package/index.js +1 -2
  46. package/package.json +1 -1
  47. package/plugins/trans/Translate.js +4 -0
  48. package/style/app.scss +7 -71
  49. package/style/colors.scss +49 -73
  50. package/style/mixins/index.scss +0 -12
  51. package/style/variables/color.scss +8 -9
  52. package/tools/helper.js +15 -1
  53. package/components/skeletonLoader/index.vue +0 -42
@@ -1,121 +1,118 @@
1
1
  <template>
2
- <r-input :class="`${$r.prefix}unit-input`" :active="active"
3
- :model-value="lazyValue"
4
- @click.prevent="handleClick">
5
- <input :autofocus="autofocus"
6
- :type="type"
7
- @focusin="active=true"
8
- @focusout="active=false"
9
- @input="emit"
10
- autocomplete="no"
11
- ref="input"
12
- v-model="lazyValue"
13
- :readonly="disableInput"
14
- :class="{'input-shadow':disableInput}"
15
- class="me-1"
16
- />
17
- <div class="select-unit" :class="{'input-shadow':disableUnit}">
18
- <r-select :readonly="disableUnit" :items="units" v-model="unit"
19
- @update:model-value="emit" hide justValue :translate="translate"
20
- class="mt-0"
21
- firstSelect></r-select>
22
- </div>
23
- </r-input>
2
+ <r-input :class="`${$r.prefix}unit-input`" :active="active"
3
+ :model-value="lazyValue"
4
+ @click.prevent="handleClick">
5
+ <input :autofocus="autofocus"
6
+ :type="type"
7
+ @focusin="active=true"
8
+ @focusout="active=false"
9
+ @input="emit"
10
+ autocomplete="no"
11
+ ref="input"
12
+ v-model="lazyValue"
13
+ :readonly="disableInput"
14
+ :class="{'input-shadow':disableInput}"
15
+ class="me-1"
16
+ />
17
+ <div class="select-unit" :class="{'input-shadow':disableUnit}">
18
+ <r-select :readonly="disableUnit" :items="units" v-model="unit"
19
+ @update:model-value="emit" hide justValue :translate="translate"
20
+ class="mt-0"
21
+ firstSelect></r-select>
22
+ </div>
23
+ </r-input>
24
24
  </template>
25
25
  <script>
26
- export default {
27
- name: 'r-unit-input',
28
- props: {
29
- type: {
30
- type: String,
31
- default: 'text'
32
- },
33
- units: {
34
- type: Array,
35
- required: true
36
- },
37
- modelValue: {
38
- type: Object, default: () => {
39
- return {
40
- value: null,
41
- unit: null
42
- }
43
- }
44
- },
45
- disableInput: Boolean,
46
- disableUnit: Boolean,
47
- autofocus: Boolean,
48
- translate: Boolean
49
- },
50
-
51
- data() {
52
- return {
53
- lazyValue: this.modelValue.value,
54
- active: false,
55
- unit: this.modelValue.unit
56
- }
57
- },
58
- watch: {
59
- modelValue() {
60
- this.lazyValue = this.modelValue.value
61
- this.unit = this.modelValue.unit
62
- }
63
- },
64
- methods: {
65
- handleClick(e) {
66
- this.$refs.input.focus()
67
- },
68
- emit() {
69
- this.$emit('update:modelValue', {value: this.lazyValue, unit: this.unit})
70
- }
26
+ export default {
27
+ name: 'r-unit-input',
28
+ props: {
29
+ type: {
30
+ type: String,
31
+ default: 'text'
32
+ },
33
+ units: {
34
+ type: Array,
35
+ required: true
36
+ },
37
+ modelValue: {
38
+ type: Object, default: () => {
39
+ return {
40
+ value: null,
41
+ unit: null
71
42
  }
43
+ }
44
+ },
45
+ disableInput: Boolean,
46
+ disableUnit: Boolean,
47
+ autofocus: Boolean,
48
+ translate: Boolean
49
+ },
50
+
51
+ data() {
52
+ return {
53
+ lazyValue: this.modelValue.value,
54
+ active: false,
55
+ unit: this.modelValue.unit
56
+ }
57
+ },
58
+ watch: {
59
+ modelValue() {
60
+ this.lazyValue = this.modelValue.value
61
+ this.unit = this.modelValue.unit
62
+ }
63
+ },
64
+ methods: {
65
+ handleClick(e) {
66
+ this.$refs.input.focus()
67
+ },
68
+ emit() {
69
+ this.$emit('update:modelValue', {value: this.lazyValue, unit: this.unit})
72
70
  }
71
+ }
72
+ }
73
73
 
74
74
  </script>
75
75
  <style lang="scss">
76
- @import "../../style/include";
76
+ @import "../../style/include";
77
77
 
78
- .#{$prefix}unit-input {
79
- .input-shadow, .input-shadow * {
80
- color: var(--color-text-disabled-light) !important
81
- }
78
+ .#{$prefix}unit-input {
79
+ .input-shadow, .input-shadow * {
80
+ color: var(--color-text-disabled) !important
81
+ }
82
82
 
83
- input {
84
- width: calc(65% - 4px);
85
- }
83
+ input {
84
+ width: calc(65% - 4px);
85
+ }
86
86
 
87
- @include dark() {
88
- --c-unit: var(--color-border-dark)
89
- }
90
- @include light() {
91
- --c-unit: var(--color-border-light)
92
- }
93
87
 
94
- .select-unit {
95
- width: calc(35% + 16px);
96
- overflow-x: clip;
88
+ --c-unit: var(--color-border);
97
89
 
98
- * {
99
- font-size: map-metro-get($headings, 'overline', 'size') !important;
100
- }
101
90
 
102
- .input-control {
103
- border-radius: 0;
104
- @include rtl() {
105
- border-right: 1px solid var(--c-unit) !important;
106
- }
107
-
108
- @include ltr() {
109
- border-left: 1px solid var(--c-unit) !important;
110
- }
111
- }
91
+ .select-unit {
92
+ width: calc(35% + 16px);
93
+ overflow-x: clip;
112
94
 
95
+ * {
96
+ font-size: map-metro-get($headings, 'overline', 'size') !important;
97
+ }
113
98
 
114
- .card-select {
115
- border-top-right-radius: 0;
116
- border-top-left-radius: 0;
99
+ .input-control {
100
+ border-radius: 0;
101
+ @include rtl() {
102
+ border-right: 1px solid var(--c-unit) !important;
103
+ }
117
104
 
118
- }
105
+ @include ltr() {
106
+ border-left: 1px solid var(--c-unit) !important;
119
107
  }
120
108
  }
109
+
110
+
111
+ .card-select {
112
+ border-top-right-radius: 0;
113
+ border-top-left-radius: 0;
114
+
115
+ }
116
+ }
117
+ }
121
118
  </style>
@@ -7,12 +7,8 @@
7
7
  &.icon-disabled {
8
8
  pointer-events: none;
9
9
  opacity: .6;
10
- @include light() {
11
- color: var(--color-disabled-light) !important
12
- }
13
- @include dark() {
14
- color: var(--color-disabled-dark) !important
15
- }
10
+ color: var(--color-disabled) !important
11
+
16
12
  }
17
13
 
18
14
  @include rtl() {
@@ -10,6 +10,7 @@ const list = {
10
10
  'r-bottom-navigation-circle': {'p': 'bar/bottomNavigationCircle.vue', 'c': ['r-icon'], 'd': []},
11
11
  'r-breadcrumbs': {'p': 'breadcrumb/index.vue', 'c': ['r-icon'], 'd': []},
12
12
  'r-btn': {'p': 'button/index.vue', 'c': ['r-progress-circular'], 'd': ['ripple']},
13
+ 'r-btn-confirm': {'p': 'button/buttonConfirm.vue', 'c': ['r-btn', 'r-confirm'], 'd': []},
13
14
  'r-btn-group': {
14
15
  'p': 'button/buttonGroup.vue',
15
16
  'c': ['r-btn', 'r-icon', 'r-card', 'r-list'],
@@ -142,6 +143,7 @@ const list = {
142
143
  'c': ['r-input', 'r-progress-liner', 'r-card', 'r-list', 'r-btn', 'r-icon'],
143
144
  'd': ['click-outside']
144
145
  },
146
+ 'r-skeleton': {'p': 'skeleton/index.vue', 'c': [], 'd': []},
145
147
  'r-slider': {'p': 'slider/index.vue', 'c': ['r-progress-liner', 'r-btn', 'r-icon'], 'd': ['touch']},
146
148
  'r-swiper': {'p': 'swiper/index.vue', 'c': [], 'd': ['touch']},
147
149
  'r-table': {
@@ -36,7 +36,7 @@
36
36
  props: {
37
37
  color:{
38
38
  type:String,
39
- default:'color-one'
39
+ default: 'color-two'
40
40
  },
41
41
  isChat:Boolean,
42
42
  title: {
@@ -11,29 +11,15 @@ $item-height: 48px;
11
11
  position: relative;
12
12
  max-width: 100%;
13
13
 
14
- @include light() {
15
14
  .list-item {
16
15
  &.list-item-active {
17
- background-color: var(--color-table-active-light)
16
+ background-color: var(--color-table-active)
18
17
  }
19
18
 
20
19
  &:hover {
21
- background-color: var(--color-table-hover-light)
20
+ background-color: var(--color-table-hover)
22
21
  }
23
22
  }
24
- }
25
-
26
- @include dark() {
27
- .list-item {
28
- &.list-item-active {
29
- background-color: var(--color-table-active-dark)
30
- }
31
-
32
- &:hover {
33
- background-color: var(--color-table-hover-dark)
34
- }
35
- }
36
- }
37
23
 
38
24
  &.list-subheader {
39
25
  align-items: center;
@@ -567,7 +567,7 @@
567
567
  cursor: pointer;
568
568
 
569
569
  &:hover {
570
- color: var(--color-link-light);
570
+ color: var(--color-link);
571
571
  }
572
572
  }
573
573
  }
@@ -22,7 +22,7 @@
22
22
  }">
23
23
  <r-card>
24
24
  <div class="dropdown-menu-item pa-2" v-for="(item,i) in list" :key="i"
25
- :class="{'color-one-text':selected===item[value]}"
25
+ :class="{'menu-selected':selected===item[value]}"
26
26
  @click="emit(item)">
27
27
  <slot :item="item">
28
28
  {{ item }}
@@ -98,18 +98,18 @@ export default {
98
98
  this.top += elm.height
99
99
  }
100
100
  this.opacity = 0
101
- let n = 80
102
- if (!this.$r.rtl) {
103
- this.left = 0
104
- } else {
105
- this.right = 0
106
- }
107
101
  if (this.reverse) {
108
102
  if (!this.$r.rtl) {
109
103
  this.right = 0
110
104
  } else {
111
105
  this.left = 0
112
106
  }
107
+ } else {
108
+ if (!this.$r.rtl) {
109
+ this.left = 0
110
+ } else {
111
+ this.right = 0
112
+ }
113
113
  }
114
114
 
115
115
  this.show = true
@@ -136,24 +136,29 @@ export default {
136
136
  .#{$prefix}menu {
137
137
  position: relative;
138
138
 
139
- @include light() {
140
- .dropdown-menu {
141
- border: 1px solid var(--color-border-light);
142
-
143
- &-item:hover {
144
- background-color: var(--color-table-hover-light);
145
- }
139
+ .menu-selected {
140
+ position: relative;
141
+ color: var(--color-one);
142
+
143
+ &:before {
144
+ content: '';
145
+ position: absolute;
146
+ left: 0;
147
+ top: 0;
148
+ background-color: var(--color-one);
149
+ opacity: .1;
150
+ width: 100%;
151
+ height: 100%;
146
152
  }
147
153
  }
148
- @include dark() {
154
+
149
155
  .dropdown-menu {
150
- border: 1px solid var(--color-border-dark);
156
+ border: 1px solid var(--color-border);
151
157
 
152
158
  &-item:hover {
153
- background-color: var(--color-table-hover-dark);
159
+ background-color: var(--color-table-hover);
154
160
  }
155
161
  }
156
- }
157
162
 
158
163
  .menu-label {
159
164
  cursor: pointer;
@@ -168,7 +173,7 @@ export default {
168
173
  max-height: 200px;
169
174
  overflow-y: auto;
170
175
  background-clip: padding-box;
171
- border-radius: 4px;
176
+ border-radius: 8px;
172
177
 
173
178
  &-item {
174
179
  cursor: pointer;
@@ -12,22 +12,13 @@
12
12
  outline: none;
13
13
  bottom: 0;
14
14
 
15
- @include light() {
16
- &:not(.modal-no-overlay) {
17
- background-color: var(--color-overlay-light);
18
- }
19
- .modal-content {
20
- border: 1px solid var(--color-border-light);
21
- }
22
- }
23
- @include dark() {
15
+
24
16
  &:not(.modal-no-overlay) {
25
- background-color: var(--color-overlay-dark);
17
+ background-color: var(--color-overlay);
26
18
  }
27
19
  .modal-content {
28
- border: 1px solid var(--color-border-dark);
20
+ border: 1px solid var(--color-border);
29
21
  }
30
- }
31
22
 
32
23
  &:not(.modal-no-overlay) {
33
24
  backdrop-filter: blur(3px) grayscale(30%);
@@ -84,35 +84,19 @@ $progress-circular-overlay-transition: all .6s ease-in-out !default;
84
84
 
85
85
  .#{$prefix}progress {
86
86
  text-align: center;
87
- @include light() {
88
87
  &.progress-outlined {
89
- color: var(--color-divider-light)
88
+ color: var(--color-divider)
90
89
  }
91
90
  .liner-determinate {
92
- background-color: var(--color-text-primary-light);
91
+ background-color: var(--color-text-primary);
93
92
  }
94
93
  .liner-indeterminate {
95
- background-color: var(--color-text-primary-light);
94
+ background-color: var(--color-text-primary);
96
95
  }
97
96
 
98
- .progress-background{
99
- background-color: var(--color-divider-light);
97
+ .progress-background {
98
+ background-color: var(--color-divider);
100
99
  }
101
- }
102
- @include dark() {
103
- &.progress-outlined {
104
- color: var(--color-divider-dark)
105
- }
106
- .liner-determinate {
107
- background-color: var(--color-text-primary-dark);
108
- }
109
- .liner-indeterminate {
110
- background-color: var(--color-text-primary-dark);
111
- }
112
- .progress-background{
113
- background-color: var(--color-divider-dark);
114
- }
115
- }
116
100
 
117
101
  &.progress-outlined {
118
102
  border: 1px solid;
@@ -0,0 +1,77 @@
1
+ <template>
2
+ <div :class="[$r.prefix+'skeleton']">
3
+ <slot v-if="loading||showPreData"></slot>
4
+ <slot v-if="!loading" name="case">
5
+ <div :class="['sk-'+type]" :style="{width:width,height:height}"></div>
6
+ </slot>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: "r-skeleton",
13
+ props: {
14
+ showPreData: Boolean,
15
+ loading: Boolean,
16
+ width: String,
17
+ height: String,
18
+ type: {
19
+ type: String,
20
+ default: 'card',
21
+ validator: function (value) {
22
+ return ['line', 'avatar', 'card'].indexOf(value) !== -1
23
+ }
24
+ },
25
+ }
26
+ };
27
+ </script>
28
+
29
+ <style lang="scss">
30
+ @import "~renusify/style/include";
31
+
32
+ .#{$prefix}skeleton {
33
+ .sk-card, .sk-line, .sk-avatar {
34
+ background: rgba(0, 0, 0, 0.12);
35
+ overflow: hidden;
36
+ position: relative;
37
+
38
+ &:after {
39
+ animation: skeletonloading 1.5s infinite;
40
+ content: "";
41
+ height: 100%;
42
+ left: 0;
43
+ position: absolute;
44
+ right: 0;
45
+ top: 0;
46
+ transform: translateX(-100%);
47
+ z-index: 1;
48
+ background: linear-gradient(
49
+ 90deg,
50
+ hsla(0, 0%, 100%, 0),
51
+ hsla(0, 0%, 100%, 0.3),
52
+ hsla(0, 0%, 100%, 0)
53
+ );
54
+ }
55
+ }
56
+
57
+ .sk-card {
58
+ border-radius: 4px;
59
+ }
60
+
61
+ .sk-line {
62
+ height: 20px !important;
63
+ border-radius: 10px;
64
+ margin-bottom: 8px;
65
+ }
66
+
67
+ .sk-avatar {
68
+ border-radius: 50%;
69
+ }
70
+
71
+ @keyframes skeletonloading {
72
+ 100% {
73
+ transform: translateX(100%);
74
+ }
75
+ }
76
+ }
77
+ </style>
@@ -72,7 +72,7 @@ export default {
72
72
  }
73
73
  setTimeout(() => {
74
74
  this.slides = Math.ceil(this.$refs.container.scrollWidth / this.$refs.swiper.offsetWidth)
75
- }, 500)
75
+ }, 1000)
76
76
  },
77
77
  computed: {
78
78
  itemWidth() {
@@ -89,7 +89,11 @@ export default {
89
89
  methods: {
90
90
  goToSlide(n) {
91
91
  this.inMove = false
92
- this.x = this.$refs.swiper.offsetWidth * (n - 1)
92
+ let s = -1
93
+ if (this.$r.rtl) {
94
+ s = 1
95
+ }
96
+ this.x = this.$refs.swiper.offsetWidth * (n - 1) * s
93
97
  this.end()
94
98
  },
95
99
  right(x = null) {
@@ -137,7 +141,7 @@ export default {
137
141
  }
138
142
  this.prePosition = this.x
139
143
 
140
- this.currentSlide = Math.ceil(this.x / this.$refs.swiper.offsetWidth) + 1
144
+ this.currentSlide = Math.ceil(this.x / this.$refs.swiper.offsetWidth * r) + 1
141
145
  }, 60)
142
146
 
143
147
  }
@@ -227,4 +231,4 @@ export default {
227
231
  }
228
232
 
229
233
  }
230
- </style>
234
+ </style>