@ledgerhq/lumen-ui-react 0.1.50 → 0.1.51
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/README.md +11 -1
- package/ai-rules/RULES.md +7 -1
- package/dist/lib/Components/Avatar/resolveAvatarColor.js +13 -13
- package/dist/package.json +3 -1
- package/package.json +4 -2
- package/tailwind.css +16 -0
package/README.md
CHANGED
|
@@ -33,13 +33,23 @@ import type { Config } from 'tailwindcss';
|
|
|
33
33
|
import { ledgerLivePreset } from '@ledgerhq/lumen-design-core';
|
|
34
34
|
|
|
35
35
|
const config = {
|
|
36
|
-
content: ['./src/**/*.{js,ts,jsx,tsx}'
|
|
36
|
+
content: ['./src/**/*.{js,ts,jsx,tsx}'],
|
|
37
37
|
presets: [ledgerLivePreset],
|
|
38
38
|
} satisfies Config;
|
|
39
39
|
|
|
40
40
|
export default config;
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
Then import Lumen's stylesheet next to Tailwind in your main CSS file. It
|
|
44
|
+
registers our compiled components as a Tailwind source, so you never have to
|
|
45
|
+
reference our build layout yourself:
|
|
46
|
+
|
|
47
|
+
```css
|
|
48
|
+
@import 'tailwindcss';
|
|
49
|
+
@import '@ledgerhq/lumen-ui-react/tailwind.css';
|
|
50
|
+
@config '../tailwind.config.ts';
|
|
51
|
+
```
|
|
52
|
+
|
|
43
53
|
### 2. Start Using Components
|
|
44
54
|
|
|
45
55
|
```tsx
|
package/ai-rules/RULES.md
CHANGED
|
@@ -22,7 +22,13 @@ Lumen typography classes set `font-family: Inter` via design tokens. The consume
|
|
|
22
22
|
|
|
23
23
|
### Tailwind Configuration (REQUIRED)
|
|
24
24
|
|
|
25
|
-
- Tailwind
|
|
25
|
+
- Check the installed Tailwind major version first — the two paths differ:
|
|
26
|
+
- **Tailwind v4 (recommended):** the main stylesheet MUST import Lumen's
|
|
27
|
+
stylesheet so Tailwind scans the compiled components:
|
|
28
|
+
`@import '@ledgerhq/lumen-ui-react/tailwind.css';` (add
|
|
29
|
+
`@import '@ledgerhq/lumen-ui-react-visualization/tailwind.css';` when using
|
|
30
|
+
charts). Do NOT also add `./node_modules/@ledgerhq/lumen-ui-react/dist/**` to
|
|
31
|
+
the `content` array — that path is internal and may change in any release.
|
|
26
32
|
- Always use a preset from `@ledgerhq/lumen-design-core`: ledgerLivePreset, enterprisePreset or websitesPreset
|
|
27
33
|
- Import presets: `import { ledgerLivePreset } from '@ledgerhq/lumen-design-core'`
|
|
28
34
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { resolveAvatarColorKey as o } from "../../../libs/utils-shared/dist/index.js";
|
|
2
|
-
import { cssVar as
|
|
3
|
-
const
|
|
4
|
-
orange:
|
|
5
|
-
green:
|
|
6
|
-
blue:
|
|
7
|
-
purple:
|
|
8
|
-
red:
|
|
9
|
-
yellow:
|
|
10
|
-
turquoise:
|
|
11
|
-
pink:
|
|
2
|
+
import { cssVar as r } from "../../../libs/design-core/dist/lib/cssVar/cssVar.js";
|
|
3
|
+
const a = {
|
|
4
|
+
orange: r("var(--background-decorative-orange)"),
|
|
5
|
+
green: r("var(--background-decorative-green)"),
|
|
6
|
+
blue: r("var(--background-decorative-blue)"),
|
|
7
|
+
purple: r("var(--background-decorative-purple)"),
|
|
8
|
+
red: r("var(--background-decorative-red)"),
|
|
9
|
+
yellow: r("var(--background-decorative-yellow)"),
|
|
10
|
+
turquoise: r("var(--background-decorative-turquoise)"),
|
|
11
|
+
pink: r("var(--background-decorative-pink)")
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function t(e) {
|
|
14
|
+
return a[o(e)];
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
t as resolveAvatarColor
|
|
18
18
|
};
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
"./package.json": "./package.json",
|
|
20
|
+
"./tailwind.css": "./tailwind.css",
|
|
20
21
|
".": {
|
|
21
22
|
"types": "./dist/index.d.ts",
|
|
22
23
|
"import": "./dist/index.js",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"files": [
|
|
33
34
|
"dist",
|
|
34
35
|
"ai-rules",
|
|
36
|
+
"tailwind.css",
|
|
35
37
|
"!**/*.tsbuildinfo"
|
|
36
38
|
],
|
|
37
39
|
"nx": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
"./package.json": "./package.json",
|
|
20
|
+
"./tailwind.css": "./tailwind.css",
|
|
20
21
|
".": {
|
|
21
22
|
"types": "./dist/index.d.ts",
|
|
22
23
|
"import": "./dist/index.js",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"files": [
|
|
33
34
|
"dist",
|
|
34
35
|
"ai-rules",
|
|
36
|
+
"tailwind.css",
|
|
35
37
|
"!**/*.tsbuildinfo"
|
|
36
38
|
],
|
|
37
39
|
"nx": {
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
57
|
"class-variance-authority": "^0.7.1",
|
|
56
58
|
"@tanstack/react-table": "^8.21.3",
|
|
57
|
-
"@ledgerhq/lumen-design-core": "0.1.
|
|
59
|
+
"@ledgerhq/lumen-design-core": "0.1.24",
|
|
58
60
|
"clsx": "^2.1.1",
|
|
59
61
|
"react": "^18.0.0 || ^19.0.0",
|
|
60
62
|
"react-dom": "^18.0.0 || ^19.0.0",
|
package/tailwind.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Registers Lumen's compiled components as a Tailwind source.
|
|
3
|
+
*
|
|
4
|
+
* Tailwind only emits a utility it has actually seen in a scanned file, and it
|
|
5
|
+
* skips gitignored paths (node_modules) during automatic detection. Consumers
|
|
6
|
+
* therefore used to copy a `./node_modules/@ledgerhq/lumen-ui-react/dist/lib/**`
|
|
7
|
+
* glob into their own config, which turned our build layout into a de-facto
|
|
8
|
+
* public API: renaming a folder here silently dropped utilities from their CSS,
|
|
9
|
+
* with no build error.
|
|
10
|
+
*
|
|
11
|
+
* `@source` paths resolve relative to the stylesheet that declares them, so the
|
|
12
|
+
* glob lives next to the layout it describes. Consumers only ever hold the
|
|
13
|
+
* stable `@ledgerhq/lumen-ui-react/tailwind.css` specifier — restructuring
|
|
14
|
+
* `dist` becomes a one-line change here instead of a breaking change for them.
|
|
15
|
+
*/
|
|
16
|
+
@source "./dist/lib";
|