sprintify-ui 0.2.26 → 0.2.28

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 (44) hide show
  1. package/dist/sprintify-ui.es.js +3985 -3991
  2. package/dist/style.css +1 -1
  3. package/dist/types/src/components/BaseStatistic.vue.d.ts +0 -1
  4. package/dist/types/src/components/BaseToast.vue.d.ts +20 -0
  5. package/dist/types/src/stories/PageShow.vue.d.ts +2 -0
  6. package/dist/types/src/types/TimelineItem.d.ts +1 -2
  7. package/package.json +1 -1
  8. package/src/assets/form.css +1 -1
  9. package/src/components/BaseActionItemButton.vue +3 -1
  10. package/src/components/BaseAlert.vue +20 -20
  11. package/src/components/BaseAppDialogs.vue +6 -7
  12. package/src/components/BaseAppNotifications.vue +11 -47
  13. package/src/components/BaseAvatar.vue +1 -1
  14. package/src/components/BaseBreadcrumbs.vue +3 -3
  15. package/src/components/BaseDataIterator.vue +2 -2
  16. package/src/components/BaseDataIteratorSectionModal.vue +2 -2
  17. package/src/components/BaseDataTable.stories.js +2 -144
  18. package/src/components/BaseDataTable.vue +1 -1
  19. package/src/components/BaseDialog.vue +9 -9
  20. package/src/components/BaseGantt.vue +1 -1
  21. package/src/components/BaseHeader.vue +13 -19
  22. package/src/components/BaseIconPicker.vue +1 -1
  23. package/src/components/BaseInputLabel.vue +2 -2
  24. package/src/components/BaseModalCenter.vue +11 -17
  25. package/src/components/BaseModalSide.vue +11 -17
  26. package/src/components/BaseNavbarSideItem.vue +1 -1
  27. package/src/components/BasePanel.vue +1 -1
  28. package/src/components/BaseRichText.vue +17 -1
  29. package/src/components/BaseShortcut.vue +1 -1
  30. package/src/components/BaseSideNavigation.stories.js +6 -1
  31. package/src/components/BaseSideNavigationItem.vue +1 -1
  32. package/src/components/BaseStatistic.vue +11 -14
  33. package/src/components/BaseTabItem.vue +18 -17
  34. package/src/components/BaseTable.vue +14 -18
  35. package/src/components/BaseTextareaAutoresize.vue +1 -1
  36. package/src/components/BaseTimeline.vue +1 -1
  37. package/src/components/BaseTimelineItem.vue +20 -30
  38. package/src/components/BaseToast.stories.js +50 -0
  39. package/src/components/BaseToast.vue +44 -0
  40. package/src/stories/List.stories.js +132 -0
  41. package/src/stories/PageShow.vue +424 -0
  42. package/src/stories/Show.stories.js +22 -0
  43. package/src/types/TimelineItem.ts +1 -2
  44. package/src/utils/colors.ts +10 -0
@@ -0,0 +1,424 @@
1
+ <template>
2
+ <div class="bg-slate-100 py-6">
3
+ <BaseContainer size="5xl">
4
+ <BaseHeader
5
+ title="Order #21496"
6
+ subtitle="August 6, 2023 at 1:56 pm from Online Store"
7
+ :max-actions="3"
8
+ :badge="{
9
+ icon: 'heroicons:check-circle-solid',
10
+ label: 'Paid',
11
+ color: 'blue',
12
+ }"
13
+ :actions="[
14
+ { label: 'Refund', icon: 'heroicons:banknotes', action: () => showAlert('Refund') },
15
+ { label: 'Edit', icon: 'heroicons:cog', action: () => showAlert('Edit') },
16
+ { label: 'PDF', icon: 'heroicons:document', action: () => showAlert('PDF') },
17
+ { label: 'Duplicate', icon: 'heroicons:document-duplicate', action: () => showAlert('Duplicate') },
18
+ { label: 'Print', icon: 'heroicons:printer', action: () => showAlert('Print') },
19
+ { label: 'Archive', icon: 'heroicons:trash', action: () => showAlert('Archive') },
20
+ ]"
21
+ :breadcrumbs="[{ label: 'Home', to: '/' }, { label: 'Orders', to: '/orders' }, { label: '#21496', to: '/' }]"
22
+ class="mb-1"
23
+ />
24
+
25
+ <BaseTabs
26
+ class="mb-4"
27
+ size="sm"
28
+ >
29
+ <BaseTabItem to="/">
30
+ General
31
+ </BaseTabItem>
32
+ <BaseTabItem to="/settings">
33
+ Transactions <BaseCounter :count="4" />
34
+ </BaseTabItem>
35
+ <BaseTabItem to="/setup">
36
+ Edit
37
+ </BaseTabItem>
38
+ </BaseTabs>
39
+
40
+ <div class="lg:flex lg:space-x-6 space-y-5 lg:space-y-0 font-light">
41
+ <div class="lg:grow lg:w-8/12">
42
+ <BaseCard class="mb-6">
43
+ <BaseCardRow size="sm">
44
+ <BaseBadge
45
+ color="yellow"
46
+ contrast="low"
47
+ bordered
48
+ icon="heroicons:inbox"
49
+ >
50
+ Unfulfilled (2)
51
+ </BaseBadge>
52
+ </BaseCardRow>
53
+
54
+ <BaseCardRow
55
+ v-for="i in 2"
56
+ :key="i"
57
+ size="sm"
58
+ >
59
+ <div class="flex space-x-3">
60
+ <div class="shrink-0">
61
+ <div class="h-10 w-10 bg-slate-500 rounded-md overflow-hidden">
62
+ <img
63
+ class="h-full w-full object-cover"
64
+ src="https://images.unsplash.com/photo-1568605114967-8130f3a36994?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=200&h=200&q=80"
65
+ >
66
+ </div>
67
+ </div>
68
+ <div class="grow">
69
+ <div class="sm:flex space-y-0.5 sm:space-y-0 sm:space-x-3 text-sm mb-2">
70
+ <a
71
+ href="#"
72
+ class="text-blue-600 grow"
73
+ >Contemporaine Blanche- 2 chiffres (6'' à 24'')</a>
74
+ <p class="min-w-[70px] sm:text-right whitespace-nowrap">
75
+ $ 1,000.00 x 1
76
+ </p>
77
+ <p class="min-w-[70px] sm:text-right whitespace-nowrap">
78
+ $ 1,000.00
79
+ </p>
80
+ </div>
81
+ <div class="space-y-1">
82
+ <p class="text-xs text-slate-600">
83
+ SKU: 5f918d672028b
84
+ </p>
85
+ <p class="text-xs text-slate-600">
86
+ <span class="text-slate-500">GPO</span>: 97829
87
+ </p>
88
+ <p class="text-xs text-slate-600">
89
+ <span class="text-slate-500">Numéro de porte</span>: 66
90
+ </p>
91
+ <p class="text-xs text-slate-600">
92
+ <span class="text-slate-500">Taille</span>: 6"
93
+ </p>
94
+ <p class="text-xs text-slate-600">
95
+ <span class="text-slate-500">Couleur</span>: Blanc
96
+ </p>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </BaseCardRow>
101
+ <BaseCardRow size="sm">
102
+ <div class="flex justify-end gap-2">
103
+ <button
104
+ type="button"
105
+ class="btn btn-xs"
106
+ >
107
+ Fulfill items
108
+ </button>
109
+ <button
110
+ type="button"
111
+ class="btn btn-xs btn-primary"
112
+ >
113
+ Create shipping label
114
+ </button>
115
+ </div>
116
+ </BaseCardRow>
117
+ </BaseCard>
118
+
119
+ <BaseCard class="mb-6">
120
+ <BaseCardRow size="sm">
121
+ <BaseBadge
122
+ color="green"
123
+ contrast="low"
124
+ bordered
125
+ icon="heroicons:banknotes"
126
+ >
127
+ Paid
128
+ </BaseBadge>
129
+ </BaseCardRow>
130
+ <BaseCardRow size="sm">
131
+ <table class="text-sm leading-relaxed w-full">
132
+ <tr>
133
+ <td>Subtotal</td>
134
+ <td class="text-slate-600">
135
+ 2 items
136
+ </td>
137
+ <td class="text-right whitespace-nowrap">
138
+ $ 1,000.00
139
+ </td>
140
+ </tr>
141
+ <tr>
142
+ <td>Shipping</td>
143
+ <td class="text-slate-600">
144
+ Standard
145
+ </td>
146
+ <td class="text-right whitespace-nowrap">
147
+ $ 0.00
148
+ </td>
149
+ </tr>
150
+ <tr>
151
+ <td>Taxes</td>
152
+ <td class="text-slate-600">
153
+ GST
154
+ </td>
155
+ <td class="text-right whitespace-nowrap">
156
+ $ 0.00
157
+ </td>
158
+ </tr>
159
+ <tr>
160
+ <td class="font-semibold">
161
+ Total
162
+ </td>
163
+ <td />
164
+ <td class="text-right font-semibold whitespace-nowrap">
165
+ $ 1,000.00
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <td colspan="3">
170
+ <div class="border-t border-slate-300 my-4" />
171
+ </td>
172
+ </tr>
173
+ <tr>
174
+ <td>Paid by customer</td>
175
+ <td />
176
+ <td class="text-right">
177
+ $ 1,000.00
178
+ </td>
179
+ </tr>
180
+ </table>
181
+ </BaseCardRow>
182
+ </BaseCard>
183
+
184
+ <div>
185
+ <h2 class="font-semibold text-sm mb-4">
186
+ Timeline
187
+ </h2>
188
+ <BaseTimeline :items="timelineItems" />
189
+ </div>
190
+ </div>
191
+
192
+ <div class="lg:shrink-0 lg:w-4/12 space-y-4">
193
+ <BaseCard>
194
+ <BaseCardRow size="sm">
195
+ <div class="flex mb-6">
196
+ <div class="flex-grow">
197
+ <h2 class="font-medium mb-2 text-sm">
198
+ Notes
199
+ </h2>
200
+ <p class="text-slate-500 text-xs">
201
+ No notes from customer
202
+ </p>
203
+ </div>
204
+ <div class="shrink-0">
205
+ <button
206
+ type="button"
207
+ class="btn btn-white p-2"
208
+ >
209
+ <BaseIcon icon="heroicons:pencil-solid" />
210
+ </button>
211
+ </div>
212
+ </div>
213
+
214
+ <div class="flex">
215
+ <div class="flex-grow">
216
+ <h2 class="font-medium mb-2 text-sm">
217
+ Additional details
218
+ </h2>
219
+ <p class="text-xs">
220
+ language: fr
221
+ </p>
222
+ </div>
223
+ <div class="shrink-0">
224
+ <button
225
+ type="button"
226
+ class="btn btn-white p-2"
227
+ >
228
+ <BaseIcon icon="heroicons:pencil-solid" />
229
+ </button>
230
+ </div>
231
+ </div>
232
+ </BaseCardRow>
233
+ </BaseCard>
234
+
235
+ <BaseCard>
236
+ <BaseCardRow size="sm">
237
+ <div class="space-y-4">
238
+ <div>
239
+ <h2 class="font-medium mb-2 text-sm">
240
+ Customer
241
+ </h2>
242
+ <a
243
+ href="#"
244
+ class="text-blue-600 text-sm"
245
+ >John Doe</a>
246
+ <br>
247
+ <a
248
+ href="#"
249
+ class="text-blue-600 text-sm"
250
+ >2 orders</a>
251
+ </div>
252
+
253
+ <div>
254
+ <h2 class="font-medium mb-2 text-sm">
255
+ Contact information
256
+ </h2>
257
+ <div class="flex justify-between">
258
+ <a
259
+ href="mailto:john.doe@witify.io"
260
+ class="text-blue-600 text-sm"
261
+ >john.doe@witify.io</a>
262
+ <BaseClipboard
263
+ value="john.doe@witify.io"
264
+ class="shrink-0"
265
+ >
266
+ <BaseIcon
267
+ icon="heroicons:clipboard-solid"
268
+ class="text-slate-600"
269
+ />
270
+ </BaseClipboard>
271
+ </div>
272
+ </div>
273
+
274
+ <div>
275
+ <h2 class="font-medium mb-2 text-sm">
276
+ Shipping address
277
+ </h2>
278
+ <div class="flex justify-between items-start">
279
+ <div>
280
+ <p class="text-sm mb-1">
281
+ Philippe Lamarche<br>
282
+ Gestion Philippe Lamarche Inc<br>
283
+ 250 Rue Westgate<br>
284
+ Rosemère QC J7A 2E9<br>
285
+ Canada<br>
286
+ (514) 618-9961
287
+ </p>
288
+ <a
289
+ href="#"
290
+ class="text-blue-600 text-sm underline"
291
+ >View map</a>
292
+ </div>
293
+ <BaseClipboard
294
+ value="john.doe@witify.io"
295
+ class="shrink-0"
296
+ >
297
+ <BaseIcon
298
+ icon="heroicons:clipboard-solid"
299
+ class="text-slate-600"
300
+ />
301
+ </BaseClipboard>
302
+ </div>
303
+ </div>
304
+ </div>
305
+ </BaseCardRow>
306
+ </BaseCard>
307
+
308
+ <BaseCard>
309
+ <BaseCardRow size="sm">
310
+ <div>
311
+ <h2 class="font-medium mb-3 text-sm">
312
+ Conversion Summary
313
+ </h2>
314
+
315
+ <div class="space-y-1.5 mb-2">
316
+ <div class="flex space-x-2 items-center justify-between">
317
+ <BaseIcon
318
+ icon="heroicons:inbox-arrow-down-solid"
319
+ class="text-slate-600 shrink-0"
320
+ />
321
+ <div class="grow">
322
+ <p class="text-sm">
323
+ This is their 2nd order
324
+ </p>
325
+ </div>
326
+ </div>
327
+
328
+ <div class="flex space-x-2 items-center justify-between">
329
+ <BaseIcon
330
+ icon="heroicons:eye-solid"
331
+ class="text-slate-600 shrink-0"
332
+ />
333
+ <div class="grow">
334
+ <p class="text-sm">
335
+ 1st session from Google
336
+ </p>
337
+ </div>
338
+ </div>
339
+
340
+ <div class="flex space-x-2 items-center justify-between">
341
+ <BaseIcon
342
+ icon="heroicons:chart-bar-square-solid"
343
+ class="text-slate-600 shrink-0"
344
+ />
345
+ <div class="grow">
346
+ <p class="text-sm">
347
+ 1 session over 1 day
348
+ </p>
349
+ </div>
350
+ </div>
351
+ </div>
352
+
353
+ <a
354
+ href="#"
355
+ class="text-blue-600 text-sm underline"
356
+ >View conversion details</a>
357
+ </div>
358
+ </BaseCardRow>
359
+ </BaseCard>
360
+ </div>
361
+ </div>
362
+ </BaseContainer>
363
+
364
+ <BaseAppNotifications />
365
+ <BaseAppDialogs />
366
+ </div>
367
+ </template>
368
+
369
+ <script lang="ts" setup>
370
+ import { useNotificationsStore } from '..';
371
+
372
+ import BaseCard from '@/components/BaseCard.vue';
373
+ import BaseCardRow from '@/components/BaseCardRow.vue';
374
+ import BaseHeader from '@/components/BaseHeader.vue';
375
+ import BaseTabs from '@/components/BaseTabs.vue';
376
+ import BaseBadge from '@/components/BaseBadge.vue';
377
+ import BaseCounter from '@/components/BaseCounter.vue';
378
+ import BaseTabItem from '@/components/BaseTabItem.vue';
379
+ import BaseTimeline from '@/components/BaseTimeline.vue';
380
+ import { BaseIcon } from '../components/index';
381
+ import BaseContainer from '@/components/BaseContainer.vue';
382
+ import BaseClipboard from '@/components/BaseClipboard.vue';
383
+ import BaseAppNotifications from '@/components/BaseAppNotifications.vue';
384
+ import BaseAppDialogs from '@/components/BaseAppDialogs.vue';
385
+
386
+ const timelineItems = [
387
+ {
388
+ title: 'Order placed',
389
+ description: 'Philippe Lamarche placed this order on Online Store (checkout #36886026060090).',
390
+ icon: 'heroicons:inbox-solid',
391
+ color: null,
392
+ date: '1:56 PM',
393
+ },
394
+ {
395
+ title: 'Confirmation created',
396
+ description: 'Confirmation #X9WH46CK5 was generated for this order.',
397
+ icon: 'heroicons:check-circle-solid',
398
+ color: null,
399
+ date: '1:56 PM',
400
+ },
401
+ {
402
+ title: 'Payment captured',
403
+ description: 'Payment of $1,000.00 was captured for this order.',
404
+ icon: 'heroicons:credit-card-solid',
405
+ color: null,
406
+ date: '1:56 PM',
407
+ },
408
+ {
409
+ title: 'Order fulfilled',
410
+ description: 'Order #21496 was fulfilled.',
411
+ icon: 'heroicons:check-circle-solid',
412
+ color: null,
413
+ date: '3:43 PM',
414
+ },
415
+ ];
416
+
417
+ function showAlert(text: string) {
418
+ useNotificationsStore().push({
419
+ title: text,
420
+ text: text,
421
+ color: 'success'
422
+ });
423
+ }
424
+ </script>
@@ -0,0 +1,22 @@
1
+ import PageShow from './PageShow.vue';
2
+
3
+ export default {
4
+ title: 'Pages/Show',
5
+ component: PageShow,
6
+ parameters: {
7
+ layout: 'fullscreen',
8
+ },
9
+ };
10
+
11
+
12
+ const Template = (args) => ({
13
+ components: {
14
+ PageShow
15
+ },
16
+ template: `<PageShow></PageShow>`,
17
+ setup() {
18
+ return { args };
19
+ },
20
+ });
21
+
22
+ export const Demo = Template.bind({});
@@ -1,8 +1,7 @@
1
- import { Color } from './Color';
2
1
  export interface TimelineItem {
3
2
  title: string;
4
3
  icon: string;
5
4
  description?: null | string;
6
5
  date?: string | null;
7
- color?: Color | null;
6
+ color?: string | null;
8
7
  }
@@ -175,7 +175,17 @@ export const palette: Record<string, ColorPalette> = {
175
175
  },
176
176
  };
177
177
 
178
+ const colorNames = {
179
+ info: 'blue',
180
+ success: 'green',
181
+ warning: 'yellow',
182
+ danger: 'red',
183
+ } as Record<string, string>;
184
+
178
185
  export function getColorConfig(color: string, contrast = false): ColorConfig {
186
+
187
+ color = colorNames[color] || color;
188
+
179
189
  const colorConfig = palette[color]?.[contrast ? 'high' : 'low'];
180
190
 
181
191
  if (colorConfig) {