@vkzstudio/muza-ui 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +52 -2
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Accordion/Accordion.js +111 -76
  4. package/dist/components/ArticleCard/ArticleCard.d.ts +178 -0
  5. package/dist/components/ArticleCard/ArticleCard.d.ts.map +1 -0
  6. package/dist/components/ArticleCard/ArticleCard.js +542 -0
  7. package/dist/components/ArticleCard/ArticleCard.stories.d.ts +14 -0
  8. package/dist/components/ArticleCard/ArticleCard.stories.d.ts.map +1 -0
  9. package/dist/components/ArticleCard/index.d.ts +2 -0
  10. package/dist/components/ArticleCard/index.d.ts.map +1 -0
  11. package/dist/components/ButtonArrow/ButtonArrow.js +1 -1
  12. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  13. package/dist/components/Calendar/Calendar.js +5 -5
  14. package/dist/components/Calendar/index.d.ts +1 -2
  15. package/dist/components/Calendar/index.d.ts.map +1 -1
  16. package/dist/components/Carousel/Carousel.d.ts +9 -0
  17. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  18. package/dist/components/Carousel/Carousel.js +135 -133
  19. package/dist/components/CarouselSection/CarouselSection.examples.d.ts +34 -0
  20. package/dist/components/CarouselSection/CarouselSection.examples.d.ts.map +1 -0
  21. package/dist/components/CarouselSection/CarouselSection.stories.d.ts +8 -0
  22. package/dist/components/CarouselSection/CarouselSection.stories.d.ts.map +1 -0
  23. package/dist/components/CategoryCard/CategoryCard.d.ts +97 -0
  24. package/dist/components/CategoryCard/CategoryCard.d.ts.map +1 -0
  25. package/dist/components/CategoryCard/CategoryCard.js +152 -0
  26. package/dist/components/CategoryCard/CategoryCard.stories.d.ts +14 -0
  27. package/dist/components/CategoryCard/CategoryCard.stories.d.ts.map +1 -0
  28. package/dist/components/CategoryCard/index.d.ts +2 -0
  29. package/dist/components/CategoryCard/index.d.ts.map +1 -0
  30. package/dist/components/CategoryIcon/CategoryIcon.d.ts +45 -0
  31. package/dist/components/CategoryIcon/CategoryIcon.d.ts.map +1 -0
  32. package/dist/components/CategoryIcon/CategoryIcon.js +54 -0
  33. package/dist/components/CategoryIcon/CategoryIcon.stories.d.ts +10 -0
  34. package/dist/components/CategoryIcon/CategoryIcon.stories.d.ts.map +1 -0
  35. package/dist/components/CategoryIcon/index.d.ts +2 -0
  36. package/dist/components/CategoryIcon/index.d.ts.map +1 -0
  37. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  38. package/dist/components/DatePicker/DatePicker.js +5 -5
  39. package/dist/components/DotDivider/DotDivider.d.ts +35 -0
  40. package/dist/components/DotDivider/DotDivider.d.ts.map +1 -0
  41. package/dist/components/DotDivider/DotDivider.js +31 -0
  42. package/dist/components/DotDivider/DotDivider.stories.d.ts +10 -0
  43. package/dist/components/DotDivider/DotDivider.stories.d.ts.map +1 -0
  44. package/dist/components/DotDivider/index.d.ts +2 -0
  45. package/dist/components/DotDivider/index.d.ts.map +1 -0
  46. package/dist/components/HeartButton/HeartButton.d.ts +61 -0
  47. package/dist/components/HeartButton/HeartButton.d.ts.map +1 -0
  48. package/dist/components/HeartButton/HeartButton.js +88 -0
  49. package/dist/components/HeartButton/HeartButton.stories.d.ts +10 -0
  50. package/dist/components/HeartButton/HeartButton.stories.d.ts.map +1 -0
  51. package/dist/components/HeartButton/index.d.ts +2 -0
  52. package/dist/components/HeartButton/index.d.ts.map +1 -0
  53. package/dist/components/Icons/CustomBadges.d.ts +20 -0
  54. package/dist/components/Icons/CustomBadges.d.ts.map +1 -1
  55. package/dist/components/Icons/CustomBadges.js +176 -21
  56. package/dist/components/Icons/CustomIcons.d.ts +13 -0
  57. package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
  58. package/dist/components/Icons/CustomIcons.js +50 -30
  59. package/dist/components/Icons/LogosAndBadges.stories.d.ts +2 -1
  60. package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -1
  61. package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
  62. package/dist/components/LanguageSwitcher/LanguageSwitcher.js +65 -55
  63. package/dist/components/LoginScreen/LoginScreen.d.ts +21 -2
  64. package/dist/components/LoginScreen/LoginScreen.d.ts.map +1 -1
  65. package/dist/components/LoginScreen/LoginScreen.js +32 -26
  66. package/dist/components/LoginScreen/LoginScreen.stories.d.ts +2 -2
  67. package/dist/components/LoginScreen/LoginScreen.stories.d.ts.map +1 -1
  68. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  69. package/dist/components/OfferCard/OfferCard.d.ts +206 -0
  70. package/dist/components/OfferCard/OfferCard.d.ts.map +1 -0
  71. package/dist/components/OfferCard/OfferCard.js +423 -0
  72. package/dist/components/OfferCard/OfferCard.stories.d.ts +15 -0
  73. package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -0
  74. package/dist/components/OfferCard/index.d.ts +2 -0
  75. package/dist/components/OfferCard/index.d.ts.map +1 -0
  76. package/dist/components/PartnerCard/PartnerCard.d.ts +234 -0
  77. package/dist/components/PartnerCard/PartnerCard.d.ts.map +1 -0
  78. package/dist/components/PartnerCard/PartnerCard.js +591 -0
  79. package/dist/components/PartnerCard/PartnerCard.stories.d.ts +14 -0
  80. package/dist/components/PartnerCard/PartnerCard.stories.d.ts.map +1 -0
  81. package/dist/components/PartnerCard/index.d.ts +2 -0
  82. package/dist/components/PartnerCard/index.d.ts.map +1 -0
  83. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.examples.d.ts +35 -0
  84. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.examples.d.ts.map +1 -0
  85. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.stories.d.ts +11 -0
  86. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.stories.d.ts.map +1 -0
  87. package/dist/components/Rating/Rating.d.ts +62 -0
  88. package/dist/components/Rating/Rating.d.ts.map +1 -0
  89. package/dist/components/Rating/Rating.js +88 -0
  90. package/dist/components/Rating/Rating.stories.d.ts +12 -0
  91. package/dist/components/Rating/Rating.stories.d.ts.map +1 -0
  92. package/dist/components/Rating/index.d.ts +2 -0
  93. package/dist/components/Rating/index.d.ts.map +1 -0
  94. package/dist/components/RatingBlock/RatingBlock.d.ts +65 -0
  95. package/dist/components/RatingBlock/RatingBlock.d.ts.map +1 -0
  96. package/dist/components/RatingBlock/RatingBlock.js +92 -0
  97. package/dist/components/RatingBlock/RatingBlock.stories.d.ts +12 -0
  98. package/dist/components/RatingBlock/RatingBlock.stories.d.ts.map +1 -0
  99. package/dist/components/RatingBlock/index.d.ts +2 -0
  100. package/dist/components/RatingBlock/index.d.ts.map +1 -0
  101. package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +5 -5
  102. package/dist/components/SearchFilters/SearchFilters.d.ts +88 -0
  103. package/dist/components/SearchFilters/SearchFilters.d.ts.map +1 -0
  104. package/dist/components/SearchFilters/SearchFilters.js +176 -0
  105. package/dist/components/SearchFilters/SearchFilters.stories.d.ts +12 -0
  106. package/dist/components/SearchFilters/SearchFilters.stories.d.ts.map +1 -0
  107. package/dist/components/SearchFilters/index.d.ts +2 -0
  108. package/dist/components/SearchFilters/index.d.ts.map +1 -0
  109. package/dist/components/Tag/Tag.d.ts.map +1 -1
  110. package/dist/components/TransactionsListView/TransactionsListView.d.ts +152 -0
  111. package/dist/components/TransactionsListView/TransactionsListView.d.ts.map +1 -0
  112. package/dist/components/TransactionsListView/TransactionsListView.js +367 -0
  113. package/dist/components/TransactionsListView/TransactionsListView.stories.d.ts +12 -0
  114. package/dist/components/TransactionsListView/TransactionsListView.stories.d.ts.map +1 -0
  115. package/dist/components/TransactionsListView/index.d.ts +2 -0
  116. package/dist/components/TransactionsListView/index.d.ts.map +1 -0
  117. package/dist/components/VoucherCard/VoucherCard.d.ts +105 -0
  118. package/dist/components/VoucherCard/VoucherCard.d.ts.map +1 -0
  119. package/dist/components/VoucherCard/VoucherCard.js +167 -0
  120. package/dist/components/VoucherCard/VoucherCard.stories.d.ts +9 -0
  121. package/dist/components/VoucherCard/VoucherCard.stories.d.ts.map +1 -0
  122. package/dist/components/VoucherCard/index.d.ts +2 -0
  123. package/dist/components/VoucherCard/index.d.ts.map +1 -0
  124. package/dist/components/index.d.ts +12 -0
  125. package/dist/components/index.d.ts.map +1 -1
  126. package/dist/index.js +405 -352
  127. package/dist/muza-ui.css +1 -1
  128. package/dist/styles/primitives.css +5 -0
  129. package/dist/styles/token-colors.css +105 -30
  130. package/dist/styles/token-sizes.css +24 -0
  131. package/dist/translations/index.d.ts +2 -1
  132. package/dist/translations/index.d.ts.map +1 -1
  133. package/dist/translations/locales/cs.d.ts.map +1 -1
  134. package/dist/translations/locales/cs.js +30 -2
  135. package/dist/translations/locales/en.d.ts.map +1 -1
  136. package/dist/translations/locales/en.js +26 -2
  137. package/dist/translations/locales/sk.d.ts.map +1 -1
  138. package/dist/translations/locales/sk.js +30 -2
  139. package/dist/translations/resolvePluralTemplate.d.ts +10 -0
  140. package/dist/translations/resolvePluralTemplate.d.ts.map +1 -0
  141. package/dist/translations/resolvePluralTemplate.js +20 -0
  142. package/dist/translations/types.d.ts +57 -0
  143. package/dist/translations/types.d.ts.map +1 -1
  144. package/dist/utils/cn.d.ts.map +1 -1
  145. package/dist/utils/cn.js +116 -24
  146. package/dist/utils/disabledLinkProps.d.ts +14 -0
  147. package/dist/utils/disabledLinkProps.d.ts.map +1 -0
  148. package/dist/utils/disabledLinkProps.js +9 -0
  149. package/dist/{components/Calendar/utils → utils}/formatDate.d.ts +1 -1
  150. package/dist/utils/formatDate.d.ts.map +1 -0
  151. package/dist/utils/formatDateRange.d.ts.map +1 -0
  152. package/dist/utils/index.d.ts +3 -0
  153. package/dist/utils/index.d.ts.map +1 -1
  154. package/package.json +1 -1
  155. package/dist/components/Calendar/utils/formatDate.d.ts.map +0 -1
  156. package/dist/components/Calendar/utils/formatDateRange.d.ts.map +0 -1
  157. /package/dist/{components/Calendar/utils → utils}/formatDate.js +0 -0
  158. /package/dist/{components/Calendar/utils → utils}/formatDateRange.d.ts +0 -0
  159. /package/dist/{components/Calendar/utils → utils}/formatDateRange.js +0 -0
@@ -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,2 @@
1
+ export * from './SearchFilters';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SearchFilters/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
@@ -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,4CAgDV,CAAA;AAED,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAA"}
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"}
@@ -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"}
@@ -0,0 +1,367 @@
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import * as L from "react";
3
+ import { Accordion as S, AccordionItem as Y, AccordionHeader as R, AccordionTitle as D, AccordionChevron as B, AccordionContent as F } from "../Accordion/Accordion.js";
4
+ import { Alert as E } from "../Alert/Alert.js";
5
+ import { Card as H } from "../Card/Card.js";
6
+ import { cn as s } from "../../utils/cn.js";
7
+ import { Flex as n } from "../Flex/Flex.js";
8
+ import { Skeleton as h } from "../Skeleton/Skeleton.js";
9
+ import { CloseCircleBold as M, MinusCircleBold as O, AddCircleBold as _ } from "@solar-icons/react-perf";
10
+ import { Typography as u } from "../Typography/Typography.js";
11
+ const q = {
12
+ info: "bg-surface-state-bg-info text-text-brand-def",
13
+ success: "bg-surface-state-bg-success text-text-state-success",
14
+ warning: "bg-surface-state-bg-warning text-text-state-warning",
15
+ error: "bg-surface-state-bg-error text-text-state-error-def",
16
+ neutral: "bg-surface-base-tertiary text-text-dark-secondary-def"
17
+ }, G = {
18
+ success: "text-text-state-success",
19
+ default: "text-text-dark-primary-def",
20
+ error: "text-text-state-error-def",
21
+ disabled: "text-text-dark-disabled"
22
+ }, T = {
23
+ plus: {
24
+ Icon: _,
25
+ className: "text-text-state-success bg-surface-base-secondary"
26
+ },
27
+ minus: {
28
+ Icon: O,
29
+ className: "text-icon-dark-primary-def bg-surface-base-secondary"
30
+ },
31
+ x: {
32
+ Icon: M,
33
+ className: "text-text-state-warning bg-surface-base-secondary"
34
+ }
35
+ }, J = L.forwardRef(
36
+ ({
37
+ data: r,
38
+ disableCardOnMobile: t = !1,
39
+ value: o,
40
+ defaultValue: m,
41
+ onValueChange: x,
42
+ className: l,
43
+ cardVariant: b = "default",
44
+ ...N
45
+ }, f) => /* @__PURE__ */ e(
46
+ H,
47
+ {
48
+ ref: f,
49
+ variant: b,
50
+ "data-slot": "transactions-list-view",
51
+ className: s(
52
+ "overflow-hidden",
53
+ // When disableCardOnMobile is set, strip the Card chrome below
54
+ // the `md` breakpoint so the list renders flush to the viewport.
55
+ t && [
56
+ "max-md:rounded-none",
57
+ "max-md:border-0",
58
+ "max-md:bg-transparent",
59
+ "max-md:px-0",
60
+ "max-md:py-0"
61
+ ],
62
+ l
63
+ ),
64
+ ...N,
65
+ children: /* @__PURE__ */ e(
66
+ S,
67
+ {
68
+ type: "single",
69
+ collapsible: !0,
70
+ variant: "inline",
71
+ value: o,
72
+ defaultValue: m,
73
+ onValueChange: x,
74
+ className: "gap-0",
75
+ children: r.map((c, g) => /* @__PURE__ */ e(
76
+ K,
77
+ {
78
+ data: c,
79
+ isFirst: g === 0,
80
+ isLast: g === r.length - 1
81
+ },
82
+ c.id
83
+ ))
84
+ }
85
+ )
86
+ }
87
+ )
88
+ );
89
+ J.displayName = "TransactionsListView";
90
+ const K = ({ data: r, isFirst: t, isLast: o }) => {
91
+ const {
92
+ id: m,
93
+ title: x,
94
+ date: l,
95
+ icon: b,
96
+ iconBg: N = "info",
97
+ iconSlot: f,
98
+ iconBadge: c,
99
+ amount: g,
100
+ amountVariant: j = "default",
101
+ amountCrossedOut: y,
102
+ details: p,
103
+ alert: w,
104
+ alertType: I = "error",
105
+ disabled: i
106
+ } = r, v = p && p.length > 0 || !!w, d = typeof c == "string" && c in T ? T[c] : void 0, C = d == null ? void 0 : d.Icon, k = C ? /* @__PURE__ */ e(C, { className: "size-icon-small" }) : c, z = /* @__PURE__ */ a("span", { className: "inline-flex shrink-0 flex-col items-end whitespace-nowrap", children: [
107
+ y != null && /* @__PURE__ */ e(
108
+ u,
109
+ {
110
+ component: "span",
111
+ variant: "body",
112
+ weight: "regular",
113
+ size: "caption",
114
+ fixY: !0,
115
+ className: "text-text-dark-secondary-def line-through",
116
+ children: y
117
+ }
118
+ ),
119
+ /* @__PURE__ */ e(
120
+ u,
121
+ {
122
+ component: "span",
123
+ variant: "body",
124
+ weight: "medium",
125
+ size: "base",
126
+ fixY: !0,
127
+ className: s(
128
+ "text-right",
129
+ G[i ? "disabled" : j]
130
+ ),
131
+ children: g
132
+ }
133
+ )
134
+ ] });
135
+ return /* @__PURE__ */ a(Y, { value: m, disabled: i, className: "last:border-b-0", children: [
136
+ /* @__PURE__ */ a(
137
+ R,
138
+ {
139
+ hideDefaultChevron: !0,
140
+ className: s(
141
+ // Flex row mirroring the Figma layout. On mobile, the chevron
142
+ // and amount sit INSIDE the content column so both align with
143
+ // the trigger's right edge. On desktop, the amount stack and
144
+ // chevron lift out as siblings of the content column and
145
+ // sit vertically centered alongside the title + date stack.
146
+ "flex items-start gap-lg py-comp-card-account-gap-def pr-0 pl-0",
147
+ // Snap the last row's padding in faster than the content expand
148
+ // (overrides the trigger's default transition-all duration).
149
+ "duration-100",
150
+ // Disabled rows are inert — show the default cursor, not a pointer.
151
+ "disabled:cursor-default",
152
+ // The first/last rows sit flush with the card's top/bottom padding.
153
+ // For the last row, only drop the bottom padding while collapsed —
154
+ // when expanded it's needed as the gap before the content.
155
+ t && "pt-0",
156
+ o && "data-[state=closed]:pb-0"
157
+ ),
158
+ children: [
159
+ /* @__PURE__ */ a(
160
+ n,
161
+ {
162
+ component: "span",
163
+ align: "center",
164
+ justify: "center",
165
+ "aria-hidden": !0,
166
+ className: s(
167
+ "relative size-icon-xlarge shrink-0 rounded-full",
168
+ !f && q[N],
169
+ // overflow-hidden would clip the corner badge, so only apply
170
+ // it when there's no badge
171
+ !k && "overflow-hidden",
172
+ i && "opacity-50"
173
+ ),
174
+ children: [
175
+ f ?? b,
176
+ k && /* @__PURE__ */ e(
177
+ "span",
178
+ {
179
+ className: s(
180
+ "absolute -right-0.5 -bottom-0.5 inline-flex size-icon-medium items-center justify-center rounded-full",
181
+ (d == null ? void 0 : d.className) ?? "bg-invert-def"
182
+ ),
183
+ children: k
184
+ }
185
+ )
186
+ ]
187
+ }
188
+ ),
189
+ /* @__PURE__ */ a(
190
+ n,
191
+ {
192
+ component: "span",
193
+ direction: "column",
194
+ justify: "center",
195
+ gap: "3xs",
196
+ flex: 1,
197
+ className: "min-h-icon-xlarge min-w-0",
198
+ children: [
199
+ /* @__PURE__ */ a(
200
+ n,
201
+ {
202
+ component: "span",
203
+ align: "baseline",
204
+ justify: "between",
205
+ gap: "md",
206
+ className: "min-w-0",
207
+ children: [
208
+ /* @__PURE__ */ e(
209
+ D,
210
+ {
211
+ className: s(
212
+ "line-clamp-2 min-w-0 flex-1 text-left",
213
+ "group-data-[state=open]:line-clamp-none",
214
+ i && "text-text-dark-disabled"
215
+ ),
216
+ children: x
217
+ }
218
+ ),
219
+ (v || i) && /* @__PURE__ */ e(B, { className: "self-start md:hidden" })
220
+ ]
221
+ }
222
+ ),
223
+ /* @__PURE__ */ a(
224
+ n,
225
+ {
226
+ component: "span",
227
+ align: "baseline",
228
+ justify: "between",
229
+ gap: "md",
230
+ className: "min-w-0",
231
+ children: [
232
+ /* @__PURE__ */ e(
233
+ u,
234
+ {
235
+ component: "span",
236
+ variant: "body",
237
+ weight: "regular",
238
+ size: "sm",
239
+ fixY: !0,
240
+ className: s(
241
+ "text-text-dark-secondary-def min-w-0 truncate text-left transition-colors",
242
+ // Match the title: the whole row re-colors on hover.
243
+ !i && "group-hover:text-text-brand-hover",
244
+ i && "text-text-dark-disabled"
245
+ ),
246
+ children: l
247
+ }
248
+ ),
249
+ /* @__PURE__ */ e("span", { className: "md:hidden", children: z })
250
+ ]
251
+ }
252
+ )
253
+ ]
254
+ }
255
+ ),
256
+ /* @__PURE__ */ a("span", { className: "hidden items-center gap-2xl self-center md:inline-flex", children: [
257
+ z,
258
+ (v || i) && /* @__PURE__ */ e(B, {})
259
+ ] })
260
+ ]
261
+ }
262
+ ),
263
+ v && /* @__PURE__ */ e(F, { className: "pl-0", children: /* @__PURE__ */ a(
264
+ n,
265
+ {
266
+ direction: "column",
267
+ gap: "lg",
268
+ className: s(
269
+ // align the details under the title column on desktop
270
+ "md:pl-[calc(var(--spacing-icon-xlarge)+var(--spacing-lg))]"
271
+ ),
272
+ children: [
273
+ p == null ? void 0 : p.map((A, V) => /* @__PURE__ */ e(Q, { label: A.label, value: A.value }, V)),
274
+ w && /* @__PURE__ */ e(E, { type: I, size: "small", className: "self-start", children: w })
275
+ ]
276
+ }
277
+ ) })
278
+ ] });
279
+ }, Q = ({ label: r, value: t }) => /* @__PURE__ */ a(
280
+ n,
281
+ {
282
+ direction: "column",
283
+ gap: "xs",
284
+ className: "md:flex-row md:items-baseline md:gap-3xl",
285
+ children: [
286
+ /* @__PURE__ */ e(
287
+ u,
288
+ {
289
+ component: "span",
290
+ variant: "body",
291
+ weight: "medium",
292
+ size: "base",
293
+ fixY: !0,
294
+ className: "text-text-dark-primary-def md:w-[180px] md:shrink-0",
295
+ children: r
296
+ }
297
+ ),
298
+ /* @__PURE__ */ e(
299
+ u,
300
+ {
301
+ component: "span",
302
+ variant: "body",
303
+ weight: "regular",
304
+ size: "base",
305
+ fixY: !0,
306
+ className: "break-words text-text-dark-primary-def md:flex-1",
307
+ children: t
308
+ }
309
+ )
310
+ ]
311
+ }
312
+ ), U = ({
313
+ className: r,
314
+ color: t = "default",
315
+ rows: o = 3,
316
+ ...m
317
+ }) => /* @__PURE__ */ e(
318
+ n,
319
+ {
320
+ direction: "column",
321
+ className: s(
322
+ "w-full overflow-hidden rounded-comp-card-account-radius border border-solid border-comp-card-account-stroke bg-comp-card-account-fill px-comp-card-account-p-hor py-comp-card-account-p-ver-def",
323
+ r
324
+ ),
325
+ ...m,
326
+ children: Array.from({ length: o }).map((x, l) => /* @__PURE__ */ a(
327
+ n,
328
+ {
329
+ align: "start",
330
+ gap: "lg",
331
+ className: s(
332
+ "py-comp-accordion-inline-p-ver",
333
+ l < o - 1 && "border-b border-comp-accordion-inline-stroke-def"
334
+ ),
335
+ children: [
336
+ /* @__PURE__ */ e(
337
+ h,
338
+ {
339
+ color: t,
340
+ className: "size-icon-xlarge shrink-0 rounded-full"
341
+ }
342
+ ),
343
+ /* @__PURE__ */ a(
344
+ n,
345
+ {
346
+ direction: "column",
347
+ gap: "3xs",
348
+ flex: 1,
349
+ className: "min-w-0 py-[2px]",
350
+ children: [
351
+ /* @__PURE__ */ e(h, { color: t, className: "h-[16px] w-[70%]" }),
352
+ /* @__PURE__ */ e(h, { color: t, className: "h-[12px] w-[40%]" })
353
+ ]
354
+ }
355
+ ),
356
+ /* @__PURE__ */ e(h, { color: t, className: "h-[16px] w-[64px] shrink-0" })
357
+ ]
358
+ },
359
+ l
360
+ ))
361
+ }
362
+ );
363
+ U.displayName = "TransactionsListViewSkeleton";
364
+ export {
365
+ J as TransactionsListView,
366
+ U as TransactionsListViewSkeleton
367
+ };
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { TransactionsListView } from './TransactionsListView';
3
+ declare const meta: Meta<typeof TransactionsListView>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TransactionsListView>;
6
+ export declare const Default: Story;
7
+ export declare const PreExpanded: Story;
8
+ export declare const LongTitlesExpanded: Story;
9
+ export declare const DisableCardOnMobile: Story;
10
+ export declare const NoExpandableContent: Story;
11
+ export declare const LoadingSkeleton: Story;
12
+ //# sourceMappingURL=TransactionsListView.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionsListView.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionsListView/TransactionsListView.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAQ3D,OAAO,EAEL,oBAAoB,EAErB,MAAM,wBAAwB,CAAA;AA8E/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,oBAAoB,CAgD3C,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAElD,eAAO,MAAM,OAAO,EAAE,KASrB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAUzB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAqBhC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAWjC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAmBjC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './TransactionsListView';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionsListView/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}