@ledgerhq/lumen-ui-react 0.0.71 → 0.0.73
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 +21 -20
- package/dist/lib/Components/Icon/Icon.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.js +8 -7
- package/dist/lib/Components/Icon/types.d.ts +1 -1
- package/dist/lib/Components/Icon/types.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.js +4 -1
- package/dist/lib/Components/Spot/Spot.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.js +9 -6
- package/dist/lib/Components/Spot/types.d.ts +1 -1
- package/dist/lib/Components/Spot/types.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.d.ts +23 -3
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +50 -36
- 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 +20 -2
- package/dist/lib/Components/Tile/types.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import { AmountInput as p } from "./lib/Components/AmountInput/AmountInput.js";
|
|
|
4
4
|
import { AmountDisplay as m } from "./lib/Components/AmountDisplay/AmountDisplay.js";
|
|
5
5
|
import { Banner as l } from "./lib/Components/Banner/Banner.js";
|
|
6
6
|
import { BaseInput as f } from "./lib/Components/BaseInput/BaseInput.js";
|
|
7
|
-
import { Button as
|
|
7
|
+
import { Button as S } from "./lib/Components/Button/Button.js";
|
|
8
8
|
import { BaseButton as I } from "./lib/Components/Button/BaseButton.js";
|
|
9
9
|
import { CardButton as d } from "./lib/Components/CardButton/CardButton.js";
|
|
10
10
|
import { Checkbox as B } from "./lib/Components/Checkbox/Checkbox.js";
|
|
11
|
-
import { Dialog as h, DialogBody as M, DialogContent as
|
|
11
|
+
import { Dialog as h, DialogBody as M, DialogContent as C, DialogFooter as L, DialogTrigger as D } from "./lib/Components/Dialog/Dialog.js";
|
|
12
12
|
import { DialogHeader as k } from "./lib/Components/Dialog/DialogHeader/DialogHeader.js";
|
|
13
13
|
import { Divider as N } from "./lib/Components/Divider/Divider.js";
|
|
14
14
|
import { IconButton as y } from "./lib/Components/IconButton/IconButton.js";
|
|
@@ -16,19 +16,19 @@ import { InteractiveIcon as P } from "./lib/Components/InteractiveIcon/Interacti
|
|
|
16
16
|
import { Link as F } from "./lib/Components/Link/Link.js";
|
|
17
17
|
import { ListItem as j, ListItemContent as q, ListItemDescription as z, ListItemIcon as E, ListItemLeading as J, ListItemSpot as K, ListItemTitle as O, ListItemTrailing as Q, ListItemTruncate as U } from "./lib/Components/ListItem/ListItem.js";
|
|
18
18
|
import { Menu as W, MenuCheckboxItem as X, MenuContent as Y, MenuGroup as Z, MenuItem as _, MenuLabel as $, MenuPortal as ee, MenuRadioGroup as oe, MenuRadioItem as te, MenuSeparator as re, MenuSub as ne, MenuSubContent as ie, MenuSubTrigger as pe, MenuTrigger as ae } from "./lib/Components/Menu/Menu.js";
|
|
19
|
-
import { NavBar as ue, NavBarBackButton as le, NavBarCoinCapsule as xe, NavBarTitle as fe, NavBarTrailing as
|
|
19
|
+
import { NavBar as ue, NavBarBackButton as le, NavBarCoinCapsule as xe, NavBarTitle as fe, NavBarTrailing as Te } from "./lib/Components/NavBar/NavBar.js";
|
|
20
20
|
import { SearchInput as ce } from "./lib/Components/SearchInput/SearchInput.js";
|
|
21
|
-
import { Select as ge, SelectContent as de, SelectGroup as se, SelectItem as Be, SelectItemText as be, SelectLabel as he, SelectSeparator as Me, SelectTrigger as
|
|
21
|
+
import { Select as ge, SelectContent as de, SelectGroup as se, SelectItem as Be, SelectItemText as be, SelectLabel as he, SelectSeparator as Me, SelectTrigger as Ce } from "./lib/Components/Select/Select.js";
|
|
22
22
|
import { Skeleton as De } from "./lib/Components/Skeleton/Skeleton.js";
|
|
23
23
|
import { Spot as ke } from "./lib/Components/Spot/Spot.js";
|
|
24
24
|
import { Subheader as Ne, SubheaderAction as we, SubheaderCount as ye, SubheaderDescription as Ge, SubheaderInfo as Pe, SubheaderRow as Re, SubheaderShowMore as Fe, SubheaderTitle as He } from "./lib/Components/Subheader/Subheader.js";
|
|
25
25
|
import { Switch as qe } from "./lib/Components/Switch/Switch.js";
|
|
26
26
|
import { Tag as Ee } from "./lib/Components/Tag/Tag.js";
|
|
27
27
|
import { TextInput as Ke } from "./lib/Components/TextInput/TextInput.js";
|
|
28
|
-
import { Tile as Qe, TileContent as Ue, TileDescription as Ve, TileSecondaryAction as We, TileSpot as Xe, TileTitle as Ye } from "./lib/Components/Tile/Tile.js";
|
|
29
|
-
import { TileButton as
|
|
30
|
-
import { Tooltip as
|
|
31
|
-
import { ThemeProvider as
|
|
28
|
+
import { Tile as Qe, TileContent as Ue, TileDescription as Ve, TileSecondaryAction as We, TileSpot as Xe, TileTitle as Ye, TileTrailingContent as Ze } from "./lib/Components/Tile/Tile.js";
|
|
29
|
+
import { TileButton as $e } from "./lib/Components/TileButton/TileButton.js";
|
|
30
|
+
import { Tooltip as oo, TooltipContent as to, TooltipProvider as ro, TooltipTrigger as no } from "./lib/Components/Tooltip/Tooltip.js";
|
|
31
|
+
import { ThemeProvider as po, useTheme as ao } from "./lib/Components/ThemeProvider/ThemeProvider.js";
|
|
32
32
|
export {
|
|
33
33
|
n as AddressInput,
|
|
34
34
|
m as AmountDisplay,
|
|
@@ -36,13 +36,13 @@ export {
|
|
|
36
36
|
l as Banner,
|
|
37
37
|
I as BaseButton,
|
|
38
38
|
f as BaseInput,
|
|
39
|
-
|
|
39
|
+
S as Button,
|
|
40
40
|
d as CardButton,
|
|
41
41
|
B as Checkbox,
|
|
42
42
|
h as Dialog,
|
|
43
43
|
M as DialogBody,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
C as DialogContent,
|
|
45
|
+
L as DialogFooter,
|
|
46
46
|
k as DialogHeader,
|
|
47
47
|
D as DialogTrigger,
|
|
48
48
|
N as Divider,
|
|
@@ -77,7 +77,7 @@ export {
|
|
|
77
77
|
le as NavBarBackButton,
|
|
78
78
|
xe as NavBarCoinCapsule,
|
|
79
79
|
fe as NavBarTitle,
|
|
80
|
-
|
|
80
|
+
Te as NavBarTrailing,
|
|
81
81
|
ce as SearchInput,
|
|
82
82
|
ge as Select,
|
|
83
83
|
de as SelectContent,
|
|
@@ -86,7 +86,7 @@ export {
|
|
|
86
86
|
be as SelectItemText,
|
|
87
87
|
he as SelectLabel,
|
|
88
88
|
Me as SelectSeparator,
|
|
89
|
-
|
|
89
|
+
Ce as SelectTrigger,
|
|
90
90
|
De as Skeleton,
|
|
91
91
|
ke as Spot,
|
|
92
92
|
Ne as Subheader,
|
|
@@ -100,17 +100,18 @@ export {
|
|
|
100
100
|
qe as Switch,
|
|
101
101
|
Ee as Tag,
|
|
102
102
|
Ke as TextInput,
|
|
103
|
-
|
|
103
|
+
po as ThemeProvider,
|
|
104
104
|
Qe as Tile,
|
|
105
|
-
|
|
105
|
+
$e as TileButton,
|
|
106
106
|
Ue as TileContent,
|
|
107
107
|
Ve as TileDescription,
|
|
108
108
|
We as TileSecondaryAction,
|
|
109
109
|
Xe as TileSpot,
|
|
110
110
|
Ye as TileTitle,
|
|
111
|
-
|
|
112
|
-
oo as
|
|
113
|
-
to as
|
|
114
|
-
ro as
|
|
115
|
-
|
|
111
|
+
Ze as TileTrailingContent,
|
|
112
|
+
oo as Tooltip,
|
|
113
|
+
to as TooltipContent,
|
|
114
|
+
ro as TooltipProvider,
|
|
115
|
+
no as TooltipTrigger,
|
|
116
|
+
ao as useTheme
|
|
116
117
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Icon/Icon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Icon/Icon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAoBpC,eAAO,MAAM,IAAI,kHAgBhB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { cn as s } from "../../../libs/utils-shared/dist/index.js";
|
|
2
2
|
import { cva as a } from "class-variance-authority";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
const
|
|
3
|
+
import { forwardRef as k, createElement as l } from "react";
|
|
4
|
+
const h = a("inline-block", {
|
|
5
5
|
variants: {
|
|
6
6
|
size: {
|
|
7
7
|
12: "icon-w-12 icon-h-12 icon-stroke-12",
|
|
8
8
|
16: "icon-w-16 icon-h-16 icon-stroke-16",
|
|
9
9
|
20: "icon-w-20 icon-h-20 icon-stroke-20",
|
|
10
|
+
32: "icon-w-32 icon-h-32 icon-stroke-32",
|
|
10
11
|
24: "icon-w-24 icon-h-24 icon-stroke-24",
|
|
11
12
|
40: "icon-w-40 icon-h-40 icon-stroke-40",
|
|
12
13
|
48: "icon-w-48 icon-h-48 icon-stroke-48",
|
|
@@ -16,8 +17,8 @@ const m = a("inline-block", {
|
|
|
16
17
|
defaultVariants: {
|
|
17
18
|
size: 24
|
|
18
19
|
}
|
|
19
|
-
}),
|
|
20
|
-
({ size: o = 24, className: n = "", children: i, viewBox: c, xmlns: e, ...r }, t) =>
|
|
20
|
+
}), m = k(
|
|
21
|
+
({ size: o = 24, className: n = "", children: i, viewBox: c, xmlns: e, ...r }, t) => l(
|
|
21
22
|
"svg",
|
|
22
23
|
{
|
|
23
24
|
ref: t,
|
|
@@ -25,13 +26,13 @@ const m = a("inline-block", {
|
|
|
25
26
|
"aria-hidden": "true",
|
|
26
27
|
xmlns: e,
|
|
27
28
|
viewBox: c,
|
|
28
|
-
className: s(n,
|
|
29
|
+
className: s(n, h({ size: o }), "inline-block"),
|
|
29
30
|
...r
|
|
30
31
|
},
|
|
31
32
|
i
|
|
32
33
|
)
|
|
33
34
|
);
|
|
34
|
-
|
|
35
|
+
m.displayName = "Icon";
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
m as Icon
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Icon/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Icon/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EACL,qBAAqB,EAGrB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,2GAO5B,CAAC;AAGH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,iGAkB3B,CAAC;AAGH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EACL,qBAAqB,EAGrB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,2GAO5B,CAAC;AAGH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,iGAkB3B,CAAC;AAGH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,sFAgBvB,CAAC;AAGF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,4FAczB,CAAC;AAGH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,MAAM;;;yGAalB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spot.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Spot/Spot.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Spot.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Spot/Spot.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AA8B9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,4CAwDpC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cn as d } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as h } from "class-variance-authority";
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { Spinner as
|
|
4
|
+
import { useMemo as b } from "react";
|
|
5
|
+
import { Spinner as f } from "../Spinner/Spinner.js";
|
|
6
6
|
import { InformationFill as g } from "../../Symbols/Icons/InformationFill.js";
|
|
7
7
|
import { WarningFill as x } from "../../Symbols/Icons/WarningFill.js";
|
|
8
8
|
import { DeleteCircleFill as z } from "../../Symbols/Icons/DeleteCircleFill.js";
|
|
@@ -27,6 +27,7 @@ const F = h(
|
|
|
27
27
|
},
|
|
28
28
|
size: {
|
|
29
29
|
32: "spot-w-32 spot-h-32",
|
|
30
|
+
40: "spot-w-40 spot-h-40",
|
|
30
31
|
48: "spot-w-48 spot-h-48",
|
|
31
32
|
56: "spot-w-56 spot-h-56",
|
|
32
33
|
72: "spot-w-72 spot-h-72"
|
|
@@ -34,17 +35,19 @@ const F = h(
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
), D = (r) => {
|
|
37
|
-
const { appearance:
|
|
38
|
+
const { appearance: s, className: a, disabled: i, size: o = 48, ...c } = r, l = {
|
|
38
39
|
32: 12,
|
|
40
|
+
40: 16,
|
|
39
41
|
48: 20,
|
|
40
42
|
56: 24,
|
|
41
43
|
72: 40
|
|
42
44
|
}, m = {
|
|
43
45
|
32: "body-2-semi-bold",
|
|
46
|
+
40: "body-1-semi-bold",
|
|
44
47
|
48: "heading-5",
|
|
45
48
|
56: "heading-4",
|
|
46
49
|
72: "heading-2"
|
|
47
|
-
}, t = l[o] ?? 20, n = m[o] ?? "heading-5", p =
|
|
50
|
+
}, t = l[o] ?? 20, n = m[o] ?? "heading-5", p = b(() => {
|
|
48
51
|
switch (r.appearance) {
|
|
49
52
|
case "icon": {
|
|
50
53
|
const { icon: u } = r;
|
|
@@ -63,13 +66,13 @@ const F = h(
|
|
|
63
66
|
case "info":
|
|
64
67
|
return /* @__PURE__ */ e(g, { size: t });
|
|
65
68
|
case "loader":
|
|
66
|
-
return /* @__PURE__ */ e(
|
|
69
|
+
return /* @__PURE__ */ e(f, { size: t });
|
|
67
70
|
}
|
|
68
71
|
}, [r, t, n]);
|
|
69
72
|
return /* @__PURE__ */ e(
|
|
70
73
|
"div",
|
|
71
74
|
{
|
|
72
|
-
className: d(
|
|
75
|
+
className: d(a, F({ appearance: s, disabled: i, size: o })),
|
|
73
76
|
...c,
|
|
74
77
|
children: p
|
|
75
78
|
}
|
|
@@ -38,7 +38,7 @@ type SpotStatusProps = {
|
|
|
38
38
|
* A discriminated union that enforces type-safe props based on the `appearance`.
|
|
39
39
|
*/
|
|
40
40
|
export type DiscriminatedSpotProps = SpotIconProps | SpotNumberProps | SpotStatusProps;
|
|
41
|
-
export type SpotSize = 32 | 48 | 56 | 72;
|
|
41
|
+
export type SpotSize = 32 | 40 | 48 | 56 | 72;
|
|
42
42
|
export type SpotProps = DiscriminatedSpotProps & {
|
|
43
43
|
/**
|
|
44
44
|
* Whether the spot is disabled.
|
|
@@ -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,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,C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AACH,MAAM,MAAM,sBAAsB,GAC9B,aAAa,GACb,eAAe,GACf,eAAe,CAAC;AAEpB,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE9C,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TileContentProps, TileDescriptionProps, TileSpotProps, TileTitleProps } from './types';
|
|
1
|
+
import { TileContentProps, TileDescriptionProps, TileSpotProps, TileTitleProps, TileTrailingContentProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* A flexible tile component that uses a composite pattern for maximum customization.
|
|
4
4
|
* Displays content in a vertical layout with support for spots, text, and custom content.
|
|
@@ -38,10 +38,9 @@ export declare const Tile: import('react').ForwardRefExoticComponent<{
|
|
|
38
38
|
} & Omit<import('react').HTMLAttributes<HTMLButtonElement>, "onClick"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
39
|
/**
|
|
40
40
|
* A spot adapter for use within Tile. Automatically inherits the disabled state from the parent Tile.
|
|
41
|
-
* Always renders at a fixed size of 48.
|
|
42
41
|
*/
|
|
43
42
|
export declare const TileSpot: {
|
|
44
|
-
(props: TileSpotProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
({ size, ...props }: TileSpotProps): import("react/jsx-runtime").JSX.Element;
|
|
45
44
|
displayName: string;
|
|
46
45
|
};
|
|
47
46
|
/**
|
|
@@ -68,6 +67,27 @@ export declare const TileDescription: {
|
|
|
68
67
|
({ children, className, ...props }: TileDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
69
68
|
displayName: string;
|
|
70
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* A container for trailing content inside TileContent.
|
|
72
|
+
* Use this to wrap Tags, labels, or other supplementary information after title and description.
|
|
73
|
+
* Multiple items inside will have 8px spacing between them.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Tile>
|
|
77
|
+
* <TileSpot appearance="icon" icon={Settings} />
|
|
78
|
+
* <TileContent>
|
|
79
|
+
* <TileTitle>My Title</TileTitle>
|
|
80
|
+
* <TileDescription>Description</TileDescription>
|
|
81
|
+
* <TileTrailingContent>
|
|
82
|
+
* <Tag label="Active" />
|
|
83
|
+
* </TileTrailingContent>
|
|
84
|
+
* </TileContent>
|
|
85
|
+
* </Tile>
|
|
86
|
+
*/
|
|
87
|
+
export declare const TileTrailingContent: {
|
|
88
|
+
({ children, className, ...props }: TileTrailingContentProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
71
91
|
/**
|
|
72
92
|
* A self-contained secondary action button for a Tile. Renders an InteractiveIcon that appears
|
|
73
93
|
* in the top-right corner and is visible on hover/focus. Automatically hidden when the parent Tile is disabled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/Tile.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EAGpB,aAAa,EACb,cAAc,
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/Tile.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EAGpB,aAAa,EACb,cAAc,EACd,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAuCjB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI;;;;;;;;;uHAyChB,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,QAAQ;yBAA6B,aAAa;;CAM9D,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,WAAW;wCAIrB,gBAAgB;;CASlB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,SAAS;wCAInB,cAAc;;CAiBhB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,eAAe;wCAIzB,oBAAoB;;CAiBtB,CAAC;AAGF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB;wCAI7B,wBAAwB;;CAS1B,CAAC;AAGF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB;;;;0HAsC9B,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createSafeContext as
|
|
1
|
+
import { jsx as r, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as x, cn as s } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as f } from "class-variance-authority";
|
|
4
|
-
import { forwardRef as b, useCallback as
|
|
4
|
+
import { forwardRef as b, useCallback as v } from "react";
|
|
5
5
|
import { Spot as y } from "../Spot/Spot.js";
|
|
6
6
|
import { InteractiveIcon as N } from "../InteractiveIcon/InteractiveIcon.js";
|
|
7
|
-
const [g, l] =
|
|
7
|
+
const [g, l] = x("Tile"), m = {
|
|
8
8
|
root: f([
|
|
9
9
|
"group relative flex flex-col items-center rounded-md text-base transition-colors focus-visible:outline-2 focus-visible:outline-focus"
|
|
10
10
|
]),
|
|
11
11
|
inner: f(
|
|
12
12
|
[
|
|
13
|
-
"flex w-full flex-col items-center gap-8 px-8 py-12",
|
|
13
|
+
"flex w-full flex-1 flex-col items-center gap-8 px-8 py-12",
|
|
14
14
|
"rounded-md focus-visible:outline-2 focus-visible:outline-focus"
|
|
15
15
|
],
|
|
16
16
|
{
|
|
@@ -39,23 +39,23 @@ const [g, l] = v("Tile"), m = {
|
|
|
39
39
|
({
|
|
40
40
|
className: e,
|
|
41
41
|
onClick: t,
|
|
42
|
-
secondaryAction:
|
|
42
|
+
secondaryAction: a,
|
|
43
43
|
appearance: o = "no-background",
|
|
44
44
|
disabled: i = !1,
|
|
45
45
|
centered: c = !1,
|
|
46
46
|
children: d,
|
|
47
47
|
style: u,
|
|
48
48
|
...p
|
|
49
|
-
},
|
|
49
|
+
}, n) => /* @__PURE__ */ r(g, { value: { disabled: i }, children: /* @__PURE__ */ T(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
|
-
ref:
|
|
52
|
+
ref: n,
|
|
53
53
|
style: u,
|
|
54
54
|
className: m.root({
|
|
55
55
|
className: e
|
|
56
56
|
}),
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ r(
|
|
59
59
|
"button",
|
|
60
60
|
{
|
|
61
61
|
...p,
|
|
@@ -69,29 +69,29 @@ const [g, l] = v("Tile"), m = {
|
|
|
69
69
|
children: d
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
|
|
72
|
+
a
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
) })
|
|
76
76
|
);
|
|
77
77
|
h.displayName = "Tile";
|
|
78
|
-
const S = (e) => {
|
|
79
|
-
const { disabled:
|
|
78
|
+
const S = ({ size: e = 48, ...t }) => {
|
|
79
|
+
const { disabled: a } = l({
|
|
80
80
|
consumerName: "TileSpot",
|
|
81
81
|
contextRequired: !0
|
|
82
82
|
});
|
|
83
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ r(y, { ...t, size: e, disabled: a });
|
|
84
84
|
};
|
|
85
85
|
S.displayName = "TileSpot";
|
|
86
86
|
const w = ({
|
|
87
87
|
children: e,
|
|
88
88
|
className: t,
|
|
89
|
-
...
|
|
90
|
-
}) => /* @__PURE__ */
|
|
89
|
+
...a
|
|
90
|
+
}) => /* @__PURE__ */ r(
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
|
-
className:
|
|
94
|
-
...
|
|
93
|
+
className: s("flex w-full flex-col items-center text-center", t),
|
|
94
|
+
...a,
|
|
95
95
|
children: e
|
|
96
96
|
}
|
|
97
97
|
);
|
|
@@ -99,21 +99,21 @@ w.displayName = "TileContent";
|
|
|
99
99
|
const R = ({
|
|
100
100
|
children: e,
|
|
101
101
|
className: t,
|
|
102
|
-
...
|
|
102
|
+
...a
|
|
103
103
|
}) => {
|
|
104
104
|
const { disabled: o } = l({
|
|
105
105
|
consumerName: "TileTitle",
|
|
106
106
|
contextRequired: !0
|
|
107
107
|
});
|
|
108
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ r(
|
|
109
109
|
"div",
|
|
110
110
|
{
|
|
111
|
-
className:
|
|
111
|
+
className: s(
|
|
112
112
|
"w-full truncate body-2-semi-bold",
|
|
113
113
|
o && "text-disabled",
|
|
114
114
|
t
|
|
115
115
|
),
|
|
116
|
-
...
|
|
116
|
+
...a,
|
|
117
117
|
children: e
|
|
118
118
|
}
|
|
119
119
|
);
|
|
@@ -122,44 +122,57 @@ R.displayName = "TileTitle";
|
|
|
122
122
|
const j = ({
|
|
123
123
|
children: e,
|
|
124
124
|
className: t,
|
|
125
|
-
...
|
|
125
|
+
...a
|
|
126
126
|
}) => {
|
|
127
127
|
const { disabled: o } = l({
|
|
128
128
|
consumerName: "TileDescription",
|
|
129
129
|
contextRequired: !0
|
|
130
130
|
});
|
|
131
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ r(
|
|
132
132
|
"div",
|
|
133
133
|
{
|
|
134
|
-
className:
|
|
134
|
+
className: s(
|
|
135
135
|
"w-full truncate body-3",
|
|
136
136
|
o ? "text-disabled" : "text-muted",
|
|
137
137
|
t
|
|
138
138
|
),
|
|
139
|
-
...
|
|
139
|
+
...a,
|
|
140
140
|
children: e
|
|
141
141
|
}
|
|
142
142
|
);
|
|
143
143
|
};
|
|
144
144
|
j.displayName = "TileDescription";
|
|
145
|
-
const q =
|
|
145
|
+
const q = ({
|
|
146
|
+
children: e,
|
|
147
|
+
className: t,
|
|
148
|
+
...a
|
|
149
|
+
}) => /* @__PURE__ */ r(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: s("mt-4 flex w-full flex-col items-center gap-8", t),
|
|
153
|
+
...a,
|
|
154
|
+
children: e
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
q.displayName = "TileTrailingContent";
|
|
158
|
+
const C = b(({ onClick: e, icon: t, className: a, "aria-label": o, ...i }, c) => {
|
|
146
159
|
const { disabled: d } = l({
|
|
147
160
|
consumerName: "TileSecondaryAction",
|
|
148
161
|
contextRequired: !0
|
|
149
|
-
}), u =
|
|
150
|
-
(
|
|
151
|
-
|
|
162
|
+
}), u = v(
|
|
163
|
+
(n) => {
|
|
164
|
+
n.stopPropagation(), n.preventDefault(), e == null || e(n);
|
|
152
165
|
},
|
|
153
166
|
[e]
|
|
154
167
|
);
|
|
155
168
|
if (d) return null;
|
|
156
169
|
const p = t;
|
|
157
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ r(
|
|
158
171
|
N,
|
|
159
172
|
{
|
|
160
|
-
className:
|
|
173
|
+
className: s(
|
|
161
174
|
"absolute top-8 right-4 opacity-0 transition-opacity duration-200 group-hover:opacity-100 focus-within:opacity-100",
|
|
162
|
-
|
|
175
|
+
a
|
|
163
176
|
),
|
|
164
177
|
"data-secondary-button-container": !0,
|
|
165
178
|
iconType: "stroked",
|
|
@@ -167,16 +180,17 @@ const q = b(({ onClick: e, icon: t, className: r, "aria-label": o, ...i }, c) =>
|
|
|
167
180
|
"aria-label": o,
|
|
168
181
|
ref: c,
|
|
169
182
|
...i,
|
|
170
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ r(p, { size: 24 })
|
|
171
184
|
}
|
|
172
185
|
);
|
|
173
186
|
});
|
|
174
|
-
|
|
187
|
+
C.displayName = "TileSecondaryAction";
|
|
175
188
|
export {
|
|
176
189
|
h as Tile,
|
|
177
190
|
w as TileContent,
|
|
178
191
|
j as TileDescription,
|
|
179
|
-
|
|
192
|
+
C as TileSecondaryAction,
|
|
180
193
|
S as TileSpot,
|
|
181
|
-
R as TileTitle
|
|
194
|
+
R as TileTitle,
|
|
195
|
+
q as TileTrailingContent
|
|
182
196
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Tile, TileSpot, TileContent, TileTitle, TileDescription, TileSecondaryAction, } from './Tile';
|
|
1
|
+
export { Tile, TileSpot, TileContent, TileTitle, TileDescription, TileTrailingContent, TileSecondaryAction, } from './Tile';
|
|
2
2
|
export * from './types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,SAAS,EACT,eAAe,EACf,mBAAmB,GACpB,MAAM,QAAQ,CAAC;AAChB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,QAAQ,CAAC;AAChB,cAAc,SAAS,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { IconProps } from '../Icon';
|
|
3
|
-
import { DiscriminatedSpotProps } from '../Spot/types';
|
|
3
|
+
import { DiscriminatedSpotProps, SpotSize } from '../Spot/types';
|
|
4
4
|
export type TileContextValue = {
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
};
|
|
7
|
+
export type TileSpotSize = Extract<SpotSize, 40 | 48>;
|
|
7
8
|
export type TileProps = {
|
|
8
9
|
/**
|
|
9
10
|
* The visual appearance of the tile background.
|
|
@@ -48,7 +49,13 @@ export type TileProps = {
|
|
|
48
49
|
*/
|
|
49
50
|
secondaryAction?: ReactNode;
|
|
50
51
|
} & Omit<HTMLAttributes<HTMLButtonElement>, 'onClick'>;
|
|
51
|
-
export type TileSpotProps =
|
|
52
|
+
export type TileSpotProps = {
|
|
53
|
+
/**
|
|
54
|
+
* The size of the spot.
|
|
55
|
+
* @default 48
|
|
56
|
+
*/
|
|
57
|
+
size?: 40 | 48;
|
|
58
|
+
} & DiscriminatedSpotProps;
|
|
52
59
|
export type TileContentProps = {
|
|
53
60
|
/**
|
|
54
61
|
* The children to display inside the tile content area.
|
|
@@ -80,6 +87,17 @@ export type TileDescriptionProps = {
|
|
|
80
87
|
*/
|
|
81
88
|
className?: string;
|
|
82
89
|
} & HTMLAttributes<HTMLDivElement>;
|
|
90
|
+
export type TileTrailingContentProps = {
|
|
91
|
+
/**
|
|
92
|
+
* The trailing content to display after title and description.
|
|
93
|
+
* Typically contains Tags, custom labels, or other supplementary information.
|
|
94
|
+
*/
|
|
95
|
+
children: ReactNode;
|
|
96
|
+
/**
|
|
97
|
+
* Additional CSS classes for the trailing content container.
|
|
98
|
+
*/
|
|
99
|
+
className?: string;
|
|
100
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
83
101
|
export type TileSecondaryActionProps = {
|
|
84
102
|
/**
|
|
85
103
|
* The function to call when the secondary action is clicked.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,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