renusify 1.0.6 → 1.0.9

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 (55) 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/container/style.scss +9 -11
  16. package/components/form/camInput.vue +1 -1
  17. package/components/form/checkbox.vue +115 -121
  18. package/components/form/colorPicker/picker.vue +9 -24
  19. package/components/form/datePicker/index.vue +9 -42
  20. package/components/form/fileUploader/index.vue +4 -1
  21. package/components/form/fileUploader/single.vue +197 -197
  22. package/components/form/inputTel/index.vue +3 -7
  23. package/components/form/radioInput.vue +3 -9
  24. package/components/form/scss/input.scss +4 -29
  25. package/components/form/scss/rating.scss +1 -6
  26. package/components/form/scss/switch.scss +1 -6
  27. package/components/form/text-editor/style.scss +4 -22
  28. package/components/form/timepicker/timepicker.vue +11 -16
  29. package/components/form/unit-input.vue +98 -101
  30. package/components/icon/style.scss +2 -6
  31. package/components/img/index.vue +192 -175
  32. package/components/index.js +3 -1
  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 +4 -15
  37. package/components/modal/style.scss +3 -12
  38. package/components/progress/circular.vue +1 -1
  39. package/components/progress/style.scss +5 -21
  40. package/components/skeleton/index.vue +77 -0
  41. package/components/swiper/index.vue +8 -4
  42. package/components/table/style.scss +19 -111
  43. package/components/tabs/index.vue +116 -130
  44. package/components/timeline/index.vue +13 -18
  45. package/components/tree/index.vue +11 -15
  46. package/directive/intersect/index.js +23 -20
  47. package/index.js +0 -1
  48. package/package.json +1 -1
  49. package/plugins/trans/Translate.js +1 -0
  50. package/style/app.scss +7 -71
  51. package/style/colors.scss +49 -73
  52. package/style/mixins/index.scss +0 -12
  53. package/style/variables/color.scss +8 -9
  54. package/tools/helper.js +15 -1
  55. package/components/skeletonLoader/index.vue +0 -42
@@ -1,119 +1,114 @@
1
1
  <template>
2
- <div :class="$r.prefix+'chat'">
3
- <div class="chat-header" v-if="title">{{title}}</div>
4
- <message-list ref="msgList" @see="$emit('see', $event)" :messages="msgs" :myself="myself"
5
- :participants="participants"
6
- :newMsg="newMsg"
7
- :hideBottomBtn="hideBottomBtn"
8
- >
9
- </message-list>
10
- <r-chat-input v-if="!hideSend"
11
- @update:model-value="onMsgSubmit"
12
- :send-by-enter="sendByEnter"
13
- :maxLenMsg="maxLenMsg"
14
- :placeholder="placeholder"
15
- :uploadLink="uploadLink"
16
- :maxFileSize="maxFileSize"
17
- :canFile="canFile"
18
- ></r-chat-input>
19
- </div>
2
+ <div :class="$r.prefix+'chat'">
3
+ <div class="chat-header" v-if="title">{{ title }}</div>
4
+ <message-list ref="msgList" @see="$emit('see', $event)" :messages="msgs" :myself="myself"
5
+ :participants="participants"
6
+ :newMsg="newMsg"
7
+ :hideBottomBtn="hideBottomBtn"
8
+ >
9
+ </message-list>
10
+ <r-chat-input v-if="!hideSend"
11
+ @update:model-value="onMsgSubmit"
12
+ :send-by-enter="sendByEnter"
13
+ :maxLenMsg="maxLenMsg"
14
+ :placeholder="placeholder"
15
+ :uploadLink="uploadLink"
16
+ :maxFileSize="maxFileSize"
17
+ :canFile="canFile"
18
+ ></r-chat-input>
19
+ </div>
20
20
  </template>
21
21
  <script>
22
- import MessageList from "./MessageList";
23
- import RChatInput from "./chatInput";
22
+ import MessageList from "./MessageList";
23
+ import RChatInput from "./chatInput";
24
24
 
25
- export default {
26
- name: 'r-chat',
27
- components: {RChatInput, MessageList},
28
- props: {
29
- sendByEnter: Boolean,
30
- placeholder: {type: String, default: 'type here'},
31
- hideBottomBtn: Boolean,
32
- hideSend: Boolean,
33
- maxLenMsg: {type: Number, default: 200},
34
- newMsg: {
35
- type: Object, default: () => {
36
- return {
37
- num: 0,
38
- first_id: null
39
- }
40
- }
41
- },
42
- participants: {
43
- type: Object,
44
- required: true
45
- },
46
- messages: {
47
- type: Array,
48
- required: true
49
- },
50
- myself: {
51
- type: Object,
52
- required: true
53
- },
54
- title: String,
55
- canFile: Boolean,
56
- maxFileSize: {type:Number,default:1024*1024},
57
- uploadLink: {
58
- type: String,
59
- default:'/storage/chat'
60
- },
61
- },
62
- data() {
63
- return {
64
- timeout_id: null
65
- }
66
- },
67
- computed: {
68
- msgs() {
69
- let res = []
70
- this.messages.forEach((msg, i) => {
71
- let m = Object.assign({}, msg)
72
- delete m.user_id
73
- if (res[res.length - 1] && msg.user_id === res[res.length - 1].user_id) {
74
- res[res.length - 1]['list'].push(m)
75
- } else {
76
- res.push({
77
- '_id': i,
78
- 'user_id': msg.user_id,
79
- 'list': [m]
80
- })
81
- }
82
- })
83
- return res
84
- }
85
- },
86
- methods: {
87
- onMsgSubmit: function (message) {
88
- let d=message
89
- d.id= this.$helper.uniqueId(16)
90
- d.created_at= new Date()
25
+ export default {
26
+ name: 'r-chat',
27
+ components: {RChatInput, MessageList},
28
+ props: {
29
+ sendByEnter: Boolean,
30
+ placeholder: {type: String, default: 'type here'},
31
+ hideBottomBtn: Boolean,
32
+ hideSend: Boolean,
33
+ maxLenMsg: {type: Number, default: 200},
34
+ newMsg: {
35
+ type: Object, default: () => {
36
+ return {
37
+ num: 0,
38
+ first_id: null
39
+ }
40
+ }
41
+ },
42
+ participants: {
43
+ type: Object,
44
+ required: true
45
+ },
46
+ messages: {
47
+ type: Array,
48
+ required: true
49
+ },
50
+ myself: {
51
+ type: Object,
52
+ required: true
53
+ },
54
+ title: String,
55
+ canFile: Boolean,
56
+ maxFileSize: {type: Number, default: 1024 * 1024},
57
+ uploadLink: {
58
+ type: String,
59
+ default: '/storage/chat'
60
+ },
61
+ },
62
+ data() {
63
+ return {
64
+ timeout_id: null
65
+ }
66
+ },
67
+ computed: {
68
+ msgs() {
69
+ let res = []
70
+ this.messages.forEach((msg, i) => {
71
+ let m = Object.assign({}, msg)
72
+ delete m.user_id
73
+ if (res[res.length - 1] && msg.user_id === res[res.length - 1].user_id) {
74
+ res[res.length - 1]['list'].push(m)
75
+ } else {
76
+ res.push({
77
+ '_id': i,
78
+ 'user_id': msg.user_id,
79
+ 'list': [m]
80
+ })
81
+ }
82
+ })
83
+ return res
84
+ }
85
+ },
86
+ methods: {
87
+ onMsgSubmit: function (message) {
88
+ let d = message
89
+ d.id = this.$helper.uniqueId(16)
90
+ d.created_at = new Date()
91
91
 
92
- this.$emit("msg-submit", d)
93
- clearTimeout(this.timeout_id)
94
- this.timeout_id = setTimeout(() => {
95
- this.$refs.msgList.goToBottom()
96
- }, 100)
97
- }
98
- },
92
+ this.$emit("msg-submit", d)
93
+ clearTimeout(this.timeout_id)
94
+ this.timeout_id = setTimeout(() => {
95
+ this.$refs.msgList.goToBottom()
96
+ }, 100)
99
97
  }
98
+ },
99
+ }
100
100
  </script>
101
101
  <style lang="scss">
102
- @import "../../style/include";
102
+ @import "../../style/include";
103
103
 
104
- .#{$prefix}chat {
105
- position: relative;
106
- display: flex;
107
- width: 100%;
108
- height: 100%;
109
- flex-direction: column;
110
- align-items: stretch;
111
- overflow: hidden;
112
- @include light() {
113
- background: var(--color-background-two-light);
114
- }
115
- @include dark() {
116
- background: var(--color-background-two-dark);
117
- }
118
- }
104
+ .#{$prefix}chat {
105
+ position: relative;
106
+ display: flex;
107
+ width: 100%;
108
+ height: 100%;
109
+ flex-direction: column;
110
+ align-items: stretch;
111
+ overflow: hidden;
112
+ background: var(--color-background-two);
113
+ }
119
114
  </style>
@@ -1,4 +1,5 @@
1
1
  @import "renusify/style/_include.scss";
2
+
2
3
  $chip-avatar-size: 24px !default;
3
4
  $chip-close-size: 18px !default;
4
5
  $chip-icon-margin-after: 8px !default;
@@ -16,26 +17,26 @@ $chip-transition-duration: 0.28s !default;
16
17
  $chip-transition-fn: map-get($transition, 'fast-out-slow-in') !default;
17
18
  $icon-outlined-border-width: thin !default;
18
19
  $icon-sizes: (
19
- 'x-small': (
20
- 'font-size': 10,
21
- 'height': 16
22
- ),
23
- 'small': (
24
- 'font-size': 12,
25
- 'height': 24
26
- ),
27
- 'default': (
28
- 'font-size': 14,
29
- 'height': 32
30
- ),
31
- 'large': (
32
- 'font-size': 16,
33
- 'height': 54
34
- ),
35
- 'x-large': (
36
- 'font-size': 18,
37
- 'height': 66
38
- )
20
+ 'x-small': (
21
+ 'font-size': 10,
22
+ 'height': 16
23
+ ),
24
+ 'small': (
25
+ 'font-size': 12,
26
+ 'height': 24
27
+ ),
28
+ 'default': (
29
+ 'font-size': 14,
30
+ 'height': 32
31
+ ),
32
+ 'large': (
33
+ 'font-size': 16,
34
+ 'height': 54
35
+ ),
36
+ 'x-large': (
37
+ 'font-size': 18,
38
+ 'height': 66
39
+ )
39
40
  ) !default;
40
41
 
41
42
 
@@ -53,19 +54,12 @@ $icon-sizes: (
53
54
  transition-timing-function: $chip-transition-fn;
54
55
  vertical-align: middle;
55
56
 
56
- @include light() {
57
- border-color: var(--color-divider-light);
58
- color:var(--color-text-primary-light);
59
- &:not(.chip-active) {
60
- background:var(--color-chips-light);
61
- }
62
- }
63
- @include dark() {
64
- border-color: var(--color-divider-dark);
65
- color:var(--color-text-primary-dark);
66
- &:not(.chip-active) {
67
- background:var(--color-chips-dark);
68
- }
57
+
58
+ border-color: var(--color-divider);
59
+ color: var(--color-text-primary);
60
+
61
+ &:not(.chip-active) {
62
+ background: #e0e0e0;
69
63
  }
70
64
 
71
65
  @include states();
@@ -1,4 +1,5 @@
1
1
  @import "renusify/style/_include.scss";
2
+
2
3
  .#{$prefix}container {
3
4
  max-width: 100%;
4
5
  padding: $container-padding-x;
@@ -32,11 +33,11 @@
32
33
  }
33
34
 
34
35
  &-dense {
35
- margin-right: div($form-grid-gutter , -2);
36
- margin-left: div($form-grid-gutter ,-2) ;
36
+ margin-right: div($form-grid-gutter, -2);
37
+ margin-left: div($form-grid-gutter, -2);
37
38
 
38
39
  .col {
39
- padding:div($form-grid-gutter , 2) !important;
40
+ padding: div($form-grid-gutter, 2) !important;
40
41
  }
41
42
  }
42
43
  }
@@ -68,18 +69,15 @@ $divider-inset-margin: 72px !default;
68
69
  height: 0px;
69
70
  max-height: 0px;
70
71
  transition: inherit;
71
- @include dark(){
72
- border-top: solid thin var(--color-divider-dark)
73
- }
74
- @include light(){
75
- border-top: solid thin var(--color-divider-light)
76
- }
72
+
73
+ border-top: solid thin var(--color-divider);
74
+
77
75
  &.divider-inset:not(.divider-vertical) {
78
76
  max-width: calc(100% - #{$divider-inset-margin});
79
77
 
80
- margin-left: $divider-inset-margin;
78
+ margin-left: $divider-inset-margin;
81
79
 
82
- margin-right: $divider-inset-margin;
80
+ margin-right: $divider-inset-margin;
83
81
 
84
82
  }
85
83
 
@@ -344,7 +344,7 @@ export default {
344
344
 
345
345
  .#{$prefix}cam-input {
346
346
  video {
347
- border: 1px solid var(--color-border-light);
347
+ border: 1px solid var(--color-border);
348
348
  }
349
349
 
350
350
  .self-view {
@@ -16,141 +16,135 @@
16
16
  v-html="$r.icons.check" exact></r-icon>
17
17
  </transition>
18
18
  </span>
19
- <span class="ms-2 color-primary-text" @click="emit">
19
+ <span class="ms-2 color-primary-text" @click="emit">
20
20
  <span class="color-error-text" v-if="isRequired">*</span>
21
- {{label}}
21
+ {{ label }}
22
22
  </span>
23
- </div>
24
- </template>
25
- </r-input>
23
+ </div>
24
+ </template>
25
+ </r-input>
26
26
  </template>
27
27
  <script>
28
- export default {
29
- name: 'r-checkbox',
30
- props: {
31
- label: String,
32
- readonly: Boolean,
33
- rounded: Boolean,
34
- modelValue: Boolean,
35
- size: {
36
- type: String,
37
- default: 'default',
38
- validator: function (value) {
39
- return ['x-small', 'small', 'default', 'large', 'x-large'].indexOf(value) !== -1
40
- }
41
- },
42
- },
43
-
44
- data() {
45
- return {
46
- lazyValue: this.modelValue
47
- }
48
- },
49
- watch: {
50
- modelValue() {
51
- this.lazyValue = this.modelValue
52
- }
53
- },
54
- methods: {
55
- emit() {
56
- if (this.readonly) {
57
- return
58
- }
59
-
60
- this.lazyValue = (!this.lazyValue) ? !this.lazyValue : false
61
- this.$emit('update:modelValue', this.lazyValue)
62
- }
63
- }
28
+ export default {
29
+ name: 'r-checkbox',
30
+ props: {
31
+ label: String,
32
+ readonly: Boolean,
33
+ rounded: Boolean,
34
+ modelValue: Boolean,
35
+ size: {
36
+ type: String,
37
+ default: 'default',
38
+ validator: function (value) {
39
+ return ['x-small', 'small', 'default', 'large', 'x-large'].indexOf(value) !== -1
40
+ }
41
+ },
42
+ },
43
+
44
+ data() {
45
+ return {
46
+ lazyValue: this.modelValue
47
+ }
48
+ },
49
+ watch: {
50
+ modelValue() {
51
+ this.lazyValue = this.modelValue
64
52
  }
53
+ },
54
+ methods: {
55
+ emit() {
56
+ if (this.readonly) {
57
+ return
58
+ }
59
+
60
+ this.lazyValue = (!this.lazyValue) ? !this.lazyValue : false
61
+ this.$emit('update:modelValue', this.lazyValue)
62
+ }
63
+ }
64
+ }
65
65
 
66
66
  </script>
67
67
  <style lang="scss">
68
- @import "../../style/include";
69
-
70
- .#{$prefix}checkbox {
71
- width: 100%;
72
- cursor: pointer;
73
- @include light() {
74
- .checkbox-input {
75
- border: 1px solid var(--color-border-light)
76
- }
77
- }
78
- @include dark() {
79
- .checkbox-input {
80
- border: 1px solid var(--color-border-dark)
81
- }
68
+ @import "../../style/include";
69
+
70
+ .#{$prefix}checkbox {
71
+ width: 100%;
72
+ cursor: pointer;
73
+
74
+ .checkbox-input {
75
+ border: 1px solid var(--color-border)
76
+ }
77
+
78
+ .#{$prefix}icon {
79
+ width: 100%;
80
+ height: 100%;
81
+ display: flex;
82
+ justify-content: center;
83
+ align-items: center;
84
+ }
85
+
86
+ .checkbox-input {
87
+ text-align: center;
88
+ border-radius: 4px;
89
+ transition: .3s all ease-in-out;
90
+
91
+ &.x-small {
92
+ width: 17px;
93
+ height: 17px;
94
+
95
+ svg {
96
+ width: 12px;
97
+ height: 12px;
98
+ }
99
+ }
100
+
101
+ &.small {
102
+ width: 20px;
103
+ height: 20px;
104
+
105
+ svg {
106
+ width: 15px;
107
+ height: 15px;
82
108
  }
109
+ }
110
+
111
+ &.default {
112
+ width: 22px;
113
+ height: 22px;
83
114
 
84
- .#{$prefix}icon {
85
- width: 100%;
86
- height: 100%;
87
- display: flex;
88
- justify-content: center;
89
- align-items: center;
115
+ svg {
116
+ width: 17px;
117
+ height: 17px;
90
118
  }
119
+ }
120
+
121
+ &.large {
122
+ width: 25px;
123
+ height: 25px;
91
124
 
92
- .checkbox-input {
93
- text-align: center;
94
- border-radius: 4px;
95
- transition: .3s all ease-in-out;
96
-
97
- &.x-small {
98
- width: 17px;
99
- height: 17px;
100
-
101
- svg {
102
- width: 12px;
103
- height: 12px;
104
- }
105
- }
106
-
107
- &.small {
108
- width: 20px;
109
- height: 20px;
110
-
111
- svg {
112
- width: 15px;
113
- height: 15px;
114
- }
115
- }
116
-
117
- &.default {
118
- width: 22px;
119
- height: 22px;
120
-
121
- svg {
122
- width: 17px;
123
- height: 17px;
124
- }
125
- }
126
-
127
- &.large {
128
- width: 25px;
129
- height: 25px;
130
-
131
- svg {
132
- width: 20px;
133
- height: 20px;
134
- }
135
- }
136
-
137
- &.x-large {
138
- width: 30px;
139
- height: 30px;
140
-
141
- svg {
142
- width: 25px;
143
- height: 25px;
144
- }
145
- }
125
+ svg {
126
+ width: 20px;
127
+ height: 20px;
146
128
  }
129
+ }
147
130
 
148
- &.checkbox-readonly {
149
- pointer-events: none;
150
- }
131
+ &.x-large {
132
+ width: 30px;
133
+ height: 30px;
151
134
 
152
- .checkbox-select {
153
- background-color: currentColor;
154
- }
135
+ svg {
136
+ width: 25px;
137
+ height: 25px;
138
+ }
155
139
  }
140
+ }
141
+
142
+ &.checkbox-readonly {
143
+ pointer-events: none;
144
+ }
145
+
146
+ .checkbox-select {
147
+ background-color: currentColor;
148
+ }
149
+ }
156
150
  </style>
@@ -168,13 +168,8 @@ export default {
168
168
  border-radius: 4px;
169
169
  box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.16);
170
170
  z-index: 1;
171
- @include light() {
172
- background: #f7f8f9;
173
- }
174
171
 
175
- @include dark() {
176
- background: #1d2024;
177
- }
172
+ background: #f7f8f9;
178
173
 
179
174
  canvas {
180
175
  vertical-align: top;
@@ -214,25 +209,15 @@ export default {
214
209
  direction: ltr;
215
210
  }
216
211
 
217
- @include light() {
218
- .name {
219
- color: #999;
220
- background: #e7e8e9;
221
- }
222
- .value {
223
- color: #666;
224
- background: #eceef0;
225
- }
212
+
213
+ .name {
214
+ color: #999;
215
+ background: #e7e8e9;
226
216
  }
227
- @include dark() {
228
- .name {
229
- color: #999;
230
- background: #252930;
231
- }
232
- .value {
233
- color: #fff;
234
- background: #2e333a;
235
- }
217
+
218
+ .value {
219
+ color: #666;
220
+ background: #eceef0;
236
221
  }
237
222
  }
238
223
  }