@vkzstudio/muza-ui 1.7.0 → 1.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.
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +146 -4
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +241 -84
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +4 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +10 -7
- package/dist/components/Card/Card.d.ts +36 -27
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +41 -40
- package/dist/components/Carousel/Carousel.d.ts +16 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.js +56 -55
- package/dist/components/CarouselSection/CarouselSection.examples.d.ts +15 -6
- package/dist/components/CarouselSection/CarouselSection.examples.d.ts.map +1 -1
- package/dist/components/CarouselSection/CarouselSection.stories.d.ts +2 -0
- package/dist/components/CarouselSection/CarouselSection.stories.d.ts.map +1 -1
- package/dist/components/CategoryIcon/CategoryIcon.d.ts.map +1 -1
- package/dist/components/CategoryIcon/CategoryIcon.js +25 -23
- package/dist/components/Dialog/Dialog.d.ts +19 -6
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +148 -112
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +42 -25
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.js +52 -53
- package/dist/components/OfferCard/OfferCard.d.ts +19 -5
- package/dist/components/OfferCard/OfferCard.d.ts.map +1 -1
- package/dist/components/OfferCard/OfferCard.js +181 -150
- package/dist/components/OfferCard/OfferCard.stories.d.ts +1 -0
- package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -1
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts +1 -1
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts.map +1 -1
- package/dist/components/internal/CardCompactShell.d.ts +7 -1
- package/dist/components/internal/CardCompactShell.d.ts.map +1 -1
- package/dist/components/internal/CardCompactShell.js +57 -51
- package/dist/components/internal/CardImageSlot.d.ts.map +1 -1
- package/dist/components/internal/CardImageSlot.js +36 -37
- package/dist/hooks/use-is-breakpoint.d.ts +1 -4
- package/dist/hooks/use-is-breakpoint.d.ts.map +1 -1
- package/dist/index.js +448 -437
- package/dist/muza-ui.css +1 -1
- package/dist/styles/breakpoints.css +1 -0
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +3 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +3 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +3 -0
- package/dist/translations/types.d.ts +8 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/dist/utils/breakpoints.d.ts +43 -0
- package/dist/utils/breakpoints.d.ts.map +1 -0
- package/dist/utils/breakpoints.js +65 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +19 -11
- package/dist/utils/polymorphic.d.ts +44 -0
- package/dist/utils/polymorphic.d.ts.map +1 -0
- package/dist/utils/polymorphic.js +7 -0
- package/dist/utils/warnOnce.d.ts +37 -0
- package/dist/utils/warnOnce.d.ts.map +1 -0
- package/dist/utils/warnOnce.js +6 -0
- package/package.json +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { cva as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { spacingVariantDefinitions as
|
|
5
|
-
|
|
1
|
+
import * as w from "react";
|
|
2
|
+
import { cva as y } from "class-variance-authority";
|
|
3
|
+
import { cn as d } from "../../utils/cn.js";
|
|
4
|
+
import { spacingVariantDefinitions as v, getSpacingVariants as j } from "../../utils/spacing.js";
|
|
5
|
+
import { polymorphicForwardRef as g } from "../../utils/polymorphic.js";
|
|
6
|
+
const h = {
|
|
6
7
|
direction: {
|
|
7
8
|
row: "flex-row",
|
|
8
9
|
column: "flex-col",
|
|
@@ -36,58 +37,56 @@ const V = {
|
|
|
36
37
|
initial: "flex-initial",
|
|
37
38
|
none: "flex-none"
|
|
38
39
|
},
|
|
39
|
-
...
|
|
40
|
-
},
|
|
40
|
+
...v
|
|
41
|
+
}, V = {
|
|
41
42
|
direction: "row",
|
|
42
43
|
wrap: "nowrap",
|
|
43
44
|
justify: "start",
|
|
44
45
|
align: "stretch"
|
|
45
|
-
}, b =
|
|
46
|
-
variants:
|
|
47
|
-
defaultVariants:
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
87
|
-
D.displayName = "Flex";
|
|
46
|
+
}, b = y("flex", {
|
|
47
|
+
variants: h,
|
|
48
|
+
defaultVariants: V
|
|
49
|
+
}), F = g(function({
|
|
50
|
+
children: e,
|
|
51
|
+
className: t,
|
|
52
|
+
style: r,
|
|
53
|
+
direction: a,
|
|
54
|
+
wrap: n,
|
|
55
|
+
justify: s,
|
|
56
|
+
align: i,
|
|
57
|
+
flex: o,
|
|
58
|
+
gap: l,
|
|
59
|
+
padding: f,
|
|
60
|
+
margin: c,
|
|
61
|
+
component: m = "div",
|
|
62
|
+
...p
|
|
63
|
+
}, u) {
|
|
64
|
+
const x = j({ gap: l, padding: f, margin: c });
|
|
65
|
+
return w.createElement(
|
|
66
|
+
m,
|
|
67
|
+
{
|
|
68
|
+
ref: u,
|
|
69
|
+
className: d(
|
|
70
|
+
b({
|
|
71
|
+
direction: a,
|
|
72
|
+
wrap: n,
|
|
73
|
+
justify: s,
|
|
74
|
+
align: i,
|
|
75
|
+
flex: o,
|
|
76
|
+
...x
|
|
77
|
+
}),
|
|
78
|
+
t
|
|
79
|
+
),
|
|
80
|
+
style: r,
|
|
81
|
+
...p
|
|
82
|
+
},
|
|
83
|
+
e
|
|
84
|
+
);
|
|
85
|
+
});
|
|
86
|
+
F.displayName = "Flex";
|
|
88
87
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
F as Flex,
|
|
89
|
+
V as flexLayoutDefaults,
|
|
90
|
+
h as flexLayoutVariants,
|
|
92
91
|
b as flexVariants
|
|
93
92
|
};
|
|
@@ -116,10 +116,20 @@ export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVa
|
|
|
116
116
|
*/
|
|
117
117
|
description?: string;
|
|
118
118
|
/**
|
|
119
|
-
* Vendor or partner name.
|
|
120
|
-
*
|
|
119
|
+
* Vendor or partner name.
|
|
120
|
+
*
|
|
121
|
+
* - `compact`: rendered above the title in brand color. Pass `vendorHref`
|
|
122
|
+
* to make it a real link to the partner's page.
|
|
123
|
+
* - `search`: rendered next to the rating, separated by a `DotDivider`.
|
|
121
124
|
*/
|
|
122
125
|
vendor?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Makes the `compact` card's `vendor` name a link to the partner's page.
|
|
128
|
+
* Rendered as a `TypographyLink` nested inside the card, so it navigates
|
|
129
|
+
* independently of the card's own `href`. Without it `vendor` is plain
|
|
130
|
+
* text. Ignored on the `search` variant and when `vendor` is omitted.
|
|
131
|
+
*/
|
|
132
|
+
vendorHref?: string;
|
|
123
133
|
/**
|
|
124
134
|
* Display-only rating (0–5). Renders the existing `Rating` component with
|
|
125
135
|
* `allowHalf` and `disabled` (display mode). Omit to hide the rating row.
|
|
@@ -128,9 +138,13 @@ export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVa
|
|
|
128
138
|
/** Review count shown as `(N)` next to the rating. Only shown when `rating` is set. */
|
|
129
139
|
ratingCount?: number;
|
|
130
140
|
/**
|
|
131
|
-
* Formatted price rendered as a `PriceTag` pill
|
|
132
|
-
*
|
|
133
|
-
*
|
|
141
|
+
* Formatted price rendered as a `PriceTag` pill — e.g. `"100 Kč"`.
|
|
142
|
+
* Formatting is the consumer's responsibility. Omit to hide the pill.
|
|
143
|
+
*
|
|
144
|
+
* - `compact`: pinned to the bottom-left corner of the image. Takes the
|
|
145
|
+
* same corner as `logo`, so pass the linked `vendor` name rather than a
|
|
146
|
+
* `logo` on cards that show a price.
|
|
147
|
+
* - `search`: rendered below the vendor/rating row.
|
|
134
148
|
*/
|
|
135
149
|
price?: React.ReactNode;
|
|
136
150
|
/**
|
|
@@ -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;
|
|
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;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