@poadio/ui-core 0.1.0 → 0.2.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 +49 -0
- package/README.md +16 -0
- package/accordion.css +29 -0
- package/combo.css +43 -0
- package/datepicker.css +80 -0
- package/dialog.css +119 -0
- package/dist/accordion/accordion.machine.d.ts +35 -0
- package/dist/accordion/accordion.machine.d.ts.map +1 -0
- package/dist/accordion/accordion.machine.js +38 -0
- package/dist/accordion/accordion.machine.js.map +1 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/combo/combo.machine.d.ts +106 -0
- package/dist/combo/combo.machine.d.ts.map +1 -0
- package/dist/combo/combo.machine.js +88 -0
- package/dist/combo/combo.machine.js.map +1 -0
- package/dist/combo/index.d.ts +2 -0
- package/dist/combo/index.d.ts.map +1 -0
- package/dist/combo/index.js +2 -0
- package/dist/combo/index.js.map +1 -0
- package/dist/datepicker/datepicker.machine.d.ts +223 -0
- package/dist/datepicker/datepicker.machine.d.ts.map +1 -0
- package/dist/datepicker/datepicker.machine.js +213 -0
- package/dist/datepicker/datepicker.machine.js.map +1 -0
- package/dist/datepicker/index.d.ts +2 -0
- package/dist/datepicker/index.d.ts.map +1 -0
- package/dist/datepicker/index.js +2 -0
- package/dist/datepicker/index.js.map +1 -0
- package/dist/dialog/dialog.machine.d.ts +145 -0
- package/dist/dialog/dialog.machine.d.ts.map +1 -0
- package/dist/dialog/dialog.machine.js +119 -0
- package/dist/dialog/dialog.machine.js.map +1 -0
- package/dist/dialog/index.d.ts +2 -0
- package/dist/dialog/index.d.ts.map +1 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.d.ts.map +1 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/index.js.map +1 -0
- package/dist/menu/menu.machine.d.ts +109 -0
- package/dist/menu/menu.machine.d.ts.map +1 -0
- package/dist/menu/menu.machine.js +118 -0
- package/dist/menu/menu.machine.js.map +1 -0
- package/dist/paginator/index.d.ts +2 -0
- package/dist/paginator/index.d.ts.map +1 -0
- package/dist/paginator/index.js +2 -0
- package/dist/paginator/index.js.map +1 -0
- package/dist/paginator/paginator.machine.d.ts +88 -0
- package/dist/paginator/paginator.machine.d.ts.map +1 -0
- package/dist/paginator/paginator.machine.js +82 -0
- package/dist/paginator/paginator.machine.js.map +1 -0
- package/dist/roving/index.d.ts +2 -0
- package/dist/roving/index.d.ts.map +1 -0
- package/dist/roving/index.js +2 -0
- package/dist/roving/index.js.map +1 -0
- package/dist/roving/roving.d.ts +26 -0
- package/dist/roving/roving.d.ts.map +1 -0
- package/dist/roving/roving.js +46 -0
- package/dist/roving/roving.js.map +1 -0
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.d.ts.map +1 -1
- package/dist/select/index.js +1 -0
- package/dist/select/index.js.map +1 -1
- package/dist/select/multiselect.d.ts +65 -0
- package/dist/select/multiselect.d.ts.map +1 -0
- package/dist/select/multiselect.js +70 -0
- package/dist/select/multiselect.js.map +1 -0
- package/dist/stepper/index.d.ts +2 -0
- package/dist/stepper/index.d.ts.map +1 -0
- package/dist/stepper/index.js +2 -0
- package/dist/stepper/index.js.map +1 -0
- package/dist/stepper/stepper.machine.d.ts +44 -0
- package/dist/stepper/stepper.machine.d.ts.map +1 -0
- package/dist/stepper/stepper.machine.js +48 -0
- package/dist/stepper/stepper.machine.js.map +1 -0
- package/dist/table/index.d.ts +5 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/index.js +5 -0
- package/dist/table/index.js.map +1 -0
- package/dist/table/table.keyboard.d.ts +41 -0
- package/dist/table/table.keyboard.d.ts.map +1 -0
- package/dist/table/table.keyboard.js +36 -0
- package/dist/table/table.keyboard.js.map +1 -0
- package/dist/table/table.machine.d.ts +158 -0
- package/dist/table/table.machine.d.ts.map +1 -0
- package/dist/table/table.machine.js +115 -0
- package/dist/table/table.machine.js.map +1 -0
- package/dist/table/table.selection.d.ts +54 -0
- package/dist/table/table.selection.d.ts.map +1 -0
- package/dist/table/table.selection.js +95 -0
- package/dist/table/table.selection.js.map +1 -0
- package/dist/table/table.sort.d.ts +65 -0
- package/dist/table/table.sort.d.ts.map +1 -0
- package/dist/table/table.sort.js +131 -0
- package/dist/table/table.sort.js.map +1 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/tabs/tabs.machine.d.ts +59 -0
- package/dist/tabs/tabs.machine.d.ts.map +1 -0
- package/dist/tabs/tabs.machine.js +58 -0
- package/dist/tabs/tabs.machine.js.map +1 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/index.js.map +1 -0
- package/dist/toast/toast.machine.d.ts +96 -0
- package/dist/toast/toast.machine.d.ts.map +1 -0
- package/dist/toast/toast.machine.js +79 -0
- package/dist/toast/toast.machine.js.map +1 -0
- package/menu.css +38 -0
- package/multiselect.css +62 -0
- package/package.json +23 -1
- package/paginator.css +23 -0
- package/src/accordion/accordion.machine.ts +46 -0
- package/src/accordion/index.ts +1 -0
- package/src/combo/combo.machine.ts +115 -0
- package/src/combo/index.ts +1 -0
- package/src/datepicker/datepicker.machine.ts +256 -0
- package/src/datepicker/index.ts +1 -0
- package/src/dialog/dialog.machine.ts +185 -0
- package/src/dialog/index.ts +1 -0
- package/src/index.ts +11 -0
- package/src/menu/index.ts +1 -0
- package/src/menu/menu.machine.ts +162 -0
- package/src/paginator/index.ts +1 -0
- package/src/paginator/paginator.machine.ts +89 -0
- package/src/roving/index.ts +1 -0
- package/src/roving/roving.ts +52 -0
- package/src/select/index.ts +1 -0
- package/src/select/multiselect.ts +82 -0
- package/src/stepper/index.ts +1 -0
- package/src/stepper/stepper.machine.ts +59 -0
- package/src/table/README.md +145 -0
- package/src/table/index.ts +4 -0
- package/src/table/table.keyboard.ts +73 -0
- package/src/table/table.machine.ts +150 -0
- package/src/table/table.selection.ts +101 -0
- package/src/table/table.sort.ts +120 -0
- package/src/tabs/index.ts +1 -0
- package/src/tabs/tabs.machine.ts +74 -0
- package/src/toast/index.ts +1 -0
- package/src/toast/toast.machine.ts +131 -0
- package/stepper.css +47 -0
- package/table.css +133 -0
- package/tabs.css +45 -0
- package/toast.css +43 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog — @poadio/ui-core
|
|
2
2
|
|
|
3
|
+
## 0.2.0 — 2026-11-24
|
|
4
|
+
|
|
5
|
+
### Niveau 5 : table, tranche 1 (en cours : Angular et React)
|
|
6
|
+
|
|
7
|
+
- Plan de portage de la table par tranches et inventaire complet des fonctionnalités d'ui-angular :
|
|
8
|
+
`src/table/README.md` (tranche 1 table simple ; 2 filtres et panneau ; 3 arbre et groupes ; 4 colonnes figées et
|
|
9
|
+
adaptation ; 5 défilement virtuel, ordre des lignes, édition ; 6 grille avec menu de colonne), et ce qui va dans le
|
|
10
|
+
socle ou dans les rendus. Aucune bibliothèque tierce.
|
|
11
|
+
- Modèle de table, tranche 1 (fonctions pures, testées dans Node) : colonnes (`tableColumnId`, `tableColumnAlign`,
|
|
12
|
+
`tableColumnSortField`, `tableResolve`, `tableFormatCell` par `Intl` dans la langue courante), tri
|
|
13
|
+
(`tableCollator` de la langue, `tableCompare`, `tableSortRows` stable multi-critères, `tableSortToggle`,
|
|
14
|
+
`tableSortTo`, `tableSortState`, `tableAriaSort` sur la première colonne seulement), pipeline (`tableView`,
|
|
15
|
+
`tablePageRows`), sélection générique (`tableToggleRow`, `tableSelectSingle`, `tableSelectOnly`, `tableSelectRange`,
|
|
16
|
+
`tableToggleAll`, `tableAllState`, `tableRowClickAction`), clavier de la grille (`tableGridKey` : motif « grid » de
|
|
17
|
+
WAI-ARIA, focus sur la ligne, plage à la Maj, Ctrl / ⌘ + A), attributs (`tableRootProps` : `grid` avec sélection,
|
|
18
|
+
`aria-rowcount` avec l'en-tête, `aria-multiselectable` ; `tableRowProps` : `aria-rowindex` compte tenu de la page,
|
|
19
|
+
`aria-selected`, focus itinérant) et classes. Mesure sur 10 000 lignes (`table.perf.test.ts`, sans barrière).
|
|
20
|
+
- Machine `paginator` : nombre de pages, page courante, liens avec ellipses, aller à une page, changer la taille de
|
|
21
|
+
page, retour quand `first` dépasse, rapport, évènement, attributs.
|
|
22
|
+
- Feuilles `table.css` (base de la table, sélecteurs ancrés sur la structure du gabarit pour ne pas viser le contenu
|
|
23
|
+
des cellules) et `paginator.css` (propriétés logiques).
|
|
24
|
+
|
|
25
|
+
### Niveau 4 : composés (en cours : Angular et React)
|
|
26
|
+
|
|
27
|
+
- Navigation : brique `roving` (focus itinérant : `rovingKeyTarget`, axe horizontal / vertical, sens de lecture, en
|
|
28
|
+
boucle ou non) ; machines `tabs` (onglet actif par valeur ou rang, choix, clavier, attributs `tab` / `tabpanel`,
|
|
29
|
+
panneaux paresseux et `keepAlive`), `accordion` (valeur ouverte, simple ou multiple, clavier entre en-têtes, région
|
|
30
|
+
inerte fermée), `stepper` (état affiché des étapes, mode linéaire, `stepperReachable`, attributs). Feuilles
|
|
31
|
+
`tabs.css`, `accordion.css`, `stepper.css` (écrites depuis les styles d'ui-angular, propriétés logiques).
|
|
32
|
+
- Menu : machine `menu` (élément actif, ↓ ↑ Début Fin, sous-menu par → ← Échap avec navigation à l'intérieur,
|
|
33
|
+
survol, activation et fermeture, attributs `menuitem`, chevron, feuille basse sauf menu contextuel à la souris,
|
|
34
|
+
positions `MENU_PLACEMENTS`) et bouton scindé (`splitButtonIconSize`, `splitButtonToggleProps`). Feuille `menu.css`.
|
|
35
|
+
- Choix multiples : compléments `multiselect*` de la machine `select` (bascule bornée par la limite, retrait d'une puce,
|
|
36
|
+
case « tout » tri-état et ses attributs, ce que montre le déclencheur, libellé compté, classes). Feuille
|
|
37
|
+
`multiselect.css`.
|
|
38
|
+
- Superpositions : machine `dialog` (tailles de la boîte et du tiroir, mode petit écran, classes et attributs du
|
|
39
|
+
conteneur, qui ferme quoi, placement de la couche, glissement, agrandissement) et les décisions de la confirmation
|
|
40
|
+
(`confirmDialogConfig`, `confirmAcceptSeverity`, `confirmIcon`, `confirmCanAccept`) ; machine `toast` (file
|
|
41
|
+
`createToastStore`, message complété, sévérités, icône, rôle et `aria-live`, synchronisation d'un conteneur — doublons,
|
|
42
|
+
trop-plein, retraits —, pause et reprise). Feuilles `dialog.css` (avec une couche `.poad-dialog-layer` pour les rendus
|
|
43
|
+
sans overlay du CDK) et `toast.css`.
|
|
44
|
+
- Sélecteur de date : machine `datepicker` sur les utilitaires de dates et `Intl` (grille de 6 semaines depuis le
|
|
45
|
+
premier jour de la semaine de la langue, libellés longs des jours, noms courts, clavier WAI-ARIA de la grille — jour,
|
|
46
|
+
semaine, mois, année, début et fin de semaine, sens de lecture —, choix unique / intervalle / plusieurs, bornes et
|
|
47
|
+
jours désactivés, format par langue et 12 / 24 h, lecture de la saisie, heure au pas, valeur ISO locale ou `Date`,
|
|
48
|
+
attributs). Feuille `datepicker.css`.
|
|
49
|
+
- Saisie avec suggestions : machine `combo` (libellé, filtre sans accents ni casse, clavier, choix, sortie du champ en
|
|
50
|
+
texte libre ou sélection forcée, attributs `combobox` / `option`, classes). Feuille `combo.css`.
|
|
51
|
+
|
|
3
52
|
## 0.1.0 — 2026-11-23
|
|
4
53
|
|
|
5
54
|
### Niveau 3 : les briques flottantes et les flottants
|
package/README.md
CHANGED
|
@@ -23,6 +23,14 @@ Le socle **sans framework** de la bibliothèque de composants de [poad](https://
|
|
|
23
23
|
d'options (`listboxMove`, `listboxTypeahead`). Décisions pures : le rendu mesure et écoute, le socle décide.
|
|
24
24
|
Styles : `floating.css` (couche `position: fixed` des rendus sans CDK), `sheet.css`, `tooltip.css`, `popover.css`,
|
|
25
25
|
`colorpicker.css`.
|
|
26
|
+
- **Composés** (niveau 4, en cours sur Angular et React) : focus itinérant (`rovingKeyTarget`), `tabs`, `accordion`,
|
|
27
|
+
`stepper`, `menu` (et bouton scindé), compléments `multiselect*` de la liste, `combo`, `dialog` (boîte, tiroir,
|
|
28
|
+
confirmation), `toast` (file `createToastStore` et synchronisation d'un conteneur), `datepicker` (grille `Intl` dans
|
|
29
|
+
la langue courante, clavier WAI-ARIA). Styles : `tabs.css`, `accordion.css`, `stepper.css`, `menu.css`,
|
|
30
|
+
`multiselect.css`, `combo.css`, `dialog.css`, `toast.css`, `datepicker.css`.
|
|
31
|
+
- **Table** (niveau 5, tranche 1 en cours sur Angular et React) : modèle sans framework (colonnes, tri par
|
|
32
|
+
`Intl.Collator` de la langue, pagination, sélection avec plage, clavier de grille, ARIA) et machine `paginator` ;
|
|
33
|
+
plan par tranches et inventaire : [`src/table/README.md`](src/table/README.md). Styles : `table.css`, `paginator.css`.
|
|
26
34
|
- **Icônes** : le jeu nommé (SVG 24×24 à trait, Lucide + dessins maison) et son registre `createIconRegistry()`,
|
|
27
35
|
le même pour tous les rendus.
|
|
28
36
|
|
|
@@ -112,6 +120,14 @@ import {
|
|
|
112
120
|
// flottants : info-bulle, popover, sélecteur de couleur
|
|
113
121
|
tooltipTransition, tooltipAnchorProps, tooltipProps, popoverToggle, popoverProps, popoverTriggerProps, popoverDismiss,
|
|
114
122
|
colorParse, colorFormat, colorpickerHsv, colorpickerView, colorpickerKey, colorpickerPoint, colorpickerWrite, /* … */
|
|
123
|
+
// composés (niveau 4)
|
|
124
|
+
rovingKeyTarget, tabsActiveIndex, tabsKeydown, tabsTabProps, accordionSet, accordionKeydown, stepperItemProps, stepperGoTo,
|
|
125
|
+
menuKeydown, menuActivate, menuItemProps, multiselectToggle, multiselectAllState, comboKeydown, comboPick, comboBlur,
|
|
126
|
+
dialogContainerClass, dialogWidth, dialogShouldClose, confirmDialogConfig, createToastStore, toastSync, datepickerRows,
|
|
127
|
+
datepickerGridKey, datepickerPickDay, datepickerParse, datepickerValue, /* … */
|
|
128
|
+
// table (niveau 5, tranche 1) et paginateur
|
|
129
|
+
tableSortRows, tableSortToggle, tableAriaSort, tableView, tableToggleRow, tableSelectRange, tableGridKey, tableRootProps,
|
|
130
|
+
tableRowProps, paginatorLinks, paginatorGoTo, paginatorChangeRows, paginatorReport, /* … */
|
|
115
131
|
// classes { nom: actif } → chaîne
|
|
116
132
|
classNames,
|
|
117
133
|
} from '@poadio/ui-core';
|
package/accordion.css
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @poadio/ui-core — accordéon (`.poad-accordion`, `.poad-accordion-panel`). Source unique du style pour tous les
|
|
3
|
+
* paquets de rendu : ui-angular l'inclut dans `poad-accordion` et `poad-accordion-panel` (encapsulation désactivée),
|
|
4
|
+
* les autres rendus le font charger par l'application. Ne lit que les jetons --poad-* (icônes : `icon.css`).
|
|
5
|
+
*
|
|
6
|
+
* Anatomie : racine `.poad-accordion` (`is-flush`) > des `.poad-accordion-panel` (`is-open`, `is-disabled` de
|
|
7
|
+
* `accordionPanelClasses()`) > `h3.poad-acc__h` > `button.poad-acc__hd` (`.poad-acc__chev`, icône, `.poad-acc__title`,
|
|
8
|
+
* `.poad-acc__extra`) ; `.poad-acc__wrap` (`role="region"`) > `.poad-acc__inner` > `.poad-acc__bd`.
|
|
9
|
+
* Écrit à partir des styles `:host` des deux composants Angular, une règle pour une règle : `:host(X)` →
|
|
10
|
+
* `.poad-accordion-panel X`, une partie → `.poad-accordion-panel .partie`.
|
|
11
|
+
*/
|
|
12
|
+
.poad-accordion { display: block; border: 1px solid var(--poad-border); border-radius: var(--poad-radius); overflow: hidden; background: var(--poad-surface); }
|
|
13
|
+
.poad-accordion.is-flush { border: 0; border-radius: 0; background: transparent; }
|
|
14
|
+
.poad-accordion-panel { display: block; border-bottom: 1px solid var(--poad-border); font-family: var(--poad-font); font-size: var(--poad-font-size); }
|
|
15
|
+
.poad-accordion-panel:last-child { border-bottom: 0; }
|
|
16
|
+
.poad-accordion-panel .poad-acc__h { margin: 0; font: inherit; }
|
|
17
|
+
.poad-accordion-panel .poad-acc__hd { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; font-weight: 500; cursor: pointer; background: var(--poad-bg-subtle); color: var(--poad-fg); transition: background var(--poad-dur); }
|
|
18
|
+
.poad-accordion-panel .poad-acc__hd:hover:not([disabled]) { background: var(--poad-hover); }
|
|
19
|
+
.poad-accordion-panel .poad-acc__hd:focus-visible { outline: 2px solid var(--poad-ring); outline-offset: -2px; }
|
|
20
|
+
.poad-accordion-panel .poad-acc__hd[disabled] { cursor: not-allowed; opacity: .55; }
|
|
21
|
+
.poad-accordion-panel .poad-acc__chev { color: var(--poad-fg-muted); transition: transform 160ms var(--poad-ease); }
|
|
22
|
+
.poad-accordion-panel.is-open .poad-acc__chev { transform: rotate(90deg); }
|
|
23
|
+
.poad-accordion-panel .poad-acc__title { flex: 1; }
|
|
24
|
+
.poad-accordion-panel .poad-acc__extra { margin-inline-start: auto; display: inline-flex; gap: 6px; }
|
|
25
|
+
.poad-accordion-panel .poad-acc__wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 160ms var(--poad-ease); }
|
|
26
|
+
.poad-accordion-panel.is-open .poad-acc__wrap { grid-template-rows: 1fr; }
|
|
27
|
+
.poad-accordion-panel .poad-acc__inner { overflow: hidden; min-height: 0; }
|
|
28
|
+
.poad-accordion-panel .poad-acc__bd { padding: 10px 12px 12px; font-size: 12.5px; color: var(--poad-fg-secondary); }
|
|
29
|
+
@media (prefers-reduced-motion: reduce) { .poad-accordion-panel .poad-acc__wrap, .poad-accordion-panel .poad-acc__chev { transition: none; } }
|
package/combo.css
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @poadio/ui-core — saisie avec suggestions (`.poad-combo`). Source unique du style pour tous les paquets de rendu :
|
|
3
|
+
* ui-angular l'inclut dans `poad-combo` (encapsulation désactivée), les autres rendus le font charger par
|
|
4
|
+
* l'application. Ne lit que les jetons --poad-* (icônes : `icon.css` ; flottant : `floating.css`).
|
|
5
|
+
*
|
|
6
|
+
* Anatomie : racine `.poad-combo` (`is-open`, `is-disabled`, `is-invalid`, `size-sm|lg` de `comboRootClasses()`) >
|
|
7
|
+
* `.st` (`st--multi`) > puces `.st__chips` / `.st__chip`, champ `input.st__input` (`role="combobox"`), `.st__spin`,
|
|
8
|
+
* `.st__clear`, `.st__dd` (`.st__chev`). Couche du panneau `.poad-combo-pane` (pane de l'overlay du CDK en Angular,
|
|
9
|
+
* `.poad-floating` ailleurs) > `.sp` > `ul.cb__list` (`role="listbox"`) > `li[role="option"]` (`is-active`, `is-on`)
|
|
10
|
+
* ou `li.sp__empty`.
|
|
11
|
+
* Écrit à partir des styles `:host` du composant Angular (déclencheur commun des sélecteurs, `POAD_SELECT_TRIGGER_STYLES`,
|
|
12
|
+
* et les siens), une règle pour une règle : `:host(X)` → `.poad-combo X`, une partie du champ → `.poad-combo .partie`,
|
|
13
|
+
* une partie du panneau → `.poad-combo-pane .partie` (la couche porte cette classe : mêmes spécificités qu'encapsulé).
|
|
14
|
+
*/
|
|
15
|
+
.poad-combo { display: inline-flex; width: 100%; box-sizing: border-box; font-family: var(--poad-font); font-size: var(--poad-font-size); color: var(--poad-fg); vertical-align: middle; }
|
|
16
|
+
.poad-combo .st { display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; min-height: var(--poad-control-h); padding-block: 0; padding-inline: var(--poad-control-px) 8px; background: var(--poad-input-bg); border: 1px solid var(--poad-input-border); border-radius: var(--poad-radius); cursor: pointer; outline: none; user-select: none; transition: border-color var(--poad-dur) var(--poad-ease), box-shadow var(--poad-dur) var(--poad-ease); }
|
|
17
|
+
.poad-combo.size-sm .st { min-height: var(--poad-control-h-sm); font-size: var(--poad-font-size-sm); border-radius: var(--poad-radius-sm); }
|
|
18
|
+
.poad-combo.size-lg .st { min-height: var(--poad-control-h-lg); font-size: var(--poad-font-size-lg); }
|
|
19
|
+
.poad-combo .st:focus-visible, .poad-combo .st:focus-within, .poad-combo.is-open .st { border-color: var(--poad-accent); box-shadow: 0 0 0 3px var(--poad-ring); }
|
|
20
|
+
.poad-combo.is-invalid .st { border-color: var(--poad-danger); }
|
|
21
|
+
.poad-combo.is-invalid.is-open .st, .poad-combo.is-invalid .st:focus-within { box-shadow: 0 0 0 3px var(--poad-danger-soft); }
|
|
22
|
+
.poad-combo.is-disabled .st { opacity: .6; cursor: not-allowed; background: var(--poad-bg-subtle); }
|
|
23
|
+
.poad-combo .st__val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
|
|
24
|
+
.poad-combo .st__val.is-ph { color: var(--poad-fg-muted); }
|
|
25
|
+
.poad-combo .st__chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; padding: 3px 0; }
|
|
26
|
+
.poad-combo .st__chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding-block: 0; padding-inline: 8px 6px; border-radius: 999px; background: var(--poad-accent-soft); color: var(--poad-accent); font-size: var(--poad-font-size-sm); font-weight: 500; }
|
|
27
|
+
.poad-combo .st__chip button { all: unset; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; cursor: pointer; }
|
|
28
|
+
.poad-combo .st__chip button:hover { background: rgba(0,0,0,.08); }
|
|
29
|
+
.poad-combo .st__input { flex: 1; min-width: 40px; border: 0; outline: 0; background: transparent; color: var(--poad-fg); font: inherit; padding: 0; height: calc(var(--poad-control-h) - 2px); }
|
|
30
|
+
.poad-combo .st__input::placeholder { color: var(--poad-fg-muted); }
|
|
31
|
+
.poad-combo .st__chev { color: var(--poad-fg-muted); flex: none; transition: transform var(--poad-dur) var(--poad-ease); }
|
|
32
|
+
.poad-combo.is-open .st__chev { transform: rotate(180deg); }
|
|
33
|
+
.poad-combo .st__clear, .poad-combo .st__dd { all: unset; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--poad-fg-muted); cursor: pointer; }
|
|
34
|
+
.poad-combo .st__clear:hover, .poad-combo .st__dd:hover { color: var(--poad-fg); background: var(--poad-hover); }
|
|
35
|
+
.poad-combo .st__spin { color: var(--poad-fg-muted); }
|
|
36
|
+
.poad-combo-pane .sp { display: flex; flex-direction: column; box-sizing: border-box; background: var(--poad-overlay); --poad-hover: var(--poad-overlay-hover); border: 1px solid var(--poad-border); border-radius: 9px; box-shadow: var(--poad-shadow-lg); overflow: hidden; font-family: var(--poad-font); font-size: var(--poad-font-size); color: var(--poad-fg); }
|
|
37
|
+
.poad-combo-pane .sp__empty { padding: 12px; text-align: center; color: var(--poad-fg-muted); font-size: var(--poad-font-size-sm); }
|
|
38
|
+
.poad-combo .st { cursor: text; }
|
|
39
|
+
.poad-combo .st--multi { align-items: flex-start; }
|
|
40
|
+
.poad-combo-pane .cb__list { list-style: none; margin: 0; padding: 4px; overflow: auto; }
|
|
41
|
+
.poad-combo-pane .cb__list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
|
|
42
|
+
.poad-combo-pane .cb__list li.is-active { background: var(--poad-hover); }
|
|
43
|
+
.poad-combo-pane .cb__list li.is-on { background: var(--poad-accent-soft); color: var(--poad-accent); font-weight: 500; }
|
package/datepicker.css
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @poadio/ui-core — sélecteur de date (`.poad-datepicker`). Source unique du style pour tous les paquets de rendu :
|
|
3
|
+
* ui-angular l'inclut dans `poad-datepicker` (encapsulation désactivée), les autres rendus le font charger par
|
|
4
|
+
* l'application. Ne lit que les jetons --poad-* (icônes : `icon.css` ; flottant : `floating.css` ; feuille basse :
|
|
5
|
+
* `sheet.css`, qui porte les ajustements tactiles du calendrier).
|
|
6
|
+
*
|
|
7
|
+
* Anatomie : racine `.poad-datepicker` (`is-open`, `is-disabled`, `is-invalid`, `is-inline`, `size-sm|lg` de
|
|
8
|
+
* `datepickerRootClasses()`) > `.poad-dp__box` > `input.poad-dp__input` (`role="combobox"`) et boutons `.poad-dp__btn`
|
|
9
|
+
* (`.poad-dp__cal`). Panneau `.poad-dp__panel` (`role="dialog"`, hors de la racine quand il flotte ; `is-inline`,
|
|
10
|
+
* `is-sheet`) > `.poad-dp__head` (`.poad-dp__nav`, `.poad-dp__title`), grille `.poad-dp__grid` (`role="grid"`,
|
|
11
|
+
* `has-week`) > `.poad-dp__row` > `button.poad-dp__day` (`is-out`, `is-today`, `is-sel`, `in-range`, `range-start`,
|
|
12
|
+
* `range-end`, `is-hover-range`) ; vues `.poad-dp__cells` ; heure `.poad-dp__time` ; barre `.poad-dp__bar`.
|
|
13
|
+
* Écrit à partir des styles `:host` du composant Angular, une règle pour une règle : `:host(X)` →
|
|
14
|
+
* `.poad-datepicker X`, une partie du champ → `.poad-datepicker .partie`, une partie du panneau →
|
|
15
|
+
* `.poad-dp__panel .partie`. (Les arrondis des extrémités d'un intervalle restent physiques, comme dans ui-angular.)
|
|
16
|
+
*/
|
|
17
|
+
.poad-datepicker { display: inline-block; width: 100%; font-family: var(--poad-font); font-size: var(--poad-font-size); color: var(--poad-fg); }
|
|
18
|
+
.poad-datepicker.is-inline { width: auto; }
|
|
19
|
+
.poad-datepicker .poad-dp__box { display: flex; align-items: stretch; height: var(--poad-control-h); background: var(--poad-input-bg); border: 1px solid var(--poad-input-border); border-radius: var(--poad-radius); transition: border-color var(--poad-dur), box-shadow var(--poad-dur); cursor: text; }
|
|
20
|
+
.poad-datepicker.size-sm .poad-dp__box { height: var(--poad-control-h-sm); font-size: var(--poad-font-size-sm); border-radius: var(--poad-radius-sm); }
|
|
21
|
+
.poad-datepicker.size-lg .poad-dp__box { height: var(--poad-control-h-lg); font-size: var(--poad-font-size-lg); }
|
|
22
|
+
.poad-datepicker .poad-dp__box:focus-within, .poad-datepicker.is-open .poad-dp__box { border-color: var(--poad-accent); box-shadow: 0 0 0 3px var(--poad-ring); }
|
|
23
|
+
.poad-datepicker.is-invalid .poad-dp__box { border-color: var(--poad-danger); }
|
|
24
|
+
.poad-datepicker.is-invalid .poad-dp__box:focus-within { box-shadow: 0 0 0 3px var(--poad-danger-soft); }
|
|
25
|
+
.poad-datepicker.is-disabled .poad-dp__box { opacity: .6; background: var(--poad-bg-subtle); cursor: not-allowed; }
|
|
26
|
+
.poad-datepicker .poad-dp__input { flex: 1 1 0; width: 0; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; padding: 0 var(--poad-control-px); font-variant-numeric: tabular-nums; cursor: inherit; }
|
|
27
|
+
.poad-datepicker .poad-dp__input::placeholder { color: var(--poad-fg-muted); }
|
|
28
|
+
.poad-datepicker .poad-dp__btn { border: 0; background: transparent; color: var(--poad-fg-muted); cursor: pointer; padding: 0 8px; display: grid; place-items: center; }
|
|
29
|
+
.poad-datepicker .poad-dp__btn:hover { color: var(--poad-fg); }
|
|
30
|
+
.poad-datepicker .poad-dp__cal { padding-inline-end: 10px; }
|
|
31
|
+
|
|
32
|
+
.poad-dp__panel { background: var(--poad-overlay); --poad-hover: var(--poad-overlay-hover); border: 1px solid var(--poad-border); border-radius: 10px; box-shadow: var(--poad-shadow-lg); padding: 10px; width: 272px; box-sizing: border-box; user-select: none; }
|
|
33
|
+
.poad-dp__panel.is-inline { box-shadow: none; background: var(--poad-surface); }
|
|
34
|
+
.poad-dp__panel .poad-dp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
|
|
35
|
+
.poad-dp__panel .poad-dp__nav { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--poad-fg-secondary); cursor: pointer; display: grid; place-items: center; }
|
|
36
|
+
.poad-dp__panel .poad-dp__nav:hover { background: var(--poad-hover); color: var(--poad-fg); }
|
|
37
|
+
.poad-dp__panel .poad-dp__title { display: inline-flex; gap: 4px; font-weight: 600; text-transform: capitalize; }
|
|
38
|
+
.poad-dp__panel .poad-dp__title button { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; padding: 3px 6px; border-radius: 6px; cursor: pointer; text-transform: capitalize; }
|
|
39
|
+
.poad-dp__panel .poad-dp__title button:hover { background: var(--poad-hover); }
|
|
40
|
+
.poad-dp__panel .poad-dp__grid { display: grid; gap: 2px; }
|
|
41
|
+
.poad-dp__panel .poad-dp__row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
|
|
42
|
+
.poad-dp__panel .has-week .poad-dp__row { grid-template-columns: 22px repeat(7, 1fr); }
|
|
43
|
+
.poad-dp__panel .poad-dp__weekdays span { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--poad-fg-muted); text-align: center; height: 22px; line-height: 22px; }
|
|
44
|
+
.poad-dp__panel .poad-dp__wk { font: 10px var(--poad-font-mono); color: var(--poad-fg-muted); text-align: center; align-self: center; }
|
|
45
|
+
.poad-dp__panel .poad-dp__day { position: relative; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--poad-fg); font: inherit; font-size: 12.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
|
|
46
|
+
.poad-dp__panel .poad-dp__day:hover:not([disabled]) { background: var(--poad-hover); }
|
|
47
|
+
.poad-dp__panel .poad-dp__day:focus-visible { outline: 2px solid var(--poad-ring); outline-offset: -1px; }
|
|
48
|
+
.poad-dp__panel .poad-dp__day.is-out { color: var(--poad-fg-muted); opacity: .7; }
|
|
49
|
+
.poad-dp__panel .poad-dp__day.is-today::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-inline-start: -2px; border-radius: 50%; background: var(--poad-accent); }
|
|
50
|
+
.poad-dp__panel .poad-dp__day.in-range, .poad-dp__panel .poad-dp__day.is-hover-range { background: var(--poad-accent-soft); border-radius: 0; color: var(--poad-fg); }
|
|
51
|
+
.poad-dp__panel .poad-dp__day.range-start { border-radius: 7px 0 0 7px; }
|
|
52
|
+
.poad-dp__panel .poad-dp__day.range-end { border-radius: 0 7px 7px 0; }
|
|
53
|
+
.poad-dp__panel .poad-dp__day.range-start.range-end { border-radius: 7px; }
|
|
54
|
+
.poad-dp__panel .poad-dp__day.is-sel { background: var(--poad-accent); color: var(--poad-fg-on-accent); font-weight: 600; }
|
|
55
|
+
.poad-dp__panel .poad-dp__day.is-sel.is-today::after { background: var(--poad-fg-on-accent); }
|
|
56
|
+
.poad-dp__panel .poad-dp__day[disabled] { color: var(--poad-fg-muted); opacity: .45; cursor: not-allowed; text-decoration: line-through; }
|
|
57
|
+
.poad-dp__panel .poad-dp__cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
|
|
58
|
+
.poad-dp__panel .poad-dp__cells button { height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--poad-fg); font: inherit; cursor: pointer; text-transform: capitalize; }
|
|
59
|
+
.poad-dp__panel .poad-dp__cells button:hover:not([disabled]) { background: var(--poad-hover); }
|
|
60
|
+
.poad-dp__panel .poad-dp__cells button.is-now { color: var(--poad-accent); font-weight: 600; }
|
|
61
|
+
.poad-dp__panel .poad-dp__cells button.is-sel { background: var(--poad-accent); color: var(--poad-fg-on-accent); font-weight: 600; }
|
|
62
|
+
.poad-dp__panel .poad-dp__cells button[disabled] { opacity: .45; cursor: not-allowed; }
|
|
63
|
+
.poad-dp__panel .poad-dp__time { display: flex; align-items: center; justify-content: center; gap: 4px; padding-top: 8px; }
|
|
64
|
+
.poad-dp__panel .poad-dp__time.has-border { border-top: 1px solid var(--poad-border); margin-top: 8px; }
|
|
65
|
+
.poad-dp__panel .poad-dp__spin { display: flex; flex-direction: column; align-items: center; }
|
|
66
|
+
.poad-dp__panel .poad-dp__spin button { width: 28px; height: 20px; border: 0; background: transparent; color: var(--poad-fg-muted); cursor: pointer; display: grid; place-items: center; border-radius: 5px; }
|
|
67
|
+
.poad-dp__panel .poad-dp__spin button:hover { background: var(--poad-hover); color: var(--poad-fg); }
|
|
68
|
+
.poad-dp__panel .poad-dp__spin input { width: 36px; height: 28px; text-align: center; border: 1px solid var(--poad-input-border); border-radius: 6px; background: var(--poad-input-bg); color: var(--poad-fg); font: 500 14px var(--poad-font-mono); outline: 0; }
|
|
69
|
+
.poad-dp__panel .poad-dp__spin input:focus { border-color: var(--poad-accent); box-shadow: 0 0 0 3px var(--poad-ring); }
|
|
70
|
+
.poad-dp__panel .poad-dp__colon { font-weight: 600; color: var(--poad-fg-muted); }
|
|
71
|
+
.poad-dp__panel .poad-dp__ampm { margin-inline-start: 6px; height: 28px; padding: 0 8px; border: 1px solid var(--poad-input-border); border-radius: 6px; background: transparent; color: var(--poad-fg); font: 600 11px var(--poad-font); cursor: pointer; }
|
|
72
|
+
.poad-dp__panel .poad-dp__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--poad-border); }
|
|
73
|
+
.poad-dp__panel .poad-dp__bar button { border: 0; background: transparent; color: var(--poad-accent); font: 500 12px var(--poad-font); padding: 4px 8px; border-radius: 6px; cursor: pointer; }
|
|
74
|
+
.poad-dp__panel .poad-dp__bar button:hover { background: var(--poad-accent-soft); }
|
|
75
|
+
.poad-dp__panel .poad-dp__bar button.is-muted { color: var(--poad-fg-secondary); }
|
|
76
|
+
.poad-dp__panel .poad-dp__bar button.is-muted:hover { background: var(--poad-hover); }
|
|
77
|
+
.poad-dp__panel .poad-dp__bar button.is-ok { margin-inline-start: auto; background: var(--poad-accent); color: var(--poad-fg-on-accent); padding: 8px 18px; font-size: var(--poad-font-size); }
|
|
78
|
+
.poad-dp__panel .poad-dp__bar button.is-ok:hover { background: var(--poad-accent-hover); }
|
|
79
|
+
.poad-dp__panel.is-sheet .poad-dp__bar button { min-height: 40px; }
|
|
80
|
+
.poad-dp__panel .poad-dp__count { font-size: 11px; color: var(--poad-fg-muted); }
|
package/dialog.css
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @poadio/ui-core — boîte de dialogue, tiroir et confirmation (`.poad-dialog-container`). Source unique du style pour
|
|
3
|
+
* tous les paquets de rendu : ui-angular l'inclut dans `poad-dialog-container` (encapsulation déjà désactivée : texte
|
|
4
|
+
* repris tel quel), les autres rendus le font charger par l'application. Ne lit que les jetons --poad-* (icônes :
|
|
5
|
+
* `icon.css` ; boutons du pied : `button.css`).
|
|
6
|
+
*
|
|
7
|
+
* Anatomie : couche (pane de l'overlay du CDK en Angular, `.poad-dialog-layer` ailleurs) > `.poad-dialog-container`
|
|
8
|
+
* (`role="dialog"` ; `is-open`, `is-hidden`, `is-maximized`, `is-drawer pos-*`, `is-mobile-full`, `is-mobile-sheet`,
|
|
9
|
+
* `sheet-h-auto`, classe de l'application — `dialogContainerClass()`) > `.poad-dialog` > `header.poad-dialog__header`
|
|
10
|
+
* (`.poad-dialog__title`, `.poad-dialog__actions` > `.poad-dialog__icon-btn`), `.poad-dialog__body`,
|
|
11
|
+
* `footer.poad-dialog__footer` ; fond `.poad-overlay-backdrop`. Confirmation : `.poad-confirm` dans un conteneur
|
|
12
|
+
* `.poad-confirm-dialog`.
|
|
13
|
+
*/
|
|
14
|
+
/* --- fond et couche des rendus sans overlay du CDK (React, Vue, composants web) --- */
|
|
15
|
+
.poad-dialog-layer { position: fixed; inset: 0; z-index: var(--poad-z-overlay, 100002); display: flex; pointer-events: none; }
|
|
16
|
+
.poad-dialog-layer.pos-center { align-items: center; justify-content: center; }
|
|
17
|
+
.poad-dialog-layer.pos-top { align-items: flex-start; justify-content: center; padding-top: 48px; box-sizing: border-box; }
|
|
18
|
+
.poad-dialog-layer.pos-right { justify-content: flex-end; }
|
|
19
|
+
.poad-dialog-layer.pos-left { justify-content: flex-start; }
|
|
20
|
+
.poad-dialog-layer.pos-top-drawer { align-items: flex-start; }
|
|
21
|
+
.poad-dialog-layer.pos-bottom, .poad-dialog-layer.pos-sheet { align-items: flex-end; }
|
|
22
|
+
.poad-dialog-layer > .poad-overlay-backdrop { position: absolute; inset: 0; pointer-events: auto; opacity: 0; transition: opacity var(--poad-dur, 140ms) var(--poad-ease, ease); }
|
|
23
|
+
.poad-dialog-layer > .poad-overlay-backdrop.is-showing { opacity: 1; }
|
|
24
|
+
.poad-dialog-layer > .poad-dialog-pane { position: relative; pointer-events: auto; box-sizing: border-box; display: flex; max-width: 100%; max-height: 100%; }
|
|
25
|
+
.poad-dialog-layer.is-drawer-layer > .poad-dialog-pane { height: 100%; }
|
|
26
|
+
.poad-dialog-layer.pos-top-drawer > .poad-dialog-pane, .poad-dialog-layer.pos-bottom > .poad-dialog-pane, .poad-dialog-layer.pos-sheet > .poad-dialog-pane { width: 100%; height: auto; }
|
|
27
|
+
.poad-overlay-backdrop { background: var(--poad-backdrop, rgba(2, 6, 23, .45)); }
|
|
28
|
+
.poad-overlay-backdrop.is-hidden { display: none; }
|
|
29
|
+
/* --- conteneur --- */
|
|
30
|
+
.poad-dialog-container { display: flex; outline: none; font-family: var(--poad-font); font-size: var(--poad-font-size); color: var(--poad-fg); max-height: 100%; max-width: 100%; }
|
|
31
|
+
.poad-dialog-container.is-hidden { display: none; }
|
|
32
|
+
.poad-dialog { display: flex; flex-direction: column; background: var(--poad-surface); border: 1px solid var(--poad-border); border-radius: var(--poad-radius-lg);
|
|
33
|
+
box-shadow: var(--poad-shadow-lg); max-height: 92vh; min-width: 0; outline: none; box-sizing: border-box;
|
|
34
|
+
opacity: 0; transform: translateY(6px) scale(.98); transition: opacity var(--poad-dur) var(--poad-ease), transform var(--poad-dur) var(--poad-ease); }
|
|
35
|
+
.poad-dialog-container.is-open .poad-dialog { opacity: 1; transform: none; }
|
|
36
|
+
.poad-dialog-container.is-maximized .poad-dialog { width: 100% !important; max-width: 100% !important; height: 100vh !important; max-height: 100vh; border-radius: 0; }
|
|
37
|
+
.poad-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; flex: none; }
|
|
38
|
+
.poad-dialog__header.is-draggable { cursor: move; user-select: none; }
|
|
39
|
+
.poad-dialog__title { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--poad-fg); min-width: 0; }
|
|
40
|
+
.poad-dialog__actions { display: inline-flex; gap: 2px; margin-inline-start: auto; flex: none; }
|
|
41
|
+
.poad-dialog__icon-btn { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: var(--poad-radius-sm); background: transparent; color: var(--poad-fg-muted); cursor: pointer; padding: 0; transition: background var(--poad-dur), color var(--poad-dur); }
|
|
42
|
+
.poad-dialog__icon-btn:hover { background: var(--poad-hover); color: var(--poad-fg); }
|
|
43
|
+
.poad-dialog__icon-btn:focus-visible { outline: 2px solid var(--poad-ring); outline-offset: 1px; }
|
|
44
|
+
.poad-dialog__body { padding: 4px 16px 14px; color: var(--poad-fg-secondary); font-size: var(--poad-font-size); overflow: auto; flex: 1; min-height: 0; }
|
|
45
|
+
.poad-dialog__body:first-child { padding-top: 16px; }
|
|
46
|
+
/* LE PIED ESPACE SON UNIQUE ENFANT, PAS LES BOUTONS. Le contenu projeté arrive dans UN
|
|
47
|
+
conteneur (un div poadDialogFooter) : l'ecart ci-dessous s'applique entre les enfants du
|
|
48
|
+
pied, et il n'y en a qu'un — les boutons sont un cran plus bas et se touchaient
|
|
49
|
+
(signalé par SZU le 22/08/2026, écart mesuré à 0px). Un pied déclaré en <ng-template>
|
|
50
|
+
n'a PAS ce défaut — ses boutons sont enfants directs du pied — d'où deux dialogues de la
|
|
51
|
+
même planche qui s'espaçaient différemment.
|
|
52
|
+
Ce composant est en ViewEncapsulation.None : ses règles sont globales, donc un sélecteur
|
|
53
|
+
simple atteint le contenu projeté. (Ne pas y remettre :host ni ::ng-deep : sans
|
|
54
|
+
encapsulation, :host ne correspond à rien et la règle ne s'applique jamais.)
|
|
55
|
+
On garde l'ecart du pied : il sert quand le contenu est projete sans conteneur. */
|
|
56
|
+
.poad-dialog__footer > [poadDialogFooter] {
|
|
57
|
+
display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; width: 100%;
|
|
58
|
+
}
|
|
59
|
+
.poad-dialog__footer { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--poad-border);
|
|
60
|
+
background: var(--poad-bg-subtle); border-radius: 0 0 var(--poad-radius-lg) var(--poad-radius-lg); flex: none; }
|
|
61
|
+
/* --- tiroir --- */
|
|
62
|
+
.poad-dialog-container.is-drawer { height: 100%; }
|
|
63
|
+
.poad-dialog-container.is-drawer .poad-dialog { max-height: none; height: 100%; border-radius: 0; opacity: 1; transform: none; transition: transform 180ms var(--poad-ease); }
|
|
64
|
+
.poad-dialog-container.is-drawer .poad-dialog__footer { border-radius: 0; }
|
|
65
|
+
.poad-dialog-container.is-drawer.pos-right .poad-dialog { transform: translateX(100%); border-width: 0 0 0 1px; }
|
|
66
|
+
.poad-dialog-container.is-drawer.pos-left .poad-dialog { transform: translateX(-100%); border-width: 0 1px 0 0; }
|
|
67
|
+
.poad-dialog-container.is-drawer.pos-top .poad-dialog { transform: translateY(-100%); border-width: 0 0 1px 0; }
|
|
68
|
+
.poad-dialog-container.is-drawer.pos-bottom .poad-dialog { transform: translateY(100%); border-width: 1px 0 0 0; }
|
|
69
|
+
.poad-dialog-container.is-drawer.is-open .poad-dialog { transform: none; }
|
|
70
|
+
.poad-dialog-container.is-drawer.pos-top, .poad-dialog-container.is-drawer.pos-bottom { width: 100%; }
|
|
71
|
+
/* Le panneau occupe toute la hauteur : un tiroir du bas se cale en bas, pas en haut */
|
|
72
|
+
.poad-dialog-container.is-drawer.pos-bottom { align-items: flex-end; }
|
|
73
|
+
.poad-dialog-container.is-drawer.pos-top .poad-dialog, .poad-dialog-container.is-drawer.pos-bottom .poad-dialog { width: 100% !important; max-width: 100% !important; }
|
|
74
|
+
/* --- mobile : plein écran --- */
|
|
75
|
+
/* MOBILE PLEIN CADRE : pleine LARGEUR, hauteur ajustee au CONTENU (arbitrage SZU du
|
|
76
|
+
22/08/2026). Avant, la hauteur etait forcee a 100dvh quel que soit le contenu : un
|
|
77
|
+
formulaire de trois champs occupait 240px et laissait 500px de vide avec le pied colle
|
|
78
|
+
en bas de l'ecran, ce qui se lit comme un defaut d'affichage. Le desktop, lui, ajustait
|
|
79
|
+
DEJA au contenu — on supprime donc une exception mobile, on n'invente pas un comportement.
|
|
80
|
+
align-items: flex-start est INDISPENSABLE : le conteneur est en display: flex, et son
|
|
81
|
+
etirement par defaut re-imposerait la pleine hauteur au dialogue malgre son height: auto. */
|
|
82
|
+
.poad-dialog-container.is-mobile-full { width: 100dvw; height: 100dvh; max-height: 100dvh; align-items: flex-start; }
|
|
83
|
+
.poad-dialog-container.is-mobile-full .poad-dialog {
|
|
84
|
+
width: 100dvw !important; max-width: 100dvw !important;
|
|
85
|
+
height: auto !important; max-height: 100dvh;
|
|
86
|
+
/* Le panneau est a fleur des bords haut, gauche et droit — mais plus du bas des qu'il
|
|
87
|
+
est court. On arrondit donc le BAS seulement : un panneau a angles droits qui
|
|
88
|
+
s'arrete au milieu de l'ecran a l'air coupe. */
|
|
89
|
+
border-radius: 0 0 var(--poad-radius-lg) var(--poad-radius-lg); border: 0; box-shadow: none;
|
|
90
|
+
/* Reserve la zone sure quand le contenu est assez long pour toucher le bas ; quand il
|
|
91
|
+
est court, ca vaut un rembourrage bas, ce qui ne gene pas. */
|
|
92
|
+
padding-bottom: env(safe-area-inset-bottom); }
|
|
93
|
+
.poad-dialog-container.is-mobile-full .poad-dialog__header { position: sticky; top: 0; background: var(--poad-surface); z-index: 1; padding-top: calc(14px + env(safe-area-inset-top)); }
|
|
94
|
+
.poad-dialog-container.is-mobile-full .poad-dialog__footer { border-radius: 0; }
|
|
95
|
+
/* --- mobile : feuille basse --- */
|
|
96
|
+
.poad-overlay-pane.is-mobile-sheet-pane { width: 100%; max-width: 100%; }
|
|
97
|
+
.poad-dialog-container.is-mobile-sheet { width: 100%; align-items: flex-end; }
|
|
98
|
+
.poad-dialog-container.is-mobile-sheet .poad-dialog { position: relative; width: 100% !important; max-width: 100% !important; height: 92dvh !important; max-height: 92dvh; border-radius: 16px 16px 0 0; border-bottom: 0;
|
|
99
|
+
box-shadow: 0 -8px 32px rgba(0, 0, 0, .18); padding-bottom: env(safe-area-inset-bottom); opacity: 1; transform: translateY(100%); transition: transform 200ms var(--poad-ease); }
|
|
100
|
+
.poad-dialog-container.is-mobile-sheet.sheet-h-auto .poad-dialog { height: auto !important; }
|
|
101
|
+
.poad-dialog-container.is-mobile-sheet .poad-dialog::before { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-inline-start: -18px; border-radius: 2px; background: var(--poad-border-strong); }
|
|
102
|
+
.poad-dialog-container.is-mobile-sheet .poad-dialog__header { padding-top: 20px; }
|
|
103
|
+
.poad-dialog-container.is-mobile-sheet .poad-dialog__body:first-child { padding-top: 22px; }
|
|
104
|
+
.poad-dialog-container.is-mobile-sheet.is-open .poad-dialog { transform: none; }
|
|
105
|
+
.poad-dialog-container.is-mobile-sheet .poad-dialog__footer { border-radius: 0; }
|
|
106
|
+
/* confirmation en feuille : boutons pleine largeur, empilés (action principale en bas) */
|
|
107
|
+
.poad-confirm-dialog.is-mobile-sheet .poad-dialog__footer { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
|
|
108
|
+
.poad-confirm-dialog.is-mobile-sheet .poad-dialog__footer > * { width: 100%; height: 44px; }
|
|
109
|
+
@media (prefers-reduced-motion: reduce) { .poad-dialog, .poad-dialog-container.is-drawer .poad-dialog, .poad-dialog-container.is-mobile-sheet .poad-dialog, .cdk-overlay-backdrop { transition: none !important; } }
|
|
110
|
+
/* --- confirmation (contenu) --- */
|
|
111
|
+
.poad-confirm-dialog .poad-confirm { display: grid; gap: 12px; padding-top: 6px; }
|
|
112
|
+
.poad-confirm .poad-confirm__row { display: flex; gap: 12px; align-items: flex-start; }
|
|
113
|
+
.poad-confirm .poad-confirm__icon { color: var(--poad-accent); flex: none; margin-top: 1px; }
|
|
114
|
+
.poad-confirm.sev-danger .poad-confirm__icon { color: var(--poad-danger); }
|
|
115
|
+
.poad-confirm.sev-warning .poad-confirm__icon { color: var(--poad-warning); }
|
|
116
|
+
.poad-confirm .poad-confirm__msg { color: var(--poad-fg-secondary); line-height: 1.5; }
|
|
117
|
+
.poad-confirm .poad-confirm__msg b { color: var(--poad-fg); }
|
|
118
|
+
.poad-confirm .poad-confirm__msg code { font-family: var(--poad-font-mono); font-size: 12px; background: var(--poad-bg-subtle); border: 1px solid var(--poad-border); border-radius: 4px; padding: 1px 5px; }
|
|
119
|
+
.poad-confirm .poad-confirm__typing { display: grid; gap: 5px; font-size: var(--poad-font-size-sm); font-weight: 500; color: var(--poad-fg-secondary); }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type AccordionValue = string | readonly string[] | null | undefined;
|
|
2
|
+
/** Panneaux ouverts. */
|
|
3
|
+
export declare const accordionOpenSet: (value: AccordionValue) => ReadonlySet<string>;
|
|
4
|
+
export declare const accordionIsOpen: (value: AccordionValue, panel: string) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Valeur après l'ouverture (`open`) ou la fermeture du panneau `panel`. Rend la MÊME valeur quand rien ne change ;
|
|
7
|
+
* en choix unique, ouvrir un panneau ferme l'autre.
|
|
8
|
+
*/
|
|
9
|
+
export declare function accordionSet(value: AccordionValue, panel: string, open: boolean, multiple?: boolean): string | string[] | null | AccordionValue;
|
|
10
|
+
/** Touche sur un en-tête : rang de l'en-tête à focaliser parmi `panels`, ou `null`. */
|
|
11
|
+
export declare const accordionKeydown: (panels: readonly {
|
|
12
|
+
readonly disabled?: boolean;
|
|
13
|
+
}[], from: number, key: string) => number | null;
|
|
14
|
+
/** Attributs de l'en-tête (`<button>`) et de la région d'un panneau d'identifiant `id`. */
|
|
15
|
+
export declare const accordionHeaderProps: (id: string, open: boolean, disabled?: boolean) => {
|
|
16
|
+
readonly id: `${string}-h`;
|
|
17
|
+
readonly 'aria-expanded': "true" | "false";
|
|
18
|
+
readonly 'aria-controls': `${string}-c`;
|
|
19
|
+
readonly disabled: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const accordionRegionProps: (id: string, open: boolean) => {
|
|
22
|
+
readonly id: `${string}-c`;
|
|
23
|
+
readonly role: "region";
|
|
24
|
+
readonly 'aria-labelledby': `${string}-h`;
|
|
25
|
+
readonly inert: "" | null;
|
|
26
|
+
};
|
|
27
|
+
/** Classes d'un panneau `.poad-accordion-panel` et de la racine `.poad-accordion`. */
|
|
28
|
+
export declare const accordionPanelClasses: (open: boolean, disabled?: boolean) => {
|
|
29
|
+
'is-open': boolean;
|
|
30
|
+
'is-disabled': boolean;
|
|
31
|
+
};
|
|
32
|
+
export declare const accordionRootClasses: (flush?: boolean) => {
|
|
33
|
+
'is-flush': boolean;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=accordion.machine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.machine.d.ts","sourceRoot":"","sources":["../../src/accordion/accordion.machine.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3E,wBAAwB;AACxB,eAAO,MAAM,gBAAgB,GAAI,OAAO,cAAc,KAAG,WAAW,CAAC,MAAM,CAC4B,CAAC;AAExG,eAAO,MAAM,eAAe,GAAI,OAAO,cAAc,EAAE,OAAO,MAAM,KAAG,OAA6C,CAAC;AAErH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,UAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,cAAc,CAS7I;AAED,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,EAAE,MAAM,MAAM,EAAE,KAAK,MAAM,KAAG,MAAM,GAAG,IACzD,CAAC;AAElE,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,GAAI,IAAI,MAAM,EAAE,MAAM,OAAO,EAAE,kBAAgB;;;;;CAC8B,CAAC;AAC/G,eAAO,MAAM,oBAAoB,GAAI,IAAI,MAAM,EAAE,MAAM,OAAO;;;;;CACuC,CAAC;AAEtG,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,GAAI,MAAM,OAAO,EAAE,kBAAgB;;;CAAmD,CAAC;AACzH,eAAO,MAAM,oBAAoB,GAAI,eAAa;;CAA4B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accordéon (accordion) — la logique, sans framework ni DOM.
|
|
3
|
+
*
|
|
4
|
+
* Des panneaux à en-tête `<button aria-expanded>` (dans un titre `h3`) et région `role="region"` (WAI-ARIA, motif
|
|
5
|
+
* « accordion ») ; un seul ouvert à la fois, ou plusieurs (`multiple`). La valeur ouverte est celle d'un panneau
|
|
6
|
+
* (`string`), ou un tableau en `multiple`, ou `null`. Clavier entre en-têtes : ↓ / ↑ (en boucle), Début, Fin ;
|
|
7
|
+
* Entrée / Espace : le clic natif du bouton. Un panneau fermé est `inert` (contenu hors tabulation).
|
|
8
|
+
*/
|
|
9
|
+
import { rovingKeyTarget } from '../roving/roving.js';
|
|
10
|
+
/** Panneaux ouverts. */
|
|
11
|
+
export const accordionOpenSet = (value) => new Set(value == null ? [] : Array.isArray(value) ? value : [value]);
|
|
12
|
+
export const accordionIsOpen = (value, panel) => accordionOpenSet(value).has(panel);
|
|
13
|
+
/**
|
|
14
|
+
* Valeur après l'ouverture (`open`) ou la fermeture du panneau `panel`. Rend la MÊME valeur quand rien ne change ;
|
|
15
|
+
* en choix unique, ouvrir un panneau ferme l'autre.
|
|
16
|
+
*/
|
|
17
|
+
export function accordionSet(value, panel, open, multiple = false) {
|
|
18
|
+
if (open === accordionIsOpen(value, panel))
|
|
19
|
+
return value;
|
|
20
|
+
if (multiple) {
|
|
21
|
+
const s = new Set(accordionOpenSet(value));
|
|
22
|
+
if (open)
|
|
23
|
+
s.add(panel);
|
|
24
|
+
else
|
|
25
|
+
s.delete(panel);
|
|
26
|
+
return [...s];
|
|
27
|
+
}
|
|
28
|
+
return open ? panel : null;
|
|
29
|
+
}
|
|
30
|
+
/** Touche sur un en-tête : rang de l'en-tête à focaliser parmi `panels`, ou `null`. */
|
|
31
|
+
export const accordionKeydown = (panels, from, key) => rovingKeyTarget(panels, from, key, { orientation: 'vertical' });
|
|
32
|
+
/** Attributs de l'en-tête (`<button>`) et de la région d'un panneau d'identifiant `id`. */
|
|
33
|
+
export const accordionHeaderProps = (id, open, disabled = false) => ({ id: `${id}-h`, 'aria-expanded': open ? 'true' : 'false', 'aria-controls': `${id}-c`, disabled });
|
|
34
|
+
export const accordionRegionProps = (id, open) => ({ id: `${id}-c`, role: 'region', 'aria-labelledby': `${id}-h`, inert: open ? null : '' });
|
|
35
|
+
/** Classes d'un panneau `.poad-accordion-panel` et de la racine `.poad-accordion`. */
|
|
36
|
+
export const accordionPanelClasses = (open, disabled = false) => ({ 'is-open': open, 'is-disabled': disabled });
|
|
37
|
+
export const accordionRootClasses = (flush = false) => ({ 'is-flush': flush });
|
|
38
|
+
//# sourceMappingURL=accordion.machine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.machine.js","sourceRoot":"","sources":["../../src/accordion/accordion.machine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAwB;AACxB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAqB,EAAuB,EAAE,CAC7E,IAAI,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAA2B,CAAC,CAAC,CAAC,CAAC,KAAe,CAAC,CAAC,CAAC;AAExG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAqB,EAAE,KAAa,EAAW,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAErH;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAqB,EAAE,KAAa,EAAE,IAAa,EAAE,QAAQ,GAAG,KAAK;IAChG,IAAI,IAAI,KAAK,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACzD,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3C,IAAI,IAAI;YAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;YAClB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7B,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAkD,EAAE,IAAY,EAAE,GAAW,EAAiB,EAAE,CAC/H,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC;AAElE,2FAA2F;AAC3F,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAU,EAAE,IAAa,EAAE,QAAQ,GAAG,KAAK,EAAE,EAAE,CAClF,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAU,CAAC;AAC/G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAU,EAAE,IAAa,EAAE,EAAE,CAChE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAU,CAAC;AAEtG,sFAAsF;AACtF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAa,EAAE,QAAQ,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/accordion/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/accordion/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/** Libellé d'une suggestion : primitive telle quelle, objet par son chemin (défaut `label`). */
|
|
2
|
+
export declare const comboLabel: (o: unknown, path?: string) => string;
|
|
3
|
+
/** Suggestions données par l'application, filtrées sur le libellé (sans accents ni casse). */
|
|
4
|
+
export declare const comboFilter: <T>(source: readonly T[] | null | undefined, query: string, path?: string) => T[];
|
|
5
|
+
/** Valeurs en choix multiple. */
|
|
6
|
+
export declare const comboValues: (value: unknown, multiple: boolean) => unknown[];
|
|
7
|
+
export declare const comboIsSelected: (value: unknown, o: unknown, multiple: boolean) => boolean;
|
|
8
|
+
/** Texte du champ pour une valeur imposée (choix unique) : le libellé d'un objet, la valeur elle-même sinon. */
|
|
9
|
+
export declare const comboTextOf: (value: unknown, path?: string) => string;
|
|
10
|
+
/** Frappe : lancer une recherche, ou fermer (texte trop court). */
|
|
11
|
+
export declare const comboInput: (text: string, minLength?: number) => "search" | "close";
|
|
12
|
+
export interface ComboKeyState {
|
|
13
|
+
readonly open: boolean;
|
|
14
|
+
readonly active: number;
|
|
15
|
+
readonly count: number;
|
|
16
|
+
readonly multiple?: boolean;
|
|
17
|
+
readonly text: string;
|
|
18
|
+
readonly valuesCount?: number;
|
|
19
|
+
}
|
|
20
|
+
export type ComboKeyAction = {
|
|
21
|
+
readonly type: 'search';
|
|
22
|
+
} | {
|
|
23
|
+
readonly type: 'move';
|
|
24
|
+
readonly active: number;
|
|
25
|
+
} | {
|
|
26
|
+
readonly type: 'pick';
|
|
27
|
+
readonly index: number;
|
|
28
|
+
} | {
|
|
29
|
+
readonly type: 'close';
|
|
30
|
+
} | {
|
|
31
|
+
readonly type: 'remove-last';
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: 'none';
|
|
34
|
+
};
|
|
35
|
+
/** Touche dans le champ : l'action, et si le rendu doit empêcher le comportement par défaut. */
|
|
36
|
+
export declare function comboKeydown(s: ComboKeyState, key: string): {
|
|
37
|
+
readonly action: ComboKeyAction;
|
|
38
|
+
readonly preventDefault: boolean;
|
|
39
|
+
};
|
|
40
|
+
/** Réponse d'une recherche : suggestions montrées, la première active ; le panneau s'ouvre s'il était fermé. */
|
|
41
|
+
export declare const comboResults: (count: number) => {
|
|
42
|
+
readonly active: number;
|
|
43
|
+
readonly open: true;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Choix d'une suggestion : la valeur suivante (ajoutée en choix multiple, sans doublon), le texte du champ, et si la
|
|
47
|
+
* valeur change.
|
|
48
|
+
*/
|
|
49
|
+
export declare function comboPick(value: unknown, o: unknown, o2: {
|
|
50
|
+
readonly multiple?: boolean;
|
|
51
|
+
readonly labelPath?: string;
|
|
52
|
+
}): {
|
|
53
|
+
readonly value: unknown;
|
|
54
|
+
readonly text: string;
|
|
55
|
+
readonly changed: boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Sortie du champ (choix unique). `forceSelection` : un texte qui n'est pas le libellé de la valeur est effacé (et la
|
|
59
|
+
* valeur avec) ; texte libre : le texte devient la valeur. Rend ce qu'il faut écrire, ou `null`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function comboBlur(value: unknown, text: string, o: {
|
|
62
|
+
readonly forceSelection?: boolean;
|
|
63
|
+
readonly multiple?: boolean;
|
|
64
|
+
readonly labelPath?: string;
|
|
65
|
+
}): {
|
|
66
|
+
readonly text?: string;
|
|
67
|
+
readonly value?: unknown;
|
|
68
|
+
} | null;
|
|
69
|
+
/** Attributs du champ. */
|
|
70
|
+
export declare const comboInputProps: (o: {
|
|
71
|
+
readonly open: boolean;
|
|
72
|
+
readonly listId: string;
|
|
73
|
+
readonly active: number;
|
|
74
|
+
readonly invalid?: boolean;
|
|
75
|
+
}) => {
|
|
76
|
+
readonly role: "combobox";
|
|
77
|
+
readonly 'aria-autocomplete': "list";
|
|
78
|
+
readonly 'aria-expanded': "true" | "false";
|
|
79
|
+
readonly 'aria-controls': string;
|
|
80
|
+
readonly 'aria-activedescendant': string | null;
|
|
81
|
+
readonly 'aria-invalid': "true" | null;
|
|
82
|
+
};
|
|
83
|
+
/** Attributs et classes d'une suggestion. */
|
|
84
|
+
export declare const comboOptionProps: (listId: string, index: number, active: boolean, selected: boolean) => {
|
|
85
|
+
readonly id: `${string}-${number}`;
|
|
86
|
+
readonly role: "option";
|
|
87
|
+
readonly 'aria-selected': "true" | "false";
|
|
88
|
+
readonly classes: {
|
|
89
|
+
readonly 'is-active': boolean;
|
|
90
|
+
readonly 'is-on': boolean;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/** Classes de la racine `.poad-combo`. */
|
|
94
|
+
export declare const comboRootClasses: (o: {
|
|
95
|
+
readonly open: boolean;
|
|
96
|
+
readonly disabled?: boolean;
|
|
97
|
+
readonly invalid?: boolean;
|
|
98
|
+
readonly size?: "sm" | "md" | "lg";
|
|
99
|
+
}) => {
|
|
100
|
+
'is-open': boolean;
|
|
101
|
+
'is-disabled': boolean;
|
|
102
|
+
'is-invalid': boolean;
|
|
103
|
+
'size-sm': boolean;
|
|
104
|
+
'size-lg': boolean;
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=combo.machine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combo.machine.d.ts","sourceRoot":"","sources":["../../src/combo/combo.machine.ts"],"names":[],"mappings":"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"}
|