@pokela/components 2.0.0 → 2.1.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pokela/components
2
2
 
3
- React-komponentit: **Pokela Design System**, versio 2.0.0.
3
+ React-komponentit: **Pokela Design System**, versio 2.1.0.
4
4
 
5
5
  > Generoitu hakemistosta `components/` — samoista tiedostoista joita sivusto
6
6
  > ajaa. Älä muokkaa käsin: muutokset tehdään lähteeseen ja paketti
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pokela/components",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "React-komponentit: Pokela Design System. Generoitu tiedostoista components/, ei käsin ylläpidetty.",
5
5
  "license": "MIT",
6
6
  "author": "Veli-Matti Pokela",
@@ -25,7 +25,7 @@
25
25
  "LICENSE"
26
26
  ],
27
27
  "dependencies": {
28
- "@pokela/tokens": "^2.0.0"
28
+ "@pokela/tokens": "^2.1.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": ">=18"
@@ -130,59 +130,54 @@
130
130
  pystykeskelle. Koko tulee .icon--l:stä. */
131
131
  }
132
132
 
133
- /* ---- käännös ------------------------------------------------------- */
133
+ /* ---- hover ja käännös ---------------------------------------------
134
+
135
+ Hover on hiljainen pinta (--badge-surface), ei käännös. Täysi
136
+ musta/valkoinen-käännös jokaisella hiirenliikkeellä oli liian raju
137
+ molemmissa teemoissa. Käännös jää tilalle joka on oikeasti päällä:
138
+ avattu rivi (`aria-expanded`) ja staattinen `.invert`. */
139
+ .list-row:hover,
140
+ .list-row:focus-visible {
141
+ background: var(--badge-surface);
142
+ text-decoration: none;
143
+ }
144
+ /* Meta tummuu pinnalla: --ink-faint jäisi vaaleassa teemassa
145
+ --badge-surfacen päällä alle AA:n (4,49:1). */
146
+ .list-row:hover .meta,
147
+ .list-row:focus-visible .meta { color: var(--ink-muted); }
134
148
 
135
149
  /* `.invert` on mukana, jotta tila voidaan näyttää myös staattisena
136
150
  (esim. dokumentaatiossa) ilman omaa sääntöä — muuten .list-row:n
137
151
  oma `color` voittaisi utilityn samalla spesifisyydellä ja teksti
138
152
  jäisi näkymättömiin. `aria-expanded` on avatun rivin sama tila. */
139
- .list-row:hover,
140
- .list-row:focus-visible,
141
153
  .list-row.invert,
142
154
  .list-row[aria-expanded='true'] {
143
155
  background: var(--invert-surface);
144
156
  color: var(--invert-ink);
145
157
  text-decoration: none;
146
158
  }
147
- .list-row:hover .list-row__description,
148
- .list-row:focus-visible .list-row__description,
149
159
  .list-row.invert .list-row__description,
150
160
  .list-row[aria-expanded='true'] .list-row__description,
151
- .list-row:hover .meta,
152
- .list-row:focus-visible .meta,
153
161
  .list-row.invert .meta,
154
162
  .list-row[aria-expanded='true'] .meta { color: var(--invert-faint); }
155
163
 
156
- /* Focus-renkaan pitää näkyä käännetyllä pinnalla. */
157
- .list-row:focus-visible {
158
- outline-color: var(--invert-ink);
159
- outline-offset: calc(var(--focus-offset) * -2);
160
- }
164
+ /* Focus-renkaan pitää näkyä myös käännetyllä pinnalla. */
165
+ .list-row:focus-visible { outline-offset: calc(var(--focus-offset) * -2); }
166
+ .list-row[aria-expanded='true']:focus-visible { outline-color: var(--invert-ink); }
161
167
 
162
168
  /* Sisarrivit vaimennetaan hoverin aikana. */
163
169
  .list-rows:hover .list-row:not(:hover) { color: var(--ink-faint); }
164
170
  .list-rows:hover .list-row:not(:hover) .list-row__description { color: var(--ink-faint); }
165
171
 
166
- /* Kosketus: ei hoveria, käännös :active-tilassa. Viimeisenä = voittaa. */
172
+ /* Kosketus: ei hoveria, hiljainen pinta :active-tilassa. Viimeisenä = voittaa. */
167
173
  @media (hover: none) {
168
- .list-row:hover {
169
- background: transparent;
170
- color: var(--ink);
171
- }
172
- .list-row:hover .list-row__description { color: var(--ink-muted); }
174
+ .list-row:hover { background: transparent; }
173
175
  .list-row:hover .meta { color: var(--ink-faint); }
174
176
  .list-rows:hover .list-row:not(:hover) { color: var(--ink); }
175
177
  .list-rows:hover .list-row:not(:hover) .list-row__description { color: var(--ink-muted); }
176
178
 
177
- .list-row:active,
178
- .list-row[aria-expanded='true'] {
179
- background: var(--invert-surface);
180
- color: var(--invert-ink);
181
- }
182
- .list-row:active .list-row__description,
183
- .list-row[aria-expanded='true'] .list-row__description,
184
- .list-row:active .meta,
185
- .list-row[aria-expanded='true'] .meta { color: var(--invert-faint); }
179
+ .list-row:active { background: var(--badge-surface); }
180
+ .list-row:active .meta { color: var(--ink-muted); }
186
181
  }
187
182
 
188
183
  @media (prefers-reduced-motion: reduce) {