@bagelink/vue 0.0.738 → 0.0.742

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 (67) hide show
  1. package/dist/components/AddressSaerch.vue.d.ts +7 -0
  2. package/dist/components/AddressSaerch.vue.d.ts.map +1 -0
  3. package/dist/components/AddressSearch.vue.d.ts +7 -0
  4. package/dist/components/AddressSearch.vue.d.ts.map +1 -0
  5. package/dist/components/Btn.vue.d.ts.map +1 -1
  6. package/dist/components/MapEmbed.vue.d.ts +55 -1
  7. package/dist/components/MapEmbed.vue.d.ts.map +1 -1
  8. package/dist/components/Modal.vue.d.ts.map +1 -1
  9. package/dist/components/ModalConfirm.vue.d.ts +4 -4
  10. package/dist/components/ModalConfirm.vue.d.ts.map +1 -1
  11. package/dist/components/form/inputs/PasswordInput.vue.d.ts +6 -6
  12. package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/RichText2/index.vue.d.ts.map +1 -1
  14. package/dist/components/form/inputs/TelInput.vue.d.ts +0 -1
  15. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  16. package/dist/components/index.d.ts +1 -0
  17. package/dist/components/index.d.ts.map +1 -1
  18. package/dist/index.cjs +451 -266
  19. package/dist/index.mjs +451 -266
  20. package/dist/plugins/modal.d.ts +9 -13
  21. package/dist/plugins/modal.d.ts.map +1 -1
  22. package/dist/style.css +1238 -427
  23. package/dist/utils/index.d.ts +2 -0
  24. package/dist/utils/index.d.ts.map +1 -1
  25. package/package.json +5 -4
  26. package/src/components/AddressSearch.vue +41 -0
  27. package/src/components/Avatar.vue +1 -1
  28. package/src/components/Badge.vue +1 -1
  29. package/src/components/Btn.vue +9 -7
  30. package/src/components/Card.vue +2 -2
  31. package/src/components/ListItem.vue +1 -1
  32. package/src/components/MapEmbed.vue +143 -104
  33. package/src/components/Modal.vue +5 -2
  34. package/src/components/ModalConfirm.vue +4 -7
  35. package/src/components/NavBar.vue +9 -9
  36. package/src/components/TableSchema.vue +3 -3
  37. package/src/components/form/inputs/Checkbox.vue +1 -1
  38. package/src/components/form/inputs/DatePicker.vue +5 -5
  39. package/src/components/form/inputs/FileUpload.vue +1 -1
  40. package/src/components/form/inputs/PasswordInput.vue +9 -10
  41. package/src/components/form/inputs/RadioGroup.vue +1 -1
  42. package/src/components/form/inputs/RadioPillsInput.vue +2 -2
  43. package/src/components/form/inputs/RichText.vue +3 -3
  44. package/src/components/form/inputs/RichText2/index.vue +8 -2
  45. package/src/components/form/inputs/TableField.vue +3 -3
  46. package/src/components/form/inputs/TelInput.vue +2 -2
  47. package/src/components/form/inputs/TextInput.vue +3 -3
  48. package/src/components/form/inputs/ToggleInput.vue +1 -1
  49. package/src/components/formkit/FileUploader.vue +1 -1
  50. package/src/components/formkit/MiscFields.vue +1 -1
  51. package/src/components/formkit/Toggle.vue +4 -4
  52. package/src/components/index.ts +1 -0
  53. package/src/components/layout/BottomMenu.vue +2 -2
  54. package/src/components/layout/SidebarMenu.vue +1 -1
  55. package/src/components/layout/TabsNav.vue +1 -1
  56. package/src/components/leaflet/leaflet.css +661 -0
  57. package/src/components/lightbox/Lightbox.vue +2 -2
  58. package/src/plugins/modal.ts +44 -61
  59. package/src/styles/appearance.css +30 -0
  60. package/src/styles/bagel.css +2 -1
  61. package/src/styles/inputs.css +10 -3
  62. package/src/styles/loginCard.css +1 -1
  63. package/src/styles/modal.css +2 -2
  64. package/src/styles/scrollbar.css +1 -1
  65. package/src/styles/text.css +82 -0
  66. package/src/styles/theme.css +68 -41
  67. package/src/utils/index.ts +16 -0
@@ -1,8 +1,9 @@
1
1
  import { defineComponent, h, inject } from 'vue'
2
- import type { InjectionKey, Plugin } from 'vue'
2
+ import type { InjectionKey, Plugin } from 'vue'
3
3
  import type { BglFormSchemaT, BtnOptions } from '@bagelink/vue'
4
4
  import { Modal, ModalConfirm, ModalForm } from '@bagelink/vue'
5
5
 
6
+ // Interface Definitions
6
7
  export interface ModalOptions {
7
8
  title?: string
8
9
  dismissable?: boolean
@@ -13,28 +14,24 @@ export interface ModalOptions {
13
14
  visible?: boolean
14
15
  }
15
16
 
16
- export interface ModalFormOptions {
17
- 'side'?: boolean
18
- 'title'?: string
19
- 'visible'?: boolean
20
- 'width'?: string
21
- 'dismissable'?: boolean
17
+ export interface ModalFormOptions extends ModalOptions {
22
18
  'schema': BglFormSchemaT<any> | (() => BglFormSchemaT) | BglFormSchemaT
23
19
  'onSubmit'?: (formData: any) => any
24
20
  'onDelete'?: (id: string) => Promise<void>
25
- 'onError'?: ((err: any) => void)
21
+ 'onError'?: (err: any) => void
26
22
  'modelValue'?: Record<string, any>
27
23
  'onUpdate:modelValue'?: (val: any) => void
28
24
  }
29
25
 
30
26
  export interface ModalConfirmOptions {
31
- title?: string
32
- message?: string
33
- resolve: (val: boolean) => void
27
+ 'title': string
28
+ 'message': string
29
+ 'resolve': (val: boolean) => void
30
+ 'onUpdate:visible': () => void
31
+ 'visible': boolean
34
32
  }
35
33
 
36
- type ModalType = 'modal' | 'modalForm' | 'confirm'
37
-
34
+ type ModalType = 'modal' | 'modalForm' | 'confirmModal'
38
35
  type ConfirmModalUserOptions = string | { title: string, message: string }
39
36
 
40
37
  export interface ModalComponentProps {
@@ -43,8 +40,7 @@ export interface ModalComponentProps {
43
40
  modalOptions: ModalOptions | ModalFormOptions | ModalConfirmOptions
44
41
  }
45
42
 
46
- export interface ModalFormComponentProps {
47
- componentSlots: Record<string, any>
43
+ export interface ModalFormComponentProps extends ModalComponentProps {
48
44
  modalType: 'modalForm'
49
45
  modalOptions: ModalFormOptions
50
46
  }
@@ -72,79 +68,66 @@ export const ModalPlugin: Plugin = {
72
68
  modalStack.splice(index, 1)
73
69
  }
74
70
 
75
- const modalConfirm = async (
76
- options: ConfirmModalUserOptions
77
- ) => new Promise<boolean>(
78
- (resolve) => {
79
- if (typeof options === 'string') options = { title: '', message: options }
71
+ const confirmModal = (options: ConfirmModalUserOptions): Promise<boolean> => {
72
+ return new Promise((resolve) => {
73
+ const confirmOptions = typeof options === 'string' ? { title: '', message: options } : options
80
74
  modalStack.push({
81
- modalOptions: { ...options, resolve },
82
- modalType: 'confirm',
75
+ modalOptions: { ...confirmOptions, resolve },
76
+ modalType: 'confirmModal',
83
77
  componentSlots: {},
84
78
  })
85
- }
86
- )
79
+ })
80
+ }
87
81
 
88
82
  const showModal = (
89
83
  modalType: ModalType,
90
84
  options: ModalOptions | ModalFormOptions,
91
- slots: Record<string, any> = {},
92
- ) => {
93
- modalStack.push({
85
+ slots: Record<string, any> = {}
86
+ ): ModalComponentProps | ModalFormComponentProps | undefined => {
87
+ const modalComponent = {
94
88
  modalOptions: options,
95
89
  modalType,
96
90
  componentSlots: slots,
97
- })
98
-
99
- if (modalType === 'modalForm') return modalStack.at(-1) as ModalFormComponentProps | undefined
91
+ }
92
+ modalStack.push(modalComponent)
100
93
 
101
- return modalStack.at(-1)
94
+ if (modalType === 'modalForm') {
95
+ return modalComponent as ModalFormComponentProps
96
+ }
97
+ return modalComponent
102
98
  }
103
99
 
104
100
  app.provide(ModalSymbol, {
105
- showModal: (
106
- options: ModalOptions,
107
- slots?: Record<string, any>
108
- ) => showModal('modal', options, slots),
109
-
110
- showModalForm: (
111
- options: ModalFormOptions,
112
- slots?: Record<string, any>
113
- ) => showModal('modalForm', options, slots) as ModalFormComponentProps,
114
- confirmModal: async (
115
- userOptions: ConfirmModalUserOptions
116
- ) => modalConfirm(userOptions),
117
-
118
- hideModal: (
119
- index = modalStack.length - 1
120
- ) => { hideModal(index) },
101
+ showModal: (options: ModalOptions, slots?: Record<string, any>) => showModal('modal', options, slots),
102
+
103
+ showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => showModal('modalForm', options, slots) as ModalFormComponentProps,
104
+
105
+ confirmModal: (options: ConfirmModalUserOptions) => confirmModal(options),
106
+
107
+ hideModal: (index = modalStack.length - 1) => { hideModal(index) },
121
108
  })
122
109
 
123
110
  const ModalComponent = defineComponent({
124
111
  data: () => ({ modalStack }),
125
112
  render() {
126
- return this.modalStack.map((
127
- modal: ModalComponentProps,
128
- index: number
129
- ) => {
113
+ return this.modalStack.map((modal, index) => {
130
114
  const props = {
131
115
  ...modal.modalOptions,
132
116
  'visible': true,
133
- 'onUpdate:visible': () => { hideModal(index) }
117
+ 'onUpdate:visible': () => { hideModal(index) },
134
118
  }
135
-
136
- if (modal.modalType === 'modalForm') {
137
- return h(ModalForm, props as ModalFormOptions, modal.componentSlots)
119
+ switch (modal.modalType) {
120
+ case 'modalForm':
121
+ return h(ModalForm, props as ModalFormOptions, modal.componentSlots)
122
+ case 'confirmModal':
123
+ return h(ModalConfirm, props as ModalConfirmOptions, {})
124
+ default:
125
+ return h(Modal, props, modal.componentSlots)
138
126
  }
139
-
140
- if (modal.modalType === 'confirm') {
141
- return h(ModalConfirm, props as any, {})
142
- }
143
-
144
- return h(Modal, props, modal.componentSlots)
145
127
  })
146
128
  },
147
129
  })
130
+
148
131
  app.component('ModalContainer', ModalComponent)
149
132
  },
150
133
  }
@@ -42,6 +42,11 @@
42
42
  opacity: 1;
43
43
  }
44
44
 
45
+ .-z-index-1,
46
+ .-z-1 {
47
+ z-index: -1;
48
+ }
49
+
45
50
  .z-index-0,
46
51
  .z-0 {
47
52
  z-index: 0;
@@ -108,6 +113,14 @@
108
113
  color: var(--bgl-white) !important;
109
114
  }
110
115
 
116
+ .bg-popup {
117
+ background: var(--bgl-popup-bg) !important;
118
+ }
119
+
120
+ .color-popup {
121
+ color: var(--bgl-popup-bg) !important;
122
+ }
123
+
111
124
  .bg-primary {
112
125
  background: var(--bgl-primary) !important;
113
126
  }
@@ -469,6 +482,10 @@
469
482
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1) !important;
470
483
  }
471
484
 
485
+ .shadow-txt {
486
+ filter: drop-shadow(0 0 10px var(--bgl-black-tint));
487
+ }
488
+
472
489
  .border-bottom {
473
490
  border-bottom: 1px solid var(--border-color)
474
491
  }
@@ -595,6 +612,11 @@
595
612
  opacity: 1;
596
613
  }
597
614
 
615
+ .m_-z-index-1,
616
+ .m_-z-1 {
617
+ z-index: -1;
618
+ }
619
+
598
620
  .m_z-index-0,
599
621
  .m_z-0 {
600
622
  z-index: 0;
@@ -657,6 +679,14 @@
657
679
  color: var(--bgl-white) !important;
658
680
  }
659
681
 
682
+ .m_bg-popup {
683
+ background: var(--bgl-popup-bg) !important;
684
+ }
685
+
686
+ .m_color-popup {
687
+ color: var(--bgl-popup-bg) !important;
688
+ }
689
+
660
690
  .m_bg-primary {
661
691
  background: var(--bgl-primary) !important;
662
692
  }
@@ -37,11 +37,12 @@ body {
37
37
  min-height: 100%;
38
38
  background-color: var(--bgl-bg);
39
39
  font-family: var(--bgl-font);
40
- font-size: 16px;
40
+ font-size: var(--bgl-font-size);
41
41
  font-weight: 400;
42
42
  line-height: 1.65;
43
43
  width: auto;
44
44
  height: auto;
45
+ color: var(--bgl-text-color);
45
46
  }
46
47
 
47
48
  a {
@@ -19,7 +19,7 @@ select {
19
19
  text-align: start;
20
20
  margin-bottom: 0.5rem;
21
21
  width: 100%;
22
- color: var(--bgl-black);
22
+ color: var(--bgl-text-color);
23
23
  }
24
24
 
25
25
  .bagel-input::-webkit-input-placeholder .bagel-input label {
@@ -231,6 +231,11 @@ select {
231
231
  width: 100%;
232
232
  }
233
233
 
234
+ [dir='rtl'] .bagel-input input[type="email"] {
235
+ direction: ltr;
236
+ text-align: right;
237
+ }
238
+
234
239
  .input.active .bagel-input input:focus-visible,
235
240
  .bagel-input select:focus-visible,
236
241
  .bagel-input textarea:focus-visible,
@@ -246,13 +251,15 @@ select {
246
251
  .bagel-input .bgl_btn:focus,
247
252
  .bagel-input button:focus {
248
253
  outline-color: rgba(0, 0, 0, 0.05);
254
+ box-shadow: inset 0 0 10px #00000012;
255
+
249
256
  }
250
257
 
251
258
  .bagel-input.light-input input,
252
259
  .bagel-input.light-input textarea,
253
260
  .bagel-input.light-input select,
254
261
  .custom-select.light-input .input {
255
- background: var(--bgl-white) !important;
262
+ background: var(--bgl-popup-bg) !important;
256
263
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1) !important;
257
264
  outline: 1px solid var(--border-color) !important;
258
265
  }
@@ -261,7 +268,7 @@ select {
261
268
  .bagel-input.light-input input:focus-visible,
262
269
  .bagel-input.light-input select:focus-visible,
263
270
  .bagel-input.light-input textarea:focus-visible {
264
- box-shadow: inset 0 0 2px var(--bgl-black) !important;
271
+ box-shadow: inset 0 0 2px var(--bgl-popup-text) !important;
265
272
  }
266
273
 
267
274
  .bagel-input input[type="number"]-webkit-inner-spin-button,
@@ -19,7 +19,7 @@
19
19
 
20
20
  .login-card .forgot-password {
21
21
  margin: -5px 0 10px;
22
- color: var(--bgl-black);
22
+ color: var(--bgl-text-color);
23
23
  text-decoration: none;
24
24
  }
25
25
 
@@ -4,7 +4,7 @@
4
4
  right: 0;
5
5
  left: 0;
6
6
  bottom: 0;
7
- background-color: rgba(0, 0, 0, 0.7);
7
+ background-color: var(--bgl-dark-bg);
8
8
  z-index: 999;
9
9
  pointer-events: none;
10
10
  opacity: 0;
@@ -66,7 +66,7 @@
66
66
  padding-top: 0rem;
67
67
  top: 0rem;
68
68
  z-index: 3;
69
- background: var(--bgl-white);
69
+ background: var(--bgl-popup-bg);
70
70
  border-radius: var(--card-border-radius);
71
71
  }
72
72
 
@@ -6,7 +6,7 @@
6
6
  ::-webkit-scrollbar-track {}
7
7
 
8
8
  ::-webkit-scrollbar-thumb {
9
- background-color: var(--bgl-gray);
9
+ background-color: var(--bgl-scrollbar-thumb);
10
10
  border-radius: 1rem;
11
11
  }
12
12
 
@@ -99,6 +99,47 @@
99
99
  font-size: 72px;
100
100
  }
101
101
 
102
+ .txt80,
103
+ .txt-80 {
104
+ font-size: 80px;
105
+ }
106
+
107
+ .txt90,
108
+ .txt-90 {
109
+ font-size: 90px;
110
+ }
111
+
112
+ .txt100,
113
+ .txt-100 {
114
+ font-size: 100px;
115
+ }
116
+
117
+
118
+ .txt110,
119
+ .txt-110 {
120
+ font-size: 110px;
121
+ }
122
+
123
+ .txt120,
124
+ .txt-120 {
125
+ font-size: 120px;
126
+ }
127
+
128
+ .txt130,
129
+ .txt-130 {
130
+ font-size: 130px;
131
+ }
132
+
133
+ .txt140,
134
+ .txt-140 {
135
+ font-size: 140px;
136
+ }
137
+
138
+ .txt150,
139
+ .txt-150 {
140
+ font-size: 150px;
141
+ }
142
+
102
143
 
103
144
  .txt18,
104
145
  .txt-18 {
@@ -481,6 +522,47 @@
481
522
  }
482
523
 
483
524
 
525
+ .m_txt80,
526
+ .m_txt-80 {
527
+ font-size: 80px;
528
+ }
529
+
530
+ .m_txt90,
531
+ .m_txt-90 {
532
+ font-size: 90px;
533
+ }
534
+
535
+ .m_txt100,
536
+ .m_txt-100 {
537
+ font-size: 100px;
538
+ }
539
+
540
+
541
+ .m_txt110,
542
+ .m_txt-110 {
543
+ font-size: 110px;
544
+ }
545
+
546
+ .m_txt120,
547
+ .m_txt-120 {
548
+ font-size: 120px;
549
+ }
550
+
551
+ .m_txt130,
552
+ .m_txt-130 {
553
+ font-size: 130px;
554
+ }
555
+
556
+ .m_txt140,
557
+ .m_txt-140 {
558
+ font-size: 140px;
559
+ }
560
+
561
+ .m_txt150,
562
+ .m_txt-150 {
563
+ font-size: 150px;
564
+ }
565
+
484
566
  .m_txt18,
485
567
  .m_txt-18 {
486
568
  font-size: 18px;
@@ -1,17 +1,11 @@
1
- /* @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@300;400;500;600;700&display=swap"); */
2
- /*noinspection CssUnknownTarget*/
3
- /* @import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&display=swap"); */
4
- @import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200");
5
- @import url("https://fonts.googleapis.com/css2?family=Lexend:wght@100;200;300;400;500;600;700;800;900&display=swap");
1
+ @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
2
+ @import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100;200;300;400;500;600;700;800;900&display=swap');
6
3
 
4
+ /* TEHEME */
7
5
  :root {
8
6
  --bgl-primary: #2e5bff;
9
7
  --bgl-primary-tint: #2e5bff80;
10
8
  --bgl-primary-light: #eef6ff;
11
- --bgl-accent-color:var(--bgl-primary);
12
- --bgl-blue-20: rgba(46, 91, 255, 20%);
13
- --bgl-blue-dark: #191c30;
14
- --bgl-blue-light: #eef6ff;
15
9
  --bgl-black: #282929;
16
10
  --bgl-black-tint: #28292980;
17
11
  --bgl-white: #fff;
@@ -20,35 +14,68 @@
20
14
  --bgl-gray-80: #e8ecef;
21
15
  --bgl-gray-20: rgba(183, 183, 183, 0.2);
22
16
  --bgl-gray-40: rgba(183, 183, 183, 0.4);
23
- --bgl-pink: #f1416c;
24
- --bgl-red: #ed6c6f;
25
- --bgl-red-tint: #fbe2e2;
26
- --bgl-yellow: #ffbb00;
27
- --bgl-yellow-light: #fff6d5;
28
- --bgl-green: #75c98f;
29
- --border-color: #00000020;
17
+ --bgl-accent-color: var(--bgl-primary);
30
18
  --bgl-bg: #f4f6fa;
31
19
  --bgl-shadow: #4c577d26;
32
- --whatsapp-gray: #89959f;
33
- --whatsapp-green: #e0fcd6;
34
- --whatsapp-blue: #71bce6;
35
- --input-border-radius: 7px;
36
- --card-border-radius: 12px;
20
+ --border-color: #00000020;
37
21
  --placeholder-color: #00000040;
38
22
  --label-color: #00000080;
39
- --label-font-size: 12px;
40
23
  --input-bg: #f5f8fa;
41
24
  --input-color: #000000;
25
+ --bgl-box-bg: var(--bgl-white);
26
+ --bgl-popup-bg: var(--bgl-white);
27
+ --bgl-popup-text: var(--bgl-black);
28
+ --bgl-text-color: var(--bgl-black);
29
+ --bgl-light-text: var(--bgl-white);
30
+ --bgl-richtext-color: var(--bgl-white);
31
+ --bgl-code-bg: var(--bgl-black);
32
+ --bgl-code-color: var(--bgl-white);
33
+ --bgl-dark-bg: rgba(0, 0, 0, 0.7);
34
+ --bgl-selection-bg: var(--bgl-blue-dark);
35
+ --bgl-selection-color: var(--bgl-white);
36
+ --bgl-scrollbar-thumb: var(--bgl-gray);
37
+ }
38
+
39
+ /* TYPE */
40
+ :root {
41
+ --bgl-font: 'Lexend', 'Ploni', sans-serif;
42
+ --input-font-size: 16px;
43
+ }
44
+
45
+ /* DIMENSIONS */
46
+ :root {
47
+ --bgl-font-size: 16px;
42
48
  --input-height: 40px;
43
- --input-font-size: 14px;
49
+ --label-font-size: 12px;
50
+ --input-border-radius: 7px;
51
+ --card-border-radius: 12px;
44
52
  --btn-border-radius: 10px;
45
53
  --btn-padding: 30px;
46
54
  --btn-height: 40px;
55
+ }
56
+
57
+ /* MISC */
58
+ :root {
47
59
  --bgl-transition: all 200ms ease;
48
60
  --bgl-transition-400: all 400ms ease;
49
61
  --bgl-hover-filter: brightness(90%);
50
62
  --bgl-active-filter: brightness(70%);
51
- --bgl-font: "Lexend", "Ploni", sans-serif;
63
+ }
64
+
65
+ /* OTHER COLORS */
66
+ :root {
67
+ --bgl-blue-20: rgba(46, 91, 255, 20%);
68
+ --bgl-blue-dark: #191c30;
69
+ --bgl-blue-light: #eef6ff;
70
+ --bgl-pink: #f1416c;
71
+ --bgl-red: #ed6c6f;
72
+ --bgl-red-tint: #fbe2e2;
73
+ --bgl-yellow: #ffbb00;
74
+ --bgl-yellow-light: #fff6d5;
75
+ --bgl-green: #75c98f;
76
+ --whatsapp-gray: #89959f;
77
+ --whatsapp-green: #e0fcd6;
78
+ --whatsapp-blue: #71bce6;
52
79
  }
53
80
 
54
81
  .Vue-Toastification__toast {
@@ -66,20 +93,18 @@
66
93
  }
67
94
 
68
95
  ::-moz-selection {
69
- color: var(--bgl-white);
70
- background: var(--bgl-blue-dark);
96
+ color: var(--bgl-selection-color);
97
+ background: var(--bgl-selection-bg);
71
98
  }
72
99
 
73
100
  ::selection {
74
- color: var(--bgl-white);
75
- background: var(--bgl-blue-dark);
101
+ color: var(--bgl-selection-color);
102
+ background: var(--bgl-selection-bg);
76
103
  }
77
104
 
78
-
79
-
80
105
  .popup {
81
106
  border-radius: 15px;
82
- background: var(--bgl-white);
107
+ background: var(--bgl-popup-bg);
83
108
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
84
109
  padding: 2rem;
85
110
  min-width: 300px;
@@ -163,9 +188,10 @@
163
188
  -moz-column-gap: 1rem;
164
189
  column-gap: 1rem;
165
190
  grid-template-rows: 1fr;
166
- grid-template-areas: "list-view detail-view";
191
+ grid-template-areas: 'list-view detail-view';
167
192
  transition: grid-template-columns 0.4s cubic-bezier(0.79, 0.01, 0.34, 0.99);
168
- transition: grid-template-columns 0.4s cubic-bezier(0.79, 0.01, 0.34, 0.99),
193
+ transition:
194
+ grid-template-columns 0.4s cubic-bezier(0.79, 0.01, 0.34, 0.99),
169
195
  -ms-grid-columns 0.4s cubic-bezier(0.79, 0.01, 0.34, 0.99);
170
196
  transition: all 0.5s cubic-bezier(0.79, 0.01, 0.34, 0.99);
171
197
  }
@@ -209,9 +235,10 @@
209
235
  .table-list-wrap {
210
236
  overflow: auto;
211
237
  }
212
- [dir="rtl"] .data-row .bgl_icon-font,
213
- [dir="rtl"] .embedded-field .bgl_icon-font {
214
- transform: rotateY(180deg) !important;
238
+
239
+ [dir='rtl'] .data-row .bgl_icon-font,
240
+ [dir='rtl'] .embedded-field .bgl_icon-font {
241
+ transform: rotateY(180deg) !important;
215
242
  }
216
243
 
217
244
  .copy-url {
@@ -229,13 +256,13 @@
229
256
  margin: 0;
230
257
  font-size: 12px;
231
258
  opacity: 0.8;
232
- color: var(--bgl-black);
259
+ color: var(--bgl-text-color);
233
260
  word-break: break-all;
234
261
  }
235
262
 
236
263
  .list-view {
237
264
  grid-area: list-view;
238
- grid-template-areas: "list-header""list-content";
265
+ grid-template-areas: 'list-header''list-content';
239
266
  grid-template-columns: 1fr;
240
267
  overflow-y: auto;
241
268
  grid-template-rows: -webkit-max-content 1fr;
@@ -271,7 +298,7 @@
271
298
 
272
299
  .detail-view-inner {
273
300
  border-radius: var(--card-border-radius);
274
- background: var(--bgl-white);
301
+ background: var(--bgl-box-bg);
275
302
  }
276
303
 
277
304
  .detail-view-inner-wrap {
@@ -282,7 +309,7 @@
282
309
  }
283
310
 
284
311
  .detail-view-inner-wrap.bgl_card {
285
- background: var(--bgl-white);
312
+ background: var(--bgl-box-bg);
286
313
  }
287
314
 
288
315
  .bgl_card {
@@ -304,7 +331,7 @@
304
331
 
305
332
  .popup {
306
333
  border-radius: 15px;
307
- background: var(--bgl-white);
334
+ background: var(--bgl-popup-bg);
308
335
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
309
336
  padding: 2rem;
310
337
  min-width: 0;
@@ -83,3 +83,19 @@ export function getFallbackSchema<T>(data?: any[], showFields?: string[]): BglFo
83
83
  ? schema.filter(f => showFields.includes(f.id as string) || !f.id)
84
84
  : schema
85
85
  }
86
+
87
+ export const sleep = (ms: number = 100) => new Promise(resolve => setTimeout(resolve, ms))
88
+
89
+ export function appendScript(src: string): Promise<void> {
90
+ return new Promise((resolve, reject) => {
91
+ if (document.querySelector(`script[src="${src}"]`)) {
92
+ resolve()
93
+ return
94
+ }
95
+ const script = document.createElement('script')
96
+ script.src = src
97
+ script.onload = () => { resolve() }
98
+ script.onerror = reject
99
+ document.head.appendChild(script)
100
+ })
101
+ }