@pstdio/ui 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EquationComponent-DeDYHvqY.js +62 -0
- package/dist/EquationComponent-DeDYHvqY.js.map +1 -0
- package/dist/chat-ui.js +1366 -0
- package/dist/chat-ui.js.map +1 -0
- package/dist/components/button.stories.d.ts +18 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +1161 -0
- package/dist/components/chat-ui/index.d.ts +13 -0
- package/{storybook-static → dist}/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
- package/dist/components/chat-ui/utils/get-icon.d.ts +34 -0
- package/{storybook-static → dist}/components/column-file-browser.d.ts +1 -2
- package/dist/components/column-file-browser.stories.d.ts +15 -0
- package/dist/components/data-table/build-columns.d.ts +3 -0
- package/dist/components/data-table/data-table.d.ts +2 -0
- package/{storybook-static/components → dist/components/data-table}/data-table.stories.d.ts +1 -1
- package/dist/components/data-table/helpers.d.ts +10 -0
- package/dist/components/data-table/index.d.ts +3 -0
- package/dist/components/data-table/pagination-footer.d.ts +5 -0
- package/dist/components/data-table/selection-toolbar.d.ts +9 -0
- package/{storybook-static/components/data-table.d.ts → dist/components/data-table/types.d.ts} +6 -4
- package/dist/components/documentation/docs-changelog.d.ts +20 -0
- package/dist/components/documentation/docs-changelog.stories.d.ts +15 -0
- package/dist/components/documentation/docs-outline.d.ts +13 -0
- package/dist/components/documentation/docs-outline.stories.d.ts +16 -0
- package/dist/components/documentation/docs-pagination.d.ts +10 -0
- package/dist/components/documentation/docs-pagination.stories.d.ts +14 -0
- package/dist/components/documentation/docs-sidebar.d.ts +14 -0
- package/dist/components/documentation/docs-sidebar.stories.d.ts +7 -0
- package/{storybook-static → dist}/components/file-selector.d.ts +1 -2
- package/dist/components/file-selector.stories.d.ts +17 -0
- package/dist/components/folder-picker-dialog.d.ts +25 -0
- package/{storybook-static/components/style-guide.stories.d.ts → dist/components/folder-picker-dialog.stories.d.ts} +2 -5
- package/{storybook-static → dist}/components/info-card.d.ts +1 -2
- package/dist/components/info-card.stories.d.ts +41 -0
- package/{storybook-static → dist}/components/menu-item.d.ts +1 -1
- package/dist/components/menu-item.stories.d.ts +72 -0
- package/dist/components/number-input.d.ts +8 -0
- package/{storybook-static → dist}/components/panel-menu.d.ts +2 -0
- package/{storybook-static → dist}/components/panel-menu.stories.d.ts +1 -0
- package/{storybook-static → dist}/components/param-editor.stories.d.ts +1 -0
- package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +1 -0
- package/{storybook-static → dist}/components/rich-text/markdown-editor/markdown-editor.d.ts +1 -0
- package/{storybook-static → dist}/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +1 -0
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -0
- package/dist/components/session-indicator.d.ts +14 -0
- package/dist/components/session-indicator.stories.d.ts +11 -0
- package/dist/components/slider.stories.d.ts +15 -0
- package/dist/components/style-guide.stories.d.ts +28 -0
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.stories.d.ts +16 -0
- package/dist/components/tickets/ticket-board.d.ts +33 -0
- package/dist/components/tickets/ticket-board.stories.d.ts +5 -0
- package/dist/components/tickets/ticket-card.d.ts +25 -0
- package/dist/components/tickets/ticket-card.stories.d.ts +17 -0
- package/dist/components/tickets/ticket-list.d.ts +23 -0
- package/dist/components/tickets/ticket-list.stories.d.ts +10 -0
- package/dist/components/toaster.d.ts +3 -0
- package/dist/empty-state-Bu1ocnPz.js +70 -0
- package/dist/empty-state-Bu1ocnPz.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +1278 -0
- package/dist/index.js.map +1 -0
- package/dist/rich-message-CNDoACE7.js +1402 -0
- package/dist/rich-message-CNDoACE7.js.map +1 -0
- package/dist/rich-text.js +490 -0
- package/dist/rich-text.js.map +1 -0
- package/dist/style.css +1 -0
- package/{storybook-static → dist}/theme/primitives/colors.d.ts +12 -22
- package/dist/theme/recipes/menu.d.ts +1 -0
- package/{storybook-static → dist}/theme/tokens/borders.d.ts +6 -6
- package/{storybook-static → dist}/theme/tokens/colors.d.ts +180 -0
- package/dist/theme-C7CIuIPZ.js +2067 -0
- package/dist/theme-C7CIuIPZ.js.map +1 -0
- package/{src/theme/index.ts → dist/theme.js} +5 -2
- package/dist/theme.js.map +1 -0
- package/dist/tooltip-Gm7PLwZG.js +51 -0
- package/dist/tooltip-Gm7PLwZG.js.map +1 -0
- package/{storybook-static/theme/applyThemePreference.d.ts → dist/utils/apply-theme-preference.d.ts} +1 -1
- package/{storybook-static/theme → dist/utils}/theme-preference.d.ts +3 -3
- package/package.json +9 -8
- package/.storybook/main.ts +0 -28
- package/.storybook/preview.tsx +0 -28
- package/.storybook/vitest.setup.ts +0 -6
- package/src/components/alert.tsx +0 -27
- package/src/components/breadcrumb.stories.tsx +0 -40
- package/src/components/breadcrumb.tsx +0 -67
- package/src/components/button.stories.tsx +0 -151
- package/src/components/chat-ui/agent-types.ts +0 -231
- package/src/components/chat-ui/components/ai-conversation.stories.tsx +0 -49
- package/src/components/chat-ui/components/ai-conversation.tsx +0 -68
- package/src/components/chat-ui/components/ai-message.stories.tsx +0 -60
- package/src/components/chat-ui/components/ai-message.tsx +0 -103
- package/src/components/chat-ui/components/ai-response.stories.tsx +0 -48
- package/src/components/chat-ui/components/ai-response.tsx +0 -19
- package/src/components/chat-ui/components/approval-prompt.tsx +0 -51
- package/src/components/chat-ui/components/attachment-list.stories.tsx +0 -24
- package/src/components/chat-ui/components/attachment-list.tsx +0 -76
- package/src/components/chat-ui/components/auto-scroll.tsx +0 -42
- package/src/components/chat-ui/components/chat-input.stories.tsx +0 -114
- package/src/components/chat-ui/components/chat-input.tsx +0 -142
- package/src/components/chat-ui/components/chat-panel.stories.tsx +0 -396
- package/src/components/chat-ui/components/chat-panel.tsx +0 -97
- package/src/components/chat-ui/components/message-parts-renderer.stories.tsx +0 -59
- package/src/components/chat-ui/components/message-parts-renderer.tsx +0 -133
- package/src/components/chat-ui/components/message-types.ts +0 -40
- package/src/components/chat-ui/components/model-swap-separator.stories.tsx +0 -27
- package/src/components/chat-ui/components/model-swap-separator.tsx +0 -20
- package/src/components/chat-ui/components/send-button.tsx +0 -56
- package/src/components/chat-ui/components/timeline.tsx +0 -414
- package/src/components/chat-ui/components/tool-invocation-timeline.stories.tsx +0 -32
- package/src/components/chat-ui/components/tool-invocation-timeline.tsx +0 -16
- package/src/components/chat-ui/index.ts +0 -15
- package/src/components/chat-ui/mocks/full-conversation-normalized.json +0 -3557
- package/src/components/chat-ui/tool-rendering/build-timeline.ts +0 -127
- package/src/components/chat-ui/tool-rendering/default-renderers.ts +0 -420
- package/src/components/chat-ui/tool-rendering/index.ts +0 -3
- package/src/components/chat-ui/tool-rendering/types.ts +0 -19
- package/src/components/chat-ui/utils/diff.ts +0 -228
- package/src/components/chat-ui/utils/editor-state.ts +0 -5
- package/src/components/chat-ui/utils/get-icon.ts +0 -81
- package/src/components/code-editor.tsx +0 -147
- package/src/components/column-file-browser.stories.tsx +0 -217
- package/src/components/column-file-browser.tsx +0 -380
- package/src/components/content-placeholder.tsx +0 -21
- package/src/components/data-table/build-columns.tsx +0 -78
- package/src/components/data-table/data-table.css +0 -51
- package/src/components/data-table/data-table.stories.tsx +0 -209
- package/src/components/data-table/data-table.tsx +0 -232
- package/src/components/data-table/helpers.tsx +0 -69
- package/src/components/data-table/index.ts +0 -3
- package/src/components/data-table/pagination-footer.tsx +0 -58
- package/src/components/data-table/selection-toolbar.tsx +0 -26
- package/src/components/data-table/types.ts +0 -21
- package/src/components/delete-confirmation-modal.stories.tsx +0 -46
- package/src/components/delete-confirmation-modal.tsx +0 -56
- package/src/components/diff-bubble.stories.tsx +0 -70
- package/src/components/diff-bubble.tsx +0 -70
- package/src/components/diff-card.tsx +0 -139
- package/src/components/diff-drawer.stories.tsx +0 -106
- package/src/components/diff-drawer.tsx +0 -59
- package/src/components/diff-editor.tsx +0 -55
- package/src/components/drawer-inline.stories.tsx +0 -124
- package/src/components/drawer-inline.tsx +0 -90
- package/src/components/empty-state.stories.tsx +0 -65
- package/src/components/empty-state.tsx +0 -28
- package/src/components/error-boundary.tsx +0 -80
- package/src/components/file-selector.stories.tsx +0 -166
- package/src/components/file-selector.tsx +0 -192
- package/src/components/file-tree-helpers.ts +0 -28
- package/src/components/horizontal-menu-stack.tsx +0 -15
- package/src/components/info-card.stories.tsx +0 -120
- package/src/components/info-card.tsx +0 -60
- package/src/components/item-section.stories.tsx +0 -57
- package/src/components/item-section.tsx +0 -57
- package/src/components/layout.stories.tsx +0 -341
- package/src/components/layout.tsx +0 -67
- package/src/components/menu-item.stories.tsx +0 -162
- package/src/components/menu-item.tsx +0 -207
- package/src/components/number-input.tsx +0 -21
- package/src/components/open-source-notices-screen.stories.tsx +0 -69
- package/src/components/open-source-notices-screen.tsx +0 -154
- package/src/components/panel-menu.stories.tsx +0 -44
- package/src/components/panel-menu.tsx +0 -27
- package/src/components/param-editor-color-input.tsx +0 -98
- package/src/components/param-editor-date-input.tsx +0 -106
- package/src/components/param-editor-horizontal-text-input.tsx +0 -130
- package/src/components/param-editor-horizontal.stories.tsx +0 -545
- package/src/components/param-editor-horizontal.tsx +0 -137
- package/src/components/param-editor-input-group.tsx +0 -145
- package/src/components/param-editor-number-input.tsx +0 -145
- package/src/components/param-editor-selection-input.tsx +0 -181
- package/src/components/param-editor-text-input.tsx +0 -113
- package/src/components/param-editor.stories.tsx +0 -986
- package/src/components/param-editor.tsx +0 -142
- package/src/components/param-editor.types.ts +0 -95
- package/src/components/properties.stories.tsx +0 -108
- package/src/components/properties.tsx +0 -73
- package/src/components/pstdio-logo.tsx +0 -26
- package/src/components/resource-badge.stories.tsx +0 -26
- package/src/components/resource-badge.tsx +0 -173
- package/src/components/rich-text/collaborative-markdown-editor/awareness-cursors.tsx +0 -45
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.tsx +0 -230
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.tsx +0 -131
- package/src/components/rich-text/index.ts +0 -14
- package/src/components/rich-text/markdown-editor/markdown-editor.stories.tsx +0 -147
- package/src/components/rich-text/markdown-editor/markdown-editor.tsx +0 -112
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +0 -100
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +0 -32
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.ts +0 -2
- package/src/components/rich-text/prompt-input/commands.ts +0 -44
- package/src/components/rich-text/prompt-input/events.ts +0 -21
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx +0 -8
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts +0 -49
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts +0 -30
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx +0 -127
- package/src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx +0 -32
- package/src/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.tsx +0 -30
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.ts +0 -15
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.tsx +0 -88
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.tsx +0 -90
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.ts +0 -3
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.ts +0 -45
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.ts +0 -20
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.tsx +0 -107
- package/src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts +0 -13
- package/src/components/rich-text/prompt-input/prompt-input.stories.tsx +0 -87
- package/src/components/rich-text/prompt-input/prompt-input.tsx +0 -106
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.css +0 -3
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.ts +0 -11
- package/src/components/rich-text/prompt-input/utils.ts +0 -158
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +0 -100
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +0 -32
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.ts +0 -2
- package/src/components/rich-text/rich-message/rich-message.stories.tsx +0 -146
- package/src/components/rich-text/rich-message/rich-message.tsx +0 -118
- package/src/components/rich-text/shared/components/content-editable.tsx +0 -28
- package/src/components/rich-text/shared/components/default-rich-text-components.tsx +0 -99
- package/src/components/rich-text/shared/editor-config.ts +0 -38
- package/src/components/rich-text/shared/nodes/DataTableNode.stories.tsx +0 -52
- package/src/components/rich-text/shared/nodes/DataTableNode.tsx +0 -73
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx +0 -22
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeNode.tsx +0 -57
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.tsx +0 -46
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationNode.tsx +0 -161
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.css +0 -16
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx +0 -45
- package/src/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.tsx +0 -40
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.css +0 -26
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx +0 -414
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.ts +0 -1
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts +0 -52
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts +0 -16
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.css +0 -163
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx +0 -355
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx +0 -6
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts +0 -17
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts +0 -39
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts +0 -23
- package/src/components/rich-text/shared/plugins/StateUpdatePlugin.tsx +0 -21
- package/src/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.tsx +0 -224
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.css +0 -3
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.tsx +0 -315
- package/src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx +0 -12
- package/src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx +0 -20
- package/src/components/rich-text/shared/transformers/markdown-transformers.ts +0 -123
- package/src/components/rich-text/shared/types/rich-text-components.ts +0 -17
- package/src/components/rich-text/theme/report-theme.tsx +0 -81
- package/src/components/rich-text/theme/rich-text-theme.css +0 -773
- package/src/components/rich-text/theme/rich-text-theme.tsx +0 -81
- package/src/components/rich-text/types.ts +0 -9
- package/src/components/rich-text/utils/inferResourceType.ts +0 -17
- package/src/components/rich-text/utils/markdown.ts +0 -12
- package/src/components/rich-text/utils/mediaType.ts +0 -31
- package/src/components/session-indicator.stories.tsx +0 -46
- package/src/components/session-indicator.tsx +0 -40
- package/src/components/slider.stories.tsx +0 -38
- package/src/components/slider.tsx +0 -20
- package/src/components/style-guide-data.ts +0 -374
- package/src/components/style-guide.stories.tsx +0 -212
- package/src/components/style-guide.tsx +0 -305
- package/src/components/ticket-board.stories.tsx +0 -109
- package/src/components/ticket-board.tsx +0 -167
- package/src/components/ticket-card.stories.tsx +0 -133
- package/src/components/ticket-card.tsx +0 -126
- package/src/components/toaster.stories.tsx +0 -79
- package/src/components/toaster.tsx +0 -26
- package/src/components/tooltip.tsx +0 -43
- package/src/index.ts +0 -16
- package/src/theme/global.ts +0 -49
- package/src/theme/primitives/colors.ts +0 -209
- package/src/theme/primitives/fonts.ts +0 -33
- package/src/theme/primitives/sizes.ts +0 -49
- package/src/theme/recipes/alert.ts +0 -12
- package/src/theme/recipes/button.ts +0 -124
- package/src/theme/recipes/dialog.ts +0 -11
- package/src/theme/recipes/divider.ts +0 -7
- package/src/theme/recipes/drawer.ts +0 -16
- package/src/theme/recipes/editable.ts +0 -42
- package/src/theme/recipes/form.ts +0 -11
- package/src/theme/recipes/input.ts +0 -25
- package/src/theme/recipes/menu.ts +0 -40
- package/src/theme/recipes/popover.ts +0 -46
- package/src/theme/recipes/progress-circle.ts +0 -22
- package/src/theme/recipes/skeleton.ts +0 -8
- package/src/theme/recipes/textarea.ts +0 -29
- package/src/theme/recipes/tooltip.ts +0 -15
- package/src/theme/theme.ts +0 -70
- package/src/theme/tokens/borders.ts +0 -38
- package/src/theme/tokens/colors.ts +0 -488
- package/src/theme/tokens/layer-styles.ts +0 -15
- package/src/theme/tokens/shadows.ts +0 -47
- package/src/theme/tokens/text.ts +0 -236
- package/src/utils/apply-theme-preference.ts +0 -17
- package/src/utils/formats.ts +0 -27
- package/src/utils/get-file-type-icon.ts +0 -52
- package/src/utils/theme-preference.tsx +0 -60
- package/src/vite-env.d.ts +0 -6
- package/storybook-static/assets/CodeBlockPlugin-C3OWpvP8.js +0 -281
- package/storybook-static/assets/CodeBlockPlugin-e2vWgtYm.css +0 -1
- package/storybook-static/assets/DataTableNode.stories-DLgTftOI.js +0 -33
- package/storybook-static/assets/EquationComponent-CUFxwyNf.js +0 -1
- package/storybook-static/assets/EquationComponent-DWZwfaVI.css +0 -1
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-B6jc8xvg.js +0 -1
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-D2l3--Te.css +0 -1
- package/storybook-static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/storybook-static/assets/LexicalHistoryPlugin.prod-BQAibkDj.js +0 -1
- package/storybook-static/assets/TreeViewPlugin-CyVKCrKJ.js +0 -24
- package/storybook-static/assets/ai-conversation-DcjS--ee.js +0 -1
- package/storybook-static/assets/ai-conversation.stories-COjWuS8V.js +0 -3
- package/storybook-static/assets/ai-message-DLdAGhWH.js +0 -1
- package/storybook-static/assets/ai-message.stories-CRTyreKL.js +0 -3
- package/storybook-static/assets/ai-response-ySM6s0iN.js +0 -1
- package/storybook-static/assets/ai-response.stories-DVBYlrGf.js +0 -11
- package/storybook-static/assets/attachment-list-1p1601I5.js +0 -1
- package/storybook-static/assets/attachment-list.stories-Cydlsnio.js +0 -7
- package/storybook-static/assets/badge-CtgJasjB.js +0 -1
- package/storybook-static/assets/breadcrumb.stories-SAjB-iqH.js +0 -5
- package/storybook-static/assets/button-C7it2n8t.js +0 -1
- package/storybook-static/assets/button.stories-BMVbbb4y.js +0 -72
- package/storybook-static/assets/chat-input-B-915nCM.js +0 -1
- package/storybook-static/assets/chat-input.stories-DrxvpT9p.js +0 -32
- package/storybook-static/assets/chat-panel.stories-D0L6eIte.js +0 -96
- package/storybook-static/assets/chevron-down-BYCAGyCV.js +0 -1
- package/storybook-static/assets/chevron-right-owK1wZnx.js +0 -1
- package/storybook-static/assets/collaborative-markdown-editor-Bj0GvTvv.js +0 -41
- package/storybook-static/assets/collaborative-markdown-editor.stories-B_MUIC5s.js +0 -11
- package/storybook-static/assets/collapsible-DBDG7h1r.js +0 -1
- package/storybook-static/assets/collapsible-content-B1Uq3jUM.js +0 -1
- package/storybook-static/assets/column-file-browser.stories-DPMQnHCw.js +0 -54
- package/storybook-static/assets/compiler-runtime-BXE7OOXE.js +0 -1
- package/storybook-static/assets/computed-style-C0hzrq9-.js +0 -1
- package/storybook-static/assets/create-recipe-context-BU56IzEo.js +0 -1
- package/storybook-static/assets/create-slot-recipe-context-DAhDE6G_.js +0 -1
- package/storybook-static/assets/create-split-props-u5h9OPvL.js +0 -1
- package/storybook-static/assets/createLucideIcon-CcBBUKX8.js +0 -1
- package/storybook-static/assets/data-table-vuIeWXui.css +0 -1
- package/storybook-static/assets/data-table.stories-Cs-q7dpj.js +0 -19
- package/storybook-static/assets/delete-confirmation-modal.stories-C8vDKFRD.js +0 -14
- package/storybook-static/assets/diff-bubble-_zZypMRt.js +0 -1
- package/storybook-static/assets/diff-bubble.stories-DfonanIk.js +0 -39
- package/storybook-static/assets/diff-drawer.stories-CGDWiKD8.js +0 -38
- package/storybook-static/assets/diff-editor-DV9BXqbn.js +0 -11
- package/storybook-static/assets/dismissable-layer-Cc5dFRd8.js +0 -1
- package/storybook-static/assets/drawer-inline.stories-B3Tp7vjL.js +0 -88
- package/storybook-static/assets/empty-state-BXkyq69k.js +0 -1
- package/storybook-static/assets/empty-state.stories-6eYYBOWR.js +0 -29
- package/storybook-static/assets/factory-BR3bc_RM.js +0 -1
- package/storybook-static/assets/factory-DAJZwK4o.js +0 -1
- package/storybook-static/assets/file-selector.stories-PKIGBUd5.js +0 -31
- package/storybook-static/assets/file-text-D5m8MJlG.js +0 -1
- package/storybook-static/assets/flex-DAJL4AFZ.js +0 -1
- package/storybook-static/assets/folder-C5dba_Co.js +0 -1
- package/storybook-static/assets/form-D_Xln9tK.js +0 -1
- package/storybook-static/assets/full-conversation-normalized-LUbl1coD.js +0 -1
- package/storybook-static/assets/grid-7OIKBlfh.js +0 -1
- package/storybook-static/assets/h-stack-DWHd8f97.js +0 -1
- package/storybook-static/assets/horizontal-menu-stack-Cph6x7ui.js +0 -1
- package/storybook-static/assets/icon-C8FN9JqD.js +0 -1
- package/storybook-static/assets/icon-button-DHiUe7rR.js +0 -1
- package/storybook-static/assets/icons-WRA1cA-W.js +0 -1
- package/storybook-static/assets/iframe-2XPD_vrQ.css +0 -1
- package/storybook-static/assets/iframe-B8FSoBNY.js +0 -1075
- package/storybook-static/assets/index-B0y2_lLF.js +0 -1
- package/storybook-static/assets/index-CXwl6T4k.js +0 -1
- package/storybook-static/assets/index-DaXC_qY_.js +0 -1
- package/storybook-static/assets/index-DpB4ozcR.js +0 -1
- package/storybook-static/assets/index-cFwdnc0b.js +0 -1
- package/storybook-static/assets/info-DlgY5-DW.js +0 -1
- package/storybook-static/assets/info-card.stories-Cry0Qfrn.js +0 -55
- package/storybook-static/assets/input-ZSs5cSFQ.js +0 -1
- package/storybook-static/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/storybook-static/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/storybook-static/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/storybook-static/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/storybook-static/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/storybook-static/assets/item-section-AoQrVPNJ.js +0 -1
- package/storybook-static/assets/item-section.stories-kYTPHRsx.js +0 -24
- package/storybook-static/assets/layout.stories-DhSjwzU1.js +0 -3
- package/storybook-static/assets/link-DE5grRtm.js +0 -1
- package/storybook-static/assets/markdown-BLUemkxK.js +0 -1
- package/storybook-static/assets/markdown-editor-Y4eMsgVb.js +0 -1
- package/storybook-static/assets/markdown-editor.stories-DIWw-hRP.js +0 -115
- package/storybook-static/assets/menu-item-CrqDaj9K.js +0 -1
- package/storybook-static/assets/menu-item.stories-D9Isjjrf.js +0 -68
- package/storybook-static/assets/message-parts-renderer.stories-CewRvbm7.js +0 -5
- package/storybook-static/assets/message-types-CEyA7Qm7.js +0 -60
- package/storybook-static/assets/model-swap-separator.stories-DrQW2NWQ.js +0 -9
- package/storybook-static/assets/mutation-observer-CAfGweIM.js +0 -1
- package/storybook-static/assets/normalize-props-D7NI5JRu.js +0 -1
- package/storybook-static/assets/number-C92MPsRM.js +0 -1
- package/storybook-static/assets/number-input-D1aC-9ls.js +0 -7
- package/storybook-static/assets/onest-cyrillic-400-normal-BxvCLB5P.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-400-normal-DH8vlB-A.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-CyY1vN0Q.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-DHyr8B2c.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-CwpXuTGk.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-DOtXtm0s.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-BAzPRZHg.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-bladozIj.woff2 +0 -0
- package/storybook-static/assets/onest-latin-500-normal-oFTiz6Nq.woff +0 -0
- package/storybook-static/assets/onest-latin-500-normal-qHiQtL66.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-Bd6qVL4Q.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-XTvQgpoh.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal--mQR5RlC.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal-BbXTNVXw.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-BlXa29q8.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-CoujUMv_.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-C-Tcltod.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-CSGWRWNE.woff +0 -0
- package/storybook-static/assets/open-source-notices-screen.stories-BpdJxDZC.js +0 -21
- package/storybook-static/assets/overflow-CkG1DOya.js +0 -1
- package/storybook-static/assets/panel-menu-CqLSrdTB.js +0 -1
- package/storybook-static/assets/panel-menu.stories-CxdWaWjq.js +0 -14
- package/storybook-static/assets/param-editor-horizontal.stories-C1o-VOjG.js +0 -561
- package/storybook-static/assets/param-editor-selection-input-2pJE1_W1.js +0 -1
- package/storybook-static/assets/param-editor.stories-0ae3y4Vu.js +0 -921
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-CjW2EstV.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-ZiRag6zj.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-DbWAkkgN.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-oLY6jnZ7.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-CFtfchNt.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-DHYHbkg3.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CZLGqjJe.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CxxueQ0Z.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-BxlSGspa.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-qdZwdvNS.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-BumBfC1v.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-CEjQclLc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BV2APVTb.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BbvUAu4N.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-BPJkAZPN.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-ICsRR-qJ.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
- package/storybook-static/assets/portal-CZHfPTRw.js +0 -1
- package/storybook-static/assets/preload-helper-PPVm8Dsz.js +0 -1
- package/storybook-static/assets/prompt-input-BLCttowi.js +0 -14
- package/storybook-static/assets/prompt-input-BVbz9joI.css +0 -1
- package/storybook-static/assets/prompt-input.stories-J8-AMVXy.js +0 -9
- package/storybook-static/assets/properties.stories-Bs7ivKgb.js +0 -59
- package/storybook-static/assets/react-18-KY0R7ltw.js +0 -9
- package/storybook-static/assets/render-strategy-BebqUNCa.js +0 -1
- package/storybook-static/assets/resource-badge-Bw5UoU4J.js +0 -1
- package/storybook-static/assets/resource-badge.stories-DtSh-RX9.js +0 -9
- package/storybook-static/assets/rich-message-BIkzo1SM.js +0 -1
- package/storybook-static/assets/rich-message.stories-C9Wc4d3O.js +0 -115
- package/storybook-static/assets/rich-text-theme-Bkhh9rAZ.js +0 -14
- package/storybook-static/assets/rich-text-theme-K2MBoCbx.css +0 -1
- package/storybook-static/assets/separator-CQkMOHNm.js +0 -1
- package/storybook-static/assets/settings-DUgg22A7.js +0 -1
- package/storybook-static/assets/simple-grid-DIKjhnVI.js +0 -1
- package/storybook-static/assets/spinner-ZYH_gvW-.js +0 -1
- package/storybook-static/assets/stack-CN4X31TA.js +0 -1
- package/storybook-static/assets/star-CvcHIXRa.js +0 -1
- package/storybook-static/assets/style-guide.stories-BUvEhZov.js +0 -6
- package/storybook-static/assets/tabbable-DHAf8oAu.js +0 -1
- package/storybook-static/assets/table-BKNSzs2r.js +0 -1
- package/storybook-static/assets/textarea-rqmaWSc5.js +0 -1
- package/storybook-static/assets/toaster-d9nN0H7K.js +0 -1
- package/storybook-static/assets/toaster.stories-BRVCYyaM.js +0 -52
- package/storybook-static/assets/tool-invocation-timeline-B-cS0W6M.js +0 -59
- package/storybook-static/assets/tool-invocation-timeline.stories-DXO59O73.js +0 -5
- package/storybook-static/assets/tooltip-C_a-XGZ8.js +0 -1
- package/storybook-static/assets/tooltip-DZxUoouw.js +0 -1
- package/storybook-static/assets/trash-2-BO05slEk.js +0 -1
- package/storybook-static/assets/typeahead-CuY9WxfQ.js +0 -1
- package/storybook-static/assets/use-field-context-DoxKQlMm.js +0 -1
- package/storybook-static/assets/use-presence-context-DK2PGZth.js +0 -1
- package/storybook-static/assets/v-stack-Btoq6OB_.js +0 -1
- package/storybook-static/assets/x-D42ziktz.js +0 -1
- package/storybook-static/components/chat-ui/mocks/full-conversation-normalized.json.d.ts +0 -3560
- package/storybook-static/components/rich-text/utils/inferResourceType.d.ts +0 -1
- package/storybook-static/favicon-wrapper.svg +0 -46
- package/storybook-static/favicon.svg +0 -1
- package/storybook-static/iframe.html +0 -705
- package/storybook-static/index.d.ts +0 -14
- package/storybook-static/index.html +0 -150
- package/storybook-static/index.json +0 -1
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +0 -1
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -628
- package/storybook-static/sb-addons/themes-1/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/vitest-2/manager-bundle.js +0 -3
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +0 -46
- package/storybook-static/sb-common-assets/favicon.svg +0 -1
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-runtime.js +0 -77956
- package/storybook-static/sb-manager/globals.js +0 -24
- package/storybook-static/sb-manager/manager-stores.js +0 -23
- package/storybook-static/sb-manager/runtime.js +0 -20422
- package/storybook-static/theme/recipes/menu.d.ts +0 -1
- package/storybook-static/theme/types.d.ts +0 -1
- package/storybook-static/vite-inject-mocker-entry.js +0 -2
- package/tsconfig.json +0 -29
- package/vite.config.ts +0 -85
- package/vitest.shims.d.ts +0 -1
- /package/{storybook-static → dist}/components/alert.d.ts +0 -0
- /package/{storybook-static → dist}/components/breadcrumb.d.ts +0 -0
- /package/{storybook-static → dist}/components/breadcrumb.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/agent-types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-conversation.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-message.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-message.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-response.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-response.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/approval-prompt.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/attachment-list.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/attachment-list.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/auto-scroll.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-input.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-panel.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-panel.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-parts-renderer.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-parts-renderer.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/model-swap-separator.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/model-swap-separator.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/send-button.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/tool-invocation-timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/default-renderers.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/utils/diff.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/utils/editor-state.d.ts +0 -0
- /package/{storybook-static → dist}/components/code-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/content-placeholder.d.ts +0 -0
- /package/{storybook-static → dist}/components/delete-confirmation-modal.d.ts +0 -0
- /package/{storybook-static → dist}/components/delete-confirmation-modal.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-bubble.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-bubble.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-card.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-drawer.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-drawer.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/drawer-inline.d.ts +0 -0
- /package/{storybook-static → dist}/components/drawer-inline.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/empty-state.d.ts +0 -0
- /package/{storybook-static → dist}/components/empty-state.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/error-boundary.d.ts +0 -0
- /package/{storybook-static → dist}/components/file-tree-helpers.d.ts +0 -0
- /package/{storybook-static → dist}/components/horizontal-menu-stack.d.ts +0 -0
- /package/{storybook-static → dist}/components/item-section.d.ts +0 -0
- /package/{storybook-static → dist}/components/item-section.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/layout.d.ts +0 -0
- /package/{storybook-static → dist}/components/layout.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/open-source-notices-screen.d.ts +0 -0
- /package/{storybook-static → dist}/components/open-source-notices-screen.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-color-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-date-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal-text-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-input-group.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-number-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-selection-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-text-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor.types.d.ts +0 -0
- /package/{storybook-static → dist}/components/properties.d.ts +0 -0
- /package/{storybook-static → dist}/components/properties.stories.d.ts +0 -0
- /package/{storybook-static/components/schub-logo.d.ts → dist/components/pstdio-logo.d.ts} +0 -0
- /package/{storybook-static → dist}/components/resource-badge.d.ts +0 -0
- /package/{storybook-static → dist}/components/resource-badge.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/commands.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/events.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/prompt-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/prompt-input.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/utils.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/rich-message.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/rich-message.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/components/content-editable.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/components/default-rich-text-components.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/editor-config.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/nodes/DataTableNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/transformers/markdown-transformers.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/types/rich-text-components.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/theme/report-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/theme/rich-text-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/types.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/utils/markdown.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/utils/mediaType.d.ts +0 -0
- /package/{storybook-static → dist}/components/slider.d.ts +0 -0
- /package/{storybook-static → dist}/components/style-guide-data.d.ts +0 -0
- /package/{storybook-static → dist}/components/style-guide.d.ts +0 -0
- /package/{storybook-static → dist}/components/toaster.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/tooltip.d.ts +0 -0
- /package/{storybook-static → dist}/theme/global.d.ts +0 -0
- /package/{storybook-static → dist}/theme/index.d.ts +0 -0
- /package/{storybook-static → dist}/theme/primitives/fonts.d.ts +0 -0
- /package/{storybook-static → dist}/theme/primitives/sizes.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/alert.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/button.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/dialog.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/divider.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/drawer.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/editable.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/form.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/input.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/popover.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/progress-circle.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/skeleton.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/textarea.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/tooltip.d.ts +0 -0
- /package/{storybook-static → dist}/theme/theme.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/layer-styles.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/shadows.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/text.d.ts +0 -0
- /package/{storybook-static → dist}/utils/formats.d.ts +0 -0
- /package/{storybook-static → dist}/utils/get-file-type-icon.d.ts +0 -0
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { Badge, Box, Icon as ChakraIcon } from "@chakra-ui/react";
|
|
2
|
-
import {
|
|
3
|
-
Building2,
|
|
4
|
-
CalendarClock,
|
|
5
|
-
CheckCircle2,
|
|
6
|
-
CreditCard,
|
|
7
|
-
DollarSign,
|
|
8
|
-
Factory,
|
|
9
|
-
FileText,
|
|
10
|
-
Flame,
|
|
11
|
-
Globe2,
|
|
12
|
-
Info,
|
|
13
|
-
} from "lucide-react";
|
|
14
|
-
import { type ReactNode, useState } from "react";
|
|
15
|
-
|
|
16
|
-
import { DataTable, type DataTableProps, type RowData } from ".";
|
|
17
|
-
|
|
18
|
-
type StoryFn = () => ReactNode;
|
|
19
|
-
|
|
20
|
-
interface StoryContext {
|
|
21
|
-
parameters?: {
|
|
22
|
-
pageHeight?: string;
|
|
23
|
-
pagePadding?: string | number;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface DataTableStoryContainerProps {
|
|
28
|
-
args: DataTableProps;
|
|
29
|
-
height?: string;
|
|
30
|
-
marginX?: string;
|
|
31
|
-
maxWidth?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const statusCell = (label: string, colorPalette: string) => ({
|
|
35
|
-
display: (
|
|
36
|
-
<Badge colorPalette={colorPalette} variant="subtle" textStyle="label/S/medium" px="xs" py="4px" borderRadius="md">
|
|
37
|
-
{label}
|
|
38
|
-
</Badge>
|
|
39
|
-
),
|
|
40
|
-
sortValue: label,
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const vendors = ["Northwind Traders", "Fabrikam Logistics", "Contoso Supplies", "Adventure Works"];
|
|
44
|
-
const regions = ["North America", "Europe", "APAC", "LATAM"];
|
|
45
|
-
const departments = ["Finance", "Operations", "Logistics", "Procurement"];
|
|
46
|
-
const priorities = ["Low", "Medium", "High"];
|
|
47
|
-
const paymentMethods = ["Wire", "Card", "ACH", "Check"];
|
|
48
|
-
|
|
49
|
-
const statusOptions = [
|
|
50
|
-
{ label: "Paid", colorPalette: "green" },
|
|
51
|
-
{ label: "Pending", colorPalette: "yellow" },
|
|
52
|
-
{ label: "Overdue", colorPalette: "red" },
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
const tableRows: RowData[] = [
|
|
56
|
-
{
|
|
57
|
-
id: "inv-001",
|
|
58
|
-
Invoice: "INV-001",
|
|
59
|
-
Vendor: vendors[0],
|
|
60
|
-
"Due Date": "2024-06-12",
|
|
61
|
-
Amount: 1280.5,
|
|
62
|
-
Approved: true,
|
|
63
|
-
Status: statusCell(statusOptions[0].label, statusOptions[0].colorPalette),
|
|
64
|
-
Region: regions[0],
|
|
65
|
-
Department: departments[0],
|
|
66
|
-
Priority: priorities[2],
|
|
67
|
-
"Payment Method": paymentMethods[0],
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: "inv-002",
|
|
71
|
-
Invoice: "INV-002",
|
|
72
|
-
Vendor: vendors[1],
|
|
73
|
-
"Due Date": "2024-06-18",
|
|
74
|
-
Amount: 812.2,
|
|
75
|
-
Approved: false,
|
|
76
|
-
Status: statusCell(statusOptions[1].label, statusOptions[1].colorPalette),
|
|
77
|
-
Region: regions[1],
|
|
78
|
-
Department: departments[1],
|
|
79
|
-
Priority: priorities[1],
|
|
80
|
-
"Payment Method": paymentMethods[1],
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: "inv-003",
|
|
84
|
-
Invoice: "INV-003",
|
|
85
|
-
Vendor: vendors[2],
|
|
86
|
-
"Due Date": "2024-06-25",
|
|
87
|
-
Amount: 2640,
|
|
88
|
-
Approved: true,
|
|
89
|
-
Status: statusCell(statusOptions[2].label, statusOptions[2].colorPalette),
|
|
90
|
-
Region: regions[2],
|
|
91
|
-
Department: departments[2],
|
|
92
|
-
Priority: priorities[0],
|
|
93
|
-
"Payment Method": paymentMethods[2],
|
|
94
|
-
},
|
|
95
|
-
];
|
|
96
|
-
|
|
97
|
-
const generateTableRows = (count: number) => {
|
|
98
|
-
const rows: RowData[] = [];
|
|
99
|
-
|
|
100
|
-
for (let index = 0; index < count; index++) {
|
|
101
|
-
const invoiceNumber = index + 1;
|
|
102
|
-
const invoiceId = invoiceNumber.toString().padStart(4, "0");
|
|
103
|
-
const statusOption = statusOptions[index % statusOptions.length];
|
|
104
|
-
const month = String((index % 12) + 1).padStart(2, "0");
|
|
105
|
-
const day = String((index % 28) + 1).padStart(2, "0");
|
|
106
|
-
const amount = Number((950 + invoiceNumber * 3.25).toFixed(2));
|
|
107
|
-
const region = regions[index % regions.length];
|
|
108
|
-
const department = departments[index % departments.length];
|
|
109
|
-
const priority = priorities[index % priorities.length];
|
|
110
|
-
const paymentMethod = paymentMethods[index % paymentMethods.length];
|
|
111
|
-
|
|
112
|
-
rows.push({
|
|
113
|
-
id: `inv-${invoiceId}`,
|
|
114
|
-
Invoice: `INV-${invoiceId}`,
|
|
115
|
-
Vendor: vendors[index % vendors.length],
|
|
116
|
-
"Due Date": `2024-${month}-${day}`,
|
|
117
|
-
Amount: amount,
|
|
118
|
-
Approved: invoiceNumber % 2 === 0,
|
|
119
|
-
Status: statusCell(statusOption.label, statusOption.colorPalette),
|
|
120
|
-
Region: region,
|
|
121
|
-
Department: department,
|
|
122
|
-
Priority: priority,
|
|
123
|
-
"Payment Method": paymentMethod,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return rows;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
const thousandTableRows = generateTableRows(1000);
|
|
131
|
-
|
|
132
|
-
const columnIconProps = {
|
|
133
|
-
boxSize: "14px",
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
const columnIcons: DataTableProps["columnIcons"] = {
|
|
137
|
-
Invoice: <ChakraIcon as={FileText} {...columnIconProps} />,
|
|
138
|
-
Vendor: <ChakraIcon as={Factory} {...columnIconProps} />,
|
|
139
|
-
"Due Date": <ChakraIcon as={CalendarClock} {...columnIconProps} />,
|
|
140
|
-
Amount: <ChakraIcon as={DollarSign} {...columnIconProps} />,
|
|
141
|
-
Approved: <ChakraIcon as={CheckCircle2} {...columnIconProps} />,
|
|
142
|
-
Status: <ChakraIcon as={Info} {...columnIconProps} />,
|
|
143
|
-
Region: <ChakraIcon as={Globe2} {...columnIconProps} />,
|
|
144
|
-
Department: <ChakraIcon as={Building2} {...columnIconProps} />,
|
|
145
|
-
Priority: <ChakraIcon as={Flame} {...columnIconProps} />,
|
|
146
|
-
"Payment Method": <ChakraIcon as={CreditCard} {...columnIconProps} />,
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
const withStoryPage = (Story: StoryFn, context: StoryContext) => {
|
|
150
|
-
const pagePadding = context.parameters?.pagePadding ?? "sm";
|
|
151
|
-
const pageHeight = context.parameters?.pageHeight;
|
|
152
|
-
|
|
153
|
-
return (
|
|
154
|
-
<Box padding={pagePadding} background="bg" height={pageHeight}>
|
|
155
|
-
<Story />
|
|
156
|
-
</Box>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
const DataTableStoryContainer = (props: DataTableStoryContainerProps) => {
|
|
161
|
-
const { args, maxWidth, height, marginX } = props;
|
|
162
|
-
const [activeRowId, setActiveRowId] = useState<string | null>(null);
|
|
163
|
-
|
|
164
|
-
const handleRowClick = (row: RowData) => {
|
|
165
|
-
const rowId = row.id;
|
|
166
|
-
|
|
167
|
-
if (typeof rowId !== "string") return;
|
|
168
|
-
|
|
169
|
-
setActiveRowId(rowId);
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
return (
|
|
173
|
-
<Box width="100%" maxWidth={maxWidth} height={height} marginX={marginX}>
|
|
174
|
-
<DataTable {...args} activeRowId={activeRowId} onRowClick={handleRowClick} />
|
|
175
|
-
</Box>
|
|
176
|
-
);
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
const meta = {
|
|
180
|
-
title: "Components/DataTable",
|
|
181
|
-
component: DataTable,
|
|
182
|
-
decorators: [withStoryPage],
|
|
183
|
-
args: {
|
|
184
|
-
data: tableRows,
|
|
185
|
-
hiddenColumns: ["id"],
|
|
186
|
-
columnIcons,
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export default meta;
|
|
191
|
-
|
|
192
|
-
export const Default = {
|
|
193
|
-
render: (args: DataTableProps) => {
|
|
194
|
-
return <DataTableStoryContainer args={args} maxWidth="960px" height="420px" marginX="auto" />;
|
|
195
|
-
},
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
export const FullHeight = {
|
|
199
|
-
args: {
|
|
200
|
-
data: thousandTableRows,
|
|
201
|
-
},
|
|
202
|
-
parameters: {
|
|
203
|
-
pagePadding: 0,
|
|
204
|
-
pageHeight: "100vh",
|
|
205
|
-
},
|
|
206
|
-
render: (args: DataTableProps) => {
|
|
207
|
-
return <DataTableStoryContainer args={args} height="100%" />;
|
|
208
|
-
},
|
|
209
|
-
};
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import "./data-table.css";
|
|
2
|
-
|
|
3
|
-
import { Icon as ChakraIcon, Flex, IconButton, Menu, Portal, Table, Text } from "@chakra-ui/react";
|
|
4
|
-
import {
|
|
5
|
-
flexRender,
|
|
6
|
-
getCoreRowModel,
|
|
7
|
-
getPaginationRowModel,
|
|
8
|
-
getSortedRowModel,
|
|
9
|
-
type SortingState,
|
|
10
|
-
useReactTable,
|
|
11
|
-
} from "@tanstack/react-table";
|
|
12
|
-
import { ArrowDownAZ, ArrowUpAZ, MoreVertical } from "lucide-react";
|
|
13
|
-
import { useEffect, useState } from "react";
|
|
14
|
-
|
|
15
|
-
import { MenuItem } from "../menu-item";
|
|
16
|
-
import { Tooltip } from "../tooltip";
|
|
17
|
-
import { buildColumns } from "./build-columns";
|
|
18
|
-
import { PaginationFooter } from "./pagination-footer";
|
|
19
|
-
import { SelectionToolbar } from "./selection-toolbar";
|
|
20
|
-
import type { DataTableProps } from "./types";
|
|
21
|
-
|
|
22
|
-
export const DataTable = (props: DataTableProps) => {
|
|
23
|
-
const {
|
|
24
|
-
data,
|
|
25
|
-
noBorder,
|
|
26
|
-
fullWidth,
|
|
27
|
-
onCSVDownload,
|
|
28
|
-
hiddenColumns,
|
|
29
|
-
onRowClick,
|
|
30
|
-
isRowInteractive,
|
|
31
|
-
activeRowId,
|
|
32
|
-
columnIcons,
|
|
33
|
-
} = props;
|
|
34
|
-
const [sorting, setSorting] = useState<SortingState>([]);
|
|
35
|
-
const hiddenColumnsSet = new Set(hiddenColumns ?? []);
|
|
36
|
-
const columnKeys = Object.keys(data[0] || {}).filter((key) => !hiddenColumnsSet.has(key));
|
|
37
|
-
const columns = buildColumns(data, columnKeys, columnIcons);
|
|
38
|
-
|
|
39
|
-
const table = useReactTable({
|
|
40
|
-
data,
|
|
41
|
-
columns,
|
|
42
|
-
defaultColumn: { size: 150, minSize: 40, maxSize: 800 },
|
|
43
|
-
state: { sorting },
|
|
44
|
-
columnResizeMode: "onChange",
|
|
45
|
-
columnResizeDirection: "ltr",
|
|
46
|
-
onSortingChange: setSorting,
|
|
47
|
-
getSortedRowModel: getSortedRowModel(),
|
|
48
|
-
getCoreRowModel: getCoreRowModel(),
|
|
49
|
-
getPaginationRowModel: getPaginationRowModel(),
|
|
50
|
-
enableMultiRowSelection: true,
|
|
51
|
-
enableRowSelection: true,
|
|
52
|
-
autoResetAll: true,
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
table.setPageSize(30);
|
|
57
|
-
}, [table]);
|
|
58
|
-
|
|
59
|
-
const columnSizeVars = (() => {
|
|
60
|
-
const headers = table.getFlatHeaders();
|
|
61
|
-
const colSizes: Record<string, number> = {};
|
|
62
|
-
for (let i = 0; i < headers.length; i++) {
|
|
63
|
-
const header = headers[i]!;
|
|
64
|
-
colSizes[`--header-${header.id}-size`] = header.getSize();
|
|
65
|
-
colSizes[`--col-${header.column.id}-size`] = header.column.getSize();
|
|
66
|
-
}
|
|
67
|
-
return colSizes;
|
|
68
|
-
})();
|
|
69
|
-
|
|
70
|
-
const selectedRows = table.getSelectedRowModel().rows;
|
|
71
|
-
const allRows = table.getCoreRowModel().rows;
|
|
72
|
-
const selectedRowIds = selectedRows
|
|
73
|
-
.map((row) => row.original.id)
|
|
74
|
-
.filter((id): id is string => typeof id === "string");
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<Flex direction="column" height="100%" width="100%">
|
|
78
|
-
{!!selectedRows.length && (
|
|
79
|
-
<SelectionToolbar
|
|
80
|
-
selectedCount={selectedRows.length}
|
|
81
|
-
totalCount={allRows.length}
|
|
82
|
-
onClearSelection={() => table.toggleAllRowsSelected(false)}
|
|
83
|
-
onSelectAll={() => table.toggleAllRowsSelected(true)}
|
|
84
|
-
onCSVDownload={() => onCSVDownload?.(selectedRowIds)}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
<Table.ScrollArea height="100%" overflowY="auto" overflowX="auto" maxWidth={"unset"}>
|
|
88
|
-
<Table.Root
|
|
89
|
-
className={`data-table${fullWidth ? " full-width" : ""}`}
|
|
90
|
-
stickyHeader
|
|
91
|
-
style={{ ...columnSizeVars, width: fullWidth ? "100%" : table.getTotalSize() }}
|
|
92
|
-
>
|
|
93
|
-
<Table.Header>
|
|
94
|
-
{table.getHeaderGroups().map((headerGroup) => (
|
|
95
|
-
<Table.Row
|
|
96
|
-
background="bg.muted"
|
|
97
|
-
key={headerGroup.id}
|
|
98
|
-
borderRight={noBorder ? "none" : "1px solid"}
|
|
99
|
-
borderColor="border.muted"
|
|
100
|
-
>
|
|
101
|
-
{headerGroup.headers.map((header) => (
|
|
102
|
-
<Table.ColumnHeader
|
|
103
|
-
textTransform="none"
|
|
104
|
-
borderRight="1px solid"
|
|
105
|
-
_last={{ borderRight: "none" }}
|
|
106
|
-
borderColor="border.muted"
|
|
107
|
-
paddingX="xs"
|
|
108
|
-
paddingY="2xs"
|
|
109
|
-
key={header.id}
|
|
110
|
-
overflow={"hidden"}
|
|
111
|
-
position="relative"
|
|
112
|
-
style={{
|
|
113
|
-
width:
|
|
114
|
-
fullWidth && headerGroup.headers.indexOf(header) === headerGroup.headers.length - 1
|
|
115
|
-
? undefined
|
|
116
|
-
: `calc(var(--header-${header?.id}-size) * 1px)`,
|
|
117
|
-
}}
|
|
118
|
-
>
|
|
119
|
-
<Tooltip content={flexRender(header.column.columnDef.header, header.getContext())}>
|
|
120
|
-
<Flex
|
|
121
|
-
className="group"
|
|
122
|
-
alignItems="center"
|
|
123
|
-
justifyContent="space-between"
|
|
124
|
-
gap="1"
|
|
125
|
-
flex="1"
|
|
126
|
-
paddingY="2xs"
|
|
127
|
-
>
|
|
128
|
-
<Text textStyle="label/S/medium">
|
|
129
|
-
{flexRender(header.column.columnDef.header, header.getContext())}
|
|
130
|
-
</Text>
|
|
131
|
-
{header.column.id !== "rowIndex" && table.getCoreRowModel().rows.length > 1 && (
|
|
132
|
-
<Menu.Root>
|
|
133
|
-
<Menu.Trigger asChild>
|
|
134
|
-
<IconButton
|
|
135
|
-
ml="2px"
|
|
136
|
-
size="2xs"
|
|
137
|
-
aria-label="sort column"
|
|
138
|
-
variant="ghost"
|
|
139
|
-
visibility="hidden"
|
|
140
|
-
_groupHover={{ visibility: "visible" }}
|
|
141
|
-
>
|
|
142
|
-
<ChakraIcon as={MoreVertical} boxSize="14px" />
|
|
143
|
-
</IconButton>
|
|
144
|
-
</Menu.Trigger>
|
|
145
|
-
<Portal>
|
|
146
|
-
<Menu.Positioner>
|
|
147
|
-
<Menu.Content zIndex="popover" bg="bg">
|
|
148
|
-
<MenuItem
|
|
149
|
-
onClick={() => header.column.toggleSorting(false)}
|
|
150
|
-
primaryLabel="Sort ascending"
|
|
151
|
-
isDisabled={header.column.getIsSorted() === "asc"}
|
|
152
|
-
leftIcon={ArrowUpAZ}
|
|
153
|
-
/>
|
|
154
|
-
<MenuItem
|
|
155
|
-
onClick={() => header.column.toggleSorting(true)}
|
|
156
|
-
primaryLabel="Sort descending"
|
|
157
|
-
isDisabled={header.column.getIsSorted() === "desc"}
|
|
158
|
-
leftIcon={ArrowDownAZ}
|
|
159
|
-
/>
|
|
160
|
-
{header.column.getIsSorted() && (
|
|
161
|
-
<MenuItem onClick={() => header.column.clearSorting()} primaryLabel="Clear sort" />
|
|
162
|
-
)}
|
|
163
|
-
</Menu.Content>
|
|
164
|
-
</Menu.Positioner>
|
|
165
|
-
</Portal>
|
|
166
|
-
</Menu.Root>
|
|
167
|
-
)}
|
|
168
|
-
{header.column.getCanResize() && (
|
|
169
|
-
<span
|
|
170
|
-
{...{
|
|
171
|
-
onDoubleClick: () => header.column.resetSize(),
|
|
172
|
-
onMouseDown: header.getResizeHandler(),
|
|
173
|
-
onTouchStart: header.getResizeHandler(),
|
|
174
|
-
className: `resizer ${header.column.getIsResizing() ? "isResizing" : ""}`,
|
|
175
|
-
}}
|
|
176
|
-
/>
|
|
177
|
-
)}
|
|
178
|
-
</Flex>
|
|
179
|
-
</Tooltip>
|
|
180
|
-
</Table.ColumnHeader>
|
|
181
|
-
))}
|
|
182
|
-
</Table.Row>
|
|
183
|
-
))}
|
|
184
|
-
</Table.Header>
|
|
185
|
-
<Table.Body>
|
|
186
|
-
{table.getRowModel().rows.map((row) => {
|
|
187
|
-
const rowIsInteractive = onRowClick ? (isRowInteractive?.(row.original) ?? true) : false;
|
|
188
|
-
|
|
189
|
-
return (
|
|
190
|
-
<Table.Row
|
|
191
|
-
key={row.id}
|
|
192
|
-
cursor={rowIsInteractive ? "pointer" : undefined}
|
|
193
|
-
onClick={rowIsInteractive ? () => onRowClick?.(row.original) : undefined}
|
|
194
|
-
borderTop={noBorder ? "none" : "1px solid"}
|
|
195
|
-
borderBottom={"1px solid"}
|
|
196
|
-
borderRight={noBorder ? "none" : "1px solid"}
|
|
197
|
-
_last={{ borderBottom: noBorder ? "none" : "1px solid", borderColor: "border.muted" }}
|
|
198
|
-
borderColor="border.muted"
|
|
199
|
-
background={
|
|
200
|
-
activeRowId && typeof row.original.id === "string" && row.original.id === activeRowId
|
|
201
|
-
? "bg.panel"
|
|
202
|
-
: "bg"
|
|
203
|
-
}
|
|
204
|
-
_hover={rowIsInteractive ? { background: "bg.panel" } : undefined}
|
|
205
|
-
>
|
|
206
|
-
{row.getVisibleCells().map((cell, index) => (
|
|
207
|
-
<Table.Cell
|
|
208
|
-
width="fit-content"
|
|
209
|
-
maxWidth={"12rem"}
|
|
210
|
-
overflow={"hidden"}
|
|
211
|
-
padding="xs"
|
|
212
|
-
borderRight="1px solid"
|
|
213
|
-
borderColor="border.muted"
|
|
214
|
-
_last={{ borderRight: "none" }}
|
|
215
|
-
borderBottom="none"
|
|
216
|
-
key={cell.id}
|
|
217
|
-
textStyle="paragraph/S/regular"
|
|
218
|
-
background={index === 0 ? "bg.muted" : "inherit"}
|
|
219
|
-
>
|
|
220
|
-
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
221
|
-
</Table.Cell>
|
|
222
|
-
))}
|
|
223
|
-
</Table.Row>
|
|
224
|
-
);
|
|
225
|
-
})}
|
|
226
|
-
</Table.Body>
|
|
227
|
-
</Table.Root>
|
|
228
|
-
</Table.ScrollArea>
|
|
229
|
-
{table.getPageCount() > 1 && <PaginationFooter table={table} />}
|
|
230
|
-
</Flex>
|
|
231
|
-
);
|
|
232
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Icon as ChakraIcon } from "@chakra-ui/react";
|
|
2
|
-
import { createColumnHelper } from "@tanstack/react-table";
|
|
3
|
-
import { CalendarClock, CheckCircle2, Hash, Type } from "lucide-react";
|
|
4
|
-
import { isValidElement, type ReactElement, type ReactNode } from "react";
|
|
5
|
-
|
|
6
|
-
import type { ColumnType, DisplayValue, RowData } from "./types";
|
|
7
|
-
|
|
8
|
-
export const isDisplayValue = (value: unknown): value is DisplayValue =>
|
|
9
|
-
typeof value === "object" && value !== null && "display" in value;
|
|
10
|
-
|
|
11
|
-
export const isString = (v: unknown): v is string => typeof v === "string" || v instanceof String;
|
|
12
|
-
export const isNumber = (v: unknown): v is number => typeof v === "number" || v instanceof Number;
|
|
13
|
-
export const isBoolean = (v: unknown): v is boolean => typeof v === "boolean" || v instanceof Boolean;
|
|
14
|
-
|
|
15
|
-
export const getType = (values: unknown[]): ColumnType => {
|
|
16
|
-
const comparableValues = values
|
|
17
|
-
.map((value) => {
|
|
18
|
-
if (isDisplayValue(value)) return value.sortValue ?? null;
|
|
19
|
-
if (value instanceof String || value instanceof Number || value instanceof Boolean) return value.valueOf();
|
|
20
|
-
if (isValidElement(value)) return null;
|
|
21
|
-
return value;
|
|
22
|
-
})
|
|
23
|
-
.filter((value) => value !== null && value !== undefined);
|
|
24
|
-
|
|
25
|
-
if (comparableValues.length === 0) return "unknown";
|
|
26
|
-
if (comparableValues.every((v) => isString(v) && !Number.isNaN(Date.parse(v.toString())))) return "date";
|
|
27
|
-
if (comparableValues.every((v) => isNumber(v))) return "number";
|
|
28
|
-
if (comparableValues.every((v) => isBoolean(v))) return "boolean";
|
|
29
|
-
if (comparableValues.every((v) => isString(v))) return "string";
|
|
30
|
-
return "unknown";
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const headerIconProps = {
|
|
34
|
-
boxSize: "14px",
|
|
35
|
-
marginRight: "2px",
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const getIcon = (values: unknown[]): ReactElement | null => {
|
|
39
|
-
const type = getType(values);
|
|
40
|
-
if (type === "date") return <ChakraIcon as={CalendarClock} {...headerIconProps} />;
|
|
41
|
-
if (type === "string") return <ChakraIcon as={Type} {...headerIconProps} />;
|
|
42
|
-
if (type === "number") return <ChakraIcon as={Hash} {...headerIconProps} />;
|
|
43
|
-
if (type === "boolean") return <ChakraIcon as={CheckCircle2} {...headerIconProps} />;
|
|
44
|
-
return null;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export function formatDisplayValue(value: unknown): ReactNode {
|
|
48
|
-
if (isDisplayValue(value)) return value.display;
|
|
49
|
-
if (isValidElement(value)) return value;
|
|
50
|
-
|
|
51
|
-
if (value instanceof String || value instanceof Number || value instanceof Boolean) {
|
|
52
|
-
value = value.valueOf();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
switch (typeof value) {
|
|
56
|
-
case "boolean":
|
|
57
|
-
return value ? "TRUE" : "FALSE";
|
|
58
|
-
case "number":
|
|
59
|
-
return value;
|
|
60
|
-
case "object":
|
|
61
|
-
return value !== null ? JSON.stringify(value) : "-";
|
|
62
|
-
case "undefined":
|
|
63
|
-
return "-";
|
|
64
|
-
default:
|
|
65
|
-
return value ? String(value) : "-";
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export const columnHelper = createColumnHelper<RowData>();
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Button, Flex, Stack, Text } from "@chakra-ui/react";
|
|
2
|
-
import type { useReactTable } from "@tanstack/react-table";
|
|
3
|
-
|
|
4
|
-
import { NumberInputField, NumberInputRoot } from "../number-input";
|
|
5
|
-
import type { RowData } from "./types";
|
|
6
|
-
|
|
7
|
-
export function PaginationFooter({ table }: { table: ReturnType<typeof useReactTable<RowData>> }) {
|
|
8
|
-
const totalPages = Math.max(table.getPageCount(), 1);
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<Flex
|
|
12
|
-
alignItems="center"
|
|
13
|
-
justifyContent="space-between"
|
|
14
|
-
borderTop="1px solid"
|
|
15
|
-
borderColor={"border.muted"}
|
|
16
|
-
paddingX="xs"
|
|
17
|
-
>
|
|
18
|
-
<Text>{table.getCoreRowModel().rows.length} rows</Text>
|
|
19
|
-
<Stack alignItems="center" direction="row" justifyContent="flex-end" paddingY="xs">
|
|
20
|
-
<Button size="xs" onClick={() => table.setPageIndex(0)} disabled={!table.getCanPreviousPage()}>
|
|
21
|
-
{"<<"}
|
|
22
|
-
</Button>
|
|
23
|
-
<Button size="xs" onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()}>
|
|
24
|
-
{"<"}
|
|
25
|
-
</Button>
|
|
26
|
-
<Button size="xs" onClick={() => table.nextPage()} disabled={!table.getCanNextPage()}>
|
|
27
|
-
{">"}
|
|
28
|
-
</Button>
|
|
29
|
-
<Button
|
|
30
|
-
size="xs"
|
|
31
|
-
onClick={() => table.setPageIndex(table.getPageCount() - 1)}
|
|
32
|
-
disabled={!table.getCanNextPage()}
|
|
33
|
-
>
|
|
34
|
-
{">>"}
|
|
35
|
-
</Button>
|
|
36
|
-
<Flex alignItems="center" height="100%" marginLeft="sm" marginRight="md" gap="xs">
|
|
37
|
-
<Text>Page</Text>
|
|
38
|
-
<NumberInputRoot
|
|
39
|
-
margin="2xs"
|
|
40
|
-
width="3rem"
|
|
41
|
-
size="xs"
|
|
42
|
-
min={1}
|
|
43
|
-
max={totalPages}
|
|
44
|
-
value={`${table.getState().pagination.pageIndex + 1}`}
|
|
45
|
-
onValueChange={(details) => {
|
|
46
|
-
const next = Number.isNaN(details.valueAsNumber) ? 1 : details.valueAsNumber;
|
|
47
|
-
const clamped = Math.min(totalPages, Math.max(1, next));
|
|
48
|
-
table.setPageIndex(clamped - 1);
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
<NumberInputField className="nodrag" />
|
|
52
|
-
</NumberInputRoot>
|
|
53
|
-
<Text>of {totalPages}</Text>
|
|
54
|
-
</Flex>
|
|
55
|
-
</Stack>
|
|
56
|
-
</Flex>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Button, Icon as ChakraIcon, Flex, IconButton, Stack, Text } from "@chakra-ui/react";
|
|
2
|
-
|
|
3
|
-
interface SelectionToolbarProps {
|
|
4
|
-
selectedCount: number;
|
|
5
|
-
totalCount: number;
|
|
6
|
-
onClearSelection: () => void;
|
|
7
|
-
onSelectAll: () => void;
|
|
8
|
-
onCSVDownload: () => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function SelectionToolbar(props: SelectionToolbarProps) {
|
|
12
|
-
const { selectedCount, totalCount, onClearSelection, onSelectAll, onCSVDownload } = props;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Flex alignItems="center" paddingY="2xs" paddingX="sm">
|
|
16
|
-
<Stack direction="row" alignItems="center">
|
|
17
|
-
<IconButton aria-label="clear-selection" onClick={onClearSelection} size="xs">
|
|
18
|
-
<ChakraIcon boxSize="16px" />
|
|
19
|
-
</IconButton>
|
|
20
|
-
<Text>{selectedCount} rows selected</Text>
|
|
21
|
-
{selectedCount !== totalCount && <Button onClick={onSelectAll}>Select all {totalCount} rows</Button>}
|
|
22
|
-
<Button onClick={onCSVDownload}>Download CSV</Button>
|
|
23
|
-
</Stack>
|
|
24
|
-
</Flex>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
export type ColumnType = "boolean" | "date" | "number" | "string" | "unknown";
|
|
4
|
-
|
|
5
|
-
export type RowData = Record<string, unknown>;
|
|
6
|
-
|
|
7
|
-
export type DisplayValue = { display: ReactNode; sortValue?: unknown };
|
|
8
|
-
|
|
9
|
-
export interface DataTableProps {
|
|
10
|
-
data: RowData[];
|
|
11
|
-
isReadOnly?: boolean;
|
|
12
|
-
noBorder?: boolean;
|
|
13
|
-
fullWidth?: boolean;
|
|
14
|
-
onCSVUpload?: (csv: string) => Promise<void>;
|
|
15
|
-
onCSVDownload?: (scenarios: string[]) => void;
|
|
16
|
-
hiddenColumns?: string[];
|
|
17
|
-
onRowClick?: (row: RowData) => void;
|
|
18
|
-
isRowInteractive?: (row: RowData) => boolean;
|
|
19
|
-
activeRowId?: string | null;
|
|
20
|
-
columnIcons?: Partial<Record<string, ReactNode>>;
|
|
21
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Box, Button, Stack, Text } from "@chakra-ui/react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
|
|
5
|
-
import { DeleteConfirmationModal } from "./delete-confirmation-modal";
|
|
6
|
-
|
|
7
|
-
type StoryFn = () => ReactNode;
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
title: "Components/DeleteConfirmationModal",
|
|
11
|
-
component: DeleteConfirmationModal,
|
|
12
|
-
decorators: [
|
|
13
|
-
(Story: StoryFn) => (
|
|
14
|
-
<Box minH="320px" padding="sm" background="bg">
|
|
15
|
-
<Story />
|
|
16
|
-
</Box>
|
|
17
|
-
),
|
|
18
|
-
],
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default meta;
|
|
22
|
-
|
|
23
|
-
export const Default = {
|
|
24
|
-
render: () => {
|
|
25
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<Stack gap="md">
|
|
29
|
-
<Text textStyle="paragraph/S/regular" color="fg.muted">
|
|
30
|
-
Use the button below to reopen the confirmation modal after closing it.
|
|
31
|
-
</Text>
|
|
32
|
-
<Button size="sm" variant="outline" onClick={() => setIsOpen(true)}>
|
|
33
|
-
Open confirmation modal
|
|
34
|
-
</Button>
|
|
35
|
-
<DeleteConfirmationModal
|
|
36
|
-
open={isOpen}
|
|
37
|
-
onClose={() => setIsOpen(false)}
|
|
38
|
-
onDelete={() => setIsOpen(false)}
|
|
39
|
-
headline="Delete pipeline?"
|
|
40
|
-
notificationText="Deleting this pipeline will remove all versions. This action cannot be undone."
|
|
41
|
-
buttonText="Delete pipeline"
|
|
42
|
-
/>
|
|
43
|
-
</Stack>
|
|
44
|
-
);
|
|
45
|
-
},
|
|
46
|
-
};
|