@bagelink/vue 0.0.160 → 0.0.162

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 (82) hide show
  1. package/dist/components/Btn.vue.d.ts +2 -2
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/Comments.vue.d.ts.map +1 -1
  4. package/dist/components/DropDown.vue.d.ts.map +1 -1
  5. package/dist/components/FileUploader.vue.d.ts.map +1 -1
  6. package/dist/components/LangText.vue.d.ts.map +1 -1
  7. package/dist/components/NavBar.vue.d.ts.map +1 -1
  8. package/dist/components/PersonPreview.vue.d.ts +1 -1
  9. package/dist/components/PersonPreview.vue.d.ts.map +1 -1
  10. package/dist/components/PersonPreviewFormkit.vue.d.ts +1 -1
  11. package/dist/components/PersonPreviewFormkit.vue.d.ts.map +1 -1
  12. package/dist/components/RTXEditor.vue.d.ts.map +1 -1
  13. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  14. package/dist/components/charts/BarChart.vue.d.ts.map +1 -1
  15. package/dist/components/dashboard/Lineart.vue.d.ts +1 -1
  16. package/dist/components/dashboard/Lineart.vue.d.ts.map +1 -1
  17. package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
  18. package/dist/components/form/inputs/Checkbox.vue.d.ts.map +1 -1
  19. package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
  20. package/dist/components/formkit/AddressArray.vue.d.ts.map +1 -1
  21. package/dist/components/formkit/BankDetailsArray.vue.d.ts.map +1 -1
  22. package/dist/components/formkit/ContactArrayFormKit.vue.d.ts.map +1 -1
  23. package/dist/components/formkit/FileUploader.vue.d.ts.map +1 -1
  24. package/dist/components/formkit/MiscFields.vue.d.ts.map +1 -1
  25. package/dist/index.cjs +60 -49
  26. package/dist/index.mjs +60 -49
  27. package/dist/style.css +1468 -1402
  28. package/package.json +1 -1
  29. package/src/components/Btn.vue +127 -132
  30. package/src/components/Comments.vue +155 -169
  31. package/src/components/DropDown.vue +73 -77
  32. package/src/components/FileUploader.vue +133 -141
  33. package/src/components/FormKitTable.vue +191 -205
  34. package/src/components/LangText.vue +14 -14
  35. package/src/components/NavBar.vue +264 -261
  36. package/src/components/PersonPreview.vue +123 -148
  37. package/src/components/PersonPreviewFormkit.vue +124 -148
  38. package/src/components/RTXEditor.vue +91 -91
  39. package/src/components/TableSchema.vue +150 -156
  40. package/src/components/charts/BarChart.vue +212 -227
  41. package/src/components/dashboard/Lineart.vue +117 -130
  42. package/src/components/form/inputs/CheckInput.vue +90 -90
  43. package/src/components/form/inputs/Checkbox.vue +38 -41
  44. package/src/components/form/inputs/PasswordInput.vue +56 -63
  45. package/src/components/formkit/AddressArray.vue +150 -173
  46. package/src/components/formkit/BankDetailsArray.vue +175 -198
  47. package/src/components/formkit/ContactArrayFormKit.vue +124 -142
  48. package/src/components/formkit/FileUploader.vue +256 -260
  49. package/src/components/formkit/MiscFields.vue +42 -42
  50. package/src/components/formkit/Toggle.vue +97 -97
  51. package/src/styles/bagel.css +1 -0
  52. package/src/styles/buttons.css +5 -0
  53. package/src/styles/dark.css +46 -0
  54. package/src/styles/fonts/Ploni.css +8 -8
  55. package/src/styles/inputs.css +57 -13
  56. package/src/styles/layout.css +43 -0
  57. package/src/styles/text.css +83 -10
  58. package/src/styles/theme.css +25 -155
  59. package/src/styles/fonts/Ploni/ploni-black.eot +0 -0
  60. package/src/styles/fonts/Ploni/ploni-black.woff +0 -0
  61. package/src/styles/fonts/Ploni/ploni-black.woff2 +0 -0
  62. package/src/styles/fonts/Ploni/ploni-bold.eot +0 -0
  63. package/src/styles/fonts/Ploni/ploni-bold.woff +0 -0
  64. package/src/styles/fonts/Ploni/ploni-bold.woff2 +0 -0
  65. package/src/styles/fonts/Ploni/ploni-demibold.eot +0 -0
  66. package/src/styles/fonts/Ploni/ploni-demibold.woff +0 -0
  67. package/src/styles/fonts/Ploni/ploni-demibold.woff2 +0 -0
  68. package/src/styles/fonts/Ploni/ploni-light.eot +0 -0
  69. package/src/styles/fonts/Ploni/ploni-light.woff +0 -0
  70. package/src/styles/fonts/Ploni/ploni-light.woff2 +0 -0
  71. package/src/styles/fonts/Ploni/ploni-medium.eot +0 -0
  72. package/src/styles/fonts/Ploni/ploni-medium.woff +0 -0
  73. package/src/styles/fonts/Ploni/ploni-medium.woff2 +0 -0
  74. package/src/styles/fonts/Ploni/ploni-regular.eot +0 -0
  75. package/src/styles/fonts/Ploni/ploni-regular.woff +0 -0
  76. package/src/styles/fonts/Ploni/ploni-regular.woff2 +0 -0
  77. package/src/styles/fonts/Ploni/ploni-ultrabold.eot +0 -0
  78. package/src/styles/fonts/Ploni/ploni-ultrabold.woff +0 -0
  79. package/src/styles/fonts/Ploni/ploni-ultrabold.woff2 +0 -0
  80. package/src/styles/fonts/Ploni/ploni-ultralight.eot +0 -0
  81. package/src/styles/fonts/Ploni/ploni-ultralight.woff +0 -0
  82. package/src/styles/fonts/Ploni/ploni-ultralight.woff2 +0 -0
@@ -1,273 +1,250 @@
1
1
  <template>
2
- <div class="bagel-input">
3
- <div class="mt-1">
4
- <div
5
- class="bglform-contact mb-3"
6
- v-for="(bank_account, i) in val"
7
- :key="i"
8
- >
9
- <div
10
- class="bglform-contact-confirm"
11
- v-if="deleteCandidate === i"
12
- >
13
- <p class="txt14">
14
- {{ formPlaceholders?.sure }}
15
- </p>
16
- <Btn
17
- thin
18
- color="red"
19
- @click="deleteContact(bank_account.id)"
20
- >
21
- {{ formPlaceholders?.delete }}
22
- </Btn>
23
- <Btn
24
- thin
25
- @click="deleteCandidate = -1"
26
- >
27
- {{ formPlaceholders?.cancel }}
28
- </Btn>
29
- </div>
30
- <Checkbox
31
- v-model="bank_account.primary"
32
- @update:model-value="($event) => primaryHandler(i, $event)"
33
- />
34
- <input
35
- class="bglform-contact-label"
36
- v-model="bank_account.label"
37
- type="text"
38
- :placeholder="formPlaceholders?.label"
39
- >
40
- <div class="bglform-contact-address">
41
- <input
42
- v-model="bank_account.bank_name"
43
- :placeholder="formPlaceholders?.bankName"
44
- type="text"
45
- required
46
- >
47
- <div class="bglform-contact-address-flex">
48
- <input
49
- v-model="bank_account.branch"
50
- :placeholder="formPlaceholders?.bankBranch"
51
- type="text"
52
- required
53
- >
54
- <input
55
- v-model="bank_account.account_number"
56
- :placeholder="formPlaceholders?.bankAccount"
57
- type="text"
58
- required
59
- >
60
- </div>
61
- <div class="grid gap-2">
62
- <input
63
- v-model="bank_account.bank_account_holder"
64
- :placeholder="formPlaceholders?.bankAccountHolder"
65
- type="text"
66
- required
67
- >
68
- <input
69
- v-model="bank_account.bank_account_holder_id"
70
- :placeholder="formPlaceholders?.bankAccountHolderID"
71
- type="text"
72
- >
73
- <input
74
- v-model="bank_account.iban"
75
- placeholder="IBAN"
76
- type="text"
77
- >
78
- <input
79
- v-model="bank_account.swift"
80
- placeholder="SWIFT"
81
- type="text"
82
- >
83
- <input
84
- v-model="bank_account.bank_address"
85
- :placeholder="formPlaceholders?.bankAddress"
86
- type="text"
87
- >
88
- </div>
89
- </div>
90
- <div class="bglform-address-del">
91
- <Btn
92
- thin
93
- @click="deleteCandidate = i"
94
- icon="delete"
95
- color="gray"
96
- />
97
- </div>
98
- </div>
99
- <Btn
100
- class="add-btn"
101
- color="blue"
102
- flat
103
- thin
104
- @click="val.push({})"
105
- >
106
- {{ formPlaceholders?.add }} {{ context?.label }}
107
- </Btn>
108
- </div>
109
- </div>
2
+ <div class="bagel-input">
3
+ <div class="mt-1">
4
+ <div
5
+ class="bglform-contact mb-3"
6
+ v-for="(bank_account, i) in val"
7
+ :key="i"
8
+ >
9
+ <div class="bglform-contact-confirm" v-if="deleteCandidate === i">
10
+ <p class="txt14">
11
+ {{ formPlaceholders?.sure }}
12
+ </p>
13
+ <Btn thin color="red" @click="deleteContact(bank_account.id)">
14
+ {{ formPlaceholders?.delete }}
15
+ </Btn>
16
+ <Btn thin @click="deleteCandidate = -1">
17
+ {{ formPlaceholders?.cancel }}
18
+ </Btn>
19
+ </div>
20
+ <Checkbox
21
+ v-model="bank_account.primary"
22
+ @update:model-value="($event) => primaryHandler(i, $event)"
23
+ />
24
+ <input
25
+ class="bglform-contact-label"
26
+ v-model="bank_account.label"
27
+ type="text"
28
+ :placeholder="formPlaceholders?.label"
29
+ />
30
+ <div class="bglform-contact-address">
31
+ <input
32
+ v-model="bank_account.bank_name"
33
+ :placeholder="formPlaceholders?.bankName"
34
+ type="text"
35
+ required
36
+ />
37
+ <div class="bglform-contact-address-flex">
38
+ <input
39
+ v-model="bank_account.branch"
40
+ :placeholder="formPlaceholders?.bankBranch"
41
+ type="text"
42
+ required
43
+ />
44
+ <input
45
+ v-model="bank_account.account_number"
46
+ :placeholder="formPlaceholders?.bankAccount"
47
+ type="text"
48
+ required
49
+ />
50
+ </div>
51
+ <div class="grid gap-2">
52
+ <input
53
+ v-model="bank_account.bank_account_holder"
54
+ :placeholder="formPlaceholders?.bankAccountHolder"
55
+ type="text"
56
+ required
57
+ />
58
+ <input
59
+ v-model="bank_account.bank_account_holder_id"
60
+ :placeholder="formPlaceholders?.bankAccountHolderID"
61
+ type="text"
62
+ />
63
+ <input v-model="bank_account.iban" placeholder="IBAN" type="text" />
64
+ <input
65
+ v-model="bank_account.swift"
66
+ placeholder="SWIFT"
67
+ type="text"
68
+ />
69
+ <input
70
+ v-model="bank_account.bank_address"
71
+ :placeholder="formPlaceholders?.bankAddress"
72
+ type="text"
73
+ />
74
+ </div>
75
+ </div>
76
+ <div class="bglform-address-del">
77
+ <Btn thin @click="deleteCandidate = i" icon="delete" color="gray" />
78
+ </div>
79
+ </div>
80
+ <Btn class="add-btn" color="blue" flat thin @click="val.push({})">
81
+ {{ formPlaceholders?.add }} {{ context?.label }}
82
+ </Btn>
83
+ </div>
84
+ </div>
110
85
  </template>
111
86
 
112
87
  <script setup lang="ts">
113
- import { watch } from 'vue';
88
+ import { watch } from "vue";
114
89
  // import type { BagelField } from '@bagelink/vue';
115
90
 
116
- import { Btn, useBagel } from '@bagelink/vue';
117
- import Checkbox from '../form/inputs/Checkbox.vue';
91
+ import { Btn, useBagel } from "@bagelink/vue";
92
+ import Checkbox from "../form/inputs/Checkbox.vue";
118
93
 
119
94
  export interface BankDetailsContext {
120
- label?: string;
121
- id?: string;
122
- value: any[];
123
- node: Record<string, any>;
124
- attrs: {
125
- formPlaceholders?: {
126
- sure?: string;
127
- delete?: string;
128
- cancel?: string;
129
- label?: string;
130
- bankName?: string;
131
- bankBranch?: string;
132
- bankAccount?: string;
133
- bankAccountHolder?: string;
134
- bankAccountHolderID?: string;
135
- bankAddress?: string;
136
- add?: string;
137
- };
138
- };
95
+ label?: string;
96
+ id?: string;
97
+ value: any[];
98
+ node: Record<string, any>;
99
+ attrs: {
100
+ formPlaceholders?: {
101
+ sure?: string;
102
+ delete?: string;
103
+ cancel?: string;
104
+ label?: string;
105
+ bankName?: string;
106
+ bankBranch?: string;
107
+ bankAccount?: string;
108
+ bankAccountHolder?: string;
109
+ bankAccountHolderID?: string;
110
+ bankAddress?: string;
111
+ add?: string;
112
+ };
113
+ };
139
114
  }
140
115
  const bagel = useBagel();
141
116
 
142
117
  const props = defineProps<{
143
- context: BankDetailsContext;
118
+ context: BankDetailsContext;
144
119
  }>();
145
- const formPlaceholders = $computed(() => props.context?.attrs?.formPlaceholders);
120
+ const formPlaceholders = $computed(
121
+ () => props.context?.attrs?.formPlaceholders
122
+ );
146
123
 
147
124
  let val = $ref<any[]>([]);
148
125
 
149
126
  let deleteCandidate = $ref<number>(-1);
150
127
 
151
128
  const del = (i: number) => {
152
- val.splice(i, 1);
129
+ val.splice(i, 1);
153
130
  };
154
131
 
155
132
  const deleteContact = async (id: string) => {
156
- await bagel.delete(`/person/contact/${id}`);
157
- const index = val.findIndex((v) => v.id === id);
158
- deleteCandidate = -1;
159
- del(index);
133
+ await bagel.delete(`/person/contact/${id}`);
134
+ const index = val.findIndex((v) => v.id === id);
135
+ deleteCandidate = -1;
136
+ del(index);
160
137
  };
161
138
 
162
139
  const primaryHandler = (i: number, isPrimary: boolean) => {
163
- if (!isPrimary) return;
164
- val?.forEach((contact, index) => {
165
- if (index !== i) contact.primary = false;
166
- });
140
+ if (!isPrimary) return;
141
+ val?.forEach((contact, index) => {
142
+ if (index !== i) contact.primary = false;
143
+ });
167
144
  };
168
145
 
169
146
  watch(
170
- () => props.context?.value,
171
- () => {
172
- val = props.context?.value;
173
- },
174
- { immediate: true },
147
+ () => props.context?.value,
148
+ () => {
149
+ val = props.context?.value;
150
+ },
151
+ { immediate: true }
175
152
  );
176
153
 
177
154
  watch(
178
- () => val,
179
- () => {
180
- props.context?.node.input(val);
181
- },
155
+ () => val,
156
+ () => {
157
+ props.context?.node.input(val);
158
+ }
182
159
  );
183
160
  </script>
184
161
 
185
162
  <style>
186
163
  .bglform-contact-confirm {
187
- position: absolute;
188
- background: rgba(255, 255, 255, 0.5);
189
- height: 100%;
190
- width: 100%;
191
- display: flex;
192
- align-items: center;
193
- justify-content: center;
194
- gap: 0.5rem;
195
- backdrop-filter: blur(1px);
164
+ position: absolute;
165
+ background: rgba(255, 255, 255, 0.5);
166
+ height: 100%;
167
+ width: 100%;
168
+ display: flex;
169
+ align-items: center;
170
+ justify-content: center;
171
+ gap: 0.5rem;
172
+ backdrop-filter: blur(1px);
196
173
  }
197
174
  </style>
198
175
  <style scoped>
199
176
  .bglform-contact {
200
- display: flex;
201
- gap: 0.5rem;
202
- max-width: 700px;
203
- position: relative;
177
+ display: flex;
178
+ gap: 0.5rem;
179
+ max-width: 700px;
180
+ position: relative;
204
181
  }
205
182
 
206
183
  .bglform-contact-label {
207
- flex-basis: 140px;
184
+ flex-basis: 140px;
208
185
  }
209
186
 
210
187
  .bglform-contact-address {
211
- display: flex;
212
- flex-direction: column;
213
- gap: 0.5rem;
188
+ display: flex;
189
+ flex-direction: column;
190
+ gap: 0.5rem;
214
191
  }
215
192
 
216
- .bglform-contact input[type='checkbox'] {
217
- width: 30px;
218
- min-width: 0;
193
+ .bglform-contact input[type="checkbox"] {
194
+ width: 30px;
195
+ min-width: 0;
219
196
  }
220
197
 
221
198
  .light.thin.btn-txt.btn {
222
- padding-left: calc(var(--btn-padding) / 4);
223
- padding-right: calc(var(--btn-padding) / 4);
199
+ padding-left: calc(var(--btn-padding) / 4);
200
+ padding-right: calc(var(--btn-padding) / 4);
224
201
  }
225
202
 
226
203
  .bglform-address-del {
227
- margin-top: 6px;
204
+ margin-top: 6px;
228
205
  }
229
206
 
230
207
  .bglform-contact-address-flex {
231
- display: flex;
232
- gap: 0.5rem;
208
+ display: flex;
209
+ gap: 0.5rem;
233
210
  }
234
211
 
235
212
  .add-btn {
236
- display: flex;
237
- gap: 0.5rem;
238
- align-items: center;
239
- margin-inline-start: 1rem;
213
+ display: flex;
214
+ gap: 0.5rem;
215
+ align-items: center;
216
+ margin-inline-start: 1rem;
240
217
  }
241
218
 
242
219
  .add-btn:active {
243
- background: none !important;
220
+ background: none !important;
244
221
  }
245
222
 
246
223
  .add-btn::before {
247
- content: '+';
248
- font-size: 10px;
249
- background: var(--bgl-blue-light);
250
- border-radius: 100%;
251
- height: 14px;
252
- width: 14px;
253
- display: flex;
254
- align-items: center;
255
- justify-content: center;
256
- color: var(--bgl-blue);
224
+ content: "+";
225
+ font-size: 10px;
226
+ background: var(--bgl-blue-light);
227
+ border-radius: 100%;
228
+ height: 14px;
229
+ width: 14px;
230
+ display: flex;
231
+ align-items: center;
232
+ justify-content: center;
233
+ color: var(--bgl-primary);
257
234
  }
258
235
 
259
236
  .add-btn:hover::before {
260
- background: var(--bgl-blue);
261
- color: var(--bgl-white);
237
+ background: var(--bgl-primary);
238
+ color: var(--bgl-white);
262
239
  }
263
240
 
264
241
  @media screen and (max-width: 910px) {
265
- .bglform-contact-address-flex {
266
- flex-wrap: wrap;
267
- }
242
+ .bglform-contact-address-flex {
243
+ flex-wrap: wrap;
244
+ }
268
245
 
269
- .bglform-contact-label {
270
- min-width: 0;
271
- }
246
+ .bglform-contact-label {
247
+ min-width: 0;
248
+ }
272
249
  }
273
250
  </style>