@ledgerhq/lumen-ui-react 0.0.64 → 0.0.66
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 +66 -59
- package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -0
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +49 -48
- package/dist/lib/Components/BaseInput/types.d.ts +5 -1
- package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.d.ts +3 -2
- package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +45 -13
- package/dist/lib/Components/SearchInput/types.d.ts +7 -1
- package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.d.ts +60 -24
- package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.js +66 -36
- package/dist/lib/Components/Subheader/index.d.ts +1 -1
- package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/types.d.ts +52 -6
- package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.d.ts +15 -9
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +117 -119
- package/dist/lib/Symbols/Icons/Asterisk.d.ts +26 -0
- package/dist/lib/Symbols/Icons/Asterisk.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Asterisk.js +28 -0
- package/dist/lib/Symbols/Icons/Bell.js +1 -1
- package/dist/lib/Symbols/Icons/BellFill.d.ts +26 -0
- package/dist/lib/Symbols/Icons/BellFill.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/BellFill.js +25 -0
- package/dist/lib/Symbols/Icons/BellNotification.js +1 -1
- package/dist/lib/Symbols/Icons/CreditCardFill.d.ts +26 -0
- package/dist/lib/Symbols/Icons/CreditCardFill.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/CreditCardFill.js +25 -0
- package/dist/lib/Symbols/Icons/Delete.js +1 -1
- package/dist/lib/Symbols/Icons/Exchange.js +1 -1
- package/dist/lib/Symbols/Icons/ExchangeFill.d.ts +26 -0
- package/dist/lib/Symbols/Icons/ExchangeFill.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/ExchangeFill.js +41 -0
- package/dist/lib/Symbols/Icons/ExpandLeft.d.ts +26 -0
- package/dist/lib/Symbols/Icons/ExpandLeft.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/ExpandLeft.js +28 -0
- package/dist/lib/Symbols/Icons/ExpandRight.d.ts +26 -0
- package/dist/lib/Symbols/Icons/ExpandRight.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/ExpandRight.js +28 -0
- package/dist/lib/Symbols/Icons/Home.js +1 -1
- package/dist/lib/Symbols/Icons/HomeFill.d.ts +26 -0
- package/dist/lib/Symbols/Icons/HomeFill.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/HomeFill.js +25 -0
- package/dist/lib/Symbols/Icons/LifeRingFill.d.ts +26 -0
- package/dist/lib/Symbols/Icons/LifeRingFill.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/LifeRingFill.js +25 -0
- package/dist/lib/Symbols/Icons/P2p.js +1 -1
- package/dist/lib/Symbols/Icons/Signature.js +1 -1
- package/dist/lib/Symbols/Icons/Spacerocket.js +1 -1
- package/dist/lib/Symbols/Icons/Tools.js +1 -1
- package/dist/lib/Symbols/Icons/TransferVertical.js +1 -1
- package/dist/lib/Symbols/Icons/Trash.js +1 -1
- package/dist/lib/Symbols/Icons/WarningFill.js +1 -1
- package/dist/lib/Symbols/index.d.ts +8 -0
- package/dist/lib/Symbols/index.d.ts.map +1 -1
- package/dist/lib/Symbols/index.js +474 -458
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Languages as
|
|
1
|
+
import { Languages as t } from "./i18n/languages.js";
|
|
2
2
|
import { AddressInput as n } from "./lib/Components/AddressInput/AddressInput.js";
|
|
3
3
|
import { AmountInput as p } from "./lib/Components/AmountInput/AmountInput.js";
|
|
4
4
|
import { Banner as u } from "./lib/Components/Banner/Banner.js";
|
|
5
5
|
import { BaseInput as l } from "./lib/Components/BaseInput/BaseInput.js";
|
|
6
6
|
import { Button as f } from "./lib/Components/Button/Button.js";
|
|
7
|
-
import { BaseButton as
|
|
8
|
-
import { CardButton as
|
|
9
|
-
import { Checkbox as
|
|
10
|
-
import { Dialog as
|
|
11
|
-
import { DialogHeader as
|
|
7
|
+
import { BaseButton as T } from "./lib/Components/Button/BaseButton.js";
|
|
8
|
+
import { CardButton as c } from "./lib/Components/CardButton/CardButton.js";
|
|
9
|
+
import { Checkbox as d } from "./lib/Components/Checkbox/Checkbox.js";
|
|
10
|
+
import { Dialog as b, DialogBody as h, DialogContent as M, DialogFooter as L, DialogTrigger as C } from "./lib/Components/Dialog/Dialog.js";
|
|
11
|
+
import { DialogHeader as B } from "./lib/Components/Dialog/DialogHeader/DialogHeader.js";
|
|
12
12
|
import { Divider as v } from "./lib/Components/Divider/Divider.js";
|
|
13
|
-
import { IconButton as
|
|
14
|
-
import { InteractiveIcon as
|
|
15
|
-
import { Link as
|
|
13
|
+
import { IconButton as w } from "./lib/Components/IconButton/IconButton.js";
|
|
14
|
+
import { InteractiveIcon as P } from "./lib/Components/InteractiveIcon/InteractiveIcon.js";
|
|
15
|
+
import { Link as y } from "./lib/Components/Link/Link.js";
|
|
16
16
|
import { ListItem as H, ListItemContent as j, ListItemDescription as q, ListItemIcon as z, ListItemLeading as E, ListItemSpot as J, ListItemTitle as K, ListItemTrailing as N, ListItemTruncate as O } from "./lib/Components/ListItem/ListItem.js";
|
|
17
|
-
import { Menu as U, MenuCheckboxItem as V, MenuContent as W, MenuGroup as X, MenuItem as Y, MenuLabel as Z, MenuPortal as _, MenuRadioGroup as $, MenuRadioItem as ee, MenuSeparator as
|
|
17
|
+
import { Menu as U, MenuCheckboxItem as V, MenuContent as W, MenuGroup as X, MenuItem as Y, MenuLabel as Z, MenuPortal as _, MenuRadioGroup as $, MenuRadioItem as ee, MenuSeparator as oe, MenuSub as te, MenuSubContent as re, MenuSubTrigger as ne, MenuTrigger as ie } from "./lib/Components/Menu/Menu.js";
|
|
18
18
|
import { SearchInput as me } from "./lib/Components/SearchInput/SearchInput.js";
|
|
19
|
-
import { Select as
|
|
20
|
-
import { Skeleton as
|
|
21
|
-
import { Spot as
|
|
22
|
-
import { Subheader as Ce } from "./lib/Components/Subheader/Subheader.js";
|
|
23
|
-
import { Switch as
|
|
24
|
-
import { Tag as
|
|
25
|
-
import { TextInput as
|
|
26
|
-
import { Tile as
|
|
27
|
-
import { Tooltip as
|
|
28
|
-
import { ThemeProvider as
|
|
19
|
+
import { Select as ae, SelectContent as le, SelectGroup as xe, SelectItem as fe, SelectItemText as Se, SelectLabel as Te, SelectSeparator as Ie, SelectTrigger as ce } from "./lib/Components/Select/Select.js";
|
|
20
|
+
import { Skeleton as de } from "./lib/Components/Skeleton/Skeleton.js";
|
|
21
|
+
import { Spot as be } from "./lib/Components/Spot/Spot.js";
|
|
22
|
+
import { Subheader as Me, SubheaderAction as Le, SubheaderCount as Ce, SubheaderDescription as De, SubheaderInfo as Be, SubheaderRow as ke, SubheaderShowMore as ve, SubheaderTitle as Ae } from "./lib/Components/Subheader/Subheader.js";
|
|
23
|
+
import { Switch as Ge } from "./lib/Components/Switch/Switch.js";
|
|
24
|
+
import { Tag as Re } from "./lib/Components/Tag/Tag.js";
|
|
25
|
+
import { TextInput as Fe } from "./lib/Components/TextInput/TextInput.js";
|
|
26
|
+
import { Tile as je, TileContent as qe, TileDescription as ze, TileSecondaryAction as Ee, TileSpot as Je, TileTitle as Ke } from "./lib/Components/Tile/Tile.js";
|
|
27
|
+
import { Tooltip as Oe, TooltipContent as Qe, TooltipProvider as Ue, TooltipTrigger as Ve } from "./lib/Components/Tooltip/Tooltip.js";
|
|
28
|
+
import { ThemeProvider as Xe, useTheme as Ye } from "./lib/Components/ThemeProvider/ThemeProvider.js";
|
|
29
29
|
export {
|
|
30
30
|
n as AddressInput,
|
|
31
31
|
p as AmountInput,
|
|
32
32
|
u as Banner,
|
|
33
|
-
|
|
33
|
+
T as BaseButton,
|
|
34
34
|
l as BaseInput,
|
|
35
35
|
f as Button,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
c as CardButton,
|
|
37
|
+
d as Checkbox,
|
|
38
|
+
b as Dialog,
|
|
39
|
+
h as DialogBody,
|
|
40
|
+
M as DialogContent,
|
|
41
|
+
L as DialogFooter,
|
|
42
|
+
B as DialogHeader,
|
|
43
|
+
C as DialogTrigger,
|
|
44
44
|
v as Divider,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
w as IconButton,
|
|
46
|
+
P as InteractiveIcon,
|
|
47
|
+
t as Languages,
|
|
48
|
+
y as Link,
|
|
49
49
|
H as ListItem,
|
|
50
50
|
j as ListItemContent,
|
|
51
51
|
q as ListItemDescription,
|
|
@@ -64,36 +64,43 @@ export {
|
|
|
64
64
|
_ as MenuPortal,
|
|
65
65
|
$ as MenuRadioGroup,
|
|
66
66
|
ee as MenuRadioItem,
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
oe as MenuSeparator,
|
|
68
|
+
te as MenuSub,
|
|
69
69
|
re as MenuSubContent,
|
|
70
70
|
ne as MenuSubTrigger,
|
|
71
71
|
ie as MenuTrigger,
|
|
72
72
|
me as SearchInput,
|
|
73
|
-
|
|
73
|
+
ae as Select,
|
|
74
74
|
le as SelectContent,
|
|
75
|
-
|
|
75
|
+
xe as SelectGroup,
|
|
76
76
|
fe as SelectItem,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
Fe as
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
77
|
+
Se as SelectItemText,
|
|
78
|
+
Te as SelectLabel,
|
|
79
|
+
Ie as SelectSeparator,
|
|
80
|
+
ce as SelectTrigger,
|
|
81
|
+
de as Skeleton,
|
|
82
|
+
be as Spot,
|
|
83
|
+
Me as Subheader,
|
|
84
|
+
Le as SubheaderAction,
|
|
85
|
+
Ce as SubheaderCount,
|
|
86
|
+
De as SubheaderDescription,
|
|
87
|
+
Be as SubheaderInfo,
|
|
88
|
+
ke as SubheaderRow,
|
|
89
|
+
ve as SubheaderShowMore,
|
|
90
|
+
Ae as SubheaderTitle,
|
|
91
|
+
Ge as Switch,
|
|
92
|
+
Re as Tag,
|
|
93
|
+
Fe as TextInput,
|
|
94
|
+
Xe as ThemeProvider,
|
|
95
|
+
je as Tile,
|
|
96
|
+
qe as TileContent,
|
|
97
|
+
ze as TileDescription,
|
|
98
|
+
Ee as TileSecondaryAction,
|
|
99
|
+
Je as TileSpot,
|
|
100
|
+
Ke as TileTitle,
|
|
101
|
+
Oe as Tooltip,
|
|
102
|
+
Qe as TooltipContent,
|
|
103
|
+
Ue as TooltipProvider,
|
|
104
|
+
Ve as TooltipTrigger,
|
|
105
|
+
Ye as useTheme
|
|
99
106
|
};
|
|
@@ -27,6 +27,7 @@ export declare const BaseInput: React.ForwardRefExoticComponent<{
|
|
|
27
27
|
onClear?: () => void;
|
|
28
28
|
hideClearButton?: boolean;
|
|
29
29
|
className?: string;
|
|
30
|
+
containerClassName?: string;
|
|
30
31
|
inputClassName?: string;
|
|
31
32
|
labelClassName?: string;
|
|
32
33
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AA+B1B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AA+B1B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;iHA0LrB,CAAC"}
|
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
3
|
-
import
|
|
4
|
-
import { useCommonTranslation as
|
|
5
|
-
import { InteractiveIcon as
|
|
2
|
+
import { cn as a } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import l from "react";
|
|
4
|
+
import { useCommonTranslation as _ } from "../../../i18n/useCommonTranslation.js";
|
|
5
|
+
import { InteractiveIcon as $ } from "../InteractiveIcon/InteractiveIcon.js";
|
|
6
6
|
import { DeleteCircleFill as I } from "../../Symbols/Icons/DeleteCircleFill.js";
|
|
7
|
-
const
|
|
7
|
+
const q = a(
|
|
8
8
|
"group relative flex h-48 w-full cursor-text items-center gap-8 rounded-sm bg-muted px-16 transition-colors",
|
|
9
9
|
"focus-within:ring-2 focus-within:ring-active hover:bg-muted-hover",
|
|
10
10
|
"has-disabled:cursor-not-allowed has-disabled:bg-disabled has-disabled:text-disabled",
|
|
11
11
|
"has-invalid:border-error has-invalid:ring-1 has-invalid:ring-error",
|
|
12
12
|
'has-[input[aria-invalid="true"]]:border-error has-[input[aria-invalid="true"]]:ring-1 has-[input[aria-invalid="true"]]:ring-error'
|
|
13
|
-
),
|
|
13
|
+
), H = a(
|
|
14
14
|
"peer w-full flex-1 bg-muted body-1 text-base caret-active outline-hidden transition-colors",
|
|
15
15
|
"group-hover:bg-muted-hover group-disabled:bg-disabled",
|
|
16
16
|
"group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
|
|
17
17
|
"placeholder:text-muted group-has-disabled:placeholder:text-disabled",
|
|
18
18
|
"[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
19
19
|
"truncate"
|
|
20
|
-
),
|
|
20
|
+
), U = a(
|
|
21
21
|
"pointer-events-none absolute top-6 left-16 origin-left body-4 text-muted transition-all duration-300",
|
|
22
22
|
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-placeholder-shown:body-2",
|
|
23
23
|
"group-has-disabled:text-disabled",
|
|
24
24
|
"peer-focus:top-6 peer-focus:-translate-y-0 peer-focus:body-4",
|
|
25
25
|
"w-[calc(100%-var(--size-56))] truncate"
|
|
26
|
-
),
|
|
26
|
+
), G = l.forwardRef(
|
|
27
27
|
({
|
|
28
28
|
className: N,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
containerClassName: R,
|
|
30
|
+
inputClassName: S,
|
|
31
|
+
labelClassName: k,
|
|
31
32
|
label: u,
|
|
32
|
-
id:
|
|
33
|
+
id: z,
|
|
33
34
|
disabled: f,
|
|
34
|
-
errorMessage:
|
|
35
|
-
suffix:
|
|
36
|
-
prefix:
|
|
35
|
+
errorMessage: i,
|
|
36
|
+
suffix: E,
|
|
37
|
+
prefix: j,
|
|
37
38
|
onClear: p,
|
|
38
|
-
hideClearButton:
|
|
39
|
+
hideClearButton: B = !1,
|
|
39
40
|
"aria-invalid": m,
|
|
40
41
|
onChange: d,
|
|
41
|
-
...
|
|
42
|
-
},
|
|
42
|
+
...o
|
|
43
|
+
}, C) => {
|
|
43
44
|
var x;
|
|
44
|
-
const { t:
|
|
45
|
-
((x =
|
|
46
|
-
),
|
|
45
|
+
const { t: D } = _(), r = l.useRef(null), F = l.useId(), b = z || `input-${F}`, L = m || (i ? !0 : void 0), c = o.value !== void 0, [T, v] = l.useState(
|
|
46
|
+
((x = o.defaultValue) == null ? void 0 : x.toString()) || ""
|
|
47
|
+
), V = l.useCallback(
|
|
47
48
|
(t) => {
|
|
48
49
|
c || v(t.target.value), d == null || d(t);
|
|
49
50
|
},
|
|
50
51
|
[c, d]
|
|
51
|
-
), g = (c ? !!
|
|
52
|
+
), g = (c ? !!o.value && o.value.toString().length > 0 : T.length > 0) && !f && !B, w = `${b}-error`, A = () => {
|
|
52
53
|
var e;
|
|
53
54
|
if (!r.current) return;
|
|
54
55
|
const t = (e = Object.getOwnPropertyDescriptor(
|
|
@@ -56,13 +57,13 @@ const $ = l(
|
|
|
56
57
|
"value"
|
|
57
58
|
)) == null ? void 0 : e.set;
|
|
58
59
|
t == null || t.call(r.current, ""), c || v("");
|
|
59
|
-
const
|
|
60
|
-
r.current.dispatchEvent(
|
|
60
|
+
const s = new Event("input", { bubbles: !0 });
|
|
61
|
+
r.current.dispatchEvent(s), r.current.focus(), p == null || p();
|
|
61
62
|
};
|
|
62
|
-
function
|
|
63
|
-
return (
|
|
63
|
+
function O(...t) {
|
|
64
|
+
return (s) => {
|
|
64
65
|
t.forEach((e) => {
|
|
65
|
-
e && (typeof e == "function" ? e(
|
|
66
|
+
e && (typeof e == "function" ? e(s) : e.current = s);
|
|
66
67
|
});
|
|
67
68
|
};
|
|
68
69
|
}
|
|
@@ -70,7 +71,7 @@ const $ = l(
|
|
|
70
71
|
/* @__PURE__ */ h(
|
|
71
72
|
"div",
|
|
72
73
|
{
|
|
73
|
-
className:
|
|
74
|
+
className: a(q, R),
|
|
74
75
|
onPointerDown: (t) => {
|
|
75
76
|
if (t.target.closest("input, button, a")) return;
|
|
76
77
|
const e = r.current;
|
|
@@ -85,51 +86,51 @@ const $ = l(
|
|
|
85
86
|
});
|
|
86
87
|
},
|
|
87
88
|
children: [
|
|
88
|
-
|
|
89
|
+
j,
|
|
89
90
|
/* @__PURE__ */ n(
|
|
90
91
|
"input",
|
|
91
92
|
{
|
|
92
|
-
ref:
|
|
93
|
+
ref: O(C, r),
|
|
93
94
|
id: b,
|
|
94
95
|
disabled: f,
|
|
95
96
|
placeholder: " ",
|
|
96
|
-
"aria-invalid":
|
|
97
|
-
"aria-describedby":
|
|
98
|
-
className:
|
|
99
|
-
|
|
97
|
+
"aria-invalid": L,
|
|
98
|
+
"aria-describedby": i ? w : void 0,
|
|
99
|
+
className: a(
|
|
100
|
+
H,
|
|
100
101
|
u && "pt-12 body-2",
|
|
101
|
-
|
|
102
|
+
S
|
|
102
103
|
),
|
|
103
|
-
onChange:
|
|
104
|
-
...
|
|
104
|
+
onChange: V,
|
|
105
|
+
...o
|
|
105
106
|
}
|
|
106
107
|
),
|
|
107
108
|
u && /* @__PURE__ */ n(
|
|
108
109
|
"label",
|
|
109
110
|
{
|
|
110
111
|
htmlFor: b,
|
|
111
|
-
className:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
className: a(
|
|
113
|
+
U,
|
|
114
|
+
i && "text-error",
|
|
115
|
+
k
|
|
115
116
|
),
|
|
116
117
|
children: u
|
|
117
118
|
}
|
|
118
119
|
),
|
|
119
120
|
g && /* @__PURE__ */ n(
|
|
120
|
-
|
|
121
|
+
$,
|
|
121
122
|
{
|
|
122
123
|
iconType: "filled",
|
|
123
|
-
onClick:
|
|
124
|
-
"aria-label":
|
|
124
|
+
onClick: A,
|
|
125
|
+
"aria-label": D("components.baseInput.clearInputAriaLabel"),
|
|
125
126
|
children: /* @__PURE__ */ n(I, { size: 20 })
|
|
126
127
|
}
|
|
127
128
|
),
|
|
128
|
-
!g &&
|
|
129
|
+
!g && E
|
|
129
130
|
]
|
|
130
131
|
}
|
|
131
132
|
),
|
|
132
|
-
|
|
133
|
+
i && /* @__PURE__ */ h(
|
|
133
134
|
"div",
|
|
134
135
|
{
|
|
135
136
|
id: w,
|
|
@@ -137,14 +138,14 @@ const $ = l(
|
|
|
137
138
|
role: "alert",
|
|
138
139
|
children: [
|
|
139
140
|
/* @__PURE__ */ n(I, { size: 16, className: "shrink-0 text-error" }),
|
|
140
|
-
/* @__PURE__ */ n("span", { children:
|
|
141
|
+
/* @__PURE__ */ n("span", { children: i })
|
|
141
142
|
]
|
|
142
143
|
}
|
|
143
144
|
)
|
|
144
145
|
] });
|
|
145
146
|
}
|
|
146
147
|
);
|
|
147
|
-
|
|
148
|
+
G.displayName = "BaseInput";
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
G as BaseInput
|
|
150
151
|
};
|
|
@@ -32,9 +32,13 @@ export type BaseInputProps = {
|
|
|
32
32
|
*/
|
|
33
33
|
hideClearButton?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* Additional class names to apply to the
|
|
35
|
+
* Additional class names to apply to the outer wrapper element
|
|
36
36
|
*/
|
|
37
37
|
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Additional class names to apply to the inner container element
|
|
40
|
+
*/
|
|
41
|
+
containerClassName?: string;
|
|
38
42
|
/**
|
|
39
43
|
* Additional class names to apply to the input element
|
|
40
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { SearchInputProps } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* A customizable search input component with built-in search icon, automatic clear button, error states, and focus/hover effects.
|
|
5
4
|
*
|
|
@@ -54,5 +53,7 @@ import { SearchInputProps } from './types';
|
|
|
54
53
|
* }}
|
|
55
54
|
* />
|
|
56
55
|
*/
|
|
57
|
-
export declare const SearchInput: React.ForwardRefExoticComponent<
|
|
56
|
+
export declare const SearchInput: React.ForwardRefExoticComponent<Omit<import('..').BaseInputProps, "label" | "prefix" | "containerClassName" | "labelClassName"> & {
|
|
57
|
+
appearance?: "plain" | "transparent";
|
|
58
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
58
59
|
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AA+B1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,WAAW;;0CAuBvB,CAAC"}
|
|
@@ -1,18 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as t } from "class-variance-authority";
|
|
4
|
+
import o from "react";
|
|
5
|
+
import { BaseInput as d } from "../BaseInput/BaseInput.js";
|
|
6
|
+
import { Search as c } from "../../Symbols/Icons/Search.js";
|
|
7
|
+
const m = t("", {
|
|
8
|
+
variants: {
|
|
9
|
+
appearance: {
|
|
10
|
+
plain: "",
|
|
11
|
+
transparent: "bg-muted-transparent hover:bg-muted-transparent-hover has-disabled:bg-muted-transparent-disabled"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
appearance: "plain"
|
|
16
|
+
}
|
|
17
|
+
}), l = t("", {
|
|
18
|
+
variants: {
|
|
19
|
+
appearance: {
|
|
20
|
+
plain: "",
|
|
21
|
+
transparent: "bg-transparent group-hover:bg-transparent-hover group-has-disabled:bg-transparent-disabled"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
appearance: "plain"
|
|
26
|
+
}
|
|
27
|
+
}), u = o.forwardRef(
|
|
28
|
+
({ appearance: a = "plain", className: e, inputClassName: n, ...s }, p) => /* @__PURE__ */ r(
|
|
29
|
+
d,
|
|
8
30
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
31
|
+
ref: p,
|
|
32
|
+
prefix: /* @__PURE__ */ r(
|
|
33
|
+
c,
|
|
34
|
+
{
|
|
35
|
+
size: 20,
|
|
36
|
+
className: "text-muted group-has-disabled:text-disabled",
|
|
37
|
+
"aria-hidden": "true"
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
className: e,
|
|
41
|
+
containerClassName: m({ appearance: a }),
|
|
42
|
+
inputClassName: i(l({ appearance: a }), n),
|
|
43
|
+
...s
|
|
12
44
|
}
|
|
13
|
-
)
|
|
45
|
+
)
|
|
14
46
|
);
|
|
15
|
-
|
|
47
|
+
u.displayName = "SearchInput";
|
|
16
48
|
export {
|
|
17
|
-
|
|
49
|
+
u as SearchInput
|
|
18
50
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { BaseInputProps } from '../BaseInput/types';
|
|
2
|
-
export type SearchInputProps = Omit<BaseInputProps, 'prefix' | 'label' | 'labelClassName' | '
|
|
2
|
+
export type SearchInputProps = Omit<BaseInputProps, 'prefix' | 'label' | 'labelClassName' | 'containerClassName'> & {
|
|
3
|
+
/**
|
|
4
|
+
* The visual appearance of the search input
|
|
5
|
+
* @default 'plain'
|
|
6
|
+
*/
|
|
7
|
+
appearance?: 'plain' | 'transparent';
|
|
8
|
+
};
|
|
3
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,QAAQ,GAAG,OAAO,GAAG,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,QAAQ,GAAG,OAAO,GAAG,gBAAgB,GAAG,oBAAoB,CAC7D,GAAG;IACF;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;CACtC,CAAC"}
|
|
@@ -1,6 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SubheaderActionProps, SubheaderCountProps, SubheaderDescriptionProps, SubheaderInfoProps, SubheaderProps, SubheaderRowProps, SubheaderShowMoreProps, SubheaderTitleProps } from './types';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* Title component for the Subheader. Displays the main heading.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SubheaderTitle: ({ children }: SubheaderTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Row component for the Subheader. Layout container to horizontally align title, count, hint, and action.
|
|
9
|
+
* Can optionally be interactive with an onClick handler.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SubheaderRow: ({ children, onClick, className, ...props }: SubheaderRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Count component for the Subheader. Displays a formatted number.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SubheaderCount: ({ value, format }: SubheaderCountProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Info component for the Subheader. Displays an information icon that can be wrapped in a Tooltip.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SubheaderInfo: React.ForwardRefExoticComponent<Omit<SubheaderInfoProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
/**
|
|
21
|
+
* ShowMore component for the Subheader. Displays a static chevron right icon to indicate expandable content.
|
|
22
|
+
* Position this after SubheaderCount and before other elements.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SubheaderShowMore: ({ className }: SubheaderShowMoreProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Description component for the Subheader. Displays descriptive text below the title row.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SubheaderDescription: ({ children, }: SubheaderDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Action component for the Subheader. Displays an interactive text button.
|
|
31
|
+
* Automatically positions itself at the end of the row using ml-auto.
|
|
32
|
+
*/
|
|
33
|
+
export declare const SubheaderAction: ({ children, onClick, className, ...props }: SubheaderActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* A subheader component for displaying section titles with optional count, hints, descriptions, and action elements.
|
|
36
|
+
* Uses a composable API where you explicitly nest sub-components to define the layout.
|
|
4
37
|
*
|
|
5
38
|
* @see {@link https://ldls.vercel.app/?path=/docs/misc-subheader-overview--docs Storybook}
|
|
6
39
|
* @see {@link https://ldls.vercel.app/?path=/docs/misc-subheader-implementation--docs#dos-and-donts Guidelines}
|
|
@@ -9,33 +42,36 @@ import { SubheaderActionProps, SubheaderInfoProps, SubheaderProps } from './type
|
|
|
9
42
|
* Do not use it to modify the subheader's core appearance (colors, padding, etc).
|
|
10
43
|
*
|
|
11
44
|
* @example
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
45
|
+
* // Simple subheader without row
|
|
46
|
+
* <Subheader>
|
|
47
|
+
* <SubheaderTitle>Section Title</SubheaderTitle>
|
|
48
|
+
* <SubheaderDescription>Description text</SubheaderDescription>
|
|
49
|
+
* </Subheader>
|
|
16
50
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
51
|
+
* @example
|
|
52
|
+
* // Subheader with row for horizontal layout
|
|
53
|
+
* <Subheader>
|
|
54
|
+
* <SubheaderRow>
|
|
55
|
+
* <SubheaderTitle>Section Title</SubheaderTitle>
|
|
56
|
+
* <SubheaderCount value={30} />
|
|
20
57
|
* <Tooltip>
|
|
21
|
-
* <TooltipTrigger
|
|
22
|
-
* <
|
|
23
|
-
* size={12}
|
|
24
|
-
* className="shrink-0 text-muted"
|
|
25
|
-
* aria-label="More information"
|
|
26
|
-
* />
|
|
58
|
+
* <TooltipTrigger>
|
|
59
|
+
* <SubheaderInfo />
|
|
27
60
|
* </TooltipTrigger>
|
|
28
61
|
* <TooltipContent>Additional information</TooltipContent>
|
|
29
62
|
* </Tooltip>
|
|
30
|
-
* </
|
|
31
|
-
* <
|
|
32
|
-
*
|
|
33
|
-
*
|
|
63
|
+
* </SubheaderRow>
|
|
64
|
+
* <SubheaderDescription>Description text</SubheaderDescription>
|
|
65
|
+
* </Subheader>
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* // Interactive row with action
|
|
69
|
+
* <Subheader>
|
|
70
|
+
* <SubheaderRow onClick={handleClick}>
|
|
71
|
+
* <SubheaderTitle>Accounts</SubheaderTitle>
|
|
72
|
+
* <SubheaderCount value={12} />
|
|
73
|
+
* </SubheaderRow>
|
|
34
74
|
* </Subheader>
|
|
35
75
|
*/
|
|
36
|
-
export declare const Subheader: {
|
|
37
|
-
({ className, title, children, ...props }: SubheaderProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
Info: ({ children }: SubheaderInfoProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
Action: ({ children }: SubheaderActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
};
|
|
76
|
+
export declare const Subheader: ({ className, children, ...props }: SubheaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
77
|
//# sourceMappingURL=Subheader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subheader.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Subheader/Subheader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Subheader.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Subheader/Subheader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,cAAc,mBAAmB,4CAE/D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,4CAK1B,iBAAiB,4CAgBnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,mBAAmB,mBAAmB,4CAGpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,2GAiBxB,CAAC;AAGH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,eAAe,sBAAsB,4CAMtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,eAElC,yBAAyB,4CAE3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,4CAK7B,oBAAoB,4CAWtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,SAAS,GAAI,mCAIvB,cAAc,4CAMhB,CAAC"}
|