origam 2.32.1 → 2.33.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 CHANGED
@@ -18,6 +18,24 @@ This project follows [Semantic Versioning](https://semver.org).
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [2.33.0] - 2026-10-18
22
+
23
+ ### Added — `OrigamCommandPalette` : icônes de recherche et de chargement personnalisables (#1183)
24
+
25
+ - Nouvelles props `searchIcon` et `loadingIcon`, typées `TIcon` (id mdi, chemin SVG ou composant). Défauts inchangés : `mdi:mdi-magnify` et `mdi:mdi-loading`.
26
+ - Nouveaux slots `search-icon` et `loading`, prioritaires sur les props.
27
+ - Une application qui fournit un SVG n'a plus besoin de la police `@mdi/font` pour ces deux glyphes : aucun élément `.mdi-magnify` / `.mdi-loading` n'est rendu (prouvé par `packages/tests/e2e/command-palette.spec.ts`).
28
+
29
+ ## [2.32.2] - 2026-10-17
30
+
31
+ ### Fixed — `OrigamBtn` : libellé collé en haut au lieu d'être centré (#1168)
32
+
33
+ Régression publiée de 2.29.1 à 2.32.1, introduite par #1094. La hauteur du bouton est devenue `height: auto` + `min-height`, et le `height: 100%` de la grille interne `.origam-btn__loader` ne se résolvait plus contre une hauteur automatique. La racine était `inline-block`, donc son `align-items: center` restait sans effet. Résultat : un bouton rendu en `<a>` (`href` / `to`) affichait son contenu d'une ligne collé en haut de la boîte. Mesuré en Chromium : écart de 4 à 21 px entre le centre du contenu et le centre du bouton, 35 boutons `<a>` d'une ligne décentrés sur les 40 de la matrice. Les 5 autres avaient une hauteur fixe (`icon`, prop `height`), étaient en `block` (déjà en flex), ou avaient un contenu aussi haut que le minimum (x-small compact). Un `<button>` natif masquait le défaut, puisque le navigateur centre lui-même son contenu.
34
+
35
+ - La racine passe de `inline-block` à `inline-flex`, et son `align-items: center` prend enfin effet. Elle reste de niveau inline (#933). Dans un parent flex ou grid, elle est blockifiée en `flex` au lieu de `block`. `block` (`display: flex`, #1095) et `wrap` (le bouton grandit avec son contenu, #1094) sont inchangés.
36
+ - `inline-flex` plutôt que `inline-grid`, d'après la mesure : la directive ripple ajoute un `origam-ripple__container` dans le flux pendant l'appui. Avec une racine en grille, ce conteneur prend une rangée implicite et le libellé saute de 4 px à chaque clic.
37
+ - Effet de bord mesuré : les boutons perdent environ 1 px de largeur (0,9 à 1,6 px). Ce pixel venait du `letter-spacing` ajouté après la grille interne quand elle était posée dans une ligne inline. Le libellé est maintenant à égale distance des deux bords (12 px / 12 px au lieu de 13,1 px / 12 px). Aucune hauteur ne change.
38
+
21
39
  ## [2.32.1] - 2026-10-16
22
40
 
23
41
  ### Fixed — trois avertissements console en dev (#1152)
@@ -455,15 +455,25 @@ defineExpose({
455
455
  // Btn roots computed `display: block` with a `display: flex` parent,
456
456
  // and the single Btn inside a `<p>` computed `inline` at 984px wide.
457
457
  //
458
- // `inline-block` is the value the rest of this rule already assumed —
459
- // `vertical-align: middle` right below only has meaning on an
460
- // inline-level box. It is also the safest: inside a flex/grid parent it
461
- // blockifies to `block`, i.e. byte-for-byte today's computed value, so
462
- // no existing layout moves. `&--block` still overrides it with `flex`.
463
- display: inline-block;
464
- // #1094 — inoperant tant que la racine est `inline-block` ; prend effet
465
- // sur `&--block` (`display: flex`), ou `height: auto` + `min-height`
466
- // laisseraient sinon le contenu colle en haut.
458
+ // The root must stay INLINE-LEVEL (#933) — `vertical-align: middle` right
459
+ // below only has meaning on an inline-level box, and a Btn in a `<p>`
460
+ // must shrink to its content. Inside a flex/grid parent it blockifies to
461
+ // `flex`; `&--block` declares `flex` explicitly.
462
+ //
463
+ // ⛔ #1168 — it is `inline-flex`, not `inline-block`. Since #1094 the
464
+ // height is `auto` + `min-height`, and `__loader`'s `height: 100%` no
465
+ // longer resolves against an auto height: on an `<a>` (`href` / `to`) the
466
+ // label sat at the TOP of the box — 12 px of content glued under the top
467
+ // edge of a 28 px button (published 2.29.1 → 2.32.1). A `<button>` hid
468
+ // it, because the UA centres a button's content on its own. A flex root
469
+ // centres `__loader` with `align-items: center` below, on every tag.
470
+ //
471
+ // `inline-flex` rather than `inline-grid`, measured: the ripple directive
472
+ // appends an in-flow `origam-ripple__container` to this root while the
473
+ // pointer is down. A grid root gives it an implicit row that takes half
474
+ // the free height, and the label jumps 4 px on every press; a flex row
475
+ // leaves the label where it is.
476
+ display: inline-flex;
467
477
  align-items: center;
468
478
 
469
479
  position: var(--origam-btn---position, relative);
@@ -25,12 +25,14 @@
25
25
  tabindex="-1"
26
26
  >
27
27
  <div class="origam-command-palette__search">
28
- <origam-icon
29
- :icon="MDI_ICONS.MAGNIFY"
30
- :size="20"
31
- aria-hidden="true"
32
- class="origam-command-palette__search-icon"
33
- />
28
+ <slot name="search-icon">
29
+ <origam-icon
30
+ :icon="searchIcon"
31
+ :size="20"
32
+ aria-hidden="true"
33
+ class="origam-command-palette__search-icon"
34
+ />
35
+ </slot>
34
36
  <input
35
37
  :id="inputId"
36
38
  ref="inputRef"
@@ -65,11 +67,13 @@
65
67
  v-if="loading"
66
68
  class="origam-command-palette__loading"
67
69
  >
68
- <origam-icon
69
- :icon="MDI_ICONS.LOADING"
70
- :size="20"
71
- class="origam-command-palette__loading-icon"
72
- />
70
+ <slot name="loading">
71
+ <origam-icon
72
+ :icon="loadingIcon"
73
+ :size="20"
74
+ class="origam-command-palette__loading-icon"
75
+ />
76
+ </slot>
73
77
  </div>
74
78
 
75
79
  <template
@@ -180,7 +184,6 @@ import { useTypography } from "../../composables/Commons/typography.composable";
180
184
  import { useVModel } from "../../composables/Commons/vModel.composable";
181
185
  import { COMMAND_PALETTE_DEFAULT_HOTKEY, COMMAND_PALETTE_DEFAULT_MAX_HEIGHT, COMMAND_PALETTE_DEFAULT_WIDTH } from "../../consts/CommandPalette/command-palette.const";
182
186
  import { IN_BROWSER } from "../../consts/Commons/commons.const";
183
- import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
184
187
  import { getUid } from "../../utils/Commons/getCurrentInstance.util";
185
188
  import { fuzzyMatch } from "../../utils/CommandPalette/fuzzy-match.util";
186
189
  defineOptions({ inheritAttrs: false });
@@ -193,6 +196,8 @@ const props = defineProps({
193
196
  maxHeight: { type: [Number, String], required: false, default: COMMAND_PALETTE_DEFAULT_MAX_HEIGHT },
194
197
  width: { type: [Number, String], required: false, default: COMMAND_PALETTE_DEFAULT_WIDTH },
195
198
  loading: { type: Boolean, required: false, default: false },
199
+ searchIcon: { type: null, required: false, default: "mdi:mdi-magnify" },
200
+ loadingIcon: { type: null, required: false, default: "mdi:mdi-loading" },
196
201
  closeOnSelect: { type: Boolean, required: false, default: true },
197
202
  closeOnEscape: { type: Boolean, required: false, default: true },
198
203
  closeOnBackdrop: { type: Boolean, required: false, default: true },
@@ -2,6 +2,7 @@ import type { ICommand } from './command.interface';
2
2
  import type { IAttachProps } from '../Commons/attach.interface';
3
3
  import type { ICommonsComponentProps } from '../Commons/commons.interface';
4
4
  import type { ITypographyProps } from '../Commons/typography.interface';
5
+ import type { TIcon } from '../../types/Icon/icon.type';
5
6
  /**
6
7
  * A hotkey is either a single combination (`['meta', 'k']`) or an
7
8
  * array of alternatives — every entry being a list of normalised key
@@ -36,6 +37,8 @@ export interface ICommandPaletteProps extends ICommonsComponentProps, Pick<ITypo
36
37
  width?: number | string;
37
38
  /** Display a loader inside the result list (use during async fetches). */
38
39
  loading?: boolean;
40
+ searchIcon?: TIcon;
41
+ loadingIcon?: TIcon;
39
42
  /** Close the palette automatically when a command is selected. */
40
43
  closeOnSelect?: boolean;
41
44
  /** Close when the user presses Escape. */
@@ -55,5 +58,7 @@ export interface ICommandPaletteSlotProps {
55
58
  export interface ICommandPaletteSlots {
56
59
  item?: (props: ICommandPaletteSlotProps) => any;
57
60
  empty?: () => any;
61
+ 'search-icon'?: () => any;
62
+ loading?: () => any;
58
63
  footer?: () => any;
59
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "origam",
3
- "version": "2.32.1",
3
+ "version": "2.33.0",
4
4
  "type": "module",
5
5
  "description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
6
6
  "keywords": [