@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.
@@ -1,12 +1,14 @@
1
1
  <template>
2
- <div class="pb-1">
3
- <label class="txt-start" :for="id">
4
- {{ label }}
5
- <Multiselect ref="multiselect" :id="id" label="label" trackBy="value" :options="optionList" :required="required"
6
- :placeholder="placeholder" v-model="seletValue" :close-on-select="true" v-bind="extraProps" />
7
- <!-- <input v-model="dataValue" type="hidden" :name="id" :required v-bind="extraProps"> -->
8
- </label>
9
- </div>
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
- get: () => optionList.find((opt) => opt.value === dataValue),
40
- set: (val?: Option) => {
41
- dataValue = val?.value;
42
- emit('update:modelValue', dataValue);
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
- if (typeof option === 'string' || typeof option === 'number') {
48
- return { label: `${option}`, value: option };
49
- }
50
- return option;
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
- const { options } = props;
55
- const optnLst = typeof options === 'string' ? options.split('\n|,') : options || [];
56
- optionList.push(...optnLst.map(optnToValueLabel));
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: 50;
349
+ z-index: 150;
348
350
  -webkit-overflow-scrolling: touch;
349
351
  }
350
352
 
@@ -1,59 +1,71 @@
1
1
  .bgl_btn,
2
2
  .bgl_flatBtn,
3
3
  .bgl_btn-icon {
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;
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
- 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;
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
- background: var(--bgl-gray-light);
38
- opacity: 1;
37
+ background: var(--bgl-gray-light);
38
+ opacity: 1;
39
39
  }
40
40
 
41
41
  .btn-close:active {
42
- background: var(--bgl-gray);
42
+ background: var(--bgl-gray);
43
43
  }
44
44
 
45
45
  .btn-close::before {
46
- content: "close";
47
- font-family: "Material Symbols Outlined", serif;
46
+ content: "close";
47
+ font-family: "Material Symbols Outlined", serif;
48
48
  }
49
49
 
50
50
  .bgl_btn.thin {
51
- height: calc(var(--btn-height) * 0.7);
52
- line-height: calc(var(--btn-height) * 0.7);
51
+ height: calc(var(--btn-height) * 0.7);
52
+ line-height: calc(var(--btn-height) * 0.7);
53
53
  }
54
54
 
55
- @media screen and (max-width: 910px) {
56
- .bgl_btn {
57
- padding: 0 20px;
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
+ }