@veevarts/design-system 2.7.0 → 2.9.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 (37) hide show
  1. package/dist/index.cjs +8 -8
  2. package/dist/index.js +3276 -3133
  3. package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/type.d.ts +1 -1
  4. package/dist/patterns/{EventDetails → Programs/EventDetails}/EventDetails.d.ts +3 -1
  5. package/dist/patterns/{OfferCard → Programs/OfferCard}/OfferCard.d.ts +1 -1
  6. package/dist/patterns/{OfferCard → Programs/OfferCard}/types.d.ts +7 -0
  7. package/dist/patterns/Programs/ProgramListItem/ProgramListItem.d.ts +17 -0
  8. package/dist/patterns/Programs/ProgramListItem/index.d.ts +2 -0
  9. package/dist/patterns/Programs/index.d.ts +5 -0
  10. package/dist/patterns/Summary/components/ActionBar.d.ts +2 -0
  11. package/dist/patterns/Summary/components/GrandTotalRow.d.ts +1 -0
  12. package/dist/patterns/Summary/components/ItemRow.d.ts +1 -0
  13. package/dist/patterns/Summary/components/SummaryBody.d.ts +1 -0
  14. package/dist/patterns/Summary/components/TotalsLineRow.d.ts +1 -0
  15. package/dist/patterns/Summary/types.d.ts +16 -0
  16. package/dist/patterns/index.d.ts +10 -8
  17. package/package.json +1 -1
  18. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/CatalogItemCard.d.ts +0 -0
  19. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/index.d.ts +0 -0
  20. /package/dist/patterns/{EventDetails → Programs/EventDetails}/index.d.ts +0 -0
  21. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/CustomQuantitySelectorExample.d.ts +0 -0
  22. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithEurosCurrencyExample.d.ts +0 -0
  23. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithoutAnimationExample.d.ts +0 -0
  24. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/index.d.ts +0 -0
  25. /package/dist/patterns/{OfferCard → Programs/OfferCard}/index.d.ts +0 -0
  26. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/animations.d.ts +0 -0
  27. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/currency.d.ts +0 -0
  28. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/index.d.ts +0 -0
  29. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/offers.d.ts +0 -0
  30. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardEmpty.d.ts +0 -0
  31. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardError.d.ts +0 -0
  32. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardList.d.ts +0 -0
  33. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardSkeleton.d.ts +0 -0
  34. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/index.d.ts +0 -0
  35. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/SessionTimeline.d.ts +0 -0
  36. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/index.d.ts +0 -0
  37. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/type.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { ButtonProps } from '../../components';
1
+ import { ButtonProps } from '../../../components';
2
2
  /**
3
3
  * Metadata row displayed under the card title.
4
4
  */
@@ -20,6 +20,8 @@ export interface EventDetailsProps {
20
20
  classes?: string;
21
21
  /** @property {boolean} [compact] - Dense spacing mode for compact side layouts. */
22
22
  compact?: boolean;
23
+ /** @property {'stacked' | 'horizontal'} [layout] - Places the image beside content on desktop when horizontal. */
24
+ layout?: 'stacked' | 'horizontal';
23
25
  /** @property {boolean} [showImage] - Optional flag to show or hide the event image. Defaults to true. */
24
26
  showImage?: boolean;
25
27
  /** @property {'lazy' | 'eager'} [imageLoading] - Optional loading strategy for the event image. Use `'lazy'` for off-screen placements (long lists, below-the-fold). Defaults to `'eager'` since the banner is typically above-the-fold. */
@@ -37,5 +39,5 @@ export interface EventDetailsProps {
37
39
  * @function EventDetails
38
40
  * @description Displays a card with event information such as name, image, date, time, location, and description.
39
41
  */
40
- export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, compact, imageLoading, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
42
+ export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, compact, layout, imageLoading, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
41
43
  export default EventDetails;
@@ -6,7 +6,7 @@ import { OfferCardProps } from './types';
6
6
  * Supports slot-based customization for all rendered elements.
7
7
  */
8
8
  export declare const OfferCard: {
9
- ({ offer, quantity: quantityProp, defaultQuantity, onQuantityChange, currency, locale, labels: customLabels, slots, isDisabled, buttonVariant, buttonColor, showCard, showDescription, showPeopleCount, showPrice, priceDisplay, classNames, "data-testid": dataTestId, selectedColor, compact, isSoldOut: isSoldOutProp, isMaxReached: isMaxReachedProp, isRuleBlocked: isRuleBlockedProp, statusTone: statusToneProp, statusLabel, disabledReason, disabled, }: OfferCardProps): JSX.Element;
9
+ ({ offer, quantity: quantityProp, defaultQuantity, onQuantityChange, currency, locale, labels: customLabels, slots, isDisabled, buttonVariant, buttonColor, showCard, showDescription, showPeopleCount, showPrice, priceDisplay, classNames, "data-testid": dataTestId, selectedColor, selectionMode, compact, isSoldOut: isSoldOutProp, isMaxReached: isMaxReachedProp, isRuleBlocked: isRuleBlockedProp, statusTone: statusToneProp, statusLabel, disabledReason, disabled, }: OfferCardProps): JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  export default OfferCard;
@@ -350,6 +350,13 @@ export interface OfferCardProps {
350
350
  * @default 'primary'
351
351
  */
352
352
  selectedColor?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
353
+ /**
354
+ * How an available offer is added to the selection.
355
+ * `press-to-add` makes the whole card add one item and omits the inline
356
+ * stepper. It is useful when a separate order summary owns removal.
357
+ * @default 'stepper'
358
+ */
359
+ selectionMode?: 'stepper' | 'press-to-add';
353
360
  /**
354
361
  * Whether to show the component inside a Card
355
362
  * @default true
@@ -0,0 +1,17 @@
1
+ import { JSX } from 'react';
2
+ export type ProgramListItemStatus = 'open' | 'selling-fast' | 'sold-out';
3
+ export interface ProgramListItemProps {
4
+ title: string;
5
+ subtitle: string;
6
+ price?: string;
7
+ imageUrl?: string;
8
+ status?: ProgramListItemStatus;
9
+ isDisabled?: boolean;
10
+ onPress?(): void;
11
+ className?: string;
12
+ }
13
+ /** Pressable Programs catalog row for POS list mode. */
14
+ export declare function ProgramListItem({ title, subtitle, price, imageUrl, status, isDisabled, onPress, className }: ProgramListItemProps): JSX.Element;
15
+ export declare namespace ProgramListItem {
16
+ var displayName: string;
17
+ }
@@ -0,0 +1,2 @@
1
+ export { ProgramListItem } from './ProgramListItem';
2
+ export type { ProgramListItemProps, ProgramListItemStatus } from './ProgramListItem';
@@ -0,0 +1,5 @@
1
+ export * from './CatalogItemCard';
2
+ export * from './EventDetails';
3
+ export * from './OfferCard';
4
+ export * from './ProgramListItem';
5
+ export * from './SessionTimeline';
@@ -12,6 +12,8 @@ export interface ActionBarProps {
12
12
  cartAriaLabel: string;
13
13
  /** Optional caption rendered under the open-layer CTA (e.g. installment breakdown). */
14
14
  ctaCaption?: React.ReactNode;
15
+ /** Optional error rendered ABOVE the CTA, so it clears the screen edge and the thumb. */
16
+ ctaError?: React.ReactNode;
15
17
  /** Expand the summary — the closed-bar cart button opens it on click. */
16
18
  onToggleOpen?: () => void;
17
19
  classNames: SummaryClassNames;
@@ -6,6 +6,7 @@ export interface GrandTotalRowProps {
6
6
  amount: Money;
7
7
  };
8
8
  locale: string;
9
+ compact?: boolean;
9
10
  className?: string;
10
11
  }
11
12
  export declare const GrandTotalRow: React.FC<GrandTotalRowProps>;
@@ -7,5 +7,6 @@ export interface ItemRowProps {
7
7
  removeAriaLabel: string;
8
8
  /** Show the per-item remove control. Defaults to `true`. */
9
9
  showRemoveButton?: boolean;
10
+ compact?: boolean;
10
11
  }
11
12
  export declare const ItemRow: React.FC<ItemRowProps>;
@@ -14,6 +14,7 @@ export interface SummaryBodyProps {
14
14
  /** Show the per-item and per-totals-row remove controls. Defaults to `true`. */
15
15
  showRemoveButton?: boolean;
16
16
  emptyState?: React.ReactNode;
17
+ compact?: boolean;
17
18
  classNames: SummaryClassNames;
18
19
  }
19
20
  export declare const SummaryBody: React.FC<SummaryBodyProps>;
@@ -8,5 +8,6 @@ export interface TotalsLineRowProps {
8
8
  removeAriaLabel?: string;
9
9
  /** Show the per-row remove control. Defaults to `true`. */
10
10
  showRemoveButton?: boolean;
11
+ compact?: boolean;
11
12
  }
12
13
  export declare const TotalsLineRow: React.FC<TotalsLineRowProps>;
@@ -141,6 +141,8 @@ export interface SummaryClassNames {
141
141
  cta?: string;
142
142
  /** The caption rendered under the CTA. */
143
143
  ctaCaption?: string;
144
+ /** The error rendered next to the CTA. */
145
+ ctaError?: string;
144
146
  /** Mobile compact bottom-bar. */
145
147
  mobileBar?: string;
146
148
  /** Mobile cart button. */
@@ -194,6 +196,13 @@ export interface SummaryProps {
194
196
  * installment breakdown like "$50.75 total · 12 monthly installments…").
195
197
  */
196
198
  ctaCaption?: ReactNode;
199
+ /**
200
+ * An optional error (e.g. a rejected request) shown in danger text next to
201
+ * the CTA: under it in the card layout, ABOVE it in the mobile bottom bar,
202
+ * where the sticky CTA sits at the screen edge and a message under it would
203
+ * hug the edge and sit beneath the thumb. Rendered as `role="alert"`.
204
+ */
205
+ ctaError?: ReactNode;
197
206
  /**
198
207
  * Whether the remove (trash) controls are shown — per-item, per-totals-row
199
208
  * and per-post-total-row alike. Defaults to `true`; pass `false` to hide them
@@ -246,6 +255,13 @@ export interface SummaryProps {
246
255
  /** Rendered when there are no items. */
247
256
  emptyState?: ReactNode;
248
257
  labels?: SummaryLabels;
258
+ /**
259
+ * Visual density. `'compact'` drops the card's title and the prices row, removes the
260
+ * `{qty} x` prefix, separates items with dividers, renders the totals rows
261
+ * small and muted and a smaller Total without a divider above it (e.g. a POS
262
+ * cart panel). Defaults to `'default'`.
263
+ */
264
+ density?: 'default' | 'compact';
249
265
  'data-testid'?: string;
250
266
  className?: string;
251
267
  /** Per-slot class overrides (Design-System `classNames` convention). */
@@ -13,10 +13,10 @@ export { DonationAmounts } from './DonationAmounts';
13
13
  export type { DonationAmountsProps, DonationAmount, SelectedDonation, DonationLabels } from './DonationAmounts';
14
14
  export { ExpireCartTimer } from './ExpireCartTimer';
15
15
  export type { ExpireCartTimerProps } from './ExpireCartTimer';
16
- export { EventDetails } from './EventDetails';
17
- export type { EventDetailsProps } from './EventDetails';
18
- export { OfferCard, OfferCardList, OfferCardSkeleton, OfferCardError, OfferCardEmpty, offerListVariants, offerCardVariants, formatCurrency as formatOfferCurrency, parseCurrency as parseOfferCurrency, } from './OfferCard';
19
- export type { Offer, OfferSelection, OfferCardLabels, OfferCardErrorLabels, OfferCardClassNames, OfferCardListClassNames, OfferCardSkeletonClassNames, OfferCardErrorClassNames, OfferCardEmptyClassNames, OfferCardSlots, OfferCardProps, OfferCardListProps, OfferCardSkeletonProps, OfferCardErrorProps, OfferCardEmptyProps, } from './OfferCard';
16
+ export { EventDetails } from './Programs/EventDetails';
17
+ export type { EventDetailsProps } from './Programs/EventDetails';
18
+ export { OfferCard, OfferCardList, OfferCardSkeleton, OfferCardError, OfferCardEmpty, offerListVariants, offerCardVariants, formatCurrency as formatOfferCurrency, parseCurrency as parseOfferCurrency, } from './Programs/OfferCard';
19
+ export type { Offer, OfferSelection, OfferCardLabels, OfferCardErrorLabels, OfferCardClassNames, OfferCardListClassNames, OfferCardSkeletonClassNames, OfferCardErrorClassNames, OfferCardEmptyClassNames, OfferCardSlots, OfferCardProps, OfferCardListProps, OfferCardSkeletonProps, OfferCardErrorProps, OfferCardEmptyProps, } from './Programs/OfferCard';
20
20
  export { RevenueDistributionCard, RevenueDistributionSkeleton, RevenueDistributionError, RevenueDistributionEmpty, formatAmount as formatRevenueAmount, formatCurrency as formatRevenueCurrency, getCurrencySymbol, parseCurrency as parseRevenueCurrency, calculateAllocationDifference, generateDistributionId, } from './RevenueDistribution';
21
21
  export type { GlAccount, Distribution, RevenueDistributionLabels, RevenueDistributionErrorLabels, RevenueDistributionEmptyLabels, RevenueDistributionCardClassNames, RevenueDistributionSkeletonClassNames, RevenueDistributionErrorClassNames, RevenueDistributionEmptyClassNames, RevenueDistributionCardProps, RevenueDistributionSkeletonProps, RevenueDistributionErrorProps, RevenueDistributionEmptyProps, } from './RevenueDistribution';
22
22
  export { InstallmentFundAssignment, InstallmentFundAssignmentSkeleton } from './InstallmentFundAssignment';
@@ -31,8 +31,10 @@ export { MembershipSelectCards } from './MembershipSelectCards';
31
31
  export type * from './MembershipSelectCards';
32
32
  export { ItemCard } from './ItemCard';
33
33
  export type * from './ItemCard';
34
- export { CatalogItemCard } from './CatalogItemCard';
35
- export type * from './CatalogItemCard';
34
+ export { CatalogItemCard } from './Programs/CatalogItemCard';
35
+ export type * from './Programs/CatalogItemCard';
36
+ export { ProgramListItem } from './Programs/ProgramListItem';
37
+ export type * from './Programs/ProgramListItem';
36
38
  export { FeedbackState, EmptyState, ErrorState, LoadingState, SuccessState } from './FeedbackState';
37
39
  export type * from './FeedbackState';
38
40
  export { Toggle } from './Toggle';
@@ -41,8 +43,8 @@ export { TicketSelection } from './TicketSelection';
41
43
  export type * from './TicketSelection';
42
44
  export { FilterPopover } from './FilterPopover';
43
45
  export type * from './FilterPopover';
44
- export { SessionTimeline } from './SessionTimeline';
45
- export type * from './SessionTimeline';
46
+ export { SessionTimeline } from './Programs/SessionTimeline';
47
+ export type * from './Programs/SessionTimeline';
46
48
  export { PageHeader } from './PageHeader';
47
49
  export type { PageHeaderProps, PageHeaderClassNames } from './PageHeader';
48
50
  export { StatusChip } from './StatusChip';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "2.7.0",
4
+ "version": "2.9.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",