Design system.
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.

tailwind.config.ts 2.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import {Config} from 'tailwindcss';
  2. import defaultTheme from 'tailwindcss/defaultTheme';
  3. import plugin from 'tailwindcss/plugin';
  4. import { tailwind } from '../../base/src';
  5. import {
  6. radioButtonPlugin,
  7. menuSelectPlugin,
  8. radioTickBoxPlugin,
  9. dropdownSelectPlugin,
  10. } from '../../categories/web/choice/react/src';
  11. import {
  12. colorPickerPlugin,
  13. } from '../../categories/web/color/react/src';
  14. import {
  15. menuMultiSelectPlugin,
  16. tagInputPlugin,
  17. toggleButtonPlugin,
  18. toggleSwitchPlugin,
  19. toggleTickBoxPlugin,
  20. } from '../../categories/web/multichoice/react/src';
  21. import {
  22. numberSpinnerPlugin,
  23. sliderPlugin,
  24. } from '../../categories/web/number/react/src';
  25. import {
  26. dateDropdownPlugin,
  27. timeSpinnerPlugin,
  28. } from '../../categories/web/temporal/react/src';
  29. const config: Config = {
  30. content: [
  31. '../../categories/web/*/react/src/**/*.(ts|tsx)',
  32. './.storybook/**/*.html',
  33. ],
  34. theme: {
  35. // TODO put into a tesseract plugin
  36. fontFamily: {
  37. sans: ['var(--font-sans)', ...defaultTheme.fontFamily.sans],
  38. headings: ['var(--font-headings)', ...defaultTheme.fontFamily.sans],
  39. mono: ['var(--font-mono)', ...defaultTheme.fontFamily.mono],
  40. },
  41. colors: {
  42. 'sidebar': 'rgb(var(--color-sidebar)',
  43. 'topbar': 'rgb(var(--color-topbar)',
  44. 'shade': 'rgb(var(--color-shade))',
  45. 'negative': 'rgb(var(--color-negative))',
  46. 'positive': 'rgb(var(--color-positive))',
  47. 'primary': 'rgb(var(--color-primary))',
  48. 'secondary': 'rgb(var(--color-secondary))',
  49. 'tertiary': 'rgb(var(--color-tertiary))',
  50. 'code-number': 'rgb(var(--color-code-number))',
  51. 'code-keyword': 'rgb(var(--color-code-keyword))',
  52. 'code-type': 'rgb(var(--color-code-type))',
  53. 'code-instance-attribute': 'rgb(var(--color-code-instance-attribute))',
  54. 'code-function': 'rgb(var(--color-code-function))',
  55. 'code-parameter': 'rgb(var(--color-code-parameter))',
  56. 'code-property': 'rgb(var(--color-code-property))',
  57. 'code-string': 'rgb(var(--color-code-string))',
  58. 'code-variable': 'rgb(var(--color-code-variable))',
  59. 'code-regexp': 'rgb(var(--color-code-regexp))',
  60. 'code-url': 'rgb(var(--color-code-url))',
  61. 'code-global': 'rgb(var(--color-code-global))',
  62. },
  63. extend: {
  64. fontSize: {
  65. 'xxs': '0.625rem',
  66. 'xs': '0.75em',
  67. 'sm': '0.875em',
  68. 'base': '1em',
  69. 'lg': '1.125em',
  70. 'xl': '1.25em',
  71. '2xl': '1.5em',
  72. '3xl': '1.75em',
  73. '4xl': '2em',
  74. '5xl': '3em',
  75. '6xl': '4em',
  76. },
  77. }
  78. },
  79. plugins: [
  80. tailwind.basePlugin,
  81. plugin(radioButtonPlugin),
  82. plugin(menuSelectPlugin),
  83. plugin(radioTickBoxPlugin),
  84. plugin(dropdownSelectPlugin),
  85. plugin(colorPickerPlugin),
  86. plugin(menuMultiSelectPlugin),
  87. plugin(tagInputPlugin),
  88. plugin(toggleButtonPlugin),
  89. plugin(toggleSwitchPlugin),
  90. plugin(toggleTickBoxPlugin),
  91. plugin(numberSpinnerPlugin),
  92. plugin(sliderPlugin),
  93. plugin(dateDropdownPlugin),
  94. plugin(timeSpinnerPlugin),
  95. ],
  96. };
  97. export default config;