@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
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Banner as x } from "./lib/Components/Banner/Banner.js";
|
|
|
7
7
|
import { BaseInput as u } from "./lib/Components/BaseInput/BaseInput.js";
|
|
8
8
|
import { Button as S } from "./lib/Components/Button/Button.js";
|
|
9
9
|
import { BaseButton as c } from "./lib/Components/Button/BaseButton.js";
|
|
10
|
-
import { Card as b, CardContent as I, CardContentDescription as s, CardContentRow as
|
|
10
|
+
import { Card as b, CardContent as I, CardContentDescription as s, CardContentRow as M, CardContentTitle as D, CardFooter as L, CardFooterActions as h, CardHeader as v, CardLeading as R, CardTrailing as w } from "./lib/Components/Card/Card.js";
|
|
11
11
|
import { CardButton as y } from "./lib/Components/CardButton/CardButton.js";
|
|
12
12
|
import { ContentBanner as P, ContentBannerContent as k, ContentBannerDescription as N, ContentBannerTitle as G } from "./lib/Components/ContentBanner/ContentBanner.js";
|
|
13
13
|
import { Checkbox as F } from "./lib/Components/Checkbox/Checkbox.js";
|
|
@@ -22,31 +22,31 @@ import { IconButton as me } from "./lib/Components/IconButton/IconButton.js";
|
|
|
22
22
|
import { InteractiveIcon as Te } from "./lib/Components/InteractiveIcon/InteractiveIcon.js";
|
|
23
23
|
import { Link as fe } from "./lib/Components/Link/Link.js";
|
|
24
24
|
import { ListItem as Ce, ListItemContent as Se, ListItemContentRow as ge, ListItemDescription as ce, ListItemLeading as Be, ListItemTitle as be, ListItemTrailing as Ie } from "./lib/Components/ListItem/ListItem.js";
|
|
25
|
-
import { MediaBanner as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { SideBar as
|
|
37
|
-
import { Skeleton as
|
|
38
|
-
import { Spinner as
|
|
39
|
-
import { Spot as
|
|
40
|
-
import { Stepper as
|
|
41
|
-
import { Subheader as
|
|
42
|
-
import { Switch as
|
|
43
|
-
import { Table as
|
|
44
|
-
import { Tag as
|
|
45
|
-
import { TextInput as
|
|
46
|
-
import { Tile as
|
|
47
|
-
import { TileButton as
|
|
48
|
-
import { Tooltip as
|
|
49
|
-
import { ThemeProvider as Ht } from "./lib/Components/ThemeProvider/ThemeProvider.js";
|
|
25
|
+
import { MediaBanner as Me, MediaBannerDescription as De, MediaBannerTitle as Le } from "./lib/Components/MediaBanner/MediaBanner.js";
|
|
26
|
+
import { MediaButton as ve } from "./lib/Components/MediaButton/MediaButton.js";
|
|
27
|
+
import { MediaCard as we, MediaCardTitle as Ae } from "./lib/Components/MediaCard/MediaCard.js";
|
|
28
|
+
import { MediaImage as He } from "./lib/Components/MediaImage/MediaImage.js";
|
|
29
|
+
import { Menu as ke, MenuCheckboxItem as Ne, MenuContent as Ge, MenuGroup as Ee, MenuItem as Fe, MenuLabel as ze, MenuPortal as Oe, MenuRadioGroup as _e, MenuRadioItem as je, MenuSeparator as qe, MenuSub as Je, MenuSubContent as Ke, MenuSubTrigger as Qe, MenuTrigger as Ue } from "./lib/Components/Menu/Menu.js";
|
|
30
|
+
import { NavBar as We, NavBarBackButton as Xe, NavBarCoinCapsule as Ye, NavBarTitle as Ze, NavBarTrailing as $e } from "./lib/Components/NavBar/NavBar.js";
|
|
31
|
+
import { Popover as oo, PopoverContent as to, PopoverTrigger as ro, createPopoverHandle as ao } from "./lib/Components/Popover/Popover.js";
|
|
32
|
+
import { PageIndicator as io } from "./lib/Components/PageIndicator/PageIndicator.js";
|
|
33
|
+
import { SearchInput as lo } from "./lib/Components/SearchInput/SearchInput.js";
|
|
34
|
+
import { SegmentedControl as To, SegmentedControlButton as xo } from "./lib/Components/SegmentedControl/SegmentedControl.js";
|
|
35
|
+
import { Select as uo, SelectContent as Co, SelectEmptyState as So, SelectItem as go, SelectItemContent as co, SelectItemDescription as Bo, SelectItemText as bo, SelectList as Io, SelectSearch as so, SelectSeparator as Mo, SelectTrigger as Do } from "./lib/Components/Select/Select.js";
|
|
36
|
+
import { SideBar as ho, SideBarCollapseToggle as vo, SideBarItem as Ro, SideBarLeading as wo, SideBarTrailing as Ao } from "./lib/Components/SideBar/SideBar.js";
|
|
37
|
+
import { Skeleton as Ho } from "./lib/Components/Skeleton/Skeleton.js";
|
|
38
|
+
import { Spinner as ko } from "./lib/Components/Spinner/Spinner.js";
|
|
39
|
+
import { Spot as Go } from "./lib/Components/Spot/Spot.js";
|
|
40
|
+
import { Stepper as Fo } from "./lib/Components/Stepper/Stepper.js";
|
|
41
|
+
import { Subheader as Oo, SubheaderCount as _o, SubheaderDescription as jo, SubheaderInfo as qo, SubheaderRow as Jo, SubheaderShowMore as Ko, SubheaderTitle as Qo } from "./lib/Components/Subheader/Subheader.js";
|
|
42
|
+
import { Switch as Vo } from "./lib/Components/Switch/Switch.js";
|
|
43
|
+
import { Table as Xo, TableActionBar as Yo, TableActionBarLeading as Zo, TableActionBarTrailing as $o, TableBody as et, TableCell as ot, TableCellContent as tt, TableGroupHeaderRow as rt, TableHeader as at, TableHeaderCell as nt, TableHeaderRow as it, TableInfoIcon as pt, TableLoadingRow as lt, TableRoot as mt, TableRow as dt, TableSortButton as Tt } from "./lib/Components/Table/Table.js";
|
|
44
|
+
import { Tag as ft } from "./lib/Components/Tag/Tag.js";
|
|
45
|
+
import { TextInput as Ct } from "./lib/Components/TextInput/TextInput.js";
|
|
46
|
+
import { Tile as gt, TileContent as ct, TileDescription as Bt, TileSecondaryAction as bt, TileTitle as It, TileTrailingContent as st } from "./lib/Components/Tile/Tile.js";
|
|
47
|
+
import { TileButton as Dt } from "./lib/Components/TileButton/TileButton.js";
|
|
48
|
+
import { Tooltip as ht, TooltipContent as vt, TooltipProvider as Rt, TooltipTrigger as wt } from "./lib/Components/Tooltip/Tooltip.js";
|
|
49
|
+
import { ThemeProvider as yt, useTheme as Ht } from "./lib/Components/ThemeProvider/ThemeProvider.js";
|
|
50
50
|
import { COLOR_SCHEMES as kt } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
|
|
51
51
|
export {
|
|
52
52
|
a as AddressInput,
|
|
@@ -62,8 +62,8 @@ export {
|
|
|
62
62
|
y as CardButton,
|
|
63
63
|
I as CardContent,
|
|
64
64
|
s as CardContentDescription,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
M as CardContentRow,
|
|
66
|
+
D as CardContentTitle,
|
|
67
67
|
L as CardFooter,
|
|
68
68
|
h as CardFooterActions,
|
|
69
69
|
v as CardHeader,
|
|
@@ -98,100 +98,100 @@ export {
|
|
|
98
98
|
Be as ListItemLeading,
|
|
99
99
|
be as ListItemTitle,
|
|
100
100
|
Ie as ListItemTrailing,
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
Me as MediaBanner,
|
|
102
|
+
De as MediaBannerDescription,
|
|
103
103
|
Le as MediaBannerTitle,
|
|
104
|
-
ve as
|
|
105
|
-
|
|
106
|
-
Ae as
|
|
107
|
-
He as
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
Ue as
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
lo as
|
|
132
|
-
|
|
133
|
-
xo as
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
Do as
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
to as createPopoverHandle,
|
|
104
|
+
ve as MediaButton,
|
|
105
|
+
we as MediaCard,
|
|
106
|
+
Ae as MediaCardTitle,
|
|
107
|
+
He as MediaImage,
|
|
108
|
+
ke as Menu,
|
|
109
|
+
Ne as MenuCheckboxItem,
|
|
110
|
+
Ge as MenuContent,
|
|
111
|
+
Ee as MenuGroup,
|
|
112
|
+
Fe as MenuItem,
|
|
113
|
+
ze as MenuLabel,
|
|
114
|
+
Oe as MenuPortal,
|
|
115
|
+
_e as MenuRadioGroup,
|
|
116
|
+
je as MenuRadioItem,
|
|
117
|
+
qe as MenuSeparator,
|
|
118
|
+
Je as MenuSub,
|
|
119
|
+
Ke as MenuSubContent,
|
|
120
|
+
Qe as MenuSubTrigger,
|
|
121
|
+
Ue as MenuTrigger,
|
|
122
|
+
We as NavBar,
|
|
123
|
+
Xe as NavBarBackButton,
|
|
124
|
+
Ye as NavBarCoinCapsule,
|
|
125
|
+
Ze as NavBarTitle,
|
|
126
|
+
$e as NavBarTrailing,
|
|
127
|
+
io as PageIndicator,
|
|
128
|
+
oo as Popover,
|
|
129
|
+
to as PopoverContent,
|
|
130
|
+
ro as PopoverTrigger,
|
|
131
|
+
lo as SearchInput,
|
|
132
|
+
To as SegmentedControl,
|
|
133
|
+
xo as SegmentedControlButton,
|
|
134
|
+
uo as Select,
|
|
135
|
+
Co as SelectContent,
|
|
136
|
+
So as SelectEmptyState,
|
|
137
|
+
go as SelectItem,
|
|
138
|
+
co as SelectItemContent,
|
|
139
|
+
Bo as SelectItemDescription,
|
|
140
|
+
bo as SelectItemText,
|
|
141
|
+
Io as SelectList,
|
|
142
|
+
so as SelectSearch,
|
|
143
|
+
Mo as SelectSeparator,
|
|
144
|
+
Do as SelectTrigger,
|
|
145
|
+
ho as SideBar,
|
|
146
|
+
vo as SideBarCollapseToggle,
|
|
147
|
+
Ro as SideBarItem,
|
|
148
|
+
wo as SideBarLeading,
|
|
149
|
+
Ao as SideBarTrailing,
|
|
150
|
+
Ho as Skeleton,
|
|
151
|
+
ko as Spinner,
|
|
152
|
+
Go as Spot,
|
|
153
|
+
Fo as Stepper,
|
|
154
|
+
Oo as Subheader,
|
|
155
|
+
_o as SubheaderCount,
|
|
156
|
+
jo as SubheaderDescription,
|
|
157
|
+
qo as SubheaderInfo,
|
|
158
|
+
Jo as SubheaderRow,
|
|
159
|
+
Ko as SubheaderShowMore,
|
|
160
|
+
Qo as SubheaderTitle,
|
|
161
|
+
Vo as Switch,
|
|
162
|
+
Xo as Table,
|
|
163
|
+
Yo as TableActionBar,
|
|
164
|
+
Zo as TableActionBarLeading,
|
|
165
|
+
$o as TableActionBarTrailing,
|
|
166
|
+
et as TableBody,
|
|
167
|
+
ot as TableCell,
|
|
168
|
+
tt as TableCellContent,
|
|
169
|
+
rt as TableGroupHeaderRow,
|
|
170
|
+
at as TableHeader,
|
|
171
|
+
nt as TableHeaderCell,
|
|
172
|
+
it as TableHeaderRow,
|
|
173
|
+
pt as TableInfoIcon,
|
|
174
|
+
lt as TableLoadingRow,
|
|
175
|
+
mt as TableRoot,
|
|
176
|
+
dt as TableRow,
|
|
177
|
+
Tt as TableSortButton,
|
|
178
|
+
ft as Tag,
|
|
179
|
+
Ct as TextInput,
|
|
180
|
+
yt as ThemeProvider,
|
|
181
|
+
gt as Tile,
|
|
182
|
+
Dt as TileButton,
|
|
183
|
+
ct as TileContent,
|
|
184
|
+
Bt as TileDescription,
|
|
185
|
+
bt as TileSecondaryAction,
|
|
186
|
+
It as TileTitle,
|
|
187
|
+
st as TileTrailingContent,
|
|
188
|
+
ht as Tooltip,
|
|
189
|
+
vt as TooltipContent,
|
|
190
|
+
Rt as TooltipProvider,
|
|
191
|
+
wt as TooltipTrigger,
|
|
192
|
+
ao as createPopoverHandle,
|
|
194
193
|
ie as mediaImageDotSizeMap,
|
|
195
194
|
pe as spotDotSizeMap,
|
|
196
|
-
J as useLumenDataTable
|
|
195
|
+
J as useLumenDataTable,
|
|
196
|
+
Ht as useTheme
|
|
197
197
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListItemProps, ListItemContentProps, ListItemLeadingProps, ListItemContentRowProps, ListItemTitleProps, ListItemDescriptionProps, ListItemTrailingProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* A flexible list item component that provides a composable structure for displaying
|
|
4
4
|
* interactive list items with leading content, title, description, and trailing content.
|
|
@@ -21,7 +21,7 @@ import { ListItemContentProps, ListItemDescriptionProps, ListItemLeadingProps, L
|
|
|
21
21
|
* </ListItemTrailing>
|
|
22
22
|
* </ListItem>
|
|
23
23
|
*/
|
|
24
|
-
export declare const ListItem: ({ ref, ...props }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const ListItem: ({ onClick, ref, ...props }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
/**
|
|
26
26
|
* Container for the leading (left) part of the list item.
|
|
27
27
|
* Contains the visual element (Spot, Avatar, Icon) and the content (title + description).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ListItem/ListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAsCjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,GAAI,4BAA4B,aAAa,4CAgCjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,wCAK7B,oBAAoB,4CAUtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,wCAK7B,oBAAoB,4CAUtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,wCAKhC,uBAAuB,4CAmBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,wCAK3B,kBAAkB,4CAwBpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,wCAKjC,wBAAwB,4CAwB1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAK9B,qBAAqB,4CAqBvB,CAAC"}
|
|
@@ -1,69 +1,105 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useDisabledContext as
|
|
3
|
-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useDisabledContext as c, DisabledProvider as x, cn as r, getButtonA11yProps as b, createSafeContext as f } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as p } from "class-variance-authority";
|
|
4
|
+
const [I, l] = f("ListItemTrailing", {
|
|
4
5
|
isInTrailing: !1
|
|
5
|
-
}),
|
|
6
|
-
|
|
6
|
+
}), g = p(
|
|
7
|
+
[
|
|
8
|
+
"flex w-full items-center gap-16 px-8",
|
|
9
|
+
"rounded-md bg-base-transparent text-base transition-colors"
|
|
10
|
+
],
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
density: {
|
|
14
|
+
compact: "h-40",
|
|
15
|
+
expanded: "h-64"
|
|
16
|
+
},
|
|
17
|
+
interactive: {
|
|
18
|
+
true: "",
|
|
19
|
+
false: ""
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
true: "cursor-default bg-base-transparent text-disabled",
|
|
23
|
+
false: ""
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
compoundVariants: [
|
|
27
|
+
{
|
|
28
|
+
interactive: !0,
|
|
29
|
+
disabled: !1,
|
|
30
|
+
className: "cursor-pointer hover:bg-base-transparent-hover focus-visible:outline-2 focus-visible:outline-focus active:bg-base-transparent-pressed"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
), T = ({ onClick: e, ref: t, ...s }) => {
|
|
35
|
+
const {
|
|
36
|
+
children: i,
|
|
37
|
+
className: n,
|
|
38
|
+
disabled: o = !1,
|
|
39
|
+
density: m = "expanded",
|
|
40
|
+
...u
|
|
41
|
+
} = s, d = c({
|
|
7
42
|
consumerName: "ListItem",
|
|
8
|
-
mergeWith: { disabled:
|
|
43
|
+
mergeWith: { disabled: o }
|
|
9
44
|
});
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
"
|
|
45
|
+
return /* @__PURE__ */ a(x, { value: { disabled: d }, children: /* @__PURE__ */ a(
|
|
46
|
+
"div",
|
|
12
47
|
{
|
|
13
|
-
ref:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
48
|
+
ref: t,
|
|
49
|
+
...b({ onClick: e, disabled: d }),
|
|
50
|
+
className: r(
|
|
51
|
+
g({
|
|
52
|
+
density: m,
|
|
53
|
+
interactive: !!e,
|
|
54
|
+
disabled: d
|
|
55
|
+
}),
|
|
56
|
+
n
|
|
21
57
|
),
|
|
22
|
-
...
|
|
23
|
-
children:
|
|
58
|
+
...u,
|
|
59
|
+
children: i
|
|
24
60
|
}
|
|
25
61
|
) });
|
|
26
|
-
},
|
|
62
|
+
}, y = ({
|
|
27
63
|
ref: e,
|
|
28
64
|
children: t,
|
|
29
65
|
className: s,
|
|
30
66
|
...i
|
|
31
|
-
}) => /* @__PURE__ */
|
|
67
|
+
}) => /* @__PURE__ */ a(
|
|
32
68
|
"div",
|
|
33
69
|
{
|
|
34
70
|
ref: e,
|
|
35
|
-
className:
|
|
71
|
+
className: r("flex min-w-0 flex-1 items-center gap-12", s),
|
|
36
72
|
...i,
|
|
37
73
|
children: t
|
|
38
74
|
}
|
|
39
|
-
),
|
|
75
|
+
), h = ({
|
|
40
76
|
ref: e,
|
|
41
77
|
children: t,
|
|
42
78
|
className: s,
|
|
43
79
|
...i
|
|
44
|
-
}) => /* @__PURE__ */
|
|
80
|
+
}) => /* @__PURE__ */ a(
|
|
45
81
|
"div",
|
|
46
82
|
{
|
|
47
83
|
ref: e,
|
|
48
|
-
className:
|
|
84
|
+
className: r("flex min-w-0 flex-1 flex-col gap-4", s),
|
|
49
85
|
...i,
|
|
50
86
|
children: t
|
|
51
87
|
}
|
|
52
|
-
),
|
|
88
|
+
), w = ({
|
|
53
89
|
ref: e,
|
|
54
90
|
children: t,
|
|
55
91
|
className: s,
|
|
56
92
|
...i
|
|
57
93
|
}) => {
|
|
58
|
-
const { isInTrailing: n } =
|
|
94
|
+
const { isInTrailing: n } = l({
|
|
59
95
|
consumerName: "ListItemContentRow",
|
|
60
96
|
contextRequired: !1
|
|
61
97
|
});
|
|
62
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ a(
|
|
63
99
|
"div",
|
|
64
100
|
{
|
|
65
101
|
ref: e,
|
|
66
|
-
className:
|
|
102
|
+
className: r(
|
|
67
103
|
"flex min-w-0 items-center gap-8",
|
|
68
104
|
n && "justify-end",
|
|
69
105
|
s
|
|
@@ -72,25 +108,25 @@ const [b, d] = u("ListItemTrailing", {
|
|
|
72
108
|
children: t
|
|
73
109
|
}
|
|
74
110
|
);
|
|
75
|
-
},
|
|
111
|
+
}, R = ({
|
|
76
112
|
ref: e,
|
|
77
113
|
children: t,
|
|
78
114
|
className: s,
|
|
79
115
|
...i
|
|
80
116
|
}) => {
|
|
81
|
-
const n =
|
|
117
|
+
const n = c({
|
|
82
118
|
consumerName: "ListItemTitle",
|
|
83
119
|
contextRequired: !0
|
|
84
|
-
}), { isInTrailing: o } =
|
|
120
|
+
}), { isInTrailing: o } = l({
|
|
85
121
|
consumerName: "ListItemTitle",
|
|
86
122
|
contextRequired: !1
|
|
87
123
|
});
|
|
88
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ a(
|
|
89
125
|
"div",
|
|
90
126
|
{
|
|
91
127
|
ref: e,
|
|
92
|
-
className:
|
|
93
|
-
"min-w-0
|
|
128
|
+
className: r(
|
|
129
|
+
"min-w-0 truncate body-2-semi-bold",
|
|
94
130
|
o ? "justify-end text-end" : "justify-start text-start",
|
|
95
131
|
n && "text-disabled",
|
|
96
132
|
s
|
|
@@ -99,25 +135,25 @@ const [b, d] = u("ListItemTrailing", {
|
|
|
99
135
|
children: t
|
|
100
136
|
}
|
|
101
137
|
);
|
|
102
|
-
},
|
|
138
|
+
}, j = ({
|
|
103
139
|
ref: e,
|
|
104
140
|
children: t,
|
|
105
141
|
className: s,
|
|
106
142
|
...i
|
|
107
143
|
}) => {
|
|
108
|
-
const n =
|
|
144
|
+
const n = c({
|
|
109
145
|
consumerName: "ListItemDescription",
|
|
110
146
|
contextRequired: !0
|
|
111
|
-
}), { isInTrailing: o } =
|
|
147
|
+
}), { isInTrailing: o } = l({
|
|
112
148
|
consumerName: "ListItemDescription",
|
|
113
149
|
contextRequired: !1
|
|
114
150
|
});
|
|
115
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ a(
|
|
116
152
|
"div",
|
|
117
153
|
{
|
|
118
154
|
ref: e,
|
|
119
|
-
className:
|
|
120
|
-
"min-w-0
|
|
155
|
+
className: r(
|
|
156
|
+
"min-w-0 items-center truncate body-3 text-muted",
|
|
121
157
|
o ? "justify-end text-end" : "justify-start text-start",
|
|
122
158
|
n && "text-disabled",
|
|
123
159
|
s
|
|
@@ -126,21 +162,21 @@ const [b, d] = u("ListItemTrailing", {
|
|
|
126
162
|
children: t
|
|
127
163
|
}
|
|
128
164
|
);
|
|
129
|
-
},
|
|
165
|
+
}, q = ({
|
|
130
166
|
ref: e,
|
|
131
167
|
children: t,
|
|
132
168
|
className: s,
|
|
133
169
|
...i
|
|
134
170
|
}) => {
|
|
135
|
-
const n =
|
|
171
|
+
const n = c({
|
|
136
172
|
consumerName: "ListItemTrailing",
|
|
137
173
|
contextRequired: !0
|
|
138
174
|
});
|
|
139
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ a(I, { value: { isInTrailing: !0 }, children: /* @__PURE__ */ a(
|
|
140
176
|
"div",
|
|
141
177
|
{
|
|
142
178
|
ref: e,
|
|
143
|
-
className:
|
|
179
|
+
className: r(
|
|
144
180
|
"flex shrink-0 items-center",
|
|
145
181
|
n && "text-disabled",
|
|
146
182
|
s
|
|
@@ -151,11 +187,11 @@ const [b, d] = u("ListItemTrailing", {
|
|
|
151
187
|
) });
|
|
152
188
|
};
|
|
153
189
|
export {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
190
|
+
T as ListItem,
|
|
191
|
+
h as ListItemContent,
|
|
192
|
+
w as ListItemContentRow,
|
|
193
|
+
j as ListItemDescription,
|
|
194
|
+
y as ListItemLeading,
|
|
195
|
+
R as ListItemTitle,
|
|
196
|
+
q as ListItemTrailing
|
|
161
197
|
};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
* Context value for passing state to sub-components
|
|
4
|
-
*/
|
|
5
|
-
export type ListItemContextValue = {
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
};
|
|
1
|
+
import { Density } from '@ledgerhq/lumen-utils-shared';
|
|
2
|
+
import { ComponentPropsWithRef, MouseEventHandler, ReactNode } from 'react';
|
|
8
3
|
/**
|
|
9
4
|
* Props for the ListItem root component
|
|
10
5
|
*/
|
|
@@ -13,6 +8,11 @@ export type ListItemProps = {
|
|
|
13
8
|
* The content of the list item (ListItemLeading, ListItemTrailing)
|
|
14
9
|
*/
|
|
15
10
|
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The density of the list item.
|
|
13
|
+
* @default 'expanded'
|
|
14
|
+
*/
|
|
15
|
+
density?: Density;
|
|
16
16
|
/**
|
|
17
17
|
* custom classname
|
|
18
18
|
*/
|
|
@@ -24,8 +24,8 @@ export type ListItemProps = {
|
|
|
24
24
|
/**
|
|
25
25
|
* Callback function when the list item is pressed.
|
|
26
26
|
*/
|
|
27
|
-
onClick?:
|
|
28
|
-
} & Omit<ComponentPropsWithRef<'
|
|
27
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
28
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
29
29
|
/**
|
|
30
30
|
* Props for the ListItemLeading component
|
|
31
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ListItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ListItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EACV,MAAM,OAAO,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MediaButtonProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Media 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 { MediaButton } from '@ledgerhq/lumen-ui-react';
|
|
14
|
+
* import { Settings } from '@ledgerhq/lumen-ui-react/symbols';
|
|
15
|
+
*
|
|
16
|
+
* // With flat interface icon
|
|
17
|
+
* <MediaButton icon={<Settings size={20} />} iconType="flat">
|
|
18
|
+
* Network
|
|
19
|
+
* </MediaButton>
|
|
20
|
+
*
|
|
21
|
+
* // With rounded crypto icon
|
|
22
|
+
* <MediaButton icon={<CryptoIcon ledgerId="bitcoin" size="32px" />} iconType="rounded">
|
|
23
|
+
* Bitcoin
|
|
24
|
+
* </MediaButton>
|
|
25
|
+
*
|
|
26
|
+
* // Without icon
|
|
27
|
+
* <MediaButton>All accounts</MediaButton>
|
|
28
|
+
*/
|
|
29
|
+
export declare const MediaButton: ({ ref, className, appearance, size, disabled: disabledProp, asChild, icon, iconType, hideChevron, children, ...props }: MediaButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=MediaButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaButton/MediaButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA4BhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,WAAW,GAAI,wHAYzB,gBAAgB,4CAmClB,CAAC"}
|