@iyulab/components 2.23.1 → 2.23.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.23.2] - 2026-10-13
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **A dark button shows its hover and press.** `u-button` derived its hover and active colours by mixing toward black
|
|
8
|
+
(85% / 70%), so a near-black brand colour — an ink primary such as `#18191B` — had nowhere to go: the hover was
|
|
9
|
+
about 1.05:1 against the resting button and the most-pressed button on the screen showed no state. A colour darker
|
|
10
|
+
than OKLab lightness 0.4 now mixes toward white instead; mid and light colours derive exactly as before. The same
|
|
11
|
+
rule applies to the `link` text states of the decorative colours. Browsers without relative colour syntax keep the
|
|
12
|
+
old direction.
|
|
13
|
+
|
|
3
14
|
## [2.23.1] - 2026-10-13
|
|
4
15
|
|
|
5
16
|
### Fixed
|
|
@@ -45,10 +45,10 @@ export type ButtonSize = "sm" | "md" | "lg";
|
|
|
45
45
|
* (기본: #fff · 역할 값 지정 시 --u-{role}-txt-color)
|
|
46
46
|
* @cssprop --btn-color-strong - **바탕 위**의 글자색 — appearance="link"·"plain" 이 읽는다.
|
|
47
47
|
* 면과 요구가 반대라 슬롯이 따로 있다 (기본: --btn-color 와 동일 · 역할 값 지정 시 --u-{role}-color-strong)
|
|
48
|
-
* @cssprop --btn-color-strong-hover - 바탕 위 글자 hover (기본: 85% + black · 역할 값은 움직이지 않고 밑줄로 강조)
|
|
49
|
-
* @cssprop --btn-color-strong-active - 바탕 위 글자 active (기본: 70% + black · 역할 값은 고정)
|
|
50
|
-
* @cssprop --btn-color-hover - solid 배경 hover (기본: --btn-color 85% + black)
|
|
51
|
-
* @cssprop --btn-color-active - solid 배경 active (기본: --btn-color 70% + black)
|
|
48
|
+
* @cssprop --btn-color-strong-hover - 바탕 위 글자 hover (기본: 85% + black, 어두운 색은 + white · 역할 값은 움직이지 않고 밑줄로 강조)
|
|
49
|
+
* @cssprop --btn-color-strong-active - 바탕 위 글자 active (기본: 70% + black, 어두운 색은 + white · 역할 값은 고정)
|
|
50
|
+
* @cssprop --btn-color-hover - solid 배경 hover (기본: --btn-color 85% + black — --btn-color 가 어두우면(OKLab 명도 0.4 미만) + white)
|
|
51
|
+
* @cssprop --btn-color-active - solid 배경 active (기본: --btn-color 70% + black — 어두우면 + white)
|
|
52
52
|
* @cssprop --btn-color-surface - soft 배경 (역할 색: --u-{role}-bg-color · 그 밖: --btn-color 12% + 배경색)
|
|
53
53
|
* @cssprop --btn-color-surface-hover - soft 배경 hover (역할 색: 면에 --btn-color 18% · 그 밖: 22%)
|
|
54
54
|
* @cssprop --btn-color-surface-active - soft 배경 active (역할 색: 면에 --btn-color 30% · 그 밖: 32%)
|
|
@@ -18,11 +18,18 @@ var styles = css`
|
|
|
18
18
|
|
|
19
19
|
--btn-txt-color: #fff;
|
|
20
20
|
--btn-color-strong: var(--btn-color);
|
|
21
|
-
--btn-color-strong-hover: color-mix(in srgb, var(--btn-color-strong) 85%, black);
|
|
22
|
-
--btn-color-strong-active: color-mix(in srgb, var(--btn-color-strong) 70%, black);
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
--_btn-state-ink: black;
|
|
27
|
+
--_btn-strong-state-ink: black;
|
|
28
|
+
--btn-color-strong-hover: color-mix(in srgb, var(--btn-color-strong) 85%, var(--_btn-strong-state-ink));
|
|
29
|
+
--btn-color-strong-active: color-mix(in srgb, var(--btn-color-strong) 70%, var(--_btn-strong-state-ink));
|
|
30
|
+
|
|
31
|
+
--btn-color-hover: color-mix(in srgb, var(--btn-color) 85%, var(--_btn-state-ink));
|
|
32
|
+
--btn-color-active: color-mix(in srgb, var(--btn-color) 70%, var(--_btn-state-ink));
|
|
26
33
|
--btn-color-surface: color-mix(in srgb, var(--btn-color) 12%, var(--u-bg-color, #FFFFFF));
|
|
27
34
|
--btn-color-surface-hover: color-mix(in srgb, var(--btn-color) 22%, var(--u-bg-color, #FFFFFF));
|
|
28
35
|
--btn-color-surface-active: color-mix(in srgb, var(--btn-color) 32%, var(--u-bg-color, #FFFFFF));
|
|
@@ -33,6 +40,14 @@ var styles = css`
|
|
|
33
40
|
--btn-color-outline-active: color-mix(in srgb, var(--btn-color) 12%, var(--u-bg-color, #FFFFFF));
|
|
34
41
|
}
|
|
35
42
|
|
|
43
|
+
@supports (color: oklch(from red l c h)) {
|
|
44
|
+
:host {
|
|
45
|
+
|
|
46
|
+
--_btn-state-ink: oklch(from var(--btn-color) clamp(0, (0.4 - l) * 1000, 1) 0 0);
|
|
47
|
+
--_btn-strong-state-ink: oklch(from var(--btn-color-strong) clamp(0, (0.4 - l) * 1000, 1) 0 0);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
36
51
|
:host {
|
|
37
52
|
position: relative;
|
|
38
53
|
display: inline-flex;
|
package/package.json
CHANGED
|
@@ -96,11 +96,11 @@ element reference (`ariaControlsElements`) resolved when the button renders.
|
|
|
96
96
|
| `--btn-color` | The button's **fill** color. Every derived token below is `color-mix()`'d from this one — usually the only one you need to override |
|
|
97
97
|
| `--btn-txt-color` | Text color on the fill, read by `appearance="solid"` (default `#fff`, or `--u-{role}-txt-color` when a semantic `color` is set) |
|
|
98
98
|
| `--btn-color-strong` | Text color on the surrounding page background, read by `appearance="link"` and `"plain"` — opposite contrast need from the fill, so it's a separate token (default: same as `--btn-color`, or `--u-{role}-color-strong` for a semantic `color`) |
|
|
99
|
-
| `--btn-color-hover` / `--btn-color-active` | `solid` background hover/active (default: `--btn-color` at 85%/70%
|
|
99
|
+
| `--btn-color-hover` / `--btn-color-active` | `solid` background hover/active (default: `--btn-color` at 85%/70% mixed with black — or with white when `--btn-color` is dark, OKLab lightness below 0.4, so a near-black brand still shows its states) |
|
|
100
100
|
| `--btn-color-surface` / `-hover` / `-active` | `soft` background states — role colors (`primary`·`info`·`success`·`warning`·`danger`) use `--u-{role}-bg-color` and deepen it with 18%/30% of `--btn-color`; other colors mix `--btn-color` at 12%/22%/32%. A colored `plain` button hovers onto the same surface |
|
|
101
101
|
| `--btn-color-border` / `-hover` / `-active` | Border states (default: `--btn-color` at 45%/60%/75%) |
|
|
102
102
|
| `--btn-color-outline-hover` / `-active` | `outlined`/`plain` background hover/active (default: 6%/12%) |
|
|
103
|
-
| `--btn-color-strong-hover` / `-active` | `link` text hover/active — the role value itself doesn't move; hover adds an underline instead (default: `--btn-color-strong` at 85%/70%
|
|
103
|
+
| `--btn-color-strong-hover` / `-active` | `link` text hover/active — the role value itself doesn't move; hover adds an underline instead (default: `--btn-color-strong` at 85%/70% mixed with black, or white when it is dark) |
|
|
104
104
|
| `--btn-border-color` | Border color read by appearance/hover/active rules (default: `transparent`) |
|
|
105
105
|
| `--btn-padding-block` | Vertical inner padding (default `0.5em`) |
|
|
106
106
|
| `--btn-padding-inline` | Horizontal inner padding (default `1em`, `0` for `appearance="link"`) — overriding it does not change the min-height, which is derived from `--btn-padding-block` instead |
|