@bagelink/vue 0.0.160 → 0.0.164
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.
- package/dist/components/Btn.vue.d.ts +2 -2
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Comments.vue.d.ts.map +1 -1
- package/dist/components/DropDown.vue.d.ts.map +1 -1
- package/dist/components/FileUploader.vue.d.ts.map +1 -1
- package/dist/components/LangText.vue.d.ts.map +1 -1
- package/dist/components/NavBar.vue.d.ts.map +1 -1
- package/dist/components/PersonPreview.vue.d.ts +1 -1
- package/dist/components/PersonPreview.vue.d.ts.map +1 -1
- package/dist/components/PersonPreviewFormkit.vue.d.ts +1 -1
- package/dist/components/PersonPreviewFormkit.vue.d.ts.map +1 -1
- package/dist/components/RTXEditor.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/charts/BarChart.vue.d.ts.map +1 -1
- package/dist/components/dashboard/Lineart.vue.d.ts +1 -1
- package/dist/components/dashboard/Lineart.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/formkit/AddressArray.vue.d.ts.map +1 -1
- package/dist/components/formkit/BankDetailsArray.vue.d.ts.map +1 -1
- package/dist/components/formkit/ContactArrayFormKit.vue.d.ts.map +1 -1
- package/dist/components/formkit/FileUploader.vue.d.ts.map +1 -1
- package/dist/components/formkit/MiscFields.vue.d.ts.map +1 -1
- package/dist/index.cjs +60 -49
- package/dist/index.mjs +60 -49
- package/dist/style.css +1468 -1402
- package/package.json +2 -2
- package/src/components/Btn.vue +127 -132
- package/src/components/Comments.vue +155 -169
- package/src/components/DropDown.vue +73 -77
- package/src/components/FileUploader.vue +133 -141
- package/src/components/FormKitTable.vue +191 -205
- package/src/components/LangText.vue +14 -14
- package/src/components/NavBar.vue +264 -261
- package/src/components/PersonPreview.vue +123 -148
- package/src/components/PersonPreviewFormkit.vue +124 -148
- package/src/components/RTXEditor.vue +91 -91
- package/src/components/TableSchema.vue +150 -156
- package/src/components/charts/BarChart.vue +212 -227
- package/src/components/dashboard/Lineart.vue +117 -130
- package/src/components/form/inputs/CheckInput.vue +90 -90
- package/src/components/form/inputs/Checkbox.vue +38 -41
- package/src/components/form/inputs/PasswordInput.vue +56 -63
- package/src/components/formkit/AddressArray.vue +150 -173
- package/src/components/formkit/BankDetailsArray.vue +175 -198
- package/src/components/formkit/ContactArrayFormKit.vue +124 -142
- package/src/components/formkit/FileUploader.vue +256 -260
- package/src/components/formkit/MiscFields.vue +42 -42
- package/src/components/formkit/Toggle.vue +97 -97
- package/src/styles/bagel.css +1 -0
- package/src/styles/buttons.css +5 -0
- package/src/styles/dark.css +46 -0
- package/src/styles/fonts/Ploni.css +8 -8
- package/src/styles/inputs.css +57 -13
- package/src/styles/layout.css +43 -0
- package/src/styles/text.css +83 -10
- package/src/styles/theme.css +25 -155
- package/src/styles/fonts/Ploni/ploni-black.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-black.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-black.woff2 +0 -0
- package/src/styles/fonts/Ploni/ploni-bold.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-bold.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-bold.woff2 +0 -0
- package/src/styles/fonts/Ploni/ploni-demibold.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-demibold.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-demibold.woff2 +0 -0
- package/src/styles/fonts/Ploni/ploni-light.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-light.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-light.woff2 +0 -0
- package/src/styles/fonts/Ploni/ploni-medium.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-medium.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-medium.woff2 +0 -0
- package/src/styles/fonts/Ploni/ploni-regular.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-regular.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-regular.woff2 +0 -0
- package/src/styles/fonts/Ploni/ploni-ultrabold.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-ultrabold.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-ultrabold.woff2 +0 -0
- package/src/styles/fonts/Ploni/ploni-ultralight.eot +0 -0
- package/src/styles/fonts/Ploni/ploni-ultralight.woff +0 -0
- package/src/styles/fonts/Ploni/ploni-ultralight.woff2 +0 -0
|
@@ -1,252 +1,238 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
class="comment-input"
|
|
56
|
-
v-model="bodyHtml"
|
|
57
|
-
@keydown.meta.enter="newComment"
|
|
58
|
-
/>
|
|
59
|
-
<Btn
|
|
60
|
-
icon="send"
|
|
61
|
-
@click="newComment"
|
|
62
|
-
>
|
|
63
|
-
{{ sendBtnLabel }}
|
|
64
|
-
</Btn>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
2
|
+
<div class="comments-wrap">
|
|
3
|
+
<div class="comment-list">
|
|
4
|
+
<div
|
|
5
|
+
:class="{
|
|
6
|
+
editable: editComment?.id === comment.id,
|
|
7
|
+
me: comment.sender.id === bagel.auth.user?.id,
|
|
8
|
+
}"
|
|
9
|
+
class="comment"
|
|
10
|
+
v-for="comment in comments"
|
|
11
|
+
:key="comment.id"
|
|
12
|
+
>
|
|
13
|
+
<div class="comment-top">
|
|
14
|
+
<div class="comment-owner">
|
|
15
|
+
{{ comment.sender.first_name }} {{ comment.sender.last_name }}
|
|
16
|
+
</div>
|
|
17
|
+
<div class="comment-time">
|
|
18
|
+
{{ comment.updated_at.split("T")[0] }}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="comment-actions">
|
|
21
|
+
<MaterialIcon
|
|
22
|
+
:size="1"
|
|
23
|
+
class="edit"
|
|
24
|
+
icon="edit"
|
|
25
|
+
@click="editComment = comment"
|
|
26
|
+
/>
|
|
27
|
+
<MaterialIcon
|
|
28
|
+
:size="1.2"
|
|
29
|
+
class="delete"
|
|
30
|
+
icon="delete"
|
|
31
|
+
@click="deleteComment(comment.id)"
|
|
32
|
+
/>
|
|
33
|
+
<MaterialIcon :size="1.2" class="save" icon="save" @click="save" />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<RTXEditor
|
|
37
|
+
v-model="editComment.body_html"
|
|
38
|
+
@keydown.meta.enter="save"
|
|
39
|
+
v-if="editComment !== null && editComment?.id === comment.id"
|
|
40
|
+
/>
|
|
41
|
+
<div class="editor-wrapper" v-html="comment.body_html" v-else />
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="new-comment">
|
|
45
|
+
<RTXEditor
|
|
46
|
+
class="comment-input"
|
|
47
|
+
v-model="bodyHtml"
|
|
48
|
+
@keydown.meta.enter="newComment"
|
|
49
|
+
/>
|
|
50
|
+
<Btn icon="send" @click="newComment">
|
|
51
|
+
{{ sendBtnLabel }}
|
|
52
|
+
</Btn>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
67
55
|
</template>
|
|
68
56
|
|
|
69
57
|
<script lang="ts" setup>
|
|
70
|
-
import { onMounted, watch } from
|
|
71
|
-
import { Btn, MaterialIcon, RTXEditor } from
|
|
72
|
-
import { useBagel } from
|
|
58
|
+
import { onMounted, watch } from "vue";
|
|
59
|
+
import { Btn, MaterialIcon, RTXEditor } from "@bagelink/vue";
|
|
60
|
+
import { useBagel } from "..";
|
|
73
61
|
|
|
74
62
|
const bagel = useBagel();
|
|
75
63
|
let comments = $ref<Record<string, any>>([]);
|
|
76
64
|
|
|
77
65
|
interface Comment {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
id: string;
|
|
67
|
+
ref_table: string;
|
|
68
|
+
ref_id: string;
|
|
69
|
+
body_html: string;
|
|
70
|
+
type: "Comment";
|
|
71
|
+
created_at: string;
|
|
72
|
+
updated_at: string;
|
|
85
73
|
}
|
|
86
74
|
let editComment = $ref<Comment | null>(null);
|
|
87
75
|
|
|
88
76
|
const props = defineProps<{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
ref_table: string;
|
|
78
|
+
ref_id: string;
|
|
79
|
+
sendBtnLabel: string;
|
|
92
80
|
}>();
|
|
93
81
|
|
|
94
82
|
const fetchData = async () => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
`comments/${props.ref_table}/${props.ref_id}`,
|
|
98
|
-
));
|
|
83
|
+
comments = [];
|
|
84
|
+
comments = await bagel.get(`comments/${props.ref_table}/${props.ref_id}`);
|
|
99
85
|
};
|
|
100
86
|
|
|
101
87
|
onMounted(fetchData);
|
|
102
88
|
watch(() => props.ref_id, fetchData);
|
|
103
89
|
|
|
104
90
|
const save = async () => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
91
|
+
if (!editComment) return;
|
|
92
|
+
await bagel.put(`comments/${editComment.id}`, editComment);
|
|
93
|
+
void fetchData(); // TODO: Nati: should be awaited?
|
|
94
|
+
editComment = null;
|
|
109
95
|
};
|
|
110
96
|
|
|
111
|
-
let bodyHtml = $ref(
|
|
97
|
+
let bodyHtml = $ref("");
|
|
112
98
|
|
|
113
99
|
const deleteComment = async (id: string) => {
|
|
114
|
-
|
|
115
|
-
|
|
100
|
+
await bagel.delete(`comments/${id}`);
|
|
101
|
+
void fetchData(); // TODO: Nati: should be awaited?
|
|
116
102
|
};
|
|
117
103
|
|
|
118
104
|
const newComment = async () => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
105
|
+
if (!bodyHtml) return;
|
|
106
|
+
await bagel.post("comments", {
|
|
107
|
+
ref_table: props.ref_table,
|
|
108
|
+
ref_id: props.ref_id,
|
|
109
|
+
body_html: bodyHtml,
|
|
110
|
+
type: "Comment",
|
|
111
|
+
});
|
|
112
|
+
bodyHtml = "";
|
|
113
|
+
void fetchData(); // TODO: Nati: should be awaited?
|
|
128
114
|
};
|
|
129
115
|
</script>
|
|
130
116
|
|
|
131
117
|
<style scoped>
|
|
132
118
|
.comments-wrap {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
119
|
+
display: grid;
|
|
120
|
+
grid-template-rows: 1fr 40px;
|
|
121
|
+
height: 100%;
|
|
122
|
+
position: relative;
|
|
123
|
+
gap: 0.5rem;
|
|
138
124
|
}
|
|
139
125
|
|
|
140
126
|
.comments-wrap p {
|
|
141
|
-
|
|
127
|
+
margin: 0;
|
|
142
128
|
}
|
|
143
129
|
|
|
144
130
|
.comments-wrap::before {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
131
|
+
content: "";
|
|
132
|
+
inset-inline-start: 10px;
|
|
133
|
+
top: 0px;
|
|
134
|
+
width: 1px;
|
|
135
|
+
background: var(--border-color);
|
|
136
|
+
position: absolute;
|
|
137
|
+
bottom: 10px;
|
|
152
138
|
}
|
|
153
139
|
|
|
154
140
|
.comment-top {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: baseline;
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
position: relative;
|
|
145
|
+
margin-inline-start: 1rem;
|
|
160
146
|
}
|
|
161
147
|
|
|
162
148
|
.comment-list {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
149
|
+
padding: 0.5rem;
|
|
150
|
+
height: 100%;
|
|
151
|
+
overflow: auto;
|
|
166
152
|
}
|
|
167
153
|
|
|
168
154
|
.comment {
|
|
169
|
-
|
|
155
|
+
margin-bottom: 1rem;
|
|
170
156
|
}
|
|
171
157
|
|
|
172
158
|
.comment-owner {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
159
|
+
font-size: 14px;
|
|
160
|
+
margin-inline-end: 0.5rem;
|
|
161
|
+
color: var(--bgl-gray);
|
|
176
162
|
}
|
|
177
163
|
|
|
178
164
|
.comment-owner::before {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
165
|
+
content: "";
|
|
166
|
+
height: 12px;
|
|
167
|
+
width: 12px;
|
|
168
|
+
border-radius: 100%;
|
|
169
|
+
position: absolute;
|
|
170
|
+
background: var(--bgl-gray);
|
|
171
|
+
inset-inline-start: -1.2rem;
|
|
172
|
+
top: 0.2rem;
|
|
187
173
|
}
|
|
188
174
|
|
|
189
175
|
.me .comment-owner {
|
|
190
|
-
|
|
176
|
+
color: var(--bgl-primary);
|
|
191
177
|
}
|
|
192
178
|
|
|
193
179
|
.me .comment-owner::before {
|
|
194
|
-
|
|
180
|
+
background: var(--bgl-primary);
|
|
195
181
|
}
|
|
196
182
|
|
|
197
183
|
.comment-time {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
184
|
+
color: var(--bgl-gray);
|
|
185
|
+
font-size: 10px;
|
|
186
|
+
white-space: nowrap;
|
|
201
187
|
}
|
|
202
188
|
|
|
203
189
|
.comment-actions {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
190
|
+
background: red;
|
|
191
|
+
line-height: 0;
|
|
192
|
+
display: flex;
|
|
193
|
+
padding: 0 0.5rem;
|
|
194
|
+
flex-grow: 1;
|
|
195
|
+
gap: 0.25rem;
|
|
210
196
|
}
|
|
211
197
|
|
|
212
198
|
.comment .comment-actions .edit {
|
|
213
|
-
|
|
199
|
+
opacity: 0;
|
|
214
200
|
}
|
|
215
201
|
|
|
216
202
|
.comment-actions .edit {
|
|
217
|
-
|
|
203
|
+
margin-inline-end: auto;
|
|
218
204
|
}
|
|
219
205
|
|
|
220
206
|
.comment.me:hover .comment-actions .edit {
|
|
221
|
-
|
|
207
|
+
opacity: 0.4;
|
|
222
208
|
}
|
|
223
209
|
|
|
224
|
-
.comment-actions>div {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
210
|
+
.comment-actions > div {
|
|
211
|
+
transition: all 200ms ease;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
opacity: 0.6;
|
|
228
214
|
}
|
|
229
215
|
|
|
230
|
-
.comment-actions>div:hover {
|
|
231
|
-
|
|
216
|
+
.comment-actions > div:hover {
|
|
217
|
+
color: var(--bgl-primary);
|
|
232
218
|
}
|
|
233
219
|
|
|
234
220
|
.comment-actions .delete:hover {
|
|
235
|
-
|
|
221
|
+
color: var(--bgl-red);
|
|
236
222
|
}
|
|
237
223
|
|
|
238
|
-
.comment-actions>div:active {
|
|
239
|
-
|
|
224
|
+
.comment-actions > div:active {
|
|
225
|
+
filter: brightness(70%);
|
|
240
226
|
}
|
|
241
227
|
|
|
242
228
|
.icon-font.delete,
|
|
243
229
|
.icon-font.save {
|
|
244
|
-
|
|
230
|
+
display: none;
|
|
245
231
|
}
|
|
246
232
|
|
|
247
233
|
.editable .icon-font.delete,
|
|
248
234
|
.editable .icon-font.save {
|
|
249
|
-
|
|
235
|
+
display: block;
|
|
250
236
|
}
|
|
251
237
|
|
|
252
238
|
/* .editor-wrapper { */
|
|
@@ -259,24 +245,24 @@ const newComment = async () => {
|
|
|
259
245
|
/* border-radius: 10px; */
|
|
260
246
|
/* } */
|
|
261
247
|
.editable .editor-wrapper {
|
|
262
|
-
|
|
248
|
+
background-color: var(--input-bg);
|
|
263
249
|
}
|
|
264
250
|
|
|
265
251
|
.new-comment {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
252
|
+
display: flex;
|
|
253
|
+
align-items: flex-end;
|
|
254
|
+
position: relative;
|
|
255
|
+
z-index: 2;
|
|
256
|
+
gap: 0.5rem;
|
|
257
|
+
font-size: 12px;
|
|
258
|
+
color: var(--input-color);
|
|
259
|
+
line-height: 1.6;
|
|
274
260
|
}
|
|
275
261
|
|
|
276
262
|
.comment-input {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
263
|
+
max-height: 100px;
|
|
264
|
+
overflow: auto;
|
|
265
|
+
flex-grow: 1;
|
|
266
|
+
border-radius: var(--btn-border-radius);
|
|
281
267
|
}
|
|
282
268
|
</style>
|
|
@@ -1,126 +1,122 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{{ option }}
|
|
18
|
-
</p>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
2
|
+
<div class="dropdown" @click="toggleDropdown" :class="{ opendrop: isOpen }">
|
|
3
|
+
<div class="dropdown-title">
|
|
4
|
+
{{ selectedOption || placeholder }}
|
|
5
|
+
<MaterialIcon icon="keyboard_arrow_down" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="dropdown-body">
|
|
8
|
+
<p
|
|
9
|
+
v-for="(option, index) in options"
|
|
10
|
+
:key="index"
|
|
11
|
+
@click.stop="selectOption(option as string, index as number)"
|
|
12
|
+
>
|
|
13
|
+
{{ option }}
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
21
17
|
</template>
|
|
22
18
|
|
|
23
19
|
<script setup lang="ts">
|
|
24
|
-
import { ref } from
|
|
25
|
-
import { MaterialIcon } from
|
|
20
|
+
import { ref } from "vue";
|
|
21
|
+
import { MaterialIcon } from "@bagelink/vue";
|
|
26
22
|
|
|
27
23
|
const props = defineProps({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
modelValue: String,
|
|
25
|
+
options: Array,
|
|
26
|
+
placeholder: String,
|
|
31
27
|
});
|
|
32
|
-
const emit = defineEmits([
|
|
28
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
33
29
|
|
|
34
30
|
const isOpen = ref(false);
|
|
35
31
|
const selectedOption = ref(props.modelValue);
|
|
36
32
|
|
|
37
33
|
function toggleDropdown() {
|
|
38
|
-
|
|
34
|
+
isOpen.value = !isOpen.value;
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
function selectOption(option: string, index: number) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
selectedOption.value = option;
|
|
39
|
+
isOpen.value = false;
|
|
40
|
+
emit("update:modelValue", { option, index }); // Emit the selected option value with v-model
|
|
45
41
|
}
|
|
46
42
|
</script>
|
|
47
43
|
|
|
48
44
|
<style>
|
|
49
45
|
.dropdown {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
position: relative;
|
|
47
|
+
font-size: calc(var(--input-font-size) * 1.3);
|
|
48
|
+
width: 50px;
|
|
49
|
+
/* color: var(--bgl-primary); */
|
|
50
|
+
z-index: 1;
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
.dropdown-title {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
border-radius: var(--input-border-radius);
|
|
56
|
+
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
|
|
57
|
+
padding-left: calc(var(--btn-padding) / 2);
|
|
58
|
+
padding-right: calc(var(--btn-padding) / 2);
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
min-height: var(--input-height);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
transition: var(--bgl-transition);
|
|
64
|
+
background: var(--bgl-white);
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
user-select: none;
|
|
67
|
+
position: relative;
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
.open .dropdown {
|
|
75
|
-
|
|
71
|
+
min-width: 120px;
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
.dropdown-title:hover {
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
filter: var(--bgl-hover-filter);
|
|
76
|
+
color: var(--bgl-primary);
|
|
81
77
|
}
|
|
82
78
|
|
|
83
79
|
.dropdown-title:active {
|
|
84
|
-
|
|
80
|
+
filter: var(--bgl-active-filter);
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
.dropdown-body {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
border-radius: var(--input-border-radius);
|
|
85
|
+
position: absolute;
|
|
86
|
+
transition: var(--bgl-transition);
|
|
87
|
+
max-height: 0;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
background: var(--bgl-white);
|
|
90
|
+
inset-inline-start: 0;
|
|
91
|
+
inset-inline-end: 0;
|
|
92
|
+
overflow: auto;
|
|
93
|
+
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
.dropdown-body * {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
97
|
+
display: block;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
padding: calc(var(--btn-padding) / 2);
|
|
100
|
+
padding-bottom: calc(var(--btn-padding) / 4);
|
|
101
|
+
padding-top: calc(var(--btn-padding) / 4);
|
|
102
|
+
color: inherit;
|
|
103
|
+
text-decoration: none;
|
|
104
|
+
line-height: 1;
|
|
105
|
+
transition: var(--bgl-transition);
|
|
106
|
+
box-shadow: 0 -1px 0 0 rgb(0 0 0, 10%);
|
|
107
|
+
z-index: 99999999;
|
|
112
108
|
}
|
|
113
109
|
|
|
114
110
|
.dropdown-body *:hover {
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
filter: var(--bgl-hover-filter);
|
|
112
|
+
color: var(--bgl-primary);
|
|
117
113
|
}
|
|
118
114
|
|
|
119
115
|
.dropdown-body *:active {
|
|
120
|
-
|
|
116
|
+
filter: var(--bgl-active-filter);
|
|
121
117
|
}
|
|
122
118
|
|
|
123
119
|
.dropdown.opendrop .dropdown-body {
|
|
124
|
-
|
|
120
|
+
max-height: 150px;
|
|
125
121
|
}
|
|
126
122
|
</style>
|