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