@shmidko61/lc-ui-kit 0.12.0 → 0.15.0
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/README.md +65 -0
- package/dist/alert/alert.d.ts +5 -0
- package/dist/alert/helpers/alert.helpers.d.ts +27 -0
- package/dist/alert/helpers/index.d.ts +1 -0
- package/dist/alert/index.d.ts +2 -0
- package/dist/alert/types/alert.types.d.ts +25 -0
- package/dist/alert/types/index.d.ts +1 -0
- package/dist/alert-CTIWpkmD.js +128 -0
- package/dist/alert-DTc0Usg-.cjs +1 -0
- package/dist/alert.cjs +1 -0
- package/dist/alert.js +4 -0
- package/dist/box/box.d.ts +1 -1
- package/dist/box/box.types.d.ts +2 -2
- package/dist/box/helpers/box-animation.helpers.d.ts +8 -0
- package/dist/box/helpers/index.d.ts +1 -0
- package/dist/box/index.d.ts +1 -0
- package/dist/box/types/box-animation.types.d.ts +3 -0
- package/dist/box/types/index.d.ts +1 -0
- package/dist/box.cjs +1 -1
- package/dist/box.js +436 -312
- package/dist/button/button.helpers.d.ts +1 -1
- package/dist/button/index.d.ts +1 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +163 -156
- package/dist/flex/flex.d.ts +1 -1
- package/dist/flex/flex.types.d.ts +1 -1
- package/dist/flex/index.d.ts +1 -0
- package/dist/icons/icons.d.ts +8 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +40 -36
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +111 -92
- package/dist/input/input.types.d.ts +1 -1
- package/dist/loader/helpers/index.d.ts +1 -0
- package/dist/loader/helpers/loader.helpers.d.ts +2 -0
- package/dist/loader/index.d.ts +2 -0
- package/dist/loader/loader.d.ts +5 -0
- package/dist/loader/types/index.d.ts +1 -0
- package/dist/loader/types/loader.types.d.ts +28 -0
- package/dist/loader-Daam055i.js +104 -0
- package/dist/loader-ODTCTLKE.cjs +1 -0
- package/dist/loader.cjs +1 -0
- package/dist/loader.js +4 -0
- package/dist/media-gallery.cjs +1 -1
- package/dist/media-gallery.js +42 -30
- package/dist/notification-provider/helpers/index.d.ts +1 -0
- package/dist/notification-provider/helpers/notification-provider.helpers.d.ts +8 -0
- package/dist/notification-provider/hooks/index.d.ts +1 -0
- package/dist/notification-provider/hooks/notification-provider.hooks.d.ts +5 -0
- package/dist/notification-provider/index.d.ts +3 -0
- package/dist/notification-provider/notification-provider.d.ts +4 -0
- package/dist/notification-provider/types/index.d.ts +1 -0
- package/dist/notification-provider/types/notification-provider.types.d.ts +61 -0
- package/dist/notification-provider-C2ypXy2W.cjs +1 -0
- package/dist/notification-provider-WLUaZyMB.js +113 -0
- package/dist/notification-provider.cjs +1 -0
- package/dist/notification-provider.js +6 -0
- package/dist/progress-bar/helpers/index.d.ts +1 -0
- package/dist/progress-bar/helpers/progress-bar.helpers.d.ts +6 -0
- package/dist/progress-bar/index.d.ts +2 -0
- package/dist/progress-bar/progress-bar.d.ts +5 -0
- package/dist/progress-bar/types/index.d.ts +1 -0
- package/dist/progress-bar/types/progress-bar.types.d.ts +80 -0
- package/dist/progress-bar-D4CL9r42.js +236 -0
- package/dist/progress-bar-XIJDb_UM.cjs +1 -0
- package/dist/progress-bar.cjs +1 -0
- package/dist/progress-bar.js +4 -0
- package/dist/shared/responsive-style/index.d.ts +1 -0
- package/dist/shared/responsive-style/responsive-style.types.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/dist/tabs/helpers/index.d.ts +1 -0
- package/dist/tabs/helpers/tabs.helpers.d.ts +7 -0
- package/dist/tabs/hooks/index.d.ts +1 -0
- package/dist/tabs/hooks/tabs.hooks.d.ts +5 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/tabs.d.ts +4 -0
- package/dist/tabs/types/index.d.ts +1 -0
- package/dist/tabs/types/tabs.types.d.ts +95 -0
- package/dist/tabs-BNZDJRz_.cjs +1 -0
- package/dist/tabs-DIPSJX1z.js +264 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.js +5 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/toast.d.ts +5 -0
- package/dist/toast/types/index.d.ts +1 -0
- package/dist/toast/types/toast.types.d.ts +10 -0
- package/dist/toast-CH8VqvLC.cjs +1 -0
- package/dist/toast-DpjugQ8H.js +49 -0
- package/dist/toast.cjs +1 -0
- package/dist/toast.js +4 -0
- package/dist/tooltip/helpers/index.d.ts +1 -0
- package/dist/tooltip/helpers/tooltip.helpers.d.ts +7 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/tooltip.d.ts +5 -0
- package/dist/tooltip/types/index.d.ts +1 -0
- package/dist/tooltip/types/tooltip.types.d.ts +51 -0
- package/dist/tooltip-0RbTCYn_.cjs +1 -0
- package/dist/tooltip-CWnHAfbI.js +166 -0
- package/dist/tooltip.cjs +1 -0
- package/dist/tooltip.js +4 -0
- package/dist/types/animation.types.d.ts +35 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/typography/index.d.ts +1 -0
- package/dist/typography/typography.helpers.d.ts +1 -1
- package/package.json +68 -4
package/dist/index.js
CHANGED
|
@@ -1,96 +1,115 @@
|
|
|
1
|
-
import { Accordion as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
1
|
+
import { Accordion as e, AccordionItem as a, AccordionRoot as n } from "./accordion.js";
|
|
2
|
+
import { A as i } from "./alert-CTIWpkmD.js";
|
|
3
|
+
import { Box as s } from "./box.js";
|
|
4
|
+
import { Button as l, buttonSizeBorderRadius as I, buttonSizeBoxProps as f, buttonSizeClassNames as m, buttonVariantClassNames as x, buttonVariants as T } from "./button.js";
|
|
5
|
+
import { U as b, u, a as k, b as g } from "./ui-kit-provider-C6Mk5g_7.js";
|
|
6
|
+
import { Flex as h } from "./flex.js";
|
|
7
|
+
import { Grid as P, GridItem as S } from "./grid.js";
|
|
8
|
+
import { ArrowCornerIcon as y, ArrowIcon as A, ArrowLongLeftIcon as w, ArrowheadRightIcon as L, BlockIcon as N, BurgerIcon as v, CheckIcon as D, CopyIcon as G, DoubleCheckIcon as K, DropDown as R, ExclamationMarkIcon as U, EyeOpenIcon as V, FileIcon as z, GeminiStarIcon as F, GeoIcon as W, InfoCircleIcon as E, LockClosedIcon as H, LockOpenIcon as O, LogoutIcon as j, MailIcon as X, MediaMaxIcon as q, MediaPictureIcon as J, MediaTgIcon as Q, MediaVkIcon as Y, MediaWaIcon as Z, NetUploadIcon as _, PaperclipIcon as $, PdfIcon as oo, PhoneIcon as ro, PlusIcon as eo, SaveIcon as ao, SparkIcon as no, SparkleIcon as to, TelephoneIcon as io, TimeClockIcon as co, TrashIcon as so, WarningTriangleIcon as po, XMarkIcon as lo } from "./icons.js";
|
|
9
|
+
import { Input as fo } from "./input.js";
|
|
10
|
+
import { L as xo } from "./loader-Daam055i.js";
|
|
11
|
+
import { MediaCard as bo } from "./media-card.js";
|
|
12
|
+
import { MediaGallery as ko } from "./media-gallery.js";
|
|
13
|
+
import { N as Co, u as ho } from "./notification-provider-WLUaZyMB.js";
|
|
14
|
+
import { Pagination as Po } from "./pagination.js";
|
|
15
|
+
import { Picture as Bo } from "./picture.js";
|
|
16
|
+
import { P as Ao } from "./progress-bar-D4CL9r42.js";
|
|
17
|
+
import { Select as Lo } from "./select.js";
|
|
18
|
+
import { r as vo, a as Do } from "./responsive-style.config-DFuATrIM.js";
|
|
19
|
+
import { StatusBadge as Ko } from "./status-badge.js";
|
|
20
|
+
import { Switch as Uo } from "./switch.js";
|
|
21
|
+
import { D as zo, T as Fo, a as Wo, b as Eo, c as Ho, d as Oo, e as jo, f as Xo, g as qo, h as Jo, i as Qo, j as Yo, k as Zo } from "./table-container-BsE-uIE1.js";
|
|
22
|
+
import { T as $o } from "./tabs-DIPSJX1z.js";
|
|
23
|
+
import { T as rr } from "./toast-DpjugQ8H.js";
|
|
24
|
+
import { T as ar } from "./tooltip-CWnHAfbI.js";
|
|
25
|
+
import { Typography as tr, typographyVariants as ir } from "./typography.js";
|
|
19
26
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
e as Accordion,
|
|
28
|
+
a as AccordionItem,
|
|
22
29
|
n as AccordionRoot,
|
|
30
|
+
i as Alert,
|
|
23
31
|
y as ArrowCornerIcon,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
32
|
+
A as ArrowIcon,
|
|
33
|
+
w as ArrowLongLeftIcon,
|
|
34
|
+
L as ArrowheadRightIcon,
|
|
35
|
+
N as BlockIcon,
|
|
36
|
+
s as Box,
|
|
37
|
+
v as BurgerIcon,
|
|
38
|
+
l as Button,
|
|
39
|
+
D as CheckIcon,
|
|
40
|
+
G as CopyIcon,
|
|
41
|
+
zo as DataTable,
|
|
42
|
+
K as DoubleCheckIcon,
|
|
43
|
+
R as DropDown,
|
|
44
|
+
U as ExclamationMarkIcon,
|
|
45
|
+
V as EyeOpenIcon,
|
|
46
|
+
z as FileIcon,
|
|
47
|
+
h as Flex,
|
|
48
|
+
F as GeminiStarIcon,
|
|
49
|
+
W as GeoIcon,
|
|
50
|
+
P as Grid,
|
|
51
|
+
S as GridItem,
|
|
52
|
+
E as InfoCircleIcon,
|
|
53
|
+
fo as Input,
|
|
54
|
+
xo as Loader,
|
|
55
|
+
H as LockClosedIcon,
|
|
56
|
+
O as LockOpenIcon,
|
|
57
|
+
j as LogoutIcon,
|
|
58
|
+
X as MailIcon,
|
|
59
|
+
bo as MediaCard,
|
|
60
|
+
ko as MediaGallery,
|
|
61
|
+
q as MediaMaxIcon,
|
|
62
|
+
J as MediaPictureIcon,
|
|
63
|
+
Q as MediaTgIcon,
|
|
64
|
+
Y as MediaVkIcon,
|
|
65
|
+
Z as MediaWaIcon,
|
|
66
|
+
_ as NetUploadIcon,
|
|
67
|
+
Co as NotificationProvider,
|
|
68
|
+
Po as Pagination,
|
|
69
|
+
$ as PaperclipIcon,
|
|
70
|
+
oo as PdfIcon,
|
|
71
|
+
ro as PhoneIcon,
|
|
72
|
+
Bo as Picture,
|
|
73
|
+
eo as PlusIcon,
|
|
74
|
+
Ao as ProgressBar,
|
|
75
|
+
ao as SaveIcon,
|
|
76
|
+
Lo as Select,
|
|
77
|
+
no as SparkIcon,
|
|
78
|
+
to as SparkleIcon,
|
|
79
|
+
Ko as StatusBadge,
|
|
80
|
+
Uo as Switch,
|
|
81
|
+
Fo as Table,
|
|
82
|
+
Wo as TableBody,
|
|
83
|
+
Eo as TableCaption,
|
|
84
|
+
Ho as TableCell,
|
|
85
|
+
Oo as TableContainer,
|
|
86
|
+
jo as TableFooter,
|
|
87
|
+
Xo as TableHead,
|
|
88
|
+
qo as TableHeader,
|
|
89
|
+
Jo as TableRow,
|
|
90
|
+
Qo as TableScrollArea,
|
|
91
|
+
Yo as TableStatus,
|
|
92
|
+
Zo as TableToolbar,
|
|
93
|
+
$o as Tabs,
|
|
94
|
+
io as TelephoneIcon,
|
|
95
|
+
co as TimeClockIcon,
|
|
96
|
+
rr as Toast,
|
|
97
|
+
ar as Tooltip,
|
|
98
|
+
so as TrashIcon,
|
|
99
|
+
tr as Typography,
|
|
100
|
+
b as UiKitProvider,
|
|
101
|
+
po as WarningTriangleIcon,
|
|
102
|
+
lo as XMarkIcon,
|
|
103
|
+
I as buttonSizeBorderRadius,
|
|
104
|
+
f as buttonSizeBoxProps,
|
|
105
|
+
m as buttonSizeClassNames,
|
|
106
|
+
x as buttonVariantClassNames,
|
|
107
|
+
T as buttonVariants,
|
|
108
|
+
vo as responsiveBreakpointMinWidth,
|
|
109
|
+
Do as responsiveBreakpoints,
|
|
110
|
+
ir as typographyVariants,
|
|
111
|
+
u as uiKitColorTokens,
|
|
112
|
+
k as uiKitTypographyTokens,
|
|
113
|
+
ho as useNotifications,
|
|
114
|
+
g as useUiKitConfig
|
|
96
115
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResponsiveStyleBreakpoint } from '../shared/responsive-style/responsive-style.types';
|
|
2
|
-
import { TypographyColorValue, TypographyFontSizeValue, TypographyFontWeightValue, TypographyLetterSpacingValue, TypographyLineHeightValue } from '../types';
|
|
2
|
+
import { TypographyColorValue, TypographyFontSizeValue, TypographyFontWeightValue, TypographyLetterSpacingValue, TypographyLineHeightValue } from '../types/index';
|
|
3
3
|
/** Типографика текста поля; числовой lineHeight — безразмерный множитель. */
|
|
4
4
|
export type InputTextStyleProps = {
|
|
5
5
|
/** Размер текста: число в px, CSS-строка или токен. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { normalizeLoaderValue } from './loader.helpers';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { LoaderProps } from './types/index';
|
|
3
|
+
/** Индикатор загрузки: value задаёт progressbar, без value используется неопределённый статус. */
|
|
4
|
+
export declare function Loader({ value, showValue, children, label, ariaLabel, indicatorProps, spinnerProps, labelProps, trackColor, strokeWidth, indicator, ...props }: LoaderProps): JSX.Element;
|
|
5
|
+
export type { LoaderProps } from './types/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { LoaderProps } from './loader.types';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxProps } from '../../box/index';
|
|
3
|
+
import { FlexProps } from '../../flex/index';
|
|
4
|
+
/** Настройки индикатора и обёртки; стандартные props Flex поддерживают md/lg/xl и наследование. */
|
|
5
|
+
export type LoaderProps = Omit<FlexProps, 'children'> & {
|
|
6
|
+
/** Прогресс от 0 до 100; без value отображается вращающийся индикатор. */
|
|
7
|
+
value?: number;
|
|
8
|
+
/** Показывать процент внутри определённого индикатора; по умолчанию true. */
|
|
9
|
+
showValue?: boolean;
|
|
10
|
+
/** Пользовательское содержимое центра; null явно скрывает его. */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/** Подпись под индикатором; по умолчанию отсутствует. */
|
|
13
|
+
label?: ReactNode;
|
|
14
|
+
/** Доступное имя, по умолчанию «Загрузка». */
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
/** Стандартные Box props индикатора; width/height и md/lg/xl управляют размером. Явный style приоритетнее. */
|
|
17
|
+
indicatorProps?: Omit<BoxProps, 'children' | 'as'>;
|
|
18
|
+
/** Props SVG на базе Box: animation и md/lg/xl управляют вращением. По умолчанию spin только без value; style имеет приоритет. */
|
|
19
|
+
spinnerProps?: Omit<BoxProps<'svg'>, 'children' | 'as'>;
|
|
20
|
+
/** Стандартные Box props подписи, включая responsive и style. */
|
|
21
|
+
labelProps?: Omit<BoxProps, 'children' | 'as'>;
|
|
22
|
+
/** Цвет дорожки SVG, по умолчанию токен background-subtle; принимает currentColor и CSS. */
|
|
23
|
+
trackColor?: string;
|
|
24
|
+
/** Ширина линии в системе координат 64×64, по умолчанию 4; ограничена диапазоном 0–64. */
|
|
25
|
+
strokeWidth?: number;
|
|
26
|
+
/** Пользовательский индикатор вместо SVG; применяется к обоим режимам. */
|
|
27
|
+
indicator?: ReactNode;
|
|
28
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as m } from "./flex.js";
|
|
3
|
+
import { Box as a } from "./box.js";
|
|
4
|
+
function y(e) {
|
|
5
|
+
return Number.isFinite(e) ? Math.min(100, Math.max(0, e)) : 0;
|
|
6
|
+
}
|
|
7
|
+
function M({
|
|
8
|
+
value: e,
|
|
9
|
+
showValue: p = !0,
|
|
10
|
+
children: t,
|
|
11
|
+
label: s,
|
|
12
|
+
ariaLabel: u = "Загрузка",
|
|
13
|
+
indicatorProps: x,
|
|
14
|
+
spinnerProps: f,
|
|
15
|
+
labelProps: l,
|
|
16
|
+
trackColor: g = "var(--color-background-subtle)",
|
|
17
|
+
strokeWidth: c = 4,
|
|
18
|
+
indicator: d,
|
|
19
|
+
...v
|
|
20
|
+
}) {
|
|
21
|
+
const r = e === void 0 ? void 0 : y(e), i = Number.isFinite(c) ? Math.min(64, Math.max(0, c)) : 4, h = (64 - i) / 2;
|
|
22
|
+
return /* @__PURE__ */ n(
|
|
23
|
+
m,
|
|
24
|
+
{
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
align: "center",
|
|
27
|
+
gap: 8,
|
|
28
|
+
color: "--color-primary-accent",
|
|
29
|
+
role: "progressbar",
|
|
30
|
+
"aria-label": u,
|
|
31
|
+
"aria-valuemin": 0,
|
|
32
|
+
"aria-valuemax": 100,
|
|
33
|
+
"aria-valuenow": r,
|
|
34
|
+
...v,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ n(a, { position: { type: "relative" }, width: 64, height: 64, ...x, children: [
|
|
37
|
+
d === void 0 ? /* @__PURE__ */ n(
|
|
38
|
+
a,
|
|
39
|
+
{
|
|
40
|
+
as: "svg",
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
width: "100%",
|
|
43
|
+
height: "100%",
|
|
44
|
+
viewBox: "0 0 64 64",
|
|
45
|
+
animation: r === void 0 ? "spin" : "none",
|
|
46
|
+
...f,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ o(
|
|
49
|
+
"circle",
|
|
50
|
+
{
|
|
51
|
+
cx: "32",
|
|
52
|
+
cy: "32",
|
|
53
|
+
r: h,
|
|
54
|
+
fill: "none",
|
|
55
|
+
stroke: g,
|
|
56
|
+
strokeWidth: i
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ o(
|
|
60
|
+
"circle",
|
|
61
|
+
{
|
|
62
|
+
cx: "32",
|
|
63
|
+
cy: "32",
|
|
64
|
+
r: h,
|
|
65
|
+
fill: "none",
|
|
66
|
+
stroke: "currentColor",
|
|
67
|
+
strokeWidth: i,
|
|
68
|
+
strokeLinecap: "round",
|
|
69
|
+
strokeOpacity: r === 0 ? 0 : 1,
|
|
70
|
+
pathLength: 100,
|
|
71
|
+
strokeDasharray: r === void 0 ? "25 100" : String(r) + " 100",
|
|
72
|
+
transform: "rotate(-90 32 32)"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
) : d,
|
|
78
|
+
(t !== void 0 || r !== void 0 && p) && /* @__PURE__ */ o(
|
|
79
|
+
m,
|
|
80
|
+
{
|
|
81
|
+
position: { type: "absolute", top: 0, bottom: 0, left: 0, right: 0 },
|
|
82
|
+
align: "center",
|
|
83
|
+
justify: "center",
|
|
84
|
+
style: { fontSize: "18px", lineHeight: "22px" },
|
|
85
|
+
children: t !== void 0 ? t : Math.round(r ?? 0) + "%"
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }),
|
|
89
|
+
s != null && /* @__PURE__ */ o(
|
|
90
|
+
a,
|
|
91
|
+
{
|
|
92
|
+
color: "--color-text-secondary",
|
|
93
|
+
...l,
|
|
94
|
+
style: { fontSize: "14px", lineHeight: "18px", ...l?.style },
|
|
95
|
+
children: s
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
M as L
|
|
104
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),u=require("./flex.cjs"),n=require("./box.cjs");function f(t){return Number.isFinite(t)?Math.min(100,Math.max(0,t)):0}function y({value:t,showValue:d=!0,children:i,label:a,ariaLabel:h="Загрузка",indicatorProps:p,spinnerProps:m,labelProps:s,trackColor:g="var(--color-background-subtle)",strokeWidth:c=4,indicator:l,...v}){const e=t===void 0?void 0:f(t),o=Number.isFinite(c)?Math.min(64,Math.max(0,c)):4,x=(64-o)/2;return r.jsxs(u.Flex,{flexDirection:"column",align:"center",gap:8,color:"--color-primary-accent",role:"progressbar","aria-label":h,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e,...v,children:[r.jsxs(n.Box,{position:{type:"relative"},width:64,height:64,...p,children:[l===void 0?r.jsxs(n.Box,{as:"svg","aria-hidden":"true",width:"100%",height:"100%",viewBox:"0 0 64 64",animation:e===void 0?"spin":"none",...m,children:[r.jsx("circle",{cx:"32",cy:"32",r:x,fill:"none",stroke:g,strokeWidth:o}),r.jsx("circle",{cx:"32",cy:"32",r:x,fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeOpacity:e===0?0:1,pathLength:100,strokeDasharray:e===void 0?"25 100":String(e)+" 100",transform:"rotate(-90 32 32)"})]}):l,(i!==void 0||e!==void 0&&d)&&r.jsx(u.Flex,{position:{type:"absolute",top:0,bottom:0,left:0,right:0},align:"center",justify:"center",style:{fontSize:"18px",lineHeight:"22px"},children:i!==void 0?i:Math.round(e??0)+"%"})]}),a!=null&&r.jsx(n.Box,{color:"--color-text-secondary",...s,style:{fontSize:"14px",lineHeight:"18px",...s?.style},children:a})]})}exports.Loader=y;
|
package/dist/loader.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./loader-ODTCTLKE.cjs");exports.Loader=e.Loader;
|
package/dist/loader.js
ADDED
package/dist/media-gallery.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),G=require("./grid.cjs"),P=require("./icons.cjs"),k=require("./media-card.cjs"),p=require("./responsive-style.config-B2m9jVlX.cjs"),s=require("./typography.cjs"),C=require("./box.cjs");function M({itemsCount:e,maxHeight:i,scrollable:n,scrollThreshold:l}){return{maxHeightValue:T(i??420),shouldUseScroll:n??e>l}}function N({columns:e,gap:i,lg:n,md:l,xl:t}){return{cols:e??4,gap:i??8,md:c(l),lg:c(n),xl:c(t)}}function c(e){if(e)return{cols:e.columns,gap:e.gap}}function T(e){return typeof e=="number"?`${e}px`:e}function U({className:e,columns:i,errorMessage:n,emptyMessage:l="В галерее пока нет изображений.",gap:t,gridClassName:g,items:a,isLoading:d=!1,lg:h,maxHeight:x,md:y,onSubmit:m,scrollable:f,scrollThreshold:j=6,xl:v,...b}){const{maxHeightValue:S,shouldUseScroll:u}=M({itemsCount:a.length,maxHeight:x,scrollable:f,scrollThreshold:j}),q=N({columns:i,gap:t,lg:h,md:y,xl:v});return r.jsxs("div",{className:p.cn("grid gap-[12px]",e),...b,children:[d?r.jsxs("div",{className:"flex items-center gap-[8px] text-[var(--color-text-secondary)]",children:[r.jsx(C.Box,{as:"span",display:"inline-block",width:16,height:16,animation:"spin","aria-hidden":"true",children:r.jsx(P.TimeClockIcon,{width:16,height:16})}),r.jsx(s.Typography,{as:"span",variant:"b3",children:"Загружаем галерею..."})]}):null,n?r.jsx(s.Typography,{as:"p",color:"--color-secondary-accent-2",variant:"b3",children:n}):null,a.length>0?r.jsx(G.Grid,{...q,className:p.cn(u&&"overflow-y-auto rounded-[12px] bg-[var(--color-background-subtle)] p-[8px]",g),style:u?{maxHeight:S}:void 0,children:a.map(o=>r.jsx(k.MediaCard,{fileName:o.fileName,imgUrl:o.imgUrl,isPicked:o.isPicked,variant:"img-pick",onSubmit:()=>m?.(o)},o.id))}):null,!d&&a.length===0?r.jsx(s.Typography,{as:"p",color:"--color-text-secondary",variant:"b3",children:l}):null]})}exports.MediaGallery=U;
|
package/dist/media-gallery.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Grid as
|
|
2
|
+
import { Grid as S } from "./grid.js";
|
|
3
3
|
import { TimeClockIcon as C } from "./icons.js";
|
|
4
4
|
import { MediaCard as U } from "./media-card.js";
|
|
5
5
|
import { c as u } from "./responsive-style.config-DFuATrIM.js";
|
|
6
6
|
import { Typography as c } from "./typography.js";
|
|
7
|
+
import { Box as w } from "./box.js";
|
|
7
8
|
function H({
|
|
8
9
|
itemsCount: r,
|
|
9
10
|
maxHeight: e,
|
|
10
11
|
scrollable: l,
|
|
11
|
-
scrollThreshold:
|
|
12
|
+
scrollThreshold: i
|
|
12
13
|
}) {
|
|
13
14
|
return {
|
|
14
15
|
maxHeightValue: j(e ?? 420),
|
|
15
|
-
shouldUseScroll: l ?? r >
|
|
16
|
+
shouldUseScroll: l ?? r > i
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
function M({
|
|
19
20
|
columns: r,
|
|
20
21
|
gap: e,
|
|
21
22
|
lg: l,
|
|
22
|
-
md:
|
|
23
|
+
md: i,
|
|
23
24
|
xl: t
|
|
24
25
|
}) {
|
|
25
26
|
return {
|
|
26
27
|
cols: r ?? 4,
|
|
27
28
|
gap: e ?? 8,
|
|
28
|
-
md:
|
|
29
|
-
lg:
|
|
30
|
-
xl:
|
|
29
|
+
md: d(i),
|
|
30
|
+
lg: d(l),
|
|
31
|
+
xl: d(t)
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function d(r) {
|
|
34
35
|
if (r)
|
|
35
36
|
return {
|
|
36
37
|
cols: r.columns,
|
|
@@ -40,46 +41,57 @@ function s(r) {
|
|
|
40
41
|
function j(r) {
|
|
41
42
|
return typeof r == "number" ? `${r}px` : r;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function A({
|
|
44
45
|
className: r,
|
|
45
46
|
columns: e,
|
|
46
47
|
errorMessage: l,
|
|
47
|
-
emptyMessage:
|
|
48
|
+
emptyMessage: i = "В галерее пока нет изображений.",
|
|
48
49
|
gap: t,
|
|
49
50
|
gridClassName: g,
|
|
50
|
-
items:
|
|
51
|
-
isLoading:
|
|
52
|
-
lg:
|
|
53
|
-
maxHeight:
|
|
54
|
-
md:
|
|
51
|
+
items: a,
|
|
52
|
+
isLoading: s = !1,
|
|
53
|
+
lg: h,
|
|
54
|
+
maxHeight: f,
|
|
55
|
+
md: x,
|
|
55
56
|
onSubmit: y,
|
|
56
57
|
scrollable: v,
|
|
57
58
|
scrollThreshold: b = 6,
|
|
58
59
|
xl: G,
|
|
59
|
-
...
|
|
60
|
+
...k
|
|
60
61
|
}) {
|
|
61
|
-
const { maxHeightValue:
|
|
62
|
-
itemsCount:
|
|
63
|
-
maxHeight:
|
|
62
|
+
const { maxHeightValue: N, shouldUseScroll: p } = H({
|
|
63
|
+
itemsCount: a.length,
|
|
64
|
+
maxHeight: f,
|
|
64
65
|
scrollable: v,
|
|
65
66
|
scrollThreshold: b
|
|
66
|
-
}),
|
|
67
|
-
return /* @__PURE__ */ m("div", { className: u("grid gap-[12px]", r), ...
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */ o(
|
|
67
|
+
}), P = M({ columns: e, gap: t, lg: h, md: x, xl: G });
|
|
68
|
+
return /* @__PURE__ */ m("div", { className: u("grid gap-[12px]", r), ...k, children: [
|
|
69
|
+
s ? /* @__PURE__ */ m("div", { className: "flex items-center gap-[8px] text-[var(--color-text-secondary)]", children: [
|
|
70
|
+
/* @__PURE__ */ o(
|
|
71
|
+
w,
|
|
72
|
+
{
|
|
73
|
+
as: "span",
|
|
74
|
+
display: "inline-block",
|
|
75
|
+
width: 16,
|
|
76
|
+
height: 16,
|
|
77
|
+
animation: "spin",
|
|
78
|
+
"aria-hidden": "true",
|
|
79
|
+
children: /* @__PURE__ */ o(C, { width: 16, height: 16 })
|
|
80
|
+
}
|
|
81
|
+
),
|
|
70
82
|
/* @__PURE__ */ o(c, { as: "span", variant: "b3", children: "Загружаем галерею..." })
|
|
71
83
|
] }) : null,
|
|
72
84
|
l ? /* @__PURE__ */ o(c, { as: "p", color: "--color-secondary-accent-2", variant: "b3", children: l }) : null,
|
|
73
|
-
|
|
74
|
-
|
|
85
|
+
a.length > 0 ? /* @__PURE__ */ o(
|
|
86
|
+
S,
|
|
75
87
|
{
|
|
76
|
-
...
|
|
88
|
+
...P,
|
|
77
89
|
className: u(
|
|
78
90
|
p && "overflow-y-auto rounded-[12px] bg-[var(--color-background-subtle)] p-[8px]",
|
|
79
91
|
g
|
|
80
92
|
),
|
|
81
|
-
style: p ? { maxHeight:
|
|
82
|
-
children:
|
|
93
|
+
style: p ? { maxHeight: N } : void 0,
|
|
94
|
+
children: a.map((n) => /* @__PURE__ */ o(
|
|
83
95
|
U,
|
|
84
96
|
{
|
|
85
97
|
fileName: n.fileName,
|
|
@@ -92,9 +104,9 @@ function $({
|
|
|
92
104
|
))
|
|
93
105
|
}
|
|
94
106
|
) : null,
|
|
95
|
-
!
|
|
107
|
+
!s && a.length === 0 ? /* @__PURE__ */ o(c, { as: "p", color: "--color-text-secondary", variant: "b3", children: i }) : null
|
|
96
108
|
] });
|
|
97
109
|
}
|
|
98
110
|
export {
|
|
99
|
-
|
|
111
|
+
A as MediaGallery
|
|
100
112
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { buildNotificationViewport, mergeNotificationViewport, } from './notification-provider.helpers';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FlexBreakpointProps, FlexProps } from '../../flex/index';
|
|
2
|
+
import { NotificationPlacement, NotificationViewportProps } from '../types/index';
|
|
3
|
+
/** Полный пресет сбрасывает противоположные inset и transform при смене брейкпоинта. */
|
|
4
|
+
export declare function getPlacementProps(placement: NotificationPlacement): FlexBreakpointProps;
|
|
5
|
+
/** Локальные настройки дополняют провайдер по каждому брейкпоинту; style сливается последним. */
|
|
6
|
+
export declare function mergeNotificationViewport(base?: NotificationViewportProps, local?: NotificationViewportProps): NotificationViewportProps;
|
|
7
|
+
/** Переводит пресеты в обычные Flex props; CSS и safelist использует существующий pipeline ui-kit. */
|
|
8
|
+
export declare function buildNotificationViewport(viewport: NotificationViewportProps): FlexProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NotificationsContext, useNotifications } from './notification-provider.hooks';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NotificationsApi } from '../types/index';
|
|
2
|
+
/** Внутренний контекст ближайшего провайдера; null означает отсутствие провайдера. */
|
|
3
|
+
export declare const NotificationsContext: import('react').Context<NotificationsApi | null>;
|
|
4
|
+
/** Хук вызова уведомлений; требует NotificationProvider выше по React-дереву. */
|
|
5
|
+
export declare function useNotifications(): NotificationsApi;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { useNotifications } from './hooks/index';
|
|
2
|
+
export { NotificationProvider } from './notification-provider';
|
|
3
|
+
export type { NotificationOptions, NotificationPlacement, NotificationProviderProps, NotificationsApi, NotificationViewportBreakpoint, NotificationViewportProps, ShowAlertOptions, ShowToastOptions, } from './types/index';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { NotificationProviderProps } from './types/index';
|
|
3
|
+
/** Показывает независимые стеки Alert/Toast, сохраняя тему и адаптивные настройки Flex. */
|
|
4
|
+
export declare function NotificationProvider({ children, viewport, }: NotificationProviderProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { NotificationEntry, NotificationOptions, NotificationPlacement, NotificationProviderProps, NotificationsApi, NotificationViewportBreakpoint, NotificationViewportProps, ShowAlertOptions, ShowToastOptions, } from './notification-provider.types';
|