@atelier-ui/react 0.2.12 → 0.2.14

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,3 +1,25 @@
1
+ ## 0.2.14 (2026-08-26)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **tokens:** the control height is the primitive, padding is derived (ADR-0041) ([df973f7](https://github.com/DominikPieper/atelier-ui/commit/df973f7))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Claude Opus 5
10
+ - Dominik Pieper @DominikPieper
11
+
12
+ ## 0.2.13 (2026-08-26)
13
+
14
+ ### 🩹 Fixes
15
+
16
+ - **tokens:** letter-spacing and danger focus-ring tokens; consolidate design findings ([0bdaddd](https://github.com/DominikPieper/atelier-ui/commit/0bdaddd))
17
+
18
+ ### ❤️ Thank You
19
+
20
+ - Claude Opus 5
21
+ - Dominik Pieper @DominikPieper
22
+
1
23
  ## 0.2.12 (2026-08-26)
2
24
 
3
25
  ### 🚀 Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atelier-ui/react",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "Atelier component library for React — LLM-optimised, accessible, design-token-driven",
5
5
  "keywords": [
6
6
  "react",
@@ -9,7 +9,7 @@
9
9
  font-size: var(--ui-font-size-md);
10
10
  font-weight: var(--ui-font-weight-semibold);
11
11
  line-height: var(--ui-line-height-tight);
12
- letter-spacing: -0.01em;
12
+ letter-spacing: var(--ui-letter-spacing-tight);
13
13
  cursor: pointer;
14
14
  transition: background-color var(--ui-transition-fast),
15
15
  border-color var(--ui-transition-fast),
@@ -98,21 +98,33 @@
98
98
 
99
99
  /* Sizes — modern target heights (sm 32px / md 40px / lg 48px) */
100
100
  .atl-button.size-sm {
101
- padding: 0.375rem 0.875rem;
101
+ padding: calc(
102
+ (var(--ui-control-height-sm) - var(--ui-line-height-tight) * var(--ui-font-size-sm)) / 2 -
103
+ 1px
104
+ )
105
+ 0.875rem;
102
106
  font-size: var(--ui-font-size-sm);
103
- min-height: 2rem;
107
+ min-height: var(--ui-control-height-sm);
104
108
  }
105
109
 
106
110
  .atl-button.size-md {
107
- padding: 0.5625rem 1.125rem;
111
+ padding: calc(
112
+ (var(--ui-control-height-md) - var(--ui-line-height-tight) * var(--ui-font-size-md)) / 2 -
113
+ 1px
114
+ )
115
+ 1.125rem;
108
116
  font-size: var(--ui-font-size-md);
109
- min-height: 2.5rem;
117
+ min-height: var(--ui-control-height-md);
110
118
  }
111
119
 
112
120
  .atl-button.size-lg {
113
- padding: 0.75rem 1.5rem;
121
+ padding: calc(
122
+ (var(--ui-control-height-lg) - var(--ui-line-height-tight) * var(--ui-font-size-lg)) / 2 -
123
+ 1px
124
+ )
125
+ 1.5rem;
114
126
  font-size: var(--ui-font-size-lg);
115
- min-height: 3rem;
127
+ min-height: var(--ui-control-height-lg);
116
128
  }
117
129
 
118
130
  /* Disabled */
@@ -7,11 +7,16 @@
7
7
  .atl-input input {
8
8
  display: block;
9
9
  width: 100%;
10
- min-height: 2.5rem;
11
- padding: 0.625rem var(--ui-spacing-4);
10
+ min-height: var(--ui-control-height-md);
11
+ padding: calc(
12
+ (var(--ui-control-height-md) - var(--ui-line-height-tight) * var(--ui-font-size-md)) / 2 - 1px
13
+ )
14
+ var(--ui-spacing-4);
12
15
  font-size: inherit;
13
16
  font-family: inherit;
14
- line-height: var(--ui-line-height-normal);
17
+ /* Control line-height, not the prose one: a single-line field has nothing to
18
+ * read across lines, and 1.5 is what made it 6px taller than a button. */
19
+ line-height: var(--ui-line-height-tight);
15
20
  color: var(--ui-color-text);
16
21
  background-color: var(--ui-color-input-bg);
17
22
  border: 1px solid var(--ui-color-input-border);
@@ -49,7 +54,7 @@
49
54
 
50
55
  .atl-input.is-invalid input:focus {
51
56
  border-color: var(--ui-color-input-border-invalid);
52
- box-shadow: 0 0 0 2px var(--ui-color-surface), 0 0 0 4px var(--ui-color-danger);
57
+ box-shadow: var(--ui-focus-ring-danger);
53
58
  }
54
59
 
55
60
  /* Non-color invalid indicator (WCAG 1.4.1) */
package/styles/tokens.css CHANGED
@@ -38,6 +38,18 @@
38
38
  --ui-letter-spacing-wide: 0.01em;
39
39
  --ui-letter-spacing-uppercase: 0.08em;
40
40
  --ui-font-size-3xl: 2.25rem;
41
+
42
+ /* ── Control heights ────────────────────────────────────────
43
+ * The height of an interactive control is the primitive; its block padding
44
+ * is DERIVED from it (ADR-0041):
45
+ * padding-block: calc((height - line-height * font-size) / 2 - border)
46
+ * Stating the height and deriving the padding is what makes an input and a
47
+ * button the same height. Stating the padding and hoping, which is what the
48
+ * library did until 2026-08-26, made them 6px apart.
49
+ */
50
+ --ui-control-height-sm: 2rem;
51
+ --ui-control-height-md: 2.5rem;
52
+ --ui-control-height-lg: 3rem;
41
53
  --ui-font-weight-normal: 400;
42
54
  --ui-font-weight-medium: 500;
43
55
  --ui-font-weight-semibold: 600;
@@ -203,9 +215,15 @@
203
215
  --ui-transition-normal: var(--ui-duration-normal) var(--ui-ease-out);
204
216
  --ui-transition-slow: var(--ui-duration-slow) var(--ui-ease-out);
205
217
 
206
- /* Focus ring — double-ring for light & dark background compatibility */
218
+ /* Focus ring — double-ring for light & dark background compatibility.
219
+ * Declared once: the inner ring tracks the surface and the outer the accent,
220
+ * both of which are mode-dependent, so the ring follows the mode for free.
221
+ * The danger variant exists so an invalid control does not have to restate
222
+ * the formula (it did, in atl-input.css, until 2026-08-26). */
207
223
  --ui-focus-ring: 0 0 0 2px var(--ui-color-surface),
208
224
  0 0 0 4px var(--ui-color-primary);
225
+ --ui-focus-ring-danger: 0 0 0 2px var(--ui-color-surface),
226
+ 0 0 0 4px var(--ui-color-danger);
209
227
 
210
228
  /* Form controls */
211
229
  --ui-color-input-bg: var(--ui-color-surface-sunken);