@dss-kit/ui-kit 1.0.2 → 1.0.4
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/components/builders/Dialog/Dialog.const.d.ts +9 -0
- package/dist/components/builders/Dialog/Dialog.const.js +4 -0
- package/dist/components/builders/Dialog/Dialog.context.d.ts +12 -0
- package/dist/components/builders/{Modal/context.js → Dialog/Dialog.context.js} +5 -5
- package/dist/components/builders/Dialog/Dialog.parts.d.ts +11 -0
- package/dist/components/builders/Dialog/Dialog.parts.js +11 -0
- package/dist/components/builders/Dialog/Dialog.types.d.ts +44 -0
- package/dist/components/builders/Dialog/DialogCloseButton/DialogCloseButton.d.ts +10 -0
- package/dist/components/builders/Dialog/DialogCloseButton/DialogCloseButton.js +34 -0
- package/dist/components/builders/Dialog/DialogCloseButton/index.d.ts +2 -0
- package/dist/components/builders/{Modal/ModalFooter/ModalFooter.d.ts → Dialog/DialogFooter/DialogFooter.d.ts} +13 -22
- package/dist/components/builders/Dialog/DialogFooter/DialogFooter.js +48 -0
- package/dist/components/builders/Dialog/DialogFooter/index.d.ts +2 -0
- package/dist/components/builders/{Modal/ModalHeader/ModalHeader.d.ts → Dialog/DialogHeader/DialogHeader.d.ts} +10 -6
- package/dist/components/builders/Dialog/DialogHeader/DialogHeader.js +97 -0
- package/dist/components/builders/Dialog/DialogHeader/index.d.ts +2 -0
- package/dist/components/builders/{Modal/ModalMain/ModalMain.d.ts → Dialog/DialogMain/DialogMain.d.ts} +18 -17
- package/dist/components/builders/{Modal/ModalMain/ModalMain.js → Dialog/DialogMain/DialogMain.js} +39 -29
- package/dist/components/builders/Dialog/DialogMain/index.d.ts +2 -0
- package/dist/components/builders/Dialog/DialogMain/styles.d.ts +6 -0
- package/dist/components/builders/{Modal/ModalMain → Dialog/DialogMain}/styles.js +16 -0
- package/dist/components/builders/Dialog/hooks/index.d.ts +3 -0
- package/dist/components/builders/Dialog/hooks/useBackdropClose.d.ts +10 -0
- package/dist/components/builders/Dialog/hooks/useBackdropClose.js +15 -0
- package/dist/components/builders/Dialog/hooks/useBodyScrollLock.d.ts +6 -0
- package/dist/components/builders/Dialog/hooks/useBodyScrollLock.js +13 -0
- package/dist/components/builders/Dialog/hooks/useCloseOnEsc.d.ts +6 -0
- package/dist/components/builders/Dialog/hooks/useCloseOnEsc.js +21 -0
- package/dist/components/builders/Dialog/index.d.ts +10 -0
- package/dist/components/builders/Modal/Modal.d.ts +8 -28
- package/dist/components/builders/Modal/Modal.js +50 -78
- package/dist/components/builders/Modal/index.d.ts +6 -11
- package/dist/components/builders/Modal/index.js +7 -9
- package/dist/components/builders/Modal/styles.js +6 -7
- package/dist/components/builders/Sheet/Sheet.const.d.ts +50 -0
- package/dist/components/builders/Sheet/Sheet.const.js +38 -0
- package/dist/components/builders/Sheet/Sheet.d.ts +12 -0
- package/dist/components/builders/Sheet/Sheet.js +55 -0
- package/dist/components/builders/Sheet/Sheet.types.d.ts +82 -0
- package/dist/components/builders/Sheet/Sheet.utils.d.ts +34 -0
- package/dist/components/builders/Sheet/Sheet.utils.js +50 -0
- package/dist/components/builders/Sheet/SheetLayer.d.ts +22 -0
- package/dist/components/builders/Sheet/SheetLayer.js +115 -0
- package/dist/components/builders/Sheet/hooks/index.d.ts +2 -0
- package/dist/components/builders/Sheet/hooks/useSheetGesture.d.ts +24 -0
- package/dist/components/builders/Sheet/hooks/useSheetGesture.js +67 -0
- package/dist/components/builders/Sheet/hooks/useSheetMotion.d.ts +31 -0
- package/dist/components/builders/Sheet/hooks/useSheetMotion.js +74 -0
- package/dist/components/builders/Sheet/hooks/useSheetPointer.d.ts +31 -0
- package/dist/components/builders/Sheet/hooks/useSheetPointer.js +81 -0
- package/dist/components/builders/Sheet/index.d.ts +15 -0
- package/dist/components/builders/Sheet/index.js +9 -0
- package/dist/components/builders/Sheet/styles.d.ts +17 -0
- package/dist/components/builders/Sheet/styles.js +135 -0
- package/dist/components/builders/Table/TablePagination/TablePagination.js +1 -1
- package/dist/components/builders/Text/Text.d.ts +1 -1
- package/dist/components/builders/index.d.ts +1 -0
- package/dist/components/controls/Checkbox/Checkbox.js +6 -6
- package/dist/components/controls/Select/Select.js +6 -6
- package/dist/components/controls/Switch/Switch.d.ts +10 -6
- package/dist/components/controls/Switch/Switch.js +109 -86
- package/dist/components/controls/Switch/styles.d.ts +3 -2
- package/dist/components/controls/Switch/styles.js +76 -73
- package/dist/index.js +93 -91
- package/dist/ui-kit.cjs +8 -8
- package/dist/utils/hooks/useLatestRef.d.ts +6 -0
- package/dist/utils/hooks/useLatestRef.js +10 -0
- package/package.json +1 -1
- package/dist/components/builders/Modal/ModalFooter/ModalFooter.js +0 -35
- package/dist/components/builders/Modal/ModalFooter/index.d.ts +0 -2
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.js +0 -86
- package/dist/components/builders/Modal/ModalHeader/index.d.ts +0 -2
- package/dist/components/builders/Modal/ModalMain/index.d.ts +0 -2
- package/dist/components/builders/Modal/ModalMain/styles.d.ts +0 -3
- package/dist/components/builders/Modal/context.d.ts +0 -8
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ref с последним значением — для колбэков, которые вызываются вне рендера
|
|
3
|
+
* (события клавиатуры и указателя, завершение анимации) и должны видеть
|
|
4
|
+
* актуальные пропсы.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useLatestRef<T>(value: T): import('react').MutableRefObject<T>;
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { cx as c, css as f } from "@emotion/css";
|
|
3
|
-
import { forwardRef as d } from "react";
|
|
4
|
-
import { Box as n } from "../../Box/Box.js";
|
|
5
|
-
import { theme as o } from "../../../../utils/theme/index.js";
|
|
6
|
-
const x = f({
|
|
7
|
-
borderTop: `1px solid ${o.color.border.neutral_alpha_basic}`
|
|
8
|
-
}), u = d(
|
|
9
|
-
({
|
|
10
|
-
children: r,
|
|
11
|
-
row: t = !0,
|
|
12
|
-
flex: e = !0,
|
|
13
|
-
gap: a = o.spacing.lg,
|
|
14
|
-
p: m = o.spacing["2xl"],
|
|
15
|
-
className: s,
|
|
16
|
-
// Остальные пропсы передаются в компонент Box
|
|
17
|
-
...p
|
|
18
|
-
}, l) => /* @__PURE__ */ i(
|
|
19
|
-
n,
|
|
20
|
-
{
|
|
21
|
-
flex: e,
|
|
22
|
-
row: t,
|
|
23
|
-
gap: a,
|
|
24
|
-
p: m,
|
|
25
|
-
className: c(x, s),
|
|
26
|
-
ref: l,
|
|
27
|
-
...p,
|
|
28
|
-
children: r
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
u.displayName = "ModalFooter";
|
|
33
|
-
export {
|
|
34
|
-
u as ModalFooter
|
|
35
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as v } from "react";
|
|
3
|
-
import W from "../../../../assets/svg/modal/close.svg.js";
|
|
4
|
-
import { useModalContext as B } from "../context.js";
|
|
5
|
-
import { Box as t } from "../../Box/Box.js";
|
|
6
|
-
import { theme as r } from "../../../../utils/theme/index.js";
|
|
7
|
-
import { Text as i } from "../../Text/Text.js";
|
|
8
|
-
import { IconButton as M } from "../../../controls/IconButton/IconButton.js";
|
|
9
|
-
const j = v(
|
|
10
|
-
({
|
|
11
|
-
title: a,
|
|
12
|
-
subtitle: l,
|
|
13
|
-
w: m = "full",
|
|
14
|
-
p: s,
|
|
15
|
-
py: d,
|
|
16
|
-
px: n = r.spacing["2xl"],
|
|
17
|
-
pt: c = r.spacing["2xl"],
|
|
18
|
-
pb: p = r.spacing.lg,
|
|
19
|
-
row: f = !0,
|
|
20
|
-
justifyContent: h = "space-between",
|
|
21
|
-
showCloseButton: b = !1,
|
|
22
|
-
className: g,
|
|
23
|
-
titleClassName: x,
|
|
24
|
-
subtitleClassName: u,
|
|
25
|
-
closeButtonClassName: N
|
|
26
|
-
}, y) => {
|
|
27
|
-
const { onClose: C } = B();
|
|
28
|
-
return /* @__PURE__ */ e(
|
|
29
|
-
t,
|
|
30
|
-
{
|
|
31
|
-
w: m,
|
|
32
|
-
p: s,
|
|
33
|
-
py: d,
|
|
34
|
-
px: n,
|
|
35
|
-
pt: c,
|
|
36
|
-
pb: p,
|
|
37
|
-
row: f,
|
|
38
|
-
justifyContent: h,
|
|
39
|
-
ref: y,
|
|
40
|
-
borderColor: r.color.border.neutral_alpha_basic,
|
|
41
|
-
borderWidth: 0,
|
|
42
|
-
borderBottomWidth: 1,
|
|
43
|
-
borderStyle: "solid",
|
|
44
|
-
className: g,
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ e(t, { gap: r.spacing.sm, children: [
|
|
47
|
-
/* @__PURE__ */ o(
|
|
48
|
-
i,
|
|
49
|
-
{
|
|
50
|
-
variant: "title-3",
|
|
51
|
-
colorName: "primary",
|
|
52
|
-
fontWeight: "semibold",
|
|
53
|
-
className: x,
|
|
54
|
-
children: a
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
/* @__PURE__ */ o(
|
|
58
|
-
i,
|
|
59
|
-
{
|
|
60
|
-
variant: "body-1",
|
|
61
|
-
colorName: "tertiary",
|
|
62
|
-
fontWeight: "medium",
|
|
63
|
-
className: u,
|
|
64
|
-
children: l
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
] }),
|
|
68
|
-
b && /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
69
|
-
M,
|
|
70
|
-
{
|
|
71
|
-
onClick: C,
|
|
72
|
-
color: "neutral",
|
|
73
|
-
className: N,
|
|
74
|
-
size: "xs",
|
|
75
|
-
children: /* @__PURE__ */ o(W, {})
|
|
76
|
-
}
|
|
77
|
-
) })
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
j.displayName = "ModalHeader";
|
|
84
|
-
export {
|
|
85
|
-
j as ModalHeader
|
|
86
|
-
};
|