@bagelink/vue 0.0.218 → 0.0.226-beta.0

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 (105) hide show
  1. package/dist/components/AccordionItem.vue.d.ts +23 -0
  2. package/dist/components/AccordionItem.vue.d.ts.map +1 -0
  3. package/dist/components/Avatar.vue.d.ts +20 -0
  4. package/dist/components/Avatar.vue.d.ts.map +1 -0
  5. package/dist/components/Card.vue.d.ts +27 -0
  6. package/dist/components/Card.vue.d.ts.map +1 -0
  7. package/dist/components/DataPreview.vue.d.ts +18 -18
  8. package/dist/components/DataPreview.vue.d.ts.map +1 -1
  9. package/dist/components/Drop.vue.d.ts +34 -0
  10. package/dist/components/Drop.vue.d.ts.map +1 -0
  11. package/dist/components/FileUploader.vue.d.ts +60 -0
  12. package/dist/components/FileUploader.vue.d.ts.map +1 -0
  13. package/dist/components/Modal.vue.d.ts.map +1 -1
  14. package/dist/components/ModalBglForm.vue.d.ts +50 -31
  15. package/dist/components/ModalBglForm.vue.d.ts.map +1 -1
  16. package/dist/components/NavBar.vue.d.ts +17 -12
  17. package/dist/components/NavBar.vue.d.ts.map +1 -1
  18. package/dist/components/TableSchema.vue.d.ts +5 -4
  19. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  20. package/dist/components/Title.vue.d.ts +31 -0
  21. package/dist/components/Title.vue.d.ts.map +1 -0
  22. package/dist/components/form/BglField.vue.d.ts +19 -5
  23. package/dist/components/form/BglField.vue.d.ts.map +1 -1
  24. package/dist/components/form/BglForm.vue.d.ts +38 -27
  25. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  26. package/dist/components/form/ItemRef.vue.d.ts +1 -0
  27. package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
  28. package/dist/components/form/index.d.ts +0 -3
  29. package/dist/components/form/index.d.ts.map +1 -1
  30. package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
  31. package/dist/components/form/inputs/DateInput.vue.d.ts +36 -38
  32. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  33. package/dist/components/form/inputs/FileUpload.vue.d.ts +25 -15
  34. package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
  35. package/dist/components/form/inputs/SelectField.vue.d.ts +1 -4
  36. package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
  37. package/dist/components/form/inputs/SelectInput.vue.d.ts +37 -0
  38. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -0
  39. package/dist/components/form/inputs/TableField.vue.d.ts.map +1 -1
  40. package/dist/components/form/inputs/ToggleInput.vue.d.ts +46 -0
  41. package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -0
  42. package/dist/components/form/inputs/index.d.ts +2 -3
  43. package/dist/components/form/inputs/index.d.ts.map +1 -1
  44. package/dist/components/formkit/index.d.ts +1 -2
  45. package/dist/components/formkit/index.d.ts.map +1 -1
  46. package/dist/components/index.d.ts +5 -4
  47. package/dist/components/index.d.ts.map +1 -1
  48. package/dist/index.cjs +14523 -13691
  49. package/dist/index.mjs +14524 -13692
  50. package/dist/plugins/bagel.d.ts +1 -1
  51. package/dist/plugins/bagel.d.ts.map +1 -1
  52. package/dist/plugins/modal.d.ts +1 -3
  53. package/dist/plugins/modal.d.ts.map +1 -1
  54. package/dist/style.css +744 -404
  55. package/dist/types/BagelForm.d.ts +8 -0
  56. package/dist/types/BagelForm.d.ts.map +1 -1
  57. package/dist/types/index.d.ts +1 -1
  58. package/dist/types/index.d.ts.map +1 -1
  59. package/dist/utils/index.d.ts +5 -2
  60. package/dist/utils/index.d.ts.map +1 -1
  61. package/package.json +12 -10
  62. package/src/components/AccordionItem.vue +100 -0
  63. package/src/components/Avatar.vue +47 -0
  64. package/src/components/Card.vue +13 -0
  65. package/src/components/Comments.vue +75 -75
  66. package/src/components/ContactArray.vue +10 -39
  67. package/src/components/DataPreview.vue +22 -49
  68. package/src/components/{DropDown.vue → Drop.vue} +55 -29
  69. package/src/components/FormKitTable.vue +121 -125
  70. package/src/components/Modal.vue +6 -23
  71. package/src/components/ModalBglForm.vue +10 -24
  72. package/src/components/NavBar.vue +33 -17
  73. package/src/components/RTXEditor.vue +69 -69
  74. package/src/components/TableSchema.vue +26 -72
  75. package/src/components/Title.vue +19 -0
  76. package/src/components/form/BglField.vue +29 -26
  77. package/src/components/form/BglForm.vue +19 -14
  78. package/src/components/form/index.ts +0 -3
  79. package/src/components/form/inputs/CheckInput.vue +20 -18
  80. package/src/components/form/inputs/DateInput.vue +16 -34
  81. package/src/components/form/inputs/FileUpload.vue +139 -19
  82. package/src/components/form/inputs/SelectField.vue +80 -138
  83. package/src/components/form/inputs/SelectInput.vue +517 -0
  84. package/src/components/form/inputs/TableField.vue +1 -5
  85. package/src/components/form/inputs/index.ts +2 -3
  86. package/src/components/formkit/index.ts +0 -3
  87. package/src/components/index.ts +5 -4
  88. package/src/plugins/bagel.ts +2 -2
  89. package/src/plugins/modal.ts +7 -13
  90. package/src/styles/inputs.css +2 -2
  91. package/src/styles/layout.css +1 -1
  92. package/src/styles/modal.css +3 -2
  93. package/src/styles/theme.css +7 -6
  94. package/src/types/BagelForm.ts +5 -0
  95. package/src/types/index.ts +1 -1
  96. package/src/utils/index.ts +26 -6
  97. package/src/components/ContactSubmissions.vue +0 -45
  98. package/src/components/PersonPreview.vue +0 -199
  99. package/src/components/PersonPreviewFormkit.vue +0 -178
  100. package/src/components/form/ItemRef.vue +0 -44
  101. package/src/components/form/MaterialIcon.vue +0 -19
  102. package/src/components/form/PlainInputField.vue +0 -79
  103. package/src/components/form/inputs/DynamicLinkField.vue +0 -137
  104. package/src/components/form/inputs/EmailInput.vue +0 -58
  105. package/src/types/Person.ts +0 -51
@@ -0,0 +1,517 @@
1
+ <template>
2
+ <div class="pb-1">
3
+ <label :for="id">
4
+ {{ label }}
5
+ <Multiselect
6
+ ref="multiselect" :closeOnSelect="true" :id="id" label="label" trackBy="value" :options="optionList"
7
+ :required="required" :placeholder="placeholder" v-model="seletValue"
8
+ />
9
+ </label>
10
+ </div>
11
+ </template>
12
+
13
+ <script lang="ts" setup>
14
+ import { watch } from 'vue';
15
+ import Multiselect from 'vue-multiselect';
16
+
17
+ type Option = {
18
+ label: string;
19
+ value: string | number;
20
+ };
21
+ type RawOption = Option | string | number;
22
+
23
+ const props = defineProps<{
24
+ required?: boolean,
25
+ label: string,
26
+ id: string,
27
+ modelValue?: string | number,
28
+ placeholder?: string,
29
+ defaultValue?: string | number,
30
+ options: RawOption[] | string
31
+ }>();
32
+
33
+ let dataValue = $ref<string | number | undefined>(props.modelValue || props.defaultValue);
34
+ const multiselect = $ref<Multiselect>();
35
+ const emit = defineEmits(['update:modelValue']);
36
+ const optionList = $ref<Option[]>([]);
37
+
38
+ const seletValue = $computed({
39
+ get: () => optionList.find((opt) => opt.value === dataValue),
40
+ set: (val?: Option) => {
41
+ dataValue = val?.value;
42
+ emit('update:modelValue', dataValue);
43
+ multiselect?.deactivate();
44
+ },
45
+ });
46
+
47
+ function optnToValueLabel(option: RawOption): Option {
48
+ if (typeof option === 'string' || typeof option === 'number') {
49
+ return { label: `${option}`, value: option };
50
+ }
51
+ return option;
52
+ }
53
+
54
+ function updateOptionList() {
55
+ const { options } = props;
56
+ const optnLst = typeof options === 'string' ? options.split('\n|,') : options || [];
57
+ optionList.push(...optnLst.map(optnToValueLabel));
58
+ }
59
+
60
+ watch(() => props.options, updateOptionList, { immediate: true });
61
+ </script>
62
+
63
+ <style>
64
+ fieldset[disabled] .multiselect {
65
+ pointer-events: none;
66
+ }
67
+
68
+ .multiselect__spinner {
69
+ position: absolute;
70
+ right: 1px;
71
+ top: 1px;
72
+ width: 40px;
73
+ height: 38px;
74
+ background: #fff;
75
+ display: block;
76
+ }
77
+
78
+ .multiselect__spinner::before,
79
+ .multiselect__spinner::after {
80
+ position: absolute;
81
+ content: "";
82
+ top: 50%;
83
+ left: 50%;
84
+ margin: -8px 0 0 -8px;
85
+ width: 16px;
86
+ height: 16px;
87
+ border-radius: 100%;
88
+ border-color: var(--bgl-primary-tint) transparent transparent;
89
+ border-style: solid;
90
+ border-width: 2px;
91
+ box-shadow: 0 0 0 1px transparent;
92
+ }
93
+
94
+ .multiselect__spinner::before {
95
+ animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
96
+ animation-iteration-count: infinite;
97
+ }
98
+
99
+ .multiselect__spinner::after {
100
+ animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
101
+ animation-iteration-count: infinite;
102
+ }
103
+
104
+ .multiselect__loading-enter-active,
105
+ .multiselect__loading-leave-active {
106
+ transition: opacity 0.4s ease-in-out;
107
+ opacity: 1;
108
+ }
109
+
110
+ .multiselect__loading-enter,
111
+ .multiselect__loading-leave-active {
112
+ opacity: 0;
113
+ }
114
+
115
+ .multiselect,
116
+ .multiselect__input,
117
+ .multiselect__single {
118
+ font-family: inherit;
119
+ font-size: var(--input-font-size);
120
+ touch-action: manipulation;
121
+ }
122
+
123
+ .multiselect {
124
+ box-sizing: content-box;
125
+ display: block;
126
+ position: relative;
127
+ width: 100%;
128
+ min-height: var(--input-height);
129
+ text-align: left;
130
+ color: #35495e;
131
+ }
132
+
133
+ .multiselect * {
134
+ box-sizing: border-box;
135
+ }
136
+
137
+ .multiselect:focus {
138
+ outline: none;
139
+ }
140
+
141
+ .multiselect--disabled {
142
+ background: #ededed;
143
+ pointer-events: none;
144
+ opacity: 0.6;
145
+ }
146
+
147
+ .multiselect--active {
148
+ z-index: 50;
149
+ }
150
+
151
+ .multiselect--active:not(.multiselect--above) .multiselect__current,
152
+ .multiselect--active:not(.multiselect--above) .multiselect__input,
153
+ .multiselect--active:not(.multiselect--above) .multiselect__tags {
154
+ border-bottom-left-radius: 0;
155
+ border-bottom-right-radius: 0;
156
+ }
157
+
158
+ .multiselect--active:not(.multiselect--above) .multiselect__tags {
159
+ box-shadow: inset 0 0 10px #00000012;
160
+ }
161
+
162
+ .multiselect--active .multiselect__select {
163
+ transform: rotateZ(180deg);
164
+ }
165
+
166
+ .multiselect--above.multiselect--active .multiselect__current,
167
+ .multiselect--above.multiselect--active .multiselect__input,
168
+ .multiselect--above.multiselect--active .multiselect__tags {
169
+ border-top-left-radius: 0;
170
+ border-top-right-radius: 0;
171
+ }
172
+
173
+ .multiselect__input,
174
+ .multiselect__single {
175
+ position: relative;
176
+ display: inline-block;
177
+ min-height: 20px;
178
+ line-height: 20px;
179
+ border: none;
180
+ border-radius: var(--input-border-radius);
181
+ background: var(--input-bg);
182
+ padding: 0 0 0 5px;
183
+ width: calc(100%);
184
+ transition: border 0.1s ease;
185
+ box-sizing: border-box;
186
+ margin-bottom: 8px;
187
+ vertical-align: top;
188
+ }
189
+
190
+ .multiselect__input::placeholder {
191
+ color: #35495e;
192
+ }
193
+
194
+ .multiselect__tag~.multiselect__input,
195
+ .multiselect__tag~.multiselect__single {
196
+ width: auto;
197
+ }
198
+
199
+ .multiselect__input:hover,
200
+ .multiselect__single:hover {
201
+ border-color: #cfcfcf;
202
+ }
203
+
204
+ .multiselect__input:focus,
205
+ .multiselect__single:focus {
206
+ border-color: #a8a8a8;
207
+ outline: none;
208
+ }
209
+
210
+ .multiselect__single {
211
+ padding-left: 5px;
212
+ margin-bottom: 8px;
213
+ }
214
+
215
+ .multiselect__tags-wrap {
216
+ display: inline;
217
+ }
218
+
219
+ .multiselect__tags {
220
+ min-height: 40px;
221
+ display: block;
222
+ padding: 8px 40px 0 8px;
223
+ border-radius: var(--input-border-radius);
224
+ background: var(--input-bg);
225
+ font-size: var(--input-font-size);
226
+ }
227
+
228
+ .multiselect__tag {
229
+ position: relative;
230
+ display: inline-block;
231
+ padding: 4px 26px 4px 10px;
232
+ border-radius: 5px;
233
+ margin-right: 10px;
234
+ color: #fff;
235
+ line-height: 1;
236
+ background: var(--bgl-primary-tint);
237
+ margin-bottom: 5px;
238
+ white-space: nowrap;
239
+ overflow: hidden;
240
+ max-width: 100%;
241
+ text-overflow: ellipsis;
242
+ }
243
+
244
+ .multiselect__tag-icon {
245
+ cursor: pointer;
246
+ margin-left: 7px;
247
+ position: absolute;
248
+ right: 0;
249
+ top: 0;
250
+ bottom: 0;
251
+ font-weight: 700;
252
+ font-style: initial;
253
+ width: 22px;
254
+ text-align: center;
255
+ line-height: 22px;
256
+ transition: all 0.2s ease;
257
+ border-radius: 5px;
258
+ }
259
+
260
+ .multiselect__tag-icon::after {
261
+ content: "×";
262
+ color: #266d4d;
263
+ font-size: 14px;
264
+ }
265
+
266
+ /* // Remove these lines to avoid green closing button
267
+ //.multiselect__tag-icon:focus,
268
+ //.multiselect__tag-icon:hover {
269
+ // background: #369a6e;
270
+ //} */
271
+
272
+ .multiselect__tag-icon:focus::after,
273
+ .multiselect__tag-icon:hover::after {
274
+ color: white;
275
+ }
276
+
277
+ .multiselect__current {
278
+ line-height: 16px;
279
+ min-height: 40px;
280
+ box-sizing: border-box;
281
+ display: block;
282
+ overflow: hidden;
283
+ padding: 8px 12px 0;
284
+ padding-right: 30px;
285
+ white-space: nowrap;
286
+ margin: 0;
287
+ text-decoration: none;
288
+ border-radius: 5px;
289
+ /* border: 1px solid #e8e8e8; */
290
+ cursor: pointer;
291
+ }
292
+
293
+ .multiselect__select {
294
+ line-height: 16px;
295
+ display: block;
296
+ position: absolute;
297
+ box-sizing: border-box;
298
+ width: 40px;
299
+ height: 38px;
300
+ right: 1px;
301
+ top: 1px;
302
+ padding: 4px 8px;
303
+ margin: 0;
304
+ text-decoration: none;
305
+ text-align: center;
306
+ cursor: pointer;
307
+ transition: transform 0.2s ease;
308
+ }
309
+
310
+ .multiselect__select::before {
311
+ position: relative;
312
+ right: 0;
313
+ top: calc(var(--input-height) / 2 - var(--input-font-size));
314
+ color: var(--bgl-black);
315
+ content: "expand_more";
316
+ font-family: "Material Icons";
317
+ font-size: var(--input-font-size);
318
+ }
319
+
320
+ .multiselect__placeholder {
321
+ color: #adadad;
322
+ display: inline-block;
323
+ margin-bottom: 10px;
324
+ padding-top: 2px;
325
+ }
326
+
327
+ .multiselect--active .multiselect__placeholder {
328
+ display: none;
329
+ }
330
+
331
+ .multiselect__content-wrapper {
332
+ position: absolute;
333
+ display: block;
334
+ background: #fff;
335
+ width: 100%;
336
+ max-height: 240px;
337
+ overflow: auto;
338
+ box-shadow: 0 0 10px #00000012;
339
+ border-top: none;
340
+ border-bottom-left-radius: 5px;
341
+ border-bottom-right-radius: 5px;
342
+ z-index: 50;
343
+ -webkit-overflow-scrolling: touch;
344
+ }
345
+
346
+ .multiselect__content {
347
+ list-style: none;
348
+ display: inline-block;
349
+ padding: 0;
350
+ margin: 0;
351
+ min-width: 100%;
352
+ vertical-align: top;
353
+ }
354
+
355
+ .multiselect--above .multiselect__content-wrapper {
356
+ bottom: 100%;
357
+ border-bottom-left-radius: 0;
358
+ border-bottom-right-radius: 0;
359
+ border-top-left-radius: 5px;
360
+ border-top-right-radius: 5px;
361
+ border-bottom: none;
362
+ border-top: 1px solid #e8e8e8;
363
+ }
364
+
365
+ .multiselect__content::-webkit-scrollbar {
366
+ display: none;
367
+ }
368
+
369
+ .multiselect__element {
370
+ display: block;
371
+ }
372
+
373
+ .multiselect__option {
374
+ display: block;
375
+ padding-inline-start: 12px;
376
+ min-height: calc(var(--input-height) * 0.8);
377
+ line-height: calc(var(--input-height) * 0.8);
378
+ text-decoration: none;
379
+ text-transform: none;
380
+ position: relative;
381
+ cursor: pointer;
382
+ white-space: nowrap;
383
+ }
384
+
385
+ .multiselect__option::after {
386
+ top: 0;
387
+ right: 0;
388
+ position: absolute;
389
+ width: calc(var(--input-height) * 0.8);
390
+ height: calc(var(--input-height) * 0.8);;
391
+ text-align: center;
392
+ font-size: 13px;
393
+ }
394
+
395
+ .multiselect__option--highlight {
396
+ background: var(--bgl-primary-light);
397
+ outline: none;
398
+ color: var(--bgl-primary);
399
+ }
400
+
401
+ .multiselect__option--selected {
402
+ background: var(--bgl-primary);
403
+ color: var(--bgl-white);
404
+ font-weight: bold;
405
+ }
406
+
407
+ .multiselect__option--selected.multiselect__option--highlight {
408
+ filter: brightness(0.9);
409
+ color: #fff;
410
+ }
411
+
412
+ .multiselect__option--selected.multiselect__option--highlight::after {
413
+ content: "✕";
414
+ color: var(--bgl-white);
415
+ }
416
+
417
+ .multiselect--disabled .multiselect__current,
418
+ .multiselect--disabled .multiselect__select {
419
+ background: #ededed;
420
+ color: #a6a6a6;
421
+ }
422
+
423
+ .multiselect__option--disabled {
424
+ background: #ededed !important;
425
+ color: #a6a6a6 !important;
426
+ cursor: text;
427
+ pointer-events: none;
428
+ }
429
+
430
+ .multiselect__option--group {
431
+ background: #ededed;
432
+ color: #35495e;
433
+ }
434
+
435
+ .multiselect__option--group.multiselect__option--highlight {
436
+ background: #35495e;
437
+ color: #fff;
438
+ }
439
+
440
+ .multiselect__option--group.multiselect__option--highlight::after {
441
+ background: #35495e;
442
+ }
443
+
444
+ .multiselect__option--disabled.multiselect__option--highlight {
445
+ background: #dedede;
446
+ }
447
+
448
+ .multiselect__option--group-selected.multiselect__option--highlight {
449
+ background: var(--bgl-red);
450
+ color: #fff;
451
+ }
452
+
453
+ .multiselect__option--group-selected.multiselect__option--highlight::after {
454
+ background: var(--bgl-red);
455
+ content: attr(data-deselect);
456
+ color: #fff;
457
+ }
458
+
459
+ .multiselect-enter-active,
460
+ .multiselect-leave-active {
461
+ transition: all 0.15s ease;
462
+ }
463
+
464
+ .multiselect-enter,
465
+ .multiselect-leave-active {
466
+ opacity: 0;
467
+ }
468
+
469
+ .multiselect__strong {
470
+ margin-bottom: 8px;
471
+ line-height: 20px;
472
+ display: inline-block;
473
+ vertical-align: top;
474
+ }
475
+
476
+ *[dir="rtl"] .multiselect {
477
+ text-align: right;
478
+ }
479
+
480
+ *[dir="rtl"] .multiselect__select {
481
+ right: auto;
482
+ left: 1px;
483
+ }
484
+
485
+ *[dir="rtl"] .multiselect__tags {
486
+ padding: 8px 8px 0 40px;
487
+ }
488
+
489
+ *[dir="rtl"] .multiselect__content {
490
+ text-align: right;
491
+ }
492
+
493
+ *[dir="rtl"] .multiselect__option::after {
494
+ right: auto;
495
+ left: 0;
496
+ }
497
+
498
+ *[dir="rtl"] .multiselect__clear {
499
+ right: auto;
500
+ left: 12px;
501
+ }
502
+
503
+ *[dir="rtl"] .multiselect__spinner {
504
+ right: auto;
505
+ left: 1px;
506
+ }
507
+
508
+ @keyframes spinning {
509
+ from {
510
+ transform: rotate(0);
511
+ }
512
+
513
+ to {
514
+ transform: rotate(2turn);
515
+ }
516
+ }
517
+ </style>
@@ -76,13 +76,9 @@
76
76
 
77
77
  <script setup lang="ts">
78
78
  import { VueDraggableNext } from 'vue-draggable-next';
79
- // import { EntityMeta } from 'bagel-sdk/types';
80
79
  import { onMounted, ref } from 'vue';
81
- import { Btn, formatString } from '@bagelink/vue';
80
+ import { Btn, formatString, MaterialIcon } from '@bagelink/vue';
82
81
 
83
- import MaterialIcon from '../MaterialIcon.vue';
84
-
85
- // import { ButtonIcon } from 'src/components/buttons'
86
82
  let bagel: any;
87
83
  let api: any;
88
84
  const props = withDefaults(
@@ -2,7 +2,6 @@ export { default as CheckInput } from './CheckInput.vue';
2
2
  export { default as CurrencyInput } from './CurrencyInput.vue';
3
3
  export { default as DateInput } from './DateInput.vue';
4
4
  export { default as DatetimeInput } from './DatetimeInput.vue';
5
- export { default as EmailInput } from './EmailInput.vue';
6
5
  export { default as FloatInput } from './FloatInput.vue';
7
6
  export { default as IntInput } from './IntInput.vue';
8
7
  export { default as JSONInput } from './JSONInput.vue';
@@ -10,7 +9,7 @@ export { default as LinkField } from './LinkField.vue';
10
9
  export { default as PasswordInput } from './PasswordInput.vue';
11
10
  export { default as Password } from './Password.vue';
12
11
  export { default as ReadOnlyInput } from './ReadOnlyInput.vue';
13
- export { default as SelectField } from './SelectField.vue';
12
+ export { default as SelectInput } from './SelectInput.vue';
14
13
  export { default as RichTextEditor } from './RichTextEditor.vue';
15
14
  export { default as TableField } from './TableField.vue';
16
15
  export { default as DurationInput } from './DurationInput.vue';
@@ -18,8 +17,8 @@ export { default as TextInput } from './TextInput.vue';
18
17
  export { default as TextArea } from './TextArea.vue';
19
18
  export { default as Checkbox } from './Checkbox.vue';
20
19
  export { default as ColorPicker } from './ColorPicker.vue';
21
- export { default as DynamicLinkField } from './DynamicLinkField.vue';
22
20
  export { default as PlainText } from './PlainText.vue';
23
21
  export { default as DatePicker } from './DatePicker.vue';
24
22
  export { default as RadioPillsInput } from './RadioPillsInput.vue';
25
23
  export { default as FileUpload } from './FileUpload.vue';
24
+ export { default as ToggleInput } from './ToggleInput.vue';
@@ -6,7 +6,6 @@ import BankDetailsArray from './BankDetailsArray.vue';
6
6
  import MiscFieldsBtns from './MiscFields.vue';
7
7
  import Toggle from './Toggle.vue';
8
8
  import FileUploader from './FileUploader.vue';
9
- import PPV from '../PersonPreviewFormkit.vue';
10
9
  import TextVariableExamples from '../whatsapp/form/TextVariableExamples.vue';
11
10
 
12
11
  const ContactArrayInput: FormKitTypeDefinition = createInput(ContactArrayFormKit);
@@ -16,12 +15,10 @@ const MiscFieldsInput: FormKitTypeDefinition = createInput(MiscFieldsBtns);
16
15
  const ToggleSwitchInput: FormKitTypeDefinition = createInput(Toggle);
17
16
  const FileUploadInput: FormKitTypeDefinition = createInput(FileUploader);
18
17
  const TextVariablesInput: FormKitTypeDefinition = createInput(TextVariableExamples);
19
- const PersonPreviewInput: FormKitTypeDefinition = createInput(PPV);
20
18
 
21
19
  export {
22
20
  TextVariablesInput,
23
21
  ContactArrayInput,
24
- PersonPreviewInput,
25
22
  AddressInput,
26
23
  BankDetailsInput,
27
24
  MiscFieldsInput,
@@ -5,20 +5,21 @@ export { default as NavBar } from './NavBar.vue';
5
5
  export { default as Btn } from './Btn.vue';
6
6
  export { default as Modal } from './Modal.vue';
7
7
  export { default as ModalBglForm } from './ModalBglForm.vue';
8
- export { default as DropDown } from './DropDown.vue';
8
+ export { default as AccordionItem } from './AccordionItem.vue';
9
+ export { default as Dropdown } from './Drop.vue';
9
10
  export { default as ListView } from './ListView.vue';
10
11
  export { default as ListItem } from './ListItem.vue';
11
12
  export { default as TabbedLayout } from './TabbedLayout.vue';
12
13
  export { default as Comments } from './Comments.vue';
13
14
  export { default as PageTitle } from './PageTitle.vue';
14
- export { default as ModalForm } from './ModalForm.vue';
15
15
  export { default as FormSchema } from './FormSchema.vue';
16
16
  export { default as TableSchema } from './TableSchema.vue';
17
17
  export { default as TopBar } from './TopBar.vue';
18
18
  export { default as RouterWrapper } from './RouterWrapper.vue';
19
- export { default as ContactSubmissions } from './ContactSubmissions.vue';
20
- export { default as PersonPreview } from './PersonPreview.vue';
21
19
  export { default as DataPreview } from './DataPreview.vue';
20
+ export { default as Card } from './Card.vue';
21
+ export { default as Avatar } from './Avatar.vue';
22
+ export { default as Title } from './Title.vue';
22
23
 
23
24
  export * from './charts';
24
25
  export * from './formkit';
@@ -27,7 +27,7 @@ export interface BagelOptions {
27
27
  // eslint-disable-next-line no-unused-vars
28
28
  onError?: (err: Error) => void,
29
29
  // eslint-disable-next-line no-unused-vars
30
- i18nT?: (key: string) => string
30
+ i18nT?: (key?: string) => string
31
31
  }
32
32
 
33
33
  export const BagelVue: Plugin = {
@@ -36,7 +36,7 @@ export const BagelVue: Plugin = {
36
36
 
37
37
  app.config.globalProperties.$bagel = bagel;
38
38
  app.provide(bagelInjectionKey, bagel);
39
- app.config.globalProperties.$i18T = options?.i18nT || ((key: string) => key);
39
+ app.config.globalProperties.$i18T = options?.i18nT || ((key?: string) => key);
40
40
  app.provide(i18nTInjectionKey, options?.i18nT || ((key: string) => key));
41
41
  },
42
42
  };
@@ -2,10 +2,9 @@ import {
2
2
  h, InjectionKey, inject, defineComponent,
3
3
  } from 'vue';
4
4
  import type { Plugin } from 'vue';
5
- import type { BtnOptions } from '@bagelink/vue';
6
- import { Modal, ModalForm, ModalBglForm } from '@bagelink/vue';
5
+ import type { BglFormSchemaT, BtnOptions } from '@bagelink/vue';
6
+ import { Modal, ModalBglForm } from '@bagelink/vue';
7
7
  import type { FormKitSchemaDefinition } from '@formkit/core';
8
- import { BglFormSchemaT } from 'dist/types';
9
8
 
10
9
  interface ModalOptions {
11
10
  title?: string;
@@ -32,8 +31,6 @@ interface ModalApi {
32
31
  // eslint-disable-next-line no-unused-vars
33
32
  showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => void;
34
33
  // eslint-disable-next-line no-unused-vars
35
- modalForm: (options: ModalFormOptions, slots?: Record<string, any>) => void;
36
- // eslint-disable-next-line no-unused-vars
37
34
  hideModal: (index?: number) => void;
38
35
  // modalOptions: Ref<ModalOptions | ModalFormOptions>;
39
36
  }
@@ -48,7 +45,7 @@ export const useModal = (): ModalApi => {
48
45
 
49
46
  interface ModalComponentProps {
50
47
  componentSlots: Record<string, any>,
51
- modalType: 0 | 1 | 2,
48
+ modalType: 'modal' | 'modalForm',
52
49
  modalOptions: ModalOptions | ModalFormOptions
53
50
  }
54
51
 
@@ -57,12 +54,11 @@ export const ModalPlugin: Plugin = {
57
54
  const modalStack = $ref<ModalComponentProps[]>([]);
58
55
 
59
56
  const hideModal = (index: number) => {
60
- // console.log('hideModal', index);
61
57
  modalStack.splice(index, 1);
62
58
  };
63
59
 
64
60
  const showModal = (
65
- modalType: 0 | 1 | 2,
61
+ modalType: 'modal' | 'modalForm',
66
62
  options: ModalOptions | ModalFormOptions,
67
63
  slots: Record<string, any> = {},
68
64
  ) => {
@@ -74,9 +70,8 @@ export const ModalPlugin: Plugin = {
74
70
  };
75
71
 
76
72
  app.provide(ModalSymbol, {
77
- modalForm: (options: ModalFormOptions, slots?: Record<string, any>) => showModal(1, options, slots),
78
- showModal: (options: ModalOptions, slots?: Record<string, any>) => showModal(0, options, slots),
79
- showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => showModal(2, options, slots),
73
+ showModal: (options: ModalOptions, slots?: Record<string, any>) => showModal('modal', options, slots),
74
+ showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => showModal('modalForm', options, slots),
80
75
  hideModal: (index = modalStack.length - 1) => hideModal(index),
81
76
  // modalOptions,
82
77
  });
@@ -90,8 +85,7 @@ export const ModalPlugin: Plugin = {
90
85
  render() {
91
86
  return modalStack.map((modal, index) => {
92
87
  let renderComponent;
93
- if (modal.modalType === 1) renderComponent = ModalForm;
94
- else if (modal.modalType === 2) renderComponent = ModalBglForm;
88
+ if (modal.modalType === 'modalForm') renderComponent = ModalBglForm;
95
89
  else renderComponent = Modal;
96
90
 
97
91
  return h(
@@ -17,7 +17,7 @@ select {
17
17
 
18
18
  .bagel-input::placeholder .bagel-input label {
19
19
  display: block;
20
- font-size: var(--input-font-size);
20
+ font-size: var(--label-font-size);
21
21
  margin-bottom: 2px;
22
22
  line-height: 1.3;
23
23
  }
@@ -183,7 +183,7 @@ button.formkit-input:active {
183
183
 
184
184
  .formkit-outer label {
185
185
  display: block;
186
- font-size: var(--input-font-size);
186
+ font-size: var(--label-font-size);
187
187
  margin-bottom: 2px;
188
188
  line-height: 1.3;
189
189
  color: var(--label-color);