@asanchez-sa/abby 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +245 -2
- package/dist/_virtual/_rolldown/runtime.js +26 -0
- package/dist/agents/approvals.d.ts +46 -0
- package/dist/agents/approvals.js +58 -0
- package/dist/agents/changes.d.ts +21 -0
- package/dist/agents/changes.js +21 -0
- package/dist/agents/hooks.d.ts +20 -0
- package/dist/agents/hooks.js +58 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/run-tool.d.ts +44 -0
- package/dist/agents/run-tool.js +79 -0
- package/dist/agents/ui-sdk.d.ts +5 -0
- package/dist/agents/ui-sdk.js +3 -0
- package/dist/behaviors/canvas/index.d.ts +2 -0
- package/dist/behaviors/canvas/index.js +1 -0
- package/dist/behaviors/canvas/ui-sdk.d.ts +2 -0
- package/dist/behaviors/canvas/ui-sdk.js +1 -0
- package/dist/behaviors/drag-and-drop/index.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/index.js +1 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.js +1 -0
- package/dist/behaviors/dragging/index.d.ts +2 -0
- package/dist/behaviors/dragging/index.js +1 -0
- package/dist/behaviors/dragging/ui-sdk.d.ts +2 -0
- package/dist/behaviors/dragging/ui-sdk.js +1 -0
- package/dist/behaviors/focus/index.d.ts +2 -0
- package/dist/behaviors/focus/index.js +1 -0
- package/dist/behaviors/focus/ui-sdk.d.ts +2 -0
- package/dist/behaviors/focus/ui-sdk.js +1 -0
- package/dist/behaviors/lists/index.d.ts +3 -0
- package/dist/behaviors/lists/index.js +3 -0
- package/dist/behaviors/lists/ui-sdk.d.ts +3 -0
- package/dist/behaviors/lists/ui-sdk.js +3 -0
- package/dist/behaviors/popups/index.d.ts +3 -0
- package/dist/behaviors/popups/index.js +3 -0
- package/dist/behaviors/popups/ui-sdk.d.ts +3 -0
- package/dist/behaviors/popups/ui-sdk.js +3 -0
- package/dist/behaviors/preferences/index.d.ts +3 -0
- package/dist/behaviors/preferences/index.js +3 -0
- package/dist/behaviors/preferences/ui-sdk.d.ts +3 -0
- package/dist/behaviors/preferences/ui-sdk.js +3 -0
- package/dist/behaviors/selection/index.d.ts +3 -0
- package/dist/behaviors/selection/index.js +3 -0
- package/dist/behaviors/selection/indicator.d.ts +13 -0
- package/dist/behaviors/selection/indicator.js +20 -0
- package/dist/behaviors/selection/ui-sdk.d.ts +2 -0
- package/dist/behaviors/selection/ui-sdk.js +1 -0
- package/dist/behaviors/transitions/index.d.ts +3 -0
- package/dist/behaviors/transitions/index.js +3 -0
- package/dist/behaviors/transitions/ui-sdk.d.ts +3 -0
- package/dist/behaviors/transitions/ui-sdk.js +3 -0
- package/dist/behaviors/trees/index.d.ts +2 -0
- package/dist/behaviors/trees/index.js +1 -0
- package/dist/behaviors/trees/ui-sdk.d.ts +2 -0
- package/dist/behaviors/trees/ui-sdk.js +1 -0
- package/dist/components/accordion/accordion.d.ts +13 -0
- package/dist/components/accordion/accordion.js +165 -0
- package/dist/components/alert/alert.d.ts +13 -0
- package/dist/components/alert/alert.js +131 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog.js +257 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +57 -0
- package/dist/components/attachment/attachment.d.ts +48 -0
- package/dist/components/attachment/attachment.js +372 -0
- package/dist/components/autocomplete/autocomplete.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete.js +466 -0
- package/dist/components/avatar/avatar.d.ts +6 -0
- package/dist/components/avatar/avatar.js +100 -0
- package/dist/components/avatar-group/avatar-group.d.ts +9 -0
- package/dist/components/avatar-group/avatar-group.js +75 -0
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.js +31 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb.js +279 -0
- package/dist/components/bubble/bubble.d.ts +26 -0
- package/dist/components/bubble/bubble.js +173 -0
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button-group/button-group.d.ts +15 -0
- package/dist/components/button-group/button-group.js +71 -0
- package/dist/components/calendar/calendar.d.ts +29 -0
- package/dist/components/calendar/calendar.js +453 -0
- package/dist/components/card/card.d.ts +14 -0
- package/dist/components/card/card.js +213 -0
- package/dist/components/carousel/carousel.d.ts +16 -0
- package/dist/components/carousel/carousel.js +364 -0
- package/dist/components/chain-of-thought/chain-of-thought.d.ts +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.js +491 -0
- package/dist/components/chat/chat.d.ts +48 -0
- package/dist/components/chat/chat.js +207 -0
- package/dist/components/checkbox/checkbox.d.ts +10 -0
- package/dist/components/checkbox/checkbox.js +118 -0
- package/dist/components/checkpoint/checkpoint.d.ts +24 -0
- package/dist/components/checkpoint/checkpoint.js +178 -0
- package/dist/components/choice-cards/choice-cards.d.ts +38 -0
- package/dist/components/choice-cards/choice-cards.js +255 -0
- package/dist/components/code-block/code-block.d.ts +58 -0
- package/dist/components/code-block/code-block.js +506 -0
- package/dist/components/code-block/highlighter.js +96 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +11 -0
- package/dist/components/code-block/use-highlighted-code.js +54 -0
- package/dist/components/collapsible/collapsible.d.ts +10 -0
- package/dist/components/collapsible/collapsible.js +92 -0
- package/dist/components/color-picker/color-picker.d.ts +17 -0
- package/dist/components/color-picker/color-picker.js +395 -0
- package/dist/components/combobox/combobox.d.ts +54 -0
- package/dist/components/combobox/combobox.js +683 -0
- package/dist/components/command/command.d.ts +23 -0
- package/dist/components/command/command.js +373 -0
- package/dist/components/command-dock/command-dock.d.ts +118 -0
- package/dist/components/command-dock/command-dock.js +944 -0
- package/dist/components/confirmation/confirmation.d.ts +58 -0
- package/dist/components/confirmation/confirmation.js +181 -0
- package/dist/components/context/context.d.ts +82 -0
- package/dist/components/context/context.js +490 -0
- package/dist/components/date-input/date-input.d.ts +16 -0
- package/dist/components/date-input/date-input.js +89 -0
- package/dist/components/date-picker/date-picker.d.ts +28 -0
- package/dist/components/date-picker/date-picker.js +361 -0
- package/dist/components/dialog/dialog.d.ts +14 -0
- package/dist/components/dialog/dialog.js +261 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.js +309 -0
- package/dist/components/empty/empty.d.ts +18 -0
- package/dist/components/empty/empty.js +192 -0
- package/dist/components/field/field.d.ts +15 -0
- package/dist/components/field/field.js +261 -0
- package/dist/components/file-input/file-input.d.ts +12 -0
- package/dist/components/file-input/file-input.js +216 -0
- package/dist/components/file-tree/file-tree.d.ts +45 -0
- package/dist/components/file-tree/file-tree.js +283 -0
- package/dist/components/hover-card/hover-card.d.ts +10 -0
- package/dist/components/hover-card/hover-card.js +118 -0
- package/dist/components/icon/icon.d.ts +14 -0
- package/dist/components/icon/icon.js +60 -0
- package/dist/components/image-cropper/image-cropper.d.ts +15 -0
- package/dist/components/image-cropper/image-cropper.js +334 -0
- package/dist/components/inline-citation/inline-citation.d.ts +46 -0
- package/dist/components/inline-citation/inline-citation.js +269 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/input/input.js +43 -0
- package/dist/components/input-group/input-group.d.ts +42 -0
- package/dist/components/input-group/input-group.js +192 -0
- package/dist/components/item/item.d.ts +32 -0
- package/dist/components/item/item.js +394 -0
- package/dist/components/kbd/kbd.d.ts +9 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.js +40 -0
- package/dist/components/link/link.d.ts +21 -0
- package/dist/components/link/link.js +126 -0
- package/dist/components/listbox/listbox.d.ts +20 -0
- package/dist/components/listbox/listbox.js +199 -0
- package/dist/components/marker/marker.d.ts +11 -0
- package/dist/components/marker/marker.js +88 -0
- package/dist/components/menu/menu.d.ts +38 -0
- package/dist/components/menu/menu.js +553 -0
- package/dist/components/menubar/menubar.d.ts +9 -0
- package/dist/components/menubar/menubar.js +47 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/message.js +328 -0
- package/dist/components/message-scroller/message-scroller.d.ts +111 -0
- package/dist/components/message-scroller/message-scroller.js +957 -0
- package/dist/components/meter/meter.d.ts +8 -0
- package/dist/components/meter/meter.js +162 -0
- package/dist/components/model-selector/model-selector.d.ts +155 -0
- package/dist/components/model-selector/model-selector.js +905 -0
- package/dist/components/native-select/native-select.d.ts +27 -0
- package/dist/components/native-select/native-select.js +226 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +29 -0
- package/dist/components/navigation-menu/navigation-menu.js +318 -0
- package/dist/components/not-label.js +9 -0
- package/dist/components/note-editor/blocks.d.ts +22 -0
- package/dist/components/note-editor/blocks.js +245 -0
- package/dist/components/note-editor/diff.d.ts +19 -0
- package/dist/components/note-editor/diff.js +64 -0
- package/dist/components/note-editor/editor.js +249 -0
- package/dist/components/note-editor/note-editor.d.ts +109 -0
- package/dist/components/note-editor/note-editor.js +954 -0
- package/dist/components/note-editor/parts/comments.d.ts +24 -0
- package/dist/components/note-editor/parts/comments.js +337 -0
- package/dist/components/note-editor/parts/header.d.ts +25 -0
- package/dist/components/note-editor/parts/header.js +263 -0
- package/dist/components/note-editor/parts/history.d.ts +56 -0
- package/dist/components/note-editor/parts/history.js +409 -0
- package/dist/components/note-editor/parts/presence.d.ts +31 -0
- package/dist/components/note-editor/parts/presence.js +140 -0
- package/dist/components/note-editor/parts/suggestions.d.ts +45 -0
- package/dist/components/note-editor/parts/suggestions.js +316 -0
- package/dist/components/note-editor/parts/toolbar.d.ts +38 -0
- package/dist/components/note-editor/parts/toolbar.js +687 -0
- package/dist/components/note-editor/people.d.ts +84 -0
- package/dist/components/note-editor/people.js +276 -0
- package/dist/components/note-editor/person.d.ts +11 -0
- package/dist/components/note-editor/person.js +15 -0
- package/dist/components/note-place/note-place.d.ts +42 -0
- package/dist/components/note-place/note-place.js +256 -0
- package/dist/components/note-status/note-status.d.ts +59 -0
- package/dist/components/note-status/note-status.js +380 -0
- package/dist/components/number-input/number-input.d.ts +12 -0
- package/dist/components/number-input/number-input.js +252 -0
- package/dist/components/otp-input/otp-input.d.ts +12 -0
- package/dist/components/otp-input/otp-input.js +136 -0
- package/dist/components/pagination/pagination.d.ts +23 -0
- package/dist/components/pagination/pagination.js +218 -0
- package/dist/components/password-input/password-input.d.ts +11 -0
- package/dist/components/password-input/password-input.js +117 -0
- package/dist/components/plan/plan.d.ts +51 -0
- package/dist/components/plan/plan.js +320 -0
- package/dist/components/popover/popover.d.ts +16 -0
- package/dist/components/popover/popover.js +268 -0
- package/dist/components/preferences/preferences.d.ts +5 -0
- package/dist/components/preferences/preferences.js +18 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +162 -0
- package/dist/components/prompt-input/prompt-input.d.ts +247 -0
- package/dist/components/prompt-input/prompt-input.js +1367 -0
- package/dist/components/questionnaire/questionnaire.d.ts +174 -0
- package/dist/components/questionnaire/questionnaire.js +1628 -0
- package/dist/components/queue/queue.d.ts +82 -0
- package/dist/components/queue/queue.js +471 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.js +101 -0
- package/dist/components/rating/rating.d.ts +10 -0
- package/dist/components/rating/rating.js +95 -0
- package/dist/components/reasoning/reasoning.d.ts +50 -0
- package/dist/components/reasoning/reasoning.js +233 -0
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/resizable/resizable.js +100 -0
- package/dist/components/scroll-area/scroll-area.d.ts +17 -0
- package/dist/components/scroll-area/scroll-area.js +211 -0
- package/dist/components/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/segmented-control/segmented-control.js +142 -0
- package/dist/components/select/select.d.ts +43 -0
- package/dist/components/select/select.js +577 -0
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.js +38 -0
- package/dist/components/sheet/sheet.d.ts +24 -0
- package/dist/components/sheet/sheet.js +330 -0
- package/dist/components/sidebar/sidebar.d.ts +138 -0
- package/dist/components/sidebar/sidebar.js +1374 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.js +40 -0
- package/dist/components/slider/slider.d.ts +9 -0
- package/dist/components/slider/slider.js +193 -0
- package/dist/components/sources/sources.d.ts +35 -0
- package/dist/components/sources/sources.js +209 -0
- package/dist/components/spinner/spinner.d.ts +11 -0
- package/dist/components/spinner/spinner.js +59 -0
- package/dist/components/stack-trace/parse-stack-trace.d.ts +21 -0
- package/dist/components/stack-trace/parse-stack-trace.js +61 -0
- package/dist/components/stack-trace/stack-trace.d.ts +79 -0
- package/dist/components/stack-trace/stack-trace.js +434 -0
- package/dist/components/subagent/subagent.d.ts +71 -0
- package/dist/components/subagent/subagent.js +450 -0
- package/dist/components/suggestion/suggestion.d.ts +21 -0
- package/dist/components/suggestion/suggestion.js +130 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/switch/switch.js +70 -0
- package/dist/components/table/table.d.ts +19 -0
- package/dist/components/table/table.js +284 -0
- package/dist/components/table-of-contents/spy.js +84 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +92 -0
- package/dist/components/table-of-contents/table-of-contents.js +787 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +273 -0
- package/dist/components/task/task.d.ts +40 -0
- package/dist/components/task/task.js +262 -0
- package/dist/components/terminal/terminal.d.ts +82 -0
- package/dist/components/terminal/terminal.js +457 -0
- package/dist/components/test-results/test-results.d.ts +127 -0
- package/dist/components/test-results/test-results.js +687 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +43 -0
- package/dist/components/time-input/time-input.d.ts +7 -0
- package/dist/components/time-input/time-input.js +82 -0
- package/dist/components/timeline/timeline.d.ts +19 -0
- package/dist/components/timeline/timeline.js +247 -0
- package/dist/components/toast/toast.d.ts +12 -0
- package/dist/components/toast/toast.js +285 -0
- package/dist/components/toggle/toggle.d.ts +15 -0
- package/dist/components/toggle/toggle.js +137 -0
- package/dist/components/token-input/token-input.d.ts +7 -0
- package/dist/components/token-input/token-input.js +117 -0
- package/dist/components/tool/tool.d.ts +66 -0
- package/dist/components/tool/tool.js +413 -0
- package/dist/components/toolbar/toolbar.d.ts +91 -0
- package/dist/components/toolbar/toolbar.js +655 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +97 -0
- package/dist/components/trace/trace.d.ts +31 -0
- package/dist/components/trace/trace.js +309 -0
- package/dist/components/tree/tree.d.ts +13 -0
- package/dist/components/tree/tree.js +258 -0
- package/dist/components/trigger-menu/trigger-menu.d.ts +30 -0
- package/dist/components/trigger-menu/trigger-menu.js +352 -0
- package/dist/components/usage/usage.d.ts +132 -0
- package/dist/components/usage/usage.js +1368 -0
- package/dist/components/waterfall/waterfall.d.ts +20 -0
- package/dist/components/waterfall/waterfall.js +360 -0
- package/dist/components/week-strip/week-strip.d.ts +177 -0
- package/dist/components/week-strip/week-strip.js +1081 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +27 -0
- package/dist/core/ui-sdk.d.ts +3 -0
- package/dist/core/ui-sdk.js +3 -0
- package/dist/core/use-primitive-state.d.ts +14 -0
- package/dist/core/use-primitive-state.js +25 -0
- package/dist/styles/LICENSE-shadcn.md +21 -0
- package/dist/styles/color-scheme.css +32 -0
- package/dist/styles/components.css +303 -0
- package/dist/styles/index.css +41 -0
- package/dist/styles/tokens.css +474 -0
- package/dist/styles/typeset/shadcn.css +506 -0
- package/dist/styles/typeset.css +70 -0
- package/dist/styles/utilities.css +555 -0
- package/dist/tools/observe/index.d.ts +2 -0
- package/dist/tools/observe/index.js +3 -0
- package/dist/tools/observe/ui-sdk.d.ts +1 -0
- package/dist/tools/observe/ui-sdk.js +2 -0
- package/dist/tools/testing/check-agent.d.ts +28 -0
- package/dist/tools/testing/check-agent.js +42 -0
- package/dist/tools/testing/index.d.ts +4 -0
- package/dist/tools/testing/index.js +4 -0
- package/dist/tools/testing/ui-sdk.d.ts +1 -0
- package/dist/tools/testing/ui-sdk.js +2 -0
- package/dist/utilities/cn/index.d.ts +12 -0
- package/dist/utilities/cn/index.js +47 -0
- package/dist/utilities/color/index.d.ts +2 -0
- package/dist/utilities/color/index.js +3 -0
- package/dist/utilities/color/ui-sdk.d.ts +1 -0
- package/dist/utilities/color/ui-sdk.js +2 -0
- package/dist/utilities/date/index.d.ts +2 -0
- package/dist/utilities/date/index.js +6 -0
- package/dist/utilities/date/ui-sdk.d.ts +1 -0
- package/dist/utilities/date/ui-sdk.js +2 -0
- package/dist/utilities/image/index.d.ts +2 -0
- package/dist/utilities/image/index.js +3 -0
- package/dist/utilities/image/ui-sdk.d.ts +1 -0
- package/dist/utilities/image/ui-sdk.js +2 -0
- package/dist/utilities/mobile/index.d.ts +2 -0
- package/dist/utilities/mobile/index.js +1 -0
- package/dist/utilities/mobile/ui-sdk.d.ts +2 -0
- package/dist/utilities/mobile/ui-sdk.js +1 -0
- package/dist/utilities/number/index.d.ts +2 -0
- package/dist/utilities/number/index.js +3 -0
- package/dist/utilities/number/ui-sdk.d.ts +1 -0
- package/dist/utilities/number/ui-sdk.js +2 -0
- package/dist/utilities/platform/index.d.ts +3 -0
- package/dist/utilities/platform/index.js +14 -0
- package/dist/utilities/platform/ui-sdk.d.ts +3 -0
- package/dist/utilities/platform/ui-sdk.js +3 -0
- package/dist/utilities/storage/index.d.ts +2 -0
- package/dist/utilities/storage/index.js +1 -0
- package/dist/utilities/storage/ui-sdk.d.ts +2 -0
- package/dist/utilities/storage/ui-sdk.js +1 -0
- package/dist/utilities/text/index.d.ts +3 -0
- package/dist/utilities/text/index.js +3 -0
- package/dist/utilities/text/ui-sdk.d.ts +3 -0
- package/dist/utilities/text/ui-sdk.js +3 -0
- package/package.json +192 -4
- package/skills/agent-ready-ui/SKILL.md +229 -0
- package/skills/blocks/SKILL.md +262 -0
- package/skills/compose-screens/SKILL.md +354 -0
- package/skills/note-editor/SKILL.md +493 -0
- package/skills/note-status/SKILL.md +295 -0
- package/skills/setup/SKILL.md +136 -0
- package/skills/theming/SKILL.md +216 -0
- package/src/blocks/notes/adapters.ts +77 -0
- package/src/blocks/notes/data.ts +508 -0
- package/src/blocks/notes/notes-block.tsx +244 -0
- package/src/blocks/notes/parts/home.tsx +219 -0
- package/src/blocks/notes/parts/no-access.tsx +84 -0
- package/src/blocks/notes/parts/note-screen.tsx +412 -0
- package/src/blocks/notes/parts/notes-sidebar.tsx +277 -0
- package/src/blocks/notes/parts/panels.tsx +393 -0
- package/src/blocks/notes/parts/place.ts +15 -0
- package/src/blocks/notes/parts/review-dialog.tsx +159 -0
- package/src/blocks/notes/parts/share.tsx +172 -0
- package/src/blocks/notes/texts.ts +135 -0
- package/src/blocks/shell/adapters.ts +69 -0
- package/src/blocks/shell/data.ts +281 -0
- package/src/blocks/shell/parts/compose.tsx +292 -0
- package/src/blocks/shell/parts/home.tsx +203 -0
- package/src/blocks/shell/parts/marks.tsx +144 -0
- package/src/blocks/shell/parts/rail.tsx +166 -0
- package/src/blocks/shell/parts/rooms-column.tsx +326 -0
- package/src/blocks/shell/shell-block.tsx +210 -0
- package/src/blocks/shell/texts.ts +80 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { inputClasses } from "../input/input.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Textarea as Textarea$1, createInputController } from "@ui-sdk/react/textarea";
|
|
7
|
+
// src/components/textarea/textarea.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A multi-line text field that looks like `Input`. With `autoResize` it grows
|
|
10
|
+
* from its `min-height`; pass a `max-h-*` class to bound it.
|
|
11
|
+
*/
|
|
12
|
+
function Textarea(t0) {
|
|
13
|
+
const $ = c(8);
|
|
14
|
+
let className;
|
|
15
|
+
let props;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({className, ...props} = t0);
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = className;
|
|
20
|
+
$[2] = props;
|
|
21
|
+
} else {
|
|
22
|
+
className = $[1];
|
|
23
|
+
props = $[2];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[3] !== className) {
|
|
27
|
+
t1 = cnState([inputClasses, "h-auto min-h-16 rounded-2xl py-2"], className);
|
|
28
|
+
$[3] = className;
|
|
29
|
+
$[4] = t1;
|
|
30
|
+
} else t1 = $[4];
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
33
|
+
t2 = /* @__PURE__ */ jsx(Textarea$1, {
|
|
34
|
+
className: t1,
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
$[5] = props;
|
|
38
|
+
$[6] = t1;
|
|
39
|
+
$[7] = t2;
|
|
40
|
+
} else t2 = $[7];
|
|
41
|
+
return t2;
|
|
42
|
+
}
|
|
43
|
+
export { Textarea, createInputController };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { HourCycle, TimeInput as TimeInput$1, TimeInputGranularity, TimeInputSegment as TimeInputSegment$1, createTimeInputController } from "@ui-sdk/react/time-input";
|
|
3
|
+
type TimeInputProps = ComponentProps<typeof TimeInput$1>;
|
|
4
|
+
/** Looks like abby's `Input`: the box is the root, and the segments sit inside it. */
|
|
5
|
+
declare function TimeInput({ className, children, ...props }: TimeInputProps): import("react").JSX.Element;
|
|
6
|
+
declare function TimeInputSegment({ className, ...props }: ComponentProps<typeof TimeInputSegment$1>): import("react").JSX.Element;
|
|
7
|
+
export { type HourCycle, TimeInput, type TimeInputGranularity, type TimeInputProps, TimeInputSegment, createTimeInputController };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { segmentClasses, segmentLiteralClasses } from "../date-input/date-input.js";
|
|
4
|
+
import { inputClasses } from "../input/input.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { TimeInput as TimeInput$1, TimeInputSegment as TimeInputSegment$1, createTimeInputController } from "@ui-sdk/react/time-input";
|
|
8
|
+
// src/components/time-input/time-input.tsx
|
|
9
|
+
/** What an input with no children shows: every segment, in the locale's order. */
|
|
10
|
+
const segments = (state) => state.segments.map((segment) => /* @__PURE__ */ jsx(TimeInputSegment, { segment }, segment.key));
|
|
11
|
+
/** Looks like abby's `Input`: the box is the root, and the segments sit inside it. */
|
|
12
|
+
function TimeInput(t0) {
|
|
13
|
+
const $ = c(10);
|
|
14
|
+
let className;
|
|
15
|
+
let props;
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[0] !== t0) {
|
|
18
|
+
({className, children: t1, ...props} = t0);
|
|
19
|
+
$[0] = t0;
|
|
20
|
+
$[1] = className;
|
|
21
|
+
$[2] = props;
|
|
22
|
+
$[3] = t1;
|
|
23
|
+
} else {
|
|
24
|
+
className = $[1];
|
|
25
|
+
props = $[2];
|
|
26
|
+
t1 = $[3];
|
|
27
|
+
}
|
|
28
|
+
const children = t1 === void 0 ? segments : t1;
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[4] !== className) {
|
|
31
|
+
t2 = cnState([inputClasses, "flex cursor-text items-center focus-field-within has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 data-invalid:border-destructive data-invalid:ring-3 data-invalid:ring-destructive/20"], className);
|
|
32
|
+
$[4] = className;
|
|
33
|
+
$[5] = t2;
|
|
34
|
+
} else t2 = $[5];
|
|
35
|
+
let t3;
|
|
36
|
+
if ($[6] !== children || $[7] !== props || $[8] !== t2) {
|
|
37
|
+
t3 = /* @__PURE__ */ jsx(TimeInput$1, {
|
|
38
|
+
className: t2,
|
|
39
|
+
...props,
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
$[6] = children;
|
|
43
|
+
$[7] = props;
|
|
44
|
+
$[8] = t2;
|
|
45
|
+
$[9] = t3;
|
|
46
|
+
} else t3 = $[9];
|
|
47
|
+
return t3;
|
|
48
|
+
}
|
|
49
|
+
function TimeInputSegment(t0) {
|
|
50
|
+
const $ = c(9);
|
|
51
|
+
let className;
|
|
52
|
+
let props;
|
|
53
|
+
if ($[0] !== t0) {
|
|
54
|
+
({className, ...props} = t0);
|
|
55
|
+
$[0] = t0;
|
|
56
|
+
$[1] = className;
|
|
57
|
+
$[2] = props;
|
|
58
|
+
} else {
|
|
59
|
+
className = $[1];
|
|
60
|
+
props = $[2];
|
|
61
|
+
}
|
|
62
|
+
const t1 = props.segment.editable ? segmentClasses : segmentLiteralClasses;
|
|
63
|
+
let t2;
|
|
64
|
+
if ($[3] !== className || $[4] !== t1) {
|
|
65
|
+
t2 = cnState(t1, className);
|
|
66
|
+
$[3] = className;
|
|
67
|
+
$[4] = t1;
|
|
68
|
+
$[5] = t2;
|
|
69
|
+
} else t2 = $[5];
|
|
70
|
+
let t3;
|
|
71
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
72
|
+
t3 = /* @__PURE__ */ jsx(TimeInputSegment$1, {
|
|
73
|
+
className: t2,
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
$[6] = props;
|
|
77
|
+
$[7] = t2;
|
|
78
|
+
$[8] = t3;
|
|
79
|
+
} else t3 = $[8];
|
|
80
|
+
return t3;
|
|
81
|
+
}
|
|
82
|
+
export { TimeInput, TimeInputSegment, createTimeInputController };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Timeline as Timeline$1, TimelineConnector as TimelineConnector$1, TimelineDescription as TimelineDescription$1, TimelineItem as TimelineItem$1, TimelineMarker as TimelineMarker$1, TimelineOrientation, TimelineStatus, TimelineTime as TimelineTime$1, TimelineTitle as TimelineTitle$1, createTimelineController } from "@ui-sdk/react/timeline";
|
|
3
|
+
declare function Timeline({ className, ...props }: ComponentProps<typeof Timeline$1>): import("react").JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* An event. The marker and the connector sit in the gutter at its start, or
|
|
6
|
+
* above it in a horizontal timeline, so anything else inside flows as blocks.
|
|
7
|
+
*/
|
|
8
|
+
declare function TimelineItem({ className, ...props }: ComponentProps<typeof TimelineItem$1>): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* The dot on the line. Without children, a complete event shows a check.
|
|
11
|
+
* Children replace it, like an icon for the kind of event.
|
|
12
|
+
*/
|
|
13
|
+
declare function TimelineMarker({ className, children, ...props }: ComponentProps<typeof TimelineMarker$1>): import("react").JSX.Element;
|
|
14
|
+
/** The line to the next event. The last event hides it. */
|
|
15
|
+
declare function TimelineConnector({ className, ...props }: ComponentProps<typeof TimelineConnector$1>): import("react").JSX.Element;
|
|
16
|
+
declare function TimelineTitle({ className, ...props }: ComponentProps<typeof TimelineTitle$1>): import("react").JSX.Element;
|
|
17
|
+
declare function TimelineTime({ className, ...props }: ComponentProps<typeof TimelineTime$1>): import("react").JSX.Element;
|
|
18
|
+
declare function TimelineDescription({ className, ...props }: ComponentProps<typeof TimelineDescription$1>): import("react").JSX.Element;
|
|
19
|
+
export { Timeline, TimelineConnector, TimelineDescription, TimelineItem, TimelineMarker, type TimelineOrientation, type TimelineStatus, TimelineTime, TimelineTitle, createTimelineController };
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Tick02Icon } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { Timeline as Timeline$1, TimelineConnector as TimelineConnector$1, TimelineDescription as TimelineDescription$1, TimelineItem as TimelineItem$1, TimelineMarker as TimelineMarker$1, TimelineTime as TimelineTime$1, TimelineTitle as TimelineTitle$1, createTimelineController } from "@ui-sdk/react/timeline";
|
|
8
|
+
// src/components/timeline/timeline.tsx
|
|
9
|
+
function Timeline(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("flex flex-col text-sm data-[orientation=horizontal]:grid data-[orientation=horizontal]:auto-cols-fr data-[orientation=horizontal]:grid-flow-col", className);
|
|
25
|
+
$[3] = className;
|
|
26
|
+
$[4] = t1;
|
|
27
|
+
} else t1 = $[4];
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
30
|
+
t2 = /* @__PURE__ */ jsx(Timeline$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
|
+
/**
|
|
41
|
+
* An event. The marker and the connector sit in the gutter at its start, or
|
|
42
|
+
* above it in a horizontal timeline, so anything else inside flows as blocks.
|
|
43
|
+
*/
|
|
44
|
+
function TimelineItem(t0) {
|
|
45
|
+
const $ = c(8);
|
|
46
|
+
let className;
|
|
47
|
+
let props;
|
|
48
|
+
if ($[0] !== t0) {
|
|
49
|
+
({className, ...props} = t0);
|
|
50
|
+
$[0] = t0;
|
|
51
|
+
$[1] = className;
|
|
52
|
+
$[2] = props;
|
|
53
|
+
} else {
|
|
54
|
+
className = $[1];
|
|
55
|
+
props = $[2];
|
|
56
|
+
}
|
|
57
|
+
let t1;
|
|
58
|
+
if ($[3] !== className) {
|
|
59
|
+
t1 = cnState("group/timeline-item relative flex min-w-0 flex-col items-start gap-0.5 rounded-md ps-7 pb-6 focus-ring last:pb-0 data-last:pb-0 data-[orientation=horizontal]:ps-0 data-[orientation=horizontal]:pe-4 data-[orientation=horizontal]:pt-7 data-[orientation=horizontal]:pb-0", className);
|
|
60
|
+
$[3] = className;
|
|
61
|
+
$[4] = t1;
|
|
62
|
+
} else t1 = $[4];
|
|
63
|
+
let t2;
|
|
64
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
65
|
+
t2 = /* @__PURE__ */ jsx(TimelineItem$1, {
|
|
66
|
+
className: t1,
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
$[5] = props;
|
|
70
|
+
$[6] = t1;
|
|
71
|
+
$[7] = t2;
|
|
72
|
+
} else t2 = $[7];
|
|
73
|
+
return t2;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The dot on the line. Without children, a complete event shows a check.
|
|
77
|
+
* Children replace it, like an icon for the kind of event.
|
|
78
|
+
*/
|
|
79
|
+
function TimelineMarker(t0) {
|
|
80
|
+
const $ = c(10);
|
|
81
|
+
let children;
|
|
82
|
+
let className;
|
|
83
|
+
let props;
|
|
84
|
+
if ($[0] !== t0) {
|
|
85
|
+
({className, children, ...props} = t0);
|
|
86
|
+
$[0] = t0;
|
|
87
|
+
$[1] = children;
|
|
88
|
+
$[2] = className;
|
|
89
|
+
$[3] = props;
|
|
90
|
+
} else {
|
|
91
|
+
children = $[1];
|
|
92
|
+
className = $[2];
|
|
93
|
+
props = $[3];
|
|
94
|
+
}
|
|
95
|
+
let t1;
|
|
96
|
+
if ($[4] !== className) {
|
|
97
|
+
t1 = cnState("absolute start-0 top-0.5 flex size-4 items-center justify-center rounded-full border-2 border-input bg-background text-foreground data-[orientation=horizontal]:top-0 data-complete:border-primary data-complete:bg-primary data-complete:text-primary-foreground data-current:border-primary [&_svg]:size-3", className);
|
|
98
|
+
$[4] = className;
|
|
99
|
+
$[5] = t1;
|
|
100
|
+
} else t1 = $[5];
|
|
101
|
+
const t2 = children ?? _temp;
|
|
102
|
+
let t3;
|
|
103
|
+
if ($[6] !== props || $[7] !== t1 || $[8] !== t2) {
|
|
104
|
+
t3 = /* @__PURE__ */ jsx(TimelineMarker$1, {
|
|
105
|
+
className: t1,
|
|
106
|
+
...props,
|
|
107
|
+
children: t2
|
|
108
|
+
});
|
|
109
|
+
$[6] = props;
|
|
110
|
+
$[7] = t1;
|
|
111
|
+
$[8] = t2;
|
|
112
|
+
$[9] = t3;
|
|
113
|
+
} else t3 = $[9];
|
|
114
|
+
return t3;
|
|
115
|
+
}
|
|
116
|
+
/** The line to the next event. The last event hides it. */
|
|
117
|
+
function _temp(state) {
|
|
118
|
+
return state.status === "complete" ? /* @__PURE__ */ jsx(Icon, {
|
|
119
|
+
icon: Tick02Icon,
|
|
120
|
+
strokeWidth: 3
|
|
121
|
+
}) : null;
|
|
122
|
+
}
|
|
123
|
+
function TimelineConnector(t0) {
|
|
124
|
+
const $ = c(8);
|
|
125
|
+
let className;
|
|
126
|
+
let props;
|
|
127
|
+
if ($[0] !== t0) {
|
|
128
|
+
({className, ...props} = t0);
|
|
129
|
+
$[0] = t0;
|
|
130
|
+
$[1] = className;
|
|
131
|
+
$[2] = props;
|
|
132
|
+
} else {
|
|
133
|
+
className = $[1];
|
|
134
|
+
props = $[2];
|
|
135
|
+
}
|
|
136
|
+
let t1;
|
|
137
|
+
if ($[3] !== className) {
|
|
138
|
+
t1 = cnState("absolute start-[calc(--spacing(2)-0.5px)] top-5.5 bottom-1 w-px bg-border group-last/timeline-item:hidden group-data-last/timeline-item:hidden data-complete:bg-primary data-[orientation=horizontal]:start-5.5 data-[orientation=horizontal]:end-1.5 data-[orientation=horizontal]:top-[calc(--spacing(2)-0.5px)] data-[orientation=horizontal]:bottom-auto data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-auto", className);
|
|
139
|
+
$[3] = className;
|
|
140
|
+
$[4] = t1;
|
|
141
|
+
} else t1 = $[4];
|
|
142
|
+
let t2;
|
|
143
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
144
|
+
t2 = /* @__PURE__ */ jsx(TimelineConnector$1, {
|
|
145
|
+
className: t1,
|
|
146
|
+
...props
|
|
147
|
+
});
|
|
148
|
+
$[5] = props;
|
|
149
|
+
$[6] = t1;
|
|
150
|
+
$[7] = t2;
|
|
151
|
+
} else t2 = $[7];
|
|
152
|
+
return t2;
|
|
153
|
+
}
|
|
154
|
+
function TimelineTitle(t0) {
|
|
155
|
+
const $ = c(8);
|
|
156
|
+
let className;
|
|
157
|
+
let props;
|
|
158
|
+
if ($[0] !== t0) {
|
|
159
|
+
({className, ...props} = t0);
|
|
160
|
+
$[0] = t0;
|
|
161
|
+
$[1] = className;
|
|
162
|
+
$[2] = props;
|
|
163
|
+
} else {
|
|
164
|
+
className = $[1];
|
|
165
|
+
props = $[2];
|
|
166
|
+
}
|
|
167
|
+
let t1;
|
|
168
|
+
if ($[3] !== className) {
|
|
169
|
+
t1 = cnState("text-label text-foreground", className);
|
|
170
|
+
$[3] = className;
|
|
171
|
+
$[4] = t1;
|
|
172
|
+
} else t1 = $[4];
|
|
173
|
+
let t2;
|
|
174
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
175
|
+
t2 = /* @__PURE__ */ jsx(TimelineTitle$1, {
|
|
176
|
+
className: t1,
|
|
177
|
+
...props
|
|
178
|
+
});
|
|
179
|
+
$[5] = props;
|
|
180
|
+
$[6] = t1;
|
|
181
|
+
$[7] = t2;
|
|
182
|
+
} else t2 = $[7];
|
|
183
|
+
return t2;
|
|
184
|
+
}
|
|
185
|
+
function TimelineTime(t0) {
|
|
186
|
+
const $ = c(8);
|
|
187
|
+
let className;
|
|
188
|
+
let props;
|
|
189
|
+
if ($[0] !== t0) {
|
|
190
|
+
({className, ...props} = t0);
|
|
191
|
+
$[0] = t0;
|
|
192
|
+
$[1] = className;
|
|
193
|
+
$[2] = props;
|
|
194
|
+
} else {
|
|
195
|
+
className = $[1];
|
|
196
|
+
props = $[2];
|
|
197
|
+
}
|
|
198
|
+
let t1;
|
|
199
|
+
if ($[3] !== className) {
|
|
200
|
+
t1 = cnState("text-xs text-muted-foreground tabular-nums", className);
|
|
201
|
+
$[3] = className;
|
|
202
|
+
$[4] = t1;
|
|
203
|
+
} else t1 = $[4];
|
|
204
|
+
let t2;
|
|
205
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
206
|
+
t2 = /* @__PURE__ */ jsx(TimelineTime$1, {
|
|
207
|
+
className: t1,
|
|
208
|
+
...props
|
|
209
|
+
});
|
|
210
|
+
$[5] = props;
|
|
211
|
+
$[6] = t1;
|
|
212
|
+
$[7] = t2;
|
|
213
|
+
} else t2 = $[7];
|
|
214
|
+
return t2;
|
|
215
|
+
}
|
|
216
|
+
function TimelineDescription(t0) {
|
|
217
|
+
const $ = c(8);
|
|
218
|
+
let className;
|
|
219
|
+
let props;
|
|
220
|
+
if ($[0] !== t0) {
|
|
221
|
+
({className, ...props} = t0);
|
|
222
|
+
$[0] = t0;
|
|
223
|
+
$[1] = className;
|
|
224
|
+
$[2] = props;
|
|
225
|
+
} else {
|
|
226
|
+
className = $[1];
|
|
227
|
+
props = $[2];
|
|
228
|
+
}
|
|
229
|
+
let t1;
|
|
230
|
+
if ($[3] !== className) {
|
|
231
|
+
t1 = cnState("text-sm text-muted-foreground", className);
|
|
232
|
+
$[3] = className;
|
|
233
|
+
$[4] = t1;
|
|
234
|
+
} else t1 = $[4];
|
|
235
|
+
let t2;
|
|
236
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
237
|
+
t2 = /* @__PURE__ */ jsx(TimelineDescription$1, {
|
|
238
|
+
className: t1,
|
|
239
|
+
...props
|
|
240
|
+
});
|
|
241
|
+
$[5] = props;
|
|
242
|
+
$[6] = t1;
|
|
243
|
+
$[7] = t2;
|
|
244
|
+
} else t2 = $[7];
|
|
245
|
+
return t2;
|
|
246
|
+
}
|
|
247
|
+
export { Timeline, TimelineConnector, TimelineDescription, TimelineItem, TimelineMarker, TimelineTime, TimelineTitle, createTimelineController };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonLook } from "../button/button.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { Toast as Toast$1, ToastAction as ToastAction$1, ToastActionData, ToastActionDetails, ToastButtonState, ToastCancel, ToastClose as ToastClose$1, ToastData, ToastDescription as ToastDescription$1, ToastDismissDetails, ToastDismissReason, ToastItem, ToastOptions, ToastPauseReason, ToastRegionOptions, ToastRegionProps, ToastRegionState, ToastState, ToastTitle as ToastTitle$1, ToastType, Toaster, createToaster, toast } from "@ui-sdk/react/toast";
|
|
4
|
+
declare function ToastRegion({ className, children, render, ...props }: ToastRegionProps): import("react").JSX.Element;
|
|
5
|
+
declare function Toast({ className, ...props }: ComponentProps<typeof Toast$1>): import("react").JSX.Element;
|
|
6
|
+
declare function ToastTitle({ className, ...props }: ComponentProps<typeof ToastTitle$1>): import("react").JSX.Element;
|
|
7
|
+
declare function ToastDescription({ className, ...props }: ComponentProps<typeof ToastDescription$1>): import("react").JSX.Element;
|
|
8
|
+
type ToastActionProps = ComponentProps<typeof ToastAction$1> & ButtonLook;
|
|
9
|
+
declare function ToastAction({ variant, size, className, ...props }: ToastActionProps): import("react").JSX.Element;
|
|
10
|
+
type ToastCloseProps = ComponentProps<typeof ToastClose$1> & ButtonLook;
|
|
11
|
+
declare function ToastClose({ variant, size, className, children, ...props }: ToastCloseProps): import("react").JSX.Element;
|
|
12
|
+
export { Toast, ToastAction, type ToastActionData, type ToastActionDetails, type ToastActionProps, type ToastButtonState, type ToastCancel, ToastClose, type ToastCloseProps, type ToastData, ToastDescription, type ToastDismissDetails, type ToastDismissReason, type ToastItem, type ToastOptions, type ToastPauseReason, ToastRegion, type ToastRegionOptions, type ToastRegionProps, type ToastRegionState, type ToastState, ToastTitle, type ToastType, type Toaster, createToaster, toast };
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn, cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { buttonLook } from "../button/button.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 { Alert02Icon, Cancel01Icon, CheckmarkCircle02Icon, InformationCircleIcon, Loading03Icon, MultiplicationSignCircleIcon } from "@hugeicons/core-free-icons";
|
|
8
|
+
import { Toast as Toast$1, ToastAction as ToastAction$1, ToastClose as ToastClose$1, ToastDescription as ToastDescription$1, ToastRegion as ToastRegion$1, ToastTitle as ToastTitle$1, createToaster, toast } from "@ui-sdk/react/toast";
|
|
9
|
+
// src/components/toast/toast.tsx
|
|
10
|
+
const typeIcons = {
|
|
11
|
+
success: CheckmarkCircle02Icon,
|
|
12
|
+
info: InformationCircleIcon,
|
|
13
|
+
warning: Alert02Icon,
|
|
14
|
+
error: MultiplicationSignCircleIcon,
|
|
15
|
+
loading: Loading03Icon
|
|
16
|
+
};
|
|
17
|
+
/** What a region shows for each toast when it's given no children. */
|
|
18
|
+
function defaultToast(item) {
|
|
19
|
+
const icon = item.type && typeIcons[item.type];
|
|
20
|
+
return /* @__PURE__ */ jsxs(Toast, { children: [
|
|
21
|
+
icon && /* @__PURE__ */ jsx(Icon, {
|
|
22
|
+
icon,
|
|
23
|
+
className: cn(item.type === "loading" && "motion-safe:animate-spin")
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "grid flex-1 gap-0.5",
|
|
27
|
+
children: [/* @__PURE__ */ jsx(ToastTitle, {}), /* @__PURE__ */ jsx(ToastDescription, {})]
|
|
28
|
+
}),
|
|
29
|
+
item.cancel && /* @__PURE__ */ jsx(ToastClose, {
|
|
30
|
+
action: item.cancel.onCancel,
|
|
31
|
+
children: item.cancel.label
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsx(ToastAction, {})
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
function ToastRegion(t0) {
|
|
37
|
+
const $ = c(12);
|
|
38
|
+
let className;
|
|
39
|
+
let props;
|
|
40
|
+
let render;
|
|
41
|
+
let t1;
|
|
42
|
+
if ($[0] !== t0) {
|
|
43
|
+
({className, children: t1, render, ...props} = t0);
|
|
44
|
+
$[0] = t0;
|
|
45
|
+
$[1] = className;
|
|
46
|
+
$[2] = props;
|
|
47
|
+
$[3] = render;
|
|
48
|
+
$[4] = t1;
|
|
49
|
+
} else {
|
|
50
|
+
className = $[1];
|
|
51
|
+
props = $[2];
|
|
52
|
+
render = $[3];
|
|
53
|
+
t1 = $[4];
|
|
54
|
+
}
|
|
55
|
+
const children = t1 === void 0 ? defaultToast : t1;
|
|
56
|
+
const t2 = render ?? _temp;
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[5] !== className) {
|
|
59
|
+
t3 = cnState([
|
|
60
|
+
"fixed inset-auto m-4 h-(--toast-front-height) w-89 max-w-[calc(100vw-2rem)] overflow-visible border-0 bg-transparent p-0",
|
|
61
|
+
"data-expanded:h-[calc(var(--toast-stack-height)+(var(--toast-count)-1)*0.75rem)]",
|
|
62
|
+
"data-[side=bottom]:bottom-0 data-[side=top]:top-0",
|
|
63
|
+
"data-[align=start]:start-0 data-[align=end]:end-0 data-[align=center]:left-1/2 data-[align=center]:mx-0 data-[align=center]:-translate-x-1/2"
|
|
64
|
+
], className);
|
|
65
|
+
$[5] = className;
|
|
66
|
+
$[6] = t3;
|
|
67
|
+
} else t3 = $[6];
|
|
68
|
+
let t4;
|
|
69
|
+
if ($[7] !== children || $[8] !== props || $[9] !== t2 || $[10] !== t3) {
|
|
70
|
+
t4 = /* @__PURE__ */ jsx(ToastRegion$1, {
|
|
71
|
+
render: t2,
|
|
72
|
+
className: t3,
|
|
73
|
+
...props,
|
|
74
|
+
children
|
|
75
|
+
});
|
|
76
|
+
$[7] = children;
|
|
77
|
+
$[8] = props;
|
|
78
|
+
$[9] = t2;
|
|
79
|
+
$[10] = t3;
|
|
80
|
+
$[11] = t4;
|
|
81
|
+
} else t4 = $[11];
|
|
82
|
+
return t4;
|
|
83
|
+
}
|
|
84
|
+
function _temp(regionProps, state) {
|
|
85
|
+
return /* @__PURE__ */ jsx("section", {
|
|
86
|
+
...regionProps,
|
|
87
|
+
"data-agent-hidden": state.toasts.length === 0 ? "" : void 0
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function Toast(t0) {
|
|
91
|
+
const $ = c(8);
|
|
92
|
+
let className;
|
|
93
|
+
let props;
|
|
94
|
+
if ($[0] !== t0) {
|
|
95
|
+
({className, ...props} = t0);
|
|
96
|
+
$[0] = t0;
|
|
97
|
+
$[1] = className;
|
|
98
|
+
$[2] = props;
|
|
99
|
+
} else {
|
|
100
|
+
className = $[1];
|
|
101
|
+
props = $[2];
|
|
102
|
+
}
|
|
103
|
+
let t1;
|
|
104
|
+
if ($[3] !== className) {
|
|
105
|
+
t1 = (state) => cn("flex items-center gap-3 rounded-xl border bg-popover p-4 text-sm text-popover-foreground shadow-md select-none focus-ring", "absolute inset-x-0 bottom-0 z-[calc(100-var(--toast-index))] h-(--toast-height) overflow-hidden [--away:-1] [--y:calc(var(--toast-index)*0.75rem*var(--away))] in-data-[side=top]:top-0 in-data-[side=top]:bottom-auto in-data-[side=top]:[--away:1]", "popup-motion [translate:var(--toast-swipe-x,0px)_calc(var(--y)+var(--toast-swipe-y,0px))] scale-[calc(1-var(--toast-index)*0.05)] transition-[translate,scale,opacity,height] duration-sheet ease-out motion-reduce:transition-opacity", "not-data-front:not-data-expanded:h-(--toast-front-height) *:transition-opacity not-data-front:not-data-expanded:*:opacity-0", "data-expanded:scale-100 data-expanded:[--y:calc((var(--toast-offset)+var(--toast-index)*0.75rem)*var(--away))]", "data-starting-style:data-front:[--y:calc(var(--away)*-100%)]", "data-swiping:transition-none", state.leaving && "opacity-0", typeof className === "function" ? className(state) : className);
|
|
106
|
+
$[3] = className;
|
|
107
|
+
$[4] = t1;
|
|
108
|
+
} else t1 = $[4];
|
|
109
|
+
let t2;
|
|
110
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
111
|
+
t2 = /* @__PURE__ */ jsx(Toast$1, {
|
|
112
|
+
className: t1,
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
$[5] = props;
|
|
116
|
+
$[6] = t1;
|
|
117
|
+
$[7] = t2;
|
|
118
|
+
} else t2 = $[7];
|
|
119
|
+
return t2;
|
|
120
|
+
}
|
|
121
|
+
function ToastTitle(t0) {
|
|
122
|
+
const $ = c(8);
|
|
123
|
+
let className;
|
|
124
|
+
let props;
|
|
125
|
+
if ($[0] !== t0) {
|
|
126
|
+
({className, ...props} = t0);
|
|
127
|
+
$[0] = t0;
|
|
128
|
+
$[1] = className;
|
|
129
|
+
$[2] = props;
|
|
130
|
+
} else {
|
|
131
|
+
className = $[1];
|
|
132
|
+
props = $[2];
|
|
133
|
+
}
|
|
134
|
+
let t1;
|
|
135
|
+
if ($[3] !== className) {
|
|
136
|
+
t1 = cnState("text-heading-4", className);
|
|
137
|
+
$[3] = className;
|
|
138
|
+
$[4] = t1;
|
|
139
|
+
} else t1 = $[4];
|
|
140
|
+
let t2;
|
|
141
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
142
|
+
t2 = /* @__PURE__ */ jsx(ToastTitle$1, {
|
|
143
|
+
className: t1,
|
|
144
|
+
...props
|
|
145
|
+
});
|
|
146
|
+
$[5] = props;
|
|
147
|
+
$[6] = t1;
|
|
148
|
+
$[7] = t2;
|
|
149
|
+
} else t2 = $[7];
|
|
150
|
+
return t2;
|
|
151
|
+
}
|
|
152
|
+
function ToastDescription(t0) {
|
|
153
|
+
const $ = c(8);
|
|
154
|
+
let className;
|
|
155
|
+
let props;
|
|
156
|
+
if ($[0] !== t0) {
|
|
157
|
+
({className, ...props} = t0);
|
|
158
|
+
$[0] = t0;
|
|
159
|
+
$[1] = className;
|
|
160
|
+
$[2] = props;
|
|
161
|
+
} else {
|
|
162
|
+
className = $[1];
|
|
163
|
+
props = $[2];
|
|
164
|
+
}
|
|
165
|
+
let t1;
|
|
166
|
+
if ($[3] !== className) {
|
|
167
|
+
t1 = cnState("text-muted-foreground", className);
|
|
168
|
+
$[3] = className;
|
|
169
|
+
$[4] = t1;
|
|
170
|
+
} else t1 = $[4];
|
|
171
|
+
let t2;
|
|
172
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
173
|
+
t2 = /* @__PURE__ */ jsx(ToastDescription$1, {
|
|
174
|
+
className: t1,
|
|
175
|
+
...props
|
|
176
|
+
});
|
|
177
|
+
$[5] = props;
|
|
178
|
+
$[6] = t1;
|
|
179
|
+
$[7] = t2;
|
|
180
|
+
} else t2 = $[7];
|
|
181
|
+
return t2;
|
|
182
|
+
}
|
|
183
|
+
function ToastAction(t0) {
|
|
184
|
+
const $ = c(12);
|
|
185
|
+
let className;
|
|
186
|
+
let props;
|
|
187
|
+
let size;
|
|
188
|
+
let t1;
|
|
189
|
+
if ($[0] !== t0) {
|
|
190
|
+
({variant: t1, size, className, ...props} = t0);
|
|
191
|
+
$[0] = t0;
|
|
192
|
+
$[1] = className;
|
|
193
|
+
$[2] = props;
|
|
194
|
+
$[3] = size;
|
|
195
|
+
$[4] = t1;
|
|
196
|
+
} else {
|
|
197
|
+
className = $[1];
|
|
198
|
+
props = $[2];
|
|
199
|
+
size = $[3];
|
|
200
|
+
t1 = $[4];
|
|
201
|
+
}
|
|
202
|
+
const variant = t1 === void 0 ? "default" : t1;
|
|
203
|
+
let t2;
|
|
204
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
205
|
+
t2 = cnState([buttonLook({
|
|
206
|
+
variant,
|
|
207
|
+
size: size ?? "sm"
|
|
208
|
+
}), "shrink-0"], className);
|
|
209
|
+
$[5] = className;
|
|
210
|
+
$[6] = size;
|
|
211
|
+
$[7] = variant;
|
|
212
|
+
$[8] = t2;
|
|
213
|
+
} else t2 = $[8];
|
|
214
|
+
let t3;
|
|
215
|
+
if ($[9] !== props || $[10] !== t2) {
|
|
216
|
+
t3 = /* @__PURE__ */ jsx(ToastAction$1, {
|
|
217
|
+
className: t2,
|
|
218
|
+
...props
|
|
219
|
+
});
|
|
220
|
+
$[9] = props;
|
|
221
|
+
$[10] = t2;
|
|
222
|
+
$[11] = t3;
|
|
223
|
+
} else t3 = $[11];
|
|
224
|
+
return t3;
|
|
225
|
+
}
|
|
226
|
+
function ToastClose(t0) {
|
|
227
|
+
const $ = c(18);
|
|
228
|
+
let children;
|
|
229
|
+
let className;
|
|
230
|
+
let props;
|
|
231
|
+
let size;
|
|
232
|
+
let variant;
|
|
233
|
+
if ($[0] !== t0) {
|
|
234
|
+
({variant, size, className, children, ...props} = t0);
|
|
235
|
+
$[0] = t0;
|
|
236
|
+
$[1] = children;
|
|
237
|
+
$[2] = className;
|
|
238
|
+
$[3] = props;
|
|
239
|
+
$[4] = size;
|
|
240
|
+
$[5] = variant;
|
|
241
|
+
} else {
|
|
242
|
+
children = $[1];
|
|
243
|
+
className = $[2];
|
|
244
|
+
props = $[3];
|
|
245
|
+
size = $[4];
|
|
246
|
+
variant = $[5];
|
|
247
|
+
}
|
|
248
|
+
const iconOnly = children === void 0;
|
|
249
|
+
let t1;
|
|
250
|
+
if ($[6] !== className || $[7] !== iconOnly || $[8] !== size || $[9] !== variant) {
|
|
251
|
+
t1 = cnState(iconOnly ? [buttonLook({
|
|
252
|
+
variant: variant ?? "ghost",
|
|
253
|
+
size: size ?? "icon-xs"
|
|
254
|
+
}), "shrink-0"] : [buttonLook({
|
|
255
|
+
variant: variant ?? "outline",
|
|
256
|
+
size: size ?? "sm"
|
|
257
|
+
}), "shrink-0"], className);
|
|
258
|
+
$[6] = className;
|
|
259
|
+
$[7] = iconOnly;
|
|
260
|
+
$[8] = size;
|
|
261
|
+
$[9] = variant;
|
|
262
|
+
$[10] = t1;
|
|
263
|
+
} else t1 = $[10];
|
|
264
|
+
let t2;
|
|
265
|
+
if ($[11] !== children || $[12] !== iconOnly) {
|
|
266
|
+
t2 = iconOnly ? /* @__PURE__ */ jsx(Icon, { icon: Cancel01Icon }) : children;
|
|
267
|
+
$[11] = children;
|
|
268
|
+
$[12] = iconOnly;
|
|
269
|
+
$[13] = t2;
|
|
270
|
+
} else t2 = $[13];
|
|
271
|
+
let t3;
|
|
272
|
+
if ($[14] !== props || $[15] !== t1 || $[16] !== t2) {
|
|
273
|
+
t3 = /* @__PURE__ */ jsx(ToastClose$1, {
|
|
274
|
+
className: t1,
|
|
275
|
+
...props,
|
|
276
|
+
children: t2
|
|
277
|
+
});
|
|
278
|
+
$[14] = props;
|
|
279
|
+
$[15] = t1;
|
|
280
|
+
$[16] = t2;
|
|
281
|
+
$[17] = t3;
|
|
282
|
+
} else t3 = $[17];
|
|
283
|
+
return t3;
|
|
284
|
+
}
|
|
285
|
+
export { Toast, ToastAction, ToastClose, ToastDescription, ToastRegion, ToastTitle, createToaster, toast };
|