@ledgerhq/lumen-ui-react 0.1.21 → 0.1.22
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/dist/index.js +121 -121
- package/dist/lib/Components/ListItem/ListItem.d.ts +2 -2
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +87 -51
- package/dist/lib/Components/ListItem/types.d.ts +9 -9
- package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/lib/Components/MediaButton/MediaButton.d.ts +30 -0
- package/dist/lib/Components/MediaButton/MediaButton.d.ts.map +1 -0
- package/dist/lib/Components/{TriggerButton/TriggerButton.js → MediaButton/MediaButton.js} +24 -23
- package/dist/lib/Components/MediaButton/index.d.ts +3 -0
- package/dist/lib/Components/MediaButton/index.d.ts.map +1 -0
- package/dist/lib/Components/{TriggerButton → MediaButton}/types.d.ts +9 -4
- package/dist/lib/Components/MediaButton/types.d.ts.map +1 -0
- package/dist/lib/Components/Popover/Popover.d.ts +1 -1
- package/dist/lib/Components/Popover/Popover.d.ts.map +1 -1
- package/dist/lib/Components/Popover/Popover.js +36 -34
- package/dist/lib/Components/Popover/types.d.ts +11 -1
- package/dist/lib/Components/Popover/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.d.ts +2 -3
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +132 -139
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/index.d.ts.map +1 -1
- package/dist/lib/Components/Select/types.d.ts +2 -10
- package/dist/lib/Components/Select/types.d.ts.map +1 -1
- package/dist/lib/Components/ThemeProvider/ThemeProvider.d.ts +7 -0
- package/dist/lib/Components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/lib/Components/ThemeProvider/ThemeProvider.js +24 -18
- package/dist/lib/Components/ThemeProvider/ThemeProvider.types.d.ts +7 -1
- package/dist/lib/Components/ThemeProvider/ThemeProvider.types.d.ts.map +1 -1
- package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.d.ts +10 -5
- package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.d.ts.map +1 -1
- package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.js +22 -21
- package/dist/lib/Components/index.d.ts +1 -1
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/package.json +3 -2
- package/package.json +2 -1
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts +0 -30
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +0 -1
- package/dist/lib/Components/TriggerButton/index.d.ts +0 -3
- package/dist/lib/Components/TriggerButton/index.d.ts.map +0 -1
- package/dist/lib/Components/TriggerButton/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/ThemeProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/ThemeProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,aAAa,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { ColorSchemeName } from './ThemeProvider.types';
|
|
2
2
|
export declare const LIGHT_MODE = "light";
|
|
3
3
|
export declare const DARK_MODE = "dark";
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Returns the resolved color scheme ('light' | 'dark'), handling 'system' by
|
|
6
|
+
* subscribing to `prefers-color-scheme` changes.
|
|
7
|
+
*
|
|
8
|
+
* When colorScheme is explicit ('light' | 'dark'), the media-query listener
|
|
9
|
+
* is skipped entirely to avoid unnecessary subscriptions and re-renders.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useResolvedColorScheme: (colorScheme: ColorSchemeName) => "light" | "dark";
|
|
5
12
|
/**
|
|
6
13
|
* Updates the root element className when the theme mode changes.
|
|
7
|
-
* This allows the design-system theme config to be applied
|
|
14
|
+
* This allows the design-system theme config to be applied.
|
|
8
15
|
*/
|
|
9
|
-
export declare const useRootColorModeSideEffect: (
|
|
10
|
-
colorScheme: ColorSchemeName;
|
|
11
|
-
}) => void;
|
|
16
|
+
export declare const useRootColorModeSideEffect: (resolvedColorScheme: "light" | "dark") => void;
|
|
12
17
|
//# sourceMappingURL=useRootColorModeSideEffect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRootColorModeSideEffect.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/useRootColorModeSideEffect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEvE,eAAO,MAAM,UAAU,UAAU,CAAC;AAClC,eAAO,MAAM,SAAS,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useRootColorModeSideEffect.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/useRootColorModeSideEffect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEvE,eAAO,MAAM,UAAU,UAAU,CAAC;AAClC,eAAO,MAAM,SAAS,SAAS,CAAC;AAchC;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,eAAe,KAC3B,OAAO,GAAG,MAQZ,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GACrC,qBAAqB,OAAO,GAAG,MAAM,KACpC,IAMF,CAAC"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { useLayoutEffect as
|
|
2
|
-
import { COLOR_SCHEMES as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, [
|
|
1
|
+
import { useSyncExternalStore as o, useLayoutEffect as s } from "react";
|
|
2
|
+
import { COLOR_SCHEMES as r } from "./ThemeProvider.types.js";
|
|
3
|
+
const n = "light", c = "dark", m = () => window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", i = (e) => {
|
|
4
|
+
const t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
5
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
6
|
+
}, d = () => () => {
|
|
7
|
+
}, h = (e) => {
|
|
8
|
+
const t = e === r.system;
|
|
9
|
+
return o(
|
|
10
|
+
t ? i : d,
|
|
11
|
+
t ? m : () => e,
|
|
12
|
+
() => "light"
|
|
13
|
+
);
|
|
14
|
+
}, E = (e) => {
|
|
15
|
+
s(() => {
|
|
16
|
+
const t = window.document.documentElement;
|
|
17
|
+
t.classList.remove(n, c), t.classList.add(e);
|
|
18
|
+
}, [e]);
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
c as DARK_MODE,
|
|
22
|
+
n as LIGHT_MODE,
|
|
23
|
+
h as useResolvedColorScheme,
|
|
24
|
+
E as useRootColorModeSideEffect
|
|
24
25
|
};
|
|
@@ -18,6 +18,7 @@ export * from './InteractiveIcon';
|
|
|
18
18
|
export * from './Link';
|
|
19
19
|
export * from './ListItem';
|
|
20
20
|
export * from './MediaBanner';
|
|
21
|
+
export * from './MediaButton';
|
|
21
22
|
export * from './MediaCard';
|
|
22
23
|
export * from './MediaImage';
|
|
23
24
|
export * from './Menu';
|
|
@@ -27,7 +28,6 @@ export * from './PageIndicator';
|
|
|
27
28
|
export * from './SearchInput';
|
|
28
29
|
export * from './SegmentedControl';
|
|
29
30
|
export * from './Select';
|
|
30
|
-
export * from './TriggerButton';
|
|
31
31
|
export * from './SideBar';
|
|
32
32
|
export * from './Skeleton';
|
|
33
33
|
export * from './Spinner';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,Y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WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
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.21",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -55,9 +55,10 @@
|
|
|
55
55
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
57
|
"@tanstack/react-table": "^8.21.3",
|
|
58
|
+
"@ledgerhq/lumen-design-core": "0.1.10",
|
|
58
59
|
"clsx": "^2.1.1",
|
|
59
60
|
"react": "^18.0.0 || ^19.0.0",
|
|
60
61
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
61
62
|
"tailwind-merge": "^2.6.0"
|
|
62
63
|
}
|
|
63
|
-
}
|
|
64
|
+
}
|
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.22",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
57
|
"@tanstack/react-table": "^8.21.3",
|
|
58
|
+
"@ledgerhq/lumen-design-core": "0.1.10",
|
|
58
59
|
"clsx": "^2.1.1",
|
|
59
60
|
"react": "^18.0.0 || ^19.0.0",
|
|
60
61
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { TriggerButtonProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Trigger button for select/dropdown components. Displays a label with an optional
|
|
4
|
-
* leading icon and a trailing chevron indicator.
|
|
5
|
-
*
|
|
6
|
-
* This component is intended to be used exclusively as the trigger inside a Select or
|
|
7
|
-
* dropdown pattern. It should not be used as a standalone action button — use `Button`
|
|
8
|
-
* or `IconButton` instead.
|
|
9
|
-
*
|
|
10
|
-
* @see {@link https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=6389-45680 Figma}
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* import { TriggerButton } from '@ledgerhq/lumen-ui-react';
|
|
14
|
-
* import { Settings } from '@ledgerhq/lumen-ui-react/symbols';
|
|
15
|
-
*
|
|
16
|
-
* // With flat interface icon
|
|
17
|
-
* <TriggerButton icon={<Settings size={20} />} iconType="flat">
|
|
18
|
-
* Network
|
|
19
|
-
* </TriggerButton>
|
|
20
|
-
*
|
|
21
|
-
* // With rounded crypto icon
|
|
22
|
-
* <TriggerButton icon={<CryptoIcon ledgerId="bitcoin" size="32px" />} iconType="rounded">
|
|
23
|
-
* Bitcoin
|
|
24
|
-
* </TriggerButton>
|
|
25
|
-
*
|
|
26
|
-
* // Without icon
|
|
27
|
-
* <TriggerButton>All accounts</TriggerButton>
|
|
28
|
-
*/
|
|
29
|
-
export declare const TriggerButton: ({ ref, className, appearance, size, disabled: disabledProp, asChild, icon, iconType, children, ...props }: TriggerButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
//# sourceMappingURL=TriggerButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/TriggerButton/TriggerButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA4BlD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,aAAa,GAAI,2GAW3B,kBAAkB,4CAmCpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/TriggerButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/TriggerButton/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,eAAe,CAAC;IACtD;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC,GAC7D,qBAAqB,CAAC,QAAQ,CAAC,CAAC"}
|