@apify/ui-library 0.73.1-fixa11yaudit-b2e9ed.16 → 0.73.1-fixa11yaudit-b2e9ed.39
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/src/components/button.js +3 -3
- package/dist/src/components/button.js.map +1 -1
- package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/prism_highlighter.js +10 -1
- package/dist/src/components/code/prism_highlighter.js.map +1 -1
- package/dist/src/components/floating/menu.d.ts +2 -1
- package/dist/src/components/floating/menu.d.ts.map +1 -1
- package/dist/src/components/floating/menu.js +2 -2
- package/dist/src/components/floating/menu.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/button.tsx +3 -3
- package/src/components/code/prism_highlighter.tsx +10 -1
- package/src/components/floating/menu.tsx +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "0.73.1-fixa11yaudit-b2e9ed.
|
|
3
|
+
"version": "0.73.1-fixa11yaudit-b2e9ed.39+8c4235dce5b",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"typescript": "^5.1.6",
|
|
67
67
|
"typescript-eslint": "^8.24.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "8c4235dce5bb5c60ea2246f86b630bd0ad899167"
|
|
70
70
|
}
|
|
@@ -75,21 +75,21 @@ type ButtonSizeCombinations = {
|
|
|
75
75
|
const BUTTON_COLOR_VARIANTS_CSS: ButtonColorCombinations = {
|
|
76
76
|
primary: {
|
|
77
77
|
default: {
|
|
78
|
-
textColor: theme.color.neutral.
|
|
78
|
+
textColor: theme.color.neutral.textOnPrimary,
|
|
79
79
|
backgroundColor: theme.color.primary.action,
|
|
80
80
|
borderColor: theme.color.primary.action,
|
|
81
81
|
hoverColor: theme.color.primary.actionHover,
|
|
82
82
|
activeColor: theme.color.primary.actionActive,
|
|
83
83
|
},
|
|
84
84
|
success: {
|
|
85
|
-
textColor: theme.color.neutral.
|
|
85
|
+
textColor: theme.color.neutral.textOnPrimary,
|
|
86
86
|
backgroundColor: theme.color.success.action,
|
|
87
87
|
borderColor: theme.color.success.action,
|
|
88
88
|
hoverColor: theme.color.success.actionHover,
|
|
89
89
|
activeColor: theme.color.success.actionActive,
|
|
90
90
|
},
|
|
91
91
|
danger: {
|
|
92
|
-
textColor: theme.color.neutral.
|
|
92
|
+
textColor: theme.color.neutral.textOnPrimary,
|
|
93
93
|
backgroundColor: theme.color.danger.action,
|
|
94
94
|
borderColor: theme.color.danger.action,
|
|
95
95
|
hoverColor: theme.color.danger.actionHover,
|
|
@@ -54,16 +54,25 @@ type PreWrapperProps = {
|
|
|
54
54
|
const PreWrapper = styled.pre<PreWrapperProps>`
|
|
55
55
|
width: 100%;
|
|
56
56
|
position: relative;
|
|
57
|
-
overflow: auto;
|
|
58
57
|
z-index: 2;
|
|
59
58
|
padding: ${({ $isSingleLine }) => ($isSingleLine ? 0 : `${theme.space.space16} 0`)};
|
|
60
59
|
margin: 0;
|
|
60
|
+
overflow: auto;
|
|
61
61
|
|
|
62
62
|
code {
|
|
63
63
|
min-width: 100%;
|
|
64
64
|
display: inline-block;
|
|
65
65
|
vertical-align: middle;
|
|
66
66
|
|
|
67
|
+
/* The following CSS deal with https://github.com/apify/apify-core/issues/20920 */
|
|
68
|
+
${({ $isSingleLine }) => ($isSingleLine ? css`
|
|
69
|
+
overflow-y: hidden;
|
|
70
|
+
scrollbar-width: none;
|
|
71
|
+
` : css`
|
|
72
|
+
scrollbar-width: thin;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
`)};
|
|
75
|
+
|
|
67
76
|
*,
|
|
68
77
|
*::before,
|
|
69
78
|
*::after {
|
|
@@ -44,6 +44,7 @@ export interface MenuOption {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export interface MenuProps<T = MenuOption> {
|
|
47
|
+
ariaLabel?: string,
|
|
47
48
|
options: T[],
|
|
48
49
|
value?: string,
|
|
49
50
|
onSelect: (newValue: string, selectedBy: SelectActionType) => void,
|
|
@@ -64,6 +65,7 @@ const defaultRenderOption = ({ label }: MenuOption) => (<Text as='span'>{label}<
|
|
|
64
65
|
* It tries to mimic API of react-select as closely as possible
|
|
65
66
|
*/
|
|
66
67
|
export const Menu = <T extends MenuOption>({
|
|
68
|
+
ariaLabel,
|
|
67
69
|
options,
|
|
68
70
|
value,
|
|
69
71
|
onSelect,
|
|
@@ -129,7 +131,8 @@ export const Menu = <T extends MenuOption>({
|
|
|
129
131
|
{...rest}
|
|
130
132
|
>
|
|
131
133
|
<MenuBaseComponent
|
|
132
|
-
aria-
|
|
134
|
+
aria-label={ariaLabel}
|
|
135
|
+
aria-labelledby={ariaLabel ? undefined : 'select-label'}
|
|
133
136
|
aria-autocomplete="none"
|
|
134
137
|
ref={refs.setReference}
|
|
135
138
|
{...getReferenceProps()}
|