@bagelink/vue 1.15.133 → 1.15.135

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.15.133",
4
+ "version": "1.15.135",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { IconType, ThemeType } from '@bagelink/vue'
3
3
  import { Avatar, Icon } from '@bagelink/vue'
4
- import { computed, useAttrs } from 'vue'
4
+ import { computed, useAttrs, useSlots } from 'vue'
5
5
 
6
6
  defineOptions({ inheritAttrs: false })
7
7
 
@@ -51,8 +51,15 @@ const props = withDefaults(
51
51
  }
52
52
  )
53
53
 
54
+ const slots = useSlots()
54
55
  const attrs = useAttrs()
55
56
 
57
+ // Only reserve trailing room for the floating #end meta when there's actually
58
+ // something there (an #end slot, `end` text, or `iconEnd`). Otherwise a plain
59
+ // clickable row (e.g. `<ListItem to=… />` with no trailing content) would carry
60
+ // a wasted 3.5rem inline-end gutter — which reads as a stray "start" pad in RTL.
61
+ const hasEnd = computed(() => Boolean(slots.end || props.end || props.iconEnd))
62
+
56
63
  // Split inherited attrs: event listeners (onClick, onClickStop, …) belong on the
57
64
  // clickable element so handlers + modifiers like `.stop` fire on the actual
58
65
  // button/link row; everything else (class, style, data-*, …) stays on the root
@@ -131,9 +138,9 @@ const bind = computed(() => {
131
138
  <template>
132
139
  <div
133
140
  v-bind="rootAttrs"
134
- class="flex space-between list-item-row bg"
141
+ class="flex space-between list-item-row "
135
142
  :class="[
136
- { 'no-border-list': props.flat || rounded, 'list-item-flush': props.fullWidth, 'list-item-fullrow': isClickable, 'list-item-rounded': rounded, 'list-item-active': active },
143
+ { 'no-border-list': props.flat || rounded, 'list-item-flush': props.fullWidth, 'list-item-fullrow': isClickable, 'list-item-has-end': hasEnd, 'list-item-rounded': rounded, 'list-item-active': active },
137
144
  computedSize ? `list-item-${computedSize}` : '',
138
145
  ]"
139
146
  :style="color ? { '--bgl-list-item-accent': `var(--bgl-${color})` } : undefined"
@@ -233,7 +240,10 @@ padding-inline-end: 0.25rem;
233
240
  .list-item-fullrow .list-item-end :where(button, a, input, select, label, [role="button"], [tabindex]) {
234
241
  pointer-events: auto;
235
242
  }
236
- .list-item-fullrow .list-item { padding-inline-end: var(--bgl-list-item-end-space); }
243
+ /* Reserve trailing room for the floating #end meta ONLY when there's end content
244
+ (see .list-item-has-end). A clickable row with no #end keeps its natural width
245
+ — otherwise it carries a wasted end gutter that looks like a stray start pad. */
246
+ .list-item-fullrow.list-item-has-end .list-item { padding-inline-end: var(--bgl-list-item-end-space); }
237
247
  .list-item-fullrow.list-item-flush .list-item-end { --bgl-list-item-end-inset: 0; }
238
248
  .list-item-row::after {
239
249
  content: '';
@@ -253,6 +263,9 @@ background-color: unset;
253
263
  width: 100%;
254
264
  font: inherit;
255
265
  text-align: inherit;
266
+ /* Zero the UA-default button padding so a clickable <button> row lines up
267
+ flush with router-link/div rows — otherwise it carries a stray inline pad. */
268
+ padding-inline-start: 0;
256
269
  }
257
270
 
258
271
  /* Allow the clickable flex row to shrink below its content's intrinsic width.