@epam/ai-dial-chat-shared 1.3.0-dev.34 → 1.3.0-dev.37
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/components/ConfirmationDialog/ConfirmationDialog.d.ts +41 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.d.ts +57 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/CopyButton/CopyButton.d.ts +19 -0
- package/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
- package/components/EntityHeader/EntityHeader.d.ts +38 -0
- package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
- package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts +15 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.d.ts +36 -0
- package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +53 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts +62 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +137 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts +22 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.d.ts +31 -0
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
- package/constants/breakpoint.d.ts +9 -0
- package/constants/breakpoint.d.ts.map +1 -0
- package/constants/dial.d.ts +5 -0
- package/constants/dial.d.ts.map +1 -0
- package/constants/entity-colors.d.ts +6 -0
- package/constants/entity-colors.d.ts.map +1 -0
- package/constants/icon.d.ts +14 -0
- package/constants/icon.d.ts.map +1 -0
- package/constants/markdown-editor.d.ts +2 -0
- package/constants/markdown-editor.d.ts.map +1 -0
- package/constants/mime-types.d.ts +27 -0
- package/constants/mime-types.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +13 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/constants/resizable-fields.d.ts +5 -0
- package/constants/resizable-fields.d.ts.map +1 -0
- package/constants/select-list.d.ts +4 -0
- package/constants/select-list.d.ts.map +1 -0
- package/constants/tag-input.d.ts +2 -0
- package/constants/tag-input.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +5 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/markdown.d.ts +18 -0
- package/entry-points/markdown.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +52 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
- package/file-manager/attach-result.d.ts +9 -0
- package/file-manager/attach-result.d.ts.map +1 -0
- package/file-manager/file-manager-controller.d.ts +121 -0
- package/file-manager/file-manager-controller.d.ts.map +1 -0
- package/file-manager/file-manager-variant.d.ts +21 -0
- package/file-manager/file-manager-variant.d.ts.map +1 -0
- package/file-manager/file-upload-validation.d.ts +8 -0
- package/file-manager/file-upload-validation.d.ts.map +1 -0
- package/file-manager/index.d.ts +10 -0
- package/file-manager/index.d.ts.map +1 -0
- package/file-manager/labels.d.ts +156 -0
- package/file-manager/labels.d.ts.map +1 -0
- package/file-manager/path.d.ts +12 -0
- package/file-manager/path.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +29 -0
- package/file-manager/upload-batch.d.ts.map +1 -0
- package/file-manager/upload-queue.d.ts +5 -0
- package/file-manager/upload-queue.d.ts.map +1 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
- package/file-manager.d.ts +2 -506
- package/hooks/useAvailableHeightCap.d.ts +30 -0
- package/hooks/useAvailableHeightCap.d.ts.map +1 -0
- package/hooks/useCodeCopy.d.ts +6 -0
- package/hooks/useCodeCopy.d.ts.map +1 -0
- package/hooks/useCollapsedText.d.ts +27 -0
- package/hooks/useCollapsedText.d.ts.map +1 -0
- package/hooks/useHorizontalOverflow.d.ts +21 -0
- package/hooks/useHorizontalOverflow.d.ts.map +1 -0
- package/hooks/useIsMobile.d.ts +3 -0
- package/hooks/useIsMobile.d.ts.map +1 -0
- package/hooks/useStreamedMarkdownContent.d.ts +3 -0
- package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
- package/hooks/useTextRefinement.d.ts +44 -0
- package/hooks/useTextRefinement.d.ts.map +1 -0
- package/hooks/useUnsavedChangesGuard.d.ts +14 -0
- package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/index.d.ts +77 -3167
- package/index.d.ts.map +1 -0
- package/markdown.d.ts +2 -465
- package/models/annotation.d.ts +143 -0
- package/models/annotation.d.ts.map +1 -0
- package/models/application-visualizer.d.ts +67 -0
- package/models/application-visualizer.d.ts.map +1 -0
- package/models/auth.d.ts +26 -0
- package/models/auth.d.ts.map +1 -0
- package/models/chat.d.ts +407 -0
- package/models/chat.d.ts.map +1 -0
- package/models/conversation-classification.d.ts +9 -0
- package/models/conversation-classification.d.ts.map +1 -0
- package/models/conversation-transfer.d.ts +96 -0
- package/models/conversation-transfer.d.ts.map +1 -0
- package/models/custom-visualizer.d.ts +61 -0
- package/models/custom-visualizer.d.ts.map +1 -0
- package/models/deployment-configuration.d.ts +55 -0
- package/models/deployment-configuration.d.ts.map +1 -0
- package/models/deployment-features.d.ts +17 -0
- package/models/deployment-features.d.ts.map +1 -0
- package/models/deployment.d.ts +31 -0
- package/models/deployment.d.ts.map +1 -0
- package/models/dial-model.d.ts +19 -0
- package/models/dial-model.d.ts.map +1 -0
- package/models/entity.d.ts +15 -0
- package/models/entity.d.ts.map +1 -0
- package/models/import-export.d.ts +23 -0
- package/models/import-export.d.ts.map +1 -0
- package/models/locale.d.ts +19 -0
- package/models/locale.d.ts.map +1 -0
- package/models/text-refinement.d.ts +18 -0
- package/models/text-refinement.d.ts.map +1 -0
- package/models/theme.d.ts +36 -0
- package/models/theme.d.ts.map +1 -0
- package/models/tool-menu-item.d.ts +13 -0
- package/models/tool-menu-item.d.ts.map +1 -0
- package/package.json +1 -1
- package/types/attachment.d.ts +25 -0
- package/types/attachment.d.ts.map +1 -0
- package/types/code-editor.d.ts +8 -0
- package/types/code-editor.d.ts.map +1 -0
- package/types/entity-type.d.ts +10 -0
- package/types/entity-type.d.ts.map +1 -0
- package/types/file-manager-node.d.ts +17 -0
- package/types/file-manager-node.d.ts.map +1 -0
- package/types/mime-type.d.ts +59 -0
- package/types/mime-type.d.ts.map +1 -0
- package/utils/annotation.d.ts +29 -0
- package/utils/annotation.d.ts.map +1 -0
- package/utils/avatar-color.d.ts +10 -0
- package/utils/avatar-color.d.ts.map +1 -0
- package/utils/build-css-vars.d.ts +4 -0
- package/utils/build-css-vars.d.ts.map +1 -0
- package/utils/copy-to-clipboard.d.ts +18 -0
- package/utils/copy-to-clipboard.d.ts.map +1 -0
- package/utils/entity-field-limits.d.ts +11 -0
- package/utils/entity-field-limits.d.ts.map +1 -0
- package/utils/entity-type.d.ts +5 -0
- package/utils/entity-type.d.ts.map +1 -0
- package/utils/file-download.d.ts +21 -0
- package/utils/file-download.d.ts.map +1 -0
- package/utils/format-file-size.d.ts +3 -0
- package/utils/format-file-size.d.ts.map +1 -0
- package/utils/format-last-used.d.ts +3 -0
- package/utils/format-last-used.d.ts.map +1 -0
- package/utils/format-price.d.ts +7 -0
- package/utils/format-price.d.ts.map +1 -0
- package/utils/generate-uuid.d.ts +3 -0
- package/utils/generate-uuid.d.ts.map +1 -0
- package/utils/initials.d.ts +3 -0
- package/utils/initials.d.ts.map +1 -0
- package/utils/is-audio-transcription-supported.d.ts +3 -0
- package/utils/is-audio-transcription-supported.d.ts.map +1 -0
- package/utils/is-skill-selection-unsupported.d.ts +3 -0
- package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
- package/utils/latex.d.ts +21 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/merge-class.d.ts +4 -0
- package/utils/merge-class.d.ts.map +1 -0
- package/utils/message-attachment-to-display.d.ts +22 -0
- package/utils/message-attachment-to-display.d.ts.map +1 -0
- package/utils/message.d.ts +4 -0
- package/utils/message.d.ts.map +1 -0
- package/utils/mime-type.d.ts +22 -0
- package/utils/mime-type.d.ts.map +1 -0
- package/utils/prompt-variables.d.ts +62 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/string-utils.d.ts +11 -0
- package/utils/string-utils.d.ts.map +1 -0
- package/utils/syntax-highlighting.d.ts +8 -0
- package/utils/syntax-highlighting.d.ts.map +1 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PopupSize } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { ConfirmationViewProps } from '../ConfirmationView/ConfirmationView';
|
|
4
|
+
/** Props for `ConfirmationDialog`. */
|
|
5
|
+
export interface ConfirmationDialogProps extends ConfirmationViewProps {
|
|
6
|
+
/** Whether the dialog is open. */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/** Dialog title. A string rather than a node, so the kit names the dialog with it. */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Label of the confirming action button. */
|
|
11
|
+
confirmLabel: string;
|
|
12
|
+
/** Label of the cancel button. */
|
|
13
|
+
cancelLabel: string;
|
|
14
|
+
/** Whether the confirmed action is in flight. While it is, both actions and every dismissal route are blocked. Default: `false`. */
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
/** Whether confirming is not yet possible because the step's required input is unsatisfied. Default: `false`. */
|
|
17
|
+
isConfirmDisabled?: boolean;
|
|
18
|
+
/** Status text announced to assistive tech while the action is in flight. */
|
|
19
|
+
loadingStatusLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Width cap of the dialog. Defaults to `PopupSize.Sm`, which is what a few
|
|
22
|
+
* lines of copy and two buttons need — the kit's own `Popup` defaults to
|
|
23
|
+
* `Md`, three times as wide.
|
|
24
|
+
*/
|
|
25
|
+
size?: PopupSize;
|
|
26
|
+
/** CSS class applied to the popup container, for example to constrain its width. */
|
|
27
|
+
popupClassName?: string;
|
|
28
|
+
/** CSS class applied to the dialog title. */
|
|
29
|
+
titleClassName?: string;
|
|
30
|
+
/** Called when the user confirms. */
|
|
31
|
+
onConfirm: () => void;
|
|
32
|
+
/** Called when the dialog is dismissed — Cancel, the header close control, Escape, or an outside click. */
|
|
33
|
+
onClose: () => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A confirmation step presented as a centered dialog: the same content block
|
|
37
|
+
* and action row the catalog's details panel shows in place, inside the kit's
|
|
38
|
+
* `Popup`. Use it wherever no details panel is open to host the step.
|
|
39
|
+
*/
|
|
40
|
+
export declare const ConfirmationDialog: FC<ConfirmationDialogProps>;
|
|
41
|
+
//# sourceMappingURL=ConfirmationDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAC;AAE9C,sCAAsC;AACtC,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IACpE,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,oIAAoI;IACpI,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iHAAiH;IACjH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2GAA2G;IAC3G,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAiD1D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ConfirmationPopupVariant } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
import { EntityHeaderItem } from '../../models/entity';
|
|
4
|
+
/** Color overrides for `ConfirmationIdentityCard`. */
|
|
5
|
+
export interface ConfirmationIdentityCardColors {
|
|
6
|
+
/** Card surface in the `Info` variant. Defaults to `--bg-info`. */
|
|
7
|
+
background?: string;
|
|
8
|
+
/** Card surface in the `Danger` variant. Defaults to `--bg-control-error-alpha-active`. */
|
|
9
|
+
dangerBackground?: string;
|
|
10
|
+
/** Card border in the `Danger` variant. Defaults to `--stroke-error-alpha`. */
|
|
11
|
+
dangerBorder?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Style overrides for `ConfirmationIdentityCard`. */
|
|
14
|
+
export interface ConfirmationIdentityCardStyles {
|
|
15
|
+
/** Color overrides, applied to whichever surface `variant` selects. */
|
|
16
|
+
colors?: ConfirmationIdentityCardColors;
|
|
17
|
+
}
|
|
18
|
+
/** Props for `ConfirmationIdentityCard`. */
|
|
19
|
+
export interface ConfirmationIdentityCardProps {
|
|
20
|
+
/** Entity whose identity the card shows. Ignored when `children` is set. */
|
|
21
|
+
item?: EntityHeaderItem;
|
|
22
|
+
/** Row content rendered instead of the entity identity, for a resource that is not an `EntityHeaderItem`. */
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
/** Palette of the card surface. Default: `ConfirmationPopupVariant.Info`. */
|
|
25
|
+
variant?: ConfirmationPopupVariant;
|
|
26
|
+
/** Size of the entity icon in pixels. Default: `40`. */
|
|
27
|
+
iconSize?: number;
|
|
28
|
+
/** Style overrides. */
|
|
29
|
+
styles?: ConfirmationIdentityCardStyles;
|
|
30
|
+
}
|
|
31
|
+
/** Tinted card echoing the resource a confirmation is about, so the user sees exactly what the action will affect. */
|
|
32
|
+
export declare const ConfirmationIdentityCard: FC<ConfirmationIdentityCardProps>;
|
|
33
|
+
//# sourceMappingURL=ConfirmationIdentityCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationIdentityCard.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationIdentityCard/ConfirmationIdentityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D,sDAAsD;AACtD,MAAM,WAAW,8BAA8B;IAC7C,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,sDAAsD;AACtD,MAAM,WAAW,8BAA8B;IAC7C,uEAAuE;IACvE,MAAM,CAAC,EAAE,8BAA8B,CAAC;CACzC;AAED,4CAA4C;AAC5C,MAAM,WAAW,6BAA6B;IAC5C,4EAA4E;IAC5E,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,MAAM,CAAC,EAAE,8BAA8B,CAAC;CACzC;AAED,sHAAsH;AACtH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CA8BtE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** Color overrides for `ConfirmationIdentityRow`. */
|
|
3
|
+
export interface ConfirmationIdentityRowColors {
|
|
4
|
+
/** Type label above the name. Defaults to `--text-secondary`. */
|
|
5
|
+
typeLabelText?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Style overrides for `ConfirmationIdentityRow`. */
|
|
8
|
+
export interface ConfirmationIdentityRowStyles {
|
|
9
|
+
/** Color overrides applied as CSS custom properties. */
|
|
10
|
+
colors?: ConfirmationIdentityRowColors;
|
|
11
|
+
/** Typography class applied to the type label. Defaults to `'dial-caption-lead-semi-text'`. */
|
|
12
|
+
typeLabelClassName?: string;
|
|
13
|
+
/** Typography class applied to the name. Defaults to `'dial-small-semi-text'`. */
|
|
14
|
+
nameClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Props for `ConfirmationIdentityRow`. */
|
|
17
|
+
export interface ConfirmationIdentityRowProps {
|
|
18
|
+
/** Icon shown ahead of the type and name. Supplied by the host, which owns the glyph set. */
|
|
19
|
+
icon?: ReactNode;
|
|
20
|
+
/** Resource type shown above the name. Pass it in sentence case — the default class uppercases it. */
|
|
21
|
+
typeLabel?: string;
|
|
22
|
+
/** Resource name, truncated rather than wrapped. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Style overrides. */
|
|
25
|
+
styles?: ConfirmationIdentityRowStyles;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Identity of a resource that has no `EntityHeaderItem` — a conversation or a
|
|
29
|
+
* scheduled task, say — laid out as icon, type, and name for
|
|
30
|
+
* `ConfirmationIdentityCard`'s `children`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ConfirmationIdentityRow: FC<ConfirmationIdentityRowProps>;
|
|
33
|
+
//# sourceMappingURL=ConfirmationIdentityRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationIdentityRow.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationIdentityRow/ConfirmationIdentityRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3C,qDAAqD;AACrD,MAAM,WAAW,6BAA6B;IAC5C,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qDAAqD;AACrD,MAAM,WAAW,6BAA6B;IAC5C,wDAAwD;IACxD,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,+FAA+F;IAC/F,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2CAA2C;AAC3C,MAAM,WAAW,4BAA4B;IAC3C,6FAA6F;IAC7F,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sGAAsG;IACtG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA4BpE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ConfirmationPopupVariant } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
/** Color overrides for `ConfirmationFooter`. */
|
|
4
|
+
export interface ConfirmationFooterColors {
|
|
5
|
+
/** Top border color of the action row. Defaults to `--stroke-tertiary`. */
|
|
6
|
+
border?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Style overrides for `ConfirmationFooter`. */
|
|
9
|
+
export interface ConfirmationFooterStyles {
|
|
10
|
+
/** Color overrides applied as CSS custom properties. */
|
|
11
|
+
colors?: ConfirmationFooterColors;
|
|
12
|
+
}
|
|
13
|
+
/** Props for `ConfirmationFooter`. */
|
|
14
|
+
export interface ConfirmationFooterProps {
|
|
15
|
+
/** Label of the confirming action button. */
|
|
16
|
+
confirmLabel: string;
|
|
17
|
+
/** Label of the cancel button. */
|
|
18
|
+
cancelLabel: string;
|
|
19
|
+
/** Palette of the confirm button; `Danger` also gives it a leading trash icon. Default: `ConfirmationPopupVariant.Info`. */
|
|
20
|
+
variant?: ConfirmationPopupVariant;
|
|
21
|
+
/** Whether the confirmed action is in flight. Default: `false`. */
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether confirming is not yet possible because the step's required input
|
|
25
|
+
* is unsatisfied — e.g. no published folder chosen yet. Kept separate from
|
|
26
|
+
* `isLoading`: a confirmation that cannot run yet and one already running are
|
|
27
|
+
* different states, and only `isLoading` disables cancel. Default: `false`.
|
|
28
|
+
*/
|
|
29
|
+
isConfirmDisabled?: boolean;
|
|
30
|
+
/** Status text announced to assistive tech while the action is in flight. */
|
|
31
|
+
loadingStatusLabel?: string;
|
|
32
|
+
/** Style overrides. */
|
|
33
|
+
styles?: ConfirmationFooterStyles;
|
|
34
|
+
/** Called when the user confirms. */
|
|
35
|
+
onConfirm: () => void;
|
|
36
|
+
/** Called when the user cancels. */
|
|
37
|
+
onCancel: () => void;
|
|
38
|
+
}
|
|
39
|
+
/** Action row pinned to the bottom of a confirmation step: a text Cancel and a variant-colored confirm button. */
|
|
40
|
+
export declare const ConfirmationFooter: FC<ConfirmationFooterProps>;
|
|
41
|
+
//# sourceMappingURL=ConfirmationFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationFooter.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAOzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAK3B,gDAAgD;AAChD,MAAM,WAAW,wBAAwB;IACvC,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gDAAgD;AAChD,MAAM,WAAW,wBAAwB;IACvC,wDAAwD;IACxD,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,4HAA4H;IAC5H,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,qCAAqC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,kHAAkH;AAClH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAgE1D,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ConfirmationPopupVariant } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
import { EntityHeaderItem } from '../../models/entity';
|
|
4
|
+
/** Color overrides for `ConfirmationView`. */
|
|
5
|
+
export interface ConfirmationViewColors {
|
|
6
|
+
/** Body-copy text color. Defaults to `--text-primary`. */
|
|
7
|
+
messageText?: string;
|
|
8
|
+
/** Consequence-bullet text color. Defaults to `--text-secondary`. */
|
|
9
|
+
consequenceText?: string;
|
|
10
|
+
/** Identity-card surface in the `Info` variant. Defaults to `--bg-info`. */
|
|
11
|
+
cardBackground?: string;
|
|
12
|
+
/** Identity-card surface in the `Danger` variant. Defaults to `--bg-control-error-alpha-active`. */
|
|
13
|
+
cardDangerBackground?: string;
|
|
14
|
+
/** Identity-card border in the `Danger` variant. Defaults to `--stroke-error-alpha`. */
|
|
15
|
+
cardDangerBorder?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Style overrides for `ConfirmationView`. */
|
|
18
|
+
export interface ConfirmationViewStyles {
|
|
19
|
+
/** Color overrides applied as CSS custom properties. */
|
|
20
|
+
colors?: ConfirmationViewColors;
|
|
21
|
+
}
|
|
22
|
+
/** Props for `ConfirmationView`. */
|
|
23
|
+
export interface ConfirmationViewProps {
|
|
24
|
+
/** Entity the confirmation is about, rendered as an identity card above the copy. Ignored when `identity` is set; with neither, no card is rendered. */
|
|
25
|
+
item?: EntityHeaderItem;
|
|
26
|
+
/**
|
|
27
|
+
* Identity card rendered in place of the default one, for a resource that is
|
|
28
|
+
* not an `EntityHeaderItem` — a scheduled task, say, which has no catalog
|
|
29
|
+
* entity type. Compose it from `ConfirmationIdentityCard` so the surface
|
|
30
|
+
* still matches `variant`.
|
|
31
|
+
*/
|
|
32
|
+
identity?: ReactNode;
|
|
33
|
+
/** Body copy explaining what confirming does. */
|
|
34
|
+
message: ReactNode;
|
|
35
|
+
/** Content rendered between the message and the consequence bullets, for example the list of items a bulk action affects. */
|
|
36
|
+
details?: ReactNode;
|
|
37
|
+
/** Consequences listed as bullets under the message. An empty or omitted list renders nothing. */
|
|
38
|
+
consequences?: string[];
|
|
39
|
+
/** Palette of the identity card. Default: `ConfirmationPopupVariant.Info`. */
|
|
40
|
+
variant?: ConfirmationPopupVariant;
|
|
41
|
+
/** Typography class applied to the message and the bullet list. Defaults to `'dial-small-text'`. */
|
|
42
|
+
messageClassName?: string;
|
|
43
|
+
/** Style overrides. */
|
|
44
|
+
styles?: ConfirmationViewStyles;
|
|
45
|
+
/**
|
|
46
|
+
* Optional interactive slot rendered after the consequence bullets, for a
|
|
47
|
+
* confirmation that needs an input before it can be confirmed — choosing
|
|
48
|
+
* which published folder to unpublish from, say. This component stays
|
|
49
|
+
* presentational: whoever passes the slot owns its state, and disabling the
|
|
50
|
+
* confirm button until the input is satisfied is the caller's job. A step
|
|
51
|
+
* that needs no input passes nothing.
|
|
52
|
+
*/
|
|
53
|
+
children?: ReactNode;
|
|
54
|
+
}
|
|
55
|
+
/** Body of an in-place confirmation step: the resource's identity card, the confirmation copy, and an optional consequence list. */
|
|
56
|
+
export declare const ConfirmationView: FC<ConfirmationViewProps>;
|
|
57
|
+
//# sourceMappingURL=ConfirmationView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC,wJAAwJ;IACxJ,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,oGAAoG;IACpG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oIAAoI;AACpI,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+DtD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementSize } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
export interface CopyButtonProps {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
isCopied: boolean;
|
|
7
|
+
copyLabel: string;
|
|
8
|
+
copiedLabel: string;
|
|
9
|
+
size?: ElementSize;
|
|
10
|
+
/** Accessible label for the button; falls back to `copyLabel` when omitted. */
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
iconSize?: number;
|
|
13
|
+
iconCopy?: ReactNode;
|
|
14
|
+
/** Renders the button in its disabled state and blocks clicks. Defaults to `false`. */
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const CopyIconButton: FC<CopyButtonProps>;
|
|
18
|
+
export declare const CopyButton: FC<CopyButtonProps>;
|
|
19
|
+
//# sourceMappingURL=CopyButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../../src/components/CopyButton/CopyButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uFAAuF;IACvF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AACD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CAuC9C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgC1C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PopupSize } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { DeleteConfirmationViewLabels, DeleteConfirmationViewProps } from '../DeleteConfirmationView/DeleteConfirmationView';
|
|
4
|
+
/** User-visible strings of `DeleteConfirmationDialog`. */
|
|
5
|
+
export interface DeleteConfirmationDialogLabels extends DeleteConfirmationViewLabels {
|
|
6
|
+
/** Label of the confirming action button. Defaults to `'Delete'`. */
|
|
7
|
+
confirm?: string;
|
|
8
|
+
/** Label of the cancel button. Defaults to `'Cancel'`. */
|
|
9
|
+
cancel?: string;
|
|
10
|
+
/** Status text announced while the deletion is in flight. Defaults to `'Deleting…'`. */
|
|
11
|
+
deleting?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Style overrides for `DeleteConfirmationDialog`. */
|
|
14
|
+
export interface DeleteConfirmationDialogStyles extends NonNullable<DeleteConfirmationViewProps['styles']> {
|
|
15
|
+
/** CSS class applied to the popup container. */
|
|
16
|
+
popupClassName?: string;
|
|
17
|
+
/** CSS class applied to the dialog title. */
|
|
18
|
+
titleClassName?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Props for `DeleteConfirmationDialog`. */
|
|
21
|
+
export interface DeleteConfirmationDialogProps extends Omit<DeleteConfirmationViewProps, 'labels' | 'styles'> {
|
|
22
|
+
/** Whether the dialog is open. */
|
|
23
|
+
open: boolean;
|
|
24
|
+
/** Dialog title. A string rather than a node, so the kit names the dialog with it. */
|
|
25
|
+
title: string;
|
|
26
|
+
/** Whether the delete request is in flight; blocks both actions and every dismissal route. Defaults to `false`. */
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
/** Width cap of the dialog. Defaults to `PopupSize.Sm`. */
|
|
29
|
+
size?: PopupSize;
|
|
30
|
+
/** User-visible strings. */
|
|
31
|
+
labels?: DeleteConfirmationDialogLabels;
|
|
32
|
+
/** Style overrides. */
|
|
33
|
+
styles?: DeleteConfirmationDialogStyles;
|
|
34
|
+
/** Called when the user confirms. */
|
|
35
|
+
onConfirm: () => void;
|
|
36
|
+
/** Called when the dialog is dismissed — Cancel, the close control, Escape, or an outside click. */
|
|
37
|
+
onClose: () => void;
|
|
38
|
+
}
|
|
39
|
+
/** Delete confirmation presented as a centered dialog, for one resource or a selection. */
|
|
40
|
+
export declare const DeleteConfirmationDialog: FC<DeleteConfirmationDialogProps>;
|
|
41
|
+
//# sourceMappingURL=DeleteConfirmationDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/components/DeleteConfirmationDialog/DeleteConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EACjC,MAAM,kDAAkD,CAAC;AAE1D,0DAA0D;AAC1D,MAAM,WAAW,8BAA+B,SAAQ,4BAA4B;IAClF,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,sDAAsD;AACtD,MAAM,WAAW,8BAA+B,SAAQ,WAAW,CACjE,2BAA2B,CAAC,QAAQ,CAAC,CACtC;IACC,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,4CAA4C;AAC5C,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CACzD,2BAA2B,EAC3B,QAAQ,GAAG,QAAQ,CACpB;IACC,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,mHAAmH;IACnH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,uBAAuB;IACvB,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,qCAAqC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,oGAAoG;IACpG,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,2FAA2F;AAC3F,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAmDtE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ConfirmationViewColors } from '../ConfirmationView/ConfirmationView';
|
|
3
|
+
/** Default cap on the names listed for a multi-item delete. */
|
|
4
|
+
export declare const DELETE_CONFIRMATION_MAX_LISTED_NAMES = 10;
|
|
5
|
+
/** User-visible strings of `DeleteConfirmationView`. */
|
|
6
|
+
export interface DeleteConfirmationViewLabels {
|
|
7
|
+
/** Last consequence bullet. Defaults to `'Cannot be undone'`. */
|
|
8
|
+
cannotBeUndone?: string;
|
|
9
|
+
/** Identity-card text for a multi-item delete. Defaults to `'{count} items'`. */
|
|
10
|
+
itemCount?: (count: number) => string;
|
|
11
|
+
/** Trailing list entry for names past `maxListedNames`. Defaults to `'… and {count} more'`. */
|
|
12
|
+
moreItems?: (count: number) => string;
|
|
13
|
+
}
|
|
14
|
+
/** Color overrides for `DeleteConfirmationView`. */
|
|
15
|
+
export interface DeleteConfirmationViewColors extends ConfirmationViewColors {
|
|
16
|
+
/** Type label above the name. Defaults to `--text-secondary`. */
|
|
17
|
+
typeLabelText?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Style overrides for `DeleteConfirmationView`. */
|
|
20
|
+
export interface DeleteConfirmationViewStyles {
|
|
21
|
+
/** Typography class applied to the message, the name list, and the bullets. Defaults to `'dial-small-text'`. */
|
|
22
|
+
messageClassName?: string;
|
|
23
|
+
/** Color overrides applied as CSS custom properties. */
|
|
24
|
+
colors?: DeleteConfirmationViewColors;
|
|
25
|
+
}
|
|
26
|
+
/** Props for `DeleteConfirmationView`. */
|
|
27
|
+
export interface DeleteConfirmationViewProps {
|
|
28
|
+
/** Names of the resources about to be deleted. One name is shown in the identity card; several are counted there and listed under the message. */
|
|
29
|
+
names: string[];
|
|
30
|
+
/** Icon shown in the identity card ahead of a single name. Supplied by the host, which owns the glyph set. */
|
|
31
|
+
icon?: ReactNode;
|
|
32
|
+
/** Resource type shown above a single name. Pass it in sentence case — the label uppercases itself. */
|
|
33
|
+
typeLabel?: string;
|
|
34
|
+
/** Warning sentence, composed by the host so it can emphasise the name. */
|
|
35
|
+
message: ReactNode;
|
|
36
|
+
/** Consequences listed before the final "cannot be undone" bullet. */
|
|
37
|
+
consequences?: string[];
|
|
38
|
+
/** Maximum number of names listed for a multi-item delete. Defaults to `DELETE_CONFIRMATION_MAX_LISTED_NAMES` (10). */
|
|
39
|
+
maxListedNames?: number;
|
|
40
|
+
/** User-visible strings. */
|
|
41
|
+
labels?: DeleteConfirmationViewLabels;
|
|
42
|
+
/** Style overrides. */
|
|
43
|
+
styles?: DeleteConfirmationViewStyles;
|
|
44
|
+
/** Content rendered after the consequence bullets, for example an inline error. */
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
/** Body of a delete confirmation: the identity card, the warning, the affected names, and the consequences. */
|
|
48
|
+
export declare const DeleteConfirmationView: FC<DeleteConfirmationViewProps>;
|
|
49
|
+
//# sourceMappingURL=DeleteConfirmationView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/DeleteConfirmationView/DeleteConfirmationView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,sCAAsC,CAAC;AAI9C,+DAA+D;AAC/D,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD,wDAAwD;AACxD,MAAM,WAAW,4BAA4B;IAC3C,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,+FAA+F;IAC/F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC;AAED,oDAAoD;AACpD,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oDAAoD;AACpD,MAAM,WAAW,4BAA4B;IAC3C,gHAAgH;IAChH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,MAAM,CAAC,EAAE,4BAA4B,CAAC;CACvC;AAED,0CAA0C;AAC1C,MAAM,WAAW,2BAA2B;IAC1C,kJAAkJ;IAClJ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8GAA8G;IAC9G,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uGAAuG;IACvG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,OAAO,EAAE,SAAS,CAAC;IACnB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,uHAAuH;IACvH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,uBAAuB;IACvB,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,+GAA+G;AAC/G,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAgElE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** CSS custom-property overrides for the `DeploymentIcon` component. */
|
|
3
|
+
export interface DeploymentIconColors {
|
|
4
|
+
/** Badge background color. */
|
|
5
|
+
background?: string;
|
|
6
|
+
}
|
|
7
|
+
/** User-visible strings for `DeploymentIcon`. */
|
|
8
|
+
export interface DeploymentIconLabels {
|
|
9
|
+
/** When provided, a tooltip with this text is shown on hover/focus. */
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Style overrides for `DeploymentIcon`. */
|
|
13
|
+
export interface DeploymentIconStyles {
|
|
14
|
+
/** Color overrides applied as CSS custom properties. */
|
|
15
|
+
colors?: DeploymentIconColors;
|
|
16
|
+
/** Extra class applied to the outer badge wrapper, e.g. for a custom background variable. */
|
|
17
|
+
badgeClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Props for `DeploymentIcon`. */
|
|
20
|
+
export interface DeploymentIconProps {
|
|
21
|
+
/** Image URL to display. When absent the fallback is shown directly. */
|
|
22
|
+
src?: string;
|
|
23
|
+
/** Outer badge dimension in pixels. */
|
|
24
|
+
size: number;
|
|
25
|
+
/** Display name used to generate initials when no image is available. */
|
|
26
|
+
initialsName: string;
|
|
27
|
+
/** Custom node rendered when `src` is absent or the image fails to load. Overrides `initialsName`. */
|
|
28
|
+
fallback?: ReactNode;
|
|
29
|
+
/** User-visible strings. */
|
|
30
|
+
labels?: DeploymentIconLabels;
|
|
31
|
+
/** Style overrides. */
|
|
32
|
+
styles?: DeploymentIconStyles;
|
|
33
|
+
}
|
|
34
|
+
/** Renders a deployment icon inside a rounded badge, falling back to initials or a custom node when no image is available. */
|
|
35
|
+
export declare const DeploymentIcon: FC<DeploymentIconProps>;
|
|
36
|
+
//# sourceMappingURL=DeploymentIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeploymentIcon.d.ts","sourceRoot":"","sources":["../../../src/components/DeploymentIcon/DeploymentIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAM7E,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,6FAA6F;IAC7F,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,uBAAuB;IACvB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,8HAA8H;AAC9H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8FlD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
import { EntityHeaderItem } from '../../models/entity';
|
|
3
|
+
/** Props for EntityHeader. */
|
|
4
|
+
export interface EntityHeaderProps {
|
|
5
|
+
/** The entity to display. */
|
|
6
|
+
item: EntityHeaderItem;
|
|
7
|
+
/** Typography CSS class for the item name. Falls back to `ItemHeader`'s own default when omitted. */
|
|
8
|
+
nameClassName?: string;
|
|
9
|
+
/** CSS class for the entity type label. Default: 'dial-caption-lead-semi-text'. */
|
|
10
|
+
typeClassName?: string;
|
|
11
|
+
/** Visible type text, e.g. a translated type name. Default: the raw `item.type` value. */
|
|
12
|
+
typeLabel?: string;
|
|
13
|
+
/** CSS class applied to the icon badge, e.g. to set border-radius. Default: 'rounded-[14px]'. */
|
|
14
|
+
iconBadgeClassName?: string;
|
|
15
|
+
/** Typography CSS class for the version text. Falls back to `ItemHeader`'s own default when omitted. */
|
|
16
|
+
versionClassName?: string;
|
|
17
|
+
/** Whether to show `item.version` next to the title. Default: true. */
|
|
18
|
+
showVersion?: boolean;
|
|
19
|
+
/** Label for the featured tag shown when item.isFeatured is true. Default: 'Featured'. */
|
|
20
|
+
featuredLabel?: string;
|
|
21
|
+
/** Whether to render the featured tag. Default: true. */
|
|
22
|
+
hasFeaturedTag?: boolean;
|
|
23
|
+
/** Size of the deployment icon. Default: 48. */
|
|
24
|
+
iconSize?: number;
|
|
25
|
+
/** Search query string; when provided, matching text in the title is highlighted. */
|
|
26
|
+
query?: string;
|
|
27
|
+
/** Content pinned to the bottom of the text column via `mt-auto`, aligning its baseline with the avatar bottom. When provided, the column stretches to fill the icon height exactly. */
|
|
28
|
+
footer?: ReactNode;
|
|
29
|
+
/** CSS class for the featured chip. */
|
|
30
|
+
featuredChipClassName?: string;
|
|
31
|
+
/** Style override for the featured chip, merged over its default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
|
|
32
|
+
featuredChipStyle?: CSSProperties;
|
|
33
|
+
/** Arbitrary badge rendered before the featured chip, in the same top-end corner. Omitted (the default) renders nothing in that slot. */
|
|
34
|
+
statusBadge?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/** Reusable entity identity block: deployment icon, type label, name, version, and optional featured chip. */
|
|
37
|
+
export declare const EntityHeader: FC<EntityHeaderProps>;
|
|
38
|
+
//# sourceMappingURL=EntityHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityHeader.d.ts","sourceRoot":"","sources":["../../../src/components/EntityHeader/EntityHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO5D,8BAA8B;AAC9B,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,qGAAqG;IACrG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wLAAwL;IACxL,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uIAAuI;IACvI,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,yIAAyI;IACzI,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,8GAA8G;AAC9G,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+D9C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CatalogEntityType } from '../../types/entity-type';
|
|
3
|
+
/** Props for EntityTypeLabel. */
|
|
4
|
+
export interface EntityTypeLabelProps {
|
|
5
|
+
/** Entity category — resolves the label's color via ENTITY_TYPE_COLOR. */
|
|
6
|
+
type: CatalogEntityType;
|
|
7
|
+
/** CSS class for the label text. Default: 'dial-caption-lead-semi-text'. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Visible text, e.g. a translated type name. Default: the raw `type` value (`'MODEL'`, `'TOOLSET'`, …). */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Entity type label rendered as plain uppercase text — no pill, no background.
|
|
14
|
+
* Shared by the card grid (via AppIdentity) and the list view, so both
|
|
15
|
+
* densities of the catalog use the same type treatment.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EntityTypeLabel: FC<EntityTypeLabelProps>;
|
|
18
|
+
//# sourceMappingURL=EntityTypeLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityTypeLabel.d.ts","sourceRoot":"","sources":["../../../src/components/EntityTypeLabel/EntityTypeLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,iCAAiC;AACjC,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,IAAI,EAAE,iBAAiB,CAAC;IACxB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAQpD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { CatalogEntityType } from '../../types/entity-type';
|
|
3
|
+
/** Props for `FeaturedChip`. */
|
|
4
|
+
export interface FeaturedChipProps {
|
|
5
|
+
/** Label text shown inside the chip. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Typography class for the label. Defaults to the kit badge's `'dial-caption-lead-semi-text'`. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Entity category — picks the chip's default colours. */
|
|
10
|
+
type: CatalogEntityType;
|
|
11
|
+
/** Style overrides merged over the chip's default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/** Featured badge rendered on a catalog card when `item.isFeatured` is true. */
|
|
15
|
+
export declare const FeaturedChip: FC<FeaturedChipProps>;
|
|
16
|
+
//# sourceMappingURL=FeaturedChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeaturedChip.d.ts","sourceRoot":"","sources":["../../../src/components/FeaturedChip/FeaturedChip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,mGAAmG;IACnG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,IAAI,EAAE,iBAAiB,CAAC;IACxB,wHAAwH;IACxH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,gFAAgF;AAChF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAe9C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for `InitialsAvatar`. */
|
|
3
|
+
export interface InitialsAvatarProps {
|
|
4
|
+
/** Display name from which initials are derived. Empty string renders `"?"`. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Badge width and height in pixels. */
|
|
7
|
+
size: number;
|
|
8
|
+
/** Extra classes applied to the root element (e.g. `'shrink-0'`). */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Type-scale class for the initials. Defaults to none: the initials are semibold at 40% of `size`. */
|
|
11
|
+
textClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A square badge showing 1–2 initials derived from `name` on a deterministic colour background. */
|
|
14
|
+
export declare const InitialsAvatar: FC<InitialsAvatarProps>;
|
|
15
|
+
//# sourceMappingURL=InitialsAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitialsAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/InitialsAvatar/InitialsAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uGAAuG;IACvG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oGAAoG;AACpG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAclD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** CSS custom-property overrides for the `ItemHeader` component. */
|
|
3
|
+
export interface ItemHeaderColors {
|
|
4
|
+
/** Title text color. Defaults to `--text-primary`. */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Postfix text color. Defaults to `--text-secondary`. */
|
|
7
|
+
count?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Props for `ItemHeader`. */
|
|
10
|
+
export interface ItemHeaderProps {
|
|
11
|
+
/** Title text rendered in the heading element. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Secondary value rendered after the title, such as a version or an item count. */
|
|
14
|
+
postfix?: number | string;
|
|
15
|
+
/** CSS class applied to the title. Defaults to `'dial-h3-text'`. */
|
|
16
|
+
titleClassName?: string;
|
|
17
|
+
/** CSS class applied to the postfix. Defaults to `'dial-tiny-text'`. */
|
|
18
|
+
postfixClassName?: string;
|
|
19
|
+
/** CSS class applied to the header row. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Search query; when provided, the matching part of the title is highlighted. */
|
|
22
|
+
query?: string;
|
|
23
|
+
/** Optional content rendered at the trailing end of the header row. */
|
|
24
|
+
trailing?: ReactNode;
|
|
25
|
+
/** Color overrides applied as CSS custom properties. */
|
|
26
|
+
colors?: ItemHeaderColors;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the title shrinks and truncates with an ellipsis. When `false` the
|
|
29
|
+
* title keeps its full width and the rest of the row gives way instead.
|
|
30
|
+
* Defaults to `true`.
|
|
31
|
+
*/
|
|
32
|
+
shouldTruncateTitle?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Item title header with optional numeric or string postfix and trailing slot. */
|
|
35
|
+
export declare const ItemHeader: FC<ItemHeaderProps>;
|
|
36
|
+
//# sourceMappingURL=ItemHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ItemHeader/ItemHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtC,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8BAA8B;AAC9B,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,wDAAwD;IACxD,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,mFAAmF;AACnF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA0D1C,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { CodeBlockTheme } from '../../../types/code-editor';
|
|
3
|
+
/** CSS custom-property overrides for the `MarkdownCodeBlock` component. */
|
|
4
|
+
export interface MarkdownCodeBlockColors {
|
|
5
|
+
/** Container background color. */
|
|
6
|
+
background?: string;
|
|
7
|
+
/** Container/header border color. */
|
|
8
|
+
border?: string;
|
|
9
|
+
/** Header background color. */
|
|
10
|
+
headerBackground?: string;
|
|
11
|
+
/** Language label text color. */
|
|
12
|
+
language?: string;
|
|
13
|
+
/** Copy button icon color once copied. */
|
|
14
|
+
copied?: string;
|
|
15
|
+
/** Scrollbar thumb/track color. */
|
|
16
|
+
scrollbar?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Props for {@link MarkdownCodeBlock}. */
|
|
19
|
+
export interface MarkdownCodeBlockProps {
|
|
20
|
+
/** Detected language from the fenced code block. Empty string for language-less blocks. */
|
|
21
|
+
language: string;
|
|
22
|
+
/** Raw code value with trailing newline stripped. */
|
|
23
|
+
value: string;
|
|
24
|
+
/** When true, the copy button is hidden (streaming in progress). */
|
|
25
|
+
isStreaming?: boolean;
|
|
26
|
+
/** Color theme for syntax highlighting. Defaults to `'dark'`. */
|
|
27
|
+
theme?: CodeBlockTheme;
|
|
28
|
+
/** Accessible label for the copy button. Defaults to `'Copy code'`. */
|
|
29
|
+
copyLabel?: string;
|
|
30
|
+
/** Message announced through the block's `aria-live="polite"` region after a copy completes. The copy button's own accessible name stays `copyLabel`. Defaults to `'Copied!'`. */
|
|
31
|
+
copiedLabel?: string;
|
|
32
|
+
/** Accessible label for the download button. Defaults to `'Download code'`. */
|
|
33
|
+
downloadLabel?: string;
|
|
34
|
+
/** When true, hides the download button while still showing copy. Defaults to `false`. */
|
|
35
|
+
hideDownload?: boolean;
|
|
36
|
+
/** Extra classes applied to the outer container element. */
|
|
37
|
+
containerClassName?: string;
|
|
38
|
+
/** Extra classes applied to the sticky header bar. */
|
|
39
|
+
headerClassName?: string;
|
|
40
|
+
/** Typography class for the `<code>` element (used when no language is detected). Defaults to `'dial-code-text'`. */
|
|
41
|
+
codeClassName?: string;
|
|
42
|
+
/** CSS class applied to the language label in the header. Defaults to `'dial-tiny-lead-semi-text'` plus the module's `.languageLabel` class (`--text-secondary`). */
|
|
43
|
+
languageLabelClassName?: string;
|
|
44
|
+
/** Header text shown in place of `language`, for blocks whose highlighting id is not the name to display (e.g. `bash` highlighted, `cURL` shown). Defaults to the `language` value. */
|
|
45
|
+
title?: string;
|
|
46
|
+
/** Custom content rendered in the header in place of the plain label, e.g. a language/endpoint select. Defaults to the plain label text. */
|
|
47
|
+
titleSlot?: ReactNode;
|
|
48
|
+
/** Color overrides applied as CSS custom properties. */
|
|
49
|
+
colors?: MarkdownCodeBlockColors;
|
|
50
|
+
}
|
|
51
|
+
/** Renders a fenced or multi-line code block with syntax highlighting and a copy button. */
|
|
52
|
+
export declare const MarkdownCodeBlock: FC<MarkdownCodeBlockProps>;
|
|
53
|
+
//# sourceMappingURL=CodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAQ,KAAK,EAAE,EAAQ,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAW5D,2EAA2E;AAC3E,MAAM,WAAW,uBAAuB;IACtC,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iEAAiE;IACjE,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kLAAkL;IAClL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qHAAqH;IACrH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qKAAqK;IACrK,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uLAAuL;IACvL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4IAA4I;IAC5I,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,wDAAwD;IACxD,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC;AAiBD,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA0JxD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/** Style map consumed by `react-syntax-highlighter`'s `Prism` renderer. */
|
|
3
|
+
type PrismStyleMap = Record<string, CSSProperties>;
|
|
4
|
+
/** Prism syntax-highlighting style map used by {@link MarkdownCodeBlock}, restrained to design-system CSS variables. */
|
|
5
|
+
export declare const restrainedSyntaxTheme: PrismStyleMap;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=syntax-theme.d.ts.map
|