mosuk-ui 1.0.9 → 1.0.10
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/package.json +1 -11
- package/components/display/image/(images)/component/component.d.ts +0 -3
- package/components/display/image/(images)/component/component.interface.d.ts +0 -5
- package/components/display/image/(images)/component/component.interface.js +0 -1
- package/components/display/image/(images)/component/component.js +0 -49
- package/components/display/image/(images)/component/component.module.css +0 -30
- package/components/display/image/(images)/component/image/component.d.ts +0 -3
- package/components/display/image/(images)/component/image/component.interface.d.ts +0 -4
- package/components/display/image/(images)/component/image/component.interface.js +0 -1
- package/components/display/image/(images)/component/image/component.js +0 -29
- package/components/display/image/(images)/component/index.d.ts +0 -13
- package/components/display/image/(images)/component/index.js +0 -5
- package/components/display/image/(images)/skeleton/component.d.ts +0 -4
- package/components/display/image/(images)/skeleton/component.interface.d.ts +0 -5
- package/components/display/image/(images)/skeleton/component.interface.js +0 -1
- package/components/display/image/(images)/skeleton/component.js +0 -35
- package/components/display/image/(images)/skeleton/component.module.css +0 -47
- package/components/display/image/(images)/skeleton/index.d.ts +0 -13
- package/components/display/image/(images)/skeleton/index.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mosuk-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"author": "mosuk",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -257,16 +257,6 @@
|
|
|
257
257
|
"default": "./components/display/file/skeleton/index.js"
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
|
-
"./components/display/image/(images)/component": {
|
|
261
|
-
"import": {
|
|
262
|
-
"default": "./components/display/image/(images)/component/index.js"
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
"./components/display/image/(images)/skeleton": {
|
|
266
|
-
"import": {
|
|
267
|
-
"default": "./components/display/image/(images)/skeleton/index.js"
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
260
|
"./components/display/image/component": {
|
|
271
261
|
"import": {
|
|
272
262
|
"default": "./components/display/image/component/index.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import classNames from 'classnames';
|
|
24
|
-
import React, { Children, isValidElement, useImperativeHandle, useRef, } from 'react';
|
|
25
|
-
import { Pagination } from 'swiper/modules';
|
|
26
|
-
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
27
|
-
import { Image } from '../../component/components/component';
|
|
28
|
-
import styles from './component.module.css';
|
|
29
|
-
import { ImagesImage } from './image/component';
|
|
30
|
-
export function Images(_a) {
|
|
31
|
-
var _b, _c, _d, _e;
|
|
32
|
-
var ref = _a.ref, rest = __rest(_a, ["ref"]);
|
|
33
|
-
var swiperRef = useRef(null);
|
|
34
|
-
useImperativeHandle(ref, function () { return swiperRef.current; });
|
|
35
|
-
var handleHoverNavigation = function (index) {
|
|
36
|
-
if (swiperRef.current && swiperRef.current.swiper) {
|
|
37
|
-
swiperRef.current.swiper.slideTo(index);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var totalSlides = Children.toArray(rest === null || rest === void 0 ? void 0 : rest.children).filter(function (child) { return isValidElement(child) && child.type === ImagesImage; });
|
|
41
|
-
return (React.createElement(Image, __assign({ as: Swiper }, rest, { ref: swiperRef, modules: (rest === null || rest === void 0 ? void 0 : rest.modules) ? rest === null || rest === void 0 ? void 0 : rest.modules : [Pagination], speed: (_b = rest === null || rest === void 0 ? void 0 : rest.speed) !== null && _b !== void 0 ? _b : 400, spaceBetween: (_c = rest === null || rest === void 0 ? void 0 : rest.spaceBetween) !== null && _c !== void 0 ? _c : 0, slidesPerView: (_d = rest === null || rest === void 0 ? void 0 : rest.slidesPerView) !== null && _d !== void 0 ? _d : 1, draggable: (_e = rest === null || rest === void 0 ? void 0 : rest.draggable) !== null && _e !== void 0 ? _e : true, pagination: __assign({ clickable: true }, (typeof (rest === null || rest === void 0 ? void 0 : rest.pagination) === 'object' ? rest.pagination : {})), className: classNames('images', styles.images, rest === null || rest === void 0 ? void 0 : rest.className) }),
|
|
42
|
-
Children.map(rest === null || rest === void 0 ? void 0 : rest.children, function (child, index) {
|
|
43
|
-
if (isValidElement(child) && child.type === ImagesImage) {
|
|
44
|
-
return (React.createElement(SwiperSlide, { key: index, className: classNames('images-slide') }, child));
|
|
45
|
-
}
|
|
46
|
-
return child;
|
|
47
|
-
}),
|
|
48
|
-
totalSlides.length > 1 && (React.createElement("div", { className: styles.areas }, totalSlides.map(function (_, index) { return (React.createElement("div", { key: index, className: styles.area, onMouseEnter: function () { return handleHoverNavigation(index); } })); })))));
|
|
49
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@layer mosuk-ui {
|
|
2
|
-
@layer index-22 {
|
|
3
|
-
.areas {
|
|
4
|
-
display: none;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@media (min-width: 769px) {
|
|
8
|
-
.areas {
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
z-index: 1;
|
|
13
|
-
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
|
|
21
|
-
.area {
|
|
22
|
-
width: 100%;
|
|
23
|
-
height: 100%;
|
|
24
|
-
|
|
25
|
-
pointer-events: auto;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import classNames from 'classnames';
|
|
24
|
-
import React from 'react';
|
|
25
|
-
import { Image } from '../../../component/components/component';
|
|
26
|
-
export function ImagesImage(_a) {
|
|
27
|
-
var rest = __rest(_a, []);
|
|
28
|
-
return (React.createElement(Image, __assign({}, rest, { className: classNames('images-image', rest === null || rest === void 0 ? void 0 : rest.className) }), rest === null || rest === void 0 ? void 0 : rest.children));
|
|
29
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Images as BaseImages } from './component';
|
|
2
|
-
import type { ImagesProps } from './component.interface';
|
|
3
|
-
import { ImagesImage } from './image/component';
|
|
4
|
-
import { ImagesImageProps } from './image/component.interface';
|
|
5
|
-
export declare const Images: typeof BaseImages & {
|
|
6
|
-
Image: typeof ImagesImage;
|
|
7
|
-
};
|
|
8
|
-
export declare namespace Images {
|
|
9
|
-
type Props = ImagesProps;
|
|
10
|
-
namespace Image {
|
|
11
|
-
type Props = ImagesImageProps;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ImagesSkeletonImageProps, ImagesSkeletonProps } from './component.interface';
|
|
3
|
-
export declare function ImagesSkeleton({ ...props }: ImagesSkeletonProps): React.JSX.Element;
|
|
4
|
-
export declare function ImagesSkeletonImage({ ...props }: ImagesSkeletonImageProps): React.JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { Image as ImageIcon } from 'lucide-react';
|
|
24
|
-
import React from 'react';
|
|
25
|
-
import styles from './component.module.css';
|
|
26
|
-
export function ImagesSkeleton(_a) {
|
|
27
|
-
var _b;
|
|
28
|
-
var props = __rest(_a, []);
|
|
29
|
-
return (React.createElement("div", __assign({}, props, { className: "mosuk-image-skeleton ".concat(styles.image, " ").concat((_b = props === null || props === void 0 ? void 0 : props.className) !== null && _b !== void 0 ? _b : '') }), props === null || props === void 0 ? void 0 : props.children));
|
|
30
|
-
}
|
|
31
|
-
export function ImagesSkeletonImage(_a) {
|
|
32
|
-
var _b;
|
|
33
|
-
var props = __rest(_a, []);
|
|
34
|
-
return React.createElement(ImageIcon, __assign({}, props, { ref: props === null || props === void 0 ? void 0 : props.ref, className: "".concat(styles.icon, " ").concat((_b = props === null || props === void 0 ? void 0 : props.className) !== null && _b !== void 0 ? _b : '') }));
|
|
35
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@layer mosuk-ui {
|
|
2
|
-
@layer index-22 {
|
|
3
|
-
.image {
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
position: relative;
|
|
6
|
-
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
|
|
11
|
-
aspect-ratio: 1/1;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: fit-content;
|
|
14
|
-
|
|
15
|
-
pointer-events: none;
|
|
16
|
-
|
|
17
|
-
animation: image-skeleton-animation 1s ease-in-out infinite;
|
|
18
|
-
|
|
19
|
-
svg {
|
|
20
|
-
width: 100%;
|
|
21
|
-
height: 100%;
|
|
22
|
-
|
|
23
|
-
color: var(--color-gray-300, oklch(0.872 0.01 258.338));
|
|
24
|
-
|
|
25
|
-
padding: 25%;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:not(:hover) {
|
|
29
|
-
transition: all 0.6s ease-in-out;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@keyframes image-skeleton-animation {
|
|
35
|
-
0% {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
50% {
|
|
40
|
-
opacity: 0.8;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
100% {
|
|
44
|
-
opacity: 1;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ImagesSkeletonImage as BaseImagesSkeletonImage } from './component';
|
|
2
|
-
import type { ImagesSkeletonImageProps, ImagesSkeletonProps } from './component.interface';
|
|
3
|
-
export declare function ImagesSkeleton(props: ImagesSkeletonProps): import("react").JSX.Element;
|
|
4
|
-
export declare namespace ImagesSkeleton {
|
|
5
|
-
var Image: typeof BaseImagesSkeletonImage;
|
|
6
|
-
}
|
|
7
|
-
export declare namespace ImagesSkeleton {
|
|
8
|
-
type Props = ImagesSkeletonProps;
|
|
9
|
-
const Image: typeof BaseImagesSkeletonImage;
|
|
10
|
-
namespace Image {
|
|
11
|
-
type Props = ImagesSkeletonImageProps;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ImagesSkeleton as BaseImagesSkeleton, ImagesSkeletonImage as BaseImagesSkeletonImage, } from './component';
|
|
2
|
-
export function ImagesSkeleton(props) {
|
|
3
|
-
return BaseImagesSkeleton(props);
|
|
4
|
-
}
|
|
5
|
-
ImagesSkeleton.Image = BaseImagesSkeletonImage;
|
|
6
|
-
(function (ImagesSkeleton) {
|
|
7
|
-
})(ImagesSkeleton || (ImagesSkeleton = {}));
|