@m3000/market 0.0.1

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 (154) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/blocks/auction/Auction.d.ts +49 -0
  3. package/dist/components/blocks/auction/Auction.js +44 -0
  4. package/dist/components/blocks/auction/AuctionBidForm.d.ts +11 -0
  5. package/dist/components/blocks/auction/AuctionBidForm.js +88 -0
  6. package/dist/components/blocks/auction/AuctionBidInput.d.ts +9 -0
  7. package/dist/components/blocks/auction/AuctionBidInput.js +99 -0
  8. package/dist/components/blocks/auction/AuctionContext.d.ts +71 -0
  9. package/dist/components/blocks/auction/AuctionContext.js +228 -0
  10. package/dist/components/blocks/auction/AuctionInfo.d.ts +9 -0
  11. package/dist/components/blocks/auction/AuctionInfo.js +37 -0
  12. package/dist/components/blocks/auction/AuctionLayout.d.ts +63 -0
  13. package/dist/components/blocks/auction/AuctionLayout.js +80 -0
  14. package/dist/components/blocks/auction/AuctionRankings.d.ts +16 -0
  15. package/dist/components/blocks/auction/AuctionRankings.js +334 -0
  16. package/dist/components/blocks/auction/AuctionStatusTag.d.ts +15 -0
  17. package/dist/components/blocks/auction/AuctionStatusTag.js +60 -0
  18. package/dist/components/blocks/auction/AuctionSuggestedBids.d.ts +38 -0
  19. package/dist/components/blocks/auction/AuctionSuggestedBids.js +116 -0
  20. package/dist/components/blocks/auction/AuctionYourBidCard.d.ts +27 -0
  21. package/dist/components/blocks/auction/AuctionYourBidCard.js +94 -0
  22. package/dist/components/blocks/auction/AuctionYourBids.d.ts +9 -0
  23. package/dist/components/blocks/auction/AuctionYourBids.js +49 -0
  24. package/dist/components/blocks/auction/index.d.ts +12 -0
  25. package/dist/components/blocks/index.d.ts +12 -0
  26. package/dist/components/index.d.ts +28 -0
  27. package/dist/components/primitives/Button.d.ts +31 -0
  28. package/dist/components/primitives/Button.js +117 -0
  29. package/dist/components/primitives/Drawer.d.ts +43 -0
  30. package/dist/components/primitives/Drawer.js +51 -0
  31. package/dist/components/primitives/Feedback.d.ts +28 -0
  32. package/dist/components/primitives/Feedback.js +147 -0
  33. package/dist/components/primitives/MorphDialog.d.ts +39 -0
  34. package/dist/components/primitives/MorphDialog.js +87 -0
  35. package/dist/components/primitives/Price.d.ts +84 -0
  36. package/dist/components/primitives/Price.js +255 -0
  37. package/dist/components/primitives/PriceInput.d.ts +33 -0
  38. package/dist/components/primitives/PriceInput.js +25 -0
  39. package/dist/components/primitives/Receipt.d.ts +164 -0
  40. package/dist/components/primitives/Receipt.js +344 -0
  41. package/dist/components/primitives/Scale.d.ts +67 -0
  42. package/dist/components/primitives/Scale.js +132 -0
  43. package/dist/components/primitives/Separator.d.ts +22 -0
  44. package/dist/components/primitives/Separator.js +62 -0
  45. package/dist/components/primitives/Skeleton.d.ts +14 -0
  46. package/dist/components/primitives/Skeleton.js +20 -0
  47. package/dist/components/primitives/SteppedInput.d.ts +94 -0
  48. package/dist/components/primitives/SteppedInput.js +154 -0
  49. package/dist/components/primitives/Tabs.d.ts +37 -0
  50. package/dist/components/primitives/Tabs.js +99 -0
  51. package/dist/components/primitives/Tag.d.ts +24 -0
  52. package/dist/components/primitives/Tag.js +22 -0
  53. package/dist/components/primitives/Text.d.ts +32 -0
  54. package/dist/components/primitives/Text.js +65 -0
  55. package/dist/components/primitives/countdown/Countdown.d.ts +24 -0
  56. package/dist/components/primitives/countdown/Countdown.js +22 -0
  57. package/dist/components/primitives/framed-image/FramedImage.d.ts +13 -0
  58. package/dist/components/primitives/framed-image/FramedImage.js +37 -0
  59. package/dist/components/primitives/index.d.ts +17 -0
  60. package/dist/components/primitives/ranked-list/Ranking.d.ts +117 -0
  61. package/dist/components/primitives/ranked-list/Ranking.js +219 -0
  62. package/dist/components/primitives/ranked-list/index.d.ts +1 -0
  63. package/dist/hooks/useCountdown.d.ts +20 -0
  64. package/dist/hooks/useCountdown.js +75 -0
  65. package/dist/index.d.ts +36 -0
  66. package/dist/index.js +36 -0
  67. package/dist/lib/cn.d.ts +6 -0
  68. package/dist/lib/cn.js +75 -0
  69. package/dist/lib/motion.d.ts +19 -0
  70. package/dist/lib/motion.js +43 -0
  71. package/dist/types/index.d.ts +120 -0
  72. package/dist/utils/format.d.ts +38 -0
  73. package/dist/utils/format.js +103 -0
  74. package/dist/utils/rank-utils.d.ts +34 -0
  75. package/dist/utils/rank-utils.js +80 -0
  76. package/dist/utils/tick-validation.d.ts +22 -0
  77. package/dist/utils/tick-validation.js +40 -0
  78. package/package.json +92 -0
  79. package/src/components/blocks/auction/Auction.tsx +74 -0
  80. package/src/components/blocks/auction/AuctionArtwork.tsx +4 -0
  81. package/src/components/blocks/auction/AuctionBidForm.tsx +138 -0
  82. package/src/components/blocks/auction/AuctionBidInput.tsx +166 -0
  83. package/src/components/blocks/auction/AuctionContext.tsx +401 -0
  84. package/src/components/blocks/auction/AuctionInfo.tsx +36 -0
  85. package/src/components/blocks/auction/AuctionLayout.tsx +200 -0
  86. package/src/components/blocks/auction/AuctionRankings.tsx +435 -0
  87. package/src/components/blocks/auction/AuctionStatusTag.tsx +98 -0
  88. package/src/components/blocks/auction/AuctionSuggestedBids.tsx +203 -0
  89. package/src/components/blocks/auction/AuctionYourBidCard.tsx +125 -0
  90. package/src/components/blocks/auction/AuctionYourBids.tsx +61 -0
  91. package/src/components/blocks/auction/index.ts +42 -0
  92. package/src/components/blocks/index.ts +1 -0
  93. package/src/components/index.ts +2 -0
  94. package/src/components/primitives/Button.tsx +183 -0
  95. package/src/components/primitives/Drawer.tsx +125 -0
  96. package/src/components/primitives/Feedback.tsx +185 -0
  97. package/src/components/primitives/MorphDialog.tsx +160 -0
  98. package/src/components/primitives/Price.tsx +394 -0
  99. package/src/components/primitives/PriceInput.tsx +48 -0
  100. package/src/components/primitives/Receipt.tsx +711 -0
  101. package/src/components/primitives/Scale.tsx +287 -0
  102. package/src/components/primitives/Separator.tsx +87 -0
  103. package/src/components/primitives/Skeleton.tsx +33 -0
  104. package/src/components/primitives/SteppedInput.tsx +313 -0
  105. package/src/components/primitives/Tabs.tsx +161 -0
  106. package/src/components/primitives/Tag.tsx +48 -0
  107. package/src/components/primitives/Text.tsx +102 -0
  108. package/src/components/primitives/countdown/Countdown.tsx +43 -0
  109. package/src/components/primitives/countdown/index.ts +2 -0
  110. package/src/components/primitives/framed-image/FramedImage.tsx +51 -0
  111. package/src/components/primitives/framed-image/index.ts +1 -0
  112. package/src/components/primitives/index.ts +42 -0
  113. package/src/components/primitives/ranked-list/RankedList.tsx +9 -0
  114. package/src/components/primitives/ranked-list/Ranking.tsx +454 -0
  115. package/src/components/primitives/ranked-list/index.ts +8 -0
  116. package/src/hooks/index.ts +1 -0
  117. package/src/hooks/useCountdown.ts +91 -0
  118. package/src/index.ts +130 -0
  119. package/src/lib/cn.ts +81 -0
  120. package/src/lib/index.ts +2 -0
  121. package/src/lib/motion.ts +55 -0
  122. package/src/public/lea-83-time-walk.png +0 -0
  123. package/src/public/lea-83-time-walk.webp +0 -0
  124. package/src/stories/Auction.stories.tsx +658 -0
  125. package/src/stories/AuctionLayout.stories.tsx +313 -0
  126. package/src/stories/AuctionStatusTag.stories.tsx +166 -0
  127. package/src/stories/AuctionYourBidCard.stories.tsx +257 -0
  128. package/src/stories/Button.stories.tsx +306 -0
  129. package/src/stories/Countdown.stories.tsx +158 -0
  130. package/src/stories/Feedback.stories.tsx +80 -0
  131. package/src/stories/FramedImage.stories.tsx +46 -0
  132. package/src/stories/MorphDialog.stories.tsx +88 -0
  133. package/src/stories/Price.stories.tsx +292 -0
  134. package/src/stories/RankedList.stories.tsx +190 -0
  135. package/src/stories/Receipt.stories.tsx +221 -0
  136. package/src/stories/Scale.stories.tsx +578 -0
  137. package/src/stories/Separator.stories.tsx +188 -0
  138. package/src/stories/Skeleton.stories.tsx +138 -0
  139. package/src/stories/SteppedInput.stories.tsx +321 -0
  140. package/src/stories/Tabs.stories.tsx +215 -0
  141. package/src/stories/Tag.stories.tsx +138 -0
  142. package/src/stories/Text.stories.tsx +245 -0
  143. package/src/styles/globals.css +39 -0
  144. package/src/styles/index.css +4 -0
  145. package/src/styles/theme/animation.css +11 -0
  146. package/src/styles/theme/color.css +185 -0
  147. package/src/styles/theme/index.css +3 -0
  148. package/src/styles/theme/typography.css +3 -0
  149. package/src/styles/utility.css +8 -0
  150. package/src/types/index.ts +149 -0
  151. package/src/utils/format.ts +130 -0
  152. package/src/utils/index.ts +16 -0
  153. package/src/utils/rank-utils.ts +131 -0
  154. package/src/utils/tick-validation.ts +65 -0
@@ -0,0 +1,257 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { AuctionYourBidCard } from "@/components/blocks/auction/AuctionYourBidCard";
3
+ import type { AuctionUserBid } from "@/types";
4
+
5
+ const formatPrice = (priceValue: bigint) => {
6
+ const val = Number(priceValue) / 1e18;
7
+ return val.toLocaleString("en-US", {
8
+ minimumFractionDigits: 3,
9
+ maximumFractionDigits: 3,
10
+ });
11
+ };
12
+
13
+ const mockWinningBid: AuctionUserBid = {
14
+ id: "bid-1",
15
+ price: 500000000000000000n,
16
+ createdAt: new Date(Date.now() - 3600000),
17
+ bidder: { id: "0x1234", name: "You" },
18
+ globalBidId: 1n,
19
+ status: "active",
20
+ isWinning: true,
21
+ };
22
+
23
+ const mockOutbidBid: AuctionUserBid = {
24
+ id: "bid-2",
25
+ price: 100000000000000000n,
26
+ createdAt: new Date(Date.now() - 7200000),
27
+ bidder: { id: "0x1234", name: "You" },
28
+ globalBidId: 2n,
29
+ status: "active",
30
+ isWinning: false,
31
+ };
32
+
33
+ const mockClaimedBid: AuctionUserBid = {
34
+ id: "bid-3",
35
+ price: 300000000000000000n,
36
+ createdAt: new Date(Date.now() - 86400000),
37
+ bidder: { id: "0x1234", name: "You" },
38
+ globalBidId: 3n,
39
+ status: "claimed",
40
+ isWinning: true,
41
+ claimedAt: new Date(Date.now() - 3600000),
42
+ };
43
+
44
+ const mockRefundedBid: AuctionUserBid = {
45
+ id: "bid-4",
46
+ price: 50000000000000000n,
47
+ createdAt: new Date(Date.now() - 172800000),
48
+ bidder: { id: "0x1234", name: "You" },
49
+ globalBidId: 4n,
50
+ status: "refunded",
51
+ isWinning: false,
52
+ };
53
+
54
+ const getRankForBid = (bidId: string) => {
55
+ const ranks: Record<string, number> = {
56
+ "bid-1": 3,
57
+ "bid-2": 25,
58
+ "bid-3": 5,
59
+ "bid-4": 30,
60
+ };
61
+ return ranks[bidId] ?? null;
62
+ };
63
+
64
+ const meta: Meta<typeof AuctionYourBidCard> = {
65
+ title: "Blocks/Auction/YourBidCard",
66
+ component: AuctionYourBidCard,
67
+ parameters: {
68
+ layout: "centered",
69
+ },
70
+ decorators: [
71
+ (Story) => (
72
+ <div className="w-80">
73
+ <Story />
74
+ </div>
75
+ ),
76
+ ],
77
+ };
78
+
79
+ export default meta;
80
+
81
+ export const Winning: StoryObj<typeof AuctionYourBidCard> = {
82
+ args: {
83
+ bid: mockWinningBid,
84
+ getRankForBid,
85
+ lockedBidId: null,
86
+ onLockForTopUp: (bidId, priceValue) =>
87
+ console.log("Lock for top-up:", bidId, priceValue),
88
+ onCancelTopUp: () => console.log("Cancel top-up"),
89
+ isAuctionEnded: false,
90
+ formatPrice,
91
+ currencySymbol: "USD",
92
+ },
93
+ };
94
+
95
+ export const Outbid: StoryObj<typeof AuctionYourBidCard> = {
96
+ args: {
97
+ bid: mockOutbidBid,
98
+ getRankForBid,
99
+ lockedBidId: null,
100
+ onLockForTopUp: (bidId, priceValue) =>
101
+ console.log("Lock for top-up:", bidId, priceValue),
102
+ onCancelTopUp: () => console.log("Cancel top-up"),
103
+ isAuctionEnded: false,
104
+ formatPrice,
105
+ currencySymbol: "USD",
106
+ },
107
+ };
108
+
109
+ export const Claimed: StoryObj<typeof AuctionYourBidCard> = {
110
+ args: {
111
+ bid: mockClaimedBid,
112
+ getRankForBid,
113
+ lockedBidId: null,
114
+ onLockForTopUp: (bidId, priceValue) =>
115
+ console.log("Lock for top-up:", bidId, priceValue),
116
+ onCancelTopUp: () => console.log("Cancel top-up"),
117
+ isAuctionEnded: true,
118
+ formatPrice,
119
+ currencySymbol: "USD",
120
+ },
121
+ };
122
+
123
+ export const Refunded: StoryObj<typeof AuctionYourBidCard> = {
124
+ args: {
125
+ bid: mockRefundedBid,
126
+ getRankForBid,
127
+ lockedBidId: null,
128
+ onLockForTopUp: (bidId, priceValue) =>
129
+ console.log("Lock for top-up:", bidId, priceValue),
130
+ onCancelTopUp: () => console.log("Cancel top-up"),
131
+ isAuctionEnded: true,
132
+ formatPrice,
133
+ currencySymbol: "USD",
134
+ },
135
+ };
136
+
137
+ export const LockedForTopUp: StoryObj<typeof AuctionYourBidCard> = {
138
+ args: {
139
+ bid: mockWinningBid,
140
+ getRankForBid,
141
+ lockedBidId: 1n,
142
+ onLockForTopUp: (bidId, priceValue) =>
143
+ console.log("Lock for top-up:", bidId, priceValue),
144
+ onCancelTopUp: () => console.log("Cancel top-up"),
145
+ isAuctionEnded: false,
146
+ formatPrice,
147
+ currencySymbol: "USD",
148
+ },
149
+ };
150
+
151
+ export const WithClaimButton: StoryObj<typeof AuctionYourBidCard> = {
152
+ args: {
153
+ bid: { ...mockWinningBid, status: "active" },
154
+ getRankForBid,
155
+ lockedBidId: null,
156
+ onLockForTopUp: (bidId, priceValue) =>
157
+ console.log("Lock for top-up:", bidId, priceValue),
158
+ onCancelTopUp: () => console.log("Cancel top-up"),
159
+ isAuctionEnded: true,
160
+ onClaim: async (bidId) => {
161
+ console.log("Claim edition:", bidId);
162
+ return true;
163
+ },
164
+ formatPrice,
165
+ currencySymbol: "USD",
166
+ },
167
+ };
168
+
169
+ export const AllStates: StoryObj<typeof AuctionYourBidCard> = {
170
+ render: () => (
171
+ <div className="flex flex-col gap-4">
172
+ <div>
173
+ <p className="mb-2 text-sm text-muted-foreground">Winning bid</p>
174
+ <AuctionYourBidCard
175
+ bid={mockWinningBid}
176
+ getRankForBid={getRankForBid}
177
+ lockedBidId={null}
178
+ onLockForTopUp={(bidId, priceValue) =>
179
+ console.log("Lock for top-up:", bidId, priceValue)
180
+ }
181
+ onCancelTopUp={() => console.log("Cancel top-up")}
182
+ isAuctionEnded={false}
183
+ formatPrice={formatPrice}
184
+ currencySymbol="USD"
185
+ />
186
+ </div>
187
+ <div>
188
+ <p className="mb-2 text-sm text-muted-foreground">Outbid</p>
189
+ <AuctionYourBidCard
190
+ bid={mockOutbidBid}
191
+ getRankForBid={getRankForBid}
192
+ lockedBidId={null}
193
+ onLockForTopUp={(bidId, priceValue) =>
194
+ console.log("Lock for top-up:", bidId, priceValue)
195
+ }
196
+ onCancelTopUp={() => console.log("Cancel top-up")}
197
+ isAuctionEnded={false}
198
+ formatPrice={formatPrice}
199
+ currencySymbol="USD"
200
+ />
201
+ </div>
202
+ <div>
203
+ <p className="mb-2 text-sm text-muted-foreground">Claimed</p>
204
+ <AuctionYourBidCard
205
+ bid={mockClaimedBid}
206
+ getRankForBid={getRankForBid}
207
+ lockedBidId={null}
208
+ onLockForTopUp={(bidId, priceValue) =>
209
+ console.log("Lock for top-up:", bidId, priceValue)
210
+ }
211
+ onCancelTopUp={() => console.log("Cancel top-up")}
212
+ isAuctionEnded={true}
213
+ formatPrice={formatPrice}
214
+ currencySymbol="USD"
215
+ />
216
+ </div>
217
+ <div>
218
+ <p className="mb-2 text-sm text-muted-foreground">Refunded</p>
219
+ <AuctionYourBidCard
220
+ bid={mockRefundedBid}
221
+ getRankForBid={getRankForBid}
222
+ lockedBidId={null}
223
+ onLockForTopUp={(bidId, priceValue) =>
224
+ console.log("Lock for top-up:", bidId, priceValue)
225
+ }
226
+ onCancelTopUp={() => console.log("Cancel top-up")}
227
+ isAuctionEnded={true}
228
+ formatPrice={formatPrice}
229
+ currencySymbol="USD"
230
+ />
231
+ </div>
232
+ </div>
233
+ ),
234
+ };
235
+
236
+ export const DollarCurrency: StoryObj<typeof AuctionYourBidCard> = {
237
+ args: {
238
+ bid: {
239
+ ...mockWinningBid,
240
+ price: 50000000n,
241
+ },
242
+ getRankForBid,
243
+ lockedBidId: null,
244
+ onLockForTopUp: (bidId, priceValue) =>
245
+ console.log("Lock for top-up:", bidId, priceValue),
246
+ onCancelTopUp: () => console.log("Cancel top-up"),
247
+ isAuctionEnded: false,
248
+ formatPrice: (priceValue: bigint) => {
249
+ const usd = Number(priceValue) / 1e6;
250
+ return usd.toLocaleString("en-US", {
251
+ minimumFractionDigits: 2,
252
+ maximumFractionDigits: 2,
253
+ });
254
+ },
255
+ currencySymbol: "$",
256
+ },
257
+ };
@@ -0,0 +1,306 @@
1
+ import { IconArrowRight, IconPlus, IconStarFilled } from "@tabler/icons-react";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import { Button } from "@/components/primitives";
4
+
5
+ const meta: Meta<typeof Button> = {
6
+ title: "Primitives/Button",
7
+ component: Button,
8
+ parameters: {
9
+ layout: "centered",
10
+ },
11
+ argTypes: {
12
+ color: {
13
+ control: "select",
14
+ options: [
15
+ "primary",
16
+ "secondary",
17
+ "tertiary",
18
+ "ghost",
19
+ "destructive",
20
+ "link",
21
+ ],
22
+ },
23
+ size: {
24
+ control: "select",
25
+ options: [
26
+ "default",
27
+ "xs",
28
+ "sm",
29
+ "lg",
30
+ "xl",
31
+ "icon",
32
+ "icon-xs",
33
+ "icon-sm",
34
+ "icon-lg",
35
+ "card",
36
+ ],
37
+ },
38
+ loading: {
39
+ control: "boolean",
40
+ },
41
+ disabled: {
42
+ control: "boolean",
43
+ },
44
+ active: {
45
+ control: "boolean",
46
+ },
47
+ },
48
+ };
49
+
50
+ export default meta;
51
+
52
+ export const Primary: StoryObj<typeof Button> = {
53
+ args: {
54
+ children: "Button",
55
+ color: "primary",
56
+ },
57
+ };
58
+
59
+ export const Secondary: StoryObj<typeof Button> = {
60
+ args: {
61
+ children: "Button",
62
+ color: "secondary",
63
+ },
64
+ };
65
+
66
+ export const Tertiary: StoryObj<typeof Button> = {
67
+ args: {
68
+ children: "Button",
69
+ color: "tertiary",
70
+ },
71
+ };
72
+
73
+ export const Ghost: StoryObj<typeof Button> = {
74
+ args: {
75
+ children: "Button",
76
+ color: "ghost",
77
+ },
78
+ };
79
+
80
+ export const Destructive: StoryObj<typeof Button> = {
81
+ args: {
82
+ children: "Delete",
83
+ color: "destructive",
84
+ },
85
+ };
86
+
87
+ export const Link: StoryObj<typeof Button> = {
88
+ args: {
89
+ children: "Learn more",
90
+ color: "link",
91
+ },
92
+ };
93
+
94
+ export const Sizes: StoryObj<typeof Button> = {
95
+ render: () => (
96
+ <div className="flex flex-col items-start gap-4">
97
+ <Button size="xs">Extra Small</Button>
98
+ <Button size="sm">Small</Button>
99
+ <Button size="default">Default</Button>
100
+ <Button size="lg">Large</Button>
101
+ <Button size="xl">Extra Large</Button>
102
+ </div>
103
+ ),
104
+ };
105
+
106
+ export const IconSizes: StoryObj<typeof Button> = {
107
+ render: () => (
108
+ <div className="flex items-center gap-4">
109
+ <Button size="icon-xs" color="secondary" aria-label="Add">
110
+ <IconPlus aria-hidden className="size-3.5" />
111
+ </Button>
112
+ <Button size="icon-sm" color="secondary" aria-label="Add">
113
+ <IconPlus aria-hidden className="size-4" />
114
+ </Button>
115
+ <Button size="icon" color="secondary" aria-label="Add">
116
+ <IconPlus aria-hidden className="size-4" />
117
+ </Button>
118
+ <Button size="icon-lg" color="secondary" aria-label="Add">
119
+ <IconPlus aria-hidden className="size-5" />
120
+ </Button>
121
+ </div>
122
+ ),
123
+ };
124
+
125
+ export const CardSize: StoryObj<typeof Button> = {
126
+ render: () => (
127
+ <div className="w-64">
128
+ <Button size="card" color="tertiary" className="w-full justify-start">
129
+ <div className="flex flex-col items-start">
130
+ <span className="text-sm font-medium">Card Button</span>
131
+ <span className="text-xs text-muted-foreground">
132
+ With description text
133
+ </span>
134
+ </div>
135
+ </Button>
136
+ </div>
137
+ ),
138
+ };
139
+
140
+ export const Loading: StoryObj<typeof Button> = {
141
+ args: {
142
+ children: "Loading",
143
+ loading: true,
144
+ },
145
+ };
146
+
147
+ export const Disabled: StoryObj<typeof Button> = {
148
+ render: () => (
149
+ <div className="flex flex-wrap gap-2">
150
+ <Button color="primary" disabled>
151
+ Primary
152
+ </Button>
153
+ <Button color="secondary" disabled>
154
+ Secondary
155
+ </Button>
156
+ <Button color="tertiary" disabled>
157
+ Tertiary
158
+ </Button>
159
+ <Button color="ghost" disabled>
160
+ Ghost
161
+ </Button>
162
+ <Button color="destructive" disabled>
163
+ Destructive
164
+ </Button>
165
+ <Button color="link" disabled>
166
+ Link
167
+ </Button>
168
+ </div>
169
+ ),
170
+ };
171
+
172
+ export const Active: StoryObj<typeof Button> = {
173
+ args: {
174
+ children: "Active",
175
+ active: true,
176
+ color: "tertiary",
177
+ },
178
+ };
179
+
180
+ export const WithIcon: StoryObj<typeof Button> = {
181
+ render: () => (
182
+ <div className="flex gap-4">
183
+ <Button>
184
+ <IconArrowRight aria-hidden className="size-4" />
185
+ With Icon
186
+ </Button>
187
+ <Button size="xs">
188
+ <IconArrowRight aria-hidden className="size-3" />
189
+ XS with Icon
190
+ </Button>
191
+ </div>
192
+ ),
193
+ };
194
+
195
+ export const AllColors: StoryObj<typeof Button> = {
196
+ render: () => (
197
+ <div className="flex flex-col gap-4">
198
+ <div className="flex flex-wrap gap-2">
199
+ <Button color="primary">Primary</Button>
200
+ <Button color="secondary">Secondary</Button>
201
+ <Button color="tertiary">Tertiary</Button>
202
+ <Button color="ghost">Ghost</Button>
203
+ <Button color="destructive">Destructive</Button>
204
+ <Button color="link">Link</Button>
205
+ </div>
206
+ <div className="flex flex-wrap gap-2">
207
+ <Button color="primary" disabled>
208
+ Primary
209
+ </Button>
210
+ <Button color="secondary" disabled>
211
+ Secondary
212
+ </Button>
213
+ <Button color="tertiary" disabled>
214
+ Tertiary
215
+ </Button>
216
+ <Button color="ghost" disabled>
217
+ Ghost
218
+ </Button>
219
+ <Button color="destructive" disabled>
220
+ Destructive
221
+ </Button>
222
+ <Button color="link" disabled>
223
+ Link
224
+ </Button>
225
+ </div>
226
+ <div className="flex flex-wrap gap-2">
227
+ <Button color="primary" loading>
228
+ Primary
229
+ </Button>
230
+ <Button color="secondary" loading>
231
+ Secondary
232
+ </Button>
233
+ <Button color="tertiary" loading>
234
+ Tertiary
235
+ </Button>
236
+ <Button color="ghost" loading>
237
+ Ghost
238
+ </Button>
239
+ <Button color="destructive" loading>
240
+ Destructive
241
+ </Button>
242
+ </div>
243
+ <div className="flex flex-wrap gap-2">
244
+ <Button color="primary" active>
245
+ Primary
246
+ </Button>
247
+ <Button color="secondary" active>
248
+ Secondary
249
+ </Button>
250
+ <Button color="tertiary" active>
251
+ Tertiary
252
+ </Button>
253
+ <Button color="ghost" active>
254
+ Ghost
255
+ </Button>
256
+ </div>
257
+ </div>
258
+ ),
259
+ };
260
+
261
+ export const AllSizes: StoryObj<typeof Button> = {
262
+ render: () => (
263
+ <div className="flex flex-col gap-6">
264
+ <div>
265
+ <p className="mb-2 text-sm text-muted-foreground">Text Buttons</p>
266
+ <div className="flex items-end gap-2">
267
+ <Button size="xs">XS</Button>
268
+ <Button size="sm">SM</Button>
269
+ <Button size="default">Default</Button>
270
+ <Button size="lg">LG</Button>
271
+ <Button size="xl">XL</Button>
272
+ </div>
273
+ </div>
274
+ <div>
275
+ <p className="mb-2 text-sm text-muted-foreground">Icon Buttons</p>
276
+ <div className="flex items-end gap-2">
277
+ <Button size="icon-xs" color="secondary" aria-label="Action">
278
+ <IconStarFilled aria-hidden className="size-3.5" />
279
+ </Button>
280
+ <Button size="icon-sm" color="secondary" aria-label="Action">
281
+ <IconStarFilled aria-hidden className="size-4" />
282
+ </Button>
283
+ <Button size="icon" color="secondary" aria-label="Action">
284
+ <IconStarFilled aria-hidden className="size-4" />
285
+ </Button>
286
+ <Button size="icon-lg" color="secondary" aria-label="Action">
287
+ <IconStarFilled aria-hidden className="size-5" />
288
+ </Button>
289
+ </div>
290
+ </div>
291
+ <div>
292
+ <p className="mb-2 text-sm text-muted-foreground">Card Button</p>
293
+ <div className="w-64">
294
+ <Button size="card" color="tertiary" className="w-full justify-start">
295
+ <div className="flex flex-col items-start">
296
+ <span className="font-medium">Select Option</span>
297
+ <span className="text-xs text-muted-foreground">
298
+ Additional details here
299
+ </span>
300
+ </div>
301
+ </Button>
302
+ </div>
303
+ </div>
304
+ </div>
305
+ ),
306
+ };