UNPKG

@metamask/design-system-tailwind-preset

Version:
1 lines 2.2 kB
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,qBAAiB;AAClC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,sBAAkB;AAClD,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAE1C,MAAM,cAAc,GAAW;IAC7B,OAAO,EAAE,EAAE;IACX,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,GAAG,MAAM;aACV;YACD,8DAA8D;YAC9D,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBACzB,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,MAAM,CAAC,IAAI,EAAE,iDAAiD;aAClE,CAAC;YACF,eAAe,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC/B,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,MAAM,CAAC,UAAU,EAAE,mDAAmD;aAC1E,CAAC;YACF,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC3B,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,MAAM,CAAC,MAAM,EAAE,uDAAuD;aAC1E,CAAC;YACF,GAAG,UAAU;YACb,SAAS,EAAE,OAAO;SACnB;KACF;IACD,OAAO,EAAE;QACP,YAAY,EAAE,4DAA4D;KAC3E;CACF,CAAC;AAEF,eAAe,cAAc,CAAC;AAC9B,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC","sourcesContent":["import type { Config } from 'tailwindcss';\n\nimport { colors } from './colors';\nimport { shadows, shadowPlugin } from './shadows';\nimport { typography } from './typography';\n\nconst tailwindConfig: Config = {\n content: [],\n theme: {\n extend: {\n colors: {\n ...colors,\n },\n // Reduces redundancy by enabling shorter Tailwind class names\n textColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like text-primary-default\n ...colors.text, // e.g. text-default instead of text-text-default\n }),\n backgroundColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like bg-primary-default\n ...colors.background, // e.g. bg-default instead of bg-background-default\n }),\n borderColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like border-primary-default\n ...colors.border, // e.g. border-default instead of border-border-default\n }),\n ...typography,\n boxShadow: shadows,\n },\n },\n plugins: [\n shadowPlugin, // Allows for combination of size and color shadow utilities\n ],\n};\n\nexport default tailwindConfig;\nmodule.exports = tailwindConfig;\n"]}