@ledgerhq/lumen-ui-react 0.1.41 → 0.1.42

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.
@@ -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,6IAYzB,gBAAgB,4CA4ClB,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;AAiFhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,WAAW,GAAI,6IAYzB,gBAAgB,4CA6ClB,CAAC"}
@@ -1,10 +1,10 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { useDisabledContext as h, cn as u } from "../../../libs/utils-shared/dist/index.js";
3
- import { Slot as S, Slottable as x } from "@radix-ui/react-slot";
4
- import { cva as C } from "class-variance-authority";
5
- import { baseButtonVariants as b } from "../Button/BaseButton.js";
6
- import { ChevronDown as z } from "../../Symbols/Icons/ChevronDown.js";
7
- const y = C("gap-8 body-2-semi-bold", {
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { useDisabledContext as C, cn as u } from "../../../libs/utils-shared/dist/index.js";
3
+ import { Slot as g, Slottable as v } from "@radix-ui/react-slot";
4
+ import { cva as S } from "class-variance-authority";
5
+ import { baseButtonVariants as z } from "../Button/BaseButton.js";
6
+ import { ChevronDown as x } from "../../Symbols/Icons/ChevronDown.js";
7
+ const y = S("gap-8 body-2-semi-bold", {
8
8
  variants: {
9
9
  size: {
10
10
  sm: "",
@@ -14,60 +14,114 @@ const y = C("gap-8 body-2-semi-bold", {
14
14
  flat: "",
15
15
  rounded: "",
16
16
  none: ""
17
+ },
18
+ hasChevron: {
19
+ true: "",
20
+ false: ""
17
21
  }
18
22
  },
19
23
  compoundVariants: [
20
- { size: "md", leadingContentShape: "flat", class: "px-16 py-12" },
21
- { size: "md", leadingContentShape: "rounded", class: "py-8 pr-16 pl-8" },
22
- { size: "md", leadingContentShape: "none", class: "px-16 py-14" },
23
- { size: "sm", leadingContentShape: "flat", class: "px-12 py-10" },
24
- { size: "sm", leadingContentShape: "rounded", class: "py-8 pr-10 pl-8" },
25
- { size: "sm", leadingContentShape: "none", class: "px-12 py-10" }
24
+ {
25
+ size: "md",
26
+ leadingContentShape: ["flat", "none"],
27
+ hasChevron: !0,
28
+ class: "py-14 pr-12 pl-16"
29
+ },
30
+ {
31
+ size: "sm",
32
+ leadingContentShape: ["flat", "none"],
33
+ hasChevron: !0,
34
+ class: "py-10 pr-8 pl-12"
35
+ },
36
+ {
37
+ size: "md",
38
+ leadingContentShape: "rounded",
39
+ hasChevron: !0,
40
+ class: "py-8 pr-12 pl-8"
41
+ },
42
+ {
43
+ size: "sm",
44
+ leadingContentShape: "rounded",
45
+ hasChevron: !0,
46
+ class: "p-8"
47
+ },
48
+ {
49
+ size: "md",
50
+ leadingContentShape: "flat",
51
+ hasChevron: !1,
52
+ class: "px-16 py-12"
53
+ },
54
+ {
55
+ size: "md",
56
+ leadingContentShape: "none",
57
+ hasChevron: !1,
58
+ class: "px-16 py-14"
59
+ },
60
+ {
61
+ size: "sm",
62
+ leadingContentShape: ["flat", "none"],
63
+ hasChevron: !1,
64
+ class: "px-12 py-10"
65
+ },
66
+ {
67
+ size: "md",
68
+ leadingContentShape: "rounded",
69
+ hasChevron: !1,
70
+ class: "py-8 pr-16 pl-8"
71
+ },
72
+ {
73
+ size: "sm",
74
+ leadingContentShape: "rounded",
75
+ hasChevron: !1,
76
+ class: "py-8 pr-10 pl-8"
77
+ }
26
78
  ],
27
79
  defaultVariants: {
28
80
  size: "md",
29
- leadingContentShape: "none"
81
+ leadingContentShape: "none",
82
+ hasChevron: !0
30
83
  }
31
84
  }), k = ({
32
- ref: i,
33
- className: l,
85
+ ref: r,
86
+ className: i,
34
87
  appearance: p = "gray",
35
- size: m = "md",
36
- disabled: r = !1,
88
+ size: d = "md",
89
+ disabled: h = !1,
37
90
  asChild: n = !1,
38
91
  leadingContent: a,
39
- leadingContentShape: d = "flat",
40
- hideChevron: c = !1,
41
- children: s,
42
- ...f
92
+ leadingContentShape: m = "flat",
93
+ hideChevron: s = !1,
94
+ children: t,
95
+ ...c
43
96
  }) => {
44
- const t = h({
97
+ const o = C({
45
98
  consumerName: "MediaButton",
46
- mergeWith: { disabled: r }
47
- }), g = a ? d : "none";
48
- return /* @__PURE__ */ o(
49
- n ? S : "button",
99
+ mergeWith: { disabled: h }
100
+ }), f = a ? m : "none";
101
+ return /* @__PURE__ */ l(
102
+ n ? g : "button",
50
103
  {
51
- ref: i,
104
+ ref: r,
52
105
  className: u(
53
- b({
106
+ z({
54
107
  appearance: p,
55
- disabled: t,
108
+ disabled: o,
56
109
  loading: !1
57
110
  }),
58
111
  y({
59
- size: m,
60
- leadingContentShape: g
112
+ size: d,
113
+ leadingContentShape: f,
114
+ hasChevron: !s
61
115
  }),
62
- l
116
+ i
63
117
  ),
64
- disabled: t,
65
- ...f,
118
+ disabled: o,
119
+ ...c,
66
120
  children: [
67
121
  a && /* @__PURE__ */ e("span", { className: "inline-flex shrink-0 items-center", children: a }),
68
- /* @__PURE__ */ o("span", { className: "flex items-center gap-2", children: [
69
- n ? /* @__PURE__ */ e(x, { children: s }) : /* @__PURE__ */ e("span", { className: "line-clamp-1 text-left", children: s }),
70
- !c && /* @__PURE__ */ e(z, { size: 20 })
122
+ /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
123
+ n ? /* @__PURE__ */ e(v, { children: t }) : /* @__PURE__ */ e("span", { className: "line-clamp-1 text-left", children: t }),
124
+ !s && /* @__PURE__ */ e(x, { size: 20 })
71
125
  ] })
72
126
  ]
73
127
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [