@vkzstudio/muza-ui 1.6.0 → 1.7.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 (48) hide show
  1. package/dist/components/ArticleCard/ArticleCard.d.ts.map +1 -1
  2. package/dist/components/ArticleCard/ArticleCard.js +161 -170
  3. package/dist/components/CarouselSection/CarouselSection.examples.d.ts +1 -1
  4. package/dist/components/OfferCard/OfferCard.d.ts +45 -17
  5. package/dist/components/OfferCard/OfferCard.d.ts.map +1 -1
  6. package/dist/components/OfferCard/OfferCard.js +180 -266
  7. package/dist/components/OfferCard/OfferCard.stories.d.ts +5 -2
  8. package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -1
  9. package/dist/components/PartnerCard/PartnerCard.d.ts +90 -26
  10. package/dist/components/PartnerCard/PartnerCard.d.ts.map +1 -1
  11. package/dist/components/PartnerCard/PartnerCard.js +323 -264
  12. package/dist/components/PartnerCard/PartnerCard.stories.d.ts +6 -0
  13. package/dist/components/PartnerCard/PartnerCard.stories.d.ts.map +1 -1
  14. package/dist/components/PriceTag/PriceTag.d.ts +37 -0
  15. package/dist/components/PriceTag/PriceTag.d.ts.map +1 -0
  16. package/dist/components/PriceTag/PriceTag.js +43 -0
  17. package/dist/components/PriceTag/PriceTag.stories.d.ts +8 -0
  18. package/dist/components/PriceTag/PriceTag.stories.d.ts.map +1 -0
  19. package/dist/components/PriceTag/index.d.ts +2 -0
  20. package/dist/components/PriceTag/index.d.ts.map +1 -0
  21. package/dist/components/PriceTag/index.js +5 -0
  22. package/dist/components/Tooltip/Tooltip.d.ts +18 -7
  23. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  24. package/dist/components/Tooltip/Tooltip.js +116 -68
  25. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  26. package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  27. package/dist/components/VoucherCard/VoucherCard.d.ts +24 -1
  28. package/dist/components/VoucherCard/VoucherCard.d.ts.map +1 -1
  29. package/dist/components/VoucherCard/VoucherCard.js +68 -76
  30. package/dist/components/VoucherCard/VoucherCard.stories.d.ts +1 -0
  31. package/dist/components/VoucherCard/VoucherCard.stories.d.ts.map +1 -1
  32. package/dist/components/index.d.ts +1 -0
  33. package/dist/components/index.d.ts.map +1 -1
  34. package/dist/components/internal/CardCompactShell.d.ts +80 -0
  35. package/dist/components/internal/CardCompactShell.d.ts.map +1 -0
  36. package/dist/components/internal/CardCompactShell.js +148 -0
  37. package/dist/components/internal/CardImageSlot.d.ts +56 -0
  38. package/dist/components/internal/CardImageSlot.d.ts.map +1 -0
  39. package/dist/components/internal/CardImageSlot.js +85 -0
  40. package/dist/index.js +178 -175
  41. package/dist/muza-ui.css +1 -1
  42. package/dist/styles/token-sizes.css +16 -4
  43. package/dist/utils/cn.d.ts.map +1 -1
  44. package/dist/utils/cn.js +6 -3
  45. package/dist/utils/disabledLinkProps.d.ts +8 -1
  46. package/dist/utils/disabledLinkProps.d.ts.map +1 -1
  47. package/dist/utils/disabledLinkProps.js +0 -1
  48. package/package.json +2 -1
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const offerCardVariants: (props?: ({
4
4
  variant?: "search" | "compact" | null | undefined;
5
- type?: "default" | "promo" | null | undefined;
5
+ isTinted?: boolean | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  declare const offerCardTitleVariants: (props?: ({
8
8
  variant?: "search" | "compact" | null | undefined;
@@ -11,7 +11,6 @@ declare const offerCardDescriptionVariants: (props?: ({
11
11
  variant?: "search" | "compact" | null | undefined;
12
12
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
13
13
  export type OfferCardVariant = 'compact' | 'search';
14
- type OfferCardType = 'default' | 'promo';
15
14
  /** Props for the `OfferCard.Skeleton` subcomponent. */
16
15
  export interface OfferCardSkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
17
16
  /**
@@ -29,16 +28,16 @@ export interface OfferCardSkeletonProps extends Omit<React.HTMLAttributes<HTMLDi
29
28
  */
30
29
  color?: 'default' | 'light';
31
30
  /**
32
- * Mirrors `OfferCard.type` so the skeleton reserves the same tinted
33
- * background when standing in for a `'promo'` compact card. Has no effect
34
- * on the `'search'` variant.
31
+ * Mirrors `OfferCard.isTinted` so the skeleton reserves the same tinted
32
+ * background when standing in for a tinted compact card. Has no effect on
33
+ * the `'search'` variant.
35
34
  *
36
- * @default 'default'
35
+ * @default false
37
36
  */
38
- type?: OfferCardType;
37
+ isTinted?: boolean;
39
38
  }
40
39
  declare const OfferCardSkeleton: {
41
- ({ variant, color, type, className, ...props }: OfferCardSkeletonProps): import("react/jsx-runtime").JSX.Element;
40
+ ({ variant, color, isTinted, className, ...props }: OfferCardSkeletonProps): import("react/jsx-runtime").JSX.Element;
42
41
  displayName: string;
43
42
  };
44
43
  /**
@@ -47,7 +46,7 @@ declare const OfferCardSkeleton: {
47
46
  * children/asChild axis are split into the two members of the discriminated
48
47
  * union below.
49
48
  */
50
- export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVariants>, 'variant' | 'type'> {
49
+ export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVariants>, 'variant' | 'isTinted'> {
51
50
  /** Offer title — primary heading rendered inside the clickable link. */
52
51
  name: string;
53
52
  /**
@@ -55,13 +54,37 @@ export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVa
55
54
  * custom React node such as a Next.js `<Image>` element. The wrapper
56
55
  * handles sizing, rounded corners, overflow, and the disabled dim; any
57
56
  * direct `<img>` child is auto-stretched to fill the wrapper.
57
+ *
58
+ * Omit it (or pass `undefined`) to render the placeholder instead — pair
59
+ * that with `placeholderIcon` and `placeholderColor`.
58
60
  */
59
- image: string | React.ReactNode;
61
+ image?: string | React.ReactNode;
60
62
  /**
61
63
  * Alt text for the built-in `<img>` (used when `image` is a string).
62
64
  * Defaults to `name`. Ignored when `image` is a custom React node.
63
65
  */
64
66
  imageAlt?: string;
67
+ /**
68
+ * Decorative icon rendered centred in the image area when `image` is
69
+ * absent — typically the market-category icon for the offer. Sized by the
70
+ * card (56px on desktop, 40px below `md` on `compact`) and coloured via
71
+ * `currentColor`, so pass a bare Solar icon element.
72
+ *
73
+ * @example
74
+ * <OfferCard
75
+ * name="Concert"
76
+ * placeholderIcon={<MusicNoteBold />}
77
+ * placeholderColor="#e4329c"
78
+ * />
79
+ */
80
+ placeholderIcon?: React.ReactNode;
81
+ /**
82
+ * Any CSS color string driving the placeholder. The image area is filled
83
+ * with the color at 20% alpha, the icon and the category `Tag` take the
84
+ * full color. Omit to fall back to the brand-tertiary tint with a
85
+ * tertiary-grey icon.
86
+ */
87
+ placeholderColor?: string;
65
88
  /**
66
89
  * Optional partner / merchant logo — either a URL string (rendered as a
67
90
  * plain `<img>`) or a custom React node such as a Next.js `<Image>`.
@@ -104,6 +127,12 @@ export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVa
104
127
  rating?: number;
105
128
  /** Review count shown as `(N)` next to the rating. Only shown when `rating` is set. */
106
129
  ratingCount?: number;
130
+ /**
131
+ * Formatted price rendered as a `PriceTag` pill below the vendor/rating
132
+ * row — e.g. `"100 Kč"`. Formatting is the consumer's responsibility.
133
+ * Only rendered on the `search` variant; omit to hide the pill.
134
+ */
135
+ price?: React.ReactNode;
107
136
  /**
108
137
  * Controlled favorite state for the embedded `HeartButton`. When provided,
109
138
  * the heart does not manage its own state.
@@ -138,14 +167,14 @@ export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVa
138
167
  */
139
168
  variant?: OfferCardVariant;
140
169
  /**
141
- * Fill style for the `compact` variant. `'promo'` swaps the card's
142
- * transparent fill for a tinted `--color-surface-base-secondary`
143
- * background, visually highlighting promoted offers in a grid. Has no
144
- * effect on the `search` variant.
170
+ * Swaps the `compact` card's transparent fill for a tinted
171
+ * `--color-surface-base-secondary` background, used to highlight promoted
172
+ * entries in a grid. `PartnerCard` takes the same prop, so a mixed promo
173
+ * band tints uniformly. Has no effect on the `search` variant.
145
174
  *
146
- * @default 'default'
175
+ * @default false
147
176
  */
148
- type?: OfferCardType;
177
+ isTinted?: boolean;
149
178
  /**
150
179
  * Disabled visual state. Adds the disabled border, dims the image, and
151
180
  * grays the text. The anchor's `href` is also stripped so the card is
@@ -202,5 +231,4 @@ declare const OfferCardWithSkeleton: typeof OfferCard & {
202
231
  Skeleton: typeof OfferCardSkeleton;
203
232
  };
204
233
  export { OfferCardWithSkeleton as OfferCard, offerCardVariants, offerCardTitleVariants, offerCardDescriptionVariants, };
205
- export type { OfferCardType };
206
234
  //# sourceMappingURL=OfferCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OfferCard.d.ts","sourceRoot":"","sources":["../../../src/components/OfferCard/OfferCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAUjE,QAAA,MAAM,iBAAiB;;;8EA8BtB,CAAA;AAED,QAAA,MAAM,sBAAsB;;8EAU1B,CAAA;AAEF,QAAA,MAAM,4BAA4B;;8EAUhC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAA;AACnD,KAAK,aAAa,GAAG,SAAS,GAAG,OAAO,CAAA;AA6BxC,uDAAuD;AACvD,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D;;;;;OAKG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC3B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;AAED,QAAA,MAAM,iBAAiB;oDAMpB,sBAAsB;;CA4ExB,CAAA;AAkCD;;;;;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