It appears you have a well-structured Git repository with various files, including SVG icons and HTML documents. Here's a brief overview:
This commit is contained in:
38
backend/node_modules/@tailwindcss/line-clamp/.github/ISSUE_TEMPLATE/1.bug_report.yml
generated
vendored
Normal file
38
backend/node_modules/@tailwindcss/line-clamp/.github/ISSUE_TEMPLATE/1.bug_report.yml
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Bug Report
|
||||
description: Create a bug report for @tailwindcss/line-clamp.
|
||||
labels: []
|
||||
body:
|
||||
- type: input
|
||||
attributes:
|
||||
label: What version of @tailwindcss/line-clamp are you using?
|
||||
description: 'For example: v0.2.0'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: What version of Node.js are you using?
|
||||
description: 'For example: v12.0.0'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: What browser are you using?
|
||||
description: 'For example: Chrome, Safari, or N/A'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: What operating system are you using?
|
||||
description: 'For example: macOS, Windows'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Reproduction repository
|
||||
description: A public GitHub repo that includes a minimal reproduction of the bug. Unfortunately we can't provide support without a reproduction, and your issue will be closed and locked with no comment if this is not provided.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe your issue
|
||||
description: Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead
|
11
backend/node_modules/@tailwindcss/line-clamp/.github/ISSUE_TEMPLATE/config.yml
generated
vendored
Normal file
11
backend/node_modules/@tailwindcss/line-clamp/.github/ISSUE_TEMPLATE/config.yml
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature Request
|
||||
url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas
|
||||
about: 'Suggest any ideas you have using our discussion forums.'
|
||||
- name: Help
|
||||
url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=help
|
||||
about: 'If you have a question or need help, ask a question on the discussion forums.'
|
||||
- name: Kind Words
|
||||
url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=kind-words
|
||||
about: "Have something nice to say about @tailwindcss/line-clamp or Tailwind CSS in general? We'd love to hear it!"
|
41
backend/node_modules/@tailwindcss/line-clamp/.github/workflows/nodejs.yml
generated
vendored
Normal file
41
backend/node_modules/@tailwindcss/line-clamp/.github/workflows/nodejs.yml
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12, 14, 16]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Use cached node_modules
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: node_modules
|
||||
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
|
||||
restore-keys: |
|
||||
nodeModules-
|
||||
- name: Install dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: npm install
|
||||
env:
|
||||
CI: true
|
||||
- run: npm test
|
||||
env:
|
||||
CI: true
|
50
backend/node_modules/@tailwindcss/line-clamp/.github/workflows/release-insiders.yml
generated
vendored
Normal file
50
backend/node_modules/@tailwindcss/line-clamp/.github/workflows/release-insiders.yml
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
name: Release Insiders
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Use cached node_modules
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: node_modules
|
||||
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
|
||||
restore-keys: |
|
||||
nodeModules-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: npm install
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Resolve version
|
||||
id: vars
|
||||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
|
||||
- name: "Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}"
|
||||
run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version
|
||||
|
||||
- name: Publish
|
||||
run: npm publish --tag insiders
|
||||
env:
|
||||
CI: true
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
92
backend/node_modules/@tailwindcss/line-clamp/CHANGELOG.md
generated
vendored
Normal file
92
backend/node_modules/@tailwindcss/line-clamp/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Nothing yet!
|
||||
|
||||
## [0.4.4] - 2023-03-30
|
||||
|
||||
### Changed
|
||||
|
||||
- Remove Tailwind CSS v3.3 warning ([#28](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/28))
|
||||
|
||||
## [0.4.3] - 2023-03-30
|
||||
|
||||
### Changed
|
||||
|
||||
- Warn when used in Tailwind CSS v3.3+ ([#26](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/26))
|
||||
|
||||
## [0.4.2] - 2022-09-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Update TypeScript types ([#23](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/23))
|
||||
|
||||
## [0.4.1] - 2022-09-01
|
||||
|
||||
### Added
|
||||
|
||||
- Add typescript types ([#22](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/22))
|
||||
|
||||
## [0.4.0] - 2022-04-27
|
||||
|
||||
This release of `@tailwindcss/line-clamp` is designed for Tailwind CSS v3.0+, and is not compatible with earlier versions.
|
||||
|
||||
### Added
|
||||
|
||||
- Add support for arbitrary values ([#10](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/10))
|
||||
|
||||
## [0.3.1] - 2021-12-09
|
||||
|
||||
### Fixed
|
||||
|
||||
- Add LICENSE file ([#13](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/13))
|
||||
|
||||
### Changed
|
||||
|
||||
- Remove `dist` folder and related dependencies ([#11](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/11))
|
||||
|
||||
## [0.3.0] - 2021-12-09
|
||||
|
||||
### Added
|
||||
|
||||
- Make sure that Tailwind CSS v3 is in peerDependencies ([c9a9115](https://github.com/tailwindlabs/tailwindcss-line-clamp/commit/c9a9115))
|
||||
|
||||
## [0.2.2] - 2021-10-01
|
||||
|
||||
## Changed
|
||||
|
||||
- Update peer dependencies to support v3 alpha
|
||||
|
||||
## [0.2.1] - 2021-05-24
|
||||
|
||||
### Fixed
|
||||
|
||||
- Mark `tailwindcss` as a peer-dependency for monorepo support ([#6](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/6))
|
||||
|
||||
## [0.2.0] - 2021-01-22
|
||||
|
||||
### Added
|
||||
|
||||
- Allow using numbers instead of strings in your config ([#3](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/3))
|
||||
|
||||
## [0.1.0] - 2021-01-06
|
||||
|
||||
Initial release!
|
||||
|
||||
[unreleased]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.4.4...HEAD
|
||||
[0.4.4]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.4.3...v0.4.4
|
||||
[0.4.3]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.4.2...v0.4.3
|
||||
[0.4.2]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.4.1...v0.4.2
|
||||
[0.4.1]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.4.0...v0.4.1
|
||||
[0.4.0]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.3.1...v0.4.0
|
||||
[0.3.1]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.3.0...v0.3.1
|
||||
[0.3.0]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.2.1...v0.3.0
|
||||
[0.2.1]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.2.0...v0.2.1
|
||||
[0.2.0]: https://github.com/tailwindlabs/tailwindcss-line-clamp/compare/v0.1.0...v0.2.0
|
||||
[0.1.0]: https://github.com/tailwindlabs/tailwindcss-line-clamp/releases/tag/v0.1.0
|
21
backend/node_modules/@tailwindcss/line-clamp/LICENSE
generated
vendored
Normal file
21
backend/node_modules/@tailwindcss/line-clamp/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Tailwind Labs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
82
backend/node_modules/@tailwindcss/line-clamp/README.md
generated
vendored
Normal file
82
backend/node_modules/@tailwindcss/line-clamp/README.md
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
# @tailwindcss/line-clamp
|
||||
|
||||
A plugin that provides utilities for visually truncating text after a fixed number of lines.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Install the plugin from npm:
|
||||
|
||||
```sh
|
||||
npm install -D @tailwindcss/line-clamp
|
||||
```
|
||||
|
||||
Then add the plugin to your `tailwind.config.js` file:
|
||||
|
||||
```js
|
||||
// tailwind.config.js
|
||||
module.exports = {
|
||||
theme: {
|
||||
// ...
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/line-clamp'),
|
||||
// ...
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Use the `line-clamp-{n}` utilities to specify how many lines of text should be visible before truncating:
|
||||
|
||||
```html
|
||||
<p class="line-clamp-3">
|
||||
Et molestiae hic earum repellat aliquid est doloribus delectus. Enim illum odio porro ut omnis dolor debitis natus. Voluptas possimus deserunt sit delectus est saepe nihil. Qui voluptate possimus et quia. Eligendi voluptas voluptas dolor cum. Rerum est quos quos id ut molestiae fugit.
|
||||
</p>
|
||||
```
|
||||
|
||||
To remove any line-clamping, use `line-clamp-none`:
|
||||
|
||||
```html
|
||||
<p class="line-clamp-3 md:line-clamp-none">
|
||||
Et molestiae hic earum repellat aliquid est doloribus delectus. Enim illum odio porro ut omnis dolor debitis natus. Voluptas possimus deserunt sit delectus est saepe nihil. Qui voluptate possimus et quia. Eligendi voluptas voluptas dolor cum. Rerum est quos quos id ut molestiae fugit.
|
||||
</p>
|
||||
```
|
||||
|
||||
> Note that the `line-clamp-{n}` set other properties like `display` and `overflow` in addition to `-webkit-line-clamp` which are not unset by `line-clamp-none`, so depending on what you are trying to achieve you may need to explicitly override those properties with utilities like `flex` or `overflow-visible` as well.
|
||||
|
||||
Utilities are for clamping text up to 6 lines are generated by default:
|
||||
|
||||
| Class | CSS |
|
||||
| --- | --- |
|
||||
| `line-clamp-1` | `overflow: hidden;`<br>`display: -webkit-box;`<br>`-webkit-box-orient: vertical;`<br>`-webkit-line-clamp: 1;` |
|
||||
| `line-clamp-2` | `overflow: hidden;`<br>`display: -webkit-box;`<br>`-webkit-box-orient: vertical;`<br>`-webkit-line-clamp: 2;` |
|
||||
| `line-clamp-3` | `overflow: hidden;`<br>`display: -webkit-box;`<br>`-webkit-box-orient: vertical;`<br>`-webkit-line-clamp: 3;` |
|
||||
| `line-clamp-4` | `overflow: hidden;`<br>`display: -webkit-box;`<br>`-webkit-box-orient: vertical;`<br>`-webkit-line-clamp: 4;` |
|
||||
| `line-clamp-5` | `overflow: hidden;`<br>`display: -webkit-box;`<br>`-webkit-box-orient: vertical;`<br>`-webkit-line-clamp: 5;` |
|
||||
| `line-clamp-6` | `overflow: hidden;`<br>`display: -webkit-box;`<br>`-webkit-box-orient: vertical;`<br>`-webkit-line-clamp: 6;` |
|
||||
| `line-clamp-none` | `-webkit-line-clamp: unset;` |
|
||||
|
||||
## Configuration
|
||||
|
||||
You can configure which values and variants are generated by this plugin under the `lineClamp` key in your `tailwind.config.js` file:
|
||||
|
||||
```js
|
||||
// tailwind.config.js
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
lineClamp: {
|
||||
7: '7',
|
||||
8: '8',
|
||||
9: '9',
|
||||
10: '10',
|
||||
}
|
||||
}
|
||||
},
|
||||
variants: {
|
||||
lineClamp: ['responsive', 'hover']
|
||||
}
|
||||
}
|
||||
```
|
146
backend/node_modules/@tailwindcss/line-clamp/jest/customMatchers.js
generated
vendored
Normal file
146
backend/node_modules/@tailwindcss/line-clamp/jest/customMatchers.js
generated
vendored
Normal file
@ -0,0 +1,146 @@
|
||||
const prettier = require('prettier')
|
||||
const { diff } = require('jest-diff')
|
||||
|
||||
function format(input) {
|
||||
return prettier.format(input, {
|
||||
parser: 'css',
|
||||
printWidth: 100,
|
||||
})
|
||||
}
|
||||
|
||||
expect.extend({
|
||||
// Compare two CSS strings with all whitespace removed
|
||||
// This is probably naive but it's fast and works well enough.
|
||||
toMatchCss(received, argument) {
|
||||
function stripped(str) {
|
||||
return str.replace(/\s/g, '').replace(/;/g, '')
|
||||
}
|
||||
|
||||
const options = {
|
||||
comment: 'stripped(received) === stripped(argument)',
|
||||
isNot: this.isNot,
|
||||
promise: this.promise,
|
||||
}
|
||||
|
||||
const pass = stripped(received) === stripped(argument)
|
||||
|
||||
const message = pass
|
||||
? () => {
|
||||
return (
|
||||
this.utils.matcherHint('toMatchCss', undefined, undefined, options) +
|
||||
'\n\n' +
|
||||
`Expected: not ${this.utils.printExpected(format(received))}\n` +
|
||||
`Received: ${this.utils.printReceived(format(argument))}`
|
||||
)
|
||||
}
|
||||
: () => {
|
||||
const actual = format(received)
|
||||
const expected = format(argument)
|
||||
|
||||
const diffString = diff(expected, actual, {
|
||||
expand: this.expand,
|
||||
})
|
||||
|
||||
return (
|
||||
this.utils.matcherHint('toMatchCss', undefined, undefined, options) +
|
||||
'\n\n' +
|
||||
(diffString && diffString.includes('- Expect')
|
||||
? `Difference:\n\n${diffString}`
|
||||
: `Expected: ${this.utils.printExpected(expected)}\n` +
|
||||
`Received: ${this.utils.printReceived(actual)}`)
|
||||
)
|
||||
}
|
||||
|
||||
return { actual: received, message, pass }
|
||||
},
|
||||
toIncludeCss(received, argument) {
|
||||
const options = {
|
||||
comment: 'stripped(received).includes(stripped(argument))',
|
||||
isNot: this.isNot,
|
||||
promise: this.promise,
|
||||
}
|
||||
|
||||
const actual = format(received)
|
||||
const expected = format(argument)
|
||||
|
||||
const pass = actual.includes(expected)
|
||||
|
||||
const message = pass
|
||||
? () => {
|
||||
return (
|
||||
this.utils.matcherHint('toIncludeCss', undefined, undefined, options) +
|
||||
'\n\n' +
|
||||
`Expected: not ${this.utils.printExpected(format(received))}\n` +
|
||||
`Received: ${this.utils.printReceived(format(argument))}`
|
||||
)
|
||||
}
|
||||
: () => {
|
||||
const diffString = diff(expected, actual, {
|
||||
expand: this.expand,
|
||||
})
|
||||
|
||||
return (
|
||||
this.utils.matcherHint('toIncludeCss', undefined, undefined, options) +
|
||||
'\n\n' +
|
||||
(diffString && diffString.includes('- Expect')
|
||||
? `Difference:\n\n${diffString}`
|
||||
: `Expected: ${this.utils.printExpected(expected)}\n` +
|
||||
`Received: ${this.utils.printReceived(actual)}`)
|
||||
)
|
||||
}
|
||||
|
||||
return { actual: received, message, pass }
|
||||
},
|
||||
})
|
||||
|
||||
expect.extend({
|
||||
// Compare two CSS strings with all whitespace removed
|
||||
// This is probably naive but it's fast and works well enough.
|
||||
toMatchFormattedCss(received, argument) {
|
||||
function format(input) {
|
||||
return prettier.format(input.replace(/\n/g, ''), {
|
||||
parser: 'css',
|
||||
printWidth: 100,
|
||||
})
|
||||
}
|
||||
const options = {
|
||||
comment: 'stripped(received) === stripped(argument)',
|
||||
isNot: this.isNot,
|
||||
promise: this.promise,
|
||||
}
|
||||
|
||||
let formattedReceived = format(received)
|
||||
let formattedArgument = format(argument)
|
||||
|
||||
const pass = formattedReceived === formattedArgument
|
||||
|
||||
const message = pass
|
||||
? () => {
|
||||
return (
|
||||
this.utils.matcherHint('toMatchCss', undefined, undefined, options) +
|
||||
'\n\n' +
|
||||
`Expected: not ${this.utils.printExpected(formattedReceived)}\n` +
|
||||
`Received: ${this.utils.printReceived(formattedArgument)}`
|
||||
)
|
||||
}
|
||||
: () => {
|
||||
const actual = formattedReceived
|
||||
const expected = formattedArgument
|
||||
|
||||
const diffString = diff(expected, actual, {
|
||||
expand: this.expand,
|
||||
})
|
||||
|
||||
return (
|
||||
this.utils.matcherHint('toMatchCss', undefined, undefined, options) +
|
||||
'\n\n' +
|
||||
(diffString && diffString.includes('- Expect')
|
||||
? `Difference:\n\n${diffString}`
|
||||
: `Expected: ${this.utils.printExpected(expected)}\n` +
|
||||
`Received: ${this.utils.printReceived(actual)}`)
|
||||
)
|
||||
}
|
||||
|
||||
return { actual: received, message, pass }
|
||||
},
|
||||
})
|
34
backend/node_modules/@tailwindcss/line-clamp/package.json
generated
vendored
Normal file
34
backend/node_modules/@tailwindcss/line-clamp/package.json
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@tailwindcss/line-clamp",
|
||||
"version": "0.4.4",
|
||||
"main": "src/index.js",
|
||||
"types": "src/index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/tailwindlabs/tailwindcss-line-clamp",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest": "^27.4.4",
|
||||
"postcss": "^8.2.2",
|
||||
"prettier": "^2.5.1",
|
||||
"tailwindcss": "^3.0.23"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1"
|
||||
},
|
||||
"jest": {
|
||||
"setupFilesAfterEnv": [
|
||||
"<rootDir>/jest/customMatchers.js"
|
||||
]
|
||||
}
|
||||
}
|
2
backend/node_modules/@tailwindcss/line-clamp/src/index.d.ts
generated
vendored
Normal file
2
backend/node_modules/@tailwindcss/line-clamp/src/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const plugin: { handler: () => void }
|
||||
export = plugin
|
51
backend/node_modules/@tailwindcss/line-clamp/src/index.js
generated
vendored
Normal file
51
backend/node_modules/@tailwindcss/line-clamp/src/index.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
const plugin = require('tailwindcss/plugin')
|
||||
|
||||
const baseStyles = {
|
||||
overflow: 'hidden',
|
||||
display: '-webkit-box',
|
||||
'-webkit-box-orient': 'vertical',
|
||||
}
|
||||
|
||||
const lineClamp = plugin(
|
||||
function ({ matchUtilities, addUtilities, theme, variants }) {
|
||||
const values = theme('lineClamp')
|
||||
|
||||
matchUtilities(
|
||||
{
|
||||
'line-clamp': (value) => ({
|
||||
...baseStyles,
|
||||
'-webkit-line-clamp': `${value}`,
|
||||
}),
|
||||
},
|
||||
{ values }
|
||||
)
|
||||
|
||||
addUtilities(
|
||||
[
|
||||
{
|
||||
'.line-clamp-none': {
|
||||
'-webkit-line-clamp': 'unset',
|
||||
},
|
||||
},
|
||||
],
|
||||
variants('lineClamp')
|
||||
)
|
||||
},
|
||||
{
|
||||
theme: {
|
||||
lineClamp: {
|
||||
1: '1',
|
||||
2: '2',
|
||||
3: '3',
|
||||
4: '4',
|
||||
5: '5',
|
||||
6: '6',
|
||||
},
|
||||
},
|
||||
variants: {
|
||||
lineClamp: ['responsive'],
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
module.exports = lineClamp
|
65
backend/node_modules/@tailwindcss/line-clamp/src/index.test.js
generated
vendored
Normal file
65
backend/node_modules/@tailwindcss/line-clamp/src/index.test.js
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
const path = require('path')
|
||||
const postcss = require('postcss')
|
||||
const tailwindcss = require('tailwindcss')
|
||||
const lineClampPlugin = require('.')
|
||||
|
||||
function run(config, plugin = tailwindcss) {
|
||||
let { currentTestName } = expect.getState()
|
||||
config = {
|
||||
...{ plugins: [lineClampPlugin], corePlugins: { preflight: false } },
|
||||
...config,
|
||||
}
|
||||
|
||||
return postcss(plugin(config)).process('@tailwind utilities', {
|
||||
from: `${path.resolve(__filename)}?test=${currentTestName}`,
|
||||
})
|
||||
}
|
||||
|
||||
it('should add the `line-clamp-{n}` components', () => {
|
||||
const config = {
|
||||
content: [
|
||||
{
|
||||
raw: String.raw`<div class="line-clamp-2 line-clamp-[33] line-clamp-[var(--line-clamp-variable)]"></div>`,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
return run(config).then((result) => {
|
||||
expect(result.css).toMatchCss(String.raw`
|
||||
.line-clamp-2 {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.line-clamp-\[33\] {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 33;
|
||||
}
|
||||
|
||||
.line-clamp-\[var\(--line-clamp-variable\)\] {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: var(--line-clamp-variable);
|
||||
}
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
||||
it('should add the `line-clamp-none` utility', () => {
|
||||
const config = {
|
||||
content: [{ raw: String.raw`<div class="line-clamp-none"></div>` }],
|
||||
}
|
||||
|
||||
return run(config).then((result) => {
|
||||
expect(result.css).toMatchCss(String.raw`
|
||||
.line-clamp-none {
|
||||
-webkit-line-clamp: unset;
|
||||
}
|
||||
`)
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user