@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.
Files changed (62) hide show
  1. package/dist/index.js +66 -59
  2. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -0
  3. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  4. package/dist/lib/Components/BaseInput/BaseInput.js +49 -48
  5. package/dist/lib/Components/BaseInput/types.d.ts +5 -1
  6. package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
  7. package/dist/lib/Components/SearchInput/SearchInput.d.ts +3 -2
  8. package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
  9. package/dist/lib/Components/SearchInput/SearchInput.js +45 -13
  10. package/dist/lib/Components/SearchInput/types.d.ts +7 -1
  11. package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
  12. package/dist/lib/Components/Subheader/Subheader.d.ts +60 -24
  13. package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  14. package/dist/lib/Components/Subheader/Subheader.js +66 -36
  15. package/dist/lib/Components/Subheader/index.d.ts +1 -1
  16. package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
  17. package/dist/lib/Components/Subheader/types.d.ts +52 -6
  18. package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
  19. package/dist/lib/Components/Tile/Tile.d.ts +15 -9
  20. package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
  21. package/dist/lib/Components/Tile/Tile.js +117 -119
  22. package/dist/lib/Symbols/Icons/Asterisk.d.ts +26 -0
  23. package/dist/lib/Symbols/Icons/Asterisk.d.ts.map +1 -0
  24. package/dist/lib/Symbols/Icons/Asterisk.js +28 -0
  25. package/dist/lib/Symbols/Icons/Bell.js +1 -1
  26. package/dist/lib/Symbols/Icons/BellFill.d.ts +26 -0
  27. package/dist/lib/Symbols/Icons/BellFill.d.ts.map +1 -0
  28. package/dist/lib/Symbols/Icons/BellFill.js +25 -0
  29. package/dist/lib/Symbols/Icons/BellNotification.js +1 -1
  30. package/dist/lib/Symbols/Icons/CreditCardFill.d.ts +26 -0
  31. package/dist/lib/Symbols/Icons/CreditCardFill.d.ts.map +1 -0
  32. package/dist/lib/Symbols/Icons/CreditCardFill.js +25 -0
  33. package/dist/lib/Symbols/Icons/Delete.js +1 -1
  34. package/dist/lib/Symbols/Icons/Exchange.js +1 -1
  35. package/dist/lib/Symbols/Icons/ExchangeFill.d.ts +26 -0
  36. package/dist/lib/Symbols/Icons/ExchangeFill.d.ts.map +1 -0
  37. package/dist/lib/Symbols/Icons/ExchangeFill.js +41 -0
  38. package/dist/lib/Symbols/Icons/ExpandLeft.d.ts +26 -0
  39. package/dist/lib/Symbols/Icons/ExpandLeft.d.ts.map +1 -0
  40. package/dist/lib/Symbols/Icons/ExpandLeft.js +28 -0
  41. package/dist/lib/Symbols/Icons/ExpandRight.d.ts +26 -0
  42. package/dist/lib/Symbols/Icons/ExpandRight.d.ts.map +1 -0
  43. package/dist/lib/Symbols/Icons/ExpandRight.js +28 -0
  44. package/dist/lib/Symbols/Icons/Home.js +1 -1
  45. package/dist/lib/Symbols/Icons/HomeFill.d.ts +26 -0
  46. package/dist/lib/Symbols/Icons/HomeFill.d.ts.map +1 -0
  47. package/dist/lib/Symbols/Icons/HomeFill.js +25 -0
  48. package/dist/lib/Symbols/Icons/LifeRingFill.d.ts +26 -0
  49. package/dist/lib/Symbols/Icons/LifeRingFill.d.ts.map +1 -0
  50. package/dist/lib/Symbols/Icons/LifeRingFill.js +25 -0
  51. package/dist/lib/Symbols/Icons/P2p.js +1 -1
  52. package/dist/lib/Symbols/Icons/Signature.js +1 -1
  53. package/dist/lib/Symbols/Icons/Spacerocket.js +1 -1
  54. package/dist/lib/Symbols/Icons/Tools.js +1 -1
  55. package/dist/lib/Symbols/Icons/TransferVertical.js +1 -1
  56. package/dist/lib/Symbols/Icons/Trash.js +1 -1
  57. package/dist/lib/Symbols/Icons/WarningFill.js +1 -1
  58. package/dist/lib/Symbols/index.d.ts +8 -0
  59. package/dist/lib/Symbols/index.d.ts.map +1 -1
  60. package/dist/lib/Symbols/index.js +474 -458
  61. package/dist/package.json +1 -1
  62. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,51 +1,51 @@
1
- import { Languages as o } from "./i18n/languages.js";
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 I } from "./lib/Components/Button/BaseButton.js";
8
- import { CardButton as g } from "./lib/Components/CardButton/CardButton.js";
9
- import { Checkbox as s } from "./lib/Components/Checkbox/Checkbox.js";
10
- import { Dialog as M, DialogBody as d, DialogContent as C, DialogFooter as D, DialogTrigger as b } from "./lib/Components/Dialog/Dialog.js";
11
- import { DialogHeader as h } from "./lib/Components/Dialog/DialogHeader/DialogHeader.js";
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 G } from "./lib/Components/IconButton/IconButton.js";
14
- import { InteractiveIcon as y } from "./lib/Components/InteractiveIcon/InteractiveIcon.js";
15
- import { Link as w } from "./lib/Components/Link/Link.js";
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 te, MenuSub as oe, MenuSubContent as re, MenuSubTrigger as ne, MenuTrigger as ie } from "./lib/Components/Menu/Menu.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 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 xe, SelectContent as le, SelectGroup as ae, SelectItem as fe, SelectItemText as Te, SelectLabel as Ie, SelectSeparator as ce, SelectTrigger as ge } from "./lib/Components/Select/Select.js";
20
- import { Skeleton as se } from "./lib/Components/Skeleton/Skeleton.js";
21
- import { Spot as Me } from "./lib/Components/Spot/Spot.js";
22
- import { Subheader as Ce } from "./lib/Components/Subheader/Subheader.js";
23
- import { Switch as be } from "./lib/Components/Switch/Switch.js";
24
- import { Tag as he } from "./lib/Components/Tag/Tag.js";
25
- import { TextInput as ve } from "./lib/Components/TextInput/TextInput.js";
26
- import { Tile as Ge, TileContent as Pe, TileDescription as ye, TileSecondaryAction as Re, TileSpot as we, TileTitle as Fe } from "./lib/Components/Tile/Tile.js";
27
- import { Tooltip as je, TooltipContent as qe, TooltipProvider as ze, TooltipTrigger as Ee } from "./lib/Components/Tooltip/Tooltip.js";
28
- import { ThemeProvider as Ke, useTheme as Ne } from "./lib/Components/ThemeProvider/ThemeProvider.js";
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
- I as BaseButton,
33
+ T as BaseButton,
34
34
  l as BaseInput,
35
35
  f as Button,
36
- g as CardButton,
37
- s as Checkbox,
38
- M as Dialog,
39
- d as DialogBody,
40
- C as DialogContent,
41
- D as DialogFooter,
42
- h as DialogHeader,
43
- b as DialogTrigger,
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
- G as IconButton,
46
- y as InteractiveIcon,
47
- o as Languages,
48
- w as Link,
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
- te as MenuSeparator,
68
- oe as MenuSub,
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
- xe as Select,
73
+ ae as Select,
74
74
  le as SelectContent,
75
- ae as SelectGroup,
75
+ xe as SelectGroup,
76
76
  fe as SelectItem,
77
- Te as SelectItemText,
78
- Ie as SelectLabel,
79
- ce as SelectSeparator,
80
- ge as SelectTrigger,
81
- se as Skeleton,
82
- Me as Spot,
83
- Ce as Subheader,
84
- be as Switch,
85
- he as Tag,
86
- ve as TextInput,
87
- Ke as ThemeProvider,
88
- Ge as Tile,
89
- Pe as TileContent,
90
- ye as TileDescription,
91
- Re as TileSecondaryAction,
92
- we as TileSpot,
93
- Fe as TileTitle,
94
- je as Tooltip,
95
- qe as TooltipContent,
96
- ze as TooltipProvider,
97
- Ee as TooltipTrigger,
98
- Ne as useTheme
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;;;;;;;;;;;iHAyLrB,CAAC"}
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 l } from "../../../libs/utils-shared/dist/index.js";
3
- import s from "react";
4
- import { useCommonTranslation as O } from "../../../i18n/useCommonTranslation.js";
5
- import { InteractiveIcon as _ } from "../InteractiveIcon/InteractiveIcon.js";
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 $ = l(
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
- ), q = l(
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
- ), H = l(
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
- ), U = s.forwardRef(
26
+ ), G = l.forwardRef(
27
27
  ({
28
28
  className: N,
29
- inputClassName: R,
30
- labelClassName: S,
29
+ containerClassName: R,
30
+ inputClassName: S,
31
+ labelClassName: k,
31
32
  label: u,
32
- id: k,
33
+ id: z,
33
34
  disabled: f,
34
- errorMessage: a,
35
- suffix: z,
36
- prefix: E,
35
+ errorMessage: i,
36
+ suffix: E,
37
+ prefix: j,
37
38
  onClear: p,
38
- hideClearButton: j = !1,
39
+ hideClearButton: B = !1,
39
40
  "aria-invalid": m,
40
41
  onChange: d,
41
- ...i
42
- }, B) => {
42
+ ...o
43
+ }, C) => {
43
44
  var x;
44
- const { t: C } = O(), r = s.useRef(null), D = s.useId(), b = k || `input-${D}`, F = m || (a ? !0 : void 0), c = i.value !== void 0, [L, v] = s.useState(
45
- ((x = i.defaultValue) == null ? void 0 : x.toString()) || ""
46
- ), T = s.useCallback(
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 ? !!i.value && i.value.toString().length > 0 : L.length > 0) && !f && !j, w = `${b}-error`, V = () => {
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 o = new Event("input", { bubbles: !0 });
60
- r.current.dispatchEvent(o), r.current.focus(), p == null || p();
60
+ const s = new Event("input", { bubbles: !0 });
61
+ r.current.dispatchEvent(s), r.current.focus(), p == null || p();
61
62
  };
62
- function A(...t) {
63
- return (o) => {
63
+ function O(...t) {
64
+ return (s) => {
64
65
  t.forEach((e) => {
65
- e && (typeof e == "function" ? e(o) : e.current = o);
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
- E,
89
+ j,
89
90
  /* @__PURE__ */ n(
90
91
  "input",
91
92
  {
92
- ref: A(B, r),
93
+ ref: O(C, r),
93
94
  id: b,
94
95
  disabled: f,
95
96
  placeholder: " ",
96
- "aria-invalid": F,
97
- "aria-describedby": a ? w : void 0,
98
- className: l(
99
- q,
97
+ "aria-invalid": L,
98
+ "aria-describedby": i ? w : void 0,
99
+ className: a(
100
+ H,
100
101
  u && "pt-12 body-2",
101
- R
102
+ S
102
103
  ),
103
- onChange: T,
104
- ...i
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: l(
112
- H,
113
- a && "text-error",
114
- S
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: V,
124
- "aria-label": C("components.baseInput.clearInputAriaLabel"),
124
+ onClick: A,
125
+ "aria-label": D("components.baseInput.clearInputAriaLabel"),
125
126
  children: /* @__PURE__ */ n(I, { size: 20 })
126
127
  }
127
128
  ),
128
- !g && z
129
+ !g && E
129
130
  ]
130
131
  }
131
132
  ),
132
- a && /* @__PURE__ */ h(
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: a })
141
+ /* @__PURE__ */ n("span", { children: i })
141
142
  ]
142
143
  }
143
144
  )
144
145
  ] });
145
146
  }
146
147
  );
147
- U.displayName = "BaseInput";
148
+ G.displayName = "BaseInput";
148
149
  export {
149
- U as BaseInput
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 container element
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<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
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":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,WAAW,2FAcvB,CAAC"}
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 e } from "react/jsx-runtime";
2
- import a from "react";
3
- import { BaseInput as o } from "../BaseInput/BaseInput.js";
4
- import { Search as s } from "../../Symbols/Icons/Search.js";
5
- const c = a.forwardRef(
6
- (r, t) => /* @__PURE__ */ e(o, { ref: t, prefix: /* @__PURE__ */ e(
7
- s,
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
- size: 20,
10
- className: "text-muted group-has-disabled:text-disabled",
11
- "aria-hidden": "true"
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
- ), ...r })
45
+ )
14
46
  );
15
- c.displayName = "SearchInput";
47
+ u.displayName = "SearchInput";
16
48
  export {
17
- c as SearchInput
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' | 'inputClassName'>;
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,gBAAgB,CACzD,CAAC"}
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 { SubheaderActionProps, SubheaderInfoProps, SubheaderProps } from './types';
1
+ import { default as React } from 'react';
2
+ import { SubheaderActionProps, SubheaderCountProps, SubheaderDescriptionProps, SubheaderInfoProps, SubheaderProps, SubheaderRowProps, SubheaderShowMoreProps, SubheaderTitleProps } from './types';
2
3
  /**
3
- * A subheader component for displaying section titles with optional informational tooltips and action elements.
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
- * import { Subheader } from '@ledgerhq/lumen-ui-react';
13
- *
14
- * // Basic subheader with title only
15
- * <Subheader title="Section Title" />
45
+ * // Simple subheader without row
46
+ * <Subheader>
47
+ * <SubheaderTitle>Section Title</SubheaderTitle>
48
+ * <SubheaderDescription>Description text</SubheaderDescription>
49
+ * </Subheader>
16
50
  *
17
- * // Complete subheader with all features
18
- * <Subheader title="Section Title">
19
- * <Subheader.Info>
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 asChild>
22
- * <Information
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
- * </Subheader.Info>
31
- * <Subheader.Action>
32
- * <Link href="/action" appearance="accent" size="sm">Action</Link>
33
- * </Subheader.Action>
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":"AAEA,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACf,MAAM,SAAS,CAAC;AAgBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,SAAS;+CAKnB,cAAc;yBAlDoB,kBAAkB;2BAOhB,oBAAoB;CA2E1D,CAAC"}
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"}