react-magma-dom 7.1.0-next.9 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/SKILL.md +4 -2
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Combobox/Combobox.stories.d.ts +47 -1
- package/dist/components/EmptyState/styles.d.ts +5 -0
- package/dist/components/IndeterminateCheckbox/index.d.ts +1 -1
- package/dist/components/Pagination/PageButton.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +5 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +29 -0
- package/dist/components/Pagination/usePagination.d.ts +1 -0
- package/dist/components/Pagination/utils.d.ts +1 -0
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Select/ItemsList.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +43 -1
- package/dist/components/Select/utils.d.ts +3 -0
- package/dist/components/Stepper/Step.d.ts +3 -1
- package/dist/components/Table/Table.stories.d.ts +30 -0
- package/dist/components/Table/TableHeaderCell.d.ts +2 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +47 -0
- package/dist/components/Tagline/Tagline.stories.d.ts +9 -0
- package/dist/components/Tagline/index.d.ts +21 -0
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/TreeView/TreeItemHierarchyContext.d.ts +2 -0
- package/dist/components/TreeView/TreeView.d.ts +3 -3
- package/dist/components/TreeView/TreeView.stories.d.ts +21 -0
- package/dist/components/TreeView/TreeViewAnnounceContext.d.ts +4 -5
- package/dist/components/TreeView/TreeViewAnnouncer.d.ts +2 -1
- package/dist/components/TreeView/TreeViewVirtualizationContext.d.ts +8 -0
- package/dist/components/TreeView/VirtualizedTreeItemFlow.d.ts +8 -0
- package/dist/components/TreeView/useTreeItem.d.ts +3 -1
- package/dist/components/TreeView/utils.d.ts +3 -1
- package/dist/esm/index.js +1046 -469
- package/dist/esm/index.js.map +1 -1
- package/dist/i18n/interface.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/properties.json +56 -9
- package/dist/react-magma-dom.cjs.development.js +1041 -458
- package/dist/react-magma-dom.cjs.development.js.map +1 -1
- package/dist/react-magma-dom.cjs.production.min.js +1 -1
- package/dist/react-magma-dom.cjs.production.min.js.map +1 -1
- package/package.json +3 -3
package/ai/SKILL.md
CHANGED
|
@@ -3,9 +3,9 @@ name: react-magma
|
|
|
3
3
|
description: Use when writing or editing React UI in a project that depends on react-magma-dom (Cengage's accessible component library) — finding the right component, its props, theming, inverse surfaces, icons and accessibility.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# React Magma (react-magma-dom 7.1.0
|
|
6
|
+
# React Magma (react-magma-dom 7.1.0)
|
|
7
7
|
|
|
8
|
-
Accessible React component library. This guide is generated for react-magma-dom 7.1.0
|
|
8
|
+
Accessible React component library. This guide is generated for react-magma-dom 7.1.0, which requires React ^18.3.1.
|
|
9
9
|
|
|
10
10
|
## How to use this guide
|
|
11
11
|
|
|
@@ -24,6 +24,7 @@ Accessible React component library. This guide is generated for react-magma-dom
|
|
|
24
24
|
|
|
25
25
|
## Library conventions
|
|
26
26
|
|
|
27
|
+
- Omit optional props when the desired value is already the component default. Verify defaults in the installed version's declarations, JSDoc or implementation before omitting them. Set props explicitly when overriding a default; keep required props and explicit values needed to override inherited context.
|
|
27
28
|
- Import from the package root: `import { Button, ButtonColor } from 'react-magma-dom'`.
|
|
28
29
|
- Variants are exported enums (`ButtonColor.secondary`, `ModalSize.large`).
|
|
29
30
|
- Dark backgrounds: `isInverse` prop, or `<InverseContext.Provider value={{ isInverse: true }}>` for a region.
|
|
@@ -121,6 +122,7 @@ Format: **Folder** — purpose (search words). Not for: need → better componen
|
|
|
121
122
|
- **Datagrid** — Table rendered from columns/rows props, selection and pagination (data grid, data table, selectable rows)
|
|
122
123
|
- **Badge** — Small label or count (badge, counter, status label, pill). Also: BadgeColor, BadgeVariant, BadgeWeight
|
|
123
124
|
- **Tag** — Category chip, clickable or removable (tag, chip, filter chip, token). Also: TagColor, TagSize
|
|
125
|
+
- **Tagline** — Short, emphasized text that introduces or labels content (tagline, eyebrow, overline, section label)
|
|
124
126
|
|
|
125
127
|
### Utilities
|
|
126
128
|
- **VisuallyHidden** — Content for screen readers only (sr-only, screen reader text, visually hidden)
|
|
@@ -60,7 +60,7 @@ export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElemen
|
|
|
60
60
|
*/
|
|
61
61
|
testId?: string;
|
|
62
62
|
/**
|
|
63
|
-
* Whether the label appears to the left
|
|
63
|
+
* Whether the label appears to the left or the right of the checkbox
|
|
64
64
|
* @default CheckboxTextPosition.right
|
|
65
65
|
*/
|
|
66
66
|
textPosition?: CheckboxTextPosition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LabelPosition } from '../Label';
|
|
3
3
|
import { SelectOptions } from '../Select';
|
|
4
|
-
import { MultiComboboxProps } from '.';
|
|
4
|
+
import { ComboboxProps, MultiComboboxProps } from '.';
|
|
5
5
|
declare const _default: any;
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Default: {
|
|
@@ -176,3 +176,49 @@ export declare const ControlledSelectedItem: {
|
|
|
176
176
|
export declare const ControlledItems: {
|
|
177
177
|
render: () => React.JSX.Element;
|
|
178
178
|
};
|
|
179
|
+
export declare const DuplicateLabels: {
|
|
180
|
+
render: (props: ComboboxProps<SelectOptions>) => React.JSX.Element;
|
|
181
|
+
args: {
|
|
182
|
+
labelText: string;
|
|
183
|
+
defaultItems: ({
|
|
184
|
+
label: string;
|
|
185
|
+
value: string;
|
|
186
|
+
disabled?: undefined;
|
|
187
|
+
} | {
|
|
188
|
+
label: string;
|
|
189
|
+
value: string;
|
|
190
|
+
disabled: string;
|
|
191
|
+
})[];
|
|
192
|
+
disableCreateItem: boolean;
|
|
193
|
+
errorMessage: string;
|
|
194
|
+
helperMessage: string;
|
|
195
|
+
placeholder: string;
|
|
196
|
+
isClearable: boolean;
|
|
197
|
+
isMulti: boolean;
|
|
198
|
+
isLoading: boolean;
|
|
199
|
+
disabled: boolean;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
export declare const MultiDuplicateLabels: {
|
|
203
|
+
render: (props: MultiComboboxProps<SelectOptions>) => React.JSX.Element;
|
|
204
|
+
args: {
|
|
205
|
+
labelText: string;
|
|
206
|
+
isClearable: boolean;
|
|
207
|
+
defaultItems: ({
|
|
208
|
+
label: string;
|
|
209
|
+
value: string;
|
|
210
|
+
disabled?: undefined;
|
|
211
|
+
} | {
|
|
212
|
+
label: string;
|
|
213
|
+
value: string;
|
|
214
|
+
disabled: string;
|
|
215
|
+
})[];
|
|
216
|
+
disableCreateItem: boolean;
|
|
217
|
+
errorMessage: string;
|
|
218
|
+
helperMessage: string;
|
|
219
|
+
placeholder: string;
|
|
220
|
+
isMulti: boolean;
|
|
221
|
+
isLoading: boolean;
|
|
222
|
+
disabled: boolean;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
@@ -10,6 +10,11 @@ export declare function getIllustrationIconColor(props: {
|
|
|
10
10
|
isInverse?: boolean;
|
|
11
11
|
theme: ThemeInterface;
|
|
12
12
|
}): string;
|
|
13
|
+
export declare function getLoadingSpinnerColor(props: {
|
|
14
|
+
isDanger?: boolean;
|
|
15
|
+
isInverse?: boolean;
|
|
16
|
+
theme: ThemeInterface;
|
|
17
|
+
}): string;
|
|
13
18
|
export declare const StyledEmptyState: import("@emotion/styled").StyledComponent<{
|
|
14
19
|
theme?: import("@emotion/react").Theme;
|
|
15
20
|
as?: import("react").ElementType<any, "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "center" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">;
|
|
@@ -3,7 +3,7 @@ import { Omit } from '../../utils';
|
|
|
3
3
|
import { CheckboxProps } from '../Checkbox';
|
|
4
4
|
export interface IndeterminateCheckboxProps extends Omit<CheckboxProps, 'checked'> {
|
|
5
5
|
/**
|
|
6
|
-
* Status of the indeterminate, three-state checkbox, which includes
|
|
6
|
+
* Status of the indeterminate, three-state checkbox, which includes an indeterminate (e.g. mixed) option.
|
|
7
7
|
* @default IndeterminateCheckboxStatus.unchecked
|
|
8
8
|
*/
|
|
9
9
|
status: IndeterminateCheckboxStatus;
|
|
@@ -4,4 +4,6 @@ export interface PageButtonProps extends ButtonProps {
|
|
|
4
4
|
isSelected?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare function pageButtonTypeSize(props: any): string;
|
|
7
|
+
export declare function pageButtonTypeLineHeight(props: any): string;
|
|
8
|
+
export declare function pageButtonTypeLetterSpacing(props: any): string;
|
|
7
9
|
export declare const PageButton: React.ForwardRefExoticComponent<PageButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -16,6 +16,11 @@ export interface BasePaginationProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
16
16
|
* @default false
|
|
17
17
|
*/
|
|
18
18
|
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If true, ellipses in classic Pagination become page-jump controls.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
enablePageJump?: boolean;
|
|
19
24
|
/**
|
|
20
25
|
* If true, hides the next page button
|
|
21
26
|
* @default false
|
|
@@ -10,6 +10,7 @@ export declare const Default: {
|
|
|
10
10
|
hideNextButton: boolean;
|
|
11
11
|
isInverse: boolean;
|
|
12
12
|
disabled: boolean;
|
|
13
|
+
enablePageJump: boolean;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
15
16
|
export declare const DefaultSelected: {
|
|
@@ -20,6 +21,29 @@ export declare const DefaultSelected: {
|
|
|
20
21
|
hideNextButton: boolean;
|
|
21
22
|
isInverse: boolean;
|
|
22
23
|
disabled: boolean;
|
|
24
|
+
enablePageJump: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const LargePageCount: {
|
|
28
|
+
args: {
|
|
29
|
+
count: number;
|
|
30
|
+
defaultPage: number;
|
|
31
|
+
enablePageJump: boolean;
|
|
32
|
+
hidePreviousButton: boolean;
|
|
33
|
+
hideNextButton: boolean;
|
|
34
|
+
isInverse: boolean;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare const PageJump: {
|
|
39
|
+
args: {
|
|
40
|
+
count: number;
|
|
41
|
+
defaultPage: number;
|
|
42
|
+
enablePageJump: boolean;
|
|
43
|
+
hidePreviousButton: boolean;
|
|
44
|
+
hideNextButton: boolean;
|
|
45
|
+
isInverse: boolean;
|
|
46
|
+
disabled: boolean;
|
|
23
47
|
};
|
|
24
48
|
};
|
|
25
49
|
export declare const AdjacentPages: {
|
|
@@ -31,6 +55,7 @@ export declare const AdjacentPages: {
|
|
|
31
55
|
hideNextButton: boolean;
|
|
32
56
|
isInverse: boolean;
|
|
33
57
|
disabled: boolean;
|
|
58
|
+
enablePageJump: boolean;
|
|
34
59
|
};
|
|
35
60
|
};
|
|
36
61
|
export declare const EdgePages: {
|
|
@@ -42,6 +67,7 @@ export declare const EdgePages: {
|
|
|
42
67
|
hideNextButton: boolean;
|
|
43
68
|
isInverse: boolean;
|
|
44
69
|
disabled: boolean;
|
|
70
|
+
enablePageJump: boolean;
|
|
45
71
|
};
|
|
46
72
|
};
|
|
47
73
|
export declare const Size: {
|
|
@@ -52,6 +78,7 @@ export declare const Size: {
|
|
|
52
78
|
hideNextButton: boolean;
|
|
53
79
|
isInverse: boolean;
|
|
54
80
|
disabled: boolean;
|
|
81
|
+
enablePageJump: boolean;
|
|
55
82
|
};
|
|
56
83
|
};
|
|
57
84
|
export declare const SimplePagination: {
|
|
@@ -62,6 +89,7 @@ export declare const SimplePagination: {
|
|
|
62
89
|
hideNextButton: boolean;
|
|
63
90
|
isInverse: boolean;
|
|
64
91
|
disabled: boolean;
|
|
92
|
+
enablePageJump: boolean;
|
|
65
93
|
};
|
|
66
94
|
parameters: {
|
|
67
95
|
controls: {
|
|
@@ -79,6 +107,7 @@ export declare const SimplePaginationOnPageChange: {
|
|
|
79
107
|
hideNextButton: boolean;
|
|
80
108
|
isInverse: boolean;
|
|
81
109
|
disabled: boolean;
|
|
110
|
+
enablePageJump: boolean;
|
|
82
111
|
};
|
|
83
112
|
parameters: {
|
|
84
113
|
controls: {
|
|
@@ -55,6 +55,7 @@ export interface UsePaginationProps {
|
|
|
55
55
|
showLastButton?: boolean;
|
|
56
56
|
}
|
|
57
57
|
export declare function usePagination(props?: Partial<UsePaginationProps>): {
|
|
58
|
+
handlePageChange: (event: any, value: any) => void;
|
|
58
59
|
page: any;
|
|
59
60
|
pageButtons: ({
|
|
60
61
|
onClick: (event: any) => void;
|
|
@@ -5,6 +5,7 @@ interface PaginationI18n {
|
|
|
5
5
|
pagesLabel: string;
|
|
6
6
|
selectedLabel: string;
|
|
7
7
|
}
|
|
8
|
+
export declare const formatPageNumber: (pageNumber: number) => string;
|
|
8
9
|
export declare const paginationLabel: (count: number, pagination: PaginationI18n) => string;
|
|
9
10
|
export declare const pageAriaLabel: (selectedPage: number, count: number, pagination: PaginationI18n) => string;
|
|
10
11
|
export {};
|
|
@@ -40,7 +40,7 @@ export interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
40
40
|
*/
|
|
41
41
|
testId?: string;
|
|
42
42
|
/**
|
|
43
|
-
* Whether the label appears to the left
|
|
43
|
+
* Whether the label appears to the left or the right of the radio button
|
|
44
44
|
* @default RadioTextPosition.right
|
|
45
45
|
*/
|
|
46
46
|
textPosition?: RadioTextPosition;
|
|
@@ -17,7 +17,7 @@ interface ItemsListProps<T> {
|
|
|
17
17
|
menuStyle?: React.CSSProperties;
|
|
18
18
|
setFloating?: (node: ReferenceType) => void;
|
|
19
19
|
setHighlightedIndex?: (index: number) => void;
|
|
20
|
-
selectedItem?:
|
|
20
|
+
selectedItem?: T;
|
|
21
21
|
}
|
|
22
22
|
export declare function ItemsList<T>(props: ItemsListProps<T>): React.JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LabelPosition } from '../Label';
|
|
3
|
-
import { MultiSelectProps, SelectOptions } from './';
|
|
3
|
+
import { MultiSelectProps, SelectOptions, SelectProps } from './';
|
|
4
4
|
declare const _default: any;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Default: {
|
|
@@ -245,3 +245,45 @@ export declare const MultiWithDisabledItems: {
|
|
|
245
245
|
labelPosition: LabelPosition;
|
|
246
246
|
};
|
|
247
247
|
};
|
|
248
|
+
export declare const DuplicateLabels: {
|
|
249
|
+
render: (props: SelectProps<SelectOptions>) => React.JSX.Element;
|
|
250
|
+
args: {
|
|
251
|
+
labelText: string;
|
|
252
|
+
items: ({
|
|
253
|
+
label: string;
|
|
254
|
+
value: string;
|
|
255
|
+
disabled: boolean;
|
|
256
|
+
} | {
|
|
257
|
+
label: string;
|
|
258
|
+
value: string;
|
|
259
|
+
disabled?: undefined;
|
|
260
|
+
})[];
|
|
261
|
+
errorMessage: string;
|
|
262
|
+
helperMessage: string;
|
|
263
|
+
isClearable: boolean;
|
|
264
|
+
isLabelVisuallyHidden: boolean;
|
|
265
|
+
isMulti: boolean;
|
|
266
|
+
labelPosition: LabelPosition;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
export declare const MultiDuplicateLabels: {
|
|
270
|
+
render: (props: MultiSelectProps<SelectOptions>) => React.JSX.Element;
|
|
271
|
+
args: {
|
|
272
|
+
labelText: string;
|
|
273
|
+
isClearable: boolean;
|
|
274
|
+
items: ({
|
|
275
|
+
label: string;
|
|
276
|
+
value: string;
|
|
277
|
+
disabled: boolean;
|
|
278
|
+
} | {
|
|
279
|
+
label: string;
|
|
280
|
+
value: string;
|
|
281
|
+
disabled?: undefined;
|
|
282
|
+
})[];
|
|
283
|
+
errorMessage: string;
|
|
284
|
+
helperMessage: string;
|
|
285
|
+
isLabelVisuallyHidden: boolean;
|
|
286
|
+
isMulti: boolean;
|
|
287
|
+
labelPosition: LabelPosition;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export declare function isItemDisabled(item: any): boolean;
|
|
2
|
+
export declare function isSameItem<T>(item: T, itemToCompare: T, itemToString: (item: T) => string): boolean;
|
|
3
|
+
export declare function findItemIndex<T>(items: T[], itemToFind: T, itemToString: (item: T) => string, excludedIndexes?: Set<number>): number;
|
|
4
|
+
export declare function getSelectedItemIndexes<T>(items: T[], selectedItems: T[], itemToString: (item: T) => string): Set<number>;
|
|
2
5
|
export declare const setFocusedItem: (step: number, highlightedIndex: number, items: any[], setHighlightedIndex: (index: number) => void) => void;
|
|
@@ -55,6 +55,8 @@ export declare enum StepStatus {
|
|
|
55
55
|
}
|
|
56
56
|
export declare const HiddenLabelText: import("@emotion/styled").StyledComponent<{
|
|
57
57
|
theme?: import("@emotion/react").Theme;
|
|
58
|
-
as?: React.ElementType<any, "symbol" | "object" | "label" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "center" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">;
|
|
58
|
+
as?: React.ElementType<any, "symbol" | "object" | "label" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "center" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">; /**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
59
61
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
60
62
|
export declare const Step: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -192,3 +192,33 @@ export declare const ScrollableTable: {
|
|
|
192
192
|
};
|
|
193
193
|
};
|
|
194
194
|
};
|
|
195
|
+
export declare const LargeTable: {
|
|
196
|
+
render: (args: any) => React.JSX.Element;
|
|
197
|
+
args: {
|
|
198
|
+
rowCount: number;
|
|
199
|
+
memoizeRows: boolean;
|
|
200
|
+
tableTitle: string;
|
|
201
|
+
};
|
|
202
|
+
argTypes: {
|
|
203
|
+
rowCount: {
|
|
204
|
+
control: {
|
|
205
|
+
type: string;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
memoizeRows: {
|
|
209
|
+
control: {
|
|
210
|
+
type: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
parameters: {
|
|
215
|
+
a11y: {
|
|
216
|
+
disable: boolean;
|
|
217
|
+
};
|
|
218
|
+
docs: {
|
|
219
|
+
description: {
|
|
220
|
+
story: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
@@ -34,7 +34,8 @@ export interface TableHeaderCellProps extends React.HTMLAttributes<HTMLTableCell
|
|
|
34
34
|
*/
|
|
35
35
|
testId?: string;
|
|
36
36
|
/**
|
|
37
|
-
* Width of the component, set by CSS
|
|
37
|
+
* Width of the component, set by CSS. Header text wraps onto multiple lines
|
|
38
|
+
* when it exceeds the column width.
|
|
38
39
|
* @default auto
|
|
39
40
|
*/
|
|
40
41
|
width?: string | number;
|
|
@@ -12,6 +12,53 @@ export declare const Default: {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
+
export declare const FullWidth: {
|
|
16
|
+
render: any;
|
|
17
|
+
args: {
|
|
18
|
+
isFullWidth: boolean;
|
|
19
|
+
};
|
|
20
|
+
parameters: {
|
|
21
|
+
controls: {
|
|
22
|
+
exclude: string[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const LongLabels: {
|
|
27
|
+
render: any;
|
|
28
|
+
args: {
|
|
29
|
+
isFullWidth: boolean;
|
|
30
|
+
};
|
|
31
|
+
parameters: {
|
|
32
|
+
controls: {
|
|
33
|
+
exclude: string[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const LongLabelsWithIcons: {
|
|
38
|
+
render: any;
|
|
39
|
+
args: {
|
|
40
|
+
iconPosition: TabsIconPosition;
|
|
41
|
+
isFullWidth: boolean;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const Vertical: {
|
|
45
|
+
render: any;
|
|
46
|
+
args: {
|
|
47
|
+
orientation: TabsOrientation;
|
|
48
|
+
};
|
|
49
|
+
parameters: {
|
|
50
|
+
controls: {
|
|
51
|
+
exclude: string[];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare const VerticalWithIcons: {
|
|
56
|
+
render: any;
|
|
57
|
+
args: {
|
|
58
|
+
iconPosition: TabsIconPosition;
|
|
59
|
+
orientation: TabsOrientation;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
15
62
|
export declare const Icon: {
|
|
16
63
|
render: any;
|
|
17
64
|
args: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TaglineProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
3
|
+
/**
|
|
4
|
+
* @children required
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
css?: any;
|
|
11
|
+
/**
|
|
12
|
+
* Uses the inverse text color for dark backgrounds
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
isInverse?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
testId?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Tagline: React.ForwardRefExoticComponent<TaglineProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -46,7 +46,7 @@ export interface ToggleProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
46
46
|
*/
|
|
47
47
|
testId?: string;
|
|
48
48
|
/**
|
|
49
|
-
* Whether the label appears to the left
|
|
49
|
+
* Whether the label appears to the left or the right of the toggle switch
|
|
50
50
|
* @default ToggleTextPosition.left
|
|
51
51
|
*/
|
|
52
52
|
textPosition?: ToggleTextPosition;
|
|
@@ -10,6 +10,8 @@ interface TreeItemHierarchyContextInterface {
|
|
|
10
10
|
isTopLevel: boolean;
|
|
11
11
|
index: number;
|
|
12
12
|
isVirtualized?: boolean;
|
|
13
|
+
posInSet?: number;
|
|
14
|
+
setSize?: number;
|
|
13
15
|
}
|
|
14
16
|
export declare const TreeItemHierarchyContext: React.Context<TreeItemHierarchyContextInterface>;
|
|
15
17
|
export {};
|
|
@@ -7,9 +7,9 @@ export interface TreeViewProps extends Omit<React.HTMLAttributes<HTMLUListElemen
|
|
|
7
7
|
*/
|
|
8
8
|
enableVirtualization?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Height of the TreeView container in pixels.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Height of the scrollable TreeView container in pixels.
|
|
11
|
+
* When enableVirtualization is true, provide this prop or a bounded CSS
|
|
12
|
+
* height with overflow: auto so virtualization can calculate the viewport.
|
|
13
13
|
* @example height={400}
|
|
14
14
|
*/
|
|
15
15
|
height?: number;
|
|
@@ -210,6 +210,27 @@ export declare const VirtualizedLargeTree: {
|
|
|
210
210
|
enableVirtualization: boolean;
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
|
+
export declare const ResizableVirtualizedTree: {
|
|
214
|
+
render: ({ lessonsPerChapter, ...args }: TreeViewProps & {
|
|
215
|
+
lessonsPerChapter: number;
|
|
216
|
+
}) => React.JSX.Element;
|
|
217
|
+
args: {
|
|
218
|
+
ariaLabel: string;
|
|
219
|
+
enableVirtualization: boolean;
|
|
220
|
+
initialExpandedItems: string[];
|
|
221
|
+
testId: string;
|
|
222
|
+
lessonsPerChapter: number;
|
|
223
|
+
};
|
|
224
|
+
argTypes: {
|
|
225
|
+
lessonsPerChapter: {
|
|
226
|
+
control: {
|
|
227
|
+
type: string;
|
|
228
|
+
min: number;
|
|
229
|
+
max: number;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
213
234
|
export declare const SelectChildrenOnly: {
|
|
214
235
|
render: (args: TreeViewProps) => React.JSX.Element;
|
|
215
236
|
args: {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface TreeViewAnnounceContextInterface {
|
|
3
3
|
/**
|
|
4
|
-
* Publishes a message
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* name.
|
|
4
|
+
* Publishes a message outside the `ul[role="tree"]`. Windows cascade
|
|
5
|
+
* messages use the source item's live region; other messages use the tree's
|
|
6
|
+
* shared region.
|
|
8
7
|
*/
|
|
9
|
-
announce: (message: string) => void;
|
|
8
|
+
announce: (message: string, itemId?: string) => void;
|
|
10
9
|
}
|
|
11
10
|
export declare const TreeViewAnnounceContext: React.Context<TreeViewAnnounceContextInterface>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface TreeViewAnnouncerHandle {
|
|
3
|
-
announce: (message: string) => void;
|
|
3
|
+
announce: (message: string, itemId?: string) => void;
|
|
4
4
|
}
|
|
5
5
|
export interface TreeViewAnnouncerProps {
|
|
6
|
+
branchIds: string[];
|
|
6
7
|
testId?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const ANNOUNCE_DELAY_MS = 150;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface TreeViewVirtualizationContextValue {
|
|
3
|
+
scrollRef: React.RefObject<HTMLUListElement>;
|
|
4
|
+
requestedItemId: string | null;
|
|
5
|
+
resolveRequestedFocus: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const TreeViewVirtualizationContext: React.Context<TreeViewVirtualizationContextValue>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface VirtualizedTreeItemFlowProps {
|
|
3
|
+
childDepth: number;
|
|
4
|
+
children: React.ReactNode[];
|
|
5
|
+
expanded: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const VirtualizedTreeItemFlow: ({ childDepth, children, expanded, }: VirtualizedTreeItemFlowProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -67,6 +67,8 @@ export interface UseTreeItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
67
67
|
* Used in virtualization to indicate this item has TreeItem children.
|
|
68
68
|
*/
|
|
69
69
|
hasTreeItemChildren?: boolean;
|
|
70
|
+
/** @internal Direct child IDs retained when virtualization removes nested JSX. */
|
|
71
|
+
directChildItemIds?: string[];
|
|
70
72
|
}
|
|
71
73
|
export declare const checkedStatusToBoolean: (status: IndeterminateCheckboxStatus) => boolean;
|
|
72
74
|
export declare function useTreeItem(props: UseTreeItemProps, forwardedRef: any): {
|
|
@@ -80,7 +82,7 @@ export declare function useTreeItem(props: UseTreeItemProps, forwardedRef: any):
|
|
|
80
82
|
parentDepth: number;
|
|
81
83
|
ref: (node: any) => void;
|
|
82
84
|
selectedItems: import("./TreeViewSelectionContext").TreeItemSelectedInterface[];
|
|
83
|
-
treeItemChildren:
|
|
85
|
+
treeItemChildren: React.ReactNode[];
|
|
84
86
|
isDisabled: boolean;
|
|
85
87
|
};
|
|
86
88
|
handleClick: (event: React.SyntheticEvent | React.ChangeEvent, clickedItemId: string) => void;
|
|
@@ -9,6 +9,8 @@ export declare enum TreeNodeType {
|
|
|
9
9
|
branch = "branch",
|
|
10
10
|
leaf = "leaf"
|
|
11
11
|
}
|
|
12
|
+
export declare function flattenTreeViewChildren(children: React.ReactNode): React.ReactNode[];
|
|
13
|
+
export declare function containsTreeItem(children: React.ReactNode, itemId: string): boolean;
|
|
12
14
|
declare type TreeViewI18n = Required<NonNullable<I18nInterface['treeView']>>;
|
|
13
15
|
export declare function resolveTreeViewString(i18n: I18nInterface, key: keyof TreeViewI18n): string;
|
|
14
16
|
export declare function resolveExpansionAnnounceTemplate(i18n: I18nInterface, expanded: boolean): string;
|
|
@@ -40,7 +42,7 @@ export declare const getChildrenIds: ({ items, itemId, parentChildMap, }: {
|
|
|
40
42
|
itemId: TreeViewItemInterface['itemId'];
|
|
41
43
|
parentChildMap?: Map<string, string[]>;
|
|
42
44
|
}) => string[];
|
|
43
|
-
export declare const getInitialItems: ({ children, preselectedItems: rawPreselectedItems, checkParents, checkChildren, selectable, isDisabled: isTreeViewDisabled, isTopLevelSelectable, items, }: Pick<UseTreeViewProps, "isDisabled" | "
|
|
45
|
+
export declare const getInitialItems: ({ children, preselectedItems: rawPreselectedItems, checkParents, checkChildren, selectable, isDisabled: isTreeViewDisabled, isTopLevelSelectable, items, }: Pick<UseTreeViewProps, "isDisabled" | "children" | "checkChildren" | "selectable" | "preselectedItems" | "checkParents" | "isTopLevelSelectable"> & {
|
|
44
46
|
items?: TreeViewItemInterface[];
|
|
45
47
|
}) => any;
|
|
46
48
|
export declare const selectSingle: ({ items, itemId, checkedStatus, }: {
|