@vkzstudio/muza-ui 1.2.0 → 1.4.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/BalanceListView/BalanceListView.examples.d.ts +38 -0
- package/dist/components/BalanceListView/BalanceListView.examples.d.ts.map +1 -0
- package/dist/components/BalanceListView/BalanceListView.stories.d.ts +8 -0
- package/dist/components/BalanceListView/BalanceListView.stories.d.ts.map +1 -0
- package/dist/components/ButtonArrow/ButtonArrow.d.ts +3 -3
- package/dist/components/ButtonArrow/ButtonArrow.d.ts.map +1 -1
- package/dist/components/ButtonArrow/ButtonArrow.js +26 -25
- 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/Dialog/Dialog.d.ts +12 -6
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +116 -120
- package/dist/components/Dialog/Dialog.stories.d.ts +1 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
- 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/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +13 -13
- package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.js +10 -11
- package/dist/components/EmptyState/EmptyState.js +19 -19
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +8 -9
- package/dist/components/FileUpload/FileUpload.js +3 -3
- 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/InputOTP/InputOTP.d.ts +95 -0
- package/dist/components/InputOTP/InputOTP.d.ts.map +1 -0
- package/dist/components/InputOTP/InputOTP.js +187 -0
- package/dist/components/InputOTP/InputOTP.stories.d.ts +18 -0
- package/dist/components/InputOTP/InputOTP.stories.d.ts.map +1 -0
- package/dist/components/InputOTP/index.d.ts +3 -0
- package/dist/components/InputOTP/index.d.ts.map +1 -0
- package/dist/components/InputOTP/useWebOtpAutofill.d.ts +33 -0
- package/dist/components/InputOTP/useWebOtpAutofill.d.ts.map +1 -0
- package/dist/components/InputOTP/useWebOtpAutofill.js +25 -0
- 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/MarketNav/MarketNav.examples.d.ts +60 -0
- package/dist/components/MarketNav/MarketNav.examples.d.ts.map +1 -0
- package/dist/components/MarketNav/MarketNav.stories.d.ts +9 -0
- package/dist/components/MarketNav/MarketNav.stories.d.ts.map +1 -0
- 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/PageContainer/PageContainer.d.ts +53 -0
- package/dist/components/PageContainer/PageContainer.d.ts.map +1 -0
- package/dist/components/PageContainer/PageContainer.js +49 -0
- package/dist/components/PageContainer/PageContainer.stories.d.ts +14 -0
- package/dist/components/PageContainer/PageContainer.stories.d.ts.map +1 -0
- package/dist/components/PageContainer/index.d.ts +2 -0
- package/dist/components/PageContainer/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/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- 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/SegmentedControl/SegmentedControl.js +11 -11
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/Tag.js +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/UniversalFooter/UniversalFooter.d.ts +6 -5
- package/dist/components/UniversalFooter/UniversalFooter.d.ts.map +1 -1
- package/dist/components/UniversalFooter/UniversalFooter.js +186 -177
- package/dist/components/UniversalFooter/UniversalFooter.stories.d.ts.map +1 -1
- 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 +14 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +413 -352
- package/dist/muza-ui.css +1 -1
- package/dist/styles/primitives.css +5 -0
- package/dist/styles/token-colors.css +106 -30
- package/dist/styles/token-sizes.css +60 -16
- 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 +124 -27
- 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 +4 -3
- 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
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { Button as w } from "../Button/Button.js";
|
|
4
|
+
import { Searchbar as k } from "../Searchbar/Searchbar.js";
|
|
5
|
+
import { Carousel as y, CarouselContent as v, CarouselItem as S, CarouselPrevious as C, CarouselNext as F } from "../Carousel/Carousel.js";
|
|
6
|
+
import { Flex as m } from "../Flex/Flex.js";
|
|
7
|
+
import { cn as l } from "../../utils/cn.js";
|
|
8
|
+
import { ArrowLeftOutline as A } from "@solar-icons/react-perf";
|
|
9
|
+
import { Skeleton as f } from "../Skeleton/Skeleton.js";
|
|
10
|
+
const R = n.forwardRef(
|
|
11
|
+
({
|
|
12
|
+
className: t,
|
|
13
|
+
searchbarProps: r,
|
|
14
|
+
back: a,
|
|
15
|
+
backVisibleOnDesktop: i = !1,
|
|
16
|
+
children: c,
|
|
17
|
+
carouselOpts: d,
|
|
18
|
+
showArrows: u = !0,
|
|
19
|
+
...x
|
|
20
|
+
}, b) => {
|
|
21
|
+
const h = !!(r || a), p = n.Children.toArray(c).filter(n.isValidElement);
|
|
22
|
+
return /* @__PURE__ */ s(
|
|
23
|
+
m,
|
|
24
|
+
{
|
|
25
|
+
ref: b,
|
|
26
|
+
direction: "column",
|
|
27
|
+
"data-slot": "search-filters",
|
|
28
|
+
className: l(
|
|
29
|
+
"w-full bg-surface-base-secondary",
|
|
30
|
+
"md:flex-row md:items-center md:gap-2xl md:px-2xl md:py-xl",
|
|
31
|
+
t
|
|
32
|
+
),
|
|
33
|
+
...x,
|
|
34
|
+
children: [
|
|
35
|
+
h && /* @__PURE__ */ s(
|
|
36
|
+
m,
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "search-filters-bar",
|
|
39
|
+
align: "center",
|
|
40
|
+
gap: "md",
|
|
41
|
+
padding: { px: "xl", py: "lg" },
|
|
42
|
+
className: l(
|
|
43
|
+
"border-b border-stroke-base-primary",
|
|
44
|
+
"md:border-b-0 md:p-0"
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
a && /* @__PURE__ */ e(
|
|
48
|
+
m,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "search-filters-back",
|
|
51
|
+
align: "center",
|
|
52
|
+
className: l("shrink-0", !i && "md:hidden"),
|
|
53
|
+
children: /* @__PURE__ */ e(
|
|
54
|
+
w,
|
|
55
|
+
{
|
|
56
|
+
variant: "tertiary",
|
|
57
|
+
size: "icon",
|
|
58
|
+
icon: /* @__PURE__ */ e(A, {}),
|
|
59
|
+
...a
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
r && /* @__PURE__ */ e("div", { className: "flex-1 md:w-[280px] md:flex-none", children: /* @__PURE__ */ e(k, { ...r }) })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
h && /* @__PURE__ */ e(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
"aria-hidden": !0,
|
|
72
|
+
className: "hidden h-comp-button-h-sm w-px shrink-0 bg-stroke-base-primary md:block"
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ e(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "search-filters-list",
|
|
79
|
+
className: l(
|
|
80
|
+
// No horizontal padding here so the chip carousel runs full-bleed
|
|
81
|
+
// to the viewport edges; the leading/trailing chip insets live on
|
|
82
|
+
// the first/last CarouselItem so they survive Embla's scroll
|
|
83
|
+
// trimming and only show at the scroll extremes.
|
|
84
|
+
"relative min-w-0 py-lg",
|
|
85
|
+
// Mobile gets a bottom divider below the toggle row, matching the
|
|
86
|
+
// divider above between the searchbar and the toggles.
|
|
87
|
+
"border-b border-stroke-base-primary",
|
|
88
|
+
// Desktop: pull the right edge out past the bar's px-2xl so chips
|
|
89
|
+
// bleed to the viewport's right edge (left stays inset by the bar).
|
|
90
|
+
"md:-mr-2xl md:flex-1 md:border-b-0 md:p-0"
|
|
91
|
+
),
|
|
92
|
+
children: /* @__PURE__ */ s(y, { align: "start", options: d, className: "w-full", children: [
|
|
93
|
+
/* @__PURE__ */ e(v, { className: "!ml-0 items-center gap-xs", children: p.map((g, o) => /* @__PURE__ */ e(
|
|
94
|
+
S,
|
|
95
|
+
{
|
|
96
|
+
className: l(
|
|
97
|
+
"!basis-auto !pl-0",
|
|
98
|
+
// First/last chips carry the leading/trailing inset so the
|
|
99
|
+
// strip rests with padding at the scroll extremes while
|
|
100
|
+
// still bleeding to the edges mid-scroll. Mobile/tablet use
|
|
101
|
+
// the bar's xl inset; desktop uses the container's 2xl.
|
|
102
|
+
o === 0 && "!pl-xl md:!pl-0",
|
|
103
|
+
o === p.length - 1 && "pr-xl md:pr-2xl"
|
|
104
|
+
),
|
|
105
|
+
children: g
|
|
106
|
+
},
|
|
107
|
+
o
|
|
108
|
+
)) }),
|
|
109
|
+
u && /* @__PURE__ */ s(N, { children: [
|
|
110
|
+
/* @__PURE__ */ e(
|
|
111
|
+
C,
|
|
112
|
+
{
|
|
113
|
+
hideWhenDisabled: !0,
|
|
114
|
+
className: "hidden md:left-0 md:flex"
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ e(
|
|
118
|
+
F,
|
|
119
|
+
{
|
|
120
|
+
hideWhenDisabled: !0,
|
|
121
|
+
className: "hidden md:right-2xl md:flex"
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
] })
|
|
125
|
+
] })
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
R.displayName = "SearchFilters";
|
|
134
|
+
const j = ({
|
|
135
|
+
className: t,
|
|
136
|
+
color: r = "default",
|
|
137
|
+
chips: a = 4,
|
|
138
|
+
...i
|
|
139
|
+
}) => /* @__PURE__ */ s(
|
|
140
|
+
m,
|
|
141
|
+
{
|
|
142
|
+
direction: "column",
|
|
143
|
+
gap: "2xl",
|
|
144
|
+
className: l("w-full md:flex-row md:items-center", t),
|
|
145
|
+
...i,
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ e(
|
|
148
|
+
f,
|
|
149
|
+
{
|
|
150
|
+
color: r,
|
|
151
|
+
className: "h-comp-input-h-small w-full shrink-0 rounded-full md:w-[280px]"
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ e(
|
|
155
|
+
"div",
|
|
156
|
+
{
|
|
157
|
+
"aria-hidden": !0,
|
|
158
|
+
className: "hidden h-comp-button-h-sm w-px shrink-0 bg-stroke-base-primary md:block"
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ e(m, { gap: "xs", className: "min-w-0 flex-1 overflow-hidden", children: Array.from({ length: a }).map((c, d) => /* @__PURE__ */ e(
|
|
162
|
+
f,
|
|
163
|
+
{
|
|
164
|
+
color: r,
|
|
165
|
+
className: "h-comp-button-h-sm w-[96px] shrink-0 rounded-full"
|
|
166
|
+
},
|
|
167
|
+
d
|
|
168
|
+
)) })
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
j.displayName = "SearchFiltersSkeleton";
|
|
173
|
+
export {
|
|
174
|
+
R as SearchFilters,
|
|
175
|
+
j as SearchFiltersSkeleton
|
|
176
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { SearchFilters } from './SearchFilters';
|
|
3
|
+
declare const meta: Meta<typeof SearchFilters>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SearchFilters>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithBackButton: Story;
|
|
8
|
+
export declare const BackVisibleOnDesktop: Story;
|
|
9
|
+
export declare const Controlled: Story;
|
|
10
|
+
export declare const NoArrows: Story;
|
|
11
|
+
export declare const LoadingSkeleton: Story;
|
|
12
|
+
//# sourceMappingURL=SearchFilters.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchFilters.stories.d.ts","sourceRoot":"","sources":["../../../src/components/SearchFilters/SearchFilters.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EAAE,aAAa,EAAyB,MAAM,iBAAiB,CAAA;AAEtE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CA8BpC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAA;AAE3C,eAAO,MAAM,OAAO,EAAE,KA2BrB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KA+B5B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAiClC,CAAA;AAaD,eAAO,MAAM,UAAU,EAAE,KAuCxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KA0BtB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SearchFilters/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import * as s from "@radix-ui/react-toggle-group";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as n } from "../../utils/cn.js";
|
|
5
5
|
import { Typography as i } from "../Typography/Typography.js";
|
|
6
|
-
const
|
|
6
|
+
const l = ({
|
|
7
7
|
className: t,
|
|
8
8
|
children: o,
|
|
9
9
|
...e
|
|
@@ -11,7 +11,7 @@ const g = ({
|
|
|
11
11
|
s.Root,
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "toggle-group",
|
|
14
|
-
className:
|
|
14
|
+
className: n(
|
|
15
15
|
"group/toggle-group relative flex gap-2xs p-2xs",
|
|
16
16
|
"max-w-comp-segmentedControl-max-width w-fit",
|
|
17
17
|
"rounded-md bg-surface-state-bg-info",
|
|
@@ -20,18 +20,18 @@ const g = ({
|
|
|
20
20
|
...e,
|
|
21
21
|
children: o
|
|
22
22
|
}
|
|
23
|
-
),
|
|
23
|
+
), d = ({
|
|
24
24
|
className: t,
|
|
25
25
|
children: o,
|
|
26
26
|
...e
|
|
27
|
-
}) => /* @__PURE__ */
|
|
27
|
+
}) => /* @__PURE__ */ a(
|
|
28
28
|
s.Item,
|
|
29
29
|
{
|
|
30
30
|
"data-slot": "toggle-group-item",
|
|
31
|
-
className:
|
|
31
|
+
className: n(
|
|
32
32
|
"max-w-comp-segmentedControl-max-width-item flex items-center justify-center rounded-sm px-xl pt-sm pb-xs",
|
|
33
|
-
"transition-200 bg-transparent text-text-
|
|
34
|
-
"
|
|
33
|
+
"transition-200 bg-transparent text-comp-segmented-control-text-def transition-colors",
|
|
34
|
+
"cursor-pointer hover:bg-surface-base-primary-hover hover:text-comp-segmented-control-text-hover",
|
|
35
35
|
"focus-visible-default focus-visible:ring-offset-0",
|
|
36
36
|
"data-[state=on]:bg-surface-base-secondary",
|
|
37
37
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
@@ -55,6 +55,6 @@ const g = ({
|
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
l as SegmentedControl,
|
|
59
|
+
d as SegmentedControlItem
|
|
60
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,WAAW;;;;8EA+BhB,CAAA;AAED,mCAAmC;AACnC,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GACjD,IAAI,CAAC,YAAY,CAAC,OAAO,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC,GAAG;IACzE,wFAAwF;IACxF,OAAO,CAAC,EACJ,QAAQ,GACR,UAAU,GACV,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,CAAA;IACZ,yDAAyD;IACzD,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1B,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yGAAyG;IACzG,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAEH,QAAA,MAAM,GAAG,GAAI,0FAWV,QAAQ,
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,WAAW;;;;8EA+BhB,CAAA;AAED,mCAAmC;AACnC,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GACjD,IAAI,CAAC,YAAY,CAAC,OAAO,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC,GAAG;IACzE,wFAAwF;IACxF,OAAO,CAAC,EACJ,QAAQ,GACR,UAAU,GACV,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,CAAA;IACZ,yDAAyD;IACzD,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1B,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yGAAyG;IACzG,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAEH,QAAA,MAAM,GAAG,GAAI,0FAWV,QAAQ,4CAiDV,CAAA;AAED,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -16,7 +16,7 @@ const u = d(
|
|
|
16
16
|
success: "bg-surface-state-bg-success text-comp-alert-text-success",
|
|
17
17
|
error: "bg-surface-state-bg-error text-comp-alert-text-error",
|
|
18
18
|
info: "bg-surface-state-bg-info text-comp-alert-text-info",
|
|
19
|
-
invert: "border border-stroke-base-disabled bg-surface-icon-bg-light text-text-invert-
|
|
19
|
+
invert: "border border-stroke-base-disabled bg-surface-icon-bg-light text-text-invert-fixed backdrop-blur-[7.5px]"
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
22
|
small: "px-sm py-2xs",
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { CardProps } from '../Card';
|
|
2
|
+
import { SkeletonProps } from '../Skeleton';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Background color of the leading icon circle.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors the four "state" surface tones in the design tokens plus a
|
|
8
|
+
* `neutral` fallback for transactions without an explicit category.
|
|
9
|
+
*/
|
|
10
|
+
export type TransactionIconBg = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
11
|
+
/**
|
|
12
|
+
* Color treatment for the transaction amount.
|
|
13
|
+
*
|
|
14
|
+
* - `success` — positive amount, green text (e.g. credits, refunds)
|
|
15
|
+
* - `default` — neutral amount, dark text (typical case)
|
|
16
|
+
* - `error` — failed/cancelled, red text (pair with `amountCrossedOut`)
|
|
17
|
+
* - `disabled` — dimmed text (matches the disabled row state)
|
|
18
|
+
*/
|
|
19
|
+
export type TransactionAmountVariant = 'success' | 'default' | 'error' | 'disabled';
|
|
20
|
+
/**
|
|
21
|
+
* Built-in status-badge presets accepted by `TransactionData.iconBadge` as a
|
|
22
|
+
* string shorthand. Each preset bundles both the Solar icon and its color
|
|
23
|
+
* treatment (glyph + disc), so the badge icon and color are set with a single
|
|
24
|
+
* value:
|
|
25
|
+
*
|
|
26
|
+
* - `plus` — positive / credit, success-colored.
|
|
27
|
+
* - `minus` — negative / debit, neutral glyph on a dark disc.
|
|
28
|
+
* - `x` — cancelled / failed, warning-colored.
|
|
29
|
+
*/
|
|
30
|
+
export type TransactionIconBadgePreset = 'plus' | 'minus' | 'x';
|
|
31
|
+
/**
|
|
32
|
+
* One label/value pair rendered inside the expanded details section.
|
|
33
|
+
*
|
|
34
|
+
* On mobile the label sits above the value (stacked); on `md+` it floats to
|
|
35
|
+
* the left in a 180px column and the value fills the remaining space.
|
|
36
|
+
*/
|
|
37
|
+
export interface TransactionDetailRow {
|
|
38
|
+
/** Label shown on the left (desktop) or above (mobile). */
|
|
39
|
+
label: React.ReactNode;
|
|
40
|
+
/** Value content. Long strings wrap. */
|
|
41
|
+
value: React.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Single transaction record consumed by `TransactionsListView`.
|
|
45
|
+
*
|
|
46
|
+
* Mirrors the data-driven approach used by `ExpandableTable` — the consumer
|
|
47
|
+
* passes a typed array of records and the component renders the layout,
|
|
48
|
+
* states, and expansion behavior.
|
|
49
|
+
*/
|
|
50
|
+
export interface TransactionData {
|
|
51
|
+
/** Stable unique identifier. Used as the React key and Radix Accordion value. */
|
|
52
|
+
id: string;
|
|
53
|
+
/** Transaction title (typically the order or event name). */
|
|
54
|
+
title: React.ReactNode;
|
|
55
|
+
/** Subtitle (timestamp, category, status…). */
|
|
56
|
+
date: React.ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Icon rendered inside the leading colored circle. Pass any 20×20 node —
|
|
59
|
+
* typically a Solar icon from `@/components/Icons`.
|
|
60
|
+
*/
|
|
61
|
+
icon?: React.ReactNode;
|
|
62
|
+
/** Background color of the leading icon circle. @default 'info' */
|
|
63
|
+
iconBg?: TransactionIconBg;
|
|
64
|
+
/**
|
|
65
|
+
* Replaces the entire leading slot. Use to render an Avatar, initials, or a
|
|
66
|
+
* custom badge. Overrides `icon` and `iconBg`.
|
|
67
|
+
*/
|
|
68
|
+
iconSlot?: React.ReactNode;
|
|
69
|
+
/**
|
|
70
|
+
* Small status badge rendered as an overlay at the bottom-right of the
|
|
71
|
+
* leading icon circle.
|
|
72
|
+
*
|
|
73
|
+
* Pass a string preset (`'plus'` / `'minus'` / `'x'`) to get the built-in
|
|
74
|
+
* Solar icon together with its matching color treatment in one value — see
|
|
75
|
+
* {@link TransactionIconBadgePreset}. Or pass any custom 20×20 node, which
|
|
76
|
+
* is rendered as-is on a light disc.
|
|
77
|
+
*/
|
|
78
|
+
iconBadge?: React.ReactNode | TransactionIconBadgePreset;
|
|
79
|
+
/** Primary amount displayed at the trailing end of the row. */
|
|
80
|
+
amount: React.ReactNode;
|
|
81
|
+
/** Color treatment for the amount. @default 'default' */
|
|
82
|
+
amountVariant?: TransactionAmountVariant;
|
|
83
|
+
/**
|
|
84
|
+
* Strike-through amount rendered before the primary amount — typically
|
|
85
|
+
* the pre-discount or pre-cancellation value.
|
|
86
|
+
*/
|
|
87
|
+
amountCrossedOut?: React.ReactNode;
|
|
88
|
+
/** Detail rows shown when the row is expanded. */
|
|
89
|
+
details?: TransactionDetailRow[];
|
|
90
|
+
/** Alert message rendered below the detail rows in the expanded view. */
|
|
91
|
+
alert?: React.ReactNode;
|
|
92
|
+
/** Alert type — controls color treatment. @default 'error' */
|
|
93
|
+
alertType?: 'info' | 'success' | 'warning' | 'error';
|
|
94
|
+
/** Prevents interaction and dims the row. @default false */
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Props for the `TransactionsListView` component.
|
|
99
|
+
*
|
|
100
|
+
* Extends {@link CardProps} so any layout / styling prop accepted by `Card`
|
|
101
|
+
* (padding, direction, gap, asChild, …) flows straight through to the
|
|
102
|
+
* surrounding card surface — the component just adds the transaction list
|
|
103
|
+
* semantics on top of a Card. The Card's `variant` is re-exposed as
|
|
104
|
+
* `cardVariant` to keep the naming unambiguous.
|
|
105
|
+
*/
|
|
106
|
+
export interface TransactionsListViewProps extends Omit<CardProps, 'children' | 'variant'> {
|
|
107
|
+
/** Transaction records to render, in order. */
|
|
108
|
+
data: TransactionData[];
|
|
109
|
+
/**
|
|
110
|
+
* Visual variant of the surrounding Card surface.
|
|
111
|
+
*
|
|
112
|
+
* @default 'default'
|
|
113
|
+
* @see CardProps.variant
|
|
114
|
+
*/
|
|
115
|
+
cardVariant?: CardProps['variant'];
|
|
116
|
+
/**
|
|
117
|
+
* When true, drops the surrounding Card chrome (border, rounded corners,
|
|
118
|
+
* background, padding) below the `md` breakpoint — the list renders flush
|
|
119
|
+
* to the viewport on mobile.
|
|
120
|
+
*
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
disableCardOnMobile?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Controlled value of the expanded row id. Pair with `onValueChange`.
|
|
126
|
+
*/
|
|
127
|
+
value?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Default expanded row id for uncontrolled usage.
|
|
130
|
+
*/
|
|
131
|
+
defaultValue?: string;
|
|
132
|
+
/** Fires when the expanded row changes. Receives the new id (or empty string when collapsed). */
|
|
133
|
+
onValueChange?: (value: string) => void;
|
|
134
|
+
}
|
|
135
|
+
declare const TransactionsListView: React.ForwardRefExoticComponent<TransactionsListViewProps & React.RefAttributes<HTMLElement>>;
|
|
136
|
+
/** Props for the {@link TransactionsListViewSkeleton} component. */
|
|
137
|
+
export type TransactionsListViewSkeletonProps = {
|
|
138
|
+
/** Number of skeleton transaction rows to render. @default 3 */
|
|
139
|
+
rows?: number;
|
|
140
|
+
} & SkeletonProps;
|
|
141
|
+
/**
|
|
142
|
+
* Loading placeholder matching the `TransactionsListView` — a market-style
|
|
143
|
+
* card surface wrapping a list of transaction rows, each with a leading
|
|
144
|
+
* circular icon block, a two-line title/date column, and a trailing amount
|
|
145
|
+
* block. Rows are separated by the same inline divider as the real list.
|
|
146
|
+
*/
|
|
147
|
+
declare const TransactionsListViewSkeleton: {
|
|
148
|
+
({ className, color, rows, ...props }: TransactionsListViewSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
displayName: string;
|
|
150
|
+
};
|
|
151
|
+
export { TransactionsListView, TransactionsListViewSkeleton };
|
|
152
|
+
//# sourceMappingURL=TransactionsListView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionsListView.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionsListView/TransactionsListView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAA;AAQ9C,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AAG1D;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,CAAA;AAEb;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,CAAA;AAiBd;;;;;;;;;GASG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,OAAO,GAAG,GAAG,CAAA;AAoB/D;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,wCAAwC;IACxC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAA;IACV,6DAA6D;IAC7D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,+CAA+C;IAC/C,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,mEAAmE;IACnE,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,0BAA0B,CAAA;IACxD,+DAA+D;IAC/D,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,yDAAyD;IACzD,aAAa,CAAC,EAAE,wBAAwB,CAAA;IACxC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,kDAAkD;IAClD,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAA;IAChC,yEAAyE;IACzE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;IACpD,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/C,+CAA+C;IAC/C,IAAI,EAAE,eAAe,EAAE,CAAA;IACvB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAClC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iGAAiG;IACjG,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,QAAA,MAAM,oBAAoB,+FA0DzB,CAAA;AAiQD,oEAAoE;AACpE,MAAM,MAAM,iCAAiC,GAAG;IAC9C,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,aAAa,CAAA;AAEjB;;;;;GAKG;AACH,QAAA,MAAM,4BAA4B;2CAK/B,iCAAiC;;CAuCnC,CAAA;AAGD,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,CAAA"}
|