@mixd-id/web-scaffold 0.1.230406231 → 0.1.230406233

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.
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.230406231",
4
+ "version": "0.1.230406233",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -140,7 +140,7 @@ export default{
140
140
  @apply p-2;
141
141
  @apply relative flex items-center justify-center;
142
142
  @apply whitespace-nowrap text-ellipsis overflow-hidden;
143
- @apply rounded-lg;
143
+ @apply rounded-lg appearance-none;
144
144
  }
145
145
  .button>*:first-child{
146
146
  @apply flex items-center justify-center
@@ -155,21 +155,17 @@ export default{
155
155
  .button-primary{
156
156
  @apply bg-primary-500 text-white rounded-lg;
157
157
  box-shadow: 0 2px 1px rgba(0, 0, 0, .05);
158
- outline: solid 1px rgb(var(--primary-700));
159
158
  border: solid 1px rgb(var(--primary-400));
160
159
  }
161
160
  .button-primary:focus{
162
- outline-color: rgb(var(--primary-800));
163
161
  border-color: rgb(var(--primary-600));
164
162
  }
165
163
  .button-primary:hover{
166
164
  @apply bg-primary-600;
167
- outline-color: rgb(var(--primary-800))
168
165
  }
169
166
  .button-primary:disabled{
170
167
  @apply bg-primary-500 opacity-50 top-0 left-0 cursor-not-allowed;
171
168
  @apply top-0 left-0;
172
- outline: solid 1px rgb(var(--primary-700));
173
169
  }
174
170
  .button-primary *{
175
171
  @apply text-white fill-white;
@@ -188,10 +184,8 @@ export default{
188
184
 
189
185
  .button-outline{
190
186
  @apply bg-transparent text-primary-500;
191
- outline: solid 1px rgb(var(--primary-700));
192
187
  }
193
188
  .button-outline:hover{
194
- outline-color: rgb(var(--primary-800))
195
189
  }
196
190
  .button-outline:disabled{
197
191
  @apply opacity-50 top-0 left-0 cursor-not-allowed;
@@ -215,17 +209,14 @@ export default{
215
209
  .button-secondary{
216
210
  @apply bg-secondary-200 text-text-500 rounded-lg;
217
211
  box-shadow: 0 2px 1px rgba(0, 0, 0, .05);
218
- outline: solid 1px rgb(var(--secondary-200));
219
212
  border: solid 1px rgb(var(--secondary-200));
220
213
  }
221
214
  .button-secondary:hover{
222
215
  @apply bg-secondary-100;
223
- outline-color: rgb(var(--secondary-100));
224
216
  border-color: rgb(var(--secondary-100));
225
217
  }
226
218
  .button-secondary:disabled{
227
219
  @apply bg-secondary-500 opacity-50 top-0 left-0 cursor-not-allowed;
228
- outline: solid 1px rgb(var(--secondary-700));
229
220
  }
230
221
  .button-secondary *{
231
222
  @apply text-text-500 fill-white;
@@ -6,10 +6,9 @@
6
6
  <slot>
7
7
  <div class="p-6">
8
8
  <div ref="item" :class="$style.item" @mouseover="onMouseOver" @mouseout="onMouseOut">
9
- <div></div>
10
- <div class="flex-1 break-all whitespace-pre-line">{{ text }}</div>
9
+ <div class="flex-1">{{ text }}</div>
11
10
  <div>
12
- <button type="button" class="text-sm" @click="close">Dismiss</button>
11
+ <button type="button" class="text-sm text-primary" @click="close">Dismiss</button>
13
12
  </div>
14
13
  </div>
15
14
  </div>
package/src/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {defineAsyncComponent, ref} from "vue"
2
2
  import {observeInit} from './utils/helpers.mjs'
3
3
  import throttle from "lodash/throttle"
4
+ import dayjs from "dayjs";
4
5
 
5
6
  let _UNIQID = 0
6
7
  const uniqid = (additionalKey = '') => {
@@ -150,6 +151,11 @@ const consoleTime = (text) => { console.time(text) }
150
151
  const consoleTimeLog = (text) => { console.timeLog(text) }
151
152
  const consoleTimeEnd = (text) => { console.timeEnd(text) }
152
153
 
154
+ const formatDate = (date, format = 'YYYY-MM-DD HH:mm:ss') => {
155
+ if(!date) return ''
156
+ return dayjs(date).format(format)
157
+ }
158
+
153
159
  const util = {
154
160
 
155
161
  dragResize: (e, callback) => {
@@ -314,9 +320,11 @@ export default{
314
320
  const uid = el.getAttribute('data-tooltip')
315
321
  const tooltip = tooltips[uid]
316
322
  const rect = el.getBoundingClientRect()
317
- tooltip.style.top = (rect.y + rect.height + 10) + 'px'
318
- tooltip.style.left = rect.x - (Math.round((tooltip.clientWidth - rect.width) / 2)) + 'px'
319
- tooltip.classList.add('active')
323
+ if(rect && rect.width > 0){
324
+ tooltip.style.top = (rect.y + rect.height + 10) + 'px'
325
+ tooltip.style.left = rect.x - (Math.round((tooltip.clientWidth - rect.width) / 2)) + 'px'
326
+ tooltip.classList.add('active')
327
+ }
320
328
  }
321
329
  }, 1300)
322
330
  el.setAttribute('data-tooltip-open', true)
@@ -335,6 +343,7 @@ export default{
335
343
  const privateVars = {}
336
344
 
337
345
  app.config.globalProperties.uniqid = uniqid
346
+ app.config.globalProperties.formatDate = formatDate
338
347
  app.config.globalProperties.$download = download
339
348
  app.config.globalProperties.$preload = preload
340
349
  app.config.globalProperties.$popPreloads = popPreloads
@@ -57,6 +57,9 @@ const plugin = Plugin(function({ addBase, config, theme }) {
57
57
  '--whatsapp-100': '179, 206, 201',
58
58
  '--whatsapp-500': '0, 93, 75',
59
59
 
60
+ '--facebook-100': '205, 215, 231',
61
+ '--facebook-500': '8, 102, 255',
62
+
60
63
  },
61
64
 
62
65
  'html[data-theme="dark"], .html[data-theme="dark"]': {
@@ -90,7 +90,7 @@ let ListView = {
90
90
  async unsubscribe(params, socket){
91
91
  const { name } = params
92
92
  if(name){
93
- socket.leave(this.name)
93
+ socket.leave(name)
94
94
  }
95
95
  },
96
96