renusify 2.5.2 → 3.0.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 (212) hide show
  1. package/components/app/index.vue +74 -22
  2. package/components/app/toast/index.vue +76 -71
  3. package/components/app/toast/toast.vue +62 -44
  4. package/components/avatar/index.vue +207 -84
  5. package/components/button/buttonConfirm.vue +53 -26
  6. package/components/button/buttonGroup.js +0 -2
  7. package/components/button/buttonGroup.vue +310 -62
  8. package/components/button/index.vue +584 -100
  9. package/components/calendar/index.js +0 -2
  10. package/components/calendar/index.vue +326 -262
  11. package/components/calendar/month.vue +64 -55
  12. package/components/calendar/year.vue +30 -25
  13. package/components/card/index.vue +139 -59
  14. package/components/codeEditor/highlightCss.vue +38 -39
  15. package/components/codeEditor/highlightHtml.vue +64 -64
  16. package/components/codeEditor/highlightJs.vue +37 -38
  17. package/components/codeEditor/index.vue +129 -79
  18. package/components/codeEditor/run.vue +225 -39
  19. package/components/codeEditor/useCodeFormatter.js +150 -0
  20. package/components/confirm/index.vue +139 -80
  21. package/components/container/col.vue +5 -4
  22. package/components/container/divider.vue +28 -19
  23. package/components/container/index.vue +34 -15
  24. package/components/container/row.vue +26 -9
  25. package/components/container/spacer.vue +2 -4
  26. package/components/container/style.scss +3 -0
  27. package/components/content/index.vue +49 -32
  28. package/components/cropper/index.vue +401 -244
  29. package/components/float/index.vue +542 -415
  30. package/components/form/addressInput/index.vue +184 -109
  31. package/components/form/camInput/index.vue +370 -244
  32. package/components/form/checkInput/index.vue +138 -71
  33. package/components/form/checkboxInput/index.vue +93 -49
  34. package/components/form/colorInput/Alpha.vue +81 -83
  35. package/components/form/colorInput/Hue.vue +91 -68
  36. package/components/form/colorInput/Preview.vue +43 -47
  37. package/components/form/colorInput/Saturation.vue +101 -86
  38. package/components/form/colorInput/index.vue +71 -39
  39. package/components/form/colorInput/picker.vue +111 -106
  40. package/components/form/colorInput/useColor.js +153 -0
  41. package/components/form/dateInput/index.vue +691 -356
  42. package/components/form/dateInput/month.vue +63 -54
  43. package/components/form/dateInput/year.vue +35 -25
  44. package/components/form/fileInput/index.js +0 -1
  45. package/components/form/fileInput/index.vue +263 -106
  46. package/components/form/fileInput/single.vue +332 -168
  47. package/components/form/groupInput/index.vue +199 -101
  48. package/components/form/index.vue +189 -83
  49. package/components/form/input/index.vue +416 -377
  50. package/components/form/jsonInput/JsonView.vue +54 -56
  51. package/components/form/jsonInput/index.vue +247 -165
  52. package/components/form/maskInput/index.vue +252 -132
  53. package/components/form/numberInput/index.js +0 -1
  54. package/components/form/numberInput/index.vue +226 -117
  55. package/components/form/passwordInput/index.js +2 -1
  56. package/components/form/passwordInput/index.vue +269 -102
  57. package/components/form/radioInput/index.vue +143 -72
  58. package/components/form/rangeInput/index.vue +280 -167
  59. package/components/form/ratingInput/index.vue +57 -57
  60. package/components/form/selectInput/index.js +1 -3
  61. package/components/form/selectInput/index.vue +584 -296
  62. package/components/form/switchInput/index.vue +73 -59
  63. package/components/form/telInput/index.js +0 -1
  64. package/components/form/telInput/index.vue +238 -135
  65. package/components/form/textArea/index.vue +72 -35
  66. package/components/form/textEditor/index.vue +739 -0
  67. package/components/form/{text-editor → textEditor}/style.scss +8 -16
  68. package/components/form/textInput/index.vue +54 -32
  69. package/components/form/timeInput/index.vue +82 -55
  70. package/components/form/timeInput/range.vue +115 -94
  71. package/components/form/timeInput/timepicker.vue +382 -449
  72. package/components/form/uniqueInput/index.vue +105 -48
  73. package/components/form/unitInput/index.vue +139 -84
  74. package/components/formCreator/index.js +0 -1
  75. package/components/formCreator/index.vue +314 -148
  76. package/components/highlight/index.vue +41 -25
  77. package/components/highlight/style.scss +2 -2
  78. package/components/highlight/{mixin.js → useHighlight.js} +181 -160
  79. package/components/icon/index.vue +79 -33
  80. package/components/img/index.vue +250 -147
  81. package/components/img/preview.vue +180 -198
  82. package/components/img/svgImg.vue +42 -39
  83. package/components/index.js +5 -20
  84. package/components/infinite/index.js +3 -3
  85. package/components/infinite/index.vue +290 -66
  86. package/components/map/index.vue +428 -261
  87. package/components/map/route.vue +794 -487
  88. package/components/map/select.vue +118 -58
  89. package/components/menu/index.vue +206 -94
  90. package/components/meta/meta.js +26 -3
  91. package/components/modal/index.vue +382 -156
  92. package/components/notify/index.vue +204 -86
  93. package/components/notify/notification.vue +38 -55
  94. package/components/progress/circle.vue +189 -70
  95. package/components/progress/line.vue +266 -46
  96. package/components/searchBox/index.js +1 -3
  97. package/components/searchBox/index.vue +194 -101
  98. package/components/skeleton/index.vue +45 -20
  99. package/components/slider/index.vue +319 -156
  100. package/components/swiper/index.vue +237 -108
  101. package/components/table/crud/footer.vue +77 -53
  102. package/components/table/crud/header.vue +71 -72
  103. package/components/table/crud/index.vue +629 -399
  104. package/components/table/index.vue +721 -278
  105. package/components/timeAgo/index.vue +145 -96
  106. package/components/tour/index.vue +338 -235
  107. package/components/tree/index.vue +235 -89
  108. package/components/tree/tree-element.vue +106 -106
  109. package/directive/animate/index.js +77 -0
  110. package/directive/clickOutSide/index.js +98 -0
  111. package/directive/drag/index.js +153 -0
  112. package/directive/index.js +11 -13
  113. package/directive/intersect/index.js +263 -0
  114. package/directive/mask/index.js +67 -0
  115. package/directive/parallax/index.js +78 -0
  116. package/directive/ripple/index.js +14 -0
  117. package/directive/scroll/index.js +272 -24
  118. package/directive/sortable/index.js +274 -0
  119. package/directive/title/index.js +75 -0
  120. package/directive/touch/index.js +268 -0
  121. package/index.js +11 -19
  122. package/package.json +5 -2
  123. package/plugins/validation/Validate.js +88 -79
  124. package/scripts/generate-docs.mjs +226 -0
  125. package/scripts/menu.mjs +240 -0
  126. package/scripts/parser.mjs +1086 -0
  127. package/style/_index.scss +7 -0
  128. package/style/app.scss +13 -65
  129. package/style/colors.scss +5 -22
  130. package/style/functions/index.scss +8 -0
  131. package/style/mixins/index.scss +17 -5
  132. package/style/variables/base.scss +155 -178
  133. package/style/variables/color.scss +0 -12
  134. package/style/variables/utilities.scss +0 -180
  135. package/tools/helper.js +0 -8
  136. package/tools/icons.js +7 -2
  137. package/tools/root.js +71 -0
  138. package/components/app/style.scss +0 -41
  139. package/components/app/toast/style.scss +0 -20
  140. package/components/avatar/style.scss +0 -32
  141. package/components/bar/bottomNav.js +0 -1
  142. package/components/bar/bottomNav.vue +0 -28
  143. package/components/bar/bottomNavigationCircle.js +0 -2
  144. package/components/bar/bottomNavigationCircle.vue +0 -99
  145. package/components/bar/scss/bottomNav.scss +0 -67
  146. package/components/bar/scss/toolbar.scss +0 -174
  147. package/components/bar/toolbar/index.js +0 -8
  148. package/components/bar/toolbar/index.vue +0 -35
  149. package/components/bar/toolbar/laptop.vue +0 -33
  150. package/components/bar/toolbar/menuChilds.vue +0 -41
  151. package/components/bar/toolbar/menuLaptop.vue +0 -41
  152. package/components/bar/toolbar/menuMob.vue +0 -39
  153. package/components/bar/toolbar/mixin.js +0 -43
  154. package/components/bar/toolbar/mobile.vue +0 -34
  155. package/components/breadcrumb/bredcrumbItem.vue +0 -39
  156. package/components/breadcrumb/index.js +0 -3
  157. package/components/breadcrumb/index.vue +0 -71
  158. package/components/breadcrumb/style.scss +0 -51
  159. package/components/button/style.scss +0 -411
  160. package/components/card/style.scss +0 -86
  161. package/components/chart/chart.js +0 -1
  162. package/components/chart/chart.vue +0 -69
  163. package/components/chart/worldMap.js +0 -2
  164. package/components/chart/worldMap.vue +0 -1112
  165. package/components/chat/MessageList.vue +0 -163
  166. package/components/chat/chatInput.vue +0 -150
  167. package/components/chat/chatMsg.vue +0 -276
  168. package/components/chat/index.js +0 -11
  169. package/components/chat/index.vue +0 -113
  170. package/components/chip/index.js +0 -3
  171. package/components/chip/index.vue +0 -77
  172. package/components/chip/style.scss +0 -199
  173. package/components/codeEditor/mixin.js +0 -145
  174. package/components/countdown/index.js +0 -1
  175. package/components/countdown/index.vue +0 -105
  176. package/components/form/colorInput/mixin.js +0 -132
  177. package/components/form/fileInput/file.js +0 -148
  178. package/components/form/telInput/assets/flags.png +0 -0
  179. package/components/form/telInput/assets/flags@2x.png +0 -0
  180. package/components/form/text-editor/index.vue +0 -705
  181. package/components/icon/style.scss +0 -17
  182. package/components/infinite/div.js +0 -6
  183. package/components/infinite/div.vue +0 -193
  184. package/components/infinite/page.js +0 -3
  185. package/components/infinite/page.vue +0 -105
  186. package/components/list/index.js +0 -3
  187. package/components/list/index.vue +0 -122
  188. package/components/list/style.scss +0 -66
  189. package/components/message/index.js +0 -4
  190. package/components/message/index.vue +0 -40
  191. package/components/modal/style.scss +0 -146
  192. package/components/nestable/NestableItem.vue +0 -307
  193. package/components/nestable/editable.js +0 -44
  194. package/components/nestable/index.js +0 -1
  195. package/components/nestable/index.vue +0 -226
  196. package/components/nestable/methods.js +0 -416
  197. package/components/progress/style.scss +0 -229
  198. package/components/table/style.scss +0 -338
  199. package/components/tabs/index.js +0 -3
  200. package/components/tabs/index.vue +0 -151
  201. package/components/timeline/index.js +0 -6
  202. package/components/timeline/index.vue +0 -76
  203. package/directive/resize/index.js +0 -30
  204. package/directive/skeleton/index.js +0 -27
  205. package/directive/skeleton/style.scss +0 -37
  206. package/plugins/request/Request.js +0 -68
  207. package/style/animation.scss +0 -94
  208. package/style/style.scss +0 -8
  209. package/tools/rootable.js +0 -75
  210. /package/components/form/{text-editor → textEditor}/index.js +0 -0
  211. /package/components/form/{text-editor → textEditor}/preview.js +0 -0
  212. /package/components/form/{text-editor → textEditor}/preview.vue +0 -0
@@ -1,147 +1,256 @@
1
1
  <template>
2
- <div :class="`${$r.prefix}add-btn`">
3
- <r-input v-bind="$attrs"
4
- :modelValue="modelValue"
5
- :active="active"
6
- inputControlClass="v-center"
7
- >
8
- <r-btn :disabled="min!==undefined&&number<=min" :text="btnText" class="minus" icon @click.prevent.stop="minus">
2
+ <r-input :active="active"
3
+ :class="`${$r.prefix}number-input`"
4
+ :icon="$r.icons.plus"
5
+ :modelValue="modelValue"
6
+ :pre-icon="$r.icons.minus"
7
+ @icon="plus"
8
+ @pre-icon="minus"
9
+ >
10
+ <template v-slot:preIcon>
11
+ <span :class="{'btn-disabled':min!==undefined&&number<=min}" class="btn">
9
12
  <r-icon v-html="$r.icons.minus"></r-icon>
10
- </r-btn>
11
- <input @input="emit"
12
- class="text-center ltr"
13
- @focusin="active=true"
14
- @focusout="active=false"
15
- ref="input"
16
- :step="step"
17
- type="number"
18
- autocomplete="no"
19
- v-model="number"
13
+ </span>
14
+ </template>
15
+ <div class="view-holder ltr text-center">
16
+ <input
17
+ ref="input"
18
+ :autofocus="autofocus"
19
+ :step="step"
20
+ :value="number"
21
+ autocomplete="no"
22
+ class="text-center"
23
+ type="number"
24
+ @focusin="active=true"
25
+ @focusout="active=false"
26
+ @input="emitValue"
20
27
  />
21
- <r-btn :disabled="max!==undefined&&number>=max" :text="btnText" class="plus" icon @click.prevent.stop="plus">
28
+ <div class="number-view" v-html="formatNumber"></div>
29
+ </div>
30
+ <template v-slot:icon>
31
+ <span :class="{'btn-disabled':max!==undefined&&number>=max}" class="btn">
22
32
  <r-icon v-html="$r.icons.plus"></r-icon>
23
- </r-btn>
24
- </r-input>
25
- </div>
26
-
33
+ </span>
34
+ </template>
35
+ </r-input>
27
36
  </template>
28
37
 
29
- <script>
30
- export default {
31
- name: 'r-number',
32
- inheritAttrs: false,
33
- props: {
34
- modelValue: Number,
35
- step: {type: Number, default: 1},
36
- split: {type: Number, default: 0},
37
- min: {
38
- type: Number
39
- },
40
- max: {
41
- type: Number
42
- },
43
- btnText: Boolean
44
- },
45
- emits: ['update:modelValue'],
46
- data() {
47
- return {
48
- number: this.modelValue,
49
- active: false
50
- }
38
+ <script setup>
39
+ import {ref, watch, computed, useAttrs} from 'vue'
40
+
41
+ const attr = useAttrs()
42
+ const placeholder = attr.placeholder
43
+ const autofocus = attr.autofocus
44
+
45
+ const props = defineProps({
46
+ /**
47
+ * The input's model value (number or string)
48
+ * @type {Number|String}
49
+ */
50
+ modelValue: [Number, String],
51
+ /**
52
+ * Step value for increment/decrement buttons
53
+ * @type {Number}
54
+ * @default 1
55
+ */
56
+ step: {
57
+ type: Number,
58
+ default: 1
51
59
  },
52
- watch: {
53
- 'modelValue': function (newVal) {
54
- if (newVal !== undefined) {
55
- this.number = newVal
56
- }
57
- }
60
+ /**
61
+ * Number of digits to group with commas for display
62
+ * @type {Number}
63
+ * @default 0
64
+ *
65
+ * When greater than 0, formats numbers with commas (e.g., 1000 becomes 1,000)
66
+ * Set to 0 to disable number formatting
67
+ */
68
+ split: {
69
+ type: Number,
70
+ default: 0
58
71
  },
59
- methods: {
60
- emit() {
61
- if (this.number === '' || this.number === null) {
62
- this.number = undefined
63
- this.$emit('update:modelValue', this.number)
64
- return
65
- }
66
- let d = this.number
67
- if (this.max !== undefined && d > this.max) {
68
- d = this.max
69
- }
70
- if (this.min !== undefined && d < this.min) {
71
- this.$emit('update:modelValue', undefined)
72
- return
73
- }
72
+ /**
73
+ * Minimum allowed value
74
+ * @type {Number}
75
+ */
76
+ min: Number,
77
+ /**
78
+ * Maximum allowed value
79
+ * @type {Number}
80
+ */
81
+ max: Number
82
+ })
74
83
 
75
- this.number = d
76
- this.$emit('update:modelValue', this.number)
77
- },
78
- plus() {
79
- let n = this.modelValue || 0
80
- this.number = n + this.step
81
- this.emit()
82
- },
83
- minus() {
84
- let n = this.modelValue || 0
85
- this.number = n - this.step
86
- this.emit()
87
- }
84
+ const emit = defineEmits([
85
+ /**
86
+ * Emitted when the number value changes
87
+ * @param {Number|undefined} value - The updated number value, undefined if invalid or empty
88
+ */
89
+ 'update:modelValue'
90
+ ])
91
+
92
+ // Reactive data
93
+ const number = ref(props.modelValue)
94
+ const active = ref(false)
95
+
96
+ // Methods
97
+ /**
98
+ * Emits the updated value to parent component
99
+ * @param {Event} [e=false] - Optional event object from input
100
+ */
101
+ const emitValue = (e = false) => {
102
+ if (e) {
103
+ number.value = e.target.value
88
104
  }
105
+
106
+ if (number.value === '' || number.value === null) {
107
+ number.value = undefined
108
+ emit('update:modelValue', number.value)
109
+ return
110
+ }
111
+
112
+ let value = number.value
113
+
114
+ if (props.max !== undefined && value > props.max) {
115
+ value = props.max
116
+ }
117
+ if (props.min !== undefined && value < props.min) {
118
+ emit('update:modelValue', undefined)
119
+ return;
120
+ }
121
+
122
+ number.value = value
123
+ emit('update:modelValue', number.value)
124
+ }
125
+
126
+ /**
127
+ * Increments the number by the step value
128
+ */
129
+ const plus = () => {
130
+ const currentValue = parseFloat(props.modelValue || props.min || 0)
131
+ number.value = currentValue + props.step
132
+ emitValue()
89
133
  }
134
+
135
+ /**
136
+ * Decrements the number by the step value
137
+ */
138
+ const minus = () => {
139
+ const currentValue = parseFloat(props.modelValue || 0)
140
+ number.value = currentValue - props.step
141
+ emitValue()
142
+ }
143
+
144
+ // Computed properties
145
+ /**
146
+ * Formats the number for display with optional thousands separator
147
+ * @returns {String} Formatted number string or placeholder
148
+ */
149
+ const formatNumber = computed(() => {
150
+ if (number.value == null || number.value === '') return placeholder || ''
151
+
152
+ if (isNaN(number.value)) return number.value.toString()
153
+
154
+ const txt = number.value.toString()
155
+ const [integerPart, decimalPart = ''] = txt.split('.')
156
+
157
+ if (props.split > 0) {
158
+ const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, '<span class="sep">,</span>')
159
+ return decimalPart ? `${formattedInteger}.${decimalPart}` : formattedInteger
160
+ }
161
+
162
+ return decimalPart ? `${integerPart}.${decimalPart}` : integerPart
163
+ })
164
+
165
+ // Watchers
166
+ watch(() => props.modelValue, (newVal) => {
167
+ if (newVal !== undefined) {
168
+ number.value = newVal
169
+ }
170
+ })
90
171
  </script>
91
172
 
92
173
  <style lang="scss">
93
174
  @use "sass:map";
94
- @use "../../../style/variables/base";
95
- @use "../../../style/mixins";
96
-
175
+ @use "../../../style" as *;
97
176
 
98
- .#{base.$prefix}add-btn {
99
- position: relative;
100
177
 
101
- input::-webkit-outer-spin-button,
102
- input::-webkit-inner-spin-button {
103
- -webkit-appearance: none;
104
- margin: 0;
105
- }
178
+ .#{$prefix}number-input {
179
+ text-align: center;
106
180
 
107
- input {
108
- -moz-appearance: textfield;
181
+ .view-holder {
182
+ position: relative;
109
183
  width: 100%;
110
- }
184
+ height: 32px;
111
185
 
112
- .plus {
113
- position: absolute;
114
- right: 2px;
115
- top: 1px;
116
- z-index: 2;
117
- width: 36px !important;
118
- height: 36px !important;
119
- }
186
+ .number-view, input {
187
+ position: absolute;
188
+ top: 0;
189
+ left: 0;
190
+ width: 100%;
191
+ height: 32px;
192
+ max-height: 32px;
193
+ white-space: pre-wrap;
194
+ word-break: keep-all;
195
+ overflow-wrap: break-word;
196
+ overflow: hidden;
197
+ @include typography($headings, 'body-1');
198
+ letter-spacing: 1px;
199
+ }
120
200
 
121
- .minus {
122
- position: absolute;
123
- left: 2px;
124
- top: 1px;
125
- z-index: 2;
126
- width: 36px !important;
127
- height: 36px !important;
128
- }
201
+ .sep {
202
+ width: 0px;
203
+ transform: translateX(-2.5px);
204
+ }
129
205
 
130
- .#{base.$prefix}input-container:not(.input-focused) {
131
- .label:not(.label-active) {
132
- @include mixins.ltr() {
133
- margin-left: 24px;
134
- }
135
- @include mixins.rtl() {
136
- margin-right: 24px;
206
+ .number-view {
207
+ z-index: 0;
208
+ display: flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ pointer-events: none;
212
+ }
213
+
214
+ input {
215
+ z-index: 1;
216
+ -webkit-font-smoothing: antialiased;
217
+ -webkit-text-fill-color: transparent;
218
+
219
+ &::selection {
220
+ background-color: var(--color-one);
221
+ -webkit-text-fill-color: var(--color-on-one);
222
+ color: var(--color-on-one);
137
223
  }
138
224
  }
139
225
  }
140
226
 
141
- .input-tile {
142
- .#{base.$prefix}btn {
143
- border-radius: map.get(base.$borders, 'sm');
227
+ .input-control {
228
+ @include rtl() {
229
+ flex-direction: row-reverse;
144
230
  }
231
+ padding: 0;
232
+ }
233
+
234
+ .btn-disabled {
235
+ pointer-events: none;
236
+ opacity: 0.5;
237
+ cursor: none;
238
+ }
239
+
240
+ .pre-icon, .icon {
241
+ border-radius: inherit;
242
+ }
243
+
244
+ .btn {
245
+ display: flex;
246
+ justify-content: center;
247
+ align-items: center;
248
+ cursor: pointer;
249
+ background: var(--color-sheet-container-low);
250
+ padding: 4px;
251
+ width: 30px;
252
+ height: 30px;
253
+ border-radius: inherit;
145
254
  }
146
255
  }
147
256
 
@@ -1,3 +1,4 @@
1
1
  export * as rPasswordInput from './index.vue'
2
2
  export * as l_Input from '../input/index.js'
3
- export * as l_icon from '../../icon/index.js'
3
+ export * as l_icon from '../../icon/index.js'
4
+ export * as l_progress_line from '../../progress/line.js'