@ledgerhq/react-ui 0.48.0 → 0.49.0-nightly.20260317030141
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/lib/cjs/components/index.js +10 -33
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/components/message/Tooltip/Tooltip.stories.js +10 -33
- package/lib/cjs/components/message/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/cjs/components/message/Tooltip/index.js +8 -31
- package/lib/cjs/components/message/Tooltip/index.js.map +1 -1
- package/lib/cjs/components/message/index.js +10 -33
- package/lib/cjs/components/message/index.js.map +1 -1
- package/lib/cjs/index.js +10 -33
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/pre-ldls/components/index.js +18 -38
- package/lib/cjs/pre-ldls/components/index.js.map +1 -1
- package/lib/cjs/pre-ldls/index.js +18 -39
- package/lib/cjs/pre-ldls/index.js.map +1 -1
- package/lib/components/message/Tooltip/index.d.ts.map +1 -1
- package/lib/components/message/Tooltip/index.js +5 -25
- package/lib/components/message/Tooltip/index.js.map +1 -1
- package/lib/pre-ldls/components/index.d.ts +0 -1
- package/lib/pre-ldls/components/index.d.ts.map +1 -1
- package/lib/pre-ldls/components/index.js +0 -1
- package/lib/pre-ldls/components/index.js.map +1 -1
- package/package.json +13 -3
- package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.js +0 -1776
- package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.js.map +0 -1
- package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js +0 -1835
- package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js.map +0 -1
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.d.ts +0 -6
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.d.ts.map +0 -1
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.js +0 -6
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.js.map +0 -1
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.d.ts +0 -10
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.d.ts.map +0 -1
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js +0 -20
- package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGnD,KAAK,SAAS,GACV,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,GACV,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;AAIf,MAAM,WAAW,KAAM,SAAQ,UAAU;IACvC,4CAA4C;IAC5C,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAoBhF"}
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { isForwardRef } from "react-is";
|
|
1
|
+
import React, { useRef } from "react";
|
|
3
2
|
import Tippy from "@tippyjs/react";
|
|
4
3
|
import Text from "../../asorted/Text";
|
|
5
|
-
// Tippyjs need the ref to be forwarded to the DOM element wrapping the children.
|
|
6
|
-
// This component has been created to add a wrapping span and use its ref when needed.
|
|
7
|
-
// See: https://github.com/atomiks/tippyjs-react#component-children
|
|
8
|
-
const Wrapper = forwardRef((props, ref) => {
|
|
9
|
-
const childrenCount = React.Children.count(props.children);
|
|
10
|
-
try {
|
|
11
|
-
const child = React.Children.only(props.children);
|
|
12
|
-
const isValidElement = React.isValidElement(child);
|
|
13
|
-
const isForwardingRef = isForwardRef(child);
|
|
14
|
-
const isDomElement = isValidElement && typeof child.type === "string";
|
|
15
|
-
if (isForwardingRef || isDomElement) {
|
|
16
|
-
return React.cloneElement(child, { ref });
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return React.createElement("span", { ref: ref }, props.children);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
return childrenCount < 1 ? null : React.createElement("span", { ref: ref }, props.children);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
4
|
export default function Tooltip(props) {
|
|
27
5
|
const { content, placement = "auto", children, ...rest } = props;
|
|
28
|
-
|
|
29
|
-
|
|
6
|
+
const triggerRef = useRef(null);
|
|
7
|
+
return (React.createElement(React.Fragment, null,
|
|
8
|
+
React.createElement("span", { ref: triggerRef, style: { display: "inline-flex" } }, children),
|
|
9
|
+
React.createElement(Tippy, { ...rest, reference: triggerRef, placement: placement, content: React.createElement(Text, { fontWeight: "medium", variant: "paragraph", color: "neutral.c00" }, content) })));
|
|
30
10
|
}
|
|
31
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/message/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/message/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAqB,MAAM,gBAAgB,CAAC;AACnD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AA0BtC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAsB;IACpD,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACjE,MAAM,UAAU,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAC;IACjD,OAAO,CACL;QACE,8BAAM,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,IACrD,QAAQ,CACJ;QACP,oBAAC,KAAK,OACA,IAAI,EACR,SAAS,EAAE,UAAsC,EACjD,SAAS,EAAE,SAAS,EACpB,OAAO,EACL,oBAAC,IAAI,IAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,aAAa,IAChE,OAAO,CACH,GAET,CACD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,6 @@ export * from "./Address/Address";
|
|
|
4
4
|
export * from "./AssetItem/AssetItem";
|
|
5
5
|
export * from "./AssetList/AssetList";
|
|
6
6
|
export * from "./CardButton/CardButton";
|
|
7
|
-
export * from "./ApyIndicator/ApyIndicator";
|
|
8
7
|
export * from "./MarketPriceIndicator/MarketPriceIndicator";
|
|
9
8
|
export * from "./MarketPercentIndicator/MarketPercentIndicator";
|
|
10
9
|
export * from "./Input/Input";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
|
|
@@ -4,7 +4,6 @@ export * from "./Address/Address";
|
|
|
4
4
|
export * from "./AssetItem/AssetItem";
|
|
5
5
|
export * from "./AssetList/AssetList";
|
|
6
6
|
export * from "./CardButton/CardButton";
|
|
7
|
-
export * from "./ApyIndicator/ApyIndicator";
|
|
8
7
|
export * from "./MarketPriceIndicator/MarketPriceIndicator";
|
|
9
8
|
export * from "./MarketPercentIndicator/MarketPercentIndicator";
|
|
10
9
|
export * from "./Input/Input";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0-nightly.20260317030141",
|
|
4
4
|
"description": "Ledger Live - Desktop UI",
|
|
5
5
|
"author": "Ledger Wallet Team <team-live@ledger.fr>",
|
|
6
6
|
"repository": {
|
|
@@ -23,10 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"./*": {
|
|
26
|
+
"@ledgerhq/source": [
|
|
27
|
+
"./src/*.ts",
|
|
28
|
+
"./src/*.tsx"
|
|
29
|
+
],
|
|
26
30
|
"require": "./lib/cjs/*.js",
|
|
27
31
|
"default": "./lib/*.js"
|
|
28
32
|
},
|
|
29
33
|
"./*.js": {
|
|
34
|
+
"@ledgerhq/source": [
|
|
35
|
+
"./src/*.ts",
|
|
36
|
+
"./src/*.tsx"
|
|
37
|
+
],
|
|
30
38
|
"require": "./lib/cjs/*.js",
|
|
31
39
|
"default": "./lib/*.js"
|
|
32
40
|
},
|
|
@@ -43,10 +51,12 @@
|
|
|
43
51
|
"./assets/fonts/Inter-Regular.woff2": "./lib/assets/fonts/Inter-Regular.woff2",
|
|
44
52
|
"./assets/fonts/Inter-SemiBold.woff2": "./lib/assets/fonts/Inter-SemiBold.woff2",
|
|
45
53
|
".": {
|
|
54
|
+
"@ledgerhq/source": "./src/index.ts",
|
|
46
55
|
"require": "./lib/cjs/index.js",
|
|
47
56
|
"default": "./lib/index.js"
|
|
48
57
|
},
|
|
49
58
|
"./pre-ldls": {
|
|
59
|
+
"@ledgerhq/source": "./src/pre-ldls/index.ts",
|
|
50
60
|
"require": "./lib/cjs/pre-ldls/index.js",
|
|
51
61
|
"default": "./lib/pre-ldls/index.js"
|
|
52
62
|
},
|
|
@@ -147,14 +157,14 @@
|
|
|
147
157
|
"scripts": {
|
|
148
158
|
"storybook": "storybook dev -p 6006",
|
|
149
159
|
"build": "tsc -p tsconfig.prod.json && node scripts/transpile && node scripts/postBuild",
|
|
150
|
-
"prebuild:storybook": "pnpm -F ui-shared -F icons-ui
|
|
160
|
+
"prebuild:storybook": "pnpm -F ui-shared -F icons-ui build",
|
|
151
161
|
"build:storybook": "storybook build",
|
|
152
162
|
"watch": "tsc -p tsconfig.prod.json --watch",
|
|
153
163
|
"clean": "rimraf lib",
|
|
154
164
|
"lint": "eslint src --ext .js,.jsx,.ts,.tsx --cache",
|
|
155
165
|
"lint:fix": "pnpm lint --fix",
|
|
156
166
|
"lint:css": "stylelint './src/**/*.{js,jsx,ts,tsx}' --fix",
|
|
157
|
-
"typecheck": "tsc --p . --noEmit",
|
|
167
|
+
"typecheck": "tsc --p . --noEmit --customConditions node",
|
|
158
168
|
"test": "pnpm -w -F ui build-and-test",
|
|
159
169
|
"test:jest": "jest --maxWorkers=50%",
|
|
160
170
|
"test:jest:coverage": "pnpm test:jest --ci --coverage",
|