@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,361 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { buttonLook } from "../button/button.js";
|
|
4
|
+
import { CalendarDay, CalendarGrid, CalendarHeading, CalendarMonthSelect, CalendarNext, CalendarPrevious, CalendarWeekday, CalendarWeekdays, CalendarWeeks, CalendarYearSelect, calendarLayout, calendarParts } from "../calendar/calendar.js";
|
|
5
|
+
import { Icon } from "../icon/icon.js";
|
|
6
|
+
import { inputClasses } from "../input/input.js";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { createContext, use } from "react";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Calendar03Icon, Cancel01Icon } from "@hugeicons/core-free-icons";
|
|
11
|
+
import { DatePicker as DatePicker$1, DatePickerClear as DatePickerClear$1, DatePickerContent as DatePickerContent$1, DatePickerHint as DatePickerHint$1, DatePickerInput as DatePickerInput$1, DatePickerPreset as DatePickerPreset$1, DatePickerTrigger as DatePickerTrigger$1, createDatePickerController } from "@ui-sdk/react/date-picker";
|
|
12
|
+
// src/components/date-picker/date-picker.tsx
|
|
13
|
+
/** How many months the picker shows, for a content with no children to render a grid for each. */
|
|
14
|
+
const MonthsContext = createContext(1);
|
|
15
|
+
/**
|
|
16
|
+
* The input and its buttons share a row, and the hint takes the next one.
|
|
17
|
+
* Without children it renders an input, or two in range mode, the trigger and
|
|
18
|
+
* the calendar. A `Field` names the one input; write a range's two inputs
|
|
19
|
+
* out to name each with `aria-label`.
|
|
20
|
+
*/
|
|
21
|
+
function DatePicker(t0) {
|
|
22
|
+
const $ = c(16);
|
|
23
|
+
let children;
|
|
24
|
+
let className;
|
|
25
|
+
let props;
|
|
26
|
+
if ($[0] !== t0) {
|
|
27
|
+
({className, children, ...props} = t0);
|
|
28
|
+
$[0] = t0;
|
|
29
|
+
$[1] = children;
|
|
30
|
+
$[2] = className;
|
|
31
|
+
$[3] = props;
|
|
32
|
+
} else {
|
|
33
|
+
children = $[1];
|
|
34
|
+
className = $[2];
|
|
35
|
+
props = $[3];
|
|
36
|
+
}
|
|
37
|
+
const t1 = props.months ?? 1;
|
|
38
|
+
let t2;
|
|
39
|
+
if ($[4] !== className) {
|
|
40
|
+
t2 = cnState("flex w-full flex-wrap items-center gap-x-1 gap-y-2", className);
|
|
41
|
+
$[4] = className;
|
|
42
|
+
$[5] = t2;
|
|
43
|
+
} else t2 = $[5];
|
|
44
|
+
let t3;
|
|
45
|
+
if ($[6] !== children || $[7] !== props.mode) {
|
|
46
|
+
t3 = children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx(DatePickerInput, {}),
|
|
48
|
+
props.mode === "range" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
49
|
+
className: "text-muted-foreground",
|
|
50
|
+
children: "–"
|
|
51
|
+
}), /* @__PURE__ */ jsx(DatePickerInput, { end: true })] }),
|
|
52
|
+
/* @__PURE__ */ jsx(DatePickerTrigger, {}),
|
|
53
|
+
/* @__PURE__ */ jsx(DatePickerContent, {})
|
|
54
|
+
] });
|
|
55
|
+
$[6] = children;
|
|
56
|
+
$[7] = props.mode;
|
|
57
|
+
$[8] = t3;
|
|
58
|
+
} else t3 = $[8];
|
|
59
|
+
let t4;
|
|
60
|
+
if ($[9] !== props || $[10] !== t2 || $[11] !== t3) {
|
|
61
|
+
t4 = /* @__PURE__ */ jsx(DatePicker$1, {
|
|
62
|
+
className: t2,
|
|
63
|
+
...props,
|
|
64
|
+
children: t3
|
|
65
|
+
});
|
|
66
|
+
$[9] = props;
|
|
67
|
+
$[10] = t2;
|
|
68
|
+
$[11] = t3;
|
|
69
|
+
$[12] = t4;
|
|
70
|
+
} else t4 = $[12];
|
|
71
|
+
let t5;
|
|
72
|
+
if ($[13] !== t1 || $[14] !== t4) {
|
|
73
|
+
t5 = /* @__PURE__ */ jsx(MonthsContext, {
|
|
74
|
+
value: t1,
|
|
75
|
+
children: t4
|
|
76
|
+
});
|
|
77
|
+
$[13] = t1;
|
|
78
|
+
$[14] = t4;
|
|
79
|
+
$[15] = t5;
|
|
80
|
+
} else t5 = $[15];
|
|
81
|
+
return t5;
|
|
82
|
+
}
|
|
83
|
+
function DatePickerInput(t0) {
|
|
84
|
+
const $ = c(8);
|
|
85
|
+
let className;
|
|
86
|
+
let props;
|
|
87
|
+
if ($[0] !== t0) {
|
|
88
|
+
({className, ...props} = t0);
|
|
89
|
+
$[0] = t0;
|
|
90
|
+
$[1] = className;
|
|
91
|
+
$[2] = props;
|
|
92
|
+
} else {
|
|
93
|
+
className = $[1];
|
|
94
|
+
props = $[2];
|
|
95
|
+
}
|
|
96
|
+
let t1;
|
|
97
|
+
if ($[3] !== className) {
|
|
98
|
+
t1 = cnState([inputClasses, "w-auto flex-1 tabular-nums"], className);
|
|
99
|
+
$[3] = className;
|
|
100
|
+
$[4] = t1;
|
|
101
|
+
} else t1 = $[4];
|
|
102
|
+
let t2;
|
|
103
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
104
|
+
t2 = /* @__PURE__ */ jsx(DatePickerInput$1, {
|
|
105
|
+
className: t1,
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
$[5] = props;
|
|
109
|
+
$[6] = t1;
|
|
110
|
+
$[7] = t2;
|
|
111
|
+
} else t2 = $[7];
|
|
112
|
+
return t2;
|
|
113
|
+
}
|
|
114
|
+
/** An outline icon button. Without children it draws a calendar icon. */
|
|
115
|
+
function DatePickerTrigger(t0) {
|
|
116
|
+
const $ = c(16);
|
|
117
|
+
let children;
|
|
118
|
+
let className;
|
|
119
|
+
let props;
|
|
120
|
+
let t1;
|
|
121
|
+
let t2;
|
|
122
|
+
if ($[0] !== t0) {
|
|
123
|
+
({variant: t1, size: t2, className, children, ...props} = t0);
|
|
124
|
+
$[0] = t0;
|
|
125
|
+
$[1] = children;
|
|
126
|
+
$[2] = className;
|
|
127
|
+
$[3] = props;
|
|
128
|
+
$[4] = t1;
|
|
129
|
+
$[5] = t2;
|
|
130
|
+
} else {
|
|
131
|
+
children = $[1];
|
|
132
|
+
className = $[2];
|
|
133
|
+
props = $[3];
|
|
134
|
+
t1 = $[4];
|
|
135
|
+
t2 = $[5];
|
|
136
|
+
}
|
|
137
|
+
const variant = t1 === void 0 ? "outline" : t1;
|
|
138
|
+
const size = t2 === void 0 ? "icon-sm" : t2;
|
|
139
|
+
let t3;
|
|
140
|
+
if ($[6] !== className || $[7] !== size || $[8] !== variant) {
|
|
141
|
+
t3 = cnState([buttonLook({
|
|
142
|
+
variant,
|
|
143
|
+
size
|
|
144
|
+
}), "shrink-0 rounded-full"], className);
|
|
145
|
+
$[6] = className;
|
|
146
|
+
$[7] = size;
|
|
147
|
+
$[8] = variant;
|
|
148
|
+
$[9] = t3;
|
|
149
|
+
} else t3 = $[9];
|
|
150
|
+
let t4;
|
|
151
|
+
if ($[10] !== children) {
|
|
152
|
+
t4 = children ?? /* @__PURE__ */ jsx(Icon, { icon: Calendar03Icon });
|
|
153
|
+
$[10] = children;
|
|
154
|
+
$[11] = t4;
|
|
155
|
+
} else t4 = $[11];
|
|
156
|
+
let t5;
|
|
157
|
+
if ($[12] !== props || $[13] !== t3 || $[14] !== t4) {
|
|
158
|
+
t5 = /* @__PURE__ */ jsx(DatePickerTrigger$1, {
|
|
159
|
+
className: t3,
|
|
160
|
+
...props,
|
|
161
|
+
children: t4
|
|
162
|
+
});
|
|
163
|
+
$[12] = props;
|
|
164
|
+
$[13] = t3;
|
|
165
|
+
$[14] = t4;
|
|
166
|
+
$[15] = t5;
|
|
167
|
+
} else t5 = $[15];
|
|
168
|
+
return t5;
|
|
169
|
+
}
|
|
170
|
+
function DatePickerHint(t0) {
|
|
171
|
+
const $ = c(8);
|
|
172
|
+
let className;
|
|
173
|
+
let props;
|
|
174
|
+
if ($[0] !== t0) {
|
|
175
|
+
({className, ...props} = t0);
|
|
176
|
+
$[0] = t0;
|
|
177
|
+
$[1] = className;
|
|
178
|
+
$[2] = props;
|
|
179
|
+
} else {
|
|
180
|
+
className = $[1];
|
|
181
|
+
props = $[2];
|
|
182
|
+
}
|
|
183
|
+
let t1;
|
|
184
|
+
if ($[3] !== className) {
|
|
185
|
+
t1 = cnState("basis-full text-sm text-muted-foreground tabular-nums", className);
|
|
186
|
+
$[3] = className;
|
|
187
|
+
$[4] = t1;
|
|
188
|
+
} else t1 = $[4];
|
|
189
|
+
let t2;
|
|
190
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
191
|
+
t2 = /* @__PURE__ */ jsx(DatePickerHint$1, {
|
|
192
|
+
className: t1,
|
|
193
|
+
...props
|
|
194
|
+
});
|
|
195
|
+
$[5] = props;
|
|
196
|
+
$[6] = t1;
|
|
197
|
+
$[7] = t2;
|
|
198
|
+
} else t2 = $[7];
|
|
199
|
+
return t2;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* A ghost icon button with a cross, hidden while there's nothing to clear.
|
|
203
|
+
* Name it with `aria-label`.
|
|
204
|
+
*/
|
|
205
|
+
function DatePickerClear(t0) {
|
|
206
|
+
const $ = c(16);
|
|
207
|
+
let children;
|
|
208
|
+
let className;
|
|
209
|
+
let props;
|
|
210
|
+
let t1;
|
|
211
|
+
let t2;
|
|
212
|
+
if ($[0] !== t0) {
|
|
213
|
+
({variant: t1, size: t2, className, children, ...props} = t0);
|
|
214
|
+
$[0] = t0;
|
|
215
|
+
$[1] = children;
|
|
216
|
+
$[2] = className;
|
|
217
|
+
$[3] = props;
|
|
218
|
+
$[4] = t1;
|
|
219
|
+
$[5] = t2;
|
|
220
|
+
} else {
|
|
221
|
+
children = $[1];
|
|
222
|
+
className = $[2];
|
|
223
|
+
props = $[3];
|
|
224
|
+
t1 = $[4];
|
|
225
|
+
t2 = $[5];
|
|
226
|
+
}
|
|
227
|
+
const variant = t1 === void 0 ? "ghost" : t1;
|
|
228
|
+
const size = t2 === void 0 ? "icon-sm" : t2;
|
|
229
|
+
let t3;
|
|
230
|
+
if ($[6] !== className || $[7] !== size || $[8] !== variant) {
|
|
231
|
+
t3 = cnState([buttonLook({
|
|
232
|
+
variant,
|
|
233
|
+
size
|
|
234
|
+
}), "shrink-0 rounded-full data-empty:hidden"], className);
|
|
235
|
+
$[6] = className;
|
|
236
|
+
$[7] = size;
|
|
237
|
+
$[8] = variant;
|
|
238
|
+
$[9] = t3;
|
|
239
|
+
} else t3 = $[9];
|
|
240
|
+
let t4;
|
|
241
|
+
if ($[10] !== children) {
|
|
242
|
+
t4 = children ?? /* @__PURE__ */ jsx(Icon, { icon: Cancel01Icon });
|
|
243
|
+
$[10] = children;
|
|
244
|
+
$[11] = t4;
|
|
245
|
+
} else t4 = $[11];
|
|
246
|
+
let t5;
|
|
247
|
+
if ($[12] !== props || $[13] !== t3 || $[14] !== t4) {
|
|
248
|
+
t5 = /* @__PURE__ */ jsx(DatePickerClear$1, {
|
|
249
|
+
className: t3,
|
|
250
|
+
...props,
|
|
251
|
+
children: t4
|
|
252
|
+
});
|
|
253
|
+
$[12] = props;
|
|
254
|
+
$[13] = t3;
|
|
255
|
+
$[14] = t4;
|
|
256
|
+
$[15] = t5;
|
|
257
|
+
} else t5 = $[15];
|
|
258
|
+
return t5;
|
|
259
|
+
}
|
|
260
|
+
/** Without children it renders the heading, Previous, Next and a grid for each of the picker's `months`. */
|
|
261
|
+
function DatePickerContent(t0) {
|
|
262
|
+
const $ = c(15);
|
|
263
|
+
let children;
|
|
264
|
+
let className;
|
|
265
|
+
let props;
|
|
266
|
+
let t1;
|
|
267
|
+
if ($[0] !== t0) {
|
|
268
|
+
({className, sideOffset: t1, children, ...props} = t0);
|
|
269
|
+
$[0] = t0;
|
|
270
|
+
$[1] = children;
|
|
271
|
+
$[2] = className;
|
|
272
|
+
$[3] = props;
|
|
273
|
+
$[4] = t1;
|
|
274
|
+
} else {
|
|
275
|
+
children = $[1];
|
|
276
|
+
className = $[2];
|
|
277
|
+
props = $[3];
|
|
278
|
+
t1 = $[4];
|
|
279
|
+
}
|
|
280
|
+
const sideOffset = t1 === void 0 ? 4 : t1;
|
|
281
|
+
const months = use(MonthsContext);
|
|
282
|
+
let t2;
|
|
283
|
+
if ($[5] !== className) {
|
|
284
|
+
t2 = cnState([
|
|
285
|
+
calendarLayout,
|
|
286
|
+
"popup-surface p-3",
|
|
287
|
+
"data-[presentation=popover]:popup-motion data-[presentation=popover]:max-h-(--available-height) data-[presentation=popover]:w-fit data-[presentation=popover]:max-w-(--available-width) data-[presentation=popover]:origin-(--transform-origin) data-[presentation=popover]:overflow-y-auto 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",
|
|
288
|
+
"data-[presentation=sheet]:rounded-t-2xl data-[presentation=sheet]:p-4 data-[presentation=sheet]:shadow-lg data-[presentation=sheet]:pb-[max(--spacing(4),env(safe-area-inset-bottom))] data-[presentation=sheet]:[--cell-size:--spacing(10)]"
|
|
289
|
+
], className);
|
|
290
|
+
$[5] = className;
|
|
291
|
+
$[6] = t2;
|
|
292
|
+
} else t2 = $[6];
|
|
293
|
+
let t3;
|
|
294
|
+
if ($[7] !== children || $[8] !== months) {
|
|
295
|
+
t3 = children ?? calendarParts(months);
|
|
296
|
+
$[7] = children;
|
|
297
|
+
$[8] = months;
|
|
298
|
+
$[9] = t3;
|
|
299
|
+
} else t3 = $[9];
|
|
300
|
+
let t4;
|
|
301
|
+
if ($[10] !== props || $[11] !== sideOffset || $[12] !== t2 || $[13] !== t3) {
|
|
302
|
+
t4 = /* @__PURE__ */ jsx(DatePickerContent$1, {
|
|
303
|
+
sideOffset,
|
|
304
|
+
className: t2,
|
|
305
|
+
...props,
|
|
306
|
+
children: t3
|
|
307
|
+
});
|
|
308
|
+
$[10] = props;
|
|
309
|
+
$[11] = sideOffset;
|
|
310
|
+
$[12] = t2;
|
|
311
|
+
$[13] = t3;
|
|
312
|
+
$[14] = t4;
|
|
313
|
+
} else t4 = $[14];
|
|
314
|
+
return t4;
|
|
315
|
+
}
|
|
316
|
+
/** A ghost button, filled while its value is the one selected. */
|
|
317
|
+
function DatePickerPreset(t0) {
|
|
318
|
+
const $ = c(12);
|
|
319
|
+
let className;
|
|
320
|
+
let props;
|
|
321
|
+
let t1;
|
|
322
|
+
let t2;
|
|
323
|
+
if ($[0] !== t0) {
|
|
324
|
+
({variant: t1, size: t2, className, ...props} = t0);
|
|
325
|
+
$[0] = t0;
|
|
326
|
+
$[1] = className;
|
|
327
|
+
$[2] = props;
|
|
328
|
+
$[3] = t1;
|
|
329
|
+
$[4] = t2;
|
|
330
|
+
} else {
|
|
331
|
+
className = $[1];
|
|
332
|
+
props = $[2];
|
|
333
|
+
t1 = $[3];
|
|
334
|
+
t2 = $[4];
|
|
335
|
+
}
|
|
336
|
+
const variant = t1 === void 0 ? "ghost" : t1;
|
|
337
|
+
const size = t2 === void 0 ? "sm" : t2;
|
|
338
|
+
let t3;
|
|
339
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
340
|
+
t3 = cnState([buttonLook({
|
|
341
|
+
variant,
|
|
342
|
+
size
|
|
343
|
+
}), "data-selected:bg-primary data-selected:text-primary-foreground"], className);
|
|
344
|
+
$[5] = className;
|
|
345
|
+
$[6] = size;
|
|
346
|
+
$[7] = variant;
|
|
347
|
+
$[8] = t3;
|
|
348
|
+
} else t3 = $[8];
|
|
349
|
+
let t4;
|
|
350
|
+
if ($[9] !== props || $[10] !== t3) {
|
|
351
|
+
t4 = /* @__PURE__ */ jsx(DatePickerPreset$1, {
|
|
352
|
+
className: t3,
|
|
353
|
+
...props
|
|
354
|
+
});
|
|
355
|
+
$[9] = props;
|
|
356
|
+
$[10] = t3;
|
|
357
|
+
$[11] = t4;
|
|
358
|
+
} else t4 = $[11];
|
|
359
|
+
return t4;
|
|
360
|
+
}
|
|
361
|
+
export { CalendarDay, CalendarGrid, CalendarHeading, CalendarMonthSelect, CalendarNext, CalendarPrevious, CalendarWeekday, CalendarWeekdays, CalendarWeeks, CalendarYearSelect, DatePicker, DatePickerClear, DatePickerContent, DatePickerHint, DatePickerInput, DatePickerPreset, DatePickerTrigger, createDatePickerController };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ButtonLook } from "../button/button.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { DialogBackdrop as DialogBackdrop$1, DialogClose as DialogClose$1, DialogContent as DialogContent$1, DialogDescription as DialogDescription$1, DialogProps, DialogShortcut as DialogShortcut$1, DialogTitle as DialogTitle$1, DialogTrigger as DialogTrigger$1, createDialogController } from "@ui-sdk/react/dialog";
|
|
4
|
+
declare function Dialog(props: DialogProps): import("react").JSX.Element;
|
|
5
|
+
type DialogTriggerProps = ComponentProps<typeof DialogTrigger$1> & ButtonLook;
|
|
6
|
+
declare function DialogTrigger({ variant, size, className, ...props }: DialogTriggerProps): import("react").JSX.Element;
|
|
7
|
+
declare function DialogBackdrop({ className, ...props }: ComponentProps<typeof DialogBackdrop$1>): import("react").JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, ...props }: ComponentProps<typeof DialogContent$1>): import("react").JSX.Element;
|
|
9
|
+
declare function DialogTitle({ className, ...props }: ComponentProps<typeof DialogTitle$1>): import("react").JSX.Element;
|
|
10
|
+
declare function DialogDescription({ className, ...props }: ComponentProps<typeof DialogDescription$1>): import("react").JSX.Element;
|
|
11
|
+
type DialogCloseProps = ComponentProps<typeof DialogClose$1> & ButtonLook;
|
|
12
|
+
declare function DialogClose({ variant, size, className, ...props }: DialogCloseProps): import("react").JSX.Element;
|
|
13
|
+
declare function DialogShortcut({ className, ...props }: ComponentProps<typeof DialogShortcut$1>): import("react").JSX.Element;
|
|
14
|
+
export { Dialog, DialogBackdrop, DialogClose, type DialogCloseProps, DialogContent, DialogDescription, type DialogProps, DialogShortcut, DialogTitle, DialogTrigger, type DialogTriggerProps, createDialogController };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { buttonLook } from "../button/button.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Dialog as Dialog$1, DialogBackdrop as DialogBackdrop$1, DialogClose as DialogClose$1, DialogContent as DialogContent$1, DialogDescription as DialogDescription$1, DialogShortcut as DialogShortcut$1, DialogTitle as DialogTitle$1, DialogTrigger as DialogTrigger$1, createDialogController } from "@ui-sdk/react/dialog";
|
|
7
|
+
// src/components/dialog/dialog.tsx
|
|
8
|
+
function Dialog(props) {
|
|
9
|
+
const $ = c(2);
|
|
10
|
+
let t0;
|
|
11
|
+
if ($[0] !== props) {
|
|
12
|
+
t0 = /* @__PURE__ */ jsx(Dialog$1, { ...props });
|
|
13
|
+
$[0] = props;
|
|
14
|
+
$[1] = t0;
|
|
15
|
+
} else t0 = $[1];
|
|
16
|
+
return t0;
|
|
17
|
+
}
|
|
18
|
+
function DialogTrigger(t0) {
|
|
19
|
+
const $ = c(12);
|
|
20
|
+
let className;
|
|
21
|
+
let props;
|
|
22
|
+
let size;
|
|
23
|
+
let variant;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({variant, size, className, ...props} = t0);
|
|
26
|
+
$[0] = t0;
|
|
27
|
+
$[1] = className;
|
|
28
|
+
$[2] = props;
|
|
29
|
+
$[3] = size;
|
|
30
|
+
$[4] = variant;
|
|
31
|
+
} else {
|
|
32
|
+
className = $[1];
|
|
33
|
+
props = $[2];
|
|
34
|
+
size = $[3];
|
|
35
|
+
variant = $[4];
|
|
36
|
+
}
|
|
37
|
+
let t1;
|
|
38
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
39
|
+
t1 = cnState(buttonLook({
|
|
40
|
+
variant,
|
|
41
|
+
size
|
|
42
|
+
}), className);
|
|
43
|
+
$[5] = className;
|
|
44
|
+
$[6] = size;
|
|
45
|
+
$[7] = variant;
|
|
46
|
+
$[8] = t1;
|
|
47
|
+
} else t1 = $[8];
|
|
48
|
+
let t2;
|
|
49
|
+
if ($[9] !== props || $[10] !== t1) {
|
|
50
|
+
t2 = /* @__PURE__ */ jsx(DialogTrigger$1, {
|
|
51
|
+
className: t1,
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
$[9] = props;
|
|
55
|
+
$[10] = t1;
|
|
56
|
+
$[11] = t2;
|
|
57
|
+
} else t2 = $[11];
|
|
58
|
+
return t2;
|
|
59
|
+
}
|
|
60
|
+
function DialogBackdrop(t0) {
|
|
61
|
+
const $ = c(8);
|
|
62
|
+
let className;
|
|
63
|
+
let props;
|
|
64
|
+
if ($[0] !== t0) {
|
|
65
|
+
({className, ...props} = t0);
|
|
66
|
+
$[0] = t0;
|
|
67
|
+
$[1] = className;
|
|
68
|
+
$[2] = props;
|
|
69
|
+
} else {
|
|
70
|
+
className = $[1];
|
|
71
|
+
props = $[2];
|
|
72
|
+
}
|
|
73
|
+
let t1;
|
|
74
|
+
if ($[3] !== className) {
|
|
75
|
+
t1 = cnState("popup-overlay [--popup-duration:var(--transition-duration-modal)]", className);
|
|
76
|
+
$[3] = className;
|
|
77
|
+
$[4] = t1;
|
|
78
|
+
} else t1 = $[4];
|
|
79
|
+
let t2;
|
|
80
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
81
|
+
t2 = /* @__PURE__ */ jsx(DialogBackdrop$1, {
|
|
82
|
+
className: t1,
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
$[5] = props;
|
|
86
|
+
$[6] = t1;
|
|
87
|
+
$[7] = t2;
|
|
88
|
+
} else t2 = $[7];
|
|
89
|
+
return t2;
|
|
90
|
+
}
|
|
91
|
+
function DialogContent(t0) {
|
|
92
|
+
const $ = c(8);
|
|
93
|
+
let className;
|
|
94
|
+
let props;
|
|
95
|
+
if ($[0] !== t0) {
|
|
96
|
+
({className, ...props} = t0);
|
|
97
|
+
$[0] = t0;
|
|
98
|
+
$[1] = className;
|
|
99
|
+
$[2] = props;
|
|
100
|
+
} else {
|
|
101
|
+
className = $[1];
|
|
102
|
+
props = $[2];
|
|
103
|
+
}
|
|
104
|
+
let t1;
|
|
105
|
+
if ($[3] !== className) {
|
|
106
|
+
t1 = cnState([
|
|
107
|
+
"grid gap-4 bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10 outline-none",
|
|
108
|
+
"data-[presentation=dialog]:popup-motion data-[presentation=dialog]:fixed data-[presentation=dialog]:inset-0 data-[presentation=dialog]:m-auto data-[presentation=dialog]:h-fit data-[presentation=dialog]:max-h-[calc(100%-2rem)] data-[presentation=dialog]:w-full data-[presentation=dialog]:max-w-[calc(100%-2rem)] data-[presentation=dialog]:overflow-y-auto data-[presentation=dialog]:rounded-2xl data-[presentation=dialog]:[--popup-duration:var(--transition-duration-modal)] data-[presentation=dialog]:data-starting-style:scale-[0.96] data-[presentation=dialog]:data-closed:scale-[0.96] data-[presentation=dialog]:sm:max-w-sm",
|
|
109
|
+
"data-[presentation=sheet]:rounded-t-2xl"
|
|
110
|
+
], className);
|
|
111
|
+
$[3] = className;
|
|
112
|
+
$[4] = t1;
|
|
113
|
+
} else t1 = $[4];
|
|
114
|
+
let t2;
|
|
115
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
116
|
+
t2 = /* @__PURE__ */ jsx(DialogContent$1, {
|
|
117
|
+
className: t1,
|
|
118
|
+
...props
|
|
119
|
+
});
|
|
120
|
+
$[5] = props;
|
|
121
|
+
$[6] = t1;
|
|
122
|
+
$[7] = t2;
|
|
123
|
+
} else t2 = $[7];
|
|
124
|
+
return t2;
|
|
125
|
+
}
|
|
126
|
+
function DialogTitle(t0) {
|
|
127
|
+
const $ = c(8);
|
|
128
|
+
let className;
|
|
129
|
+
let props;
|
|
130
|
+
if ($[0] !== t0) {
|
|
131
|
+
({className, ...props} = t0);
|
|
132
|
+
$[0] = t0;
|
|
133
|
+
$[1] = className;
|
|
134
|
+
$[2] = props;
|
|
135
|
+
} else {
|
|
136
|
+
className = $[1];
|
|
137
|
+
props = $[2];
|
|
138
|
+
}
|
|
139
|
+
let t1;
|
|
140
|
+
if ($[3] !== className) {
|
|
141
|
+
t1 = cnState("text-heading-3", className);
|
|
142
|
+
$[3] = className;
|
|
143
|
+
$[4] = t1;
|
|
144
|
+
} else t1 = $[4];
|
|
145
|
+
let t2;
|
|
146
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
147
|
+
t2 = /* @__PURE__ */ jsx(DialogTitle$1, {
|
|
148
|
+
className: t1,
|
|
149
|
+
...props
|
|
150
|
+
});
|
|
151
|
+
$[5] = props;
|
|
152
|
+
$[6] = t1;
|
|
153
|
+
$[7] = t2;
|
|
154
|
+
} else t2 = $[7];
|
|
155
|
+
return t2;
|
|
156
|
+
}
|
|
157
|
+
function DialogDescription(t0) {
|
|
158
|
+
const $ = c(8);
|
|
159
|
+
let className;
|
|
160
|
+
let props;
|
|
161
|
+
if ($[0] !== t0) {
|
|
162
|
+
({className, ...props} = t0);
|
|
163
|
+
$[0] = t0;
|
|
164
|
+
$[1] = className;
|
|
165
|
+
$[2] = props;
|
|
166
|
+
} else {
|
|
167
|
+
className = $[1];
|
|
168
|
+
props = $[2];
|
|
169
|
+
}
|
|
170
|
+
let t1;
|
|
171
|
+
if ($[3] !== className) {
|
|
172
|
+
t1 = cnState("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className);
|
|
173
|
+
$[3] = className;
|
|
174
|
+
$[4] = t1;
|
|
175
|
+
} else t1 = $[4];
|
|
176
|
+
let t2;
|
|
177
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
178
|
+
t2 = /* @__PURE__ */ jsx(DialogDescription$1, {
|
|
179
|
+
className: t1,
|
|
180
|
+
...props
|
|
181
|
+
});
|
|
182
|
+
$[5] = props;
|
|
183
|
+
$[6] = t1;
|
|
184
|
+
$[7] = t2;
|
|
185
|
+
} else t2 = $[7];
|
|
186
|
+
return t2;
|
|
187
|
+
}
|
|
188
|
+
function DialogClose(t0) {
|
|
189
|
+
const $ = c(12);
|
|
190
|
+
let className;
|
|
191
|
+
let props;
|
|
192
|
+
let size;
|
|
193
|
+
let variant;
|
|
194
|
+
if ($[0] !== t0) {
|
|
195
|
+
({variant, size, className, ...props} = t0);
|
|
196
|
+
$[0] = t0;
|
|
197
|
+
$[1] = className;
|
|
198
|
+
$[2] = props;
|
|
199
|
+
$[3] = size;
|
|
200
|
+
$[4] = variant;
|
|
201
|
+
} else {
|
|
202
|
+
className = $[1];
|
|
203
|
+
props = $[2];
|
|
204
|
+
size = $[3];
|
|
205
|
+
variant = $[4];
|
|
206
|
+
}
|
|
207
|
+
let t1;
|
|
208
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
209
|
+
t1 = cnState(buttonLook({
|
|
210
|
+
variant,
|
|
211
|
+
size
|
|
212
|
+
}), className);
|
|
213
|
+
$[5] = className;
|
|
214
|
+
$[6] = size;
|
|
215
|
+
$[7] = variant;
|
|
216
|
+
$[8] = t1;
|
|
217
|
+
} else t1 = $[8];
|
|
218
|
+
let t2;
|
|
219
|
+
if ($[9] !== props || $[10] !== t1) {
|
|
220
|
+
t2 = /* @__PURE__ */ jsx(DialogClose$1, {
|
|
221
|
+
className: t1,
|
|
222
|
+
...props
|
|
223
|
+
});
|
|
224
|
+
$[9] = props;
|
|
225
|
+
$[10] = t1;
|
|
226
|
+
$[11] = t2;
|
|
227
|
+
} else t2 = $[11];
|
|
228
|
+
return t2;
|
|
229
|
+
}
|
|
230
|
+
function DialogShortcut(t0) {
|
|
231
|
+
const $ = c(8);
|
|
232
|
+
let className;
|
|
233
|
+
let props;
|
|
234
|
+
if ($[0] !== t0) {
|
|
235
|
+
({className, ...props} = t0);
|
|
236
|
+
$[0] = t0;
|
|
237
|
+
$[1] = className;
|
|
238
|
+
$[2] = props;
|
|
239
|
+
} else {
|
|
240
|
+
className = $[1];
|
|
241
|
+
props = $[2];
|
|
242
|
+
}
|
|
243
|
+
let t1;
|
|
244
|
+
if ($[3] !== className) {
|
|
245
|
+
t1 = cnState("ms-auto text-xs tracking-widest text-muted-foreground", className);
|
|
246
|
+
$[3] = className;
|
|
247
|
+
$[4] = t1;
|
|
248
|
+
} else t1 = $[4];
|
|
249
|
+
let t2;
|
|
250
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
251
|
+
t2 = /* @__PURE__ */ jsx(DialogShortcut$1, {
|
|
252
|
+
className: t1,
|
|
253
|
+
...props
|
|
254
|
+
});
|
|
255
|
+
$[5] = props;
|
|
256
|
+
$[6] = t1;
|
|
257
|
+
$[7] = t2;
|
|
258
|
+
} else t2 = $[7];
|
|
259
|
+
return t2;
|
|
260
|
+
}
|
|
261
|
+
export { Dialog, DialogBackdrop, DialogClose, DialogContent, DialogDescription, DialogShortcut, DialogTitle, DialogTrigger, createDialogController };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonLook } from "../button/button.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { DrawerApi, DrawerBackdrop as DrawerBackdrop$1, DrawerBackdropState, DrawerClose as DrawerClose$1, DrawerContent as DrawerContent$1, DrawerContentProps, DrawerContentState, DrawerController, DrawerDescription as DrawerDescription$1, DrawerDismissAttemptDetails, DrawerDismissReason, DrawerDriver, DrawerHandle as DrawerHandle$1, DrawerHandleState, DrawerKeyframes, DrawerOpenChangeReason, DrawerOutlet as DrawerOutlet$1, DrawerOutletProps, DrawerOutletState, DrawerPayloadChangeReason, DrawerProps, DrawerShortcut as DrawerShortcut$1, DrawerSide, DrawerSnapPointChangeReason, DrawerTitle as DrawerTitle$1, DrawerTrigger as DrawerTrigger$1, SheetPhysics, SnapPoint, createDrawerController, sheetPhysics } from "@ui-sdk/react/drawer";
|
|
4
|
+
declare function Drawer(props: DrawerProps): import("react").JSX.Element;
|
|
5
|
+
type DrawerTriggerProps = ComponentProps<typeof DrawerTrigger$1> & ButtonLook;
|
|
6
|
+
declare function DrawerTrigger({ variant, size, className, ...props }: DrawerTriggerProps): import("react").JSX.Element;
|
|
7
|
+
declare function DrawerBackdrop({ className, ...props }: ComponentProps<typeof DrawerBackdrop$1>): import("react").JSX.Element;
|
|
8
|
+
declare function DrawerContent<Payload = unknown>({ className, ...props }: ComponentProps<typeof DrawerContent$1<Payload>>): import("react").JSX.Element;
|
|
9
|
+
declare function DrawerHandle({ className, ...props }: ComponentProps<typeof DrawerHandle$1>): import("react").JSX.Element;
|
|
10
|
+
declare function DrawerTitle({ className, ...props }: ComponentProps<typeof DrawerTitle$1>): import("react").JSX.Element;
|
|
11
|
+
declare function DrawerDescription({ className, ...props }: ComponentProps<typeof DrawerDescription$1>): import("react").JSX.Element;
|
|
12
|
+
type DrawerCloseProps = ComponentProps<typeof DrawerClose$1> & ButtonLook;
|
|
13
|
+
declare function DrawerClose({ variant, size, className, ...props }: DrawerCloseProps): import("react").JSX.Element;
|
|
14
|
+
declare function DrawerShortcut({ className, ...props }: ComponentProps<typeof DrawerShortcut$1>): import("react").JSX.Element;
|
|
15
|
+
declare function DrawerOutlet(props: ComponentProps<typeof DrawerOutlet$1>): import("react").JSX.Element;
|
|
16
|
+
export { Drawer, type DrawerApi, DrawerBackdrop, type DrawerBackdropState, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, type DrawerContentState, type DrawerController, DrawerDescription, type DrawerDismissAttemptDetails, type DrawerDismissReason, type DrawerDriver, DrawerHandle, type DrawerHandleState, type DrawerKeyframes, type DrawerOpenChangeReason, DrawerOutlet, type DrawerOutletProps, type DrawerOutletState, type DrawerPayloadChangeReason, type DrawerProps, DrawerShortcut, type DrawerSide, type DrawerSnapPointChangeReason, DrawerTitle, DrawerTrigger, type DrawerTriggerProps, type SheetPhysics, type SnapPoint, createDrawerController, sheetPhysics };
|