@mixd-id/web-scaffold 0.1.250801004 → 0.1.250801005

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 (124) hide show
  1. package/package.json +2 -1
  2. package/src/components/Ahref.vue +1 -1
  3. package/src/components/Alert.vue +1 -1
  4. package/src/components/ArrayList.vue +2 -2
  5. package/src/components/Article.vue +2 -2
  6. package/src/components/Button.vue +1 -1
  7. package/src/components/Card.vue +221 -0
  8. package/src/components/Cart.vue +2 -2
  9. package/src/components/CartIcon.vue +1 -1
  10. package/src/components/Checkout.vue +2 -2
  11. package/src/components/CheckoutDelivery.vue +1 -1
  12. package/src/components/CodeEditor.vue +1 -1
  13. package/src/components/ColorPicker.vue +3 -3
  14. package/src/components/ColorPicker2.vue +3 -3
  15. package/src/components/ColorPicker3.vue +1 -1
  16. package/src/components/Confirm.vue +1 -1
  17. package/src/components/ContextMenu.vue +2 -2
  18. package/src/components/ContextMenuItem.vue +53 -0
  19. package/src/components/Dashboard.vue +35 -8
  20. package/src/components/Dashboard2.vue +1 -1
  21. package/src/components/DashboardComponentSelector.vue +12 -4
  22. package/src/components/Datepicker.vue +2 -2
  23. package/src/components/DayTimeRange.vue +2 -2
  24. package/src/components/Dropdown.vue +1 -1
  25. package/src/components/Flex.vue +6 -4
  26. package/src/components/GHeatMaps.vue +3 -3
  27. package/src/components/HTMLEditor.vue +8 -4
  28. package/src/components/Image.vue +1 -1
  29. package/src/components/ImportModal.vue +1 -1
  30. package/src/components/List.vue +66 -94
  31. package/src/components/ListPage1.vue +14 -15
  32. package/src/components/ListView.vue +5 -6
  33. package/src/components/ListViewSettings.vue +2 -2
  34. package/src/components/LogViewerItem.vue +1 -1
  35. package/src/components/MarkdownEdit.vue +3 -3
  36. package/src/components/MarkdownPreview.vue +2 -2
  37. package/src/components/Modal.vue +12 -16
  38. package/src/components/MultiDropdown.vue +1 -1
  39. package/src/components/MultilineText.vue +1 -1
  40. package/src/components/OTPField.vue +9 -15
  41. package/src/components/PageBuilder.vue +3 -3
  42. package/src/components/Radio.vue +1 -1
  43. package/src/components/SearchModal.vue +1 -1
  44. package/src/components/Slider.vue +1 -1
  45. package/src/components/SvgEditor.vue +2 -2
  46. package/src/components/Switch.vue +3 -4
  47. package/src/components/Table.vue +2 -2
  48. package/src/components/TableView.vue +2 -3
  49. package/src/components/TableViewHead.vue +2 -2
  50. package/src/components/TextEditor.vue +2 -2
  51. package/src/components/TextWithTag.vue +23 -5
  52. package/src/components/Textarea.vue +11 -13
  53. package/src/components/Textbox.vue +1 -1
  54. package/src/components/Timepicker.vue +2 -2
  55. package/src/components/Toast.vue +1 -1
  56. package/src/components/TreeMenu.vue +2 -2
  57. package/src/components/VirtualGrid.vue +3 -3
  58. package/src/components/VirtualTable.vue +13 -9
  59. package/src/index.js +2 -0
  60. package/src/themes/default/index.js +56 -148
  61. package/src/utils/helpers.mjs +6 -12
  62. package/src/widgets/AhrefSetting.vue +1 -1
  63. package/src/widgets/ArticleSetting.vue +1 -1
  64. package/src/widgets/BackgroundColorSetting.vue +1 -1
  65. package/src/widgets/BotEditor/BotEditorActions.vue +2 -2
  66. package/src/widgets/BotEditor.vue +4 -4
  67. package/src/widgets/ButtonSetting.vue +1 -1
  68. package/src/widgets/CarouselSetting.vue +1 -1
  69. package/src/widgets/CartSetting.vue +1 -1
  70. package/src/widgets/CheckoutSetting.vue +1 -1
  71. package/src/widgets/CollapsiblePanelSetting.vue +1 -1
  72. package/src/widgets/ColumnSelector.vue +1 -1
  73. package/src/widgets/ComponentSetting.vue +1 -1
  74. package/src/widgets/ComponentSetting2.vue +1 -1
  75. package/src/widgets/ComponentSetting3.vue +1 -1
  76. package/src/widgets/ContactForm.vue +1 -1
  77. package/src/widgets/ContactFormSetting.vue +7 -7
  78. package/src/widgets/Dashboard/BarChart.vue +5 -6
  79. package/src/widgets/Dashboard/BarChartSetting.vue +1 -1
  80. package/src/widgets/Dashboard/DataTableSetting.vue +3 -3
  81. package/src/widgets/Dashboard/DatasourceSelector.vue +1 -1
  82. package/src/widgets/Dashboard/DoughnutSetting.vue +1 -1
  83. package/src/widgets/Dashboard/Metric.vue +1 -1
  84. package/src/widgets/Dashboard/PieSetting.vue +1 -1
  85. package/src/widgets/Dashboard/PolarAreaSetting.vue +1 -1
  86. package/src/widgets/Dashboard/ViewSelector.vue +1 -1
  87. package/src/widgets/Dashboard0.vue +10 -10
  88. package/src/widgets/FAQSetting.vue +3 -3
  89. package/src/widgets/FeatureListSetting.vue +3 -3
  90. package/src/widgets/FlexSetting.vue +1 -1
  91. package/src/widgets/GridSetting.vue +1 -1
  92. package/src/widgets/Header2Setting.vue +1 -1
  93. package/src/widgets/HeaderSetting.vue +1 -1
  94. package/src/widgets/IconListSetting.vue +2 -2
  95. package/src/widgets/ImageSetting.vue +1 -1
  96. package/src/widgets/LinkSetting.vue +1 -1
  97. package/src/widgets/LinkSettingModal.vue +1 -1
  98. package/src/widgets/LogViewer.vue +1 -1
  99. package/src/widgets/MarginSetting.vue +2 -2
  100. package/src/widgets/MenuEditor.vue +1 -1
  101. package/src/widgets/MenuItem1Setting.vue +1 -1
  102. package/src/widgets/ModalSetting.vue +1 -1
  103. package/src/widgets/MultiValueSetting.vue +2 -2
  104. package/src/widgets/MultiValueSetting2.vue +2 -2
  105. package/src/widgets/OGSettingModal.vue +1 -1
  106. package/src/widgets/PaddingSetting.vue +2 -2
  107. package/src/widgets/ParagraphSetting.vue +1 -1
  108. package/src/widgets/PresetBar.vue +28 -16
  109. package/src/widgets/PresetBarPivot.vue +8 -8
  110. package/src/widgets/PresetSelector.vue +12 -12
  111. package/src/widgets/SearchModalSetting.vue +1 -1
  112. package/src/widgets/ShareSetting.vue +3 -3
  113. package/src/widgets/StyleSetting.vue +1 -1
  114. package/src/widgets/TestimonialSetting.vue +3 -3
  115. package/src/widgets/TextBlockSetting.vue +1 -1
  116. package/src/widgets/UserActionBuilder/UserActionOutput.vue +1 -1
  117. package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +1 -1
  118. package/src/widgets/UserActionBuilder/UserActionProps.vue +3 -3
  119. package/src/widgets/UserActionBuilder.vue +4 -4
  120. package/src/widgets/WebPageBuilder.vue +17 -17
  121. package/src/widgets/WebPageBuilder2.vue +7 -7
  122. package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +2 -2
  123. package/src/widgets/WebPageBuilder4.vue +5 -5
  124. package/src/widgets/YoutubeVideoSetting.vue +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.250801004",
4
+ "version": "0.1.250801005",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -64,6 +64,7 @@
64
64
  "glob": "^8.0.3",
65
65
  "lodash": "^4.17.21",
66
66
  "lodash-es": "^4.17.21",
67
+ "marked": "^16.4.1",
67
68
  "md5": "^2.3.0",
68
69
  "mitt": "^3.0.1",
69
70
  "pinia": "^2.0.2",
@@ -55,7 +55,7 @@ export default {
55
55
  <style module>
56
56
 
57
57
  .button{
58
- @apply p-2 h-[var(--h-cp)];
58
+ @apply p-2;
59
59
  @apply relative flex items-center justify-center;
60
60
  @apply whitespace-nowrap text-ellipsis overflow-hidden;
61
61
  @apply rounded-lg;
@@ -205,7 +205,7 @@ export default{
205
205
 
206
206
  .alert>*{
207
207
  @apply max-h-[60vh] overflow-y-auto bg-base-400 dark:bg-base-300 rounded-xl;
208
- @apply border-[1px] border-text-50;
208
+ @apply border-[1px] border-border-50;
209
209
  @apply min-w-[280px] max-w-[80vw] md:max-w-[480px];
210
210
  }
211
211
 
@@ -37,12 +37,12 @@ export default{
37
37
 
38
38
  .comp{
39
39
  @apply min-w-[200px] p-1;
40
- @apply border-[1px] border-text-200 bg-base-300 hover:border-text-300 rounded-lg;
40
+ @apply border-[1px] border-border-200 bg-base-300 hover:border-text-300 rounded-lg;
41
41
  @apply flex flex-row items-start flex-nowrap;
42
42
  }
43
43
 
44
44
  .item{
45
- @apply border-[1px] border-text-200 hover:border-text-300 rounded-lg p-1 px-2;
45
+ @apply border-[1px] border-border-200 hover:border-text-300 rounded-lg p-1 px-2;
46
46
  @apply flex flex-row items-center gap-2;
47
47
  }
48
48
 
@@ -376,11 +376,11 @@ export default{
376
376
  .article font[size='7']{ @apply text-4xl; }
377
377
 
378
378
  .article table{
379
- @apply border-[1px] border-text-200 border-collapse w-full;
379
+ @apply border-[1px] border-border-200 border-collapse w-full;
380
380
  table-layout: fixed;
381
381
  }
382
382
  .article table th, .article table td{
383
- @apply border-[1px] border-text-200 p-3 text-left;
383
+ @apply border-[1px] border-border-200 p-3 text-left;
384
384
  @apply break-words;
385
385
  }
386
386
 
@@ -137,7 +137,7 @@ export default{
137
137
  <style module>
138
138
 
139
139
  .button{
140
- @apply p-2 rounded-lg relative inline-flex flex-row items-center justify-center;
140
+ @apply p-2 px-8 rounded-lg relative inline-flex flex-row items-center justify-center;
141
141
  @apply whitespace-nowrap text-ellipsis overflow-hidden min-h-7;
142
142
  @apply border-[1px];
143
143
  @apply active:top-[1px] active:left-[1px] disabled:top-0 disabled:left-0;
@@ -0,0 +1,221 @@
1
+ <template>
2
+ <Teleport v-if="float" to=".bW9k">
3
+ <Transition name="slideup"
4
+ @after-leave="onAfterLeave"
5
+ appear>
6
+ <div v-if="computedState"
7
+ :class="computedClass"
8
+ :style="computedStyle">
9
+
10
+ <slot name="header">
11
+ <div class="relative">
12
+ <div class="absolute top-0 right-0">
13
+ <button type="button" @click="close" class="p-4">
14
+ <svg width="24" height="24" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
15
+ <path d="M6.53034 5.46965C6.23745 5.17676 5.76257 5.17676 5.46968 5.46965C5.17679 5.76255 5.17679 6.23742 5.46968 6.53031L10.9393 12L5.46967 17.4697C5.17678 17.7626 5.17678 18.2374 5.46967 18.5303C5.76256 18.8232 6.23744 18.8232 6.53033 18.5303L12 13.0606L17.4697 18.5303C17.7626 18.8232 18.2375 18.8232 18.5303 18.5303C18.8232 18.2374 18.8232 17.7626 18.5303 17.4697L13.0607 12L18.5303 6.53032C18.8232 6.23743 18.8232 5.76256 18.5303 5.46966C18.2374 5.17677 17.7626 5.17677 17.4697 5.46966L12 10.9393L6.53034 5.46965Z"/>
16
+ </svg>
17
+ </button>
18
+ </div>
19
+ </div>
20
+ </slot>
21
+
22
+ <slot name="default"></slot>
23
+
24
+ </div>
25
+ </Transition>
26
+ </Teleport>
27
+ <div v-else :class="computedClass">
28
+ <slot name="default"></slot>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+
34
+ const modals = []
35
+
36
+ const onDismiss = (e) => {
37
+ if(e.target.classList.contains('bW9k')){
38
+
39
+ }
40
+ }
41
+
42
+ document.querySelector('.bW9k').addEventListener('click', onDismiss)
43
+
44
+ export default{
45
+
46
+ computed: {
47
+
48
+ computedClass(){
49
+ return [
50
+ this.float ? this.$style.modal : this.$style.static,
51
+ this.class,
52
+ this.computedState ? this.$style['state-open'] : ''
53
+ ]
54
+ .join(' ')
55
+ .trim()
56
+ },
57
+
58
+ computedState(){
59
+ return this.mounted &&
60
+ (this.query ? this.query in this.$route.query : this._state);
61
+ },
62
+
63
+ computedStyle(){
64
+ return {
65
+ width: (res => /^\d+$/.test(res) ? parseInt(res) + 'px' : res)(this.width),
66
+ height: (res => /^\d+$/.test(res) ? parseInt(res) + 'px' : res)(this.height),
67
+ }
68
+ },
69
+
70
+ computedTransition(){
71
+ return 'slidedown'
72
+ },
73
+
74
+ },
75
+
76
+ data(){
77
+ return {
78
+ mounted: false,
79
+ _state: false
80
+ }
81
+ },
82
+
83
+ methods:{
84
+
85
+ close(){
86
+ if(!this.float) return
87
+
88
+ if(this.query){
89
+ this.$router.replace({
90
+ ...this.$route,
91
+ query: {
92
+ ...this.$route.query,
93
+ [this.query]: undefined
94
+ }
95
+ })
96
+ }
97
+ else{
98
+ this._state = false
99
+ }
100
+
101
+ },
102
+
103
+ open(){
104
+ if(this.query){
105
+
106
+ }
107
+ else{
108
+ this._state = true
109
+ }
110
+ },
111
+
112
+ onAfterLeave(){
113
+ this.$nextTick(() => {
114
+ let overlay = document.querySelector('.bW9k')
115
+ if(overlay){
116
+ if(overlay.children.length < 1)
117
+ overlay.classList.remove('bW9l')
118
+ }
119
+ })
120
+ },
121
+
122
+ },
123
+
124
+ mounted(){
125
+ this.mounted = true
126
+ },
127
+
128
+ props:{
129
+
130
+ class: String,
131
+
132
+ float: Boolean,
133
+
134
+ height: {
135
+ type: [ String, Number ],
136
+ },
137
+
138
+ state: {
139
+ type: Boolean,
140
+ default: false
141
+ },
142
+
143
+ query: String,
144
+
145
+ width: [ String, Number ],
146
+
147
+ },
148
+
149
+ watch: {
150
+
151
+ computedState: {
152
+ immediate: true,
153
+ handler(state){
154
+ if(!this.float) return
155
+
156
+ let overlay = document.querySelector('.bW9k')
157
+ if(overlay){
158
+ if(state){
159
+ overlay.classList.add('bW9l')
160
+ }
161
+ }
162
+ }
163
+ }
164
+
165
+ }
166
+
167
+ }
168
+
169
+ </script>
170
+
171
+ <style>
172
+
173
+ .bW9k{
174
+ @apply z-20 hidden w-[100vw] h-[100vh];
175
+ @apply bg-white/50 backdrop-blur-xl;
176
+ position: fixed;
177
+ top: 0;
178
+ left: 0;
179
+ bottom: 0;
180
+ right: 0;
181
+ z-index: 100;
182
+ }
183
+ [data-theme="dark"] .bW9k{
184
+ @apply bg-black/50;
185
+ }
186
+ .bW9l{
187
+ @apply flex items-center justify-center;
188
+ }
189
+
190
+ </style>
191
+
192
+ <style module>
193
+
194
+ .static{
195
+ @apply flex flex-col;
196
+ }
197
+
198
+ .modal{
199
+ @apply fixed;
200
+ @apply bg-base-400 dark:bg-base-300;
201
+ @apply border-[1px] border-border-50 flex max-h-[90vh] max-w-full;
202
+ @apply rounded-xl overflow-hidden transition-all;
203
+ @apply flex flex-col;
204
+ z-index: 101;
205
+ transition: all 200ms cubic-bezier(0.25, 1, 0.5, 1);
206
+ transform: scale(0);
207
+ opacity: 0;
208
+ }
209
+ .modal.state-open{
210
+ transform: scale(1);
211
+ opacity: 1;
212
+ }
213
+
214
+ .overlay{
215
+ @apply absolute z-20 left-0 bottom-0 top-0 right-0 bg-white/50 backdrop-blur-sm;
216
+ }
217
+ html[data-theme='dark'] .overlay{
218
+ @apply bg-black/50;
219
+ }
220
+
221
+ </style>
@@ -19,7 +19,7 @@
19
19
  <h3>Cart</h3>
20
20
  </div>
21
21
 
22
- <div class="divide-y divide-text-50 px-3 bg-base-300 min-h-[80vh]">
22
+ <div class="divide-y divide-border-50 px-3 bg-base-300 min-h-[80vh]">
23
23
  <div v-for="item in cart.items" class="flex flex-row gap-2 p-2">
24
24
  <Checkbox v-model="item.checked" />
25
25
  <Image :src="item.imageUrl" class="w-[56px] aspect-square rounded-lg" />
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </div>
58
58
 
59
- <div class="p-5 py-3 bg-base-300 flex flex-row sticky bottom-0 border-t-[1px] border-text-50">
59
+ <div class="p-5 py-3 bg-base-300 flex flex-row sticky bottom-0 border-t-[1px] border-border-50">
60
60
  <div v-if="cart?.total > 0" class="flex flex-col flex-1 leading-3">
61
61
  <small>Total</small>
62
62
  <h5>Rp. {{ cart.total.toLocaleString() }}</h5>
@@ -23,7 +23,7 @@
23
23
  <ContextMenu ref="contextMenu"
24
24
  position="bottom-right"
25
25
  class="border-transparent">
26
- <div class="flex flex-col min-w-[300px] divide-y divide-text-50">
26
+ <div class="flex flex-col min-w-[300px] divide-y divide-border-50">
27
27
 
28
28
  <div class="" @click.stop>
29
29
  <div class="p-5 py-3 flex flex-row items-center">
@@ -66,7 +66,7 @@
66
66
 
67
67
  <div class="mt-1 p-5 bg-base-300 flex flex-col gap-3">
68
68
  <div v-for="item in order.items" class="flex flex-row gap-3">
69
- <Image :src="item.imageSrc" class="w-[60px] aspect-square rounded-lg bg-base-50" />
69
+ <Image :src="item.imageSrc" class="w-[60px] aspect-square rounded-lg bg-base-300" />
70
70
  <div class="flex-1 flex flex-col gap1">
71
71
  <small>{{ item.code }}</small>
72
72
  <strong>{{ item.name }}</strong>
@@ -173,7 +173,7 @@
173
173
 
174
174
  </div>
175
175
 
176
- <div class="flex md:hidden p-5 py-3 bg-base-300 flex-row sticky bottom-0 border-t-[1px] border-text-50">
176
+ <div class="flex md:hidden p-5 py-3 bg-base-300 flex-row sticky bottom-0 border-t-[1px] border-border-50">
177
177
  <div v-if="order?.total > 0" class="flex flex-col flex-1 leading-3">
178
178
  <small>Total</small>
179
179
  <h5>Rp. {{ order.total.toLocaleString() }}</h5>
@@ -5,7 +5,7 @@
5
5
  <h3>Select Delivery</h3>
6
6
  </div>
7
7
 
8
- <div v-if="!newItem" class="flex flex-col divide-y divide-text-50">
8
+ <div v-if="!newItem" class="flex flex-col divide-y divide-border-50">
9
9
  <div v-for="item in items"
10
10
  class="p-5 py-3 flex flex-col cursor-pointer"
11
11
  @click="apply(item)">
@@ -34,7 +34,7 @@ export default{
34
34
  <style module>
35
35
 
36
36
  .comp{
37
- @apply border-[1px] border-text-200 bg-base-300 rounded-lg flex flex-col overflow-hidden;
37
+ @apply border-[1px] border-border-200 bg-base-300 rounded-lg flex flex-col overflow-hidden;
38
38
  }
39
39
 
40
40
  .comp code{
@@ -20,9 +20,9 @@
20
20
  </div>
21
21
  <div class="grid grid-cols-2 gap-4">
22
22
  <button type="button" @click="select('')"
23
- class="w-full p-1 border-text-100 border-[1px] rounded-lg">None</button>
23
+ class="w-full p-1 border-border-100 border-[1px] rounded-lg">None</button>
24
24
  <button type="button" v-if="mode !== 'class' && Boolean(customColor)"
25
- class="w-full p-1 border-text-100 border-[1px] rounded-lg"
25
+ class="w-full p-1 border-border-100 border-[1px] rounded-lg"
26
26
  @click="$refs.inputColor.click()">Custom</button>
27
27
  </div>
28
28
  </div>
@@ -150,7 +150,7 @@ export default{
150
150
  }
151
151
 
152
152
  .circle{
153
- @apply w-[24px] h-[24px] rounded-full cursor-pointer border-[2px] border-text-200;
153
+ @apply w-[24px] h-[24px] rounded-full cursor-pointer border-[2px] border-border-200;
154
154
  }
155
155
 
156
156
  .inputColor{
@@ -24,9 +24,9 @@
24
24
  </div>
25
25
  <div class="grid grid-cols-2 gap-4">
26
26
  <button type="button" @click="select('')"
27
- class="w-full p-1 border-text-100 border-[1px] rounded-lg">None</button>
27
+ class="w-full p-1 border-border-100 border-[1px] rounded-lg">None</button>
28
28
  <button type="button" v-if="mode !== 'class' && Boolean(customColor)"
29
- class="w-full p-1 border-text-100 border-[1px] rounded-lg"
29
+ class="w-full p-1 border-border-100 border-[1px] rounded-lg"
30
30
  @click="$refs.inputColor.click()">Custom</button>
31
31
  </div>
32
32
  </div>
@@ -173,7 +173,7 @@ export default{
173
173
  }
174
174
 
175
175
  .circle{
176
- @apply w-[24px] h-[24px] rounded-full cursor-pointer border-[2px] border-text-200;
176
+ @apply w-[24px] h-[24px] rounded-full cursor-pointer border-[2px] border-border-200;
177
177
  }
178
178
 
179
179
  .inputColor{
@@ -9,7 +9,7 @@
9
9
  </Dropdown>
10
10
 
11
11
  <div v-if="computedBackground"
12
- class="h-[8px] border-[1px] border-text-200 rounded-lg"
12
+ class="h-[8px] border-[1px] border-border-200 rounded-lg"
13
13
  :style="{ background:computedBackground }"></div>
14
14
 
15
15
  <div v-if="mode === 'solid'">
@@ -123,7 +123,7 @@ export default{
123
123
 
124
124
  .confirm>*{
125
125
  @apply max-h-[60vh] overflow-y-auto bg-base-400 dark:bg-base-300 rounded-xl;
126
- @apply border-[1px] border-text-50;
126
+ @apply border-[1px] border-border-50;
127
127
  @apply min-w-[280px] max-w-[80vw] md:max-w-[480px];
128
128
  }
129
129
 
@@ -241,8 +241,8 @@ export default {
241
241
  <style module>
242
242
 
243
243
  .contextMenu{
244
- @apply fixed bg-base-400 dark:bg-base-300 min-w-[150px] overflow-y-auto rounded-lg;
245
- @apply whitespace-nowrap shadow-2xl border-[1px] border-text-50 mt-[1px];
244
+ @apply fixed bg-base-400 backdrop-blur-xl min-w-[150px] overflow-y-auto rounded-lg;
245
+ @apply whitespace-nowrap shadow-2xl border-[1px] border-border-50 mt-[1px];
246
246
  z-index: 180;
247
247
  }
248
248
 
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div :class="$style.item">
3
+ <div class="py-1">
4
+ <div :class="`${$style.indicator}${value.status === 2 ? ` ${$style.read}` : ''}`"></div>
5
+ </div>
6
+ <div class="flex-1 flex flex-col">
7
+ <div class="flex flex-row gap-6">
8
+ <strong class="flex-1 text-ellipsis-nowrap">{{ value.title }}</strong>
9
+ <small class="text-text-400">{{ dayjs(value.createdAt).format('D MMM HH:mm') }}</small>
10
+ </div>
11
+ <div>
12
+ <p class="whitespace-pre-wrap line-clamp-2">Biscuit bonbon gummi bears biscuit jelly-o cupcake danish tart carrot cake. Icing muffin gummi bears</p>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </template>
17
+
18
+ <script>
19
+
20
+ import dayjs from "dayjs";
21
+
22
+ export default{
23
+ methods: {dayjs},
24
+
25
+ props: {
26
+
27
+ value: Object
28
+
29
+ }
30
+
31
+ }
32
+
33
+ </script>
34
+
35
+ <style module>
36
+
37
+ .item {
38
+ @apply flex flex-row gap-3 p-3;
39
+ }
40
+
41
+ .item:hover{
42
+ @apply bg-primary-50;
43
+ }
44
+
45
+ .indicator{
46
+ @apply w-[14px] h-[14px] rounded-full bg-primary-600;
47
+ }
48
+
49
+ .indicator.read{
50
+ @apply bg-text-300;
51
+ }
52
+
53
+ </style>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div :class="$style.comp">
3
3
 
4
- <div :style="leftStyle" class="relative flex flex-col">
4
+ <div v-if="config.params.openSidebar" :style="leftStyle" class="relative flex flex-col bg-base-300 border-l-[1px] border-border-50">
5
5
  <DashboardConfigs :config="config" class="flex-1" />
6
6
 
7
7
  <div :class="$style.resize1" @mousedown="(e) => $util.dragResize(e, resize1)"></div>
@@ -9,10 +9,21 @@
9
9
 
10
10
  <div class="flex-1 flex flex-col gap-4 py-4">
11
11
 
12
- <div class="px-8 flex flex-row gap-6 items-center">
13
- <h3>{{ preset?.name }}</h3>
14
- <button type="button" class="p-3" @click="load">
15
- <svg width="16" height="16" class="fill-primary hover:fill-primary-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M468.9 32.11c13.87 0 27.18 10.77 27.18 27.04v145.9c0 10.59-8.584 19.17-19.17 19.17h-145.7c-16.28 0-27.06-13.32-27.06-27.2c0-6.634 2.461-13.4 7.96-18.9l45.12-45.14c-28.22-23.14-63.85-36.64-101.3-36.64c-88.09 0-159.8 71.69-159.8 159.8S167.8 415.9 255.9 415.9c73.14 0 89.44-38.31 115.1-38.31c18.48 0 31.97 15.04 31.97 31.96c0 35.04-81.59 70.41-147 70.41c-123.4 0-223.9-100.5-223.9-223.9S132.6 32.44 256 32.44c54.6 0 106.2 20.39 146.4 55.26l47.6-47.63C455.5 34.57 462.3 32.11 468.9 32.11z"/></svg>
12
+ <div class="px-8 flex flex-row gap-8 items-center">
13
+ <button type="button" class="p-3" @click="config.params.openSidebar = !config.params.openSidebar">
14
+ <svg width="16" height="16" class="hover:fill-primary" :class="config.params.openSidebar ? 'fill-primary' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M448 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V96C512 60.65 483.3 32 448 32zM136 336h-48C74.75 336 64 325.3 64 312C64 298.7 74.75 288 88 288h48C149.3 288 160 298.7 160 312C160 325.3 149.3 336 136 336zM136 240h-48C74.75 240 64 229.3 64 216C64 202.7 74.75 192 88 192h48C149.3 192 160 202.7 160 216C160 229.3 149.3 240 136 240zM136 144h-48C74.75 144 64 133.3 64 120C64 106.7 74.75 96 88 96h48C149.3 96 160 106.7 160 120C160 133.3 149.3 144 136 144zM464 416c0 8.822-7.176 16-16 16H224v-352h224c8.824 0 16 7.178 16 16V416z"/></svg>
15
+ </button>
16
+ <button type="button" class="flex flex-row gap-2 items-center">
17
+ <h5>{{ preset?.name }}</h5>
18
+ <svg width="14" height="14" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432.6 209.3l-191.1 183.1C235.1 397.8 229.1 400 224 400s-11.97-2.219-16.59-6.688L15.41 209.3C5.814 200.2 5.502 184.1 14.69 175.4c9.125-9.625 24.38-9.938 33.91-.7187L224 342.8l175.4-168c9.5-9.219 24.78-8.906 33.91 .7187C442.5 184.1 442.2 200.2 432.6 209.3z"/></svg>
19
+ <button type="button" class="p-3" @click="load">
20
+ <svg width="14" height="14" class="fill-text hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M468.9 32.11c13.87 0 27.18 10.77 27.18 27.04v145.9c0 10.59-8.584 19.17-19.17 19.17h-145.7c-16.28 0-27.06-13.32-27.06-27.2c0-6.634 2.461-13.4 7.96-18.9l45.12-45.14c-28.22-23.14-63.85-36.64-101.3-36.64c-88.09 0-159.8 71.69-159.8 159.8S167.8 415.9 255.9 415.9c73.14 0 89.44-38.31 115.1-38.31c18.48 0 31.97 15.04 31.97 31.96c0 35.04-81.59 70.41-147 70.41c-123.4 0-223.9-100.5-223.9-223.9S132.6 32.44 256 32.44c54.6 0 106.2 20.39 146.4 55.26l47.6-47.63C455.5 34.57 462.3 32.11 468.9 32.11z"/></svg>
21
+ </button>
22
+ </button>
23
+ <div class="flex-1"></div>
24
+
25
+ <button type="button" class="p-3" @click="config.params.openRightbar = !config.params.openRightbar">
26
+ <svg width="16" height="16" class="fill-text hover:fill-primary" :class="config.params.openRightbar ? 'fill-primary' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M324.4 103.1L384 128l24.88 59.63C410.2 190.3 413 192 416 192s5.75-1.75 7.125-4.375L448 128l59.63-24.88C510.3 101.8 512 99 512 96s-1.75-5.75-4.375-7.125L448 64l-24.88-59.62C421.8 1.75 419 0 416 0s-5.75 1.75-7.125 4.375L384 64l-59.63 24.88C321.8 90.25 320 93 320 96S321.8 101.8 324.4 103.1zM507.6 408.9L448 384l-24.88-59.63C421.8 321.8 419 320 416 320s-5.75 1.75-7.125 4.375L384 384l-59.63 24.88C321.8 410.2 320 413 320 416s1.75 5.75 4.375 7.125L384 448l24.88 59.63C410.2 510.2 413 512 416 512s5.75-1.75 7.125-4.375L448 448l59.63-24.88C510.3 421.8 512 419 512 416S510.3 410.2 507.6 408.9zM384 255.6c0-6-3.375-11.62-8.875-14.38l-112.5-56.31L206.3 72.19c-5.375-10.88-23.13-10.88-28.5 0L121.4 184.9L8.875 241.2C3.375 244 0 249.6 0 255.6c0 6.125 3.375 11.62 8.875 14.38l112.5 56.37l56.38 112.7C180.4 444.4 185.1 447.9 192 447.9c5.999 0 11.62-3.512 14.25-8.887l56.38-112.7l112.5-56.37C380.6 267.2 384 261.8 384 255.6z"/></svg>
16
27
  </button>
17
28
  </div>
18
29
 
@@ -24,6 +35,24 @@
24
35
 
25
36
  </div>
26
37
 
38
+ <div v-if="config.params.openRightbar" class="w-[320px] bg-base-300 flex flex-col">
39
+
40
+ <div class="flex-1"></div>
41
+
42
+ <div class="p-3">
43
+ <Textarea placeholder="Ask anything...">
44
+ <template #end>
45
+ <div class="p-1">
46
+ <button class="p-2">
47
+ <svg width="14" height="14" class="fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M511.1 255.1c0 12.8-7.625 24.38-19.41 29.41L44.6 477.4c-4.062 1.75-8.344 2.594-12.59 2.594c-8.625 0-17.09-3.5-23.28-10.05c-9.219-9.766-11.34-24.25-5.344-36.27l73.66-147.3l242.1-30.37L77.03 225.6l-73.66-147.3C-2.623 66.3-.4982 51.81 8.72 42.05c9.25-9.766 23.56-12.75 35.87-7.453L492.6 226.6C504.4 231.6 511.1 243.2 511.1 255.1z"/></svg>
48
+ </button>
49
+ </div>
50
+ </template>
51
+ </Textarea>
52
+ </div>
53
+
54
+ </div>
55
+
27
56
  </div>
28
57
  </template>
29
58
 
@@ -56,8 +85,6 @@ const config = ref(Object.assign({
56
85
 
57
86
  const data = ref({})
58
87
 
59
- console.log('Config', config)
60
-
61
88
  const leftStyle = computed(() => {
62
89
  if(!config.value.params.leftWidth)
63
90
  config.value.params.leftWidth = 300
@@ -206,7 +233,7 @@ onMounted(() => {
206
233
  <style module>
207
234
 
208
235
  .comp {
209
- @apply flex flex-row divide-x divide-text-50;
236
+ @apply flex flex-row;
210
237
  }
211
238
 
212
239
  .resize1{
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div :class="$style.comp">
3
3
 
4
- <div class="w-[480px] border-r-[1px] border-text-50">
4
+ <div class="w-[480px] border-r-[1px] border-border-50">
5
5
  <MetricSetting :value="preset.views[0]"/>
6
6
 
7
7
  <pre class="text-xs break-all">
@@ -17,7 +17,7 @@
17
17
 
18
18
  </div>
19
19
  </template>
20
- <div class="flex-1 divide-y divide-text-50">
20
+ <div class="flex-1 divide-y divide-border-50">
21
21
 
22
22
  <div class="flex flex-col">
23
23
  <button v-for="component of components"
@@ -67,9 +67,17 @@ const components = ref([
67
67
  type: "VirtualTable",
68
68
  name: "Virtual Table",
69
69
  props: {
70
- enabled: true
71
- },
72
- items: []
70
+ enabled: true,
71
+ class: "bg-base-500 max-h-[80vh]"
72
+ }
73
+ },
74
+ {
75
+ type: "Metric",
76
+ name: "Metric",
77
+ props: {
78
+ enabled: true,
79
+ class: "bg-base-500"
80
+ }
73
81
  }
74
82
  ])
75
83
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
 
3
- <div v-if="mode === ''" :class="compClass" class="divide-x divide-text-50">
3
+ <div v-if="mode === ''" :class="compClass" class="divide-x divide-border-50">
4
4
  <div class="w-[80px] flex flex-row items-center relative">
5
5
  <select v-model="DD" class="text-left w-full flex-1 px-3">
6
6
  <option disabled selected>Tanggal</option>
@@ -322,7 +322,7 @@ export default{
322
322
 
323
323
  .datepicker {
324
324
  @apply flex overflow-hidden cursor-pointer relative;
325
- @apply border-[1px] border-text-200 bg-base-300 rounded-lg;
325
+ @apply border-[1px] border-border-200 bg-base-300 rounded-lg;
326
326
  @apply cursor-pointer;
327
327
  }
328
328
  .datepicker:not(.readonly){
@@ -17,7 +17,7 @@
17
17
  <option value="-">Holiday</option>
18
18
  </select>
19
19
  </div>
20
- <div class="flex-1 flex flex-col gap-1 pl-2 border-l-[1px] border-text-100 divide-y divide-text-100">
20
+ <div class="flex-1 flex flex-col gap-1 pl-2 border-l-[1px] border-border-100 divide-y divide-text-100">
21
21
  <div v-for="(range, i) in val.value" class="flex flex-row">
22
22
  <div class="flex-1 flex flex-row">
23
23
  <input type="time" v-model="val.value[i][0]" @blur="updateModelValue()">
@@ -111,7 +111,7 @@ export default{
111
111
  <style module>
112
112
 
113
113
  .comp{
114
- @apply border-[1px] border-text-200 bg-base-500 rounded-lg;
114
+ @apply border-[1px] border-border-200 bg-base-500 rounded-lg;
115
115
  @apply inline-flex flex-col divide-y divide-text-100;
116
116
  }
117
117
 
@@ -161,7 +161,7 @@ export default {
161
161
 
162
162
  .dropdown{
163
163
  @apply flex items-center rounded-lg overflow-hidden cursor-pointer relative;
164
- @apply border-[1px] border-text-200 bg-base-300;
164
+ @apply border-[1px] border-border-200 bg-base-400;
165
165
  }
166
166
  .dropdown:not(.readonly){
167
167
  @apply hover:border-text-300;