@ledgerhq/lumen-ui-react 0.0.58 → 0.0.60
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/ai-rules/RULES.md +12 -1
- package/dist/index.js +92 -77
- package/dist/lib/Components/AmountInput/AmountInput.js +10 -10
- package/dist/lib/Components/BaseInput/BaseInput.js +4 -4
- package/dist/lib/Components/Dialog/Dialog.d.ts +1 -0
- package/dist/lib/Components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/Dialog.js +25 -24
- package/dist/lib/Components/Dialog/types.d.ts +6 -0
- package/dist/lib/Components/Dialog/types.d.ts.map +1 -1
- package/dist/lib/Components/Divider/Divider.d.ts +24 -0
- package/dist/lib/Components/Divider/Divider.d.ts.map +1 -0
- package/dist/lib/Components/Divider/Divider.js +23 -0
- package/dist/lib/Components/Divider/index.d.ts +3 -0
- package/dist/lib/Components/Divider/index.d.ts.map +1 -0
- package/dist/lib/Components/Divider/types.d.ts +9 -0
- package/dist/lib/Components/Divider/types.d.ts.map +1 -0
- package/dist/lib/Components/Link/Link.js +5 -5
- package/dist/lib/Components/ListItem/ListItem.d.ts +76 -36
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +136 -43
- package/dist/lib/Components/ListItem/index.d.ts +1 -1
- package/dist/lib/Components/ListItem/index.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/types.d.ts +114 -15
- package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +80 -78
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +76 -74
- package/dist/lib/Components/Spot/Spot.js +4 -4
- package/dist/lib/Components/Spot/types.d.ts +17 -10
- package/dist/lib/Components/Spot/types.d.ts.map +1 -1
- package/dist/lib/Components/ThemeProvider/ThemeProvider.js +2 -2
- package/dist/lib/Components/Tile/Tile.d.ts +75 -45
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +168 -99
- package/dist/lib/Components/Tile/index.d.ts +1 -1
- package/dist/lib/Components/Tile/index.d.ts.map +1 -1
- package/dist/lib/Components/Tile/types.d.ts +68 -26
- package/dist/lib/Components/Tile/types.d.ts.map +1 -1
- package/dist/lib/Components/index.d.ts +1 -0
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/libs/utils-shared/dist/index.js +52 -44
- package/dist/package.json +2 -2
- package/package.json +2 -2
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
1
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import * as t from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import * as i from "react";
|
|
5
5
|
import { Check as u } from "../../Symbols/Icons/Check.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import { Divider as p } from "../Divider/Divider.js";
|
|
7
|
+
import { ChevronRight as f } from "../../Symbols/Icons/ChevronRight.js";
|
|
8
|
+
const c = o(
|
|
8
9
|
"z-menu min-w-160 overflow-hidden rounded-sm bg-muted p-8",
|
|
9
10
|
"shadow-sm",
|
|
10
11
|
"data-[state=open]:animate-fade-in",
|
|
11
12
|
"data-[state=closed]:animate-fade-out"
|
|
12
|
-
), d =
|
|
13
|
+
), d = o(
|
|
13
14
|
"relative flex cursor-default select-none items-center gap-12",
|
|
14
15
|
"h-44 rounded-sm px-8 outline-none",
|
|
15
16
|
"text-base body-2-semi-bold",
|
|
@@ -17,145 +18,146 @@ const c = n(
|
|
|
17
18
|
"focus:bg-base-transparent-hover",
|
|
18
19
|
"active:bg-base-transparent-pressed",
|
|
19
20
|
"data-[disabled]:pointer-events-none data-[disabled]:text-disabled"
|
|
20
|
-
), b =
|
|
21
|
+
), b = o("px-8 py-4 text-muted body-3-semi-bold"), N = o(
|
|
21
22
|
d,
|
|
22
23
|
"data-[state=open]:bg-base-transparent-hover"
|
|
23
24
|
);
|
|
24
25
|
function j({ ...e }) {
|
|
25
|
-
return /* @__PURE__ */ t
|
|
26
|
+
return /* @__PURE__ */ a(t.Root, { "data-slot": "menu", ...e });
|
|
26
27
|
}
|
|
27
|
-
const y =
|
|
28
|
-
|
|
28
|
+
const y = i.forwardRef(({ ...e }, s) => /* @__PURE__ */ a(
|
|
29
|
+
t.Trigger,
|
|
29
30
|
{
|
|
30
31
|
ref: s,
|
|
31
32
|
"data-slot": "menu-trigger",
|
|
32
33
|
...e
|
|
33
34
|
}
|
|
34
35
|
));
|
|
35
|
-
y.displayName =
|
|
36
|
-
function
|
|
37
|
-
return /* @__PURE__ */ t
|
|
36
|
+
y.displayName = t.Trigger.displayName;
|
|
37
|
+
function G({ ...e }) {
|
|
38
|
+
return /* @__PURE__ */ a(t.Group, { "data-slot": "menu-group", ...e });
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function P({
|
|
40
41
|
...e
|
|
41
42
|
}) {
|
|
42
|
-
return /* @__PURE__ */ t
|
|
43
|
+
return /* @__PURE__ */ a(t.Portal, { ...e });
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function L({
|
|
45
46
|
...e
|
|
46
47
|
}) {
|
|
47
|
-
return /* @__PURE__ */ t
|
|
48
|
+
return /* @__PURE__ */ a(t.Sub, { ...e });
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
return /* @__PURE__ */ t
|
|
50
|
+
function D({ ...e }) {
|
|
51
|
+
return /* @__PURE__ */ a(t.RadioGroup, { "data-slot": "menu-radio-group", ...e });
|
|
51
52
|
}
|
|
52
|
-
const g =
|
|
53
|
-
|
|
53
|
+
const g = i.forwardRef(({ className: e, inset: s, children: n, ...r }, m) => /* @__PURE__ */ l(
|
|
54
|
+
t.SubTrigger,
|
|
54
55
|
{
|
|
55
|
-
ref:
|
|
56
|
+
ref: m,
|
|
56
57
|
"data-slot": "menu-sub-trigger",
|
|
57
|
-
className:
|
|
58
|
+
className: o(N, s && "pl-32", e),
|
|
58
59
|
...r,
|
|
59
60
|
children: [
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
n,
|
|
62
|
+
/* @__PURE__ */ a(f, { size: 20, className: "ml-auto text-muted" })
|
|
62
63
|
]
|
|
63
64
|
}
|
|
64
65
|
));
|
|
65
|
-
g.displayName =
|
|
66
|
-
const h =
|
|
67
|
-
|
|
66
|
+
g.displayName = t.SubTrigger.displayName;
|
|
67
|
+
const h = i.forwardRef(({ className: e, ...s }, n) => /* @__PURE__ */ a(
|
|
68
|
+
t.SubContent,
|
|
68
69
|
{
|
|
69
|
-
ref:
|
|
70
|
+
ref: n,
|
|
70
71
|
"data-slot": "menu-sub-content",
|
|
71
|
-
className:
|
|
72
|
+
className: o(c, e),
|
|
72
73
|
...s
|
|
73
74
|
}
|
|
74
75
|
));
|
|
75
|
-
h.displayName =
|
|
76
|
-
const x =
|
|
77
|
-
|
|
76
|
+
h.displayName = t.SubContent.displayName;
|
|
77
|
+
const x = i.forwardRef(({ className: e, sideOffset: s = 4, align: n = "start", ...r }, m) => /* @__PURE__ */ a(t.Portal, { children: /* @__PURE__ */ a(
|
|
78
|
+
t.Content,
|
|
78
79
|
{
|
|
79
|
-
ref:
|
|
80
|
+
ref: m,
|
|
80
81
|
"data-slot": "menu-content",
|
|
81
82
|
sideOffset: s,
|
|
82
|
-
className:
|
|
83
|
-
align:
|
|
83
|
+
className: o(c, e),
|
|
84
|
+
align: n,
|
|
84
85
|
...r
|
|
85
86
|
}
|
|
86
87
|
) }));
|
|
87
|
-
x.displayName =
|
|
88
|
-
const R =
|
|
89
|
-
|
|
88
|
+
x.displayName = t.Content.displayName;
|
|
89
|
+
const R = i.forwardRef(({ className: e, inset: s, ...n }, r) => /* @__PURE__ */ a(
|
|
90
|
+
t.Item,
|
|
90
91
|
{
|
|
91
92
|
ref: r,
|
|
92
93
|
"data-slot": "menu-item",
|
|
93
|
-
className:
|
|
94
|
-
...
|
|
94
|
+
className: o(d, s && "pl-32", e),
|
|
95
|
+
...n
|
|
95
96
|
}
|
|
96
97
|
));
|
|
97
|
-
R.displayName =
|
|
98
|
-
const
|
|
99
|
-
|
|
98
|
+
R.displayName = t.Item.displayName;
|
|
99
|
+
const M = i.forwardRef(({ className: e, children: s, checked: n, ...r }, m) => /* @__PURE__ */ l(
|
|
100
|
+
t.CheckboxItem,
|
|
100
101
|
{
|
|
101
|
-
ref:
|
|
102
|
+
ref: m,
|
|
102
103
|
"data-slot": "menu-checkbox-item",
|
|
103
|
-
className:
|
|
104
|
-
checked:
|
|
104
|
+
className: o(d, e),
|
|
105
|
+
checked: n,
|
|
105
106
|
...r,
|
|
106
107
|
children: [
|
|
107
108
|
s,
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ a("span", { className: "ml-auto flex size-24 items-center justify-center", children: /* @__PURE__ */ a(t.ItemIndicator, { children: /* @__PURE__ */ a(u, { size: 24, className: "text-active" }) }) })
|
|
109
110
|
]
|
|
110
111
|
}
|
|
111
112
|
));
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
113
|
+
M.displayName = t.CheckboxItem.displayName;
|
|
114
|
+
const w = i.forwardRef(({ className: e, children: s, ...n }, r) => /* @__PURE__ */ l(
|
|
115
|
+
t.RadioItem,
|
|
115
116
|
{
|
|
116
117
|
ref: r,
|
|
117
118
|
"data-slot": "menu-radio-item",
|
|
118
|
-
className:
|
|
119
|
-
...
|
|
119
|
+
className: o(d, e),
|
|
120
|
+
...n,
|
|
120
121
|
children: [
|
|
121
122
|
s,
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ a("span", { className: "ml-auto flex size-24 items-center justify-center", children: /* @__PURE__ */ a(t.ItemIndicator, { children: /* @__PURE__ */ a(u, { size: 24, className: "text-active" }) }) })
|
|
123
124
|
]
|
|
124
125
|
}
|
|
125
126
|
));
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
w.displayName = t.RadioItem.displayName;
|
|
128
|
+
const S = i.forwardRef(({ className: e, inset: s, ...n }, r) => /* @__PURE__ */ a(
|
|
129
|
+
t.Label,
|
|
129
130
|
{
|
|
130
131
|
ref: r,
|
|
131
132
|
"data-slot": "menu-label",
|
|
132
|
-
className:
|
|
133
|
-
...
|
|
133
|
+
className: o(b, s && "pl-32", e),
|
|
134
|
+
...n
|
|
134
135
|
}
|
|
135
136
|
));
|
|
136
|
-
|
|
137
|
-
const I =
|
|
138
|
-
a
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
)
|
|
146
|
-
|
|
137
|
+
S.displayName = t.Label.displayName;
|
|
138
|
+
const I = i.forwardRef(
|
|
139
|
+
({ className: e, ...s }, n) => /* @__PURE__ */ a(
|
|
140
|
+
p,
|
|
141
|
+
{
|
|
142
|
+
ref: n,
|
|
143
|
+
className: o("mx-8 my-4 w-auto", e),
|
|
144
|
+
...s
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
);
|
|
148
|
+
I.displayName = "MenuSeparator";
|
|
147
149
|
export {
|
|
148
150
|
j as Menu,
|
|
149
|
-
|
|
151
|
+
M as MenuCheckboxItem,
|
|
150
152
|
x as MenuContent,
|
|
151
|
-
|
|
153
|
+
G as MenuGroup,
|
|
152
154
|
R as MenuItem,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
S as MenuLabel,
|
|
156
|
+
P as MenuPortal,
|
|
157
|
+
D as MenuRadioGroup,
|
|
158
|
+
w as MenuRadioItem,
|
|
157
159
|
I as MenuSeparator,
|
|
158
|
-
|
|
160
|
+
L as MenuSub,
|
|
159
161
|
h as MenuSubContent,
|
|
160
162
|
g as MenuSubTrigger,
|
|
161
163
|
y as MenuTrigger
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAExC;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAElD;AAmBD,QAAA,MAAM,aAAa,8FA8BjB,CAAC;AAwCH,QAAA,MAAM,aAAa,2FAmBjB,CAAC;AAGH,QAAA,MAAM,WAAW,yFAUf,CAAC;AAaH,QAAA,MAAM,UAAU,wFAiBd,CAAC;AAGH,QAAA,MAAM,eAAe,6FAQpB,CAAC;AAGF,QAAA,MAAM,cAAc,6FAUlB,CAAC;AAuCH,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,UAAU,EACV,eAAe,GAChB,CAAC"}
|
|
@@ -1,51 +1,52 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
3
|
-
import * as
|
|
2
|
+
import { cn as r } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import * as a from "@radix-ui/react-select";
|
|
4
4
|
import { cva as c } from "class-variance-authority";
|
|
5
|
-
import * as
|
|
5
|
+
import * as s from "react";
|
|
6
6
|
import { ChevronDown as m } from "../../Symbols/Icons/ChevronDown.js";
|
|
7
7
|
import { Check as p } from "../../Symbols/Icons/Check.js";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import { Divider as u } from "../Divider/Divider.js";
|
|
9
|
+
import { ChevronUp as f } from "../../Symbols/Icons/ChevronUp.js";
|
|
10
|
+
function k({ ...t }) {
|
|
11
|
+
return /* @__PURE__ */ e(a.Root, { "data-slot": "select", ...t });
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */ e(
|
|
13
|
+
function G({ ...t }) {
|
|
14
|
+
return /* @__PURE__ */ e(a.Group, { "data-slot": "select-group", ...t });
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
+
const b = r(
|
|
16
17
|
"group relative flex h-48 w-full items-center justify-between gap-8",
|
|
17
18
|
"rounded-sm bg-muted px-16",
|
|
18
19
|
"text-base body-2",
|
|
19
20
|
"hover:bg-muted-hover",
|
|
20
21
|
"transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-focus",
|
|
21
22
|
"disabled:cursor-not-allowed disabled:text-disabled"
|
|
22
|
-
),
|
|
23
|
+
), g = r(
|
|
23
24
|
"pointer-events-none absolute left-16 origin-left text-muted transition-all duration-300",
|
|
24
25
|
"top-10 -translate-y-4 body-4",
|
|
25
26
|
"group-data-[placeholder]:top-14 group-data-[placeholder]:translate-y-0 group-data-[placeholder]:body-2",
|
|
26
27
|
"group-data-[:disabled]:text-disabled disabled:text-disabled group-data-[disabled]:text-disabled group-data-[placeholder][disabled]:text-disabled",
|
|
27
28
|
"max-w-[calc(100%-var(--size-56))] truncate"
|
|
28
|
-
),
|
|
29
|
-
|
|
29
|
+
), x = s.forwardRef(({ className: t, labelClassName: l, label: o, ...d }, i) => /* @__PURE__ */ n(
|
|
30
|
+
a.Trigger,
|
|
30
31
|
{
|
|
31
32
|
ref: i,
|
|
32
33
|
"data-slot": "select-trigger",
|
|
33
|
-
className:
|
|
34
|
+
className: r(b, t),
|
|
34
35
|
...d,
|
|
35
36
|
children: [
|
|
36
|
-
|
|
37
|
+
o && /* @__PURE__ */ e("label", { className: r(g, l), children: o }),
|
|
37
38
|
/* @__PURE__ */ e(
|
|
38
39
|
"span",
|
|
39
40
|
{
|
|
40
|
-
className:
|
|
41
|
+
className: r(
|
|
41
42
|
"flex-1 truncate text-left ",
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
o && "mt-16 opacity-100 transition-opacity delay-100 duration-300 group-data-[placeholder]:mt-0 group-data-[placeholder]:opacity-0",
|
|
44
|
+
t
|
|
44
45
|
),
|
|
45
|
-
children: /* @__PURE__ */ e(
|
|
46
|
+
children: /* @__PURE__ */ e(a.Value, { "data-slot": "select-value" })
|
|
46
47
|
}
|
|
47
48
|
),
|
|
48
|
-
/* @__PURE__ */ e(
|
|
49
|
+
/* @__PURE__ */ e(a.Icon, { asChild: !0, children: /* @__PURE__ */ e(
|
|
49
50
|
m,
|
|
50
51
|
{
|
|
51
52
|
size: 20,
|
|
@@ -55,8 +56,8 @@ const f = s(
|
|
|
55
56
|
]
|
|
56
57
|
}
|
|
57
58
|
));
|
|
58
|
-
|
|
59
|
-
const
|
|
59
|
+
x.displayName = a.Trigger.displayName;
|
|
60
|
+
const h = c(
|
|
60
61
|
[
|
|
61
62
|
"relative z-select max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden",
|
|
62
63
|
"rounded-sm bg-muted",
|
|
@@ -77,7 +78,7 @@ const x = c(
|
|
|
77
78
|
position: "popper"
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
),
|
|
81
|
+
), y = c("p-8", {
|
|
81
82
|
variants: {
|
|
82
83
|
position: {
|
|
83
84
|
popper: "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
@@ -87,33 +88,33 @@ const x = c(
|
|
|
87
88
|
defaultVariants: {
|
|
88
89
|
position: "popper"
|
|
89
90
|
}
|
|
90
|
-
}),
|
|
91
|
-
|
|
91
|
+
}), N = s.forwardRef(({ className: t, children: l, position: o = "popper", ...d }, i) => /* @__PURE__ */ e(a.Portal, { "data-slot": "select-portal", children: /* @__PURE__ */ n(
|
|
92
|
+
a.Content,
|
|
92
93
|
{
|
|
93
94
|
ref: i,
|
|
94
95
|
"data-slot": "select-content",
|
|
95
|
-
className:
|
|
96
|
-
position:
|
|
96
|
+
className: r(h({ position: o }), t),
|
|
97
|
+
position: o,
|
|
97
98
|
...d,
|
|
98
99
|
children: [
|
|
99
100
|
/* @__PURE__ */ e(R, {}),
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ e(a.Viewport, { className: y({ position: o }), children: l }),
|
|
102
|
+
/* @__PURE__ */ e(C, {})
|
|
102
103
|
]
|
|
103
104
|
}
|
|
104
105
|
) }));
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
106
|
+
N.displayName = a.Content.displayName;
|
|
107
|
+
const v = s.forwardRef(({ className: t, ...l }, o) => /* @__PURE__ */ e(
|
|
108
|
+
a.Label,
|
|
108
109
|
{
|
|
109
|
-
ref:
|
|
110
|
+
ref: o,
|
|
110
111
|
"data-slot": "select-label",
|
|
111
|
-
className:
|
|
112
|
+
className: r("mb-4 px-8 pb-0 pt-8 text-muted body-3-semi-bold", t),
|
|
112
113
|
...l
|
|
113
114
|
}
|
|
114
115
|
));
|
|
115
|
-
|
|
116
|
-
const
|
|
116
|
+
v.displayName = a.Label.displayName;
|
|
117
|
+
const w = r(
|
|
117
118
|
"relative flex w-full cursor-default select-none items-center bg-base-transparent",
|
|
118
119
|
"rounded-sm p-8",
|
|
119
120
|
"text-base body-2",
|
|
@@ -121,68 +122,69 @@ const v = s(
|
|
|
121
122
|
"focus:bg-base-transparent-hover",
|
|
122
123
|
"active:bg-base-transparent-pressed",
|
|
123
124
|
"data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled"
|
|
124
|
-
),
|
|
125
|
-
|
|
125
|
+
), S = s.forwardRef(({ className: t, children: l, ...o }, d) => /* @__PURE__ */ n(
|
|
126
|
+
a.Item,
|
|
126
127
|
{
|
|
127
128
|
ref: d,
|
|
128
129
|
"data-slot": "select-item",
|
|
129
|
-
className:
|
|
130
|
-
...
|
|
130
|
+
className: r(w, t),
|
|
131
|
+
...o,
|
|
131
132
|
children: [
|
|
132
133
|
l,
|
|
133
|
-
/* @__PURE__ */ e("span", { className: "absolute right-8 flex size-24 items-center justify-center", children: /* @__PURE__ */ e(
|
|
134
|
+
/* @__PURE__ */ e("span", { className: "absolute right-8 flex size-24 items-center justify-center", children: /* @__PURE__ */ e(a.ItemIndicator, { children: /* @__PURE__ */ e(p, { size: 24, className: "text-active" }) }) })
|
|
134
135
|
]
|
|
135
136
|
}
|
|
136
137
|
));
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
t
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
138
|
+
S.displayName = a.Item.displayName;
|
|
139
|
+
const I = s.forwardRef(
|
|
140
|
+
({ className: t, ...l }, o) => /* @__PURE__ */ e(
|
|
141
|
+
u,
|
|
142
|
+
{
|
|
143
|
+
ref: o,
|
|
144
|
+
className: r("mx-8 my-4 w-auto", t),
|
|
145
|
+
...l
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
);
|
|
149
|
+
I.displayName = "SelectSeparator";
|
|
150
|
+
const z = s.forwardRef(({ className: t, ...l }, o) => /* @__PURE__ */ e(
|
|
151
|
+
a.ItemText,
|
|
150
152
|
{
|
|
151
|
-
ref:
|
|
153
|
+
ref: o,
|
|
152
154
|
"data-slot": "select-item-text",
|
|
153
|
-
className:
|
|
155
|
+
className: r("text-muted body-2", t),
|
|
154
156
|
...l
|
|
155
157
|
}
|
|
156
158
|
));
|
|
157
|
-
|
|
159
|
+
z.displayName = a.ItemText.displayName;
|
|
158
160
|
function R({
|
|
159
|
-
className:
|
|
161
|
+
className: t,
|
|
160
162
|
...l
|
|
161
163
|
}) {
|
|
162
164
|
return /* @__PURE__ */ e(
|
|
163
|
-
|
|
165
|
+
a.ScrollUpButton,
|
|
164
166
|
{
|
|
165
167
|
"data-slot": "select-scroll-up-button",
|
|
166
|
-
className:
|
|
168
|
+
className: r(
|
|
167
169
|
"flex cursor-default items-center justify-center py-1 text-muted",
|
|
168
|
-
|
|
170
|
+
t
|
|
169
171
|
),
|
|
170
172
|
...l,
|
|
171
|
-
children: /* @__PURE__ */ e(
|
|
173
|
+
children: /* @__PURE__ */ e(f, { className: "size-4" })
|
|
172
174
|
}
|
|
173
175
|
);
|
|
174
176
|
}
|
|
175
|
-
function
|
|
176
|
-
className:
|
|
177
|
+
function C({
|
|
178
|
+
className: t,
|
|
177
179
|
...l
|
|
178
180
|
}) {
|
|
179
181
|
return /* @__PURE__ */ e(
|
|
180
|
-
|
|
182
|
+
a.ScrollDownButton,
|
|
181
183
|
{
|
|
182
184
|
"data-slot": "select-scroll-down-button",
|
|
183
|
-
className:
|
|
185
|
+
className: r(
|
|
184
186
|
"flex cursor-default items-center justify-center py-1 text-muted",
|
|
185
|
-
|
|
187
|
+
t
|
|
186
188
|
),
|
|
187
189
|
...l,
|
|
188
190
|
children: /* @__PURE__ */ e(m, { className: "size-4" })
|
|
@@ -190,12 +192,12 @@ function j({
|
|
|
190
192
|
);
|
|
191
193
|
}
|
|
192
194
|
export {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
195
|
+
k as Select,
|
|
196
|
+
N as SelectContent,
|
|
197
|
+
G as SelectGroup,
|
|
198
|
+
S as SelectItem,
|
|
199
|
+
z as SelectItemText,
|
|
200
|
+
v as SelectLabel,
|
|
201
|
+
I as SelectSeparator,
|
|
202
|
+
x as SelectTrigger
|
|
201
203
|
};
|
|
@@ -4,8 +4,8 @@ import { cva as h } from "class-variance-authority";
|
|
|
4
4
|
import { useMemo as f } from "react";
|
|
5
5
|
import { Spinner as b } from "../Spinner/Spinner.js";
|
|
6
6
|
import { InformationFill as g } from "../../Symbols/Icons/InformationFill.js";
|
|
7
|
-
import { WarningFill as
|
|
8
|
-
import { DeleteCircleFill as
|
|
7
|
+
import { WarningFill as z } from "../../Symbols/Icons/WarningFill.js";
|
|
8
|
+
import { DeleteCircleFill as x } from "../../Symbols/Icons/DeleteCircleFill.js";
|
|
9
9
|
import { CheckmarkCircleFill as w } from "../../Symbols/Icons/CheckmarkCircleFill.js";
|
|
10
10
|
import { BluetoothCircleFill as y } from "../../Symbols/Icons/BluetoothCircleFill.js";
|
|
11
11
|
const F = h(
|
|
@@ -57,9 +57,9 @@ const F = h(
|
|
|
57
57
|
case "check":
|
|
58
58
|
return /* @__PURE__ */ e(w, { size: t });
|
|
59
59
|
case "error":
|
|
60
|
-
return /* @__PURE__ */ e(z, { size: t });
|
|
61
|
-
case "warning":
|
|
62
60
|
return /* @__PURE__ */ e(x, { size: t });
|
|
61
|
+
case "warning":
|
|
62
|
+
return /* @__PURE__ */ e(z, { size: t });
|
|
63
63
|
case "info":
|
|
64
64
|
return /* @__PURE__ */ e(g, { size: t });
|
|
65
65
|
case "loader":
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { IconSize } from '../Icon/types';
|
|
3
3
|
export type SpotAppearance = 'icon' | 'bluetooth' | 'check' | 'error' | 'warning' | 'info' | 'loader' | 'number';
|
|
4
|
-
|
|
5
|
-
* A discriminated union that enforces type-safe props based on the `appearance`.
|
|
6
|
-
*/
|
|
7
|
-
type DiscriminatedSpotProps = {
|
|
4
|
+
type SpotIconProps = {
|
|
8
5
|
/**
|
|
9
6
|
* Custom icon appearance with neutral base styling.
|
|
10
7
|
* @example <Spot appearance="icon" icon={SettingsIcon} />
|
|
11
8
|
*/
|
|
12
9
|
appearance: 'icon';
|
|
13
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Icon component to render. Required when appearance is 'icon'.
|
|
12
|
+
*/
|
|
14
13
|
icon: React.ComponentType<{
|
|
15
14
|
size?: IconSize;
|
|
16
15
|
className?: string;
|
|
17
16
|
}>;
|
|
18
|
-
}
|
|
17
|
+
};
|
|
18
|
+
type SpotNumberProps = {
|
|
19
19
|
/**
|
|
20
20
|
* Number appearance for displaying a single digit (0-9).
|
|
21
21
|
* @example <Spot appearance="number" number={5} />
|
|
22
22
|
*/
|
|
23
23
|
appearance: 'number';
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Digit (0-9) to display. Required when appearance is 'number'.
|
|
26
|
+
*/
|
|
25
27
|
number: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
26
|
-
}
|
|
28
|
+
};
|
|
29
|
+
type SpotStatusProps = {
|
|
27
30
|
/**
|
|
28
31
|
* Predefined status indicators with semantic styling.
|
|
29
32
|
* Options: 'bluetooth' | 'check' | 'error' | 'warning' | 'info' | 'loader'
|
|
@@ -31,8 +34,12 @@ type DiscriminatedSpotProps = {
|
|
|
31
34
|
*/
|
|
32
35
|
appearance: Exclude<SpotAppearance, 'icon' | 'number'>;
|
|
33
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* A discriminated union that enforces type-safe props based on the `appearance`.
|
|
39
|
+
*/
|
|
40
|
+
export type DiscriminatedSpotProps = SpotIconProps | SpotNumberProps | SpotStatusProps;
|
|
34
41
|
export type SpotSize = 32 | 48 | 56 | 72;
|
|
35
|
-
export type SpotProps = DiscriminatedSpotProps &
|
|
42
|
+
export type SpotProps = DiscriminatedSpotProps & {
|
|
36
43
|
/**
|
|
37
44
|
* Whether the spot is disabled.
|
|
38
45
|
* @default false
|
|
@@ -43,6 +50,6 @@ export type SpotProps = DiscriminatedSpotProps & HTMLAttributes<HTMLDivElement>
|
|
|
43
50
|
* @default 48
|
|
44
51
|
*/
|
|
45
52
|
size?: SpotSize;
|
|
46
|
-
}
|
|
53
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
47
54
|
export {};
|
|
48
55
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Spot/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,WAAW,GACX,OAAO,GACP,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,CAAC;AAEb
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Spot/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,WAAW,GACX,OAAO,GACP,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,CAAC;AAEb,KAAK,aAAa,GAAG;IACnB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpE,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB;;;OAGG;IACH,UAAU,EAAE,QAAQ,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC;CACxD,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC9B,aAAa,GACb,eAAe,GACf,eAAe,CAAC;AAEpB,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG,sBAAsB,GAAG;IAC/C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ const [x, p] = i("ThemeProvider"), D = ({
|
|
|
19
19
|
[t, o]
|
|
20
20
|
);
|
|
21
21
|
return /* @__PURE__ */ r(x, { value: d, children: /* @__PURE__ */ r(h, { locale: o, children: e }) });
|
|
22
|
-
},
|
|
22
|
+
}, O = () => {
|
|
23
23
|
const e = p({
|
|
24
24
|
consumerName: "useTheme",
|
|
25
25
|
contextRequired: !0
|
|
@@ -31,5 +31,5 @@ const [x, p] = i("ThemeProvider"), D = ({
|
|
|
31
31
|
};
|
|
32
32
|
export {
|
|
33
33
|
D as ThemeProvider,
|
|
34
|
-
|
|
34
|
+
O as useTheme
|
|
35
35
|
};
|