@ledgerhq/lumen-ui-react 0.0.82 → 0.0.83

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.
package/dist/index.js CHANGED
@@ -25,15 +25,16 @@ import { SideBar as we, SideBarCollapseToggle as ke, SideBarItem as He, SideBarL
25
25
  import { Skeleton as Pe } from "./lib/Components/Skeleton/Skeleton.js";
26
26
  import { Spinner as je } from "./lib/Components/Spinner/Spinner.js";
27
27
  import { Spot as ze } from "./lib/Components/Spot/Spot.js";
28
- import { Subheader as Je, SubheaderAction as Ke, SubheaderCount as Oe, SubheaderDescription as Qe, SubheaderInfo as Ue, SubheaderRow as Ve, SubheaderShowMore as We, SubheaderTitle as Xe } from "./lib/Components/Subheader/Subheader.js";
29
- import { Switch as Ze } from "./lib/Components/Switch/Switch.js";
30
- import { Table as $e, TableActionBar as eo, TableActionBarLeading as oo, TableActionBarTrailing as ro, TableBody as to, TableCell as ao, TableCellContent as no, TableGroupHeaderRow as io, TableHeader as lo, TableHeaderCell as po, TableHeaderRow as mo, TableInfoIcon as To, TableLoadingRow as uo, TableRoot as xo, TableRow as fo, TableSortButton as So } from "./lib/Components/Table/Table.js";
31
- import { Tag as go } from "./lib/Components/Tag/Tag.js";
32
- import { TextInput as Io } from "./lib/Components/TextInput/TextInput.js";
33
- import { Tile as so, TileContent as Co, TileDescription as Lo, TileSecondaryAction as ho, TileSpot as Mo, TileTitle as Do, TileTrailingContent as vo } from "./lib/Components/Tile/Tile.js";
34
- import { TileButton as Ro } from "./lib/Components/TileButton/TileButton.js";
35
- import { Tooltip as ko, TooltipContent as Ho, TooltipProvider as No, TooltipTrigger as yo } from "./lib/Components/Tooltip/Tooltip.js";
36
- import { ThemeProvider as Po, useTheme as Fo } from "./lib/Components/ThemeProvider/ThemeProvider.js";
28
+ import { Stepper as Je } from "./lib/Components/Stepper/Stepper.js";
29
+ import { Subheader as Oe, SubheaderAction as Qe, SubheaderCount as Ue, SubheaderDescription as Ve, SubheaderInfo as We, SubheaderRow as Xe, SubheaderShowMore as Ye, SubheaderTitle as Ze } from "./lib/Components/Subheader/Subheader.js";
30
+ import { Switch as $e } from "./lib/Components/Switch/Switch.js";
31
+ import { Table as oo, TableActionBar as ro, TableActionBarLeading as to, TableActionBarTrailing as ao, TableBody as no, TableCell as io, TableCellContent as lo, TableGroupHeaderRow as po, TableHeader as mo, TableHeaderCell as To, TableHeaderRow as uo, TableInfoIcon as xo, TableLoadingRow as fo, TableRoot as So, TableRow as bo, TableSortButton as go } from "./lib/Components/Table/Table.js";
32
+ import { Tag as Io } from "./lib/Components/Tag/Tag.js";
33
+ import { TextInput as so } from "./lib/Components/TextInput/TextInput.js";
34
+ import { Tile as Lo, TileContent as ho, TileDescription as Mo, TileSecondaryAction as Do, TileSpot as vo, TileTitle as Ao, TileTrailingContent as Ro } from "./lib/Components/Tile/Tile.js";
35
+ import { TileButton as ko } from "./lib/Components/TileButton/TileButton.js";
36
+ import { Tooltip as No, TooltipContent as yo, TooltipProvider as Go, TooltipTrigger as Po } from "./lib/Components/Tooltip/Tooltip.js";
37
+ import { ThemeProvider as jo, useTheme as qo } from "./lib/Components/ThemeProvider/ThemeProvider.js";
37
38
  export {
38
39
  a as AddressInput,
39
40
  p as AmountDisplay,
@@ -102,45 +103,46 @@ export {
102
103
  Pe as Skeleton,
103
104
  je as Spinner,
104
105
  ze as Spot,
105
- Je as Subheader,
106
- Ke as SubheaderAction,
107
- Oe as SubheaderCount,
108
- Qe as SubheaderDescription,
109
- Ue as SubheaderInfo,
110
- Ve as SubheaderRow,
111
- We as SubheaderShowMore,
112
- Xe as SubheaderTitle,
113
- Ze as Switch,
114
- $e as Table,
115
- eo as TableActionBar,
116
- oo as TableActionBarLeading,
117
- ro as TableActionBarTrailing,
118
- to as TableBody,
119
- ao as TableCell,
120
- no as TableCellContent,
121
- io as TableGroupHeaderRow,
122
- lo as TableHeader,
123
- po as TableHeaderCell,
124
- mo as TableHeaderRow,
125
- To as TableInfoIcon,
126
- uo as TableLoadingRow,
127
- xo as TableRoot,
128
- fo as TableRow,
129
- So as TableSortButton,
130
- go as Tag,
131
- Io as TextInput,
132
- Po as ThemeProvider,
133
- so as Tile,
134
- Ro as TileButton,
135
- Co as TileContent,
136
- Lo as TileDescription,
137
- ho as TileSecondaryAction,
138
- Mo as TileSpot,
139
- Do as TileTitle,
140
- vo as TileTrailingContent,
141
- ko as Tooltip,
142
- Ho as TooltipContent,
143
- No as TooltipProvider,
144
- yo as TooltipTrigger,
145
- Fo as useTheme
106
+ Je as Stepper,
107
+ Oe as Subheader,
108
+ Qe as SubheaderAction,
109
+ Ue as SubheaderCount,
110
+ Ve as SubheaderDescription,
111
+ We as SubheaderInfo,
112
+ Xe as SubheaderRow,
113
+ Ye as SubheaderShowMore,
114
+ Ze as SubheaderTitle,
115
+ $e as Switch,
116
+ oo as Table,
117
+ ro as TableActionBar,
118
+ to as TableActionBarLeading,
119
+ ao as TableActionBarTrailing,
120
+ no as TableBody,
121
+ io as TableCell,
122
+ lo as TableCellContent,
123
+ po as TableGroupHeaderRow,
124
+ mo as TableHeader,
125
+ To as TableHeaderCell,
126
+ uo as TableHeaderRow,
127
+ xo as TableInfoIcon,
128
+ fo as TableLoadingRow,
129
+ So as TableRoot,
130
+ bo as TableRow,
131
+ go as TableSortButton,
132
+ Io as Tag,
133
+ so as TextInput,
134
+ jo as ThemeProvider,
135
+ Lo as Tile,
136
+ ko as TileButton,
137
+ ho as TileContent,
138
+ Mo as TileDescription,
139
+ Do as TileSecondaryAction,
140
+ vo as TileSpot,
141
+ Ao as TileTitle,
142
+ Ro as TileTrailingContent,
143
+ No as Tooltip,
144
+ yo as TooltipContent,
145
+ Go as TooltipProvider,
146
+ Po as TooltipTrigger,
147
+ qo as useTheme
146
148
  };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A circular stepper component showing progress as current step out of total steps.
3
+ * Renders a track arc with a progress arc and a center label.
4
+ *
5
+ * @see Figma – Stepper](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=11977-94&m=dev)
6
+ *
7
+ * @example
8
+ * <Stepper currentStep={1} totalSteps={4} />
9
+ * <Stepper currentStep={0} totalSteps={9} disabled /> // Shows minimal dot, disabled style
10
+ */
11
+ export declare const Stepper: import('react').ForwardRefExoticComponent<{
12
+ currentStep: number;
13
+ totalSteps: number;
14
+ disabled?: boolean;
15
+ label?: string;
16
+ } & Omit<import('react').HTMLAttributes<HTMLDivElement>, "children"> & import('react').RefAttributes<HTMLDivElement>>;
17
+ //# sourceMappingURL=Stepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO;;;;;qHAyFnB,CAAC"}
@@ -0,0 +1,100 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { cn as d, getStepperCalculations as b } from "../../../libs/utils-shared/dist/index.js";
3
+ import { forwardRef as v } from "react";
4
+ const s = 48, i = 4, N = v(
5
+ ({ className: m, currentStep: t, totalSteps: r, disabled: h = !1, label: o, ...f }, u) => {
6
+ const {
7
+ displayLabel: p,
8
+ r: n,
9
+ cx: l,
10
+ cy: c,
11
+ trackDashArray: k,
12
+ progressDashArray: y,
13
+ progressDashOffset: x
14
+ } = b({
15
+ currentStep: t,
16
+ totalSteps: r,
17
+ size: s,
18
+ label: o,
19
+ strokeWidth: i
20
+ });
21
+ return /* @__PURE__ */ a(
22
+ "div",
23
+ {
24
+ ref: u,
25
+ role: "progressbar",
26
+ "aria-valuenow": t,
27
+ "aria-valuemin": 1,
28
+ "aria-valuemax": r,
29
+ "aria-label": p,
30
+ className: d(
31
+ "relative flex size-48 shrink-0 items-center justify-center rounded-full",
32
+ m
33
+ ),
34
+ ...f,
35
+ children: [
36
+ /* @__PURE__ */ a(
37
+ "svg",
38
+ {
39
+ width: s,
40
+ height: s,
41
+ viewBox: `0 0 ${s} ${s}`,
42
+ className: "rotate-135",
43
+ "aria-hidden": !0,
44
+ children: [
45
+ /* @__PURE__ */ e(
46
+ "circle",
47
+ {
48
+ cx: l,
49
+ cy: c,
50
+ r: n,
51
+ fill: "none",
52
+ stroke: "currentColor",
53
+ strokeLinecap: "round",
54
+ className: "stroke-muted-subtle",
55
+ style: {
56
+ strokeWidth: `${i}px`,
57
+ strokeDasharray: k,
58
+ strokeDashoffset: 0
59
+ }
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e(
63
+ "circle",
64
+ {
65
+ cx: l,
66
+ cy: c,
67
+ r: n,
68
+ fill: "none",
69
+ stroke: "currentColor",
70
+ strokeLinecap: "round",
71
+ className: d(
72
+ h ? "stroke-muted-subtle-hover" : "stroke-active",
73
+ "transition-[stroke-dashoffset,stroke] duration-300 ease-in-out"
74
+ ),
75
+ style: {
76
+ strokeWidth: `${i}px`,
77
+ strokeDasharray: y,
78
+ strokeDashoffset: x
79
+ }
80
+ }
81
+ )
82
+ ]
83
+ }
84
+ ),
85
+ /* @__PURE__ */ e("span", { className: "absolute inset-0 m-4 flex items-center justify-center text-base", children: o ? /* @__PURE__ */ e("span", { className: "body-2-semi-bold", children: o }) : /* @__PURE__ */ a("span", { children: [
86
+ /* @__PURE__ */ e("span", { className: "body-1-semi-bold", children: Math.min(Math.max(t, 0), r) }),
87
+ /* @__PURE__ */ a("span", { className: "body-2-semi-bold text-muted", children: [
88
+ "/",
89
+ r
90
+ ] })
91
+ ] }) })
92
+ ]
93
+ }
94
+ );
95
+ }
96
+ );
97
+ N.displayName = "Stepper";
98
+ export {
99
+ N as Stepper
100
+ };
@@ -0,0 +1,3 @@
1
+ export * from './Stepper';
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/Stepper/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export type StepperProps = {
3
+ /**
4
+ * Current step number (1-based). Use 0 or negative to show minimal dot (before starting).
5
+ */
6
+ currentStep: number;
7
+ /**
8
+ * Total number of steps.
9
+ */
10
+ totalSteps: number;
11
+ /**
12
+ * Whether the stepper is disabled. Changes the progress arc to a muted style.
13
+ * @default false
14
+ */
15
+ disabled?: boolean;
16
+ /**
17
+ * Optional custom label. Defaults to "{currentStep}/{totalSteps}".
18
+ */
19
+ label?: string;
20
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
21
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Stepper/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC"}
@@ -22,6 +22,7 @@ export * from './SideBar';
22
22
  export * from './Skeleton';
23
23
  export * from './Spinner';
24
24
  export * from './Spot';
25
+ export * from './Stepper';
25
26
  export * from './Subheader';
26
27
  export * from './Switch';
27
28
  export * from './Table';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
@@ -1,123 +1,147 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { createContext as N, useMemo as O, use as P } from "react";
3
- import { clsx as q } from "clsx";
4
- import { twMerge as z } from "tailwind-merge";
5
- function J(l) {
6
- return l ? l.split(/[-_ ]+/).map((n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join("") : "";
1
+ import { jsx as P } from "react/jsx-runtime";
2
+ import { createContext as W, useMemo as O, use as j } from "react";
3
+ import { clsx as k } from "clsx";
4
+ import { twMerge as N } from "tailwind-merge";
5
+ function H(l) {
6
+ return l ? l.split(/[-_ ]+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join("") : "";
7
7
  }
8
- const E = 48, F = 17, R = 2;
9
- function K(l) {
10
- const n = l.replace(/\D/g, "").length;
8
+ const q = 48, z = 17, E = 2;
9
+ function J(l) {
10
+ const t = l.replace(/\D/g, "").length;
11
11
  return Math.max(
12
- F,
13
- E - n * R
12
+ z,
13
+ q - t * E
14
14
  );
15
15
  }
16
- function C(l, n = !0) {
16
+ function C(l, t = !0) {
17
17
  if (!l) return "";
18
- const f = l.includes("."), [s, u] = l.split("."), i = s.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
19
- return f && n ? u ? `${i}.${u}` : `${i}.` : i;
18
+ const o = l.includes("."), [m, r] = l.split("."), s = m.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
19
+ return o && t ? r ? `${s}.${r}` : `${s}.` : s;
20
20
  }
21
- function U(l, n = {}) {
21
+ function K(l, t = {}) {
22
22
  const {
23
- allowDecimals: f = !0,
24
- thousandsSeparator: s = !0,
25
- maxIntegerLength: u = 9,
26
- maxDecimalLength: i = 9
27
- } = n, t = l.replace(",", ".").replace(/[^\d.]/g, "");
28
- let e = t;
29
- if (e = e.replace(/^0+(?=\d)/, ""), !f)
30
- return e = e.replace(/\D/g, ""), u > 0 && e.length > u && (e = e.slice(0, u)), s ? C(e) : e;
23
+ allowDecimals: o = !0,
24
+ thousandsSeparator: m = !0,
25
+ maxIntegerLength: r = 9,
26
+ maxDecimalLength: s = 9
27
+ } = t, n = l.replace(",", ".").replace(/[^\d.]/g, "");
28
+ let e = n;
29
+ if (e = e.replace(/^0+(?=\d)/, ""), !o)
30
+ return e = e.replace(/\D/g, ""), r > 0 && e.length > r && (e = e.slice(0, r)), m ? C(e) : e;
31
31
  e === "." && (e = "0.");
32
32
  const c = e.indexOf(".");
33
33
  if (c !== -1) {
34
- let o = e.slice(0, c), a = e.slice(c + 1).replace(/\./g, "");
35
- u > 0 && o.length > u && (o = o.slice(0, u)), a = a.slice(0, i), o === "" && (o = "0");
36
- const g = t.endsWith(".") || e.endsWith(".");
37
- e = a.length > 0 ? `${o}.${a}` : g ? `${o}.` : o;
34
+ let a = e.slice(0, c), i = e.slice(c + 1).replace(/\./g, "");
35
+ r > 0 && a.length > r && (a = a.slice(0, r)), i = i.slice(0, s), a === "" && (a = "0");
36
+ const h = n.endsWith(".") || e.endsWith(".");
37
+ e = i.length > 0 ? `${a}.${i}` : h ? `${a}.` : a;
38
38
  } else
39
- u > 0 && e.length > u && (e = e.slice(0, u));
40
- return s ? C(e) : e;
39
+ r > 0 && e.length > r && (e = e.slice(0, r));
40
+ return m ? C(e) : e;
41
41
  }
42
- function V(l, n) {
43
- const f = N(n), s = ({ children: i, value: t }) => {
42
+ function U(l, t) {
43
+ const o = W(t), m = ({ children: s, value: n }) => {
44
44
  const e = O(
45
- () => t,
46
- Object.values(t ?? {})
45
+ () => n,
46
+ Object.values(n ?? {})
47
47
  );
48
- return /* @__PURE__ */ y(f, { value: e, children: i });
48
+ return /* @__PURE__ */ P(o, { value: e, children: s });
49
49
  };
50
- s.displayName = l + "Provider";
51
- function u({
52
- consumerName: i,
53
- contextRequired: t
50
+ m.displayName = l + "Provider";
51
+ function r({
52
+ consumerName: s,
53
+ contextRequired: n
54
54
  }) {
55
- const e = P(f);
55
+ const e = j(o);
56
56
  if (e)
57
57
  return e;
58
- if (t)
58
+ if (n)
59
59
  throw new Error(
60
- `${i} must be used within ${l}`
60
+ `${s} must be used within ${l}`
61
61
  );
62
- return n || {};
62
+ return t || {};
63
63
  }
64
- return [s, u];
64
+ return [m, r];
65
65
  }
66
- function _(...l) {
67
- return z(q(l));
66
+ function V(...l) {
67
+ return N(k(l));
68
68
  }
69
- function A(l, n, f = {}) {
70
- const { leading: s = !1, trailing: u = !0, maxWait: i } = f;
71
- let t = null, e = null, c = null, o = 0, a = null, g = null, h;
72
- const x = i !== void 0, D = x ? Math.max(i, n) : 0, T = (r) => {
73
- o = r;
74
- const m = a, p = g;
75
- return a = null, g = null, h = l.apply(p, m), h;
76
- }, b = (r) => {
77
- const m = c ? r - c : 0;
78
- return n - m;
79
- }, $ = (r) => {
80
- const m = c ? r - c : n, p = r - o;
81
- return c === null || m >= n || m < 0 || x && p >= D;
82
- }, v = (r) => (t = null, u && a ? T(r) : (a = null, g = null, h)), d = () => {
83
- const r = Date.now();
84
- if ($(r)) {
85
- v(r);
69
+ const _ = ({
70
+ currentStep: l,
71
+ totalSteps: t,
72
+ size: o,
73
+ label: m,
74
+ strokeWidth: r = 4,
75
+ arcPercentage: s = 0.75
76
+ }) => {
77
+ const n = Math.min(Math.max(l, 0), t), e = m ?? `${n}/${t}`, c = t <= 0 ? 0 : n / t, a = (o - r) / 2, i = o / 2, h = o / 2, f = 2 * Math.PI * a, g = f * s, D = g * (1 - c), d = n <= 0, M = `${g} ${f}`, T = d ? g - 2 : D;
78
+ return {
79
+ displayLabel: e,
80
+ progress: c,
81
+ r: a,
82
+ cx: i,
83
+ cy: h,
84
+ circumference: f,
85
+ trackArcLength: g,
86
+ trackDashArray: `${g} ${f}`,
87
+ progressDashArray: M,
88
+ progressDashOffset: T,
89
+ showMinimalDot: d
90
+ };
91
+ };
92
+ function F(l, t, o = {}) {
93
+ const { leading: m = !1, trailing: r = !0, maxWait: s } = o;
94
+ let n = null, e = null, c = null, a = 0, i = null, h = null, f;
95
+ const g = s !== void 0, D = g ? Math.max(s, t) : 0, d = (u) => {
96
+ a = u;
97
+ const p = i, $ = h;
98
+ return i = null, h = null, f = l.apply($, p), f;
99
+ }, M = (u) => {
100
+ const p = c ? u - c : 0;
101
+ return t - p;
102
+ }, T = (u) => {
103
+ const p = c ? u - c : t, $ = u - a;
104
+ return c === null || p >= t || p < 0 || g && $ >= D;
105
+ }, y = (u) => (n = null, r && i ? d(u) : (i = null, h = null, f)), x = () => {
106
+ const u = Date.now();
107
+ if (T(u)) {
108
+ y(u);
86
109
  return;
87
110
  }
88
- t = setTimeout(d, b(r));
89
- }, L = () => {
90
- const r = Date.now();
91
- e = null, a && (T(r), t !== null && (clearTimeout(t), t = setTimeout(d, n)));
92
- }, M = (r) => (o = r, t = setTimeout(d, n), x && (e = setTimeout(L, D)), s ? T(r) : h), S = () => {
93
- t !== null && clearTimeout(t), e !== null && clearTimeout(e), o = 0, a = null, g = null, c = null, t = null, e = null;
94
- }, W = () => t === null && e === null ? h : v(Date.now()), j = () => t !== null || e !== null, w = function(...r) {
95
- const m = Date.now(), p = $(m);
96
- if (a = r, g = this, c = m, p) {
97
- if (t === null)
98
- return M(m);
99
- if (x)
100
- return clearTimeout(t), t = setTimeout(d, n), T(m);
111
+ n = setTimeout(x, M(u));
112
+ }, b = () => {
113
+ const u = Date.now();
114
+ e = null, i && (d(u), n !== null && (clearTimeout(n), n = setTimeout(x, t)));
115
+ }, L = (u) => (a = u, n = setTimeout(x, t), g && (e = setTimeout(b, D)), m ? d(u) : f), S = () => {
116
+ n !== null && clearTimeout(n), e !== null && clearTimeout(e), a = 0, i = null, h = null, c = null, n = null, e = null;
117
+ }, v = () => n === null && e === null ? f : y(Date.now()), A = () => n !== null || e !== null, w = function(...u) {
118
+ const p = Date.now(), $ = T(p);
119
+ if (i = u, h = this, c = p, $) {
120
+ if (n === null)
121
+ return L(p);
122
+ if (g)
123
+ return clearTimeout(n), n = setTimeout(x, t), d(p);
101
124
  }
102
- return t === null && (t = setTimeout(d, n)), h;
125
+ return n === null && (n = setTimeout(x, t)), f;
103
126
  };
104
- return w.cancel = S, w.flush = W, w.pending = j, w;
127
+ return w.cancel = S, w.flush = v, w.pending = A, w;
105
128
  }
106
- function k(l, n, f = {}) {
107
- const { leading: s = !0, trailing: u = !0 } = f;
108
- return A(l, n, {
109
- leading: s,
110
- trailing: u,
111
- maxWait: n
129
+ function Q(l, t, o = {}) {
130
+ const { leading: m = !0, trailing: r = !0 } = o;
131
+ return F(l, t, {
132
+ leading: m,
133
+ trailing: r,
134
+ maxWait: t
112
135
  });
113
136
  }
114
137
  export {
115
- _ as cn,
116
- V as createSafeContext,
117
- A as debounce,
138
+ V as cn,
139
+ U as createSafeContext,
140
+ F as debounce,
118
141
  C as formatThousands,
119
- K as getFontSize,
120
- U as textFormatter,
121
- k as throttle,
122
- J as toPascalCase
142
+ J as getFontSize,
143
+ _ as getStepperCalculations,
144
+ K as textFormatter,
145
+ Q as throttle,
146
+ H as toPascalCase
123
147
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.0.81",
3
+ "version": "0.0.82",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  ]
42
42
  },
43
43
  "dependencies": {
44
- "@ledgerhq/lumen-utils-shared": "0.0.18",
44
+ "@ledgerhq/lumen-utils-shared": "0.0.19",
45
45
  "i18next": "^23.7.0",
46
46
  "react-i18next": "^14.0.0"
47
47
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.0.82",
3
+ "version": "0.0.83",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [