@ptlm-azulejo/themes 1.2.0 → 1.2.1-alpha.78
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 +70 -0
- package/README.md +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# @ptlm-azulejo/themes
|
|
2
|
+
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e5341cd: Documentation. Every package README now spells out both brands end to end instead
|
|
8
|
+
of showing one snippet with an "or" comment: which preset stylesheet to import,
|
|
9
|
+
which `.preset-*` class goes on `<html>` to select the theme at runtime,
|
|
10
|
+
`data-theme` for light/dark, and which font package the project needs (Leroy
|
|
11
|
+
Merlin → `@ptlm-azulejo/fonts-leroy-merlin`, Adeo → `@ptlm-azulejo/fonts-adeo`).
|
|
12
|
+
|
|
13
|
+
No component behaviour, prop or token changed. The patch bump exists because npm
|
|
14
|
+
ships `README.md` inside the tarball and renders it as the package page, so the
|
|
15
|
+
corrected instructions only reach consumers on a release.
|
|
16
|
+
|
|
17
|
+
## 1.2.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- eb0b0f8: Make components follow the brand typeface, add the medium (500) font weight, and
|
|
22
|
+
expose stable `data-testid` hooks.
|
|
23
|
+
|
|
24
|
+
- Each preset now names its brand's typeface in `--font-family`
|
|
25
|
+
(`presets/leroy-merlin.css` → LeroyMerlin, `presets/adeo.css` → Roboto), with
|
|
26
|
+
`Arial, sans-serif` as the fallback stack.
|
|
27
|
+
- Components apply that typeface on their root, so they follow the active brand
|
|
28
|
+
instead of inheriting the host page's font. Opt out per component by setting
|
|
29
|
+
`--font-family: inherit` on it.
|
|
30
|
+
- `base.css` adds `--font-weight-medium: 500`, alongside the existing regular
|
|
31
|
+
(400), semi-bold (600) and bold (700) weights.
|
|
32
|
+
- Every component now exposes `data-testid` on its root and on meaningful
|
|
33
|
+
sub-parts (`button` / `button-spinner`, `loader` / `loader-text`,
|
|
34
|
+
`datepicker` / `datepicker-clear`, `segmented-control` /
|
|
35
|
+
`segmented-control-segment`), so tests can target them without depending on
|
|
36
|
+
CSS class names.
|
|
37
|
+
|
|
38
|
+
As with upstream Mozaic, the presets **name** the typeface but ship no
|
|
39
|
+
`@font-face` and no font binaries — loading the files stays the app's job, so you
|
|
40
|
+
keep control of hosting, subsetting and preload. Until you load them the fallback
|
|
41
|
+
stack renders and nothing breaks. Install the font package matching your brand
|
|
42
|
+
alongside the preset:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Leroy Merlin
|
|
46
|
+
yarn add @ptlm-azulejo/themes @ptlm-azulejo/fonts-leroy-merlin
|
|
47
|
+
# Adeo
|
|
48
|
+
yarn add @ptlm-azulejo/themes @ptlm-azulejo/fonts-adeo
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
See the Fonts section of `packages/themes/README.md` for the full recipe.
|
|
52
|
+
|
|
53
|
+
## 1.1.0
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- 53000f7: Add Mozaic-aligned multi-brand theming support.
|
|
58
|
+
|
|
59
|
+
- New `@ptlm-azulejo/themes` package with structural/status tokens in `base.css`
|
|
60
|
+
and brand presets selected by a root class (`presets/leroy-merlin.css`,
|
|
61
|
+
`presets/adeo.css`), via `.preset-lm` / `.preset-adeo` and `data-theme` for
|
|
62
|
+
light/dark.
|
|
63
|
+
- `AzButton` now consumes theme tokens through utilities mapped in
|
|
64
|
+
`@theme inline`, working across both brands and in light/dark.
|
|
65
|
+
|
|
66
|
+
**BREAKING:** components no longer bake brand colors. The consumer must now
|
|
67
|
+
import `@ptlm-azulejo/themes/base.css` + a preset and apply the
|
|
68
|
+
`.preset-lm`/`.preset-adeo` class (and optional `data-theme="dark"`) on the root
|
|
69
|
+
element; otherwise components render uncolored. See the migration notes in
|
|
70
|
+
`packages/themes/README.md`.
|
package/README.md
CHANGED
|
@@ -41,8 +41,17 @@ Install the component and the theme packages, then in the app's entry point
|
|
|
41
41
|
import **a brand preset** (it already bundles `base.css`) and the **component
|
|
42
42
|
styles**:
|
|
43
43
|
|
|
44
|
+
**Leroy Merlin projects**
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
import '@ptlm-azulejo/themes/presets/leroy-merlin.css' // includes base.css
|
|
48
|
+
import '@ptlm-azulejo/button/style.css'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Adeo projects**
|
|
52
|
+
|
|
44
53
|
```js
|
|
45
|
-
import '@ptlm-azulejo/themes/presets/
|
|
54
|
+
import '@ptlm-azulejo/themes/presets/adeo.css' // includes base.css
|
|
46
55
|
import '@ptlm-azulejo/button/style.css'
|
|
47
56
|
```
|
|
48
57
|
|
package/package.json
CHANGED