@mittwald/flow-react-components 1.6.0-next.66 → 1.6.0-next.67

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.
Files changed (82) hide show
  1. package/AGENTS.md +0 -11
  2. package/MIGRATION.md +0 -205
  3. package/USAGE.md +1 -1
  4. package/dist/assets/component-index.json +1 -1
  5. package/dist/assets/doc-properties.json +1 -1
  6. package/dist/css/all-layered.css +1 -1
  7. package/dist/css/all.css +6 -8
  8. package/dist/js/default.mjs +1 -1
  9. package/dist/js/internal.mjs +2 -2
  10. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs +11 -35
  11. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.mjs +11 -11
  13. package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs +1 -1
  15. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs +1 -1
  16. package/dist/js/packages/components/src/components/Alert/Alert.module.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs +2 -8
  18. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  19. package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs +7 -9
  20. package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs.map +1 -1
  21. package/dist/js/packages/components/src/components/Avatar/avatarColors.mjs +7 -3
  22. package/dist/js/packages/components/src/components/Avatar/avatarColors.mjs.map +1 -1
  23. package/dist/js/packages/components/src/components/Badge/Badge.mjs +3 -16
  24. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  25. package/dist/js/packages/components/src/components/Badge/Badge.module.mjs +11 -11
  26. package/dist/js/packages/components/src/components/Badge/Badge.module.mjs.map +1 -1
  27. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs +1 -1
  28. package/dist/js/packages/components/src/components/Button/Button.mjs +1 -1
  29. package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs +1 -1
  30. package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs.map +1 -1
  31. package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs +1 -1
  32. package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs +1 -1
  34. package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs.map +1 -1
  35. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs +10 -10
  36. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
  37. package/dist/js/packages/components/src/components/Color/Color.mjs +6 -5
  38. package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
  39. package/dist/js/packages/components/src/components/Color/Color.module.mjs +5 -7
  40. package/dist/js/packages/components/src/components/Color/Color.module.mjs.map +1 -1
  41. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs +1 -1
  42. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
  43. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs +1 -1
  44. package/dist/js/packages/components/src/components/Heading/Heading.mjs +1 -1
  45. package/dist/js/packages/components/src/components/Icon/Icon.mjs +7 -5
  46. package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
  47. package/dist/js/packages/components/src/components/Icon/Icon.module.mjs +5 -7
  48. package/dist/js/packages/components/src/components/Icon/Icon.module.mjs.map +1 -1
  49. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs +1 -1
  50. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs +1 -1
  51. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs +1 -1
  53. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/Link/Link.mjs +1 -1
  55. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs +1 -1
  56. package/dist/js/packages/components/src/components/Notification/Notification.module.mjs.map +1 -1
  57. package/dist/js/packages/components/src/components/Overlay/Overlay.module.mjs.map +1 -1
  58. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs +1 -1
  59. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
  60. package/dist/js/packages/components/src/components/Text/Text.mjs +1 -1
  61. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs +1 -1
  62. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
  63. package/dist/js/packages/components/src/lib/types/props.mjs +1 -17
  64. package/dist/js/packages/components/src/lib/types/props.mjs.map +1 -1
  65. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +1270 -1779
  66. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
  67. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +1270 -1779
  68. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
  69. package/dist/types/components/AccentBox/AccentBox.d.ts +3 -12
  70. package/dist/types/components/Avatar/Avatar.d.ts +3 -7
  71. package/dist/types/components/Avatar/avatarColors.d.ts +1 -2
  72. package/dist/types/components/Badge/Badge.d.ts +3 -19
  73. package/dist/types/components/Color/Color.d.ts +4 -8
  74. package/dist/types/components/Icon/Icon.d.ts +3 -5
  75. package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +889 -1409
  76. package/dist/types/lib/tokens/CategoricalColors.d.ts +1 -1
  77. package/dist/types/lib/tokens/getCategoricalColorByIndex.d.ts +1 -1
  78. package/dist/types/lib/types/props.d.ts +0 -12
  79. package/package.json +10 -10
  80. package/dist/js/packages/components/src/lib/hooks/useDeprecatedColor.mjs +0 -20
  81. package/dist/js/packages/components/src/lib/hooks/useDeprecatedColor.mjs.map +0 -1
  82. package/dist/types/lib/hooks/useDeprecatedColor.d.ts +0 -9
package/AGENTS.md CHANGED
@@ -302,17 +302,6 @@ if ("action" in props) {
302
302
  - **Use design-token CSS variables** — global (`--font-size-text--m`) or
303
303
  component-namespaced (`--button--corner-radius`). No hard-coded colors, sizes,
304
304
  radii.
305
- - **Colors come from Semantic or Variant, never Brand**
306
- ([ADR 0008](https://github.com/mittwald/flow/blob/main/docs/adr/0008-color-token-tiers.md)).
307
- Brand variables (`--color--mittwald-blue--1000`) are theme-neutral, so they
308
- stay light in dark. `flow/no-brand-color-variable` rejects them — stylelint in
309
- stylesheets, ESLint in TS/TSX strings, both in `packages/components` and
310
- `apps/docs`. The groups come from `design-tokens/src/color-brand.yml`
311
- (`dev/brandColors/`), so a new group is covered without touching the rules. A
312
- name completed at runtime (`--color--#{$hue}`, `` `--color--${hue}` ``) is
313
- rejected too: only Brand defines tokens under `color`. Exempt: the docs pages
314
- that display the palette itself (`foundations/design/colors`,
315
- `design-tokens`).
316
305
  - Shared mixins via `@use "@/styles/mixins/…"`: `focus` (focus ring),
317
306
  `formControl` (border/color/interaction states of form fields), `ellipsis`.
318
307
  Group repeated variants in local mixins.
package/MIGRATION.md CHANGED
@@ -28,211 +28,6 @@ The CLI's own output does detect it and prints the right form.
28
28
 
29
29
  ---
30
30
 
31
- <a id="color-props-brand-palette"></a>
32
-
33
- ## Badge, Avatar, Icon, Color, AccentBox: color values follow the brand palette
34
-
35
- **Since `1.6.0`** · migration · codemod available · also applies to
36
- `@mittwald/flow-remote-react-components`
37
-
38
- The decorative color values now follow the brand palette: one value per mittwald
39
- brand color, named after how it looks — `blue`, `navy`, `lilac`, `sage` and
40
- `salmon`, the same list on `Badge`, `Avatar`, `Icon` (and the generated icons,
41
- `IconCheck` & co.), `Color` and `AccentBox` (`backgroundColor`). `Badge` names
42
- its status hues by their meaning: `success`, `warning` and `danger`.
43
-
44
- ```diff
45
- - <Badge color="red">Gesperrt</Badge>
46
- - <Badge color="teal">Projekt</Badge>
47
- + <Badge color="danger">Gesperrt</Badge>
48
- + <Badge color="sage">Projekt</Badge>
49
- ```
50
-
51
- | Deprecated | Use instead | Looks the same |
52
- | ------------------------- | --------------- | -------------- |
53
- | `violet` (all four) | `lilac` | yes |
54
- | `teal` (all four) | `sage` | yes |
55
- | `green` on `Badge` | `success` | yes |
56
- | `orange` on `Badge` | `warning` | yes |
57
- | `red` on `Badge` | `danger` | yes |
58
- | `green` on `Avatar` | `sage` | no |
59
- | `green` on `AccentBox` | `sage` | yes |
60
- | `gradient` on `AccentBox` | `gradient-navy` | yes |
61
-
62
- The deprecated values keep working and log a deprecation warning, but will be
63
- removed in a future release. A codemod rewrites every row that looks the same.
64
- `Avatar`'s `green` stays for you to decide. `AccentBox`'s `green` already
65
- renders like `sage`: the success mint is gone from the AccentBox, which is
66
- decorative.
67
-
68
- `navy`, `sage` and `salmon` are new on `Avatar`, `Icon` and `Color`; `sage` and
69
- `salmon` are new on `Badge` and `AccentBox`. `AccentBox` has one brand gradient
70
- per decorative color: `gradient-navy`, `gradient-sage`, `gradient-lilac` and
71
- `gradient-salmon`. The old `gradient` renders as `gradient-navy`, which replaces
72
- its radial look. On every colored `AccentBox` background (the decorative colors
73
- and the gradients), content now defaults to `color="dark"`. Dynamic initials in
74
- `Avatar` now pick from all five decorative colors, so a person may get a
75
- different color than before.
76
-
77
- The CSS classes and the design tokens of the deprecated values are renamed or
78
- removed **without** a fallback — update them by hand if you use
79
- `@mittwald/flow-stylesheet` or the token CSS variables directly.
80
-
81
- **Apply:** On `Badge`, `Avatar`, `Icon` (and the generated icons, `IconCheck` &
82
- co.) and `Color`, rename `color="violet"` to `color="lilac"` and `color="teal"`
83
- to `color="sage"`; on `AccentBox`, do the same for `backgroundColor`, and rename
84
- `backgroundColor="gradient"` to `backgroundColor="gradient-navy"` and
85
- `backgroundColor="green"` to `backgroundColor="sage"`. An `AccentBox` that still
86
- sets its background through `color` (`color="gradient"`, `"green"`) gets
87
- `backgroundColor="gradient-navy"` / `"sage"` instead. On `Badge`, also rename
88
- `color="green"` to `color="success"`, `color="orange"` to `color="warning"` and
89
- `color="red"` to `color="danger"`. Each replacement renders exactly like the old
90
- value. `Avatar`'s `color="green"` is deprecated too, but its replacement `sage`
91
- is the brand's muted gray-green instead of the success mint. Switch to `sage`
92
- where the avatar's color carries no meaning, and keep `green` (it still renders)
93
- only until you have decided. `AccentBox`'s `backgroundColor="green"` now renders
94
- like `sage` instead of the success mint. Content on a colored `AccentBox` now
95
- defaults to `color="dark"`; drop an explicit `color="dark"` there if you like.
96
- If you use `@mittwald/flow-stylesheet` or the token CSS variables directly,
97
- rename `flow--badge--{violet,teal,green,orange,red}` to
98
- `flow--badge--{lilac,sage,success,warning,danger}`,
99
- `--badge--{teal,green,orange,red}-*` to
100
- `--badge--{sage,success,warning,danger}-*`, `--icon--teal-color` to
101
- `--icon--sage-color`, `--decorative--teal-*` to `--decorative--sage-*`,
102
- `flow--accent-box--{violet,teal,green}` and
103
- `--accent-box--background-color-{violet,teal,green}` to their
104
- `lilac`/`sage`/`sage` counterparts, `flow--accent-box--gradient` and
105
- `--accent-box--background-color-gradient` to `…-gradient-navy`, drop the
106
- `--badge--*-border-color` variables (the badge has no border), and replace
107
- `--badge--violet-*`, `--icon--violet-color` and `--decorative--violet-*` by
108
- their `lilac` counterparts.
109
-
110
- ```shell
111
- npx @mittwald/flow-codemods@latest color-props-brand-palette src
112
- ```
113
-
114
- ---
115
-
116
- <a id="color-tokens-brand-theme-neutral"></a>
117
-
118
- ## Color tokens: a new Brand palette that no longer switches with the theme
119
-
120
- **Since `1.6.0`** · migration · manual change
121
-
122
- The color tokens now follow four tiers: **Brand** (the palette), **Semantic**
123
- (colors with a meaning), **Variant** (pairs per variant) and component tokens
124
- ([ADR 0008](https://github.com/mittwald/flow/blob/main/docs/adr/0008-color-token-tiers.md)).
125
- Only Semantic switches between light and dark. Brand is theme-neutral: one value
126
- per token, the light one.
127
-
128
- Brand now holds the new mittwald brand palette (`mittwald-blue`, `-navy`,
129
- `-green`, `-lilac`, `-orange`, `-neutral`, `system-danger`, `-warning`,
130
- `-success`; hue ramps with 19 steps, alpha ramps with 10). Flow's own components
131
- pick it up through Semantic. What breaks is code outside Flow that reads Brand
132
- variables (`--color--…`) directly:
133
-
134
- - **The old palettes are removed.** `--color--gray--N`,
135
- `--color--hosting-blue--N`, `--color--soft-contrast-violet--N`,
136
- `--color--bright-lilac--N`, `--color--super-teal--N` and the status ramps
137
- `--color--amaranth-red--N`, `--color--royal-orange--N` and
138
- `--color--espelkamp-green--N` no longer exist; `--color--mittwald-navy--N` and
139
- the alpha ramps carry new values and steps. Nothing fails — the declaration is
140
- just dropped or the color is different.
141
- - **Brand no longer inverts in dark.** A remaining `--color--<ramp>--N` keeps
142
- its light value in both themes.
143
- - **Some variables moved to Semantic** and their old names are gone:
144
-
145
- | Before | After |
146
- | -------------------------------- | ------------------------------ |
147
- | `--color--categorical--<name>` | `--categorical--color--<name>` |
148
- | `--color--code-syntax--<name>` | `--code-syntax--color--<name>` |
149
- | `--color--transparent` | `--transparent--color` |
150
- | `--color--gradient` | `--gradient--color` |
151
- | `--color--background-gradient` | `--background-gradient--color` |
152
- | `--color--static-black-alpha--N` | `--dark-static--color--N` |
153
- | `--color--static-white-alpha--N` | `--light-static--color--N` |
154
-
155
- The same applies to `@mittwald/flow-design-tokens/json*/all-*.json` and
156
- `useDesignTokens()`: `color.categorical` is `categorical.color` now.
157
-
158
- **Semantic has named roles.** Semantic no longer mirrors a ramp with 11 or 12
159
- steps; it selects few tones per role and theme:
160
-
161
- | Group | Keys |
162
- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
163
- | `primary`, `info`, `success`, `danger`, `warning`, `neutral`, `unavailable`, `decorative-<hue>` | `quiet--100/200/300` (was 100–300), `strong--100/200/300` (was 800/900/1000) |
164
- | `dark`, `light`, `dark-static`, `light-static` | `quiet--100/200/300`, `strong--100/200/300` (was 800/700/600) |
165
- | `elevation` (new: raised, ground, inset surface) | `100/200/300` |
166
- | `content` (new: secondary, label, text; content on strong) | `100/200/300`, `inverse` |
167
- | `border` (new: grouping, separator, control border) | `100/200/300` |
168
-
169
- The decorative groups follow the brand colors and are named like the color
170
- props: `decorative-blue`, `-navy`, `-lilac`, `-sage` (`mittwald-green`) and
171
- `-salmon` (`mittwald-orange`). Besides `quiet` and `strong` each has a `content`
172
- tone for decorative content such as icons. `decorative-violet` and
173
- `decorative-teal` are gone (use `-lilac` and `-sage`), and so are
174
- `decorative-red`, `-green` and `-orange` as status mirrors (use `danger`,
175
- `success` and `warning`).
176
-
177
- ```diff
178
- - .card { background: var(--color--gray--100); }
179
- + .card { background: var(--elevation--color--100); }
180
- - .hint { color: var(--neutral--color--700); }
181
- + .hint { color: var(--content--color--100); }
182
- - .badge { background: var(--primary--color--100); color: var(--primary--color--900); }
183
- + .badge { background: var(--primary--color--quiet--100); color: var(--primary--color--strong--200); }
184
- ```
185
-
186
- No codemod: whether `--color--gray--100` meant a surface or content is not
187
- decidable mechanically. Prefer a component token or a Variant variable over a
188
- Semantic one where one fits. Token names and values are outside the semver
189
- contract (ADR 0005), so this ships as a Minor.
190
-
191
- **Apply:** Search your own CSS, SCSS and TS for `var(--color--`. Replace the
192
- moved variables by name — `--color--categorical--X` → `--categorical--color--X`,
193
- `--color--code-syntax--X` → `--code-syntax--color--X`, `--color--transparent` →
194
- `--transparent--color`, `--color--gradient` → `--gradient--color`,
195
- `--color--background-gradient` → `--background-gradient--color`,
196
- `--color--static-black-alpha--N` → `--dark-static--color--N`,
197
- `--color--static-white-alpha--N` → `--light-static--color--N`; JavaScript
198
- reading `color.categorical` from the token JSON reads `categorical.color`. The
199
- old palettes are gone — `--color--gray--N`, `--color--hosting-blue--N`,
200
- `--color--soft-contrast-violet--N`, `--color--bright-lilac--N`,
201
- `--color--super-teal--N`, `--color--amaranth-red--N`, `--color--royal-orange--N`
202
- and `--color--espelkamp-green--N` resolve to nothing, and
203
- `--color--mittwald-navy--N` holds the new brand values. Replace each with the
204
- Semantic variable that carries its meaning, e.g. `--elevation--color--N` for a
205
- gray surface, `--content--color--N` for gray text, `--border--color--N` for a
206
- gray border, `--primary--color--quiet--N` or `--primary--color--strong--N` for
207
- hosting-blue, `--decorative-<hue>--color--…` for navy, lilac and teal,
208
- `--danger--`, `--warning--` or `--success--color--…` for the status hues
209
- (amaranth-red, royal-orange, espelkamp-green), `--dark--color--…` or
210
- `--light--color--…` for `--color--black-alpha--N` or `--color--white-alpha--N`,
211
- or a Variant variable such as `--primary-solid-background-color--default`. Do
212
- the same for every remaining Brand variable (`--color--mittwald-*`,
213
- `--color--system-*`, the alpha ramps), because Brand keeps its light value in
214
- dark. Then rename the Semantic variables you use. Colored and alpha groups
215
- (`primary`, `info`, `success`, `danger`, `warning`, `neutral`, `unavailable`,
216
- `decorative-*`, `dark`, `light`, `dark-static`, `light-static`) keep six tones —
217
- `--<group>--color--100/200/300` → `--<group>--color--quiet--100/200/300`,
218
- `--<group>--color--800/900/1000` → `--<group>--color--strong--100/200/300`
219
- (alpha groups map `800/700/600` → `strong--100/200/300`); the other steps are
220
- gone, use the nearest tone. Gray from `--neutral--color--N` moves by role —
221
- surfaces 100–300 → `--elevation--color--100/200/300`, text and icons →
222
- `--content--color--100` (secondary), `--200` (label) or `--300` (text), on a
223
- solid surface `--content--color--inverse`, borders → `--border--color--100`
224
- (grouping), `--200` (separator) or `--300` (control), disabled →
225
- `--unavailable--color--quiet--100/200/300` (surface, border, content).
226
- `--decorative-violet--color--…` → `--decorative-lilac--color--…`,
227
- `--decorative-teal--color--…` → `--decorative-sage--color--…`,
228
- `--decorative-red--`, `--decorative-green--` and `--decorative-orange--color--…`
229
- → `--danger--`, `--success--` and `--warning--color--…`; the brand's green and
230
- orange are `--decorative-sage--` and `--decorative-salmon--color--…`. Which one
231
- fits is not decidable mechanically — decide whether the color is a surface,
232
- content or status.
233
-
234
- ---
235
-
236
31
  <a id="accordion-variant-deprecated"></a>
237
32
 
238
33
  ## Accordion: `variant` deprecated
package/USAGE.md CHANGED
@@ -221,7 +221,7 @@ change in **any** release (see
221
221
  `https://flow.mittwald.de/raw/get-started/versioning.md`):
222
222
 
223
223
  - **CSS class names** (`.flow--button`, …) — never write selectors against them.
224
- - **Design-token names and values** (`--size-px--m`, `--content--color--300`) —
224
+ - **Design-token names and values** (`--size-px--m`, `--color--gray--500`) —
225
225
  they are Flow's internal vocabulary, not a consumer API. Use the component
226
226
  props above instead.
227
227
  - **Internal DOM structure** — do not rely on the element tree a component