origam 2.18.10 → 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);
@@ -440,6 +440,24 @@ defineExpose({
440
440
  .origam-btn {
441
441
  $this: &;
442
442
 
443
+ // ⛔ #933 — `display` was never declared here. The root then fell back
444
+ // to the UA default, which for the `<a>` / `<span>` tags `useLink`
445
+ // renders is `inline`. An inline box ignores `height`, `min-width` and
446
+ // vertical `padding`, and it stretches to the full line box — so a Btn
447
+ // dropped into a plain block parent (`<p>`, `<div>`) rendered as a
448
+ // full-width, 15px-tall strip. Every Btn in this DS *looked* correct
449
+ // only because its parent happened to be a flex/grid container, which
450
+ // blockifies the child: measured on the marketing site, all 9 visible
451
+ // Btn roots computed `display: block` with a `display: flex` parent,
452
+ // and the single Btn inside a `<p>` computed `inline` at 984px wide.
453
+ //
454
+ // `inline-block` is the value the rest of this rule already assumed —
455
+ // `vertical-align: middle` right below only has meaning on an
456
+ // inline-level box. It is also the safest: inside a flex/grid parent it
457
+ // blockifies to `block`, i.e. byte-for-byte today's computed value, so
458
+ // no existing layout moves. `&--block` still overrides it with `flex`.
459
+ display: inline-block;
460
+
443
461
  position: var(--origam-btn---position, relative);
444
462
  vertical-align: middle;
445
463
  flex-shrink: 0;
@@ -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);
@@ -355,7 +355,16 @@ defineExpose({
355
355
  }
356
356
 
357
357
  &--nav {
358
- --origam-list---padding-inline: 8px;
358
+ // ⛔ #934 — this used to declare `--origam-list---padding-inline`,
359
+ // a name NOTHING reads. A custom property is not a shorthand: it
360
+ // expands to nothing, so `padding-inline-start/end` above kept
361
+ // resolving to the sheet's `--origam-space---0`. Measured on the
362
+ // marketing appbar menu across all 8 identities: list inline
363
+ // padding `0px/0px`, so the rows ran edge-to-edge inside the menu
364
+ // and their hover surface was clipped by the menu's own corner
365
+ // radius. The two longhands are the names the base rule reads.
366
+ --origam-list---padding-inline-start: var(--origam-space---2, 8px);
367
+ --origam-list---padding-inline-end: var(--origam-space---2, 8px);
359
368
  --origam-list-subheader---font-size: var(--origam-list__subheader---nav-font-size, 0.75rem);
360
369
  --origam-list---indent-padding: var(--origam-list---indent-padding-nav, -8px);
361
370
  }
@@ -626,7 +626,12 @@ defineExpose({
626
626
  }
627
627
 
628
628
  &--nav {
629
- --origam-list-item---padding-inline: 8px;
629
+ // ⛔ #934 — same dead name as `.origam-list--nav` carried:
630
+ // `--origam-list-item---padding-inline` is read nowhere. The base
631
+ // rule reads the two longhands, inside a `calc()` that also folds
632
+ // in indent and density, so they go in here under the same names.
633
+ --origam-list-item---padding-inline-start: var(--origam-space---2, 8px);
634
+ --origam-list-item---padding-inline-end: var(--origam-space---2, 8px);
630
635
 
631
636
  &:not(:only-child) {
632
637
  --origam-list-item---margin-block-end: 4px;
@@ -473,6 +473,44 @@ defineExpose({
473
473
  }
474
474
  }
475
475
  }
476
+
477
+ /*
478
+ * ⛔ MEASURED (Chromium, /why-origam demo, all 8 marketing identities,
479
+ * light + dark, checked + unchecked): `OrigamSelectionControl`'s shared
480
+ * `&--focus-visible` rule draws its outline on
481
+ * `.origam-selection-control__input` — a ~28px square hit-area that is
482
+ * a SIBLING of `.origam-switch-track` (rendered via the `default`
483
+ * slot), never a descendant. The track's `overflow: hidden` therefore
484
+ * can never clip that outline, and because the square hit-area is
485
+ * already taller than the track (24px default / 32px inset) and offset
486
+ * by the thumb's hardcoded ±10px `translateX`, the ring visibly
487
+ * detaches from the track: 8px past its top/bottom edge and 8px past
488
+ * whichever side the thumb isn't currently near (right when ON, left
489
+ * when OFF) on every identity, `material` included — its own
490
+ * screenshot simply wasn't captured while focused.
491
+ *
492
+ * For Checkbox/Radio the square hit-area IS the visible control, so
493
+ * the shared rule is correct there and stays untouched
494
+ * (`OrigamSelectionControl.vue` is not modified). For Switch the
495
+ * visible control is the elongated track, so the ring is moved onto
496
+ * `.origam-switch-track` instead — same two tokens the shared rule
497
+ * already reads (`--origam-border__width---2`,
498
+ * `--origam-color__border---focus`), just retargeted to the shape a
499
+ * switch actually is. Native `outline` already follows an element's
500
+ * own `border-radius` in every supported browser, so the ring traces
501
+ * the track's real shape (pill / rounded / square per `rounded` prop)
502
+ * with no extra CSS.
503
+ */
504
+ &--focus-visible {
505
+ :deep(.origam-selection-control__input) {
506
+ outline: none;
507
+ }
508
+
509
+ :deep(.origam-switch-track) {
510
+ outline: var(--origam-border__width---2, 2px) solid var(--origam-color__border---focus, currentColor);
511
+ outline-offset: var(--origam-space---1, 2px);
512
+ }
513
+ }
476
514
  }
477
515
 
478
516
  &.origam-input {