ics-ui-kit 1.0.0-alpha.0 → 1.0.0-alpha.2
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/CalendarPreviousMonthButton-CHMp8bkd.js +2964 -0
- package/dist/CalendarPreviousMonthButton-CHMp8bkd.js.map +1 -0
- package/dist/{CheckboxField-Ca48ZYoX.js → CheckboxField-xDqHgXHh.js} +2 -2
- package/dist/{CheckboxField-Ca48ZYoX.js.map → CheckboxField-xDqHgXHh.js.map} +1 -1
- package/dist/{Command-CsW4aK7M.js → Command-WsAKNQrY.js} +2 -2
- package/dist/{Command-CsW4aK7M.js.map → Command-WsAKNQrY.js.map} +1 -1
- package/dist/{Dialog-BT_775Iz.js → Dialog-i_Y-phdM.js} +42 -43
- package/dist/Dialog-i_Y-phdM.js.map +1 -0
- package/dist/{Field-BRPdaQ8D.js → Field-BcwUtgGr.js} +2 -2
- package/dist/{Field-BRPdaQ8D.js.map → Field-BcwUtgGr.js.map} +1 -1
- package/dist/{FieldLabel-ic0eq9Un.js → FieldLabel-DYu1AcGH.js} +2 -2
- package/dist/{FieldLabel-ic0eq9Un.js.map → FieldLabel-DYu1AcGH.js.map} +1 -1
- package/dist/{FormFooterTemplate-BIwnBQhL.js → FormFooterTemplate-CHlas_Pp.js} +2 -2
- package/dist/{FormFooterTemplate-BIwnBQhL.js.map → FormFooterTemplate-CHlas_Pp.js.map} +1 -1
- package/dist/FormStack-DfoaOry7.js +1205 -0
- package/dist/FormStack-DfoaOry7.js.map +1 -0
- package/dist/{IconTooltip-CgbefRXG.js → IconTooltip-R6_6_f40.js} +2 -2
- package/dist/{IconTooltip-CgbefRXG.js.map → IconTooltip-R6_6_f40.js.map} +1 -1
- package/dist/{Popover-Dz2eNsXh.js → Popover-XrJa7lyb.js} +49 -50
- package/dist/Popover-XrJa7lyb.js.map +1 -0
- package/dist/{Select-Bfbtj5zt.js → Select-DO02vXt3.js} +185 -186
- package/dist/{Select-Bfbtj5zt.js.map → Select-DO02vXt3.js.map} +1 -1
- package/dist/{Sheet-aLBPtE1k.js → Sheet-C2UoHLL0.js} +35 -36
- package/dist/Sheet-C2UoHLL0.js.map +1 -0
- package/dist/{TextOverflowTooltip-BaNPKqnO.js → TextOverflowTooltip-XPDdO9Dz.js} +2 -2
- package/dist/{TextOverflowTooltip-BaNPKqnO.js.map → TextOverflowTooltip-XPDdO9Dz.js.map} +1 -1
- package/dist/{Tooltip-DOgKy50D.js → Tooltip-D2XvRS0c.js} +63 -64
- package/dist/Tooltip-D2XvRS0c.js.map +1 -0
- package/dist/blocks/auth/otp-form.js +3240 -204
- package/dist/blocks/auth/otp-form.js.map +1 -1
- package/dist/components/alert-dialog/AlertDialog.d.ts +2 -4
- package/dist/components/alert-dialog.js +70 -71
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/calendar/components/calendar-dropdown/CalendarDropdown.d.ts +24 -0
- package/dist/components/calendar/styles.d.ts +61 -0
- package/dist/components/calendar-scroll/CalendarScroll.d.ts +21 -0
- package/dist/components/calendar-scroll/CalendarScroll.stories.d.ts +16 -0
- package/dist/components/calendar-scroll/index.d.ts +3 -0
- package/dist/components/calendar-scroll.d.ts +2 -0
- package/dist/components/calendar-scroll.js +181 -0
- package/dist/components/calendar-scroll.js.map +1 -0
- package/dist/components/calendar.js +51 -147
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/dialog/Dialog.d.ts +2 -4
- package/dist/components/dialog.js +3 -3
- package/dist/components/drawer/components/drawer-content/DrawerContent.d.ts +1 -2
- package/dist/components/drawer.js +96 -97
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +2 -4
- package/dist/components/dropdown.js +251 -252
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form/Form.d.ts +14 -0
- package/dist/components/form/components/form-field/FormField.d.ts +4 -0
- package/dist/components/form.js +3 -3
- package/dist/components/icon-tooltip.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/overflow-tooltip.js +1 -1
- package/dist/components/popover/Popover.d.ts +1 -2
- package/dist/components/popover.js +1 -1
- package/dist/components/resizable/Resizable.d.ts +1 -1
- package/dist/components/scheduler.js +1 -1
- package/dist/components/search-select/multi-select/MultiSelect.d.ts +1 -1
- package/dist/components/search-select.js +3 -3
- package/dist/components/search-select.js.map +1 -1
- package/dist/components/select/Select.d.ts +1 -2
- package/dist/components/select.js +1 -1
- package/dist/components/sheet/Sheet.d.ts +1 -2
- package/dist/components/sheet.js +1 -1
- package/dist/components/sidebar.js +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tag-input.js +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +2 -4
- package/dist/components/tooltip.js +1 -1
- package/dist/tailwind.css +406 -361
- package/package.json +22 -18
- package/dist/DayPicker-4hE1QEvO.js +0 -2452
- package/dist/DayPicker-4hE1QEvO.js.map +0 -1
- package/dist/Dialog-BT_775Iz.js.map +0 -1
- package/dist/FormStack-CxiZhx1n.js +0 -127
- package/dist/FormStack-CxiZhx1n.js.map +0 -1
- package/dist/Popover-Dz2eNsXh.js.map +0 -1
- package/dist/Sheet-aLBPtE1k.js.map +0 -1
- package/dist/Tooltip-DOgKy50D.js.map +0 -1
- package/dist/buildMatchPatternFn-d7GTeGl_.js +0 -68
- package/dist/buildMatchPatternFn-d7GTeGl_.js.map +0 -1
- package/dist/components/portal-container/PortalContainer.d.ts +0 -10
- package/dist/components/portal-container/index.d.ts +0 -2
- package/dist/components/portal-container/portalContainerEvents.d.ts +0 -12
- package/dist/components/portal-container/usePortalContainer.d.ts +0 -11
- package/dist/components/portal-container.d.ts +0 -2
- package/dist/components/portal-container.js +0 -14
- package/dist/components/portal-container.js.map +0 -1
- package/dist/index.esm-CXA6i4d7.js +0 -1282
- package/dist/index.esm-CXA6i4d7.js.map +0 -1
- package/dist/normalizeDates-9A3c9WYM.js +0 -32
- package/dist/normalizeDates-9A3c9WYM.js.map +0 -1
- package/dist/styles.css +0 -9064
- package/dist/styles.d.ts +0 -1
- package/dist/usePortalContainer-B1xla842.js +0 -33
- package/dist/usePortalContainer-B1xla842.js.map +0 -1
- package/dist/vendors/date-fns/index.d.ts +0 -12
- package/dist/vendors/date-fns/locale/en-US/index.d.ts +0 -5
- package/dist/vendors/date-fns/locale/en-US.d.ts +0 -2
- package/dist/vendors/date-fns/locale/en-US.js +0 -372
- package/dist/vendors/date-fns/locale/en-US.js.map +0 -1
- package/dist/vendors/date-fns/locale/ru/index.d.ts +0 -5
- package/dist/vendors/date-fns/locale/ru.d.ts +0 -2
- package/dist/vendors/date-fns/locale/ru.js +0 -569
- package/dist/vendors/date-fns/locale/ru.js.map +0 -1
- package/dist/vendors/date-fns.d.ts +0 -2
- package/dist/vendors/date-fns.js +0 -2
- package/dist/vendors/date-fns.js.map +0 -1
- package/dist/vendors/react-day-picker/index.d.ts +0 -13
- package/dist/vendors/react-day-picker.d.ts +0 -2
- package/dist/vendors/react-day-picker.js +0 -87
- package/dist/vendors/react-day-picker.js.map +0 -1
- package/dist/vendors/react-hook-form/index.d.ts +0 -14
- package/dist/vendors/react-hook-form.d.ts +0 -2
- package/dist/vendors/react-hook-form.js +0 -19
- package/dist/vendors/react-hook-form.js.map +0 -1
- package/dist/vendors/tanstack/react-table/index.d.ts +0 -13
- package/dist/vendors/tanstack/react-table.d.ts +0 -2
- package/dist/vendors/tanstack/react-table.js +0 -2090
- package/dist/vendors/tanstack/react-table.js.map +0 -1
- package/dist/vendors/zod/index.d.ts +0 -13
- package/dist/vendors/zod.d.ts +0 -2
- package/dist/vendors/zod.js +0 -3080
- package/dist/vendors/zod.js.map +0 -1
- package/dist/zod-BMNoK3aM.js +0 -75
- package/dist/zod-BMNoK3aM.js.map +0 -1
|
@@ -17,8 +17,7 @@ export type AlertDialogContentProps = React.ComponentPropsWithoutRef<typeof Aler
|
|
|
17
17
|
overlayBlur?: BackgroundProps["blur"];
|
|
18
18
|
overlayType?: BackgroundProps["type"];
|
|
19
19
|
/**
|
|
20
|
-
* Контейнер для портала. Если не указан,
|
|
21
|
-
* для поиска PortalContainer
|
|
20
|
+
* Контейнер для портала. Если не указан, портал рендерится в document.body
|
|
22
21
|
*/
|
|
23
22
|
portalContainer?: HTMLElement;
|
|
24
23
|
};
|
|
@@ -26,8 +25,7 @@ declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDial
|
|
|
26
25
|
overlayBlur?: BackgroundProps["blur"];
|
|
27
26
|
overlayType?: BackgroundProps["type"];
|
|
28
27
|
/**
|
|
29
|
-
* Контейнер для портала. Если не указан,
|
|
30
|
-
* для поиска PortalContainer
|
|
28
|
+
* Контейнер для портала. Если не указан, портал рендерится в document.body
|
|
31
29
|
*/
|
|
32
30
|
portalContainer?: HTMLElement;
|
|
33
31
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,39 +5,38 @@ import { u as y } from "../index-DLcqcWxM.js";
|
|
|
5
5
|
import { c as b, R as W, P as Y, T as q, O as k, W as J, a as K, b as Q, D as U, C as x } from "../index-CMxHunQ4.js";
|
|
6
6
|
import { c as X, b as Z } from "../index-CFaU3UXv.js";
|
|
7
7
|
import { T as d } from "../index-BVqs-uqP.js";
|
|
8
|
-
import {
|
|
9
|
-
import { o as te } from "../Overlay-E0UvxzIc.js";
|
|
8
|
+
import { o as ee } from "../Overlay-E0UvxzIc.js";
|
|
10
9
|
import { B as N } from "../Button-_qdP4hSf.js";
|
|
11
|
-
import { A as
|
|
12
|
-
import { I as
|
|
10
|
+
import { A as te, u as f } from "../AlertContext-CxjW1LVL.js";
|
|
11
|
+
import { I as ae } from "../Icon-DH3ev9GK.js";
|
|
13
12
|
import { e as w } from "../useBreakpoints-DHvp74UL.js";
|
|
14
|
-
var h = "AlertDialog", [
|
|
13
|
+
var h = "AlertDialog", [oe, Ye] = G(h, [
|
|
15
14
|
b
|
|
16
15
|
]), c = b(), R = (e) => {
|
|
17
16
|
const { __scopeAlertDialog: t, ...a } = e, o = c(t);
|
|
18
17
|
return /* @__PURE__ */ s(W, { ...o, ...a, modal: !0 });
|
|
19
18
|
};
|
|
20
19
|
R.displayName = h;
|
|
21
|
-
var
|
|
20
|
+
var re = "AlertDialogTrigger", C = l.forwardRef(
|
|
22
21
|
(e, t) => {
|
|
23
22
|
const { __scopeAlertDialog: a, ...o } = e, r = c(a);
|
|
24
23
|
return /* @__PURE__ */ s(q, { ...r, ...o, ref: t });
|
|
25
24
|
}
|
|
26
25
|
);
|
|
27
|
-
C.displayName =
|
|
28
|
-
var
|
|
26
|
+
C.displayName = re;
|
|
27
|
+
var se = "AlertDialogPortal", _ = (e) => {
|
|
29
28
|
const { __scopeAlertDialog: t, ...a } = e, o = c(t);
|
|
30
29
|
return /* @__PURE__ */ s(Y, { ...o, ...a });
|
|
31
30
|
};
|
|
32
|
-
_.displayName =
|
|
33
|
-
var
|
|
31
|
+
_.displayName = se;
|
|
32
|
+
var le = "AlertDialogOverlay", S = l.forwardRef(
|
|
34
33
|
(e, t) => {
|
|
35
34
|
const { __scopeAlertDialog: a, ...o } = e, r = c(a);
|
|
36
35
|
return /* @__PURE__ */ s(k, { ...r, ...o, ref: t });
|
|
37
36
|
}
|
|
38
37
|
);
|
|
39
|
-
S.displayName =
|
|
40
|
-
var p = "AlertDialogContent", [
|
|
38
|
+
S.displayName = le;
|
|
39
|
+
var p = "AlertDialogContent", [ie, ne] = oe(p), ce = Z("AlertDialogContent"), P = l.forwardRef(
|
|
41
40
|
(e, t) => {
|
|
42
41
|
const { __scopeAlertDialog: a, children: o, ...r } = e, i = c(a), n = l.useRef(null), g = y(t, n), m = l.useRef(null);
|
|
43
42
|
return /* @__PURE__ */ s(
|
|
@@ -46,7 +45,7 @@ var p = "AlertDialogContent", [ne, ce] = re(p), de = Z("AlertDialogContent"), P
|
|
|
46
45
|
contentName: p,
|
|
47
46
|
titleName: T,
|
|
48
47
|
docsSlug: "alert-dialog",
|
|
49
|
-
children: /* @__PURE__ */ s(
|
|
48
|
+
children: /* @__PURE__ */ s(ie, { scope: a, cancelRef: m, children: /* @__PURE__ */ v(
|
|
50
49
|
K,
|
|
51
50
|
{
|
|
52
51
|
role: "alertdialog",
|
|
@@ -59,8 +58,8 @@ var p = "AlertDialogContent", [ne, ce] = re(p), de = Z("AlertDialogContent"), P
|
|
|
59
58
|
onPointerDownOutside: (u) => u.preventDefault(),
|
|
60
59
|
onInteractOutside: (u) => u.preventDefault(),
|
|
61
60
|
children: [
|
|
62
|
-
/* @__PURE__ */ s(
|
|
63
|
-
/* @__PURE__ */ s(
|
|
61
|
+
/* @__PURE__ */ s(ce, { children: o }),
|
|
62
|
+
/* @__PURE__ */ s(ge, { contentRef: n })
|
|
64
63
|
]
|
|
65
64
|
}
|
|
66
65
|
) })
|
|
@@ -81,21 +80,21 @@ var O = "AlertDialogDescription", M = l.forwardRef((e, t) => {
|
|
|
81
80
|
return /* @__PURE__ */ s(U, { ...r, ...o, ref: t });
|
|
82
81
|
});
|
|
83
82
|
M.displayName = O;
|
|
84
|
-
var
|
|
83
|
+
var de = "AlertDialogAction", I = l.forwardRef(
|
|
85
84
|
(e, t) => {
|
|
86
85
|
const { __scopeAlertDialog: a, ...o } = e, r = c(a);
|
|
87
86
|
return /* @__PURE__ */ s(x, { ...r, ...o, ref: t });
|
|
88
87
|
}
|
|
89
88
|
);
|
|
90
|
-
I.displayName =
|
|
89
|
+
I.displayName = de;
|
|
91
90
|
var $ = "AlertDialogCancel", z = l.forwardRef(
|
|
92
91
|
(e, t) => {
|
|
93
|
-
const { __scopeAlertDialog: a, ...o } = e, { cancelRef: r } =
|
|
92
|
+
const { __scopeAlertDialog: a, ...o } = e, { cancelRef: r } = ne($, a), i = c(a), n = y(t, r);
|
|
94
93
|
return /* @__PURE__ */ s(x, { ...i, ...o, ref: n });
|
|
95
94
|
}
|
|
96
95
|
);
|
|
97
96
|
z.displayName = $;
|
|
98
|
-
var
|
|
97
|
+
var ge = ({ contentRef: e }) => {
|
|
99
98
|
const t = `\`${p}\` requires a description for the component to be accessible for screen reader users.
|
|
100
99
|
|
|
101
100
|
You can add a description to the \`${p}\` by passing a \`${O}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
@@ -108,19 +107,19 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
108
107
|
e.current?.getAttribute("aria-describedby")
|
|
109
108
|
) || console.warn(t);
|
|
110
109
|
}, [t, e]), null;
|
|
111
|
-
},
|
|
112
|
-
const
|
|
113
|
-
extend:
|
|
110
|
+
}, ue = R, pe = C, fe = _, F = S, V = P, A = I, D = z, H = E, L = M;
|
|
111
|
+
const qe = ue, ke = pe, me = fe, Ae = d({
|
|
112
|
+
extend: ee
|
|
114
113
|
}), j = l.forwardRef(({ className: e, blur: t, type: a, ...o }, r) => /* @__PURE__ */ s(
|
|
115
114
|
F,
|
|
116
115
|
{
|
|
117
|
-
className:
|
|
116
|
+
className: Ae({ className: e, blur: t, type: a }),
|
|
118
117
|
...o,
|
|
119
118
|
ref: r
|
|
120
119
|
}
|
|
121
120
|
));
|
|
122
121
|
j.displayName = F.displayName;
|
|
123
|
-
const
|
|
122
|
+
const De = d({
|
|
124
123
|
base: [
|
|
125
124
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-[min(360px,calc(100vw-32px))] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-lg border border-secondary-border bg-status-neutral-bg p-4 pt-6 shadow-soft-lg duration-200 lg:max-w-[min(512px,calc(100vw-64px))] lg:p-6",
|
|
126
125
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
@@ -142,37 +141,37 @@ const ve = d({
|
|
|
142
141
|
defaultVariants: {
|
|
143
142
|
focus: "low"
|
|
144
143
|
}
|
|
145
|
-
}),
|
|
144
|
+
}), ve = l.forwardRef(({ className: e, overlayBlur: t, overlayType: a, status: o, focus: r = "low", children: i, portalContainer: n, ...g }, m) => {
|
|
146
145
|
const u = l.useMemo(
|
|
147
146
|
() => ({
|
|
148
147
|
status: o,
|
|
149
148
|
focus: r
|
|
150
149
|
}),
|
|
151
150
|
[o, r]
|
|
152
|
-
), B =
|
|
153
|
-
return /* @__PURE__ */ s(
|
|
151
|
+
), B = n;
|
|
152
|
+
return /* @__PURE__ */ s(te.Provider, { value: u, children: /* @__PURE__ */ v(me, { container: B, children: [
|
|
154
153
|
/* @__PURE__ */ s(j, { blur: t, type: a }),
|
|
155
154
|
/* @__PURE__ */ s(
|
|
156
155
|
V,
|
|
157
156
|
{
|
|
158
157
|
ref: m,
|
|
159
|
-
className:
|
|
158
|
+
className: De({ className: e, status: o, focus: r }),
|
|
160
159
|
...g,
|
|
161
160
|
children: i
|
|
162
161
|
}
|
|
163
162
|
)
|
|
164
163
|
] }) });
|
|
165
164
|
});
|
|
166
|
-
|
|
167
|
-
const
|
|
165
|
+
ve.displayName = V.displayName;
|
|
166
|
+
const ye = d({
|
|
168
167
|
base: "flex flex-col items-center gap-y-2.5 lg:grid lg:grid-cols-[0_1fr] lg:items-start lg:gap-y-4 lg:has-[>svg]:grid-cols-[1.5rem_1fr] lg:has-[>svg]:gap-x-4"
|
|
169
|
-
}),
|
|
170
|
-
|
|
171
|
-
const
|
|
168
|
+
}), be = ({ className: e, ...t }) => /* @__PURE__ */ s("div", { className: ye({ className: e }), ...t });
|
|
169
|
+
be.displayName = "AlertDialogHeader";
|
|
170
|
+
const xe = d({
|
|
172
171
|
base: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-3"
|
|
173
|
-
}),
|
|
174
|
-
|
|
175
|
-
const
|
|
172
|
+
}), Ne = ({ className: e, ...t }) => /* @__PURE__ */ s("div", { className: xe({ className: e }), ...t });
|
|
173
|
+
Ne.displayName = "AlertDialogFooter";
|
|
174
|
+
const we = d({
|
|
176
175
|
base: "mb-1.5 text-base font-semibold text-primary-fg lg:col-start-2 lg:mb-0 lg:text-lg",
|
|
177
176
|
variants: {
|
|
178
177
|
status: {
|
|
@@ -190,21 +189,21 @@ const he = d({
|
|
|
190
189
|
defaultVariants: {
|
|
191
190
|
focus: "low"
|
|
192
191
|
}
|
|
193
|
-
}),
|
|
192
|
+
}), he = l.forwardRef(
|
|
194
193
|
({ className: e, status: t, focus: a, ...o }, r) => {
|
|
195
194
|
const { status: i, focus: n } = f({ status: t, focus: a });
|
|
196
195
|
return /* @__PURE__ */ s(
|
|
197
196
|
H,
|
|
198
197
|
{
|
|
199
198
|
ref: r,
|
|
200
|
-
className:
|
|
199
|
+
className: we({ className: e, status: i, focus: n }),
|
|
201
200
|
...o
|
|
202
201
|
}
|
|
203
202
|
);
|
|
204
203
|
}
|
|
205
204
|
);
|
|
206
|
-
|
|
207
|
-
const
|
|
205
|
+
he.displayName = H.displayName;
|
|
206
|
+
const Re = d({
|
|
208
207
|
base: "text-primary-fg",
|
|
209
208
|
variants: {
|
|
210
209
|
status: {
|
|
@@ -214,23 +213,23 @@ const Ce = d({
|
|
|
214
213
|
info: "text-status-info"
|
|
215
214
|
}
|
|
216
215
|
}
|
|
217
|
-
}),
|
|
216
|
+
}), Ce = l.forwardRef(
|
|
218
217
|
({ className: e, size: t, icon: a, status: o, ...r }, i) => {
|
|
219
218
|
const { status: n } = f({ status: o });
|
|
220
219
|
return /* @__PURE__ */ s(
|
|
221
|
-
|
|
220
|
+
ae,
|
|
222
221
|
{
|
|
223
222
|
ref: i,
|
|
224
223
|
icon: a,
|
|
225
224
|
size: t ?? "xl",
|
|
226
|
-
className:
|
|
225
|
+
className: Re({ className: e, status: n }),
|
|
227
226
|
...r
|
|
228
227
|
}
|
|
229
228
|
);
|
|
230
229
|
}
|
|
231
230
|
);
|
|
232
|
-
|
|
233
|
-
const
|
|
231
|
+
Ce.displayName = "AlertDialogIcon";
|
|
232
|
+
const _e = d({
|
|
234
233
|
base: "text-center text-sm text-muted lg:col-start-2 lg:text-left",
|
|
235
234
|
variants: {
|
|
236
235
|
status: {
|
|
@@ -248,26 +247,26 @@ const Se = d({
|
|
|
248
247
|
defaultVariants: {
|
|
249
248
|
focus: "low"
|
|
250
249
|
}
|
|
251
|
-
}),
|
|
250
|
+
}), Se = l.forwardRef(({ className: e, status: t, focus: a, ...o }, r) => {
|
|
252
251
|
const { status: i, focus: n } = f({ status: t, focus: a });
|
|
253
252
|
return /* @__PURE__ */ s(
|
|
254
253
|
L,
|
|
255
254
|
{
|
|
256
255
|
ref: r,
|
|
257
|
-
className:
|
|
256
|
+
className: _e({ className: e, status: i, focus: n }),
|
|
258
257
|
...o
|
|
259
258
|
}
|
|
260
259
|
);
|
|
261
260
|
});
|
|
262
|
-
|
|
263
|
-
const
|
|
261
|
+
Se.displayName = L.displayName;
|
|
262
|
+
const Pe = l.forwardRef(
|
|
264
263
|
({ children: e, status: t, variant: a, ...o }, r) => {
|
|
265
264
|
const { status: i } = f({ status: t }), g = w() ? "xl" : "md";
|
|
266
265
|
return /* @__PURE__ */ s(A, { ref: r, asChild: !0, children: /* @__PURE__ */ s(N, { size: g, status: i, variant: a || "primary", ...o, children: e }) });
|
|
267
266
|
}
|
|
268
267
|
);
|
|
269
|
-
|
|
270
|
-
const
|
|
268
|
+
Pe.displayName = A.displayName;
|
|
269
|
+
const Te = d({
|
|
271
270
|
base: "mt-2 sm:mt-0",
|
|
272
271
|
variants: {
|
|
273
272
|
focus: {
|
|
@@ -276,38 +275,38 @@ const Ee = d({
|
|
|
276
275
|
high: ""
|
|
277
276
|
}
|
|
278
277
|
}
|
|
279
|
-
}),
|
|
278
|
+
}), Ee = l.forwardRef(({ className: e, children: t, variant: a, ...o }, r) => {
|
|
280
279
|
const { focus: i } = f(), g = w() ? "xl" : "md";
|
|
281
280
|
return /* @__PURE__ */ s(D, { ref: r, asChild: !0, children: /* @__PURE__ */ s(
|
|
282
281
|
N,
|
|
283
282
|
{
|
|
284
283
|
size: g,
|
|
285
284
|
variant: a || "outline",
|
|
286
|
-
className:
|
|
285
|
+
className: Te({ className: e, focus: i }),
|
|
287
286
|
...o,
|
|
288
287
|
children: t
|
|
289
288
|
}
|
|
290
289
|
) });
|
|
291
290
|
});
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
291
|
+
Ee.displayName = D.displayName;
|
|
292
|
+
const Oe = l.forwardRef(({ ...e }, t) => /* @__PURE__ */ s(A, { ref: t, ...e }));
|
|
293
|
+
Oe.displayName = "AlertDialogPrimitiveAction";
|
|
294
|
+
const Me = l.forwardRef(({ ...e }, t) => /* @__PURE__ */ s(D, { ref: t, ...e }));
|
|
295
|
+
Me.displayName = "AlertDialogPrimitiveCancel";
|
|
297
296
|
export {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
297
|
+
qe as AlertDialog,
|
|
298
|
+
Pe as AlertDialogAction,
|
|
299
|
+
Ee as AlertDialogCancel,
|
|
300
|
+
ve as AlertDialogContent,
|
|
301
|
+
Se as AlertDialogDescription,
|
|
302
|
+
Ne as AlertDialogFooter,
|
|
303
|
+
be as AlertDialogHeader,
|
|
304
|
+
Ce as AlertDialogIcon,
|
|
306
305
|
j as AlertDialogOverlay,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
me as AlertDialogPortal,
|
|
307
|
+
Oe as AlertDialogPrimitiveAction,
|
|
308
|
+
Me as AlertDialogPrimitiveCancel,
|
|
309
|
+
he as AlertDialogTitle,
|
|
310
|
+
ke as AlertDialogTrigger
|
|
312
311
|
};
|
|
313
312
|
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.js","sources":["../../node_modules/.pnpm/@radix-ui+react-alert-dialo_3c02522d3260e86745c28b4781980a86/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["\"use client\";\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar Slottable = createSlottable(\"AlertDialogContent\");\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\r\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { usePortalContainer } from \"../portal-container\";\r\nimport { overlayStyles, OverlayVariants } from \"../overlay/Overlay\";\r\nimport { Button, ButtonProps } from \"../button\";\r\nimport { AlertContext, useAlert } from \"../alert/AlertContext\";\r\nimport { Icon } from \"../icon\";\r\nimport { IconProps } from \"../icon/Icon\";\r\nimport { VariantsConfig } from \"@/lib/utils/variants\";\r\nimport { AlertVariants } from \"../alert/Alert\";\r\nimport { useIsMobile } from \"@/hooks\";\r\n\r\nconst AlertDialog = AlertDialogPrimitive.Root;\r\n\r\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\r\n\r\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\r\n\r\nconst alertDialogOverlayStyles = tv({\r\n\textend: overlayStyles\r\n});\r\n\r\ninterface AlertDialogOverlayProps\r\n\textends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>,\r\n\t\tOverlayVariants {}\r\n\r\nconst AlertDialogOverlay = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Overlay>,\r\n\tAlertDialogOverlayProps\r\n>(({ className, blur, type, ...props }, ref) => (\r\n\t<AlertDialogPrimitive.Overlay\r\n\t\tclassName={alertDialogOverlayStyles({ className, blur, type })}\r\n\t\t{...props}\r\n\t\tref={ref}\r\n\t/>\r\n));\r\n\r\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\r\n\r\nconst alertDialogContent = tv({\r\n\tbase: [\r\n\t\t\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-[min(360px,calc(100vw-32px))] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-lg border border-secondary-border bg-status-neutral-bg p-4 pt-6 shadow-soft-lg duration-200 lg:max-w-[min(512px,calc(100vw-64px))] lg:p-6\",\r\n\t\t\"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]\",\r\n\t\t\"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]\"\r\n\t],\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"border-status-success-secondary-border bg-status-success-bg\",\r\n\t\t\twarning: \"border-status-warning-secondary-border bg-status-warning-bg\",\r\n\t\t\terror: \"border-status-error-secondary-border bg-status-error-bg\",\r\n\t\t\tinfo: \"border-status-info-secondary-border bg-status-info-bg\"\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\tlow: \"border-secondary-border bg-secondary-bg\",\r\n\t\t\tmedium: \"bg-secondary-bg\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertVariants>,\r\n\tdefaultVariants: {\r\n\t\tfocus: \"low\"\r\n\t}\r\n});\r\n\r\ntype BackgroundProps = OverlayVariants;\r\n\r\nexport type AlertDialogContentProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> &\r\n\tAlertVariants & {\r\n\t\toverlayBlur?: BackgroundProps[\"blur\"];\r\n\t\toverlayType?: BackgroundProps[\"type\"];\r\n\t\t/**\r\n\t\t * Контейнер для портала. Если не указан, используется хук usePortalContainer\r\n\t\t * для поиска PortalContainer\r\n\t\t */\r\n\t\tportalContainer?: HTMLElement;\r\n\t};\r\n\r\nconst AlertDialogContent = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Content>,\r\n\tAlertDialogContentProps\r\n>(({ className, overlayBlur, overlayType, status, focus = \"low\", children, portalContainer, ...props }, ref) => {\r\n\tconst contextValue = React.useMemo(\r\n\t\t() => ({\r\n\t\t\tstatus,\r\n\t\t\tfocus\r\n\t\t}),\r\n\t\t[status, focus]\r\n\t);\r\n\r\n\tconst container = usePortalContainer(portalContainer);\r\n\r\n\treturn (\r\n\t\t<AlertContext.Provider value={contextValue}>\r\n\t\t\t<AlertDialogPortal container={container}>\r\n\t\t\t\t<AlertDialogOverlay blur={overlayBlur} type={overlayType} />\r\n\t\t\t\t<AlertDialogPrimitive.Content\r\n\t\t\t\t\tref={ref}\r\n\t\t\t\t\tclassName={alertDialogContent({ className, status, focus })}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</AlertDialogPrimitive.Content>\r\n\t\t\t</AlertDialogPortal>\r\n\t\t</AlertContext.Provider>\r\n\t);\r\n});\r\n\r\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\r\n\r\nconst alertDialogHeaderStyles = tv({\r\n\tbase: \"flex flex-col items-center gap-y-2.5 lg:grid lg:grid-cols-[0_1fr] lg:items-start lg:gap-y-4 lg:has-[>svg]:grid-cols-[1.5rem_1fr] lg:has-[>svg]:gap-x-4\"\r\n});\r\n\r\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n\t<div className={alertDialogHeaderStyles({ className })} {...props} />\r\n);\r\n\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\r\n\r\nconst alertDialogFooterStyles = tv({\r\n\tbase: \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-3\"\r\n});\r\n\r\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n\t<div className={alertDialogFooterStyles({ className })} {...props} />\r\n);\r\n\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\r\n\r\nconst alertDialogTitleStyles = tv({\r\n\tbase: \"mb-1.5 text-base font-semibold text-primary-fg lg:col-start-2 lg:mb-0 lg:text-lg\",\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"text-status-success-fg\",\r\n\t\t\twarning: \"text-status-warning-fg\",\r\n\t\t\terror: \"text-status-error-fg\",\r\n\t\t\tinfo: \"text-status-info-fg\"\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\tlow: \"text-primary-fg\",\r\n\t\t\tmedium: \"\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertVariants>,\r\n\tdefaultVariants: {\r\n\t\tfocus: \"low\"\r\n\t}\r\n});\r\n\r\nexport type AlertDialogTitleProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title> & AlertVariants;\r\n\r\nconst AlertDialogTitle = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Title>, AlertDialogTitleProps>(\r\n\t({ className, status: statusProp, focus: focusProp, ...props }, ref) => {\r\n\t\tconst { status, focus } = useAlert({ status: statusProp, focus: focusProp });\r\n\r\n\t\treturn (\r\n\t\t\t<AlertDialogPrimitive.Title\r\n\t\t\t\tref={ref}\r\n\t\t\t\tclassName={alertDialogTitleStyles({ className, status, focus })}\r\n\t\t\t\t{...props}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\r\n\r\nconst alertDialogIconStyles = tv({\r\n\tbase: \"text-primary-fg\",\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"text-status-success\",\r\n\t\t\twarning: \"text-status-warning\",\r\n\t\t\terror: \"text-status-error\",\r\n\t\t\tinfo: \"text-status-info\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertDialogIconVariants>\r\n});\r\n\r\ntype AlertDialogIconVariants = Omit<AlertVariants, \"focus\">;\r\n\r\nexport type AlertDialogIconProps = IconProps & AlertDialogIconVariants;\r\n\r\nconst AlertDialogIcon = React.forwardRef<SVGSVGElement, AlertDialogIconProps>(\r\n\t({ className, size, icon, status: statusProp, ...props }, ref) => {\r\n\t\tconst { status } = useAlert({ status: statusProp });\r\n\r\n\t\treturn (\r\n\t\t\t<Icon\r\n\t\t\t\tref={ref}\r\n\t\t\t\ticon={icon}\r\n\t\t\t\tsize={size ?? \"xl\"}\r\n\t\t\t\tclassName={alertDialogIconStyles({ className, status })}\r\n\t\t\t\t{...props}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nAlertDialogIcon.displayName = \"AlertDialogIcon\";\r\n\r\nconst alertDialogDescriptionStyles = tv({\r\n\tbase: \"text-center text-sm text-muted lg:col-start-2 lg:text-left\",\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"text-status-success-fg\",\r\n\t\t\twarning: \"text-status-warning-fg\",\r\n\t\t\terror: \"text-status-error-fg\",\r\n\t\t\tinfo: \"text-status-info-fg\"\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\tlow: \"text-muted\",\r\n\t\t\tmedium: \"\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertDialogDescriptionVariants>,\r\n\tdefaultVariants: {\r\n\t\tfocus: \"low\"\r\n\t}\r\n});\r\n\r\ntype AlertDialogDescriptionVariants = AlertVariants;\r\n\r\nexport type AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description> &\r\n\tAlertDialogDescriptionVariants;\r\n\r\nconst AlertDialogDescription = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Description>,\r\n\tAlertDialogDescriptionProps\r\n>(({ className, status: statusProp, focus: focusProp, ...props }, ref) => {\r\n\tconst { status, focus } = useAlert({ status: statusProp, focus: focusProp });\r\n\r\n\treturn (\r\n\t\t<AlertDialogPrimitive.Description\r\n\t\t\tref={ref}\r\n\t\t\tclassName={alertDialogDescriptionStyles({ className, status, focus })}\r\n\t\t\t{...props}\r\n\t\t/>\r\n\t);\r\n});\r\n\r\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\r\n\r\nconst AlertDialogAction = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Action>, ButtonProps>(\r\n\t({ children, status: statusProp, variant, ...props }, ref) => {\r\n\t\tconst { status } = useAlert({ status: statusProp as AlertVariants[\"status\"] });\r\n\t\tconst isMobile = useIsMobile();\r\n\t\tconst size = isMobile ? \"xl\" : \"md\";\r\n\r\n\t\treturn (\r\n\t\t\t<AlertDialogPrimitive.Action ref={ref} asChild>\r\n\t\t\t\t<Button size={size} status={status} variant={variant || \"primary\"} {...props}>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</Button>\r\n\t\t\t</AlertDialogPrimitive.Action>\r\n\t\t);\r\n\t}\r\n);\r\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\r\n\r\ntype AlertDialogCancelVariants = Omit<AlertVariants, \"status\">;\r\n\r\nconst alertDialogCancelStyles = tv({\r\n\tbase: \"mt-2 sm:mt-0\",\r\n\tvariants: {\r\n\t\tfocus: {\r\n\t\t\tlow: \"\",\r\n\t\t\tmedium: \"\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertDialogCancelVariants>\r\n});\r\n\r\nconst AlertDialogCancel = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\r\n\tOmit<ButtonProps, \"focus\"> & AlertDialogCancelVariants\r\n>(({ className, children, variant, ...props }, ref) => {\r\n\tconst { focus } = useAlert();\r\n\tconst isMobile = useIsMobile();\r\n\tconst size = isMobile ? \"xl\" : \"md\";\r\n\r\n\treturn (\r\n\t\t<AlertDialogPrimitive.Cancel ref={ref} asChild>\r\n\t\t\t<Button\r\n\t\t\t\tsize={size}\r\n\t\t\t\tvariant={variant || \"outline\"}\r\n\t\t\t\tclassName={alertDialogCancelStyles({ className, focus })}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t{children}\r\n\t\t\t</Button>\r\n\t\t</AlertDialogPrimitive.Cancel>\r\n\t);\r\n});\r\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\r\n\r\nconst AlertDialogPrimitiveAction = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Action>,\r\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\r\n>(({ ...props }, ref) => <AlertDialogPrimitive.Action ref={ref} {...props} />);\r\n\r\nAlertDialogPrimitiveAction.displayName = \"AlertDialogPrimitiveAction\";\r\n\r\nconst AlertDialogPrimitiveCancel = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\r\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\r\n>(({ ...props }, ref) => <AlertDialogPrimitive.Cancel ref={ref} {...props} />);\r\n\r\nAlertDialogPrimitiveCancel.displayName = \"AlertDialogPrimitiveCancel\";\r\n\r\nexport {\r\n\tAlertDialog,\r\n\tAlertDialogPortal,\r\n\tAlertDialogOverlay,\r\n\tAlertDialogTrigger,\r\n\tAlertDialogContent,\r\n\tAlertDialogHeader,\r\n\tAlertDialogFooter,\r\n\tAlertDialogTitle,\r\n\tAlertDialogIcon,\r\n\tAlertDialogDescription,\r\n\tAlertDialogAction,\r\n\tAlertDialogCancel,\r\n\tAlertDialogPrimitiveAction,\r\n\tAlertDialogPrimitiveCancel\r\n};\r\n"],"names":["ROOT_NAME","createAlertDialogContext","createAlertDialogScope","createContextScope","createDialogScope","useDialogScope","AlertDialog","props","__scopeAlertDialog","alertDialogProps","dialogScope","jsx","DialogPrimitive.Root","TRIGGER_NAME","AlertDialogTrigger","React","forwardedRef","triggerProps","DialogPrimitive.Trigger","PORTAL_NAME","AlertDialogPortal","portalProps","DialogPrimitive.Portal","OVERLAY_NAME","AlertDialogOverlay","overlayProps","DialogPrimitive.Overlay","CONTENT_NAME","AlertDialogContentProvider","useAlertDialogContentContext","Slottable","createSlottable","AlertDialogContent","children","contentProps","contentRef","composedRefs","useComposedRefs","cancelRef","DialogPrimitive.WarningProvider","TITLE_NAME","jsxs","DialogPrimitive.Content","composeEventHandlers","event","DescriptionWarning","AlertDialogTitle","titleProps","DialogPrimitive.Title","DESCRIPTION_NAME","AlertDialogDescription","descriptionProps","DialogPrimitive.Description","ACTION_NAME","AlertDialogAction","actionProps","DialogPrimitive.Close","CANCEL_NAME","AlertDialogCancel","cancelProps","ref","MESSAGE","Root2","Trigger2","Portal2","Overlay2","Content2","Action","Cancel","Title2","Description2","AlertDialogPrimitive.Root","AlertDialogPrimitive.Trigger","AlertDialogPrimitive.Portal","alertDialogOverlayStyles","tv","overlayStyles","className","blur","type","AlertDialogPrimitive.Overlay","alertDialogContent","overlayBlur","overlayType","status","focus","portalContainer","contextValue","container","usePortalContainer","AlertContext","AlertDialogPrimitive.Content","alertDialogHeaderStyles","AlertDialogHeader","alertDialogFooterStyles","AlertDialogFooter","alertDialogTitleStyles","statusProp","focusProp","useAlert","AlertDialogPrimitive.Title","alertDialogIconStyles","AlertDialogIcon","size","icon","Icon","alertDialogDescriptionStyles","AlertDialogPrimitive.Description","variant","useIsMobile","AlertDialogPrimitive.Action","Button","alertDialogCancelStyles","AlertDialogPrimitive.Cancel","AlertDialogPrimitiveAction","AlertDialogPrimitiveCancel"],"mappings":";;;;;;;;;;;;;AAWA,IAAI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ACAqB,GAAkB,cAAcwD,EAA4B;AAI5D,MAAME,KAA0BrC,EAAG;AAAA,EAClC,MAAM;AAAA,EACN,UAAU;AAAA,IACT,OAAO;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EACP;AAEF,CAAC,GAEKjB,KAAoB3C,EAAM,WAG9B,CAAC,EAAE,WAAA8D,GAAW,UAAA5C,GAAU,SAAA2E,GAAS,GAAGrG,EAAM,GAAGqD,MAAQ;AAChD,QAAA,EAAE,OAAAyB,EAAM,IAAIc,EAAS,GAErBI,IADWM,EAAY,IACL,OAAO;AAE/B,2BACEI,GAAA,EAA4B,KAAArD,GAAU,SAAO,IAC7C,UAAA,gBAAAjD;AAAA,IAACoG;AAAA,IAAA;AAAA,MACA,MAAAR;AAAA,MACA,SAASK,KAAW;AAAA,MACpB,WAAWI,GAAwB,EAAE,WAAAnC,GAAW,OAAAQ,GAAO;AAAA,MACtD,GAAG9E;AAAA,MAEH,UAAA0B;AAAA,IAAA;AAAA,EAAA,GAEH;AAEF,CAAC;AACDyB,GAAkB,cAAcuD,EAA4B;AAE5D,MAAMC,KAA6BnG,EAAM,WAGvC,CAAC,EAAE,GAAGR,EAAM,GAAGqD,MAAQ,gBAAAjD,EAACmG,GAAA,EAA4B,KAAAlD,GAAW,GAAGrD,GAAO,CAAE;AAE7E2G,GAA2B,cAAc;AAEzC,MAAMC,KAA6BpG,EAAM,WAGvC,CAAC,EAAE,GAAGR,EAAM,GAAGqD,MAAQ,gBAAAjD,EAACsG,GAAA,EAA4B,KAAArD,GAAW,GAAGrD,GAAO,CAAE;AAE7E4G,GAA2B,cAAc;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sources":["../../node_modules/.pnpm/@radix-ui+react-alert-dialo_3c02522d3260e86745c28b4781980a86/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["\"use client\";\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar Slottable = createSlottable(\"AlertDialogContent\");\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\r\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { overlayStyles, OverlayVariants } from \"../overlay/Overlay\";\r\nimport { Button, ButtonProps } from \"../button\";\r\nimport { AlertContext, useAlert } from \"../alert/AlertContext\";\r\nimport { Icon } from \"../icon\";\r\nimport { IconProps } from \"../icon/Icon\";\r\nimport { VariantsConfig } from \"@/lib/utils/variants\";\r\nimport { AlertVariants } from \"../alert/Alert\";\r\nimport { useIsMobile } from \"@/hooks\";\r\n\r\nconst AlertDialog = AlertDialogPrimitive.Root;\r\n\r\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\r\n\r\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\r\n\r\nconst alertDialogOverlayStyles = tv({\r\n\textend: overlayStyles\r\n});\r\n\r\ninterface AlertDialogOverlayProps\r\n\textends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>,\r\n\t\tOverlayVariants {}\r\n\r\nconst AlertDialogOverlay = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Overlay>,\r\n\tAlertDialogOverlayProps\r\n>(({ className, blur, type, ...props }, ref) => (\r\n\t<AlertDialogPrimitive.Overlay\r\n\t\tclassName={alertDialogOverlayStyles({ className, blur, type })}\r\n\t\t{...props}\r\n\t\tref={ref}\r\n\t/>\r\n));\r\n\r\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\r\n\r\nconst alertDialogContent = tv({\r\n\tbase: [\r\n\t\t\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-[min(360px,calc(100vw-32px))] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-lg border border-secondary-border bg-status-neutral-bg p-4 pt-6 shadow-soft-lg duration-200 lg:max-w-[min(512px,calc(100vw-64px))] lg:p-6\",\r\n\t\t\"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]\",\r\n\t\t\"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]\"\r\n\t],\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"border-status-success-secondary-border bg-status-success-bg\",\r\n\t\t\twarning: \"border-status-warning-secondary-border bg-status-warning-bg\",\r\n\t\t\terror: \"border-status-error-secondary-border bg-status-error-bg\",\r\n\t\t\tinfo: \"border-status-info-secondary-border bg-status-info-bg\"\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\tlow: \"border-secondary-border bg-secondary-bg\",\r\n\t\t\tmedium: \"bg-secondary-bg\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertVariants>,\r\n\tdefaultVariants: {\r\n\t\tfocus: \"low\"\r\n\t}\r\n});\r\n\r\ntype BackgroundProps = OverlayVariants;\r\n\r\nexport type AlertDialogContentProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> &\r\n\tAlertVariants & {\r\n\t\toverlayBlur?: BackgroundProps[\"blur\"];\r\n\t\toverlayType?: BackgroundProps[\"type\"];\r\n\t\t/**\r\n\t\t * Контейнер для портала. Если не указан, портал рендерится в document.body\r\n\t\t */\r\n\t\tportalContainer?: HTMLElement;\r\n\t};\r\n\r\nconst AlertDialogContent = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Content>,\r\n\tAlertDialogContentProps\r\n>(({ className, overlayBlur, overlayType, status, focus = \"low\", children, portalContainer, ...props }, ref) => {\r\n\tconst contextValue = React.useMemo(\r\n\t\t() => ({\r\n\t\t\tstatus,\r\n\t\t\tfocus\r\n\t\t}),\r\n\t\t[status, focus]\r\n\t);\r\n\r\n\tconst container = portalContainer;\r\n\r\n\treturn (\r\n\t\t<AlertContext.Provider value={contextValue}>\r\n\t\t\t<AlertDialogPortal container={container}>\r\n\t\t\t\t<AlertDialogOverlay blur={overlayBlur} type={overlayType} />\r\n\t\t\t\t<AlertDialogPrimitive.Content\r\n\t\t\t\t\tref={ref}\r\n\t\t\t\t\tclassName={alertDialogContent({ className, status, focus })}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</AlertDialogPrimitive.Content>\r\n\t\t\t</AlertDialogPortal>\r\n\t\t</AlertContext.Provider>\r\n\t);\r\n});\r\n\r\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\r\n\r\nconst alertDialogHeaderStyles = tv({\r\n\tbase: \"flex flex-col items-center gap-y-2.5 lg:grid lg:grid-cols-[0_1fr] lg:items-start lg:gap-y-4 lg:has-[>svg]:grid-cols-[1.5rem_1fr] lg:has-[>svg]:gap-x-4\"\r\n});\r\n\r\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n\t<div className={alertDialogHeaderStyles({ className })} {...props} />\r\n);\r\n\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\r\n\r\nconst alertDialogFooterStyles = tv({\r\n\tbase: \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-3\"\r\n});\r\n\r\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n\t<div className={alertDialogFooterStyles({ className })} {...props} />\r\n);\r\n\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\r\n\r\nconst alertDialogTitleStyles = tv({\r\n\tbase: \"mb-1.5 text-base font-semibold text-primary-fg lg:col-start-2 lg:mb-0 lg:text-lg\",\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"text-status-success-fg\",\r\n\t\t\twarning: \"text-status-warning-fg\",\r\n\t\t\terror: \"text-status-error-fg\",\r\n\t\t\tinfo: \"text-status-info-fg\"\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\tlow: \"text-primary-fg\",\r\n\t\t\tmedium: \"\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertVariants>,\r\n\tdefaultVariants: {\r\n\t\tfocus: \"low\"\r\n\t}\r\n});\r\n\r\nexport type AlertDialogTitleProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title> & AlertVariants;\r\n\r\nconst AlertDialogTitle = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Title>, AlertDialogTitleProps>(\r\n\t({ className, status: statusProp, focus: focusProp, ...props }, ref) => {\r\n\t\tconst { status, focus } = useAlert({ status: statusProp, focus: focusProp });\r\n\r\n\t\treturn (\r\n\t\t\t<AlertDialogPrimitive.Title\r\n\t\t\t\tref={ref}\r\n\t\t\t\tclassName={alertDialogTitleStyles({ className, status, focus })}\r\n\t\t\t\t{...props}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\r\n\r\nconst alertDialogIconStyles = tv({\r\n\tbase: \"text-primary-fg\",\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"text-status-success\",\r\n\t\t\twarning: \"text-status-warning\",\r\n\t\t\terror: \"text-status-error\",\r\n\t\t\tinfo: \"text-status-info\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertDialogIconVariants>\r\n});\r\n\r\ntype AlertDialogIconVariants = Omit<AlertVariants, \"focus\">;\r\n\r\nexport type AlertDialogIconProps = IconProps & AlertDialogIconVariants;\r\n\r\nconst AlertDialogIcon = React.forwardRef<SVGSVGElement, AlertDialogIconProps>(\r\n\t({ className, size, icon, status: statusProp, ...props }, ref) => {\r\n\t\tconst { status } = useAlert({ status: statusProp });\r\n\r\n\t\treturn (\r\n\t\t\t<Icon\r\n\t\t\t\tref={ref}\r\n\t\t\t\ticon={icon}\r\n\t\t\t\tsize={size ?? \"xl\"}\r\n\t\t\t\tclassName={alertDialogIconStyles({ className, status })}\r\n\t\t\t\t{...props}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nAlertDialogIcon.displayName = \"AlertDialogIcon\";\r\n\r\nconst alertDialogDescriptionStyles = tv({\r\n\tbase: \"text-center text-sm text-muted lg:col-start-2 lg:text-left\",\r\n\tvariants: {\r\n\t\tstatus: {\r\n\t\t\tsuccess: \"text-status-success-fg\",\r\n\t\t\twarning: \"text-status-warning-fg\",\r\n\t\t\terror: \"text-status-error-fg\",\r\n\t\t\tinfo: \"text-status-info-fg\"\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\tlow: \"text-muted\",\r\n\t\t\tmedium: \"\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertDialogDescriptionVariants>,\r\n\tdefaultVariants: {\r\n\t\tfocus: \"low\"\r\n\t}\r\n});\r\n\r\ntype AlertDialogDescriptionVariants = AlertVariants;\r\n\r\nexport type AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description> &\r\n\tAlertDialogDescriptionVariants;\r\n\r\nconst AlertDialogDescription = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Description>,\r\n\tAlertDialogDescriptionProps\r\n>(({ className, status: statusProp, focus: focusProp, ...props }, ref) => {\r\n\tconst { status, focus } = useAlert({ status: statusProp, focus: focusProp });\r\n\r\n\treturn (\r\n\t\t<AlertDialogPrimitive.Description\r\n\t\t\tref={ref}\r\n\t\t\tclassName={alertDialogDescriptionStyles({ className, status, focus })}\r\n\t\t\t{...props}\r\n\t\t/>\r\n\t);\r\n});\r\n\r\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\r\n\r\nconst AlertDialogAction = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Action>, ButtonProps>(\r\n\t({ children, status: statusProp, variant, ...props }, ref) => {\r\n\t\tconst { status } = useAlert({ status: statusProp as AlertVariants[\"status\"] });\r\n\t\tconst isMobile = useIsMobile();\r\n\t\tconst size = isMobile ? \"xl\" : \"md\";\r\n\r\n\t\treturn (\r\n\t\t\t<AlertDialogPrimitive.Action ref={ref} asChild>\r\n\t\t\t\t<Button size={size} status={status} variant={variant || \"primary\"} {...props}>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</Button>\r\n\t\t\t</AlertDialogPrimitive.Action>\r\n\t\t);\r\n\t}\r\n);\r\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\r\n\r\ntype AlertDialogCancelVariants = Omit<AlertVariants, \"status\">;\r\n\r\nconst alertDialogCancelStyles = tv({\r\n\tbase: \"mt-2 sm:mt-0\",\r\n\tvariants: {\r\n\t\tfocus: {\r\n\t\t\tlow: \"\",\r\n\t\t\tmedium: \"\",\r\n\t\t\thigh: \"\"\r\n\t\t}\r\n\t} satisfies VariantsConfig<AlertDialogCancelVariants>\r\n});\r\n\r\nconst AlertDialogCancel = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\r\n\tOmit<ButtonProps, \"focus\"> & AlertDialogCancelVariants\r\n>(({ className, children, variant, ...props }, ref) => {\r\n\tconst { focus } = useAlert();\r\n\tconst isMobile = useIsMobile();\r\n\tconst size = isMobile ? \"xl\" : \"md\";\r\n\r\n\treturn (\r\n\t\t<AlertDialogPrimitive.Cancel ref={ref} asChild>\r\n\t\t\t<Button\r\n\t\t\t\tsize={size}\r\n\t\t\t\tvariant={variant || \"outline\"}\r\n\t\t\t\tclassName={alertDialogCancelStyles({ className, focus })}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t{children}\r\n\t\t\t</Button>\r\n\t\t</AlertDialogPrimitive.Cancel>\r\n\t);\r\n});\r\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\r\n\r\nconst AlertDialogPrimitiveAction = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Action>,\r\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\r\n>(({ ...props }, ref) => <AlertDialogPrimitive.Action ref={ref} {...props} />);\r\n\r\nAlertDialogPrimitiveAction.displayName = \"AlertDialogPrimitiveAction\";\r\n\r\nconst AlertDialogPrimitiveCancel = React.forwardRef<\r\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\r\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\r\n>(({ ...props }, ref) => <AlertDialogPrimitive.Cancel ref={ref} {...props} />);\r\n\r\nAlertDialogPrimitiveCancel.displayName = \"AlertDialogPrimitiveCancel\";\r\n\r\nexport {\r\n\tAlertDialog,\r\n\tAlertDialogPortal,\r\n\tAlertDialogOverlay,\r\n\tAlertDialogTrigger,\r\n\tAlertDialogContent,\r\n\tAlertDialogHeader,\r\n\tAlertDialogFooter,\r\n\tAlertDialogTitle,\r\n\tAlertDialogIcon,\r\n\tAlertDialogDescription,\r\n\tAlertDialogAction,\r\n\tAlertDialogCancel,\r\n\tAlertDialogPrimitiveAction,\r\n\tAlertDialogPrimitiveCancel\r\n};\r\n"],"names":["ROOT_NAME","createAlertDialogContext","createAlertDialogScope","createContextScope","createDialogScope","useDialogScope","AlertDialog","props","__scopeAlertDialog","alertDialogProps","dialogScope","jsx","DialogPrimitive.Root","TRIGGER_NAME","AlertDialogTrigger","React","forwardedRef","triggerProps","DialogPrimitive.Trigger","PORTAL_NAME","AlertDialogPortal","portalProps","DialogPrimitive.Portal","OVERLAY_NAME","AlertDialogOverlay","overlayProps","DialogPrimitive.Overlay","CONTENT_NAME","AlertDialogContentProvider","useAlertDialogContentContext","Slottable","createSlottable","AlertDialogContent","children","contentProps","contentRef","composedRefs","useComposedRefs","cancelRef","DialogPrimitive.WarningProvider","TITLE_NAME","jsxs","DialogPrimitive.Content","composeEventHandlers","event","DescriptionWarning","AlertDialogTitle","titleProps","DialogPrimitive.Title","DESCRIPTION_NAME","AlertDialogDescription","descriptionProps","DialogPrimitive.Description","ACTION_NAME","AlertDialogAction","actionProps","DialogPrimitive.Close","CANCEL_NAME","AlertDialogCancel","cancelProps","ref","MESSAGE","Root2","Trigger2","Portal2","Overlay2","Content2","Action","Cancel","Title2","Description2","AlertDialogPrimitive.Root","AlertDialogPrimitive.Trigger","AlertDialogPrimitive.Portal","alertDialogOverlayStyles","tv","overlayStyles","className","blur","type","AlertDialogPrimitive.Overlay","alertDialogContent","overlayBlur","overlayType","status","focus","portalContainer","contextValue","container","AlertContext","AlertDialogPrimitive.Content","alertDialogHeaderStyles","AlertDialogHeader","alertDialogFooterStyles","AlertDialogFooter","alertDialogTitleStyles","statusProp","focusProp","useAlert","AlertDialogPrimitive.Title","alertDialogIconStyles","AlertDialogIcon","size","icon","Icon","alertDialogDescriptionStyles","AlertDialogPrimitive.Description","variant","useIsMobile","AlertDialogPrimitive.Action","Button","alertDialogCancelStyles","AlertDialogPrimitive.Cancel","AlertDialogPrimitiveAction","AlertDialogPrimitiveCancel"],"mappings":";;;;;;;;;;;;AAWA,IAAIA,IAAY,eACZ,CAACC,IAA0BC,EAAsB,IAAIC,EAAmBH,GAAW;AAAA,EACrFI;AACF,CAAC,GACGC,IAAiBD,EAAmB,GACpCE,IAAc,CAACC,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,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EACP;AAEF,CAAC,GAEKjB,KAAoB3C,EAAM,WAG9B,CAAC,EAAE,WAAA8D,GAAW,UAAA5C,GAAU,SAAA0E,GAAS,GAAGpG,EAAM,GAAGqD,MAAQ;AAChD,QAAA,EAAE,OAAAyB,EAAM,IAAIa,EAAS,GAErBI,IADWM,EAAY,IACL,OAAO;AAE/B,2BACEI,GAAA,EAA4B,KAAApD,GAAU,SAAO,IAC7C,UAAA,gBAAAjD;AAAA,IAACmG;AAAA,IAAA;AAAA,MACA,MAAAR;AAAA,MACA,SAASK,KAAW;AAAA,MACpB,WAAWI,GAAwB,EAAE,WAAAlC,GAAW,OAAAQ,GAAO;AAAA,MACtD,GAAG9E;AAAA,MAEH,UAAA0B;AAAA,IAAA;AAAA,EAAA,GAEH;AAEF,CAAC;AACDyB,GAAkB,cAAcsD,EAA4B;AAE5D,MAAMC,KAA6BlG,EAAM,WAGvC,CAAC,EAAE,GAAGR,EAAM,GAAGqD,MAAQ,gBAAAjD,EAACkG,GAAA,EAA4B,KAAAjD,GAAW,GAAGrD,GAAO,CAAE;AAE7E0G,GAA2B,cAAc;AAEzC,MAAMC,KAA6BnG,EAAM,WAGvC,CAAC,EAAE,GAAGR,EAAM,GAAGqD,MAAQ,gBAAAjD,EAACqG,GAAA,EAA4B,KAAApD,GAAW,GAAGrD,GAAO,CAAE;AAE7E2G,GAA2B,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SelectHTMLAttributes } from 'react';
|
|
2
|
+
import { ClassNames, CustomComponents, DropdownOption } from 'react-day-picker';
|
|
3
|
+
export type CalendarDropdownProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, "children"> & {
|
|
4
|
+
options?: DropdownOption[];
|
|
5
|
+
/** Передаёт react-day-picker: переопределения классов потребителя */
|
|
6
|
+
classNames?: Partial<ClassNames>;
|
|
7
|
+
/** Передаёт react-day-picker: переопределения компонентов потребителя */
|
|
8
|
+
components?: Partial<CustomComponents>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Селект месяца/года в шапке календаря: прозрачный нативный select поверх подписи с шевроном.
|
|
12
|
+
*
|
|
13
|
+
* В отличие от штатного Dropdown из react-day-picker, подпись резервирует ширину самой длинной
|
|
14
|
+
* опции: все подписи лежат в одной grid-ячейке, видна только выбранная. Иначе при смене месяца
|
|
15
|
+
* («май» → «сентябрь») меняется ширина и шапка, выровненная по центру, дёргается.
|
|
16
|
+
*
|
|
17
|
+
* @param options - Опции селекта
|
|
18
|
+
* @param className - Дополнительные CSS классы для select
|
|
19
|
+
* @param props - Атрибуты нативного select
|
|
20
|
+
*/
|
|
21
|
+
export declare const CalendarDropdown: {
|
|
22
|
+
({ options, className, classNames, components, ...props }: CalendarDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { TVReturnType } from 'tailwind-variants';
|
|
2
|
+
import { ClassNameValue } from 'tailwind-merge';
|
|
3
|
+
/**
|
|
4
|
+
* Селект месяца/года в шапке календаря: прозрачный нативный select поверх подписи с шевроном.
|
|
5
|
+
* Общий для Calendar (через classNames react-day-picker) и CalendarScroll (своя разметка).
|
|
6
|
+
*/
|
|
7
|
+
export declare const calendarDropdownStyles: TVReturnType<{
|
|
8
|
+
[key: string]: {
|
|
9
|
+
[key: string]: ClassNameValue | {
|
|
10
|
+
label?: ClassNameValue;
|
|
11
|
+
select?: ClassNameValue;
|
|
12
|
+
sizer?: ClassNameValue;
|
|
13
|
+
sizerItem?: ClassNameValue;
|
|
14
|
+
sizerItemHidden?: ClassNameValue;
|
|
15
|
+
root?: ClassNameValue;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
[x: string]: {
|
|
20
|
+
[x: string]: ClassNameValue | {
|
|
21
|
+
label?: ClassNameValue;
|
|
22
|
+
select?: ClassNameValue;
|
|
23
|
+
sizer?: ClassNameValue;
|
|
24
|
+
sizerItem?: ClassNameValue;
|
|
25
|
+
sizerItemHidden?: ClassNameValue;
|
|
26
|
+
root?: ClassNameValue;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
} | {}, {
|
|
30
|
+
root: string[];
|
|
31
|
+
select: string;
|
|
32
|
+
label: string[];
|
|
33
|
+
sizer: string;
|
|
34
|
+
sizerItem: string;
|
|
35
|
+
sizerItemHidden: string;
|
|
36
|
+
}, undefined, {
|
|
37
|
+
[key: string]: {
|
|
38
|
+
[key: string]: ClassNameValue | {
|
|
39
|
+
label?: ClassNameValue;
|
|
40
|
+
select?: ClassNameValue;
|
|
41
|
+
sizer?: ClassNameValue;
|
|
42
|
+
sizerItem?: ClassNameValue;
|
|
43
|
+
sizerItemHidden?: ClassNameValue;
|
|
44
|
+
root?: ClassNameValue;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
} | {}, {
|
|
48
|
+
root: string[];
|
|
49
|
+
select: string;
|
|
50
|
+
label: string[];
|
|
51
|
+
sizer: string;
|
|
52
|
+
sizerItem: string;
|
|
53
|
+
sizerItemHidden: string;
|
|
54
|
+
}, TVReturnType<unknown, {
|
|
55
|
+
root: string[];
|
|
56
|
+
select: string;
|
|
57
|
+
label: string[];
|
|
58
|
+
sizer: string;
|
|
59
|
+
sizerItem: string;
|
|
60
|
+
sizerItemHidden: string;
|
|
61
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DayPickerProps } from 'react-day-picker';
|
|
2
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
3
|
+
/** Пропсы DayPicker, которыми управляет сам CalendarScroll */
|
|
4
|
+
type ManagedProps = "month" | "onMonthChange" | "numberOfMonths" | "captionLayout" | "fixedWeeks" | "hideNavigation" | "showOutsideDays" | "pagedNavigation" | "reverseMonths";
|
|
5
|
+
export type CalendarScrollProps = DistributiveOmit<DayPickerProps, ManagedProps>;
|
|
6
|
+
/**
|
|
7
|
+
* CalendarScroll — календарь с вертикальным скроллом месяцев (как в мобильных банках).
|
|
8
|
+
*
|
|
9
|
+
* Месяцы идут друг за другом, сверху общая шапка с селектами месяца и года для быстрого
|
|
10
|
+
* прыжка. Селекты синхронизированы со скроллом. В DOM лежит только окно из нескольких
|
|
11
|
+
* месяцев, поэтому диапазон может быть широким (по умолчанию ±100 лет). Виртуализацию лучше
|
|
12
|
+
* не отключать: без неё DayPicker пересчитывал бы дни всех месяцев диапазона на каждом рендере.
|
|
13
|
+
*
|
|
14
|
+
* Высота задаётся через `className` (по умолчанию 420px). Выбор дат — те же `mode`,
|
|
15
|
+
* `selected`, `onSelect`, что и у Calendar.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CalendarScroll: {
|
|
18
|
+
({ className, classNames, locale, weekStartsOn, startMonth, endMonth, defaultMonth, components, ...props }: CalendarScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { CalendarScroll, CalendarScrollProps } from './CalendarScroll';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: {
|
|
5
|
+
({ className, classNames, locale, weekStartsOn, startMonth, endMonth, defaultMonth, components, ...props }: CalendarScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof CalendarScroll>;
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
export declare const Range: Story;
|