@bagelink/vue 1.20.83 → 1.20.87

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.20.83",
4
+ "version": "1.20.87",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -63,7 +63,7 @@
63
63
  "@types/signature_pad": "^4.0.0",
64
64
  "vue": "^3.5.43",
65
65
  "vue-component-type-helpers": "^2.2.12",
66
- "@bagelink/sdk": "1.20.83"
66
+ "@bagelink/sdk": "1.20.87"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@bagelink/sdk": "*",
@@ -303,7 +303,7 @@ onMounted(() => {
303
303
  <label>
304
304
  <span v-if="!hideLabel && (label || (underlined && placeholder))" class="label-text">{{ resolveI18n(label)
305
305
  || resolveI18n(placeholder) }}<span v-if="required"> *</span></span>
306
- <div class="flex gap-05">
306
+ <div class="flex gap-05 min-w-0">
307
307
  <TextInput
308
308
  v-if="searchable && open" ref="searchInput" v-model="searchTerm" class="mb-0"
309
309
  :placeholder="searchPlaceholder" icon="search" :thin @input="selected = false" @click="focusInput"
@@ -318,16 +318,18 @@ onMounted(() => {
318
318
  :aria-expanded="open" :aria-controls="listboxId" :aria-activedescendant="activeOptionId"
319
319
  @keydown.down.prevent="navigate('down')" @keydown.up.prevent="navigate('up')"
320
320
  >
321
- <Icon v-if="icon" :icon="icon" aria-hidden="true" />
322
- <p v-if="!hideLabel" :class="{ 'me-auto ms-05': icon }">
321
+ <Icon v-if="icon" :icon="icon" class="selectinput-btn__icon" aria-hidden="true" />
322
+ <p v-if="!hideLabel" class="selectinput-btn__label" :class="{ 'ms-05': icon }">
323
323
  {{ selectedItemCount > 0 ? selectedLabel : (underlined ? '' : (resolveI18n(placeholder)
324
324
  || 'Select...')) }}
325
325
  </p>
326
326
 
327
- <div v-if="clearable && selectedItemCount > 0" class="ms-auto ps-05 me-05">
328
- <Btn flat thin icon="clear" class="color-gray" @click="selectedItems = []; emitUpdate()" />
329
- </div>
330
- <Icon v-if="!disabled" thin transition="scale" aria-hidden="true" :icon="open ? (underlined ? 'expand_less' : 'unfold_less') : (underlined ? 'expand_more' : 'unfold_more')" />
327
+ <span class="selectinput-btn__actions">
328
+ <span v-if="clearable && selectedItemCount > 0" class="selectinput-btn__clear ps-05">
329
+ <Btn flat thin icon="clear" class="color-gray" @click="selectedItems = []; emitUpdate()" />
330
+ </span>
331
+ <Icon v-if="!disabled" thin transition="scale" class="selectinput-btn__icon" aria-hidden="true" :icon="open ? (underlined ? 'expand_less' : 'unfold_less') : (underlined ? 'expand_more' : 'unfold_more')" />
332
+ </span>
331
333
  </button>
332
334
  <input
333
335
  v-if="required && !underlined" tabindex="-1"
@@ -381,10 +383,6 @@ onMounted(() => {
381
383
 
382
384
  <style scoped>
383
385
 
384
- .selectinput {
385
- width: 100%;
386
- }
387
-
388
386
  .selectinput-option {
389
387
  padding: 6px 12px;
390
388
  cursor: pointer;
@@ -416,7 +414,7 @@ overflow-y: auto;
416
414
  background: var(--bgl-gray-tint);
417
415
  }
418
416
 
419
- .isEmpty p {
417
+ .isEmpty .selectinput-btn__label {
420
418
  opacity: 0.3;
421
419
  }
422
420
 
@@ -429,14 +427,32 @@ background: var(--bgl-selected);
429
427
 
430
428
  <style>
431
429
 
430
+ /* Unscoped: `.selectinput` is applied via Dropdown $attrs on an inner node,
431
+ so scoped selectors (which require this SFC's data-v attr) never match it.
432
+ `width: auto` overrides `.bagel-input { width: 100% }`:
433
+ - block/grid/stretched parents → still fills the slot (forms)
434
+ - flex row with no grow → hugs content (Pagination) */
435
+ .bagel-input.selectinput,
436
+ .selectinput {
437
+ width: auto;
438
+ min-width: 0;
439
+ max-width: 100%;
440
+ }
441
+
442
+ .selectinput > label {
443
+ display: block;
444
+ min-width: 0;
445
+ max-width: 100%;
446
+ }
447
+
432
448
  .bagel-input label {
433
449
  font-size: var(--bgl-label-font-size);
434
450
  }
435
451
 
436
452
  .selectinput-btn {
437
453
  display: flex;
438
- justify-content: space-between;
439
454
  align-items: center;
455
+ gap: 0.25rem;
440
456
  height: var(--bgl-input-height);
441
457
  border-radius: var(--bgl-input-border-radius);
442
458
  border: none;
@@ -444,14 +460,33 @@ background: var(--bgl-input-bg);
444
460
  padding: 0.7rem;
445
461
  color: var(--bgl-input-color);
446
462
  width: 100%;
463
+ min-width: 0;
464
+ max-width: 100%;
465
+ overflow: hidden;
447
466
  font-family: inherit;
448
467
  font-size: var(--bgl-input-font-size);
449
468
  }
450
469
 
451
- .selectinput-btn p {
470
+ /* Grow into free space when the field is wide; shrink + ellipsize when constrained */
471
+ .selectinput-btn__label {
472
+ flex: 1 1 auto;
473
+ min-width: 0;
474
+ margin: 0;
452
475
  white-space: nowrap;
453
476
  overflow: hidden;
454
477
  text-overflow: ellipsis;
478
+ text-align: start;
479
+ }
480
+
481
+ .selectinput-btn__actions {
482
+ display: inline-flex;
483
+ align-items: center;
484
+ flex-shrink: 0;
485
+ }
486
+
487
+ .selectinput-btn__icon,
488
+ .selectinput-btn__clear {
489
+ flex-shrink: 0;
455
490
  }
456
491
 
457
492
  .selectinput-btn.selectinput-btn--xs { height: calc(var(--bgl-input-height) * 0.6); padding: 0 0.4rem; font-size: 0.75em; }