@codecademy/gamut 67.5.2 → 67.5.3-alpha.89afdd.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/Tip/InfoTip/InfoTipButton.js +5 -2
- package/dist/Tip/InfoTip/index.d.ts +8 -0
- package/dist/Tip/InfoTip/index.js +38 -68
- package/dist/Tip/__tests__/helpers.d.ts +3 -21
- package/dist/Tip/shared/FloatingTip.js +3 -3
- package/dist/Tip/shared/InlineTip.js +4 -1
- package/dist/Tip/shared/types.d.ts +1 -1
- package/package.json +2 -2
- package/dist/Tip/InfoTip/elements.d.ts +0 -12
- package/dist/Tip/InfoTip/elements.js +0 -9
|
@@ -8,14 +8,17 @@ export const InfoTipButton = /*#__PURE__*/forwardRef(({
|
|
|
8
8
|
active,
|
|
9
9
|
children,
|
|
10
10
|
emphasis,
|
|
11
|
+
'aria-label': ariaLabel,
|
|
12
|
+
'aria-labelledby': ariaLabelledby,
|
|
11
13
|
...props
|
|
12
14
|
}, ref) => {
|
|
13
15
|
const Icon = emphasis === 'high' ? MiniInfoCircleIcon : MiniInfoOutlineIcon;
|
|
14
16
|
return /*#__PURE__*/_jsxs(InfoTipButtonBase, {
|
|
17
|
+
...props,
|
|
15
18
|
active: active,
|
|
16
19
|
"aria-expanded": active,
|
|
17
|
-
"aria-label":
|
|
18
|
-
|
|
20
|
+
"aria-label": ariaLabel,
|
|
21
|
+
"aria-labelledby": ariaLabelledby,
|
|
19
22
|
ref: ref,
|
|
20
23
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
|
21
24
|
"aria-hidden": true,
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
import { TipBaseAlignment, TipBaseProps } from '../shared/types';
|
|
3
3
|
export type InfoTipProps = TipBaseProps & {
|
|
4
4
|
alignment?: TipBaseAlignment;
|
|
5
|
+
/**
|
|
6
|
+
* Accessible label for the InfoTip button. Its recommended to provide either `ariaLabel` or `ariaLabelledby`.
|
|
7
|
+
*/
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
/**
|
|
10
|
+
* ID of an element that labels the InfoTip button. Its recommended to provide either `ariaLabel` or `ariaLabelledby`.
|
|
11
|
+
*/
|
|
12
|
+
ariaLabelledby?: string;
|
|
5
13
|
emphasis?: 'low' | 'high';
|
|
6
14
|
/**
|
|
7
15
|
* Called when the info tip is clicked - the onClick function is called after the DOM updates and the tip is mounted.
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { getFocusableElements as getFocusableElementsUtil } from '../../utils/focus';
|
|
3
|
-
import { extractTextContent } from '../../utils/react';
|
|
4
3
|
import { FloatingTip } from '../shared/FloatingTip';
|
|
5
4
|
import { InlineTip } from '../shared/InlineTip';
|
|
6
5
|
import { tipDefaultProps } from '../shared/types';
|
|
7
6
|
import { isElementVisible } from '../shared/utils';
|
|
8
|
-
import { ScreenreaderNavigableText } from './elements';
|
|
9
7
|
import { InfoTipButton } from './InfoTipButton';
|
|
10
|
-
import { jsx as _jsx
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
// Match native dialogs with open attribute, and role-based dialogs that aren't aria-hidden
|
|
14
|
-
const MODAL_SELECTOR = 'dialog[open],[role="dialog"]:not([aria-hidden="true"]),[role="alertdialog"]:not([aria-hidden="true"])';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const MODAL_SELECTOR = 'dialog[open],[role="dialog"],[role="alertdialog"]';
|
|
15
10
|
export const InfoTip = ({
|
|
16
11
|
alignment = 'top-right',
|
|
12
|
+
ariaLabel,
|
|
13
|
+
ariaLabelledby,
|
|
17
14
|
emphasis = 'low',
|
|
18
15
|
info,
|
|
19
16
|
onClick,
|
|
@@ -22,25 +19,14 @@ export const InfoTip = ({
|
|
|
22
19
|
}) => {
|
|
23
20
|
const isFloating = placement === 'floating';
|
|
24
21
|
const [isTipHidden, setHideTip] = useState(true);
|
|
25
|
-
const [isAriaHidden, setIsAriaHidden] = useState(false);
|
|
26
|
-
const [shouldAnnounce, setShouldAnnounce] = useState(false);
|
|
27
22
|
const [loaded, setLoaded] = useState(false);
|
|
28
23
|
const wrapperRef = useRef(null);
|
|
29
24
|
const buttonRef = useRef(null);
|
|
30
25
|
const popoverContentNodeRef = useRef(null);
|
|
31
26
|
const isInitialMount = useRef(true);
|
|
32
|
-
const ariaHiddenTimeoutRef = useRef(null);
|
|
33
|
-
const announceTimeoutRef = useRef(null);
|
|
34
27
|
const getFocusableElements = useCallback(() => {
|
|
35
28
|
return getFocusableElementsUtil(popoverContentNodeRef.current);
|
|
36
29
|
}, []);
|
|
37
|
-
const clearAndSetTimeout = useCallback((timeoutRef, callback, delay) => {
|
|
38
|
-
clearTimeout(timeoutRef.current ?? undefined);
|
|
39
|
-
timeoutRef.current = setTimeout(() => {
|
|
40
|
-
callback();
|
|
41
|
-
timeoutRef.current = null;
|
|
42
|
-
}, delay);
|
|
43
|
-
}, []);
|
|
44
30
|
const popoverContentRef = useCallback(node => {
|
|
45
31
|
popoverContentNodeRef.current = node;
|
|
46
32
|
if (node && !isTipHidden && isFloating) {
|
|
@@ -51,24 +37,10 @@ export const InfoTip = ({
|
|
|
51
37
|
}, [onClick, isTipHidden, isFloating]);
|
|
52
38
|
useEffect(() => {
|
|
53
39
|
setLoaded(true);
|
|
54
|
-
const ariaHiddenTimeout = ariaHiddenTimeoutRef.current;
|
|
55
|
-
const announceTimeout = announceTimeoutRef.current;
|
|
56
|
-
return () => {
|
|
57
|
-
clearTimeout(ariaHiddenTimeout ?? undefined);
|
|
58
|
-
clearTimeout(announceTimeout ?? undefined);
|
|
59
|
-
};
|
|
60
40
|
}, []);
|
|
61
41
|
const setTipIsHidden = useCallback(nextTipState => {
|
|
62
42
|
setHideTip(nextTipState);
|
|
63
|
-
|
|
64
|
-
clearAndSetTimeout(ariaHiddenTimeoutRef, () => setIsAriaHidden(true), ARIA_HIDDEN_DELAY_MS);
|
|
65
|
-
} else if (nextTipState) {
|
|
66
|
-
if (isAriaHidden) setIsAriaHidden(false);
|
|
67
|
-
setShouldAnnounce(false);
|
|
68
|
-
clearTimeout(ariaHiddenTimeoutRef.current ?? undefined);
|
|
69
|
-
ariaHiddenTimeoutRef.current = null;
|
|
70
|
-
}
|
|
71
|
-
}, [isAriaHidden, isFloating, clearAndSetTimeout]);
|
|
43
|
+
}, []);
|
|
72
44
|
const handleOutsideClick = useCallback(e => {
|
|
73
45
|
const wrapper = wrapperRef.current;
|
|
74
46
|
const isOutside = wrapper && (!(e.target instanceof HTMLElement) || !wrapper.contains(e.target));
|
|
@@ -79,10 +51,7 @@ export const InfoTip = ({
|
|
|
79
51
|
const clickHandler = useCallback(() => {
|
|
80
52
|
const currentTipState = !isTipHidden;
|
|
81
53
|
setTipIsHidden(currentTipState);
|
|
82
|
-
|
|
83
|
-
clearAndSetTimeout(announceTimeoutRef, () => setShouldAnnounce(true), 0);
|
|
84
|
-
}
|
|
85
|
-
}, [isTipHidden, setTipIsHidden, clearAndSetTimeout]);
|
|
54
|
+
}, [isTipHidden, setTipIsHidden]);
|
|
86
55
|
useLayoutEffect(() => {
|
|
87
56
|
if (isInitialMount.current) {
|
|
88
57
|
isInitialMount.current = false;
|
|
@@ -120,7 +89,18 @@ export const InfoTip = ({
|
|
|
120
89
|
const handleTabKeyInPopover = event => {
|
|
121
90
|
if (event.key !== 'Tab' || event.shiftKey) return;
|
|
122
91
|
const focusableElements = getFocusableElements();
|
|
123
|
-
|
|
92
|
+
const {
|
|
93
|
+
activeElement
|
|
94
|
+
} = document;
|
|
95
|
+
|
|
96
|
+
// If no focusable elements and popover itself has focus, wrap to button
|
|
97
|
+
if (focusableElements.length === 0) {
|
|
98
|
+
if (activeElement === popoverContentNodeRef.current) {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
buttonRef.current?.focus();
|
|
101
|
+
}
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
124
104
|
const lastElement = focusableElements[focusableElements.length - 1];
|
|
125
105
|
|
|
126
106
|
// Only wrap forward: if on last element, wrap to button
|
|
@@ -140,46 +120,36 @@ export const InfoTip = ({
|
|
|
140
120
|
document.removeEventListener('keydown', handleGlobalEscapeKey, true);
|
|
141
121
|
};
|
|
142
122
|
}
|
|
143
|
-
return () => document.removeEventListener('keydown', handleGlobalEscapeKey
|
|
144
|
-
}, [isTipHidden, isFloating,
|
|
123
|
+
return () => document.removeEventListener('keydown', handleGlobalEscapeKey);
|
|
124
|
+
}, [isTipHidden, isFloating, getFocusableElements, setTipIsHidden]);
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
if (isTipHidden) return;
|
|
127
|
+
const timeoutId = setTimeout(() => {
|
|
128
|
+
popoverContentNodeRef.current?.focus();
|
|
129
|
+
}, 0);
|
|
130
|
+
return () => clearTimeout(timeoutId);
|
|
131
|
+
}, [isTipHidden]);
|
|
145
132
|
const Tip = loaded && isFloating ? FloatingTip : InlineTip;
|
|
146
133
|
const tipProps = useMemo(() => ({
|
|
147
134
|
alignment,
|
|
148
135
|
info,
|
|
149
136
|
isTipHidden,
|
|
137
|
+
contentRef: popoverContentRef,
|
|
150
138
|
wrapperRef,
|
|
151
|
-
...(isFloating && {
|
|
152
|
-
popoverContentRef
|
|
153
|
-
}),
|
|
154
139
|
...rest
|
|
155
|
-
}), [alignment, info, isTipHidden,
|
|
156
|
-
const extractedTextContent = useMemo(() => extractTextContent(info), [info]);
|
|
157
|
-
const screenreaderInfo = shouldAnnounce && !isTipHidden ? extractedTextContent : '\xa0';
|
|
158
|
-
const screenreaderText = useMemo(() => /*#__PURE__*/_jsx(ScreenreaderNavigableText, {
|
|
159
|
-
"aria-hidden": isAriaHidden,
|
|
160
|
-
"aria-live": "assertive",
|
|
161
|
-
screenreader: true,
|
|
162
|
-
children: screenreaderInfo
|
|
163
|
-
}), [isAriaHidden, screenreaderInfo]);
|
|
164
|
-
const button = useMemo(() => /*#__PURE__*/_jsx(InfoTipButton, {
|
|
165
|
-
active: !isTipHidden,
|
|
166
|
-
"aria-expanded": !isTipHidden,
|
|
167
|
-
emphasis: emphasis,
|
|
168
|
-
ref: buttonRef,
|
|
169
|
-
onClick: clickHandler
|
|
170
|
-
}), [isTipHidden, emphasis, clickHandler]);
|
|
171
|
-
|
|
172
|
-
/*
|
|
173
|
-
* For floating placement, screenreader text comes before button to maintain
|
|
174
|
-
* correct DOM order despite Portal rendering. See GMT-64 for planned fix.
|
|
175
|
-
*/
|
|
140
|
+
}), [alignment, info, isTipHidden, popoverContentRef, wrapperRef, rest]);
|
|
176
141
|
return /*#__PURE__*/_jsx(Tip, {
|
|
177
142
|
...tipProps,
|
|
178
143
|
type: "info",
|
|
179
|
-
children:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
144
|
+
children: /*#__PURE__*/_jsx(InfoTipButton, {
|
|
145
|
+
active: !isTipHidden,
|
|
146
|
+
"aria-expanded": !isTipHidden,
|
|
147
|
+
"aria-label": ariaLabel,
|
|
148
|
+
"aria-labelledby": ariaLabelledby,
|
|
149
|
+
"aria-roledescription": "More information button",
|
|
150
|
+
emphasis: emphasis,
|
|
151
|
+
ref: buttonRef,
|
|
152
|
+
onClick: clickHandler
|
|
183
153
|
})
|
|
184
154
|
});
|
|
185
155
|
};
|
|
@@ -48,13 +48,10 @@ export declare const pressKey: (key: string) => Promise<void>;
|
|
|
48
48
|
export declare const waitForLinkToHaveFocus: ({ view, linkText, }: ViewParam & LinkTextParam) => Promise<HTMLElement>;
|
|
49
49
|
export declare const openTipAndWaitForLink: ({ view, linkText, }: ViewParam & LinkTextParam) => Promise<HTMLElement>;
|
|
50
50
|
export declare const openTipTabToLinkAndWaitForFocus: (view: InfoTipView, linkText: string) => Promise<HTMLElement>;
|
|
51
|
-
export declare const
|
|
52
|
-
export declare const testEscapeKeyReturnsFocus: ({ view, info, placement, }: ViewParam & InfoParam & PlacementParam) => Promise<void>;
|
|
53
|
-
export declare const testFocusWrap: ({ view, containerRef, direction, }: ViewParam & {
|
|
54
|
-
containerRef: RefObject<HTMLDivElement>;
|
|
51
|
+
export declare const testFocusWrap: ({ view, direction, }: ViewParam & {
|
|
55
52
|
direction: 'forward' | 'backward';
|
|
56
53
|
}) => Promise<void>;
|
|
57
|
-
export declare const
|
|
54
|
+
export declare const testTabFromPopoverWithNoInteractiveElements: (view: InfoTipView) => Promise<void>;
|
|
58
55
|
export declare const testTabbingBetweenLinks: ({ view, firstLinkText, secondLinkText, placement, }: ViewParam & {
|
|
59
56
|
firstLinkText: string;
|
|
60
57
|
secondLinkText: string;
|
|
@@ -86,18 +83,6 @@ type ViewWithQueries = {
|
|
|
86
83
|
getAllByText: (text: string) => HTMLElement[];
|
|
87
84
|
getAllByLabelText: (text: string) => HTMLElement[];
|
|
88
85
|
};
|
|
89
|
-
export declare const getVisibleTip: ({ text, placement, }: {
|
|
90
|
-
text: string;
|
|
91
|
-
placement?: "inline" | "floating" | undefined;
|
|
92
|
-
}) => HTMLElement | undefined;
|
|
93
|
-
export declare const expectTipToBeVisible: ({ text, placement, }: {
|
|
94
|
-
text: string;
|
|
95
|
-
placement?: "inline" | "floating" | undefined;
|
|
96
|
-
}) => void;
|
|
97
|
-
export declare const expectTipToBeClosed: ({ text, placement, }: {
|
|
98
|
-
text: string;
|
|
99
|
-
placement?: "inline" | "floating" | undefined;
|
|
100
|
-
}) => void;
|
|
101
86
|
export declare const openInfoTipsWithKeyboard: ({ view, count, }: {
|
|
102
87
|
view: ViewWithQueries;
|
|
103
88
|
count: number;
|
|
@@ -106,8 +91,5 @@ export declare const expectTipsVisible: (tips: {
|
|
|
106
91
|
text: string;
|
|
107
92
|
placement?: 'inline' | 'floating';
|
|
108
93
|
}[]) => void;
|
|
109
|
-
export declare const expectTipsClosed: (
|
|
110
|
-
text: string;
|
|
111
|
-
placement?: 'inline' | 'floating';
|
|
112
|
-
}[]) => void;
|
|
94
|
+
export declare const expectTipsClosed: () => void;
|
|
113
95
|
export {};
|
|
@@ -18,7 +18,7 @@ export const FloatingTip = ({
|
|
|
18
18
|
loading,
|
|
19
19
|
narrow,
|
|
20
20
|
overline,
|
|
21
|
-
|
|
21
|
+
contentRef,
|
|
22
22
|
truncateLines,
|
|
23
23
|
type,
|
|
24
24
|
username,
|
|
@@ -123,7 +123,7 @@ export const FloatingTip = ({
|
|
|
123
123
|
width: inheritDims ? 'inherit' : undefined,
|
|
124
124
|
onBlur: toolOnlyEventFunc,
|
|
125
125
|
onFocus: toolOnlyEventFunc,
|
|
126
|
-
onKeyDown: escapeKeyPressHandler
|
|
126
|
+
onKeyDown: escapeKeyPressHandler,
|
|
127
127
|
onMouseDown: e => e.preventDefault(),
|
|
128
128
|
onMouseEnter: toolOnlyEventFunc,
|
|
129
129
|
children: children
|
|
@@ -134,7 +134,7 @@ export const FloatingTip = ({
|
|
|
134
134
|
horizontalOffset: offset,
|
|
135
135
|
isOpen: isPopoverOpen,
|
|
136
136
|
outline: true,
|
|
137
|
-
popoverContainerRef:
|
|
137
|
+
popoverContainerRef: contentRef,
|
|
138
138
|
skipFocusTrap: true,
|
|
139
139
|
targetRef: ref,
|
|
140
140
|
variant: "secondary",
|
|
@@ -17,6 +17,7 @@ export const InlineTip = ({
|
|
|
17
17
|
loading,
|
|
18
18
|
narrow,
|
|
19
19
|
overline,
|
|
20
|
+
contentRef,
|
|
20
21
|
truncateLines,
|
|
21
22
|
type,
|
|
22
23
|
username,
|
|
@@ -42,7 +43,7 @@ export const InlineTip = ({
|
|
|
42
43
|
height: inheritDims ? 'inherit' : undefined,
|
|
43
44
|
ref: wrapperRef,
|
|
44
45
|
width: inheritDims ? 'inherit' : undefined,
|
|
45
|
-
onKeyDown: escapeKeyPressHandler
|
|
46
|
+
onKeyDown: escapeKeyPressHandler,
|
|
46
47
|
children: children
|
|
47
48
|
});
|
|
48
49
|
const tipBody = /*#__PURE__*/_jsx(InlineTipBodyWrapper, {
|
|
@@ -55,7 +56,9 @@ export const InlineTip = ({
|
|
|
55
56
|
color: "currentColor",
|
|
56
57
|
horizNarrow: narrow && isHorizontalCenter,
|
|
57
58
|
id: id,
|
|
59
|
+
ref: contentRef,
|
|
58
60
|
role: type === 'tool' ? 'tooltip' : undefined,
|
|
61
|
+
tabIndex: type === 'info' ? -1 : undefined,
|
|
59
62
|
width: narrow && !isHorizontalCenter ? narrowWidth : 'max-content',
|
|
60
63
|
zIndex: "auto",
|
|
61
64
|
children: type === 'preview' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -46,7 +46,7 @@ export type TipPlacementComponentProps = Omit<TipNewBaseProps, 'placement' | 'em
|
|
|
46
46
|
escapeKeyPressHandler?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
47
47
|
id?: string;
|
|
48
48
|
isTipHidden?: boolean;
|
|
49
|
-
|
|
49
|
+
contentRef?: React.RefObject<HTMLDivElement> | ((node: HTMLDivElement | null) => void);
|
|
50
50
|
type: 'info' | 'tool' | 'preview';
|
|
51
51
|
wrapperRef?: React.RefObject<HTMLDivElement>;
|
|
52
52
|
zIndex?: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut",
|
|
3
3
|
"description": "Styleguide & Component library for Codecademy",
|
|
4
|
-
"version": "67.5.
|
|
4
|
+
"version": "67.5.3-alpha.89afdd.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@codecademy/gamut-icons": "9.52.1",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"dist/**/[A-Z]**/[A-Z]*.js",
|
|
57
57
|
"dist/**/[A-Z]**/index.js"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "ac90189acd037dc65b4c020c4510bca259476bc6"
|
|
60
60
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const ScreenreaderNavigableText: import("@emotion/styled").StyledComponent<(((Omit<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
-
} & import("../..").TextTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref"> | Omit<{
|
|
6
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
-
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
8
|
-
} & import("../..").TextNoTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref">) & import("react").RefAttributes<HTMLSpanElement>) & {
|
|
9
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
}) & {
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
}, {}, {}>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
import { css } from '@codecademy/gamut-styles';
|
|
3
|
-
import { Text } from '../../Typography';
|
|
4
|
-
export const ScreenreaderNavigableText = /*#__PURE__*/_styled(Text, {
|
|
5
|
-
target: "e1rvjfdo0",
|
|
6
|
-
label: "ScreenreaderNavigableText"
|
|
7
|
-
})(css({
|
|
8
|
-
position: 'absolute'
|
|
9
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9UaXAvSW5mb1RpcC9lbGVtZW50cy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3lDIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9UaXAvSW5mb1RpcC9lbGVtZW50cy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vVHlwb2dyYXBoeSc7XG5cbmV4cG9ydCBjb25zdCBTY3JlZW5yZWFkZXJOYXZpZ2FibGVUZXh0ID0gc3R5bGVkKFRleHQpKFxuICBjc3MoeyBwb3NpdGlvbjogJ2Fic29sdXRlJyB9KVxuKTtcbiJdfQ== */");
|