@stfrigerio/sito-template 0.1.30 → 0.1.31
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/components/atoms/LoadingSpinner/LoadingSpinner.d.ts +84 -0
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts +23 -0
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts.map +1 -0
- package/dist/components/atoms/LoadingSpinner/index.d.ts +3 -0
- package/dist/components/atoms/LoadingSpinner/index.d.ts.map +1 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map +1 -1
- package/dist/index.esm.js +275 -103
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +275 -102
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the LoadingSpinner component
|
|
4
|
+
* @interface LoadingSpinnerProps
|
|
5
|
+
*/
|
|
6
|
+
export interface LoadingSpinnerProps {
|
|
7
|
+
/** Static message to display. If not provided, will cycle through default messages */
|
|
8
|
+
message?: string;
|
|
9
|
+
/** Size variant of the loading spinner */
|
|
10
|
+
size?: 'small' | 'medium' | 'large';
|
|
11
|
+
/** Visual style variant of the loading spinner */
|
|
12
|
+
variant?: 'dots' | 'spinner' | 'pulse';
|
|
13
|
+
/** Additional CSS class names to apply */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Whether to show the text message below the spinner */
|
|
16
|
+
showMessage?: boolean;
|
|
17
|
+
/** Custom array of messages to rotate through (only used when message is not provided) */
|
|
18
|
+
customMessages?: string[];
|
|
19
|
+
/** Interval in milliseconds for message rotation (default: 2500ms) */
|
|
20
|
+
messageRotationInterval?: number;
|
|
21
|
+
/** Whether to show decorative sparkle effects */
|
|
22
|
+
showSparkles?: boolean;
|
|
23
|
+
/** Whether to render as a full-screen overlay */
|
|
24
|
+
fullScreen?: boolean;
|
|
25
|
+
/** Whether to show a backdrop behind the spinner (only with fullScreen) */
|
|
26
|
+
overlay?: boolean;
|
|
27
|
+
/** Custom color for the spinner elements (CSS color value) */
|
|
28
|
+
color?: string;
|
|
29
|
+
/** Custom background color (CSS color value) */
|
|
30
|
+
backgroundColor?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* LoadingSpinner Component
|
|
34
|
+
*
|
|
35
|
+
* @component
|
|
36
|
+
* @description
|
|
37
|
+
* A highly customizable, animated loading spinner component built with Framer Motion.
|
|
38
|
+
* Supports multiple visual variants, sizes, custom messages, and advanced styling options.
|
|
39
|
+
* Perfect for indicating loading states across different contexts in your application.
|
|
40
|
+
*
|
|
41
|
+
* Features:
|
|
42
|
+
* - Multiple spinner variants (dots, spinner, pulse)
|
|
43
|
+
* - Three size options (small, medium, large)
|
|
44
|
+
* - Rotating or static messages
|
|
45
|
+
* - Customizable colors and styling
|
|
46
|
+
* - Full-screen overlay support
|
|
47
|
+
* - Decorative sparkle effects
|
|
48
|
+
* - Accessibility support (respects reduced motion preferences)
|
|
49
|
+
* - Theme-aware styling
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* // Basic usage
|
|
53
|
+
* <LoadingSpinner />
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* // With custom message and variant
|
|
57
|
+
* <LoadingSpinner
|
|
58
|
+
* variant="pulse"
|
|
59
|
+
* message="Saving your changes..."
|
|
60
|
+
* size="large"
|
|
61
|
+
* />
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* // Full-screen overlay
|
|
65
|
+
* <LoadingSpinner
|
|
66
|
+
* fullScreen
|
|
67
|
+
* overlay
|
|
68
|
+
* message="Loading application..."
|
|
69
|
+
* />
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* // Custom messages and styling
|
|
73
|
+
* <LoadingSpinner
|
|
74
|
+
* customMessages={['Processing...', 'Almost done...', 'Final touches...']}
|
|
75
|
+
* color="#ff6b6b"
|
|
76
|
+
* backgroundColor="#f8f9fa"
|
|
77
|
+
* showSparkles={false}
|
|
78
|
+
* />
|
|
79
|
+
*
|
|
80
|
+
* @param {LoadingSpinnerProps} props - The props for the LoadingSpinner component
|
|
81
|
+
* @returns {JSX.Element} The rendered LoadingSpinner component
|
|
82
|
+
*/
|
|
83
|
+
export declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
|
|
84
|
+
//# sourceMappingURL=LoadingSpinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,sEAAsE;IACtE,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4LxD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { LoadingSpinner } from './LoadingSpinner';
|
|
3
|
+
declare const meta: Meta<typeof LoadingSpinner>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithCustomMessage: Story;
|
|
8
|
+
export declare const SmallSize: Story;
|
|
9
|
+
export declare const LargeSize: Story;
|
|
10
|
+
export declare const CircleSpinner: Story;
|
|
11
|
+
export declare const PulseSpinner: Story;
|
|
12
|
+
export declare const SmallCircleSpinner: Story;
|
|
13
|
+
export declare const LargePulseSpinner: Story;
|
|
14
|
+
export declare const DataLoadingExample: Story;
|
|
15
|
+
export declare const SaveExample: Story;
|
|
16
|
+
export declare const UploadExample: Story;
|
|
17
|
+
export declare const CustomColors: Story;
|
|
18
|
+
export declare const NoMessage: Story;
|
|
19
|
+
export declare const NoSparkles: Story;
|
|
20
|
+
export declare const CustomMessages: Story;
|
|
21
|
+
export declare const FullScreenOverlay: Story;
|
|
22
|
+
export declare const MinimalSpinner: Story;
|
|
23
|
+
//# sourceMappingURL=LoadingSpinner.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EA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,6 @@ export { ToggleButton } from './ToggleButton';
|
|
|
22
22
|
export type { ToggleButtonProps } from './ToggleButton';
|
|
23
23
|
export { Slider } from './Slider';
|
|
24
24
|
export type { SliderProps, SliderLabel, SliderConfig } from './Slider';
|
|
25
|
+
export { LoadingSpinner } from './LoadingSpinner';
|
|
26
|
+
export type { LoadingSpinnerProps } from './LoadingSpinner';
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAGpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,Y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c,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGvE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantifiableHabitsChart.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAA;AAInE,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;AAOnE,UAAU,SAAS;IACf,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAA;CACvC;AAUD,UAAU,4BAA4B;IAClC,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,QAAQ,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;IAC9D,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACvC,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACvC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1E;AAcD,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"QuantifiableHabitsChart.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAA;AAInE,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;AAOnE,UAAU,SAAS;IACf,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAA;CACvC;AAUD,UAAU,4BAA4B;IAClC,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,QAAQ,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;IAC9D,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACvC,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACvC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1E;AAcD,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAid1E,CAAA"}
|