啊啊
This commit is contained in:
7
node_modules/.store/element-plus@2.4.3/node_modules/@ctrl/tinycolor/LICENSE
generated
vendored
Normal file
7
node_modules/.store/element-plus@2.4.3/node_modules/@ctrl/tinycolor/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright (c) Scott Cooper <scttcper@gmail.com>
|
||||
|
||||
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.
|
||||
689
node_modules/.store/element-plus@2.4.3/node_modules/@ctrl/tinycolor/README.md
generated
vendored
Normal file
689
node_modules/.store/element-plus@2.4.3/node_modules/@ctrl/tinycolor/README.md
generated
vendored
Normal file
@@ -0,0 +1,689 @@
|
||||
# tinycolor
|
||||
|
||||
[](https://www.npmjs.com/package/@ctrl/tinycolor)
|
||||
[](https://circleci.com/gh/scttcper/tinycolor)
|
||||
[](https://codecov.io/gh/scttcper/tinycolor)
|
||||
[](https://bundlephobia.com/result?p=@ctrl/tinycolor)
|
||||
|
||||
> TinyColor is a small library for color manipulation and conversion
|
||||
|
||||
A fork of [tinycolor2](https://github.com/bgrins/TinyColor) by [Brian Grinstead](https://github.com/bgrins)
|
||||
|
||||
__DEMO__: https://tinycolor.vercel.app
|
||||
|
||||
### Changes from tinycolor2
|
||||
|
||||
* reformatted into TypeScript / es2015 and requires node >= 8
|
||||
* tree shakeable "module" export and no package `sideEffects`
|
||||
* `tinycolor` is now exported as a class called `TinyColor`
|
||||
* new `random`, an implementation of [randomColor](https://github.com/davidmerfield/randomColor/) by David Merfield that returns a TinyColor object
|
||||
* several functions moved out of the tinycolor class and are no longer `TinyColor.<function>`
|
||||
* `readability`, `fromRatio` moved out
|
||||
* `random` moved out and renamed to `legacyRandom`
|
||||
* `toFilter` has been moved out and renamed to `toMsFilter`
|
||||
* `mix`, `equals` use the current TinyColor object as the first parameter
|
||||
* added polyad colors tinycolor PR [126](https://github.com/bgrins/TinyColor/pull/126)
|
||||
* color wheel values (360) are allowed to over or under-spin and still return valid colors tinycolor PR [108](https://github.com/bgrins/TinyColor/pull/108)
|
||||
* added `tint()` and `shade()` tinycolor PR [159](https://github.com/bgrins/TinyColor/pull/159)
|
||||
* `isValid`, `format` are now propertys instead of a function
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install @ctrl/tinycolor
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```ts
|
||||
import { TinyColor } from '@ctrl/tinycolor';
|
||||
const color = new TinyColor('red').toHexString(); // '#ff0000'
|
||||
```
|
||||
|
||||
## Accepted String Input
|
||||
|
||||
The string parsing is very permissive. It is meant to make typing a color as input as easy as possible. All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).
|
||||
|
||||
HSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties. The `H` (hue) can have values between 0%-100% or 0-360.
|
||||
|
||||
RGB input requires either 0-255 or 0%-100%.
|
||||
|
||||
If you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.
|
||||
|
||||
Here are some examples of string input:
|
||||
|
||||
### Hex, 8-digit (RGBA) Hex
|
||||
|
||||
```ts
|
||||
new TinyColor('#000');
|
||||
new TinyColor('000');
|
||||
new TinyColor('#369C');
|
||||
new TinyColor('369C');
|
||||
new TinyColor('#f0f0f6');
|
||||
new TinyColor('f0f0f6');
|
||||
new TinyColor('#f0f0f688');
|
||||
new TinyColor('f0f0f688');
|
||||
```
|
||||
|
||||
### RGB, RGBA
|
||||
|
||||
```ts
|
||||
new TinyColor('rgb (255, 0, 0)');
|
||||
new TinyColor('rgb 255 0 0');
|
||||
new TinyColor('rgba (255, 0, 0, .5)');
|
||||
new TinyColor({ r: 255, g: 0, b: 0 });
|
||||
|
||||
import { fromRatio } from '@ctrl/tinycolor';
|
||||
fromRatio({ r: 1, g: 0, b: 0 });
|
||||
fromRatio({ r: 0.5, g: 0.5, b: 0.5 });
|
||||
```
|
||||
|
||||
### HSL, HSLA
|
||||
|
||||
```ts
|
||||
new TinyColor('hsl(0, 100%, 50%)');
|
||||
new TinyColor('hsla(0, 100%, 50%, .5)');
|
||||
new TinyColor('hsl(0, 100%, 50%)');
|
||||
new TinyColor('hsl 0 1.0 0.5');
|
||||
new TinyColor({ h: 0, s: 1, l: 0.5 });
|
||||
```
|
||||
|
||||
### HSV, HSVA
|
||||
|
||||
```ts
|
||||
new TinyColor('hsv(0, 100%, 100%)');
|
||||
new TinyColor('hsva(0, 100%, 100%, .5)');
|
||||
new TinyColor('hsv (0 100% 100%)');
|
||||
new TinyColor('hsv 0 1 1');
|
||||
new TinyColor({ h: 0, s: 100, v: 100 });
|
||||
```
|
||||
|
||||
### Named
|
||||
|
||||
```ts
|
||||
new TinyColor('RED');
|
||||
new TinyColor('blanchedalmond');
|
||||
new TinyColor('darkblue');
|
||||
```
|
||||
|
||||
### Number
|
||||
```ts
|
||||
new TinyColor(0x0);
|
||||
new TinyColor(0xaabbcc);
|
||||
```
|
||||
|
||||
### Accepted Object Input
|
||||
|
||||
If you are calling this from code, you may want to use object input. Here are some examples of the different types of accepted object inputs:
|
||||
|
||||
```ts
|
||||
{ r: 255, g: 0, b: 0 }
|
||||
{ r: 255, g: 0, b: 0, a: .5 }
|
||||
{ h: 0, s: 100, l: 50 }
|
||||
{ h: 0, s: 100, v: 100 }
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
### originalInput
|
||||
|
||||
The original input passed into the constructer used to create the tinycolor instance
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.originalInput; // "red"
|
||||
color = new TinyColor({ r: 255, g: 255, b: 255 });
|
||||
color.originalInput; // "{r: 255, g: 255, b: 255}"
|
||||
```
|
||||
|
||||
### format
|
||||
|
||||
Returns the format used to create the tinycolor instance
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.format; // "name"
|
||||
color = new TinyColor({ r: 255, g: 255, b: 255 });
|
||||
color.format; // "rgb"
|
||||
```
|
||||
|
||||
### isValid
|
||||
|
||||
A boolean indicating whether the color was successfully parsed. Note: if the color is not valid then it will act like `black` when being used with other methods.
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('red');
|
||||
color1.isValid; // true
|
||||
color1.toHexString(); // "#ff0000"
|
||||
|
||||
const color2 = new TinyColor('not a color');
|
||||
color2.isValid; // false
|
||||
color2.toString(); // "#000000"
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
### getBrightness
|
||||
|
||||
Returns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('#fff');
|
||||
color1.getBrightness(); // 255
|
||||
|
||||
const color2 = new TinyColor('#000');
|
||||
color2.getBrightness(); // 0
|
||||
```
|
||||
|
||||
### isLight
|
||||
|
||||
Return a boolean indicating whether the color's perceived brightness is light.
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('#fff');
|
||||
color1.isLight(); // true
|
||||
|
||||
const color2 = new TinyColor('#000');
|
||||
color2.isLight(); // false
|
||||
```
|
||||
|
||||
### isDark
|
||||
|
||||
Return a boolean indicating whether the color's perceived brightness is dark.
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('#fff');
|
||||
color1.isDark(); // false
|
||||
|
||||
const color2 = new TinyColor('#000');
|
||||
color2.isDark(); // true
|
||||
```
|
||||
|
||||
### getLuminance
|
||||
|
||||
Returns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('#fff');
|
||||
color1.getLuminance(); // 1
|
||||
|
||||
const color2 = new TinyColor('#000');
|
||||
color2.getLuminance(); // 0
|
||||
```
|
||||
|
||||
### getAlpha
|
||||
|
||||
Returns the alpha value of a color, from `0-1`.
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('rgba(255, 0, 0, .5)');
|
||||
color1.getAlpha(); // 0.5
|
||||
|
||||
const color2 = new TinyColor('rgb(255, 0, 0)');
|
||||
color2.getAlpha(); // 1
|
||||
|
||||
const color3 = new TinyColor('transparent');
|
||||
color3.getAlpha(); // 0
|
||||
```
|
||||
|
||||
### setAlpha
|
||||
|
||||
Sets the alpha value on a current color. Accepted range is in between `0-1`.
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.getAlpha(); // 1
|
||||
color.setAlpha(0.5);
|
||||
color.getAlpha(); // .5
|
||||
color.toRgbString(); // "rgba(255, 0, 0, .5)"
|
||||
```
|
||||
|
||||
### onBackground
|
||||
|
||||
Compute how the color would appear on a background. When the color is fully transparent (i.e. `getAlpha() == 0`), the result will be the background color. When the color is not transparent at all (i.e. `getAlpha() == 1`), the result will be the color itself. Otherwise you will get a computed result.
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('rgba(255, 0, 0, .5)');
|
||||
const computedColor = color.onBackground('rgb(0, 0, 255)');
|
||||
computedColor.toRgbString(); // "rgb(128, 0, 128)"
|
||||
```
|
||||
|
||||
### String Representations
|
||||
|
||||
The following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`
|
||||
|
||||
### toHsv
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }
|
||||
```
|
||||
|
||||
### toHsvString
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHsvString(); // "hsv(0, 100%, 100%)"
|
||||
color.setAlpha(0.5);
|
||||
color.toHsvString(); // "hsva(0, 100%, 100%, 0.5)"
|
||||
```
|
||||
|
||||
### toHsl
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }
|
||||
```
|
||||
|
||||
### toHslString
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHslString(); // "hsl(0, 100%, 50%)"
|
||||
color.setAlpha(0.5);
|
||||
color.toHslString(); // "hsla(0, 100%, 50%, 0.5)"
|
||||
```
|
||||
|
||||
### toNumber
|
||||
```ts
|
||||
new TinyColor('#aabbcc').toNumber() === 0xaabbcc // true
|
||||
new TinyColor('rgb(1, 1, 1)').toNumber() === (1 << 16) + (1 << 8) + 1 // true
|
||||
```
|
||||
|
||||
### toHex
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHex(); // "ff0000"
|
||||
```
|
||||
|
||||
### toHexString
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHexString(); // "#ff0000"
|
||||
```
|
||||
|
||||
### toHex8
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHex8(); // "ff0000ff"
|
||||
```
|
||||
|
||||
### toHex8String
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toHex8String(); // "#ff0000ff"
|
||||
```
|
||||
|
||||
### toHexShortString
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('#ff000000');
|
||||
color1.toHexShortString(); // "#ff000000"
|
||||
color1.toHexShortString(true); // "#f000"
|
||||
|
||||
const color2 = new TinyColor('#ff0000ff');
|
||||
color2.toHexShortString(); // "#ff0000"
|
||||
color2.toHexShortString(true); // "#f00"
|
||||
```
|
||||
|
||||
### toRgb
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }
|
||||
```
|
||||
|
||||
### toRgbString
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toRgbString(); // "rgb(255, 0, 0)"
|
||||
color.setAlpha(0.5);
|
||||
color.toRgbString(); // "rgba(255, 0, 0, 0.5)"
|
||||
```
|
||||
|
||||
### toPercentageRgb
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toPercentageRgb(); // { r: "100%", g: "0%", b: "0%", a: 1 }
|
||||
```
|
||||
|
||||
### toPercentageRgbString
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toPercentageRgbString(); // "rgb(100%, 0%, 0%)"
|
||||
color.setAlpha(0.5);
|
||||
color.toPercentageRgbString(); // "rgba(100%, 0%, 0%, 0.5)"
|
||||
```
|
||||
|
||||
### toName
|
||||
|
||||
```ts
|
||||
const color = new TinyColor('red');
|
||||
color.toName(); // "red"
|
||||
```
|
||||
|
||||
### toFilter
|
||||
|
||||
```ts
|
||||
import { toMsFilter } from '@ctrl/tinycolor';
|
||||
toMsFilter('red', 'blue'); // 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ff0000ff)'
|
||||
```
|
||||
|
||||
### toString
|
||||
|
||||
Print to a string, depending on the input format. You can also override this by passing one of `"rgb", "prgb", "hex6", "hex3", "hex8", "name", "hsl", "hsv"` into the function.
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('red');
|
||||
color1.toString(); // "red"
|
||||
color1.toString('hsv'); // "hsv(0, 100%, 100%)"
|
||||
|
||||
const color2 = new TinyColor('rgb(255, 0, 0)');
|
||||
color2.toString(); // "rgb(255, 0, 0)"
|
||||
color2.setAlpha(0.5);
|
||||
color2.toString(); // "rgba(255, 0, 0, 0.5)"
|
||||
```
|
||||
|
||||
### Color Modification
|
||||
|
||||
These methods manipulate the current color, and return it for chaining. For instance:
|
||||
|
||||
```ts
|
||||
new TinyColor('red')
|
||||
.lighten()
|
||||
.desaturate()
|
||||
.toHexString(); // '#f53d3d'
|
||||
```
|
||||
|
||||
### lighten
|
||||
|
||||
`lighten: function(amount = 10) -> TinyColor`. Lighten the color a given amount, from 0 to 100. Providing 100 will always return white.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').lighten().toString(); // '#ff3333'
|
||||
new TinyColor('#f00').lighten(100).toString(); // '#ffffff'
|
||||
```
|
||||
|
||||
### brighten
|
||||
|
||||
`brighten: function(amount = 10) -> TinyColor`. Brighten the color a given amount, from 0 to 100.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').brighten().toString(); // '#ff1919'
|
||||
```
|
||||
|
||||
### darken
|
||||
|
||||
`darken: function(amount = 10) -> TinyColor`. Darken the color a given amount, from 0 to 100. Providing 100 will always return black.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').darken().toString(); // '#cc0000'
|
||||
new TinyColor('#f00').darken(100).toString(); // '#000000'
|
||||
```
|
||||
|
||||
### tint
|
||||
|
||||
Mix the color with pure white, from 0 to 100. Providing 0 will do nothing, providing 100 will always return white.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').tint().toString(); // "#ff1a1a"
|
||||
new TinyColor('#f00').tint(100).toString(); // "#ffffff"
|
||||
```
|
||||
|
||||
### shade
|
||||
|
||||
Mix the color with pure black, from 0 to 100. Providing 0 will do nothing, providing 100 will always return black.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').shade().toString(); // "#e60000"
|
||||
new TinyColor('#f00').shade(100).toString(); // "#000000"
|
||||
```
|
||||
|
||||
### desaturate
|
||||
|
||||
`desaturate: function(amount = 10) -> TinyColor`. Desaturate the color a given amount, from 0 to 100. Providing 100 will is the same as calling `greyscale`.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').desaturate().toString(); // "#f20d0d"
|
||||
new TinyColor('#f00').desaturate(100).toString(); // "#808080"
|
||||
```
|
||||
|
||||
### saturate
|
||||
|
||||
`saturate: function(amount = 10) -> TinyColor`. Saturate the color a given amount, from 0 to 100.
|
||||
|
||||
```ts
|
||||
new TinyColor('hsl(0, 10%, 50%)').saturate().toString(); // "hsl(0, 20%, 50%)"
|
||||
```
|
||||
|
||||
### greyscale
|
||||
|
||||
`greyscale: function() -> TinyColor`. Completely desaturates a color into greyscale. Same as calling `desaturate(100)`.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').greyscale().toString(); // "#808080"
|
||||
```
|
||||
|
||||
### spin
|
||||
|
||||
`spin: function(amount = 0) -> TinyColor`. Spin the hue a given amount, from -360 to 360. Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').spin(180).toString(); // "#00ffff"
|
||||
new TinyColor('#f00').spin(-90).toString(); // "#7f00ff"
|
||||
new TinyColor('#f00').spin(90).toString(); // "#80ff00"
|
||||
|
||||
// spin(0) and spin(360) do nothing
|
||||
new TinyColor('#f00').spin(0).toString(); // "#ff0000"
|
||||
new TinyColor('#f00').spin(360).toString(); // "#ff0000"
|
||||
```
|
||||
|
||||
### mix
|
||||
|
||||
`mix: function(amount = 50) => TinyColor`. Mix the current color a given amount with another color, from 0 to 100. 0 means no mixing (return current color).
|
||||
|
||||
```ts
|
||||
let color1 = new TinyColor('#f0f');
|
||||
let color2 = new TinyColor('#0f0');
|
||||
|
||||
color1.mix(color2).toHexString(); // #808080
|
||||
```
|
||||
|
||||
### Color Combinations
|
||||
|
||||
Combination functions return an array of TinyColor objects unless otherwise noted.
|
||||
|
||||
### analogous
|
||||
|
||||
`analogous: function(results = 6, slices = 30) -> array<TinyColor>`.
|
||||
|
||||
```ts
|
||||
const colors = new TinyColor('#f00').analogous();
|
||||
colors.map(t => t.toHexString()); // [ "#ff0000", "#ff0066", "#ff0033", "#ff0000", "#ff3300", "#ff6600" ]
|
||||
```
|
||||
|
||||
### monochromatic
|
||||
|
||||
`monochromatic: function(, results = 6) -> array<TinyColor>`.
|
||||
|
||||
```ts
|
||||
const colors = new TinyColor('#f00').monochromatic();
|
||||
colors.map(t => t.toHexString()); // [ "#ff0000", "#2a0000", "#550000", "#800000", "#aa0000", "#d40000" ]
|
||||
```
|
||||
|
||||
### splitcomplement
|
||||
|
||||
`splitcomplement: function() -> array<TinyColor>`.
|
||||
|
||||
```ts
|
||||
const colors = new TinyColor('#f00').splitcomplement();
|
||||
colors.map(t => t.toHexString()); // [ "#ff0000", "#ccff00", "#0066ff" ]
|
||||
```
|
||||
|
||||
### triad
|
||||
|
||||
`triad: function() -> array<TinyColor>`. Alias for `polyad(3)`.
|
||||
|
||||
```ts
|
||||
const colors = new TinyColor('#f00').triad();
|
||||
colors.map(t => t.toHexString()); // [ "#ff0000", "#00ff00", "#0000ff" ]
|
||||
```
|
||||
|
||||
### tetrad
|
||||
|
||||
`tetrad: function() -> array<TinyColor>`. Alias for `polyad(4)`.
|
||||
|
||||
```ts
|
||||
const colors = new TinyColor('#f00').tetrad();
|
||||
colors.map(t => t.toHexString()); // [ "#ff0000", "#80ff00", "#00ffff", "#7f00ff" ]
|
||||
```
|
||||
|
||||
### polyad
|
||||
|
||||
`polyad: function(number) -> array<TinyColor>`.
|
||||
|
||||
```ts
|
||||
const colors = new TinyColor('#f00').polyad(4);
|
||||
colors.map(t => t.toHexString()); // [ "#ff0000", "#80ff00", "#00ffff", "#7f00ff" ]
|
||||
```
|
||||
|
||||
### complement
|
||||
|
||||
`complement: function() -> TinyColor`.
|
||||
|
||||
```ts
|
||||
new TinyColor('#f00').complement().toHexString(); // "#00ffff"
|
||||
```
|
||||
|
||||
## Color Utilities
|
||||
|
||||
### equals
|
||||
|
||||
```ts
|
||||
let color1 = new TinyColor('red');
|
||||
let color2 = new TinyColor('#f00');
|
||||
|
||||
color1.equals(color2); // true
|
||||
```
|
||||
|
||||
### random
|
||||
|
||||
Returns a random TinyColor object. This is an implementation of [randomColor](https://github.com/davidmerfield/randomColor/) by David Merfield.
|
||||
The difference input parsing and output formatting are handled by TinyColor.
|
||||
|
||||
You can pass an options object to influence the type of color it produces. The options object accepts the following properties:
|
||||
|
||||
* `hue` – Controls the hue of the generated color. You can pass a string representing a color name: `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink` and `monochrome` are currently supported. If you pass a hexidecimal color string such as #00FFFF, its hue value will be extracted and used to generate colors.
|
||||
* `luminosity` – Controls the luminosity of the generated color. You can specify a string containing bright, light or dark.
|
||||
* `count` – An integer which specifies the number of colors to generate.
|
||||
* `seed` – An integer which when passed will cause randomColor to return the same color each time.
|
||||
* `alpha` – A decimal between 0 and 1. Only relevant when using a format with an alpha channel (rgba and hsla). Defaults to a random value.
|
||||
|
||||
```ts
|
||||
import { random } from '@ctrl/tinycolor';
|
||||
// Returns a TinyColor for an attractive color
|
||||
random();
|
||||
|
||||
// Returns an array of ten green colors
|
||||
random({
|
||||
count: 10,
|
||||
hue: 'green',
|
||||
});
|
||||
|
||||
// Returns a TinyColor object in a light blue
|
||||
random({
|
||||
luminosity: 'light',
|
||||
hue: 'blue',
|
||||
});
|
||||
|
||||
// Returns a TinyColor object in a 'truly random' color
|
||||
random({
|
||||
luminosity: 'random',
|
||||
hue: 'random',
|
||||
});
|
||||
|
||||
// Returns a dark RGB color with specified alpha
|
||||
random({
|
||||
luminosity: 'dark',
|
||||
alpha: 0.5,
|
||||
});
|
||||
```
|
||||
|
||||
### Readability
|
||||
|
||||
TinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).
|
||||
|
||||
#### readability
|
||||
|
||||
`readability: function(TinyColor, TinyColor) -> number`.
|
||||
Returns the contrast ratio between two colors.
|
||||
|
||||
```ts
|
||||
import { readability } from '@ctrl/tinycolor';
|
||||
readability('#000', '#000'); // 1
|
||||
readability('#000', '#111'); // 1.1121078324840545
|
||||
readability('#000', '#fff'); // 21
|
||||
```
|
||||
|
||||
Use the values in your own calculations, or use one of the convenience functions below.
|
||||
|
||||
#### isReadable
|
||||
|
||||
`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`. Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: "AA",size: "small"}`. `level` can be `"AA"` or "AAA" and `size` can be `"small"` or `"large"`.
|
||||
|
||||
Here are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.
|
||||
|
||||
```ts
|
||||
import { isReadable } from '@ctrl/tinycolor';
|
||||
isReadable("#000", "#111"); // false
|
||||
isReadable("#ff0088", "#5c1a72", { level: "AA", size: "small" }); // false
|
||||
isReadable("#ff0088", "#5c1a72", { level: "AA", size: "large" }), // true
|
||||
```
|
||||
|
||||
#### mostReadable
|
||||
|
||||
`mostReadable: function(TinyColor, [TinyColor, TinyColor ...], Object) -> Boolean`.
|
||||
Given a base color and a list of possible foreground or background colors for that base, returns the most readable color.
|
||||
If none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.
|
||||
|
||||
```ts
|
||||
import { mostReadable } from '@ctrl/tinycolor';
|
||||
mostReadable('#000', ['#f00', '#0f0', '#00f']).toHexString(); // "#00ff00"
|
||||
mostReadable('#123', ['#124', '#125'], { includeFallbackColors: false }).toHexString(); // "#112255"
|
||||
mostReadable('#123', ['#124', '#125'], { includeFallbackColors: true }).toHexString(); // "#ffffff"
|
||||
mostReadable('#ff0088', ['#2e0c3a'], {
|
||||
includeFallbackColors: true,
|
||||
level: 'AAA',
|
||||
size: 'large',
|
||||
}).toHexString(); // "#2e0c3a",
|
||||
mostReadable('#ff0088', ['#2e0c3a'], {
|
||||
includeFallbackColors: true,
|
||||
level: 'AAA',
|
||||
size: 'small',
|
||||
}).toHexString(); // "#000000",
|
||||
```
|
||||
|
||||
See [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.
|
||||
|
||||
## Common operations
|
||||
|
||||
### clone
|
||||
|
||||
`clone: function() -> TinyColor`.
|
||||
Instantiate a new TinyColor object with the same color. Any changes to the new one won't affect the old one.
|
||||
|
||||
```ts
|
||||
const color1 = new TinyColor('#F00');
|
||||
const color2 = color1.clone();
|
||||
color2.setAlpha(0.5);
|
||||
|
||||
color1.toString(); // "#ff0000"
|
||||
color2.toString(); // "rgba(255, 0, 0, 0.5)"
|
||||
```
|
||||
83
node_modules/.store/element-plus@2.4.3/node_modules/@ctrl/tinycolor/package.json
generated
vendored
Normal file
83
node_modules/.store/element-plus@2.4.3/node_modules/@ctrl/tinycolor/package.json
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"name": "@ctrl/tinycolor",
|
||||
"version": "3.6.1",
|
||||
"description": "Fast, small color manipulation and conversion for JavaScript",
|
||||
"author": "Scott Cooper <scttcper@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "MIT",
|
||||
"homepage": "https://tinycolor.vercel.app",
|
||||
"repository": "scttcper/tinycolor",
|
||||
"keywords": [
|
||||
"typescript",
|
||||
"color",
|
||||
"manipulation",
|
||||
"tinycolor",
|
||||
"hsa",
|
||||
"rgb"
|
||||
],
|
||||
"main": "dist/public_api.js",
|
||||
"module": "dist/module/public_api.js",
|
||||
"typings": "dist/public_api.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build:demo": "rollup -c rollup.demo.js",
|
||||
"watch:demo": "rollup -c rollup.demo.js -w",
|
||||
"lint": "eslint --ext .js,.ts, .",
|
||||
"lint:fix": "eslint --fix --ext .js,.ts, .",
|
||||
"prepare": "npm run build",
|
||||
"build": "del-cli dist && tsc -p tsconfig.build.json && tsc -p tsconfig.module.json && ts-node build",
|
||||
"build:docs": "typedoc --out demo/public/docs --hideGenerator --tsconfig tsconfig.build.json src/public_api.ts",
|
||||
"test": "jest",
|
||||
"test:ci": "jest --ci --runInBand --reporters=default --reporters=jest-junit --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-modules-commonjs": "7.19.6",
|
||||
"@babel/preset-typescript": "7.18.6",
|
||||
"@ctrl/eslint-config": "3.5.6",
|
||||
"@jest/globals": "29.3.1",
|
||||
"@types/node": "18.11.11",
|
||||
"del-cli": "5.0.0",
|
||||
"jest": "29.3.1",
|
||||
"jest-junit": "15.0.0",
|
||||
"rollup": "2.70.1",
|
||||
"rollup-plugin-livereload": "2.0.5",
|
||||
"rollup-plugin-serve": "1.1.0",
|
||||
"rollup-plugin-sourcemaps": "0.6.3",
|
||||
"rollup-plugin-terser": "7.0.2",
|
||||
"rollup-plugin-typescript2": "0.34.1",
|
||||
"ts-node": "10.9.1",
|
||||
"typedoc": "0.23.21",
|
||||
"typescript": "4.9.3"
|
||||
},
|
||||
"jest": {
|
||||
"testEnvironment": "node",
|
||||
"coverageProvider": "v8",
|
||||
"moduleNameMapper": {
|
||||
"(.+)\\.js": "$1"
|
||||
}
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"@babel/preset-typescript"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-modules-commonjs"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"branch": "master"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"__npminstall_done": true,
|
||||
"_from": "@ctrl/tinycolor@3.6.1",
|
||||
"_resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz"
|
||||
}
|
||||
21
node_modules/.store/element-plus@2.4.3/node_modules/@element-plus/icons-vue/LICENSE
generated
vendored
Normal file
21
node_modules/.store/element-plus@2.4.3/node_modules/@element-plus/icons-vue/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020-PRESENT Element Plus (https://github.com/element-plus)
|
||||
|
||||
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.
|
||||
87
node_modules/.store/element-plus@2.4.3/node_modules/@element-plus/icons-vue/package.json
generated
vendored
Normal file
87
node_modules/.store/element-plus@2.4.3/node_modules/@element-plus/icons-vue/package.json
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"name": "@element-plus/icons-vue",
|
||||
"version": "2.3.1",
|
||||
"description": "Vue components of Element Plus Icons collection.",
|
||||
"type": "module",
|
||||
"keywords": [
|
||||
"icon",
|
||||
"svg",
|
||||
"vue",
|
||||
"element-plus"
|
||||
],
|
||||
"license": "MIT",
|
||||
"homepage": "https://element-plus.org/",
|
||||
"bugs": {
|
||||
"url": "https://github.com/element-plus/element-plus-icons/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/element-plus/element-plus-icons.git",
|
||||
"directory": "packages/vue"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"require": "./dist/index.cjs",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./global": {
|
||||
"types": "./dist/types/global.d.ts",
|
||||
"require": "./dist/global.cjs",
|
||||
"import": "./dist/global.js"
|
||||
},
|
||||
"./*": "./*"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"./*",
|
||||
"./dist/types/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sideEffects": false,
|
||||
"unpkg": "dist/index.iife.min.js",
|
||||
"jsdelivr": "dist/index.iife.min.js",
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pnpm/find-workspace-dir": "^6.0.2",
|
||||
"@pnpm/find-workspace-packages": "^6.0.9",
|
||||
"@pnpm/logger": "^5.0.0",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.10.0",
|
||||
"@types/prettier": "^3.0.0",
|
||||
"camelcase": "^8.0.0",
|
||||
"chalk": "^5.3.0",
|
||||
"consola": "^3.2.3",
|
||||
"esbuild": "^0.19.8",
|
||||
"esbuild-plugin-globals": "^0.2.0",
|
||||
"fast-glob": "^3.3.2",
|
||||
"fs-extra": "^11.1.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.1.0",
|
||||
"tsx": "^4.5.0",
|
||||
"typescript": "^5.3.2",
|
||||
"unplugin-vue": "^4.5.0",
|
||||
"vue": "^3.3.9",
|
||||
"vue-tsc": "^1.8.22",
|
||||
"@element-plus/icons-svg": "2.3.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run build:generate && run-p build:build build:types",
|
||||
"build:generate": "tsx build/generate.ts",
|
||||
"build:build": "NODE_ENV=production tsx build/build.ts",
|
||||
"build:types": "vue-tsc --declaration --emitDeclarationOnly"
|
||||
},
|
||||
"__npminstall_done": true,
|
||||
"_from": "@element-plus/icons-vue@2.3.1",
|
||||
"_resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz"
|
||||
}
|
||||
20
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/LICENSE
generated
vendored
Normal file
20
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Floating UI contributors
|
||||
|
||||
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.
|
||||
4
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/README.md
generated
vendored
Normal file
4
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/README.md
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# @floating-ui/dom
|
||||
|
||||
This is the library to use Floating UI on the web, wrapping `@floating-ui/core`
|
||||
with DOM interface logic.
|
||||
65
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/package.json
generated
vendored
Normal file
65
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "@floating-ui/dom",
|
||||
"version": "1.5.3",
|
||||
"description": "Floating UI for the web",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./dist/floating-ui.dom.umd.js",
|
||||
"module": "./dist/floating-ui.dom.esm.js",
|
||||
"unpkg": "./dist/floating-ui.dom.umd.min.js",
|
||||
"types": "./src/types.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./src/types.d.ts",
|
||||
"default": "./dist/floating-ui.dom.mjs"
|
||||
},
|
||||
"types": "./src/types.d.ts",
|
||||
"module": "./dist/floating-ui.dom.esm.js",
|
||||
"default": "./dist/floating-ui.dom.umd.js"
|
||||
}
|
||||
},
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist/",
|
||||
"**/*.d.ts",
|
||||
"**/*.d.mts"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "NODE_ENV=build rollup -c",
|
||||
"test": "vitest"
|
||||
},
|
||||
"author": "atomiks",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/floating-ui/floating-ui",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/floating-ui/floating-ui.git",
|
||||
"directory": "packages/dom"
|
||||
},
|
||||
"homepage": "https://floating-ui.com",
|
||||
"keywords": [
|
||||
"tooltip",
|
||||
"popover",
|
||||
"dropdown",
|
||||
"menu",
|
||||
"popup",
|
||||
"positioning"
|
||||
],
|
||||
"dependencies": {
|
||||
"@floating-ui/core": "^1.4.2",
|
||||
"@floating-ui/utils": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.14",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.14.0"
|
||||
},
|
||||
"__npminstall_done": true,
|
||||
"_from": "@floating-ui/dom@1.5.3",
|
||||
"_resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.5.3.tgz"
|
||||
}
|
||||
41
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/autoUpdate.d.ts
generated
vendored
Normal file
41
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/autoUpdate.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { FloatingElement, ReferenceElement } from './types';
|
||||
export type AutoUpdateOptions = Partial<{
|
||||
/**
|
||||
* Whether to update the position when an overflow ancestor is scrolled.
|
||||
* @default true
|
||||
*/
|
||||
ancestorScroll: boolean;
|
||||
/**
|
||||
* Whether to update the position when an overflow ancestor is resized. This
|
||||
* uses the native `resize` event.
|
||||
* @default true
|
||||
*/
|
||||
ancestorResize: boolean;
|
||||
/**
|
||||
* Whether to update the position when either the reference or floating
|
||||
* elements resized. This uses a `ResizeObserver`.
|
||||
* @default true
|
||||
*/
|
||||
elementResize: boolean;
|
||||
/**
|
||||
* Whether to update the position when the reference relocated on the screen
|
||||
* due to layout shift.
|
||||
* @default true
|
||||
*/
|
||||
layoutShift: boolean;
|
||||
/**
|
||||
* Whether to update on every animation frame if necessary. Only use if you
|
||||
* need to update the position in response to an animation using transforms.
|
||||
* @default false
|
||||
*/
|
||||
animationFrame: boolean;
|
||||
}>;
|
||||
/**
|
||||
* Automatically updates the position of the floating element when necessary.
|
||||
* Should only be called when the floating element is mounted on the DOM or
|
||||
* visible on the screen.
|
||||
* @returns cleanup function that should be invoked when the floating element is
|
||||
* removed from the DOM or hidden from the screen.
|
||||
* @see https://floating-ui.com/docs/autoUpdate
|
||||
*/
|
||||
export declare function autoUpdate(reference: ReferenceElement, floating: FloatingElement, update: () => void, options?: AutoUpdateOptions): () => void;
|
||||
11
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/index.d.ts
generated
vendored
Normal file
11
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { ComputePositionConfig, FloatingElement, ReferenceElement } from './types';
|
||||
/**
|
||||
* Computes the `x` and `y` coordinates that will place the floating element
|
||||
* next to a reference element when it is given a certain CSS positioning
|
||||
* strategy.
|
||||
*/
|
||||
export declare const computePosition: (reference: ReferenceElement, floating: FloatingElement, options?: Partial<ComputePositionConfig>) => Promise<import("@floating-ui/core").ComputePositionReturn>;
|
||||
export { autoUpdate } from './autoUpdate';
|
||||
export { platform } from './platform';
|
||||
export { arrow, autoPlacement, detectOverflow, flip, hide, inline, limitShift, offset, shift, size, } from '@floating-ui/core';
|
||||
export { getOverflowAncestors } from '@floating-ui/utils/dom';
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Platform } from './types';
|
||||
export declare const platform: Required<Platform>;
|
||||
@@ -0,0 +1,6 @@
|
||||
import type { Rect, Strategy } from '@floating-ui/core';
|
||||
export declare function convertOffsetParentRelativeRectToViewportRelativeRect({ rect, offsetParent, strategy, }: {
|
||||
rect: Rect;
|
||||
offsetParent: Element | Window;
|
||||
strategy: Strategy;
|
||||
}): Rect;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getClientRects.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getClientRects.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function getClientRects(element: Element): DOMRect[];
|
||||
12
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getClippingRect.d.ts
generated
vendored
Normal file
12
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getClippingRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { Boundary, Rect, RootBoundary, Strategy } from '@floating-ui/core';
|
||||
import { Platform, ReferenceElement } from '../types';
|
||||
type PlatformWithCache = Platform & {
|
||||
_c: Map<ReferenceElement, Element[]>;
|
||||
};
|
||||
export declare function getClippingRect(this: PlatformWithCache, { element, boundary, rootBoundary, strategy, }: {
|
||||
element: Element;
|
||||
boundary: Boundary;
|
||||
rootBoundary: RootBoundary;
|
||||
strategy: Strategy;
|
||||
}): Rect;
|
||||
export {};
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getDimensions.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getDimensions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Dimensions } from '@floating-ui/core';
|
||||
export declare function getDimensions(element: Element): Dimensions;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getDocumentElement.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getDocumentElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { getDocumentElement } from '@floating-ui/utils/dom';
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getElementRects.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getElementRects.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Platform } from '../types';
|
||||
export declare const getElementRects: Platform['getElementRects'];
|
||||
3
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getOffsetParent.d.ts
generated
vendored
Normal file
3
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getOffsetParent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
type Polyfill = (element: HTMLElement) => Element | null;
|
||||
export declare function getOffsetParent(element: Element, polyfill?: Polyfill): Element | Window;
|
||||
export {};
|
||||
3
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getScale.d.ts
generated
vendored
Normal file
3
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/getScale.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { Coords } from '@floating-ui/core';
|
||||
import type { VirtualElement } from '../types';
|
||||
export declare function getScale(element: Element | VirtualElement): Coords;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/isElement.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/isElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { isElement } from '@floating-ui/utils/dom';
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/isRTL.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/platform/isRTL.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isRTL(element: Element): boolean;
|
||||
166
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/types.d.ts
generated
vendored
Normal file
166
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
import type { ArrowOptions as CoreArrowOptions, AutoPlacementOptions as CoreAutoPlacementOptions, ClientRectObject, ComputePositionConfig as CoreComputePositionConfig, Coords, DetectOverflowOptions as CoreDetectOverflowOptions, Dimensions, ElementRects, FlipOptions as CoreFlipOptions, HideOptions as CoreHideOptions, InlineOptions, LimitShiftOptions, Middleware as CoreMiddleware, MiddlewareReturn, MiddlewareState as CoreMiddlewareState, Rect, RootBoundary, ShiftOptions as CoreShiftOptions, SideObject, SizeOptions as CoreSizeOptions, Strategy } from '@floating-ui/core';
|
||||
type Prettify<T> = {
|
||||
[K in keyof T]: T[K];
|
||||
} & {};
|
||||
type Promisable<T> = T | Promise<T>;
|
||||
export type Derivable<T> = (state: MiddlewareState) => T;
|
||||
export interface Platform {
|
||||
getElementRects: (args: {
|
||||
reference: ReferenceElement;
|
||||
floating: FloatingElement;
|
||||
strategy: Strategy;
|
||||
}) => Promisable<ElementRects>;
|
||||
getClippingRect: (args: {
|
||||
element: Element;
|
||||
boundary: Boundary;
|
||||
rootBoundary: RootBoundary;
|
||||
strategy: Strategy;
|
||||
}) => Promisable<Rect>;
|
||||
getDimensions: (element: Element) => Promisable<Dimensions>;
|
||||
convertOffsetParentRelativeRectToViewportRelativeRect?: (args: {
|
||||
rect: Rect;
|
||||
offsetParent: Element;
|
||||
strategy: Strategy;
|
||||
}) => Promisable<Rect>;
|
||||
getOffsetParent?: (element: Element, polyfill?: (element: HTMLElement) => Element | null) => Promisable<Element | Window>;
|
||||
isElement?: (value: unknown) => Promisable<boolean>;
|
||||
getDocumentElement?: (element: Element) => Promisable<HTMLElement>;
|
||||
getClientRects?: (element: Element) => Promisable<Array<ClientRectObject>>;
|
||||
isRTL?: (element: Element) => Promisable<boolean>;
|
||||
getScale?: (element: HTMLElement) => Promisable<{
|
||||
x: number;
|
||||
y: number;
|
||||
}>;
|
||||
}
|
||||
export interface NodeScroll {
|
||||
scrollLeft: number;
|
||||
scrollTop: number;
|
||||
}
|
||||
/**
|
||||
* The clipping boundary area of the floating element.
|
||||
*/
|
||||
export type Boundary = 'clippingAncestors' | Element | Array<Element> | Rect;
|
||||
export type DetectOverflowOptions = Prettify<Omit<CoreDetectOverflowOptions, 'boundary'> & {
|
||||
boundary?: Boundary;
|
||||
}>;
|
||||
export type ComputePositionConfig = Prettify<Omit<CoreComputePositionConfig, 'middleware' | 'platform'> & {
|
||||
/**
|
||||
* Array of middleware objects to modify the positioning or provide data for
|
||||
* rendering.
|
||||
*/
|
||||
middleware?: Array<Middleware | null | undefined | false>;
|
||||
/**
|
||||
* Custom or extended platform object.
|
||||
*/
|
||||
platform?: Platform;
|
||||
}>;
|
||||
/**
|
||||
* Custom positioning reference element.
|
||||
* @see https://floating-ui.com/docs/virtual-elements
|
||||
*/
|
||||
export interface VirtualElement {
|
||||
getBoundingClientRect(): ClientRectObject;
|
||||
contextElement?: Element;
|
||||
}
|
||||
export type ReferenceElement = Element | VirtualElement;
|
||||
export type FloatingElement = HTMLElement;
|
||||
export interface Elements {
|
||||
reference: ReferenceElement;
|
||||
floating: FloatingElement;
|
||||
}
|
||||
export type MiddlewareState = Prettify<Omit<CoreMiddlewareState, 'elements'> & {
|
||||
elements: Elements;
|
||||
}>;
|
||||
/**
|
||||
* @deprecated use `MiddlewareState` instead.
|
||||
*/
|
||||
export type MiddlewareArguments = MiddlewareState;
|
||||
export type Middleware = Prettify<Omit<CoreMiddleware, 'fn'> & {
|
||||
fn(state: MiddlewareState): Promisable<MiddlewareReturn>;
|
||||
}>;
|
||||
export type SizeOptions = Prettify<Omit<CoreSizeOptions, 'apply' | 'boundary'> & DetectOverflowOptions & {
|
||||
/**
|
||||
* Function that is called to perform style mutations to the floating element
|
||||
* to change its size.
|
||||
* @default undefined
|
||||
*/
|
||||
apply?(args: MiddlewareState & {
|
||||
availableWidth: number;
|
||||
availableHeight: number;
|
||||
}): Promisable<void>;
|
||||
}>;
|
||||
export type ArrowOptions = Prettify<Omit<CoreArrowOptions, 'element'> & {
|
||||
element: Element;
|
||||
}>;
|
||||
export type AutoPlacementOptions = Prettify<Omit<CoreAutoPlacementOptions, 'boundary'> & DetectOverflowOptions>;
|
||||
export type ShiftOptions = Prettify<Omit<CoreShiftOptions, 'boundary'> & DetectOverflowOptions>;
|
||||
export type FlipOptions = Prettify<Omit<CoreFlipOptions, 'boundary'> & DetectOverflowOptions>;
|
||||
export type HideOptions = Prettify<Omit<CoreHideOptions, 'boundary'> & DetectOverflowOptions>;
|
||||
/**
|
||||
* Optimizes the visibility of the floating element by choosing the placement
|
||||
* that has the most space available automatically, without needing to specify a
|
||||
* preferred placement. Alternative to `flip`.
|
||||
* @see https://floating-ui.com/docs/autoPlacement
|
||||
*/
|
||||
declare const autoPlacement: (options?: AutoPlacementOptions | Derivable<AutoPlacementOptions>) => Middleware;
|
||||
/**
|
||||
* Optimizes the visibility of the floating element by shifting it in order to
|
||||
* keep it in view when it will overflow the clipping boundary.
|
||||
* @see https://floating-ui.com/docs/shift
|
||||
*/
|
||||
declare const shift: (options?: ShiftOptions | Derivable<ShiftOptions>) => Middleware;
|
||||
/**
|
||||
* Optimizes the visibility of the floating element by flipping the `placement`
|
||||
* in order to keep it in view when the preferred placement(s) will overflow the
|
||||
* clipping boundary. Alternative to `autoPlacement`.
|
||||
* @see https://floating-ui.com/docs/flip
|
||||
*/
|
||||
declare const flip: (options?: FlipOptions | Derivable<FlipOptions>) => Middleware;
|
||||
/**
|
||||
* Provides data that allows you to change the size of the floating element —
|
||||
* for instance, prevent it from overflowing the clipping boundary or match the
|
||||
* width of the reference element.
|
||||
* @see https://floating-ui.com/docs/size
|
||||
*/
|
||||
declare const size: (options?: SizeOptions | Derivable<SizeOptions>) => Middleware;
|
||||
/**
|
||||
* Provides data to hide the floating element in applicable situations, such as
|
||||
* when it is not in the same clipping context as the reference element.
|
||||
* @see https://floating-ui.com/docs/hide
|
||||
*/
|
||||
declare const hide: (options?: HideOptions | Derivable<HideOptions>) => Middleware;
|
||||
/**
|
||||
* Provides data to position an inner element of the floating element so that it
|
||||
* appears centered to the reference element.
|
||||
* @see https://floating-ui.com/docs/arrow
|
||||
*/
|
||||
declare const arrow: (options: ArrowOptions | Derivable<ArrowOptions>) => Middleware;
|
||||
/**
|
||||
* Provides improved positioning for inline reference elements that can span
|
||||
* over multiple lines, such as hyperlinks or range selections.
|
||||
* @see https://floating-ui.com/docs/inline
|
||||
*/
|
||||
declare const inline: (options?: InlineOptions | Derivable<InlineOptions>) => Middleware;
|
||||
/**
|
||||
* Built-in `limiter` that will stop `shift()` at a certain point.
|
||||
*/
|
||||
declare const limitShift: (options?: LimitShiftOptions | Derivable<LimitShiftOptions>) => {
|
||||
options: any;
|
||||
fn: (state: MiddlewareState) => Coords;
|
||||
};
|
||||
/**
|
||||
* Resolves with an object of overflow side offsets that determine how much the
|
||||
* element is overflowing a given clipping boundary on each side.
|
||||
* - positive = overflowing the boundary by that number of pixels
|
||||
* - negative = how many pixels left before it will overflow
|
||||
* - 0 = lies flush with the boundary
|
||||
* @see https://floating-ui.com/docs/detectOverflow
|
||||
*/
|
||||
declare const detectOverflow: (state: MiddlewareState, options?: DetectOverflowOptions) => Promise<SideObject>;
|
||||
export { arrow, autoPlacement, detectOverflow, flip, hide, inline, limitShift, shift, size, };
|
||||
export { computePosition } from './';
|
||||
export { autoUpdate, AutoUpdateOptions } from './autoUpdate';
|
||||
export { platform } from './platform';
|
||||
export type { AlignedPlacement, Alignment, Axis, ClientRectObject, ComputePositionReturn, Coords, Dimensions, ElementContext, ElementRects, InlineOptions, Length, MiddlewareData, MiddlewareReturn, OffsetOptions, Padding, Placement, Rect, RootBoundary, Side, SideObject, Strategy, } from '@floating-ui/core';
|
||||
export { offset } from '@floating-ui/core';
|
||||
export { getOverflowAncestors } from '@floating-ui/utils/dom';
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { ClientRectObject, VirtualElement } from '@floating-ui/core';
|
||||
export declare function getBoundingClientRect(element: Element | VirtualElement, includeScale?: boolean, isFixedStrategy?: boolean, offsetParent?: Element | Window): ClientRectObject;
|
||||
4
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getCssDimensions.d.ts
generated
vendored
Normal file
4
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getCssDimensions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { Dimensions } from '@floating-ui/core';
|
||||
export declare function getCssDimensions(element: Element): Dimensions & {
|
||||
$: boolean;
|
||||
};
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getDocumentRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getDocumentRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Rect } from '@floating-ui/core';
|
||||
export declare function getDocumentRect(element: HTMLElement): Rect;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getRectRelativeToOffsetParent.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getRectRelativeToOffsetParent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Rect, Strategy, VirtualElement } from '@floating-ui/core';
|
||||
export declare function getRectRelativeToOffsetParent(element: Element | VirtualElement, offsetParent: Element | Window, strategy: Strategy): Rect;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Rect, Strategy } from '@floating-ui/core';
|
||||
export declare function getViewportRect(element: Element, strategy: Strategy): Rect;
|
||||
3
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getVisualOffsets.d.ts
generated
vendored
Normal file
3
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getVisualOffsets.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { Coords } from '@floating-ui/core';
|
||||
export declare function getVisualOffsets(element: Element | undefined): Coords;
|
||||
export declare function shouldAddVisualOffsets(element: Element | undefined, isFixed?: boolean, floatingOffsetParent?: Element | Window | undefined): boolean;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function getWindowScrollBarX(element: Element): number;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/unwrapElement.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@floating-ui/dom/src/utils/unwrapElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { VirtualElement } from '../types';
|
||||
export declare function unwrapElement(element: Element | VirtualElement): Element | undefined;
|
||||
20
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/LICENSE.md
generated
vendored
Normal file
20
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 Federico Zivolo
|
||||
|
||||
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.
|
||||
376
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/README.md
generated
vendored
Normal file
376
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/README.md
generated
vendored
Normal file
@@ -0,0 +1,376 @@
|
||||
<!-- <HEADER> // IGNORE IT -->
|
||||
<p align="center">
|
||||
<img src="https://rawcdn.githack.com/popperjs/popper-core/8805a5d7599e14619c9e7ac19a3713285d8e5d7f/docs/src/images/popper-logo-outlined.svg" alt="Popper" height="300px"/>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<h1>Tooltip & Popover Positioning Engine</h1>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/@popperjs/core">
|
||||
<img src="https://img.shields.io/npm/v/@popperjs/core?style=for-the-badge" alt="npm version" />
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/@popperjs/core">
|
||||
<img src="https://img.shields.io/endpoint?style=for-the-badge&url=https://runkit.io/fezvrasta/combined-npm-downloads/1.0.0?packages=popper.js,@popperjs/core" alt="npm downloads per month (popper.js + @popperjs/core)" />
|
||||
</a>
|
||||
<a href="https://rollingversions.com/popperjs/popper-core">
|
||||
<img src="https://img.shields.io/badge/Rolling%20Versions-Enabled-brightgreen?style=for-the-badge" alt="Rolling Versions" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
<!-- </HEADER> // NOW BEGINS THE README -->
|
||||
|
||||
**Positioning tooltips and popovers is difficult. Popper is here to help!**
|
||||
|
||||
Given an element, such as a button, and a tooltip element describing it, Popper
|
||||
will automatically put the tooltip in the right place near the button.
|
||||
|
||||
It will position _any_ UI element that "pops out" from the flow of your document
|
||||
and floats near a target element. The most common example is a tooltip, but it
|
||||
also includes popovers, drop-downs, and more. All of these can be generically
|
||||
described as a "popper" element.
|
||||
|
||||
## Demo
|
||||
|
||||
[](https://popper.js.org)
|
||||
|
||||
## Docs
|
||||
|
||||
- [v2.x (latest)](https://popper.js.org/docs/v2/)
|
||||
- [v1.x](https://popper.js.org/docs/v1/)
|
||||
|
||||
We've created a
|
||||
[Migration Guide](https://popper.js.org/docs/v2/migration-guide/) to help you
|
||||
migrate from Popper 1 to Popper 2.
|
||||
|
||||
To contribute to the Popper website and documentation, please visit the
|
||||
[dedicated repository](https://github.com/popperjs/website).
|
||||
|
||||
## Why not use pure CSS?
|
||||
|
||||
- **Clipping and overflow issues**: Pure CSS poppers will not be prevented from
|
||||
overflowing clipping boundaries, such as the viewport. It will get partially
|
||||
cut off or overflows if it's near the edge since there is no dynamic
|
||||
positioning logic. When using Popper, your popper will always be positioned in
|
||||
the right place without needing manual adjustments.
|
||||
- **No flipping**: CSS poppers will not flip to a different placement to fit
|
||||
better in view if necessary. While you can manually adjust for the main axis
|
||||
overflow, this feature cannot be achieved via CSS alone. Popper automatically
|
||||
flips the tooltip to make it fit in view as best as possible for the user.
|
||||
- **No virtual positioning**: CSS poppers cannot follow the mouse cursor or be
|
||||
used as a context menu. Popper allows you to position your tooltip relative to
|
||||
any coordinates you desire.
|
||||
- **Slower development cycle**: When pure CSS is used to position popper
|
||||
elements, the lack of dynamic positioning means they must be carefully placed
|
||||
to consider overflow on all screen sizes. In reusable component libraries,
|
||||
this means a developer can't just add the component anywhere on the page,
|
||||
because these issues need to be considered and adjusted for every time. With
|
||||
Popper, you can place your elements anywhere and they will be positioned
|
||||
correctly, without needing to consider different screen sizes, layouts, etc.
|
||||
This massively speeds up development time because this work is automatically
|
||||
offloaded to Popper.
|
||||
- **Lack of extensibility**: CSS poppers cannot be easily extended to fit any
|
||||
arbitrary use case you may need to adjust for. Popper is built with
|
||||
extensibility in mind.
|
||||
|
||||
## Why Popper?
|
||||
|
||||
With the CSS drawbacks out of the way, we now move on to Popper in the
|
||||
JavaScript space itself.
|
||||
|
||||
Naive JavaScript tooltip implementations usually have the following problems:
|
||||
|
||||
- **Scrolling containers**: They don't ensure the tooltip stays with the
|
||||
reference element while scrolling when inside any number of scrolling
|
||||
containers.
|
||||
- **DOM context**: They often require the tooltip move outside of its original
|
||||
DOM context because they don't handle `offsetParent` contexts.
|
||||
- **Compatibility**: Popper handles an incredible number of edge cases regarding
|
||||
different browsers and environments (mobile viewports, RTL, scrollbars enabled
|
||||
or disabled, etc.). Popper is a popular and well-maintained library, so you
|
||||
can be confident positioning will work for your users on any device.
|
||||
- **Configurability**: They often lack advanced configurability to suit any
|
||||
possible use case.
|
||||
- **Size**: They are usually relatively large in size, or require an ancient
|
||||
jQuery dependency.
|
||||
- **Performance**: They often have runtime performance issues and update the
|
||||
tooltip position too slowly.
|
||||
|
||||
**Popper solves all of these key problems in an elegant, performant manner.** It
|
||||
is a lightweight ~3 kB library that aims to provide a reliable and extensible
|
||||
positioning engine you can use to ensure all your popper elements are positioned
|
||||
in the right place.
|
||||
|
||||
When you start writing your own popper implementation, you'll quickly run into
|
||||
all of the problems mentioned above. These widgets are incredibly common in our
|
||||
UIs; we've done the hard work figuring this out so you don't need to spend hours
|
||||
fixing and handling numerous edge cases that we already ran into while building
|
||||
the library!
|
||||
|
||||
Popper is used in popular libraries like Bootstrap, Foundation, Material UI, and
|
||||
more. It's likely you've already used popper elements on the web positioned by
|
||||
Popper at some point in the past few years.
|
||||
|
||||
Since we write UIs using powerful abstraction libraries such as React or Angular
|
||||
nowadays, you'll also be glad to know Popper can fully integrate with them and
|
||||
be a good citizen together with your other components. Check out `react-popper`
|
||||
for the official Popper wrapper for React.
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Package Manager
|
||||
|
||||
```bash
|
||||
# With npm
|
||||
npm i @popperjs/core
|
||||
|
||||
# With Yarn
|
||||
yarn add @popperjs/core
|
||||
```
|
||||
|
||||
### 2. CDN
|
||||
|
||||
```html
|
||||
<!-- Development version -->
|
||||
<script src="https://unpkg.com/@popperjs/core@2/dist/umd/popper.js"></script>
|
||||
|
||||
<!-- Production version -->
|
||||
<script src="https://unpkg.com/@popperjs/core@2"></script>
|
||||
```
|
||||
|
||||
### 3. Direct Download?
|
||||
|
||||
Managing dependencies by "directly downloading" them and placing them into your
|
||||
source code is not recommended for a variety of reasons, including missing out
|
||||
on feat/fix updates easily. Please use a versioning management system like a CDN
|
||||
or npm/Yarn.
|
||||
|
||||
## Usage
|
||||
|
||||
The most straightforward way to get started is to import Popper from the `unpkg`
|
||||
CDN, which includes all of its features. You can call the `Popper.createPopper`
|
||||
constructor to create new popper instances.
|
||||
|
||||
Here is a complete example:
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<title>Popper example</title>
|
||||
|
||||
<style>
|
||||
#tooltip {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
padding: 5px 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<button id="button" aria-describedby="tooltip">I'm a button</button>
|
||||
<div id="tooltip" role="tooltip">I'm a tooltip</div>
|
||||
|
||||
<script src="https://unpkg.com/@popperjs/core@^2.0.0"></script>
|
||||
<script>
|
||||
const button = document.querySelector('#button');
|
||||
const tooltip = document.querySelector('#tooltip');
|
||||
|
||||
// Pass the button, the tooltip, and some options, and Popper will do the
|
||||
// magic positioning for you:
|
||||
Popper.createPopper(button, tooltip, {
|
||||
placement: 'right',
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
Visit the [tutorial](https://popper.js.org/docs/v2/tutorial/) for an example of
|
||||
how to build your own tooltip from scratch using Popper.
|
||||
|
||||
### Module bundlers
|
||||
|
||||
You can import the `createPopper` constructor from the fully-featured file:
|
||||
|
||||
```js
|
||||
import { createPopper } from '@popperjs/core';
|
||||
|
||||
const button = document.querySelector('#button');
|
||||
const tooltip = document.querySelector('#tooltip');
|
||||
|
||||
// Pass the button, the tooltip, and some options, and Popper will do the
|
||||
// magic positioning for you:
|
||||
createPopper(button, tooltip, {
|
||||
placement: 'right',
|
||||
});
|
||||
```
|
||||
|
||||
All the modifiers listed in the docs menu will be enabled and "just work", so
|
||||
you don't need to think about setting Popper up. The size of Popper including
|
||||
all of its features is about 5 kB minzipped, but it may grow a bit in the
|
||||
future.
|
||||
|
||||
#### Popper Lite (tree-shaking)
|
||||
|
||||
If bundle size is important, you'll want to take advantage of tree-shaking. The
|
||||
library is built in a modular way to allow to import only the parts you really
|
||||
need.
|
||||
|
||||
```js
|
||||
import { createPopperLite as createPopper } from '@popperjs/core';
|
||||
```
|
||||
|
||||
The Lite version includes the most necessary modifiers that will compute the
|
||||
offsets of the popper, compute and add the positioning styles, and add event
|
||||
listeners. This is close in bundle size to pure CSS tooltip libraries, and
|
||||
behaves somewhat similarly.
|
||||
|
||||
However, this does not include the features that makes Popper truly useful.
|
||||
|
||||
The two most useful modifiers not included in Lite are `preventOverflow` and
|
||||
`flip`:
|
||||
|
||||
```js
|
||||
import {
|
||||
createPopperLite as createPopper,
|
||||
preventOverflow,
|
||||
flip,
|
||||
} from '@popperjs/core';
|
||||
|
||||
const button = document.querySelector('#button');
|
||||
const tooltip = document.querySelector('#tooltip');
|
||||
|
||||
createPopper(button, tooltip, {
|
||||
modifiers: [preventOverflow, flip],
|
||||
});
|
||||
```
|
||||
|
||||
As you make more poppers, you may be finding yourself needing other modifiers
|
||||
provided by the library.
|
||||
|
||||
See [tree-shaking](https://popper.js.org/docs/v2/performance/#tree-shaking) for more
|
||||
information.
|
||||
|
||||
## Distribution targets
|
||||
|
||||
Popper is distributed in 3 different versions, in 3 different file formats.
|
||||
|
||||
The 3 file formats are:
|
||||
|
||||
- `esm` (works with `import` syntax — **recommended**)
|
||||
- `umd` (works with `<script>` tags or RequireJS)
|
||||
- `cjs` (works with `require()` syntax)
|
||||
|
||||
There are two different `esm` builds, one for bundler consumers (e.g. webpack,
|
||||
Rollup, etc..), which is located under `/lib`, and one for browsers with native
|
||||
support for ES Modules, under `/dist/esm`. The only difference within the two,
|
||||
is that the browser-compatible version doesn't make use of
|
||||
`process.env.NODE_ENV` to run development checks.
|
||||
|
||||
The 3 versions are:
|
||||
|
||||
- `popper`: includes all the modifiers (features) in one file (**default**);
|
||||
- `popper-lite`: includes only the minimum amount of modifiers to provide the
|
||||
basic functionality;
|
||||
- `popper-base`: doesn't include any modifier, you must import them separately;
|
||||
|
||||
Below you can find the size of each version, minified and compressed with the
|
||||
[Brotli compression algorithm](https://medium.com/groww-engineering/enable-brotli-compression-in-webpack-with-fallback-to-gzip-397a57cf9fc6):
|
||||
|
||||
<!-- Don't change the labels to use hyphens, it breaks, even when encoded -->
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Hacking the library
|
||||
|
||||
If you want to play with the library, implement new features, fix a bug you
|
||||
found, or simply experiment with it, this section is for you!
|
||||
|
||||
First of all, make sure to have
|
||||
[Yarn installed](https://yarnpkg.com/lang/en/docs/install).
|
||||
|
||||
Install the development dependencies:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
```
|
||||
|
||||
And run the development environment:
|
||||
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
|
||||
Then, simply open one the development server web page:
|
||||
|
||||
```bash
|
||||
# macOS and Linux
|
||||
open localhost:5000
|
||||
|
||||
# Windows
|
||||
start localhost:5000
|
||||
```
|
||||
|
||||
From there, you can open any of the examples (`.html` files) to fiddle with
|
||||
them.
|
||||
|
||||
Now any change you will made to the source code, will be automatically compiled,
|
||||
you just need to refresh the page.
|
||||
|
||||
If the page is not working properly, try to go in _"Developer Tools >
|
||||
Application > Clear storage"_ and click on "_Clear site data_".
|
||||
To run the examples you need a browser with
|
||||
[JavaScript modules via script tag support](https://caniuse.com/#feat=es6-module).
|
||||
|
||||
## Test Suite
|
||||
|
||||
Popper is currently tested with unit tests, and functional tests. Both of them
|
||||
are run by Jest.
|
||||
|
||||
### Unit Tests
|
||||
|
||||
The unit tests use JSDOM to provide a primitive document object API, they are
|
||||
used to ensure the utility functions behave as expected in isolation.
|
||||
|
||||
### Functional Tests
|
||||
|
||||
The functional tests run with Puppeteer, to take advantage of a complete browser
|
||||
environment. They are currently running on Chromium, and Firefox.
|
||||
|
||||
You can run them with `yarn test:functional`. Set the `PUPPETEER_BROWSER`
|
||||
environment variable to `firefox` to run them on the Mozilla browser.
|
||||
|
||||
The assertions are written in form of image snapshots, so that it's easy to
|
||||
assert for the correct Popper behavior without having to write a lot of offsets
|
||||
comparisons manually.
|
||||
|
||||
You can mark a `*.test.js` file to run in the Puppeteer environment by
|
||||
prepending a `@jest-environment puppeteer` JSDoc comment to the interested file.
|
||||
|
||||
Here's an example of a basic functional test:
|
||||
|
||||
```js
|
||||
/**
|
||||
* @jest-environment puppeteer
|
||||
* @flow
|
||||
*/
|
||||
import { screenshot } from '../utils/puppeteer.js';
|
||||
|
||||
it('should position the popper on the right', async () => {
|
||||
const page = await browser.newPage();
|
||||
await page.goto(`${TEST_URL}/basic.html`);
|
||||
|
||||
expect(await screenshot(page)).toMatchImageSnapshot();
|
||||
});
|
||||
```
|
||||
|
||||
You can find the complete
|
||||
[`jest-puppeteer` documentation here](https://github.com/smooth-code/jest-puppeteer#api),
|
||||
and the
|
||||
[`jest-image-snapshot` documentation here](https://github.com/americanexpress/jest-image-snapshot#%EF%B8%8F-api).
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/index.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib';
|
||||
9
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/createPopper.d.ts
generated
vendored
Normal file
9
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/createPopper.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { OptionsGeneric, Modifier, Instance, VirtualElement } from "./types";
|
||||
import detectOverflow from "./utils/detectOverflow";
|
||||
declare type PopperGeneratorArgs = {
|
||||
defaultModifiers?: Array<Modifier<any, any>>;
|
||||
defaultOptions?: Partial<OptionsGeneric<any>>;
|
||||
};
|
||||
export declare function popperGenerator(generatorOptions?: PopperGeneratorArgs): <TModifier extends Partial<Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<OptionsGeneric<TModifier>>) => Instance;
|
||||
export declare const createPopper: <TModifier extends Partial<Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<OptionsGeneric<TModifier>>) => Instance;
|
||||
export { detectOverflow };
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/contains.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/contains.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function contains(parent: Element, child: Element): boolean;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { ClientRectObject, VirtualElement } from "../types";
|
||||
export default function getBoundingClientRect(element: Element | VirtualElement, includeScale?: boolean): ClientRectObject;
|
||||
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.d.ts
generated
vendored
Normal file
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { ClientRectObject } from "../types";
|
||||
import type { Boundary, RootBoundary } from "../enums";
|
||||
export default function getClippingRect(element: Element, boundary: Boundary, rootBoundary: RootBoundary): ClientRectObject;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Rect, VirtualElement, Window } from "../types";
|
||||
export default function getCompositeRect(elementOrVirtualElement: Element | VirtualElement, offsetParent: Element | Window, isFixed?: boolean): Rect;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getComputedStyle(element: Element): CSSStyleDeclaration;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Window } from "../types";
|
||||
export default function getDocumentElement(element: Element | Window): HTMLElement;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Rect } from "../types";
|
||||
export default function getDocumentRect(element: HTMLElement): Rect;
|
||||
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.d.ts
generated
vendored
Normal file
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export default function getHTMLElementScroll(element: HTMLElement): {
|
||||
scrollLeft: number;
|
||||
scrollTop: number;
|
||||
};
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Rect } from "../types";
|
||||
export default function getLayoutRect(element: HTMLElement): Rect;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getNodeName.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getNodeName.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Window } from "../types";
|
||||
export default function getNodeName(element: (Node | null | undefined) | Window): string | null | undefined;
|
||||
5
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.d.ts
generated
vendored
Normal file
5
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { Window } from "../types";
|
||||
export default function getNodeScroll(node: Node | Window): {
|
||||
scrollLeft: any;
|
||||
scrollTop: any;
|
||||
};
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getOffsetParent(element: Element): any;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getParentNode.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getParentNode.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getParentNode(element: Node | ShadowRoot): Node;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getScrollParent(node: Node): HTMLElement;
|
||||
6
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.d.ts
generated
vendored
Normal file
6
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default function getViewportRect(element: Element): {
|
||||
width: number;
|
||||
height: number;
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getWindow.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getWindow.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getWindow(node: any): any;
|
||||
5
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.d.ts
generated
vendored
Normal file
5
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { Window } from "../types";
|
||||
export default function getWindowScroll(node: Node | Window): {
|
||||
scrollLeft: any;
|
||||
scrollTop: any;
|
||||
};
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getWindowScrollBarX(element: Element): number;
|
||||
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/instanceOf.d.ts
generated
vendored
Normal file
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/instanceOf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare function isElement(node: unknown): boolean;
|
||||
declare function isHTMLElement(node: unknown): boolean;
|
||||
declare function isShadowRoot(node: unknown): boolean;
|
||||
export { isElement, isHTMLElement, isShadowRoot };
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function isScrollParent(element: HTMLElement): boolean;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/isTableElement.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/isTableElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function isTableElement(element: Element): boolean;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Window, VisualViewport } from "../types";
|
||||
export default function listScrollParents(element: Node, list?: Array<Element | Window>): Array<Element | Window | VisualViewport>;
|
||||
34
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/enums.d.ts
generated
vendored
Normal file
34
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/enums.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
export declare const top: "top";
|
||||
export declare const bottom: "bottom";
|
||||
export declare const right: "right";
|
||||
export declare const left: "left";
|
||||
export declare const auto: "auto";
|
||||
export declare type BasePlacement = typeof top | typeof bottom | typeof right | typeof left;
|
||||
export declare const basePlacements: Array<BasePlacement>;
|
||||
export declare const start: "start";
|
||||
export declare const end: "end";
|
||||
export declare type Variation = typeof start | typeof end;
|
||||
export declare const clippingParents: "clippingParents";
|
||||
export declare const viewport: "viewport";
|
||||
export declare type Boundary = Element | Array<Element> | typeof clippingParents;
|
||||
export declare type RootBoundary = typeof viewport | "document";
|
||||
export declare const popper: "popper";
|
||||
export declare const reference: "reference";
|
||||
export declare type Context = typeof popper | typeof reference;
|
||||
export declare type VariationPlacement = "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end";
|
||||
export declare type AutoPlacement = "auto" | "auto-start" | "auto-end";
|
||||
export declare type ComputedPlacement = VariationPlacement | BasePlacement;
|
||||
export declare type Placement = AutoPlacement | BasePlacement | VariationPlacement;
|
||||
export declare const variationPlacements: Array<VariationPlacement>;
|
||||
export declare const placements: Array<Placement>;
|
||||
export declare const beforeRead: "beforeRead";
|
||||
export declare const read: "read";
|
||||
export declare const afterRead: "afterRead";
|
||||
export declare const beforeMain: "beforeMain";
|
||||
export declare const main: "main";
|
||||
export declare const afterMain: "afterMain";
|
||||
export declare const beforeWrite: "beforeWrite";
|
||||
export declare const write: "write";
|
||||
export declare const afterWrite: "afterWrite";
|
||||
export declare const modifierPhases: Array<ModifierPhases>;
|
||||
export declare type ModifierPhases = typeof beforeRead | typeof read | typeof afterRead | typeof beforeMain | typeof main | typeof afterMain | typeof beforeWrite | typeof write | typeof afterWrite;
|
||||
6
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/index.d.ts
generated
vendored
Normal file
6
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export * from "./types";
|
||||
export * from "./enums";
|
||||
export * from "./modifiers";
|
||||
export { popperGenerator, detectOverflow, createPopper as createPopperBase } from "./createPopper";
|
||||
export { createPopper } from "./popper";
|
||||
export { createPopper as createPopperLite } from "./popper-lite";
|
||||
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/applyStyles.d.ts
generated
vendored
Normal file
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/applyStyles.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { Modifier } from "../types";
|
||||
export declare type ApplyStylesModifier = Modifier<"applyStyles", {}>;
|
||||
declare const _default: ApplyStylesModifier;
|
||||
export default _default;
|
||||
13
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/arrow.d.ts
generated
vendored
Normal file
13
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/arrow.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { Modifier, Padding, Rect } from "../types";
|
||||
import type { Placement } from "../enums";
|
||||
export declare type Options = {
|
||||
element: HTMLElement | string | null;
|
||||
padding: Padding | ((arg0: {
|
||||
popper: Rect;
|
||||
reference: Rect;
|
||||
placement: Placement;
|
||||
}) => Padding);
|
||||
};
|
||||
export declare type ArrowModifier = Modifier<"arrow", Options>;
|
||||
declare const _default: ArrowModifier;
|
||||
export default _default;
|
||||
38
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/computeStyles.d.ts
generated
vendored
Normal file
38
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/computeStyles.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { PositioningStrategy, Offsets, Modifier, Rect } from "../types";
|
||||
import { BasePlacement, Variation } from "../enums";
|
||||
export declare type RoundOffsets = (offsets: Partial<{
|
||||
x: number;
|
||||
y: number;
|
||||
centerOffset: number;
|
||||
}>) => Offsets;
|
||||
export declare type Options = {
|
||||
gpuAcceleration: boolean;
|
||||
adaptive: boolean;
|
||||
roundOffsets?: boolean | RoundOffsets;
|
||||
};
|
||||
export declare function mapToStyles({ popper, popperRect, placement, variation, offsets, position, gpuAcceleration, adaptive, roundOffsets, isFixed }: {
|
||||
popper: HTMLElement;
|
||||
popperRect: Rect;
|
||||
placement: BasePlacement;
|
||||
variation: Variation | null | undefined;
|
||||
offsets: Partial<{
|
||||
x: number;
|
||||
y: number;
|
||||
centerOffset: number;
|
||||
}>;
|
||||
position: PositioningStrategy;
|
||||
gpuAcceleration: boolean;
|
||||
adaptive: boolean;
|
||||
roundOffsets: boolean | RoundOffsets;
|
||||
isFixed: boolean;
|
||||
}): {
|
||||
transform: string;
|
||||
top: string;
|
||||
right: string;
|
||||
bottom: string;
|
||||
left: string;
|
||||
position: PositioningStrategy;
|
||||
};
|
||||
export declare type ComputeStylesModifier = Modifier<"computeStyles", Options>;
|
||||
declare const _default: ComputeStylesModifier;
|
||||
export default _default;
|
||||
8
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/eventListeners.d.ts
generated
vendored
Normal file
8
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/eventListeners.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { Modifier } from "../types";
|
||||
export declare type Options = {
|
||||
scroll: boolean;
|
||||
resize: boolean;
|
||||
};
|
||||
export declare type EventListenersModifier = Modifier<"eventListeners", Options>;
|
||||
declare const _default: EventListenersModifier;
|
||||
export default _default;
|
||||
16
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/flip.d.ts
generated
vendored
Normal file
16
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/flip.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { Placement, Boundary, RootBoundary } from "../enums";
|
||||
import type { Modifier, Padding } from "../types";
|
||||
export declare type Options = {
|
||||
mainAxis: boolean;
|
||||
altAxis: boolean;
|
||||
fallbackPlacements: Array<Placement>;
|
||||
padding: Padding;
|
||||
boundary: Boundary;
|
||||
rootBoundary: RootBoundary;
|
||||
altBoundary: boolean;
|
||||
flipVariations: boolean;
|
||||
allowedAutoPlacements: Array<Placement>;
|
||||
};
|
||||
export declare type FlipModifier = Modifier<"flip", Options>;
|
||||
declare const _default: FlipModifier;
|
||||
export default _default;
|
||||
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/hide.d.ts
generated
vendored
Normal file
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/hide.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { Modifier } from "../types";
|
||||
export declare type HideModifier = Modifier<"hide", {}>;
|
||||
declare const _default: HideModifier;
|
||||
export default _default;
|
||||
9
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/index.d.ts
generated
vendored
Normal file
9
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export { default as applyStyles } from "./applyStyles";
|
||||
export { default as arrow } from "./arrow";
|
||||
export { default as computeStyles } from "./computeStyles";
|
||||
export { default as eventListeners } from "./eventListeners";
|
||||
export { default as flip } from "./flip";
|
||||
export { default as hide } from "./hide";
|
||||
export { default as offset } from "./offset";
|
||||
export { default as popperOffsets } from "./popperOffsets";
|
||||
export { default as preventOverflow } from "./preventOverflow";
|
||||
18
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/offset.d.ts
generated
vendored
Normal file
18
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/offset.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { Placement } from "../enums";
|
||||
import type { Modifier, Rect, Offsets } from "../types";
|
||||
export declare type OffsetsFunction = (arg0: {
|
||||
popper: Rect;
|
||||
reference: Rect;
|
||||
placement: Placement;
|
||||
}) => [number | null | undefined, number | null | undefined];
|
||||
declare type Offset = OffsetsFunction | [number | null | undefined, number | null | undefined];
|
||||
export declare type Options = {
|
||||
offset: Offset;
|
||||
};
|
||||
export declare function distanceAndSkiddingToXY(placement: Placement, rects: {
|
||||
popper: Rect;
|
||||
reference: Rect;
|
||||
}, offset: Offset): Offsets;
|
||||
export declare type OffsetModifier = Modifier<"offset", Options>;
|
||||
declare const _default: OffsetModifier;
|
||||
export default _default;
|
||||
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/popperOffsets.d.ts
generated
vendored
Normal file
4
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/popperOffsets.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { Modifier } from "../types";
|
||||
export declare type PopperOffsetsModifier = Modifier<"popperOffsets", {}>;
|
||||
declare const _default: PopperOffsetsModifier;
|
||||
export default _default;
|
||||
30
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/preventOverflow.d.ts
generated
vendored
Normal file
30
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/modifiers/preventOverflow.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { Placement, Boundary, RootBoundary } from "../enums";
|
||||
import type { Rect, Modifier, Padding } from "../types";
|
||||
declare type TetherOffset = ((arg0: {
|
||||
popper: Rect;
|
||||
reference: Rect;
|
||||
placement: Placement;
|
||||
}) => number | {
|
||||
mainAxis: number;
|
||||
altAxis: number;
|
||||
}) | number | {
|
||||
mainAxis: number;
|
||||
altAxis: number;
|
||||
};
|
||||
export declare type Options = {
|
||||
mainAxis: boolean;
|
||||
altAxis: boolean;
|
||||
boundary: Boundary;
|
||||
rootBoundary: RootBoundary;
|
||||
altBoundary: boolean;
|
||||
/**
|
||||
* Allows the popper to overflow from its boundaries to keep it near its
|
||||
* reference element
|
||||
*/
|
||||
tether: boolean;
|
||||
tetherOffset: TetherOffset;
|
||||
padding: Padding;
|
||||
};
|
||||
export declare type PreventOverflowModifier = Modifier<"preventOverflow", Options>;
|
||||
declare const _default: PreventOverflowModifier;
|
||||
export default _default;
|
||||
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/popper-base.d.ts
generated
vendored
Normal file
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/popper-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { createPopper, popperGenerator, detectOverflow } from "./createPopper";
|
||||
export * from "./types";
|
||||
export { createPopper, popperGenerator, detectOverflow };
|
||||
5
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/popper-lite.d.ts
generated
vendored
Normal file
5
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/popper-lite.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { popperGenerator, detectOverflow } from "./createPopper";
|
||||
export * from "./types";
|
||||
declare const defaultModifiers: (import("./modifiers/popperOffsets").PopperOffsetsModifier | import("./modifiers/eventListeners").EventListenersModifier | import("./modifiers/computeStyles").ComputeStylesModifier | import("./modifiers/applyStyles").ApplyStylesModifier)[];
|
||||
declare const createPopper: <TModifier extends Partial<import("./types").Modifier<any, any>>>(reference: Element | import("./types").VirtualElement, popper: HTMLElement, options?: Partial<import("./types").OptionsGeneric<TModifier>>) => import("./types").Instance;
|
||||
export { createPopper, popperGenerator, defaultModifiers, detectOverflow };
|
||||
7
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/popper.d.ts
generated
vendored
Normal file
7
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/popper.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { popperGenerator, detectOverflow } from "./createPopper";
|
||||
export * from "./types";
|
||||
declare const defaultModifiers: (import("./modifiers/popperOffsets").PopperOffsetsModifier | import("./modifiers/flip").FlipModifier | import("./modifiers/hide").HideModifier | import("./modifiers/offset").OffsetModifier | import("./modifiers/eventListeners").EventListenersModifier | import("./modifiers/computeStyles").ComputeStylesModifier | import("./modifiers/arrow").ArrowModifier | import("./modifiers/preventOverflow").PreventOverflowModifier | import("./modifiers/applyStyles").ApplyStylesModifier)[];
|
||||
declare const createPopper: <TModifier extends Partial<import("./types").Modifier<any, any>>>(reference: Element | import("./types").VirtualElement, popper: HTMLElement, options?: Partial<import("./types").OptionsGeneric<TModifier>>) => import("./types").Instance;
|
||||
export { createPopper, popperGenerator, defaultModifiers, detectOverflow };
|
||||
export { createPopper as createPopperLite } from "./popper-lite";
|
||||
export * from "./modifiers";
|
||||
167
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/types.d.ts
generated
vendored
Normal file
167
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
import type { Placement, ModifierPhases } from "./enums";
|
||||
import type { PopperOffsetsModifier } from "./modifiers/popperOffsets";
|
||||
import type { FlipModifier } from "./modifiers/flip";
|
||||
import type { HideModifier } from "./modifiers/hide";
|
||||
import type { OffsetModifier } from "./modifiers/offset";
|
||||
import type { EventListenersModifier } from "./modifiers/eventListeners";
|
||||
import type { ComputeStylesModifier } from "./modifiers/computeStyles";
|
||||
import type { ArrowModifier } from "./modifiers/arrow";
|
||||
import type { PreventOverflowModifier } from "./modifiers/preventOverflow";
|
||||
import type { ApplyStylesModifier } from "./modifiers/applyStyles";
|
||||
export declare type Obj = {
|
||||
[key: string]: any;
|
||||
};
|
||||
export declare type VisualViewport = EventTarget & {
|
||||
width: number;
|
||||
height: number;
|
||||
offsetLeft: number;
|
||||
offsetTop: number;
|
||||
scale: number;
|
||||
};
|
||||
export declare type Window = {
|
||||
innerHeight: number;
|
||||
offsetHeight: number;
|
||||
innerWidth: number;
|
||||
offsetWidth: number;
|
||||
pageXOffset: number;
|
||||
pageYOffset: number;
|
||||
getComputedStyle: typeof getComputedStyle;
|
||||
addEventListener(type: any, listener: any, optionsOrUseCapture?: any): void;
|
||||
removeEventListener(type: any, listener: any, optionsOrUseCapture?: any): void;
|
||||
Element: Element;
|
||||
HTMLElement: HTMLElement;
|
||||
Node: Node;
|
||||
toString(): "[object Window]";
|
||||
devicePixelRatio: number;
|
||||
visualViewport?: VisualViewport;
|
||||
ShadowRoot: ShadowRoot;
|
||||
};
|
||||
export declare type Rect = {
|
||||
width: number;
|
||||
height: number;
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
export declare type Offsets = {
|
||||
y: number;
|
||||
x: number;
|
||||
};
|
||||
export declare type PositioningStrategy = "absolute" | "fixed";
|
||||
export declare type StateRects = {
|
||||
reference: Rect;
|
||||
popper: Rect;
|
||||
};
|
||||
export declare type StateOffsets = {
|
||||
popper: Offsets;
|
||||
arrow?: Offsets;
|
||||
};
|
||||
declare type OffsetData = {
|
||||
[key in Placement]?: Offsets;
|
||||
};
|
||||
export declare type State = {
|
||||
elements: {
|
||||
reference: Element | VirtualElement;
|
||||
popper: HTMLElement;
|
||||
arrow?: HTMLElement;
|
||||
};
|
||||
options: OptionsGeneric<any>;
|
||||
placement: Placement;
|
||||
strategy: PositioningStrategy;
|
||||
orderedModifiers: Array<Modifier<any, any>>;
|
||||
rects: StateRects;
|
||||
scrollParents: {
|
||||
reference: Array<Element | Window | VisualViewport>;
|
||||
popper: Array<Element | Window | VisualViewport>;
|
||||
};
|
||||
styles: {
|
||||
[key: string]: Partial<CSSStyleDeclaration>;
|
||||
};
|
||||
attributes: {
|
||||
[key: string]: {
|
||||
[key: string]: string | boolean;
|
||||
};
|
||||
};
|
||||
modifiersData: {
|
||||
arrow?: {
|
||||
x?: number;
|
||||
y?: number;
|
||||
centerOffset: number;
|
||||
};
|
||||
hide?: {
|
||||
isReferenceHidden: boolean;
|
||||
hasPopperEscaped: boolean;
|
||||
referenceClippingOffsets: SideObject;
|
||||
popperEscapeOffsets: SideObject;
|
||||
};
|
||||
offset?: OffsetData;
|
||||
preventOverflow?: Offsets;
|
||||
popperOffsets?: Offsets;
|
||||
[key: string]: any;
|
||||
};
|
||||
reset: boolean;
|
||||
};
|
||||
declare type SetAction<S> = S | ((prev: S) => S);
|
||||
export declare type Instance = {
|
||||
state: State;
|
||||
destroy: () => void;
|
||||
forceUpdate: () => void;
|
||||
update: () => Promise<Partial<State>>;
|
||||
setOptions: (setOptionsAction: SetAction<Partial<OptionsGeneric<any>>>) => Promise<Partial<State>>;
|
||||
};
|
||||
export declare type ModifierArguments<Options extends Obj> = {
|
||||
state: State;
|
||||
instance: Instance;
|
||||
options: Partial<Options>;
|
||||
name: string;
|
||||
};
|
||||
export declare type Modifier<Name, Options extends Obj> = {
|
||||
name: Name;
|
||||
enabled: boolean;
|
||||
phase: ModifierPhases;
|
||||
requires?: Array<string>;
|
||||
requiresIfExists?: Array<string>;
|
||||
fn: (arg0: ModifierArguments<Options>) => State | void;
|
||||
effect?: (arg0: ModifierArguments<Options>) => (() => void) | void;
|
||||
options?: Partial<Options>;
|
||||
data?: Obj;
|
||||
};
|
||||
export declare type StrictModifiers = Partial<OffsetModifier> | Partial<ApplyStylesModifier> | Partial<ArrowModifier> | Partial<HideModifier> | Partial<ComputeStylesModifier> | Partial<EventListenersModifier> | Partial<FlipModifier> | Partial<PreventOverflowModifier> | Partial<PopperOffsetsModifier>;
|
||||
export declare type EventListeners = {
|
||||
scroll: boolean;
|
||||
resize: boolean;
|
||||
};
|
||||
export declare type Options = {
|
||||
placement: Placement;
|
||||
modifiers: Array<Partial<Modifier<any, any>>>;
|
||||
strategy: PositioningStrategy;
|
||||
onFirstUpdate?: (arg0: Partial<State>) => void;
|
||||
};
|
||||
export declare type OptionsGeneric<TModifier> = {
|
||||
placement: Placement;
|
||||
modifiers: Array<TModifier>;
|
||||
strategy: PositioningStrategy;
|
||||
onFirstUpdate?: (arg0: Partial<State>) => void;
|
||||
};
|
||||
export declare type UpdateCallback = (arg0: State) => void;
|
||||
export declare type ClientRectObject = {
|
||||
x: number;
|
||||
y: number;
|
||||
top: number;
|
||||
left: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
export declare type SideObject = {
|
||||
top: number;
|
||||
left: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
};
|
||||
export declare type Padding = number | Partial<SideObject>;
|
||||
export declare type VirtualElement = {
|
||||
getBoundingClientRect: () => ClientRect | DOMRect;
|
||||
contextElement?: Element;
|
||||
};
|
||||
export {};
|
||||
12
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.d.ts
generated
vendored
Normal file
12
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { State, Padding } from "../types";
|
||||
import type { Placement, ComputedPlacement, Boundary, RootBoundary } from "../enums";
|
||||
declare type Options = {
|
||||
placement: Placement;
|
||||
padding: Padding;
|
||||
boundary: Boundary;
|
||||
rootBoundary: RootBoundary;
|
||||
flipVariations: boolean;
|
||||
allowedAutoPlacements?: Array<Placement>;
|
||||
};
|
||||
export default function computeAutoPlacement(state: Partial<State>, options?: Options): Array<ComputedPlacement>;
|
||||
export {};
|
||||
8
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/computeOffsets.d.ts
generated
vendored
Normal file
8
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/computeOffsets.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { Rect, PositioningStrategy, Offsets, ClientRectObject } from "../types";
|
||||
import { Placement } from "../enums";
|
||||
export default function computeOffsets({ reference, element, placement }: {
|
||||
reference: Rect | ClientRectObject;
|
||||
element: Rect | ClientRectObject;
|
||||
strategy: PositioningStrategy;
|
||||
placement?: Placement;
|
||||
}): Offsets;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/debounce.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/debounce.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function debounce<T>(fn: (...args: Array<any>) => any): () => Promise<T>;
|
||||
11
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/detectOverflow.d.ts
generated
vendored
Normal file
11
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/detectOverflow.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { State, SideObject, Padding } from "../types";
|
||||
import type { Placement, Boundary, RootBoundary, Context } from "../enums";
|
||||
export declare type Options = {
|
||||
placement: Placement;
|
||||
boundary: Boundary;
|
||||
rootBoundary: RootBoundary;
|
||||
elementContext: Context;
|
||||
altBoundary: boolean;
|
||||
padding: Padding;
|
||||
};
|
||||
export default function detectOverflow(state: State, options?: Partial<Options>): SideObject;
|
||||
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/expandToHashMap.d.ts
generated
vendored
Normal file
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/expandToHashMap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function expandToHashMap<T extends number | string | boolean, K extends string>(value: T, keys: Array<K>): {
|
||||
[key: string]: T;
|
||||
};
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/format.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/format.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function format(str: string, ...args: Array<string>): string;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getAltAxis.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getAltAxis.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getAltAxis(axis: "x" | "y"): "x" | "y";
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getAltLen.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getAltLen.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getAltLen(len: "width" | "height"): "width" | "height";
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getBasePlacement.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getBasePlacement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { BasePlacement, Placement, auto } from "../enums";
|
||||
export default function getBasePlacement(placement: Placement | typeof auto): BasePlacement;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getFreshSideObject.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getFreshSideObject.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { SideObject } from "../types";
|
||||
export default function getFreshSideObject(): SideObject;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Placement } from "../enums";
|
||||
export default function getMainAxisFromPlacement(placement: Placement): "x" | "y";
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getOppositePlacement.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getOppositePlacement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Placement } from "../enums";
|
||||
export default function getOppositePlacement(placement: Placement): Placement;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Placement } from "../enums";
|
||||
export default function getOppositeVariationPlacement(placement: Placement): Placement;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getVariation.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/getVariation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Variation, Placement } from "../enums";
|
||||
export default function getVariation(placement: Placement): Variation | null | undefined;
|
||||
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/math.d.ts
generated
vendored
Normal file
3
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/math.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare const max: (...values: number[]) => number;
|
||||
export declare const min: (...values: number[]) => number;
|
||||
export declare const round: (x: number) => number;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/mergeByName.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/mergeByName.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from "../types";
|
||||
export default function mergeByName(modifiers: Array<Partial<Modifier<any, any>>>): Array<Partial<Modifier<any, any>>>;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/mergePaddingObject.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/mergePaddingObject.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { SideObject } from "../types";
|
||||
export default function mergePaddingObject(paddingObject: Partial<SideObject>): SideObject;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/orderModifiers.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/orderModifiers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from "../types";
|
||||
export default function orderModifiers(modifiers: Array<Modifier<any, any>>): Array<Modifier<any, any>>;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/rectToClientRect.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/rectToClientRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Rect, ClientRectObject } from "../types";
|
||||
export default function rectToClientRect(rect: Rect): ClientRectObject;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/uniqueBy.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/uniqueBy.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function uniqueBy<T>(arr: Array<T>, fn: (arg0: T) => any): Array<T>;
|
||||
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/validateModifiers.d.ts
generated
vendored
Normal file
1
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/validateModifiers.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function validateModifiers(modifiers: Array<any>): void;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/within.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/lib/utils/within.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function within(min: number, value: number, max: number): number;
|
||||
export declare function withinMaxClamp(min: number, value: number, max: number): number;
|
||||
129
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/package.json
generated
vendored
Normal file
129
node_modules/.store/element-plus@2.4.3/node_modules/@popperjs/core/package.json
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/LICENSE
generated
vendored
Normal file
21
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/README.md
generated
vendored
Normal file
15
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/lodash-es`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for lodash-es (http://lodash.com/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash-es.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 21 Nov 2023 16:07:37 GMT
|
||||
* Dependencies: [@types/lodash](https://npmjs.com/package/@types/lodash)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Stephen Lautier](https://github.com/stephenlautier), and [e-cloud](https://github.com/e-cloud).
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/add.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/add.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { add } from "lodash";
|
||||
export default add;
|
||||
2
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/after.d.ts
generated
vendored
Normal file
2
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/after.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { after } from "lodash";
|
||||
export default after;
|
||||
67
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/array.d.ts
generated
vendored
Normal file
67
node_modules/.store/element-plus@2.4.3/node_modules/@types/lodash-es/array.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
import { default as chunk } from "./chunk";
|
||||
import { default as compact } from "./compact";
|
||||
import { default as concat } from "./concat";
|
||||
import { default as difference } from "./difference";
|
||||
import { default as differenceBy } from "./differenceBy";
|
||||
import { default as differenceWith } from "./differenceWith";
|
||||
import { default as drop } from "./drop";
|
||||
import { default as dropRight } from "./dropRight";
|
||||
import { default as dropRightWhile } from "./dropRightWhile";
|
||||
import { default as dropWhile } from "./dropWhile";
|
||||
import { default as fill } from "./fill";
|
||||
import { default as findIndex } from "./findIndex";
|
||||
import { default as findLastIndex } from "./findLastIndex";
|
||||
import { default as first } from "./first";
|
||||
import { default as flatten } from "./flatten";
|
||||
import { default as flattenDeep } from "./flattenDeep";
|
||||
import { default as flattenDepth } from "./flattenDepth";
|
||||
import { default as fromPairs } from "./fromPairs";
|
||||
import { default as head } from "./head";
|
||||
import { default as indexOf } from "./indexOf";
|
||||
import { default as initial } from "./initial";
|
||||
import { default as intersection } from "./intersection";
|
||||
import { default as intersectionBy } from "./intersectionBy";
|
||||
import { default as intersectionWith } from "./intersectionWith";
|
||||
import { default as join } from "./join";
|
||||
import { default as last } from "./last";
|
||||
import { default as lastIndexOf } from "./lastIndexOf";
|
||||
import { default as nth } from "./nth";
|
||||
import { default as pull } from "./pull";
|
||||
import { default as pullAll } from "./pullAll";
|
||||
import { default as pullAllBy } from "./pullAllBy";
|
||||
import { default as pullAllWith } from "./pullAllWith";
|
||||
import { default as pullAt } from "./pullAt";
|
||||
import { default as remove } from "./remove";
|
||||
import { default as reverse } from "./reverse";
|
||||
import { default as slice } from "./slice";
|
||||
import { default as sortedIndex } from "./sortedIndex";
|
||||
import { default as sortedIndexBy } from "./sortedIndexBy";
|
||||
import { default as sortedIndexOf } from "./sortedIndexOf";
|
||||
import { default as sortedLastIndex } from "./sortedLastIndex";
|
||||
import { default as sortedLastIndexBy } from "./sortedLastIndexBy";
|
||||
import { default as sortedLastIndexOf } from "./sortedLastIndexOf";
|
||||
import { default as sortedUniq } from "./sortedUniq";
|
||||
import { default as sortedUniqBy } from "./sortedUniqBy";
|
||||
import { default as tail } from "./tail";
|
||||
import { default as take } from "./take";
|
||||
import { default as takeRight } from "./takeRight";
|
||||
import { default as takeRightWhile } from "./takeRightWhile";
|
||||
import { default as takeWhile } from "./takeWhile";
|
||||
import { default as union } from "./union";
|
||||
import { default as unionBy } from "./unionBy";
|
||||
import { default as unionWith } from "./unionWith";
|
||||
import { default as uniq } from "./uniq";
|
||||
import { default as uniqBy } from "./uniqBy";
|
||||
import { default as uniqWith } from "./uniqWith";
|
||||
import { default as unzip } from "./unzip";
|
||||
import { default as unzipWith } from "./unzipWith";
|
||||
import { default as without } from "./without";
|
||||
import { default as xor } from "./xor";
|
||||
import { default as xorBy } from "./xorBy";
|
||||
import { default as xorWith } from "./xorWith";
|
||||
import { default as zip } from "./zip";
|
||||
import { default as zipObject } from "./zipObject";
|
||||
import { default as zipObjectDeep } from "./zipObjectDeep";
|
||||
import { default as zipWith } from "./zipWith";
|
||||
|
||||
export { default } from "./array.default";
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user