@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
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as b, Fragment as N } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
3
|
import * as a from "@radix-ui/react-dropdown-menu";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { cn as
|
|
7
|
-
import {
|
|
8
|
-
import { Flex as
|
|
9
|
-
import {
|
|
10
|
-
|
|
4
|
+
import { Slottable as g } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as I } from "class-variance-authority";
|
|
6
|
+
import { cn as i } from "../../utils/cn.js";
|
|
7
|
+
import { Button as D } from "../Button/Button.js";
|
|
8
|
+
import { Flex as M } from "../Flex/Flex.js";
|
|
9
|
+
import { UnreadOutline as v } from "@solar-icons/react-perf";
|
|
10
|
+
import { Typography as w } from "../Typography/Typography.js";
|
|
11
|
+
const k = m.createContext(null), R = () => m.useContext(k), H = ({ ...e }) => /* @__PURE__ */ o(a.Root, { "data-slot": "dropdown-menu", ...e }), L = ({ ...e }) => /* @__PURE__ */ o(a.Portal, { "data-slot": "dropdown-menu-portal", ...e }), O = ({ ...e }) => /* @__PURE__ */ o(
|
|
11
12
|
a.Trigger,
|
|
12
13
|
{
|
|
13
14
|
"data-slot": "dropdown-menu-trigger",
|
|
14
|
-
...
|
|
15
|
+
...e
|
|
15
16
|
}
|
|
16
|
-
),
|
|
17
|
-
className:
|
|
17
|
+
), V = ({
|
|
18
|
+
className: e,
|
|
18
19
|
sideOffset: t = 4,
|
|
19
20
|
align: n = "start",
|
|
20
21
|
...r
|
|
21
22
|
}) => {
|
|
22
|
-
const [
|
|
23
|
+
const [s, l] = m.useState(!1), d = m.useRef(null);
|
|
23
24
|
return m.useEffect(() => {
|
|
24
|
-
const
|
|
25
|
+
const c = () => {
|
|
25
26
|
if (d.current) {
|
|
26
|
-
const { scrollHeight:
|
|
27
|
-
|
|
27
|
+
const { scrollHeight: f, clientHeight: y } = d.current;
|
|
28
|
+
l(f > y);
|
|
28
29
|
}
|
|
29
|
-
}, u = setTimeout(
|
|
30
|
+
}, u = setTimeout(c, 10), p = new ResizeObserver(c);
|
|
30
31
|
return d.current && p.observe(d.current), () => {
|
|
31
32
|
clearTimeout(u), p.disconnect();
|
|
32
33
|
};
|
|
33
|
-
}, [r.children]), /* @__PURE__ */
|
|
34
|
+
}, [r.children]), /* @__PURE__ */ o(a.Portal, { children: /* @__PURE__ */ o(
|
|
34
35
|
a.Content,
|
|
35
36
|
{
|
|
36
37
|
"data-slot": "dropdown-menu-content",
|
|
37
38
|
sideOffset: t,
|
|
38
39
|
align: n,
|
|
39
|
-
className:
|
|
40
|
+
className: i(
|
|
40
41
|
"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
41
42
|
"flex flex-col rounded-xl bg-comp-select-fill-def dropdown-shadow-default",
|
|
42
|
-
|
|
43
|
+
e
|
|
43
44
|
),
|
|
44
45
|
...r,
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ o(
|
|
46
47
|
"div",
|
|
47
48
|
{
|
|
48
49
|
ref: d,
|
|
49
|
-
className:
|
|
50
|
+
className: i(
|
|
50
51
|
"scrollbar-thin scrollbar-track-transparent scrollbar-thumb-stroke-base-secondary hover:scrollbar-thumb-stroke-base-primary scrollbar-thumb-rounded-full my-sm max-h-full overflow-y-auto px-sm py-0 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:border-2 [&::-webkit-scrollbar-thumb]:border-transparent [&::-webkit-scrollbar-thumb]:bg-stroke-base-secondary hover:[&::-webkit-scrollbar-thumb]:bg-stroke-base-primary [&::-webkit-scrollbar-track]:bg-transparent",
|
|
51
|
-
|
|
52
|
+
s && "w-[calc(100%_-_var(--spacing-sm))]"
|
|
52
53
|
),
|
|
53
54
|
children: r.children
|
|
54
55
|
}
|
|
55
56
|
)
|
|
56
57
|
}
|
|
57
58
|
) });
|
|
58
|
-
},
|
|
59
|
+
}, h = I(
|
|
59
60
|
[
|
|
60
61
|
"flex cursor-pointer items-center gap-sm rounded-md pt-md pr-lg pb-md pl-lg text-comp-dropdown-menu-text-base-def outline-0 transition-colors",
|
|
61
62
|
"hover:bg-comp-dropdown-menu-fill-base-hover hover:text-comp-dropdown-menu-text-base-hover",
|
|
@@ -80,206 +81,231 @@ const g = m.createContext(null), M = () => m.useContext(g), B = ({ ...o }) => /*
|
|
|
80
81
|
variant: "base"
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
|
-
),
|
|
84
|
-
children:
|
|
84
|
+
), z = ({
|
|
85
|
+
children: e,
|
|
85
86
|
description: t
|
|
86
|
-
}) => typeof
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
87
|
+
}) => typeof e == "function" ? /* @__PURE__ */ o(N, { children: e }) : t ? /* @__PURE__ */ b(M, { flex: 1, direction: "column", className: "min-w-0", children: [
|
|
88
|
+
/* @__PURE__ */ o(
|
|
89
|
+
w,
|
|
89
90
|
{
|
|
90
91
|
component: "span",
|
|
91
92
|
size: "sm",
|
|
92
93
|
variant: "body",
|
|
93
94
|
weight: "medium",
|
|
94
95
|
fixY: !0,
|
|
95
|
-
children:
|
|
96
|
+
children: e
|
|
96
97
|
}
|
|
97
98
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
] }) : /* @__PURE__ */
|
|
100
|
-
|
|
99
|
+
/* @__PURE__ */ o(w, { component: "span", size: "sm", variant: "body", weight: "regular", children: t })
|
|
100
|
+
] }) : /* @__PURE__ */ o(
|
|
101
|
+
w,
|
|
101
102
|
{
|
|
102
103
|
component: "span",
|
|
103
104
|
size: "sm",
|
|
104
105
|
weight: "medium",
|
|
105
106
|
className: "flex-1",
|
|
106
107
|
fixY: !0,
|
|
107
|
-
children:
|
|
108
|
+
children: e
|
|
108
109
|
}
|
|
109
|
-
),
|
|
110
|
-
|
|
110
|
+
), x = ({
|
|
111
|
+
asChild: e,
|
|
112
|
+
children: t,
|
|
113
|
+
description: n
|
|
114
|
+
}) => {
|
|
115
|
+
const r = (s) => /* @__PURE__ */ o(z, { description: n, children: s });
|
|
116
|
+
return !e || typeof t == "function" ? r(t) : m.isValidElement(t) ? /* @__PURE__ */ o(g, { children: m.cloneElement(
|
|
117
|
+
t,
|
|
118
|
+
void 0,
|
|
119
|
+
r(t.props.children)
|
|
120
|
+
) }) : /* @__PURE__ */ o(g, { children: t });
|
|
121
|
+
}, Y = ({
|
|
122
|
+
className: e,
|
|
111
123
|
variant: t,
|
|
112
124
|
children: n,
|
|
113
125
|
icon: r,
|
|
114
|
-
disabled:
|
|
115
|
-
isActive:
|
|
126
|
+
disabled: s,
|
|
127
|
+
isActive: l,
|
|
116
128
|
description: d,
|
|
117
|
-
|
|
129
|
+
asChild: c = !1,
|
|
130
|
+
...u
|
|
118
131
|
}) => /* @__PURE__ */ b(
|
|
119
132
|
a.Item,
|
|
120
133
|
{
|
|
121
134
|
"data-slot": "dropdown-menu-item",
|
|
122
|
-
|
|
123
|
-
|
|
135
|
+
asChild: c,
|
|
136
|
+
disabled: s,
|
|
137
|
+
className: i(
|
|
124
138
|
"group",
|
|
125
|
-
|
|
139
|
+
h({
|
|
126
140
|
variant: t,
|
|
127
|
-
disabled:
|
|
128
|
-
checked:
|
|
141
|
+
disabled: s,
|
|
142
|
+
checked: l
|
|
129
143
|
}),
|
|
130
|
-
|
|
144
|
+
e
|
|
131
145
|
),
|
|
132
|
-
...
|
|
146
|
+
...u,
|
|
133
147
|
children: [
|
|
134
|
-
r && /* @__PURE__ */
|
|
148
|
+
r && /* @__PURE__ */ o(
|
|
135
149
|
"span",
|
|
136
150
|
{
|
|
137
|
-
className:
|
|
151
|
+
className: i("block [&>svg]:block [&>svg]:size-icon-small", {
|
|
138
152
|
"text-comp-dropdown-menu-icon-error-def": t === "destructive",
|
|
139
153
|
"text-icon-dark-secondary-def group-hover:text-icon-brand-def group-focus-visible:text-comp-dropdown-menu-icon-base-focused": t !== "destructive",
|
|
140
|
-
"text-comp-dropdown-menu-icon-base-active":
|
|
154
|
+
"text-comp-dropdown-menu-icon-base-active": l
|
|
141
155
|
}),
|
|
142
156
|
children: r
|
|
143
157
|
}
|
|
144
158
|
),
|
|
145
|
-
|
|
159
|
+
x({ asChild: c, children: n, description: d })
|
|
146
160
|
]
|
|
147
161
|
}
|
|
148
162
|
), _ = ({
|
|
149
|
-
children:
|
|
163
|
+
children: e,
|
|
150
164
|
buttonProps: t,
|
|
151
165
|
className: n,
|
|
152
166
|
...r
|
|
153
|
-
}) => /* @__PURE__ */
|
|
167
|
+
}) => /* @__PURE__ */ o("div", { className: "my-md px-lg", children: /* @__PURE__ */ o(
|
|
154
168
|
a.Item,
|
|
155
169
|
{
|
|
156
170
|
"data-slot": "dropdown-menu-item",
|
|
157
171
|
asChild: !0,
|
|
158
172
|
...r,
|
|
159
|
-
children: /* @__PURE__ */
|
|
160
|
-
|
|
173
|
+
children: /* @__PURE__ */ o(
|
|
174
|
+
D,
|
|
161
175
|
{
|
|
162
176
|
fullWidth: !0,
|
|
163
177
|
...t,
|
|
164
|
-
className:
|
|
178
|
+
className: i(
|
|
165
179
|
"outline-0 hover:ring-transparent",
|
|
166
180
|
n,
|
|
167
181
|
t.className
|
|
168
182
|
),
|
|
169
|
-
children:
|
|
183
|
+
children: e
|
|
170
184
|
}
|
|
171
185
|
)
|
|
172
186
|
}
|
|
173
|
-
) }),
|
|
174
|
-
className:
|
|
187
|
+
) }), U = ({
|
|
188
|
+
className: e,
|
|
175
189
|
children: t,
|
|
176
190
|
checked: n,
|
|
177
191
|
variant: r,
|
|
178
|
-
icon:
|
|
179
|
-
description:
|
|
180
|
-
|
|
192
|
+
icon: s,
|
|
193
|
+
description: l,
|
|
194
|
+
asChild: d = !1,
|
|
195
|
+
...c
|
|
181
196
|
}) => /* @__PURE__ */ b(
|
|
182
197
|
a.CheckboxItem,
|
|
183
198
|
{
|
|
184
199
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
185
|
-
|
|
186
|
-
|
|
200
|
+
asChild: d,
|
|
201
|
+
className: i(
|
|
202
|
+
h({
|
|
187
203
|
variant: r,
|
|
188
204
|
checked: !!n
|
|
189
205
|
}),
|
|
190
|
-
|
|
206
|
+
e
|
|
191
207
|
),
|
|
192
208
|
checked: n,
|
|
193
|
-
onSelect: (
|
|
194
|
-
|
|
209
|
+
onSelect: (u) => {
|
|
210
|
+
u.preventDefault();
|
|
195
211
|
},
|
|
196
|
-
...
|
|
212
|
+
...c,
|
|
197
213
|
children: [
|
|
198
|
-
|
|
214
|
+
s && /* @__PURE__ */ o(
|
|
199
215
|
"span",
|
|
200
216
|
{
|
|
201
|
-
className:
|
|
217
|
+
className: i({
|
|
202
218
|
"text-comp-dropdown-menu-icon-error-def": r === "destructive",
|
|
203
219
|
"text-icon-dark-secondary-def group-hover:text-icon-brand-def group-focus-visible:text-comp-dropdown-menu-icon-base-focused": r !== "destructive"
|
|
204
220
|
}),
|
|
205
|
-
children:
|
|
221
|
+
children: s
|
|
206
222
|
}
|
|
207
223
|
),
|
|
208
|
-
|
|
209
|
-
/* @__PURE__ */
|
|
224
|
+
x({ asChild: d, children: t, description: l }),
|
|
225
|
+
/* @__PURE__ */ o("span", { className: "text-icon-brand-def", children: /* @__PURE__ */ o(a.ItemIndicator, { children: /* @__PURE__ */ o(v, { className: "size-icon-small" }) }) })
|
|
210
226
|
]
|
|
211
227
|
}
|
|
212
|
-
),
|
|
213
|
-
value:
|
|
228
|
+
), W = ({
|
|
229
|
+
value: e,
|
|
214
230
|
onValueChange: t,
|
|
215
231
|
...n
|
|
216
|
-
}) => /* @__PURE__ */
|
|
232
|
+
}) => /* @__PURE__ */ o(k.Provider, { value: { value: e, onValueChange: t }, children: /* @__PURE__ */ o(
|
|
217
233
|
a.RadioGroup,
|
|
218
234
|
{
|
|
219
235
|
"data-slot": "dropdown-menu-radio-group",
|
|
220
|
-
value:
|
|
236
|
+
value: e,
|
|
221
237
|
onValueChange: t,
|
|
222
238
|
...n
|
|
223
239
|
}
|
|
224
|
-
) }),
|
|
225
|
-
({
|
|
226
|
-
|
|
240
|
+
) }), S = m.forwardRef(
|
|
241
|
+
({
|
|
242
|
+
className: e,
|
|
243
|
+
children: t,
|
|
244
|
+
variant: n,
|
|
245
|
+
icon: r,
|
|
246
|
+
description: s,
|
|
247
|
+
value: l,
|
|
248
|
+
asChild: d = !1,
|
|
249
|
+
...c
|
|
250
|
+
}, u) => {
|
|
251
|
+
const p = R(), f = (p == null ? void 0 : p.value) === l;
|
|
227
252
|
return /* @__PURE__ */ b(
|
|
228
253
|
a.RadioItem,
|
|
229
254
|
{
|
|
230
|
-
ref:
|
|
255
|
+
ref: u,
|
|
231
256
|
"data-slot": "dropdown-menu-radio-item",
|
|
232
|
-
|
|
233
|
-
|
|
257
|
+
asChild: d,
|
|
258
|
+
className: i(
|
|
259
|
+
h({
|
|
234
260
|
variant: n,
|
|
235
|
-
checked:
|
|
261
|
+
checked: f
|
|
236
262
|
}),
|
|
237
|
-
|
|
238
|
-
|
|
263
|
+
e,
|
|
264
|
+
c.disabled && "cursor-not-allowed text-comp-dropdown-menu-text-base-disabled hover:bg-transparent hover:text-comp-dropdown-menu-text-base-disabled"
|
|
239
265
|
),
|
|
240
|
-
value:
|
|
241
|
-
...
|
|
266
|
+
value: l,
|
|
267
|
+
...c,
|
|
242
268
|
children: [
|
|
243
|
-
r && /* @__PURE__ */
|
|
269
|
+
r && /* @__PURE__ */ o(
|
|
244
270
|
"span",
|
|
245
271
|
{
|
|
246
|
-
className:
|
|
272
|
+
className: i({
|
|
247
273
|
"text-comp-dropdown-menu-icon-error-def": n === "destructive",
|
|
248
274
|
"text-icon-dark-secondary-def group-hover:text-icon-brand-def group-focus-visible:text-comp-dropdown-menu-icon-base-focused": n !== "destructive",
|
|
249
|
-
"text-comp-dropdown-menu-text-base-disabled":
|
|
275
|
+
"text-comp-dropdown-menu-text-base-disabled": c.disabled
|
|
250
276
|
}),
|
|
251
277
|
children: r
|
|
252
278
|
}
|
|
253
279
|
),
|
|
254
|
-
|
|
255
|
-
/* @__PURE__ */
|
|
280
|
+
x({ asChild: d, children: t, description: s }),
|
|
281
|
+
/* @__PURE__ */ o("span", { className: "text-icon-brand-def", children: /* @__PURE__ */ o(a.ItemIndicator, { children: /* @__PURE__ */ o(v, { className: "size-icon-small" }) }) })
|
|
256
282
|
]
|
|
257
283
|
}
|
|
258
284
|
);
|
|
259
285
|
}
|
|
260
286
|
);
|
|
261
|
-
|
|
262
|
-
const
|
|
263
|
-
className:
|
|
287
|
+
S.displayName = "DropdownMenuRadioItem";
|
|
288
|
+
const q = ({
|
|
289
|
+
className: e,
|
|
264
290
|
...t
|
|
265
|
-
}) => /* @__PURE__ */
|
|
291
|
+
}) => /* @__PURE__ */ o(
|
|
266
292
|
a.Separator,
|
|
267
293
|
{
|
|
268
294
|
"data-slot": "dropdown-menu-separator",
|
|
269
|
-
className:
|
|
295
|
+
className: i("my-sm h-0 border-b border-stroke-base-primary", e),
|
|
270
296
|
...t
|
|
271
297
|
}
|
|
272
298
|
);
|
|
273
299
|
export {
|
|
274
|
-
|
|
300
|
+
H as DropdownMenu,
|
|
275
301
|
_ as DropdownMenuButtonItem,
|
|
276
|
-
|
|
277
|
-
|
|
302
|
+
U as DropdownMenuCheckboxItem,
|
|
303
|
+
V as DropdownMenuContent,
|
|
278
304
|
Y as DropdownMenuItem,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
305
|
+
L as DropdownMenuPortal,
|
|
306
|
+
W as DropdownMenuRadioGroup,
|
|
307
|
+
S as DropdownMenuRadioItem,
|
|
308
|
+
q as DropdownMenuSeparator,
|
|
309
|
+
O as DropdownMenuTrigger,
|
|
310
|
+
h as dropdownMenuItemVariants
|
|
285
311
|
};
|
|
@@ -5,8 +5,8 @@ declare const meta: {
|
|
|
5
5
|
subcomponents: {
|
|
6
6
|
DropdownMenuTrigger: ({ ...props }: import('./DropdownMenu').DropdownMenuTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
DropdownMenuContent: ({ className, sideOffset, align, ...props }: import('./DropdownMenu').DropdownMenuContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, description, ...props }: import('./DropdownMenu').DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, description, ...props }: import('./DropdownMenu').DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, description, asChild, ...props }: import('./DropdownMenu').DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, description, asChild, ...props }: import('./DropdownMenu').DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
DropdownMenuRadioGroup: ({ value, onValueChange, ...props }: import('./DropdownMenu').DropdownMenuRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
DropdownMenuRadioItem: import('react').ForwardRefExoticComponent<Omit<import('./DropdownMenu').DropdownMenuRadioItemProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
12
|
DropdownMenuSeparator: ({ className, ...props }: import('./DropdownMenu').DropdownMenuSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,6 +53,7 @@ export declare const WithIcons: Story;
|
|
|
53
53
|
export declare const WithSeparator: Story;
|
|
54
54
|
export declare const WithDisabledItem: Story;
|
|
55
55
|
export declare const ActiveMenuItem: Story;
|
|
56
|
+
export declare const WithLinkItems: Story;
|
|
56
57
|
export declare const WithButton: Story;
|
|
57
58
|
export declare const ItemVariants: Story;
|
|
58
59
|
export declare const WithCheckboxItems: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AA4B3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AA4B3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KA2BrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA8BvB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAwB5B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAwC3B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAgCxB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAiC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA2C/B,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,KA+EhD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KA2D9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KA4B5B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DropdownMenu as e, DropdownMenuButtonItem as r, DropdownMenuCheckboxItem as d, DropdownMenuContent as p, DropdownMenuItem as t, DropdownMenuPortal as u, DropdownMenuRadioGroup as w, DropdownMenuRadioItem as M, DropdownMenuSeparator as D, DropdownMenuTrigger as a, dropdownMenuItemVariants as m } from "./DropdownMenu.js";
|
|
2
|
+
export {
|
|
3
|
+
e as DropdownMenu,
|
|
4
|
+
r as DropdownMenuButtonItem,
|
|
5
|
+
d as DropdownMenuCheckboxItem,
|
|
6
|
+
p as DropdownMenuContent,
|
|
7
|
+
t as DropdownMenuItem,
|
|
8
|
+
u as DropdownMenuPortal,
|
|
9
|
+
w as DropdownMenuRadioGroup,
|
|
10
|
+
M as DropdownMenuRadioItem,
|
|
11
|
+
D as DropdownMenuSeparator,
|
|
12
|
+
a as DropdownMenuTrigger,
|
|
13
|
+
m as dropdownMenuItemVariants
|
|
14
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as z } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { Popover as T, PopoverTrigger as Y, PopoverContent as j } from "../Popover/Popover.js";
|
|
4
|
-
import { MagnifyingGlass as K } from "../Icons/CustomIcons.js";
|
|
5
3
|
import { cn as N } from "../../utils/cn.js";
|
|
4
|
+
import "@solar-icons/react-perf";
|
|
5
|
+
import { MagnifyingGlass as T } from "../Icons/CustomIcons.js";
|
|
6
|
+
import { Popover as Y, PopoverTrigger as j, PopoverContent as K } from "../Popover/Popover.js";
|
|
6
7
|
import { typographyVariants as U, Typography as A } from "../Typography/Typography.js";
|
|
7
8
|
const R = r.createContext(null), E = () => {
|
|
8
9
|
const s = r.useContext(R);
|
|
@@ -44,8 +45,8 @@ const R = r.createContext(null), E = () => {
|
|
|
44
45
|
}),
|
|
45
46
|
[y, h, i, D, b, u, x]
|
|
46
47
|
);
|
|
47
|
-
return /* @__PURE__ */ t(R.Provider, { value: o, children: /* @__PURE__ */ t(
|
|
48
|
-
}, $ = (s) => /* @__PURE__ */ t(
|
|
48
|
+
return /* @__PURE__ */ t(R.Provider, { value: o, children: /* @__PURE__ */ t(Y, { open: i, onOpenChange: D, children: s }) });
|
|
49
|
+
}, $ = (s) => /* @__PURE__ */ t(j, { "data-slot": "dropdown-search-menu-trigger", ...s }), q = ({
|
|
49
50
|
className: s,
|
|
50
51
|
searchPlaceholder: c,
|
|
51
52
|
searchAriaLabel: p,
|
|
@@ -94,7 +95,7 @@ const R = r.createContext(null), E = () => {
|
|
|
94
95
|
}
|
|
95
96
|
};
|
|
96
97
|
return /* @__PURE__ */ z(
|
|
97
|
-
|
|
98
|
+
K,
|
|
98
99
|
{
|
|
99
100
|
align: m,
|
|
100
101
|
sideOffset: w,
|
|
@@ -110,7 +111,7 @@ const R = r.createContext(null), E = () => {
|
|
|
110
111
|
children: [
|
|
111
112
|
/* @__PURE__ */ t("div", { className: "p-sm", children: /* @__PURE__ */ z("div", { className: "flex items-center gap-sm rounded-comp-dropdown-menu-radius-item px-lg py-sm", children: [
|
|
112
113
|
/* @__PURE__ */ t(
|
|
113
|
-
|
|
114
|
+
T,
|
|
114
115
|
{
|
|
115
116
|
"aria-hidden": "true",
|
|
116
117
|
className: "size-icon-small shrink-0 text-icon-dark-secondary-def"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DropdownSearchMenu as o, DropdownSearchMenuContent as n, DropdownSearchMenuItem as p, DropdownSearchMenuTrigger as a } from "./DropdownSearchMenu.js";
|
|
2
|
+
export {
|
|
3
|
+
o as DropdownSearchMenu,
|
|
4
|
+
n as DropdownSearchMenuContent,
|
|
5
|
+
p as DropdownSearchMenuItem,
|
|
6
|
+
a as DropdownSearchMenuTrigger
|
|
7
|
+
};
|
|
@@ -2,8 +2,8 @@ import { jsx as e, jsxs as i, Fragment as a } from "react/jsx-runtime";
|
|
|
2
2
|
import s from "react";
|
|
3
3
|
import { Slot as h, Slottable as l } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as x } from "class-variance-authority";
|
|
5
|
-
import { sharedButtonVariants as u } from "../Button/buttonVariants.js";
|
|
6
5
|
import { cn as y } from "../../utils/cn.js";
|
|
6
|
+
import { sharedButtonVariants as u } from "../Button/buttonVariants.js";
|
|
7
7
|
import { Typography as j } from "../Typography/Typography.js";
|
|
8
8
|
const _ = x(
|
|
9
9
|
[
|
|
@@ -2,11 +2,11 @@ import { jsxs as m, jsx as t, Fragment as G } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as F, useRef as _, useEffect as O, useCallback as W, useMemo as K, Fragment as q } from "react";
|
|
3
3
|
import { cva as J } from "class-variance-authority";
|
|
4
4
|
import { useBreakpoints as Q } from "../../hooks/use-is-breakpoint.js";
|
|
5
|
-
import { Table as U, TableHeader as X, TableRow as B, TableHead as Y, TableRowGroup as Z, TableCell as M } from "./Table.js";
|
|
6
5
|
import { cn as l } from "../../utils/cn.js";
|
|
6
|
+
import { Flex as B } from "../Flex/Flex.js";
|
|
7
|
+
import { AltArrowDownOutline as U } from "@solar-icons/react-perf";
|
|
7
8
|
import { Typography as g } from "../Typography/Typography.js";
|
|
8
|
-
import {
|
|
9
|
-
import { Flex as $ } from "../Flex/Flex.js";
|
|
9
|
+
import { Table as X, TableHeader as Y, TableRow as M, TableHead as Z, TableRowGroup as w, TableCell as $ } from "./Table.js";
|
|
10
10
|
const j = J("", {
|
|
11
11
|
variants: {
|
|
12
12
|
responsive: {
|
|
@@ -82,11 +82,11 @@ const j = J("", {
|
|
|
82
82
|
E(a.responsive, x) && (e === -1 && (e = d), i = d);
|
|
83
83
|
}), { firstVisibleIndex: e, lastVisibleIndex: i };
|
|
84
84
|
}, [o, x]), y = !n && N, V = !!n || y;
|
|
85
|
-
return /* @__PURE__ */ m(
|
|
86
|
-
/* @__PURE__ */ t(
|
|
85
|
+
return /* @__PURE__ */ m(X, { children: [
|
|
86
|
+
/* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(M, { className: "[&>th]:border-0 [&>th]:bg-transparent", children: o.map((e, i) => {
|
|
87
87
|
const a = z(e.responsive) ? e.responsive : void 0, d = e.responsive === !1;
|
|
88
88
|
return /* @__PURE__ */ t(
|
|
89
|
-
|
|
89
|
+
Z,
|
|
90
90
|
{
|
|
91
91
|
className: l(
|
|
92
92
|
e.className,
|
|
@@ -102,14 +102,14 @@ const j = J("", {
|
|
|
102
102
|
var c;
|
|
103
103
|
const i = e.id, a = v.has(i) || y, d = L.has(i);
|
|
104
104
|
return /* @__PURE__ */ m(
|
|
105
|
-
|
|
105
|
+
w,
|
|
106
106
|
{
|
|
107
107
|
className: l({
|
|
108
108
|
"group hover:[&_td]:border-stroke-brand-hover": n
|
|
109
109
|
}),
|
|
110
110
|
children: [
|
|
111
111
|
/* @__PURE__ */ m(
|
|
112
|
-
|
|
112
|
+
M,
|
|
113
113
|
{
|
|
114
114
|
expandablePosition: n && (v.has(i) || d) || y ? "top" : "none",
|
|
115
115
|
className: l("focus-visible-default", {
|
|
@@ -126,7 +126,7 @@ const j = J("", {
|
|
|
126
126
|
o.map((r, h) => {
|
|
127
127
|
const T = z(r.responsive) ? r.responsive : void 0, b = r.responsive === !1;
|
|
128
128
|
return /* @__PURE__ */ t(
|
|
129
|
-
|
|
129
|
+
$,
|
|
130
130
|
{
|
|
131
131
|
isFirst: h === P,
|
|
132
132
|
isLast: h === A && !n,
|
|
@@ -151,14 +151,14 @@ const j = J("", {
|
|
|
151
151
|
);
|
|
152
152
|
}),
|
|
153
153
|
n && /* @__PURE__ */ t(
|
|
154
|
-
|
|
154
|
+
$,
|
|
155
155
|
{
|
|
156
156
|
className: "w-[68px]",
|
|
157
157
|
isFirst: !1,
|
|
158
158
|
isLast: !0,
|
|
159
159
|
expandablePosition: v.has(i) || d ? "top" : "none",
|
|
160
160
|
children: /* @__PURE__ */ t(
|
|
161
|
-
|
|
161
|
+
U,
|
|
162
162
|
{
|
|
163
163
|
className: l(
|
|
164
164
|
"text-text-brand-def transition-transform duration-300",
|
|
@@ -203,7 +203,7 @@ const j = J("", {
|
|
|
203
203
|
children: [
|
|
204
204
|
N && /* @__PURE__ */ m(G, { children: [
|
|
205
205
|
/* @__PURE__ */ t(
|
|
206
|
-
|
|
206
|
+
B,
|
|
207
207
|
{
|
|
208
208
|
gap: "md",
|
|
209
209
|
direction: "column",
|
|
@@ -211,7 +211,7 @@ const j = J("", {
|
|
|
211
211
|
children: o.filter(
|
|
212
212
|
(r) => r.moveToExpandable !== !1 && r.responsive !== void 0 && r.responsive !== "xs" && !E(r.responsive, x)
|
|
213
213
|
).map((r, h) => /* @__PURE__ */ m(
|
|
214
|
-
|
|
214
|
+
B,
|
|
215
215
|
{
|
|
216
216
|
align: "center",
|
|
217
217
|
justify: "between",
|
|
@@ -2,8 +2,8 @@ import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import * as f from "react";
|
|
3
3
|
import { cva as _ } from "class-variance-authority";
|
|
4
4
|
import { useMuzaTranslations as B } from "../../translations/TranslationContext.js";
|
|
5
|
-
import { Flex as z } from "../Flex/Flex.js";
|
|
6
5
|
import { cn as a } from "../../utils/cn.js";
|
|
6
|
+
import { Flex as z } from "../Flex/Flex.js";
|
|
7
7
|
import { GalleryOutline as M, FileTextBold as j, CloseCircleBold as D, DownloadMinimalisticBold as I, TrashBinTrashBold as R } from "@solar-icons/react-perf";
|
|
8
8
|
import { Typography as u } from "../Typography/Typography.js";
|
|
9
9
|
const S = (e, l, i) => {
|