@functionalui/functionalui 0.2.6 → 0.2.7

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.
Files changed (138) hide show
  1. package/dist/Admonition-BVd4bXl_.cjs +1 -0
  2. package/dist/Admonition-CReUUZzJ.js +88 -0
  3. package/dist/{Avatar-CQA0mEVW.js → Avatar-CkxjB_cU.js} +4 -4
  4. package/dist/AvatarGroup-CbohU2rq.cjs +1 -0
  5. package/dist/AvatarGroup-FpaQP2H4.js +52 -0
  6. package/dist/{Button-CpTXDsI7.js → Button-DLwud-g7.js} +8 -8
  7. package/dist/{Checkbox-C29jP71p.js → Checkbox-CNpy1wvA.js} +3 -3
  8. package/dist/Checkboxes-CQVptWR8.cjs +1 -0
  9. package/dist/Checkboxes-Cj740f5X.js +80 -0
  10. package/dist/Chip-DgSZZTgy.js +132 -0
  11. package/dist/Chip-HOh--tbB.cjs +1 -0
  12. package/dist/ColorPicker-DUz0qcHd.js +234 -0
  13. package/dist/ColorPicker-rxR_V4EW.cjs +1 -0
  14. package/dist/DivMeasure-C398kYvk.js +26 -0
  15. package/dist/DivMeasure-oi_fzKlp.cjs +1 -0
  16. package/dist/GalleryModal-DjCnCkbg.js +464 -0
  17. package/dist/GalleryModal-wFC9x3Em.cjs +1 -0
  18. package/dist/InputImage-CInJWoGb.cjs +1 -0
  19. package/dist/InputImage-ZST0lvcI.js +106 -0
  20. package/dist/InputText-Bjhoe-Tm.cjs +1 -0
  21. package/dist/InputText-DnR7KYJS.js +246 -0
  22. package/dist/InsetGroup-BHxpHwpd.js +105 -0
  23. package/dist/InsetGroup-CGACEEbB.cjs +1 -0
  24. package/dist/{LabelText-D7QIWtWj.js → LabelText-WYEq5keJ.js} +3 -3
  25. package/dist/LoadingSpinner-BC0eMoVW.js +101 -0
  26. package/dist/LoadingSpinner-DykDI5-W.cjs +1 -0
  27. package/dist/{Modal-DXLyt-j4.js → Modal-Di5ye0Cr.js} +4 -4
  28. package/dist/NotificationSystem-B5NXsG0a.js +158 -0
  29. package/dist/NotificationSystem-D4ydo2Lk.cjs +1 -0
  30. package/dist/Radio-Dd5W2Lpf.js +121 -0
  31. package/dist/Radio-QbaBzLpf.cjs +1 -0
  32. package/dist/SelectSpring-BOfRXdag.js +471 -0
  33. package/dist/SelectSpring-DFKWTbF1.cjs +1 -0
  34. package/dist/SpringEnter-CPw1YgNg.cjs +1 -0
  35. package/dist/SpringEnter-CoVZpW-c.js +44 -0
  36. package/dist/{SpringEnterOffsetBy-DMSIQgV3.js → SpringEnterOffsetBy-BKglENgZ.js} +2 -2
  37. package/dist/SpringMenuTransition-B_PoFoqO.cjs +1 -0
  38. package/dist/SpringMenuTransition-CzSfyvDZ.js +42 -0
  39. package/dist/SpringOpenCloseHeight-COvFkc30.js +18 -0
  40. package/dist/SpringOpenCloseHeight-CyxsSgRD.cjs +1 -0
  41. package/dist/TableGrid-BYBVHJt9.cjs +1 -0
  42. package/dist/TableGrid-QlKM9Sdp.js +49 -0
  43. package/dist/{TableHeader-Da0XxILB.js → TableHeader-D3V5Z3JL.js} +4 -4
  44. package/dist/{TableRow-BlJSvake.js → TableRow-DKC9qdjQ.js} +3 -3
  45. package/dist/Tabs-BkUyxceG.js +134 -0
  46. package/dist/Tabs-C8VAb1g0.cjs +1 -0
  47. package/dist/{TagColor-BYKxfOU6.js → TagColor-Bd3n3RCF.js} +3 -3
  48. package/dist/TextArea-Bsm5M8lo.cjs +1 -0
  49. package/dist/TextArea-Cd3q9BMN.js +160 -0
  50. package/dist/ToggleSwitch-BNAk1Wp6.js +100 -0
  51. package/dist/ToggleSwitch-D6ltRmPy.cjs +1 -0
  52. package/dist/{UIcon-BHzbeYWw.js → UIcon-Cc5PX9WJ.js} +3 -3
  53. package/dist/UiContexts-36wfLVYv.cjs +1 -0
  54. package/dist/UiContexts-BMJZJR8C.js +35 -0
  55. package/dist/admonition/index.cjs +1 -1
  56. package/dist/admonition/index.mjs +2 -86
  57. package/dist/avatar/index.mjs +1 -1
  58. package/dist/avatar-group/index.cjs +1 -1
  59. package/dist/avatar-group/index.mjs +2 -50
  60. package/dist/button/index.mjs +1 -1
  61. package/dist/checkbox/index.mjs +1 -1
  62. package/dist/checkboxes/index.cjs +1 -1
  63. package/dist/checkboxes/index.mjs +2 -78
  64. package/dist/chip/index.cjs +1 -1
  65. package/dist/chip/index.mjs +2 -130
  66. package/dist/color-picker/index.cjs +1 -1
  67. package/dist/color-picker/index.mjs +2 -232
  68. package/dist/{component-CW2JPBAq.js → component-89pO-V2r.js} +1 -1
  69. package/dist/{component-BvHdlcdE.js → component-BbiEBU5H.js} +1 -1
  70. package/dist/component-BvmPGrYv.cjs +1 -0
  71. package/dist/{component-C1Gs4nVu.js → component-CGEZuC_0.js} +1 -1
  72. package/dist/{component-DRXQXr2G.js → component-CLzFHaNK.js} +1 -1
  73. package/dist/{component-D0wwK4KY.js → component-D-bBH8nL.js} +1 -1
  74. package/dist/{component-DCHO9d6d.js → component-DBDhHeDP.js} +1 -1
  75. package/dist/{component-D5nxKQnT.js → component-DP7cQasn.js} +1 -1
  76. package/dist/{component-CBIQe7z5.js → component-JelkpADf.js} +1 -1
  77. package/dist/{component-DdQu0mLI.js → component-SecZNuYG.js} +1 -1
  78. package/dist/component-cHg1BfVy.js +28 -0
  79. package/dist/container/index.mjs +1 -1
  80. package/dist/contexts/ui/index.cjs +1 -1
  81. package/dist/contexts/ui/index.mjs +3 -32
  82. package/dist/{createTextElement-Cgrvdwvh.js → createTextElement-d3-b9Lvn.js} +1 -1
  83. package/dist/css/index.css +1 -1
  84. package/dist/div-measure/index.cjs +1 -1
  85. package/dist/div-measure/index.mjs +2 -23
  86. package/dist/gallery-modal/index.cjs +1 -1
  87. package/dist/gallery-modal/index.mjs +2 -461
  88. package/dist/icons/index.mjs +1 -1
  89. package/dist/input-image/index.cjs +1 -1
  90. package/dist/input-image/index.mjs +2 -103
  91. package/dist/input-text/index.cjs +1 -1
  92. package/dist/input-text/index.mjs +2 -243
  93. package/dist/inset-group/index.cjs +1 -1
  94. package/dist/inset-group/index.mjs +2 -102
  95. package/dist/label-text/index.mjs +1 -1
  96. package/dist/layout/index.mjs +1 -1
  97. package/dist/loading-spinner/index.cjs +1 -1
  98. package/dist/loading-spinner/index.mjs +3 -98
  99. package/dist/main.cjs +1 -0
  100. package/dist/main.mjs +95 -0
  101. package/dist/modal/index.mjs +1 -1
  102. package/dist/notification-system/index.cjs +1 -1
  103. package/dist/notification-system/index.mjs +2 -155
  104. package/dist/radio/index.cjs +1 -1
  105. package/dist/radio/index.mjs +2 -118
  106. package/dist/{react-spring_web.modern-DgQDaJ06.js → react-spring_web.modern-DUf5COpz.js} +3 -3
  107. package/dist/select-spring/index.cjs +1 -1
  108. package/dist/select-spring/index.mjs +2 -468
  109. package/dist/spring-enter/index.cjs +1 -1
  110. package/dist/spring-enter/index.mjs +2 -42
  111. package/dist/spring-enter-offset-by/index.mjs +1 -1
  112. package/dist/spring-menu-transition/index.cjs +1 -1
  113. package/dist/spring-menu-transition/index.mjs +2 -40
  114. package/dist/spring-open-close-height/index.cjs +1 -1
  115. package/dist/spring-open-close-height/index.mjs +2 -16
  116. package/dist/styled/button/index.mjs +1 -1
  117. package/dist/styled/inputs/text/index.mjs +1 -1
  118. package/dist/styled/inputs/text-area/index.mjs +1 -1
  119. package/dist/styled/li/index.mjs +1 -1
  120. package/dist/styled/ul/index.mjs +1 -1
  121. package/dist/table-grid/index.cjs +1 -1
  122. package/dist/table-grid/index.mjs +2 -46
  123. package/dist/table-header/index.mjs +1 -1
  124. package/dist/table-row/index.mjs +1 -1
  125. package/dist/tabs/index.cjs +1 -1
  126. package/dist/tabs/index.mjs +2 -132
  127. package/dist/tag-color/index.mjs +1 -1
  128. package/dist/text-area/index.cjs +1 -1
  129. package/dist/text-area/index.mjs +2 -157
  130. package/dist/texts/header/index.cjs +1 -1
  131. package/dist/texts/header/index.mjs +2 -26
  132. package/dist/texts/p/index.mjs +1 -1
  133. package/dist/texts/span/index.mjs +1 -1
  134. package/dist/toggle-switch/index.cjs +1 -1
  135. package/dist/toggle-switch/index.mjs +2 -98
  136. package/dist/{types-BNUi2DUD.js → types-xFemYgmc.js} +1 -1
  137. package/dist/types.mjs +1 -1
  138. package/package.json +9 -1
@@ -1,464 +1,5 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as D } from "react/jsx-runtime";
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
- tt as GalleryModal
4
+ a as GalleryModal
464
5
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { U as c } from "../UIcon-BHzbeYWw.js";
2
+ import { U as c } from "../UIcon-Cc5PX9WJ.js";
3
3
  export {
4
4
  c as UIcon
5
5
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../component-D-EEi7NI.cjs"),v=require("../component-B1mkowwk.cjs"),L=require("../component-Bh3EPTN0.cjs"),u=require("../UIcon-B5rpDmHC.cjs"),S=require("../generics-9F1CmKPb.cjs"),C=require("../classes-HsjFV5aN.cjs"),j=require("react"),q="_iconContainerDesktop_1wxn3_25",I="_iconContainerMobile_1wxn3_34",b={iconContainerDesktop:q,iconContainerMobile:I},R=({id:s,name:p,handleImageChange:t,labelname:x,defaultValue:o,width:g="100%",height:y,ref:U,...d})=>{const[c,m]=j.useState(),[a,l]=j.useState(o);j.useEffect(()=>{if(o&&o!==""){l(o);return}else if(!c)return;const n=URL.createObjectURL(c);return l(n),()=>{var r;if(n!=="")r=n;else if(c&&a)r=a;else return;try{URL.revokeObjectURL(r)}catch{}}},[o,c]);const h=async n=>{if(!n.target.files||n.target.files.length===0)return;m(n.target.files[0]);const r=URL.createObjectURL(n.target.files[0]);l(r),t&&t(n.target.files[0])},f=()=>{m(void 0),l(void 0),t&&t(void 0)};return e.jsxs(i.Container,{children:[e.jsx("input",{id:s,ref:U,type:"file",name:p,onChange:h,accept:"image/png, image/jpeg, image/webp, image/jpg",style:{opacity:0,pointerEvents:"none",width:0,height:0,position:"absolute"},...d}),e.jsx("label",{htmlFor:s,onMouseEnter:()=>{},onMouseLeave:()=>{},style:{width:g,height:y,cursor:"pointer"},children:a?e.jsx(_,{src:a,width:g,handleCancel:f}):e.jsxs(v.Layout,{display:C.Displays.Flex,flexAlignItem:C.FlexAlignItems.Center,children:[e.jsx(i.Container,{marginRight:S.Spacings.Size1,children:e.jsx(L.Text_Span,{children:x||"Upload image"})}),e.jsx(i.Container,{className:`${b.iconContainerDesktop}`,children:e.jsx(u.UIcon,{name:"image"})}),e.jsx(i.Container,{className:`${b.iconContainerMobile}`,children:e.jsx(u.UIcon,{name:"camera"})})]})})]})},_=({src:s,width:p,handleCancel:t})=>e.jsxs(v.Layout,{children:[e.jsx(i.Container,{children:e.jsx("img",{alt:"preview",src:s,width:p})}),e.jsx(i.Container,{children:e.jsx(u.UIcon,{name:"x",iconAction:()=>t()})})]});exports.InputImage=R;
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 { jsxs as m, jsx as e } from "react/jsx-runtime";
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
- z as InputImage
4
+ I as InputImage
106
5
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("../component-D-EEi7NI.cjs"),$=require("../component-B6F6g6i4.cjs"),c=require("../generics-DE1oV0MV.cjs"),w=require("../generics-9F1CmKPb.cjs"),F=require("../values-D-Y_dNaF.cjs"),e=require("../icons-DSpaHhtT.cjs"),T=require("react"),A=require("../useCombinedRef-DZxHQ7PL.cjs"),G=require("../LabelText-BUslE9cx.cjs"),L=require("../UIcon-B5rpDmHC.cjs"),H=require("../generics-nyvJhwQE.cjs"),V=require("../component-Bh3EPTN0.cjs"),J=({inputHelper:o})=>{const[s,r]=T.useState(!1);return t.jsxs(d.Container,{style:{position:"absolute",top:"50%",right:-10,transform:"translateY(-25%)"},onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[t.jsx(L.UIcon,{name:"info",size:H.Sizings.Size2,colorLight:c.ColorPalettes.Primary5,colorDark:c.ColorPalettes.Primary5}),t.jsx(d.Container,{style:{position:"relative",pointerEvents:"none"},children:t.jsx(G.LabelText,{labelName:o,hover:s,x:0,y:0})})]})},K="_inputtext_rg89u_1",Q="_showHidePassword_rg89u_41",q={inputtext:K,showHidePassword:Q},ee=({isShow:o,handleShowHideText:s})=>t.jsx(d.Container,{className:q.showHidePassword,style:{position:"absolute",bottom:".75rem",left:"88%",zIndex:4,cursor:"pointer"},onClick:()=>s(),children:t.jsx(L.UIcon,{name:o?e.Icons.EyeOff:e.Icons.Eye,size:H.Sizings.Size3,colorLight:c.ColorPalettes.Primary5,colorDark:c.ColorPalettes.Primary5,cursor:w.Cursors.Pointer})}),te=({id:o,label:s,size:r,labelTextColor:i,inputColor:n})=>t.jsx(d.Container,{paddingLeft:e.INPUT_TEXT_SIZE[r].paddings.left,paddingBottom:e.INPUT_TEXT_SIZE[r].paddings.bottom,children:t.jsx("label",{htmlFor:o,children:t.jsx(V.Text_Span,{fontWeight:w.FontWeights.Size3,paletteColor:i&&typeof i=="boolean"?e.INPUT_TEXT_COLOR[n].labelColor:c.ColorPalettes.Grey10,fontSize:e.INPUT_TEXT_SIZE[r].font.size,children:s})})}),oe=({id:o,name:s,type:r=e.InputTextTypes.Text,value:i,modes:n=e.InputTextModes.Default,label:f,focus:p,required:_,width:I,fullWidth:S,helperText:x,placeholder:E="Insert text",step:v,min:O,handleChange:b,handleFocus:g,handleBlur:y,handleCheck:m,size:u=e.InputTextSizes.Default,inputStyle:P=e.InputTextStyles.Default,inputColor:h=c.ColorSets.Primarys,labelTextColor:R=!0,transparent:N,ref:Z,...D})=>{const a=T.useRef(null),B=A.useCombinedRef(a,Z);T.useEffect(()=>{if(n!==e.InputTextModes.Disabled){if(p){a.current&&a.current.focus();return}i!==""&&a.current&&a.current.value}},[p,n,i]);const[M,U]=T.useState(r),[C,z]=T.useState(!1),k=()=>{z(l=>!l)};T.useEffect(()=>{r===e.InputTextTypes.Password&&U(C?e.InputTextTypes.Text:e.InputTextTypes.Password)},[C]);const W=l=>{b&&b(l)},Y=T.useCallback(async l=>{l.preventDefault();const X=l.target.value.trim();if(!(!X||X!=="")){y&&y(),m&&await m();return}},[y,m]),j=T.useCallback(()=>{if(n!==e.InputTextModes.Disabled)return a.current&&a.current.focus(),g&&g(),!0},[g,n]);return t.jsxs(d.Container,{style:{width:S?"100%":I||350,position:"relative"},children:[!N&&t.jsx(te,{id:o,label:f,inputColor:h,size:u,labelTextColor:R}),t.jsxs(d.Container,{boxSizing:w.BoxSizings.BorderBox,...re(P,N),borderColor:e.INPUT_TEXT_COLOR[h].borderColor,paddingLeft:e.INPUT_TEXT_SIZE[u].paddings.left,paddingRight:e.INPUT_TEXT_SIZE[u].paddings.right,paddingTop:e.INPUT_TEXT_SIZE[u].paddings.top,paddingBottom:e.INPUT_TEXT_SIZE[u].paddings.bottom,style:{paddingTop:P!==e.InputTextStyles.Outlined?1:"",paddingBottom:P!==e.InputTextStyles.Outlined?F.SPACING_VALUES[e.INPUT_TEXT_SIZE[u].paddings.bottom]:"",display:P!==e.InputTextStyles.Outlined?"flex":"block",cursor:"text"},onClick:()=>j(),children:[t.jsx($.F__TextInput,{ref:B,type:M,required:_,disabled:n!==e.InputTextModes.Disabled?void 0:!0,fontSize:e.INPUT_TEXT_SIZE[u].font.size,fontWeight:e.INPUT_TEXT_SIZE[u].font.weight,color:e.INPUT_TEXT_COLOR[h].fontColor,placeholder:E,id:o,name:s,value:i,min:O,step:v,onChange:b?W:void 0,onFocus:j,onBlur:Y,className:q.inputtext,...D}),r===e.InputTextTypes.Password&&t.jsx(ee,{isShow:C,handleShowHideText:k}),x&&t.jsx(J,{inputHelper:x})]})]})},re=(o,s=!1)=>{var r,i,n,f,p,_,I,S,x,E;return s?{}:{borderBottomStyle:(n=(i=(r=e.INPUT_TEXT_STYLE[o])==null?void 0:r.borders)==null?void 0:i.bottom)==null?void 0:n.style,borderWidth:(p=(f=e.INPUT_TEXT_STYLE[o])==null?void 0:f.borders)==null?void 0:p.width,borderRadius:(I=(_=e.INPUT_TEXT_STYLE[o])==null?void 0:_.borders)==null?void 0:I.radius,borderStyle:(E=(x=(S=e.INPUT_TEXT_STYLE[o])==null?void 0:S.borders)==null?void 0:x.borders)==null?void 0:E.style}};exports.InputText=oe;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../InputText-Bjhoe-Tm.cjs");exports.InputText=e.InputText;