@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.
- package/dist/index.js +108 -109
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +117 -78
- package/dist/lib/Components/AmountDisplay/index.d.ts +1 -1
- package/dist/lib/Components/AmountDisplay/index.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/types.d.ts +16 -3
- package/dist/lib/Components/AmountDisplay/types.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.js +127 -77
- package/dist/lib/Components/AmountInput/types.d.ts +12 -0
- package/dist/lib/Components/AmountInput/types.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.d.ts +1 -1
- package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +47 -60
- package/dist/lib/Components/Button/BaseButton.d.ts +2 -2
- package/dist/lib/Components/Button/Button.js +10 -10
- package/dist/lib/Components/Card/Card.js +12 -12
- package/dist/lib/Components/DataTable/DataTable.js +2 -2
- package/dist/lib/Components/Divider/Divider.js +4 -4
- package/dist/lib/Components/DotCount/DotCount.js +4 -4
- package/dist/lib/Components/DotIcon/DotIcon.d.ts +3 -2
- package/dist/lib/Components/DotIcon/DotIcon.d.ts.map +1 -1
- package/dist/lib/Components/DotIcon/DotIcon.js +55 -40
- package/dist/lib/Components/DotIcon/types.d.ts +7 -1
- package/dist/lib/Components/DotIcon/types.d.ts.map +1 -1
- package/dist/lib/Components/DotIndicator/DotIndicator.js +14 -14
- package/dist/lib/Components/DotIndicator/types.d.ts +2 -2
- package/dist/lib/Components/DotSymbol/DotSymbol.d.ts +1 -1
- package/dist/lib/Components/DotSymbol/DotSymbol.d.ts.map +1 -1
- package/dist/lib/Components/DotSymbol/DotSymbol.js +50 -35
- package/dist/lib/Components/DotSymbol/types.d.ts +7 -1
- package/dist/lib/Components/DotSymbol/types.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.js +4 -4
- package/dist/lib/Components/Icon/createIcon.js +4 -4
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +4 -4
- package/dist/lib/Components/Link/Link.js +6 -6
- package/dist/lib/Components/ListItem/ListItem.js +3 -3
- package/dist/lib/Components/MediaButton/MediaButton.d.ts +3 -3
- package/dist/lib/Components/MediaButton/MediaButton.d.ts.map +1 -1
- package/dist/lib/Components/MediaButton/MediaButton.js +44 -42
- package/dist/lib/Components/MediaButton/types.d.ts +5 -5
- package/dist/lib/Components/MediaButton/types.d.ts.map +1 -1
- package/dist/lib/Components/MediaImage/MediaImage.d.ts +1 -1
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
- package/dist/lib/Components/MediaImage/MediaImage.js +45 -32
- package/dist/lib/Components/MediaImage/types.d.ts +7 -1
- package/dist/lib/Components/MediaImage/types.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.d.ts +11 -16
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +186 -125
- package/dist/lib/Components/Menu/types.d.ts +50 -145
- package/dist/lib/Components/Menu/types.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/CoinCapsule.d.ts +2 -2
- package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/CoinCapsule.js +1 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts +4 -4
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.js +34 -26
- package/dist/lib/Components/NavBar/types.d.ts +2 -2
- package/dist/lib/Components/NavBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Popover/Popover.d.ts +2 -2
- package/dist/lib/Components/Popover/Popover.js +6 -6
- package/dist/lib/Components/Popover/types.d.ts +6 -3
- package/dist/lib/Components/Popover/types.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +9 -9
- package/dist/lib/Components/Skeleton/Skeleton.js +4 -4
- package/dist/lib/Components/Table/Table.js +1 -1
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +3 -3
- package/dist/lib/Symbols/Icons/Lightbulb.js +3 -3
- package/dist/libs/utils-shared/dist/index.js +107 -107
- package/dist/node_modules/@base-ui/react/esm/composite/item/CompositeItem.js +30 -0
- package/dist/node_modules/@base-ui/react/esm/composite/item/useCompositeItem.js +34 -0
- package/dist/node_modules/@base-ui/react/esm/context-menu/root/ContextMenuRootContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js +10 -10
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js +97 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +10 -10
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +2 -2
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +31 -20
- package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItem.js +78 -0
- package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItemDataAttributes.js +6 -0
- package/dist/node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +44 -0
- package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroup.js +28 -0
- package/dist/node_modules/@base-ui/react/esm/menu/group/MenuGroupContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/menu/group-label/MenuGroupLabel.js +29 -0
- package/dist/node_modules/@base-ui/react/esm/menu/item/MenuItem.js +47 -0
- package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItem.js +50 -0
- package/dist/node_modules/@base-ui/react/esm/menu/item/useMenuItemCommonProps.js +49 -0
- package/dist/node_modules/@base-ui/react/esm/menu/popup/MenuPopup.js +89 -0
- package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortal.js +24 -0
- package/dist/node_modules/@base-ui/react/esm/menu/portal/MenuPortalContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js +174 -0
- package/dist/node_modules/@base-ui/react/esm/menu/positioner/MenuPositionerContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroup.js +45 -0
- package/dist/node_modules/@base-ui/react/esm/menu/radio-group/MenuRadioGroupContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItem.js +75 -0
- package/dist/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItemContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +44 -0
- package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js +271 -0
- package/dist/node_modules/@base-ui/react/esm/menu/root/MenuRootContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/menu/store/MenuStore.js +109 -0
- package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRoot.js +21 -0
- package/dist/node_modules/@base-ui/react/esm/menu/submenu-root/MenuSubmenuRootContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +101 -0
- package/dist/node_modules/@base-ui/react/esm/menu/trigger/MenuTrigger.js +207 -0
- package/dist/node_modules/@base-ui/react/esm/menu/utils/findRootOwnerId.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/menu/utils/stateAttributesMapping.js +15 -0
- package/dist/node_modules/@base-ui/react/esm/menubar/MenubarContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js +11 -11
- package/dist/node_modules/@base-ui/react/esm/popover/store/PopoverStore.js +7 -7
- package/dist/node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js +11 -11
- package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -10
- package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +11 -8
- package/dist/node_modules/@base-ui/react/esm/utils/useMixedToggleClickHandler.js +25 -0
- package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +7 -8
- package/dist/node_modules/@base-ui/utils/esm/fastHooks.js +43 -0
- package/dist/node_modules/@base-ui/utils/esm/store/useStore.js +54 -13
- package/dist/package.json +4 -5
- package/package.json +4 -5
|
@@ -1,126 +1,176 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useDisabledContext as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { useRef as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as T, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useDisabledContext as j, useMergedRef as k, getFontSize as G, cn as h, textFormatter as H } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as c } from "class-variance-authority";
|
|
4
|
+
import { useRef as g, useState as D, useMemo as Y, useCallback as F, useLayoutEffect as O, useEffect as v } from "react";
|
|
5
|
+
const L = 33, z = 8, q = 24, B = 16, J = {
|
|
6
|
+
md: q,
|
|
7
|
+
sm: B
|
|
8
|
+
}, Q = (m, p, e) => {
|
|
9
|
+
const i = m === "" ? L : z;
|
|
10
|
+
return p ? i : i + J[e];
|
|
11
|
+
}, Z = c(
|
|
6
12
|
[
|
|
7
|
-
"bg-transparent
|
|
13
|
+
"bg-transparent caret-active outline-hidden transition-colors",
|
|
8
14
|
"text-base placeholder:text-muted-subtle",
|
|
9
15
|
"disabled:cursor-not-allowed disabled:bg-base-transparent disabled:text-disabled",
|
|
10
16
|
"aria-invalid:text-error",
|
|
11
|
-
"[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
|
|
12
|
-
"h-56"
|
|
17
|
+
"[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
|
|
13
18
|
],
|
|
14
19
|
{
|
|
15
20
|
variants: {
|
|
21
|
+
size: {
|
|
22
|
+
md: "heading-0-semi-bold h-56",
|
|
23
|
+
sm: "heading-2-semi-bold h-36"
|
|
24
|
+
},
|
|
16
25
|
isChanging: {
|
|
17
26
|
true: "animate-translate-from-right",
|
|
18
27
|
false: ""
|
|
19
28
|
}
|
|
20
29
|
},
|
|
21
30
|
defaultVariants: {
|
|
31
|
+
size: "md",
|
|
22
32
|
isChanging: !1
|
|
23
33
|
}
|
|
24
34
|
}
|
|
25
|
-
),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
), x = c(
|
|
36
|
+
[
|
|
37
|
+
"cursor-text text-base",
|
|
38
|
+
"group-has-[input:placeholder-shown]:text-muted-subtle",
|
|
39
|
+
"group-has-[input:disabled]:cursor-not-allowed group-has-[input:disabled]:text-disabled",
|
|
40
|
+
'group-has-[input[aria-invalid="true"]]:text-error'
|
|
41
|
+
],
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
size: {
|
|
45
|
+
md: "heading-0-semi-bold",
|
|
46
|
+
sm: "heading-2-semi-bold"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
size: "md"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
), $ = c("invisible absolute whitespace-pre", {
|
|
54
|
+
variants: {
|
|
55
|
+
size: {
|
|
56
|
+
md: "heading-0-semi-bold",
|
|
57
|
+
sm: "heading-2-semi-bold"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: {
|
|
61
|
+
size: "md"
|
|
62
|
+
}
|
|
63
|
+
}), K = c(
|
|
64
|
+
"group relative flex w-full items-center overflow-visible transition-transform",
|
|
65
|
+
{
|
|
66
|
+
variants: {
|
|
67
|
+
align: {
|
|
68
|
+
center: "justify-center",
|
|
69
|
+
start: "justify-start",
|
|
70
|
+
end: "justify-end"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
align: "center"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
), st = ({
|
|
78
|
+
ref: m,
|
|
79
|
+
className: p,
|
|
80
|
+
size: e = "md",
|
|
81
|
+
align: i = "center",
|
|
82
|
+
currencyText: a,
|
|
83
|
+
currencyPosition: b = "left",
|
|
84
|
+
disabled: w,
|
|
85
|
+
maxIntegerLength: C = 9,
|
|
86
|
+
maxDecimalLength: R = 9,
|
|
87
|
+
allowDecimals: S = !0,
|
|
88
|
+
thousandsSeparator: P = !0,
|
|
89
|
+
value: f,
|
|
90
|
+
onChange: y,
|
|
91
|
+
...W
|
|
44
92
|
}) => {
|
|
45
|
-
const
|
|
93
|
+
const A = j({
|
|
46
94
|
consumerName: "AmountInput",
|
|
47
|
-
mergeWith: { disabled:
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
q(() => {
|
|
58
|
-
if (c.current && s.current) {
|
|
59
|
-
const t = c.current.offsetWidth, e = n === "" ? 33 : 8;
|
|
60
|
-
s.current.style.width = `${t + e}px`;
|
|
95
|
+
mergeWith: { disabled: w }
|
|
96
|
+
}), r = g(null), o = g(null), E = k(m, o), [s, I] = D(f.toString()), [M, N] = D(!1), _ = g(s), U = Y(
|
|
97
|
+
() => G(s, e) + "px",
|
|
98
|
+
[s, e]
|
|
99
|
+
), l = F(() => {
|
|
100
|
+
if (r.current && o.current) {
|
|
101
|
+
const t = Math.ceil(
|
|
102
|
+
Math.max(r.current.scrollWidth, r.current.offsetWidth)
|
|
103
|
+
), n = Q(s, a, e);
|
|
104
|
+
o.current.style.width = `${t + n}px`;
|
|
61
105
|
}
|
|
62
|
-
}, [
|
|
63
|
-
|
|
64
|
-
|
|
106
|
+
}, [s, a, e]);
|
|
107
|
+
O(l, [l]), v(() => {
|
|
108
|
+
const t = r.current;
|
|
109
|
+
if (!t) return;
|
|
110
|
+
const n = new ResizeObserver(l);
|
|
111
|
+
return n.observe(t), () => n.disconnect();
|
|
112
|
+
}, [l]), v(() => {
|
|
113
|
+
I(f.toString());
|
|
114
|
+
}, [f]);
|
|
65
115
|
const V = (t) => {
|
|
66
|
-
const
|
|
67
|
-
allowDecimals:
|
|
68
|
-
thousandsSeparator:
|
|
69
|
-
maxIntegerLength:
|
|
70
|
-
maxDecimalLength:
|
|
116
|
+
const n = H(t.target.value, {
|
|
117
|
+
allowDecimals: S,
|
|
118
|
+
thousandsSeparator: P,
|
|
119
|
+
maxIntegerLength: C,
|
|
120
|
+
maxDecimalLength: R
|
|
71
121
|
});
|
|
72
|
-
|
|
73
|
-
};
|
|
74
|
-
return /* @__PURE__ */
|
|
122
|
+
I(n), y({ ...t, target: { ...t.target, value: n } }), n !== _.current && N(!0), _.current = n;
|
|
123
|
+
}, d = { fontSize: U, letterSpacing: "normal" };
|
|
124
|
+
return /* @__PURE__ */ T(
|
|
75
125
|
"div",
|
|
76
126
|
{
|
|
77
|
-
className:
|
|
127
|
+
className: K({ align: i }),
|
|
78
128
|
onPointerDown: () => {
|
|
79
|
-
const t =
|
|
129
|
+
const t = o.current;
|
|
80
130
|
t && window.requestAnimationFrame(() => {
|
|
81
131
|
t.focus();
|
|
82
132
|
});
|
|
83
133
|
},
|
|
84
134
|
children: [
|
|
85
|
-
|
|
135
|
+
a && b === "left" && /* @__PURE__ */ u(
|
|
86
136
|
"span",
|
|
87
137
|
{
|
|
88
|
-
className:
|
|
89
|
-
style:
|
|
90
|
-
children:
|
|
138
|
+
className: h(x({ size: e }), "shrink-0"),
|
|
139
|
+
style: d,
|
|
140
|
+
children: a
|
|
91
141
|
}
|
|
92
142
|
),
|
|
93
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ u(
|
|
94
144
|
"span",
|
|
95
145
|
{
|
|
96
|
-
ref:
|
|
97
|
-
className:
|
|
146
|
+
ref: r,
|
|
147
|
+
className: $({ size: e }),
|
|
98
148
|
"aria-hidden": "true",
|
|
99
|
-
style:
|
|
100
|
-
children:
|
|
149
|
+
style: d,
|
|
150
|
+
children: s
|
|
101
151
|
}
|
|
102
152
|
),
|
|
103
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ u(
|
|
104
154
|
"input",
|
|
105
155
|
{
|
|
106
|
-
ref:
|
|
156
|
+
ref: E,
|
|
107
157
|
type: "text",
|
|
108
158
|
inputMode: "decimal",
|
|
109
|
-
disabled:
|
|
110
|
-
value:
|
|
159
|
+
disabled: A,
|
|
160
|
+
value: s,
|
|
111
161
|
onChange: V,
|
|
112
|
-
onAnimationEnd: () =>
|
|
113
|
-
className:
|
|
114
|
-
...
|
|
115
|
-
style:
|
|
162
|
+
onAnimationEnd: () => N(!1),
|
|
163
|
+
className: h(Z({ size: e, isChanging: M }), p),
|
|
164
|
+
...W,
|
|
165
|
+
style: d
|
|
116
166
|
}
|
|
117
167
|
),
|
|
118
|
-
|
|
168
|
+
a && b === "right" && /* @__PURE__ */ u(
|
|
119
169
|
"span",
|
|
120
170
|
{
|
|
121
|
-
className:
|
|
122
|
-
style:
|
|
123
|
-
children:
|
|
171
|
+
className: h(x({ size: e }), "shrink-0"),
|
|
172
|
+
style: d,
|
|
173
|
+
children: a
|
|
124
174
|
}
|
|
125
175
|
)
|
|
126
176
|
]
|
|
@@ -128,5 +178,5 @@ const Y = M(
|
|
|
128
178
|
);
|
|
129
179
|
};
|
|
130
180
|
export {
|
|
131
|
-
|
|
181
|
+
st as AmountInput
|
|
132
182
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent, ComponentPropsWithRef } from 'react';
|
|
2
|
+
export type AmountInputSize = 'md' | 'sm';
|
|
3
|
+
export type AmountInputAlign = 'center' | 'start' | 'end';
|
|
2
4
|
export type AmountInputProps = {
|
|
3
5
|
/**
|
|
4
6
|
* The controlled value of the input
|
|
@@ -10,6 +12,16 @@ export type AmountInputProps = {
|
|
|
10
12
|
* @required
|
|
11
13
|
*/
|
|
12
14
|
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Visual size of the amount input.
|
|
17
|
+
* @default 'md'
|
|
18
|
+
*/
|
|
19
|
+
size?: AmountInputSize;
|
|
20
|
+
/**
|
|
21
|
+
* Horizontal alignment of the amount and currency.
|
|
22
|
+
* @default 'center'
|
|
23
|
+
*/
|
|
24
|
+
align?: AmountInputAlign;
|
|
13
25
|
/**
|
|
14
26
|
* The currency text (e.g. USD, EUR)
|
|
15
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,IAAI,CACN,qBAAqB,CAAC,OAAO,CAAC,EAC9B,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CACzC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,IAAI,CACN,qBAAqB,CAAC,OAAO,CAAC,EAC9B,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CACzC,CAAC"}
|
|
@@ -15,5 +15,5 @@ import { AvatarProps } from './types';
|
|
|
15
15
|
* // With notification indicator
|
|
16
16
|
* <Avatar src="https://example.com/photo.jpg" showNotification />
|
|
17
17
|
*/
|
|
18
|
-
export declare const Avatar: ({ ref, className, src, alt, size, imgLoading, showNotification, ...props }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const Avatar: ({ ref, className, src, alt, size, imgLoading, showNotification: showNotificationProp, ...props }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Avatar/Avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAqC3C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,GAAI,kGASpB,WAAW,4CAuDb,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cva as
|
|
3
|
-
import { useState as g, useEffect as
|
|
4
|
-
import { useCommonTranslation as
|
|
5
|
-
import { User as
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cva as h } from "class-variance-authority";
|
|
3
|
+
import { useState as g, useEffect as z } from "react";
|
|
4
|
+
import { useCommonTranslation as x } from "../../../i18n/useCommonTranslation.js";
|
|
5
|
+
import { User as A } from "../../Symbols/Icons/User.js";
|
|
6
|
+
import { DotIndicator as N } from "../DotIndicator/DotIndicator.js";
|
|
7
|
+
const j = {
|
|
8
|
+
root: h(
|
|
8
9
|
"relative inline-flex items-center justify-center rounded-full bg-muted-transparent transition-colors",
|
|
9
10
|
{
|
|
10
11
|
variants: {
|
|
@@ -19,73 +20,59 @@ const n = {
|
|
|
19
20
|
size: "md"
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
variants: {
|
|
25
|
-
size: {
|
|
26
|
-
sm: "size-10",
|
|
27
|
-
md: "size-12",
|
|
28
|
-
lg: "size-14",
|
|
29
|
-
xl: "size-16"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
}, A = {
|
|
23
|
+
)
|
|
24
|
+
}, k = {
|
|
34
25
|
sm: 16,
|
|
35
26
|
md: 24,
|
|
36
27
|
lg: 32,
|
|
37
28
|
xl: 40
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
}, w = {
|
|
30
|
+
sm: "lg",
|
|
31
|
+
md: "xl"
|
|
32
|
+
}, V = ({
|
|
33
|
+
ref: l,
|
|
34
|
+
className: m,
|
|
35
|
+
src: o,
|
|
42
36
|
alt: c,
|
|
43
37
|
size: a = "md",
|
|
44
|
-
imgLoading:
|
|
45
|
-
showNotification:
|
|
38
|
+
imgLoading: d,
|
|
39
|
+
showNotification: f = !1,
|
|
46
40
|
...u
|
|
47
41
|
}) => {
|
|
48
|
-
const { t:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, [
|
|
42
|
+
const { t: r } = x(), [p, e] = g(!1), v = !o || p, i = c || r("components.avatar.defaultAlt"), n = f && (a === "sm" || a === "md"), b = n ? `${i}, ${r("components.avatar.notificationAriaLabel")}` : i;
|
|
43
|
+
z(() => {
|
|
44
|
+
e(!1);
|
|
45
|
+
}, [o]);
|
|
46
|
+
const s = /* @__PURE__ */ t(
|
|
52
47
|
"div",
|
|
53
48
|
{
|
|
54
|
-
ref:
|
|
55
|
-
className:
|
|
49
|
+
ref: l,
|
|
50
|
+
className: j.root({ size: a, className: m }),
|
|
56
51
|
role: "img",
|
|
57
|
-
"aria-label":
|
|
52
|
+
"aria-label": b,
|
|
58
53
|
...u,
|
|
59
|
-
children:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
src: e,
|
|
78
|
-
alt: "",
|
|
79
|
-
loading: f,
|
|
80
|
-
onError: () => i(!0),
|
|
81
|
-
className: "size-full overflow-hidden rounded-full object-cover",
|
|
82
|
-
"aria-hidden": "true"
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
]
|
|
54
|
+
children: v ? /* @__PURE__ */ t(
|
|
55
|
+
A,
|
|
56
|
+
{
|
|
57
|
+
size: k[a],
|
|
58
|
+
"aria-label": "Fallback Icon",
|
|
59
|
+
"aria-hidden": "true"
|
|
60
|
+
}
|
|
61
|
+
) : /* @__PURE__ */ t(
|
|
62
|
+
"img",
|
|
63
|
+
{
|
|
64
|
+
src: o,
|
|
65
|
+
alt: "",
|
|
66
|
+
loading: d,
|
|
67
|
+
onError: () => e(!0),
|
|
68
|
+
className: "size-full overflow-hidden rounded-full object-cover",
|
|
69
|
+
"aria-hidden": "true"
|
|
70
|
+
}
|
|
71
|
+
)
|
|
86
72
|
}
|
|
87
73
|
);
|
|
74
|
+
return n ? /* @__PURE__ */ t(N, { size: w[a], appearance: "red", children: s }) : s;
|
|
88
75
|
};
|
|
89
76
|
export {
|
|
90
|
-
|
|
77
|
+
V as Avatar
|
|
91
78
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseButtonProps } from './types';
|
|
2
2
|
export declare const baseButtonVariants: (props?: ({
|
|
3
|
-
appearance?: "base" | "gray" | "accent" | "transparent" | "no-background" |
|
|
3
|
+
appearance?: "base" | "red" | "gray" | "accent" | "transparent" | "no-background" | null | undefined;
|
|
4
4
|
disabled?: boolean | null | undefined;
|
|
5
5
|
loading?: boolean | null | undefined;
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "md" | "sm" | "lg" | "xs" | null | undefined;
|
|
7
7
|
isFull?: boolean | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
export declare const BaseButton: ({ ref, className, appearance, size, isFull, disabled: disabledProp, asChild, icon: Icon, loading, children, onClick, ...props }: BaseButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { cva as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as d } from "class-variance-authority";
|
|
4
4
|
import { BaseButton as b } from "./BaseButton.js";
|
|
5
|
-
const l =
|
|
5
|
+
const l = d("", {
|
|
6
6
|
variants: {
|
|
7
7
|
size: {
|
|
8
8
|
sm: "px-16 py-10 body-2-semi-bold",
|
|
@@ -16,21 +16,21 @@ const l = e("", {
|
|
|
16
16
|
}), x = ({
|
|
17
17
|
ref: t,
|
|
18
18
|
className: m,
|
|
19
|
-
loading:
|
|
20
|
-
disabled:
|
|
19
|
+
loading: s,
|
|
20
|
+
disabled: r,
|
|
21
21
|
children: a,
|
|
22
22
|
size: o,
|
|
23
23
|
icon: i,
|
|
24
24
|
...p
|
|
25
|
-
}) => /* @__PURE__ */
|
|
25
|
+
}) => /* @__PURE__ */ e(
|
|
26
26
|
b,
|
|
27
27
|
{
|
|
28
28
|
ref: t,
|
|
29
29
|
size: o,
|
|
30
|
-
disabled:
|
|
30
|
+
disabled: r,
|
|
31
31
|
icon: i,
|
|
32
|
-
loading:
|
|
33
|
-
className:
|
|
32
|
+
loading: s,
|
|
33
|
+
className: n(l({ size: o }), "gap-8", m),
|
|
34
34
|
...p,
|
|
35
35
|
children: a
|
|
36
36
|
}
|
|
@@ -144,7 +144,7 @@ const k = ({
|
|
|
144
144
|
]
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
|
-
},
|
|
147
|
+
}, z = ({
|
|
148
148
|
ref: t,
|
|
149
149
|
children: a,
|
|
150
150
|
className: r,
|
|
@@ -157,7 +157,7 @@ const k = ({
|
|
|
157
157
|
...e,
|
|
158
158
|
children: a
|
|
159
159
|
}
|
|
160
|
-
),
|
|
160
|
+
), V = ({
|
|
161
161
|
ref: t,
|
|
162
162
|
children: a,
|
|
163
163
|
className: r,
|
|
@@ -226,7 +226,7 @@ const k = ({
|
|
|
226
226
|
children: a
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
|
-
},
|
|
229
|
+
}, L = ({
|
|
230
230
|
ref: t,
|
|
231
231
|
children: a,
|
|
232
232
|
className: r,
|
|
@@ -249,7 +249,7 @@ const k = ({
|
|
|
249
249
|
children: a
|
|
250
250
|
}
|
|
251
251
|
);
|
|
252
|
-
},
|
|
252
|
+
}, M = ({
|
|
253
253
|
ref: t,
|
|
254
254
|
children: a,
|
|
255
255
|
className: r,
|
|
@@ -272,7 +272,7 @@ const k = ({
|
|
|
272
272
|
children: a
|
|
273
273
|
}
|
|
274
274
|
) });
|
|
275
|
-
},
|
|
275
|
+
}, S = ({
|
|
276
276
|
ref: t,
|
|
277
277
|
children: a,
|
|
278
278
|
className: r,
|
|
@@ -304,7 +304,7 @@ const k = ({
|
|
|
304
304
|
) })
|
|
305
305
|
}
|
|
306
306
|
);
|
|
307
|
-
},
|
|
307
|
+
}, U = ({
|
|
308
308
|
ref: t,
|
|
309
309
|
children: a,
|
|
310
310
|
className: r,
|
|
@@ -320,14 +320,14 @@ const k = ({
|
|
|
320
320
|
);
|
|
321
321
|
export {
|
|
322
322
|
P as Card,
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
V as CardContent,
|
|
324
|
+
L as CardContentDescription,
|
|
325
325
|
B as CardContentRow,
|
|
326
326
|
I as CardContentTitle,
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
S as CardFooter,
|
|
328
|
+
U as CardFooterActions,
|
|
329
329
|
T as CardHeader,
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
z as CardLeading,
|
|
331
|
+
M as CardTrailing,
|
|
332
332
|
k as resolveCardInnerContext
|
|
333
333
|
};
|
|
@@ -97,7 +97,7 @@ const [M, u] = w("DataTableContext"), Q = ({
|
|
|
97
97
|
children: [
|
|
98
98
|
/* @__PURE__ */ d(k, { children: [
|
|
99
99
|
!i && /* @__PURE__ */ a(j, {}),
|
|
100
|
-
s ? /* @__PURE__ */ a(
|
|
100
|
+
s ? /* @__PURE__ */ a(z, {}) : /* @__PURE__ */ a(P, {})
|
|
101
101
|
] }),
|
|
102
102
|
t === "infinite-scroll" && /* @__PURE__ */ a(y, {})
|
|
103
103
|
]
|
|
@@ -117,7 +117,7 @@ const [M, u] = w("DataTableContext"), Q = ({
|
|
|
117
117
|
(!e || e.key !== i) && (e = { key: i, rows: [], count: 0 }, o.push(e)), e.rows.push(t), e.count++;
|
|
118
118
|
}
|
|
119
119
|
return o;
|
|
120
|
-
},
|
|
120
|
+
}, z = ({
|
|
121
121
|
className: l,
|
|
122
122
|
ref: n,
|
|
123
123
|
...o
|
|
@@ -2,9 +2,9 @@ import { jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn as a } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
const d = ({
|
|
4
4
|
ref: o,
|
|
5
|
-
className:
|
|
5
|
+
className: e,
|
|
6
6
|
orientation: r = "horizontal",
|
|
7
|
-
...
|
|
7
|
+
...t
|
|
8
8
|
}) => /* @__PURE__ */ l(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
@@ -14,9 +14,9 @@ const d = ({
|
|
|
14
14
|
className: a(
|
|
15
15
|
"border-muted-subtle",
|
|
16
16
|
r === "horizontal" ? "w-full border-t" : "h-full border-l",
|
|
17
|
-
|
|
17
|
+
e
|
|
18
18
|
),
|
|
19
|
-
...
|
|
19
|
+
...t
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
export {
|
|
@@ -57,10 +57,10 @@ function y({
|
|
|
57
57
|
ref: f,
|
|
58
58
|
...u
|
|
59
59
|
}) {
|
|
60
|
-
const
|
|
60
|
+
const d = g({
|
|
61
61
|
consumerName: "DotCount",
|
|
62
62
|
mergeWith: { disabled: c }
|
|
63
|
-
}),
|
|
63
|
+
}), r = Math.max(1, Math.min(b, 99)), o = !!i;
|
|
64
64
|
return /* @__PURE__ */ x(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
@@ -75,10 +75,10 @@ function y({
|
|
|
75
75
|
"aria-label": n,
|
|
76
76
|
"aria-hidden": !n || void 0,
|
|
77
77
|
className: a(
|
|
78
|
-
h({ size: t, appearance: s, disabled:
|
|
78
|
+
h({ size: t, appearance: s, disabled: d }),
|
|
79
79
|
o && "absolute top-0 right-0 z-1"
|
|
80
80
|
),
|
|
81
|
-
children: e > 0 && /* @__PURE__ */ l("span", { className: a(v({ size: t, appearance: s, disabled:
|
|
81
|
+
children: e > 0 && /* @__PURE__ */ l("span", { className: a(v({ size: t, appearance: s, disabled: d })), children: e <= r ? e : `${r}+` })
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
84
|
i
|
|
@@ -5,12 +5,13 @@ export declare const mediaImageDotIconSizeMap: {
|
|
|
5
5
|
readonly 48: 20;
|
|
6
6
|
readonly 56: 24;
|
|
7
7
|
readonly 64: 24;
|
|
8
|
+
readonly 72: 32;
|
|
8
9
|
};
|
|
9
10
|
export declare const spotDotIconSizeMap: {
|
|
10
11
|
readonly 40: 16;
|
|
11
12
|
readonly 48: 20;
|
|
12
13
|
readonly 56: 24;
|
|
13
|
-
readonly 72:
|
|
14
|
+
readonly 72: 32;
|
|
14
15
|
};
|
|
15
16
|
export declare const dotIconSizeMap: Record<DotIconSize, IconSize>;
|
|
16
17
|
/**
|
|
@@ -26,7 +27,7 @@ export declare const dotIconSizeMap: Record<DotIconSize, IconSize>;
|
|
|
26
27
|
* </DotIcon>
|
|
27
28
|
*/
|
|
28
29
|
export declare const DotIcon: {
|
|
29
|
-
({ children, icon: Icon, appearance, pin, size, shape, className, ref, ...rest }: DotIconProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
({ children, icon: Icon, appearance, pin, size, shape, className, disabled: disabledProp, ref, ...rest }: DotIconProps): import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
displayName: string;
|
|
31
32
|
};
|
|
32
33
|
//# sourceMappingURL=DotIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DotIcon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotIcon/DotIcon.tsx"],"names":[],"mappings":"
|
|
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;AA+CrE,eAAO,MAAM,wBAAwB;;;;;;CAMW,CAAC;AAEjD,eAAO,MAAM,kBAAkB;;;;;CAKiB,CAAC;AAEjD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAKxD,CAAC;AAgBF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;8GAWjB,YAAY;;CAwBd,CAAC"}
|