@shmidko61/lc-ui-kit 0.2.0 → 0.4.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/dist/accordion.js +1 -3
- package/dist/box/box.d.ts +1 -1
- package/dist/box/box.types.d.ts +2 -2
- package/dist/box.cjs +1 -1
- package/dist/box.js +128 -120
- package/dist/button/button.d.ts +1 -1
- package/dist/button/button.helpers.d.ts +1 -1
- package/dist/flex/flex.d.ts +1 -1
- package/dist/flex/flex.types.d.ts +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/grid.js +27 -29
- package/dist/icons/icons.d.ts +2 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +32 -31
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +64 -63
- package/dist/media-card.cjs +1 -1
- package/dist/media-card.js +42 -42
- package/dist/media-gallery/media-gallery.types.d.ts +1 -1
- package/dist/modal/modal.d.ts +1 -1
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +10 -8
- package/dist/select/select.d.ts +1 -1
- package/dist/select/select.helpers.d.ts +1 -1
- package/dist/shared/lib/cn.d.ts +1 -1
- package/dist/shared/responsive-style/responsive-style.types.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/dist/table/table.d.ts +3 -3
- package/dist/table/table.types.d.ts +2 -2
- package/dist/types/layout.types.d.ts +39 -0
- package/dist/typography/typography.d.ts +1 -1
- package/dist/typography/typography.helpers.d.ts +1 -1
- package/dist/ui-kit-provider.cjs +1 -1
- package/dist/ui-kit-provider.js +1 -1
- package/package.json +3 -3
- /package/dist/{types.cjs → types-entry.cjs} +0 -0
- /package/dist/{types.js → types-entry.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -3,19 +3,19 @@ import { Box as i } from "./box.js";
|
|
|
3
3
|
import { Button as s, buttonSizeBorderRadius as p, buttonSizeBoxProps as l, buttonSizeClassNames as I, buttonVariantClassNames as d, buttonVariants as m } from "./button.js";
|
|
4
4
|
import { U as x, u as b, a as f, b as u } from "./ui-kit-provider-C6Mk5g_7.js";
|
|
5
5
|
import { Flex as C } from "./flex.js";
|
|
6
|
-
import { Grid as
|
|
7
|
-
import { ArrowCornerIcon as y, ArrowIcon as B, BurgerIcon as P, CheckIcon as A, CopyIcon as w, DropDown as
|
|
8
|
-
import { Input as
|
|
9
|
-
import { MediaCard as
|
|
10
|
-
import { MediaGallery as
|
|
11
|
-
import { Pagination as
|
|
12
|
-
import { Picture as
|
|
13
|
-
import { Select as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
6
|
+
import { Grid as M, 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 G, EyeOpenIcon as v, FileIcon as D, GeminiStarIcon as K, GeoIcon as U, LockClosedIcon as V, LockOpenIcon as z, LogoutIcon as F, MailIcon as L, MediaMaxIcon as N, MediaPictureIcon as R, MediaTgIcon as H, MediaVkIcon as O, MediaWaIcon as W, NetUploadIcon as j, PaperclipIcon as E, PhoneIcon as X, PlusIcon as q, SaveIcon as J, SparkIcon as Q, SparkleIcon as Y, TelephoneIcon as Z, TimeClockIcon as _, TrashIcon as $, XMarkIcon as oo } from "./icons.js";
|
|
8
|
+
import { Input as ao } from "./input.js";
|
|
9
|
+
import { MediaCard as no } from "./media-card.js";
|
|
10
|
+
import { MediaGallery as io } from "./media-gallery.js";
|
|
11
|
+
import { Pagination as so } from "./pagination.js";
|
|
12
|
+
import { Picture as lo } from "./picture.js";
|
|
13
|
+
import { Select as mo } from "./select.js";
|
|
14
|
+
import { r as xo, a as bo } from "./responsive-style.config-DFuATrIM.js";
|
|
15
|
+
import { StatusBadge as uo } from "./status-badge.js";
|
|
16
|
+
import { Switch as Co } from "./switch.js";
|
|
17
|
+
import { D as Mo, T as go, a as ho, b as yo, c as Bo, d as Po, e as Ao, f as wo, g as Go, h as vo, i as Do, j as Ko, k as Uo } from "./table-container-BsE-uIE1.js";
|
|
18
|
+
import { Typography as zo, typographyVariants as Fo } from "./typography.js";
|
|
19
19
|
export {
|
|
20
20
|
a as Accordion,
|
|
21
21
|
r as AccordionItem,
|
|
@@ -27,64 +27,65 @@ export {
|
|
|
27
27
|
s as Button,
|
|
28
28
|
A as CheckIcon,
|
|
29
29
|
w as CopyIcon,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
Mo as DataTable,
|
|
31
|
+
G as DropDown,
|
|
32
|
+
v as EyeOpenIcon,
|
|
33
|
+
D as FileIcon,
|
|
34
34
|
C as Flex,
|
|
35
|
-
K as
|
|
36
|
-
|
|
35
|
+
K as GeminiStarIcon,
|
|
36
|
+
U as GeoIcon,
|
|
37
|
+
M as Grid,
|
|
37
38
|
g as GridItem,
|
|
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
|
-
|
|
39
|
+
ao as Input,
|
|
40
|
+
V as LockClosedIcon,
|
|
41
|
+
z as LockOpenIcon,
|
|
42
|
+
F as LogoutIcon,
|
|
43
|
+
L as MailIcon,
|
|
44
|
+
no as MediaCard,
|
|
45
|
+
io as MediaGallery,
|
|
46
|
+
N as MediaMaxIcon,
|
|
47
|
+
R as MediaPictureIcon,
|
|
48
|
+
H as MediaTgIcon,
|
|
49
|
+
O as MediaVkIcon,
|
|
50
|
+
W as MediaWaIcon,
|
|
51
|
+
j as NetUploadIcon,
|
|
52
|
+
so as Pagination,
|
|
53
|
+
E as PaperclipIcon,
|
|
54
|
+
X as PhoneIcon,
|
|
55
|
+
lo as Picture,
|
|
56
|
+
q as PlusIcon,
|
|
57
|
+
J as SaveIcon,
|
|
58
|
+
mo as Select,
|
|
59
|
+
Q as SparkIcon,
|
|
60
|
+
Y as SparkleIcon,
|
|
61
|
+
uo as StatusBadge,
|
|
62
|
+
Co as Switch,
|
|
63
|
+
go as Table,
|
|
64
|
+
ho as TableBody,
|
|
65
|
+
yo as TableCaption,
|
|
66
|
+
Bo as TableCell,
|
|
67
|
+
Po as TableContainer,
|
|
68
|
+
Ao as TableFooter,
|
|
69
|
+
wo as TableHead,
|
|
70
|
+
Go as TableHeader,
|
|
71
|
+
vo as TableRow,
|
|
72
|
+
Do as TableScrollArea,
|
|
73
|
+
Ko as TableStatus,
|
|
74
|
+
Uo as TableToolbar,
|
|
75
|
+
Z as TelephoneIcon,
|
|
76
|
+
_ as TimeClockIcon,
|
|
77
|
+
$ as TrashIcon,
|
|
78
|
+
zo as Typography,
|
|
78
79
|
x as UiKitProvider,
|
|
79
|
-
|
|
80
|
+
oo as XMarkIcon,
|
|
80
81
|
p as buttonSizeBorderRadius,
|
|
81
82
|
l as buttonSizeBoxProps,
|
|
82
83
|
I as buttonSizeClassNames,
|
|
83
84
|
d as buttonVariantClassNames,
|
|
84
85
|
m as buttonVariants,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
xo as responsiveBreakpointMinWidth,
|
|
87
|
+
bo as responsiveBreakpoints,
|
|
88
|
+
Fo as typographyVariants,
|
|
88
89
|
b as uiKitColorTokens,
|
|
89
90
|
f as uiKitTypographyTokens,
|
|
90
91
|
u as useUiKitConfig
|
package/dist/media-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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 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 x({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 p({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(x,{fileName:n,onDelete:a})]})}function b({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 f({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(b,{isPicked:a})})})}function j({className:r,fileName:n,imgUrl:t,isPicked:a,onDelete:c,onSubmit:l,variant:d}){return d==="img-pick"?e.jsx(f,{className:r,fileName:n,imgUrl:t,isPicked:a,onSubmit:l}):e.jsx(p,{className:r,fileName:n,imgUrl:t,onDelete:c})}exports.MediaCard=j;
|
package/dist/media-card.js
CHANGED
|
@@ -1,56 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "./responsive-style.config-DFuATrIM.js";
|
|
3
|
-
import {
|
|
3
|
+
import { MediaPictureIcon as u, XMarkIcon as p, CheckIcon as f } from "./icons.js";
|
|
4
4
|
import { Typography as b } from "./typography.js";
|
|
5
|
-
function x({ isPicked: e }) {
|
|
6
|
-
return /* @__PURE__ */ r(
|
|
7
|
-
"span",
|
|
8
|
-
{
|
|
9
|
-
className: i(
|
|
10
|
-
"absolute right-[4px] top-[4px] inline-flex size-[20px] items-center justify-center rounded-full ",
|
|
11
|
-
e ? " bg-[var(--color-primary-accent)] text-[var(--color-background-default)]" : "bg-[var(--color-background-default)] text-transparent"
|
|
12
|
-
),
|
|
13
|
-
"aria-hidden": "true",
|
|
14
|
-
children: /* @__PURE__ */ r(u, { className: "size-[18px]" })
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
5
|
function l({ fileName: e, imgUrl: n, children: a }) {
|
|
19
6
|
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(
|
|
7
|
+
n ? /* @__PURE__ */ r("img", { className: "w-full object-contain", src: n, alt: e }) : /* @__PURE__ */ r(u, { className: "size-[40px] text-[var(--color-text-secondary)]" }),
|
|
21
8
|
a
|
|
22
9
|
] });
|
|
23
10
|
}
|
|
24
|
-
function
|
|
25
|
-
className: e,
|
|
26
|
-
fileName: n,
|
|
27
|
-
imgUrl: a,
|
|
28
|
-
isPicked: o = !1,
|
|
29
|
-
onSubmit: t
|
|
30
|
-
}) {
|
|
31
|
-
return /* @__PURE__ */ r(
|
|
32
|
-
"button",
|
|
33
|
-
{
|
|
34
|
-
type: "button",
|
|
35
|
-
className: i(
|
|
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)]",
|
|
37
|
-
e
|
|
38
|
-
),
|
|
39
|
-
onClick: t,
|
|
40
|
-
children: /* @__PURE__ */ r(l, { fileName: n, imgUrl: a, children: /* @__PURE__ */ r(x, { isPicked: o }) })
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
function v({
|
|
11
|
+
function x({
|
|
45
12
|
fileName: e,
|
|
46
13
|
onDelete: n
|
|
47
14
|
}) {
|
|
48
15
|
return /* @__PURE__ */ c("div", { className: "flex justify-between items-center gap-[8px]", children: [
|
|
49
16
|
/* @__PURE__ */ r(b, { variant: "b3", children: e }),
|
|
50
|
-
n ? /* @__PURE__ */ r("button", { type: "button", "aria-label": `Удалить ${e}`, onClick: n, children: /* @__PURE__ */ r(
|
|
17
|
+
n ? /* @__PURE__ */ r("button", { type: "button", "aria-label": `Удалить ${e}`, onClick: n, children: /* @__PURE__ */ r(p, { className: "size-[16px]" }) }) : null
|
|
51
18
|
] });
|
|
52
19
|
}
|
|
53
|
-
function
|
|
20
|
+
function m({
|
|
54
21
|
className: e,
|
|
55
22
|
fileName: n,
|
|
56
23
|
imgUrl: a,
|
|
@@ -65,11 +32,44 @@ function g({
|
|
|
65
32
|
),
|
|
66
33
|
children: [
|
|
67
34
|
/* @__PURE__ */ r(l, { fileName: n, imgUrl: a }),
|
|
68
|
-
/* @__PURE__ */ r(
|
|
35
|
+
/* @__PURE__ */ r(x, { fileName: n, onDelete: o })
|
|
69
36
|
]
|
|
70
37
|
}
|
|
71
38
|
);
|
|
72
39
|
}
|
|
40
|
+
function v({ isPicked: e }) {
|
|
41
|
+
return /* @__PURE__ */ r(
|
|
42
|
+
"span",
|
|
43
|
+
{
|
|
44
|
+
className: i(
|
|
45
|
+
"absolute right-[4px] top-[4px] inline-flex size-[20px] items-center justify-center rounded-full ",
|
|
46
|
+
e ? " bg-[var(--color-primary-accent)] text-[var(--color-background-default)]" : "bg-[var(--color-background-default)] text-transparent"
|
|
47
|
+
),
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
children: /* @__PURE__ */ r(f, { className: "size-[18px]" })
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function g({
|
|
54
|
+
className: e,
|
|
55
|
+
fileName: n,
|
|
56
|
+
imgUrl: a,
|
|
57
|
+
isPicked: o = !1,
|
|
58
|
+
onSubmit: t
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ r(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
className: i(
|
|
65
|
+
"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)]",
|
|
66
|
+
e
|
|
67
|
+
),
|
|
68
|
+
onClick: t,
|
|
69
|
+
children: /* @__PURE__ */ r(l, { fileName: n, imgUrl: a, children: /* @__PURE__ */ r(v, { isPicked: o }) })
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
73
|
function w({
|
|
74
74
|
className: e,
|
|
75
75
|
fileName: n,
|
|
@@ -80,7 +80,7 @@ function w({
|
|
|
80
80
|
variant: s
|
|
81
81
|
}) {
|
|
82
82
|
return s === "img-pick" ? /* @__PURE__ */ r(
|
|
83
|
-
|
|
83
|
+
g,
|
|
84
84
|
{
|
|
85
85
|
className: e,
|
|
86
86
|
fileName: n,
|
|
@@ -89,7 +89,7 @@ function w({
|
|
|
89
89
|
onSubmit: d
|
|
90
90
|
}
|
|
91
91
|
) : /* @__PURE__ */ r(
|
|
92
|
-
|
|
92
|
+
m,
|
|
93
93
|
{
|
|
94
94
|
className: e,
|
|
95
95
|
fileName: n,
|
|
@@ -39,7 +39,7 @@ export interface MediaGalleryProps<TItem extends MediaGalleryItem = MediaGallery
|
|
|
39
39
|
/** Дополнительный className для grid-области с карточками. */
|
|
40
40
|
gridClassName?: string;
|
|
41
41
|
/** Список медиа-элементов для отображения. */
|
|
42
|
-
items: TItem
|
|
42
|
+
items: Array<TItem>;
|
|
43
43
|
/** Показывает loading-state вместо пустого состояния. */
|
|
44
44
|
isLoading?: boolean;
|
|
45
45
|
/** Responsive-настройки сетки для lg и шире. */
|
package/dist/modal/modal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, JSX, ReactNode } from 'react';
|
|
1
2
|
import { AriaModalOverlayProps } from 'react-aria';
|
|
2
3
|
import { OverlayTriggerProps as OverlayTriggerStateProps, OverlayTriggerState } from 'react-stately';
|
|
3
|
-
import { ButtonHTMLAttributes, JSX, ReactNode } from 'react';
|
|
4
4
|
import { BoxProps } from '../box/box';
|
|
5
5
|
import { ButtonProps } from '../button/button';
|
|
6
6
|
import { FlexProps } from '../flex/flex';
|
package/dist/modal.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"),O=require("react"),s=require("react-aria"),B=require("react-stately"),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=O.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=B.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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as b, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useRef as B } from "react";
|
|
3
|
+
import { useModalOverlay as N, Overlay as j, FocusScope as M, useOverlayTrigger as w, mergeProps as C } from "react-aria";
|
|
4
|
+
import { useOverlayTriggerState as D } from "react-stately";
|
|
5
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";
|
|
@@ -20,7 +20,7 @@ function x({
|
|
|
20
20
|
style: d,
|
|
21
21
|
...n
|
|
22
22
|
}) {
|
|
23
|
-
const s =
|
|
23
|
+
const s = B(null), { modalProps: P, underlayProps: F } = N(
|
|
24
24
|
{ ...n, isDismissable: l },
|
|
25
25
|
r,
|
|
26
26
|
s
|
|
@@ -32,7 +32,7 @@ function x({
|
|
|
32
32
|
WebkitBackdropFilter: y,
|
|
33
33
|
...g.style
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */ t(
|
|
35
|
+
return /* @__PURE__ */ t(j, { portalContainer: p, children: /* @__PURE__ */ t(M, { contain: !0, restoreFocus: !0, autoFocus: !0, children: /* @__PURE__ */ t(
|
|
36
36
|
h,
|
|
37
37
|
{
|
|
38
38
|
...g,
|
|
@@ -91,7 +91,7 @@ function T({
|
|
|
91
91
|
triggerButtonProps: u,
|
|
92
92
|
...p
|
|
93
93
|
}) {
|
|
94
|
-
const r =
|
|
94
|
+
const r = D({ defaultOpen: c, isOpen: i, onOpenChange: a }), { triggerProps: d } = w({ type: "dialog" }, r), n = W(d), s = o ? o({
|
|
95
95
|
close: r.close,
|
|
96
96
|
open: r.open,
|
|
97
97
|
state: r,
|
|
@@ -133,8 +133,10 @@ function V(e) {
|
|
|
133
133
|
return typeof e == "number" ? `blur(${e}px)` : e;
|
|
134
134
|
}
|
|
135
135
|
function W(e) {
|
|
136
|
-
const o = {
|
|
137
|
-
|
|
136
|
+
const o = {
|
|
137
|
+
...e
|
|
138
|
+
};
|
|
139
|
+
return delete o.onPress, C(o);
|
|
138
140
|
}
|
|
139
141
|
export {
|
|
140
142
|
L as Modal,
|
package/dist/select/select.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement
|
|
|
40
40
|
/** Callback с новым значением без synthetic event. */
|
|
41
41
|
onValueChange?: (value: string) => void;
|
|
42
42
|
/** Список пунктов select. */
|
|
43
|
-
options?: SelectOption
|
|
43
|
+
options?: Array<SelectOption>;
|
|
44
44
|
/** Текст, который показывается когда значение не выбрано. */
|
|
45
45
|
placeholder?: string;
|
|
46
46
|
/** Полная замена option-рендера. Получает готовые optionProps и defaultOption. */
|
|
@@ -11,4 +11,4 @@ import { SelectOption } from './select.types';
|
|
|
11
11
|
* нет, helper читает React children, оставляет только валидные элементы с
|
|
12
12
|
* `value` и собирает из них `SelectOption`.
|
|
13
13
|
*/
|
|
14
|
-
export declare function normalizeOptions(options: SelectOption
|
|
14
|
+
export declare function normalizeOptions(options: Array<SelectOption> | undefined, children: ReactNode): Array<SelectOption>;
|
package/dist/shared/lib/cn.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
-
export declare function cn(...inputs: ClassValue
|
|
2
|
+
export declare function cn(...inputs: Array<ClassValue>): string;
|