@donotdev/ui 0.0.28 → 0.0.30
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/crud/components/CrudCardLink.d.ts +3 -1
- package/dist/crud/components/CrudCardLink.d.ts.map +1 -1
- package/dist/crud/components/EntityCardList.d.ts +1 -1
- package/dist/crud/components/EntityCardList.d.ts.map +1 -1
- package/dist/crud/components/EntityCardList.js +3 -3
- package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
- package/dist/crud/components/EntityRecommendations.js +5 -1
- package/dist/data/techLogos.d.ts +1 -1
- package/dist/data/techLogos.d.ts.map +1 -1
- package/dist/data/techLogos.js +7 -0
- package/dist/dndev-next.css +13 -1
- package/dist/dndev.css +16 -1
- package/dist/index.js +4 -4
- package/dist/routing/Link.js +3 -3
- package/dist/styles/index.css +16 -1
- package/package.json +4 -4
- package/dist/components/common/AppLoading.d.ts +0 -14
- package/dist/components/common/AppLoading.d.ts.map +0 -1
- package/dist/components/common/AppLoading.js +0 -35
- package/dist/components/common/Loader.d.ts +0 -33
- package/dist/components/common/Loader.d.ts.map +0 -1
- package/dist/components/common/Loader.js +0 -81
- package/dist/components/common/LoadingMessage.d.ts +0 -114
- package/dist/components/common/LoadingMessage.d.ts.map +0 -1
- package/dist/components/common/LoadingMessage.js +0 -127
- package/dist/components/common/LoadingOverlay.d.ts +0 -112
- package/dist/components/common/LoadingOverlay.d.ts.map +0 -1
- package/dist/components/common/LoadingOverlay.js +0 -155
- package/dist/components/common/LoadingScreen.d.ts +0 -20
- package/dist/components/common/LoadingScreen.d.ts.map +0 -1
- package/dist/components/common/LoadingScreen.js +0 -45
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
// packages/ui/src/components/common/LoadingOverlay.tsx
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview LoadingOverlay component
|
|
6
|
-
* @description Full-screen loading overlay component
|
|
7
|
-
*
|
|
8
|
-
* @version 0.0.1
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { cn } from '@donotdev/components';
|
|
13
|
-
import LoadingMessage from './LoadingMessage';
|
|
14
|
-
/**
|
|
15
|
-
* LoadingOverlay - A full-screen or container overlay for loading states
|
|
16
|
-
*
|
|
17
|
-
* Features:
|
|
18
|
-
* - Configurable backdrop and blur effects
|
|
19
|
-
*
|
|
20
|
-
* @version 0.0.1
|
|
21
|
-
* @since 0.0.1
|
|
22
|
-
* @author AMBROISE PARK Consulting
|
|
23
|
-
*
|
|
24
|
-
* - Custom content support
|
|
25
|
-
* - Built-in loading message integration
|
|
26
|
-
* - Click prevention
|
|
27
|
-
* - Accessibility support
|
|
28
|
-
* - Smooth transitions
|
|
29
|
-
*/
|
|
30
|
-
const LoadingOverlay = ({ show = false, backdrop = true, backdropBlur = true, className, children, message, showSpinner = true, spinnerSize = 'lg', preventClicks = true, zIndex = 'var(--z-modal)', }) => {
|
|
31
|
-
if (!show)
|
|
32
|
-
return null;
|
|
33
|
-
// Map zIndex prop to utility class
|
|
34
|
-
const zIndexClass = zIndex === 'var(--z-modal)' || !zIndex
|
|
35
|
-
? 'dndev-z-modal'
|
|
36
|
-
: zIndex === 'var(--z-toast)'
|
|
37
|
-
? 'dndev-z-toast'
|
|
38
|
-
: zIndex === 'var(--z-tooltip)'
|
|
39
|
-
? 'dndev-z-tooltip'
|
|
40
|
-
: zIndex === 'var(--z-overlay)'
|
|
41
|
-
? 'dndev-z-overlay'
|
|
42
|
-
: null;
|
|
43
|
-
return (_jsx("div", { className: cn('dndev-loading-overlay', zIndexClass, className), style: {
|
|
44
|
-
position: 'fixed',
|
|
45
|
-
inset: 0,
|
|
46
|
-
display: 'flex',
|
|
47
|
-
alignItems: 'center',
|
|
48
|
-
justifyContent: 'center',
|
|
49
|
-
transition: 'opacity var(--dur-fast) ease-out',
|
|
50
|
-
backgroundColor: backdrop ? 'var(--background)' : 'transparent',
|
|
51
|
-
opacity: backdrop ? 'var(--opacity-muted)' : 1,
|
|
52
|
-
backdropFilter: backdropBlur ? 'blur(4px)' : 'none',
|
|
53
|
-
pointerEvents: preventClicks ? 'auto' : 'none',
|
|
54
|
-
...(zIndexClass ? {} : { zIndex }),
|
|
55
|
-
}, role: "dialog", "aria-modal": "true", "aria-busy": "true", "aria-label": "Loading overlay", children: _jsx("div", { className: "dndev-surface", style: {
|
|
56
|
-
display: 'grid',
|
|
57
|
-
placeItems: 'center',
|
|
58
|
-
gap: 'var(--gap-md)',
|
|
59
|
-
borderRadius: 'var(--radius-lg)',
|
|
60
|
-
padding: 'var(--gap-lg)',
|
|
61
|
-
backgroundColor: 'var(--background)',
|
|
62
|
-
opacity: 'var(--opacity-strong)',
|
|
63
|
-
border: '1px solid var(--border)',
|
|
64
|
-
boxShadow: 'var(--shadow-xl)',
|
|
65
|
-
maxWidth: 'var(--content-text)',
|
|
66
|
-
width: '100%',
|
|
67
|
-
margin: '0 var(--gap-md)',
|
|
68
|
-
}, children: children || (_jsxs(_Fragment, { children: [showSpinner && (_jsx("div", { style: {
|
|
69
|
-
animation: 'spin 1s linear infinite',
|
|
70
|
-
borderRadius: 'var(--radius-full)',
|
|
71
|
-
border: '2px solid var(--primary)',
|
|
72
|
-
borderTopColor: 'transparent',
|
|
73
|
-
width: spinnerSize === 'sm'
|
|
74
|
-
? '2rem'
|
|
75
|
-
: spinnerSize === 'md'
|
|
76
|
-
? '3rem'
|
|
77
|
-
: '4rem',
|
|
78
|
-
height: spinnerSize === 'sm'
|
|
79
|
-
? '2rem'
|
|
80
|
-
: spinnerSize === 'md'
|
|
81
|
-
? '3rem'
|
|
82
|
-
: '4rem',
|
|
83
|
-
}, role: "status", "aria-hidden": "true" })), message && _jsx(LoadingMessage, { ...message })] })) }) }));
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Simple loading overlay component
|
|
87
|
-
*
|
|
88
|
-
* @version 0.0.1
|
|
89
|
-
* @since 0.0.1
|
|
90
|
-
* @author AMBROISE PARK Consulting
|
|
91
|
-
*/
|
|
92
|
-
export const LoadingOverlaySimple = ({ message = 'Loading...', ...props }) => (_jsx(LoadingOverlay, { message: { message, showSpinner: true }, ...props }));
|
|
93
|
-
/**
|
|
94
|
-
* Processing loading overlay component
|
|
95
|
-
*
|
|
96
|
-
* @version 0.0.1
|
|
97
|
-
* @since 0.0.1
|
|
98
|
-
* @author AMBROISE PARK Consulting
|
|
99
|
-
*/
|
|
100
|
-
export const LoadingOverlayProcessing = ({ message = 'Processing your request...', ...props }) => (_jsx(LoadingOverlay, { message: {
|
|
101
|
-
state: 'processing',
|
|
102
|
-
message,
|
|
103
|
-
showSpinner: true,
|
|
104
|
-
}, ...props }));
|
|
105
|
-
/**
|
|
106
|
-
* Saving loading overlay component
|
|
107
|
-
*
|
|
108
|
-
* @version 0.0.1
|
|
109
|
-
* @since 0.0.1
|
|
110
|
-
* @author AMBROISE PARK Consulting
|
|
111
|
-
*/
|
|
112
|
-
export const LoadingOverlaySaving = ({ message = 'Saving your changes...', ...props }) => (_jsx(LoadingOverlay, { message: {
|
|
113
|
-
state: 'processing',
|
|
114
|
-
message,
|
|
115
|
-
showSpinner: true,
|
|
116
|
-
}, ...props }));
|
|
117
|
-
/**
|
|
118
|
-
* Uploading loading overlay component
|
|
119
|
-
*
|
|
120
|
-
* @version 0.0.1
|
|
121
|
-
* @since 0.0.1
|
|
122
|
-
* @author AMBROISE PARK Consulting
|
|
123
|
-
*/
|
|
124
|
-
export const LoadingOverlayUploading = ({ message, fileName, ...props }) => (_jsx(LoadingOverlay, { message: {
|
|
125
|
-
state: 'processing',
|
|
126
|
-
message: message ||
|
|
127
|
-
(fileName ? `Uploading ${fileName}...` : 'Uploading file...'),
|
|
128
|
-
showSpinner: true,
|
|
129
|
-
}, ...props }));
|
|
130
|
-
/**
|
|
131
|
-
* Container overlay for specific areas
|
|
132
|
-
*
|
|
133
|
-
* @version 0.0.1
|
|
134
|
-
* @since 0.0.1
|
|
135
|
-
* @author AMBROISE PARK Consulting
|
|
136
|
-
*/
|
|
137
|
-
export const LoadingContainerOverlay = ({ show = false, backdrop = false, backdropBlur = false, className, ...props }) => (_jsx("div", { className: className, style: {
|
|
138
|
-
position: 'absolute',
|
|
139
|
-
inset: 0,
|
|
140
|
-
display: show ? 'flex' : 'none',
|
|
141
|
-
alignItems: 'center',
|
|
142
|
-
justifyContent: 'center',
|
|
143
|
-
transition: 'opacity var(--dur-fast) ease-out',
|
|
144
|
-
backgroundColor: backdrop ? 'var(--background)' : 'transparent',
|
|
145
|
-
opacity: backdrop ? 'var(--opacity-muted)' : 1,
|
|
146
|
-
backdropFilter: backdropBlur ? 'blur(4px)' : 'none',
|
|
147
|
-
}, role: "status", "aria-busy": "true", "aria-label": "Loading content", children: _jsx("div", { style: { display: 'grid', placeItems: 'center', gap: 'var(--gap-sm)' }, children: props.children || (_jsxs(_Fragment, { children: [_jsx("div", { style: {
|
|
148
|
-
animation: 'spin 1s linear infinite',
|
|
149
|
-
borderRadius: 'var(--radius-full)',
|
|
150
|
-
border: '2px solid var(--primary)',
|
|
151
|
-
borderTopColor: 'transparent',
|
|
152
|
-
width: '1.5rem',
|
|
153
|
-
height: '1.5rem',
|
|
154
|
-
}, role: "status", "aria-hidden": "true" }), props.message && _jsx(LoadingMessage, { ...props.message })] })) }) }));
|
|
155
|
-
export default LoadingOverlay;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from 'react';
|
|
2
|
-
interface LoadingScreenProps {
|
|
3
|
-
/** Determines whether to render a full-page or inline loader */
|
|
4
|
-
variant?: 'fullPage' | 'inline';
|
|
5
|
-
/** Optional className for additional styling */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Optionally override whether to show the loader */
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* LoadingScreen displays a centered spinner.
|
|
12
|
-
* This component is designed to be used as the fallback in a Suspense boundary.
|
|
13
|
-
*
|
|
14
|
-
* @version 0.0.1
|
|
15
|
-
* @since 0.0.1
|
|
16
|
-
* @author AMBROISE PARK Consulting
|
|
17
|
-
*/
|
|
18
|
-
declare const LoadingScreen: ComponentType<LoadingScreenProps>;
|
|
19
|
-
export default LoadingScreen;
|
|
20
|
-
//# sourceMappingURL=LoadingScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingScreen.d.ts","sourceRoot":"","sources":["../../../src/components/common/LoadingScreen.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,UAAU,kBAAkB;IAC1B,gEAAgE;IAChE,OAAO,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IAChC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,aAAa,EAAE,aAAa,CAAC,kBAAkB,CA0CpD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
// packages/ui/src/components/common/LoadingScreen.tsx
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview LoadingScreen component
|
|
6
|
-
* @description Full-page loading screen component
|
|
7
|
-
*
|
|
8
|
-
* @version 0.0.1
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { cn } from '@donotdev/components';
|
|
13
|
-
/**
|
|
14
|
-
* LoadingScreen displays a centered spinner.
|
|
15
|
-
* This component is designed to be used as the fallback in a Suspense boundary.
|
|
16
|
-
*
|
|
17
|
-
* @version 0.0.1
|
|
18
|
-
* @since 0.0.1
|
|
19
|
-
* @author AMBROISE PARK Consulting
|
|
20
|
-
*/
|
|
21
|
-
const LoadingScreen = ({ variant = 'fullPage', className, isLoading, }) => {
|
|
22
|
-
if (isLoading === false)
|
|
23
|
-
return null;
|
|
24
|
-
return (_jsx("div", { className: cn(className), style: {
|
|
25
|
-
display: 'flex',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
justifyContent: 'center',
|
|
28
|
-
...(variant === 'fullPage' && {
|
|
29
|
-
position: 'fixed',
|
|
30
|
-
inset: 0,
|
|
31
|
-
backgroundColor: 'var(--background)',
|
|
32
|
-
backdropFilter: 'blur(4px)',
|
|
33
|
-
zIndex: 50,
|
|
34
|
-
}),
|
|
35
|
-
}, role: "status", "aria-busy": "true", "aria-label": "Loading", children: _jsx("div", { style: {
|
|
36
|
-
animation: 'spin 1s linear infinite',
|
|
37
|
-
borderRadius: 'var(--radius-full)',
|
|
38
|
-
border: '2px solid var(--muted)',
|
|
39
|
-
borderTopColor: 'var(--primary)',
|
|
40
|
-
...(variant === 'fullPage'
|
|
41
|
-
? { width: '5rem', height: '5rem' }
|
|
42
|
-
: { width: 'var(--icon-md)', height: 'var(--icon-md)' }),
|
|
43
|
-
}, role: "status", "aria-busy": "true", "aria-label": "Loading" }) }));
|
|
44
|
-
};
|
|
45
|
-
export default LoadingScreen;
|