@solostylist/ui-kit 1.0.166 → 1.0.168
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/{Typography-B7LOtCzI.js → Typography-C8jwvSWe.js} +1 -1
- package/dist/main.d.ts +5 -3
- package/dist/main.js +182 -172
- package/dist/s-accordion/index.js +2 -2
- package/dist/s-accordion/s-accordion.d.ts +17 -1
- package/dist/s-accordion/s-accordion.js +252 -238
- package/dist/s-action-overlay/index.js +1 -1
- package/dist/s-action-overlay/s-action-overlay.d.ts +34 -1
- package/dist/s-action-overlay/s-action-overlay.js +67 -55
- package/dist/s-ai-tool-bar/index.d.ts +2 -0
- package/dist/s-ai-tool-bar/index.js +3 -2
- package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +43 -22
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +336 -255
- package/dist/s-autocomplete/index.js +2 -2
- package/dist/s-autocomplete/s-autocomplete.d.ts +13 -15
- package/dist/s-autocomplete/s-autocomplete.js +25 -17
- package/dist/s-avatar/index.js +2 -2
- package/dist/s-avatar/s-avatar.d.ts +16 -1
- package/dist/s-avatar/s-avatar.js +23 -10
- package/dist/s-blur-text/index.js +2 -2
- package/dist/s-blur-text/s-blur-text.d.ts +4 -13
- package/dist/s-blur-text/s-blur-text.js +57 -51
- package/dist/s-breadcrumbs/index.js +2 -2
- package/dist/s-breadcrumbs/s-breadcrumbs.d.ts +20 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.js +39 -30
- package/dist/s-button/index.js +2 -2
- package/dist/s-button/s-button.d.ts +7 -1
- package/dist/s-button/s-button.js +15 -5
- package/dist/s-button-link/index.js +2 -2
- package/dist/s-button-link/s-button-link.d.ts +12 -26
- package/dist/s-button-link/s-button-link.js +36 -26
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.d.ts +11 -1
- package/dist/s-carousel/s-carousel.js +233 -223
- package/dist/s-category-card/index.js +2 -2
- package/dist/s-category-card/s-category-card.d.ts +28 -1
- package/dist/s-category-card/s-category-card.js +77 -58
- package/dist/s-chat-input/index.js +2 -2
- package/dist/s-chat-input/s-chat-input.d.ts +12 -1
- package/dist/s-chat-input/s-chat-input.js +92 -82
- package/dist/s-chat-message/index.js +2 -2
- package/dist/s-chat-message/s-chat-message.d.ts +22 -1
- package/dist/s-chat-message/s-chat-message.js +144 -133
- package/dist/s-checkbox/index.js +2 -2
- package/dist/s-checkbox/s-checkbox.d.ts +2 -15
- package/dist/s-checkbox/s-checkbox.js +20 -10
- package/dist/s-chip/index.js +2 -2
- package/dist/s-chip/s-chip.d.ts +7 -1
- package/dist/s-chip/s-chip.js +15 -5
- package/dist/s-chips/index.js +2 -2
- package/dist/s-chips/s-chips.d.ts +5 -18
- package/dist/s-chips/s-chips.js +56 -41
- package/dist/s-comment-message/index.js +2 -2
- package/dist/s-comment-message/s-comment-message.d.ts +26 -1
- package/dist/s-comment-message/s-comment-message.js +95 -89
- package/dist/s-copyable-text/index.js +1 -1
- package/dist/s-copyable-text/s-copyable-text.d.ts +9 -36
- package/dist/s-copyable-text/s-copyable-text.js +31 -21
- package/dist/s-countdown/index.d.ts +3 -2
- package/dist/s-countdown/index.js +4 -3
- package/dist/s-countdown/s-count-box.d.ts +39 -0
- package/dist/s-countdown/s-count-box.js +112 -0
- package/dist/s-countdown/s-count-down.d.ts +6 -50
- package/dist/s-countdown/s-count-down.js +110 -175
- package/dist/s-data-table/index.js +2 -2
- package/dist/s-data-table/s-data-table.d.ts +9 -65
- package/dist/s-data-table/s-data-table.js +381 -371
- package/dist/s-date-picker/index.js +2 -2
- package/dist/s-date-picker/s-date-picker.d.ts +6 -17
- package/dist/s-date-picker/s-date-picker.js +124 -107
- package/dist/s-datetime-picker/index.js +2 -2
- package/dist/s-datetime-picker/s-datetime-picker.d.ts +5 -16
- package/dist/s-datetime-picker/s-datetime-picker.js +897 -887
- package/dist/s-dialog/index.js +2 -2
- package/dist/s-dialog/s-dialog.d.ts +3 -16
- package/dist/s-dialog/s-dialog.js +32 -23
- package/dist/s-dialog-confirm/index.js +3 -3
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +5 -13
- package/dist/s-dialog-confirm/s-dialog-confirm.js +55 -48
- package/dist/s-dialog-message/index.js +4 -4
- package/dist/s-dialog-message/s-dialog-message.d.ts +5 -15
- package/dist/s-dialog-message/s-dialog-message.js +45 -38
- package/dist/s-empty/index.js +2 -2
- package/dist/s-empty/s-empty.d.ts +5 -20
- package/dist/s-empty/s-empty.js +14 -4
- package/dist/s-error/index.js +2 -2
- package/dist/s-error/s-error.d.ts +5 -20
- package/dist/s-error/s-error.js +16 -6
- package/dist/s-error-layout/index.js +2 -2
- package/dist/s-error-layout/s-error-layout.d.ts +6 -1
- package/dist/s-error-layout/s-error-layout.js +60 -51
- package/dist/s-file-dropzone/index.js +2 -2
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +6 -51
- package/dist/s-file-dropzone/s-file-dropzone.js +64 -54
- package/dist/s-file-icon/index.js +2 -2
- package/dist/s-file-icon/s-file-icon.d.ts +5 -25
- package/dist/s-file-icon/s-file-icon.js +14 -8
- package/dist/s-flex-box/index.js +2 -2
- package/dist/s-flex-box/s-flex-box.d.ts +10 -1
- package/dist/s-flex-box/s-flex-box.js +14 -4
- package/dist/s-form/index.js +2 -2
- package/dist/s-form/s-form.d.ts +5 -14
- package/dist/s-form/s-form.js +19 -9
- package/dist/s-gallery/index.js +33 -3
- package/dist/s-gallery/s-gallery.d.ts +3 -36
- package/dist/s-gallery/s-gallery.js +108 -78
- package/dist/s-glow-button/s-glow-button.d.ts +6 -42
- package/dist/s-glow-button/s-glow-button.js +29 -47
- package/dist/s-gradient-icon/index.d.ts +1 -1
- package/dist/s-gradient-icon/index.js +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.d.ts +8 -68
- package/dist/s-gradient-icon/s-gradient-icon.js +54 -44
- package/dist/s-i18n-provider/index.js +1 -1
- package/dist/s-i18n-provider/s-i18n-provider.d.ts +5 -33
- package/dist/s-i18n-provider/s-i18n-provider.js +25 -15
- package/dist/s-icon-button/index.js +2 -2
- package/dist/s-icon-button/s-icon-button.d.ts +6 -19
- package/dist/s-icon-button/s-icon-button.js +14 -4
- package/dist/s-image-comparison/s-image-comparison.js +50 -45
- package/dist/s-image-modal/index.js +3 -3
- package/dist/s-image-modal/s-image-modal.d.ts +4 -20
- package/dist/s-image-modal/s-image-modal.js +150 -135
- package/dist/s-item-not-found/index.js +2 -2
- package/dist/s-item-not-found/s-item-not-found.d.ts +14 -1
- package/dist/s-item-not-found/s-item-not-found.js +21 -10
- package/dist/s-label/index.js +2 -2
- package/dist/s-label/s-label.d.ts +9 -25
- package/dist/s-label/s-label.js +19 -9
- package/dist/s-language-switcher/index.js +3 -3
- package/dist/s-language-switcher/s-language-switcher.d.ts +20 -33
- package/dist/s-language-switcher/s-language-switcher.js +137 -115
- package/dist/s-lazy-image/index.js +10 -2
- package/dist/s-lazy-image/s-lazy-image.d.ts +12 -58
- package/dist/s-lazy-image/s-lazy-image.js +53 -58
- package/dist/s-localization-provider/index.js +2 -2
- package/dist/s-localization-provider/s-localization-provider.d.ts +6 -27
- package/dist/s-localization-provider/s-localization-provider.js +157 -149
- package/dist/s-moving-border/index.js +2 -2
- package/dist/s-moving-border/s-moving-border.d.ts +3 -33
- package/dist/s-moving-border/s-moving-border.js +65 -55
- package/dist/s-multi-select/index.js +2 -2
- package/dist/s-multi-select/s-multi-select.d.ts +5 -15
- package/dist/s-multi-select/s-multi-select.js +54 -45
- package/dist/s-no-ssr/index.js +2 -2
- package/dist/s-no-ssr/s-no-ssr.d.ts +5 -33
- package/dist/s-no-ssr/s-no-ssr.js +21 -11
- package/dist/s-overlay-scrollbar/index.js +2 -2
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.d.ts +10 -1
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +16 -11
- package/dist/s-pagination/index.js +2 -2
- package/dist/s-pagination/s-pagination.d.ts +5 -23
- package/dist/s-pagination/s-pagination.js +17 -11
- package/dist/s-pixel-reveal/index.d.ts +2 -0
- package/dist/s-pixel-reveal/index.js +4 -0
- package/dist/s-pixel-reveal/package.json +5 -0
- package/dist/s-pixel-reveal/s-pixel-reveal.d.ts +27 -0
- package/dist/s-pixel-reveal/s-pixel-reveal.js +156 -0
- package/dist/s-radial-pulse-animate/index.js +2 -2
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.d.ts +12 -1
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +52 -42
- package/dist/s-rating/index.js +2 -2
- package/dist/s-rating/s-rating.d.ts +7 -1
- package/dist/s-rating/s-rating.js +15 -5
- package/dist/s-review/index.js +2 -2
- package/dist/s-review/s-review.d.ts +25 -1
- package/dist/s-review/s-review.js +104 -97
- package/dist/s-scroll-reveal/index.js +2 -2
- package/dist/s-scroll-reveal/s-scroll-reveal.d.ts +17 -36
- package/dist/s-scroll-reveal/s-scroll-reveal.js +43 -33
- package/dist/s-scroll-to-top/index.js +2 -2
- package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +12 -17
- package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -15
- package/dist/s-select/index.js +2 -2
- package/dist/s-select/s-select.d.ts +3 -22
- package/dist/s-select/s-select.js +76 -72
- package/dist/s-select-list/index.js +2 -2
- package/dist/s-select-list/s-select-list.d.ts +16 -19
- package/dist/s-select-list/s-select-list.js +33 -28
- package/dist/s-skeleton/index.js +2 -2
- package/dist/s-skeleton/s-skeleton.d.ts +6 -22
- package/dist/s-skeleton/s-skeleton.js +28 -18
- package/dist/s-snackbar-message/index.js +4 -4
- package/dist/s-snackbar-message/s-snackbar-message.d.ts +5 -23
- package/dist/s-snackbar-message/s-snackbar-message.js +38 -31
- package/dist/s-spotlight-cursor/index.js +2 -2
- package/dist/s-spotlight-cursor/s-spotlight-cursor.d.ts +10 -44
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +35 -29
- package/dist/s-stripe/index.d.ts +4 -1
- package/dist/s-stripe/index.js +7 -4
- package/dist/s-stripe/s-stripe-cvc.d.ts +8 -0
- package/dist/s-stripe/s-stripe-cvc.js +15 -0
- package/dist/s-stripe/s-stripe-expiry.d.ts +8 -0
- package/dist/s-stripe/s-stripe-expiry.js +15 -0
- package/dist/s-stripe/s-stripe-number.d.ts +8 -0
- package/dist/s-stripe/s-stripe-number.js +15 -0
- package/dist/s-stripe/s-stripe.d.ts +6 -85
- package/dist/s-stripe/s-stripe.js +24 -27
- package/dist/s-stripe/stripe-input.js +22 -18
- package/dist/s-tabs/index.js +6 -6
- package/dist/s-tabs/s-tab-panel.d.ts +11 -1
- package/dist/s-tabs/s-tab-panel.js +25 -16
- package/dist/s-tabs/s-tab.js +9 -5
- package/dist/s-tabs/s-tabs.d.ts +24 -3
- package/dist/s-tabs/s-tabs.js +34 -25
- package/dist/s-text-editor/index.js +3 -3
- package/dist/s-text-editor/s-text-editor-toolbar.js +91 -76
- package/dist/s-text-editor/s-text-editor.d.ts +13 -11
- package/dist/s-text-editor/s-text-editor.js +44 -30
- package/dist/s-text-field/index.js +2 -2
- package/dist/s-text-field/s-text-field.d.ts +6 -15
- package/dist/s-text-field/s-text-field.js +38 -28
- package/dist/s-text-shimmer/index.js +2 -2
- package/dist/s-text-shimmer/s-text-shimmer.d.ts +10 -1
- package/dist/s-text-shimmer/s-text-shimmer.js +27 -18
- package/dist/s-text-truncation/index.js +2 -2
- package/dist/s-text-truncation/s-text-truncation.d.ts +9 -38
- package/dist/s-text-truncation/s-text-truncation.js +34 -20
- package/dist/s-theme-demo/s-theme-demo.js +238 -223
- package/dist/s-theme-provider/index.js +1 -1
- package/dist/s-theme-provider/s-theme-provider.d.ts +5 -17
- package/dist/s-theme-provider/s-theme-provider.js +44 -34
- package/dist/s-theme-switch/s-theme-switch.js +23 -19
- package/dist/s-tip/index.js +2 -2
- package/dist/s-tip/s-tip.d.ts +5 -22
- package/dist/s-tip/s-tip.js +22 -12
- package/dist/s-two-pane-layout/index.js +10 -2
- package/dist/s-two-pane-layout/s-two-pane-layout.d.ts +7 -1
- package/dist/s-two-pane-layout/s-two-pane-layout.js +58 -48
- package/dist/s-typewriter-text/index.js +2 -2
- package/dist/s-typewriter-text/s-typewriter-text.d.ts +17 -1
- package/dist/s-typewriter-text/s-typewriter-text.js +37 -27
- package/dist/s-zoom-image/index.js +10 -2
- package/dist/s-zoom-image/s-zoom-image.d.ts +10 -42
- package/dist/s-zoom-image/s-zoom-image.js +62 -52
- package/dist/theme/components/alert.d.ts +1440 -1440
- package/dist/theme/components/button.d.ts +2156 -2156
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/customizations/data-display.js +1 -1
- package/dist/{typographyClasses-C7fhAsUD.js → typographyClasses-DDyl9mok.js} +4 -4
- package/dist/{useMobilePicker-DgxcRrRB.js → useMobilePicker-C1RZZUWr.js} +1 -1
- package/package.json +10 -4
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SZoomImage as r } from "./s-zoom-image.js";
|
|
2
|
+
try {
|
|
3
|
+
szoomimage.displayName = "szoomimage", szoomimage.__docgenInfo = { description: "An interactive image component with smooth zoom-on-hover functionality and built-in lazy loading.", displayName: "szoomimage", props: { borderRadius: { defaultValue: { value: "1.5" }, description: "Border radius (number uses theme spacing, string accepts any CSS unit)", name: "borderRadius", required: !1, type: { name: "string | number" } }, width: { defaultValue: { value: "100%" }, description: "Image width for lazy loading skeleton", name: "width", required: !1, type: { name: "string | number" } }, height: { defaultValue: { value: "100%" }, description: "Image height for lazy loading skeleton", name: "height", required: !1, type: { name: "string | number" } }, transitionDuration: { defaultValue: { value: "0.3" }, description: "Duration of the spring animation in seconds", name: "transitionDuration", required: !1, type: { name: "number" } }, src: { defaultValue: null, description: "Image source URL", name: "src", required: !0, type: { name: "string" } }, alt: { defaultValue: null, description: "Alternative text for accessibility", name: "alt", required: !0, type: { name: "string" } }, zoomScale: { defaultValue: { value: "1.2" }, description: "Scale factor to apply on zoom", name: "zoomScale", required: !1, type: { name: "number" } }, imgStyle: { defaultValue: null, description: "Custom styles applied to the image element", name: "imgStyle", required: !1, type: { name: "CSSProperties" } }, imgClassName: { defaultValue: null, description: "Custom class name for the image element", name: "imgClassName", required: !1, type: { name: "string" } }, skeletonVariant: { defaultValue: { value: "rounded" }, description: "Skeleton variant while loading", name: "skeletonVariant", required: !1, type: { name: "enum", value: [{ value: '"text"' }, { value: '"rectangular"' }, { value: '"rounded"' }, { value: '"circular"' }] } } } };
|
|
4
|
+
} catch {
|
|
5
|
+
}
|
|
6
|
+
try {
|
|
7
|
+
SZoomImageProps.displayName = "SZoomImageProps", SZoomImageProps.__docgenInfo = { description: "Props interface for SZoomImage component", displayName: "SZoomImageProps", props: {} };
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
2
10
|
export {
|
|
3
|
-
|
|
11
|
+
r as default
|
|
4
12
|
};
|
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BoxProps, SkeletonProps } from '@mui/material';
|
|
3
3
|
/**
|
|
4
|
-
* Props interface for SZoomImage component
|
|
5
|
-
*
|
|
6
|
-
* Extends Material-UI Box props while providing configuration for zoom behavior,
|
|
7
|
-
* animation settings, transform origin tracking based on mouse position, and lazy loading.
|
|
4
|
+
* Props interface for SZoomImage component
|
|
8
5
|
*/
|
|
9
6
|
export interface SZoomImageProps extends Omit<BoxProps, 'component'> {
|
|
10
|
-
/** Image source URL
|
|
7
|
+
/** Image source URL */
|
|
11
8
|
src: string;
|
|
12
|
-
/** Alternative text for
|
|
9
|
+
/** Alternative text for accessibility */
|
|
13
10
|
alt: string;
|
|
14
|
-
/**
|
|
11
|
+
/** Scale factor to apply on zoom */
|
|
15
12
|
zoomScale?: number;
|
|
16
|
-
/**
|
|
13
|
+
/** Duration of the spring animation in seconds */
|
|
17
14
|
transitionDuration?: number;
|
|
18
|
-
/**
|
|
19
|
-
* The border radius of the component
|
|
20
|
-
* - number: multiplied by theme spacing (default 8px), e.g., 2 = 16px
|
|
21
|
-
* - string: any valid CSS unit ('1rem', '8px', '50%', etc.)
|
|
22
|
-
*/
|
|
15
|
+
/** Border radius (number uses theme spacing, string accepts any CSS unit) */
|
|
23
16
|
borderRadius?: number | string;
|
|
24
17
|
/** Custom styles applied to the image element */
|
|
25
18
|
imgStyle?: React.CSSProperties;
|
|
@@ -27,38 +20,13 @@ export interface SZoomImageProps extends Omit<BoxProps, 'component'> {
|
|
|
27
20
|
imgClassName?: string;
|
|
28
21
|
/** Skeleton variant while loading */
|
|
29
22
|
skeletonVariant?: SkeletonProps['variant'];
|
|
30
|
-
/** Image height
|
|
23
|
+
/** Image height for lazy loading skeleton */
|
|
31
24
|
height?: number | string;
|
|
32
|
-
/** Image width
|
|
25
|
+
/** Image width for lazy loading skeleton */
|
|
33
26
|
width?: number | string;
|
|
34
27
|
}
|
|
35
28
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* This component creates an engaging user experience by zooming the image on hover
|
|
39
|
-
* with the zoom origin following the mouse cursor position. Built with framer-motion
|
|
40
|
-
* for smooth, physics-based animations and proper Material-UI integration. Integrates
|
|
41
|
-
* with SLazyImage for skeleton loading states to improve perceived performance.
|
|
42
|
-
*
|
|
43
|
-
* Key features:
|
|
44
|
-
* - **Mouse-Tracked Zoom**: Zoom origin dynamically follows cursor position for natural interaction
|
|
45
|
-
* - **Spring Physics**: Smooth, natural animations using configurable spring physics
|
|
46
|
-
* - **Lazy Loading**: Built-in skeleton placeholder while image loads for better UX
|
|
47
|
-
* - **Theme Integration**: Full Material-UI Box component integration with sx prop support
|
|
48
|
-
* - **Responsive Design**: Works seamlessly across different viewport sizes
|
|
49
|
-
* - **Performance Optimized**: Uses GPU-accelerated transforms and efficient motion values
|
|
50
|
-
* - **Customizable Behavior**: Configurable zoom scale, animation duration, and border radius
|
|
51
|
-
* - **Accessibility Ready**: Maintains proper alt text and image semantics
|
|
52
|
-
*
|
|
53
|
-
* Technical implementation:
|
|
54
|
-
* - Uses framer-motion's useMotionValue for efficient mouse position tracking
|
|
55
|
-
* - Applies useSpring for smooth, natural transitions with configurable physics
|
|
56
|
-
* - Leverages useTransform to calculate dynamic transform-origin based on mouse position
|
|
57
|
-
* - Implements proper overflow handling to contain zoomed image within container
|
|
58
|
-
* - Integrates SLazyImage for optimized loading with skeleton placeholders
|
|
59
|
-
*
|
|
60
|
-
* @param props - SZoomImageProps configuration object
|
|
61
|
-
* @returns JSX.Element - Interactive zoom image component with hover effects
|
|
29
|
+
* An interactive image component with smooth zoom-on-hover functionality and built-in lazy loading.
|
|
62
30
|
*/
|
|
63
|
-
declare const SZoomImage: React.ForwardRefExoticComponent<Omit<SZoomImageProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export declare const SZoomImage: React.ForwardRefExoticComponent<Omit<SZoomImageProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
64
32
|
export default SZoomImage;
|
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { Box as
|
|
4
|
-
import { useMotionValue as m, useSpring as
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { j as r } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import L, { useState as j } from "react";
|
|
3
|
+
import { Box as u } from "@mui/material";
|
|
4
|
+
import { useMotionValue as m, useSpring as d, useTransform as D, motion as A } from "framer-motion";
|
|
5
|
+
import "../s-lazy-image/index.js";
|
|
6
|
+
import B from "../s-lazy-image/s-lazy-image.js";
|
|
7
|
+
const o = L.forwardRef(
|
|
7
8
|
({
|
|
8
|
-
src:
|
|
9
|
-
alt:
|
|
10
|
-
zoomScale:
|
|
11
|
-
transitionDuration:
|
|
12
|
-
borderRadius:
|
|
13
|
-
imgStyle:
|
|
14
|
-
imgClassName:
|
|
9
|
+
src: a,
|
|
10
|
+
alt: c,
|
|
11
|
+
zoomScale: p = 1.2,
|
|
12
|
+
transitionDuration: g = 0.3,
|
|
13
|
+
borderRadius: f = 1.5,
|
|
14
|
+
imgStyle: y,
|
|
15
|
+
imgClassName: h,
|
|
15
16
|
skeletonVariant: v = "rounded",
|
|
16
|
-
height:
|
|
17
|
-
width:
|
|
18
|
-
sx:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const [
|
|
22
|
-
[
|
|
23
|
-
([e,
|
|
24
|
-
),
|
|
25
|
-
if (!
|
|
26
|
-
const { left:
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
17
|
+
height: S = "100%",
|
|
18
|
+
width: V = "100%",
|
|
19
|
+
sx: b,
|
|
20
|
+
...q
|
|
21
|
+
}, z) => {
|
|
22
|
+
const [l, _] = j(!1), t = m(50), n = m(50), s = { damping: 20, stiffness: 150, mass: 0.5 }, w = d(t, s), C = d(n, s), I = D(
|
|
23
|
+
[w, C],
|
|
24
|
+
([e, i]) => `${e}% ${i}%`
|
|
25
|
+
), x = (e) => {
|
|
26
|
+
if (!l) return;
|
|
27
|
+
const { left: i, top: R, width: N, height: M } = e.currentTarget.getBoundingClientRect();
|
|
28
|
+
t.set((e.clientX - i) / N * 100), n.set((e.clientY - R) / M * 100);
|
|
29
|
+
}, k = () => {
|
|
30
|
+
t.set(50), n.set(50);
|
|
30
31
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
32
|
+
return /* @__PURE__ */ r.jsx(
|
|
33
|
+
u,
|
|
33
34
|
{
|
|
34
|
-
ref:
|
|
35
|
-
onMouseMove:
|
|
36
|
-
onMouseLeave:
|
|
35
|
+
ref: z,
|
|
36
|
+
onMouseMove: x,
|
|
37
|
+
onMouseLeave: k,
|
|
37
38
|
sx: {
|
|
38
39
|
position: "relative",
|
|
39
40
|
width: "100%",
|
|
40
41
|
height: "auto",
|
|
41
42
|
overflow: "hidden",
|
|
42
|
-
borderRadius:
|
|
43
|
-
...
|
|
43
|
+
borderRadius: f,
|
|
44
|
+
...b
|
|
44
45
|
},
|
|
45
|
-
...
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
...q,
|
|
47
|
+
children: /* @__PURE__ */ r.jsx(
|
|
48
|
+
u,
|
|
48
49
|
{
|
|
49
|
-
component:
|
|
50
|
+
component: A.div,
|
|
50
51
|
style: {
|
|
51
|
-
transformOrigin:
|
|
52
|
+
transformOrigin: I
|
|
52
53
|
},
|
|
53
54
|
animate: { scale: 1 },
|
|
54
|
-
whileHover:
|
|
55
|
+
whileHover: l ? { scale: p } : { scale: 1 },
|
|
55
56
|
transition: {
|
|
56
57
|
type: "spring",
|
|
57
|
-
duration:
|
|
58
|
+
duration: g,
|
|
58
59
|
bounce: 0
|
|
59
60
|
},
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
-
|
|
61
|
+
children: /* @__PURE__ */ r.jsx(
|
|
62
|
+
B,
|
|
62
63
|
{
|
|
63
|
-
src:
|
|
64
|
-
alt:
|
|
64
|
+
src: a,
|
|
65
|
+
alt: c,
|
|
65
66
|
variant: v,
|
|
66
|
-
height:
|
|
67
|
-
width:
|
|
68
|
-
className:
|
|
67
|
+
height: S,
|
|
68
|
+
width: V,
|
|
69
|
+
className: h,
|
|
69
70
|
style: {
|
|
70
71
|
objectFit: "cover",
|
|
71
72
|
display: "block",
|
|
72
73
|
borderRadius: "inherit",
|
|
73
|
-
...
|
|
74
|
+
...y
|
|
74
75
|
},
|
|
75
|
-
onLoad: () =>
|
|
76
|
+
onLoad: () => _(!0)
|
|
76
77
|
}
|
|
77
78
|
)
|
|
78
79
|
}
|
|
@@ -81,7 +82,16 @@ const $ = H.forwardRef(
|
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
84
|
);
|
|
84
|
-
|
|
85
|
+
o.displayName = "SZoomImage";
|
|
86
|
+
try {
|
|
87
|
+
o.displayName = "SZoomImage", o.__docgenInfo = { description: "An interactive image component with smooth zoom-on-hover functionality and built-in lazy loading.", displayName: "SZoomImage", props: { borderRadius: { defaultValue: { value: "1.5" }, description: "Border radius (number uses theme spacing, string accepts any CSS unit)", name: "borderRadius", required: !1, type: { name: "string | number" } }, width: { defaultValue: { value: "100%" }, description: "Image width for lazy loading skeleton", name: "width", required: !1, type: { name: "string | number" } }, height: { defaultValue: { value: "100%" }, description: "Image height for lazy loading skeleton", name: "height", required: !1, type: { name: "string | number" } }, transitionDuration: { defaultValue: { value: "0.3" }, description: "Duration of the spring animation in seconds", name: "transitionDuration", required: !1, type: { name: "number" } }, src: { defaultValue: null, description: "Image source URL", name: "src", required: !0, type: { name: "string" } }, alt: { defaultValue: null, description: "Alternative text for accessibility", name: "alt", required: !0, type: { name: "string" } }, zoomScale: { defaultValue: { value: "1.2" }, description: "Scale factor to apply on zoom", name: "zoomScale", required: !1, type: { name: "number" } }, imgStyle: { defaultValue: null, description: "Custom styles applied to the image element", name: "imgStyle", required: !1, type: { name: "CSSProperties" } }, imgClassName: { defaultValue: null, description: "Custom class name for the image element", name: "imgClassName", required: !1, type: { name: "string" } }, skeletonVariant: { defaultValue: { value: "rounded" }, description: "Skeleton variant while loading", name: "skeletonVariant", required: !1, type: { name: "enum", value: [{ value: '"text"' }, { value: '"rectangular"' }, { value: '"rounded"' }, { value: '"circular"' }] } } } };
|
|
88
|
+
} catch {
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
szoomimage.displayName = "szoomimage", szoomimage.__docgenInfo = { description: "An interactive image component with smooth zoom-on-hover functionality and built-in lazy loading.", displayName: "szoomimage", props: { borderRadius: { defaultValue: { value: "1.5" }, description: "Border radius (number uses theme spacing, string accepts any CSS unit)", name: "borderRadius", required: !1, type: { name: "string | number" } }, width: { defaultValue: { value: "100%" }, description: "Image width for lazy loading skeleton", name: "width", required: !1, type: { name: "string | number" } }, height: { defaultValue: { value: "100%" }, description: "Image height for lazy loading skeleton", name: "height", required: !1, type: { name: "string | number" } }, transitionDuration: { defaultValue: { value: "0.3" }, description: "Duration of the spring animation in seconds", name: "transitionDuration", required: !1, type: { name: "number" } }, src: { defaultValue: null, description: "Image source URL", name: "src", required: !0, type: { name: "string" } }, alt: { defaultValue: null, description: "Alternative text for accessibility", name: "alt", required: !0, type: { name: "string" } }, zoomScale: { defaultValue: { value: "1.2" }, description: "Scale factor to apply on zoom", name: "zoomScale", required: !1, type: { name: "number" } }, imgStyle: { defaultValue: null, description: "Custom styles applied to the image element", name: "imgStyle", required: !1, type: { name: "CSSProperties" } }, imgClassName: { defaultValue: null, description: "Custom class name for the image element", name: "imgClassName", required: !1, type: { name: "string" } }, skeletonVariant: { defaultValue: { value: "rounded" }, description: "Skeleton variant while loading", name: "skeletonVariant", required: !1, type: { name: "enum", value: [{ value: '"text"' }, { value: '"rectangular"' }, { value: '"rounded"' }, { value: '"circular"' }] } } } };
|
|
92
|
+
} catch {
|
|
93
|
+
}
|
|
85
94
|
export {
|
|
86
|
-
|
|
95
|
+
o as SZoomImage,
|
|
96
|
+
o as default
|
|
87
97
|
};
|