@ledgerhq/lumen-ui-react 0.1.61 → 0.1.62
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 +79 -62
- package/dist/lib/Components/core/AmountInput/AmountInput.js +16 -16
- package/dist/lib/Components/core/AmountInput/useAmountInputValue/useAmountInputValue.js +3 -3
- package/dist/lib/Components/core/Avatar/resolveAvatarColor.js +2 -2
- package/dist/lib/Components/core/AvatarButton/AvatarButton.js +6 -6
- package/dist/lib/Components/core/Banner/Banner.js +8 -8
- package/dist/lib/Components/core/Button/Button.js +10 -10
- package/dist/lib/Components/core/Card/Card.js +6 -6
- package/dist/lib/Components/core/CardButton/CardButton.d.ts +2 -0
- package/dist/lib/Components/core/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/core/CardButton/CardButton.js +4 -4
- package/dist/lib/Components/core/DataTable/DataTable.js +7 -7
- package/dist/lib/Components/core/Divider/Divider.js +8 -8
- package/dist/lib/Components/core/DotCount/DotCount.js +3 -3
- package/dist/lib/Components/core/DotIcon/DotIcon.js +9 -9
- package/dist/lib/Components/core/DotSymbol/DotSymbol.js +16 -16
- package/dist/lib/Components/core/Link/Link.d.ts +1 -1
- package/dist/lib/Components/core/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/core/Link/Link.js +21 -20
- package/dist/lib/Components/core/Link/types.d.ts +1 -1
- package/dist/lib/Components/core/Link/types.d.ts.map +1 -1
- package/dist/lib/Components/core/ListItem/ListItem.js +4 -4
- package/dist/lib/Components/core/MediaBanner/MediaBanner.js +19 -19
- package/dist/lib/Components/core/MediaButton/MediaButton.js +2 -2
- package/dist/lib/Components/core/Menu/Menu.js +30 -30
- package/dist/lib/Components/core/NavBar/CoinCapsule.js +8 -8
- package/dist/lib/Components/core/Pagination/Pagination.js +14 -14
- package/dist/lib/Components/core/Popover/Popover.js +6 -6
- package/dist/lib/Components/core/SearchInput/SearchInput.js +5 -5
- package/dist/lib/Components/core/SegmentedControl/SegmentedControl.js +19 -19
- package/dist/lib/Components/core/Select/Select.js +8 -8
- package/dist/lib/Components/core/SideBar/SideBar.js +14 -14
- package/dist/lib/Components/core/Spinner/Spinner.js +4 -4
- package/dist/lib/Components/core/Spot/Spot.js +9 -9
- package/dist/lib/Components/core/Stepper/Stepper.d.ts +4 -3
- package/dist/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/core/Stepper/Stepper.js +137 -65
- package/dist/lib/Components/core/Stepper/types.d.ts +12 -2
- package/dist/lib/Components/core/Stepper/types.d.ts.map +1 -1
- package/dist/lib/Components/core/Switch/Switch.js +5 -5
- package/dist/lib/Components/core/Table/Table.js +9 -9
- package/dist/lib/Components/core/TileButton/TileButton.js +8 -8
- package/dist/lib/Components/core/Timeline/Timeline.d.ts +54 -0
- package/dist/lib/Components/core/Timeline/Timeline.d.ts.map +1 -0
- package/dist/lib/Components/core/Timeline/Timeline.js +228 -0
- package/dist/lib/Components/core/Timeline/index.d.ts +3 -0
- package/dist/lib/Components/core/Timeline/index.d.ts.map +1 -0
- package/dist/lib/Components/core/Timeline/types.d.ts +148 -0
- package/dist/lib/Components/core/Timeline/types.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/Toast.d.ts +25 -0
- package/dist/lib/Components/core/Toast/Toast.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/Toast.js +68 -0
- package/dist/lib/Components/core/Toast/Toaster.d.ts +27 -0
- package/dist/lib/Components/core/Toast/Toaster.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/Toaster.js +92 -0
- package/dist/lib/Components/core/Toast/hooks/useToastCollapse.d.ts +15 -0
- package/dist/lib/Components/core/Toast/hooks/useToastCollapse.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/hooks/useToastCollapse.js +15 -0
- package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.d.ts +24 -0
- package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.js +27 -0
- package/dist/lib/Components/core/Toast/index.d.ts +5 -0
- package/dist/lib/Components/core/Toast/index.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/styles.d.ts +20 -0
- package/dist/lib/Components/core/Toast/styles.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/styles.js +77 -0
- package/dist/lib/Components/core/Toast/types.d.ts +81 -0
- package/dist/lib/Components/core/Toast/types.d.ts.map +1 -0
- package/dist/lib/Components/core/Trend/Trend.js +2 -2
- package/dist/lib/Components/core/index.d.ts +2 -0
- package/dist/lib/Components/core/index.d.ts.map +1 -1
- package/dist/lib/Components/internal/BaseButton/BaseButton.js +2 -2
- package/dist/lib/Components/internal/BaseInput/BaseInput.js +9 -9
- package/dist/lib/Components/internal/BaseInput/BaseInputMultiline.js +12 -12
- package/dist/lib/Components/internal/BaseTag/BaseTag.js +8 -8
- package/dist/lib/Components/symbols/Icon/Icon.js +4 -4
- package/dist/lib/Components/symbols/Icon/createIcon.js +8 -8
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +6 -6
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.js +2 -2
- package/dist/lib/Components/visualization/Legend/Legend.js +8 -8
- package/dist/libs/utils-shared/dist/index.js +306 -141
- package/dist/package.json +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useState as s, useRef as i } from "react";
|
|
2
|
+
const f = () => {
|
|
3
|
+
const [u, t] = s(!1), [a, e] = s(!1), r = i(!1), o = () => {
|
|
4
|
+
r.current = !1;
|
|
5
|
+
};
|
|
6
|
+
return {
|
|
7
|
+
paused: u || a,
|
|
8
|
+
viewportProps: {
|
|
9
|
+
onMouseEnter: () => t(!0),
|
|
10
|
+
onMouseLeave: () => t(!1),
|
|
11
|
+
onPointerDown: () => {
|
|
12
|
+
r.current = !0, e(!1);
|
|
13
|
+
},
|
|
14
|
+
onPointerUp: o,
|
|
15
|
+
onPointerCancel: o,
|
|
16
|
+
onFocus: () => {
|
|
17
|
+
r.current || e(!0);
|
|
18
|
+
},
|
|
19
|
+
onBlur: (n) => {
|
|
20
|
+
n.currentTarget.contains(n.relatedTarget) || e(!1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
f as useToastViewportPause
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const toastVariants: (props?: ({
|
|
2
|
+
hasLeading?: boolean | null | undefined;
|
|
3
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
|
+
export declare const positionVariants: (props?: ({
|
|
5
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export declare const collapseVariants: (props?: ({
|
|
8
|
+
edge?: "bottom" | "top" | null | undefined;
|
|
9
|
+
exiting?: boolean | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
export declare const slideEnterVariants: (props?: ({
|
|
12
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
13
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
|
+
export declare const queuedEnterVariants: (props?: ({
|
|
15
|
+
edge?: "bottom" | "top" | null | undefined;
|
|
16
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
17
|
+
export declare const slideExitVariants: (props?: ({
|
|
18
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
19
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
20
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Toast/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;8EAUzB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;8EAc5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;8EAc5B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;8EAW7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;8EAO9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;8EAW5B,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cva as t } from "class-variance-authority";
|
|
2
|
+
const o = t(
|
|
3
|
+
"flex min-h-56 w-full items-start gap-8 rounded-md bg-interactive py-8 pr-10 text-on-interactive",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
hasLeading: {
|
|
7
|
+
true: "pl-12",
|
|
8
|
+
false: "pl-16"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
), i = t(
|
|
13
|
+
"pointer-events-none fixed inset-x-24 z-toast flex",
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
position: {
|
|
17
|
+
"top-left": "top-24 flex-col items-start",
|
|
18
|
+
"top-center": "top-24 flex-col items-center",
|
|
19
|
+
"top-right": "top-24 flex-col items-end",
|
|
20
|
+
"bottom-left": "bottom-24 flex-col-reverse items-start",
|
|
21
|
+
"bottom-center": "bottom-24 flex-col-reverse items-center",
|
|
22
|
+
"bottom-right": "bottom-24 flex-col-reverse items-end"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
), n = t(
|
|
27
|
+
"pointer-events-auto flex w-full max-w-400 flex-col transition-[height] duration-300 ease-out",
|
|
28
|
+
{
|
|
29
|
+
variants: {
|
|
30
|
+
edge: {
|
|
31
|
+
top: "justify-start",
|
|
32
|
+
bottom: "justify-end"
|
|
33
|
+
},
|
|
34
|
+
exiting: {
|
|
35
|
+
true: "z-0",
|
|
36
|
+
false: "z-10"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
), a = t("", {
|
|
41
|
+
variants: {
|
|
42
|
+
position: {
|
|
43
|
+
"top-left": "animate-slide-in-from-left",
|
|
44
|
+
"top-center": "animate-slide-in-from-top",
|
|
45
|
+
"top-right": "animate-slide-in-from-right",
|
|
46
|
+
"bottom-left": "animate-slide-in-from-left",
|
|
47
|
+
"bottom-center": "animate-slide-in-from-bottom",
|
|
48
|
+
"bottom-right": "animate-slide-in-from-right"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}), s = t("", {
|
|
52
|
+
variants: {
|
|
53
|
+
edge: {
|
|
54
|
+
top: "animate-slide-in-from-bottom",
|
|
55
|
+
bottom: "animate-slide-in-from-top"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}), r = t("", {
|
|
59
|
+
variants: {
|
|
60
|
+
position: {
|
|
61
|
+
"top-left": "animate-slide-out-to-left",
|
|
62
|
+
"top-center": "animate-slide-out-to-top",
|
|
63
|
+
"top-right": "animate-slide-out-to-right",
|
|
64
|
+
"bottom-left": "animate-slide-out-to-left",
|
|
65
|
+
"bottom-center": "animate-slide-out-to-bottom",
|
|
66
|
+
"bottom-right": "animate-slide-out-to-right"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
n as collapseVariants,
|
|
72
|
+
i as positionVariants,
|
|
73
|
+
s as queuedEnterVariants,
|
|
74
|
+
a as slideEnterVariants,
|
|
75
|
+
r as slideExitVariants,
|
|
76
|
+
o as toastVariants
|
|
77
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ToastAction, ToastAppearance } from '@ledgerhq/lumen-utils-shared';
|
|
2
|
+
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
export type { ToastAction, ToastAppearance, ToastController, ToastItem, ToastNotifyOptions, ToastPromiseOptions, ToastPromiseState, ToastUpdateOptions, } from '@ledgerhq/lumen-utils-shared';
|
|
4
|
+
/**
|
|
5
|
+
* Corner or edge the queue is anchored to. Items enter from the same edge.
|
|
6
|
+
*/
|
|
7
|
+
export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
8
|
+
/**
|
|
9
|
+
* Props for the presentational `Toast` item.
|
|
10
|
+
*/
|
|
11
|
+
export type ToastProps = {
|
|
12
|
+
/**
|
|
13
|
+
* The status of the toast, driving the leading icon.
|
|
14
|
+
* @default info
|
|
15
|
+
*/
|
|
16
|
+
appearance?: ToastAppearance;
|
|
17
|
+
/**
|
|
18
|
+
* Replaces the leading status icon with a spinner.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The main text. Wraps over up to five lines, then truncates.
|
|
24
|
+
* @required
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
/**
|
|
28
|
+
* Optional trailing action button. Pressing it does not dismiss the toast.
|
|
29
|
+
* It wraps onto its own row, aligned with the title, when it cannot share
|
|
30
|
+
* the title's row.
|
|
31
|
+
*/
|
|
32
|
+
action?: ToastAction;
|
|
33
|
+
/**
|
|
34
|
+
* Optional close handler. When provided, a close button is rendered, pinned
|
|
35
|
+
* to the top right whatever the title and action wrap to.
|
|
36
|
+
*/
|
|
37
|
+
onClose?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Accessible label for the close button.
|
|
40
|
+
*/
|
|
41
|
+
closeAriaLabel?: string;
|
|
42
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'title'>;
|
|
43
|
+
/**
|
|
44
|
+
* Distance from each viewport edge, in px, replacing the default gap on that
|
|
45
|
+
* edge — e.g. the height of a sticky composer plus some breathing room.
|
|
46
|
+
* `top` and `bottom` apply only to the edge matching `position`; the other is
|
|
47
|
+
* ignored. Unset edges keep the default gap.
|
|
48
|
+
*/
|
|
49
|
+
export type ToastInsets = {
|
|
50
|
+
top?: number;
|
|
51
|
+
left?: number;
|
|
52
|
+
bottom?: number;
|
|
53
|
+
right?: number;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Props for `Toaster`.
|
|
57
|
+
*/
|
|
58
|
+
export type ToasterProps = {
|
|
59
|
+
/**
|
|
60
|
+
* Maximum number of toasts visible at once. Must be a positive integer.
|
|
61
|
+
* Extra items wait in a FIFO backlog and appear as visible slots free up.
|
|
62
|
+
* @default 3
|
|
63
|
+
*/
|
|
64
|
+
maxItems?: number;
|
|
65
|
+
/**
|
|
66
|
+
* The corner or edge the queue is anchored to.
|
|
67
|
+
* @default bottom-right
|
|
68
|
+
*/
|
|
69
|
+
position?: ToastPosition;
|
|
70
|
+
/**
|
|
71
|
+
* Per-edge distance from the viewport edge, overriding the default gap, so
|
|
72
|
+
* the queue stays clear of fixed UI such as a composer or a bottom bar.
|
|
73
|
+
* @default {}
|
|
74
|
+
*/
|
|
75
|
+
insets?: ToastInsets;
|
|
76
|
+
/**
|
|
77
|
+
* Per-appearance duration overrides, layered over the Lumen status defaults.
|
|
78
|
+
*/
|
|
79
|
+
durations?: Partial<Record<ToastAppearance, number>>;
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,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,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -40,7 +40,7 @@ const T = f("inline-flex items-center", {
|
|
|
40
40
|
negative: v,
|
|
41
41
|
neutral: null
|
|
42
42
|
};
|
|
43
|
-
function
|
|
43
|
+
function L({
|
|
44
44
|
value: e,
|
|
45
45
|
size: t = "md",
|
|
46
46
|
disabled: r = !1,
|
|
@@ -67,5 +67,5 @@ function M({
|
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
L as Trend
|
|
71
71
|
};
|
|
@@ -47,6 +47,8 @@ export * from './Tag';
|
|
|
47
47
|
export * from './TextInput';
|
|
48
48
|
export * from './Tile';
|
|
49
49
|
export * from './TileButton';
|
|
50
|
+
export * from './Timeline';
|
|
51
|
+
export * from './Toast';
|
|
50
52
|
export * from './Tooltip';
|
|
51
53
|
export * from './Trend';
|
|
52
54
|
export * from './ThemeProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,Q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
123
|
};
|
|
124
124
|
export {
|
|
125
|
-
|
|
125
|
+
M as BaseButton,
|
|
126
126
|
N as baseButtonVariants
|
|
127
127
|
};
|
|
@@ -79,33 +79,33 @@ const ue = O(
|
|
|
79
79
|
currentValue: z,
|
|
80
80
|
hasContent: M,
|
|
81
81
|
handleChange: T,
|
|
82
|
-
handleClear:
|
|
82
|
+
handleClear: X
|
|
83
83
|
} = ie({
|
|
84
84
|
value: i.value,
|
|
85
85
|
defaultValue: i.defaultValue,
|
|
86
86
|
onChange: R,
|
|
87
87
|
onClear: j,
|
|
88
88
|
ref: w
|
|
89
|
-
}),
|
|
89
|
+
}), E = ee(), c = x || `input-${E}`, G = D ?? (n === "error" ? !0 : void 0), { inputPlaceholder: J, labelStaysFloatedWithPlaceholder: K } = _({
|
|
90
90
|
label: t,
|
|
91
91
|
placeholder: S
|
|
92
|
-
}),
|
|
92
|
+
}), Q = M && !h && !m && !F, U = z.length, p = !!(r && r > 0), g = `${c}-helper`, o = !!l, b = {
|
|
93
93
|
id: c,
|
|
94
94
|
disabled: h,
|
|
95
95
|
readOnly: m,
|
|
96
|
-
placeholder:
|
|
97
|
-
"aria-invalid":
|
|
96
|
+
placeholder: J,
|
|
97
|
+
"aria-invalid": G,
|
|
98
98
|
"aria-describedby": o ? g : void 0,
|
|
99
99
|
hasLabel: !!t,
|
|
100
100
|
className: L,
|
|
101
101
|
onChange: T
|
|
102
|
-
}, u =
|
|
102
|
+
}, u = Q ? /* @__PURE__ */ e(
|
|
103
103
|
le,
|
|
104
104
|
{
|
|
105
105
|
iconType: "filled",
|
|
106
106
|
icon: ce,
|
|
107
107
|
size: 20,
|
|
108
|
-
onClick:
|
|
108
|
+
onClick: X,
|
|
109
109
|
"aria-label": k("components.baseInput.clearInputAriaLabel")
|
|
110
110
|
}
|
|
111
111
|
) : N;
|
|
@@ -156,7 +156,7 @@ const ue = O(
|
|
|
156
156
|
{
|
|
157
157
|
htmlFor: c,
|
|
158
158
|
status: n,
|
|
159
|
-
floated:
|
|
159
|
+
floated: K,
|
|
160
160
|
multiline: s,
|
|
161
161
|
className: V,
|
|
162
162
|
children: t
|
|
@@ -182,7 +182,7 @@ const ue = O(
|
|
|
182
182
|
status: n
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
p && r != null && /* @__PURE__ */ e(te, { count:
|
|
185
|
+
p && r != null && /* @__PURE__ */ e(te, { count: U, maxCount: r })
|
|
186
186
|
]
|
|
187
187
|
}
|
|
188
188
|
)
|
|
@@ -25,11 +25,11 @@ const c = x(
|
|
|
25
25
|
scrollbarWidth: "auto"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
), R = (s,
|
|
28
|
+
), R = (s, a) => {
|
|
29
29
|
const t = v(!1), o = (e) => {
|
|
30
|
-
const
|
|
31
|
-
t.current = !n &&
|
|
32
|
-
`) &&
|
|
30
|
+
const r = e.target, n = "isComposing" in e.nativeEvent && e.nativeEvent.isComposing === !0;
|
|
31
|
+
t.current = !n && r.value.endsWith(`
|
|
32
|
+
`) && r.selectionStart === r.value.length, a?.(e);
|
|
33
33
|
};
|
|
34
34
|
return w(() => {
|
|
35
35
|
if (!t.current) return;
|
|
@@ -37,13 +37,13 @@ const c = x(
|
|
|
37
37
|
const e = s.current;
|
|
38
38
|
!e || document.activeElement !== e || (e.scrollTop = e.scrollHeight);
|
|
39
39
|
}), o;
|
|
40
|
-
},
|
|
40
|
+
}, z = ({
|
|
41
41
|
ref: s,
|
|
42
|
-
className:
|
|
42
|
+
className: a,
|
|
43
43
|
hasLabel: t = !1,
|
|
44
44
|
minLines: o = 1,
|
|
45
45
|
maxLines: e,
|
|
46
|
-
scrollbarWidth:
|
|
46
|
+
scrollbarWidth: r = "auto",
|
|
47
47
|
onChange: n,
|
|
48
48
|
...d
|
|
49
49
|
}) => {
|
|
@@ -59,9 +59,9 @@ const c = x(
|
|
|
59
59
|
rows: o,
|
|
60
60
|
className: u(
|
|
61
61
|
"peer",
|
|
62
|
-
c({ hasLabel: t, scrollbarWidth:
|
|
62
|
+
c({ hasLabel: t, scrollbarWidth: r }),
|
|
63
63
|
t && "mt-16",
|
|
64
|
-
|
|
64
|
+
a
|
|
65
65
|
),
|
|
66
66
|
onChange: h,
|
|
67
67
|
...d
|
|
@@ -75,8 +75,8 @@ const c = x(
|
|
|
75
75
|
readOnly: !0,
|
|
76
76
|
tabIndex: -1,
|
|
77
77
|
className: u(
|
|
78
|
-
c({ hasLabel: t, scrollbarWidth:
|
|
79
|
-
|
|
78
|
+
c({ hasLabel: t, scrollbarWidth: r }),
|
|
79
|
+
a,
|
|
80
80
|
"invisible absolute top-0 left-0 h-0 transform-gpu overflow-hidden py-0"
|
|
81
81
|
)
|
|
82
82
|
}
|
|
@@ -84,5 +84,5 @@ const c = x(
|
|
|
84
84
|
] });
|
|
85
85
|
};
|
|
86
86
|
export {
|
|
87
|
-
|
|
87
|
+
z as BaseInputMultiline
|
|
88
88
|
};
|
|
@@ -41,8 +41,8 @@ const u = x(
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
), z = ({
|
|
44
|
-
ref:
|
|
45
|
-
className:
|
|
44
|
+
ref: e,
|
|
45
|
+
className: a,
|
|
46
46
|
appearance: t,
|
|
47
47
|
size: s,
|
|
48
48
|
variant: r,
|
|
@@ -50,9 +50,9 @@ const u = x(
|
|
|
50
50
|
label: i,
|
|
51
51
|
disabled: c,
|
|
52
52
|
leadingContent: d,
|
|
53
|
-
...
|
|
53
|
+
...b
|
|
54
54
|
}) => {
|
|
55
|
-
const
|
|
55
|
+
const l = g({
|
|
56
56
|
consumerName: n,
|
|
57
57
|
mergeWith: { disabled: c }
|
|
58
58
|
});
|
|
@@ -60,11 +60,11 @@ const u = x(
|
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
className: o(
|
|
63
|
-
u({ appearance: t, size: s, variant: r, disabled: !!
|
|
64
|
-
|
|
63
|
+
u({ appearance: t, size: s, variant: r, disabled: !!l }),
|
|
64
|
+
a
|
|
65
65
|
),
|
|
66
|
-
ref:
|
|
67
|
-
...
|
|
66
|
+
ref: e,
|
|
67
|
+
...b,
|
|
68
68
|
children: [
|
|
69
69
|
d,
|
|
70
70
|
/* @__PURE__ */ m("span", { className: "truncate", children: i })
|
|
@@ -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:
|
|
26
|
-
xmlns:
|
|
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:
|
|
35
|
-
viewBox:
|
|
34
|
+
xmlns: r,
|
|
35
|
+
viewBox: e,
|
|
36
36
|
className: s(h({ size: n }), "inline-block", i),
|
|
37
37
|
...t
|
|
38
38
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useDisabledContext as c, cn as i } from "../../../../libs/utils-shared/dist/index.js";
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { Icon as
|
|
4
|
-
const x = (e,
|
|
5
|
-
const
|
|
2
|
+
import { createElement as p } from "react";
|
|
3
|
+
import { Icon as d } from "./Icon.js";
|
|
4
|
+
const x = (e, r) => {
|
|
5
|
+
const t = ({
|
|
6
6
|
ref: o,
|
|
7
7
|
className: s,
|
|
8
8
|
disabled: a,
|
|
@@ -12,15 +12,15 @@ const x = (e, t) => {
|
|
|
12
12
|
consumerName: e,
|
|
13
13
|
mergeWith: { disabled: a }
|
|
14
14
|
});
|
|
15
|
-
return
|
|
15
|
+
return p(d, {
|
|
16
16
|
ref: o,
|
|
17
17
|
className: i(s, n && "text-disabled"),
|
|
18
|
-
viewBox:
|
|
18
|
+
viewBox: r.props.viewBox,
|
|
19
19
|
...m,
|
|
20
|
-
children:
|
|
20
|
+
children: r.props.children
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return t.displayName = e, t;
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
26
|
x as default
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { cn as n } from "../../../../libs/utils-shared/dist/index.js";
|
|
3
|
-
const
|
|
4
|
-
ref:
|
|
5
|
-
className:
|
|
3
|
+
const i = ({
|
|
4
|
+
ref: e,
|
|
5
|
+
className: t,
|
|
6
6
|
...r
|
|
7
7
|
}) => /* @__PURE__ */ o(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
|
-
ref:
|
|
10
|
+
ref: e,
|
|
11
11
|
className: n(
|
|
12
12
|
"pointer-events-auto flex min-w-0 flex-col items-center",
|
|
13
|
-
|
|
13
|
+
t
|
|
14
14
|
),
|
|
15
15
|
...r
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
i as DonutChartCenter
|
|
20
20
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSafeContext as
|
|
2
|
-
const [o, r] =
|
|
1
|
+
import { createSafeContext as e } from "../../../../libs/utils-shared/dist/index.js";
|
|
2
|
+
const [o, r] = e("DonutChart", { size: "md" });
|
|
3
3
|
export {
|
|
4
4
|
o as DonutSizeProvider,
|
|
5
5
|
r as useDonutSizeContext
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
3
|
-
import { LegendItem as
|
|
2
|
+
import { cn as m } from "../../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { LegendItem as o } from "./LegendItem.js";
|
|
4
4
|
function i({
|
|
5
5
|
series: e,
|
|
6
|
-
ariaLabel:
|
|
7
|
-
className:
|
|
6
|
+
ariaLabel: l = "Legend",
|
|
7
|
+
className: a
|
|
8
8
|
}) {
|
|
9
9
|
return e.length === 0 ? null : /* @__PURE__ */ r(
|
|
10
10
|
"ul",
|
|
11
11
|
{
|
|
12
|
-
"aria-label":
|
|
13
|
-
className:
|
|
12
|
+
"aria-label": l,
|
|
13
|
+
className: m(
|
|
14
14
|
"m-0 flex list-none flex-wrap gap-x-16 gap-y-6 p-0",
|
|
15
|
-
|
|
15
|
+
a
|
|
16
16
|
),
|
|
17
|
-
children: e.map((n) => /* @__PURE__ */ r(
|
|
17
|
+
children: e.map((n) => /* @__PURE__ */ r(o, { item: n }, n.id))
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
}
|