@bagelink/vue 0.0.280 → 0.0.284
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/ComboBox.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +53 -46
- package/dist/index.mjs +53 -46
- package/dist/style.css +530 -268
- package/dist/types/materialIcons.d.ts +1 -1
- package/dist/types/materialIcons.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/ComboBox.vue +10 -6
- package/src/components/form/inputs/SelectInput.vue +23 -21
- package/src/styles/buttons.css +50 -38
- package/src/styles/layout.css +474 -194
- package/src/styles/text.css +80 -38
- package/src/types/materialIcons.ts +1 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<label class="txt-start" :for="id">
|
|
4
|
+
{{ label }}
|
|
5
|
+
<Multiselect
|
|
6
|
+
ref="multiselect" :id="id" label="label" trackBy="value" :options="optionList" :required="required"
|
|
7
|
+
:placeholder="placeholder" v-model="seletValue" :close-on-select="true" v-bind="extraProps"
|
|
8
|
+
/>
|
|
9
|
+
<!-- <input v-model="dataValue" type="hidden" :name="id" :required v-bind="extraProps"> -->
|
|
10
|
+
</label>
|
|
11
|
+
</div>
|
|
10
12
|
</template>
|
|
11
13
|
|
|
12
14
|
<script lang="ts" setup>
|
|
@@ -36,24 +38,24 @@ const emit = defineEmits(['update:modelValue']);
|
|
|
36
38
|
const optionList = $ref<Option[]>([]);
|
|
37
39
|
|
|
38
40
|
const seletValue = $computed({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
get: () => optionList.find((opt) => opt.value === dataValue),
|
|
42
|
+
set: (val?: Option) => {
|
|
43
|
+
dataValue = val?.value;
|
|
44
|
+
emit('update:modelValue', dataValue);
|
|
45
|
+
},
|
|
44
46
|
});
|
|
45
47
|
|
|
46
48
|
function optnToValueLabel(option: RawOption): Option {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if (typeof option === 'string' || typeof option === 'number') {
|
|
50
|
+
return { label: `${option}`, value: option };
|
|
51
|
+
}
|
|
52
|
+
return option;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
function updateOptionList() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
const { options } = props;
|
|
57
|
+
const optnLst = typeof options === 'string' ? options.split('\n|,') : options || [];
|
|
58
|
+
optionList.push(...optnLst.map(optnToValueLabel));
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
watch(() => props.options, updateOptionList, { immediate: true });
|
|
@@ -344,7 +346,7 @@ fieldset[disabled] .multiselect {
|
|
|
344
346
|
border-top: none;
|
|
345
347
|
border-bottom-left-radius: 5px;
|
|
346
348
|
border-bottom-right-radius: 5px;
|
|
347
|
-
z-index:
|
|
349
|
+
z-index: 150;
|
|
348
350
|
-webkit-overflow-scrolling: touch;
|
|
349
351
|
}
|
|
350
352
|
|
package/src/styles/buttons.css
CHANGED
|
@@ -1,59 +1,71 @@
|
|
|
1
1
|
.bgl_btn,
|
|
2
2
|
.bgl_flatBtn,
|
|
3
3
|
.bgl_btn-icon {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
font-family: inherit;
|
|
5
|
+
white-space: nowrap;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
user-select: none;
|
|
9
|
+
border: none;
|
|
10
|
+
transition: var(--bgl-transition);
|
|
11
|
+
border-radius: var(--btn-border-radius);
|
|
12
|
+
line-height: var(--btn-height);
|
|
13
|
+
font-size: var(--input-font-size);
|
|
14
|
+
display: inline-block;
|
|
15
|
+
height: var(--btn-height);
|
|
16
|
+
padding: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.btn-close {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
margin-top: -20px;
|
|
21
|
+
margin-inline-end: -20px;
|
|
22
|
+
margin-inline-start: auto;
|
|
23
|
+
margin-bottom: 15px;
|
|
24
|
+
transition: var(--bgl-transition);
|
|
25
|
+
height: 30px;
|
|
26
|
+
width: 30px;
|
|
27
|
+
opacity: 0.6;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
border-radius: 100%;
|
|
30
|
+
outline: 2px solid transparent;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.btn-close:hover {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
background: var(--bgl-gray-light);
|
|
38
|
+
opacity: 1;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.btn-close:active {
|
|
42
|
-
|
|
42
|
+
background: var(--bgl-gray);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.btn-close::before {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
content: "close";
|
|
47
|
+
font-family: "Material Symbols Outlined", serif;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.bgl_btn.thin {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
height: calc(var(--btn-height) * 0.7);
|
|
52
|
+
line-height: calc(var(--btn-height) * 0.7);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
.hover {
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
transition: all 400ms ease;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.hover:hover {
|
|
61
|
+
filter: brightness(90%);
|
|
59
62
|
}
|
|
63
|
+
|
|
64
|
+
.hover:active {
|
|
65
|
+
filter: brightness(80%);
|
|
66
|
+
}
|
|
67
|
+
@media screen and (max-width: 910px) {
|
|
68
|
+
.bgl_btn {
|
|
69
|
+
padding: 0 20px;
|
|
70
|
+
}
|
|
71
|
+
}
|