@ledgerhq/lumen-ui-react 0.0.62 → 0.0.63
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/ai-rules/README.md +1 -1
- package/ai-rules/RULES.md +3 -3
- package/dist/lib/Components/Dialog/Dialog.d.ts +1 -1
- package/dist/lib/Components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/Dialog.js +56 -48
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +2 -2
- package/dist/lib/Components/Spot/Spot.js +5 -5
- package/dist/lib/Components/Subheader/Subheader.js +1 -1
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +6 -9
- package/dist/lib/Components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/ai-rules/README.md
CHANGED
|
@@ -75,7 +75,7 @@ import { ArrowRight } from '@ledgerhq/lumen-ui-react';
|
|
|
75
75
|
|
|
76
76
|
// ✅ With rules
|
|
77
77
|
import { ArrowRight } from '@ledgerhq/lumen-ui-react/symbols';
|
|
78
|
-
<div className='text-muted heading-
|
|
78
|
+
<div className='text-muted heading-3'>Text</div>;
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
## Auto-Sync Benefits
|
package/ai-rules/RULES.md
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
- Do not use Tailwind Typography utilities (e.g., `font-bold`, `text-sm`, etc.)
|
|
41
41
|
- Use Lumen custom typography utilities:
|
|
42
42
|
- `responsive-display-1` to `responsive-display-4`
|
|
43
|
-
- `heading-0`, `heading-0-semi-bold` through `heading-
|
|
43
|
+
- `heading-0`, `heading-0-semi-bold` through `heading-5`, `heading-5-semi-bold`
|
|
44
44
|
- `body-1`, `body-1-semi-bold` through `body-4`, `body-4-semi-bold`
|
|
45
45
|
|
|
46
46
|
### Colors and Background
|
|
@@ -154,7 +154,7 @@ import { ArrowRight } from '@ledgerhq/lumen-ui-react/symbols';
|
|
|
154
154
|
|
|
155
155
|
const Card = () => (
|
|
156
156
|
<div className='bg-base border border-base rounded-lg p-16'>
|
|
157
|
-
<h2 className='heading-
|
|
157
|
+
<h2 className='heading-4'>Card Title</h2>
|
|
158
158
|
<p className='body-2 text-muted mt-8'>This is a description using proper spacing and typography tokens.</p>
|
|
159
159
|
<Button icon={ArrowRight} className='mt-16'>
|
|
160
160
|
Learn More
|
|
@@ -319,4 +319,4 @@ Use ONLY the unique part after the last hyphen of the CSS variable name.
|
|
|
319
319
|
- Figma shows: a comment with the style name, like `/* body/3 */`
|
|
320
320
|
- Transform: replace `/` with `-`
|
|
321
321
|
- Result: `body-3` (transform `body/3` → `body-3`)
|
|
322
|
-
- Example: `/* heading/2-semi-bold */` → `heading-
|
|
322
|
+
- Example: `/* heading/2-semi-bold */` → `heading-3-semi-bold`
|
|
@@ -73,7 +73,7 @@ export declare function DialogTrigger({ ...props }: DialogTriggerProps): import(
|
|
|
73
73
|
* // With custom styling for layout
|
|
74
74
|
* <DialogContent className="max-w-md">
|
|
75
75
|
* <div className="space-y-4">
|
|
76
|
-
* <h4 className="heading-
|
|
76
|
+
* <h4 className="heading-5-semi-bold">Dialog Title</h4>
|
|
77
77
|
* <p>Detailed content here.</p>
|
|
78
78
|
* </div>
|
|
79
79
|
* </DialogContent>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAEL,kBAAkB,EAIlB,WAAW,EACX,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAwBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,MAAM,CAAC,EAAE,MAAc,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAM/D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAE7D;AAuDD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAEL,kBAAkB,EAIlB,WAAW,EACX,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAwBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,MAAM,CAAC,EAAE,MAAc,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAM/D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAE7D;AAuDD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAkBpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU;;;;+EAsBtB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,YAAY;;;+EAaxB,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as u, cn as l } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import * as r from "@radix-ui/react-dialog";
|
|
4
|
-
import { cva as
|
|
5
|
-
import * as
|
|
6
|
-
const
|
|
7
|
-
height: "hug"
|
|
8
|
-
}), u = m(
|
|
4
|
+
import { cva as h } from "class-variance-authority";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
const [x, s] = u("Dialog"), p = h(
|
|
9
7
|
[
|
|
10
|
-
"w-400
|
|
11
|
-
"
|
|
8
|
+
"flex w-400 max-w-[calc(100%-2rem)] flex-col overflow-hidden rounded-2xl bg-canvas-sheet pb-24",
|
|
9
|
+
"fixed left-[50%] top-[50%] z-dialog-content translate-x-[-50%] translate-y-[-50%]",
|
|
12
10
|
"data-[state=closed]:animate-content-hide data-[state=open]:animate-content-show"
|
|
13
11
|
],
|
|
14
12
|
{
|
|
@@ -23,85 +21,95 @@ const d = i.createContext({
|
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
23
|
);
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */ o(
|
|
24
|
+
function C({ height: a = "hug", ...t }) {
|
|
25
|
+
return /* @__PURE__ */ o(x, { value: { height: a }, children: /* @__PURE__ */ o(r.Root, { "data-slot": "dialog", ...t }) });
|
|
28
26
|
}
|
|
29
|
-
function
|
|
27
|
+
function R({ ...a }) {
|
|
30
28
|
return /* @__PURE__ */ o(r.Trigger, { "data-slot": "dialog-trigger", ...a });
|
|
31
29
|
}
|
|
32
|
-
function
|
|
30
|
+
function v({
|
|
33
31
|
...a
|
|
34
32
|
}) {
|
|
35
33
|
return /* @__PURE__ */ o(r.Portal, { "data-slot": "dialog-portal", ...a });
|
|
36
34
|
}
|
|
37
|
-
const
|
|
35
|
+
const d = n.forwardRef(
|
|
38
36
|
({ className: a, ...t }, e) => /* @__PURE__ */ o(
|
|
39
37
|
r.Overlay,
|
|
40
38
|
{
|
|
41
39
|
ref: e,
|
|
42
40
|
"data-slot": "dialog-overlay",
|
|
43
|
-
className:
|
|
41
|
+
className: l(
|
|
44
42
|
a,
|
|
45
|
-
"z-dialog-overlay bg-canvas-overlay data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in
|
|
43
|
+
"fixed inset-0 z-dialog-overlay bg-canvas-overlay backdrop-blur-sm data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"
|
|
46
44
|
),
|
|
47
45
|
...t
|
|
48
46
|
}
|
|
49
47
|
)
|
|
50
48
|
);
|
|
51
|
-
|
|
52
|
-
function
|
|
49
|
+
d.displayName = "DialogOverlay";
|
|
50
|
+
function O({
|
|
53
51
|
className: a,
|
|
54
52
|
children: t,
|
|
55
53
|
...e
|
|
56
54
|
}) {
|
|
57
|
-
const { height:
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
const { height: i } = s({
|
|
56
|
+
consumerName: "DialogContent",
|
|
57
|
+
contextRequired: !0
|
|
58
|
+
});
|
|
59
|
+
return /* @__PURE__ */ m(v, { "data-slot": "dialog-portal", children: [
|
|
60
|
+
/* @__PURE__ */ o(d, {}),
|
|
60
61
|
/* @__PURE__ */ o(
|
|
61
62
|
r.Content,
|
|
62
63
|
{
|
|
63
64
|
"data-slot": "dialog-content",
|
|
64
|
-
className:
|
|
65
|
+
className: l(p({ height: i }), a),
|
|
65
66
|
...e,
|
|
66
67
|
children: t
|
|
67
68
|
}
|
|
68
69
|
)
|
|
69
70
|
] });
|
|
70
71
|
}
|
|
71
|
-
const
|
|
72
|
-
({ className: a, children: t, scrollbarWidth: e = "none", style:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
72
|
+
const y = n.forwardRef(
|
|
73
|
+
({ className: a, children: t, scrollbarWidth: e = "none", style: i, ...g }, c) => {
|
|
74
|
+
const { height: f } = s({
|
|
75
|
+
consumerName: "DialogBody",
|
|
76
|
+
contextRequired: !0
|
|
77
|
+
});
|
|
78
|
+
return /* @__PURE__ */ o(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
ref: c,
|
|
82
|
+
"data-slot": "dialog-body",
|
|
83
|
+
style: { scrollbarWidth: e, ...i },
|
|
84
|
+
className: l(
|
|
85
|
+
"-mb-24 flex min-h-0 grow flex-col overflow-y-auto px-24 pb-24",
|
|
86
|
+
f === "hug" ? "basis-auto" : "basis-0",
|
|
87
|
+
a
|
|
88
|
+
),
|
|
89
|
+
...g,
|
|
90
|
+
children: t
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
86
94
|
);
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
({ className: a, children: t, ...e },
|
|
95
|
+
y.displayName = "DialogBody";
|
|
96
|
+
const D = n.forwardRef(
|
|
97
|
+
({ className: a, children: t, ...e }, i) => /* @__PURE__ */ o(
|
|
90
98
|
"div",
|
|
91
99
|
{
|
|
92
|
-
ref:
|
|
100
|
+
ref: i,
|
|
93
101
|
"data-slot": "dialog-footer",
|
|
94
|
-
className:
|
|
102
|
+
className: l("flex shrink-0 justify-end gap-8 px-24 pt-24", a),
|
|
95
103
|
...e,
|
|
96
104
|
children: t
|
|
97
105
|
}
|
|
98
106
|
)
|
|
99
107
|
);
|
|
100
|
-
|
|
108
|
+
D.displayName = "DialogFooter";
|
|
101
109
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
C as Dialog,
|
|
111
|
+
y as DialogBody,
|
|
112
|
+
O as DialogContent,
|
|
113
|
+
D as DialogFooter,
|
|
114
|
+
R as DialogTrigger
|
|
107
115
|
};
|
|
@@ -79,7 +79,7 @@ const y = b("flex px-24 text-base", {
|
|
|
79
79
|
"pl-40": !i
|
|
80
80
|
}),
|
|
81
81
|
children: [
|
|
82
|
-
o && /* @__PURE__ */ e("div", { className: "
|
|
82
|
+
o && /* @__PURE__ */ e("div", { className: "heading-5-semi-bold truncate text-center", children: o }),
|
|
83
83
|
l && /* @__PURE__ */ e("div", { className: "truncate text-center text-muted body-2", children: l })
|
|
84
84
|
]
|
|
85
85
|
}
|
|
@@ -92,7 +92,7 @@ const y = b("flex px-24 text-base", {
|
|
|
92
92
|
/* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(d, { onClose: n }) })
|
|
93
93
|
] }),
|
|
94
94
|
(o || l) && /* @__PURE__ */ t("div", { className: "flex flex-col gap-4", children: [
|
|
95
|
-
o && /* @__PURE__ */ e("div", { className: "heading-
|
|
95
|
+
o && /* @__PURE__ */ e("div", { className: "heading-3-semi-bold", children: o }),
|
|
96
96
|
l && /* @__PURE__ */ e("div", { className: "text-muted body-2", children: l })
|
|
97
97
|
] })
|
|
98
98
|
] })
|
|
@@ -20,7 +20,7 @@ const F = h(
|
|
|
20
20
|
warning: "text-warning",
|
|
21
21
|
info: "text-muted",
|
|
22
22
|
loader: "",
|
|
23
|
-
number: "text-base
|
|
23
|
+
number: "heading-5 text-base"
|
|
24
24
|
},
|
|
25
25
|
disabled: {
|
|
26
26
|
true: "text-disabled"
|
|
@@ -41,10 +41,10 @@ const F = h(
|
|
|
41
41
|
72: 40
|
|
42
42
|
}, m = {
|
|
43
43
|
32: "body-2-semi-bold",
|
|
44
|
-
48: "heading-
|
|
45
|
-
56: "heading-
|
|
46
|
-
72: "heading-
|
|
47
|
-
}, t = l[o] ?? 20, n = m[o] ?? "heading-
|
|
44
|
+
48: "heading-5",
|
|
45
|
+
56: "heading-4",
|
|
46
|
+
72: "heading-2"
|
|
47
|
+
}, t = l[o] ?? 20, n = m[o] ?? "heading-5", p = f(() => {
|
|
48
48
|
switch (r.appearance) {
|
|
49
49
|
case "icon": {
|
|
50
50
|
const { icon: u } = r;
|
|
@@ -24,7 +24,7 @@ const a = ({ children: e }) => /* @__PURE__ */ i("div", { className: "flex shrin
|
|
|
24
24
|
...d,
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
27
|
-
/* @__PURE__ */ i("h2", { className: "min-w-0 truncate
|
|
27
|
+
/* @__PURE__ */ i("h2", { className: "heading-5-semi-bold min-w-0 truncate", children: m }),
|
|
28
28
|
u
|
|
29
29
|
] }),
|
|
30
30
|
S
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/Tile.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EACpB,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AAgEjB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI;sIAWd,SAAS;;CAqFX,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa;;CAM5C,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,WAAW;wCAIrB,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/Tile.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EACpB,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AAgEjB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI;sIAWd,SAAS;;CAqFX,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa;;CAM5C,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,WAAW;wCAIrB,gBAAgB;;CASlB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,SAAS;wCAInB,cAAc;;CAiBhB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,eAAe;wCAIzB,oBAAoB;;CAiBtB,CAAC;AAGF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB;sEAM7B,wBAAwB;;CAmC1B,CAAC"}
|
|
@@ -73,7 +73,7 @@ const [V, u] = C("Tile"), v = {
|
|
|
73
73
|
onMouseLeave: r,
|
|
74
74
|
...x
|
|
75
75
|
}) => {
|
|
76
|
-
const [
|
|
76
|
+
const [y, f] = I(!1), { slotElement: N, remainingChildren: g } = q(
|
|
77
77
|
m,
|
|
78
78
|
T
|
|
79
79
|
), h = n(
|
|
@@ -100,7 +100,7 @@ const [V, u] = C("Tile"), v = {
|
|
|
100
100
|
...x,
|
|
101
101
|
className: v.root({
|
|
102
102
|
appearance: s,
|
|
103
|
-
isActive:
|
|
103
|
+
isActive: y,
|
|
104
104
|
disabled: t,
|
|
105
105
|
className: e
|
|
106
106
|
}),
|
|
@@ -122,10 +122,10 @@ const [V, u] = C("Tile"), v = {
|
|
|
122
122
|
disabled: t,
|
|
123
123
|
"data-disabled": t || void 0,
|
|
124
124
|
className: v.button(),
|
|
125
|
-
children:
|
|
125
|
+
children: g
|
|
126
126
|
}
|
|
127
127
|
),
|
|
128
|
-
|
|
128
|
+
N
|
|
129
129
|
]
|
|
130
130
|
}
|
|
131
131
|
) });
|
|
@@ -146,10 +146,7 @@ const P = ({
|
|
|
146
146
|
}) => /* @__PURE__ */ l(
|
|
147
147
|
"div",
|
|
148
148
|
{
|
|
149
|
-
className: d(
|
|
150
|
-
"flex w-full flex-col items-center gap-4 text-center",
|
|
151
|
-
i
|
|
152
|
-
),
|
|
149
|
+
className: d("flex w-full flex-col items-center text-center", i),
|
|
153
150
|
...s,
|
|
154
151
|
children: e
|
|
155
152
|
}
|
|
@@ -224,7 +221,7 @@ const T = ({
|
|
|
224
221
|
{
|
|
225
222
|
"data-slot": "tile-secondary-action",
|
|
226
223
|
className: d(
|
|
227
|
-
"absolute right-
|
|
224
|
+
"absolute right-4 top-8 opacity-0 transition-opacity duration-200 focus-within:opacity-100 group-hover:opacity-100",
|
|
228
225
|
s
|
|
229
226
|
),
|
|
230
227
|
"data-secondary-button-container": !0,
|
|
@@ -93,7 +93,7 @@ export declare const TooltipTrigger: ({ ...props }: TooltipTriggerProps) => impo
|
|
|
93
93
|
* // With custom styling for layout
|
|
94
94
|
* <TooltipContent sideOffset={12} className="max-w-xs">
|
|
95
95
|
* <div className="space-y-2">
|
|
96
|
-
* <h4 className="heading-
|
|
96
|
+
* <h4 className="heading-2">Tip Title</h4>
|
|
97
97
|
* <p>Detailed explanation of the feature.</p>
|
|
98
98
|
* </div>
|
|
99
99
|
* </TooltipContent>
|
package/dist/package.json
CHANGED