@agimon-ai/doompi-web-components 0.0.1-alpha.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 +22 -0
- package/README.md +106 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/components/Accordion.d.cts +11 -0
- package/dist/components/Accordion.d.cts.map +1 -0
- package/dist/components/Avatar.d.cts +10 -0
- package/dist/components/Avatar.d.cts.map +1 -0
- package/dist/components/Badge.d.cts +18 -0
- package/dist/components/Badge.d.cts.map +1 -0
- package/dist/components/Button.d.cts +25 -0
- package/dist/components/Button.d.cts.map +1 -0
- package/dist/components/Checkbox.d.cts +8 -0
- package/dist/components/Checkbox.d.cts.map +1 -0
- package/dist/components/Collapsible.d.cts +10 -0
- package/dist/components/Collapsible.d.cts.map +1 -0
- package/dist/components/Command.d.cts +42 -0
- package/dist/components/Command.d.cts.map +1 -0
- package/dist/components/Dialog.d.cts +39 -0
- package/dist/components/Dialog.d.cts.map +1 -0
- package/dist/components/Dot.d.cts +16 -0
- package/dist/components/Dot.d.cts.map +1 -0
- package/dist/components/DropdownMenu.d.cts +34 -0
- package/dist/components/DropdownMenu.d.cts.map +1 -0
- package/dist/components/EmptyState.d.cts +18 -0
- package/dist/components/EmptyState.d.cts.map +1 -0
- package/dist/components/Input.d.cts +20 -0
- package/dist/components/Input.d.cts.map +1 -0
- package/dist/components/Kbd.d.cts +7 -0
- package/dist/components/Kbd.d.cts.map +1 -0
- package/dist/components/Label.d.cts +8 -0
- package/dist/components/Label.d.cts.map +1 -0
- package/dist/components/Markdown.d.cts +8 -0
- package/dist/components/Markdown.d.cts.map +1 -0
- package/dist/components/MessageItem.d.cts +71 -0
- package/dist/components/MessageItem.d.cts.map +1 -0
- package/dist/components/MessageLines.d.cts +24 -0
- package/dist/components/MessageLines.d.cts.map +1 -0
- package/dist/components/OptionList.d.cts +50 -0
- package/dist/components/OptionList.d.cts.map +1 -0
- package/dist/components/Panel.d.cts +15 -0
- package/dist/components/Panel.d.cts.map +1 -0
- package/dist/components/Popover.d.cts +19 -0
- package/dist/components/Popover.d.cts.map +1 -0
- package/dist/components/Progress.d.cts +8 -0
- package/dist/components/Progress.d.cts.map +1 -0
- package/dist/components/RadioGroup.d.cts +15 -0
- package/dist/components/RadioGroup.d.cts.map +1 -0
- package/dist/components/ScrollArea.d.cts +13 -0
- package/dist/components/ScrollArea.d.cts.map +1 -0
- package/dist/components/SectionLabel.d.cts +7 -0
- package/dist/components/SectionLabel.d.cts.map +1 -0
- package/dist/components/Select.d.cts +19 -0
- package/dist/components/Select.d.cts.map +1 -0
- package/dist/components/Separator.d.cts +13 -0
- package/dist/components/Separator.d.cts.map +1 -0
- package/dist/components/Skeleton.d.cts +11 -0
- package/dist/components/Skeleton.d.cts.map +1 -0
- package/dist/components/Spinner.d.cts +15 -0
- package/dist/components/Spinner.d.cts.map +1 -0
- package/dist/components/StatusBadge.d.cts +24 -0
- package/dist/components/StatusBadge.d.cts.map +1 -0
- package/dist/components/StreamCursor.d.cts +7 -0
- package/dist/components/StreamCursor.d.cts.map +1 -0
- package/dist/components/Switch.d.cts +8 -0
- package/dist/components/Switch.d.cts.map +1 -0
- package/dist/components/Tabs.d.cts +36 -0
- package/dist/components/Tabs.d.cts.map +1 -0
- package/dist/components/Textarea.d.cts +10 -0
- package/dist/components/Textarea.d.cts.map +1 -0
- package/dist/components/Toast.d.cts +24 -0
- package/dist/components/Toast.d.cts.map +1 -0
- package/dist/components/Tooltip.d.cts +11 -0
- package/dist/components/Tooltip.d.cts.map +1 -0
- package/dist/icons/icons.d.cts +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +42 -0
- package/dist/index.d.mts +42 -0
- package/dist/index.mjs +1 -0
- package/dist/lib/cn.d.cts +7 -0
- package/dist/lib/cn.d.cts.map +1 -0
- package/dist/lib/collapse.d.cts +15 -0
- package/dist/lib/collapse.d.cts.map +1 -0
- package/dist/lib/optionList.d.cts +22 -0
- package/dist/lib/optionList.d.cts.map +1 -0
- package/dist/lib/tone.d.cts +26 -0
- package/dist/lib/tone.d.cts.map +1 -0
- package/dist/src/components/Accordion.cjs +2 -0
- package/dist/src/components/Accordion.cjs.map +1 -0
- package/dist/src/components/Accordion.d.mts +11 -0
- package/dist/src/components/Accordion.d.mts.map +1 -0
- package/dist/src/components/Accordion.mjs +2 -0
- package/dist/src/components/Accordion.mjs.map +1 -0
- package/dist/src/components/Avatar.cjs +2 -0
- package/dist/src/components/Avatar.cjs.map +1 -0
- package/dist/src/components/Avatar.d.mts +10 -0
- package/dist/src/components/Avatar.d.mts.map +1 -0
- package/dist/src/components/Avatar.mjs +2 -0
- package/dist/src/components/Avatar.mjs.map +1 -0
- package/dist/src/components/Badge.cjs +2 -0
- package/dist/src/components/Badge.cjs.map +1 -0
- package/dist/src/components/Badge.d.mts +18 -0
- package/dist/src/components/Badge.d.mts.map +1 -0
- package/dist/src/components/Badge.mjs +2 -0
- package/dist/src/components/Badge.mjs.map +1 -0
- package/dist/src/components/Button.cjs +2 -0
- package/dist/src/components/Button.cjs.map +1 -0
- package/dist/src/components/Button.d.mts +25 -0
- package/dist/src/components/Button.d.mts.map +1 -0
- package/dist/src/components/Button.mjs +2 -0
- package/dist/src/components/Button.mjs.map +1 -0
- package/dist/src/components/Checkbox.cjs +2 -0
- package/dist/src/components/Checkbox.cjs.map +1 -0
- package/dist/src/components/Checkbox.d.mts +8 -0
- package/dist/src/components/Checkbox.d.mts.map +1 -0
- package/dist/src/components/Checkbox.mjs +2 -0
- package/dist/src/components/Checkbox.mjs.map +1 -0
- package/dist/src/components/Collapsible.cjs +2 -0
- package/dist/src/components/Collapsible.cjs.map +1 -0
- package/dist/src/components/Collapsible.d.mts +10 -0
- package/dist/src/components/Collapsible.d.mts.map +1 -0
- package/dist/src/components/Collapsible.mjs +2 -0
- package/dist/src/components/Collapsible.mjs.map +1 -0
- package/dist/src/components/Command.cjs +2 -0
- package/dist/src/components/Command.cjs.map +1 -0
- package/dist/src/components/Command.d.mts +42 -0
- package/dist/src/components/Command.d.mts.map +1 -0
- package/dist/src/components/Command.mjs +2 -0
- package/dist/src/components/Command.mjs.map +1 -0
- package/dist/src/components/Dialog.cjs +2 -0
- package/dist/src/components/Dialog.cjs.map +1 -0
- package/dist/src/components/Dialog.d.mts +39 -0
- package/dist/src/components/Dialog.d.mts.map +1 -0
- package/dist/src/components/Dialog.mjs +2 -0
- package/dist/src/components/Dialog.mjs.map +1 -0
- package/dist/src/components/Dot.cjs +2 -0
- package/dist/src/components/Dot.cjs.map +1 -0
- package/dist/src/components/Dot.d.mts +16 -0
- package/dist/src/components/Dot.d.mts.map +1 -0
- package/dist/src/components/Dot.mjs +2 -0
- package/dist/src/components/Dot.mjs.map +1 -0
- package/dist/src/components/DropdownMenu.cjs +2 -0
- package/dist/src/components/DropdownMenu.cjs.map +1 -0
- package/dist/src/components/DropdownMenu.d.mts +34 -0
- package/dist/src/components/DropdownMenu.d.mts.map +1 -0
- package/dist/src/components/DropdownMenu.mjs +2 -0
- package/dist/src/components/DropdownMenu.mjs.map +1 -0
- package/dist/src/components/EmptyState.cjs +2 -0
- package/dist/src/components/EmptyState.cjs.map +1 -0
- package/dist/src/components/EmptyState.d.mts +18 -0
- package/dist/src/components/EmptyState.d.mts.map +1 -0
- package/dist/src/components/EmptyState.mjs +2 -0
- package/dist/src/components/EmptyState.mjs.map +1 -0
- package/dist/src/components/Input.cjs +2 -0
- package/dist/src/components/Input.cjs.map +1 -0
- package/dist/src/components/Input.d.mts +20 -0
- package/dist/src/components/Input.d.mts.map +1 -0
- package/dist/src/components/Input.mjs +2 -0
- package/dist/src/components/Input.mjs.map +1 -0
- package/dist/src/components/Kbd.cjs +2 -0
- package/dist/src/components/Kbd.cjs.map +1 -0
- package/dist/src/components/Kbd.d.mts +7 -0
- package/dist/src/components/Kbd.d.mts.map +1 -0
- package/dist/src/components/Kbd.mjs +2 -0
- package/dist/src/components/Kbd.mjs.map +1 -0
- package/dist/src/components/Label.cjs +2 -0
- package/dist/src/components/Label.cjs.map +1 -0
- package/dist/src/components/Label.d.mts +8 -0
- package/dist/src/components/Label.d.mts.map +1 -0
- package/dist/src/components/Label.mjs +2 -0
- package/dist/src/components/Label.mjs.map +1 -0
- package/dist/src/components/Markdown.cjs +2 -0
- package/dist/src/components/Markdown.cjs.map +1 -0
- package/dist/src/components/Markdown.d.mts +8 -0
- package/dist/src/components/Markdown.d.mts.map +1 -0
- package/dist/src/components/Markdown.mjs +2 -0
- package/dist/src/components/Markdown.mjs.map +1 -0
- package/dist/src/components/MessageItem.cjs +2 -0
- package/dist/src/components/MessageItem.cjs.map +1 -0
- package/dist/src/components/MessageItem.d.mts +71 -0
- package/dist/src/components/MessageItem.d.mts.map +1 -0
- package/dist/src/components/MessageItem.mjs +2 -0
- package/dist/src/components/MessageItem.mjs.map +1 -0
- package/dist/src/components/MessageLines.cjs +2 -0
- package/dist/src/components/MessageLines.cjs.map +1 -0
- package/dist/src/components/MessageLines.d.mts +24 -0
- package/dist/src/components/MessageLines.d.mts.map +1 -0
- package/dist/src/components/MessageLines.mjs +2 -0
- package/dist/src/components/MessageLines.mjs.map +1 -0
- package/dist/src/components/OptionList.cjs +2 -0
- package/dist/src/components/OptionList.cjs.map +1 -0
- package/dist/src/components/OptionList.d.mts +50 -0
- package/dist/src/components/OptionList.d.mts.map +1 -0
- package/dist/src/components/OptionList.mjs +2 -0
- package/dist/src/components/OptionList.mjs.map +1 -0
- package/dist/src/components/Panel.cjs +2 -0
- package/dist/src/components/Panel.cjs.map +1 -0
- package/dist/src/components/Panel.d.mts +15 -0
- package/dist/src/components/Panel.d.mts.map +1 -0
- package/dist/src/components/Panel.mjs +2 -0
- package/dist/src/components/Panel.mjs.map +1 -0
- package/dist/src/components/Popover.cjs +2 -0
- package/dist/src/components/Popover.cjs.map +1 -0
- package/dist/src/components/Popover.d.mts +19 -0
- package/dist/src/components/Popover.d.mts.map +1 -0
- package/dist/src/components/Popover.mjs +2 -0
- package/dist/src/components/Popover.mjs.map +1 -0
- package/dist/src/components/Progress.cjs +2 -0
- package/dist/src/components/Progress.cjs.map +1 -0
- package/dist/src/components/Progress.d.mts +8 -0
- package/dist/src/components/Progress.d.mts.map +1 -0
- package/dist/src/components/Progress.mjs +2 -0
- package/dist/src/components/Progress.mjs.map +1 -0
- package/dist/src/components/RadioGroup.cjs +2 -0
- package/dist/src/components/RadioGroup.cjs.map +1 -0
- package/dist/src/components/RadioGroup.d.mts +15 -0
- package/dist/src/components/RadioGroup.d.mts.map +1 -0
- package/dist/src/components/RadioGroup.mjs +2 -0
- package/dist/src/components/RadioGroup.mjs.map +1 -0
- package/dist/src/components/ScrollArea.cjs +2 -0
- package/dist/src/components/ScrollArea.cjs.map +1 -0
- package/dist/src/components/ScrollArea.d.mts +13 -0
- package/dist/src/components/ScrollArea.d.mts.map +1 -0
- package/dist/src/components/ScrollArea.mjs +2 -0
- package/dist/src/components/ScrollArea.mjs.map +1 -0
- package/dist/src/components/SectionLabel.cjs +2 -0
- package/dist/src/components/SectionLabel.cjs.map +1 -0
- package/dist/src/components/SectionLabel.d.mts +7 -0
- package/dist/src/components/SectionLabel.d.mts.map +1 -0
- package/dist/src/components/SectionLabel.mjs +2 -0
- package/dist/src/components/SectionLabel.mjs.map +1 -0
- package/dist/src/components/Select.cjs +2 -0
- package/dist/src/components/Select.cjs.map +1 -0
- package/dist/src/components/Select.d.mts +19 -0
- package/dist/src/components/Select.d.mts.map +1 -0
- package/dist/src/components/Select.mjs +2 -0
- package/dist/src/components/Select.mjs.map +1 -0
- package/dist/src/components/Separator.cjs +2 -0
- package/dist/src/components/Separator.cjs.map +1 -0
- package/dist/src/components/Separator.d.mts +13 -0
- package/dist/src/components/Separator.d.mts.map +1 -0
- package/dist/src/components/Separator.mjs +2 -0
- package/dist/src/components/Separator.mjs.map +1 -0
- package/dist/src/components/Skeleton.cjs +2 -0
- package/dist/src/components/Skeleton.cjs.map +1 -0
- package/dist/src/components/Skeleton.d.mts +11 -0
- package/dist/src/components/Skeleton.d.mts.map +1 -0
- package/dist/src/components/Skeleton.mjs +2 -0
- package/dist/src/components/Skeleton.mjs.map +1 -0
- package/dist/src/components/Spinner.cjs +2 -0
- package/dist/src/components/Spinner.cjs.map +1 -0
- package/dist/src/components/Spinner.d.mts +15 -0
- package/dist/src/components/Spinner.d.mts.map +1 -0
- package/dist/src/components/Spinner.mjs +2 -0
- package/dist/src/components/Spinner.mjs.map +1 -0
- package/dist/src/components/StatusBadge.cjs +2 -0
- package/dist/src/components/StatusBadge.cjs.map +1 -0
- package/dist/src/components/StatusBadge.d.mts +24 -0
- package/dist/src/components/StatusBadge.d.mts.map +1 -0
- package/dist/src/components/StatusBadge.mjs +2 -0
- package/dist/src/components/StatusBadge.mjs.map +1 -0
- package/dist/src/components/StreamCursor.cjs +2 -0
- package/dist/src/components/StreamCursor.cjs.map +1 -0
- package/dist/src/components/StreamCursor.d.mts +7 -0
- package/dist/src/components/StreamCursor.d.mts.map +1 -0
- package/dist/src/components/StreamCursor.mjs +2 -0
- package/dist/src/components/StreamCursor.mjs.map +1 -0
- package/dist/src/components/Switch.cjs +2 -0
- package/dist/src/components/Switch.cjs.map +1 -0
- package/dist/src/components/Switch.d.mts +8 -0
- package/dist/src/components/Switch.d.mts.map +1 -0
- package/dist/src/components/Switch.mjs +2 -0
- package/dist/src/components/Switch.mjs.map +1 -0
- package/dist/src/components/Tabs.cjs +2 -0
- package/dist/src/components/Tabs.cjs.map +1 -0
- package/dist/src/components/Tabs.d.mts +36 -0
- package/dist/src/components/Tabs.d.mts.map +1 -0
- package/dist/src/components/Tabs.mjs +2 -0
- package/dist/src/components/Tabs.mjs.map +1 -0
- package/dist/src/components/Textarea.cjs +2 -0
- package/dist/src/components/Textarea.cjs.map +1 -0
- package/dist/src/components/Textarea.d.mts +10 -0
- package/dist/src/components/Textarea.d.mts.map +1 -0
- package/dist/src/components/Textarea.mjs +2 -0
- package/dist/src/components/Textarea.mjs.map +1 -0
- package/dist/src/components/Toast.cjs +2 -0
- package/dist/src/components/Toast.cjs.map +1 -0
- package/dist/src/components/Toast.d.mts +24 -0
- package/dist/src/components/Toast.d.mts.map +1 -0
- package/dist/src/components/Toast.mjs +2 -0
- package/dist/src/components/Toast.mjs.map +1 -0
- package/dist/src/components/Tooltip.cjs +2 -0
- package/dist/src/components/Tooltip.cjs.map +1 -0
- package/dist/src/components/Tooltip.d.mts +11 -0
- package/dist/src/components/Tooltip.d.mts.map +1 -0
- package/dist/src/components/Tooltip.mjs +2 -0
- package/dist/src/components/Tooltip.mjs.map +1 -0
- package/dist/src/icons/icons.cjs +1 -0
- package/dist/src/icons/icons.d.mts +2 -0
- package/dist/src/icons/icons.mjs +1 -0
- package/dist/src/lib/cn.cjs +2 -0
- package/dist/src/lib/cn.cjs.map +1 -0
- package/dist/src/lib/cn.d.mts +7 -0
- package/dist/src/lib/cn.d.mts.map +1 -0
- package/dist/src/lib/cn.mjs +2 -0
- package/dist/src/lib/cn.mjs.map +1 -0
- package/dist/src/lib/collapse.cjs +2 -0
- package/dist/src/lib/collapse.cjs.map +1 -0
- package/dist/src/lib/collapse.d.mts +15 -0
- package/dist/src/lib/collapse.d.mts.map +1 -0
- package/dist/src/lib/collapse.mjs +2 -0
- package/dist/src/lib/collapse.mjs.map +1 -0
- package/dist/src/lib/optionList.cjs +2 -0
- package/dist/src/lib/optionList.cjs.map +1 -0
- package/dist/src/lib/optionList.d.mts +22 -0
- package/dist/src/lib/optionList.d.mts.map +1 -0
- package/dist/src/lib/optionList.mjs +2 -0
- package/dist/src/lib/optionList.mjs.map +1 -0
- package/dist/src/lib/tone.cjs +2 -0
- package/dist/src/lib/tone.cjs.map +1 -0
- package/dist/src/lib/tone.d.mts +26 -0
- package/dist/src/lib/tone.d.mts.map +1 -0
- package/dist/src/lib/tone.mjs +2 -0
- package/dist/src/lib/tone.mjs.map +1 -0
- package/dist/src/theme/apply.cjs +3 -0
- package/dist/src/theme/apply.cjs.map +1 -0
- package/dist/src/theme/apply.d.mts +26 -0
- package/dist/src/theme/apply.d.mts.map +1 -0
- package/dist/src/theme/apply.mjs +3 -0
- package/dist/src/theme/apply.mjs.map +1 -0
- package/dist/src/theme/builtinThemes.cjs +2 -0
- package/dist/src/theme/builtinThemes.cjs.map +1 -0
- package/dist/src/theme/builtinThemes.d.mts +12 -0
- package/dist/src/theme/builtinThemes.d.mts.map +1 -0
- package/dist/src/theme/builtinThemes.mjs +2 -0
- package/dist/src/theme/builtinThemes.mjs.map +1 -0
- package/dist/src/theme/derive.cjs +2 -0
- package/dist/src/theme/derive.cjs.map +1 -0
- package/dist/src/theme/derive.d.mts +15 -0
- package/dist/src/theme/derive.d.mts.map +1 -0
- package/dist/src/theme/derive.mjs +2 -0
- package/dist/src/theme/derive.mjs.map +1 -0
- package/dist/src/theme/parse.cjs +2 -0
- package/dist/src/theme/parse.cjs.map +1 -0
- package/dist/src/theme/parse.d.mts +11 -0
- package/dist/src/theme/parse.d.mts.map +1 -0
- package/dist/src/theme/parse.mjs +2 -0
- package/dist/src/theme/parse.mjs.map +1 -0
- package/dist/src/theme/piTheme.cjs +2 -0
- package/dist/src/theme/piTheme.cjs.map +1 -0
- package/dist/src/theme/piTheme.d.mts +20 -0
- package/dist/src/theme/piTheme.d.mts.map +1 -0
- package/dist/src/theme/piTheme.mjs +2 -0
- package/dist/src/theme/piTheme.mjs.map +1 -0
- package/dist/src/theme/preference.cjs +2 -0
- package/dist/src/theme/preference.cjs.map +1 -0
- package/dist/src/theme/preference.d.mts +16 -0
- package/dist/src/theme/preference.d.mts.map +1 -0
- package/dist/src/theme/preference.mjs +2 -0
- package/dist/src/theme/preference.mjs.map +1 -0
- package/dist/src/types/theme.cjs +2 -0
- package/dist/src/types/theme.cjs.map +1 -0
- package/dist/src/types/theme.d.mts +39 -0
- package/dist/src/types/theme.d.mts.map +1 -0
- package/dist/src/types/theme.mjs +2 -0
- package/dist/src/types/theme.mjs.map +1 -0
- package/dist/src/types/tone.cjs +2 -0
- package/dist/src/types/tone.cjs.map +1 -0
- package/dist/src/types/tone.d.mts +29 -0
- package/dist/src/types/tone.d.mts.map +1 -0
- package/dist/src/types/tone.mjs +2 -0
- package/dist/src/types/tone.mjs.map +1 -0
- package/dist/theme/apply.d.cts +26 -0
- package/dist/theme/apply.d.cts.map +1 -0
- package/dist/theme/builtinThemes.d.cts +12 -0
- package/dist/theme/builtinThemes.d.cts.map +1 -0
- package/dist/theme/derive.d.cts +15 -0
- package/dist/theme/derive.d.cts.map +1 -0
- package/dist/theme/parse.d.cts +11 -0
- package/dist/theme/parse.d.cts.map +1 -0
- package/dist/theme/piTheme.d.cts +20 -0
- package/dist/theme/piTheme.d.cts.map +1 -0
- package/dist/theme/preference.d.cts +16 -0
- package/dist/theme/preference.d.cts.map +1 -0
- package/dist/theme.cjs +1 -0
- package/dist/theme.d.cts +8 -0
- package/dist/theme.d.mts +8 -0
- package/dist/theme.mjs +1 -0
- package/dist/themes/doom-nord-dark.cjs +2 -0
- package/dist/themes/doom-nord-dark.cjs.map +1 -0
- package/dist/themes/doom-nord-dark.mjs +2 -0
- package/dist/themes/doom-nord-dark.mjs.map +1 -0
- package/dist/themes/doom-one-dark.cjs +2 -0
- package/dist/themes/doom-one-dark.cjs.map +1 -0
- package/dist/themes/doom-one-dark.mjs +2 -0
- package/dist/themes/doom-one-dark.mjs.map +1 -0
- package/dist/themes/doom-one-light.cjs +2 -0
- package/dist/themes/doom-one-light.cjs.map +1 -0
- package/dist/themes/doom-one-light.mjs +2 -0
- package/dist/themes/doom-one-light.mjs.map +1 -0
- package/dist/types/theme.d.cts +39 -0
- package/dist/types/theme.d.cts.map +1 -0
- package/dist/types/tone.d.cts +29 -0
- package/dist/types/tone.d.cts.map +1 -0
- package/llms.txt +8 -0
- package/package.json +95 -0
- package/styles/tokens.css +202 -0
- package/themes/doom-nord-dark.json +27 -0
- package/themes/doom-one-dark.json +39 -0
- package/themes/doom-one-light.json +27 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapse.d.cts","names":[],"sources":["../../src/lib/collapse.ts"],"mappings":";UAAiB,eAAe;EAC9B,OAAO;;EAEP;;;;;;;iBAQc,cAAc,GAAG,gBAAgB,KAAK,eAAe,oBAAoB,eAAe"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { KeyboardEvent } from "react";
|
|
2
|
+
//#region src/lib/optionList.d.ts
|
|
3
|
+
/** Digits are a shortcut, not the only way in: only the first nine can have one. */
|
|
4
|
+
declare const MAX_DIGIT_SHORTCUT = 9;
|
|
5
|
+
/**
|
|
6
|
+
* The keyboard an option list answers to, handled on whichever element the
|
|
7
|
+
* surrounding overlay focuses. Every key it claims is consumed, so a digit
|
|
8
|
+
* that answers the agent never also reaches the rail's session shortcuts.
|
|
9
|
+
*/
|
|
10
|
+
declare function handleOptionListKey(event: KeyboardEvent, input: {
|
|
11
|
+
options: readonly string[];
|
|
12
|
+
cursor: number;
|
|
13
|
+
onCursorChange: (cursor: number) => void;
|
|
14
|
+
onSelect: (option: string) => void;
|
|
15
|
+
}): void;
|
|
16
|
+
/** What the footer should promise, given how many options there are. */
|
|
17
|
+
declare function optionListHint(count: number): string;
|
|
18
|
+
/** The digit a row answers to, or the bullet that says it has none. */
|
|
19
|
+
declare function optionMarker(index: number): string;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { MAX_DIGIT_SHORTCUT, handleOptionListKey, optionListHint, optionMarker };
|
|
22
|
+
//# sourceMappingURL=optionList.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optionList.d.cts","names":[],"sources":["../../src/lib/optionList.ts"],"mappings":";;;cAGa;;;;;;iBAOG,oBACd,OAAO,eACP;EACE;EACA;EACA,iBAAiB;EACjB,WAAW;;;iBA8BC,eAAe;;iBAKf,aAAa"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChipTone, DotTone, MessageLineTone, StatusTone } from "../types/tone.cjs";
|
|
2
|
+
//#region src/lib/tone.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Translations between the tone vocabularies.
|
|
5
|
+
*
|
|
6
|
+
* Every surface that shows an outcome used to carry its own
|
|
7
|
+
* `Record<Tone, string>` table mapping a state onto a colour class. Those
|
|
8
|
+
* tables disagreed as often as they agreed. These maps are the one place the
|
|
9
|
+
* translation lives, so a card picks a status tone from its own domain and
|
|
10
|
+
* asks here what colour that reads as.
|
|
11
|
+
*/
|
|
12
|
+
/** The colour a status reads as, for the chip and border families. */
|
|
13
|
+
declare const STATUS_TO_CHIP: Readonly<Record<StatusTone, ChipTone>>;
|
|
14
|
+
/** The dot a status reads as; a neutral status is present but not live. */
|
|
15
|
+
declare const STATUS_TO_DOT: Readonly<Record<StatusTone, DotTone>>;
|
|
16
|
+
/**
|
|
17
|
+
* The status a colour stands for, for a caller that has only a chip tone.
|
|
18
|
+
* Lossy on purpose: the palette has more colours than there are outcomes, and
|
|
19
|
+
* a colour with no outcome of its own reads as neutral.
|
|
20
|
+
*/
|
|
21
|
+
declare const CHIP_TO_STATUS: Readonly<Record<ChipTone, StatusTone>>;
|
|
22
|
+
/** The status a body line's role corresponds to, for a card that badges its worst line. */
|
|
23
|
+
declare const LINE_TONE_TO_STATUS: Readonly<Record<MessageLineTone, StatusTone>>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { CHIP_TO_STATUS, LINE_TONE_TO_STATUS, STATUS_TO_CHIP, STATUS_TO_DOT };
|
|
26
|
+
//# sourceMappingURL=tone.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tone.d.cts","names":[],"sources":["../../src/lib/tone.ts"],"mappings":";;;;;;;;;;;;cAaa,gBAAgB,SAAS,OAAO,YAAY;;cAU5C,eAAe,SAAS,OAAO,YAAY;;;;;;cAc3C,gBAAgB,SAAS,OAAO,UAAU;;cAc1C,qBAAqB,SAAS,OAAO,iBAAiB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../icons/icons.cjs");const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime"),r=require("lucide-react");function i(e){return(0,n.jsx)(t.Accordion.Root,{"data-slot":`accordion`,...e})}function a({className:r,...i}){return(0,n.jsx)(t.Accordion.Item,{"data-slot":`accordion-item`,className:e.cn(`border-b border-doom-border-soft last:border-b-0`,r),...i})}function o({className:i,children:a,...o}){return(0,n.jsx)(t.Accordion.Header,{className:`flex`,children:(0,n.jsxs)(t.Accordion.Trigger,{"data-slot":`accordion-trigger`,className:e.cn(`flex flex-1 cursor-pointer items-center justify-between gap-2 py-2 text-left text-[11px] text-doom-hi outline-none transition-colors hover:text-doom-blue focus-visible:text-doom-blue [&[data-state=open]>svg]:rotate-180`,i),...o,children:[a,(0,n.jsx)(r.ChevronDown,{className:`h-3 w-3 shrink-0 text-doom-faint transition-transform`})]})})}function s({className:r,...i}){return(0,n.jsx)(t.Accordion.Content,{"data-slot":`accordion-content`,className:e.cn(`overflow-hidden pb-2 text-[11px] text-doom-dim`,r),...i})}exports.Accordion=i,exports.AccordionContent=s,exports.AccordionItem=a,exports.AccordionTrigger=o;
|
|
2
|
+
//# sourceMappingURL=Accordion.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.cjs","names":["AccordionPrimitive","cn","ChevronDownIcon"],"sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as AccordionPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { ChevronDownIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\n\n/** Several collapsibles that know about each other; pass type=\"single\" for one open at a time. */\nexport function Accordion(props: ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />;\n}\n\nexport function AccordionItem({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn('border-b border-doom-border-soft last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nexport function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'flex flex-1 cursor-pointer items-center justify-between gap-2 py-2 text-left text-[11px] text-doom-hi outline-none transition-colors hover:text-doom-blue focus-visible:text-doom-blue [&[data-state=open]>svg]:rotate-180',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"h-3 w-3 shrink-0 text-doom-faint transition-transform\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n}\n\nexport function AccordionContent({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className={cn('overflow-hidden pb-2 text-[11px] text-doom-dim', className)}\n {...props}\n />\n );\n}\n"],"mappings":"kJAMA,SAAgB,EAAU,EAAuD,CAC/E,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,UAAmB,KAApB,CAAyB,YAAU,YAAY,GAAI,CAAQ,CAAA,CACpE,CAEA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAyD,CACrG,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,UAAmB,KAApB,CACE,YAAU,iBACV,UAAWC,EAAAA,GAAG,mDAAoD,CAAS,EAC3E,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAiB,CAAE,YAAW,WAAU,GAAG,GAA4D,CACrH,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,UAAmB,OAApB,CAA2B,UAAU,OACnC,UAAA,EAAA,EAAA,KAAA,CAACA,EAAAA,UAAmB,QAApB,CACE,YAAU,oBACV,UAAWC,EAAAA,GACT,6NACA,CACF,EACA,GAAI,EANN,SAAA,CAQG,GACD,EAAA,EAAA,IAAA,CAACC,EAAAA,YAAD,CAAiB,UAAU,uDAAyD,CAAA,CAC1D,GACH,CAAA,CAE/B,CAEA,SAAgB,EAAiB,CAAE,YAAW,GAAG,GAA4D,CAC3G,OACE,EAAA,EAAA,IAAA,CAACF,EAAAA,UAAmB,QAApB,CACE,YAAU,oBACV,UAAWC,EAAAA,GAAG,iDAAkD,CAAS,EACzE,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Accordion } from "radix-ui";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
//#region src/components/Accordion.d.ts
|
|
4
|
+
/** Several collapsibles that know about each other; pass type="single" for one open at a time. */
|
|
5
|
+
declare function Accordion$1(props: ComponentProps<typeof Accordion.Root>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionItem({ className, ...props }: ComponentProps<typeof Accordion.Item>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof Accordion.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AccordionContent({ className, ...props }: ComponentProps<typeof Accordion.Content>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Accordion$1 as Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
11
|
+
//# sourceMappingURL=Accordion.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.mts","names":[],"sources":["../../../src/components/Accordion.tsx"],"mappings":";;;;iBAMgB,YAAU,OAAO,sBAAsB,UAAmB,oCAAK,IAAA;iBAI/D,gBAAgB,cAAc,SAAS,sBAAsB,UAAmB,oCAAK,IAAA;iBAUrF,mBAAmB,WAAW,aAAa,SAAS,sBAAsB,UAAmB,uCAAQ,IAAA;iBAkBrG,mBAAmB,cAAc,SAAS,sBAAsB,UAAmB,uCAAQ,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ChevronDownIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Accordion as n}from"radix-ui";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(e){return r(n.Root,{"data-slot":`accordion`,...e})}function o({className:e,...i}){return r(n.Item,{"data-slot":`accordion-item`,className:t(`border-b border-doom-border-soft last:border-b-0`,e),...i})}function s({className:a,children:o,...s}){return r(n.Header,{className:`flex`,children:i(n.Trigger,{"data-slot":`accordion-trigger`,className:t(`flex flex-1 cursor-pointer items-center justify-between gap-2 py-2 text-left text-[11px] text-doom-hi outline-none transition-colors hover:text-doom-blue focus-visible:text-doom-blue [&[data-state=open]>svg]:rotate-180`,a),...s,children:[o,r(e,{className:`h-3 w-3 shrink-0 text-doom-faint transition-transform`})]})})}function c({className:e,...i}){return r(n.Content,{"data-slot":`accordion-content`,className:t(`overflow-hidden pb-2 text-[11px] text-doom-dim`,e),...i})}export{a as Accordion,c as AccordionContent,o as AccordionItem,s as AccordionTrigger};
|
|
2
|
+
//# sourceMappingURL=Accordion.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.mjs","names":["Accordion","AccordionPrimitive"],"sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as AccordionPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { ChevronDownIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\n\n/** Several collapsibles that know about each other; pass type=\"single\" for one open at a time. */\nexport function Accordion(props: ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />;\n}\n\nexport function AccordionItem({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn('border-b border-doom-border-soft last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nexport function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'flex flex-1 cursor-pointer items-center justify-between gap-2 py-2 text-left text-[11px] text-doom-hi outline-none transition-colors hover:text-doom-blue focus-visible:text-doom-blue [&[data-state=open]>svg]:rotate-180',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"h-3 w-3 shrink-0 text-doom-faint transition-transform\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n}\n\nexport function AccordionContent({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className={cn('overflow-hidden pb-2 text-[11px] text-doom-dim', className)}\n {...props}\n />\n );\n}\n"],"mappings":"+KAMA,SAAgBA,EAAU,EAAuD,CAC/E,OAAO,EAACC,EAAmB,KAApB,CAAyB,YAAU,YAAY,GAAI,CAAQ,CAAA,CACpE,CAEA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAyD,CACrG,OACE,EAACA,EAAmB,KAApB,CACE,YAAU,iBACV,UAAW,EAAG,mDAAoD,CAAS,EAC3E,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAiB,CAAE,YAAW,WAAU,GAAG,GAA4D,CACrH,OACE,EAACA,EAAmB,OAApB,CAA2B,UAAU,OACnC,SAAA,EAACA,EAAmB,QAApB,CACE,YAAU,oBACV,UAAW,EACT,6NACA,CACF,EACA,GAAI,EANN,SAAA,CAQG,EACD,EAAC,EAAD,CAAiB,UAAU,uDAAyD,CAAA,CAC1D,GACH,CAAA,CAE/B,CAEA,SAAgB,EAAiB,CAAE,YAAW,GAAG,GAA4D,CAC3G,OACE,EAACA,EAAmB,QAApB,CACE,YAAU,oBACV,UAAW,EAAG,iDAAkD,CAAS,EACzE,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,...i}){return(0,n.jsx)(t.Avatar.Root,{"data-slot":`avatar`,className:e.cn(`relative flex h-6 w-6 shrink-0 overflow-hidden rounded-full bg-doom-deep`,r),...i})}function i({className:r,...i}){return(0,n.jsx)(t.Avatar.Image,{"data-slot":`avatar-image`,className:e.cn(`h-full w-full object-cover`,r),...i})}function a({className:r,...i}){return(0,n.jsx)(t.Avatar.Fallback,{"data-slot":`avatar-fallback`,className:e.cn(`flex h-full w-full items-center justify-center text-[10px] font-bold text-doom-dim`,r),...i})}exports.Avatar=r,exports.AvatarFallback=a,exports.AvatarImage=i;
|
|
2
|
+
//# sourceMappingURL=Avatar.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.cjs","names":["AvatarPrimitive","cn"],"sources":["../../../src/components/Avatar.tsx"],"sourcesContent":["import { Avatar as AvatarPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A face or an initial; Radix only shows the fallback once the image has actually failed. */\nexport function Avatar({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn('relative flex h-6 w-6 shrink-0 overflow-hidden rounded-full bg-doom-deep', className)}\n {...props}\n />\n );\n}\n\nexport function AvatarImage({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('h-full w-full object-cover', className)}\n {...props}\n />\n );\n}\n\nexport function AvatarFallback({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn('flex h-full w-full items-center justify-center text-[10px] font-bold text-doom-dim', className)}\n {...props}\n />\n );\n}\n"],"mappings":"0FAKA,SAAgB,EAAO,CAAE,YAAW,GAAG,GAAsD,CAC3F,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,KAAjB,CACE,YAAU,SACV,UAAWC,EAAAA,GAAG,2EAA4E,CAAS,EACnG,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAY,CAAE,YAAW,GAAG,GAAuD,CACjG,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAgB,MAAjB,CACE,YAAU,eACV,UAAWC,EAAAA,GAAG,6BAA8B,CAAS,EACrD,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAe,CAAE,YAAW,GAAG,GAA0D,CACvG,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAgB,SAAjB,CACE,YAAU,kBACV,UAAWC,EAAAA,GAAG,qFAAsF,CAAS,EAC7G,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Avatar } from "radix-ui";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
//#region src/components/Avatar.d.ts
|
|
4
|
+
/** A face or an initial; Radix only shows the fallback once the image has actually failed. */
|
|
5
|
+
declare function Avatar$1({ className, ...props }: ComponentProps<typeof Avatar.Root>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AvatarImage({ className, ...props }: ComponentProps<typeof Avatar.Image>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AvatarFallback({ className, ...props }: ComponentProps<typeof Avatar.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Avatar$1 as Avatar, AvatarFallback, AvatarImage };
|
|
10
|
+
//# sourceMappingURL=Avatar.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.mts","names":[],"sources":["../../../src/components/Avatar.tsx"],"mappings":";;;;iBAKgB,WAAS,cAAc,SAAS,sBAAsB,OAAgB,oCAAK,IAAA;iBAU3E,cAAc,cAAc,SAAS,sBAAsB,OAAgB,qCAAM,IAAA;iBAUjF,iBAAiB,cAAc,SAAS,sBAAsB,OAAgB,wCAAS,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Avatar as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return n(t.Root,{"data-slot":`avatar`,className:e(`relative flex h-6 w-6 shrink-0 overflow-hidden rounded-full bg-doom-deep`,r),...i})}function i({className:r,...i}){return n(t.Image,{"data-slot":`avatar-image`,className:e(`h-full w-full object-cover`,r),...i})}function a({className:r,...i}){return n(t.Fallback,{"data-slot":`avatar-fallback`,className:e(`flex h-full w-full items-center justify-center text-[10px] font-bold text-doom-dim`,r),...i})}export{r as Avatar,a as AvatarFallback,i as AvatarImage};
|
|
2
|
+
//# sourceMappingURL=Avatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.mjs","names":["Avatar","AvatarPrimitive"],"sources":["../../../src/components/Avatar.tsx"],"sourcesContent":["import { Avatar as AvatarPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A face or an initial; Radix only shows the fallback once the image has actually failed. */\nexport function Avatar({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn('relative flex h-6 w-6 shrink-0 overflow-hidden rounded-full bg-doom-deep', className)}\n {...props}\n />\n );\n}\n\nexport function AvatarImage({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('h-full w-full object-cover', className)}\n {...props}\n />\n );\n}\n\nexport function AvatarFallback({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn('flex h-full w-full items-center justify-center text-[10px] font-bold text-doom-dim', className)}\n {...props}\n />\n );\n}\n"],"mappings":"6GAKA,SAAgBA,EAAO,CAAE,YAAW,GAAG,GAAsD,CAC3F,OACE,EAACC,EAAgB,KAAjB,CACE,YAAU,SACV,UAAW,EAAG,2EAA4E,CAAS,EACnG,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAY,CAAE,YAAW,GAAG,GAAuD,CACjG,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,6BAA8B,CAAS,EACrD,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAe,CAAE,YAAW,GAAG,GAA0D,CACvG,OACE,EAACA,EAAgB,SAAjB,CACE,YAAU,kBACV,UAAW,EAAG,qFAAsF,CAAS,EAC7G,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");const r=(0,require("class-variance-authority").cva)(`inline-flex items-center gap-1.5 whitespace-nowrap rounded border font-mono`,{variants:{tone:{neutral:`border-doom-border text-doom-dim`,blue:`border-doom-blue/40 text-doom-blue`,green:`border-doom-green/40 text-doom-green`,yellow:`border-doom-yellow/40 text-doom-yellow`,red:`border-doom-red/40 text-doom-red`,magenta:`border-doom-magenta/40 text-doom-magenta`,violet:`border-doom-violet/40 text-doom-violet`,cyan:`border-doom-cyan/40 text-doom-cyan`,orange:`border-doom-orange/40 text-doom-orange`,teal:`border-doom-teal/40 text-doom-teal`},size:{xs:`px-1.5 py-0.5 text-[8px] font-bold`,sm:`px-2 py-0.5 text-[10px]`,md:`px-2.5 py-1 text-[11px]`,lg:`px-3 py-1.5 text-[12px]`}},defaultVariants:{tone:`neutral`,size:`sm`}});function i({className:i,tone:a,size:o,asChild:s=!1,...c}){let l=s?t.Slot.Root:`span`;return(0,n.jsx)(l,{"data-slot":`badge`,className:e.cn(r({tone:a,size:o}),i),...c})}exports.Badge=i,exports.badgeVariants=r;
|
|
2
|
+
//# sourceMappingURL=Badge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.cjs","names":["cva","Slot","cn"],"sources":["../../../src/components/Badge.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { Slot } from 'radix-ui';\nimport { cn } from '../lib/cn.ts';\nimport type { ChipTone } from '../types/tone.ts';\n\nexport const badgeVariants = cva('inline-flex items-center gap-1.5 whitespace-nowrap rounded border font-mono', {\n variants: {\n tone: {\n neutral: 'border-doom-border text-doom-dim',\n blue: 'border-doom-blue/40 text-doom-blue',\n green: 'border-doom-green/40 text-doom-green',\n yellow: 'border-doom-yellow/40 text-doom-yellow',\n red: 'border-doom-red/40 text-doom-red',\n magenta: 'border-doom-magenta/40 text-doom-magenta',\n violet: 'border-doom-violet/40 text-doom-violet',\n cyan: 'border-doom-cyan/40 text-doom-cyan',\n orange: 'border-doom-orange/40 text-doom-orange',\n teal: 'border-doom-teal/40 text-doom-teal',\n } satisfies Record<ChipTone, string>,\n /** The same rungs Button names, so a chip can sit beside a button of any size. */\n size: {\n xs: 'px-1.5 py-0.5 text-[8px] font-bold',\n sm: 'px-2 py-0.5 text-[10px]',\n md: 'px-2.5 py-1 text-[11px]',\n lg: 'px-3 py-1.5 text-[12px]',\n },\n },\n defaultVariants: { tone: 'neutral', size: 'sm' },\n});\n\nexport type BadgeTone = ChipTone;\n\nexport interface BadgeProps extends ComponentProps<'span'>, VariantProps<typeof badgeVariants> {\n /** Render the child element instead of a <span>, so a link can look like a chip. */\n asChild?: boolean;\n}\n\n/** An outlined chip in one of the accent tones; the Chip the cockpit mockup draws. */\nexport function Badge({ className, tone, size, asChild = false, ...props }: BadgeProps) {\n const Component = asChild ? Slot.Root : 'span';\n return <Component data-slot=\"badge\" className={cn(badgeVariants({ tone, size }), className)} {...props} />;\n}\n"],"mappings":"0FAMA,MAAa,GAAA,oCAAgBA,CAAAA,CAAAA,IAAAA,CAAI,8EAA+E,CAC9G,SAAU,CACR,KAAM,CACJ,QAAS,mCACT,KAAM,qCACN,MAAO,uCACP,OAAQ,yCACR,IAAK,mCACL,QAAS,2CACT,OAAQ,yCACR,KAAM,qCACN,OAAQ,yCACR,KAAM,oCACR,EAEA,KAAM,CACJ,GAAI,qCACJ,GAAI,0BACJ,GAAI,0BACJ,GAAI,yBACN,CACF,EACA,gBAAiB,CAAE,KAAM,UAAW,KAAM,IAAK,CACjD,CAAC,EAUD,SAAgB,EAAM,CAAE,YAAW,OAAM,OAAM,UAAU,GAAO,GAAG,GAAqB,CACtF,IAAM,EAAY,EAAUC,EAAAA,KAAK,KAAO,OACxC,OAAO,EAAA,EAAA,IAAA,CAAC,EAAD,CAAW,YAAU,QAAQ,UAAWC,EAAAA,GAAG,EAAc,CAAE,OAAM,MAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC3G"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChipTone } from "../types/tone.mjs";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
//#region src/components/Badge.d.ts
|
|
5
|
+
declare const badgeVariants: (props?: ({
|
|
6
|
+
tone?: "blue" | "cyan" | "green" | "magenta" | "neutral" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
|
|
7
|
+
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
type BadgeTone = ChipTone;
|
|
10
|
+
interface BadgeProps extends ComponentProps<'span'>, VariantProps<typeof badgeVariants> {
|
|
11
|
+
/** Render the child element instead of a <span>, so a link can look like a chip. */
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** An outlined chip in one of the accent tones; the Chip the cockpit mockup draws. */
|
|
15
|
+
declare function Badge({ className, tone, size, asChild, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Badge, BadgeProps, BadgeTone, badgeVariants };
|
|
18
|
+
//# sourceMappingURL=Badge.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.mts","names":[],"sources":["../../../src/components/Badge.tsx"],"mappings":";;;;cAMa,gBAAa;;;6CAuBxB;KAEU,YAAY;UAEP,mBAAmB,wBAAwB,oBAAoB;;EAE9E;;;iBAIc,QAAQ,WAAW,MAAM,MAAM,YAAoB,SAAS,yCAAU,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Slot as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`inline-flex items-center gap-1.5 whitespace-nowrap rounded border font-mono`,{variants:{tone:{neutral:`border-doom-border text-doom-dim`,blue:`border-doom-blue/40 text-doom-blue`,green:`border-doom-green/40 text-doom-green`,yellow:`border-doom-yellow/40 text-doom-yellow`,red:`border-doom-red/40 text-doom-red`,magenta:`border-doom-magenta/40 text-doom-magenta`,violet:`border-doom-violet/40 text-doom-violet`,cyan:`border-doom-cyan/40 text-doom-cyan`,orange:`border-doom-orange/40 text-doom-orange`,teal:`border-doom-teal/40 text-doom-teal`},size:{xs:`px-1.5 py-0.5 text-[8px] font-bold`,sm:`px-2 py-0.5 text-[10px]`,md:`px-2.5 py-1 text-[11px]`,lg:`px-3 py-1.5 text-[12px]`}},defaultVariants:{tone:`neutral`,size:`sm`}});function a({className:r,tone:a,size:o,asChild:s=!1,...c}){let l=s?t.Root:`span`;return n(l,{"data-slot":`badge`,className:e(i({tone:a,size:o}),r),...c})}export{a as Badge,i as badgeVariants};
|
|
2
|
+
//# sourceMappingURL=Badge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.mjs","names":[],"sources":["../../../src/components/Badge.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { Slot } from 'radix-ui';\nimport { cn } from '../lib/cn.ts';\nimport type { ChipTone } from '../types/tone.ts';\n\nexport const badgeVariants = cva('inline-flex items-center gap-1.5 whitespace-nowrap rounded border font-mono', {\n variants: {\n tone: {\n neutral: 'border-doom-border text-doom-dim',\n blue: 'border-doom-blue/40 text-doom-blue',\n green: 'border-doom-green/40 text-doom-green',\n yellow: 'border-doom-yellow/40 text-doom-yellow',\n red: 'border-doom-red/40 text-doom-red',\n magenta: 'border-doom-magenta/40 text-doom-magenta',\n violet: 'border-doom-violet/40 text-doom-violet',\n cyan: 'border-doom-cyan/40 text-doom-cyan',\n orange: 'border-doom-orange/40 text-doom-orange',\n teal: 'border-doom-teal/40 text-doom-teal',\n } satisfies Record<ChipTone, string>,\n /** The same rungs Button names, so a chip can sit beside a button of any size. */\n size: {\n xs: 'px-1.5 py-0.5 text-[8px] font-bold',\n sm: 'px-2 py-0.5 text-[10px]',\n md: 'px-2.5 py-1 text-[11px]',\n lg: 'px-3 py-1.5 text-[12px]',\n },\n },\n defaultVariants: { tone: 'neutral', size: 'sm' },\n});\n\nexport type BadgeTone = ChipTone;\n\nexport interface BadgeProps extends ComponentProps<'span'>, VariantProps<typeof badgeVariants> {\n /** Render the child element instead of a <span>, so a link can look like a chip. */\n asChild?: boolean;\n}\n\n/** An outlined chip in one of the accent tones; the Chip the cockpit mockup draws. */\nexport function Badge({ className, tone, size, asChild = false, ...props }: BadgeProps) {\n const Component = asChild ? Slot.Root : 'span';\n return <Component data-slot=\"badge\" className={cn(badgeVariants({ tone, size }), className)} {...props} />;\n}\n"],"mappings":"0JAMA,MAAa,EAAgB,EAAI,8EAA+E,CAC9G,SAAU,CACR,KAAM,CACJ,QAAS,mCACT,KAAM,qCACN,MAAO,uCACP,OAAQ,yCACR,IAAK,mCACL,QAAS,2CACT,OAAQ,yCACR,KAAM,qCACN,OAAQ,yCACR,KAAM,oCACR,EAEA,KAAM,CACJ,GAAI,qCACJ,GAAI,0BACJ,GAAI,0BACJ,GAAI,yBACN,CACF,EACA,gBAAiB,CAAE,KAAM,UAAW,KAAM,IAAK,CACjD,CAAC,EAUD,SAAgB,EAAM,CAAE,YAAW,OAAM,OAAM,UAAU,GAAO,GAAG,GAAqB,CACtF,IAAM,EAAY,EAAU,EAAK,KAAO,OACxC,OAAO,EAAC,EAAD,CAAW,YAAU,QAAQ,UAAW,EAAG,EAAc,CAAE,OAAM,MAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC3G"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../lib/cn.cjs"),t=require("./Spinner.cjs");let n=require("radix-ui"),r=require("react/jsx-runtime");const i=(0,require("class-variance-authority").cva)(`inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-mono transition-[color,background-color,border-color,filter] outline-none focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{primary:`bg-doom-blue font-bold text-doom-rail hover:brightness-110`,outline:`border border-doom-border text-doom-dim hover:border-doom-blue/50 hover:text-doom-hi`,ghost:`text-doom-dim hover:bg-doom-panel hover:text-doom-hi`,subtle:`bg-doom-panel text-doom-dim hover:bg-doom-deep hover:text-doom-hi`,danger:`bg-doom-red font-bold text-doom-rail hover:brightness-110`,"danger-outline":`border border-doom-edge-red bg-doom-tint-red font-bold text-doom-red hover:brightness-110`,success:`bg-doom-green font-bold text-doom-rail hover:brightness-110`,link:`text-doom-blue hover:underline`},size:{xs:`h-5 rounded px-1.5 text-[9px]`,sm:`h-6 px-2.5 text-[10px]`,md:`h-7 px-3 text-[11px]`,lg:`h-8 px-3.5 text-[12px]`,icon:`h-5 w-5 rounded p-0`,"icon-md":`h-7 w-7 p-0`,card:`h-auto w-full flex-col items-stretch justify-start gap-1 px-[11px] py-2.5 text-left whitespace-normal`}},defaultVariants:{variant:`outline`,size:`md`}});function a({className:a,variant:o,size:s,asChild:c=!1,loading:l=!1,loadingLabel:u,disabled:d,type:f,children:p,...m}){let h=c?n.Slot.Root:`button`,g=!c&&l;return(0,r.jsx)(h,{"data-slot":`button`,type:c?void 0:f??`button`,"aria-busy":g?!0:void 0,disabled:c?void 0:d??g,className:e.cn(i({variant:o,size:s}),a),...m,children:c?p:(0,r.jsxs)(r.Fragment,{children:[g?(0,r.jsx)(t.Spinner,{label:u}):null,p]})})}exports.Button=a,exports.buttonVariants=i;
|
|
2
|
+
//# sourceMappingURL=Button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.cjs","names":["cva","Slot","cn","Spinner"],"sources":["../../../src/components/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Slot } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport { Spinner } from './Spinner.tsx';\n\nexport const buttonVariants = cva(\n 'inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-mono transition-[color,background-color,border-color,filter] outline-none focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n primary: 'bg-doom-blue font-bold text-doom-rail hover:brightness-110',\n outline: 'border border-doom-border text-doom-dim hover:border-doom-blue/50 hover:text-doom-hi',\n ghost: 'text-doom-dim hover:bg-doom-panel hover:text-doom-hi',\n subtle: 'bg-doom-panel text-doom-dim hover:bg-doom-deep hover:text-doom-hi',\n danger: 'bg-doom-red font-bold text-doom-rail hover:brightness-110',\n 'danger-outline': 'border border-doom-edge-red bg-doom-tint-red font-bold text-doom-red hover:brightness-110',\n success: 'bg-doom-green font-bold text-doom-rail hover:brightness-110',\n link: 'text-doom-blue hover:underline',\n },\n size: {\n xs: 'h-5 rounded px-1.5 text-[9px]',\n sm: 'h-6 px-2.5 text-[10px]',\n md: 'h-7 px-3 text-[11px]',\n lg: 'h-8 px-3.5 text-[12px]',\n icon: 'h-5 w-5 rounded p-0',\n 'icon-md': 'h-7 w-7 p-0',\n /**\n * A whole card that is one click target: a session in the rail, a run\n * in a panel. It keeps the button's focus ring and cursor and gives up\n * the button's single-line box, which is what a card-shaped <button>\n * would otherwise have to restate.\n */\n card: 'h-auto w-full flex-col items-stretch justify-start gap-1 px-[11px] py-2.5 text-left whitespace-normal',\n },\n },\n defaultVariants: { variant: 'outline', size: 'md' },\n },\n);\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>['variant']>;\nexport type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;\n\nexport interface ButtonProps extends ComponentProps<'button'>, VariantProps<typeof buttonVariants> {\n /** Render the child element instead of a <button>, passing the classes down (shadcn's asChild). */\n asChild?: boolean;\n /**\n * Work is in flight: the button shows a spinner and stops accepting clicks.\n * Ignored under asChild, where the child owns its own content.\n */\n loading?: boolean;\n /** What the spinner announces while loading; omit it and the wait is silent. */\n loadingLabel?: string;\n}\n\n/** The one button: every variant is a theme token, so it recolours with the theme. */\nexport function Button({\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n loadingLabel,\n disabled,\n type,\n children,\n ...props\n}: ButtonProps) {\n const Component = asChild ? Slot.Root : 'button';\n const busy = !asChild && loading;\n return (\n <Component\n data-slot=\"button\"\n type={asChild ? undefined : (type ?? 'button')}\n aria-busy={busy ? true : undefined}\n disabled={asChild ? undefined : (disabled ?? busy)}\n className={cn(buttonVariants({ variant, size }), className)}\n {...props}\n >\n {/* Slot takes exactly one child, so asChild hands its element straight through. */}\n {asChild ? (\n children\n ) : (\n <>\n {busy ? <Spinner label={loadingLabel} /> : null}\n {children}\n </>\n )}\n </Component>\n );\n}\n"],"mappings":"qHAMA,MAAa,GAAA,oCAAiBA,CAAAA,CAAAA,IAAAA,CAC5B,yUACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6DACT,QAAS,uFACT,MAAO,uDACP,OAAQ,oEACR,OAAQ,4DACR,iBAAkB,4FAClB,QAAS,8DACT,KAAM,gCACR,EACA,KAAM,CACJ,GAAI,gCACJ,GAAI,yBACJ,GAAI,uBACJ,GAAI,yBACJ,KAAM,sBACN,UAAW,cAOX,KAAM,uGACR,CACF,EACA,gBAAiB,CAAE,QAAS,UAAW,KAAM,IAAK,CACpD,CACF,EAkBA,SAAgB,EAAO,CACrB,YACA,UACA,OACA,UAAU,GACV,UAAU,GACV,eACA,WACA,OACA,WACA,GAAG,GACW,CACd,IAAM,EAAY,EAAUC,EAAAA,KAAK,KAAO,SAClC,EAAO,CAAC,GAAW,EACzB,OACE,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,YAAU,SACV,KAAM,EAAU,IAAA,GAAa,GAAQ,SACrC,YAAW,EAAO,GAAO,IAAA,GACzB,SAAU,EAAU,IAAA,GAAa,GAAY,EAC7C,UAAWC,EAAAA,GAAG,EAAe,CAAE,UAAS,MAAK,CAAC,EAAG,CAAS,EAC1D,GAAI,EAGH,SAAA,EACC,GAEA,EAAA,EAAA,KAAA,CAAA,EAAA,SAAA,CAAA,SAAA,CACG,GAAO,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAS,MAAO,CAAe,CAAA,EAAI,KAC1C,CACD,CAAA,CAAA,CAEK,CAAA,CAEf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
//#region src/components/Button.d.ts
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "danger" | "danger-outline" | "ghost" | "link" | "outline" | "primary" | "subtle" | "success" | null | undefined;
|
|
6
|
+
size?: "card" | "icon" | "icon-md" | "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>['variant']>;
|
|
9
|
+
type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;
|
|
10
|
+
interface ButtonProps extends ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
11
|
+
/** Render the child element instead of a <button>, passing the classes down (shadcn's asChild). */
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Work is in flight: the button shows a spinner and stops accepting clicks.
|
|
15
|
+
* Ignored under asChild, where the child owns its own content.
|
|
16
|
+
*/
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
/** What the spinner announces while loading; omit it and the wait is silent. */
|
|
19
|
+
loadingLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
/** The one button: every variant is a theme token, so it recolours with the theme. */
|
|
22
|
+
declare function Button({ className, variant, size, asChild, loading, loadingLabel, disabled, type, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Button, ButtonProps, ButtonSize, ButtonVariant, buttonVariants };
|
|
25
|
+
//# sourceMappingURL=Button.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.mts","names":[],"sources":["../../../src/components/Button.tsx"],"mappings":";;;cAMa,iBAAc;;;6CAgC1B;KAEW,gBAAgB,YAAY,oBAAoB;KAChD,aAAa,YAAY,oBAAoB;UAExC,oBAAoB,0BAA0B,oBAAoB;;EAEjF;;;;;EAKA;;EAEA;;;iBAIc,SACd,WACA,SACA,MACA,SACA,SACA,cACA,UACA,MACA,aACG,SACF,0CAAW,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Spinner as t}from"./Spinner.mjs";import{Slot as n}from"radix-ui";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";const s=o(`inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-mono transition-[color,background-color,border-color,filter] outline-none focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{primary:`bg-doom-blue font-bold text-doom-rail hover:brightness-110`,outline:`border border-doom-border text-doom-dim hover:border-doom-blue/50 hover:text-doom-hi`,ghost:`text-doom-dim hover:bg-doom-panel hover:text-doom-hi`,subtle:`bg-doom-panel text-doom-dim hover:bg-doom-deep hover:text-doom-hi`,danger:`bg-doom-red font-bold text-doom-rail hover:brightness-110`,"danger-outline":`border border-doom-edge-red bg-doom-tint-red font-bold text-doom-red hover:brightness-110`,success:`bg-doom-green font-bold text-doom-rail hover:brightness-110`,link:`text-doom-blue hover:underline`},size:{xs:`h-5 rounded px-1.5 text-[9px]`,sm:`h-6 px-2.5 text-[10px]`,md:`h-7 px-3 text-[11px]`,lg:`h-8 px-3.5 text-[12px]`,icon:`h-5 w-5 rounded p-0`,"icon-md":`h-7 w-7 p-0`,card:`h-auto w-full flex-col items-stretch justify-start gap-1 px-[11px] py-2.5 text-left whitespace-normal`}},defaultVariants:{variant:`outline`,size:`md`}});function c({className:o,variant:c,size:l,asChild:u=!1,loading:d=!1,loadingLabel:f,disabled:p,type:m,children:h,...g}){let _=u?n.Root:`button`,v=!u&&d;return i(_,{"data-slot":`button`,type:u?void 0:m??`button`,"aria-busy":v?!0:void 0,disabled:u?void 0:p??v,className:e(s({variant:c,size:l}),o),...g,children:u?h:a(r,{children:[v?i(t,{label:f}):null,h]})})}export{c as Button,s as buttonVariants};
|
|
2
|
+
//# sourceMappingURL=Button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.mjs","names":[],"sources":["../../../src/components/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Slot } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport { Spinner } from './Spinner.tsx';\n\nexport const buttonVariants = cva(\n 'inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-mono transition-[color,background-color,border-color,filter] outline-none focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n primary: 'bg-doom-blue font-bold text-doom-rail hover:brightness-110',\n outline: 'border border-doom-border text-doom-dim hover:border-doom-blue/50 hover:text-doom-hi',\n ghost: 'text-doom-dim hover:bg-doom-panel hover:text-doom-hi',\n subtle: 'bg-doom-panel text-doom-dim hover:bg-doom-deep hover:text-doom-hi',\n danger: 'bg-doom-red font-bold text-doom-rail hover:brightness-110',\n 'danger-outline': 'border border-doom-edge-red bg-doom-tint-red font-bold text-doom-red hover:brightness-110',\n success: 'bg-doom-green font-bold text-doom-rail hover:brightness-110',\n link: 'text-doom-blue hover:underline',\n },\n size: {\n xs: 'h-5 rounded px-1.5 text-[9px]',\n sm: 'h-6 px-2.5 text-[10px]',\n md: 'h-7 px-3 text-[11px]',\n lg: 'h-8 px-3.5 text-[12px]',\n icon: 'h-5 w-5 rounded p-0',\n 'icon-md': 'h-7 w-7 p-0',\n /**\n * A whole card that is one click target: a session in the rail, a run\n * in a panel. It keeps the button's focus ring and cursor and gives up\n * the button's single-line box, which is what a card-shaped <button>\n * would otherwise have to restate.\n */\n card: 'h-auto w-full flex-col items-stretch justify-start gap-1 px-[11px] py-2.5 text-left whitespace-normal',\n },\n },\n defaultVariants: { variant: 'outline', size: 'md' },\n },\n);\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>['variant']>;\nexport type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;\n\nexport interface ButtonProps extends ComponentProps<'button'>, VariantProps<typeof buttonVariants> {\n /** Render the child element instead of a <button>, passing the classes down (shadcn's asChild). */\n asChild?: boolean;\n /**\n * Work is in flight: the button shows a spinner and stops accepting clicks.\n * Ignored under asChild, where the child owns its own content.\n */\n loading?: boolean;\n /** What the spinner announces while loading; omit it and the wait is silent. */\n loadingLabel?: string;\n}\n\n/** The one button: every variant is a theme token, so it recolours with the theme. */\nexport function Button({\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n loadingLabel,\n disabled,\n type,\n children,\n ...props\n}: ButtonProps) {\n const Component = asChild ? Slot.Root : 'button';\n const busy = !asChild && loading;\n return (\n <Component\n data-slot=\"button\"\n type={asChild ? undefined : (type ?? 'button')}\n aria-busy={busy ? true : undefined}\n disabled={asChild ? undefined : (disabled ?? busy)}\n className={cn(buttonVariants({ variant, size }), className)}\n {...props}\n >\n {/* Slot takes exactly one child, so asChild hands its element straight through. */}\n {asChild ? (\n children\n ) : (\n <>\n {busy ? <Spinner label={loadingLabel} /> : null}\n {children}\n </>\n )}\n </Component>\n );\n}\n"],"mappings":"0NAMA,MAAa,EAAiB,EAC5B,yUACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6DACT,QAAS,uFACT,MAAO,uDACP,OAAQ,oEACR,OAAQ,4DACR,iBAAkB,4FAClB,QAAS,8DACT,KAAM,gCACR,EACA,KAAM,CACJ,GAAI,gCACJ,GAAI,yBACJ,GAAI,uBACJ,GAAI,yBACJ,KAAM,sBACN,UAAW,cAOX,KAAM,uGACR,CACF,EACA,gBAAiB,CAAE,QAAS,UAAW,KAAM,IAAK,CACpD,CACF,EAkBA,SAAgB,EAAO,CACrB,YACA,UACA,OACA,UAAU,GACV,UAAU,GACV,eACA,WACA,OACA,WACA,GAAG,GACW,CACd,IAAM,EAAY,EAAU,EAAK,KAAO,SAClC,EAAO,CAAC,GAAW,EACzB,OACE,EAAC,EAAD,CACE,YAAU,SACV,KAAM,EAAU,IAAA,GAAa,GAAQ,SACrC,YAAW,EAAO,GAAO,IAAA,GACzB,SAAU,EAAU,IAAA,GAAa,GAAY,EAC7C,UAAW,EAAG,EAAe,CAAE,UAAS,MAAK,CAAC,EAAG,CAAS,EAC1D,GAAI,EAGH,SAAA,EACC,EAEA,EAAA,EAAA,CAAA,SAAA,CACG,EAAO,EAAC,EAAD,CAAS,MAAO,CAAe,CAAA,EAAI,KAC1C,CACD,CAAA,CAAA,CAEK,CAAA,CAEf"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../icons/icons.cjs");const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime"),r=require("lucide-react");function i({className:i,...a}){return(0,n.jsx)(t.Checkbox.Root,{"data-slot":`checkbox`,className:e.cn(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-[3px] border border-doom-border bg-doom-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-doom-blue data-[state=indeterminate]:border-doom-blue`,i),...a,children:(0,n.jsx)(t.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`text-doom-blue`,children:(0,n.jsx)(r.Check,{className:`h-2.5 w-2.5`})})})}exports.Checkbox=i;
|
|
2
|
+
//# sourceMappingURL=Checkbox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.cjs","names":["CheckboxPrimitive","cn","CheckIcon"],"sources":["../../../src/components/Checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { CheckIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\n\n/** A box that is on, off, or indeterminate; the tick is the accent on the deep well. */\nexport function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-[3px] border border-doom-border bg-doom-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-doom-blue data-[state=indeterminate]:border-doom-blue',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator data-slot=\"checkbox-indicator\" className=\"text-doom-blue\">\n <CheckIcon className=\"h-2.5 w-2.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n"],"mappings":"kJAMA,SAAgB,EAAS,CAAE,YAAW,GAAG,GAAwD,CAC/F,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,SAAkB,KAAnB,CACE,YAAU,WACV,UAAWC,EAAAA,GACT,mVACA,CACF,EACA,GAAI,EAEJ,UAAA,EAAA,EAAA,IAAA,CAACD,EAAAA,SAAkB,UAAnB,CAA6B,YAAU,qBAAqB,UAAU,iBACpE,UAAA,EAAA,EAAA,IAAA,CAACE,EAAAA,MAAD,CAAW,UAAU,aAAe,CAAA,CACT,CAAA,CACP,CAAA,CAE5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Checkbox } from "radix-ui";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
//#region src/components/Checkbox.d.ts
|
|
4
|
+
/** A box that is on, off, or indeterminate; the tick is the accent on the deep well. */
|
|
5
|
+
declare function Checkbox$1({ className, ...props }: ComponentProps<typeof Checkbox.Root>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Checkbox$1 as Checkbox };
|
|
8
|
+
//# sourceMappingURL=Checkbox.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.mts","names":[],"sources":["../../../src/components/Checkbox.tsx"],"mappings":";;;;iBAMgB,aAAW,cAAc,SAAS,sBAAsB,SAAkB,oCAAK,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CheckIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Checkbox as n}from"radix-ui";import{jsx as r}from"react/jsx-runtime";function i({className:i,...a}){return r(n.Root,{"data-slot":`checkbox`,className:t(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-[3px] border border-doom-border bg-doom-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-doom-blue data-[state=indeterminate]:border-doom-blue`,i),...a,children:r(n.Indicator,{"data-slot":`checkbox-indicator`,className:`text-doom-blue`,children:r(e,{className:`h-2.5 w-2.5`})})})}export{i as Checkbox};
|
|
2
|
+
//# sourceMappingURL=Checkbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.mjs","names":["Checkbox","CheckboxPrimitive"],"sources":["../../../src/components/Checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { CheckIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\n\n/** A box that is on, off, or indeterminate; the tick is the accent on the deep well. */\nexport function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-[3px] border border-doom-border bg-doom-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-doom-blue data-[state=indeterminate]:border-doom-blue',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator data-slot=\"checkbox-indicator\" className=\"text-doom-blue\">\n <CheckIcon className=\"h-2.5 w-2.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n"],"mappings":"8JAMA,SAAgBA,EAAS,CAAE,YAAW,GAAG,GAAwD,CAC/F,OACE,EAACC,EAAkB,KAAnB,CACE,YAAU,WACV,UAAW,EACT,mVACA,CACF,EACA,GAAI,EAEJ,SAAA,EAACA,EAAkB,UAAnB,CAA6B,YAAU,qBAAqB,UAAU,iBACpE,SAAA,EAAC,EAAD,CAAW,UAAU,aAAe,CAAA,CACT,CAAA,CACP,CAAA,CAE5B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r(e){return(0,n.jsx)(t.Collapsible.Root,{"data-slot":`collapsible`,...e})}function i(e){return(0,n.jsx)(t.Collapsible.CollapsibleTrigger,{"data-slot":`collapsible-trigger`,...e})}function a({className:r,...i}){return(0,n.jsx)(t.Collapsible.CollapsibleContent,{"data-slot":`collapsible-content`,className:e.cn(`overflow-hidden`,r),...i})}exports.Collapsible=r,exports.CollapsibleContent=a,exports.CollapsibleTrigger=i;
|
|
2
|
+
//# sourceMappingURL=Collapsible.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.cjs","names":["CollapsiblePrimitive","cn"],"sources":["../../../src/components/Collapsible.tsx"],"sourcesContent":["import { Collapsible as CollapsiblePrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A section that folds; Radix keeps the trigger's aria-expanded in step with the content. */\nexport function Collapsible(props: ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nexport function CollapsibleTrigger(props: ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nexport function CollapsibleContent({\n className,\n ...props\n}: ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n className={cn('overflow-hidden', className)}\n {...props}\n />\n );\n}\n"],"mappings":"0FAKA,SAAgB,EAAY,EAAyD,CACnF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,KAAtB,CAA2B,YAAU,cAAc,GAAI,CAAQ,CAAA,CACxE,CAEA,SAAgB,EAAmB,EAAuE,CACxG,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,mBAAtB,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F,CAEA,SAAgB,EAAmB,CACjC,YACA,GAAG,GAC8D,CACjE,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,mBAAtB,CACE,YAAU,sBACV,UAAWC,EAAAA,GAAG,kBAAmB,CAAS,EAC1C,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Collapsible } from "radix-ui";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
//#region src/components/Collapsible.d.ts
|
|
4
|
+
/** A section that folds; Radix keeps the trigger's aria-expanded in step with the content. */
|
|
5
|
+
declare function Collapsible$1(props: ComponentProps<typeof Collapsible.Root>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function CollapsibleTrigger(props: ComponentProps<typeof Collapsible.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CollapsibleContent({ className, ...props }: ComponentProps<typeof Collapsible.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Collapsible$1 as Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
10
|
+
//# sourceMappingURL=Collapsible.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.d.mts","names":[],"sources":["../../../src/components/Collapsible.tsx"],"mappings":";;;;iBAKgB,cAAY,OAAO,sBAAsB,YAAqB,oCAAK,IAAA;iBAInE,mBAAmB,OAAO,sBAAsB,YAAqB,kDAAmB,IAAA;iBAIxF,qBACd,cACG,SACF,sBAAsB,YAAqB,kDAAmB,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Collapsible as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r(e){return n(t.Root,{"data-slot":`collapsible`,...e})}function i(e){return n(t.CollapsibleTrigger,{"data-slot":`collapsible-trigger`,...e})}function a({className:r,...i}){return n(t.CollapsibleContent,{"data-slot":`collapsible-content`,className:e(`overflow-hidden`,r),...i})}export{r as Collapsible,a as CollapsibleContent,i as CollapsibleTrigger};
|
|
2
|
+
//# sourceMappingURL=Collapsible.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.mjs","names":["Collapsible","CollapsiblePrimitive"],"sources":["../../../src/components/Collapsible.tsx"],"sourcesContent":["import { Collapsible as CollapsiblePrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A section that folds; Radix keeps the trigger's aria-expanded in step with the content. */\nexport function Collapsible(props: ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nexport function CollapsibleTrigger(props: ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nexport function CollapsibleContent({\n className,\n ...props\n}: ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n className={cn('overflow-hidden', className)}\n {...props}\n />\n );\n}\n"],"mappings":"kHAKA,SAAgBA,EAAY,EAAyD,CACnF,OAAO,EAACC,EAAqB,KAAtB,CAA2B,YAAU,cAAc,GAAI,CAAQ,CAAA,CACxE,CAEA,SAAgB,EAAmB,EAAuE,CACxG,OAAO,EAACA,EAAqB,mBAAtB,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F,CAEA,SAAgB,EAAmB,CACjC,YACA,GAAG,GAC8D,CACjE,OACE,EAACA,EAAqB,mBAAtB,CACE,YAAU,sBACV,UAAW,EAAG,kBAAmB,CAAS,EAC1C,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../lib/cn.cjs"),t=require("./Dialog.cjs"),n=require("./Input.cjs"),r=require("./OptionList.cjs");let i=require("react/jsx-runtime");function a({open:n,onOpenChange:r,title:a,titleVisible:o=!1,className:s,children:c,width:l=`lg`,...u}){return(0,i.jsx)(t.Dialog,{open:n,onOpenChange:r,children:(0,i.jsxs)(t.DialogContent,{"data-slot":`command-dialog`,width:l,className:e.cn(`max-h-[70vh]`,s),...u,children:[(0,i.jsx)(t.DialogTitle,{className:o?void 0:`sr-only`,children:a}),c]})})}function o({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`command-header`,className:e.cn(`flex shrink-0 items-center gap-2 border-b border-doom-border px-3 py-2.5`,t),...n})}function s({className:t,...r}){return(0,i.jsx)(n.Input,{"data-slot":`command-input`,variant:`bare`,autoFocus:!0,autoComplete:`off`,className:e.cn(`flex-1`,t),...r})}function c({className:t,...n}){return(0,i.jsx)(`div`,{role:`listbox`,"data-slot":`command-list`,className:e.cn(`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-1.5`,t),...n})}function l({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`command-group`,className:e.cn(`flex flex-col gap-0.5`,t),...n})}function u({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`command-group-label`,className:e.cn(`px-2 pt-2 pb-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase`,t),...n})}function d({density:e=`compact`,...t}){return(0,i.jsx)(r.OptionRow,{"data-slot":`command-item`,density:e,...t})}function f(e){return(0,i.jsx)(r.OptionLabel,{"data-slot":`command-item-label`,density:`compact`,...e})}function p({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`command-empty`,className:e.cn(`px-2 py-6 text-center text-[11px] text-doom-faint`,t),...n})}function m({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`command-footer`,className:e.cn(`flex min-h-[30px] shrink-0 items-center justify-between gap-3 border-t border-doom-border-soft bg-doom-deep px-3 text-[9px] text-doom-faint`,t),...n})}exports.CommandDialog=a,exports.CommandEmpty=p,exports.CommandFooter=m,exports.CommandGroup=l,exports.CommandGroupLabel=u,exports.CommandHeader=o,exports.CommandInput=s,exports.CommandItem=d,exports.CommandItemLabel=f,exports.CommandList=c;
|
|
2
|
+
//# sourceMappingURL=Command.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.cjs","names":["Dialog","DialogContent","cn","DialogTitle","Input","OptionRow","OptionLabel"],"sources":["../../../src/components/Command.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport { Dialog, DialogContent, type DialogContentProps, DialogTitle } from './Dialog.tsx';\nimport { Input, type InputProps } from './Input.tsx';\nimport { OptionLabel, OptionRow, type OptionRowProps } from './OptionList.tsx';\n\n/**\n * The command palette's frame, its search strip, its rows, and its hint.\n *\n * It has no Radix counterpart and it deliberately does no filtering: the\n * surface that opens a palette already knows how to rank its own commands,\n * and a matcher baked in here would be a second, worse one. Built on Dialog,\n * Input, and the option row so a palette and a select popover cannot drift\n * apart, rather than on a new dependency.\n */\n\nexport interface CommandDialogProps extends Omit<DialogContentProps, 'title'> {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Names the dialog for assistive tech; visually hidden unless the palette draws its own heading. */\n title: ReactNode;\n titleVisible?: boolean;\n}\n\nexport function CommandDialog({\n open,\n onOpenChange,\n title,\n titleVisible = false,\n className,\n children,\n width = 'lg',\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent data-slot=\"command-dialog\" width={width} className={cn('max-h-[70vh]', className)} {...props}>\n <DialogTitle className={titleVisible ? undefined : 'sr-only'}>{title}</DialogTitle>\n {children}\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The strip the search field sits in. */\nexport function CommandHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-header\"\n className={cn('flex shrink-0 items-center gap-2 border-b border-doom-border px-3 py-2.5', className)}\n {...props}\n />\n );\n}\n\n/** The search field: bare, because the header already draws the surface. */\nexport function CommandInput({ className, ...props }: InputProps) {\n return (\n <Input\n data-slot=\"command-input\"\n variant=\"bare\"\n autoFocus\n autoComplete=\"off\"\n className={cn('flex-1', className)}\n {...props}\n />\n );\n}\n\n/** The scrolling body. It is the listbox, so its rows are the options. */\nexport function CommandList({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n role=\"listbox\"\n data-slot=\"command-list\"\n className={cn('flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-1.5', className)}\n {...props}\n />\n );\n}\n\n/** A labelled run of rows. */\nexport function CommandGroup({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"command-group\" className={cn('flex flex-col gap-0.5', className)} {...props} />;\n}\n\nexport function CommandGroupLabel({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-group-label\"\n className={cn('px-2 pt-2 pb-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase', className)}\n {...props}\n />\n );\n}\n\n/** One command. Compact by default, since a palette shows many at once. */\nexport function CommandItem({ density = 'compact', ...props }: OptionRowProps) {\n return <OptionRow data-slot=\"command-item\" density={density} {...props} />;\n}\n\n/** A command's name, taking the width the row has left. */\nexport function CommandItemLabel(props: ComponentProps<'span'>) {\n return <OptionLabel data-slot=\"command-item-label\" density=\"compact\" {...props} />;\n}\n\n/** What the palette says when nothing matches. */\nexport function CommandEmpty({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-empty\"\n className={cn('px-2 py-6 text-center text-[11px] text-doom-faint', className)}\n {...props}\n />\n );\n}\n\n/** The hint strip along the bottom: what the keys do. */\nexport function CommandFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-footer\"\n className={cn(\n 'flex min-h-[30px] shrink-0 items-center justify-between gap-3 border-t border-doom-border-soft bg-doom-deep px-3 text-[9px] text-doom-faint',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"qJAwBA,SAAgB,EAAc,CAC5B,OACA,eACA,QACA,eAAe,GACf,YACA,WACA,QAAQ,KACR,GAAG,GACkB,CACrB,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAD,CAAc,OAAoB,eAChC,UAAA,EAAA,EAAA,KAAA,CAACC,EAAAA,cAAD,CAAe,YAAU,iBAAwB,QAAO,UAAWC,EAAAA,GAAG,eAAgB,CAAS,EAAG,GAAI,EAAtG,SAAA,EACE,EAAA,EAAA,IAAA,CAACC,EAAAA,YAAD,CAAa,UAAW,EAAe,IAAA,GAAY,UAAY,SAAA,CAAmB,CAAA,EACjF,CACY,GACT,CAAA,CAEZ,CAGA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAgC,CAC5E,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACE,YAAU,iBACV,UAAWD,EAAAA,GAAG,2EAA4E,CAAS,EACnG,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAa,CAAE,YAAW,GAAG,GAAqB,CAChE,OACE,EAAA,EAAA,IAAA,CAACE,EAAAA,MAAD,CACE,YAAU,gBACV,QAAQ,OACR,UAAA,GACA,aAAa,MACb,UAAWF,EAAAA,GAAG,SAAU,CAAS,EACjC,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAY,CAAE,YAAW,GAAG,GAAgC,CAC1E,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACE,KAAK,UACL,YAAU,eACV,UAAWA,EAAAA,GAAG,6DAA8D,CAAS,EACrF,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAa,CAAE,YAAW,GAAG,GAAgC,CAC3E,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,gBAAgB,UAAWA,EAAAA,GAAG,wBAAyB,CAAS,EAAG,GAAI,CAAQ,CAAA,CACvG,CAEA,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAAgC,CAChF,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACE,YAAU,sBACV,UAAWA,EAAAA,GAAG,kFAAmF,CAAS,EAC1G,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAY,CAAE,UAAU,UAAW,GAAG,GAAyB,CAC7E,OAAO,EAAA,EAAA,IAAA,CAACG,EAAAA,UAAD,CAAW,YAAU,eAAwB,UAAS,GAAI,CAAQ,CAAA,CAC3E,CAGA,SAAgB,EAAiB,EAA+B,CAC9D,OAAO,EAAA,EAAA,IAAA,CAACC,EAAAA,YAAD,CAAa,YAAU,qBAAqB,QAAQ,UAAU,GAAI,CAAQ,CAAA,CACnF,CAGA,SAAgB,EAAa,CAAE,YAAW,GAAG,GAAgC,CAC3E,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACE,YAAU,gBACV,UAAWJ,EAAAA,GAAG,oDAAqD,CAAS,EAC5E,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAgC,CAC5E,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACE,YAAU,iBACV,UAAWA,EAAAA,GACT,8IACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DialogContentProps } from "./Dialog.mjs";
|
|
2
|
+
import { InputProps } from "./Input.mjs";
|
|
3
|
+
import { OptionRowProps } from "./OptionList.mjs";
|
|
4
|
+
import { ComponentProps, ReactNode } from "react";
|
|
5
|
+
//#region src/components/Command.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* The command palette's frame, its search strip, its rows, and its hint.
|
|
8
|
+
*
|
|
9
|
+
* It has no Radix counterpart and it deliberately does no filtering: the
|
|
10
|
+
* surface that opens a palette already knows how to rank its own commands,
|
|
11
|
+
* and a matcher baked in here would be a second, worse one. Built on Dialog,
|
|
12
|
+
* Input, and the option row so a palette and a select popover cannot drift
|
|
13
|
+
* apart, rather than on a new dependency.
|
|
14
|
+
*/
|
|
15
|
+
interface CommandDialogProps extends Omit<DialogContentProps, 'title'> {
|
|
16
|
+
open: boolean;
|
|
17
|
+
onOpenChange: (open: boolean) => void;
|
|
18
|
+
/** Names the dialog for assistive tech; visually hidden unless the palette draws its own heading. */
|
|
19
|
+
title: ReactNode;
|
|
20
|
+
titleVisible?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare function CommandDialog({ open, onOpenChange, title, titleVisible, className, children, width, ...props }: CommandDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
/** The strip the search field sits in. */
|
|
24
|
+
declare function CommandHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/** The search field: bare, because the header already draws the surface. */
|
|
26
|
+
declare function CommandInput({ className, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/** The scrolling body. It is the listbox, so its rows are the options. */
|
|
28
|
+
declare function CommandList({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/** A labelled run of rows. */
|
|
30
|
+
declare function CommandGroup({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function CommandGroupLabel({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
/** One command. Compact by default, since a palette shows many at once. */
|
|
33
|
+
declare function CommandItem({ density, ...props }: OptionRowProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/** A command's name, taking the width the row has left. */
|
|
35
|
+
declare function CommandItemLabel(props: ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
/** What the palette says when nothing matches. */
|
|
37
|
+
declare function CommandEmpty({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
/** The hint strip along the bottom: what the keys do. */
|
|
39
|
+
declare function CommandFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { CommandDialog, CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandHeader, CommandInput, CommandItem, CommandItemLabel, CommandList };
|
|
42
|
+
//# sourceMappingURL=Command.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.d.mts","names":[],"sources":["../../../src/components/Command.tsx"],"mappings":";;;;;;;;;;;;;;UAgBiB,2BAA2B,KAAK;EAC/C;EACA,eAAe;;EAEf,OAAO;EACP;;iBAGc,gBACd,MACA,cACA,OACA,cACA,WACA,UACA,UACG,SACF,iDAAkB,IAAA;;iBAYL,gBAAgB,cAAc,SAAS,oDAAqB,IAAA;;iBAW5D,eAAe,cAAc,SAAS,yCAAU,IAAA;;iBAchD,cAAc,cAAc,SAAS,oDAAqB,IAAA;;iBAY1D,eAAe,cAAc,SAAS,oDAAqB,IAAA;iBAI3D,oBAAoB,cAAc,SAAS,oDAAqB,IAAA;;iBAWhE,cAAc,YAAwB,SAAS,6CAAc,IAAA;;iBAK7D,iBAAiB,OAAO,qDAAsB,IAAA;;iBAK9C,eAAe,cAAc,SAAS,oDAAqB,IAAA;;iBAW3D,gBAAgB,cAAc,SAAS,oDAAqB,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Dialog as t,DialogContent as n,DialogTitle as r}from"./Dialog.mjs";import{Input as i}from"./Input.mjs";import{OptionLabel as a,OptionRow as o}from"./OptionList.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({open:i,onOpenChange:a,title:o,titleVisible:l=!1,className:u,children:d,width:f=`lg`,...p}){return s(t,{open:i,onOpenChange:a,children:c(n,{"data-slot":`command-dialog`,width:f,className:e(`max-h-[70vh]`,u),...p,children:[s(r,{className:l?void 0:`sr-only`,children:o}),d]})})}function u({className:t,...n}){return s(`div`,{"data-slot":`command-header`,className:e(`flex shrink-0 items-center gap-2 border-b border-doom-border px-3 py-2.5`,t),...n})}function d({className:t,...n}){return s(i,{"data-slot":`command-input`,variant:`bare`,autoFocus:!0,autoComplete:`off`,className:e(`flex-1`,t),...n})}function f({className:t,...n}){return s(`div`,{role:`listbox`,"data-slot":`command-list`,className:e(`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-1.5`,t),...n})}function p({className:t,...n}){return s(`div`,{"data-slot":`command-group`,className:e(`flex flex-col gap-0.5`,t),...n})}function m({className:t,...n}){return s(`div`,{"data-slot":`command-group-label`,className:e(`px-2 pt-2 pb-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase`,t),...n})}function h({density:e=`compact`,...t}){return s(o,{"data-slot":`command-item`,density:e,...t})}function g(e){return s(a,{"data-slot":`command-item-label`,density:`compact`,...e})}function _({className:t,...n}){return s(`div`,{"data-slot":`command-empty`,className:e(`px-2 py-6 text-center text-[11px] text-doom-faint`,t),...n})}function v({className:t,...n}){return s(`div`,{"data-slot":`command-footer`,className:e(`flex min-h-[30px] shrink-0 items-center justify-between gap-3 border-t border-doom-border-soft bg-doom-deep px-3 text-[9px] text-doom-faint`,t),...n})}export{l as CommandDialog,_ as CommandEmpty,v as CommandFooter,p as CommandGroup,m as CommandGroupLabel,u as CommandHeader,d as CommandInput,h as CommandItem,g as CommandItemLabel,f as CommandList};
|
|
2
|
+
//# sourceMappingURL=Command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.mjs","names":[],"sources":["../../../src/components/Command.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport { Dialog, DialogContent, type DialogContentProps, DialogTitle } from './Dialog.tsx';\nimport { Input, type InputProps } from './Input.tsx';\nimport { OptionLabel, OptionRow, type OptionRowProps } from './OptionList.tsx';\n\n/**\n * The command palette's frame, its search strip, its rows, and its hint.\n *\n * It has no Radix counterpart and it deliberately does no filtering: the\n * surface that opens a palette already knows how to rank its own commands,\n * and a matcher baked in here would be a second, worse one. Built on Dialog,\n * Input, and the option row so a palette and a select popover cannot drift\n * apart, rather than on a new dependency.\n */\n\nexport interface CommandDialogProps extends Omit<DialogContentProps, 'title'> {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Names the dialog for assistive tech; visually hidden unless the palette draws its own heading. */\n title: ReactNode;\n titleVisible?: boolean;\n}\n\nexport function CommandDialog({\n open,\n onOpenChange,\n title,\n titleVisible = false,\n className,\n children,\n width = 'lg',\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent data-slot=\"command-dialog\" width={width} className={cn('max-h-[70vh]', className)} {...props}>\n <DialogTitle className={titleVisible ? undefined : 'sr-only'}>{title}</DialogTitle>\n {children}\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The strip the search field sits in. */\nexport function CommandHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-header\"\n className={cn('flex shrink-0 items-center gap-2 border-b border-doom-border px-3 py-2.5', className)}\n {...props}\n />\n );\n}\n\n/** The search field: bare, because the header already draws the surface. */\nexport function CommandInput({ className, ...props }: InputProps) {\n return (\n <Input\n data-slot=\"command-input\"\n variant=\"bare\"\n autoFocus\n autoComplete=\"off\"\n className={cn('flex-1', className)}\n {...props}\n />\n );\n}\n\n/** The scrolling body. It is the listbox, so its rows are the options. */\nexport function CommandList({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n role=\"listbox\"\n data-slot=\"command-list\"\n className={cn('flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-1.5', className)}\n {...props}\n />\n );\n}\n\n/** A labelled run of rows. */\nexport function CommandGroup({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"command-group\" className={cn('flex flex-col gap-0.5', className)} {...props} />;\n}\n\nexport function CommandGroupLabel({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-group-label\"\n className={cn('px-2 pt-2 pb-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase', className)}\n {...props}\n />\n );\n}\n\n/** One command. Compact by default, since a palette shows many at once. */\nexport function CommandItem({ density = 'compact', ...props }: OptionRowProps) {\n return <OptionRow data-slot=\"command-item\" density={density} {...props} />;\n}\n\n/** A command's name, taking the width the row has left. */\nexport function CommandItemLabel(props: ComponentProps<'span'>) {\n return <OptionLabel data-slot=\"command-item-label\" density=\"compact\" {...props} />;\n}\n\n/** What the palette says when nothing matches. */\nexport function CommandEmpty({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-empty\"\n className={cn('px-2 py-6 text-center text-[11px] text-doom-faint', className)}\n {...props}\n />\n );\n}\n\n/** The hint strip along the bottom: what the keys do. */\nexport function CommandFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-footer\"\n className={cn(\n 'flex min-h-[30px] shrink-0 items-center justify-between gap-3 border-t border-doom-border-soft bg-doom-deep px-3 text-[9px] text-doom-faint',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"iQAwBA,SAAgB,EAAc,CAC5B,OACA,eACA,QACA,eAAe,GACf,YACA,WACA,QAAQ,KACR,GAAG,GACkB,CACrB,OACE,EAAC,EAAD,CAAc,OAAoB,eAChC,SAAA,EAAC,EAAD,CAAe,YAAU,iBAAwB,QAAO,UAAW,EAAG,eAAgB,CAAS,EAAG,GAAI,EAAtG,SAAA,CACE,EAAC,EAAD,CAAa,UAAW,EAAe,IAAA,GAAY,UAAY,SAAA,CAAmB,CAAA,EACjF,CACY,GACT,CAAA,CAEZ,CAGA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAgC,CAC5E,OACE,EAAC,MAAD,CACE,YAAU,iBACV,UAAW,EAAG,2EAA4E,CAAS,EACnG,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAa,CAAE,YAAW,GAAG,GAAqB,CAChE,OACE,EAAC,EAAD,CACE,YAAU,gBACV,QAAQ,OACR,UAAA,GACA,aAAa,MACb,UAAW,EAAG,SAAU,CAAS,EACjC,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAY,CAAE,YAAW,GAAG,GAAgC,CAC1E,OACE,EAAC,MAAD,CACE,KAAK,UACL,YAAU,eACV,UAAW,EAAG,6DAA8D,CAAS,EACrF,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAa,CAAE,YAAW,GAAG,GAAgC,CAC3E,OAAO,EAAC,MAAD,CAAK,YAAU,gBAAgB,UAAW,EAAG,wBAAyB,CAAS,EAAG,GAAI,CAAQ,CAAA,CACvG,CAEA,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAAgC,CAChF,OACE,EAAC,MAAD,CACE,YAAU,sBACV,UAAW,EAAG,kFAAmF,CAAS,EAC1G,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAY,CAAE,UAAU,UAAW,GAAG,GAAyB,CAC7E,OAAO,EAAC,EAAD,CAAW,YAAU,eAAwB,UAAS,GAAI,CAAQ,CAAA,CAC3E,CAGA,SAAgB,EAAiB,EAA+B,CAC9D,OAAO,EAAC,EAAD,CAAa,YAAU,qBAAqB,QAAQ,UAAU,GAAI,CAAQ,CAAA,CACnF,CAGA,SAAgB,EAAa,CAAE,YAAW,GAAG,GAAgC,CAC3E,OACE,EAAC,MAAD,CACE,YAAU,gBACV,UAAW,EAAG,oDAAqD,CAAS,EAC5E,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAgC,CAC5E,OACE,EAAC,MAAD,CACE,YAAU,iBACV,UAAW,EACT,8IACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../icons/icons.cjs");const e=require("../lib/cn.cjs"),t=require("./Button.cjs");let n=require("radix-ui"),r=require("react/jsx-runtime"),i=require("class-variance-authority"),a=require("lucide-react");function o(e){return(0,r.jsx)(n.Dialog.Root,{"data-slot":`dialog`,...e})}function s(e){return(0,r.jsx)(n.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function c(e){return(0,r.jsx)(n.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function l(e){return(0,r.jsx)(n.Dialog.Close,{"data-slot":`dialog-close`,...e})}function u({className:t,...i}){return(0,r.jsx)(n.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:e.cn(`fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade`,t),...i})}const d={sm:`w-[360px]`,md:`w-[480px]`,lg:`w-[620px]`};function f({className:t,children:i,width:a=`md`,...o}){return(0,r.jsxs)(c,{children:[(0,r.jsx)(u,{}),(0,r.jsx)(n.Dialog.Content,{"data-slot":`dialog-content`,className:e.cn(`fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop`,d[a],t),...o,children:i})]})}function p({className:i,dismissible:o=!1,closeLabel:s=`close`,children:c,...l}){return(0,r.jsxs)(`div`,{"data-slot":`dialog-header`,className:e.cn(`flex items-center justify-between gap-3 border-b border-doom-border px-4 py-3`,i),...l,children:[c,o?(0,r.jsx)(n.Dialog.Close,{asChild:!0,children:(0,r.jsx)(t.Button,{variant:`ghost`,size:`icon`,"aria-label":s,className:`text-doom-faint hover:text-doom-hi`,children:(0,r.jsx)(a.X,{className:`h-3 w-3`})})}):null]})}function m({className:t,...i}){return(0,r.jsx)(n.Dialog.Title,{"data-slot":`dialog-title`,className:e.cn(`text-[12px] font-bold tracking-wide text-doom-hi`,t),...i})}function h({className:t,...i}){return(0,r.jsx)(n.Dialog.Description,{"data-slot":`dialog-description`,className:e.cn(`text-[11px] leading-relaxed text-doom-dim`,t),...i})}function g({className:t,...n}){return(0,r.jsx)(`div`,{"data-slot":`dialog-body`,className:e.cn(`flex min-h-0 flex-col gap-3 overflow-y-auto px-4 py-4`,t),...n})}const _=(0,i.cva)(`flex shrink-0 items-center gap-2`,{variants:{variant:{plain:`justify-end`,bar:`min-h-[34px] justify-between border-t border-doom-border-soft bg-doom-deep px-4`}},defaultVariants:{variant:`plain`}});function v({className:t,variant:n,...i}){return(0,r.jsx)(`div`,{"data-slot":`dialog-footer`,className:e.cn(_({variant:n}),t),...i})}exports.Dialog=o,exports.DialogBody=g,exports.DialogClose=l,exports.DialogContent=f,exports.DialogDescription=h,exports.DialogFooter=v,exports.DialogHeader=p,exports.DialogOverlay=u,exports.DialogPortal=c,exports.DialogTitle=m,exports.DialogTrigger=s,exports.dialogFooterVariants=_;
|
|
2
|
+
//# sourceMappingURL=Dialog.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.cjs","names":["DialogPrimitive","cn","Button","CloseIcon","cva"],"sources":["../../../src/components/Dialog.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { CloseIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { Button } from './Button.tsx';\n\n/**\n * shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,\n * and focus restored to the trigger on close. The frame is the Doom panel.\n */\nexport function Dialog(props: ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nexport function DialogTrigger(props: ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nexport function DialogPortal(props: ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nexport function DialogClose(props: ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nexport function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn('fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade', className)}\n {...props}\n />\n );\n}\n\nexport interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[480px]', lg: 'w-[620px]' } as const;\n\nexport function DialogContent({ className, children, width = 'md', ...props }: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop',\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nexport interface DialogHeaderProps extends ComponentProps<'div'> {\n /**\n * Show the close control at the right of the strip. Off by default: most\n * headers already put something there (a spinner, a method label) and every\n * dialog closes on Escape, so an X that fights the existing content is worse\n * than none. Turn it on for a dialog whose only way out is the mouse.\n */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function DialogHeader({\n className,\n dismissible = false,\n closeLabel = 'close',\n children,\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex items-center justify-between gap-3 border-b border-doom-border px-4 py-3', className)}\n {...props}\n >\n {children}\n {dismissible ? (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={closeLabel} className=\"text-doom-faint hover:text-doom-hi\">\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </DialogPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-[12px] font-bold tracking-wide text-doom-hi', className)}\n {...props}\n />\n );\n}\n\nexport function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-[11px] leading-relaxed text-doom-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DialogBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn('flex min-h-0 flex-col gap-3 overflow-y-auto px-4 py-4', className)}\n {...props}\n />\n );\n}\n\nexport const dialogFooterVariants = cva('flex shrink-0 items-center gap-2', {\n variants: {\n variant: {\n /** Buttons alone, sitting inside the body's padding. */\n plain: 'justify-end',\n /**\n * The full-width strip: a hint on the left, the buttons on the right,\n * recessed and ruled off from the body. The same shape PopoverFooter\n * draws, because a dialog and a popover promise their keys the same way.\n */\n bar: 'min-h-[34px] justify-between border-t border-doom-border-soft bg-doom-deep px-4',\n },\n },\n defaultVariants: { variant: 'plain' },\n});\n\nexport interface DialogFooterProps extends ComponentProps<'div'>, VariantProps<typeof dialogFooterVariants> {}\n\nexport function DialogFooter({ className, variant, ...props }: DialogFooterProps) {\n return <div data-slot=\"dialog-footer\" className={cn(dialogFooterVariants({ variant }), className)} {...props} />;\n}\n"],"mappings":"kNAWA,SAAgB,EAAO,EAAoD,CACzE,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAEA,SAAgB,EAAc,EAAuD,CACnF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAgB,EAAa,EAAsD,CACjF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,OAAjB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAEA,SAAgB,EAAY,EAAqD,CAC/E,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAEA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAyD,CACrG,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,UAAWC,EAAAA,GAAG,yEAA0E,CAAS,EACjG,GAAI,CACL,CAAA,CAEL,CAOA,MAAM,EAAgB,CAAE,GAAI,YAAa,GAAI,YAAa,GAAI,WAAY,EAE1E,SAAgB,EAAc,CAAE,YAAW,WAAU,QAAQ,KAAM,GAAG,GAA6B,CACjG,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAgB,CAAA,GAChB,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,UAAWC,EAAAA,GACT,mOACA,EAAc,GACd,CACF,EACA,GAAI,EAEH,UACsB,CAAA,CACb,CAAA,CAAA,CAElB,CAcA,SAAgB,EAAa,CAC3B,YACA,cAAc,GACd,aAAa,QACb,WACA,GAAG,GACiB,CACpB,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CACE,YAAU,gBACV,UAAWA,EAAAA,GAAG,gFAAiF,CAAS,EACxG,GAAI,EAHN,SAAA,CAKG,EACA,GACC,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAgB,MAAjB,CAAuB,QAAA,GACrB,UAAA,EAAA,EAAA,IAAA,CAACE,EAAAA,OAAD,CAAQ,QAAQ,QAAQ,KAAK,OAAO,aAAY,EAAY,UAAU,qCACpE,UAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CAAW,UAAU,SAAW,CAAA,CAC1B,CAAA,CACa,CAAA,EACrB,IACD,GAET,CAEA,SAAgB,EAAY,CAAE,YAAW,GAAG,GAAuD,CACjG,OACE,EAAA,EAAA,IAAA,CAACH,EAAAA,OAAgB,MAAjB,CACE,YAAU,eACV,UAAWC,EAAAA,GAAG,mDAAoD,CAAS,EAC3E,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAA6D,CAC7G,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAgB,YAAjB,CACE,YAAU,qBACV,UAAWC,EAAAA,GAAG,4CAA6C,CAAS,EACpE,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAW,CAAE,YAAW,GAAG,GAAgC,CACzE,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACE,YAAU,cACV,UAAWA,EAAAA,GAAG,wDAAyD,CAAS,EAChF,GAAI,CACL,CAAA,CAEL,CAEA,MAAa,GAAA,EAAuBG,EAAAA,IAAAA,CAAI,mCAAoC,CAC1E,SAAU,CACR,QAAS,CAEP,MAAO,cAMP,IAAK,iFACP,CACF,EACA,gBAAiB,CAAE,QAAS,OAAQ,CACtC,CAAC,EAID,SAAgB,EAAa,CAAE,YAAW,UAAS,GAAG,GAA4B,CAChF,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,gBAAgB,UAAWH,EAAAA,GAAG,EAAqB,CAAE,SAAQ,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Dialog } from "radix-ui";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
//#region src/components/Dialog.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,
|
|
7
|
+
* and focus restored to the trigger on close. The frame is the Doom panel.
|
|
8
|
+
*/
|
|
9
|
+
declare function Dialog$1(props: ComponentProps<typeof Dialog.Root>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DialogTrigger(props: ComponentProps<typeof Dialog.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DialogClose(props: ComponentProps<typeof Dialog.Close>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface DialogContentProps extends ComponentProps<typeof Dialog.Content> {
|
|
13
|
+
/** Width preset; `className` may still override. */
|
|
14
|
+
width?: 'sm' | 'md' | 'lg';
|
|
15
|
+
}
|
|
16
|
+
declare function DialogContent({ className, children, width, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
interface DialogHeaderProps extends ComponentProps<'div'> {
|
|
18
|
+
/**
|
|
19
|
+
* Show the close control at the right of the strip. Off by default: most
|
|
20
|
+
* headers already put something there (a spinner, a method label) and every
|
|
21
|
+
* dialog closes on Escape, so an X that fights the existing content is worse
|
|
22
|
+
* than none. Turn it on for a dialog whose only way out is the mouse.
|
|
23
|
+
*/
|
|
24
|
+
dismissible?: boolean;
|
|
25
|
+
/** What the close control announces. */
|
|
26
|
+
closeLabel?: string;
|
|
27
|
+
}
|
|
28
|
+
declare function DialogHeader({ className, dismissible, closeLabel, children, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function DialogTitle({ className, ...props }: ComponentProps<typeof Dialog.Title>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function DialogDescription({ className, ...props }: ComponentProps<typeof Dialog.Description>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function DialogBody({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare const dialogFooterVariants: (props?: ({
|
|
33
|
+
variant?: "bar" | "plain" | null | undefined;
|
|
34
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
35
|
+
interface DialogFooterProps extends ComponentProps<'div'>, VariantProps<typeof dialogFooterVariants> {}
|
|
36
|
+
declare function DialogFooter({ className, variant, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Dialog$1 as Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogTitle, DialogTrigger, dialogFooterVariants };
|
|
39
|
+
//# sourceMappingURL=Dialog.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.mts","names":[],"sources":["../../../src/components/Dialog.tsx"],"mappings":";;;;;;;;iBAWgB,SAAO,OAAO,sBAAsB,OAAgB,oCAAK,IAAA;iBAIzD,cAAc,OAAO,sBAAsB,OAAgB,uCAAQ,IAAA;iBAQnE,YAAY,OAAO,sBAAsB,OAAgB,qCAAM,IAAA;UAc9D,2BAA2B,sBAAsB,OAAgB;;EAEhF;;iBAKc,gBAAgB,WAAW,UAAU,UAAiB,SAAS,iDAAkB,IAAA;UAmBhF,0BAA0B;;;;;;;EAOzC;;EAEA;;iBAGc,eACd,WACA,aACA,YACA,aACG,SACF,gDAAiB,IAAA;iBAmBJ,cAAc,cAAc,SAAS,sBAAsB,OAAgB,qCAAM,IAAA;iBAUjF,oBAAoB,cAAc,SAAS,sBAAsB,OAAgB,2CAAY,IAAA;iBAU7F,aAAa,cAAc,SAAS,oDAAqB,IAAA;cAU5D,uBAAoB;;6CAc/B;UAEe,0BAA0B,uBAAuB,oBAAoB;iBAEtE,eAAe,WAAW,YAAY,SAAS,gDAAiB,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CloseIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Button as n}from"./Button.mjs";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";function s(e){return i(r.Root,{"data-slot":`dialog`,...e})}function c(e){return i(r.Trigger,{"data-slot":`dialog-trigger`,...e})}function l(e){return i(r.Portal,{"data-slot":`dialog-portal`,...e})}function u(e){return i(r.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...n}){return i(r.Overlay,{"data-slot":`dialog-overlay`,className:t(`fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade`,e),...n})}const f={sm:`w-[360px]`,md:`w-[480px]`,lg:`w-[620px]`};function p({className:e,children:n,width:o=`md`,...s}){return a(l,{children:[i(d,{}),i(r.Content,{"data-slot":`dialog-content`,className:t(`fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop`,f[o],e),...s,children:n})]})}function m({className:o,dismissible:s=!1,closeLabel:c=`close`,children:l,...u}){return a(`div`,{"data-slot":`dialog-header`,className:t(`flex items-center justify-between gap-3 border-b border-doom-border px-4 py-3`,o),...u,children:[l,s?i(r.Close,{asChild:!0,children:i(n,{variant:`ghost`,size:`icon`,"aria-label":c,className:`text-doom-faint hover:text-doom-hi`,children:i(e,{className:`h-3 w-3`})})}):null]})}function h({className:e,...n}){return i(r.Title,{"data-slot":`dialog-title`,className:t(`text-[12px] font-bold tracking-wide text-doom-hi`,e),...n})}function g({className:e,...n}){return i(r.Description,{"data-slot":`dialog-description`,className:t(`text-[11px] leading-relaxed text-doom-dim`,e),...n})}function _({className:e,...n}){return i(`div`,{"data-slot":`dialog-body`,className:t(`flex min-h-0 flex-col gap-3 overflow-y-auto px-4 py-4`,e),...n})}const v=o(`flex shrink-0 items-center gap-2`,{variants:{variant:{plain:`justify-end`,bar:`min-h-[34px] justify-between border-t border-doom-border-soft bg-doom-deep px-4`}},defaultVariants:{variant:`plain`}});function y({className:e,variant:n,...r}){return i(`div`,{"data-slot":`dialog-footer`,className:t(v({variant:n}),e),...r})}export{s as Dialog,_ as DialogBody,u as DialogClose,p as DialogContent,g as DialogDescription,y as DialogFooter,m as DialogHeader,d as DialogOverlay,l as DialogPortal,h as DialogTitle,c as DialogTrigger,v as dialogFooterVariants};
|
|
2
|
+
//# sourceMappingURL=Dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.mjs","names":["Dialog","DialogPrimitive"],"sources":["../../../src/components/Dialog.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { CloseIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { Button } from './Button.tsx';\n\n/**\n * shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,\n * and focus restored to the trigger on close. The frame is the Doom panel.\n */\nexport function Dialog(props: ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nexport function DialogTrigger(props: ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nexport function DialogPortal(props: ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nexport function DialogClose(props: ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nexport function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn('fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade', className)}\n {...props}\n />\n );\n}\n\nexport interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[480px]', lg: 'w-[620px]' } as const;\n\nexport function DialogContent({ className, children, width = 'md', ...props }: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop',\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nexport interface DialogHeaderProps extends ComponentProps<'div'> {\n /**\n * Show the close control at the right of the strip. Off by default: most\n * headers already put something there (a spinner, a method label) and every\n * dialog closes on Escape, so an X that fights the existing content is worse\n * than none. Turn it on for a dialog whose only way out is the mouse.\n */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function DialogHeader({\n className,\n dismissible = false,\n closeLabel = 'close',\n children,\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex items-center justify-between gap-3 border-b border-doom-border px-4 py-3', className)}\n {...props}\n >\n {children}\n {dismissible ? (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={closeLabel} className=\"text-doom-faint hover:text-doom-hi\">\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </DialogPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-[12px] font-bold tracking-wide text-doom-hi', className)}\n {...props}\n />\n );\n}\n\nexport function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-[11px] leading-relaxed text-doom-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DialogBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn('flex min-h-0 flex-col gap-3 overflow-y-auto px-4 py-4', className)}\n {...props}\n />\n );\n}\n\nexport const dialogFooterVariants = cva('flex shrink-0 items-center gap-2', {\n variants: {\n variant: {\n /** Buttons alone, sitting inside the body's padding. */\n plain: 'justify-end',\n /**\n * The full-width strip: a hint on the left, the buttons on the right,\n * recessed and ruled off from the body. The same shape PopoverFooter\n * draws, because a dialog and a popover promise their keys the same way.\n */\n bar: 'min-h-[34px] justify-between border-t border-doom-border-soft bg-doom-deep px-4',\n },\n },\n defaultVariants: { variant: 'plain' },\n});\n\nexport interface DialogFooterProps extends ComponentProps<'div'>, VariantProps<typeof dialogFooterVariants> {}\n\nexport function DialogFooter({ className, variant, ...props }: DialogFooterProps) {\n return <div data-slot=\"dialog-footer\" className={cn(dialogFooterVariants({ variant }), className)} {...props} />;\n}\n"],"mappings":"2PAWA,SAAgBA,EAAO,EAAoD,CACzE,OAAO,EAACC,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAEA,SAAgB,EAAc,EAAuD,CACnF,OAAO,EAACA,EAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAgB,EAAa,EAAsD,CACjF,OAAO,EAACA,EAAgB,OAAjB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAEA,SAAgB,EAAY,EAAqD,CAC/E,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAEA,SAAgB,EAAc,CAAE,YAAW,GAAG,GAAyD,CACrG,OACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EAAG,yEAA0E,CAAS,EACjG,GAAI,CACL,CAAA,CAEL,CAOA,MAAM,EAAgB,CAAE,GAAI,YAAa,GAAI,YAAa,GAAI,WAAY,EAE1E,SAAgB,EAAc,CAAE,YAAW,WAAU,QAAQ,KAAM,GAAG,GAA6B,CACjG,OACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAgB,CAAA,EAChB,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EACT,mOACA,EAAc,GACd,CACF,EACA,GAAI,EAEH,UACsB,CAAA,CACb,CAAA,CAAA,CAElB,CAcA,SAAgB,EAAa,CAC3B,YACA,cAAc,GACd,aAAa,QACb,WACA,GAAG,GACiB,CACpB,OACE,EAAC,MAAD,CACE,YAAU,gBACV,UAAW,EAAG,gFAAiF,CAAS,EACxG,GAAI,EAHN,SAAA,CAKG,EACA,EACC,EAACA,EAAgB,MAAjB,CAAuB,QAAA,GACrB,SAAA,EAAC,EAAD,CAAQ,QAAQ,QAAQ,KAAK,OAAO,aAAY,EAAY,UAAU,qCACpE,SAAA,EAAC,EAAD,CAAW,UAAU,SAAW,CAAA,CAC1B,CAAA,CACa,CAAA,EACrB,IACD,GAET,CAEA,SAAgB,EAAY,CAAE,YAAW,GAAG,GAAuD,CACjG,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,mDAAoD,CAAS,EAC3E,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAA6D,CAC7G,OACE,EAACA,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAW,EAAG,4CAA6C,CAAS,EACpE,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAW,CAAE,YAAW,GAAG,GAAgC,CACzE,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAG,wDAAyD,CAAS,EAChF,GAAI,CACL,CAAA,CAEL,CAEA,MAAa,EAAuB,EAAI,mCAAoC,CAC1E,SAAU,CACR,QAAS,CAEP,MAAO,cAMP,IAAK,iFACP,CACF,EACA,gBAAiB,CAAE,QAAS,OAAQ,CACtC,CAAC,EAID,SAAgB,EAAa,CAAE,YAAW,UAAS,GAAG,GAA4B,CAChF,OAAO,EAAC,MAAD,CAAK,YAAU,gBAAgB,UAAW,EAAG,EAAqB,CAAE,SAAQ,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../lib/cn.cjs");let t=require("react/jsx-runtime");const n=(0,require("class-variance-authority").cva)(`inline-block shrink-0 rounded-full`,{variants:{tone:{neutral:`bg-doom-faint`,muted:`bg-doom-faint/40`,blue:`bg-doom-blue`,green:`bg-doom-green`,yellow:`bg-doom-yellow`,red:`bg-doom-red`,magenta:`bg-doom-magenta`,violet:`bg-doom-violet`,cyan:`bg-doom-cyan`,orange:`bg-doom-orange`,teal:`bg-doom-teal`},size:{xs:`h-1 w-1`,sm:`h-1.5 w-1.5`,md:`h-2 w-2`,lg:`h-2.5 w-2.5`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{tone:`neutral`,size:`sm`,pulse:!1}});function r({className:r,tone:i,size:a,pulse:o,...s}){return(0,t.jsx)(`span`,{"data-slot":`dot`,"aria-hidden":!0,className:e.cn(n({tone:i,size:a,pulse:o}),r),...s})}exports.Dot=r,exports.dotVariants=n;
|
|
2
|
+
//# sourceMappingURL=Dot.cjs.map
|