@egen-civitas/esm-styleguide 1.15.0 → 1.17.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 +20 -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/content-section/content-section.component.d.ts +4 -0
- package/dist/content-section/content-section.component.d.ts.map +1 -1
- package/dist/content-section/content-section.component.js +4 -0
- package/dist/public.d.ts +3 -0
- package/dist/public.d.ts.map +1 -1
- package/dist/public.js +3 -0
- package/dist/section/index.d.ts +6 -0
- package/dist/section/index.d.ts.map +1 -0
- package/dist/section/index.js +5 -0
- package/dist/section/section-action.component.d.ts +31 -0
- package/dist/section/section-action.component.d.ts.map +1 -0
- package/dist/section/section-action.component.js +51 -0
- package/dist/section/section-grid.component.d.ts +38 -0
- package/dist/section/section-grid.component.d.ts.map +1 -0
- package/dist/section/section-grid.component.js +50 -0
- package/dist/section/section-parts.component.d.ts +14 -0
- package/dist/section/section-parts.component.d.ts.map +1 -0
- package/dist/section/section-parts.component.js +228 -0
- package/dist/section/section.component.d.ts +22 -0
- package/dist/section/section.component.d.ts.map +1 -0
- package/dist/section/section.component.js +192 -0
- package/dist/section/section.context.d.ts +21 -0
- package/dist/section/section.context.d.ts.map +1 -0
- package/dist/section/section.context.js +21 -0
- package/dist/section/section.types.d.ts +140 -0
- package/dist/section/section.types.d.ts.map +1 -0
- package/dist/section/section.types.js +1 -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.d.ts +1 -1
- package/dist/workbench/tool-window-rail.component.d.ts.map +1 -1
- package/dist/workbench/tool-window-rail.component.js +20 -9
- 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 +5 -3
- package/dist/workbench/workbench.module.scss +43 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @egen-civitas/esm-styleguide
|
|
2
2
|
|
|
3
|
+
## 1.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0978f93: Rails : le rail droit porte aussi un groupe bas ; `ToolWindowMeta.rail` ('left' par défaut | 'right') choisit le rail d'une option de la zone basse (pleine largeur entre les rails).
|
|
8
|
+
- 5e15585: Ajout du squelette `Section` (Tailwind) : en-tête / corps / pied séparés par un trait fin sans bordure ni fond, dispositions configurables (`headerLayout`, `footerLayout`), repli optionnel, `classNames` par partie et variables CSS `--section-*`. Livré avec `SectionAction` (boutons de contrôle / filtres) et `SectionGrid` (grille responsive par colonnes ou par largeur minimale de carte). `ContentSection` est conservé et marqué `@deprecated`.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [0978f93]
|
|
13
|
+
- Updated dependencies [ac88343]
|
|
14
|
+
- @egen-civitas/esm-extensions@1.5.0
|
|
15
|
+
- @egen-civitas/esm-globals@1.0.3
|
|
16
|
+
|
|
17
|
+
## 1.16.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 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.
|
|
22
|
+
|
|
3
23
|
## 1.15.0
|
|
4
24
|
|
|
5
25
|
### 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
|
+
}
|
|
@@ -24,6 +24,10 @@ export interface ContentSectionProps {
|
|
|
24
24
|
children?: React.ReactNode;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
+
* @deprecated Préférer `Section` (en-tête / corps / pied, trait fin, repli,
|
|
28
|
+
* dispositions configurables). `ContentSection` est conservé tel quel pour ne
|
|
29
|
+
* casser aucun consommateur (HeroMosaic, vitrine).
|
|
30
|
+
*
|
|
27
31
|
* Squelette réutilisable pour une section de contenu de page : un titre
|
|
28
32
|
* optionnel, une description optionnelle, un slot d'actions optionnel
|
|
29
33
|
* (ex. « Voir tout ») et une zone de contenu libre.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-section.component.d.ts","sourceRoot":"","sources":["../../src/content-section/content-section.component.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,EAAE,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,2FAA2F;IAC3F,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,iDAAiD;IACjD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED
|
|
1
|
+
{"version":3,"file":"content-section.component.d.ts","sourceRoot":"","sources":["../../src/content-section/content-section.component.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,EAAE,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,2FAA2F;IAC3F,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,iDAAiD;IACjD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,EAAc,EACd,OAAuB,EACvB,KAAK,EACL,OAAc,EACd,WAAW,EACX,OAAO,EACP,SAAS,EACT,IAAY,EACZ,SAAS,EACT,QAAQ,GACT,EAAE,mBAAmB,qBA8BrB"}
|
|
@@ -2,6 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
/** @category Content Section */ import React from "react";
|
|
3
3
|
import styles from "./content-section.module.scss";
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated Préférer `Section` (en-tête / corps / pied, trait fin, repli,
|
|
6
|
+
* dispositions configurables). `ContentSection` est conservé tel quel pour ne
|
|
7
|
+
* casser aucun consommateur (HeroMosaic, vitrine).
|
|
8
|
+
*
|
|
5
9
|
* Squelette réutilisable pour une section de contenu de page : un titre
|
|
6
10
|
* optionnel, une description optionnelle, un slot d'actions optionnel
|
|
7
11
|
* (ex. « Voir tout ») et une zone de contenu libre.
|
package/dist/public.d.ts
CHANGED
|
@@ -34,13 +34,16 @@ 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';
|
|
40
41
|
export * from './content-section/index.js';
|
|
42
|
+
export * from './section/index.js';
|
|
41
43
|
export * from './hero-mosaic/index.js';
|
|
42
44
|
export * from './top-bar/index.js';
|
|
43
45
|
export * from './sites/index.js';
|
|
44
46
|
export * from './assistant/index.js';
|
|
45
47
|
export * from './filters/index.js';
|
|
48
|
+
export { Loader, type LoaderProps, showPageLoader, usePageLoading } from './spinner/index.js';
|
|
46
49
|
//# 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,oBAAoB,CAAC;AACnC,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,12 +31,15 @@ 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";
|
|
37
38
|
export * from "./content-section/index.js";
|
|
39
|
+
export * from "./section/index.js";
|
|
38
40
|
export * from "./hero-mosaic/index.js";
|
|
39
41
|
export * from "./top-bar/index.js";
|
|
40
42
|
export * from "./sites/index.js";
|
|
41
43
|
export * from "./assistant/index.js";
|
|
42
44
|
export * from "./filters/index.js";
|
|
45
|
+
export { Loader, showPageLoader, usePageLoading } from "./spinner/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/section/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @category Section */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface SectionActionProps {
|
|
4
|
+
/** Libellé visible. Omis : bouton icône seule (`label` devient alors obligatoire côté accessibilité). */
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** Icône avant le libellé. */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
/** Libellé accessible + infobulle (requis pour un bouton icône seule). */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Option sélectionnée (filtre, onglet) : fond marqué + `aria-pressed`. */
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/** `ghost` (défaut, sans fond), `outline` (contour fin) ou `solid` (couleur d'accent). */
|
|
13
|
+
variant?: 'ghost' | 'outline' | 'solid';
|
|
14
|
+
/** @default 'md' */
|
|
15
|
+
size?: 'sm' | 'md';
|
|
16
|
+
/** Rend un lien `<a>` au lieu d'un `<button>`. */
|
|
17
|
+
href?: string;
|
|
18
|
+
target?: string;
|
|
19
|
+
rel?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
type?: 'button' | 'submit' | 'reset';
|
|
22
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Bouton de contrôle pour l'en-tête ou le pied d'un `Section` : « Voir tout »,
|
|
27
|
+
* filtre, rafraîchir... Plusieurs `SectionAction` avec `active` forment un
|
|
28
|
+
* sélecteur d'options (filtres, onglets).
|
|
29
|
+
*/
|
|
30
|
+
export declare function SectionAction({ children, icon, label, active, variant, size, href, target, rel, disabled, type, onClick, className, }: SectionActionProps): React.JSX.Element;
|
|
31
|
+
//# sourceMappingURL=section-action.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-action.component.d.ts","sourceRoot":"","sources":["../../src/section/section-action.component.tsx"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,kBAAkB;IACjC,yGAAyG;IACzG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8BAA8B;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACxC,oBAAoB;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,MAAc,EACd,OAAiB,EACjB,IAAW,EACX,IAAI,EACJ,MAAM,EACN,GAAG,EACH,QAAQ,EACR,IAAe,EACf,OAAO,EACP,SAAS,GACV,EAAE,kBAAkB,qBAgEpB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/** @category Section */ import React from "react";
|
|
3
|
+
import { cn } from "../page-background/page-background.utils.js";
|
|
4
|
+
const SIZE = {
|
|
5
|
+
sm: {
|
|
6
|
+
text: 'h-7 px-2.5 text-xs',
|
|
7
|
+
icon: 'size-7'
|
|
8
|
+
},
|
|
9
|
+
md: {
|
|
10
|
+
text: 'h-8 px-3 text-[13px]',
|
|
11
|
+
icon: 'size-8'
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Bouton de contrôle pour l'en-tête ou le pied d'un `Section` : « Voir tout »,
|
|
16
|
+
* filtre, rafraîchir... Plusieurs `SectionAction` avec `active` forment un
|
|
17
|
+
* sélecteur d'options (filtres, onglets).
|
|
18
|
+
*/ export function SectionAction({ children, icon, label, active = false, variant = 'ghost', size = 'md', href, target, rel, disabled, type = 'button', onClick, className }) {
|
|
19
|
+
const iconOnly = !children;
|
|
20
|
+
const classes = cn('inline-flex shrink-0 cursor-pointer select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-md', 'font-medium leading-none no-underline outline-none transition-colors duration-150', 'focus-visible:ring-2 focus-visible:ring-(--section-accent,#34d399)/70', 'aria-disabled:pointer-events-none aria-disabled:opacity-40 disabled:pointer-events-none disabled:opacity-40', iconOnly ? cn(SIZE[size].icon, 'p-0') : SIZE[size].text, variant === 'solid' ? 'border-0 bg-(--section-accent,#10b981) text-white hover:brightness-110' : variant === 'outline' ? cn('border border-solid border-(--section-line,rgba(255,255,255,0.12))', active ? 'bg-(--section-fg,#fff)/12 text-(--section-fg,#fff)' : 'bg-transparent text-(--section-muted,rgba(255,255,255,0.65)) hover:bg-(--section-fg,#fff)/8 hover:text-(--section-fg,#fff)') : cn('border-0', active ? 'bg-(--section-fg,#fff)/12 text-(--section-fg,#fff)' : 'bg-transparent text-(--section-muted,rgba(255,255,255,0.65)) hover:bg-(--section-fg,#fff)/8 hover:text-(--section-fg,#fff)'), className);
|
|
21
|
+
const content = /*#__PURE__*/ _jsxs(_Fragment, {
|
|
22
|
+
children: [
|
|
23
|
+
icon,
|
|
24
|
+
children
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
if (href) {
|
|
28
|
+
return /*#__PURE__*/ _jsx("a", {
|
|
29
|
+
href: href,
|
|
30
|
+
target: target,
|
|
31
|
+
rel: rel ?? (target === '_blank' ? 'noreferrer noopener' : undefined),
|
|
32
|
+
title: label,
|
|
33
|
+
"aria-label": iconOnly ? label : undefined,
|
|
34
|
+
"aria-current": active || undefined,
|
|
35
|
+
"aria-disabled": disabled || undefined,
|
|
36
|
+
onClick: onClick,
|
|
37
|
+
className: classes,
|
|
38
|
+
children: content
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return /*#__PURE__*/ _jsx("button", {
|
|
42
|
+
type: type,
|
|
43
|
+
title: label,
|
|
44
|
+
"aria-label": iconOnly ? label : undefined,
|
|
45
|
+
"aria-pressed": active || undefined,
|
|
46
|
+
disabled: disabled,
|
|
47
|
+
onClick: onClick,
|
|
48
|
+
className: classes,
|
|
49
|
+
children: content
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** @category Section */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface SectionGridColumns {
|
|
4
|
+
/** Nombre de colonnes par défaut (mobile). */
|
|
5
|
+
base?: number;
|
|
6
|
+
sm?: number;
|
|
7
|
+
md?: number;
|
|
8
|
+
lg?: number;
|
|
9
|
+
xl?: number;
|
|
10
|
+
'2xl'?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface SectionGridProps {
|
|
13
|
+
/** @default 'div' */
|
|
14
|
+
as?: 'div' | 'ul' | 'ol';
|
|
15
|
+
/**
|
|
16
|
+
* Nombre de colonnes, fixe (`3`) ou par breakpoint (`{ base: 1, md: 2, xl: 4 }`).
|
|
17
|
+
* Un breakpoint omis reprend la valeur du précédent. Ignoré si `minItemWidth` est fourni.
|
|
18
|
+
* @default { base: 1, md: 2, lg: 3 }
|
|
19
|
+
*/
|
|
20
|
+
columns?: number | SectionGridColumns;
|
|
21
|
+
/**
|
|
22
|
+
* Largeur minimale d'une carte (ex. `'16rem'`) : le nombre de colonnes
|
|
23
|
+
* s'adapte alors à la largeur RÉELLE du conteneur — plus fiable que les
|
|
24
|
+
* breakpoints quand la grille vit dans une colonne de page.
|
|
25
|
+
*/
|
|
26
|
+
minItemWidth?: string;
|
|
27
|
+
/** @default 'md' */
|
|
28
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
29
|
+
className?: string;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Grille responsive pour le corps d'un `Section`. Les colonnes passent par des
|
|
34
|
+
* variables CSS (`--sg-*`) : n'importe quel nombre de colonnes est possible sans
|
|
35
|
+
* classe Tailwind dynamique (que le scanner ne verrait pas).
|
|
36
|
+
*/
|
|
37
|
+
export declare function SectionGrid({ as: Tag, columns, minItemWidth, gap, className, children, }: SectionGridProps): React.JSX.Element;
|
|
38
|
+
//# sourceMappingURL=section-grid.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-grid.component.d.ts","sourceRoot":"","sources":["../../src/section/section-grid.component.tsx"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAAC;IACtC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAcD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EAAE,GAAW,EACf,OAAyB,EACzB,YAAY,EACZ,GAAU,EACV,SAAS,EACT,QAAQ,GACT,EAAE,gBAAgB,qBAqClB"}
|