@club-employes/utopia 4.432.0 → 4.434.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.
Files changed (29) hide show
  1. package/dist/components/layouts/DefaultLayout/components/MenuSection.d.ts +1 -1
  2. package/dist/components/layouts/DefaultLayout/components/NavItemGroup.d.ts +1 -1
  3. package/dist/components/molecules/EmptyState/EmptyState.d.ts +1 -1
  4. package/dist/components/molecules/GrantSelect/GrantSelect.d.ts +1 -1
  5. package/dist/components/molecules/IconPicker/IconPicker.d.ts +1 -1
  6. package/dist/components/molecules/SavingsAccordion/SavingsAccordion.d.ts +12 -0
  7. package/dist/components/molecules/SavingsAccordion/index.d.ts +2 -0
  8. package/dist/components/molecules/SavingsAccordion/types.d.ts +17 -0
  9. package/dist/components/molecules/index.d.ts +2 -0
  10. package/dist/components/organisms/BenefitsPreview/BenefitsCollapse.d.ts +27 -0
  11. package/dist/components/organisms/BenefitsPreview/BenefitsLineItem.d.ts +11 -0
  12. package/dist/components/organisms/BenefitsPreview/BenefitsPanel.d.ts +18 -0
  13. package/dist/components/organisms/BenefitsPreview/BenefitsPreview.d.ts +35 -0
  14. package/dist/components/organisms/BenefitsPreview/BenefitsVoucherCard.d.ts +18 -0
  15. package/dist/components/organisms/BenefitsPreview/__tests__/BenefitsPanel.spec.d.ts +1 -0
  16. package/dist/components/organisms/BenefitsPreview/__tests__/BenefitsPreview.spec.d.ts +1 -0
  17. package/dist/components/organisms/BenefitsPreview/__tests__/fixtures.d.ts +4 -0
  18. package/dist/components/organisms/BenefitsPreview/index.d.ts +3 -0
  19. package/dist/components/organisms/BenefitsPreview/types.d.ts +157 -0
  20. package/dist/components/organisms/CartConfirmation/types.d.ts +8 -16
  21. package/dist/components/organisms/OrderCard/OrderCard.d.ts +22 -0
  22. package/dist/components/organisms/OrderCard/index.d.ts +2 -0
  23. package/dist/components/organisms/OrderCard/types.d.ts +105 -0
  24. package/dist/components/organisms/index.d.ts +4 -0
  25. package/dist/i18n/messages/fr.d.ts +40 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.js +13637 -12317
  28. package/dist/utopia.css +1 -1
  29. package/package.json +1 -1
@@ -25,8 +25,8 @@ declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentO
25
25
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
26
26
  }>, {
27
27
  modelValue: boolean;
28
- collapsed: boolean;
29
28
  defaultExpanded: boolean;
29
+ collapsed: boolean;
30
30
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
31
31
  sentinelRef: HTMLDivElement;
32
32
  sectionRef: HTMLButtonElement;
@@ -23,8 +23,8 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
23
23
  "onChild-click"?: ((child: ChildItem, event: MouseEvent) => any) | undefined;
24
24
  }>, {
25
25
  children: ChildItem[];
26
- collapsed: boolean;
27
26
  defaultExpanded: boolean;
27
+ collapsed: boolean;
28
28
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
29
29
  groupRef: HTMLDivElement;
30
30
  flyoutRef: HTMLDivElement;
@@ -5,8 +5,8 @@ import { ButtonColor } from '../../atoms/Button/types';
5
5
  declare const _default: DefineComponent<EmptyStateProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<EmptyStateProps> & Readonly<{}>, {
6
6
  title: string;
7
7
  icon: IconName;
8
- buttonLabel: string;
9
8
  description: string;
9
+ buttonLabel: string;
10
10
  iconSize: IconSize;
11
11
  iconColor: string;
12
12
  buttonAction: () => void;
@@ -6,9 +6,9 @@ declare const _default: DefineComponent<GrantSelectItemProps, {}, {}, {}, {}, Co
6
6
  "onUpdate:modelValue"?: ((value: string | number | boolean | undefined) => any) | undefined;
7
7
  }>, {
8
8
  disabled: boolean;
9
+ empty: boolean;
9
10
  dropdownPlaceholder: string;
10
11
  options: GrantSelectOption[];
11
- empty: boolean;
12
12
  amountLabel: string;
13
13
  accordionTitle: string;
14
14
  categoryLabel: string;
@@ -10,7 +10,7 @@ declare const _default: DefineComponent<IconPickerProps, {}, {}, {}, {}, Compone
10
10
  size: "small" | "medium" | "large";
11
11
  disabled: boolean;
12
12
  modelValue: string;
13
- placeholder: string;
14
13
  description: string;
14
+ placeholder: string;
15
15
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
16
16
  export default _default;
@@ -0,0 +1,12 @@
1
+ import { SavingsAccordionProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<SavingsAccordionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
4
+ toggle: (expanded: boolean) => any;
5
+ }, string, PublicProps, Readonly<SavingsAccordionProps> & Readonly<{
6
+ onToggle?: ((expanded: boolean) => any) | undefined;
7
+ }>, {
8
+ defaultExpanded: boolean;
9
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
10
+ linesRef: HTMLDivElement;
11
+ }, HTMLDivElement>;
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as SavingsAccordion } from './SavingsAccordion';
2
+ export type { SavingsAccordionProps, SavingsAccordionLine, SavingsAccordionLineColor } from './types';
@@ -0,0 +1,17 @@
1
+ /** Color of the leading bullet on a savings line. */
2
+ export type SavingsAccordionLineColor = 'accent' | 'subvention' | 'echeque' | 'secondary';
3
+ /** One line in the collapsible savings breakdown. */
4
+ export interface SavingsAccordionLine {
5
+ label: string;
6
+ /** Pre-formatted amount, e.g. "-9,00 €". */
7
+ value: string;
8
+ /** Leading bullet color. Defaults to 'secondary'. */
9
+ color?: SavingsAccordionLineColor;
10
+ }
11
+ /** The blue collapsible "X € d'économisé" breakdown. */
12
+ export interface SavingsAccordionProps {
13
+ /** Pre-formatted headline, e.g. "53 € d'économisé". */
14
+ label: string;
15
+ lines: SavingsAccordionLine[];
16
+ defaultExpanded?: boolean;
17
+ }
@@ -77,3 +77,5 @@ export { VerticalStepper } from './VerticalStepper';
77
77
  export type { VerticalStepperProps, VerticalStep, VerticalStepStatus, VerticalStepperStatus } from './VerticalStepper';
78
78
  export { OfferCard } from './OfferCard';
79
79
  export type { OfferCardProps, OfferCardMeta, OfferCardMetaTone } from './OfferCard';
80
+ export { SavingsAccordion } from './SavingsAccordion';
81
+ export type { SavingsAccordionProps, SavingsAccordionLine, SavingsAccordionLineColor } from './SavingsAccordion';
@@ -0,0 +1,27 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ /** Id référencé par l'`aria-controls` du bouton de bascule. */
4
+ id: string;
5
+ expanded: boolean;
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {
13
+ contentEl: HTMLDivElement;
14
+ };
15
+ rootEl: HTMLDivElement;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
19
+ contentEl: HTMLDivElement;
20
+ }, HTMLDivElement>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,11 @@
1
+ import { BenefitsLine } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = {
4
+ line: BenefitsLine;
5
+ };
6
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
7
+ activate: (event: MouseEvent) => any;
8
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onActivate?: ((event: MouseEvent) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { BenefitsLine, BenefitsPanelProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = BenefitsPanelProps;
4
+ type __VLS_PublicProps = {
5
+ 'expanded'?: string[];
6
+ } & __VLS_Props;
7
+ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
8
+ toggle: (id: string, expanded: boolean) => any;
9
+ action: (id: string, event: MouseEvent) => any;
10
+ "line-click": (line: BenefitsLine, groupId: string, event: MouseEvent) => any;
11
+ "update:expanded": (value: string[]) => any;
12
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ onToggle?: ((id: string, expanded: boolean) => any) | undefined;
14
+ onAction?: ((id: string, event: MouseEvent) => any) | undefined;
15
+ "onLine-click"?: ((line: BenefitsLine, groupId: string, event: MouseEvent) => any) | undefined;
16
+ "onUpdate:expanded"?: ((value: string[]) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { BenefitsLine, BenefitsPreviewProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type OpenSource = 'hover' | 'click' | 'keyboard';
4
+ type __VLS_Props = BenefitsPreviewProps;
5
+ type __VLS_PublicProps = {
6
+ 'open'?: boolean;
7
+ 'expanded'?: string[];
8
+ } & __VLS_Props;
9
+ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
+ toggle: (id: string, expanded: boolean) => any;
11
+ action: (id: string, event: MouseEvent) => any;
12
+ opened: (source: OpenSource) => any;
13
+ "update:open": (value: boolean) => any;
14
+ "line-click": (line: BenefitsLine, groupId: string, event: MouseEvent) => any;
15
+ "update:expanded": (value: string[]) => any;
16
+ "first-open": () => any;
17
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ onToggle?: ((id: string, expanded: boolean) => any) | undefined;
19
+ onAction?: ((id: string, event: MouseEvent) => any) | undefined;
20
+ onOpened?: ((source: OpenSource) => any) | undefined;
21
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
22
+ "onLine-click"?: ((line: BenefitsLine, groupId: string, event: MouseEvent) => any) | undefined;
23
+ "onUpdate:expanded"?: ((value: string[]) => any) | undefined;
24
+ "onFirst-open"?: (() => any) | undefined;
25
+ }>, {
26
+ openDelay: number;
27
+ closeDelay: number;
28
+ triggerIcon: string;
29
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
30
+ rootEl: HTMLDivElement;
31
+ triggerEl: HTMLButtonElement;
32
+ panelEl: HTMLDivElement;
33
+ sheetEl: HTMLDivElement;
34
+ }, HTMLDivElement>;
35
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { BenefitsCard } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = {
4
+ card: BenefitsCard;
5
+ expanded: boolean;
6
+ /** Préfixe d'ids unique (aria-controls / aria-describedby). */
7
+ idPrefix: string;
8
+ showDetailsLabel: string;
9
+ hideDetailsLabel: string;
10
+ };
11
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
12
+ toggle: () => any;
13
+ action: (id: string, event: MouseEvent) => any;
14
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onToggle?: (() => any) | undefined;
16
+ onAction?: ((id: string, event: MouseEvent) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { BenefitsHero, BenefitsSection } from '../types';
2
+ /** Données des maquettes (écrans 1 à 5), réutilisées par les specs. */
3
+ export declare const hero: BenefitsHero;
4
+ export declare const sections: BenefitsSection[];
@@ -0,0 +1,3 @@
1
+ export { default as BenefitsPreview } from './BenefitsPreview';
2
+ export { default as BenefitsPanel } from './BenefitsPanel';
3
+ export type { BenefitsCard, BenefitsCardLine, BenefitsGroup, BenefitsHelpId, BenefitsHelpItem, BenefitsHero, BenefitsLine, BenefitsLineBadge, BenefitsLink, BenefitsPanelProps, BenefitsPreviewProps, BenefitsSection } from './types';
@@ -0,0 +1,157 @@
1
+ /**
2
+ * BenefitsPreview / BenefitsPanel — aperçu « Mes avantages » du header
3
+ * (subventions, cagnottes, titres-restaurant).
4
+ *
5
+ * Organisme « bête » : toutes les valeurs (montants, dates, compteurs…)
6
+ * arrivent PRÉ-FORMATÉES du consommateur, le DS ne fait aucun calcul métier.
7
+ * Les `id` sont opaques et stables : ils sont réémis tels quels (`action`,
8
+ * `toggle`, `line-click`) et alimentent l'analytics côté consommateur.
9
+ */
10
+ /** Identifiants des explications par défaut du bloc « Comment ça marche ? » (dictionnaire i18n du DS). */
11
+ export type BenefitsHelpId = 'product-grant' | 'cart-grant' | 'jackpot' | 'refund' | 'meal-voucher';
12
+ /** Encart de synthèse en tête de panneau (« Disponible sur la plateforme »). */
13
+ export interface BenefitsHero {
14
+ label: string;
15
+ /** Montant pré-formaté (« 440,00 € »). */
16
+ amount: string;
17
+ /** Détail du montant (« Cagnottes 440,00 € »), une puce par ligne. */
18
+ breakdown?: {
19
+ label: string;
20
+ value: string;
21
+ }[];
22
+ }
23
+ /** Une explication du bloc « Comment ça marche ? ». */
24
+ export interface BenefitsHelpItem {
25
+ id: string;
26
+ /** Nom d'icône Utopia (ex. 'Tag', 'Piggy-bank'). */
27
+ icon: string;
28
+ title: string;
29
+ description: string;
30
+ /** Fond de la tuile d'icône (défaut 'primary'). */
31
+ tone?: 'primary' | 'warning' | 'neutral';
32
+ }
33
+ /** Pastille au-dessus du titre d'une ligne (« CAMPAGNE », « REMB. SUR FACTURE »). */
34
+ export interface BenefitsLineBadge {
35
+ label: string;
36
+ icon?: string;
37
+ /** Défaut 'primary'. */
38
+ tone?: 'primary' | 'warning';
39
+ }
40
+ /** Une ligne (subvention, remboursement…) dans un groupe déplié. */
41
+ export interface BenefitsLine {
42
+ id: string;
43
+ title: string;
44
+ /** « CAMPAGNE » / « REMB. SUR FACTURE » */
45
+ badge?: BenefitsLineBadge;
46
+ /** Valeur à droite du titre : « 140,00 € restants » / « 45,00 € ». */
47
+ value?: string;
48
+ /** Compteur en pastille à droite du titre : « 3/4 achats ». */
49
+ counter?: string;
50
+ /** Règle de prise en charge : icône + libellé (« -30 % sur le prix du produit »). */
51
+ rule?: {
52
+ icon: string;
53
+ label: string;
54
+ };
55
+ /** Barre de progression (le consommateur fournit les deux bornes). */
56
+ progress?: {
57
+ value: number;
58
+ max: number;
59
+ };
60
+ /**
61
+ * Ligne de temporalité — icône selon `kind` :
62
+ * 'renewal' → Repeat, 'expiration' → Calendar-clock, 'validated' → Calendar-check.
63
+ */
64
+ timing?: {
65
+ kind: 'renewal' | 'expiration' | 'validated';
66
+ label: string;
67
+ };
68
+ /** Complément ajouté après la temporalité (« sur 320,00 € »). */
69
+ meta?: string;
70
+ /** Ligne cliquable : émet `line-click` (le titre devient un bouton couvrant la carte). */
71
+ interactive?: boolean;
72
+ }
73
+ /** Lien d'action (rendu en bouton, émet `action` avec son `id` — la navigation appartient au consommateur). */
74
+ export interface BenefitsLink {
75
+ id: string;
76
+ label: string;
77
+ icon?: string;
78
+ }
79
+ /** Groupe repliable (Subventions, Cagnottes). */
80
+ export interface BenefitsGroup {
81
+ id: string;
82
+ /** Nom d'icône Utopia de la tuile (ex. 'Wallet', 'Piggy-bank'). */
83
+ icon: string;
84
+ title: string;
85
+ subtitle?: string;
86
+ /** Résumé à droite : « 4 subventions » (accent) | « 440,00 € » (default). */
87
+ summary: string;
88
+ /** 'accent' = couleur de marque, 'default' = texte fort (défaut). */
89
+ summaryTone?: 'accent' | 'default';
90
+ lines: BenefitsLine[];
91
+ /** Libellé quand `lines` est vide (défaut i18n). */
92
+ emptyLabel?: string;
93
+ /** Lien affiché en bas du groupe déplié, émet `action`. */
94
+ link?: BenefitsLink;
95
+ }
96
+ /** Ligne de détail d'une carte (« Dotation de juin 2026 » / « + 180,00 € »). */
97
+ export interface BenefitsCardLine {
98
+ id: string;
99
+ label: string;
100
+ value: string;
101
+ }
102
+ /** Carte sombre « Titres-restaurant » avec bascule Détails / Masquer. */
103
+ export interface BenefitsCard {
104
+ id: string;
105
+ title: string;
106
+ /** Montant pré-formaté (« 214,56 € »). */
107
+ amount: string;
108
+ /** Légende sous le montant (« Réseau Mastercard »). */
109
+ caption?: string;
110
+ /** Détails (révélés par la bascule, masquée si aucun détail). */
111
+ description?: string;
112
+ lines?: BenefitsCardLine[];
113
+ /** « Voir ma carte » — émet `action`. */
114
+ action?: BenefitsLink;
115
+ }
116
+ /** Section surmontée d'un sur-titre (« UTILISABLE SUR LA PLATEFORME »). */
117
+ export interface BenefitsSection {
118
+ id: string;
119
+ label: string;
120
+ /** Pastille du sur-titre : 'success' (vert) | 'neutral' (gris). Aucune si absent. */
121
+ dot?: 'success' | 'neutral';
122
+ groups?: BenefitsGroup[];
123
+ cards?: BenefitsCard[];
124
+ }
125
+ export interface BenefitsPanelProps {
126
+ hero?: BenefitsHero;
127
+ sections: BenefitsSection[];
128
+ /** Remplace les explications par défaut du DS. */
129
+ helpItems?: BenefitsHelpItem[];
130
+ /** Filtre les explications par défaut (ordre canonique conservé ; ignoré si `helpItems` est fourni). */
131
+ helpIds?: BenefitsHelpId[];
132
+ /** Masque le bloc « Comment ça marche ? ». */
133
+ hideHelp?: boolean;
134
+ /** Titre du bloc d'aide (défaut i18n « Comment ça marche ? »). */
135
+ helpTitle?: string;
136
+ /** Squelettes à la place de l'encart et des sections. */
137
+ loading?: boolean;
138
+ /** Message d'erreur global (remplace l'encart et les sections). */
139
+ error?: string;
140
+ /** Force la langue des libellés internes (sinon locale Utopia globale). */
141
+ language?: string;
142
+ }
143
+ export interface BenefitsPreviewProps extends BenefitsPanelProps {
144
+ /** Libellé du trigger pill (« 4 subventions »). */
145
+ triggerLabel: string;
146
+ /** Icône Utopia du trigger (défaut 'Badge-percent'). */
147
+ triggerIcon?: string;
148
+ /** Nom accessible du trigger (doit contenir le libellé visible). */
149
+ triggerAriaLabel?: string;
150
+ /** Nom accessible du dialog (défaut i18n « Mes avantages »). */
151
+ title?: string;
152
+ /** Délai d'ouverture au survol, en ms (défaut 150). */
153
+ openDelay?: number;
154
+ /** Délai de fermeture à la sortie du survol, en ms (défaut 300). */
155
+ closeDelay?: number;
156
+ disabled?: boolean;
157
+ }
@@ -1,4 +1,5 @@
1
1
  import { ProductRecapProps } from '../ProductRecap/types';
2
+ import { SavingsAccordionLine, SavingsAccordionLineColor, SavingsAccordionProps } from '../../molecules/SavingsAccordion/types';
2
3
  /** A read-only info block — delivery/billing address.
3
4
  * `lines` are pre-formatted strings, each rendered as its own row. */
4
5
  export interface CartConfirmationAddress {
@@ -13,15 +14,10 @@ export interface CartConfirmationPayment {
13
14
  type: CartConfirmationPaymentType;
14
15
  lines?: string[];
15
16
  }
16
- /** Color of the leading bullet on a savings line. */
17
- export type CartConfirmationSavingColor = 'accent' | 'subvention' | 'echeque' | 'secondary';
18
- /** One line in the collapsible savings breakdown. */
19
- export interface CartConfirmationSavingLine {
20
- label: string;
21
- /** Pre-formatted amount, e.g. "-9,00 €". */
22
- value: string;
23
- color?: CartConfirmationSavingColor;
24
- }
17
+ /** @deprecated Use `SavingsAccordionLineColor`. */
18
+ export type CartConfirmationSavingColor = SavingsAccordionLineColor;
19
+ /** @deprecated Use `SavingsAccordionLine`. */
20
+ export type CartConfirmationSavingLine = SavingsAccordionLine;
25
21
  /** A totals row (sous-total / frais de livraison) with an optional struck old value. */
26
22
  export interface CartConfirmationSummaryRow {
27
23
  label: string;
@@ -30,13 +26,9 @@ export interface CartConfirmationSummaryRow {
30
26
  /** Pre-formatted previous value, rendered struck-through before `value`. */
31
27
  oldValue?: string;
32
28
  }
33
- /** The blue collapsible "X € d'économisé" breakdown. Hidden when absent. */
34
- export interface CartConfirmationSavings {
35
- /** e.g. "21 € d'économisé". */
36
- label: string;
37
- defaultExpanded?: boolean;
38
- lines: CartConfirmationSavingLine[];
39
- }
29
+ /** The blue collapsible "X € d'économisé" breakdown. Hidden when absent.
30
+ * @deprecated Use `SavingsAccordionProps`. */
31
+ export type CartConfirmationSavings = SavingsAccordionProps;
40
32
  export interface CartConfirmationSummary {
41
33
  /** Sous-total row — hidden when absent. */
42
34
  subtotal?: CartConfirmationSummaryRow;
@@ -0,0 +1,22 @@
1
+ import { OrderCardProps, OrderCardItem, OrderCardItemAction } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<OrderCardProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
4
+ "action-click": (payload: {
5
+ item: OrderCardItem;
6
+ action: OrderCardItemAction;
7
+ }) => any;
8
+ "invoice-click": (event: MouseEvent) => any;
9
+ "details-click": (event: MouseEvent) => any;
10
+ "savings-toggle": (expanded: boolean) => any;
11
+ }, string, PublicProps, Readonly<OrderCardProps> & Readonly<{
12
+ "onAction-click"?: ((payload: {
13
+ item: OrderCardItem;
14
+ action: OrderCardItemAction;
15
+ }) => any) | undefined;
16
+ "onInvoice-click"?: ((event: MouseEvent) => any) | undefined;
17
+ "onDetails-click"?: ((event: MouseEvent) => any) | undefined;
18
+ "onSavings-toggle"?: ((expanded: boolean) => any) | undefined;
19
+ }>, {
20
+ loadingRows: number;
21
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
22
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as OrderCard } from './OrderCard';
2
+ export type { OrderCardProps, OrderCardImage, OrderCardAddress, OrderCardItem, OrderCardItemStatus, OrderCardItemAction, OrderCardItemDelivery, OrderCardItemTracking, OrderCardLink, OrderCardActionPayload } from './types';
@@ -0,0 +1,105 @@
1
+ import { ChipVariant } from '../../atoms/Chip/types';
2
+ import { ImageFits } from '../../atoms/DefaultImage/types';
3
+ import { SavingsAccordionProps } from '../../molecules/SavingsAccordion/types';
4
+ import { UtopiaLocale } from '../../../i18n/types';
5
+ export interface OrderCardImage {
6
+ url: string;
7
+ alt?: string;
8
+ fit?: ImageFits;
9
+ }
10
+ /** An underlined text action in the card header. Hidden when absent.
11
+ * It carries no href: the component only emits, and the caller decides what
12
+ * happens (navigate, open a modal, fetch an authenticated file, …). */
13
+ export interface OrderCardLink {
14
+ /** Defaults from i18n. */
15
+ label?: string;
16
+ disabled?: boolean;
17
+ }
18
+ /** One column of the grey address bar. One or two columns are supported. */
19
+ export interface OrderCardAddress {
20
+ /** Uppercase caption. Defaults from i18n by position (livraison, then facturation). */
21
+ label?: string;
22
+ /** Defaults by position: 'fa:regular:location-dot', then 'fa:regular:file-lines'. */
23
+ icon?: string;
24
+ /** Bold lead, e.g. "Raneem Bach" or "Club Employés SAS". */
25
+ name: string;
26
+ /** Pre-formatted remainder, e.g. "12 Rue de la République, 38100 Grenoble". */
27
+ address: string;
28
+ }
29
+ /** Status chip on an item row, e.g. "En préparation" (warning), "Expédiées" (success). */
30
+ export interface OrderCardItemStatus {
31
+ label: string;
32
+ variant?: ChipVariant;
33
+ leftIcon?: string;
34
+ }
35
+ /** Shipping method line under an item title, e.g. "Colissimo · Dom." */
36
+ export interface OrderCardItemDelivery {
37
+ label: string;
38
+ /** Defaults to 'fa:regular:truck'. Use 'fa:regular:envelope' for digital delivery. */
39
+ icon?: string;
40
+ }
41
+ /** Carrier tracking link under an item title, e.g. "FR123456789". */
42
+ export interface OrderCardItemTracking {
43
+ label: string;
44
+ to?: string;
45
+ }
46
+ /** A download button attached to an item row. */
47
+ export interface OrderCardItemAction {
48
+ id: string | number;
49
+ label: string;
50
+ /** Defaults to 'fa:regular:arrow-down-to-line'. */
51
+ icon?: string;
52
+ /** Opened in a new tab by the component when set. */
53
+ url?: string;
54
+ disabled?: boolean;
55
+ loading?: boolean;
56
+ }
57
+ export interface OrderCardItem {
58
+ id: string | number;
59
+ image?: OrderCardImage;
60
+ title: string;
61
+ /** Brand, rendered muted after a "·". Hidden when absent. */
62
+ brand?: string;
63
+ status?: OrderCardItemStatus;
64
+ /** Shipping method line — hidden when absent. */
65
+ delivery?: OrderCardItemDelivery;
66
+ /** Carrier tracking link — hidden when absent. */
67
+ tracking?: OrderCardItemTracking;
68
+ /** Pre-formatted line total, e.g. "144 €". */
69
+ price?: string;
70
+ /** Pre-formatted unit price including its suffix, e.g. "48 € / unité". Hidden when absent. */
71
+ unitPrice?: string;
72
+ quantity?: number;
73
+ /** Download buttons under the row. Hidden when empty. */
74
+ actions?: OrderCardItemAction[];
75
+ }
76
+ export interface OrderCardProps {
77
+ loading?: boolean;
78
+ /** Full reference line, e.g. "Commande #835C7175A9R67". */
79
+ reference?: string;
80
+ /** Pre-formatted subtitle, e.g. "06 Mai 2026 · 6 articles". */
81
+ subtitle?: string;
82
+ /** Pre-formatted grand total, e.g. "198 €". */
83
+ total?: string;
84
+ /** Collapsible savings breakdown. Full width on a narrow card. Hidden when absent. */
85
+ savings?: SavingsAccordionProps;
86
+ /** "Voir les détails" action — hidden when absent. Emits `details-click`. */
87
+ details?: OrderCardLink;
88
+ /** "Télécharger la facture" action — hidden when absent. Emits `invoice-click`. */
89
+ invoice?: OrderCardLink;
90
+ /** One or two columns; the grey bar is hidden when empty. Stacks on a narrow card. */
91
+ addresses?: OrderCardAddress[];
92
+ items?: OrderCardItem[];
93
+ /** Prefix before the quantity, e.g. "Qt :". Defaults from i18n. */
94
+ quantityLabel?: string;
95
+ /** Number of skeleton item rows rendered while `loading`. */
96
+ loadingRows?: number;
97
+ /** Don't open `action.url` after emitting `action-click`.
98
+ * Use when the caller downloads the file itself (e.g. an authenticated fetch). */
99
+ skipWindowOpen?: boolean;
100
+ language?: UtopiaLocale;
101
+ }
102
+ export interface OrderCardActionPayload {
103
+ item: OrderCardItem;
104
+ action: OrderCardItemAction;
105
+ }
@@ -48,3 +48,7 @@ export { ExplanationStepper } from './ExplanationStepper';
48
48
  export type { ExplanationStepperProps } from './ExplanationStepper';
49
49
  export { CampaignAncvCard } from './CampaignAncvCard';
50
50
  export type { CampaignAncvCardProps } from './CampaignAncvCard';
51
+ export { OrderCard } from './OrderCard';
52
+ export type { OrderCardProps, OrderCardImage, OrderCardAddress, OrderCardItem, OrderCardItemStatus, OrderCardItemAction, OrderCardItemDelivery, OrderCardItemTracking, OrderCardLink, OrderCardActionPayload } from './OrderCard';
53
+ export { BenefitsPreview, BenefitsPanel } from './BenefitsPreview';
54
+ export type { BenefitsPreviewProps, BenefitsPanelProps, BenefitsHelpId, BenefitsHero, BenefitsHelpItem, BenefitsLineBadge, BenefitsLine, BenefitsLink, BenefitsGroup, BenefitsCardLine, BenefitsCard, BenefitsSection } from './BenefitsPreview';
@@ -80,6 +80,38 @@ declare const _default: {
80
80
  showMore: string;
81
81
  showLess: string;
82
82
  };
83
+ benefitsPreview: {
84
+ title: string;
85
+ helpTitle: string;
86
+ showDetails: string;
87
+ hideDetails: string;
88
+ emptyGroup: string;
89
+ empty: string;
90
+ loading: string;
91
+ close: string;
92
+ help: {
93
+ productGrant: {
94
+ title: string;
95
+ description: string;
96
+ };
97
+ cartGrant: {
98
+ title: string;
99
+ description: string;
100
+ };
101
+ jackpot: {
102
+ title: string;
103
+ description: string;
104
+ };
105
+ refund: {
106
+ title: string;
107
+ description: string;
108
+ };
109
+ mealVoucher: {
110
+ title: string;
111
+ description: string;
112
+ };
113
+ };
114
+ };
83
115
  campaignAncvCard: {
84
116
  reference: string;
85
117
  faceValue: string;
@@ -402,6 +434,14 @@ declare const _default: {
402
434
  placeholder: string;
403
435
  outOfStock: string;
404
436
  };
437
+ orderCard: {
438
+ deliveryAddress: string;
439
+ billingAddress: string;
440
+ singleAddress: string;
441
+ details: string;
442
+ invoice: string;
443
+ quantity: string;
444
+ };
405
445
  pageNavigation: {
406
446
  previous: string;
407
447
  next: string;
package/dist/index.d.ts CHANGED
@@ -106,14 +106,17 @@ export type { UserSelectionProps } from './components/organisms/UserSelection/ty
106
106
  export type { ContestCardProps } from './components/organisms/ContestCard/types';
107
107
  export type { ExplanationStepperProps } from './components/organisms/ExplanationStepper/types';
108
108
  export type { CampaignAncvCardProps } from './components/organisms/CampaignAncvCard/types';
109
+ export type { OrderCardProps, OrderCardImage, OrderCardAddress, OrderCardItem, OrderCardItemStatus, OrderCardItemAction, OrderCardItemDelivery, OrderCardItemTracking, OrderCardLink, OrderCardActionPayload } from './components/organisms/OrderCard/types';
109
110
  export type { AddressFormProps, AddressFormSchema, AddressFormSection } from './components/organisms/AddressForm/types';
110
111
  export type { CartPreviewProps, CartPreviewPrice, CartPreviewPriceLine } from './components/organisms/CartPreview/types';
111
112
  export type { CartPreviewItemProps } from './components/molecules/CartPreviewItem/types';
113
+ export type { BenefitsPreviewProps, BenefitsPanelProps, BenefitsHelpId, BenefitsHero, BenefitsHelpItem, BenefitsLineBadge, BenefitsLine, BenefitsLink, BenefitsGroup, BenefitsCardLine, BenefitsCard, BenefitsSection } from './components/organisms/BenefitsPreview/types';
112
114
  export { MyUserGroups } from './components/molecules/MyUserGroups';
113
115
  export type { MyUserGroupsProps, UserGroupCriterion } from './components/molecules/MyUserGroups/types';
114
116
  export type { TreeProps, TreeNode, TreeSelectionKey } from './components/molecules/Tree/types';
115
117
  export type { VerticalStepperProps, VerticalStep, VerticalStepStatus, VerticalStepperStatus } from './components/molecules/VerticalStepper/types';
116
118
  export type { OfferCardProps, OfferCardMeta, OfferCardMetaTone } from './components/molecules/OfferCard/types';
119
+ export type { SavingsAccordionProps, SavingsAccordionLine, SavingsAccordionLineColor } from './components/molecules/SavingsAccordion/types';
117
120
  export { clubEmployesDark, clubEmployesLight } from './themes/club-employes';
118
121
  export { gifteoDark, gifteoLight } from './themes/gifteo';
119
122
  export type { LoaderProps } from './components/templates/Loader/types';