@ledgerhq/lumen-ui-react 0.1.34 → 0.1.36

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 (103) hide show
  1. package/dist/index.js +187 -182
  2. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -1
  3. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  4. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +117 -78
  5. package/dist/lib/Components/AmountDisplay/index.d.ts +1 -1
  6. package/dist/lib/Components/AmountDisplay/index.d.ts.map +1 -1
  7. package/dist/lib/Components/AmountDisplay/types.d.ts +16 -3
  8. package/dist/lib/Components/AmountDisplay/types.d.ts.map +1 -1
  9. package/dist/lib/Components/Card/types.d.ts +1 -1
  10. package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts +45 -0
  11. package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts.map +1 -0
  12. package/dist/lib/Components/DescriptionItem/DescriptionItem.js +98 -0
  13. package/dist/lib/Components/DescriptionItem/index.d.ts +3 -0
  14. package/dist/lib/Components/DescriptionItem/index.d.ts.map +1 -0
  15. package/dist/lib/Components/DescriptionItem/types.d.ts +58 -0
  16. package/dist/lib/Components/DescriptionItem/types.d.ts.map +1 -0
  17. package/dist/lib/Components/DotIcon/DotIcon.d.ts +1 -1
  18. package/dist/lib/Components/DotIcon/DotIcon.d.ts.map +1 -1
  19. package/dist/lib/Components/DotIcon/DotIcon.js +48 -37
  20. package/dist/lib/Components/DotIcon/types.d.ts +6 -0
  21. package/dist/lib/Components/DotIcon/types.d.ts.map +1 -1
  22. package/dist/lib/Components/DotSymbol/DotSymbol.d.ts +1 -1
  23. package/dist/lib/Components/DotSymbol/DotSymbol.d.ts.map +1 -1
  24. package/dist/lib/Components/DotSymbol/DotSymbol.js +42 -31
  25. package/dist/lib/Components/DotSymbol/types.d.ts +6 -0
  26. package/dist/lib/Components/DotSymbol/types.d.ts.map +1 -1
  27. package/dist/lib/Components/MediaButton/MediaButton.d.ts +3 -3
  28. package/dist/lib/Components/MediaButton/MediaButton.d.ts.map +1 -1
  29. package/dist/lib/Components/MediaButton/MediaButton.js +42 -40
  30. package/dist/lib/Components/MediaButton/types.d.ts +5 -5
  31. package/dist/lib/Components/MediaButton/types.d.ts.map +1 -1
  32. package/dist/lib/Components/MediaImage/MediaImage.d.ts +1 -1
  33. package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
  34. package/dist/lib/Components/MediaImage/MediaImage.js +40 -29
  35. package/dist/lib/Components/MediaImage/types.d.ts +6 -0
  36. package/dist/lib/Components/MediaImage/types.d.ts.map +1 -1
  37. package/dist/lib/Components/Menu/Menu.d.ts +11 -16
  38. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  39. package/dist/lib/Components/Menu/Menu.js +186 -125
  40. package/dist/lib/Components/Menu/types.d.ts +50 -145
  41. package/dist/lib/Components/Menu/types.d.ts.map +1 -1
  42. package/dist/lib/Components/NavBar/CoinCapsule.d.ts +2 -2
  43. package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
  44. package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
  45. package/dist/lib/Components/NavBar/NavBar.d.ts +4 -4
  46. package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
  47. package/dist/lib/Components/NavBar/NavBar.js +10 -2
  48. package/dist/lib/Components/NavBar/types.d.ts +2 -2
  49. package/dist/lib/Components/NavBar/types.d.ts.map +1 -1
  50. package/dist/lib/Components/Popover/Popover.d.ts +2 -2
  51. package/dist/lib/Components/Popover/types.d.ts +6 -3
  52. package/dist/lib/Components/Popover/types.d.ts.map +1 -1
  53. package/dist/lib/Components/index.d.ts +2 -1
  54. package/dist/lib/Components/index.d.ts.map +1 -1
  55. package/dist/node_modules/@base-ui/react/esm/composite/item/CompositeItem.js +30 -0
  56. package/dist/node_modules/@base-ui/react/esm/composite/item/useCompositeItem.js +34 -0
  57. package/dist/node_modules/@base-ui/react/esm/context-menu/root/ContextMenuRootContext.js +14 -0
  58. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js +10 -10
  59. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js +97 -0
  60. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +10 -10
  61. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +2 -2
  62. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +31 -20
  63. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItem.js +78 -0
  64. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemContext.js +14 -0
  65. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemDataAttributes.js +6 -0
  66. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +44 -0
  67. package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroup.js +28 -0
  68. package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroupContext.js +14 -0
  69. package/dist/node_modules/@base-ui/react/esm/menu/group-label/MenuGroupLabel.js +29 -0
  70. package/dist/node_modules/@base-ui/react/esm/menu/item/MenuItem.js +47 -0
  71. package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItem.js +50 -0
  72. package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItemCommonProps.js +49 -0
  73. package/dist/node_modules/@base-ui/react/esm/menu/popup/MenuPopup.js +89 -0
  74. package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortal.js +24 -0
  75. package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortalContext.js +14 -0
  76. package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js +174 -0
  77. package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositionerContext.js +14 -0
  78. package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroup.js +45 -0
  79. package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroupContext.js +14 -0
  80. package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItem.js +75 -0
  81. package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItemContext.js +14 -0
  82. package/dist/node_modules/@base-ui/react/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +44 -0
  83. package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js +271 -0
  84. package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRootContext.js +14 -0
  85. package/dist/node_modules/@base-ui/react/esm/menu/store/MenuStore.js +109 -0
  86. package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRoot.js +21 -0
  87. package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRootContext.js +10 -0
  88. package/dist/node_modules/@base-ui/react/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +101 -0
  89. package/dist/node_modules/@base-ui/react/esm/menu/trigger/MenuTrigger.js +207 -0
  90. package/dist/node_modules/@base-ui/react/esm/menu/utils/findRootOwnerId.js +10 -0
  91. package/dist/node_modules/@base-ui/react/esm/menu/utils/stateAttributesMapping.js +15 -0
  92. package/dist/node_modules/@base-ui/react/esm/menubar/MenubarContext.js +10 -0
  93. package/dist/node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js +11 -11
  94. package/dist/node_modules/@base-ui/react/esm/popover/store/PopoverStore.js +7 -7
  95. package/dist/node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js +11 -11
  96. package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -10
  97. package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +11 -8
  98. package/dist/node_modules/@base-ui/react/esm/utils/useMixedToggleClickHandler.js +25 -0
  99. package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +7 -8
  100. package/dist/node_modules/@base-ui/utils/esm/fastHooks.js +43 -0
  101. package/dist/node_modules/@base-ui/utils/esm/store/useStore.js +54 -13
  102. package/dist/package.json +2 -3
  103. package/package.json +4 -5
@@ -1,109 +1,148 @@
1
1
  import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import { useSplitText as x, buildAriaLabel as b, cn as p } from "../../../libs/utils-shared/dist/index.js";
3
- import { memo as d } from "react";
2
+ import { useSplitText as y, buildAriaLabel as w, cn as o } from "../../../libs/utils-shared/dist/index.js";
3
+ import { memo as u } from "react";
4
4
  import { DIGITS as D } from "./types.js";
5
- import { useCommonTranslation as N } from "../../../i18n/useCommonTranslation.js";
6
- const g = {
7
- 0: 25,
8
- 1: 15.5,
9
- 2: 23.5,
10
- 3: 24.5,
11
- 4: 25.5,
12
- 5: 23.5,
13
- 6: 25,
14
- 7: 22,
15
- 8: 24.5,
16
- 9: 24.5
17
- }, I = {
18
- 0: 17.5,
19
- 1: 11,
20
- 2: 16.5,
21
- 3: 17,
22
- 4: 18,
23
- 5: 16,
24
- 6: 17.5,
25
- 7: 15,
26
- 8: 17,
27
- 9: 17
28
- }, u = d(({ value: a, animate: l, type: i }) => {
29
- const r = (i === "integer" ? g : I)[a];
5
+ import { useCommonTranslation as S } from "../../../i18n/useCommonTranslation.js";
6
+ const m = {
7
+ "heading-1-semi-bold": {
8
+ 0: 25,
9
+ 1: 15.5,
10
+ 2: 23.5,
11
+ 3: 24.5,
12
+ 4: 25.5,
13
+ 5: 23.5,
14
+ 6: 25,
15
+ 7: 22,
16
+ 8: 24.5,
17
+ 9: 24.5
18
+ },
19
+ "heading-2-semi-bold": {
20
+ 0: 17.5,
21
+ 1: 11,
22
+ 2: 16.5,
23
+ 3: 17,
24
+ 4: 18,
25
+ 5: 16,
26
+ 6: 17.5,
27
+ 7: 15,
28
+ 8: 17,
29
+ 9: 17
30
+ },
31
+ "heading-4-semi-bold": {
32
+ 0: 13,
33
+ 1: 8.5,
34
+ 2: 12.5,
35
+ 3: 12.5,
36
+ 4: 13,
37
+ 5: 12,
38
+ 6: 12.5,
39
+ 7: 11.5,
40
+ 8: 12.5,
41
+ 9: 12.5
42
+ }
43
+ }, v = {
44
+ md: {
45
+ integer: {
46
+ className: "heading-1-semi-bold",
47
+ widths: m["heading-1-semi-bold"]
48
+ },
49
+ decimal: {
50
+ className: "heading-2-semi-bold",
51
+ widths: m["heading-2-semi-bold"]
52
+ }
53
+ },
54
+ sm: {
55
+ integer: {
56
+ className: "heading-2-semi-bold",
57
+ widths: m["heading-2-semi-bold"]
58
+ },
59
+ decimal: {
60
+ className: "heading-4-semi-bold",
61
+ widths: m["heading-4-semi-bold"]
62
+ }
63
+ }
64
+ }, b = u(({ value: a, animate: l, widths: s }) => {
65
+ const t = s[a];
30
66
  return /* @__PURE__ */ c(
31
67
  "div",
32
68
  {
33
69
  className: "relative overflow-hidden mask-fade-y transition-[width] duration-600",
34
- style: { width: r + "px" },
70
+ style: { width: t + "px" },
35
71
  children: [
36
72
  /* @__PURE__ */ e("span", { className: "invisible", children: "0" }),
37
73
  /* @__PURE__ */ e(
38
74
  "span",
39
75
  {
40
- className: p(
76
+ className: o(
41
77
  "absolute inset-x-0 top-0 flex flex-col items-center justify-center",
42
78
  l && "transition-transform duration-600 ease-in-out"
43
79
  ),
44
80
  style: {
45
81
  transform: `translateY(-${a * 10}%)`
46
82
  },
47
- children: D.map((s, n) => /* @__PURE__ */ e("span", { inert: s !== a, children: s }, n))
83
+ children: D.map((n, r) => /* @__PURE__ */ e("span", { inert: n !== a, children: n }, r))
48
84
  }
49
85
  )
50
86
  ]
51
87
  }
52
88
  );
53
89
  });
54
- u.displayName = "DigitStrip";
55
- const o = d(({ items: a, type: l, animate: i }) => a.map((r, s) => {
56
- const n = a.length - s;
57
- return r.type === "separator" ? /* @__PURE__ */ e("span", { children: r.value }, n) : /* @__PURE__ */ e(
58
- u,
59
- {
60
- value: Number(r.value),
61
- animate: i,
62
- type: l
63
- },
64
- n
65
- );
66
- }));
67
- o.displayName = "DigitStripList";
68
- const w = ({
90
+ b.displayName = "DigitStrip";
91
+ const h = u(
92
+ ({ items: a, widths: l, animate: s }) => a.map((t, n) => {
93
+ const r = a.length - n;
94
+ return t.type === "separator" ? /* @__PURE__ */ e("span", { children: t.value }, r) : /* @__PURE__ */ e(
95
+ b,
96
+ {
97
+ value: Number(t.value),
98
+ animate: s,
99
+ widths: l
100
+ },
101
+ r
102
+ );
103
+ })
104
+ );
105
+ h.displayName = "DigitStripList";
106
+ function j({
69
107
  value: a,
70
108
  formatter: l,
71
- hidden: i = !1,
72
- loading: r = !1,
73
- animate: s = !0,
74
- className: n,
75
- ...f
76
- }) => {
77
- const t = l(a), m = x(t), { t: h } = N(), y = b(
78
- t,
109
+ hidden: s = !1,
110
+ loading: t = !1,
111
+ animate: n = !0,
112
+ size: r = "md",
113
+ className: f,
114
+ ...g
115
+ }) {
116
+ const i = l(a), p = y(i), { t: N } = S(), x = w(
79
117
  i,
80
- h("components.amountDisplay.amountHiddenAriaLabel")
81
- );
118
+ s,
119
+ N("components.amountDisplay.amountHiddenAriaLabel")
120
+ ), d = v[r];
82
121
  return /* @__PURE__ */ e(
83
122
  "div",
84
123
  {
85
- className: p(
86
- r && "animate-pulse",
124
+ className: o(
125
+ t && "animate-pulse",
87
126
  "relative inline-flex",
88
- n
127
+ f
89
128
  ),
90
- "aria-label": y,
91
- "aria-busy": r,
92
- ...f,
129
+ "aria-label": x,
130
+ "aria-busy": t,
131
+ ...g,
93
132
  children: /* @__PURE__ */ c("div", { className: "flex items-baseline", children: [
94
133
  /* @__PURE__ */ c(
95
134
  "span",
96
135
  {
97
- className: "inline-flex heading-1-semi-bold text-base",
136
+ className: o("inline-flex text-base", d.integer.className),
98
137
  "aria-hidden": "true",
99
138
  children: [
100
- t.currencyPosition === "start" && /* @__PURE__ */ e("span", { className: "me-4", children: t.currencyText }),
101
- i ? /* @__PURE__ */ e("span", { children: "••••" }) : /* @__PURE__ */ e(
102
- o,
139
+ i.currencyPosition === "start" && /* @__PURE__ */ e("span", { className: "me-4", children: i.currencyText }),
140
+ s ? /* @__PURE__ */ e("span", { children: "••••" }) : /* @__PURE__ */ e(
141
+ h,
103
142
  {
104
- items: m.integerPart,
105
- animate: s,
106
- type: "integer"
143
+ items: p.integerPart,
144
+ animate: n,
145
+ widths: d.integer.widths
107
146
  }
108
147
  )
109
148
  ]
@@ -112,26 +151,26 @@ const w = ({
112
151
  /* @__PURE__ */ c(
113
152
  "span",
114
153
  {
115
- className: "inline-flex heading-2-semi-bold text-muted",
154
+ className: o("inline-flex text-muted", d.decimal.className),
116
155
  "aria-hidden": "true",
117
156
  children: [
118
- !i && t.decimalPart && /* @__PURE__ */ e("span", { children: t.decimalSeparator }),
119
- t.decimalPart && !i && /* @__PURE__ */ e(
120
- o,
157
+ !s && i.decimalPart && /* @__PURE__ */ e("span", { children: i.decimalSeparator }),
158
+ i.decimalPart && !s && /* @__PURE__ */ e(
159
+ h,
121
160
  {
122
- items: m.decimalPart,
123
- animate: s,
124
- type: "decimal"
161
+ items: p.decimalPart,
162
+ animate: n,
163
+ widths: d.decimal.widths
125
164
  }
126
165
  ),
127
- t.currencyPosition === "end" && /* @__PURE__ */ e("span", { className: "ms-4", children: t.currencyText })
166
+ i.currencyPosition === "end" && /* @__PURE__ */ e("span", { className: "ms-4", children: i.currencyText })
128
167
  ]
129
168
  }
130
169
  )
131
170
  ] })
132
171
  }
133
172
  );
134
- };
173
+ }
135
174
  export {
136
- w as AmountDisplay
175
+ j as AmountDisplay
137
176
  };
@@ -1,3 +1,3 @@
1
1
  export { AmountDisplay } from './AmountDisplay';
2
- export type { AmountDisplayProps, FormattedValue } from './types';
2
+ export type { AmountDisplayProps, AmountDisplaySize, FormattedValue, } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,GACf,MAAM,SAAS,CAAC"}
@@ -2,11 +2,19 @@ import { FormattedValue, SplitChar } from '@ledgerhq/lumen-utils-shared';
2
2
  import { ComponentPropsWithRef } from 'react';
3
3
  export type { FormattedValue };
4
4
  export declare const DIGITS: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
5
- type IntegerDigit = (typeof DIGITS)[number];
5
+ type Digit = (typeof DIGITS)[number];
6
+ export type AmountDisplaySize = 'sm' | 'md';
7
+ type DigitType = 'integer' | 'decimal';
8
+ export type DigitWidths = Record<Digit, number>;
9
+ export type PartConfig = {
10
+ className: string;
11
+ widths: DigitWidths;
12
+ };
13
+ export type SizeConfig = Record<DigitType, PartConfig>;
6
14
  export type DigitStripProps = {
7
- value: IntegerDigit;
15
+ value: Digit;
8
16
  animate: boolean;
9
- type: 'integer' | 'decimal';
17
+ widths: DigitWidths;
10
18
  };
11
19
  export type DigitStripListProps = {
12
20
  items: SplitChar[];
@@ -40,5 +48,10 @@ export type AmountDisplayProps = {
40
48
  * @default true
41
49
  */
42
50
  animate?: boolean;
51
+ /**
52
+ * The size variant of the amount display.
53
+ * @default 'md'
54
+ */
55
+ size?: AmountDisplaySize;
43
56
  } & ComponentPropsWithRef<'div'>;
44
57
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,MAAM,yCAA0C,CAAC;AAE9D,KAAK,YAAY,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,cAAc,CAAC;IAC7C;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,MAAM,yCAA0C,CAAC;AAE9D,KAAK,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAErC,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,cAAc,CAAC;IAC7C;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
@@ -114,7 +114,7 @@ export type CardTrailingProps = {
114
114
  } & ComponentPropsWithRef<'div'>;
115
115
  export type CardFooterProps = {
116
116
  /**
117
- * The footer content (DescriptionList, Button, etc.).
117
+ * The footer content (DescriptionItem, Button, etc.).
118
118
  */
119
119
  children: ReactNode;
120
120
  /**
@@ -0,0 +1,45 @@
1
+ import { DescriptionItemLabelProps, DescriptionItemLeadingProps, DescriptionItemProps, DescriptionItemTrailingProps, DescriptionItemValueProps } from './types';
2
+ /**
3
+ * A compound component for displaying a key-value description row.
4
+ * Composed with DescriptionItemLeading / DescriptionItemLabel (key side)
5
+ * and DescriptionItemTrailing / DescriptionItemValue (value side).
6
+ *
7
+ *
8
+ * @see {@link https://ldls.vercel.app/?path=/docs/containment-descriptionitem--docs Storybook}
9
+ *
10
+ * @example
11
+ * <DescriptionItem size="md">
12
+ * <DescriptionItemLeading>
13
+ * <DescriptionItemLabel>Fees</DescriptionItemLabel>
14
+ * </DescriptionItemLeading>
15
+ * <DescriptionItemTrailing>
16
+ * <DescriptionItemValue>0.001 BTC</DescriptionItemValue>
17
+ * </DescriptionItemTrailing>
18
+ * </DescriptionItem>
19
+ */
20
+ export declare const DescriptionItem: ({ ref, children, className, size, ...props }: DescriptionItemProps) => import("react/jsx-runtime").JSX.Element;
21
+ /**
22
+ * Layout container for the leading (left) side of the description item.
23
+ * Contains DescriptionItemLabel and an optional info icon sibling.
24
+ */
25
+ export declare const DescriptionItemLeading: ({ ref, children, className, ...props }: DescriptionItemLeadingProps) => import("react/jsx-runtime").JSX.Element;
26
+ /**
27
+ * Typography-bearing label for the leading side.
28
+ * Reads size from DescriptionItemSizeContext to apply the correct typography.
29
+ * Use this instead of a raw string so that size is always applied correctly,
30
+ * even when children is a custom ReactNode.
31
+ */
32
+ export declare const DescriptionItemLabel: ({ ref, children, className, ...props }: DescriptionItemLabelProps) => import("react/jsx-runtime").JSX.Element;
33
+ /**
34
+ * Layout container for the trailing (right) side of the description item.
35
+ * Accepts DescriptionItemValue, Tag, Link, CryptoIcon, or any custom content.
36
+ */
37
+ export declare const DescriptionItemTrailing: ({ ref, children, className, ...props }: DescriptionItemTrailingProps) => import("react/jsx-runtime").JSX.Element;
38
+ /**
39
+ * Typography-bearing value for the trailing side.
40
+ * Reads size from DescriptionItemSizeContext to apply the correct typography.
41
+ * Use this for plain text values. For Tag, Link, or other components,
42
+ * place them directly in DescriptionItemTrailing with an explicit size prop.
43
+ */
44
+ export declare const DescriptionItemValue: ({ ref, children, className, ...props }: DescriptionItemValueProps) => import("react/jsx-runtime").JSX.Element;
45
+ //# sourceMappingURL=DescriptionItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DescriptionItem/DescriptionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EAEpB,4BAA4B,EAC5B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAWjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,GAAI,8CAM7B,oBAAoB,4CAYtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,4CAU7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,wCAKlC,yBAAyB,4CAmB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,wCAKrC,4BAA4B,4CAU9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,wCAKlC,yBAAyB,4CAmB3B,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { createSafeContext as a, cn as m } from "../../../libs/utils-shared/dist/index.js";
3
+ const [c, o] = a("DescriptionItemSize", {
4
+ size: "md"
5
+ }), p = ({
6
+ ref: e,
7
+ children: t,
8
+ className: i,
9
+ size: s = "md",
10
+ ...n
11
+ }) => /* @__PURE__ */ r(c, { value: { size: s }, children: /* @__PURE__ */ r(
12
+ "div",
13
+ {
14
+ ref: e,
15
+ className: m("flex w-full items-start gap-12", i),
16
+ ...n,
17
+ children: t
18
+ }
19
+ ) }), u = ({
20
+ ref: e,
21
+ children: t,
22
+ className: i,
23
+ ...s
24
+ }) => /* @__PURE__ */ r(
25
+ "div",
26
+ {
27
+ ref: e,
28
+ className: m("flex min-w-0 flex-1 items-center gap-4", i),
29
+ ...s,
30
+ children: t
31
+ }
32
+ ), x = ({
33
+ ref: e,
34
+ children: t,
35
+ className: i,
36
+ ...s
37
+ }) => {
38
+ const { size: n } = o({
39
+ consumerName: "DescriptionItemLabel",
40
+ contextRequired: !1
41
+ });
42
+ return /* @__PURE__ */ r(
43
+ "div",
44
+ {
45
+ ref: e,
46
+ className: m(
47
+ "line-clamp-2 min-w-0 wrap-break-word text-ellipsis text-muted",
48
+ n === "md" ? "body-2" : "body-3",
49
+ i
50
+ ),
51
+ ...s,
52
+ children: t
53
+ }
54
+ );
55
+ }, b = ({
56
+ ref: e,
57
+ children: t,
58
+ className: i,
59
+ ...s
60
+ }) => /* @__PURE__ */ r(
61
+ "div",
62
+ {
63
+ ref: e,
64
+ className: m("flex max-w-4/5 shrink-0 items-center gap-4", i),
65
+ ...s,
66
+ children: t
67
+ }
68
+ ), f = ({
69
+ ref: e,
70
+ children: t,
71
+ className: i,
72
+ ...s
73
+ }) => {
74
+ const { size: n } = o({
75
+ consumerName: "DescriptionItemValue",
76
+ contextRequired: !1
77
+ });
78
+ return /* @__PURE__ */ r(
79
+ "div",
80
+ {
81
+ ref: e,
82
+ className: m(
83
+ "min-w-0 truncate text-base",
84
+ n === "md" ? "body-2-semi-bold" : "body-3-semi-bold",
85
+ i
86
+ ),
87
+ ...s,
88
+ children: t
89
+ }
90
+ );
91
+ };
92
+ export {
93
+ p as DescriptionItem,
94
+ x as DescriptionItemLabel,
95
+ u as DescriptionItemLeading,
96
+ b as DescriptionItemTrailing,
97
+ f as DescriptionItemValue
98
+ };
@@ -0,0 +1,3 @@
1
+ export * from './DescriptionItem';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DescriptionItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { ComponentPropsWithRef, ReactNode } from 'react';
2
+ export type DescriptionItemSize = 'sm' | 'md';
3
+ export type DescriptionItemProps = {
4
+ /**
5
+ * The content of the description item (DescriptionItemLeading, DescriptionItemTrailing).
6
+ */
7
+ children: ReactNode;
8
+ /**
9
+ * The size of the description item.
10
+ * @default 'md'
11
+ */
12
+ size?: DescriptionItemSize;
13
+ /**
14
+ * Additional CSS classes for layout adjustments.
15
+ */
16
+ className?: string;
17
+ } & ComponentPropsWithRef<'div'>;
18
+ export type DescriptionItemLeadingProps = {
19
+ /**
20
+ * The leading content (DescriptionItemLabel + optional info icon sibling).
21
+ */
22
+ children: ReactNode;
23
+ /**
24
+ * Additional CSS classes for layout adjustments.
25
+ */
26
+ className?: string;
27
+ } & ComponentPropsWithRef<'div'>;
28
+ export type DescriptionItemLabelProps = {
29
+ /**
30
+ * The label text or custom content.
31
+ */
32
+ children: ReactNode;
33
+ /**
34
+ * Additional CSS classes for layout adjustments.
35
+ */
36
+ className?: string;
37
+ } & ComponentPropsWithRef<'div'>;
38
+ export type DescriptionItemTrailingProps = {
39
+ /**
40
+ * The trailing content (DescriptionItemValue, Tag, Link, etc.).
41
+ */
42
+ children: ReactNode;
43
+ /**
44
+ * Additional CSS classes for layout adjustments.
45
+ */
46
+ className?: string;
47
+ } & ComponentPropsWithRef<'div'>;
48
+ export type DescriptionItemValueProps = {
49
+ /**
50
+ * The value text or custom content.
51
+ */
52
+ children: ReactNode;
53
+ /**
54
+ * Additional CSS classes for layout adjustments.
55
+ */
56
+ className?: string;
57
+ } & ComponentPropsWithRef<'div'>;
58
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DescriptionItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
@@ -26,7 +26,7 @@ export declare const dotIconSizeMap: Record<DotIconSize, IconSize>;
26
26
  * </DotIcon>
27
27
  */
28
28
  export declare const DotIcon: {
29
- ({ children, icon: Icon, appearance, pin, size, shape, className, ref, ...rest }: DotIconProps): import("react/jsx-runtime").JSX.Element;
29
+ ({ children, icon: Icon, appearance, pin, size, shape, className, disabled: disabledProp, ref, ...rest }: DotIconProps): import("react/jsx-runtime").JSX.Element;
30
30
  displayName: string;
31
31
  };
32
32
  //# sourceMappingURL=DotIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DotIcon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotIcon/DotIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAc,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAoCrE,eAAO,MAAM,wBAAwB;;;;;CAKW,CAAC;AAEjD,eAAO,MAAM,kBAAkB;;;;;CAKiB,CAAC;AAEjD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAIxD,CAAC;AAgBF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;sFAUjB,YAAY;;CAkBd,CAAC"}
1
+ {"version":3,"file":"DotIcon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotIcon/DotIcon.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAc,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA6CrE,eAAO,MAAM,wBAAwB;;;;;CAKW,CAAC;AAEjD,eAAO,MAAM,kBAAkB;;;;;CAKiB,CAAC;AAEjD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAIxD,CAAC;AAgBF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;8GAWjB,YAAY;;CAwBd,CAAC"}