@mixd-id/web-scaffold 0.2.240706 → 0.2.250801010

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 (220) hide show
  1. package/docs/components/Dashboard.md +56 -0
  2. package/log.txt +7 -0
  3. package/package.json +27 -19
  4. package/src/components/404.vue +61 -0
  5. package/src/components/AccountIcon.vue +19 -0
  6. package/src/components/Ahref.vue +1 -1
  7. package/src/components/Alert.vue +4 -13
  8. package/src/components/ArrayList.vue +49 -0
  9. package/src/components/Article.vue +24 -30
  10. package/src/components/Button.vue +83 -169
  11. package/src/components/Card.vue +257 -0
  12. package/src/components/Carousel.vue +61 -60
  13. package/src/components/Cart.vue +192 -0
  14. package/src/components/CartIcon.vue +89 -0
  15. package/src/components/ChartBar.vue +2 -3
  16. package/src/components/Checkbox.vue +20 -11
  17. package/src/components/Checkout.vue +373 -0
  18. package/src/components/CheckoutDelivery.vue +267 -0
  19. package/src/components/CodeEditor.vue +5 -16
  20. package/src/components/CollapsiblePanel.vue +70 -0
  21. package/src/components/ColorPicker.vue +12 -5
  22. package/src/components/ColorPicker2.vue +41 -19
  23. package/src/components/ColorPicker3.vue +100 -0
  24. package/src/components/Confirm.vue +9 -7
  25. package/src/components/ContextMenu.vue +122 -206
  26. package/src/components/ContextMenuItem.vue +53 -0
  27. package/src/components/Dashboard.vue +243 -0
  28. package/src/components/Dashboard2.vue +118 -0
  29. package/src/components/DashboardComponentSelector.vue +96 -0
  30. package/src/components/DashboardConfigs.vue +202 -0
  31. package/src/components/Datepicker.vue +102 -41
  32. package/src/components/DayTimeRange.vue +3 -2
  33. package/src/components/Dropdown.vue +7 -4
  34. package/src/components/Flex.vue +14 -40
  35. package/src/components/GHeatMaps.vue +2 -2
  36. package/src/components/Grid.vue +6 -6
  37. package/src/components/HTMLEditor.vue +27 -14
  38. package/src/components/Image.vue +62 -108
  39. package/src/components/ImagePreview.vue +14 -4
  40. package/src/components/ImageUploader.vue +114 -0
  41. package/src/components/ImportModal.vue +3 -3
  42. package/src/components/Link.vue +62 -6
  43. package/src/components/List.vue +528 -403
  44. package/src/components/ListContextMenu.vue +88 -0
  45. package/src/components/ListItem.vue +6 -4
  46. package/src/components/ListPage1.vue +14 -15
  47. package/src/components/ListView.vue +5 -6
  48. package/src/components/ListViewSettings.vue +2 -2
  49. package/src/components/LogViewerItem.vue +1 -1
  50. package/src/components/MarkdownEdit.vue +128 -0
  51. package/src/components/MarkdownPreview.vue +102 -0
  52. package/src/components/MenuItem1.vue +36 -0
  53. package/src/components/Modal.vue +95 -43
  54. package/src/components/MultiDropdown.vue +124 -0
  55. package/src/components/MultilineText.vue +1 -4
  56. package/src/components/OTPField.vue +40 -26
  57. package/src/components/ObjectTree.vue +1 -1
  58. package/src/components/PageBuilder.vue +3 -3
  59. package/src/components/Paragraph.vue +1 -2
  60. package/src/components/PresetSelectorFilterItem.vue +107 -95
  61. package/src/components/Radio.vue +1 -1
  62. package/src/components/SearchModal.vue +153 -0
  63. package/src/components/Slider.vue +1 -1
  64. package/src/components/Svg.vue +1 -1
  65. package/src/components/SvgEditor.vue +173 -0
  66. package/src/components/Switch.vue +4 -5
  67. package/src/components/Table.vue +2 -2
  68. package/src/components/TableView.vue +2 -3
  69. package/src/components/TableViewHead.vue +2 -2
  70. package/src/components/Tabs.vue +1 -1
  71. package/src/components/Testimonial.vue +2 -2
  72. package/src/components/Text.vue +7 -22
  73. package/src/components/TextEditor.vue +3 -3
  74. package/src/components/TextWithTag.vue +61 -30
  75. package/src/components/Textarea.vue +16 -22
  76. package/src/components/Textbox.vue +9 -19
  77. package/src/components/Timepicker.vue +25 -15
  78. package/src/components/Toast.vue +5 -3
  79. package/src/components/TreeMenu.vue +122 -0
  80. package/src/components/TreeView.vue +15 -10
  81. package/src/components/TreeView2.vue +38 -0
  82. package/src/components/TreeViewItem.vue +58 -29
  83. package/src/components/TreeViewItem2.vue +55 -0
  84. package/src/components/Uploader.vue +45 -0
  85. package/src/components/Video.vue +119 -0
  86. package/src/components/VirtualGrid.vue +24 -7
  87. package/src/components/VirtualTable.vue +363 -128
  88. package/src/configs/dashboard/data-table.js +9 -0
  89. package/src/configs/web-page-builder.js +118 -0
  90. package/src/directives/intersect.js +26 -0
  91. package/src/hooks/device.js +14 -0
  92. package/src/index.js +62 -107
  93. package/src/mixin/component.js +151 -67
  94. package/src/themes/default/index.js +118 -159
  95. package/src/utils/dashboard.js +22 -962
  96. package/src/utils/helpers.cjs +635 -0
  97. package/src/utils/helpers.js +91 -60
  98. package/src/utils/helpers.mjs +245 -12
  99. package/src/utils/importer.js +22 -3
  100. package/src/utils/list.mjs +1509 -0
  101. package/src/utils/preset-selector.cjs +1455 -0
  102. package/src/utils/preset-selector.js +489 -95
  103. package/src/utils/preset-selector.mjs +59 -20
  104. package/src/utils/queue.js +63 -0
  105. package/src/utils/web.mjs +120 -0
  106. package/src/utils/wss.js +38 -36
  107. package/src/utils/wss.mjs +24 -19
  108. package/src/widgets/AhrefSetting.vue +16 -13
  109. package/src/widgets/ArticleSetting.vue +15 -27
  110. package/src/widgets/BackgroundColorSetting.vue +153 -0
  111. package/src/widgets/BorderColorSetting.vue +57 -0
  112. package/src/widgets/BotEditor/BotEditorActions.vue +3 -2
  113. package/src/widgets/BotEditor/BotEditorSettings.vue +21 -0
  114. package/src/widgets/BotEditor.vue +35 -15
  115. package/src/widgets/ButtonSetting.vue +12 -13
  116. package/src/widgets/CarouselSetting.vue +33 -45
  117. package/src/widgets/CartSetting.vue +46 -0
  118. package/src/widgets/CheckoutSetting.vue +46 -0
  119. package/src/widgets/CollapsiblePanelSetting.vue +46 -0
  120. package/src/widgets/ColumnSelector.vue +29 -5
  121. package/src/widgets/ComponentSetting.vue +1 -1
  122. package/src/widgets/ComponentSetting2.vue +145 -236
  123. package/src/widgets/ComponentSetting3.vue +1 -1
  124. package/src/widgets/ContactForm.vue +3 -3
  125. package/src/widgets/ContactFormSetting.vue +41 -30
  126. package/src/widgets/Dashboard/BarChart.vue +47 -11
  127. package/src/widgets/Dashboard/BarChartSetting.vue +1 -1
  128. package/src/widgets/Dashboard/DataTable.vue +125 -0
  129. package/src/widgets/Dashboard/DataTableSetting.vue +243 -0
  130. package/src/widgets/Dashboard/DatasourceSelector.vue +1 -1
  131. package/src/widgets/Dashboard/Doughnut.vue +49 -7
  132. package/src/widgets/Dashboard/DoughnutSetting.vue +2 -2
  133. package/src/widgets/Dashboard/Metric.vue +78 -19
  134. package/src/widgets/Dashboard/MetricSetting.vue +81 -28
  135. package/src/widgets/Dashboard/Pie.vue +55 -6
  136. package/src/widgets/Dashboard/PieSetting.vue +1 -1
  137. package/src/widgets/Dashboard/PolarArea.vue +49 -7
  138. package/src/widgets/Dashboard/PolarAreaSetting.vue +1 -1
  139. package/src/widgets/Dashboard/SharingModal.vue +4 -5
  140. package/src/widgets/Dashboard/ViewSelector.vue +2 -2
  141. package/src/widgets/Dashboard/VirtualTableSetting.vue +121 -184
  142. package/src/widgets/{Dashboard.vue → Dashboard0.vue} +426 -343
  143. package/src/widgets/EmbeddedVideoSetting.vue +7 -5
  144. package/src/widgets/FAQ.vue +16 -3
  145. package/src/widgets/FAQSetting.vue +53 -47
  146. package/src/widgets/FeatureList.vue +3 -0
  147. package/src/widgets/FeatureListSetting.vue +112 -102
  148. package/src/widgets/FlexSetting.vue +83 -106
  149. package/src/widgets/GridSetting.vue +71 -196
  150. package/src/widgets/Header2.vue +34 -71
  151. package/src/widgets/Header2Setting.vue +95 -179
  152. package/src/widgets/HeaderSetting.vue +16 -18
  153. package/src/widgets/IconListSetting.vue +69 -65
  154. package/src/widgets/ImageSetting.vue +33 -60
  155. package/src/widgets/LinkSetting.vue +60 -37
  156. package/src/widgets/LinkSettingModal.vue +173 -0
  157. package/src/widgets/LogViewer.vue +1 -1
  158. package/src/widgets/MarginSetting.vue +2 -2
  159. package/src/widgets/MenuEditor.vue +1 -1
  160. package/src/widgets/MenuItem1Setting.vue +78 -0
  161. package/src/widgets/ModalSetting.vue +42 -44
  162. package/src/widgets/MultiValueSetting.vue +2 -2
  163. package/src/widgets/MultiValueSetting2.vue +78 -45
  164. package/src/widgets/OGSettingModal.vue +103 -0
  165. package/src/widgets/PaddingSetting.vue +2 -2
  166. package/src/widgets/ParagraphSetting.vue +16 -13
  167. package/src/widgets/PositionSetting.vue +209 -0
  168. package/src/widgets/PresetBar.vue +359 -210
  169. package/src/widgets/PresetBarPivot.vue +31 -19
  170. package/src/widgets/PresetSelector.vue +29 -17
  171. package/src/widgets/SearchModalSetting.vue +70 -0
  172. package/src/widgets/Share.vue +1 -2
  173. package/src/widgets/ShareSetting.vue +67 -60
  174. package/src/widgets/StyleSetting.vue +365 -150
  175. package/src/widgets/TestimonialSetting.vue +97 -88
  176. package/src/widgets/TextBlockSetting.vue +16 -13
  177. package/src/widgets/UserActionBuilder/UserActionConsole.vue +30 -10
  178. package/src/widgets/UserActionBuilder/UserActionOutput.vue +2 -2
  179. package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +64 -87
  180. package/src/widgets/UserActionBuilder/UserActionProps.vue +3 -3
  181. package/src/widgets/UserActionBuilder.vue +4 -16
  182. package/src/widgets/WebComponentSelector.vue +15 -11
  183. package/src/widgets/WebLayoutSelector.vue +41 -270
  184. package/src/widgets/WebPageBuilder.vue +1019 -707
  185. package/src/widgets/WebPageBuilder2.vue +7 -7
  186. package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -8
  187. package/src/widgets/WebPageBuilder4/CarouselSetting.vue +63 -7
  188. package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +3 -3
  189. package/src/widgets/WebPageBuilder4/FlexSetting.vue +1 -10
  190. package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +2 -2
  191. package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -7
  192. package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +1 -7
  193. package/src/widgets/WebPageBuilder4.vue +289 -575
  194. package/src/widgets/WebPageSelector.vue +1 -1
  195. package/src/widgets/YoutubeVideoSetting.vue +16 -13
  196. package/tailwind.config.js +3 -35
  197. package/docs/schema/user-action.json +0 -266
  198. package/src/App.vue +0 -25
  199. package/src/components/SearchButton.vue +0 -57
  200. package/src/entry-client.js +0 -27
  201. package/src/entry-server.js +0 -73
  202. package/src/events/event.js +0 -2
  203. package/src/main.js +0 -29
  204. package/src/mixin/website.js +0 -121
  205. package/src/router.js +0 -57
  206. package/src/widgets/MobileMenu.vue +0 -182
  207. package/src/widgets/WebPageBuilder4/ActionSetting.vue +0 -158
  208. package/src/widgets/WebPageBuilder4/ColorSetting.vue +0 -63
  209. package/src/widgets/WebPageBuilder4/DataSetting.vue +0 -92
  210. package/src/widgets/WebPageBuilder4/FontSizeSetting.vue +0 -76
  211. package/src/widgets/WebPageBuilder4/LinkSetting.vue +0 -68
  212. package/src/widgets/WebPageBuilder4/MobileMenuSetting.vue +0 -106
  213. package/src/widgets/WebPageBuilder4/Setting.vue +0 -73
  214. package/src/widgets/WebPageBuilder4/StyleSetting.vue +0 -77
  215. package/src/widgets/WebPageBuilder4/SvgSetting.vue +0 -207
  216. package/src/widgets/WebPageBuilder4/TextTransformSetting.vue +0 -70
  217. package/src/widgets/WebPageBuilder4/WebPageDataEdit.vue +0 -121
  218. package/test.json +0 -22
  219. /package/src/widgets/{Header1.vue → Header0.vue} +0 -0
  220. /package/src/widgets/{Header1Setting.vue → Header0Setting.vue} +0 -0
@@ -1,21 +1,40 @@
1
- // mixin/component.js
2
- import { inject } from 'vue'
3
- import {parseBoolean} from "../utils/helpers.mjs";
4
- import {eventBus} from "../events/event";
1
+ import {inject} from 'vue'
5
2
 
6
3
  let guide, guide2
4
+ let selectedUid
7
5
 
8
- export const componentMixin = {
6
+ function scrollIntoViewIfNeededWithOffset(elem, offset = 100) {
7
+ const rect = elem.getBoundingClientRect();
8
+
9
+ const isVisible = (
10
+ rect.top >= 0 &&
11
+ rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)
12
+ );
13
+
14
+ if (!isVisible) {
15
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
16
+ const targetScroll = rect.top + scrollTop - offset;
17
+
18
+ window.scrollTo({
19
+ top: targetScroll,
20
+ behavior: 'smooth'
21
+ });
22
+ }
23
+ }
9
24
 
10
- inject: [ 'getPage' ],
25
+
26
+ export const componentMixin = {
11
27
 
12
28
  props: {
13
29
  enabled: Boolean,
14
30
  name: String,
15
31
  uid: String,
16
- id: String,
17
32
  type: String,
18
33
 
34
+ style: Object,
35
+ background: undefined,
36
+ bgImages: undefined,
37
+
19
38
  padding: Array,
20
39
  margin: Array,
21
40
  maxWidth: Array,
@@ -58,6 +77,10 @@ export const componentMixin = {
58
77
  textColor: Array,
59
78
  lineHeight: Array,
60
79
 
80
+ objectFit: Array,
81
+ objectPosition: Array,
82
+ backdropBlur: Array,
83
+
61
84
  boxShadow: Array,
62
85
  opacity: Array,
63
86
  itemRatio: Array,
@@ -75,59 +98,101 @@ export const componentMixin = {
75
98
  type: undefined,
76
99
  default: true
77
100
  },
101
+
102
+ debugId: String,
78
103
  },
79
104
 
80
105
  computed: {
81
106
 
82
- bgImages(){
83
- if(!Array.isArray(this.bgImage))
84
- return [{},{}]
85
-
86
- return [
87
- this.bgImage && this.bgImage[0] && this.bgImage[0].imageUrl ?
88
- `url('${import.meta.env.VITE_IMAGE_HOST + '/' + this.bgImage[0].imageUrl}')` : '',
89
- this.bgImage && this.bgImage[1] && this.bgImage[1].imageUrl ?
90
- `url('${import.meta.env.VITE_IMAGE_HOST + '/' + this.bgImage[1].imageUrl}')` :
91
- (this.bgImage && this.bgImage[0] && this.bgImage[0].imageUrl ?
92
- `url('${import.meta.env.VITE_IMAGE_HOST + '/' + this.bgImage[0].imageUrl}')` : '')
93
- ]
94
- },
95
-
96
107
  computedStyle(){
97
108
 
98
109
  const obj = {}
99
110
 
100
- if(this.bgImages && this.bgImages[0]){
101
- obj['background-image'] = this.bgImages[0]
111
+ if(this.style){
112
+
113
+ let background = []
114
+
115
+ if(Array.isArray(this.style.bgImages)){
116
+ let currentUrl = ''
117
+ for(let i = this.$device.mediaIndex ; i >= 0 ; i--){
118
+ if(this.style.bgImages[i]){
119
+ currentUrl = this.style.bgImages[i]
120
+ break
121
+ }
122
+ }
123
+
124
+ if(currentUrl){
125
+ currentUrl = currentUrl.indexOf('://') < 0 ? import.meta.env.VITE_IMAGE_HOST + '/' + currentUrl : currentUrl
126
+ background.push(`url('${currentUrl}')`)
127
+ }
128
+ }
129
+
130
+ if(Array.isArray(this.style.bgColors)){
131
+ let bgColor = ''
132
+ for(let i = this.$device.mediaIndex ; i >= 0 ; i--){
133
+ if(this.style.bgColors[i]){
134
+ bgColor = this.style.bgColors[i]
135
+ break
136
+ }
137
+ }
138
+ const bgColors = bgColor
139
+
140
+ if(bgColors.startsWith('#')){
141
+ background.push(`linear-gradient(${bgColors}, ${bgColors})`)
142
+ }
143
+ else{
144
+ background.push(bgColors)
145
+ }
146
+ }
147
+
148
+ background = background.filter(_ => _)
149
+
150
+ if(background.length > 0)
151
+ obj['background-image'] = background.join(', ')
152
+
153
+
154
+ if(Array.isArray(this.style.bdColor)){
155
+ let bdColor = ''
156
+ for(let i = this.$device.mediaIndex ; i >= 0 ; i--){
157
+ if(this.style.bdColor[i]){
158
+ bdColor = this.style.bdColor[i]
159
+ break
160
+ }
161
+ }
162
+
163
+ if(bdColor){
164
+ obj['border-color'] = bdColor
165
+ }
166
+ }
102
167
  }
103
168
 
104
169
  return obj
105
170
  },
106
171
 
107
- pageData(){
108
- return (this.page ?? {}).data
172
+ editMode(){
173
+ return this.$editMode.value
109
174
  },
110
175
 
111
- editMode(){
112
- return (this.page ?? {}).editMode
176
+ page(){
177
+ return this.getPage()
113
178
  }
114
179
 
115
180
  },
116
181
 
117
- methods: {
182
+ inject: [ 'getPage' ],
118
183
 
119
- imageSrc(src){
120
- return typeof src === 'string' ?
121
- import.meta.env.VITE_IMAGE_HOST + '/' + src : src
122
- },
184
+ methods: {
123
185
 
124
186
  componentClick(e){
125
- if(!this.editMode) return
187
+ if(this.editMode !== 1) return
126
188
 
127
189
  e.stopPropagation()
128
190
  e.preventDefault()
129
191
 
192
+ selectedUid = this.uid
193
+
130
194
  this.editModeClick ? this.editModeClick(this.uid) : null
195
+ this.select2()
131
196
  },
132
197
 
133
198
  componentMouseOver(e){
@@ -136,15 +201,22 @@ export const componentMixin = {
136
201
  e.stopPropagation()
137
202
  e.preventDefault()
138
203
 
139
- this.lastStyle.position = this.$el.style.position
140
- this.$el.style.position = 'relative'
204
+ const offset = this.$el.getBoundingClientRect()
205
+ const top = offset.top + window.scrollY + 1
206
+ const left = offset.left + window.scrollX + 1
207
+ const width = offset.width - 2
208
+ const height = offset.height - 2
141
209
 
142
- this.$el.appendChild(this.getGuide())
210
+ const guide = this.getGuide()
211
+ guide.style.top = `${top}px`
212
+ guide.style.left = `${left}px`
213
+ guide.style.width = `${width}px`
214
+ guide.style.height = `${height}px`
215
+ document.body.appendChild(guide)
143
216
  },
144
217
 
145
218
  componentMouseOut(){
146
219
  if(this.editMode !== 1) return
147
- this.$el.style.position = this.lastStyle.position
148
220
 
149
221
  const guide = this.getGuide()
150
222
  if(guide.parentNode){
@@ -155,7 +227,7 @@ export const componentMixin = {
155
227
  getGuide(){
156
228
  if(!guide){
157
229
  guide = document.createElement('div')
158
- guide.className = "absolute top-0 left-0 right-0 bottom-0 border-[3px] border-blue-600" +
230
+ guide.className = "absolute border-[2px] border-blue-600" +
159
231
  " pointer-events-none"
160
232
  }
161
233
 
@@ -165,58 +237,70 @@ export const componentMixin = {
165
237
  getGuide2(){
166
238
  if(!guide2){
167
239
  guide2 = document.createElement('div')
168
- guide2.className = "absolute top-0 left-0 right-0 bottom-0 border-[3px] border-blue-600" +
169
- " pointer-events-none"
240
+ guide2.className = "absolute border-[2px] border-blue-600 pointer-events-none"
170
241
  }
171
242
 
172
243
  return guide2
173
244
  },
174
245
 
175
246
  select(){
176
- if(!this.$el || this.$el.nodeType !== 1) return
177
-
178
- //this.$el.appendChild(this.getGuide2())
247
+ const offset = this.$el.getBoundingClientRect()
248
+ const top = offset.top + window.scrollY + 1
249
+ const left = offset.left + window.scrollX + 1
250
+ const width = offset.width - 2
251
+ const height = offset.height - 2
252
+
253
+ const guide = this.getGuide2()
254
+ guide.style.top = `${top}px`
255
+ guide.style.left = `${left}px`
256
+ guide.style.width = `${width}px`
257
+ guide.style.height = `${height}px`
258
+ document.body.appendChild(guide)
259
+
260
+ scrollIntoViewIfNeededWithOffset(this.$el, 100)
179
261
  },
180
262
 
181
- },
263
+ select2(){
264
+ const offset = this.$el.getBoundingClientRect()
265
+ const top = offset.top + window.scrollY + 1
266
+ const left = offset.left + window.scrollX + 1
267
+ const width = offset.width - 2
268
+ const height = offset.height - 2
269
+
270
+ const guide = this.getGuide2()
271
+ guide.style.top = `${top}px`
272
+ guide.style.left = `${left}px`
273
+ guide.style.width = `${width}px`
274
+ guide.style.height = `${height}px`
275
+ document.body.appendChild(guide)
276
+ },
182
277
 
183
- data(){
184
- return {
185
- lastStyle: {},
186
- page: null,
278
+ imageSrc(url){
279
+ if(typeof url === 'string'){
280
+ if(url.indexOf('://') < 0 && url.substring(0, 1) !== '/'){
281
+ url = ((import.meta.env.VITE_IMAGE_HOST ?? '') + '/' + url)
282
+ }
283
+ }
284
+ return url
187
285
  }
286
+
188
287
  },
189
288
 
190
289
  mounted(){
191
- if(typeof this.getPage === 'function'){
192
- this.page = this.getPage()
193
- }
194
-
195
290
  if(this.editMode){
196
291
  this.editModeClick = inject('editModeClick', () => {})
197
292
  this.editRegisterComponent = inject('editRegisterComponent', () => {})
198
293
 
199
- if(parseBoolean(this.editSelectable)){
200
- this.$el.addEventListener('click', this.componentClick)
201
- this.$el.addEventListener('mouseover', this.componentMouseOver)
202
- this.$el.addEventListener('mouseout', this.componentMouseOut)
203
- }
294
+ this.$el.addEventListener('click', this.componentClick)
295
+ this.$el.addEventListener('mouseover', this.componentMouseOver)
296
+ this.$el.addEventListener('mouseout', this.componentMouseOut)
204
297
 
205
298
  this.editRegisterComponent(this.uid, this)
206
299
  }
207
-
208
- if(this.id){
209
- eventBus.on(this.id, (action) => {
210
- const { type } = action
211
- typeof this[type] === 'function' ?
212
- this[type]() :
213
- this.log(`${this.name} Method ${type} not found`)
214
- })
215
- }
216
300
  },
217
301
 
218
302
  unmounted(){
219
303
  this.$el.removeEventListener('click', this.componentClick)
220
- },
304
+ }
221
305
 
222
306
  };
@@ -4,116 +4,49 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
4
4
 
5
5
  addBase({
6
6
 
7
+ ':root': {
8
+ '--space-1': '0.25rem',
9
+ '--space-2': '0.5rem',
10
+ '--space-3': '0.75rem',
11
+ '--space-4': '1rem',
12
+ '--space-5': '1.25rem',
13
+ '--space-6': '1.5rem',
14
+ '--space-7': '1.75rem',
15
+ '--space-8': '2rem',
16
+ '--space-9': '2.25rem',
17
+ '--space-10': '2.5rem',
18
+ '--space-11': '2.75rem',
19
+ '--space-12': '3rem'
20
+ },
21
+
7
22
  '*': {
8
23
  'color': theme('colors.text.DEFAULT'),
9
24
  'fontFamily': 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji',
10
- 'fontSize': '13px'
25
+ //'fontSize': '13px'
11
26
  },
12
27
 
13
28
  'html, .html': {
14
29
 
15
- "--h-cp-sm": '2rem',
16
30
  "--h-cp": '2.7rem',
17
31
  "--h-cp-lg": '3.6rem',
18
32
 
19
- '--base-50': '235, 237, 240',
20
- '--base-300': '235, 237, 240',
21
- '--base-400': '245, 247, 250',
22
- '--base-500': '255, 255, 255',
23
- '--base': '255, 255, 255',
24
-
25
- "--text-50": '224, 224, 224',
26
- "--text-100": '218, 218, 218',
27
- "--text-200": '212, 212, 212',
28
- "--text-300": '191, 191, 191',
29
- "--text-400": '116, 116, 116',
30
- "--text-500": '86, 86, 86',
31
- "--text": '31, 41, 55',
32
-
33
- "--primary": '81, 131, 240',
34
- "--primary-50": '244, 248, 255',
35
- "--primary-100": '230, 239, 255',
36
- "--primary-200": '216, 230, 255',
37
- "--primary-300": '116, 156, 243',
38
- "--primary-400": '98, 143, 242',
39
- "--primary-500": '81, 131, 240',
40
- "--primary-600": '73, 118, 216',
41
- "--primary-700": '65, 105, 192',
42
- "--primary-800": '57, 92, 168',
43
- "--primary-900": '49, 79, 144',
44
-
45
- "--secondary": '110, 111, 112',
46
- "--secondary-50": '241, 241, 241',
47
- "--secondary-100": '226, 226, 226',
48
- "--secondary-200": '197, 197, 198',
49
- "--secondary-300": '168, 169, 169',
50
- "--secondary-400": '139, 140, 141',
51
- "--secondary-500": '110, 111, 112',
52
- "--secondary-600": '99, 100, 101',
53
- "--secondary-700": '77, 78, 78',
54
- "--secondary-800": '55, 56, 56',
55
- "--secondary-900": '33, 33, 34',
56
-
57
- '--whatsapp-100': '179, 206, 201',
58
- '--whatsapp-500': '0, 93, 75',
59
-
60
- '--facebook-100': '205, 215, 231',
61
- '--facebook-500': '8, 102, 255',
62
-
63
- '--panel-none': 'transparent',
64
- '--panel-300': 'rgb(235, 237, 240)',
65
- '--panel-400': 'rgb(245, 247, 250)',
66
- '--panel-500': 'rgb(255, 255, 255)',
67
- },
68
-
69
- 'html[data-theme="dark"], .html[data-theme="dark"]': {
70
-
71
- "--base-50": '22, 26, 33',
72
- "--base-300": '0, 0, 0',
73
- "--base-400": '17, 21, 28',
74
- "--base-500": '22, 26, 33',
75
- "--base": '22, 26, 33',
76
-
77
- "--text-50": '33, 39, 46',
78
- "--text-100": '48, 54, 61',
79
- "--text-200": '53, 59, 66',
80
- "--text-300": '77, 77, 77',
81
- "--text-400": '191, 193, 197',
82
- "--text-500": '191, 193, 197',
83
- "--text": '234, 234, 236',
84
-
85
- "--primary-50": '24, 34, 51',
86
- "--primary-100": '28, 38, 59',
87
- "--primary-200": '27, 44, 74',
88
- "--primary-300": '32, 49, 79',
89
-
90
- "--secondary": '55, 59, 65',
91
- "--secondary-50": '16, 18, 19',
92
- "--secondary-100": '22, 24, 26',
93
- "--secondary-200": '28, 30, 33',
94
- "--secondary-300": '39, 41, 46',
95
- "--secondary-400": '50, 53, 59',
96
- "--secondary-500": '55, 59, 65',
97
- "--secondary-600": '75, 79, 84',
98
- "--secondary-700": '95, 98, 103',
99
- "--secondary-800": '115, 118, 122',
100
- "--secondary-900": '135, 137, 141',
101
-
102
- "--panel-300": 'rgb(0, 0, 0)',
103
- "--panel-400": 'rgb(17, 21, 28)',
104
- "--panel-500": 'rgb(27, 31, 38)',
33
+ '--whatsapp-100': 'rgb(179, 206, 201)',
34
+ '--whatsapp-500': 'rgb(0, 93, 75)',
35
+
36
+ '--facebook-100': 'rgb(205, 215, 231)',
37
+ '--facebook-500': 'rgb(8, 102, 255)'
105
38
  },
106
39
 
107
40
  'body': {
108
41
  '-webkit-font-smoothing': 'antialiased',
109
42
  '-moz-osx-font-smoothing': 'grayscale',
110
43
  'text-rendering': 'optimizeLegibility',
111
- 'fontSize': '15px',
44
+ //'fontSize': '15px',
112
45
  'touchAction': "pan-x pan-y",
113
- 'backgroundColor': 'rgb(var(--base-300))'
46
+ 'backgroundColor': 'var(--base-300)'
114
47
  },
115
48
 
116
- '@media screen and (orientation: portrait)': {
49
+ /*'@media screen and (orientation: portrait)': {
117
50
  '*': {
118
51
  'fontSize': '14px',
119
52
  },
@@ -123,11 +56,11 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
123
56
  },
124
57
 
125
58
  "input, input[type='text'], input[type='number'], textarea, select, option": {fontSize: "16px !important"}
126
- },
59
+ },*/
127
60
 
128
61
  '::-webkit-scrollbar': {
129
- 'height': '5px',
130
- 'width': '5px',
62
+ 'height': '8px',
63
+ 'width': '8px',
131
64
  'background': 'transparent'
132
65
  },
133
66
 
@@ -135,6 +68,10 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
135
68
  'backgroundColor': 'rgba(var(--text-50), 100)'
136
69
  },
137
70
 
71
+ '.no-scrollbar::-webkit-scrollbar': {
72
+ display: 'none'
73
+ },
74
+
138
75
  'h1': {
139
76
  fontSize: config('theme.fontSize.4xl')[0],
140
77
  ...config('theme.fontSize.4xl')[1],
@@ -184,6 +121,20 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
184
121
  transform: 'scale(1)',
185
122
  },
186
123
 
124
+ '.menu-item': {
125
+ },
126
+
127
+ '.menu-item:hover': {
128
+ background: 'var(--primary-500)',
129
+ fill: '#fff',
130
+ color: '#fff'
131
+ },
132
+
133
+ '.menu-item:hover *': {
134
+ fill: '#fff',
135
+ color: '#fff'
136
+ }
137
+
187
138
  })
188
139
 
189
140
  addUtilities({
@@ -208,6 +159,17 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
208
159
  transform: 'translate3d(0, 10px, 0)'
209
160
  },
210
161
 
162
+ '.popout-enter-active, .popout-leave-active': {
163
+ transition: 'all 300ms cubic-bezier(0.25, 1, 0.5, 1)',
164
+ transform: 'scale(1)',
165
+ opacity: '1'
166
+ },
167
+
168
+ '.popout-enter-from, .popout-leave-to': {
169
+ transform: 'scale(0)',
170
+ opacity: '0'
171
+ },
172
+
211
173
  '.slideleft-enter-active, .slideleft-leave-active': {
212
174
  transition: 'all 300ms cubic-bezier(0.25, 1, 0.5, 1)',
213
175
  transform: 'translate3d(0, 0, 0)'
@@ -253,28 +215,10 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
253
215
  width: '100%'
254
216
  },
255
217
 
256
- '.panel-none': {
257
- '--webkit-backdrop-filter': 'var(--panel-none-backdrop-filter)',
258
- 'backdrop-filter': 'var(--panel-none-backdrop-filter)',
259
- 'background-color': 'var(--panel-none)',
260
- },
261
-
262
- '.panel-300': {
263
- '--webkit-backdrop-filter': 'var(--panel-300-backdrop-filter)',
264
- 'backdrop-filter': 'var(--panel-300-backdrop-filter)',
265
- 'background-color': 'var(--panel-300)',
266
- },
267
-
268
- '.panel-400': {
269
- '--webkit-backdrop-filter': 'var(--panel-400-backdrop-filter)',
270
- 'backdrop-filter': 'var(--panel-400-backdrop-filter)',
271
- 'background-color': 'var(--panel-400)',
272
- },
273
-
274
- '.panel-500': {
275
- '--webkit-backdrop-filter': 'var(--panel-500-backdrop-filter)',
276
- 'backdrop-filter': 'var(--panel-500-backdrop-filter)',
277
- 'background-color': 'var(--panel-500)',
218
+ '.text-ellipsis-nowrap': {
219
+ 'white-space': 'nowrap',
220
+ 'overflow': 'hidden',
221
+ 'text-overflow': 'ellipsis',
278
222
  },
279
223
 
280
224
  })
@@ -284,58 +228,73 @@ const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
284
228
  extend:{
285
229
  colors: {
286
230
  primary: {
287
- 50: "rgba(var(--primary-50), <alpha-value>)",
288
- 100: "rgba(var(--primary-100), <alpha-value>)",
289
- 200: "rgba(var(--primary-200), <alpha-value>)",
290
- 300: "rgba(var(--primary-300), <alpha-value>)",
291
- 400: "rgba(var(--primary-400), <alpha-value>)",
292
- 500: "rgba(var(--primary-500), <alpha-value>)",
293
- 600: "rgba(var(--primary-600), <alpha-value>)",
294
- 700: "rgba(var(--primary-700), <alpha-value>)",
295
- 800: "rgba(var(--primary-800), <alpha-value>)",
296
- 900: "rgba(var(--primary-900), <alpha-value>)",
297
- DEFAULT: "rgba(var(--primary), <alpha-value>)"
231
+ 50: "var(--primary-50)",
232
+ 100: "var(--primary-100)",
233
+ 200: "var(--primary-200)",
234
+ 300: "var(--primary-300)",
235
+ 400: "var(--primary-400)",
236
+ 500: "var(--primary-500)",
237
+ 600: "var(--primary-600)",
238
+ 700: "var(--primary-700)",
239
+ 800: "var(--primary-800)",
240
+ 900: "var(--primary-900)",
241
+ DEFAULT: "var(--primary-500)"
298
242
  },
299
243
  secondary: {
300
- 50: "rgba(var(--secondary-50), <alpha-value>)",
301
- 100: "rgba(var(--secondary-100), <alpha-value>)",
302
- 200: "rgba(var(--secondary-200), <alpha-value>)",
303
- 300: "rgba(var(--secondary-300), <alpha-value>)",
304
- 400: "rgba(var(--secondary-400), <alpha-value>)",
305
- 500: "rgba(var(--secondary-500), <alpha-value>)",
306
- 600: "rgba(var(--secondary-600), <alpha-value>)",
307
- 700: "rgba(var(--secondary-700), <alpha-value>)",
308
- 800: "rgba(var(--secondary-800), <alpha-value>)",
309
- 900: "rgba(var(--secondary-900), <alpha-value>)",
310
- DEFAULT: "rgba(var(--secondary), <alpha-value>)"
244
+ 50: "var(--secondary-50)",
245
+ 100: "var(--secondary-100)",
246
+ 200: "var(--secondary-200)",
247
+ 300: "var(--secondary-300)",
248
+ 400: "var(--secondary-400)",
249
+ 500: "var(--secondary-500)",
250
+ 600: "var(--secondary-600)",
251
+ 700: "var(--secondary-700)",
252
+ 800: "var(--secondary-800)",
253
+ 900: "var(--secondary-900)",
254
+ DEFAULT: "var(--secondary-500)"
311
255
  },
312
256
  base: {
313
- 50: "rgba(var(--base-50), <alpha-value>)",
314
- 100: "rgba(var(--base-100), <alpha-value>)",
315
- 200: "rgba(var(--base-200), <alpha-value>)",
316
- 300: "rgba(var(--base-300), <alpha-value>)",
317
- 400: "rgba(var(--base-400), <alpha-value>)",
318
- 500: "rgba(var(--base-500), <alpha-value>)",
319
- 600: "rgba(var(--base-600), <alpha-value>)",
320
- 700: "rgba(var(--base-700), <alpha-value>)",
321
- 800: "rgba(var(--base-800), <alpha-value>)",
322
- 900: "rgba(var(--base-900), <alpha-value>)",
323
- DEFAULT: "rgba(var(--base), <alpha-value>)"
257
+ 300: "var(--base-300)",
258
+ 400: "var(--base-400)",
259
+ 500: "var(--base-500)",
260
+ DEFAULT: "var(--base-500)"
261
+ },
262
+ border: {
263
+ 50: "var(--border-50)",
264
+ 100: "var(--border-100)",
265
+ 200: "var(--border-200)",
266
+ 300: "var(--border-300)",
324
267
  },
325
268
  text: {
326
- 50: "rgba(var(--text-50), <alpha-value>)",
327
- 100: "rgba(var(--text-100), <alpha-value>)",
328
- 200: "rgba(var(--text-200), <alpha-value>)",
329
- 300: "rgba(var(--text-300), <alpha-value>)",
330
- 400: "rgba(var(--text-400), <alpha-value>)",
331
- 500: "rgba(var(--text-500), <alpha-value>)",
332
- DEFAULT: "rgba(var(--text), 1)"
269
+ 50: "var(--text-50)",
270
+ 100: "var(--text-100)",
271
+ 200: "var(--text-200)",
272
+ 300: "var(--text-300)",
273
+ 400: "var(--text-400)",
274
+ 500: "var(--text-500)",
275
+ DEFAULT: "var(--text-500)"
333
276
  },
334
277
  whatsapp: {
335
- 100: "rgba(var(--whatsapp-100), <alpha-value>)",
336
- 500: "rgba(var(--whatsapp-500), <alpha-value>)",
337
- DEFAULT: "rgba(var(--whatsapp), <alpha-value>)"
278
+ 100: "var(--whatsapp-100)",
279
+ 500: "var(--whatsapp-500)",
280
+ DEFAULT: "var(--whatsapp)"
338
281
  },
282
+ },
283
+
284
+ spacing: {
285
+ 0: '0',
286
+ 1: 'var(--space-1)',
287
+ 2: 'var(--space-2)',
288
+ 3: 'var(--space-3)',
289
+ 4: 'var(--space-4)',
290
+ 5: 'var(--space-5)',
291
+ 6: 'var(--space-6)',
292
+ 7: 'var(--space-7)',
293
+ 8: 'var(--space-8)',
294
+ 9: 'var(--space-9)',
295
+ 10: 'var(--space-10)',
296
+ 11: 'var(--space-11)',
297
+ 12: 'var(--space-12)',
339
298
  }
340
299
  }
341
300
  }