@functionalui/functionalui 0.2.6 → 0.2.8
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/Admonition-BVd4bXl_.cjs +1 -0
- package/dist/Admonition-CReUUZzJ.js +88 -0
- package/dist/{Avatar-CQA0mEVW.js → Avatar-CkxjB_cU.js} +4 -4
- package/dist/AvatarGroup-CbohU2rq.cjs +1 -0
- package/dist/AvatarGroup-FpaQP2H4.js +52 -0
- package/dist/{Button-CpTXDsI7.js → Button-DLwud-g7.js} +8 -8
- package/dist/{Checkbox-C29jP71p.js → Checkbox-CNpy1wvA.js} +3 -3
- package/dist/Checkboxes-CQVptWR8.cjs +1 -0
- package/dist/Checkboxes-Cj740f5X.js +80 -0
- package/dist/Chip-DgSZZTgy.js +132 -0
- package/dist/Chip-HOh--tbB.cjs +1 -0
- package/dist/ColorPicker-DUz0qcHd.js +234 -0
- package/dist/ColorPicker-rxR_V4EW.cjs +1 -0
- package/dist/DivMeasure-C398kYvk.js +26 -0
- package/dist/DivMeasure-oi_fzKlp.cjs +1 -0
- package/dist/GalleryModal-DjCnCkbg.js +464 -0
- package/dist/GalleryModal-wFC9x3Em.cjs +1 -0
- package/dist/InputImage-CInJWoGb.cjs +1 -0
- package/dist/InputImage-ZST0lvcI.js +106 -0
- package/dist/InputText-Bjhoe-Tm.cjs +1 -0
- package/dist/InputText-DnR7KYJS.js +246 -0
- package/dist/InsetGroup-BHxpHwpd.js +105 -0
- package/dist/InsetGroup-CGACEEbB.cjs +1 -0
- package/dist/{LabelText-D7QIWtWj.js → LabelText-WYEq5keJ.js} +3 -3
- package/dist/LoadingSpinner-BC0eMoVW.js +101 -0
- package/dist/LoadingSpinner-DykDI5-W.cjs +1 -0
- package/dist/{Modal-DXLyt-j4.js → Modal-Di5ye0Cr.js} +4 -4
- package/dist/NotificationSystem-B5NXsG0a.js +158 -0
- package/dist/NotificationSystem-D4ydo2Lk.cjs +1 -0
- package/dist/Radio-Dd5W2Lpf.js +121 -0
- package/dist/Radio-QbaBzLpf.cjs +1 -0
- package/dist/SelectSpring-BOfRXdag.js +471 -0
- package/dist/SelectSpring-DFKWTbF1.cjs +1 -0
- package/dist/SpringEnter-CPw1YgNg.cjs +1 -0
- package/dist/SpringEnter-CoVZpW-c.js +44 -0
- package/dist/{SpringEnterOffsetBy-DMSIQgV3.js → SpringEnterOffsetBy-BKglENgZ.js} +2 -2
- package/dist/SpringMenuTransition-B_PoFoqO.cjs +1 -0
- package/dist/SpringMenuTransition-CzSfyvDZ.js +42 -0
- package/dist/SpringOpenCloseHeight-COvFkc30.js +18 -0
- package/dist/SpringOpenCloseHeight-CyxsSgRD.cjs +1 -0
- package/dist/TableGrid-BYBVHJt9.cjs +1 -0
- package/dist/TableGrid-QlKM9Sdp.js +49 -0
- package/dist/{TableHeader-Da0XxILB.js → TableHeader-D3V5Z3JL.js} +4 -4
- package/dist/{TableRow-BlJSvake.js → TableRow-DKC9qdjQ.js} +3 -3
- package/dist/Tabs-BkUyxceG.js +134 -0
- package/dist/Tabs-C8VAb1g0.cjs +1 -0
- package/dist/{TagColor-BYKxfOU6.js → TagColor-Bd3n3RCF.js} +3 -3
- package/dist/TextArea-Bsm5M8lo.cjs +1 -0
- package/dist/TextArea-Cd3q9BMN.js +160 -0
- package/dist/ToggleSwitch-BNAk1Wp6.js +100 -0
- package/dist/ToggleSwitch-D6ltRmPy.cjs +1 -0
- package/dist/{UIcon-BHzbeYWw.js → UIcon-Cc5PX9WJ.js} +3 -3
- package/dist/UiContexts-36wfLVYv.cjs +1 -0
- package/dist/UiContexts-BMJZJR8C.js +35 -0
- package/dist/admonition/index.cjs +1 -1
- package/dist/admonition/index.mjs +2 -86
- package/dist/avatar/index.mjs +1 -1
- package/dist/avatar-group/index.cjs +1 -1
- package/dist/avatar-group/index.mjs +2 -50
- package/dist/button/index.mjs +1 -1
- package/dist/checkbox/index.mjs +1 -1
- package/dist/checkboxes/index.cjs +1 -1
- package/dist/checkboxes/index.mjs +2 -78
- package/dist/chip/index.cjs +1 -1
- package/dist/chip/index.mjs +2 -130
- package/dist/color-picker/index.cjs +1 -1
- package/dist/color-picker/index.mjs +2 -232
- package/dist/{component-CW2JPBAq.js → component-89pO-V2r.js} +1 -1
- package/dist/{component-BvHdlcdE.js → component-BbiEBU5H.js} +1 -1
- package/dist/component-BvmPGrYv.cjs +1 -0
- package/dist/{component-C1Gs4nVu.js → component-CGEZuC_0.js} +1 -1
- package/dist/{component-DRXQXr2G.js → component-CLzFHaNK.js} +1 -1
- package/dist/{component-D0wwK4KY.js → component-D-bBH8nL.js} +1 -1
- package/dist/{component-DCHO9d6d.js → component-DBDhHeDP.js} +1 -1
- package/dist/{component-D5nxKQnT.js → component-DP7cQasn.js} +1 -1
- package/dist/{component-CBIQe7z5.js → component-JelkpADf.js} +1 -1
- package/dist/{component-DdQu0mLI.js → component-SecZNuYG.js} +1 -1
- package/dist/component-cHg1BfVy.js +28 -0
- package/dist/container/index.mjs +1 -1
- package/dist/contexts/ui/index.cjs +1 -1
- package/dist/contexts/ui/index.mjs +3 -32
- package/dist/{createTextElement-Cgrvdwvh.js → createTextElement-d3-b9Lvn.js} +1 -1
- package/dist/css/index.css +1 -1
- package/dist/div-measure/index.cjs +1 -1
- package/dist/div-measure/index.mjs +2 -23
- package/dist/gallery-modal/index.cjs +1 -1
- package/dist/gallery-modal/index.mjs +2 -461
- package/dist/icons/index.mjs +1 -1
- package/dist/input-image/index.cjs +1 -1
- package/dist/input-image/index.mjs +2 -103
- package/dist/input-text/index.cjs +1 -1
- package/dist/input-text/index.mjs +2 -243
- package/dist/inset-group/index.cjs +1 -1
- package/dist/inset-group/index.mjs +2 -102
- package/dist/label-text/index.mjs +1 -1
- package/dist/layout/index.mjs +1 -1
- package/dist/lib/styles/types/types.d.ts +12 -12
- package/dist/loading-spinner/index.cjs +1 -1
- package/dist/loading-spinner/index.mjs +3 -98
- package/dist/main.cjs +1 -0
- package/dist/main.mjs +95 -0
- package/dist/modal/index.mjs +1 -1
- package/dist/notification-system/index.cjs +1 -1
- package/dist/notification-system/index.mjs +2 -155
- package/dist/radio/index.cjs +1 -1
- package/dist/radio/index.mjs +2 -118
- package/dist/{react-spring_web.modern-DgQDaJ06.js → react-spring_web.modern-DUf5COpz.js} +3 -3
- package/dist/select-spring/index.cjs +1 -1
- package/dist/select-spring/index.mjs +2 -468
- package/dist/spring-enter/index.cjs +1 -1
- package/dist/spring-enter/index.mjs +2 -42
- package/dist/spring-enter-offset-by/index.mjs +1 -1
- package/dist/spring-menu-transition/index.cjs +1 -1
- package/dist/spring-menu-transition/index.mjs +2 -40
- package/dist/spring-open-close-height/index.cjs +1 -1
- package/dist/spring-open-close-height/index.mjs +2 -16
- package/dist/styled/button/index.mjs +1 -1
- package/dist/styled/inputs/text/index.mjs +1 -1
- package/dist/styled/inputs/text-area/index.mjs +1 -1
- package/dist/styled/li/index.mjs +1 -1
- package/dist/styled/ul/index.mjs +1 -1
- package/dist/table-grid/index.cjs +1 -1
- package/dist/table-grid/index.mjs +2 -46
- package/dist/table-header/index.mjs +1 -1
- package/dist/table-row/index.mjs +1 -1
- package/dist/tabs/index.cjs +1 -1
- package/dist/tabs/index.mjs +2 -132
- package/dist/tag-color/index.mjs +1 -1
- package/dist/text-area/index.cjs +1 -1
- package/dist/text-area/index.mjs +2 -157
- package/dist/texts/header/index.cjs +1 -1
- package/dist/texts/header/index.mjs +2 -26
- package/dist/texts/p/index.mjs +1 -1
- package/dist/texts/span/index.mjs +1 -1
- package/dist/toggle-switch/index.cjs +1 -1
- package/dist/toggle-switch/index.mjs +2 -98
- package/dist/{types-BNUi2DUD.js → types-xFemYgmc.js} +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.mjs +33 -33
- package/package.json +9 -1
|
@@ -1,464 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useContext as K, useState as A, createContext as Q, useEffect as M, useRef as V, createElement as Y } from "react";
|
|
4
|
-
import { C as g } from "../component-C1Gs4nVu.js";
|
|
5
|
-
import { L as S } from "../component-DRXQXr2G.js";
|
|
6
|
-
import { C as X } from "../generics-D33J7ILI.js";
|
|
7
|
-
import { h as G, j as L, b as Z } from "../classes-CVxy1f4M.js";
|
|
8
|
-
import { M as ee } from "../types-Dyu7oUOO.js";
|
|
9
|
-
import { u as te, c as ne, d as oe, p as ie, M as re } from "../Modal-DXLyt-j4.js";
|
|
10
|
-
import { d as W, b as se, u as ae } from "../react-spring_web.modern-DgQDaJ06.js";
|
|
11
|
-
import { U as le } from "../UIcon-BHzbeYWw.js";
|
|
12
|
-
import { S as ce } from "../generics-BrMr2-Gs.js";
|
|
13
|
-
import { B as de } from "../Button-CpTXDsI7.js";
|
|
14
|
-
import { T as fe } from "../component-BvHdlcdE.js";
|
|
15
|
-
import { S as C, d as me } from "../generics-C-WSPclF.js";
|
|
16
|
-
import { h as ue } from "../types-BNUi2DUD.js";
|
|
17
|
-
import { u as ge } from "../web-B_p0FWHf.js";
|
|
18
|
-
const he = ({ handleCloseGallery: e }) => {
|
|
19
|
-
const t = W(!0, {
|
|
20
|
-
from: { opacity: 0, y: -100, x: -50 },
|
|
21
|
-
enter: { opacity: 1, y: 25, x: -50 },
|
|
22
|
-
leave: { opacity: 0, y: -100, x: -50 }
|
|
23
|
-
});
|
|
24
|
-
return /* @__PURE__ */ i(
|
|
25
|
-
S,
|
|
26
|
-
{
|
|
27
|
-
style: { width: "100%" },
|
|
28
|
-
display: Z.Flex,
|
|
29
|
-
flexJustifyContent: L.FlexEnd,
|
|
30
|
-
flexAlignItem: G.Center,
|
|
31
|
-
children: t(
|
|
32
|
-
(n, s) => s && /* @__PURE__ */ i(g, { style: n, children: /* @__PURE__ */ i(
|
|
33
|
-
le,
|
|
34
|
-
{
|
|
35
|
-
name: "x",
|
|
36
|
-
iconAction: () => e(),
|
|
37
|
-
size: ce.Size5
|
|
38
|
-
}
|
|
39
|
-
) })
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
var T = NaN, ye = "[object Symbol]", xe = /^\s+|\s+$/g, pe = /^[-+]0x[0-9a-f]+$/i, Ce = /^0b[01]+$/i, Se = /^0o[0-7]+$/i, Ie = parseInt, be = Object.prototype, Ze = be.toString;
|
|
45
|
-
function ze(e, t, n) {
|
|
46
|
-
return e === e && (n !== void 0 && (e = e <= n ? e : n), t !== void 0 && (e = e >= t ? e : t)), e;
|
|
47
|
-
}
|
|
48
|
-
function J(e) {
|
|
49
|
-
var t = typeof e;
|
|
50
|
-
return !!e && (t == "object" || t == "function");
|
|
51
|
-
}
|
|
52
|
-
function Ae(e) {
|
|
53
|
-
return !!e && typeof e == "object";
|
|
54
|
-
}
|
|
55
|
-
function ke(e) {
|
|
56
|
-
return typeof e == "symbol" || Ae(e) && Ze.call(e) == ye;
|
|
57
|
-
}
|
|
58
|
-
function N(e) {
|
|
59
|
-
if (typeof e == "number")
|
|
60
|
-
return e;
|
|
61
|
-
if (ke(e))
|
|
62
|
-
return T;
|
|
63
|
-
if (J(e)) {
|
|
64
|
-
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
65
|
-
e = J(t) ? t + "" : t;
|
|
66
|
-
}
|
|
67
|
-
if (typeof e != "string")
|
|
68
|
-
return e === 0 ? e : +e;
|
|
69
|
-
e = e.replace(xe, "");
|
|
70
|
-
var n = Ce.test(e);
|
|
71
|
-
return n || Se.test(e) ? Ie(e.slice(2), n ? 2 : 8) : pe.test(e) ? T : +e;
|
|
72
|
-
}
|
|
73
|
-
function Me(e, t, n) {
|
|
74
|
-
return n === void 0 && (n = t, t = void 0), n !== void 0 && (n = N(n), n = n === n ? n : 0), t !== void 0 && (t = N(t), t = t === t ? t : 0), ze(N(e), t, n);
|
|
75
|
-
}
|
|
76
|
-
var c;
|
|
77
|
-
const U = Q({
|
|
78
|
-
galleryImages: c,
|
|
79
|
-
imgIndex: 0,
|
|
80
|
-
props: c,
|
|
81
|
-
ref: c,
|
|
82
|
-
bind: c,
|
|
83
|
-
isZooming: c,
|
|
84
|
-
manualZoomScale: c,
|
|
85
|
-
handleSetImages: c,
|
|
86
|
-
handleCloseGallery: c,
|
|
87
|
-
handleIncrease: c,
|
|
88
|
-
handleDecrease: c,
|
|
89
|
-
handleSetIsZooming: c,
|
|
90
|
-
handleZoomIn: c,
|
|
91
|
-
handleZoomOut: c,
|
|
92
|
-
handleZoomReset: c
|
|
93
|
-
}), Ge = ({ children: e }) => {
|
|
94
|
-
const t = Le();
|
|
95
|
-
return /* @__PURE__ */ i(U.Provider, { value: t, children: e });
|
|
96
|
-
}, P = () => K(U);
|
|
97
|
-
function Le() {
|
|
98
|
-
const [e, t] = A([]), [n, s] = A(0), [m, { width: a }] = ge(), [l, u] = A(!1), [r, d] = se(
|
|
99
|
-
e.length,
|
|
100
|
-
(o) => ({
|
|
101
|
-
x: o * a,
|
|
102
|
-
scale: a === 0 ? 0 : 1,
|
|
103
|
-
display: "block"
|
|
104
|
-
}),
|
|
105
|
-
[a]
|
|
106
|
-
), x = te(
|
|
107
|
-
({
|
|
108
|
-
active: o,
|
|
109
|
-
movement: [f],
|
|
110
|
-
velocity: [O],
|
|
111
|
-
direction: [$],
|
|
112
|
-
distance: [v],
|
|
113
|
-
cancel: q
|
|
114
|
-
}) => {
|
|
115
|
-
l || (o && (v > a / 3 || O > 1) && (s(
|
|
116
|
-
(b) => Me(b + ($ > 0 ? -1 : 1), 0, e.length - 1)
|
|
117
|
-
), q()), d.start((b) => {
|
|
118
|
-
if (b < n - 1 || b > n + 1) return { display: "none" };
|
|
119
|
-
const w = (b - n) * a + (o ? f : 0), H = o ? 1 - v / a / 2 : 1;
|
|
120
|
-
return { x: w, scale: H, display: "block" };
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
), p = (o) => {
|
|
124
|
-
t(o);
|
|
125
|
-
}, y = (o) => {
|
|
126
|
-
s(0), o && o();
|
|
127
|
-
};
|
|
128
|
-
function z() {
|
|
129
|
-
s((o) => o + 1 > e.length - 1 ? o : (d.start((f) => f < o + 1 - 1 || f > o + 1 + 1 ? { display: "none" } : { x: (f - (o + 1)) * a, scale: 1, display: "block" }), o + 1));
|
|
130
|
-
}
|
|
131
|
-
function h() {
|
|
132
|
-
s((o) => o - 1 < 0 ? o : (d.start((f) => f < o - 1 - 1 || f > o - 1 + 1 ? { display: "none" } : { x: (f - (o - 1)) * a, scale: 1, display: "block" }), o - 1));
|
|
133
|
-
}
|
|
134
|
-
const j = (o) => {
|
|
135
|
-
u(o);
|
|
136
|
-
}, [B, I] = A(1);
|
|
137
|
-
function _() {
|
|
138
|
-
I((o) => o + 0.25 > 2 ? 2 : o + 0.25);
|
|
139
|
-
}
|
|
140
|
-
function E() {
|
|
141
|
-
I((o) => o - 0.25 < 0.5 ? 1 : o - 0.25);
|
|
142
|
-
}
|
|
143
|
-
function F() {
|
|
144
|
-
I(1);
|
|
145
|
-
}
|
|
146
|
-
return {
|
|
147
|
-
imgIndex: n,
|
|
148
|
-
galleryImages: e,
|
|
149
|
-
props: r,
|
|
150
|
-
ref: m,
|
|
151
|
-
bind: x,
|
|
152
|
-
isZooming: l,
|
|
153
|
-
manualZoomScale: B,
|
|
154
|
-
handleSetImages: p,
|
|
155
|
-
handleCloseGallery: y,
|
|
156
|
-
handleIncrease: z,
|
|
157
|
-
handleDecrease: h,
|
|
158
|
-
handleSetIsZooming: j,
|
|
159
|
-
handleZoomIn: _,
|
|
160
|
-
handleZoomOut: E,
|
|
161
|
-
handleZoomReset: F
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const je = ({ openMenu: e = !0 }) => {
|
|
165
|
-
const {
|
|
166
|
-
handleIncrease: t,
|
|
167
|
-
handleDecrease: n,
|
|
168
|
-
galleryImages: s,
|
|
169
|
-
imgIndex: m,
|
|
170
|
-
handleZoomIn: a,
|
|
171
|
-
handleZoomOut: l
|
|
172
|
-
} = P();
|
|
173
|
-
return W(e, {
|
|
174
|
-
from: { opacity: 0, y: 100 },
|
|
175
|
-
enter: { opacity: 1, y: -50 },
|
|
176
|
-
leave: { opacity: 0, y: 100 }
|
|
177
|
-
})(
|
|
178
|
-
(r, d) => d && /* @__PURE__ */ i(
|
|
179
|
-
g,
|
|
180
|
-
{
|
|
181
|
-
style: { width: "100%", ...r },
|
|
182
|
-
children: /* @__PURE__ */ i(
|
|
183
|
-
S,
|
|
184
|
-
{
|
|
185
|
-
display: Z.Flex,
|
|
186
|
-
flexJustifyContent: L.Center,
|
|
187
|
-
children: /* @__PURE__ */ D(
|
|
188
|
-
S,
|
|
189
|
-
{
|
|
190
|
-
display: Z.Flex,
|
|
191
|
-
flexAlignItem: G.Center,
|
|
192
|
-
style: { minWidth: 350, maxWidth: 500, width: 400 },
|
|
193
|
-
children: [
|
|
194
|
-
/* @__PURE__ */ i(
|
|
195
|
-
k,
|
|
196
|
-
{
|
|
197
|
-
icon: "chevron-left",
|
|
198
|
-
marginLeft: C.Size4,
|
|
199
|
-
marginRight: C.Size1,
|
|
200
|
-
clickAction: () => n(),
|
|
201
|
-
disabled: m <= 0 && !0
|
|
202
|
-
}
|
|
203
|
-
),
|
|
204
|
-
/* @__PURE__ */ i(S, { children: /* @__PURE__ */ i(g, { children: /* @__PURE__ */ i(
|
|
205
|
-
fe,
|
|
206
|
-
{
|
|
207
|
-
fontSize: me.Size4,
|
|
208
|
-
children: `${m + 1} / ${s.length}`
|
|
209
|
-
}
|
|
210
|
-
) }) }),
|
|
211
|
-
/* @__PURE__ */ i(
|
|
212
|
-
k,
|
|
213
|
-
{
|
|
214
|
-
icon: "chevron-right",
|
|
215
|
-
marginLeft: C.Size1,
|
|
216
|
-
clickAction: () => t(),
|
|
217
|
-
disabled: m >= s.length - 1 && !0
|
|
218
|
-
}
|
|
219
|
-
),
|
|
220
|
-
/* @__PURE__ */ i(
|
|
221
|
-
k,
|
|
222
|
-
{
|
|
223
|
-
icon: "zoom-in",
|
|
224
|
-
marginLeft: C.Auto,
|
|
225
|
-
marginRight: C.Size1,
|
|
226
|
-
clickAction: () => {
|
|
227
|
-
a();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
),
|
|
231
|
-
/* @__PURE__ */ i(
|
|
232
|
-
k,
|
|
233
|
-
{
|
|
234
|
-
icon: "zoom-out",
|
|
235
|
-
marginLeft: C.Size1,
|
|
236
|
-
marginRight: C.Size4,
|
|
237
|
-
clickAction: () => {
|
|
238
|
-
l();
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
)
|
|
242
|
-
]
|
|
243
|
-
}
|
|
244
|
-
)
|
|
245
|
-
}
|
|
246
|
-
)
|
|
247
|
-
}
|
|
248
|
-
)
|
|
249
|
-
);
|
|
250
|
-
}, k = ({
|
|
251
|
-
icon: e,
|
|
252
|
-
clickAction: t,
|
|
253
|
-
marginLeft: n,
|
|
254
|
-
marginRight: s
|
|
255
|
-
// disabled,
|
|
256
|
-
}) => /* @__PURE__ */ i(g, { marginLeft: n, marginRight: s, children: /* @__PURE__ */ i(
|
|
257
|
-
de,
|
|
258
|
-
{
|
|
259
|
-
name: "",
|
|
260
|
-
icon: e,
|
|
261
|
-
buttonSize: ue.Big,
|
|
262
|
-
clickAction: t
|
|
263
|
-
}
|
|
264
|
-
) }), Be = "_ZAnimated_10d05_1", _e = {
|
|
265
|
-
ZAnimated: Be
|
|
266
|
-
}, Ee = ne([oe, ie]), Fe = ({ children: e }) => {
|
|
267
|
-
const { imgIndex: t, isZooming: n, handleSetIsZooming: s, manualZoomScale: m } = P();
|
|
268
|
-
M(() => {
|
|
269
|
-
const r = (d) => d.preventDefault();
|
|
270
|
-
return document && (document.addEventListener("gesturestart", r), document.addEventListener("gesturechange", r), document.addEventListener("gestureend", r)), () => {
|
|
271
|
-
document && (document.removeEventListener("gesturestart", r), document.removeEventListener("gesturechange", r), document.removeEventListener("gestureend", r));
|
|
272
|
-
};
|
|
273
|
-
}, []);
|
|
274
|
-
const [a, l] = ae(() => ({
|
|
275
|
-
x: 0,
|
|
276
|
-
y: 0,
|
|
277
|
-
scale: 1,
|
|
278
|
-
rotateZ: 0
|
|
279
|
-
})), u = V(null);
|
|
280
|
-
return M(() => {
|
|
281
|
-
t !== 0 && l.start((r) => ({
|
|
282
|
-
...r,
|
|
283
|
-
x: 0,
|
|
284
|
-
y: 0,
|
|
285
|
-
scale: 1
|
|
286
|
-
}));
|
|
287
|
-
}, [l, t]), M(() => {
|
|
288
|
-
l.start((r) => ({
|
|
289
|
-
...r,
|
|
290
|
-
scale: m
|
|
291
|
-
}));
|
|
292
|
-
}, [l, m]), Ee(
|
|
293
|
-
{
|
|
294
|
-
onDrag: ({ pinching: r, cancel: d, offset: [x, p] }) => {
|
|
295
|
-
if (n) {
|
|
296
|
-
if (r) return d();
|
|
297
|
-
l.start({ x, y: p });
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
// onWheel: ({ axis, movement: [_, ms], ...props }) => {
|
|
301
|
-
// },
|
|
302
|
-
onPinch: ({
|
|
303
|
-
origin: [r, d],
|
|
304
|
-
first: x,
|
|
305
|
-
last: p,
|
|
306
|
-
movement: [y],
|
|
307
|
-
offset: [z],
|
|
308
|
-
memo: h
|
|
309
|
-
}) => {
|
|
310
|
-
if (x) {
|
|
311
|
-
const { width: I, height: _, x: E, y: F } = u.current && u.current.getBoundingClientRect(), o = r - (E + I / 2), f = d - (F + _ / 2);
|
|
312
|
-
h = [a.x.get(), a.y.get(), o, f];
|
|
313
|
-
}
|
|
314
|
-
if (p && z === 1 && r !== 0)
|
|
315
|
-
return s && s(!1), l.start({ scale: 1, x: 0, y: 0 }), h;
|
|
316
|
-
const j = h[0] - (y - 1) * h[2], B = h[1] - (y - 1) * h[3];
|
|
317
|
-
return s && s(!0), l.start({ scale: z, x: j, y: B }), h;
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
target: u,
|
|
322
|
-
drag: {
|
|
323
|
-
from: () => [a.x.get(), a.y.get()],
|
|
324
|
-
bounds: { left: -100, right: 100, top: -100, bottom: 100 }
|
|
325
|
-
},
|
|
326
|
-
// pinch: { scaleBounds: { min: 0.5, max: 2 }, rubberband: true },
|
|
327
|
-
pinch: { scaleBounds: { min: 1, max: 2 }, rubberband: !0 },
|
|
328
|
-
wheel: { axis: "y" }
|
|
329
|
-
}
|
|
330
|
-
), /* @__PURE__ */ i(
|
|
331
|
-
S,
|
|
332
|
-
{
|
|
333
|
-
display: Z.Flex,
|
|
334
|
-
flexJustifyContent: L.Center,
|
|
335
|
-
flexAlignItem: G.Center,
|
|
336
|
-
style: { height: "100%" },
|
|
337
|
-
children: /* @__PURE__ */ i(
|
|
338
|
-
g,
|
|
339
|
-
{
|
|
340
|
-
ref: u,
|
|
341
|
-
className: _e.ZAnimated,
|
|
342
|
-
style: { ...a, backgroundColor: "transparent" },
|
|
343
|
-
children: e
|
|
344
|
-
}
|
|
345
|
-
)
|
|
346
|
-
}
|
|
347
|
-
);
|
|
348
|
-
}, Oe = "_imageContainer_zngaq_11", $e = "_galleryMenuContainer_zngaq_34", R = {
|
|
349
|
-
imageContainer: Oe,
|
|
350
|
-
galleryMenuContainer: $e
|
|
351
|
-
}, tt = ({
|
|
352
|
-
showModal: e,
|
|
353
|
-
closeModal: t,
|
|
354
|
-
// activeIdx = 0,
|
|
355
|
-
// setActiveIdx,
|
|
356
|
-
images: n = []
|
|
357
|
-
}) => /* @__PURE__ */ i(Re, { children: /* @__PURE__ */ i(
|
|
358
|
-
Ne,
|
|
359
|
-
{
|
|
360
|
-
showModal: e,
|
|
361
|
-
closeModal: t,
|
|
362
|
-
images: n
|
|
363
|
-
}
|
|
364
|
-
) }), Ne = ({
|
|
365
|
-
showModal: e,
|
|
366
|
-
closeModal: t,
|
|
367
|
-
// activeIdx = 0,
|
|
368
|
-
// setActiveIdx,
|
|
369
|
-
images: n = []
|
|
370
|
-
}) => {
|
|
371
|
-
const { bind: s, props: m, ref: a, handleCloseGallery: l, handleSetImages: u } = P();
|
|
372
|
-
M(() => {
|
|
373
|
-
u(n);
|
|
374
|
-
}, [u, n]);
|
|
375
|
-
const r = () => {
|
|
376
|
-
l(t);
|
|
377
|
-
};
|
|
378
|
-
return /* @__PURE__ */ i(
|
|
379
|
-
re,
|
|
380
|
-
{
|
|
381
|
-
showModal: e,
|
|
382
|
-
closeModal: r,
|
|
383
|
-
modalStyles: ee.Nocard,
|
|
384
|
-
modalBackground: X.Grey1,
|
|
385
|
-
children: /* @__PURE__ */ D(
|
|
386
|
-
S,
|
|
387
|
-
{
|
|
388
|
-
display: Z.Flex,
|
|
389
|
-
flexAlignItem: G.Center,
|
|
390
|
-
flexJustifyContent: L.Center,
|
|
391
|
-
style: { height: "100%", maxWidth: "100%" },
|
|
392
|
-
children: [
|
|
393
|
-
/* @__PURE__ */ i(
|
|
394
|
-
"div",
|
|
395
|
-
{
|
|
396
|
-
ref: a,
|
|
397
|
-
style: {
|
|
398
|
-
overflow: "hidden",
|
|
399
|
-
width: "100%",
|
|
400
|
-
height: "100vh",
|
|
401
|
-
position: "relative"
|
|
402
|
-
},
|
|
403
|
-
children: m.map(
|
|
404
|
-
({ x: d, display: x, scale: p }, y) => /* @__PURE__ */ Y(
|
|
405
|
-
g,
|
|
406
|
-
{
|
|
407
|
-
...s(),
|
|
408
|
-
key: y,
|
|
409
|
-
style: {
|
|
410
|
-
display: x,
|
|
411
|
-
x: d,
|
|
412
|
-
position: "absolute",
|
|
413
|
-
width: "100%",
|
|
414
|
-
height: "100%",
|
|
415
|
-
willChange: "transform"
|
|
416
|
-
}
|
|
417
|
-
},
|
|
418
|
-
/* @__PURE__ */ i(
|
|
419
|
-
g,
|
|
420
|
-
{
|
|
421
|
-
style: {
|
|
422
|
-
scale: p,
|
|
423
|
-
touchAction: "none",
|
|
424
|
-
backgroundSize: "cover",
|
|
425
|
-
backgroundRepeat: "no-repeat",
|
|
426
|
-
backgroundPosition: "center center",
|
|
427
|
-
width: "100%",
|
|
428
|
-
height: "100%",
|
|
429
|
-
willChange: "transform"
|
|
430
|
-
},
|
|
431
|
-
children: /* @__PURE__ */ D(Fe, { children: [
|
|
432
|
-
/* @__PURE__ */ i(g, { className: `${R.imageContainer} desktop`, children: n[y] }),
|
|
433
|
-
/* @__PURE__ */ i(
|
|
434
|
-
g,
|
|
435
|
-
{
|
|
436
|
-
className: `${R.imageContainer} big-tablet`,
|
|
437
|
-
children: n[y]
|
|
438
|
-
}
|
|
439
|
-
)
|
|
440
|
-
] })
|
|
441
|
-
}
|
|
442
|
-
)
|
|
443
|
-
)
|
|
444
|
-
)
|
|
445
|
-
}
|
|
446
|
-
),
|
|
447
|
-
/* @__PURE__ */ i(
|
|
448
|
-
g,
|
|
449
|
-
{
|
|
450
|
-
className: R.galleryMenuContainer,
|
|
451
|
-
style: { position: "absolute", bottom: 0, left: 0, right: 0 },
|
|
452
|
-
children: /* @__PURE__ */ i(je, { openMenu: !0 })
|
|
453
|
-
}
|
|
454
|
-
),
|
|
455
|
-
/* @__PURE__ */ i("div", { style: { position: "absolute", top: 0, left: 0, right: 0 }, children: /* @__PURE__ */ i(he, { handleCloseGallery: r }) })
|
|
456
|
-
]
|
|
457
|
-
}
|
|
458
|
-
)
|
|
459
|
-
}
|
|
460
|
-
);
|
|
461
|
-
}, Re = ({ children: e }) => /* @__PURE__ */ i(Ge, { children: e });
|
|
2
|
+
import { G as a } from "../GalleryModal-DjCnCkbg.js";
|
|
462
3
|
export {
|
|
463
|
-
|
|
4
|
+
a as GalleryModal
|
|
464
5
|
};
|
package/dist/icons/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../InputImage-CInJWoGb.cjs");exports.InputImage=e.InputImage;
|
|
@@ -1,106 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { C as n } from "../component-C1Gs4nVu.js";
|
|
4
|
-
import { L as d } from "../component-DRXQXr2G.js";
|
|
5
|
-
import { T as L } from "../component-BvHdlcdE.js";
|
|
6
|
-
import { U as g } from "../UIcon-BHzbeYWw.js";
|
|
7
|
-
import { S as _ } from "../generics-C-WSPclF.js";
|
|
8
|
-
import { h as w, b as R } from "../classes-CVxy1f4M.js";
|
|
9
|
-
import { useState as v, useEffect as S } from "react";
|
|
10
|
-
const F = "_iconContainerDesktop_1wxn3_25", M = "_iconContainerMobile_1wxn3_34", U = {
|
|
11
|
-
iconContainerDesktop: F,
|
|
12
|
-
iconContainerMobile: M
|
|
13
|
-
}, z = ({
|
|
14
|
-
id: s,
|
|
15
|
-
name: p,
|
|
16
|
-
handleImageChange: i,
|
|
17
|
-
labelname: f,
|
|
18
|
-
defaultValue: o,
|
|
19
|
-
width: h = "100%",
|
|
20
|
-
height: x,
|
|
21
|
-
ref: y,
|
|
22
|
-
...C
|
|
23
|
-
}) => {
|
|
24
|
-
const [c, b] = v(), [a, l] = v(o);
|
|
25
|
-
S(() => {
|
|
26
|
-
if (o && o !== "") {
|
|
27
|
-
l(o);
|
|
28
|
-
return;
|
|
29
|
-
} else if (!c) return;
|
|
30
|
-
const t = URL.createObjectURL(c);
|
|
31
|
-
return l(t), () => {
|
|
32
|
-
var r;
|
|
33
|
-
if (t !== "")
|
|
34
|
-
r = t;
|
|
35
|
-
else if (c && a)
|
|
36
|
-
r = a;
|
|
37
|
-
else return;
|
|
38
|
-
try {
|
|
39
|
-
URL.revokeObjectURL(r);
|
|
40
|
-
} catch {
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}, [o, c]);
|
|
44
|
-
const j = async (t) => {
|
|
45
|
-
if (!t.target.files || t.target.files.length === 0) return;
|
|
46
|
-
b(t.target.files[0]);
|
|
47
|
-
const r = URL.createObjectURL(t.target.files[0]);
|
|
48
|
-
l(r), i && i(t.target.files[0]);
|
|
49
|
-
}, u = () => {
|
|
50
|
-
b(void 0), l(void 0), i && i(void 0);
|
|
51
|
-
};
|
|
52
|
-
return /* @__PURE__ */ m(n, { children: [
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
"input",
|
|
55
|
-
{
|
|
56
|
-
id: s,
|
|
57
|
-
ref: y,
|
|
58
|
-
type: "file",
|
|
59
|
-
name: p,
|
|
60
|
-
onChange: j,
|
|
61
|
-
accept: "image/png, image/jpeg, image/webp, image/jpg",
|
|
62
|
-
style: {
|
|
63
|
-
opacity: 0,
|
|
64
|
-
pointerEvents: "none",
|
|
65
|
-
width: 0,
|
|
66
|
-
height: 0,
|
|
67
|
-
position: "absolute"
|
|
68
|
-
},
|
|
69
|
-
...C
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ e(
|
|
73
|
-
"label",
|
|
74
|
-
{
|
|
75
|
-
htmlFor: s,
|
|
76
|
-
onMouseEnter: () => {
|
|
77
|
-
},
|
|
78
|
-
onMouseLeave: () => {
|
|
79
|
-
},
|
|
80
|
-
style: { width: h, height: x, cursor: "pointer" },
|
|
81
|
-
children: a ? /* @__PURE__ */ e(
|
|
82
|
-
k,
|
|
83
|
-
{
|
|
84
|
-
src: a,
|
|
85
|
-
width: h,
|
|
86
|
-
handleCancel: u
|
|
87
|
-
}
|
|
88
|
-
) : /* @__PURE__ */ m(d, { display: R.Flex, flexAlignItem: w.Center, children: [
|
|
89
|
-
/* @__PURE__ */ e(n, { marginRight: _.Size1, children: /* @__PURE__ */ e(L, { children: f || "Upload image" }) }),
|
|
90
|
-
/* @__PURE__ */ e(n, { className: `${U.iconContainerDesktop}`, children: /* @__PURE__ */ e(g, { name: "image" }) }),
|
|
91
|
-
/* @__PURE__ */ e(n, { className: `${U.iconContainerMobile}`, children: /* @__PURE__ */ e(g, { name: "camera" }) })
|
|
92
|
-
] })
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
] });
|
|
96
|
-
}, k = ({
|
|
97
|
-
src: s,
|
|
98
|
-
width: p,
|
|
99
|
-
handleCancel: i
|
|
100
|
-
}) => /* @__PURE__ */ m(d, { children: [
|
|
101
|
-
/* @__PURE__ */ e(n, { children: /* @__PURE__ */ e("img", { alt: "preview", src: s, width: p }) }),
|
|
102
|
-
/* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(g, { name: "x", iconAction: () => i() }) })
|
|
103
|
-
] });
|
|
2
|
+
import { I } from "../InputImage-ZST0lvcI.js";
|
|
104
3
|
export {
|
|
105
|
-
|
|
4
|
+
I as InputImage
|
|
106
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../InputText-Bjhoe-Tm.cjs");exports.InputText=e.InputText;
|