@vkzstudio/muza-ui 1.5.1 → 1.6.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.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.d.ts.map +1 -1
- package/dist/components/Button/Button.js +44 -42
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- 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.d.ts +99 -2
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.js +208 -151
- package/dist/components/Carousel/Carousel.stories.d.ts +2 -0
- package/dist/components/Carousel/Carousel.stories.d.ts.map +1 -1
- package/dist/components/Carousel/index.js +10 -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.d.ts +22 -3
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +131 -105
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +3 -2
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- 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/MarketNav/MarketNav.examples.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +40 -41
- 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.js +7 -7
- 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.d.ts.map +1 -1
- package/dist/components/Select/Select.js +77 -103
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/SelectTrigger.d.ts +54 -0
- package/dist/components/Select/SelectTrigger.d.ts.map +1 -0
- package/dist/components/Select/SelectTrigger.js +57 -0
- package/dist/components/Select/SelectTrigger.stories.d.ts +11 -0
- package/dist/components/Select/SelectTrigger.stories.d.ts.map +1 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +8 -0
- package/dist/components/Select/utils.d.ts +10 -1
- package/dist/components/Select/utils.d.ts.map +1 -1
- package/dist/components/Select/utils.js +3 -5
- 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 +3 -3
- 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/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts.map +1 -1
- package/dist/index.js +434 -429
- package/dist/muza-ui.css +1 -1
- package/dist/utils/index.js +13 -0
- package/llms-full.md +133 -2
- package/llms.txt +2 -0
- package/package.json +23 -5
|
@@ -2,16 +2,16 @@ import { jsx as n, jsxs as ot } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as et, useState as k, useRef as Y, useEffect as it } from "react";
|
|
3
3
|
import { useIsDesktop as ft } from "../../hooks/use-is-desktop.js";
|
|
4
4
|
import { useIsMobile as ct } from "../../hooks/use-is-mobile.js";
|
|
5
|
-
import { Popover as pt, PopoverTrigger as nt, PopoverContent as dt } from "../Popover/Popover.js";
|
|
6
|
-
import { getDateRange as ut } from "./utils/getDateRange.js";
|
|
7
|
-
import { resolveOneDayRange as bt } from "./utils/resolveOneDayRange.js";
|
|
8
|
-
import { Input as st } from "../Input/Input.js";
|
|
9
|
-
import { Calendar as A } from "../Calendar/Calendar.js";
|
|
10
5
|
import { cn as l } from "../../utils/cn.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { CalendarBold as
|
|
6
|
+
import { formatDate as pt } from "../../utils/formatDate.js";
|
|
7
|
+
import { formatDateRange as nt } from "../../utils/formatDateRange.js";
|
|
8
|
+
import { Calendar as A } from "../Calendar/Calendar.js";
|
|
9
|
+
import { CalendarBold as dt } from "@solar-icons/react-perf";
|
|
10
|
+
import { Input as ut } from "../Input/Input.js";
|
|
11
|
+
import { Popover as bt, PopoverTrigger as st, PopoverContent as xt } from "../Popover/Popover.js";
|
|
12
|
+
import { typographyVariants as lt } from "../Typography/Typography.js";
|
|
13
|
+
import { getDateRange as yt } from "./utils/getDateRange.js";
|
|
14
|
+
import { resolveOneDayRange as mt } from "./utils/resolveOneDayRange.js";
|
|
15
15
|
const vt = et(
|
|
16
16
|
({
|
|
17
17
|
alignCalendar: G,
|
|
@@ -64,7 +64,7 @@ const vt = et(
|
|
|
64
64
|
"button",
|
|
65
65
|
{
|
|
66
66
|
className: l(
|
|
67
|
-
|
|
67
|
+
lt({
|
|
68
68
|
variant: "cta",
|
|
69
69
|
weight: "medium",
|
|
70
70
|
size: "sm",
|
|
@@ -77,13 +77,13 @@ const vt = et(
|
|
|
77
77
|
o == null ? void 0 : o.leftPanelButton
|
|
78
78
|
),
|
|
79
79
|
onClick: () => {
|
|
80
|
-
const p =
|
|
80
|
+
const p = yt(t.type);
|
|
81
81
|
u(p), f && (c(p), r == null || r(p));
|
|
82
82
|
},
|
|
83
83
|
children: t.name
|
|
84
84
|
},
|
|
85
85
|
t.type
|
|
86
|
-
)), D = H ?? (y === "single" ?
|
|
86
|
+
)), D = H ?? (y === "single" ? pt : nt), F = f ? e !== void 0 ? e : i : j, E = {
|
|
87
87
|
...a,
|
|
88
88
|
numberOfMonths: Z ?? (h ? 2 : 1),
|
|
89
89
|
hideNavigation: _,
|
|
@@ -103,7 +103,7 @@ const vt = et(
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
return /* @__PURE__ */ ot(
|
|
106
|
-
|
|
106
|
+
bt,
|
|
107
107
|
{
|
|
108
108
|
open: P,
|
|
109
109
|
onOpenChange: (t) => {
|
|
@@ -119,7 +119,7 @@ const vt = et(
|
|
|
119
119
|
// interactive elements inside another button.
|
|
120
120
|
S()
|
|
121
121
|
) : /* @__PURE__ */ n(
|
|
122
|
-
|
|
122
|
+
st,
|
|
123
123
|
{
|
|
124
124
|
className: l(
|
|
125
125
|
"group cursor-pointer rounded-full text-left outline-0",
|
|
@@ -127,7 +127,7 @@ const vt = et(
|
|
|
127
127
|
),
|
|
128
128
|
disabled: R,
|
|
129
129
|
children: /* @__PURE__ */ n(
|
|
130
|
-
|
|
130
|
+
ut,
|
|
131
131
|
{
|
|
132
132
|
ref: N,
|
|
133
133
|
value: F ? D(F) : "",
|
|
@@ -144,13 +144,13 @@ const vt = et(
|
|
|
144
144
|
o == null ? void 0 : o.input,
|
|
145
145
|
"group-hover:border-comp-input-stroke-hover group-focus-visible:border-comp-input-stroke-focused"
|
|
146
146
|
),
|
|
147
|
-
suffix: /* @__PURE__ */ n(
|
|
147
|
+
suffix: /* @__PURE__ */ n(dt, { className: "size-icon-medium text-icon-dark-secondary-def" })
|
|
148
148
|
}
|
|
149
149
|
)
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
152
|
/* @__PURE__ */ n(
|
|
153
|
-
|
|
153
|
+
xt,
|
|
154
154
|
{
|
|
155
155
|
...W,
|
|
156
156
|
className: l("flex w-auto p-0", o == null ? void 0 : o.popoverContent),
|
|
@@ -176,7 +176,7 @@ const vt = et(
|
|
|
176
176
|
min: B ? 1 : void 0,
|
|
177
177
|
selected: i,
|
|
178
178
|
onSelect: (t) => {
|
|
179
|
-
const p = B ?
|
|
179
|
+
const p = B ? mt(
|
|
180
180
|
i,
|
|
181
181
|
t,
|
|
182
182
|
x
|
|
@@ -4,11 +4,11 @@ import { useControllableState as j } from "@radix-ui/react-use-controllable-stat
|
|
|
4
4
|
import { cva as w } from "class-variance-authority";
|
|
5
5
|
import { format as v } from "date-fns";
|
|
6
6
|
import { useMuzaTranslations as M } from "../../translations/TranslationContext.js";
|
|
7
|
+
import { cn as m } from "../../utils/cn.js";
|
|
7
8
|
import { DatePicker as T } from "../DatePicker/DatePicker.js";
|
|
8
|
-
import {
|
|
9
|
+
import { CalendarBold as R } from "@solar-icons/react-perf";
|
|
9
10
|
import { XClose as E } from "../Icons/CustomIcons.js";
|
|
10
|
-
import {
|
|
11
|
-
import { cn as m } from "../../utils/cn.js";
|
|
11
|
+
import { PopoverTrigger as A, PopoverAnchor as U } from "../Popover/Popover.js";
|
|
12
12
|
import { Typography as $ } from "../Typography/Typography.js";
|
|
13
13
|
const L = w(
|
|
14
14
|
[
|
|
@@ -106,7 +106,7 @@ const L = w(
|
|
|
106
106
|
triggerProps: d
|
|
107
107
|
}, u) => {
|
|
108
108
|
const g = e === "default" && !i ? "iconOnly" : e, p = /* @__PURE__ */ a(
|
|
109
|
-
|
|
109
|
+
R,
|
|
110
110
|
{
|
|
111
111
|
"aria-hidden": !0,
|
|
112
112
|
className: m(
|
|
@@ -139,7 +139,7 @@ const L = w(
|
|
|
139
139
|
i && /* @__PURE__ */ a(G, { disabled: t })
|
|
140
140
|
]
|
|
141
141
|
}
|
|
142
|
-
) : /* @__PURE__ */ a(
|
|
142
|
+
) : /* @__PURE__ */ a(U, { asChild: !0, children: /* @__PURE__ */ B(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
145
145
|
className: m(
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as a, jsxs as p, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n, Children as L, isValidElement as w } from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
|
-
import { typographyVariants as T } from "../Typography/Typography.js";
|
|
5
4
|
import { useMuzaTranslations as D } from "../../translations/TranslationContext.js";
|
|
6
5
|
import { cn as r } from "../../utils/cn.js";
|
|
7
|
-
import
|
|
8
|
-
|
|
6
|
+
import "@solar-icons/react-perf";
|
|
7
|
+
import { XClose as T } from "../Icons/CustomIcons.js";
|
|
8
|
+
import { typographyVariants as z } from "../Typography/Typography.js";
|
|
9
|
+
const q = e.Root, G = e.Title, I = e.Description, k = ({
|
|
9
10
|
className: i,
|
|
10
11
|
ariaLabel: o
|
|
11
12
|
}) => /* @__PURE__ */ a(
|
|
@@ -16,9 +17,9 @@ const X = e.Root, q = e.Title, G = e.Description, k = ({
|
|
|
16
17
|
i
|
|
17
18
|
),
|
|
18
19
|
"aria-label": o,
|
|
19
|
-
children: /* @__PURE__ */ a(
|
|
20
|
+
children: /* @__PURE__ */ a(T, { className: "size-icon-medium" })
|
|
20
21
|
}
|
|
21
|
-
), F =
|
|
22
|
+
), F = n(
|
|
22
23
|
({
|
|
23
24
|
className: i,
|
|
24
25
|
icon: o,
|
|
@@ -38,15 +39,15 @@ const X = e.Root, q = e.Title, G = e.Description, k = ({
|
|
|
38
39
|
i
|
|
39
40
|
),
|
|
40
41
|
...b,
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ p("div", { className: "flex items-center gap-comp-dialog-gap", children: [
|
|
43
|
+
/* @__PURE__ */ p("div", { className: "flex min-w-0 flex-1 items-center gap-sm", children: [
|
|
43
44
|
o && /* @__PURE__ */ a("span", { className: "text-icon-brand-def [&>svg]:size-icon-medium", children: o }),
|
|
44
45
|
/* @__PURE__ */ a(
|
|
45
46
|
e.Title,
|
|
46
47
|
{
|
|
47
48
|
className: r(
|
|
48
49
|
"min-w-0 flex-1 text-text-dark-primary-def",
|
|
49
|
-
|
|
50
|
+
z({
|
|
50
51
|
variant: "title",
|
|
51
52
|
size: "md",
|
|
52
53
|
weight: "medium",
|
|
@@ -70,7 +71,7 @@ const X = e.Root, q = e.Title, G = e.Description, k = ({
|
|
|
70
71
|
}
|
|
71
72
|
);
|
|
72
73
|
F.displayName = "DialogHeader";
|
|
73
|
-
const H =
|
|
74
|
+
const H = n(
|
|
74
75
|
({ className: i, children: o, ...t }, s) => /* @__PURE__ */ a(
|
|
75
76
|
"div",
|
|
76
77
|
{
|
|
@@ -85,7 +86,7 @@ const H = p(
|
|
|
85
86
|
)
|
|
86
87
|
);
|
|
87
88
|
H.displayName = "DialogFooter";
|
|
88
|
-
const
|
|
89
|
+
const J = e.Trigger, j = e.Portal, K = e.Close, C = n(({ className: i, ...o }, t) => /* @__PURE__ */ a(
|
|
89
90
|
e.Overlay,
|
|
90
91
|
{
|
|
91
92
|
ref: t,
|
|
@@ -97,7 +98,7 @@ const I = e.Trigger, j = e.Portal, J = e.Close, C = p(({ className: i, ...o }, t
|
|
|
97
98
|
}
|
|
98
99
|
));
|
|
99
100
|
C.displayName = e.Overlay.displayName;
|
|
100
|
-
const O =
|
|
101
|
+
const O = n(
|
|
101
102
|
({
|
|
102
103
|
className: i,
|
|
103
104
|
children: o,
|
|
@@ -138,7 +139,7 @@ const O = p(
|
|
|
138
139
|
i
|
|
139
140
|
),
|
|
140
141
|
...g,
|
|
141
|
-
children: x || v ? /* @__PURE__ */
|
|
142
|
+
children: x || v ? /* @__PURE__ */ p(N, { children: [
|
|
142
143
|
u,
|
|
143
144
|
/* @__PURE__ */ a(
|
|
144
145
|
"div",
|
|
@@ -151,7 +152,7 @@ const O = p(
|
|
|
151
152
|
}
|
|
152
153
|
),
|
|
153
154
|
h
|
|
154
|
-
] }) : /* @__PURE__ */
|
|
155
|
+
] }) : /* @__PURE__ */ p(N, { children: [
|
|
155
156
|
o,
|
|
156
157
|
/* @__PURE__ */ a(
|
|
157
158
|
k,
|
|
@@ -167,14 +168,14 @@ const O = p(
|
|
|
167
168
|
);
|
|
168
169
|
O.displayName = e.Content.displayName;
|
|
169
170
|
export {
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
q as Dialog,
|
|
172
|
+
K as DialogClose,
|
|
172
173
|
O as DialogContent,
|
|
173
|
-
|
|
174
|
+
I as DialogDescription,
|
|
174
175
|
H as DialogFooter,
|
|
175
176
|
F as DialogHeader,
|
|
176
177
|
C as DialogOverlay,
|
|
177
178
|
j as DialogPortal,
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
G as DialogTitle,
|
|
180
|
+
J as DialogTrigger
|
|
180
181
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dialog as l, DialogClose as a, DialogContent as g, DialogDescription as D, DialogFooter as e, DialogHeader as r, DialogOverlay as t, DialogPortal as n, DialogTitle as p, DialogTrigger as s } from "./Dialog.js";
|
|
2
|
+
export {
|
|
3
|
+
l as Dialog,
|
|
4
|
+
a as DialogClose,
|
|
5
|
+
g as DialogContent,
|
|
6
|
+
D as DialogDescription,
|
|
7
|
+
e as DialogFooter,
|
|
8
|
+
r as DialogHeader,
|
|
9
|
+
t as DialogOverlay,
|
|
10
|
+
n as DialogPortal,
|
|
11
|
+
p as DialogTitle,
|
|
12
|
+
s as DialogTrigger
|
|
13
|
+
};
|
|
@@ -92,7 +92,26 @@ export interface IDropdownItem {
|
|
|
92
92
|
description?: React.ReactNode;
|
|
93
93
|
}
|
|
94
94
|
/** Props for DropdownMenuItem. Standard clickable item with optional icon. Extends Radix Item with IDropdownItem. */
|
|
95
|
-
export
|
|
95
|
+
export interface DropdownMenuItemProps extends React.ComponentProps<typeof DropdownMenuPrimitive.Item>, IDropdownItem {
|
|
96
|
+
/**
|
|
97
|
+
* Renders the single child as the menu item's root element, merging the item's
|
|
98
|
+
* props, styling, ref and event handlers onto it. Use it for navigation
|
|
99
|
+
* entries so they become real links — preserving middle-click, Ctrl+click,
|
|
100
|
+
* "open in new tab", "copy link address", link semantics for screen readers
|
|
101
|
+
* and framework prefetching, none of which an `onSelect` handler can offer.
|
|
102
|
+
*
|
|
103
|
+
* `icon` and `description` still render: the icon is injected as a sibling
|
|
104
|
+
* inside the child, and the child's own content is wrapped in the standard
|
|
105
|
+
* label. Keyboard navigation, typeahead and `onSelect` are unchanged.
|
|
106
|
+
*
|
|
107
|
+
* @default false
|
|
108
|
+
* @example
|
|
109
|
+
* <DropdownMenuItem asChild icon={<HeartBold />}>
|
|
110
|
+
* <Link href="/profile/favorite">Favorites</Link>
|
|
111
|
+
* </DropdownMenuItem>
|
|
112
|
+
*/
|
|
113
|
+
asChild?: boolean;
|
|
114
|
+
}
|
|
96
115
|
/**
|
|
97
116
|
* Props for DropdownMenuButtonItem. Menu item rendered as a Button for more prominent actions
|
|
98
117
|
* such as upgrade or sign-up calls-to-action inside the menu. Pass `buttonProps` to configure the inner Button.
|
|
@@ -110,9 +129,9 @@ export type DropdownMenuButtonItemProps = React.ComponentProps<typeof DropdownMe
|
|
|
110
129
|
buttonProps: ButtonProps;
|
|
111
130
|
};
|
|
112
131
|
/** Standard clickable menu item with optional icon and variant styling. */
|
|
113
|
-
declare const DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, description, ...props }: DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
132
|
+
declare const DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, description, asChild, ...props }: DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
114
133
|
declare const DropdownMenuButtonItem: ({ children, buttonProps, className, ...props }: DropdownMenuButtonItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
115
|
-
declare const DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, description, ...props }: DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
134
|
+
declare const DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, description, asChild, ...props }: DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
116
135
|
declare const DropdownMenuRadioGroup: ({ value, onValueChange, ...props }: DropdownMenuRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
117
136
|
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuRadioItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
118
137
|
declare const DropdownMenuSeparator: ({ className, ...props }: DropdownMenuSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qB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