@fungi.computer/caps 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1125 -2
- package/dist/blocks/app-bar.d.ts +43 -0
- package/dist/blocks/app-bar.js +244 -0
- package/dist/blocks/app-status-bar.d.ts +93 -0
- package/dist/blocks/app-status-bar.js +42 -0
- package/dist/blocks/async-state.d.ts +21 -0
- package/dist/blocks/async-state.js +8 -0
- package/dist/blocks/card-grid.d.ts +11 -0
- package/dist/blocks/card-grid.js +21 -0
- package/dist/blocks/command-menu.d.ts +26 -0
- package/dist/blocks/command-menu.js +70 -0
- package/dist/blocks/composer.d.ts +23 -0
- package/dist/blocks/composer.js +13 -0
- package/dist/blocks/empty-state.d.ts +59 -0
- package/dist/blocks/empty-state.js +35 -0
- package/dist/blocks/faq-chat.d.ts +62 -0
- package/dist/blocks/faq-chat.js +77 -0
- package/dist/blocks/game-share-card.d.ts +17 -0
- package/dist/blocks/game-share-card.js +9 -0
- package/dist/blocks/launcher-grid.d.ts +50 -0
- package/dist/blocks/launcher-grid.js +11 -0
- package/dist/blocks/listing-detail.d.ts +23 -0
- package/dist/blocks/listing-detail.js +12 -0
- package/dist/blocks/loading-state.d.ts +5 -0
- package/dist/blocks/loading-state.js +8 -0
- package/dist/blocks/mosaic.d.ts +29 -0
- package/dist/blocks/mosaic.js +19 -0
- package/dist/blocks/permission-grid.d.ts +45 -0
- package/dist/blocks/permission-grid.js +14 -0
- package/dist/blocks/pricing-card.d.ts +53 -0
- package/dist/blocks/pricing-card.js +12 -0
- package/dist/blocks/release-tag.d.ts +20 -0
- package/dist/blocks/release-tag.js +10 -0
- package/dist/blocks/resource-select.d.ts +22 -0
- package/dist/blocks/resource-select.js +16 -0
- package/dist/blocks/result-state.d.ts +15 -0
- package/dist/blocks/result-state.js +8 -0
- package/dist/blocks/section-card.d.ts +31 -0
- package/dist/blocks/section-card.js +7 -0
- package/dist/blocks/section-heading.d.ts +13 -0
- package/dist/blocks/section-heading.js +11 -0
- package/dist/blocks/spec-sheet.d.ts +125 -0
- package/dist/blocks/spec-sheet.js +47 -0
- package/dist/blocks/status-tray.d.ts +83 -0
- package/dist/blocks/status-tray.js +79 -0
- package/dist/blocks/upload-queue.d.ts +48 -0
- package/dist/blocks/upload-queue.js +24 -0
- package/dist/components/action-row.d.ts +16 -0
- package/dist/components/action-row.js +11 -0
- package/dist/components/activity-line.d.ts +33 -0
- package/dist/components/activity-line.js +69 -0
- package/dist/components/alert.d.ts +17 -0
- package/dist/components/alert.js +17 -0
- package/dist/components/badge.d.ts +19 -0
- package/dist/components/badge.js +24 -0
- package/dist/components/button.d.ts +55 -0
- package/dist/components/button.js +230 -0
- package/dist/components/card.d.ts +61 -0
- package/dist/components/card.js +48 -0
- package/dist/components/chat-bubble.d.ts +34 -0
- package/dist/components/chat-bubble.js +10 -0
- package/dist/components/checkbox-bead.d.ts +6 -0
- package/dist/components/checkbox-bead.js +67 -0
- package/dist/components/checkbox.d.ts +21 -0
- package/dist/components/checkbox.js +46 -0
- package/dist/components/code-input.d.ts +35 -0
- package/dist/components/code-input.js +126 -0
- package/dist/components/combobox.d.ts +86 -0
- package/dist/components/combobox.js +218 -0
- package/dist/components/confirm-action.d.ts +23 -0
- package/dist/components/confirm-action.js +64 -0
- package/dist/components/copy-field.d.ts +53 -0
- package/dist/components/copy-field.js +49 -0
- package/dist/components/count-badge.d.ts +15 -0
- package/dist/components/count-badge.js +9 -0
- package/dist/components/cover-pattern.d.ts +19 -0
- package/dist/components/cover-pattern.js +74 -0
- package/dist/components/data-list.d.ts +25 -0
- package/dist/components/data-list.js +16 -0
- package/dist/components/dialog.d.ts +39 -0
- package/dist/components/dialog.js +73 -0
- package/dist/components/diff-view.d.ts +14 -0
- package/dist/components/diff-view.js +13 -0
- package/dist/components/disclosure.d.ts +29 -0
- package/dist/components/disclosure.js +19 -0
- package/dist/components/dropdown-menu.d.ts +49 -0
- package/dist/components/dropdown-menu.js +98 -0
- package/dist/components/field-guide.d.ts +41 -0
- package/dist/components/field-guide.js +18 -0
- package/dist/components/field.d.ts +164 -0
- package/dist/components/field.js +228 -0
- package/dist/components/game-feedback.d.ts +84 -0
- package/dist/components/game-feedback.js +48 -0
- package/dist/components/game-hud.d.ts +126 -0
- package/dist/components/game-hud.js +136 -0
- package/dist/components/generation-frame.d.ts +36 -0
- package/dist/components/generation-frame.js +97 -0
- package/dist/components/gooey.d.ts +32 -0
- package/dist/components/gooey.js +25 -0
- package/dist/components/hold-button.d.ts +26 -0
- package/dist/components/hold-button.js +115 -0
- package/dist/components/icon-button.d.ts +24 -0
- package/dist/components/icon-button.js +18 -0
- package/dist/components/icon-checkbox.d.ts +20 -0
- package/dist/components/icon-checkbox.js +9 -0
- package/dist/components/icon-choice-mark.d.ts +6 -0
- package/dist/components/icon-choice-mark.js +5 -0
- package/dist/components/icon-lamp.d.ts +42 -0
- package/dist/components/icon-lamp.js +15 -0
- package/dist/components/icon-radio.d.ts +16 -0
- package/dist/components/icon-radio.js +9 -0
- package/dist/components/inline-code.d.ts +3 -0
- package/dist/components/inline-code.js +7 -0
- package/dist/components/input-group.d.ts +9 -0
- package/dist/components/input-group.js +15 -0
- package/dist/components/input.d.ts +15 -0
- package/dist/components/input.js +15 -0
- package/dist/components/item-grid.d.ts +110 -0
- package/dist/components/item-grid.js +136 -0
- package/dist/components/keycap.d.ts +80 -0
- package/dist/components/keycap.js +18 -0
- package/dist/components/label.d.ts +13 -0
- package/dist/components/label.js +7 -0
- package/dist/components/listbox.d.ts +50 -0
- package/dist/components/listbox.js +134 -0
- package/dist/components/loader-blobs.d.ts +5 -0
- package/dist/components/loader-blobs.js +128 -0
- package/dist/components/loader.d.ts +21 -0
- package/dist/components/loader.js +25 -0
- package/dist/components/markdown.d.ts +23 -0
- package/dist/components/markdown.js +70 -0
- package/dist/components/minimap-labels.d.ts +39 -0
- package/dist/components/minimap-labels.js +113 -0
- package/dist/components/monogram.d.ts +32 -0
- package/dist/components/monogram.js +24 -0
- package/dist/components/motion-visibility.d.ts +2 -0
- package/dist/components/motion-visibility.js +25 -0
- package/dist/components/navigation-rail.d.ts +11 -0
- package/dist/components/navigation-rail.js +55 -0
- package/dist/components/overlay-root.d.ts +16 -0
- package/dist/components/overlay-root.js +24 -0
- package/dist/components/pixel-number.d.ts +50 -0
- package/dist/components/pixel-number.js +113 -0
- package/dist/components/popover.d.ts +31 -0
- package/dist/components/popover.js +24 -0
- package/dist/components/presence.d.ts +59 -0
- package/dist/components/presence.js +232 -0
- package/dist/components/price-tag.d.ts +11 -0
- package/dist/components/price-tag.js +6 -0
- package/dist/components/progress.d.ts +25 -0
- package/dist/components/progress.js +24 -0
- package/dist/components/prose.d.ts +14 -0
- package/dist/components/prose.js +10 -0
- package/dist/components/quota-meter.d.ts +24 -0
- package/dist/components/quota-meter.js +11 -0
- package/dist/components/radio-bead.d.ts +4 -0
- package/dist/components/radio-bead.js +53 -0
- package/dist/components/radio-group.d.ts +54 -0
- package/dist/components/radio-group.js +64 -0
- package/dist/components/resize-handle.d.ts +23 -0
- package/dist/components/resize-handle.js +31 -0
- package/dist/components/rough-drawing.d.ts +42 -0
- package/dist/components/rough-drawing.js +231 -0
- package/dist/components/rough.d.ts +68 -0
- package/dist/components/rough.js +33 -0
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.js +96 -0
- package/dist/components/scroll-motion.d.ts +12 -0
- package/dist/components/scroll-motion.js +31 -0
- package/dist/components/scroll-to-bottom-blob-state.d.ts +40 -0
- package/dist/components/scroll-to-bottom-blob-state.js +109 -0
- package/dist/components/scroll-to-bottom-blob.d.ts +16 -0
- package/dist/components/scroll-to-bottom-blob.js +174 -0
- package/dist/components/select.d.ts +9 -0
- package/dist/components/select.js +12 -0
- package/dist/components/selectable.d.ts +13 -0
- package/dist/components/selectable.js +45 -0
- package/dist/components/send-action.d.ts +33 -0
- package/dist/components/send-action.js +96 -0
- package/dist/components/separator.d.ts +11 -0
- package/dist/components/separator.js +7 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +7 -0
- package/dist/components/slider.d.ts +18 -0
- package/dist/components/slider.js +31 -0
- package/dist/components/stat.d.ts +17 -0
- package/dist/components/stat.js +7 -0
- package/dist/components/status-bead.d.ts +9 -0
- package/dist/components/status-bead.js +107 -0
- package/dist/components/status-mark.d.ts +12 -0
- package/dist/components/status-mark.js +177 -0
- package/dist/components/status.d.ts +38 -0
- package/dist/components/status.js +28 -0
- package/dist/components/store-card.d.ts +21 -0
- package/dist/components/store-card.js +10 -0
- package/dist/components/surface.d.ts +89 -0
- package/dist/components/surface.js +31 -0
- package/dist/components/switch-bead.d.ts +4 -0
- package/dist/components/switch-bead.js +62 -0
- package/dist/components/switch.d.ts +11 -0
- package/dist/components/switch.js +36 -0
- package/dist/components/tabs.d.ts +55 -0
- package/dist/components/tabs.js +81 -0
- package/dist/components/technonomicon.d.ts +192 -0
- package/dist/components/technonomicon.js +121 -0
- package/dist/components/textarea.d.ts +9 -0
- package/dist/components/textarea.js +11 -0
- package/dist/components/toaster.d.ts +4 -0
- package/dist/components/toaster.js +13 -0
- package/dist/components/tool-call-chip.d.ts +22 -0
- package/dist/components/tool-call-chip.js +100 -0
- package/dist/components/tooltip.d.ts +41 -0
- package/dist/components/tooltip.js +169 -0
- package/dist/components/trading-card.d.ts +60 -0
- package/dist/components/trading-card.js +13 -0
- package/dist/components/undo-action.d.ts +52 -0
- package/dist/components/undo-action.js +100 -0
- package/dist/components/undo-toast.d.ts +21 -0
- package/dist/components/undo-toast.js +58 -0
- package/dist/components/visually-hidden.d.ts +9 -0
- package/dist/components/visually-hidden.js +11 -0
- package/dist/components/window.d.ts +65 -0
- package/dist/components/window.js +31 -0
- package/dist/components/wizard.d.ts +17 -0
- package/dist/components/wizard.js +19 -0
- package/dist/enhance/cigarette-card.d.ts +8 -0
- package/dist/enhance/cigarette-card.js +33 -0
- package/dist/enhance/sketch.d.ts +16 -0
- package/dist/enhance/sketch.js +130 -0
- package/dist/form-error.d.ts +7 -0
- package/dist/form-error.js +14 -0
- package/dist/form-fields.d.ts +15 -0
- package/dist/form-fields.js +250 -0
- package/dist/form-schema.d.ts +166 -0
- package/dist/form-schema.js +398 -0
- package/dist/form.d.ts +30 -0
- package/dist/form.js +20 -0
- package/dist/lib/cn.d.ts +8 -0
- package/dist/lib/cn.js +12 -0
- package/dist/lib/format-money.d.ts +2 -0
- package/dist/lib/format-money.js +22 -0
- package/dist/lib/glide.d.ts +12 -0
- package/dist/lib/glide.js +143 -0
- package/dist/lib/ime.d.ts +3 -0
- package/dist/lib/ime.js +8 -0
- package/dist/lib/motion-spring.d.ts +27 -0
- package/dist/lib/motion-spring.js +36 -0
- package/dist/lib/motion.d.ts +51 -0
- package/dist/lib/motion.js +161 -0
- package/dist/lib/reorder-motion.d.ts +13 -0
- package/dist/lib/reorder-motion.js +201 -0
- package/dist/lib/seed-hash.d.ts +6 -0
- package/dist/lib/seed-hash.js +13 -0
- package/dist/lib/tanstack-highlight.d.ts +4 -0
- package/dist/lib/tanstack-highlight.js +41 -0
- package/dist/schema-form.d.ts +120 -0
- package/dist/schema-form.js +129 -0
- package/dist/styles.css +18814 -0
- package/docs/api/README.md +134 -0
- package/docs/api/blocks/app-bar.md +227 -0
- package/docs/api/blocks/app-status-bar.md +257 -0
- package/docs/api/blocks/async-state.md +53 -0
- package/docs/api/blocks/card-grid.md +31 -0
- package/docs/api/blocks/command-menu.md +89 -0
- package/docs/api/blocks/composer.md +40 -0
- package/docs/api/blocks/empty-state.md +97 -0
- package/docs/api/blocks/faq-chat.md +147 -0
- package/docs/api/blocks/game-share-card.md +40 -0
- package/docs/api/blocks/launcher-grid.md +86 -0
- package/docs/api/blocks/listing-detail.md +51 -0
- package/docs/api/blocks/loading-state.md +21 -0
- package/docs/api/blocks/mosaic.md +94 -0
- package/docs/api/blocks/permission-grid.md +79 -0
- package/docs/api/blocks/pricing-card.md +90 -0
- package/docs/api/blocks/release-tag.md +62 -0
- package/docs/api/blocks/resource-select.md +126 -0
- package/docs/api/blocks/result-state.md +42 -0
- package/docs/api/blocks/section-card.md +42 -0
- package/docs/api/blocks/section-heading.md +61 -0
- package/docs/api/blocks/spec-sheet.md +400 -0
- package/docs/api/blocks/status-tray.md +141 -0
- package/docs/api/blocks/upload-queue.md +110 -0
- package/docs/api/components/action-row.md +51 -0
- package/docs/api/components/activity-line.md +103 -0
- package/docs/api/components/alert.md +60 -0
- package/docs/api/components/badge.md +77 -0
- package/docs/api/components/button.md +94 -0
- package/docs/api/components/card.md +165 -0
- package/docs/api/components/chat-bubble.md +66 -0
- package/docs/api/components/checkbox-bead.md +20 -0
- package/docs/api/components/checkbox.md +42 -0
- package/docs/api/components/code-input.md +61 -0
- package/docs/api/components/combobox.md +303 -0
- package/docs/api/components/confirm-action.md +58 -0
- package/docs/api/components/copy-field.md +106 -0
- package/docs/api/components/count-badge.md +39 -0
- package/docs/api/components/cover-pattern.md +43 -0
- package/docs/api/components/data-list.md +80 -0
- package/docs/api/components/dialog.md +235 -0
- package/docs/api/components/diff-view.md +59 -0
- package/docs/api/components/disclosure.md +71 -0
- package/docs/api/components/dropdown-menu.md +269 -0
- package/docs/api/components/field-guide.md +174 -0
- package/docs/api/components/field.md +252 -0
- package/docs/api/components/game-feedback.md +157 -0
- package/docs/api/components/game-hud.md +359 -0
- package/docs/api/components/generation-frame.md +59 -0
- package/docs/api/components/hold-button.md +44 -0
- package/docs/api/components/icon-button.md +56 -0
- package/docs/api/components/icon-checkbox.md +42 -0
- package/docs/api/components/icon-choice-mark.md +31 -0
- package/docs/api/components/icon-lamp.md +92 -0
- package/docs/api/components/icon-radio.md +42 -0
- package/docs/api/components/inline-code.md +21 -0
- package/docs/api/components/input-group.md +53 -0
- package/docs/api/components/input.md +54 -0
- package/docs/api/components/item-grid.md +262 -0
- package/docs/api/components/keycap.md +102 -0
- package/docs/api/components/label.md +40 -0
- package/docs/api/components/listbox.md +131 -0
- package/docs/api/components/loader-blobs.md +9 -0
- package/docs/api/components/loader.md +51 -0
- package/docs/api/components/markdown.md +91 -0
- package/docs/api/components/minimap-labels.md +84 -0
- package/docs/api/components/monogram.md +96 -0
- package/docs/api/components/motion-visibility.md +9 -0
- package/docs/api/components/navigation-rail.md +37 -0
- package/docs/api/components/overlay-root.md +92 -0
- package/docs/api/components/pixel-number.md +120 -0
- package/docs/api/components/popover.md +80 -0
- package/docs/api/components/presence.md +106 -0
- package/docs/api/components/price-tag.md +48 -0
- package/docs/api/components/progress.md +90 -0
- package/docs/api/components/prose.md +48 -0
- package/docs/api/components/quota-meter.md +47 -0
- package/docs/api/components/radio-bead.md +9 -0
- package/docs/api/components/radio-group.md +126 -0
- package/docs/api/components/resize-handle.md +46 -0
- package/docs/api/components/rough-drawing.md +122 -0
- package/docs/api/components/rough.md +66 -0
- package/docs/api/components/scroll-area.md +22 -0
- package/docs/api/components/scroll-motion.md +9 -0
- package/docs/api/components/scroll-to-bottom-blob-state.md +162 -0
- package/docs/api/components/scroll-to-bottom-blob.md +73 -0
- package/docs/api/components/select.md +39 -0
- package/docs/api/components/send-action.md +58 -0
- package/docs/api/components/separator.md +38 -0
- package/docs/api/components/skeleton.md +31 -0
- package/docs/api/components/slider.md +70 -0
- package/docs/api/components/stat.md +42 -0
- package/docs/api/components/status-bead.md +19 -0
- package/docs/api/components/status-mark.md +19 -0
- package/docs/api/components/status.md +105 -0
- package/docs/api/components/store-card.md +53 -0
- package/docs/api/components/surface.md +161 -0
- package/docs/api/components/switch-bead.md +9 -0
- package/docs/api/components/switch.md +40 -0
- package/docs/api/components/tabs.md +138 -0
- package/docs/api/components/technonomicon.md +773 -0
- package/docs/api/components/textarea.md +40 -0
- package/docs/api/components/toaster.md +29 -0
- package/docs/api/components/tool-call-chip.md +68 -0
- package/docs/api/components/tooltip.md +113 -0
- package/docs/api/components/trading-card.md +95 -0
- package/docs/api/components/undo-action.md +117 -0
- package/docs/api/components/undo-toast.md +49 -0
- package/docs/api/components/visually-hidden.md +37 -0
- package/docs/api/components/window.md +291 -0
- package/docs/api/components/wizard.md +65 -0
- package/docs/api/enhance/cigarette-card.md +52 -0
- package/docs/api/enhance/sketch.md +42 -0
- package/docs/api/form.md +1623 -0
- package/docs/api/lib/cn.md +46 -0
- package/docs/api/lib/format-money.md +30 -0
- package/docs/api/lib/glide.md +36 -0
- package/docs/api/lib/ime.md +29 -0
- package/docs/api/lib/motion-spring.md +91 -0
- package/docs/api/lib/motion.md +212 -0
- package/docs/api/lib/reorder-motion.md +46 -0
- package/docs/api/lib/seed-hash.md +31 -0
- package/docs/api/lib/tanstack-highlight.md +40 -0
- package/package.json +597 -3
- package/src/app-status-bar.css +158 -0
- package/src/fonts.css +1 -0
- package/src/status-tray.css +282 -0
- package/src/styles.css +10177 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/icon-radio
|
|
8
|
+
|
|
9
|
+
# components/icon-radio
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### IconRadioProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type IconRadioProps = object &
|
|
17
|
+
Omit<RadioGroupItemProps, "children" | "indicator">;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Props accepted by IconRadio. Use it inside the existing RadioGroup.
|
|
21
|
+
|
|
22
|
+
#### Type Declaration
|
|
23
|
+
|
|
24
|
+
| Name | Type | Description |
|
|
25
|
+
| ---------- | ----------- | ----------------------------------------------------------------- |
|
|
26
|
+
| `label` | `string` | - |
|
|
27
|
+
| `icon` | `ReactNode` | - |
|
|
28
|
+
| `caption?` | `string` | A short visible legend; it does not replace the accessible label. |
|
|
29
|
+
|
|
30
|
+
## Variables
|
|
31
|
+
|
|
32
|
+
### IconRadio
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
const IconRadio: ForwardRefExoticComponent<
|
|
36
|
+
object &
|
|
37
|
+
Omit<RadioGroupItemProps, "children" | "indicator"> &
|
|
38
|
+
RefAttributes<HTMLInputElement>
|
|
39
|
+
>;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
One icon choice in a native, mutually exclusive Caps RadioGroup.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/inline-code
|
|
8
|
+
|
|
9
|
+
# components/inline-code
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
### InlineCode
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const InlineCode: ForwardRefExoticComponent<
|
|
17
|
+
HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>
|
|
18
|
+
>;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
A subdued inline code value for identifiers and other technical labels.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/input-group
|
|
8
|
+
|
|
9
|
+
# components/input-group
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### InputGroupProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type InputGroupProps = HTMLAttributes<HTMLDivElement>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Props accepted by InputGroup.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### InputGroupAddonProps
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
type InputGroupAddonProps = HTMLAttributes<HTMLDivElement>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Props accepted by InputGroupAddon.
|
|
30
|
+
|
|
31
|
+
## Variables
|
|
32
|
+
|
|
33
|
+
### InputGroup
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
const InputGroup: ForwardRefExoticComponent<
|
|
37
|
+
InputGroupProps & RefAttributes<HTMLDivElement>
|
|
38
|
+
>;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Join a control with caller-owned prefixes, suffixes, or actions.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### InputGroupAddon
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
const InputGroupAddon: ForwardRefExoticComponent<
|
|
49
|
+
InputGroupAddonProps & RefAttributes<HTMLDivElement>
|
|
50
|
+
>;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
An addon region for an InputGroup.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/input
|
|
8
|
+
|
|
9
|
+
# components/input
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### InputProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type InputProps = object & InputHTMLAttributes<HTMLInputElement>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Props accepted by Input.
|
|
20
|
+
|
|
21
|
+
#### Type Declaration
|
|
22
|
+
|
|
23
|
+
| Name | Type |
|
|
24
|
+
| ---------- | --------- |
|
|
25
|
+
| `invalid?` | `boolean` |
|
|
26
|
+
|
|
27
|
+
## Variables
|
|
28
|
+
|
|
29
|
+
### Input
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
const Input: ForwardRefExoticComponent<
|
|
33
|
+
object &
|
|
34
|
+
InputHTMLAttributes<HTMLInputElement> &
|
|
35
|
+
RefAttributes<HTMLInputElement>
|
|
36
|
+
>;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
A styled native text input that preserves caller-owned value and event behavior.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### SearchInput
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
const SearchInput: ForwardRefExoticComponent<
|
|
47
|
+
object &
|
|
48
|
+
InputHTMLAttributes<HTMLInputElement> &
|
|
49
|
+
object &
|
|
50
|
+
RefAttributes<HTMLInputElement>
|
|
51
|
+
>;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
A native search input with an optional decorative leading icon.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/item-grid
|
|
8
|
+
|
|
9
|
+
# components/item-grid
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ItemGridItem
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ItemGridItem = object;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
One item placed on the grid. Coordinates are cells from the top left.
|
|
20
|
+
|
|
21
|
+
#### Properties
|
|
22
|
+
|
|
23
|
+
##### id
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
id: string;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
##### label
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
label: string;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Accessible name, e.g. "Axe" or "Bread".
|
|
36
|
+
|
|
37
|
+
##### x
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
x: number;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
##### y
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
y: number;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
##### w?
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
optional w?: number;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Footprint width in cells after rotation. Defaults to 1.
|
|
56
|
+
|
|
57
|
+
##### h?
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
optional h?: number;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Footprint height in cells after rotation. Defaults to 1.
|
|
64
|
+
|
|
65
|
+
##### icon?
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
optional icon?: ReactNode;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Decorative art: a sprite, an image or an SVG.
|
|
72
|
+
|
|
73
|
+
##### quantity?
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
optional quantity?: number;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Stack count, drawn in pixel numerals when above 1.
|
|
80
|
+
|
|
81
|
+
##### selected?
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
optional selected?: boolean;
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### ItemGridGhost
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
type ItemGridGhost = object;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
A drop preview: where the held item would land, and whether it may.
|
|
96
|
+
|
|
97
|
+
#### Properties
|
|
98
|
+
|
|
99
|
+
##### x
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
x: number;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
##### y
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
y: number;
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
##### w
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
w: number;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
##### h
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
h: number;
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
##### legal
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
legal: boolean;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
##### reason?
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
optional reason?: string;
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Why an illegal drop is refused, in the host's words.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### ItemGridCell
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
type ItemGridCell = object;
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
A grid cell, with the item covering it if any.
|
|
146
|
+
|
|
147
|
+
#### Properties
|
|
148
|
+
|
|
149
|
+
##### x
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
x: number;
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
##### y
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
y: number;
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
##### item
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
item: ItemGridItem | null;
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### ItemGridCellSize
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
type ItemGridCellSize = "sm" | "md" | "lg";
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Cell sizes: pockets, a backpack and a big chest view.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### ItemGridProps
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
type ItemGridProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & object;
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Props accepted by ItemGrid.
|
|
186
|
+
|
|
187
|
+
#### Type Declaration
|
|
188
|
+
|
|
189
|
+
| Name | Type | Description |
|
|
190
|
+
| ----------------------- | ------------------------------------------- | ----------------------------------------------------------------------- |
|
|
191
|
+
| `label` | `string` | Accessible name of the container, e.g. "Backpack". |
|
|
192
|
+
| `columns` | `number` | - |
|
|
193
|
+
| `rows` | `number` | - |
|
|
194
|
+
| `items` | readonly [`ItemGridItem`](#itemgriditem)[] | - |
|
|
195
|
+
| `ghost?` | [`ItemGridGhost`](#itemgridghost) \| `null` | - |
|
|
196
|
+
| `cellSize?` | [`ItemGridCellSize`](#itemgridcellsize) | - |
|
|
197
|
+
| `activeCell?` | `object` | Controlled keyboard cursor. Omit to let the grid keep its own. |
|
|
198
|
+
| `activeCell.x` | `number` | - |
|
|
199
|
+
| `activeCell.y` | `number` | - |
|
|
200
|
+
| `onActiveCellChange()?` | (`cell`) => `void` | The keyboard cursor moved to another cell. |
|
|
201
|
+
| `onCellActivate()?` | (`cell`) => `void` | Click, Enter or Space on a cell. The host decides pick up, drop or use. |
|
|
202
|
+
| `onCellHover()?` | (`cell`) => `void` | Pointer over a cell, or `null` on leaving the grid; for drag ghosts. |
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### ItemSlotState
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
type ItemSlotState = "idle" | "legal" | "illegal";
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
How a slot answers the item being held over it.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### ItemSlotProps
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
type ItemSlotProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> &
|
|
220
|
+
object;
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Props accepted by ItemSlot.
|
|
224
|
+
|
|
225
|
+
#### Type Declaration
|
|
226
|
+
|
|
227
|
+
| Name | Type | Description |
|
|
228
|
+
| -------------- | ----------------------------------------------------------- | ------------------------------------------------ |
|
|
229
|
+
| `label` | `string` | Slot name, e.g. "Head" or "Main hand". |
|
|
230
|
+
| `item?` | \| \{ `label`: `string`; `icon?`: `ReactNode`; \} \| `null` | The equipped item, if any. |
|
|
231
|
+
| `placeholder?` | `ReactNode` | Faint outline art shown while the slot is empty. |
|
|
232
|
+
| `state?` | [`ItemSlotState`](#itemslotstate) | - |
|
|
233
|
+
|
|
234
|
+
## Variables
|
|
235
|
+
|
|
236
|
+
### ItemGrid
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
const ItemGrid: ForwardRefExoticComponent<
|
|
240
|
+
Omit<HTMLAttributes<HTMLDivElement>, "children"> &
|
|
241
|
+
object &
|
|
242
|
+
RefAttributes<HTMLDivElement>
|
|
243
|
+
>;
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
A Diablo-style item grid. Cells carry the keyboard and pointer interface; items
|
|
247
|
+
and the drop ghost are drawn above them from the host's facts. The grid never
|
|
248
|
+
moves, merges or validates items: it shows what the host says.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### ItemSlot
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
const ItemSlot: ForwardRefExoticComponent<
|
|
256
|
+
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> &
|
|
257
|
+
object &
|
|
258
|
+
RefAttributes<HTMLButtonElement>
|
|
259
|
+
>;
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
One equipment slot for a paper doll: a pocket, its item and its name.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/keycap
|
|
8
|
+
|
|
9
|
+
# components/keycap
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### KeycapTone
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type KeycapTone = "neutral" | "primary" | "accent" | "inverse" | "destructive";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Molded key colors. `inverse` is the contrasting key; `destructive` stays neutral
|
|
20
|
+
until hovered or focused; the rest follow the theme.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### KeycapSize
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
type KeycapSize = "sm" | "md" | "lg";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Keycap sizes: a legend chip, a dock key and a big face key.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### KeycapProps
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
type KeycapProps = HTMLAttributes<HTMLElement> & object;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Props accepted by Keycap.
|
|
41
|
+
|
|
42
|
+
#### Type Declaration
|
|
43
|
+
|
|
44
|
+
| Name | Type | Description |
|
|
45
|
+
| ---------- | --------------------------- | --------------------------------------------------------------- |
|
|
46
|
+
| `tone?` | [`KeycapTone`](#keycaptone) | - |
|
|
47
|
+
| `size?` | [`KeycapSize`](#keycapsize) | - |
|
|
48
|
+
| `pressed?` | `boolean` | Show the key held down. Presentation only; the host owns input. |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### KeycapButtonProps
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
type KeycapButtonProps = Omit<
|
|
56
|
+
ButtonHTMLAttributes<HTMLButtonElement>,
|
|
57
|
+
"children"
|
|
58
|
+
> &
|
|
59
|
+
object;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Props accepted by KeycapButton.
|
|
63
|
+
|
|
64
|
+
#### Type Declaration
|
|
65
|
+
|
|
66
|
+
| Name | Type | Description |
|
|
67
|
+
| ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| `label` | `ReactNode` | Visible name of the action, e.g. "Build". `null` makes an icon-only key, which then needs an `aria-label`. |
|
|
69
|
+
| `shortcut?` | `string` | The keyboard key that runs the same action, shown as a small keycap. |
|
|
70
|
+
| `icon?` | `ReactNode` | Decorative icon before the label. |
|
|
71
|
+
| `readout?` | `ReactNode` | Extra readout after the label, such as a PixelNumber count. |
|
|
72
|
+
| `tone?` | [`KeycapTone`](#keycaptone) | - |
|
|
73
|
+
| `pressed?` | `boolean` | Toggle state for mode keys. `undefined` is a momentary key; a boolean adds `aria-pressed` and lights the key's indicator. |
|
|
74
|
+
| `expanded?` | `boolean` | Disclosure state for keys that open a palette or window. A boolean adds `aria-expanded` and lights the lamp; use it instead of `pressed` for menus. |
|
|
75
|
+
|
|
76
|
+
## Variables
|
|
77
|
+
|
|
78
|
+
### Keycap
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
const Keycap: ForwardRefExoticComponent<
|
|
82
|
+
HTMLAttributes<HTMLElement> & object & RefAttributes<HTMLElement>
|
|
83
|
+
>;
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
One molded key legend, rendered as native `<kbd>`: the key a player presses. The
|
|
87
|
+
key sits on its own travel so pressed and resting keys take the same room.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### KeycapButton
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
const KeycapButton: ForwardRefExoticComponent<
|
|
95
|
+
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> &
|
|
96
|
+
object &
|
|
97
|
+
RefAttributes<HTMLButtonElement>
|
|
98
|
+
>;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
A chunky action key for game docks and toy panels. The host owns the action and
|
|
102
|
+
the keyboard binding; `shortcut` only labels it.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/label
|
|
8
|
+
|
|
9
|
+
# components/label
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### LabelProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type LabelProps = object & LabelHTMLAttributes<HTMLLabelElement>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Props accepted by Label.
|
|
20
|
+
|
|
21
|
+
#### Type Declaration
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| ----------- | --------- | ----------------------------------------------- |
|
|
25
|
+
| `optional?` | `boolean` | Adds a quiet "Optional" readout after the text. |
|
|
26
|
+
| `required?` | `boolean` | - |
|
|
27
|
+
|
|
28
|
+
## Variables
|
|
29
|
+
|
|
30
|
+
### Label
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const Label: ForwardRefExoticComponent<
|
|
34
|
+
object &
|
|
35
|
+
LabelHTMLAttributes<HTMLLabelElement> &
|
|
36
|
+
RefAttributes<HTMLLabelElement>
|
|
37
|
+
>;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
A label primitive that associates caller-provided text with a form control.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/listbox
|
|
8
|
+
|
|
9
|
+
# components/listbox
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ListboxItemState
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ListboxItemState = object;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Intrinsic focus and selection state supplied when rendering a Listbox item.
|
|
20
|
+
|
|
21
|
+
#### Properties
|
|
22
|
+
|
|
23
|
+
##### active
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
active: boolean;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
##### disabled
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
##### selected
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
selected: boolean;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### ListboxProps
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
type ListboxProps<T, Multiple> = object &
|
|
47
|
+
Omit<
|
|
48
|
+
HTMLAttributes<HTMLDivElement>,
|
|
49
|
+
"defaultValue" | "onChange" | "onSelect" | "value"
|
|
50
|
+
> &
|
|
51
|
+
Multiple extends true
|
|
52
|
+
? object
|
|
53
|
+
: Multiple extends false
|
|
54
|
+
? object
|
|
55
|
+
: | {
|
|
56
|
+
defaultValue?: ListboxValue;
|
|
57
|
+
multiple?: false;
|
|
58
|
+
onValueChange?: (value, item) => void;
|
|
59
|
+
value?: ListboxValue;
|
|
60
|
+
}
|
|
61
|
+
| {
|
|
62
|
+
defaultValue?: ListboxValue<true>;
|
|
63
|
+
multiple: true;
|
|
64
|
+
onValueChange?: (value, item) => void;
|
|
65
|
+
value?: ListboxValue<true>;
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Props accepted by Listbox.
|
|
70
|
+
|
|
71
|
+
#### Type Declaration
|
|
72
|
+
|
|
73
|
+
| Name | Type | Description |
|
|
74
|
+
| --------------- | ------------------------------------------ | ------------------------------------------------------------- |
|
|
75
|
+
| `emptyMessage?` | `ReactNode` | - |
|
|
76
|
+
| `getKey()` | (`item`) => `string` | Returns the stable key used for focus and selection. |
|
|
77
|
+
| `getLabel()` | (`item`) => `string` | Returns the accessible label used for an item. |
|
|
78
|
+
| `isDisabled()?` | (`item`) => `boolean` | Determines whether an item can receive focus or selection. |
|
|
79
|
+
| `items` | readonly `T`[] | - |
|
|
80
|
+
| `rootRef?` | `React.Ref`\<`HTMLDivElement`\> | Receives the selection control's root div. |
|
|
81
|
+
| `renderItem()?` | (`item`, `active`, `state`) => `ReactNode` | Renders an item with its intrinsic focus and selection state. |
|
|
82
|
+
|
|
83
|
+
#### Type Parameters
|
|
84
|
+
|
|
85
|
+
| Type Parameter | Default type |
|
|
86
|
+
| ------------------------------ | ------------ |
|
|
87
|
+
| `T` | - |
|
|
88
|
+
| `Multiple` _extends_ `boolean` | `false` |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### ListboxValue
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
type ListboxValue<Multiple> = Multiple extends true ? string[] : null | string;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Supported ListboxValue values.
|
|
99
|
+
|
|
100
|
+
#### Type Parameters
|
|
101
|
+
|
|
102
|
+
| Type Parameter | Default type |
|
|
103
|
+
| ------------------------------ | ------------ |
|
|
104
|
+
| `Multiple` _extends_ `boolean` | `false` |
|
|
105
|
+
|
|
106
|
+
## Functions
|
|
107
|
+
|
|
108
|
+
### Listbox()
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
function Listbox<T>(input): Element;
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
A selection primitive with caller-owned values and intrinsic keyboard
|
|
115
|
+
navigation.
|
|
116
|
+
|
|
117
|
+
#### Type Parameters
|
|
118
|
+
|
|
119
|
+
| Type Parameter |
|
|
120
|
+
| -------------- |
|
|
121
|
+
| `T` |
|
|
122
|
+
|
|
123
|
+
#### Parameters
|
|
124
|
+
|
|
125
|
+
| Parameter | Type |
|
|
126
|
+
| --------- | ------------------------------------------------- |
|
|
127
|
+
| `input` | [`ListboxProps`](#listboxprops)\<`T`, `boolean`\> |
|
|
128
|
+
|
|
129
|
+
#### Returns
|
|
130
|
+
|
|
131
|
+
`Element`
|