@cfx-dev/ui-components 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/dist/{Icons-BlBKvJD8.js → Icons-NE1cibCU.js} +36 -33
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Input/RichInput.js +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1 -1
- package/dist/components/InputDropzone/ItemPreview.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/main.js +1 -1
- package/dist/style-guide/Icons/IconDisplayGrid.js +1 -1
- package/dist/style-guide/Icons/Icons.d.ts +3 -0
- package/dist/style-guide/Icons/Icons.js +5 -2
- package/dist/style-guide/Icons/NewIcons/UpArrow.d.ts +5 -0
- package/dist/style-guide/Icons/NewIcons/UpArrow.js +27 -0
- package/dist/style-guide/Icons/NewIcons/UpvotesBurst.d.ts +5 -0
- package/dist/style-guide/Icons/NewIcons/UpvotesBurst.js +26 -0
- package/dist/style-guide/Icons/NewIcons/UpvotesRecurring.d.ts +5 -0
- package/dist/style-guide/Icons/NewIcons/UpvotesRecurring.js +27 -0
- package/dist/styles-scss/_colors.scss +211 -211
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 FiveM
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 FiveM
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
@@ -1,69 +1,72 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { G as r, b as
|
|
3
|
-
|
|
2
|
+
import { G as r, b as o } from "./index.esm-BkynlSN6.js";
|
|
3
|
+
import n from "./style-guide/Icons/NewIcons/UpvotesBurst.js";
|
|
4
|
+
import c from "./style-guide/Icons/NewIcons/UpvotesRecurring.js";
|
|
5
|
+
import g from "./style-guide/Icons/NewIcons/UpArrow.js";
|
|
6
|
+
function s(t) {
|
|
4
7
|
return r({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z" } }, { tag: "path", attr: { d: "M13 7h-2v6h6v-2h-4z" } }] })(t);
|
|
5
8
|
}
|
|
6
|
-
function
|
|
9
|
+
function d(t) {
|
|
7
10
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M15.854 5.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L12.5 7.793l2.646-2.647a.5.5 0 0 1 .708 0z" } }, { tag: "path", attr: { d: "M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" } }] })(t);
|
|
8
11
|
}
|
|
9
|
-
function
|
|
12
|
+
function h(t) {
|
|
10
13
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" } }] })(t);
|
|
11
14
|
}
|
|
12
|
-
function
|
|
15
|
+
function v(t) {
|
|
13
16
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" } }, { tag: "path", attr: { d: "M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z" } }] })(t);
|
|
14
17
|
}
|
|
15
|
-
function
|
|
18
|
+
function u(t) {
|
|
16
19
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z" } }] })(t);
|
|
17
20
|
}
|
|
18
|
-
function
|
|
21
|
+
function T(t) {
|
|
19
22
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" } }] })(t);
|
|
20
23
|
}
|
|
21
|
-
function
|
|
24
|
+
function j(t) {
|
|
22
25
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" } }] })(t);
|
|
23
26
|
}
|
|
24
|
-
function
|
|
27
|
+
function f(t) {
|
|
25
28
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z" } }, { tag: "path", attr: { d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0z" } }] })(t);
|
|
26
29
|
}
|
|
27
|
-
function
|
|
30
|
+
function L(t) {
|
|
28
31
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M4 10.781c.148 1.667 1.513 2.85 3.591 3.003V15h1.043v-1.216c2.27-.179 3.678-1.438 3.678-3.3 0-1.59-.947-2.51-2.956-3.028l-.722-.187V3.467c1.122.11 1.879.714 2.07 1.616h1.47c-.166-1.6-1.54-2.748-3.54-2.875V1H7.591v1.233c-1.939.23-3.27 1.472-3.27 3.156 0 1.454.966 2.483 2.661 2.917l.61.162v4.031c-1.149-.17-1.94-.8-2.131-1.718H4zm3.391-3.836c-1.043-.263-1.6-.825-1.6-1.616 0-.944.704-1.641 1.8-1.828v3.495l-.2-.05zm1.591 1.872c1.287.323 1.852.859 1.852 1.769 0 1.097-.826 1.828-2.2 1.939V8.73l.348.086z" } }] })(t);
|
|
29
32
|
}
|
|
30
|
-
function
|
|
33
|
+
function p(t) {
|
|
31
34
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" } }, { tag: "path", attr: { d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z" } }] })(t);
|
|
32
35
|
}
|
|
33
|
-
function
|
|
36
|
+
function B(t) {
|
|
34
37
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z" } }] })(t);
|
|
35
38
|
}
|
|
36
|
-
function
|
|
39
|
+
function M(t) {
|
|
37
40
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z" } }] })(t);
|
|
38
41
|
}
|
|
39
|
-
function
|
|
42
|
+
function C(t) {
|
|
40
43
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z" } }] })(t);
|
|
41
44
|
}
|
|
42
|
-
function
|
|
45
|
+
function z(t) {
|
|
43
46
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1H7Zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm-5.784 6A2.238 2.238 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.325 6.325 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1h4.216ZM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" } }] })(t);
|
|
44
47
|
}
|
|
45
|
-
function
|
|
48
|
+
function x(t) {
|
|
46
49
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M10.804 8 5 4.633v6.734L10.804 8zm.792-.696a.802.802 0 0 1 0 1.392l-6.363 3.692C4.713 12.69 4 12.345 4 11.692V4.308c0-.653.713-.998 1.233-.696l6.363 3.692z" } }] })(t);
|
|
47
50
|
}
|
|
48
|
-
function
|
|
51
|
+
function m(t) {
|
|
49
52
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z" } }] })(t);
|
|
50
53
|
}
|
|
51
|
-
function
|
|
54
|
+
function w(t) {
|
|
52
55
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M3 2v4.586l7 7L14.586 9l-7-7H3zM2 2a1 1 0 0 1 1-1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 2 6.586V2z" } }, { tag: "path", attr: { d: "M5.5 5a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1zm0 1a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM1 7.086a1 1 0 0 0 .293.707L8.75 15.25l-.043.043a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 0 7.586V3a1 1 0 0 1 1-1v5.086z" } }] })(t);
|
|
53
56
|
}
|
|
54
|
-
function
|
|
57
|
+
function y(t) {
|
|
55
58
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Z" } }, { tag: "path", attr: { d: "M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1ZM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118ZM2.5 3h11V2h-11v1Z" } }] })(t);
|
|
56
59
|
}
|
|
57
|
-
function
|
|
60
|
+
function H(t) {
|
|
58
61
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" } }, { tag: "path", attr: { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" } }] })(t);
|
|
59
62
|
}
|
|
60
|
-
function
|
|
63
|
+
function V(t) {
|
|
61
64
|
return r({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" } }] })(t);
|
|
62
65
|
}
|
|
63
|
-
function
|
|
66
|
+
function k(t) {
|
|
64
67
|
return r({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" } }, { tag: "polyline", attr: { points: "15 3 21 3 21 9" } }, { tag: "line", attr: { x1: "10", y1: "14", x2: "21", y2: "3" } }] })(t);
|
|
65
68
|
}
|
|
66
|
-
function
|
|
69
|
+
function P(t) {
|
|
67
70
|
return r({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" } }, { tag: "polyline", attr: { points: "17 8 12 3 7 8" } }, { tag: "line", attr: { x1: "12", y1: "3", x2: "12", y2: "15" } }] })(t);
|
|
68
71
|
}
|
|
69
72
|
function l(t) {
|
|
@@ -72,23 +75,23 @@ function l(t) {
|
|
|
72
75
|
function e(t) {
|
|
73
76
|
return r({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M345.6 128l51.3 51.3-109.3 109.4-89.6-89.6L32 365.4 63.6 397 198 262.5l89.6 89.7 141.1-141 51.3 51.3V128H345.6z" } }] })(t);
|
|
74
77
|
}
|
|
75
|
-
function
|
|
78
|
+
function A(t) {
|
|
76
79
|
return r({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M394.23 197.56a300.43 300.43 0 00-53.37-90C301.2 61.65 249.05 32 208 32a16 16 0 00-15.48 20c13.87 53-14.88 97.07-45.31 143.72C122 234.36 96 274.27 96 320c0 88.22 71.78 160 160 160s160-71.78 160-160c0-43.3-7.32-84.49-21.77-122.44zm-105.9 221.13C278 429.69 265.05 432 256 432s-22-2.31-32.33-13.31S208 390.24 208 368c0-25.14 8.82-44.28 17.34-62.78 4.95-10.74 10-21.67 13-33.37a8 8 0 0112.49-4.51A126.48 126.48 0 01275 292c18.17 24 29 52.42 29 76 0 22.24-5.42 39.77-15.67 50.69z" } }] })(t);
|
|
77
80
|
}
|
|
78
|
-
function
|
|
81
|
+
function F(t) {
|
|
79
82
|
return r({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z" } }] })(t);
|
|
80
83
|
}
|
|
81
|
-
function
|
|
84
|
+
function Z(t) {
|
|
82
85
|
return r({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { fill: "none" }, child: [{ tag: "path", attr: { d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M0 0h24v24H0z" } }] }, { tag: "path", attr: { d: "M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z" } }] })(t);
|
|
83
86
|
}
|
|
84
|
-
function
|
|
87
|
+
function b(t) {
|
|
85
88
|
return r({ tag: "svg", attr: { viewBox: "0 0 16 16", fill: "currentColor" }, child: [{ tag: "rect", attr: { x: "2", y: "9", width: "9", height: "1" } }, { tag: "rect", attr: { x: "2", y: "12", width: "8", height: "1" } }, { tag: "rect", attr: { x: "2", y: "6", width: "12", height: "1" } }, { tag: "rect", attr: { x: "2", y: "3", width: "11", height: "1" } }] })(t);
|
|
86
89
|
}
|
|
87
90
|
var i;
|
|
88
91
|
((t) => {
|
|
89
|
-
t.exit = /* @__PURE__ */ a(
|
|
92
|
+
t.exit = /* @__PURE__ */ a(V, { style: { fontSize: "1.75em" } }), t.settings = /* @__PURE__ */ a(B, {}), t.changelog = /* @__PURE__ */ a(o, {}), t.storymode = /* @__PURE__ */ a(x, {}), t.replayEditor = /* @__PURE__ */ a(Z, {}), t.tipInfo = /* @__PURE__ */ a(m, {}), t.remove = /* @__PURE__ */ a(y, {}), t.externalLink = /* @__PURE__ */ a(k, {}), t.tags = /* @__PURE__ */ a(w, {}), t.checkmark = /* @__PURE__ */ a(u, {}), t.playersCount = /* @__PURE__ */ a(z, {}), t.last24h = /* @__PURE__ */ a(F, {}), t.statusLevelAllGood = /* @__PURE__ */ a(v, {}), t.statusLevelMinor = /* @__PURE__ */ a(p, {}), t.statusLevelMajor = /* @__PURE__ */ a(H, {}), t.favoriteInactive = /* @__PURE__ */ a(C, {}), t.favoriteActive = /* @__PURE__ */ a(M, { className: "cfx-color-primary" }), t.account = /* @__PURE__ */ a(h, {}), t.accountLoaded = /* @__PURE__ */ a(d, {}), t.serversListAll = /* @__PURE__ */ a(b, {}), t.serversListSupporters = /* @__PURE__ */ a(L, {}), t.serversListHistory = /* @__PURE__ */ a(f, {}), t.serversListFavorites = t.favoriteInactive, t.serverLastConnected = /* @__PURE__ */ a(s, {}), t.serversFeatured = /* @__PURE__ */ a(l, { style: { fill: "url(#pin-gradient)" } }), t.serversFeaturedUnstyled = /* @__PURE__ */ a(l, {}), t.serverBoost = /* @__PURE__ */ a(e, { style: { fill: "url(#boost-gradient)" } }), t.serverBoostUnstyled = /* @__PURE__ */ a(e, {}), t.serverBurst = /* @__PURE__ */ a(A, { style: { fill: "url(#burst-gradient)" } }), t.upvotesBurst = /* @__PURE__ */ a(n, { style: { width: "1.5em" } }), t.upvotesRecurring = /* @__PURE__ */ a(c, { style: { width: "1.5em" } }), t.upArrow = /* @__PURE__ */ a(g, { style: { width: "1.5em" } });
|
|
90
93
|
})(i || (i = {}));
|
|
91
|
-
const
|
|
94
|
+
const E = {
|
|
92
95
|
gta5: /* @__PURE__ */ a("svg", { className: "brand-icon mirror", children: /* @__PURE__ */ a("use", { xlinkHref: "#logo-gta5" }) }),
|
|
93
96
|
rdr3: /* @__PURE__ */ a("svg", { className: "brand-icon", children: /* @__PURE__ */ a("use", { xlinkHref: "#logo-rdr3" }) }),
|
|
94
97
|
ny: /* @__PURE__ */ a("svg", { className: "brand-icon", children: /* @__PURE__ */ a("use", { xlinkHref: "#logo-ny" }) }),
|
|
@@ -96,9 +99,9 @@ const R = {
|
|
|
96
99
|
ROS: /* @__PURE__ */ a("svg", { className: "brand-icon", viewBox: "0 0 128 128", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ a("path", { d: "M126.7,82.9L99.6,82.9L95.3,55.9L79.5,82.7L76.5,82.7C74.7,79.6 74,75.1 74,72.3C74,67.7 74.3,63.2 74.3,57.3C74.3,49.5 72,45.4 65.9,43.9L65.9,43.7C78.8,41.9 84.7,33.3 84.7,21.3C84.7,4.2 73.3,0.5 58.4,0.5L18.3,0.5L1.3,80.9L22.6,80.9L28.8,51.6L43,51.6C50.6,51.6 53.7,55.3 53.7,62.4C53.7,67.8 53.1,72.1 53.1,76.2C53.1,77.7 53.4,81.3 54.5,82.7L69.9,99L56.6,127.5L85,110.6L106.2,126.9L102.3,100L126.7,82.9ZM49.4,36.6L32.4,36.6L36.5,17.2L52.3,17.2C57.9,17.2 63.8,18.7 63.8,25.5C63.8,34.2 57.1,36.6 49.4,36.6M85.4,105.9L65.6,117.7L74.7,98.3L63.7,86.7L81.8,86.7L93.2,67.4L96.3,86.9L114.3,86.9L98.1,98.2L101,118L85.4,105.9Z" }) })
|
|
97
100
|
};
|
|
98
101
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
E as B,
|
|
103
|
+
P as F,
|
|
101
104
|
i as I,
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
T as a,
|
|
106
|
+
j as b
|
|
104
107
|
};
|
|
@@ -3,7 +3,7 @@ import _ from "react";
|
|
|
3
3
|
import { F as p } from "../../Combination-Dp_plIQU.js";
|
|
4
4
|
import { Button as h } from "../Button/Button.js";
|
|
5
5
|
import { Interactive as f } from "../Interactive/Interactive.js";
|
|
6
|
-
import { I as u } from "../../Icons-
|
|
6
|
+
import { I as u } from "../../Icons-NE1cibCU.js";
|
|
7
7
|
import { clsx as l } from "../../utils/clsx.js";
|
|
8
8
|
import { noop as v } from "../../utils/functional.js";
|
|
9
9
|
import { useOutlet as b, useKeyboardClose as z } from "../../utils/hooks.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as B, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
3
|
import { Button as D } from "../Button/Button.js";
|
|
4
|
-
import { I as F } from "../../Icons-
|
|
4
|
+
import { I as F } from "../../Icons-NE1cibCU.js";
|
|
5
5
|
import { clsx as L } from "../../utils/clsx.js";
|
|
6
6
|
import { useDynamicRef as i } from "../../utils/hooks.js";
|
|
7
7
|
import '../../assets/RichInput.css';const T = "_root_16on4_1", j = "_renderer_16on4_1", z = "_small_16on4_8", E = "_large_16on4_13", H = "_clear_16on4_95", t = {
|
|
@@ -2,7 +2,7 @@ import { jsxs as he, jsx as N } from "react/jsx-runtime";
|
|
|
2
2
|
import er, { useMemo as L, useRef as te, useReducer as br, useEffect as De, useCallback as D, forwardRef as hr, useImperativeHandle as Dr, Fragment as Ar } from "react";
|
|
3
3
|
import { P as l } from "../../index-DQMInta3.js";
|
|
4
4
|
import { a as M, b as $, c as We, d as Be } from "../../tslib.es6-CBKHJX9H.js";
|
|
5
|
-
import { F as wr } from "../../Icons-
|
|
5
|
+
import { F as wr } from "../../Icons-NE1cibCU.js";
|
|
6
6
|
import { Icon as _r } from "../Icon/Icon.js";
|
|
7
7
|
import { clsx as Fr } from "../../utils/clsx.js";
|
|
8
8
|
import { ItemPreview as Or } from "./ItemPreview.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
3
|
import { Button as i } from "../Button/Button.js";
|
|
4
|
-
import { I as m } from "../../Icons-
|
|
4
|
+
import { I as m } from "../../Icons-NE1cibCU.js";
|
|
5
5
|
import '../../assets/ItemPreview.css';const h = "_root_15ual_1", p = "_filePath_15ual_13", n = {
|
|
6
6
|
root: h,
|
|
7
7
|
filePath: p
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Button as _ } from "../Button/Button.js";
|
|
3
3
|
import { Overlay as s } from "../Overlay/Overlay.js";
|
|
4
|
-
import { I as f } from "../../Icons-
|
|
4
|
+
import { I as f } from "../../Icons-NE1cibCU.js";
|
|
5
5
|
import { noop as n } from "../../utils/functional.js";
|
|
6
6
|
import { useKeyboardClose as h } from "../../utils/hooks.js";
|
|
7
7
|
import '../../assets/Modal.css';const v = "_root_1v8ee_1", C = "_close_1v8ee_27", u = "_header_1v8ee_37", N = "_footer_1v8ee_47", r = {
|
|
@@ -5,7 +5,7 @@ import ne, { createContext as st, useMemo as Me, createElement as S, useContext
|
|
|
5
5
|
import { r as pt, $ as oo } from "../../index-C1KmDBa6.js";
|
|
6
6
|
import { f as bn, _ as Ce, c as ro } from "../../tslib.es6-CBKHJX9H.js";
|
|
7
7
|
import { a as io, u as co } from "../../medium-JVtzoF2c.js";
|
|
8
|
-
import { a as Ut, b as so, I as ao } from "../../Icons-
|
|
8
|
+
import { a as Ut, b as so, I as ao } from "../../Icons-NE1cibCU.js";
|
|
9
9
|
import { clsx as xn } from "../../utils/clsx.js";
|
|
10
10
|
import '../../assets/Select.css';var yn = function(e) {
|
|
11
11
|
var t = e.sideCar, n = bn(e, ["sideCar"]);
|
package/dist/main.js
CHANGED
|
@@ -54,7 +54,7 @@ import { Text as gr, TextBlock as hr } from "./components/Text/Text.js";
|
|
|
54
54
|
import { Textarea as Cr } from "./components/Textarea/Textarea.js";
|
|
55
55
|
import { TITLE_OUTLET_ID as Pr, Title as _r } from "./components/Title/Title.js";
|
|
56
56
|
import { InputDropzone as Fr } from "./components/InputDropzone/InputDropzone.js";
|
|
57
|
-
import { B as Ar, I as zr } from "./Icons-
|
|
57
|
+
import { B as Ar, I as zr } from "./Icons-NE1cibCU.js";
|
|
58
58
|
import { OnScreenSensor as Vr } from "./components/OnScreenSensor.js";
|
|
59
59
|
import { ui as Nr } from "./components/ui.js";
|
|
60
60
|
import { Symbols as Gr } from "./components/Symbols.js";
|
|
@@ -28,6 +28,9 @@ export declare namespace Icons {
|
|
|
28
28
|
const serverBoost: import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
const serverBoostUnstyled: import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
const serverBurst: import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
const upvotesBurst: import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
const upvotesRecurring: import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
const upArrow: import("react/jsx-runtime").JSX.Element;
|
|
31
34
|
}
|
|
32
35
|
export declare const BrandIcon: {
|
|
33
36
|
gta5: import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { B as n, I as
|
|
2
|
+
import { B as n, I as s } from "../../Icons-NE1cibCU.js";
|
|
3
3
|
import "../../index.esm-BkynlSN6.js";
|
|
4
|
+
import "./NewIcons/UpvotesBurst.js";
|
|
5
|
+
import "./NewIcons/UpvotesRecurring.js";
|
|
6
|
+
import "./NewIcons/UpArrow.js";
|
|
4
7
|
export {
|
|
5
8
|
n as BrandIcon,
|
|
6
|
-
|
|
9
|
+
s as Icons
|
|
7
10
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import t from "react";
|
|
3
|
+
function e(r) {
|
|
4
|
+
return /* @__PURE__ */ o(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
...r,
|
|
11
|
+
children: /* @__PURE__ */ o(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
strokeWidth: "1.5",
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
d: "M8 13V3M8 3L3 8M8 3L13 8"
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
const s = t.memo(e);
|
|
25
|
+
export {
|
|
26
|
+
s as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
function e(o) {
|
|
4
|
+
return /* @__PURE__ */ t(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
...o,
|
|
10
|
+
children: /* @__PURE__ */ t(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
d: "M7.75 2.75V12.75M12.75 7.75H2.75M4.89 4.89L10.61 10.61M10.61 4.89L4.89 10.61",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
strokeWidth: "1.5",
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round"
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
const i = r.memo(e);
|
|
24
|
+
export {
|
|
25
|
+
i as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import e from "react";
|
|
3
|
+
function t(r) {
|
|
4
|
+
return /* @__PURE__ */ o(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
...r,
|
|
11
|
+
children: /* @__PURE__ */ o(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
strokeWidth: "1.5",
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
d: "M12.33 9.75C11.56 11.52 9.8 12.75 7.75 12.75C4.99 12.75 2.75 10.51 2.75 7.75C2.75 4.99 4.99 2.75 7.75 2.75C9.8 2.75 11.56 3.98 12.33 5.75M13.76 4.13L12.89 7L10.02 6.13M7.53998 5.56995V8.51995L8.68998 9.67995"
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
const s = e.memo(t);
|
|
25
|
+
export {
|
|
26
|
+
s as default
|
|
27
|
+
};
|
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
@use "sass:list";
|
|
3
|
-
|
|
4
|
-
@function get-luminance($color) {
|
|
5
|
-
$colors: (
|
|
6
|
-
'red': red($color),
|
|
7
|
-
'green': green($color),
|
|
8
|
-
'blue': blue($color)
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
@each $name, $value in $colors {
|
|
12
|
-
$adjusted: 0;
|
|
13
|
-
$value: math.div($value, 255);
|
|
14
|
-
|
|
15
|
-
@if $value < 0.03928 {
|
|
16
|
-
$value: math.div($value, 12.92);
|
|
17
|
-
} @else {
|
|
18
|
-
$value: math.div($value + .055, 1.055);
|
|
19
|
-
$value: math.pow($value, 2.4);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
$colors: map-merge($colors, ($name: $value));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@return (map-get($colors, 'red') * .2126) + (map-get($colors, 'green') * .7152) + (map-get($colors, 'blue') * .0722);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@function interpolate($c1, $c2, $f) {
|
|
29
|
-
$c1r: red($c1);
|
|
30
|
-
$c1g: green($c1);
|
|
31
|
-
$c1b: blue($c1);
|
|
32
|
-
|
|
33
|
-
$c2r: red($c2);
|
|
34
|
-
$c2g: green($c2);
|
|
35
|
-
$c2b: blue($c2);
|
|
36
|
-
|
|
37
|
-
@return rgb(
|
|
38
|
-
$c1r + $f * ($c2r - $c1r),
|
|
39
|
-
$c1g + $f * ($c2g - $c1g),
|
|
40
|
-
$c1b + $f * ($c2b - $c1b),
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@function set-luminance($color, $lum) {
|
|
45
|
-
$itersLeft: 20;
|
|
46
|
-
$low: rgb(0, 0, 0);
|
|
47
|
-
$high: rgb(255, 255, 255);
|
|
48
|
-
|
|
49
|
-
@if get-luminance($color) > $lum {
|
|
50
|
-
$high: $color;
|
|
51
|
-
} @else {
|
|
52
|
-
$low: $color;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
$mid: interpolate($low, $high, .5);
|
|
56
|
-
$lm: get-luminance($mid);
|
|
57
|
-
|
|
58
|
-
@while math.abs($lum - $lm) >= 1e-7 and $itersLeft > 0 {
|
|
59
|
-
$itersLeft: $itersLeft - 1;
|
|
60
|
-
|
|
61
|
-
$mid: interpolate($low, $high, .5);
|
|
62
|
-
$lm: get-luminance($mid);
|
|
63
|
-
|
|
64
|
-
@if $lm > $lum {
|
|
65
|
-
$high: $mid;
|
|
66
|
-
} @else {
|
|
67
|
-
$low: $mid;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@return $mid;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@function color-triplet($color) {
|
|
75
|
-
@return #{red($color)}, #{green($color)}, #{blue($color)};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
// LAB <-> RGB
|
|
80
|
-
$oneThird: math.div(1, 3);
|
|
81
|
-
$_16OVER116: math.div(16, 116);
|
|
82
|
-
$_1OVER2P4: math.div(1, 2.4);
|
|
83
|
-
|
|
84
|
-
@function rgb2lab($color) {
|
|
85
|
-
$r: math.div(red($color), 255);
|
|
86
|
-
$g: math.div(green($color), 255);
|
|
87
|
-
$b: math.div(blue($color), 255);
|
|
88
|
-
|
|
89
|
-
@if $r > 0.04045 {
|
|
90
|
-
$r: math.pow(math.div($r + 0.055, 1.055), 2.4);
|
|
91
|
-
} @else {
|
|
92
|
-
$r: math.div($r, 12.92);
|
|
93
|
-
}
|
|
94
|
-
@if $g > 0.04045 {
|
|
95
|
-
$g: math.pow(math.div($g + 0.055, 1.055), 2.4);
|
|
96
|
-
} @else {
|
|
97
|
-
$g: math.div($g, 12.92);
|
|
98
|
-
}
|
|
99
|
-
@if $b > 0.04045 {
|
|
100
|
-
$b: math.pow(math.div($b + 0.055, 1.055), 2.4);
|
|
101
|
-
} @else {
|
|
102
|
-
$b: math.div($b, 12.92);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
$x: math.div($r * 0.4124 + $g * 0.3576 + $b * 0.1805, 0.95047);
|
|
106
|
-
$y: math.div($r * 0.2126 + $g * 0.7152 + $b * 0.0722, 1.00000);
|
|
107
|
-
$z: math.div($r * 0.0193 + $g * 0.1192 + $b * 0.9505, 1.08883);
|
|
108
|
-
|
|
109
|
-
@if $x > 0.008856 {
|
|
110
|
-
$x: math.pow($x, $oneThird);
|
|
111
|
-
} @else {
|
|
112
|
-
$x: (7.787 * $x) + $_16OVER116;
|
|
113
|
-
}
|
|
114
|
-
@if $y > 0.008856 {
|
|
115
|
-
$y: math.pow($y, $oneThird);
|
|
116
|
-
} @else {
|
|
117
|
-
$y: (7.787 * $y) + $_16OVER116;
|
|
118
|
-
}
|
|
119
|
-
@if $z > 0.008856 {
|
|
120
|
-
$z: math.pow($z, $oneThird);
|
|
121
|
-
} @else {
|
|
122
|
-
$z: (7.787 * $z) + $_16OVER116;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@return (
|
|
126
|
-
'L': (116 * $y) - 16,
|
|
127
|
-
'a': 500 * ($x - $y),
|
|
128
|
-
'b': 200 * ($y - $z),
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
@function lab2rgb($lab) {
|
|
133
|
-
$y: math.div(map-get($lab, 'L') + 16, 116);
|
|
134
|
-
$x: math.div(map-get($lab, 'a'), 500) + $y;
|
|
135
|
-
$z: $y - math.div(map-get($lab, 'b'), 200);
|
|
136
|
-
|
|
137
|
-
$x3: math.pow($x, 3);
|
|
138
|
-
$y3: math.pow($y, 3);
|
|
139
|
-
$z3: math.pow($z, 3);
|
|
140
|
-
|
|
141
|
-
@if $x3 > 0.008856 {
|
|
142
|
-
$x: $x3;
|
|
143
|
-
} @else {
|
|
144
|
-
$x: math.div($x - $_16OVER116 , 7.787);
|
|
145
|
-
}
|
|
146
|
-
@if $y3 > 0.008856 {
|
|
147
|
-
$y: $y3;
|
|
148
|
-
} @else {
|
|
149
|
-
$y: math.div($y - $_16OVER116 , 7.787);
|
|
150
|
-
}
|
|
151
|
-
@if $z3 > 0.008856 {
|
|
152
|
-
$z: $z3;
|
|
153
|
-
} @else {
|
|
154
|
-
$z: math.div($z - $_16OVER116 , 7.787);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
$x: $x * 0.95047;
|
|
158
|
-
$y: $y * 1.00000;
|
|
159
|
-
$z: $z * 1.08883;
|
|
160
|
-
|
|
161
|
-
$r: $x * 3.2406 + $y * -1.5372 + $z * -0.4986;
|
|
162
|
-
$g: $x * -0.9689 + $y * 1.8758 + $z * 0.0415;
|
|
163
|
-
$b: $x * 0.0557 + $y * -0.2040 + $z * 1.0570;
|
|
164
|
-
|
|
165
|
-
@if $r > 0.0031308 {
|
|
166
|
-
$r: 1.055 * math.pow($r, $_1OVER2P4) - 0.055;
|
|
167
|
-
} @else {
|
|
168
|
-
$r: 12.92 * $r;
|
|
169
|
-
}
|
|
170
|
-
@if $g > 0.0031308 {
|
|
171
|
-
$g: 1.055 * math.pow($g, $_1OVER2P4) - 0.055;
|
|
172
|
-
} @else {
|
|
173
|
-
$g: 12.92 * $g;
|
|
174
|
-
}
|
|
175
|
-
@if $b > 0.0031308 {
|
|
176
|
-
$b: 1.055 * math.pow($b, $_1OVER2P4) - 0.055;
|
|
177
|
-
} @else {
|
|
178
|
-
$b: 12.92 * $b;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
@return rgb(
|
|
182
|
-
math.clamp(0, $r, 1) * 255,
|
|
183
|
-
math.clamp(0, $g, 1) * 255,
|
|
184
|
-
math.clamp(0, $b, 1) * 255,
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@function lab-gradient($s, $e, $start, $stop) {
|
|
189
|
-
$lst: ();
|
|
190
|
-
|
|
191
|
-
@for $i from $start to $stop {
|
|
192
|
-
$lst: list.append($lst, lab-gradient-step($s, $e, $i, $stop));
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
@return $lst;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@function lab-gradient-step($s, $e, $i, $stop) {
|
|
199
|
-
$s: rgb2lab($s);
|
|
200
|
-
$e: rgb2lab($e);
|
|
201
|
-
|
|
202
|
-
$a: math.div($i, $stop - 1);
|
|
203
|
-
$ia: 1 - $a;
|
|
204
|
-
|
|
205
|
-
@return lab2rgb((
|
|
206
|
-
'L': $ia * map-get($s, 'L') + $a * map-get($e, 'L'),
|
|
207
|
-
'a': $ia * map-get($s, 'a') + $a * map-get($e, 'a'),
|
|
208
|
-
'b': $ia * map-get($s, 'b') + $a * map-get($e, 'b'),
|
|
209
|
-
));
|
|
210
|
-
}
|
|
211
|
-
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "sass:list";
|
|
3
|
+
|
|
4
|
+
@function get-luminance($color) {
|
|
5
|
+
$colors: (
|
|
6
|
+
'red': red($color),
|
|
7
|
+
'green': green($color),
|
|
8
|
+
'blue': blue($color)
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
@each $name, $value in $colors {
|
|
12
|
+
$adjusted: 0;
|
|
13
|
+
$value: math.div($value, 255);
|
|
14
|
+
|
|
15
|
+
@if $value < 0.03928 {
|
|
16
|
+
$value: math.div($value, 12.92);
|
|
17
|
+
} @else {
|
|
18
|
+
$value: math.div($value + .055, 1.055);
|
|
19
|
+
$value: math.pow($value, 2.4);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
$colors: map-merge($colors, ($name: $value));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@return (map-get($colors, 'red') * .2126) + (map-get($colors, 'green') * .7152) + (map-get($colors, 'blue') * .0722);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@function interpolate($c1, $c2, $f) {
|
|
29
|
+
$c1r: red($c1);
|
|
30
|
+
$c1g: green($c1);
|
|
31
|
+
$c1b: blue($c1);
|
|
32
|
+
|
|
33
|
+
$c2r: red($c2);
|
|
34
|
+
$c2g: green($c2);
|
|
35
|
+
$c2b: blue($c2);
|
|
36
|
+
|
|
37
|
+
@return rgb(
|
|
38
|
+
$c1r + $f * ($c2r - $c1r),
|
|
39
|
+
$c1g + $f * ($c2g - $c1g),
|
|
40
|
+
$c1b + $f * ($c2b - $c1b),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@function set-luminance($color, $lum) {
|
|
45
|
+
$itersLeft: 20;
|
|
46
|
+
$low: rgb(0, 0, 0);
|
|
47
|
+
$high: rgb(255, 255, 255);
|
|
48
|
+
|
|
49
|
+
@if get-luminance($color) > $lum {
|
|
50
|
+
$high: $color;
|
|
51
|
+
} @else {
|
|
52
|
+
$low: $color;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
$mid: interpolate($low, $high, .5);
|
|
56
|
+
$lm: get-luminance($mid);
|
|
57
|
+
|
|
58
|
+
@while math.abs($lum - $lm) >= 1e-7 and $itersLeft > 0 {
|
|
59
|
+
$itersLeft: $itersLeft - 1;
|
|
60
|
+
|
|
61
|
+
$mid: interpolate($low, $high, .5);
|
|
62
|
+
$lm: get-luminance($mid);
|
|
63
|
+
|
|
64
|
+
@if $lm > $lum {
|
|
65
|
+
$high: $mid;
|
|
66
|
+
} @else {
|
|
67
|
+
$low: $mid;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@return $mid;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@function color-triplet($color) {
|
|
75
|
+
@return #{red($color)}, #{green($color)}, #{blue($color)};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
// LAB <-> RGB
|
|
80
|
+
$oneThird: math.div(1, 3);
|
|
81
|
+
$_16OVER116: math.div(16, 116);
|
|
82
|
+
$_1OVER2P4: math.div(1, 2.4);
|
|
83
|
+
|
|
84
|
+
@function rgb2lab($color) {
|
|
85
|
+
$r: math.div(red($color), 255);
|
|
86
|
+
$g: math.div(green($color), 255);
|
|
87
|
+
$b: math.div(blue($color), 255);
|
|
88
|
+
|
|
89
|
+
@if $r > 0.04045 {
|
|
90
|
+
$r: math.pow(math.div($r + 0.055, 1.055), 2.4);
|
|
91
|
+
} @else {
|
|
92
|
+
$r: math.div($r, 12.92);
|
|
93
|
+
}
|
|
94
|
+
@if $g > 0.04045 {
|
|
95
|
+
$g: math.pow(math.div($g + 0.055, 1.055), 2.4);
|
|
96
|
+
} @else {
|
|
97
|
+
$g: math.div($g, 12.92);
|
|
98
|
+
}
|
|
99
|
+
@if $b > 0.04045 {
|
|
100
|
+
$b: math.pow(math.div($b + 0.055, 1.055), 2.4);
|
|
101
|
+
} @else {
|
|
102
|
+
$b: math.div($b, 12.92);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
$x: math.div($r * 0.4124 + $g * 0.3576 + $b * 0.1805, 0.95047);
|
|
106
|
+
$y: math.div($r * 0.2126 + $g * 0.7152 + $b * 0.0722, 1.00000);
|
|
107
|
+
$z: math.div($r * 0.0193 + $g * 0.1192 + $b * 0.9505, 1.08883);
|
|
108
|
+
|
|
109
|
+
@if $x > 0.008856 {
|
|
110
|
+
$x: math.pow($x, $oneThird);
|
|
111
|
+
} @else {
|
|
112
|
+
$x: (7.787 * $x) + $_16OVER116;
|
|
113
|
+
}
|
|
114
|
+
@if $y > 0.008856 {
|
|
115
|
+
$y: math.pow($y, $oneThird);
|
|
116
|
+
} @else {
|
|
117
|
+
$y: (7.787 * $y) + $_16OVER116;
|
|
118
|
+
}
|
|
119
|
+
@if $z > 0.008856 {
|
|
120
|
+
$z: math.pow($z, $oneThird);
|
|
121
|
+
} @else {
|
|
122
|
+
$z: (7.787 * $z) + $_16OVER116;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@return (
|
|
126
|
+
'L': (116 * $y) - 16,
|
|
127
|
+
'a': 500 * ($x - $y),
|
|
128
|
+
'b': 200 * ($y - $z),
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@function lab2rgb($lab) {
|
|
133
|
+
$y: math.div(map-get($lab, 'L') + 16, 116);
|
|
134
|
+
$x: math.div(map-get($lab, 'a'), 500) + $y;
|
|
135
|
+
$z: $y - math.div(map-get($lab, 'b'), 200);
|
|
136
|
+
|
|
137
|
+
$x3: math.pow($x, 3);
|
|
138
|
+
$y3: math.pow($y, 3);
|
|
139
|
+
$z3: math.pow($z, 3);
|
|
140
|
+
|
|
141
|
+
@if $x3 > 0.008856 {
|
|
142
|
+
$x: $x3;
|
|
143
|
+
} @else {
|
|
144
|
+
$x: math.div($x - $_16OVER116 , 7.787);
|
|
145
|
+
}
|
|
146
|
+
@if $y3 > 0.008856 {
|
|
147
|
+
$y: $y3;
|
|
148
|
+
} @else {
|
|
149
|
+
$y: math.div($y - $_16OVER116 , 7.787);
|
|
150
|
+
}
|
|
151
|
+
@if $z3 > 0.008856 {
|
|
152
|
+
$z: $z3;
|
|
153
|
+
} @else {
|
|
154
|
+
$z: math.div($z - $_16OVER116 , 7.787);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
$x: $x * 0.95047;
|
|
158
|
+
$y: $y * 1.00000;
|
|
159
|
+
$z: $z * 1.08883;
|
|
160
|
+
|
|
161
|
+
$r: $x * 3.2406 + $y * -1.5372 + $z * -0.4986;
|
|
162
|
+
$g: $x * -0.9689 + $y * 1.8758 + $z * 0.0415;
|
|
163
|
+
$b: $x * 0.0557 + $y * -0.2040 + $z * 1.0570;
|
|
164
|
+
|
|
165
|
+
@if $r > 0.0031308 {
|
|
166
|
+
$r: 1.055 * math.pow($r, $_1OVER2P4) - 0.055;
|
|
167
|
+
} @else {
|
|
168
|
+
$r: 12.92 * $r;
|
|
169
|
+
}
|
|
170
|
+
@if $g > 0.0031308 {
|
|
171
|
+
$g: 1.055 * math.pow($g, $_1OVER2P4) - 0.055;
|
|
172
|
+
} @else {
|
|
173
|
+
$g: 12.92 * $g;
|
|
174
|
+
}
|
|
175
|
+
@if $b > 0.0031308 {
|
|
176
|
+
$b: 1.055 * math.pow($b, $_1OVER2P4) - 0.055;
|
|
177
|
+
} @else {
|
|
178
|
+
$b: 12.92 * $b;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@return rgb(
|
|
182
|
+
math.clamp(0, $r, 1) * 255,
|
|
183
|
+
math.clamp(0, $g, 1) * 255,
|
|
184
|
+
math.clamp(0, $b, 1) * 255,
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@function lab-gradient($s, $e, $start, $stop) {
|
|
189
|
+
$lst: ();
|
|
190
|
+
|
|
191
|
+
@for $i from $start to $stop {
|
|
192
|
+
$lst: list.append($lst, lab-gradient-step($s, $e, $i, $stop));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@return $lst;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@function lab-gradient-step($s, $e, $i, $stop) {
|
|
199
|
+
$s: rgb2lab($s);
|
|
200
|
+
$e: rgb2lab($e);
|
|
201
|
+
|
|
202
|
+
$a: math.div($i, $stop - 1);
|
|
203
|
+
$ia: 1 - $a;
|
|
204
|
+
|
|
205
|
+
@return lab2rgb((
|
|
206
|
+
'L': $ia * map-get($s, 'L') + $a * map-get($e, 'L'),
|
|
207
|
+
'a': $ia * map-get($s, 'a') + $a * map-get($e, 'a'),
|
|
208
|
+
'b': $ia * map-get($s, 'b') + $a * map-get($e, 'b'),
|
|
209
|
+
));
|
|
210
|
+
}
|
|
211
|
+
|