You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.ts 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2023 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. import { theme } from 'twin.macro';
  21. export const DEFAULT_LOCALE = 'en';
  22. export const IS_SSR = typeof window === 'undefined';
  23. export const REACT_DOM_CONTAINER = '#___gatsby';
  24. export const RULE_STATUSES = ['READY', 'BETA', 'DEPRECATED'];
  25. export const THROTTLE_SCROLL_DELAY = 10;
  26. export const THROTTLE_KEYPRESS_DELAY = 100;
  27. export const DEBOUNCE_DELAY = 250;
  28. export const DEBOUNCE_LONG_DELAY = 1000;
  29. export const DEBOUNCE_SUCCESS_DELAY = 1000;
  30. export const INTERACTIVE_TOOLTIP_DELAY = 0.5;
  31. export const LEAK_PERIOD = 'sonar.leak.period';
  32. export const LEAK_PERIOD_TYPE = 'sonar.leak.period.type';
  33. export const INPUT_SIZES = {
  34. small: theme('width.input-small'),
  35. medium: theme('width.input-medium'),
  36. large: theme('width.input-large'),
  37. full: theme('width.full'),
  38. auto: theme('width.auto'),
  39. };
  40. export const LAYOUT_VIEWPORT_MIN_WIDTH = 1280;
  41. export const LAYOUT_MAIN_CONTENT_GUTTER = 60;
  42. export const LAYOUT_SIDEBAR_WIDTH = 240;
  43. export const LAYOUT_SIDEBAR_COLLAPSED_WIDTH = 60;
  44. export const LAYOUT_SIDEBAR_BREAKPOINT = 1320;
  45. export const LAYOUT_BANNER_HEIGHT = 44;
  46. export const LAYOUT_BRANDING_ICON_WIDTH = 198;
  47. export const LAYOUT_FILTERBAR_HEADER = 56;
  48. export const LAYOUT_GLOBAL_NAV_HEIGHT = 52;
  49. export const LAYOUT_LOGO_MARGIN_RIGHT = 45;
  50. export const LAYOUT_LOGO_MAX_HEIGHT = 40;
  51. export const LAYOUT_LOGO_MAX_WIDTH = 150;
  52. export const LAYOUT_FOOTER_HEIGHT = 52;
  53. export const LAYOUT_NOTIFICATIONSBAR_WIDTH = 350;
  54. export const CORE_CONCEPTS_WIDTH = 350;
  55. export const DARK_THEME_ID = 'dark-theme';