origam 2.18.11 → 2.18.12

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.
@@ -448,6 +448,8 @@
448
448
  --origam-chip__close---max-width: 18px;
449
449
  --origam-chip__close---user-select: none;
450
450
  --origam-chip__close---flex: 0 1 auto;
451
+ --origam-chip__prepend---margin-inline-end: 6px;
452
+ --origam-chip__append---margin-inline-start: 6px;
451
453
  --origam-chip__filter---transition-property: transform, opacity;
452
454
  --origam-chip__filter---transition-duration: var(--origam-motion__duration---normal);
453
455
  --origam-chip__filter---transition-timing-function: var(--origam-motion__easing---standard);
@@ -3190,6 +3192,8 @@
3190
3192
  --origam-chip__close---max-width: 18px;
3191
3193
  --origam-chip__close---user-select: none;
3192
3194
  --origam-chip__close---flex: 0 1 auto;
3195
+ --origam-chip__prepend---margin-inline-end: 6px;
3196
+ --origam-chip__append---margin-inline-start: 6px;
3193
3197
  --origam-chip__filter---transition-property: transform, opacity;
3194
3198
  --origam-chip__filter---transition-duration: var(--origam-motion__duration---normal);
3195
3199
  --origam-chip__filter---transition-timing-function: var(--origam-motion__easing---standard);
@@ -350,6 +350,8 @@
350
350
  --origam-chip__close---max-width: 18px;
351
351
  --origam-chip__close---user-select: none;
352
352
  --origam-chip__close---flex: 0 1 auto;
353
+ --origam-chip__prepend---margin-inline-end: 6px;
354
+ --origam-chip__append---margin-inline-start: 6px;
353
355
  --origam-chip__filter---transition-property: transform, opacity;
354
356
  --origam-chip__filter---transition-duration: var(--origam-motion__duration---normal);
355
357
  --origam-chip__filter---transition-timing-function: var(--origam-motion__easing---standard);
@@ -448,6 +448,8 @@
448
448
  --origam-chip__close---max-width: 18px;
449
449
  --origam-chip__close---user-select: none;
450
450
  --origam-chip__close---flex: 0 1 auto;
451
+ --origam-chip__prepend---margin-inline-end: 6px;
452
+ --origam-chip__append---margin-inline-start: 6px;
451
453
  --origam-chip__filter---transition-property: transform, opacity;
452
454
  --origam-chip__filter---transition-duration: var(--origam-motion__duration---normal);
453
455
  --origam-chip__filter---transition-timing-function: var(--origam-motion__easing---standard);
@@ -3190,6 +3192,8 @@
3190
3192
  --origam-chip__close---max-width: 18px;
3191
3193
  --origam-chip__close---user-select: none;
3192
3194
  --origam-chip__close---flex: 0 1 auto;
3195
+ --origam-chip__prepend---margin-inline-end: 6px;
3196
+ --origam-chip__append---margin-inline-start: 6px;
3193
3197
  --origam-chip__filter---transition-property: transform, opacity;
3194
3198
  --origam-chip__filter---transition-duration: var(--origam-motion__duration---normal);
3195
3199
  --origam-chip__filter---transition-timing-function: var(--origam-motion__easing---standard);
@@ -350,6 +350,8 @@
350
350
  --origam-chip__close---max-width: 18px;
351
351
  --origam-chip__close---user-select: none;
352
352
  --origam-chip__close---flex: 0 1 auto;
353
+ --origam-chip__prepend---margin-inline-end: 6px;
354
+ --origam-chip__append---margin-inline-start: 6px;
353
355
  --origam-chip__filter---transition-property: transform, opacity;
354
356
  --origam-chip__filter---transition-duration: var(--origam-motion__duration---normal);
355
357
  --origam-chip__filter---transition-timing-function: var(--origam-motion__easing---standard);
@@ -435,6 +435,44 @@ defineExpose({
435
435
  display: inline-flex;
436
436
  }
437
437
 
438
+ // #957 — `__close` owned both of its margin channels since forever;
439
+ // `__prepend` / `__append` owned NEITHER, so a chip with an icon
440
+ // rendered it glued to its label (measured: 0px, `margin-inline-end:
441
+ // 0px`, `gap: normal`, on all 8 identities) and no theme could fix it
442
+ // — the channel had never been opened. Default 6px is not a new design
443
+ // value: it is `--origam-chip__close---margin-inline-start`'s, i.e.
444
+ // the component's own precedent for "gutter between an affix and the
445
+ // label".
446
+ //
447
+ // ⛔ The gutter is CONDITIONAL on the label being non-empty, and that
448
+ // is the whole difficulty. `__content` has NO `v-if`: an icon-only
449
+ // chip (`<origam-chip prepend-icon="…"/>`, no text, no default slot)
450
+ // still renders `<div class="origam-chip__content">` holding the
451
+ // empty text node Vue emits for `{{ text }}`. An unconditional margin
452
+ // would therefore hang a 6px PHANTOM gutter off the trailing edge of
453
+ // every icon-only chip, in 217 places. Measured in Chromium, which is
454
+ // what makes `:empty` the right discriminator here:
455
+ //
456
+ // content = "text" → :empty false → gutter 6px
457
+ // content = <div></div> → :empty true → gutter 0px
458
+ // content = empty text node (Vue!) → :empty true → gutter 0px
459
+ // content = " " (one space) → :empty false → gutter 6px
460
+ //
461
+ // `__prepend` needs `:has(+ …)` because the element it depends on is
462
+ // its FOLLOWING sibling; `__append` reads its PRECEDING sibling, so a
463
+ // plain `+` combinator suffices. Both keep the declaration on the
464
+ // element the token NAMES, so `--origam-chip__prepend---*` stays
465
+ // readable as "the prepend zone's own margin". Where `:has()` is
466
+ // unsupported the prepend gutter is simply absent — today's rendering,
467
+ // not a regression.
468
+ &__prepend:has(+ #{$this}__content:not(:empty)) {
469
+ margin-inline-end: var(--origam-chip__prepend---margin-inline-end, 6px);
470
+ }
471
+
472
+ &__content:not(:empty) + &__append {
473
+ margin-inline-start: var(--origam-chip__append---margin-inline-start, 6px);
474
+ }
475
+
438
476
  &__close {
439
477
  cursor: var(--origam-chip__close---cursor, pointer);
440
478
  flex: var(--origam-chip__close---flex, 0 1 auto);