@asanchez-sa/abby 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +217 -2
- package/dist/_virtual/_rolldown/runtime.js +26 -0
- package/dist/agents/approvals.d.ts +46 -0
- package/dist/agents/approvals.js +58 -0
- package/dist/agents/changes.d.ts +21 -0
- package/dist/agents/changes.js +21 -0
- package/dist/agents/hooks.d.ts +20 -0
- package/dist/agents/hooks.js +58 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/run-tool.d.ts +44 -0
- package/dist/agents/run-tool.js +79 -0
- package/dist/agents/ui-sdk.d.ts +5 -0
- package/dist/agents/ui-sdk.js +3 -0
- package/dist/behaviors/canvas/index.d.ts +2 -0
- package/dist/behaviors/canvas/index.js +1 -0
- package/dist/behaviors/canvas/ui-sdk.d.ts +2 -0
- package/dist/behaviors/canvas/ui-sdk.js +1 -0
- package/dist/behaviors/drag-and-drop/index.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/index.js +1 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.js +1 -0
- package/dist/behaviors/dragging/index.d.ts +2 -0
- package/dist/behaviors/dragging/index.js +1 -0
- package/dist/behaviors/dragging/ui-sdk.d.ts +2 -0
- package/dist/behaviors/dragging/ui-sdk.js +1 -0
- package/dist/behaviors/focus/index.d.ts +2 -0
- package/dist/behaviors/focus/index.js +1 -0
- package/dist/behaviors/focus/ui-sdk.d.ts +2 -0
- package/dist/behaviors/focus/ui-sdk.js +1 -0
- package/dist/behaviors/lists/index.d.ts +3 -0
- package/dist/behaviors/lists/index.js +3 -0
- package/dist/behaviors/lists/ui-sdk.d.ts +3 -0
- package/dist/behaviors/lists/ui-sdk.js +3 -0
- package/dist/behaviors/popups/index.d.ts +3 -0
- package/dist/behaviors/popups/index.js +3 -0
- package/dist/behaviors/popups/ui-sdk.d.ts +3 -0
- package/dist/behaviors/popups/ui-sdk.js +3 -0
- package/dist/behaviors/preferences/index.d.ts +3 -0
- package/dist/behaviors/preferences/index.js +3 -0
- package/dist/behaviors/preferences/ui-sdk.d.ts +3 -0
- package/dist/behaviors/preferences/ui-sdk.js +3 -0
- package/dist/behaviors/selection/index.d.ts +3 -0
- package/dist/behaviors/selection/index.js +3 -0
- package/dist/behaviors/selection/indicator.d.ts +13 -0
- package/dist/behaviors/selection/indicator.js +20 -0
- package/dist/behaviors/selection/ui-sdk.d.ts +2 -0
- package/dist/behaviors/selection/ui-sdk.js +1 -0
- package/dist/behaviors/transitions/index.d.ts +3 -0
- package/dist/behaviors/transitions/index.js +3 -0
- package/dist/behaviors/transitions/ui-sdk.d.ts +3 -0
- package/dist/behaviors/transitions/ui-sdk.js +3 -0
- package/dist/behaviors/trees/index.d.ts +2 -0
- package/dist/behaviors/trees/index.js +1 -0
- package/dist/behaviors/trees/ui-sdk.d.ts +2 -0
- package/dist/behaviors/trees/ui-sdk.js +1 -0
- package/dist/components/accordion/accordion.d.ts +13 -0
- package/dist/components/accordion/accordion.js +165 -0
- package/dist/components/alert/alert.d.ts +13 -0
- package/dist/components/alert/alert.js +131 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog.js +257 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +57 -0
- package/dist/components/attachment/attachment.d.ts +48 -0
- package/dist/components/attachment/attachment.js +372 -0
- package/dist/components/autocomplete/autocomplete.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete.js +466 -0
- package/dist/components/avatar/avatar.d.ts +6 -0
- package/dist/components/avatar/avatar.js +100 -0
- package/dist/components/avatar-group/avatar-group.d.ts +9 -0
- package/dist/components/avatar-group/avatar-group.js +75 -0
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.js +31 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb.js +279 -0
- package/dist/components/bubble/bubble.d.ts +26 -0
- package/dist/components/bubble/bubble.js +173 -0
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button-group/button-group.d.ts +15 -0
- package/dist/components/button-group/button-group.js +71 -0
- package/dist/components/calendar/calendar.d.ts +29 -0
- package/dist/components/calendar/calendar.js +453 -0
- package/dist/components/card/card.d.ts +14 -0
- package/dist/components/card/card.js +213 -0
- package/dist/components/carousel/carousel.d.ts +16 -0
- package/dist/components/carousel/carousel.js +364 -0
- package/dist/components/chain-of-thought/chain-of-thought.d.ts +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.js +491 -0
- package/dist/components/chat/chat.d.ts +48 -0
- package/dist/components/chat/chat.js +207 -0
- package/dist/components/checkbox/checkbox.d.ts +10 -0
- package/dist/components/checkbox/checkbox.js +118 -0
- package/dist/components/checkpoint/checkpoint.d.ts +24 -0
- package/dist/components/checkpoint/checkpoint.js +178 -0
- package/dist/components/choice-cards/choice-cards.d.ts +38 -0
- package/dist/components/choice-cards/choice-cards.js +255 -0
- package/dist/components/code-block/code-block.d.ts +58 -0
- package/dist/components/code-block/code-block.js +506 -0
- package/dist/components/code-block/highlighter.js +96 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +11 -0
- package/dist/components/code-block/use-highlighted-code.js +54 -0
- package/dist/components/collapsible/collapsible.d.ts +10 -0
- package/dist/components/collapsible/collapsible.js +92 -0
- package/dist/components/color-picker/color-picker.d.ts +17 -0
- package/dist/components/color-picker/color-picker.js +395 -0
- package/dist/components/combobox/combobox.d.ts +54 -0
- package/dist/components/combobox/combobox.js +683 -0
- package/dist/components/command/command.d.ts +23 -0
- package/dist/components/command/command.js +373 -0
- package/dist/components/command-dock/command-dock.d.ts +118 -0
- package/dist/components/command-dock/command-dock.js +944 -0
- package/dist/components/confirmation/confirmation.d.ts +58 -0
- package/dist/components/confirmation/confirmation.js +181 -0
- package/dist/components/context/context.d.ts +82 -0
- package/dist/components/context/context.js +490 -0
- package/dist/components/date-input/date-input.d.ts +16 -0
- package/dist/components/date-input/date-input.js +89 -0
- package/dist/components/date-picker/date-picker.d.ts +28 -0
- package/dist/components/date-picker/date-picker.js +361 -0
- package/dist/components/dialog/dialog.d.ts +14 -0
- package/dist/components/dialog/dialog.js +261 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.js +309 -0
- package/dist/components/empty/empty.d.ts +18 -0
- package/dist/components/empty/empty.js +192 -0
- package/dist/components/field/field.d.ts +15 -0
- package/dist/components/field/field.js +261 -0
- package/dist/components/file-input/file-input.d.ts +12 -0
- package/dist/components/file-input/file-input.js +216 -0
- package/dist/components/file-tree/file-tree.d.ts +45 -0
- package/dist/components/file-tree/file-tree.js +283 -0
- package/dist/components/hover-card/hover-card.d.ts +10 -0
- package/dist/components/hover-card/hover-card.js +118 -0
- package/dist/components/icon/icon.d.ts +14 -0
- package/dist/components/icon/icon.js +60 -0
- package/dist/components/image-cropper/image-cropper.d.ts +15 -0
- package/dist/components/image-cropper/image-cropper.js +334 -0
- package/dist/components/inline-citation/inline-citation.d.ts +46 -0
- package/dist/components/inline-citation/inline-citation.js +269 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/input/input.js +43 -0
- package/dist/components/input-group/input-group.d.ts +42 -0
- package/dist/components/input-group/input-group.js +192 -0
- package/dist/components/item/item.d.ts +32 -0
- package/dist/components/item/item.js +394 -0
- package/dist/components/kbd/kbd.d.ts +9 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.js +40 -0
- package/dist/components/link/link.d.ts +21 -0
- package/dist/components/link/link.js +126 -0
- package/dist/components/listbox/listbox.d.ts +20 -0
- package/dist/components/listbox/listbox.js +199 -0
- package/dist/components/marker/marker.d.ts +11 -0
- package/dist/components/marker/marker.js +88 -0
- package/dist/components/menu/menu.d.ts +38 -0
- package/dist/components/menu/menu.js +553 -0
- package/dist/components/menubar/menubar.d.ts +9 -0
- package/dist/components/menubar/menubar.js +47 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/message.js +328 -0
- package/dist/components/message-scroller/message-scroller.d.ts +111 -0
- package/dist/components/message-scroller/message-scroller.js +957 -0
- package/dist/components/meter/meter.d.ts +8 -0
- package/dist/components/meter/meter.js +162 -0
- package/dist/components/model-selector/model-selector.d.ts +155 -0
- package/dist/components/model-selector/model-selector.js +905 -0
- package/dist/components/native-select/native-select.d.ts +27 -0
- package/dist/components/native-select/native-select.js +226 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +29 -0
- package/dist/components/navigation-menu/navigation-menu.js +318 -0
- package/dist/components/not-label.js +9 -0
- package/dist/components/note-editor/blocks.d.ts +22 -0
- package/dist/components/note-editor/blocks.js +245 -0
- package/dist/components/note-editor/diff.d.ts +19 -0
- package/dist/components/note-editor/diff.js +64 -0
- package/dist/components/note-editor/editor.js +249 -0
- package/dist/components/note-editor/note-editor.d.ts +109 -0
- package/dist/components/note-editor/note-editor.js +954 -0
- package/dist/components/note-editor/parts/comments.d.ts +24 -0
- package/dist/components/note-editor/parts/comments.js +336 -0
- package/dist/components/note-editor/parts/header.d.ts +25 -0
- package/dist/components/note-editor/parts/header.js +263 -0
- package/dist/components/note-editor/parts/history.d.ts +56 -0
- package/dist/components/note-editor/parts/history.js +409 -0
- package/dist/components/note-editor/parts/presence.d.ts +31 -0
- package/dist/components/note-editor/parts/presence.js +140 -0
- package/dist/components/note-editor/parts/suggestions.d.ts +45 -0
- package/dist/components/note-editor/parts/suggestions.js +316 -0
- package/dist/components/note-editor/parts/toolbar.d.ts +38 -0
- package/dist/components/note-editor/parts/toolbar.js +683 -0
- package/dist/components/note-editor/people.d.ts +84 -0
- package/dist/components/note-editor/people.js +276 -0
- package/dist/components/note-editor/person.d.ts +11 -0
- package/dist/components/note-editor/person.js +15 -0
- package/dist/components/note-place/note-place.d.ts +42 -0
- package/dist/components/note-place/note-place.js +256 -0
- package/dist/components/note-status/note-status.d.ts +59 -0
- package/dist/components/note-status/note-status.js +380 -0
- package/dist/components/number-input/number-input.d.ts +12 -0
- package/dist/components/number-input/number-input.js +252 -0
- package/dist/components/otp-input/otp-input.d.ts +12 -0
- package/dist/components/otp-input/otp-input.js +136 -0
- package/dist/components/pagination/pagination.d.ts +23 -0
- package/dist/components/pagination/pagination.js +218 -0
- package/dist/components/password-input/password-input.d.ts +11 -0
- package/dist/components/password-input/password-input.js +117 -0
- package/dist/components/plan/plan.d.ts +51 -0
- package/dist/components/plan/plan.js +320 -0
- package/dist/components/popover/popover.d.ts +16 -0
- package/dist/components/popover/popover.js +268 -0
- package/dist/components/preferences/preferences.d.ts +5 -0
- package/dist/components/preferences/preferences.js +18 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +162 -0
- package/dist/components/prompt-input/prompt-input.d.ts +247 -0
- package/dist/components/prompt-input/prompt-input.js +1367 -0
- package/dist/components/questionnaire/questionnaire.d.ts +174 -0
- package/dist/components/questionnaire/questionnaire.js +1628 -0
- package/dist/components/queue/queue.d.ts +82 -0
- package/dist/components/queue/queue.js +471 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.js +101 -0
- package/dist/components/rating/rating.d.ts +10 -0
- package/dist/components/rating/rating.js +95 -0
- package/dist/components/reasoning/reasoning.d.ts +50 -0
- package/dist/components/reasoning/reasoning.js +233 -0
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/resizable/resizable.js +100 -0
- package/dist/components/scroll-area/scroll-area.d.ts +17 -0
- package/dist/components/scroll-area/scroll-area.js +211 -0
- package/dist/components/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/segmented-control/segmented-control.js +142 -0
- package/dist/components/select/select.d.ts +43 -0
- package/dist/components/select/select.js +577 -0
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.js +38 -0
- package/dist/components/sheet/sheet.d.ts +24 -0
- package/dist/components/sheet/sheet.js +330 -0
- package/dist/components/sidebar/sidebar.d.ts +138 -0
- package/dist/components/sidebar/sidebar.js +1374 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.js +40 -0
- package/dist/components/slider/slider.d.ts +9 -0
- package/dist/components/slider/slider.js +193 -0
- package/dist/components/sources/sources.d.ts +35 -0
- package/dist/components/sources/sources.js +209 -0
- package/dist/components/spinner/spinner.d.ts +11 -0
- package/dist/components/spinner/spinner.js +59 -0
- package/dist/components/stack-trace/parse-stack-trace.d.ts +21 -0
- package/dist/components/stack-trace/parse-stack-trace.js +61 -0
- package/dist/components/stack-trace/stack-trace.d.ts +79 -0
- package/dist/components/stack-trace/stack-trace.js +434 -0
- package/dist/components/subagent/subagent.d.ts +71 -0
- package/dist/components/subagent/subagent.js +450 -0
- package/dist/components/suggestion/suggestion.d.ts +21 -0
- package/dist/components/suggestion/suggestion.js +130 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/switch/switch.js +70 -0
- package/dist/components/table/table.d.ts +19 -0
- package/dist/components/table/table.js +284 -0
- package/dist/components/table-of-contents/spy.js +84 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +92 -0
- package/dist/components/table-of-contents/table-of-contents.js +787 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +273 -0
- package/dist/components/task/task.d.ts +40 -0
- package/dist/components/task/task.js +262 -0
- package/dist/components/terminal/terminal.d.ts +82 -0
- package/dist/components/terminal/terminal.js +457 -0
- package/dist/components/test-results/test-results.d.ts +127 -0
- package/dist/components/test-results/test-results.js +687 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +43 -0
- package/dist/components/time-input/time-input.d.ts +7 -0
- package/dist/components/time-input/time-input.js +82 -0
- package/dist/components/timeline/timeline.d.ts +19 -0
- package/dist/components/timeline/timeline.js +247 -0
- package/dist/components/toast/toast.d.ts +12 -0
- package/dist/components/toast/toast.js +285 -0
- package/dist/components/toggle/toggle.d.ts +15 -0
- package/dist/components/toggle/toggle.js +137 -0
- package/dist/components/token-input/token-input.d.ts +7 -0
- package/dist/components/token-input/token-input.js +117 -0
- package/dist/components/tool/tool.d.ts +66 -0
- package/dist/components/tool/tool.js +413 -0
- package/dist/components/toolbar/toolbar.d.ts +91 -0
- package/dist/components/toolbar/toolbar.js +655 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +97 -0
- package/dist/components/trace/trace.d.ts +31 -0
- package/dist/components/trace/trace.js +309 -0
- package/dist/components/tree/tree.d.ts +13 -0
- package/dist/components/tree/tree.js +258 -0
- package/dist/components/trigger-menu/trigger-menu.d.ts +30 -0
- package/dist/components/trigger-menu/trigger-menu.js +352 -0
- package/dist/components/usage/usage.d.ts +132 -0
- package/dist/components/usage/usage.js +1368 -0
- package/dist/components/waterfall/waterfall.d.ts +20 -0
- package/dist/components/waterfall/waterfall.js +360 -0
- package/dist/components/week-strip/week-strip.d.ts +177 -0
- package/dist/components/week-strip/week-strip.js +1081 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +27 -0
- package/dist/core/ui-sdk.d.ts +3 -0
- package/dist/core/ui-sdk.js +3 -0
- package/dist/core/use-primitive-state.d.ts +14 -0
- package/dist/core/use-primitive-state.js +25 -0
- package/dist/styles/LICENSE-shadcn.md +21 -0
- package/dist/styles/color-scheme.css +32 -0
- package/dist/styles/components.css +303 -0
- package/dist/styles/index.css +41 -0
- package/dist/styles/tokens.css +474 -0
- package/dist/styles/typeset/shadcn.css +506 -0
- package/dist/styles/typeset.css +70 -0
- package/dist/styles/utilities.css +555 -0
- package/dist/tools/observe/index.d.ts +2 -0
- package/dist/tools/observe/index.js +3 -0
- package/dist/tools/observe/ui-sdk.d.ts +1 -0
- package/dist/tools/observe/ui-sdk.js +2 -0
- package/dist/tools/testing/check-agent.d.ts +28 -0
- package/dist/tools/testing/check-agent.js +42 -0
- package/dist/tools/testing/index.d.ts +4 -0
- package/dist/tools/testing/index.js +4 -0
- package/dist/tools/testing/ui-sdk.d.ts +1 -0
- package/dist/tools/testing/ui-sdk.js +2 -0
- package/dist/utilities/cn/index.d.ts +12 -0
- package/dist/utilities/cn/index.js +47 -0
- package/dist/utilities/color/index.d.ts +2 -0
- package/dist/utilities/color/index.js +3 -0
- package/dist/utilities/color/ui-sdk.d.ts +1 -0
- package/dist/utilities/color/ui-sdk.js +2 -0
- package/dist/utilities/date/index.d.ts +2 -0
- package/dist/utilities/date/index.js +6 -0
- package/dist/utilities/date/ui-sdk.d.ts +1 -0
- package/dist/utilities/date/ui-sdk.js +2 -0
- package/dist/utilities/image/index.d.ts +2 -0
- package/dist/utilities/image/index.js +3 -0
- package/dist/utilities/image/ui-sdk.d.ts +1 -0
- package/dist/utilities/image/ui-sdk.js +2 -0
- package/dist/utilities/mobile/index.d.ts +2 -0
- package/dist/utilities/mobile/index.js +1 -0
- package/dist/utilities/mobile/ui-sdk.d.ts +2 -0
- package/dist/utilities/mobile/ui-sdk.js +1 -0
- package/dist/utilities/number/index.d.ts +2 -0
- package/dist/utilities/number/index.js +3 -0
- package/dist/utilities/number/ui-sdk.d.ts +1 -0
- package/dist/utilities/number/ui-sdk.js +2 -0
- package/dist/utilities/platform/index.d.ts +3 -0
- package/dist/utilities/platform/index.js +14 -0
- package/dist/utilities/platform/ui-sdk.d.ts +3 -0
- package/dist/utilities/platform/ui-sdk.js +3 -0
- package/dist/utilities/storage/index.d.ts +2 -0
- package/dist/utilities/storage/index.js +1 -0
- package/dist/utilities/storage/ui-sdk.d.ts +2 -0
- package/dist/utilities/storage/ui-sdk.js +1 -0
- package/dist/utilities/text/index.d.ts +3 -0
- package/dist/utilities/text/index.js +3 -0
- package/dist/utilities/text/ui-sdk.d.ts +3 -0
- package/dist/utilities/text/ui-sdk.js +3 -0
- package/package.json +192 -4
- package/skills/agent-ready-ui/SKILL.md +229 -0
- package/skills/blocks/SKILL.md +262 -0
- package/skills/compose-screens/SKILL.md +354 -0
- package/skills/note-editor/SKILL.md +493 -0
- package/skills/note-status/SKILL.md +295 -0
- package/skills/setup/SKILL.md +136 -0
- package/skills/theming/SKILL.md +216 -0
- package/src/blocks/notes/adapters.ts +77 -0
- package/src/blocks/notes/data.ts +508 -0
- package/src/blocks/notes/notes-block.tsx +244 -0
- package/src/blocks/notes/parts/home.tsx +219 -0
- package/src/blocks/notes/parts/no-access.tsx +84 -0
- package/src/blocks/notes/parts/note-screen.tsx +412 -0
- package/src/blocks/notes/parts/notes-sidebar.tsx +277 -0
- package/src/blocks/notes/parts/panels.tsx +393 -0
- package/src/blocks/notes/parts/place.ts +15 -0
- package/src/blocks/notes/parts/review-dialog.tsx +159 -0
- package/src/blocks/notes/parts/share.tsx +172 -0
- package/src/blocks/notes/texts.ts +135 -0
- package/src/blocks/shell/adapters.ts +69 -0
- package/src/blocks/shell/data.ts +281 -0
- package/src/blocks/shell/parts/compose.tsx +292 -0
- package/src/blocks/shell/parts/home.tsx +203 -0
- package/src/blocks/shell/parts/marks.tsx +144 -0
- package/src/blocks/shell/parts/rail.tsx +166 -0
- package/src/blocks/shell/parts/rooms-column.tsx +326 -0
- package/src/blocks/shell/shell-block.tsx +210 -0
- package/src/blocks/shell/texts.ts +80 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { core_exports } from "../../core/index.js";
|
|
3
|
+
import { cnState, cva } from "../../utilities/cn/index.js";
|
|
4
|
+
import { Separator } from "../separator/separator.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
// src/components/button-group/button-group.tsx
|
|
8
|
+
const buttonGroupVariants = cva("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 [&>[data-slot=input]]:flex-1 [&>[data-slot=select-trigger]]:w-auto [&>[data-slot=select-trigger]]:shrink-0", {
|
|
9
|
+
variants: { orientation: {
|
|
10
|
+
horizontal: "*:data-slot:rounded-full [&>[data-slot]:has(~[data-slot]:not([aria-hidden=true]))]:rounded-e-none [&>[data-slot]~[data-slot]]:rounded-s-none [&>[data-slot]~[data-slot]]:border-s-0 [&>:is([data-slot=input],[data-slot=select-trigger])]:h-auto [&>:is([data-slot=input],[data-slot=select-trigger])]:min-h-7",
|
|
11
|
+
vertical: "flex-col *:data-slot:rounded-2xl [&>[data-slot]:has(~[data-slot]:not([aria-hidden=true]))]:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { orientation: "horizontal" }
|
|
14
|
+
});
|
|
15
|
+
/** Joins buttons, inputs and triggers into one box. Name it with `aria-label`. */
|
|
16
|
+
function ButtonGroup({ className, orientation, render, ...props }) {
|
|
17
|
+
return (0, core_exports.renderElement)("div", {
|
|
18
|
+
role: "group",
|
|
19
|
+
"data-slot": "button-group",
|
|
20
|
+
"data-orientation": orientation ?? "horizontal",
|
|
21
|
+
...props,
|
|
22
|
+
className: cnState(buttonGroupVariants({ orientation }), className)
|
|
23
|
+
}, render);
|
|
24
|
+
}
|
|
25
|
+
/** Text or an icon that sits in the group like a button. `render` changes its element. */
|
|
26
|
+
function ButtonGroupText({ className, render, ...props }) {
|
|
27
|
+
return (0, core_exports.renderElement)("div", {
|
|
28
|
+
"data-slot": "button-group-text",
|
|
29
|
+
...props,
|
|
30
|
+
className: cnState("flex items-center gap-2 rounded-full border border-input bg-muted px-3.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className)
|
|
31
|
+
}, render);
|
|
32
|
+
}
|
|
33
|
+
/** A line between two items with no edge of their own, like filled buttons. */
|
|
34
|
+
function ButtonGroupSeparator(t0) {
|
|
35
|
+
const $ = c(10);
|
|
36
|
+
let className;
|
|
37
|
+
let props;
|
|
38
|
+
let t1;
|
|
39
|
+
if ($[0] !== t0) {
|
|
40
|
+
({className, orientation: t1, ...props} = t0);
|
|
41
|
+
$[0] = t0;
|
|
42
|
+
$[1] = className;
|
|
43
|
+
$[2] = props;
|
|
44
|
+
$[3] = t1;
|
|
45
|
+
} else {
|
|
46
|
+
className = $[1];
|
|
47
|
+
props = $[2];
|
|
48
|
+
t1 = $[3];
|
|
49
|
+
}
|
|
50
|
+
const orientation = t1 === void 0 ? "vertical" : t1;
|
|
51
|
+
let t2;
|
|
52
|
+
if ($[4] !== className) {
|
|
53
|
+
t2 = cnState("relative self-stretch bg-input data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto", className);
|
|
54
|
+
$[4] = className;
|
|
55
|
+
$[5] = t2;
|
|
56
|
+
} else t2 = $[5];
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[6] !== orientation || $[7] !== props || $[8] !== t2) {
|
|
59
|
+
t3 = /* @__PURE__ */ jsx(Separator, {
|
|
60
|
+
orientation,
|
|
61
|
+
className: t2,
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
$[6] = orientation;
|
|
65
|
+
$[7] = props;
|
|
66
|
+
$[8] = t2;
|
|
67
|
+
$[9] = t3;
|
|
68
|
+
} else t3 = $[9];
|
|
69
|
+
return t3;
|
|
70
|
+
}
|
|
71
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ButtonLook } from "../button/button.js";
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import { Calendar as Calendar$1, CalendarAnchorChangeReason, CalendarChangeOptions, CalendarController, CalendarDay as CalendarDay$1, CalendarDayState, CalendarFocusedChangeReason, CalendarGrid as CalendarGrid$1, CalendarGridCell, CalendarGridState, CalendarHeading as CalendarHeading$1, CalendarHeadingState, CalendarMode, CalendarMonthChangeReason, CalendarMonthSelect as CalendarMonthSelect$1, CalendarOptions, CalendarPrevious as CalendarPrevious$1, CalendarSelectOption, CalendarSelectState, CalendarState, CalendarStepState, CalendarValue, CalendarValueChangeReason, CalendarWeekday as CalendarWeekday$1, CalendarWeekdayState, CalendarWeekdays as CalendarWeekdays$1, CalendarWeeks as CalendarWeeks$1, CalendarYearSelect as CalendarYearSelect$1, DateMatcher, DateMatchers, ISOMonth, createCalendarController } from "@ui-sdk/react/calendar";
|
|
4
|
+
/**
|
|
5
|
+
* Previous, the heading and Next share the first row, and anything else takes
|
|
6
|
+
* a row of its own. `DatePickerContent` lays its calendar out the same way.
|
|
7
|
+
*/
|
|
8
|
+
declare const calendarLayout = "grid grid-cols-[auto_1fr_auto] items-center gap-y-2 text-sm [--cell-size:--spacing(8)] [&>*:not([data-slot=calendar-previous],[data-slot=calendar-heading],[data-slot=calendar-next])]:col-span-full";
|
|
9
|
+
/** What a calendar with no children shows: the heading between Previous and Next, and a grid for each month. */
|
|
10
|
+
declare function calendarParts(months?: number): ReactNode;
|
|
11
|
+
/** Without children it renders the heading, Previous, Next and a grid for each of its `months`. */
|
|
12
|
+
declare function Calendar({ className, children, ...props }: ComponentProps<typeof Calendar$1>): import("react").JSX.Element;
|
|
13
|
+
declare function CalendarHeading({ className, ...props }: ComponentProps<typeof CalendarHeading$1>): import("react").JSX.Element;
|
|
14
|
+
type CalendarStepProps = ComponentProps<typeof CalendarPrevious$1> & ButtonLook;
|
|
15
|
+
/** A ghost icon button. Without children it draws an arrow, which follows the reading direction. */
|
|
16
|
+
declare function CalendarPrevious({ variant, size, className, children, ...props }: CalendarStepProps): import("react").JSX.Element;
|
|
17
|
+
/** A ghost icon button. Without children it draws an arrow, which follows the reading direction. */
|
|
18
|
+
declare function CalendarNext({ variant, size, className, children, ...props }: CalendarStepProps): import("react").JSX.Element;
|
|
19
|
+
declare function CalendarMonthSelect({ className, ...props }: ComponentProps<typeof CalendarMonthSelect$1>): import("react").JSX.Element;
|
|
20
|
+
declare function CalendarYearSelect({ className, ...props }: ComponentProps<typeof CalendarYearSelect$1>): import("react").JSX.Element;
|
|
21
|
+
/** Without children it renders its weekday headers and its weeks. */
|
|
22
|
+
declare function CalendarGrid({ className, children, ...props }: ComponentProps<typeof CalendarGrid$1>): import("react").JSX.Element;
|
|
23
|
+
/** Without children it renders a `CalendarWeekday` in each column. */
|
|
24
|
+
declare function CalendarWeekdays({ children, ...props }: ComponentProps<typeof CalendarWeekdays$1>): import("react").JSX.Element;
|
|
25
|
+
declare function CalendarWeekday({ className, ...props }: ComponentProps<typeof CalendarWeekday$1>): import("react").JSX.Element;
|
|
26
|
+
/** Without children it renders a `CalendarDay` in each cell. */
|
|
27
|
+
declare function CalendarWeeks({ children, ...props }: ComponentProps<typeof CalendarWeeks$1>): import("react").JSX.Element;
|
|
28
|
+
declare function CalendarDay({ className, ...props }: ComponentProps<typeof CalendarDay$1>): import("react").JSX.Element;
|
|
29
|
+
export { Calendar, type CalendarAnchorChangeReason, type CalendarChangeOptions, type CalendarController, CalendarDay, type CalendarDayState, type CalendarFocusedChangeReason, CalendarGrid, type CalendarGridCell, type CalendarGridState, CalendarHeading, type CalendarHeadingState, type CalendarMode, type CalendarMonthChangeReason, CalendarMonthSelect, CalendarNext, type CalendarOptions, CalendarPrevious, type CalendarSelectOption, type CalendarSelectState, type CalendarState, type CalendarStepProps, type CalendarStepState, type CalendarValue, type CalendarValueChangeReason, CalendarWeekday, type CalendarWeekdayState, CalendarWeekdays, CalendarWeeks, CalendarYearSelect, type DateMatcher, type DateMatchers, type ISOMonth, calendarLayout, calendarParts, createCalendarController };
|
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { buttonLook } from "../button/button.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
|
+
import { inputClasses } from "../input/input.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { ArrowLeft01Icon, ArrowRight01Icon } from "@hugeicons/core-free-icons";
|
|
9
|
+
import { Calendar as Calendar$1, CalendarDay as CalendarDay$1, CalendarGrid as CalendarGrid$1, CalendarHeading as CalendarHeading$1, CalendarMonthSelect as CalendarMonthSelect$1, CalendarNext as CalendarNext$1, CalendarPrevious as CalendarPrevious$1, CalendarWeekday as CalendarWeekday$1, CalendarWeekdays as CalendarWeekdays$1, CalendarWeeks as CalendarWeeks$1, CalendarYearSelect as CalendarYearSelect$1, createCalendarController } from "@ui-sdk/react/calendar";
|
|
10
|
+
// src/components/calendar/calendar.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Previous, the heading and Next share the first row, and anything else takes
|
|
13
|
+
* a row of its own. `DatePickerContent` lays its calendar out the same way.
|
|
14
|
+
*/
|
|
15
|
+
const calendarLayout = "grid grid-cols-[auto_1fr_auto] items-center gap-y-2 text-sm [--cell-size:--spacing(8)] [&>*:not([data-slot=calendar-previous],[data-slot=calendar-heading],[data-slot=calendar-next])]:col-span-full";
|
|
16
|
+
/** What a calendar with no children shows: the heading between Previous and Next, and a grid for each month. */
|
|
17
|
+
function calendarParts(months = 1) {
|
|
18
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(CalendarPrevious, {}),
|
|
20
|
+
/* @__PURE__ */ jsx(CalendarHeading, {}),
|
|
21
|
+
/* @__PURE__ */ jsx(CalendarNext, {}),
|
|
22
|
+
months > 1 ? /* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: "flex flex-col gap-4 sm:flex-row",
|
|
24
|
+
children: Array.from({ length: months }, (_, offset) => /* @__PURE__ */ jsx(CalendarGrid, { offset }, offset))
|
|
25
|
+
}) : /* @__PURE__ */ jsx(CalendarGrid, {})
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
/** Without children it renders the heading, Previous, Next and a grid for each of its `months`. */
|
|
29
|
+
function Calendar(t0) {
|
|
30
|
+
const $ = c(12);
|
|
31
|
+
let T0;
|
|
32
|
+
let t1;
|
|
33
|
+
let t2;
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[0] !== t0) {
|
|
36
|
+
const { className, children, ...props } = t0;
|
|
37
|
+
T0 = Calendar$1;
|
|
38
|
+
if ($[5] !== className) {
|
|
39
|
+
t1 = cnState([calendarLayout, "w-fit rounded-xl bg-background p-2"], className);
|
|
40
|
+
$[5] = className;
|
|
41
|
+
$[6] = t1;
|
|
42
|
+
} else t1 = $[6];
|
|
43
|
+
t2 = props;
|
|
44
|
+
t3 = children ?? calendarParts(props.months);
|
|
45
|
+
$[0] = t0;
|
|
46
|
+
$[1] = T0;
|
|
47
|
+
$[2] = t1;
|
|
48
|
+
$[3] = t2;
|
|
49
|
+
$[4] = t3;
|
|
50
|
+
} else {
|
|
51
|
+
T0 = $[1];
|
|
52
|
+
t1 = $[2];
|
|
53
|
+
t2 = $[3];
|
|
54
|
+
t3 = $[4];
|
|
55
|
+
}
|
|
56
|
+
let t4;
|
|
57
|
+
if ($[7] !== T0 || $[8] !== t1 || $[9] !== t2 || $[10] !== t3) {
|
|
58
|
+
t4 = /* @__PURE__ */ jsx(T0, {
|
|
59
|
+
className: t1,
|
|
60
|
+
...t2,
|
|
61
|
+
children: t3
|
|
62
|
+
});
|
|
63
|
+
$[7] = T0;
|
|
64
|
+
$[8] = t1;
|
|
65
|
+
$[9] = t2;
|
|
66
|
+
$[10] = t3;
|
|
67
|
+
$[11] = t4;
|
|
68
|
+
} else t4 = $[11];
|
|
69
|
+
return t4;
|
|
70
|
+
}
|
|
71
|
+
function CalendarHeading(t0) {
|
|
72
|
+
const $ = c(8);
|
|
73
|
+
let className;
|
|
74
|
+
let props;
|
|
75
|
+
if ($[0] !== t0) {
|
|
76
|
+
({className, ...props} = t0);
|
|
77
|
+
$[0] = t0;
|
|
78
|
+
$[1] = className;
|
|
79
|
+
$[2] = props;
|
|
80
|
+
} else {
|
|
81
|
+
className = $[1];
|
|
82
|
+
props = $[2];
|
|
83
|
+
}
|
|
84
|
+
let t1;
|
|
85
|
+
if ($[3] !== className) {
|
|
86
|
+
t1 = cnState("px-2 text-center text-label select-none", className);
|
|
87
|
+
$[3] = className;
|
|
88
|
+
$[4] = t1;
|
|
89
|
+
} else t1 = $[4];
|
|
90
|
+
let t2;
|
|
91
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
92
|
+
t2 = /* @__PURE__ */ jsx(CalendarHeading$1, {
|
|
93
|
+
className: t1,
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
96
|
+
$[5] = props;
|
|
97
|
+
$[6] = t1;
|
|
98
|
+
$[7] = t2;
|
|
99
|
+
} else t2 = $[7];
|
|
100
|
+
return t2;
|
|
101
|
+
}
|
|
102
|
+
/** A ghost icon button. Without children it draws an arrow, which follows the reading direction. */
|
|
103
|
+
function CalendarPrevious(t0) {
|
|
104
|
+
const $ = c(16);
|
|
105
|
+
let children;
|
|
106
|
+
let className;
|
|
107
|
+
let props;
|
|
108
|
+
let t1;
|
|
109
|
+
let t2;
|
|
110
|
+
if ($[0] !== t0) {
|
|
111
|
+
({variant: t1, size: t2, className, children, ...props} = t0);
|
|
112
|
+
$[0] = t0;
|
|
113
|
+
$[1] = children;
|
|
114
|
+
$[2] = className;
|
|
115
|
+
$[3] = props;
|
|
116
|
+
$[4] = t1;
|
|
117
|
+
$[5] = t2;
|
|
118
|
+
} else {
|
|
119
|
+
children = $[1];
|
|
120
|
+
className = $[2];
|
|
121
|
+
props = $[3];
|
|
122
|
+
t1 = $[4];
|
|
123
|
+
t2 = $[5];
|
|
124
|
+
}
|
|
125
|
+
const variant = t1 === void 0 ? "ghost" : t1;
|
|
126
|
+
const size = t2 === void 0 ? "icon-sm" : t2;
|
|
127
|
+
let t3;
|
|
128
|
+
if ($[6] !== className || $[7] !== size || $[8] !== variant) {
|
|
129
|
+
t3 = cnState(buttonLook({
|
|
130
|
+
variant,
|
|
131
|
+
size
|
|
132
|
+
}), className);
|
|
133
|
+
$[6] = className;
|
|
134
|
+
$[7] = size;
|
|
135
|
+
$[8] = variant;
|
|
136
|
+
$[9] = t3;
|
|
137
|
+
} else t3 = $[9];
|
|
138
|
+
let t4;
|
|
139
|
+
if ($[10] !== children) {
|
|
140
|
+
t4 = children ?? /* @__PURE__ */ jsx(Icon, {
|
|
141
|
+
icon: ArrowLeft01Icon,
|
|
142
|
+
className: "rtl:rotate-180"
|
|
143
|
+
});
|
|
144
|
+
$[10] = children;
|
|
145
|
+
$[11] = t4;
|
|
146
|
+
} else t4 = $[11];
|
|
147
|
+
let t5;
|
|
148
|
+
if ($[12] !== props || $[13] !== t3 || $[14] !== t4) {
|
|
149
|
+
t5 = /* @__PURE__ */ jsx(CalendarPrevious$1, {
|
|
150
|
+
className: t3,
|
|
151
|
+
...props,
|
|
152
|
+
children: t4
|
|
153
|
+
});
|
|
154
|
+
$[12] = props;
|
|
155
|
+
$[13] = t3;
|
|
156
|
+
$[14] = t4;
|
|
157
|
+
$[15] = t5;
|
|
158
|
+
} else t5 = $[15];
|
|
159
|
+
return t5;
|
|
160
|
+
}
|
|
161
|
+
/** A ghost icon button. Without children it draws an arrow, which follows the reading direction. */
|
|
162
|
+
function CalendarNext(t0) {
|
|
163
|
+
const $ = c(16);
|
|
164
|
+
let children;
|
|
165
|
+
let className;
|
|
166
|
+
let props;
|
|
167
|
+
let t1;
|
|
168
|
+
let t2;
|
|
169
|
+
if ($[0] !== t0) {
|
|
170
|
+
({variant: t1, size: t2, className, children, ...props} = t0);
|
|
171
|
+
$[0] = t0;
|
|
172
|
+
$[1] = children;
|
|
173
|
+
$[2] = className;
|
|
174
|
+
$[3] = props;
|
|
175
|
+
$[4] = t1;
|
|
176
|
+
$[5] = t2;
|
|
177
|
+
} else {
|
|
178
|
+
children = $[1];
|
|
179
|
+
className = $[2];
|
|
180
|
+
props = $[3];
|
|
181
|
+
t1 = $[4];
|
|
182
|
+
t2 = $[5];
|
|
183
|
+
}
|
|
184
|
+
const variant = t1 === void 0 ? "ghost" : t1;
|
|
185
|
+
const size = t2 === void 0 ? "icon-sm" : t2;
|
|
186
|
+
let t3;
|
|
187
|
+
if ($[6] !== className || $[7] !== size || $[8] !== variant) {
|
|
188
|
+
t3 = cnState(buttonLook({
|
|
189
|
+
variant,
|
|
190
|
+
size
|
|
191
|
+
}), className);
|
|
192
|
+
$[6] = className;
|
|
193
|
+
$[7] = size;
|
|
194
|
+
$[8] = variant;
|
|
195
|
+
$[9] = t3;
|
|
196
|
+
} else t3 = $[9];
|
|
197
|
+
let t4;
|
|
198
|
+
if ($[10] !== children) {
|
|
199
|
+
t4 = children ?? /* @__PURE__ */ jsx(Icon, {
|
|
200
|
+
icon: ArrowRight01Icon,
|
|
201
|
+
className: "rtl:rotate-180"
|
|
202
|
+
});
|
|
203
|
+
$[10] = children;
|
|
204
|
+
$[11] = t4;
|
|
205
|
+
} else t4 = $[11];
|
|
206
|
+
let t5;
|
|
207
|
+
if ($[12] !== props || $[13] !== t3 || $[14] !== t4) {
|
|
208
|
+
t5 = /* @__PURE__ */ jsx(CalendarNext$1, {
|
|
209
|
+
className: t3,
|
|
210
|
+
...props,
|
|
211
|
+
children: t4
|
|
212
|
+
});
|
|
213
|
+
$[12] = props;
|
|
214
|
+
$[13] = t3;
|
|
215
|
+
$[14] = t4;
|
|
216
|
+
$[15] = t5;
|
|
217
|
+
} else t5 = $[15];
|
|
218
|
+
return t5;
|
|
219
|
+
}
|
|
220
|
+
const selectClasses = [inputClasses, "w-auto px-2.5"];
|
|
221
|
+
function CalendarMonthSelect(t0) {
|
|
222
|
+
const $ = c(8);
|
|
223
|
+
let className;
|
|
224
|
+
let props;
|
|
225
|
+
if ($[0] !== t0) {
|
|
226
|
+
({className, ...props} = t0);
|
|
227
|
+
$[0] = t0;
|
|
228
|
+
$[1] = className;
|
|
229
|
+
$[2] = props;
|
|
230
|
+
} else {
|
|
231
|
+
className = $[1];
|
|
232
|
+
props = $[2];
|
|
233
|
+
}
|
|
234
|
+
let t1;
|
|
235
|
+
if ($[3] !== className) {
|
|
236
|
+
t1 = cnState(selectClasses, className);
|
|
237
|
+
$[3] = className;
|
|
238
|
+
$[4] = t1;
|
|
239
|
+
} else t1 = $[4];
|
|
240
|
+
let t2;
|
|
241
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
242
|
+
t2 = /* @__PURE__ */ jsx(CalendarMonthSelect$1, {
|
|
243
|
+
className: t1,
|
|
244
|
+
...props
|
|
245
|
+
});
|
|
246
|
+
$[5] = props;
|
|
247
|
+
$[6] = t1;
|
|
248
|
+
$[7] = t2;
|
|
249
|
+
} else t2 = $[7];
|
|
250
|
+
return t2;
|
|
251
|
+
}
|
|
252
|
+
function CalendarYearSelect(t0) {
|
|
253
|
+
const $ = c(8);
|
|
254
|
+
let className;
|
|
255
|
+
let props;
|
|
256
|
+
if ($[0] !== t0) {
|
|
257
|
+
({className, ...props} = t0);
|
|
258
|
+
$[0] = t0;
|
|
259
|
+
$[1] = className;
|
|
260
|
+
$[2] = props;
|
|
261
|
+
} else {
|
|
262
|
+
className = $[1];
|
|
263
|
+
props = $[2];
|
|
264
|
+
}
|
|
265
|
+
let t1;
|
|
266
|
+
if ($[3] !== className) {
|
|
267
|
+
t1 = cnState([selectClasses, "tabular-nums"], className);
|
|
268
|
+
$[3] = className;
|
|
269
|
+
$[4] = t1;
|
|
270
|
+
} else t1 = $[4];
|
|
271
|
+
let t2;
|
|
272
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
273
|
+
t2 = /* @__PURE__ */ jsx(CalendarYearSelect$1, {
|
|
274
|
+
className: t1,
|
|
275
|
+
...props
|
|
276
|
+
});
|
|
277
|
+
$[5] = props;
|
|
278
|
+
$[6] = t1;
|
|
279
|
+
$[7] = t2;
|
|
280
|
+
} else t2 = $[7];
|
|
281
|
+
return t2;
|
|
282
|
+
}
|
|
283
|
+
/** Without children it renders its weekday headers and its weeks. */
|
|
284
|
+
function CalendarGrid(t0) {
|
|
285
|
+
const $ = c(12);
|
|
286
|
+
let children;
|
|
287
|
+
let className;
|
|
288
|
+
let props;
|
|
289
|
+
if ($[0] !== t0) {
|
|
290
|
+
({className, children, ...props} = t0);
|
|
291
|
+
$[0] = t0;
|
|
292
|
+
$[1] = children;
|
|
293
|
+
$[2] = className;
|
|
294
|
+
$[3] = props;
|
|
295
|
+
} else {
|
|
296
|
+
children = $[1];
|
|
297
|
+
className = $[2];
|
|
298
|
+
props = $[3];
|
|
299
|
+
}
|
|
300
|
+
let t1;
|
|
301
|
+
if ($[4] !== className) {
|
|
302
|
+
t1 = cnState("border-separate border-spacing-x-0 border-spacing-y-0.5", className);
|
|
303
|
+
$[4] = className;
|
|
304
|
+
$[5] = t1;
|
|
305
|
+
} else t1 = $[5];
|
|
306
|
+
let t2;
|
|
307
|
+
if ($[6] !== children) {
|
|
308
|
+
t2 = children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CalendarWeekdays, {}), /* @__PURE__ */ jsx(CalendarWeeks, {})] });
|
|
309
|
+
$[6] = children;
|
|
310
|
+
$[7] = t2;
|
|
311
|
+
} else t2 = $[7];
|
|
312
|
+
let t3;
|
|
313
|
+
if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
|
|
314
|
+
t3 = /* @__PURE__ */ jsx(CalendarGrid$1, {
|
|
315
|
+
className: t1,
|
|
316
|
+
...props,
|
|
317
|
+
children: t2
|
|
318
|
+
});
|
|
319
|
+
$[8] = props;
|
|
320
|
+
$[9] = t1;
|
|
321
|
+
$[10] = t2;
|
|
322
|
+
$[11] = t3;
|
|
323
|
+
} else t3 = $[11];
|
|
324
|
+
return t3;
|
|
325
|
+
}
|
|
326
|
+
const weekday = (index) => /* @__PURE__ */ jsx(CalendarWeekday, { index });
|
|
327
|
+
/** Without children it renders a `CalendarWeekday` in each column. */
|
|
328
|
+
function CalendarWeekdays(t0) {
|
|
329
|
+
const $ = c(6);
|
|
330
|
+
let props;
|
|
331
|
+
let t1;
|
|
332
|
+
if ($[0] !== t0) {
|
|
333
|
+
({children: t1, ...props} = t0);
|
|
334
|
+
$[0] = t0;
|
|
335
|
+
$[1] = props;
|
|
336
|
+
$[2] = t1;
|
|
337
|
+
} else {
|
|
338
|
+
props = $[1];
|
|
339
|
+
t1 = $[2];
|
|
340
|
+
}
|
|
341
|
+
const children = t1 === void 0 ? weekday : t1;
|
|
342
|
+
let t2;
|
|
343
|
+
if ($[3] !== children || $[4] !== props) {
|
|
344
|
+
t2 = /* @__PURE__ */ jsx(CalendarWeekdays$1, {
|
|
345
|
+
...props,
|
|
346
|
+
children
|
|
347
|
+
});
|
|
348
|
+
$[3] = children;
|
|
349
|
+
$[4] = props;
|
|
350
|
+
$[5] = t2;
|
|
351
|
+
} else t2 = $[5];
|
|
352
|
+
return t2;
|
|
353
|
+
}
|
|
354
|
+
function CalendarWeekday(t0) {
|
|
355
|
+
const $ = c(8);
|
|
356
|
+
let className;
|
|
357
|
+
let props;
|
|
358
|
+
if ($[0] !== t0) {
|
|
359
|
+
({className, ...props} = t0);
|
|
360
|
+
$[0] = t0;
|
|
361
|
+
$[1] = className;
|
|
362
|
+
$[2] = props;
|
|
363
|
+
} else {
|
|
364
|
+
className = $[1];
|
|
365
|
+
props = $[2];
|
|
366
|
+
}
|
|
367
|
+
let t1;
|
|
368
|
+
if ($[3] !== className) {
|
|
369
|
+
t1 = cnState("h-(--cell-size) w-(--cell-size) p-0 text-center text-xs font-normal text-muted-foreground select-none [&_abbr]:no-underline", className);
|
|
370
|
+
$[3] = className;
|
|
371
|
+
$[4] = t1;
|
|
372
|
+
} else t1 = $[4];
|
|
373
|
+
let t2;
|
|
374
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
375
|
+
t2 = /* @__PURE__ */ jsx(CalendarWeekday$1, {
|
|
376
|
+
className: t1,
|
|
377
|
+
...props
|
|
378
|
+
});
|
|
379
|
+
$[5] = props;
|
|
380
|
+
$[6] = t1;
|
|
381
|
+
$[7] = t2;
|
|
382
|
+
} else t2 = $[7];
|
|
383
|
+
return t2;
|
|
384
|
+
}
|
|
385
|
+
const day = (cell) => /* @__PURE__ */ jsx(CalendarDay, { value: cell.date });
|
|
386
|
+
/** Without children it renders a `CalendarDay` in each cell. */
|
|
387
|
+
function CalendarWeeks(t0) {
|
|
388
|
+
const $ = c(6);
|
|
389
|
+
let props;
|
|
390
|
+
let t1;
|
|
391
|
+
if ($[0] !== t0) {
|
|
392
|
+
({children: t1, ...props} = t0);
|
|
393
|
+
$[0] = t0;
|
|
394
|
+
$[1] = props;
|
|
395
|
+
$[2] = t1;
|
|
396
|
+
} else {
|
|
397
|
+
props = $[1];
|
|
398
|
+
t1 = $[2];
|
|
399
|
+
}
|
|
400
|
+
const children = t1 === void 0 ? day : t1;
|
|
401
|
+
let t2;
|
|
402
|
+
if ($[3] !== children || $[4] !== props) {
|
|
403
|
+
t2 = /* @__PURE__ */ jsx(CalendarWeeks$1, {
|
|
404
|
+
...props,
|
|
405
|
+
children
|
|
406
|
+
});
|
|
407
|
+
$[3] = children;
|
|
408
|
+
$[4] = props;
|
|
409
|
+
$[5] = t2;
|
|
410
|
+
} else t2 = $[5];
|
|
411
|
+
return t2;
|
|
412
|
+
}
|
|
413
|
+
function CalendarDay(t0) {
|
|
414
|
+
const $ = c(8);
|
|
415
|
+
let className;
|
|
416
|
+
let props;
|
|
417
|
+
if ($[0] !== t0) {
|
|
418
|
+
({className, ...props} = t0);
|
|
419
|
+
$[0] = t0;
|
|
420
|
+
$[1] = className;
|
|
421
|
+
$[2] = props;
|
|
422
|
+
} else {
|
|
423
|
+
className = $[1];
|
|
424
|
+
props = $[2];
|
|
425
|
+
}
|
|
426
|
+
let t1;
|
|
427
|
+
if ($[3] !== className) {
|
|
428
|
+
t1 = cnState([
|
|
429
|
+
"relative size-(--cell-size) cursor-default rounded-full p-0 text-center tabular-nums select-none focus-ring focus-visible:z-10",
|
|
430
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50 data-outside:text-muted-foreground data-unavailable:line-through",
|
|
431
|
+
"not-data-selected:not-data-range-start:not-data-range-end:hover:bg-accent",
|
|
432
|
+
"data-today:not-data-selected:not-data-range-start:not-data-range-end:bg-muted data-today:not-data-selected:not-data-range-start:not-data-range-end:ring-1 data-today:not-data-selected:not-data-range-start:not-data-range-end:ring-input data-today:not-data-selected:not-data-range-start:not-data-range-end:ring-inset data-today:not-data-selected:not-data-range-start:not-data-range-end:text-foreground",
|
|
433
|
+
"data-range-middle:not-data-range-start:rounded-none data-range-middle:not-data-range-start:bg-muted data-range-middle:not-data-range-start:font-medium data-range-middle:not-data-range-start:text-foreground",
|
|
434
|
+
"data-selected:not-data-range-middle:bg-primary data-selected:not-data-range-middle:text-primary-foreground",
|
|
435
|
+
"data-range-start:not-data-range-middle:bg-primary data-range-start:not-data-range-middle:text-primary-foreground data-range-end:not-data-range-middle:bg-primary data-range-end:not-data-range-middle:text-primary-foreground",
|
|
436
|
+
"data-range-start:not-data-range-end:rounded-e-none data-range-end:not-data-range-start:rounded-s-none"
|
|
437
|
+
], className);
|
|
438
|
+
$[3] = className;
|
|
439
|
+
$[4] = t1;
|
|
440
|
+
} else t1 = $[4];
|
|
441
|
+
let t2;
|
|
442
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
443
|
+
t2 = /* @__PURE__ */ jsx(CalendarDay$1, {
|
|
444
|
+
className: t1,
|
|
445
|
+
...props
|
|
446
|
+
});
|
|
447
|
+
$[5] = props;
|
|
448
|
+
$[6] = t1;
|
|
449
|
+
$[7] = t2;
|
|
450
|
+
} else t2 = $[7];
|
|
451
|
+
return t2;
|
|
452
|
+
}
|
|
453
|
+
export { Calendar, CalendarDay, CalendarGrid, CalendarHeading, CalendarMonthSelect, CalendarNext, CalendarPrevious, CalendarWeekday, CalendarWeekdays, CalendarWeeks, CalendarYearSelect, calendarLayout, calendarParts, createCalendarController };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { index_d_exports } from "../../core/index.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
type CardProps = ComponentProps<"div"> & {
|
|
4
|
+
size?: "default" | "sm";
|
|
5
|
+
};
|
|
6
|
+
declare function Card({ className, size, ...props }: CardProps): import("react").JSX.Element;
|
|
7
|
+
declare function CardHeader({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
8
|
+
/** A `div` by default. Pass `render={<h2 />}` when the page's outline should list it. */
|
|
9
|
+
declare function CardTitle({ className, render, ...props }: index_d_exports.PartProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
declare function CardDescription({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
11
|
+
declare function CardAction({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
12
|
+
declare function CardContent({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
13
|
+
declare function CardFooter({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
14
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle };
|