@egen-civitas/esm-styleguide 1.14.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 +21 -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/index.d.ts +1 -0
- package/dist/workbench/index.d.ts.map +1 -1
- package/dist/workbench/index.js +1 -0
- package/dist/workbench/section-nav-panel.component.d.ts +16 -0
- package/dist/workbench/section-nav-panel.component.d.ts.map +1 -0
- package/dist/workbench/section-nav-panel.component.js +134 -0
- package/dist/workbench/section-nav-panel.module.scss +80 -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/use-tool-windows.d.ts +2 -1
- package/dist/workbench/use-tool-windows.d.ts.map +1 -1
- package/dist/workbench/use-tool-windows.js +3 -2
- package/dist/workbench/workbench-icons.d.ts.map +1 -1
- package/dist/workbench/workbench-icons.js +13 -2
- package/dist/workbench/workbench.module.scss +43 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
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
|
+
|
|
9
|
+
## 1.15.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- af95904: Rail gauche : options globales avec sous-options.
|
|
14
|
+
|
|
15
|
+
- `ToolWindowMeta.global` : une extension du slot `shell-rail-left-slot` (ou `shell-rail-bottom-slot`) déclarée avec `meta.global: true` reste affichée dans le rail quelle que soit l'app active, comme le rail droit. Sans ce drapeau, le comportement est inchangé (seules les extensions de l'app active apparaissent).
|
|
16
|
+
- Nouveau composant `SectionNavPanel` (`section`) : contenu prêt à l'emploi d'une option globale. Il liste, dans la zone gauche, les sous-options d'une section (entrées `NavEntryMeta` déclarées par l'app sur `topbar-level2-nav`), regroupées par `group`, avec icône, et navigue vers la route de la sous-option au clic ; la sous-option de la page courante est marquée active. La zone centrale se met à jour par la navigation habituelle.
|
|
17
|
+
- Liste blanche d'icônes du plan de travail étendue (`Calendar`, `CalendarCheck`, `Compass`, `Contact`, `FileCheck`, `FileText`, `Globe`, `Layers`, `Radio`, `Star`, `Zap`).
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [af95904]
|
|
22
|
+
- @egen-civitas/esm-extensions@1.4.0
|
|
23
|
+
|
|
3
24
|
## 1.14.0
|
|
4
25
|
|
|
5
26
|
### 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
|
+
}
|