@bagelink/vue 0.0.466 → 0.0.473

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 (180) hide show
  1. package/dist/components/Accordion.vue.d.ts.map +1 -1
  2. package/dist/components/AccordionItem.vue.d.ts.map +1 -1
  3. package/dist/components/Alert.vue.d.ts +2 -2
  4. package/dist/components/Alert.vue.d.ts.map +1 -1
  5. package/dist/components/Avatar.vue.d.ts.map +1 -1
  6. package/dist/components/Badge.vue.d.ts +2 -2
  7. package/dist/components/Badge.vue.d.ts.map +1 -1
  8. package/dist/components/BglVideo.vue.d.ts +2 -2
  9. package/dist/components/BglVideo.vue.d.ts.map +1 -1
  10. package/dist/components/Btn.vue.d.ts +2 -0
  11. package/dist/components/Btn.vue.d.ts.map +1 -1
  12. package/dist/components/Card.vue.d.ts.map +1 -1
  13. package/dist/components/Carousel.vue.d.ts +4 -2
  14. package/dist/components/Carousel.vue.d.ts.map +1 -1
  15. package/dist/components/DataPreview.vue.d.ts.map +1 -1
  16. package/dist/components/Drop.vue.d.ts +34 -0
  17. package/dist/components/Drop.vue.d.ts.map +1 -0
  18. package/dist/components/FileUploader.vue.d.ts +60 -0
  19. package/dist/components/FileUploader.vue.d.ts.map +1 -0
  20. package/dist/components/Flag.vue.d.ts +2 -2
  21. package/dist/components/Flag.vue.d.ts.map +1 -1
  22. package/dist/components/ListItem.vue.d.ts.map +1 -1
  23. package/dist/components/ListView.vue.d.ts.map +1 -1
  24. package/dist/components/MapEmbed.vue.d.ts +2 -2
  25. package/dist/components/MapEmbed.vue.d.ts.map +1 -1
  26. package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
  27. package/dist/components/Modal.vue.d.ts +2 -1
  28. package/dist/components/Modal.vue.d.ts.map +1 -1
  29. package/dist/components/ModalConfirm.vue.d.ts.map +1 -1
  30. package/dist/components/ModalForm.vue.d.ts.map +1 -1
  31. package/dist/components/NavBar.vue.d.ts.map +1 -1
  32. package/dist/components/PageTitle.vue.d.ts.map +1 -1
  33. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  34. package/dist/components/Title.vue.d.ts.map +1 -1
  35. package/dist/components/dashboard/Lineart.vue.d.ts.map +1 -1
  36. package/dist/components/dashboard/index.d.ts.map +1 -1
  37. package/dist/components/form/BglField.vue.d.ts.map +1 -1
  38. package/dist/components/form/BglForm.vue.d.ts +4 -2
  39. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  40. package/dist/components/form/ItemRef.vue.d.ts +1 -0
  41. package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
  42. package/dist/components/form/index.d.ts.map +1 -1
  43. package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
  44. package/dist/components/form/inputs/Checkbox.vue.d.ts.map +1 -1
  45. package/dist/components/form/inputs/ColorPicker.vue.d.ts.map +1 -1
  46. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  47. package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
  48. package/dist/components/form/inputs/FileUpload.vue.d.ts +2 -1
  49. package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
  50. package/dist/components/form/inputs/JSONInput.vue.d.ts.map +1 -1
  51. package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
  52. package/dist/components/form/inputs/RichText.vue.d.ts.map +1 -1
  53. package/dist/components/form/inputs/SelectField.vue.d.ts +1 -4
  54. package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
  55. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  56. package/dist/components/form/inputs/SignaturePad.vue.d.ts +56 -0
  57. package/dist/components/form/inputs/SignaturePad.vue.d.ts.map +1 -0
  58. package/dist/components/form/inputs/TableField.vue.d.ts.map +1 -1
  59. package/dist/components/form/inputs/TelInput.vue.d.ts +2 -2
  60. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  61. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  62. package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -1
  63. package/dist/components/form/inputs/index.d.ts +1 -0
  64. package/dist/components/form/inputs/index.d.ts.map +1 -1
  65. package/dist/components/index.d.ts.map +1 -1
  66. package/dist/components/layout/BottomMenu.vue.d.ts.map +1 -1
  67. package/dist/components/layout/Layout.vue.d.ts +2 -2
  68. package/dist/components/layout/Layout.vue.d.ts.map +1 -1
  69. package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
  70. package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -1
  71. package/dist/components/layout/Tabs.vue.d.ts.map +1 -1
  72. package/dist/components/layout/TabsBody.vue.d.ts.map +1 -1
  73. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  74. package/dist/components/layout/index.d.ts.map +1 -1
  75. package/dist/index.cjs +17617 -20818
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.mjs +17617 -20818
  78. package/dist/plugins/bagel.d.ts +1 -1
  79. package/dist/plugins/bagel.d.ts.map +1 -1
  80. package/dist/plugins/modal.d.ts +14 -14
  81. package/dist/plugins/modal.d.ts.map +1 -1
  82. package/dist/style.css +333 -309
  83. package/dist/types/BagelForm.d.ts +16 -16
  84. package/dist/types/BagelForm.d.ts.map +1 -1
  85. package/dist/types/BtnOptions.d.ts +1 -1
  86. package/dist/types/BtnOptions.d.ts.map +1 -1
  87. package/dist/types/NavLink.d.ts +2 -2
  88. package/dist/types/NavLink.d.ts.map +1 -1
  89. package/dist/types/file.d.ts +2 -2
  90. package/dist/types/file.d.ts.map +1 -1
  91. package/dist/types/index.d.ts.map +1 -1
  92. package/dist/types/materialIcons.d.ts.map +1 -1
  93. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  94. package/dist/utils/allCountries.d.ts +2 -2
  95. package/dist/utils/allCountries.d.ts.map +1 -1
  96. package/dist/utils/clickOutside.d.ts.map +1 -1
  97. package/dist/utils/index.d.ts +5 -5
  98. package/dist/utils/index.d.ts.map +1 -1
  99. package/package.json +19 -17
  100. package/src/components/Accordion.vue +10 -10
  101. package/src/components/AccordionItem.vue +47 -47
  102. package/src/components/Alert.vue +21 -21
  103. package/src/components/Avatar.vue +15 -15
  104. package/src/components/Badge.vue +17 -16
  105. package/src/components/BglVideo.vue +43 -43
  106. package/src/components/Btn.vue +67 -65
  107. package/src/components/Card.vue +26 -26
  108. package/src/components/Carousel.vue +130 -134
  109. package/src/components/DataPreview.vue +30 -30
  110. package/src/components/Flag.vue +26 -26
  111. package/src/components/ListItem.vue +13 -13
  112. package/src/components/ListView.vue +2 -2
  113. package/src/components/MapEmbed.vue +33 -33
  114. package/src/components/MaterialIcon.vue +12 -12
  115. package/src/components/Modal.vue +73 -66
  116. package/src/components/ModalConfirm.vue +18 -18
  117. package/src/components/ModalForm.vue +79 -76
  118. package/src/components/NavBar.vue +33 -30
  119. package/src/components/PageTitle.vue +10 -8
  120. package/src/components/TableSchema.vue +126 -113
  121. package/src/components/Title.vue +8 -8
  122. package/src/components/dashboard/Lineart.vue +103 -96
  123. package/src/components/dashboard/index.ts +1 -1
  124. package/src/components/form/BglField.vue +61 -61
  125. package/src/components/form/BglFieldSet.vue +9 -8
  126. package/src/components/form/BglForm.vue +71 -70
  127. package/src/components/form/index.ts +4 -4
  128. package/src/components/form/inputs/CheckInput.vue +25 -23
  129. package/src/components/form/inputs/Checkbox.vue +10 -10
  130. package/src/components/form/inputs/ColorPicker.vue +26 -24
  131. package/src/components/form/inputs/DateInput.vue +39 -39
  132. package/src/components/form/inputs/DatePicker.vue +37 -36
  133. package/src/components/form/inputs/FileUpload.vue +165 -161
  134. package/src/components/form/inputs/FileUploadURL.vue +134 -132
  135. package/src/components/form/inputs/JSONInput.vue +29 -29
  136. package/src/components/form/inputs/RadioPillsInput.vue +49 -49
  137. package/src/components/form/inputs/RichText.vue +62 -63
  138. package/src/components/form/inputs/SelectInput.vue +173 -167
  139. package/src/components/form/inputs/SignaturePad.vue +150 -0
  140. package/src/components/form/inputs/TableField.vue +77 -76
  141. package/src/components/form/inputs/TelInput.vue +280 -285
  142. package/src/components/form/inputs/TextInput.vue +81 -76
  143. package/src/components/form/inputs/ToggleInput.vue +13 -13
  144. package/src/components/form/inputs/index.ts +17 -15
  145. package/src/components/formkit/FileUploader.vue +162 -158
  146. package/src/components/formkit/MiscFields.vue +20 -20
  147. package/src/components/formkit/Toggle.vue +13 -13
  148. package/src/components/index.ts +28 -28
  149. package/src/components/layout/BottomMenu.vue +25 -21
  150. package/src/components/layout/Layout.vue +29 -29
  151. package/src/components/layout/SidebarMenu.vue +31 -27
  152. package/src/components/layout/TabbedLayout.vue +47 -45
  153. package/src/components/layout/Tabs.vue +32 -32
  154. package/src/components/layout/TabsBody.vue +10 -10
  155. package/src/components/layout/TabsNav.vue +44 -44
  156. package/src/components/layout/index.ts +7 -7
  157. package/src/components/layout/tabsManager.ts +6 -6
  158. package/src/index.ts +13 -8
  159. package/src/plugins/bagel.ts +37 -37
  160. package/src/plugins/modal.ts +66 -67
  161. package/src/styles/layout.css +5 -3
  162. package/src/styles/mobilLayout.css +7 -0
  163. package/src/types/BagelForm.ts +27 -27
  164. package/src/types/BtnOptions.ts +13 -13
  165. package/src/types/NavLink.ts +8 -8
  166. package/src/types/file.ts +11 -11
  167. package/src/types/index.ts +16 -12
  168. package/src/types/materialIcons.ts +3249 -3249
  169. package/src/utils/BagelFormUtils.ts +23 -23
  170. package/src/utils/allCountries.ts +11 -12
  171. package/src/utils/clickOutside.ts +6 -6
  172. package/src/utils/index.ts +39 -41
  173. package/src/utils/lang.ts +13 -13
  174. package/src/utils/strings.ts +9 -9
  175. package/tsconfig.json +0 -1
  176. package/vite.config.ts +8 -8
  177. package/dist/components/Popover.vue.d.ts +0 -10
  178. package/dist/components/Popover.vue.d.ts.map +0 -1
  179. package/dist/types/materialIcon.d.ts +0 -2
  180. package/dist/types/materialIcon.d.ts.map +0 -1
@@ -1,18 +1,18 @@
1
- import { reactive, computed } from 'vue';
1
+ import { computed, reactive } from 'vue'
2
2
 
3
- const state = reactive(new Map());
3
+ const state = reactive(new Map())
4
4
 
5
5
  export function useTabs(group: string) {
6
6
  if (!state.has(group)) {
7
- state.set(group, reactive({ currentTab: null }));
7
+ state.set(group, reactive({ currentTab: null }))
8
8
  }
9
9
 
10
10
  const currentTab = computed({
11
11
  get: () => state.get(group).currentTab,
12
12
  set: (val) => {
13
- state.get(group).currentTab = val;
13
+ state.get(group).currentTab = val
14
14
  },
15
- });
15
+ })
16
16
 
17
- return { currentTab };
17
+ return { currentTab }
18
18
  }
package/src/index.ts CHANGED
@@ -1,9 +1,14 @@
1
1
  export {
2
- BagelVue, type BagelOptions, bagelInjectionKey, useBagel, useI18nT, i18nTInjectionKey,
3
- } from './plugins/bagel';
4
- export { ModalPlugin, useModal } from './plugins/modal';
5
- export * from './utils';
6
- export * from './types';
7
- export * from './components';
8
- export * from './utils/allCountries';
9
- import './styles/bagel.css';
2
+ BagelVue,
3
+ type BagelOptions,
4
+ bagelInjectionKey,
5
+ useBagel,
6
+ useI18nT,
7
+ i18nTInjectionKey,
8
+ } from './plugins/bagel'
9
+ export { ModalPlugin, useModal } from './plugins/modal'
10
+ export * from './utils'
11
+ export * from './types'
12
+ export * from './components'
13
+ export * from './utils/allCountries'
14
+ import './styles/bagel.css'
@@ -1,45 +1,45 @@
1
1
  // import { vTooltip } from 'floating-vue';
2
- import FloatingVue from 'floating-vue';
3
- import { inject } from 'vue';
4
- import type { InjectionKey, Plugin } from 'vue';
5
- import { Bagel } from '@bagelink/sdk';
6
- import clickOutside from '../utils/clickOutside';
7
- import { useLang } from '../utils';
8
-
9
- export const bagelInjectionKey = Symbol('bagel') as InjectionKey<Bagel>;
2
+ import FloatingVue from 'floating-vue'
3
+ import { inject } from 'vue'
4
+ import type { InjectionKey, Plugin } from 'vue'
5
+ import { Bagel } from '@bagelink/sdk'
6
+ import clickOutside from '../utils/clickOutside'
7
+ import { useLang } from '../utils'
8
+
9
+ export const bagelInjectionKey = Symbol('bagel') as InjectionKey<Bagel>
10
10
  export const i18nTInjectionKey = Symbol('bagel') as InjectionKey<
11
- // eslint-disable-next-line no-unused-vars
11
+
12
12
  (key: string) => string
13
- >;
13
+ >
14
14
 
15
15
  export function useBagel() {
16
- const bagel = inject(bagelInjectionKey);
17
- if (!bagel) throw new Error('No bagel provided');
16
+ const bagel = inject(bagelInjectionKey)
17
+ if (!bagel) throw new Error('No bagel provided')
18
18
 
19
- return bagel;
19
+ return bagel
20
20
  }
21
21
 
22
22
  export function useI18nT() {
23
- const i18nT = inject(i18nTInjectionKey);
24
- if (!i18nT) throw new Error('No i18nT provided');
23
+ const i18nT = inject(i18nTInjectionKey)
24
+ if (!i18nT) throw new Error('No i18nT provided')
25
25
 
26
- return i18nT;
26
+ return i18nT
27
27
  }
28
28
 
29
29
  export interface BagelOptions {
30
- availableLangs?: string[];
31
- defaultLang?: string;
32
- language?: string;
33
- host: string;
34
- // eslint-disable-next-line no-unused-vars
35
- onError?: (err: Error) => void;
36
- // eslint-disable-next-line no-unused-vars
37
- i18nT?: (key: string) => string;
30
+ availableLangs?: string[]
31
+ defaultLang?: string
32
+ language?: string
33
+ host: string
34
+
35
+ onError?: (err: Error) => void
36
+
37
+ i18nT?: (key: string) => string
38
38
  }
39
39
  export const BagelVue: Plugin = {
40
40
  install: (app, options: BagelOptions) => {
41
- const bagel = new Bagel({ host: options.host, onError: options.onError });
42
- app.directive('click-outside', clickOutside);
41
+ const bagel = new Bagel({ host: options.host, onError: options.onError })
42
+ app.directive('click-outside', clickOutside)
43
43
 
44
44
  app.use(FloatingVue, {
45
45
  themes: {
@@ -49,15 +49,15 @@ export const BagelVue: Plugin = {
49
49
  placement: 'bottom',
50
50
  },
51
51
  },
52
- });
53
- const { availableLangs, defaultLang, lang } = useLang();
54
- if (options.availableLangs) availableLangs.value = options.availableLangs;
55
- if (options.defaultLang) defaultLang.value = options.defaultLang;
56
- if (options.language) lang.value = options.language;
57
- app.config.globalProperties.$bagel = bagel;
58
- app.provide(bagelInjectionKey, bagel);
59
- app.config.globalProperties.$i18T =
60
- options?.i18nT || ((key?: string) => key);
61
- app.provide(i18nTInjectionKey, options?.i18nT || ((key: string) => key));
52
+ })
53
+ const { availableLangs, defaultLang, lang } = useLang()
54
+ if (options.availableLangs) availableLangs.value = options.availableLangs
55
+ if (options.defaultLang) defaultLang.value = options.defaultLang
56
+ if (options.language) lang.value = options.language
57
+ app.config.globalProperties.$bagel = bagel
58
+ app.provide(bagelInjectionKey, bagel)
59
+ app.config.globalProperties.$i18T
60
+ = options.i18nT || ((key?: string) => key)
61
+ app.provide(i18nTInjectionKey, options.i18nT || ((key: string) => key))
62
62
  },
63
- };
63
+ }
@@ -1,87 +1,86 @@
1
- import {
2
- h, InjectionKey, inject, defineComponent,
3
- } from 'vue';
4
- import type { Plugin } from 'vue';
5
- import type { BglFormSchemaT, BtnOptions } from '@bagelink/vue';
6
- import { Modal, ModalForm, ModalConfirm } from '@bagelink/vue';
1
+ import { defineComponent, h, inject,
2
+ } from 'vue'
3
+ import type { InjectionKey, Plugin } from 'vue'
4
+ import type { BglFormSchemaT, BtnOptions } from '@bagelink/vue'
5
+ import { Modal, ModalConfirm, ModalForm } from '@bagelink/vue'
7
6
 
8
7
  export interface ModalOptions {
9
- title?: string;
10
- dismissable?: boolean;
11
- side?: boolean;
12
- width?: string;
13
- actions?: BtnOptions[];
14
- class?: string;
15
- visible?: boolean;
8
+ title?: string
9
+ dismissable?: boolean
10
+ side?: boolean
11
+ width?: string
12
+ actions?: BtnOptions[]
13
+ class?: string
14
+ visible?: boolean
16
15
  }
17
16
 
18
17
  export interface ModalFormOptions {
19
- side?: boolean;
20
- title?: string;
21
- visible?: boolean;
22
- width?: string;
23
- dismissable?: boolean;
24
- schema: BglFormSchemaT<any> | (() => BglFormSchemaT) | BglFormSchemaT;
25
- onSubmit?: (formData: any) => any;
26
- onDelete?: (id: string) => Promise<void>;
27
- onError?: ((err: any) => void);
28
- modelValue?: Record<string, any>;
29
- 'onUpdate:modelValue'?: (val: any) => void;
18
+ 'side'?: boolean
19
+ 'title'?: string
20
+ 'visible'?: boolean
21
+ 'width'?: string
22
+ 'dismissable'?: boolean
23
+ 'schema': BglFormSchemaT<any> | (() => BglFormSchemaT) | BglFormSchemaT
24
+ 'onSubmit'?: (formData: any) => any
25
+ 'onDelete'?: (id: string) => Promise<void>
26
+ 'onError'?: ((err: any) => void)
27
+ 'modelValue'?: Record<string, any>
28
+ 'onUpdate:modelValue'?: (val: any) => void
30
29
  }
31
30
 
32
- export type ModalConfirmOptions = {
33
- title?: string;
34
- message?: string;
35
- resolve: (val: boolean) => void;
36
- };
31
+ export interface ModalConfirmOptions {
32
+ title?: string
33
+ message?: string
34
+ resolve: (val: boolean) => void
35
+ }
37
36
 
38
- type ModalType = 'modal' | 'modalForm' | 'confirm';
37
+ type ModalType = 'modal' | 'modalForm' | 'confirm'
39
38
 
40
- type ConfirmModalUserOptions = string | { title: string; message: string };
39
+ type ConfirmModalUserOptions = string | { title: string, message: string }
41
40
 
42
41
  export interface ModalComponentProps {
43
- componentSlots: Record<string, any>;
44
- modalType: ModalType;
45
- modalOptions: ModalOptions | ModalFormOptions | ModalConfirmOptions;
42
+ componentSlots: Record<string, any>
43
+ modalType: ModalType
44
+ modalOptions: ModalOptions | ModalFormOptions | ModalConfirmOptions
46
45
  }
47
46
 
48
47
  export interface ModalFormComponentProps {
49
- componentSlots: Record<string, any>;
50
- modalType: 'modalForm';
51
- modalOptions: ModalFormOptions;
48
+ componentSlots: Record<string, any>
49
+ modalType: 'modalForm'
50
+ modalOptions: ModalFormOptions
52
51
  }
53
52
 
54
53
  export interface ModalApi {
55
- showModal: (options: ModalOptions, slots?: Record<string, any>) => void;
56
- showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => ModalFormComponentProps | undefined;
57
- hideModal: (index?: number) => void;
58
- confirm: (options: ConfirmModalUserOptions) => Promise<boolean>;
54
+ showModal: (options: ModalOptions, slots?: Record<string, any>) => void
55
+ showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => ModalFormComponentProps | undefined
56
+ hideModal: (index?: number) => void
57
+ confirm: (options: ConfirmModalUserOptions) => Promise<boolean>
59
58
  }
60
59
 
61
- export const ModalSymbol: InjectionKey<ModalApi> = Symbol('modal');
60
+ export const ModalSymbol: InjectionKey<ModalApi> = Symbol('modal')
62
61
 
63
- export const useModal = (): ModalApi => {
64
- const modalApi = inject(ModalSymbol);
65
- if (!modalApi) throw new Error('Modal API not provided');
66
- return modalApi;
67
- };
62
+ export function useModal(): ModalApi {
63
+ const modalApi = inject(ModalSymbol)
64
+ if (!modalApi) throw new Error('Modal API not provided')
65
+ return modalApi
66
+ }
68
67
 
69
68
  export const ModalPlugin: Plugin = {
70
69
  install: (app) => {
71
- const modalStack = $ref<ModalComponentProps[]>([]);
70
+ const modalStack = $ref<ModalComponentProps[]>([])
72
71
 
73
72
  const hideModal = (index: number) => {
74
- modalStack.splice(index, 1);
75
- };
73
+ modalStack.splice(index, 1)
74
+ }
76
75
 
77
76
  const modalConfirm = (options: ConfirmModalUserOptions) => new Promise<boolean>((resolve) => {
78
- if (typeof options === 'string') options = { title: options, message: '' };
77
+ if (typeof options === 'string') options = { title: options, message: '' }
79
78
  modalStack.push({
80
79
  modalOptions: { ...options, resolve },
81
80
  modalType: 'confirm',
82
81
  componentSlots: {},
83
- });
84
- });
82
+ })
83
+ })
85
84
 
86
85
  const showModal = (
87
86
  modalType: ModalType,
@@ -92,29 +91,29 @@ export const ModalPlugin: Plugin = {
92
91
  modalOptions: options,
93
92
  modalType,
94
93
  componentSlots: slots,
95
- });
96
- if (modalType === 'modalForm') return modalStack.at(-1) as ModalFormComponentProps | undefined;
97
- return modalStack.at(-1);
98
- };
94
+ })
95
+ if (modalType === 'modalForm') return modalStack.at(-1) as ModalFormComponentProps | undefined
96
+ return modalStack.at(-1)
97
+ }
99
98
 
100
99
  app.provide(ModalSymbol, {
101
100
  showModal: (options: ModalOptions, slots?: Record<string, any>) => showModal('modal', options, slots),
102
101
  showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => showModal('modalForm', options, slots) as ModalFormComponentProps,
103
102
  confirm: (userOptions: ConfirmModalUserOptions) => modalConfirm(userOptions),
104
- hideModal: (index = modalStack.length - 1) => hideModal(index),
105
- });
103
+ hideModal: (index = modalStack.length - 1) => { hideModal(index) },
104
+ })
106
105
 
107
106
  const ModalComponent = defineComponent({
108
107
  data: () => ({ modalStack }),
109
108
  render() {
110
109
  return this.modalStack.map((modal, index) => {
111
- const props = { ...modal.modalOptions, visible: true, 'onUpdate:visible': () => hideModal(index) };
112
- if (modal.modalType === 'modalForm') return h(ModalForm, props as ModalFormOptions, modal.componentSlots);
113
- if (modal.modalType === 'confirm') return h(ModalConfirm, props as any, {});
114
- return h(Modal, props, modal.componentSlots);
115
- });
110
+ const props = { ...modal.modalOptions, 'visible': true, 'onUpdate:visible': () => { hideModal(index) } }
111
+ if (modal.modalType === 'modalForm') return h(ModalForm, props as ModalFormOptions, modal.componentSlots)
112
+ if (modal.modalType === 'confirm') return h(ModalConfirm, props as any, {})
113
+ return h(Modal, props, modal.componentSlots)
114
+ })
116
115
  },
117
- });
118
- app.component('ModalContainer', ModalComponent);
116
+ })
117
+ app.component('ModalContainer', ModalComponent)
119
118
  },
120
- };
119
+ }
@@ -20,9 +20,10 @@
20
20
  }
21
21
 
22
22
  .flex-center {
23
- justify-items: center;
23
+ justify-content: center;
24
24
  align-items: center;
25
- display: flex;}
25
+ display: flex;
26
+ }
26
27
 
27
28
  .justify-items-center {
28
29
  justify-items: center;
@@ -126,7 +127,8 @@
126
127
  inset-inline-end: 0px;
127
128
  }
128
129
 
129
- .positioned-full {
130
+ .positioned-full,
131
+ .p-all {
130
132
  top: 0;
131
133
  bottom: 0;
132
134
  inset-inline-start: 0;
@@ -1592,4 +1592,11 @@
1592
1592
  direction: rtl;
1593
1593
  }
1594
1594
 
1595
+ .m_positioned-full,
1596
+ .m_p-all {
1597
+ top: 0;
1598
+ bottom: 0;
1599
+ inset-inline-start: 0;
1600
+ inset-inline-end: 0;
1601
+ }
1595
1602
  }
@@ -1,42 +1,42 @@
1
- import { SelectInput, TextInput } from '@bagelink/vue';
1
+ import type { SelectInput, TextInput } from '@bagelink/vue'
2
2
 
3
- export type AttributeValue = string | number | boolean | null | undefined | Record<string, any>;
3
+ export type AttributeValue = string | number | boolean | null | undefined | Record<string, any>
4
4
 
5
- export type AttributeFn<T = Record<string, any>> = (field: any, row: T) => AttributeValue;
5
+ export type AttributeFn<T = Record<string, any>> = (field: any, row: T) => AttributeValue
6
6
 
7
7
  export interface Attributes<T = any> {
8
- [key: string]: AttributeValue | AttributeFn<T>
8
+ [key: string]: AttributeValue | AttributeFn<T>
9
9
  }
10
10
 
11
- export type BaseBagelField<T = Record<string, any>> = {
12
- $el?: any;
13
- id?: string;
14
- label?: string;
15
- placeholder?: string;
16
- children?: Field<T>[];
17
- class?: AttributeValue | AttributeFn<T>,
18
- attrs?: Attributes<T>;
19
- required?: boolean;
20
- disabled?: boolean;
21
- helptext?: string;
22
- options?: string | ({ label?: string; value: string | number } | string | number | Record<string, any>)[] | ((val: any, rowData?: Record<string, any>) => void);
23
- defaultValue?: any;
24
- transform?: (val?: any, rowData?: Record<string, any>) => any;
25
- onUpdate?: (val: any, rowData?: Record<string, any>) => void;
26
- 'v-if'?: string | boolean | ((val: any, row: T) => boolean);
11
+ export interface BaseBagelField<T = Record<string, any>> {
12
+ '$el'?: any
13
+ 'id'?: string
14
+ 'label'?: string
15
+ 'placeholder'?: string
16
+ 'children'?: Field<T>[]
17
+ 'class'?: AttributeValue | AttributeFn<T>
18
+ 'attrs'?: Attributes<T>
19
+ 'required'?: boolean
20
+ 'disabled'?: boolean
21
+ 'helptext'?: string
22
+ 'options'?: string | ({ label?: string, value: string | number } | string | number | Record<string, any>)[] | ((val: any, rowData?: Record<string, any>) => void)
23
+ 'defaultValue'?: any
24
+ 'transform'?: (val?: any, rowData?: Record<string, any>) => any
25
+ 'onUpdate'?: (val: any, rowData?: Record<string, any>) => void
26
+ 'v-if'?: string | boolean | ((val: any, row: T) => boolean)
27
27
  }
28
28
 
29
29
  export interface InputBagelField<T> extends BaseBagelField<T> {
30
- $el: 'text' | typeof TextInput;
31
- id: string;
32
- type?: string;
30
+ $el: 'text' | typeof TextInput
31
+ id: string
32
+ type?: string
33
33
  }
34
34
 
35
35
  export interface SelectBagelField<T> extends BaseBagelField<T> {
36
- $el: 'select' | typeof SelectInput;
37
- id: string;
36
+ $el: 'select' | typeof SelectInput
37
+ id: string
38
38
  }
39
39
 
40
- export type Field<T = Record<string, any>> = BaseBagelField<T> | InputBagelField<T> | SelectBagelField<T>;
40
+ export type Field<T = Record<string, any>> = BaseBagelField<T> | InputBagelField<T> | SelectBagelField<T>
41
41
 
42
- export type BglFormSchemaT<T = Record<string, any>> = Field<T>[];
42
+ export type BglFormSchemaT<T = Record<string, any>> = Field<T>[]
@@ -1,16 +1,16 @@
1
- import type { ThemeType, MaterialIcons } from '.';
1
+ import type { MaterialIcons, ThemeType } from '.'
2
2
 
3
3
  export interface BtnOptions {
4
- onClick?: () => void;
5
- color?:ThemeType;
6
- theme?:ThemeType;
7
- disabled?: boolean;
8
- icon?: MaterialIcons;
9
- flat?: boolean;
10
- thin?: boolean;
11
- type?: 'button' | 'submit' | 'reset';
12
- loading?: boolean;
13
- role?: string;
14
- value?: string;
15
- border?: boolean;
4
+ onClick?: () => void
5
+ color?: ThemeType
6
+ theme?: ThemeType
7
+ disabled?: boolean
8
+ icon?: MaterialIcons
9
+ flat?: boolean
10
+ thin?: boolean
11
+ type?: 'button' | 'submit' | 'reset'
12
+ loading?: boolean
13
+ role?: string
14
+ value?: string
15
+ border?: boolean
16
16
  }
@@ -1,10 +1,10 @@
1
- import { MaterialIcons } from './materialIcons';
1
+ import type { MaterialIcons } from './materialIcons'
2
2
 
3
- export type NavLink = {
4
- label: string;
5
- to?: string;
6
- icon: MaterialIcons;
7
- localized?: string;
8
- children?: NavLink[];
9
- onClick?: () => void;
3
+ export interface NavLink {
4
+ label: string
5
+ to?: string
6
+ icon: MaterialIcons
7
+ localized?: string
8
+ children?: NavLink[]
9
+ onClick?: () => void
10
10
  }
package/src/types/file.ts CHANGED
@@ -1,12 +1,12 @@
1
- export type StorageFile = {
2
- organization?: string[];
3
- name: string;
4
- url: string;
5
- mimetype?: string;
6
- size?: number;
7
- extension?: string;
8
- path?: string;
9
- id?: string;
10
- created_at?: Date | string;
11
- updated_at?: Date | string;
1
+ export interface StorageFile {
2
+ organization?: string[]
3
+ name: string
4
+ url: string
5
+ mimetype?: string
6
+ size?: number
7
+ extension?: string
8
+ path?: string
9
+ id?: string
10
+ created_at?: Date | string
11
+ updated_at?: Date | string
12
12
  }
@@ -1,21 +1,25 @@
1
1
  export type {
2
- ModalFormComponentProps, ModalApi, ModalComponentProps, ModalFormOptions, ModalOptions,
3
- } from '../plugins/modal';
2
+ ModalFormComponentProps,
3
+ ModalApi,
4
+ ModalComponentProps,
5
+ ModalFormOptions,
6
+ ModalOptions,
7
+ } from '../plugins/modal'
4
8
 
5
- import type { MaterialIcons } from './materialIcons';
9
+ import type { MaterialIcons } from './materialIcons'
6
10
 
7
- export type { MaterialIcons };
8
- export type { Tables, TableToTypeMapping } from '@bagelink/sdk';
9
- export type { StorageFile } from './file';
10
- export type { NavLink } from './NavLink';
11
+ export type { MaterialIcons }
12
+ export type { Tables, TableToTypeMapping } from '@bagelink/sdk'
13
+ export type { StorageFile } from './file'
14
+ export type { NavLink } from './NavLink'
11
15
 
12
- export * from './BtnOptions';
13
- export * from './BagelForm';
16
+ export * from './BtnOptions'
17
+ export * from './BagelForm'
14
18
 
15
19
  export type Tab = {
16
- label: string;
17
- id: string;
18
- icon?: MaterialIcons;
20
+ label: string
21
+ id: string
22
+ icon?: MaterialIcons
19
23
  } | string
20
24
 
21
25
  export type ThemeType = |