@solostylist/ui-kit 1.0.102 → 1.0.103

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/main.d.ts CHANGED
@@ -82,6 +82,8 @@ export { default as SGlowButton } from './s-glow-button/index';
82
82
  export type { SGlowButtonProps } from './s-glow-button/index';
83
83
  export { default as SMovingBorder } from './s-moving-border/index';
84
84
  export type { SMovingBorderProps } from './s-moving-border/index';
85
+ export { default as SSpotlightCursor } from './s-spotlight-cursor/index';
86
+ export type { SSpotlightCursorProps, SpotlightConfig } from './s-spotlight-cursor/index';
85
87
  export { default as SCopyableText } from './s-copyable-text/index';
86
88
  export type { SCopyableTextProps } from './s-copyable-text/index';
87
89
  export { default as SInteractiveGallery, MediaItem } from './s-interactive-gallery/index';
package/dist/main.js CHANGED
@@ -1,9 +1,9 @@
1
- import { default as a } from "./s-accordion/s-accordion.js";
1
+ import { default as t } from "./s-accordion/s-accordion.js";
2
2
  import { default as f } from "./s-autocomplete/s-autocomplete.js";
3
- import { default as m } from "./s-avatar/s-avatar.js";
3
+ import { default as s } from "./s-avatar/s-avatar.js";
4
4
  import { default as p } from "./s-button/s-button.js";
5
5
  import { default as S } from "./s-button-link/s-button-link.js";
6
- import { default as u } from "./s-carousel/s-carousel.js";
6
+ import { default as x } from "./s-carousel/s-carousel.js";
7
7
  import { default as n } from "./s-chat-input/s-chat-input.js";
8
8
  import { default as c } from "./s-chat-message/s-chat-message.js";
9
9
  import { default as C } from "./s-text-editor/s-text-editor.js";
@@ -11,7 +11,7 @@ import "./s-text-editor/s-text-editor-toolbar.js";
11
11
  import { default as v } from "./s-checkbox/s-checkbox.js";
12
12
  import { default as b } from "./s-chip/s-chip.js";
13
13
  import { default as I } from "./s-chips/s-chips.js";
14
- import { default as L } from "./s-data-table/s-data-table.js";
14
+ import { default as k } from "./s-data-table/s-data-table.js";
15
15
  import { DialogConfirmProvider as y, default as F, useDialogConfirm as B } from "./s-dialog-confirm/s-dialog-confirm.js";
16
16
  import { DialogMessageProvider as A, default as E, useDialogMessage as G } from "./s-dialog-message/s-dialog-message.js";
17
17
  import { default as w } from "./s-error/s-error.js";
@@ -24,17 +24,17 @@ import { default as X } from "./s-icon-button/s-icon-button.js";
24
24
  import { default as Z } from "./s-label/s-label.js";
25
25
  import { default as $ } from "./s-multi-select/s-multi-select.js";
26
26
  import { default as oe } from "./s-no-ssr/s-no-ssr.js";
27
- import { default as ae } from "./s-text-field/s-text-field.js";
27
+ import { default as te } from "./s-text-field/s-text-field.js";
28
28
  import { default as fe } from "./s-pagination/s-pagination.js";
29
- import { default as me } from "./s-select/s-select.js";
29
+ import { default as se } from "./s-select/s-select.js";
30
30
  import { default as pe } from "./s-skeleton/s-skeleton.js";
31
31
  import { default as Se } from "./s-tip/s-tip.js";
32
- import { default as ue } from "./s-text-truncation/s-text-truncation.js";
32
+ import { default as xe } from "./s-text-truncation/s-text-truncation.js";
33
33
  import { default as ne, SnackbarMessageProvider as ge, useSnackbarMessage as ce } from "./s-snackbar-message/s-snackbar-message.js";
34
34
  import { default as Ce } from "./s-form/s-form.js";
35
35
  import { SSmartTextField as ve } from "./s-smart-text-field/s-smart-text-field.js";
36
36
  import { SCopilotKitProvider as be } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
37
- import { SStripeCVC as Ie, SStripeExpiry as ke, SStripeNumber as Le, StripeTextField as he } from "./s-stripe/s-stripe.js";
37
+ import { SStripeCVC as Ie, SStripeExpiry as he, SStripeNumber as ke, StripeTextField as Le } from "./s-stripe/s-stripe.js";
38
38
  import { default as Fe } from "./s-theme-provider/s-theme-provider.js";
39
39
  import { default as ze } from "./s-datetime-picker/s-datetime-picker.js";
40
40
  import { default as Ee } from "./s-date-picker/s-date-picker.js";
@@ -42,44 +42,45 @@ import { default as Re } from "./s-localization-provider/s-localization-provider
42
42
  import { default as Ne } from "./s-gradient-icon/s-gradient-icon.js";
43
43
  import { default as Ke } from "./s-glow-button/s-glow-button.js";
44
44
  import { default as qe } from "./s-moving-border/s-moving-border.js";
45
- import { default as Je } from "./s-copyable-text/s-copyable-text.js";
46
- import { MediaItem as Qe, default as Ue } from "./s-interactive-gallery/s-interactive-gallery.js";
47
- import { default as Xe } from "./s-image-modal/s-image-modal.js";
48
- import { default as Ze } from "./s-lazy-image/s-lazy-image.js";
49
- import { default as $e } from "./s-image-comparison/s-image-comparison.js";
50
- import { default as oo } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
51
- import { default as ao } from "./s-rating/s-rating.js";
52
- import { default as fo } from "./s-review/s-review.js";
53
- import { default as mo } from "./s-tabs/s-tabs.js";
54
- import { default as po } from "./s-tabs/s-tab.js";
55
- import { default as xo } from "./s-tabs/s-tab-panel.js";
56
- import { default as io } from "./s-text-shimmer/s-text-shimmer.js";
57
- import { useDialog as go } from "./hooks/use-dialog.js";
58
- import { usePopover as To } from "./hooks/use-popover.js";
59
- import { formatDatePosted as Po } from "./utils/dayjs.js";
60
- import { bytesToSize as Do } from "./utils/bytes-to-size.js";
61
- import { LogLevel as Mo, Logger as Io, createLogger as ko, logger as Lo } from "./utils/logger.js";
62
- import { default as yo } from "dayjs";
45
+ import { default as Je } from "./s-spotlight-cursor/s-spotlight-cursor.js";
46
+ import { default as Qe } from "./s-copyable-text/s-copyable-text.js";
47
+ import { MediaItem as We, default as Xe } from "./s-interactive-gallery/s-interactive-gallery.js";
48
+ import { default as Ze } from "./s-image-modal/s-image-modal.js";
49
+ import { default as $e } from "./s-lazy-image/s-lazy-image.js";
50
+ import { default as oo } from "./s-image-comparison/s-image-comparison.js";
51
+ import { default as to } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
52
+ import { default as fo } from "./s-rating/s-rating.js";
53
+ import { default as so } from "./s-review/s-review.js";
54
+ import { default as po } from "./s-tabs/s-tabs.js";
55
+ import { default as uo } from "./s-tabs/s-tab.js";
56
+ import { default as io } from "./s-tabs/s-tab-panel.js";
57
+ import { default as go } from "./s-text-shimmer/s-text-shimmer.js";
58
+ import { useDialog as To } from "./hooks/use-dialog.js";
59
+ import { usePopover as Po } from "./hooks/use-popover.js";
60
+ import { formatDatePosted as Do } from "./utils/dayjs.js";
61
+ import { bytesToSize as Mo } from "./utils/bytes-to-size.js";
62
+ import { LogLevel as ho, Logger as ko, createLogger as Lo, logger as yo } from "./utils/logger.js";
63
+ import { default as Bo } from "dayjs";
63
64
  export {
64
65
  y as DialogConfirmProvider,
65
66
  A as DialogMessageProvider,
66
- Mo as LogLevel,
67
- Io as Logger,
68
- Qe as MediaItem,
69
- a as SAccordion,
67
+ ho as LogLevel,
68
+ ko as Logger,
69
+ We as MediaItem,
70
+ t as SAccordion,
70
71
  f as SAutocomplete,
71
- m as SAvatar,
72
+ s as SAvatar,
72
73
  p as SButton,
73
74
  S as SButtonLink,
74
- u as SCarousel,
75
+ x as SCarousel,
75
76
  n as SChatInput,
76
77
  c as SChatMessage,
77
78
  v as SCheckbox,
78
79
  b as SChip,
79
80
  I as SChips,
80
81
  be as SCopilotKitProvider,
81
- Je as SCopyableText,
82
- L as SDataTable,
82
+ Qe as SCopyableText,
83
+ k as SDataTable,
83
84
  Ee as SDatePicker,
84
85
  ze as SDateTimePicker,
85
86
  V as SDialog,
@@ -94,45 +95,46 @@ export {
94
95
  Ne as SGradientIcon,
95
96
  U as SI18nProvider,
96
97
  X as SIconButton,
97
- $e as SImageComparison,
98
- Xe as SImageModal,
99
- Ue as SInteractiveGallery,
98
+ oo as SImageComparison,
99
+ Ze as SImageModal,
100
+ Xe as SInteractiveGallery,
100
101
  Z as SLabel,
101
- Ze as SLazyImage,
102
+ $e as SLazyImage,
102
103
  Re as SLocalizationProvider,
103
104
  qe as SMovingBorder,
104
105
  $ as SMultiSelect,
105
106
  oe as SNoSsr,
106
107
  fe as SPagination,
107
- oo as SRadialPulseAnimate,
108
- ao as SRating,
109
- fo as SReview,
110
- me as SSelect,
108
+ to as SRadialPulseAnimate,
109
+ fo as SRating,
110
+ so as SReview,
111
+ se as SSelect,
111
112
  pe as SSkeleton,
112
113
  ve as SSmartTextField,
113
114
  ne as SSnackbarMessage,
115
+ Je as SSpotlightCursor,
114
116
  Ie as SStripeCVC,
115
- ke as SStripeExpiry,
116
- Le as SStripeNumber,
117
- po as STab,
118
- xo as STabPanel,
119
- mo as STabs,
117
+ he as SStripeExpiry,
118
+ ke as SStripeNumber,
119
+ uo as STab,
120
+ io as STabPanel,
121
+ po as STabs,
120
122
  C as STextEditor,
121
- ae as STextField,
122
- io as STextShimmer,
123
- ue as STextTruncation,
123
+ te as STextField,
124
+ go as STextShimmer,
125
+ xe as STextTruncation,
124
126
  Fe as SThemeProvider,
125
127
  Se as STip,
126
128
  ge as SnackbarMessageProvider,
127
- he as StripeTextField,
128
- Do as bytesToSize,
129
- ko as createLogger,
130
- yo as dayjs,
131
- Po as formatDatePosted,
132
- Lo as logger,
133
- go as useDialog,
129
+ Le as StripeTextField,
130
+ Mo as bytesToSize,
131
+ Lo as createLogger,
132
+ Bo as dayjs,
133
+ Do as formatDatePosted,
134
+ yo as logger,
135
+ To as useDialog,
134
136
  B as useDialogConfirm,
135
137
  G as useDialogMessage,
136
- To as usePopover,
138
+ Po as usePopover,
137
139
  ce as useSnackbarMessage
138
140
  };
@@ -0,0 +1,2 @@
1
+ export { default } from './s-spotlight-cursor';
2
+ export type { SSpotlightCursorProps, SpotlightConfig } from './s-spotlight-cursor';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./s-spotlight-cursor.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,63 @@
1
+ import { HTMLAttributes } from 'react';
2
+ /**
3
+ * Configuration interface for spotlight effect appearance and behavior
4
+ */
5
+ export interface SpotlightConfig {
6
+ /** Radius of the spotlight effect in pixels (recommended: 50-500) */
7
+ radius: number;
8
+ /** Brightness/opacity of the spotlight effect (range: 0-1, where 0 is invisible and 1 is fully opaque) */
9
+ brightness: number;
10
+ /** Color of the spotlight effect in hexadecimal format (e.g., '#ff0000', '#00ff00') */
11
+ color: string;
12
+ /** Smoothing factor for cursor movement - reserved for future implementation */
13
+ smoothing: number;
14
+ }
15
+ /**
16
+ * Props interface for the SSpotlightCursor component
17
+ */
18
+ export interface SSpotlightCursorProps extends HTMLAttributes<HTMLCanvasElement> {
19
+ /** Configuration object for spotlight appearance and behavior. If not provided, uses default blue spotlight */
20
+ config?: SpotlightConfig;
21
+ }
22
+ /**
23
+ * SSpotlightCursor - Creates an interactive spotlight effect that follows the mouse cursor
24
+ *
25
+ * This component renders a full-screen HTML5 canvas with a radial gradient spotlight that
26
+ * smoothly tracks the user's mouse movement. The spotlight effect is highly customizable
27
+ * and optimized for performance using requestAnimationFrame.
28
+ *
29
+ * Key features:
30
+ * - Mouse-following spotlight with smooth animation
31
+ * - Customizable radius, brightness, color, and smoothing
32
+ * - Performance-optimized with proper cleanup
33
+ * - Responsive design that adapts to window resizing
34
+ * - Non-interfering overlay (pointer-events: none)
35
+ * - Memory-safe event listener management
36
+ *
37
+ * Technical implementation:
38
+ * - Uses HTML5 Canvas with 2D context for rendering
39
+ * - Implements radial gradient for spotlight effect
40
+ * - Leverages requestAnimationFrame for 60fps animations
41
+ * - Automatically handles canvas sizing and viewport changes
42
+ * - Converts hex colors to RGB for gradient creation
43
+ *
44
+ * @param props - SSpotlightCursorProps containing configuration and styling options
45
+ * @returns JSX.Element - Fixed-positioned canvas element rendering the spotlight effect
46
+ *
47
+ * @example
48
+ * // Basic usage with default blue spotlight
49
+ * <SSpotlightCursor />
50
+ *
51
+ * @example
52
+ * // Custom orange spotlight with larger radius
53
+ * <SSpotlightCursor
54
+ * config={{
55
+ * radius: 300,
56
+ * brightness: 0.25,
57
+ * color: '#ff6b35',
58
+ * smoothing: 0.1
59
+ * }}
60
+ * />
61
+ */
62
+ declare const SSpotlightCursor: ({ config, className, ...props }: SSpotlightCursorProps) => import("react/jsx-runtime").JSX.Element;
63
+ export default SSpotlightCursor;
@@ -0,0 +1,59 @@
1
+ import { j as g } from "../jsx-runtime-DywqP_6a.js";
2
+ import { useRef as p, useEffect as x } from "react";
3
+ import { Box as E } from "@mui/material";
4
+ const b = (t) => {
5
+ const a = p(null);
6
+ return x(() => {
7
+ const e = a.current;
8
+ if (!e) return;
9
+ const o = e.getContext("2d");
10
+ if (!o) return;
11
+ let d, r = -1e3, s = -1e3;
12
+ const c = () => {
13
+ e.width = window.innerWidth, e.height = window.innerHeight;
14
+ }, l = (n) => {
15
+ r = n.clientX, s = n.clientY;
16
+ }, m = () => {
17
+ r = -1e3, s = -1e3;
18
+ }, h = (n) => {
19
+ const i = parseInt(n.slice(1), 16), w = i >> 16 & 255, v = i >> 8 & 255, f = i & 255;
20
+ return `${w},${v},${f}`;
21
+ }, u = () => {
22
+ if (o.clearRect(0, 0, e.width, e.height), r !== -1e3 && s !== -1e3) {
23
+ const n = o.createRadialGradient(r, s, 0, r, s, t.radius || 200), i = h(t.color);
24
+ n.addColorStop(0, `rgba(${i}, ${t.brightness})`), n.addColorStop(1, "rgba(0,0,0,0)"), o.fillStyle = n, o.fillRect(0, 0, e.width, e.height);
25
+ }
26
+ d = requestAnimationFrame(u);
27
+ };
28
+ return c(), window.addEventListener("resize", c), window.addEventListener("mousemove", l), window.addEventListener("mouseleave", m), d = requestAnimationFrame(u), () => {
29
+ window.removeEventListener("resize", c), window.removeEventListener("mousemove", l), window.removeEventListener("mouseleave", m), cancelAnimationFrame(d);
30
+ };
31
+ }, [t.radius, t.brightness, t.color]), a;
32
+ }, S = ({
33
+ config: t = { radius: 200, brightness: 0.15, color: "#0000ff", smoothing: 0.1 },
34
+ className: a,
35
+ ...e
36
+ }) => {
37
+ const o = b(t);
38
+ return /* @__PURE__ */ g.jsx(
39
+ E,
40
+ {
41
+ component: "canvas",
42
+ ref: o,
43
+ className: a,
44
+ sx: {
45
+ position: "fixed",
46
+ top: 0,
47
+ left: 0,
48
+ pointerEvents: "none",
49
+ zIndex: 9999,
50
+ width: "100%",
51
+ height: "100%"
52
+ },
53
+ ...e
54
+ }
55
+ );
56
+ };
57
+ export {
58
+ S as default
59
+ };
@@ -10,6 +10,10 @@ export declare const MuiAlert: {
10
10
  color: string;
11
11
  '& .MuiAlert-icon': {
12
12
  color: string;
13
+ alignSelf: string;
14
+ };
15
+ '& .MuiAlert-message': {
16
+ alignSelf: string;
13
17
  };
14
18
  backgroundColor: string;
15
19
  border: string;
@@ -22,6 +26,10 @@ export declare const MuiAlert: {
22
26
  color: string;
23
27
  '& .MuiAlert-icon': {
24
28
  color: string;
29
+ alignSelf: string;
30
+ };
31
+ '& .MuiAlert-message': {
32
+ alignSelf: string;
25
33
  };
26
34
  backgroundColor: string;
27
35
  border: string;
@@ -34,6 +42,10 @@ export declare const MuiAlert: {
34
42
  color: string;
35
43
  '& .MuiAlert-icon': {
36
44
  color: string;
45
+ alignSelf: string;
46
+ };
47
+ '& .MuiAlert-message': {
48
+ alignSelf: string;
37
49
  };
38
50
  backgroundColor: string;
39
51
  border: string;
@@ -46,6 +58,10 @@ export declare const MuiAlert: {
46
58
  color: string;
47
59
  '& .MuiAlert-icon': {
48
60
  color: string;
61
+ alignSelf: string;
62
+ };
63
+ '& .MuiAlert-message': {
64
+ alignSelf: string;
49
65
  };
50
66
  backgroundColor: string;
51
67
  border: string;
@@ -1,13 +1,17 @@
1
1
  import { alpha as s } from "@mui/material";
2
- import { green as o, red as i, orange as t, blue as p } from "../theme-primitives.js";
2
+ import { green as o, red as i, orange as t, blue as n } from "../theme-primitives.js";
3
3
  const e = (r) => ({
4
4
  color: r[50],
5
5
  "& .MuiAlert-icon": {
6
- color: r[500]
6
+ color: r[500],
7
+ alignSelf: "center"
7
8
  },
8
- backgroundColor: `${s(r[900], 0.5)}`,
9
- border: `1px solid ${s(r[800], 0.5)}`
10
- }), l = {
9
+ "& .MuiAlert-message": {
10
+ alignSelf: "center"
11
+ },
12
+ backgroundColor: `${s(r[900], 0.9)}`,
13
+ border: `1px solid ${s(r[800], 0.8)}`
14
+ }), y = {
11
15
  styleOverrides: {
12
16
  root: () => ({
13
17
  borderRadius: 10,
@@ -41,7 +45,7 @@ const e = (r) => ({
41
45
  severity: "info"
42
46
  },
43
47
  style: {
44
- ...e(p)
48
+ ...e(n)
45
49
  }
46
50
  }
47
51
  ]
@@ -49,5 +53,5 @@ const e = (r) => ({
49
53
  }
50
54
  };
51
55
  export {
52
- l as MuiAlert
56
+ y as MuiAlert
53
57
  };
@@ -6049,6 +6049,10 @@ export declare const components: {
6049
6049
  color: string;
6050
6050
  '& .MuiAlert-icon': {
6051
6051
  color: string;
6052
+ alignSelf: string;
6053
+ };
6054
+ '& .MuiAlert-message': {
6055
+ alignSelf: string;
6052
6056
  };
6053
6057
  backgroundColor: string;
6054
6058
  border: string;
@@ -6061,6 +6065,10 @@ export declare const components: {
6061
6065
  color: string;
6062
6066
  '& .MuiAlert-icon': {
6063
6067
  color: string;
6068
+ alignSelf: string;
6069
+ };
6070
+ '& .MuiAlert-message': {
6071
+ alignSelf: string;
6064
6072
  };
6065
6073
  backgroundColor: string;
6066
6074
  border: string;
@@ -6073,6 +6081,10 @@ export declare const components: {
6073
6081
  color: string;
6074
6082
  '& .MuiAlert-icon': {
6075
6083
  color: string;
6084
+ alignSelf: string;
6085
+ };
6086
+ '& .MuiAlert-message': {
6087
+ alignSelf: string;
6076
6088
  };
6077
6089
  backgroundColor: string;
6078
6090
  border: string;
@@ -6085,6 +6097,10 @@ export declare const components: {
6085
6097
  color: string;
6086
6098
  '& .MuiAlert-icon': {
6087
6099
  color: string;
6100
+ alignSelf: string;
6101
+ };
6102
+ '& .MuiAlert-message': {
6103
+ alignSelf: string;
6088
6104
  };
6089
6105
  backgroundColor: string;
6090
6106
  border: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org"
5
5
  },
6
- "version": "1.0.102",
6
+ "version": "1.0.103",
7
7
  "description": "advanced ui kit for solostylist",
8
8
  "private": false,
9
9
  "type": "module",