prometeo-design-system 2.2.2 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar.es.js +1 -1
- package/dist/{Button-DsbEyjth.js → Button-Bc0LYLfg.js} +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-BhFog7j5.js → CardProfile-BiYr6kY9.js} +1 -1
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/CheckboxFormik.es.js +1 -1
- package/dist/DatePicker.es.js +2 -2
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +2 -2
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/Icons.es.js +1 -1
- package/dist/Image.d.ts +4 -0
- package/dist/Image.es.js +91 -0
- package/dist/ImageGallery-O5Y4oBrD.js +352 -0
- package/dist/ImageGallery.d.ts +6 -0
- package/dist/ImageGallery.es.js +23 -0
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +1 -1
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-p4Pll4Cm.js → LayoutGeneric-jDE96L2N.js} +1 -1
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +1 -1
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/SegmentedButton.d.ts +2 -0
- package/dist/SegmentedButton.es.js +188 -0
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/Skeleton.es.js +33 -32
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.es.js +1 -1
- package/dist/TabLinks.es.js +1 -1
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Image/GalleryPreview.d.ts +8 -0
- package/dist/components/Image/Image.d.ts +23 -0
- package/dist/components/Image/ImageGallery.d.ts +18 -0
- package/dist/components/Image/LightBox.d.ts +14 -0
- package/dist/components/Image/index.d.ts +5 -0
- package/dist/components/Image/useImageGallery.d.ts +10 -0
- package/dist/exports/Image.d.ts +1 -0
- package/dist/exports/ImageGallery.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/pages/ImagesPage.d.ts +2 -0
- package/dist/preview/ImagePreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +272 -447
- package/package.json +9 -1
package/dist/ProgressBar.es.js
CHANGED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { j as u } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as d } from "./cn-B6yFEsav.js";
|
|
3
|
+
import z, { useState as M, useMemo as C, useEffect as L } from "react";
|
|
4
|
+
import { motion as E } from "framer-motion";
|
|
5
|
+
const X = (T) => {
|
|
6
|
+
const [c, _] = M({}), { size: t = "medium", color: R = "default", options: l, value: p, name: x, onChange: j, icon: y, allowExpand: n = !1, disabled: s = !1 } = T, m = Math.max(l.findIndex((e) => e.value === p), 0), b = l.length, N = 9, w = 26, o = {
|
|
7
|
+
small: 120,
|
|
8
|
+
medium: 120,
|
|
9
|
+
large: 120
|
|
10
|
+
}, a = {
|
|
11
|
+
small: 94,
|
|
12
|
+
medium: 94,
|
|
13
|
+
large: 94
|
|
14
|
+
}, k = 16, S = {
|
|
15
|
+
small: { container: "p-2" },
|
|
16
|
+
medium: { container: "p-4 h-[48px] rounded-lg" },
|
|
17
|
+
large: { container: "p-6" }
|
|
18
|
+
}, f = {
|
|
19
|
+
default: {
|
|
20
|
+
switch: "bg-primary-medium-default text-neutral-weak-default ",
|
|
21
|
+
container: "border-neutral-default-default",
|
|
22
|
+
icon: "text-neutral-weak-default",
|
|
23
|
+
option: "text-neutral-medium-default"
|
|
24
|
+
},
|
|
25
|
+
success: {
|
|
26
|
+
switch: "bg-success-medium-default text-neutral-weak-default",
|
|
27
|
+
container: "border-neutral-default-default",
|
|
28
|
+
icon: "text-neutral-weak-default",
|
|
29
|
+
option: "text-neutral-medium-default"
|
|
30
|
+
},
|
|
31
|
+
danger: {
|
|
32
|
+
switch: "bg-error-medium-default text-neutral-weak-default",
|
|
33
|
+
container: "border-neutral-default-default",
|
|
34
|
+
icon: "text-neutral-weak-default",
|
|
35
|
+
option: "text-neutral-medium-default"
|
|
36
|
+
},
|
|
37
|
+
warning: {
|
|
38
|
+
switch: "bg-warning-medium-default text-neutral-weak-default",
|
|
39
|
+
container: "border-neutral-default-default",
|
|
40
|
+
icon: "text-neutral-weak-default",
|
|
41
|
+
option: "text-neutral-medium-default"
|
|
42
|
+
},
|
|
43
|
+
disabled: {
|
|
44
|
+
switch: "bg-primary-medium-disabled text-neutral-strong-disabled",
|
|
45
|
+
container: "border-neutral-default-disabled",
|
|
46
|
+
icon: "text-neutral-strong-disabled",
|
|
47
|
+
option: "text-neutral-strong-disabled"
|
|
48
|
+
}
|
|
49
|
+
}, I = l.find((e) => e.value === p) ?? l[0], g = I.label.length * N + k * 2 + w, W = () => C(() => Object.values(c).reduce((i, r) => i + r, 0) + w, [c]), v = {
|
|
50
|
+
small: n ? W() : (b - 1) * a.small + o.small,
|
|
51
|
+
medium: n ? W() : (b - 1) * a.medium + o.medium,
|
|
52
|
+
large: n ? W() : (b - 1) * a.large + o.large
|
|
53
|
+
};
|
|
54
|
+
L(() => {
|
|
55
|
+
if (!n) return;
|
|
56
|
+
let e = {};
|
|
57
|
+
l.forEach((i, r) => {
|
|
58
|
+
e[r] = i.label.length * N + k * 2;
|
|
59
|
+
}), _(e);
|
|
60
|
+
}, []);
|
|
61
|
+
const H = C(() => n ? Object.values(c).reduce((e, i, r) => r < m ? e + i : e, 0) : Math.max(m * a[t] - 2, 0), [m]), D = () => {
|
|
62
|
+
if (s) return;
|
|
63
|
+
const e = m === l.length - 1 ? l[0] : l[m + 1];
|
|
64
|
+
j?.(x, e.value);
|
|
65
|
+
}, h = s ? "disabled" : R;
|
|
66
|
+
return /* @__PURE__ */ u.jsxs(
|
|
67
|
+
"button",
|
|
68
|
+
{
|
|
69
|
+
name: x,
|
|
70
|
+
type: "button",
|
|
71
|
+
id: "segmented-button-container",
|
|
72
|
+
style: {
|
|
73
|
+
width: v[t],
|
|
74
|
+
minWidth: v[t],
|
|
75
|
+
maxWidth: v[t]
|
|
76
|
+
},
|
|
77
|
+
className: d(
|
|
78
|
+
S[t].container,
|
|
79
|
+
f[h].container,
|
|
80
|
+
"border-[1px]",
|
|
81
|
+
!s && "cursor-pointer",
|
|
82
|
+
"relative"
|
|
83
|
+
),
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ u.jsxs(
|
|
86
|
+
E.div,
|
|
87
|
+
{
|
|
88
|
+
id: "segmented-button-switcher",
|
|
89
|
+
animate: {
|
|
90
|
+
left: `${H}px`,
|
|
91
|
+
width: n ? g : o[t],
|
|
92
|
+
minWidth: n ? g : o[t],
|
|
93
|
+
maxWidth: n ? g : o[t]
|
|
94
|
+
},
|
|
95
|
+
transition: {
|
|
96
|
+
type: "spring",
|
|
97
|
+
stiffness: 260,
|
|
98
|
+
damping: 30
|
|
99
|
+
},
|
|
100
|
+
className: d(
|
|
101
|
+
"absolute top-0 left-0 h-full rounded-[6px] z-30",
|
|
102
|
+
"flex items-center justify-center gap-[2px] p-4",
|
|
103
|
+
f[h].switch
|
|
104
|
+
),
|
|
105
|
+
onClick: () => {
|
|
106
|
+
!s && D();
|
|
107
|
+
},
|
|
108
|
+
children: [
|
|
109
|
+
y && z.cloneElement(y, { className: d(
|
|
110
|
+
"w-6 h-6 text-neutral-weak-default min-w-6 min-h-6",
|
|
111
|
+
f[h].icon
|
|
112
|
+
) }),
|
|
113
|
+
/* @__PURE__ */ u.jsx(
|
|
114
|
+
"p",
|
|
115
|
+
{
|
|
116
|
+
className: d(
|
|
117
|
+
"prometeo-fonts-label-large ",
|
|
118
|
+
" overflow-hidden overflow-ellipsis text-nowrap ",
|
|
119
|
+
f[h].switch
|
|
120
|
+
),
|
|
121
|
+
children: I.label
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ u.jsx(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
id: "segmented-button-options",
|
|
131
|
+
className: d(
|
|
132
|
+
"absolute top-0 left-0 w-full h-full overflow-hidden",
|
|
133
|
+
"flex justify-center"
|
|
134
|
+
),
|
|
135
|
+
children: l?.map((e, i) => {
|
|
136
|
+
const r = e.value === (p || l[0].value), A = n ? c[i] + w : o[t], P = n ? c[i] : a[t], O = r ? A : P;
|
|
137
|
+
return /* @__PURE__ */ u.jsx(
|
|
138
|
+
E.span,
|
|
139
|
+
{
|
|
140
|
+
id: "segmented-button-option",
|
|
141
|
+
onClick: () => {
|
|
142
|
+
!s && j?.(x, e.value);
|
|
143
|
+
},
|
|
144
|
+
animate: {
|
|
145
|
+
width: O,
|
|
146
|
+
minWidth: O,
|
|
147
|
+
maxWidth: O
|
|
148
|
+
},
|
|
149
|
+
transition: {
|
|
150
|
+
duration: 0.3,
|
|
151
|
+
delay: 0
|
|
152
|
+
},
|
|
153
|
+
className: d(
|
|
154
|
+
"z-20 h-full ",
|
|
155
|
+
"flex items-center justify-center px-3 py-[6px]",
|
|
156
|
+
"prometeo-fonts-label-large text-neutral-medium-default",
|
|
157
|
+
" overflow-hidden ",
|
|
158
|
+
!s && "cursor-pointer"
|
|
159
|
+
),
|
|
160
|
+
"aria-label": e.label,
|
|
161
|
+
children: /* @__PURE__ */ u.jsx(
|
|
162
|
+
"p",
|
|
163
|
+
{
|
|
164
|
+
style: {
|
|
165
|
+
width: n ? "max-content" : a[t],
|
|
166
|
+
minWidth: n ? "max-content" : a[t],
|
|
167
|
+
maxWidth: n ? "max-content" : a[t]
|
|
168
|
+
},
|
|
169
|
+
className: d(
|
|
170
|
+
"px-3 place-content-center overflow-hidden text-ellipsis text-wrap prometeo-fonts-label-large h-full",
|
|
171
|
+
f[h].option
|
|
172
|
+
),
|
|
173
|
+
children: e.label
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
},
|
|
177
|
+
e.value
|
|
178
|
+
);
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
};
|
|
186
|
+
export {
|
|
187
|
+
X as SegmentedButton
|
|
188
|
+
};
|
package/dist/Select.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { Icons as w } from "./Icons.es.js";
|
|
3
3
|
import { c as o } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { memo as se, useState as y, useRef as re, useEffect as oe } from "react";
|
package/dist/SelectFormik.es.js
CHANGED
package/dist/Skeleton.es.js
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
import { j as x } from "./jsx-runtime-
|
|
1
|
+
import { j as x } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as P } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { useRef as $,
|
|
4
|
-
const
|
|
5
|
-
const e = $(null), { debugMode:
|
|
6
|
-
let
|
|
7
|
-
B(() => {
|
|
3
|
+
import { useRef as $, useCallback as B, useLayoutEffect as E } from "react";
|
|
4
|
+
const A = (b) => {
|
|
5
|
+
const e = $(null), { debugMode: y = !1, className: p = "", children: f, shape: h = "rounded", animation: u = "shimmer", onlyContainer: l = !1 } = b;
|
|
6
|
+
let i = "255, 255, 255", m = "255, 255, 255, 0.1";
|
|
7
|
+
const g = B(() => {
|
|
8
|
+
if (!l && e.current)
|
|
9
|
+
switch (u) {
|
|
10
|
+
case "shimmer":
|
|
11
|
+
e.current.classList.add("skeleton-shimmer-animation");
|
|
12
|
+
const n = m.split(",").map(Number);
|
|
13
|
+
n && n.length >= 3 && (e.current.style.setProperty("--shimmer-color-r", n[0].toString()), e.current.style.setProperty("--shimmer-color-g", n[1].toString()), e.current.style.setProperty("--shimmer-color-b", n[2].toString()), e.current.style.setProperty("--shimmer-color-a", n[3].toString()));
|
|
14
|
+
break;
|
|
15
|
+
case "none":
|
|
16
|
+
e.current.style.animation = "none";
|
|
17
|
+
break;
|
|
18
|
+
case "border":
|
|
19
|
+
e.current.classList.add("skeleton-border-animation"), e.current.style.backgroundColor = "transparent";
|
|
20
|
+
const c = i.match(/\d+/g);
|
|
21
|
+
c && c.length >= 3 && (e.current.style.setProperty("--border-color-r", c[0]), e.current.style.setProperty("--border-color-g", c[1]), e.current.style.setProperty("--border-color-b", c[2]));
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}, [u, m, i, l]);
|
|
25
|
+
E(() => {
|
|
8
26
|
if (e.current) {
|
|
9
27
|
const n = (a) => {
|
|
10
28
|
let r = a;
|
|
@@ -25,28 +43,11 @@ const v = (g) => {
|
|
|
25
43
|
const o = t.getImageData(0, 0, 1, 1).data;
|
|
26
44
|
return [o[0], o[1], o[2]];
|
|
27
45
|
}, C = n(e.current.parentElement), s = c(C), S = s.reduce((a, r) => a + r, 0) < 382;
|
|
28
|
-
let
|
|
29
|
-
S ?
|
|
46
|
+
let d;
|
|
47
|
+
S ? d = `rgb(${s[0] + 10}, ${s[1] + 10}, ${s[2] + 10})` : (d = `rgb(${s[0] - 30}, ${s[1] - 30}, ${s[2] - 30})`, i = "115,115,115", m = "255,255,255, 0.4"), l && (d = "transparent", e.current.style.animation = "none"), e.current.style.backgroundColor = d, g();
|
|
30
48
|
}
|
|
31
|
-
}, [i]);
|
|
32
|
-
const
|
|
33
|
-
if (!m && e.current)
|
|
34
|
-
switch (i) {
|
|
35
|
-
case "shimmer":
|
|
36
|
-
e.current.classList.add("skeleton-shimmer-animation");
|
|
37
|
-
const n = u.split(",").map(Number);
|
|
38
|
-
n && n.length >= 3 && (e.current.style.setProperty("--shimmer-color-r", n[0].toString()), e.current.style.setProperty("--shimmer-color-g", n[1].toString()), e.current.style.setProperty("--shimmer-color-b", n[2].toString()), e.current.style.setProperty("--shimmer-color-a", n[3].toString()));
|
|
39
|
-
break;
|
|
40
|
-
case "none":
|
|
41
|
-
e.current.style.animation = "none";
|
|
42
|
-
break;
|
|
43
|
-
case "border":
|
|
44
|
-
e.current.classList.add("skeleton-border-animation"), e.current.style.backgroundColor = "transparent";
|
|
45
|
-
const c = d.match(/\d+/g);
|
|
46
|
-
c && c.length >= 3 && (e.current.style.setProperty("--border-color-r", c[0]), e.current.style.setProperty("--border-color-g", c[1]), e.current.style.setProperty("--border-color-b", c[2]));
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
}, k = {
|
|
49
|
+
}, [m, i, l, g]);
|
|
50
|
+
const k = {
|
|
50
51
|
circle: "rounded-full aspect-square",
|
|
51
52
|
square: "rounded-none",
|
|
52
53
|
rounded: "rounded"
|
|
@@ -56,16 +57,16 @@ const v = (g) => {
|
|
|
56
57
|
{
|
|
57
58
|
ref: e,
|
|
58
59
|
className: P(
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
y && " border-red-600/20 border",
|
|
61
|
+
p,
|
|
61
62
|
"skeleton-container",
|
|
62
|
-
k[
|
|
63
|
+
k[h]
|
|
63
64
|
),
|
|
64
|
-
children:
|
|
65
|
+
children: f
|
|
65
66
|
},
|
|
66
67
|
`skeleton-${Math.random().toFixed(10)}`
|
|
67
68
|
);
|
|
68
69
|
};
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
+
A as Skeleton
|
|
71
72
|
};
|
package/dist/Spinner.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { ClipLoader as l, SyncLoader as m, HashLoader as p, GridLoader as x, DotLoader as j, BounceLoader as f } from "react-spinners";
|
|
3
3
|
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
4
|
const y = ({
|
package/dist/Steps.es.js
CHANGED
package/dist/Switch.es.js
CHANGED
package/dist/TabLinks.es.js
CHANGED
package/dist/Table.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
package/dist/TextArea.es.js
CHANGED
package/dist/Tooltip.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
3
|
import { useState as p, cloneElement as x } from "react";
|
|
4
4
|
import { Icons as b } from "./Icons.es.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement, default as React } from 'react';
|
|
2
|
+
import { ImageProps } from './Image';
|
|
3
|
+
interface GalleryPreviewProps {
|
|
4
|
+
images?: ReactElement<ImageProps>[];
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const GalleryPreview: React.NamedExoticComponent<GalleryPreviewProps & React.RefAttributes<unknown>>;
|
|
8
|
+
export default GalleryPreview;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SpinnerProps } from '../Spinner/Spinner';
|
|
2
|
+
import { ImageGalleryHandle } from './ImageGallery';
|
|
3
|
+
export interface ImageProps {
|
|
4
|
+
src: string;
|
|
5
|
+
alt: string;
|
|
6
|
+
width?: number | string;
|
|
7
|
+
height?: number | string;
|
|
8
|
+
className?: string;
|
|
9
|
+
lazy?: boolean;
|
|
10
|
+
showLoader?: boolean;
|
|
11
|
+
loaderProps?: {
|
|
12
|
+
loaderType?: 'skeleton' | 'clasic';
|
|
13
|
+
variant?: SpinnerProps['variant'];
|
|
14
|
+
speedMultiplier?: SpinnerProps['speedMultiplier'];
|
|
15
|
+
className?: string;
|
|
16
|
+
size?: SpinnerProps['size'];
|
|
17
|
+
backdropClassName?: string;
|
|
18
|
+
};
|
|
19
|
+
allowPreview?: boolean;
|
|
20
|
+
galleryRef?: React.RefObject<ImageGalleryHandle | null>;
|
|
21
|
+
}
|
|
22
|
+
declare const CustomImage: import('react').MemoExoticComponent<(props: ImageProps) => import("react/jsx-runtime").JSX.Element>;
|
|
23
|
+
export default CustomImage;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ImageProps } from './Image';
|
|
3
|
+
export interface ImageGalleryProps {
|
|
4
|
+
children?: ReactElement<ImageProps> | ReactElement<ImageProps>[];
|
|
5
|
+
className?: string;
|
|
6
|
+
lightboxClassName?: string;
|
|
7
|
+
showThumbnails?: boolean;
|
|
8
|
+
thumbnailsClassName?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ImageGalleryHandle {
|
|
11
|
+
openLightbox: (index?: number) => void;
|
|
12
|
+
closeLightbox: () => void;
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
addImage: (image: ImageProps) => void;
|
|
15
|
+
images: ImageProps[];
|
|
16
|
+
}
|
|
17
|
+
declare const ImageGallery: import('react').ForwardRefExoticComponent<ImageGalleryProps & import('react').RefAttributes<ImageGalleryHandle>>;
|
|
18
|
+
export default ImageGallery;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ImageProps } from './Image';
|
|
2
|
+
interface LightBoxProps {
|
|
3
|
+
images: ImageProps[];
|
|
4
|
+
lightboxClassName?: string;
|
|
5
|
+
closeLightbox: () => void;
|
|
6
|
+
showThumbnails?: boolean;
|
|
7
|
+
thumbnailsClassName?: string;
|
|
8
|
+
currentIndex: number;
|
|
9
|
+
goToNext: () => void;
|
|
10
|
+
goToPrevious: () => void;
|
|
11
|
+
goToIndex: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const LightBox: import('react').MemoExoticComponent<({ images, lightboxClassName, closeLightbox, showThumbnails, thumbnailsClassName, currentIndex, goToNext, goToPrevious, goToIndex }: LightBoxProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
14
|
+
export default LightBox;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ImageGalleryHandle } from './ImageGallery';
|
|
2
|
+
import { ImageProps } from './Image';
|
|
3
|
+
export declare const useImageGallery: () => {
|
|
4
|
+
isOpen: () => boolean;
|
|
5
|
+
openLightbox: () => void;
|
|
6
|
+
closeLightbox: () => void;
|
|
7
|
+
galleryRef: import('react').RefObject<ImageGalleryHandle | null>;
|
|
8
|
+
addImage: (image: ImageProps) => void;
|
|
9
|
+
images: () => ImageProps[];
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/Image/Image';
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export { default as Tooltip } from './components/Tooltip/Tootip';
|
|
|
30
30
|
export { default as Skeleton } from './components/Skeleton/Skeleton';
|
|
31
31
|
export { default as SegmentedButton } from './components/SegmentedButton/SegmentedButton';
|
|
32
32
|
export { default as LayoutGeneric } from './components/Layout/LayoutGeneric';
|
|
33
|
+
export { default as ImageGallery } from './components/Image/ImageGallery';
|
|
34
|
+
export { default as Image } from './components/Image/Image';
|
|
33
35
|
export * from './components/Sidebar';
|
|
34
36
|
export { SecondaryBar } from './components/Sidebar/SecondaryBar/SecondaryBar';
|
|
35
37
|
export { Badge } from './components/Sidebar/components/badge';
|
|
@@ -81,4 +83,6 @@ export type { SwitchProps } from './components/Switch/Switch';
|
|
|
81
83
|
export type { SkeletonProps } from './components/Skeleton/Skeleton';
|
|
82
84
|
export type { SegmentedButtonProps } from './components/SegmentedButton/SegmentedButton';
|
|
83
85
|
export type { DatePickerProps } from './components/DatePicker/DatePicker';
|
|
86
|
+
export type { ImageProps } from './components/Image/Image';
|
|
87
|
+
export type { ImageGalleryProps } from './components/Image/ImageGallery';
|
|
84
88
|
export { Icons } from './Icons/Icons';
|