@dowel-ui/react 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/LICENSE +21 -0
- package/dist/blocks/admin-users/meta.js +27 -0
- package/dist/blocks/admin-users/meta.js.map +1 -0
- package/dist/blocks/ai-chat/meta.js +30 -0
- package/dist/blocks/ai-chat/meta.js.map +1 -0
- package/dist/blocks/dashboard/meta.js +23 -0
- package/dist/blocks/dashboard/meta.js.map +1 -0
- package/dist/blocks/forgot-password/meta.js +24 -0
- package/dist/blocks/forgot-password/meta.js.map +1 -0
- package/dist/blocks/login/meta.js +26 -0
- package/dist/blocks/login/meta.js.map +1 -0
- package/dist/blocks/pricing/meta.js +24 -0
- package/dist/blocks/pricing/meta.js.map +1 -0
- package/dist/blocks/settings/meta.js +29 -0
- package/dist/blocks/settings/meta.js.map +1 -0
- package/dist/blocks/signup/meta.js +25 -0
- package/dist/blocks/signup/meta.js.map +1 -0
- package/dist/components/accordion/accordion.d.ts +19 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +58 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/accordion/meta.js +17 -0
- package/dist/components/accordion/meta.js.map +1 -0
- package/dist/components/activity-feed/activity-feed.d.ts +39 -0
- package/dist/components/activity-feed/activity-feed.d.ts.map +1 -0
- package/dist/components/activity-feed/activity-feed.js +77 -0
- package/dist/components/activity-feed/activity-feed.js.map +1 -0
- package/dist/components/activity-feed/index.d.ts +2 -0
- package/dist/components/activity-feed/index.js +2 -0
- package/dist/components/activity-feed/meta.js +17 -0
- package/dist/components/activity-feed/meta.js.map +1 -0
- package/dist/components/ai-agent-status/ai-agent-status.d.ts +30 -0
- package/dist/components/ai-agent-status/ai-agent-status.d.ts.map +1 -0
- package/dist/components/ai-agent-status/ai-agent-status.js +43 -0
- package/dist/components/ai-agent-status/ai-agent-status.js.map +1 -0
- package/dist/components/ai-agent-status/index.d.ts +2 -0
- package/dist/components/ai-agent-status/index.js +2 -0
- package/dist/components/ai-agent-status/meta.js +17 -0
- package/dist/components/ai-agent-status/meta.js.map +1 -0
- package/dist/components/ai-conversation/ai-conversation.d.ts +45 -0
- package/dist/components/ai-conversation/ai-conversation.d.ts.map +1 -0
- package/dist/components/ai-conversation/ai-conversation.js +138 -0
- package/dist/components/ai-conversation/ai-conversation.js.map +1 -0
- package/dist/components/ai-conversation/index.d.ts +2 -0
- package/dist/components/ai-conversation/index.js +2 -0
- package/dist/components/ai-conversation/meta.js +17 -0
- package/dist/components/ai-conversation/meta.js.map +1 -0
- package/dist/components/ai-message/ai-message.d.ts +56 -0
- package/dist/components/ai-message/ai-message.d.ts.map +1 -0
- package/dist/components/ai-message/ai-message.js +90 -0
- package/dist/components/ai-message/ai-message.js.map +1 -0
- package/dist/components/ai-message/index.d.ts +2 -0
- package/dist/components/ai-message/index.js +2 -0
- package/dist/components/ai-message/meta.js +17 -0
- package/dist/components/ai-message/meta.js.map +1 -0
- package/dist/components/ai-model-selector/ai-model-selector.d.ts +42 -0
- package/dist/components/ai-model-selector/ai-model-selector.d.ts.map +1 -0
- package/dist/components/ai-model-selector/ai-model-selector.js +48 -0
- package/dist/components/ai-model-selector/ai-model-selector.js.map +1 -0
- package/dist/components/ai-model-selector/index.d.ts +2 -0
- package/dist/components/ai-model-selector/index.js +2 -0
- package/dist/components/ai-model-selector/meta.js +17 -0
- package/dist/components/ai-model-selector/meta.js.map +1 -0
- package/dist/components/ai-prompt-input/ai-prompt-input.d.ts +61 -0
- package/dist/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -0
- package/dist/components/ai-prompt-input/ai-prompt-input.js +170 -0
- package/dist/components/ai-prompt-input/ai-prompt-input.js.map +1 -0
- package/dist/components/ai-prompt-input/index.d.ts +2 -0
- package/dist/components/ai-prompt-input/index.js +2 -0
- package/dist/components/ai-prompt-input/meta.js +17 -0
- package/dist/components/ai-prompt-input/meta.js.map +1 -0
- package/dist/components/ai-reasoning/ai-reasoning.d.ts +24 -0
- package/dist/components/ai-reasoning/ai-reasoning.d.ts.map +1 -0
- package/dist/components/ai-reasoning/ai-reasoning.js +64 -0
- package/dist/components/ai-reasoning/ai-reasoning.js.map +1 -0
- package/dist/components/ai-reasoning/index.d.ts +2 -0
- package/dist/components/ai-reasoning/index.js +2 -0
- package/dist/components/ai-reasoning/meta.js +17 -0
- package/dist/components/ai-reasoning/meta.js.map +1 -0
- package/dist/components/ai-response/ai-response.d.ts +36 -0
- package/dist/components/ai-response/ai-response.d.ts.map +1 -0
- package/dist/components/ai-response/ai-response.js +46 -0
- package/dist/components/ai-response/ai-response.js.map +1 -0
- package/dist/components/ai-response/index.d.ts +2 -0
- package/dist/components/ai-response/index.js +2 -0
- package/dist/components/ai-response/meta.js +17 -0
- package/dist/components/ai-response/meta.js.map +1 -0
- package/dist/components/ai-sources/ai-sources.d.ts +44 -0
- package/dist/components/ai-sources/ai-sources.d.ts.map +1 -0
- package/dist/components/ai-sources/ai-sources.js +112 -0
- package/dist/components/ai-sources/ai-sources.js.map +1 -0
- package/dist/components/ai-sources/index.d.ts +2 -0
- package/dist/components/ai-sources/index.js +2 -0
- package/dist/components/ai-sources/meta.js +17 -0
- package/dist/components/ai-sources/meta.js.map +1 -0
- package/dist/components/ai-token-usage/ai-token-usage.d.ts +34 -0
- package/dist/components/ai-token-usage/ai-token-usage.d.ts.map +1 -0
- package/dist/components/ai-token-usage/ai-token-usage.js +58 -0
- package/dist/components/ai-token-usage/ai-token-usage.js.map +1 -0
- package/dist/components/ai-token-usage/index.d.ts +2 -0
- package/dist/components/ai-token-usage/index.js +2 -0
- package/dist/components/ai-token-usage/meta.js +17 -0
- package/dist/components/ai-token-usage/meta.js.map +1 -0
- package/dist/components/ai-tool/ai-tool.d.ts +50 -0
- package/dist/components/ai-tool/ai-tool.d.ts.map +1 -0
- package/dist/components/ai-tool/ai-tool.js +129 -0
- package/dist/components/ai-tool/ai-tool.js.map +1 -0
- package/dist/components/ai-tool/index.d.ts +2 -0
- package/dist/components/ai-tool/index.js +2 -0
- package/dist/components/ai-tool/meta.js +17 -0
- package/dist/components/ai-tool/meta.js.map +1 -0
- package/dist/components/alert/alert.d.ts +32 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.js +49 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/alert/meta.js +17 -0
- package/dist/components/alert/meta.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +23 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +44 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar/meta.js +17 -0
- package/dist/components/avatar/meta.js.map +1 -0
- package/dist/components/badge/badge.d.ts +20 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +47 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/badge/meta.js +17 -0
- package/dist/components/badge/meta.js.map +1 -0
- package/dist/components/button/button.d.ts +28 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +77 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/button/meta.js +17 -0
- package/dist/components/button/meta.js.map +1 -0
- package/dist/components/calendar/calendar.d.ts +16 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/calendar.js +70 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/index.js +2 -0
- package/dist/components/calendar/meta.js +17 -0
- package/dist/components/calendar/meta.js.map +1 -0
- package/dist/components/card/card.d.ts +23 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +53 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card/meta.js +17 -0
- package/dist/components/card/meta.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +15 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +45 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/checkbox/meta.js +17 -0
- package/dist/components/checkbox/meta.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +46 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +110 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/code-block/index.js +2 -0
- package/dist/components/code-block/meta.js +17 -0
- package/dist/components/code-block/meta.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +59 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.js +346 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/combobox/meta.js +17 -0
- package/dist/components/combobox/meta.js.map +1 -0
- package/dist/components/command/command.d.ts +65 -0
- package/dist/components/command/command.d.ts.map +1 -0
- package/dist/components/command/command.js +330 -0
- package/dist/components/command/command.js.map +1 -0
- package/dist/components/command/index.d.ts +2 -0
- package/dist/components/command/index.js +2 -0
- package/dist/components/command/meta.js +17 -0
- package/dist/components/command/meta.js.map +1 -0
- package/dist/components/data-table/data-table.d.ts +91 -0
- package/dist/components/data-table/data-table.d.ts.map +1 -0
- package/dist/components/data-table/data-table.js +263 -0
- package/dist/components/data-table/data-table.js.map +1 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.js +2 -0
- package/dist/components/data-table/meta.js +22 -0
- package/dist/components/data-table/meta.js.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +31 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.js +123 -0
- package/dist/components/date-picker/date-picker.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +2 -0
- package/dist/components/date-picker/meta.js +21 -0
- package/dist/components/date-picker/meta.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +30 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -0
- package/dist/components/dialog/dialog.js +79 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dialog/meta.js +17 -0
- package/dist/components/dialog/meta.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +32 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.js +153 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +2 -0
- package/dist/components/drawer/meta.js +17 -0
- package/dist/components/drawer/meta.js.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +43 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +130 -0
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/dropdown-menu/index.d.ts +2 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dropdown-menu/meta.js +17 -0
- package/dist/components/dropdown-menu/meta.js.map +1 -0
- package/dist/components/empty-state/empty-state.d.ts +24 -0
- package/dist/components/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state.js +73 -0
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/empty-state/index.d.ts +2 -0
- package/dist/components/empty-state/index.js +2 -0
- package/dist/components/empty-state/meta.js +17 -0
- package/dist/components/empty-state/meta.js.map +1 -0
- package/dist/components/form/form.d.ts +43 -0
- package/dist/components/form/form.d.ts.map +1 -0
- package/dist/components/form/form.js +127 -0
- package/dist/components/form/form.js.map +1 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +2 -0
- package/dist/components/form/meta.js +17 -0
- package/dist/components/form/meta.js.map +1 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/input.d.ts +21 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.js +34 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/meta.js +17 -0
- package/dist/components/input/meta.js.map +1 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/label/label.d.ts +14 -0
- package/dist/components/label/label.d.ts.map +1 -0
- package/dist/components/label/label.js +20 -0
- package/dist/components/label/label.js.map +1 -0
- package/dist/components/label/meta.js +17 -0
- package/dist/components/label/meta.js.map +1 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/meta.js +17 -0
- package/dist/components/pagination/meta.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +33 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.js +143 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +2 -0
- package/dist/components/popover/meta.js +17 -0
- package/dist/components/popover/meta.js.map +1 -0
- package/dist/components/popover/popover.d.ts +24 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.js +60 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/index.js +2 -0
- package/dist/components/progress/meta.js +17 -0
- package/dist/components/progress/meta.js.map +1 -0
- package/dist/components/progress/progress.d.ts +21 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.js +55 -0
- package/dist/components/progress/progress.js.map +1 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +2 -0
- package/dist/components/radio-group/meta.js +17 -0
- package/dist/components/radio-group/meta.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +17 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.js +29 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/select/meta.js +17 -0
- package/dist/components/select/meta.js.map +1 -0
- package/dist/components/select/select.d.ts +37 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +128 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/separator/meta.js +17 -0
- package/dist/components/separator/meta.js.map +1 -0
- package/dist/components/separator/separator.d.ts +15 -0
- package/dist/components/separator/separator.d.ts.map +1 -0
- package/dist/components/separator/separator.js +23 -0
- package/dist/components/separator/separator.js.map +1 -0
- package/dist/components/sheet/index.d.ts +2 -0
- package/dist/components/sheet/index.js +2 -0
- package/dist/components/sheet/meta.js +17 -0
- package/dist/components/sheet/meta.js.map +1 -0
- package/dist/components/sheet/sheet.d.ts +31 -0
- package/dist/components/sheet/sheet.d.ts.map +1 -0
- package/dist/components/sheet/sheet.js +90 -0
- package/dist/components/sheet/sheet.js.map +1 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/skeleton/meta.js +17 -0
- package/dist/components/skeleton/meta.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +20 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.js +29 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.js +2 -0
- package/dist/components/slider/meta.js +17 -0
- package/dist/components/slider/meta.js.map +1 -0
- package/dist/components/slider/slider.d.ts +29 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.js +61 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/spinner/meta.js +17 -0
- package/dist/components/spinner/meta.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +21 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +45 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/switch/meta.js +17 -0
- package/dist/components/switch/meta.js.map +1 -0
- package/dist/components/switch/switch.d.ts +15 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.js +21 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/table/meta.js +17 -0
- package/dist/components/table/meta.js.map +1 -0
- package/dist/components/table/table.d.ts +41 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.js +78 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tabs/meta.js +17 -0
- package/dist/components/tabs/meta.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +28 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +58 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.js +3 -0
- package/dist/components/toast/meta.js +17 -0
- package/dist/components/toast/meta.js.map +1 -0
- package/dist/components/toast/toast-store.d.ts +84 -0
- package/dist/components/toast/toast-store.d.ts.map +1 -0
- package/dist/components/toast/toast-store.js +115 -0
- package/dist/components/toast/toast-store.js.map +1 -0
- package/dist/components/toast/toast.d.ts +39 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/toast/toast.js +140 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +2 -0
- package/dist/components/tooltip/meta.js +17 -0
- package/dist/components/tooltip/meta.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +24 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +38 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +51 -0
- package/dist/lib/styles.d.ts +21 -0
- package/dist/lib/styles.d.ts.map +1 -0
- package/dist/lib/styles.js +22 -0
- package/dist/lib/styles.js.map +1 -0
- package/dist/lib/utils.d.ts +11 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +21 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/registry/blocks.d.ts +15 -0
- package/dist/registry/blocks.d.ts.map +1 -0
- package/dist/registry/blocks.js +32 -0
- package/dist/registry/blocks.js.map +1 -0
- package/dist/registry/components.d.ts +18 -0
- package/dist/registry/components.d.ts.map +1 -0
- package/dist/registry/components.js +112 -0
- package/dist/registry/components.js.map +1 -0
- package/dist/registry/schema.d.ts +44 -0
- package/dist/registry/schema.d.ts.map +1 -0
- package/dist/registry/schema.js +33 -0
- package/dist/registry/schema.js.map +1 -0
- package/package.json +74 -0
- package/src/blocks/admin-users/admin-users.stories.tsx +83 -0
- package/src/blocks/admin-users/admin-users.test.tsx +159 -0
- package/src/blocks/admin-users/admin-users.tsx +251 -0
- package/src/blocks/admin-users/index.ts +1 -0
- package/src/blocks/admin-users/meta.ts +27 -0
- package/src/blocks/ai-chat/ai-chat.stories.tsx +149 -0
- package/src/blocks/ai-chat/ai-chat.test.tsx +166 -0
- package/src/blocks/ai-chat/ai-chat.tsx +280 -0
- package/src/blocks/ai-chat/index.ts +7 -0
- package/src/blocks/ai-chat/meta.ts +32 -0
- package/src/blocks/dashboard/dashboard.stories.tsx +106 -0
- package/src/blocks/dashboard/dashboard.test.tsx +94 -0
- package/src/blocks/dashboard/dashboard.tsx +192 -0
- package/src/blocks/dashboard/index.ts +6 -0
- package/src/blocks/dashboard/meta.ts +18 -0
- package/src/blocks/forgot-password/forgot-password.stories.tsx +41 -0
- package/src/blocks/forgot-password/forgot-password.test.tsx +62 -0
- package/src/blocks/forgot-password/forgot-password.tsx +158 -0
- package/src/blocks/forgot-password/index.ts +1 -0
- package/src/blocks/forgot-password/meta.ts +18 -0
- package/src/blocks/login/index.ts +1 -0
- package/src/blocks/login/login.stories.tsx +46 -0
- package/src/blocks/login/login.test.tsx +100 -0
- package/src/blocks/login/login.tsx +178 -0
- package/src/blocks/login/meta.ts +18 -0
- package/src/blocks/pricing/index.ts +1 -0
- package/src/blocks/pricing/meta.ts +18 -0
- package/src/blocks/pricing/pricing.stories.tsx +62 -0
- package/src/blocks/pricing/pricing.test.tsx +101 -0
- package/src/blocks/pricing/pricing.tsx +176 -0
- package/src/blocks/settings/index.ts +6 -0
- package/src/blocks/settings/meta.ts +29 -0
- package/src/blocks/settings/settings.stories.tsx +94 -0
- package/src/blocks/settings/settings.test.tsx +167 -0
- package/src/blocks/settings/settings.tsx +317 -0
- package/src/blocks/signup/index.ts +1 -0
- package/src/blocks/signup/meta.ts +18 -0
- package/src/blocks/signup/signup.stories.tsx +27 -0
- package/src/blocks/signup/signup.test.tsx +97 -0
- package/src/blocks/signup/signup.tsx +240 -0
- package/src/components/accordion/accordion.stories.tsx +90 -0
- package/src/components/accordion/accordion.test.tsx +156 -0
- package/src/components/accordion/accordion.tsx +88 -0
- package/src/components/accordion/index.ts +9 -0
- package/src/components/accordion/meta.ts +16 -0
- package/src/components/activity-feed/activity-feed.stories.tsx +163 -0
- package/src/components/activity-feed/activity-feed.test.tsx +125 -0
- package/src/components/activity-feed/activity-feed.tsx +115 -0
- package/src/components/activity-feed/index.ts +12 -0
- package/src/components/activity-feed/meta.ts +17 -0
- package/src/components/ai-agent-status/ai-agent-status.stories.tsx +86 -0
- package/src/components/ai-agent-status/ai-agent-status.test.tsx +66 -0
- package/src/components/ai-agent-status/ai-agent-status.tsx +88 -0
- package/src/components/ai-agent-status/index.ts +6 -0
- package/src/components/ai-agent-status/meta.ts +17 -0
- package/src/components/ai-conversation/ai-conversation.stories.tsx +126 -0
- package/src/components/ai-conversation/ai-conversation.test.tsx +144 -0
- package/src/components/ai-conversation/ai-conversation.tsx +229 -0
- package/src/components/ai-conversation/index.ts +9 -0
- package/src/components/ai-conversation/meta.ts +20 -0
- package/src/components/ai-message/ai-message.stories.tsx +106 -0
- package/src/components/ai-message/ai-message.test.tsx +160 -0
- package/src/components/ai-message/ai-message.tsx +162 -0
- package/src/components/ai-message/index.ts +13 -0
- package/src/components/ai-message/meta.ts +17 -0
- package/src/components/ai-model-selector/ai-model-selector.stories.tsx +66 -0
- package/src/components/ai-model-selector/ai-model-selector.test.tsx +120 -0
- package/src/components/ai-model-selector/ai-model-selector.tsx +112 -0
- package/src/components/ai-model-selector/index.ts +1 -0
- package/src/components/ai-model-selector/meta.ts +17 -0
- package/src/components/ai-prompt-input/ai-prompt-input.stories.tsx +145 -0
- package/src/components/ai-prompt-input/ai-prompt-input.test.tsx +273 -0
- package/src/components/ai-prompt-input/ai-prompt-input.tsx +306 -0
- package/src/components/ai-prompt-input/index.ts +11 -0
- package/src/components/ai-prompt-input/meta.ts +18 -0
- package/src/components/ai-reasoning/ai-reasoning.stories.tsx +60 -0
- package/src/components/ai-reasoning/ai-reasoning.test.tsx +95 -0
- package/src/components/ai-reasoning/ai-reasoning.tsx +106 -0
- package/src/components/ai-reasoning/index.ts +7 -0
- package/src/components/ai-reasoning/meta.ts +17 -0
- package/src/components/ai-response/ai-response.stories.tsx +75 -0
- package/src/components/ai-response/ai-response.test.tsx +96 -0
- package/src/components/ai-response/ai-response.tsx +95 -0
- package/src/components/ai-response/index.ts +7 -0
- package/src/components/ai-response/meta.ts +17 -0
- package/src/components/ai-sources/ai-sources.stories.tsx +93 -0
- package/src/components/ai-sources/ai-sources.test.tsx +102 -0
- package/src/components/ai-sources/ai-sources.tsx +186 -0
- package/src/components/ai-sources/index.ts +11 -0
- package/src/components/ai-sources/meta.ts +17 -0
- package/src/components/ai-token-usage/ai-token-usage.stories.tsx +59 -0
- package/src/components/ai-token-usage/ai-token-usage.test.tsx +83 -0
- package/src/components/ai-token-usage/ai-token-usage.tsx +105 -0
- package/src/components/ai-token-usage/index.ts +6 -0
- package/src/components/ai-token-usage/meta.ts +16 -0
- package/src/components/ai-tool/ai-tool.stories.tsx +96 -0
- package/src/components/ai-tool/ai-tool.test.tsx +137 -0
- package/src/components/ai-tool/ai-tool.tsx +235 -0
- package/src/components/ai-tool/index.ts +13 -0
- package/src/components/ai-tool/meta.ts +17 -0
- package/src/components/alert/alert.stories.tsx +101 -0
- package/src/components/alert/alert.test.tsx +94 -0
- package/src/components/alert/alert.tsx +89 -0
- package/src/components/alert/index.ts +8 -0
- package/src/components/alert/meta.ts +16 -0
- package/src/components/avatar/avatar.stories.tsx +58 -0
- package/src/components/avatar/avatar.test.tsx +64 -0
- package/src/components/avatar/avatar.tsx +68 -0
- package/src/components/avatar/index.ts +9 -0
- package/src/components/avatar/meta.ts +15 -0
- package/src/components/badge/badge.stories.tsx +68 -0
- package/src/components/badge/badge.test.tsx +61 -0
- package/src/components/badge/badge.tsx +54 -0
- package/src/components/badge/index.ts +1 -0
- package/src/components/badge/meta.ts +15 -0
- package/src/components/button/button.stories.tsx +128 -0
- package/src/components/button/button.test.tsx +224 -0
- package/src/components/button/button.tsx +114 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button/meta.ts +16 -0
- package/src/components/calendar/calendar.stories.tsx +105 -0
- package/src/components/calendar/calendar.test.tsx +255 -0
- package/src/components/calendar/calendar.tsx +115 -0
- package/src/components/calendar/index.ts +1 -0
- package/src/components/calendar/meta.ts +17 -0
- package/src/components/card/card.stories.tsx +61 -0
- package/src/components/card/card.test.tsx +66 -0
- package/src/components/card/card.tsx +81 -0
- package/src/components/card/index.ts +9 -0
- package/src/components/card/meta.ts +16 -0
- package/src/components/checkbox/checkbox.stories.tsx +124 -0
- package/src/components/checkbox/checkbox.test.tsx +121 -0
- package/src/components/checkbox/checkbox.tsx +66 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox/meta.ts +16 -0
- package/src/components/code-block/code-block.stories.tsx +62 -0
- package/src/components/code-block/code-block.test.tsx +139 -0
- package/src/components/code-block/code-block.tsx +188 -0
- package/src/components/code-block/index.ts +1 -0
- package/src/components/code-block/meta.ts +17 -0
- package/src/components/combobox/combobox.stories.tsx +171 -0
- package/src/components/combobox/combobox.test.tsx +429 -0
- package/src/components/combobox/combobox.tsx +544 -0
- package/src/components/combobox/index.ts +15 -0
- package/src/components/combobox/meta.ts +17 -0
- package/src/components/command/command.stories.tsx +152 -0
- package/src/components/command/command.test.tsx +380 -0
- package/src/components/command/command.tsx +482 -0
- package/src/components/command/index.ts +17 -0
- package/src/components/command/meta.ts +18 -0
- package/src/components/data-table/data-table.stories.tsx +151 -0
- package/src/components/data-table/data-table.test.tsx +288 -0
- package/src/components/data-table/data-table.tsx +485 -0
- package/src/components/data-table/index.ts +13 -0
- package/src/components/data-table/meta.ts +19 -0
- package/src/components/date-picker/date-picker.stories.tsx +103 -0
- package/src/components/date-picker/date-picker.test.tsx +205 -0
- package/src/components/date-picker/date-picker.tsx +198 -0
- package/src/components/date-picker/index.ts +6 -0
- package/src/components/date-picker/meta.ts +18 -0
- package/src/components/dialog/dialog.stories.tsx +140 -0
- package/src/components/dialog/dialog.test.tsx +186 -0
- package/src/components/dialog/dialog.tsx +132 -0
- package/src/components/dialog/index.ts +16 -0
- package/src/components/dialog/meta.ts +16 -0
- package/src/components/drawer/drawer.stories.tsx +111 -0
- package/src/components/drawer/drawer.test.tsx +187 -0
- package/src/components/drawer/drawer.tsx +293 -0
- package/src/components/drawer/index.ts +16 -0
- package/src/components/drawer/meta.ts +16 -0
- package/src/components/dropdown-menu/dropdown-menu.stories.tsx +128 -0
- package/src/components/dropdown-menu/dropdown-menu.test.tsx +321 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +242 -0
- package/src/components/dropdown-menu/index.ts +21 -0
- package/src/components/dropdown-menu/meta.ts +17 -0
- package/src/components/empty-state/empty-state.stories.tsx +70 -0
- package/src/components/empty-state/empty-state.test.tsx +97 -0
- package/src/components/empty-state/empty-state.tsx +92 -0
- package/src/components/empty-state/index.ts +9 -0
- package/src/components/empty-state/meta.ts +16 -0
- package/src/components/form/form.stories.tsx +144 -0
- package/src/components/form/form.test.tsx +203 -0
- package/src/components/form/form.tsx +221 -0
- package/src/components/form/index.ts +13 -0
- package/src/components/form/meta.ts +17 -0
- package/src/components/input/index.ts +1 -0
- package/src/components/input/input.stories.tsx +84 -0
- package/src/components/input/input.test.tsx +108 -0
- package/src/components/input/input.tsx +51 -0
- package/src/components/input/meta.ts +15 -0
- package/src/components/label/index.ts +1 -0
- package/src/components/label/label.stories.tsx +51 -0
- package/src/components/label/label.test.tsx +55 -0
- package/src/components/label/label.tsx +26 -0
- package/src/components/label/meta.ts +15 -0
- package/src/components/pagination/index.ts +10 -0
- package/src/components/pagination/meta.ts +17 -0
- package/src/components/pagination/pagination.stories.tsx +129 -0
- package/src/components/pagination/pagination.test.tsx +119 -0
- package/src/components/pagination/pagination.tsx +142 -0
- package/src/components/popover/index.ts +9 -0
- package/src/components/popover/meta.ts +18 -0
- package/src/components/popover/popover.stories.tsx +84 -0
- package/src/components/popover/popover.test.tsx +163 -0
- package/src/components/popover/popover.tsx +89 -0
- package/src/components/progress/index.ts +1 -0
- package/src/components/progress/meta.ts +17 -0
- package/src/components/progress/progress.stories.tsx +90 -0
- package/src/components/progress/progress.test.tsx +78 -0
- package/src/components/progress/progress.tsx +70 -0
- package/src/components/radio-group/index.ts +6 -0
- package/src/components/radio-group/meta.ts +16 -0
- package/src/components/radio-group/radio-group.stories.tsx +102 -0
- package/src/components/radio-group/radio-group.test.tsx +152 -0
- package/src/components/radio-group/radio-group.tsx +53 -0
- package/src/components/select/index.ts +14 -0
- package/src/components/select/meta.ts +16 -0
- package/src/components/select/select.stories.tsx +137 -0
- package/src/components/select/select.test.tsx +209 -0
- package/src/components/select/select.tsx +222 -0
- package/src/components/separator/index.ts +1 -0
- package/src/components/separator/meta.ts +15 -0
- package/src/components/separator/separator.stories.tsx +42 -0
- package/src/components/separator/separator.test.tsx +46 -0
- package/src/components/separator/separator.tsx +33 -0
- package/src/components/sheet/index.ts +14 -0
- package/src/components/sheet/meta.ts +16 -0
- package/src/components/sheet/sheet.stories.tsx +107 -0
- package/src/components/sheet/sheet.test.tsx +152 -0
- package/src/components/sheet/sheet.tsx +160 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/meta.ts +15 -0
- package/src/components/skeleton/skeleton.stories.tsx +46 -0
- package/src/components/skeleton/skeleton.test.tsx +57 -0
- package/src/components/skeleton/skeleton.tsx +28 -0
- package/src/components/slider/index.ts +1 -0
- package/src/components/slider/meta.ts +19 -0
- package/src/components/slider/slider.stories.tsx +87 -0
- package/src/components/slider/slider.test.tsx +148 -0
- package/src/components/slider/slider.tsx +135 -0
- package/src/components/spinner/index.ts +1 -0
- package/src/components/spinner/meta.ts +15 -0
- package/src/components/spinner/spinner.stories.tsx +47 -0
- package/src/components/spinner/spinner.test.tsx +41 -0
- package/src/components/spinner/spinner.tsx +68 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/meta.ts +15 -0
- package/src/components/switch/switch.stories.tsx +70 -0
- package/src/components/switch/switch.test.tsx +101 -0
- package/src/components/switch/switch.tsx +42 -0
- package/src/components/table/index.ts +11 -0
- package/src/components/table/meta.ts +17 -0
- package/src/components/table/table.stories.tsx +131 -0
- package/src/components/table/table.test.tsx +153 -0
- package/src/components/table/table.tsx +138 -0
- package/src/components/tabs/index.ts +11 -0
- package/src/components/tabs/meta.ts +17 -0
- package/src/components/tabs/tabs.stories.tsx +139 -0
- package/src/components/tabs/tabs.test.tsx +148 -0
- package/src/components/tabs/tabs.tsx +106 -0
- package/src/components/toast/index.ts +24 -0
- package/src/components/toast/meta.ts +18 -0
- package/src/components/toast/toast-store.ts +181 -0
- package/src/components/toast/toast.stories.tsx +167 -0
- package/src/components/toast/toast.test.tsx +306 -0
- package/src/components/toast/toast.tsx +241 -0
- package/src/components/tooltip/index.ts +8 -0
- package/src/components/tooltip/meta.ts +17 -0
- package/src/components/tooltip/tooltip.stories.tsx +89 -0
- package/src/components/tooltip/tooltip.test.tsx +120 -0
- package/src/components/tooltip/tooltip.tsx +58 -0
- package/src/index.ts +50 -0
- package/src/lib/styles.ts +26 -0
- package/src/lib/utils.test.ts +32 -0
- package/src/lib/utils.ts +24 -0
- package/src/registry/blocks.ts +30 -0
- package/src/registry/components.ts +114 -0
- package/src/registry/meta.test.ts +234 -0
- package/src/registry/schema.ts +58 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/components/card/card.d.ts
|
|
3
|
+
/** Surface that groups related content and actions. */
|
|
4
|
+
declare function Card({ className, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element;
|
|
5
|
+
declare function CardHeader({ className, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element;
|
|
6
|
+
interface CardTitleProps extends ComponentPropsWithRef<"h3"> {
|
|
7
|
+
/**
|
|
8
|
+
* Renders the child element instead of an `<h3>`.
|
|
9
|
+
*
|
|
10
|
+
* A card title is an `h3` because that is right in most layouts, and wrong in
|
|
11
|
+
* some — heading levels have to increase by one, and a card sitting directly
|
|
12
|
+
* under an `h1` needs an `h2`. Use this to set the level the page actually
|
|
13
|
+
* requires, or to render something that is not a heading at all.
|
|
14
|
+
*/
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare function CardTitle({ className, asChild, children, ...props }: CardTitleProps): import("react").JSX.Element;
|
|
18
|
+
declare function CardDescription({ className, ...props }: ComponentPropsWithRef<"p">): import("react").JSX.Element;
|
|
19
|
+
declare function CardContent({ className, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element;
|
|
20
|
+
declare function CardFooter({ className, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardTitleProps };
|
|
23
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","names":[],"sources":["../../../src/components/card/card.tsx"],"mappings":";;;iBAMgB,OAAO,cAAc,SAAS,+CAA4B,IAAA;iBAa1D,aAAa,cAAc,SAAS,+CAA4B,IAAA;UAU/D,uBAAuB;;;;;;;;;EAStC;;iBAGc,YAAY,WAAW,SAAS,aAAa,SAAS,iCAAc,IAAA;iBAiBpE,kBAAkB,cAAc,SAAS,6CAA0B,IAAA;iBAUnE,cAAc,cAAc,SAAS,+CAA4B,IAAA;iBAIjE,aAAa,cAAc,SAAS,+CAA4B,IAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { Slot } from "radix-ui";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/card/card.tsx
|
|
5
|
+
/** Surface that groups related content and actions. */
|
|
6
|
+
function Card({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", {
|
|
8
|
+
"data-slot": "card",
|
|
9
|
+
className: cn("flex flex-col rounded-xl border border-border bg-card text-card-foreground shadow-sm", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function CardHeader({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx("div", {
|
|
15
|
+
"data-slot": "card-header",
|
|
16
|
+
className: cn("flex flex-col gap-1.5 px-6 pt-6 pb-4", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function CardTitle({ className, asChild, children, ...props }) {
|
|
21
|
+
const Comp = asChild ? Slot.Root : "h3";
|
|
22
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
23
|
+
"data-slot": "card-title",
|
|
24
|
+
className: cn("text-lg leading-tight font-semibold tracking-tight", className),
|
|
25
|
+
...props,
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function CardDescription({ className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx("p", {
|
|
31
|
+
"data-slot": "card-description",
|
|
32
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function CardContent({ className, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx("div", {
|
|
38
|
+
"data-slot": "card-content",
|
|
39
|
+
className: cn("px-6 pb-6", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function CardFooter({ className, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx("div", {
|
|
45
|
+
"data-slot": "card-footer",
|
|
46
|
+
className: cn("flex items-center gap-3 border-t border-border px-6 py-4", className),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { Slot } from \"radix-ui\";\nimport type { ComponentPropsWithRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/** Surface that groups related content and actions. */\nexport function Card({ className, ...props }: ComponentPropsWithRef<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"flex flex-col rounded-xl border border-border bg-card text-card-foreground shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport function CardHeader({ className, ...props }: ComponentPropsWithRef<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\"flex flex-col gap-1.5 px-6 pt-6 pb-4\", className)}\n {...props}\n />\n );\n}\n\nexport interface CardTitleProps extends ComponentPropsWithRef<\"h3\"> {\n /**\n * Renders the child element instead of an `<h3>`.\n *\n * A card title is an `h3` because that is right in most layouts, and wrong in\n * some — heading levels have to increase by one, and a card sitting directly\n * under an `h1` needs an `h2`. Use this to set the level the page actually\n * requires, or to render something that is not a heading at all.\n */\n asChild?: boolean;\n}\n\nexport function CardTitle({ className, asChild, children, ...props }: CardTitleProps) {\n const Comp = asChild ? Slot.Root : \"h3\";\n\n // `children` is destructured rather than spread so static analysis can see\n // that the heading has content — a heading that renders empty is a real\n // accessibility defect, and we want the linter able to catch it at call sites.\n return (\n <Comp\n data-slot=\"card-title\"\n className={cn(\"text-lg leading-tight font-semibold tracking-tight\", className)}\n {...props}\n >\n {children}\n </Comp>\n );\n}\n\nexport function CardDescription({ className, ...props }: ComponentPropsWithRef<\"p\">) {\n return (\n <p\n data-slot=\"card-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nexport function CardContent({ className, ...props }: ComponentPropsWithRef<\"div\">) {\n return <div data-slot=\"card-content\" className={cn(\"px-6 pb-6\", className)} {...props} />;\n}\n\nexport function CardFooter({ className, ...props }: ComponentPropsWithRef<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center gap-3 border-t border-border px-6 py-4\", className)}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;AAMA,SAAgB,KAAK,EAAE,WAAW,GAAG,SAAuC;CAC1E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,wFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAgB,WAAW,EAAE,WAAW,GAAG,SAAuC;CAChF,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;AAcA,SAAgB,UAAU,EAAE,WAAW,SAAS,UAAU,GAAG,SAAyB;CACpF,MAAM,OAAO,UAAU,KAAK,OAAO;CAKnC,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GAAG,sDAAsD,SAAS;EAC7E,GAAI;EAEH;CACG,CAAA;AAEV;AAEA,SAAgB,gBAAgB,EAAE,WAAW,GAAG,SAAqC;CACnF,OACE,oBAAC,KAAD;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAgB,YAAY,EAAE,WAAW,GAAG,SAAuC;CACjF,OAAO,oBAAC,OAAD;EAAK,aAAU;EAAe,WAAW,GAAG,aAAa,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC1F;AAEA,SAAgB,WAAW,EAAE,WAAW,GAAG,SAAuC;CAChF,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,4DAA4D,SAAS;EACnF,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineMeta } from "../../registry/schema.js";
|
|
2
|
+
//#region src/components/card/meta.ts
|
|
3
|
+
const meta = defineMeta({
|
|
4
|
+
name: "card",
|
|
5
|
+
title: "Card",
|
|
6
|
+
description: "A surface that groups related content and actions into a single block.",
|
|
7
|
+
category: "display",
|
|
8
|
+
status: "stable",
|
|
9
|
+
dependencies: ["radix-ui"],
|
|
10
|
+
registryDependencies: [],
|
|
11
|
+
files: ["card.tsx"],
|
|
12
|
+
a11y: "Card renders a plain div with no implicit landmark. CardTitle is an h3 by default — use asChild to set the level the page actually needs, since heading levels must increase by one, or to render something that is not a heading at all."
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { meta };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","names":[],"sources":["../../../src/components/card/meta.ts"],"sourcesContent":["import { defineMeta } from \"@/registry/schema\";\n\nexport const meta = defineMeta({\n name: \"card\",\n title: \"Card\",\n description: \"A surface that groups related content and actions into a single block.\",\n category: \"display\",\n status: \"stable\",\n dependencies: [\"radix-ui\"],\n registryDependencies: [],\n files: [\"card.tsx\"],\n a11y:\n \"Card renders a plain div with no implicit landmark. CardTitle is an h3 by default — use \" +\n \"asChild to set the level the page actually needs, since heading levels must increase by one, \" +\n \"or to render something that is not a heading at all.\",\n});\n"],"mappings":";;AAEA,MAAa,OAAO,WAAW;CAC7B,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc,CAAC,UAAU;CACzB,sBAAsB,CAAC;CACvB,OAAO,CAAC,UAAU;CAClB,MACE;AAGJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Checkbox } from "radix-ui";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
//#region src/components/checkbox/checkbox.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A control for a single on/off choice, or one of several independent choices.
|
|
6
|
+
*
|
|
7
|
+
* Supports the indeterminate state (`checked="indeterminate"`) for a parent box
|
|
8
|
+
* summarising a partially-selected group. Indeterminate is a state the
|
|
9
|
+
* *application* sets, never a third value the user cycles into.
|
|
10
|
+
*/
|
|
11
|
+
type CheckboxProps = ComponentPropsWithRef<typeof Checkbox.Root>;
|
|
12
|
+
declare function Checkbox$1({ className, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Checkbox$1 as Checkbox, CheckboxProps };
|
|
15
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../../src/components/checkbox/checkbox.tsx"],"mappings":";;;;;;;;;;KAeY,gBAAgB,6BAA6B,SAAkB;iBAE3D,aAAW,cAAc,SAAS,gCAAa,IAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { focusRing } from "../../lib/styles.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { Checkbox } from "radix-ui";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/checkbox/checkbox.tsx
|
|
7
|
+
function Checkbox$1({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
9
|
+
"data-slot": "checkbox",
|
|
10
|
+
className: cn("peer size-4 shrink-0 rounded-xs border border-input bg-background shadow-xs", "transition-[background-color,border-color,box-shadow] duration-[var(--duration-fast)]", "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", "data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground", "disabled:cursor-not-allowed disabled:opacity-55", "aria-invalid:border-destructive", focusRing, className),
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsxs(Checkbox.Indicator, {
|
|
13
|
+
"data-slot": "checkbox-indicator",
|
|
14
|
+
className: "group grid place-items-center text-current",
|
|
15
|
+
children: [/* @__PURE__ */ jsx("svg", {
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
fill: "none",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
className: "size-3.5 group-data-[state=indeterminate]:hidden",
|
|
20
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
21
|
+
d: "m5 13 4 4L19 7",
|
|
22
|
+
stroke: "currentColor",
|
|
23
|
+
strokeWidth: "3",
|
|
24
|
+
strokeLinecap: "round",
|
|
25
|
+
strokeLinejoin: "round"
|
|
26
|
+
})
|
|
27
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
28
|
+
viewBox: "0 0 24 24",
|
|
29
|
+
fill: "none",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
className: "hidden size-3.5 group-data-[state=indeterminate]:block",
|
|
32
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
33
|
+
d: "M6 12h12",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: "3",
|
|
36
|
+
strokeLinecap: "round"
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { Checkbox$1 as Checkbox };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":["Checkbox","CheckboxPrimitive"],"sources":["../../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\";\nimport type { ComponentPropsWithRef } from \"react\";\n\nimport { focusRing } from \"@/lib/styles\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * A control for a single on/off choice, or one of several independent choices.\n *\n * Supports the indeterminate state (`checked=\"indeterminate\"`) for a parent box\n * summarising a partially-selected group. Indeterminate is a state the\n * *application* sets, never a third value the user cycles into.\n */\nexport type CheckboxProps = ComponentPropsWithRef<typeof CheckboxPrimitive.Root>;\n\nexport function Checkbox({ className, ...props }: CheckboxProps) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer size-4 shrink-0 rounded-xs border border-input bg-background shadow-xs\",\n \"transition-[background-color,border-color,box-shadow] duration-[var(--duration-fast)]\",\n \"data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n \"data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground\",\n \"disabled:cursor-not-allowed disabled:opacity-55\",\n \"aria-invalid:border-destructive\",\n focusRing,\n className,\n )}\n {...props}\n >\n {/* The indicator carries data-state, so both marks live here and CSS picks\n one. Rendering conditionally in JS would need the checked value, which\n an uncontrolled checkbox does not expose. */}\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"group grid place-items-center text-current\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n className=\"size-3.5 group-data-[state=indeterminate]:hidden\"\n >\n <path\n d=\"m5 13 4 4L19 7\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n className=\"hidden size-3.5 group-data-[state=indeterminate]:block\"\n >\n <path d=\"M6 12h12\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" />\n </svg>\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n"],"mappings":";;;;;;AAiBA,SAAgBA,WAAS,EAAE,WAAW,GAAG,SAAwB;CAC/D,OACE,oBAACC,SAAkB,MAAnB;EACE,aAAU;EACV,WAAW,GACT,+EACA,yFACA,oHACA,sIACA,mDACA,mCACA,WACA,SACF;EACA,GAAI;EAKJ,UAAA,qBAACA,SAAkB,WAAnB;GACE,aAAU;GACV,WAAU;GAFZ,UAAA,CAIE,oBAAC,OAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAY;IACZ,WAAU;IAEV,UAAA,oBAAC,QAAD;KACE,GAAE;KACF,QAAO;KACP,aAAY;KACZ,eAAc;KACd,gBAAe;IAChB,CAAA;GACE,CAAA,GACL,oBAAC,OAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAY;IACZ,WAAU;IAEV,UAAA,oBAAC,QAAD;KAAM,GAAE;KAAW,QAAO;KAAe,aAAY;KAAI,eAAc;IAAS,CAAA;GAC7E,CAAA,CACsB;;CACP,CAAA;AAE5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineMeta } from "../../registry/schema.js";
|
|
2
|
+
//#region src/components/checkbox/meta.ts
|
|
3
|
+
const meta = defineMeta({
|
|
4
|
+
name: "checkbox",
|
|
5
|
+
title: "Checkbox",
|
|
6
|
+
description: "A control for an on/off choice, with support for an indeterminate state.",
|
|
7
|
+
category: "form",
|
|
8
|
+
status: "stable",
|
|
9
|
+
dependencies: ["radix-ui"],
|
|
10
|
+
registryDependencies: [],
|
|
11
|
+
files: ["checkbox.tsx"],
|
|
12
|
+
a11y: "Toggles with Space, matching the native control. Always pair with a Label via htmlFor/id — the box alone has no accessible name. Indeterminate is announced as \"mixed\" and is a state the application sets, not one the user can reach by clicking."
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { meta };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","names":[],"sources":["../../../src/components/checkbox/meta.ts"],"sourcesContent":["import { defineMeta } from \"@/registry/schema\";\n\nexport const meta = defineMeta({\n name: \"checkbox\",\n title: \"Checkbox\",\n description: \"A control for an on/off choice, with support for an indeterminate state.\",\n category: \"form\",\n status: \"stable\",\n dependencies: [\"radix-ui\"],\n registryDependencies: [],\n files: [\"checkbox.tsx\"],\n a11y:\n \"Toggles with Space, matching the native control. Always pair with a Label via htmlFor/id — \" +\n 'the box alone has no accessible name. Indeterminate is announced as \"mixed\" and is a ' +\n \"state the application sets, not one the user can reach by clicking.\",\n});\n"],"mappings":";;AAEA,MAAa,OAAO,WAAW;CAC7B,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc,CAAC,UAAU;CACzB,sBAAsB,CAAC;CACvB,OAAO,CAAC,cAAc;CACtB,MACE;AAGJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/components/code-block/code-block.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A block of code, with a copy control.
|
|
5
|
+
*
|
|
6
|
+
* Syntax highlighting is deliberately not built in. A highlighter is a large
|
|
7
|
+
* dependency, a theme system of its own, and a choice between build-time and
|
|
8
|
+
* runtime that belongs to the application. Pass already-highlighted markup as
|
|
9
|
+
* children and the styling here applies to it; pass a plain string and it
|
|
10
|
+
* renders as plain code.
|
|
11
|
+
*/
|
|
12
|
+
interface CodeBlockProps extends ComponentPropsWithRef<"div"> {
|
|
13
|
+
/** Shown in the header and used as the language hint. */
|
|
14
|
+
language?: string;
|
|
15
|
+
/** Filename or other caption for the header. */
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The text the copy button puts on the clipboard.
|
|
19
|
+
*
|
|
20
|
+
* Required when children are rendered markup, because reading text back out
|
|
21
|
+
* of highlighted DOM loses whitespace in ways that break pasted code.
|
|
22
|
+
*/
|
|
23
|
+
code?: string;
|
|
24
|
+
/** Hides the copy control. */
|
|
25
|
+
hideCopy?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare function CodeBlock({ className, language, title, code, hideCopy, children, ...props }: CodeBlockProps): import("react").JSX.Element;
|
|
28
|
+
interface CopyButtonProps extends Omit<ComponentPropsWithRef<"button">, "onClick"> {
|
|
29
|
+
getText: () => string;
|
|
30
|
+
label?: string;
|
|
31
|
+
copiedLabel?: string;
|
|
32
|
+
/** How long the confirmation stays, in milliseconds. */
|
|
33
|
+
resetAfter?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Copies text and confirms it.
|
|
37
|
+
*
|
|
38
|
+
* The confirmation is announced politely as well as shown — a checkmark that
|
|
39
|
+
* only appears visually leaves a screen reader user with no idea whether the
|
|
40
|
+
* button did anything. Failure is surfaced too, rather than silently looking
|
|
41
|
+
* like success, since the clipboard API can be refused outright.
|
|
42
|
+
*/
|
|
43
|
+
declare function CopyButton({ className, getText, label, copiedLabel, resetAfter, ...props }: CopyButtonProps): import("react").JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { CodeBlock, CodeBlockProps, CopyButton, CopyButtonProps };
|
|
46
|
+
//# sourceMappingURL=code-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","names":[],"sources":["../../../src/components/code-block/code-block.tsx"],"mappings":";;;;;;;;;;;UAiBiB,uBAAuB;;EAEtC;;EAEA;;;;;;;EAOA;;EAEA;;iBAGc,YACd,WACA,UACA,OACA,MACA,UACA,aACG,SACF,iCAAc,IAAA;UAwCA,wBAAwB,KAAK;EAC5C;EACA;EACA;;EAEA;;;;;;;;;;iBAWc,aACd,WACA,SACA,OACA,aACA,eACG,SACF,kCAAe,IAAA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { focusRing } from "../../lib/styles.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
|
+
//#region src/components/code-block/code-block.tsx
|
|
7
|
+
function CodeBlock({ className, language, title, code, hideCopy, children, ...props }) {
|
|
8
|
+
const preRef = useRef(null);
|
|
9
|
+
const showHeader = Boolean(title ?? language) || !hideCopy;
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
"data-slot": "code-block",
|
|
12
|
+
"data-language": language,
|
|
13
|
+
className: cn("overflow-hidden rounded-lg border border-border bg-muted/40", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [showHeader ? /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: "flex items-center gap-2 border-b border-border px-3 py-1.5",
|
|
17
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "truncate text-2xs font-medium text-muted-foreground",
|
|
19
|
+
children: title ?? language
|
|
20
|
+
}), hideCopy ? null : /* @__PURE__ */ jsx(CopyButton, { getText: () => code ?? preRef.current?.textContent ?? "" })]
|
|
21
|
+
}) : null, /* @__PURE__ */ jsx("pre", {
|
|
22
|
+
ref: preRef,
|
|
23
|
+
tabIndex: 0,
|
|
24
|
+
role: "region",
|
|
25
|
+
"aria-label": title ?? (language ? `${language} code` : "Code"),
|
|
26
|
+
className: cn("overflow-x-auto p-3 font-mono text-xs leading-relaxed", focusRing, "focus-visible:ring-inset"),
|
|
27
|
+
children: /* @__PURE__ */ jsx("code", { children })
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Copies text and confirms it.
|
|
33
|
+
*
|
|
34
|
+
* The confirmation is announced politely as well as shown — a checkmark that
|
|
35
|
+
* only appears visually leaves a screen reader user with no idea whether the
|
|
36
|
+
* button did anything. Failure is surfaced too, rather than silently looking
|
|
37
|
+
* like success, since the clipboard API can be refused outright.
|
|
38
|
+
*/
|
|
39
|
+
function CopyButton({ className, getText, label = "Copy code", copiedLabel = "Copied", resetAfter = 2e3, ...props }) {
|
|
40
|
+
const [state, setState] = useState("idle");
|
|
41
|
+
const timer = useRef(null);
|
|
42
|
+
useEffect(() => () => {
|
|
43
|
+
if (timer.current) clearTimeout(timer.current);
|
|
44
|
+
}, []);
|
|
45
|
+
const copy = useCallback(() => {
|
|
46
|
+
const reset = () => {
|
|
47
|
+
if (timer.current) clearTimeout(timer.current);
|
|
48
|
+
timer.current = setTimeout(() => {
|
|
49
|
+
setState("idle");
|
|
50
|
+
}, resetAfter);
|
|
51
|
+
};
|
|
52
|
+
navigator.clipboard.writeText(getText()).then(() => {
|
|
53
|
+
setState("copied");
|
|
54
|
+
reset();
|
|
55
|
+
}, () => {
|
|
56
|
+
setState("error");
|
|
57
|
+
reset();
|
|
58
|
+
});
|
|
59
|
+
}, [getText, resetAfter]);
|
|
60
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
"data-slot": "copy-button",
|
|
63
|
+
"data-state": state,
|
|
64
|
+
onClick: copy,
|
|
65
|
+
"aria-label": label,
|
|
66
|
+
className: cn("ml-auto grid size-6 shrink-0 place-items-center rounded text-muted-foreground", "transition-colors duration-[var(--duration-fast)] hover:bg-accent hover:text-foreground", focusRing, className),
|
|
67
|
+
...props,
|
|
68
|
+
children: [state === "copied" ? /* @__PURE__ */ jsx("svg", {
|
|
69
|
+
viewBox: "0 0 24 24",
|
|
70
|
+
fill: "none",
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
className: "size-3.5",
|
|
73
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
74
|
+
d: "m5 13 4 4L19 7",
|
|
75
|
+
stroke: "currentColor",
|
|
76
|
+
strokeWidth: "2",
|
|
77
|
+
strokeLinecap: "round",
|
|
78
|
+
strokeLinejoin: "round"
|
|
79
|
+
})
|
|
80
|
+
}) : /* @__PURE__ */ jsxs("svg", {
|
|
81
|
+
viewBox: "0 0 24 24",
|
|
82
|
+
fill: "none",
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
className: "size-3.5",
|
|
85
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
86
|
+
x: "9",
|
|
87
|
+
y: "9",
|
|
88
|
+
width: "12",
|
|
89
|
+
height: "12",
|
|
90
|
+
rx: "2",
|
|
91
|
+
stroke: "currentColor",
|
|
92
|
+
strokeWidth: "2"
|
|
93
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
94
|
+
d: "M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1",
|
|
95
|
+
stroke: "currentColor",
|
|
96
|
+
strokeWidth: "2",
|
|
97
|
+
strokeLinecap: "round"
|
|
98
|
+
})]
|
|
99
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
100
|
+
role: "status",
|
|
101
|
+
"aria-live": "polite",
|
|
102
|
+
className: "sr-only",
|
|
103
|
+
children: state === "copied" ? copiedLabel : state === "error" ? "Copy failed" : ""
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { CodeBlock, CopyButton };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=code-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.js","names":[],"sources":["../../../src/components/code-block/code-block.tsx"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useEffect, useRef, useState, type ComponentPropsWithRef } from \"react\";\n\nimport { focusRing } from \"@/lib/styles\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * A block of code, with a copy control.\n *\n * Syntax highlighting is deliberately not built in. A highlighter is a large\n * dependency, a theme system of its own, and a choice between build-time and\n * runtime that belongs to the application. Pass already-highlighted markup as\n * children and the styling here applies to it; pass a plain string and it\n * renders as plain code.\n */\n\nexport interface CodeBlockProps extends ComponentPropsWithRef<\"div\"> {\n /** Shown in the header and used as the language hint. */\n language?: string;\n /** Filename or other caption for the header. */\n title?: string;\n /**\n * The text the copy button puts on the clipboard.\n *\n * Required when children are rendered markup, because reading text back out\n * of highlighted DOM loses whitespace in ways that break pasted code.\n */\n code?: string;\n /** Hides the copy control. */\n hideCopy?: boolean;\n}\n\nexport function CodeBlock({\n className,\n language,\n title,\n code,\n hideCopy,\n children,\n ...props\n}: CodeBlockProps) {\n const preRef = useRef<HTMLPreElement | null>(null);\n const showHeader = Boolean(title ?? language) || !hideCopy;\n\n return (\n <div\n data-slot=\"code-block\"\n data-language={language}\n className={cn(\"overflow-hidden rounded-lg border border-border bg-muted/40\", className)}\n {...props}\n >\n {showHeader ? (\n <div className=\"flex items-center gap-2 border-b border-border px-3 py-1.5\">\n <span className=\"truncate text-2xs font-medium text-muted-foreground\">\n {title ?? language}\n </span>\n {hideCopy ? null : (\n <CopyButton getText={() => code ?? preRef.current?.textContent ?? \"\"} />\n )}\n </div>\n ) : null}\n <pre\n ref={preRef}\n // Focusable named region: code overflows horizontally, and a scroll box\n // that cannot take focus is unreachable by keyboard.\n tabIndex={0}\n role=\"region\"\n aria-label={title ?? (language ? `${language} code` : \"Code\")}\n className={cn(\n \"overflow-x-auto p-3 font-mono text-xs leading-relaxed\",\n focusRing,\n \"focus-visible:ring-inset\",\n )}\n >\n <code>{children}</code>\n </pre>\n </div>\n );\n}\n\nexport interface CopyButtonProps extends Omit<ComponentPropsWithRef<\"button\">, \"onClick\"> {\n getText: () => string;\n label?: string;\n copiedLabel?: string;\n /** How long the confirmation stays, in milliseconds. */\n resetAfter?: number;\n}\n\n/**\n * Copies text and confirms it.\n *\n * The confirmation is announced politely as well as shown — a checkmark that\n * only appears visually leaves a screen reader user with no idea whether the\n * button did anything. Failure is surfaced too, rather than silently looking\n * like success, since the clipboard API can be refused outright.\n */\nexport function CopyButton({\n className,\n getText,\n label = \"Copy code\",\n copiedLabel = \"Copied\",\n resetAfter = 2000,\n ...props\n}: CopyButtonProps) {\n const [state, setState] = useState<\"idle\" | \"copied\" | \"error\">(\"idle\");\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n },\n [],\n );\n\n const copy = useCallback(() => {\n const reset = () => {\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => {\n setState(\"idle\");\n }, resetAfter);\n };\n\n navigator.clipboard.writeText(getText()).then(\n () => {\n setState(\"copied\");\n reset();\n },\n () => {\n // Refused by the browser or unavailable outside a secure context.\n // Saying so beats pretending it worked.\n setState(\"error\");\n reset();\n },\n );\n }, [getText, resetAfter]);\n\n return (\n <button\n type=\"button\"\n data-slot=\"copy-button\"\n data-state={state}\n onClick={copy}\n aria-label={label}\n className={cn(\n \"ml-auto grid size-6 shrink-0 place-items-center rounded text-muted-foreground\",\n \"transition-colors duration-[var(--duration-fast)] hover:bg-accent hover:text-foreground\",\n focusRing,\n className,\n )}\n {...props}\n >\n {state === \"copied\" ? (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\" className=\"size-3.5\">\n <path\n d=\"m5 13 4 4L19 7\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ) : (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\" className=\"size-3.5\">\n <rect\n x=\"9\"\n y=\"9\"\n width=\"12\"\n height=\"12\"\n rx=\"2\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <path\n d=\"M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </svg>\n )}\n {/* Announced, not just drawn. */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {state === \"copied\" ? copiedLabel : state === \"error\" ? \"Copy failed\" : \"\"}\n </span>\n </button>\n );\n}\n"],"mappings":";;;;;;AAiCA,SAAgB,UAAU,EACxB,WACA,UACA,OACA,MACA,UACA,UACA,GAAG,SACc;CACjB,MAAM,SAAS,OAA8B,IAAI;CACjD,MAAM,aAAa,QAAQ,SAAS,QAAQ,KAAK,CAAC;CAElD,OACE,qBAAC,OAAD;EACE,aAAU;EACV,iBAAe;EACf,WAAW,GAAG,+DAA+D,SAAS;EACtF,GAAI;EAJN,UAAA,CAMG,aACC,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,QAAD;IAAM,WAAU;IACb,UAAA,SAAS;GACN,CAAA,GACL,WAAW,OACV,oBAAC,YAAD,EAAY,eAAe,QAAQ,OAAO,SAAS,eAAe,GAAK,CAAA,CAEtE;EACH,CAAA,IAAA,MACJ,oBAAC,OAAD;GACE,KAAK;GAGL,UAAU;GACV,MAAK;GACL,cAAY,UAAU,WAAW,GAAG,SAAS,SAAS;GACtD,WAAW,GACT,yDACA,WACA,0BACF;GAEA,UAAA,oBAAC,QAAD,EAAO,SAAe,CAAA;EACnB,CAAA,CACF;;AAET;;;;;;;;;AAkBA,SAAgB,WAAW,EACzB,WACA,SACA,QAAQ,aACR,cAAc,UACd,aAAa,KACb,GAAG,SACe;CAClB,MAAM,CAAC,OAAO,YAAY,SAAsC,MAAM;CACtE,MAAM,QAAQ,OAA6C,IAAI;CAE/D,sBACc;EACV,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;CAC/C,GACA,CAAC,CACH;CAEA,MAAM,OAAO,kBAAkB;EAC7B,MAAM,cAAc;GAClB,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;GAC7C,MAAM,UAAU,iBAAiB;IAC/B,SAAS,MAAM;GACjB,GAAG,UAAU;EACf;EAEA,UAAU,UAAU,UAAU,QAAQ,CAAC,CAAC,CAAC,WACjC;GACJ,SAAS,QAAQ;GACjB,MAAM;EACR,SACM;GAGJ,SAAS,OAAO;GAChB,MAAM;EACR,CACF;CACF,GAAG,CAAC,SAAS,UAAU,CAAC;CAExB,OACE,qBAAC,UAAD;EACE,MAAK;EACL,aAAU;EACV,cAAY;EACZ,SAAS;EACT,cAAY;EACZ,WAAW,GACT,iFACA,2FACA,WACA,SACF;EACA,GAAI;EAZN,UAAA,CAcG,UAAU,WACT,oBAAC,OAAD;GAAK,SAAQ;GAAY,MAAK;GAAO,eAAY;GAAO,WAAU;GAChE,UAAA,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;GAChB,CAAA;EACE,CAAA,IAEL,qBAAC,OAAD;GAAK,SAAQ;GAAY,MAAK;GAAO,eAAY;GAAO,WAAU;GAAlE,UAAA,CACE,oBAAC,QAAD;IACE,GAAE;IACF,GAAE;IACF,OAAM;IACN,QAAO;IACP,IAAG;IACH,QAAO;IACP,aAAY;GACb,CAAA,GACD,oBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,eAAc;GACf,CAAA,CACE;EAGP,CAAA,GAAA,oBAAC,QAAD;GAAM,MAAK;GAAS,aAAU;GAAS,WAAU;GAC9C,UAAA,UAAU,WAAW,cAAc,UAAU,UAAU,gBAAgB;EACpE,CAAA,CACA;;AAEZ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineMeta } from "../../registry/schema.js";
|
|
2
|
+
//#region src/components/code-block/meta.ts
|
|
3
|
+
const meta = defineMeta({
|
|
4
|
+
name: "code-block",
|
|
5
|
+
title: "Code Block",
|
|
6
|
+
description: "A block of code with a copy control, ready for any highlighter.",
|
|
7
|
+
category: "data",
|
|
8
|
+
status: "stable",
|
|
9
|
+
dependencies: [],
|
|
10
|
+
registryDependencies: [],
|
|
11
|
+
files: ["code-block.tsx"],
|
|
12
|
+
a11y: "The pre is a focusable named region, since code overflows horizontally and an unfocusable scroll box is unreachable by keyboard. Copying is announced through a polite live region as well as shown, and a refused clipboard write reports failure rather than looking like success."
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { meta };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","names":[],"sources":["../../../src/components/code-block/meta.ts"],"sourcesContent":["import { defineMeta } from \"@/registry/schema\";\n\nexport const meta = defineMeta({\n name: \"code-block\",\n title: \"Code Block\",\n description: \"A block of code with a copy control, ready for any highlighter.\",\n category: \"data\",\n status: \"stable\",\n dependencies: [],\n registryDependencies: [],\n files: [\"code-block.tsx\"],\n a11y:\n \"The pre is a focusable named region, since code overflows horizontally and an unfocusable \" +\n \"scroll box is unreachable by keyboard. Copying is announced through a polite live region as \" +\n \"well as shown, and a refused clipboard write reports failure rather than looking like \" +\n \"success.\",\n});\n"],"mappings":";;AAEA,MAAa,OAAO,WAAW;CAC7B,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc,CAAC;CACf,sBAAsB,CAAC;CACvB,OAAO,CAAC,gBAAgB;CACxB,MACE;AAIJ,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Popover } from "radix-ui";
|
|
2
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
//#region src/components/combobox/combobox.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A searchable single-select.
|
|
6
|
+
*
|
|
7
|
+
* Implements the ARIA combobox pattern directly on a popover rather than
|
|
8
|
+
* depending on a command-menu package: the input owns `role="combobox"`, the
|
|
9
|
+
* list owns `role="listbox"`, and the active option is tracked with
|
|
10
|
+
* `aria-activedescendant` so focus never leaves the input while typing.
|
|
11
|
+
*
|
|
12
|
+
* Navigation reads the rendered options from the DOM rather than a registry,
|
|
13
|
+
* which keeps the active option correct as filtering adds and removes items —
|
|
14
|
+
* a registry has to be kept in sync with what is actually on screen, and drifts.
|
|
15
|
+
*
|
|
16
|
+
* This version is single-select and flat. Multi-select and grouping can be
|
|
17
|
+
* added without changing this API.
|
|
18
|
+
*/
|
|
19
|
+
/** Default match: case-insensitive substring over the value and any keywords. */
|
|
20
|
+
declare function defaultComboboxFilter(search: string, haystack: string[]): boolean;
|
|
21
|
+
interface ComboboxProps {
|
|
22
|
+
value?: string;
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
onValueChange?: (value: string) => void;
|
|
25
|
+
open?: boolean;
|
|
26
|
+
defaultOpen?: boolean;
|
|
27
|
+
onOpenChange?: (open: boolean) => void;
|
|
28
|
+
/** Overrides how a search string is matched against an option. */
|
|
29
|
+
filter?: (search: string, haystack: string[]) => boolean;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
declare function Combobox({ value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, filter, children }: ComboboxProps): import("react").JSX.Element;
|
|
33
|
+
interface ComboboxTriggerProps extends ComponentPropsWithRef<"button"> {
|
|
34
|
+
/** Shown when nothing is selected. */
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
}
|
|
37
|
+
declare function ComboboxTrigger({ className, placeholder, children, ...props }: ComboboxTriggerProps): import("react").JSX.Element;
|
|
38
|
+
interface ComboboxContentProps extends ComponentPropsWithRef<typeof Popover.Content> {
|
|
39
|
+
/** Names the popover, which carries role="dialog". */
|
|
40
|
+
label?: string;
|
|
41
|
+
}
|
|
42
|
+
declare function ComboboxContent({ className, align, sideOffset, label, children, ...props }: ComboboxContentProps): import("react").JSX.Element;
|
|
43
|
+
type ComboboxInputProps = Omit<ComponentPropsWithRef<"input">, "value" | "onChange">;
|
|
44
|
+
declare function ComboboxInput({ className, ...props }: ComboboxInputProps): import("react").JSX.Element;
|
|
45
|
+
declare function ComboboxList({ className, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element;
|
|
46
|
+
interface ComboboxItemProps extends Omit<ComponentPropsWithRef<"div">, "onSelect" | "children"> {
|
|
47
|
+
/** The value reported by onValueChange, and the primary search term. */
|
|
48
|
+
value: string;
|
|
49
|
+
/** Extra search terms that are not shown, such as synonyms or an id. */
|
|
50
|
+
keywords?: string[];
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
children?: ReactNode;
|
|
53
|
+
}
|
|
54
|
+
declare function ComboboxItem({ className, value, keywords, disabled, children, ...props }: ComboboxItemProps): import("react").JSX.Element | null;
|
|
55
|
+
/** Shown only when the filter leaves nothing. */
|
|
56
|
+
declare function ComboboxEmpty({ className, children, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element | null;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { Combobox, ComboboxContent, ComboboxContentProps, ComboboxEmpty, ComboboxInput, ComboboxInputProps, ComboboxItem, ComboboxItemProps, ComboboxList, ComboboxProps, ComboboxTrigger, ComboboxTriggerProps, defaultComboboxFilter };
|
|
59
|
+
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","names":[],"sources":["../../../src/components/combobox/combobox.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;iBAqCgB,sBAAsB,gBAAgB;UAkCrC;EACf;EACA;EACA,iBAAiB;EACjB;EACA;EACA,gBAAgB;;EAEhB,UAAU,gBAAgB;EAC1B,WAAW;;iBAGG,WACd,OAAO,WACP,cACA,eACA,MAAM,UACN,aACA,cACA,QACA,YACC,gCAAa,IAAA;UA4FC,6BAA6B;;EAE5C;;iBAGc,kBACd,WACA,aACA,aACG,SACF,uCAAoB,IAAA;UA0CN,6BAA6B,6BACrC,QAAiB;;EAGxB;;iBAGc,kBACd,WACA,OACA,YACA,OACA,aACG,SACF,uCAAoB,IAAA;KAiCX,qBAAqB,KAAK;iBAEtB,gBAAgB,cAAc,SAAS,qCAAkB,IAAA;iBAkHzD,eAAe,cAAc,SAAS,+CAA4B,IAAA;UAejE,0BAA0B,KACzC;;EAIA;;EAEA;EACA;EACA,WAAW;;iBAGG,eACd,WACA,OACA,UACA,UACA,aACG,SACF,oCAAiB,IAAA;;iBAgGJ,gBAAgB,WAAW,aAAa,SAAS,+CAA4B,IAAA"}
|