ics-ui-kit 0.1.0-alpha.12 → 0.1.0-alpha.13
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/Button-DQtBfU9y.js +57 -0
- package/dist/Button-DQtBfU9y.js.map +1 -0
- package/dist/{Button-DhfE69q0.js → ButtonBase-BEM8SNmT.js} +27 -56
- package/dist/ButtonBase-BEM8SNmT.js.map +1 -0
- package/dist/CarouselItem-pSHe0ufN.js +1500 -0
- package/dist/CarouselItem-pSHe0ufN.js.map +1 -0
- package/dist/CheckboxField-i_-dPpFM.js +370 -0
- package/dist/CheckboxField-i_-dPpFM.js.map +1 -0
- package/dist/Divider-C0Ss5GJT.js +47 -0
- package/dist/{Divider-D3NvaU8c.js.map → Divider-C0Ss5GJT.js.map} +1 -1
- package/dist/Field-3XJNFTql.js +78 -0
- package/dist/Field-3XJNFTql.js.map +1 -0
- package/dist/FieldLabel-CAbVan3E.js +97 -0
- package/dist/FieldLabel-CAbVan3E.js.map +1 -0
- package/dist/FormBody-4HptEjhb.js +103 -0
- package/dist/FormBody-4HptEjhb.js.map +1 -0
- package/dist/{IconButton-BUPs2kEo.js → IconButton-BkBsOIf5.js} +15 -15
- package/dist/{IconButton-BUPs2kEo.js.map → IconButton-BkBsOIf5.js.map} +1 -1
- package/dist/ImagePlaceholder-CNAKQWTh.js +45 -0
- package/dist/ImagePlaceholder-CNAKQWTh.js.map +1 -0
- package/dist/ImagePreview-DHi7A8md.js +156 -0
- package/dist/ImagePreview-DHi7A8md.js.map +1 -0
- package/dist/ImageUploader-46sxdmt5.js +123 -0
- package/dist/ImageUploader-46sxdmt5.js.map +1 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js +179 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js.map +1 -0
- package/dist/Modal-D33MSQot.js +125 -0
- package/dist/Modal-D33MSQot.js.map +1 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js +636 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js.map +1 -0
- package/dist/Toggle-7AlEmn8A.js +104 -0
- package/dist/Toggle-7AlEmn8A.js.map +1 -0
- package/dist/ToggleGroup-CT453MNp.js +200 -0
- package/dist/ToggleGroup-CT453MNp.js.map +1 -0
- package/dist/Tooltip-C4BbGF2_.js +372 -0
- package/dist/Tooltip-C4BbGF2_.js.map +1 -0
- package/dist/{bundle-mjs-D6wdQkGI.js → bundle-mjs-LhQum_e3.js} +676 -425
- package/dist/bundle-mjs-LhQum_e3.js.map +1 -0
- package/dist/check-C-TqZgvb.js.map +1 -1
- package/dist/chevron-right-CobOebzi.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/button/icon-button/IconButton.stories.d.ts +330 -2
- package/dist/components/button/loading-button/LoadingButton.d.ts +249 -0
- package/dist/components/button/loading-button/LoadingButton.stories.d.ts +219 -0
- package/dist/components/button.js +6 -5
- package/dist/components/button.js.map +1 -1
- package/dist/components/carousel.js +65 -1532
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/divider/content-divider/ContentDivider.d.ts +14 -0
- package/dist/components/divider/content-divider/ContentDivider.stories.d.ts +7 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/divider.js +45 -2
- package/dist/components/divider.js.map +1 -1
- package/dist/components/drawer/templates/drawer-footer-template/DrawerFooterTemplate.d.ts +3 -0
- package/dist/components/drawer.js +450 -447
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown.js +37 -33
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +2 -2
- package/dist/components/empty-state.js +1 -1
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/field/Field.d.ts +35 -0
- package/dist/components/field.js +1 -1
- package/dist/components/form/components/form-header/FormHeader.d.ts +2 -2
- package/dist/components/form.js +289 -288
- package/dist/components/form.js.map +1 -1
- package/dist/components/gallery/Gallery.d.ts +21 -0
- package/dist/components/gallery/Gallery.stories.d.ts +26 -0
- package/dist/components/gallery/index.d.ts +1 -0
- package/dist/components/gallery.d.ts +2 -0
- package/dist/components/gallery.js +130 -0
- package/dist/components/gallery.js.map +1 -0
- package/dist/components/icon-tooltip/IconTooltip.d.ts +2 -1
- package/dist/components/image-placeholder.js +2 -42
- package/dist/components/image-placeholder.js.map +1 -1
- package/dist/components/image-preview/ImagePreview.d.ts +6 -6
- package/dist/components/image-preview.js +2 -136
- package/dist/components/image-preview.js.map +1 -1
- package/dist/components/image-uploader.js +2 -118
- package/dist/components/image-uploader.js.map +1 -1
- package/dist/components/input/file-input/FileInput.d.ts +3 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +176 -195
- package/dist/components/input.js.map +1 -1
- package/dist/components/isolated-styles-wrapper/IsolatedStylesWrapper.d.ts +1 -1
- package/dist/components/label/Label.stories.d.ts +0 -2
- package/dist/components/label/field-label/FieldLabel.d.ts +11 -0
- package/dist/components/label/field-label/FieldLabel.stories.d.ts +1 -0
- package/dist/components/label/field-label/components/RequiredIcon.d.ts +5 -0
- package/dist/components/label.js +1 -1
- package/dist/components/loading/Loading.d.ts +4 -4
- package/dist/components/loading.js +2 -2
- package/dist/components/loading.js.map +1 -1
- package/dist/components/modal.js +12 -122
- package/dist/components/modal.js.map +1 -1
- package/dist/components/option-group.js +1 -1
- package/dist/components/popover.js +34 -31
- package/dist/components/popover.js.map +1 -1
- package/dist/components/scheduler.js +11 -11
- package/dist/components/scheduler.js.map +1 -1
- package/dist/components/scroll-shadow-container/ScrollShadowContainer.d.ts +1 -0
- package/dist/components/scroll-shadow-container.js +1 -1
- package/dist/components/select.js +487 -519
- package/dist/components/select.js.map +1 -1
- package/dist/components/shortcut/Shortcut.d.ts +14 -14
- package/dist/components/shortcut/Shortcut.stories.d.ts +7 -7
- package/dist/components/shortcut.js +16 -16
- package/dist/components/shortcut.js.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -0
- package/dist/components/skeleton/Skeleton.stories.d.ts +7 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +33 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/switch.js +147 -126
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +9 -8
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tag.js +3 -3
- package/dist/components/toast.js +4 -4
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip/Tooltip.stories.d.ts +7 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +8 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/createLucideIcon-DgrNxRV5.js.map +1 -1
- package/dist/design-tokens.source.json +1 -1
- package/dist/download-CVOGyQ0e.js.map +1 -1
- package/dist/downloadFile-yZV-aaO2.js +15 -0
- package/dist/downloadFile-yZV-aaO2.js.map +1 -0
- package/dist/index-B6K06mzp.js +67 -0
- package/dist/index-B6K06mzp.js.map +1 -0
- package/dist/index-BCZIl2rL.js +68 -0
- package/dist/index-BCZIl2rL.js.map +1 -0
- package/dist/index-BZPx6jYI.js.map +1 -1
- package/dist/index-Bj6ZBhqh.js +105 -0
- package/dist/index-Bj6ZBhqh.js.map +1 -0
- package/dist/index-ByaXH_ih.js.map +1 -1
- package/dist/index-CACw01gt.js +702 -0
- package/dist/index-CACw01gt.js.map +1 -0
- package/dist/index-COBL2CQB.js +14 -0
- package/dist/index-COBL2CQB.js.map +1 -0
- package/dist/index-CR-odn5-.js.map +1 -1
- package/dist/{index-BjbwEU_d.js → index-ClwWa5fz.js} +20 -20
- package/dist/index-ClwWa5fz.js.map +1 -0
- package/dist/{index-DwbC6luJ.js → index-Cx4x7Bv2.js} +52 -50
- package/dist/index-Cx4x7Bv2.js.map +1 -0
- package/dist/index-CzNelU6n.js +55 -0
- package/dist/index-CzNelU6n.js.map +1 -0
- package/dist/index-DBsc8nMF.js +43 -0
- package/dist/index-DBsc8nMF.js.map +1 -0
- package/dist/index-Mbnk_gHS.js +102 -0
- package/dist/index-Mbnk_gHS.js.map +1 -0
- package/dist/index-bhXb51Q1.js +215 -0
- package/dist/index-bhXb51Q1.js.map +1 -0
- package/dist/index-n71RB2rx.js +1592 -0
- package/dist/index-n71RB2rx.js.map +1 -0
- package/dist/index-rKs9bXHr.js +7 -0
- package/dist/index-rKs9bXHr.js.map +1 -0
- package/dist/lib/utils/file/downloadFile.d.ts +2 -0
- package/dist/lib/utils/image/imageConverter.d.ts +23 -0
- package/dist/styles-scoped.css +72 -18
- package/dist/styles.css +72 -18
- package/dist/{utils-DGzAmwok.js → utils-BK4mPzkB.js} +2 -2
- package/dist/utils-BK4mPzkB.js.map +1 -0
- package/dist/x-JgjNP5oH.js.map +1 -1
- package/package.json +1 -1
- package/dist/Button-DhfE69q0.js.map +0 -1
- package/dist/CheckboxField-CL1Tc7P4.js +0 -257
- package/dist/CheckboxField-CL1Tc7P4.js.map +0 -1
- package/dist/Divider-D3NvaU8c.js +0 -46
- package/dist/Field-COOo8o9f.js +0 -80
- package/dist/Field-COOo8o9f.js.map +0 -1
- package/dist/FieldLabel-BGxT_RaE.js +0 -64
- package/dist/FieldLabel-BGxT_RaE.js.map +0 -1
- package/dist/FormBody-DM52shm4.js +0 -101
- package/dist/FormBody-DM52shm4.js.map +0 -1
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js +0 -555
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js.map +0 -1
- package/dist/ScrollShadowContainer-DSKr3_fV.js +0 -690
- package/dist/ScrollShadowContainer-DSKr3_fV.js.map +0 -1
- package/dist/Toggle-BuYtICWv.js +0 -129
- package/dist/Toggle-BuYtICWv.js.map +0 -1
- package/dist/ToggleGroup-CMyUAz04.js +0 -467
- package/dist/ToggleGroup-CMyUAz04.js.map +0 -1
- package/dist/bundle-mjs-D6wdQkGI.js.map +0 -1
- package/dist/floating-ui.react-dom-CWfR7VfF.js +0 -1346
- package/dist/floating-ui.react-dom-CWfR7VfF.js.map +0 -1
- package/dist/index-0WznJ1QS.js +0 -276
- package/dist/index-0WznJ1QS.js.map +0 -1
- package/dist/index-BjbwEU_d.js.map +0 -1
- package/dist/index-BqriTm0o.js +0 -47
- package/dist/index-BqriTm0o.js.map +0 -1
- package/dist/index-C6bvrqL8.js +0 -563
- package/dist/index-C6bvrqL8.js.map +0 -1
- package/dist/index-C6t9z3on.js +0 -97
- package/dist/index-C6t9z3on.js.map +0 -1
- package/dist/index-CaQG3DzJ.js +0 -64
- package/dist/index-CaQG3DzJ.js.map +0 -1
- package/dist/index-ChTGHCkY.js +0 -255
- package/dist/index-ChTGHCkY.js.map +0 -1
- package/dist/index-D808y1pT.js +0 -178
- package/dist/index-D808y1pT.js.map +0 -1
- package/dist/index-DE3fiSzl.js +0 -28
- package/dist/index-DE3fiSzl.js.map +0 -1
- package/dist/index-DPws5oAn.js +0 -90
- package/dist/index-DPws5oAn.js.map +0 -1
- package/dist/index-DeUgDpdG.js +0 -80
- package/dist/index-DeUgDpdG.js.map +0 -1
- package/dist/index-DvquTpxI.js +0 -140
- package/dist/index-DvquTpxI.js.map +0 -1
- package/dist/index-DwbC6luJ.js.map +0 -1
- package/dist/index-Ncxt32Wo.js +0 -174
- package/dist/index-Ncxt32Wo.js.map +0 -1
- package/dist/index-U7y6nBZR.js +0 -179
- package/dist/index-U7y6nBZR.js.map +0 -1
- package/dist/index-pysSAa5G.js +0 -57
- package/dist/index-pysSAa5G.js.map +0 -1
- package/dist/tooltip-DI3_ZKNk.js +0 -365
- package/dist/tooltip-DI3_ZKNk.js.map +0 -1
- package/dist/utils-DGzAmwok.js.map +0 -1
- /package/dist/components/{ui/tooltip.d.ts → tooltip/Tooltip.d.ts} +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
var L = Object.defineProperty, O = Object.defineProperties;
|
|
2
|
+
var S = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var p = Object.getOwnPropertySymbols;
|
|
4
|
+
var w = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var g = (t, e, r) => e in t ? L(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, h = (t, e) => {
|
|
6
|
+
for (var r in e || (e = {}))
|
|
7
|
+
w.call(e, r) && g(t, r, e[r]);
|
|
8
|
+
if (p)
|
|
9
|
+
for (var r of p(e))
|
|
10
|
+
k.call(e, r) && g(t, r, e[r]);
|
|
11
|
+
return t;
|
|
12
|
+
}, y = (t, e) => O(t, S(e));
|
|
13
|
+
var v = (t, e) => {
|
|
14
|
+
var r = {};
|
|
15
|
+
for (var a in t)
|
|
16
|
+
w.call(t, a) && e.indexOf(a) < 0 && (r[a] = t[a]);
|
|
17
|
+
if (t != null && p)
|
|
18
|
+
for (var a of p(t))
|
|
19
|
+
e.indexOf(a) < 0 && k.call(t, a) && (r[a] = t[a]);
|
|
20
|
+
return r;
|
|
21
|
+
};
|
|
22
|
+
import { jsx as s, jsxs as N } from "react/jsx-runtime";
|
|
23
|
+
import P, { useCallback as d } from "react";
|
|
24
|
+
import { c as j } from "./index-CR-odn5-.js";
|
|
25
|
+
import { B as W } from "./Button-DQtBfU9y.js";
|
|
26
|
+
import { I as B } from "./Icon-CSPBHL_x.js";
|
|
27
|
+
import { c as I } from "./createLucideIcon-DgrNxRV5.js";
|
|
28
|
+
import { D as _ } from "./download-CVOGyQ0e.js";
|
|
29
|
+
import { X as A } from "./x-JgjNP5oH.js";
|
|
30
|
+
/**
|
|
31
|
+
* @license lucide-react v0.460.0 - ISC
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the ISC license.
|
|
34
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
const E = I("ImageOff", [
|
|
37
|
+
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }],
|
|
38
|
+
["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83", key: "1bzlo9" }],
|
|
39
|
+
["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21", key: "1q0aeu" }],
|
|
40
|
+
["line", { x1: "18", x2: "21", y1: "12", y2: "15", key: "5mozeu" }],
|
|
41
|
+
[
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",
|
|
45
|
+
key: "mmje98"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }]
|
|
49
|
+
]);
|
|
50
|
+
/**
|
|
51
|
+
* @license lucide-react v0.460.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/
|
|
56
|
+
const H = I("RotateCw", [
|
|
57
|
+
["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
|
|
58
|
+
["path", { d: "M21 3v5h-5", key: "1q7to0" }]
|
|
59
|
+
]), V = j({
|
|
60
|
+
slots: {
|
|
61
|
+
container: "h-4 w-4 rounded-full border border-muted bg-primary-bg p-1",
|
|
62
|
+
icon: "h-2 w-2 text-muted"
|
|
63
|
+
}
|
|
64
|
+
}), f = P.forwardRef(
|
|
65
|
+
(b, i) => {
|
|
66
|
+
var n = b, { className: t, onClick: e, icon: r } = n, a = v(n, ["className", "onClick", "icon"]);
|
|
67
|
+
const m = V();
|
|
68
|
+
return /* @__PURE__ */ s(
|
|
69
|
+
W,
|
|
70
|
+
y(h({
|
|
71
|
+
variant: "outline",
|
|
72
|
+
ref: i,
|
|
73
|
+
className: m.container({ className: t }),
|
|
74
|
+
onClick: e
|
|
75
|
+
}, a), {
|
|
76
|
+
children: /* @__PURE__ */ s(B, { className: m.icon(), icon: r })
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
f.displayName = "ImageUploaderButton";
|
|
82
|
+
const X = j({
|
|
83
|
+
slots: {
|
|
84
|
+
container: "group relative flex aspect-square cursor-pointer items-center justify-center rounded-xl outline-none focus-visible:shadow-focus",
|
|
85
|
+
image: "aspect-square h-full rounded-xl",
|
|
86
|
+
buttonWrapper: "absolute right-1 top-1 flex gap-1",
|
|
87
|
+
icon: "h-8 w-8 text-muted",
|
|
88
|
+
overlay: "absolute inset-0 rounded-xl group-hover:bg-slate-900/20"
|
|
89
|
+
},
|
|
90
|
+
variants: {
|
|
91
|
+
error: {
|
|
92
|
+
true: {
|
|
93
|
+
container: "outline outline-1 outline-status-error-secondary-border hover:bg-status-error-bg hover:outline-status-error-primary-border focus-visible:shadow-focus-error focus-visible:outline-status-error-secondary-border"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
size: {
|
|
97
|
+
xs: { container: "h-[3.75rem] w-[3.75rem]" },
|
|
98
|
+
sm: { container: "h-20 w-20" },
|
|
99
|
+
md: { container: "h-[7.5rem] w-[7.5rem]" },
|
|
100
|
+
lg: { container: "h-[11.5rem] w-[11.5rem]" },
|
|
101
|
+
xl: { container: "h-96 w-96" }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}), F = P.forwardRef(
|
|
105
|
+
(G, q) => {
|
|
106
|
+
var x = G, { className: t, error: e, readonly: r, onClear: a, onRetry: i, size: b, url: n, alt: m, onImageClick: c, onDownload: l } = x, M = v(x, ["className", "error", "readonly", "onClear", "onRetry", "size", "url", "alt", "onImageClick", "onDownload"]);
|
|
107
|
+
const u = X({ className: t, size: b, error: e }), z = d(
|
|
108
|
+
(o) => {
|
|
109
|
+
o.preventDefault(), o.stopPropagation(), l == null || l(n);
|
|
110
|
+
},
|
|
111
|
+
[l, n]
|
|
112
|
+
), D = d(
|
|
113
|
+
(o) => {
|
|
114
|
+
o.preventDefault(), o.stopPropagation(), a == null || a();
|
|
115
|
+
},
|
|
116
|
+
[a]
|
|
117
|
+
), U = d(
|
|
118
|
+
(o) => {
|
|
119
|
+
o.preventDefault(), o.stopPropagation(), i == null || i();
|
|
120
|
+
},
|
|
121
|
+
[i]
|
|
122
|
+
), K = d(
|
|
123
|
+
(o) => {
|
|
124
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), c == null || c(o));
|
|
125
|
+
},
|
|
126
|
+
[c]
|
|
127
|
+
);
|
|
128
|
+
return /* @__PURE__ */ N(
|
|
129
|
+
"div",
|
|
130
|
+
y(h({
|
|
131
|
+
ref: q,
|
|
132
|
+
role: "button",
|
|
133
|
+
tabIndex: 0,
|
|
134
|
+
onClick: c,
|
|
135
|
+
onKeyDown: K,
|
|
136
|
+
className: u.container()
|
|
137
|
+
}, M), {
|
|
138
|
+
children: [
|
|
139
|
+
!e && /* @__PURE__ */ s("img", { src: n, alt: m, className: u.image() }),
|
|
140
|
+
!e && /* @__PURE__ */ s("div", { className: u.overlay() }),
|
|
141
|
+
e && /* @__PURE__ */ s(B, { icon: E, className: u.icon() }),
|
|
142
|
+
/* @__PURE__ */ N("div", { className: u.buttonWrapper(), children: [
|
|
143
|
+
!e && l && /* @__PURE__ */ s(f, { icon: _, onClick: z }),
|
|
144
|
+
e && i && /* @__PURE__ */ s(f, { icon: H, onClick: U }),
|
|
145
|
+
!r && a && /* @__PURE__ */ s(f, { icon: A, onClick: D })
|
|
146
|
+
] })
|
|
147
|
+
]
|
|
148
|
+
})
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
F.displayName = "ImagePreview";
|
|
153
|
+
export {
|
|
154
|
+
F as I
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=ImagePreview-DHi7A8md.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePreview-DHi7A8md.js","sources":["../node_modules/lucide-react/dist/esm/icons/image-off.js","../node_modules/lucide-react/dist/esm/icons/rotate-cw.js","../src/components/image-uploader/components/ImageUploaderButton.tsx","../src/components/image-preview/ImagePreview.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ImageOff = createLucideIcon(\"ImageOff\", [\n [\"line\", { x1: \"2\", x2: \"22\", y1: \"2\", y2: \"22\", key: \"a6p6uj\" }],\n [\"path\", { d: \"M10.41 10.41a2 2 0 1 1-2.83-2.83\", key: \"1bzlo9\" }],\n [\"line\", { x1: \"13.5\", x2: \"6\", y1: \"13.5\", y2: \"21\", key: \"1q0aeu\" }],\n [\"line\", { x1: \"18\", x2: \"21\", y1: \"12\", y2: \"15\", key: \"5mozeu\" }],\n [\n \"path\",\n {\n d: \"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59\",\n key: \"mmje98\"\n }\n ],\n [\"path\", { d: \"M21 15V5a2 2 0 0 0-2-2H9\", key: \"43el77\" }]\n]);\n\nexport { ImageOff as default };\n//# sourceMappingURL=image-off.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst RotateCw = createLucideIcon(\"RotateCw\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n]);\n\nexport { RotateCw as default };\n//# sourceMappingURL=rotate-cw.js.map\n","import { Button } from \"@/components/button\";\r\nimport { Icon } from \"@/components/icon\";\r\nimport { LucideIcon } from \"lucide-react\";\r\nimport React from \"react\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\nconst imageUploaderButtonStyles = tv({\r\n\tslots: {\r\n\t\tcontainer: \"h-4 w-4 rounded-full border border-muted bg-primary-bg p-1\",\r\n\t\ticon: \"h-2 w-2 text-muted\"\r\n\t}\r\n});\r\n\r\nexport type ImageUploaderButtonProps = React.HTMLAttributes<HTMLButtonElement> &\r\n\tVariantProps<typeof imageUploaderButtonStyles> & {\r\n\t\ticon: LucideIcon;\r\n\t};\r\n\r\nexport const ImageUploaderButton = React.forwardRef<HTMLButtonElement, ImageUploaderButtonProps>(\r\n\t({ className, onClick, icon, ...props }, ref) => {\r\n\t\tconst styles = imageUploaderButtonStyles();\r\n\r\n\t\treturn (\r\n\t\t\t<Button\r\n\t\t\t\tvariant=\"outline\"\r\n\t\t\t\tref={ref}\r\n\t\t\t\tclassName={styles.container({ className })}\r\n\t\t\t\tonClick={onClick}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t<Icon className={styles.icon()} icon={icon} />\r\n\t\t\t</Button>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nImageUploaderButton.displayName = \"ImageUploaderButton\";\r\n","import React, { useCallback, KeyboardEvent } from \"react\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\nimport { ImageUploaderButton } from \"../image-uploader/components/ImageUploaderButton\";\r\nimport { Download, ImageOff, RotateCw, X } from \"lucide-react\";\r\nimport { Icon } from \"../icon\";\r\n\r\nconst imagePreviewStyles = tv({\r\n\tslots: {\r\n\t\tcontainer:\r\n\t\t\t\"group relative flex aspect-square cursor-pointer items-center justify-center rounded-xl outline-none focus-visible:shadow-focus\",\r\n\t\timage: \"aspect-square h-full rounded-xl\",\r\n\t\tbuttonWrapper: \"absolute right-1 top-1 flex gap-1\",\r\n\t\ticon: \"h-8 w-8 text-muted\",\r\n\t\toverlay: \"absolute inset-0 rounded-xl group-hover:bg-slate-900/20\"\r\n\t},\r\n\tvariants: {\r\n\t\terror: {\r\n\t\t\ttrue: {\r\n\t\t\t\tcontainer:\r\n\t\t\t\t\t\"outline outline-1 outline-status-error-secondary-border hover:bg-status-error-bg hover:outline-status-error-primary-border focus-visible:shadow-focus-error focus-visible:outline-status-error-secondary-border\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tsize: {\r\n\t\t\txs: { container: \"h-[3.75rem] w-[3.75rem]\" },\r\n\t\t\tsm: { container: \"h-20 w-20\" },\r\n\t\t\tmd: { container: \"h-[7.5rem] w-[7.5rem]\" },\r\n\t\t\tlg: { container: \"h-[11.5rem] w-[11.5rem]\" },\r\n\t\t\txl: { container: \"h-96 w-96\" }\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport type ImagePreviewProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"onClick\"> &\r\n\tVariantProps<typeof imagePreviewStyles> & {\r\n\t\turl: string;\r\n\t\talt: string;\r\n\t\treadonly?: boolean;\r\n\t\tonImageClick?: (e: React.MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>) => void;\r\n\t\tonDownload?: (url: string) => void;\r\n\t\tonRetry?: () => void;\r\n\t\tonClear?: () => void;\r\n\t};\r\n\r\nexport const ImagePreview = React.forwardRef<HTMLDivElement, ImagePreviewProps>(\r\n\t({ className, error, readonly, onClear, onRetry, size, url, alt, onImageClick, onDownload, ...props }, ref) => {\r\n\t\tconst styles = imagePreviewStyles({ className, size, error });\r\n\r\n\t\tconst handleDownload = useCallback(\r\n\t\t\t(e: React.MouseEvent<HTMLButtonElement>) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tonDownload?.(url);\r\n\t\t\t},\r\n\t\t\t[onDownload, url]\r\n\t\t);\r\n\r\n\t\tconst handleClear = useCallback(\r\n\t\t\t(e: React.MouseEvent<HTMLButtonElement>) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tonClear?.();\r\n\t\t\t},\r\n\t\t\t[onClear]\r\n\t\t);\r\n\r\n\t\tconst handleRetry = useCallback(\r\n\t\t\t(e: React.MouseEvent<HTMLButtonElement>) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tonRetry?.();\r\n\t\t\t},\r\n\t\t\t[onRetry]\r\n\t\t);\r\n\r\n\t\tconst handleKeyDown = useCallback(\r\n\t\t\t(e: KeyboardEvent<HTMLDivElement>) => {\r\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\tonImageClick?.(e);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t[onImageClick]\r\n\t\t);\r\n\r\n\t\treturn (\r\n\t\t\t<div\r\n\t\t\t\tref={ref}\r\n\t\t\t\trole=\"button\"\r\n\t\t\t\ttabIndex={0}\r\n\t\t\t\tonClick={onImageClick}\r\n\t\t\t\tonKeyDown={handleKeyDown}\r\n\t\t\t\tclassName={styles.container()}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t{!error && <img src={url} alt={alt} className={styles.image()} />}\r\n\t\t\t\t{!error && <div className={styles.overlay()} />}\r\n\r\n\t\t\t\t{error && <Icon icon={ImageOff} className={styles.icon()} />}\r\n\r\n\t\t\t\t<div className={styles.buttonWrapper()}>\r\n\t\t\t\t\t{!error && onDownload && <ImageUploaderButton icon={Download} onClick={handleDownload} />}\r\n\t\t\t\t\t{error && onRetry && <ImageUploaderButton icon={RotateCw} onClick={handleRetry} />}\r\n\t\t\t\t\t{!readonly && onClear && <ImageUploaderButton icon={X} onClick={handleClear} />}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nImagePreview.displayName = \"ImagePreview\";\r\n"],"names":["ImageOff","createLucideIcon","RotateCw","imageUploaderButtonStyles","tv","ImageUploaderButton","React","_a","ref","_b","className","onClick","icon","props","__objRest","styles","jsx","Button","__spreadProps","__spreadValues","Icon","imagePreviewStyles","ImagePreview","error","readonly","onClear","onRetry","size","url","alt","onImageClick","onDownload","handleDownload","useCallback","e","handleClear","handleRetry","handleKeyDown","jsxs","Download","X"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAWC,EAAiB,YAAY;AAAA,EAC5C,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAChE,CAAC,QAAQ,EAAE,GAAG,oCAAoC,KAAK,SAAQ,CAAE;AAAA,EACjE,CAAC,QAAQ,EAAE,IAAI,QAAQ,IAAI,KAAK,IAAI,QAAQ,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EACrE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAClE;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACG;AAAA,EACD,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAU,CAAA;AAC3D,CAAC;ACtBD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMC,IAAWD,EAAiB,YAAY;AAAA,EAC5C,CAAC,QAAQ,EAAE,GAAG,qDAAqD,KAAK,SAAQ,CAAE;AAAA,EAClF,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAU,CAAA;AAC7C,CAAC,GCNKE,IAA4BC,EAAG;AAAA,EACpC,OAAO;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,EAAA;AAER,CAAC,GAOYC,IAAsBC,EAAM;AAAA,EACxC,CAACC,GAAwCC,MAAQ;AAAhD,QAAAC,IAAAF,GAAE,aAAAG,GAAW,SAAAC,GAAS,MAAAC,MAAtBH,GAA+BI,IAAAC,EAA/BL,GAA+B,CAA7B,aAAW,WAAS;AACtB,UAAMM,IAASZ,EAA0B;AA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ASG,KAAW,gBAAAV,EAACX,KAAoB,MAAMH,GAAU,SAASkC,GAAa;AAAA,YAC/E,CAACZ,KAAYC,KAAW,gBAAAT,EAACX,KAAoB,MAAMmC,GAAG,SAASL,EAAa,CAAA;AAAA,UAAA,EAC9E,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGH;AAEAb,EAAa,cAAc;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var w = Object.defineProperty, x = Object.defineProperties;
|
|
2
|
+
var y = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var c = Object.getOwnPropertySymbols;
|
|
4
|
+
var d = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var u = (e, o, r) => o in e ? w(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r, C = (e, o) => {
|
|
6
|
+
for (var r in o || (o = {}))
|
|
7
|
+
d.call(o, r) && u(e, r, o[r]);
|
|
8
|
+
if (c)
|
|
9
|
+
for (var r of c(o))
|
|
10
|
+
l.call(o, r) && u(e, r, o[r]);
|
|
11
|
+
return e;
|
|
12
|
+
}, h = (e, o) => x(e, y(o));
|
|
13
|
+
var p = (e, o) => {
|
|
14
|
+
var r = {};
|
|
15
|
+
for (var t in e)
|
|
16
|
+
d.call(e, t) && o.indexOf(t) < 0 && (r[t] = e[t]);
|
|
17
|
+
if (e != null && c)
|
|
18
|
+
for (var t of c(e))
|
|
19
|
+
o.indexOf(t) < 0 && l.call(e, t) && (r[t] = e[t]);
|
|
20
|
+
return r;
|
|
21
|
+
};
|
|
22
|
+
import { jsx as a, jsxs as H } from "react/jsx-runtime";
|
|
23
|
+
import I, { useRef as L } from "react";
|
|
24
|
+
import { c as V } from "./index-CR-odn5-.js";
|
|
25
|
+
import { B as k } from "./Button-DQtBfU9y.js";
|
|
26
|
+
import { I as N } from "./Icon-CSPBHL_x.js";
|
|
27
|
+
import { c as M } from "./utils-BK4mPzkB.js";
|
|
28
|
+
import { c as R } from "./createLucideIcon-DgrNxRV5.js";
|
|
29
|
+
/**
|
|
30
|
+
* @license lucide-react v0.460.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/
|
|
35
|
+
const Z = R("Image", [
|
|
36
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
37
|
+
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
38
|
+
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
39
|
+
]), j = ({ className: e }) => /* @__PURE__ */ a(
|
|
40
|
+
"svg",
|
|
41
|
+
{
|
|
42
|
+
width: "24",
|
|
43
|
+
height: "24",
|
|
44
|
+
viewBox: "0 0 24 24",
|
|
45
|
+
fill: "none",
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
className: e,
|
|
48
|
+
children: /* @__PURE__ */ a(
|
|
49
|
+
"path",
|
|
50
|
+
{
|
|
51
|
+
d: "M19.9609 13.4961C20.375 13.4963 20.7109 13.832 20.7109 14.2461V16.6309H23.2539C23.6679 16.631 24.0038 16.9668 24.0039 17.3809C24.0037 17.7948 23.6679 18.1307 23.2539 18.1309H20.7109V20.5166C20.7106 20.9304 20.3748 21.2664 19.9609 21.2666C19.547 21.2666 19.2113 20.9305 19.2109 20.5166V18.1309H16.668C16.2539 18.1309 15.9182 17.7949 15.918 17.3809C15.9181 16.9668 16.2538 16.6309 16.668 16.6309H19.2109V14.2461C19.2109 13.8319 19.5467 13.4961 19.9609 13.4961ZM12.8369 2.00391C13.0231 2.02397 13.1967 2.11347 13.3213 2.25586L15.499 4.74316H18.04L18.2998 4.75586C18.9025 4.81284 19.4747 5.06626 19.915 5.48535C20.4195 5.96579 20.7109 6.62622 20.7109 7.32227V10.375C20.7107 10.7889 20.3748 11.1248 19.9609 11.125C19.5469 11.125 19.2112 10.789 19.2109 10.375V7.32227C19.2109 7.04851 19.0965 6.77772 18.8809 6.57227C18.6909 6.39143 18.4358 6.27523 18.1592 6.24902L18.04 6.24316H15.1582C14.9421 6.24316 14.7362 6.14977 14.5938 5.9873L12.416 3.5H8.29492L6.11719 5.9873C5.97483 6.14984 5.7688 6.24309 5.55273 6.24316H2.6709C2.34886 6.24321 2.04714 6.36568 1.83008 6.57227C1.6143 6.77775 1.5 7.04841 1.5 7.32227V15.5518C1.50013 15.8255 1.61435 16.0974 1.83008 16.3027C2.04709 16.509 2.34916 16.6308 2.6709 16.6309H12.8252L12.9023 16.6348C13.2801 16.6735 13.5751 16.9929 13.5752 17.3809C13.575 17.7688 13.2801 18.0883 12.9023 18.127L12.8252 18.1309H2.6709C1.97437 18.1308 1.29923 17.8676 0.795898 17.3887C0.291323 16.9083 0.000130854 16.2478 0 15.5518V7.32227C0 6.62613 0.291286 5.96581 0.795898 5.48535C1.29925 5.00637 1.97432 4.74321 2.6709 4.74316H5.21191L7.38965 2.25586L7.44629 2.19824C7.584 2.0715 7.765 2 7.9541 2H12.7568L12.8369 2.00391ZM10.3555 7.48633C12.3259 7.48647 13.9873 9.01692 13.9873 10.9805C13.9868 12.9436 12.3255 14.4735 10.3555 14.4736C8.38527 14.4736 6.72416 12.9437 6.72363 10.9805C6.72363 9.01682 8.38496 7.48633 10.3555 7.48633ZM10.3555 8.98633C9.14302 8.98633 8.22363 9.91391 8.22363 10.9805C8.22417 12.0466 9.14338 12.9736 10.3555 12.9736C11.5674 12.9735 12.4868 12.0466 12.4873 10.9805C12.4873 9.91399 11.5678 8.98647 10.3555 8.98633Z",
|
|
52
|
+
fill: "currentColor"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
), B = V({
|
|
57
|
+
slots: {
|
|
58
|
+
container: "group relative flex aspect-square items-center justify-center rounded-xl p-6 hover:shadow-base focus-visible:shadow-focus focus-visible:ring-0",
|
|
59
|
+
icon: "h-8 w-8 stroke-[1.5px] text-muted group-hover:text-primary",
|
|
60
|
+
input: "hidden",
|
|
61
|
+
// Кастомная иконка для состояния загрузки с фиксированными размерами (35 и 33px) и небольшим смещением для визуального баланса
|
|
62
|
+
customIcon: "h-[2.1875rem] w-[2.0625rem] translate-x-0.5 translate-y-0.5"
|
|
63
|
+
},
|
|
64
|
+
variants: {
|
|
65
|
+
readonly: {
|
|
66
|
+
true: {
|
|
67
|
+
container: "cursor-default bg-secondary-bg-hover hover:border-secondary-border hover:shadow-sm focus-visible:bg-secondary-bg-hover",
|
|
68
|
+
icon: "group-hover:text-muted"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
error: {
|
|
72
|
+
true: {
|
|
73
|
+
container: "border-status-error-secondary-border hover:border-status-error-primary-border hover:bg-status-error-bg focus-visible:border-status-error-secondary-border focus-visible:shadow-focus-error",
|
|
74
|
+
icon: "group-hover:text-muted"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
size: {
|
|
78
|
+
xs: { container: "h-[3.75rem] w-[3.75rem]" },
|
|
79
|
+
sm: { container: "h-20 w-20" },
|
|
80
|
+
md: { container: "h-[7.5rem] w-[7.5rem]" },
|
|
81
|
+
lg: { container: "h-[11.5rem] w-[11.5rem]" },
|
|
82
|
+
xl: { container: "h-96 w-96" }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}), U = I.forwardRef(
|
|
86
|
+
(S, b) => {
|
|
87
|
+
var n = S, { className: e, error: o, readonly: r, size: t, onChange: f, whiteList: g = "image/*" } = n, v = p(n, ["className", "error", "readonly", "size", "onChange", "whiteList"]);
|
|
88
|
+
const i = L(null), s = B({ className: e, readonly: r, error: o, size: t });
|
|
89
|
+
return /* @__PURE__ */ H(
|
|
90
|
+
k,
|
|
91
|
+
h(C({
|
|
92
|
+
ref: b,
|
|
93
|
+
type: "button",
|
|
94
|
+
variant: "outline",
|
|
95
|
+
className: s.container(),
|
|
96
|
+
onClick: () => {
|
|
97
|
+
var m;
|
|
98
|
+
return !r && ((m = i.current) == null ? void 0 : m.click());
|
|
99
|
+
}
|
|
100
|
+
}, v), {
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ a(
|
|
103
|
+
"input",
|
|
104
|
+
{
|
|
105
|
+
ref: i,
|
|
106
|
+
type: "file",
|
|
107
|
+
className: s.input(),
|
|
108
|
+
onChange: f,
|
|
109
|
+
accept: g
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
r && /* @__PURE__ */ a(N, { icon: Z, className: s.icon() }),
|
|
113
|
+
!r && /* @__PURE__ */ a(j, { className: M(s.icon(), s.customIcon()) })
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
U.displayName = "ImageUploader";
|
|
120
|
+
export {
|
|
121
|
+
U as I
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=ImageUploader-46sxdmt5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageUploader-46sxdmt5.js","sources":["../node_modules/lucide-react/dist/esm/icons/image.js","../src/components/image-uploader/components/ImageCameraAddSvg.tsx","../src/components/image-uploader/ImageUploader.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Image = createLucideIcon(\"Image\", [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", ry: \"2\", key: \"1m3agn\" }],\n [\"circle\", { cx: \"9\", cy: \"9\", r: \"2\", key: \"af1f0g\" }],\n [\"path\", { d: \"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\", key: \"1xmnt7\" }]\n]);\n\nexport { Image as default };\n//# sourceMappingURL=image.js.map\n","interface ImageCameraAddProps {\r\n\tclassName?: string;\r\n}\r\n\r\nexport const ImageCameraAddSvg = ({ className }: ImageCameraAddProps) => {\r\n\treturn (\r\n\t\t<svg\r\n\t\t\twidth=\"24\"\r\n\t\t\theight=\"24\"\r\n\t\t\tviewBox=\"0 0 24 24\"\r\n\t\t\tfill=\"none\"\r\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\r\n\t\t\tclassName={className}\r\n\t\t>\r\n\t\t\t<path\r\n\t\t\t\td=\"M19.9609 13.4961C20.375 13.4963 20.7109 13.832 20.7109 14.2461V16.6309H23.2539C23.6679 16.631 24.0038 16.9668 24.0039 17.3809C24.0037 17.7948 23.6679 18.1307 23.2539 18.1309H20.7109V20.5166C20.7106 20.9304 20.3748 21.2664 19.9609 21.2666C19.547 21.2666 19.2113 20.9305 19.2109 20.5166V18.1309H16.668C16.2539 18.1309 15.9182 17.7949 15.918 17.3809C15.9181 16.9668 16.2538 16.6309 16.668 16.6309H19.2109V14.2461C19.2109 13.8319 19.5467 13.4961 19.9609 13.4961ZM12.8369 2.00391C13.0231 2.02397 13.1967 2.11347 13.3213 2.25586L15.499 4.74316H18.04L18.2998 4.75586C18.9025 4.81284 19.4747 5.06626 19.915 5.48535C20.4195 5.96579 20.7109 6.62622 20.7109 7.32227V10.375C20.7107 10.7889 20.3748 11.1248 19.9609 11.125C19.5469 11.125 19.2112 10.789 19.2109 10.375V7.32227C19.2109 7.04851 19.0965 6.77772 18.8809 6.57227C18.6909 6.39143 18.4358 6.27523 18.1592 6.24902L18.04 6.24316H15.1582C14.9421 6.24316 14.7362 6.14977 14.5938 5.9873L12.416 3.5H8.29492L6.11719 5.9873C5.97483 6.14984 5.7688 6.24309 5.55273 6.24316H2.6709C2.34886 6.24321 2.04714 6.36568 1.83008 6.57227C1.6143 6.77775 1.5 7.04841 1.5 7.32227V15.5518C1.50013 15.8255 1.61435 16.0974 1.83008 16.3027C2.04709 16.509 2.34916 16.6308 2.6709 16.6309H12.8252L12.9023 16.6348C13.2801 16.6735 13.5751 16.9929 13.5752 17.3809C13.575 17.7688 13.2801 18.0883 12.9023 18.127L12.8252 18.1309H2.6709C1.97437 18.1308 1.29923 17.8676 0.795898 17.3887C0.291323 16.9083 0.000130854 16.2478 0 15.5518V7.32227C0 6.62613 0.291286 5.96581 0.795898 5.48535C1.29925 5.00637 1.97432 4.74321 2.6709 4.74316H5.21191L7.38965 2.25586L7.44629 2.19824C7.584 2.0715 7.765 2 7.9541 2H12.7568L12.8369 2.00391ZM10.3555 7.48633C12.3259 7.48647 13.9873 9.01692 13.9873 10.9805C13.9868 12.9436 12.3255 14.4735 10.3555 14.4736C8.38527 14.4736 6.72416 12.9437 6.72363 10.9805C6.72363 9.01682 8.38496 7.48633 10.3555 7.48633ZM10.3555 8.98633C9.14302 8.98633 8.22363 9.91391 8.22363 10.9805C8.22417 12.0466 9.14338 12.9736 10.3555 12.9736C11.5674 12.9735 12.4868 12.0466 12.4873 10.9805C12.4873 9.91399 11.5678 8.98647 10.3555 8.98633Z\"\r\n\t\t\t\tfill=\"currentColor\"\r\n\t\t\t/>\r\n\t\t</svg>\r\n\t);\r\n};\r\n","import React, { useRef } from \"react\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\nimport { ImageCameraAddSvg } from \"./components/ImageCameraAddSvg\";\r\nimport { Button } from \"../button\";\r\nimport { Image } from \"lucide-react\";\r\nimport { Icon } from \"../icon\";\r\nimport { cn } from \"@/lib/utils\";\r\n\r\nconst imageUploaderStyles = tv({\r\n\tslots: {\r\n\t\tcontainer:\r\n\t\t\t\"group relative flex aspect-square items-center justify-center rounded-xl p-6 hover:shadow-base focus-visible:shadow-focus focus-visible:ring-0\",\r\n\t\ticon: \"h-8 w-8 stroke-[1.5px] text-muted group-hover:text-primary\",\r\n\t\tinput: \"hidden\",\r\n\t\t// Кастомная иконка для состояния загрузки с фиксированными размерами (35 и 33px) и небольшим смещением для визуального баланса\r\n\t\tcustomIcon: \"h-[2.1875rem] w-[2.0625rem] translate-x-0.5 translate-y-0.5\"\r\n\t},\r\n\tvariants: {\r\n\t\treadonly: {\r\n\t\t\ttrue: {\r\n\t\t\t\tcontainer:\r\n\t\t\t\t\t\"cursor-default bg-secondary-bg-hover hover:border-secondary-border hover:shadow-sm focus-visible:bg-secondary-bg-hover\",\r\n\t\t\t\ticon: \"group-hover:text-muted\"\r\n\t\t\t}\r\n\t\t},\r\n\t\terror: {\r\n\t\t\ttrue: {\r\n\t\t\t\tcontainer:\r\n\t\t\t\t\t\"border-status-error-secondary-border hover:border-status-error-primary-border hover:bg-status-error-bg focus-visible:border-status-error-secondary-border focus-visible:shadow-focus-error\",\r\n\t\t\t\ticon: \"group-hover:text-muted\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tsize: {\r\n\t\t\txs: { container: \"h-[3.75rem] w-[3.75rem]\" },\r\n\t\t\tsm: { container: \"h-20 w-20\" },\r\n\t\t\tmd: { container: \"h-[7.5rem] w-[7.5rem]\" },\r\n\t\t\tlg: { container: \"h-[11.5rem] w-[11.5rem]\" },\r\n\t\t\txl: { container: \"h-96 w-96\" }\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport type ImageUploaderProps = Omit<React.ComponentPropsWithoutRef<typeof Button>, \"onChange\"> &\r\n\tVariantProps<typeof imageUploaderStyles> & {\r\n\t\tonChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\r\n\t\twhiteList?: string;\r\n\t};\r\n\r\nexport const ImageUploader = React.forwardRef<HTMLButtonElement, ImageUploaderProps>(\r\n\t({ className, error, readonly, size, onChange, whiteList = \"image/*\", ...props }, ref) => {\r\n\t\tconst fileInputRef = useRef<HTMLInputElement>(null);\r\n\t\tconst styles = imageUploaderStyles({ className, readonly, error, size });\r\n\r\n\t\treturn (\r\n\t\t\t<Button\r\n\t\t\t\tref={ref}\r\n\t\t\t\ttype=\"button\"\r\n\t\t\t\tvariant=\"outline\"\r\n\t\t\t\tclassName={styles.container()}\r\n\t\t\t\tonClick={() => !readonly && fileInputRef.current?.click()}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t<input\r\n\t\t\t\t\tref={fileInputRef}\r\n\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\tclassName={styles.input()}\r\n\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\taccept={whiteList}\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t{readonly && <Icon icon={Image} className={styles.icon()} />}\r\n\t\t\t\t{!readonly && <ImageCameraAddSvg className={cn(styles.icon(), styles.customIcon())} />}\r\n\t\t\t</Button>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nImageUploader.displayName = \"ImageUploader\";\r\n"],"names":["Image","createLucideIcon","ImageCameraAddSvg","className","jsx","imageUploaderStyles","tv","ImageUploader","React","_a","ref","_b","error","readonly","size","onChange","whiteList","props","__objRest","fileInputRef","useRef","styles","jsxs","Button","__spreadProps","__spreadValues","Icon","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAQC,EAAiB,SAAS;AAAA,EACtC,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,UAAU;AAAA,EACvF,CAAC,UAAU,EAAE,IAAI,KAAK,IAAI,KAAK,GAAG,KAAK,KAAK,UAAU;AAAA,EACtD,CAAC,QAAQ,EAAE,GAAG,6CAA6C,KAAK,SAAU,CAAA;AAC5E,CAAC,GCTYC,IAAoB,CAAC,EAAE,WAAAC,QAElC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IACN,WAAAD;AAAA,IAEA,UAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,GAAE;AAAA,QACF,MAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EACN;AACD,GCVIC,IA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A,cACA,KAAKe;AAAA,cACL,MAAK;AAAA,cACL,WAAWE,EAAO,MAAM;AAAA,cACxB,UAAAN;AAAA,cACA,QAAQC;AAAA,YAAA;AAAA,UACT;AAAA,UAECH,uBAAaa,GAAK,EAAA,MAAM1B,GAAO,WAAWqB,EAAO,QAAQ;AAAA,UACzD,CAACR,KAAa,gBAAAT,EAAAF,GAAA,EAAkB,WAAWyB,EAAGN,EAAO,KAAQ,GAAAA,EAAO,WAAY,CAAA,EAAG,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACrF;AAAA,EAAA;AAGH;AAEAd,EAAc,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
var q = Object.defineProperty, G = Object.defineProperties;
|
|
2
|
+
var J = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
|
+
var W = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var N = (t, e, s) => e in t ? q(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, E = (t, e) => {
|
|
6
|
+
for (var s in e || (e = {}))
|
|
7
|
+
W.call(e, s) && N(t, s, e[s]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var s of h(e))
|
|
10
|
+
A.call(e, s) && N(t, s, e[s]);
|
|
11
|
+
return t;
|
|
12
|
+
}, p = (t, e) => G(t, J(e));
|
|
13
|
+
var m = (t, e) => {
|
|
14
|
+
var s = {};
|
|
15
|
+
for (var n in t)
|
|
16
|
+
W.call(t, n) && e.indexOf(n) < 0 && (s[n] = t[n]);
|
|
17
|
+
if (t != null && h)
|
|
18
|
+
for (var n of h(t))
|
|
19
|
+
e.indexOf(n) < 0 && A.call(t, n) && (s[n] = t[n]);
|
|
20
|
+
return s;
|
|
21
|
+
};
|
|
22
|
+
import * as a from "react";
|
|
23
|
+
import { P as C, c as D, d as Q, u as V } from "./index-B6K06mzp.js";
|
|
24
|
+
import { u as F } from "./index-Bj6ZBhqh.js";
|
|
25
|
+
import { u as O } from "./index-Mbnk_gHS.js";
|
|
26
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
27
|
+
import Z from "react-dom";
|
|
28
|
+
import { c as $ } from "./utils-BK4mPzkB.js";
|
|
29
|
+
function ee(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
30
|
+
const s = O(t);
|
|
31
|
+
a.useEffect(() => {
|
|
32
|
+
const n = (r) => {
|
|
33
|
+
r.key === "Escape" && s(r);
|
|
34
|
+
};
|
|
35
|
+
return e.addEventListener("keydown", n, { capture: !0 }), () => e.removeEventListener("keydown", n, { capture: !0 });
|
|
36
|
+
}, [s, e]);
|
|
37
|
+
}
|
|
38
|
+
var te = "DismissableLayer", L = "dismissableLayer.update", se = "dismissableLayer.pointerDownOutside", ne = "dismissableLayer.focusOutside", I, _ = a.createContext({
|
|
39
|
+
layers: /* @__PURE__ */ new Set(),
|
|
40
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
41
|
+
branches: /* @__PURE__ */ new Set()
|
|
42
|
+
}), re = a.forwardRef(
|
|
43
|
+
(t, e) => {
|
|
44
|
+
var x;
|
|
45
|
+
const S = t, {
|
|
46
|
+
disableOutsidePointerEvents: s = !1,
|
|
47
|
+
onEscapeKeyDown: n,
|
|
48
|
+
onPointerDownOutside: r,
|
|
49
|
+
onFocusOutside: i,
|
|
50
|
+
onInteractOutside: l,
|
|
51
|
+
onDismiss: u
|
|
52
|
+
} = S, f = m(S, [
|
|
53
|
+
"disableOutsidePointerEvents",
|
|
54
|
+
"onEscapeKeyDown",
|
|
55
|
+
"onPointerDownOutside",
|
|
56
|
+
"onFocusOutside",
|
|
57
|
+
"onInteractOutside",
|
|
58
|
+
"onDismiss"
|
|
59
|
+
]), c = a.useContext(_), [d, U] = a.useState(null), v = (x = d == null ? void 0 : d.ownerDocument) != null ? x : globalThis == null ? void 0 : globalThis.document, [, z] = a.useState({}), H = F(e, (o) => U(o)), R = Array.from(c.layers), [K] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), j = R.indexOf(K), g = d ? R.indexOf(d) : -1, X = c.layersWithOutsidePointerEventsDisabled.size > 0, w = g >= j, Y = oe((o) => {
|
|
60
|
+
const y = o.target, B = [...c.branches].some((P) => P.contains(y));
|
|
61
|
+
!w || B || (r == null || r(o), l == null || l(o), o.defaultPrevented || u == null || u());
|
|
62
|
+
}, v), T = ce((o) => {
|
|
63
|
+
const y = o.target;
|
|
64
|
+
[...c.branches].some((P) => P.contains(y)) || (i == null || i(o), l == null || l(o), o.defaultPrevented || u == null || u());
|
|
65
|
+
}, v);
|
|
66
|
+
return ee((o) => {
|
|
67
|
+
g === c.layers.size - 1 && (n == null || n(o), !o.defaultPrevented && u && (o.preventDefault(), u()));
|
|
68
|
+
}, v), a.useEffect(() => {
|
|
69
|
+
if (d)
|
|
70
|
+
return s && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (I = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), k(), () => {
|
|
71
|
+
s && c.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = I);
|
|
72
|
+
};
|
|
73
|
+
}, [d, v, s, c]), a.useEffect(() => () => {
|
|
74
|
+
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), k());
|
|
75
|
+
}, [d, c]), a.useEffect(() => {
|
|
76
|
+
const o = () => z({});
|
|
77
|
+
return document.addEventListener(L, o), () => document.removeEventListener(L, o);
|
|
78
|
+
}, []), /* @__PURE__ */ b(
|
|
79
|
+
C.div,
|
|
80
|
+
p(E({}, f), {
|
|
81
|
+
ref: H,
|
|
82
|
+
style: E({
|
|
83
|
+
pointerEvents: X ? w ? "auto" : "none" : void 0
|
|
84
|
+
}, t.style),
|
|
85
|
+
onFocusCapture: D(t.onFocusCapture, T.onFocusCapture),
|
|
86
|
+
onBlurCapture: D(t.onBlurCapture, T.onBlurCapture),
|
|
87
|
+
onPointerDownCapture: D(
|
|
88
|
+
t.onPointerDownCapture,
|
|
89
|
+
Y.onPointerDownCapture
|
|
90
|
+
)
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
re.displayName = te;
|
|
96
|
+
var ie = "DismissableLayerBranch", ae = a.forwardRef((t, e) => {
|
|
97
|
+
const s = a.useContext(_), n = a.useRef(null), r = F(e, n);
|
|
98
|
+
return a.useEffect(() => {
|
|
99
|
+
const i = n.current;
|
|
100
|
+
if (i)
|
|
101
|
+
return s.branches.add(i), () => {
|
|
102
|
+
s.branches.delete(i);
|
|
103
|
+
};
|
|
104
|
+
}, [s.branches]), /* @__PURE__ */ b(C.div, p(E({}, t), { ref: r }));
|
|
105
|
+
});
|
|
106
|
+
ae.displayName = ie;
|
|
107
|
+
function oe(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
108
|
+
const s = O(t), n = a.useRef(!1), r = a.useRef(() => {
|
|
109
|
+
});
|
|
110
|
+
return a.useEffect(() => {
|
|
111
|
+
const i = (u) => {
|
|
112
|
+
if (u.target && !n.current) {
|
|
113
|
+
let f = function() {
|
|
114
|
+
M(
|
|
115
|
+
se,
|
|
116
|
+
s,
|
|
117
|
+
c,
|
|
118
|
+
{ discrete: !0 }
|
|
119
|
+
);
|
|
120
|
+
};
|
|
121
|
+
const c = { originalEvent: u };
|
|
122
|
+
u.pointerType === "touch" ? (e.removeEventListener("click", r.current), r.current = f, e.addEventListener("click", r.current, { once: !0 })) : f();
|
|
123
|
+
} else
|
|
124
|
+
e.removeEventListener("click", r.current);
|
|
125
|
+
n.current = !1;
|
|
126
|
+
}, l = window.setTimeout(() => {
|
|
127
|
+
e.addEventListener("pointerdown", i);
|
|
128
|
+
}, 0);
|
|
129
|
+
return () => {
|
|
130
|
+
window.clearTimeout(l), e.removeEventListener("pointerdown", i), e.removeEventListener("click", r.current);
|
|
131
|
+
};
|
|
132
|
+
}, [e, s]), {
|
|
133
|
+
// ensures we check React component tree (not just DOM tree)
|
|
134
|
+
onPointerDownCapture: () => n.current = !0
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function ce(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
138
|
+
const s = O(t), n = a.useRef(!1);
|
|
139
|
+
return a.useEffect(() => {
|
|
140
|
+
const r = (i) => {
|
|
141
|
+
i.target && !n.current && M(ne, s, { originalEvent: i }, {
|
|
142
|
+
discrete: !1
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
return e.addEventListener("focusin", r), () => e.removeEventListener("focusin", r);
|
|
146
|
+
}, [e, s]), {
|
|
147
|
+
onFocusCapture: () => n.current = !0,
|
|
148
|
+
onBlurCapture: () => n.current = !1
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function k() {
|
|
152
|
+
const t = new CustomEvent(L);
|
|
153
|
+
document.dispatchEvent(t);
|
|
154
|
+
}
|
|
155
|
+
function M(t, e, s, { discrete: n }) {
|
|
156
|
+
const r = s.originalEvent.target, i = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: s });
|
|
157
|
+
e && r.addEventListener(t, e, { once: !0 }), n ? Q(r, i) : r.dispatchEvent(i);
|
|
158
|
+
}
|
|
159
|
+
var ue = "Portal", de = a.forwardRef((t, e) => {
|
|
160
|
+
var f;
|
|
161
|
+
const u = t, { container: s } = u, n = m(u, ["container"]), [r, i] = a.useState(!1);
|
|
162
|
+
V(() => i(!0), []);
|
|
163
|
+
const l = s || r && ((f = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : f.body);
|
|
164
|
+
return l ? Z.createPortal(/* @__PURE__ */ b(C.div, p(E({}, n), { ref: e })), l) : null;
|
|
165
|
+
});
|
|
166
|
+
de.displayName = ue;
|
|
167
|
+
const le = a.forwardRef(
|
|
168
|
+
(r, n) => {
|
|
169
|
+
var i = r, { children: t, className: e } = i, s = m(i, ["children", "className"]);
|
|
170
|
+
return /* @__PURE__ */ b("div", p(E({ ref: n, className: $("ui-kit fixed left-0 top-0", e) }, s), { children: t }));
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
le.displayName = "IsolatedStylesWrapper";
|
|
174
|
+
export {
|
|
175
|
+
re as D,
|
|
176
|
+
le as I,
|
|
177
|
+
de as P
|
|
178
|
+
};
|
|
179
|
+
//# sourceMappingURL=IsolatedStylesWrapper-WgaoHh7y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsolatedStylesWrapper-WgaoHh7y.js","sources":["../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../node_modules/@radix-ui/react-portal/dist/index.mjs","../src/components/isolated-styles-wrapper/IsolatedStylesWrapper.tsx"],"sourcesContent":["// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\r\nimport { cn } from \"@/lib/utils\";\r\n/**\r\n * Компонент-обёртка для поддержки изолированных стилей в плавающем контенте.\r\n *\r\n * В UI Kit есть режим работы с изолированными стилями, который требует указания класса 'ui-kit'\r\n * для родительского элемента. Этот компонент предоставляет необходимую обёртку для\r\n * компонентов с плавающим контентом (Modal, Dropdown, Select, Popover, Drawer).\r\n */\r\nexport const IsolatedStylesWrapper = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<\"div\">>(\r\n\t({ children, className, ...props }, ref) => {\r\n\t\treturn (\r\n\t\t\t<div ref={ref} className={cn(\"ui-kit fixed left-0 top-0\", className)} {...props}>\r\n\t\t\t\t{children}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nIsolatedStylesWrapper.displayName = \"IsolatedStylesWrapper\";\r\n"],"names":["useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","useCallbackRef","React","handleKeyDown","event","DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","DismissableLayer","props","forwardedRef","_a","disableOutsidePointerEvents","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","__objRest","context","node","setNode","_b","force","composedRefs","useComposedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","index","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","target","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","dispatchUpdate","handleUpdate","jsx","Primitive","__spreadProps","__spreadValues","composeEventHandlers","BRANCH_NAME","DismissableLayerBranch","ref","handlePointerDownOutside","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","name","handler","detail","discrete","dispatchDiscreteCustomEvent","PORTAL_NAME","Portal","containerProp","portalProps","mounted","setMounted","useLayoutEffect","container","ReactDOM","IsolatedStylesWrapper","children","className","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAASA,GAAiBC,GAAqBC,IAAgB,yCAAY,UAAU;AACnF,QAAMC,IAAkBC,EAAeH,CAAmB;AAC1D,EAAAI,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAgB,CAACC,MAAU;AAC/B,MAAIA,EAAM,QAAQ,YAChBJ,EAAgBI,CAAK;AAAA,IAExB;AACD,WAAAL,EAAc,iBAAiB,WAAWI,GAAe,EAAE,SAAS,IAAM,GACnE,MAAMJ,EAAc,oBAAoB,WAAWI,GAAe,EAAE,SAAS,IAAM;AAAA,EAC9F,GAAK,CAACH,GAAiBD,CAAa,CAAC;AACrC;ACJA,IAAIM,KAAyB,oBACzBC,IAAiB,2BACjBC,KAAuB,uCACvBC,KAAgB,iCAChBC,GACAC,IAA0BR,EAAM,cAAc;AAAA,EAChD,QAAwB,oBAAI,IAAK;AAAA,EACjC,wCAAwD,oBAAI,IAAK;AAAA,EACjE,UAA0B,oBAAI,IAAG;AACnC,CAAC,GACGS,KAAmBT,EAAM;AAAA,EAC3B,CAACU,GAAOC,MAAiB;;AACvB,UAQIC,IAAAF,GAPF;AAAA,mCAAAG,IAA8B;AAAA,MAC9B,iBAAAf;AAAA,MACA,sBAAAgB;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,WAAAC;AAAA,QAEEL,GADCM,IAAAC,EACDP,GADC;AAAA,MANH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QAGIQ,IAAUpB,EAAM,WAAWQ,CAAuB,GAClD,CAACa,GAAMC,CAAO,IAAItB,EAAM,SAAS,IAAI,GACrCH,KAAgB0B,IAAAF,KAAA,gBAAAA,EAAM,kBAAN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