@codecademy/gamut 67.6.4-alpha.4928bf.0 → 67.6.4-alpha.70119b.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/Anchor/index.d.ts +2 -10
- package/dist/Badge/index.d.ts +2 -10
- package/dist/Box/props.d.ts +2 -10
- package/dist/Button/shared/styles.d.ts +2 -10
- package/dist/Card/elements.d.ts +6 -30
- package/dist/ConnectedForm/ConnectedFormGroup.d.ts +5 -0
- package/dist/ConnectedForm/ConnectedFormGroup.js +1 -1
- package/dist/Form/elements/Form.d.ts +2 -10
- package/dist/Form/elements/FormGroupLabel.js +8 -2
- package/dist/GridForm/GridFormInputGroup/__fixtures__/renderers.d.ts +4 -0
- package/dist/GridForm/types.d.ts +5 -0
- package/dist/Layout/Column.d.ts +2 -10
- package/dist/Layout/LayoutGrid.d.ts +2 -10
- package/dist/List/elements.d.ts +4 -20
- package/dist/Menu/elements.d.ts +2 -10
- package/dist/Pagination/AnimatedPaginationButtons.d.ts +2 -10
- package/dist/Pagination/utils.d.ts +2 -10
- package/dist/Tabs/props.d.ts +2 -10
- package/dist/Tag/types.d.ts +2 -10
- package/dist/Tip/InfoTip/InfoTipButton.js +5 -2
- package/dist/Tip/InfoTip/index.d.ts +18 -0
- package/dist/Tip/InfoTip/index.js +37 -66
- package/dist/Tip/__tests__/helpers.d.ts +5 -26
- 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/dist/Toggle/elements.d.ts +4 -20
- package/dist/Typography/Text.d.ts +2 -10
- package/package.json +7 -7
- package/dist/Tip/InfoTip/elements.d.ts +0 -12
- package/dist/Tip/InfoTip/elements.js +0 -9
package/dist/Anchor/index.d.ts
CHANGED
|
@@ -148,20 +148,12 @@ declare const anchorProps: import("@codecademy/variance/dist/types/config").Pars
|
|
|
148
148
|
readonly scale: "spacing";
|
|
149
149
|
};
|
|
150
150
|
readonly mr: {
|
|
151
|
-
readonly property:
|
|
152
|
-
readonly physical: "marginRight";
|
|
153
|
-
readonly logical: "marginInlineEnd";
|
|
154
|
-
};
|
|
151
|
+
readonly property: "marginRight";
|
|
155
152
|
readonly scale: "spacing";
|
|
156
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
157
153
|
};
|
|
158
154
|
readonly ml: {
|
|
159
|
-
readonly property:
|
|
160
|
-
readonly physical: "marginLeft";
|
|
161
|
-
readonly logical: "marginInlineStart";
|
|
162
|
-
};
|
|
155
|
+
readonly property: "marginLeft";
|
|
163
156
|
readonly scale: "spacing";
|
|
164
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
165
157
|
};
|
|
166
158
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
167
159
|
readonly fontFamily: {
|
package/dist/Badge/index.d.ts
CHANGED
|
@@ -62,20 +62,12 @@ declare const badgeProps: import("@codecademy/variance/dist/types/config").Parse
|
|
|
62
62
|
readonly scale: "spacing";
|
|
63
63
|
};
|
|
64
64
|
readonly mr: {
|
|
65
|
-
readonly property:
|
|
66
|
-
readonly physical: "marginRight";
|
|
67
|
-
readonly logical: "marginInlineEnd";
|
|
68
|
-
};
|
|
65
|
+
readonly property: "marginRight";
|
|
69
66
|
readonly scale: "spacing";
|
|
70
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
71
67
|
};
|
|
72
68
|
readonly ml: {
|
|
73
|
-
readonly property:
|
|
74
|
-
readonly physical: "marginLeft";
|
|
75
|
-
readonly logical: "marginInlineStart";
|
|
76
|
-
};
|
|
69
|
+
readonly property: "marginLeft";
|
|
77
70
|
readonly scale: "spacing";
|
|
78
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
79
71
|
};
|
|
80
72
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
81
73
|
readonly flexBasis: {
|
package/dist/Box/props.d.ts
CHANGED
|
@@ -54,20 +54,12 @@ export declare const boxProps: import("@codecademy/variance/dist/types/config").
|
|
|
54
54
|
readonly scale: "spacing";
|
|
55
55
|
};
|
|
56
56
|
readonly mr: {
|
|
57
|
-
readonly property:
|
|
58
|
-
readonly physical: "marginRight";
|
|
59
|
-
readonly logical: "marginInlineEnd";
|
|
60
|
-
};
|
|
57
|
+
readonly property: "marginRight";
|
|
61
58
|
readonly scale: "spacing";
|
|
62
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
63
59
|
};
|
|
64
60
|
readonly ml: {
|
|
65
|
-
readonly property:
|
|
66
|
-
readonly physical: "marginLeft";
|
|
67
|
-
readonly logical: "marginInlineStart";
|
|
68
|
-
};
|
|
61
|
+
readonly property: "marginLeft";
|
|
69
62
|
readonly scale: "spacing";
|
|
70
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
71
63
|
};
|
|
72
64
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
73
65
|
readonly border: {
|
|
@@ -176,20 +176,12 @@ export declare const buttonProps: import("@codecademy/variance/dist/types/config
|
|
|
176
176
|
readonly scale: "spacing";
|
|
177
177
|
};
|
|
178
178
|
readonly mr: {
|
|
179
|
-
readonly property:
|
|
180
|
-
readonly physical: "marginRight";
|
|
181
|
-
readonly logical: "marginInlineEnd";
|
|
182
|
-
};
|
|
179
|
+
readonly property: "marginRight";
|
|
183
180
|
readonly scale: "spacing";
|
|
184
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
185
181
|
};
|
|
186
182
|
readonly ml: {
|
|
187
|
-
readonly property:
|
|
188
|
-
readonly physical: "marginLeft";
|
|
189
|
-
readonly logical: "marginInlineStart";
|
|
190
|
-
};
|
|
183
|
+
readonly property: "marginLeft";
|
|
191
184
|
readonly scale: "spacing";
|
|
192
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
193
185
|
};
|
|
194
186
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
195
187
|
readonly border: {
|
package/dist/Card/elements.d.ts
CHANGED
|
@@ -547,20 +547,12 @@ export declare const MotionBox: import("react").ComponentType<{
|
|
|
547
547
|
readonly scale: "spacing";
|
|
548
548
|
}>;
|
|
549
549
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
550
|
-
readonly property:
|
|
551
|
-
readonly physical: "marginRight";
|
|
552
|
-
readonly logical: "marginInlineEnd";
|
|
553
|
-
};
|
|
550
|
+
readonly property: "marginRight";
|
|
554
551
|
readonly scale: "spacing";
|
|
555
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
556
552
|
}>;
|
|
557
553
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
558
|
-
readonly property:
|
|
559
|
-
readonly physical: "marginLeft";
|
|
560
|
-
readonly logical: "marginInlineStart";
|
|
561
|
-
};
|
|
554
|
+
readonly property: "marginLeft";
|
|
562
555
|
readonly scale: "spacing";
|
|
563
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
564
556
|
}>;
|
|
565
557
|
borderX?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
566
558
|
readonly property: "border";
|
|
@@ -1240,20 +1232,12 @@ export declare const DynamicCardWrapper: import("@emotion/styled").StyledCompone
|
|
|
1240
1232
|
readonly scale: "spacing";
|
|
1241
1233
|
}>;
|
|
1242
1234
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
1243
|
-
readonly property:
|
|
1244
|
-
readonly physical: "marginRight";
|
|
1245
|
-
readonly logical: "marginInlineEnd";
|
|
1246
|
-
};
|
|
1235
|
+
readonly property: "marginRight";
|
|
1247
1236
|
readonly scale: "spacing";
|
|
1248
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
1249
1237
|
}>;
|
|
1250
1238
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
1251
|
-
readonly property:
|
|
1252
|
-
readonly physical: "marginLeft";
|
|
1253
|
-
readonly logical: "marginInlineStart";
|
|
1254
|
-
};
|
|
1239
|
+
readonly property: "marginLeft";
|
|
1255
1240
|
readonly scale: "spacing";
|
|
1256
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
1257
1241
|
}>;
|
|
1258
1242
|
borderX?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
1259
1243
|
readonly property: "border";
|
|
@@ -1917,20 +1901,12 @@ export declare const StaticCardWrapper: import("@emotion/styled").StyledComponen
|
|
|
1917
1901
|
readonly scale: "spacing";
|
|
1918
1902
|
}>;
|
|
1919
1903
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
1920
|
-
readonly property:
|
|
1921
|
-
readonly physical: "marginRight";
|
|
1922
|
-
readonly logical: "marginInlineEnd";
|
|
1923
|
-
};
|
|
1904
|
+
readonly property: "marginRight";
|
|
1924
1905
|
readonly scale: "spacing";
|
|
1925
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
1926
1906
|
}>;
|
|
1927
1907
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
1928
|
-
readonly property:
|
|
1929
|
-
readonly physical: "marginLeft";
|
|
1930
|
-
readonly logical: "marginInlineStart";
|
|
1931
|
-
};
|
|
1908
|
+
readonly property: "marginLeft";
|
|
1932
1909
|
readonly scale: "spacing";
|
|
1933
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
1934
1910
|
}>;
|
|
1935
1911
|
borderX?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
1936
1912
|
readonly property: "border";
|
|
@@ -8,6 +8,11 @@ export interface ConnectedFormGroupBaseProps extends Omit<FormGroupProps, 'label
|
|
|
8
8
|
name: string;
|
|
9
9
|
label: React.ReactNode;
|
|
10
10
|
required?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* InfoTip to display next to the field label. String labels automatically
|
|
13
|
+
* label the InfoTip button. For ReactNode labels, provide `ariaLabel` or
|
|
14
|
+
* set `labelledByFieldLabel: true` to ensure the InfoTip is accessible.
|
|
15
|
+
*/
|
|
11
16
|
infotip?: InfoTipProps;
|
|
12
17
|
}
|
|
13
18
|
export interface ConnectedFormGroupProps<T extends ConnectedField> extends SubmitContextProps, ConnectedFormGroupBaseProps {
|
|
@@ -13,7 +13,7 @@ const ErrorAnchor = /*#__PURE__*/_styled(Anchor, {
|
|
|
13
13
|
label: "ErrorAnchor"
|
|
14
14
|
})(css({
|
|
15
15
|
color: 'feedback-error'
|
|
16
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
16
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db25uZWN0ZWRGb3JtL0Nvbm5lY3RlZEZvcm1Hcm91cC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0JvQiIsImZpbGUiOiIuLi8uLi9zcmMvQ29ubmVjdGVkRm9ybS9Db25uZWN0ZWRGb3JtR3JvdXAudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3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VxuICAgICAgICAgICAgb3ZlcnJpZGVzPXt7XG4gICAgICAgICAgICAgIGE6IHtcbiAgICAgICAgICAgICAgICBhbGxvd2VkQXR0cmlidXRlczogWydocmVmJywgJ3RhcmdldCddLFxuICAgICAgICAgICAgICAgIGNvbXBvbmVudDogRXJyb3JBbmNob3IsXG4gICAgICAgICAgICAgICAgcHJvY2Vzc05vZGU6IChcbiAgICAgICAgICAgICAgICAgIG5vZGU6IHVua25vd24sXG4gICAgICAgICAgICAgICAgICBwcm9wczogeyBvbkNsaWNrPzogKCkgPT4gdm9pZCB9XG4gICAgICAgICAgICAgICAgKSA9PiA8RXJyb3JBbmNob3Igey4uLnByb3BzfSAvPixcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBza2lwRGVmYXVsdE92ZXJyaWRlcz17eyBhOiB0cnVlIH19XG4gICAgICAgICAgICBzcGFjaW5nPVwibm9uZVwiXG4gICAgICAgICAgICB0ZXh0PXt0ZXh0RXJyb3J9XG4gICAgICAgICAgLz5cbiAgICAgICAgPC9Gb3JtRXJyb3I+XG4gICAgICApfVxuICAgIDwvRm9ybUdyb3VwPlxuICApO1xufVxuIl19 */");
|
|
17
17
|
export function ConnectedFormGroup({
|
|
18
18
|
customError,
|
|
19
19
|
children,
|
|
@@ -215,20 +215,12 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
215
215
|
readonly scale: "spacing";
|
|
216
216
|
}>;
|
|
217
217
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
218
|
-
readonly property:
|
|
219
|
-
readonly physical: "marginRight";
|
|
220
|
-
readonly logical: "marginInlineEnd";
|
|
221
|
-
};
|
|
218
|
+
readonly property: "marginRight";
|
|
222
219
|
readonly scale: "spacing";
|
|
223
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
224
220
|
}>;
|
|
225
221
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
226
|
-
readonly property:
|
|
227
|
-
readonly physical: "marginLeft";
|
|
228
|
-
readonly logical: "marginInlineStart";
|
|
229
|
-
};
|
|
222
|
+
readonly property: "marginLeft";
|
|
230
223
|
readonly scale: "spacing";
|
|
231
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
232
224
|
}>;
|
|
233
225
|
borderX?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
234
226
|
readonly property: "border";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
2
|
import { states, variant } from '@codecademy/gamut-styles';
|
|
3
|
+
import { useId } from 'react';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { FlexBox } from '../..';
|
|
5
6
|
import { InfoTip } from '../../Tip/InfoTip';
|
|
@@ -30,7 +31,7 @@ const labelStates = states({
|
|
|
30
31
|
const Label = /*#__PURE__*/_styled("label", {
|
|
31
32
|
target: "e1t0n89n0",
|
|
32
33
|
label: "Label"
|
|
33
|
-
})(labelSizeVariants, labelStates, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
34
|
+
})(labelSizeVariants, labelStates, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtL2VsZW1lbnRzL0Zvcm1Hcm91cExhYmVsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRGMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL0Zvcm0vZWxlbWVudHMvRm9ybUdyb3VwTGFiZWwudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3RhdGVzLCB2YXJpYW50IH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJztcbmltcG9ydCB7IF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gIHtjaGlsZHJlbn1cbiAgICAgICAgeyFpc1NvbG9GaWVsZCAmJlxuICAgICAgICAgIChyZXF1aXJlZCA/IChcbiAgICAgICAgICAgIDxUZXh0IGFyaWEtaGlkZGVuIGFzPVwic3BhblwiPlxuICAgICAgICAgICAgICAqXG4gICAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICdcXHUwMEEwKG9wdGlvbmFsKSdcbiAgICAgICAgICApKX1cbiAgICAgIDwvTGFiZWw+XG4gICAgICB7aW5mb3RpcCAmJiAoXG4gICAgICAgIDxJbmZvVGlwXG4gICAgICAgICAgey4uLmluZm90aXB9XG4gICAgICAgICAgYXJpYUxhYmVsbGVkYnk9e3Nob3VsZExhYmVsSW5mb1RpcCA/IGxhYmVsSWQgOiBpbmZvdGlwLmFyaWFMYWJlbGxlZGJ5fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICA8L0ZsZXhCb3g+XG4gICk7XG59O1xuIl19 */");
|
|
34
35
|
export const FormGroupLabel = ({
|
|
35
36
|
children,
|
|
36
37
|
className,
|
|
@@ -42,6 +43,9 @@ export const FormGroupLabel = ({
|
|
|
42
43
|
size,
|
|
43
44
|
...rest
|
|
44
45
|
}) => {
|
|
46
|
+
const labelId = useId();
|
|
47
|
+
const isStringLabel = typeof children === 'string';
|
|
48
|
+
const shouldLabelInfoTip = (isStringLabel || infotip?.labelledByFieldLabel) && !infotip?.ariaLabel && !infotip?.ariaLabelledby;
|
|
45
49
|
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
46
50
|
justifyContent: "space-between",
|
|
47
51
|
mb: 4,
|
|
@@ -51,6 +55,7 @@ export const FormGroupLabel = ({
|
|
|
51
55
|
className: className,
|
|
52
56
|
disabled: disabled,
|
|
53
57
|
htmlFor: htmlFor,
|
|
58
|
+
id: infotip && shouldLabelInfoTip ? labelId : undefined,
|
|
54
59
|
size: size,
|
|
55
60
|
children: [children, !isSoloField && (required ? /*#__PURE__*/_jsx(Text, {
|
|
56
61
|
"aria-hidden": true,
|
|
@@ -58,7 +63,8 @@ export const FormGroupLabel = ({
|
|
|
58
63
|
children: "*"
|
|
59
64
|
}) : '\u00A0(optional)')]
|
|
60
65
|
}), infotip && /*#__PURE__*/_jsx(InfoTip, {
|
|
61
|
-
...infotip
|
|
66
|
+
...infotip,
|
|
67
|
+
ariaLabelledby: shouldLabelInfoTip ? labelId : infotip.ariaLabelledby
|
|
62
68
|
})]
|
|
63
69
|
});
|
|
64
70
|
};
|
|
@@ -21,6 +21,10 @@ export declare const getComponent: (componentName: string) => {
|
|
|
21
21
|
};
|
|
22
22
|
type GridFormInputGroupTestComponentProps = GridFormInputGroupProps & {
|
|
23
23
|
mode?: 'onSubmit' | 'onChange';
|
|
24
|
+
externalLabel?: {
|
|
25
|
+
id: string;
|
|
26
|
+
text: string;
|
|
27
|
+
};
|
|
24
28
|
};
|
|
25
29
|
export declare const GridFormInputGroupTestComponent: React.FC<GridFormInputGroupTestComponentProps>;
|
|
26
30
|
export {};
|
package/dist/GridForm/types.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export type BaseFormField<Value> = {
|
|
|
25
25
|
* HTML id to use instead of the name.
|
|
26
26
|
*/
|
|
27
27
|
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* InfoTip to display next to the field label. String labels automatically
|
|
30
|
+
* label the InfoTip button. For ReactNode labels, provide `ariaLabel` or
|
|
31
|
+
* set `labelledByFieldLabel: true` to ensure the InfoTip is accessible.
|
|
32
|
+
*/
|
|
28
33
|
infotip?: InfoTipProps;
|
|
29
34
|
isSoloField?: boolean;
|
|
30
35
|
name: string;
|
package/dist/Layout/Column.d.ts
CHANGED
|
@@ -144,20 +144,12 @@ declare const columnProps: import("@codecademy/variance/dist/types/config").Pars
|
|
|
144
144
|
readonly scale: "spacing";
|
|
145
145
|
};
|
|
146
146
|
readonly mr: {
|
|
147
|
-
readonly property:
|
|
148
|
-
readonly physical: "marginRight";
|
|
149
|
-
readonly logical: "marginInlineEnd";
|
|
150
|
-
};
|
|
147
|
+
readonly property: "marginRight";
|
|
151
148
|
readonly scale: "spacing";
|
|
152
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
153
149
|
};
|
|
154
150
|
readonly ml: {
|
|
155
|
-
readonly property:
|
|
156
|
-
readonly physical: "marginLeft";
|
|
157
|
-
readonly logical: "marginInlineStart";
|
|
158
|
-
};
|
|
151
|
+
readonly property: "marginLeft";
|
|
159
152
|
readonly scale: "spacing";
|
|
160
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
161
153
|
};
|
|
162
154
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
163
155
|
readonly gridColumn: {
|
|
@@ -54,20 +54,12 @@ declare const gridProps: import("@codecademy/variance/dist/types/config").Parser
|
|
|
54
54
|
readonly scale: "spacing";
|
|
55
55
|
};
|
|
56
56
|
readonly mr: {
|
|
57
|
-
readonly property:
|
|
58
|
-
readonly physical: "marginRight";
|
|
59
|
-
readonly logical: "marginInlineEnd";
|
|
60
|
-
};
|
|
57
|
+
readonly property: "marginRight";
|
|
61
58
|
readonly scale: "spacing";
|
|
62
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
63
59
|
};
|
|
64
60
|
readonly ml: {
|
|
65
|
-
readonly property:
|
|
66
|
-
readonly physical: "marginLeft";
|
|
67
|
-
readonly logical: "marginInlineStart";
|
|
68
|
-
};
|
|
61
|
+
readonly property: "marginLeft";
|
|
69
62
|
readonly scale: "spacing";
|
|
70
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
71
63
|
};
|
|
72
64
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
73
65
|
gap: {
|
package/dist/List/elements.d.ts
CHANGED
|
@@ -54,20 +54,12 @@ declare const space: import("@codecademy/variance/dist/types/config").Parser<imp
|
|
|
54
54
|
readonly scale: "spacing";
|
|
55
55
|
};
|
|
56
56
|
readonly mr: {
|
|
57
|
-
readonly property:
|
|
58
|
-
readonly physical: "marginRight";
|
|
59
|
-
readonly logical: "marginInlineEnd";
|
|
60
|
-
};
|
|
57
|
+
readonly property: "marginRight";
|
|
61
58
|
readonly scale: "spacing";
|
|
62
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
63
59
|
};
|
|
64
60
|
readonly ml: {
|
|
65
|
-
readonly property:
|
|
66
|
-
readonly physical: "marginLeft";
|
|
67
|
-
readonly logical: "marginInlineStart";
|
|
68
|
-
};
|
|
61
|
+
readonly property: "marginLeft";
|
|
69
62
|
readonly scale: "spacing";
|
|
70
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
71
63
|
};
|
|
72
64
|
}>>, grid: import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
73
65
|
readonly gridColumn: {
|
|
@@ -888,20 +880,12 @@ export declare const AnimatedListWrapper: import("@emotion/styled").StyledCompon
|
|
|
888
880
|
readonly scale: "spacing";
|
|
889
881
|
}>;
|
|
890
882
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
891
|
-
readonly property:
|
|
892
|
-
readonly physical: "marginRight";
|
|
893
|
-
readonly logical: "marginInlineEnd";
|
|
894
|
-
};
|
|
883
|
+
readonly property: "marginRight";
|
|
895
884
|
readonly scale: "spacing";
|
|
896
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
897
885
|
}>;
|
|
898
886
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
899
|
-
readonly property:
|
|
900
|
-
readonly physical: "marginLeft";
|
|
901
|
-
readonly logical: "marginInlineStart";
|
|
902
|
-
};
|
|
887
|
+
readonly property: "marginLeft";
|
|
903
888
|
readonly scale: "spacing";
|
|
904
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
905
889
|
}>;
|
|
906
890
|
borderX?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
907
891
|
readonly property: "border";
|
package/dist/Menu/elements.d.ts
CHANGED
|
@@ -180,20 +180,12 @@ declare const listProps: import("@codecademy/variance/dist/types/config").Parser
|
|
|
180
180
|
readonly scale: "spacing";
|
|
181
181
|
};
|
|
182
182
|
readonly mr: {
|
|
183
|
-
readonly property:
|
|
184
|
-
readonly physical: "marginRight";
|
|
185
|
-
readonly logical: "marginInlineEnd";
|
|
186
|
-
};
|
|
183
|
+
readonly property: "marginRight";
|
|
187
184
|
readonly scale: "spacing";
|
|
188
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
189
185
|
};
|
|
190
186
|
readonly ml: {
|
|
191
|
-
readonly property:
|
|
192
|
-
readonly physical: "marginLeft";
|
|
193
|
-
readonly logical: "marginInlineStart";
|
|
194
|
-
};
|
|
187
|
+
readonly property: "marginLeft";
|
|
195
188
|
readonly scale: "spacing";
|
|
196
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
197
189
|
};
|
|
198
190
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
199
191
|
readonly position: {
|
|
@@ -464,20 +464,12 @@ export declare const AnimatedFadeButton: (props: {
|
|
|
464
464
|
readonly scale: "spacing";
|
|
465
465
|
}>;
|
|
466
466
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
467
|
-
readonly property:
|
|
468
|
-
readonly physical: "marginRight";
|
|
469
|
-
readonly logical: "marginInlineEnd";
|
|
470
|
-
};
|
|
467
|
+
readonly property: "marginRight";
|
|
471
468
|
readonly scale: "spacing";
|
|
472
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
473
469
|
}>;
|
|
474
470
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
475
|
-
readonly property:
|
|
476
|
-
readonly physical: "marginLeft";
|
|
477
|
-
readonly logical: "marginInlineStart";
|
|
478
|
-
};
|
|
471
|
+
readonly property: "marginLeft";
|
|
479
472
|
readonly scale: "spacing";
|
|
480
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
481
473
|
}>;
|
|
482
474
|
borderX?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
483
475
|
readonly property: "border";
|
|
@@ -477,20 +477,12 @@ export declare const createAnimatedFadeButton: (WrappedComponent: typeof Paginat
|
|
|
477
477
|
readonly scale: "spacing";
|
|
478
478
|
}>;
|
|
479
479
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
480
|
-
readonly property:
|
|
481
|
-
readonly physical: "marginRight";
|
|
482
|
-
readonly logical: "marginInlineEnd";
|
|
483
|
-
};
|
|
480
|
+
readonly property: "marginRight";
|
|
484
481
|
readonly scale: "spacing";
|
|
485
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
486
482
|
}>;
|
|
487
483
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
488
|
-
readonly property:
|
|
489
|
-
readonly physical: "marginLeft";
|
|
490
|
-
readonly logical: "marginInlineStart";
|
|
491
|
-
};
|
|
484
|
+
readonly property: "marginLeft";
|
|
492
485
|
readonly scale: "spacing";
|
|
493
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
494
486
|
}>;
|
|
495
487
|
borderX?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
496
488
|
readonly property: "border";
|
package/dist/Tabs/props.d.ts
CHANGED
|
@@ -182,19 +182,11 @@ export declare const tabElementBaseProps: import("@codecademy/variance/dist/type
|
|
|
182
182
|
readonly scale: "spacing";
|
|
183
183
|
};
|
|
184
184
|
readonly mr: {
|
|
185
|
-
readonly property:
|
|
186
|
-
readonly physical: "marginRight";
|
|
187
|
-
readonly logical: "marginInlineEnd";
|
|
188
|
-
};
|
|
185
|
+
readonly property: "marginRight";
|
|
189
186
|
readonly scale: "spacing";
|
|
190
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
191
187
|
};
|
|
192
188
|
readonly ml: {
|
|
193
|
-
readonly property:
|
|
194
|
-
readonly physical: "marginLeft";
|
|
195
|
-
readonly logical: "marginInlineStart";
|
|
196
|
-
};
|
|
189
|
+
readonly property: "marginLeft";
|
|
197
190
|
readonly scale: "spacing";
|
|
198
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
199
191
|
};
|
|
200
192
|
}>>]>>;
|
package/dist/Tag/types.d.ts
CHANGED
|
@@ -57,20 +57,12 @@ export declare const tagProps: import("@codecademy/variance/dist/types/config").
|
|
|
57
57
|
readonly scale: "spacing";
|
|
58
58
|
};
|
|
59
59
|
readonly mr: {
|
|
60
|
-
readonly property:
|
|
61
|
-
readonly physical: "marginRight";
|
|
62
|
-
readonly logical: "marginInlineEnd";
|
|
63
|
-
};
|
|
60
|
+
readonly property: "marginRight";
|
|
64
61
|
readonly scale: "spacing";
|
|
65
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
66
62
|
};
|
|
67
63
|
readonly ml: {
|
|
68
|
-
readonly property:
|
|
69
|
-
readonly physical: "marginLeft";
|
|
70
|
-
readonly logical: "marginInlineStart";
|
|
71
|
-
};
|
|
64
|
+
readonly property: "marginLeft";
|
|
72
65
|
readonly scale: "spacing";
|
|
73
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
74
66
|
};
|
|
75
67
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
76
68
|
readonly flexBasis: {
|
|
@@ -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,7 +2,25 @@
|
|
|
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;
|
|
13
|
+
/**
|
|
14
|
+
* Accessible role description for the InfoTip button. Useful for translation.
|
|
15
|
+
* @default "More information button"
|
|
16
|
+
*/
|
|
17
|
+
ariaRoleDescription?: string;
|
|
5
18
|
emphasis?: 'low' | 'high';
|
|
19
|
+
/**
|
|
20
|
+
* When true, the InfoTip button will be labelled by the form field's label element.
|
|
21
|
+
* This is automatic for string labels, but can be opted into for ReactNode labels.
|
|
22
|
+
*/
|
|
23
|
+
labelledByFieldLabel?: boolean;
|
|
6
24
|
/**
|
|
7
25
|
* Called when the info tip is clicked - the onClick function is called after the DOM updates and the tip is mounted.
|
|
8
26
|
*/
|
|
@@ -1,19 +1,17 @@
|
|
|
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 ARIA_HIDDEN_DELAY_MS = 1000;
|
|
12
|
-
|
|
13
|
-
// Match native dialogs with open attribute, and role-based dialogs that aren't aria-hidden
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
9
|
const MODAL_SELECTOR = 'dialog[open],[role="dialog"]:not([aria-hidden="true"]),[role="alertdialog"]:not([aria-hidden="true"])';
|
|
15
10
|
export const InfoTip = ({
|
|
16
11
|
alignment = 'top-right',
|
|
12
|
+
ariaLabel,
|
|
13
|
+
ariaLabelledby,
|
|
14
|
+
ariaRoleDescription = 'More information button',
|
|
17
15
|
emphasis = 'low',
|
|
18
16
|
info,
|
|
19
17
|
onClick,
|
|
@@ -22,25 +20,14 @@ export const InfoTip = ({
|
|
|
22
20
|
}) => {
|
|
23
21
|
const isFloating = placement === 'floating';
|
|
24
22
|
const [isTipHidden, setHideTip] = useState(true);
|
|
25
|
-
const [isAriaHidden, setIsAriaHidden] = useState(false);
|
|
26
|
-
const [shouldAnnounce, setShouldAnnounce] = useState(false);
|
|
27
23
|
const [loaded, setLoaded] = useState(false);
|
|
28
24
|
const wrapperRef = useRef(null);
|
|
29
25
|
const buttonRef = useRef(null);
|
|
30
26
|
const popoverContentNodeRef = useRef(null);
|
|
31
27
|
const isInitialMount = useRef(true);
|
|
32
|
-
const ariaHiddenTimeoutRef = useRef(null);
|
|
33
|
-
const announceTimeoutRef = useRef(null);
|
|
34
28
|
const getFocusableElements = useCallback(() => {
|
|
35
29
|
return getFocusableElementsUtil(popoverContentNodeRef.current);
|
|
36
30
|
}, []);
|
|
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
31
|
const popoverContentRef = useCallback(node => {
|
|
45
32
|
popoverContentNodeRef.current = node;
|
|
46
33
|
if (node && !isTipHidden && isFloating) {
|
|
@@ -51,24 +38,10 @@ export const InfoTip = ({
|
|
|
51
38
|
}, [onClick, isTipHidden, isFloating]);
|
|
52
39
|
useEffect(() => {
|
|
53
40
|
setLoaded(true);
|
|
54
|
-
const ariaHiddenTimeout = ariaHiddenTimeoutRef.current;
|
|
55
|
-
const announceTimeout = announceTimeoutRef.current;
|
|
56
|
-
return () => {
|
|
57
|
-
clearTimeout(ariaHiddenTimeout ?? undefined);
|
|
58
|
-
clearTimeout(announceTimeout ?? undefined);
|
|
59
|
-
};
|
|
60
41
|
}, []);
|
|
61
42
|
const setTipIsHidden = useCallback(nextTipState => {
|
|
62
43
|
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]);
|
|
44
|
+
}, []);
|
|
72
45
|
const handleOutsideClick = useCallback(e => {
|
|
73
46
|
const wrapper = wrapperRef.current;
|
|
74
47
|
const isOutside = wrapper && (!(e.target instanceof HTMLElement) || !wrapper.contains(e.target));
|
|
@@ -79,10 +52,7 @@ export const InfoTip = ({
|
|
|
79
52
|
const clickHandler = useCallback(() => {
|
|
80
53
|
const currentTipState = !isTipHidden;
|
|
81
54
|
setTipIsHidden(currentTipState);
|
|
82
|
-
|
|
83
|
-
clearAndSetTimeout(announceTimeoutRef, () => setShouldAnnounce(true), 0);
|
|
84
|
-
}
|
|
85
|
-
}, [isTipHidden, setTipIsHidden, clearAndSetTimeout]);
|
|
55
|
+
}, [isTipHidden, setTipIsHidden]);
|
|
86
56
|
useLayoutEffect(() => {
|
|
87
57
|
if (isInitialMount.current) {
|
|
88
58
|
isInitialMount.current = false;
|
|
@@ -120,7 +90,18 @@ export const InfoTip = ({
|
|
|
120
90
|
const handleTabKeyInPopover = event => {
|
|
121
91
|
if (event.key !== 'Tab' || event.shiftKey) return;
|
|
122
92
|
const focusableElements = getFocusableElements();
|
|
123
|
-
|
|
93
|
+
const {
|
|
94
|
+
activeElement
|
|
95
|
+
} = document;
|
|
96
|
+
|
|
97
|
+
// If no focusable elements and popover itself has focus, wrap to button
|
|
98
|
+
if (focusableElements.length === 0) {
|
|
99
|
+
if (activeElement === popoverContentNodeRef.current) {
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
buttonRef.current?.focus();
|
|
102
|
+
}
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
124
105
|
const lastElement = focusableElements[focusableElements.length - 1];
|
|
125
106
|
|
|
126
107
|
// Only wrap forward: if on last element, wrap to button
|
|
@@ -141,45 +122,35 @@ export const InfoTip = ({
|
|
|
141
122
|
};
|
|
142
123
|
}
|
|
143
124
|
return () => document.removeEventListener('keydown', handleGlobalEscapeKey, true);
|
|
144
|
-
}, [isTipHidden, isFloating,
|
|
125
|
+
}, [isTipHidden, isFloating, getFocusableElements, setTipIsHidden]);
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
if (isTipHidden) return;
|
|
128
|
+
const timeoutId = setTimeout(() => {
|
|
129
|
+
popoverContentNodeRef.current?.focus();
|
|
130
|
+
}, 0);
|
|
131
|
+
return () => clearTimeout(timeoutId);
|
|
132
|
+
}, [isTipHidden]);
|
|
145
133
|
const Tip = loaded && isFloating ? FloatingTip : InlineTip;
|
|
146
134
|
const tipProps = useMemo(() => ({
|
|
147
135
|
alignment,
|
|
148
136
|
info,
|
|
149
137
|
isTipHidden,
|
|
138
|
+
contentRef: popoverContentRef,
|
|
150
139
|
wrapperRef,
|
|
151
|
-
...(isFloating && {
|
|
152
|
-
popoverContentRef
|
|
153
|
-
}),
|
|
154
140
|
...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
|
-
*/
|
|
141
|
+
}), [alignment, info, isTipHidden, popoverContentRef, wrapperRef, rest]);
|
|
176
142
|
return /*#__PURE__*/_jsx(Tip, {
|
|
177
143
|
...tipProps,
|
|
178
144
|
type: "info",
|
|
179
|
-
children:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
145
|
+
children: /*#__PURE__*/_jsx(InfoTipButton, {
|
|
146
|
+
active: !isTipHidden,
|
|
147
|
+
"aria-expanded": !isTipHidden,
|
|
148
|
+
"aria-label": ariaLabel,
|
|
149
|
+
"aria-labelledby": ariaLabelledby,
|
|
150
|
+
"aria-roledescription": ariaRoleDescription,
|
|
151
|
+
emphasis: emphasis,
|
|
152
|
+
ref: buttonRef,
|
|
153
|
+
onClick: clickHandler
|
|
183
154
|
})
|
|
184
155
|
});
|
|
185
156
|
};
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// <reference types="testing-library__jest-dom" />
|
|
3
3
|
import { setupRtl } from '@codecademy/gamut-tests';
|
|
4
4
|
import { RefObject } from 'react';
|
|
5
|
-
import { InfoTip
|
|
5
|
+
import { InfoTip } from '../InfoTip';
|
|
6
6
|
import { TipPlacements } from '../shared/types';
|
|
7
7
|
type InfoTipView = ReturnType<ReturnType<typeof setupRtl<typeof InfoTip>>>['view'];
|
|
8
|
-
type Placement = NonNullable<InfoTipProps['placement']>;
|
|
9
8
|
type ViewParam = {
|
|
10
9
|
view: InfoTipView;
|
|
11
10
|
};
|
|
@@ -16,7 +15,7 @@ type InfoParam = {
|
|
|
16
15
|
info: string;
|
|
17
16
|
};
|
|
18
17
|
type PlacementParam = {
|
|
19
|
-
placement:
|
|
18
|
+
placement: TipPlacements;
|
|
20
19
|
};
|
|
21
20
|
export declare const createFocusOnClick: (ref: RefObject<HTMLDivElement>) => ({ isTipHidden }: {
|
|
22
21
|
isTipHidden: boolean;
|
|
@@ -48,13 +47,10 @@ export declare const pressKey: (key: string) => Promise<void>;
|
|
|
48
47
|
export declare const waitForLinkToHaveFocus: ({ view, linkText, }: ViewParam & LinkTextParam) => Promise<HTMLElement>;
|
|
49
48
|
export declare const openTipAndWaitForLink: ({ view, linkText, }: ViewParam & LinkTextParam) => Promise<HTMLElement>;
|
|
50
49
|
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>;
|
|
50
|
+
export declare const testFocusWrap: ({ view, direction, }: ViewParam & {
|
|
55
51
|
direction: 'forward' | 'backward';
|
|
56
52
|
}) => Promise<void>;
|
|
57
|
-
export declare const
|
|
53
|
+
export declare const testTabFromPopoverWithNoInteractiveElements: (view: InfoTipView) => Promise<void>;
|
|
58
54
|
export declare const testTabbingBetweenLinks: ({ view, firstLinkText, secondLinkText, placement, }: ViewParam & {
|
|
59
55
|
firstLinkText: string;
|
|
60
56
|
secondLinkText: string;
|
|
@@ -62,7 +58,6 @@ export declare const testTabbingBetweenLinks: ({ view, firstLinkText, secondLink
|
|
|
62
58
|
}) => Promise<void>;
|
|
63
59
|
export declare const setupLinkTestWithPlacement: (linkText: string, placement: TipPlacements, renderView: ReturnType<typeof setupRtl<typeof InfoTip>>) => {
|
|
64
60
|
view: import("@testing-library/react").RenderResult;
|
|
65
|
-
containerRef: RefObject<HTMLDivElement>;
|
|
66
61
|
info: import("react/jsx-runtime").JSX.Element;
|
|
67
62
|
onClick: ({ isTipHidden }: {
|
|
68
63
|
isTipHidden: boolean;
|
|
@@ -86,28 +81,12 @@ type ViewWithQueries = {
|
|
|
86
81
|
getAllByText: (text: string) => HTMLElement[];
|
|
87
82
|
getAllByLabelText: (text: string) => HTMLElement[];
|
|
88
83
|
};
|
|
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
84
|
export declare const openInfoTipsWithKeyboard: ({ view, count, }: {
|
|
102
85
|
view: ViewWithQueries;
|
|
103
86
|
count: number;
|
|
104
87
|
}) => Promise<void>;
|
|
105
88
|
export declare const expectTipsVisible: (tips: {
|
|
106
89
|
text: string;
|
|
107
|
-
placement?: 'inline' | 'floating';
|
|
108
|
-
}[]) => void;
|
|
109
|
-
export declare const expectTipsClosed: (tips: {
|
|
110
|
-
text: string;
|
|
111
|
-
placement?: 'inline' | 'floating';
|
|
112
90
|
}[]) => void;
|
|
91
|
+
export declare const expectTipsClosed: () => void;
|
|
113
92
|
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;
|
|
@@ -78,20 +78,12 @@ export declare const ToggleTrack: import("@emotion/styled").StyledComponent<{
|
|
|
78
78
|
readonly scale: "spacing";
|
|
79
79
|
}>;
|
|
80
80
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
81
|
-
readonly property:
|
|
82
|
-
readonly physical: "marginRight";
|
|
83
|
-
readonly logical: "marginInlineEnd";
|
|
84
|
-
};
|
|
81
|
+
readonly property: "marginRight";
|
|
85
82
|
readonly scale: "spacing";
|
|
86
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
87
83
|
}>;
|
|
88
84
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
89
|
-
readonly property:
|
|
90
|
-
readonly physical: "marginLeft";
|
|
91
|
-
readonly logical: "marginInlineStart";
|
|
92
|
-
};
|
|
85
|
+
readonly property: "marginLeft";
|
|
93
86
|
readonly scale: "spacing";
|
|
94
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
95
87
|
}>;
|
|
96
88
|
textColor?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
97
89
|
readonly property: "color";
|
|
@@ -198,19 +190,11 @@ export declare const ToggleLabel: import("@emotion/styled").StyledComponent<{
|
|
|
198
190
|
readonly scale: "spacing";
|
|
199
191
|
}>;
|
|
200
192
|
mr?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
201
|
-
readonly property:
|
|
202
|
-
readonly physical: "marginRight";
|
|
203
|
-
readonly logical: "marginInlineEnd";
|
|
204
|
-
};
|
|
193
|
+
readonly property: "marginRight";
|
|
205
194
|
readonly scale: "spacing";
|
|
206
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
207
195
|
}>;
|
|
208
196
|
ml?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
209
|
-
readonly property:
|
|
210
|
-
readonly physical: "marginLeft";
|
|
211
|
-
readonly logical: "marginInlineStart";
|
|
212
|
-
};
|
|
197
|
+
readonly property: "marginLeft";
|
|
213
198
|
readonly scale: "spacing";
|
|
214
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
215
199
|
}>;
|
|
216
200
|
}, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
|
|
@@ -231,20 +231,12 @@ declare const textProps: import("@codecademy/variance/dist/types/config").Parser
|
|
|
231
231
|
readonly scale: "spacing";
|
|
232
232
|
};
|
|
233
233
|
readonly mr: {
|
|
234
|
-
readonly property:
|
|
235
|
-
readonly physical: "marginRight";
|
|
236
|
-
readonly logical: "marginInlineEnd";
|
|
237
|
-
};
|
|
234
|
+
readonly property: "marginRight";
|
|
238
235
|
readonly scale: "spacing";
|
|
239
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
240
236
|
};
|
|
241
237
|
readonly ml: {
|
|
242
|
-
readonly property:
|
|
243
|
-
readonly physical: "marginLeft";
|
|
244
|
-
readonly logical: "marginInlineStart";
|
|
245
|
-
};
|
|
238
|
+
readonly property: "marginLeft";
|
|
246
239
|
readonly scale: "spacing";
|
|
247
|
-
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
248
240
|
};
|
|
249
241
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
250
242
|
truncateLines: {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut",
|
|
3
3
|
"description": "Styleguide & Component library for Codecademy",
|
|
4
|
-
"version": "67.6.4-alpha.
|
|
4
|
+
"version": "67.6.4-alpha.70119b.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codecademy/gamut-icons": "9.54.
|
|
8
|
-
"@codecademy/gamut-illustrations": "0.58.
|
|
9
|
-
"@codecademy/gamut-patterns": "0.10.
|
|
10
|
-
"@codecademy/gamut-styles": "17.11.
|
|
11
|
-
"@codecademy/variance": "0.25.
|
|
7
|
+
"@codecademy/gamut-icons": "9.54.0",
|
|
8
|
+
"@codecademy/gamut-illustrations": "0.58.0",
|
|
9
|
+
"@codecademy/gamut-patterns": "0.10.19",
|
|
10
|
+
"@codecademy/gamut-styles": "17.11.0",
|
|
11
|
+
"@codecademy/variance": "0.25.0",
|
|
12
12
|
"@types/marked": "^4.0.8",
|
|
13
13
|
"@vidstack/react": "^1.12.12",
|
|
14
14
|
"classnames": "^2.2.5",
|
|
@@ -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": "53415a24fde6bbb138f4adb8e2a183e801930910"
|
|
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== */");
|