@ledgerhq/lumen-ui-react 0.1.35 → 0.1.37

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 (121) hide show
  1. package/dist/index.js +108 -109
  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/AmountInput/AmountInput.d.ts +1 -1
  10. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  11. package/dist/lib/Components/AmountInput/AmountInput.js +127 -77
  12. package/dist/lib/Components/AmountInput/types.d.ts +12 -0
  13. package/dist/lib/Components/AmountInput/types.d.ts.map +1 -1
  14. package/dist/lib/Components/Avatar/Avatar.d.ts +1 -1
  15. package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
  16. package/dist/lib/Components/Avatar/Avatar.js +47 -60
  17. package/dist/lib/Components/Button/BaseButton.d.ts +2 -2
  18. package/dist/lib/Components/Button/Button.js +10 -10
  19. package/dist/lib/Components/Card/Card.js +12 -12
  20. package/dist/lib/Components/DataTable/DataTable.js +2 -2
  21. package/dist/lib/Components/Divider/Divider.js +4 -4
  22. package/dist/lib/Components/DotCount/DotCount.js +4 -4
  23. package/dist/lib/Components/DotIcon/DotIcon.d.ts +3 -2
  24. package/dist/lib/Components/DotIcon/DotIcon.d.ts.map +1 -1
  25. package/dist/lib/Components/DotIcon/DotIcon.js +55 -40
  26. package/dist/lib/Components/DotIcon/types.d.ts +7 -1
  27. package/dist/lib/Components/DotIcon/types.d.ts.map +1 -1
  28. package/dist/lib/Components/DotIndicator/DotIndicator.js +14 -14
  29. package/dist/lib/Components/DotIndicator/types.d.ts +2 -2
  30. package/dist/lib/Components/DotSymbol/DotSymbol.d.ts +1 -1
  31. package/dist/lib/Components/DotSymbol/DotSymbol.d.ts.map +1 -1
  32. package/dist/lib/Components/DotSymbol/DotSymbol.js +50 -35
  33. package/dist/lib/Components/DotSymbol/types.d.ts +7 -1
  34. package/dist/lib/Components/DotSymbol/types.d.ts.map +1 -1
  35. package/dist/lib/Components/Icon/Icon.js +4 -4
  36. package/dist/lib/Components/Icon/createIcon.js +4 -4
  37. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +4 -4
  38. package/dist/lib/Components/Link/Link.js +6 -6
  39. package/dist/lib/Components/ListItem/ListItem.js +3 -3
  40. package/dist/lib/Components/MediaButton/MediaButton.d.ts +3 -3
  41. package/dist/lib/Components/MediaButton/MediaButton.d.ts.map +1 -1
  42. package/dist/lib/Components/MediaButton/MediaButton.js +44 -42
  43. package/dist/lib/Components/MediaButton/types.d.ts +5 -5
  44. package/dist/lib/Components/MediaButton/types.d.ts.map +1 -1
  45. package/dist/lib/Components/MediaImage/MediaImage.d.ts +1 -1
  46. package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
  47. package/dist/lib/Components/MediaImage/MediaImage.js +45 -32
  48. package/dist/lib/Components/MediaImage/types.d.ts +7 -1
  49. package/dist/lib/Components/MediaImage/types.d.ts.map +1 -1
  50. package/dist/lib/Components/Menu/Menu.d.ts +11 -16
  51. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  52. package/dist/lib/Components/Menu/Menu.js +186 -125
  53. package/dist/lib/Components/Menu/types.d.ts +50 -145
  54. package/dist/lib/Components/Menu/types.d.ts.map +1 -1
  55. package/dist/lib/Components/NavBar/CoinCapsule.d.ts +2 -2
  56. package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
  57. package/dist/lib/Components/NavBar/CoinCapsule.js +1 -1
  58. package/dist/lib/Components/NavBar/NavBar.d.ts +4 -4
  59. package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
  60. package/dist/lib/Components/NavBar/NavBar.js +34 -26
  61. package/dist/lib/Components/NavBar/types.d.ts +2 -2
  62. package/dist/lib/Components/NavBar/types.d.ts.map +1 -1
  63. package/dist/lib/Components/Popover/Popover.d.ts +2 -2
  64. package/dist/lib/Components/Popover/Popover.js +6 -6
  65. package/dist/lib/Components/Popover/types.d.ts +6 -3
  66. package/dist/lib/Components/Popover/types.d.ts.map +1 -1
  67. package/dist/lib/Components/SideBar/SideBar.js +9 -9
  68. package/dist/lib/Components/Skeleton/Skeleton.js +4 -4
  69. package/dist/lib/Components/Table/Table.js +1 -1
  70. package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +3 -3
  71. package/dist/lib/Symbols/Icons/Lightbulb.js +3 -3
  72. package/dist/libs/utils-shared/dist/index.js +107 -107
  73. package/dist/node_modules/@base-ui/react/esm/composite/item/CompositeItem.js +30 -0
  74. package/dist/node_modules/@base-ui/react/esm/composite/item/useCompositeItem.js +34 -0
  75. package/dist/node_modules/@base-ui/react/esm/context-menu/root/ContextMenuRootContext.js +14 -0
  76. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js +10 -10
  77. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js +97 -0
  78. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +10 -10
  79. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +2 -2
  80. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +31 -20
  81. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItem.js +78 -0
  82. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemContext.js +14 -0
  83. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemDataAttributes.js +6 -0
  84. package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +44 -0
  85. package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroup.js +28 -0
  86. package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroupContext.js +14 -0
  87. package/dist/node_modules/@base-ui/react/esm/menu/group-label/MenuGroupLabel.js +29 -0
  88. package/dist/node_modules/@base-ui/react/esm/menu/item/MenuItem.js +47 -0
  89. package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItem.js +50 -0
  90. package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItemCommonProps.js +49 -0
  91. package/dist/node_modules/@base-ui/react/esm/menu/popup/MenuPopup.js +89 -0
  92. package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortal.js +24 -0
  93. package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortalContext.js +14 -0
  94. package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js +174 -0
  95. package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositionerContext.js +14 -0
  96. package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroup.js +45 -0
  97. package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroupContext.js +14 -0
  98. package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItem.js +75 -0
  99. package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItemContext.js +14 -0
  100. package/dist/node_modules/@base-ui/react/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +44 -0
  101. package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js +271 -0
  102. package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRootContext.js +14 -0
  103. package/dist/node_modules/@base-ui/react/esm/menu/store/MenuStore.js +109 -0
  104. package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRoot.js +21 -0
  105. package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRootContext.js +10 -0
  106. package/dist/node_modules/@base-ui/react/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +101 -0
  107. package/dist/node_modules/@base-ui/react/esm/menu/trigger/MenuTrigger.js +207 -0
  108. package/dist/node_modules/@base-ui/react/esm/menu/utils/findRootOwnerId.js +10 -0
  109. package/dist/node_modules/@base-ui/react/esm/menu/utils/stateAttributesMapping.js +15 -0
  110. package/dist/node_modules/@base-ui/react/esm/menubar/MenubarContext.js +10 -0
  111. package/dist/node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js +11 -11
  112. package/dist/node_modules/@base-ui/react/esm/popover/store/PopoverStore.js +7 -7
  113. package/dist/node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js +11 -11
  114. package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -10
  115. package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +11 -8
  116. package/dist/node_modules/@base-ui/react/esm/utils/useMixedToggleClickHandler.js +25 -0
  117. package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +7 -8
  118. package/dist/node_modules/@base-ui/utils/esm/fastHooks.js +43 -0
  119. package/dist/node_modules/@base-ui/utils/esm/store/useStore.js +54 -13
  120. package/dist/package.json +4 -5
  121. package/package.json +4 -5
@@ -1,15 +1,23 @@
1
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
- import { cn as n } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as b } from "class-variance-authority";
4
- import { useMemo as f } from "react";
5
- const x = b(
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import { useDisabledContext as x, DisabledProvider as v, cn as n } from "../../../libs/utils-shared/dist/index.js";
3
+ import { cva as c } from "class-variance-authority";
4
+ import { useMemo as z } from "react";
5
+ const g = c("relative inline-flex w-fit", {
6
+ variants: {
7
+ disabled: {
8
+ true: "opacity-30",
9
+ false: ""
10
+ }
11
+ }
12
+ }), N = c(
6
13
  "absolute z-10 box-content flex items-center justify-center overflow-hidden border-base-inverted",
7
14
  {
8
15
  variants: {
9
16
  size: {
10
17
  16: "size-16 border",
11
18
  20: "size-20 border",
12
- 24: "size-24 border"
19
+ 24: "size-24 border",
20
+ 32: "size-32 border"
13
21
  },
14
22
  shape: {
15
23
  square: "",
@@ -31,67 +39,74 @@ const x = b(
31
39
  { size: 16, shape: "square", className: "rounded-[5px]" },
32
40
  { size: 20, shape: "square", className: "rounded-[6px]" },
33
41
  { size: 24, shape: "square", className: "rounded-[8px]" },
42
+ { size: 32, shape: "square", className: "rounded-[10px]" },
34
43
  { shape: "circle", className: "rounded-full" }
35
44
  ]
36
45
  }
37
- ), q = {
46
+ ), V = {
38
47
  40: 16,
39
48
  48: 20,
40
49
  56: 24,
41
- 64: 24
42
- }, S = {
50
+ 64: 24,
51
+ 72: 32
52
+ }, w = {
43
53
  40: 16,
44
54
  48: 20,
45
55
  56: 24,
46
- 72: 24
47
- }, h = {
56
+ 72: 32
57
+ }, D = {
48
58
  16: 12,
49
59
  20: 16,
50
- 24: 16
51
- }, z = {
60
+ 24: 16,
61
+ 32: 20
62
+ }, I = {
52
63
  "top-start": ["top", "left"],
53
64
  "top-end": ["top", "right"],
54
65
  "bottom-start": ["bottom", "left"],
55
66
  "bottom-end": ["bottom", "right"]
56
- }, c = -3, g = (e) => {
57
- const [t, o] = z[e];
58
- return { [t]: c, [o]: c };
59
- }, v = ({
60
- children: e,
67
+ }, i = -3, q = (s) => {
68
+ const [t, o] = I[s];
69
+ return { [t]: i, [o]: i };
70
+ }, M = ({
71
+ children: s,
61
72
  icon: t,
62
73
  appearance: o,
63
- pin: s = "bottom-end",
64
- size: a = 20,
65
- shape: i = "circle",
66
- className: d,
67
- ref: m,
68
- ...p
74
+ pin: a = "bottom-end",
75
+ size: r = 20,
76
+ shape: d = "circle",
77
+ className: l,
78
+ disabled: m = !1,
79
+ ref: p,
80
+ ...b
69
81
  }) => {
70
- const l = f(() => g(s), [s]);
71
- return /* @__PURE__ */ u(
82
+ const u = z(() => q(a), [a]), f = x({
83
+ consumerName: "DotIcon",
84
+ mergeWith: { disabled: m }
85
+ });
86
+ return /* @__PURE__ */ e(v, { value: { disabled: !1 }, children: /* @__PURE__ */ h(
72
87
  "div",
73
88
  {
74
- ref: m,
75
- className: n("relative inline-flex w-fit", d),
76
- ...p,
89
+ ref: p,
90
+ className: n(g({ disabled: f, className: l })),
91
+ ...b,
77
92
  children: [
78
- /* @__PURE__ */ r("div", { className: "inline-flex", children: e }),
79
- /* @__PURE__ */ r(
93
+ /* @__PURE__ */ e("div", { className: "inline-flex", children: s }),
94
+ /* @__PURE__ */ e(
80
95
  "div",
81
96
  {
82
- className: n(x({ size: a, shape: i, pin: s, appearance: o })),
83
- style: l,
84
- children: /* @__PURE__ */ r(t, { size: h[a], className: "text-on-interactive" })
97
+ className: n(N({ size: r, shape: d, pin: a, appearance: o })),
98
+ style: u,
99
+ children: /* @__PURE__ */ e(t, { size: D[r], className: "text-on-interactive" })
85
100
  }
86
101
  )
87
102
  ]
88
103
  }
89
- );
104
+ ) });
90
105
  };
91
- v.displayName = "DotIcon";
106
+ M.displayName = "DotIcon";
92
107
  export {
93
- v as DotIcon,
94
- h as dotIconSizeMap,
95
- q as mediaImageDotIconSizeMap,
96
- S as spotDotIconSizeMap
108
+ M as DotIcon,
109
+ D as dotIconSizeMap,
110
+ V as mediaImageDotIconSizeMap,
111
+ w as spotDotIconSizeMap
97
112
  };
@@ -1,6 +1,6 @@
1
1
  import { ComponentPropsWithRef, ComponentType, ReactNode } from 'react';
2
2
  import { IconSize } from '../Icon';
3
- export type DotIconSize = 16 | 20 | 24;
3
+ export type DotIconSize = 16 | 20 | 24 | 32;
4
4
  export type DotIconPin = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
5
5
  export type DotIconAppearance = 'success' | 'muted' | 'error';
6
6
  export type DotIconProps = {
@@ -34,6 +34,12 @@ export type DotIconProps = {
34
34
  * Additional custom CSS classes to apply to the wrapper.
35
35
  */
36
36
  className?: string;
37
+ /**
38
+ * Shows a disabled appearance.
39
+ * @optional
40
+ * @default false
41
+ */
42
+ disabled?: boolean;
37
43
  /**
38
44
  * The wrapped component (e.g. MediaImage or Spot).
39
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotIcon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEvC,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D;;OAEG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;OAGG;IACH,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotIcon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE5C,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D;;OAEG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;OAGG;IACH,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { jsxs as m, jsx as b } from "react/jsx-runtime";
2
- import { useDisabledContext as p, cn as i } from "../../../libs/utils-shared/dist/index.js";
2
+ import { useDisabledContext as p, cn as s } from "../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as f } from "class-variance-authority";
4
4
  const u = f("pointer-events-none rounded-full", {
5
5
  variants: {
6
6
  size: {
7
- xs: "size-10",
8
- sm: "size-12",
9
- md: "size-14",
10
- lg: "size-16"
7
+ sm: "size-6",
8
+ md: "size-8",
9
+ lg: "size-10",
10
+ xl: "size-12"
11
11
  },
12
12
  appearance: {
13
13
  base: "bg-interactive",
@@ -19,30 +19,30 @@ const u = f("pointer-events-none rounded-full", {
19
19
  }
20
20
  },
21
21
  defaultVariants: {
22
- size: "sm",
22
+ size: "md",
23
23
  appearance: "base",
24
24
  disabled: !1
25
25
  }
26
26
  });
27
27
  function v({
28
- size: t = "sm",
28
+ size: t = "md",
29
29
  appearance: r = "base",
30
- disabled: n = !1,
30
+ disabled: d = !1,
31
31
  children: e,
32
- className: d,
32
+ className: n,
33
33
  "aria-label": a,
34
34
  ref: o,
35
35
  ...l
36
36
  }) {
37
37
  const c = p({
38
38
  consumerName: "DotIndicator",
39
- mergeWith: { disabled: n }
40
- }), s = !!e;
39
+ mergeWith: { disabled: d }
40
+ }), i = !!e;
41
41
  return /* @__PURE__ */ m(
42
42
  "div",
43
43
  {
44
44
  ref: o,
45
- className: i(s && "relative inline-flex w-fit", d),
45
+ className: s(i && "relative inline-flex w-fit", n),
46
46
  ...l,
47
47
  children: [
48
48
  /* @__PURE__ */ b(
@@ -50,9 +50,9 @@ function v({
50
50
  {
51
51
  "aria-label": a,
52
52
  "aria-hidden": !a || void 0,
53
- className: i(
53
+ className: s(
54
54
  u({ size: t, appearance: r, disabled: c }),
55
- s && "absolute top-0 right-0 z-1"
55
+ i && "absolute top-0 right-0 z-1"
56
56
  )
57
57
  }
58
58
  ),
@@ -2,9 +2,9 @@ import { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  export type DotIndicatorProps = {
3
3
  /**
4
4
  * The size of the dot indicator.
5
- * @default 'sm'
5
+ * @default md
6
6
  */
7
- size?: 'xs' | 'sm' | 'md' | 'lg';
7
+ size?: 'sm' | 'md' | 'lg' | 'xl';
8
8
  /**
9
9
  * The appearance of the dot indicator.
10
10
  * @default 'base'
@@ -15,7 +15,7 @@ export declare const spotDotSizeMap: Record<SpotSize, DotSymbolSize>;
15
15
  * </DotSymbol>
16
16
  */
17
17
  export declare const DotSymbol: {
18
- ({ children, src, alt, pin, size, shape, imgLoading, className, ref, ...rest }: DotSymbolProps): import("react/jsx-runtime").JSX.Element;
18
+ ({ children, src, alt, pin, size, shape, imgLoading, className, disabled: disabledProp, ref, ...rest }: DotSymbolProps): import("react/jsx-runtime").JSX.Element;
19
19
  displayName: string;
20
20
  };
21
21
  //# sourceMappingURL=DotSymbol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DotSymbol.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotSymbol/DotSymbol.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAgB,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAiD3E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,CAU7D,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,CAMjD,CAAC;AAmBX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS;oFAWnB,cAAc;;CA4BhB,CAAC"}
1
+ {"version":3,"file":"DotSymbol.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotSymbol/DotSymbol.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAgB,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA6D3E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,CAW7D,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,CAMjD,CAAC;AAmBX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS;4GAYnB,cAAc;;CAkChB,CAAC"}
@@ -1,8 +1,15 @@
1
- import { jsxs as f, jsx as a } from "react/jsx-runtime";
2
- import { cn as b } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as h } from "class-variance-authority";
4
- import { useMemo as z, useState as x, useEffect as N } from "react";
5
- const v = h(
1
+ import { jsx as o, jsxs as z } from "react/jsx-runtime";
2
+ import { useDisabledContext as x, DisabledProvider as N, cn as v } from "../../../libs/utils-shared/dist/index.js";
3
+ import { cva as d } from "class-variance-authority";
4
+ import { useMemo as g, useState as q, useEffect as y } from "react";
5
+ const D = d("relative inline-flex w-fit", {
6
+ variants: {
7
+ disabled: {
8
+ true: "opacity-30",
9
+ false: ""
10
+ }
11
+ }
12
+ }), S = d(
6
13
  "absolute z-10 box-content overflow-hidden border-base-inverted bg-muted",
7
14
  {
8
15
  variants: {
@@ -12,7 +19,8 @@ const v = h(
12
19
  12: "size-12 border",
13
20
  16: "size-16 border",
14
21
  20: "size-20 border",
15
- 24: "size-24 border"
22
+ 24: "size-24 border",
23
+ 32: "size-32 border"
16
24
  },
17
25
  shape: {
18
26
  square: "",
@@ -35,17 +43,19 @@ const v = h(
35
43
  { size: 16, shape: "square", className: "rounded-[5px]" },
36
44
  { size: 20, shape: "square", className: "rounded-[6px]" },
37
45
  { size: 24, shape: "square", className: "rounded-[8px]" },
46
+ { size: 32, shape: "square", className: "rounded-[10px]" },
38
47
  { shape: "circle", className: "rounded-full" }
39
48
  ]
40
49
  }
41
- ), g = {
50
+ ), M = {
42
51
  8: -2,
43
52
  10: -2,
44
53
  12: -2,
45
54
  16: -3,
46
55
  20: -3,
47
- 24: -3
48
- }, w = {
56
+ 24: -3,
57
+ 32: -3
58
+ }, C = {
49
59
  12: 8,
50
60
  16: 8,
51
61
  20: 8,
@@ -54,61 +64,66 @@ const v = h(
54
64
  40: 16,
55
65
  48: 20,
56
66
  56: 24,
57
- 64: 24
58
- }, V = {
67
+ 64: 24,
68
+ 72: 32
69
+ }, I = {
59
70
  32: 12,
60
71
  40: 16,
61
72
  48: 20,
62
73
  56: 24,
63
- 72: 24
64
- }, q = {
74
+ 72: 32
75
+ }, E = {
65
76
  "top-start": ["top", "left"],
66
77
  "top-end": ["top", "right"],
67
78
  "bottom-start": ["bottom", "left"],
68
79
  "bottom-end": ["bottom", "right"]
69
- }, S = (o, t) => {
70
- const [r, s] = q[o], e = g[t];
80
+ }, V = (a, t) => {
81
+ const [r, s] = E[a], e = M[t];
71
82
  return { [r]: e, [s]: e };
72
- }, y = ({
73
- children: o,
83
+ }, j = ({
84
+ children: a,
74
85
  src: t,
75
86
  alt: r,
76
87
  pin: s = "bottom-end",
77
88
  size: e = 20,
78
89
  shape: n = "circle",
79
- imgLoading: d = "eager",
80
- className: m,
81
- ref: c,
82
- ...l
90
+ imgLoading: l = "eager",
91
+ className: c,
92
+ disabled: m = !1,
93
+ ref: p,
94
+ ...u
83
95
  }) => {
84
- const p = z(() => S(s, e), [s, e]), [u, i] = x(!1);
85
- return N(() => {
96
+ const b = g(() => V(s, e), [s, e]), [f, i] = q(!1), h = x({
97
+ consumerName: "DotSymbol",
98
+ mergeWith: { disabled: m }
99
+ });
100
+ return y(() => {
86
101
  i(!1);
87
- }, [t]), /* @__PURE__ */ f(
102
+ }, [t]), /* @__PURE__ */ o(N, { value: { disabled: !1 }, children: /* @__PURE__ */ z(
88
103
  "div",
89
104
  {
90
- ref: c,
91
- className: b("relative inline-flex w-fit", m),
92
- ...l,
105
+ ref: p,
106
+ className: v(D({ disabled: h, className: c })),
107
+ ...u,
93
108
  children: [
94
- /* @__PURE__ */ a("div", { className: "inline-flex", children: o }),
95
- /* @__PURE__ */ a("div", { className: v({ size: e, shape: n, pin: s }), style: p, children: !u && /* @__PURE__ */ a(
109
+ /* @__PURE__ */ o("div", { className: "inline-flex", children: a }),
110
+ /* @__PURE__ */ o("div", { className: S({ size: e, shape: n, pin: s }), style: b, children: !f && /* @__PURE__ */ o(
96
111
  "img",
97
112
  {
98
113
  alt: r,
99
114
  src: t,
100
- loading: d,
115
+ loading: l,
101
116
  "aria-hidden": "true",
102
117
  onError: () => i(!0)
103
118
  }
104
119
  ) })
105
120
  ]
106
121
  }
107
- );
122
+ ) });
108
123
  };
109
- y.displayName = "DotSymbol";
124
+ j.displayName = "DotSymbol";
110
125
  export {
111
- y as DotSymbol,
112
- w as mediaImageDotSizeMap,
113
- V as spotDotSizeMap
126
+ j as DotSymbol,
127
+ C as mediaImageDotSizeMap,
128
+ I as spotDotSizeMap
114
129
  };
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithRef, ReactNode } from 'react';
2
- export type DotSymbolSize = 8 | 10 | 12 | 16 | 20 | 24;
2
+ export type DotSymbolSize = 8 | 10 | 12 | 16 | 20 | 24 | 32;
3
3
  export type DotSymbolPin = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
4
4
  export type DotSymbolProps = {
5
5
  /**
@@ -37,6 +37,12 @@ export type DotSymbolProps = {
37
37
  * Additional custom CSS classes to apply to the wrapper.
38
38
  */
39
39
  className?: string;
40
+ /**
41
+ * Shows a disabled appearance.
42
+ * @optional
43
+ * @default false
44
+ */
45
+ disabled?: boolean;
40
46
  /**
41
47
  * The wrapped component (e.g. MediaImage or Spot).
42
48
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotSymbol/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEvD,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,SAAS,GACT,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotSymbol/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE5D,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,SAAS,GACT,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC"}
@@ -22,8 +22,8 @@ const h = a("inline-block shrink-0", {
22
22
  size: n = 24,
23
23
  className: i = "",
24
24
  children: c,
25
- viewBox: r,
26
- xmlns: e,
25
+ viewBox: e,
26
+ xmlns: r,
27
27
  ...t
28
28
  }) => k(
29
29
  "svg",
@@ -31,8 +31,8 @@ const h = a("inline-block shrink-0", {
31
31
  ref: o,
32
32
  fill: "none",
33
33
  "aria-hidden": "true",
34
- xmlns: e,
35
- viewBox: r,
34
+ xmlns: r,
35
+ viewBox: e,
36
36
  className: s(h({ size: n }), "inline-block", i),
37
37
  ...t
38
38
  },
@@ -6,17 +6,17 @@ const b = (e, t) => {
6
6
  ref: o,
7
7
  className: s,
8
8
  disabled: a,
9
- ...n
9
+ ...m
10
10
  }) => {
11
- const m = i({
11
+ const n = i({
12
12
  consumerName: e,
13
13
  mergeWith: { disabled: a }
14
14
  });
15
15
  return p(d, {
16
16
  ref: o,
17
- className: l(s, m && "text-disabled"),
17
+ className: l(s, n && "text-disabled"),
18
18
  viewBox: t.props.viewBox,
19
- ...n,
19
+ ...m,
20
20
  children: t.props.children
21
21
  });
22
22
  };
@@ -27,8 +27,8 @@ const v = u(
27
27
  }
28
28
  ), h = ({
29
29
  ref: s,
30
- className: r,
31
- iconType: i,
30
+ className: i,
31
+ iconType: r,
32
32
  icon: a,
33
33
  size: o = 24,
34
34
  appearance: n = "muted",
@@ -46,8 +46,8 @@ const v = u(
46
46
  ref: s,
47
47
  disabled: e,
48
48
  className: b(
49
- v({ disabled: e, iconType: i, appearance: n }),
50
- r
49
+ v({ disabled: e, iconType: r, appearance: n }),
50
+ i
51
51
  ),
52
52
  children: /* @__PURE__ */ t(a, { size: o })
53
53
  }
@@ -46,10 +46,10 @@ const w = k(
46
46
  disabled: b,
47
47
  ...v
48
48
  }) => {
49
- const r = x({
49
+ const s = x({
50
50
  consumerName: "Link",
51
51
  mergeWith: { disabled: b }
52
- }), s = i ? {
52
+ }), r = i ? {
53
53
  sm: 16,
54
54
  md: 20
55
55
  }[i] : 20, o = u;
@@ -62,19 +62,19 @@ const w = k(
62
62
  appearance: f,
63
63
  size: i,
64
64
  underline: p,
65
- disabled: r
65
+ disabled: s
66
66
  }),
67
67
  m
68
68
  ),
69
- "aria-disabled": r || void 0,
69
+ "aria-disabled": s || void 0,
70
70
  target: n && !t ? "_blank" : void 0,
71
71
  rel: n && !t ? "noopener noreferrer" : void 0,
72
72
  ...v,
73
73
  children: t ? a : /* @__PURE__ */ l(c, { children: [
74
- o && /* @__PURE__ */ e(o, { size: s }),
74
+ o && /* @__PURE__ */ e(o, { size: r }),
75
75
  /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: a }),
76
76
  n && /* @__PURE__ */ l(c, { children: [
77
- /* @__PURE__ */ e(z, { size: s, "aria-hidden": "true" }),
77
+ /* @__PURE__ */ e(z, { size: r, "aria-hidden": "true" }),
78
78
  /* @__PURE__ */ e("span", { className: "sr-only", children: "(opens in a new tab)" })
79
79
  ] })
80
80
  ] })
@@ -1,7 +1,7 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { useDisabledContext as c, DisabledProvider as x, cn as r, getButtonA11yProps as f, createSafeContext as b } from "../../../libs/utils-shared/dist/index.js";
2
+ import { useDisabledContext as c, DisabledProvider as x, cn as r, getButtonA11yProps as b, createSafeContext as f } from "../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as p } from "class-variance-authority";
4
- const [I, l] = b("ListItemTrailing", {
4
+ const [I, l] = f("ListItemTrailing", {
5
5
  isInTrailing: !1
6
6
  }), g = p(
7
7
  [
@@ -46,7 +46,7 @@ const [I, l] = b("ListItemTrailing", {
46
46
  "div",
47
47
  {
48
48
  ref: t,
49
- ...f({ onClick: e, disabled: d }),
49
+ ...b({ onClick: e, disabled: d }),
50
50
  className: r(
51
51
  g({
52
52
  density: m,
@@ -14,17 +14,17 @@ import { MediaButtonProps } from './types';
14
14
  * import { Settings } from '@ledgerhq/lumen-ui-react/symbols';
15
15
  *
16
16
  * // With flat interface icon
17
- * <MediaButton icon={<Settings size={20} />} iconType="flat">
17
+ * <MediaButton leadingContent={<Settings size={20} />} leadingContentShape="flat">
18
18
  * Network
19
19
  * </MediaButton>
20
20
  *
21
21
  * // With rounded crypto icon
22
- * <MediaButton icon={<CryptoIcon ledgerId="bitcoin" size={32} />} iconType="rounded">
22
+ * <MediaButton leadingContent={<CryptoIcon ledgerId="bitcoin" size={32} />} leadingContentShape="rounded">
23
23
  * Bitcoin
24
24
  * </MediaButton>
25
25
  *
26
26
  * // Without icon
27
27
  * <MediaButton>All accounts</MediaButton>
28
28
  */
29
- export declare const MediaButton: ({ ref, className, appearance, size, disabled: disabledProp, asChild, icon, iconType, hideChevron, children, ...props }: MediaButtonProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const MediaButton: ({ ref, className, appearance, size, disabled: disabledProp, asChild, leadingContent, leadingContentShape, hideChevron, children, ...props }: MediaButtonProps) => import("react/jsx-runtime").JSX.Element;
30
30
  //# sourceMappingURL=MediaButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaButton/MediaButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA4BhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,WAAW,GAAI,wHAYzB,gBAAgB,4CAqClB,CAAC"}
1
+ {"version":3,"file":"MediaButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaButton/MediaButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA4BhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,WAAW,GAAI,6IAYzB,gBAAgB,4CA4ClB,CAAC"}