[
  {
    "path": ".gitignore",
    "content": "/node_modules/\n"
  },
  {
    "path": ".release-it.json",
    "content": "{\n  \"git\": {\n    \"tagName\": \"v${version}\",\n    \"requireCleanWorkingDir\": false\n  }\n}\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [3.0.0] - 2020-02-05\n\n### Changed\n- Changed to use Tailwind 1.2’s new plugin definition syntax\n\n## [2.0.0] - 2019-05-13\n\n### Changed since 2.0.0-beta.1\n- Added support for global variants thanks to Tailwind’s `variants()` helper function\n\n### Added since 1.x\n- Tailwind 1.0.0 compatibility\n\n### Changed since 1.x\n- The plugin doesn’t accept a config object anymore; instead it finds what it needs in the `theme` and `variants` keys of your config (see `README` for more info)\n- Responsive variants are now generated by default\n\n## [2.0.0-beta.1] - 2019-04-07\n\n### Added\n- Tailwind 1.0.0 compatibility\n\n### Changed\n- The plugin doesn’t accept a config object anymore; instead it finds what it needs in the `theme` and `variants` keys of your config (see `README` for more info)\n- Responsive variants are now generated by default\n\n## [1.0.2] - 2018-11-04\n\n### Added\n- Added proper tests with Jest\n\n## [1.0.1] - 2018-08-14\n\n### Fixed\n- Fixed escaping in selectors generated by the plugin\n\n## [1.0.0] - 2018-08-13\n\nInitial release\n\n[Unreleased]: https://github.com/benface/tailwindcss-filters/compare/v3.0.0...HEAD\n[3.0.0]: https://github.com/benface/tailwindcss-filters/compare/v2.0.0...v3.0.0\n[2.0.0]: https://github.com/benface/tailwindcss-filters/compare/v2.0.0-beta.1...v2.0.0\n[2.0.0-beta.1]: https://github.com/benface/tailwindcss-filters/compare/v1.0.2...v2.0.0-beta.1\n[1.0.2]: https://github.com/benface/tailwindcss-filters/compare/v1.0.1...v1.0.2\n[1.0.1]: https://github.com/benface/tailwindcss-filters/compare/v1.0.0...v1.0.1\n[1.0.0]: https://github.com/benface/tailwindcss-filters/releases/tag/v1.0.0\n"
  },
  {
    "path": "LICENSE.md",
    "content": "# ISC License\n\nCopyright (c) Benoît Rouleau\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# ⛔️ DEPRECATED\n\nTailwind CSS 2.1+ has built-in `filter` and `backdrop-filter` utilities such as [`blur`](https://tailwindcss.com/docs/blur), [`grayscale`](https://tailwindcss.com/docs/grayscale), [`sepia`](https://tailwindcss.com/docs/sepia), etc. Please use them instead of this plugin. Thank you!\n\n# Filters Plugin for Tailwind CSS\n\n## Requirements\n\nThis plugin requires Tailwind CSS 1.2 or later. If your project uses an older version of Tailwind, you should install the latest 2.x version of this plugin (`npm install tailwindcss-filters@2.x`).\n\n## Installation\n\n```bash\nnpm install tailwindcss-filters\n```\n\n## Usage\n\n```js\n// tailwind.config.js\nmodule.exports = {\n  theme: {\n    filter: { // defaults to {}\n      'none': 'none',\n      'grayscale': 'grayscale(1)',\n      'invert': 'invert(1)',\n      'sepia': 'sepia(1)',\n    },\n    backdropFilter: { // defaults to {}\n      'none': 'none',\n      'blur': 'blur(20px)',\n    },\n  },\n  variants: {\n    filter: ['responsive'], // defaults to ['responsive']\n    backdropFilter: ['responsive'], // defaults to ['responsive']\n  },\n  plugins: [\n    require('tailwindcss-filters'),\n  ],\n};\n```\n\nThis plugin generates the following utilities:\n\n```css\n/* configurable with the \"filter\" theme object */\n.filter-[key] {\n  filter: [value];\n}\n\n/* configurable with the \"backdropFilter\" theme object */\n.backdrop-[key] {\n  backdrop-filter: [value];\n}\n```\n"
  },
  {
    "path": "index.js",
    "content": "const plugin = require('tailwindcss/plugin');\nconst _ = require('lodash');\n\nmodule.exports = plugin(function({ theme, variants, e, addUtilities }) {\n  const filterUtilities = _.fromPairs(\n    _.map(theme('filter'), (value, modifier) => {\n      return [\n        `.${e(`filter-${modifier}`)}`,\n        {\n          filter: value,\n        },\n      ];\n    })\n  );\n\n  const backdropFilterUtilities = _.fromPairs(\n    _.map(theme('backdropFilter'), (value, modifier) => {\n      return [\n        `.${e(`backdrop-${modifier}`)}`,\n        {\n          backdropFilter: value,\n        },\n      ];\n    })\n  );\n\n  addUtilities(filterUtilities, variants('filter'));\n  addUtilities(backdropFilterUtilities, variants('backdropFilter'));\n}, {\n  theme: {\n    filter: {},\n    backdropFilter: {},\n  },\n  variants: {\n    filter: ['responsive'],\n    backdropFilter: ['responsive'],\n  },\n});\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"tailwindcss-filters\",\n  \"version\": \"3.0.0\",\n  \"description\": \"Tailwind CSS plugin to generate filter and backdrop filter utilities\",\n  \"author\": \"Benoît Rouleau <benoit.rouleau@icloud.com>\",\n  \"license\": \"ISC\",\n  \"repository\": \"https://github.com/benface/tailwindcss-filters.git\",\n  \"bugs\": \"https://github.com/benface/tailwindcss-filters/issues\",\n  \"homepage\": \"https://github.com/benface/tailwindcss-filters\",\n  \"scripts\": {\n    \"test\": \"jest\",\n    \"release\": \"f(){ release-it $1 && github-release-from-changelog ;};f\"\n  },\n  \"dependencies\": {\n    \"lodash\": \"^4.17.19\"\n  },\n  \"devDependencies\": {\n    \"github-release-from-changelog\": \"^2.1.1\",\n    \"jest\": \"^26.1.0\",\n    \"jest-matcher-css\": \"^1.1.0\",\n    \"postcss\": \"^7.0.32\",\n    \"release-it\": \"^13.6.5\",\n    \"tailwindcss\": \"^1.5.1\"\n  }\n}\n"
  },
  {
    "path": "test.js",
    "content": "const _ = require('lodash');\nconst cssMatcher = require('jest-matcher-css');\nconst postcss = require('postcss');\nconst tailwindcss = require('tailwindcss');\nconst filtersPlugin = require('./index.js');\n\nconst generatePluginCss = (config) => {\n  return postcss(\n    tailwindcss(\n      _.merge({\n        theme: {\n          screens: {\n            'sm': '640px',\n          },\n        },\n        corePlugins: false,\n        plugins: [\n          filtersPlugin,\n        ],\n      }, config)\n    )\n  )\n  .process('@tailwind utilities', {\n    from: undefined,\n  })\n  .then(result => {\n    return result.css;\n  });\n};\n\nexpect.extend({\n  toMatchCss: cssMatcher,\n});\n\ntest('there is no output by default', () => {\n  return generatePluginCss().then(css => {\n    expect(css).toMatchCss(`\n      @media (min-width: 640px) {\n      }\n    `);\n  });\n});\n\ntest('utilities can be customized', () => {\n  return generatePluginCss({\n    theme: {\n      filter: {\n        'none': 'none',\n        'grayscale': 'grayscale(1)',\n        'invert': 'invert(1)',\n        'sepia': 'sepia(1)',\n      },\n      backdropFilter: {\n        'none': 'none',\n        'blur': 'blur(20px)',\n      },\n    },\n  }).then(css => {\n    expect(css).toMatchCss(`\n      .filter-none {\n        filter: none;\n      }\n      .filter-grayscale {\n        filter: grayscale(1);\n      }\n      .filter-invert {\n        filter: invert(1);\n      }\n      .filter-sepia {\n        filter: sepia(1);\n      }\n      .backdrop-none {\n        backdrop-filter: none;\n      }\n      .backdrop-blur {\n        backdrop-filter: blur(20px);\n      }\n      @media (min-width: 640px) {\n        .sm\\\\:filter-none {\n          filter: none;\n        }\n        .sm\\\\:filter-grayscale {\n          filter: grayscale(1);\n        }\n        .sm\\\\:filter-invert {\n          filter: invert(1);\n        }\n        .sm\\\\:filter-sepia {\n          filter: sepia(1);\n        }\n        .sm\\\\:backdrop-none {\n          backdrop-filter: none;\n        }\n        .sm\\\\:backdrop-blur {\n          backdrop-filter: blur(20px);\n        }\n      }\n    `);\n  });\n});\n\ntest('variants can be customized', () => {\n  return generatePluginCss({\n    theme: {\n      filter: {\n        'none': 'none',\n        'grayscale': 'grayscale(1)',\n      },\n      backdropFilter: {\n        'none': 'none',\n        'blur': 'blur(20px)',\n      },\n    },\n    variants: {\n      filter: ['hover'],\n      backdropFilter: ['active'],\n    },\n  }).then(css => {\n    expect(css).toMatchCss(`\n      .filter-none {\n        filter: none;\n      }\n      .filter-grayscale {\n        filter: grayscale(1);\n      }\n      .hover\\\\:filter-none:hover {\n        filter: none;\n      }\n      .hover\\\\:filter-grayscale:hover {\n        filter: grayscale(1);\n      }\n      .backdrop-none {\n        backdrop-filter: none;\n      }\n      .backdrop-blur {\n        backdrop-filter: blur(20px);\n      }\n      .active\\\\:backdrop-none:active {\n        backdrop-filter: none;\n      }\n      .active\\\\:backdrop-blur:active {\n        backdrop-filter: blur(20px);\n      }\n    `);\n  });\n});\n"
  }
]