@asanchez-sa/abby 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +245 -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 +337 -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 +687 -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,683 @@
|
|
|
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, Tick02Icon } from "@hugeicons/core-free-icons";
|
|
11
|
+
import { Combobox as Combobox$1, ComboboxArrow as ComboboxArrow$1, ComboboxChip as ComboboxChip$1, ComboboxChipRemove as ComboboxChipRemove$1, ComboboxChips as ComboboxChips$1, ComboboxChipsOverflow as ComboboxChipsOverflow$1, ComboboxClear as ComboboxClear$1, ComboboxContent as ComboboxContent$1, ComboboxCreate as ComboboxCreate$1, ComboboxEmpty as ComboboxEmpty$1, ComboboxGroup as ComboboxGroup$1, ComboboxGroupLabel as ComboboxGroupLabel$1, ComboboxInput as ComboboxInput$1, ComboboxItem as ComboboxItem$1, ComboboxItemIcon as ComboboxItemIcon$1, ComboboxItemIndicator as ComboboxItemIndicator$1, ComboboxItemText as ComboboxItemText$1, ComboboxLabel as ComboboxLabel$1, ComboboxList as ComboboxList$1, ComboboxSelectAll as ComboboxSelectAll$1, ComboboxSeparator as ComboboxSeparator$1, ComboboxStatus as ComboboxStatus$1, ComboboxTrigger as ComboboxTrigger$1, ComboboxValue, ComboboxValueIcon as ComboboxValueIcon$1, createComboboxController } from "@ui-sdk/react/combobox";
|
|
12
|
+
// src/components/combobox/combobox.tsx
|
|
13
|
+
function Combobox(props) {
|
|
14
|
+
const $ = c(2);
|
|
15
|
+
let t0;
|
|
16
|
+
if ($[0] !== props) {
|
|
17
|
+
t0 = /* @__PURE__ */ jsx(Combobox$1, { ...props });
|
|
18
|
+
$[0] = props;
|
|
19
|
+
$[1] = t0;
|
|
20
|
+
} else t0 = $[1];
|
|
21
|
+
return t0;
|
|
22
|
+
}
|
|
23
|
+
function ComboboxLabel(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(ComboboxLabel$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
|
+
const inChips = "in-data-[slot=combobox-chips]:h-7 in-data-[slot=combobox-chips]:w-auto in-data-[slot=combobox-chips]:min-w-16 in-data-[slot=combobox-chips]:flex-1 in-data-[slot=combobox-chips]:rounded-none in-data-[slot=combobox-chips]:border-0 in-data-[slot=combobox-chips]:bg-transparent in-data-[slot=combobox-chips]:p-0 in-data-[slot=combobox-chips]:ring-0 in-data-[slot=combobox-chips]:aria-invalid:ring-0 in-data-[slot=combobox-chips]:dark:bg-transparent in-data-[slot=combobox-chips]:outline-none in-data-[slot=combobox-chips]:data-disabled:opacity-100";
|
|
55
|
+
/**
|
|
56
|
+
* Looks like abby's `Input`. Put it in a row with `ComboboxClear` and
|
|
57
|
+
* `ComboboxTrigger`, or inside `ComboboxChips` with `multiple`.
|
|
58
|
+
*/
|
|
59
|
+
function ComboboxInput(t0) {
|
|
60
|
+
const $ = c(8);
|
|
61
|
+
let className;
|
|
62
|
+
let props;
|
|
63
|
+
if ($[0] !== t0) {
|
|
64
|
+
({className, ...props} = t0);
|
|
65
|
+
$[0] = t0;
|
|
66
|
+
$[1] = className;
|
|
67
|
+
$[2] = props;
|
|
68
|
+
} else {
|
|
69
|
+
className = $[1];
|
|
70
|
+
props = $[2];
|
|
71
|
+
}
|
|
72
|
+
let t1;
|
|
73
|
+
if ($[3] !== className) {
|
|
74
|
+
t1 = cnState([inputClasses, inChips], className);
|
|
75
|
+
$[3] = className;
|
|
76
|
+
$[4] = t1;
|
|
77
|
+
} else t1 = $[4];
|
|
78
|
+
let t2;
|
|
79
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
80
|
+
t2 = /* @__PURE__ */ jsx(ComboboxInput$1, {
|
|
81
|
+
className: t1,
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
$[5] = props;
|
|
85
|
+
$[6] = t1;
|
|
86
|
+
$[7] = t2;
|
|
87
|
+
} else t2 = $[7];
|
|
88
|
+
return t2;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* An outline icon button with a chevron. Name it with `aria-label`. With
|
|
92
|
+
* children it shows only those, like a `ComboboxValue` when the input lives
|
|
93
|
+
* in the popup: give it a `size` to fit them.
|
|
94
|
+
*/
|
|
95
|
+
function ComboboxTrigger({ variant = "outline", size = "icon-sm", className, children = /* @__PURE__ */ jsx(Icon, { icon: ArrowDown01Icon }), ...props }) {
|
|
96
|
+
return /* @__PURE__ */ jsx(ComboboxTrigger$1, {
|
|
97
|
+
className: cnState([buttonLook({
|
|
98
|
+
variant,
|
|
99
|
+
size
|
|
100
|
+
}), "shrink-0 rounded-full [&_svg]:text-muted-foreground"], className),
|
|
101
|
+
...props,
|
|
102
|
+
children
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/** A ghost icon button with a cross. Name it with `aria-label`. */
|
|
106
|
+
function ComboboxClear({ variant = "ghost", size = "icon-sm", className, children = /* @__PURE__ */ jsx(Icon, { icon: Cancel01Icon }), ...props }) {
|
|
107
|
+
return /* @__PURE__ */ jsx(ComboboxClear$1, {
|
|
108
|
+
className: cnState([buttonLook({
|
|
109
|
+
variant,
|
|
110
|
+
size
|
|
111
|
+
}), "shrink-0 rounded-full"], className),
|
|
112
|
+
...props,
|
|
113
|
+
children
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/** The box around the chips and the input of a `multiple` combobox. Looks like abby's `Input`. */
|
|
117
|
+
function ComboboxChips(t0) {
|
|
118
|
+
const $ = c(8);
|
|
119
|
+
let className;
|
|
120
|
+
let props;
|
|
121
|
+
if ($[0] !== t0) {
|
|
122
|
+
({className, ...props} = t0);
|
|
123
|
+
$[0] = t0;
|
|
124
|
+
$[1] = className;
|
|
125
|
+
$[2] = props;
|
|
126
|
+
} else {
|
|
127
|
+
className = $[1];
|
|
128
|
+
props = $[2];
|
|
129
|
+
}
|
|
130
|
+
let t1;
|
|
131
|
+
if ($[3] !== className) {
|
|
132
|
+
t1 = cnState([inputClasses, "flex h-auto min-h-9 flex-1 cursor-text flex-wrap items-center gap-1 rounded-[calc(--spacing(4.5))] px-[3px] py-[3px] focus-field-within has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chips-overflow]:flex-nowrap has-data-[slot=combobox-chips-overflow]:overflow-hidden [&>input]:ms-2"], className);
|
|
133
|
+
$[3] = className;
|
|
134
|
+
$[4] = t1;
|
|
135
|
+
} else t1 = $[4];
|
|
136
|
+
let t2;
|
|
137
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
138
|
+
t2 = /* @__PURE__ */ jsx(ComboboxChips$1, {
|
|
139
|
+
className: t1,
|
|
140
|
+
...props
|
|
141
|
+
});
|
|
142
|
+
$[5] = props;
|
|
143
|
+
$[6] = t1;
|
|
144
|
+
$[7] = t2;
|
|
145
|
+
} else t2 = $[7];
|
|
146
|
+
return t2;
|
|
147
|
+
}
|
|
148
|
+
function ComboboxChip(t0) {
|
|
149
|
+
const $ = c(8);
|
|
150
|
+
let className;
|
|
151
|
+
let props;
|
|
152
|
+
if ($[0] !== t0) {
|
|
153
|
+
({className, ...props} = t0);
|
|
154
|
+
$[0] = t0;
|
|
155
|
+
$[1] = className;
|
|
156
|
+
$[2] = props;
|
|
157
|
+
} else {
|
|
158
|
+
className = $[1];
|
|
159
|
+
props = $[2];
|
|
160
|
+
}
|
|
161
|
+
let t1;
|
|
162
|
+
if ($[3] !== className) {
|
|
163
|
+
t1 = cnState("inline-flex h-7 shrink-0 cursor-default items-center gap-1 rounded-full border border-border bg-secondary ps-2.5 pe-1.5 text-sm font-medium whitespace-nowrap text-secondary-foreground focus-ring-inset not-has-data-[slot=combobox-chip-remove]:pe-2.5 data-disabled:pe-2.5", className);
|
|
164
|
+
$[3] = className;
|
|
165
|
+
$[4] = t1;
|
|
166
|
+
} else t1 = $[4];
|
|
167
|
+
let t2;
|
|
168
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
169
|
+
t2 = /* @__PURE__ */ jsx(ComboboxChip$1, {
|
|
170
|
+
className: t1,
|
|
171
|
+
...props
|
|
172
|
+
});
|
|
173
|
+
$[5] = props;
|
|
174
|
+
$[6] = t1;
|
|
175
|
+
$[7] = t2;
|
|
176
|
+
} else t2 = $[7];
|
|
177
|
+
return t2;
|
|
178
|
+
}
|
|
179
|
+
/** Removes its chip. Name it with `aria-label`. Without children it shows a cross. */
|
|
180
|
+
function ComboboxChipRemove({ className, children = /* @__PURE__ */ jsx(Icon, {
|
|
181
|
+
icon: Cancel01Icon,
|
|
182
|
+
className: "size-3"
|
|
183
|
+
}), ...props }) {
|
|
184
|
+
return /* @__PURE__ */ jsx(ComboboxChipRemove$1, {
|
|
185
|
+
className: cnState("inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full hover:bg-foreground/10 focus-ring-inset data-disabled:hidden", className),
|
|
186
|
+
...props,
|
|
187
|
+
children
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function ComboboxChipsOverflow(t0) {
|
|
191
|
+
const $ = c(8);
|
|
192
|
+
let className;
|
|
193
|
+
let props;
|
|
194
|
+
if ($[0] !== t0) {
|
|
195
|
+
({className, ...props} = t0);
|
|
196
|
+
$[0] = t0;
|
|
197
|
+
$[1] = className;
|
|
198
|
+
$[2] = props;
|
|
199
|
+
} else {
|
|
200
|
+
className = $[1];
|
|
201
|
+
props = $[2];
|
|
202
|
+
}
|
|
203
|
+
let t1;
|
|
204
|
+
if ($[3] !== className) {
|
|
205
|
+
t1 = cnState("shrink-0 px-1 text-sm whitespace-nowrap text-muted-foreground empty:hidden", className);
|
|
206
|
+
$[3] = className;
|
|
207
|
+
$[4] = t1;
|
|
208
|
+
} else t1 = $[4];
|
|
209
|
+
let t2;
|
|
210
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
211
|
+
t2 = /* @__PURE__ */ jsx(ComboboxChipsOverflow$1, {
|
|
212
|
+
className: t1,
|
|
213
|
+
...props
|
|
214
|
+
});
|
|
215
|
+
$[5] = props;
|
|
216
|
+
$[6] = t1;
|
|
217
|
+
$[7] = t2;
|
|
218
|
+
} else t2 = $[7];
|
|
219
|
+
return t2;
|
|
220
|
+
}
|
|
221
|
+
function ComboboxValueIcon(t0) {
|
|
222
|
+
const $ = c(8);
|
|
223
|
+
let className;
|
|
224
|
+
let props;
|
|
225
|
+
if ($[0] !== t0) {
|
|
226
|
+
({className, ...props} = t0);
|
|
227
|
+
$[0] = t0;
|
|
228
|
+
$[1] = className;
|
|
229
|
+
$[2] = props;
|
|
230
|
+
} else {
|
|
231
|
+
className = $[1];
|
|
232
|
+
props = $[2];
|
|
233
|
+
}
|
|
234
|
+
let t1;
|
|
235
|
+
if ($[3] !== className) {
|
|
236
|
+
t1 = cnState("flex shrink-0 items-center text-muted-foreground", className);
|
|
237
|
+
$[3] = className;
|
|
238
|
+
$[4] = t1;
|
|
239
|
+
} else t1 = $[4];
|
|
240
|
+
let t2;
|
|
241
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
242
|
+
t2 = /* @__PURE__ */ jsx(ComboboxValueIcon$1, {
|
|
243
|
+
className: t1,
|
|
244
|
+
...props
|
|
245
|
+
});
|
|
246
|
+
$[5] = props;
|
|
247
|
+
$[6] = t1;
|
|
248
|
+
$[7] = t2;
|
|
249
|
+
} else t2 = $[7];
|
|
250
|
+
return t2;
|
|
251
|
+
}
|
|
252
|
+
/** The combobox's `items`, as styled parts. */
|
|
253
|
+
function dataItems(items) {
|
|
254
|
+
return items.map((entry, index) => {
|
|
255
|
+
if (typeof entry === "string") return /* @__PURE__ */ jsxs(ComboboxItem, {
|
|
256
|
+
value: entry,
|
|
257
|
+
label: entry,
|
|
258
|
+
children: [/* @__PURE__ */ jsx(ComboboxItemText, {}), /* @__PURE__ */ jsx(ComboboxItemIndicator, {})]
|
|
259
|
+
}, `item-${entry}`);
|
|
260
|
+
if ("type" in entry && entry.type === "separator") return /* @__PURE__ */ jsx(ComboboxSeparator, {}, `separator-${index}`);
|
|
261
|
+
if ("type" in entry && entry.type === "group") return /* @__PURE__ */ jsxs(ComboboxGroup, { children: [entry.label && /* @__PURE__ */ jsx(ComboboxGroupLabel, { children: entry.label }), dataItems(entry.items)] }, `group-${entry.label ?? index}`);
|
|
262
|
+
const { value, label, disabled, keywords } = entry;
|
|
263
|
+
return /* @__PURE__ */ jsxs(ComboboxItem, {
|
|
264
|
+
value,
|
|
265
|
+
label,
|
|
266
|
+
disabled,
|
|
267
|
+
keywords,
|
|
268
|
+
children: [/* @__PURE__ */ jsx(ComboboxItemText, {}), /* @__PURE__ */ jsx(ComboboxItemIndicator, {})]
|
|
269
|
+
}, typeof value === "string" ? `item-${value}` : `item-${label}`);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/** What a list with no children shows: the combobox's `items` that match. */
|
|
273
|
+
const dataChildren = (state) => state.items.length > 0 ? dataItems(state.items) : null;
|
|
274
|
+
function ComboboxContent(t0) {
|
|
275
|
+
const $ = c(10);
|
|
276
|
+
let className;
|
|
277
|
+
let props;
|
|
278
|
+
let t1;
|
|
279
|
+
if ($[0] !== t0) {
|
|
280
|
+
({className, sideOffset: t1, ...props} = t0);
|
|
281
|
+
$[0] = t0;
|
|
282
|
+
$[1] = className;
|
|
283
|
+
$[2] = props;
|
|
284
|
+
$[3] = t1;
|
|
285
|
+
} else {
|
|
286
|
+
className = $[1];
|
|
287
|
+
props = $[2];
|
|
288
|
+
t1 = $[3];
|
|
289
|
+
}
|
|
290
|
+
const sideOffset = t1 === void 0 ? 4 : t1;
|
|
291
|
+
let t2;
|
|
292
|
+
if ($[4] !== className) {
|
|
293
|
+
t2 = cnState([
|
|
294
|
+
"isolate flex flex-col overflow-hidden popup-surface p-1 text-sm has-data-[slot=combobox-arrow]:overflow-visible",
|
|
295
|
+
"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",
|
|
296
|
+
"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))]"
|
|
297
|
+
], className);
|
|
298
|
+
$[4] = className;
|
|
299
|
+
$[5] = t2;
|
|
300
|
+
} else t2 = $[5];
|
|
301
|
+
let t3;
|
|
302
|
+
if ($[6] !== props || $[7] !== sideOffset || $[8] !== t2) {
|
|
303
|
+
t3 = /* @__PURE__ */ jsx(ComboboxContent$1, {
|
|
304
|
+
sideOffset,
|
|
305
|
+
className: t2,
|
|
306
|
+
...props
|
|
307
|
+
});
|
|
308
|
+
$[6] = props;
|
|
309
|
+
$[7] = sideOffset;
|
|
310
|
+
$[8] = t2;
|
|
311
|
+
$[9] = t3;
|
|
312
|
+
} else t3 = $[9];
|
|
313
|
+
return t3;
|
|
314
|
+
}
|
|
315
|
+
/** Without children it renders the combobox's `items` that match, each with its check. */
|
|
316
|
+
function ComboboxList(t0) {
|
|
317
|
+
const $ = c(10);
|
|
318
|
+
let className;
|
|
319
|
+
let props;
|
|
320
|
+
let t1;
|
|
321
|
+
if ($[0] !== t0) {
|
|
322
|
+
({className, children: t1, ...props} = t0);
|
|
323
|
+
$[0] = t0;
|
|
324
|
+
$[1] = className;
|
|
325
|
+
$[2] = props;
|
|
326
|
+
$[3] = t1;
|
|
327
|
+
} else {
|
|
328
|
+
className = $[1];
|
|
329
|
+
props = $[2];
|
|
330
|
+
t1 = $[3];
|
|
331
|
+
}
|
|
332
|
+
const children = t1 === void 0 ? dataChildren : t1;
|
|
333
|
+
let t2;
|
|
334
|
+
if ($[4] !== className) {
|
|
335
|
+
t2 = cnState("flex min-h-0 flex-1 flex-col overflow-y-auto outline-none empty:hidden", className);
|
|
336
|
+
$[4] = className;
|
|
337
|
+
$[5] = t2;
|
|
338
|
+
} else t2 = $[5];
|
|
339
|
+
let t3;
|
|
340
|
+
if ($[6] !== children || $[7] !== props || $[8] !== t2) {
|
|
341
|
+
t3 = /* @__PURE__ */ jsx(ComboboxList$1, {
|
|
342
|
+
className: t2,
|
|
343
|
+
...props,
|
|
344
|
+
children
|
|
345
|
+
});
|
|
346
|
+
$[6] = children;
|
|
347
|
+
$[7] = props;
|
|
348
|
+
$[8] = t2;
|
|
349
|
+
$[9] = t3;
|
|
350
|
+
} else t3 = $[9];
|
|
351
|
+
return t3;
|
|
352
|
+
}
|
|
353
|
+
function ComboboxEmpty(t0) {
|
|
354
|
+
const $ = c(8);
|
|
355
|
+
let className;
|
|
356
|
+
let props;
|
|
357
|
+
if ($[0] !== t0) {
|
|
358
|
+
({className, ...props} = t0);
|
|
359
|
+
$[0] = t0;
|
|
360
|
+
$[1] = className;
|
|
361
|
+
$[2] = props;
|
|
362
|
+
} else {
|
|
363
|
+
className = $[1];
|
|
364
|
+
props = $[2];
|
|
365
|
+
}
|
|
366
|
+
let t1;
|
|
367
|
+
if ($[3] !== className) {
|
|
368
|
+
t1 = cnState("px-2 py-6 text-center text-sm text-muted-foreground empty:hidden", className);
|
|
369
|
+
$[3] = className;
|
|
370
|
+
$[4] = t1;
|
|
371
|
+
} else t1 = $[4];
|
|
372
|
+
let t2;
|
|
373
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
374
|
+
t2 = /* @__PURE__ */ jsx(ComboboxEmpty$1, {
|
|
375
|
+
className: t1,
|
|
376
|
+
...props
|
|
377
|
+
});
|
|
378
|
+
$[5] = props;
|
|
379
|
+
$[6] = t1;
|
|
380
|
+
$[7] = t2;
|
|
381
|
+
} else t2 = $[7];
|
|
382
|
+
return t2;
|
|
383
|
+
}
|
|
384
|
+
function ComboboxStatus(t0) {
|
|
385
|
+
const $ = c(8);
|
|
386
|
+
let className;
|
|
387
|
+
let props;
|
|
388
|
+
if ($[0] !== t0) {
|
|
389
|
+
({className, ...props} = t0);
|
|
390
|
+
$[0] = t0;
|
|
391
|
+
$[1] = className;
|
|
392
|
+
$[2] = props;
|
|
393
|
+
} else {
|
|
394
|
+
className = $[1];
|
|
395
|
+
props = $[2];
|
|
396
|
+
}
|
|
397
|
+
let t1;
|
|
398
|
+
if ($[3] !== className) {
|
|
399
|
+
t1 = cnState("px-2 py-1.5 text-sm text-muted-foreground empty:hidden", className);
|
|
400
|
+
$[3] = className;
|
|
401
|
+
$[4] = t1;
|
|
402
|
+
} else t1 = $[4];
|
|
403
|
+
let t2;
|
|
404
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
405
|
+
t2 = /* @__PURE__ */ jsx(ComboboxStatus$1, {
|
|
406
|
+
className: t1,
|
|
407
|
+
...props
|
|
408
|
+
});
|
|
409
|
+
$[5] = props;
|
|
410
|
+
$[6] = t1;
|
|
411
|
+
$[7] = t2;
|
|
412
|
+
} else t2 = $[7];
|
|
413
|
+
return t2;
|
|
414
|
+
}
|
|
415
|
+
/** A row in the list, shared by the item, the select-all and the create options. */
|
|
416
|
+
const itemClasses = "list-row in-data-[presentation=sheet]:py-2.5";
|
|
417
|
+
function ComboboxItem(t0) {
|
|
418
|
+
const $ = c(8);
|
|
419
|
+
let className;
|
|
420
|
+
let props;
|
|
421
|
+
if ($[0] !== t0) {
|
|
422
|
+
({className, ...props} = t0);
|
|
423
|
+
$[0] = t0;
|
|
424
|
+
$[1] = className;
|
|
425
|
+
$[2] = props;
|
|
426
|
+
} else {
|
|
427
|
+
className = $[1];
|
|
428
|
+
props = $[2];
|
|
429
|
+
}
|
|
430
|
+
let t1;
|
|
431
|
+
if ($[3] !== className) {
|
|
432
|
+
t1 = cnState([itemClasses, "pe-8 in-data-has-icons:not-data-has-icon:ps-8"], className);
|
|
433
|
+
$[3] = className;
|
|
434
|
+
$[4] = t1;
|
|
435
|
+
} else t1 = $[4];
|
|
436
|
+
let t2;
|
|
437
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
438
|
+
t2 = /* @__PURE__ */ jsx(ComboboxItem$1, {
|
|
439
|
+
className: t1,
|
|
440
|
+
...props
|
|
441
|
+
});
|
|
442
|
+
$[5] = props;
|
|
443
|
+
$[6] = t1;
|
|
444
|
+
$[7] = t2;
|
|
445
|
+
} else t2 = $[7];
|
|
446
|
+
return t2;
|
|
447
|
+
}
|
|
448
|
+
function ComboboxItemText(t0) {
|
|
449
|
+
const $ = c(8);
|
|
450
|
+
let className;
|
|
451
|
+
let props;
|
|
452
|
+
if ($[0] !== t0) {
|
|
453
|
+
({className, ...props} = t0);
|
|
454
|
+
$[0] = t0;
|
|
455
|
+
$[1] = className;
|
|
456
|
+
$[2] = props;
|
|
457
|
+
} else {
|
|
458
|
+
className = $[1];
|
|
459
|
+
props = $[2];
|
|
460
|
+
}
|
|
461
|
+
let t1;
|
|
462
|
+
if ($[3] !== className) {
|
|
463
|
+
t1 = cnState("min-w-0 [&_mark]:bg-transparent [&_mark]:font-semibold [&_mark]:text-inherit", className);
|
|
464
|
+
$[3] = className;
|
|
465
|
+
$[4] = t1;
|
|
466
|
+
} else t1 = $[4];
|
|
467
|
+
let t2;
|
|
468
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
469
|
+
t2 = /* @__PURE__ */ jsx(ComboboxItemText$1, {
|
|
470
|
+
className: t1,
|
|
471
|
+
...props
|
|
472
|
+
});
|
|
473
|
+
$[5] = props;
|
|
474
|
+
$[6] = t1;
|
|
475
|
+
$[7] = t2;
|
|
476
|
+
} else t2 = $[7];
|
|
477
|
+
return t2;
|
|
478
|
+
}
|
|
479
|
+
/** Without children it shows a check. */
|
|
480
|
+
const ComboboxItemIndicator = Object.assign(function ComboboxItemIndicator({ className, children = /* @__PURE__ */ jsx(Icon, { icon: Tick02Icon }), ...props }) {
|
|
481
|
+
return /* @__PURE__ */ jsx(ComboboxItemIndicator$1, {
|
|
482
|
+
className: cnState("pointer-events-none absolute end-2 flex size-4 items-center justify-center not-data-selected:invisible", className),
|
|
483
|
+
...props,
|
|
484
|
+
children
|
|
485
|
+
});
|
|
486
|
+
}, notLabel);
|
|
487
|
+
const ComboboxItemIcon = Object.assign(function ComboboxItemIcon({ className, ...props }) {
|
|
488
|
+
return /* @__PURE__ */ jsx(ComboboxItemIcon$1, {
|
|
489
|
+
className: cnState("flex size-4 shrink-0 items-center justify-center text-muted-foreground", className),
|
|
490
|
+
...props
|
|
491
|
+
});
|
|
492
|
+
}, notLabel);
|
|
493
|
+
function ComboboxSelectAll(t0) {
|
|
494
|
+
const $ = c(8);
|
|
495
|
+
let className;
|
|
496
|
+
let props;
|
|
497
|
+
if ($[0] !== t0) {
|
|
498
|
+
({className, ...props} = t0);
|
|
499
|
+
$[0] = t0;
|
|
500
|
+
$[1] = className;
|
|
501
|
+
$[2] = props;
|
|
502
|
+
} else {
|
|
503
|
+
className = $[1];
|
|
504
|
+
props = $[2];
|
|
505
|
+
}
|
|
506
|
+
let t1;
|
|
507
|
+
if ($[3] !== className) {
|
|
508
|
+
t1 = cnState([itemClasses, "justify-between pe-2"], className);
|
|
509
|
+
$[3] = className;
|
|
510
|
+
$[4] = t1;
|
|
511
|
+
} else t1 = $[4];
|
|
512
|
+
let t2;
|
|
513
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
514
|
+
t2 = /* @__PURE__ */ jsx(ComboboxSelectAll$1, {
|
|
515
|
+
className: t1,
|
|
516
|
+
...props
|
|
517
|
+
});
|
|
518
|
+
$[5] = props;
|
|
519
|
+
$[6] = t1;
|
|
520
|
+
$[7] = t2;
|
|
521
|
+
} else t2 = $[7];
|
|
522
|
+
return t2;
|
|
523
|
+
}
|
|
524
|
+
function ComboboxCreate(t0) {
|
|
525
|
+
const $ = c(8);
|
|
526
|
+
let className;
|
|
527
|
+
let props;
|
|
528
|
+
if ($[0] !== t0) {
|
|
529
|
+
({className, ...props} = t0);
|
|
530
|
+
$[0] = t0;
|
|
531
|
+
$[1] = className;
|
|
532
|
+
$[2] = props;
|
|
533
|
+
} else {
|
|
534
|
+
className = $[1];
|
|
535
|
+
props = $[2];
|
|
536
|
+
}
|
|
537
|
+
let t1;
|
|
538
|
+
if ($[3] !== className) {
|
|
539
|
+
t1 = cnState([itemClasses, "data-pending:cursor-progress"], className);
|
|
540
|
+
$[3] = className;
|
|
541
|
+
$[4] = t1;
|
|
542
|
+
} else t1 = $[4];
|
|
543
|
+
let t2;
|
|
544
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
545
|
+
t2 = /* @__PURE__ */ jsx(ComboboxCreate$1, {
|
|
546
|
+
className: t1,
|
|
547
|
+
...props
|
|
548
|
+
});
|
|
549
|
+
$[5] = props;
|
|
550
|
+
$[6] = t1;
|
|
551
|
+
$[7] = t2;
|
|
552
|
+
} else t2 = $[7];
|
|
553
|
+
return t2;
|
|
554
|
+
}
|
|
555
|
+
function ComboboxGroup(t0) {
|
|
556
|
+
const $ = c(8);
|
|
557
|
+
let className;
|
|
558
|
+
let props;
|
|
559
|
+
if ($[0] !== t0) {
|
|
560
|
+
({className, ...props} = t0);
|
|
561
|
+
$[0] = t0;
|
|
562
|
+
$[1] = className;
|
|
563
|
+
$[2] = props;
|
|
564
|
+
} else {
|
|
565
|
+
className = $[1];
|
|
566
|
+
props = $[2];
|
|
567
|
+
}
|
|
568
|
+
let t1;
|
|
569
|
+
if ($[3] !== className) {
|
|
570
|
+
t1 = cnState("flex shrink-0 flex-col", className);
|
|
571
|
+
$[3] = className;
|
|
572
|
+
$[4] = t1;
|
|
573
|
+
} else t1 = $[4];
|
|
574
|
+
let t2;
|
|
575
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
576
|
+
t2 = /* @__PURE__ */ jsx(ComboboxGroup$1, {
|
|
577
|
+
className: t1,
|
|
578
|
+
...props
|
|
579
|
+
});
|
|
580
|
+
$[5] = props;
|
|
581
|
+
$[6] = t1;
|
|
582
|
+
$[7] = t2;
|
|
583
|
+
} else t2 = $[7];
|
|
584
|
+
return t2;
|
|
585
|
+
}
|
|
586
|
+
function ComboboxGroupLabel(t0) {
|
|
587
|
+
const $ = c(8);
|
|
588
|
+
let className;
|
|
589
|
+
let props;
|
|
590
|
+
if ($[0] !== t0) {
|
|
591
|
+
({className, ...props} = t0);
|
|
592
|
+
$[0] = t0;
|
|
593
|
+
$[1] = className;
|
|
594
|
+
$[2] = props;
|
|
595
|
+
} else {
|
|
596
|
+
className = $[1];
|
|
597
|
+
props = $[2];
|
|
598
|
+
}
|
|
599
|
+
let t1;
|
|
600
|
+
if ($[3] !== className) {
|
|
601
|
+
t1 = cnState("px-2 py-1.5 text-xs text-muted-foreground", className);
|
|
602
|
+
$[3] = className;
|
|
603
|
+
$[4] = t1;
|
|
604
|
+
} else t1 = $[4];
|
|
605
|
+
let t2;
|
|
606
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
607
|
+
t2 = /* @__PURE__ */ jsx(ComboboxGroupLabel$1, {
|
|
608
|
+
className: t1,
|
|
609
|
+
...props
|
|
610
|
+
});
|
|
611
|
+
$[5] = props;
|
|
612
|
+
$[6] = t1;
|
|
613
|
+
$[7] = t2;
|
|
614
|
+
} else t2 = $[7];
|
|
615
|
+
return t2;
|
|
616
|
+
}
|
|
617
|
+
function ComboboxSeparator(t0) {
|
|
618
|
+
const $ = c(8);
|
|
619
|
+
let className;
|
|
620
|
+
let props;
|
|
621
|
+
if ($[0] !== t0) {
|
|
622
|
+
({className, ...props} = t0);
|
|
623
|
+
$[0] = t0;
|
|
624
|
+
$[1] = className;
|
|
625
|
+
$[2] = props;
|
|
626
|
+
} else {
|
|
627
|
+
className = $[1];
|
|
628
|
+
props = $[2];
|
|
629
|
+
}
|
|
630
|
+
let t1;
|
|
631
|
+
if ($[3] !== className) {
|
|
632
|
+
t1 = cnState("pointer-events-none -mx-1 my-1 h-px shrink-0 bg-border", className);
|
|
633
|
+
$[3] = className;
|
|
634
|
+
$[4] = t1;
|
|
635
|
+
} else t1 = $[4];
|
|
636
|
+
let t2;
|
|
637
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
638
|
+
t2 = /* @__PURE__ */ jsx(ComboboxSeparator$1, {
|
|
639
|
+
className: t1,
|
|
640
|
+
...props
|
|
641
|
+
});
|
|
642
|
+
$[5] = props;
|
|
643
|
+
$[6] = t1;
|
|
644
|
+
$[7] = t2;
|
|
645
|
+
} else t2 = $[7];
|
|
646
|
+
return t2;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Give the content a `sideOffset` that leaves room for it. The content stops
|
|
650
|
+
* clipping while it holds an arrow; the list inside still scrolls.
|
|
651
|
+
*/
|
|
652
|
+
function ComboboxArrow(t0) {
|
|
653
|
+
const $ = c(8);
|
|
654
|
+
let className;
|
|
655
|
+
let props;
|
|
656
|
+
if ($[0] !== t0) {
|
|
657
|
+
({className, ...props} = t0);
|
|
658
|
+
$[0] = t0;
|
|
659
|
+
$[1] = className;
|
|
660
|
+
$[2] = props;
|
|
661
|
+
} else {
|
|
662
|
+
className = $[1];
|
|
663
|
+
props = $[2];
|
|
664
|
+
}
|
|
665
|
+
let t1;
|
|
666
|
+
if ($[3] !== className) {
|
|
667
|
+
t1 = cnState("popup-arrow", className);
|
|
668
|
+
$[3] = className;
|
|
669
|
+
$[4] = t1;
|
|
670
|
+
} else t1 = $[4];
|
|
671
|
+
let t2;
|
|
672
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
673
|
+
t2 = /* @__PURE__ */ jsx(ComboboxArrow$1, {
|
|
674
|
+
className: t1,
|
|
675
|
+
...props
|
|
676
|
+
});
|
|
677
|
+
$[5] = props;
|
|
678
|
+
$[6] = t1;
|
|
679
|
+
$[7] = t2;
|
|
680
|
+
} else t2 = $[7];
|
|
681
|
+
return t2;
|
|
682
|
+
}
|
|
683
|
+
export { Combobox, ComboboxArrow, ComboboxChip, ComboboxChipRemove, ComboboxChips, ComboboxChipsOverflow, ComboboxClear, ComboboxContent, ComboboxCreate, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxItemIcon, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxSelectAll, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, ComboboxValueIcon, createComboboxController };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { CommandData, CommandDataGroup, CommandDataItem, CommandEmpty as CommandEmpty$1, CommandGroup as CommandGroup$1, CommandGroupLabel as CommandGroupLabel$1, CommandInput as CommandInput$1, CommandItem as CommandItem$1, CommandItemIcon as CommandItemIcon$1, CommandItemText as CommandItemText$1, CommandList as CommandList$1, CommandPage as CommandPage$1, CommandProps, CommandSeparator as CommandSeparator$1, CommandShortcut as CommandShortcut$1, CommandStatus as CommandStatus$1, createCommandController } from "@ui-sdk/react/command";
|
|
3
|
+
declare function Command({ className, ...props }: CommandProps): import("react").JSX.Element;
|
|
4
|
+
/** Looks like abby's `Input`. Name it with `aria-label`. */
|
|
5
|
+
declare function CommandInput({ className, ...props }: ComponentProps<typeof CommandInput$1>): import("react").JSX.Element;
|
|
6
|
+
declare function CommandStatus({ className, ...props }: ComponentProps<typeof CommandStatus$1>): import("react").JSX.Element;
|
|
7
|
+
declare function CommandEmpty({ className, ...props }: ComponentProps<typeof CommandEmpty$1>): import("react").JSX.Element;
|
|
8
|
+
/** Without children it renders the command's `items`, ranked as the user types. */
|
|
9
|
+
declare function CommandList({ className, children, ...props }: ComponentProps<typeof CommandList$1>): import("react").JSX.Element;
|
|
10
|
+
declare function CommandPage(props: ComponentProps<typeof CommandPage$1>): import("react").JSX.Element;
|
|
11
|
+
declare function CommandGroup({ className, ...props }: ComponentProps<typeof CommandGroup$1>): import("react").JSX.Element;
|
|
12
|
+
declare function CommandGroupLabel({ className, ...props }: ComponentProps<typeof CommandGroupLabel$1>): import("react").JSX.Element;
|
|
13
|
+
type CommandItemProps = ComponentProps<typeof CommandItem$1>;
|
|
14
|
+
declare function CommandItem({ className, ...props }: CommandItemProps): import("react").JSX.Element;
|
|
15
|
+
declare const CommandItemIcon: (({ className, ...props }: ComponentProps<typeof CommandItemIcon$1>) => import("react").JSX.Element) & {
|
|
16
|
+
[x: symbol]: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare function CommandItemText({ className, ...props }: ComponentProps<typeof CommandItemText$1>): import("react").JSX.Element;
|
|
19
|
+
declare const CommandShortcut: (({ className, ...props }: ComponentProps<typeof CommandShortcut$1>) => import("react").JSX.Element) & {
|
|
20
|
+
[x: symbol]: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare function CommandSeparator({ className, ...props }: ComponentProps<typeof CommandSeparator$1>): import("react").JSX.Element;
|
|
23
|
+
export { Command, type CommandData, type CommandDataGroup, type CommandDataItem, CommandEmpty, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandItemIcon, type CommandItemProps, CommandItemText, CommandList, CommandPage, type CommandProps, CommandSeparator, CommandShortcut, CommandStatus, createCommandController };
|