@ledgerhq/lumen-ui-react 0.1.21 → 0.1.23
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/i18n/I18nProvider.d.ts.map +1 -1
- package/dist/i18n/i18n.d.ts.map +1 -1
- package/dist/index.js +121 -121
- package/dist/lib/Components/AddressInput/AddressInput.d.ts.map +1 -1
- package/dist/lib/Components/AddressInput/types.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/lib/Components/Banner/Banner.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/lib/Components/Button/Button.d.ts.map +1 -1
- package/dist/lib/Components/Button/types.d.ts.map +1 -1
- package/dist/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/types.d.ts.map +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/lib/Components/Checkbox/types.d.ts +1 -1
- package/dist/lib/Components/Checkbox/types.d.ts.map +1 -1
- package/dist/lib/Components/ContentBanner/ContentBanner.d.ts.map +1 -1
- package/dist/lib/Components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/lib/Components/DataTable/types.d.ts.map +1 -1
- package/dist/lib/Components/DataTable/useLumenDataTable/useLumenDataTable.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/DialogClose/DialogClose.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts.map +1 -1
- package/dist/lib/Components/Divider/Divider.d.ts.map +1 -1
- package/dist/lib/Components/DotSymbol/DotSymbol.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.d.ts.map +1 -1
- package/dist/lib/Components/Icon/createIcon.d.ts.map +1 -1
- package/dist/lib/Components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/lib/Components/IconButton/types.d.ts.map +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
- package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/types.d.ts.map +1 -1
- 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/MediaBanner/MediaBanner.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/MediaCard/MediaCard.d.ts.map +1 -1
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/PageIndicator/PageIndicator.d.ts.map +1 -1
- 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/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.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/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Skeleton/types.d.ts.map +1 -1
- package/dist/lib/Components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/lib/Components/Spinner/types.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.d.ts.map +1 -1
- package/dist/lib/Components/Spot/types.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/types.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
- package/dist/lib/Components/Switch/types.d.ts +1 -1
- package/dist/lib/Components/Switch/types.d.ts.map +1 -1
- package/dist/lib/Components/Table/Table.d.ts.map +1 -1
- package/dist/lib/Components/Table/types.d.ts.map +1 -1
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/types.d.ts.map +1 -1
- package/dist/lib/Components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/lib/Components/TextInput/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 -7
- package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.d.ts.map +1 -1
- package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.js +20 -21
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/types.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/types.d.ts.map +1 -1
- package/dist/lib/Components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/lib/Components/Tooltip/types.d.ts +1 -1
- package/dist/lib/Components/Tooltip/types.d.ts.map +1 -1
- package/dist/lib/Components/index.d.ts +1 -1
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/package.json +2 -1
- package/dist/utils/icon-template.d.ts.map +1 -1
- 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,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaBanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaBanner/MediaBanner.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"MediaBanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaBanner/MediaBanner.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,2EAQzB,gBAAgB,4CAmDlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAK9B,qBAAqB,4CAUvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,4CAU7B,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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useDisabledContext as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { baseButtonVariants as
|
|
6
|
-
import { ChevronDown as
|
|
7
|
-
const
|
|
2
|
+
import { useDisabledContext as u, cn as b } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { Slot as x, Slottable as T } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as z } from "class-variance-authority";
|
|
5
|
+
import { baseButtonVariants as g } from "../Button/BaseButton.js";
|
|
6
|
+
import { ChevronDown as v } from "../../Symbols/Icons/ChevronDown.js";
|
|
7
|
+
const N = z("gap-8 body-2-semi-bold", {
|
|
8
8
|
variants: {
|
|
9
9
|
size: {
|
|
10
10
|
sm: "",
|
|
@@ -31,45 +31,46 @@ const v = b("gap-8 body-2-semi-bold", {
|
|
|
31
31
|
}), S = ({
|
|
32
32
|
ref: i,
|
|
33
33
|
className: p,
|
|
34
|
-
appearance:
|
|
35
|
-
size:
|
|
36
|
-
disabled:
|
|
34
|
+
appearance: l = "gray",
|
|
35
|
+
size: m = "md",
|
|
36
|
+
disabled: r = !1,
|
|
37
37
|
asChild: n = !1,
|
|
38
38
|
icon: s,
|
|
39
39
|
iconType: c = "flat",
|
|
40
|
+
hideChevron: d = !1,
|
|
40
41
|
children: o,
|
|
41
|
-
...
|
|
42
|
+
...f
|
|
42
43
|
}) => {
|
|
43
|
-
const a =
|
|
44
|
-
consumerName: "
|
|
45
|
-
mergeWith: { disabled:
|
|
46
|
-
}),
|
|
44
|
+
const a = u({
|
|
45
|
+
consumerName: "MediaButton",
|
|
46
|
+
mergeWith: { disabled: r }
|
|
47
|
+
}), y = s ? c : "none";
|
|
47
48
|
return /* @__PURE__ */ t(
|
|
48
|
-
n ?
|
|
49
|
+
n ? x : "button",
|
|
49
50
|
{
|
|
50
51
|
ref: i,
|
|
51
|
-
className:
|
|
52
|
-
|
|
53
|
-
appearance:
|
|
52
|
+
className: b(
|
|
53
|
+
g({
|
|
54
|
+
appearance: l,
|
|
54
55
|
disabled: a,
|
|
55
56
|
loading: !1
|
|
56
57
|
}),
|
|
57
|
-
|
|
58
|
+
N({ size: m, iconType: y }),
|
|
58
59
|
p
|
|
59
60
|
),
|
|
60
61
|
"data-disabled": a || void 0,
|
|
61
62
|
disabled: a,
|
|
62
|
-
...
|
|
63
|
+
...f,
|
|
63
64
|
children: [
|
|
64
65
|
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s }),
|
|
65
66
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-2", children: [
|
|
66
|
-
n ? /* @__PURE__ */ e(
|
|
67
|
-
/* @__PURE__ */ e(
|
|
67
|
+
n ? /* @__PURE__ */ e(T, { children: o }) : /* @__PURE__ */ e("span", { className: "line-clamp-1 text-left", children: o }),
|
|
68
|
+
!d && /* @__PURE__ */ e(v, { size: 20 })
|
|
68
69
|
] })
|
|
69
70
|
]
|
|
70
71
|
}
|
|
71
72
|
);
|
|
72
73
|
};
|
|
73
74
|
export {
|
|
74
|
-
S as
|
|
75
|
+
S as MediaButton
|
|
75
76
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,cAAc,SAAS,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { BaseButtonProps } from '../Button/types';
|
|
3
|
-
export type
|
|
3
|
+
export type MediaButtonProps = {
|
|
4
4
|
/**
|
|
5
|
-
* The visual style of the
|
|
5
|
+
* The visual style of the media button.
|
|
6
6
|
* @default 'gray'
|
|
7
7
|
*/
|
|
8
8
|
appearance?: 'gray' | 'transparent' | 'no-background';
|
|
9
9
|
/**
|
|
10
|
-
* The size variant of the
|
|
10
|
+
* The size variant of the media button.
|
|
11
11
|
* @default 'md'
|
|
12
12
|
*/
|
|
13
13
|
size?: 'sm' | 'md';
|
|
@@ -26,7 +26,12 @@ export type TriggerButtonProps = {
|
|
|
26
26
|
*/
|
|
27
27
|
iconType?: 'flat' | 'rounded';
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* When true, hides the trailing chevron indicator.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
hideChevron?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The label content of the media button.
|
|
30
35
|
*/
|
|
31
36
|
children: ReactNode;
|
|
32
37
|
} & Pick<BaseButtonProps, 'disabled' | 'className' | 'asChild'> & ComponentPropsWithRef<'button'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaButton/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;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;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC,GAC7D,qBAAqB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaCard/MediaCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA+
|
|
1
|
+
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaCard/MediaCard.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA+CnE,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,4CAUrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,SAAS,GAAI,oFASvB,cAAc,4CAwDhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaImage.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaImage/MediaImage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MediaImage.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaImage/MediaImage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0B/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAI,iEASxB,eAAe,4CA8BjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACpB,MAAM,SAAS,CAAC;AA0BjB,iBAAS,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAEpC;AAED,QAAA,MAAM,WAAW,GAAI,mBAAmB,gBAAgB,4CAMvD,CAAC;AAEF,iBAAS,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAE9C;AAED,iBAAS,UAAU,CAAC,EAClB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,2CAErD;AAED,iBAAS,OAAO,CAAC,EACf,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,GAAG,CAAC,2CAElD;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAIxD;AAED,QAAA,MAAM,cAAc,GAAI,+CAMrB,mBAAmB,4CAUrB,CAAC;AAEF,QAAA,MAAM,cAAc,GAAI,8BAA8B,mBAAmB,4CAOxE,CAAC;AAEF,QAAA,MAAM,WAAW,GAAI,iDAMlB,gBAAgB,4CAkBlB,CAAC;AAEF,QAAA,MAAM,QAAQ,GAAI,6DAMf,aAAa,4CAiBf,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAI,yEAOvB,qBAAqB,4CAyBvB,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,gEAMpB,kBAAkB,4CAwBpB,CAAC;AAEF,QAAA,MAAM,SAAS,GAAI,qCAKhB,cAAc,GAAG;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;CAC7D,4CAOA,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,8BAA8B,kBAAkB,4CAEtE,CAAC;AAEF,OAAO,EACL,IAAI,EACJ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,UAAU,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACd,cAAc,GACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinCapsule.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/CoinCapsule.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"CoinCapsule.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/CoinCapsule.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,mCAKzB,gBAAgB,4CAgBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,mCAK/B,sBAAsB,4CAIxB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,uDAK9B,qBAAqB,4CAevB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,8CAKzB,gBAAgB,4CAclB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,GAAG;IACvB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,4CAWA,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,MAAM,GAAI,wCAAwC,WAAW,4CAWzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageIndicator.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/PageIndicator/PageIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"PageIndicator.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/PageIndicator/PageIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAqFlD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,uDAM3B,kBAAkB,4CA4CpB,CAAC"}
|
|
@@ -34,7 +34,7 @@ declare const PopoverTrigger: <Payload>({ handle, payload, render, className, ..
|
|
|
34
34
|
*
|
|
35
35
|
* @see {@link https://ldls.vercel.app/?path=/docs/components-popover-overview--docs Storybook}
|
|
36
36
|
*/
|
|
37
|
-
declare const PopoverContent: ({ side, sideOffset, align, width, className, children, }: PopoverContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare const PopoverContent: ({ side, sideOffset, align, width, initialFocus, className, children, }: PopoverContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
/**
|
|
39
39
|
* Creates a handle for connecting a `Popover` with detached `PopoverTrigger` components.
|
|
40
40
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AA4CjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,OAAO,GAAI,OAAO,EAAG,iEAOxB,YAAY,CAAC,OAAO,CAAC,4CAcvB,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,cAAc,GAAI,OAAO,EAAG,kDAM/B,mBAAmB,CAAC,OAAO,CAAC,4CAS9B,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,cAAc,GAAI,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AA4CjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,OAAO,GAAI,OAAO,EAAG,iEAOxB,YAAY,CAAC,OAAO,CAAC,4CAcvB,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,cAAc,GAAI,OAAO,EAAG,kDAM/B,mBAAmB,CAAC,OAAO,CAAC,4CAS9B,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,cAAc,GAAI,wEAQrB,mBAAmB,4CA+BrB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,mBAAmB,sCAAgC,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { createSafeContext as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { createPopoverHandle as
|
|
5
|
-
import { PopoverRoot as
|
|
6
|
-
import { PopoverTrigger as
|
|
7
|
-
import { PopoverPortal as
|
|
8
|
-
import { PopoverBackdrop as
|
|
9
|
-
import { PopoverPositioner as
|
|
10
|
-
import { PopoverPopup as
|
|
11
|
-
const [
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as l, cn as p } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as v } from "class-variance-authority";
|
|
4
|
+
import { createPopoverHandle as c } from "../../../node_modules/@base-ui/react/esm/popover/store/PopoverHandle.js";
|
|
5
|
+
import { PopoverRoot as f } from "../../../node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js";
|
|
6
|
+
import { PopoverTrigger as P } from "../../../node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js";
|
|
7
|
+
import { PopoverPortal as u } from "../../../node_modules/@base-ui/react/esm/popover/portal/PopoverPortal.js";
|
|
8
|
+
import { PopoverBackdrop as g } from "../../../node_modules/@base-ui/react/esm/popover/backdrop/PopoverBackdrop.js";
|
|
9
|
+
import { PopoverPositioner as h } from "../../../node_modules/@base-ui/react/esm/popover/positioner/PopoverPositioner.js";
|
|
10
|
+
import { PopoverPopup as x } from "../../../node_modules/@base-ui/react/esm/popover/popup/PopoverPopup.js";
|
|
11
|
+
const [b, y] = l("Popover"), C = v(
|
|
12
12
|
["overflow-hidden rounded-md bg-canvas-sheet p-16 outline-none", "shadow-xl"],
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
@@ -39,19 +39,19 @@ const [x, b] = m("Popover"), y = l(
|
|
|
39
39
|
width: "fit"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
),
|
|
42
|
+
), w = p(
|
|
43
43
|
"fixed inset-0 z-dialog-overlay bg-canvas-overlay-subtle",
|
|
44
44
|
"data-open:animate-fade-in",
|
|
45
45
|
"data-closed:animate-fade-out"
|
|
46
|
-
),
|
|
46
|
+
), B = ({
|
|
47
47
|
open: o,
|
|
48
48
|
defaultOpen: a,
|
|
49
49
|
onOpenChange: r,
|
|
50
50
|
overlay: e = !1,
|
|
51
51
|
handle: n,
|
|
52
52
|
children: i
|
|
53
|
-
}) => /* @__PURE__ */ t(
|
|
54
|
-
|
|
53
|
+
}) => /* @__PURE__ */ t(b, { value: { overlay: e }, children: /* @__PURE__ */ t(
|
|
54
|
+
f,
|
|
55
55
|
{
|
|
56
56
|
open: o,
|
|
57
57
|
defaultOpen: a,
|
|
@@ -60,14 +60,14 @@ const [x, b] = m("Popover"), y = l(
|
|
|
60
60
|
handle: n,
|
|
61
61
|
children: i
|
|
62
62
|
}
|
|
63
|
-
) }),
|
|
63
|
+
) }), O = ({
|
|
64
64
|
handle: o,
|
|
65
65
|
payload: a,
|
|
66
66
|
render: r,
|
|
67
67
|
className: e,
|
|
68
68
|
...n
|
|
69
69
|
}) => /* @__PURE__ */ t(
|
|
70
|
-
|
|
70
|
+
P,
|
|
71
71
|
{
|
|
72
72
|
"data-slot": "popover-trigger",
|
|
73
73
|
handle: o,
|
|
@@ -76,28 +76,29 @@ const [x, b] = m("Popover"), y = l(
|
|
|
76
76
|
className: p("data-popup-open:z-menu", e),
|
|
77
77
|
...n
|
|
78
78
|
}
|
|
79
|
-
),
|
|
79
|
+
), V = ({
|
|
80
80
|
side: o = "bottom",
|
|
81
81
|
sideOffset: a = 8,
|
|
82
82
|
align: r = "start",
|
|
83
83
|
width: e = "fit",
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
initialFocus: n = !1,
|
|
85
|
+
className: i,
|
|
86
|
+
children: s
|
|
86
87
|
}) => {
|
|
87
|
-
const { overlay:
|
|
88
|
+
const { overlay: d } = y({
|
|
88
89
|
consumerName: "PopoverContent",
|
|
89
90
|
contextRequired: !0
|
|
90
91
|
});
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
return /* @__PURE__ */ m(u, { children: [
|
|
93
|
+
d && /* @__PURE__ */ t(
|
|
94
|
+
g,
|
|
94
95
|
{
|
|
95
96
|
"data-slot": "popover-overlay",
|
|
96
|
-
className:
|
|
97
|
+
className: w
|
|
97
98
|
}
|
|
98
99
|
),
|
|
99
100
|
/* @__PURE__ */ t(
|
|
100
|
-
|
|
101
|
+
h,
|
|
101
102
|
{
|
|
102
103
|
"data-slot": "popover-positioner",
|
|
103
104
|
className: "z-menu",
|
|
@@ -105,20 +106,21 @@ const [x, b] = m("Popover"), y = l(
|
|
|
105
106
|
sideOffset: a,
|
|
106
107
|
align: r,
|
|
107
108
|
children: /* @__PURE__ */ t(
|
|
108
|
-
|
|
109
|
+
x,
|
|
109
110
|
{
|
|
110
111
|
"data-slot": "popover-content",
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
initialFocus: n,
|
|
113
|
+
className: p(C({ width: e, side: o }), i),
|
|
114
|
+
children: s
|
|
113
115
|
}
|
|
114
116
|
)
|
|
115
117
|
}
|
|
116
118
|
)
|
|
117
119
|
] });
|
|
118
|
-
},
|
|
120
|
+
}, A = c;
|
|
119
121
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
B as Popover,
|
|
123
|
+
V as PopoverContent,
|
|
124
|
+
O as PopoverTrigger,
|
|
125
|
+
A as createPopoverHandle
|
|
124
126
|
};
|