@ktortu/aaa 0.10.0 → 0.10.2

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.
@@ -83,4 +83,52 @@
83
83
  kt-chip-list:not([data-empty]) {
84
84
  margin-block-start: 0.5rem;
85
85
  }
86
+
87
+ /* Pied de la bottom-sheet (bouton Valider), rendu sur téléphone quand validationButtonLabel est configuré. */
88
+ .kt-select__sheet-footer {
89
+ display: flex;
90
+ flex: none;
91
+ padding-block: 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
92
+ padding-inline: 1rem;
93
+ border-block-start: 1px solid var(--field-border-color, #c4c7c5);
94
+ background: var(--field-panel-bg, #ffffff);
95
+ box-sizing: border-box;
96
+ }
97
+
98
+ .kt-select__sheet-validate {
99
+ display: inline-flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ inline-size: 100%;
103
+ min-block-size: 44px;
104
+ padding-block: 0.625rem;
105
+ padding-inline: 1.25rem;
106
+ border: 0;
107
+ border-radius: var(--field-radius, 8px);
108
+ background: var(--kt-primary, #0b57d0);
109
+ color: var(--kt-on-primary, #ffffff);
110
+ font: inherit;
111
+ font-weight: 500;
112
+ cursor: pointer;
113
+ transition: background 120ms ease;
114
+ }
115
+
116
+ .kt-select__sheet-validate:hover {
117
+ background: color-mix(in srgb, var(--kt-primary, #0b57d0) 90%, black);
118
+ }
119
+
120
+ .kt-select__sheet-validate:active {
121
+ background: color-mix(in srgb, var(--kt-primary, #0b57d0) 80%, black);
122
+ }
123
+
124
+ .kt-select__sheet-validate:focus-visible {
125
+ outline: 2px solid var(--field-border-color-focus, #0b57d0);
126
+ outline-offset: 2px;
127
+ }
128
+
129
+ @media (prefers-reduced-motion: reduce) {
130
+ .kt-select__sheet-validate {
131
+ transition: none;
132
+ }
133
+ }
86
134
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktortu/aaa",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Bibliothèque de composants Angular headless + thémés par tokens CSS.",
5
5
  "keywords": [
6
6
  "angular",
@@ -1284,6 +1284,8 @@ interface KtSelectConfigOptions {
1284
1284
  truncatedResultsText: (max: number, total: number) => string;
1285
1285
  /** Annonce de la troncature des résultats (live region). Défaut : `'X results displayed out of Y...'`. */
1286
1286
  truncatedResultsAnnouncement: (max: number, total: number) => string;
1287
+ /** Libellé du bouton de validation en bas de la sheet mobile (opt-in, multi-select). Défaut : `''` (aucun bouton). */
1288
+ validationButtonLabel: string;
1287
1289
  }
1288
1290
  declare const KT_SELECT_CONFIG: InjectionToken<Partial<KtSelectConfigOptions>>;
1289
1291
  /**
@@ -1432,10 +1434,13 @@ declare class KtMultiSelect<T, V = T> extends KtBaseSelect<T, V> implements Form
1432
1434
  readonly selectionActions: _angular_core.InputSignalWithTransform<boolean, unknown>;
1433
1435
  /** Nombre maximal de chips affichés avant repli derrière un bouton « +N more ». Défaut : illimité. */
1434
1436
  readonly maxVisibleChips: _angular_core.InputSignal<number | undefined>;
1437
+ /** Libellé du bouton de validation affiché en bas de la sheet mobile. Défaut : `KT_SELECT_CONFIG.validationButtonLabel` ou vide. */
1438
+ readonly validationButtonLabel: _angular_core.InputSignal<string | undefined>;
1435
1439
  protected readonly optionDef: _angular_core.Signal<KtMultiSelectOptionDef<any> | undefined>;
1436
1440
  protected readonly triggerDef: _angular_core.Signal<KtMultiSelectTriggerDef<any> | undefined>;
1437
1441
  protected readonly chipDef: _angular_core.Signal<KtMultiSelectChipDef<any> | undefined>;
1438
1442
  private readonly chipList;
1443
+ protected readonly resolvedValidationButtonLabel: _angular_core.Signal<string>;
1439
1444
  protected readonly resolvedRemoveItemLabel: _angular_core.Signal<(itemLabel: string) => string>;
1440
1445
  protected readonly resolvedSelectedItemsLabel: _angular_core.Signal<string>;
1441
1446
  private readonly resolvedSelectionSummaryText;
@@ -1487,8 +1492,10 @@ declare class KtMultiSelect<T, V = T> extends KtBaseSelect<T, V> implements Form
1487
1492
  protected clearAllFiltered(): void;
1488
1493
  /** Annonce immédiate (action ponctuelle, pas de débounce) du total sélectionné. */
1489
1494
  private announceSelectionCount;
1495
+ /** Valide la sélection depuis la sheet mobile (ferme le popup, marque le champ comme visité et replace le focus sur le trigger). */
1496
+ protected validateSheet(): void;
1490
1497
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KtMultiSelect<any, any>, never>;
1491
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KtMultiSelect<any, any>, "kt-multi-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "selectionActions": { "alias": "selectionActions"; "required": false; "isSignal": true; }; "maxVisibleChips": { "alias": "maxVisibleChips"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "selectionChange": "selectionChange"; }, ["optionDef", "triggerDef", "chipDef"], ["[ktFieldHelp]"], true, never>;
1498
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KtMultiSelect<any, any>, "kt-multi-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "selectionActions": { "alias": "selectionActions"; "required": false; "isSignal": true; }; "maxVisibleChips": { "alias": "maxVisibleChips"; "required": false; "isSignal": true; }; "validationButtonLabel": { "alias": "validationButtonLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "selectionChange": "selectionChange"; }, ["optionDef", "triggerDef", "chipDef"], ["[ktFieldHelp]"], true, never>;
1492
1499
  }
1493
1500
 
1494
1501
  /** Portée de transition des chips. Fourni par `ChipList` (via `useExisting`) ; injecté en