@stargazeryan/poker-ui 0.4.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +205 -12
- package/dist/index.cjs +746 -175
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +547 -23
- package/dist/index.d.ts +547 -23
- package/dist/index.js +696 -168
- package/dist/index.js.map +1 -1
- package/package.json +27 -7
- package/src/styles.css +128 -95
package/src/styles.css
CHANGED
|
@@ -9,136 +9,169 @@
|
|
|
9
9
|
* @source "../node_modules/@stargazeryan/poker-ui";
|
|
10
10
|
* @import "@stargazeryan/poker-ui/styles.css";
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
12
|
+
* The `@theme` block below defines the design tokens the components actually
|
|
13
|
+
* consume, plus the keyframe animations they rely on.
|
|
14
|
+
*
|
|
15
|
+
* Theming: every token here is referenced by a component, so overriding one in
|
|
16
|
+
* your own `@theme` block really does restyle the table:
|
|
17
|
+
*
|
|
18
|
+
* @theme {
|
|
19
|
+
* --color-felt: #0b3d2e;
|
|
20
|
+
* --color-gold: #ffcc33;
|
|
21
|
+
* --color-chip-blue: #1d4ed8;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* Tailwind v4 only emits a theme variable that something references, so a token
|
|
25
|
+
* nothing uses never reaches your CSS. That is why there are no unused tokens
|
|
26
|
+
* left in here: anything the components do not draw with was removed rather than
|
|
27
|
+
* left to look themeable.
|
|
14
28
|
*/
|
|
15
29
|
|
|
16
30
|
@theme {
|
|
31
|
+
/* ---- table ---- */
|
|
17
32
|
--color-felt: #0f4d2e;
|
|
18
|
-
--color-felt-light: #
|
|
19
|
-
--color-
|
|
20
|
-
|
|
33
|
+
--color-felt-light: #23804b;
|
|
34
|
+
--color-felt-dark: #093b22;
|
|
35
|
+
|
|
36
|
+
--color-rail: #a5744a;
|
|
37
|
+
--color-rail-dark: #6b3f22;
|
|
38
|
+
--color-rail-deep: #38200f;
|
|
39
|
+
|
|
40
|
+
/* ---- accents ---- */
|
|
41
|
+
--color-gold: #f39c12;
|
|
42
|
+
--color-gold-light: #f0c04a;
|
|
43
|
+
--color-gold-glow: #ffd678;
|
|
44
|
+
|
|
45
|
+
/* ---- card back ---- */
|
|
46
|
+
--color-card-back: #5a0c18;
|
|
47
|
+
--color-card-back-light: #7a1020;
|
|
48
|
+
--color-card-back-dark: #3f0810;
|
|
49
|
+
--color-card-back-ink: #c9a24b;
|
|
50
|
+
--color-card-back-emblem: #f0c04a;
|
|
51
|
+
|
|
52
|
+
/* ---- chip denominations (used by Chip / ChipStack) ---- */
|
|
21
53
|
--color-chip-red: #c0392b;
|
|
22
54
|
--color-chip-blue: #2980b9;
|
|
23
55
|
--color-chip-green: #27ae60;
|
|
24
56
|
--color-chip-black: #1a1a2e;
|
|
25
57
|
--color-chip-white: #ecf0f1;
|
|
26
|
-
--color-gold: #f39c12;
|
|
27
58
|
|
|
28
|
-
|
|
59
|
+
/* ---- animations ---- */
|
|
29
60
|
--animate-card-flip: card-flip 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
30
61
|
--animate-deal-in: deal-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
31
|
-
--animate-bubble-pop: bubble-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
32
62
|
--animate-turn-glow: turn-glow 1.3s ease-in-out infinite;
|
|
33
63
|
--animate-winner-glow: winner-glow 1.6s ease-in-out infinite;
|
|
34
64
|
--animate-felt-shimmer: felt-shimmer 22s linear infinite;
|
|
35
65
|
--animate-spotlight: spotlight-breathe 7s ease-in-out infinite;
|
|
36
66
|
--animate-confetti: confetti 2s ease-in forwards;
|
|
37
|
-
}
|
|
38
67
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
68
|
+
/*
|
|
69
|
+
* Keyframes live inside `@theme` so Tailwind emits each one only when the
|
|
70
|
+
* matching `--animate-*` token is actually used. Keeping them outside shipped
|
|
71
|
+
* all of them to every consumer.
|
|
72
|
+
*/
|
|
73
|
+
@keyframes card-flip {
|
|
74
|
+
0% {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
transform: rotateY(90deg) scale(0.9);
|
|
77
|
+
}
|
|
78
|
+
60% {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
100% {
|
|
82
|
+
opacity: 1;
|
|
83
|
+
transform: rotateY(0deg) scale(1);
|
|
84
|
+
}
|
|
47
85
|
}
|
|
48
|
-
}
|
|
49
86
|
|
|
50
|
-
@keyframes
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
opacity: 1;
|
|
60
|
-
transform: rotateY(0deg) scale(1);
|
|
87
|
+
@keyframes deal-in {
|
|
88
|
+
0% {
|
|
89
|
+
opacity: 0;
|
|
90
|
+
transform: translateY(-18px) scale(0.85) rotate(-6deg);
|
|
91
|
+
}
|
|
92
|
+
100% {
|
|
93
|
+
opacity: 1;
|
|
94
|
+
transform: translateY(0) scale(1) rotate(0deg);
|
|
95
|
+
}
|
|
61
96
|
}
|
|
62
|
-
}
|
|
63
97
|
|
|
64
|
-
@keyframes
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
98
|
+
@keyframes turn-glow {
|
|
99
|
+
0%,
|
|
100
|
+
100% {
|
|
101
|
+
box-shadow:
|
|
102
|
+
0 0 0 3px color-mix(in oklab, var(--color-gold) 50%, transparent),
|
|
103
|
+
0 0 16px color-mix(in oklab, var(--color-gold) 30%, transparent);
|
|
104
|
+
}
|
|
105
|
+
50% {
|
|
106
|
+
box-shadow:
|
|
107
|
+
0 0 0 4px color-mix(in oklab, var(--color-gold) 95%, transparent),
|
|
108
|
+
0 0 34px color-mix(in oklab, var(--color-gold) 70%, transparent);
|
|
109
|
+
}
|
|
72
110
|
}
|
|
73
|
-
}
|
|
74
111
|
|
|
75
|
-
@keyframes
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
112
|
+
@keyframes winner-glow {
|
|
113
|
+
0%,
|
|
114
|
+
100% {
|
|
115
|
+
box-shadow:
|
|
116
|
+
0 0 0 3px color-mix(in oklab, var(--color-gold) 90%, transparent),
|
|
117
|
+
0 0 22px color-mix(in oklab, var(--color-gold) 50%, transparent);
|
|
118
|
+
}
|
|
119
|
+
50% {
|
|
120
|
+
box-shadow:
|
|
121
|
+
0 0 0 4px var(--color-gold),
|
|
122
|
+
0 0 40px color-mix(in oklab, var(--color-gold) 85%, transparent);
|
|
123
|
+
}
|
|
83
124
|
}
|
|
84
|
-
}
|
|
85
125
|
|
|
86
|
-
@keyframes
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
126
|
+
@keyframes felt-shimmer {
|
|
127
|
+
0% {
|
|
128
|
+
background-position: -60% 50%;
|
|
129
|
+
}
|
|
130
|
+
100% {
|
|
131
|
+
background-position: 160% 50%;
|
|
132
|
+
}
|
|
93
133
|
}
|
|
94
|
-
}
|
|
95
134
|
|
|
96
|
-
@keyframes
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
135
|
+
@keyframes spotlight-breathe {
|
|
136
|
+
0%,
|
|
137
|
+
100% {
|
|
138
|
+
opacity: 0.7;
|
|
139
|
+
}
|
|
140
|
+
50% {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
100
143
|
}
|
|
101
|
-
50% {
|
|
102
|
-
box-shadow: 0 0 0 4px rgba(243, 156, 18, 1), 0 0 40px rgba(243, 156, 18, 0.85);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
144
|
|
|
106
|
-
@keyframes
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
@keyframes spotlight-breathe {
|
|
116
|
-
0%,
|
|
117
|
-
100% {
|
|
118
|
-
opacity: 0.7;
|
|
119
|
-
}
|
|
120
|
-
50% {
|
|
121
|
-
opacity: 1;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@keyframes confetti {
|
|
126
|
-
0% {
|
|
127
|
-
opacity: 1;
|
|
128
|
-
transform: translateY(-8px) rotate(0deg);
|
|
129
|
-
}
|
|
130
|
-
100% {
|
|
131
|
-
opacity: 0;
|
|
132
|
-
transform: translateY(280px) rotate(560deg);
|
|
145
|
+
@keyframes confetti {
|
|
146
|
+
0% {
|
|
147
|
+
opacity: 1;
|
|
148
|
+
transform: translateY(-8px) rotate(0deg);
|
|
149
|
+
}
|
|
150
|
+
100% {
|
|
151
|
+
opacity: 0;
|
|
152
|
+
transform: translateY(280px) rotate(560deg);
|
|
153
|
+
}
|
|
133
154
|
}
|
|
134
155
|
}
|
|
135
156
|
|
|
157
|
+
/*
|
|
158
|
+
* Scoped to this package's own animations on purpose.
|
|
159
|
+
*
|
|
160
|
+
* This used to be `*, *::before, *::after { ... !important }`, which reached
|
|
161
|
+
* outside the library and disabled every animation and transition in the host
|
|
162
|
+
* application too. A stylesheet shipped by a component library has no business
|
|
163
|
+
* doing that. Consumers who use these utilities in their own markup are still
|
|
164
|
+
* covered, because the classes are named here.
|
|
165
|
+
*/
|
|
136
166
|
@media (prefers-reduced-motion: reduce) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
167
|
+
.animate-card-flip,
|
|
168
|
+
.animate-deal-in,
|
|
169
|
+
.animate-turn-glow,
|
|
170
|
+
.animate-winner-glow,
|
|
171
|
+
.animate-felt-shimmer,
|
|
172
|
+
.animate-spotlight,
|
|
173
|
+
.animate-confetti {
|
|
140
174
|
animation-duration: 0.01ms !important;
|
|
141
175
|
animation-iteration-count: 1 !important;
|
|
142
|
-
transition-duration: 0.01ms !important;
|
|
143
176
|
}
|
|
144
177
|
}
|