@vkzstudio/muza-ui 1.2.0 → 1.3.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/Accordion/Accordion.d.ts +52 -2
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +111 -76
- package/dist/components/ArticleCard/ArticleCard.d.ts +178 -0
- package/dist/components/ArticleCard/ArticleCard.d.ts.map +1 -0
- package/dist/components/ArticleCard/ArticleCard.js +542 -0
- package/dist/components/ArticleCard/ArticleCard.stories.d.ts +14 -0
- package/dist/components/ArticleCard/ArticleCard.stories.d.ts.map +1 -0
- package/dist/components/ArticleCard/index.d.ts +2 -0
- package/dist/components/ArticleCard/index.d.ts.map +1 -0
- package/dist/components/ButtonArrow/ButtonArrow.js +1 -1
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +5 -5
- package/dist/components/Calendar/index.d.ts +1 -2
- package/dist/components/Calendar/index.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +9 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.js +135 -133
- package/dist/components/CarouselSection/CarouselSection.examples.d.ts +34 -0
- package/dist/components/CarouselSection/CarouselSection.examples.d.ts.map +1 -0
- package/dist/components/CarouselSection/CarouselSection.stories.d.ts +8 -0
- package/dist/components/CarouselSection/CarouselSection.stories.d.ts.map +1 -0
- package/dist/components/CategoryCard/CategoryCard.d.ts +97 -0
- package/dist/components/CategoryCard/CategoryCard.d.ts.map +1 -0
- package/dist/components/CategoryCard/CategoryCard.js +152 -0
- package/dist/components/CategoryCard/CategoryCard.stories.d.ts +14 -0
- package/dist/components/CategoryCard/CategoryCard.stories.d.ts.map +1 -0
- package/dist/components/CategoryCard/index.d.ts +2 -0
- package/dist/components/CategoryCard/index.d.ts.map +1 -0
- package/dist/components/CategoryIcon/CategoryIcon.d.ts +45 -0
- package/dist/components/CategoryIcon/CategoryIcon.d.ts.map +1 -0
- package/dist/components/CategoryIcon/CategoryIcon.js +54 -0
- package/dist/components/CategoryIcon/CategoryIcon.stories.d.ts +10 -0
- package/dist/components/CategoryIcon/CategoryIcon.stories.d.ts.map +1 -0
- package/dist/components/CategoryIcon/index.d.ts +2 -0
- package/dist/components/CategoryIcon/index.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +5 -5
- package/dist/components/DotDivider/DotDivider.d.ts +35 -0
- package/dist/components/DotDivider/DotDivider.d.ts.map +1 -0
- package/dist/components/DotDivider/DotDivider.js +31 -0
- package/dist/components/DotDivider/DotDivider.stories.d.ts +10 -0
- package/dist/components/DotDivider/DotDivider.stories.d.ts.map +1 -0
- package/dist/components/DotDivider/index.d.ts +2 -0
- package/dist/components/DotDivider/index.d.ts.map +1 -0
- package/dist/components/HeartButton/HeartButton.d.ts +61 -0
- package/dist/components/HeartButton/HeartButton.d.ts.map +1 -0
- package/dist/components/HeartButton/HeartButton.js +88 -0
- package/dist/components/HeartButton/HeartButton.stories.d.ts +10 -0
- package/dist/components/HeartButton/HeartButton.stories.d.ts.map +1 -0
- package/dist/components/HeartButton/index.d.ts +2 -0
- package/dist/components/HeartButton/index.d.ts.map +1 -0
- package/dist/components/Icons/CustomBadges.d.ts +20 -0
- package/dist/components/Icons/CustomBadges.d.ts.map +1 -1
- package/dist/components/Icons/CustomBadges.js +176 -21
- package/dist/components/Icons/CustomIcons.d.ts +13 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +50 -30
- package/dist/components/Icons/LogosAndBadges.stories.d.ts +2 -1
- package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +65 -55
- package/dist/components/LoginScreen/LoginScreen.d.ts +10 -1
- package/dist/components/LoginScreen/LoginScreen.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreen.js +23 -17
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/OfferCard/OfferCard.d.ts +206 -0
- package/dist/components/OfferCard/OfferCard.d.ts.map +1 -0
- package/dist/components/OfferCard/OfferCard.js +423 -0
- package/dist/components/OfferCard/OfferCard.stories.d.ts +15 -0
- package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -0
- package/dist/components/OfferCard/index.d.ts +2 -0
- package/dist/components/OfferCard/index.d.ts.map +1 -0
- package/dist/components/PartnerCard/PartnerCard.d.ts +234 -0
- package/dist/components/PartnerCard/PartnerCard.d.ts.map +1 -0
- package/dist/components/PartnerCard/PartnerCard.js +591 -0
- package/dist/components/PartnerCard/PartnerCard.stories.d.ts +14 -0
- package/dist/components/PartnerCard/PartnerCard.stories.d.ts.map +1 -0
- package/dist/components/PartnerCard/index.d.ts +2 -0
- package/dist/components/PartnerCard/index.d.ts.map +1 -0
- package/dist/components/PaymentMethodSelect/PaymentMethodSelect.examples.d.ts +35 -0
- package/dist/components/PaymentMethodSelect/PaymentMethodSelect.examples.d.ts.map +1 -0
- package/dist/components/PaymentMethodSelect/PaymentMethodSelect.stories.d.ts +11 -0
- package/dist/components/PaymentMethodSelect/PaymentMethodSelect.stories.d.ts.map +1 -0
- package/dist/components/Rating/Rating.d.ts +62 -0
- package/dist/components/Rating/Rating.d.ts.map +1 -0
- package/dist/components/Rating/Rating.js +88 -0
- package/dist/components/Rating/Rating.stories.d.ts +12 -0
- package/dist/components/Rating/Rating.stories.d.ts.map +1 -0
- package/dist/components/Rating/index.d.ts +2 -0
- package/dist/components/Rating/index.d.ts.map +1 -0
- package/dist/components/RatingBlock/RatingBlock.d.ts +65 -0
- package/dist/components/RatingBlock/RatingBlock.d.ts.map +1 -0
- package/dist/components/RatingBlock/RatingBlock.js +92 -0
- package/dist/components/RatingBlock/RatingBlock.stories.d.ts +12 -0
- package/dist/components/RatingBlock/RatingBlock.stories.d.ts.map +1 -0
- package/dist/components/RatingBlock/index.d.ts +2 -0
- package/dist/components/RatingBlock/index.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +5 -5
- package/dist/components/SearchFilters/SearchFilters.d.ts +88 -0
- package/dist/components/SearchFilters/SearchFilters.d.ts.map +1 -0
- package/dist/components/SearchFilters/SearchFilters.js +176 -0
- package/dist/components/SearchFilters/SearchFilters.stories.d.ts +12 -0
- package/dist/components/SearchFilters/SearchFilters.stories.d.ts.map +1 -0
- package/dist/components/SearchFilters/index.d.ts +2 -0
- package/dist/components/SearchFilters/index.d.ts.map +1 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/TransactionsListView/TransactionsListView.d.ts +152 -0
- package/dist/components/TransactionsListView/TransactionsListView.d.ts.map +1 -0
- package/dist/components/TransactionsListView/TransactionsListView.js +367 -0
- package/dist/components/TransactionsListView/TransactionsListView.stories.d.ts +12 -0
- package/dist/components/TransactionsListView/TransactionsListView.stories.d.ts.map +1 -0
- package/dist/components/TransactionsListView/index.d.ts +2 -0
- package/dist/components/TransactionsListView/index.d.ts.map +1 -0
- package/dist/components/VoucherCard/VoucherCard.d.ts +105 -0
- package/dist/components/VoucherCard/VoucherCard.d.ts.map +1 -0
- package/dist/components/VoucherCard/VoucherCard.js +167 -0
- package/dist/components/VoucherCard/VoucherCard.stories.d.ts +9 -0
- package/dist/components/VoucherCard/VoucherCard.stories.d.ts.map +1 -0
- package/dist/components/VoucherCard/index.d.ts +2 -0
- package/dist/components/VoucherCard/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +405 -352
- package/dist/muza-ui.css +1 -1
- package/dist/styles/primitives.css +5 -0
- package/dist/styles/token-colors.css +105 -30
- package/dist/styles/token-sizes.css +24 -0
- package/dist/translations/index.d.ts +2 -1
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +30 -2
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +26 -2
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +30 -2
- package/dist/translations/resolvePluralTemplate.d.ts +10 -0
- package/dist/translations/resolvePluralTemplate.d.ts.map +1 -0
- package/dist/translations/resolvePluralTemplate.js +20 -0
- package/dist/translations/types.d.ts +57 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +116 -24
- package/dist/utils/disabledLinkProps.d.ts +14 -0
- package/dist/utils/disabledLinkProps.d.ts.map +1 -0
- package/dist/utils/disabledLinkProps.js +9 -0
- package/dist/{components/Calendar/utils → utils}/formatDate.d.ts +1 -1
- package/dist/utils/formatDate.d.ts.map +1 -0
- package/dist/utils/formatDateRange.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/components/Calendar/utils/formatDate.d.ts.map +0 -1
- package/dist/components/Calendar/utils/formatDateRange.d.ts.map +0 -1
- /package/dist/{components/Calendar/utils → utils}/formatDate.js +0 -0
- /package/dist/{components/Calendar/utils → utils}/formatDateRange.d.ts +0 -0
- /package/dist/{components/Calendar/utils → utils}/formatDateRange.js +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { DropdownMenu as
|
|
5
|
-
import { Button as
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useEffect as z } from "react";
|
|
3
|
+
import { cva as f } from "class-variance-authority";
|
|
4
|
+
import { DropdownMenu as D, DropdownMenuTrigger as M, DropdownMenuContent as N, DropdownMenuRadioGroup as S, DropdownMenuRadioItem as A } from "../DropdownMenu/DropdownMenu.js";
|
|
5
|
+
import { Button as I } from "../Button/Button.js";
|
|
6
6
|
import { cn as v } from "../../utils/cn.js";
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { AltArrowDownOutline as
|
|
9
|
-
const
|
|
7
|
+
import { Typography as g } from "../Typography/Typography.js";
|
|
8
|
+
import { AltArrowDownOutline as T } from "@solar-icons/react-perf";
|
|
9
|
+
const j = f(
|
|
10
10
|
"group flex cursor-pointer items-center gap-sm focus-visible:focus-default disabled:pointer-events-none",
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
@@ -29,7 +29,7 @@ const T = g(
|
|
|
29
29
|
},
|
|
30
30
|
defaultVariants: { variant: "default" }
|
|
31
31
|
}
|
|
32
|
-
),
|
|
32
|
+
), k = f(
|
|
33
33
|
"size-[12px] transition-transform duration-300 group-data-[state=open]:rotate-180",
|
|
34
34
|
{
|
|
35
35
|
variants: {
|
|
@@ -47,79 +47,89 @@ const T = g(
|
|
|
47
47
|
defaultVariants: { variant: "default" }
|
|
48
48
|
}
|
|
49
49
|
), Y = ({
|
|
50
|
-
languages:
|
|
50
|
+
languages: a,
|
|
51
51
|
onValueChange: o,
|
|
52
|
-
defaultValue:
|
|
53
|
-
value:
|
|
54
|
-
isIconButton:
|
|
55
|
-
buttonProps:
|
|
56
|
-
disabled:
|
|
52
|
+
defaultValue: h,
|
|
53
|
+
value: n,
|
|
54
|
+
isIconButton: x,
|
|
55
|
+
buttonProps: w,
|
|
56
|
+
disabled: s,
|
|
57
57
|
variant: c
|
|
58
58
|
}) => {
|
|
59
59
|
var p;
|
|
60
|
-
const [
|
|
61
|
-
|
|
60
|
+
const [d, m] = y(
|
|
61
|
+
h || ((p = a[0]) == null ? void 0 : p.value) || ""
|
|
62
62
|
);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
const
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
63
|
+
z(() => {
|
|
64
|
+
n && m(n);
|
|
65
|
+
}, [n]);
|
|
66
|
+
const t = a.find(({ value: r }) => r === d);
|
|
67
|
+
return /* @__PURE__ */ i(D, { children: [
|
|
68
|
+
/* @__PURE__ */ e(M, { asChild: !0, children: x ? /* @__PURE__ */ e(
|
|
69
|
+
I,
|
|
70
70
|
{
|
|
71
71
|
variant: "tertiary",
|
|
72
72
|
size: "sm",
|
|
73
|
-
disabled:
|
|
74
|
-
...
|
|
75
|
-
icon:
|
|
73
|
+
disabled: s,
|
|
74
|
+
...w,
|
|
75
|
+
icon: t == null ? void 0 : t.icon
|
|
76
76
|
}
|
|
77
|
-
) : /* @__PURE__ */
|
|
77
|
+
) : /* @__PURE__ */ i(
|
|
78
78
|
"button",
|
|
79
79
|
{
|
|
80
|
-
disabled:
|
|
81
|
-
className: v(
|
|
80
|
+
disabled: s,
|
|
81
|
+
className: v(j({ variant: c })),
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
t && /* @__PURE__ */ i(b, { children: [
|
|
84
|
+
/* @__PURE__ */ e(
|
|
85
|
+
g,
|
|
86
|
+
{
|
|
87
|
+
component: "span",
|
|
88
|
+
size: "sm",
|
|
89
|
+
weight: "medium",
|
|
90
|
+
variant: "body",
|
|
91
|
+
className: "pb-[0.1em] group-disabled:opacity-50 [&>svg]:size-icon-small",
|
|
92
|
+
children: t.icon && t.icon
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ e(
|
|
96
|
+
g,
|
|
97
|
+
{
|
|
98
|
+
component: "span",
|
|
99
|
+
size: "sm",
|
|
100
|
+
weight: "medium",
|
|
101
|
+
variant: "body",
|
|
102
|
+
fixY: !0,
|
|
103
|
+
children: t.name
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ e(
|
|
108
|
+
T,
|
|
99
109
|
{
|
|
100
|
-
className: v(
|
|
110
|
+
className: v(k({ variant: c }))
|
|
101
111
|
}
|
|
102
112
|
)
|
|
103
113
|
]
|
|
104
114
|
}
|
|
105
115
|
) }),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
|
|
116
|
+
/* @__PURE__ */ e(N, { className: "w-50", side: "top", align: "start", children: /* @__PURE__ */ e(
|
|
117
|
+
S,
|
|
108
118
|
{
|
|
109
|
-
value:
|
|
119
|
+
value: d,
|
|
110
120
|
onValueChange: (r) => {
|
|
111
|
-
|
|
121
|
+
m(r), o == null || o(r);
|
|
112
122
|
},
|
|
113
|
-
children:
|
|
123
|
+
children: a.map(({ name: r, value: l, icon: u }) => /* @__PURE__ */ e(A, { value: l, children: /* @__PURE__ */ i("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small", children: [
|
|
114
124
|
u && u,
|
|
115
125
|
r
|
|
116
|
-
] }) },
|
|
126
|
+
] }) }, l))
|
|
117
127
|
}
|
|
118
128
|
) })
|
|
119
129
|
] });
|
|
120
130
|
};
|
|
121
131
|
export {
|
|
122
132
|
Y as LanguageSwitcher,
|
|
123
|
-
|
|
124
|
-
|
|
133
|
+
k as languageSwitcherChevronVariants,
|
|
134
|
+
j as languageSwitcherTriggerVariants
|
|
125
135
|
};
|
|
@@ -28,6 +28,15 @@ export interface LoginScreenProps {
|
|
|
28
28
|
languages?: LanguageOption[];
|
|
29
29
|
/** Fires when the selected language changes. Receives the new language value. */
|
|
30
30
|
onLanguageChange?: (value: string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Initial selected language value for uncontrolled usage of the switcher.
|
|
33
|
+
* @default languages[0].value
|
|
34
|
+
*/
|
|
35
|
+
defaultLanguage?: string;
|
|
36
|
+
/** Controlled selected language value. Use with `onLanguageChange` for controlled behavior. */
|
|
37
|
+
language?: string;
|
|
38
|
+
/** Prevents interaction with the language switcher and applies disabled styling. @default false */
|
|
39
|
+
languageSwitcherDisabled?: boolean;
|
|
31
40
|
/**
|
|
32
41
|
* Path to a .glb 3D model file for the right panel.
|
|
33
42
|
* Falls back to the bundled Login3D.glb when not specified.
|
|
@@ -35,6 +44,6 @@ export interface LoginScreenProps {
|
|
|
35
44
|
*/
|
|
36
45
|
modelPath?: string;
|
|
37
46
|
}
|
|
38
|
-
declare const LoginScreen: ({ children, className, logo, languages, onLanguageChange, modelPath, }: LoginScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
declare const LoginScreen: ({ children, className, logo, languages, onLanguageChange, defaultLanguage, language, languageSwitcherDisabled, modelPath, }: LoginScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
48
|
export { LoginScreen };
|
|
40
49
|
//# sourceMappingURL=LoginScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginScreen.d.ts","sourceRoot":"","sources":["../../../src/components/LoginScreen/LoginScreen.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yHAAyH;IACzH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAA;IAC5B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,WAAW,GAAI,
|
|
1
|
+
{"version":3,"file":"LoginScreen.d.ts","sourceRoot":"","sources":["../../../src/components/LoginScreen/LoginScreen.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yHAAyH;IACzH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAA;IAC5B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mGAAmG;IACnG,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,WAAW,GAAI,6HAUlB,gBAAgB,4CAqClB,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,45 +1,51 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { AnimatePresence as
|
|
3
|
-
import { useIsDesktop as
|
|
4
|
-
import { LoginScreen3D as
|
|
5
|
-
import { LanguageSwitcher as
|
|
6
|
-
import { cn as
|
|
7
|
-
const
|
|
2
|
+
import { AnimatePresence as f } from "framer-motion";
|
|
3
|
+
import { useIsDesktop as h } from "../../hooks/use-is-desktop.js";
|
|
4
|
+
import { LoginScreen3D as x } from "./LoginScreen3D/LoginScreen3D.js";
|
|
5
|
+
import { LanguageSwitcher as p } from "../LanguageSwitcher/LanguageSwitcher.js";
|
|
6
|
+
import { cn as v } from "../../utils/cn.js";
|
|
7
|
+
const _ = ({
|
|
8
8
|
children: t,
|
|
9
|
-
className:
|
|
9
|
+
className: l,
|
|
10
10
|
logo: s,
|
|
11
11
|
languages: i = [],
|
|
12
|
-
onLanguageChange:
|
|
13
|
-
|
|
12
|
+
onLanguageChange: m,
|
|
13
|
+
defaultLanguage: c,
|
|
14
|
+
language: n,
|
|
15
|
+
languageSwitcherDisabled: o,
|
|
16
|
+
modelPath: d
|
|
14
17
|
}) => {
|
|
15
|
-
const
|
|
18
|
+
const a = h();
|
|
16
19
|
return /* @__PURE__ */ r(
|
|
17
20
|
"div",
|
|
18
21
|
{
|
|
19
|
-
className:
|
|
22
|
+
className: v(
|
|
20
23
|
"grid size-full min-h-[100svh] grid-cols-2 bg-surface-base-tertiary",
|
|
21
24
|
"max-lg:grid-cols-1",
|
|
22
|
-
|
|
25
|
+
l
|
|
23
26
|
),
|
|
24
27
|
children: [
|
|
25
28
|
/* @__PURE__ */ r("div", { className: "flex flex-col p-2xl", children: [
|
|
26
29
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
27
30
|
s && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center [&_img]:h-xl [&_img]:w-auto [&_svg]:h-xl [&_svg]:w-auto", children: s }),
|
|
28
31
|
(i == null ? void 0 : i.length) > 1 && /* @__PURE__ */ e(
|
|
29
|
-
|
|
32
|
+
p,
|
|
30
33
|
{
|
|
31
34
|
languages: i,
|
|
32
|
-
onValueChange:
|
|
35
|
+
onValueChange: m,
|
|
36
|
+
defaultValue: c,
|
|
37
|
+
value: n,
|
|
38
|
+
disabled: o
|
|
33
39
|
}
|
|
34
40
|
)
|
|
35
41
|
] }),
|
|
36
|
-
/* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(
|
|
42
|
+
/* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(f, { children: t }) })
|
|
37
43
|
] }),
|
|
38
|
-
/* @__PURE__ */ e("div", { className: "p-md max-lg:hidden", children:
|
|
44
|
+
/* @__PURE__ */ e("div", { className: "p-md max-lg:hidden", children: a && /* @__PURE__ */ e(x, { modelPath: d }) })
|
|
39
45
|
]
|
|
40
46
|
}
|
|
41
47
|
);
|
|
42
48
|
};
|
|
43
49
|
export {
|
|
44
|
-
|
|
50
|
+
_ as LoginScreen
|
|
45
51
|
};
|
|
@@ -2,11 +2,11 @@ import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import u, { forwardRef as L, useId as U, useMemo as k, useRef as G, useEffect as H } from "react";
|
|
3
3
|
import { triggerWrapperVariants as J } from "../Select/utils.js";
|
|
4
4
|
import { useMuzaTranslations as K } from "../../translations/TranslationContext.js";
|
|
5
|
-
import { Tag as f } from "../Tag/Tag.js";
|
|
6
5
|
import { FormField as Q } from "../FormField/FormField.js";
|
|
7
6
|
import { DropdownMenu as X, DropdownMenuTrigger as Y, DropdownMenuContent as Z, DropdownMenuCheckboxItem as ee } from "../DropdownMenu/DropdownMenu.js";
|
|
8
7
|
import { Typography as I } from "../Typography/Typography.js";
|
|
9
8
|
import { Flex as z } from "../Flex/Flex.js";
|
|
9
|
+
import { Tag as f } from "../Tag/Tag.js";
|
|
10
10
|
import { AltArrowUpOutline as te } from "@solar-icons/react-perf";
|
|
11
11
|
import { cn as re } from "../../utils/cn.js";
|
|
12
12
|
const ne = L(
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const offerCardVariants: (props?: ({
|
|
4
|
+
variant?: "search" | "compact" | null | undefined;
|
|
5
|
+
type?: "default" | "promo" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare const offerCardTitleVariants: (props?: ({
|
|
8
|
+
variant?: "search" | "compact" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
declare const offerCardDescriptionVariants: (props?: ({
|
|
11
|
+
variant?: "search" | "compact" | null | undefined;
|
|
12
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
13
|
+
export type OfferCardVariant = 'compact' | 'search';
|
|
14
|
+
type OfferCardType = 'default' | 'promo';
|
|
15
|
+
/** Props for the `OfferCard.Skeleton` subcomponent. */
|
|
16
|
+
export interface OfferCardSkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
17
|
+
/**
|
|
18
|
+
* Visual layout variant — mirrors `OfferCard.variant` so the skeleton
|
|
19
|
+
* reserves the same footprint as the card it stands in for.
|
|
20
|
+
*
|
|
21
|
+
* @default 'compact'
|
|
22
|
+
*/
|
|
23
|
+
variant?: OfferCardVariant;
|
|
24
|
+
/**
|
|
25
|
+
* Skeleton color, forwarded to every inner `Skeleton` block. Use `'light'`
|
|
26
|
+
* when the skeleton sits on a tinted surface.
|
|
27
|
+
*
|
|
28
|
+
* @default 'default'
|
|
29
|
+
*/
|
|
30
|
+
color?: 'default' | 'light';
|
|
31
|
+
/**
|
|
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.
|
|
35
|
+
*
|
|
36
|
+
* @default 'default'
|
|
37
|
+
*/
|
|
38
|
+
type?: OfferCardType;
|
|
39
|
+
}
|
|
40
|
+
declare const OfferCardSkeleton: {
|
|
41
|
+
({ variant, color, type, className, ...props }: OfferCardSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Content props shared between the default-anchor and `asChild` shapes of
|
|
46
|
+
* OfferCard. Variant/size/styling lives here; the link target and the
|
|
47
|
+
* children/asChild axis are split into the two members of the discriminated
|
|
48
|
+
* union below.
|
|
49
|
+
*/
|
|
50
|
+
export interface OfferCardBaseProps extends Omit<VariantProps<typeof offerCardVariants>, 'variant' | 'type'> {
|
|
51
|
+
/** Offer title — primary heading rendered inside the clickable link. */
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* Image source — either a URL string (rendered as a plain `<img>`) or a
|
|
55
|
+
* custom React node such as a Next.js `<Image>` element. The wrapper
|
|
56
|
+
* handles sizing, rounded corners, overflow, and the disabled dim; any
|
|
57
|
+
* direct `<img>` child is auto-stretched to fill the wrapper.
|
|
58
|
+
*/
|
|
59
|
+
image: string | React.ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* Alt text for the built-in `<img>` (used when `image` is a string).
|
|
62
|
+
* Defaults to `name`. Ignored when `image` is a custom React node.
|
|
63
|
+
*/
|
|
64
|
+
imageAlt?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Optional partner / merchant logo — either a URL string (rendered as a
|
|
67
|
+
* plain `<img>`) or a custom React node such as a Next.js `<Image>`.
|
|
68
|
+
*
|
|
69
|
+
* - `compact`: rendered as a 72px circular badge with a 2px secondary-stroke
|
|
70
|
+
* ring, anchored at the bottom-left of the image and half-overlapping the
|
|
71
|
+
* text area.
|
|
72
|
+
* - `search`: rendered as a centered square (96px desktop, 40px mobile) on
|
|
73
|
+
* top of a dark overlay that fills the image area.
|
|
74
|
+
*
|
|
75
|
+
* Omit to hide the logo.
|
|
76
|
+
*/
|
|
77
|
+
logo?: string | React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Alt text for the built-in logo `<img>` (used when `logo` is a string).
|
|
80
|
+
* Defaults to `${vendor ?? name} logo`. Ignored when `logo` is a custom
|
|
81
|
+
* React node.
|
|
82
|
+
*/
|
|
83
|
+
logoAlt?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Optional category label rendered as a single glass-style tag chip in the
|
|
86
|
+
* top-left corner of the image. Resolve the category ID to a display label
|
|
87
|
+
* before passing it in.
|
|
88
|
+
*/
|
|
89
|
+
category?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Optional secondary description rendered below the title — typically a
|
|
92
|
+
* short qualifier such as `"Online purchase"`.
|
|
93
|
+
*/
|
|
94
|
+
description?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Vendor or partner name. Rendered next to the rating (separated by a
|
|
97
|
+
* `DotDivider`) on the `search` variant; ignored on `compact`.
|
|
98
|
+
*/
|
|
99
|
+
vendor?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Display-only rating (0–5). Renders the existing `Rating` component with
|
|
102
|
+
* `allowHalf` and `disabled` (display mode). Omit to hide the rating row.
|
|
103
|
+
*/
|
|
104
|
+
rating?: number;
|
|
105
|
+
/** Review count shown as `(N)` next to the rating. Only shown when `rating` is set. */
|
|
106
|
+
ratingCount?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Controlled favorite state for the embedded `HeartButton`. When provided,
|
|
109
|
+
* the heart does not manage its own state.
|
|
110
|
+
*/
|
|
111
|
+
favorite?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Initial favorite state for uncontrolled usage. @default false
|
|
114
|
+
*/
|
|
115
|
+
defaultFavorite?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Fires when the favorite is toggled. Receives the new active value.
|
|
118
|
+
*/
|
|
119
|
+
onFavoriteChange?: (active: boolean) => void;
|
|
120
|
+
/**
|
|
121
|
+
* Accessible label for the embedded `HeartButton`. Defaults to the
|
|
122
|
+
* localized `translations.heartButton.toggleFavorite`.
|
|
123
|
+
*/
|
|
124
|
+
favoriteAriaLabel?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Whether to render the embedded `HeartButton`. Set to `false` for cards
|
|
127
|
+
* that should never expose a favorite affordance. @default true
|
|
128
|
+
*/
|
|
129
|
+
showFavorite?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Visual layout variant.
|
|
132
|
+
*
|
|
133
|
+
* - `compact` — grid card with image on top; fills the parent grid cell.
|
|
134
|
+
* - `search` — horizontal image-left card for search result lists; reflows
|
|
135
|
+
* to a narrower image-left layout on mobile.
|
|
136
|
+
*
|
|
137
|
+
* @default 'compact'
|
|
138
|
+
*/
|
|
139
|
+
variant?: OfferCardVariant;
|
|
140
|
+
/**
|
|
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.
|
|
145
|
+
*
|
|
146
|
+
* @default 'default'
|
|
147
|
+
*/
|
|
148
|
+
type?: OfferCardType;
|
|
149
|
+
/**
|
|
150
|
+
* Disabled visual state. Adds the disabled border, dims the image, and
|
|
151
|
+
* grays the text. The anchor's `href` is also stripped so the card is
|
|
152
|
+
* non-navigable; the embedded `HeartButton` disables alongside the card.
|
|
153
|
+
*
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
disabled?: boolean;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Default shape — OfferCard renders an `<a href>` (stretched-link) as the
|
|
160
|
+
* primary clickable surface and the structured content as siblings.
|
|
161
|
+
*/
|
|
162
|
+
export interface OfferCardLinkProps extends OfferCardBaseProps, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'title' | 'children' | 'href' | 'type'> {
|
|
163
|
+
/**
|
|
164
|
+
* URL the card navigates to when activated. Required unless `asChild` is
|
|
165
|
+
* used. Stripped from the rendered DOM when `disabled` is true so the
|
|
166
|
+
* anchor becomes non-navigable while keeping its visual state.
|
|
167
|
+
*/
|
|
168
|
+
href: string;
|
|
169
|
+
/** Discriminant: omit (or set to `false`) for the built-in `<a>` shape. Set to `true` to switch to the `asChild` shape. */
|
|
170
|
+
asChild?: false;
|
|
171
|
+
/** Not accepted in the default `<a>` shape — the card composes its own structured content. Use `asChild` to swap the inner link element. */
|
|
172
|
+
children?: never;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Escape-hatch shape — hand the clickable anchor off to a consumer-provided
|
|
176
|
+
* `<Link>` (Next.js, React Router, …) via Radix `Slot`. The card's
|
|
177
|
+
* structured content stays in the wrapping `<div>`; only the inner link
|
|
178
|
+
* element is swapped.
|
|
179
|
+
*/
|
|
180
|
+
export interface OfferCardAsChildProps extends OfferCardBaseProps, Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'children'> {
|
|
181
|
+
/**
|
|
182
|
+
* Replaces the built-in `<a>` link element with the consumer's child via
|
|
183
|
+
* Radix `Slot`, so the click target can be a router `<Link>` (Next.js,
|
|
184
|
+
* React Router, …). Pass a self-closing element; the card injects the
|
|
185
|
+
* title as its child.
|
|
186
|
+
*/
|
|
187
|
+
asChild: true;
|
|
188
|
+
/** Self-closing link element to use as the click target. Its children are replaced with the card title. */
|
|
189
|
+
children: React.ReactElement;
|
|
190
|
+
/** Not accepted in the `asChild` shape — set `href` on the consumer-provided child instead. */
|
|
191
|
+
href?: never;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Props for the OfferCard component.
|
|
195
|
+
*
|
|
196
|
+
* The card is a link by default. Pass `href` for the built-in `<a>`, or
|
|
197
|
+
* `asChild` with a self-closing child to swap in a router `<Link>`.
|
|
198
|
+
*/
|
|
199
|
+
export type OfferCardProps = OfferCardLinkProps | OfferCardAsChildProps;
|
|
200
|
+
declare const OfferCard: React.ForwardRefExoticComponent<OfferCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
201
|
+
declare const OfferCardWithSkeleton: typeof OfferCard & {
|
|
202
|
+
Skeleton: typeof OfferCardSkeleton;
|
|
203
|
+
};
|
|
204
|
+
export { OfferCardWithSkeleton as OfferCard, offerCardVariants, offerCardTitleVariants, offerCardDescriptionVariants, };
|
|
205
|
+
export type { OfferCardType };
|
|
206
|
+
//# sourceMappingURL=OfferCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OfferCard.d.ts","sourceRoot":"","sources":["../../../src/components/OfferCard/OfferCard.tsx"],"names":[],"mapp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