@egen-civitas/esm-styleguide 1.15.0 → 1.16.0
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/CHANGELOG.md +6 -0
- package/dist/_all.scss +3 -0
- package/dist/animations/_animations.scss +102 -0
- package/dist/animations/_index.scss +5 -0
- package/dist/animations/_keyframes.scss +135 -0
- package/dist/animations/_mixins.scss +16 -0
- package/dist/animations/_tokens.scss +16 -0
- package/dist/animations/_workbench-motion.scss +36 -0
- package/dist/animations/index.d.ts +7 -0
- package/dist/animations/index.d.ts.map +1 -0
- package/dist/animations/index.js +33 -0
- package/dist/public.d.ts +2 -0
- package/dist/public.d.ts.map +1 -1
- package/dist/public.js +2 -0
- package/dist/spinner/_loader.scss +94 -0
- package/dist/spinner/_spinner.scss +1 -14
- package/dist/spinner/index.d.ts +10 -2
- package/dist/spinner/index.d.ts.map +1 -1
- package/dist/spinner/index.js +18 -9
- package/dist/spinner/loader-markup.d.ts +7 -0
- package/dist/spinner/loader-markup.d.ts.map +1 -0
- package/dist/spinner/loader-markup.js +29 -0
- package/dist/spinner/loader.component.d.ts +17 -0
- package/dist/spinner/loader.component.d.ts.map +1 -0
- package/dist/spinner/loader.component.js +30 -0
- package/dist/spinner/page-loader.d.ts +13 -0
- package/dist/spinner/page-loader.d.ts.map +1 -0
- package/dist/spinner/page-loader.js +55 -0
- package/dist/spinner/page-transitions.d.ts +9 -0
- package/dist/spinner/page-transitions.d.ts.map +1 -0
- package/dist/spinner/page-transitions.js +43 -0
- package/dist/spinner/use-page-loading.d.ts +10 -0
- package/dist/spinner/use-page-loading.d.ts.map +1 -0
- package/dist/spinner/use-page-loading.js +17 -0
- package/dist/workbench/tool-window-rail.component.js +1 -1
- package/dist/workbench/tool-window-zone.component.d.ts.map +1 -1
- package/dist/workbench/tool-window-zone.component.js +56 -14
- package/dist/workbench/workbench.module.scss +43 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @egen-civitas/esm-styleguide
|
|
2
2
|
|
|
3
|
+
## 1.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f3bdd5e: Animations et loader : bibliothèque d'animations SCSS (classes `egen-anim-*`, mixins, tokens de mouvement), ouverture/fermeture animées des zones du plan de travail, entrée animée du contenu des pages, loader EGEN réutilisable (`Loader`, `showPageLoader`, `usePageLoading`) retenu pendant le chargement des pages.
|
|
8
|
+
|
|
3
9
|
## 1.15.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/_all.scss
CHANGED
|
@@ -18,12 +18,15 @@
|
|
|
18
18
|
@forward './components/panel-overrides';
|
|
19
19
|
@forward './logo/logo';
|
|
20
20
|
@forward './spinner/spinner';
|
|
21
|
+
@forward './spinner/loader';
|
|
21
22
|
@forward './notifications/notifications';
|
|
22
23
|
@forward './notifications/actionable-notifications';
|
|
23
24
|
@forward './toasts/toasts';
|
|
24
25
|
@forward './snackbars/snackbars';
|
|
25
26
|
@forward './modals/modals';
|
|
26
27
|
|
|
28
|
+
@forward './animations/index';
|
|
29
|
+
|
|
27
30
|
@forward './overrides';
|
|
28
31
|
|
|
29
32
|
@import '@carbon/charts/styles.css';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use './mixins' as motion;
|
|
3
|
+
|
|
4
|
+
// Classes utilitaires d'animation : `class="egen-anim-fade-in"`. Les composants héritent de ces
|
|
5
|
+
// classes (zones, rails, pages...). Variables de réglage : --egen-anim-duration, --egen-anim-easing,
|
|
6
|
+
// --egen-anim-delay, --egen-anim-iterations, --egen-anim-distance.
|
|
7
|
+
|
|
8
|
+
// name => (keyframes, durée, courbe)
|
|
9
|
+
$egen-animations: (
|
|
10
|
+
'fade-in': (egen-fade-in, var(--egen-motion-base), var(--egen-ease-standard)),
|
|
11
|
+
'fade-out': (egen-fade-out, var(--egen-motion-fast), var(--egen-ease-in)),
|
|
12
|
+
'slide-in-from-left': (egen-slide-in-from-left, var(--egen-motion-zone), var(--egen-ease-out)),
|
|
13
|
+
'slide-in-from-right': (egen-slide-in-from-right, var(--egen-motion-zone), var(--egen-ease-out)),
|
|
14
|
+
'slide-in-from-top': (egen-slide-in-from-top, var(--egen-motion-zone), var(--egen-ease-out)),
|
|
15
|
+
'slide-in-from-bottom': (egen-slide-in-from-bottom, var(--egen-motion-zone), var(--egen-ease-out)),
|
|
16
|
+
'slide-out-to-left': (egen-slide-out-to-left, var(--egen-motion-zone), var(--egen-ease-in-out)),
|
|
17
|
+
'slide-out-to-right': (egen-slide-out-to-right, var(--egen-motion-zone), var(--egen-ease-in-out)),
|
|
18
|
+
'slide-out-to-top': (egen-slide-out-to-top, var(--egen-motion-zone), var(--egen-ease-in-out)),
|
|
19
|
+
'slide-out-to-bottom': (egen-slide-out-to-bottom, var(--egen-motion-zone), var(--egen-ease-in-out)),
|
|
20
|
+
'zoom-in': (egen-zoom-in, var(--egen-motion-base), var(--egen-ease-out)),
|
|
21
|
+
'zoom-out': (egen-zoom-out, var(--egen-motion-fast), var(--egen-ease-in)),
|
|
22
|
+
'blur-in': (egen-blur-in, var(--egen-motion-slow), var(--egen-ease-out)),
|
|
23
|
+
'blur-out': (egen-blur-out, var(--egen-motion-base), var(--egen-ease-in)),
|
|
24
|
+
'rise-in': (egen-rise-in, var(--egen-motion-slow), var(--egen-ease-out)),
|
|
25
|
+
'rise-out': (egen-rise-out, var(--egen-motion-base), var(--egen-ease-in)),
|
|
26
|
+
'drop-in': (egen-drop-in, var(--egen-motion-slow), var(--egen-ease-standard)),
|
|
27
|
+
'bounce-in': (egen-bounce-in, var(--egen-motion-slower), var(--egen-ease-standard)),
|
|
28
|
+
'flip-in-x': (egen-flip-in-x, var(--egen-motion-slow), var(--egen-ease-out)),
|
|
29
|
+
'flip-in-y': (egen-flip-in-y, var(--egen-motion-slow), var(--egen-ease-out)),
|
|
30
|
+
'wipe-in-left': (egen-wipe-in-left, var(--egen-motion-slow), var(--egen-ease-in-out)),
|
|
31
|
+
'wipe-in-top': (egen-wipe-in-top, var(--egen-motion-slow), var(--egen-ease-in-out)),
|
|
32
|
+
'wipe-out-left': (egen-wipe-out-left, var(--egen-motion-base), var(--egen-ease-in-out)),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
@each $name, $def in $egen-animations {
|
|
36
|
+
.egen-anim-#{$name} {
|
|
37
|
+
@include motion.animate(list.nth($def, 1), list.nth($def, 2), list.nth($def, 3));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Boucles (attente / attention)
|
|
42
|
+
.egen-anim-pulse {
|
|
43
|
+
@include motion.animate(egen-pulse, 1.6s, ease-in-out);
|
|
44
|
+
--egen-anim-iterations: infinite;
|
|
45
|
+
}
|
|
46
|
+
.egen-anim-float {
|
|
47
|
+
@include motion.animate(egen-float, 3s, ease-in-out);
|
|
48
|
+
--egen-anim-iterations: infinite;
|
|
49
|
+
}
|
|
50
|
+
.egen-anim-shake {
|
|
51
|
+
@include motion.animate(egen-shake, var(--egen-motion-slow), var(--egen-ease-standard));
|
|
52
|
+
}
|
|
53
|
+
.egen-anim-spin {
|
|
54
|
+
@include motion.animate(egen-spin, 1s, linear);
|
|
55
|
+
--egen-anim-iterations: infinite;
|
|
56
|
+
}
|
|
57
|
+
.egen-anim-shimmer {
|
|
58
|
+
background-image: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / 14%) 50%, transparent 100%);
|
|
59
|
+
background-size: 200% 100%;
|
|
60
|
+
@include motion.animate(egen-shimmer, 1.6s, linear);
|
|
61
|
+
--egen-anim-iterations: infinite;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Modificateurs de vitesse
|
|
65
|
+
.egen-anim--fast { --egen-anim-duration: var(--egen-motion-fast); }
|
|
66
|
+
.egen-anim--slow { --egen-anim-duration: var(--egen-motion-slow); }
|
|
67
|
+
.egen-anim--slower { --egen-anim-duration: var(--egen-motion-slower); }
|
|
68
|
+
|
|
69
|
+
// Cascade : les enfants directs apparaissent l'un après l'autre (12 premiers).
|
|
70
|
+
.egen-anim-stagger > * {
|
|
71
|
+
--egen-i: 0;
|
|
72
|
+
@include motion.animate(egen-rise-in, var(--egen-motion-slow), var(--egen-ease-out));
|
|
73
|
+
animation-delay: calc(var(--egen-anim-stagger-step, 40ms) * var(--egen-i));
|
|
74
|
+
}
|
|
75
|
+
@for $i from 1 through 12 {
|
|
76
|
+
.egen-anim-stagger > :nth-child(#{$i}) { --egen-i: #{$i - 1}; }
|
|
77
|
+
}
|
|
78
|
+
.egen-anim-stagger--fade > * { animation-name: egen-fade-in; }
|
|
79
|
+
.egen-anim-stagger--zoom > * { animation-name: egen-zoom-in; }
|
|
80
|
+
.egen-anim-stagger--slide-left > * { animation-name: egen-slide-in-from-left; }
|
|
81
|
+
.egen-anim-stagger--slide-right > * { animation-name: egen-slide-in-from-right; }
|
|
82
|
+
|
|
83
|
+
// Entrée de contenu de page (posée par setupPageTransitions sur #egen-apps-container).
|
|
84
|
+
// Variantes via html[data-egen-page-anim="fade|zoom|blur|slide"].
|
|
85
|
+
.egen-anim-page-enter {
|
|
86
|
+
@include motion.animate(egen-rise-in, var(--egen-motion-slow), var(--egen-ease-out));
|
|
87
|
+
--egen-anim-distance: 1rem;
|
|
88
|
+
}
|
|
89
|
+
html[data-egen-page-anim='fade'] .egen-anim-page-enter { animation-name: egen-fade-in; }
|
|
90
|
+
html[data-egen-page-anim='zoom'] .egen-anim-page-enter { animation-name: egen-zoom-in; }
|
|
91
|
+
html[data-egen-page-anim='blur'] .egen-anim-page-enter { animation-name: egen-blur-in; }
|
|
92
|
+
html[data-egen-page-anim='slide'] .egen-anim-page-enter { animation-name: egen-slide-in-from-right; }
|
|
93
|
+
|
|
94
|
+
// Accessibilité : mouvement réduit => animations quasi instantanées (hors loader, qui est un état).
|
|
95
|
+
@media (prefers-reduced-motion: reduce) {
|
|
96
|
+
[class*='egen-anim-'],
|
|
97
|
+
[class*='egen-anim-'] > * {
|
|
98
|
+
animation-duration: 0.01ms !important;
|
|
99
|
+
animation-delay: 0ms !important;
|
|
100
|
+
animation-iteration-count: 1 !important;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// Bibliothèque de keyframes EGEN (préfixe egen-). Aucune règle ici : uniquement des @keyframes,
|
|
2
|
+
// consommés par les classes utilitaires (_animations.scss) et par les mixins (_mixins.scss).
|
|
3
|
+
|
|
4
|
+
// ── Fondus ──────────────────────────────────────────────────────────────────
|
|
5
|
+
@keyframes egen-fade-in {
|
|
6
|
+
from { opacity: 0; }
|
|
7
|
+
to { opacity: 1; }
|
|
8
|
+
}
|
|
9
|
+
@keyframes egen-fade-out {
|
|
10
|
+
from { opacity: 1; }
|
|
11
|
+
to { opacity: 0; }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// ── Glissements (nommés d'après le côté d'origine / de destination) ─────────
|
|
15
|
+
@keyframes egen-slide-in-from-left {
|
|
16
|
+
from { opacity: 0; transform: translate3d(calc(var(--egen-anim-distance) * -1), 0, 0); }
|
|
17
|
+
to { opacity: 1; transform: none; }
|
|
18
|
+
}
|
|
19
|
+
@keyframes egen-slide-in-from-right {
|
|
20
|
+
from { opacity: 0; transform: translate3d(var(--egen-anim-distance), 0, 0); }
|
|
21
|
+
to { opacity: 1; transform: none; }
|
|
22
|
+
}
|
|
23
|
+
@keyframes egen-slide-in-from-top {
|
|
24
|
+
from { opacity: 0; transform: translate3d(0, calc(var(--egen-anim-distance) * -1), 0); }
|
|
25
|
+
to { opacity: 1; transform: none; }
|
|
26
|
+
}
|
|
27
|
+
@keyframes egen-slide-in-from-bottom {
|
|
28
|
+
from { opacity: 0; transform: translate3d(0, var(--egen-anim-distance), 0); }
|
|
29
|
+
to { opacity: 1; transform: none; }
|
|
30
|
+
}
|
|
31
|
+
@keyframes egen-slide-out-to-left {
|
|
32
|
+
from { opacity: 1; transform: none; }
|
|
33
|
+
to { opacity: 0; transform: translate3d(calc(var(--egen-anim-distance) * -1), 0, 0); }
|
|
34
|
+
}
|
|
35
|
+
@keyframes egen-slide-out-to-right {
|
|
36
|
+
from { opacity: 1; transform: none; }
|
|
37
|
+
to { opacity: 0; transform: translate3d(var(--egen-anim-distance), 0, 0); }
|
|
38
|
+
}
|
|
39
|
+
@keyframes egen-slide-out-to-top {
|
|
40
|
+
from { opacity: 1; transform: none; }
|
|
41
|
+
to { opacity: 0; transform: translate3d(0, calc(var(--egen-anim-distance) * -1), 0); }
|
|
42
|
+
}
|
|
43
|
+
@keyframes egen-slide-out-to-bottom {
|
|
44
|
+
from { opacity: 1; transform: none; }
|
|
45
|
+
to { opacity: 0; transform: translate3d(0, var(--egen-anim-distance), 0); }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// ── Zoom ────────────────────────────────────────────────────────────────────
|
|
49
|
+
@keyframes egen-zoom-in {
|
|
50
|
+
from { opacity: 0; transform: scale(0.94); }
|
|
51
|
+
to { opacity: 1; transform: none; }
|
|
52
|
+
}
|
|
53
|
+
@keyframes egen-zoom-out {
|
|
54
|
+
from { opacity: 1; transform: none; }
|
|
55
|
+
to { opacity: 0; transform: scale(0.94); }
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ── Flou ────────────────────────────────────────────────────────────────────
|
|
59
|
+
@keyframes egen-blur-in {
|
|
60
|
+
from { opacity: 0; filter: blur(12px); }
|
|
61
|
+
to { opacity: 1; filter: blur(0); }
|
|
62
|
+
}
|
|
63
|
+
@keyframes egen-blur-out {
|
|
64
|
+
from { opacity: 1; filter: blur(0); }
|
|
65
|
+
to { opacity: 0; filter: blur(12px); }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ── Montée douce (entrée de page) ───────────────────────────────────────────
|
|
69
|
+
@keyframes egen-rise-in {
|
|
70
|
+
from { opacity: 0; transform: translate3d(0, calc(var(--egen-anim-distance) * 0.5), 0); }
|
|
71
|
+
to { opacity: 1; transform: none; }
|
|
72
|
+
}
|
|
73
|
+
@keyframes egen-rise-out {
|
|
74
|
+
from { opacity: 1; transform: none; }
|
|
75
|
+
to { opacity: 0; transform: translate3d(0, calc(var(--egen-anim-distance) * -0.35), 0); }
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ── Rebonds / ressort ───────────────────────────────────────────────────────
|
|
79
|
+
@keyframes egen-drop-in {
|
|
80
|
+
0% { opacity: 0; transform: translate3d(0, calc(var(--egen-anim-distance) * -1.5), 0); }
|
|
81
|
+
60% { opacity: 1; transform: translate3d(0, 4px, 0); }
|
|
82
|
+
100% { opacity: 1; transform: none; }
|
|
83
|
+
}
|
|
84
|
+
@keyframes egen-bounce-in {
|
|
85
|
+
0% { opacity: 0; transform: scale(0.6); }
|
|
86
|
+
55% { opacity: 1; transform: scale(1.06); }
|
|
87
|
+
80% { transform: scale(0.97); }
|
|
88
|
+
100% { opacity: 1; transform: none; }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ── Rotations 3D ────────────────────────────────────────────────────────────
|
|
92
|
+
@keyframes egen-flip-in-x {
|
|
93
|
+
from { opacity: 0; transform: perspective(600px) rotateX(-70deg); }
|
|
94
|
+
to { opacity: 1; transform: perspective(600px) rotateX(0); }
|
|
95
|
+
}
|
|
96
|
+
@keyframes egen-flip-in-y {
|
|
97
|
+
from { opacity: 0; transform: perspective(600px) rotateY(-70deg); }
|
|
98
|
+
to { opacity: 1; transform: perspective(600px) rotateY(0); }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// ── Révélations (clip-path) ─────────────────────────────────────────────────
|
|
102
|
+
@keyframes egen-wipe-in-left {
|
|
103
|
+
from { clip-path: inset(0 100% 0 0); }
|
|
104
|
+
to { clip-path: inset(0 0 0 0); }
|
|
105
|
+
}
|
|
106
|
+
@keyframes egen-wipe-in-top {
|
|
107
|
+
from { clip-path: inset(0 0 100% 0); }
|
|
108
|
+
to { clip-path: inset(0 0 0 0); }
|
|
109
|
+
}
|
|
110
|
+
@keyframes egen-wipe-out-left {
|
|
111
|
+
from { clip-path: inset(0 0 0 0); }
|
|
112
|
+
to { clip-path: inset(0 100% 0 0); }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ── Boucles d'attention / d'attente ─────────────────────────────────────────
|
|
116
|
+
@keyframes egen-pulse {
|
|
117
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
118
|
+
50% { opacity: 0.6; transform: scale(1.04); }
|
|
119
|
+
}
|
|
120
|
+
@keyframes egen-float {
|
|
121
|
+
0%, 100% { transform: translate3d(0, 0, 0); }
|
|
122
|
+
50% { transform: translate3d(0, -6px, 0); }
|
|
123
|
+
}
|
|
124
|
+
@keyframes egen-shake {
|
|
125
|
+
0%, 100% { transform: translate3d(0, 0, 0); }
|
|
126
|
+
20%, 60% { transform: translate3d(-6px, 0, 0); }
|
|
127
|
+
40%, 80% { transform: translate3d(6px, 0, 0); }
|
|
128
|
+
}
|
|
129
|
+
@keyframes egen-shimmer {
|
|
130
|
+
from { background-position: -200% 0; }
|
|
131
|
+
to { background-position: 200% 0; }
|
|
132
|
+
}
|
|
133
|
+
@keyframes egen-spin {
|
|
134
|
+
to { transform: rotate(360deg); }
|
|
135
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Mixins : permettent à un composant (module SCSS) d'hériter d'une animation EGEN sans
|
|
2
|
+
// dupliquer sa définition. Durée, courbe et délai restent pilotables par variables CSS.
|
|
3
|
+
//
|
|
4
|
+
// @use '../animations/mixins' as motion;
|
|
5
|
+
// .panel { @include motion.animate(egen-zoom-in); }
|
|
6
|
+
//
|
|
7
|
+
// NB : dans un `.module.scss`, les noms de keyframes sont localisés par css-loader ; pour les
|
|
8
|
+
// composants React, préférer les classes globales `egen-anim-*` (voir _animations.scss).
|
|
9
|
+
@mixin animate($name, $duration: var(--egen-motion-base), $easing: var(--egen-ease-out), $fill: both) {
|
|
10
|
+
animation-name: $name;
|
|
11
|
+
animation-duration: var(--egen-anim-duration, #{$duration});
|
|
12
|
+
animation-timing-function: var(--egen-anim-easing, #{$easing});
|
|
13
|
+
animation-delay: var(--egen-anim-delay, 0ms);
|
|
14
|
+
animation-fill-mode: $fill;
|
|
15
|
+
animation-iteration-count: var(--egen-anim-iterations, 1);
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Tokens de mouvement partagés : durées et courbes. Surchargeables par thème / par app.
|
|
2
|
+
:root {
|
|
3
|
+
--egen-motion-fast: 150ms;
|
|
4
|
+
--egen-motion-base: 250ms;
|
|
5
|
+
--egen-motion-slow: 400ms;
|
|
6
|
+
--egen-motion-slower: 700ms;
|
|
7
|
+
// Durée d'ouverture / fermeture des zones (doit rester alignée sur EXIT_MS de tool-window-zone).
|
|
8
|
+
--egen-motion-zone: 300ms;
|
|
9
|
+
--egen-ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
10
|
+
--egen-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
11
|
+
--egen-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
12
|
+
--egen-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
|
|
13
|
+
--egen-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
14
|
+
// Distance de translation par défaut des animations « slide » / « rise ».
|
|
15
|
+
--egen-anim-distance: 1.5rem;
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Ouverture / fermeture douces des zones du plan de travail : les tailles de zones sont des
|
|
2
|
+
// variables CSS publiées sur <html> ; on les enregistre comme <length> pour que la grille du body
|
|
3
|
+
// les interpole (sans @property elles changeraient d'un coup).
|
|
4
|
+
@property --egen-zone-left-width {
|
|
5
|
+
syntax: '<length>';
|
|
6
|
+
inherits: true;
|
|
7
|
+
initial-value: 0px;
|
|
8
|
+
}
|
|
9
|
+
@property --egen-zone-right-width {
|
|
10
|
+
syntax: '<length>';
|
|
11
|
+
inherits: true;
|
|
12
|
+
initial-value: 0px;
|
|
13
|
+
}
|
|
14
|
+
@property --egen-zone-bottom-height {
|
|
15
|
+
syntax: '<length>';
|
|
16
|
+
inherits: true;
|
|
17
|
+
initial-value: 0px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
html {
|
|
21
|
+
transition:
|
|
22
|
+
--egen-zone-left-width var(--egen-motion-zone, 300ms) var(--egen-ease-out, ease),
|
|
23
|
+
--egen-zone-right-width var(--egen-motion-zone, 300ms) var(--egen-ease-out, ease),
|
|
24
|
+
--egen-zone-bottom-height var(--egen-motion-zone, 300ms) var(--egen-ease-out, ease);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Pendant un glissement de poignée : suivi direct du pointeur, sans retard.
|
|
28
|
+
html[data-workbench-resizing] {
|
|
29
|
+
transition: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (prefers-reduced-motion: reduce) {
|
|
33
|
+
html {
|
|
34
|
+
transition: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @module @category UI */
|
|
2
|
+
/** Noms des classes utilitaires d'animation (voir animations/_animations.scss). */
|
|
3
|
+
export declare const EGEN_ANIMATIONS: readonly ["fade-in", "fade-out", "slide-in-from-left", "slide-in-from-right", "slide-in-from-top", "slide-in-from-bottom", "slide-out-to-left", "slide-out-to-right", "slide-out-to-top", "slide-out-to-bottom", "zoom-in", "zoom-out", "blur-in", "blur-out", "rise-in", "rise-out", "drop-in", "bounce-in", "flip-in-x", "flip-in-y", "wipe-in-left", "wipe-in-top", "wipe-out-left", "pulse", "float", "shake", "spin", "shimmer"];
|
|
4
|
+
export type EgenAnimation = (typeof EGEN_ANIMATIONS)[number];
|
|
5
|
+
/** Retourne la classe globale d'une animation : `animationClass('zoom-in')` → `egen-anim-zoom-in`. */
|
|
6
|
+
export declare function animationClass(name: EgenAnimation): string;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animations/index.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAE3B,mFAAmF;AACnF,eAAO,MAAM,eAAe,uaA6BlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,sGAAsG;AACtG,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAE1D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @module @category UI */ /** Noms des classes utilitaires d'animation (voir animations/_animations.scss). */ export const EGEN_ANIMATIONS = [
|
|
2
|
+
'fade-in',
|
|
3
|
+
'fade-out',
|
|
4
|
+
'slide-in-from-left',
|
|
5
|
+
'slide-in-from-right',
|
|
6
|
+
'slide-in-from-top',
|
|
7
|
+
'slide-in-from-bottom',
|
|
8
|
+
'slide-out-to-left',
|
|
9
|
+
'slide-out-to-right',
|
|
10
|
+
'slide-out-to-top',
|
|
11
|
+
'slide-out-to-bottom',
|
|
12
|
+
'zoom-in',
|
|
13
|
+
'zoom-out',
|
|
14
|
+
'blur-in',
|
|
15
|
+
'blur-out',
|
|
16
|
+
'rise-in',
|
|
17
|
+
'rise-out',
|
|
18
|
+
'drop-in',
|
|
19
|
+
'bounce-in',
|
|
20
|
+
'flip-in-x',
|
|
21
|
+
'flip-in-y',
|
|
22
|
+
'wipe-in-left',
|
|
23
|
+
'wipe-in-top',
|
|
24
|
+
'wipe-out-left',
|
|
25
|
+
'pulse',
|
|
26
|
+
'float',
|
|
27
|
+
'shake',
|
|
28
|
+
'spin',
|
|
29
|
+
'shimmer'
|
|
30
|
+
];
|
|
31
|
+
/** Retourne la classe globale d'une animation : `animationClass('zoom-in')` → `egen-anim-zoom-in`. */ export function animationClass(name) {
|
|
32
|
+
return `egen-anim-${name}`;
|
|
33
|
+
}
|
package/dist/public.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from './glass-card/index.js';
|
|
|
34
34
|
export * from './containers/index.js';
|
|
35
35
|
export * from './master-detail/index.js';
|
|
36
36
|
export * from './workbench/index.js';
|
|
37
|
+
export * from './animations/index.js';
|
|
37
38
|
export * from './dialogs/index.js';
|
|
38
39
|
export * from './selections/index.js';
|
|
39
40
|
export * from './carousel/index.js';
|
|
@@ -43,4 +44,5 @@ export * from './top-bar/index.js';
|
|
|
43
44
|
export * from './sites/index.js';
|
|
44
45
|
export * from './assistant/index.js';
|
|
45
46
|
export * from './filters/index.js';
|
|
47
|
+
export { Loader, type LoaderProps, showPageLoader, usePageLoading } from './spinner/index.js';
|
|
46
48
|
//# sourceMappingURL=public.d.ts.map
|
package/dist/public.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EACL,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,GAChC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACrH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,EACL,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EACL,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,GAChC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACrH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,EACL,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/public.js
CHANGED
|
@@ -31,6 +31,7 @@ export * from "./glass-card/index.js";
|
|
|
31
31
|
export * from "./containers/index.js";
|
|
32
32
|
export * from "./master-detail/index.js";
|
|
33
33
|
export * from "./workbench/index.js";
|
|
34
|
+
export * from "./animations/index.js";
|
|
34
35
|
export * from "./dialogs/index.js";
|
|
35
36
|
export * from "./selections/index.js";
|
|
36
37
|
export * from "./carousel/index.js";
|
|
@@ -40,3 +41,4 @@ export * from "./top-bar/index.js";
|
|
|
40
41
|
export * from "./sites/index.js";
|
|
41
42
|
export * from "./assistant/index.js";
|
|
42
43
|
export * from "./filters/index.js";
|
|
44
|
+
export { Loader, showPageLoader, usePageLoading } from "./spinner/index.js";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Loader EGEN (SVG « goo », porté depuis Civitas---GED) : marque d'attente unique du framework.
|
|
2
|
+
// Utilisable partout : overlay de page (.egen-loader-overlay), overlay local à un conteneur
|
|
3
|
+
// (.egen-loader-overlay--local) ou loader seul (.egen-loader). Couleurs pilotables par thème :
|
|
4
|
+
// --egen-loader-from / --egen-loader-to / --egen-loader-glow.
|
|
5
|
+
.egen-loader {
|
|
6
|
+
--egen-loader-from: var(--colors-primary-600, #008080);
|
|
7
|
+
--egen-loader-to: var(--colors-primary-300, #38bdf8);
|
|
8
|
+
--egen-loader-glow: rgb(0 128 128 / 60%);
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
filter: drop-shadow(0 0 25px var(--egen-loader-glow));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.egen-loader__defs {
|
|
19
|
+
position: absolute;
|
|
20
|
+
width: 0;
|
|
21
|
+
height: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.egen-loader__stop-from {
|
|
26
|
+
stop-color: var(--egen-loader-from);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.egen-loader__stop-to {
|
|
30
|
+
stop-color: var(--egen-loader-to);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.egen-loader__spin {
|
|
34
|
+
position: relative;
|
|
35
|
+
z-index: 1;
|
|
36
|
+
filter: url('#egen-loader-goo');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.egen-loader__shadow {
|
|
40
|
+
position: absolute;
|
|
41
|
+
opacity: 0.3;
|
|
42
|
+
filter: blur(5px);
|
|
43
|
+
transform: translate(3px, 3px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.egen-loader__arc,
|
|
47
|
+
.egen-loader__ring {
|
|
48
|
+
fill: none;
|
|
49
|
+
stroke: url('#egen-loader-gradient');
|
|
50
|
+
stroke-width: 23;
|
|
51
|
+
stroke-linecap: round;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.egen-loader__arc {
|
|
55
|
+
animation: egen-loader-spin 10s infinite linear;
|
|
56
|
+
stroke-dasharray: 180 800;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.egen-loader__ring {
|
|
60
|
+
animation: egen-loader-spin 3s infinite linear;
|
|
61
|
+
stroke-dasharray: 26 54;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes egen-loader-spin {
|
|
65
|
+
from {
|
|
66
|
+
stroke-dashoffset: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
to {
|
|
70
|
+
stroke-dashoffset: -403px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Overlay de page : transparent + flou, sous la TopBar et le footer (qui restent au-dessus).
|
|
75
|
+
.egen-loader-overlay {
|
|
76
|
+
position: fixed;
|
|
77
|
+
inset: 0;
|
|
78
|
+
z-index: calc(var(--egen-shell-bar-z-index, 8100) - 1);
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
background: transparent;
|
|
84
|
+
backdrop-filter: blur(8px);
|
|
85
|
+
cursor: wait;
|
|
86
|
+
user-select: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Variante locale : couvre seulement son conteneur (qui doit être `position: relative`).
|
|
90
|
+
.egen-loader-overlay--local {
|
|
91
|
+
position: absolute;
|
|
92
|
+
z-index: 1;
|
|
93
|
+
border-radius: inherit;
|
|
94
|
+
}
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
min-height: 100vh;
|
|
3
|
-
margin: 0;
|
|
4
|
-
padding: 0;
|
|
5
|
-
}
|
|
6
|
-
.egen-loading-spinner {
|
|
7
|
-
display: flex;
|
|
8
|
-
flex: 1;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
> .cds--inline-loading {
|
|
12
|
-
width: auto;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
// Ancien spinner Carbon remplacé par le loader EGEN : voir _loader.scss.
|
package/dist/spinner/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { loaderMarkup } from './loader-markup.js';
|
|
2
|
+
export { Loader, type LoaderProps } from './loader.component.js';
|
|
3
|
+
export { showPageLoader } from './page-loader.js';
|
|
4
|
+
export { usePageLoading } from './use-page-loading.js';
|
|
5
|
+
export { setupPageTransitions, playPageEnter } from './page-transitions.js';
|
|
6
|
+
/**
|
|
7
|
+
* Affiche le loader EGEN plein écran dans `target` (démarrage du shell). Retourne la fonction
|
|
8
|
+
* qui le retire avec une sortie en fondu.
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderLoadingSpinner(target: HTMLElement): () => void;
|
|
3
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spinner/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spinner/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE5E;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,cAUvD"}
|
package/dist/spinner/index.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
/** @module @category UI */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/** @module @category UI */ import { loaderMarkup } from "./loader-markup.js";
|
|
2
|
+
export { loaderMarkup } from "./loader-markup.js";
|
|
3
|
+
export { Loader } from "./loader.component.js";
|
|
4
|
+
export { showPageLoader } from "./page-loader.js";
|
|
5
|
+
export { usePageLoading } from "./use-page-loading.js";
|
|
6
|
+
export { setupPageTransitions, playPageEnter } from "./page-transitions.js";
|
|
7
|
+
/**
|
|
8
|
+
* Affiche le loader EGEN plein écran dans `target` (démarrage du shell). Retourne la fonction
|
|
9
|
+
* qui le retire avec une sortie en fondu.
|
|
10
|
+
*/ export function renderLoadingSpinner(target) {
|
|
11
|
+
const host = document.createElement('div');
|
|
12
|
+
host.className = 'egen-loader-overlay egen-anim-fade-in';
|
|
13
|
+
host.innerHTML = loaderMarkup();
|
|
14
|
+
target.appendChild(host);
|
|
15
|
+
return ()=>{
|
|
16
|
+
host.className = 'egen-loader-overlay egen-anim-fade-out';
|
|
17
|
+
window.setTimeout(()=>host.remove(), 300);
|
|
18
|
+
};
|
|
10
19
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @module @category UI */
|
|
2
|
+
/**
|
|
3
|
+
* Markup HTML du loader EGEN (voir spinner/_loader.scss). Source unique : utilisé par le
|
|
4
|
+
* composant React `Loader`, par `renderLoadingSpinner` et par le contrôleur `showPageLoader`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function loaderMarkup(size?: number, label?: string): string;
|
|
7
|
+
//# sourceMappingURL=loader-markup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-markup.d.ts","sourceRoot":"","sources":["../../src/spinner/loader-markup.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAK3B;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,SAAM,EAAE,KAAK,SAAwB,GAAG,MAAM,CAwB9E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** @module @category UI */ const ARC_PATH = 'm 164,100 c 0,-35.346224 -28.65378,-64 -64,-64 -35.346224,0 -64,28.653776 -64,64 0,35.34622 28.653776,64 64,64 35.34622,0 64,-26.21502 64,-64 0,-37.784981 -26.92058,-64 -64,-64 -37.079421,0 -65.267479,26.922736 -64,64 1.267479,37.07726 26.703171,65.05317 64,64 37.29683,-1.05317 64,-64 64,-64';
|
|
2
|
+
/**
|
|
3
|
+
* Markup HTML du loader EGEN (voir spinner/_loader.scss). Source unique : utilisé par le
|
|
4
|
+
* composant React `Loader`, par `renderLoadingSpinner` et par le contrôleur `showPageLoader`.
|
|
5
|
+
*/ export function loaderMarkup(size = 160, label = 'Chargement en cours') {
|
|
6
|
+
return `<div class="egen-loader">
|
|
7
|
+
<svg class="egen-loader__defs" aria-hidden="true" focusable="false"><defs>
|
|
8
|
+
<filter id="egen-loader-goo">
|
|
9
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="7" result="blur" />
|
|
10
|
+
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10" result="goo" />
|
|
11
|
+
<feComposite in="SourceGraphic" in2="goo" operator="atop" />
|
|
12
|
+
</filter>
|
|
13
|
+
</defs></svg>
|
|
14
|
+
<svg class="egen-loader__shadow" width="${size}" height="${size}" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
|
|
15
|
+
<path class="egen-loader__arc" d="${ARC_PATH}" />
|
|
16
|
+
<circle class="egen-loader__ring" cx="100" cy="100" r="64" />
|
|
17
|
+
</svg>
|
|
18
|
+
<svg class="egen-loader__spin" width="${size}" height="${size}" viewBox="0 0 200 200" role="status" aria-label="${label}">
|
|
19
|
+
<defs>
|
|
20
|
+
<linearGradient id="egen-loader-gradient" gradientUnits="userSpaceOnUse" x1="40" y1="40" x2="160" y2="160">
|
|
21
|
+
<stop class="egen-loader__stop-from" offset="0" />
|
|
22
|
+
<stop class="egen-loader__stop-to" offset="1" />
|
|
23
|
+
</linearGradient>
|
|
24
|
+
</defs>
|
|
25
|
+
<path class="egen-loader__arc" d="${ARC_PATH}" />
|
|
26
|
+
<circle class="egen-loader__ring" cx="100" cy="100" r="64" />
|
|
27
|
+
</svg>
|
|
28
|
+
</div>`;
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LoaderProps {
|
|
3
|
+
/** Affiche (true) ou masque (false) le loader ; le masquage joue une sortie en fondu. */
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
/** Couvre uniquement le conteneur parent (qui doit être `position: relative`) au lieu de la page. */
|
|
6
|
+
local?: boolean;
|
|
7
|
+
/** Taille du pictogramme en pixels. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Libellé accessible. */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Loader EGEN réutilisable (overlay flouté + spinner SVG). Même rendu que le loader de page
|
|
14
|
+
* du shell. Exemple : `<Loader visible={isLoading} local />` dans une carte `position: relative`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Loader({ visible, local, size, label }: LoaderProps): React.JSX.Element | null;
|
|
17
|
+
//# sourceMappingURL=loader.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.component.d.ts","sourceRoot":"","sources":["../../src/spinner/loader.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,MAAM,WAAW,WAAW;IAC1B,yFAAyF;IACzF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qGAAqG;IACrG,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EAAE,OAAc,EAAE,KAAa,EAAE,IAAU,EAAE,KAAK,EAAE,EAAE,WAAW,4BAyBvF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { loaderMarkup } from "./loader-markup.js";
|
|
4
|
+
const EXIT_MS = 300;
|
|
5
|
+
/**
|
|
6
|
+
* Loader EGEN réutilisable (overlay flouté + spinner SVG). Même rendu que le loader de page
|
|
7
|
+
* du shell. Exemple : `<Loader visible={isLoading} local />` dans une carte `position: relative`.
|
|
8
|
+
*/ export function Loader({ visible = true, local = false, size = 160, label }) {
|
|
9
|
+
const [mounted, setMounted] = useState(visible);
|
|
10
|
+
useEffect(()=>{
|
|
11
|
+
if (visible) {
|
|
12
|
+
setMounted(true);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const timer = window.setTimeout(()=>setMounted(false), EXIT_MS);
|
|
16
|
+
return ()=>window.clearTimeout(timer);
|
|
17
|
+
}, [
|
|
18
|
+
visible
|
|
19
|
+
]);
|
|
20
|
+
if (!mounted) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
24
|
+
className: `egen-loader-overlay ${local ? 'egen-loader-overlay--local ' : ''}${visible ? 'egen-anim-fade-in' : 'egen-anim-fade-out'}`,
|
|
25
|
+
// eslint-disable-next-line react/no-danger
|
|
26
|
+
dangerouslySetInnerHTML: {
|
|
27
|
+
__html: loaderMarkup(size, label)
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Affiche le loader de page tant qu'au moins un appelant le « retient ». Retourne la fonction de
|
|
3
|
+
* libération (idempotente). Compteur : plusieurs chargements simultanés = un seul loader, retiré
|
|
4
|
+
* quand le dernier est terminé.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* const release = showPageLoader();
|
|
8
|
+
* await fetchData();
|
|
9
|
+
* release();
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare function showPageLoader(): () => void;
|
|
13
|
+
//# sourceMappingURL=page-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-loader.d.ts","sourceRoot":"","sources":["../../src/spinner/page-loader.ts"],"names":[],"mappings":"AAkCA;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,MAAM,IAAI,CAgB3C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** @module @category UI */ import { loaderMarkup } from "./loader-markup.js";
|
|
2
|
+
const SHOW_DELAY_MS = 120; // évite le clignotement sur les navigations quasi instantanées
|
|
3
|
+
const EXIT_MS = 300;
|
|
4
|
+
let holds = 0;
|
|
5
|
+
let overlay = null;
|
|
6
|
+
let showTimer;
|
|
7
|
+
let hideTimer;
|
|
8
|
+
function mount() {
|
|
9
|
+
window.clearTimeout(hideTimer);
|
|
10
|
+
if (overlay?.isConnected) {
|
|
11
|
+
overlay.className = 'egen-loader-overlay egen-anim-fade-in';
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
overlay = document.createElement('div');
|
|
15
|
+
overlay.id = 'egen-page-loader';
|
|
16
|
+
overlay.className = 'egen-loader-overlay egen-anim-fade-in';
|
|
17
|
+
overlay.innerHTML = loaderMarkup();
|
|
18
|
+
document.body.appendChild(overlay);
|
|
19
|
+
}
|
|
20
|
+
function unmount() {
|
|
21
|
+
const current = overlay;
|
|
22
|
+
if (!current) return;
|
|
23
|
+
current.className = 'egen-loader-overlay egen-anim-fade-out';
|
|
24
|
+
hideTimer = window.setTimeout(()=>{
|
|
25
|
+
current.remove();
|
|
26
|
+
if (overlay === current) overlay = null;
|
|
27
|
+
}, EXIT_MS);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Affiche le loader de page tant qu'au moins un appelant le « retient ». Retourne la fonction de
|
|
31
|
+
* libération (idempotente). Compteur : plusieurs chargements simultanés = un seul loader, retiré
|
|
32
|
+
* quand le dernier est terminé.
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* const release = showPageLoader();
|
|
36
|
+
* await fetchData();
|
|
37
|
+
* release();
|
|
38
|
+
* ```
|
|
39
|
+
*/ export function showPageLoader() {
|
|
40
|
+
let released = false;
|
|
41
|
+
holds += 1;
|
|
42
|
+
if (holds === 1) {
|
|
43
|
+
window.clearTimeout(showTimer);
|
|
44
|
+
showTimer = window.setTimeout(mount, SHOW_DELAY_MS);
|
|
45
|
+
}
|
|
46
|
+
return ()=>{
|
|
47
|
+
if (released) return;
|
|
48
|
+
released = true;
|
|
49
|
+
holds = Math.max(0, holds - 1);
|
|
50
|
+
if (holds === 0) {
|
|
51
|
+
window.clearTimeout(showTimer);
|
|
52
|
+
unmount();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Rejoue l'animation d'entrée du contenu des pages (#egen-apps-container). */
|
|
2
|
+
export declare function playPageEnter(): void;
|
|
3
|
+
/**
|
|
4
|
+
* Branche les transitions de pages du shell : loader tant que les apps de la nouvelle page se
|
|
5
|
+
* chargent (before-routing-event → routing-event), puis animation d'entrée du contenu.
|
|
6
|
+
* Retourne la fonction de nettoyage.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setupPageTransitions(): () => void;
|
|
9
|
+
//# sourceMappingURL=page-transitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-transitions.d.ts","sourceRoot":"","sources":["../../src/spinner/page-transitions.ts"],"names":[],"mappings":"AASA,+EAA+E;AAC/E,wBAAgB,aAAa,SAc5B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,IAAI,CAsBjD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** @module @category UI */ import { showPageLoader } from "./page-loader.js";
|
|
2
|
+
const ENTER_CLASS = 'egen-anim-page-enter';
|
|
3
|
+
function prefersReducedMotion() {
|
|
4
|
+
return window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;
|
|
5
|
+
}
|
|
6
|
+
/** Rejoue l'animation d'entrée du contenu des pages (#egen-apps-container). */ export function playPageEnter() {
|
|
7
|
+
const container = document.getElementById('egen-apps-container');
|
|
8
|
+
if (!container || prefersReducedMotion()) return;
|
|
9
|
+
container.classList.remove(ENTER_CLASS);
|
|
10
|
+
void container.offsetWidth; // force le reflow pour relancer l'animation
|
|
11
|
+
container.classList.add(ENTER_CLASS);
|
|
12
|
+
container.addEventListener('animationend', (event)=>{
|
|
13
|
+
// Ignore les animationend des descendants ; la classe retirée libère le transform.
|
|
14
|
+
if (event.target === container) container.classList.remove(ENTER_CLASS);
|
|
15
|
+
}, {
|
|
16
|
+
once: false
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Branche les transitions de pages du shell : loader tant que les apps de la nouvelle page se
|
|
21
|
+
* chargent (before-routing-event → routing-event), puis animation d'entrée du contenu.
|
|
22
|
+
* Retourne la fonction de nettoyage.
|
|
23
|
+
*/ export function setupPageTransitions() {
|
|
24
|
+
let release = null;
|
|
25
|
+
const onBefore = (event)=>{
|
|
26
|
+
const detail = event.detail;
|
|
27
|
+
if (!detail?.totalAppChanges) return;
|
|
28
|
+
release?.();
|
|
29
|
+
release = showPageLoader();
|
|
30
|
+
};
|
|
31
|
+
const onAfter = ()=>{
|
|
32
|
+
release?.();
|
|
33
|
+
release = null;
|
|
34
|
+
playPageEnter();
|
|
35
|
+
};
|
|
36
|
+
window.addEventListener('single-spa:before-routing-event', onBefore);
|
|
37
|
+
window.addEventListener('single-spa:routing-event', onAfter);
|
|
38
|
+
return ()=>{
|
|
39
|
+
window.removeEventListener('single-spa:before-routing-event', onBefore);
|
|
40
|
+
window.removeEventListener('single-spa:routing-event', onAfter);
|
|
41
|
+
release?.();
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Garde le loader de page actif tant que `loading` est vrai (contenu pas fini de charger).
|
|
3
|
+
*
|
|
4
|
+
* ```tsx
|
|
5
|
+
* const { isLoading } = useMyData();
|
|
6
|
+
* usePageLoading(isLoading);
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare function usePageLoading(loading: boolean): void;
|
|
10
|
+
//# sourceMappingURL=use-page-loading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-page-loading.d.ts","sourceRoot":"","sources":["../../src/spinner/use-page-loading.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAK9C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { showPageLoader } from "./page-loader.js";
|
|
3
|
+
/**
|
|
4
|
+
* Garde le loader de page actif tant que `loading` est vrai (contenu pas fini de charger).
|
|
5
|
+
*
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const { isLoading } = useMyData();
|
|
8
|
+
* usePageLoading(isLoading);
|
|
9
|
+
* ```
|
|
10
|
+
*/ export function usePageLoading(loading) {
|
|
11
|
+
useEffect(()=>{
|
|
12
|
+
if (!loading) return;
|
|
13
|
+
return showPageLoader();
|
|
14
|
+
}, [
|
|
15
|
+
loading
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
@@ -16,7 +16,7 @@ function RailGroup({ anchor, label }) {
|
|
|
16
16
|
role: "group",
|
|
17
17
|
"aria-label": label,
|
|
18
18
|
"data-anchor": anchor,
|
|
19
|
-
className: styles.railGroup
|
|
19
|
+
className: `${styles.railGroup} egen-anim-stagger egen-anim-stagger--fade`,
|
|
20
20
|
children: tools.map((tool)=>/*#__PURE__*/ _jsx(RailButton, {
|
|
21
21
|
tool: tool,
|
|
22
22
|
active: tool.id === activeId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-window-zone.component.d.ts","sourceRoot":"","sources":["../../src/workbench/tool-window-zone.component.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tool-window-zone.component.d.ts","sourceRoot":"","sources":["../../src/workbench/tool-window-zone.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwF,MAAM,OAAO,CAAC;AAC7G,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAuCxF,UAAU,mBAAmB;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBA0F7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React, { useCallback, useEffect } from "react";
|
|
2
|
+
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
3
3
|
import { TOOL_WINDOW_SLOTS } from "@egen-civitas/esm-extensions";
|
|
4
4
|
import { ComponentContext, ExtensionSlot, useStore } from "@egen-civitas/esm-react-utils";
|
|
5
5
|
import { X } from "lucide-react";
|
|
@@ -20,6 +20,17 @@ import styles from "./workbench.module.scss";
|
|
|
20
20
|
right: '--egen-zone-right-width',
|
|
21
21
|
bottom: '--egen-zone-bottom-height'
|
|
22
22
|
};
|
|
23
|
+
/** Durée de fermeture/ouverture : alignée sur --egen-motion-zone (animations/_tokens.scss). */ const MOTION_MS = 300;
|
|
24
|
+
/** Classes d'animation héritées (animations/_animations.scss) selon l'ancre de la zone. */ const ENTER_CLASS = {
|
|
25
|
+
left: 'egen-anim-slide-in-from-left',
|
|
26
|
+
right: 'egen-anim-slide-in-from-right',
|
|
27
|
+
bottom: 'egen-anim-slide-in-from-bottom'
|
|
28
|
+
};
|
|
29
|
+
const EXIT_CLASS = {
|
|
30
|
+
left: 'egen-anim-slide-out-to-left',
|
|
31
|
+
right: 'egen-anim-slide-out-to-right',
|
|
32
|
+
bottom: 'egen-anim-slide-out-to-bottom'
|
|
33
|
+
};
|
|
23
34
|
/**
|
|
24
35
|
* Zone redimensionnable (gauche, droite ou bas) : affiche le contenu de la fenêtre d'outils
|
|
25
36
|
* active du rail correspondant, sous un en-tête (titre + fermeture). Repliée (taille 0) tant
|
|
@@ -32,13 +43,38 @@ import styles from "./workbench.module.scss";
|
|
|
32
43
|
const activeId = active[anchor];
|
|
33
44
|
const size = sizes[anchor];
|
|
34
45
|
const current = tools.find((tool)=>tool.id === activeId);
|
|
35
|
-
const
|
|
36
|
-
//
|
|
46
|
+
const targetOpen = Boolean(current);
|
|
47
|
+
// La zone reste montée le temps de l'animation de fermeture : on garde la dernière fenêtre active.
|
|
48
|
+
const lastRef = useRef(undefined);
|
|
49
|
+
const wasOpenRef = useRef(false);
|
|
50
|
+
const [phase, setPhase] = useState('open');
|
|
51
|
+
if (current) {
|
|
52
|
+
lastRef.current = current;
|
|
53
|
+
}
|
|
54
|
+
const displayed = current ?? (phase === 'closing' ? lastRef.current : undefined);
|
|
55
|
+
const open = Boolean(displayed);
|
|
56
|
+
useLayoutEffect(()=>{
|
|
57
|
+
if (targetOpen === wasOpenRef.current) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
wasOpenRef.current = targetOpen;
|
|
61
|
+
setPhase(targetOpen ? 'opening' : 'closing');
|
|
62
|
+
const timer = window.setTimeout(()=>{
|
|
63
|
+
if (!targetOpen) {
|
|
64
|
+
lastRef.current = undefined;
|
|
65
|
+
}
|
|
66
|
+
setPhase('open');
|
|
67
|
+
}, MOTION_MS);
|
|
68
|
+
return ()=>window.clearTimeout(timer);
|
|
69
|
+
}, [
|
|
70
|
+
targetOpen
|
|
71
|
+
]);
|
|
72
|
+
// Publie la taille de la zone pour la grille du body ; 0 quand elle est repliée (animée en CSS).
|
|
37
73
|
useEffect(()=>{
|
|
38
|
-
document.documentElement.style.setProperty(ZONE_SIZE_VARIABLES[anchor],
|
|
74
|
+
document.documentElement.style.setProperty(ZONE_SIZE_VARIABLES[anchor], targetOpen ? `${size}px` : '0px');
|
|
39
75
|
}, [
|
|
40
76
|
anchor,
|
|
41
|
-
|
|
77
|
+
targetOpen,
|
|
42
78
|
size
|
|
43
79
|
]);
|
|
44
80
|
useEffect(()=>()=>{
|
|
@@ -46,18 +82,24 @@ import styles from "./workbench.module.scss";
|
|
|
46
82
|
}, [
|
|
47
83
|
anchor
|
|
48
84
|
]);
|
|
49
|
-
// Seule la fenêtre
|
|
50
|
-
const
|
|
51
|
-
|
|
85
|
+
// Seule la fenêtre affichée est rendue (et donc chargée) dans la zone.
|
|
86
|
+
const displayedId = displayed?.id;
|
|
87
|
+
const selectActive = useCallback((extensions)=>extensions.filter((extension)=>extension.name === displayedId), [
|
|
88
|
+
displayedId
|
|
52
89
|
]);
|
|
53
|
-
const title =
|
|
90
|
+
const title = displayed ? toolWindowTitle(displayed) : '';
|
|
91
|
+
const motionClass = phase === 'closing' ? EXIT_CLASS[anchor] : phase === 'opening' ? ENTER_CLASS[anchor] : '';
|
|
54
92
|
return /*#__PURE__*/ _jsx("aside", {
|
|
55
93
|
"data-testid": `workbench-zone-${anchor}`,
|
|
56
94
|
"data-anchor": anchor,
|
|
57
|
-
"data-open":
|
|
95
|
+
"data-open": targetOpen,
|
|
96
|
+
"data-phase": phase,
|
|
58
97
|
"aria-label": title || undefined,
|
|
59
98
|
hidden: !open,
|
|
60
|
-
|
|
99
|
+
style: {
|
|
100
|
+
'--egen-zone-inner-size': `${size}px`
|
|
101
|
+
},
|
|
102
|
+
className: `${styles.zone} ${styles[`zone-${anchor}`]} ${motionClass}`,
|
|
61
103
|
children: open && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
62
104
|
children: [
|
|
63
105
|
/*#__PURE__*/ _jsxs("header", {
|
|
@@ -81,7 +123,7 @@ import styles from "./workbench.module.scss";
|
|
|
81
123
|
]
|
|
82
124
|
}),
|
|
83
125
|
/*#__PURE__*/ _jsx("div", {
|
|
84
|
-
className: styles.zoneBody
|
|
126
|
+
className: `${styles.zoneBody} egen-anim-fade-in`,
|
|
85
127
|
children: /*#__PURE__*/ _jsx(ComponentContext.Provider, {
|
|
86
128
|
value: ZONE_CONTEXT,
|
|
87
129
|
children: /*#__PURE__*/ _jsx(ExtensionSlot, {
|
|
@@ -90,8 +132,8 @@ import styles from "./workbench.module.scss";
|
|
|
90
132
|
className: styles.zoneSlot
|
|
91
133
|
})
|
|
92
134
|
})
|
|
93
|
-
}),
|
|
94
|
-
/*#__PURE__*/ _jsx(Splitter, {
|
|
135
|
+
}, displayedId),
|
|
136
|
+
phase !== 'closing' && /*#__PURE__*/ _jsx(Splitter, {
|
|
95
137
|
anchor: anchor,
|
|
96
138
|
label: `Redimensionner ${title}`
|
|
97
139
|
})
|
|
@@ -106,9 +106,52 @@ $gap: var(--egen-workbench-gap, 0.375rem);
|
|
|
106
106
|
background: var(--egen-workbench-card-bg, rgb(0 0 0 / 16%));
|
|
107
107
|
color: var(--colors-surface-foreground, #fff);
|
|
108
108
|
|
|
109
|
+
// Distance de glissement des animations d'ouverture/fermeture (classes egen-anim-*).
|
|
110
|
+
--egen-anim-distance: 0.75rem;
|
|
111
|
+
--egen-anim-duration: var(--egen-motion-zone, 300ms);
|
|
112
|
+
|
|
109
113
|
&[hidden] {
|
|
110
114
|
display: none;
|
|
111
115
|
}
|
|
116
|
+
|
|
117
|
+
// Pendant l'ouverture/fermeture la cellule de grille s'anime : on rogne le contenu et on le fige
|
|
118
|
+
// à la taille cible (pas de reflow du contenu à chaque image), sans toucher la poignée au repos.
|
|
119
|
+
&[data-phase='opening'],
|
|
120
|
+
&[data-phase='closing'] {
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&[data-phase='closing'] {
|
|
125
|
+
pointer-events: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&[data-phase='opening'] .zoneHeader,
|
|
129
|
+
&[data-phase='opening'] .zoneBody,
|
|
130
|
+
&[data-phase='closing'] .zoneHeader,
|
|
131
|
+
&[data-phase='closing'] .zoneBody {
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.zone-left[data-phase='opening'],
|
|
136
|
+
&.zone-left[data-phase='closing'],
|
|
137
|
+
&.zone-right[data-phase='opening'],
|
|
138
|
+
&.zone-right[data-phase='closing'] {
|
|
139
|
+
.zoneHeader,
|
|
140
|
+
.zoneBody {
|
|
141
|
+
min-width: var(--egen-zone-inner-size);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Zone droite : le contenu reste accroché au bord droit pendant que la cellule grandit vers la gauche.
|
|
146
|
+
&.zone-right[data-phase='opening'],
|
|
147
|
+
&.zone-right[data-phase='closing'] {
|
|
148
|
+
align-items: flex-end;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.zone-bottom[data-phase='opening'] .zoneBody,
|
|
152
|
+
&.zone-bottom[data-phase='closing'] .zoneBody {
|
|
153
|
+
min-height: var(--egen-zone-inner-size);
|
|
154
|
+
}
|
|
112
155
|
}
|
|
113
156
|
|
|
114
157
|
.zoneHeader {
|