Debian Codegraph @

node/@patternfly/react-core/src/helpers/constants.ts

raw
1 import globalBreakpointSm from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_sm';
2 import globalBreakpointMd from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_md';
3 import globalBreakpointLg from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_lg';
4 import globalBreakpointXl from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_xl';
5 import globalBreakpoint2xl from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_2xl';
6
7 import globalHeightBreakpointSm from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_height_sm';
8 import globalHeightBreakpointMd from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_height_md';
9 import globalHeightBreakpointLg from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_height_lg';
10 import globalHeightBreakpointXl from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_height_xl';
11 import globalHeightBreakpoint2xl from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_height_2xl';
12
13 import RhUiCheckCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-fill-icon';
14 import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon';
15 import RhUiWarningFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-warning-fill-icon';
16 import RhUiInformationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-information-fill-icon';
17 import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon';
18
19 export const SIDE = { RIGHT: 'right', LEFT: 'left', BOTH: 'both', NONE: 'none' };
20
21 export const KEYHANDLER_DIRECTION = { UP: 'up', DOWN: 'down', RIGHT: 'right', LEFT: 'left' };
22
23 export enum ValidatedOptions {
24 success = 'success',
25 error = 'error',
26 warning = 'warning',
27 default = 'default'
28 }
29
30 export const KeyTypes = {
31 Tab: 'Tab',
32 Space: ' ',
33 Escape: 'Escape',
34 Enter: 'Enter',
35 ArrowUp: 'ArrowUp',
36 ArrowDown: 'ArrowDown',
37 ArrowLeft: 'ArrowLeft',
38 ArrowRight: 'ArrowRight'
39 };
40
41 export const globalWidthBreakpoints = {
42 sm: parseInt(globalBreakpointSm.value) * 16,
43 md: parseInt(globalBreakpointMd.value) * 16,
44 lg: parseInt(globalBreakpointLg.value) * 16,
45 xl: parseInt(globalBreakpointXl.value) * 16,
46 '2xl': parseInt(globalBreakpoint2xl.value) * 16
47 };
48
49 export const globalHeightBreakpoints = {
50 sm: parseInt(globalHeightBreakpointSm.value) * 16,
51 md: parseInt(globalHeightBreakpointMd.value) * 16,
52 lg: parseInt(globalHeightBreakpointLg.value) * 16,
53 xl: parseInt(globalHeightBreakpointXl.value) * 16,
54 '2xl': parseInt(globalHeightBreakpoint2xl.value) * 16
55 };
56
57 export const statusIcons = {
58 success: RhUiCheckCircleFillIcon,
59 danger: RhUiErrorFillIcon,
60 warning: RhUiWarningFillIcon,
61 info: RhUiInformationFillIcon,
62 custom: RhUiNotificationFillIcon
63 };