@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,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/kbd/kbd.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A key, or a shortcut's text from `useShortcutHint`. Inside a control it
|
|
8
|
+
* takes `aria-hidden`, and the control takes `aria-keyshortcuts`.
|
|
9
|
+
*/
|
|
10
|
+
function Kbd(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("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-footnote font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background [&_svg]:size-3", className);
|
|
26
|
+
$[3] = className;
|
|
27
|
+
$[4] = t1;
|
|
28
|
+
} else t1 = $[4];
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
+
t2 = /* @__PURE__ */ jsx("kbd", {
|
|
32
|
+
"data-slot": "kbd",
|
|
33
|
+
className: t1,
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
$[5] = props;
|
|
37
|
+
$[6] = t1;
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else t2 = $[7];
|
|
40
|
+
return t2;
|
|
41
|
+
}
|
|
42
|
+
/** Keys pressed together or in a row: a `<kbd>` around each key's own `<kbd>`, as HTML asks. */
|
|
43
|
+
function KbdGroup(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("inline-flex items-center gap-1", className);
|
|
59
|
+
$[3] = className;
|
|
60
|
+
$[4] = t1;
|
|
61
|
+
} else t1 = $[4];
|
|
62
|
+
let t2;
|
|
63
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
64
|
+
t2 = /* @__PURE__ */ jsx("kbd", {
|
|
65
|
+
"data-slot": "kbd-group",
|
|
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 { Kbd, KbdGroup };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Label as Label$1 } from "@ui-sdk/react/label";
|
|
3
|
+
declare const labelClasses = "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-disabled:pointer-events-none group-data-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
|
|
4
|
+
/** Names a control by its `htmlFor`. Inside a `Field`, use `FieldLabel`. */
|
|
5
|
+
declare function Label({ className, ...props }: ComponentProps<typeof Label$1>): import("react").JSX.Element;
|
|
6
|
+
export { Label, labelClasses };
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { Label as Label$1 } from "@ui-sdk/react/label";
|
|
6
|
+
// src/components/label/label.tsx
|
|
7
|
+
const labelClasses = "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-disabled:pointer-events-none group-data-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
|
|
8
|
+
/** Names a control by its `htmlFor`. Inside a `Field`, use `FieldLabel`. */
|
|
9
|
+
function Label(t0) {
|
|
10
|
+
const $ = c(8);
|
|
11
|
+
let className;
|
|
12
|
+
let props;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = className;
|
|
17
|
+
$[2] = props;
|
|
18
|
+
} else {
|
|
19
|
+
className = $[1];
|
|
20
|
+
props = $[2];
|
|
21
|
+
}
|
|
22
|
+
let t1;
|
|
23
|
+
if ($[3] !== className) {
|
|
24
|
+
t1 = cnState(labelClasses, className);
|
|
25
|
+
$[3] = className;
|
|
26
|
+
$[4] = t1;
|
|
27
|
+
} else t1 = $[4];
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
30
|
+
t2 = /* @__PURE__ */ jsx(Label$1, {
|
|
31
|
+
className: t1,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
$[5] = props;
|
|
35
|
+
$[6] = t1;
|
|
36
|
+
$[7] = t2;
|
|
37
|
+
} else t2 = $[7];
|
|
38
|
+
return t2;
|
|
39
|
+
}
|
|
40
|
+
export { Label, labelClasses };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { index_d_exports } from "../../core/index.js";
|
|
2
|
+
import { ButtonLook } from "../button/button.js";
|
|
3
|
+
type LinkPartProps = index_d_exports.PartProps<"a"> & {
|
|
4
|
+
/** The link goes nowhere, leaves the tab order, and an agent can't follow it. */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The link with no look of its own, for a part of another component that is
|
|
9
|
+
* a link: a sidebar's row, a source. It takes that part's `data-slot` and
|
|
10
|
+
* classes.
|
|
11
|
+
*/
|
|
12
|
+
declare function LinkPart({ disabled, ...props }: LinkPartProps): import("react").JSX.Element | null;
|
|
13
|
+
type LinkProps = LinkPartProps & ButtonLook;
|
|
14
|
+
/**
|
|
15
|
+
* A link. An agent finds it by its text and follows it with `follow`. For a
|
|
16
|
+
* router's link, pass it to `render`: `render={<RouterLink to="/projects" />}`.
|
|
17
|
+
* With a `variant` or a `size` it looks like a `Button`: use it instead of a
|
|
18
|
+
* `Button` rendered as a link, which an agent can't press.
|
|
19
|
+
*/
|
|
20
|
+
declare function Link({ variant, size, className, ...props }: LinkProps): import("react").JSX.Element;
|
|
21
|
+
export { Link, LinkPart, type LinkPartProps, type LinkProps };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { definePrimitive } from "../../core/ui-sdk.js";
|
|
3
|
+
import { core_exports } from "../../core/index.js";
|
|
4
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
5
|
+
import { buttonLook } from "../button/button.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
// src/components/link/link.tsx
|
|
9
|
+
const link = definePrimitive({
|
|
10
|
+
name: "link",
|
|
11
|
+
options: { disabled: "boolean" },
|
|
12
|
+
state: (options) => ({ disabled: options.disabled ?? false }),
|
|
13
|
+
sync: (options) => ({ disabled: options.disabled ?? false }),
|
|
14
|
+
api: (context) => ({
|
|
15
|
+
/** Follows the link as a click does, so the app's router and handlers see it. */
|
|
16
|
+
follow: () => {
|
|
17
|
+
if (!context.store.get().disabled) context.element("root")?.click();
|
|
18
|
+
},
|
|
19
|
+
/** A disabled link goes nowhere. */
|
|
20
|
+
block: (event) => {
|
|
21
|
+
if (context.store.get().disabled) event.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
slots: (slot) => ({ root: slot({
|
|
25
|
+
props: { slot: "string" },
|
|
26
|
+
attrs: (state, part) => ({
|
|
27
|
+
"data-slot": part.props.slot ?? "link",
|
|
28
|
+
...state.disabled ? {
|
|
29
|
+
"aria-disabled": "true",
|
|
30
|
+
"data-disabled": "",
|
|
31
|
+
tabindex: "-1"
|
|
32
|
+
} : void 0
|
|
33
|
+
}),
|
|
34
|
+
on: { click: (event, { api }) => api.block(event) }
|
|
35
|
+
}) }),
|
|
36
|
+
agent: { actions: ["follow"] }
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* The link with no look of its own, for a part of another component that is
|
|
40
|
+
* a link: a sidebar's row, a source. It takes that part's `data-slot` and
|
|
41
|
+
* classes.
|
|
42
|
+
*/
|
|
43
|
+
function LinkPart(t0) {
|
|
44
|
+
const $ = c(7);
|
|
45
|
+
let disabled;
|
|
46
|
+
let props;
|
|
47
|
+
if ($[0] !== t0) {
|
|
48
|
+
({disabled, ...props} = t0);
|
|
49
|
+
$[0] = t0;
|
|
50
|
+
$[1] = disabled;
|
|
51
|
+
$[2] = props;
|
|
52
|
+
} else {
|
|
53
|
+
disabled = $[1];
|
|
54
|
+
props = $[2];
|
|
55
|
+
}
|
|
56
|
+
let t1;
|
|
57
|
+
if ($[3] !== disabled) {
|
|
58
|
+
t1 = { disabled };
|
|
59
|
+
$[3] = disabled;
|
|
60
|
+
$[4] = t1;
|
|
61
|
+
} else t1 = $[4];
|
|
62
|
+
const handle = (0, core_exports.usePrimitive)(link, t1);
|
|
63
|
+
const slot = props["data-slot"];
|
|
64
|
+
let t2;
|
|
65
|
+
if ($[5] !== slot) {
|
|
66
|
+
t2 = { slot };
|
|
67
|
+
$[5] = slot;
|
|
68
|
+
$[6] = t2;
|
|
69
|
+
} else t2 = $[6];
|
|
70
|
+
return (0, core_exports.usePart)(handle, "root", t2, props, "a");
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A link. An agent finds it by its text and follows it with `follow`. For a
|
|
74
|
+
* router's link, pass it to `render`: `render={<RouterLink to="/projects" />}`.
|
|
75
|
+
* With a `variant` or a `size` it looks like a `Button`: use it instead of a
|
|
76
|
+
* `Button` rendered as a link, which an agent can't press.
|
|
77
|
+
*/
|
|
78
|
+
function Link(t0) {
|
|
79
|
+
const $ = c(14);
|
|
80
|
+
let className;
|
|
81
|
+
let props;
|
|
82
|
+
let size;
|
|
83
|
+
let variant;
|
|
84
|
+
if ($[0] !== t0) {
|
|
85
|
+
({variant, size, className, ...props} = t0);
|
|
86
|
+
$[0] = t0;
|
|
87
|
+
$[1] = className;
|
|
88
|
+
$[2] = props;
|
|
89
|
+
$[3] = size;
|
|
90
|
+
$[4] = variant;
|
|
91
|
+
} else {
|
|
92
|
+
className = $[1];
|
|
93
|
+
props = $[2];
|
|
94
|
+
size = $[3];
|
|
95
|
+
variant = $[4];
|
|
96
|
+
}
|
|
97
|
+
const t1 = variant ?? void 0;
|
|
98
|
+
const t2 = size ?? void 0;
|
|
99
|
+
let t3;
|
|
100
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
101
|
+
t3 = cnState(buttonLook({
|
|
102
|
+
variant,
|
|
103
|
+
size
|
|
104
|
+
}) ?? "rounded-sm font-medium text-link underline decoration-link/40 underline-offset-4 transition-colors hover:decoration-link focus-ring data-disabled:pointer-events-none data-disabled:opacity-50", className);
|
|
105
|
+
$[5] = className;
|
|
106
|
+
$[6] = size;
|
|
107
|
+
$[7] = variant;
|
|
108
|
+
$[8] = t3;
|
|
109
|
+
} else t3 = $[8];
|
|
110
|
+
let t4;
|
|
111
|
+
if ($[9] !== props || $[10] !== t1 || $[11] !== t2 || $[12] !== t3) {
|
|
112
|
+
t4 = /* @__PURE__ */ jsx(LinkPart, {
|
|
113
|
+
"data-variant": t1,
|
|
114
|
+
"data-size": t2,
|
|
115
|
+
className: t3,
|
|
116
|
+
...props
|
|
117
|
+
});
|
|
118
|
+
$[9] = props;
|
|
119
|
+
$[10] = t1;
|
|
120
|
+
$[11] = t2;
|
|
121
|
+
$[12] = t3;
|
|
122
|
+
$[13] = t4;
|
|
123
|
+
} else t4 = $[13];
|
|
124
|
+
return t4;
|
|
125
|
+
}
|
|
126
|
+
export { Link, LinkPart };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { ListData, ListboxController, ListboxGroup as ListboxGroup$1, ListboxGroupLabel as ListboxGroupLabel$1, ListboxItem as ListboxItem$1, ListboxItemIcon as ListboxItemIcon$1, ListboxItemIndicator as ListboxItemIndicator$1, ListboxProps, ListboxSeparator as ListboxSeparator$1, createListboxController } from "@ui-sdk/react/listbox";
|
|
3
|
+
/**
|
|
4
|
+
* A bordered list. Give it a `max-h-*` to make a long one scroll. Without
|
|
5
|
+
* children it renders its `items`, each with its check.
|
|
6
|
+
*/
|
|
7
|
+
declare function Listbox<T = string, Multiple extends boolean | undefined = false>(props: ListboxProps<T, Multiple>): import("react").JSX.Element;
|
|
8
|
+
type ListboxItemProps<T = string> = Parameters<typeof ListboxItem$1<T>>[0];
|
|
9
|
+
declare function ListboxItem<T = string>({ className, ...props }: ListboxItemProps<T>): import("react").JSX.Element;
|
|
10
|
+
/** Without children it shows a check. */
|
|
11
|
+
declare const ListboxItemIndicator: (({ className, children, ...props }: ComponentProps<typeof ListboxItemIndicator$1>) => import("react").JSX.Element) & {
|
|
12
|
+
[x: symbol]: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const ListboxItemIcon: (({ className, ...props }: ComponentProps<typeof ListboxItemIcon$1>) => import("react").JSX.Element) & {
|
|
15
|
+
[x: symbol]: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function ListboxGroup({ className, ...props }: ComponentProps<typeof ListboxGroup$1>): import("react").JSX.Element;
|
|
18
|
+
declare function ListboxGroupLabel({ className, ...props }: ComponentProps<typeof ListboxGroupLabel$1>): import("react").JSX.Element;
|
|
19
|
+
declare function ListboxSeparator({ className, ...props }: ComponentProps<typeof ListboxSeparator$1>): import("react").JSX.Element;
|
|
20
|
+
export { type ListData, Listbox, type ListboxController, ListboxGroup, ListboxGroupLabel, ListboxItem, ListboxItemIcon, ListboxItemIndicator, type ListboxItemProps, type ListboxProps, ListboxSeparator, createListboxController };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { notLabel } from "../not-label.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Tick02Icon } from "@hugeicons/core-free-icons";
|
|
8
|
+
import { Listbox as Listbox$1, ListboxGroup as ListboxGroup$1, ListboxGroupLabel as ListboxGroupLabel$1, ListboxItem as ListboxItem$1, ListboxItemIcon as ListboxItemIcon$1, ListboxItemIndicator as ListboxItemIndicator$1, ListboxSeparator as ListboxSeparator$1, createListboxController } from "@ui-sdk/react/listbox";
|
|
9
|
+
// src/components/listbox/listbox.tsx
|
|
10
|
+
/** The listbox's `items`, as styled parts. */
|
|
11
|
+
function dataItems(items) {
|
|
12
|
+
return items.map((entry, index) => {
|
|
13
|
+
if (typeof entry === "string") return /* @__PURE__ */ jsxs(ListboxItem, {
|
|
14
|
+
value: entry,
|
|
15
|
+
children: [entry, /* @__PURE__ */ jsx(ListboxItemIndicator, {})]
|
|
16
|
+
}, `item-${entry}`);
|
|
17
|
+
if ("type" in entry && entry.type === "separator") return /* @__PURE__ */ jsx(ListboxSeparator, {}, `separator-${index}`);
|
|
18
|
+
if ("type" in entry && entry.type === "group") return /* @__PURE__ */ jsxs(ListboxGroup, { children: [entry.label && /* @__PURE__ */ jsx(ListboxGroupLabel, { children: entry.label }), dataItems(entry.items)] }, `group-${entry.label ?? index}`);
|
|
19
|
+
const { value, label, disabled } = entry;
|
|
20
|
+
return /* @__PURE__ */ jsxs(ListboxItem, {
|
|
21
|
+
value,
|
|
22
|
+
label,
|
|
23
|
+
disabled,
|
|
24
|
+
children: [label, /* @__PURE__ */ jsx(ListboxItemIndicator, {})]
|
|
25
|
+
}, typeof value === "string" ? `item-${value}` : `item-${label}`);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** What a listbox with no children shows: its `items`. */
|
|
29
|
+
const dataChildren = (state) => state.items.length > 0 ? dataItems(state.items) : null;
|
|
30
|
+
/**
|
|
31
|
+
* A bordered list. Give it a `max-h-*` to make a long one scroll. Without
|
|
32
|
+
* children it renders its `items`, each with its check.
|
|
33
|
+
*/
|
|
34
|
+
function Listbox(props) {
|
|
35
|
+
const $ = c(6);
|
|
36
|
+
let t0;
|
|
37
|
+
if ($[0] !== props.className) {
|
|
38
|
+
t0 = cnState("flex w-full flex-col gap-0.5 overflow-y-auto rounded-xl border border-input p-1 text-sm outline-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[orientation=horizontal]:w-fit data-[orientation=horizontal]:max-w-full data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:overflow-x-auto aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20", props.className);
|
|
39
|
+
$[0] = props.className;
|
|
40
|
+
$[1] = t0;
|
|
41
|
+
} else t0 = $[1];
|
|
42
|
+
const t1 = props.children ?? dataChildren;
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[2] !== props || $[3] !== t0 || $[4] !== t1) {
|
|
45
|
+
t2 = /* @__PURE__ */ jsx(Listbox$1, {
|
|
46
|
+
...props,
|
|
47
|
+
className: t0,
|
|
48
|
+
children: t1
|
|
49
|
+
});
|
|
50
|
+
$[2] = props;
|
|
51
|
+
$[3] = t0;
|
|
52
|
+
$[4] = t1;
|
|
53
|
+
$[5] = t2;
|
|
54
|
+
} else t2 = $[5];
|
|
55
|
+
return t2;
|
|
56
|
+
}
|
|
57
|
+
function ListboxItem(t0) {
|
|
58
|
+
const $ = c(8);
|
|
59
|
+
let className;
|
|
60
|
+
let props;
|
|
61
|
+
if ($[0] !== t0) {
|
|
62
|
+
({className, ...props} = t0);
|
|
63
|
+
$[0] = t0;
|
|
64
|
+
$[1] = className;
|
|
65
|
+
$[2] = props;
|
|
66
|
+
} else {
|
|
67
|
+
className = $[1];
|
|
68
|
+
props = $[2];
|
|
69
|
+
}
|
|
70
|
+
let t1;
|
|
71
|
+
if ($[3] !== className) {
|
|
72
|
+
t1 = cnState([
|
|
73
|
+
"list-row data-selected:bg-accent data-selected:font-medium data-selected:text-accent-foreground",
|
|
74
|
+
"has-data-[slot=listbox-item-indicator]:pe-8 in-data-has-icons:not-data-has-icon:ps-8",
|
|
75
|
+
"in-data-[orientation=horizontal]:w-auto in-data-[orientation=horizontal]:justify-center"
|
|
76
|
+
], className);
|
|
77
|
+
$[3] = className;
|
|
78
|
+
$[4] = t1;
|
|
79
|
+
} else t1 = $[4];
|
|
80
|
+
let t2;
|
|
81
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
82
|
+
t2 = /* @__PURE__ */ jsx(ListboxItem$1, {
|
|
83
|
+
className: t1,
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
$[5] = props;
|
|
87
|
+
$[6] = t1;
|
|
88
|
+
$[7] = t2;
|
|
89
|
+
} else t2 = $[7];
|
|
90
|
+
return t2;
|
|
91
|
+
}
|
|
92
|
+
/** Without children it shows a check. */
|
|
93
|
+
const ListboxItemIndicator = Object.assign(function ListboxItemIndicator({ className, children = /* @__PURE__ */ jsx(Icon, { icon: Tick02Icon }), ...props }) {
|
|
94
|
+
return /* @__PURE__ */ jsx(ListboxItemIndicator$1, {
|
|
95
|
+
className: cnState("pointer-events-none absolute end-2 flex size-4 items-center justify-center not-data-selected:invisible", className),
|
|
96
|
+
...props,
|
|
97
|
+
children
|
|
98
|
+
});
|
|
99
|
+
}, notLabel);
|
|
100
|
+
const ListboxItemIcon = Object.assign(function ListboxItemIcon({ className, ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsx(ListboxItemIcon$1, {
|
|
102
|
+
className: cnState("flex size-4 shrink-0 items-center justify-center text-muted-foreground", className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
}, notLabel);
|
|
106
|
+
function ListboxGroup(t0) {
|
|
107
|
+
const $ = c(8);
|
|
108
|
+
let className;
|
|
109
|
+
let props;
|
|
110
|
+
if ($[0] !== t0) {
|
|
111
|
+
({className, ...props} = t0);
|
|
112
|
+
$[0] = t0;
|
|
113
|
+
$[1] = className;
|
|
114
|
+
$[2] = props;
|
|
115
|
+
} else {
|
|
116
|
+
className = $[1];
|
|
117
|
+
props = $[2];
|
|
118
|
+
}
|
|
119
|
+
let t1;
|
|
120
|
+
if ($[3] !== className) {
|
|
121
|
+
t1 = cnState("flex shrink-0 flex-col gap-0.5", className);
|
|
122
|
+
$[3] = className;
|
|
123
|
+
$[4] = t1;
|
|
124
|
+
} else t1 = $[4];
|
|
125
|
+
let t2;
|
|
126
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
127
|
+
t2 = /* @__PURE__ */ jsx(ListboxGroup$1, {
|
|
128
|
+
className: t1,
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
$[5] = props;
|
|
132
|
+
$[6] = t1;
|
|
133
|
+
$[7] = t2;
|
|
134
|
+
} else t2 = $[7];
|
|
135
|
+
return t2;
|
|
136
|
+
}
|
|
137
|
+
function ListboxGroupLabel(t0) {
|
|
138
|
+
const $ = c(8);
|
|
139
|
+
let className;
|
|
140
|
+
let props;
|
|
141
|
+
if ($[0] !== t0) {
|
|
142
|
+
({className, ...props} = t0);
|
|
143
|
+
$[0] = t0;
|
|
144
|
+
$[1] = className;
|
|
145
|
+
$[2] = props;
|
|
146
|
+
} else {
|
|
147
|
+
className = $[1];
|
|
148
|
+
props = $[2];
|
|
149
|
+
}
|
|
150
|
+
let t1;
|
|
151
|
+
if ($[3] !== className) {
|
|
152
|
+
t1 = cnState("px-2 py-1.5 text-xs text-muted-foreground", className);
|
|
153
|
+
$[3] = className;
|
|
154
|
+
$[4] = t1;
|
|
155
|
+
} else t1 = $[4];
|
|
156
|
+
let t2;
|
|
157
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
158
|
+
t2 = /* @__PURE__ */ jsx(ListboxGroupLabel$1, {
|
|
159
|
+
className: t1,
|
|
160
|
+
...props
|
|
161
|
+
});
|
|
162
|
+
$[5] = props;
|
|
163
|
+
$[6] = t1;
|
|
164
|
+
$[7] = t2;
|
|
165
|
+
} else t2 = $[7];
|
|
166
|
+
return t2;
|
|
167
|
+
}
|
|
168
|
+
function ListboxSeparator(t0) {
|
|
169
|
+
const $ = c(8);
|
|
170
|
+
let className;
|
|
171
|
+
let props;
|
|
172
|
+
if ($[0] !== t0) {
|
|
173
|
+
({className, ...props} = t0);
|
|
174
|
+
$[0] = t0;
|
|
175
|
+
$[1] = className;
|
|
176
|
+
$[2] = props;
|
|
177
|
+
} else {
|
|
178
|
+
className = $[1];
|
|
179
|
+
props = $[2];
|
|
180
|
+
}
|
|
181
|
+
let t1;
|
|
182
|
+
if ($[3] !== className) {
|
|
183
|
+
t1 = cnState("pointer-events-none -mx-1 my-1 h-px shrink-0 bg-border", className);
|
|
184
|
+
$[3] = className;
|
|
185
|
+
$[4] = t1;
|
|
186
|
+
} else t1 = $[4];
|
|
187
|
+
let t2;
|
|
188
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
189
|
+
t2 = /* @__PURE__ */ jsx(ListboxSeparator$1, {
|
|
190
|
+
className: t1,
|
|
191
|
+
...props
|
|
192
|
+
});
|
|
193
|
+
$[5] = props;
|
|
194
|
+
$[6] = t1;
|
|
195
|
+
$[7] = t2;
|
|
196
|
+
} else t2 = $[7];
|
|
197
|
+
return t2;
|
|
198
|
+
}
|
|
199
|
+
export { Listbox, ListboxGroup, ListboxGroupLabel, ListboxItem, ListboxItemIcon, ListboxItemIndicator, ListboxSeparator, createListboxController };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { index_d_exports } from "../../core/index.js";
|
|
2
|
+
import { VariantProps } from "../../utilities/cn/index.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
declare const markerVariants: (props?: ({
|
|
5
|
+
variant?: "border" | "default" | "separator" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type MarkerProps = index_d_exports.PartProps<"div"> & VariantProps<typeof markerVariants>;
|
|
8
|
+
declare function Marker({ className, variant, render, ...props }: MarkerProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
declare function MarkerIcon({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
10
|
+
declare function MarkerContent({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
11
|
+
export { Marker, MarkerContent, MarkerIcon, type MarkerProps, markerVariants };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { core_exports } from "../../core/index.js";
|
|
3
|
+
import { cn, cnState, cva } from "../../utilities/cn/index.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
// src/components/marker/marker.tsx
|
|
7
|
+
const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-start text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground [a,button]:rounded-sm [a,button]:focus-ring", {
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "",
|
|
10
|
+
separator: "before:me-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ms-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
|
|
11
|
+
border: "border-b border-border pb-2"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { variant: "default" }
|
|
14
|
+
});
|
|
15
|
+
function Marker({ className, variant, render, ...props }) {
|
|
16
|
+
return (0, core_exports.renderElement)("div", {
|
|
17
|
+
"data-slot": "marker",
|
|
18
|
+
"data-variant": variant ?? "default",
|
|
19
|
+
...props,
|
|
20
|
+
className: cnState(markerVariants({ variant }), className)
|
|
21
|
+
}, render);
|
|
22
|
+
}
|
|
23
|
+
function MarkerIcon(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 = cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
|
|
39
|
+
$[3] = className;
|
|
40
|
+
$[4] = t1;
|
|
41
|
+
} else t1 = $[4];
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
44
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
45
|
+
"data-slot": "marker-icon",
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
className: t1,
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
$[5] = props;
|
|
51
|
+
$[6] = t1;
|
|
52
|
+
$[7] = t2;
|
|
53
|
+
} else t2 = $[7];
|
|
54
|
+
return t2;
|
|
55
|
+
}
|
|
56
|
+
function MarkerContent(t0) {
|
|
57
|
+
const $ = c(8);
|
|
58
|
+
let className;
|
|
59
|
+
let props;
|
|
60
|
+
if ($[0] !== t0) {
|
|
61
|
+
({className, ...props} = t0);
|
|
62
|
+
$[0] = t0;
|
|
63
|
+
$[1] = className;
|
|
64
|
+
$[2] = props;
|
|
65
|
+
} else {
|
|
66
|
+
className = $[1];
|
|
67
|
+
props = $[2];
|
|
68
|
+
}
|
|
69
|
+
let t1;
|
|
70
|
+
if ($[3] !== className) {
|
|
71
|
+
t1 = cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className);
|
|
72
|
+
$[3] = className;
|
|
73
|
+
$[4] = t1;
|
|
74
|
+
} else t1 = $[4];
|
|
75
|
+
let t2;
|
|
76
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
77
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
78
|
+
"data-slot": "marker-content",
|
|
79
|
+
className: t1,
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
$[5] = props;
|
|
83
|
+
$[6] = t1;
|
|
84
|
+
$[7] = t2;
|
|
85
|
+
} else t2 = $[7];
|
|
86
|
+
return t2;
|
|
87
|
+
}
|
|
88
|
+
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ButtonLook } from "../button/button.js";
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import { MenuActionDetails, MenuCheckboxItem as MenuCheckboxItem$1, MenuCheckedChangeDetails, MenuContent as MenuContent$1, MenuContextTrigger as MenuContextTrigger$1, MenuController, MenuData, MenuDataItem, MenuGroup as MenuGroup$1, MenuGroupLabel as MenuGroupLabel$1, MenuItem as MenuItem$1, MenuItemIcon as MenuItemIcon$1, MenuItemIndicator as MenuItemIndicator$1, MenuProps, MenuRadioGroup as MenuRadioGroup$1, MenuRadioItem as MenuRadioItem$1, MenuSeparator as MenuSeparator$1, MenuShortcut as MenuShortcut$1, MenuSubProps, MenuSubTrigger as MenuSubTrigger$1, MenuTrigger as MenuTrigger$1, MenuValueChangeDetails, createMenuController } from "@ui-sdk/react/menu";
|
|
4
|
+
declare function Menu({ items, ...props }: MenuProps): import("react").JSX.Element;
|
|
5
|
+
type MenuTriggerProps = ComponentProps<typeof MenuTrigger$1> & ButtonLook;
|
|
6
|
+
declare function MenuTrigger({ variant, size, className, ...props }: MenuTriggerProps): import("react").JSX.Element;
|
|
7
|
+
/** The area a right-click or a long press opens the menu from. Give it a `tabIndex` for the keyboard. */
|
|
8
|
+
declare function MenuContextTrigger({ className, ...props }: ComponentProps<typeof MenuContextTrigger$1>): import("react").JSX.Element;
|
|
9
|
+
type MenuContentProps<Payload = unknown> = Parameters<typeof MenuContent$1<Payload>>[0];
|
|
10
|
+
/** Without children it renders the menu's `items`, styled. */
|
|
11
|
+
declare function MenuContent<Payload = unknown>({ className, sideOffset, children, ...props }: MenuContentProps<Payload>): import("react").JSX.Element;
|
|
12
|
+
declare function MenuSub(props: MenuSubProps): import("react").JSX.Element;
|
|
13
|
+
/** End it with an `Icon` and it sits at the trigger's far edge. */
|
|
14
|
+
declare function MenuSubTrigger({ className, ...props }: ComponentProps<typeof MenuSubTrigger$1>): import("react").JSX.Element;
|
|
15
|
+
declare function MenuSubContent<Payload = unknown>({ className, ...props }: MenuContentProps<Payload>): import("react").JSX.Element;
|
|
16
|
+
declare function MenuItem({ className, ...props }: ComponentProps<typeof MenuItem$1>): import("react").JSX.Element;
|
|
17
|
+
declare function MenuCheckboxItem({ className, ...props }: ComponentProps<typeof MenuCheckboxItem$1>): import("react").JSX.Element;
|
|
18
|
+
type MenuRadioGroupProps<T extends string = string> = Parameters<typeof MenuRadioGroup$1<T>>[0];
|
|
19
|
+
declare function MenuRadioGroup<T extends string = string>({ className, ...props }: MenuRadioGroupProps<T>): import("react").JSX.Element;
|
|
20
|
+
declare function MenuRadioItem({ className, ...props }: ComponentProps<typeof MenuRadioItem$1>): import("react").JSX.Element;
|
|
21
|
+
/** Without children it shows a check. With `keepMounted` it keeps its place and hides while unchecked. */
|
|
22
|
+
declare const MenuItemIndicator: (({ className, children, ...props }: ComponentProps<typeof MenuItemIndicator$1>) => import("react").JSX.Element) & {
|
|
23
|
+
[x: symbol]: boolean;
|
|
24
|
+
};
|
|
25
|
+
declare const MenuItemIcon: (({ className, ...props }: ComponentProps<typeof MenuItemIcon$1>) => import("react").JSX.Element) & {
|
|
26
|
+
[x: symbol]: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const MenuShortcut: (({ className, ...props }: ComponentProps<typeof MenuShortcut$1>) => import("react").JSX.Element) & {
|
|
29
|
+
[x: symbol]: boolean;
|
|
30
|
+
};
|
|
31
|
+
declare function MenuGroup({ className, ...props }: ComponentProps<typeof MenuGroup$1>): import("react").JSX.Element;
|
|
32
|
+
declare function MenuGroupLabel({ className, ...props }: ComponentProps<typeof MenuGroupLabel$1>): import("react").JSX.Element;
|
|
33
|
+
declare function MenuSeparator({ className, ...props }: ComponentProps<typeof MenuSeparator$1>): import("react").JSX.Element;
|
|
34
|
+
/** Renders a data menu's `items` as styled parts, for a layout of your own. */
|
|
35
|
+
declare function MenuItems({ items }: {
|
|
36
|
+
items: MenuData;
|
|
37
|
+
}): ReactNode;
|
|
38
|
+
export { Menu, type MenuActionDetails, MenuCheckboxItem, type MenuCheckedChangeDetails, MenuContent, type MenuContentProps, MenuContextTrigger, type MenuController, type MenuData, type MenuDataItem, MenuGroup, MenuGroupLabel, MenuItem, MenuItemIcon, MenuItemIndicator, MenuItems, type MenuProps, MenuRadioGroup, type MenuRadioGroupProps, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, type MenuSubProps, MenuSubTrigger, MenuTrigger, type MenuTriggerProps, type MenuValueChangeDetails, createMenuController };
|