@zonsh/ui 0.0.0 → 0.4.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 +43 -0
- package/README.md +81 -1
- package/assets/illustrations/drawing/bracket-construction-dark.svg +77 -0
- package/assets/illustrations/drawing/bracket-construction-filled-dark.svg +50 -0
- package/assets/illustrations/drawing/bracket-construction-filled.svg +50 -0
- package/assets/illustrations/drawing/bracket-construction.svg +77 -0
- package/assets/illustrations/drawing/crescent-dark.svg +28 -0
- package/assets/illustrations/drawing/crescent-guides-dark.svg +33 -0
- package/assets/illustrations/drawing/crescent-guides.svg +33 -0
- package/assets/illustrations/drawing/crescent.svg +28 -0
- package/assets/illustrations/drawing/eclipse-dark.svg +187 -0
- package/assets/illustrations/drawing/eclipse-guides-dark.svg +191 -0
- package/assets/illustrations/drawing/eclipse-guides.svg +191 -0
- package/assets/illustrations/drawing/eclipse.svg +187 -0
- package/assets/illustrations/drawing/elevation-guides-dark.svg +31 -0
- package/assets/illustrations/drawing/elevation-guides-plain-dark.svg +9 -0
- package/assets/illustrations/drawing/elevation-guides-plain.svg +9 -0
- package/assets/illustrations/drawing/elevation-guides.svg +31 -0
- package/assets/illustrations/drawing/horizon-dark.svg +30 -0
- package/assets/illustrations/drawing/horizon.svg +30 -0
- package/assets/illustrations/drawing/nib-study-dark.svg +107 -0
- package/assets/illustrations/drawing/nib-study-plain-dark.svg +93 -0
- package/assets/illustrations/drawing/nib-study-plain.svg +93 -0
- package/assets/illustrations/drawing/nib-study.svg +107 -0
- package/assets/illustrations/editorial/assistant-640.webp +0 -0
- package/assets/illustrations/editorial/assistant.webp +0 -0
- package/assets/illustrations/editorial/automation-640.webp +0 -0
- package/assets/illustrations/editorial/automation.webp +0 -0
- package/assets/illustrations/editorial/bracket-left-640.webp +0 -0
- package/assets/illustrations/editorial/bracket-left.webp +0 -0
- package/assets/illustrations/editorial/bracket-right-640.webp +0 -0
- package/assets/illustrations/editorial/bracket-right.webp +0 -0
- package/assets/illustrations/editorial/custom-software-640.webp +0 -0
- package/assets/illustrations/editorial/custom-software.webp +0 -0
- package/assets/illustrations/editorial/digitalization-640.webp +0 -0
- package/assets/illustrations/editorial/digitalization.webp +0 -0
- package/assets/illustrations/editorial/integration-640.webp +0 -0
- package/assets/illustrations/editorial/integration.webp +0 -0
- package/assets/illustrations/editorial/problem-640.webp +0 -0
- package/assets/illustrations/editorial/problem.webp +0 -0
- package/assets/illustrations/editorial/process-analysis-640.webp +0 -0
- package/assets/illustrations/editorial/process-analysis.webp +0 -0
- package/assets/illustrations/editorial/process-concept-640.webp +0 -0
- package/assets/illustrations/editorial/process-concept.webp +0 -0
- package/assets/illustrations/editorial/process-development-640.webp +0 -0
- package/assets/illustrations/editorial/process-development.webp +0 -0
- package/assets/illustrations/editorial/process-discovery-640.webp +0 -0
- package/assets/illustrations/editorial/process-discovery.webp +0 -0
- package/assets/illustrations/editorial/process-maintenance-640.webp +0 -0
- package/assets/illustrations/editorial/process-maintenance.webp +0 -0
- package/assets/illustrations/editorial/process-prototype-640.webp +0 -0
- package/assets/illustrations/editorial/process-prototype.webp +0 -0
- package/assets/illustrations/editorial/process-testing-640.webp +0 -0
- package/assets/illustrations/editorial/process-testing.webp +0 -0
- package/assets/illustrations/iso/automation-dark.svg +6 -0
- package/assets/illustrations/iso/automation.svg +6 -0
- package/assets/illustrations/iso/bar-chart-dark.svg +6 -0
- package/assets/illustrations/iso/bar-chart.svg +6 -0
- package/assets/illustrations/iso/brackets-classic-dark.svg +6 -0
- package/assets/illustrations/iso/brackets-classic.svg +6 -0
- package/assets/illustrations/iso/brackets-dark.svg +6 -0
- package/assets/illustrations/iso/brackets.svg +6 -0
- package/assets/illustrations/iso/city-dark.svg +6 -0
- package/assets/illustrations/iso/city.svg +6 -0
- package/assets/illustrations/iso/conveyor-dark.svg +6 -0
- package/assets/illustrations/iso/conveyor.svg +6 -0
- package/assets/illustrations/iso/database-dark.svg +6 -0
- package/assets/illustrations/iso/database.svg +6 -0
- package/assets/illustrations/iso/documents-dark.svg +6 -0
- package/assets/illustrations/iso/documents.svg +6 -0
- package/assets/illustrations/iso/inbox-dark.svg +6 -0
- package/assets/illustrations/iso/inbox.svg +6 -0
- package/assets/illustrations/iso/laptop-dark.svg +6 -0
- package/assets/illustrations/iso/laptop.svg +6 -0
- package/assets/illustrations/iso/monitor-dark.svg +6 -0
- package/assets/illustrations/iso/monitor.svg +6 -0
- package/assets/illustrations/iso/pipeline-dark.svg +6 -0
- package/assets/illustrations/iso/pipeline.svg +6 -0
- package/assets/illustrations/iso/platform-dark.svg +6 -0
- package/assets/illustrations/iso/platform.svg +6 -0
- package/assets/illustrations/iso/server-dark.svg +6 -0
- package/assets/illustrations/iso/server.svg +6 -0
- package/assets/illustrations/iso/spreadsheet-dark.svg +6 -0
- package/assets/illustrations/iso/spreadsheet.svg +6 -0
- package/assets/illustrations/iso/timeline-dark.svg +6 -0
- package/assets/illustrations/iso/timeline.svg +6 -0
- package/assets/illustrations/sheet/construction.svg +115 -0
- package/assets/illustrations/sheet/crescent.svg +40 -0
- package/assets/illustrations/sheet/limb.svg +42 -0
- package/assets/illustrations/sheet/stress-axis.svg +119 -0
- package/assets/illustrations/sheet/totality.svg +215 -0
- package/assets/illustrations/sheet/vertical-metrics.svg +43 -0
- package/assets/logo-left.svg +1 -0
- package/assets/logo-right.svg +1 -0
- package/assets/logo.svg +1 -0
- package/dist/components/_overlay.d.ts +47 -0
- package/dist/components/_overlay.js +59 -0
- package/dist/components/accordion.d.ts +32 -0
- package/dist/components/accordion.js +39 -0
- package/dist/components/alert-dialog.d.ts +45 -0
- package/dist/components/alert-dialog.js +56 -0
- package/dist/components/alert.d.ts +35 -0
- package/dist/components/alert.js +42 -0
- package/dist/components/ascii-field.d.ts +34 -0
- package/dist/components/ascii-field.js +410 -0
- package/dist/components/aspect-ratio.d.ts +14 -0
- package/dist/components/aspect-ratio.js +17 -0
- package/dist/components/avatar.d.ts +42 -0
- package/dist/components/avatar.js +55 -0
- package/dist/components/badge.d.ts +70 -0
- package/dist/components/badge.js +62 -0
- package/dist/components/bottom-nav.d.ts +86 -0
- package/dist/components/bottom-nav.js +175 -0
- package/dist/components/breadcrumb.d.ts +31 -0
- package/dist/components/breadcrumb.js +37 -0
- package/dist/components/button-group.d.ts +30 -0
- package/dist/components/button-group.js +47 -0
- package/dist/components/button.d.ts +53 -0
- package/dist/components/button.js +130 -0
- package/dist/components/calendar.d.ts +26 -0
- package/dist/components/calendar.js +179 -0
- package/dist/components/card.d.ts +42 -0
- package/dist/components/card.js +76 -0
- package/dist/components/carousel.d.ts +109 -0
- package/dist/components/carousel.js +231 -0
- package/dist/components/chart.d.ts +189 -0
- package/dist/components/chart.js +323 -0
- package/dist/components/checkbox.d.ts +23 -0
- package/dist/components/checkbox.js +43 -0
- package/dist/components/code-block.d.ts +55 -0
- package/dist/components/code-block.js +100 -0
- package/dist/components/collapsible.d.ts +20 -0
- package/dist/components/collapsible.js +32 -0
- package/dist/components/color-picker.d.ts +107 -0
- package/dist/components/color-picker.js +428 -0
- package/dist/components/combobox.d.ts +99 -0
- package/dist/components/combobox.js +172 -0
- package/dist/components/command.d.ts +132 -0
- package/dist/components/command.js +257 -0
- package/dist/components/context-menu.d.ts +29 -0
- package/dist/components/context-menu.js +35 -0
- package/dist/components/conversation.d.ts +36 -0
- package/dist/components/conversation.js +303 -0
- package/dist/components/copy-button.d.ts +55 -0
- package/dist/components/copy-button.js +133 -0
- package/dist/components/data-table.d.ts +235 -0
- package/dist/components/data-table.js +655 -0
- package/dist/components/date-picker.d.ts +160 -0
- package/dist/components/date-picker.js +338 -0
- package/dist/components/dialog.d.ts +57 -0
- package/dist/components/dialog.js +95 -0
- package/dist/components/direction.d.ts +16 -0
- package/dist/components/direction.js +18 -0
- package/dist/components/drawer.d.ts +69 -0
- package/dist/components/drawer.js +79 -0
- package/dist/components/empty.d.ts +31 -0
- package/dist/components/empty.js +50 -0
- package/dist/components/feature-list.d.ts +54 -0
- package/dist/components/feature-list.js +43 -0
- package/dist/components/field.d.ts +34 -0
- package/dist/components/field.js +81 -0
- package/dist/components/file-drop.d.ts +77 -0
- package/dist/components/file-drop.js +258 -0
- package/dist/components/filter-bar.d.ts +153 -0
- package/dist/components/filter-bar.js +334 -0
- package/dist/components/form.d.ts +35 -0
- package/dist/components/form.js +56 -0
- package/dist/components/graph.d.ts +146 -0
- package/dist/components/graph.js +825 -0
- package/dist/components/illustration.d.ts +85 -0
- package/dist/components/illustration.js +165 -0
- package/dist/components/input-group.d.ts +138 -0
- package/dist/components/input-group.js +312 -0
- package/dist/components/input.d.ts +16 -0
- package/dist/components/input.js +25 -0
- package/dist/components/item.d.ts +64 -0
- package/dist/components/item.js +116 -0
- package/dist/components/kbd.d.ts +50 -0
- package/dist/components/kbd.js +45 -0
- package/dist/components/label.d.ts +12 -0
- package/dist/components/label.js +24 -0
- package/dist/components/layout.d.ts +136 -0
- package/dist/components/layout.js +162 -0
- package/dist/components/lightbox.d.ts +100 -0
- package/dist/components/lightbox.js +439 -0
- package/dist/components/locale.d.ts +44 -0
- package/dist/components/locale.js +37 -0
- package/dist/components/logo.d.ts +54 -0
- package/dist/components/logo.js +96 -0
- package/dist/components/menu.d.ts +60 -0
- package/dist/components/menu.js +140 -0
- package/dist/components/menubar.d.ts +62 -0
- package/dist/components/menubar.js +223 -0
- package/dist/components/message.d.ts +42 -0
- package/dist/components/message.js +59 -0
- package/dist/components/meter.d.ts +31 -0
- package/dist/components/meter.js +27 -0
- package/dist/components/money-input.d.ts +80 -0
- package/dist/components/money-input.js +253 -0
- package/dist/components/native-select.d.ts +26 -0
- package/dist/components/native-select.js +35 -0
- package/dist/components/navigation-menu.d.ts +42 -0
- package/dist/components/navigation-menu.js +97 -0
- package/dist/components/number-field.d.ts +55 -0
- package/dist/components/number-field.js +164 -0
- package/dist/components/otp-field.d.ts +48 -0
- package/dist/components/otp-field.js +102 -0
- package/dist/components/pagination.d.ts +37 -0
- package/dist/components/pagination.js +81 -0
- package/dist/components/pdf-viewer.d.ts +134 -0
- package/dist/components/pdf-viewer.js +996 -0
- package/dist/components/phone-input.d.ts +79 -0
- package/dist/components/phone-input.js +282 -0
- package/dist/components/popover.d.ts +33 -0
- package/dist/components/popover.js +48 -0
- package/dist/components/preview-card.d.ts +25 -0
- package/dist/components/preview-card.js +22 -0
- package/dist/components/progress.d.ts +27 -0
- package/dist/components/progress.js +25 -0
- package/dist/components/prompt-input.d.ts +156 -0
- package/dist/components/prompt-input.js +415 -0
- package/dist/components/quote.d.ts +22 -0
- package/dist/components/quote.js +15 -0
- package/dist/components/radio-group.d.ts +18 -0
- package/dist/components/radio-group.js +34 -0
- package/dist/components/rating.d.ts +73 -0
- package/dist/components/rating.js +124 -0
- package/dist/components/reasoning.d.ts +46 -0
- package/dist/components/reasoning.js +73 -0
- package/dist/components/resizable.d.ts +47 -0
- package/dist/components/resizable.js +44 -0
- package/dist/components/response.d.ts +41 -0
- package/dist/components/response.js +566 -0
- package/dist/components/scroll-area.d.ts +33 -0
- package/dist/components/scroll-area.js +31 -0
- package/dist/components/select.d.ts +35 -0
- package/dist/components/select.js +71 -0
- package/dist/components/separator.d.ts +14 -0
- package/dist/components/separator.js +17 -0
- package/dist/components/sidebar.d.ts +163 -0
- package/dist/components/sidebar.js +505 -0
- package/dist/components/site-header.d.ts +93 -0
- package/dist/components/site-header.js +121 -0
- package/dist/components/skeleton.d.ts +31 -0
- package/dist/components/skeleton.js +29 -0
- package/dist/components/slider.d.ts +24 -0
- package/dist/components/slider.js +131 -0
- package/dist/components/sortable.d.ts +178 -0
- package/dist/components/sortable.js +1258 -0
- package/dist/components/sources.d.ts +40 -0
- package/dist/components/sources.js +42 -0
- package/dist/components/spinner.d.ts +48 -0
- package/dist/components/spinner.js +75 -0
- package/dist/components/stat.d.ts +91 -0
- package/dist/components/stat.js +141 -0
- package/dist/components/stepper.d.ts +71 -0
- package/dist/components/stepper.js +101 -0
- package/dist/components/suggestions.d.ts +20 -0
- package/dist/components/suggestions.js +18 -0
- package/dist/components/switch.d.ts +14 -0
- package/dist/components/switch.js +26 -0
- package/dist/components/table.d.ts +172 -0
- package/dist/components/table.js +895 -0
- package/dist/components/tabs.d.ts +25 -0
- package/dist/components/tabs.js +162 -0
- package/dist/components/tag.d.ts +41 -0
- package/dist/components/tag.js +88 -0
- package/dist/components/tags-input.d.ts +56 -0
- package/dist/components/tags-input.js +271 -0
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/textarea.js +16 -0
- package/dist/components/theme.d.ts +55 -0
- package/dist/components/theme.js +120 -0
- package/dist/components/time-field.d.ts +70 -0
- package/dist/components/time-field.js +450 -0
- package/dist/components/timeline.d.ts +92 -0
- package/dist/components/timeline.js +108 -0
- package/dist/components/tippy.d.ts +48 -0
- package/dist/components/tippy.js +648 -0
- package/dist/components/toast.d.ts +88 -0
- package/dist/components/toast.js +205 -0
- package/dist/components/toggle-group.d.ts +41 -0
- package/dist/components/toggle-group.js +140 -0
- package/dist/components/toggle.d.ts +23 -0
- package/dist/components/toggle.js +35 -0
- package/dist/components/tool-call.d.ts +63 -0
- package/dist/components/tool-call.js +68 -0
- package/dist/components/toolbar.d.ts +17 -0
- package/dist/components/toolbar.js +39 -0
- package/dist/components/tooltip.d.ts +42 -0
- package/dist/components/tooltip.js +47 -0
- package/dist/components/tour.d.ts +127 -0
- package/dist/components/tour.js +648 -0
- package/dist/components/tree.d.ts +75 -0
- package/dist/components/tree.js +649 -0
- package/dist/components/typography.d.ts +134 -0
- package/dist/components/typography.js +176 -0
- package/dist/components/video-player.d.ts +284 -0
- package/dist/components/video-player.js +1392 -0
- package/dist/illustration.d.ts +2 -0
- package/dist/illustration.js +7 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +94 -0
- package/dist/lib/cn.d.ts +20 -0
- package/dist/lib/cn.js +38 -0
- package/dist/lib/code-highlight.d.ts +18 -0
- package/dist/lib/code-highlight.js +174 -0
- package/dist/lib/code-theme.d.ts +19 -0
- package/dist/lib/code-theme.js +140 -0
- package/dist/lib/collapse-row.d.ts +9 -0
- package/dist/lib/collapse-row.js +129 -0
- package/dist/lib/digit-roll.d.ts +21 -0
- package/dist/lib/digit-roll.js +31 -0
- package/dist/lib/editorial-assets.d.ts +16 -0
- package/dist/lib/editorial-assets.js +56 -0
- package/dist/lib/field-errors.d.ts +28 -0
- package/dist/lib/field-errors.js +24 -0
- package/dist/lib/field-value.d.ts +13 -0
- package/dist/lib/field-value.js +44 -0
- package/dist/lib/figure/catalog.d.ts +127 -0
- package/dist/lib/figure/catalog.js +130 -0
- package/dist/lib/figure/figures/automation.d.ts +7 -0
- package/dist/lib/figure/figures/automation.js +143 -0
- package/dist/lib/figure/figures/bar-chart.d.ts +7 -0
- package/dist/lib/figure/figures/bar-chart.js +99 -0
- package/dist/lib/figure/figures/brackets-classic.d.ts +11 -0
- package/dist/lib/figure/figures/brackets-classic.js +170 -0
- package/dist/lib/figure/figures/brackets.d.ts +8 -0
- package/dist/lib/figure/figures/brackets.js +84 -0
- package/dist/lib/figure/figures/city.d.ts +7 -0
- package/dist/lib/figure/figures/city.js +93 -0
- package/dist/lib/figure/figures/conveyor.d.ts +7 -0
- package/dist/lib/figure/figures/conveyor.js +97 -0
- package/dist/lib/figure/figures/database.d.ts +7 -0
- package/dist/lib/figure/figures/database.js +65 -0
- package/dist/lib/figure/figures/documents.d.ts +7 -0
- package/dist/lib/figure/figures/documents.js +83 -0
- package/dist/lib/figure/figures/inbox.d.ts +7 -0
- package/dist/lib/figure/figures/inbox.js +92 -0
- package/dist/lib/figure/figures/laptop.d.ts +7 -0
- package/dist/lib/figure/figures/laptop.js +67 -0
- package/dist/lib/figure/figures/monitor.d.ts +7 -0
- package/dist/lib/figure/figures/monitor.js +59 -0
- package/dist/lib/figure/figures/pipeline.d.ts +8 -0
- package/dist/lib/figure/figures/pipeline.js +117 -0
- package/dist/lib/figure/figures/platform.d.ts +7 -0
- package/dist/lib/figure/figures/platform.js +117 -0
- package/dist/lib/figure/figures/server.d.ts +7 -0
- package/dist/lib/figure/figures/server.js +115 -0
- package/dist/lib/figure/figures/spreadsheet.d.ts +7 -0
- package/dist/lib/figure/figures/spreadsheet.js +87 -0
- package/dist/lib/figure/figures/timeline.d.ts +7 -0
- package/dist/lib/figure/figures/timeline.js +65 -0
- package/dist/lib/figure/kernel.d.ts +152 -0
- package/dist/lib/figure/kernel.js +576 -0
- package/dist/lib/figure/parts.d.ts +42 -0
- package/dist/lib/figure/parts.js +126 -0
- package/dist/lib/form-reset.d.ts +11 -0
- package/dist/lib/form-reset.js +22 -0
- package/dist/lib/glide.d.ts +53 -0
- package/dist/lib/glide.js +138 -0
- package/dist/lib/graph-layout.d.ts +58 -0
- package/dist/lib/graph-layout.js +209 -0
- package/dist/lib/illustration-drawings.d.ts +89 -0
- package/dist/lib/illustration-drawings.js +539 -0
- package/dist/lib/illustration-info.d.ts +37 -0
- package/dist/lib/illustration-info.js +22 -0
- package/dist/lib/illustration-library.d.ts +87 -0
- package/dist/lib/illustration-library.js +352 -0
- package/dist/lib/logo-geometry.d.ts +29 -0
- package/dist/lib/logo-geometry.js +67 -0
- package/dist/lib/markdown-guard.d.ts +16 -0
- package/dist/lib/markdown-guard.js +123 -0
- package/dist/lib/merge-refs.d.ts +10 -0
- package/dist/lib/merge-refs.js +26 -0
- package/dist/lib/money.d.ts +73 -0
- package/dist/lib/money.js +343 -0
- package/dist/lib/motion.d.ts +6 -0
- package/dist/lib/motion.js +12 -0
- package/dist/lib/pdf-worker.d.ts +1 -0
- package/dist/lib/pdf-worker.js +6 -0
- package/dist/lib/pdf.d.ts +19 -0
- package/dist/lib/pdf.js +58 -0
- package/dist/lib/phone-countries.d.ts +1 -0
- package/dist/lib/phone-countries.js +281 -0
- package/dist/lib/phone.d.ts +90 -0
- package/dist/lib/phone.js +286 -0
- package/dist/lib/platform.d.ts +38 -0
- package/dist/lib/platform.js +75 -0
- package/dist/lib/room.d.ts +25 -0
- package/dist/lib/room.js +46 -0
- package/dist/lib/row-index.d.ts +15 -0
- package/dist/lib/row-index.js +136 -0
- package/dist/lib/table-fit.d.ts +143 -0
- package/dist/lib/table-fit.js +596 -0
- package/dist/lib/theme-script.d.ts +31 -0
- package/dist/lib/theme-script.js +49 -0
- package/dist/lib/tippy/pixels.d.ts +47 -0
- package/dist/lib/tippy/pixels.js +187 -0
- package/dist/lib/tippy/sprite.d.ts +86 -0
- package/dist/lib/tippy/sprite.js +753 -0
- package/dist/messages/de.d.ts +12 -0
- package/dist/messages/de.js +326 -0
- package/dist/styles/expressive.css +203 -0
- package/dist/styles/fonts.css +145 -0
- package/dist/styles/index.css +207 -0
- package/dist/styles/material.css +317 -0
- package/dist/styles/parts/ai.css +361 -0
- package/dist/styles/parts/brand.css +75 -0
- package/dist/styles/parts/controls.css +774 -0
- package/dist/styles/parts/data.css +222 -0
- package/dist/styles/parts/editorial.css +120 -0
- package/dist/styles/parts/feedback.css +340 -0
- package/dist/styles/parts/foundations.css +166 -0
- package/dist/styles/parts/graph.css +214 -0
- package/dist/styles/parts/inputs.css +261 -0
- package/dist/styles/parts/isometric.css +124 -0
- package/dist/styles/parts/navigation.css +424 -0
- package/dist/styles/parts/overlays.css +250 -0
- package/dist/styles/parts/pdf.css +154 -0
- package/dist/styles/parts/react-flow.css +519 -0
- package/dist/styles/tokens.css +299 -0
- package/dist/vite.d.ts +66 -0
- package/dist/vite.js +29 -0
- package/package.json +183 -5
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type IllustrationFile, type IllustrationKind, type IllustrationName, type IllustrationVariant, type IllustrationVariantOf } from "../lib/illustration-library.js";
|
|
3
|
+
export type { IllustrationFile, IllustrationKind, IllustrationName, IllustrationVariant, IllustrationVariantOf, };
|
|
4
|
+
export { illustrationKinds, illustrations, type IllustrationInfo } from "../lib/illustration-info.js";
|
|
5
|
+
export interface IllustrationProps<N extends IllustrationName = IllustrationName> {
|
|
6
|
+
/** The library id, `<kind>/<name>`: `iso/server`, `drawing/eclipse`, `sheet/totality`, `editorial/automation` … */
|
|
7
|
+
name: N;
|
|
8
|
+
/** One of the entry's `variants` (see `illustrations`). Iso: `solid` | `line`; drawings vary. */
|
|
9
|
+
variant?: IllustrationVariantOf<N>;
|
|
10
|
+
/** Accessible name. Omit for decorative use (the default), which hides it from assistive tech. */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Iso only: `false` turns off all motion (ambient, hover and entrance). Reduced motion always does. */
|
|
13
|
+
animate?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Iso only: play the hover motion from outside, e.g. for the selected step of a sequence.
|
|
16
|
+
* Alternatively put `data-iso-trigger` on any ancestor: hovering or focusing it plays the motion.
|
|
17
|
+
*/
|
|
18
|
+
active?: boolean;
|
|
19
|
+
/** Editorial only: above-the-fold art loads eagerly with high priority. Otherwise lazy. */
|
|
20
|
+
priority?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Illustration — any entry of the zon illustration library by id: an animated isometric
|
|
26
|
+
* object (`iso/…`), a drawing from the light table (`drawing/…`), a framed spec sheet
|
|
27
|
+
* (`sheet/…`) or the site's editorial line art (`editorial/…`). Inline it follows the theme;
|
|
28
|
+
* every vector entry also ships as static SVG files (see `illustrations[].files`).
|
|
29
|
+
*
|
|
30
|
+
* Size it with width (`className="w-56"`); the height follows the drawing. Sheets and editorial
|
|
31
|
+
* images fill the width of their parent, so give the parent a width.
|
|
32
|
+
*
|
|
33
|
+
* The rule people break: picking an entry for its looks. Each one stands for something
|
|
34
|
+
* specific (`meaning`), so pick the one that matches the sentence beside it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function Illustration<N extends IllustrationName>({ name, variant, title, animate, active, priority, className, style, }: IllustrationProps<N>): React.JSX.Element | null;
|
|
37
|
+
export type SpecSheetTone = "night" | "paper";
|
|
38
|
+
export interface SpecSheetTitleBlockEntry {
|
|
39
|
+
/** Short uppercase field name, e.g. `DRAWN`, `SCALE`, `SHEET`, `REV`. */
|
|
40
|
+
label: React.ReactNode;
|
|
41
|
+
/** The value, e.g. `zon`, `1:4`, `07/173`, `0.500`. */
|
|
42
|
+
value: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export interface SpecSheetProps extends Omit<React.ComponentProps<"figure">, "title"> {
|
|
45
|
+
/** `night`: the deepest dark bleed with grain. `paper`: off-white paper with #121212 ink. Neither follows the page theme. */
|
|
46
|
+
tone?: SpecSheetTone;
|
|
47
|
+
/** Mono index tag in the top-left caption, e.g. `05.1`. */
|
|
48
|
+
index?: React.ReactNode;
|
|
49
|
+
/** Optional mono eyebrow in the top-right caption. */
|
|
50
|
+
eyebrow?: React.ReactNode;
|
|
51
|
+
/** Engineering title block in the bottom-right corner. */
|
|
52
|
+
titleBlock?: SpecSheetTitleBlockEntry[];
|
|
53
|
+
/** Fine registration crosshairs at the four corners. */
|
|
54
|
+
marks?: boolean;
|
|
55
|
+
/** Still film grain over the sheet. Defaults to on for `night`, off for `paper`. */
|
|
56
|
+
grain?: boolean;
|
|
57
|
+
/** Light-table lighting: a soft-light highlight that follows a fine pointer. Static under reduced motion. */
|
|
58
|
+
lit?: boolean;
|
|
59
|
+
/** Columns this tile spans inside `SpecSheetGrid` (of 12). */
|
|
60
|
+
c?: number;
|
|
61
|
+
/** Rows this tile spans inside `SpecSheetGrid` (a row is one column wide). */
|
|
62
|
+
r?: number;
|
|
63
|
+
/** Classes for the drawing area that holds `children`. */
|
|
64
|
+
drawingClassName?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* SpecSheet — the frame of the `sheet/…` entries, for your own sheets and walls: a square-cornered
|
|
68
|
+
* night or paper tile with a mono index caption, optional crosshairs and an engineering title
|
|
69
|
+
* block, holding one `<Illustration>` drawing. Its fill is the content, so it skips the material.
|
|
70
|
+
*
|
|
71
|
+
* It has no width of its own (the drawing is laid over an aspect-ratio box), so give it or its
|
|
72
|
+
* parent a width. The rule people break: giving it a radius, a drop shadow or the card material.
|
|
73
|
+
*/
|
|
74
|
+
export declare function SpecSheet({ tone, index, eyebrow, titleBlock, marks, grain, lit, c, r, drawingClassName, className, style, children, onPointerMove, onPointerLeave, ...props }: SpecSheetProps): React.JSX.Element;
|
|
75
|
+
export interface SpecSheetGridProps extends React.ComponentProps<"div"> {
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* SpecSheetGrid — the light-table wall: a 12-column bento of `SpecSheet` tiles with square
|
|
79
|
+
* cells, sized by container queries. Each sheet spans `c` columns × `r` rows. Below 40rem of
|
|
80
|
+
* available width the tiles stack and keep their proportion.
|
|
81
|
+
*
|
|
82
|
+
* The rule people break: mixing tones at random. Group night and paper sheets so the wall
|
|
83
|
+
* reads as one composition with one strong idea.
|
|
84
|
+
*/
|
|
85
|
+
export declare function SpecSheetGrid({ className, children, ...props }: SpecSheetGridProps): React.JSX.Element;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
import { editorialSource } from "../lib/editorial-assets.js";
|
|
6
|
+
import { INLINE_INK } from "../lib/illustration-drawings.js";
|
|
7
|
+
import { getIllustration, } from "../lib/illustration-library.js";
|
|
8
|
+
import { mountFigure } from "../lib/figure/kernel.js";
|
|
9
|
+
/* ── Metadata ───────────────────────────────────────────────────────────────── */
|
|
10
|
+
export { illustrationKinds, illustrations } from "../lib/illustration-info.js";
|
|
11
|
+
/**
|
|
12
|
+
* Illustration — any entry of the zon illustration library by id: an animated isometric
|
|
13
|
+
* object (`iso/…`), a drawing from the light table (`drawing/…`), a framed spec sheet
|
|
14
|
+
* (`sheet/…`) or the site's editorial line art (`editorial/…`). Inline it follows the theme;
|
|
15
|
+
* every vector entry also ships as static SVG files (see `illustrations[].files`).
|
|
16
|
+
*
|
|
17
|
+
* Size it with width (`className="w-56"`); the height follows the drawing. Sheets and editorial
|
|
18
|
+
* images fill the width of their parent, so give the parent a width.
|
|
19
|
+
*
|
|
20
|
+
* The rule people break: picking an entry for its looks. Each one stands for something
|
|
21
|
+
* specific (`meaning`), so pick the one that matches the sentence beside it.
|
|
22
|
+
*/
|
|
23
|
+
export function Illustration({ name, variant, title, animate = true, active, priority = false, className, style, }) {
|
|
24
|
+
const entry = getIllustration(name);
|
|
25
|
+
if (!entry)
|
|
26
|
+
return null;
|
|
27
|
+
const v = variant && entry.variants.includes(variant) ? variant : entry.variants[0];
|
|
28
|
+
const common = { title, className, style };
|
|
29
|
+
switch (entry.kind) {
|
|
30
|
+
case "iso":
|
|
31
|
+
return _jsx(IsoFigure, { entry: entry, animate: animate, active: active, ...common });
|
|
32
|
+
case "drawing":
|
|
33
|
+
return _jsx(DrawingSvg, { entry: entry, variant: v, ...common });
|
|
34
|
+
case "sheet":
|
|
35
|
+
return _jsx(SheetFigure, { entry: entry, ...common });
|
|
36
|
+
case "editorial":
|
|
37
|
+
return _jsx(EditorialImage, { entry: entry, priority: priority, ...common });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/* ── Isometric ──────────────────────────────────────────────────────────────── */
|
|
41
|
+
/**
|
|
42
|
+
* A line figure that answers the pointer. Its code loads with the first one on the page; until
|
|
43
|
+
* then (and on the server) it is an empty 5:4 frame, so nothing shifts when it draws. With
|
|
44
|
+
* `animate={false}` it draws its rest pose and stays still.
|
|
45
|
+
*/
|
|
46
|
+
function IsoFigure({ entry, animate, active, title, className, style, }) {
|
|
47
|
+
const ref = React.useRef(null);
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
let alive = true;
|
|
50
|
+
let dispose;
|
|
51
|
+
void entry.load().then((m) => {
|
|
52
|
+
if (alive && ref.current)
|
|
53
|
+
dispose = mountFigure(ref.current, m.default, { live: animate });
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
alive = false;
|
|
57
|
+
dispose?.();
|
|
58
|
+
};
|
|
59
|
+
}, [entry, animate]);
|
|
60
|
+
return (_jsx("svg", { ref: ref, "data-slot": "illustration", "data-kind": "iso", "data-name": entry.id, "data-static": animate ? undefined : "", "data-active": active ? "" : undefined, viewBox: "0 0 400 320", fill: "none", role: title ? "img" : undefined, "aria-label": title, "aria-hidden": title ? undefined : true, focusable: "false", className: cn("block aspect-[5/4] h-auto w-full max-w-full overflow-visible select-none", className), style: style }));
|
|
61
|
+
}
|
|
62
|
+
/* ── Drawings ───────────────────────────────────────────────────────────────── */
|
|
63
|
+
const reactAttr = (k) => k === "class"
|
|
64
|
+
? "className"
|
|
65
|
+
: /^(data|aria)-/.test(k)
|
|
66
|
+
? k
|
|
67
|
+
: k.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
68
|
+
function toReact(node, key) {
|
|
69
|
+
if (!node)
|
|
70
|
+
return null;
|
|
71
|
+
if (typeof node === "string")
|
|
72
|
+
return node;
|
|
73
|
+
if (Array.isArray(node))
|
|
74
|
+
return node.map((c, i) => toReact(c, i));
|
|
75
|
+
const props = { key };
|
|
76
|
+
for (const [k, v] of Object.entries(node.attrs)) {
|
|
77
|
+
if (v === undefined || v === null || v === false)
|
|
78
|
+
continue;
|
|
79
|
+
props[reactAttr(k)] = v;
|
|
80
|
+
}
|
|
81
|
+
return React.createElement(node.tag, props, ...node.children.map((c, i) => toReact(c, i)));
|
|
82
|
+
}
|
|
83
|
+
function useUid(prefix) {
|
|
84
|
+
return prefix + React.useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
85
|
+
}
|
|
86
|
+
function DrawingSvg({ entry, variant, title, className, style, }) {
|
|
87
|
+
const uid = useUid(`ep-${entry.name}`);
|
|
88
|
+
const d = entry.draw({ uid, ink: INLINE_INK, variant });
|
|
89
|
+
return (_jsxs("svg", { "data-slot": "illustration", "data-kind": entry.kind, "data-name": entry.id, "data-variant": variant, viewBox: d.viewBox, preserveAspectRatio: d.preserveAspectRatio ?? "xMidYMid meet", fill: "none", role: title ? "img" : undefined, "aria-label": title, "aria-hidden": title ? undefined : true, focusable: "false", className: cn("block h-auto max-h-full w-full select-none", className), style: style, children: [title && _jsx("title", { children: title }), d.body.map((c, i) => toReact(c, i))] }));
|
|
90
|
+
}
|
|
91
|
+
/* ── Sheets ─────────────────────────────────────────────────────────────────── */
|
|
92
|
+
function SheetFigure({ entry, title, className, style }) {
|
|
93
|
+
const drawing = getIllustration(entry.drawing);
|
|
94
|
+
const s = entry.sheet;
|
|
95
|
+
return (_jsx(SpecSheet, { "data-name": entry.id, tone: s.tone, index: s.index, eyebrow: s.eyebrow, marks: s.marks, titleBlock: s.titleBlock, lit: true, "aria-label": title, drawingClassName: s.bleed ? "p-0" : undefined, className: className, style: { ...(s.aspect ? { "--sheet-aspect": String(s.aspect) } : null), ...style }, children: _jsx(DrawingSvg, { entry: drawing, variant: entry.drawingVariant ?? drawing.variants[0], className: s.bleed ? "h-full" : undefined }) }));
|
|
96
|
+
}
|
|
97
|
+
/* ── Editorial ──────────────────────────────────────────────────────────────── */
|
|
98
|
+
function EditorialImage({ entry, priority, title, className, style, }) {
|
|
99
|
+
const { src, srcSet } = editorialSource(entry.name);
|
|
100
|
+
const ref = React.useRef(null);
|
|
101
|
+
// A server no bundler built — Node itself, Vite's SSR — resolves the files to `file:` URLs, which
|
|
102
|
+
// no page can load: it leaves them out, and the browser puts in its own once it hydrates (React
|
|
103
|
+
// keeps the server's attributes then). Next.js gives both sides the same URL.
|
|
104
|
+
const web = !src.startsWith("file:");
|
|
105
|
+
React.useLayoutEffect(() => {
|
|
106
|
+
const img = ref.current;
|
|
107
|
+
if (!img || img.getAttribute("src") === src)
|
|
108
|
+
return;
|
|
109
|
+
img.srcset = srcSet;
|
|
110
|
+
img.src = src;
|
|
111
|
+
}, [src, srcSet]);
|
|
112
|
+
return (_jsx("img", { ref: ref, "data-slot": "illustration", "data-kind": "editorial", "data-name": entry.id, src: web ? src : undefined, srcSet: web ? srcSet : undefined, suppressHydrationWarning: true, sizes: entry.sizes, width: entry.width, height: entry.height, alt: title ?? "", "aria-hidden": title ? undefined : true, draggable: false, loading: priority ? "eager" : "lazy", fetchPriority: priority ? "high" : undefined, decoding: "async", className: cn("pointer-events-none block size-full object-contain p-[6%] select-none [-webkit-user-drag:none] dark:invert", className), style: style }));
|
|
113
|
+
}
|
|
114
|
+
function CornerMark({ className }) {
|
|
115
|
+
return (_jsx("svg", { "aria-hidden": true, focusable: "false", viewBox: "0 0 13 13", className: cn("pointer-events-none absolute z-3 size-[13px] text-(--sheet-mark)", className), children: _jsx("path", { d: "M6.5 0v13M0 6.5h13", stroke: "currentColor", strokeWidth: "1", shapeRendering: "crispEdges" }) }));
|
|
116
|
+
}
|
|
117
|
+
function setLight(event, lit) {
|
|
118
|
+
const el = event.currentTarget;
|
|
119
|
+
if (event.pointerType !== "mouse" && event.pointerType !== "pen")
|
|
120
|
+
return;
|
|
121
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
122
|
+
return;
|
|
123
|
+
if (!lit) {
|
|
124
|
+
el.dataset.lit = "false";
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const rect = el.getBoundingClientRect();
|
|
128
|
+
el.style.setProperty("--lx", `${(((event.clientX - rect.left) / rect.width) * 100).toFixed(2)}%`);
|
|
129
|
+
el.style.setProperty("--ly", `${(((event.clientY - rect.top) / rect.height) * 100).toFixed(2)}%`);
|
|
130
|
+
el.dataset.lit = "true";
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* SpecSheet — the frame of the `sheet/…` entries, for your own sheets and walls: a square-cornered
|
|
134
|
+
* night or paper tile with a mono index caption, optional crosshairs and an engineering title
|
|
135
|
+
* block, holding one `<Illustration>` drawing. Its fill is the content, so it skips the material.
|
|
136
|
+
*
|
|
137
|
+
* It has no width of its own (the drawing is laid over an aspect-ratio box), so give it or its
|
|
138
|
+
* parent a width. The rule people break: giving it a radius, a drop shadow or the card material.
|
|
139
|
+
*/
|
|
140
|
+
export function SpecSheet({ tone = "night", index, eyebrow, titleBlock, marks = false, grain, lit = false, c, r, drawingClassName, className, style, children, onPointerMove, onPointerLeave, ...props }) {
|
|
141
|
+
const showGrain = grain ?? tone === "night";
|
|
142
|
+
const hasCaption = index != null || eyebrow != null;
|
|
143
|
+
return (_jsxs("figure", { "data-slot": "spec-sheet", "data-tone": tone, className: cn(tone === "night" ? "theme-night" : "theme-light", "m-0 w-full", className), style: { ...(c ? { "--c": c } : null), ...(r ? { "--r": r } : null), ...style }, onPointerMove: (event) => {
|
|
144
|
+
if (lit)
|
|
145
|
+
setLight(event, true);
|
|
146
|
+
onPointerMove?.(event);
|
|
147
|
+
}, onPointerLeave: (event) => {
|
|
148
|
+
if (lit)
|
|
149
|
+
setLight(event, false);
|
|
150
|
+
onPointerLeave?.(event);
|
|
151
|
+
}, ...props, children: [hasCaption ? (_jsxs("figcaption", { "data-slot": "spec-sheet-caption", className: cn("absolute inset-x-0 top-0 z-3 flex items-start justify-between gap-4 pt-3.5 font-mono text-[10px] leading-[1.4] tracking-[0.14em] text-(--sheet-caption) uppercase sm:pt-4",
|
|
152
|
+
// Clear the corner crosshairs when they are shown.
|
|
153
|
+
marks ? "px-9" : "px-4 sm:px-5"), children: [_jsx("span", { "data-slot": "spec-sheet-index", className: "tabular-nums", children: index }), eyebrow != null ? (_jsx("span", { "data-slot": "spec-sheet-eyebrow", className: "text-end", children: eyebrow })) : null] })) : null, _jsx("div", { "data-slot": "spec-sheet-drawing", className: cn("absolute inset-0 z-1 grid grid-cols-[minmax(0,1fr)] grid-rows-[minmax(0,1fr)] place-items-center p-[max(2.75rem,9%)]", drawingClassName), children: children }), showGrain ? _jsx("div", { "aria-hidden": true, "data-still": "", className: "grain z-2" }) : null, lit ? _jsx("div", { "aria-hidden": true, "data-slot": "spec-sheet-light" }) : null, marks ? (_jsxs(_Fragment, { children: [_jsx(CornerMark, { className: "top-2.5 left-2.5" }), _jsx(CornerMark, { className: "top-2.5 right-2.5" }), _jsx(CornerMark, { className: "bottom-2.5 left-2.5" }), _jsx(CornerMark, { className: "right-2.5 bottom-2.5" })] })) : null, titleBlock?.length ? (_jsx("dl", { "data-slot": "spec-sheet-title-block", className: cn("absolute z-3 m-0 grid grid-cols-2 border-t border-l border-(--sheet-rule) font-mono leading-none", marks ? "right-7 bottom-7" : "right-3 bottom-3 sm:right-4 sm:bottom-4"), children: titleBlock.map((entry, i) => (_jsxs("div", { className: "flex min-w-[64px] flex-col gap-1 border-r border-b border-(--sheet-rule) px-2 py-1.5 last:odd:col-span-2", children: [_jsx("dt", { className: "text-[9px] tracking-[0.14em] text-(--sheet-caption) uppercase", children: entry.label }), _jsx("dd", { className: "m-0 text-[10px] text-foreground tabular-nums", children: entry.value })] }, i))) })) : null] }));
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* SpecSheetGrid — the light-table wall: a 12-column bento of `SpecSheet` tiles with square
|
|
157
|
+
* cells, sized by container queries. Each sheet spans `c` columns × `r` rows. Below 40rem of
|
|
158
|
+
* available width the tiles stack and keep their proportion.
|
|
159
|
+
*
|
|
160
|
+
* The rule people break: mixing tones at random. Group night and paper sheets so the wall
|
|
161
|
+
* reads as one composition with one strong idea.
|
|
162
|
+
*/
|
|
163
|
+
export function SpecSheetGrid({ className, children, ...props }) {
|
|
164
|
+
return (_jsx("div", { "data-slot": "spec-sheet-grid", className: cn("w-full", className), ...props, children: _jsx("div", { "data-slot": "spec-sheet-grid-inner", children: children }) }));
|
|
165
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { Button as BaseButton } from "@base-ui/react/button";
|
|
2
|
+
import { Field as BaseField } from "@base-ui/react/field";
|
|
3
|
+
import { Input as BaseInput } from "@base-ui/react/input";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export interface InputGroupMessages {
|
|
6
|
+
/** InputGroupPasswordToggle's name, whether the password is shown or not. */
|
|
7
|
+
showPassword: string;
|
|
8
|
+
/** InputGroupClearButton's name. */
|
|
9
|
+
clear: string;
|
|
10
|
+
}
|
|
11
|
+
declare module "./locale" {
|
|
12
|
+
interface Messages {
|
|
13
|
+
inputGroup: InputGroupMessages;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
declare const groupSizes: {
|
|
17
|
+
readonly sm: "min-h-(--control-h-sm) text-[13px]";
|
|
18
|
+
readonly default: "min-h-(--control-h) text-base sm:text-[15px]";
|
|
19
|
+
};
|
|
20
|
+
export interface InputGroupProps extends React.ComponentProps<"div"> {
|
|
21
|
+
/** `sm` (30px) for dense surfaces; `default` (38px) everywhere else. */
|
|
22
|
+
size?: keyof typeof groupSizes;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* InputGroup — one recessed field that holds an input (or textarea) together with addons:
|
|
26
|
+
* an icon, a prefix like `https://`, a keyboard hint, a small button, or a toolbar under a
|
|
27
|
+
* textarea. The group wears the field material (10px corners, 38px or 30px dense); the control
|
|
28
|
+
* inside is borderless, and like any text field the group takes a softer edge on focus, no ring.
|
|
29
|
+
*
|
|
30
|
+
* Use it when the extra part belongs to the value: a search icon, a unit, a copy button. The
|
|
31
|
+
* rule people break: putting a separate action (Submit, Save) inside — that is a `Button`
|
|
32
|
+
* beside the field, or a `ButtonGroup`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function InputGroup({ size, className, ...props }: InputGroupProps): React.JSX.Element;
|
|
35
|
+
export interface InputGroupInputProps extends Omit<BaseInput.Props, "size"> {
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The borderless input inside an `InputGroup`. Works inside `<Field>` like `Input`: the label,
|
|
39
|
+
* description and validation attach to it, and the group shows the state.
|
|
40
|
+
*/
|
|
41
|
+
export declare function InputGroupInput({ className, ...props }: InputGroupInputProps): React.JSX.Element;
|
|
42
|
+
export interface InputGroupTextareaProps extends Omit<BaseField.Control.Props, "render"> {
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The borderless textarea inside an `InputGroup`. It has no resize handle: the handle would sit
|
|
46
|
+
* on the toolbar's edge inside the group. Instead it grows with its content (`field-sizing:
|
|
47
|
+
* content`, where supported) up to 240px, then scrolls. The group (with its toolbar) is at
|
|
48
|
+
* least 140px tall, like `Textarea`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function InputGroupTextarea({ className, ...props }: InputGroupTextareaProps): React.JSX.Element;
|
|
51
|
+
declare const addonAlign: {
|
|
52
|
+
readonly "inline-start": "order-first ps-3.5 group-data-[size=sm]/input-group:ps-2.5 has-[>[data-slot=input-group-button]]:ps-[3px] group-data-[size=sm]/input-group:has-[>[data-slot=input-group-button]]:ps-0.5";
|
|
53
|
+
readonly "inline-end": "order-last pe-3.5 group-data-[size=sm]/input-group:pe-2.5 has-[>[data-slot=input-group-button]]:pe-[3px] group-data-[size=sm]/input-group:has-[>[data-slot=input-group-button]]:pe-0.5";
|
|
54
|
+
readonly "block-start": "order-first w-full justify-start px-3.5 pt-2.5 pb-1";
|
|
55
|
+
readonly "block-end": "order-last w-full justify-start px-2 pt-1 pb-2";
|
|
56
|
+
};
|
|
57
|
+
export interface InputGroupAddonProps extends React.ComponentProps<"div"> {
|
|
58
|
+
/**
|
|
59
|
+
* Where the addon sits: `inline-start` / `inline-end` beside the control, `block-start` /
|
|
60
|
+
* `block-end` above or below it (a header or toolbar, usually with a textarea).
|
|
61
|
+
*/
|
|
62
|
+
align?: keyof typeof addonAlign;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* An addon inside an `InputGroup`: an icon, `InputGroupText`, a `Kbd`, or `InputGroupButton`s.
|
|
66
|
+
* Clicking the addon's empty space focuses the control.
|
|
67
|
+
*/
|
|
68
|
+
export declare function InputGroupAddon({ align, className, onMouseDown, ...props }: InputGroupAddonProps): React.JSX.Element;
|
|
69
|
+
/** Plain text inside an addon: a prefix, a suffix or a count. Licht Mono, muted, tabular. */
|
|
70
|
+
export declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
71
|
+
declare const buttonVariants: {
|
|
72
|
+
readonly secondary: "material-raised";
|
|
73
|
+
readonly ghost: "material-row text-muted-foreground";
|
|
74
|
+
readonly primary: "material-primary";
|
|
75
|
+
};
|
|
76
|
+
declare const buttonSizes: {
|
|
77
|
+
/** 24px — fits the dense group, or a quiet action in the default one. */
|
|
78
|
+
readonly sm: "min-h-(--control-inset-sm) gap-1 rounded-(--input-group-button-radius) px-2 text-xs leading-none";
|
|
79
|
+
/** 30px — fits the 38px group with a 3px inset, like a segment. */
|
|
80
|
+
readonly default: "min-h-(--control-inset) gap-1.5 rounded-(--input-group-button-radius) px-2.5 text-[13px] leading-none";
|
|
81
|
+
readonly "icon-sm": "size-(--control-inset-sm) rounded-full p-0 [&_svg:not([class*='size-'])]:size-[min(14px,calc(var(--control-inset-sm)-4px))]";
|
|
82
|
+
readonly icon: "size-(--control-inset) rounded-full p-0";
|
|
83
|
+
};
|
|
84
|
+
export interface InputGroupButtonProps extends BaseButton.Props {
|
|
85
|
+
/** `secondary` (raised, default), `ghost` (flat until hovered) or `primary` (the one action, e.g. Send). */
|
|
86
|
+
variant?: keyof typeof buttonVariants;
|
|
87
|
+
/** 30px (`default`, `icon`) fits the 38px group; 24px (`sm`, `icon-sm`) fits the dense one. */
|
|
88
|
+
size?: keyof typeof buttonSizes;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A small button sized to sit inside the group: 30px in the 38px field (a 3px inset, like the
|
|
92
|
+
* NumberField steppers), 24px in the dense one. Its corners are concentric with the field's:
|
|
93
|
+
* outer radius − inset = inner radius, so 7px in the default group and 8px in the dense one
|
|
94
|
+
* (see `--input-group-button-radius` in controls.css). Icon-only sizes are round and need
|
|
95
|
+
* `aria-label`.
|
|
96
|
+
*/
|
|
97
|
+
export declare function InputGroupButton({ variant, size, className, ...props }: InputGroupButtonProps): React.JSX.Element;
|
|
98
|
+
export interface InputGroupPasswordToggleProps extends Omit<InputGroupButtonProps, "variant" | "size" | "children"> {
|
|
99
|
+
/** The password is shown (the input is `type="text"`). */
|
|
100
|
+
visible: boolean;
|
|
101
|
+
onVisibleChange: (visible: boolean) => void;
|
|
102
|
+
/**
|
|
103
|
+
* The button's name, the same whether the password is shown or not: `aria-pressed` says which.
|
|
104
|
+
* Default "Show password", or `messages.inputGroup.showPassword` from a LocaleProvider.
|
|
105
|
+
*/
|
|
106
|
+
label?: string;
|
|
107
|
+
/** @deprecated A toggle keeps one name: use `label`. Only `show` is read, as that name. */
|
|
108
|
+
labels?: {
|
|
109
|
+
show?: string;
|
|
110
|
+
hide?: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* InputGroupPasswordToggle — the show/hide button for a password: a ghost icon button with an
|
|
115
|
+
* eye whose slash draws across it when the password is shown and draws back when it is hidden,
|
|
116
|
+
* the eye opening a gap along the slash as it passes, while the field's text sweeps into its
|
|
117
|
+
* new form behind a soft edge. It is a toggle button: one name, "Show password", and
|
|
118
|
+
* `aria-pressed` while the password is shown — a toggle's name never changes with its state.
|
|
119
|
+
* Switch the input's `type` with `visible`.
|
|
120
|
+
*/
|
|
121
|
+
export declare function InputGroupPasswordToggle({ visible, onVisibleChange, label, labels, ref, onClick, ...props }: InputGroupPasswordToggleProps): React.JSX.Element;
|
|
122
|
+
export interface InputGroupClearButtonProps extends Omit<InputGroupButtonProps, "variant" | "size" | "children" | "onClick"> {
|
|
123
|
+
/**
|
|
124
|
+
* Clear your state (`setQuery("")`). Without it, the button empties the field itself and fires
|
|
125
|
+
* its change event, for an uncontrolled input.
|
|
126
|
+
*/
|
|
127
|
+
onClear?: () => void;
|
|
128
|
+
/** The button's name. Default "Clear" (`messages.inputGroup.clear`). Say what it clears: "Clear search". */
|
|
129
|
+
label?: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* InputGroupClearButton — empties the field it sits in, smoothly: the text is erased right to
|
|
133
|
+
* left behind a soft edge, as if typed away, then the value clears and focus returns to the
|
|
134
|
+
* field. The button fades out while the field is empty and back in when there is text, instead of
|
|
135
|
+
* popping in and out. Reduced motion clears at once.
|
|
136
|
+
*/
|
|
137
|
+
export declare function InputGroupClearButton({ onClear, label, ref, className, ...props }: InputGroupClearButtonProps): React.JSX.Element;
|
|
138
|
+
export {};
|