@solostylist/ui-kit 1.0.164 → 1.0.165

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 (34) hide show
  1. package/README.md +13 -13
  2. package/dist/main.d.ts +2 -0
  3. package/dist/main.js +75 -73
  4. package/dist/s-accordion/package.json +5 -5
  5. package/dist/s-action-overlay/package.json +5 -5
  6. package/dist/s-avatar/package.json +5 -5
  7. package/dist/s-blur-text/package.json +5 -5
  8. package/dist/s-breadcrumbs/package.json +5 -5
  9. package/dist/s-button/package.json +5 -5
  10. package/dist/s-carousel/package.json +4 -4
  11. package/dist/s-category-card/package.json +4 -4
  12. package/dist/s-chat-input/package.json +5 -5
  13. package/dist/s-chip/package.json +5 -5
  14. package/dist/s-comment-message/package.json +5 -5
  15. package/dist/s-image-comparison/package.json +5 -5
  16. package/dist/s-image-modal/package.json +5 -5
  17. package/dist/s-lazy-image/s-lazy-image.d.ts +1 -1
  18. package/dist/s-lazy-image/s-lazy-image.js +36 -35
  19. package/dist/s-radial-pulse-animate/package.json +5 -5
  20. package/dist/s-rating/package.json +5 -5
  21. package/dist/s-review/package.json +5 -5
  22. package/dist/s-scroll-reveal/package.json +5 -5
  23. package/dist/s-scroll-to-top/package.json +5 -5
  24. package/dist/s-tabs/package.json +3 -3
  25. package/dist/s-text-shimmer/package.json +4 -4
  26. package/dist/s-theme-demo/package.json +5 -5
  27. package/dist/s-theme-switch/package.json +4 -4
  28. package/dist/s-typewriter-text/package.json +5 -5
  29. package/dist/s-zoom-image/index.d.ts +2 -0
  30. package/dist/s-zoom-image/index.js +4 -0
  31. package/dist/s-zoom-image/package.json +5 -0
  32. package/dist/s-zoom-image/s-zoom-image.d.ts +64 -0
  33. package/dist/s-zoom-image/s-zoom-image.js +87 -0
  34. package/package.json +113 -113
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- ## Installation
2
-
3
- You can install it with npm:
4
-
5
- ```bash
6
- npm i @solostylist/ui-kit
7
- ```
8
-
9
- ## Usage
10
-
11
- ```javascript
12
- import { STextField } from '@solostylist/ui-kit';
13
- ```
1
+ ## Installation
2
+
3
+ You can install it with npm:
4
+
5
+ ```bash
6
+ npm i @solostylist/ui-kit
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```javascript
12
+ import { STextField } from '@solostylist/ui-kit';
13
+ ```
package/dist/main.d.ts CHANGED
@@ -111,6 +111,8 @@ export { default as SLazyImage } from './s-lazy-image/index';
111
111
  export type { SLazyImageProps } from './s-lazy-image/index';
112
112
  export { default as SImageComparison } from './s-image-comparison/index';
113
113
  export type { SImageComparisonProps } from './s-image-comparison/index';
114
+ export { default as SZoomImage } from './s-zoom-image/index';
115
+ export type { SZoomImageProps } from './s-zoom-image/index';
114
116
  export { default as SItemNotFound } from './s-item-not-found/index';
115
117
  export type { SItemNotFoundProps } from './s-item-not-found/index';
116
118
  export { default as SCategoryCard } from './s-category-card/index';
package/dist/main.js CHANGED
@@ -9,18 +9,18 @@ import { default as T } from "./s-carousel/s-carousel.js";
9
9
  import { default as P } from "./s-chat-input/s-chat-input.js";
10
10
  import { default as b } from "./s-chat-message/s-chat-message.js";
11
11
  import { default as y } from "./s-comment-message/s-comment-message.js";
12
- import { default as M } from "./s-text-editor/s-text-editor.js";
12
+ import { default as I } from "./s-text-editor/s-text-editor.js";
13
13
  import "./s-text-editor/s-text-editor-toolbar.js";
14
- import { default as I } from "./s-checkbox/s-checkbox.js";
14
+ import { default as h } from "./s-checkbox/s-checkbox.js";
15
15
  import { default as B } from "./s-chip/s-chip.js";
16
16
  import { default as w } from "./s-chips/s-chips.js";
17
17
  import { default as E } from "./s-data-table/s-data-table.js";
18
18
  import { DialogConfirmProvider as R, default as G, useDialogConfirm as N } from "./s-dialog-confirm/s-dialog-confirm.js";
19
- import { DialogMessageProvider as j, default as V, useDialogMessage as q } from "./s-dialog-message/s-dialog-message.js";
20
- import { default as J } from "./s-error/s-error.js";
21
- import { default as Q } from "./s-empty/s-empty.js";
22
- import { default as W } from "./s-flex-box/s-flex-box.js";
23
- import { default as Y } from "./s-two-pane-layout/s-two-pane-layout.js";
19
+ import { DialogMessageProvider as j, default as V, useDialogMessage as Z } from "./s-dialog-message/s-dialog-message.js";
20
+ import { default as H } from "./s-error/s-error.js";
21
+ import { default as K } from "./s-empty/s-empty.js";
22
+ import { default as U } from "./s-flex-box/s-flex-box.js";
23
+ import { default as X } from "./s-two-pane-layout/s-two-pane-layout.js";
24
24
  import { default as _ } from "./s-dialog/s-dialog.js";
25
25
  import { default as ee } from "./s-error-layout/s-error-layout.js";
26
26
  import { default as re } from "./s-file-dropzone/s-file-dropzone.js";
@@ -35,17 +35,17 @@ import { default as Te } from "./s-text-field/s-text-field.js";
35
35
  import { default as Pe } from "./s-pagination/s-pagination.js";
36
36
  import { default as be } from "./s-select/s-select.js";
37
37
  import { default as ye } from "./s-select-list/s-select-list.js";
38
- import { default as Me } from "./s-skeleton/s-skeleton.js";
39
- import { default as Ie } from "./s-tip/s-tip.js";
38
+ import { default as Ie } from "./s-skeleton/s-skeleton.js";
39
+ import { default as he } from "./s-tip/s-tip.js";
40
40
  import { default as Be } from "./s-text-truncation/s-text-truncation.js";
41
41
  import { default as we, SnackbarMessageProvider as Ae, useSnackbarMessage as Ee } from "./s-snackbar-message/s-snackbar-message.js";
42
42
  import { default as Re } from "./s-form/s-form.js";
43
43
  import { SStripeCVC as Ne, SStripeExpiry as Oe, SStripeNumber as je, StripeTextField as Ve } from "./s-stripe/s-stripe.js";
44
- import { default as He } from "./s-theme-provider/s-theme-provider.js";
45
- import { default as Ke } from "./s-theme-switch/s-theme-switch.js";
46
- import { default as Ue } from "./s-datetime-picker/s-datetime-picker.js";
47
- import { default as Xe } from "./s-date-picker/s-date-picker.js";
48
- import { default as Ze } from "./s-localization-provider/s-localization-provider.js";
44
+ import { default as qe } from "./s-theme-provider/s-theme-provider.js";
45
+ import { default as Je } from "./s-theme-switch/s-theme-switch.js";
46
+ import { default as Qe } from "./s-datetime-picker/s-datetime-picker.js";
47
+ import { default as We } from "./s-date-picker/s-date-picker.js";
48
+ import { default as Ye } from "./s-localization-provider/s-localization-provider.js";
49
49
  import { default as $e } from "./s-gradient-icon/s-gradient-icon.js";
50
50
  import { default as oo } from "./s-glow-button/s-glow-button.js";
51
51
  import { default as ao } from "./s-moving-border/s-moving-border.js";
@@ -56,32 +56,33 @@ import { MediaItem as So, default as xo } from "./s-gallery/s-gallery.js";
56
56
  import { default as no } from "./s-image-modal/s-image-modal.js";
57
57
  import { default as co } from "./s-lazy-image/s-lazy-image.js";
58
58
  import { default as Co } from "./s-image-comparison/s-image-comparison.js";
59
- import { default as vo } from "./s-item-not-found/s-item-not-found.js";
60
- import { default as Lo } from "./s-category-card/s-category-card.js";
61
- import { default as Do } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
62
- import { default as ho } from "./s-rating/s-rating.js";
63
- import { default as ko } from "./s-review/s-review.js";
64
- import { default as Fo } from "./s-tabs/s-tabs.js";
65
- import { default as Ao } from "./s-tabs/s-tab.js";
66
- import { default as zo } from "./s-tabs/s-tab-panel.js";
67
- import { default as Go } from "./s-text-shimmer/s-text-shimmer.js";
68
- import { default as Oo } from "./s-typewriter-text/s-typewriter-text.js";
69
- import { SLanguagePopover as Vo, default as qo, defaultLanguageOptions as Ho } from "./s-language-switcher/s-language-switcher.js";
70
- import { default as Ko } from "./s-scroll-to-top/s-scroll-to-top.js";
71
- import { useDialog as Uo } from "./hooks/use-dialog.js";
72
- import { usePopover as Xo } from "./hooks/use-popover.js";
59
+ import { default as vo } from "./s-zoom-image/s-zoom-image.js";
60
+ import { default as Lo } from "./s-item-not-found/s-item-not-found.js";
61
+ import { default as Do } from "./s-category-card/s-category-card.js";
62
+ import { default as Mo } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
63
+ import { default as ko } from "./s-rating/s-rating.js";
64
+ import { default as Fo } from "./s-review/s-review.js";
65
+ import { default as Ao } from "./s-tabs/s-tabs.js";
66
+ import { default as zo } from "./s-tabs/s-tab.js";
67
+ import { default as Go } from "./s-tabs/s-tab-panel.js";
68
+ import { default as Oo } from "./s-text-shimmer/s-text-shimmer.js";
69
+ import { default as Vo } from "./s-typewriter-text/s-typewriter-text.js";
70
+ import { SLanguagePopover as qo, default as Ho, defaultLanguageOptions as Jo } from "./s-language-switcher/s-language-switcher.js";
71
+ import { default as Qo } from "./s-scroll-to-top/s-scroll-to-top.js";
72
+ import { useDialog as Wo } from "./hooks/use-dialog.js";
73
+ import { usePopover as Yo } from "./hooks/use-popover.js";
73
74
  import "react";
74
- import { useScrollAnimation as Zo } from "./hooks/use-scroll-animation.js";
75
- import { useIsPassedPosition as $o } from "./hooks/use-is-passed-position.js";
76
- import { formatDatePosted as or } from "./utils/dayjs.js";
77
- import { bytesToSize as ar } from "./utils/bytes-to-size.js";
78
- import { LogLevel as fr, Logger as lr, createLogger as sr, logger as mr } from "./utils/logger.js";
79
- import { default as ur } from "dayjs";
75
+ import { useScrollAnimation as $o } from "./hooks/use-scroll-animation.js";
76
+ import { useIsPassedPosition as or } from "./hooks/use-is-passed-position.js";
77
+ import { formatDatePosted as ar } from "./utils/dayjs.js";
78
+ import { bytesToSize as fr } from "./utils/bytes-to-size.js";
79
+ import { LogLevel as sr, Logger as mr, createLogger as pr, logger as ur } from "./utils/logger.js";
80
+ import { default as dr } from "dayjs";
80
81
  export {
81
82
  R as DialogConfirmProvider,
82
83
  j as DialogMessageProvider,
83
- fr as LogLevel,
84
- lr as Logger,
84
+ sr as LogLevel,
85
+ mr as Logger,
85
86
  So as MediaItem,
86
87
  t as SAccordion,
87
88
  l as SActionOverlay,
@@ -91,26 +92,26 @@ export {
91
92
  i as SButton,
92
93
  g as SButtonLink,
93
94
  T as SCarousel,
94
- Lo as SCategoryCard,
95
+ Do as SCategoryCard,
95
96
  P as SChatInput,
96
97
  b as SChatMessage,
97
- I as SCheckbox,
98
+ h as SCheckbox,
98
99
  B as SChip,
99
100
  w as SChips,
100
101
  y as SCommentMessage,
101
102
  po as SCopyableText,
102
103
  E as SDataTable,
103
- Xe as SDatePicker,
104
- Ue as SDateTimePicker,
104
+ We as SDatePicker,
105
+ Qe as SDateTimePicker,
105
106
  _ as SDialog,
106
107
  G as SDialogConfirm,
107
108
  V as SDialogMessage,
108
- Q as SEmpty,
109
- J as SError,
109
+ K as SEmpty,
110
+ H as SError,
110
111
  ee as SErrorLayout,
111
112
  re as SFileDropzone,
112
113
  te as SFileIcon,
113
- W as SFlexBox,
114
+ U as SFlexBox,
114
115
  Re as SForm,
115
116
  xo as SGallery,
116
117
  oo as SGlowButton,
@@ -119,55 +120,56 @@ export {
119
120
  me as SIconButton,
120
121
  Co as SImageComparison,
121
122
  no as SImageModal,
122
- vo as SItemNotFound,
123
+ Lo as SItemNotFound,
123
124
  ue as SLabel,
124
- Vo as SLanguagePopover,
125
- qo as SLanguageSwitcher,
125
+ qo as SLanguagePopover,
126
+ Ho as SLanguageSwitcher,
126
127
  co as SLazyImage,
127
- Ze as SLocalizationProvider,
128
+ Ye as SLocalizationProvider,
128
129
  ao as SMovingBorder,
129
130
  de as SMultiSelect,
130
131
  ie as SNoSsr,
131
132
  ge as SOverlayScrollbar,
132
133
  Pe as SPagination,
133
- Do as SRadialPulseAnimate,
134
- ho as SRating,
135
- ko as SReview,
134
+ Mo as SRadialPulseAnimate,
135
+ ko as SRating,
136
+ Fo as SReview,
136
137
  fo as SScrollReveal,
137
- Ko as SScrollToTop,
138
+ Qo as SScrollToTop,
138
139
  be as SSelect,
139
140
  ye as SSelectList,
140
- Me as SSkeleton,
141
+ Ie as SSkeleton,
141
142
  we as SSnackbarMessage,
142
143
  so as SSpotlightCursor,
143
144
  Ne as SStripeCVC,
144
145
  Oe as SStripeExpiry,
145
146
  je as SStripeNumber,
146
- Ao as STab,
147
- zo as STabPanel,
148
- Fo as STabs,
149
- M as STextEditor,
147
+ zo as STab,
148
+ Go as STabPanel,
149
+ Ao as STabs,
150
+ I as STextEditor,
150
151
  Te as STextField,
151
- Go as STextShimmer,
152
+ Oo as STextShimmer,
152
153
  Be as STextTruncation,
153
- He as SThemeProvider,
154
- Ke as SThemeSwitch,
155
- Ie as STip,
156
- Y as STwoPaneLayout,
157
- Oo as STypewriterText,
154
+ qe as SThemeProvider,
155
+ Je as SThemeSwitch,
156
+ he as STip,
157
+ X as STwoPaneLayout,
158
+ Vo as STypewriterText,
159
+ vo as SZoomImage,
158
160
  Ae as SnackbarMessageProvider,
159
161
  Ve as StripeTextField,
160
- ar as bytesToSize,
161
- sr as createLogger,
162
- ur as dayjs,
163
- Ho as defaultLanguageOptions,
164
- or as formatDatePosted,
165
- mr as logger,
166
- Uo as useDialog,
162
+ fr as bytesToSize,
163
+ pr as createLogger,
164
+ dr as dayjs,
165
+ Jo as defaultLanguageOptions,
166
+ ar as formatDatePosted,
167
+ ur as logger,
168
+ Wo as useDialog,
167
169
  N as useDialogConfirm,
168
- q as useDialogMessage,
169
- $o as useIsPassedPosition,
170
- Xo as usePopover,
171
- Zo as useScrollAnimation,
170
+ Z as useDialogMessage,
171
+ or as useIsPassedPosition,
172
+ Yo as usePopover,
173
+ $o as useScrollAnimation,
172
174
  Ee as useSnackbarMessage
173
175
  };
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -71,5 +71,5 @@ export interface SLazyImageProps extends React.ImgHTMLAttributes<HTMLImageElemen
71
71
  * />
72
72
  * ```
73
73
  */
74
- declare const SLazyImage: ({ src, variant, height, width, style, minWidth, minHeight, ...props }: SLazyImageProps) => React.JSX.Element;
74
+ declare const SLazyImage: ({ src, variant, height, width, style, minWidth, minHeight, onLoad, ...props }: SLazyImageProps) => React.JSX.Element;
75
75
  export default SLazyImage;
@@ -1,65 +1,66 @@
1
- import { j as a } from "../jsx-runtime-OVHDjVDe.js";
2
- import { useId as i, useState as f } from "react";
3
- import { useTheme as j, Box as m, Skeleton as L } from "@mui/material";
4
- const I = ({
5
- src: n,
1
+ import { j as t } from "../jsx-runtime-OVHDjVDe.js";
2
+ import { useId as j, useState as b } from "react";
3
+ import { useTheme as k, Box as n, Skeleton as y } from "@mui/material";
4
+ const g = ({
5
+ src: c,
6
6
  variant: e = "rounded",
7
- height: o = "100%",
8
- width: s = "100%",
9
- style: r,
10
- minWidth: d = "auto",
11
- minHeight: t = "auto",
12
- ...c
7
+ height: s = "100%",
8
+ width: o = "100%",
9
+ style: u,
10
+ minWidth: a = "auto",
11
+ minHeight: m = "auto",
12
+ onLoad: r,
13
+ ...l
13
14
  }) => {
14
- const l = i(), p = j(), [u, x] = f(!1);
15
+ const p = j(), x = k(), [d, i] = b(!1);
15
16
  return (
16
17
  // Container box maintains consistent dimensions throughout the loading process
17
18
  // This prevents layout shifts and provides stable positioning for both skeleton and image
18
- /* @__PURE__ */ a.jsxs(m, { height: o, width: s, children: [
19
- !u && /* @__PURE__ */ a.jsx(
20
- L,
19
+ /* @__PURE__ */ t.jsxs(n, { height: s, width: o, children: [
20
+ !d && /* @__PURE__ */ t.jsx(
21
+ y,
21
22
  {
22
23
  variant: e,
23
- id: `image-skeleton-${l}`,
24
+ id: `image-skeleton-${p}`,
24
25
  animation: "wave",
25
26
  style: {
26
- height: o,
27
- width: s,
28
- minWidth: d,
29
- minHeight: t,
30
- ...r
27
+ height: s,
28
+ width: o,
29
+ minWidth: a,
30
+ minHeight: m,
31
+ ...u
31
32
  // User styles applied to skeleton for consistency
32
33
  }
33
34
  }
34
35
  ),
35
- /* @__PURE__ */ a.jsx(
36
- m,
36
+ /* @__PURE__ */ t.jsx(
37
+ n,
37
38
  {
38
39
  component: "img",
39
- src: n,
40
+ src: c,
40
41
  style: {
41
- height: o,
42
- width: s,
43
- minWidth: d,
44
- minHeight: t,
42
+ height: s,
43
+ width: o,
44
+ minWidth: a,
45
+ minHeight: m,
45
46
  // Performance optimization: display toggling instead of opacity transitions
46
47
  // This approach reduces GPU usage and improves rendering performance
47
- display: u ? "block" : "none",
48
+ display: d ? "block" : "none",
48
49
  // Theme-aware border radius calculation for consistent styling
49
50
  // Matches Material-UI skeleton variants with proper theme integration
50
- borderRadius: e === "circular" ? "50%" : e === "rounded" ? p.shape.borderRadius : "0px",
51
- ...r
51
+ borderRadius: e === "circular" ? "50%" : e === "rounded" ? x.shape.borderRadius : "0px",
52
+ ...u
52
53
  // User-provided styles override defaults
53
54
  },
54
- onLoad: () => {
55
- x(!0);
55
+ onLoad: (f) => {
56
+ i(!0), r == null || r(f);
56
57
  },
57
- ...c
58
+ ...l
58
59
  }
59
60
  )
60
61
  ] })
61
62
  );
62
63
  };
63
64
  export {
64
- I as default
65
+ g as default
65
66
  };
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "@solostylist/ui-kit/s-scroll-reveal",
3
- "main": "./index.ts",
4
- "module": "./index.ts",
5
- "types": "./index.ts"
1
+ {
2
+ "name": "@solostylist/ui-kit/s-scroll-reveal",
3
+ "main": "./index.ts",
4
+ "module": "./index.ts",
5
+ "types": "./index.ts"
6
6
  }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,4 +1,4 @@
1
- {
2
- "name": "s-tabs",
3
- "main": "./index.ts"
1
+ {
2
+ "name": "s-tabs",
3
+ "main": "./index.ts"
4
4
  }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "@solostylist/ui-kit/s-typewriter-text",
3
- "main": "./index.ts",
4
- "module": "./index.ts",
5
- "types": "./index.ts"
1
+ {
2
+ "name": "@solostylist/ui-kit/s-typewriter-text",
3
+ "main": "./index.ts",
4
+ "module": "./index.ts",
5
+ "types": "./index.ts"
6
6
  }
@@ -0,0 +1,2 @@
1
+ export { default } from './s-zoom-image';
2
+ export type { SZoomImageProps } from './s-zoom-image';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./s-zoom-image.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -0,0 +1,64 @@
1
+ import { default as React } from 'react';
2
+ import { BoxProps, SkeletonProps } from '@mui/material';
3
+ /**
4
+ * Props interface for SZoomImage component with advanced zoom capabilities
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.
8
+ */
9
+ export interface SZoomImageProps extends Omit<BoxProps, 'component'> {
10
+ /** Image source URL - the image to display and zoom */
11
+ src: string;
12
+ /** Alternative text for the image, for accessibility and screen readers */
13
+ alt: string;
14
+ /** The scale factor to apply on zoom - controls how much the image enlarges on hover */
15
+ zoomScale?: number;
16
+ /** The duration of the spring animation in seconds - affects zoom speed */
17
+ 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
+ */
23
+ borderRadius?: number | string;
24
+ /** Custom styles applied to the image element */
25
+ imgStyle?: React.CSSProperties;
26
+ /** Custom class name for the image element */
27
+ imgClassName?: string;
28
+ /** Skeleton variant while loading */
29
+ skeletonVariant?: SkeletonProps['variant'];
30
+ /** Image height - supports responsive units, useful for lazy loading skeleton */
31
+ height?: number | string;
32
+ /** Image width - supports responsive units, useful for lazy loading skeleton */
33
+ width?: number | string;
34
+ }
35
+ /**
36
+ * SZoomImage - An interactive image component with smooth zoom-on-hover functionality and built-in lazy loading.
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
62
+ */
63
+ declare const SZoomImage: React.ForwardRefExoticComponent<Omit<SZoomImageProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
64
+ export default SZoomImage;
@@ -0,0 +1,87 @@
1
+ import { j as n } from "../jsx-runtime-OVHDjVDe.js";
2
+ import H, { useState as N } from "react";
3
+ import { Box as r } from "@mui/material";
4
+ import { useMotionValue as m, useSpring as c, useTransform as T, motion as Z } from "framer-motion";
5
+ import _ from "../s-lazy-image/s-lazy-image.js";
6
+ const $ = H.forwardRef(
7
+ ({
8
+ src: d,
9
+ alt: u,
10
+ zoomScale: l = 1.2,
11
+ transitionDuration: f = 0.3,
12
+ borderRadius: g = 1.5,
13
+ imgStyle: h,
14
+ imgClassName: p,
15
+ skeletonVariant: v = "rounded",
16
+ height: M = "100%",
17
+ width: x = "100%",
18
+ sx: j,
19
+ ...y
20
+ }, L) => {
21
+ const [i, w] = N(!1), o = m(50), t = m(50), a = { damping: 20, stiffness: 150, mass: 0.5 }, R = c(o, a), S = c(t, a), b = T(
22
+ [R, S],
23
+ ([e, s]) => `${e}% ${s}%`
24
+ ), I = (e) => {
25
+ if (!i) return;
26
+ const { left: s, top: Y, width: B, height: C } = e.currentTarget.getBoundingClientRect();
27
+ o.set((e.clientX - s) / B * 100), t.set((e.clientY - Y) / C * 100);
28
+ }, X = () => {
29
+ o.set(50), t.set(50);
30
+ };
31
+ return /* @__PURE__ */ n.jsx(
32
+ r,
33
+ {
34
+ ref: L,
35
+ onMouseMove: I,
36
+ onMouseLeave: X,
37
+ sx: {
38
+ position: "relative",
39
+ width: "100%",
40
+ height: "auto",
41
+ overflow: "hidden",
42
+ borderRadius: g,
43
+ ...j
44
+ },
45
+ ...y,
46
+ children: /* @__PURE__ */ n.jsx(
47
+ r,
48
+ {
49
+ component: Z.div,
50
+ style: {
51
+ transformOrigin: b
52
+ },
53
+ animate: { scale: 1 },
54
+ whileHover: i ? { scale: l } : { scale: 1 },
55
+ transition: {
56
+ type: "spring",
57
+ duration: f,
58
+ bounce: 0
59
+ },
60
+ children: /* @__PURE__ */ n.jsx(
61
+ _,
62
+ {
63
+ src: d,
64
+ alt: u,
65
+ variant: v,
66
+ height: M,
67
+ width: x,
68
+ className: p,
69
+ style: {
70
+ objectFit: "cover",
71
+ display: "block",
72
+ borderRadius: "inherit",
73
+ ...h
74
+ },
75
+ onLoad: () => w(!0)
76
+ }
77
+ )
78
+ }
79
+ )
80
+ }
81
+ );
82
+ }
83
+ );
84
+ $.displayName = "SZoomImage";
85
+ export {
86
+ $ as default
87
+ };
package/package.json CHANGED
@@ -1,114 +1,114 @@
1
- {
2
- "name": "@solostylist/ui-kit",
3
- "publishConfig": {
4
- "registry": "https://registry.npmjs.org"
5
- },
6
- "version": "1.0.164",
7
- "description": "advanced ui kit for solostylist",
8
- "private": false,
9
- "type": "module",
10
- "main": "dist/main.js",
11
- "types": "dist/main.d.ts",
12
- "files": [
13
- "dist"
14
- ],
15
- "sideEffects": false,
16
- "scripts": {
17
- "dev": "vite",
18
- "build": "tsc --p ./tsconfig-build.json && vite build",
19
- "build:docs": "vite build --config vite.docs.config.ts",
20
- "build:lib": "tsc --p ./tsconfig-build.json && vite build",
21
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
22
- "lint:fix": "eslint --fix . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
23
- "preview": "vite preview",
24
- "app:publish": "npm run build:lib && npm publish --access public",
25
- "format:write": "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
26
- "format:check": "prettier --check \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
27
- "prepare": "husky"
28
- },
29
- "peerDependencies": {
30
- "@emotion/cache": "^11.14.0",
31
- "@emotion/react": "^11.14.0",
32
- "@emotion/styled": "^11.14.0",
33
- "@fontsource/outfit": "^5.2.6",
34
- "@mui/icons-material": "7.3.2",
35
- "@mui/lab": "7.0.0-beta.17",
36
- "@mui/material": "7.3.2",
37
- "@mui/utils": "7.3.2",
38
- "@mui/x-date-pickers": "8.12.0",
39
- "@stripe/react-stripe-js": "^3.7.0",
40
- "@stripe/stripe-js": "^7.3.1",
41
- "@tiptap/extension-link": "^2.11.9",
42
- "@tiptap/extension-placeholder": "^2.11.9",
43
- "@tiptap/react": "^2.11.9",
44
- "@tiptap/starter-kit": "^2.11.9",
45
- "dayjs": "^1.11.13",
46
- "emoji-picker-react": "^4.13.3",
47
- "framer-motion": "^12.23.3",
48
- "i18next": "^25.0.2",
49
- "i18next-http-backend": "^3.0.2",
50
- "react": "^19.1.0",
51
- "react-dom": "^19.1.0",
52
- "react-dropzone": "^14.3.8",
53
- "react-i18next": "^15.5.1",
54
- "react-router-dom": "^7.8.2",
55
- "react-slick": "^0.31.0",
56
- "slick-carousel": "^1.8.1",
57
- "uuid": "^11.1.0",
58
- "overlayscrollbars-react": "^0.5.6"
59
- },
60
- "devDependencies": {
61
- "@ianvs/prettier-plugin-sort-imports": "^4.4.2",
62
- "@types/node": "^22.15.30",
63
- "@types/react": "^19.1.6",
64
- "@types/react-dom": "^19.1.6",
65
- "@types/react-slick": "^0.23.13",
66
- "@types/uuid": "^10.0.0",
67
- "@typescript-eslint/eslint-plugin": "^8.33.1",
68
- "@typescript-eslint/parser": "^8.33.1",
69
- "@vitejs/plugin-react": "^4.5.1",
70
- "eslint": "^9.28.0",
71
- "eslint-plugin-react-hooks": "^5.2.0",
72
- "eslint-plugin-react-refresh": "^0.4.20",
73
- "glob": "^11.0.2",
74
- "husky": "^9.1.7",
75
- "lint-staged": "^16.1.0",
76
- "prettier": "^3.5.3",
77
- "react": "^19.1.0",
78
- "react-dom": "^19.1.0",
79
- "typescript": "^5.8.3",
80
- "vite": "^6.3.5",
81
- "vite-plugin-dts": "^4.5.4",
82
- "vite-plugin-lib-inject-css": "^2.2.2",
83
- "vite-plugin-static-copy": "^3.0.0"
84
- },
85
- "lint-staged": {
86
- "*.js": [
87
- "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
88
- "git add"
89
- ],
90
- "*.jsx": [
91
- "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
92
- "git add"
93
- ],
94
- "*.ts": [
95
- "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
96
- "git add"
97
- ],
98
- "*.tsx": [
99
- "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
100
- "git add"
101
- ]
102
- },
103
- "husky": {
104
- "hooks": {
105
- "pre-commit": "lint-staged"
106
- }
107
- },
108
- "directories": {
109
- "lib": "lib"
110
- },
111
- "keywords": [],
112
- "author": "Lê Đặng Trường Đạt",
113
- "license": "ISC"
1
+ {
2
+ "name": "@solostylist/ui-kit",
3
+ "publishConfig": {
4
+ "registry": "https://registry.npmjs.org"
5
+ },
6
+ "version": "1.0.165",
7
+ "description": "advanced ui kit for solostylist",
8
+ "private": false,
9
+ "type": "module",
10
+ "main": "dist/main.js",
11
+ "types": "dist/main.d.ts",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "sideEffects": false,
16
+ "scripts": {
17
+ "dev": "vite",
18
+ "build": "tsc --p ./tsconfig-build.json && vite build",
19
+ "build:docs": "vite build --config vite.docs.config.ts",
20
+ "build:lib": "tsc --p ./tsconfig-build.json && vite build",
21
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
22
+ "lint:fix": "eslint --fix . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
23
+ "preview": "vite preview",
24
+ "app:publish": "npm run build:lib && npm publish --access public",
25
+ "format:write": "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
26
+ "format:check": "prettier --check \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
27
+ "prepare": "husky"
28
+ },
29
+ "peerDependencies": {
30
+ "@emotion/cache": "^11.14.0",
31
+ "@emotion/react": "^11.14.0",
32
+ "@emotion/styled": "^11.14.0",
33
+ "@fontsource/outfit": "^5.2.6",
34
+ "@mui/icons-material": "7.3.2",
35
+ "@mui/lab": "7.0.0-beta.17",
36
+ "@mui/material": "7.3.2",
37
+ "@mui/utils": "7.3.2",
38
+ "@mui/x-date-pickers": "8.12.0",
39
+ "@stripe/react-stripe-js": "^3.7.0",
40
+ "@stripe/stripe-js": "^7.3.1",
41
+ "@tiptap/extension-link": "^2.11.9",
42
+ "@tiptap/extension-placeholder": "^2.11.9",
43
+ "@tiptap/react": "^2.11.9",
44
+ "@tiptap/starter-kit": "^2.11.9",
45
+ "dayjs": "^1.11.13",
46
+ "emoji-picker-react": "^4.13.3",
47
+ "framer-motion": "^12.23.3",
48
+ "i18next": "^25.0.2",
49
+ "i18next-http-backend": "^3.0.2",
50
+ "react": "^19.1.0",
51
+ "react-dom": "^19.1.0",
52
+ "react-dropzone": "^14.3.8",
53
+ "react-i18next": "^15.5.1",
54
+ "react-router-dom": "^7.8.2",
55
+ "react-slick": "^0.31.0",
56
+ "slick-carousel": "^1.8.1",
57
+ "uuid": "^11.1.0",
58
+ "overlayscrollbars-react": "^0.5.6"
59
+ },
60
+ "devDependencies": {
61
+ "@ianvs/prettier-plugin-sort-imports": "^4.4.2",
62
+ "@types/node": "^22.15.30",
63
+ "@types/react": "^19.1.6",
64
+ "@types/react-dom": "^19.1.6",
65
+ "@types/react-slick": "^0.23.13",
66
+ "@types/uuid": "^10.0.0",
67
+ "@typescript-eslint/eslint-plugin": "^8.33.1",
68
+ "@typescript-eslint/parser": "^8.33.1",
69
+ "@vitejs/plugin-react": "^4.5.1",
70
+ "eslint": "^9.28.0",
71
+ "eslint-plugin-react-hooks": "^5.2.0",
72
+ "eslint-plugin-react-refresh": "^0.4.20",
73
+ "glob": "^11.0.2",
74
+ "husky": "^9.1.7",
75
+ "lint-staged": "^16.1.0",
76
+ "prettier": "^3.5.3",
77
+ "react": "^19.1.0",
78
+ "react-dom": "^19.1.0",
79
+ "typescript": "^5.8.3",
80
+ "vite": "^6.3.5",
81
+ "vite-plugin-dts": "^4.5.4",
82
+ "vite-plugin-lib-inject-css": "^2.2.2",
83
+ "vite-plugin-static-copy": "^3.0.0"
84
+ },
85
+ "lint-staged": {
86
+ "*.js": [
87
+ "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
88
+ "git add"
89
+ ],
90
+ "*.jsx": [
91
+ "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
92
+ "git add"
93
+ ],
94
+ "*.ts": [
95
+ "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
96
+ "git add"
97
+ ],
98
+ "*.tsx": [
99
+ "prettier --write \"**/*.{js,jsx,mjs,ts,tsx,mdx}\" --cache",
100
+ "git add"
101
+ ]
102
+ },
103
+ "husky": {
104
+ "hooks": {
105
+ "pre-commit": "lint-staged"
106
+ }
107
+ },
108
+ "directories": {
109
+ "lib": "lib"
110
+ },
111
+ "keywords": [],
112
+ "author": "Lê Đặng Trường Đạt",
113
+ "license": "ISC"
114
114
  }