@alulore/kumiko 0.0.0-stage → 0.14.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/dist/badge/badge.css +287 -0
- package/dist/badge/badge.d.ts +40 -0
- package/dist/badge/badge.js +51 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/badge/index.js +1 -0
- package/dist/board/board-api.d.ts +147 -0
- package/dist/board/board-api.js +139 -0
- package/dist/board/board-card-menu.d.ts +17 -0
- package/dist/board/board-card-menu.js +53 -0
- package/dist/board/board-drag-events.d.ts +12 -0
- package/dist/board/board-drag-events.js +86 -0
- package/dist/board/board-fold.d.ts +10 -0
- package/dist/board/board-fold.js +30 -0
- package/dist/board/board-group.d.ts +10 -0
- package/dist/board/board-group.js +28 -0
- package/dist/board/board-keys.d.ts +16 -0
- package/dist/board/board-keys.js +65 -0
- package/dist/board/board-locked-rows.d.ts +23 -0
- package/dist/board/board-locked-rows.js +77 -0
- package/dist/board/board-motion.d.ts +7 -0
- package/dist/board/board-motion.js +102 -0
- package/dist/board/board-primitive.d.ts +53 -0
- package/dist/board/board-primitive.js +66 -0
- package/dist/board/board-pull.d.ts +6 -0
- package/dist/board/board-pull.js +94 -0
- package/dist/board/board-selection.d.ts +42 -0
- package/dist/board/board-selection.js +130 -0
- package/dist/board/board-slots.d.ts +1003 -0
- package/dist/board/board-slots.js +250 -0
- package/dist/board/board-types.d.ts +99 -0
- package/dist/board/board-types.js +1 -0
- package/dist/board/board.css +343 -0
- package/dist/board/board.d.ts +290 -0
- package/dist/board/board.js +23 -0
- package/dist/board/card-menu.d.ts +21 -0
- package/dist/board/card-menu.js +79 -0
- package/dist/board/cell-key.d.ts +6 -0
- package/dist/board/cell-key.js +16 -0
- package/dist/board/index.d.ts +6 -0
- package/dist/board/index.js +5 -0
- package/dist/board/interactive.d.ts +18 -0
- package/dist/board/interactive.js +51 -0
- package/dist/board/keep-capture.d.ts +16 -0
- package/dist/board/keep-capture.js +57 -0
- package/dist/board/landing.d.ts +5 -0
- package/dist/board/landing.js +10 -0
- package/dist/board/press-to-drop.d.ts +9 -0
- package/dist/board/press-to-drop.js +28 -0
- package/dist/board/refused-home.d.ts +16 -0
- package/dist/board/refused-home.js +50 -0
- package/dist/board/repeat-gate.d.ts +4 -0
- package/dist/board/repeat-gate.js +12 -0
- package/dist/board/scrollbar-gutter.d.ts +1 -0
- package/dist/board/scrollbar-gutter.js +27 -0
- package/dist/board/touch-hold.d.ts +19 -0
- package/dist/board/touch-hold.js +103 -0
- package/dist/button/button.css +576 -0
- package/dist/button/button.d.ts +50 -0
- package/dist/button/button.js +70 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +1 -0
- package/dist/checkbox/checkbox-mark.d.ts +8 -0
- package/dist/checkbox/checkbox-mark.js +17 -0
- package/dist/checkbox/checkbox-marks.d.ts +33 -0
- package/dist/checkbox/checkbox-marks.js +30 -0
- package/dist/checkbox/checkbox.css +201 -0
- package/dist/checkbox/checkbox.d.ts +26 -0
- package/dist/checkbox/checkbox.js +11 -0
- package/dist/checkbox/index.d.ts +3 -0
- package/dist/checkbox/index.js +3 -0
- package/dist/chip/chip.css +251 -0
- package/dist/chip/chip.d.ts +39 -0
- package/dist/chip/chip.js +25 -0
- package/dist/chip/index.d.ts +1 -0
- package/dist/chip/index.js +1 -0
- package/dist/dialog/dialog.css +247 -0
- package/dist/dialog/index.d.ts +3 -0
- package/dist/dialog/index.js +3 -0
- package/dist/hover-card/hover-card.css +149 -0
- package/dist/hover-card/hover-card.d.ts +3 -0
- package/dist/hover-card/hover-card.js +8 -0
- package/dist/hover-card/index.d.ts +2 -0
- package/dist/hover-card/index.js +2 -0
- package/dist/input/index.d.ts +5 -0
- package/dist/input/index.js +5 -0
- package/dist/input/input-attributes.d.ts +12 -0
- package/dist/input/input-attributes.js +9 -0
- package/dist/input/input.css +752 -0
- package/dist/input/input.d.ts +28 -0
- package/dist/input/input.js +9 -0
- package/dist/input/search-input.d.ts +41 -0
- package/dist/input/search-input.js +47 -0
- package/dist/kbd/index.d.ts +1 -0
- package/dist/kbd/index.js +1 -0
- package/dist/kbd/kbd.css +77 -0
- package/dist/kbd/kbd.d.ts +21 -0
- package/dist/kbd/kbd.js +37 -0
- package/dist/label/index.d.ts +1 -0
- package/dist/label/index.js +1 -0
- package/dist/label/label.css +37 -0
- package/dist/label/label.d.ts +13 -0
- package/dist/label/label.js +10 -0
- package/dist/menu/index.d.ts +3 -0
- package/dist/menu/index.js +3 -0
- package/dist/menu/menu.css +349 -0
- package/dist/menu/menu.d.ts +11 -0
- package/dist/menu/menu.js +86 -0
- package/dist/menu/point-menu.d.ts +26 -0
- package/dist/menu/point-menu.js +51 -0
- package/dist/motion/flip-math.d.ts +19 -0
- package/dist/motion/flip-math.js +33 -0
- package/dist/motion/flip.d.ts +40 -0
- package/dist/motion/flip.js +203 -0
- package/dist/motion/index.d.ts +2 -0
- package/dist/motion/index.js +2 -0
- package/dist/motion/motion.css +169 -0
- package/dist/popover/index.d.ts +1 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover/popover.css +208 -0
- package/dist/progress/index.d.ts +2 -0
- package/dist/progress/index.js +2 -0
- package/dist/progress/progress.css +390 -0
- package/dist/progress/progress.d.ts +36 -0
- package/dist/progress/progress.js +107 -0
- package/dist/select/index.d.ts +3 -0
- package/dist/select/index.js +2 -0
- package/dist/select/select-labels.d.ts +6 -0
- package/dist/select/select-labels.js +64 -0
- package/dist/select/select-search.d.ts +18 -0
- package/dist/select/select-search.js +10 -0
- package/dist/select/select.css +470 -0
- package/dist/select/select.d.ts +44 -0
- package/dist/select/select.js +92 -0
- package/dist/separator/index.d.ts +2 -0
- package/dist/separator/index.js +1 -0
- package/dist/separator/separator.css +32 -0
- package/dist/separator/separator.d.ts +17 -0
- package/dist/separator/separator.js +10 -0
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +2 -0
- package/dist/slider/slider-bubble.css +203 -0
- package/dist/slider/slider-feel.d.ts +33 -0
- package/dist/slider/slider-feel.js +153 -0
- package/dist/slider/slider-format.d.ts +13 -0
- package/dist/slider/slider-format.js +15 -0
- package/dist/slider/slider-marks.d.ts +16 -0
- package/dist/slider/slider-marks.js +32 -0
- package/dist/slider/slider.css +335 -0
- package/dist/slider/slider.d.ts +34 -0
- package/dist/slider/slider.js +94 -0
- package/dist/smooth-caret/caret-box.d.ts +7 -0
- package/dist/smooth-caret/caret-box.js +8 -0
- package/dist/smooth-caret/caret-controller.d.ts +7 -0
- package/dist/smooth-caret/caret-controller.js +222 -0
- package/dist/smooth-caret/caret-geometry.d.ts +11 -0
- package/dist/smooth-caret/caret-geometry.js +230 -0
- package/dist/smooth-caret/caret-glide.d.ts +13 -0
- package/dist/smooth-caret/caret-glide.js +76 -0
- package/dist/smooth-caret/caret-host.d.ts +5 -0
- package/dist/smooth-caret/caret-host.js +40 -0
- package/dist/smooth-caret/index.d.ts +7 -0
- package/dist/smooth-caret/index.js +7 -0
- package/dist/smooth-caret/remote-carets.d.ts +40 -0
- package/dist/smooth-caret/remote-carets.js +130 -0
- package/dist/smooth-caret/smooth-caret.css +157 -0
- package/dist/smooth-caret/smooth-caret.d.ts +5 -0
- package/dist/smooth-caret/smooth-caret.js +9 -0
- package/dist/smooth-caret/use-smooth-caret.d.ts +5 -0
- package/dist/smooth-caret/use-smooth-caret.js +9 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch/switch-drag.d.ts +21 -0
- package/dist/switch/switch-drag.js +23 -0
- package/dist/switch/switch-gesture.d.ts +28 -0
- package/dist/switch/switch-gesture.js +131 -0
- package/dist/switch/switch.css +189 -0
- package/dist/switch/switch.d.ts +15 -0
- package/dist/switch/switch.js +24 -0
- package/dist/textarea/index.d.ts +2 -0
- package/dist/textarea/index.js +2 -0
- package/dist/textarea/textarea.css +37 -0
- package/dist/textarea/textarea.d.ts +35 -0
- package/dist/textarea/textarea.js +11 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/toast.css +293 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip/tooltip.css +143 -0
- package/dist/tooltip/tooltip.d.ts +14 -0
- package/dist/tooltip/tooltip.js +13 -0
- package/package.json +246 -5
- package/README.md +0 -3
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
@import "../motion/motion.css";
|
|
2
|
+
|
|
3
|
+
@layer kumiko {
|
|
4
|
+
:where(:root) {
|
|
5
|
+
--kumiko-badge-font-family: inherit;
|
|
6
|
+
--kumiko-badge-font-weight: 600;
|
|
7
|
+
--kumiko-badge-height-sm: 1rem;
|
|
8
|
+
--kumiko-badge-height: 1.25rem;
|
|
9
|
+
--kumiko-badge-height-lg: 1.5rem;
|
|
10
|
+
--kumiko-badge-font-size-sm: 0.625rem;
|
|
11
|
+
--kumiko-badge-font-size: 0.75rem;
|
|
12
|
+
--kumiko-badge-font-size-lg: 0.875rem;
|
|
13
|
+
--kumiko-badge-dot-size-sm: 0.375rem;
|
|
14
|
+
--kumiko-badge-dot-size: 0.5rem;
|
|
15
|
+
--kumiko-badge-dot-size-lg: 0.75rem;
|
|
16
|
+
--kumiko-badge-fg: Canvas;
|
|
17
|
+
--kumiko-badge-soft-mix: 16%;
|
|
18
|
+
--kumiko-badge-soft-letter-spacing: 0.06em;
|
|
19
|
+
--kumiko-badge-glow-size: 0.6em;
|
|
20
|
+
--kumiko-badge-glow-mix: 60%;
|
|
21
|
+
--kumiko-badge-bump-scale: 1.35;
|
|
22
|
+
--kumiko-badge-pulse-duration: calc(var(--kumiko-spin-duration) * 3);
|
|
23
|
+
--kumiko-badge-pulse-scale: 0.8;
|
|
24
|
+
--kumiko-badge-neutral: GrayText;
|
|
25
|
+
--kumiko-badge-accent: Highlight;
|
|
26
|
+
--kumiko-badge-info: LinkText;
|
|
27
|
+
--kumiko-badge-success: green;
|
|
28
|
+
--kumiko-badge-warning: Mark;
|
|
29
|
+
--kumiko-badge-danger: red;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-slot="badge"] {
|
|
33
|
+
--_h: var(--kumiko-badge-height);
|
|
34
|
+
--_fs: var(--kumiko-badge-font-size);
|
|
35
|
+
--_dot: var(--kumiko-badge-dot-size);
|
|
36
|
+
--_tone: var(--kumiko-badge-neutral);
|
|
37
|
+
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
flex: none;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
font-family: var(--kumiko-badge-font-family);
|
|
44
|
+
font-size: var(--_fs);
|
|
45
|
+
font-weight: var(--kumiko-badge-font-weight);
|
|
46
|
+
line-height: 1;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
cursor: default;
|
|
49
|
+
user-select: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[data-slot="badge"][data-size="sm"] {
|
|
53
|
+
--_h: var(--kumiko-badge-height-sm);
|
|
54
|
+
--_fs: var(--kumiko-badge-font-size-sm);
|
|
55
|
+
--_dot: var(--kumiko-badge-dot-size-sm);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-slot="badge"][data-size="lg"] {
|
|
59
|
+
--_h: var(--kumiko-badge-height-lg);
|
|
60
|
+
--_fs: var(--kumiko-badge-font-size-lg);
|
|
61
|
+
--_dot: var(--kumiko-badge-dot-size-lg);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[data-slot="badge"][data-tone="accent"] {
|
|
65
|
+
--_tone: var(--kumiko-badge-accent);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-slot="badge"][data-tone="info"] {
|
|
69
|
+
--_tone: var(--kumiko-badge-info);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-slot="badge"][data-tone="success"] {
|
|
73
|
+
--_tone: var(--kumiko-badge-success);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-slot="badge"][data-tone="warning"] {
|
|
77
|
+
--_tone: var(--kumiko-badge-warning);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-slot="badge"][data-tone="danger"] {
|
|
81
|
+
--_tone: var(--kumiko-badge-danger);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* A count is a solid pill with tabular digits. */
|
|
85
|
+
[data-slot="badge"][data-variant="count"] {
|
|
86
|
+
min-inline-size: var(--_h);
|
|
87
|
+
block-size: var(--_h);
|
|
88
|
+
padding-inline: calc(var(--_h) * 0.3);
|
|
89
|
+
border-radius: 999px;
|
|
90
|
+
background: var(--_tone);
|
|
91
|
+
color: var(--kumiko-badge-fg);
|
|
92
|
+
font-variant-numeric: tabular-nums;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* A soft label is a small uppercase pill with a tinted fill. */
|
|
96
|
+
[data-slot="badge"][data-variant="soft"] {
|
|
97
|
+
block-size: var(--_h);
|
|
98
|
+
padding-inline: calc(var(--_h) * 0.5);
|
|
99
|
+
border-radius: 999px;
|
|
100
|
+
background: color-mix(in oklab, var(--_tone) var(--kumiko-badge-soft-mix), transparent);
|
|
101
|
+
color: color-mix(in oklab, var(--_tone) 75%, CanvasText);
|
|
102
|
+
letter-spacing: var(--kumiko-badge-soft-letter-spacing);
|
|
103
|
+
text-transform: uppercase;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-slot="badge"][data-variant="dot"] {
|
|
107
|
+
--_glow: var(--kumiko-badge-glow-size);
|
|
108
|
+
|
|
109
|
+
inline-size: var(--_dot);
|
|
110
|
+
block-size: var(--_dot);
|
|
111
|
+
border-radius: 50%;
|
|
112
|
+
background: var(--_tone);
|
|
113
|
+
box-shadow: 0 0 var(--_glow) calc(var(--_glow) * 0.25)
|
|
114
|
+
color-mix(in oklab, var(--_tone) var(--kumiko-badge-glow-mix), transparent);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* The dot looks. A prop on the badge wins; without one, a word on the badge or any container picks. Glow is the default. */
|
|
118
|
+
[data-slot="badge"][data-variant="dot"]:is(
|
|
119
|
+
[data-dot="flat"],
|
|
120
|
+
:not([data-dot]):is([data-kumiko-badge~="dot-flat"], [data-kumiko-badge~="dot-flat"] *)
|
|
121
|
+
) {
|
|
122
|
+
--_glow: 0px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* A pulse is ambient, so reduced motion and the still preset leave it out. */
|
|
126
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
127
|
+
[data-slot="badge"][data-variant="dot"]:is(
|
|
128
|
+
[data-dot="pulse"],
|
|
129
|
+
:not([data-dot]):is(
|
|
130
|
+
[data-kumiko-badge~="dot-pulse"],
|
|
131
|
+
[data-kumiko-badge~="dot-pulse"] *
|
|
132
|
+
)
|
|
133
|
+
):not([data-kumiko-motion="still"] *) {
|
|
134
|
+
animation: kumiko-badge-pulse var(--kumiko-badge-pulse-duration) ease-in-out infinite;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@keyframes kumiko-badge-pulse {
|
|
139
|
+
50% {
|
|
140
|
+
box-shadow: 0 0 calc(var(--_glow) * 2) var(--_glow)
|
|
141
|
+
color-mix(in oklab, var(--_tone) var(--kumiko-badge-glow-mix), transparent);
|
|
142
|
+
scale: var(--kumiko-badge-pulse-scale);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* The digits sit in a clip one line tall, so a roll shows one number at a time. */
|
|
147
|
+
[data-slot="badge-clip"] {
|
|
148
|
+
display: inline-grid;
|
|
149
|
+
block-size: 1lh;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
[data-slot="badge-value"] {
|
|
153
|
+
display: inline-grid;
|
|
154
|
+
grid-auto-rows: 1lh;
|
|
155
|
+
justify-items: center;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[data-slot="badge-old"] {
|
|
159
|
+
display: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* The count looks. A bump is the default: the digits pop and settle. The motion tokens are zero under the still preset and reduced motion. */
|
|
163
|
+
[data-slot="badge-value"][data-change] {
|
|
164
|
+
animation: kumiko-badge-bump var(--kumiko-settle-duration) var(--kumiko-settle-ease);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@keyframes kumiko-badge-bump {
|
|
168
|
+
40% {
|
|
169
|
+
scale: var(--kumiko-badge-bump-scale);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* None: the number just changes. `no-bump` is an older word for it. */
|
|
174
|
+
[data-slot="badge"]:is(
|
|
175
|
+
[data-motion="none"],
|
|
176
|
+
:not([data-motion]):is(
|
|
177
|
+
[data-kumiko-badge~="count-none"],
|
|
178
|
+
[data-kumiko-badge~="count-none"] *,
|
|
179
|
+
[data-kumiko-badge~="no-bump"],
|
|
180
|
+
[data-kumiko-badge~="no-bump"] *
|
|
181
|
+
)
|
|
182
|
+
)
|
|
183
|
+
[data-slot="badge-value"][data-change] {
|
|
184
|
+
animation: none;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Roll: the old number leaves and the new one arrives, up for an increase and down for a decrease. */
|
|
188
|
+
[data-slot="badge"]:is(
|
|
189
|
+
[data-motion="roll"],
|
|
190
|
+
:not([data-motion]):is(
|
|
191
|
+
[data-kumiko-badge~="count-roll"],
|
|
192
|
+
[data-kumiko-badge~="count-roll"] *
|
|
193
|
+
)
|
|
194
|
+
)
|
|
195
|
+
[data-slot="badge-clip"] {
|
|
196
|
+
overflow: clip;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
[data-slot="badge"]:is(
|
|
200
|
+
[data-motion="roll"],
|
|
201
|
+
:not([data-motion]):is(
|
|
202
|
+
[data-kumiko-badge~="count-roll"],
|
|
203
|
+
[data-kumiko-badge~="count-roll"] *
|
|
204
|
+
)
|
|
205
|
+
)
|
|
206
|
+
[data-slot="badge-old"] {
|
|
207
|
+
display: block;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
[data-slot="badge"]:is(
|
|
211
|
+
[data-motion="roll"],
|
|
212
|
+
:not([data-motion]):is(
|
|
213
|
+
[data-kumiko-badge~="count-roll"],
|
|
214
|
+
[data-kumiko-badge~="count-roll"] *
|
|
215
|
+
)
|
|
216
|
+
)
|
|
217
|
+
[data-slot="badge-value"][data-change="up"] {
|
|
218
|
+
animation: kumiko-badge-roll-up var(--kumiko-move-duration) var(--kumiko-move-ease) both;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[data-slot="badge"]:is(
|
|
222
|
+
[data-motion="roll"],
|
|
223
|
+
:not([data-motion]):is(
|
|
224
|
+
[data-kumiko-badge~="count-roll"],
|
|
225
|
+
[data-kumiko-badge~="count-roll"] *
|
|
226
|
+
)
|
|
227
|
+
)
|
|
228
|
+
[data-slot="badge-value"][data-change="down"] {
|
|
229
|
+
animation: kumiko-badge-roll-down var(--kumiko-move-duration) var(--kumiko-move-ease) both;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
[data-slot="badge"]:is(
|
|
233
|
+
[data-motion="roll"],
|
|
234
|
+
:not([data-motion]):is(
|
|
235
|
+
[data-kumiko-badge~="count-roll"],
|
|
236
|
+
[data-kumiko-badge~="count-roll"] *
|
|
237
|
+
)
|
|
238
|
+
)
|
|
239
|
+
[data-slot="badge-value"][data-change="down"]
|
|
240
|
+
[data-slot="badge-new"] {
|
|
241
|
+
order: -1;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@keyframes kumiko-badge-roll-up {
|
|
245
|
+
from {
|
|
246
|
+
translate: 0 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
to {
|
|
250
|
+
translate: 0 -50%;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
@keyframes kumiko-badge-roll-down {
|
|
255
|
+
from {
|
|
256
|
+
translate: 0 -50%;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
to {
|
|
260
|
+
translate: 0 0;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* Forced colours replace the fills, so every badge keeps an outline on the system palette. */
|
|
265
|
+
@media (forced-colors: active) {
|
|
266
|
+
[data-slot="badge"] {
|
|
267
|
+
border: 1px solid CanvasText;
|
|
268
|
+
background: Canvas;
|
|
269
|
+
color: CanvasText;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
[data-slot="badge"][data-variant="dot"] {
|
|
273
|
+
border: 0;
|
|
274
|
+
background: CanvasText;
|
|
275
|
+
box-shadow: none;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
[data-slot="badge"][data-variant="dot"][data-tone="accent"] {
|
|
279
|
+
background: Highlight;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
[data-slot="badge"][data-variant="count"] {
|
|
283
|
+
background: CanvasText;
|
|
284
|
+
color: Canvas;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** How a badge looks: a number pill, a small round dot, or a small uppercase label. */
|
|
2
|
+
export type BadgeVariant = "count" | "dot" | "soft";
|
|
3
|
+
/** How big a badge is. */
|
|
4
|
+
export type BadgeSize = "sm" | "md" | "lg";
|
|
5
|
+
/** What a badge means, as a colour. */
|
|
6
|
+
export type BadgeTone = "neutral" | "accent" | "info" | "success" | "warning" | "danger";
|
|
7
|
+
/** What a count does when its number changes: pop, roll up or down, or just change. */
|
|
8
|
+
export type BadgeMotion = "bump" | "roll" | "none";
|
|
9
|
+
/** How a dot looks: a soft coloured shadow, no shadow, or a shadow that pulses slowly like a live light. */
|
|
10
|
+
export type BadgeDot = "glow" | "flat" | "pulse";
|
|
11
|
+
export type BadgeProps = Omit<React.ComponentPropsWithoutRef<"span">, "children"> & {
|
|
12
|
+
/** @defaultValue "soft" */
|
|
13
|
+
variant?: BadgeVariant;
|
|
14
|
+
/** @defaultValue "md" */
|
|
15
|
+
size?: BadgeSize;
|
|
16
|
+
/** @defaultValue "neutral" */
|
|
17
|
+
tone?: BadgeTone;
|
|
18
|
+
/** The name of a dot. Without it a dot is hidden from assistive technology. */
|
|
19
|
+
label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* What a count does when its number changes. A roll follows the number: up for more, down for less.
|
|
22
|
+
* Without it, `data-kumiko-badge="count-roll"` or `"count-none"` on any container picks, and the default is a bump.
|
|
23
|
+
* @defaultValue "bump"
|
|
24
|
+
*/
|
|
25
|
+
motion?: BadgeMotion;
|
|
26
|
+
/**
|
|
27
|
+
* How a dot looks. A pulse stops under the still preset and reduced motion.
|
|
28
|
+
* Without it, `data-kumiko-badge="dot-flat"` or `"dot-pulse"` on any container picks, and the default is a glow.
|
|
29
|
+
* @defaultValue "glow"
|
|
30
|
+
*/
|
|
31
|
+
dot?: BadgeDot;
|
|
32
|
+
/** The number or text. A dot shows nothing. */
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* A small label: a count, a dot or a soft label.
|
|
37
|
+
* A dot has no text, so it is hidden from assistive technology unless it has a `label`.
|
|
38
|
+
* `motion` and `dot` pick what a count and a dot do; the same words work on any container.
|
|
39
|
+
*/
|
|
40
|
+
export declare function Badge({ variant, size, tone, label, motion, dot, children, ...props }: BadgeProps): React.JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
/** Remembers the last value, which way a number moved and how many times it changed, and lets the old value go. */
|
|
4
|
+
function useChange(value) {
|
|
5
|
+
const [change, setChange] = useState({
|
|
6
|
+
shown: value,
|
|
7
|
+
previous: undefined,
|
|
8
|
+
direction: "up",
|
|
9
|
+
tick: 0
|
|
10
|
+
});
|
|
11
|
+
if (change.shown === value) {
|
|
12
|
+
return [change, () => setChange({ ...change, previous: undefined })];
|
|
13
|
+
}
|
|
14
|
+
const lower = typeof value === "number" && typeof change.shown === "number" && value < change.shown;
|
|
15
|
+
const next = {
|
|
16
|
+
shown: value,
|
|
17
|
+
previous: change.shown,
|
|
18
|
+
direction: lower ? "down" : "up",
|
|
19
|
+
tick: change.tick + 1
|
|
20
|
+
};
|
|
21
|
+
setChange(next);
|
|
22
|
+
return [next, () => setChange({ ...next, previous: undefined })];
|
|
23
|
+
}
|
|
24
|
+
/** A number or text that moves each time it changes, but not when it first appears. The old value is hidden from screen readers. */
|
|
25
|
+
function Count({ value }) {
|
|
26
|
+
const [change, settle] = useChange(value);
|
|
27
|
+
const old = change.previous;
|
|
28
|
+
return (_jsx("span", { "data-slot": "badge-clip", children: _jsxs("span", { "data-slot": "badge-value", "data-change": old === undefined ? undefined : change.direction, onAnimationEnd: (event) => {
|
|
29
|
+
if (event.target === event.currentTarget) {
|
|
30
|
+
settle();
|
|
31
|
+
}
|
|
32
|
+
}, children: [old === undefined ? null : (_jsx("span", { "data-slot": "badge-old", "aria-hidden": "true", children: old })), _jsx("span", { "data-slot": "badge-new", children: value })] }, change.tick) }));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A small label: a count, a dot or a soft label.
|
|
36
|
+
* A dot has no text, so it is hidden from assistive technology unless it has a `label`.
|
|
37
|
+
* `motion` and `dot` pick what a count and a dot do; the same words work on any container.
|
|
38
|
+
*/
|
|
39
|
+
export function Badge({ variant = "soft", size = "md", tone = "neutral", label, motion, dot, children, ...props }) {
|
|
40
|
+
const common = {
|
|
41
|
+
"data-slot": "badge",
|
|
42
|
+
"data-variant": variant,
|
|
43
|
+
"data-size": size,
|
|
44
|
+
"data-tone": tone
|
|
45
|
+
};
|
|
46
|
+
if (variant === "dot") {
|
|
47
|
+
return (_jsx("span", { ...common, "data-dot": dot, role: label ? "img" : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, ...props }));
|
|
48
|
+
}
|
|
49
|
+
const tracked = typeof children === "number" || typeof children === "string" ? children : undefined;
|
|
50
|
+
return (_jsx("span", { ...common, "data-motion": motion, ...props, children: variant === "count" && tracked !== undefined ? _jsx(Count, { value: tracked }) : children }));
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge, type BadgeDot, type BadgeMotion, type BadgeProps, type BadgeSize, type BadgeTone, type BadgeVariant } from "./badge";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge } from "./badge";
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { type PrimitiveContext } from "@ui-sdk/core";
|
|
2
|
+
import type { BoardOptions, BoardState } from "./board-types";
|
|
3
|
+
type BoardContext = PrimitiveContext<BoardOptions, BoardState, string>;
|
|
4
|
+
type Allows = (card: string, cell: string) => boolean;
|
|
5
|
+
export declare function createBoardApi(context: BoardContext): {
|
|
6
|
+
lanes: {
|
|
7
|
+
bind(el: HTMLElement, part: {
|
|
8
|
+
key: string;
|
|
9
|
+
props: any;
|
|
10
|
+
}): () => void;
|
|
11
|
+
order(state: BoardState): string[];
|
|
12
|
+
moving(state: BoardState, key: string): boolean;
|
|
13
|
+
dragging(state: BoardState, key: string): boolean;
|
|
14
|
+
keydown(event: KeyboardEvent, key: string): boolean;
|
|
15
|
+
pointerdown: (event: PointerEvent, key: string) => void;
|
|
16
|
+
grab: (key: string) => boolean;
|
|
17
|
+
moveTo: (index: number) => void;
|
|
18
|
+
drop: (event?: Event) => void;
|
|
19
|
+
cancel: () => void;
|
|
20
|
+
move(key: string, index: number): boolean;
|
|
21
|
+
};
|
|
22
|
+
rows: {
|
|
23
|
+
bind(el: HTMLElement, part: {
|
|
24
|
+
key: string;
|
|
25
|
+
props: any;
|
|
26
|
+
}): () => void;
|
|
27
|
+
moving(state: BoardState, key: string): boolean;
|
|
28
|
+
dragging(state: BoardState, key: string): boolean;
|
|
29
|
+
keydown(event: KeyboardEvent, key: string): boolean;
|
|
30
|
+
pointerdown: (event: PointerEvent, key: string) => void;
|
|
31
|
+
grab: (key: string) => boolean;
|
|
32
|
+
moveTo: (index: number) => void;
|
|
33
|
+
drop: (event?: Event) => void;
|
|
34
|
+
cancel: () => void;
|
|
35
|
+
move(key: string, index: number): boolean;
|
|
36
|
+
order: (state: BoardState) => string[];
|
|
37
|
+
};
|
|
38
|
+
pull: {
|
|
39
|
+
lanes: (event: PointerEvent, key: string, pressed: HTMLElement) => void;
|
|
40
|
+
rows: (event: PointerEvent, key: string, pressed: HTMLElement) => void;
|
|
41
|
+
};
|
|
42
|
+
transfer: {
|
|
43
|
+
bindList(el: HTMLElement, list: string): () => void;
|
|
44
|
+
bindItem(el: HTMLElement, key: string): () => void;
|
|
45
|
+
lists(state: BoardState): import("@ui-sdk/core").TransferLists;
|
|
46
|
+
moving(state: BoardState, key: string): boolean;
|
|
47
|
+
dragging(state: BoardState, key: string): boolean;
|
|
48
|
+
keydown(event: KeyboardEvent, key: string): boolean;
|
|
49
|
+
pointerdown: (event: PointerEvent, key: string) => void;
|
|
50
|
+
grab: (key: string) => boolean;
|
|
51
|
+
moveTo: (list: string, index: number) => boolean;
|
|
52
|
+
drop: (event?: Event) => void;
|
|
53
|
+
cancel: () => void;
|
|
54
|
+
move(key: string, list: string, index: number): boolean;
|
|
55
|
+
};
|
|
56
|
+
handleRepeat: (event: {
|
|
57
|
+
repeat: boolean;
|
|
58
|
+
}) => boolean;
|
|
59
|
+
capture: {
|
|
60
|
+
pressed(event: PointerEvent, key: string): void;
|
|
61
|
+
mounted(el: HTMLElement, key: string): void;
|
|
62
|
+
};
|
|
63
|
+
keepFocus: (el: HTMLElement, key: string) => (() => void);
|
|
64
|
+
allows: Allows;
|
|
65
|
+
hold: {
|
|
66
|
+
press(event: PointerEvent, el: HTMLElement, start: () => void, rest?: (event: PointerEvent) => void): void;
|
|
67
|
+
release: () => void;
|
|
68
|
+
guard(el: HTMLElement): () => void;
|
|
69
|
+
};
|
|
70
|
+
grouping: {
|
|
71
|
+
groupIn: (state: BoardState, card: string) => string[];
|
|
72
|
+
groupOf: (card: string) => string[];
|
|
73
|
+
menuGroup: (card: string) => string[];
|
|
74
|
+
carried: (state: BoardState, card: string) => boolean;
|
|
75
|
+
};
|
|
76
|
+
cardMenu: {
|
|
77
|
+
pressed(): void;
|
|
78
|
+
keydown(event: KeyboardEvent): void;
|
|
79
|
+
contextmenu(event: MouseEvent, card: string, el: HTMLElement): void;
|
|
80
|
+
rest(event: PointerEvent, card: string, el: HTMLElement): void;
|
|
81
|
+
consumeClick(): boolean;
|
|
82
|
+
};
|
|
83
|
+
selection: {
|
|
84
|
+
model: {
|
|
85
|
+
isSelected: (key: string) => boolean;
|
|
86
|
+
choose: (key: string, why: {
|
|
87
|
+
reason: import("./board-types").SelectReason;
|
|
88
|
+
event?: Event;
|
|
89
|
+
}) => void;
|
|
90
|
+
toggle(key: string, why: {
|
|
91
|
+
reason: import("./board-types").SelectReason;
|
|
92
|
+
event?: Event;
|
|
93
|
+
}): void;
|
|
94
|
+
extend(key: string, why: {
|
|
95
|
+
reason: import("./board-types").SelectReason;
|
|
96
|
+
event?: Event;
|
|
97
|
+
} & {
|
|
98
|
+
from?: string | null;
|
|
99
|
+
additive?: boolean;
|
|
100
|
+
}): void;
|
|
101
|
+
toggleAll(why: {
|
|
102
|
+
reason: import("./board-types").SelectReason;
|
|
103
|
+
event?: Event;
|
|
104
|
+
}): void;
|
|
105
|
+
anchor: () => string | null;
|
|
106
|
+
};
|
|
107
|
+
pointerdown: (el: HTMLElement | undefined, count: number) => void;
|
|
108
|
+
click(event: MouseEvent, key: string): void;
|
|
109
|
+
clickAway: (event: MouseEvent) => void;
|
|
110
|
+
keydown: (event: KeyboardEvent, key: string) => boolean;
|
|
111
|
+
};
|
|
112
|
+
arrowMove: (event: KeyboardEvent, el: HTMLElement | null) => boolean;
|
|
113
|
+
fold: {
|
|
114
|
+
isFolded: (state: BoardState, row: string) => boolean;
|
|
115
|
+
toggle(row: string, event: Event): void;
|
|
116
|
+
};
|
|
117
|
+
isLocked: (card: string) => boolean;
|
|
118
|
+
isRowLocked: (row: string) => boolean;
|
|
119
|
+
roving: {
|
|
120
|
+
bind(el: HTMLElement, part: import("@ui-sdk/core").RovingFocusItem<{
|
|
121
|
+
value: string;
|
|
122
|
+
}>): () => void;
|
|
123
|
+
tabIndex(state: BoardState, part: import("@ui-sdk/core").RovingFocusItem<{
|
|
124
|
+
value: string;
|
|
125
|
+
}>): "0" | "-1";
|
|
126
|
+
keydown(event: KeyboardEvent, el: HTMLElement): {
|
|
127
|
+
key: string;
|
|
128
|
+
from: string;
|
|
129
|
+
shift: boolean;
|
|
130
|
+
} | undefined;
|
|
131
|
+
items: () => {
|
|
132
|
+
key: string;
|
|
133
|
+
props: {
|
|
134
|
+
value: string;
|
|
135
|
+
};
|
|
136
|
+
el: HTMLElement;
|
|
137
|
+
}[];
|
|
138
|
+
focus(itemKey?: string): void;
|
|
139
|
+
remember(itemKey: string): void;
|
|
140
|
+
check: () => void;
|
|
141
|
+
stopFor: (preferred: (item: import("@ui-sdk/core").RovingFocusItem<{
|
|
142
|
+
value: string;
|
|
143
|
+
}>) => boolean) => string | undefined;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export type BoardApi = ReturnType<typeof createBoardApi>;
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { createChange, createReorder, createRovingFocus, createTransfer, spatialMove, transferMessage } from "@ui-sdk/core";
|
|
2
|
+
import { cardMenuEvents } from "./board-card-menu";
|
|
3
|
+
import { trackCardDrags, trackReorderDrags } from "./board-drag-events";
|
|
4
|
+
import { createFold, inFoldedRow } from "./board-fold";
|
|
5
|
+
import { moveGroup } from "./board-group";
|
|
6
|
+
import { arrowPlace, isArrow } from "./board-keys";
|
|
7
|
+
import { keepLockedPlaces, keepRowsLocked, shownRows } from "./board-locked-rows";
|
|
8
|
+
import { createPull } from "./board-pull";
|
|
9
|
+
import { createBoardSelection, createGrouping } from "./board-selection";
|
|
10
|
+
import { cellOrder, cellParts } from "./cell-key";
|
|
11
|
+
import { keepCapture, keepFocus } from "./keep-capture";
|
|
12
|
+
import { repeatGate } from "./repeat-gate";
|
|
13
|
+
import { createTouchHold } from "./touch-hold";
|
|
14
|
+
function allowing(context, grouping) {
|
|
15
|
+
return (card, cell) => !inFoldedRow(context.store.get(), cell) &&
|
|
16
|
+
(context.options().accepts?.(card, cell, grouping.groupOf(card)) ?? true);
|
|
17
|
+
}
|
|
18
|
+
function cardTransfer(context, change, grouping, drags, allows) {
|
|
19
|
+
const options = () => context.options();
|
|
20
|
+
return createTransfer(context, {
|
|
21
|
+
key: "cells",
|
|
22
|
+
draft: "moving",
|
|
23
|
+
order: () => cellOrder(context.store.get().lanes, context.store.get().rows),
|
|
24
|
+
set: (value, details) => {
|
|
25
|
+
const cards = grouping.groupOf(details.key);
|
|
26
|
+
const moved = change("cells", moveGroup(value, details.key, cards), {
|
|
27
|
+
...details,
|
|
28
|
+
cards
|
|
29
|
+
});
|
|
30
|
+
if (moved) {
|
|
31
|
+
drags.landedIn(details.to);
|
|
32
|
+
}
|
|
33
|
+
if (moved && context.store.get().selected.length > 0) {
|
|
34
|
+
change("selected", [], { reason: "move", event: details.event });
|
|
35
|
+
}
|
|
36
|
+
return moved;
|
|
37
|
+
},
|
|
38
|
+
accepts: allows,
|
|
39
|
+
disabled: (card) => options().locked?.(card) ?? false,
|
|
40
|
+
label: (card) => options().cardLabel?.(card),
|
|
41
|
+
listLabel: (cell) => options().cellLabel?.(cell) ?? cellParts(cell).lane,
|
|
42
|
+
message: (message) => transferMessage({
|
|
43
|
+
...message,
|
|
44
|
+
list: options().cellLabel?.(message.list) ?? message.list
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function arrowMover(context, transfer, allows) {
|
|
49
|
+
const gate = repeatGate();
|
|
50
|
+
return (event, el) => {
|
|
51
|
+
const state = context.store.get();
|
|
52
|
+
if (!state.moving || state.moving.pointer || !isArrow(event.key)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
if (!gate(event)) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
const place = arrowPlace({
|
|
60
|
+
lanes: state.lanes,
|
|
61
|
+
rows: state.rows,
|
|
62
|
+
lists: state.moving.lists,
|
|
63
|
+
card: state.moving.key,
|
|
64
|
+
key: event.key,
|
|
65
|
+
rtl: el ? getComputedStyle(el).direction === "rtl" : false,
|
|
66
|
+
accepts: allows
|
|
67
|
+
});
|
|
68
|
+
if (place) {
|
|
69
|
+
transfer.moveTo(place.cell, place.index);
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function rowReorder(context, change, reordered) {
|
|
75
|
+
const locked = (row) => context.options().rowLocked?.(row) ?? false;
|
|
76
|
+
const reorder = createReorder(context, {
|
|
77
|
+
slot: "row",
|
|
78
|
+
key: "rows",
|
|
79
|
+
draft: "rowDraft",
|
|
80
|
+
disabled: (row) => locked(row.key),
|
|
81
|
+
set: (value, details) => {
|
|
82
|
+
const placed = keepLockedPlaces(context.store.get().rows, value, locked);
|
|
83
|
+
return (placed.join(",") !== context.store.get().rows.join(",") &&
|
|
84
|
+
reordered.moved("rows", change("rows", placed, details)));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
keepRowsLocked(context);
|
|
88
|
+
return {
|
|
89
|
+
reorder,
|
|
90
|
+
locked,
|
|
91
|
+
shown: {
|
|
92
|
+
...reorder,
|
|
93
|
+
order: (state) => shownRows(state, reorder.order(state), locked)
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export function createBoardApi(context) {
|
|
98
|
+
const hold = createTouchHold();
|
|
99
|
+
const change = createChange(context);
|
|
100
|
+
const grouping = createGrouping(context);
|
|
101
|
+
const drags = trackCardDrags(context, grouping.groupIn);
|
|
102
|
+
const reordered = trackReorderDrags(context);
|
|
103
|
+
const allows = allowing(context, grouping);
|
|
104
|
+
const transfer = cardTransfer(context, change, grouping, drags, allows);
|
|
105
|
+
const lanes = createReorder(context, {
|
|
106
|
+
slot: "lane",
|
|
107
|
+
key: "lanes",
|
|
108
|
+
draft: "laneDraft",
|
|
109
|
+
orientation: () => "horizontal",
|
|
110
|
+
set: (value, details) => reordered.moved("lanes", change("lanes", value, details))
|
|
111
|
+
});
|
|
112
|
+
const rows = rowReorder(context, change, reordered);
|
|
113
|
+
return {
|
|
114
|
+
lanes,
|
|
115
|
+
rows: rows.shown,
|
|
116
|
+
pull: {
|
|
117
|
+
lanes: createPull(context, lanes, "lanes"),
|
|
118
|
+
rows: createPull(context, rows.reorder, "rows")
|
|
119
|
+
},
|
|
120
|
+
transfer,
|
|
121
|
+
handleRepeat: repeatGate(),
|
|
122
|
+
capture: keepCapture(),
|
|
123
|
+
keepFocus: keepFocus(),
|
|
124
|
+
allows,
|
|
125
|
+
hold,
|
|
126
|
+
grouping,
|
|
127
|
+
cardMenu: cardMenuEvents(context, grouping.menuGroup),
|
|
128
|
+
selection: createBoardSelection(context, change),
|
|
129
|
+
arrowMove: arrowMover(context, transfer, allows),
|
|
130
|
+
fold: createFold(context, change),
|
|
131
|
+
isLocked: (card) => context.options().locked?.(card) ?? false,
|
|
132
|
+
isRowLocked: rows.locked,
|
|
133
|
+
roving: createRovingFocus(context, {
|
|
134
|
+
slot: "card",
|
|
135
|
+
key: "focused",
|
|
136
|
+
move: spatialMove()
|
|
137
|
+
})
|
|
138
|
+
};
|
|
139
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PrimitiveContext } from "@ui-sdk/core";
|
|
2
|
+
import type { BoardOptions, BoardState } from "./board-types";
|
|
3
|
+
type BoardContext = PrimitiveContext<BoardOptions, BoardState, string>;
|
|
4
|
+
/**
|
|
5
|
+
* A card's menu: a right-click or the context-menu key opens it, and so does a finger or
|
|
6
|
+
* pen let go on a lifted card without moving it. The browser's own menu stays for boards
|
|
7
|
+
* without `onCardMenu` and for controls inside a card, like a text field's spelling menu.
|
|
8
|
+
*/
|
|
9
|
+
export declare function cardMenuEvents(context: BoardContext, groupOf: (card: string) => string[]): {
|
|
10
|
+
pressed(): void;
|
|
11
|
+
keydown(event: KeyboardEvent): void;
|
|
12
|
+
contextmenu(event: MouseEvent, card: string, el: HTMLElement): void;
|
|
13
|
+
/** A held finger or pen let go without moving. Its tap's click must not clear the selection. */
|
|
14
|
+
rest(event: PointerEvent, card: string, el: HTMLElement): void;
|
|
15
|
+
consumeClick(): boolean;
|
|
16
|
+
};
|
|
17
|
+
export {};
|