@dss-kit/ui-kit 0.3.10 → 1.0.1
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 +29 -29
- package/dist/components/builders/Modal/Modal.js +3 -3
- package/dist/components/builders/Modal/ModalFooter/ModalFooter.js +7 -7
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.js +15 -15
- package/dist/components/builders/Modal/ModalMain/styles.js +3 -3
- package/dist/components/builders/Modal/styles.js +2 -2
- package/dist/components/builders/Table/Table.js +66 -58
- package/dist/components/builders/Table/Table.utils.js +5 -5
- package/dist/components/builders/Table/TableBodyRow/TableBodyRow.js +5 -5
- package/dist/components/builders/Table/TableHeadRow/TableHeadRow.js +4 -4
- package/dist/components/builders/Table/TablePagination/TablePagination.js +44 -44
- package/dist/components/builders/Table/TableWrapper/TableWrapper.js +19 -19
- package/dist/components/charts/LineChart/constants.js +16 -16
- package/dist/components/charts/LineChart/utils.js +2 -2
- package/dist/components/charts/PieProgressChart/constants.js +16 -10
- package/dist/components/controls/Button/Button.js +35 -35
- package/dist/components/controls/Button/styles.js +4 -4
- package/dist/components/controls/Checkbox/styles.js +7 -7
- package/dist/components/controls/IconButton/styles.js +27 -27
- package/dist/components/controls/Input/styles.js +10 -10
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.js +28 -28
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.js +13 -13
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.styles.js +2 -2
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.js +43 -43
- package/dist/components/controls/MarkdownTextEditor/nodes/CustomLinkNode/parts/CustomLinkNodeComponent/CustomLinkNodeComponent.styles.js +3 -3
- package/dist/components/controls/MarkdownTextEditor/nodes/ImageRowNode/parts/ImageRowNodeComponent/ImageRowNodeComponent.styles.js +2 -2
- package/dist/components/controls/MarkdownTextEditor/themes/editor.theme.js +1 -1
- package/dist/components/controls/OtpInput/styles.js +11 -11
- package/dist/components/controls/RadioGroup/Radio.js +48 -48
- package/dist/components/controls/SegmentControl/SegmentControl.js +12 -12
- package/dist/components/controls/SegmentControl/styles.js +8 -8
- package/dist/components/controls/Select/styles.js +19 -19
- package/dist/components/controls/Switch/Switch.d.ts +3 -3
- package/dist/components/controls/Switch/styles.d.ts +1 -0
- package/dist/components/controls/Switch/styles.js +44 -34
- package/dist/components/controls/Tabs/TabItem/TabItem.d.ts +5 -0
- package/dist/components/controls/Tabs/TabItem/TabItem.js +68 -49
- package/dist/components/controls/Tabs/Tabs.d.ts +6 -1
- package/dist/components/controls/Tabs/Tabs.js +28 -25
- package/dist/components/shared/Avatar/Avatar.js +8 -8
- package/dist/components/shared/Badge/Badge.js +40 -40
- package/dist/components/shared/Counter/Counter.const.d.ts +6 -0
- package/dist/components/shared/Counter/Counter.const.js +16 -0
- package/dist/components/shared/Counter/Counter.d.ts +11 -0
- package/dist/components/shared/Counter/Counter.js +58 -0
- package/dist/components/shared/Counter/Counter.types.d.ts +29 -0
- package/dist/components/shared/Counter/Counter.utils.d.ts +2 -0
- package/dist/components/shared/Counter/Counter.utils.js +6 -0
- package/dist/components/shared/Counter/index.d.ts +2 -0
- package/dist/components/shared/Counter/styles.d.ts +2 -0
- package/dist/components/shared/Counter/styles.js +11 -0
- package/dist/components/shared/Dot/Dot.const.d.ts +5 -0
- package/dist/components/shared/Dot/Dot.const.js +15 -0
- package/dist/components/shared/Dot/Dot.d.ts +10 -0
- package/dist/components/shared/Dot/Dot.js +32 -0
- package/dist/components/shared/Dot/Dot.types.d.ts +17 -0
- package/dist/components/shared/Dot/index.d.ts +2 -0
- package/dist/components/shared/Dot/styles.d.ts +1 -0
- package/dist/components/shared/Dot/styles.js +7 -0
- package/dist/components/shared/Hint/styles.js +6 -6
- package/dist/components/shared/MarkdownText/MarkdownText.styles.js +4 -4
- package/dist/components/shared/Popover/PopoverContent/PopoverContent.js +2 -2
- package/dist/components/shared/Skeleton/Skeleton.js +11 -11
- package/dist/components/shared/Tag/Tag.js +14 -14
- package/dist/components/shared/Toast/Toast.js +30 -30
- package/dist/components/shared/Tooltip/Tooltip.js +28 -28
- package/dist/components/shared/Tooltip/constants.js +3 -3
- package/dist/components/shared/index.d.ts +2 -0
- package/dist/index.js +55 -48
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.const.d.ts +8 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.d.ts +12 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.js +12 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +1 -1
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.js +37 -26
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts +30 -5
- package/dist/providers/ThemeProviderScoped/index.d.ts +1 -0
- package/dist/root.css +1 -1
- package/dist/styles/utils/breakpoints/base.scss +11 -11
- package/dist/styles/utils/breakpoints/index.scss +3 -3
- package/dist/styles/utils/breakpoints/screen.scss +61 -61
- package/dist/styles/utils/breakpoints/semantic.scss +31 -31
- package/dist/styles/utils/fonts/font-family.scss +3 -3
- package/dist/styles/utils/fonts/index.scss +1 -1
- package/dist/styles/utils/index.scss +5 -5
- package/dist/styles/utils/size/index.scss +1 -1
- package/dist/styles/utils/size/modifiers.scss +40 -40
- package/dist/styles/utils/style/index.scss +1 -1
- package/dist/styles/utils/style/variants.scss +34 -34
- package/dist/styles/utils/typography/_font-weight.scss +33 -33
- package/dist/styles/utils/typography/_variants.scss +85 -85
- package/dist/styles/utils/typography/index.scss +2 -2
- package/dist/ui-kit.cjs +8 -8
- package/dist/ui-kit.css +1 -1
- package/dist/utils/theme/index.d.ts +141 -141
- package/dist/utils/theme/index.js +14 -14
- package/dist/utils/theme/palette.d.ts +184 -0
- package/dist/utils/theme/palette.js +187 -0
- package/package.json +94 -94
- package/dist/providers/ThemeProviderScoped/styles.module.scss.js +0 -7
- package/dist/utils/theme/color.d.ts +0 -184
- package/dist/utils/theme/color.js +0 -187
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as T, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { css as x, cx as w } from "@emotion/css";
|
|
3
3
|
import { forwardRef as j, useRef as k, useMemo as B } from "react";
|
|
4
4
|
import M from "../../../assets/svg/shared/close-outline.svg.js";
|
|
@@ -35,34 +35,34 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
35
35
|
className: v,
|
|
36
36
|
labelClassName: y,
|
|
37
37
|
avatarClassName: b,
|
|
38
|
-
iconClassName:
|
|
38
|
+
iconClassName: _,
|
|
39
39
|
deleteButtonClassName: N
|
|
40
40
|
}, a) => {
|
|
41
41
|
const R = k(null), p = B(() => {
|
|
42
42
|
switch (s) {
|
|
43
43
|
case "primary":
|
|
44
44
|
return {
|
|
45
|
-
bg: t.status.
|
|
45
|
+
bg: t.status.neutral_tint_low,
|
|
46
46
|
color: t.text.primary
|
|
47
47
|
};
|
|
48
48
|
case "accent":
|
|
49
49
|
return {
|
|
50
|
-
bg: t.status.
|
|
50
|
+
bg: t.status.accent_tint_low,
|
|
51
51
|
color: t.text.accent
|
|
52
52
|
};
|
|
53
53
|
case "warning":
|
|
54
54
|
return {
|
|
55
|
-
bg: t.status.
|
|
55
|
+
bg: t.status.warning_tint_low,
|
|
56
56
|
color: t.text.warning
|
|
57
57
|
};
|
|
58
58
|
case "positive":
|
|
59
59
|
return {
|
|
60
|
-
bg: t.status.
|
|
60
|
+
bg: t.status.positive_tint_low,
|
|
61
61
|
color: t.text.positive
|
|
62
62
|
};
|
|
63
63
|
case "negative":
|
|
64
64
|
return {
|
|
65
|
-
bg: t.status.
|
|
65
|
+
bg: t.status.negative_tint_low,
|
|
66
66
|
color: t.text.negative
|
|
67
67
|
};
|
|
68
68
|
case "transfer":
|
|
@@ -72,11 +72,11 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
72
72
|
};
|
|
73
73
|
default:
|
|
74
74
|
return {
|
|
75
|
-
bg: t.status.
|
|
75
|
+
bg: t.status.neutral_tint_low,
|
|
76
76
|
color: t.text.primary
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
}, [s]),
|
|
79
|
+
}, [s]), C = x({
|
|
80
80
|
cursor: n ? "not-allowed" : l ? "pointer" : "default",
|
|
81
81
|
opacity: n ? 0.5 : 1,
|
|
82
82
|
userSelect: "none",
|
|
@@ -85,13 +85,13 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
85
85
|
"&:hover": n ? void 0 : {
|
|
86
86
|
backgroundColor: p.bg
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
88
|
+
}), $ = x({
|
|
89
89
|
display: "inline-flex",
|
|
90
90
|
cursor: "pointer",
|
|
91
91
|
opacity: 0.6,
|
|
92
92
|
"&:hover": { opacity: 1 }
|
|
93
93
|
});
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ T(
|
|
95
95
|
m,
|
|
96
96
|
{
|
|
97
97
|
ref: (r) => {
|
|
@@ -108,7 +108,7 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
108
108
|
backgroundColor: p.bg,
|
|
109
109
|
color: p.color,
|
|
110
110
|
onClick: l,
|
|
111
|
-
className: w(
|
|
111
|
+
className: w(C, v),
|
|
112
112
|
children: [
|
|
113
113
|
l && /* @__PURE__ */ o(S, {}),
|
|
114
114
|
f && /* @__PURE__ */ o(
|
|
@@ -122,7 +122,7 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
122
122
|
children: f
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
d && /* @__PURE__ */ o(m, { className:
|
|
125
|
+
d && /* @__PURE__ */ o(m, { className: _, children: d }),
|
|
126
126
|
typeof i == "string" ? /* @__PURE__ */ o(
|
|
127
127
|
h,
|
|
128
128
|
{
|
|
@@ -137,7 +137,7 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
137
137
|
g && !n && /* @__PURE__ */ o(
|
|
138
138
|
h,
|
|
139
139
|
{
|
|
140
|
-
className: w(
|
|
140
|
+
className: w($, N),
|
|
141
141
|
colorName: s,
|
|
142
142
|
onClick: (r) => {
|
|
143
143
|
r.stopPropagation(), g(r);
|
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cx as t, css as u } from "@emotion/css";
|
|
3
|
-
import { forwardRef as T, useMemo as
|
|
3
|
+
import { forwardRef as T, useMemo as i } from "react";
|
|
4
4
|
import s from "../../../assets/svg/toast/alert-triangle.svg.js";
|
|
5
5
|
import f from "../../../assets/svg/toast/check-circle.svg.js";
|
|
6
6
|
import j from "../../../assets/svg/toast/info-circle.svg.js";
|
|
7
7
|
import v from "../../../assets/svg/toast/x.svg.js";
|
|
8
8
|
import { theme as r } from "../../../utils/theme/index.js";
|
|
9
|
-
import { Box as
|
|
9
|
+
import { Box as c } from "../../builders/Box/Box.js";
|
|
10
10
|
import { Text as m } from "../../builders/Text/Text.js";
|
|
11
|
-
const
|
|
11
|
+
const W = {
|
|
12
12
|
positive: /* @__PURE__ */ e(f, {}),
|
|
13
13
|
negative: /* @__PURE__ */ e(s, {}),
|
|
14
14
|
warning: /* @__PURE__ */ e(s, {}),
|
|
15
15
|
info: /* @__PURE__ */ e(j, {}),
|
|
16
16
|
neutral: /* @__PURE__ */ e(f, {})
|
|
17
|
-
},
|
|
18
|
-
boxShadow: `0 4px 20px 0 ${r.color.effect.
|
|
19
|
-
}),
|
|
17
|
+
}, A = u({
|
|
18
|
+
boxShadow: `0 4px 20px 0 ${r.color.effect.shadow_m}`
|
|
19
|
+
}), M = u({
|
|
20
20
|
cursor: "pointer",
|
|
21
21
|
"&:hover": {
|
|
22
22
|
opacity: 0.8
|
|
23
23
|
}
|
|
24
24
|
}), K = T(
|
|
25
25
|
({
|
|
26
|
-
title:
|
|
26
|
+
title: p,
|
|
27
27
|
subtitle: l,
|
|
28
|
-
icon:
|
|
28
|
+
icon: g,
|
|
29
29
|
variant: o = "neutral",
|
|
30
|
-
w:
|
|
31
|
-
onClose:
|
|
30
|
+
w: a = "full",
|
|
31
|
+
onClose: d,
|
|
32
32
|
className: y,
|
|
33
33
|
iconBoxClassName: h,
|
|
34
34
|
titleClassName: x,
|
|
35
35
|
subtitleClassName: C,
|
|
36
|
-
closeIconClassName:
|
|
37
|
-
...
|
|
38
|
-
},
|
|
39
|
-
const
|
|
36
|
+
closeIconClassName: _,
|
|
37
|
+
...b
|
|
38
|
+
}, w) => {
|
|
39
|
+
const S = i(() => o === "neutral" ? r.color.icon.accent : o === "info" ? r.color.icon.accent : o === "positive" ? r.color.icon.positive : o === "negative" ? r.color.icon.negative : o === "warning" ? r.color.icon.warning : r.color.icon.inverse, [o]), N = i(() => o === "neutral" ? r.color.icon.tertiary : r.color.icon.inverse, [o]), R = i(() => o === "neutral" ? r.color.fill.accent_secondary : r.color.fill.bg_primary, [o]), k = i(() => o === "neutral" ? r.color.fill.bg_primary : o === "info" ? r.color.fill.accent_primary : o === "positive" ? r.color.fill.positive_primary : o === "negative" ? r.color.fill.negative_primary : o === "warning" ? r.color.fill.warning_primary : r.color.fill.accent_primary, [o]), I = i(() => o === "neutral" ? r.color.text.primary : r.color.text.primary_inverse, [o]), B = i(() => o === "neutral" ? r.color.text.tertiary_inverse : r.color.text.primary_inverse, [o]);
|
|
40
40
|
return /* @__PURE__ */ n(
|
|
41
|
-
|
|
41
|
+
c,
|
|
42
42
|
{
|
|
43
43
|
row: !0,
|
|
44
|
-
w:
|
|
45
|
-
ref:
|
|
44
|
+
w: a,
|
|
45
|
+
ref: w,
|
|
46
46
|
p: r.spacing.md,
|
|
47
47
|
gap: r.spacing.md,
|
|
48
|
-
backgroundColor:
|
|
48
|
+
backgroundColor: k,
|
|
49
49
|
borderRadius: r.cornerRadius.lg,
|
|
50
|
-
className: t(
|
|
51
|
-
...
|
|
50
|
+
className: t(A, y),
|
|
51
|
+
...b,
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ e(
|
|
54
|
-
|
|
54
|
+
c,
|
|
55
55
|
{
|
|
56
56
|
w: 48,
|
|
57
57
|
h: 48,
|
|
58
58
|
center: !0,
|
|
59
|
-
backgroundColor:
|
|
59
|
+
backgroundColor: R,
|
|
60
60
|
borderRadius: r.cornerRadius.md,
|
|
61
|
-
style: { color:
|
|
61
|
+
style: { color: S },
|
|
62
62
|
className: h,
|
|
63
|
-
children:
|
|
63
|
+
children: g || W[o]
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
|
-
/* @__PURE__ */ n(
|
|
66
|
+
/* @__PURE__ */ n(c, { flex: 1, children: [
|
|
67
67
|
/* @__PURE__ */ e(
|
|
68
68
|
m,
|
|
69
69
|
{
|
|
70
70
|
variant: "body-1",
|
|
71
71
|
fontWeight: "semibold",
|
|
72
|
-
color:
|
|
72
|
+
color: I,
|
|
73
73
|
className: x,
|
|
74
|
-
children:
|
|
74
|
+
children: p
|
|
75
75
|
}
|
|
76
76
|
),
|
|
77
77
|
l && /* @__PURE__ */ e(
|
|
@@ -85,13 +85,13 @@ const M = {
|
|
|
85
85
|
}
|
|
86
86
|
)
|
|
87
87
|
] }),
|
|
88
|
-
/* @__PURE__ */ e(
|
|
88
|
+
/* @__PURE__ */ e(c, { onClick: d, children: /* @__PURE__ */ e(
|
|
89
89
|
v,
|
|
90
90
|
{
|
|
91
91
|
width: 24,
|
|
92
92
|
height: 24,
|
|
93
|
-
color:
|
|
94
|
-
className: t(
|
|
93
|
+
color: N,
|
|
94
|
+
className: t(M, _)
|
|
95
95
|
}
|
|
96
96
|
) })
|
|
97
97
|
]
|
|
@@ -3,26 +3,26 @@ import { css as c, cx as T, keyframes as ho } from "@emotion/css";
|
|
|
3
3
|
import { useFloating as go, offset as wo, flip as yo, shift as So, arrow as xo, autoUpdate as vo, useHover as bo, useFocus as Ao, useDismiss as Oo, useRole as Ro, useInteractions as To, useMergeRefs as Do } from "@floating-ui/react";
|
|
4
4
|
import { useState as D, useId as Po, useCallback as ko, useMemo as Eo, cloneElement as Fo } from "react";
|
|
5
5
|
import { tooltipStyles as P, tooltipArrowShapes as Co, tooltipArrowOverlap as p, tooltipArrowHeight as Io, tooltipArrowSize as No } from "./constants.js";
|
|
6
|
-
import { getTooltipArrowPosition as
|
|
6
|
+
import { getTooltipArrowPosition as Ho, getTooltipRadiusOverrides as Ko, getTooltipArrowDimensions as Mo, getTooltipArrowShapeKey as $o } from "./utils.js";
|
|
7
7
|
import { Portal as jo } from "../../builders/Portal/Portal.js";
|
|
8
8
|
import { Box as w } from "../../builders/Box/Box.js";
|
|
9
9
|
import { theme as zo } from "../../../utils/theme/index.js";
|
|
10
10
|
import { Text as Bo } from "../../builders/Text/Text.js";
|
|
11
|
-
const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo,
|
|
11
|
+
const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, _o = ho`
|
|
12
12
|
from { opacity: 0; transform: translateY(2px); }
|
|
13
13
|
to { opacity: 1; transform: translateY(0); }
|
|
14
|
-
`,
|
|
15
|
-
boxShadow: `0 4px 20px 0 ${Uo.effect.
|
|
16
|
-
animation: `${
|
|
14
|
+
`, qo = c({
|
|
15
|
+
boxShadow: `0 4px 20px 0 ${Uo.effect.shadow_m}`,
|
|
16
|
+
animation: `${_o} 0.16s ease-out`,
|
|
17
17
|
fontSize: "12px",
|
|
18
18
|
lineHeight: "16px",
|
|
19
19
|
fontWeight: "500",
|
|
20
20
|
wordBreak: "break-word"
|
|
21
|
-
}),
|
|
21
|
+
}), Go = c({
|
|
22
22
|
position: "absolute",
|
|
23
23
|
// Треугольник через clip-path
|
|
24
24
|
clipPath: "var(--tooltip-arrow-shape)"
|
|
25
|
-
}),
|
|
25
|
+
}), Jo = ({
|
|
26
26
|
color: d = "primary",
|
|
27
27
|
children: n,
|
|
28
28
|
content: s,
|
|
@@ -35,9 +35,9 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
35
35
|
offset: I = 5,
|
|
36
36
|
showArrow: a = !0,
|
|
37
37
|
openDelay: N = 400,
|
|
38
|
-
closeDelay:
|
|
39
|
-
closeOnEsc:
|
|
40
|
-
zIndex:
|
|
38
|
+
closeDelay: H = 0,
|
|
39
|
+
closeOnEsc: K = !0,
|
|
40
|
+
zIndex: M = 1,
|
|
41
41
|
maxWidth: $,
|
|
42
42
|
className: j,
|
|
43
43
|
contentClassName: z,
|
|
@@ -45,10 +45,10 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
45
45
|
textClassName: U,
|
|
46
46
|
style: W,
|
|
47
47
|
id: Y,
|
|
48
|
-
p:
|
|
49
|
-
borderRadius:
|
|
48
|
+
p: _ = Yo.md,
|
|
49
|
+
borderRadius: q = Wo.sm
|
|
50
50
|
}) => {
|
|
51
|
-
const [
|
|
51
|
+
const [G, J] = D(E), [S, L] = D(null), x = F ?? G, v = C ?? J, Q = Po(), f = Y ?? `tooltip-${Q}`, V = s == null || s === "", t = !k && !V, X = ko(
|
|
52
52
|
(fo) => {
|
|
53
53
|
t && v(fo);
|
|
54
54
|
},
|
|
@@ -56,13 +56,13 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
56
56
|
), u = I + (a ? Io : 0), {
|
|
57
57
|
context: e,
|
|
58
58
|
refs: b,
|
|
59
|
-
floatingStyles:
|
|
59
|
+
floatingStyles: Z,
|
|
60
60
|
middlewareData: oo,
|
|
61
61
|
placement: h
|
|
62
62
|
} = go({
|
|
63
63
|
placement: m,
|
|
64
64
|
open: t ? x : !1,
|
|
65
|
-
onOpenChange:
|
|
65
|
+
onOpenChange: X,
|
|
66
66
|
whileElementsMounted: vo,
|
|
67
67
|
middleware: [
|
|
68
68
|
wo(u),
|
|
@@ -74,11 +74,11 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
74
74
|
So({ padding: u }),
|
|
75
75
|
...a && S ? [xo({ element: S, padding: 0 })] : []
|
|
76
76
|
]
|
|
77
|
-
}), to = oo.arrow, o = h.split("-")[0], i = h.includes("-") ? h.split("-")[1] : null, A =
|
|
77
|
+
}), to = oo.arrow, o = h.split("-")[0], i = h.includes("-") ? h.split("-")[1] : null, A = Ho(to, o, i), eo = $o(o, i), so = Ko(
|
|
78
78
|
o,
|
|
79
79
|
i,
|
|
80
80
|
a
|
|
81
|
-
), r =
|
|
81
|
+
), r = Mo(
|
|
82
82
|
o,
|
|
83
83
|
i,
|
|
84
84
|
No
|
|
@@ -115,13 +115,13 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
115
115
|
enabled: y === "hover" && t,
|
|
116
116
|
delay: {
|
|
117
117
|
open: N,
|
|
118
|
-
close:
|
|
118
|
+
close: H
|
|
119
119
|
},
|
|
120
120
|
move: !1
|
|
121
121
|
}), ao = Ao(e, {
|
|
122
122
|
enabled: y === "hover" && t
|
|
123
123
|
}), lo = Oo(e, {
|
|
124
|
-
enabled:
|
|
124
|
+
enabled: K && t,
|
|
125
125
|
escapeKey: !0
|
|
126
126
|
}), po = Ro(e, { role: "tooltip" }), g = To([no, ao, lo, po]), co = n.ref, O = Do([b.setReference, co]), mo = Eo(
|
|
127
127
|
() => Fo(
|
|
@@ -141,10 +141,10 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
141
141
|
w,
|
|
142
142
|
{
|
|
143
143
|
absolute: !0,
|
|
144
|
-
zIndex:
|
|
144
|
+
zIndex: M,
|
|
145
145
|
className: j,
|
|
146
146
|
ref: b.setFloating,
|
|
147
|
-
style: { ...
|
|
147
|
+
style: { ...Z, ...W },
|
|
148
148
|
...g.getFloatingProps({
|
|
149
149
|
id: f
|
|
150
150
|
}),
|
|
@@ -153,10 +153,10 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
153
153
|
{
|
|
154
154
|
relative: !0,
|
|
155
155
|
maxWidth: $,
|
|
156
|
-
p:
|
|
157
|
-
borderRadius:
|
|
156
|
+
p: _,
|
|
157
|
+
borderRadius: q,
|
|
158
158
|
className: T(
|
|
159
|
-
|
|
159
|
+
qo,
|
|
160
160
|
ro,
|
|
161
161
|
z
|
|
162
162
|
),
|
|
@@ -164,9 +164,9 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
164
164
|
a && /* @__PURE__ */ l(
|
|
165
165
|
w,
|
|
166
166
|
{
|
|
167
|
-
ref:
|
|
167
|
+
ref: L,
|
|
168
168
|
className: T(
|
|
169
|
-
|
|
169
|
+
Go,
|
|
170
170
|
io,
|
|
171
171
|
B
|
|
172
172
|
)
|
|
@@ -189,7 +189,7 @@ const { color: Uo, cornerRadius: Wo, spacing: Yo } = zo, qo = ho`
|
|
|
189
189
|
) })
|
|
190
190
|
] });
|
|
191
191
|
};
|
|
192
|
-
|
|
192
|
+
Jo.displayName = "Tooltip";
|
|
193
193
|
export {
|
|
194
|
-
|
|
194
|
+
Jo as Tooltip
|
|
195
195
|
};
|
|
@@ -21,12 +21,12 @@ const { color: o } = t, l = {
|
|
|
21
21
|
// ◄ (tooltip справа, стрелка влево)
|
|
22
22
|
}, p = 10, n = 6, e = 1, i = {
|
|
23
23
|
primary: {
|
|
24
|
-
backgroundColor: o.fill.
|
|
24
|
+
backgroundColor: o.fill.bg_primary,
|
|
25
25
|
color: o.text.primary
|
|
26
26
|
},
|
|
27
27
|
inverse: {
|
|
28
|
-
backgroundColor: o.fill.
|
|
29
|
-
color: o.text.
|
|
28
|
+
backgroundColor: o.fill.bg_primary_inverse,
|
|
29
|
+
color: o.text.primary_inverse
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
export {
|
package/dist/index.js
CHANGED
|
@@ -7,15 +7,15 @@ import { Portal as T } from "./components/builders/Portal/Portal.js";
|
|
|
7
7
|
import { Ripple as l } from "./components/builders/Ripple/Ripple.js";
|
|
8
8
|
import { Table as C } from "./components/builders/Table/Table.js";
|
|
9
9
|
import { createColumnHelper as B } from "@tanstack/react-table";
|
|
10
|
-
import { AnimatedText as
|
|
11
|
-
import { LineChart as
|
|
10
|
+
import { AnimatedText as h, Text as g } from "./components/builders/Text/Text.js";
|
|
11
|
+
import { LineChart as A } from "./components/charts/LineChart/LineChart.js";
|
|
12
12
|
import { PieProgressChart as S } from "./components/charts/PieProgressChart/PieProgressChart.js";
|
|
13
13
|
import { Button as P } from "./components/controls/Button/Button.js";
|
|
14
14
|
import { Checkbox as _ } from "./components/controls/Checkbox/Checkbox.js";
|
|
15
15
|
import { IconButton as I } from "./components/controls/IconButton/IconButton.js";
|
|
16
16
|
import { Input as v } from "./components/controls/Input/Input.js";
|
|
17
|
-
import { MarkdownToolbarAction as
|
|
18
|
-
import { MARKDOWN_TEXT_EDITOR_LOCALE_KEY as
|
|
17
|
+
import { MarkdownToolbarAction as D } from "./components/controls/MarkdownTextEditor/hooks/useToolbarActions/useToolbarActions.const.js";
|
|
18
|
+
import { MARKDOWN_TEXT_EDITOR_LOCALE_KEY as O } from "./components/controls/MarkdownTextEditor/MarkdownTextEditor.locale.js";
|
|
19
19
|
import { MarkdownTextEditor as U } from "./components/controls/MarkdownTextEditor/MarkdownTextEditor.js";
|
|
20
20
|
import { OtpInput as y } from "./components/controls/OtpInput/OtpInput.js";
|
|
21
21
|
import { Radio as F } from "./components/controls/RadioGroup/Radio.js";
|
|
@@ -27,73 +27,80 @@ import { Tabs as Z } from "./components/controls/Tabs/Tabs.js";
|
|
|
27
27
|
import { Breadcrumbs as oo } from "./components/navigation/Breadcrumbs/Breadcrumbs.js";
|
|
28
28
|
import { Avatar as eo } from "./components/shared/Avatar/Avatar.js";
|
|
29
29
|
import { Badge as po } from "./components/shared/Badge/Badge.js";
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
30
|
+
import { Counter as xo } from "./components/shared/Counter/Counter.js";
|
|
31
|
+
import { Dot as ao } from "./components/shared/Dot/Dot.js";
|
|
32
|
+
import { Hint as io } from "./components/shared/Hint/Hint.js";
|
|
33
|
+
import { MarkdownText as so } from "./components/shared/MarkdownText/MarkdownText.js";
|
|
34
|
+
import { Popover as Co } from "./components/shared/Popover/Popover.js";
|
|
35
|
+
import { Skeleton as Bo } from "./components/shared/Skeleton/Skeleton.js";
|
|
36
|
+
import { Tag as ho } from "./components/shared/Tag/Tag.js";
|
|
37
|
+
import { Toast as ko } from "./components/shared/Toast/Toast.js";
|
|
38
|
+
import { useToast as Eo } from "./components/shared/Toast/Toast.hooks.js";
|
|
39
|
+
import { toast as Mo } from "./components/shared/Toast/Toast.utils.js";
|
|
40
|
+
import { ToastContainer as Ro } from "./components/shared/Toast/ToastContainer.js";
|
|
41
|
+
import { Tooltip as bo } from "./components/shared/Tooltip/Tooltip.js";
|
|
42
|
+
import { ThemeProviderScoped as Lo } from "./providers/ThemeProviderScoped/ThemeProviderScoped.js";
|
|
43
|
+
import { THEME_DATA_ATTRIBUTE as wo } from "./providers/ThemeProviderScoped/ThemeProviderScoped.const.js";
|
|
44
|
+
import { ThemeContext as Ko, useUiKitTheme as Oo } from "./providers/ThemeProviderScoped/ThemeProviderScoped.context.js";
|
|
45
|
+
import { useControlled as Uo } from "./utils/hooks/useControlled.js";
|
|
46
|
+
import { useBreakpoint as yo } from "./utils/hooks/breakpoints/useBreakpoint/useBreakpoint.js";
|
|
47
|
+
import { Breakpoints as Fo, BreakpointsBase as Go } from "./utils/hooks/breakpoints/useBreakpoint/useBreakpoint.const.js";
|
|
48
|
+
import { getFontWeightClass as Xo } from "./utils/styles/getFontWeightClass/getFontWeightClass.js";
|
|
49
|
+
import { getSizeClass as jo } from "./utils/styles/getSizeClass/getSizeClass.js";
|
|
50
|
+
import { getStyleClass as Jo } from "./utils/styles/getStyleClass/getStyleClass.js";
|
|
51
|
+
import { theme as Vo } from "./utils/theme/index.js";
|
|
49
52
|
export {
|
|
50
|
-
|
|
53
|
+
h as AnimatedText,
|
|
51
54
|
eo as Avatar,
|
|
52
55
|
po as Badge,
|
|
53
56
|
m as Box,
|
|
54
57
|
oo as Breadcrumbs,
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
Fo as Breakpoints,
|
|
59
|
+
Go as BreakpointsBase,
|
|
57
60
|
P as Button,
|
|
58
61
|
_ as Checkbox,
|
|
59
|
-
xo as
|
|
62
|
+
xo as Counter,
|
|
63
|
+
ao as Dot,
|
|
64
|
+
io as Hint,
|
|
60
65
|
I as IconButton,
|
|
61
66
|
v as Input,
|
|
62
|
-
|
|
67
|
+
A as LineChart,
|
|
63
68
|
f as Loader,
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
O as MARKDOWN_TEXT_EDITOR_LOCALE_KEY,
|
|
70
|
+
so as MarkdownText,
|
|
66
71
|
U as MarkdownTextEditor,
|
|
67
|
-
|
|
72
|
+
D as MarkdownToolbarAction,
|
|
68
73
|
n as Modal,
|
|
69
74
|
y as OtpInput,
|
|
70
75
|
S as PieProgressChart,
|
|
71
|
-
|
|
76
|
+
Co as Popover,
|
|
72
77
|
T as Portal,
|
|
73
78
|
F as Radio,
|
|
74
79
|
N as RadioGroup,
|
|
75
80
|
l as Ripple,
|
|
76
81
|
Y as SegmentControl,
|
|
77
82
|
q as Select,
|
|
78
|
-
|
|
83
|
+
Bo as Skeleton,
|
|
79
84
|
Q as Switch,
|
|
80
|
-
|
|
85
|
+
wo as THEME_DATA_ATTRIBUTE,
|
|
81
86
|
C as Table,
|
|
82
87
|
Z as Tabs,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
ho as Tag,
|
|
89
|
+
g as Text,
|
|
90
|
+
Ko as ThemeContext,
|
|
91
|
+
Lo as ThemeProviderScoped,
|
|
92
|
+
ko as Toast,
|
|
93
|
+
Ro as ToastContainer,
|
|
94
|
+
bo as Tooltip,
|
|
89
95
|
t as UiKitLocaleProvider,
|
|
90
96
|
B as createColumnHelper,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
Xo as getFontWeightClass,
|
|
98
|
+
jo as getSizeClass,
|
|
99
|
+
Jo as getStyleClass,
|
|
100
|
+
Vo as theme,
|
|
101
|
+
Mo as toast,
|
|
102
|
+
yo as useBreakpoint,
|
|
103
|
+
Uo as useControlled,
|
|
104
|
+
Eo as useToast,
|
|
105
|
+
Oo as useUiKitTheme
|
|
99
106
|
};
|
|
@@ -1 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Атрибут, которым выбирается тема. Часть публичного контракта: приложение
|
|
3
|
+
* обязано выставить его на `<html>` до первого пейнта (SSR или инлайн-скрипт
|
|
4
|
+
* в `<head>`), иначе фон документа мигнёт светлым — см. docs/styles/themes.
|
|
5
|
+
*
|
|
6
|
+
* Экспортируется именно чтобы anti-flash-скрипты не хардкодили имя: если оно
|
|
7
|
+
* когда-нибудь изменится, потребители сломаются молча.
|
|
8
|
+
*/
|
|
1
9
|
export declare const THEME_DATA_ATTRIBUTE: "data-theme";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UiKitTheme } from './ThemeProviderScoped.types';
|
|
2
|
+
export interface IThemeContext {
|
|
3
|
+
theme: UiKitTheme;
|
|
4
|
+
setTheme: (theme: UiKitTheme) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ThemeContext: import('react').Context<IThemeContext | null>;
|
|
7
|
+
/**
|
|
8
|
+
* Текущая тема и её сеттер — доступны любому компоненту внутри `ThemeProviderScoped`.
|
|
9
|
+
* `setTheme` меняет тему только в uncontrolled-режиме (когда `theme` снаружи не передан);
|
|
10
|
+
* если тема контролируется извне, используйте `onThemeChange` на `ThemeProviderScoped`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useUiKitTheme(): IThemeContext;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext as t, useContext as o } from "react";
|
|
2
|
+
const r = t(null);
|
|
3
|
+
function i() {
|
|
4
|
+
const e = o(r);
|
|
5
|
+
if (!e)
|
|
6
|
+
throw new Error("useUiKitTheme must be used within a ThemeProviderScoped");
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
r as ThemeContext,
|
|
11
|
+
i as useUiKitTheme
|
|
12
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IThemeProviderProps } from './ThemeProviderScoped.types';
|
|
2
|
-
export declare function ThemeProviderScoped({ className, children, theme,
|
|
2
|
+
export declare function ThemeProviderScoped({ className, children, theme: controlledTheme, defaultTheme, onThemeChange, position, }: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|