@deskpro/deskpro-ui 8.4.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/AttachmentTag/AttachmentTag.js +8 -4
- package/dist/cjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/dist/cjs/components/AttachmentTag/LoadingAttachment.js +2 -2
- package/dist/cjs/components/AttachmentTag/LoadingAttachment.js.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.js +13 -3
- package/dist/cjs/components/Avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/Badge/Badge.js +21 -2
- package/dist/cjs/components/Badge/Badge.js.map +1 -1
- package/dist/cjs/components/Button/Button.js +4 -4
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/ButtonGroup/ButtonGroup.js +9 -1
- package/dist/cjs/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/cjs/components/CCUserTag/CCUserTag.js +3 -2
- package/dist/cjs/components/CCUserTag/CCUserTag.js.map +1 -1
- package/dist/cjs/components/Card/AppCard.js +1 -1
- package/dist/cjs/components/Card/AppCard.js.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.js +28 -6
- package/dist/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.js +2 -2
- package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/Divider/Divider.js +8 -1
- package/dist/cjs/components/Divider/Divider.js.map +1 -1
- package/dist/cjs/components/Drilldown/CreateNewOption.js +1 -1
- package/dist/cjs/components/Drilldown/CreateNewOption.js.map +1 -1
- package/dist/cjs/components/Drilldown/Drilldown.js +39 -7
- package/dist/cjs/components/Drilldown/Drilldown.js.map +1 -1
- package/dist/cjs/components/Drilldown/DrilldownItem.js +7 -3
- package/dist/cjs/components/Drilldown/DrilldownItem.js.map +1 -1
- package/dist/cjs/components/Drilldown/DrilldownList.js +16 -7
- package/dist/cjs/components/Drilldown/DrilldownList.js.map +1 -1
- package/dist/cjs/components/Drilldown/getItemId.js +15 -0
- package/dist/cjs/components/Drilldown/getItemId.js.map +1 -0
- package/dist/cjs/components/Drilldown/styles.js +5 -1
- package/dist/cjs/components/Drilldown/styles.js.map +1 -1
- package/dist/cjs/components/Drilldown/types.js.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.js +45 -16
- package/dist/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/Infinite/Infinite.js +7 -6
- package/dist/cjs/components/Infinite/Infinite.js.map +1 -1
- package/dist/cjs/components/Infinite/InfiniteTopBottom.js +10 -8
- package/dist/cjs/components/Infinite/InfiniteTopBottom.js.map +1 -1
- package/dist/cjs/components/Input/Input.js +22 -6
- package/dist/cjs/components/Input/Input.js.map +1 -1
- package/dist/cjs/components/Label/Label.js +3 -1
- package/dist/cjs/components/Label/Label.js.map +1 -1
- package/dist/cjs/components/LabelTag/Tag.js +5 -4
- package/dist/cjs/components/LabelTag/Tag.js.map +1 -1
- package/dist/cjs/components/Link/Link.js +24 -1
- package/dist/cjs/components/Link/Link.js.map +1 -1
- package/dist/cjs/components/Link/index.js +2 -1
- package/dist/cjs/components/Link/index.js.map +1 -1
- package/dist/cjs/components/LoadingState/LoadingBlock.js +9 -1
- package/dist/cjs/components/LoadingState/LoadingBlock.js.map +1 -1
- package/dist/cjs/components/LoadingState/LoadingState.js +22 -0
- package/dist/cjs/components/LoadingState/LoadingState.js.map +1 -0
- package/dist/cjs/components/LoadingState/index.js +3 -1
- package/dist/cjs/components/LoadingState/index.js.map +1 -1
- package/dist/cjs/components/Menu/Menu.js +101 -13
- package/dist/cjs/components/Menu/Menu.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.js +12 -6
- package/dist/cjs/components/Modal/Modal.js.map +1 -1
- package/dist/cjs/components/NonIdealState/NonIdealState.js +15 -2
- package/dist/cjs/components/NonIdealState/NonIdealState.js.map +1 -1
- package/dist/cjs/components/OptionTag/OptionTag.js +6 -3
- package/dist/cjs/components/OptionTag/OptionTag.js.map +1 -1
- package/dist/cjs/components/Overlay/Overlay.js +14 -70
- package/dist/cjs/components/Overlay/Overlay.js.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.js +18 -17
- package/dist/cjs/components/Pagination/Pagination.js.map +1 -1
- package/dist/cjs/components/Pill/Pill.js +18 -1
- package/dist/cjs/components/Pill/Pill.js.map +1 -1
- package/dist/cjs/components/Popover/Popover.js +11 -2
- package/dist/cjs/components/Popover/Popover.js.map +1 -1
- package/dist/cjs/components/Radio/Radio.js +21 -7
- package/dist/cjs/components/Radio/Radio.js.map +1 -1
- package/dist/cjs/components/Select/Select.js +8 -3
- package/dist/cjs/components/Select/Select.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +14 -2
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/TabBar/TabBar.js +57 -5
- package/dist/cjs/components/TabBar/TabBar.js.map +1 -1
- package/dist/cjs/components/TabbedSection/Tabs.js +59 -6
- package/dist/cjs/components/TabbedSection/Tabs.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.js +49 -5
- package/dist/cjs/components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/TextArea/TextArea.js +19 -4
- package/dist/cjs/components/TextArea/TextArea.js.map +1 -1
- package/dist/cjs/components/TimeInput/TimeInput.js +13 -7
- package/dist/cjs/components/TimeInput/TimeInput.js.map +1 -1
- package/dist/cjs/components/Toggle/Toggle.js +23 -6
- package/dist/cjs/components/Toggle/Toggle.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +20 -4
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/Tooltip/TooltipCommonIcon.js +2 -2
- package/dist/cjs/components/Tooltip/TooltipCommonIcon.js.map +1 -1
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.js +48 -0
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
- package/dist/cjs/components/VisuallyHidden/index.js +7 -0
- package/dist/cjs/components/VisuallyHidden/index.js.map +1 -0
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/hooks/index.js +3 -1
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useId.js +35 -0
- package/dist/cjs/hooks/useId.js.map +1 -0
- package/dist/cjs/structure/AppSidebar/AppSidebar.js +6 -5
- package/dist/cjs/structure/AppSidebar/AppSidebar.js.map +1 -1
- package/dist/deskpro-ui.d.ts +334 -47
- package/dist/esm/components/AttachmentTag/AttachmentTag.js +8 -4
- package/dist/esm/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/dist/esm/components/AttachmentTag/LoadingAttachment.js +2 -2
- package/dist/esm/components/AttachmentTag/LoadingAttachment.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.js +13 -3
- package/dist/esm/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/Badge/Badge.js +21 -2
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- package/dist/esm/components/Button/Button.js +4 -4
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/ButtonGroup/ButtonGroup.js +9 -1
- package/dist/esm/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/esm/components/CCUserTag/CCUserTag.js +3 -2
- package/dist/esm/components/CCUserTag/CCUserTag.js.map +1 -1
- package/dist/esm/components/Card/AppCard.js +1 -1
- package/dist/esm/components/Card/AppCard.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +28 -6
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +2 -2
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Divider/Divider.js +8 -1
- package/dist/esm/components/Divider/Divider.js.map +1 -1
- package/dist/esm/components/Drilldown/CreateNewOption.js +1 -1
- package/dist/esm/components/Drilldown/CreateNewOption.js.map +1 -1
- package/dist/esm/components/Drilldown/Drilldown.js +39 -7
- package/dist/esm/components/Drilldown/Drilldown.js.map +1 -1
- package/dist/esm/components/Drilldown/DrilldownItem.js +7 -3
- package/dist/esm/components/Drilldown/DrilldownItem.js.map +1 -1
- package/dist/esm/components/Drilldown/DrilldownList.js +16 -7
- package/dist/esm/components/Drilldown/DrilldownList.js.map +1 -1
- package/dist/esm/components/Drilldown/getItemId.js +11 -0
- package/dist/esm/components/Drilldown/getItemId.js.map +1 -0
- package/dist/esm/components/Drilldown/styles.js +5 -1
- package/dist/esm/components/Drilldown/styles.js.map +1 -1
- package/dist/esm/components/Drilldown/types.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js +45 -16
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/Infinite/Infinite.js +7 -6
- package/dist/esm/components/Infinite/Infinite.js.map +1 -1
- package/dist/esm/components/Infinite/InfiniteTopBottom.js +10 -8
- package/dist/esm/components/Infinite/InfiniteTopBottom.js.map +1 -1
- package/dist/esm/components/Input/Input.js +22 -6
- package/dist/esm/components/Input/Input.js.map +1 -1
- package/dist/esm/components/Label/Label.js +3 -1
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/LabelTag/Tag.js +5 -4
- package/dist/esm/components/LabelTag/Tag.js.map +1 -1
- package/dist/esm/components/Link/Link.js +23 -0
- package/dist/esm/components/Link/Link.js.map +1 -1
- package/dist/esm/components/Link/index.js +1 -1
- package/dist/esm/components/Link/index.js.map +1 -1
- package/dist/esm/components/LoadingState/LoadingBlock.js +9 -1
- package/dist/esm/components/LoadingState/LoadingBlock.js.map +1 -1
- package/dist/esm/components/LoadingState/LoadingState.js +19 -0
- package/dist/esm/components/LoadingState/LoadingState.js.map +1 -0
- package/dist/esm/components/LoadingState/index.js +1 -0
- package/dist/esm/components/LoadingState/index.js.map +1 -1
- package/dist/esm/components/Menu/Menu.js +102 -14
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Modal/Modal.js +12 -6
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/NonIdealState/NonIdealState.js +15 -2
- package/dist/esm/components/NonIdealState/NonIdealState.js.map +1 -1
- package/dist/esm/components/OptionTag/OptionTag.js +6 -3
- package/dist/esm/components/OptionTag/OptionTag.js.map +1 -1
- package/dist/esm/components/Overlay/Overlay.js +14 -70
- package/dist/esm/components/Overlay/Overlay.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +18 -17
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/Pill/Pill.js +18 -1
- package/dist/esm/components/Pill/Pill.js.map +1 -1
- package/dist/esm/components/Popover/Popover.js +11 -2
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/esm/components/Radio/Radio.js +21 -7
- package/dist/esm/components/Radio/Radio.js.map +1 -1
- package/dist/esm/components/Select/Select.js +8 -3
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Spinner/Spinner.js +14 -2
- package/dist/esm/components/Spinner/Spinner.js.map +1 -1
- package/dist/esm/components/TabBar/TabBar.js +57 -5
- package/dist/esm/components/TabBar/TabBar.js.map +1 -1
- package/dist/esm/components/TabbedSection/Tabs.js +59 -6
- package/dist/esm/components/TabbedSection/Tabs.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +50 -6
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/TextArea/TextArea.js +19 -4
- package/dist/esm/components/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/TimeInput/TimeInput.js +13 -7
- package/dist/esm/components/TimeInput/TimeInput.js.map +1 -1
- package/dist/esm/components/Toggle/Toggle.js +23 -6
- package/dist/esm/components/Toggle/Toggle.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +20 -4
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/Tooltip/TooltipCommonIcon.js +2 -2
- package/dist/esm/components/Tooltip/TooltipCommonIcon.js.map +1 -1
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +45 -0
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
- package/dist/esm/components/VisuallyHidden/index.js +2 -0
- package/dist/esm/components/VisuallyHidden/index.js.map +1 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useId.js +32 -0
- package/dist/esm/hooks/useId.js.map +1 -0
- package/dist/esm/structure/AppSidebar/AppSidebar.js +6 -5
- package/dist/esm/structure/AppSidebar/AppSidebar.js.map +1 -1
- package/package.json +6 -1
package/dist/deskpro-ui.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { AnchorHTMLAttributes } from 'react';
|
|
7
|
+
import type { AriaAttributes } from 'react';
|
|
7
8
|
import type { ButtonHTMLAttributes } from 'react';
|
|
8
9
|
import type { ChangeEvent } from 'react';
|
|
9
10
|
import type { ComponentProps } from 'react';
|
|
@@ -13,13 +14,14 @@ import { CSSProperties } from 'react';
|
|
|
13
14
|
import type { CSSProperties as CSSProperties_2 } from 'styled-components';
|
|
14
15
|
import { DefaultTheme } from 'styled-components';
|
|
15
16
|
import { Dispatch } from 'react';
|
|
17
|
+
import type { ElementType } from 'react';
|
|
16
18
|
import type { ErrorMessageProps } from 'formik';
|
|
17
19
|
import type { FieldHelperProps } from 'formik';
|
|
18
20
|
import type { FieldHookConfig } from 'formik';
|
|
19
21
|
import type { FieldInputProps } from 'formik';
|
|
20
22
|
import type { FieldMetaProps } from 'formik';
|
|
21
23
|
import { FlattenInterpolation } from 'styled-components';
|
|
22
|
-
import
|
|
24
|
+
import { FlattenSimpleInterpolation } from 'styled-components';
|
|
23
25
|
import { ForwardRefComponent } from 'framer-motion';
|
|
24
26
|
import { ForwardRefExoticComponent } from 'react';
|
|
25
27
|
import { GlobalStyleComponent } from 'styled-components';
|
|
@@ -29,6 +31,7 @@ import { HTMLMotionProps } from 'framer-motion';
|
|
|
29
31
|
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
30
32
|
import type { InputHTMLAttributes } from 'react';
|
|
31
33
|
import { JSX as JSX_2 } from 'react';
|
|
34
|
+
import type { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
32
35
|
import type { LabelHTMLAttributes } from 'react';
|
|
33
36
|
import type { MotionStyle } from 'framer-motion';
|
|
34
37
|
import type { MouseEvent as MouseEvent_2 } from 'react';
|
|
@@ -161,8 +164,8 @@ export declare interface AppCardSimpleProps {
|
|
|
161
164
|
* @public
|
|
162
165
|
*/
|
|
163
166
|
export declare const AppSidebar: {
|
|
164
|
-
Container: ForwardRefExoticComponent<AppSidebarContainerProps & RefAttributes<
|
|
165
|
-
Header: ({ title, titleControls, controls, containerStyles, }: AppSidebarHeaderProps) => JSX_2.Element;
|
|
167
|
+
Container: ForwardRefExoticComponent<AppSidebarContainerProps & RefAttributes<HTMLElement>>;
|
|
168
|
+
Header: ({ title, titleControls, controls, containerStyles, titleLevel, }: AppSidebarHeaderProps) => JSX_2.Element;
|
|
166
169
|
SubHeader: ({ title, controls, }: {
|
|
167
170
|
title: string | ReactNode;
|
|
168
171
|
controls?: ReactNode;
|
|
@@ -185,6 +188,8 @@ export declare const AppSidebar: {
|
|
|
185
188
|
export declare interface AppSidebarContainerProps {
|
|
186
189
|
children: ReactNode;
|
|
187
190
|
styles?: CSSProperties;
|
|
191
|
+
/** Accessible label for the navigation landmark. Defaults to "Sidebar". */
|
|
192
|
+
navigationLabel?: string;
|
|
188
193
|
}
|
|
189
194
|
|
|
190
195
|
/**
|
|
@@ -195,6 +200,8 @@ export declare interface AppSidebarHeaderProps {
|
|
|
195
200
|
titleControls?: ReactNode;
|
|
196
201
|
controls?: ReactNode;
|
|
197
202
|
containerStyles?: CSSProperties;
|
|
203
|
+
/** HTML heading level for the title. Defaults to "h2". */
|
|
204
|
+
titleLevel?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
198
205
|
}
|
|
199
206
|
|
|
200
207
|
/**
|
|
@@ -222,6 +229,12 @@ export declare interface AttachmentTagProps extends AnchorHTMLAttributes<HTMLAnc
|
|
|
222
229
|
maxWidth?: string;
|
|
223
230
|
variant?: "default" | "light";
|
|
224
231
|
isLoading?: boolean;
|
|
232
|
+
/** Accessible label for the remove button. Defaults to `Remove {filename}`. */
|
|
233
|
+
removeLabel?: string;
|
|
234
|
+
/** Accessible label for the upload spinner. Defaults to "Uploading attachment". */
|
|
235
|
+
uploadingLabel?: string;
|
|
236
|
+
/** Visually-hidden hint that the link opens in a new tab. Defaults to "(opens in new tab)". */
|
|
237
|
+
newTabLabel?: string;
|
|
225
238
|
}
|
|
226
239
|
|
|
227
240
|
/**
|
|
@@ -298,7 +311,7 @@ export declare type AvatarSize = 14 | 15 | 18 | 20 | 22 | 24 | 26 | 28 | 32 | 34
|
|
|
298
311
|
/**
|
|
299
312
|
* @public
|
|
300
313
|
*/
|
|
301
|
-
export declare function Badge({ children, count, showZero, color, max, textColor, className, }: BadgeProps): React_2.JSX.Element;
|
|
314
|
+
export declare function Badge({ children, count, showZero, color, max, textColor, className, badgeLabel, }: BadgeProps): React_2.JSX.Element;
|
|
302
315
|
|
|
303
316
|
/**
|
|
304
317
|
* @public
|
|
@@ -311,6 +324,18 @@ export declare interface BadgeProps {
|
|
|
311
324
|
showZero?: boolean;
|
|
312
325
|
textColor?: ThemeColorKey;
|
|
313
326
|
className?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Accessible label for the count badge. When provided, the badge is exposed
|
|
329
|
+
* as a meaningful element with this string as its accessible name.
|
|
330
|
+
*
|
|
331
|
+
* When omitted, the badge defaults to a label of the form
|
|
332
|
+
* `"{count} notifications"` (or `"{max}+ notifications"` when the count
|
|
333
|
+
* exceeds `max`).
|
|
334
|
+
*
|
|
335
|
+
* Pass `null` to suppress the label entirely (aria-hidden). Use this only
|
|
336
|
+
* when the count is already announced via adjacent text.
|
|
337
|
+
*/
|
|
338
|
+
badgeLabel?: string | null;
|
|
314
339
|
}
|
|
315
340
|
|
|
316
341
|
/**
|
|
@@ -358,13 +383,7 @@ export declare const Button: StyledComponent<React_2.ForwardRefExoticComponent<A
|
|
|
358
383
|
/**
|
|
359
384
|
* @public
|
|
360
385
|
*/
|
|
361
|
-
export declare const ButtonGroup: StyledComponent<"div", DefaultTheme,
|
|
362
|
-
"data-dp-name": string;
|
|
363
|
-
"data-dp-ident"?: string;
|
|
364
|
-
} & ButtonGroupProps, keyof {
|
|
365
|
-
"data-dp-name": string;
|
|
366
|
-
"data-dp-ident"?: string;
|
|
367
|
-
}>;
|
|
386
|
+
export declare const ButtonGroup: StyledComponent<"div", DefaultTheme, ButtonGroupProps, never>;
|
|
368
387
|
|
|
369
388
|
/**
|
|
370
389
|
* @public
|
|
@@ -416,7 +435,7 @@ export declare type CardSizes = "small" | "medium" | "large";
|
|
|
416
435
|
*
|
|
417
436
|
* @public
|
|
418
437
|
*/
|
|
419
|
-
export declare function CCUserTag({ displayName, avatar, email, onClose, closeIcon, avatarBackupIcon, }: CCUserTagProps): React_2.JSX.Element;
|
|
438
|
+
export declare function CCUserTag({ displayName, avatar, email, onClose, closeIcon, avatarBackupIcon, removeLabel, }: CCUserTagProps): React_2.JSX.Element;
|
|
420
439
|
|
|
421
440
|
/**
|
|
422
441
|
*
|
|
@@ -429,6 +448,9 @@ export declare interface CCUserTagProps {
|
|
|
429
448
|
onClose?: () => void;
|
|
430
449
|
closeIcon: AnyIcon;
|
|
431
450
|
avatarBackupIcon: AnyIcon;
|
|
451
|
+
/** Accessible label for the remove button. Provide a translated string for
|
|
452
|
+
* i18n. Defaults to `Remove {displayName | email | "user"}`. */
|
|
453
|
+
removeLabel?: string;
|
|
432
454
|
}
|
|
433
455
|
|
|
434
456
|
/**
|
|
@@ -807,7 +829,7 @@ export declare interface DeskproTheme {
|
|
|
807
829
|
* </Dialog>
|
|
808
830
|
* ```
|
|
809
831
|
*/
|
|
810
|
-
export declare function Dialog({ isOpen, canClickOutsideClose, canEscClose, children, hasBackdrop, onRequestClose, autofocus, size, zIndex, }: DialogProps): JSX.Element;
|
|
832
|
+
export declare function Dialog({ isOpen, canClickOutsideClose, canEscClose, children, hasBackdrop, onRequestClose, autofocus, size, zIndex, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }: DialogProps): JSX.Element;
|
|
811
833
|
|
|
812
834
|
/**
|
|
813
835
|
* @public
|
|
@@ -837,6 +859,13 @@ export declare interface DialogHeaderProps {
|
|
|
837
859
|
*/
|
|
838
860
|
export declare interface DialogProps extends Omit<OverlayProps, "scrollable"> {
|
|
839
861
|
size?: DialogSize;
|
|
862
|
+
/** Accessible name for the dialog. Provide this (or `aria-labelledby`) so
|
|
863
|
+
* screen readers announce what the dialog is. */
|
|
864
|
+
"aria-label"?: string;
|
|
865
|
+
/** Id of the element (e.g. the dialog title) that labels the dialog. */
|
|
866
|
+
"aria-labelledby"?: string;
|
|
867
|
+
/** Id of the element that describes the dialog. */
|
|
868
|
+
"aria-describedby"?: string;
|
|
840
869
|
}
|
|
841
870
|
|
|
842
871
|
export declare type DialogSize = "small" | "medium" | "large" | "xLarge" | "xxLarge" | "fullPage" | "overlay";
|
|
@@ -895,13 +924,7 @@ export declare interface DivAsInputWithDisplayProps extends HTMLAttributes<HTMLD
|
|
|
895
924
|
/**
|
|
896
925
|
* @public
|
|
897
926
|
*/
|
|
898
|
-
export declare const Divider: StyledComponent<"div", DefaultTheme,
|
|
899
|
-
"data-dp-name": string;
|
|
900
|
-
"data-dp-ident"?: string;
|
|
901
|
-
} & DividerProps, keyof {
|
|
902
|
-
"data-dp-name": string;
|
|
903
|
-
"data-dp-ident"?: string;
|
|
904
|
-
}>;
|
|
927
|
+
export declare const Divider: StyledComponent<"div", DefaultTheme, DividerProps, never>;
|
|
905
928
|
|
|
906
929
|
/**
|
|
907
930
|
* @public
|
|
@@ -940,7 +963,7 @@ export declare type DpCustomIconsId = "active-call" | "admin" | "advanced-filter
|
|
|
940
963
|
* </Drilldown>
|
|
941
964
|
* ```
|
|
942
965
|
*/
|
|
943
|
-
export declare function Drilldown<T, TargetRef extends HTMLElement>({ type, children, options, inputValue, searchPlaceholder, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, onCreateNewOption, hideIcons, hidePaths, iconColumnWidth, containerWidth, containerHeight, onSelectOption, onInputChange, onFetchMore, onClear, onClose, onOpen, onInputReturn, tabProps, disabled, fetchMoreText, autoscrollText, emptySearchResultsText, externalLinkIcon, selectedIcon, layer, animationDuration, onDrilldown, onDrilldownAnimationEnd, onDrillupAnimationEnd, backText, filterPredicate, includeParentsInSearch, }: DrilldownProps<T, TargetRef>): JSX.Element;
|
|
966
|
+
export declare function Drilldown<T, TargetRef extends HTMLElement>({ type, children, options, inputValue, searchPlaceholder, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, onCreateNewOption, hideIcons, hidePaths, iconColumnWidth, containerWidth, containerHeight, onSelectOption, onInputChange, onFetchMore, onClear, onClose, onOpen, onInputReturn, tabProps, disabled, fetchMoreText, autoscrollText, emptySearchResultsText, externalLinkIcon, selectedIcon, layer, animationDuration, onDrilldown, onDrilldownAnimationEnd, onDrillupAnimationEnd, backText, backLabel, clearLabel, expandLabel, filterPredicate, includeParentsInSearch, }: DrilldownProps<T, TargetRef>): JSX.Element;
|
|
944
967
|
|
|
945
968
|
export declare interface DrilldownBaseProps<T, TargetRef extends HTMLElement> {
|
|
946
969
|
/** Event handler for when an option is selected */
|
|
@@ -1014,6 +1037,15 @@ export declare interface DrilldownBaseProps<T, TargetRef extends HTMLElement> {
|
|
|
1014
1037
|
onDrillupAnimationEnd?: (pathToSelectedItem: PathToSelectedItem) => Promise<void>;
|
|
1015
1038
|
/** The text to show for the back button */
|
|
1016
1039
|
backText: ReactNode;
|
|
1040
|
+
/** Accessible label for the back button. Defaults to `backText` (when it is a
|
|
1041
|
+
* string), then "Go back". Provide a translated string for i18n. */
|
|
1042
|
+
backLabel?: string;
|
|
1043
|
+
/** Accessible label for the search "clear" button. Provide a translated
|
|
1044
|
+
* string for i18n. Defaults to "Clear". */
|
|
1045
|
+
clearLabel?: string;
|
|
1046
|
+
/** Accessible label for an item's "expand subitems" button. Provide a
|
|
1047
|
+
* translated string for i18n. Defaults to "Expand". */
|
|
1048
|
+
expandLabel?: string;
|
|
1017
1049
|
includeParentsInSearch?: boolean;
|
|
1018
1050
|
}
|
|
1019
1051
|
|
|
@@ -1153,7 +1185,7 @@ export declare const DrilldownInternalSearchInputContainer: StyledComponent<"div
|
|
|
1153
1185
|
/**
|
|
1154
1186
|
* @public
|
|
1155
1187
|
*/
|
|
1156
|
-
export declare function DrilldownItem<T = unknown>({ value, active, onSelect, onSelectIcon, onClickSubItem, hideIcons, iconColumnWidth, selectedIcon, externalLinkIcon, handleDrilldown, dataKey, subItems, isSearchResult, inputValue, flatItemTree, hidePaths, hasSelectedItems, hasExpandableItems, hasItemsWithIcons, setActiveItem, }: DrilldownItemProps<T>): JSX.Element;
|
|
1188
|
+
export declare function DrilldownItem<T = unknown>({ value, active, onSelect, onSelectIcon, onClickSubItem, hideIcons, iconColumnWidth, selectedIcon, externalLinkIcon, handleDrilldown, dataKey, subItems, isSearchResult, inputValue, flatItemTree, hidePaths, hasSelectedItems, hasExpandableItems, hasItemsWithIcons, setActiveItem, expandLabel, }: DrilldownItemProps<T>): JSX.Element;
|
|
1157
1189
|
|
|
1158
1190
|
/**
|
|
1159
1191
|
* @public
|
|
@@ -1207,6 +1239,8 @@ export declare interface DrilldownItemProps<T = unknown> {
|
|
|
1207
1239
|
hasExpandableItems: boolean;
|
|
1208
1240
|
hasItemsWithIcons: boolean;
|
|
1209
1241
|
setActiveItem?: (item: ActiveItem<T>) => void;
|
|
1242
|
+
/** Accessible label for the "expand subitems" button. Defaults to "Expand". */
|
|
1243
|
+
expandLabel?: string;
|
|
1210
1244
|
}
|
|
1211
1245
|
|
|
1212
1246
|
/**
|
|
@@ -1252,7 +1286,7 @@ export declare type DrilldownProps<T, TargetRef extends HTMLElement> = Drilldown
|
|
|
1252
1286
|
/**
|
|
1253
1287
|
* @public
|
|
1254
1288
|
*/
|
|
1255
|
-
export declare function drilldownRenderOptions<T = string>({ options, handleSelectOption, handleDrilldown, activeItem, selectedIcon, externalLinkIcon, hideIcons, iconColumnWidth, hasSelectedItems, hasExpandableItems, hasItemsWithIcons, setActiveItem, }: DrilldownRenderOptionsProps<T>): (value: DrilldownItemType<T>, index: number, array: DrilldownItemType<T>[]) => ReactNode;
|
|
1289
|
+
export declare function drilldownRenderOptions<T = string>({ options, handleSelectOption, handleDrilldown, activeItem, selectedIcon, externalLinkIcon, hideIcons, iconColumnWidth, hasSelectedItems, hasExpandableItems, hasItemsWithIcons, setActiveItem, expandLabel, }: DrilldownRenderOptionsProps<T>): (value: DrilldownItemType<T>, index: number, array: DrilldownItemType<T>[]) => ReactNode;
|
|
1256
1290
|
|
|
1257
1291
|
/**
|
|
1258
1292
|
* @public
|
|
@@ -1270,6 +1304,8 @@ export declare type DrilldownRenderOptionsProps<T> = {
|
|
|
1270
1304
|
hasExpandableItems: boolean;
|
|
1271
1305
|
hasItemsWithIcons: boolean;
|
|
1272
1306
|
setActiveItem?: (item: ActiveItem<T>) => void;
|
|
1307
|
+
/** Accessible label for each item's "expand subitems" button. */
|
|
1308
|
+
expandLabel?: string;
|
|
1273
1309
|
};
|
|
1274
1310
|
|
|
1275
1311
|
/**
|
|
@@ -1476,7 +1512,7 @@ export declare type DrilldownValueType<OriginalValue> = DrilldownValueTreeType<O
|
|
|
1476
1512
|
* </Dropdown>
|
|
1477
1513
|
* ```
|
|
1478
1514
|
*/
|
|
1479
|
-
export declare function Dropdown<T, TargetRef extends HTMLElement = any>({ children, options, stickyHeaderOptions, stickyFooterOptions, inputValue, searchPlaceholder, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, onCreateNewOption, hideIcons, iconColumnWidth, containerWidth, containerHeight, containerRef, onSelectOption, onInputChange, onFetchMore, onClear, onClose, onOpen, optionsRenderer, onInputReturn, tabProps, disabled, fetchMoreText, autoscrollText, externalLinkIcon, selectedIcon, layer, containerMaxHeight, openChildrenOnMouseOver, isSubItemDropdown, openSubmenuOnButtonHover, }: DropdownProps<T, TargetRef>): JSX.Element;
|
|
1515
|
+
export declare function Dropdown<T, TargetRef extends HTMLElement = any>({ children, options, stickyHeaderOptions, stickyFooterOptions, inputValue, searchPlaceholder, clearLabel, expandLabel, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, onCreateNewOption, hideIcons, iconColumnWidth, containerWidth, containerHeight, containerRef, onSelectOption, onInputChange, onFetchMore, onClear, onClose, onOpen, optionsRenderer, onInputReturn, tabProps, disabled, fetchMoreText, autoscrollText, externalLinkIcon, selectedIcon, layer, containerMaxHeight, openChildrenOnMouseOver, isSubItemDropdown, openSubmenuOnButtonHover, }: DropdownProps<T, TargetRef>): JSX.Element;
|
|
1480
1516
|
|
|
1481
1517
|
/**
|
|
1482
1518
|
* @public
|
|
@@ -1563,6 +1599,10 @@ export declare interface DropdownItemProps<T = unknown> {
|
|
|
1563
1599
|
setActiveValueIndex: (value: number | "createNew") => void;
|
|
1564
1600
|
valueOptions: DropdownValueType<T>[];
|
|
1565
1601
|
openSubmenuOnButtonHover?: boolean;
|
|
1602
|
+
/** Stable id for the option element, used for aria-activedescendant */
|
|
1603
|
+
optionId?: string;
|
|
1604
|
+
/** Accessible label for the "expand subitems" button. */
|
|
1605
|
+
expandLabel?: string;
|
|
1566
1606
|
}
|
|
1567
1607
|
|
|
1568
1608
|
/**
|
|
@@ -1604,6 +1644,12 @@ export declare interface DropdownProps<T, TargetRef extends HTMLElement> {
|
|
|
1604
1644
|
expandingDrillDown?: boolean;
|
|
1605
1645
|
/** Placeholder for search input box */
|
|
1606
1646
|
searchPlaceholder?: string;
|
|
1647
|
+
/** Accessible label for the search "clear" button. Provide a translated
|
|
1648
|
+
* string for i18n. Defaults to "Clear". */
|
|
1649
|
+
clearLabel?: string;
|
|
1650
|
+
/** Accessible label for an item's "expand subitems" button. Provide a
|
|
1651
|
+
* translated string for i18n. Defaults to "Expand". */
|
|
1652
|
+
expandLabel?: string;
|
|
1607
1653
|
/** Whether the dropdown should close on selections. default true */
|
|
1608
1654
|
closeOnSelect?: boolean;
|
|
1609
1655
|
/** Whether to hide item's icon for the whole list */
|
|
@@ -1681,7 +1727,7 @@ export declare interface DropdownProps<T, TargetRef extends HTMLElement> {
|
|
|
1681
1727
|
/**
|
|
1682
1728
|
* @public
|
|
1683
1729
|
*/
|
|
1684
|
-
export declare function dropdownRenderOptions<T = string>({ handleSelectOption, activeItem, activeSubItem, setActiveSubItem, fetchMoreText, autoscrollText, selectedIcon, externalLinkIcon, hasSelectedItems, hasExpandableItems, hideIcons, iconColumnWidth, openChildrenOnMouseOver, layer, setActiveValueIndex, valueOptions, openSubmenuOnButtonHover, }: DropdownRenderOptionsProps<T>): (value: DropdownItemType<T>, index: number, array: DropdownItemType<T>[]) => JSX.Element | null;
|
|
1730
|
+
export declare function dropdownRenderOptions<T = string>({ handleSelectOption, activeItem, activeSubItem, setActiveSubItem, fetchMoreText, autoscrollText, selectedIcon, externalLinkIcon, hasSelectedItems, hasExpandableItems, hideIcons, iconColumnWidth, openChildrenOnMouseOver, layer, setActiveValueIndex, valueOptions, openSubmenuOnButtonHover, listboxId, optionIndexOffset, expandLabel, }: DropdownRenderOptionsProps<T>): (value: DropdownItemType<T>, index: number, array: DropdownItemType<T>[]) => JSX.Element | null;
|
|
1685
1731
|
|
|
1686
1732
|
/**
|
|
1687
1733
|
* @public
|
|
@@ -1704,6 +1750,12 @@ export declare type DropdownRenderOptionsProps<T = string> = {
|
|
|
1704
1750
|
setActiveValueIndex: (value: number | "createNew") => void;
|
|
1705
1751
|
valueOptions: DropdownValueType<T>[];
|
|
1706
1752
|
openSubmenuOnButtonHover?: boolean;
|
|
1753
|
+
/** Listbox element id, used to derive stable option ids */
|
|
1754
|
+
listboxId?: string;
|
|
1755
|
+
/** Index offset within allValueOptions for the first value item in this batch */
|
|
1756
|
+
optionIndexOffset?: number;
|
|
1757
|
+
/** Accessible label for an item's "expand subitems" button. */
|
|
1758
|
+
expandLabel?: string;
|
|
1707
1759
|
};
|
|
1708
1760
|
|
|
1709
1761
|
/**
|
|
@@ -2231,7 +2283,7 @@ export declare type InaccessibleIconButton = {
|
|
|
2231
2283
|
* the container has scrolled to the top or bottom.
|
|
2232
2284
|
* @public
|
|
2233
2285
|
*/
|
|
2234
|
-
export declare function Infinite({ children, reverse, anchor, onFetchMore, onFetchMoreStart, status, startStatus, maxHeight, scrollSideEffect, width, fetchMoreText, autoscrollText, scrollRef: _scrollRef, justify, onResize, onJumpToStart, spinnerSize, }: InfiniteProps): React_2.JSX.Element;
|
|
2286
|
+
export declare function Infinite({ children, reverse, anchor, onFetchMore, onFetchMoreStart, status, startStatus, maxHeight, scrollSideEffect, width, fetchMoreText, autoscrollText, scrollRef: _scrollRef, justify, onResize, onJumpToStart, spinnerSize, loadingLabel, }: InfiniteProps): React_2.JSX.Element;
|
|
2235
2287
|
|
|
2236
2288
|
/**
|
|
2237
2289
|
* @public
|
|
@@ -2260,6 +2312,9 @@ export declare interface InfiniteProps {
|
|
|
2260
2312
|
onResize?: () => void;
|
|
2261
2313
|
onJumpToStart?: () => void;
|
|
2262
2314
|
spinnerSize?: SpinnerSize;
|
|
2315
|
+
/** Accessible label for the "loading more items" live region. Provide a
|
|
2316
|
+
* translated string for i18n. Defaults to "Loading more". */
|
|
2317
|
+
loadingLabel?: string;
|
|
2263
2318
|
}
|
|
2264
2319
|
|
|
2265
2320
|
/**
|
|
@@ -2272,7 +2327,7 @@ export declare type InfiniteScrollStatus = "loading" | "hasNextPage" | "end" | "
|
|
|
2272
2327
|
* the container has scrolled to the top or bottom.
|
|
2273
2328
|
* @public
|
|
2274
2329
|
*/
|
|
2275
|
-
export declare function InfiniteTopBottom({ children, reverse, anchor, onFetchMoreTop, onFetchMoreBottom, topStatus, bottomStatus, maxHeight, scrollSideEffect, onReAttach, newElements, newElementsText, autoscrollText, width, }: InfiniteTopBottomProps): React_2.JSX.Element;
|
|
2330
|
+
export declare function InfiniteTopBottom({ children, reverse, anchor, onFetchMoreTop, onFetchMoreBottom, topStatus, bottomStatus, maxHeight, scrollSideEffect, onReAttach, newElements, newElementsText, autoscrollText, width, loadingLabel, }: InfiniteTopBottomProps): React_2.JSX.Element;
|
|
2276
2331
|
|
|
2277
2332
|
/**
|
|
2278
2333
|
* @public
|
|
@@ -2295,6 +2350,9 @@ export declare interface InfiniteTopBottomProps {
|
|
|
2295
2350
|
autoscrollText: ReactNode;
|
|
2296
2351
|
scrollSideEffect?: () => void;
|
|
2297
2352
|
width?: string;
|
|
2353
|
+
/** Accessible label for the "loading more items" live regions. Provide a
|
|
2354
|
+
* translated string for i18n. Defaults to "Loading more". */
|
|
2355
|
+
loadingLabel?: string;
|
|
2298
2356
|
}
|
|
2299
2357
|
|
|
2300
2358
|
/**
|
|
@@ -2514,6 +2572,30 @@ export declare type Layers = {
|
|
|
2514
2572
|
*/
|
|
2515
2573
|
export declare const lightTheme: DeskproTheme;
|
|
2516
2574
|
|
|
2575
|
+
/**
|
|
2576
|
+
* An accessible anchor wrapper around StyledA/UnstyledA that automatically:
|
|
2577
|
+
* - ensures `rel` includes "noopener noreferrer" when `target="_blank"`
|
|
2578
|
+
* - appends a visually-hidden "(opens in new tab)" hint for screen readers
|
|
2579
|
+
*
|
|
2580
|
+
* @public
|
|
2581
|
+
*/
|
|
2582
|
+
export declare const Link: React_2.ForwardRefExoticComponent<LinkProps & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* Props for the accessible Link component.
|
|
2586
|
+
* @public
|
|
2587
|
+
*/
|
|
2588
|
+
export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
2589
|
+
/** When true the link text style is underlined. */
|
|
2590
|
+
underline?: boolean;
|
|
2591
|
+
/** Use "unstyled" to render without the cyan colour treatment. */
|
|
2592
|
+
variant?: "default" | "unstyled";
|
|
2593
|
+
/** Visually-hidden hint appended for `target="_blank"` links so screen readers
|
|
2594
|
+
* announce that the link opens in a new tab. Provide a translated string for
|
|
2595
|
+
* i18n. Defaults to "(opens in new tab)". */
|
|
2596
|
+
newTabLabel?: string;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2517
2599
|
/**
|
|
2518
2600
|
* @public
|
|
2519
2601
|
*/
|
|
@@ -2557,9 +2639,12 @@ export declare interface LoadingAttachmentProps {
|
|
|
2557
2639
|
}
|
|
2558
2640
|
|
|
2559
2641
|
/**
|
|
2642
|
+
* A skeleton placeholder block. Decorative — hidden from assistive technology.
|
|
2643
|
+
* Wrap one or more LoadingBlocks in {@link LoadingState} to announce loading to screen readers.
|
|
2560
2644
|
* @public
|
|
2561
2645
|
*/
|
|
2562
2646
|
export declare const LoadingBlock: StyledComponent<"div", DefaultTheme, {
|
|
2647
|
+
"aria-hidden": boolean | "true";
|
|
2563
2648
|
"data-dp-name": string;
|
|
2564
2649
|
"data-dp-ident"?: string;
|
|
2565
2650
|
} & {
|
|
@@ -2567,15 +2652,39 @@ height?: number;
|
|
|
2567
2652
|
width?: number | string | "stretch";
|
|
2568
2653
|
round?: boolean;
|
|
2569
2654
|
animate?: boolean;
|
|
2570
|
-
},
|
|
2571
|
-
"data-dp-name": string;
|
|
2572
|
-
"data-dp-ident"?: string;
|
|
2573
|
-
}>;
|
|
2655
|
+
}, "aria-hidden" | "data-dp-ident" | "data-dp-name">;
|
|
2574
2656
|
|
|
2575
2657
|
/**
|
|
2658
|
+
* A live region that wraps skeleton {@link LoadingBlock} placeholders and
|
|
2659
|
+
* announces a loading state to assistive technology exactly once — instead of
|
|
2660
|
+
* reading every individual skeleton shape.
|
|
2661
|
+
*
|
|
2662
|
+
* ```tsx
|
|
2663
|
+
* <LoadingState>
|
|
2664
|
+
* <LoadingBlock width="stretch" />
|
|
2665
|
+
* <LoadingBlock width={200} />
|
|
2666
|
+
* </LoadingState>
|
|
2667
|
+
* ```
|
|
2668
|
+
*
|
|
2576
2669
|
* @public
|
|
2577
2670
|
*/
|
|
2578
|
-
export declare function
|
|
2671
|
+
export declare function LoadingState({ children, label }: LoadingStateProps): React_2.JSX.Element;
|
|
2672
|
+
|
|
2673
|
+
/**
|
|
2674
|
+
* @public
|
|
2675
|
+
*/
|
|
2676
|
+
export declare interface LoadingStateProps {
|
|
2677
|
+
children: ReactNode;
|
|
2678
|
+
/** Accessible label announced to screen readers. Defaults to "Loading". */
|
|
2679
|
+
label?: string;
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
/**
|
|
2683
|
+
* Menu container implementing the WAI-ARIA menu pattern.
|
|
2684
|
+
* Handles roving tabindex keyboard navigation (ArrowUp/Down/Home/End).
|
|
2685
|
+
* @public
|
|
2686
|
+
*/
|
|
2687
|
+
export declare function Menu({ fill, hasElevation, children, type, onKeyDown, ...props }: MenuProps): React_2.JSX.Element;
|
|
2579
2688
|
|
|
2580
2689
|
/**
|
|
2581
2690
|
* @public
|
|
@@ -2591,6 +2700,8 @@ export declare type MenuDividerProps = HTMLAttributes<HTMLLIElement> & {
|
|
|
2591
2700
|
};
|
|
2592
2701
|
|
|
2593
2702
|
/**
|
|
2703
|
+
* Menu item implementing the WAI-ARIA menuitem role with keyboard support.
|
|
2704
|
+
* When `children` are provided the item acts as a submenu trigger.
|
|
2594
2705
|
* @public
|
|
2595
2706
|
*/
|
|
2596
2707
|
export declare const MenuItem: React_2.ForwardRefExoticComponent<Omit<MenuItemProps, "ref"> & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -2646,12 +2757,12 @@ export declare type MessageCardType = "pending" | "agent" | "user";
|
|
|
2646
2757
|
/**
|
|
2647
2758
|
* @public
|
|
2648
2759
|
*/
|
|
2649
|
-
export declare function Modal({ isOpen, canClickOutsideClose, canEscClose, children, hasBackdrop, onRequestClose, closeIcon, autofocus, height, width, hideClose, top, bottom, left, right, zIndex, size, header, content, footer, }: ModalProps): React_2.JSX.Element;
|
|
2760
|
+
export declare function Modal({ isOpen, canClickOutsideClose, canEscClose, children, hasBackdrop, onRequestClose, closeIcon, closeLabel, autofocus, height, width, hideClose, top, bottom, left, right, zIndex, size, header, content, footer, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }: ModalProps): React_2.JSX.Element;
|
|
2650
2761
|
|
|
2651
2762
|
/**
|
|
2652
2763
|
* @public
|
|
2653
2764
|
*/
|
|
2654
|
-
export declare function ModalHeader({ title, backgroundColor, color, children, size }: ModalHeaderProps): React_2.JSX.Element;
|
|
2765
|
+
export declare function ModalHeader({ title, backgroundColor, color, children, size, titleId, }: ModalHeaderProps): React_2.JSX.Element;
|
|
2655
2766
|
|
|
2656
2767
|
/**
|
|
2657
2768
|
* @public
|
|
@@ -2662,6 +2773,8 @@ export declare interface ModalHeaderProps {
|
|
|
2662
2773
|
color?: ThemeColorKey;
|
|
2663
2774
|
children?: ReactNode;
|
|
2664
2775
|
size?: HeaderSize;
|
|
2776
|
+
/** Id applied to the title, so a Modal can reference it via aria-labelledby. */
|
|
2777
|
+
titleId?: string;
|
|
2665
2778
|
}
|
|
2666
2779
|
|
|
2667
2780
|
/**
|
|
@@ -2682,6 +2795,16 @@ export declare interface ModalProps extends Omit<OverlayProps, "scrollable"> {
|
|
|
2682
2795
|
header?: React_2.ReactNode;
|
|
2683
2796
|
content?: React_2.ReactNode;
|
|
2684
2797
|
footer?: React_2.ReactNode;
|
|
2798
|
+
/** Accessible label for the close button. Provide a translated string for
|
|
2799
|
+
* i18n. Defaults to "Close". */
|
|
2800
|
+
closeLabel?: string;
|
|
2801
|
+
/** Accessible name for the modal. Provide this (or `aria-labelledby`) when no
|
|
2802
|
+
* `header` is rendered, so screen readers announce what the modal is. */
|
|
2803
|
+
"aria-label"?: string;
|
|
2804
|
+
/** Id of the element that labels the modal. Defaults to the rendered header. */
|
|
2805
|
+
"aria-labelledby"?: string;
|
|
2806
|
+
/** Id of the element that describes the modal. */
|
|
2807
|
+
"aria-describedby"?: string;
|
|
2685
2808
|
}
|
|
2686
2809
|
|
|
2687
2810
|
/**
|
|
@@ -2746,7 +2869,7 @@ export declare const NonIdealContainerTop: StyledComponent<"div", DefaultTheme,
|
|
|
2746
2869
|
/**
|
|
2747
2870
|
* @public
|
|
2748
2871
|
*/
|
|
2749
|
-
export declare function NonIdealState({ title, description, icon, action, vertical, children, }: NonIdealStateProps): React_2.JSX.Element;
|
|
2872
|
+
export declare function NonIdealState({ title, description, icon, action, vertical, children, titleAs, }: NonIdealStateProps): React_2.JSX.Element;
|
|
2750
2873
|
|
|
2751
2874
|
/**
|
|
2752
2875
|
* @public
|
|
@@ -2758,21 +2881,30 @@ export declare interface NonIdealStateProps {
|
|
|
2758
2881
|
action?: ReactNode;
|
|
2759
2882
|
children?: ReactNode;
|
|
2760
2883
|
vertical?: boolean;
|
|
2884
|
+
/**
|
|
2885
|
+
* HTML element to render the title as. Defaults to "h1" (matching the
|
|
2886
|
+
* existing `type="h0"` behaviour). Pass "h2", "h3", etc. when this
|
|
2887
|
+
* component is not at the top of the document outline.
|
|
2888
|
+
*/
|
|
2889
|
+
titleAs?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span";
|
|
2761
2890
|
}
|
|
2762
2891
|
|
|
2763
2892
|
/**
|
|
2764
2893
|
* @public
|
|
2765
2894
|
*/
|
|
2766
|
-
export declare const OptionTag: ({ icon, displayName, withClose, onClose, ...rest }: OptionTagProps) => React_2.JSX.Element;
|
|
2895
|
+
export declare const OptionTag: ({ icon, displayName, withClose, onClose, removeLabel, ...rest }: OptionTagProps) => React_2.JSX.Element;
|
|
2767
2896
|
|
|
2768
2897
|
/**
|
|
2769
2898
|
* @public
|
|
2770
2899
|
*/
|
|
2771
|
-
export declare interface OptionTagProps extends
|
|
2900
|
+
export declare interface OptionTagProps extends HTMLAttributes<HTMLDivElement> {
|
|
2772
2901
|
icon?: AnyIcon;
|
|
2773
2902
|
displayName: string;
|
|
2774
2903
|
withClose?: boolean;
|
|
2775
2904
|
onClose?: (e: MouseEvent_2<HTMLButtonElement>) => void;
|
|
2905
|
+
/** Accessible label for the remove button. Provide a translated string for
|
|
2906
|
+
* i18n. Defaults to `Remove {displayName}`. */
|
|
2907
|
+
removeLabel?: string;
|
|
2776
2908
|
}
|
|
2777
2909
|
|
|
2778
2910
|
/**
|
|
@@ -2955,7 +3087,7 @@ type: string;
|
|
|
2955
3087
|
/**
|
|
2956
3088
|
* @public
|
|
2957
3089
|
*/
|
|
2958
|
-
export declare function Pagination({ perPage, currentPage, totalItems, uniqueItems, onPageChange, onPerPageChange, displayItems, itemsPerPageText, ofTotalText, uniqueItemsText, }: PaginationProps): JSX.Element;
|
|
3090
|
+
export declare function Pagination({ perPage, currentPage, totalItems, uniqueItems, onPageChange, onPerPageChange, displayItems, itemsPerPageText, ofTotalText, uniqueItemsText, navigationLabel, previousPageLabel, nextPageLabel, itemsPerPageLabel, pageLabel, }: PaginationProps): JSX.Element;
|
|
2959
3091
|
|
|
2960
3092
|
/**
|
|
2961
3093
|
* @public
|
|
@@ -2973,6 +3105,13 @@ export declare interface PaginationProps {
|
|
|
2973
3105
|
ofTotalText: string;
|
|
2974
3106
|
/** A string which includes \{unique\}, which internally will be replaced by a number e.g. \"(\{unique\} Unique items)\" */
|
|
2975
3107
|
uniqueItemsText: string;
|
|
3108
|
+
/** Accessible labels for the pagination controls. Provide translated strings
|
|
3109
|
+
* for i18n; each defaults to its English equivalent. */
|
|
3110
|
+
navigationLabel?: string;
|
|
3111
|
+
previousPageLabel?: string;
|
|
3112
|
+
nextPageLabel?: string;
|
|
3113
|
+
itemsPerPageLabel?: string;
|
|
3114
|
+
pageLabel?: string;
|
|
2976
3115
|
}
|
|
2977
3116
|
|
|
2978
3117
|
/**
|
|
@@ -3063,6 +3202,7 @@ export { Placement }
|
|
|
3063
3202
|
export declare function Popover(props: PopoverProps): JSX.Element;
|
|
3064
3203
|
|
|
3065
3204
|
/**
|
|
3205
|
+
* Props passed to the render-prop children of Popover.
|
|
3066
3206
|
* @public
|
|
3067
3207
|
*/
|
|
3068
3208
|
export declare interface PopoverChildrenProps {
|
|
@@ -3074,6 +3214,30 @@ export declare interface PopoverChildrenProps {
|
|
|
3074
3214
|
onMouseLeave?: MouseEventHandler;
|
|
3075
3215
|
/** Ref to the target element */
|
|
3076
3216
|
ref: Ref<any>;
|
|
3217
|
+
/**
|
|
3218
|
+
* The id applied to the popover content container.
|
|
3219
|
+
* Spread `triggerProps` onto your trigger element to wire ARIA automatically,
|
|
3220
|
+
* or use this id directly with your own `aria-controls`.
|
|
3221
|
+
*/
|
|
3222
|
+
contentId: string;
|
|
3223
|
+
/**
|
|
3224
|
+
* Ready-made ARIA props for the trigger element.
|
|
3225
|
+
* Contains `aria-controls`, `aria-expanded`, and optionally `aria-haspopup`
|
|
3226
|
+
* (when you pass `contentRole` to Popover). Spread onto the trigger:
|
|
3227
|
+
*
|
|
3228
|
+
* ```tsx
|
|
3229
|
+
* <Popover contentRole="menu" ...>
|
|
3230
|
+
* {({ ref, triggerProps, ...handlers }) => (
|
|
3231
|
+
* <button ref={ref} {...triggerProps} {...handlers}>Open</button>
|
|
3232
|
+
* )}
|
|
3233
|
+
* </Popover>
|
|
3234
|
+
* ```
|
|
3235
|
+
*/
|
|
3236
|
+
triggerProps: {
|
|
3237
|
+
"aria-controls": string;
|
|
3238
|
+
"aria-expanded": boolean;
|
|
3239
|
+
"aria-haspopup"?: AriaAttributes["aria-haspopup"];
|
|
3240
|
+
};
|
|
3077
3241
|
}
|
|
3078
3242
|
|
|
3079
3243
|
/**
|
|
@@ -3108,6 +3272,18 @@ export declare interface PopoverProps {
|
|
|
3108
3272
|
modifiers?: StrictModifiers[] | undefined;
|
|
3109
3273
|
onOpenStateChange?: (isOpen: boolean) => void;
|
|
3110
3274
|
style?: MotionStyle;
|
|
3275
|
+
/**
|
|
3276
|
+
* When set, populates `aria-haspopup` on the trigger via `triggerProps`.
|
|
3277
|
+
* Typically `"menu"` when the popover contains a Menu. Opt-in only — omit
|
|
3278
|
+
* to leave `aria-haspopup` off the trigger (preserving existing behaviour
|
|
3279
|
+
* for plain popovers / tooltips).
|
|
3280
|
+
*/
|
|
3281
|
+
contentRole?: AriaAttributes["aria-haspopup"];
|
|
3282
|
+
/**
|
|
3283
|
+
* An explicit id to apply to the popover content container.
|
|
3284
|
+
* A stable generated id is used when omitted.
|
|
3285
|
+
*/
|
|
3286
|
+
contentId?: string;
|
|
3111
3287
|
}
|
|
3112
3288
|
|
|
3113
3289
|
/**
|
|
@@ -3335,7 +3511,7 @@ export declare interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
3335
3511
|
/**
|
|
3336
3512
|
* @public
|
|
3337
3513
|
*/
|
|
3338
|
-
export declare const RoundedLabelTag: ({ label, withClose, onCloseClick, onLabelClick, closeIcon, capitalize, className, addMargin, icon, size, backgroundColor, borderColor, textColor, }: RoundedLabelTagProps) => React_2.JSX.Element;
|
|
3514
|
+
export declare const RoundedLabelTag: ({ label, withClose, onCloseClick, onLabelClick, closeIcon, capitalize, className, addMargin, icon, size, backgroundColor, borderColor, textColor, removeLabel, }: RoundedLabelTagProps) => React_2.JSX.Element;
|
|
3339
3515
|
|
|
3340
3516
|
/**
|
|
3341
3517
|
* @public
|
|
@@ -3354,6 +3530,9 @@ export declare interface RoundedLabelTagProps {
|
|
|
3354
3530
|
addMargin?: boolean;
|
|
3355
3531
|
icon?: AnyIcon;
|
|
3356
3532
|
size?: "small" | "medium" | "large";
|
|
3533
|
+
/** Accessible label for the remove button. Provide a translated string for
|
|
3534
|
+
* i18n. Defaults to `Remove {label}`. */
|
|
3535
|
+
removeLabel?: string;
|
|
3357
3536
|
}
|
|
3358
3537
|
|
|
3359
3538
|
/**
|
|
@@ -3458,7 +3637,7 @@ export declare type SpacerProps = {
|
|
|
3458
3637
|
/**
|
|
3459
3638
|
* @public
|
|
3460
3639
|
*/
|
|
3461
|
-
export declare function Spinner({ size, color }: SpinnerProps): React_2.JSX.Element;
|
|
3640
|
+
export declare function Spinner({ size, color, "aria-label": ariaLabel, "aria-hidden": ariaHidden, }: SpinnerProps): React_2.JSX.Element;
|
|
3462
3641
|
|
|
3463
3642
|
/**
|
|
3464
3643
|
* @public
|
|
@@ -3466,6 +3645,13 @@ export declare function Spinner({ size, color }: SpinnerProps): React_2.JSX.Elem
|
|
|
3466
3645
|
export declare interface SpinnerProps {
|
|
3467
3646
|
size?: SpinnerSize;
|
|
3468
3647
|
color?: ThemeColorKey;
|
|
3648
|
+
/** Accessible label announced to screen readers. Defaults to "Loading". */
|
|
3649
|
+
"aria-label"?: string;
|
|
3650
|
+
/**
|
|
3651
|
+
* Set to "true" when the spinner is nested inside a parent live region that
|
|
3652
|
+
* already announces the loading state, so it is not read out twice.
|
|
3653
|
+
*/
|
|
3654
|
+
"aria-hidden"?: React_2.AriaAttributes["aria-hidden"];
|
|
3469
3655
|
}
|
|
3470
3656
|
|
|
3471
3657
|
/**
|
|
@@ -3627,7 +3813,7 @@ export declare const Tab: React_2.ForwardRefExoticComponent<TabProps & React_2.R
|
|
|
3627
3813
|
/**
|
|
3628
3814
|
* @public
|
|
3629
3815
|
*/
|
|
3630
|
-
export declare const TabBar: ({ tabs, activeIndex, onClickTab, type, isTicketHistory, tooltipStyle, tooltipPlacement, containerStyles, className, ...rest }: TabBarProps) => React_2.JSX.Element;
|
|
3816
|
+
export declare const TabBar: ({ tabs, activeIndex, onClickTab, type, isTicketHistory, tooltipStyle, tooltipPlacement, containerStyles, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, id: providedId, ...rest }: TabBarProps) => React_2.JSX.Element;
|
|
3631
3817
|
|
|
3632
3818
|
/**
|
|
3633
3819
|
* @public
|
|
@@ -3652,6 +3838,11 @@ export declare interface TabBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3652
3838
|
tooltipPlacement?: TooltipPlacement;
|
|
3653
3839
|
containerStyles?: CSSProperties_2;
|
|
3654
3840
|
className?: string;
|
|
3841
|
+
/** Accessible label for the tablist */
|
|
3842
|
+
"aria-label"?: string;
|
|
3843
|
+
/** Id of the element that labels this tablist */
|
|
3844
|
+
"aria-labelledby"?: string;
|
|
3845
|
+
id?: string;
|
|
3655
3846
|
}
|
|
3656
3847
|
|
|
3657
3848
|
/**
|
|
@@ -3662,6 +3853,7 @@ export declare interface TabBarTabProps {
|
|
|
3662
3853
|
label: ReactNode;
|
|
3663
3854
|
active: boolean;
|
|
3664
3855
|
onClick: () => void;
|
|
3856
|
+
onKeyDown?: (event: KeyboardEvent_2<HTMLDivElement>) => void;
|
|
3665
3857
|
type: TabType;
|
|
3666
3858
|
disabled?: boolean;
|
|
3667
3859
|
isTicketHistory?: boolean;
|
|
@@ -3695,12 +3887,18 @@ export declare interface TabbedSectionProps<TabId> {
|
|
|
3695
3887
|
isTicketHistory?: boolean;
|
|
3696
3888
|
tabType?: "button" | "tab";
|
|
3697
3889
|
className?: string;
|
|
3890
|
+
/** Explicit id for the tablist element */
|
|
3891
|
+
id?: string;
|
|
3892
|
+
/** Accessible label for the tablist */
|
|
3893
|
+
"aria-label"?: string;
|
|
3894
|
+
/** Id of the element that labels this tablist */
|
|
3895
|
+
"aria-labelledby"?: string;
|
|
3698
3896
|
}
|
|
3699
3897
|
|
|
3700
3898
|
/**
|
|
3701
3899
|
* @public
|
|
3702
3900
|
*/
|
|
3703
|
-
export declare function TabbedSectionTabs<TabId = string>({ tabs, activeTab, onTabChange, children, tabsWrapperStyles, rightElement, tabType, className, }: TabbedSectionProps<TabId>): React_2.JSX.Element;
|
|
3901
|
+
export declare function TabbedSectionTabs<TabId = string>({ tabs, activeTab, onTabChange, children, tabsWrapperStyles, rightElement, tabType, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, id: providedId, }: TabbedSectionProps<TabId>): React_2.JSX.Element;
|
|
3704
3902
|
|
|
3705
3903
|
/**
|
|
3706
3904
|
* @public
|
|
@@ -3725,14 +3923,31 @@ export declare interface TabProps extends HTMLAttributes<HTMLAnchorElement> {
|
|
|
3725
3923
|
active?: boolean;
|
|
3726
3924
|
fill?: boolean;
|
|
3727
3925
|
hasOptions?: boolean;
|
|
3926
|
+
/** Provide a stable id for aria-controls / aria-labelledby wiring */
|
|
3927
|
+
id?: string;
|
|
3928
|
+
/** Id of the tabpanel this tab controls */
|
|
3929
|
+
"aria-controls"?: string;
|
|
3728
3930
|
}
|
|
3729
3931
|
|
|
3730
3932
|
/**
|
|
3731
3933
|
* @public
|
|
3732
3934
|
*/
|
|
3733
|
-
export declare function Tabs({ children }:
|
|
3935
|
+
export declare function Tabs({ children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-orientation": ariaOrientation, id: providedId, }: TabsProps): React_2.JSX.Element;
|
|
3936
|
+
|
|
3937
|
+
/**
|
|
3938
|
+
* Props for the Tabs container (tablist).
|
|
3939
|
+
* @public
|
|
3940
|
+
*/
|
|
3941
|
+
export declare interface TabsProps {
|
|
3734
3942
|
children: ReactNode;
|
|
3735
|
-
|
|
3943
|
+
/** Accessible label for the tablist — provide when the context does not supply a visible heading */
|
|
3944
|
+
"aria-label"?: string;
|
|
3945
|
+
/** Id of the element that labels this tablist */
|
|
3946
|
+
"aria-labelledby"?: string;
|
|
3947
|
+
/** Set to "vertical" when the tablist is laid out vertically */
|
|
3948
|
+
"aria-orientation"?: "horizontal" | "vertical";
|
|
3949
|
+
id?: string;
|
|
3950
|
+
}
|
|
3736
3951
|
|
|
3737
3952
|
export declare type TabStyleDef = {
|
|
3738
3953
|
container?: () => FlattenInterpolation<ThemeProps<DefaultTheme>>;
|
|
@@ -3764,7 +3979,7 @@ export declare type TabType = keyof TabStyles;
|
|
|
3764
3979
|
/**
|
|
3765
3980
|
* @public
|
|
3766
3981
|
*/
|
|
3767
|
-
export declare const Tag: ({ color, label, withClose, onCloseClick, onLabelClick, closeIcon, capitalize, className, addMargin, icon, size, maxWidth, }: TagProps) => React_2.JSX.Element;
|
|
3982
|
+
export declare const Tag: ({ color, label, withClose, onCloseClick, onLabelClick, closeIcon, capitalize, className, addMargin, icon, size, maxWidth, removeLabel, }: TagProps) => React_2.JSX.Element;
|
|
3768
3983
|
|
|
3769
3984
|
/**
|
|
3770
3985
|
* @public
|
|
@@ -3846,6 +4061,9 @@ export declare interface TagProps {
|
|
|
3846
4061
|
icon?: AnyIcon;
|
|
3847
4062
|
size?: "small" | "large";
|
|
3848
4063
|
maxWidth?: number;
|
|
4064
|
+
/** Accessible label for the remove button. Provide a translated string for
|
|
4065
|
+
* i18n. Defaults to `Remove {label}`. */
|
|
4066
|
+
removeLabel?: string;
|
|
3849
4067
|
}
|
|
3850
4068
|
|
|
3851
4069
|
/**
|
|
@@ -4188,7 +4406,7 @@ duration?: number;
|
|
|
4188
4406
|
/**
|
|
4189
4407
|
* @public
|
|
4190
4408
|
*/
|
|
4191
|
-
export declare function TooltipCommonIcon({ content, styleType, placement, iconSize, }: TooltipCommonIconProps): React_2.JSX.Element;
|
|
4409
|
+
export declare function TooltipCommonIcon({ content, styleType, placement, iconSize, icon, }: TooltipCommonIconProps): React_2.JSX.Element;
|
|
4192
4410
|
|
|
4193
4411
|
/**
|
|
4194
4412
|
* @public
|
|
@@ -4198,6 +4416,7 @@ export declare interface TooltipCommonIconProps {
|
|
|
4198
4416
|
content: string;
|
|
4199
4417
|
placement?: "top" | "bottom" | "left" | "right";
|
|
4200
4418
|
iconSize?: number;
|
|
4419
|
+
icon?: AnyIcon;
|
|
4201
4420
|
}
|
|
4202
4421
|
|
|
4203
4422
|
/**
|
|
@@ -4252,7 +4471,7 @@ export declare interface TooltipProps {
|
|
|
4252
4471
|
/**
|
|
4253
4472
|
* @public
|
|
4254
4473
|
*/
|
|
4255
|
-
export declare const TooltipTrigger: ({ triggerRef, isOpen, interactive, visible, handleClose, handleOpen, openDelay, closeDelay, delayOpenRef, delayCloseRef, setTooltipTriggerMousePosition, safePolygon, dpName, children, }: TooltipTriggerProps) => React_2.JSX.Element;
|
|
4474
|
+
export declare const TooltipTrigger: ({ triggerRef, isOpen, tooltipId, interactive, visible, handleClose, handleOpen, openDelay, closeDelay, delayOpenRef, delayCloseRef, setTooltipTriggerMousePosition, safePolygon, dpName, children, }: TooltipTriggerProps) => React_2.JSX.Element;
|
|
4256
4475
|
|
|
4257
4476
|
/**
|
|
4258
4477
|
* @public
|
|
@@ -4260,6 +4479,8 @@ export declare const TooltipTrigger: ({ triggerRef, isOpen, interactive, visible
|
|
|
4260
4479
|
export declare type TooltipTriggerProps = {
|
|
4261
4480
|
triggerRef: Ref<HTMLDivElement>;
|
|
4262
4481
|
isOpen: boolean;
|
|
4482
|
+
/** Id of the tooltip content, linked via aria-describedby while open. */
|
|
4483
|
+
tooltipId?: string;
|
|
4263
4484
|
interactive?: boolean;
|
|
4264
4485
|
visible?: boolean;
|
|
4265
4486
|
openDelay?: number;
|
|
@@ -4388,6 +4609,27 @@ export declare const UrgencyStatus: StyledComponent<typeof UrgencyCircle, Defaul
|
|
|
4388
4609
|
*/
|
|
4389
4610
|
export declare function useFastField<Val = any>(propsOrFieldName: string | FieldHookConfig<Val>): [FieldInputProps<Val>, FieldMetaProps<Val>, FieldHelperProps<Val>];
|
|
4390
4611
|
|
|
4612
|
+
/**
|
|
4613
|
+
* Returns a stable, unique id suitable for wiring ARIA relationships
|
|
4614
|
+
* (`aria-labelledby`, `aria-describedby`, `aria-controls`, `htmlFor`, the
|
|
4615
|
+
* `tab` ↔ `tabpanel` pairing, etc).
|
|
4616
|
+
*
|
|
4617
|
+
* Wraps React 18's `useId` and lets a caller-supplied id take precedence, so a
|
|
4618
|
+
* component can accept an explicit `id` prop while falling back to a generated
|
|
4619
|
+
* one. An optional prefix makes ids more readable in the DOM/tests.
|
|
4620
|
+
*
|
|
4621
|
+
* ```tsx
|
|
4622
|
+
* const errorId = useId(props.id ? `${props.id}-error` : undefined, "dp-error");
|
|
4623
|
+
* <input aria-describedby={hasError ? errorId : undefined} />
|
|
4624
|
+
* {hasError && <span id={errorId}>{errorMessage}</span>}
|
|
4625
|
+
* ```
|
|
4626
|
+
*
|
|
4627
|
+
* @param providedId An explicit id to use instead of a generated one.
|
|
4628
|
+
* @param prefix Optional human-readable prefix for the generated id.
|
|
4629
|
+
* @public
|
|
4630
|
+
*/
|
|
4631
|
+
export declare function useId(providedId?: string, prefix?: string): string;
|
|
4632
|
+
|
|
4391
4633
|
export declare const useOnLocationChange: (callback?: () => void) => void;
|
|
4392
4634
|
|
|
4393
4635
|
/**
|
|
@@ -4539,6 +4781,51 @@ export declare const v2Styles: {
|
|
|
4539
4781
|
h_h6_kerning: FlattenInterpolation<ThemeProps<DefaultTheme>>;
|
|
4540
4782
|
};
|
|
4541
4783
|
|
|
4784
|
+
/**
|
|
4785
|
+
* Renders content that is available to screen readers but hidden visually.
|
|
4786
|
+
*
|
|
4787
|
+
* ```tsx
|
|
4788
|
+
* <button>
|
|
4789
|
+
* <Icon icon={faTrash} aria-hidden />
|
|
4790
|
+
* <VisuallyHidden>Delete item</VisuallyHidden>
|
|
4791
|
+
* </button>
|
|
4792
|
+
* ```
|
|
4793
|
+
*
|
|
4794
|
+
* @public
|
|
4795
|
+
*/
|
|
4796
|
+
export declare const VisuallyHidden: StyledComponent<"span", DefaultTheme, {
|
|
4797
|
+
"data-dp-name": string;
|
|
4798
|
+
"data-dp-ident"?: string;
|
|
4799
|
+
} & VisuallyHiddenProps, keyof {
|
|
4800
|
+
"data-dp-name": string;
|
|
4801
|
+
"data-dp-ident"?: string;
|
|
4802
|
+
}>;
|
|
4803
|
+
|
|
4804
|
+
/**
|
|
4805
|
+
* The canonical "visually hidden" CSS recipe. Removes an element from the
|
|
4806
|
+
* visual layout while keeping it in the accessibility tree **and** the tab
|
|
4807
|
+
* order — unlike `display: none` or `visibility: hidden`, which remove the
|
|
4808
|
+
* element from both.
|
|
4809
|
+
*
|
|
4810
|
+
* Use this for:
|
|
4811
|
+
* - Real form controls that are visually replaced by a custom-styled element
|
|
4812
|
+
* (e.g. the `<input>` behind a styled Checkbox/Radio/Toggle), so screen
|
|
4813
|
+
* readers and keyboard users can still reach the real control.
|
|
4814
|
+
* - Text that should be announced to assistive technology but not shown
|
|
4815
|
+
* (via the {@link VisuallyHidden} component below).
|
|
4816
|
+
*
|
|
4817
|
+
* @public
|
|
4818
|
+
*/
|
|
4819
|
+
export declare const visuallyHidden: FlattenSimpleInterpolation;
|
|
4820
|
+
|
|
4821
|
+
/**
|
|
4822
|
+
* @public
|
|
4823
|
+
*/
|
|
4824
|
+
export declare interface VisuallyHiddenProps {
|
|
4825
|
+
/** The element to render. Defaults to `span`. */
|
|
4826
|
+
as?: ElementType;
|
|
4827
|
+
}
|
|
4828
|
+
|
|
4542
4829
|
/**
|
|
4543
4830
|
* @public
|
|
4544
4831
|
*/
|