quasar-ui-sellmate-ui-kit 3.14.4 → 3.14.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-sellmate-ui-kit",
3
- "version": "3.14.4",
3
+ "version": "3.14.6",
4
4
  "author": "Sellmate Dev Team <dev@sellmate.co.kr>",
5
5
  "description": "Sellmate UI Kit",
6
6
  "license": "MIT",
@@ -60,6 +60,7 @@
60
60
 
61
61
  // TODO: hover 색 맞추기
62
62
  .s-button {
63
+ font-weight: $font-weight-md;
63
64
  &.q-btn {
64
65
  min-height: 0;
65
66
  height: fit-content;
@@ -114,16 +115,11 @@
114
115
  }
115
116
  }
116
117
  }
117
- &.bg-primary,
118
- &.bg-Blue_B_Darken-3 {
119
- font-weight: $font-weight-md !important;
120
- }
121
118
  }
122
119
  .s-button-xs {
123
120
  &.q-btn {
124
121
  height: 24px;
125
122
  padding: $button-padding-xs;
126
- font-weight: $default-font-weight;
127
123
  font-size: $default-font;
128
124
  line-height: $default-content-height;
129
125
  min-width: 60px;
@@ -153,7 +149,6 @@
153
149
  &.q-btn {
154
150
  height: 28px;
155
151
  padding: $button-padding-sm;
156
- font-weight: $default-font-weight;
157
152
  font-size: $default-font;
158
153
  line-height: $default-content-height;
159
154
  min-width: 70px;
@@ -181,7 +176,6 @@
181
176
  }
182
177
  .s-button-md {
183
178
  padding: $button-padding-md;
184
- font-weight: $default-font-weight;
185
179
  font-size: $font-md;
186
180
  line-height: $line-height-md;
187
181
  min-width: 100px;
@@ -206,7 +200,9 @@
206
200
  max-height: $line-height-md;
207
201
  }
208
202
  }
209
-
203
+ .s-button.q-btn--outline {
204
+ font-weight: $default-font-weight;
205
+ }
210
206
  .s-button.q-btn--outline.disabled,
211
207
  .s-button.disabled {
212
208
  background: $Grey_Lighten-3 !important;
@@ -218,6 +214,7 @@
218
214
  }
219
215
  }
220
216
  .s-button.text-only {
217
+ font-weight: $default-font-weight;
221
218
  background: none !important;
222
219
  padding: 0 !important;
223
220
  min-width: 0;
@@ -51,7 +51,10 @@
51
51
  </q-item-section>
52
52
  </q-item>
53
53
  </template>
54
- <template v-if="(options.length && !model) || (noSelected && !options.length)" #selected>
54
+ <template
55
+ v-if="(options && options.length && !model) || (noSelected && options && !options.length)"
56
+ #selected
57
+ >
55
58
  <div v-if="noSelected && !options.length">{{ noSelected }}</div>
56
59
  <div v-else>
57
60
  {{ placeholder }}
@@ -130,7 +133,7 @@
130
133
  setup(props, { emit }) {
131
134
  const id = useId();
132
135
  const model = ref(props.modelValue);
133
- const filteredOptions = ref(props.options);
136
+ const filteredOptions = ref(props.options || []);
134
137
  const findLabel = () =>
135
138
  props.options.find(opt => opt[props.optionValue] === props.modelValue)[props.optionLabel] ||
136
139
  '';
@@ -145,29 +148,32 @@
145
148
  }
146
149
 
147
150
  function handleInput(val) {
151
+ if (!sSelectRef.value) return;
152
+
148
153
  search.value = val;
149
154
  sSelectRef.value.setOptionIndex(-1);
150
155
 
151
- if (!val) {
156
+ if (!val && props.options) {
152
157
  filteredOptions.value = props.options;
153
158
  sSelectRef.value.setOptionIndex(-1);
154
159
  }
155
160
  }
156
161
 
157
162
  function handleDelete() {
163
+ if (!sSelectRef.value) return;
158
164
  sSelectRef.value.setOptionIndex(-1);
159
165
  search.value = '';
160
166
  emit('onSearch', '');
161
167
  }
162
168
 
163
169
  const onSearch = debounce(val => {
164
- if (!val) {
170
+ if (!val && props.options) {
165
171
  filteredOptions.value = props.options;
166
172
  return;
167
173
  }
168
174
 
169
175
  // 옵션을 선택 했을 때
170
- if (sSelectRef.value.getOptionIndex() !== -1) {
176
+ if (sSelectRef.value && sSelectRef.value.getOptionIndex() !== -1) {
171
177
  model.value = filteredOptions.value[sSelectRef.value.getOptionIndex()][props.optionValue];
172
178
  handleDelete();
173
179
  sSelectRef.value.setOptionIndex(-1);
@@ -179,7 +185,7 @@
179
185
  v => (v[props.optionLabel] || v).toLowerCase().indexOf(val.toLowerCase()) > -1,
180
186
  );
181
187
 
182
- if (!filtered.length) {
188
+ if (!filtered.length && sSelectRef.value) {
183
189
  emit('onSearch', val);
184
190
  sSelectRef.value.setOptionIndex(-1);
185
191
  return;
@@ -192,7 +198,7 @@
192
198
  () => props.modelValue,
193
199
  val => {
194
200
  model.value = val;
195
- sSelectRef.value.setOptionIndex(-1);
201
+ if (sSelectRef.value) sSelectRef.value.setOptionIndex(-1);
196
202
  },
197
203
  );
198
204
 
@@ -206,8 +212,10 @@
206
212
  // const existingValues = new Set(filteredOptions.value.map((option) => option.value));
207
213
  // const nonDuplicateOptions = val.filter((option) => !existingValues.has(option.value));
208
214
  // filteredOptions.value.push(...nonDuplicateOptions);
209
- filteredOptions.value = val;
210
- sSelectRef.value.setOptionIndex(-1);
215
+ if (val) {
216
+ filteredOptions.value = val;
217
+ if (sSelectRef.value) sSelectRef.value.setOptionIndex(-1);
218
+ }
211
219
  },
212
220
  { deep: true },
213
221
  );