@epam/ai-dial-ui-kit 0.15.0-dev.7 → 0.15.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/README.md +56 -2
- package/dist/CHANGELOG.md +86 -0
- package/dist/DateCellRenderer-BdUMSg-E.cjs +1 -0
- package/dist/{DateCellRenderer-4iMidqal.cjs → DateCellRenderer-CZNa4jVJ.cjs} +30 -30
- package/dist/IconButton-DHOFapLo.cjs +1 -0
- package/dist/JsonEditor-Bxui5wJH.cjs +1 -0
- package/dist/{MarkdownEditor-C9-ZMRVi.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
- package/dist/MarkdownEditor-Bapd1ycU.cjs +1 -0
- package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
- package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
- package/dist/components/Button/constants.js +9 -8
- package/dist/components/Dropdown/Dropdown.js +2 -2
- package/dist/components/Dropdown/DropdownSubMenuItem.js +1 -1
- package/dist/components/Dropdown/constants.js +7 -7
- package/dist/components/DropdownIcon/DropdownIcon.js +4 -4
- package/dist/components/FileManager/FileManager.js +373 -372
- package/dist/components/FileManager/FileManagerProvider.js +266 -264
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
- package/dist/components/MarkdownEditor/MarkdownEditor.js +23 -21
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +27 -27
- package/dist/components/New/Accordion/Accordion.js +86 -72
- package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +214 -0
- package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
- package/dist/components/New/Avatar/Avatar.js +70 -0
- package/dist/components/New/Badge/Badge.js +45 -0
- package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
- package/dist/components/New/Breadcrumbs/constants.js +41 -0
- package/dist/components/New/Button/Button.js +32 -32
- package/dist/components/New/Button/ButtonWrappers.js +103 -37
- package/dist/components/New/Button/constants.js +3 -0
- package/dist/components/New/Button/utils.js +18 -8
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +27 -18
- package/dist/components/New/Calendar/Calendar.js +6 -6
- package/dist/components/New/Calendar/constants.js +5 -5
- package/dist/components/New/CaptionText/CaptionText.js +3 -3
- package/dist/components/New/CardShell/CardShell.js +2 -2
- package/dist/components/New/Checkbox/Checkbox.js +2 -2
- package/dist/components/New/Checkbox/CheckboxBox.js +2 -2
- package/dist/components/New/CloseButton/CloseButton.js +1 -1
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +2 -2
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +21 -25
- package/dist/components/New/ConfirmationPopup/constants.js +8 -11
- package/dist/components/New/Dropdown/Dropdown.js +99 -98
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
- package/dist/components/New/Dropdown/constants.js +22 -17
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +2 -2
- package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +2 -2
- package/dist/components/New/FileIcon/FileIcon.js +55 -0
- package/dist/components/New/FileIcon/constants.js +134 -0
- package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
- package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
- package/dist/components/New/FileName/FileName.js +78 -0
- package/dist/components/New/FilterChips/FilterChips.js +43 -0
- package/dist/components/New/FilterChips/constants.js +5 -0
- package/dist/components/New/FolderName/FolderName.js +16 -0
- package/dist/components/New/FolderPath/FolderPath.js +1 -1
- package/dist/components/New/Grid/constants.js +14 -5
- package/dist/components/New/Highlight/Highlight.js +2 -2
- package/dist/components/New/IconButton/IconButton.js +30 -28
- package/dist/components/New/InfoButton/InfoButton.js +2 -2
- package/dist/components/New/InlineSelect/InlineSelect.js +75 -59
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +70 -66
- package/dist/components/New/InteractiveTooltip/constants.js +2 -2
- package/dist/components/New/Label/Label.js +2 -2
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
- package/dist/components/New/MenuItem/MenuItem.js +2 -2
- package/dist/components/New/MenuItem/constants.js +1 -1
- package/dist/components/New/NoDataContent/NoDataContent.js +2 -2
- package/dist/components/New/Notification/Notification.js +37 -35
- package/dist/components/New/NumberInput/NumberInput.js +2 -2
- package/dist/components/New/PasswordInput/PasswordInput.js +2 -2
- package/dist/components/New/Popup/Popup.js +59 -57
- package/dist/components/New/Popup/constants.js +3 -3
- package/dist/components/New/Radio/Radio.js +2 -2
- package/dist/components/New/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +2 -2
- package/dist/components/New/ResizableContainer/ResizableContainer.js +2 -2
- package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
- package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
- package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
- package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
- package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
- package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
- package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
- package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
- package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
- package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
- package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
- package/dist/components/New/SchemaRenderer/context.js +17 -0
- package/dist/components/New/Search/Search.js +2 -2
- package/dist/components/New/SegmentedControl/SegmentedControl.js +4 -4
- package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
- package/dist/components/New/Select/MultiSelectTags.js +18 -15
- package/dist/components/New/Select/Select.js +184 -173
- package/dist/components/New/Select/constants.js +23 -20
- package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
- package/dist/components/New/Slider/Slider.js +184 -91
- package/dist/components/New/Slider/utils.js +20 -0
- package/dist/components/New/Switch/Switch.js +2 -2
- package/dist/components/New/Tabs/Tabs.js +124 -66
- package/dist/components/New/Tag/Tag.js +2 -2
- package/dist/components/New/TagInput/TagInput.js +5 -3
- package/dist/components/New/Textarea/Textarea.js +21 -20
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +2 -2
- package/dist/components/New/Tooltip/TooltipContent.js +2 -2
- package/dist/components/New/Tooltip/constants.js +1 -1
- package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
- package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
- package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
- package/dist/components/New/TransferQueue/constants.js +24 -0
- package/dist/components/New/constants/overlay.js +17 -9
- package/dist/components/Popup/constants.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.js +6 -6
- package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Tooltip/TooltipContent.js +11 -11
- package/dist/components-manifest.json +1873 -78
- package/dist/constants/public-class-names.js +69 -3
- package/dist/constants/schema-renderer.js +33 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +358 -310
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +2 -2
- package/dist/lazy-_W6FYhKg.cjs +1 -0
- package/dist/merge-classes-BEJXjzkx.cjs +1 -0
- package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
- package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
- package/dist/migration-guides/README.md +2 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
- package/dist/src/components/FileManager/FileManager.d.ts +2 -0
- package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
- package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +108 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
- package/dist/src/components/New/Badge/Badge.d.ts +47 -0
- package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
- package/dist/src/components/New/Button/Button.d.ts +4 -1
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +21 -0
- package/dist/src/components/New/Button/utils.d.ts +15 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
- package/dist/src/components/New/Calendar/constants.d.ts +1 -1
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
- package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
- package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
- package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
- package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
- package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
- package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
- package/dist/src/components/New/FileName/FileName.d.ts +79 -0
- package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
- package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
- package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
- package/dist/src/components/New/Grid/constants.d.ts +6 -4
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
- package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +13 -2
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
- package/dist/src/components/New/Notification/Notification.d.ts +18 -0
- package/dist/src/components/New/Popup/Popup.d.ts +8 -1
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
- package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
- package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
- package/dist/src/components/New/Select/Select.d.ts +9 -0
- package/dist/src/components/New/Select/constants.d.ts +3 -2
- package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
- package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
- package/dist/src/components/New/Slider/Slider.d.ts +29 -1
- package/dist/src/components/New/Slider/utils.d.ts +14 -0
- package/dist/src/components/New/Slider/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
- package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
- package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
- package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
- package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
- package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
- package/dist/src/components/New/constants/overlay.d.ts +13 -0
- package/dist/src/components/Popup/constants.d.ts +1 -1
- package/dist/src/components/SchemaRenderer/types.d.ts +5 -82
- package/dist/src/components/SchemaRenderer/utils.d.ts +1 -13
- package/dist/src/constants/public-class-names.d.ts +69 -3
- package/dist/src/constants/schema-renderer.d.ts +2 -0
- package/dist/src/index.d.ts +39 -3
- package/dist/src/models/json-schema.d.ts +71 -0
- package/dist/src/types/accordion.d.ts +7 -0
- package/dist/src/types/avatar.d.ts +7 -0
- package/dist/src/types/badge.d.ts +16 -0
- package/dist/src/types/breadcrumbs.d.ts +9 -0
- package/dist/src/types/button.d.ts +1 -0
- package/dist/src/types/entity-type.d.ts +9 -0
- package/dist/src/types/json-schema.d.ts +22 -0
- package/dist/src/types/tooltip.d.ts +4 -0
- package/dist/src/types/transfer-queue.d.ts +10 -0
- package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
- package/dist/src/utils/avatar.d.ts +12 -0
- package/dist/src/utils/json-schema.d.ts +23 -0
- package/dist/src/utils/sub-menu-floating.d.ts +7 -4
- package/dist/types/accordion.js +4 -0
- package/dist/types/avatar.js +4 -0
- package/dist/types/badge.js +5 -0
- package/dist/types/breadcrumbs.js +4 -0
- package/dist/types/button.js +3 -3
- package/dist/types/entity-type.js +4 -0
- package/dist/types/json-schema.js +7 -0
- package/dist/types/tooltip.js +3 -2
- package/dist/types/transfer-queue.js +4 -0
- package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
- package/dist/utils/avatar.js +22 -0
- package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +122 -95
- package/dist/utils/merge-classes.js +12 -5
- package/dist/utils/sub-menu-floating.js +99 -54
- package/package.json +4 -9
- package/dist/DateCellRenderer-CTTAnQjB.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.cjs +0 -1
- package/dist/JsonEditor-D2jSlRFi.cjs +0 -1
- package/dist/MarkdownEditor-BzEbdj7R.cjs +0 -1
- package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +0 -1
- package/dist/components/SchemaRenderer/types.js +0 -27
- package/dist/editor-_174x-qy.cjs +0 -1
- package/dist/lazy-DM-7dL0Y.cjs +0 -1
- package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
- package/dist/use-file-manager-tabs-DKmWaOlC.cjs +0 -3
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
/** Props for `SideDrawer`. */
|
|
3
|
+
export interface SideDrawerProps {
|
|
4
|
+
/** Whether the drawer is open. */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Called when the drawer asks to close: the close button, Escape, or a press on the backdrop. */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** Header title. A string also names the dialog; a node needs `ariaLabel`. */
|
|
9
|
+
header?: ReactNode;
|
|
10
|
+
/** Accessible name of the drawer when `header` is not a string. */
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
/** Controls placed in the header between the title and the close button. */
|
|
13
|
+
headerActions?: ReactNode;
|
|
14
|
+
/** Shows a back button at the start of the header when set. */
|
|
15
|
+
onBack?: () => void;
|
|
16
|
+
/** Accessible name of the back button. */
|
|
17
|
+
backAriaLabel?: string;
|
|
18
|
+
/** Whether the back button is disabled. */
|
|
19
|
+
backDisabled?: boolean;
|
|
20
|
+
/** Accessible name of the close button. */
|
|
21
|
+
closeAriaLabel?: string;
|
|
22
|
+
/** Whether the close button is disabled, e.g. while a submission is in flight. */
|
|
23
|
+
closeDisabled?: boolean;
|
|
24
|
+
/** Whether the header's close button is left out. */
|
|
25
|
+
hideClose?: boolean;
|
|
26
|
+
/** Whether a press on the backdrop closes the drawer. */
|
|
27
|
+
closeOnOutsideClick?: boolean;
|
|
28
|
+
/** Content of the drawer, scrolled when it is taller than the viewport. */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/** Additional CSS classes for the drawer panel, e.g. a different desktop width. */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Additional CSS classes for the backdrop. */
|
|
33
|
+
overlayClassName?: string;
|
|
34
|
+
/** Additional CSS classes for the header row. */
|
|
35
|
+
headerClassName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Inline style for the panel. It renders in a portal, so this is how custom
|
|
38
|
+
* properties reach the panel and its content.
|
|
39
|
+
*/
|
|
40
|
+
style?: CSSProperties;
|
|
41
|
+
/** Inline style for the backdrop, merged after its own positioning. */
|
|
42
|
+
overlayStyle?: CSSProperties;
|
|
43
|
+
/** Additional CSS classes for the scrolling body. */
|
|
44
|
+
bodyClassName?: string;
|
|
45
|
+
/** Type-scale class for a string title, replacing its own. */
|
|
46
|
+
titleClassName?: string;
|
|
47
|
+
/** Id of the element to portal into, instead of the end of `<body>`. */
|
|
48
|
+
portalId?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A full-height panel that slides in from the inline end over a dimmed page.
|
|
52
|
+
* aliases: Drawer|SidePanel|SideSheet|DetailsPanel
|
|
53
|
+
* Design system 2.0
|
|
54
|
+
*
|
|
55
|
+
* It is a modal dialog while open: focus moves to the panel and stays inside,
|
|
56
|
+
* returns to where it came from on close, and the page behind it does not
|
|
57
|
+
* scroll. Escape, the close button and a press on the backdrop all call
|
|
58
|
+
* `onClose`; the drawer stays controlled by `open`.
|
|
59
|
+
*
|
|
60
|
+
* The panel stays mounted while closed, so it can slide out as well as in and
|
|
61
|
+
* keep the state of whatever it holds. Closed, it is `inert` — out of both
|
|
62
|
+
* the tab order and the accessibility tree — and the backdrop lets pointer
|
|
63
|
+
* events through. On desktop the drawer is 540px wide with a rounded,
|
|
64
|
+
* bordered leading edge; on mobile it takes the full width. It slides from
|
|
65
|
+
* the end in either direction, and not at all under `prefers-reduced-motion`.
|
|
66
|
+
*
|
|
67
|
+
* The header follows `Popup`: an optional back button, the title,
|
|
68
|
+
* `headerActions`, and the close button. A string `header` renders an `<h2>`
|
|
69
|
+
* that names the dialog; for a node, pass `ariaLabel`.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```tsx
|
|
73
|
+
* <SideDrawer open={isOpen} header="Publish" onClose={() => setIsOpen(false)}>
|
|
74
|
+
* <PublishForm />
|
|
75
|
+
* </SideDrawer>
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @param open - Whether the drawer is open
|
|
79
|
+
* @param onClose - Called when the drawer asks to close
|
|
80
|
+
* @param [header] - Header title; a string also names the dialog
|
|
81
|
+
* @param [ariaLabel] - Accessible name when `header` is not a string
|
|
82
|
+
* @param [headerActions] - Controls between the title and the close button
|
|
83
|
+
* @param [onBack] - Shows a back button at the start of the header
|
|
84
|
+
* @param [backAriaLabel='Back'] - Accessible name of the back button
|
|
85
|
+
* @param [backDisabled=false] - Whether the back button is disabled
|
|
86
|
+
* @param [closeAriaLabel='Close'] - Accessible name of the close button
|
|
87
|
+
* @param [closeDisabled=false] - Whether the close button is disabled
|
|
88
|
+
* @param [hideClose=false] - Whether the close button is left out
|
|
89
|
+
* @param [closeOnOutsideClick=true] - Whether a press on the backdrop closes the drawer
|
|
90
|
+
* @param [children] - Content of the drawer
|
|
91
|
+
* @param [className] - Additional CSS classes for the drawer panel
|
|
92
|
+
* @param [overlayClassName] - Additional CSS classes for the backdrop
|
|
93
|
+
* @param [headerClassName] - Additional CSS classes for the header row
|
|
94
|
+
* @param [style] - Inline style for the panel, e.g. custom properties
|
|
95
|
+
* @param [overlayStyle] - Inline style for the backdrop
|
|
96
|
+
* @param [bodyClassName] - Additional CSS classes for the scrolling body
|
|
97
|
+
* @param [titleClassName] - Type-scale class for a string title
|
|
98
|
+
* @param [portalId] - Id of the element to portal into
|
|
99
|
+
*/
|
|
100
|
+
export declare const SideDrawer: FC<SideDrawerProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, InputHTMLAttributes } from 'react';
|
|
1
|
+
import { FC, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { LabelProps } from '../Label/Label';
|
|
3
3
|
type NativeInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue' | 'onChange' | 'size'>;
|
|
4
4
|
export interface SliderProps extends NativeInputProps {
|
|
@@ -14,6 +14,21 @@ export interface SliderProps extends NativeInputProps {
|
|
|
14
14
|
formatValue?: (value: number) => string;
|
|
15
15
|
/** Renders the current value at the end of the label row */
|
|
16
16
|
showValue?: boolean;
|
|
17
|
+
/** Renders the current value in a bubble above the thumb */
|
|
18
|
+
showTooltip?: boolean;
|
|
19
|
+
/** Renders a tick mark at every value the thumb can snap to */
|
|
20
|
+
showTicks?: boolean;
|
|
21
|
+
/** Content before the track, e.g. an icon */
|
|
22
|
+
leftContent?: ReactNode;
|
|
23
|
+
/** Content after the track, e.g. a `NumberInput` or the formatted value */
|
|
24
|
+
rightContent?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Renders a compact, 24px `NumberInput` after the track, synced with the slider:
|
|
27
|
+
* typing clamps to `min`/`max` and snaps to `step`. Takes the place of `rightContent`.
|
|
28
|
+
*/
|
|
29
|
+
showValueInput?: boolean;
|
|
30
|
+
/** Accessible name of the value input; defaults to a string `labelProps.label` */
|
|
31
|
+
valueInputAriaLabel?: string;
|
|
17
32
|
caption?: string;
|
|
18
33
|
error?: string;
|
|
19
34
|
onChange?: (value: number) => void;
|
|
@@ -39,6 +54,13 @@ export interface SliderProps extends NativeInputProps {
|
|
|
39
54
|
* />
|
|
40
55
|
* ```
|
|
41
56
|
*
|
|
57
|
+
* With `showTooltip` the value sits in a bubble above the thumb, and with
|
|
58
|
+
* `showTicks` the track marks every value the thumb snaps to — the discrete
|
|
59
|
+
* slider of the design. `leftContent` and `rightContent` are the container's
|
|
60
|
+
* side slots, centred on the track: an icon on the left, a `NumberInput` or the
|
|
61
|
+
* formatted value on the right. The kit does not wire a `NumberInput` to the
|
|
62
|
+
* slider; the caller passes both the same `value` and `onChange`.
|
|
63
|
+
*
|
|
42
64
|
* Built on a native `<input type="range">`, so the browser owns the drag, the
|
|
43
65
|
* arrow / Home / End steps, touch and the writing direction. Only the thumb is
|
|
44
66
|
* restyled; the track and its fill are separate elements so the fill can be
|
|
@@ -58,6 +80,12 @@ export interface SliderProps extends NativeInputProps {
|
|
|
58
80
|
* @param [labels] - 2 or 3 strings rendered below the track (start, [middle,] end)
|
|
59
81
|
* @param [formatValue] - Custom formatter for the displayed value; also becomes the announced `aria-valuetext`
|
|
60
82
|
* @param [showValue=false] - Renders the current value at the end of the label row
|
|
83
|
+
* @param [showTooltip=false] - Renders the current value in a bubble above the thumb; hidden while disabled
|
|
84
|
+
* @param [showTicks=false] - Renders a tick mark at every step on the unfilled track; hidden while disabled
|
|
85
|
+
* @param [leftContent] - Content before the track, vertically centred on it
|
|
86
|
+
* @param [rightContent] - Content after the track, vertically centred on it
|
|
87
|
+
* @param [showValueInput=false] - Renders a compact (24px), synced `NumberInput` after the track (clamped to `min`/`max`, snapped to `step`); replaces `rightContent`
|
|
88
|
+
* @param [valueInputAriaLabel] - Accessible name of the value input; defaults to a string `labelProps.label`
|
|
61
89
|
* @param [caption] - Helper text rendered below the track, and described by the slider
|
|
62
90
|
* @param [error] - Error message rendered below the track; replaces the caption
|
|
63
91
|
* @param [onChange] - Callback fired with the new value
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Percent positions of the ticks: one per step after `min`, so a 0–1 slider at
|
|
3
|
+
* 0.1 gets exactly 10. `min` itself has no tick — it is always under the thumb
|
|
4
|
+
* or the fill. A step that does not divide the range stops short of `max`, the
|
|
5
|
+
* way the native range input does.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getTickPercents: (range: number, step: number) => number[];
|
|
8
|
+
/** Number of decimals in a step, e.g. 2 for 0.05. */
|
|
9
|
+
export declare const getStepPrecision: (step: number) => number;
|
|
10
|
+
/**
|
|
11
|
+
* Clamps a typed value into `[min, max]` and snaps it to the nearest step, the
|
|
12
|
+
* same values the range thumb can take.
|
|
13
|
+
*/
|
|
14
|
+
export declare const snapToStep: (value: number, min: number, max: number, step: number) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TabOrientation } from '../../../types/tab';
|
|
2
3
|
/** A single tab entry rendered by {@link Tabs}. */
|
|
3
4
|
export interface TabItem {
|
|
4
5
|
/** Unique identifier used to match against `activeTabId`. */
|
|
@@ -7,6 +8,8 @@ export interface TabItem {
|
|
|
7
8
|
label: string;
|
|
8
9
|
/** Optional numeric badge rendered after the label. */
|
|
9
10
|
count?: number;
|
|
11
|
+
/** Decorative icon rendered before the label. The label names the tab, so the icon is hidden from assistive tech. */
|
|
12
|
+
icon?: ReactNode;
|
|
10
13
|
/** Renders the tab greyed out and unselectable, and skips it during keyboard navigation. */
|
|
11
14
|
disabled?: boolean;
|
|
12
15
|
}
|
|
@@ -17,19 +20,35 @@ export interface TabsProps {
|
|
|
17
20
|
activeTabId: string;
|
|
18
21
|
/** Fired with the tab's `id` when the user selects a tab. */
|
|
19
22
|
onTabChange: (tabId: string) => void;
|
|
23
|
+
/** Layout direction of the tab list. Uses the {@link TabOrientation} enum. Defaults to `TabOrientation.Horizontal`. */
|
|
24
|
+
orientation?: TabOrientation;
|
|
25
|
+
/**
|
|
26
|
+
* Already-translated heading rendered above the tabs, which also names the
|
|
27
|
+
* tab list. Omit to render no heading.
|
|
28
|
+
*/
|
|
29
|
+
sectionLabel?: string;
|
|
20
30
|
/**
|
|
21
31
|
* Accessible name for the tab list. A row of tabs carries no name of its own,
|
|
22
|
-
* so screen readers announce it as an unlabelled list without this
|
|
32
|
+
* so screen readers announce it as an unlabelled list without this — unless
|
|
33
|
+
* `sectionLabel` is naming it already.
|
|
23
34
|
*/
|
|
24
35
|
ariaLabel?: string;
|
|
25
|
-
/** Additional CSS classes for the
|
|
36
|
+
/** Additional CSS classes for the root element. */
|
|
26
37
|
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Additional CSS classes for the `role="tablist"`. `className` reaches it
|
|
40
|
+
* only when there is no `sectionLabel`, since the heading wrapper is then
|
|
41
|
+
* the root; this prop reaches it in either case.
|
|
42
|
+
*/
|
|
43
|
+
tabListClassName?: string;
|
|
27
44
|
/** Additional CSS classes applied to every tab. */
|
|
28
45
|
tabClassName?: string;
|
|
46
|
+
/** Additional CSS classes for the `sectionLabel` heading. */
|
|
47
|
+
sectionLabelClassName?: string;
|
|
29
48
|
}
|
|
30
49
|
/**
|
|
31
|
-
* A
|
|
32
|
-
* aliases: TabRow|TabNavigation|TabBar
|
|
50
|
+
* A row or rail of tabs, marking the active one and showing optional icons and count badges.
|
|
51
|
+
* aliases: TabRow|TabNavigation|TabBar|VerticalTabs|SettingsNav|SideNav
|
|
33
52
|
* Design system 2.0
|
|
34
53
|
*
|
|
35
54
|
* Follows the ARIA tabs pattern with automatic activation: only the active tab is
|
|
@@ -38,6 +57,16 @@ export interface TabsProps {
|
|
|
38
57
|
* Tabs marked `disabled` are greyed out, cannot be clicked, and are skipped by
|
|
39
58
|
* keyboard navigation.
|
|
40
59
|
*
|
|
60
|
+
* `TabOrientation.Horizontal` draws the default row: the active tab takes a
|
|
61
|
+
* gradient underline, and `ArrowLeft` / `ArrowRight` move along it.
|
|
62
|
+
* `TabOrientation.Vertical` draws the settings-page rail instead — full-width
|
|
63
|
+
* rows with the active one on a tinted pill rather than an underline, driven by
|
|
64
|
+
* `ArrowUp` / `ArrowDown`. The rail is the shape to reach for when the tabs
|
|
65
|
+
* label whole pages of a settings surface; the row, when they filter one.
|
|
66
|
+
*
|
|
67
|
+
* `className` lands on whichever element is outermost: the heading wrapper when
|
|
68
|
+
* `sectionLabel` is set, the `role="tablist"` itself when it is not.
|
|
69
|
+
*
|
|
41
70
|
* The component renders the tabs only; the panels stay with the consumer.
|
|
42
71
|
*
|
|
43
72
|
* @example
|
|
@@ -53,11 +82,30 @@ export interface TabsProps {
|
|
|
53
82
|
* />
|
|
54
83
|
* ```
|
|
55
84
|
*
|
|
85
|
+
* @example A settings rail, named by its own heading.
|
|
86
|
+
* ```tsx
|
|
87
|
+
* <Tabs
|
|
88
|
+
* orientation={TabOrientation.Vertical}
|
|
89
|
+
* sectionLabel={t('Settings')}
|
|
90
|
+
* className="w-[240px] shrink-0 border-e border-e-tertiary"
|
|
91
|
+
* tabs={[
|
|
92
|
+
* { id: 'preferences', label: t('Preferences'), icon: <IconSettings size={18} /> },
|
|
93
|
+
* { id: 'usage', label: t('Usage'), icon: <IconChartBar size={18} /> },
|
|
94
|
+
* ]}
|
|
95
|
+
* activeTabId={activeTabId}
|
|
96
|
+
* onTabChange={setActiveTabId}
|
|
97
|
+
* />
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
56
100
|
* @param tabs - Ordered list of tabs to render.
|
|
57
101
|
* @param activeTabId - ID of the currently selected tab.
|
|
58
102
|
* @param onTabChange - Fired with the tab's `id` when the user selects a tab.
|
|
103
|
+
* @param [orientation=TabOrientation.Horizontal] - Layout direction of the tab list.
|
|
104
|
+
* @param [sectionLabel] - Heading rendered above the tabs, which also names the tab list.
|
|
59
105
|
* @param [ariaLabel] - Accessible name for the tab list.
|
|
60
|
-
* @param [className] - Additional CSS classes for the
|
|
106
|
+
* @param [className] - Additional CSS classes for the root element.
|
|
107
|
+
* @param [tabListClassName] - Additional CSS classes for the `role="tablist"`.
|
|
61
108
|
* @param [tabClassName] - Additional CSS classes applied to every tab.
|
|
109
|
+
* @param [sectionLabelClassName] - Additional CSS classes for the `sectionLabel` heading.
|
|
62
110
|
*/
|
|
63
111
|
export declare const Tabs: FC<TabsProps>;
|
|
@@ -19,8 +19,10 @@ export declare const HOVER_OPEN_DELAY = 500;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const arrowClassName = "fill-control-inverted";
|
|
21
21
|
/**
|
|
22
|
-
* Tooltips sit
|
|
23
|
-
*
|
|
22
|
+
* Tooltips sit at the top of the overlay ladder (`z-tooltip`, see `zIndex` in
|
|
23
|
+
* `tailwind.config.js`) — above popups (`z-popup`), dropdowns and the calendar
|
|
24
|
+
* (`z-floating`) and interactive tooltips — since they can be triggered by a
|
|
25
|
+
* control inside any of them.
|
|
24
26
|
*
|
|
25
27
|
* `max-w-[376px]` is the cap the design puts on a tooltip: at `dial-small-text`
|
|
26
28
|
* that is around 60 characters a line, past which a line stops being
|
|
@@ -36,4 +38,4 @@ export declare const arrowClassName = "fill-control-inverted";
|
|
|
36
38
|
* nothing to see around a 7px triangle that the box's own shadow does not
|
|
37
39
|
* already carry.
|
|
38
40
|
*/
|
|
39
|
-
export declare const tooltipClassName = "z-
|
|
41
|
+
export declare const tooltipClassName = "z-tooltip max-w-[376px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted shadow-xs";
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TransferQueueItemStatus } from '../../../types/transfer-queue';
|
|
3
|
+
/** One file (or other named unit of work) tracked by a `TransferQueue`. */
|
|
4
|
+
export interface TransferQueueItem {
|
|
5
|
+
/** Stable identifier, passed back to `onCancelItem`. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Name shown on the row; a file's extension also picks its `FileIcon` glyph. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Current lifecycle status. */
|
|
10
|
+
status: TransferQueueItemStatus;
|
|
11
|
+
/**
|
|
12
|
+
* Completion as 0–100. Feeds only the aggregate bar shown while the queue
|
|
13
|
+
* is collapsed; a settled item without one counts as 100, a running one as 0.
|
|
14
|
+
*/
|
|
15
|
+
percent?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Why a `Failed` or `Warning` item ended as it did. Shown as the status
|
|
18
|
+
* icon's tooltip and used as its accessible name; falls back to
|
|
19
|
+
* `labels.failedMessage` / `labels.warningMessage`.
|
|
20
|
+
*/
|
|
21
|
+
message?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Every user-visible string of `TransferQueue`. */
|
|
24
|
+
export interface TransferQueueLabels {
|
|
25
|
+
/** Accessible name of an in-progress row's cancel control. */
|
|
26
|
+
cancelItemAriaLabel: (name: string) => string;
|
|
27
|
+
/** Accessible name of an in-progress row's spinner. */
|
|
28
|
+
itemProgressAriaLabel: (name: string) => string;
|
|
29
|
+
/** Accessible name of a succeeded row's check icon. */
|
|
30
|
+
successLabel: string;
|
|
31
|
+
/** Trailing text on a canceled row. */
|
|
32
|
+
canceledLabel: string;
|
|
33
|
+
/** Fallback reason for a failed item without its own `message`. */
|
|
34
|
+
failedMessage: string;
|
|
35
|
+
/** Fallback reason for a warned item without its own `message`. */
|
|
36
|
+
warningMessage: string;
|
|
37
|
+
/** Accessible name of the collapsed queue's aggregate progress bar. */
|
|
38
|
+
queueProgressAriaLabel: string;
|
|
39
|
+
/**
|
|
40
|
+
* The aggregate bar's `aria-valuetext`. Given settled and total counts
|
|
41
|
+
* rather than a percentage, because "3 of 10 files" reads better than "36%"
|
|
42
|
+
* when the work is a list of files.
|
|
43
|
+
*/
|
|
44
|
+
queueProgressValueText: (completed: number, total: number) => string;
|
|
45
|
+
/** Accessible name of the collapse toggle while expanded. */
|
|
46
|
+
collapseAriaLabel: string;
|
|
47
|
+
/** Accessible name of the expand toggle while collapsed. */
|
|
48
|
+
expandAriaLabel: string;
|
|
49
|
+
/** Accessible name of the close control. */
|
|
50
|
+
closeAriaLabel: string;
|
|
51
|
+
/** Heading of the close-confirmation dialog. */
|
|
52
|
+
closeConfirmHeader: string;
|
|
53
|
+
/** Confirmation description when an item is in progress and none failed. */
|
|
54
|
+
closeConfirmDescriptionInProgress: string;
|
|
55
|
+
/** Confirmation description when an item failed and none is in progress. */
|
|
56
|
+
closeConfirmDescriptionFailed: string;
|
|
57
|
+
/** Confirmation description when items are both in progress and failed. */
|
|
58
|
+
closeConfirmDescriptionMixed: string;
|
|
59
|
+
/** Confirm button of the close-confirmation dialog. */
|
|
60
|
+
closeConfirmLabel: string;
|
|
61
|
+
/** Cancel button of the close-confirmation dialog. */
|
|
62
|
+
closeCancelLabel: string;
|
|
63
|
+
}
|
|
64
|
+
/** Props for `TransferQueue`. */
|
|
65
|
+
export interface TransferQueueProps {
|
|
66
|
+
/**
|
|
67
|
+
* Heading, rendered verbatim. The host composes any count into it
|
|
68
|
+
* (e.g. "Importing 5 files"); the component never pluralizes.
|
|
69
|
+
*/
|
|
70
|
+
title: string;
|
|
71
|
+
/** Items to show, in display order. The queue renders nothing when empty. */
|
|
72
|
+
items: TransferQueueItem[];
|
|
73
|
+
/**
|
|
74
|
+
* Called when the queue should close — from the close control (after a
|
|
75
|
+
* confirmation while work is in progress or a failure is unread), or by
|
|
76
|
+
* itself once every item has succeeded.
|
|
77
|
+
*/
|
|
78
|
+
onClose: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* Called with an item's id when the user cancels it. The host aborts the
|
|
81
|
+
* work and keeps the item in `items` with status `Canceled`. Without it,
|
|
82
|
+
* in-progress rows show a spinner only.
|
|
83
|
+
*/
|
|
84
|
+
onCancelItem?: (id: string) => void;
|
|
85
|
+
/** Overrides for the English default strings. */
|
|
86
|
+
labels?: Partial<TransferQueueLabels>;
|
|
87
|
+
/**
|
|
88
|
+
* Milliseconds after every item succeeded before `onClose` is called by
|
|
89
|
+
* itself. Defaults to 8000; `0` or less disables it.
|
|
90
|
+
*/
|
|
91
|
+
autoCloseDelay?: number;
|
|
92
|
+
/** Additional CSS classes for the root panel. */
|
|
93
|
+
className?: string;
|
|
94
|
+
/** Additional CSS classes for the scrollable list of rows. */
|
|
95
|
+
bodyClassName?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A floating panel listing the files of an upload, download, import or export
|
|
99
|
+
* with a live status per row.
|
|
100
|
+
* aliases: UploadQueue|ImportQueue|ExportQueue|UploadProgress|ProgressToast
|
|
101
|
+
* Design system 2.0
|
|
102
|
+
*
|
|
103
|
+
* Each row shows the file's `FileIcon` and name, and a trailing status: a
|
|
104
|
+
* spinner (with a cancel control on hover or focus) while in progress, a check
|
|
105
|
+
* on success, a warning or error icon whose reason is both its tooltip and its
|
|
106
|
+
* accessible name, or "Canceled". The header carries the host's title, a count
|
|
107
|
+
* of failed items, and collapse and close controls. Collapsed while work runs,
|
|
108
|
+
* the rows are replaced by one aggregate `ProgressBar`.
|
|
109
|
+
*
|
|
110
|
+
* Closing while an item is in progress or has failed asks for confirmation
|
|
111
|
+
* first. Once every item has succeeded the queue closes itself after
|
|
112
|
+
* `autoCloseDelay`; a warned or canceled row keeps it open so it can be read.
|
|
113
|
+
*
|
|
114
|
+
* The root is a polite `role="status"` live region. Positioning is left to
|
|
115
|
+
* the host — wrap it in a fixed container at the screen corner.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```tsx
|
|
119
|
+
* <TransferQueue
|
|
120
|
+
* title="Importing 2 files"
|
|
121
|
+
* items={[
|
|
122
|
+
* { id: '1', name: 'report.pdf', status: TransferQueueItemStatus.Success },
|
|
123
|
+
* { id: '2', name: 'data.csv', status: TransferQueueItemStatus.InProgress, percent: 40 },
|
|
124
|
+
* ]}
|
|
125
|
+
* onClose={handleClose}
|
|
126
|
+
* onCancelItem={handleCancel}
|
|
127
|
+
* />
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @param title - Heading, rendered verbatim
|
|
131
|
+
* @param items - Items to show, in display order
|
|
132
|
+
* @param onClose - Called when the queue should close
|
|
133
|
+
* @param [onCancelItem] - Called with an item's id when the user cancels it
|
|
134
|
+
* @param [labels] - Overrides for the English default strings
|
|
135
|
+
* @param [autoCloseDelay=8000] - Delay before an all-succeeded queue closes itself; `0` disables
|
|
136
|
+
* @param [className] - Additional CSS classes for the root panel
|
|
137
|
+
* @param [bodyClassName] - Additional CSS classes for the list of rows
|
|
138
|
+
*/
|
|
139
|
+
export declare const TransferQueue: FC<TransferQueueProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TransferQueueLabels } from './TransferQueue';
|
|
3
|
+
interface TransferQueueHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
/** The badge renders only when this is positive. */
|
|
6
|
+
failedCount: number;
|
|
7
|
+
isCollapsed: boolean;
|
|
8
|
+
/** Id of the rows container the collapse toggle controls. */
|
|
9
|
+
itemsId: string;
|
|
10
|
+
labels: TransferQueueLabels;
|
|
11
|
+
onToggleCollapse: () => void;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
}
|
|
14
|
+
/** Queue heading with its failed-item badge and the collapse and close controls. */
|
|
15
|
+
export declare const TransferQueueHeader: FC<TransferQueueHeaderProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TransferQueueItem, TransferQueueLabels } from './TransferQueue';
|
|
3
|
+
interface TransferQueueRowProps {
|
|
4
|
+
item: TransferQueueItem;
|
|
5
|
+
labels: TransferQueueLabels;
|
|
6
|
+
onCancel?: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/** One queue row: the file's icon and name, plus a trailing status slot. */
|
|
9
|
+
export declare const TransferQueueRow: FC<TransferQueueRowProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TransferQueueLabels } from './TransferQueue';
|
|
2
|
+
/** Delay before a queue whose items have all succeeded closes itself. */
|
|
3
|
+
export declare const TRANSFER_QUEUE_AUTO_CLOSE_DELAY_MS = 8000;
|
|
4
|
+
export declare const STATUS_SLOT_CLASS = "flex size-7 shrink-0 items-center justify-center";
|
|
5
|
+
/** English defaults for every `TransferQueue` string; a host passes translations through `labels`. */
|
|
6
|
+
export declare const DEFAULT_TRANSFER_QUEUE_LABELS: TransferQueueLabels;
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** The floating panel itself: rounded raised card with a one-unit inset. */
|
|
7
7
|
export declare const overlaySurfaceClassName = "rounded-xl bg-layer-raised p-1 shadow-md";
|
|
8
|
+
/**
|
|
9
|
+
* Stacks the rows of a menu or option list with a 2px gap, so the tints of
|
|
10
|
+
* adjacent selected and hovered rows read as separate rows instead of one block.
|
|
11
|
+
*/
|
|
12
|
+
export declare const overlayListClassName = "flex flex-col gap-0.5";
|
|
8
13
|
/**
|
|
9
14
|
* A nested panel opened from a row of the surface above it. It is the same
|
|
10
15
|
* object as its parent panel, so it reads from `overlaySurfaceClassName` too —
|
|
@@ -12,6 +17,14 @@ export declare const overlaySurfaceClassName = "rounded-xl bg-layer-raised p-1 s
|
|
|
12
17
|
* rather than by the trigger further up.
|
|
13
18
|
*/
|
|
14
19
|
export declare const overlaySubMenuClassName: string;
|
|
20
|
+
/**
|
|
21
|
+
* A submenu panel that lists kit-rendered rows. The top-level menu and option
|
|
22
|
+
* list wrap their rows in `py-1` inside the panel's `p-1`; a submenu renders
|
|
23
|
+
* its rows straight into the panel, so it takes the same total vertical inset
|
|
24
|
+
* here. A caller-rendered submenu body keeps the plain panel, as a
|
|
25
|
+
* `renderOverlay` body does at the top level.
|
|
26
|
+
*/
|
|
27
|
+
export declare const overlaySubMenuListClassName: string;
|
|
15
28
|
/**
|
|
16
29
|
* A selectable row inside the panel. Keeps a visible focus ring: these rows are
|
|
17
30
|
* reached by keyboard, and the 1.0 versions suppressed the ring outright.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PopupSize } from '../../types/popup';
|
|
2
|
-
export declare const overlayBaseClassName = "z-
|
|
2
|
+
export declare const overlayBaseClassName = "z-popup flex items-center justify-center bg-blackout md:p-4";
|
|
3
3
|
export declare const popupDividerClassName = "divide-tertiary divide-y";
|
|
4
4
|
export declare const popupHeaderClassName = "flex flex-row justify-between py-4 px-6 items-center";
|
|
5
5
|
export declare const popupSizeClassMap: Record<PopupSize, string>;
|
|
@@ -1,87 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { EditorThemes } from '../../types/editor';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export declare enum SchemaDisplayMode {
|
|
9
|
-
Select = "select",
|
|
10
|
-
Radio = "radio"
|
|
11
|
-
}
|
|
12
|
-
export declare enum SchemaOrientation {
|
|
13
|
-
Row = "row",
|
|
14
|
-
Column = "column"
|
|
15
|
-
}
|
|
16
|
-
export declare enum JsonSchemaType {
|
|
17
|
-
String = "string",
|
|
18
|
-
Number = "number",
|
|
19
|
-
Integer = "integer",
|
|
20
|
-
Boolean = "boolean",
|
|
21
|
-
Object = "object",
|
|
22
|
-
Array = "array",
|
|
23
|
-
Null = "null"
|
|
24
|
-
}
|
|
25
|
-
export interface DialMeta {
|
|
26
|
-
'dial:propertyOrder'?: number;
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
}
|
|
29
|
-
export interface JsonSchemaDef {
|
|
30
|
-
$ref?: string;
|
|
31
|
-
type?: string | string[];
|
|
32
|
-
title?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
isHidden?: boolean;
|
|
35
|
-
isProtected?: boolean;
|
|
36
|
-
enumDisplay?: SchemaDisplayMode;
|
|
37
|
-
enumOrientation?: SchemaOrientation;
|
|
38
|
-
discriminatorDisplay?: SchemaDisplayMode;
|
|
39
|
-
discriminatorOrientation?: SchemaOrientation;
|
|
40
|
-
default?: unknown;
|
|
41
|
-
const?: unknown;
|
|
42
|
-
enum?: unknown[];
|
|
43
|
-
properties?: Record<string, JsonSchemaDef>;
|
|
44
|
-
required?: string[];
|
|
45
|
-
items?: JsonSchemaDef;
|
|
46
|
-
oneOf?: JsonSchemaDef[];
|
|
47
|
-
anyOf?: JsonSchemaDef[];
|
|
48
|
-
allOf?: JsonSchemaDef[];
|
|
49
|
-
discriminator?: {
|
|
50
|
-
propertyName: string;
|
|
51
|
-
mapping: Record<string, string>;
|
|
52
|
-
};
|
|
53
|
-
'dial:meta'?: DialMeta;
|
|
54
|
-
'dial:resource'?: boolean;
|
|
55
|
-
acceptableResourceTypes?: string[];
|
|
56
|
-
[key: string]: unknown;
|
|
57
|
-
}
|
|
58
|
-
export interface JsonSchema extends JsonSchemaDef {
|
|
59
|
-
$defs?: Record<string, JsonSchemaDef>;
|
|
60
|
-
}
|
|
61
|
-
export interface ValidationError {
|
|
62
|
-
path: string;
|
|
63
|
-
message: string;
|
|
64
|
-
}
|
|
65
|
-
export interface SchemaRendererTexts {
|
|
66
|
-
noItemSchema: string;
|
|
67
|
-
noItemsYet: string;
|
|
68
|
-
addItem: string;
|
|
69
|
-
selectTypeToAdd: string;
|
|
70
|
-
noConfigurableProperties: string;
|
|
71
|
-
noFieldsYet: string;
|
|
72
|
-
keyColumnHeader: string;
|
|
73
|
-
valueColumnHeader: string;
|
|
74
|
-
addField: string;
|
|
75
|
-
keyInputPlaceholder: string;
|
|
76
|
-
stringInputPlaceholder: string;
|
|
77
|
-
integerInputPlaceholder: string;
|
|
78
|
-
numberInputPlaceholder: string;
|
|
79
|
-
enumSelectPlaceholder: string;
|
|
80
|
-
selectTypePlaceholder: string;
|
|
81
|
-
removeItemAriaLabel: string;
|
|
82
|
-
removeFieldAriaLabel: string;
|
|
83
|
-
}
|
|
84
|
-
export declare const DEFAULT_SCHEMA_TEXTS: SchemaRendererTexts;
|
|
3
|
+
import { SchemaRendererVariant } from '../../types/json-schema';
|
|
4
|
+
import { JsonSchema, JsonSchemaDef, SchemaRendererTexts } from '../../models/json-schema';
|
|
5
|
+
export { SchemaRendererVariant, SchemaDisplayMode, SchemaOrientation, JsonSchemaType, } from '../../types/json-schema';
|
|
6
|
+
export type { DialMeta, JsonSchemaDef, JsonSchema, ValidationError, SchemaRendererTexts, } from '../../models/json-schema';
|
|
7
|
+
export { DEFAULT_SCHEMA_TEXTS } from '../../constants/schema-renderer';
|
|
85
8
|
export interface DialSchemaRendererProps {
|
|
86
9
|
schema: JsonSchema;
|
|
87
10
|
defaultValue?: Record<string, unknown>;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function resolveRef(schema: JsonSchemaDef, rootSchema: JsonSchema, depth?: number): JsonSchemaDef;
|
|
3
|
-
export declare function sortByPropertyOrder(entries: [string, JsonSchemaDef][]): [string, JsonSchemaDef][];
|
|
4
|
-
export declare function isMissingRequiredValue(value: unknown): boolean;
|
|
5
|
-
export declare function isObjectType(schema: JsonSchemaDef): boolean;
|
|
6
|
-
export declare function toFieldLabel(key: string): string;
|
|
7
|
-
export declare function getOptionLabel(schema: JsonSchemaDef, rootSchema: JsonSchema): string;
|
|
8
|
-
export declare function extractDefaults(schema: JsonSchemaDef, rootSchema: JsonSchema, depth?: number): unknown;
|
|
9
|
-
export declare function validateRequired(value: unknown, schema: JsonSchemaDef, rootSchema: JsonSchema, path?: string, depth?: number): ValidationError[];
|
|
10
|
-
export declare function buildSummary(value: unknown, schema: JsonSchemaDef, rootSchema: JsonSchema): string;
|
|
11
|
-
export declare function detectAnyOfVariant(value: unknown, schemas: JsonSchemaDef[], rootSchema: JsonSchema): number;
|
|
12
|
-
export declare function getItemTitle(item: unknown, discriminatorProp: string | undefined, index: number): string;
|
|
13
|
-
export declare function getSchemaDefault(schema: JsonSchemaDef): unknown;
|
|
1
|
+
export * from '../../utils/json-schema';
|