@mittwald/flow-react-components 0.2.0-alpha.946 → 0.2.0-alpha.955

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/AGENTS.md CHANGED
@@ -5,7 +5,7 @@ Component patterns for the core package. Read the
5
5
  Definition of Done, workflow).
6
6
 
7
7
  > **Full pattern catalog:** [PATTERNS.md](./PATTERNS.md) lists every convention
8
- > (182 patterns) with per-pattern applicability (when to use / when not), a
8
+ > (184 patterns) with per-pattern applicability (when to use / when not), a
9
9
  > canonical example each, and a decision cheat-sheet. This guide covers the
10
10
  > must-know core; look there when deciding between two approaches.
11
11
 
@@ -81,6 +81,10 @@ Conventions:
81
81
  that hand-maintained registry, so a missing entry fails the typecheck.
82
82
  - Most components wrap `react-aria-components` primitives; expose ARIA props
83
83
  directly only where React Aria lacks the behavior.
84
+ - **Keep the returned JSX readable.** Lift computed nodes (icon, label, tooltip
85
+ text) and non-trivial conditionals into named consts above the `return`; the
86
+ returned tree should stay scannable — no large inline ternaries or deep logic
87
+ in the markup. Split a growing tree into subcomponents.
84
88
 
85
89
  ## PropsContext — contextual composability
86
90
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,42 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.2.0-alpha.955](https://github.com/mittwald/flow/compare/0.2.0-alpha.954...0.2.0-alpha.955) (2026-07-24)
7
+
8
+ **Note:** Version bump only for package @mittwald/flow-react-components
9
+
10
+ # [0.2.0-alpha.954](https://github.com/mittwald/flow/compare/0.2.0-alpha.953...0.2.0-alpha.954) (2026-07-24)
11
+
12
+ **Note:** Version bump only for package @mittwald/flow-react-components
13
+
14
+ # [0.2.0-alpha.953](https://github.com/mittwald/flow/compare/0.2.0-alpha.952...0.2.0-alpha.953) (2026-07-24)
15
+
16
+ **Note:** Version bump only for package @mittwald/flow-react-components
17
+
18
+ # [0.2.0-alpha.952](https://github.com/mittwald/flow/compare/0.2.0-alpha.951...0.2.0-alpha.952) (2026-07-24)
19
+
20
+ **Note:** Version bump only for package @mittwald/flow-react-components
21
+
22
+ # [0.2.0-alpha.951](https://github.com/mittwald/flow/compare/0.2.0-alpha.950...0.2.0-alpha.951) (2026-07-24)
23
+
24
+ **Note:** Version bump only for package @mittwald/flow-react-components
25
+
26
+ # [0.2.0-alpha.950](https://github.com/mittwald/flow/compare/0.2.0-alpha.949...0.2.0-alpha.950) (2026-07-24)
27
+
28
+ **Note:** Version bump only for package @mittwald/flow-react-components
29
+
30
+ # [0.2.0-alpha.949](https://github.com/mittwald/flow/compare/0.2.0-alpha.948...0.2.0-alpha.949) (2026-07-24)
31
+
32
+ **Note:** Version bump only for package @mittwald/flow-react-components
33
+
34
+ # [0.2.0-alpha.948](https://github.com/mittwald/flow/compare/0.2.0-alpha.947...0.2.0-alpha.948) (2026-07-24)
35
+
36
+ **Note:** Version bump only for package @mittwald/flow-react-components
37
+
38
+ # [0.2.0-alpha.947](https://github.com/mittwald/flow/compare/0.2.0-alpha.946...0.2.0-alpha.947) (2026-07-24)
39
+
40
+ **Note:** Version bump only for package @mittwald/flow-react-components
41
+
6
42
  # [0.2.0-alpha.946](https://github.com/mittwald/flow/compare/0.2.0-alpha.945...0.2.0-alpha.946) (2026-07-24)
7
43
 
8
44
  ### Bug Fixes
package/PATTERNS.md CHANGED
@@ -124,6 +124,12 @@ and consistency enforced by tooling, not maintained by hand.
124
124
  `src/components/Button/Button.tsx:112`
125
125
  - ✓ root styling combines base, variants, state, and consumer classes.
126
126
  - ✗ a single invariant class → pass it directly.
127
+ - **Readable JSX via extracted expressions** — lift computed nodes (icon, label,
128
+ tooltip text) and non-trivial conditionals into named consts above the
129
+ `return`; the returned tree stays scannable — no large inline ternaries, no
130
+ deep logic in the markup. `src/components/Button/Button.tsx:168`
131
+ - ✓ markup mixes conditional content or several computed values.
132
+ - ✗ a single self-evident inline expression → keep it inline.
127
133
  - **Helpers outside the component** `[undocumented]` — hookless pure
128
134
  helpers/constants live above the component const.
129
135
  `src/components/Button/Button.tsx:45`
@@ -442,10 +448,17 @@ and consistency enforced by tooling, not maintained by hand.
442
448
  colors/sizes/radii. `src/components/Button/Button.module.scss:8`
443
449
  - ✓ colors/spacing/type/radii/shadow/size.
444
450
  - ✗ a structural CSS keyword or genuine calculation → CSS directly.
451
+ - `rem` vs `px`: see [design-tokens/AGENTS.md](../design-tokens/AGENTS.md) —
452
+ text-proportional spacing/sizing → `size-rem`, fixed values → `size-px`.
445
453
  - **No invented base values** — compose existing tokens; add component tokens
446
454
  only with a design.
447
455
  - ✓ values composed from approved tokens.
448
456
  - ✗ a missing design decision → ask UX / add an approved component token.
457
+ - **Own the decision in a component token** `[undocumented]` — reference a
458
+ component-namespaced token for a value that expresses this component's design
459
+ decision, even when a similar global token exists.
460
+ - ✓ a value is this component's design choice → component token.
461
+ - ✗ a genuinely systemic concept (separator, focus ring) → the shared token.
449
462
  - **Shared `focus` mixin** — `@use "@/styles/mixins/focus"`.
450
463
  `src/components/Button/Button.module.scss:32`
451
464
  - ✓ an interactive element needs the system focus ring.
@@ -948,3 +961,7 @@ Quick answers to the highest-frequency choices when authoring a component:
948
961
  otherwise one colocated file.
949
962
  - **Structure that's only spacing/alignment** → Flow layout primitives; a raw
950
963
  wrapper only for semantics or component-owned integration.
964
+ - **JSX getting dense** → extract computed nodes/conditionals into named consts
965
+ before `return`; split a growing tree into subcomponents.
966
+ - **Sizing/spacing token unit** → text-proportional → `size-rem`; fixed →
967
+ `size-px` (see design-tokens/AGENTS.md).