@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,577 @@
|
|
|
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 { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { ArrowDown01Icon, Cancel01Icon, Tick02Icon } from "@hugeicons/core-free-icons";
|
|
11
|
+
import { Select as Select$1, SelectArrow as SelectArrow$1, SelectClear as SelectClear$1, SelectContent as SelectContent$1, SelectEmpty as SelectEmpty$1, SelectGroup as SelectGroup$1, SelectGroupLabel as SelectGroupLabel$1, SelectInput as SelectInput$1, SelectItem as SelectItem$1, SelectItemIcon as SelectItemIcon$1, SelectItemIndicator as SelectItemIndicator$1, SelectItemText as SelectItemText$1, SelectLabel as SelectLabel$1, SelectList as SelectList$1, SelectSelectAll as SelectSelectAll$1, SelectSeparator as SelectSeparator$1, SelectStatus as SelectStatus$1, SelectTrigger as SelectTrigger$1, SelectValue as SelectValue$1, SelectValueIcon as SelectValueIcon$1, createSelectController } from "@ui-sdk/react/select";
|
|
12
|
+
// src/components/select/select.tsx
|
|
13
|
+
function Select(props) {
|
|
14
|
+
const $ = c(2);
|
|
15
|
+
let t0;
|
|
16
|
+
if ($[0] !== props) {
|
|
17
|
+
t0 = /* @__PURE__ */ jsx(Select$1, { ...props });
|
|
18
|
+
$[0] = props;
|
|
19
|
+
$[1] = t0;
|
|
20
|
+
} else t0 = $[1];
|
|
21
|
+
return t0;
|
|
22
|
+
}
|
|
23
|
+
function SelectLabel(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(SelectLabel$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
|
+
/**
|
|
55
|
+
* Looks like abby's `Input`. Without children it shows a `SelectValue` and a
|
|
56
|
+
* chevron. With children it shows only those, as in ui-sdk: end them with an
|
|
57
|
+
* `Icon` and it sits at the trigger's far edge.
|
|
58
|
+
*/
|
|
59
|
+
function SelectTrigger({ className, children = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SelectValue, {}), /* @__PURE__ */ jsx(Icon, { icon: ArrowDown01Icon })] }), ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx(SelectTrigger$1, {
|
|
61
|
+
className: cnState([inputClasses, "flex cursor-default items-center gap-1.5 text-start whitespace-nowrap select-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&>svg:last-child]:ms-auto [&>svg:last-child]:text-subtle"], className),
|
|
62
|
+
...props,
|
|
63
|
+
children
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function SelectValue(t0) {
|
|
67
|
+
const $ = c(8);
|
|
68
|
+
let className;
|
|
69
|
+
let props;
|
|
70
|
+
if ($[0] !== t0) {
|
|
71
|
+
({className, ...props} = t0);
|
|
72
|
+
$[0] = t0;
|
|
73
|
+
$[1] = className;
|
|
74
|
+
$[2] = props;
|
|
75
|
+
} else {
|
|
76
|
+
className = $[1];
|
|
77
|
+
props = $[2];
|
|
78
|
+
}
|
|
79
|
+
let t1;
|
|
80
|
+
if ($[3] !== className) {
|
|
81
|
+
t1 = cnState("min-w-0 truncate data-placeholder:text-subtle", className);
|
|
82
|
+
$[3] = className;
|
|
83
|
+
$[4] = t1;
|
|
84
|
+
} else t1 = $[4];
|
|
85
|
+
let t2;
|
|
86
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
87
|
+
t2 = /* @__PURE__ */ jsx(SelectValue$1, {
|
|
88
|
+
className: t1,
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
$[5] = props;
|
|
92
|
+
$[6] = t1;
|
|
93
|
+
$[7] = t2;
|
|
94
|
+
} else t2 = $[7];
|
|
95
|
+
return t2;
|
|
96
|
+
}
|
|
97
|
+
function SelectValueIcon(t0) {
|
|
98
|
+
const $ = c(8);
|
|
99
|
+
let className;
|
|
100
|
+
let props;
|
|
101
|
+
if ($[0] !== t0) {
|
|
102
|
+
({className, ...props} = t0);
|
|
103
|
+
$[0] = t0;
|
|
104
|
+
$[1] = className;
|
|
105
|
+
$[2] = props;
|
|
106
|
+
} else {
|
|
107
|
+
className = $[1];
|
|
108
|
+
props = $[2];
|
|
109
|
+
}
|
|
110
|
+
let t1;
|
|
111
|
+
if ($[3] !== className) {
|
|
112
|
+
t1 = cnState("flex shrink-0 items-center text-subtle", className);
|
|
113
|
+
$[3] = className;
|
|
114
|
+
$[4] = t1;
|
|
115
|
+
} else t1 = $[4];
|
|
116
|
+
let t2;
|
|
117
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
118
|
+
t2 = /* @__PURE__ */ jsx(SelectValueIcon$1, {
|
|
119
|
+
className: t1,
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
$[5] = props;
|
|
123
|
+
$[6] = t1;
|
|
124
|
+
$[7] = t2;
|
|
125
|
+
} else t2 = $[7];
|
|
126
|
+
return t2;
|
|
127
|
+
}
|
|
128
|
+
/** A ghost icon button with a cross. Name it with `aria-label`. */
|
|
129
|
+
function SelectClear({ variant = "ghost", size = "icon-sm", className, children = /* @__PURE__ */ jsx(Icon, { icon: Cancel01Icon }), ...props }) {
|
|
130
|
+
return /* @__PURE__ */ jsx(SelectClear$1, {
|
|
131
|
+
className: cnState([buttonLook({
|
|
132
|
+
variant,
|
|
133
|
+
size
|
|
134
|
+
}), "shrink-0"], className),
|
|
135
|
+
...props,
|
|
136
|
+
children
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/** The select's `items`, as styled parts. */
|
|
140
|
+
function dataItems(items) {
|
|
141
|
+
return items.map((entry, index) => {
|
|
142
|
+
if (typeof entry === "string") return /* @__PURE__ */ jsxs(SelectItem, {
|
|
143
|
+
value: entry,
|
|
144
|
+
label: entry,
|
|
145
|
+
children: [/* @__PURE__ */ jsx(SelectItemText, {}), /* @__PURE__ */ jsx(SelectItemIndicator, {})]
|
|
146
|
+
}, `item-${entry}`);
|
|
147
|
+
if ("type" in entry && entry.type === "separator") return /* @__PURE__ */ jsx(SelectSeparator, {}, `separator-${index}`);
|
|
148
|
+
if ("type" in entry && entry.type === "group") return /* @__PURE__ */ jsxs(SelectGroup, { children: [entry.label && /* @__PURE__ */ jsx(SelectGroupLabel, { children: entry.label }), dataItems(entry.items)] }, `group-${entry.label ?? index}`);
|
|
149
|
+
const { value, label, disabled, keywords } = entry;
|
|
150
|
+
return /* @__PURE__ */ jsxs(SelectItem, {
|
|
151
|
+
value,
|
|
152
|
+
label,
|
|
153
|
+
disabled,
|
|
154
|
+
...keywords && { keywords },
|
|
155
|
+
children: [/* @__PURE__ */ jsx(SelectItemText, {}), /* @__PURE__ */ jsx(SelectItemIndicator, {})]
|
|
156
|
+
}, typeof value === "string" ? `item-${value}` : `item-${index}`);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/** What a content or a list with no children shows: the select's `items`. */
|
|
160
|
+
const dataChildren = (state) => state.items.length > 0 ? dataItems(state.items) : null;
|
|
161
|
+
/** Without children it renders the select's `items`, each with its check. */
|
|
162
|
+
function SelectContent(t0) {
|
|
163
|
+
const $ = c(12);
|
|
164
|
+
let className;
|
|
165
|
+
let props;
|
|
166
|
+
let t1;
|
|
167
|
+
let t2;
|
|
168
|
+
if ($[0] !== t0) {
|
|
169
|
+
({className, sideOffset: t1, children: t2, ...props} = t0);
|
|
170
|
+
$[0] = t0;
|
|
171
|
+
$[1] = className;
|
|
172
|
+
$[2] = props;
|
|
173
|
+
$[3] = t1;
|
|
174
|
+
$[4] = t2;
|
|
175
|
+
} else {
|
|
176
|
+
className = $[1];
|
|
177
|
+
props = $[2];
|
|
178
|
+
t1 = $[3];
|
|
179
|
+
t2 = $[4];
|
|
180
|
+
}
|
|
181
|
+
const sideOffset = t1 === void 0 ? 4 : t1;
|
|
182
|
+
const children = t2 === void 0 ? dataChildren : t2;
|
|
183
|
+
let t3;
|
|
184
|
+
if ($[5] !== className) {
|
|
185
|
+
t3 = cnState([
|
|
186
|
+
"isolate flex flex-col overflow-x-hidden overflow-y-auto popup-surface p-1 text-sm has-data-[slot=select-arrow]:overflow-visible",
|
|
187
|
+
"data-[presentation=popover]:popup-motion data-[presentation=popover]:max-h-(--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",
|
|
188
|
+
"data-[presentation=sheet]:rounded-t-2xl data-[presentation=sheet]:p-2 data-[presentation=sheet]:shadow-lg data-[presentation=sheet]:pb-[max(--spacing(2),env(safe-area-inset-bottom))]"
|
|
189
|
+
], className);
|
|
190
|
+
$[5] = className;
|
|
191
|
+
$[6] = t3;
|
|
192
|
+
} else t3 = $[6];
|
|
193
|
+
let t4;
|
|
194
|
+
if ($[7] !== children || $[8] !== props || $[9] !== sideOffset || $[10] !== t3) {
|
|
195
|
+
t4 = /* @__PURE__ */ jsx(SelectContent$1, {
|
|
196
|
+
sideOffset,
|
|
197
|
+
className: t3,
|
|
198
|
+
...props,
|
|
199
|
+
children
|
|
200
|
+
});
|
|
201
|
+
$[7] = children;
|
|
202
|
+
$[8] = props;
|
|
203
|
+
$[9] = sideOffset;
|
|
204
|
+
$[10] = t3;
|
|
205
|
+
$[11] = t4;
|
|
206
|
+
} else t4 = $[11];
|
|
207
|
+
return t4;
|
|
208
|
+
}
|
|
209
|
+
/** Without children it renders the select's `items` that match the search. */
|
|
210
|
+
function SelectList(t0) {
|
|
211
|
+
const $ = c(10);
|
|
212
|
+
let className;
|
|
213
|
+
let props;
|
|
214
|
+
let t1;
|
|
215
|
+
if ($[0] !== t0) {
|
|
216
|
+
({className, children: t1, ...props} = t0);
|
|
217
|
+
$[0] = t0;
|
|
218
|
+
$[1] = className;
|
|
219
|
+
$[2] = props;
|
|
220
|
+
$[3] = t1;
|
|
221
|
+
} else {
|
|
222
|
+
className = $[1];
|
|
223
|
+
props = $[2];
|
|
224
|
+
t1 = $[3];
|
|
225
|
+
}
|
|
226
|
+
const children = t1 === void 0 ? dataChildren : t1;
|
|
227
|
+
let t2;
|
|
228
|
+
if ($[4] !== className) {
|
|
229
|
+
t2 = cnState("flex min-h-0 flex-1 flex-col overflow-y-auto outline-none", className);
|
|
230
|
+
$[4] = className;
|
|
231
|
+
$[5] = t2;
|
|
232
|
+
} else t2 = $[5];
|
|
233
|
+
let t3;
|
|
234
|
+
if ($[6] !== children || $[7] !== props || $[8] !== t2) {
|
|
235
|
+
t3 = /* @__PURE__ */ jsx(SelectList$1, {
|
|
236
|
+
className: t2,
|
|
237
|
+
...props,
|
|
238
|
+
children
|
|
239
|
+
});
|
|
240
|
+
$[6] = children;
|
|
241
|
+
$[7] = props;
|
|
242
|
+
$[8] = t2;
|
|
243
|
+
$[9] = t3;
|
|
244
|
+
} else t3 = $[9];
|
|
245
|
+
return t3;
|
|
246
|
+
}
|
|
247
|
+
function SelectInput(t0) {
|
|
248
|
+
const $ = c(8);
|
|
249
|
+
let className;
|
|
250
|
+
let props;
|
|
251
|
+
if ($[0] !== t0) {
|
|
252
|
+
({className, ...props} = t0);
|
|
253
|
+
$[0] = t0;
|
|
254
|
+
$[1] = className;
|
|
255
|
+
$[2] = props;
|
|
256
|
+
} else {
|
|
257
|
+
className = $[1];
|
|
258
|
+
props = $[2];
|
|
259
|
+
}
|
|
260
|
+
let t1;
|
|
261
|
+
if ($[3] !== className) {
|
|
262
|
+
t1 = cnState("mb-1 h-8 w-full min-w-0 shrink-0 rounded-full border border-input bg-transparent px-3 text-base placeholder:text-placeholder focus-ring-inset md:text-sm", className);
|
|
263
|
+
$[3] = className;
|
|
264
|
+
$[4] = t1;
|
|
265
|
+
} else t1 = $[4];
|
|
266
|
+
let t2;
|
|
267
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
268
|
+
t2 = /* @__PURE__ */ jsx(SelectInput$1, {
|
|
269
|
+
className: t1,
|
|
270
|
+
...props
|
|
271
|
+
});
|
|
272
|
+
$[5] = props;
|
|
273
|
+
$[6] = t1;
|
|
274
|
+
$[7] = t2;
|
|
275
|
+
} else t2 = $[7];
|
|
276
|
+
return t2;
|
|
277
|
+
}
|
|
278
|
+
function SelectEmpty(t0) {
|
|
279
|
+
const $ = c(8);
|
|
280
|
+
let className;
|
|
281
|
+
let props;
|
|
282
|
+
if ($[0] !== t0) {
|
|
283
|
+
({className, ...props} = t0);
|
|
284
|
+
$[0] = t0;
|
|
285
|
+
$[1] = className;
|
|
286
|
+
$[2] = props;
|
|
287
|
+
} else {
|
|
288
|
+
className = $[1];
|
|
289
|
+
props = $[2];
|
|
290
|
+
}
|
|
291
|
+
let t1;
|
|
292
|
+
if ($[3] !== className) {
|
|
293
|
+
t1 = cnState("px-2 py-6 text-center text-sm text-subtle empty:hidden", className);
|
|
294
|
+
$[3] = className;
|
|
295
|
+
$[4] = t1;
|
|
296
|
+
} else t1 = $[4];
|
|
297
|
+
let t2;
|
|
298
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
299
|
+
t2 = /* @__PURE__ */ jsx(SelectEmpty$1, {
|
|
300
|
+
className: t1,
|
|
301
|
+
...props
|
|
302
|
+
});
|
|
303
|
+
$[5] = props;
|
|
304
|
+
$[6] = t1;
|
|
305
|
+
$[7] = t2;
|
|
306
|
+
} else t2 = $[7];
|
|
307
|
+
return t2;
|
|
308
|
+
}
|
|
309
|
+
function SelectStatus(t0) {
|
|
310
|
+
const $ = c(8);
|
|
311
|
+
let className;
|
|
312
|
+
let props;
|
|
313
|
+
if ($[0] !== t0) {
|
|
314
|
+
({className, ...props} = t0);
|
|
315
|
+
$[0] = t0;
|
|
316
|
+
$[1] = className;
|
|
317
|
+
$[2] = props;
|
|
318
|
+
} else {
|
|
319
|
+
className = $[1];
|
|
320
|
+
props = $[2];
|
|
321
|
+
}
|
|
322
|
+
let t1;
|
|
323
|
+
if ($[3] !== className) {
|
|
324
|
+
t1 = cnState("px-2 py-1.5 text-sm text-muted-foreground empty:hidden", className);
|
|
325
|
+
$[3] = className;
|
|
326
|
+
$[4] = t1;
|
|
327
|
+
} else t1 = $[4];
|
|
328
|
+
let t2;
|
|
329
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
330
|
+
t2 = /* @__PURE__ */ jsx(SelectStatus$1, {
|
|
331
|
+
className: t1,
|
|
332
|
+
...props
|
|
333
|
+
});
|
|
334
|
+
$[5] = props;
|
|
335
|
+
$[6] = t1;
|
|
336
|
+
$[7] = t2;
|
|
337
|
+
} else t2 = $[7];
|
|
338
|
+
return t2;
|
|
339
|
+
}
|
|
340
|
+
/** A row in the list, shared by `SelectItem` and `SelectSelectAll`. */
|
|
341
|
+
const itemClasses = "list-row in-data-[presentation=sheet]:py-2.5";
|
|
342
|
+
function SelectItem(t0) {
|
|
343
|
+
const $ = c(8);
|
|
344
|
+
let className;
|
|
345
|
+
let props;
|
|
346
|
+
if ($[0] !== t0) {
|
|
347
|
+
({className, ...props} = t0);
|
|
348
|
+
$[0] = t0;
|
|
349
|
+
$[1] = className;
|
|
350
|
+
$[2] = props;
|
|
351
|
+
} else {
|
|
352
|
+
className = $[1];
|
|
353
|
+
props = $[2];
|
|
354
|
+
}
|
|
355
|
+
let t1;
|
|
356
|
+
if ($[3] !== className) {
|
|
357
|
+
t1 = cnState([itemClasses, "pe-8 in-data-has-icons:not-data-has-icon:ps-8"], className);
|
|
358
|
+
$[3] = className;
|
|
359
|
+
$[4] = t1;
|
|
360
|
+
} else t1 = $[4];
|
|
361
|
+
let t2;
|
|
362
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
363
|
+
t2 = /* @__PURE__ */ jsx(SelectItem$1, {
|
|
364
|
+
className: t1,
|
|
365
|
+
...props
|
|
366
|
+
});
|
|
367
|
+
$[5] = props;
|
|
368
|
+
$[6] = t1;
|
|
369
|
+
$[7] = t2;
|
|
370
|
+
} else t2 = $[7];
|
|
371
|
+
return t2;
|
|
372
|
+
}
|
|
373
|
+
function SelectItemText(t0) {
|
|
374
|
+
const $ = c(8);
|
|
375
|
+
let className;
|
|
376
|
+
let props;
|
|
377
|
+
if ($[0] !== t0) {
|
|
378
|
+
({className, ...props} = t0);
|
|
379
|
+
$[0] = t0;
|
|
380
|
+
$[1] = className;
|
|
381
|
+
$[2] = props;
|
|
382
|
+
} else {
|
|
383
|
+
className = $[1];
|
|
384
|
+
props = $[2];
|
|
385
|
+
}
|
|
386
|
+
let t1;
|
|
387
|
+
if ($[3] !== className) {
|
|
388
|
+
t1 = cnState("min-w-0 [&_mark]:bg-transparent [&_mark]:font-semibold [&_mark]:text-inherit", className);
|
|
389
|
+
$[3] = className;
|
|
390
|
+
$[4] = t1;
|
|
391
|
+
} else t1 = $[4];
|
|
392
|
+
let t2;
|
|
393
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
394
|
+
t2 = /* @__PURE__ */ jsx(SelectItemText$1, {
|
|
395
|
+
className: t1,
|
|
396
|
+
...props
|
|
397
|
+
});
|
|
398
|
+
$[5] = props;
|
|
399
|
+
$[6] = t1;
|
|
400
|
+
$[7] = t2;
|
|
401
|
+
} else t2 = $[7];
|
|
402
|
+
return t2;
|
|
403
|
+
}
|
|
404
|
+
/** Without children it shows a check. */
|
|
405
|
+
const SelectItemIndicator = Object.assign(function SelectItemIndicator({ className, children = /* @__PURE__ */ jsx(Icon, { icon: Tick02Icon }), ...props }) {
|
|
406
|
+
return /* @__PURE__ */ jsx(SelectItemIndicator$1, {
|
|
407
|
+
className: cnState("pointer-events-none absolute end-2 flex size-4 items-center justify-center", className),
|
|
408
|
+
...props,
|
|
409
|
+
children
|
|
410
|
+
});
|
|
411
|
+
}, notLabel);
|
|
412
|
+
const SelectItemIcon = Object.assign(function SelectItemIcon({ className, ...props }) {
|
|
413
|
+
return /* @__PURE__ */ jsx(SelectItemIcon$1, {
|
|
414
|
+
className: cnState("flex size-4 shrink-0 items-center justify-center text-muted-foreground", className),
|
|
415
|
+
...props
|
|
416
|
+
});
|
|
417
|
+
}, notLabel);
|
|
418
|
+
function SelectSelectAll(t0) {
|
|
419
|
+
const $ = c(8);
|
|
420
|
+
let className;
|
|
421
|
+
let props;
|
|
422
|
+
if ($[0] !== t0) {
|
|
423
|
+
({className, ...props} = t0);
|
|
424
|
+
$[0] = t0;
|
|
425
|
+
$[1] = className;
|
|
426
|
+
$[2] = props;
|
|
427
|
+
} else {
|
|
428
|
+
className = $[1];
|
|
429
|
+
props = $[2];
|
|
430
|
+
}
|
|
431
|
+
let t1;
|
|
432
|
+
if ($[3] !== className) {
|
|
433
|
+
t1 = cnState([itemClasses, "justify-between pe-2"], className);
|
|
434
|
+
$[3] = className;
|
|
435
|
+
$[4] = t1;
|
|
436
|
+
} else t1 = $[4];
|
|
437
|
+
let t2;
|
|
438
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
439
|
+
t2 = /* @__PURE__ */ jsx(SelectSelectAll$1, {
|
|
440
|
+
className: t1,
|
|
441
|
+
...props
|
|
442
|
+
});
|
|
443
|
+
$[5] = props;
|
|
444
|
+
$[6] = t1;
|
|
445
|
+
$[7] = t2;
|
|
446
|
+
} else t2 = $[7];
|
|
447
|
+
return t2;
|
|
448
|
+
}
|
|
449
|
+
function SelectGroup(t0) {
|
|
450
|
+
const $ = c(8);
|
|
451
|
+
let className;
|
|
452
|
+
let props;
|
|
453
|
+
if ($[0] !== t0) {
|
|
454
|
+
({className, ...props} = t0);
|
|
455
|
+
$[0] = t0;
|
|
456
|
+
$[1] = className;
|
|
457
|
+
$[2] = props;
|
|
458
|
+
} else {
|
|
459
|
+
className = $[1];
|
|
460
|
+
props = $[2];
|
|
461
|
+
}
|
|
462
|
+
let t1;
|
|
463
|
+
if ($[3] !== className) {
|
|
464
|
+
t1 = cnState("flex shrink-0 flex-col", className);
|
|
465
|
+
$[3] = className;
|
|
466
|
+
$[4] = t1;
|
|
467
|
+
} else t1 = $[4];
|
|
468
|
+
let t2;
|
|
469
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
470
|
+
t2 = /* @__PURE__ */ jsx(SelectGroup$1, {
|
|
471
|
+
className: t1,
|
|
472
|
+
...props
|
|
473
|
+
});
|
|
474
|
+
$[5] = props;
|
|
475
|
+
$[6] = t1;
|
|
476
|
+
$[7] = t2;
|
|
477
|
+
} else t2 = $[7];
|
|
478
|
+
return t2;
|
|
479
|
+
}
|
|
480
|
+
function SelectGroupLabel(t0) {
|
|
481
|
+
const $ = c(8);
|
|
482
|
+
let className;
|
|
483
|
+
let props;
|
|
484
|
+
if ($[0] !== t0) {
|
|
485
|
+
({className, ...props} = t0);
|
|
486
|
+
$[0] = t0;
|
|
487
|
+
$[1] = className;
|
|
488
|
+
$[2] = props;
|
|
489
|
+
} else {
|
|
490
|
+
className = $[1];
|
|
491
|
+
props = $[2];
|
|
492
|
+
}
|
|
493
|
+
let t1;
|
|
494
|
+
if ($[3] !== className) {
|
|
495
|
+
t1 = cnState("px-2 py-1.5 text-xs text-muted-foreground", className);
|
|
496
|
+
$[3] = className;
|
|
497
|
+
$[4] = t1;
|
|
498
|
+
} else t1 = $[4];
|
|
499
|
+
let t2;
|
|
500
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
501
|
+
t2 = /* @__PURE__ */ jsx(SelectGroupLabel$1, {
|
|
502
|
+
className: t1,
|
|
503
|
+
...props
|
|
504
|
+
});
|
|
505
|
+
$[5] = props;
|
|
506
|
+
$[6] = t1;
|
|
507
|
+
$[7] = t2;
|
|
508
|
+
} else t2 = $[7];
|
|
509
|
+
return t2;
|
|
510
|
+
}
|
|
511
|
+
function SelectSeparator(t0) {
|
|
512
|
+
const $ = c(8);
|
|
513
|
+
let className;
|
|
514
|
+
let props;
|
|
515
|
+
if ($[0] !== t0) {
|
|
516
|
+
({className, ...props} = t0);
|
|
517
|
+
$[0] = t0;
|
|
518
|
+
$[1] = className;
|
|
519
|
+
$[2] = props;
|
|
520
|
+
} else {
|
|
521
|
+
className = $[1];
|
|
522
|
+
props = $[2];
|
|
523
|
+
}
|
|
524
|
+
let t1;
|
|
525
|
+
if ($[3] !== className) {
|
|
526
|
+
t1 = cnState("pointer-events-none -mx-1 my-1 h-px shrink-0 bg-border", className);
|
|
527
|
+
$[3] = className;
|
|
528
|
+
$[4] = t1;
|
|
529
|
+
} else t1 = $[4];
|
|
530
|
+
let t2;
|
|
531
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
532
|
+
t2 = /* @__PURE__ */ jsx(SelectSeparator$1, {
|
|
533
|
+
className: t1,
|
|
534
|
+
...props
|
|
535
|
+
});
|
|
536
|
+
$[5] = props;
|
|
537
|
+
$[6] = t1;
|
|
538
|
+
$[7] = t2;
|
|
539
|
+
} else t2 = $[7];
|
|
540
|
+
return t2;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Give the content a `sideOffset` that leaves room for it. The content stops
|
|
544
|
+
* clipping while it holds an arrow, so a long list scrolls in a `SelectList`.
|
|
545
|
+
*/
|
|
546
|
+
function SelectArrow(t0) {
|
|
547
|
+
const $ = c(8);
|
|
548
|
+
let className;
|
|
549
|
+
let props;
|
|
550
|
+
if ($[0] !== t0) {
|
|
551
|
+
({className, ...props} = t0);
|
|
552
|
+
$[0] = t0;
|
|
553
|
+
$[1] = className;
|
|
554
|
+
$[2] = props;
|
|
555
|
+
} else {
|
|
556
|
+
className = $[1];
|
|
557
|
+
props = $[2];
|
|
558
|
+
}
|
|
559
|
+
let t1;
|
|
560
|
+
if ($[3] !== className) {
|
|
561
|
+
t1 = cnState("popup-arrow", className);
|
|
562
|
+
$[3] = className;
|
|
563
|
+
$[4] = t1;
|
|
564
|
+
} else t1 = $[4];
|
|
565
|
+
let t2;
|
|
566
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
567
|
+
t2 = /* @__PURE__ */ jsx(SelectArrow$1, {
|
|
568
|
+
className: t1,
|
|
569
|
+
...props
|
|
570
|
+
});
|
|
571
|
+
$[5] = props;
|
|
572
|
+
$[6] = t1;
|
|
573
|
+
$[7] = t2;
|
|
574
|
+
} else t2 = $[7];
|
|
575
|
+
return t2;
|
|
576
|
+
}
|
|
577
|
+
export { Select, SelectArrow, SelectClear, SelectContent, SelectEmpty, SelectGroup, SelectGroupLabel, SelectInput, SelectItem, SelectItemIcon, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectSelectAll, SelectSeparator, SelectStatus, SelectTrigger, SelectValue, SelectValueIcon, createSelectController };
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { Separator as Separator$1 } from "@ui-sdk/react/separator";
|
|
6
|
+
// src/components/separator/separator.tsx
|
|
7
|
+
function Separator(t0) {
|
|
8
|
+
const $ = c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== className) {
|
|
22
|
+
t1 = cnState("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className);
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
28
|
+
t2 = /* @__PURE__ */ jsx(Separator$1, {
|
|
29
|
+
className: t1,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
$[5] = props;
|
|
33
|
+
$[6] = t1;
|
|
34
|
+
$[7] = t2;
|
|
35
|
+
} else t2 = $[7];
|
|
36
|
+
return t2;
|
|
37
|
+
}
|
|
38
|
+
export { Separator };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonLook } from "../button/button.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { DialogBackdrop, DialogClose, DialogContent, DialogDescription, DialogProps, DialogTitle, DialogTrigger, createDialogController } from "@ui-sdk/react/dialog";
|
|
4
|
+
type SheetSide = "top" | "right" | "bottom" | "left";
|
|
5
|
+
declare function Sheet(props: DialogProps): import("react").JSX.Element;
|
|
6
|
+
type SheetTriggerProps = ComponentProps<typeof DialogTrigger> & ButtonLook;
|
|
7
|
+
declare function SheetTrigger({ variant, size, className, ...props }: SheetTriggerProps): import("react").JSX.Element;
|
|
8
|
+
type SheetCloseProps = ComponentProps<typeof DialogClose> & ButtonLook;
|
|
9
|
+
declare function SheetClose({ variant, size, className, ...props }: SheetCloseProps): import("react").JSX.Element;
|
|
10
|
+
declare function SheetOverlay({ className, ...props }: ComponentProps<typeof DialogBackdrop>): import("react").JSX.Element;
|
|
11
|
+
type SheetContentProps = ComponentProps<typeof DialogContent> & {
|
|
12
|
+
/** The edge of the screen the sheet opens from. */
|
|
13
|
+
side?: SheetSide;
|
|
14
|
+
/** Shows the close button in the top corner. */
|
|
15
|
+
showCloseButton?: boolean;
|
|
16
|
+
/** The close button's accessible name. Set it in the page's language. */
|
|
17
|
+
closeLabel?: string;
|
|
18
|
+
};
|
|
19
|
+
declare function SheetContent({ className, children, side, showCloseButton, closeLabel, ...props }: SheetContentProps): import("react").JSX.Element;
|
|
20
|
+
declare function SheetHeader({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
21
|
+
declare function SheetFooter({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
22
|
+
declare function SheetTitle({ className, ...props }: ComponentProps<typeof DialogTitle>): import("react").JSX.Element;
|
|
23
|
+
declare function SheetDescription({ className, ...props }: ComponentProps<typeof DialogDescription>): import("react").JSX.Element;
|
|
24
|
+
export { Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, type DialogProps as SheetProps, type SheetSide, SheetTitle, SheetTrigger, type SheetTriggerProps, createDialogController as createSheetController };
|