@zonsh/ui 0.4.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +639 -0
- package/README.md +49 -21
- package/dist/brand.d.ts +3 -0
- package/dist/brand.js +7 -0
- package/dist/components/_breadcrumb-more.d.ts +6 -0
- package/dist/components/_breadcrumb-more.js +5 -0
- package/dist/components/_drawing-svg.d.ts +11 -0
- package/dist/components/_drawing-svg.js +30 -0
- package/dist/components/_media.d.ts +159 -0
- package/dist/components/_media.js +266 -0
- package/dist/components/_overlay.d.ts +8 -5
- package/dist/components/_overlay.js +11 -6
- package/dist/components/_scheduler-calendar.d.ts +71 -0
- package/dist/components/_scheduler-calendar.js +940 -0
- package/dist/components/_scheduler-editor.d.ts +29 -0
- package/dist/components/_scheduler-editor.js +111 -0
- package/dist/components/_scheduler-menu.d.ts +16 -0
- package/dist/components/_scheduler-menu.js +18 -0
- package/dist/components/_scheduler-parts.d.ts +164 -0
- package/dist/components/_scheduler-parts.js +327 -0
- package/dist/components/_suggest-list.d.ts +142 -0
- package/dist/components/_suggest-list.js +159 -0
- package/dist/components/_toolbar-more.d.ts +24 -0
- package/dist/components/_toolbar-more.js +25 -0
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +7 -7
- package/dist/components/action-sheet.d.ts +88 -0
- package/dist/components/action-sheet.js +124 -0
- package/dist/components/alert-dialog.js +3 -1
- package/dist/components/alert.d.ts +11 -18
- package/dist/components/alert.js +9 -6
- package/dist/components/app-bar.d.ts +93 -0
- package/dist/components/app-bar.js +175 -0
- package/dist/components/ascii-field.js +2 -1
- package/dist/components/audio-player.d.ts +134 -0
- package/dist/components/audio-player.js +618 -0
- package/dist/components/avatar.d.ts +6 -6
- package/dist/components/avatar.js +13 -11
- package/dist/components/badge.d.ts +12 -12
- package/dist/components/badge.js +7 -5
- package/dist/components/bottom-nav.d.ts +53 -11
- package/dist/components/bottom-nav.js +389 -24
- package/dist/components/breadcrumb.d.ts +11 -2
- package/dist/components/breadcrumb.js +60 -6
- package/dist/components/button-group.js +5 -1
- package/dist/components/button.d.ts +23 -6
- package/dist/components/button.js +64 -8
- package/dist/components/calendar.js +8 -6
- package/dist/components/card.d.ts +10 -8
- package/dist/components/card.js +15 -14
- package/dist/components/carousel.d.ts +2 -2
- package/dist/components/carousel.js +21 -8
- package/dist/components/chart.d.ts +38 -1
- package/dist/components/chart.js +27 -5
- package/dist/components/checkbox.js +2 -2
- package/dist/components/code-block.d.ts +9 -2
- package/dist/components/code-block.js +26 -7
- package/dist/components/collapsible.js +4 -4
- package/dist/components/color-picker.d.ts +2 -2
- package/dist/components/color-picker.js +5 -5
- package/dist/components/combobox.d.ts +26 -7
- package/dist/components/combobox.js +32 -13
- package/dist/components/command.d.ts +29 -5
- package/dist/components/command.js +37 -12
- package/dist/components/context-menu.d.ts +5 -2
- package/dist/components/context-menu.js +24 -3
- package/dist/components/conversation.d.ts +1 -1
- package/dist/components/conversation.js +77 -16
- package/dist/components/copy-button.d.ts +1 -1
- package/dist/components/copy-button.js +8 -6
- package/dist/components/data-table.d.ts +6 -6
- package/dist/components/data-table.js +41 -15
- package/dist/components/date-picker.d.ts +31 -9
- package/dist/components/date-picker.js +100 -18
- package/dist/components/dialog.d.ts +17 -10
- package/dist/components/dialog.js +20 -13
- package/dist/components/drawer.d.ts +26 -8
- package/dist/components/drawer.js +75 -16
- package/dist/components/drawing.d.ts +25 -0
- package/dist/components/drawing.js +32 -0
- package/dist/components/empty.js +2 -2
- package/dist/components/feature-list.d.ts +65 -13
- package/dist/components/feature-list.js +116 -15
- package/dist/components/field.js +2 -2
- package/dist/components/file-drop.d.ts +9 -7
- package/dist/components/file-drop.js +8 -43
- package/dist/components/filter-bar.d.ts +10 -9
- package/dist/components/filter-bar.js +42 -25
- package/dist/components/graph.d.ts +19 -3
- package/dist/components/graph.js +190 -28
- package/dist/components/illustration.js +53 -31
- package/dist/components/input-group.d.ts +6 -11
- package/dist/components/input-group.js +21 -19
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +3 -3
- package/dist/components/item.d.ts +9 -6
- package/dist/components/item.js +13 -8
- package/dist/components/kbd.d.ts +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/layout.d.ts +2 -1
- package/dist/components/layout.js +55 -11
- package/dist/components/lightbox.d.ts +76 -9
- package/dist/components/lightbox.js +354 -48
- package/dist/components/locale.d.ts +6 -6
- package/dist/components/logo.d.ts +21 -1
- package/dist/components/logo.js +32 -2
- package/dist/components/markdown-editor.d.ts +275 -0
- package/dist/components/markdown-editor.js +831 -0
- package/dist/components/mentions.d.ts +153 -0
- package/dist/components/mentions.js +507 -0
- package/dist/components/menu.d.ts +2 -1
- package/dist/components/menu.js +5 -4
- package/dist/components/menubar.d.ts +23 -5
- package/dist/components/menubar.js +153 -31
- package/dist/components/message.d.ts +62 -11
- package/dist/components/message.js +51 -14
- package/dist/components/meter.js +1 -1
- package/dist/components/money-input.d.ts +1 -1
- package/dist/components/money-input.js +1 -1
- package/dist/components/native-select.d.ts +2 -2
- package/dist/components/native-select.js +4 -4
- package/dist/components/navigation-menu.d.ts +3 -1
- package/dist/components/navigation-menu.js +23 -10
- package/dist/components/number-field.d.ts +2 -9
- package/dist/components/number-field.js +90 -26
- package/dist/components/number-roll.d.ts +26 -0
- package/dist/components/number-roll.js +81 -0
- package/dist/components/otp-field.d.ts +1 -1
- package/dist/components/otp-field.js +24 -3
- package/dist/components/pagination.d.ts +11 -3
- package/dist/components/pagination.js +59 -13
- package/dist/components/pdf-viewer.d.ts +1 -1
- package/dist/components/pdf-viewer.js +8 -8
- package/dist/components/phone-input.d.ts +1 -1
- package/dist/components/phone-input.js +2 -2
- package/dist/components/popover.js +5 -3
- package/dist/components/preview-card.d.ts +37 -2
- package/dist/components/preview-card.js +226 -2
- package/dist/components/progress.js +1 -1
- package/dist/components/prompt-input.d.ts +1 -1
- package/dist/components/prompt-input.js +35 -17
- package/dist/components/pull-to-refresh.d.ts +50 -0
- package/dist/components/pull-to-refresh.js +189 -0
- package/dist/components/quote.d.ts +6 -1
- package/dist/components/quote.js +3 -2
- package/dist/components/radio-group.js +8 -3
- package/dist/components/rating.d.ts +4 -1
- package/dist/components/rating.js +131 -10
- package/dist/components/reasoning.d.ts +1 -1
- package/dist/components/reasoning.js +7 -3
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/resizable.js +2 -2
- package/dist/components/response.d.ts +4 -3
- package/dist/components/response.js +39 -15
- package/dist/components/scheduler.d.ts +352 -0
- package/dist/components/scheduler.js +1717 -0
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.d.ts +17 -4
- package/dist/components/select.js +140 -9
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +3 -3
- package/dist/components/sidebar.d.ts +44 -3
- package/dist/components/sidebar.js +90 -31
- package/dist/components/site-header.d.ts +18 -13
- package/dist/components/site-header.js +26 -9
- package/dist/components/skeleton.d.ts +18 -8
- package/dist/components/skeleton.js +23 -8
- package/dist/components/slider.js +2 -2
- package/dist/components/sortable.d.ts +55 -4
- package/dist/components/sortable.js +187 -94
- package/dist/components/sources.d.ts +1 -1
- package/dist/components/sources.js +2 -2
- package/dist/components/spinner.d.ts +4 -4
- package/dist/components/spinner.js +4 -4
- package/dist/components/stat.d.ts +21 -4
- package/dist/components/stat.js +17 -8
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +8 -7
- package/dist/components/suggestions.d.ts +11 -3
- package/dist/components/suggestions.js +10 -4
- package/dist/components/swipe-actions.d.ts +66 -0
- package/dist/components/swipe-actions.js +292 -0
- package/dist/components/switch.js +1 -1
- package/dist/components/table.d.ts +13 -7
- package/dist/components/table.js +124 -23
- package/dist/components/tabs.js +15 -8
- package/dist/components/tag.d.ts +19 -20
- package/dist/components/tag.js +9 -5
- package/dist/components/tags-input.d.ts +2 -7
- package/dist/components/tags-input.js +11 -8
- package/dist/components/textarea.d.ts +3 -2
- package/dist/components/textarea.js +4 -3
- package/dist/components/theme.d.ts +50 -7
- package/dist/components/theme.js +168 -12
- package/dist/components/time-field.d.ts +6 -10
- package/dist/components/time-field.js +19 -9
- package/dist/components/timeline.d.ts +19 -3
- package/dist/components/timeline.js +21 -9
- package/dist/components/tippy.d.ts +17 -1
- package/dist/components/tippy.js +95 -15
- package/dist/components/toast.d.ts +2 -7
- package/dist/components/toast.js +12 -8
- package/dist/components/toggle-group.d.ts +7 -1
- package/dist/components/toggle-group.js +17 -5
- package/dist/components/toggle.d.ts +2 -2
- package/dist/components/toggle.js +3 -2
- package/dist/components/tool-call.d.ts +1 -1
- package/dist/components/tool-call.js +8 -3
- package/dist/components/toolbar.d.ts +57 -4
- package/dist/components/toolbar.js +219 -16
- package/dist/components/tooltip.d.ts +5 -3
- package/dist/components/tooltip.js +14 -6
- package/dist/components/tour.d.ts +1 -1
- package/dist/components/tour.js +70 -24
- package/dist/components/tree.js +33 -10
- package/dist/components/typography.d.ts +31 -8
- package/dist/components/typography.js +21 -10
- package/dist/components/video-player.d.ts +7 -2
- package/dist/components/video-player.js +182 -225
- package/dist/index.d.ts +99 -92
- package/dist/index.js +99 -92
- package/dist/lib/calendar.d.ts +153 -0
- package/dist/lib/calendar.js +312 -0
- package/dist/lib/cn.d.ts +3 -1
- package/dist/lib/cn.js +5 -0
- package/dist/lib/code-highlight.d.ts +14 -0
- package/dist/lib/code-highlight.js +81 -18
- package/dist/lib/drag.d.ts +39 -0
- package/dist/lib/drag.js +96 -0
- package/dist/lib/editorial-assets.js +16 -8
- package/dist/lib/figure/figures/automation.js +25 -6
- package/dist/lib/figure/figures/bar-chart.js +6 -1
- package/dist/lib/figure/figures/brackets-classic.js +4 -1
- package/dist/lib/figure/figures/city.js +12 -2
- package/dist/lib/figure/figures/conveyor.js +17 -4
- package/dist/lib/figure/figures/database.js +5 -2
- package/dist/lib/figure/figures/documents.js +11 -3
- package/dist/lib/figure/figures/inbox.js +5 -2
- package/dist/lib/figure/figures/laptop.js +3 -1
- package/dist/lib/figure/figures/pipeline.js +45 -10
- package/dist/lib/figure/figures/platform.js +62 -7
- package/dist/lib/figure/figures/server.js +21 -5
- package/dist/lib/figure/figures/spreadsheet.js +29 -5
- package/dist/lib/figure/kernel.d.ts +4 -2
- package/dist/lib/figure/kernel.js +10 -5
- package/dist/lib/figure/parts.js +6 -2
- package/dist/lib/files.d.ts +31 -0
- package/dist/lib/files.js +60 -0
- package/dist/lib/gesture.d.ts +70 -0
- package/dist/lib/gesture.js +141 -0
- package/dist/lib/glide.d.ts +10 -4
- package/dist/lib/glide.js +14 -5
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +6 -0
- package/dist/lib/illustration-library.js +1 -6
- package/dist/lib/markdown-edit.d.ts +112 -0
- package/dist/lib/markdown-edit.js +557 -0
- package/dist/lib/markdown-rich-editor.d.ts +188 -0
- package/dist/lib/markdown-rich-editor.js +1153 -0
- package/dist/lib/markdown-rich.d.ts +63 -0
- package/dist/lib/markdown-rich.js +534 -0
- package/dist/lib/mentions.d.ts +100 -0
- package/dist/lib/mentions.js +246 -0
- package/dist/lib/motion.d.ts +18 -0
- package/dist/lib/motion.js +43 -5
- package/dist/lib/number-roll.d.ts +89 -0
- package/dist/lib/number-roll.js +391 -0
- package/dist/lib/platform.d.ts +6 -0
- package/dist/lib/platform.js +14 -0
- package/dist/lib/portal-container.d.ts +9 -0
- package/dist/lib/portal-container.js +10 -0
- package/dist/lib/press.d.ts +5 -0
- package/dist/lib/press.js +186 -0
- package/dist/lib/scheduler.d.ts +128 -0
- package/dist/lib/scheduler.js +272 -0
- package/dist/lib/scroll-edges.d.ts +9 -0
- package/dist/lib/scroll-edges.js +50 -0
- package/dist/lib/table-fit.d.ts +4 -3
- package/dist/lib/table-fit.js +92 -25
- package/dist/lib/theme-preset.d.ts +267 -0
- package/dist/lib/theme-preset.js +1046 -0
- package/dist/lib/theme-script.d.ts +23 -3
- package/dist/lib/theme-script.js +17 -5
- package/dist/lib/tippy/sprite.d.ts +36 -4
- package/dist/lib/tippy/sprite.js +188 -15
- package/dist/lib/tone.d.ts +4 -0
- package/dist/lib/tone.js +1 -0
- package/dist/messages/de.d.ts +3 -3
- package/dist/messages/de.js +274 -3
- package/dist/skills/zon-ui/SKILL.md +279 -0
- package/dist/skills/zon-ui/references/authoring.md +265 -0
- package/dist/skills/zon-ui/references/brand.md +416 -0
- package/dist/skills/zon-ui/references/components/accordion.md +199 -0
- package/dist/skills/zon-ui/references/components/action-sheet.md +268 -0
- package/dist/skills/zon-ui/references/components/alert-dialog.md +276 -0
- package/dist/skills/zon-ui/references/components/alert.md +167 -0
- package/dist/skills/zon-ui/references/components/app-bar.md +307 -0
- package/dist/skills/zon-ui/references/components/ascii-field.md +121 -0
- package/dist/skills/zon-ui/references/components/aspect-ratio.md +112 -0
- package/dist/skills/zon-ui/references/components/audio-player.md +231 -0
- package/dist/skills/zon-ui/references/components/avatar.md +98 -0
- package/dist/skills/zon-ui/references/components/badge.md +227 -0
- package/dist/skills/zon-ui/references/components/bottom-nav.md +709 -0
- package/dist/skills/zon-ui/references/components/breadcrumb.md +143 -0
- package/dist/skills/zon-ui/references/components/button-group.md +216 -0
- package/dist/skills/zon-ui/references/components/button.md +309 -0
- package/dist/skills/zon-ui/references/components/calendar.md +296 -0
- package/dist/skills/zon-ui/references/components/card.md +158 -0
- package/dist/skills/zon-ui/references/components/carousel.md +297 -0
- package/dist/skills/zon-ui/references/components/chart.md +739 -0
- package/dist/skills/zon-ui/references/components/chat.md +417 -0
- package/dist/skills/zon-ui/references/components/checkbox.md +219 -0
- package/dist/skills/zon-ui/references/components/code-block.md +143 -0
- package/dist/skills/zon-ui/references/components/code-highlight.md +118 -0
- package/dist/skills/zon-ui/references/components/collapsible.md +146 -0
- package/dist/skills/zon-ui/references/components/color-picker.md +200 -0
- package/dist/skills/zon-ui/references/components/combobox.md +455 -0
- package/dist/skills/zon-ui/references/components/command.md +326 -0
- package/dist/skills/zon-ui/references/components/contact-form.md +562 -0
- package/dist/skills/zon-ui/references/components/context-menu.md +159 -0
- package/dist/skills/zon-ui/references/components/conversation.md +146 -0
- package/dist/skills/zon-ui/references/components/copy-button.md +162 -0
- package/dist/skills/zon-ui/references/components/crm.md +1022 -0
- package/dist/skills/zon-ui/references/components/dashboard.md +612 -0
- package/dist/skills/zon-ui/references/components/data-table.md +776 -0
- package/dist/skills/zon-ui/references/components/date-picker.md +444 -0
- package/dist/skills/zon-ui/references/components/dialog.md +335 -0
- package/dist/skills/zon-ui/references/components/direction.md +165 -0
- package/dist/skills/zon-ui/references/components/drawer.md +276 -0
- package/dist/skills/zon-ui/references/components/drawing.md +94 -0
- package/dist/skills/zon-ui/references/components/empty.md +225 -0
- package/dist/skills/zon-ui/references/components/feature-list.md +412 -0
- package/dist/skills/zon-ui/references/components/field.md +209 -0
- package/dist/skills/zon-ui/references/components/file-drop.md +234 -0
- package/dist/skills/zon-ui/references/components/filter-bar.md +485 -0
- package/dist/skills/zon-ui/references/components/form.md +970 -0
- package/dist/skills/zon-ui/references/components/graph.md +339 -0
- package/dist/skills/zon-ui/references/components/illustration.md +497 -0
- package/dist/skills/zon-ui/references/components/inbox.md +263 -0
- package/dist/skills/zon-ui/references/components/input-group.md +339 -0
- package/dist/skills/zon-ui/references/components/input.md +189 -0
- package/dist/skills/zon-ui/references/components/item.md +277 -0
- package/dist/skills/zon-ui/references/components/kanban.md +626 -0
- package/dist/skills/zon-ui/references/components/kbd.md +116 -0
- package/dist/skills/zon-ui/references/components/label.md +104 -0
- package/dist/skills/zon-ui/references/components/layout.md +291 -0
- package/dist/skills/zon-ui/references/components/lightbox.md +235 -0
- package/dist/skills/zon-ui/references/components/locale.md +279 -0
- package/dist/skills/zon-ui/references/components/logo.md +257 -0
- package/dist/skills/zon-ui/references/components/markdown-editor.md +558 -0
- package/dist/skills/zon-ui/references/components/mentions.md +512 -0
- package/dist/skills/zon-ui/references/components/menu.md +218 -0
- package/dist/skills/zon-ui/references/components/menubar.md +292 -0
- package/dist/skills/zon-ui/references/components/message.md +243 -0
- package/dist/skills/zon-ui/references/components/meter.md +105 -0
- package/dist/skills/zon-ui/references/components/money-input.md +333 -0
- package/dist/skills/zon-ui/references/components/native-select.md +197 -0
- package/dist/skills/zon-ui/references/components/navigation-menu.md +253 -0
- package/dist/skills/zon-ui/references/components/number-field.md +210 -0
- package/dist/skills/zon-ui/references/components/number-roll.md +175 -0
- package/dist/skills/zon-ui/references/components/onboarding.md +896 -0
- package/dist/skills/zon-ui/references/components/otp-field.md +166 -0
- package/dist/skills/zon-ui/references/components/pagination.md +109 -0
- package/dist/skills/zon-ui/references/components/pdf-viewer.md +177 -0
- package/dist/skills/zon-ui/references/components/phone-input.md +252 -0
- package/dist/skills/zon-ui/references/components/popover.md +176 -0
- package/dist/skills/zon-ui/references/components/preview-card.md +193 -0
- package/dist/skills/zon-ui/references/components/pricing.md +724 -0
- package/dist/skills/zon-ui/references/components/progress.md +92 -0
- package/dist/skills/zon-ui/references/components/prompt-input.md +307 -0
- package/dist/skills/zon-ui/references/components/pull-to-refresh.md +188 -0
- package/dist/skills/zon-ui/references/components/quote.md +115 -0
- package/dist/skills/zon-ui/references/components/radio-group.md +215 -0
- package/dist/skills/zon-ui/references/components/rating.md +260 -0
- package/dist/skills/zon-ui/references/components/reasoning.md +102 -0
- package/dist/skills/zon-ui/references/components/resizable.md +213 -0
- package/dist/skills/zon-ui/references/components/response.md +170 -0
- package/dist/skills/zon-ui/references/components/scheduler.md +732 -0
- package/dist/skills/zon-ui/references/components/scroll-area.md +122 -0
- package/dist/skills/zon-ui/references/components/select.md +351 -0
- package/dist/skills/zon-ui/references/components/separator.md +103 -0
- package/dist/skills/zon-ui/references/components/settings.md +793 -0
- package/dist/skills/zon-ui/references/components/shop.md +1715 -0
- package/dist/skills/zon-ui/references/components/sidebar.md +813 -0
- package/dist/skills/zon-ui/references/components/sign-in.md +1639 -0
- package/dist/skills/zon-ui/references/components/site-header.md +303 -0
- package/dist/skills/zon-ui/references/components/skeleton.md +256 -0
- package/dist/skills/zon-ui/references/components/slider.md +172 -0
- package/dist/skills/zon-ui/references/components/sortable.md +405 -0
- package/dist/skills/zon-ui/references/components/sources.md +106 -0
- package/dist/skills/zon-ui/references/components/spinner.md +222 -0
- package/dist/skills/zon-ui/references/components/stat.md +267 -0
- package/dist/skills/zon-ui/references/components/stepper.md +285 -0
- package/dist/skills/zon-ui/references/components/suggestions.md +146 -0
- package/dist/skills/zon-ui/references/components/swipe-actions.md +344 -0
- package/dist/skills/zon-ui/references/components/switch.md +160 -0
- package/dist/skills/zon-ui/references/components/table.md +999 -0
- package/dist/skills/zon-ui/references/components/tabs.md +258 -0
- package/dist/skills/zon-ui/references/components/tag.md +115 -0
- package/dist/skills/zon-ui/references/components/tags-input.md +216 -0
- package/dist/skills/zon-ui/references/components/textarea.md +95 -0
- package/dist/skills/zon-ui/references/components/theme-editor.md +3940 -0
- package/dist/skills/zon-ui/references/components/theme.md +362 -0
- package/dist/skills/zon-ui/references/components/time-field.md +222 -0
- package/dist/skills/zon-ui/references/components/timeline.md +285 -0
- package/dist/skills/zon-ui/references/components/tippy.md +243 -0
- package/dist/skills/zon-ui/references/components/toast.md +220 -0
- package/dist/skills/zon-ui/references/components/toggle-group.md +261 -0
- package/dist/skills/zon-ui/references/components/toggle.md +167 -0
- package/dist/skills/zon-ui/references/components/tool-call.md +146 -0
- package/dist/skills/zon-ui/references/components/toolbar.md +260 -0
- package/dist/skills/zon-ui/references/components/tooltip.md +172 -0
- package/dist/skills/zon-ui/references/components/tour.md +423 -0
- package/dist/skills/zon-ui/references/components/tree.md +481 -0
- package/dist/skills/zon-ui/references/components/typography.md +347 -0
- package/dist/skills/zon-ui/references/components/video-player.md +386 -0
- package/dist/skills/zon-ui/references/marketing.md +467 -0
- package/dist/skills/zon-ui/references/motion.md +455 -0
- package/dist/skills/zon-ui/references/recipes.md +1232 -0
- package/dist/skills/zon-ui/references/tokens.md +866 -0
- package/dist/sources/accordion.css +4 -0
- package/dist/sources/action-sheet.css +11 -0
- package/dist/sources/alert-dialog.css +6 -0
- package/dist/sources/alert.css +3 -0
- package/dist/sources/app-bar.css +14 -0
- package/dist/sources/ascii-field.css +3 -0
- package/dist/sources/aspect-ratio.css +3 -0
- package/dist/sources/audio-player.css +20 -0
- package/dist/sources/avatar.css +3 -0
- package/dist/sources/badge.css +3 -0
- package/dist/sources/bottom-nav.css +9 -0
- package/dist/sources/breadcrumb.css +14 -0
- package/dist/sources/button-group.css +3 -0
- package/dist/sources/button.css +9 -0
- package/dist/sources/calendar.css +13 -0
- package/dist/sources/card.css +3 -0
- package/dist/sources/carousel.css +11 -0
- package/dist/sources/chart.css +5 -0
- package/dist/sources/checkbox.css +6 -0
- package/dist/sources/code-block.css +13 -0
- package/dist/sources/collapsible.css +4 -0
- package/dist/sources/color-picker.css +13 -0
- package/dist/sources/combobox.css +13 -0
- package/dist/sources/command.css +13 -0
- package/dist/sources/context-menu.css +12 -0
- package/dist/sources/conversation.css +10 -0
- package/dist/sources/copy-button.css +10 -0
- package/dist/sources/data-table.css +27 -0
- package/dist/sources/date-picker.css +20 -0
- package/dist/sources/dialog.css +9 -0
- package/dist/sources/direction.css +2 -0
- package/dist/sources/drawer.css +9 -0
- package/dist/sources/drawing.css +5 -0
- package/dist/sources/empty.css +3 -0
- package/dist/sources/feature-list.css +4 -0
- package/dist/sources/field.css +4 -0
- package/dist/sources/file-drop.css +15 -0
- package/dist/sources/filter-bar.css +30 -0
- package/dist/sources/form.css +4 -0
- package/dist/sources/graph.css +19 -0
- package/dist/sources/illustration.css +28 -0
- package/dist/sources/input-group.css +7 -0
- package/dist/sources/input.css +3 -0
- package/dist/sources/item.css +4 -0
- package/dist/sources/kbd.css +5 -0
- package/dist/sources/label.css +3 -0
- package/dist/sources/layout.css +3 -0
- package/dist/sources/lightbox.css +33 -0
- package/dist/sources/locale.css +2 -0
- package/dist/sources/logo.css +4 -0
- package/dist/sources/markdown-editor.css +41 -0
- package/dist/sources/mentions.css +13 -0
- package/dist/sources/menu.css +11 -0
- package/dist/sources/menubar.css +14 -0
- package/dist/sources/message.css +16 -0
- package/dist/sources/meter.css +4 -0
- package/dist/sources/money-input.css +10 -0
- package/dist/sources/native-select.css +4 -0
- package/dist/sources/navigation-menu.css +8 -0
- package/dist/sources/number-field.css +8 -0
- package/dist/sources/number-roll.css +6 -0
- package/dist/sources/otp-field.css +5 -0
- package/dist/sources/pagination.css +11 -0
- package/dist/sources/pdf-viewer.css +30 -0
- package/dist/sources/phone-input.css +20 -0
- package/dist/sources/popover.css +7 -0
- package/dist/sources/preview-card.css +7 -0
- package/dist/sources/progress.css +4 -0
- package/dist/sources/prompt-input.css +15 -0
- package/dist/sources/pull-to-refresh.css +14 -0
- package/dist/sources/quote.css +3 -0
- package/dist/sources/radio-group.css +5 -0
- package/dist/sources/rating.css +6 -0
- package/dist/sources/reasoning.css +6 -0
- package/dist/sources/resizable.css +4 -0
- package/dist/sources/response.css +16 -0
- package/dist/sources/scheduler.css +44 -0
- package/dist/sources/scroll-area.css +3 -0
- package/dist/sources/select.css +12 -0
- package/dist/sources/separator.css +3 -0
- package/dist/sources/sidebar.css +19 -0
- package/dist/sources/site-header.css +15 -0
- package/dist/sources/skeleton.css +3 -0
- package/dist/sources/slider.css +6 -0
- package/dist/sources/sortable.css +12 -0
- package/dist/sources/sources.css +6 -0
- package/dist/sources/spinner.css +6 -0
- package/dist/sources/stat.css +9 -0
- package/dist/sources/stepper.css +6 -0
- package/dist/sources/suggestions.css +10 -0
- package/dist/sources/swipe-actions.css +20 -0
- package/dist/sources/switch.css +5 -0
- package/dist/sources/table.css +7 -0
- package/dist/sources/tabs.css +5 -0
- package/dist/sources/tag.css +3 -0
- package/dist/sources/tags-input.css +6 -0
- package/dist/sources/textarea.css +3 -0
- package/dist/sources/theme.css +13 -0
- package/dist/sources/time-field.css +7 -0
- package/dist/sources/timeline.css +7 -0
- package/dist/sources/tippy.css +6 -0
- package/dist/sources/toast.css +6 -0
- package/dist/sources/toggle-group.css +5 -0
- package/dist/sources/toggle.css +3 -0
- package/dist/sources/tool-call.css +16 -0
- package/dist/sources/toolbar.css +14 -0
- package/dist/sources/tooltip.css +6 -0
- package/dist/sources/tour.css +14 -0
- package/dist/sources/tree.css +6 -0
- package/dist/sources/typography.css +4 -0
- package/dist/sources/video-player.css +21 -0
- package/dist/styles/ai.css +3 -0
- package/dist/styles/brand.css +98 -0
- package/dist/styles/core.css +266 -0
- package/dist/styles/editor.css +3 -0
- package/dist/styles/expressive.css +75 -77
- package/dist/styles/fonts.css +61 -117
- package/dist/styles/graph.css +4 -0
- package/dist/styles/illustration.css +4 -0
- package/dist/styles/index.css +11 -193
- package/dist/styles/material.css +177 -31
- package/dist/styles/parts/ai.css +20 -14
- package/dist/styles/parts/brand.css +2 -2
- package/dist/styles/parts/controls.css +51 -38
- package/dist/styles/parts/data.css +43 -11
- package/dist/styles/parts/editor.css +372 -0
- package/dist/styles/parts/feedback.css +75 -15
- package/dist/styles/parts/foundations.css +12 -7
- package/dist/styles/parts/graph.css +25 -9
- package/dist/styles/parts/inputs.css +172 -9
- package/dist/styles/parts/isometric.css +6 -5
- package/dist/styles/parts/navigation.css +237 -25
- package/dist/styles/parts/overlays.css +110 -8
- package/dist/styles/parts/pdf.css +15 -9
- package/dist/styles/pdf.css +3 -0
- package/dist/styles/prose.css +3 -0
- package/dist/styles/tokens.css +105 -15
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +5 -0
- package/dist/vite.d.ts +48 -59
- package/dist/vite.js +54 -21
- package/package.json +69 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Toolbar's "…" menu (components/toolbar.tsx), the buttons that don't fit as menu items: loaded
|
|
4
|
+
* the first time something folds, so a toolbar that never folds carries no Menu.
|
|
5
|
+
*/
|
|
6
|
+
import { Toolbar as BaseToolbar } from "@base-ui/react/toolbar";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { EllipsisIcon } from "../lib/icons.js";
|
|
9
|
+
import { Menu, MenuCheckboxItem, MenuContent, MenuItem, MenuShortcut, MenuTrigger } from "./menu.js";
|
|
10
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
11
|
+
export default function ToolbarMore({ items, label, host, className, }) {
|
|
12
|
+
if (!items.length)
|
|
13
|
+
return null;
|
|
14
|
+
return (_jsxs(Menu, { onOpenChange: (open) => {
|
|
15
|
+
if (!open && host?.onMenuClose)
|
|
16
|
+
requestAnimationFrame(() => host.onMenuClose?.());
|
|
17
|
+
}, children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(BaseToolbar.Button, { render: _jsx(MenuTrigger, {}), "data-slot": "toolbar-button", "data-toolbar-more": "", "aria-label": label, className: className,
|
|
18
|
+
// A pointer keeps focus where it was (an editor's text, its selection).
|
|
19
|
+
onMouseDown: host?.onMenuClose ? (event) => event.preventDefault() : undefined }), children: _jsx(EllipsisIcon, {}) }), _jsx(TooltipContent, { children: label })] }), _jsx(MenuContent, { finalFocus: host?.onMenuClose ? false : undefined, className: "min-w-52", children: items.map(({ id, entry }) => {
|
|
20
|
+
const { label: name, icon, onClick, disabled, pressed, shortcut } = entry.current;
|
|
21
|
+
const body = (_jsxs(_Fragment, { children: [icon, name, shortcut && _jsx(MenuShortcut, { keys: shortcut })] }));
|
|
22
|
+
const click = (event) => onClick?.(event);
|
|
23
|
+
return pressed === undefined ? (_jsx(MenuItem, { "data-fold-item": "", disabled: disabled, onClick: click, children: body }, id)) : (_jsx(MenuCheckboxItem, { "data-fold-item": "", disabled: disabled, checked: pressed, onClick: click, children: body }, id));
|
|
24
|
+
}) })] }));
|
|
25
|
+
}
|
|
@@ -8,7 +8,7 @@ export interface AccordionProps extends BaseAccordion.Root.Props {
|
|
|
8
8
|
/**
|
|
9
9
|
* Accordion — a stack of disclosures separated by hairline rules, never boxes.
|
|
10
10
|
*
|
|
11
|
-
* Each item is a `border-t border-border/
|
|
11
|
+
* Each item is a `border-t border-border/(--hairline-opacity)` rule (the last one also closes with a bottom
|
|
12
12
|
* rule); there is no background and no radius. An optional mono `index` ("01") sits before
|
|
13
13
|
* the title and a plus turns into × when open. The rule people break: wrapping the accordion,
|
|
14
14
|
* or each item, in a card. The rule and the whitespace are the structure.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Accordion as BaseAccordion } from "@base-ui/react/accordion";
|
|
4
|
-
import { PlusIcon } from "
|
|
4
|
+
import { PlusIcon } from "../lib/icons.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { cn, sx } from "../lib/cn.js";
|
|
7
7
|
const AccordionSizeContext = React.createContext("default");
|
|
8
8
|
/**
|
|
9
9
|
* Accordion — a stack of disclosures separated by hairline rules, never boxes.
|
|
10
10
|
*
|
|
11
|
-
* Each item is a `border-t border-border/
|
|
11
|
+
* Each item is a `border-t border-border/(--hairline-opacity)` rule (the last one also closes with a bottom
|
|
12
12
|
* rule); there is no background and no radius. An optional mono `index` ("01") sits before
|
|
13
13
|
* the title and a plus turns into × when open. The rule people break: wrapping the accordion,
|
|
14
14
|
* or each item, in a card. The rule and the whitespace are the structure.
|
|
@@ -18,11 +18,11 @@ export function Accordion({ size = "default", className, ...props }) {
|
|
|
18
18
|
}
|
|
19
19
|
/** One disclosure. Give it a stable `value` when the accordion is controlled. */
|
|
20
20
|
export function AccordionItem({ className, ...props }) {
|
|
21
|
-
return (_jsx(BaseAccordion.Item, { "data-slot": "accordion-item", className: sx("border-t border-border/
|
|
21
|
+
return (_jsx(BaseAccordion.Item, { "data-slot": "accordion-item", className: sx("border-t border-border/(--hairline-opacity) last:border-b", className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
const titleSizes = {
|
|
24
|
-
default: "font-body text-
|
|
25
|
-
display: "display text-
|
|
24
|
+
default: "font-body text-18 leading-snug tracking-normal",
|
|
25
|
+
display: "display text-24 sm:text-28 md:text-32 leading-[1.1]",
|
|
26
26
|
};
|
|
27
27
|
/** The clickable title row. Its text is the item's accessible name, so keep it short and specific. */
|
|
28
28
|
export function AccordionTrigger({ index, headerProps, className, children, ...props }) {
|
|
@@ -31,9 +31,9 @@ export function AccordionTrigger({ index, headerProps, className, children, ...p
|
|
|
31
31
|
"group/accordion-trigger flex w-full cursor-pointer items-center gap-5 py-6 text-start text-foreground focus-ring select-none sm:gap-8",
|
|
32
32
|
"data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
33
33
|
size === "display" && "py-8",
|
|
34
|
-
], className), ...props, children: [index != null && (_jsx("span", { "data-slot": "accordion-index", className: "w-6 shrink-0 font-mono text-
|
|
34
|
+
], className), ...props, children: [index != null && (_jsx("span", { "data-slot": "accordion-index", className: "w-6 shrink-0 font-mono text-12 tracking-[0.04em] text-muted-foreground tabular-nums", children: index })), _jsx("span", { className: cn("min-w-0 flex-1", titleSizes[size]), children: children }), _jsx(PlusIcon, { "aria-hidden": true, className: "size-5 shrink-0 text-muted-foreground transition-[rotate,color] [transition-duration:var(--duration),var(--duration-fade)] ease-(--ease) group-hover/accordion-trigger:not-group-data-disabled/accordion-trigger:text-foreground group-data-panel-open/accordion-trigger:rotate-45 group-data-panel-open/accordion-trigger:text-foreground" })] }) }));
|
|
35
35
|
}
|
|
36
36
|
/** The disclosed content. Height animates from `--accordion-panel-height`. */
|
|
37
37
|
export function AccordionPanel({ inset = false, className, children, ...props }) {
|
|
38
|
-
return (_jsx(BaseAccordion.Panel, { "data-slot": "accordion-panel", className: sx("h-(--accordion-panel-height) overflow-hidden transition-[height] duration-(--duration) ease-(--ease) data-ending-style:h-0 data-starting-style:h-0", className), ...props, children: _jsx("div", { className: cn("max-w-[68ch] pe-10 pb-6 text-body text-foreground-soft", inset && "ps-11 sm:ps-14"), children: children }) }));
|
|
38
|
+
return (_jsx(BaseAccordion.Panel, { "data-slot": "accordion-panel", className: sx("h-(--accordion-panel-height) overflow-hidden transition-[height] duration-(--duration-glide) ease-(--ease-glide) data-ending-style:h-0 data-starting-style:h-0", className), ...props, children: _jsx("div", { className: cn("max-w-[68ch] pe-10 pb-6 text-body text-foreground-soft", inset && "ps-11 sm:ps-14"), children: children }) }));
|
|
39
39
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
2
|
+
import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export interface ActionSheetMessages {
|
|
5
|
+
/** The separate button that closes the sheet without choosing. */
|
|
6
|
+
cancel: string;
|
|
7
|
+
/** The sheet's name when it has no `title`. */
|
|
8
|
+
actions: string;
|
|
9
|
+
}
|
|
10
|
+
declare module "./locale" {
|
|
11
|
+
interface LocaleMessages {
|
|
12
|
+
actionSheet: ActionSheetMessages;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `sheet`: slides up from the bottom of the screen and is swiped down to dismiss (a Base UI
|
|
17
|
+
* Drawer). `dialog`: the same choices in a small centred dialog (a Base UI Dialog). `auto`
|
|
18
|
+
* (default): a sheet on a phone (a coarse pointer under 768px), a dialog everywhere else.
|
|
19
|
+
*/
|
|
20
|
+
export type ActionSheetPresentation = "auto" | "sheet" | "dialog";
|
|
21
|
+
type RootChangeDetails = Parameters<NonNullable<BaseDrawer.Root.Props["onOpenChange"]>>[1];
|
|
22
|
+
export interface ActionSheetProps {
|
|
23
|
+
/** Whether the sheet is open, controlled. */
|
|
24
|
+
open?: boolean;
|
|
25
|
+
/** Whether it is open at first, uncontrolled. */
|
|
26
|
+
defaultOpen?: boolean;
|
|
27
|
+
/** Called when it opens or closes: a trigger, an action, Cancel, Escape, a swipe or a press outside. */
|
|
28
|
+
onOpenChange?: (open: boolean, eventDetails?: RootChangeDetails) => void;
|
|
29
|
+
/** How it is shown: a bottom sheet, a small dialog, or `auto` (default) — a sheet on a phone. */
|
|
30
|
+
presentation?: ActionSheetPresentation;
|
|
31
|
+
/** Called once it has finished opening or closing, after the motion. */
|
|
32
|
+
onOpenChangeComplete?: (open: boolean) => void;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ActionSheet — a few choices about one thing (a message, a photo, a file), sliding up from the
|
|
37
|
+
* bottom of a phone screen: an optional title and message, the actions, at most one of them
|
|
38
|
+
* destructive, and a separate Cancel. Swipe it down, press Escape or tap outside to dismiss it.
|
|
39
|
+
* On a wider screen or with a mouse it opens as a small centred dialog with the same choices
|
|
40
|
+
* (`presentation`), never a sheet stuck to the bottom of a desktop window.
|
|
41
|
+
*
|
|
42
|
+
* The rule people break: a sheet of settings or a form. It is for choosing one action and moving
|
|
43
|
+
* on; anything to fill in is a `Drawer` or a `Dialog`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ActionSheet({ open: openProp, defaultOpen, onOpenChange, presentation, onOpenChangeComplete, children, }: ActionSheetProps): React.JSX.Element;
|
|
46
|
+
export type ActionSheetTriggerProps = BaseDialog.Trigger.Props;
|
|
47
|
+
/** Opens the sheet. Compose with a button: `render={<Button variant="secondary" />}`. */
|
|
48
|
+
export declare function ActionSheetTrigger(props: ActionSheetTriggerProps): React.JSX.Element;
|
|
49
|
+
export interface ActionSheetContentProps extends Omit<React.ComponentProps<"div">, "title" | "dir"> {
|
|
50
|
+
/** A short line over the actions: what they act on ("Message from Ines"). */
|
|
51
|
+
title?: React.ReactNode;
|
|
52
|
+
/** One sentence more, under the title: what happens ("Deleted messages stay in Trash for 30 days."). */
|
|
53
|
+
description?: React.ReactNode;
|
|
54
|
+
/** Show the separate Cancel button. Default `true`; turn it off only where Escape and a swipe are not enough. */
|
|
55
|
+
cancel?: boolean;
|
|
56
|
+
/** Replaces the interface text: `cancel` ("Cancel") and `actions`, the name when there is no title. */
|
|
57
|
+
labels?: Partial<ActionSheetMessages>;
|
|
58
|
+
/** Props for the portal (e.g. `container`, `keepMounted`). */
|
|
59
|
+
portal?: {
|
|
60
|
+
container?: HTMLElement | null | React.RefObject<HTMLElement | null>;
|
|
61
|
+
keepMounted?: boolean;
|
|
62
|
+
};
|
|
63
|
+
/** The text direction of the popup; inside a right-to-left DirectionProvider it follows that. */
|
|
64
|
+
dir?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Portal, backdrop and the sheet: a 20px card of actions and, apart from it, the Cancel card,
|
|
68
|
+
* 8px from the screen's edges and clear of the home indicator. As a dialog, the same two cards
|
|
69
|
+
* in the middle of the screen. Focus moves into it when it opens and goes back to the trigger.
|
|
70
|
+
*/
|
|
71
|
+
export declare function ActionSheetContent({ title, description, cancel, labels, portal, dir, className, children, ...props }: ActionSheetContentProps): React.JSX.Element;
|
|
72
|
+
export interface ActionSheetActionProps extends React.ComponentProps<"button"> {
|
|
73
|
+
/** `destructive` sets the label in the destructive ink: for the one action that deletes or leaves. */
|
|
74
|
+
variant?: "default" | "destructive";
|
|
75
|
+
/** A lucide icon before the label. Give all the actions one, or none. */
|
|
76
|
+
icon?: React.ReactNode;
|
|
77
|
+
/**
|
|
78
|
+
* Close the sheet once the action has run. Default `true`; call `event.preventDefault()` in
|
|
79
|
+
* `onClick` to keep it open this once.
|
|
80
|
+
*/
|
|
81
|
+
closeOnClick?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* One choice in the sheet: a full-width row, its label centred. Runs `onClick` and closes the
|
|
85
|
+
* sheet, and focus goes back to what opened it.
|
|
86
|
+
*/
|
|
87
|
+
export declare function ActionSheetAction({ variant, icon, closeOnClick, className, onClick, children, type, ...props }: ActionSheetActionProps): React.JSX.Element;
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
4
|
+
import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { cn, triggerSlot } from "../lib/cn.js";
|
|
7
|
+
import { usePhone } from "../lib/platform.js";
|
|
8
|
+
import { usePortalContainer } from "../lib/portal-container.js";
|
|
9
|
+
import { usePressFeedback } from "../lib/press.js";
|
|
10
|
+
import { overlayBackdrop, overlayCard, usePopupDir } from "./_overlay.js";
|
|
11
|
+
import { useMessages } from "./locale.js";
|
|
12
|
+
const defaultMessages = { cancel: "Cancel", actions: "Actions" };
|
|
13
|
+
const ActionSheetContext = React.createContext({
|
|
14
|
+
mode: "dialog",
|
|
15
|
+
close: () => { },
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* ActionSheet — a few choices about one thing (a message, a photo, a file), sliding up from the
|
|
19
|
+
* bottom of a phone screen: an optional title and message, the actions, at most one of them
|
|
20
|
+
* destructive, and a separate Cancel. Swipe it down, press Escape or tap outside to dismiss it.
|
|
21
|
+
* On a wider screen or with a mouse it opens as a small centred dialog with the same choices
|
|
22
|
+
* (`presentation`), never a sheet stuck to the bottom of a desktop window.
|
|
23
|
+
*
|
|
24
|
+
* The rule people break: a sheet of settings or a form. It is for choosing one action and moving
|
|
25
|
+
* on; anything to fill in is a `Drawer` or a `Dialog`.
|
|
26
|
+
*/
|
|
27
|
+
export function ActionSheet({ open: openProp, defaultOpen = false, onOpenChange, presentation = "auto", onOpenChangeComplete, children, }) {
|
|
28
|
+
const phone = usePhone(presentation === "auto");
|
|
29
|
+
const mode = presentation === "auto" ? (phone ? "sheet" : "dialog") : presentation;
|
|
30
|
+
const [own, setOwn] = React.useState(defaultOpen);
|
|
31
|
+
const open = openProp ?? own;
|
|
32
|
+
const change = React.useCallback((next, details) => {
|
|
33
|
+
if (openProp === undefined)
|
|
34
|
+
setOwn(next);
|
|
35
|
+
onOpenChange?.(next, details);
|
|
36
|
+
}, [openProp, onOpenChange]);
|
|
37
|
+
const context = React.useMemo(() => ({ mode, close: () => change(false) }), [mode, change]);
|
|
38
|
+
return (_jsx(ActionSheetContext.Provider, { value: context, children: mode === "sheet" ? (_jsx(BaseDrawer.Root, { open: open, onOpenChange: (next, details) => change(next, details), onOpenChangeComplete: onOpenChangeComplete, swipeDirection: "down", children: children })) : (_jsx(BaseDialog.Root, { open: open, onOpenChange: (next, details) => change(next, details), onOpenChangeComplete: onOpenChangeComplete, children: children })) }));
|
|
39
|
+
}
|
|
40
|
+
/** Opens the sheet. Compose with a button: `render={<Button variant="secondary" />}`. */
|
|
41
|
+
export function ActionSheetTrigger(props) {
|
|
42
|
+
const { mode } = React.useContext(ActionSheetContext);
|
|
43
|
+
const slot = triggerSlot("action-sheet-trigger", props.render);
|
|
44
|
+
return mode === "sheet" ? (_jsx(BaseDrawer.Trigger, { ...slot, ...props })) : (_jsx(BaseDialog.Trigger, { ...slot, ...props }));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A card of choices. The choices run edge to edge inside its 1px edge, so a choice's highlight
|
|
48
|
+
* fills the card's width: square where two choices meet, and at the card's top and bottom
|
|
49
|
+
* following its corners exactly (its radius less the 1px edge, concentric with it).
|
|
50
|
+
*/
|
|
51
|
+
const groupClass = cn(overlayCard, "flex flex-col rounded-card [--action-sheet-inner:calc(var(--radius-card)-1px)]");
|
|
52
|
+
/** Up and Down move between the choices, as in a menu; Tab still goes through them too. */
|
|
53
|
+
function moveFocus(event) {
|
|
54
|
+
if (event.key !== "ArrowDown" && event.key !== "ArrowUp")
|
|
55
|
+
return;
|
|
56
|
+
const items = [
|
|
57
|
+
...event.currentTarget.querySelectorAll("[data-slot=action-sheet-action]:not(:disabled), [data-slot=action-sheet-cancel]"),
|
|
58
|
+
];
|
|
59
|
+
if (!items.length)
|
|
60
|
+
return;
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
const at = items.indexOf(document.activeElement);
|
|
63
|
+
const next = event.key === "ArrowDown"
|
|
64
|
+
? items[(at + 1) % items.length]
|
|
65
|
+
: items[(at - 1 + items.length) % items.length];
|
|
66
|
+
next?.focus();
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Portal, backdrop and the sheet: a 20px card of actions and, apart from it, the Cancel card,
|
|
70
|
+
* 8px from the screen's edges and clear of the home indicator. As a dialog, the same two cards
|
|
71
|
+
* in the middle of the screen. Focus moves into it when it opens and goes back to the trigger.
|
|
72
|
+
*/
|
|
73
|
+
export function ActionSheetContent({ title, description, cancel = true, labels, portal, dir, className, children, ...props }) {
|
|
74
|
+
const { mode } = React.useContext(ActionSheetContext);
|
|
75
|
+
const text = useMessages("actionSheet", defaultMessages, labels);
|
|
76
|
+
usePressFeedback();
|
|
77
|
+
const portalContainer = usePortalContainer();
|
|
78
|
+
const popupDir = usePopupDir(dir);
|
|
79
|
+
const Parts = mode === "sheet" ? BaseDrawer : BaseDialog;
|
|
80
|
+
const header = title || description ? (_jsxs("div", { "data-slot": "action-sheet-header", className: "flex flex-col gap-1 border-b border-border/60 px-5.5 pt-4 pb-3 text-center", children: [title && (_jsx(Parts.Title, { "data-slot": "action-sheet-title", className: "font-body text-13 leading-snug font-medium text-foreground-soft", children: title })), description && (_jsx(Parts.Description, { "data-slot": "action-sheet-description", className: "text-13 leading-snug text-muted-foreground", children: description }))] })) : null;
|
|
81
|
+
const body = (_jsxs(_Fragment, { children: [_jsxs("div", { "data-slot": "action-sheet-group", "data-press-group": "", className: groupClass, children: [header, _jsx("div", { "data-slot": "action-sheet-actions", className: cn("flex flex-col",
|
|
82
|
+
// The last choice sits in the card's lower corners, the first in its upper ones when
|
|
83
|
+
// there is no title above it: their highlight follows the card's curve there.
|
|
84
|
+
"[&>[data-slot=action-sheet-action]:last-child]:rounded-b-(--action-sheet-inner)", !header && "[&>[data-slot=action-sheet-action]:first-child]:rounded-t-(--action-sheet-inner)"), children: children })] }), cancel && (_jsx(Parts.Close, { "data-slot": "action-sheet-cancel", "data-press": "", className: cn(overlayCard, actionClass, "rounded-card font-medium",
|
|
85
|
+
// Highlighted, the card's gradient gives way to the same fill a choice takes.
|
|
86
|
+
"focus-visible:bg-none [@media(hover:hover)]:hover:bg-none"), children: text.cancel }))] }));
|
|
87
|
+
const popupProps = {
|
|
88
|
+
"data-slot": "action-sheet-content",
|
|
89
|
+
"data-presentation": mode,
|
|
90
|
+
dir: popupDir,
|
|
91
|
+
"aria-label": title ? undefined : text.actions,
|
|
92
|
+
onKeyDown: (event) => {
|
|
93
|
+
props.onKeyDown?.(event);
|
|
94
|
+
if (!event.defaultPrevented)
|
|
95
|
+
moveFocus(event);
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
const { onKeyDown: _onKeyDown, ...rest } = props;
|
|
99
|
+
const container = portal?.container ?? portalContainer;
|
|
100
|
+
if (mode === "sheet") {
|
|
101
|
+
return (_jsxs(BaseDrawer.Portal, { container: container, keepMounted: portal?.keepMounted, children: [_jsx(BaseDrawer.Backdrop, { "data-slot": "action-sheet-backdrop", "data-presentation": "sheet", className: "fixed inset-0 z-50 min-h-dvh bg-black/40 supports-[-webkit-touch-callout:none]:absolute dark:bg-black/60" }), _jsx(BaseDrawer.Viewport, { "data-slot": "action-sheet-viewport", className: "fixed inset-0 z-50 flex items-end justify-center", children: _jsx(BaseDrawer.Popup, { ...popupProps, "data-side": "bottom", className: cn("relative flex w-full max-w-md flex-col gap-2 px-2 pb-[max(0.5rem,env(safe-area-inset-bottom,0px))] font-body text-foreground outline-none", className), ...rest, children: body }) })] }));
|
|
102
|
+
}
|
|
103
|
+
return (_jsxs(BaseDialog.Portal, { container: container, keepMounted: portal?.keepMounted, children: [_jsx(BaseDialog.Backdrop, { "data-slot": "action-sheet-backdrop", className: overlayBackdrop }), _jsx(BaseDialog.Viewport, { "data-slot": "action-sheet-viewport", className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: _jsx(BaseDialog.Popup, { ...popupProps, className: cn("flex w-full max-w-xs popup-motion flex-col gap-2 font-body text-foreground outline-none", className), ...rest, children: body }) })] }));
|
|
104
|
+
}
|
|
105
|
+
/** A row of the sheet, a choice or Cancel, its corners set by where it sits. */
|
|
106
|
+
const actionClass = cn("relative flex min-h-(--control-h-lg) w-full cursor-pointer items-center justify-center gap-2 px-5 py-2 text-center text-16 leading-snug text-foreground outline-none select-none",
|
|
107
|
+
// A focused row's ring is drawn over its neighbours, not under them.
|
|
108
|
+
"focus-visible:z-10", "transition-[background-color,color] duration-(--duration-fade) ease-(--ease)",
|
|
109
|
+
// Pressed, a shade comes over the choice the moment a finger lands (press-shade, lib/press.ts).
|
|
110
|
+
"press-shade focus-ring focus-visible:bg-control-hover [@media(hover:hover)]:hover:bg-control-hover", "disabled:cursor-not-allowed disabled:opacity-55 disabled:hover:bg-transparent", "[&_svg]:size-5 [&_svg]:shrink-0", "forced-colors:focus-visible:outline-[Highlight]");
|
|
111
|
+
/**
|
|
112
|
+
* One choice in the sheet: a full-width row, its label centred. Runs `onClick` and closes the
|
|
113
|
+
* sheet, and focus goes back to what opened it.
|
|
114
|
+
*/
|
|
115
|
+
export function ActionSheetAction({ variant = "default", icon, closeOnClick = true, className, onClick, children, type = "button", ...props }) {
|
|
116
|
+
const { close } = React.useContext(ActionSheetContext);
|
|
117
|
+
return (_jsxs("button", { "data-slot": "action-sheet-action", "data-variant": variant, "data-press": "", type: type,
|
|
118
|
+
// Square where it meets another choice; the card's corners are set by the list (above).
|
|
119
|
+
className: cn(actionClass, "rounded-none", variant === "destructive" && "text-destructive", className), onClick: (event) => {
|
|
120
|
+
onClick?.(event);
|
|
121
|
+
if (closeOnClick && !event.defaultPrevented)
|
|
122
|
+
close();
|
|
123
|
+
}, ...props, children: [icon, _jsx("span", { className: "min-w-0 break-words", children: children })] }));
|
|
124
|
+
}
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { AlertDialog as BaseAlertDialog } from "@base-ui/react/alert-dialog";
|
|
4
4
|
import { cn, sx, triggerSlot } from "../lib/cn.js";
|
|
5
5
|
import { overlayBackdrop, overlayCard, overlayDescription, overlayFooter, overlayHeader, overlayTitle, usePopupDir, } from "./_overlay.js";
|
|
6
|
+
import { usePortalContainer } from "../lib/portal-container.js";
|
|
6
7
|
/**
|
|
7
8
|
* AlertDialog — a confirmation that interrupts on purpose: "Remove this integration?".
|
|
8
9
|
* Same object as `Dialog`, but it does not close on an outside click and is announced as an
|
|
@@ -25,8 +26,9 @@ const alertDialogSizes = {
|
|
|
25
26
|
};
|
|
26
27
|
/** Portal + Backdrop + Viewport + Popup, in the dialog card material. No close icon: decide. */
|
|
27
28
|
export function AlertDialogContent({ size = "sm", portal, className, dir, ...props }) {
|
|
29
|
+
const portalContainer = usePortalContainer();
|
|
28
30
|
const popupDir = usePopupDir(dir);
|
|
29
|
-
return (_jsxs(BaseAlertDialog.Portal, { ...portal, children: [_jsx(BaseAlertDialog.Backdrop, { "data-slot": "alert-dialog-backdrop", className: overlayBackdrop }), _jsx(BaseAlertDialog.Viewport, { "data-slot": "alert-dialog-viewport", className: "fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6", children: _jsx(BaseAlertDialog.Popup, { "data-slot": "alert-dialog-content", "data-size": size, dir: popupDir, className: sx([
|
|
31
|
+
return (_jsxs(BaseAlertDialog.Portal, { container: portalContainer, ...portal, children: [_jsx(BaseAlertDialog.Backdrop, { "data-slot": "alert-dialog-backdrop", className: overlayBackdrop }), _jsx(BaseAlertDialog.Viewport, { "data-slot": "alert-dialog-viewport", className: "fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6", children: _jsx(BaseAlertDialog.Popup, { "data-slot": "alert-dialog-content", "data-size": size, dir: popupDir, className: sx([
|
|
30
32
|
"relative flex max-h-full w-full min-w-0 flex-col gap-6 overflow-y-auto rounded-card p-6 font-body outline-none sm:p-8",
|
|
31
33
|
overlayCard,
|
|
32
34
|
"popup-motion",
|
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** Green ink on the icon and title only. Something finished or is set up. */
|
|
6
|
-
readonly success: "[&>svg]:text-success *:data-[slot=alert-title]:text-success";
|
|
7
|
-
/** Amber ink on the icon and title only. Something will need attention: a limit, an expiry. */
|
|
8
|
-
readonly warning: "[&>svg]:text-warning *:data-[slot=alert-title]:text-warning";
|
|
9
|
-
/** Blue ink on the icon and title only. Neutral news: a change, a tip, a maintenance window. */
|
|
10
|
-
readonly info: "[&>svg]:text-info *:data-[slot=alert-title]:text-info";
|
|
11
|
-
/** Red ink on the icon and title only. Errors and failures. */
|
|
12
|
-
readonly destructive: "[&>svg]:text-destructive *:data-[slot=alert-title]:text-destructive";
|
|
13
|
-
};
|
|
14
|
-
export type AlertVariant = keyof typeof alertVariants;
|
|
2
|
+
import type { StatusTone } from "../lib/tone.js";
|
|
3
|
+
/** `default` (foreground ink) or a status colour on the icon and the title. */
|
|
4
|
+
export type AlertTone = "default" | StatusTone;
|
|
15
5
|
export interface AlertProps extends React.ComponentProps<"div"> {
|
|
16
|
-
|
|
6
|
+
/** The status colour on the icon and the title: `success`, `warning`, `info`, `destructive`. */
|
|
7
|
+
tone?: AlertTone;
|
|
17
8
|
}
|
|
18
9
|
/**
|
|
19
10
|
* Alert — an inline message that belongs to a part of the page: a square region in the
|
|
20
11
|
* `surface-container` material with a `--field-edge` border, an optional 16px lucide icon,
|
|
21
12
|
* a title, a description and an optional action.
|
|
22
13
|
*
|
|
23
|
-
* `default` and the four status
|
|
14
|
+
* `default` and the four status tones (`tone`): `success`, `warning`, `info`, `destructive`. Colour
|
|
24
15
|
* goes on the icon and the title only; the surface stays the monochrome region. The rule people
|
|
25
16
|
* break: colour without words — the icon and the copy still say what kind of message it is, and
|
|
26
17
|
* a coloured fill is never the message.
|
|
27
18
|
*/
|
|
28
|
-
export declare function Alert({
|
|
19
|
+
export declare function Alert({ tone, role, className, ...props }: AlertProps): React.JSX.Element;
|
|
29
20
|
/** The alert's one-line summary. Licht Sans 14px medium — Licht is for headlines, not notices. */
|
|
30
21
|
export declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
31
22
|
/** What happened and what to do next. Muted Licht Sans 14px; links inside take the brand underline. */
|
|
32
23
|
export declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
33
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* A small secondary or ghost button at the end of the alert, vertically centred. In a narrow
|
|
26
|
+
* alert (under 26rem, a phone) it moves under the description, so the copy keeps its width.
|
|
27
|
+
*/
|
|
34
28
|
export declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
35
|
-
export {};
|
package/dist/components/alert.js
CHANGED
|
@@ -18,15 +18,15 @@ const alertVariants = {
|
|
|
18
18
|
* `surface-container` material with a `--field-edge` border, an optional 16px lucide icon,
|
|
19
19
|
* a title, a description and an optional action.
|
|
20
20
|
*
|
|
21
|
-
* `default` and the four status
|
|
21
|
+
* `default` and the four status tones (`tone`): `success`, `warning`, `info`, `destructive`. Colour
|
|
22
22
|
* goes on the icon and the title only; the surface stays the monochrome region. The rule people
|
|
23
23
|
* break: colour without words — the icon and the copy still say what kind of message it is, and
|
|
24
24
|
* a coloured fill is never the message.
|
|
25
25
|
*/
|
|
26
|
-
export function Alert({
|
|
27
|
-
return (_jsx("div", { "data-slot": "alert", "data-
|
|
26
|
+
export function Alert({ tone = "default", role, className, ...props }) {
|
|
27
|
+
return (_jsx("div", { "data-slot": "alert", "data-tone": tone, role: role ?? (tone === "destructive" ? "alert" : "status"), className: cn("@container/alert relative grid w-full grid-cols-[auto_minmax(0,1fr)_auto] items-start rounded-none px-4 py-3.5 text-sm text-foreground surface-container", "[&>svg]:col-start-1 [&>svg]:row-span-2 [&>svg]:row-start-1 [&>svg]:me-3 [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
28
28
|
// Beside a title the icon sits on the title's line; with a description alone, it centres on it.
|
|
29
|
-
"[&:not(:has(>[data-slot=alert-title]))>svg]:mt-0 [&:not(:has(>[data-slot=alert-title]))>svg]:self-center", alertVariants[
|
|
29
|
+
"[&:not(:has(>[data-slot=alert-title]))>svg]:mt-0 [&:not(:has(>[data-slot=alert-title]))>svg]:self-center", alertVariants[tone], className), ...props }));
|
|
30
30
|
}
|
|
31
31
|
/** The alert's one-line summary. Licht Sans 14px medium — Licht is for headlines, not notices. */
|
|
32
32
|
export function AlertTitle({ className, ...props }) {
|
|
@@ -36,7 +36,10 @@ export function AlertTitle({ className, ...props }) {
|
|
|
36
36
|
export function AlertDescription({ className, ...props }) {
|
|
37
37
|
return (_jsx("div", { "data-slot": "alert-description", className: cn("col-start-2 leading-relaxed [overflow-wrap:anywhere] text-muted-foreground [&_a]:link [&_p]:m-0 [&_p+p]:mt-2 [[data-slot=alert-title]+&]:mt-1", className), ...props }));
|
|
38
38
|
}
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* A small secondary or ghost button at the end of the alert, vertically centred. In a narrow
|
|
41
|
+
* alert (under 26rem, a phone) it moves under the description, so the copy keeps its width.
|
|
42
|
+
*/
|
|
40
43
|
export function AlertAction({ className, ...props }) {
|
|
41
|
-
return (_jsx("div", { "data-slot": "alert-action", className: cn("col-start-3 row-span-2 row-start-1 ms-3 flex items-center gap-2 self-center", className), ...props }));
|
|
44
|
+
return (_jsx("div", { "data-slot": "alert-action", className: cn("col-start-3 row-span-2 row-start-1 ms-3 flex items-center gap-2 self-center", "@max-[26rem]/alert:col-start-2 @max-[26rem]/alert:row-span-1 @max-[26rem]/alert:row-start-3 @max-[26rem]/alert:ms-0 @max-[26rem]/alert:mt-3 @max-[26rem]/alert:self-start", className), ...props }));
|
|
42
45
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type ButtonProps } from "./button.js";
|
|
3
|
+
import { type InputGroupInputProps } from "./input-group.js";
|
|
4
|
+
export interface AppBarMessages {
|
|
5
|
+
/** The back button's name when it shows no text. */
|
|
6
|
+
back: string;
|
|
7
|
+
/** The back button's name when it shows the previous screen's title: "Back to Inbox". */
|
|
8
|
+
backTo: (title: string) => string;
|
|
9
|
+
/** The search field's placeholder and name. */
|
|
10
|
+
search: string;
|
|
11
|
+
/** The button that empties the search field. */
|
|
12
|
+
clear: string;
|
|
13
|
+
}
|
|
14
|
+
declare module "./locale" {
|
|
15
|
+
interface LocaleMessages {
|
|
16
|
+
appBar: AppBarMessages;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
20
|
+
export interface AppBarProps extends Omit<React.ComponentProps<"header">, "title"> {
|
|
21
|
+
/** The screen's title: one short line. Its heading, at `headingLevel`. */
|
|
22
|
+
title: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Show the title large under the bar, in Licht, and fold it into the bar as the content
|
|
25
|
+
* scrolls: the small title fades in as the large one goes under. For a screen's top level
|
|
26
|
+
* (Inbox, Library); a screen pushed from it keeps the title in the bar.
|
|
27
|
+
*/
|
|
28
|
+
largeTitle?: boolean;
|
|
29
|
+
/** The leading control: an `AppBarBack`, or one `AppBarAction` (a menu, a close mark). */
|
|
30
|
+
back?: React.ReactNode;
|
|
31
|
+
/** Trailing controls: one to three `AppBarAction`s or a text `Button`. */
|
|
32
|
+
actions?: React.ReactNode;
|
|
33
|
+
/** A field under the title, scrolling away under the bar with it: an `AppBarSearch`. */
|
|
34
|
+
search?: React.ReactNode;
|
|
35
|
+
/** The title's heading level. Default 1: the bar names the screen. */
|
|
36
|
+
headingLevel?: HeadingLevel;
|
|
37
|
+
/**
|
|
38
|
+
* Force the scrolled look (the page ground, the hairline, the small title) on or off. By
|
|
39
|
+
* default it follows the scroll of the bar's nearest scrolling ancestor, or the window.
|
|
40
|
+
*/
|
|
41
|
+
scrolled?: boolean;
|
|
42
|
+
ref?: React.Ref<HTMLElement>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* AppBar — the top bar of a phone screen: a back button at the start, the title, and up to three
|
|
46
|
+
* actions at the end, sticky at the top of what scrolls, clear of the status bar and the rounded
|
|
47
|
+
* corners (safe-area insets). Over the content it takes the page ground and a hairline, as
|
|
48
|
+
* SiteHeader does, tied to the scroll position. With `largeTitle` the title sits large under the
|
|
49
|
+
* bar and folds into it as the screen scrolls; `search` puts a field under it.
|
|
50
|
+
*
|
|
51
|
+
* Put it first inside the element that scrolls (or the page), as a sibling of the content: it
|
|
52
|
+
* renders the bar and, with `largeTitle` or `search`, the large header after it, so the bar can
|
|
53
|
+
* stick while the large title scrolls away. The rule people break: a row of more than three
|
|
54
|
+
* actions — the rest belong in a menu behind one.
|
|
55
|
+
*/
|
|
56
|
+
export declare function AppBar({ title, largeTitle, back, actions, search, headingLevel, scrolled, className, style, ref, ...props }: AppBarProps): React.JSX.Element;
|
|
57
|
+
export interface AppBarBackProps extends Omit<ButtonProps, "children"> {
|
|
58
|
+
/** The previous screen's title, shown beside the chevron ("Inbox"). Without it, the chevron alone. */
|
|
59
|
+
children?: React.ReactNode;
|
|
60
|
+
/** A link instead of a button: renders an `<a>`. For a router's link, pass it as `render`. */
|
|
61
|
+
href?: string;
|
|
62
|
+
/** Replaces the button's name ("Back", "Back to Inbox"). */
|
|
63
|
+
labels?: Partial<AppBarMessages>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The back button at the start of an AppBar: a chevron, with the previous screen's title beside
|
|
67
|
+
* it when there is room for one. A ghost button, so it lifts on hover and sinks on press; the
|
|
68
|
+
* chevron points the other way right to left.
|
|
69
|
+
*/
|
|
70
|
+
export declare function AppBarBack({ children, href, labels, render, className, ...props }: AppBarBackProps): React.JSX.Element;
|
|
71
|
+
export interface AppBarActionProps extends Omit<ButtonProps, "children"> {
|
|
72
|
+
/** A lucide icon. */
|
|
73
|
+
icon: React.ReactNode;
|
|
74
|
+
/** What it does, read aloud: "Compose", "Filter". Required: the icon is all that is drawn. */
|
|
75
|
+
label: string;
|
|
76
|
+
}
|
|
77
|
+
/** A round, icon-only ghost button at the end of an AppBar, named by its `label`. */
|
|
78
|
+
export declare function AppBarAction({ icon, label, className, ...props }: AppBarActionProps): React.JSX.Element;
|
|
79
|
+
export interface AppBarSearchProps extends InputGroupInputProps {
|
|
80
|
+
/** Replaces the placeholder and name ("Search") and the clear button's name ("Clear search"). */
|
|
81
|
+
labels?: Partial<AppBarMessages>;
|
|
82
|
+
/** Classes for the field around the input. */
|
|
83
|
+
groupClassName?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The search field under an AppBar's title: a recessed field with a magnifier, 16px text so a
|
|
87
|
+
* phone does not zoom in, and the keyboard's Search key. Filter as `onChange` reports the text
|
|
88
|
+
* (controlled with `value`, or not). Once there is text, a clear button empties it and keeps the
|
|
89
|
+
* keyboard up; Escape empties it too, and on an empty field lets it go. Every other prop goes to
|
|
90
|
+
* the input.
|
|
91
|
+
*/
|
|
92
|
+
export declare function AppBarSearch({ labels, groupClassName, placeholder, value, defaultValue, onChange, onKeyDown, className, ref, ...props }: AppBarSearchProps): React.JSX.Element;
|
|
93
|
+
export {};
|