@bagelink/vue 0.0.451 → 0.0.458

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 (42) hide show
  1. package/dist/components/Card.vue.d.ts +2 -2
  2. package/dist/components/Flag.vue.d.ts +9 -5
  3. package/dist/components/Flag.vue.d.ts.map +1 -1
  4. package/dist/components/MapEmbed.vue.d.ts +20 -0
  5. package/dist/components/MapEmbed.vue.d.ts.map +1 -0
  6. package/dist/components/Modal.vue.d.ts.map +1 -1
  7. package/dist/components/TableSchema.vue.d.ts +18 -6
  8. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  9. package/dist/components/form/BglField.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  11. package/dist/components/form/inputs/TelInput.vue.d.ts +203 -127
  12. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/TextInput.vue.d.ts +5 -0
  14. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.d.ts.map +1 -1
  17. package/dist/components/layout/Layout.vue.d.ts +1 -1
  18. package/dist/index.cjs +30657 -16732
  19. package/dist/index.mjs +30657 -16732
  20. package/dist/plugins/bagel.d.ts +1 -1
  21. package/dist/plugins/modal.d.ts +1 -1
  22. package/dist/plugins/modal.d.ts.map +1 -1
  23. package/dist/style.css +813 -1129
  24. package/dist/types/BagelForm.d.ts +1 -0
  25. package/dist/types/BagelForm.d.ts.map +1 -1
  26. package/package.json +14 -12
  27. package/src/components/Flag.vue +45 -1341
  28. package/src/components/MapEmbed.vue +67 -0
  29. package/src/components/Modal.vue +10 -10
  30. package/src/components/form/BglField.vue +1 -0
  31. package/src/components/form/inputs/RichText.vue +2 -2
  32. package/src/components/form/inputs/SelectInput.vue +7 -8
  33. package/src/components/form/inputs/TelInput.vue +164 -108
  34. package/src/components/form/inputs/TextInput.vue +6 -9
  35. package/src/components/index.ts +1 -0
  36. package/src/plugins/modal.ts +13 -12
  37. package/src/styles/appearance.css +54 -19
  38. package/src/styles/layout.css +5 -0
  39. package/src/styles/mobilLayout.css +6 -0
  40. package/src/styles/modal.css +3 -2
  41. package/src/styles/text.css +32 -3
  42. package/src/types/BagelForm.ts +1 -0
@@ -57,17 +57,12 @@
57
57
  </div>
58
58
  </template>
59
59
 
60
- <script
61
- setup
62
- lang="ts"
63
- >
64
- import { onMounted, watch } from 'vue';
60
+ <script setup lang="ts">
61
+ import { onMounted, watch } from 'vue';
65
62
  import {
66
63
  debounce, type MaterialIcons, MaterialIcon,
67
64
  } from '@bagelink/vue';
68
65
 
69
-
70
-
71
66
  const emit = defineEmits(['update:modelValue', 'debounce']);
72
67
  const props = withDefaults(
73
68
  defineProps<{
@@ -93,10 +88,12 @@ const props = withDefaults(
93
88
  lines?: number;
94
89
  autocomplete?: AutoFillField;
95
90
  autofocus?: boolean;
91
+ debounceDelay?: number;
96
92
  }>(),
97
93
  {
98
94
  type: 'text',
99
95
  modelValue: '',
96
+ debounceDelay: 300,
100
97
  },
101
98
  );
102
99
  let inputVal = $ref<string | number>();
@@ -113,7 +110,7 @@ const rows = $computed(() => {
113
110
  function updateInputVal() {
114
111
  if (props.disabled) return;
115
112
  emit('update:modelValue', inputVal as string);
116
- debounce(() => emit('debounce', inputVal), 300);
113
+ debounce(() => emit('debounce', inputVal), props.debounceDelay);
117
114
  }
118
115
 
119
116
  watch(
@@ -156,7 +153,7 @@ onMounted(() => {
156
153
  background: var(--bgl-black) !important;
157
154
  color: var(--bgl-white) !important;
158
155
  }
159
- .code textarea::placeholder{
156
+ .code textarea::placeholder {
160
157
  color: var(--bgl-white) !important;
161
158
  opacity: 0.3;
162
159
  }
@@ -21,6 +21,7 @@ export { default as Badge } from './Badge.vue';
21
21
  export { default as BglVideo } from './BglVideo.vue';
22
22
  export { default as Carousel } from './Carousel.vue';
23
23
  export { default as ModalConfirm } from './ModalConfirm.vue';
24
+ export { default as MapEmbed } from './MapEmbed.vue';
24
25
  export { default as Flag } from './Flag.vue';
25
26
 
26
27
  export * from './form';
@@ -21,7 +21,7 @@ export interface ModalFormOptions {
21
21
  visible?: boolean;
22
22
  width?: string;
23
23
  dismissable?: boolean;
24
- schema: BglFormSchemaT<any> | (() => BglFormSchemaT) | BglFormSchemaT
24
+ schema: BglFormSchemaT<any> | (() => BglFormSchemaT) | BglFormSchemaT;
25
25
  onSubmit?: (formData: any) => any;
26
26
  onDelete?: (id: string) => Promise<void>;
27
27
  onError?: ((err: any) => void);
@@ -33,22 +33,24 @@ export type ModalConfirmOptions = {
33
33
  title?: string;
34
34
  message?: string;
35
35
  resolve: (val: boolean) => void;
36
- }
36
+ };
37
37
 
38
- type ModalType = 'modal' | 'modalForm' | 'confirm'
38
+ type ModalType = 'modal' | 'modalForm' | 'confirm';
39
39
 
40
- type ConfirmModalUserOptions = string | { title: string, message: string }
40
+ type ConfirmModalUserOptions = string | { title: string; message: string };
41
41
 
42
42
  export interface ModalComponentProps {
43
- componentSlots: Record<string, any>,
44
- modalType: ModalType,
45
- modalOptions: ModalOptions | ModalFormOptions | ModalConfirmOptions
43
+ componentSlots: Record<string, any>;
44
+ modalType: ModalType;
45
+ modalOptions: ModalOptions | ModalFormOptions | ModalConfirmOptions;
46
46
  }
47
+
47
48
  export interface ModalFormComponentProps {
48
- componentSlots: Record<string, any>,
49
- modalType: 'modalForm',
50
- modalOptions: ModalFormOptions
49
+ componentSlots: Record<string, any>;
50
+ modalType: 'modalForm';
51
+ modalOptions: ModalFormOptions;
51
52
  }
53
+
52
54
  export interface ModalApi {
53
55
  showModal: (options: ModalOptions, slots?: Record<string, any>) => void;
54
56
  showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => ModalFormComponentProps | undefined;
@@ -100,13 +102,12 @@ export const ModalPlugin: Plugin = {
100
102
  showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => showModal('modalForm', options, slots) as ModalFormComponentProps,
101
103
  confirm: (userOptions: ConfirmModalUserOptions) => modalConfirm(userOptions),
102
104
  hideModal: (index = modalStack.length - 1) => hideModal(index),
103
- // modalOptions,
104
105
  });
105
106
 
106
107
  const ModalComponent = defineComponent({
107
108
  data: () => ({ modalStack }),
108
109
  render() {
109
- return modalStack.map((modal, index) => {
110
+ return this.modalStack.map((modal, index) => {
110
111
  const props = { ...modal.modalOptions, visible: true, 'onUpdate:visible': () => hideModal(index) };
111
112
  if (modal.modalType === 'modalForm') return h(ModalForm, props as ModalFormOptions, modal.componentSlots);
112
113
  if (modal.modalType === 'confirm') return h(ModalConfirm, props as any, {});
@@ -42,43 +42,53 @@
42
42
  opacity: 1;
43
43
  }
44
44
 
45
- .z-index-0 {
45
+ .z-index-0,
46
+ .z-0 {
46
47
  z-index: 0;
47
48
  }
48
49
 
49
- .z-index-1 {
50
+ .z-index-1,
51
+ .z-1 {
50
52
  z-index: 1;
51
53
  }
52
54
 
53
- .z-index-2 {
55
+ .z-index-2,
56
+ .z-2 {
54
57
  z-index: 2;
55
58
  }
56
59
 
57
- .z-index-3 {
60
+ .z-index-3,
61
+ .z-3 {
58
62
  z-index: 3;
59
63
  }
60
64
 
61
- .z-index-4 {
65
+ .z-index-4,
66
+ .z-4 {
62
67
  z-index: 4;
63
68
  }
64
69
 
65
- .z-index-5 {
70
+ .z-index-5,
71
+ .z-5 {
66
72
  z-index: 5;
67
73
  }
68
74
 
69
- .z-index-9 {
75
+ .z-index-9,
76
+ .z-9 {
70
77
  z-index: 9;
71
78
  }
72
79
 
73
- .z-index-99 {
80
+ .z-index-99,
81
+ .z-99 {
74
82
  z-index: 99;
75
83
  }
76
84
 
77
- .z-index-999 {
85
+ .z-index-999,
86
+ .z-999 {
78
87
  z-index: 999;
79
88
  }
80
89
 
81
- .z-index-9999 {
90
+ .z-index-9999,
91
+ .z-9999 {
82
92
  z-index: 9999;
83
93
  }
84
94
 
@@ -170,6 +180,14 @@
170
180
  color: var(--bgl-gray) !important;
171
181
  }
172
182
 
183
+ .color-label {
184
+ color: var(--label-color) !important;
185
+ }
186
+
187
+ .bg-label {
188
+ background: var(--label-color) !important;
189
+ }
190
+
173
191
  .bg-gray-light {
174
192
  background: var(--bgl-gray-light) !important;
175
193
  }
@@ -456,39 +474,48 @@
456
474
  opacity: 1;
457
475
  }
458
476
 
459
- .m_z-index-0 {
477
+ .m_z-index-0,
478
+ .m_z-0 {
460
479
  z-index: 0;
461
480
  }
462
481
 
463
- .m_z-index-1 {
482
+ .m_z-index-1,
483
+ .m_z-1 {
464
484
  z-index: 1;
465
485
  }
466
486
 
467
- .m_z-index-2 {
487
+ .m_z-index-2,
488
+ .m_z-2 {
468
489
  z-index: 2;
469
490
  }
470
491
 
471
- .m_z-index-3 {
492
+ .m_z-index-3,
493
+ .m_z-3 {
472
494
  z-index: 3;
473
495
  }
474
496
 
475
- .m_z-index-4 {
497
+ .m_z-index-4,
498
+ .m_z-4 {
476
499
  z-index: 4;
477
500
  }
478
501
 
479
- .m_z-index-5 {
502
+ .m_z-index-5,
503
+ .m_z-5 {
480
504
  z-index: 5;
481
505
  }
482
506
 
483
- .m_z-index-9 {
507
+ .m_z-index-9,
508
+ .m_z-9 {
484
509
  z-index: 9;
485
510
  }
486
511
 
487
- .m_z-index-99 {
512
+ .m_z-index-99,
513
+ .m_z-99 {
488
514
  z-index: 99;
489
515
  }
490
516
 
491
- .m_z-index-999 {
517
+ .m_z-index-999,
518
+ .m_z-999 {
492
519
  z-index: 999;
493
520
  }
494
521
 
@@ -581,6 +608,14 @@
581
608
  color: var(--bgl-gray) !important;
582
609
  }
583
610
 
611
+ .m_color-label {
612
+ color: var(--label-color) !important;
613
+ }
614
+
615
+ .m_bg-label {
616
+ background: var(--label-color) !important;
617
+ }
618
+
584
619
  .m_bg-gray-light {
585
620
  background: var(--bgl-gray-light) !important;
586
621
  }
@@ -19,6 +19,11 @@
19
19
  border-radius: calc(var(--btn-border-radius) / 2);
20
20
  }
21
21
 
22
+ .flex-center {
23
+ justify-items: center;
24
+ align-items: center;
25
+ display: flex;}
26
+
22
27
  .justify-items-center {
23
28
  justify-items: center;
24
29
  }
@@ -38,6 +38,12 @@
38
38
  border-radius: var(--btn-border-radius);
39
39
  }
40
40
 
41
+ .m_flex-center {
42
+ justify-items: center;
43
+ align-items: center;
44
+ display: flex;
45
+ }
46
+
41
47
  .m_justify-items-center {
42
48
  justify-items: center;
43
49
  }
@@ -40,15 +40,16 @@
40
40
  }
41
41
 
42
42
  .tool-bar {
43
- margin: -2rem -1rem 1rem;
43
+ margin: -1rem -1rem 1rem;
44
44
  display: flex;
45
45
  justify-content: space-between;
46
46
  position: -webkit-sticky;
47
47
  position: sticky;
48
- padding-top: 1rem;
48
+ padding-top: 0rem;
49
49
  top: 0rem;
50
50
  z-index: 3;
51
51
  background: var(--bgl-white);
52
+ border-radius: var(--card-border-radius);
52
53
  }
53
54
 
54
55
  .modal-size {
@@ -176,6 +176,16 @@
176
176
  font-weight: 400;
177
177
  }
178
178
 
179
+ .semi,
180
+ .semibold,
181
+ .txt-semi,
182
+ .txt-semibold,
183
+ .font-regular,
184
+ .font-semi,
185
+ .font-semibold {
186
+ font-weight: 600;
187
+ }
188
+
179
189
  .line-height-1 {
180
190
  line-height: 1;
181
191
  }
@@ -233,6 +243,11 @@
233
243
  text-decoration: none;
234
244
  }
235
245
 
246
+ .underline,
247
+ .decoration-underline {
248
+ text-decoration: underline !important;
249
+ }
250
+
236
251
  .word-break {
237
252
  word-break: break-word;
238
253
  }
@@ -249,9 +264,6 @@
249
264
  text-transform: capitalize;
250
265
  }
251
266
 
252
-
253
-
254
-
255
267
  .bgl_icon-font {
256
268
  font-family: "Material Symbols Outlined", serif !important;
257
269
  }
@@ -468,6 +480,17 @@
468
480
  font-weight: 400;
469
481
  }
470
482
 
483
+ .m_semi,
484
+ .m_semibold,
485
+ .m_txt-semi,
486
+ .m_txt-semibold,
487
+ .m_font-regular,
488
+ .m_font-semi,
489
+ .m_font-semibold {
490
+ font-weight: 600;
491
+ }
492
+
493
+
471
494
  .m_line-height-1 {
472
495
  line-height: 1;
473
496
  }
@@ -525,6 +548,12 @@
525
548
  text-decoration: none;
526
549
  }
527
550
 
551
+ .m_underline,
552
+ .m_decoration-underline {
553
+ text-decoration: underline !important;
554
+ }
555
+
556
+
528
557
  .m_bgl_icon-font {
529
558
  font-family: "Material Symbols Outlined", serif;
530
559
  }
@@ -17,6 +17,7 @@ export type BaseBagelField<T = Record<string, any>> = {
17
17
  class?: AttributeValue | AttributeFn<T>,
18
18
  attrs?: Attributes<T>;
19
19
  required?: boolean;
20
+ disabled?: boolean;
20
21
  helptext?: string;
21
22
  options?: string | ({ label?: string; value: string | number } | string | number | Record<string, any>)[] | ((val: any, rowData?: Record<string, any>) => void);
22
23
  defaultValue?: any;