@ledgerhq/lumen-ui-react 0.1.20 → 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/Banner/Banner.js +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +2 -2
- package/dist/lib/Components/Dialog/Dialog.d.ts +1 -1
- package/dist/lib/Components/Dialog/Dialog.js +4 -4
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts +1 -1
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +31 -31
- package/dist/lib/Components/Dialog/types.d.ts +3 -2
- package/dist/lib/Components/Dialog/types.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.js +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +2 -2
- package/dist/lib/Components/Link/Link.js +2 -2
- 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/Spot/Spot.js +2 -2
- package/dist/lib/Components/Switch/Switch.js +1 -1
- package/dist/lib/Components/Tag/Tag.js +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":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components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AAe,EACf,gBAAgB,GACjB,CAAC"}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { useDisabledContext as q, cn as l } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as z } from "class-variance-authority";
|
|
4
4
|
import { useLayoutEffect as D } from "react";
|
|
5
5
|
import { SelectProvider as G, useSelectContext as m } from "./SelectContext.js";
|
|
6
6
|
import { useControllableState as k } from "../../../utils/useControllableState/useControllableState.js";
|
|
7
7
|
import { useSelectItems as E } from "./useSelectItems/useSelectItems.js";
|
|
8
|
-
import { SearchInput as
|
|
9
|
-
import { Check as
|
|
10
|
-
import { Divider as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { ComboboxRoot as J } from "../../../node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js";
|
|
8
|
+
import { SearchInput as F } from "../SearchInput/SearchInput.js";
|
|
9
|
+
import { Check as W } from "../../Symbols/Icons/Check.js";
|
|
10
|
+
import { Divider as A } from "../Divider/Divider.js";
|
|
11
|
+
import { ChevronDown as B } from "../../Symbols/Icons/ChevronDown.js";
|
|
12
|
+
import { ComboboxRoot as H } from "../../../node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js";
|
|
14
13
|
import { ComboboxTrigger as b } from "../../../node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js";
|
|
15
|
-
import { ComboboxPortal as
|
|
16
|
-
import { ComboboxPositioner as
|
|
17
|
-
import { ComboboxPopup as
|
|
18
|
-
import { ComboboxInput as
|
|
19
|
-
import { ComboboxList as
|
|
20
|
-
import { ComboboxGroup as
|
|
21
|
-
import { ComboboxCollection as
|
|
22
|
-
import { ComboboxItem as
|
|
23
|
-
import { ComboboxItemIndicator as
|
|
24
|
-
import { ComboboxEmpty as
|
|
14
|
+
import { ComboboxPortal as J } from "../../../node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js";
|
|
15
|
+
import { ComboboxPositioner as K } from "../../../node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js";
|
|
16
|
+
import { ComboboxPopup as M } from "../../../node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js";
|
|
17
|
+
import { ComboboxInput as O } from "../../../node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js";
|
|
18
|
+
import { ComboboxList as Q } from "../../../node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js";
|
|
19
|
+
import { ComboboxGroup as U } from "../../../node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js";
|
|
20
|
+
import { ComboboxCollection as X } from "../../../node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js";
|
|
21
|
+
import { ComboboxItem as Y } from "../../../node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js";
|
|
22
|
+
import { ComboboxItemIndicator as Z } from "../../../node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js";
|
|
23
|
+
import { ComboboxEmpty as _ } from "../../../node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js";
|
|
25
24
|
import { ComboboxValue as f } from "../../../node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js";
|
|
26
|
-
import { ComboboxGroupLabel as
|
|
27
|
-
function
|
|
28
|
-
value:
|
|
29
|
-
defaultValue:
|
|
25
|
+
import { ComboboxGroupLabel as $ } from "../../../node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js";
|
|
26
|
+
function qe({
|
|
27
|
+
value: o,
|
|
28
|
+
defaultValue: a,
|
|
30
29
|
onValueChange: e,
|
|
31
30
|
disabled: r,
|
|
32
31
|
items: s,
|
|
@@ -35,8 +34,8 @@ function De({
|
|
|
35
34
|
searchValue: c,
|
|
36
35
|
defaultSearchValue: u,
|
|
37
36
|
onSearchValueChange: h,
|
|
38
|
-
open:
|
|
39
|
-
defaultOpen:
|
|
37
|
+
open: x,
|
|
38
|
+
defaultOpen: g,
|
|
40
39
|
onOpenChange: S,
|
|
41
40
|
name: y,
|
|
42
41
|
required: v,
|
|
@@ -47,8 +46,8 @@ function De({
|
|
|
47
46
|
mergeWith: { disabled: r }
|
|
48
47
|
}), [p, w] = k(
|
|
49
48
|
{
|
|
50
|
-
prop:
|
|
51
|
-
defaultProp:
|
|
49
|
+
prop: o,
|
|
50
|
+
defaultProp: a ?? null,
|
|
52
51
|
onChange: (j) => {
|
|
53
52
|
e?.(j);
|
|
54
53
|
}
|
|
@@ -56,9 +55,9 @@ function De({
|
|
|
56
55
|
), {
|
|
57
56
|
isGrouped: I,
|
|
58
57
|
groupedItems: V,
|
|
59
|
-
filteredItemsForRoot:
|
|
60
|
-
resolvedSearchValue:
|
|
61
|
-
registerSearch:
|
|
58
|
+
filteredItemsForRoot: L,
|
|
59
|
+
resolvedSearchValue: R,
|
|
60
|
+
registerSearch: T,
|
|
62
61
|
handleSearchValueChange: P
|
|
63
62
|
} = E({
|
|
64
63
|
items: s,
|
|
@@ -68,43 +67,43 @@ function De({
|
|
|
68
67
|
defaultSearchValue: u,
|
|
69
68
|
onSearchValueChange: h
|
|
70
69
|
});
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
|
|
70
|
+
return /* @__PURE__ */ t(
|
|
71
|
+
H,
|
|
73
72
|
{
|
|
74
73
|
"data-slot": "select",
|
|
75
74
|
filter: null,
|
|
76
75
|
items: V ?? s,
|
|
77
|
-
filteredItems:
|
|
78
|
-
inputValue:
|
|
76
|
+
filteredItems: L,
|
|
77
|
+
inputValue: R,
|
|
79
78
|
onInputValueChange: P,
|
|
80
79
|
value: p,
|
|
81
80
|
onValueChange: w,
|
|
82
|
-
open:
|
|
83
|
-
defaultOpen:
|
|
81
|
+
open: x,
|
|
82
|
+
defaultOpen: g,
|
|
84
83
|
onOpenChange: S,
|
|
85
84
|
name: y,
|
|
86
85
|
required: v,
|
|
87
86
|
disabled: N,
|
|
88
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ t(G, { value: { selectedValue: p, registerSearch: T, isGrouped: I }, children: C })
|
|
89
88
|
}
|
|
90
89
|
);
|
|
91
90
|
}
|
|
92
|
-
const
|
|
91
|
+
const ee = l(
|
|
93
92
|
"group relative flex h-48 w-full cursor-pointer items-center justify-between gap-8",
|
|
94
93
|
"rounded-sm bg-muted px-16",
|
|
95
94
|
"body-2 text-base",
|
|
96
95
|
"hover:bg-muted-hover",
|
|
97
96
|
"transition-colors duration-200 focus:ring-2 focus:ring-active focus:outline-hidden",
|
|
98
97
|
"disabled:cursor-not-allowed disabled:text-disabled"
|
|
99
|
-
),
|
|
98
|
+
), te = l(
|
|
100
99
|
"pointer-events-none absolute left-16 origin-left text-muted transition-all duration-300",
|
|
101
100
|
"top-10 -translate-y-4 body-4",
|
|
102
101
|
"group-data-placeholder:top-14 group-data-placeholder:translate-y-0 group-data-placeholder:body-2",
|
|
103
102
|
"group-data-disabled:text-disabled",
|
|
104
103
|
"max-w-[calc(100%-var(--size-56))] truncate"
|
|
105
|
-
),
|
|
106
|
-
ref:
|
|
107
|
-
className:
|
|
104
|
+
), oe = ({
|
|
105
|
+
ref: o,
|
|
106
|
+
className: a,
|
|
108
107
|
labelClassName: e,
|
|
109
108
|
label: r,
|
|
110
109
|
...s
|
|
@@ -116,14 +115,14 @@ const te = l(
|
|
|
116
115
|
return /* @__PURE__ */ d(
|
|
117
116
|
b,
|
|
118
117
|
{
|
|
119
|
-
ref:
|
|
118
|
+
ref: o,
|
|
120
119
|
"data-slot": "select-trigger",
|
|
121
120
|
"data-placeholder": i ? void 0 : "",
|
|
122
|
-
className: l(
|
|
121
|
+
className: l(ee, a),
|
|
123
122
|
...s,
|
|
124
123
|
children: [
|
|
125
|
-
r && /* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
124
|
+
r && /* @__PURE__ */ t("label", { className: l(te, e), children: r }),
|
|
125
|
+
/* @__PURE__ */ t(
|
|
127
126
|
"span",
|
|
128
127
|
{
|
|
129
128
|
className: l(
|
|
@@ -131,11 +130,11 @@ const te = l(
|
|
|
131
130
|
r && "mt-16 opacity-100 transition-opacity delay-100 duration-300",
|
|
132
131
|
r && !i && "mt-0 opacity-0"
|
|
133
132
|
),
|
|
134
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ t(f, {})
|
|
135
134
|
}
|
|
136
135
|
),
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
136
|
+
/* @__PURE__ */ t(
|
|
137
|
+
B,
|
|
139
138
|
{
|
|
140
139
|
size: 20,
|
|
141
140
|
className: "text-muted group-data-disabled:text-disabled"
|
|
@@ -144,21 +143,21 @@ const te = l(
|
|
|
144
143
|
]
|
|
145
144
|
}
|
|
146
145
|
);
|
|
147
|
-
},
|
|
146
|
+
}, ze = ({ render: o, disabled: a, ...e }) => {
|
|
148
147
|
const { selectedValue: r } = m({
|
|
149
148
|
consumerName: "SelectTrigger",
|
|
150
149
|
contextRequired: !0
|
|
151
|
-
}), s = /* @__PURE__ */
|
|
152
|
-
return
|
|
150
|
+
}), s = /* @__PURE__ */ t(f, {});
|
|
151
|
+
return o ? /* @__PURE__ */ t(
|
|
153
152
|
b,
|
|
154
153
|
{
|
|
155
|
-
disabled:
|
|
154
|
+
disabled: a,
|
|
156
155
|
ref: e.ref,
|
|
157
156
|
"data-slot": "select-trigger",
|
|
158
|
-
render:
|
|
157
|
+
render: o({ selectedValue: r, selectedContent: s })
|
|
159
158
|
}
|
|
160
|
-
) : /* @__PURE__ */
|
|
161
|
-
},
|
|
159
|
+
) : /* @__PURE__ */ t(oe, { ...e, disabled: a });
|
|
160
|
+
}, ae = z(
|
|
162
161
|
[
|
|
163
162
|
"group/select-content relative flex max-h-(--available-height) w-(--anchor-width) flex-col overflow-hidden",
|
|
164
163
|
"rounded-sm bg-surface",
|
|
@@ -186,38 +185,38 @@ const te = l(
|
|
|
186
185
|
}
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
|
-
),
|
|
190
|
-
ref:
|
|
191
|
-
className:
|
|
188
|
+
), De = ({
|
|
189
|
+
ref: o,
|
|
190
|
+
className: a,
|
|
192
191
|
children: e,
|
|
193
192
|
side: r = "bottom",
|
|
194
193
|
sideOffset: s = 8,
|
|
195
194
|
align: n = "start",
|
|
196
195
|
autoFocusSearch: i = !1,
|
|
197
196
|
...c
|
|
198
|
-
}) => /* @__PURE__ */
|
|
199
|
-
|
|
197
|
+
}) => /* @__PURE__ */ t(J, { "data-slot": "select-portal", children: /* @__PURE__ */ t(
|
|
198
|
+
K,
|
|
200
199
|
{
|
|
201
200
|
"data-slot": "select-positioner",
|
|
202
201
|
className: "pointer-events-auto z-select",
|
|
203
202
|
side: r,
|
|
204
203
|
sideOffset: s,
|
|
205
204
|
align: n,
|
|
206
|
-
children: /* @__PURE__ */
|
|
207
|
-
|
|
205
|
+
children: /* @__PURE__ */ t(
|
|
206
|
+
M,
|
|
208
207
|
{
|
|
209
|
-
ref:
|
|
208
|
+
ref: o,
|
|
210
209
|
"data-slot": "select-content",
|
|
211
210
|
initialFocus: i ? void 0 : !1,
|
|
212
|
-
className: l(
|
|
211
|
+
className: l(ae({ side: r }), a),
|
|
213
212
|
...c,
|
|
214
213
|
children: e
|
|
215
214
|
}
|
|
216
215
|
)
|
|
217
216
|
}
|
|
218
|
-
) }),
|
|
219
|
-
ref:
|
|
220
|
-
className:
|
|
217
|
+
) }), Ge = ({
|
|
218
|
+
ref: o,
|
|
219
|
+
className: a,
|
|
221
220
|
renderItem: e,
|
|
222
221
|
...r
|
|
223
222
|
}) => {
|
|
@@ -225,40 +224,40 @@ const te = l(
|
|
|
225
224
|
consumerName: "SelectList",
|
|
226
225
|
contextRequired: !0
|
|
227
226
|
});
|
|
228
|
-
return /* @__PURE__ */
|
|
229
|
-
|
|
227
|
+
return /* @__PURE__ */ t(
|
|
228
|
+
Q,
|
|
230
229
|
{
|
|
231
|
-
ref:
|
|
230
|
+
ref: o,
|
|
232
231
|
"data-slot": "select-list",
|
|
233
232
|
className: l(
|
|
234
233
|
"min-h-0 min-w-(--anchor-width) flex-1 overflow-y-auto p-8 group-data-empty/select-content:p-0",
|
|
235
|
-
|
|
234
|
+
a
|
|
236
235
|
),
|
|
237
236
|
...r,
|
|
238
237
|
children: s ? (n, i) => /* @__PURE__ */ d(
|
|
239
|
-
|
|
238
|
+
U,
|
|
240
239
|
{
|
|
241
240
|
items: n.items,
|
|
242
241
|
"data-slot": "select-group",
|
|
243
242
|
children: [
|
|
244
|
-
i > 0 && /* @__PURE__ */
|
|
245
|
-
n.label && /* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
243
|
+
i > 0 && /* @__PURE__ */ t(se, {}),
|
|
244
|
+
n.label && /* @__PURE__ */ t(re, { children: n.label }),
|
|
245
|
+
/* @__PURE__ */ t(X, { children: e })
|
|
247
246
|
]
|
|
248
247
|
},
|
|
249
248
|
n.label
|
|
250
249
|
) : e
|
|
251
250
|
}
|
|
252
251
|
);
|
|
253
|
-
},
|
|
254
|
-
|
|
252
|
+
}, re = ({ ref: o, className: a, ...e }) => /* @__PURE__ */ t(
|
|
253
|
+
$,
|
|
255
254
|
{
|
|
256
|
-
ref:
|
|
255
|
+
ref: o,
|
|
257
256
|
"data-slot": "select-label",
|
|
258
|
-
className: l("mb-4 px-8 pt-8 pb-0 body-3-semi-bold text-muted",
|
|
257
|
+
className: l("mb-4 px-8 pt-8 pb-0 body-3-semi-bold text-muted", a),
|
|
259
258
|
...e
|
|
260
259
|
}
|
|
261
|
-
),
|
|
260
|
+
), le = l(
|
|
262
261
|
"group/item flex w-full min-w-0 cursor-pointer items-center gap-12 bg-base-transparent select-none",
|
|
263
262
|
"rounded-sm p-8",
|
|
264
263
|
"body-2 text-base",
|
|
@@ -266,70 +265,70 @@ const te = l(
|
|
|
266
265
|
"data-highlighted:bg-base-transparent-hover",
|
|
267
266
|
"active:bg-base-transparent-pressed",
|
|
268
267
|
"data-disabled:cursor-not-allowed data-disabled:text-disabled"
|
|
269
|
-
),
|
|
270
|
-
ref:
|
|
271
|
-
className:
|
|
268
|
+
), ke = ({
|
|
269
|
+
ref: o,
|
|
270
|
+
className: a,
|
|
272
271
|
children: e,
|
|
273
272
|
...r
|
|
274
273
|
}) => /* @__PURE__ */ d(
|
|
275
|
-
|
|
274
|
+
Y,
|
|
276
275
|
{
|
|
277
|
-
ref:
|
|
276
|
+
ref: o,
|
|
278
277
|
"data-slot": "select-item",
|
|
279
|
-
className: l(
|
|
278
|
+
className: l(le, a),
|
|
280
279
|
...r,
|
|
281
280
|
children: [
|
|
282
281
|
e,
|
|
283
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ t(Z, { className: "ml-auto flex shrink-0 items-center justify-center", children: /* @__PURE__ */ t(W, { size: 24, className: "shrink-0 text-active" }) })
|
|
284
283
|
]
|
|
285
284
|
}
|
|
286
|
-
),
|
|
287
|
-
ref:
|
|
288
|
-
className:
|
|
285
|
+
), se = ({
|
|
286
|
+
ref: o,
|
|
287
|
+
className: a,
|
|
289
288
|
...e
|
|
290
|
-
}) => /* @__PURE__ */
|
|
289
|
+
}) => /* @__PURE__ */ t(A, { ref: o, className: l("mx-8 my-4 w-auto", a), ...e }), Ee = ({ ref: o, className: a, ...e }) => /* @__PURE__ */ t(
|
|
291
290
|
"span",
|
|
292
291
|
{
|
|
293
|
-
ref:
|
|
292
|
+
ref: o,
|
|
294
293
|
"data-slot": "select-item-text",
|
|
295
|
-
className: l("truncate body-2",
|
|
294
|
+
className: l("truncate body-2", a),
|
|
296
295
|
...e
|
|
297
296
|
}
|
|
298
|
-
),
|
|
299
|
-
ref:
|
|
300
|
-
className:
|
|
297
|
+
), Fe = ({
|
|
298
|
+
ref: o,
|
|
299
|
+
className: a,
|
|
301
300
|
children: e,
|
|
302
301
|
...r
|
|
303
|
-
}) => /* @__PURE__ */
|
|
302
|
+
}) => /* @__PURE__ */ t(
|
|
304
303
|
"div",
|
|
305
304
|
{
|
|
306
|
-
ref:
|
|
305
|
+
ref: o,
|
|
307
306
|
"data-slot": "select-item-content",
|
|
308
|
-
className: l("flex min-w-0 flex-1 flex-col gap-4",
|
|
307
|
+
className: l("flex min-w-0 flex-1 flex-col gap-4", a),
|
|
309
308
|
...r,
|
|
310
309
|
children: e
|
|
311
310
|
}
|
|
312
|
-
),
|
|
313
|
-
ref:
|
|
314
|
-
className:
|
|
311
|
+
), We = ({
|
|
312
|
+
ref: o,
|
|
313
|
+
className: a,
|
|
315
314
|
children: e,
|
|
316
315
|
...r
|
|
317
|
-
}) => /* @__PURE__ */
|
|
316
|
+
}) => /* @__PURE__ */ t(
|
|
318
317
|
"div",
|
|
319
318
|
{
|
|
320
|
-
ref:
|
|
319
|
+
ref: o,
|
|
321
320
|
"data-slot": "select-item-description",
|
|
322
321
|
className: l(
|
|
323
322
|
"truncate body-3 text-muted",
|
|
324
323
|
"group-data-disabled/item:text-disabled",
|
|
325
|
-
|
|
324
|
+
a
|
|
326
325
|
),
|
|
327
326
|
...r,
|
|
328
327
|
children: e
|
|
329
328
|
}
|
|
330
|
-
),
|
|
331
|
-
className:
|
|
332
|
-
placeholder:
|
|
329
|
+
), Ae = ({
|
|
330
|
+
className: o,
|
|
331
|
+
placeholder: a = "Search",
|
|
333
332
|
errorMessage: e,
|
|
334
333
|
"aria-invalid": r,
|
|
335
334
|
suffix: s,
|
|
@@ -340,11 +339,11 @@ const te = l(
|
|
|
340
339
|
consumerName: "SelectSearch",
|
|
341
340
|
contextRequired: !0
|
|
342
341
|
});
|
|
343
|
-
return D(() => c(), [c]), /* @__PURE__ */
|
|
344
|
-
|
|
342
|
+
return D(() => c(), [c]), /* @__PURE__ */ t(
|
|
343
|
+
O,
|
|
345
344
|
{
|
|
346
|
-
render: (u) => /* @__PURE__ */
|
|
347
|
-
|
|
345
|
+
render: (u) => /* @__PURE__ */ t(
|
|
346
|
+
F,
|
|
348
347
|
{
|
|
349
348
|
...u,
|
|
350
349
|
"aria-invalid": r,
|
|
@@ -352,52 +351,46 @@ const te = l(
|
|
|
352
351
|
suffix: s,
|
|
353
352
|
onClear: n,
|
|
354
353
|
hideClearButton: i,
|
|
355
|
-
placeholder:
|
|
354
|
+
placeholder: a,
|
|
356
355
|
containerClassName: "rounded-b-none ring-inset",
|
|
357
|
-
className: l(
|
|
356
|
+
className: l(o, "rounded-b-none ring-inset")
|
|
358
357
|
}
|
|
359
358
|
)
|
|
360
359
|
}
|
|
361
360
|
);
|
|
362
|
-
},
|
|
363
|
-
ref:
|
|
364
|
-
className:
|
|
361
|
+
}, Be = ({
|
|
362
|
+
ref: o,
|
|
363
|
+
className: a,
|
|
365
364
|
title: e,
|
|
366
365
|
description: r,
|
|
367
366
|
...s
|
|
368
367
|
}) => /* @__PURE__ */ d(
|
|
369
|
-
|
|
368
|
+
_,
|
|
370
369
|
{
|
|
371
|
-
ref:
|
|
370
|
+
ref: o,
|
|
372
371
|
"data-slot": "select-empty-state",
|
|
373
372
|
className: l(
|
|
374
373
|
"hidden w-full flex-col items-center gap-8 py-24",
|
|
375
374
|
"group-data-empty/select-content:flex",
|
|
376
|
-
|
|
375
|
+
a
|
|
377
376
|
),
|
|
378
377
|
...s,
|
|
379
378
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
r && /* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ t("span", { className: "heading-4-semi-bold text-base", children: e }),
|
|
380
|
+
r && /* @__PURE__ */ t("span", { className: "body-2 text-muted", children: r })
|
|
382
381
|
]
|
|
383
382
|
}
|
|
384
|
-
)
|
|
385
|
-
selectedValue: t,
|
|
386
|
-
selectedContent: o,
|
|
387
|
-
label: e,
|
|
388
|
-
...r
|
|
389
|
-
}) => /* @__PURE__ */ a(A, { ...r, children: t ? o : e });
|
|
383
|
+
);
|
|
390
384
|
export {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
Ke as SelectTriggerButton
|
|
385
|
+
qe as Select,
|
|
386
|
+
De as SelectContent,
|
|
387
|
+
Be as SelectEmptyState,
|
|
388
|
+
ke as SelectItem,
|
|
389
|
+
Fe as SelectItemContent,
|
|
390
|
+
We as SelectItemDescription,
|
|
391
|
+
Ee as SelectItemText,
|
|
392
|
+
Ge as SelectList,
|
|
393
|
+
Ae as SelectSearch,
|
|
394
|
+
se as SelectSeparator,
|
|
395
|
+
ze as SelectTrigger
|
|
403
396
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './Select';
|
|
2
|
-
export type { SelectItemData, SelectProps, SelectTriggerProps, SelectTriggerRenderProps, SelectContentProps, SelectSearchProps, SelectListProps, SelectItemTextProps, SelectItemContentProps, SelectItemDescriptionProps, SelectItemProps, SelectSeparatorProps, SelectEmptyStateProps,
|
|
2
|
+
export type { SelectItemData, SelectProps, SelectTriggerProps, SelectTriggerRenderProps, SelectContentProps, SelectSearchProps, SelectListProps, SelectItemTextProps, SelectItemContentProps, SelectItemDescriptionProps, SelectItemProps, SelectSeparatorProps, SelectEmptyStateProps, } from './types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,YAAY,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,YAAY,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { SearchInputProps } from '../SearchInput/types';
|
|
3
|
-
import { TriggerButtonProps } from '../TriggerButton';
|
|
4
3
|
export type SelectItemData<Meta = Record<string, unknown>> = {
|
|
5
4
|
/** Unique string identifier for this item, used for selection tracking. */
|
|
6
5
|
value: string;
|
|
@@ -139,9 +138,9 @@ export type SelectTriggerProps = {
|
|
|
139
138
|
/**
|
|
140
139
|
* Render function that replaces the default input-style trigger.
|
|
141
140
|
* When provided, the trigger delegates rendering to this function.
|
|
142
|
-
*
|
|
141
|
+
* Use any component (e.g. `MediaButton`) or a custom render function.
|
|
143
142
|
*
|
|
144
|
-
* @example render={(
|
|
143
|
+
* @example render={({ selectedValue, selectedContent }) => <MediaButton>{selectedValue ? selectedContent : 'Label'}</MediaButton>}
|
|
145
144
|
* @example render={({ selectedValue, selectedContent }) => <MyTrigger />}
|
|
146
145
|
*/
|
|
147
146
|
render?: (props: SelectTriggerRenderProps) => ReactElement;
|
|
@@ -285,11 +284,4 @@ export type SelectItemDescriptionProps = {
|
|
|
285
284
|
*/
|
|
286
285
|
className?: string;
|
|
287
286
|
} & ComponentPropsWithRef<'div'>;
|
|
288
|
-
export type SelectTriggerButtonProps = SelectTriggerRenderProps & Omit<TriggerButtonProps, 'children'> & {
|
|
289
|
-
/**
|
|
290
|
-
* The label displayed when no value is selected.
|
|
291
|
-
* Once a value is selected, it is replaced by the selected item's content.
|
|
292
|
-
*/
|
|
293
|
-
label: string;
|
|
294
|
-
};
|
|
295
287
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC3D,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,qGAAqG;IACrG,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,yHAAyH;AACzH,MAAM,MAAM,eAAe,GAAG;IAC5B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;;;;;;OAUG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;I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C,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,gBAAgB,EACd,aAAa,GACb,WAAW,GACX,cAAc,GACd,cAAc,GACd,QAAQ,GACR,SAAS,GACT,iBAAiB,CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { LedgerLiveDarkTheme, LedgerLiveLightTheme } from '@ledgerhq/lumen-design-core';
|
|
1
2
|
import { FC } from 'react';
|
|
2
3
|
import { ThemeProviderProps } from './ThemeProvider.types';
|
|
4
|
+
type ThemeProviderState = {
|
|
5
|
+
theme?: LedgerLiveDarkTheme | LedgerLiveLightTheme;
|
|
6
|
+
colorScheme: 'light' | 'dark';
|
|
7
|
+
};
|
|
3
8
|
export declare const ThemeProvider: FC<ThemeProviderProps>;
|
|
9
|
+
export declare const useTheme: () => ThemeProviderState;
|
|
10
|
+
export {};
|
|
4
11
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAiB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAM1E,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,mBAAmB,GAAG,oBAAoB,CAAC;IACnD,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;CAC/B,CAAC;AAKF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAwBhD,CAAC;AAEF,eAAO,MAAM,QAAQ,0BAOpB,CAAC"}
|