@ledgerhq/lumen-ui-react 0.1.61 → 0.1.63
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.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -63
- package/dist/lib/Components/core/AddressInput/AddressInput.js +1 -1
- package/dist/lib/Components/core/AmountDisplay/AmountDisplay.js +1 -1
- package/dist/lib/Components/core/AmountInput/AmountInput.js +17 -17
- package/dist/lib/Components/core/AmountInput/useAmountInputValue/useAmountInputValue.js +3 -3
- package/dist/lib/Components/core/Avatar/Avatar.js +7 -7
- package/dist/lib/Components/core/Avatar/resolveAvatarColor.js +2 -2
- package/dist/lib/Components/core/AvatarButton/AvatarButton.js +2 -2
- package/dist/lib/Components/core/Banner/Banner.js +9 -9
- package/dist/lib/Components/core/Button/Button.js +4 -4
- package/dist/lib/Components/core/Card/Card.js +15 -15
- 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/ContentBanner/ContentBanner.js +1 -1
- package/dist/lib/Components/core/DataTable/DataTable.js +42 -42
- package/dist/lib/Components/core/Dialog/DialogHeader/DialogHeader.js +1 -1
- package/dist/lib/Components/core/Divider/Divider.js +4 -4
- package/dist/lib/Components/core/DotCount/DotCount.js +3 -3
- package/dist/lib/Components/core/DotIcon/DotIcon.js +11 -11
- package/dist/lib/Components/core/DotSymbol/DotSymbol.js +7 -7
- 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 +25 -23
- 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 +8 -8
- package/dist/lib/Components/core/MediaBanner/MediaBanner.js +4 -4
- package/dist/lib/Components/core/MediaCard/MediaCard.js +1 -1
- package/dist/lib/Components/core/MediaImage/MediaImage.js +5 -5
- package/dist/lib/Components/core/Menu/Menu.js +25 -25
- package/dist/lib/Components/core/NavBar/CoinCapsule.js +4 -4
- package/dist/lib/Components/core/NavBar/NavBar.js +3 -3
- package/dist/lib/Components/core/PageIndicator/PageIndicator.js +5 -5
- package/dist/lib/Components/core/Pagination/Pagination.js +1 -1
- package/dist/lib/Components/core/Popover/Popover.js +13 -13
- package/dist/lib/Components/core/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/core/SegmentedControl/SegmentedControl.js +80 -84
- package/dist/lib/Components/core/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/core/Select/Select.js +108 -107
- package/dist/lib/Components/core/SideBar/SideBar.js +33 -33
- package/dist/lib/Components/core/Spinner/Spinner.js +1 -1
- package/dist/lib/Components/core/Spot/Spot.js +13 -13
- 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 -62
- 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/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/core/Subheader/Subheader.js +33 -29
- package/dist/lib/Components/core/Table/Table.js +10 -10
- package/dist/lib/Components/core/ThemeProvider/ThemeProvider.js +6 -6
- package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts +1 -1
- package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts.map +1 -1
- 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 +3 -3
- 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 +7 -7
- package/dist/lib/Components/internal/BaseInput/BaseInput.js +22 -22
- package/dist/lib/Components/internal/BaseInput/BaseInputMultiline.js +12 -12
- package/dist/lib/Components/internal/BaseInput/useAutosizeTextarea/useAutosizeTextarea.js +4 -4
- package/dist/lib/Components/internal/BaseTag/BaseTag.js +4 -4
- package/dist/lib/Components/symbols/Icon/createIcon.js +3 -3
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.js +36 -35
- package/dist/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
- package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -1
- package/dist/lib/Components/visualization/DonutChart/DonutChart.js +31 -31
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +2 -2
- package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -1
- package/dist/lib/Components/visualization/DonutChart/DonutRing.js +13 -12
- package/dist/lib/Components/visualization/DonutChart/types.d.ts +1 -1
- package/dist/lib/Components/visualization/Legend/Legend.d.ts +1 -1
- package/dist/lib/Components/visualization/Legend/Legend.d.ts.map +1 -1
- package/dist/lib/Components/visualization/Legend/Legend.js +6 -10
- package/dist/lib/Components/visualization/Legend/types.d.ts +2 -2
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts +1 -1
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -1
- package/dist/lib/Components/visualization/LineChart/LineChart.js +90 -84
- package/dist/lib/Components/visualization/LineChart/types.d.ts +1 -1
- package/dist/lib/Components/visualization/LineChart/utils.d.ts +2 -1
- package/dist/lib/Components/visualization/LineChart/utils.d.ts.map +1 -1
- package/dist/lib/Components/visualization/LineChart/utils.js +23 -22
- package/dist/lib/Components/visualization/config.d.ts +0 -3
- package/dist/lib/Components/visualization/config.d.ts.map +1 -1
- package/dist/lib/Components/visualization/config.js +3 -6
- package/dist/libs/utils-shared/dist/index.js +353 -140
- package/dist/package.json +4 -6
- package/dist/translations/index.d.ts +3 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/{i18n → translations}/languages.d.ts +0 -5
- package/dist/translations/languages.d.ts.map +1 -0
- package/dist/{i18n → translations}/languages.js +1 -2
- package/dist/{i18n → translations}/locales/en.json.d.ts +11 -0
- package/dist/{i18n → translations}/locales/en.json.js +2 -2
- package/dist/translations/translations.d.ts +727 -0
- package/dist/translations/translations.d.ts.map +1 -0
- package/dist/translations/translations.js +22 -0
- package/package.json +4 -6
- package/dist/_virtual/dynamic-import-helper.js +0 -9
- package/dist/i18n/I18nProvider.d.ts +0 -8
- package/dist/i18n/I18nProvider.d.ts.map +0 -1
- package/dist/i18n/I18nProvider.js +0 -14
- package/dist/i18n/i18n.d.ts +0 -12
- package/dist/i18n/i18n.d.ts.map +0 -1
- package/dist/i18n/i18n.js +0 -42
- package/dist/i18n/index.d.ts +0 -4
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/languages.d.ts.map +0 -1
- package/dist/i18n/useCommonTranslation.d.ts +0 -2
- package/dist/i18n/useCommonTranslation.d.ts.map +0 -1
- package/dist/i18n/useCommonTranslation.js +0 -6
- package/dist/node_modules/i18next/dist/esm/i18next.js +0 -1479
- package/dist/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -19
- package/dist/node_modules/react-i18next/dist/es/context.js +0 -17
- package/dist/node_modules/react-i18next/dist/es/defaults.js +0 -22
- package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +0 -8
- package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +0 -11
- package/dist/node_modules/react-i18next/dist/es/unescape.js +0 -25
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +0 -65
- package/dist/node_modules/react-i18next/dist/es/utils.js +0 -57
- /package/dist/{i18n → translations}/locales/de.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/de.json.js +0 -0
- /package/dist/{i18n → translations}/locales/es.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/es.json.js +0 -0
- /package/dist/{i18n → translations}/locales/fr.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/fr.json.js +0 -0
- /package/dist/{i18n → translations}/locales/ja.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/ja.json.js +0 -0
- /package/dist/{i18n → translations}/locales/ko.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/ko.json.js +0 -0
- /package/dist/{i18n → translations}/locales/pt.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/pt.json.js +0 -0
- /package/dist/{i18n → translations}/locales/ru.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/ru.json.js +0 -0
- /package/dist/{i18n → translations}/locales/th.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/th.json.js +0 -0
- /package/dist/{i18n → translations}/locales/tr.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/tr.json.js +0 -0
- /package/dist/{i18n → translations}/locales/zh.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/zh.json.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastCollapse.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/core/Toast/hooks/useToastCollapse.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpE,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7C,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QAAO,sBAgBnC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useRef as c, useState as u, useEffect as i } from "react";
|
|
2
|
+
const f = 8, d = () => {
|
|
3
|
+
const e = c(null), [s, r] = u(null);
|
|
4
|
+
return i(() => {
|
|
5
|
+
const t = e.current;
|
|
6
|
+
if (!t || typeof ResizeObserver > "u") return;
|
|
7
|
+
const n = new ResizeObserver(([o]) => {
|
|
8
|
+
r(o.contentRect.height + f);
|
|
9
|
+
});
|
|
10
|
+
return n.observe(t), () => n.disconnect();
|
|
11
|
+
}, []), { contentRef: e, height: s ?? void 0 };
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
d as useToastCollapse
|
|
15
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FocusEvent } from 'react';
|
|
2
|
+
type ToastViewportPauseProps = {
|
|
3
|
+
onMouseEnter: () => void;
|
|
4
|
+
onMouseLeave: () => void;
|
|
5
|
+
onPointerDown: () => void;
|
|
6
|
+
onPointerUp: () => void;
|
|
7
|
+
onPointerCancel: () => void;
|
|
8
|
+
onFocus: () => void;
|
|
9
|
+
onBlur: (event: FocusEvent<HTMLDivElement>) => void;
|
|
10
|
+
};
|
|
11
|
+
type UseToastViewportPauseReturn = {
|
|
12
|
+
paused: boolean;
|
|
13
|
+
viewportProps: ToastViewportPauseProps;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Pauses toast timers while the pointer rests on the viewport, or while
|
|
17
|
+
* keyboard focus is inside it. A pointer press does not count as focus, so
|
|
18
|
+
* clicking an action does not keep the toast open after the pointer leaves.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const useToastViewportPause: () => UseToastViewportPauseReturn;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=useToastViewportPause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastViewportPause.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/core/Toast/hooks/useToastViewportPause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1D,KAAK,uBAAuB,GAAG;IAC7B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,KAAK,2BAA2B,GAAG;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,uBAAuB,CAAC;CACxC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,QAAO,2BA8BxC,CAAC"}
|
|
@@ -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,eAAe,EAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,YAAY,EACV,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { useDisabledContext as u, cn as p } from "../../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as f } from "class-variance-authority";
|
|
4
|
-
import { useCommonTranslation as b } from "../../../../
|
|
4
|
+
import { useCommonTranslation as b } from "../../../../translations/translations.js";
|
|
5
5
|
import { TriangleDown as v } from "../../symbols/icons/TriangleDown.js";
|
|
6
6
|
import { TriangleUp as g } from "../../symbols/icons/TriangleUp.js";
|
|
7
7
|
function x(e) {
|
|
@@ -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 D({
|
|
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
|
+
D 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,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,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,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
|
|
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,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,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,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as x, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useDisabledContext as f, cn as h } from "../../../../libs/utils-shared/dist/index.js";
|
|
3
|
-
import { Slot as z, Slottable as
|
|
3
|
+
import { Slot as z, Slottable as N } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as l } from "class-variance-authority";
|
|
5
|
-
import { Spinner as
|
|
6
|
-
const
|
|
5
|
+
import { Spinner as S } from "../../core/Spinner/Spinner.js";
|
|
6
|
+
const B = l(
|
|
7
7
|
"inline-flex size-fit cursor-pointer items-center justify-center rounded-full transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -92,7 +92,7 @@ const N = l(
|
|
|
92
92
|
r ? z : "button",
|
|
93
93
|
{
|
|
94
94
|
className: h(
|
|
95
|
-
|
|
95
|
+
B({ disabled: e, loading: n, appearance: a, size: s, isFull: p }),
|
|
96
96
|
u
|
|
97
97
|
),
|
|
98
98
|
ref: c,
|
|
@@ -103,7 +103,7 @@ const N = l(
|
|
|
103
103
|
...m,
|
|
104
104
|
children: [
|
|
105
105
|
n && /* @__PURE__ */ t(
|
|
106
|
-
|
|
106
|
+
S,
|
|
107
107
|
{
|
|
108
108
|
size: d,
|
|
109
109
|
className: b({ appearance: a, disabled: e })
|
|
@@ -116,12 +116,12 @@ const N = l(
|
|
|
116
116
|
className: b({ appearance: a, disabled: e })
|
|
117
117
|
}
|
|
118
118
|
),
|
|
119
|
-
i && (r ? /* @__PURE__ */ t(
|
|
119
|
+
i && (r ? /* @__PURE__ */ t(N, { children: i }) : /* @__PURE__ */ t("span", { className: "line-clamp-2 text-left", children: i }))
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
);
|
|
123
123
|
};
|
|
124
124
|
export {
|
|
125
125
|
C as BaseButton,
|
|
126
|
-
|
|
126
|
+
B as baseButtonVariants
|
|
127
127
|
};
|
|
@@ -8,7 +8,7 @@ import { BaseInputLabel as re } from "./BaseInputLabel.js";
|
|
|
8
8
|
import { BaseInputMultiline as ne } from "./BaseInputMultiline.js";
|
|
9
9
|
import { BaseInputSingleLine as se } from "./BaseInputSingleLine.js";
|
|
10
10
|
import { useBaseInputValue as ie } from "./useBaseInputValue/useBaseInputValue.js";
|
|
11
|
-
import { useCommonTranslation as oe } from "../../../../
|
|
11
|
+
import { useCommonTranslation as oe } from "../../../../translations/translations.js";
|
|
12
12
|
import { InteractiveIcon as le } from "../../core/InteractiveIcon/InteractiveIcon.js";
|
|
13
13
|
import { DeleteCircleFill as ce } from "../../symbols/icons/DeleteCircleFill.js";
|
|
14
14
|
const ue = O(
|
|
@@ -43,22 +43,22 @@ const ue = O(
|
|
|
43
43
|
hasLabel: !1
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
),
|
|
46
|
+
), Ve = ({
|
|
47
47
|
ref: w,
|
|
48
48
|
className: B,
|
|
49
49
|
containerClassName: C,
|
|
50
50
|
inputClassName: L,
|
|
51
|
-
labelClassName:
|
|
51
|
+
labelClassName: N,
|
|
52
52
|
label: t,
|
|
53
|
-
id:
|
|
54
|
-
disabled:
|
|
53
|
+
id: V,
|
|
54
|
+
disabled: x,
|
|
55
55
|
helperText: l,
|
|
56
56
|
maxCount: r,
|
|
57
57
|
status: n,
|
|
58
|
-
suffix:
|
|
58
|
+
suffix: y,
|
|
59
59
|
prefix: P,
|
|
60
|
-
onClear:
|
|
61
|
-
hideClearButton:
|
|
60
|
+
onClear: F,
|
|
61
|
+
hideClearButton: j = !1,
|
|
62
62
|
readOnly: m = !1,
|
|
63
63
|
"aria-invalid": D,
|
|
64
64
|
onChange: R,
|
|
@@ -72,43 +72,43 @@ const ue = O(
|
|
|
72
72
|
}) => {
|
|
73
73
|
const h = Z({
|
|
74
74
|
consumerName: "BaseInput",
|
|
75
|
-
mergeWith: { disabled:
|
|
75
|
+
mergeWith: { disabled: x }
|
|
76
76
|
}), { t: k } = oe(), {
|
|
77
77
|
inputRef: q,
|
|
78
78
|
composedRef: f,
|
|
79
79
|
currentValue: z,
|
|
80
80
|
hasContent: M,
|
|
81
|
-
handleChange:
|
|
82
|
-
handleClear:
|
|
81
|
+
handleChange: Q,
|
|
82
|
+
handleClear: T
|
|
83
83
|
} = ie({
|
|
84
84
|
value: i.value,
|
|
85
85
|
defaultValue: i.defaultValue,
|
|
86
86
|
onChange: R,
|
|
87
|
-
onClear:
|
|
87
|
+
onClear: F,
|
|
88
88
|
ref: w
|
|
89
|
-
}),
|
|
89
|
+
}), E = ee(), c = V || `input-${E}`, G = D ?? (n === "error" ? !0 : void 0), { inputPlaceholder: J, labelStaysFloatedWithPlaceholder: K } = _({
|
|
90
90
|
label: t,
|
|
91
91
|
placeholder: S
|
|
92
|
-
}), U = M && !h && !m && !
|
|
92
|
+
}), U = M && !h && !m && !j, X = 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
|
-
onChange:
|
|
101
|
+
onChange: Q
|
|
102
102
|
}, u = U ? /* @__PURE__ */ e(
|
|
103
103
|
le,
|
|
104
104
|
{
|
|
105
105
|
iconType: "filled",
|
|
106
106
|
icon: ce,
|
|
107
107
|
size: 20,
|
|
108
|
-
onClick:
|
|
108
|
+
onClick: T,
|
|
109
109
|
"aria-label": k("components.baseInput.clearInputAriaLabel")
|
|
110
110
|
}
|
|
111
|
-
) :
|
|
111
|
+
) : y;
|
|
112
112
|
return /* @__PURE__ */ d("div", { className: B, children: [
|
|
113
113
|
/* @__PURE__ */ d(
|
|
114
114
|
"div",
|
|
@@ -156,9 +156,9 @@ const ue = O(
|
|
|
156
156
|
{
|
|
157
157
|
htmlFor: c,
|
|
158
158
|
status: n,
|
|
159
|
-
floated:
|
|
159
|
+
floated: K,
|
|
160
160
|
multiline: s,
|
|
161
|
-
className:
|
|
161
|
+
className: N,
|
|
162
162
|
children: t
|
|
163
163
|
}
|
|
164
164
|
),
|
|
@@ -189,5 +189,5 @@ const ue = O(
|
|
|
189
189
|
] });
|
|
190
190
|
};
|
|
191
191
|
export {
|
|
192
|
-
|
|
192
|
+
Ve as BaseInput
|
|
193
193
|
};
|
|
@@ -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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { debounce as
|
|
1
|
+
import { debounce as y } from "../../../../../libs/utils-shared/dist/index.js";
|
|
2
2
|
import { useRef as u, useCallback as g, useLayoutEffect as w } from "react";
|
|
3
3
|
const z = 166, p = "x", d = (o) => Number.parseInt(o, 10) || 0, O = ({
|
|
4
4
|
minLines: o,
|
|
@@ -16,9 +16,9 @@ const z = 166, p = "x", d = (o) => Number.parseInt(o, 10) || 0, O = ({
|
|
|
16
16
|
const f = e.scrollHeight;
|
|
17
17
|
let n = Math.max(o * f, b);
|
|
18
18
|
h && (n = Math.min(h * f, n)), n = Math.max(n, f);
|
|
19
|
-
const x = d(r.paddingTop) + d(r.paddingBottom), R = d(r.borderTopWidth) + d(r.borderBottomWidth),
|
|
19
|
+
const x = d(r.paddingTop) + d(r.paddingBottom), R = d(r.borderTopWidth) + d(r.borderBottomWidth), E = r.boxSizing === "border-box" ? x + R : 0;
|
|
20
20
|
return {
|
|
21
|
-
height: n +
|
|
21
|
+
height: n + E,
|
|
22
22
|
// A pixel of tolerance absorbs subpixel rounding.
|
|
23
23
|
fits: Math.abs(n - b) <= 1
|
|
24
24
|
};
|
|
@@ -32,7 +32,7 @@ const z = 166, p = "x", d = (o) => Number.parseInt(o, 10) || 0, O = ({
|
|
|
32
32
|
return w(a), w(() => {
|
|
33
33
|
const t = i.current;
|
|
34
34
|
if (!t) return;
|
|
35
|
-
const e =
|
|
35
|
+
const e = y(a, z);
|
|
36
36
|
window.addEventListener("resize", e);
|
|
37
37
|
let r;
|
|
38
38
|
return typeof ResizeObserver < "u" && (r = new ResizeObserver(() => {
|
|
@@ -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: !!
|
|
63
|
+
u({ appearance: t, size: s, variant: r, disabled: !!l }),
|
|
64
64
|
e
|
|
65
65
|
),
|
|
66
66
|
ref: a,
|
|
67
|
-
...
|
|
67
|
+
...b,
|
|
68
68
|
children: [
|
|
69
69
|
d,
|
|
70
70
|
/* @__PURE__ */ m("span", { className: "truncate", children: i })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useDisabledContext as c, cn as i } from "../../../../libs/utils-shared/dist/index.js";
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { Icon as
|
|
2
|
+
import { createElement as p } from "react";
|
|
3
|
+
import { Icon as d } from "./Icon.js";
|
|
4
4
|
const x = (e, t) => {
|
|
5
5
|
const r = ({
|
|
6
6
|
ref: o,
|
|
@@ -12,7 +12,7 @@ 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
18
|
viewBox: t.props.viewBox,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAuC,EACvC,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,OAAO,EAAE,WAAW,EACpB,eAAuB,EACvB,wBAAwB,EACxB,OAAc,EACd,YAAY,EACZ,QAAQ,GACT,EAAE,mBAAmB,2CAwGrB"}
|