origam 2.32.2 → 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,14 @@ 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
+
21
29
  ## [2.32.2] - 2026-10-17
22
30
 
23
31
  ### Fixed — `OrigamBtn` : libellé collé en haut au lieu d'être centré (#1168)
@@ -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.2",
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": [