@asanchez-sa/abby 0.0.0-stage → 0.1.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/README.md +217 -2
- package/dist/_virtual/_rolldown/runtime.js +26 -0
- package/dist/agents/approvals.d.ts +46 -0
- package/dist/agents/approvals.js +58 -0
- package/dist/agents/changes.d.ts +21 -0
- package/dist/agents/changes.js +21 -0
- package/dist/agents/hooks.d.ts +20 -0
- package/dist/agents/hooks.js +58 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/run-tool.d.ts +44 -0
- package/dist/agents/run-tool.js +79 -0
- package/dist/agents/ui-sdk.d.ts +5 -0
- package/dist/agents/ui-sdk.js +3 -0
- package/dist/behaviors/canvas/index.d.ts +2 -0
- package/dist/behaviors/canvas/index.js +1 -0
- package/dist/behaviors/canvas/ui-sdk.d.ts +2 -0
- package/dist/behaviors/canvas/ui-sdk.js +1 -0
- package/dist/behaviors/drag-and-drop/index.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/index.js +1 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.js +1 -0
- package/dist/behaviors/dragging/index.d.ts +2 -0
- package/dist/behaviors/dragging/index.js +1 -0
- package/dist/behaviors/dragging/ui-sdk.d.ts +2 -0
- package/dist/behaviors/dragging/ui-sdk.js +1 -0
- package/dist/behaviors/focus/index.d.ts +2 -0
- package/dist/behaviors/focus/index.js +1 -0
- package/dist/behaviors/focus/ui-sdk.d.ts +2 -0
- package/dist/behaviors/focus/ui-sdk.js +1 -0
- package/dist/behaviors/lists/index.d.ts +3 -0
- package/dist/behaviors/lists/index.js +3 -0
- package/dist/behaviors/lists/ui-sdk.d.ts +3 -0
- package/dist/behaviors/lists/ui-sdk.js +3 -0
- package/dist/behaviors/popups/index.d.ts +3 -0
- package/dist/behaviors/popups/index.js +3 -0
- package/dist/behaviors/popups/ui-sdk.d.ts +3 -0
- package/dist/behaviors/popups/ui-sdk.js +3 -0
- package/dist/behaviors/preferences/index.d.ts +3 -0
- package/dist/behaviors/preferences/index.js +3 -0
- package/dist/behaviors/preferences/ui-sdk.d.ts +3 -0
- package/dist/behaviors/preferences/ui-sdk.js +3 -0
- package/dist/behaviors/selection/index.d.ts +3 -0
- package/dist/behaviors/selection/index.js +3 -0
- package/dist/behaviors/selection/indicator.d.ts +13 -0
- package/dist/behaviors/selection/indicator.js +20 -0
- package/dist/behaviors/selection/ui-sdk.d.ts +2 -0
- package/dist/behaviors/selection/ui-sdk.js +1 -0
- package/dist/behaviors/transitions/index.d.ts +3 -0
- package/dist/behaviors/transitions/index.js +3 -0
- package/dist/behaviors/transitions/ui-sdk.d.ts +3 -0
- package/dist/behaviors/transitions/ui-sdk.js +3 -0
- package/dist/behaviors/trees/index.d.ts +2 -0
- package/dist/behaviors/trees/index.js +1 -0
- package/dist/behaviors/trees/ui-sdk.d.ts +2 -0
- package/dist/behaviors/trees/ui-sdk.js +1 -0
- package/dist/components/accordion/accordion.d.ts +13 -0
- package/dist/components/accordion/accordion.js +165 -0
- package/dist/components/alert/alert.d.ts +13 -0
- package/dist/components/alert/alert.js +131 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog.js +257 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +57 -0
- package/dist/components/attachment/attachment.d.ts +48 -0
- package/dist/components/attachment/attachment.js +372 -0
- package/dist/components/autocomplete/autocomplete.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete.js +466 -0
- package/dist/components/avatar/avatar.d.ts +6 -0
- package/dist/components/avatar/avatar.js +100 -0
- package/dist/components/avatar-group/avatar-group.d.ts +9 -0
- package/dist/components/avatar-group/avatar-group.js +75 -0
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.js +31 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb.js +279 -0
- package/dist/components/bubble/bubble.d.ts +26 -0
- package/dist/components/bubble/bubble.js +173 -0
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button-group/button-group.d.ts +15 -0
- package/dist/components/button-group/button-group.js +71 -0
- package/dist/components/calendar/calendar.d.ts +29 -0
- package/dist/components/calendar/calendar.js +453 -0
- package/dist/components/card/card.d.ts +14 -0
- package/dist/components/card/card.js +213 -0
- package/dist/components/carousel/carousel.d.ts +16 -0
- package/dist/components/carousel/carousel.js +364 -0
- package/dist/components/chain-of-thought/chain-of-thought.d.ts +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.js +491 -0
- package/dist/components/chat/chat.d.ts +48 -0
- package/dist/components/chat/chat.js +207 -0
- package/dist/components/checkbox/checkbox.d.ts +10 -0
- package/dist/components/checkbox/checkbox.js +118 -0
- package/dist/components/checkpoint/checkpoint.d.ts +24 -0
- package/dist/components/checkpoint/checkpoint.js +178 -0
- package/dist/components/choice-cards/choice-cards.d.ts +38 -0
- package/dist/components/choice-cards/choice-cards.js +255 -0
- package/dist/components/code-block/code-block.d.ts +58 -0
- package/dist/components/code-block/code-block.js +506 -0
- package/dist/components/code-block/highlighter.js +96 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +11 -0
- package/dist/components/code-block/use-highlighted-code.js +54 -0
- package/dist/components/collapsible/collapsible.d.ts +10 -0
- package/dist/components/collapsible/collapsible.js +92 -0
- package/dist/components/color-picker/color-picker.d.ts +17 -0
- package/dist/components/color-picker/color-picker.js +395 -0
- package/dist/components/combobox/combobox.d.ts +54 -0
- package/dist/components/combobox/combobox.js +683 -0
- package/dist/components/command/command.d.ts +23 -0
- package/dist/components/command/command.js +373 -0
- package/dist/components/command-dock/command-dock.d.ts +118 -0
- package/dist/components/command-dock/command-dock.js +944 -0
- package/dist/components/confirmation/confirmation.d.ts +58 -0
- package/dist/components/confirmation/confirmation.js +181 -0
- package/dist/components/context/context.d.ts +82 -0
- package/dist/components/context/context.js +490 -0
- package/dist/components/date-input/date-input.d.ts +16 -0
- package/dist/components/date-input/date-input.js +89 -0
- package/dist/components/date-picker/date-picker.d.ts +28 -0
- package/dist/components/date-picker/date-picker.js +361 -0
- package/dist/components/dialog/dialog.d.ts +14 -0
- package/dist/components/dialog/dialog.js +261 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.js +309 -0
- package/dist/components/empty/empty.d.ts +18 -0
- package/dist/components/empty/empty.js +192 -0
- package/dist/components/field/field.d.ts +15 -0
- package/dist/components/field/field.js +261 -0
- package/dist/components/file-input/file-input.d.ts +12 -0
- package/dist/components/file-input/file-input.js +216 -0
- package/dist/components/file-tree/file-tree.d.ts +45 -0
- package/dist/components/file-tree/file-tree.js +283 -0
- package/dist/components/hover-card/hover-card.d.ts +10 -0
- package/dist/components/hover-card/hover-card.js +118 -0
- package/dist/components/icon/icon.d.ts +14 -0
- package/dist/components/icon/icon.js +60 -0
- package/dist/components/image-cropper/image-cropper.d.ts +15 -0
- package/dist/components/image-cropper/image-cropper.js +334 -0
- package/dist/components/inline-citation/inline-citation.d.ts +46 -0
- package/dist/components/inline-citation/inline-citation.js +269 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/input/input.js +43 -0
- package/dist/components/input-group/input-group.d.ts +42 -0
- package/dist/components/input-group/input-group.js +192 -0
- package/dist/components/item/item.d.ts +32 -0
- package/dist/components/item/item.js +394 -0
- package/dist/components/kbd/kbd.d.ts +9 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.js +40 -0
- package/dist/components/link/link.d.ts +21 -0
- package/dist/components/link/link.js +126 -0
- package/dist/components/listbox/listbox.d.ts +20 -0
- package/dist/components/listbox/listbox.js +199 -0
- package/dist/components/marker/marker.d.ts +11 -0
- package/dist/components/marker/marker.js +88 -0
- package/dist/components/menu/menu.d.ts +38 -0
- package/dist/components/menu/menu.js +553 -0
- package/dist/components/menubar/menubar.d.ts +9 -0
- package/dist/components/menubar/menubar.js +47 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/message.js +328 -0
- package/dist/components/message-scroller/message-scroller.d.ts +111 -0
- package/dist/components/message-scroller/message-scroller.js +957 -0
- package/dist/components/meter/meter.d.ts +8 -0
- package/dist/components/meter/meter.js +162 -0
- package/dist/components/model-selector/model-selector.d.ts +155 -0
- package/dist/components/model-selector/model-selector.js +905 -0
- package/dist/components/native-select/native-select.d.ts +27 -0
- package/dist/components/native-select/native-select.js +226 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +29 -0
- package/dist/components/navigation-menu/navigation-menu.js +318 -0
- package/dist/components/not-label.js +9 -0
- package/dist/components/note-editor/blocks.d.ts +22 -0
- package/dist/components/note-editor/blocks.js +245 -0
- package/dist/components/note-editor/diff.d.ts +19 -0
- package/dist/components/note-editor/diff.js +64 -0
- package/dist/components/note-editor/editor.js +249 -0
- package/dist/components/note-editor/note-editor.d.ts +109 -0
- package/dist/components/note-editor/note-editor.js +954 -0
- package/dist/components/note-editor/parts/comments.d.ts +24 -0
- package/dist/components/note-editor/parts/comments.js +336 -0
- package/dist/components/note-editor/parts/header.d.ts +25 -0
- package/dist/components/note-editor/parts/header.js +263 -0
- package/dist/components/note-editor/parts/history.d.ts +56 -0
- package/dist/components/note-editor/parts/history.js +409 -0
- package/dist/components/note-editor/parts/presence.d.ts +31 -0
- package/dist/components/note-editor/parts/presence.js +140 -0
- package/dist/components/note-editor/parts/suggestions.d.ts +45 -0
- package/dist/components/note-editor/parts/suggestions.js +316 -0
- package/dist/components/note-editor/parts/toolbar.d.ts +38 -0
- package/dist/components/note-editor/parts/toolbar.js +683 -0
- package/dist/components/note-editor/people.d.ts +84 -0
- package/dist/components/note-editor/people.js +276 -0
- package/dist/components/note-editor/person.d.ts +11 -0
- package/dist/components/note-editor/person.js +15 -0
- package/dist/components/note-place/note-place.d.ts +42 -0
- package/dist/components/note-place/note-place.js +256 -0
- package/dist/components/note-status/note-status.d.ts +59 -0
- package/dist/components/note-status/note-status.js +380 -0
- package/dist/components/number-input/number-input.d.ts +12 -0
- package/dist/components/number-input/number-input.js +252 -0
- package/dist/components/otp-input/otp-input.d.ts +12 -0
- package/dist/components/otp-input/otp-input.js +136 -0
- package/dist/components/pagination/pagination.d.ts +23 -0
- package/dist/components/pagination/pagination.js +218 -0
- package/dist/components/password-input/password-input.d.ts +11 -0
- package/dist/components/password-input/password-input.js +117 -0
- package/dist/components/plan/plan.d.ts +51 -0
- package/dist/components/plan/plan.js +320 -0
- package/dist/components/popover/popover.d.ts +16 -0
- package/dist/components/popover/popover.js +268 -0
- package/dist/components/preferences/preferences.d.ts +5 -0
- package/dist/components/preferences/preferences.js +18 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +162 -0
- package/dist/components/prompt-input/prompt-input.d.ts +247 -0
- package/dist/components/prompt-input/prompt-input.js +1367 -0
- package/dist/components/questionnaire/questionnaire.d.ts +174 -0
- package/dist/components/questionnaire/questionnaire.js +1628 -0
- package/dist/components/queue/queue.d.ts +82 -0
- package/dist/components/queue/queue.js +471 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.js +101 -0
- package/dist/components/rating/rating.d.ts +10 -0
- package/dist/components/rating/rating.js +95 -0
- package/dist/components/reasoning/reasoning.d.ts +50 -0
- package/dist/components/reasoning/reasoning.js +233 -0
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/resizable/resizable.js +100 -0
- package/dist/components/scroll-area/scroll-area.d.ts +17 -0
- package/dist/components/scroll-area/scroll-area.js +211 -0
- package/dist/components/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/segmented-control/segmented-control.js +142 -0
- package/dist/components/select/select.d.ts +43 -0
- package/dist/components/select/select.js +577 -0
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.js +38 -0
- package/dist/components/sheet/sheet.d.ts +24 -0
- package/dist/components/sheet/sheet.js +330 -0
- package/dist/components/sidebar/sidebar.d.ts +138 -0
- package/dist/components/sidebar/sidebar.js +1374 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.js +40 -0
- package/dist/components/slider/slider.d.ts +9 -0
- package/dist/components/slider/slider.js +193 -0
- package/dist/components/sources/sources.d.ts +35 -0
- package/dist/components/sources/sources.js +209 -0
- package/dist/components/spinner/spinner.d.ts +11 -0
- package/dist/components/spinner/spinner.js +59 -0
- package/dist/components/stack-trace/parse-stack-trace.d.ts +21 -0
- package/dist/components/stack-trace/parse-stack-trace.js +61 -0
- package/dist/components/stack-trace/stack-trace.d.ts +79 -0
- package/dist/components/stack-trace/stack-trace.js +434 -0
- package/dist/components/subagent/subagent.d.ts +71 -0
- package/dist/components/subagent/subagent.js +450 -0
- package/dist/components/suggestion/suggestion.d.ts +21 -0
- package/dist/components/suggestion/suggestion.js +130 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/switch/switch.js +70 -0
- package/dist/components/table/table.d.ts +19 -0
- package/dist/components/table/table.js +284 -0
- package/dist/components/table-of-contents/spy.js +84 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +92 -0
- package/dist/components/table-of-contents/table-of-contents.js +787 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +273 -0
- package/dist/components/task/task.d.ts +40 -0
- package/dist/components/task/task.js +262 -0
- package/dist/components/terminal/terminal.d.ts +82 -0
- package/dist/components/terminal/terminal.js +457 -0
- package/dist/components/test-results/test-results.d.ts +127 -0
- package/dist/components/test-results/test-results.js +687 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +43 -0
- package/dist/components/time-input/time-input.d.ts +7 -0
- package/dist/components/time-input/time-input.js +82 -0
- package/dist/components/timeline/timeline.d.ts +19 -0
- package/dist/components/timeline/timeline.js +247 -0
- package/dist/components/toast/toast.d.ts +12 -0
- package/dist/components/toast/toast.js +285 -0
- package/dist/components/toggle/toggle.d.ts +15 -0
- package/dist/components/toggle/toggle.js +137 -0
- package/dist/components/token-input/token-input.d.ts +7 -0
- package/dist/components/token-input/token-input.js +117 -0
- package/dist/components/tool/tool.d.ts +66 -0
- package/dist/components/tool/tool.js +413 -0
- package/dist/components/toolbar/toolbar.d.ts +91 -0
- package/dist/components/toolbar/toolbar.js +655 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +97 -0
- package/dist/components/trace/trace.d.ts +31 -0
- package/dist/components/trace/trace.js +309 -0
- package/dist/components/tree/tree.d.ts +13 -0
- package/dist/components/tree/tree.js +258 -0
- package/dist/components/trigger-menu/trigger-menu.d.ts +30 -0
- package/dist/components/trigger-menu/trigger-menu.js +352 -0
- package/dist/components/usage/usage.d.ts +132 -0
- package/dist/components/usage/usage.js +1368 -0
- package/dist/components/waterfall/waterfall.d.ts +20 -0
- package/dist/components/waterfall/waterfall.js +360 -0
- package/dist/components/week-strip/week-strip.d.ts +177 -0
- package/dist/components/week-strip/week-strip.js +1081 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +27 -0
- package/dist/core/ui-sdk.d.ts +3 -0
- package/dist/core/ui-sdk.js +3 -0
- package/dist/core/use-primitive-state.d.ts +14 -0
- package/dist/core/use-primitive-state.js +25 -0
- package/dist/styles/LICENSE-shadcn.md +21 -0
- package/dist/styles/color-scheme.css +32 -0
- package/dist/styles/components.css +303 -0
- package/dist/styles/index.css +41 -0
- package/dist/styles/tokens.css +474 -0
- package/dist/styles/typeset/shadcn.css +506 -0
- package/dist/styles/typeset.css +70 -0
- package/dist/styles/utilities.css +555 -0
- package/dist/tools/observe/index.d.ts +2 -0
- package/dist/tools/observe/index.js +3 -0
- package/dist/tools/observe/ui-sdk.d.ts +1 -0
- package/dist/tools/observe/ui-sdk.js +2 -0
- package/dist/tools/testing/check-agent.d.ts +28 -0
- package/dist/tools/testing/check-agent.js +42 -0
- package/dist/tools/testing/index.d.ts +4 -0
- package/dist/tools/testing/index.js +4 -0
- package/dist/tools/testing/ui-sdk.d.ts +1 -0
- package/dist/tools/testing/ui-sdk.js +2 -0
- package/dist/utilities/cn/index.d.ts +12 -0
- package/dist/utilities/cn/index.js +47 -0
- package/dist/utilities/color/index.d.ts +2 -0
- package/dist/utilities/color/index.js +3 -0
- package/dist/utilities/color/ui-sdk.d.ts +1 -0
- package/dist/utilities/color/ui-sdk.js +2 -0
- package/dist/utilities/date/index.d.ts +2 -0
- package/dist/utilities/date/index.js +6 -0
- package/dist/utilities/date/ui-sdk.d.ts +1 -0
- package/dist/utilities/date/ui-sdk.js +2 -0
- package/dist/utilities/image/index.d.ts +2 -0
- package/dist/utilities/image/index.js +3 -0
- package/dist/utilities/image/ui-sdk.d.ts +1 -0
- package/dist/utilities/image/ui-sdk.js +2 -0
- package/dist/utilities/mobile/index.d.ts +2 -0
- package/dist/utilities/mobile/index.js +1 -0
- package/dist/utilities/mobile/ui-sdk.d.ts +2 -0
- package/dist/utilities/mobile/ui-sdk.js +1 -0
- package/dist/utilities/number/index.d.ts +2 -0
- package/dist/utilities/number/index.js +3 -0
- package/dist/utilities/number/ui-sdk.d.ts +1 -0
- package/dist/utilities/number/ui-sdk.js +2 -0
- package/dist/utilities/platform/index.d.ts +3 -0
- package/dist/utilities/platform/index.js +14 -0
- package/dist/utilities/platform/ui-sdk.d.ts +3 -0
- package/dist/utilities/platform/ui-sdk.js +3 -0
- package/dist/utilities/storage/index.d.ts +2 -0
- package/dist/utilities/storage/index.js +1 -0
- package/dist/utilities/storage/ui-sdk.d.ts +2 -0
- package/dist/utilities/storage/ui-sdk.js +1 -0
- package/dist/utilities/text/index.d.ts +3 -0
- package/dist/utilities/text/index.js +3 -0
- package/dist/utilities/text/ui-sdk.d.ts +3 -0
- package/dist/utilities/text/ui-sdk.js +3 -0
- package/package.json +192 -4
- package/skills/agent-ready-ui/SKILL.md +229 -0
- package/skills/blocks/SKILL.md +262 -0
- package/skills/compose-screens/SKILL.md +354 -0
- package/skills/note-editor/SKILL.md +493 -0
- package/skills/note-status/SKILL.md +295 -0
- package/skills/setup/SKILL.md +136 -0
- package/skills/theming/SKILL.md +216 -0
- package/src/blocks/notes/adapters.ts +77 -0
- package/src/blocks/notes/data.ts +508 -0
- package/src/blocks/notes/notes-block.tsx +244 -0
- package/src/blocks/notes/parts/home.tsx +219 -0
- package/src/blocks/notes/parts/no-access.tsx +84 -0
- package/src/blocks/notes/parts/note-screen.tsx +412 -0
- package/src/blocks/notes/parts/notes-sidebar.tsx +277 -0
- package/src/blocks/notes/parts/panels.tsx +393 -0
- package/src/blocks/notes/parts/place.ts +15 -0
- package/src/blocks/notes/parts/review-dialog.tsx +159 -0
- package/src/blocks/notes/parts/share.tsx +172 -0
- package/src/blocks/notes/texts.ts +135 -0
- package/src/blocks/shell/adapters.ts +69 -0
- package/src/blocks/shell/data.ts +281 -0
- package/src/blocks/shell/parts/compose.tsx +292 -0
- package/src/blocks/shell/parts/home.tsx +203 -0
- package/src/blocks/shell/parts/marks.tsx +144 -0
- package/src/blocks/shell/parts/rail.tsx +166 -0
- package/src/blocks/shell/parts/rooms-column.tsx +326 -0
- package/src/blocks/shell/shell-block.tsx +210 -0
- package/src/blocks/shell/texts.ts +80 -0
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { notLabel } from "../not-label.js";
|
|
4
|
+
import { buttonLook } from "../button/button.js";
|
|
5
|
+
import { Icon } from "../icon/icon.js";
|
|
6
|
+
import { inputClasses } from "../input/input.js";
|
|
7
|
+
import { labelClasses } from "../label/label.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { ArrowDown01Icon, Cancel01Icon } from "@hugeicons/core-free-icons";
|
|
11
|
+
import { Autocomplete as Autocomplete$1, AutocompleteArrow as AutocompleteArrow$1, AutocompleteClear as AutocompleteClear$1, AutocompleteContent as AutocompleteContent$1, AutocompleteEmpty as AutocompleteEmpty$1, AutocompleteGroup as AutocompleteGroup$1, AutocompleteGroupLabel as AutocompleteGroupLabel$1, AutocompleteInput as AutocompleteInput$1, AutocompleteItem as AutocompleteItem$1, AutocompleteItemIcon as AutocompleteItemIcon$1, AutocompleteItemText as AutocompleteItemText$1, AutocompleteLabel as AutocompleteLabel$1, AutocompleteList as AutocompleteList$1, AutocompleteSeparator as AutocompleteSeparator$1, AutocompleteStatus as AutocompleteStatus$1, AutocompleteTrigger as AutocompleteTrigger$1, createAutocompleteController } from "@ui-sdk/react/autocomplete";
|
|
12
|
+
// src/components/autocomplete/autocomplete.tsx
|
|
13
|
+
function Autocomplete(props) {
|
|
14
|
+
const $ = c(2);
|
|
15
|
+
let t0;
|
|
16
|
+
if ($[0] !== props) {
|
|
17
|
+
t0 = /* @__PURE__ */ jsx(Autocomplete$1, { ...props });
|
|
18
|
+
$[0] = props;
|
|
19
|
+
$[1] = t0;
|
|
20
|
+
} else t0 = $[1];
|
|
21
|
+
return t0;
|
|
22
|
+
}
|
|
23
|
+
function AutocompleteLabel(t0) {
|
|
24
|
+
const $ = c(8);
|
|
25
|
+
let className;
|
|
26
|
+
let props;
|
|
27
|
+
if ($[0] !== t0) {
|
|
28
|
+
({className, ...props} = t0);
|
|
29
|
+
$[0] = t0;
|
|
30
|
+
$[1] = className;
|
|
31
|
+
$[2] = props;
|
|
32
|
+
} else {
|
|
33
|
+
className = $[1];
|
|
34
|
+
props = $[2];
|
|
35
|
+
}
|
|
36
|
+
let t1;
|
|
37
|
+
if ($[3] !== className) {
|
|
38
|
+
t1 = cnState([labelClasses, "w-fit data-disabled:opacity-50"], className);
|
|
39
|
+
$[3] = className;
|
|
40
|
+
$[4] = t1;
|
|
41
|
+
} else t1 = $[4];
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
44
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteLabel$1, {
|
|
45
|
+
className: t1,
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
$[5] = props;
|
|
49
|
+
$[6] = t1;
|
|
50
|
+
$[7] = t2;
|
|
51
|
+
} else t2 = $[7];
|
|
52
|
+
return t2;
|
|
53
|
+
}
|
|
54
|
+
/** Looks like abby's `Input`. Put it in a row with `AutocompleteClear` and `AutocompleteTrigger`. */
|
|
55
|
+
function AutocompleteInput(t0) {
|
|
56
|
+
const $ = c(8);
|
|
57
|
+
let className;
|
|
58
|
+
let props;
|
|
59
|
+
if ($[0] !== t0) {
|
|
60
|
+
({className, ...props} = t0);
|
|
61
|
+
$[0] = t0;
|
|
62
|
+
$[1] = className;
|
|
63
|
+
$[2] = props;
|
|
64
|
+
} else {
|
|
65
|
+
className = $[1];
|
|
66
|
+
props = $[2];
|
|
67
|
+
}
|
|
68
|
+
let t1;
|
|
69
|
+
if ($[3] !== className) {
|
|
70
|
+
t1 = cnState(inputClasses, className);
|
|
71
|
+
$[3] = className;
|
|
72
|
+
$[4] = t1;
|
|
73
|
+
} else t1 = $[4];
|
|
74
|
+
let t2;
|
|
75
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
76
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteInput$1, {
|
|
77
|
+
className: t1,
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
$[5] = props;
|
|
81
|
+
$[6] = t1;
|
|
82
|
+
$[7] = t2;
|
|
83
|
+
} else t2 = $[7];
|
|
84
|
+
return t2;
|
|
85
|
+
}
|
|
86
|
+
/** An outline icon button with a chevron. Name it with `aria-label`, by what it opens. */
|
|
87
|
+
function AutocompleteTrigger({ variant = "outline", size = "icon-sm", className, children = /* @__PURE__ */ jsx(Icon, { icon: ArrowDown01Icon }), ...props }) {
|
|
88
|
+
return /* @__PURE__ */ jsx(AutocompleteTrigger$1, {
|
|
89
|
+
className: cnState([buttonLook({
|
|
90
|
+
variant,
|
|
91
|
+
size
|
|
92
|
+
}), "shrink-0 rounded-full [&_svg]:text-muted-foreground"], className),
|
|
93
|
+
...props,
|
|
94
|
+
children
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/** A ghost icon button with a cross. Name it with `aria-label`. */
|
|
98
|
+
function AutocompleteClear({ variant = "ghost", size = "icon-sm", className, children = /* @__PURE__ */ jsx(Icon, { icon: Cancel01Icon }), ...props }) {
|
|
99
|
+
return /* @__PURE__ */ jsx(AutocompleteClear$1, {
|
|
100
|
+
className: cnState([buttonLook({
|
|
101
|
+
variant,
|
|
102
|
+
size
|
|
103
|
+
}), "shrink-0 rounded-full"], className),
|
|
104
|
+
...props,
|
|
105
|
+
children
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/** The autocomplete's `items`, as styled parts. */
|
|
109
|
+
function dataItems(items) {
|
|
110
|
+
return items.map((entry, index) => {
|
|
111
|
+
if (typeof entry === "string") return /* @__PURE__ */ jsx(AutocompleteItem, {
|
|
112
|
+
value: entry,
|
|
113
|
+
children: /* @__PURE__ */ jsx(AutocompleteItemText, {})
|
|
114
|
+
}, `item-${entry}`);
|
|
115
|
+
if ("type" in entry && entry.type === "separator") return /* @__PURE__ */ jsx(AutocompleteSeparator, {}, `separator-${index}`);
|
|
116
|
+
if ("type" in entry && entry.type === "group") return /* @__PURE__ */ jsxs(AutocompleteGroup, { children: [entry.label && /* @__PURE__ */ jsx(AutocompleteGroupLabel, { children: entry.label }), dataItems(entry.items)] }, `group-${entry.label ?? index}`);
|
|
117
|
+
const { value, label, disabled, keywords } = entry;
|
|
118
|
+
return /* @__PURE__ */ jsx(AutocompleteItem, {
|
|
119
|
+
value,
|
|
120
|
+
label,
|
|
121
|
+
disabled,
|
|
122
|
+
keywords,
|
|
123
|
+
children: /* @__PURE__ */ jsx(AutocompleteItemText, {})
|
|
124
|
+
}, `item-${value}`);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/** What a list with no children shows: the autocomplete's `items` that match. */
|
|
128
|
+
const dataChildren = (state) => state.items.length > 0 ? dataItems(state.items) : null;
|
|
129
|
+
function AutocompleteContent(t0) {
|
|
130
|
+
const $ = c(10);
|
|
131
|
+
let className;
|
|
132
|
+
let props;
|
|
133
|
+
let t1;
|
|
134
|
+
if ($[0] !== t0) {
|
|
135
|
+
({className, sideOffset: t1, ...props} = t0);
|
|
136
|
+
$[0] = t0;
|
|
137
|
+
$[1] = className;
|
|
138
|
+
$[2] = props;
|
|
139
|
+
$[3] = t1;
|
|
140
|
+
} else {
|
|
141
|
+
className = $[1];
|
|
142
|
+
props = $[2];
|
|
143
|
+
t1 = $[3];
|
|
144
|
+
}
|
|
145
|
+
const sideOffset = t1 === void 0 ? 4 : t1;
|
|
146
|
+
let t2;
|
|
147
|
+
if ($[4] !== className) {
|
|
148
|
+
t2 = cnState([
|
|
149
|
+
"isolate flex flex-col overflow-hidden popup-surface p-1 text-sm has-data-[slot=autocomplete-arrow]:overflow-visible",
|
|
150
|
+
"data-[presentation=popover]:popup-motion data-[presentation=popover]:max-h-[min(--spacing(80),var(--available-height))] data-[presentation=popover]:max-w-(--available-width) data-[presentation=popover]:min-w-[max(--spacing(36),var(--anchor-width))] data-[presentation=popover]:origin-(--transform-origin) data-[presentation=popover]:rounded-xl data-[presentation=popover]:[--popup-duration:100ms] data-[presentation=popover]:data-starting-style:scale-95 data-[presentation=popover]:data-closed:scale-95",
|
|
151
|
+
"data-[presentation=sheet]:h-[min(--spacing(96),80dvh)] data-[presentation=sheet]:gap-1 data-[presentation=sheet]:shadow-lg data-[presentation=sheet]:rounded-t-2xl data-[presentation=sheet]:p-2 data-[presentation=sheet]:pb-[max(--spacing(2),env(safe-area-inset-bottom))]"
|
|
152
|
+
], className);
|
|
153
|
+
$[4] = className;
|
|
154
|
+
$[5] = t2;
|
|
155
|
+
} else t2 = $[5];
|
|
156
|
+
let t3;
|
|
157
|
+
if ($[6] !== props || $[7] !== sideOffset || $[8] !== t2) {
|
|
158
|
+
t3 = /* @__PURE__ */ jsx(AutocompleteContent$1, {
|
|
159
|
+
sideOffset,
|
|
160
|
+
className: t2,
|
|
161
|
+
...props
|
|
162
|
+
});
|
|
163
|
+
$[6] = props;
|
|
164
|
+
$[7] = sideOffset;
|
|
165
|
+
$[8] = t2;
|
|
166
|
+
$[9] = t3;
|
|
167
|
+
} else t3 = $[9];
|
|
168
|
+
return t3;
|
|
169
|
+
}
|
|
170
|
+
/** Without children it renders the autocomplete's `items` that match. */
|
|
171
|
+
function AutocompleteList(t0) {
|
|
172
|
+
const $ = c(10);
|
|
173
|
+
let className;
|
|
174
|
+
let props;
|
|
175
|
+
let t1;
|
|
176
|
+
if ($[0] !== t0) {
|
|
177
|
+
({className, children: t1, ...props} = t0);
|
|
178
|
+
$[0] = t0;
|
|
179
|
+
$[1] = className;
|
|
180
|
+
$[2] = props;
|
|
181
|
+
$[3] = t1;
|
|
182
|
+
} else {
|
|
183
|
+
className = $[1];
|
|
184
|
+
props = $[2];
|
|
185
|
+
t1 = $[3];
|
|
186
|
+
}
|
|
187
|
+
const children = t1 === void 0 ? dataChildren : t1;
|
|
188
|
+
let t2;
|
|
189
|
+
if ($[4] !== className) {
|
|
190
|
+
t2 = cnState("flex min-h-0 flex-1 flex-col overflow-y-auto outline-none empty:hidden", className);
|
|
191
|
+
$[4] = className;
|
|
192
|
+
$[5] = t2;
|
|
193
|
+
} else t2 = $[5];
|
|
194
|
+
let t3;
|
|
195
|
+
if ($[6] !== children || $[7] !== props || $[8] !== t2) {
|
|
196
|
+
t3 = /* @__PURE__ */ jsx(AutocompleteList$1, {
|
|
197
|
+
className: t2,
|
|
198
|
+
...props,
|
|
199
|
+
children
|
|
200
|
+
});
|
|
201
|
+
$[6] = children;
|
|
202
|
+
$[7] = props;
|
|
203
|
+
$[8] = t2;
|
|
204
|
+
$[9] = t3;
|
|
205
|
+
} else t3 = $[9];
|
|
206
|
+
return t3;
|
|
207
|
+
}
|
|
208
|
+
function AutocompleteEmpty(t0) {
|
|
209
|
+
const $ = c(8);
|
|
210
|
+
let className;
|
|
211
|
+
let props;
|
|
212
|
+
if ($[0] !== t0) {
|
|
213
|
+
({className, ...props} = t0);
|
|
214
|
+
$[0] = t0;
|
|
215
|
+
$[1] = className;
|
|
216
|
+
$[2] = props;
|
|
217
|
+
} else {
|
|
218
|
+
className = $[1];
|
|
219
|
+
props = $[2];
|
|
220
|
+
}
|
|
221
|
+
let t1;
|
|
222
|
+
if ($[3] !== className) {
|
|
223
|
+
t1 = cnState("px-2 py-6 text-center text-sm text-muted-foreground empty:hidden", className);
|
|
224
|
+
$[3] = className;
|
|
225
|
+
$[4] = t1;
|
|
226
|
+
} else t1 = $[4];
|
|
227
|
+
let t2;
|
|
228
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
229
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteEmpty$1, {
|
|
230
|
+
className: t1,
|
|
231
|
+
...props
|
|
232
|
+
});
|
|
233
|
+
$[5] = props;
|
|
234
|
+
$[6] = t1;
|
|
235
|
+
$[7] = t2;
|
|
236
|
+
} else t2 = $[7];
|
|
237
|
+
return t2;
|
|
238
|
+
}
|
|
239
|
+
function AutocompleteStatus(t0) {
|
|
240
|
+
const $ = c(8);
|
|
241
|
+
let className;
|
|
242
|
+
let props;
|
|
243
|
+
if ($[0] !== t0) {
|
|
244
|
+
({className, ...props} = t0);
|
|
245
|
+
$[0] = t0;
|
|
246
|
+
$[1] = className;
|
|
247
|
+
$[2] = props;
|
|
248
|
+
} else {
|
|
249
|
+
className = $[1];
|
|
250
|
+
props = $[2];
|
|
251
|
+
}
|
|
252
|
+
let t1;
|
|
253
|
+
if ($[3] !== className) {
|
|
254
|
+
t1 = cnState("px-2 py-1.5 text-sm text-muted-foreground empty:hidden", className);
|
|
255
|
+
$[3] = className;
|
|
256
|
+
$[4] = t1;
|
|
257
|
+
} else t1 = $[4];
|
|
258
|
+
let t2;
|
|
259
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
260
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteStatus$1, {
|
|
261
|
+
className: t1,
|
|
262
|
+
...props
|
|
263
|
+
});
|
|
264
|
+
$[5] = props;
|
|
265
|
+
$[6] = t1;
|
|
266
|
+
$[7] = t2;
|
|
267
|
+
} else t2 = $[7];
|
|
268
|
+
return t2;
|
|
269
|
+
}
|
|
270
|
+
function AutocompleteItem(t0) {
|
|
271
|
+
const $ = c(8);
|
|
272
|
+
let className;
|
|
273
|
+
let props;
|
|
274
|
+
if ($[0] !== t0) {
|
|
275
|
+
({className, ...props} = t0);
|
|
276
|
+
$[0] = t0;
|
|
277
|
+
$[1] = className;
|
|
278
|
+
$[2] = props;
|
|
279
|
+
} else {
|
|
280
|
+
className = $[1];
|
|
281
|
+
props = $[2];
|
|
282
|
+
}
|
|
283
|
+
let t1;
|
|
284
|
+
if ($[3] !== className) {
|
|
285
|
+
t1 = cnState("list-row in-data-has-icons:not-data-has-icon:ps-8 in-data-[presentation=sheet]:py-2.5", className);
|
|
286
|
+
$[3] = className;
|
|
287
|
+
$[4] = t1;
|
|
288
|
+
} else t1 = $[4];
|
|
289
|
+
let t2;
|
|
290
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
291
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteItem$1, {
|
|
292
|
+
className: t1,
|
|
293
|
+
...props
|
|
294
|
+
});
|
|
295
|
+
$[5] = props;
|
|
296
|
+
$[6] = t1;
|
|
297
|
+
$[7] = t2;
|
|
298
|
+
} else t2 = $[7];
|
|
299
|
+
return t2;
|
|
300
|
+
}
|
|
301
|
+
function AutocompleteItemText(t0) {
|
|
302
|
+
const $ = c(8);
|
|
303
|
+
let className;
|
|
304
|
+
let props;
|
|
305
|
+
if ($[0] !== t0) {
|
|
306
|
+
({className, ...props} = t0);
|
|
307
|
+
$[0] = t0;
|
|
308
|
+
$[1] = className;
|
|
309
|
+
$[2] = props;
|
|
310
|
+
} else {
|
|
311
|
+
className = $[1];
|
|
312
|
+
props = $[2];
|
|
313
|
+
}
|
|
314
|
+
let t1;
|
|
315
|
+
if ($[3] !== className) {
|
|
316
|
+
t1 = cnState("min-w-0 [&_mark]:bg-transparent [&_mark]:font-semibold [&_mark]:text-inherit", className);
|
|
317
|
+
$[3] = className;
|
|
318
|
+
$[4] = t1;
|
|
319
|
+
} else t1 = $[4];
|
|
320
|
+
let t2;
|
|
321
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
322
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteItemText$1, {
|
|
323
|
+
className: t1,
|
|
324
|
+
...props
|
|
325
|
+
});
|
|
326
|
+
$[5] = props;
|
|
327
|
+
$[6] = t1;
|
|
328
|
+
$[7] = t2;
|
|
329
|
+
} else t2 = $[7];
|
|
330
|
+
return t2;
|
|
331
|
+
}
|
|
332
|
+
const AutocompleteItemIcon = Object.assign(function AutocompleteItemIcon({ className, ...props }) {
|
|
333
|
+
return /* @__PURE__ */ jsx(AutocompleteItemIcon$1, {
|
|
334
|
+
className: cnState("flex size-4 shrink-0 items-center justify-center text-muted-foreground", className),
|
|
335
|
+
...props
|
|
336
|
+
});
|
|
337
|
+
}, notLabel);
|
|
338
|
+
function AutocompleteGroup(t0) {
|
|
339
|
+
const $ = c(8);
|
|
340
|
+
let className;
|
|
341
|
+
let props;
|
|
342
|
+
if ($[0] !== t0) {
|
|
343
|
+
({className, ...props} = t0);
|
|
344
|
+
$[0] = t0;
|
|
345
|
+
$[1] = className;
|
|
346
|
+
$[2] = props;
|
|
347
|
+
} else {
|
|
348
|
+
className = $[1];
|
|
349
|
+
props = $[2];
|
|
350
|
+
}
|
|
351
|
+
let t1;
|
|
352
|
+
if ($[3] !== className) {
|
|
353
|
+
t1 = cnState("flex shrink-0 flex-col", className);
|
|
354
|
+
$[3] = className;
|
|
355
|
+
$[4] = t1;
|
|
356
|
+
} else t1 = $[4];
|
|
357
|
+
let t2;
|
|
358
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
359
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteGroup$1, {
|
|
360
|
+
className: t1,
|
|
361
|
+
...props
|
|
362
|
+
});
|
|
363
|
+
$[5] = props;
|
|
364
|
+
$[6] = t1;
|
|
365
|
+
$[7] = t2;
|
|
366
|
+
} else t2 = $[7];
|
|
367
|
+
return t2;
|
|
368
|
+
}
|
|
369
|
+
function AutocompleteGroupLabel(t0) {
|
|
370
|
+
const $ = c(8);
|
|
371
|
+
let className;
|
|
372
|
+
let props;
|
|
373
|
+
if ($[0] !== t0) {
|
|
374
|
+
({className, ...props} = t0);
|
|
375
|
+
$[0] = t0;
|
|
376
|
+
$[1] = className;
|
|
377
|
+
$[2] = props;
|
|
378
|
+
} else {
|
|
379
|
+
className = $[1];
|
|
380
|
+
props = $[2];
|
|
381
|
+
}
|
|
382
|
+
let t1;
|
|
383
|
+
if ($[3] !== className) {
|
|
384
|
+
t1 = cnState("px-2 py-1.5 text-xs text-muted-foreground", className);
|
|
385
|
+
$[3] = className;
|
|
386
|
+
$[4] = t1;
|
|
387
|
+
} else t1 = $[4];
|
|
388
|
+
let t2;
|
|
389
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
390
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteGroupLabel$1, {
|
|
391
|
+
className: t1,
|
|
392
|
+
...props
|
|
393
|
+
});
|
|
394
|
+
$[5] = props;
|
|
395
|
+
$[6] = t1;
|
|
396
|
+
$[7] = t2;
|
|
397
|
+
} else t2 = $[7];
|
|
398
|
+
return t2;
|
|
399
|
+
}
|
|
400
|
+
function AutocompleteSeparator(t0) {
|
|
401
|
+
const $ = c(8);
|
|
402
|
+
let className;
|
|
403
|
+
let props;
|
|
404
|
+
if ($[0] !== t0) {
|
|
405
|
+
({className, ...props} = t0);
|
|
406
|
+
$[0] = t0;
|
|
407
|
+
$[1] = className;
|
|
408
|
+
$[2] = props;
|
|
409
|
+
} else {
|
|
410
|
+
className = $[1];
|
|
411
|
+
props = $[2];
|
|
412
|
+
}
|
|
413
|
+
let t1;
|
|
414
|
+
if ($[3] !== className) {
|
|
415
|
+
t1 = cnState("pointer-events-none -mx-1 my-1 h-px shrink-0 bg-border", className);
|
|
416
|
+
$[3] = className;
|
|
417
|
+
$[4] = t1;
|
|
418
|
+
} else t1 = $[4];
|
|
419
|
+
let t2;
|
|
420
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
421
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteSeparator$1, {
|
|
422
|
+
className: t1,
|
|
423
|
+
...props
|
|
424
|
+
});
|
|
425
|
+
$[5] = props;
|
|
426
|
+
$[6] = t1;
|
|
427
|
+
$[7] = t2;
|
|
428
|
+
} else t2 = $[7];
|
|
429
|
+
return t2;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Give the content a `sideOffset` that leaves room for it. The content stops
|
|
433
|
+
* clipping while it holds an arrow; the list inside still scrolls.
|
|
434
|
+
*/
|
|
435
|
+
function AutocompleteArrow(t0) {
|
|
436
|
+
const $ = c(8);
|
|
437
|
+
let className;
|
|
438
|
+
let props;
|
|
439
|
+
if ($[0] !== t0) {
|
|
440
|
+
({className, ...props} = t0);
|
|
441
|
+
$[0] = t0;
|
|
442
|
+
$[1] = className;
|
|
443
|
+
$[2] = props;
|
|
444
|
+
} else {
|
|
445
|
+
className = $[1];
|
|
446
|
+
props = $[2];
|
|
447
|
+
}
|
|
448
|
+
let t1;
|
|
449
|
+
if ($[3] !== className) {
|
|
450
|
+
t1 = cnState("popup-arrow", className);
|
|
451
|
+
$[3] = className;
|
|
452
|
+
$[4] = t1;
|
|
453
|
+
} else t1 = $[4];
|
|
454
|
+
let t2;
|
|
455
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
456
|
+
t2 = /* @__PURE__ */ jsx(AutocompleteArrow$1, {
|
|
457
|
+
className: t1,
|
|
458
|
+
...props
|
|
459
|
+
});
|
|
460
|
+
$[5] = props;
|
|
461
|
+
$[6] = t1;
|
|
462
|
+
$[7] = t2;
|
|
463
|
+
} else t2 = $[7];
|
|
464
|
+
return t2;
|
|
465
|
+
}
|
|
466
|
+
export { Autocomplete, AutocompleteArrow, AutocompleteClear, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteItemIcon, AutocompleteItemText, AutocompleteLabel, AutocompleteList, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, createAutocompleteController };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Avatar as Avatar$1, AvatarFallback as AvatarFallback$1, AvatarImage as AvatarImage$1, AvatarLoadingStatus, AvatarLoadingStatusChangeReason, AvatarState } from "@ui-sdk/react/avatar";
|
|
3
|
+
declare function Avatar({ className, ...props }: ComponentProps<typeof Avatar$1>): import("react").JSX.Element;
|
|
4
|
+
declare function AvatarImage({ className, ...props }: ComponentProps<typeof AvatarImage$1>): import("react").JSX.Element;
|
|
5
|
+
declare function AvatarFallback({ className, ...props }: ComponentProps<typeof AvatarFallback$1>): import("react").JSX.Element;
|
|
6
|
+
export { Avatar, AvatarFallback, AvatarImage, type AvatarLoadingStatus, type AvatarLoadingStatusChangeReason, type AvatarState };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Avatar as Avatar$1, AvatarFallback as AvatarFallback$1, AvatarImage as AvatarImage$1 } from "@ui-sdk/react/avatar";
|
|
6
|
+
// src/components/avatar/avatar.tsx
|
|
7
|
+
function Avatar(t0) {
|
|
8
|
+
const $ = c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== className) {
|
|
22
|
+
t1 = cnState("relative flex size-8 shrink-0 rounded-full select-none focus-ring after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten", className);
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
28
|
+
t2 = /* @__PURE__ */ jsx(Avatar$1, {
|
|
29
|
+
className: t1,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
$[5] = props;
|
|
33
|
+
$[6] = t1;
|
|
34
|
+
$[7] = t2;
|
|
35
|
+
} else t2 = $[7];
|
|
36
|
+
return t2;
|
|
37
|
+
}
|
|
38
|
+
function AvatarImage(t0) {
|
|
39
|
+
const $ = c(8);
|
|
40
|
+
let className;
|
|
41
|
+
let props;
|
|
42
|
+
if ($[0] !== t0) {
|
|
43
|
+
({className, ...props} = t0);
|
|
44
|
+
$[0] = t0;
|
|
45
|
+
$[1] = className;
|
|
46
|
+
$[2] = props;
|
|
47
|
+
} else {
|
|
48
|
+
className = $[1];
|
|
49
|
+
props = $[2];
|
|
50
|
+
}
|
|
51
|
+
let t1;
|
|
52
|
+
if ($[3] !== className) {
|
|
53
|
+
t1 = cnState("aspect-square size-full rounded-full object-cover", className);
|
|
54
|
+
$[3] = className;
|
|
55
|
+
$[4] = t1;
|
|
56
|
+
} else t1 = $[4];
|
|
57
|
+
let t2;
|
|
58
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
59
|
+
t2 = /* @__PURE__ */ jsx(AvatarImage$1, {
|
|
60
|
+
className: t1,
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
$[5] = props;
|
|
64
|
+
$[6] = t1;
|
|
65
|
+
$[7] = t2;
|
|
66
|
+
} else t2 = $[7];
|
|
67
|
+
return t2;
|
|
68
|
+
}
|
|
69
|
+
function AvatarFallback(t0) {
|
|
70
|
+
const $ = c(8);
|
|
71
|
+
let className;
|
|
72
|
+
let props;
|
|
73
|
+
if ($[0] !== t0) {
|
|
74
|
+
({className, ...props} = t0);
|
|
75
|
+
$[0] = t0;
|
|
76
|
+
$[1] = className;
|
|
77
|
+
$[2] = props;
|
|
78
|
+
} else {
|
|
79
|
+
className = $[1];
|
|
80
|
+
props = $[2];
|
|
81
|
+
}
|
|
82
|
+
let t1;
|
|
83
|
+
if ($[3] !== className) {
|
|
84
|
+
t1 = cnState("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground", className);
|
|
85
|
+
$[3] = className;
|
|
86
|
+
$[4] = t1;
|
|
87
|
+
} else t1 = $[4];
|
|
88
|
+
let t2;
|
|
89
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
90
|
+
t2 = /* @__PURE__ */ jsx(AvatarFallback$1, {
|
|
91
|
+
className: t1,
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
$[5] = props;
|
|
95
|
+
$[6] = t1;
|
|
96
|
+
$[7] = t2;
|
|
97
|
+
} else t2 = $[7];
|
|
98
|
+
return t2;
|
|
99
|
+
}
|
|
100
|
+
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A row of overlapping avatars. Give it `role="group"` and an `aria-label`
|
|
4
|
+
* when the row says more than its avatars do, like who is in a note.
|
|
5
|
+
*/
|
|
6
|
+
declare function AvatarGroup({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
7
|
+
/** How many more people the row leaves out, as the last avatar: `+3`. */
|
|
8
|
+
declare function AvatarGroupCount({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
9
|
+
export { AvatarGroup, AvatarGroupCount };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utilities/cn/index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/avatar-group/avatar-group.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A row of overlapping avatars. Give it `role="group"` and an `aria-label`
|
|
8
|
+
* when the row says more than its avatars do, like who is in a note.
|
|
9
|
+
*/
|
|
10
|
+
function AvatarGroup(t0) {
|
|
11
|
+
const $ = c(8);
|
|
12
|
+
let className;
|
|
13
|
+
let props;
|
|
14
|
+
if ($[0] !== t0) {
|
|
15
|
+
({className, ...props} = t0);
|
|
16
|
+
$[0] = t0;
|
|
17
|
+
$[1] = className;
|
|
18
|
+
$[2] = props;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
props = $[2];
|
|
22
|
+
}
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[3] !== className) {
|
|
25
|
+
t1 = cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className);
|
|
26
|
+
$[3] = className;
|
|
27
|
+
$[4] = t1;
|
|
28
|
+
} else t1 = $[4];
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
32
|
+
"data-slot": "avatar-group",
|
|
33
|
+
className: t1,
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
$[5] = props;
|
|
37
|
+
$[6] = t1;
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else t2 = $[7];
|
|
40
|
+
return t2;
|
|
41
|
+
}
|
|
42
|
+
/** How many more people the row leaves out, as the last avatar: `+3`. */
|
|
43
|
+
function AvatarGroupCount(t0) {
|
|
44
|
+
const $ = c(8);
|
|
45
|
+
let className;
|
|
46
|
+
let props;
|
|
47
|
+
if ($[0] !== t0) {
|
|
48
|
+
({className, ...props} = t0);
|
|
49
|
+
$[0] = t0;
|
|
50
|
+
$[1] = className;
|
|
51
|
+
$[2] = props;
|
|
52
|
+
} else {
|
|
53
|
+
className = $[1];
|
|
54
|
+
props = $[2];
|
|
55
|
+
}
|
|
56
|
+
let t1;
|
|
57
|
+
if ($[3] !== className) {
|
|
58
|
+
t1 = cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background [&>svg]:size-4", className);
|
|
59
|
+
$[3] = className;
|
|
60
|
+
$[4] = t1;
|
|
61
|
+
} else t1 = $[4];
|
|
62
|
+
let t2;
|
|
63
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
64
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
65
|
+
"data-slot": "avatar-group-count",
|
|
66
|
+
className: t1,
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
$[5] = props;
|
|
70
|
+
$[6] = t1;
|
|
71
|
+
$[7] = t2;
|
|
72
|
+
} else t2 = $[7];
|
|
73
|
+
return t2;
|
|
74
|
+
}
|
|
75
|
+
export { AvatarGroup, AvatarGroupCount };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { index_d_exports } from "../../core/index.js";
|
|
2
|
+
import { VariantProps } from "../../utilities/cn/index.js";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
type BadgeProps = index_d_exports.PartProps<"span"> & VariantProps<typeof badgeVariants>;
|
|
7
|
+
/**
|
|
8
|
+
* A short label for a status or a count. `render` makes it a link or a button.
|
|
9
|
+
* For a link an agent follows, render it as `LinkPart` from `abby/link`:
|
|
10
|
+
* `render={<LinkPart href="/issues" />}`. An agent doesn't see a bare `<a>`,
|
|
11
|
+
* and a ui-sdk `Button` rendered as a link gives it nothing to press. For a
|
|
12
|
+
* button, render a ui-sdk `Button` that is a real button.
|
|
13
|
+
*/
|
|
14
|
+
declare function Badge({ variant, className, render, ...props }: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
15
|
+
export { Badge, type BadgeProps, badgeVariants };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { core_exports } from "../../core/index.js";
|
|
3
|
+
import { cnState, cva } from "../../utilities/cn/index.js";
|
|
4
|
+
// src/components/badge/badge.tsx
|
|
5
|
+
const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-colors focus-ring has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
6
|
+
variants: { variant: {
|
|
7
|
+
default: "bg-primary text-primary-foreground [a,button]:hover:bg-primary/85",
|
|
8
|
+
secondary: "bg-secondary text-muted-foreground [a,button]:hover:bg-secondary/70",
|
|
9
|
+
destructive: "bg-destructive/10 text-destructive [a,button]:hover:bg-destructive [a,button]:hover:text-destructive-foreground",
|
|
10
|
+
outline: "border-border text-muted-foreground [a,button]:border-input [a,button]:hover:bg-muted [a,button]:hover:text-muted-foreground",
|
|
11
|
+
ghost: "[a,button]:hover:bg-muted [a,button]:hover:text-muted-foreground",
|
|
12
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
13
|
+
} },
|
|
14
|
+
defaultVariants: { variant: "default" }
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* A short label for a status or a count. `render` makes it a link or a button.
|
|
18
|
+
* For a link an agent follows, render it as `LinkPart` from `abby/link`:
|
|
19
|
+
* `render={<LinkPart href="/issues" />}`. An agent doesn't see a bare `<a>`,
|
|
20
|
+
* and a ui-sdk `Button` rendered as a link gives it nothing to press. For a
|
|
21
|
+
* button, render a ui-sdk `Button` that is a real button.
|
|
22
|
+
*/
|
|
23
|
+
function Badge({ variant, className, render, ...props }) {
|
|
24
|
+
return (0, core_exports.renderElement)("span", {
|
|
25
|
+
"data-slot": "badge",
|
|
26
|
+
"data-variant": variant ?? "default",
|
|
27
|
+
...props,
|
|
28
|
+
className: cnState(badgeVariants({ variant }), className)
|
|
29
|
+
}, render);
|
|
30
|
+
}
|
|
31
|
+
export { Badge, badgeVariants };
|