@shmidko61/lc-ui-kit 0.0.4 → 0.0.5
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/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/box/box.d.ts +1 -1
- package/dist/box/box.types.d.ts +1 -1
- package/dist/button/button.helpers.d.ts +1 -1
- package/dist/flex/flex.d.ts +6 -2
- package/dist/flex/flex.types.d.ts +2 -2
- package/dist/grid/grid.d.ts +5 -1
- package/dist/grid/grid.types.d.ts +1 -1
- package/dist/icons/icons.d.ts +31 -30
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +32 -36
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +84 -90
- package/dist/input.cjs +1 -1
- package/dist/input.js +19 -19
- package/dist/media-card.cjs +1 -1
- package/dist/media-card.js +41 -42
- package/dist/media-gallery.cjs +1 -1
- package/dist/media-gallery.js +12 -12
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +13 -13
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +20 -20
- package/dist/shared/responsive-style/responsive-style.types.d.ts +1 -1
- package/dist/typography/typography.d.ts +4 -1
- package/dist/typography/typography.helpers.d.ts +1 -1
- package/dist/ui-kit-provider/ui-kit-provider.d.ts +4 -1
- package/package.json +3 -2
- package/dist/arrow-CS6d64Y4.cjs +0 -1
- package/dist/arrow-DBc2opRL.js +0 -5
- package/dist/drop-down-CdIuWbLC.cjs +0 -1
- package/dist/drop-down-DH2_3qXq.js +0 -5
- package/dist/eye-open-5zYaeyLp.cjs +0 -1
- package/dist/eye-open-CoTSj5cT.js +0 -5
- package/dist/media-picture-BN4saEVT.js +0 -6
- package/dist/media-picture-BmERSmsd.cjs +0 -1
- package/dist/telephone-DVftjRG9.cjs +0 -1
- package/dist/telephone-DvXakgBQ.js +0 -26
- package/dist/time-clock-DOwPzcx7.cjs +0 -1
- package/dist/time-clock-DjqcZ8tI.js +0 -5
- package/dist/x-mark-DId-ylR6.cjs +0 -1
- package/dist/x-mark-WU1eT82T.js +0 -5
package/dist/index.js
CHANGED
|
@@ -1,97 +1,91 @@
|
|
|
1
|
-
import { Accordion as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { U as
|
|
5
|
-
import { Flex as
|
|
6
|
-
import { Grid as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { Select as uo } from "./select.js";
|
|
20
|
-
import { StatusBadge as ko } from "./status-badge.js";
|
|
21
|
-
import { Switch as go } from "./switch.js";
|
|
22
|
-
import { D as Mo, T as yo, a as Bo, b as Po, c as Ao, d as wo, e as vo, f as Do, g as Go, h as Ko, i as Uo, j as Vo, k as zo } from "./table-container-BsE-uIE1.js";
|
|
23
|
-
import { Typography as Lo, typographyVariants as No } from "./typography.js";
|
|
24
|
-
import { r as jo, a as Ho } from "./responsive-style.config-DFuATrIM.js";
|
|
1
|
+
import { Accordion as a, AccordionItem as r, AccordionRoot as n } from "./accordion.js";
|
|
2
|
+
import { Box as i } from "./box.js";
|
|
3
|
+
import { Button as s, buttonSizeBorderRadius as p, buttonSizeBoxProps as l, buttonSizeClassNames as I, buttonVariantClassNames as d, buttonVariants as m } from "./button.js";
|
|
4
|
+
import { U as x, u as b, a as f, b as u } from "./ui-kit-provider-C6Mk5g_7.js";
|
|
5
|
+
import { Flex as C } from "./flex.js";
|
|
6
|
+
import { Grid as S, GridItem as g } from "./grid.js";
|
|
7
|
+
import { ArrowCornerIcon as y, ArrowIcon as B, BurgerIcon as P, CheckIcon as A, CopyIcon as w, DropDown as v, EyeOpenIcon as D, FileIcon as G, GeoIcon as K, LockClosedIcon as U, LockOpenIcon as V, LogoutIcon as z, MailIcon as F, MediaMaxIcon as L, MediaPictureIcon as N, MediaTgIcon as R, MediaVkIcon as H, MediaWaIcon as O, NetUploadIcon as W, PaperclipIcon as j, PhoneIcon as E, PlusIcon as X, SaveIcon as q, SparkIcon as J, SparkleIcon as Q, TelephoneIcon as Y, TimeClockIcon as Z, TrashIcon as _, XMarkIcon as $ } from "./icons.js";
|
|
8
|
+
import { Input as eo } from "./input.js";
|
|
9
|
+
import { MediaCard as ro } from "./media-card.js";
|
|
10
|
+
import { MediaGallery as to } from "./media-gallery.js";
|
|
11
|
+
import { Pagination as co } from "./pagination.js";
|
|
12
|
+
import { Picture as po } from "./picture.js";
|
|
13
|
+
import { Select as Io } from "./select.js";
|
|
14
|
+
import { StatusBadge as To } from "./status-badge.js";
|
|
15
|
+
import { Switch as bo } from "./switch.js";
|
|
16
|
+
import { D as uo, T as ko, a as Co, b as Mo, c as So, d as go, e as ho, f as yo, g as Bo, h as Po, i as Ao, j as wo, k as vo } from "./table-container-BsE-uIE1.js";
|
|
17
|
+
import { Typography as Go, typographyVariants as Ko } from "./typography.js";
|
|
18
|
+
import { r as Vo, a as zo } from "./responsive-style.config-DFuATrIM.js";
|
|
25
19
|
export {
|
|
26
|
-
|
|
20
|
+
a as Accordion,
|
|
27
21
|
r as AccordionItem,
|
|
28
|
-
|
|
22
|
+
n as AccordionRoot,
|
|
29
23
|
y as ArrowCornerIcon,
|
|
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
|
-
|
|
24
|
+
B as ArrowIcon,
|
|
25
|
+
i as Box,
|
|
26
|
+
P as BurgerIcon,
|
|
27
|
+
s as Button,
|
|
28
|
+
A as CheckIcon,
|
|
29
|
+
w as CopyIcon,
|
|
30
|
+
uo as DataTable,
|
|
31
|
+
v as DropDown,
|
|
32
|
+
D as EyeOpenIcon,
|
|
33
|
+
G as FileIcon,
|
|
34
|
+
C as Flex,
|
|
35
|
+
K as GeoIcon,
|
|
36
|
+
S as Grid,
|
|
37
|
+
g as GridItem,
|
|
38
|
+
eo as Input,
|
|
39
|
+
U as LockClosedIcon,
|
|
40
|
+
V as LockOpenIcon,
|
|
41
|
+
z as LogoutIcon,
|
|
42
|
+
F as MailIcon,
|
|
43
|
+
ro as MediaCard,
|
|
44
|
+
to as MediaGallery,
|
|
45
|
+
L as MediaMaxIcon,
|
|
46
|
+
N as MediaPictureIcon,
|
|
47
|
+
R as MediaTgIcon,
|
|
48
|
+
H as MediaVkIcon,
|
|
49
|
+
O as MediaWaIcon,
|
|
50
|
+
W as NetUploadIcon,
|
|
51
|
+
co as Pagination,
|
|
52
|
+
j as PaperclipIcon,
|
|
53
|
+
E as PhoneIcon,
|
|
54
|
+
po as Picture,
|
|
55
|
+
X as PlusIcon,
|
|
56
|
+
q as SaveIcon,
|
|
57
|
+
Io as Select,
|
|
58
|
+
J as SparkIcon,
|
|
59
|
+
Q as SparkleIcon,
|
|
60
|
+
To as StatusBadge,
|
|
61
|
+
bo as Switch,
|
|
62
|
+
ko as Table,
|
|
63
|
+
Co as TableBody,
|
|
64
|
+
Mo as TableCaption,
|
|
65
|
+
So as TableCell,
|
|
66
|
+
go as TableContainer,
|
|
67
|
+
ho as TableFooter,
|
|
68
|
+
yo as TableHead,
|
|
69
|
+
Bo as TableHeader,
|
|
70
|
+
Po as TableRow,
|
|
71
|
+
Ao as TableScrollArea,
|
|
72
|
+
wo as TableStatus,
|
|
73
|
+
vo as TableToolbar,
|
|
74
|
+
Y as TelephoneIcon,
|
|
75
|
+
Z as TimeClockIcon,
|
|
76
|
+
_ as TrashIcon,
|
|
77
|
+
Go as Typography,
|
|
78
|
+
x as UiKitProvider,
|
|
79
|
+
$ as XMarkIcon,
|
|
80
|
+
p as buttonSizeBorderRadius,
|
|
87
81
|
l as buttonSizeBoxProps,
|
|
88
82
|
I as buttonSizeClassNames,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
d as buttonVariantClassNames,
|
|
84
|
+
m as buttonVariants,
|
|
85
|
+
Vo as responsiveBreakpointMinWidth,
|
|
86
|
+
zo as responsiveBreakpoints,
|
|
87
|
+
Ko as typographyVariants,
|
|
88
|
+
b as uiKitColorTokens,
|
|
89
|
+
f as uiKitTypographyTokens,
|
|
96
90
|
u as useUiKitConfig
|
|
97
91
|
};
|
package/dist/input.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),I=require("./icons.cjs"),l=require("./responsive-style.config-B2m9jVlX.cjs"),g=require("./typography.cjs");function _(r,n){return r&&typeof r!="boolean"?r:n}const f="w-full rounded-[8px] border border-transparent bg-[var(--color-background-subtle)] px-4 text-[14px] font-normal leading-[120%] text-[var(--color-text-primary)] outline-none transition-colors placeholder:text-[var(--color-text-secondary)] focus-visible:border-[var(--color-primary-accent)] focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)] disabled:cursor-not-allowed disabled:opacity-50 [font-family:var(--font-family)] [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";function P({className:r,containerClassName:n,disabled:s,error:d=!1,helperText:m,id:h,label:p,leftIcon:o,rightIcon:j,variant:u="default",...a}){const w=b.useId(),i=h??w,[x,k]=b.useState(!1),t=!!d,y=_(d,m),N=u==="textarea",v=u==="password",c=v?e.jsx("button",{"aria-label":x?"Скрыть значение":"Показать значение",disabled:s,type:"button",onClick:()=>k(q=>!q),children:e.jsx(I.EyeOpenIcon,{})}):j;return e.jsxs("div",{className:l.cn("grid w-full gap-2",n),children:[p?e.jsx(g.Typography,{as:"label",color:"--color-text-secondary",htmlFor:i,variant:"b3",children:p}):null,e.jsxs("div",{className:"relative w-full",children:[o&&e.jsx("span",{className:"pointer-events-none absolute left-4 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5",children:o}),N?e.jsx("textarea",{...a,"aria-invalid":t||a["aria-invalid"],className:l.cn(f,"min-h-[109px] resize-y px-4 py-3",t&&"border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",o&&"pl-12",r),disabled:s,id:i}):e.jsx("input",{...a,"aria-invalid":t||a["aria-invalid"],className:l.cn(f,"min-h-[42px] py-3",t&&"border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",o&&"pl-12",c&&"pr-12",r),disabled:s,id:i,type:v&&!x?"password":a.type??"text"}),c&&e.jsx("span",{className:"absolute right-2 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5",children:c})]}),y?e.jsx(g.Typography,{as:"p",color:t?"--color-secondary-accent-2":"--color-text-secondary",variant:"b3",children:y}):null]})}exports.Input=P;
|
package/dist/input.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as x, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useId as
|
|
3
|
-
import {
|
|
2
|
+
import { useId as z, useState as P } from "react";
|
|
3
|
+
import { EyeOpenIcon as j } from "./icons.js";
|
|
4
4
|
import { c as l } from "./responsive-style.config-DFuATrIM.js";
|
|
5
5
|
import { Typography as b } from "./typography.js";
|
|
6
|
-
function
|
|
7
|
-
return
|
|
6
|
+
function C(r, n) {
|
|
7
|
+
return r && typeof r != "boolean" ? r : n;
|
|
8
8
|
}
|
|
9
9
|
const f = "w-full rounded-[8px] border border-transparent bg-[var(--color-background-subtle)] px-4 text-[14px] font-normal leading-[120%] text-[var(--color-text-primary)] outline-none transition-colors placeholder:text-[var(--color-text-secondary)] focus-visible:border-[var(--color-primary-accent)] focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)] disabled:cursor-not-allowed disabled:opacity-50 [font-family:var(--font-family)] [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";
|
|
10
|
-
function
|
|
11
|
-
className:
|
|
10
|
+
function M({
|
|
11
|
+
className: r,
|
|
12
12
|
containerClassName: n,
|
|
13
13
|
disabled: i,
|
|
14
14
|
error: d = !1,
|
|
@@ -18,33 +18,33 @@ function F({
|
|
|
18
18
|
leftIcon: t,
|
|
19
19
|
rightIcon: w,
|
|
20
20
|
variant: u = "default",
|
|
21
|
-
...
|
|
21
|
+
...a
|
|
22
22
|
}) {
|
|
23
|
-
const k =
|
|
23
|
+
const k = z(), s = h ?? k, [v, N] = P(!1), o = !!d, y = C(d, g), I = u === "textarea", m = u === "password", c = m ? /* @__PURE__ */ e(
|
|
24
24
|
"button",
|
|
25
25
|
{
|
|
26
26
|
"aria-label": v ? "Скрыть значение" : "Показать значение",
|
|
27
27
|
disabled: i,
|
|
28
28
|
type: "button",
|
|
29
|
-
onClick: () => N((
|
|
30
|
-
children: /* @__PURE__ */ e(
|
|
29
|
+
onClick: () => N((_) => !_),
|
|
30
|
+
children: /* @__PURE__ */ e(j, {})
|
|
31
31
|
}
|
|
32
32
|
) : w;
|
|
33
33
|
return /* @__PURE__ */ x("div", { className: l("grid w-full gap-2", n), children: [
|
|
34
34
|
p ? /* @__PURE__ */ e(b, { as: "label", color: "--color-text-secondary", htmlFor: s, variant: "b3", children: p }) : null,
|
|
35
35
|
/* @__PURE__ */ x("div", { className: "relative w-full", children: [
|
|
36
36
|
t && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-4 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5", children: t }),
|
|
37
|
-
|
|
37
|
+
I ? /* @__PURE__ */ e(
|
|
38
38
|
"textarea",
|
|
39
39
|
{
|
|
40
|
-
...
|
|
41
|
-
"aria-invalid": o ||
|
|
40
|
+
...a,
|
|
41
|
+
"aria-invalid": o || a["aria-invalid"],
|
|
42
42
|
className: l(
|
|
43
43
|
f,
|
|
44
44
|
"min-h-[109px] resize-y px-4 py-3",
|
|
45
45
|
o && "border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",
|
|
46
46
|
t && "pl-12",
|
|
47
|
-
|
|
47
|
+
r
|
|
48
48
|
),
|
|
49
49
|
disabled: i,
|
|
50
50
|
id: s
|
|
@@ -52,19 +52,19 @@ function F({
|
|
|
52
52
|
) : /* @__PURE__ */ e(
|
|
53
53
|
"input",
|
|
54
54
|
{
|
|
55
|
-
...
|
|
56
|
-
"aria-invalid": o ||
|
|
55
|
+
...a,
|
|
56
|
+
"aria-invalid": o || a["aria-invalid"],
|
|
57
57
|
className: l(
|
|
58
58
|
f,
|
|
59
59
|
"min-h-[42px] py-3",
|
|
60
60
|
o && "border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",
|
|
61
61
|
t && "pl-12",
|
|
62
62
|
c && "pr-12",
|
|
63
|
-
|
|
63
|
+
r
|
|
64
64
|
),
|
|
65
65
|
disabled: i,
|
|
66
66
|
id: s,
|
|
67
|
-
type: m && !v ? "password" :
|
|
67
|
+
type: m && !v ? "password" : a.type ?? "text"
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
c && /* @__PURE__ */ e("span", { className: "absolute right-2 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5", children: c })
|
|
@@ -81,5 +81,5 @@ function F({
|
|
|
81
81
|
] });
|
|
82
82
|
}
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
M as Input
|
|
85
85
|
};
|
package/dist/media-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./responsive-style.config-B2m9jVlX.cjs"),i=require("./icons.cjs"),u=require("./typography.cjs");function x({isPicked:r}){return e.jsx("span",{className:o.cn("absolute right-[4px] top-[4px] inline-flex size-[20px] items-center justify-center rounded-full ",r?" bg-[var(--color-primary-accent)] text-[var(--color-background-default)]":"bg-[var(--color-background-default)] text-transparent"),"aria-hidden":"true",children:e.jsx(i.CheckIcon,{className:"size-[18px]"})})}function s({fileName:r,imgUrl:n,children:t}){return e.jsxs("div",{className:"relative flex aspect-square w-full items-center justify-center rounded-[8px] overflow-hidden bg-[var(--color-background-subtle)]",children:[n?e.jsx("img",{className:"w-full object-contain",src:n,alt:r}):e.jsx(i.MediaPictureIcon,{className:"size-[40px] text-[var(--color-text-secondary)]"}),t]})}function p({className:r,fileName:n,imgUrl:t,isPicked:a=!1,onSubmit:c}){return e.jsx("button",{type:"button",className:o.cn("block w-full overflow-hidden rounded-[10px] border border-[var(--color-primary-accent)] outline-none transition-colors focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)]",r),onClick:c,children:e.jsx(s,{fileName:n,imgUrl:t,children:e.jsx(x,{isPicked:a})})})}function b({fileName:r,onDelete:n}){return e.jsxs("div",{className:"flex justify-between items-center gap-[8px]",children:[e.jsx(u.Typography,{variant:"b3",children:r}),n?e.jsx("button",{type:"button","aria-label":`Удалить ${r}`,onClick:n,children:e.jsx(i.XMarkIcon,{className:"size-[16px]"})}):null]})}function f({className:r,fileName:n,imgUrl:t,onDelete:a}){return e.jsxs("div",{className:o.cn("flex flex-col w-full gap-[4px] rounded-[10px] bg-[var(--color-background-subtle)] p-[4px]",r),children:[e.jsx(s,{fileName:n,imgUrl:t}),e.jsx(b,{fileName:n,onDelete:a})]})}function j({className:r,fileName:n,imgUrl:t,isPicked:a,onDelete:c,onSubmit:l,variant:d}){return d==="img-pick"?e.jsx(p,{className:r,fileName:n,imgUrl:t,isPicked:a,onSubmit:l}):e.jsx(f,{className:r,fileName:n,imgUrl:t,onDelete:c})}exports.MediaCard=j;
|
package/dist/media-card.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { c } from "./responsive-style.config-DFuATrIM.js";
|
|
3
|
-
import {
|
|
4
|
-
import { S as f } from "./x-mark-WU1eT82T.js";
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "./responsive-style.config-DFuATrIM.js";
|
|
3
|
+
import { CheckIcon as u, MediaPictureIcon as p, XMarkIcon as f } from "./icons.js";
|
|
5
4
|
import { Typography as b } from "./typography.js";
|
|
6
5
|
function x({ isPicked: e }) {
|
|
7
6
|
return /* @__PURE__ */ r(
|
|
8
7
|
"span",
|
|
9
8
|
{
|
|
10
|
-
className:
|
|
9
|
+
className: i(
|
|
11
10
|
"absolute right-[4px] top-[4px] inline-flex size-[20px] items-center justify-center rounded-full ",
|
|
12
11
|
e ? " bg-[var(--color-primary-accent)] text-[var(--color-background-default)]" : "bg-[var(--color-background-default)] text-transparent"
|
|
13
12
|
),
|
|
@@ -16,89 +15,89 @@ function x({ isPicked: e }) {
|
|
|
16
15
|
}
|
|
17
16
|
);
|
|
18
17
|
}
|
|
19
|
-
function l({ fileName: e, imgUrl:
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
function l({ fileName: e, imgUrl: n, children: a }) {
|
|
19
|
+
return /* @__PURE__ */ c("div", { className: "relative flex aspect-square w-full items-center justify-center rounded-[8px] overflow-hidden bg-[var(--color-background-subtle)]", children: [
|
|
20
|
+
n ? /* @__PURE__ */ r("img", { className: "w-full object-contain", src: n, alt: e }) : /* @__PURE__ */ r(p, { className: "size-[40px] text-[var(--color-text-secondary)]" }),
|
|
21
|
+
a
|
|
23
22
|
] });
|
|
24
23
|
}
|
|
25
24
|
function m({
|
|
26
25
|
className: e,
|
|
27
|
-
fileName:
|
|
28
|
-
imgUrl:
|
|
29
|
-
isPicked:
|
|
30
|
-
onSubmit:
|
|
26
|
+
fileName: n,
|
|
27
|
+
imgUrl: a,
|
|
28
|
+
isPicked: o = !1,
|
|
29
|
+
onSubmit: t
|
|
31
30
|
}) {
|
|
32
31
|
return /* @__PURE__ */ r(
|
|
33
32
|
"button",
|
|
34
33
|
{
|
|
35
34
|
type: "button",
|
|
36
|
-
className:
|
|
35
|
+
className: i(
|
|
37
36
|
"block w-full overflow-hidden rounded-[10px] border border-[var(--color-primary-accent)] outline-none transition-colors focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)]",
|
|
38
37
|
e
|
|
39
38
|
),
|
|
40
|
-
onClick:
|
|
41
|
-
children: /* @__PURE__ */ r(l, { fileName:
|
|
39
|
+
onClick: t,
|
|
40
|
+
children: /* @__PURE__ */ r(l, { fileName: n, imgUrl: a, children: /* @__PURE__ */ r(x, { isPicked: o }) })
|
|
42
41
|
}
|
|
43
42
|
);
|
|
44
43
|
}
|
|
45
44
|
function v({
|
|
46
45
|
fileName: e,
|
|
47
|
-
onDelete:
|
|
46
|
+
onDelete: n
|
|
48
47
|
}) {
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ c("div", { className: "flex justify-between items-center gap-[8px]", children: [
|
|
50
49
|
/* @__PURE__ */ r(b, { variant: "b3", children: e }),
|
|
51
|
-
|
|
50
|
+
n ? /* @__PURE__ */ r("button", { type: "button", "aria-label": `Удалить ${e}`, onClick: n, children: /* @__PURE__ */ r(f, { className: "size-[16px]" }) }) : null
|
|
52
51
|
] });
|
|
53
52
|
}
|
|
54
53
|
function g({
|
|
55
54
|
className: e,
|
|
56
|
-
fileName:
|
|
57
|
-
imgUrl:
|
|
58
|
-
onDelete:
|
|
55
|
+
fileName: n,
|
|
56
|
+
imgUrl: a,
|
|
57
|
+
onDelete: o
|
|
59
58
|
}) {
|
|
60
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ c(
|
|
61
60
|
"div",
|
|
62
61
|
{
|
|
63
|
-
className:
|
|
62
|
+
className: i(
|
|
64
63
|
"flex flex-col w-full gap-[4px] rounded-[10px] bg-[var(--color-background-subtle)] p-[4px]",
|
|
65
64
|
e
|
|
66
65
|
),
|
|
67
66
|
children: [
|
|
68
|
-
/* @__PURE__ */ r(l, { fileName:
|
|
69
|
-
/* @__PURE__ */ r(v, { fileName:
|
|
67
|
+
/* @__PURE__ */ r(l, { fileName: n, imgUrl: a }),
|
|
68
|
+
/* @__PURE__ */ r(v, { fileName: n, onDelete: o })
|
|
70
69
|
]
|
|
71
70
|
}
|
|
72
71
|
);
|
|
73
72
|
}
|
|
74
|
-
function
|
|
73
|
+
function w({
|
|
75
74
|
className: e,
|
|
76
|
-
fileName:
|
|
77
|
-
imgUrl:
|
|
78
|
-
isPicked:
|
|
79
|
-
onDelete:
|
|
80
|
-
onSubmit:
|
|
81
|
-
variant:
|
|
75
|
+
fileName: n,
|
|
76
|
+
imgUrl: a,
|
|
77
|
+
isPicked: o,
|
|
78
|
+
onDelete: t,
|
|
79
|
+
onSubmit: d,
|
|
80
|
+
variant: s
|
|
82
81
|
}) {
|
|
83
|
-
return
|
|
82
|
+
return s === "img-pick" ? /* @__PURE__ */ r(
|
|
84
83
|
m,
|
|
85
84
|
{
|
|
86
85
|
className: e,
|
|
87
|
-
fileName:
|
|
88
|
-
imgUrl:
|
|
89
|
-
isPicked:
|
|
90
|
-
onSubmit:
|
|
86
|
+
fileName: n,
|
|
87
|
+
imgUrl: a,
|
|
88
|
+
isPicked: o,
|
|
89
|
+
onSubmit: d
|
|
91
90
|
}
|
|
92
91
|
) : /* @__PURE__ */ r(
|
|
93
92
|
g,
|
|
94
93
|
{
|
|
95
94
|
className: e,
|
|
96
|
-
fileName:
|
|
97
|
-
imgUrl:
|
|
98
|
-
onDelete:
|
|
95
|
+
fileName: n,
|
|
96
|
+
imgUrl: a,
|
|
97
|
+
onDelete: t
|
|
99
98
|
}
|
|
100
99
|
);
|
|
101
100
|
}
|
|
102
101
|
export {
|
|
103
|
-
|
|
102
|
+
w as MediaCard
|
|
104
103
|
};
|
package/dist/media-gallery.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),q=require("./grid.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),q=require("./grid.cjs"),N=require("./icons.cjs"),P=require("./media-card.cjs"),p=require("./responsive-style.config-B2m9jVlX.cjs"),c=require("./typography.cjs");function C({itemsCount:e,maxHeight:l,scrollable:n,scrollThreshold:o}){return{maxHeightValue:T(l??420),shouldUseScroll:n??e>o}}function M({columns:e,gap:l,lg:n,md:o,xl:s}){return{cols:e??4,gap:l??8,md:t(o),lg:t(n),xl:t(s)}}function t(e){if(e)return{cols:e.columns,gap:e.gap}}function T(e){return typeof e=="number"?`${e}px`:e}function k({className:e,columns:l,errorMessage:n,emptyMessage:o="В галерее пока нет изображений.",gap:s,gridClassName:g,items:i,isLoading:d=!1,lg:x,maxHeight:y,md:h,onSubmit:m,scrollable:f,scrollThreshold:v=6,xl:j,...b}){const{maxHeightValue:S,shouldUseScroll:u}=C({itemsCount:i.length,maxHeight:y,scrollable:f,scrollThreshold:v}),G=M({columns:l,gap:s,lg:x,md:h,xl:j});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(N.TimeClockIcon,{className:"size-[16px] animate-spin"}),r.jsx(c.Typography,{as:"span",variant:"b3",children:"Загружаем галерею..."})]}):null,n?r.jsx(c.Typography,{as:"p",color:"--color-secondary-accent-2",variant:"b3",children:n}):null,i.length>0?r.jsx(q.Grid,{...G,className:p.cn(u&&"overflow-y-auto rounded-[12px] bg-[var(--color-background-subtle)] p-[8px]",g),style:u?{maxHeight:S}:void 0,children:i.map(a=>r.jsx(P.MediaCard,{fileName:a.fileName,imgUrl:a.imgUrl,isPicked:a.isPicked,variant:"img-pick",onSubmit:()=>m?.(a)},a.id))}):null,!d&&i.length===0?r.jsx(c.Typography,{as:"p",color:"--color-text-secondary",variant:"b3",children:o}):null]})}exports.MediaGallery=k;
|
package/dist/media-gallery.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Grid as k } from "./grid.js";
|
|
3
|
-
import {
|
|
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";
|
|
@@ -40,7 +40,7 @@ function s(r) {
|
|
|
40
40
|
function j(r) {
|
|
41
41
|
return typeof r == "number" ? `${r}px` : r;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function $({
|
|
44
44
|
className: r,
|
|
45
45
|
columns: e,
|
|
46
46
|
errorMessage: l,
|
|
@@ -54,17 +54,17 @@ function q({
|
|
|
54
54
|
md: h,
|
|
55
55
|
onSubmit: y,
|
|
56
56
|
scrollable: v,
|
|
57
|
-
scrollThreshold:
|
|
58
|
-
xl:
|
|
59
|
-
...
|
|
57
|
+
scrollThreshold: b = 6,
|
|
58
|
+
xl: G,
|
|
59
|
+
...N
|
|
60
60
|
}) {
|
|
61
|
-
const { maxHeightValue:
|
|
61
|
+
const { maxHeightValue: P, shouldUseScroll: p } = H({
|
|
62
62
|
itemsCount: i.length,
|
|
63
63
|
maxHeight: x,
|
|
64
64
|
scrollable: v,
|
|
65
|
-
scrollThreshold:
|
|
66
|
-
}),
|
|
67
|
-
return /* @__PURE__ */ m("div", { className: u("grid gap-[12px]", r), ...
|
|
65
|
+
scrollThreshold: b
|
|
66
|
+
}), S = M({ columns: e, gap: t, lg: f, md: h, xl: G });
|
|
67
|
+
return /* @__PURE__ */ m("div", { className: u("grid gap-[12px]", r), ...N, children: [
|
|
68
68
|
d ? /* @__PURE__ */ m("div", { className: "flex items-center gap-[8px] text-[var(--color-text-secondary)]", children: [
|
|
69
69
|
/* @__PURE__ */ o(C, { className: "size-[16px] animate-spin" }),
|
|
70
70
|
/* @__PURE__ */ o(c, { as: "span", variant: "b3", children: "Загружаем галерею..." })
|
|
@@ -73,12 +73,12 @@ function q({
|
|
|
73
73
|
i.length > 0 ? /* @__PURE__ */ o(
|
|
74
74
|
k,
|
|
75
75
|
{
|
|
76
|
-
...
|
|
76
|
+
...S,
|
|
77
77
|
className: u(
|
|
78
78
|
p && "overflow-y-auto rounded-[12px] bg-[var(--color-background-subtle)] p-[8px]",
|
|
79
79
|
g
|
|
80
80
|
),
|
|
81
|
-
style: p ? { maxHeight:
|
|
81
|
+
style: p ? { maxHeight: P } : void 0,
|
|
82
82
|
children: i.map((n) => /* @__PURE__ */ o(
|
|
83
83
|
U,
|
|
84
84
|
{
|
|
@@ -96,5 +96,5 @@ function q({
|
|
|
96
96
|
] });
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
99
|
-
|
|
99
|
+
$ as MediaGallery
|
|
100
100
|
};
|
package/dist/modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react-aria"),O=require("react-stately"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react-aria"),O=require("react-stately"),B=require("react"),k=require("./box.cjs"),j=require("./button.cjs"),b=require("./flex.cjs"),z=require("./icons.cjs"),y=require("./responsive-style.config-B2m9jVlX.cjs");function h({children:e,className:o,closeButtonSlot:a,contentWrapperProps:l,isDismissable:i=!0,overlayBackground:u="rgb(0 0 0 / 40%)",overlayBlur:d=4,portalContainer:g,state:t,style:p,...n}){const c=B.useRef(null),{modalProps:P,underlayProps:q}=s.useModalOverlay({...n,isDismissable:i},t,c);if(!t.isOpen)return null;const x=q,f=P,M=l?.className,m=S(d),F={backdropFilter:m,WebkitBackdropFilter:m,...x.style};return r.jsx(s.Overlay,{portalContainer:g,children:r.jsx(s.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:r.jsx(b.Flex,{...x,align:"center",bg:u,height:"100dvh",justify:"center",p:{px:16,py:16},position:{type:"fixed",top:0,right:0,bottom:0,left:0,zIndex:50},style:F,width:"100%",children:r.jsx("div",{...f,className:y.cn("size-full outline-none",f.className),ref:c,children:r.jsxs(k.Box,{bg:"transparent",className:y.cn("relative size-full overflow-y-auto",o),height:"100dvh",style:p,width:"100%",...n,children:[i?R(t.close,a):null,r.jsx(b.Flex,{align:"center",height:"100%",justify:"center",width:"100%",...l,className:y.cn(M),children:e})]})})})})})}function v({children:e,customTrigger:o,defaultOpen:a,isOpen:l,label:i="Открыть",onOpenChange:u,triggerButtonProps:d,...g}){const t=O.useOverlayTriggerState({defaultOpen:a,isOpen:l,onOpenChange:u}),{triggerProps:p}=s.useOverlayTrigger({type:"dialog"},t),n=T(p),c=o?o({close:t.close,open:t.open,state:t,triggerProps:n}):r.jsx(j.Button,{...d,...n,type:"button",onClick:t.open,children:i});return r.jsxs(r.Fragment,{children:[c,r.jsx(h,{state:t,...g,children:e(t.close)})]})}const N=Object.assign(h,{Trigger:v});function R(e,o){return o?o(e):r.jsx(j.Button,{"aria-label":"Закрыть модальное окно",p:10,position:{type:"absolute",right:20,top:20,zIndex:1},size:"md",type:"button",variant:"secondary",onClick:e,children:r.jsx(z.XMarkIcon,{})})}function S(e){return typeof e=="number"?`blur(${e}px)`:e}function T(e){const o={...e};return delete o.onPress,s.mergeProps(o)}exports.Modal=N;exports.ModalRoot=h;exports.ModalTrigger=v;
|
package/dist/modal.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as t, jsxs as b, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import { useModalOverlay as B, Overlay as N, FocusScope as j, useOverlayTrigger as M, mergeProps as w } from "react-aria";
|
|
3
3
|
import { useOverlayTriggerState as C } from "react-stately";
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { Box as
|
|
4
|
+
import { useRef as D } from "react";
|
|
5
|
+
import { Box as I } from "./box.js";
|
|
6
6
|
import { Button as v } from "./button.js";
|
|
7
7
|
import { Flex as h } from "./flex.js";
|
|
8
|
-
import {
|
|
8
|
+
import { XMarkIcon as R } from "./icons.js";
|
|
9
9
|
import { c as m } from "./responsive-style.config-DFuATrIM.js";
|
|
10
10
|
function x({
|
|
11
11
|
children: e,
|
|
12
12
|
className: o,
|
|
13
|
-
closeButtonSlot:
|
|
13
|
+
closeButtonSlot: c,
|
|
14
14
|
contentWrapperProps: i,
|
|
15
15
|
isDismissable: l = !0,
|
|
16
|
-
overlayBackground:
|
|
16
|
+
overlayBackground: a = "rgb(0 0 0 / 40%)",
|
|
17
17
|
overlayBlur: u = 4,
|
|
18
18
|
portalContainer: p,
|
|
19
19
|
state: r,
|
|
20
20
|
style: d,
|
|
21
21
|
...n
|
|
22
22
|
}) {
|
|
23
|
-
const s =
|
|
23
|
+
const s = D(null), { modalProps: P, underlayProps: F } = B(
|
|
24
24
|
{ ...n, isDismissable: l },
|
|
25
25
|
r,
|
|
26
26
|
s
|
|
@@ -37,7 +37,7 @@ function x({
|
|
|
37
37
|
{
|
|
38
38
|
...g,
|
|
39
39
|
align: "center",
|
|
40
|
-
bg:
|
|
40
|
+
bg: a,
|
|
41
41
|
height: "100dvh",
|
|
42
42
|
justify: "center",
|
|
43
43
|
p: { px: 16, py: 16 },
|
|
@@ -51,7 +51,7 @@ function x({
|
|
|
51
51
|
className: m("size-full outline-none", f.className),
|
|
52
52
|
ref: s,
|
|
53
53
|
children: /* @__PURE__ */ b(
|
|
54
|
-
|
|
54
|
+
I,
|
|
55
55
|
{
|
|
56
56
|
bg: "transparent",
|
|
57
57
|
className: m("relative size-full overflow-y-auto", o),
|
|
@@ -60,7 +60,7 @@ function x({
|
|
|
60
60
|
width: "100%",
|
|
61
61
|
...n,
|
|
62
62
|
children: [
|
|
63
|
-
l ?
|
|
63
|
+
l ? S(r.close, c) : null,
|
|
64
64
|
/* @__PURE__ */ t(
|
|
65
65
|
h,
|
|
66
66
|
{
|
|
@@ -84,14 +84,14 @@ function x({
|
|
|
84
84
|
function T({
|
|
85
85
|
children: e,
|
|
86
86
|
customTrigger: o,
|
|
87
|
-
defaultOpen:
|
|
87
|
+
defaultOpen: c,
|
|
88
88
|
isOpen: i,
|
|
89
89
|
label: l = "Открыть",
|
|
90
|
-
onOpenChange:
|
|
90
|
+
onOpenChange: a,
|
|
91
91
|
triggerButtonProps: u,
|
|
92
92
|
...p
|
|
93
93
|
}) {
|
|
94
|
-
const r = C({ defaultOpen:
|
|
94
|
+
const r = C({ defaultOpen: c, isOpen: i, onOpenChange: a }), { triggerProps: d } = M({ type: "dialog" }, r), n = W(d), s = o ? o({
|
|
95
95
|
close: r.close,
|
|
96
96
|
open: r.open,
|
|
97
97
|
state: r,
|
|
@@ -114,7 +114,7 @@ function T({
|
|
|
114
114
|
const L = Object.assign(x, {
|
|
115
115
|
Trigger: T
|
|
116
116
|
});
|
|
117
|
-
function
|
|
117
|
+
function S(e, o) {
|
|
118
118
|
return o ? o(e) : /* @__PURE__ */ t(
|
|
119
119
|
v,
|
|
120
120
|
{
|