@poadio/ui-elements 0.5.0 → 0.6.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 +26 -0
- package/dist/app-shell.d.ts +34 -0
- package/dist/app-shell.d.ts.map +1 -0
- package/dist/app-shell.js +112 -0
- package/dist/app-shell.js.map +1 -0
- package/dist/bottom-nav.d.ts +79 -0
- package/dist/bottom-nav.d.ts.map +1 -0
- package/dist/bottom-nav.js +86 -0
- package/dist/bottom-nav.js.map +1 -0
- package/dist/breakpoint.d.ts +47 -0
- package/dist/breakpoint.d.ts.map +1 -0
- package/dist/breakpoint.js +74 -0
- package/dist/breakpoint.js.map +1 -0
- package/dist/floating.d.ts +1 -0
- package/dist/floating.d.ts.map +1 -1
- package/dist/floating.js +3 -18
- package/dist/floating.js.map +1 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +262 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +137 -0
- package/dist/layout.js.map +1 -0
- package/dist/menubar.d.ts +96 -0
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +326 -0
- package/dist/menubar.js.map +1 -0
- package/dist/nav-drawer.d.ts +141 -0
- package/dist/nav-drawer.d.ts.map +1 -0
- package/dist/nav-drawer.js +204 -0
- package/dist/nav-drawer.js.map +1 -0
- package/package.json +2 -2
- package/src/app-shell.ts +101 -0
- package/src/bottom-nav.ts +126 -0
- package/src/breakpoint.ts +84 -0
- package/src/floating.ts +4 -19
- package/src/index.ts +18 -0
- package/src/layout.ts +272 -0
- package/src/menubar.ts +316 -0
- package/src/nav-drawer.ts +256 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <poad-nav-drawer value="home" items='[{"value":"home","label":"Home","icon":"home"},…]'>
|
|
3
|
+
* <strong slot="header">Acme</strong> <div slot="footer">…</div>
|
|
4
|
+
* </poad-nav-drawer>
|
|
5
|
+
*
|
|
6
|
+
* Tiroir de navigation : le menu principal de l'application, un composant pour trois états. En `auto` (défaut), le point
|
|
7
|
+
* de rupture de la fenêtre décide : colonne permanente au-dessus de `breakpoint`, tiroir par-dessus le contenu en
|
|
8
|
+
* dessous (ouvert par l'application : `open`, `show()`, `toggle()`), rail d'icônes sous `rail-below` s'il est donné.
|
|
9
|
+
* Intertitres (`section`), intertitres repliables (`collapsible`, clé `value`), destination courante (`value`, ou `url`
|
|
10
|
+
* égale à `current`). Tiroir ouvert : boîte de dialogue modale (voile, focus sur la destination courante et piégé, Échap,
|
|
11
|
+
* focus rendu). Clavier dans la liste : ↓ ↑ Début Fin, → ← sur un intertitre repliable.
|
|
12
|
+
*
|
|
13
|
+
* Décisions : module `nav-drawer` de @poadio/ui-core — même DOM, mêmes classes, même ARIA que `poad-nav-drawer`
|
|
14
|
+
* d'ui-angular. Les entrées à adresse sont des `<a href>` ; `itemclick` est annulable (routeur de l'application).
|
|
15
|
+
* Styles : `nav-drawer.css`, `icon.css`.
|
|
16
|
+
*/
|
|
17
|
+
import { BREAKPOINT_SERVER_WIDTH, breakpointOf, elementIsRtl, navDrawerBadge, navDrawerClasses, navDrawerFocusable, navDrawerIsActive, navDrawerItemProps, navDrawerKeydown, navDrawerModal, navDrawerMode, navDrawerPanelProps, navDrawerPick, navDrawerRows, navDrawerSectionCount, navDrawerShouldClose, navDrawerToggle, } from '@poadio/ui-core';
|
|
18
|
+
import { slotted } from './card.js';
|
|
19
|
+
import { h } from './dom.js';
|
|
20
|
+
import { PoadElement } from './element.js';
|
|
21
|
+
import { FocusTrap, lockScroll } from './floating.js';
|
|
22
|
+
import { icon } from './icon.js';
|
|
23
|
+
/**
|
|
24
|
+
* Tiroir de navigation.
|
|
25
|
+
* @slot header Contenu de l'en-tête (logo…) ; sans lui : `icon` et `title`.
|
|
26
|
+
* @slot footer Pied du tiroir (compte, déconnexion…).
|
|
27
|
+
* @fires itemclick Une entrée est choisie (pas une entrée désactivée), même déjà courante ; `detail` : `{ item, originalEvent }`. Annulable : `preventDefault()` empêche la navigation du lien, le changement de valeur et la fermeture.
|
|
28
|
+
* @fires change La destination courante change ; `detail` : sa valeur.
|
|
29
|
+
* @fires openchange Le tiroir s'ouvre ou se ferme de lui-même (Échap, voile, choix d'une entrée) ; `detail` : l'ouverture.
|
|
30
|
+
* @fires collapsedchange Un intertitre est plié ou déplié ; `detail` : les clés repliées.
|
|
31
|
+
*/
|
|
32
|
+
export class PoadNavDrawerElement extends PoadElement {
|
|
33
|
+
static props = {
|
|
34
|
+
items: 'json', value: 'string', current: 'string', open: 'boolean', collapsed: 'json', mode: 'string', breakpoint: 'string', railBelow: 'string', position: 'string',
|
|
35
|
+
heading: 'string', icon: 'string', ariaLabel: 'string', closeOnNavigate: 'boolean', closeOnEscape: 'boolean', dismissableScrim: 'boolean',
|
|
36
|
+
};
|
|
37
|
+
stopResize = null;
|
|
38
|
+
lastMode = null;
|
|
39
|
+
trap = new FocusTrap();
|
|
40
|
+
unlock = null;
|
|
41
|
+
onEscape = (e) => {
|
|
42
|
+
if (e.key === 'Escape' && navDrawerShouldClose('escape', this.effective(), !!this.open, { closeOnEscape: this.closeOnEscape }))
|
|
43
|
+
this.setOpen(false);
|
|
44
|
+
};
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
super.connectedCallback();
|
|
47
|
+
const win = this.ownerDocument.defaultView;
|
|
48
|
+
if (this.stopResize || !this.content || !win)
|
|
49
|
+
return;
|
|
50
|
+
const onResize = () => { if (this.effective() !== this.lastMode)
|
|
51
|
+
this.update(); };
|
|
52
|
+
win.addEventListener('resize', onResize, { passive: true });
|
|
53
|
+
this.ownerDocument.addEventListener('keydown', this.onEscape);
|
|
54
|
+
this.stopResize = () => { win.removeEventListener('resize', onResize); this.ownerDocument.removeEventListener('keydown', this.onEscape); };
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
super.disconnectedCallback();
|
|
58
|
+
this.stopResize?.();
|
|
59
|
+
this.stopResize = null;
|
|
60
|
+
this.trap.sync(null, false);
|
|
61
|
+
this.unlock?.();
|
|
62
|
+
this.unlock = null;
|
|
63
|
+
}
|
|
64
|
+
/** Mode effectif : `auto` se résout au point de rupture de la fenêtre. */
|
|
65
|
+
effective() {
|
|
66
|
+
const bp = breakpointOf(this.ownerDocument.defaultView?.innerWidth ?? BREAKPOINT_SERVER_WIDTH);
|
|
67
|
+
return navDrawerMode(this.mode, bp, this.breakpoint || 'md', this.railBelow ?? '');
|
|
68
|
+
}
|
|
69
|
+
/** Ouvre le tiroir. */
|
|
70
|
+
show() { this.open = true; }
|
|
71
|
+
/** Ferme le tiroir. */
|
|
72
|
+
hide() { this.open = false; }
|
|
73
|
+
/** Bascule l'ouverture du tiroir. */
|
|
74
|
+
toggle() { this.open = !this.open; }
|
|
75
|
+
setOpen(next) {
|
|
76
|
+
if (next === !!this.open)
|
|
77
|
+
return;
|
|
78
|
+
this.open = next;
|
|
79
|
+
this.emit('openchange', next);
|
|
80
|
+
}
|
|
81
|
+
setCollapsed(next) {
|
|
82
|
+
this.collapsed = next;
|
|
83
|
+
this.emit('collapsedchange', next);
|
|
84
|
+
}
|
|
85
|
+
pick(it, e) {
|
|
86
|
+
const { action, close } = navDrawerPick(this.value ?? null, it, this.effective(), this.closeOnNavigate !== false);
|
|
87
|
+
if (action === 'none') {
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const go = this.dispatchEvent(new CustomEvent('itemclick', { detail: { item: it, originalEvent: e }, bubbles: true, composed: true, cancelable: true }));
|
|
92
|
+
if (!go) {
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (action === 'change') {
|
|
97
|
+
this.value = it.value;
|
|
98
|
+
this.emit('change', it.value);
|
|
99
|
+
}
|
|
100
|
+
if (close)
|
|
101
|
+
this.setOpen(false);
|
|
102
|
+
}
|
|
103
|
+
rows(mode) {
|
|
104
|
+
return navDrawerRows(Array.isArray(this.items) ? this.items : [], Array.isArray(this.collapsed) ? this.collapsed : [], mode === 'rail');
|
|
105
|
+
}
|
|
106
|
+
onListKey(e) {
|
|
107
|
+
const from = Number(e.target.closest('[data-row]')?.getAttribute('data-row') ?? NaN);
|
|
108
|
+
if (Number.isNaN(from))
|
|
109
|
+
return;
|
|
110
|
+
const rows = this.rows(this.effective());
|
|
111
|
+
const step = navDrawerKeydown(rows, from, e.key, elementIsRtl(this));
|
|
112
|
+
if (!step)
|
|
113
|
+
return;
|
|
114
|
+
e.preventDefault();
|
|
115
|
+
if ('toggle' in step) {
|
|
116
|
+
this.setCollapsed(navDrawerToggle(this.collapsed, step.toggle));
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (navDrawerFocusable(rows[step.focus]))
|
|
120
|
+
this.querySelector(`.poad-nav-drawer__list [data-row="${step.focus}"]`)?.focus();
|
|
121
|
+
}
|
|
122
|
+
updated() {
|
|
123
|
+
super.updated();
|
|
124
|
+
const mode = this.lastMode;
|
|
125
|
+
// Repasser en colonne laisse un tiroir « ouvert » qui n'a plus de sens : on le solde.
|
|
126
|
+
if (mode !== 'temporary' && this.open) {
|
|
127
|
+
this.setOpen(false);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const modal = navDrawerModal(mode, !!this.open);
|
|
131
|
+
this.trap.sync(modal ? this.querySelector('.poad-nav-drawer__panel') : null, true);
|
|
132
|
+
// Tiroir ouvert : la page derrière le voile ne défile plus.
|
|
133
|
+
if (modal && !this.unlock)
|
|
134
|
+
this.unlock = lockScroll();
|
|
135
|
+
else if (!modal && this.unlock) {
|
|
136
|
+
this.unlock();
|
|
137
|
+
this.unlock = null;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
render() {
|
|
141
|
+
const mode = this.effective();
|
|
142
|
+
this.lastMode = mode;
|
|
143
|
+
const open = !!this.open;
|
|
144
|
+
const rail = mode === 'rail';
|
|
145
|
+
const modal = navDrawerModal(mode, open);
|
|
146
|
+
const icons = this.icons();
|
|
147
|
+
const p = navDrawerPanelProps(mode, open);
|
|
148
|
+
const header = slotted(this.content, 'header'), footer = slotted(this.content, 'footer');
|
|
149
|
+
const rows = this.rows(mode).map((r, i) => {
|
|
150
|
+
const it = r.item;
|
|
151
|
+
if (it.section) {
|
|
152
|
+
if (rail)
|
|
153
|
+
return h('li', { class: 'poad-nav-drawer__rule', role: 'separator' });
|
|
154
|
+
if (r.collapsible) {
|
|
155
|
+
return h('li', {}, h('button', {
|
|
156
|
+
type: 'button', class: ['poad-nav-drawer__section', { 'is-collapsible': true, 'is-collapsed': r.collapsed }], 'aria-expanded': r.collapsed ? 'false' : 'true', 'data-row': String(i),
|
|
157
|
+
onclick: () => this.setCollapsed(navDrawerToggle(this.collapsed, r.key)),
|
|
158
|
+
}, [
|
|
159
|
+
icon(icons, 'chevron-down', { size: 12, class: 'poad-nav-drawer__chev' }),
|
|
160
|
+
h('span', { class: 'poad-nav-drawer__label' }, it.label),
|
|
161
|
+
h('span', { class: 'poad-nav-drawer__badge' }, navDrawerSectionCount(r)),
|
|
162
|
+
]));
|
|
163
|
+
}
|
|
164
|
+
return h('li', { class: 'poad-nav-drawer__section' }, it.label);
|
|
165
|
+
}
|
|
166
|
+
const active = navDrawerIsActive(it, this.value ?? null, this.current ?? null);
|
|
167
|
+
const a = navDrawerItemProps(it, active, rail);
|
|
168
|
+
const b = navDrawerBadge(it, rail);
|
|
169
|
+
const body = [
|
|
170
|
+
it.icon ? icon(icons, it.icon, { size: 17 }) : null,
|
|
171
|
+
!rail ? h('span', { class: 'poad-nav-drawer__label' }, it.label) : null,
|
|
172
|
+
b.show && !b.dot ? h('span', { class: 'poad-nav-drawer__badge' }, b.text) : null,
|
|
173
|
+
b.dot ? h('span', { class: 'poad-nav-drawer__dot', title: b.text }) : null,
|
|
174
|
+
];
|
|
175
|
+
const common = {
|
|
176
|
+
'aria-current': a['aria-current'] ?? undefined, 'aria-label': a['aria-label'] ?? undefined, title: a.title ?? undefined, 'data-row': String(i),
|
|
177
|
+
'data-poad-autofocus': active ? '' : undefined, onclick: (e) => this.pick(it, e),
|
|
178
|
+
};
|
|
179
|
+
const el = it.url && !it.disabled
|
|
180
|
+
? h('a', { href: it.url, target: it.target, class: ['poad-nav-drawer__item', { 'is-active': active }], ...common }, body)
|
|
181
|
+
: h('button', { type: 'button', class: ['poad-nav-drawer__item', a.classes], disabled: !!it.disabled, ...common }, body);
|
|
182
|
+
return h('li', {}, el);
|
|
183
|
+
});
|
|
184
|
+
return h('div', { class: ['poad-nav-drawer', navDrawerClasses(mode, open, this.position || 'left')] }, [
|
|
185
|
+
modal ? h('div', {
|
|
186
|
+
class: 'poad-nav-drawer__scrim', 'aria-hidden': 'true',
|
|
187
|
+
onclick: () => { if (navDrawerShouldClose('scrim', this.effective(), !!this.open, { dismissableScrim: this.dismissableScrim }))
|
|
188
|
+
this.setOpen(false); },
|
|
189
|
+
}) : null,
|
|
190
|
+
h('nav', {
|
|
191
|
+
class: 'poad-nav-drawer__panel', tabindex: '-1', 'aria-label': this.ariaLabel || this.i18n().t('nav.mainMenu'),
|
|
192
|
+
'aria-hidden': p['aria-hidden'] ?? undefined, inert: p.inert ?? undefined, role: p.role ?? undefined, 'aria-modal': p['aria-modal'] ?? undefined,
|
|
193
|
+
}, [
|
|
194
|
+
h('div', { class: 'poad-nav-drawer__head' }, header.length ? header : [
|
|
195
|
+
this.icon ? icon(icons, this.icon, { size: 18 }) : null,
|
|
196
|
+
!rail && this.heading ? h('b', {}, this.heading) : null,
|
|
197
|
+
]),
|
|
198
|
+
h('ul', { class: 'poad-nav-drawer__list', role: 'list', onkeydown: (e) => this.onListKey(e) }, rows),
|
|
199
|
+
h('div', { class: ['poad-nav-drawer__foot', { 'is-empty': !footer.length }] }, footer),
|
|
200
|
+
]),
|
|
201
|
+
]);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingUR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KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,SAAS;aACjJ,EAAE;gBACD,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;oBACpE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;oBACvD,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;iBACxD,CAAC;gBACF,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC;gBACnH,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,uBAAuB,EAAE,EAAE,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC;aACvF,CAAC;SACH,CAAC,CAAC;IACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poadio/ui-elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Framework-free web components of the poad UI library (<poad-switch>, <poad-button>, <poad-field>, <poad-select>, named icons, badge, tag, chip, avatar, divider, skeleton, progress, meter, message, checkbox, radio, toggle button, segmented, button group, fields, tooltip, popover, colorpicker, tabs, accordion, stepper, menu, split button, multiselect, combo, datepicker, dialog, drawer, poadConfirm(), poadToast()) built on @poadio/ui-core (state machines, shared CSS, message catalogue). Light DOM (one CSS for every renderer), form-associated through ElementInternals, safe to import on a server. For vanilla pages, Svelte, Solid or server-rendered HTML.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "poad — Stéphane Zuccatti",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"i18n:check": "node ../../tools/check-i18n.mjs ui-elements"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@poadio/ui-core": "^0.
|
|
40
|
+
"@poadio/ui-core": "^0.6.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^24.0.0",
|
package/src/app-shell.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <poad-app-shell>
|
|
3
|
+
* <poad-menubar slot="bar" …></poad-menubar> <poad-nav-drawer slot="nav" …></poad-nav-drawer>
|
|
4
|
+
* contenu de la page
|
|
5
|
+
* <poad-bottom-nav slot="bottom" …></poad-bottom-nav>
|
|
6
|
+
* </poad-app-shell>
|
|
7
|
+
*
|
|
8
|
+
* Coquille d'application : barre haute sur toute la largeur, menu dessous à gauche, contenu, barre basse. La coquille ne
|
|
9
|
+
* défile pas (hauteur de la fenêtre, `100dvh`, ou `--poad-shell-height`) : seul le contenu défile, les barres restent en
|
|
10
|
+
* place parce qu'elles ne peuvent pas bouger. Elle mesure ses zones et publie `--poad-shell-top`, `--poad-shell-bottom` et
|
|
11
|
+
* `--poad-shell-nav` (un toast, une feuille, un bouton flottant s'y placent sans rien importer). Elle ne possède pas le
|
|
12
|
+
* menu : sous le seuil mobile (`compact`), elle cesse de lui réserver une colonne, et `openNav()` (appelé par n'importe
|
|
13
|
+
* quel enfant : `el.closest('poad-app-shell').openNav()`) émet `navrequested` — c'est l'application qui ouvre son tiroir.
|
|
14
|
+
*
|
|
15
|
+
* Décisions : module `app-shell` de @poadio/ui-core — même DOM, mêmes classes que `poad-app-shell` d'ui-angular. Le
|
|
16
|
+
* contenu peut changer après coup : un enfant ajouté à la coquille (avec ou sans `slot`) rejoint sa zone, un enfant
|
|
17
|
+
* retiré la quitte. Styles : `app-shell.css`.
|
|
18
|
+
*/
|
|
19
|
+
import {
|
|
20
|
+
APP_SHELL_NO_METRICS, BREAKPOINT_SERVER_WIDTH, appShellClasses, appShellCompact, appShellMeasure, appShellMetrics, appShellStyle, breakpointState,
|
|
21
|
+
type AppShellMetrics,
|
|
22
|
+
} from '@poadio/ui-core';
|
|
23
|
+
import { slotted, unslotted } from './card.js';
|
|
24
|
+
import { h, type Child } from './dom.js';
|
|
25
|
+
import { PoadElement } from './element.js';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Coquille d'application.
|
|
29
|
+
* @slot bar Barre haute, sur toute la largeur (barre de menus…).
|
|
30
|
+
* @slot nav Menu, colonne de gauche (tiroir de navigation).
|
|
31
|
+
* @slot default Le contenu : le seul élément qui défile.
|
|
32
|
+
* @slot bottom Barre basse, sur toute la largeur (barre de navigation basse).
|
|
33
|
+
* @fires navrequested Un enfant a demandé le menu (`openNav()`) : l'application ouvre son tiroir.
|
|
34
|
+
*/
|
|
35
|
+
export class PoadAppShellElement extends PoadElement {
|
|
36
|
+
static override props = { compactAt: 'number' } as const;
|
|
37
|
+
/** Surcharge locale du seuil, en px. Par défaut : le seuil mobile de la bibliothèque (`md`). */
|
|
38
|
+
declare compactAt?: number | null;
|
|
39
|
+
private metrics: AppShellMetrics = APP_SHELL_NO_METRICS;
|
|
40
|
+
private lastCompact: boolean | null = null;
|
|
41
|
+
private stop: (() => void) | null = null;
|
|
42
|
+
|
|
43
|
+
/** Sous le seuil mobile (ou sous `compactAt`). */
|
|
44
|
+
get compact(): boolean {
|
|
45
|
+
return appShellCompact(breakpointState(this.ownerDocument.defaultView?.innerWidth ?? BREAKPOINT_SERVER_WIDTH), this.compactAt ?? null);
|
|
46
|
+
}
|
|
47
|
+
/** Hauteur mesurée de la barre haute, en px. */
|
|
48
|
+
get topHeight(): number { return this.metrics.top; }
|
|
49
|
+
/** Hauteur mesurée de la barre basse, en px. */
|
|
50
|
+
get bottomHeight(): number { return this.metrics.bottom; }
|
|
51
|
+
/** Largeur mesurée du menu, en px. */
|
|
52
|
+
get navWidth(): number { return this.metrics.nav; }
|
|
53
|
+
/** Demande l'ouverture du menu, sans connaître le composant qui le porte : émet `navrequested`. */
|
|
54
|
+
openNav(): void { this.emit('navrequested'); }
|
|
55
|
+
|
|
56
|
+
override connectedCallback(): void {
|
|
57
|
+
super.connectedCallback();
|
|
58
|
+
const win = this.ownerDocument.defaultView;
|
|
59
|
+
if (this.stop || !this.content || !win) return;
|
|
60
|
+
const onResize = () => { if (this.compact !== this.lastCompact) this.update(); };
|
|
61
|
+
win.addEventListener('resize', onResize, { passive: true });
|
|
62
|
+
// Contenu changé par l'application : un enfant ajouté à la coquille rejoint sa zone, un enfant retiré la quitte.
|
|
63
|
+
const mo = new MutationObserver((records) => {
|
|
64
|
+
let changed = false;
|
|
65
|
+
for (const r of records) {
|
|
66
|
+
for (const n of r.removedNodes) if (this.content?.includes(n) && !this.contains(n)) { this.content = this.content.filter((c) => c !== n); changed = true; }
|
|
67
|
+
if (r.target === this) for (const n of r.addedNodes) if (!this.content?.includes(n) && !(n instanceof Element && n.classList.contains('poad-app-shell'))) { this.content = [...(this.content ?? []), n]; changed = true; }
|
|
68
|
+
}
|
|
69
|
+
if (changed) this.update();
|
|
70
|
+
});
|
|
71
|
+
mo.observe(this, { childList: true, subtree: true });
|
|
72
|
+
let ro: ResizeObserver | null = null;
|
|
73
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
74
|
+
ro = new ResizeObserver(() => {
|
|
75
|
+
const zone = (z: 'bar' | 'nav' | 'bottom') => this.querySelector<HTMLElement>(`:scope > .poad-app-shell > .poad-shell__${z}`);
|
|
76
|
+
const m = (z: 'bar' | 'nav' | 'bottom') => { const el = zone(z); return el ? appShellMeasure(z, el.getBoundingClientRect()) : 0; };
|
|
77
|
+
const next = appShellMetrics(this.metrics, { top: m('bar'), bottom: m('bottom'), nav: m('nav') });
|
|
78
|
+
if (next !== this.metrics) { this.metrics = next; this.update(); }
|
|
79
|
+
});
|
|
80
|
+
for (const z of ['bar', 'nav', 'bottom']) { const el = this.querySelector(`:scope > .poad-app-shell > .poad-shell__${z}`); if (el) ro.observe(el); }
|
|
81
|
+
}
|
|
82
|
+
this.stop = () => { win.removeEventListener('resize', onResize); mo.disconnect(); ro?.disconnect(); };
|
|
83
|
+
}
|
|
84
|
+
override disconnectedCallback(): void {
|
|
85
|
+
super.disconnectedCallback();
|
|
86
|
+
this.stop?.();
|
|
87
|
+
this.stop = null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
protected render(): Child {
|
|
91
|
+
const compact = this.compact;
|
|
92
|
+
this.lastCompact = compact;
|
|
93
|
+
const content = this.content;
|
|
94
|
+
return h('div', { class: ['poad-app-shell', appShellClasses(compact)], style: appShellStyle(this.metrics) }, [
|
|
95
|
+
h('div', { class: 'poad-shell__bar' }, slotted(content, 'bar')),
|
|
96
|
+
h('div', { class: 'poad-shell__nav' }, slotted(content, 'nav')),
|
|
97
|
+
h('div', { class: 'poad-shell__main' }, unslotted(content)),
|
|
98
|
+
h('div', { class: 'poad-shell__bottom' }, slotted(content, 'bottom')),
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <poad-bottom-nav value="home" labels="selected" items='[{"value":"home","label":"Home","icon":"home"},…]'></poad-bottom-nav>
|
|
3
|
+
*
|
|
4
|
+
* Barre de navigation basse : trois à cinq destinations à portée de pouce, sur mobile seulement (au-dessus de
|
|
5
|
+
* `breakpoint`, rien n'est rendu, sauf `always-show`). Région `<nav>` nommée par le catalogue (`nav.mainNavigation`) ;
|
|
6
|
+
* la destination courante porte `aria-current="page"` et une pastille pleine en plus de la couleur ; comptes plafonnés
|
|
7
|
+
* à « 99+ » ou simple point ; zone sûre des téléphones à encoche réservée. Décisions : module `bottom-nav` de
|
|
8
|
+
* @poadio/ui-core — même DOM, mêmes classes, même ARIA que `poad-bottom-nav` d'ui-angular. Les destinations à adresse
|
|
9
|
+
* sont des `<a href>` ; `itemclick` est annulable (routeur de l'application). Styles : `bottom-nav.css`, `icon.css`.
|
|
10
|
+
*/
|
|
11
|
+
import {
|
|
12
|
+
BOTTOM_NAV_MAX, BREAKPOINT_SERVER_WIDTH, bottomNavBadge, bottomNavIcon, bottomNavItemProps, bottomNavPick, bottomNavShowLabel, bottomNavShown, bottomNavVisible, breakpointOf,
|
|
13
|
+
type BottomNavLabels, type Breakpoint,
|
|
14
|
+
} from '@poadio/ui-core';
|
|
15
|
+
import { h, type Child } from './dom.js';
|
|
16
|
+
import { PoadElement } from './element.js';
|
|
17
|
+
import { icon } from './icon.js';
|
|
18
|
+
|
|
19
|
+
/** Une destination de la barre basse. Pas de sous-niveau : c'est le principe du composant. */
|
|
20
|
+
export interface PoadBottomNavItem {
|
|
21
|
+
/** Identifiant stable, rendu par `change` et comparé à `value`. */
|
|
22
|
+
readonly value: string;
|
|
23
|
+
/** Libellé sous l'icône. */
|
|
24
|
+
readonly label: string;
|
|
25
|
+
/** Icône (nom du jeu d'icônes). */
|
|
26
|
+
readonly icon: string;
|
|
27
|
+
/** Icône affichée quand la destination est active (variante pleine, par exemple). */
|
|
28
|
+
readonly activeIcon?: string;
|
|
29
|
+
/** Adresse : la destination devient un lien `<a href>`. */
|
|
30
|
+
readonly url?: string;
|
|
31
|
+
/** Pastille de comptage. `true` affiche un simple point. */
|
|
32
|
+
readonly badge?: string | number | boolean;
|
|
33
|
+
/** Destination désactivée. */
|
|
34
|
+
readonly disabled?: boolean;
|
|
35
|
+
/** Libellé lu par un lecteur d'écran s'il doit différer du libellé visible. */
|
|
36
|
+
readonly ariaLabel?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Barre de navigation basse.
|
|
41
|
+
* @fires itemclick Une destination est choisie, même déjà courante (pas une destination désactivée) ; `detail` : `{ item, originalEvent }`. Annulable : `preventDefault()` empêche la navigation du lien et le changement de valeur.
|
|
42
|
+
* @fires change La destination courante change ; `detail` : sa valeur.
|
|
43
|
+
*/
|
|
44
|
+
export class PoadBottomNavElement extends PoadElement {
|
|
45
|
+
static override props = { items: 'json', value: 'string', labels: 'string', maxItems: 'number', breakpoint: 'string', alwaysShow: 'boolean', ariaLabel: 'string' } as const;
|
|
46
|
+
/** Les destinations (3 à 5). */
|
|
47
|
+
declare items?: readonly PoadBottomNavItem[];
|
|
48
|
+
/** Destination courante. */
|
|
49
|
+
declare value?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Quand afficher le libellé sous l'icône : toujours, sur la destination courante, jamais.
|
|
52
|
+
* @default 'always'
|
|
53
|
+
*/
|
|
54
|
+
declare labels?: BottomNavLabels;
|
|
55
|
+
/**
|
|
56
|
+
* Au-delà, les destinations en trop ne sont pas affichées (prévoir une destination « Plus »).
|
|
57
|
+
* @default 5
|
|
58
|
+
*/
|
|
59
|
+
declare maxItems?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Seuil de la fenêtre au-delà duquel la barre disparaît : elle n'a de sens que sur petit écran.
|
|
62
|
+
* @default 'md'
|
|
63
|
+
*/
|
|
64
|
+
declare breakpoint?: Breakpoint;
|
|
65
|
+
/** Affichée quel que soit le seuil (démonstration). */
|
|
66
|
+
declare alwaysShow?: boolean;
|
|
67
|
+
/** Nom accessible (attribut `aria-label`) ; par défaut le message `nav.mainNavigation` du catalogue. */
|
|
68
|
+
declare ariaLabel: string | null;
|
|
69
|
+
private stopResize: (() => void) | null = null;
|
|
70
|
+
private lastVisible: boolean | null = null;
|
|
71
|
+
|
|
72
|
+
override connectedCallback(): void {
|
|
73
|
+
super.connectedCallback();
|
|
74
|
+
const win = this.ownerDocument.defaultView;
|
|
75
|
+
if (this.stopResize || !this.content || !win) return;
|
|
76
|
+
const onResize = () => { if (this.visible() !== this.lastVisible) this.update(); };
|
|
77
|
+
win.addEventListener('resize', onResize, { passive: true });
|
|
78
|
+
this.stopResize = () => win.removeEventListener('resize', onResize);
|
|
79
|
+
}
|
|
80
|
+
override disconnectedCallback(): void {
|
|
81
|
+
super.disconnectedCallback();
|
|
82
|
+
this.stopResize?.();
|
|
83
|
+
this.stopResize = null;
|
|
84
|
+
}
|
|
85
|
+
private visible(): boolean {
|
|
86
|
+
const bp = breakpointOf(this.ownerDocument.defaultView?.innerWidth ?? BREAKPOINT_SERVER_WIDTH);
|
|
87
|
+
return bottomNavVisible(bp, this.breakpoint || 'md', !!this.alwaysShow);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private pick(it: PoadBottomNavItem, e: MouseEvent): void {
|
|
91
|
+
const action = bottomNavPick(this.value ?? null, it);
|
|
92
|
+
if (action === 'none') { e.preventDefault(); return; }
|
|
93
|
+
const go = this.dispatchEvent(new CustomEvent('itemclick', { detail: { item: it, originalEvent: e }, bubbles: true, composed: true, cancelable: true }));
|
|
94
|
+
if (!go) { e.preventDefault(); return; }
|
|
95
|
+
if (action === 'click') return;
|
|
96
|
+
this.value = it.value;
|
|
97
|
+
this.emit('change', it.value);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
protected render(): Child {
|
|
101
|
+
const visible = this.visible();
|
|
102
|
+
this.lastVisible = visible;
|
|
103
|
+
if (!visible) return null;
|
|
104
|
+
const icons = this.icons();
|
|
105
|
+
const items = Array.isArray(this.items) ? this.items : [];
|
|
106
|
+
return h('nav', { class: 'poad-bottom-nav', 'aria-label': this.ariaLabel || this.i18n().t('nav.mainNavigation') }, h('ul', { class: 'poad-bottom-nav__list', role: 'list' },
|
|
107
|
+
bottomNavShown(items, this.maxItems ?? BOTTOM_NAV_MAX).map((it) => {
|
|
108
|
+
const active = (this.value ?? null) === it.value;
|
|
109
|
+
const a = bottomNavItemProps(it, active);
|
|
110
|
+
const b = bottomNavBadge(it.badge);
|
|
111
|
+
const body: Child[] = [
|
|
112
|
+
h('span', { class: 'poad-bottom-nav__icon' }, [
|
|
113
|
+
h('span', { class: 'poad-bottom-nav__pill', 'aria-hidden': 'true' }),
|
|
114
|
+
icon(icons, bottomNavIcon(it, active), { size: 22 }),
|
|
115
|
+
b.show ? h('span', { class: ['poad-bottom-nav__badge', { 'is-dot': b.dot }] }, b.text) : null,
|
|
116
|
+
]),
|
|
117
|
+
bottomNavShowLabel(this.labels, active) ? h('span', { class: 'poad-bottom-nav__label' }, it.label) : null,
|
|
118
|
+
];
|
|
119
|
+
const common = { 'aria-current': a['aria-current'] ?? undefined, 'aria-label': a['aria-label'] ?? undefined, onclick: (e: MouseEvent) => this.pick(it, e) };
|
|
120
|
+
const el = it.url && !it.disabled
|
|
121
|
+
? h('a', { href: it.url, class: ['poad-bottom-nav__item', { 'is-active': active }], ...common }, body)
|
|
122
|
+
: h('button', { type: 'button', class: ['poad-bottom-nav__item', a.classes], disabled: !!it.disabled, ...common }, body);
|
|
123
|
+
return h('li', {}, el);
|
|
124
|
+
})));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <poad-if when="md+">…contenu…</poad-if> rendu seulement au-dessus de md
|
|
3
|
+
* <poad-if when="mobile"><nav>…</nav><p slot="fallback">…</p></poad-if>
|
|
4
|
+
* const stop = watchBreakpoint((bp) => …); le point de rupture, suivi (script)
|
|
5
|
+
*
|
|
6
|
+
* Points de rupture de la FENÊTRE (xs < 640, sm ≥ 640, md ≥ 768, lg ≥ 1024, xl ≥ 1280, 2xl ≥ 1536), suivis au
|
|
7
|
+
* redimensionnement — l'équivalent du service `PoadBreakpointService` et de la directive `*poadIf` d'ui-angular.
|
|
8
|
+
* Décisions de @poadio/ui-core (`breakpointState`, `breakpointShows`). L'élément ne dessine rien lui-même
|
|
9
|
+
* (`display: contents`, comme tous les hôtes) : son contenu est retiré du document quand l'expression ne correspond pas (pas seulement
|
|
10
|
+
* masqué), puis reposé tel quel (mêmes nœuds, leur état gardé).
|
|
11
|
+
*/
|
|
12
|
+
import { BREAKPOINT_MOBILE, BREAKPOINT_SERVER_WIDTH, BREAKPOINT_TOUCH_QUERY, breakpointShows, breakpointState, type Breakpoint, type BreakpointState } from '@poadio/ui-core';
|
|
13
|
+
import { slotted, unslotted } from './card.js';
|
|
14
|
+
import { PoadElement } from './element.js';
|
|
15
|
+
|
|
16
|
+
/** État de la fenêtre `win` (pointeur grossier compris). */
|
|
17
|
+
function stateOf(win: Window | null, mobile: Breakpoint): BreakpointState {
|
|
18
|
+
const touch = !!win && typeof win.matchMedia === 'function' && win.matchMedia(BREAKPOINT_TOUCH_QUERY).matches;
|
|
19
|
+
return breakpointState(win?.innerWidth ?? BREAKPOINT_SERVER_WIDTH, touch, mobile);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Suit le point de rupture de la fenêtre : `listener` est appelé tout de suite, puis à chaque changement de point de
|
|
24
|
+
* rupture ou de pointeur. Rend la fonction qui arrête le suivi.
|
|
25
|
+
*/
|
|
26
|
+
export function watchBreakpoint(listener: (state: BreakpointState) => void, options: { readonly mobile?: Breakpoint; readonly window?: Window } = {}): () => void {
|
|
27
|
+
const win = options.window ?? (typeof window === 'undefined' ? null : window);
|
|
28
|
+
const mobile = options.mobile ?? BREAKPOINT_MOBILE;
|
|
29
|
+
let last = stateOf(win, mobile);
|
|
30
|
+
listener(last);
|
|
31
|
+
if (!win) return () => {};
|
|
32
|
+
const check = () => {
|
|
33
|
+
const next = stateOf(win, mobile);
|
|
34
|
+
if (next.current === last.current && next.touch === last.touch) return;
|
|
35
|
+
last = next;
|
|
36
|
+
listener(next);
|
|
37
|
+
};
|
|
38
|
+
const mq = typeof win.matchMedia === 'function' ? win.matchMedia(BREAKPOINT_TOUCH_QUERY) : null;
|
|
39
|
+
win.addEventListener('resize', check, { passive: true });
|
|
40
|
+
mq?.addEventListener('change', check);
|
|
41
|
+
return () => { win.removeEventListener('resize', check); mq?.removeEventListener('change', check); };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Contenu rendu selon le point de rupture de la fenêtre.
|
|
46
|
+
* @slot default Contenu rendu quand l'expression correspond.
|
|
47
|
+
* @slot fallback Contenu rendu à la place quand elle ne correspond pas.
|
|
48
|
+
*/
|
|
49
|
+
export class PoadIfElement extends PoadElement {
|
|
50
|
+
static override props = { when: 'string', mobile: 'string' } as const;
|
|
51
|
+
/**
|
|
52
|
+
* Expression de point de rupture : `'md+'` (≥ md), `'sm-'` (≤ sm), `'sm..lg'`, `'xs'`, `'md,xl'`, `'mobile'`,
|
|
53
|
+
* `'desktop'`, `'touch'`. Vide : toujours rendu.
|
|
54
|
+
*/
|
|
55
|
+
declare when?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Seuil mobile des expressions `mobile` / `desktop`.
|
|
58
|
+
* @default 'md'
|
|
59
|
+
*/
|
|
60
|
+
declare mobile?: Breakpoint;
|
|
61
|
+
private stop: (() => void) | null = null;
|
|
62
|
+
|
|
63
|
+
override connectedCallback(): void {
|
|
64
|
+
super.connectedCallback();
|
|
65
|
+
if (this.stop || !this.content) return;
|
|
66
|
+
const win = this.ownerDocument.defaultView;
|
|
67
|
+
if (!win) return;
|
|
68
|
+
const onResize = () => this.update();
|
|
69
|
+
const mq = typeof win.matchMedia === 'function' ? win.matchMedia(BREAKPOINT_TOUCH_QUERY) : null;
|
|
70
|
+
win.addEventListener('resize', onResize, { passive: true });
|
|
71
|
+
mq?.addEventListener('change', onResize);
|
|
72
|
+
this.stop = () => { win.removeEventListener('resize', onResize); mq?.removeEventListener('change', onResize); };
|
|
73
|
+
}
|
|
74
|
+
override disconnectedCallback(): void {
|
|
75
|
+
super.disconnectedCallback();
|
|
76
|
+
this.stop?.();
|
|
77
|
+
this.stop = null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
protected render() {
|
|
81
|
+
const state = stateOf(this.ownerDocument.defaultView, this.mobile || BREAKPOINT_MOBILE);
|
|
82
|
+
return breakpointShows(this.when, state) ? unslotted(this.content) : slotted(this.content, 'fallback');
|
|
83
|
+
}
|
|
84
|
+
}
|
package/src/floating.ts
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* compensé, mais s'il coupe, il coupe aussi le flottant.
|
|
12
12
|
*/
|
|
13
13
|
import {
|
|
14
|
-
FOCUSABLE_SELECTOR, FOCUS_AUTOFOCUS_ATTR, SHEET_ANIM_MS,
|
|
15
|
-
focusTrapTab,
|
|
14
|
+
FOCUSABLE_SELECTOR, FOCUS_AUTOFOCUS_ATTR, SHEET_ANIM_MS, lockDocumentScroll, dismissDecision, elementIsRtl, floatingPlacement, focusTrapInitial,
|
|
15
|
+
focusTrapTab, sheetDialogProps, sheetDragOffset, sheetDragStarts, sheetDragTransform, sheetHeightClass, sheetHeightCss, sheetRelease,
|
|
16
16
|
type DismissPolicy, type DismissReason, type FloatingAlign, type FloatingPlacement, type FloatingPosition, type FloatingSide, type FocusCandidate,
|
|
17
17
|
type IconRegistry, type SheetHeight,
|
|
18
18
|
} from '@poadio/ui-core';
|
|
@@ -171,24 +171,9 @@ export class FocusTrap {
|
|
|
171
171
|
|
|
172
172
|
// ───────────────────────────── blocage du défilement ─────────────────────────────
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
let saved: { overflow: string; paddingInlineEnd: string } | null = null;
|
|
176
|
-
|
|
174
|
+
/** Bloque le défilement de la page : `lockDocumentScroll` d'ui-core (compteur par document, partagé par tous les rendus). */
|
|
177
175
|
export function lockScroll(): () => void {
|
|
178
|
-
|
|
179
|
-
if (locks.acquire()) {
|
|
180
|
-
saved = { overflow: root.style.overflow, paddingInlineEnd: root.style.paddingInlineEnd };
|
|
181
|
-
const s = scrollLockStyle(window.innerWidth - root.clientWidth, parseFloat(getComputedStyle(root).paddingInlineEnd) || 0);
|
|
182
|
-
root.style.overflow = s.overflow;
|
|
183
|
-
if (s.paddingInlineEnd) root.style.paddingInlineEnd = s.paddingInlineEnd;
|
|
184
|
-
}
|
|
185
|
-
return () => {
|
|
186
|
-
if (locks.release() && saved) {
|
|
187
|
-
root.style.overflow = saved.overflow;
|
|
188
|
-
root.style.paddingInlineEnd = saved.paddingInlineEnd;
|
|
189
|
-
saved = null;
|
|
190
|
-
}
|
|
191
|
-
};
|
|
176
|
+
return lockDocumentScroll(document);
|
|
192
177
|
}
|
|
193
178
|
|
|
194
179
|
// ───────────────────────────── présence (animations d'entrée et de sortie) ─────────────────────────────
|
package/src/index.ts
CHANGED
|
@@ -58,6 +58,12 @@ import { PoadSpeedDialElement } from './speed-dial.js';
|
|
|
58
58
|
import { PoadListboxElement } from './listbox.js';
|
|
59
59
|
import { PoadUploadElement } from './upload.js';
|
|
60
60
|
import { PoadCarouselElement } from './carousel.js';
|
|
61
|
+
import { PoadIfElement } from './breakpoint.js';
|
|
62
|
+
import { PoadMenubarElement } from './menubar.js';
|
|
63
|
+
import { PoadBottomNavElement } from './bottom-nav.js';
|
|
64
|
+
import { PoadNavDrawerElement } from './nav-drawer.js';
|
|
65
|
+
import { PoadAppShellElement } from './app-shell.js';
|
|
66
|
+
import { PoadCenterElement, PoadClusterElement, PoadContainerElement, PoadGridElement, PoadSidebarElement, PoadSpacerElement, PoadSplitElement, PoadStackElement } from './layout.js';
|
|
61
67
|
import { PoadMultiselectElement } from './multiselect.js';
|
|
62
68
|
import { PoadComboElement } from './combo.js';
|
|
63
69
|
import { PoadDatepickerElement } from './datepicker.js';
|
|
@@ -86,6 +92,8 @@ export const POAD_ELEMENTS = {
|
|
|
86
92
|
table: PoadTableElement, paginator: PoadPaginatorElement, 'table-panel': PoadTablePanelElement, 'filter-chip': PoadFilterChipElement,
|
|
87
93
|
breadcrumb: PoadBreadcrumbElement, timeline: PoadTimelineElement, 'scroll-top': PoadScrollTopElement, block: PoadBlockElement, image: PoadImageElement,
|
|
88
94
|
splitter: PoadSplitterElement, 'splitter-panel': PoadSplitterPanelElement, 'speed-dial': PoadSpeedDialElement, listbox: PoadListboxElement, upload: PoadUploadElement, carousel: PoadCarouselElement,
|
|
95
|
+
if: PoadIfElement, menubar: PoadMenubarElement, 'bottom-nav': PoadBottomNavElement, 'nav-drawer': PoadNavDrawerElement, 'app-shell': PoadAppShellElement, stack: PoadStackElement, cluster: PoadClusterElement, grid: PoadGridElement, split: PoadSplitElement, sidebar: PoadSidebarElement,
|
|
96
|
+
center: PoadCenterElement, container: PoadContainerElement, spacer: PoadSpacerElement,
|
|
89
97
|
} as const;
|
|
90
98
|
|
|
91
99
|
export interface DefineElementsOptions {
|
|
@@ -133,11 +141,21 @@ export {
|
|
|
133
141
|
PoadConfirmDialogElement, PoadToastElement, PoadTableElement, PoadPaginatorElement, PoadCardElement, PoadPanelElement, PoadFieldsetElement,
|
|
134
142
|
PoadTablePanelElement, PoadFilterChipElement,
|
|
135
143
|
PoadBreadcrumbElement, PoadTimelineElement, PoadScrollTopElement, PoadBlockElement, PoadImageElement, PoadSplitterElement, PoadSplitterPanelElement, PoadSpeedDialElement, PoadListboxElement, PoadUploadElement, PoadCarouselElement,
|
|
144
|
+
PoadIfElement, PoadStackElement, PoadClusterElement, PoadGridElement, PoadSplitElement, PoadSidebarElement, PoadCenterElement, PoadContainerElement, PoadSpacerElement,
|
|
145
|
+
PoadMenubarElement, PoadBottomNavElement, PoadNavDrawerElement, PoadAppShellElement,
|
|
136
146
|
};
|
|
147
|
+
/** Types de la mise en page. */
|
|
148
|
+
export type { LayoutGap, LayoutAlign, LayoutJustify, LayoutContainerSize } from '@poadio/ui-core';
|
|
149
|
+
export { watchBreakpoint } from './breakpoint.js';
|
|
150
|
+
/** Types des points de rupture. */
|
|
151
|
+
export type { Breakpoint, BreakpointState } from '@poadio/ui-core';
|
|
137
152
|
export { poadConfirm, type PoadConfirmOptions } from './confirm.js';
|
|
138
153
|
export { poadToast, createPoadToastService, type PoadToastService, type PoadToastMessage, type PoadToastAction } from './toast.js';
|
|
139
154
|
export type { PoadComboSource } from './combo.js';
|
|
140
155
|
export type { PoadMenuItem, MenuPoint } from './menu.js';
|
|
156
|
+
export type { PoadMenubarItem, PoadMenubarColumn } from './menubar.js';
|
|
157
|
+
export type { PoadBottomNavItem } from './bottom-nav.js';
|
|
158
|
+
export type { PoadNavDrawerItem } from './nav-drawer.js';
|
|
141
159
|
export type { PoadBreadcrumbItem } from './breadcrumb.js';
|
|
142
160
|
export type { PoadTimelineRender } from './timeline.js';
|
|
143
161
|
export type { PoadCarouselRender } from './carousel.js';
|