@ledgerhq/lumen-ui-react 0.0.63 → 0.0.65

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.
Files changed (52) hide show
  1. package/dist/i18n/locales/de.json.d.ts +23 -2
  2. package/dist/i18n/locales/de.json.js +4 -4
  3. package/dist/i18n/locales/en.json.d.ts +5 -1
  4. package/dist/i18n/locales/en.json.js +1 -1
  5. package/dist/i18n/locales/es.json.d.ts +23 -2
  6. package/dist/i18n/locales/es.json.js +4 -4
  7. package/dist/i18n/locales/fr.json.d.ts +6 -2
  8. package/dist/i18n/locales/fr.json.js +1 -1
  9. package/dist/i18n/locales/ja.json.d.ts +23 -2
  10. package/dist/i18n/locales/ja.json.js +4 -4
  11. package/dist/i18n/locales/ko.json.d.ts +23 -2
  12. package/dist/i18n/locales/ko.json.js +4 -4
  13. package/dist/i18n/locales/pt.json.d.ts +23 -2
  14. package/dist/i18n/locales/pt.json.js +4 -4
  15. package/dist/i18n/locales/ru.json.d.ts +23 -2
  16. package/dist/i18n/locales/ru.json.js +4 -4
  17. package/dist/i18n/locales/th.json.d.ts +23 -2
  18. package/dist/i18n/locales/th.json.js +4 -4
  19. package/dist/i18n/locales/tr.json.d.ts +23 -2
  20. package/dist/i18n/locales/tr.json.js +4 -4
  21. package/dist/i18n/locales/zh.json.d.ts +23 -2
  22. package/dist/i18n/locales/zh.json.js +4 -4
  23. package/dist/lib/Components/AddressInput/AddressInput.js +2 -2
  24. package/dist/lib/Components/AmountInput/AmountInput.js +2 -2
  25. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -0
  26. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  27. package/dist/lib/Components/BaseInput/BaseInput.js +66 -65
  28. package/dist/lib/Components/BaseInput/types.d.ts +5 -1
  29. package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
  30. package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
  31. package/dist/lib/Components/Button/BaseButton.js +1 -1
  32. package/dist/lib/Components/CardButton/CardButton.js +1 -1
  33. package/dist/lib/Components/Checkbox/Checkbox.js +7 -7
  34. package/dist/lib/Components/Dialog/Dialog.js +4 -4
  35. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +3 -3
  36. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +7 -7
  37. package/dist/lib/Components/ListItem/ListItem.js +1 -1
  38. package/dist/lib/Components/Menu/Menu.js +5 -5
  39. package/dist/lib/Components/SearchInput/SearchInput.d.ts +3 -2
  40. package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
  41. package/dist/lib/Components/SearchInput/SearchInput.js +45 -13
  42. package/dist/lib/Components/SearchInput/types.d.ts +7 -1
  43. package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
  44. package/dist/lib/Components/Select/Select.js +64 -64
  45. package/dist/lib/Components/Subheader/Subheader.js +1 -1
  46. package/dist/lib/Components/Switch/Switch.js +3 -3
  47. package/dist/lib/Components/Tile/Tile.d.ts +15 -9
  48. package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
  49. package/dist/lib/Components/Tile/Tile.js +131 -133
  50. package/dist/lib/Components/Tooltip/Tooltip.js +2 -2
  51. package/dist/package.json +1 -1
  52. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { cn as r } from "../../../libs/utils-shared/dist/index.js";
2
+ import { cn as l } from "../../../libs/utils-shared/dist/index.js";
3
3
  import * as a from "@radix-ui/react-select";
4
4
  import { cva as c } from "class-variance-authority";
5
5
  import * as s from "react";
@@ -13,34 +13,34 @@ function k({ ...t }) {
13
13
  function G({ ...t }) {
14
14
  return /* @__PURE__ */ e(a.Group, { "data-slot": "select-group", ...t });
15
15
  }
16
- const b = r(
17
- "group relative flex h-48 w-full items-center justify-between gap-8",
16
+ const b = l(
17
+ "group relative flex h-48 w-full cursor-pointer items-center justify-between gap-8",
18
18
  "rounded-sm bg-muted px-16",
19
- "text-base body-2",
19
+ "body-2 text-base",
20
20
  "hover:bg-muted-hover",
21
- "transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-focus",
21
+ "transition-colors duration-200 focus:ring-2 focus:ring-focus focus:outline-hidden",
22
22
  "disabled:cursor-not-allowed disabled:text-disabled"
23
- ), g = r(
23
+ ), g = l(
24
24
  "pointer-events-none absolute left-16 origin-left text-muted transition-all duration-300",
25
25
  "top-10 -translate-y-4 body-4",
26
- "group-data-[placeholder]:top-14 group-data-[placeholder]:translate-y-0 group-data-[placeholder]:body-2",
27
- "group-data-[:disabled]:text-disabled disabled:text-disabled group-data-[disabled]:text-disabled group-data-[placeholder][disabled]:text-disabled",
26
+ "group-data-placeholder:top-14 group-data-placeholder:translate-y-0 group-data-placeholder:body-2",
27
+ "group-data-disabled:text-disabled disabled:text-disabled",
28
28
  "max-w-[calc(100%-var(--size-56))] truncate"
29
- ), x = s.forwardRef(({ className: t, labelClassName: l, label: o, ...d }, i) => /* @__PURE__ */ n(
29
+ ), h = s.forwardRef(({ className: t, labelClassName: o, label: r, ...i }, d) => /* @__PURE__ */ n(
30
30
  a.Trigger,
31
31
  {
32
- ref: i,
32
+ ref: d,
33
33
  "data-slot": "select-trigger",
34
- className: r(b, t),
35
- ...d,
34
+ className: l(b, t),
35
+ ...i,
36
36
  children: [
37
- o && /* @__PURE__ */ e("label", { className: r(g, l), children: o }),
37
+ r && /* @__PURE__ */ e("label", { className: l(g, o), children: r }),
38
38
  /* @__PURE__ */ e(
39
39
  "span",
40
40
  {
41
- className: r(
42
- "flex-1 truncate text-left ",
43
- o && "mt-16 opacity-100 transition-opacity delay-100 duration-300 group-data-[placeholder]:mt-0 group-data-[placeholder]:opacity-0",
41
+ className: l(
42
+ "flex-1 truncate text-left",
43
+ r && "mt-16 opacity-100 transition-opacity delay-100 duration-300 group-data-placeholder:mt-0 group-data-placeholder:opacity-0",
44
44
  t
45
45
  ),
46
46
  children: /* @__PURE__ */ e(a.Value, { "data-slot": "select-value" })
@@ -50,22 +50,22 @@ const b = r(
50
50
  m,
51
51
  {
52
52
  size: 20,
53
- className: "shrink-0 text-muted group-data-[disabled]:text-disabled"
53
+ className: "shrink-0 text-muted group-data-disabled:text-disabled"
54
54
  }
55
55
  ) })
56
56
  ]
57
57
  }
58
58
  ));
59
- x.displayName = a.Trigger.displayName;
60
- const h = c(
59
+ h.displayName = a.Trigger.displayName;
60
+ const x = c(
61
61
  [
62
- "relative z-select max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden",
62
+ "relative z-select max-h-(--radix-select-content-available-height) overflow-x-hidden overflow-y-auto",
63
63
  "rounded-sm bg-muted",
64
64
  "shadow-md",
65
- "data-[side=bottom]:animate-slide-in-from-top-8",
66
- "data-[side=top]:animate-slide-in-from-bottom-8",
67
- "data-[side=left]:animate-slide-in-from-right-8",
68
- "data-[side=right]:animate-slide-in-from-left-8"
65
+ "data-[side=bottom]:animate-slide-in-from-top",
66
+ "data-[side=top]:animate-slide-in-from-bottom",
67
+ "data-[side=left]:animate-slide-in-from-right",
68
+ "data-[side=right]:animate-slide-in-from-left"
69
69
  ],
70
70
  {
71
71
  variants: {
@@ -81,112 +81,112 @@ const h = c(
81
81
  ), y = c("p-8", {
82
82
  variants: {
83
83
  position: {
84
- popper: "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
84
+ popper: "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)",
85
85
  "item-aligned": ""
86
86
  }
87
87
  },
88
88
  defaultVariants: {
89
89
  position: "popper"
90
90
  }
91
- }), N = s.forwardRef(({ className: t, children: l, position: o = "popper", ...d }, i) => /* @__PURE__ */ e(a.Portal, { "data-slot": "select-portal", children: /* @__PURE__ */ n(
91
+ }), N = s.forwardRef(({ className: t, children: o, position: r = "popper", ...i }, d) => /* @__PURE__ */ e(a.Portal, { "data-slot": "select-portal", children: /* @__PURE__ */ n(
92
92
  a.Content,
93
93
  {
94
- ref: i,
94
+ ref: d,
95
95
  "data-slot": "select-content",
96
- className: r(h({ position: o }), t),
97
- position: o,
98
- ...d,
96
+ className: l(x({ position: r }), t),
97
+ position: r,
98
+ ...i,
99
99
  children: [
100
100
  /* @__PURE__ */ e(R, {}),
101
- /* @__PURE__ */ e(a.Viewport, { className: y({ position: o }), children: l }),
101
+ /* @__PURE__ */ e(a.Viewport, { className: y({ position: r }), children: o }),
102
102
  /* @__PURE__ */ e(C, {})
103
103
  ]
104
104
  }
105
105
  ) }));
106
106
  N.displayName = a.Content.displayName;
107
- const v = s.forwardRef(({ className: t, ...l }, o) => /* @__PURE__ */ e(
107
+ const w = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ */ e(
108
108
  a.Label,
109
109
  {
110
- ref: o,
110
+ ref: r,
111
111
  "data-slot": "select-label",
112
- className: r("mb-4 px-8 pb-0 pt-8 text-muted body-3-semi-bold", t),
113
- ...l
112
+ className: l("mb-4 px-8 pt-8 pb-0 body-3-semi-bold text-muted", t),
113
+ ...o
114
114
  }
115
115
  ));
116
- v.displayName = a.Label.displayName;
117
- const w = r(
118
- "relative flex w-full cursor-default select-none items-center bg-base-transparent",
116
+ w.displayName = a.Label.displayName;
117
+ const S = l(
118
+ "relative flex w-full cursor-pointer items-center bg-base-transparent select-none",
119
119
  "rounded-sm p-8",
120
- "text-base body-2",
121
- "outline-none",
120
+ "body-2 text-base",
121
+ "outline-hidden",
122
122
  "focus:bg-base-transparent-hover",
123
123
  "active:bg-base-transparent-pressed",
124
- "data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled"
125
- ), S = s.forwardRef(({ className: t, children: l, ...o }, d) => /* @__PURE__ */ n(
124
+ "data-disabled:cursor-not-allowed data-disabled:text-disabled"
125
+ ), v = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ n(
126
126
  a.Item,
127
127
  {
128
- ref: d,
128
+ ref: i,
129
129
  "data-slot": "select-item",
130
- className: r(w, t),
131
- ...o,
130
+ className: l(S, t),
131
+ ...r,
132
132
  children: [
133
- l,
133
+ o,
134
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" }) }) })
135
135
  ]
136
136
  }
137
137
  ));
138
- S.displayName = a.Item.displayName;
138
+ v.displayName = a.Item.displayName;
139
139
  const I = s.forwardRef(
140
- ({ className: t, ...l }, o) => /* @__PURE__ */ e(
140
+ ({ className: t, ...o }, r) => /* @__PURE__ */ e(
141
141
  u,
142
142
  {
143
- ref: o,
144
- className: r("mx-8 my-4 w-auto", t),
145
- ...l
143
+ ref: r,
144
+ className: l("mx-8 my-4 w-auto", t),
145
+ ...o
146
146
  }
147
147
  )
148
148
  );
149
149
  I.displayName = "SelectSeparator";
150
- const z = s.forwardRef(({ className: t, ...l }, o) => /* @__PURE__ */ e(
150
+ const z = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ */ e(
151
151
  a.ItemText,
152
152
  {
153
- ref: o,
153
+ ref: r,
154
154
  "data-slot": "select-item-text",
155
- className: r("text-muted body-2", t),
156
- ...l
155
+ className: l("body-2 text-muted", t),
156
+ ...o
157
157
  }
158
158
  ));
159
159
  z.displayName = a.ItemText.displayName;
160
160
  function R({
161
161
  className: t,
162
- ...l
162
+ ...o
163
163
  }) {
164
164
  return /* @__PURE__ */ e(
165
165
  a.ScrollUpButton,
166
166
  {
167
167
  "data-slot": "select-scroll-up-button",
168
- className: r(
168
+ className: l(
169
169
  "flex cursor-default items-center justify-center py-1 text-muted",
170
170
  t
171
171
  ),
172
- ...l,
172
+ ...o,
173
173
  children: /* @__PURE__ */ e(f, { className: "size-4" })
174
174
  }
175
175
  );
176
176
  }
177
177
  function C({
178
178
  className: t,
179
- ...l
179
+ ...o
180
180
  }) {
181
181
  return /* @__PURE__ */ e(
182
182
  a.ScrollDownButton,
183
183
  {
184
184
  "data-slot": "select-scroll-down-button",
185
- className: r(
185
+ className: l(
186
186
  "flex cursor-default items-center justify-center py-1 text-muted",
187
187
  t
188
188
  ),
189
- ...l,
189
+ ...o,
190
190
  children: /* @__PURE__ */ e(m, { className: "size-4" })
191
191
  }
192
192
  );
@@ -195,9 +195,9 @@ export {
195
195
  k as Select,
196
196
  N as SelectContent,
197
197
  G as SelectGroup,
198
- S as SelectItem,
198
+ v as SelectItem,
199
199
  z as SelectItemText,
200
- v as SelectLabel,
200
+ w as SelectLabel,
201
201
  I as SelectSeparator,
202
- x as SelectTrigger
202
+ h as SelectTrigger
203
203
  };
@@ -24,7 +24,7 @@ const a = ({ children: e }) => /* @__PURE__ */ i("div", { className: "flex shrin
24
24
  ...d,
25
25
  children: [
26
26
  /* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
27
- /* @__PURE__ */ i("h2", { className: "heading-5-semi-bold min-w-0 truncate", children: m }),
27
+ /* @__PURE__ */ i("h2", { className: "min-w-0 truncate heading-5-semi-bold", children: m }),
28
28
  u
29
29
  ] }),
30
30
  S
@@ -5,10 +5,10 @@ import { cva as d } from "class-variance-authority";
5
5
  import m from "react";
6
6
  const u = d(
7
7
  s(
8
- "group flex items-center rounded-full p-2 transition-colors duration-200 ease-in-out focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
8
+ "group flex cursor-pointer items-center rounded-full p-2 transition-colors duration-200 ease-in-out focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
9
9
  "[&[data-state=unchecked]:not([data-disabled])]:bg-muted-strong [&[data-state=unchecked]:not([data-disabled])]:hover:bg-muted-strong-hover [&[data-state=unchecked]:not([data-disabled])]:active:bg-muted-strong-pressed",
10
10
  "[&[data-state=checked]:not([data-disabled])]:bg-active [&[data-state=checked]:not([data-disabled])]:hover:bg-active-hover [&[data-state=checked]:not([data-disabled])]:active:bg-active-pressed",
11
- "data-[disabled]:bg-disabled-strong"
11
+ "data-disabled:bg-disabled-strong"
12
12
  ),
13
13
  {
14
14
  variants: {
@@ -22,7 +22,7 @@ const u = d(
22
22
  }
23
23
  }
24
24
  ), h = d(
25
- "translate-x-0 rounded-full bg-white transition-transform duration-200 ease-in-out group-data-[disabled]:bg-base",
25
+ "translate-x-0 rounded-full bg-white transition-transform duration-200 ease-in-out group-data-disabled:bg-base",
26
26
  {
27
27
  variants: {
28
28
  size: {
@@ -1,4 +1,5 @@
1
- import { TileContentProps, TileDescriptionProps, TileProps, TileSecondaryActionProps, TileSpotProps, TileTitleProps } from './types';
1
+ import { MouseEventHandler } from 'react';
2
+ import { TileContentProps, TileDescriptionProps, TileSpotProps, TileTitleProps } from './types';
2
3
  /**
3
4
  * A flexible tile component that uses a composite pattern for maximum customization.
4
5
  * Displays content in a vertical layout with support for spots, text, and custom content.
@@ -26,10 +27,14 @@ import { TileContentProps, TileDescriptionProps, TileProps, TileSecondaryActionP
26
27
  * <div>Custom content</div>
27
28
  * </Tile>
28
29
  */
29
- export declare const Tile: {
30
- ({ className, onClick, appearance, disabled, "aria-label": ariaLabel, children, onMouseDown, onMouseUp, onMouseLeave, ...props }: TileProps): import("react/jsx-runtime").JSX.Element;
31
- displayName: string;
32
- };
30
+ export declare const Tile: import('react').ForwardRefExoticComponent<{
31
+ appearance?: "no-background" | "card";
32
+ disabled?: boolean;
33
+ onClick?: MouseEventHandler<HTMLButtonElement>;
34
+ children: import('react').ReactNode;
35
+ className?: string;
36
+ 'aria-label'?: string;
37
+ } & Omit<import('react').HTMLAttributes<HTMLDivElement>, "onClick"> & import('react').RefAttributes<HTMLDivElement>>;
33
38
  /**
34
39
  * A spot adapter for use within Tile. Automatically inherits the disabled state from the parent Tile.
35
40
  * Always renders at a fixed size of 48.
@@ -79,8 +84,9 @@ export declare const TileDescription: {
79
84
  * </TileContent>
80
85
  * </Tile>
81
86
  */
82
- export declare const TileSecondaryAction: {
83
- ({ onClick, icon, className, "aria-label": ariaLabel, ...props }: TileSecondaryActionProps): import("react/jsx-runtime").JSX.Element | null;
84
- displayName: string;
85
- };
87
+ export declare const TileSecondaryAction: import('react').ForwardRefExoticComponent<{
88
+ onClick?: MouseEventHandler;
89
+ icon: React.ComponentType<Omit<import('../Icon').IconProps, "children">>;
90
+ className?: string;
91
+ } & Omit<import('react').HTMLAttributes<HTMLButtonElement>, "onClick"> & import('react').RefAttributes<HTMLButtonElement>>;
86
92
  //# sourceMappingURL=Tile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/Tile.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EACpB,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AAgEjB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI;sIAWd,SAAS;;CAqFX,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa;;CAM5C,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;sEAM7B,wBAAwB;;CAmC1B,CAAC"}
1
+ {"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tile/Tile.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAG7E,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EAGpB,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AAgEjB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI;;;;;;;oHAsGhB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa;;CAM5C,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;;;;0HAuC9B,CAAC"}
@@ -1,14 +1,14 @@
1
- import { jsx as l, jsxs as k } from "react/jsx-runtime";
2
- import { extractSlottable as q, createSafeContext as C, cn as d } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as b } from "class-variance-authority";
4
- import { useState as I, useCallback as n } from "react";
5
- import { Spot as R } from "../Spot/Spot.js";
6
- import { InteractiveIcon as z } from "../InteractiveIcon/InteractiveIcon.js";
7
- const [V, u] = C("Tile"), v = {
8
- root: b(
1
+ import { jsx as s, jsxs as q } from "react/jsx-runtime";
2
+ import { extractSlottable as C, createSafeContext as I, cn as u } from "../../../libs/utils-shared/dist/index.js";
3
+ import { cva as v } from "class-variance-authority";
4
+ import { forwardRef as x, useState as w, useCallback as d } from "react";
5
+ import { Spot as z } from "../Spot/Spot.js";
6
+ import { InteractiveIcon as V } from "../InteractiveIcon/InteractiveIcon.js";
7
+ const [j, p] = I("Tile"), T = {
8
+ root: v(
9
9
  [
10
10
  "group relative flex flex-col items-center gap-8 text-base transition-colors",
11
- "focus-visible:outline-focus rounded-md focus-visible:outline-2"
11
+ "rounded-md focus-visible:outline-2 focus-visible:outline-focus"
12
12
  ],
13
13
  {
14
14
  variants: {
@@ -58,187 +58,185 @@ const [V, u] = C("Tile"), v = {
58
58
  }
59
59
  }
60
60
  ),
61
- button: b(
62
- "focus-visible:outline-focus flex w-full flex-col items-center gap-8 rounded-md px-8 py-12 focus-visible:outline-2"
61
+ button: v(
62
+ "flex w-full cursor-pointer flex-col items-center gap-8 rounded-md px-8 py-12 focus-visible:outline-2 focus-visible:outline-focus"
63
63
  )
64
- }, j = ({
65
- className: e,
66
- onClick: i,
67
- appearance: s = "no-background",
68
- disabled: t = !1,
69
- "aria-label": p,
70
- children: m,
71
- onMouseDown: c,
72
- onMouseUp: o,
73
- onMouseLeave: r,
74
- ...x
75
- }) => {
76
- const [y, f] = I(!1), { slotElement: N, remainingChildren: g } = q(
77
- m,
78
- T
79
- ), h = n(
80
- (a) => {
81
- a.target.closest(
82
- "[data-secondary-button-container]"
83
- ) || (c == null || c(a), f(!0));
84
- },
85
- [c]
86
- ), A = n(
87
- (a) => {
88
- f(!1), o == null || o(a);
89
- },
90
- [o]
91
- ), S = n(
92
- (a) => {
93
- f(!1), r == null || r(a);
94
- },
95
- [r]
96
- );
97
- return /* @__PURE__ */ l(V, { value: { disabled: t }, children: /* @__PURE__ */ k(
98
- "div",
99
- {
100
- ...x,
101
- className: v.root({
102
- appearance: s,
103
- isActive: y,
104
- disabled: t,
105
- className: e
106
- }),
107
- onMouseDown: t ? void 0 : (a) => {
108
- h(a);
64
+ }, P = x(
65
+ ({
66
+ className: e,
67
+ onClick: i,
68
+ appearance: r = "no-background",
69
+ disabled: t = !1,
70
+ "aria-label": f,
71
+ children: m,
72
+ onMouseDown: l,
73
+ onMouseUp: o,
74
+ onMouseLeave: c,
75
+ ...n
76
+ }, N) => {
77
+ const [g, b] = w(!1), { slotElement: h, remainingChildren: A } = C(
78
+ m,
79
+ y
80
+ ), S = d(
81
+ (a) => {
82
+ a.target.closest(
83
+ "[data-secondary-button-container]"
84
+ ) || (l == null || l(a), b(!0));
109
85
  },
110
- onMouseUp: t ? void 0 : (a) => {
111
- A(a);
86
+ [l]
87
+ ), k = d(
88
+ (a) => {
89
+ b(!1), o == null || o(a);
112
90
  },
113
- onMouseLeave: t ? void 0 : (a) => {
114
- S(a);
91
+ [o]
92
+ ), R = d(
93
+ (a) => {
94
+ b(!1), c == null || c(a);
115
95
  },
116
- children: [
117
- /* @__PURE__ */ l(
118
- "button",
119
- {
120
- "aria-label": p,
121
- onClick: t ? void 0 : i,
122
- disabled: t,
123
- "data-disabled": t || void 0,
124
- className: v.button(),
125
- children: g
126
- }
127
- ),
128
- N
129
- ]
130
- }
131
- ) });
132
- };
133
- j.displayName = "Tile";
134
- const w = (e) => {
135
- const { disabled: i } = u({
96
+ [c]
97
+ );
98
+ return /* @__PURE__ */ s(j, { value: { disabled: t }, children: /* @__PURE__ */ q(
99
+ "div",
100
+ {
101
+ ...n,
102
+ ref: N,
103
+ className: T.root({
104
+ appearance: r,
105
+ isActive: g,
106
+ disabled: t,
107
+ className: e
108
+ }),
109
+ onMouseDown: t ? void 0 : (a) => {
110
+ S(a);
111
+ },
112
+ onMouseUp: t ? void 0 : (a) => {
113
+ k(a);
114
+ },
115
+ onMouseLeave: t ? void 0 : (a) => {
116
+ R(a);
117
+ },
118
+ children: [
119
+ /* @__PURE__ */ s(
120
+ "button",
121
+ {
122
+ "aria-label": f,
123
+ onClick: t ? void 0 : i,
124
+ disabled: t,
125
+ "data-disabled": t || void 0,
126
+ className: T.button(),
127
+ children: A
128
+ }
129
+ ),
130
+ h
131
+ ]
132
+ }
133
+ ) });
134
+ }
135
+ );
136
+ P.displayName = "Tile";
137
+ const D = (e) => {
138
+ const { disabled: i } = p({
136
139
  consumerName: "TileSpot",
137
140
  contextRequired: !0
138
141
  });
139
- return /* @__PURE__ */ l(R, { ...e, size: 48, disabled: i });
142
+ return /* @__PURE__ */ s(z, { ...e, size: 48, disabled: i });
140
143
  };
141
- w.displayName = "TileSpot";
142
- const P = ({
144
+ D.displayName = "TileSpot";
145
+ const E = ({
143
146
  children: e,
144
147
  className: i,
145
- ...s
146
- }) => /* @__PURE__ */ l(
148
+ ...r
149
+ }) => /* @__PURE__ */ s(
147
150
  "div",
148
151
  {
149
- className: d("flex w-full flex-col items-center text-center", i),
150
- ...s,
152
+ className: u("flex w-full flex-col items-center text-center", i),
153
+ ...r,
151
154
  children: e
152
155
  }
153
156
  );
154
- P.displayName = "TileContent";
155
- const D = ({
157
+ E.displayName = "TileContent";
158
+ const O = ({
156
159
  children: e,
157
160
  className: i,
158
- ...s
161
+ ...r
159
162
  }) => {
160
- const { disabled: t } = u({
163
+ const { disabled: t } = p({
161
164
  consumerName: "TileTitle",
162
165
  contextRequired: !0
163
166
  });
164
- return /* @__PURE__ */ l(
167
+ return /* @__PURE__ */ s(
165
168
  "div",
166
169
  {
167
- className: d(
168
- "body-2-semi-bold w-full truncate",
170
+ className: u(
171
+ "w-full truncate body-2-semi-bold",
169
172
  t && "text-disabled",
170
173
  i
171
174
  ),
172
- ...s,
175
+ ...r,
173
176
  children: e
174
177
  }
175
178
  );
176
179
  };
177
- D.displayName = "TileTitle";
178
- const E = ({
180
+ O.displayName = "TileTitle";
181
+ const B = ({
179
182
  children: e,
180
183
  className: i,
181
- ...s
184
+ ...r
182
185
  }) => {
183
- const { disabled: t } = u({
186
+ const { disabled: t } = p({
184
187
  consumerName: "TileDescription",
185
188
  contextRequired: !0
186
189
  });
187
- return /* @__PURE__ */ l(
190
+ return /* @__PURE__ */ s(
188
191
  "div",
189
192
  {
190
- className: d(
191
- "body-3 w-full truncate",
193
+ className: u(
194
+ "w-full truncate body-3",
192
195
  t ? "text-disabled" : "text-muted",
193
196
  i
194
197
  ),
195
- ...s,
198
+ ...r,
196
199
  children: e
197
200
  }
198
201
  );
199
202
  };
200
- E.displayName = "TileDescription";
201
- const T = ({
202
- onClick: e,
203
- icon: i,
204
- className: s,
205
- "aria-label": t,
206
- ...p
207
- }) => {
208
- const { disabled: m } = u({
203
+ B.displayName = "TileDescription";
204
+ const y = x(({ onClick: e, icon: i, className: r, "aria-label": t, ...f }, m) => {
205
+ const { disabled: l } = p({
209
206
  consumerName: "TileSecondaryAction",
210
207
  contextRequired: !0
211
- }), c = n(
212
- (r) => {
213
- r.stopPropagation(), r.preventDefault(), e == null || e(r);
208
+ }), o = d(
209
+ (n) => {
210
+ n.stopPropagation(), n.preventDefault(), e == null || e(n);
214
211
  },
215
212
  [e]
216
213
  );
217
- if (m) return null;
218
- const o = i;
219
- return /* @__PURE__ */ l(
220
- z,
214
+ if (l) return null;
215
+ const c = i;
216
+ return /* @__PURE__ */ s(
217
+ V,
221
218
  {
222
219
  "data-slot": "tile-secondary-action",
223
- className: d(
224
- "absolute right-4 top-8 opacity-0 transition-opacity duration-200 focus-within:opacity-100 group-hover:opacity-100",
225
- s
220
+ className: u(
221
+ "absolute top-8 right-4 opacity-0 transition-opacity duration-200 group-hover:opacity-100 focus-within:opacity-100",
222
+ r
226
223
  ),
227
224
  "data-secondary-button-container": !0,
228
225
  iconType: "stroked",
229
- onClick: c,
226
+ onClick: o,
230
227
  "aria-label": t,
231
- ...p,
232
- children: /* @__PURE__ */ l(o, { size: 24 })
228
+ ref: m,
229
+ ...f,
230
+ children: /* @__PURE__ */ s(c, { size: 24 })
233
231
  }
234
232
  );
235
- };
236
- T.displayName = "TileSecondaryAction";
233
+ });
234
+ y.displayName = "TileSecondaryAction";
237
235
  export {
238
- j as Tile,
239
- P as TileContent,
240
- E as TileDescription,
241
- T as TileSecondaryAction,
242
- w as TileSpot,
243
- D as TileTitle
236
+ P as Tile,
237
+ E as TileContent,
238
+ B as TileDescription,
239
+ y as TileSecondaryAction,
240
+ D as TileSpot,
241
+ O as TileTitle
244
242
  };