origam 2.18.9 → 2.18.11
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/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +10 -4
- package/dist/src/assets/css/tokens/light.css +15 -2
- package/dist/src/assets/scss/tokens/_dark.scss +10 -4
- package/dist/src/assets/scss/tokens/_light.scss +15 -2
- package/dist/src/components/Btn/OrigamBtn.vue +18 -0
- package/dist/src/components/List/OrigamList.vue +10 -1
- package/dist/src/components/List/OrigamListItem.vue +6 -1
- package/dist/src/components/Switch/OrigamSwitch.vue +38 -0
- package/package.json +1 -1
|
@@ -2158,7 +2158,8 @@
|
|
|
2158
2158
|
--origam-switch__track---width: 44px;
|
|
2159
2159
|
--origam-switch__track---height: 24px;
|
|
2160
2160
|
--origam-switch__track---border-radius: var(--origam-radius---full);
|
|
2161
|
-
|
|
2161
|
+
/* #919 — track-vs-page mesure 1.06-1.83:1 sur les 16 combos identite x mode (Playwright/Chromium) quand ce token vaut surface---disabled : la teinte est visuellement trop proche de la page dans les 8 identites. Derive de text---primary (garanti contraste contre la page par la lisibilite du texte) via color-mix ; comme le pouce par defaut vaut surface---default (= la page), il herite automatiquement du meme contraste contre ce nouveau track. Pire cas remesure apres correctif (cartoon|light) : 3.90:1. */
|
|
2162
|
+
--origam-switch__track---background-color: color-mix(in srgb, var(--origam-color__text---primary) 60%, var(--origam-color__surface---default));
|
|
2162
2163
|
--origam-switch__track---background-color-checked: var(--origam-color__action--primary---bg);
|
|
2163
2164
|
--origam-switch__track---background-color-disabled: var(--origam-color__surface---disabled);
|
|
2164
2165
|
--origam-switch__track---background-color-error: var(--origam-color__feedback--danger---bg);
|
|
@@ -2171,7 +2172,9 @@
|
|
|
2171
2172
|
--origam-switch__thumb---background-color: var(--origam-color__surface---default);
|
|
2172
2173
|
--origam-switch__thumb---background-color-checked: var(--origam-color__surface---default);
|
|
2173
2174
|
--origam-switch__thumb---background-color-disabled: var(--origam-color__surface---overlay);
|
|
2174
|
-
|
|
2175
|
+
/* #919 point 5 — voir light.css pour l'explication complete (pouce invisible
|
|
2176
|
+
sur le rail en erreur, 1.00:1 mesure ; revient a surface---default). */
|
|
2177
|
+
--origam-switch__thumb---background-color-error: var(--origam-color__surface---default);
|
|
2175
2178
|
--origam-switch__thumb---color-error: var(--origam-color__feedback--danger---fg);
|
|
2176
2179
|
--origam-switch__thumb---box-shadow: var(--origam-shadow---sm);
|
|
2177
2180
|
--origam-switch__thumb---border-radius: var(--origam-radius---full);
|
|
@@ -4896,7 +4899,8 @@
|
|
|
4896
4899
|
--origam-switch__track---width: 44px;
|
|
4897
4900
|
--origam-switch__track---height: 24px;
|
|
4898
4901
|
--origam-switch__track---border-radius: var(--origam-radius---full);
|
|
4899
|
-
|
|
4902
|
+
/* #919 — track-vs-page mesure 1.06-1.83:1 sur les 16 combos identite x mode (Playwright/Chromium) quand ce token vaut surface---disabled : la teinte est visuellement trop proche de la page dans les 8 identites. Derive de text---primary (garanti contraste contre la page par la lisibilite du texte) via color-mix ; comme le pouce par defaut vaut surface---default (= la page), il herite automatiquement du meme contraste contre ce nouveau track. Pire cas remesure apres correctif (cartoon|light) : 3.90:1. */
|
|
4903
|
+
--origam-switch__track---background-color: color-mix(in srgb, var(--origam-color__text---primary) 60%, var(--origam-color__surface---default));
|
|
4900
4904
|
--origam-switch__track---background-color-checked: var(--origam-color__action--primary---bg);
|
|
4901
4905
|
--origam-switch__track---background-color-disabled: var(--origam-color__surface---disabled);
|
|
4902
4906
|
--origam-switch__track---background-color-error: var(--origam-color__feedback--danger---bg);
|
|
@@ -4909,7 +4913,9 @@
|
|
|
4909
4913
|
--origam-switch__thumb---background-color: var(--origam-color__surface---default);
|
|
4910
4914
|
--origam-switch__thumb---background-color-checked: var(--origam-color__surface---default);
|
|
4911
4915
|
--origam-switch__thumb---background-color-disabled: var(--origam-color__surface---overlay);
|
|
4912
|
-
|
|
4916
|
+
/* #919 point 5 — voir light.css pour l'explication complete (pouce invisible
|
|
4917
|
+
sur le rail en erreur, 1.00:1 mesure ; revient a surface---default). */
|
|
4918
|
+
--origam-switch__thumb---background-color-error: var(--origam-color__surface---default);
|
|
4913
4919
|
--origam-switch__thumb---color-error: var(--origam-color__feedback--danger---fg);
|
|
4914
4920
|
--origam-switch__thumb---box-shadow: var(--origam-shadow---sm);
|
|
4915
4921
|
--origam-switch__thumb---border-radius: var(--origam-radius---full);
|
|
@@ -2064,7 +2064,8 @@
|
|
|
2064
2064
|
--origam-switch__track---width: 44px;
|
|
2065
2065
|
--origam-switch__track---height: 24px;
|
|
2066
2066
|
--origam-switch__track---border-radius: var(--origam-radius---full);
|
|
2067
|
-
|
|
2067
|
+
/* #919 — track-vs-page mesure 1.06-1.83:1 sur les 16 combos identite x mode (Playwright/Chromium) quand ce token vaut surface---disabled : la teinte est visuellement trop proche de la page dans les 8 identites. Derive de text---primary (garanti contraste contre la page par la lisibilite du texte) via color-mix ; comme le pouce par defaut vaut surface---default (= la page), il herite automatiquement du meme contraste contre ce nouveau track. Pire cas remesure apres correctif (cartoon|light) : 3.90:1. */
|
|
2068
|
+
--origam-switch__track---background-color: color-mix(in srgb, var(--origam-color__text---primary) 60%, var(--origam-color__surface---default));
|
|
2068
2069
|
--origam-switch__track---background-color-checked: var(--origam-color__action--primary---bg);
|
|
2069
2070
|
--origam-switch__track---background-color-disabled: var(--origam-color__surface---disabled);
|
|
2070
2071
|
--origam-switch__track---background-color-error: var(--origam-color__feedback--danger---bg);
|
|
@@ -2077,7 +2078,19 @@
|
|
|
2077
2078
|
--origam-switch__thumb---background-color: var(--origam-color__surface---default);
|
|
2078
2079
|
--origam-switch__thumb---background-color-checked: var(--origam-color__surface---default);
|
|
2079
2080
|
--origam-switch__thumb---background-color-disabled: var(--origam-color__surface---overlay);
|
|
2080
|
-
|
|
2081
|
+
/* #919 point 5 (etats non mesures) — le pouce et le rail utilisaient le MEME
|
|
2082
|
+
token (danger---bg) : pouce totalement invisible sur le rail en erreur,
|
|
2083
|
+
ratio 1.00:1 mesure sur les 16 configs (Playwright/Chromium, `switch-error`
|
|
2084
|
+
dans why-origam-contrast.audit.mjs). Le pouce revient a surface---default —
|
|
2085
|
+
le MEME token que le pouce par defaut (non colore) — au lieu de copier la
|
|
2086
|
+
couleur du rail. Note : `--origam-switch__thumb---color-error` (icone/texte
|
|
2087
|
+
DANS le pouce, applique par le meme selecteur SCSS) reste danger---fg
|
|
2088
|
+
(blanc) ; s'il n'y a pas d'icone (cas par defaut), cette valeur ne peint
|
|
2089
|
+
rien de visible et ne cree aucun conflit. Avec un `icon` explicite EN PLUS
|
|
2090
|
+
de `error`, l'icone blanche perdrait en lisibilite sur un pouce clair en
|
|
2091
|
+
light — combinaison rare, non couverte ici, a traiter separement si elle
|
|
2092
|
+
se presente. */
|
|
2093
|
+
--origam-switch__thumb---background-color-error: var(--origam-color__surface---default);
|
|
2081
2094
|
--origam-switch__thumb---color-error: var(--origam-color__feedback--danger---fg);
|
|
2082
2095
|
--origam-switch__thumb---box-shadow: var(--origam-shadow---sm);
|
|
2083
2096
|
--origam-switch__thumb---border-radius: var(--origam-radius---full);
|
|
@@ -2158,7 +2158,8 @@
|
|
|
2158
2158
|
--origam-switch__track---width: 44px;
|
|
2159
2159
|
--origam-switch__track---height: 24px;
|
|
2160
2160
|
--origam-switch__track---border-radius: var(--origam-radius---full);
|
|
2161
|
-
|
|
2161
|
+
/* #919 — track-vs-page mesure 1.06-1.83:1 sur les 16 combos identite x mode (Playwright/Chromium) quand ce token vaut surface---disabled : la teinte est visuellement trop proche de la page dans les 8 identites. Derive de text---primary (garanti contraste contre la page par la lisibilite du texte) via color-mix ; comme le pouce par defaut vaut surface---default (= la page), il herite automatiquement du meme contraste contre ce nouveau track. Pire cas remesure apres correctif (cartoon|light) : 3.90:1. */
|
|
2162
|
+
--origam-switch__track---background-color: color-mix(in srgb, var(--origam-color__text---primary) 60%, var(--origam-color__surface---default));
|
|
2162
2163
|
--origam-switch__track---background-color-checked: var(--origam-color__action--primary---bg);
|
|
2163
2164
|
--origam-switch__track---background-color-disabled: var(--origam-color__surface---disabled);
|
|
2164
2165
|
--origam-switch__track---background-color-error: var(--origam-color__feedback--danger---bg);
|
|
@@ -2171,7 +2172,9 @@
|
|
|
2171
2172
|
--origam-switch__thumb---background-color: var(--origam-color__surface---default);
|
|
2172
2173
|
--origam-switch__thumb---background-color-checked: var(--origam-color__surface---default);
|
|
2173
2174
|
--origam-switch__thumb---background-color-disabled: var(--origam-color__surface---overlay);
|
|
2174
|
-
|
|
2175
|
+
/* #919 point 5 — voir light.css pour l'explication complete (pouce invisible
|
|
2176
|
+
sur le rail en erreur, 1.00:1 mesure ; revient a surface---default). */
|
|
2177
|
+
--origam-switch__thumb---background-color-error: var(--origam-color__surface---default);
|
|
2175
2178
|
--origam-switch__thumb---color-error: var(--origam-color__feedback--danger---fg);
|
|
2176
2179
|
--origam-switch__thumb---box-shadow: var(--origam-shadow---sm);
|
|
2177
2180
|
--origam-switch__thumb---border-radius: var(--origam-radius---full);
|
|
@@ -4896,7 +4899,8 @@
|
|
|
4896
4899
|
--origam-switch__track---width: 44px;
|
|
4897
4900
|
--origam-switch__track---height: 24px;
|
|
4898
4901
|
--origam-switch__track---border-radius: var(--origam-radius---full);
|
|
4899
|
-
|
|
4902
|
+
/* #919 — track-vs-page mesure 1.06-1.83:1 sur les 16 combos identite x mode (Playwright/Chromium) quand ce token vaut surface---disabled : la teinte est visuellement trop proche de la page dans les 8 identites. Derive de text---primary (garanti contraste contre la page par la lisibilite du texte) via color-mix ; comme le pouce par defaut vaut surface---default (= la page), il herite automatiquement du meme contraste contre ce nouveau track. Pire cas remesure apres correctif (cartoon|light) : 3.90:1. */
|
|
4903
|
+
--origam-switch__track---background-color: color-mix(in srgb, var(--origam-color__text---primary) 60%, var(--origam-color__surface---default));
|
|
4900
4904
|
--origam-switch__track---background-color-checked: var(--origam-color__action--primary---bg);
|
|
4901
4905
|
--origam-switch__track---background-color-disabled: var(--origam-color__surface---disabled);
|
|
4902
4906
|
--origam-switch__track---background-color-error: var(--origam-color__feedback--danger---bg);
|
|
@@ -4909,7 +4913,9 @@
|
|
|
4909
4913
|
--origam-switch__thumb---background-color: var(--origam-color__surface---default);
|
|
4910
4914
|
--origam-switch__thumb---background-color-checked: var(--origam-color__surface---default);
|
|
4911
4915
|
--origam-switch__thumb---background-color-disabled: var(--origam-color__surface---overlay);
|
|
4912
|
-
|
|
4916
|
+
/* #919 point 5 — voir light.css pour l'explication complete (pouce invisible
|
|
4917
|
+
sur le rail en erreur, 1.00:1 mesure ; revient a surface---default). */
|
|
4918
|
+
--origam-switch__thumb---background-color-error: var(--origam-color__surface---default);
|
|
4913
4919
|
--origam-switch__thumb---color-error: var(--origam-color__feedback--danger---fg);
|
|
4914
4920
|
--origam-switch__thumb---box-shadow: var(--origam-shadow---sm);
|
|
4915
4921
|
--origam-switch__thumb---border-radius: var(--origam-radius---full);
|
|
@@ -2064,7 +2064,8 @@
|
|
|
2064
2064
|
--origam-switch__track---width: 44px;
|
|
2065
2065
|
--origam-switch__track---height: 24px;
|
|
2066
2066
|
--origam-switch__track---border-radius: var(--origam-radius---full);
|
|
2067
|
-
|
|
2067
|
+
/* #919 — track-vs-page mesure 1.06-1.83:1 sur les 16 combos identite x mode (Playwright/Chromium) quand ce token vaut surface---disabled : la teinte est visuellement trop proche de la page dans les 8 identites. Derive de text---primary (garanti contraste contre la page par la lisibilite du texte) via color-mix ; comme le pouce par defaut vaut surface---default (= la page), il herite automatiquement du meme contraste contre ce nouveau track. Pire cas remesure apres correctif (cartoon|light) : 3.90:1. */
|
|
2068
|
+
--origam-switch__track---background-color: color-mix(in srgb, var(--origam-color__text---primary) 60%, var(--origam-color__surface---default));
|
|
2068
2069
|
--origam-switch__track---background-color-checked: var(--origam-color__action--primary---bg);
|
|
2069
2070
|
--origam-switch__track---background-color-disabled: var(--origam-color__surface---disabled);
|
|
2070
2071
|
--origam-switch__track---background-color-error: var(--origam-color__feedback--danger---bg);
|
|
@@ -2077,7 +2078,19 @@
|
|
|
2077
2078
|
--origam-switch__thumb---background-color: var(--origam-color__surface---default);
|
|
2078
2079
|
--origam-switch__thumb---background-color-checked: var(--origam-color__surface---default);
|
|
2079
2080
|
--origam-switch__thumb---background-color-disabled: var(--origam-color__surface---overlay);
|
|
2080
|
-
|
|
2081
|
+
/* #919 point 5 (etats non mesures) — le pouce et le rail utilisaient le MEME
|
|
2082
|
+
token (danger---bg) : pouce totalement invisible sur le rail en erreur,
|
|
2083
|
+
ratio 1.00:1 mesure sur les 16 configs (Playwright/Chromium, `switch-error`
|
|
2084
|
+
dans why-origam-contrast.audit.mjs). Le pouce revient a surface---default —
|
|
2085
|
+
le MEME token que le pouce par defaut (non colore) — au lieu de copier la
|
|
2086
|
+
couleur du rail. Note : `--origam-switch__thumb---color-error` (icone/texte
|
|
2087
|
+
DANS le pouce, applique par le meme selecteur SCSS) reste danger---fg
|
|
2088
|
+
(blanc) ; s'il n'y a pas d'icone (cas par defaut), cette valeur ne peint
|
|
2089
|
+
rien de visible et ne cree aucun conflit. Avec un `icon` explicite EN PLUS
|
|
2090
|
+
de `error`, l'icone blanche perdrait en lisibilite sur un pouce clair en
|
|
2091
|
+
light — combinaison rare, non couverte ici, a traiter separement si elle
|
|
2092
|
+
se presente. */
|
|
2093
|
+
--origam-switch__thumb---background-color-error: var(--origam-color__surface---default);
|
|
2081
2094
|
--origam-switch__thumb---color-error: var(--origam-color__feedback--danger---fg);
|
|
2082
2095
|
--origam-switch__thumb---box-shadow: var(--origam-shadow---sm);
|
|
2083
2096
|
--origam-switch__thumb---border-radius: var(--origam-radius---full);
|
|
@@ -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;
|
|
@@ -355,7 +355,16 @@ defineExpose({
|
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
&--nav {
|
|
358
|
-
|
|
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
|
-
|
|
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 {
|