@vkzstudio/muza-ui 1.5.0 → 1.5.2
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.js +1 -1
- package/dist/components/Accordion/index.js +16 -0
- package/dist/components/Alert/Alert.js +6 -6
- package/dist/components/Alert/index.js +4 -0
- package/dist/components/ArticleCard/ArticleCard.js +11 -11
- package/dist/components/ArticleCard/index.js +7 -0
- package/dist/components/Avatar/index.js +6 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +4 -4
- package/dist/components/Breadcrumb/index.js +10 -0
- package/dist/components/Button/Button.js +7 -7
- package/dist/components/Button/index.js +6 -0
- package/dist/components/ButtonArrow/index.js +5 -0
- package/dist/components/Calendar/Calendar.js +6 -6
- package/dist/components/Calendar/index.js +10 -0
- package/dist/components/Card/Card.js +7 -7
- package/dist/components/Card/index.js +5 -0
- package/dist/components/CardCheckboxAmount/CardCheckboxAmount.js +8 -8
- package/dist/components/CardCheckboxAmount/index.js +4 -0
- package/dist/components/Carousel/Carousel.js +5 -5
- package/dist/components/Carousel/index.js +9 -0
- package/dist/components/CategoryCard/CategoryCard.js +2 -2
- package/dist/components/CategoryCard/index.js +6 -0
- package/dist/components/CategoryIcon/index.js +5 -0
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/index.js +4 -0
- package/dist/components/Chip/Chip.js +5 -5
- package/dist/components/Chip/index.js +5 -0
- package/dist/components/DataTable/index.js +5 -0
- package/dist/components/DatePicker/DatePicker.js +18 -18
- package/dist/components/DatePicker/index.js +7 -0
- package/dist/components/DatePickerButton/DatePickerButton.js +5 -5
- package/dist/components/DatePickerButton/index.js +5 -0
- package/dist/components/Dialog/Dialog.js +21 -20
- package/dist/components/Dialog/index.js +13 -0
- package/dist/components/DotDivider/index.js +5 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -2
- package/dist/components/DropdownMenu/index.js +14 -0
- package/dist/components/DropdownSearchMenu/DropdownSearchMenu.js +7 -6
- package/dist/components/DropdownSearchMenu/index.js +7 -0
- package/dist/components/EdgeButton/EdgeButton.js +1 -1
- package/dist/components/EdgeButton/index.js +5 -0
- package/dist/components/EmptyState/index.js +4 -0
- package/dist/components/ExpandableTable/ExpandableTable.js +13 -13
- package/dist/components/ExpandableTable/index.js +4 -0
- package/dist/components/FileUpload/FileItem.js +1 -1
- package/dist/components/FileUpload/FileUpload.js +7 -7
- package/dist/components/FileUpload/index.js +4 -0
- package/dist/components/Flex/Flex.js +5 -5
- package/dist/components/Flex/index.js +7 -0
- package/dist/components/FormField/FormField.js +9 -9
- package/dist/components/FormField/InputHint.js +4 -4
- package/dist/components/FormField/index.js +8 -0
- package/dist/components/HeartButton/index.js +5 -0
- package/dist/components/Icons/index.js +65 -0
- package/dist/components/InfoCard/InfoCard.js +45 -0
- package/dist/components/InfoCard/index.js +5 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +4 -0
- package/dist/components/InputOTP/InputOTP.js +7 -7
- package/dist/components/InputOTP/index.js +7 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +9 -9
- package/dist/components/LanguageSwitcher/index.js +6 -0
- package/dist/components/Lightbox/Lightbox.js +1 -1
- package/dist/components/Lightbox/index.js +8 -0
- package/dist/components/Loader/index.js +4 -0
- package/dist/components/LoginScreen/LoginScreen.js +4 -4
- package/dist/components/LoginScreen/index.js +8 -0
- package/dist/components/MultiSelect/MultiSelect.js +20 -20
- package/dist/components/MultiSelect/index.js +4 -0
- package/dist/components/MuzaUIProvider/MuzaUIProvider.js +5 -5
- package/dist/components/MuzaUIProvider/index.js +13 -0
- package/dist/components/MuzaUIProvider/theme/ThemeSetterModal.js +17 -17
- package/dist/components/OfferCard/OfferCard.js +11 -11
- package/dist/components/OfferCard/index.js +7 -0
- package/dist/components/PageContainer/index.js +5 -0
- package/dist/components/Pagination/Pagination.js +5 -5
- package/dist/components/Pagination/index.js +4 -0
- package/dist/components/PartnerCard/PartnerCard.js +10 -10
- package/dist/components/PartnerCard/index.js +6 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +18 -17
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts.map +1 -1
- package/dist/components/PasswordInput/index.js +4 -0
- package/dist/components/PhoneInput/CountrySelector.js +5 -5
- package/dist/components/PhoneInput/PhoneInput.js +8 -8
- package/dist/components/PhoneInput/index.js +4 -0
- package/dist/components/PinIndicator/index.js +4 -0
- package/dist/components/Popover/index.js +7 -0
- package/dist/components/Progress/index.js +5 -0
- package/dist/components/Radio/index.js +5 -0
- package/dist/components/Rating/Rating.js +5 -5
- package/dist/components/Rating/index.js +4 -0
- package/dist/components/RatingBlock/RatingBlock.js +2 -2
- package/dist/components/RatingBlock/index.js +4 -0
- package/dist/components/Reorderable/index.js +9 -0
- package/dist/components/ReorderableTable/ReorderableTable.js +7 -6
- package/dist/components/ReorderableTable/index.js +4 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +5 -5
- package/dist/components/ResponsiveLayoutTable/index.js +4 -0
- package/dist/components/SearchFilters/SearchFilters.js +11 -11
- package/dist/components/SearchFilters/index.js +5 -0
- package/dist/components/Searchbar/index.js +4 -0
- package/dist/components/SegmentedControl/index.js +5 -0
- package/dist/components/SegmentedIconControl/index.js +5 -0
- package/dist/components/Select/Select.js +17 -17
- package/dist/components/Select/index.js +4 -0
- package/dist/components/Sheet/Sheet.js +13 -12
- package/dist/components/Sheet/index.js +15 -0
- package/dist/components/Skeleton/index.js +4 -0
- package/dist/components/Slider/index.js +7 -0
- package/dist/components/SliderIndicators/index.js +4 -0
- package/dist/components/Stepper/Stepper.js +6 -6
- package/dist/components/Stepper/index.js +4 -0
- package/dist/components/SwipeButton/SwipeButton.js +14 -14
- package/dist/components/SwipeButton/index.js +4 -0
- package/dist/components/Switch/index.js +4 -0
- package/dist/components/Tag/index.js +5 -0
- package/dist/components/TextEditor/EditorToolbar.js +15 -15
- package/dist/components/TextEditor/LinkBubbleMenu.js +9 -9
- package/dist/components/TextEditor/TextEditor.js +12 -12
- package/dist/components/TextEditor/index.js +9 -0
- package/dist/components/Textarea/Textarea.js +1 -1
- package/dist/components/Textarea/index.js +4 -0
- package/dist/components/TimePicker/TimePicker.js +4 -4
- package/dist/components/TimePicker/index.js +4 -0
- package/dist/components/Toast/Toast.js +7 -7
- package/dist/components/Toast/index.js +7 -0
- package/dist/components/Toggle/index.js +5 -0
- package/dist/components/ToggleCheckButton/index.js +5 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +4 -4
- package/dist/components/ToggleGroup/index.js +5 -0
- package/dist/components/Tooltip/Tooltip.js +6 -6
- package/dist/components/Tooltip/index.js +7 -0
- package/dist/components/TransactionsListView/TransactionsListView.js +2 -2
- package/dist/components/TransactionsListView/index.js +5 -0
- package/dist/components/Typography/index.js +5 -0
- package/dist/components/TypographyLink/index.js +5 -0
- package/dist/components/UniversalFooter/UniversalFooter.js +2 -2
- package/dist/components/UniversalFooter/index.js +18 -0
- package/dist/components/VoucherCard/VoucherCard.js +2 -2
- package/dist/components/VoucherCard/index.js +7 -0
- package/dist/index.js +429 -429
- package/dist/utils/index.js +13 -0
- package/package.json +22 -5
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import { cn as m } from "../../utils/cn.js";
|
|
5
|
+
const f = n("flex flex-col rounded-lg border p-4", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-color-surface-base-primary border-stroke-base-primary text-text-dark-primary-def",
|
|
9
|
+
highlighted: "border-purple-300 bg-purple-100 text-purple-900",
|
|
10
|
+
warning: "border-yellow-300 bg-yellow-50"
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
sm: "gap-2 p-3",
|
|
14
|
+
md: "gap-3 p-4",
|
|
15
|
+
lg: "gap-4 p-6"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { variant: "default", size: "md" }
|
|
19
|
+
}), g = ({
|
|
20
|
+
className: t,
|
|
21
|
+
variant: l,
|
|
22
|
+
size: i,
|
|
23
|
+
title: o,
|
|
24
|
+
description: e,
|
|
25
|
+
icon: a,
|
|
26
|
+
style: d,
|
|
27
|
+
...p
|
|
28
|
+
}) => /* @__PURE__ */ s(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: m(f({ variant: l, size: i, className: t })),
|
|
32
|
+
style: { minWidth: "200px", ...d },
|
|
33
|
+
...p,
|
|
34
|
+
children: [
|
|
35
|
+
a && /* @__PURE__ */ r("div", { style: { marginBottom: "8px" }, children: a }),
|
|
36
|
+
/* @__PURE__ */ r("h3", { style: { fontSize: "16px", fontWeight: "bold" }, children: o }),
|
|
37
|
+
e && /* @__PURE__ */ r("p", { className: "text-sm text-gray-500", children: e })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
g.displayName = "InfoCard";
|
|
42
|
+
export {
|
|
43
|
+
g as InfoCard,
|
|
44
|
+
f as infoCardVariants
|
|
45
|
+
};
|
|
@@ -2,8 +2,8 @@ import { jsx as s, jsxs as z } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as A, useId as C, useRef as E, useEffect as y } from "react";
|
|
3
3
|
import { cva as M } from "class-variance-authority";
|
|
4
4
|
import { useIMask as P } from "react-imask";
|
|
5
|
-
import { FormField as T } from "../FormField/FormField.js";
|
|
6
5
|
import { cn as u } from "../../utils/cn.js";
|
|
6
|
+
import { FormField as T } from "../FormField/FormField.js";
|
|
7
7
|
import { typographyVariants as U } from "../Typography/Typography.js";
|
|
8
8
|
const Y = M(
|
|
9
9
|
[
|
|
@@ -3,11 +3,11 @@ import { forwardRef as W, useId as j, useCallback as M } from "react";
|
|
|
3
3
|
import { useControllableState as Y } from "@radix-ui/react-use-controllable-state";
|
|
4
4
|
import { cva as w } from "class-variance-authority";
|
|
5
5
|
import { OTPInput as X, REGEXP_ONLY_CHARS as Z, REGEXP_ONLY_DIGITS_AND_CHARS as $, REGEXP_ONLY_DIGITS as U } from "input-otp";
|
|
6
|
-
import { useWebOtpAutofill as B } from "./useWebOtpAutofill.js";
|
|
7
|
-
import { FormField as J } from "../FormField/FormField.js";
|
|
8
6
|
import { cn as g } from "../../utils/cn.js";
|
|
9
|
-
import { DotDivider as
|
|
10
|
-
import {
|
|
7
|
+
import { DotDivider as B } from "../DotDivider/DotDivider.js";
|
|
8
|
+
import { FormField as J } from "../FormField/FormField.js";
|
|
9
|
+
import { typographyVariants as K } from "../Typography/Typography.js";
|
|
10
|
+
import { useWebOtpAutofill as Q } from "./useWebOtpAutofill.js";
|
|
11
11
|
const q = {
|
|
12
12
|
numeric: U,
|
|
13
13
|
alphanumeric: $,
|
|
@@ -63,7 +63,7 @@ const q = {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
), oe = g(
|
|
66
|
-
|
|
66
|
+
K({ size: "lg", weight: "medium", fixY: !0 }),
|
|
67
67
|
"text-comp-input-text-primary"
|
|
68
68
|
), x = ({
|
|
69
69
|
slot: e,
|
|
@@ -81,7 +81,7 @@ const q = {
|
|
|
81
81
|
disabled: t
|
|
82
82
|
}),
|
|
83
83
|
children: [
|
|
84
|
-
e.char !== null && (s ? /* @__PURE__ */ r(
|
|
84
|
+
e.char !== null && (s ? /* @__PURE__ */ r(B, { className: "size-comp-inputotp-dot-size bg-comp-input-text-primary" }) : /* @__PURE__ */ r("span", { className: oe, children: e.char })),
|
|
85
85
|
e.hasFakeCaret && /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ r("div", { className: "h-2/3 w-px bg-comp-input-text-primary" }) })
|
|
86
86
|
]
|
|
87
87
|
}
|
|
@@ -123,7 +123,7 @@ const ie = W(
|
|
|
123
123
|
},
|
|
124
124
|
[i, e, l]
|
|
125
125
|
);
|
|
126
|
-
return
|
|
126
|
+
return Q({
|
|
127
127
|
enabled: N && !o,
|
|
128
128
|
onReceive: F
|
|
129
129
|
}), /* @__PURE__ */ r(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import { useState as y, useEffect as z } from "react";
|
|
3
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
4
|
import { cn as v } from "../../utils/cn.js";
|
|
7
|
-
import {
|
|
5
|
+
import { Button as D } from "../Button/Button.js";
|
|
6
|
+
import { DropdownMenu as M, DropdownMenuTrigger as N, DropdownMenuContent as S, DropdownMenuRadioGroup as A, DropdownMenuRadioItem as I } from "../DropdownMenu/DropdownMenu.js";
|
|
8
7
|
import { AltArrowDownOutline as T } from "@solar-icons/react-perf";
|
|
8
|
+
import { Typography as g } from "../Typography/Typography.js";
|
|
9
9
|
const j = f(
|
|
10
10
|
"group flex cursor-pointer items-center gap-sm focus-visible:focus-default disabled:pointer-events-none",
|
|
11
11
|
{
|
|
@@ -64,9 +64,9 @@ const j = f(
|
|
|
64
64
|
n && m(n);
|
|
65
65
|
}, [n]);
|
|
66
66
|
const t = a.find(({ value: r }) => r === d);
|
|
67
|
-
return /* @__PURE__ */ i(
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
|
|
67
|
+
return /* @__PURE__ */ i(M, { children: [
|
|
68
|
+
/* @__PURE__ */ e(N, { asChild: !0, children: x ? /* @__PURE__ */ e(
|
|
69
|
+
D,
|
|
70
70
|
{
|
|
71
71
|
variant: "tertiary",
|
|
72
72
|
size: "sm",
|
|
@@ -113,14 +113,14 @@ const j = f(
|
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
115
|
) }),
|
|
116
|
-
/* @__PURE__ */ e(
|
|
117
|
-
|
|
116
|
+
/* @__PURE__ */ e(S, { className: "w-50", side: "top", align: "start", children: /* @__PURE__ */ e(
|
|
117
|
+
A,
|
|
118
118
|
{
|
|
119
119
|
value: d,
|
|
120
120
|
onValueChange: (r) => {
|
|
121
121
|
m(r), o == null || o(r);
|
|
122
122
|
},
|
|
123
|
-
children: a.map(({ name: r, value: l, icon: u }) => /* @__PURE__ */ e(
|
|
123
|
+
children: a.map(({ name: r, value: l, icon: u }) => /* @__PURE__ */ e(I, { value: l, children: /* @__PURE__ */ i("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small", children: [
|
|
124
124
|
u && u,
|
|
125
125
|
r
|
|
126
126
|
] }) }, l))
|
|
@@ -3,10 +3,10 @@ import { forwardRef as g, cloneElement as f, isValidElement as h } from "react";
|
|
|
3
3
|
import { renderToStaticMarkup as l } from "react-dom/server";
|
|
4
4
|
import { useGallery as y, Gallery as d, Item as x } from "react-photoswipe-gallery";
|
|
5
5
|
import { Item as E } from "react-photoswipe-gallery";
|
|
6
|
-
import { buttonVariants as m } from "../Button/buttonVariants.js";
|
|
7
6
|
import "../Button/Button.js";
|
|
8
7
|
import { ArrowLeftOutline as L, ArrowRightOutline as p } from "@solar-icons/react-perf";
|
|
9
8
|
import { XClose as v } from "../Icons/CustomIcons.js";
|
|
9
|
+
import { buttonVariants as m } from "../Button/buttonVariants.js";
|
|
10
10
|
const b = l(
|
|
11
11
|
/* @__PURE__ */ t(
|
|
12
12
|
"span",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { AnimatePresence as f } from "framer-motion";
|
|
3
3
|
import { useIsDesktop as h } from "../../hooks/use-is-desktop.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cn as x } from "../../utils/cn.js";
|
|
5
5
|
import { LanguageSwitcher as p } from "../LanguageSwitcher/LanguageSwitcher.js";
|
|
6
|
-
import {
|
|
6
|
+
import { LoginScreen3D as v } from "./LoginScreen3D/LoginScreen3D.js";
|
|
7
7
|
const _ = ({
|
|
8
8
|
children: t,
|
|
9
9
|
className: l,
|
|
@@ -19,7 +19,7 @@ const _ = ({
|
|
|
19
19
|
return /* @__PURE__ */ r(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
|
-
className:
|
|
22
|
+
className: x(
|
|
23
23
|
"grid size-full min-h-[100svh] grid-cols-2 bg-surface-base-tertiary",
|
|
24
24
|
"max-lg:grid-cols-1",
|
|
25
25
|
l
|
|
@@ -41,7 +41,7 @@ const _ = ({
|
|
|
41
41
|
] }),
|
|
42
42
|
/* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(f, { children: t }) })
|
|
43
43
|
] }),
|
|
44
|
-
/* @__PURE__ */ e("div", { className: "p-md max-lg:hidden", children: a && /* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e("div", { className: "p-md max-lg:hidden", children: a && /* @__PURE__ */ e(v, { modelPath: d }) })
|
|
45
45
|
]
|
|
46
46
|
}
|
|
47
47
|
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LoginScreen as r } from "./LoginScreen.js";
|
|
2
|
+
import { LoginScreenItem as m } from "./LoginScreenItem.js";
|
|
3
|
+
import { DEFAULT_LOGIN_GLB_PATH as t } from "./LoginScreen3D/LoginScreen3DModel.js";
|
|
4
|
+
export {
|
|
5
|
+
t as DEFAULT_LOGIN_GLB_PATH,
|
|
6
|
+
r as LoginScreen,
|
|
7
|
+
m as LoginScreenItem
|
|
8
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
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
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Flex as z } from "../Flex/Flex.js";
|
|
9
|
-
import { Tag as f } from "../Tag/Tag.js";
|
|
3
|
+
import { useMuzaTranslations as J } from "../../translations/TranslationContext.js";
|
|
4
|
+
import { cn as K } from "../../utils/cn.js";
|
|
5
|
+
import { DropdownMenu as Q, DropdownMenuTrigger as X, DropdownMenuContent as Y, DropdownMenuCheckboxItem as Z } from "../DropdownMenu/DropdownMenu.js";
|
|
6
|
+
import { Flex as I } from "../Flex/Flex.js";
|
|
7
|
+
import { FormField as ee } from "../FormField/FormField.js";
|
|
10
8
|
import { AltArrowUpOutline as te } from "@solar-icons/react-perf";
|
|
11
|
-
import {
|
|
9
|
+
import { triggerWrapperVariants as re } from "../Select/utils.js";
|
|
10
|
+
import { Tag as f } from "../Tag/Tag.js";
|
|
11
|
+
import { Typography as z } from "../Typography/Typography.js";
|
|
12
12
|
const ne = L(
|
|
13
13
|
(D, h) => {
|
|
14
|
-
const g =
|
|
14
|
+
const g = J(), {
|
|
15
15
|
label: x,
|
|
16
16
|
hint: b,
|
|
17
17
|
error: w,
|
|
@@ -32,7 +32,7 @@ const ne = L(
|
|
|
32
32
|
} = D, y = S ?? g.select.placeholder, q = W ?? g.select.noOptions, N = U(), E = x ? `${N}-label` : void 0, P = b ? `${N}-hint` : void 0, M = k(() => new Map(a.map((e) => [e.value, e.label])), [a]), V = k(() => {
|
|
33
33
|
const e = r && r.map((n) => M.get(n));
|
|
34
34
|
return e != null && e.length ? e.length <= c ? /* @__PURE__ */ t(
|
|
35
|
-
|
|
35
|
+
I,
|
|
36
36
|
{
|
|
37
37
|
gap: "xs",
|
|
38
38
|
justify: "start",
|
|
@@ -42,7 +42,7 @@ const ne = L(
|
|
|
42
42
|
children: e.map((n, i) => /* @__PURE__ */ t(f, { variant: "info", className: "min-w-[50px] shrink-1", children: n }, i))
|
|
43
43
|
}
|
|
44
44
|
) : /* @__PURE__ */ t(
|
|
45
|
-
|
|
45
|
+
I,
|
|
46
46
|
{
|
|
47
47
|
gap: "xs",
|
|
48
48
|
justify: "start",
|
|
@@ -66,7 +66,7 @@ const ne = L(
|
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
) : /* @__PURE__ */ t(
|
|
69
|
-
|
|
69
|
+
z,
|
|
70
70
|
{
|
|
71
71
|
size: "input",
|
|
72
72
|
className: "grow-1 fix-y-text truncate text-left text-comp-select-text-placeholder",
|
|
@@ -86,7 +86,7 @@ const ne = L(
|
|
|
86
86
|
n.disconnect();
|
|
87
87
|
};
|
|
88
88
|
}, [l]), /* @__PURE__ */ t(
|
|
89
|
-
|
|
89
|
+
ee,
|
|
90
90
|
{
|
|
91
91
|
label: x,
|
|
92
92
|
hint: b,
|
|
@@ -98,13 +98,13 @@ const ne = L(
|
|
|
98
98
|
labelExtra: A,
|
|
99
99
|
infoTooltip: C,
|
|
100
100
|
children: /* @__PURE__ */ p(
|
|
101
|
-
|
|
101
|
+
Q,
|
|
102
102
|
{
|
|
103
103
|
onOpenChange: (e) => {
|
|
104
104
|
$(e);
|
|
105
105
|
},
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ t(
|
|
107
|
+
/* @__PURE__ */ t(X, { disabled: o, asChild: !0, children: /* @__PURE__ */ t(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
ref: l,
|
|
@@ -113,7 +113,7 @@ const ne = L(
|
|
|
113
113
|
tabIndex: 0,
|
|
114
114
|
disabled: o,
|
|
115
115
|
"aria-required": v,
|
|
116
|
-
className:
|
|
116
|
+
className: re({
|
|
117
117
|
size: O,
|
|
118
118
|
error: w,
|
|
119
119
|
expanded: R,
|
|
@@ -131,7 +131,7 @@ const ne = L(
|
|
|
131
131
|
/* @__PURE__ */ t(
|
|
132
132
|
te,
|
|
133
133
|
{
|
|
134
|
-
className:
|
|
134
|
+
className: K(
|
|
135
135
|
"shrink-0 transition-transform duration-200",
|
|
136
136
|
R ? "rotate-0" : "rotate-180",
|
|
137
137
|
o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def"
|
|
@@ -142,7 +142,7 @@ const ne = L(
|
|
|
142
142
|
}
|
|
143
143
|
) }),
|
|
144
144
|
/* @__PURE__ */ t(
|
|
145
|
-
|
|
145
|
+
Y,
|
|
146
146
|
{
|
|
147
147
|
className: "mt-1",
|
|
148
148
|
style: {
|
|
@@ -153,7 +153,7 @@ const ne = L(
|
|
|
153
153
|
},
|
|
154
154
|
collisionPadding: F,
|
|
155
155
|
children: a.length === 0 ? /* @__PURE__ */ t("div", { className: "px-lg py-md", role: "presentation", children: /* @__PURE__ */ t(
|
|
156
|
-
|
|
156
|
+
z,
|
|
157
157
|
{
|
|
158
158
|
component: "span",
|
|
159
159
|
size: "input",
|
|
@@ -162,7 +162,7 @@ const ne = L(
|
|
|
162
162
|
children: q
|
|
163
163
|
}
|
|
164
164
|
) }) : a.map((e) => /* @__PURE__ */ t(
|
|
165
|
-
|
|
165
|
+
Z,
|
|
166
166
|
{
|
|
167
167
|
checked: r == null ? void 0 : r.includes(e.value),
|
|
168
168
|
disabled: e.disabled,
|
|
@@ -2,18 +2,18 @@ import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "sonner";
|
|
4
4
|
import { TranslationProvider as d } from "../../translations/TranslationContext.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { ToastContainer as n } from "../Toast/ToastContainer.js";
|
|
6
|
+
import { TooltipProvider as a } from "../Tooltip/Tooltip.js";
|
|
7
|
+
import { ThemeProvider as s } from "./theme/ThemeProvider.js";
|
|
8
8
|
const l = ({
|
|
9
9
|
children: o,
|
|
10
10
|
tooltipConfig: i = {},
|
|
11
11
|
toastConfig: e = {},
|
|
12
12
|
translationConfig: m = {},
|
|
13
13
|
color: t
|
|
14
|
-
}) => /* @__PURE__ */ r(d, { ...m, children: /* @__PURE__ */ r(
|
|
14
|
+
}) => /* @__PURE__ */ r(d, { ...m, children: /* @__PURE__ */ r(a, { ...i, children: /* @__PURE__ */ p(s, { color: t, children: [
|
|
15
15
|
o,
|
|
16
|
-
/* @__PURE__ */ r(
|
|
16
|
+
/* @__PURE__ */ r(n, { ...e })
|
|
17
17
|
] }) }) });
|
|
18
18
|
l.displayName = "MuzaUIProvider";
|
|
19
19
|
export {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MuzaUIProvider as o } from "./MuzaUIProvider.js";
|
|
2
|
+
import { useTheme as m } from "./theme/ThemeProvider.js";
|
|
3
|
+
import { setThemeVariables as a } from "./theme/setThemeVariables.js";
|
|
4
|
+
import { themePresets as h } from "./theme/themePresets.js";
|
|
5
|
+
import { formatShadesAsObject as x, generateColorShades as d } from "./theme/colorShades.js";
|
|
6
|
+
export {
|
|
7
|
+
o as MuzaUIProvider,
|
|
8
|
+
x as formatShadesAsObject,
|
|
9
|
+
d as generateColorShades,
|
|
10
|
+
a as setThemeVariables,
|
|
11
|
+
h as themePresets,
|
|
12
|
+
m as useTheme
|
|
13
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f } from "react";
|
|
3
|
-
import { useTheme as D } from "./ThemeProvider.js";
|
|
4
|
-
import { themePresets as u } from "./themePresets.js";
|
|
5
|
-
import { Dialog as I, DialogOverlay as M, DialogContent as H } from "../../Dialog/Dialog.js";
|
|
6
3
|
import { Button as s } from "../../Button/Button.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { Dialog as D, DialogOverlay as I, DialogContent as M } from "../../Dialog/Dialog.js";
|
|
5
|
+
import { DropdownMenu as u, DropdownMenuTrigger as v, DropdownMenuContent as N, DropdownMenuItem as p } from "../../DropdownMenu/DropdownMenu.js";
|
|
6
|
+
import { Input as H } from "../../Input/Input.js";
|
|
7
|
+
import { useTheme as R } from "./ThemeProvider.js";
|
|
8
|
+
import { themePresets as b } from "./themePresets.js";
|
|
9
9
|
const z = ({
|
|
10
10
|
isOpen: C,
|
|
11
11
|
onClose: o
|
|
@@ -16,7 +16,7 @@ const z = ({
|
|
|
16
16
|
setShadesFromHex: c,
|
|
17
17
|
setShadesFromPreset: S,
|
|
18
18
|
setShadesGenerator: k
|
|
19
|
-
} =
|
|
19
|
+
} = R(), n = () => {
|
|
20
20
|
o == null || o();
|
|
21
21
|
}, [i, d] = f(t[500]), [m, y] = f(""), P = (e) => {
|
|
22
22
|
if (d(e), /^#?([A-Fa-f0-9]{6})$/.test(e)) {
|
|
@@ -27,7 +27,7 @@ const z = ({
|
|
|
27
27
|
c(e), d(e);
|
|
28
28
|
}, G = (e) => {
|
|
29
29
|
S(e);
|
|
30
|
-
const l =
|
|
30
|
+
const l = b[e]["--brand-primary"];
|
|
31
31
|
l && d(l);
|
|
32
32
|
}, x = (e) => {
|
|
33
33
|
k(e), c(i);
|
|
@@ -36,14 +36,14 @@ const z = ({
|
|
|
36
36
|
preserve500: "Preserve 500"
|
|
37
37
|
};
|
|
38
38
|
return /* @__PURE__ */ r(
|
|
39
|
-
|
|
39
|
+
D,
|
|
40
40
|
{
|
|
41
41
|
open: C,
|
|
42
42
|
onOpenChange: (e) => {
|
|
43
43
|
e === !1 && n();
|
|
44
44
|
},
|
|
45
|
-
children: /* @__PURE__ */ r(
|
|
46
|
-
|
|
45
|
+
children: /* @__PURE__ */ r(I, { className: "bg-transparent", children: /* @__PURE__ */ a(
|
|
46
|
+
M,
|
|
47
47
|
{
|
|
48
48
|
size: "large",
|
|
49
49
|
className: "space-y-6",
|
|
@@ -51,9 +51,9 @@ const z = ({
|
|
|
51
51
|
children: [
|
|
52
52
|
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2", children: [
|
|
53
53
|
/* @__PURE__ */ r("label", { className: "text-sm font-medium text-gray-700", children: "Generator Algorithm" }),
|
|
54
|
-
/* @__PURE__ */ a(
|
|
55
|
-
/* @__PURE__ */ r(
|
|
56
|
-
/* @__PURE__ */ a(
|
|
54
|
+
/* @__PURE__ */ a(u, { children: [
|
|
55
|
+
/* @__PURE__ */ r(v, { asChild: !0, children: /* @__PURE__ */ r(s, { variant: "secondary", className: "w-max", children: h[w] }) }),
|
|
56
|
+
/* @__PURE__ */ a(N, { className: "w-full", children: [
|
|
57
57
|
/* @__PURE__ */ r(
|
|
58
58
|
p,
|
|
59
59
|
{
|
|
@@ -88,7 +88,7 @@ const z = ({
|
|
|
88
88
|
/* @__PURE__ */ a("div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
89
89
|
/* @__PURE__ */ r("label", { className: "text-sm font-medium text-gray-700", children: "Hex Code" }),
|
|
90
90
|
/* @__PURE__ */ r(
|
|
91
|
-
|
|
91
|
+
H,
|
|
92
92
|
{
|
|
93
93
|
value: i,
|
|
94
94
|
onChange: (e) => P(e.target.value),
|
|
@@ -100,9 +100,9 @@ const z = ({
|
|
|
100
100
|
] }),
|
|
101
101
|
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2", children: [
|
|
102
102
|
/* @__PURE__ */ r("label", { className: "text-sm font-medium text-gray-700", children: "Presets" }),
|
|
103
|
-
/* @__PURE__ */ a(
|
|
104
|
-
/* @__PURE__ */ r(
|
|
105
|
-
/* @__PURE__ */ r(
|
|
103
|
+
/* @__PURE__ */ a(u, { children: [
|
|
104
|
+
/* @__PURE__ */ r(v, { asChild: !0, children: /* @__PURE__ */ r(s, { variant: "secondary", className: "h-12", children: "Select Preset" }) }),
|
|
105
|
+
/* @__PURE__ */ r(N, { children: Object.keys(b).map(
|
|
106
106
|
(e) => /* @__PURE__ */ r(
|
|
107
107
|
p,
|
|
108
108
|
{
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as D } from "react/jsx-runtime";
|
|
2
2
|
import * as w from "react";
|
|
3
3
|
import { cva as z } from "class-variance-authority";
|
|
4
|
-
import { HeartButton as Q } from "../HeartButton/HeartButton.js";
|
|
5
|
-
import { Rating as U } from "../Rating/Rating.js";
|
|
6
4
|
import { cn as s } from "../../utils/cn.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { Tag as Z } from "../Tag/Tag.js";
|
|
5
|
+
import { disabledLinkProps as Q } from "../../utils/disabledLinkProps.js";
|
|
6
|
+
import { DotDivider as U } from "../DotDivider/DotDivider.js";
|
|
10
7
|
import { Flex as f } from "../Flex/Flex.js";
|
|
11
|
-
import {
|
|
8
|
+
import { HeartButton as X } from "../HeartButton/HeartButton.js";
|
|
9
|
+
import { Rating as Z } from "../Rating/Rating.js";
|
|
12
10
|
import { Skeleton as o } from "../Skeleton/Skeleton.js";
|
|
11
|
+
import { Tag as ee } from "../Tag/Tag.js";
|
|
12
|
+
import { Typography as n } from "../Typography/Typography.js";
|
|
13
13
|
const ae = z(
|
|
14
14
|
"group relative inline-flex border border-solid transition-colors focus-visible:outline-none data-[disabled=true]:pointer-events-none",
|
|
15
15
|
{
|
|
@@ -54,7 +54,7 @@ const ae = z(
|
|
|
54
54
|
},
|
|
55
55
|
defaultVariants: { variant: "compact" }
|
|
56
56
|
}), k = ({ rating: c, ratingCount: a, disabled: t }) => /* @__PURE__ */ r(f, { align: "center", gap: "2xs", children: [
|
|
57
|
-
/* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e(Z, { value: c, allowHalf: !0, disabled: t }),
|
|
58
58
|
a != null && /* @__PURE__ */ r(
|
|
59
59
|
n,
|
|
60
60
|
{
|
|
@@ -242,11 +242,11 @@ const L = w.forwardRef(
|
|
|
242
242
|
v,
|
|
243
243
|
{
|
|
244
244
|
className: s(A, v.props.className),
|
|
245
|
-
...d ?
|
|
245
|
+
...d ? Q : null
|
|
246
246
|
},
|
|
247
247
|
F
|
|
248
248
|
) : /* @__PURE__ */ e("a", { href: d ? void 0 : $, className: A, children: F }), Y = P && /* @__PURE__ */ e(
|
|
249
|
-
|
|
249
|
+
X,
|
|
250
250
|
{
|
|
251
251
|
active: B,
|
|
252
252
|
defaultActive: O,
|
|
@@ -275,7 +275,7 @@ const L = w.forwardRef(
|
|
|
275
275
|
),
|
|
276
276
|
/* @__PURE__ */ r("div", { className: "absolute top-comp-offer-card-compact-p-img right-comp-offer-card-compact-p-img left-comp-offer-card-compact-p-img flex items-start justify-between gap-sm", children: [
|
|
277
277
|
C ? /* @__PURE__ */ e(
|
|
278
|
-
|
|
278
|
+
ee,
|
|
279
279
|
{
|
|
280
280
|
variant: "invert",
|
|
281
281
|
className: "min-w-[50px] shrink overflow-hidden",
|
|
@@ -374,7 +374,7 @@ const L = w.forwardRef(
|
|
|
374
374
|
children: u
|
|
375
375
|
}
|
|
376
376
|
),
|
|
377
|
-
u && x && /* @__PURE__ */ e(
|
|
377
|
+
u && x && /* @__PURE__ */ e(U, {}),
|
|
378
378
|
x && /* @__PURE__ */ e(
|
|
379
379
|
k,
|
|
380
380
|
{
|
|
@@ -2,10 +2,10 @@ import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import * as X from "react";
|
|
3
3
|
import { useState as S, useCallback as b, useEffect as Y } from "react";
|
|
4
4
|
import { useMuzaTranslations as C } from "../../translations/TranslationContext.js";
|
|
5
|
-
import { Select as aa } from "../Select/Select.js";
|
|
6
|
-
import { Flex as p } from "../Flex/Flex.js";
|
|
7
5
|
import { ButtonArrow as z } from "../ButtonArrow/ButtonArrow.js";
|
|
8
|
-
import {
|
|
6
|
+
import { Flex as p } from "../Flex/Flex.js";
|
|
7
|
+
import { Input as aa } from "../Input/Input.js";
|
|
8
|
+
import { Select as ea } from "../Select/Select.js";
|
|
9
9
|
import { Typography as v } from "../Typography/Typography.js";
|
|
10
10
|
const ta = [
|
|
11
11
|
{ value: "10", label: "10" },
|
|
@@ -91,7 +91,7 @@ const ta = [
|
|
|
91
91
|
"aria-label": `${L}: ${a} ${h} ${e}`,
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ n(
|
|
94
|
-
|
|
94
|
+
aa,
|
|
95
95
|
{
|
|
96
96
|
value: u,
|
|
97
97
|
size: "xs",
|
|
@@ -189,7 +189,7 @@ const ta = [
|
|
|
189
189
|
}
|
|
190
190
|
),
|
|
191
191
|
/* @__PURE__ */ n(
|
|
192
|
-
|
|
192
|
+
ea,
|
|
193
193
|
{
|
|
194
194
|
value: d.toString(),
|
|
195
195
|
onChange: Q,
|