@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.
- package/LICENSE +21 -0
- package/dist/components/blocks/auction/Auction.d.ts +49 -0
- package/dist/components/blocks/auction/Auction.js +44 -0
- package/dist/components/blocks/auction/AuctionBidForm.d.ts +11 -0
- package/dist/components/blocks/auction/AuctionBidForm.js +88 -0
- package/dist/components/blocks/auction/AuctionBidInput.d.ts +9 -0
- package/dist/components/blocks/auction/AuctionBidInput.js +99 -0
- package/dist/components/blocks/auction/AuctionContext.d.ts +71 -0
- package/dist/components/blocks/auction/AuctionContext.js +228 -0
- package/dist/components/blocks/auction/AuctionInfo.d.ts +9 -0
- package/dist/components/blocks/auction/AuctionInfo.js +37 -0
- package/dist/components/blocks/auction/AuctionLayout.d.ts +63 -0
- package/dist/components/blocks/auction/AuctionLayout.js +80 -0
- package/dist/components/blocks/auction/AuctionRankings.d.ts +16 -0
- package/dist/components/blocks/auction/AuctionRankings.js +334 -0
- package/dist/components/blocks/auction/AuctionStatusTag.d.ts +15 -0
- package/dist/components/blocks/auction/AuctionStatusTag.js +60 -0
- package/dist/components/blocks/auction/AuctionSuggestedBids.d.ts +38 -0
- package/dist/components/blocks/auction/AuctionSuggestedBids.js +116 -0
- package/dist/components/blocks/auction/AuctionYourBidCard.d.ts +27 -0
- package/dist/components/blocks/auction/AuctionYourBidCard.js +94 -0
- package/dist/components/blocks/auction/AuctionYourBids.d.ts +9 -0
- package/dist/components/blocks/auction/AuctionYourBids.js +49 -0
- package/dist/components/blocks/auction/index.d.ts +12 -0
- package/dist/components/blocks/index.d.ts +12 -0
- package/dist/components/index.d.ts +28 -0
- package/dist/components/primitives/Button.d.ts +31 -0
- package/dist/components/primitives/Button.js +117 -0
- package/dist/components/primitives/Drawer.d.ts +43 -0
- package/dist/components/primitives/Drawer.js +51 -0
- package/dist/components/primitives/Feedback.d.ts +28 -0
- package/dist/components/primitives/Feedback.js +147 -0
- package/dist/components/primitives/MorphDialog.d.ts +39 -0
- package/dist/components/primitives/MorphDialog.js +87 -0
- package/dist/components/primitives/Price.d.ts +84 -0
- package/dist/components/primitives/Price.js +255 -0
- package/dist/components/primitives/PriceInput.d.ts +33 -0
- package/dist/components/primitives/PriceInput.js +25 -0
- package/dist/components/primitives/Receipt.d.ts +164 -0
- package/dist/components/primitives/Receipt.js +344 -0
- package/dist/components/primitives/Scale.d.ts +67 -0
- package/dist/components/primitives/Scale.js +132 -0
- package/dist/components/primitives/Separator.d.ts +22 -0
- package/dist/components/primitives/Separator.js +62 -0
- package/dist/components/primitives/Skeleton.d.ts +14 -0
- package/dist/components/primitives/Skeleton.js +20 -0
- package/dist/components/primitives/SteppedInput.d.ts +94 -0
- package/dist/components/primitives/SteppedInput.js +154 -0
- package/dist/components/primitives/Tabs.d.ts +37 -0
- package/dist/components/primitives/Tabs.js +99 -0
- package/dist/components/primitives/Tag.d.ts +24 -0
- package/dist/components/primitives/Tag.js +22 -0
- package/dist/components/primitives/Text.d.ts +32 -0
- package/dist/components/primitives/Text.js +65 -0
- package/dist/components/primitives/countdown/Countdown.d.ts +24 -0
- package/dist/components/primitives/countdown/Countdown.js +22 -0
- package/dist/components/primitives/framed-image/FramedImage.d.ts +13 -0
- package/dist/components/primitives/framed-image/FramedImage.js +37 -0
- package/dist/components/primitives/index.d.ts +17 -0
- package/dist/components/primitives/ranked-list/Ranking.d.ts +117 -0
- package/dist/components/primitives/ranked-list/Ranking.js +219 -0
- package/dist/components/primitives/ranked-list/index.d.ts +1 -0
- package/dist/hooks/useCountdown.d.ts +20 -0
- package/dist/hooks/useCountdown.js +75 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +36 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/cn.js +75 -0
- package/dist/lib/motion.d.ts +19 -0
- package/dist/lib/motion.js +43 -0
- package/dist/types/index.d.ts +120 -0
- package/dist/utils/format.d.ts +38 -0
- package/dist/utils/format.js +103 -0
- package/dist/utils/rank-utils.d.ts +34 -0
- package/dist/utils/rank-utils.js +80 -0
- package/dist/utils/tick-validation.d.ts +22 -0
- package/dist/utils/tick-validation.js +40 -0
- package/package.json +92 -0
- package/src/components/blocks/auction/Auction.tsx +74 -0
- package/src/components/blocks/auction/AuctionArtwork.tsx +4 -0
- package/src/components/blocks/auction/AuctionBidForm.tsx +138 -0
- package/src/components/blocks/auction/AuctionBidInput.tsx +166 -0
- package/src/components/blocks/auction/AuctionContext.tsx +401 -0
- package/src/components/blocks/auction/AuctionInfo.tsx +36 -0
- package/src/components/blocks/auction/AuctionLayout.tsx +200 -0
- package/src/components/blocks/auction/AuctionRankings.tsx +435 -0
- package/src/components/blocks/auction/AuctionStatusTag.tsx +98 -0
- package/src/components/blocks/auction/AuctionSuggestedBids.tsx +203 -0
- package/src/components/blocks/auction/AuctionYourBidCard.tsx +125 -0
- package/src/components/blocks/auction/AuctionYourBids.tsx +61 -0
- package/src/components/blocks/auction/index.ts +42 -0
- package/src/components/blocks/index.ts +1 -0
- package/src/components/index.ts +2 -0
- package/src/components/primitives/Button.tsx +183 -0
- package/src/components/primitives/Drawer.tsx +125 -0
- package/src/components/primitives/Feedback.tsx +185 -0
- package/src/components/primitives/MorphDialog.tsx +160 -0
- package/src/components/primitives/Price.tsx +394 -0
- package/src/components/primitives/PriceInput.tsx +48 -0
- package/src/components/primitives/Receipt.tsx +711 -0
- package/src/components/primitives/Scale.tsx +287 -0
- package/src/components/primitives/Separator.tsx +87 -0
- package/src/components/primitives/Skeleton.tsx +33 -0
- package/src/components/primitives/SteppedInput.tsx +313 -0
- package/src/components/primitives/Tabs.tsx +161 -0
- package/src/components/primitives/Tag.tsx +48 -0
- package/src/components/primitives/Text.tsx +102 -0
- package/src/components/primitives/countdown/Countdown.tsx +43 -0
- package/src/components/primitives/countdown/index.ts +2 -0
- package/src/components/primitives/framed-image/FramedImage.tsx +51 -0
- package/src/components/primitives/framed-image/index.ts +1 -0
- package/src/components/primitives/index.ts +42 -0
- package/src/components/primitives/ranked-list/RankedList.tsx +9 -0
- package/src/components/primitives/ranked-list/Ranking.tsx +454 -0
- package/src/components/primitives/ranked-list/index.ts +8 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useCountdown.ts +91 -0
- package/src/index.ts +130 -0
- package/src/lib/cn.ts +81 -0
- package/src/lib/index.ts +2 -0
- package/src/lib/motion.ts +55 -0
- package/src/public/lea-83-time-walk.png +0 -0
- package/src/public/lea-83-time-walk.webp +0 -0
- package/src/stories/Auction.stories.tsx +658 -0
- package/src/stories/AuctionLayout.stories.tsx +313 -0
- package/src/stories/AuctionStatusTag.stories.tsx +166 -0
- package/src/stories/AuctionYourBidCard.stories.tsx +257 -0
- package/src/stories/Button.stories.tsx +306 -0
- package/src/stories/Countdown.stories.tsx +158 -0
- package/src/stories/Feedback.stories.tsx +80 -0
- package/src/stories/FramedImage.stories.tsx +46 -0
- package/src/stories/MorphDialog.stories.tsx +88 -0
- package/src/stories/Price.stories.tsx +292 -0
- package/src/stories/RankedList.stories.tsx +190 -0
- package/src/stories/Receipt.stories.tsx +221 -0
- package/src/stories/Scale.stories.tsx +578 -0
- package/src/stories/Separator.stories.tsx +188 -0
- package/src/stories/Skeleton.stories.tsx +138 -0
- package/src/stories/SteppedInput.stories.tsx +321 -0
- package/src/stories/Tabs.stories.tsx +215 -0
- package/src/stories/Tag.stories.tsx +138 -0
- package/src/stories/Text.stories.tsx +245 -0
- package/src/styles/globals.css +39 -0
- package/src/styles/index.css +4 -0
- package/src/styles/theme/animation.css +11 -0
- package/src/styles/theme/color.css +185 -0
- package/src/styles/theme/index.css +3 -0
- package/src/styles/theme/typography.css +3 -0
- package/src/styles/utility.css +8 -0
- package/src/types/index.ts +149 -0
- package/src/utils/format.ts +130 -0
- package/src/utils/index.ts +16 -0
- package/src/utils/rank-utils.ts +131 -0
- package/src/utils/tick-validation.ts +65 -0
package/src/lib/cn.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type ClassValue, clsx } from "clsx";
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
|
|
4
|
+
// Primitive color scale (Radix-style 1-12 naming)
|
|
5
|
+
const PRIMITIVE_COLORS = [
|
|
6
|
+
"grey-1",
|
|
7
|
+
"grey-2",
|
|
8
|
+
"grey-3",
|
|
9
|
+
"grey-4",
|
|
10
|
+
"grey-5",
|
|
11
|
+
"grey-6",
|
|
12
|
+
"grey-7",
|
|
13
|
+
"grey-8",
|
|
14
|
+
"grey-9",
|
|
15
|
+
"grey-10",
|
|
16
|
+
"grey-11",
|
|
17
|
+
"grey-12",
|
|
18
|
+
"white",
|
|
19
|
+
"black",
|
|
20
|
+
"current",
|
|
21
|
+
"transparent",
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
// Semantic color tokens (shadcn-style naming)
|
|
25
|
+
const SEMANTIC_COLORS = [
|
|
26
|
+
"background",
|
|
27
|
+
"foreground",
|
|
28
|
+
"muted",
|
|
29
|
+
"muted-foreground",
|
|
30
|
+
"card",
|
|
31
|
+
"card-foreground",
|
|
32
|
+
"popover",
|
|
33
|
+
"popover-foreground",
|
|
34
|
+
"primary",
|
|
35
|
+
"primary-hover",
|
|
36
|
+
"primary-foreground",
|
|
37
|
+
"secondary",
|
|
38
|
+
"secondary-hover",
|
|
39
|
+
"secondary-foreground",
|
|
40
|
+
"accent",
|
|
41
|
+
"accent-hover",
|
|
42
|
+
"accent-active",
|
|
43
|
+
"accent-foreground",
|
|
44
|
+
"border",
|
|
45
|
+
"input",
|
|
46
|
+
"ring",
|
|
47
|
+
"disabled",
|
|
48
|
+
"disabled-foreground",
|
|
49
|
+
"destructive",
|
|
50
|
+
"destructive-hover",
|
|
51
|
+
"destructive-foreground",
|
|
52
|
+
"destructive-muted",
|
|
53
|
+
"destructive-muted-foreground",
|
|
54
|
+
"success",
|
|
55
|
+
"success-hover",
|
|
56
|
+
"success-foreground",
|
|
57
|
+
"success-muted",
|
|
58
|
+
"success-muted-foreground",
|
|
59
|
+
"warning",
|
|
60
|
+
"warning-hover",
|
|
61
|
+
"warning-foreground",
|
|
62
|
+
"warning-muted",
|
|
63
|
+
"warning-muted-foreground",
|
|
64
|
+
"separator",
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
const THEME_COLORS = [...PRIMITIVE_COLORS, ...SEMANTIC_COLORS];
|
|
68
|
+
|
|
69
|
+
const customTwMerge = extendTailwindMerge({
|
|
70
|
+
extend: {
|
|
71
|
+
classGroups: {
|
|
72
|
+
"text-color": [{ text: THEME_COLORS }],
|
|
73
|
+
"bg-color": [{ bg: THEME_COLORS }],
|
|
74
|
+
"border-color": [{ border: THEME_COLORS }],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export function cn(...inputs: ClassValue[]): string {
|
|
80
|
+
return customTwMerge(clsx(inputs));
|
|
81
|
+
}
|
package/src/lib/index.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Transition } from "motion/react";
|
|
2
|
+
|
|
3
|
+
type SpringTransition = {
|
|
4
|
+
type: "spring";
|
|
5
|
+
stiffness: number;
|
|
6
|
+
damping: number;
|
|
7
|
+
mass: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Shared spring configurations for consistent animations across the app.
|
|
12
|
+
*/
|
|
13
|
+
export const springs: Record<string, SpringTransition> = {
|
|
14
|
+
/** Snappy, responsive spring for UI interactions */
|
|
15
|
+
snappy: {
|
|
16
|
+
type: "spring",
|
|
17
|
+
stiffness: 500,
|
|
18
|
+
damping: 30,
|
|
19
|
+
mass: 1,
|
|
20
|
+
},
|
|
21
|
+
/** Bouncy spring with overshoot for playful interactions */
|
|
22
|
+
bouncy: {
|
|
23
|
+
type: "spring",
|
|
24
|
+
stiffness: 600,
|
|
25
|
+
damping: 20,
|
|
26
|
+
mass: 1,
|
|
27
|
+
},
|
|
28
|
+
/** Smooth spring for layout animations */
|
|
29
|
+
smooth: {
|
|
30
|
+
type: "spring",
|
|
31
|
+
stiffness: 350,
|
|
32
|
+
damping: 35,
|
|
33
|
+
mass: 1,
|
|
34
|
+
},
|
|
35
|
+
/** Quick spring for micro-interactions */
|
|
36
|
+
quick: {
|
|
37
|
+
type: "spring",
|
|
38
|
+
stiffness: 700,
|
|
39
|
+
damping: 35,
|
|
40
|
+
mass: 0.8,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Common transition presets combining spring with other settings.
|
|
46
|
+
*/
|
|
47
|
+
export const transitions: Record<string, Transition> = {
|
|
48
|
+
/** Default layout transition */
|
|
49
|
+
layout: springs.snappy,
|
|
50
|
+
/** Fade transition for overlays */
|
|
51
|
+
fade: {
|
|
52
|
+
duration: 0.15,
|
|
53
|
+
ease: "easeOut",
|
|
54
|
+
},
|
|
55
|
+
};
|
|
Binary file
|
|
Binary file
|