@docyrus/ui-pro-ai-assistant 0.0.2 → 0.0.3
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/package.json +2 -3
- package/src/components/assistant-animations.tsx +0 -29
- package/src/components/assistant-dialogs.tsx +0 -235
- package/src/components/code-view.tsx +0 -278
- package/src/components/create-agent-task.tsx +0 -104
- package/src/components/create-new-work-version.tsx +0 -30
- package/src/components/extract-web.tsx +0 -160
- package/src/components/forward-to-agent.tsx +0 -90
- package/src/components/generate-chart.tsx +0 -101
- package/src/components/generative-action-button.tsx +0 -122
- package/src/components/generative-tool.tsx +0 -685
- package/src/components/generative-ui-object.tsx +0 -210
- package/src/components/input-area.tsx +0 -1209
- package/src/components/json-schema-layout.tsx +0 -326
- package/src/components/list-item-card.tsx +0 -92
- package/src/components/mermaid-diagram.tsx +0 -192
- package/src/components/preview-image.tsx +0 -47
- package/src/components/request-approval.tsx +0 -48
- package/src/components/request-user-input.tsx +0 -270
- package/src/components/search-web.tsx +0 -319
- package/src/components/sheet-command.tsx +0 -88
- package/src/components/shell-canvas.tsx +0 -122
- package/src/components/show-advanced-data-table.tsx +0 -352
- package/src/components/show-generated-content-options.tsx +0 -93
- package/src/components/show-people-cards.tsx +0 -180
- package/src/components/subagent-tool.tsx +0 -180
- package/src/components/text-editor-tool.tsx +0 -328
- package/src/components/work-canvas.tsx +0 -88
- package/src/components/work-card.tsx +0 -42
- package/src/declarations.d.ts +0 -1
- package/src/docy-assistant.tsx +0 -1962
- package/src/hooks/index.ts +0 -7
- package/src/hooks/use-assistant-api.ts +0 -507
- package/src/hooks/use-deployment-data.ts +0 -162
- package/src/hooks/use-project-state.ts +0 -347
- package/src/hooks/use-session-state.ts +0 -207
- package/src/hooks/use-speech-recognition.ts +0 -137
- package/src/hooks/use-ui-state.ts +0 -185
- package/src/hooks/use-works-state.ts +0 -146
- package/src/i18n/context.tsx +0 -253
- package/src/i18n/index.ts +0 -19
- package/src/i18n/locales/de.json +0 -198
- package/src/i18n/locales/el.json +0 -198
- package/src/i18n/locales/en.json +0 -226
- package/src/i18n/locales/es.json +0 -198
- package/src/i18n/locales/fr.json +0 -198
- package/src/i18n/locales/it.json +0 -198
- package/src/i18n/locales/pt.json +0 -198
- package/src/i18n/locales/sl.json +0 -198
- package/src/i18n/locales/tr.json +0 -211
- package/src/i18n/types.ts +0 -23
- package/src/i18n/use-translation.ts +0 -17
- package/src/index.ts +0 -18
- package/src/internal/plate-editor/editor/auth-context.ts +0 -11
- package/src/internal/plate-editor/editor/editor-base-kit.tsx +0 -39
- package/src/internal/plate-editor/editor/editor-kit.tsx +0 -89
- package/src/internal/plate-editor/editor/plate-editor.tsx +0 -75
- package/src/internal/plate-editor/editor/plate-types.ts +0 -126
- package/src/internal/plate-editor/editor/plugins/ai-kit.tsx +0 -172
- package/src/internal/plate-editor/editor/plugins/autoformat-kit.tsx +0 -211
- package/src/internal/plate-editor/editor/plugins/basic-blocks-base-kit.tsx +0 -26
- package/src/internal/plate-editor/editor/plugins/basic-blocks-kit.tsx +0 -51
- package/src/internal/plate-editor/editor/plugins/basic-marks-base-kit.tsx +0 -24
- package/src/internal/plate-editor/editor/plugins/basic-marks-kit.tsx +0 -38
- package/src/internal/plate-editor/editor/plugins/basic-nodes-kit.tsx +0 -6
- package/src/internal/plate-editor/editor/plugins/block-menu-kit.tsx +0 -14
- package/src/internal/plate-editor/editor/plugins/block-placeholder-kit.tsx +0 -17
- package/src/internal/plate-editor/editor/plugins/block-selection-kit.tsx +0 -31
- package/src/internal/plate-editor/editor/plugins/callout-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/callout-kit.tsx +0 -7
- package/src/internal/plate-editor/editor/plugins/code-block-base-kit.tsx +0 -23
- package/src/internal/plate-editor/editor/plugins/code-block-kit.tsx +0 -26
- package/src/internal/plate-editor/editor/plugins/column-base-kit.tsx +0 -8
- package/src/internal/plate-editor/editor/plugins/column-kit.tsx +0 -7
- package/src/internal/plate-editor/editor/plugins/comment-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/comment-kit.tsx +0 -174
- package/src/internal/plate-editor/editor/plugins/copilot-kit.tsx +0 -68
- package/src/internal/plate-editor/editor/plugins/cursor-overlay-kit.tsx +0 -13
- package/src/internal/plate-editor/editor/plugins/date-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/date-kit.tsx +0 -7
- package/src/internal/plate-editor/editor/plugins/discussion-kit.tsx +0 -36
- package/src/internal/plate-editor/editor/plugins/dnd-kit.tsx +0 -27
- package/src/internal/plate-editor/editor/plugins/docx-export-kit.tsx +0 -43
- package/src/internal/plate-editor/editor/plugins/docx-kit.tsx +0 -6
- package/src/internal/plate-editor/editor/plugins/emoji-kit.tsx +0 -15
- package/src/internal/plate-editor/editor/plugins/exit-break-kit.tsx +0 -12
- package/src/internal/plate-editor/editor/plugins/floating-toolbar-kit.tsx +0 -19
- package/src/internal/plate-editor/editor/plugins/font-base-kit.tsx +0 -36
- package/src/internal/plate-editor/editor/plugins/font-kit.tsx +0 -47
- package/src/internal/plate-editor/editor/plugins/indent-base-kit.tsx +0 -19
- package/src/internal/plate-editor/editor/plugins/indent-kit.tsx +0 -22
- package/src/internal/plate-editor/editor/plugins/link-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/link-kit.tsx +0 -35
- package/src/internal/plate-editor/editor/plugins/list-base-kit.tsx +0 -24
- package/src/internal/plate-editor/editor/plugins/list-kit.tsx +0 -27
- package/src/internal/plate-editor/editor/plugins/markdown-kit.tsx +0 -18
- package/src/internal/plate-editor/editor/plugins/math-base-kit.tsx +0 -8
- package/src/internal/plate-editor/editor/plugins/math-kit.tsx +0 -10
- package/src/internal/plate-editor/editor/plugins/media-base-kit.tsx +0 -37
- package/src/internal/plate-editor/editor/plugins/media-kit.tsx +0 -53
- package/src/internal/plate-editor/editor/plugins/mention-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/mention-kit.tsx +0 -36
- package/src/internal/plate-editor/editor/plugins/slash-kit.tsx +0 -17
- package/src/internal/plate-editor/editor/plugins/suggestion-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/suggestion-kit.tsx +0 -95
- package/src/internal/plate-editor/editor/plugins/table-base-kit.tsx +0 -20
- package/src/internal/plate-editor/editor/plugins/table-kit.tsx +0 -22
- package/src/internal/plate-editor/editor/plugins/toc-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/toc-kit.tsx +0 -14
- package/src/internal/plate-editor/editor/plugins/toggle-base-kit.tsx +0 -5
- package/src/internal/plate-editor/editor/plugins/toggle-kit.tsx +0 -9
- package/src/internal/plate-editor/editor/transforms.ts +0 -165
- package/src/internal/plate-editor/editor/use-chat.ts +0 -152
- package/src/internal/plate-editor/hooks/index.ts +0 -3
- package/src/internal/plate-editor/hooks/use-copy-to-clipboard.ts +0 -31
- package/src/internal/plate-editor/hooks/use-is-touch-device.ts +0 -26
- package/src/internal/plate-editor/hooks/use-lock-scroll.ts +0 -21
- package/src/internal/plate-editor/hooks/use-media-query.ts +0 -44
- package/src/internal/plate-editor/hooks/use-mounted.ts +0 -18
- package/src/internal/plate-editor/hooks/use-on-click-outside.ts +0 -114
- package/src/internal/plate-editor/hooks/use-upload-file.ts +0 -81
- package/src/internal/plate-editor/i18n/context.tsx +0 -58
- package/src/internal/plate-editor/i18n/index.ts +0 -3
- package/src/internal/plate-editor/i18n/locales/de.json +0 -57
- package/src/internal/plate-editor/i18n/locales/el.json +0 -57
- package/src/internal/plate-editor/i18n/locales/en.json +0 -57
- package/src/internal/plate-editor/i18n/locales/es.json +0 -57
- package/src/internal/plate-editor/i18n/locales/fr.json +0 -57
- package/src/internal/plate-editor/i18n/locales/it.json +0 -57
- package/src/internal/plate-editor/i18n/locales/pt.json +0 -57
- package/src/internal/plate-editor/i18n/locales/sl.json +0 -57
- package/src/internal/plate-editor/i18n/locales/tr.json +0 -57
- package/src/internal/plate-editor/i18n/types.ts +0 -59
- package/src/internal/plate-editor/i18n/use-translation.ts +0 -22
- package/src/internal/plate-editor/index.ts +0 -39
- package/src/internal/plate-editor/lib/ai-output-converter.ts +0 -153
- package/src/internal/plate-editor/lib/download-file.ts +0 -17
- package/src/internal/plate-editor/plate-ui/ai-chat-editor.tsx +0 -24
- package/src/internal/plate-editor/plate-ui/ai-menu.tsx +0 -828
- package/src/internal/plate-editor/plate-ui/ai-node.tsx +0 -41
- package/src/internal/plate-editor/plate-ui/ai-toolbar-button.tsx +0 -25
- package/src/internal/plate-editor/plate-ui/alert-dialog.tsx +0 -145
- package/src/internal/plate-editor/plate-ui/align-toolbar-button.tsx +0 -88
- package/src/internal/plate-editor/plate-ui/avatar.tsx +0 -3
- package/src/internal/plate-editor/plate-ui/block-context-menu.tsx +0 -104
- package/src/internal/plate-editor/plate-ui/block-discussion.tsx +0 -364
- package/src/internal/plate-editor/plate-ui/block-draggable.tsx +0 -557
- package/src/internal/plate-editor/plate-ui/block-list-static.tsx +0 -77
- package/src/internal/plate-editor/plate-ui/block-list.tsx +0 -85
- package/src/internal/plate-editor/plate-ui/block-menu.tsx +0 -555
- package/src/internal/plate-editor/plate-ui/block-selection.tsx +0 -47
- package/src/internal/plate-editor/plate-ui/block-suggestion.tsx +0 -469
- package/src/internal/plate-editor/plate-ui/blockquote-node-static.tsx +0 -10
- package/src/internal/plate-editor/plate-ui/blockquote-node.tsx +0 -11
- package/src/internal/plate-editor/plate-ui/button.tsx +0 -201
- package/src/internal/plate-editor/plate-ui/calendar.tsx +0 -3
- package/src/internal/plate-editor/plate-ui/callout-node-static.tsx +0 -76
- package/src/internal/plate-editor/plate-ui/callout-node.tsx +0 -54
- package/src/internal/plate-editor/plate-ui/caption.tsx +0 -47
- package/src/internal/plate-editor/plate-ui/checkbox.tsx +0 -3
- package/src/internal/plate-editor/plate-ui/code-block-node-static.tsx +0 -172
- package/src/internal/plate-editor/plate-ui/code-block-node.tsx +0 -226
- package/src/internal/plate-editor/plate-ui/code-node-static.tsx +0 -11
- package/src/internal/plate-editor/plate-ui/code-node.tsx +0 -12
- package/src/internal/plate-editor/plate-ui/column-node-static.tsx +0 -65
- package/src/internal/plate-editor/plate-ui/column-node.tsx +0 -24
- package/src/internal/plate-editor/plate-ui/command.tsx +0 -202
- package/src/internal/plate-editor/plate-ui/comment-node-static.tsx +0 -12
- package/src/internal/plate-editor/plate-ui/comment-node.tsx +0 -45
- package/src/internal/plate-editor/plate-ui/comment-toolbar-button.tsx +0 -24
- package/src/internal/plate-editor/plate-ui/comment.tsx +0 -619
- package/src/internal/plate-editor/plate-ui/cursor-overlay.tsx +0 -85
- package/src/internal/plate-editor/plate-ui/date-node-static.tsx +0 -43
- package/src/internal/plate-editor/plate-ui/date-node.tsx +0 -54
- package/src/internal/plate-editor/plate-ui/dialog.tsx +0 -445
- package/src/internal/plate-editor/plate-ui/dropdown-menu.tsx +0 -264
- package/src/internal/plate-editor/plate-ui/editor-static.tsx +0 -40
- package/src/internal/plate-editor/plate-ui/editor.tsx +0 -146
- package/src/internal/plate-editor/plate-ui/emoji-node.tsx +0 -48
- package/src/internal/plate-editor/plate-ui/emoji-toolbar-button.tsx +0 -626
- package/src/internal/plate-editor/plate-ui/equation-node-static.tsx +0 -155
- package/src/internal/plate-editor/plate-ui/equation-node.tsx +0 -226
- package/src/internal/plate-editor/plate-ui/equation-toolbar-button.tsx +0 -26
- package/src/internal/plate-editor/plate-ui/export-toolbar-button.tsx +0 -206
- package/src/internal/plate-editor/plate-ui/fixed-toolbar-buttons.tsx +0 -157
- package/src/internal/plate-editor/plate-ui/fixed-toolbar.tsx +0 -25
- package/src/internal/plate-editor/plate-ui/floating-discussion.tsx +0 -1129
- package/src/internal/plate-editor/plate-ui/floating-toolbar-buttons.tsx +0 -129
- package/src/internal/plate-editor/plate-ui/floating-toolbar.tsx +0 -97
- package/src/internal/plate-editor/plate-ui/font-color-toolbar-button.tsx +0 -209
- package/src/internal/plate-editor/plate-ui/font-size-toolbar-button.tsx +0 -152
- package/src/internal/plate-editor/plate-ui/ghost-text.tsx +0 -20
- package/src/internal/plate-editor/plate-ui/heading-node-static.tsx +0 -52
- package/src/internal/plate-editor/plate-ui/heading-node.tsx +0 -56
- package/src/internal/plate-editor/plate-ui/highlight-node-static.tsx +0 -9
- package/src/internal/plate-editor/plate-ui/highlight-node.tsx +0 -11
- package/src/internal/plate-editor/plate-ui/history-toolbar-button.tsx +0 -50
- package/src/internal/plate-editor/plate-ui/hover-card.tsx +0 -7
- package/src/internal/plate-editor/plate-ui/hr-node-static.tsx +0 -18
- package/src/internal/plate-editor/plate-ui/hr-node.tsx +0 -28
- package/src/internal/plate-editor/plate-ui/import-toolbar-button.tsx +0 -122
- package/src/internal/plate-editor/plate-ui/indent-toolbar-button.tsx +0 -32
- package/src/internal/plate-editor/plate-ui/inline-combobox.tsx +0 -409
- package/src/internal/plate-editor/plate-ui/input.tsx +0 -37
- package/src/internal/plate-editor/plate-ui/insert-toolbar-button.tsx +0 -258
- package/src/internal/plate-editor/plate-ui/label.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/line-height-toolbar-button.tsx +0 -69
- package/src/internal/plate-editor/plate-ui/link-node-static.tsx +0 -15
- package/src/internal/plate-editor/plate-ui/link-node.tsx +0 -33
- package/src/internal/plate-editor/plate-ui/link-toolbar-button.tsx +0 -28
- package/src/internal/plate-editor/plate-ui/link-toolbar.tsx +0 -147
- package/src/internal/plate-editor/plate-ui/list-toolbar-button.tsx +0 -177
- package/src/internal/plate-editor/plate-ui/mark-toolbar-button.tsx +0 -34
- package/src/internal/plate-editor/plate-ui/media-audio-node-static.tsx +0 -21
- package/src/internal/plate-editor/plate-ui/media-audio-node.tsx +0 -32
- package/src/internal/plate-editor/plate-ui/media-embed-node.tsx +0 -103
- package/src/internal/plate-editor/plate-ui/media-file-node-static.tsx +0 -30
- package/src/internal/plate-editor/plate-ui/media-file-node.tsx +0 -52
- package/src/internal/plate-editor/plate-ui/media-image-node-static.tsx +0 -37
- package/src/internal/plate-editor/plate-ui/media-image-node.tsx +0 -183
- package/src/internal/plate-editor/plate-ui/media-placeholder-node.tsx +0 -441
- package/src/internal/plate-editor/plate-ui/media-preview-dialog.tsx +0 -127
- package/src/internal/plate-editor/plate-ui/media-toolbar-button.tsx +0 -227
- package/src/internal/plate-editor/plate-ui/media-toolbar.tsx +0 -214
- package/src/internal/plate-editor/plate-ui/media-upload-toast.tsx +0 -73
- package/src/internal/plate-editor/plate-ui/media-video-node-static.tsx +0 -35
- package/src/internal/plate-editor/plate-ui/media-video-node.tsx +0 -119
- package/src/internal/plate-editor/plate-ui/mention-node-static.tsx +0 -46
- package/src/internal/plate-editor/plate-ui/mention-node.tsx +0 -79
- package/src/internal/plate-editor/plate-ui/menu.tsx +0 -539
- package/src/internal/plate-editor/plate-ui/mode-toolbar-button.tsx +0 -124
- package/src/internal/plate-editor/plate-ui/more-toolbar-button.tsx +0 -34
- package/src/internal/plate-editor/plate-ui/paragraph-node-static.tsx +0 -15
- package/src/internal/plate-editor/plate-ui/paragraph-node.tsx +0 -16
- package/src/internal/plate-editor/plate-ui/popover.tsx +0 -75
- package/src/internal/plate-editor/plate-ui/progress.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/remote-cursor-overlay.tsx +0 -79
- package/src/internal/plate-editor/plate-ui/resize-handle.tsx +0 -86
- package/src/internal/plate-editor/plate-ui/separator.tsx +0 -41
- package/src/internal/plate-editor/plate-ui/slash-node.tsx +0 -433
- package/src/internal/plate-editor/plate-ui/spinner.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/suggestion-node-static.tsx +0 -35
- package/src/internal/plate-editor/plate-ui/suggestion-node.tsx +0 -166
- package/src/internal/plate-editor/plate-ui/suggestion-toolbar-button.tsx +0 -24
- package/src/internal/plate-editor/plate-ui/table-node-static.tsx +0 -84
- package/src/internal/plate-editor/plate-ui/table-node.tsx +0 -283
- package/src/internal/plate-editor/plate-ui/table-toolbar-button.tsx +0 -252
- package/src/internal/plate-editor/plate-ui/tabs.tsx +0 -3
- package/src/internal/plate-editor/plate-ui/textarea.tsx +0 -57
- package/src/internal/plate-editor/plate-ui/toc-node-static.tsx +0 -142
- package/src/internal/plate-editor/plate-ui/toc-node.tsx +0 -57
- package/src/internal/plate-editor/plate-ui/toc-sidebar.tsx +0 -48
- package/src/internal/plate-editor/plate-ui/toggle-node-static.tsx +0 -18
- package/src/internal/plate-editor/plate-ui/toggle-node.tsx +0 -33
- package/src/internal/plate-editor/plate-ui/toggle-toolbar-button.tsx +0 -24
- package/src/internal/plate-editor/plate-ui/toggle.tsx +0 -3
- package/src/internal/plate-editor/plate-ui/toolbar.tsx +0 -378
- package/src/internal/plate-editor/plate-ui/tooltip.tsx +0 -148
- package/src/internal/plate-editor/plate-ui/turn-into-toolbar-button.tsx +0 -175
- package/src/internal/plate-editor/types/index.ts +0 -22
- package/src/internal/plate-editor/vite.ts +0 -284
- package/src/internal/sheets/components/univer-sheets.tsx +0 -1104
- package/src/internal/sheets/i18n/context.tsx +0 -183
- package/src/internal/sheets/i18n/index.ts +0 -19
- package/src/internal/sheets/i18n/locales/de.json +0 -21
- package/src/internal/sheets/i18n/locales/el.json +0 -21
- package/src/internal/sheets/i18n/locales/en.json +0 -21
- package/src/internal/sheets/i18n/locales/es.json +0 -21
- package/src/internal/sheets/i18n/locales/fr.json +0 -21
- package/src/internal/sheets/i18n/locales/it.json +0 -21
- package/src/internal/sheets/i18n/locales/pt.json +0 -21
- package/src/internal/sheets/i18n/locales/sl.json +0 -21
- package/src/internal/sheets/i18n/locales/tr.json +0 -21
- package/src/internal/sheets/i18n/types.ts +0 -23
- package/src/internal/sheets/i18n/use-translation.ts +0 -17
- package/src/internal/sheets/index.ts +0 -14
- package/src/internal/sheets/types/css.d.ts +0 -11
- package/src/internal/sheets/types/index.ts +0 -260
- package/src/internal/sheets/xlsx.ts +0 -1169
- package/src/lib/api-client.ts +0 -77
- package/src/lib/assistant-api-actions.ts +0 -549
- package/src/lib/assistant-config.tsx +0 -75
- package/src/lib/class-utils.ts +0 -40
- package/src/lib/index.ts +0 -7
- package/src/lib/message-utils.ts +0 -131
- package/src/tools/tools-schema.json +0 -512
- package/src/types/index.ts +0 -235
- package/src/views/assistant-view.tsx +0 -1137
- package/src/views/canvas-app.tsx +0 -839
- package/src/views/canvas-code.tsx +0 -93
- package/src/views/canvas-deep-research.tsx +0 -44
- package/src/views/canvas-image.tsx +0 -25
- package/src/views/canvas-record-view.tsx +0 -285
- package/src/views/canvas-spreadsheet.tsx +0 -125
- package/src/views/canvas-text.tsx +0 -52
- package/src/views/canvas.tsx +0 -274
- package/src/views/chat-panel.tsx +0 -149
- package/src/views/index.ts +0 -20
- package/src/views/memories-panel.tsx +0 -365
- package/src/views/message-list.tsx +0 -370
- package/src/views/project-detail.tsx +0 -257
- package/src/views/projects-panel.tsx +0 -131
- package/src/views/sessions-list.tsx +0 -98
- package/src/views/sidebar-content.tsx +0 -256
- package/src/views/work-detail.tsx +0 -98
- package/src/vite.ts +0 -64
- package/src/worker.ts +0 -203
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { SlateElement, type SlateElementProps } from 'platejs/static';
|
|
3
|
-
|
|
4
|
-
export function DateElementStatic(props: SlateElementProps) {
|
|
5
|
-
const { element } = props;
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<SlateElement className="inline-block" {...props}>
|
|
9
|
-
<span className="w-fit rounded-sm bg-muted px-1 text-muted-foreground">
|
|
10
|
-
{element.date ? (
|
|
11
|
-
(() => {
|
|
12
|
-
const today = new Date();
|
|
13
|
-
const elementDate = new Date(element.date as string);
|
|
14
|
-
const isToday
|
|
15
|
-
= elementDate.getDate() === today.getDate()
|
|
16
|
-
&& elementDate.getMonth() === today.getMonth()
|
|
17
|
-
&& elementDate.getFullYear() === today.getFullYear();
|
|
18
|
-
|
|
19
|
-
const isYesterday
|
|
20
|
-
= new Date(today.setDate(today.getDate() - 1)).toDateString()
|
|
21
|
-
=== elementDate.toDateString();
|
|
22
|
-
const isTomorrow
|
|
23
|
-
= new Date(today.setDate(today.getDate() + 2)).toDateString()
|
|
24
|
-
=== elementDate.toDateString();
|
|
25
|
-
|
|
26
|
-
if (isToday) return 'Today';
|
|
27
|
-
if (isYesterday) return 'Yesterday';
|
|
28
|
-
if (isTomorrow) return 'Tomorrow';
|
|
29
|
-
|
|
30
|
-
return elementDate.toLocaleDateString(undefined, {
|
|
31
|
-
day: 'numeric',
|
|
32
|
-
month: 'long',
|
|
33
|
-
year: 'numeric'
|
|
34
|
-
});
|
|
35
|
-
})()
|
|
36
|
-
) : (
|
|
37
|
-
<span>Pick a date</span>
|
|
38
|
-
)}
|
|
39
|
-
</span>
|
|
40
|
-
{props.children}
|
|
41
|
-
</SlateElement>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
PlateElement,
|
|
7
|
-
type PlateElementProps
|
|
8
|
-
} from 'platejs/react';
|
|
9
|
-
|
|
10
|
-
import { cn } from '@docyrus/ui-pro-shared/lib/utils';
|
|
11
|
-
import { Calendar } from '@docyrus/ui-pro-shared/calendar';
|
|
12
|
-
|
|
13
|
-
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
14
|
-
|
|
15
|
-
export function DateElement(props: PlateElementProps) {
|
|
16
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
17
|
-
|
|
18
|
-
const element = props.element as PlateElementProps['element'] & { date?: string };
|
|
19
|
-
const dateText = element.date ? new Date(`${element.date}T00:00:00`).toLocaleDateString(undefined, {
|
|
20
|
-
year: 'numeric',
|
|
21
|
-
month: 'short',
|
|
22
|
-
day: 'numeric'
|
|
23
|
-
}) : 'Pick a date';
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<PlateElement className="inline-block" {...props}>
|
|
27
|
-
<Popover onOpenChange={setIsOpen} open={isOpen}>
|
|
28
|
-
<PopoverTrigger asChild>
|
|
29
|
-
<span
|
|
30
|
-
className={cn(
|
|
31
|
-
'w-fit cursor-pointer rounded-sm bg-muted px-1 text-muted-foreground'
|
|
32
|
-
)}
|
|
33
|
-
contentEditable={false}>
|
|
34
|
-
{dateText}
|
|
35
|
-
</span>
|
|
36
|
-
</PopoverTrigger>
|
|
37
|
-
<PopoverContent className="w-auto p-0">
|
|
38
|
-
<Calendar
|
|
39
|
-
mode="single"
|
|
40
|
-
onSelect={(date) => {
|
|
41
|
-
if (date) {
|
|
42
|
-
props.editor.tf.setNodes(
|
|
43
|
-
{ date: date.toISOString().split('T')[0] },
|
|
44
|
-
{ at: props.editor.api.findPath(props.element)! }
|
|
45
|
-
);
|
|
46
|
-
setIsOpen(false);
|
|
47
|
-
}
|
|
48
|
-
}} />
|
|
49
|
-
</PopoverContent>
|
|
50
|
-
</Popover>
|
|
51
|
-
{props.children}
|
|
52
|
-
</PlateElement>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { type ComponentProps, type FC } from 'react';
|
|
4
|
-
|
|
5
|
-
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
6
|
-
|
|
7
|
-
type DialogPrimitiveProps = ComponentProps<typeof DialogPrimitive.Root>;
|
|
8
|
-
|
|
9
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
10
|
-
import { createAtomStore } from 'jotai-x';
|
|
11
|
-
import { XIcon } from 'lucide-react';
|
|
12
|
-
|
|
13
|
-
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
14
|
-
|
|
15
|
-
import { cn } from '@docyrus/ui-pro-shared/lib/utils';
|
|
16
|
-
|
|
17
|
-
import { useMediaQuery } from '../hooks/use-media-query';
|
|
18
|
-
import { useMounted } from '../hooks/use-mounted';
|
|
19
|
-
import { buttonVariants } from './button';
|
|
20
|
-
|
|
21
|
-
const useIsDesktop = () => {
|
|
22
|
-
const mounted = useMounted();
|
|
23
|
-
|
|
24
|
-
return useMediaQuery('(min-width: 768px)') || !mounted;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** Dialog */
|
|
28
|
-
|
|
29
|
-
export type DialogProps = DialogPrimitiveProps;
|
|
30
|
-
|
|
31
|
-
export const DialogModal = DialogPrimitive.Root;
|
|
32
|
-
|
|
33
|
-
export const DialogModalTrigger = DialogPrimitive.Trigger;
|
|
34
|
-
|
|
35
|
-
export const DialogPortal = DialogPrimitive.Portal;
|
|
36
|
-
|
|
37
|
-
export function DialogOverlay({
|
|
38
|
-
className,
|
|
39
|
-
...props
|
|
40
|
-
}: ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
41
|
-
return (
|
|
42
|
-
<DialogPrimitive.Overlay
|
|
43
|
-
className={cn(
|
|
44
|
-
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/40 data-[state=closed]:animate-out data-[state=open]:animate-in print:hidden',
|
|
45
|
-
className
|
|
46
|
-
)}
|
|
47
|
-
{...props} />
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const DialogClosePrimitive = DialogPrimitive.Close;
|
|
52
|
-
|
|
53
|
-
export function DialogClose({
|
|
54
|
-
children: _children,
|
|
55
|
-
className,
|
|
56
|
-
...props
|
|
57
|
-
}: ComponentProps<typeof DialogPrimitive.Close>) {
|
|
58
|
-
return (
|
|
59
|
-
<DialogPrimitive.Close
|
|
60
|
-
aria-label="Close"
|
|
61
|
-
className={cn(
|
|
62
|
-
buttonVariants({ size: 'none', variant: 'ghost' }),
|
|
63
|
-
'top-2.5 right-2.5 size-6',
|
|
64
|
-
'focus:focus-ring absolute z-20 rounded-full bg-muted opacity-70 ring-offset-background transition-opacity hover:bg-primary/10 hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-subtle-foreground',
|
|
65
|
-
className
|
|
66
|
-
)}
|
|
67
|
-
{...props}>
|
|
68
|
-
<XIcon className="!size-3.5 text-muted-foreground" />
|
|
69
|
-
</DialogPrimitive.Close>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const dialogContentVariants = cva(
|
|
74
|
-
cn(
|
|
75
|
-
'-translate-x-1/2 -translate-y-1/2 fixed top-1/2 left-1/2 z-[101] flex w-full flex-col border bg-background shadow-black/5 shadow-lg focus-visible:ring-0'
|
|
76
|
-
),
|
|
77
|
-
{
|
|
78
|
-
defaultVariants: {
|
|
79
|
-
minHeight: false,
|
|
80
|
-
size: 'lg',
|
|
81
|
-
variant: 'modal'
|
|
82
|
-
},
|
|
83
|
-
variants: {
|
|
84
|
-
minHeight: {
|
|
85
|
-
false: '',
|
|
86
|
-
true: 'min-h-[640px]'
|
|
87
|
-
},
|
|
88
|
-
size: {
|
|
89
|
-
'2xl': 'md:max-w-2xl',
|
|
90
|
-
'3xl': 'md:max-w-3xl',
|
|
91
|
-
'4xl': 'md:max-w-4xl',
|
|
92
|
-
lg: 'md:max-w-lg',
|
|
93
|
-
md: 'md:max-w-md',
|
|
94
|
-
none: '',
|
|
95
|
-
sm: 'md:max-w-sm',
|
|
96
|
-
xl: 'md:max-w-xl',
|
|
97
|
-
xs: 'md:max-w-xs'
|
|
98
|
-
},
|
|
99
|
-
variant: {
|
|
100
|
-
full: cn(
|
|
101
|
-
'h-full max-w-full',
|
|
102
|
-
'data-[state=closed]:slide-out-to-bottom data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:animate-out data-[state=closed]:duration-500'
|
|
103
|
-
),
|
|
104
|
-
modal: cn(
|
|
105
|
-
'sm:rounded-lg md:w-full',
|
|
106
|
-
'data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in',
|
|
107
|
-
'max-w-[calc(100%-2rem)]'
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
function DialogModalContent({
|
|
115
|
-
as: Component = DialogPrimitive.Content,
|
|
116
|
-
children,
|
|
117
|
-
className,
|
|
118
|
-
disableAutoFocus,
|
|
119
|
-
dismissible = true,
|
|
120
|
-
hideClose,
|
|
121
|
-
minHeight,
|
|
122
|
-
size,
|
|
123
|
-
variant: variantProp = 'modal',
|
|
124
|
-
onPointerDownOutside,
|
|
125
|
-
...props
|
|
126
|
-
}: {
|
|
127
|
-
as?: FC<ComponentProps<typeof DialogPrimitive.Content>>;
|
|
128
|
-
disableAutoFocus?: boolean;
|
|
129
|
-
dismissible?: boolean;
|
|
130
|
-
fixed?: boolean;
|
|
131
|
-
hideClose?: boolean;
|
|
132
|
-
} & VariantProps<typeof dialogContentVariants>
|
|
133
|
-
& ComponentProps<typeof DialogPrimitive.Content>) {
|
|
134
|
-
let variant = useDialogValue('variant') as any;
|
|
135
|
-
|
|
136
|
-
variant = variant === 'modal' ? variantProp! : variant;
|
|
137
|
-
const fixed = useDialogContentValue('fixed');
|
|
138
|
-
|
|
139
|
-
return (
|
|
140
|
-
<DialogPortal>
|
|
141
|
-
<DialogOverlay className={cn('md:py-10')}>
|
|
142
|
-
<Component
|
|
143
|
-
className={cn(
|
|
144
|
-
dialogContentVariants({ minHeight, size, variant }),
|
|
145
|
-
fixed ? 'gap-0 p-0 sm:max-h-[min(640px,80vh)]' : 'gap-4 p-6',
|
|
146
|
-
className
|
|
147
|
-
)}
|
|
148
|
-
onOpenAutoFocus={(e) => {
|
|
149
|
-
if (disableAutoFocus) {
|
|
150
|
-
e.preventDefault();
|
|
151
|
-
}
|
|
152
|
-
}}
|
|
153
|
-
onPointerDownOutside={(e) => {
|
|
154
|
-
if (!dismissible) {
|
|
155
|
-
e.preventDefault();
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
onPointerDownOutside?.(e);
|
|
159
|
-
}}
|
|
160
|
-
{...props}>
|
|
161
|
-
{children}
|
|
162
|
-
|
|
163
|
-
{!hideClose && variant !== 'drawer' && <DialogClose />}
|
|
164
|
-
</Component>
|
|
165
|
-
</DialogOverlay>
|
|
166
|
-
</DialogPortal>
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export function DialogHeader({
|
|
171
|
-
className,
|
|
172
|
-
...props
|
|
173
|
-
}: ComponentProps<'div'>) {
|
|
174
|
-
const variant = useDialogValue('variant');
|
|
175
|
-
const fixed = useDialogContentValue('fixed');
|
|
176
|
-
|
|
177
|
-
return (
|
|
178
|
-
<div
|
|
179
|
-
className={cn(
|
|
180
|
-
'flex flex-col space-y-1.5 text-left',
|
|
181
|
-
fixed && 'space-y-0 border-border border-b p-4',
|
|
182
|
-
variant === 'drawer' && 'px-4 pt-4',
|
|
183
|
-
className
|
|
184
|
-
)}
|
|
185
|
-
{...props} />
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export function DialogFooter({
|
|
190
|
-
className,
|
|
191
|
-
...props
|
|
192
|
-
}: ComponentProps<'div'>) {
|
|
193
|
-
const variant = useDialogValue('variant');
|
|
194
|
-
const fixed = useDialogContentValue('fixed');
|
|
195
|
-
|
|
196
|
-
return (
|
|
197
|
-
<div
|
|
198
|
-
className={cn(
|
|
199
|
-
'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
|
|
200
|
-
'max-md:[&_button]:w-full',
|
|
201
|
-
fixed && 'border-border border-t p-4',
|
|
202
|
-
variant === 'drawer' && 'p-4',
|
|
203
|
-
className
|
|
204
|
-
)}
|
|
205
|
-
{...props} />
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export function DialogModalTitle({
|
|
210
|
-
className,
|
|
211
|
-
...props
|
|
212
|
-
}: ComponentProps<typeof DialogPrimitive.Title>) {
|
|
213
|
-
return (
|
|
214
|
-
<DialogPrimitive.Title
|
|
215
|
-
className={cn(
|
|
216
|
-
'font-semibold text-lg md:text-xl md:tracking-tight',
|
|
217
|
-
className
|
|
218
|
-
)}
|
|
219
|
-
{...props} />
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export function DialogDescription({
|
|
224
|
-
className,
|
|
225
|
-
...props
|
|
226
|
-
}: ComponentProps<typeof DialogPrimitive.Description>) {
|
|
227
|
-
return (
|
|
228
|
-
<DialogPrimitive.Description
|
|
229
|
-
className={cn('text-sm text-subtle-foreground', className)}
|
|
230
|
-
{...props} />
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
const dialogAtomStore = createAtomStore(
|
|
235
|
-
{
|
|
236
|
-
desktopVariant: 'modal' as 'drawer' | 'full' | 'modal',
|
|
237
|
-
dismissible: true,
|
|
238
|
-
mobileVariant: 'drawer' as 'drawer' | 'full' | 'modal',
|
|
239
|
-
variant: 'modal' as 'drawer' | 'full' | 'modal'
|
|
240
|
-
},
|
|
241
|
-
{ name: 'dialog' }
|
|
242
|
-
) as unknown as {
|
|
243
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
244
|
-
DialogProvider: FC<any>;
|
|
245
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
246
|
-
useDialogSet: () => (key: string, value: any) => void;
|
|
247
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
248
|
-
useDialogStore: () => any;
|
|
249
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
250
|
-
useDialogValue: (key: string) => any;
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
export const { DialogProvider, useDialogSet, useDialogStore, useDialogValue } = dialogAtomStore;
|
|
254
|
-
|
|
255
|
-
const dialogContentAtomStore = createAtomStore(
|
|
256
|
-
{ fixed: false },
|
|
257
|
-
{ name: 'dialogContent' }
|
|
258
|
-
) as unknown as {
|
|
259
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
260
|
-
DialogContentProvider: FC<any>;
|
|
261
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
262
|
-
useDialogContentSet: () => (key: string, value: any) => void;
|
|
263
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
264
|
-
useDialogContentStore: () => any;
|
|
265
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
266
|
-
useDialogContentValue: (key: string) => any;
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export const { DialogContentProvider, useDialogContentValue } = dialogContentAtomStore;
|
|
270
|
-
|
|
271
|
-
export function Dialog({
|
|
272
|
-
desktopVariant = 'modal',
|
|
273
|
-
mobileVariant = 'drawer',
|
|
274
|
-
...props
|
|
275
|
-
}: ComponentProps<typeof DialogProvider> & DialogProps) {
|
|
276
|
-
const isDesktop = useIsDesktop();
|
|
277
|
-
|
|
278
|
-
const variant = isDesktop ? desktopVariant : mobileVariant;
|
|
279
|
-
|
|
280
|
-
const ResponsiveDialog = variant === 'drawer' ? Drawer : DialogModal;
|
|
281
|
-
|
|
282
|
-
return (
|
|
283
|
-
<DialogProvider variant={variant}>
|
|
284
|
-
<ResponsiveDialog {...props} {...(!isDesktop && { autoFocus: true })} />
|
|
285
|
-
</DialogProvider>
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export function DialogTrigger(
|
|
290
|
-
props: ComponentProps<typeof DialogModalTrigger>
|
|
291
|
-
) {
|
|
292
|
-
const variant = useDialogValue('variant');
|
|
293
|
-
const ResponsiveTrigger
|
|
294
|
-
= variant === 'drawer' ? DrawerTrigger : DialogModalTrigger;
|
|
295
|
-
|
|
296
|
-
return <ResponsiveTrigger {...props} />;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
export function DialogContent({
|
|
300
|
-
as,
|
|
301
|
-
disableAutoFocus,
|
|
302
|
-
fixed,
|
|
303
|
-
hideClose,
|
|
304
|
-
size,
|
|
305
|
-
...props
|
|
306
|
-
}: ComponentProps<typeof DialogModalContent> & { fixed?: boolean }) {
|
|
307
|
-
const variant = useDialogValue('variant');
|
|
308
|
-
const dismissible = useDialogValue('dismissible');
|
|
309
|
-
|
|
310
|
-
return (
|
|
311
|
-
<DialogContentProvider fixed={fixed}>
|
|
312
|
-
{variant === 'drawer' ? (
|
|
313
|
-
<DrawerContent dismissible={dismissible} {...(props as any)} />
|
|
314
|
-
) : (
|
|
315
|
-
<DialogModalContent
|
|
316
|
-
as={as}
|
|
317
|
-
disableAutoFocus={disableAutoFocus}
|
|
318
|
-
dismissible={dismissible}
|
|
319
|
-
hideClose={hideClose}
|
|
320
|
-
size={size}
|
|
321
|
-
{...props} />
|
|
322
|
-
)}
|
|
323
|
-
</DialogContentProvider>
|
|
324
|
-
);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export function DialogBody({
|
|
328
|
-
children,
|
|
329
|
-
className,
|
|
330
|
-
...props
|
|
331
|
-
}: ComponentProps<'div'>) {
|
|
332
|
-
const fixed = useDialogContentValue('fixed');
|
|
333
|
-
const variant = useDialogValue('variant');
|
|
334
|
-
|
|
335
|
-
return (
|
|
336
|
-
<div
|
|
337
|
-
className={cn(
|
|
338
|
-
'flex w-full flex-col gap-4',
|
|
339
|
-
fixed && 'grow overflow-y-auto p-4',
|
|
340
|
-
variant === 'drawer' && 'p-4',
|
|
341
|
-
className
|
|
342
|
-
)}
|
|
343
|
-
{...props}>
|
|
344
|
-
{children}
|
|
345
|
-
</div>
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export function DialogTitle(
|
|
350
|
-
props: ComponentProps<typeof DialogModalTitle>
|
|
351
|
-
) {
|
|
352
|
-
const variant = useDialogValue('variant');
|
|
353
|
-
|
|
354
|
-
return variant === 'drawer' ? (
|
|
355
|
-
<DrawerTitle {...props} />
|
|
356
|
-
) : (
|
|
357
|
-
<DialogModalTitle {...props} />
|
|
358
|
-
);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/** Drawer */
|
|
362
|
-
|
|
363
|
-
export function Drawer(
|
|
364
|
-
props: ComponentProps<typeof DrawerPrimitive.Root>
|
|
365
|
-
) {
|
|
366
|
-
return <DrawerPrimitive.Root shouldScaleBackground={false} {...props} />;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
370
|
-
|
|
371
|
-
export const DrawerPortal = DrawerPrimitive.Portal;
|
|
372
|
-
|
|
373
|
-
export const DrawerClose = DrawerPrimitive.Close;
|
|
374
|
-
|
|
375
|
-
export function DrawerOverlay({
|
|
376
|
-
className,
|
|
377
|
-
...props
|
|
378
|
-
}: ComponentProps<typeof DrawerPrimitive.Overlay>) {
|
|
379
|
-
return (
|
|
380
|
-
<DrawerPrimitive.Overlay
|
|
381
|
-
className={cn('fixed inset-0 z-50 bg-black/40', className)}
|
|
382
|
-
{...props} />
|
|
383
|
-
);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
export function DrawerContent({
|
|
387
|
-
children,
|
|
388
|
-
className,
|
|
389
|
-
dismissible = true,
|
|
390
|
-
onPointerDownOutside,
|
|
391
|
-
...props
|
|
392
|
-
}: ComponentProps<typeof DrawerPrimitive.Content> & {
|
|
393
|
-
dismissible?: boolean;
|
|
394
|
-
}) {
|
|
395
|
-
return (
|
|
396
|
-
<DrawerPortal>
|
|
397
|
-
<DrawerOverlay />
|
|
398
|
-
|
|
399
|
-
<DrawerPrimitive.Content
|
|
400
|
-
className={cn(
|
|
401
|
-
'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto max-h-[80dvh] w-full flex-col rounded-t-[10px] bg-background py-4 focus-visible:ring-0',
|
|
402
|
-
className
|
|
403
|
-
)}
|
|
404
|
-
onPointerDownOutside={(e) => {
|
|
405
|
-
if (!dismissible) {
|
|
406
|
-
e.preventDefault();
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
onPointerDownOutside?.(e);
|
|
410
|
-
}}
|
|
411
|
-
{...props}>
|
|
412
|
-
{children}
|
|
413
|
-
</DrawerPrimitive.Content>
|
|
414
|
-
</DrawerPortal>
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
export const DrawerFooter = DialogFooter;
|
|
419
|
-
|
|
420
|
-
export const DrawerHeader = DialogHeader;
|
|
421
|
-
|
|
422
|
-
export function DrawerTitle({
|
|
423
|
-
className,
|
|
424
|
-
...props
|
|
425
|
-
}: ComponentProps<typeof DrawerPrimitive.Title>) {
|
|
426
|
-
return (
|
|
427
|
-
<DrawerPrimitive.Title
|
|
428
|
-
className={cn(
|
|
429
|
-
'font-semibold text-lg md:text-xl md:tracking-tight',
|
|
430
|
-
className
|
|
431
|
-
)}
|
|
432
|
-
{...props} />
|
|
433
|
-
);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export function DrawerDescription({
|
|
437
|
-
className,
|
|
438
|
-
...props
|
|
439
|
-
}: ComponentProps<typeof DrawerPrimitive.Description>) {
|
|
440
|
-
return (
|
|
441
|
-
<DrawerPrimitive.Description
|
|
442
|
-
className={cn('text-sm text-subtle-foreground', className)}
|
|
443
|
-
{...props} />
|
|
444
|
-
);
|
|
445
|
-
}
|