@club-employes/utopia 4.364.0 → 4.365.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.
@@ -3,6 +3,7 @@ export interface RadioBoxProps {
3
3
  value?: any;
4
4
  name?: string;
5
5
  disabled?: boolean;
6
+ readonly?: boolean;
6
7
  size?: 'xs' | 'sm' | 'md';
7
8
  error?: boolean;
8
9
  caption?: string;
@@ -7,6 +7,6 @@ declare const _default: DefineComponent<DeliveryMethodCardProps, {}, {}, {}, {},
7
7
  }>, {
8
8
  disabled: boolean;
9
9
  active: boolean;
10
- selectable: boolean;
10
+ readonly: boolean;
11
11
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLLabelElement>;
12
12
  export default _default;
@@ -3,7 +3,7 @@ export interface DeliveryMethodCardProps {
3
3
  description?: string;
4
4
  delay?: string;
5
5
  img?: string;
6
- selectable?: boolean;
6
+ readonly?: boolean;
7
7
  selected?: boolean;
8
8
  /** Pre-formatted price, e.g. "3,30 €". When set, the card renders the
9
9
  * summary layout (icon box + title + right-aligned price). The component
@@ -23,6 +23,7 @@ declare const __VLS_component: DefineComponent<RadioCardProps, {}, {}, {}, {}, C
23
23
  color: "primary" | "subvention" | "echeque";
24
24
  disabled: boolean;
25
25
  modelValue: any;
26
+ readonly: boolean;
26
27
  value: any;
27
28
  icon3dSize: number;
28
29
  iconAlignment: "start" | "center" | "end";
@@ -20,6 +20,7 @@ export interface RadioCardProps {
20
20
  icon3dSize?: number;
21
21
  iconAlignment?: 'start' | 'center' | 'end';
22
22
  disabled?: boolean;
23
+ readonly?: boolean;
23
24
  number?: string;
24
25
  bigPicto?: boolean;
25
26
  hideRadio?: boolean;
@@ -0,0 +1,6 @@
1
+ import { CartConfirmationProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<CartConfirmationProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CartConfirmationProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
4
+ cartConfirmationRef: HTMLDivElement;
5
+ }, HTMLDivElement>;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as CartConfirmation } from './CartConfirmation';
2
+ export type { CartConfirmationProps, CartConfirmationSavingColor } from './types';
@@ -0,0 +1,56 @@
1
+ import { ProductRecapProps } from '../ProductRecap/types';
2
+ /** A read-only info block — delivery/billing address or payment details.
3
+ * `lines` are pre-formatted strings, each rendered as its own row. */
4
+ export interface CartConfirmationInfoBlock {
5
+ title: string;
6
+ lines: string[];
7
+ }
8
+ /** Color of the leading bullet on a savings line. */
9
+ export type CartConfirmationSavingColor = 'accent' | 'subvention' | 'echeque' | 'secondary';
10
+ /** One line in the collapsible savings breakdown. */
11
+ export interface CartConfirmationSavingLine {
12
+ label: string;
13
+ /** Pre-formatted amount, e.g. "-9,00 €". */
14
+ value: string;
15
+ color?: CartConfirmationSavingColor;
16
+ }
17
+ /** A totals row (sous-total / frais de livraison) with an optional struck old value. */
18
+ export interface CartConfirmationSummaryRow {
19
+ label: string;
20
+ /** Pre-formatted current value, e.g. "21,50 €". */
21
+ value: string;
22
+ /** Pre-formatted previous value, rendered struck-through before `value`. */
23
+ oldValue?: string;
24
+ }
25
+ /** The blue collapsible "X € d'économisé" breakdown. Hidden when absent. */
26
+ export interface CartConfirmationSavings {
27
+ /** e.g. "21 € d'économisé". */
28
+ label: string;
29
+ defaultExpanded?: boolean;
30
+ lines: CartConfirmationSavingLine[];
31
+ }
32
+ export interface CartConfirmationSummary {
33
+ /** Sous-total row — hidden when absent. */
34
+ subtotal?: CartConfirmationSummaryRow;
35
+ /** Frais de livraison row — hidden when absent. */
36
+ deliveryFee?: CartConfirmationSummaryRow;
37
+ total: {
38
+ label: string;
39
+ value: string;
40
+ };
41
+ /** Savings accordion — hidden when absent. */
42
+ savings?: CartConfirmationSavings;
43
+ }
44
+ export interface CartConfirmationProps {
45
+ loading?: boolean;
46
+ /** Section heading, e.g. "Récapitulatif de commande". */
47
+ title?: string;
48
+ /** Product rows. Rendered read-only (no stepper, no delete) by CartConfirmation. */
49
+ products?: ProductRecapProps[];
50
+ /** Delivery & billing address block. */
51
+ address?: CartConfirmationInfoBlock;
52
+ /** Payment details block. */
53
+ payment?: CartConfirmationInfoBlock;
54
+ /** Totals + savings column. */
55
+ summary?: CartConfirmationSummary;
56
+ }
@@ -6,7 +6,9 @@ declare const _default: DefineComponent<ProductRecapProps, {}, {}, {}, {}, Compo
6
6
  }, string, PublicProps, Readonly<ProductRecapProps> & Readonly<{
7
7
  onDelete?: (() => any) | undefined;
8
8
  "onUpdate:quantity"?: ((value: number) => any) | undefined;
9
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
9
+ }>, {
10
+ readonly: boolean;
11
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
10
12
  recapRef: HTMLDivElement;
11
13
  }, HTMLDivElement>;
12
14
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import { ChipVariant } from '../../atoms/Chip/types';
2
2
  import { ImageFits } from '../../atoms/DefaultImage/types';
3
+ import { DeliveryMethodCardProps } from '../../molecules/DeliveryMethodCard/types';
3
4
  export interface ProductRecapImage {
4
5
  url: string;
5
6
  alt: string;
@@ -25,12 +26,18 @@ export interface ProductRecapPrice {
25
26
  }
26
27
  export interface ProductRecapProps {
27
28
  loading?: boolean;
29
+ /** Read-only mode: renders the quantity as text ("{quantityLabel} {quantity}")
30
+ * instead of the interactive stepper, and suppresses the delete button. */
31
+ readonly?: boolean;
28
32
  id?: string;
29
33
  image?: ProductRecapImage;
30
34
  tag?: string;
31
35
  title?: string;
32
36
  description?: string;
33
37
  chips?: ProductRecapChip[];
38
+ delivery?: DeliveryMethodCardProps;
39
+ /** Label prefix shown before the quantity in read-only mode, e.g. "Qt :". */
40
+ quantityLabel?: string;
34
41
  quantity?: number;
35
42
  minQuantity?: number;
36
43
  maxQuantity?: number;
@@ -38,3 +38,4 @@ export { CustomCriteriaSection } from './CustomCriteriaSection';
38
38
  export type { CustomCriteriaSectionProps } from './CustomCriteriaSection';
39
39
  export { CustomCriterionV, CustomCriterionValuePreview } from './CustomCriterionV';
40
40
  export type { CustomCriterionVProps, CustomCriterionValueType } from './CustomCriterionV';
41
+ export { CartConfirmation, type CartConfirmationProps, type CartConfirmationSavingColor } from './CartConfirmation';
package/dist/index.d.ts CHANGED
@@ -101,6 +101,7 @@ export type { SummaryMetricCardProps } from './components/organisms/SummaryMetri
101
101
  export type { DeliveryMethodSelectorProps, DeliveryMethodProductRecap, DeliveryMethod } from './components/organisms/DeliveryMethodSelector/types';
102
102
  export type { CustomCriteriaSectionProps, CustomCriterion } from './components/organisms/CustomCriteriaSection/types';
103
103
  export type { CustomCriterionVProps, CustomCriterionValueType } from './components/organisms/CustomCriterionV/types';
104
+ export type { CartConfirmationProps, CartConfirmationSavingColor } from './components/organisms/CartConfirmation/types';
104
105
  export type { AddressFormProps, AddressFormSchema, AddressFormSection } from './components/organisms/AddressForm/types';
105
106
  export type { CartPreviewProps, CartPreviewPrice, CartPreviewPriceLine } from './components/organisms/CartPreview/types';
106
107
  export type { CartPreviewItemProps } from './components/molecules/CartPreviewItem/types';