reflex-reactbits 0.1.1__py3-none-any.whl

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.
@@ -0,0 +1,2336 @@
1
+ """React Bits - Micro interactions.
2
+
3
+ AUTO-GENERATED by scripts/generate_wrappers.py - do not edit by hand.
4
+ """
5
+
6
+ # ruff: noqa: E501
7
+ from __future__ import annotations
8
+
9
+ from typing import Any, Literal
10
+
11
+ import reflex as rx
12
+ from reflex.event import no_args_event_spec
13
+ from reflex_base.components.component import field
14
+
15
+ from .base import ReactBitsComponent, safe
16
+
17
+ __all__ = ['BellToggle', 'BranchedMenu', 'CallChip', 'CodeSlots', 'CometDial', 'DodgeField', 'FolderFloat', 'FuseButton', 'GlideSelect', 'HoldButton', 'JellyRadio', 'LatticeLoader', 'PeekRating', 'PromptBar', 'PulseHeart', 'RefineFrame', 'RubberSegment', 'ScrubField', 'SlideCommit', 'SlingButton', 'SloshGauge', 'SpringCheck', 'SquishSwitch', 'StatusMark', 'SwipeRow', 'SwipeToast', 'ThoughtLine', 'VoicePill', 'WakeSlider', 'WarmTooltip', 'WarmTooltipGroup', 'bell_toggle', 'branched_menu', 'call_chip', 'code_slots', 'comet_dial', 'dodge_field', 'folder_float', 'fuse_button', 'glide_select', 'hold_button', 'jelly_radio', 'lattice_loader', 'peek_rating', 'prompt_bar', 'pulse_heart', 'refine_frame', 'rubber_segment', 'scrub_field', 'slide_commit', 'sling_button', 'slosh_gauge', 'spring_check', 'squish_switch', 'status_mark', 'swipe_row', 'swipe_toast', 'thought_line', 'voice_pill', 'wake_slider', 'warm_tooltip', 'warm_tooltip_group']
18
+
19
+
20
+ class BellToggle(ReactBitsComponent):
21
+ """Pill toggle that answers a press at three tempos: the bell rings on damped keyframes, the label blur-crossfades, and the pill unfurls to the longer label through a clip-path on a critically damped spring. The pressed state is the receipt.
22
+
23
+ Docs: https://reactbits.dev/micro/bell-toggle
24
+ """
25
+
26
+ tag = "BellToggle"
27
+ alias = "ReactBitsBellToggle"
28
+ is_default = True
29
+ _rb_category = "Micro"
30
+ _rb_name = "BellToggle"
31
+ _rb_files = ('BellToggle.css', 'BellToggle.jsx')
32
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
33
+
34
+ off_label: rx.Var[str] = field(
35
+ doc="The face at rest. Its width sets how far the pill is clipped. Default: 'Notify me'."
36
+ )
37
+ on_label: rx.Var[str] = field(
38
+ doc="The face after the yes press. The pill reserves the width of the longer label; only the visible part changes, so neighbours never shift. Default: \"You'll be notified\"."
39
+ )
40
+ icon: rx.Var[rx.Component | str] = field(
41
+ doc="Replaces the bell. Adjust ringPivot for a glyph that hangs elsewhere."
42
+ )
43
+ label: rx.Var[str] = field(
44
+ doc="Constant accessible name. Falls back to offLabel."
45
+ )
46
+ color: rx.Var[str] = field(
47
+ doc="Ink at rest: label, bell and hover tint. Default: '#f5f5f5'."
48
+ )
49
+ background: rx.Var[str] = field(
50
+ doc="Pill fill at rest. Default: '#27272a'."
51
+ )
52
+ on_color: rx.Var[str] = field(
53
+ doc="Ink when pressed. Default: '#18181b'."
54
+ )
55
+ on_background: rx.Var[str] = field(
56
+ doc="Fill when pressed. Default: '#f5f5f5'."
57
+ )
58
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
59
+ doc="36, 44 or 52 pixels tall with matching type, icon and padding. Default: 'md'."
60
+ )
61
+ radius: rx.Var[int | float] = field(
62
+ doc="Corner radius of the pill and of the clip cap. Default: 22."
63
+ )
64
+ ring_amplitude: rx.Var[int | float] = field(
65
+ doc="Degrees of the first swing. Every later swing scales from it. Default: 17."
66
+ )
67
+ ring_passes: rx.Var[int | float] = field(
68
+ doc="Half-swings before rest. 2 is a nod, 9 a peal. Default: 5."
69
+ )
70
+ ring_decay: rx.Var[int | float] = field(
71
+ doc="How fast the swings die. 1 evenly, 2 the second is already small, 0.5 keeps shaking. Default: 1."
72
+ )
73
+ ring_duration: rx.Var[int | float] = field(
74
+ doc="Milliseconds for the whole ring. Default: 820."
75
+ )
76
+ ring_pivot: rx.Var[int | float] = field(
77
+ doc="Where the icon hangs from, as a percentage of its height. 16 is the crown, 50 the centre. Default: 16."
78
+ )
79
+ crossfade_ms: rx.Var[int | float] = field(
80
+ doc="The label and fill crossfade. Also all a keyboard toggle gets. Default: 200."
81
+ )
82
+ reveal_bounce: rx.Var[int | float] = field(
83
+ doc="Overshoot of the unfurl. 0 is critically damped; 0.2 lets the cap pass its mark and return. Default: 0."
84
+ )
85
+ count: rx.Var[int | float] = field(
86
+ doc="Notifications waiting. A rise while on rolls the badge and wobbles the bell. Default: 0."
87
+ )
88
+ badge: rx.Var[bool] = field(
89
+ doc="Show the count on the bell while on. Default: true."
90
+ )
91
+ badge_color: rx.Var[str] = field(
92
+ doc="The badge. Default: '#ef4444'."
93
+ )
94
+ badge_text_color: rx.Var[str] = field(
95
+ doc="The count on the badge. Default: '#ffffff'."
96
+ )
97
+ waves: rx.Var[bool] = field(
98
+ doc="Sound waves leave the rim on every swing. Default: true."
99
+ )
100
+ clapper: rx.Var[bool] = field(
101
+ doc="Draw a bell with a clapper that swings a beat behind the body. Default: false."
102
+ )
103
+ pressed: rx.Var[bool] = field(
104
+ doc="Controlled state. Outside changes only crossfade."
105
+ )
106
+ default_pressed: rx.Var[bool] = field(
107
+ doc="Initial state when uncontrolled. Default: false."
108
+ )
109
+ disabled: rx.Var[bool] = field(
110
+ doc="Dims the pill and ignores input. The state is kept. Default: false."
111
+ )
112
+ on_change: rx.EventHandler[lambda checked: [safe(checked)]] = field(
113
+ doc="Called on every toggle. Handler receives: checked."
114
+ )
115
+
116
+
117
+ class BranchedMenu(ReactBitsComponent):
118
+ """Collapsible menu whose sections unfold into a trunk with a curved branch to each child, and an accent line that travels down the trunk and around the curve to whatever you pick, while a marker glides to the open section.
119
+
120
+ Docs: https://reactbits.dev/micro/branched-menu
121
+ """
122
+
123
+ tag = "BranchedMenu"
124
+ alias = "ReactBitsBranchedMenu"
125
+ is_default = True
126
+ _rb_category = "Micro"
127
+ _rb_name = "BranchedMenu"
128
+ _rb_files = ('BranchedMenu.css', 'BranchedMenu.jsx')
129
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10']
130
+
131
+ items: rx.Var[list[Any]] = field(
132
+ doc="Sections: label plus children (value, label, icon), or a leaf with a value. A section with children folds; a leaf selects. Default: DEFAULT_ITEMS."
133
+ )
134
+ default_open: rx.Var[int | float | list[int | float]] = field(
135
+ doc="The section, or sections, open at first. -1 for none. Default: 0."
136
+ )
137
+ default_active: rx.Var[str] = field(
138
+ doc="Value selected at first. Empty picks the open section's first child."
139
+ )
140
+ color: rx.Var[str] = field(
141
+ doc="The ink. Lines and idle text are mixes of it. Default: '#f5f5f5'."
142
+ )
143
+ accent_color: rx.Var[str] = field(
144
+ doc="The active line, the active label and the marker. Default: '#f5f5f5'."
145
+ )
146
+ line_color: rx.Var[str] = field(
147
+ doc="The rail, trunk and branches. A solid colour, so joints never darken. Default: '#3f3f46'."
148
+ )
149
+ width: rx.Var[int | float] = field(
150
+ doc="The widest the menu may be, in px. It shrinks to its content. Default: 240."
151
+ )
152
+ row_height: rx.Var[int | float] = field(
153
+ doc="Height of a child row in px. Default: 36."
154
+ )
155
+ indent: rx.Var[int | float] = field(
156
+ doc="Where child rows start, in px. Branches end just before it. Default: 40."
157
+ )
158
+ trunk: rx.Var[int | float] = field(
159
+ doc="The trunk line's x position, in px. Default: 14."
160
+ )
161
+ radius: rx.Var[int | float] = field(
162
+ doc="The curve of each branch, in px. Default: 10."
163
+ )
164
+ line_width: rx.Var[int | float] = field(
165
+ doc="Stroke width of the lines. Default: 1.5."
166
+ )
167
+ font_size: rx.Var[int | float] = field(
168
+ doc="Child text size in px. Headers are 1px larger. Default: 14."
169
+ )
170
+ draw_duration: rx.Var[int | float] = field(
171
+ doc="The accent line's travel, in ms. Default: 400."
172
+ )
173
+ fold_duration: rx.Var[int | float] = field(
174
+ doc="A section's fold and unfold, in ms. Default: 300."
175
+ )
176
+ on_select: rx.EventHandler[lambda value, item: [safe(value), safe(item)]] = field(
177
+ doc="A child or a leaf was picked. Handler receives: value, item."
178
+ )
179
+ on_toggle: rx.EventHandler[lambda index, open: [safe(index), safe(open)]] = field(
180
+ doc="A section folded or unfolded. Handler receives: index, open."
181
+ )
182
+
183
+
184
+ class CallChip(ReactBitsComponent):
185
+ """Inline tool-call chip whose fill wipes across while a live ms counter ticks, completing with a green wash on success or stopping short and shaking red with a retry glyph on error.
186
+
187
+ Docs: https://reactbits.dev/micro/call-chip
188
+ """
189
+
190
+ tag = "CallChip"
191
+ alias = "ReactBitsCallChip"
192
+ is_default = True
193
+ _rb_category = "Micro"
194
+ _rb_name = "CallChip"
195
+ _rb_files = ('CallChip.css', 'CallChip.jsx')
196
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10']
197
+
198
+ icon: rx.Var[rx.Component | str] = field(
199
+ doc="The tool glyph. It rolls out when the call resolves. Default: 'terminal'."
200
+ )
201
+ name: rx.Var[str] = field(
202
+ doc="The tool name. Default: 'bash'."
203
+ )
204
+ argument: rx.Var[str] = field(
205
+ doc="The argument. Default: 'npm test'."
206
+ )
207
+ status: rx.Var[Literal["idle", "running", "done", "error"]] = field(
208
+ doc="Running wipes the fill across and ticks the counter. Done completes it with a wash. Error stops it, tints and shakes. Default: 'running'."
209
+ )
210
+ expected_ms: rx.Var[int | float] = field(
211
+ doc="Milliseconds the fill takes to reach its 90% park, the time you expect the call to take. Default: 2500."
212
+ )
213
+ size: rx.Var[int | float] = field(
214
+ doc="Chip height in pixels. Font, padding and glyph follow. Default: 34."
215
+ )
216
+ radius: rx.Var[int | float] = field(
217
+ doc="Corner radius in pixels. Half the height is a pill. Default: 10."
218
+ )
219
+ color: rx.Var[str] = field(
220
+ doc="Ink for the text and the tool glyph. Default: 'currentColor'."
221
+ )
222
+ surface_color: rx.Var[str] = field(
223
+ doc="The chip surface. Default: '#27272a'."
224
+ )
225
+ progress_color: rx.Var[str] = field(
226
+ doc="The fill that wipes across while running. Default: 'currentColor'."
227
+ )
228
+ progress_opacity: rx.Var[int | float] = field(
229
+ doc="How strong that fill is. Default: 0.08."
230
+ )
231
+ done_color: rx.Var[str] = field(
232
+ doc="The success wash and the check. Default: '#22c55e'."
233
+ )
234
+ error_color: rx.Var[str] = field(
235
+ doc="The stopped fill and the retry glyph on error. Default: '#ef4444'."
236
+ )
237
+ wash_opacity: rx.Var[int | float] = field(
238
+ doc="Strength of the success wash and of the error tint. Default: 0.14."
239
+ )
240
+ shake: rx.Var[int | float] = field(
241
+ doc="Error shake amplitude in pixels. 0 tints only. Default: 6."
242
+ )
243
+ show_timer: rx.Var[bool] = field(
244
+ doc="Shows the millisecond counter. Default: true."
245
+ )
246
+ on_retry: rx.EventHandler[no_args_event_spec] = field(
247
+ doc="When set, the failed chip becomes a retry button."
248
+ )
249
+
250
+
251
+ class CodeSlots(ReactBitsComponent):
252
+ """One-time-code input where a hidden overlay input owns focus, paste and SMS autofill while each slot lands its digit on one spring: the fill swells from the centre, the digit rises and the caret glides; a wrong code drains the slots in a cascade, a right one merges them into a single accent wash.
253
+
254
+ Docs: https://reactbits.dev/micro/code-slots
255
+ """
256
+
257
+ tag = "CodeSlots"
258
+ alias = "ReactBitsCodeSlots"
259
+ is_default = True
260
+ _rb_category = "Micro"
261
+ _rb_name = "CodeSlots"
262
+ _rb_files = ('CodeSlots.css', 'CodeSlots.jsx')
263
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
264
+
265
+ length: rx.Var[int | float] = field(
266
+ doc="Number of slots. Default: 6."
267
+ )
268
+ value: rx.Var[str] = field(
269
+ doc="Controlled code. Digits that arrive from outside land with the cascade; digits removed drain."
270
+ )
271
+ default_value: rx.Var[str] = field(
272
+ doc="Uncontrolled initial code, rendered already landed."
273
+ )
274
+ status: rx.Var[Literal["idle", "error", "success"]] = field(
275
+ doc="error drains the slots last to first under the danger tint and clears the code; success merges the fills into one wash and locks the input. Default: 'idle'."
276
+ )
277
+ mask: rx.Var[bool] = field(
278
+ doc="Shows a dot instead of each digit. Default: false."
279
+ )
280
+ caret: rx.Var[bool] = field(
281
+ doc="Shows the blinking caret in the active slot. Default: true."
282
+ )
283
+ disabled: rx.Var[bool] = field(
284
+ doc="Fades the row and ignores input. Default: false."
285
+ )
286
+ auto_focus: rx.Var[bool] = field(
287
+ doc="Focuses the input on mount. Default: false."
288
+ )
289
+ accent_color: rx.Var[str] = field(
290
+ doc="Fill of a landed digit, the active ring and the success wash. Default: '#f5f5f5'."
291
+ )
292
+ ink_color: rx.Var[str] = field(
293
+ doc="Caret, and the tint of the active slot. Default: '#f5f5f5'."
294
+ )
295
+ slot_color: rx.Var[str] = field(
296
+ doc="Surface of an empty slot. Default: '#27272a'."
297
+ )
298
+ digit_color: rx.Var[str] = field(
299
+ doc="Digit colour on the fill. Default: '#18181b'."
300
+ )
301
+ danger_color: rx.Var[str] = field(
302
+ doc="Ring and fill colour while status is error. Default: '#ff3b30'."
303
+ )
304
+ slot_size: rx.Var[int | float] = field(
305
+ doc="Slot width in pixels. Height and digit size follow it. Default: 44."
306
+ )
307
+ gap: rx.Var[int | float] = field(
308
+ doc="Space between slots in pixels. Default: 8."
309
+ )
310
+ radius: rx.Var[int | float] = field(
311
+ doc="Corner radius in pixels, capped at half the slot size. Default: 12."
312
+ )
313
+ bounce: rx.Var[int | float] = field(
314
+ doc="Spring overshoot of the landing fill. 0 is critically damped. Default: 0.2."
315
+ )
316
+ settle: rx.Var[int | float] = field(
317
+ doc="Seconds a digit takes to land or drain. Default: 0.3."
318
+ )
319
+ rise: rx.Var[int | float] = field(
320
+ doc="Pixels a digit rises into place. 0 fades only. Default: 8."
321
+ )
322
+ cascade: rx.Var[int | float] = field(
323
+ doc="Milliseconds between slots when several land at once or drain on reject. Default: 20."
324
+ )
325
+ aria_label: rx.Var[str] = field(
326
+ doc="Accessible name of the input. Default: 'One-time code'."
327
+ )
328
+ on_change: rx.EventHandler[lambda code: [safe(code)]] = field(
329
+ doc="Called on every edit, including the clear at the end of a reject. Handler receives: code."
330
+ )
331
+ on_complete: rx.EventHandler[lambda code: [safe(code)]] = field(
332
+ doc="Called once when the last hole is filled. Handler receives: code."
333
+ )
334
+
335
+
336
+ class CometDial(ReactBitsComponent):
337
+ """Tick-ring dial you flick by angle: the reading launches on a spring and a velocity-driven comet streaks behind the lit head, trailing the direction of travel and vanishing at rest.
338
+
339
+ Docs: https://reactbits.dev/micro/comet-dial
340
+ """
341
+
342
+ tag = "CometDial"
343
+ alias = "ReactBitsCometDial"
344
+ is_default = True
345
+ _rb_category = "Micro"
346
+ _rb_name = "CometDial"
347
+ _rb_files = ('CometDial.css', 'CometDial.jsx')
348
+ lib_dependencies: list[str] = ['motion@12.23.21']
349
+
350
+ value: rx.Var[int | float] = field(
351
+ doc="Controlled value. A change from outside launches the reading on the tap spring."
352
+ )
353
+ default_value: rx.Var[int | float] = field(
354
+ doc="Initial value when uncontrolled. Default: 62."
355
+ )
356
+ min: rx.Var[int | float] = field(
357
+ doc="Lowest value. Default: 0."
358
+ )
359
+ max: rx.Var[int | float] = field(
360
+ doc="Highest value. Default: 100."
361
+ )
362
+ step: rx.Var[int | float] = field(
363
+ doc="Snapping grid, and the keyboard nudge. Default: 1."
364
+ )
365
+ unit: rx.Var[str] = field(
366
+ doc="Suffix after the figure. Empty hides it. Default: '%'."
367
+ )
368
+ label: rx.Var[str] = field(
369
+ doc="Accessible name of the slider. Default: 'Level'."
370
+ )
371
+ accent: rx.Var[str] = field(
372
+ doc="The lit arc, the bead and the comet. Default: '#f5f5f5'."
373
+ )
374
+ ink: rx.Var[str] = field(
375
+ doc="The track and the readout. Default: '#fdfdfd'."
376
+ )
377
+ size: rx.Var[int | float] = field(
378
+ doc="Diameter in pixels. Everything inside scales with it. Default: 250."
379
+ )
380
+ sweep: rx.Var[int | float] = field(
381
+ doc="Degrees the arc covers, with the gap centred at the bottom. Default: 320."
382
+ )
383
+ thickness: rx.Var[int | float] = field(
384
+ doc="Stroke width of the track and the arc. The bead follows it. Default: 5."
385
+ )
386
+ speed: rx.Var[int | float] = field(
387
+ doc="How quickly the reading arrives, 0 to 100. Default: 25."
388
+ )
389
+ tap_bounce: rx.Var[int | float] = field(
390
+ doc="Ring-down after a tap. 0 stops dead. Default: 0.2."
391
+ )
392
+ flick_bounce: rx.Var[int | float] = field(
393
+ doc="Ring-down after a full-speed flick. A slower release lands between the two. Default: 0.1."
394
+ )
395
+ momentum: rx.Var[int | float] = field(
396
+ doc="How far a flick carries the reading past where you let go. 0 drops it where released. Default: 1."
397
+ )
398
+ comet_reach: rx.Var[int | float] = field(
399
+ doc="Degrees of trail behind the bead at full speed. Default: 180."
400
+ )
401
+ comet_width: rx.Var[int | float] = field(
402
+ doc="Extra stroke width at the head of the trail at full speed. Default: 12."
403
+ )
404
+ disabled: rx.Var[bool] = field(
405
+ doc="Dims the dial and ignores input. Default: false."
406
+ )
407
+ on_change: rx.EventHandler[lambda value: [safe(value)]] = field(
408
+ doc="Called on every snapped change, including during a drag. Handler receives: value."
409
+ )
410
+ on_change_end: rx.EventHandler[lambda value, detail: [safe(value), safe(detail)]] = field(
411
+ doc="Called on release and on a key, with the release velocity and the bounce it earned. Handler receives: value, detail."
412
+ )
413
+
414
+
415
+ class DodgeField(ReactBitsComponent):
416
+ """Wrapper that makes any child flee the pointer inside a bounded field, dodges once per approach, then relents after a few tries and glides home.
417
+
418
+ Docs: https://reactbits.dev/micro/dodge-field
419
+ """
420
+
421
+ tag = "DodgeField"
422
+ alias = "ReactBitsDodgeField"
423
+ is_default = True
424
+ _rb_category = "Micro"
425
+ _rb_name = "DodgeField"
426
+ _rb_files = ('DodgeField.css', 'DodgeField.jsx')
427
+ lib_dependencies: list[str] = ['motion@12.23.21']
428
+
429
+ taunts: rx.Var[list[str]] = field(
430
+ doc="Labels for the built-in pill: the first at rest, then one per dodge, the last once it relents. Default: DEFAULT_TAUNTS."
431
+ )
432
+ notice: rx.Var[str] = field(
433
+ doc="One line shown under the child on touch devices, where nothing dodges."
434
+ )
435
+ ink_color: rx.Var[str] = field(
436
+ doc="The pill tint and text, the caught fill and the focus ring all derive from it. Default: '#f5f5f5'."
437
+ )
438
+ contrast_color: rx.Var[str] = field(
439
+ doc="Text colour while the pill is caught. Default: '#18181b'."
440
+ )
441
+ field_height: rx.Var[int | float] = field(
442
+ doc="Height of the invisible field in pixels; its width is the container. Default: 240."
443
+ )
444
+ reach: rx.Var[int | float] = field(
445
+ doc="How far it bolts, in pixels, with the pointer on its home. Default: 72."
446
+ )
447
+ radius: rx.Var[int | float] = field(
448
+ doc="Distance from home at which it starts to react, in pixels. Default: 120."
449
+ )
450
+ falloff: rx.Var[int | float] = field(
451
+ doc="Exponent of the reaction curve. 1 drifts away from far off; 4 only flinches at the last moment. Default: 2."
452
+ )
453
+ flee_duration: rx.Var[int | float] = field(
454
+ doc="Settle time of the dart, in milliseconds. Default: 130."
455
+ )
456
+ return_duration: rx.Var[int | float] = field(
457
+ doc="Settle time of the glide home, in milliseconds. Default: 620."
458
+ )
459
+ return_bounce: rx.Var[int | float] = field(
460
+ doc="Overshoot on the way home. 0.1 is a hair, 0.3 a visible wobble. Default: 0.1."
461
+ )
462
+ axis: rx.Var[Literal["both", "x", "y"]] = field(
463
+ doc="Which way it may flee. Default: 'both'."
464
+ )
465
+ wall: rx.Var[Literal["clamp", "bounce"]] = field(
466
+ doc="At the edge of the field: stop dead, or fold the overflow back so it rebounds. Default: 'clamp'."
467
+ )
468
+ patience: rx.Var[int | float] = field(
469
+ doc="Dodges before it gives in and sits still, at least 1. Never wrap a decline or close control in a field that dodges. Default: 4."
470
+ )
471
+ disabled: rx.Var[bool] = field(
472
+ doc="Sits still and stops counting; the child stays clickable. Default: false."
473
+ )
474
+ on_dodge: rx.EventHandler[lambda count: [safe(count)]] = field(
475
+ doc="Called on each counted dodge. Handler receives: count."
476
+ )
477
+ on_relent: rx.EventHandler[no_args_event_spec] = field(
478
+ doc="Called when it gives in."
479
+ )
480
+ on_catch: rx.EventHandler[no_args_event_spec] = field(
481
+ doc="Called when the child is clicked."
482
+ )
483
+
484
+
485
+ class FolderFloat(ReactBitsComponent):
486
+ """Folder that opens on hover or press: the flap tilts toward you, a paper edge rises, and its notes spring out from behind the flap into a floating cloud to pick from, then sink back when the folder closes.
487
+
488
+ Docs: https://reactbits.dev/micro/folder-float
489
+ """
490
+
491
+ tag = "FolderFloat"
492
+ alias = "ReactBitsFolderFloat"
493
+ is_default = True
494
+ _rb_category = "Micro"
495
+ _rb_name = "FolderFloat"
496
+ _rb_files = ('FolderFloat.css', 'FolderFloat.jsx')
497
+ lib_dependencies: list[str] = ['matter-js@0.20.0']
498
+
499
+ items: rx.Var[list[Any]] = field(
500
+ doc="The pills that float out. A string is its own value. Default: DEFAULT_ITEMS."
501
+ )
502
+ label: rx.Var[str] = field(
503
+ doc="The line on the flap. Default: 'Design feedback'."
504
+ )
505
+ sublabel: rx.Var[str] = field(
506
+ doc="The dimmer line under it. Empty counts the notes."
507
+ )
508
+ trigger: rx.Var[Literal["hover", "click"]] = field(
509
+ doc="Open on hover, or toggle on press. Default: 'hover'."
510
+ )
511
+ default_open: rx.Var[bool] = field(
512
+ doc="Start open. Default: false."
513
+ )
514
+ close_on_select: rx.Var[bool] = field(
515
+ doc="Picking a pill closes the folder. Default: true."
516
+ )
517
+ physics: rx.Var[bool] = field(
518
+ doc="Once the pills land, a zero-gravity world takes over: they float, collide, and can be dragged and thrown inside the cloud. Default: true."
519
+ )
520
+ drift: rx.Var[int | float] = field(
521
+ doc="Strength of the floating currents in the world. 0 holds still. Default: 0.5."
522
+ )
523
+ folder_color: rx.Var[str] = field(
524
+ doc="The back panel and its tab. Default: '#3f3f46'."
525
+ )
526
+ front_color: rx.Var[str] = field(
527
+ doc="The flap. Default: '#52525b'."
528
+ )
529
+ paper_color: rx.Var[str] = field(
530
+ doc="The paper edge that rises as it opens. Default: '#f5f5f5'."
531
+ )
532
+ item_color: rx.Var[str] = field(
533
+ doc="The pills. Default: '#f5f5f5'."
534
+ )
535
+ item_text_color: rx.Var[str] = field(
536
+ doc="The pill text. Default: '#18181b'."
537
+ )
538
+ label_color: rx.Var[str] = field(
539
+ doc="The flap text. Default: '#f5f5f5'."
540
+ )
541
+ width: rx.Var[int | float] = field(
542
+ doc="Folder width in px. Default: 200."
543
+ )
544
+ height: rx.Var[int | float] = field(
545
+ doc="Folder height in px, below the tab. Default: 148."
546
+ )
547
+ radius: rx.Var[int | float] = field(
548
+ doc="Corner radius in px. Default: 14."
549
+ )
550
+ spread: rx.Var[int | float] = field(
551
+ doc="Half the widest the cloud may be, in px. Pills pack into rows within it. Default: 180."
552
+ )
553
+ lift: rx.Var[int | float] = field(
554
+ doc="Gap between the folder and the lowest row, in px. Default: 26."
555
+ )
556
+ tilt: rx.Var[int | float] = field(
557
+ doc="Most a pill leans, in degrees. Default: 8."
558
+ )
559
+ flap_angle: rx.Var[int | float] = field(
560
+ doc="How far the flap tilts toward you when open, in degrees. Default: 34."
561
+ )
562
+ rest_angle: rx.Var[int | float] = field(
563
+ doc="The flap tilt when closed, in degrees. Default: 16."
564
+ )
565
+ open_duration: rx.Var[int | float] = field(
566
+ doc="A pill's rise, in ms. The close is 60% of it. Default: 520."
567
+ )
568
+ stagger: rx.Var[int | float] = field(
569
+ doc="Delay between pills, in ms. The close reverses the order. Default: 45."
570
+ )
571
+ bounce: rx.Var[int | float] = field(
572
+ doc="Overshoot of the rise. 0 lands dead. Default: 0.3."
573
+ )
574
+ on_select: rx.EventHandler[lambda value, index: [safe(value), safe(index)]] = field(
575
+ doc="A pill was picked. Handler receives: value, index."
576
+ )
577
+ on_open_change: rx.EventHandler[lambda open: [safe(open)]] = field(
578
+ doc="The folder opened or closed. Handler receives: open."
579
+ )
580
+
581
+
582
+ class FuseButton(ReactBitsComponent):
583
+ """Action button whose done state carries its own undo on a burning fuse: press, the label crossfades to Undo, a hairline burns for the undo window, and Undo or Escape runs it back.
584
+
585
+ Docs: https://reactbits.dev/micro/fuse-button
586
+ """
587
+
588
+ tag = "FuseButton"
589
+ alias = "ReactBitsFuseButton"
590
+ is_default = True
591
+ _rb_category = "Micro"
592
+ _rb_name = "FuseButton"
593
+ _rb_files = ('FuseButton.css', 'FuseButton.jsx')
594
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10']
595
+
596
+ label: rx.Var[str] = field(
597
+ doc="The idle action. Default: 'Archive'."
598
+ )
599
+ undo_label: rx.Var[str] = field(
600
+ doc="The label while the fuse burns; the whole pill is the Undo button. Default: 'Undo'."
601
+ )
602
+ done_label: rx.Var[str] = field(
603
+ doc="Shown with a check once the fuse burns out and settle is stay; announced to screen readers on arm. Default: 'Archived'."
604
+ )
605
+ icon: rx.Var[rx.Component | str] = field(
606
+ doc="The idle glyph; an archive icon when omitted."
607
+ )
608
+ color: rx.Var[str] = field(
609
+ doc="Ink for labels and icons; the seam and tints derive from it. Default: '#f5f5f5'."
610
+ )
611
+ background: rx.Var[str] = field(
612
+ doc="The pill surface. Default: '#27272a'."
613
+ )
614
+ fuse_color: rx.Var[str] = field(
615
+ doc="The lit line or ring. Default: '#f5a524'."
616
+ )
617
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
618
+ doc="Height 36, 44 or 52 pixels with matching type and icons. Default: 'md'."
619
+ )
620
+ radius: rx.Var[int | float] = field(
621
+ doc="Corner radius in pixels; 22 is a full pill at the medium size. Default: 22."
622
+ )
623
+ undo_window: rx.Var[int | float] = field(
624
+ doc="How long the fuse burns and Undo stays on offer, in milliseconds. Default: 4000."
625
+ )
626
+ fuse: rx.Var[Literal["outline", "bottom", "top"]] = field(
627
+ doc="The pill rim burning down clockwise, or a line along the bottom or top edge. Default: 'outline'."
628
+ )
629
+ fuse_thickness: rx.Var[int | float] = field(
630
+ doc="Line height or rim stroke in pixels. Default: 1.5."
631
+ )
632
+ crossfade_ms: rx.Var[int | float] = field(
633
+ doc="Blur crossfade between faces after a pointer press. Keyboard commits swap instantly. Default: 200."
634
+ )
635
+ commit_on: rx.Var[Literal["press", "fuseEnd"]] = field(
636
+ doc="When onCommit fires: at the press, with Undo as the revert, or only once the fuse burns out. Default: 'press'."
637
+ )
638
+ pause_on_hover: rx.Var[bool] = field(
639
+ doc="Leaving and coming back with a mouse freezes the fuse until the pointer leaves again. Default: true."
640
+ )
641
+ settle: rx.Var[Literal["reset", "stay"]] = field(
642
+ doc="After the fuse ends: return to the idle face, or stay on a terminal done face until remounted. Default: 'reset'."
643
+ )
644
+ disabled: rx.Var[bool] = field(
645
+ doc="Dims the idle face and ignores presses. Undo stays available while armed. Default: false."
646
+ )
647
+ type: rx.Var[Literal["button", "submit", "reset"]] = field(
648
+ doc="Type of the idle button. Default: 'button'."
649
+ )
650
+ on_commit: rx.EventHandler[lambda reason: [safe(reason)]] = field(
651
+ doc="The action. Handler receives: reason."
652
+ )
653
+ on_undo: rx.EventHandler[no_args_event_spec] = field(
654
+ doc="Called when Undo or Escape runs the action back."
655
+ )
656
+ on_fuse_end: rx.EventHandler[no_args_event_spec] = field(
657
+ doc="Called when the window closes without an undo."
658
+ )
659
+ on_phase_change: rx.EventHandler[lambda phase: [safe(phase)]] = field(
660
+ doc="Called on every phase change. Handler receives: phase."
661
+ )
662
+
663
+
664
+ class GlideSelect(ReactBitsComponent):
665
+ """Select chip whose menu pops out of its own corner and whose single hover highlight glides between rows, remembering where you left it so re-entry slides from there instead of blinking in.
666
+
667
+ Docs: https://reactbits.dev/micro/glide-select
668
+ """
669
+
670
+ tag = "GlideSelect"
671
+ alias = "ReactBitsGlideSelect"
672
+ is_default = True
673
+ _rb_category = "Micro"
674
+ _rb_name = "GlideSelect"
675
+ _rb_files = ('GlideSelect.css', 'GlideSelect.jsx')
676
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10']
677
+
678
+ options: rx.Var[list[Any]] = field(
679
+ doc="The rows. A string is both value and label; a tag shows muted at the right. Default: DEFAULT_OPTIONS."
680
+ )
681
+ value: rx.Var[str] = field(
682
+ doc="Controlled value. Outside changes never animate."
683
+ )
684
+ default_value: rx.Var[str] = field(
685
+ doc="Initial value when uncontrolled."
686
+ )
687
+ placeholder: rx.Var[str] = field(
688
+ doc="Chip text while nothing is selected. Default: 'Select\u2026'."
689
+ )
690
+ show_tags: rx.Var[bool] = field(
691
+ doc="Shows each row's tag. Default: true."
692
+ )
693
+ accent_color: rx.Var[str] = field(
694
+ doc="The check on the selected row. Default: '#f5f5f5'."
695
+ )
696
+ surface_color: rx.Var[str] = field(
697
+ doc="Chip and menu background. Default: '#27272a'."
698
+ )
699
+ highlight_color: rx.Var[str] = field(
700
+ doc="The gliding pill. The selected row rests on it at 60%, and the chip tint derives from it. Default: '#3f3f46'."
701
+ )
702
+ text_color: rx.Var[str] = field(
703
+ doc="Labels. Tags and the chevron derive from it. Default: '#f5f5f5'."
704
+ )
705
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
706
+ doc="Chip 28, 32 or 44 pixels with matching rows. Large is the touch-first size. Default: 'md'."
707
+ )
708
+ radius: rx.Var[int | float] = field(
709
+ doc="Menu corner in pixels. Chip, rows and pill use 4 less so they stay concentric. Default: 10."
710
+ )
711
+ menu_width: rx.Var[int | float] = field(
712
+ doc="Menu width in pixels, never narrower than the chip. Default: 176."
713
+ )
714
+ placement: rx.Var[Literal["top", "bottom"]] = field(
715
+ doc="Which side the menu grows on. It flips when the chosen side would leave the viewport. Default: 'bottom'."
716
+ )
717
+ align: rx.Var[Literal["left", "right"]] = field(
718
+ doc="Which chip edge the menu shares. Default: 'left'."
719
+ )
720
+ pop_duration: rx.Var[int | float] = field(
721
+ doc="Milliseconds the menu takes to grow out of its corner. It leaves in two thirds of that. Default: 180."
722
+ )
723
+ glide_duration: rx.Var[int | float] = field(
724
+ doc="Milliseconds the pill takes to travel between rows. 0 is a conventional hover. Default: 220."
725
+ )
726
+ remember_position: rx.Var[bool] = field(
727
+ doc="The highlight stays on the row the pointer left, so re-entry glides from there. Off, it clears on leave and the selected row shows again. Default: true."
728
+ )
729
+ disabled: rx.Var[bool] = field(
730
+ doc="Dims the chip and ignores input. Default: false."
731
+ )
732
+ aria_label: rx.Var[str] = field(
733
+ doc="Accessible name of the chip and list. Default: 'Select'."
734
+ )
735
+ on_change: rx.EventHandler[lambda value, option: [safe(value), safe(option)]] = field(
736
+ doc="Called on a pick that changes the value. Handler receives: value, option."
737
+ )
738
+
739
+
740
+ class HoldButton(ReactBitsComponent):
741
+ """Hold-to-confirm button whose liquid fill rises while pressed, snaps back on an early release and swaps its label through a blur when the hold completes.
742
+
743
+ Docs: https://reactbits.dev/micro/hold-button
744
+ """
745
+
746
+ tag = "HoldButton"
747
+ alias = "ReactBitsHoldButton"
748
+ is_default = True
749
+ _rb_category = "Micro"
750
+ _rb_name = "HoldButton"
751
+ _rb_files = ('HoldButton.css', 'HoldButton.jsx')
752
+
753
+ done_label: rx.Var[rx.Component | str] = field(
754
+ doc="Label that blurs in when the hold completes. Default: 'Deleted'."
755
+ )
756
+ icon: rx.Var[rx.Component | str] = field(
757
+ doc="Optional icon rendered before the idle label."
758
+ )
759
+ done_icon: rx.Var[rx.Component | str] = field(
760
+ doc="Optional icon rendered before the done label."
761
+ )
762
+ background_color: rx.Var[str] = field(
763
+ doc="Button body colour. Default: '#27272a'."
764
+ )
765
+ fill_color: rx.Var[str] = field(
766
+ doc="Colour of the liquid fill, its wave, the glow and the focus ring. Default: '#5227FF'."
767
+ )
768
+ text_color: rx.Var[str] = field(
769
+ doc="Label colour outside the fill. Default: '#f5f5f5'."
770
+ )
771
+ fill_text_color: rx.Var[str] = field(
772
+ doc="Label colour inside the fill; the ink inverts as the edge crosses it. Default: '#ffffff'."
773
+ )
774
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
775
+ doc="Height, padding and font size preset. Default: 'md'."
776
+ )
777
+ radius: rx.Var[int | float] = field(
778
+ doc="Corner radius in pixels of the body, the fill and the focus ring. Default: 14."
779
+ )
780
+ fill_direction: rx.Var[Literal["right", "up"]] = field(
781
+ doc="Whether the liquid sweeps left to right or rises from the bottom. Default: 'right'."
782
+ )
783
+ hold_time: rx.Var[int | float] = field(
784
+ doc="How long the press must last, in milliseconds. The fill moves at constant speed. Default: 2000."
785
+ )
786
+ release_time: rx.Var[int | float] = field(
787
+ doc="How fast the fill snaps back on an early release or a reset, in milliseconds. Default: 200."
788
+ )
789
+ press_scale: rx.Var[int | float] = field(
790
+ doc="Squash of the button while a pointer holds it. 1 disables it. Default: 0.97."
791
+ )
792
+ wave: rx.Var[bool] = field(
793
+ doc="Scrolling meniscus on the leading edge of the fill. Default: true."
794
+ )
795
+ wave_amplitude: rx.Var[int | float] = field(
796
+ doc="Height of the wave crests in pixels. Default: 6."
797
+ )
798
+ glow: rx.Var[bool] = field(
799
+ doc="Glow that charges with the hold and pulses once on completion. Default: true."
800
+ )
801
+ reset_after: rx.Var[int | float] = field(
802
+ doc="Milliseconds the done state stays before the button resets. 0 keeps it done. Default: 1200."
803
+ )
804
+ disabled: rx.Var[bool] = field(
805
+ doc="Dims the button and ignores input. Default: false."
806
+ )
807
+ on_hold: rx.EventHandler[no_args_event_spec] = field(
808
+ doc="Called once, on the frame the fill completes."
809
+ )
810
+ on_tap: rx.EventHandler[no_args_event_spec] = field(
811
+ doc="Called on a release shorter than 250ms that did not drift away."
812
+ )
813
+
814
+
815
+ class JellyRadio(ReactBitsComponent):
816
+ """Radio group of labelled chips where the chosen one swells wide-then-tall on two springs and barges its neighbours outward with a travelling stagger, so a selection reads as a force moving through the row.
817
+
818
+ Docs: https://reactbits.dev/micro/jelly-radio
819
+ """
820
+
821
+ tag = "JellyRadio"
822
+ alias = "ReactBitsJellyRadio"
823
+ is_default = True
824
+ _rb_category = "Micro"
825
+ _rb_name = "JellyRadio"
826
+ _rb_files = ('JellyRadio.css', 'JellyRadio.jsx')
827
+ lib_dependencies: list[str] = ['motion@12.23.21']
828
+
829
+ items: rx.Var[list[Any]] = field(
830
+ doc="The chips. A string is both value and label. Default: DEFAULT_ITEMS."
831
+ )
832
+ value: rx.Var[str] = field(
833
+ doc="Controlled value. Outside changes jump."
834
+ )
835
+ default_value: rx.Var[str] = field(
836
+ doc="Initial value when uncontrolled. Falls back to the first item."
837
+ )
838
+ chip_color: rx.Var[str] = field(
839
+ doc="Surface of an unchosen chip. Default: '#27272a'."
840
+ )
841
+ active_color: rx.Var[str] = field(
842
+ doc="Surface of the chosen chip. Default: '#f5f5f5'."
843
+ )
844
+ text_color: rx.Var[str] = field(
845
+ doc="Label of an unchosen chip, and the hover tone. Default: '#f5f5f5'."
846
+ )
847
+ active_text_color: rx.Var[str] = field(
848
+ doc="Label of the chosen chip. Default: '#18181b'."
849
+ )
850
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
851
+ doc="Chip height 28, 36 or 44 pixels. Large is the touch-first size. Default: 'md'."
852
+ )
853
+ gap: rx.Var[int | float] = field(
854
+ doc="Rest spacing between chips in pixels. Default: 8."
855
+ )
856
+ radius: rx.Var[int | float] = field(
857
+ doc="Corner radius in pixels. 18 is a pill at medium. Default: 18."
858
+ )
859
+ swell: rx.Var[int | float] = field(
860
+ doc="How much the chosen chip grows. It also sets the room the neighbours make. Default: 0.2."
861
+ )
862
+ barge: rx.Var[int | float] = field(
863
+ doc="Extra pixels every neighbour is shoved beyond that room. 0 only makes room. Default: 6."
864
+ )
865
+ shrink: rx.Var[int | float] = field(
866
+ doc="How much every unchosen chip gives up. Default: 0.05."
867
+ )
868
+ jelly: rx.Var[int | float] = field(
869
+ doc="The wide-before-tall split. 0 swells uniformly, 1.5 exaggerates it. Default: 1."
870
+ )
871
+ bounce: rx.Var[int | float] = field(
872
+ doc="One minus the damping ratio. 0 arrives and stops, 0.4 rings. Default: 0.25."
873
+ )
874
+ stagger: rx.Var[int | float] = field(
875
+ doc="Milliseconds per row step before a neighbour moves. 0 moves the row as a slab. Default: 22."
876
+ )
877
+ stiffness: rx.Var[int | float] = field(
878
+ doc="Spring stiffness of the chosen chip. Neighbours soften from it with distance. Default: 580."
879
+ )
880
+ disabled: rx.Var[bool] = field(
881
+ doc="Fades the group and ignores input. Default: false."
882
+ )
883
+ aria_label: rx.Var[str] = field(
884
+ doc="Accessible name of the group. Default: 'Options'."
885
+ )
886
+ on_change: rx.EventHandler[lambda value, index: [safe(value), safe(index)]] = field(
887
+ doc="Called on the commit, before the motion ends. Handler receives: value, index."
888
+ )
889
+
890
+
891
+ class LatticeLoader(ReactBitsComponent):
892
+ """Inline agent-status row: a 3x3 or 4x4 lattice whose cells brighten in a phase-offset wave beside a verb and a live stopwatch, resolving into a check or a cross when the task ends.
893
+
894
+ Docs: https://reactbits.dev/micro/lattice-loader
895
+ """
896
+
897
+ tag = "LatticeLoader"
898
+ alias = "ReactBitsLatticeLoader"
899
+ is_default = True
900
+ _rb_category = "Micro"
901
+ _rb_name = "LatticeLoader"
902
+ _rb_files = ('LatticeLoader.css', 'LatticeLoader.jsx')
903
+
904
+ label: rx.Var[str] = field(
905
+ doc="The verb while working. Default: 'Thinking'."
906
+ )
907
+ done_label: rx.Var[str] = field(
908
+ doc="The verb after status turns to done; the frozen time follows it. Default: 'Done in'."
909
+ )
910
+ error_label: rx.Var[str] = field(
911
+ doc="The verb after status turns to error. Default: 'Failed after'."
912
+ )
913
+ status: rx.Var[Literal["working", "done", "error"]] = field(
914
+ doc="Drives everything: the wave runs, or freezes and dissolves into a check or a cross while the stopwatch stops. Default: 'working'."
915
+ )
916
+ pattern: rx.Var[str | dict[str, Any]] = field(
917
+ doc="The wave geometry. At 3 x 3: arrow, dots, orbit, ripple, snake, spiral. At 4 x 4: sweep, spin, rain, pulse, orbit, snake. A custom object gives one delay per cell in step units (null for a hole), an optional loop and scale, and lit: the share of the cycle a cell stays bright, 0.25, 0.35, 0.45 or 0.62. Default: 'orbit'."
918
+ )
919
+ grid: rx.Var[int | int | float] = field(
920
+ doc="Cells per side. Each size has its own set of patterns and its own check and cross. Default: 3."
921
+ )
922
+ shape: rx.Var[Literal["square", "round"]] = field(
923
+ doc="Rounded tiles or dots. Default: 'round'."
924
+ )
925
+ color: rx.Var[str] = field(
926
+ doc="Ink for the cells, the verb and the stopwatch. Inherits the page colour by default. Default: 'currentColor'."
927
+ )
928
+ done_color: rx.Var[str] = field(
929
+ doc="Colour of the check. Default: '#22c55e'."
930
+ )
931
+ error_color: rx.Var[str] = field(
932
+ doc="Colour of the cross. Default: '#ef4444'."
933
+ )
934
+ cell_size: rx.Var[int | float] = field(
935
+ doc="Cell side in pixels; the lattice is three cells and two gaps. Default: 6."
936
+ )
937
+ gap: rx.Var[int | float] = field(
938
+ doc="Seam between cells in pixels. Default: 2."
939
+ )
940
+ font_size: rx.Var[int | float] = field(
941
+ doc="Verb size in pixels; the stopwatch and row gap scale with it. Default: 14."
942
+ )
943
+ step: rx.Var[int | float] = field(
944
+ doc="Milliseconds between neighbouring cells lighting; the whole loop scales with it. Default: 90."
945
+ )
946
+ idle_opacity: rx.Var[int | float] = field(
947
+ doc="How visible the dark silhouette is. Default: 0.15."
948
+ )
949
+ glow: rx.Var[bool] = field(
950
+ doc="A halo on the lit cells and the mark. Default: false."
951
+ )
952
+ glow_color: rx.Var[str] = field(
953
+ doc="The halo colour. Empty follows the ink, and the mark colour for the mark."
954
+ )
955
+ show_timer: rx.Var[bool] = field(
956
+ doc="Shows the live stopwatch. Default: true."
957
+ )
958
+ elapsed: rx.Var[int | float] = field(
959
+ doc="Controlled elapsed seconds. When set, the internal clock never runs."
960
+ )
961
+
962
+
963
+ class PeekRating(ReactBitsComponent):
964
+ """Star rating you can try before you commit: sweeping the row lifts a trailing wave of stars up to the pointer while a tip hops along with the label; a click commits with a pop.
965
+
966
+ Docs: https://reactbits.dev/micro/peek-rating
967
+ """
968
+
969
+ tag = "PeekRating"
970
+ alias = "ReactBitsPeekRating"
971
+ is_default = True
972
+ _rb_category = "Micro"
973
+ _rb_name = "PeekRating"
974
+ _rb_files = ('PeekRating.css', 'PeekRating.jsx')
975
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10']
976
+
977
+ value: rx.Var[int | float] = field(
978
+ doc="Controlled rating, from 0 to count."
979
+ )
980
+ default_value: rx.Var[int | float] = field(
981
+ doc="Initial rating when uncontrolled. Default: 0."
982
+ )
983
+ count: rx.Var[int | float] = field(
984
+ doc="Number of glyphs. Default: 5."
985
+ )
986
+ shape: rx.Var[Literal["star", "heart", "bolt"]] = field(
987
+ doc="Built-in glyph shape. Default: 'star'."
988
+ )
989
+ icon: rx.Var[rx.Component | str] = field(
990
+ doc="Custom glyph that replaces the built-in shape."
991
+ )
992
+ labels: rx.Var[list[str]] = field(
993
+ doc="One label per glyph, shown in the tip while previewing. Without labels the tip shows the number. Default: []."
994
+ )
995
+ active_color: rx.Var[str] = field(
996
+ doc="Colour of lit glyphs and of the focus ring. Default: '#f5b400'."
997
+ )
998
+ idle_color: rx.Var[str] = field(
999
+ doc="Colour of unlit glyphs. Default: '#52525b'."
1000
+ )
1001
+ tip_color: rx.Var[str] = field(
1002
+ doc="Background of the tip that follows the pointer. Default: '#27272a'."
1003
+ )
1004
+ tip_text_color: rx.Var[str] = field(
1005
+ doc="Text colour of the tip. Default: '#f5f5f5'."
1006
+ )
1007
+ size: rx.Var[int | float] = field(
1008
+ doc="Glyph size in pixels; spacing and the tip scale with it. Default: 28."
1009
+ )
1010
+ lift: rx.Var[int | float] = field(
1011
+ doc="How far previewed glyphs rise, in pixels. 0 makes the preview colour-only. Default: 6."
1012
+ )
1013
+ magnify: rx.Var[int | float] = field(
1014
+ doc="Scale of the glyph under the pointer. Default: 1.15."
1015
+ )
1016
+ rise_duration: rx.Var[int | float] = field(
1017
+ doc="Duration in milliseconds of each glyph\u2019s rise and fall, and of the tip\u2019s hop. Default: 320."
1018
+ )
1019
+ pop_scale: rx.Var[int | float] = field(
1020
+ doc="Peak scale of the pop on the committed glyph. 1 disables it. Default: 1.3."
1021
+ )
1022
+ show_tip: rx.Var[bool] = field(
1023
+ doc="Shows the tip above the pointer glyph while previewing. Default: true."
1024
+ )
1025
+ allow_clear: rx.Var[bool] = field(
1026
+ doc="Clicking the current rating again, or Backspace, clears it to 0. Default: true."
1027
+ )
1028
+ read_only: rx.Var[bool] = field(
1029
+ doc="Display only: no preview, no pop, announced as an image. Default: false."
1030
+ )
1031
+ disabled: rx.Var[bool] = field(
1032
+ doc="Dims the control and ignores input. Default: false."
1033
+ )
1034
+ aria_label: rx.Var[str] = field(
1035
+ doc="Accessible name of the radio group. Default: 'Rating'."
1036
+ )
1037
+ on_change: rx.EventHandler[lambda value: [safe(value)]] = field(
1038
+ doc="Called when a rating is committed by click, release or keyboard. Handler receives: value."
1039
+ )
1040
+ on_preview: rx.EventHandler[lambda value: [safe(value)]] = field(
1041
+ doc="Called on every slot crossing while previewing, and with null when the preview clears. Handler receives: value."
1042
+ )
1043
+
1044
+
1045
+ class PromptBar(ReactBitsComponent):
1046
+ """Chat composer with an @ sources menu, a / commands menu, a model picker, dictation and attachments, whose send tile charges to ink the moment there is something to send and morphs its arrow into a stop square while busy.
1047
+
1048
+ Docs: https://reactbits.dev/micro/prompt-bar
1049
+ """
1050
+
1051
+ tag = "PromptBar"
1052
+ alias = "ReactBitsPromptBar"
1053
+ is_default = True
1054
+ _rb_category = "Micro"
1055
+ _rb_name = "PromptBar"
1056
+ _rb_files = ('PromptBar.css', 'PromptBar.jsx')
1057
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
1058
+
1059
+ placeholder: rx.Var[str] = field(
1060
+ doc="Shown while the field is empty. Default: 'Ask anything'."
1061
+ )
1062
+ sources: rx.Var[list[Any]] = field(
1063
+ doc="Rows of the @ menu and the plus button: key, name, description, icon (a Hugeicons icon or any node), and attach: true for the row that adds files. Default: DEFAULT_SOURCES."
1064
+ )
1065
+ commands: rx.Var[list[Any]] = field(
1066
+ doc="Rows of the / menu: key, name (with the slash), description. Default: DEFAULT_COMMANDS."
1067
+ )
1068
+ models: rx.Var[list[Any]] = field(
1069
+ doc="Rows of the model picker: key, name, tag. An empty list hides the picker. Default: DEFAULT_MODELS."
1070
+ )
1071
+ default_model: rx.Var[str] = field(
1072
+ doc="Key of the model selected at first. Empty picks the first."
1073
+ )
1074
+ efforts: rx.Var[list[str]] = field(
1075
+ doc="Steps of the effort slider, low to high. The last step turns the field to the spark colour with drifting sparks. An empty list hides the control. Default: DEFAULT_EFFORTS."
1076
+ )
1077
+ default_effort: rx.Var[str] = field(
1078
+ doc="The step selected at first. Empty picks the middle."
1079
+ )
1080
+ busy: rx.Var[bool] = field(
1081
+ doc="A response is in flight. The send tile stays ink and its arrow morphs into a stop square. Default: false."
1082
+ )
1083
+ background: rx.Var[str] = field(
1084
+ doc="The field surface, and the glyph on an armed tile. Default: '#27272a'."
1085
+ )
1086
+ color: rx.Var[str] = field(
1087
+ doc="The ink: text, icons, and the armed tile. Default: '#f5f5f5'."
1088
+ )
1089
+ menu_background: rx.Var[str] = field(
1090
+ doc="The surface of the menus and the effort popover. Default: '#323236'."
1091
+ )
1092
+ spark_color: rx.Var[str] = field(
1093
+ doc="The wash, the sparks and the slider at the top effort. Default: '#b39dff'."
1094
+ )
1095
+ width: rx.Var[int | float] = field(
1096
+ doc="Field width in px, capped at the parent. Default: 400."
1097
+ )
1098
+ radius: rx.Var[int | float] = field(
1099
+ doc="Field corner radius in px. Default: 16."
1100
+ )
1101
+ max_rows: rx.Var[int | float] = field(
1102
+ doc="Rows the field grows to before it scrolls. Default: 5."
1103
+ )
1104
+ morph_duration: rx.Var[int | float] = field(
1105
+ doc="Arrow to square and back, in ms. Default: 240."
1106
+ )
1107
+ squash: rx.Var[int | float] = field(
1108
+ doc="Mid-morph pinch. The glyph narrows by this and grows taller to keep its area. Default: 0.12."
1109
+ )
1110
+ tilt: rx.Var[int | float] = field(
1111
+ doc="Mid-morph lean in degrees, mirrored on the way back. Default: 8."
1112
+ )
1113
+ press_scale: rx.Var[int | float] = field(
1114
+ doc="Scale of the send tile while a pointer is down. Default: 0.96."
1115
+ )
1116
+ on_effort_change: rx.EventHandler[lambda effort: [safe(effort)]] = field(
1117
+ doc="The slider moved. Handler receives: effort."
1118
+ )
1119
+ on_send: rx.EventHandler[lambda text, options: [safe(text), safe(options)]] = field(
1120
+ doc="Enter or the tile, with a non-empty draft or an attachment. The draft and attachments clear. Handler receives: text, options."
1121
+ )
1122
+ on_stop: rx.EventHandler[no_args_event_spec] = field(
1123
+ doc="The tile while busy."
1124
+ )
1125
+ on_attach: rx.EventHandler[no_args_event_spec] = field(
1126
+ doc="Picked the attach row. Return file names, or a promise of them, and they appear as chips."
1127
+ )
1128
+ on_dictate: rx.EventHandler[no_args_event_spec] = field(
1129
+ doc="The mic. Return the transcript, or a promise of it, and it lands in the draft. Omit to hide the mic."
1130
+ )
1131
+
1132
+
1133
+ class PulseHeart(ReactBitsComponent):
1134
+ """Like button that contracts to a dot, flips colour at its smallest frame and pulses back while the count swaps one glyph.
1135
+
1136
+ Docs: https://reactbits.dev/micro/pulse-heart
1137
+ """
1138
+
1139
+ tag = "PulseHeart"
1140
+ alias = "ReactBitsPulseHeart"
1141
+ is_default = True
1142
+ _rb_category = "Micro"
1143
+ _rb_name = "PulseHeart"
1144
+ _rb_files = ('PulseHeart.css', 'PulseHeart.jsx')
1145
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3']
1146
+
1147
+ liked: rx.Var[bool] = field(
1148
+ doc="Controlled state. Changes from outside land without a run."
1149
+ )
1150
+ default_liked: rx.Var[bool] = field(
1151
+ doc="Initial state when uncontrolled. Default: false."
1152
+ )
1153
+ count: rx.Var[int | float] = field(
1154
+ doc="The number shown; a press adds or removes one. Rolls one glyph per press. For a multi-digit odometer with places and decimals, use Counter. Default: 0."
1155
+ )
1156
+ show_count: rx.Var[bool] = field(
1157
+ doc="Shows the count; off collapses the pill to a circle. Default: true."
1158
+ )
1159
+ icon: rx.Var[rx.Component | str] = field(
1160
+ doc="Built-in glyph, or a custom element. Default: 'heart'."
1161
+ )
1162
+ idle_outline: rx.Var[bool] = field(
1163
+ doc="Draws the idle glyph as an outline. Off draws it as a muted solid. Default: true."
1164
+ )
1165
+ size: rx.Var[int | float] = field(
1166
+ doc="Glyph size in pixels; padding, gap and count size derive from it. Default: 40."
1167
+ )
1168
+ corner: rx.Var[int | float] = field(
1169
+ doc="Pill corner radius in pixels. Default: 32."
1170
+ )
1171
+ liked_color: rx.Var[str] = field(
1172
+ doc="Colour after the flip, and of the hover tint and focus ring. Default: '#ff4d6d'."
1173
+ )
1174
+ idle_color: rx.Var[str] = field(
1175
+ doc="Colour before the flip. Default: '#8b8b93'."
1176
+ )
1177
+ pill_color: rx.Var[str] = field(
1178
+ doc="Background of the pill that beats under the glyph. Default: '#232326'."
1179
+ )
1180
+ text_color: rx.Var[str] = field(
1181
+ doc="Colour of the count. Default: '#f5f5f5'."
1182
+ )
1183
+ duration: rx.Var[int | float] = field(
1184
+ doc="Length of the whole run in milliseconds; the flip is always at 40% of it. Default: 560."
1185
+ )
1186
+ dot_size: rx.Var[int | float] = field(
1187
+ doc="How small the glyph gets at the flip, as a fraction of its size. Default: 0.3."
1188
+ )
1189
+ overshoot: rx.Var[int | float] = field(
1190
+ doc="How far the glyph rebounds past rest on the way back. 0 lands without a rebound. Default: 1.7."
1191
+ )
1192
+ beat: rx.Var[int | float] = field(
1193
+ doc="Percent the pill dips at the flip. Default: 3."
1194
+ )
1195
+ roll_duration: rx.Var[int | float] = field(
1196
+ doc="How long the changed glyph of the count takes to roll, in milliseconds. Default: 350."
1197
+ )
1198
+ disabled: rx.Var[bool] = field(
1199
+ doc="Dims the button and ignores input. Default: false."
1200
+ )
1201
+ label: rx.Var[str] = field(
1202
+ doc="Accessible name; the count is appended to it. Default: 'Like'."
1203
+ )
1204
+ on_change: rx.EventHandler[lambda liked, count: [safe(liked), safe(count)]] = field(
1205
+ doc="Called on every press with the new state and count. Handler receives: liked, count."
1206
+ )
1207
+
1208
+
1209
+ class RefineFrame(ReactBitsComponent):
1210
+ """Reserved-aspect frame that walks any media through queued, generating, refining and complete without layout shift: each stage is one blur, saturate, scale and opacity tween, a soft band sweeps while it works, a chip reports the stage, and an error dims the picture behind a retry pill.
1211
+
1212
+ Docs: https://reactbits.dev/micro/refine-frame
1213
+ """
1214
+
1215
+ tag = "RefineFrame"
1216
+ alias = "ReactBitsRefineFrame"
1217
+ is_default = True
1218
+ _rb_category = "Micro"
1219
+ _rb_name = "RefineFrame"
1220
+ _rb_files = ('RefineFrame.css', 'RefineFrame.jsx')
1221
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10']
1222
+
1223
+ status: rx.Var[Literal["queued", "generating", "refining", "complete", "error"]] = field(
1224
+ doc="The stage. Each change tweens the media to that stage. Default: 'generating'."
1225
+ )
1226
+ aspect_ratio: rx.Var[str] = field(
1227
+ doc="The box reserved before and during generation, so nothing shifts. Default: '4 / 3'."
1228
+ )
1229
+ width: rx.Var[int | float] = field(
1230
+ doc="Frame width in px, capped at the parent. Default: 320."
1231
+ )
1232
+ radius: rx.Var[int | float] = field(
1233
+ doc="Corner radius in px. Default: 16."
1234
+ )
1235
+ background: rx.Var[str] = field(
1236
+ doc="The paper behind the media, and the chip surface. Default: '#27272a'."
1237
+ )
1238
+ color: rx.Var[str] = field(
1239
+ doc="The ink: chip text, the sweep and the retry pill. Default: '#f5f5f5'."
1240
+ )
1241
+ stage_duration: rx.Var[int | float] = field(
1242
+ doc="Each stage tween, in ms. Default: 400."
1243
+ )
1244
+ sweep: rx.Var[bool] = field(
1245
+ doc="A soft band crosses the frame while it works. Default: true."
1246
+ )
1247
+ show_status: rx.Var[bool] = field(
1248
+ doc="The chip with the mark and the stage label. Default: true."
1249
+ )
1250
+ hide_after: rx.Var[int | float] = field(
1251
+ doc="Ms after completion before the chip fades. 0 keeps it. Default: 1200."
1252
+ )
1253
+ labels: rx.Var[dict[str, Any]] = field(
1254
+ doc="Chip text per stage: Queued, Generating, Refining, Ready, Failed. Default: DEFAULT_LABELS."
1255
+ )
1256
+ retry_label: rx.Var[str] = field(
1257
+ doc="The pill on an error. Default: 'Retry'."
1258
+ )
1259
+ on_retry: rx.EventHandler[no_args_event_spec] = field(
1260
+ doc="The retry pill was pressed. Without it, no pill."
1261
+ )
1262
+
1263
+
1264
+ class RubberSegment(ReactBitsComponent):
1265
+ """Segmented control with a rubber thumb: taps stretch it across the gap and squash it onto the target, and you can grab, drag and flick it between slots.
1266
+
1267
+ Docs: https://reactbits.dev/micro/rubber-segment
1268
+ """
1269
+
1270
+ tag = "RubberSegment"
1271
+ alias = "ReactBitsRubberSegment"
1272
+ is_default = True
1273
+ _rb_category = "Micro"
1274
+ _rb_name = "RubberSegment"
1275
+ _rb_files = ('RubberSegment.css', 'RubberSegment.jsx')
1276
+ lib_dependencies: list[str] = ['motion@12.23.21']
1277
+
1278
+ items: rx.Var[list[Any]] = field(
1279
+ doc="The slots, in order. A string is both value and label. Default: -."
1280
+ )
1281
+ value: rx.Var[str] = field(
1282
+ doc="Controlled value. A change from outside jumps the thumb without animation."
1283
+ )
1284
+ default_value: rx.Var[str] = field(
1285
+ doc="Initial value when uncontrolled; the first item if omitted."
1286
+ )
1287
+ track_color: rx.Var[str] = field(
1288
+ doc="The well behind the slots. Default: '#27272a'."
1289
+ )
1290
+ thumb_color: rx.Var[str] = field(
1291
+ doc="The rubber thumb, and the focus ring. Default: '#fafafa'."
1292
+ )
1293
+ text_color: rx.Var[str] = field(
1294
+ doc="Idle labels, drawn at 70%. Default: '#fafafa'."
1295
+ )
1296
+ active_text_color: rx.Var[str] = field(
1297
+ doc="The label revealed inside the thumb. Default: '#18181b'."
1298
+ )
1299
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
1300
+ doc="Track height 28, 36 or 44 pixels; font and padding follow. Default: 'md'."
1301
+ )
1302
+ radius: rx.Var[int | float] = field(
1303
+ doc="Track corner radius in pixels. Default: 10."
1304
+ )
1305
+ inset: rx.Var[int | float] = field(
1306
+ doc="Gap between the thumb and the track edge; the thumb corner is radius minus inset. Default: 3."
1307
+ )
1308
+ equal_slots: rx.Var[bool] = field(
1309
+ doc="Every slot the same width. Off, slots hug their labels and the thumb changes width per slot. Default: true."
1310
+ )
1311
+ stretch: rx.Var[int | float] = field(
1312
+ doc="How far a tap dilates the thumb across old and new slot before it contracts. 0 is a plain slide. Default: 100."
1313
+ )
1314
+ squash: rx.Var[int | float] = field(
1315
+ doc="Pixels the trailing edge lands past the slot edge before relaxing. 0 removes the squash. Default: 3."
1316
+ )
1317
+ speed: rx.Var[int | float] = field(
1318
+ doc="Scales every phase together; 0.25 is slow motion. Default: 1."
1319
+ )
1320
+ glide: rx.Var[int | float] = field(
1321
+ doc="How far a flick carries the thumb before it snaps. 0 always lands on the nearest slot. Default: 75."
1322
+ )
1323
+ draggable: rx.Var[bool] = field(
1324
+ doc="Lets the thumb be grabbed, dragged and flicked. Default: true."
1325
+ )
1326
+ disabled: rx.Var[bool] = field(
1327
+ doc="Dims the control and ignores input. Default: false."
1328
+ )
1329
+ on_change: rx.EventHandler[lambda value, index: [safe(value), safe(index)]] = field(
1330
+ doc="Called on a tap, on a drag release and on every arrow key. Handler receives: value, index."
1331
+ )
1332
+
1333
+
1334
+ class ScrubField(ReactBitsComponent):
1335
+ """Number chip you drag to scrub: the value follows the hand, pushes past the range on a rubber band, and a click without moving opens it for typing.
1336
+
1337
+ Docs: https://reactbits.dev/micro/scrub-field
1338
+ """
1339
+
1340
+ tag = "ScrubField"
1341
+ alias = "ReactBitsScrubField"
1342
+ is_default = True
1343
+ _rb_category = "Micro"
1344
+ _rb_name = "ScrubField"
1345
+ _rb_files = ('ScrubField.css', 'ScrubField.jsx')
1346
+ lib_dependencies: list[str] = ['motion@12.23.21']
1347
+
1348
+ label: rx.Var[str] = field(
1349
+ doc="The field name. Drag anywhere on the chip to scrub; click without moving to type. Default: 'Radius'."
1350
+ )
1351
+ suffix: rx.Var[str] = field(
1352
+ doc="Unit after the number, also read by screen readers. Default: 'px'."
1353
+ )
1354
+ value: rx.Var[int | float] = field(
1355
+ doc="Controlled value; changes from outside land without motion."
1356
+ )
1357
+ default_value: rx.Var[int | float] = field(
1358
+ doc="Initial value and the dirty baseline: the ring turns off exactly here. Default: 24."
1359
+ )
1360
+ min: rx.Var[int | float] = field(
1361
+ doc="Lower bound; the rubber band starts here. Default: 0."
1362
+ )
1363
+ max: rx.Var[int | float] = field(
1364
+ doc="Upper bound; the rubber band starts here. Default: 100."
1365
+ )
1366
+ step: rx.Var[int | float] = field(
1367
+ doc="Granularity of drag and arrows; sets the decimals shown. Default: 1."
1368
+ )
1369
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
1370
+ doc="Chip height 28, 34 or 44 pixels. Default: 'md'."
1371
+ )
1372
+ sensitivity: rx.Var[int | float] = field(
1373
+ doc="Pixels of travel per step. 1 is twitchy, 6 is precise. Default: 2."
1374
+ )
1375
+ rubber_reach: rx.Var[int | float] = field(
1376
+ doc="How far past a bound the number can be pushed, as a percent of the range. 0 is a hard stop. Default: 8."
1377
+ )
1378
+ return_duration: rx.Var[int | float] = field(
1379
+ doc="Duration in milliseconds of the critically damped snap back to the bound. Default: 300."
1380
+ )
1381
+ coarse_multiplier: rx.Var[int | float] = field(
1382
+ doc="Step multiplier while Shift is held, and for Page Up and Page Down. Default: 10."
1383
+ )
1384
+ fine_multiplier: rx.Var[int | float] = field(
1385
+ doc="Step multiplier while Alt or Option is held; adds a decimal. Default: 0.1."
1386
+ )
1387
+ show_delta: rx.Var[bool] = field(
1388
+ doc="Shows the signed change in a pill riding the pointer. Default: true."
1389
+ )
1390
+ show_dirty: rx.Var[bool] = field(
1391
+ doc="Rings the chip while the value differs from the default. Default: false."
1392
+ )
1393
+ show_fill: rx.Var[bool] = field(
1394
+ doc="Fills the chip from the left in proportion to where the value sits in the range. Default: true."
1395
+ )
1396
+ accent: rx.Var[str] = field(
1397
+ doc="Fill band, dirty ring and delta pill. Default: '#f5f5f5'."
1398
+ )
1399
+ chip_color: rx.Var[str] = field(
1400
+ doc="Chip surface. Text inherits from the page. Default: '#27272a'."
1401
+ )
1402
+ disabled: rx.Var[bool] = field(
1403
+ doc="Dims the chip and ignores input. Default: false."
1404
+ )
1405
+ on_change: rx.EventHandler[lambda value: [safe(value)]] = field(
1406
+ doc="Called on every step, key and typed commit. Handler receives: value."
1407
+ )
1408
+ on_commit: rx.EventHandler[lambda value: [safe(value)]] = field(
1409
+ doc="Called on release, on a key step and on blur or Enter. Handler receives: value."
1410
+ )
1411
+
1412
+
1413
+ class SlideCommit(ReactBitsComponent):
1414
+ """Slide-to-confirm handle that plants with a spinner while your action runs, unfurls into a done pill on success and springs home with a squash and shake on failure.
1415
+
1416
+ Docs: https://reactbits.dev/micro/slide-commit
1417
+ """
1418
+
1419
+ tag = "SlideCommit"
1420
+ alias = "ReactBitsSlideCommit"
1421
+ is_default = True
1422
+ _rb_category = "Micro"
1423
+ _rb_name = "SlideCommit"
1424
+ _rb_files = ('SlideCommit.css', 'SlideCommit.jsx')
1425
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
1426
+
1427
+ label: rx.Var[rx.Component | str] = field(
1428
+ doc="The instruction centred in the pill; the capsule wipes it as you drag. Default: 'Slide to pay'."
1429
+ )
1430
+ done_label: rx.Var[rx.Component | str] = field(
1431
+ doc="The words beside the check once confirmed. Default: 'Paid'."
1432
+ )
1433
+ error_label: rx.Var[rx.Component | str] = field(
1434
+ doc="Replaces the instruction, in the danger colour, after a rejected promise. Default: 'Payment failed'."
1435
+ )
1436
+ track_color: rx.Var[str] = field(
1437
+ doc="The pill behind the handle. Default: '#262626'."
1438
+ )
1439
+ handle_color: rx.Var[str] = field(
1440
+ doc="The handle and the ground it paints; the arrow colour is picked to read on it. Default: '#f5f5f5'."
1441
+ )
1442
+ success_color: rx.Var[str] = field(
1443
+ doc="Fill of the done pill. Default: '#22c55e'."
1444
+ )
1445
+ danger_color: rx.Var[str] = field(
1446
+ doc="Tint of the handle and error label after a reject. Default: '#e5484d'."
1447
+ )
1448
+ width: rx.Var[int | float] = field(
1449
+ doc="Track width in pixels; the travel scales with it. Default: 280."
1450
+ )
1451
+ height: rx.Var[int | float] = field(
1452
+ doc="Track height in pixels; the handle is 8px smaller. Default: 56."
1453
+ )
1454
+ radius: rx.Var[int | float] = field(
1455
+ doc="Track corner radius; the handle corner is 4px smaller so the two stay concentric. Default: 28."
1456
+ )
1457
+ speed: rx.Var[int | float] = field(
1458
+ doc="How fast the unfurl and the return take over once you let go. Default: 50."
1459
+ )
1460
+ return_bounce: rx.Var[int | float] = field(
1461
+ doc="Energy left when the handle returns to the wall: 0 stops dead, 0.38 fills the 8% squash. Default: 0.38."
1462
+ )
1463
+ landing_dip: rx.Var[int | float] = field(
1464
+ doc="How much the track dips as the done pill lands. 0 removes it. Default: 0.026."
1465
+ )
1466
+ hold_ms: rx.Var[int | float] = field(
1467
+ doc="How long the done pill stands before it closes back. 0 keeps it until the component remounts. Default: 1500."
1468
+ )
1469
+ disabled: rx.Var[bool] = field(
1470
+ doc="Dims the control and ignores input. Default: false."
1471
+ )
1472
+ icon: rx.Var[rx.Component | str] = field(
1473
+ doc="Replaces the arrow in the handle."
1474
+ )
1475
+ on_confirm: rx.EventHandler[no_args_event_spec] = field(
1476
+ doc="Called when the handle reaches the end. Return a promise to show the spinner; it unfurls on resolve and springs home on reject."
1477
+ )
1478
+ on_done: rx.EventHandler[no_args_event_spec] = field(
1479
+ doc="Called when the done pill unfurls."
1480
+ )
1481
+ on_error: rx.EventHandler[lambda reason: [safe(reason)]] = field(
1482
+ doc="Called with the rejection reason; the component swallows it otherwise. Handler receives: reason."
1483
+ )
1484
+
1485
+
1486
+ class SlingButton(ReactBitsComponent):
1487
+ """Send button you pull back like a slingshot: the band stretches, a power arc arms it, and releasing fires the action with the flick's velocity.
1488
+
1489
+ Docs: https://reactbits.dev/micro/sling-button
1490
+ """
1491
+
1492
+ tag = "SlingButton"
1493
+ alias = "ReactBitsSlingButton"
1494
+ is_default = True
1495
+ _rb_category = "Micro"
1496
+ _rb_name = "SlingButton"
1497
+ _rb_files = ('SlingButton.css', 'SlingButton.jsx')
1498
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
1499
+
1500
+ pad_color: rx.Var[str] = field(
1501
+ doc="The pad fill. Default: '#f5f5f5'."
1502
+ )
1503
+ icon_color: rx.Var[str] = field(
1504
+ doc="The pad content colour. Default: '#18181b'."
1505
+ )
1506
+ accent_color: rx.Var[str] = field(
1507
+ doc="The power arc, the loaded band and the dot. Default: '#f5f5f5'."
1508
+ )
1509
+ well_color: rx.Var[str] = field(
1510
+ doc="The seat the pad rests in. Default: '#27272a'."
1511
+ )
1512
+ band_color: rx.Var[str] = field(
1513
+ doc="The band before it loads. Default: '#52525b'."
1514
+ )
1515
+ size: rx.Var[int | float] = field(
1516
+ doc="Pad diameter in pixels. Seat, hit area and dot follow. Default: 56."
1517
+ )
1518
+ stroke_width: rx.Var[int | float] = field(
1519
+ doc="Arc and band thickness in pixels. The band thins as it stretches. Default: 3."
1520
+ )
1521
+ arm_at: rx.Var[int | float] = field(
1522
+ doc="Pull distance in pixels that loads the send. Default: 48."
1523
+ )
1524
+ max_pull: rx.Var[int | float] = field(
1525
+ doc="How far the band can stretch before it stops giving. Default: 160."
1526
+ )
1527
+ launch_speed: rx.Var[int | float] = field(
1528
+ doc="Speed the band adds on release, in pixels per second. Sets how far the pad snaps through its seat. Default: 2600."
1529
+ )
1530
+ recoil: rx.Var[int | float] = field(
1531
+ doc="Bounce of the return spring. 0 stops dead. Default: 0.2."
1532
+ )
1533
+ flight: rx.Var[int | float] = field(
1534
+ doc="How far the dot flies, in pixels. Default: 120."
1535
+ )
1536
+ axis: rx.Var[Literal["any", "horizontal", "vertical"]] = field(
1537
+ doc="Free pull, or one axis with a little give across it. Default: 'any'."
1538
+ )
1539
+ tap_sends: rx.Var[bool] = field(
1540
+ doc="Whether a plain tap sends. Enter always does. Default: true."
1541
+ )
1542
+ disabled: rx.Var[bool] = field(
1543
+ doc="Dims the pad and ignores input. Default: false."
1544
+ )
1545
+ aria_label: rx.Var[str] = field(
1546
+ doc="Accessible name of the button. Default: 'Send'."
1547
+ )
1548
+ on_send: rx.EventHandler[no_args_event_spec] = field(
1549
+ doc="Called on a loaded release, on a tap when tapSends is on, and on Enter or Space."
1550
+ )
1551
+
1552
+
1553
+ class SloshGauge(ReactBitsComponent):
1554
+ """Tank gauge whose liquid chases the value with mass, tilts with its own speed and splashes against the top when it slams full; optionally a vertical slider.
1555
+
1556
+ Docs: https://reactbits.dev/micro/slosh-gauge
1557
+ """
1558
+
1559
+ tag = "SloshGauge"
1560
+ alias = "ReactBitsSloshGauge"
1561
+ is_default = True
1562
+ _rb_category = "Micro"
1563
+ _rb_name = "SloshGauge"
1564
+ _rb_files = ('SloshGauge.css', 'SloshGauge.jsx')
1565
+
1566
+ value: rx.Var[int | float] = field(
1567
+ doc="The level, 0 to 100, controlled. Every change launches the liquid toward it."
1568
+ )
1569
+ default_value: rx.Var[int | float] = field(
1570
+ doc="The starting level when uncontrolled. Default: 60."
1571
+ )
1572
+ interactive: rx.Var[bool] = field(
1573
+ doc="Press or drag the tank to set the level, arrows to step. A marker appears at the level. Default: false."
1574
+ )
1575
+ show_value: rx.Var[bool] = field(
1576
+ doc="A readout whose colour flips at the surface. Default: true."
1577
+ )
1578
+ disabled: rx.Var[bool] = field(
1579
+ doc="Dimmed and inert. Value changes still animate. Default: false."
1580
+ )
1581
+ liquid_color: rx.Var[str] = field(
1582
+ doc="The liquid. The readout over it picks dark or light by itself. Default: '#f5f5f5'."
1583
+ )
1584
+ glass_color: rx.Var[str] = field(
1585
+ doc="The tank. Default: '#27272a'."
1586
+ )
1587
+ width: rx.Var[int | float] = field(
1588
+ doc="Tank width in px. The readout scales with it. Default: 88."
1589
+ )
1590
+ height: rx.Var[int | float] = field(
1591
+ doc="Tank height in px. Default: 180."
1592
+ )
1593
+ radius: rx.Var[int | float] = field(
1594
+ doc="Corner radius in px, capped at half the smaller side. Default: 20."
1595
+ )
1596
+ ticks: rx.Var[int | float] = field(
1597
+ doc="Lines etched on the right of the glass. 0 hides them. Default: 4."
1598
+ )
1599
+ viscosity: rx.Var[int | float] = field(
1600
+ doc="0 is a rigid gauge. Higher is slower to answer, longer to settle, and overshoots more. Default: 0.15."
1601
+ )
1602
+ tilt: rx.Var[int | float] = field(
1603
+ doc="How far the surface leans per unit of speed. 0 keeps it flat. Default: 0.45."
1604
+ )
1605
+ splash: rx.Var[int | float] = field(
1606
+ doc="How much of a slam the top and bottom give back. 0 swallows it, 0.8 nearly bounces. Default: 0.42."
1607
+ )
1608
+ unit: rx.Var[str] = field(
1609
+ doc="Readout suffix. Default: '%'."
1610
+ )
1611
+ aria_label: rx.Var[str] = field(
1612
+ doc="Accessible name of the meter or slider. Default: 'Level'."
1613
+ )
1614
+ on_change: rx.EventHandler[lambda value: [safe(value)]] = field(
1615
+ doc="The integer level on press, on each change while dragging, and on keys. Interactive only. Handler receives: value."
1616
+ )
1617
+
1618
+
1619
+ class SpringCheck(ReactBitsComponent):
1620
+ """Checkbox row where a single spring fills the box, draws the tick, strikes the label and dims the words in one press.
1621
+
1622
+ Docs: https://reactbits.dev/micro/spring-check
1623
+ """
1624
+
1625
+ tag = "SpringCheck"
1626
+ alias = "ReactBitsSpringCheck"
1627
+ is_default = True
1628
+ _rb_category = "Micro"
1629
+ _rb_name = "SpringCheck"
1630
+ _rb_files = ('SpringCheck.css', 'SpringCheck.jsx')
1631
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', 'motion@12.23.21']
1632
+
1633
+ label: rx.Var[rx.Component | str] = field(
1634
+ doc="The words beside the box; the strike-through is exactly their width. Default: 'Ship the build'."
1635
+ )
1636
+ checked: rx.Var[bool] = field(
1637
+ doc="Controlled state. A change from outside animates on the spring."
1638
+ )
1639
+ default_checked: rx.Var[bool] = field(
1640
+ doc="Initial state when uncontrolled. Default: false."
1641
+ )
1642
+ disabled: rx.Var[bool] = field(
1643
+ doc="Dims the row and ignores input. Default: false."
1644
+ )
1645
+ color: rx.Var[str] = field(
1646
+ doc="Ink: the label, the ring, the rule and the focus outline. Default: '#ffffff'."
1647
+ )
1648
+ fill_color: rx.Var[str] = field(
1649
+ doc="The fill that swells out of the box centre. Default: '#ffffff'."
1650
+ )
1651
+ check_color: rx.Var[str] = field(
1652
+ doc="Stroke of the tick drawn over the fill. Default: '#0b0b0f'."
1653
+ )
1654
+ box_size: rx.Var[int | float] = field(
1655
+ doc="Box side in pixels; ring, gap and row height derive from it. Default: 28."
1656
+ )
1657
+ box_radius: rx.Var[int | float] = field(
1658
+ doc="Box corner radius in pixels; half the size makes a circle. Default: 9."
1659
+ )
1660
+ font_size: rx.Var[int | float] = field(
1661
+ doc="Label size in pixels; the rule thickness derives from it. Default: 18."
1662
+ )
1663
+ bounce: rx.Var[int | float] = field(
1664
+ doc="How far the fill swells past full. 0 arrives dead, 0.5 rebounds twice. Default: 0.2."
1665
+ )
1666
+ strike_lag: rx.Var[int | float] = field(
1667
+ doc="Where on the spring the rule starts: 0 wipes with the fill, 0.4 waits for the tick. Default: 0.12."
1668
+ )
1669
+ done_opacity: rx.Var[int | float] = field(
1670
+ doc="How much ink the words keep once checked. Default: 0.42."
1671
+ )
1672
+ strike: rx.Var[Literal["left", "center", "right", "none"]] = field(
1673
+ doc="Where the strike-through wipes from, or no rule at all. Default: 'left'."
1674
+ )
1675
+ aria_label: rx.Var[str] = field(
1676
+ doc="Accessible name when the label is not text. Default: -."
1677
+ )
1678
+ on_change: rx.EventHandler[lambda checked: [safe(checked)]] = field(
1679
+ doc="Called on every toggle. Handler receives: checked."
1680
+ )
1681
+
1682
+
1683
+ class SquishSwitch(ReactBitsComponent):
1684
+ """Drag-scrubbable switch whose thumb stretches by how fast it moves, flips at the midpoint and squashes against the track end on a flick.
1685
+
1686
+ Docs: https://reactbits.dev/micro/squish-switch
1687
+ """
1688
+
1689
+ tag = "SquishSwitch"
1690
+ alias = "ReactBitsSquishSwitch"
1691
+ is_default = True
1692
+ _rb_category = "Micro"
1693
+ _rb_name = "SquishSwitch"
1694
+ _rb_files = ('SquishSwitch.css', 'SquishSwitch.jsx')
1695
+ lib_dependencies: list[str] = ['motion@12.23.21']
1696
+
1697
+ checked: rx.Var[bool] = field(
1698
+ doc="Controlled state. Leave it out to let the switch keep its own."
1699
+ )
1700
+ default_checked: rx.Var[bool] = field(
1701
+ doc="Initial state when uncontrolled. Default: false."
1702
+ )
1703
+ label: rx.Var[str] = field(
1704
+ doc="A label beside the switch, wired to it."
1705
+ )
1706
+ disabled: rx.Var[bool] = field(
1707
+ doc="Dimmed and inert. Default: false."
1708
+ )
1709
+ track_color: rx.Var[str] = field(
1710
+ doc="The track while off. Default: '#27272a'."
1711
+ )
1712
+ track_on_color: rx.Var[str] = field(
1713
+ doc="The track while on. Default: '#f5f5f5'."
1714
+ )
1715
+ thumb_color: rx.Var[str] = field(
1716
+ doc="The thumb while off. Empty mixes the on colour faintly into the track."
1717
+ )
1718
+ thumb_on_color: rx.Var[str] = field(
1719
+ doc="The thumb while on. Empty uses the off track colour."
1720
+ )
1721
+ width: rx.Var[int | float] = field(
1722
+ doc="Track width in px. Default: 76."
1723
+ )
1724
+ height: rx.Var[int | float] = field(
1725
+ doc="Track height in px. The thumb and its inset follow. Default: 38."
1726
+ )
1727
+ radius: rx.Var[int | float] = field(
1728
+ doc="Track corner radius in px, capped at half the height. Default: 19."
1729
+ )
1730
+ speed: rx.Var[int | float] = field(
1731
+ doc="Stiffness of the settle spring, 0 to 100. Low is lazy, high is snappy. Default: 50."
1732
+ )
1733
+ stretch: rx.Var[int | float] = field(
1734
+ doc="How much the thumb lengthens with speed, 0 to 100. It narrows to keep its area. Default: 36."
1735
+ )
1736
+ hover_scale: rx.Var[int | float] = field(
1737
+ doc="The thumb swells to this on hover. Default: 1.035."
1738
+ )
1739
+ color_duration: rx.Var[int | float] = field(
1740
+ doc="The colour cross-fade, in ms. Default: 320."
1741
+ )
1742
+ aria_label: rx.Var[str] = field(
1743
+ doc="Accessible name when there is no label. Default: -."
1744
+ )
1745
+ id_: rx.Var[str] = field(
1746
+ doc="Id for the switch button; the label uses it. Default: -."
1747
+ )
1748
+ on_change: rx.EventHandler[lambda checked: [safe(checked)]] = field(
1749
+ doc="A tap, a drag past the middle, or a key. Handler receives: checked."
1750
+ )
1751
+
1752
+
1753
+ class StatusMark(ReactBitsComponent):
1754
+ """A 20px status glyph for agent task lists that morphs in place from a dashed idle ring to a spinning or real-progress arc, then draws a check or a cross, with an optional label strike.
1755
+
1756
+ Docs: https://reactbits.dev/micro/status-mark
1757
+ """
1758
+
1759
+ tag = "StatusMark"
1760
+ alias = "ReactBitsStatusMark"
1761
+ is_default = True
1762
+ _rb_category = "Micro"
1763
+ _rb_name = "StatusMark"
1764
+ _rb_files = ('StatusMark.css', 'StatusMark.jsx')
1765
+ lib_dependencies: list[str] = ['motion@12.23.21']
1766
+
1767
+ status: rx.Var[Literal["pending", "running", "done", "failed", "cancelled"]] = field(
1768
+ doc="The lifecycle state. Every change morphs the glyph in place. Default: 'pending'."
1769
+ )
1770
+ progress: rx.Var[int | float] = field(
1771
+ doc="0 to 1 while running. Leave it out for an indeterminate spinning arc."
1772
+ )
1773
+ label: rx.Var[rx.Component | str] = field(
1774
+ doc="Text beside the glyph. It dims and gets struck."
1775
+ )
1776
+ color: rx.Var[str] = field(
1777
+ doc="Ring, arc, cancelled cross and label. Default: 'currentColor'."
1778
+ )
1779
+ done_color: rx.Var[str] = field(
1780
+ doc="Ring, wash and check when done. Default: '#22c55e'."
1781
+ )
1782
+ error_color: rx.Var[str] = field(
1783
+ doc="Ring, wash and cross when failed. Default: '#ef4444'."
1784
+ )
1785
+ size: rx.Var[int | float] = field(
1786
+ doc="Glyph size in pixels. The label gap is half of it. Default: 20."
1787
+ )
1788
+ stroke_width: rx.Var[int | float] = field(
1789
+ doc="Stroke width in the 24-unit box. The ring shrinks to keep its margin. Default: 2."
1790
+ )
1791
+ dashes: rx.Var[int | float] = field(
1792
+ doc="Dashes in the idle ring, the ones that fuse into the arc. Default: 8."
1793
+ )
1794
+ font_size: rx.Var[int | float] = field(
1795
+ doc="Label size in pixels. The strike scales with it. Default: 14."
1796
+ )
1797
+ spin_duration: rx.Var[int | float] = field(
1798
+ doc="Milliseconds per turn of the indeterminate arc. Default: 1100."
1799
+ )
1800
+ arc_length: rx.Var[int | float] = field(
1801
+ doc="Share of the ring the indeterminate arc covers. Default: 0.68."
1802
+ )
1803
+ draw_duration: rx.Var[int | float] = field(
1804
+ doc="Milliseconds the check or cross takes to draw. Default: 240."
1805
+ )
1806
+ fill_opacity: rx.Var[int | float] = field(
1807
+ doc="The wash inside a finished ring. Default: 0.06."
1808
+ )
1809
+ strike: rx.Var[bool] = field(
1810
+ doc="Strikes the label through when done. Default: true."
1811
+ )
1812
+ strike_delay: rx.Var[int | float] = field(
1813
+ doc="Milliseconds after the check starts before the strike wipes in. Default: 60."
1814
+ )
1815
+
1816
+
1817
+ class SwipeRow(ReactBitsComponent):
1818
+ """List row that swipes open to reveal actions, snaps by flick velocity, and deletes on a full swipe that stretches the action colour across the row.
1819
+
1820
+ Docs: https://reactbits.dev/micro/swipe-row
1821
+ """
1822
+
1823
+ tag = "SwipeRow"
1824
+ alias = "ReactBitsSwipeRow"
1825
+ is_default = True
1826
+ _rb_category = "Micro"
1827
+ _rb_name = "SwipeRow"
1828
+ _rb_files = ('SwipeRow.css', 'SwipeRow.jsx')
1829
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
1830
+
1831
+ actions: rx.Var[list[Any]] = field(
1832
+ doc="The drawer, outermost first. Each has id, label, an optional icon, an optional color for secondary actions, dismiss to fold the row when pressed, and onSelect. The first is the full-swipe action and always folds the row. Default: DEFAULT_ACTIONS."
1833
+ )
1834
+ action_color: rx.Var[str] = field(
1835
+ doc="The full-swipe block that leaps and fills the row. Default: '#e5484d'."
1836
+ )
1837
+ drawer_color: rx.Var[str] = field(
1838
+ doc="The drawer base and the secondary actions. Default: '#3f3f46'."
1839
+ )
1840
+ row_color: rx.Var[str] = field(
1841
+ doc="The surface. Default: '#27272a'."
1842
+ )
1843
+ text_color: rx.Var[str] = field(
1844
+ doc="Row text and the keyboard toggle. Default: '#f5f5f5'."
1845
+ )
1846
+ height: rx.Var[int | float] = field(
1847
+ doc="Row height in pixels. The fold closes from it. Default: 64."
1848
+ )
1849
+ radius: rx.Var[int | float] = field(
1850
+ doc="Corner radius of the row and the clipped drawer. Default: 16."
1851
+ )
1852
+ action_width: rx.Var[int | float] = field(
1853
+ doc="Width of each action in pixels, so the drawer width too. Default: 80."
1854
+ )
1855
+ direction: rx.Var[Literal["left", "right"]] = field(
1856
+ doc="Which way you swipe. Everything mirrors. Default: 'left'."
1857
+ )
1858
+ snap_bounce: rx.Var[int | float] = field(
1859
+ doc="Overshoot of the open or close settle after a flick. Slow releases never bounce. Default: 0.2."
1860
+ )
1861
+ resistance: rx.Var[int | float] = field(
1862
+ doc="How much of the finger the row keeps past the drawer, and the rubber-band beyond the commit point. Default: 0.55."
1863
+ )
1864
+ collapse_ms: rx.Var[int | float] = field(
1865
+ doc="How long a deleted row takes to fold shut. Default: 200."
1866
+ )
1867
+ commit_at: rx.Var[int | float] = field(
1868
+ doc="Fraction of the row width the surface must uncover for the block to leap and a release to delete. Default: 0.6."
1869
+ )
1870
+ full_swipe: rx.Var[bool] = field(
1871
+ doc="Off, the drawer is the end: no leap, no delete. Default: true."
1872
+ )
1873
+ disabled: rx.Var[bool] = field(
1874
+ doc="Dims the row and ignores input. Default: false."
1875
+ )
1876
+ open: rx.Var[bool] = field(
1877
+ doc="Controlled open state. Outside changes settle the row."
1878
+ )
1879
+ close_on_action: rx.Var[bool] = field(
1880
+ doc="Closes the drawer after an action is pressed. Default: true."
1881
+ )
1882
+ haptic: rx.Var[bool] = field(
1883
+ doc="A short vibration on touch when the block leaps. Default: true."
1884
+ )
1885
+ label: rx.Var[str] = field(
1886
+ doc="Accessible name of the row. Default: 'List item'."
1887
+ )
1888
+ on_open_change: rx.EventHandler[lambda open: [safe(open)]] = field(
1889
+ doc="Called when a gesture or key opens or closes the drawer. Handler receives: open."
1890
+ )
1891
+ on_action: rx.EventHandler[lambda action: [safe(action)]] = field(
1892
+ doc="Called when any action button is pressed. Handler receives: action."
1893
+ )
1894
+ on_commit: rx.EventHandler[lambda action: [safe(action)]] = field(
1895
+ doc="Called after a full swipe or a press on a folding action, once the row has shut. Remove the row here. Handler receives: action."
1896
+ )
1897
+
1898
+
1899
+ class SwipeToast(ReactBitsComponent):
1900
+ """Single toast that rises through its bottom edge, swipes down to dismiss on a flick or a distance, and burns a thin fuse for exactly its remaining time; hover pauses it and an inline mode keeps it inside any container.
1901
+
1902
+ Docs: https://reactbits.dev/micro/swipe-toast
1903
+ """
1904
+
1905
+ tag = "SwipeToast"
1906
+ alias = "ReactBitsSwipeToast"
1907
+ is_default = True
1908
+ _rb_category = "Micro"
1909
+ _rb_name = "SwipeToast"
1910
+ _rb_files = ('SwipeToast.css', 'SwipeToast.jsx')
1911
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
1912
+
1913
+ title: rx.Var[rx.Component | str] = field(
1914
+ doc="The first line. Default: 'File archived'."
1915
+ )
1916
+ description: rx.Var[rx.Component | str] = field(
1917
+ doc="The dimmer second line. Empty hides it."
1918
+ )
1919
+ icon: rx.Var[rx.Component | str] = field(
1920
+ doc="An 18px icon before the text."
1921
+ )
1922
+ action_label: rx.Var[rx.Component | str] = field(
1923
+ doc="The inverted button. Empty hides it."
1924
+ )
1925
+ open: rx.Var[bool] = field(
1926
+ doc="Flip to false to close from outside. True again re-enters. Default: true."
1927
+ )
1928
+ background: rx.Var[str] = field(
1929
+ doc="The card surface, and the action text. Default: '#27272a'."
1930
+ )
1931
+ color: rx.Var[str] = field(
1932
+ doc="Ink: title, description at 62% and the action fill. Default: '#f5f5f5'."
1933
+ )
1934
+ fuse_color: rx.Var[str] = field(
1935
+ doc="The burning line. Default: '#f5a524'."
1936
+ )
1937
+ width: rx.Var[int | float] = field(
1938
+ doc="Card width in pixels, capped at the parent when inline. Default: 356."
1939
+ )
1940
+ radius: rx.Var[int | float] = field(
1941
+ doc="Corner radius in pixels. Default: 12."
1942
+ )
1943
+ slide_ms: rx.Var[int | float] = field(
1944
+ doc="How long the rise and the drop take. Default: 400."
1945
+ )
1946
+ settle_bounce: rx.Var[int | float] = field(
1947
+ doc="Overshoot of the return after an abandoned swipe. 0 stops dead. Default: 0.2."
1948
+ )
1949
+ swipe_distance: rx.Var[int | float] = field(
1950
+ doc="How far a slow drag must go before release dismisses. A flick always does. Default: 40."
1951
+ )
1952
+ duration: rx.Var[int | float] = field(
1953
+ doc="Milliseconds until it closes itself. Changing it re-arms the fuse. 0 keeps it until dismissed. Default: 4000."
1954
+ )
1955
+ fuse: rx.Var[Literal["bottom", "top", "none"]] = field(
1956
+ doc="Which edge the line burns along. None keeps the timer but shows nothing. Default: 'bottom'."
1957
+ )
1958
+ pause_on_hover: rx.Var[bool] = field(
1959
+ doc="Hovering freezes the line and the timer. Default: true."
1960
+ )
1961
+ close_button: rx.Var[bool] = field(
1962
+ doc="Adds a cross at the end of the row. Default: false."
1963
+ )
1964
+ inline: rx.Var[bool] = field(
1965
+ doc="In flow inside the parent instead of fixed to the bottom-right of the viewport. Default: false."
1966
+ )
1967
+ dismissible: rx.Var[bool] = field(
1968
+ doc="Off removes the swipe and Escape. Default: true."
1969
+ )
1970
+ on_action: rx.EventHandler[no_args_event_spec] = field(
1971
+ doc="Called when the action is pressed, before the close."
1972
+ )
1973
+ on_close: rx.EventHandler[lambda reason: [safe(reason)]] = field(
1974
+ doc="Called after the exit, and after the inline slot has collapsed. Reason is timeout, swipe, action, close, escape or programmatic. Handler receives: reason."
1975
+ )
1976
+
1977
+
1978
+ class ThoughtLine(ReactBitsComponent):
1979
+ """Reasoning-trace header: a glyph and a label breathe beside a live clock while steps appear beneath, then the line settles on one beat into "Thought for 4.2s" through a blur crossfade and the trace folds into it.
1980
+
1981
+ Docs: https://reactbits.dev/micro/thought-line
1982
+ """
1983
+
1984
+ tag = "ThoughtLine"
1985
+ alias = "ReactBitsThoughtLine"
1986
+ is_default = True
1987
+ _rb_category = "Micro"
1988
+ _rb_name = "ThoughtLine"
1989
+ _rb_files = ('ThoughtLine.css', 'ThoughtLine.jsx')
1990
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10', 'motion@12.23.21']
1991
+
1992
+ label: rx.Var[str] = field(
1993
+ doc="The working line. It breathes, and it is the spoken text. Default: 'Thinking\u2026'."
1994
+ )
1995
+ done_label: rx.Var[str] = field(
1996
+ doc="The settled line. Empty gives \"Thought for\", or \"Done thinking\" without the timer."
1997
+ )
1998
+ render_label: rx.Var[Any] = field(
1999
+ doc="Wraps either string, for a sheen or a link. Inline content only. Default: -. Pass a JS function with rx.Var('(...) => ...')."
2000
+ )
2001
+ glyph: rx.Var[rx.Component | str] = field(
2002
+ doc="The mark that breathes and dims. Default: 'sparkle'."
2003
+ )
2004
+ steps: rx.Var[list[str]] = field(
2005
+ doc="The trace beneath the line. Append as the agent progresses; the last step is current, earlier ones tick. Default: EMPTY_STEPS."
2006
+ )
2007
+ collapsible: rx.Var[bool] = field(
2008
+ doc="The line becomes a toggle for the trace, with a chevron. Default: true."
2009
+ )
2010
+ collapse_on_settle: rx.Var[bool] = field(
2011
+ doc="Fold the trace into the line when it settles. Default: true."
2012
+ )
2013
+ color: rx.Var[str] = field(
2014
+ doc="The ink of the line and the trace. Default: 'currentColor'."
2015
+ )
2016
+ glyph_color: rx.Var[str] = field(
2017
+ doc="The glyph alone. Empty follows the ink."
2018
+ )
2019
+ font_size: rx.Var[int | float] = field(
2020
+ doc="Type size in px. Everything scales in em. Default: 16."
2021
+ )
2022
+ breath_period: rx.Var[int | float] = field(
2023
+ doc="One breath, up and down, in seconds. Default: 1.6."
2024
+ )
2025
+ breath_depth: rx.Var[int | float] = field(
2026
+ doc="How far the glyph and label dim at the trough. 0 is no breath. Default: 0.45."
2027
+ )
2028
+ shimmer: rx.Var[bool] = field(
2029
+ doc="A band of ink sweeps the working label. The label then leaves the breath to the glyph. Default: true."
2030
+ )
2031
+ shimmer_duration: rx.Var[int | float] = field(
2032
+ doc="One sweep, in seconds. Default: 1.8."
2033
+ )
2034
+ settle_duration: rx.Var[int | float] = field(
2035
+ doc="The settle chord, in ms: crossfade, dim, glide, fold. Default: 350."
2036
+ )
2037
+ settle_blur: rx.Var[int | float] = field(
2038
+ doc="Blur through the crossfade seam, in px. Default: 2."
2039
+ )
2040
+ working: rx.Var[bool] = field(
2041
+ doc="Working or settled. True again starts a new clock. Default: true."
2042
+ )
2043
+ settle_after: rx.Var[int | float] = field(
2044
+ doc="Seconds after which the line settles by itself. 0 waits for working. Default: 0."
2045
+ )
2046
+ elapsed: rx.Var[int | float] = field(
2047
+ doc="Controlled seconds. The internal clock never runs."
2048
+ )
2049
+ show_timer: rx.Var[bool] = field(
2050
+ doc="The live clock that freezes into the sentence. Default: true."
2051
+ )
2052
+ on_settle: rx.EventHandler[lambda seconds: [safe(seconds)]] = field(
2053
+ doc="Once per settle, with the frozen time. Handler receives: seconds."
2054
+ )
2055
+
2056
+
2057
+ class VoicePill(ReactBitsComponent):
2058
+ """Mic button that swells into a tinted capsule of level-driven equalizer bars and an elapsed clock while held or toggled, then relaxes back into the mic on release; simulated voice by default, real microphone as an opt-in.
2059
+
2060
+ Docs: https://reactbits.dev/micro/voice-pill
2061
+ """
2062
+
2063
+ tag = "VoicePill"
2064
+ alias = "ReactBitsVoicePill"
2065
+ is_default = True
2066
+ _rb_category = "Micro"
2067
+ _rb_name = "VoicePill"
2068
+ _rb_files = ('VoicePill.css', 'VoicePill.jsx')
2069
+ lib_dependencies: list[str] = ['@hugeicons/core-free-icons@4.3.3', '@hugeicons/react@1.1.10']
2070
+
2071
+ accent_color: rx.Var[str] = field(
2072
+ doc="The waveform, the clock and the stop mark. Default: '#f5f5f5'."
2073
+ )
2074
+ icon_color: rx.Var[str] = field(
2075
+ doc="The mic at rest, and the hover wash. Default: '#a1a1aa'."
2076
+ )
2077
+ background: rx.Var[str] = field(
2078
+ doc="The capsule surface. Default: '#27272a'."
2079
+ )
2080
+ size: rx.Var[int | float] = field(
2081
+ doc="Footprint in px. The icon, the stop mark and the clock scale with it. Default: 28."
2082
+ )
2083
+ shape: rx.Var[Literal["pill", "rounded"]] = field(
2084
+ doc="A circle that opens into a capsule, or a rounded square. Default: 'pill'."
2085
+ )
2086
+ reach: rx.Var[int | float] = field(
2087
+ doc="The room the capsule leaves before the waveform, in px. Default: 8."
2088
+ )
2089
+ show_time: rx.Var[bool] = field(
2090
+ doc="An elapsed clock in the capsule, which grows to the left to hold it. Default: true."
2091
+ )
2092
+ waveform: rx.Var[bool] = field(
2093
+ doc="A history of the level scrolling through the capsule, past the clock. Default: true."
2094
+ )
2095
+ slide_to_cancel: rx.Var[bool] = field(
2096
+ doc="While held, sliding left drags the capsule contents along and reveals Cancel. Crossing the distance scatters the bars and stops without a result. Default: true."
2097
+ )
2098
+ cancel_distance: rx.Var[int | float] = field(
2099
+ doc="How far left a held pointer slides before it cancels, in px. Default: 64."
2100
+ )
2101
+ attack: rx.Var[int | float] = field(
2102
+ doc="How fast the level rises to a louder signal, in ms. Default: 40."
2103
+ )
2104
+ release: rx.Var[int | float] = field(
2105
+ doc="How long the level hangs after the sound drops, in ms. Default: 240."
2106
+ )
2107
+ sensitivity: rx.Var[int | float] = field(
2108
+ doc="Gain on the signal before the envelope. Default: 1."
2109
+ )
2110
+ floor: rx.Var[int | float] = field(
2111
+ doc="Waveform bar height when silent, as a fraction of its box. Default: 0.1."
2112
+ )
2113
+ open_duration: rx.Var[int | float] = field(
2114
+ doc="The capsule open and close, in ms. Default: 200."
2115
+ )
2116
+ press_scale: rx.Var[int | float] = field(
2117
+ doc="Scale of the button while a pointer is down. Default: 0.95."
2118
+ )
2119
+ mode: rx.Var[Literal["auto", "hold", "toggle"]] = field(
2120
+ doc="Auto: a tap latches, a hold stops on release. Hold: release always stops. Toggle: release never stops. Default: 'auto'."
2121
+ )
2122
+ hold_after: rx.Var[int | float] = field(
2123
+ doc="In auto, the press length after which a release stops instead of latching, in ms. Default: 300."
2124
+ )
2125
+ reactive: rx.Var[Literal["simulated", "mic"]] = field(
2126
+ doc="What drives the level. Mic asks for microphone permission on the first press and stops if it is refused. Default: 'simulated'."
2127
+ )
2128
+ disabled: rx.Var[bool] = field(
2129
+ doc="Dimmed and inert. A listening pill stops. Default: false."
2130
+ )
2131
+ aria_label: rx.Var[str] = field(
2132
+ doc="Accessible name. The state is carried by aria-pressed. Default: 'Dictate'."
2133
+ )
2134
+ on_start: rx.EventHandler[lambda info: [safe(info)]] = field(
2135
+ doc="Listening began, with the requested source. Handler receives: info."
2136
+ )
2137
+ on_stop: rx.EventHandler[lambda info: [safe(info)]] = field(
2138
+ doc="Listening ended. Reason is release, tap, key, escape, blur, cancel, disabled, mic-denied or unmount; duration in ms. Handler receives: info."
2139
+ )
2140
+
2141
+
2142
+ class WakeSlider(ReactBitsComponent):
2143
+ """Range slider drawn as thin bars with no thumb: drag speed raises a wake that trails behind the handle and flattens again at rest.
2144
+
2145
+ Docs: https://reactbits.dev/micro/wake-slider
2146
+ """
2147
+
2148
+ tag = "WakeSlider"
2149
+ alias = "ReactBitsWakeSlider"
2150
+ is_default = True
2151
+ _rb_category = "Micro"
2152
+ _rb_name = "WakeSlider"
2153
+ _rb_files = ('WakeSlider.css', 'WakeSlider.jsx')
2154
+ lib_dependencies: list[str] = ['motion@12.23.21']
2155
+
2156
+ value: rx.Var[int | float] = field(
2157
+ doc="Controlled value."
2158
+ )
2159
+ default_value: rx.Var[int | float] = field(
2160
+ doc="Initial value when uncontrolled. Default: 50."
2161
+ )
2162
+ min: rx.Var[int | float] = field(
2163
+ doc="Lowest value. Default: 0."
2164
+ )
2165
+ max: rx.Var[int | float] = field(
2166
+ doc="Highest value. Default: 100."
2167
+ )
2168
+ step: rx.Var[int | float] = field(
2169
+ doc="Snapping grid. Large steps move the handle in notches, and the wake pulses per notch. Default: 1."
2170
+ )
2171
+ bars: rx.Var[int | float] = field(
2172
+ doc="How many bars draw the track. Default: 32."
2173
+ )
2174
+ height: rx.Var[int | float] = field(
2175
+ doc="Full bar height in pixels, the ceiling of the wake. Default: 56."
2176
+ )
2177
+ rest_height: rx.Var[int | float] = field(
2178
+ doc="Bar height at rest in pixels. Default: 12."
2179
+ )
2180
+ gap: rx.Var[int | float] = field(
2181
+ doc="Space between bars in pixels. Default: 4."
2182
+ )
2183
+ fill_color: rx.Var[str] = field(
2184
+ doc="Lit bars, up to the value. Default: '#f5f5f5'."
2185
+ )
2186
+ track_color: rx.Var[str] = field(
2187
+ doc="Unlit bars. Default: '#27272a'."
2188
+ )
2189
+ crest_color: rx.Var[str] = field(
2190
+ doc="Optional tint the raised bars take on by their lift. Empty renders no tint layer."
2191
+ )
2192
+ sensitivity: rx.Var[int | float] = field(
2193
+ doc="How easily speed raises the wake. Low needs a flick; high lifts it on a stroll. Default: 1."
2194
+ )
2195
+ reach: rx.Var[int | float] = field(
2196
+ doc="Half-width of the wake at full speed, in bars. Default: 6."
2197
+ )
2198
+ skew: rx.Var[int | float] = field(
2199
+ doc="How much wider the wake is behind the handle than ahead. 0 is symmetric. Default: 0.6."
2200
+ )
2201
+ glide: rx.Var[int | float] = field(
2202
+ doc="Seconds the handle takes to settle. Short hugs the finger; long floats behind it. Default: 0.3."
2203
+ )
2204
+ smoothing: rx.Var[int | float] = field(
2205
+ doc="Milliseconds of velocity lag. Low twitches with every change of speed; high lingers. Default: 100."
2206
+ )
2207
+ show_value: rx.Var[bool] = field(
2208
+ doc="Shows the value beside the track. Default: false."
2209
+ )
2210
+ format_value: rx.Var[Any] = field(
2211
+ doc="Formats the readout and the announced value. Default: -. Pass a JS function with rx.Var('(...) => ...')."
2212
+ )
2213
+ disabled: rx.Var[bool] = field(
2214
+ doc="Fades the slider and ignores input. Default: false."
2215
+ )
2216
+ aria_label: rx.Var[str] = field(
2217
+ doc="Accessible name of the slider. Default: 'Value'."
2218
+ )
2219
+ on_change: rx.EventHandler[lambda value: [safe(value)]] = field(
2220
+ doc="Called on every committed change, from the pointer or the keyboard. Handler receives: value."
2221
+ )
2222
+
2223
+
2224
+ class WarmTooltip(ReactBitsComponent):
2225
+ """Tooltip group with one shared delay: the first label waits and pops from its trigger, then siblings open instantly while the group is warm, with an optional velocity lean.
2226
+
2227
+ Docs: https://reactbits.dev/micro/warm-tooltip
2228
+ """
2229
+
2230
+ tag = "WarmTooltip"
2231
+ alias = "ReactBitsWarmTooltip"
2232
+ is_default = True
2233
+ _rb_category = "Micro"
2234
+ _rb_name = "WarmTooltip"
2235
+ _rb_files = ('WarmTooltip.css', 'WarmTooltip.jsx')
2236
+ lib_dependencies: list[str] = ['motion@12.23.21']
2237
+
2238
+ content: rx.Var[rx.Component | str] = field(
2239
+ doc="The label. Keep it to a few words. Default: -."
2240
+ )
2241
+ shortcut: rx.Var[rx.Component | str] = field(
2242
+ doc="Optional keyboard shortcut, drawn as a keycap beside the label."
2243
+ )
2244
+ side: rx.Var[Literal["top", "bottom", "left", "right"]] = field(
2245
+ doc="The edge the label hangs from; also where the fuse runs and the pop originates. Default: 'top'."
2246
+ )
2247
+ delay: rx.Var[int | float] = field(
2248
+ doc="How long a cold open waits, in milliseconds. Inherits the group value when omitted. Default: 400."
2249
+ )
2250
+ warm_window: rx.Var[int | float] = field(
2251
+ doc="How long after this label closes the group stays warm. Inherits the group value when omitted. Default: 300."
2252
+ )
2253
+ surface_color: rx.Var[str] = field(
2254
+ doc="Label background, arrow and fuse. Default: '#f5f5f5'."
2255
+ )
2256
+ ink_color: rx.Var[str] = field(
2257
+ doc="Label text; the keycap is tinted from it. Default: '#18181b'."
2258
+ )
2259
+ size: rx.Var[Literal["sm", "md", "lg"]] = field(
2260
+ doc="Font size and padding of the label. Default: 'md'."
2261
+ )
2262
+ radius: rx.Var[int | float] = field(
2263
+ doc="Corner radius of the label in pixels. Default: 8."
2264
+ )
2265
+ gap: rx.Var[int | float] = field(
2266
+ doc="Distance between the trigger edge and the label. Default: 8."
2267
+ )
2268
+ arrow: rx.Var[bool] = field(
2269
+ doc="Shows the pointer on the anchored edge. Default: true."
2270
+ )
2271
+ pop_duration: rx.Var[int | float] = field(
2272
+ doc="Cold pop-in time in milliseconds; the exit takes 0.8 of it. Default: 160."
2273
+ )
2274
+ pop_scale: rx.Var[int | float] = field(
2275
+ doc="Scale the label pops from. 1 makes it a fade. Default: 0.94."
2276
+ )
2277
+ pop_blur: rx.Var[int | float] = field(
2278
+ doc="Blur in pixels the label arrives through. Default: 4."
2279
+ )
2280
+ show_fuse: rx.Var[bool] = field(
2281
+ doc="Draws a thin line along the trigger edge that fills over the delay, or over the long press on touch. Default: false."
2282
+ )
2283
+ long_press: rx.Var[int | float] = field(
2284
+ doc="Hold time in milliseconds that opens the label on touch; the click that follows is swallowed. Default: 500."
2285
+ )
2286
+ disabled: rx.Var[bool] = field(
2287
+ doc="No open path; an open label closes. Default: false."
2288
+ )
2289
+
2290
+
2291
+ class WarmTooltipGroup(ReactBitsComponent):
2292
+ """Groups WarmTooltips so moving between them skips the open delay."""
2293
+
2294
+ tag = "WarmTooltipGroup"
2295
+ alias = "ReactBitsWarmTooltipGroup"
2296
+ is_default = False
2297
+ _rb_category = "Micro"
2298
+ _rb_name = "WarmTooltip"
2299
+ _rb_files = ('WarmTooltip.css', 'WarmTooltip.jsx')
2300
+ lib_dependencies: list[str] = ['motion@12.23.21']
2301
+
2302
+ delay: rx.Var[int | float] = field(doc="Open delay in ms.")
2303
+ warm_window: rx.Var[int | float] = field(doc="How long (ms) the group stays warm.")
2304
+
2305
+
2306
+ bell_toggle = BellToggle.create
2307
+ branched_menu = BranchedMenu.create
2308
+ call_chip = CallChip.create
2309
+ code_slots = CodeSlots.create
2310
+ comet_dial = CometDial.create
2311
+ dodge_field = DodgeField.create
2312
+ folder_float = FolderFloat.create
2313
+ fuse_button = FuseButton.create
2314
+ glide_select = GlideSelect.create
2315
+ hold_button = HoldButton.create
2316
+ jelly_radio = JellyRadio.create
2317
+ lattice_loader = LatticeLoader.create
2318
+ peek_rating = PeekRating.create
2319
+ prompt_bar = PromptBar.create
2320
+ pulse_heart = PulseHeart.create
2321
+ refine_frame = RefineFrame.create
2322
+ rubber_segment = RubberSegment.create
2323
+ scrub_field = ScrubField.create
2324
+ slide_commit = SlideCommit.create
2325
+ sling_button = SlingButton.create
2326
+ slosh_gauge = SloshGauge.create
2327
+ spring_check = SpringCheck.create
2328
+ squish_switch = SquishSwitch.create
2329
+ status_mark = StatusMark.create
2330
+ swipe_row = SwipeRow.create
2331
+ swipe_toast = SwipeToast.create
2332
+ thought_line = ThoughtLine.create
2333
+ voice_pill = VoicePill.create
2334
+ wake_slider = WakeSlider.create
2335
+ warm_tooltip = WarmTooltip.create
2336
+ warm_tooltip_group = WarmTooltipGroup.create