@usecapsule/core-components 1.0.11 → 1.0.13-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/capsule-core.css +74 -41
- package/css/capsule-core.css.map +1 -1
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-0462f723.js +2 -0
- package/dist/capsule/p-0462f723.js.map +1 -0
- package/dist/capsule/p-202a85c9.entry.js +29 -0
- package/dist/capsule/p-202a85c9.entry.js.map +1 -0
- package/dist/capsule/p-68c73705.entry.js +2 -0
- package/dist/capsule/{p-1dc07cd7.entry.js.map → p-68c73705.entry.js.map} +1 -1
- package/dist/capsule/p-6fb7c4d1.js +3 -0
- package/dist/capsule/p-6fb7c4d1.js.map +1 -0
- package/dist/capsule/{p-11048392.entry.js → p-91412151.entry.js} +2 -2
- package/dist/capsule/{p-62e7869a.entry.js → p-a95ec4df.entry.js} +2 -2
- package/dist/capsule/p-c2bf050b.js +2 -0
- package/dist/capsule/p-c2bf050b.js.map +1 -0
- package/dist/capsule/p-d7be092d.entry.js +10 -0
- package/dist/capsule/p-d7be092d.entry.js.map +1 -0
- package/dist/capsule/p-f604b591.entry.js +2 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
- package/dist/cjs/capsule.cjs.js +2 -2
- package/dist/cjs/constants-4bb85cc5.js +12 -0
- package/dist/cjs/constants-4bb85cc5.js.map +1 -0
- package/dist/cjs/cpsl-alert_17.cjs.entry.js +3783 -559
- package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-animation.cjs.entry.js +20129 -0
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
- package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
- package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
- package/dist/cjs/{index-2a026742.js → index-3fccb5b4.js} +22 -1
- package/dist/cjs/index-3fccb5b4.js.map +1 -0
- package/dist/cjs/index.cjs.js +338 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/capsule-rings-dark.svg +34 -0
- package/dist/collection/assets/icons/capsule.svg +4 -4
- package/dist/collection/assets/icons/hero-email.svg +8 -30
- package/dist/collection/assets/icons/hero-lock.svg +4 -34
- package/dist/collection/assets/icons/hero-passkey.svg +9 -17
- package/dist/collection/assets/icons/hero-phone.svg +4 -15
- package/dist/collection/assets/icons/hero-wallet.svg +5 -44
- package/dist/collection/assets/icons/index.js +4 -2
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/assets/icons/more-login-options.svg +10 -10
- package/dist/collection/assets/icons/plus-circle.svg +5 -0
- package/dist/collection/assets/icons/wallet.svg +5 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.css +17 -0
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +102 -0
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +29 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +37 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +1 -0
- package/dist/collection/components/cpsl-button/cpsl-button.css +3 -0
- package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
- package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
- package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-icon/cpsl-icon.css +14 -0
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -3
- package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.css +9 -4
- package/dist/collection/components/cpsl-input/cpsl-input.js +8 -6
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.css +56 -4
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +341 -24
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +30 -13
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.css +3 -3
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +3 -3
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +19 -10
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +54 -7
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js.map +1 -1
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +2 -2
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +17 -16
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +2 -2
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +3 -0
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/constants.js +6 -0
- package/dist/collection/constants.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/interface.js.map +1 -1
- package/dist/collection/utils/theme/generateBorderRadii.js +56 -0
- package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -0
- package/dist/collection/utils/theme/generateFont.js +7 -0
- package/dist/collection/utils/theme/generateFont.js.map +1 -0
- package/dist/collection/utils/theme/generatePalette.js +46 -0
- package/dist/collection/utils/theme/generatePalette.js.map +1 -0
- package/dist/collection/utils/theme/generateTheme.js +12 -0
- package/dist/collection/utils/theme/generateTheme.js.map +1 -0
- package/dist/collection/utils/theme/utils.js +21 -0
- package/dist/collection/utils/theme/utils.js.map +1 -0
- package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
- package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
- package/dist/esm/capsule.js +3 -3
- package/dist/esm/constants-7b49abd5.js +9 -0
- package/dist/esm/constants-7b49abd5.js.map +1 -0
- package/dist/esm/cpsl-alert_17.entry.js +3782 -558
- package/dist/esm/cpsl-alert_17.entry.js.map +1 -1
- package/dist/esm/cpsl-animation.entry.js +20125 -0
- package/dist/esm/cpsl-animation.entry.js.map +1 -0
- package/dist/esm/cpsl-col.entry.js +2 -2
- package/dist/esm/cpsl-grid.entry.js +3 -3
- package/dist/esm/cpsl-info-box.entry.js +3 -3
- package/dist/esm/cpsl-info-box.entry.js.map +1 -1
- package/dist/esm/cpsl-row.entry.js +2 -2
- package/dist/esm/{index-7c2f5cb9.js → index-f00e090c.js} +22 -1
- package/dist/esm/index-f00e090c.js.map +1 -0
- package/dist/esm/index.js +335 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/assets/icons/index.d.ts +3 -1
- package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +9 -0
- package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +26 -5
- package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +2 -2
- package/dist/types/components/cpsl-slide-button/cpsl-slide-button.d.ts +1 -0
- package/dist/types/components.d.ts +125 -13
- package/dist/types/constants.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interface.d.ts +122 -0
- package/dist/types/utils/theme/generateBorderRadii.d.ts +2 -0
- package/dist/types/utils/theme/generateFont.d.ts +2 -0
- package/dist/types/utils/theme/generatePalette.d.ts +7 -0
- package/dist/types/utils/theme/generateTheme.d.ts +3 -0
- package/dist/types/utils/theme/utils.d.ts +5 -0
- package/package.json +5 -3
- package/dist/capsule/p-1dc07cd7.entry.js +0 -2
- package/dist/capsule/p-5c020abe.entry.js +0 -2
- package/dist/capsule/p-9647dd63.js +0 -3
- package/dist/capsule/p-9647dd63.js.map +0 -1
- package/dist/capsule/p-bbbfec72.entry.js +0 -20
- package/dist/capsule/p-bbbfec72.entry.js.map +0 -1
- package/dist/cjs/index-2a026742.js.map +0 -1
- package/dist/collection/assets/icons/more-login-options-dark.svg +0 -13
- package/dist/esm/index-7c2f5cb9.js.map +0 -1
- /package/dist/capsule/{p-11048392.entry.js.map → p-91412151.entry.js.map} +0 -0
- /package/dist/capsule/{p-62e7869a.entry.js.map → p-a95ec4df.entry.js.map} +0 -0
- /package/dist/capsule/{p-5c020abe.entry.js.map → p-f604b591.entry.js.map} +0 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -1,4 +1,342 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const constants = require('./constants-4bb85cc5.js');
|
6
|
+
|
7
|
+
const generateBorderRadii = ({ borderRadius }) => {
|
8
|
+
if (!Boolean(borderRadius)) {
|
9
|
+
return;
|
10
|
+
}
|
11
|
+
let smallRadius = 8;
|
12
|
+
let mediumRadius = 16;
|
13
|
+
let largeRadius = 24;
|
14
|
+
const fullRadius = 1000;
|
15
|
+
let isFull = false;
|
16
|
+
let isNone = false;
|
17
|
+
switch (borderRadius) {
|
18
|
+
case 'none': {
|
19
|
+
isNone = true;
|
20
|
+
smallRadius = 0;
|
21
|
+
mediumRadius = 0;
|
22
|
+
largeRadius = 0;
|
23
|
+
break;
|
24
|
+
}
|
25
|
+
case 'xs': {
|
26
|
+
smallRadius = 4;
|
27
|
+
mediumRadius = 12;
|
28
|
+
largeRadius = 20;
|
29
|
+
break;
|
30
|
+
}
|
31
|
+
case 'md': {
|
32
|
+
smallRadius = 12;
|
33
|
+
mediumRadius = 20;
|
34
|
+
largeRadius = 28;
|
35
|
+
break;
|
36
|
+
}
|
37
|
+
case 'lg': {
|
38
|
+
smallRadius = 16;
|
39
|
+
mediumRadius = 24;
|
40
|
+
largeRadius = 32;
|
41
|
+
break;
|
42
|
+
}
|
43
|
+
case 'full': {
|
44
|
+
smallRadius = 16;
|
45
|
+
mediumRadius = 24;
|
46
|
+
largeRadius = 32;
|
47
|
+
isFull = true;
|
48
|
+
break;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);
|
52
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);
|
53
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);
|
54
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);
|
55
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);
|
56
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);
|
57
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);
|
58
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);
|
59
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);
|
60
|
+
document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);
|
61
|
+
};
|
62
|
+
|
63
|
+
const generateFont = ({ font }) => {
|
64
|
+
if (!Boolean(font)) {
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
document.documentElement.style.setProperty('--cpsl-default-font', font);
|
68
|
+
};
|
69
|
+
|
70
|
+
/**
|
71
|
+
* A simple guard function:
|
72
|
+
*
|
73
|
+
* ```js
|
74
|
+
* Math.min(Math.max(low, value), high)
|
75
|
+
* ```
|
76
|
+
*/
|
77
|
+
function guard(low, high, value) {
|
78
|
+
return Math.min(Math.max(low, value), high);
|
79
|
+
}
|
80
|
+
|
81
|
+
class ColorError extends Error {
|
82
|
+
constructor(color) {
|
83
|
+
super(`Failed to parse color: "${color}"`);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
var ColorError$1 = ColorError;
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Parses a color into red, gree, blue, alpha parts
|
90
|
+
*
|
91
|
+
* @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color
|
92
|
+
*/
|
93
|
+
function parseToRgba(color) {
|
94
|
+
if (typeof color !== 'string') throw new ColorError$1(color);
|
95
|
+
if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];
|
96
|
+
let normalizedColor = color.trim();
|
97
|
+
normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;
|
98
|
+
const reducedHexMatch = reducedHexRegex.exec(normalizedColor);
|
99
|
+
if (reducedHexMatch) {
|
100
|
+
const arr = Array.from(reducedHexMatch).slice(1);
|
101
|
+
return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];
|
102
|
+
}
|
103
|
+
const hexMatch = hexRegex.exec(normalizedColor);
|
104
|
+
if (hexMatch) {
|
105
|
+
const arr = Array.from(hexMatch).slice(1);
|
106
|
+
return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];
|
107
|
+
}
|
108
|
+
const rgbaMatch = rgbaRegex.exec(normalizedColor);
|
109
|
+
if (rgbaMatch) {
|
110
|
+
const arr = Array.from(rgbaMatch).slice(1);
|
111
|
+
return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];
|
112
|
+
}
|
113
|
+
const hslaMatch = hslaRegex.exec(normalizedColor);
|
114
|
+
if (hslaMatch) {
|
115
|
+
const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
|
116
|
+
if (guard(0, 100, s) !== s) throw new ColorError$1(color);
|
117
|
+
if (guard(0, 100, l) !== l) throw new ColorError$1(color);
|
118
|
+
return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];
|
119
|
+
}
|
120
|
+
throw new ColorError$1(color);
|
121
|
+
}
|
122
|
+
function hash(str) {
|
123
|
+
let hash = 5381;
|
124
|
+
let i = str.length;
|
125
|
+
while (i) {
|
126
|
+
hash = hash * 33 ^ str.charCodeAt(--i);
|
127
|
+
}
|
128
|
+
|
129
|
+
/* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
|
130
|
+
* integers. Since we want the results to be always positive, convert the
|
131
|
+
* signed int to an unsigned by doing an unsigned bitshift. */
|
132
|
+
return (hash >>> 0) % 2341;
|
133
|
+
}
|
134
|
+
const colorToInt = x => parseInt(x.replace(/_/g, ''), 36);
|
135
|
+
const compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {
|
136
|
+
const key = colorToInt(next.substring(0, 3));
|
137
|
+
const hex = colorToInt(next.substring(3)).toString(16);
|
138
|
+
|
139
|
+
// NOTE: padStart could be used here but it breaks Node 6 compat
|
140
|
+
// https://github.com/ricokahler/color2k/issues/351
|
141
|
+
let prefix = '';
|
142
|
+
for (let i = 0; i < 6 - hex.length; i++) {
|
143
|
+
prefix += '0';
|
144
|
+
}
|
145
|
+
acc[key] = `${prefix}${hex}`;
|
146
|
+
return acc;
|
147
|
+
}, {});
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
151
|
+
*/
|
152
|
+
function nameToHex(color) {
|
153
|
+
const normalizedColorName = color.toLowerCase().trim();
|
154
|
+
const result = compressedColorMap[hash(normalizedColorName)];
|
155
|
+
if (!result) throw new ColorError$1(color);
|
156
|
+
return `#${result}`;
|
157
|
+
}
|
158
|
+
const r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');
|
159
|
+
const reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');
|
160
|
+
const hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');
|
161
|
+
const rgbaRegex = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(',\\s*(\\d+)\\s*', 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, 'i');
|
162
|
+
const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
|
163
|
+
const namedColorRegex = /^[a-z]+$/i;
|
164
|
+
const roundColor = color => {
|
165
|
+
return Math.round(color * 255);
|
166
|
+
};
|
167
|
+
const hslToRgb = (hue, saturation, lightness) => {
|
168
|
+
let l = lightness / 100;
|
169
|
+
if (saturation === 0) {
|
170
|
+
// achromatic
|
171
|
+
return [l, l, l].map(roundColor);
|
172
|
+
}
|
173
|
+
|
174
|
+
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
175
|
+
const huePrime = (hue % 360 + 360) % 360 / 60;
|
176
|
+
const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);
|
177
|
+
const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
178
|
+
let red = 0;
|
179
|
+
let green = 0;
|
180
|
+
let blue = 0;
|
181
|
+
if (huePrime >= 0 && huePrime < 1) {
|
182
|
+
red = chroma;
|
183
|
+
green = secondComponent;
|
184
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
185
|
+
red = secondComponent;
|
186
|
+
green = chroma;
|
187
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
188
|
+
green = chroma;
|
189
|
+
blue = secondComponent;
|
190
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
191
|
+
green = secondComponent;
|
192
|
+
blue = chroma;
|
193
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
194
|
+
red = secondComponent;
|
195
|
+
blue = chroma;
|
196
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
197
|
+
red = chroma;
|
198
|
+
blue = secondComponent;
|
199
|
+
}
|
200
|
+
const lightnessModification = l - chroma / 2;
|
201
|
+
const finalRed = red + lightnessModification;
|
202
|
+
const finalGreen = green + lightnessModification;
|
203
|
+
const finalBlue = blue + lightnessModification;
|
204
|
+
return [finalRed, finalGreen, finalBlue].map(roundColor);
|
205
|
+
};
|
206
|
+
|
207
|
+
// taken from:
|
208
|
+
// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js
|
209
|
+
|
210
|
+
/**
|
211
|
+
* Returns a number (float) representing the luminance of a color.
|
212
|
+
*/
|
213
|
+
function getLuminance(color) {
|
214
|
+
if (color === 'transparent') return 0;
|
215
|
+
function f(x) {
|
216
|
+
const channel = x / 255;
|
217
|
+
return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
|
218
|
+
}
|
219
|
+
const [r, g, b] = parseToRgba(color);
|
220
|
+
return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
|
221
|
+
}
|
222
|
+
|
223
|
+
/**
|
224
|
+
* Takes in rgba parts and returns an rgba string
|
225
|
+
*
|
226
|
+
* @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive
|
227
|
+
* @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive
|
228
|
+
* @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive
|
229
|
+
* @param alpha Percentage of opacity, given as a decimal between 0 and 1
|
230
|
+
*/
|
231
|
+
function rgba(red, green, blue, alpha) {
|
232
|
+
return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;
|
233
|
+
}
|
234
|
+
|
235
|
+
/**
|
236
|
+
* Mixes two colors together. Taken from sass's implementation.
|
237
|
+
*/
|
238
|
+
function mix(color1, color2, weight) {
|
239
|
+
const normalize = (n, index) =>
|
240
|
+
// 3rd index is alpha channel which is already normalized
|
241
|
+
index === 3 ? n : n / 255;
|
242
|
+
const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);
|
243
|
+
const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);
|
244
|
+
|
245
|
+
// The formula is copied from the original Sass implementation:
|
246
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
247
|
+
const alphaDelta = a2 - a1;
|
248
|
+
const normalizedWeight = weight * 2 - 1;
|
249
|
+
const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);
|
250
|
+
const weight2 = (combinedWeight + 1) / 2;
|
251
|
+
const weight1 = 1 - weight2;
|
252
|
+
const r = (r1 * weight1 + r2 * weight2) * 255;
|
253
|
+
const g = (g1 * weight1 + g2 * weight2) * 255;
|
254
|
+
const b = (b1 * weight1 + b2 * weight2) * 255;
|
255
|
+
const a = a2 * weight + a1 * (1 - weight);
|
256
|
+
return rgba(r, g, b, a);
|
257
|
+
}
|
258
|
+
|
259
|
+
/**
|
260
|
+
* An alternative function to `readableColor`. Returns whether or not the
|
261
|
+
* readable color (i.e. the color to be place on top the input color) should be
|
262
|
+
* black.
|
263
|
+
*/
|
264
|
+
function readableColorIsBlack(color) {
|
265
|
+
return getLuminance(color) > 0.179;
|
266
|
+
}
|
267
|
+
|
268
|
+
const isColor = strColor => {
|
269
|
+
const s = new Option().style;
|
270
|
+
s.color = strColor;
|
271
|
+
return s.color !== '';
|
272
|
+
};
|
273
|
+
const toKebabCase = (pascal) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();
|
274
|
+
const buildVars = (prev, obj) => {
|
275
|
+
let resp = {};
|
276
|
+
for (const k in obj) {
|
277
|
+
const name = `${prev}-${toKebabCase(k)}`;
|
278
|
+
if (typeof obj[k] === 'object' && obj[k] !== null) {
|
279
|
+
resp = Object.assign(Object.assign({}, resp), buildVars(name, obj[k]));
|
280
|
+
}
|
281
|
+
else {
|
282
|
+
resp[name] = obj[k];
|
283
|
+
}
|
284
|
+
}
|
285
|
+
return resp;
|
286
|
+
};
|
287
|
+
const getCssColors = (customPalette) => buildVars('--cpsl-color', customPalette);
|
288
|
+
|
289
|
+
const MIXES = [0, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];
|
290
|
+
const generatePalette = ({ foregroundColor, backgroundColor, customPalette }) => {
|
291
|
+
if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {
|
292
|
+
foregroundColor = constants.DEFAULT_THEME.foregroundColor;
|
293
|
+
}
|
294
|
+
if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {
|
295
|
+
backgroundColor = constants.DEFAULT_THEME.backgroundColor;
|
296
|
+
}
|
297
|
+
const isDarkBackground = !readableColorIsBlack(backgroundColor);
|
298
|
+
const palette = {
|
299
|
+
foregroundColors: [],
|
300
|
+
backgroundColors: [],
|
301
|
+
isDarkBackground,
|
302
|
+
};
|
303
|
+
const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';
|
304
|
+
const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';
|
305
|
+
MIXES.forEach(value => {
|
306
|
+
palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));
|
307
|
+
palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));
|
308
|
+
});
|
309
|
+
document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);
|
310
|
+
document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[1]);
|
311
|
+
document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[2]);
|
312
|
+
document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[3]);
|
313
|
+
document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[4]);
|
314
|
+
document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[5]);
|
315
|
+
document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[6]);
|
316
|
+
document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[7]);
|
317
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);
|
318
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[1]);
|
319
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[2]);
|
320
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[3]);
|
321
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[4]);
|
322
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[5]);
|
323
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[6]);
|
324
|
+
document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[7]);
|
325
|
+
if (Boolean(customPalette)) {
|
326
|
+
const cssColorVars = getCssColors(customPalette);
|
327
|
+
Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));
|
328
|
+
}
|
329
|
+
return palette;
|
330
|
+
};
|
331
|
+
|
332
|
+
const generateTheme = ({ foregroundColor = constants.DEFAULT_THEME.foregroundColor, backgroundColor = constants.DEFAULT_THEME.backgroundColor, font, customPalette, borderRadius }) => {
|
333
|
+
const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });
|
334
|
+
generateFont({ font });
|
335
|
+
generateBorderRadii({ borderRadius });
|
336
|
+
return palette.isDarkBackground;
|
337
|
+
};
|
338
|
+
const generateTheme$1 = generateTheme;
|
339
|
+
|
340
|
+
exports.generateTheme = generateTheme$1;
|
3
341
|
|
4
342
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"index.cjs.js","mappings":";;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
1
|
+
{"file":"index.cjs.js","mappings":";;;;;;AAEO,MAAM,mBAAmB,GAAG,CAAC,EAAE,YAAY,EAA+B;IAC/E,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC1B,OAAO;KACR;IAED,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,MAAM,UAAU,GAAG,IAAI,CAAC;IACxB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,QAAQ,YAAY;QAClB,KAAK,MAAM,EAAE;YACX,MAAM,GAAG,IAAI,CAAC;YACd,WAAW,GAAG,CAAC,CAAC;YAChB,YAAY,GAAG,CAAC,CAAC;YACjB,WAAW,GAAG,CAAC,CAAC;YAChB,MAAM;SACP;QACD,KAAK,IAAI,EAAE;YACT,WAAW,GAAG,CAAC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AAC,CAAC,CAAC,CAAC;IAEtG,IAAI,OAAO,CAAC,aAAa,CAAC,EAAE;QAC1B,MAAM,YAAY,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACpG;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;;ACrDD,MAAM,aAAa,GAAG,CAAC,EAAE,eAAe,GAAGA,uBAAa,CAAC,eAAe,EAAE,eAAe,GAAGA,uBAAa,CAAC,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAS;IACnK,MAAM,OAAO,GAAG,eAAe,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC,CAAC;IAErF,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvB,mBAAmB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC,gBAAgB,CAAC;AAClC,CAAC,CAAC;AAEF,wBAAe,aAAa;;;;","names":["DEFAULT_THEME"],"sources":["src/utils/theme/generateBorderRadii.ts","src/utils/theme/generateFont.ts","../node_modules/color2k/dist/index.module.es.js","src/utils/theme/utils.ts","src/utils/theme/generatePalette.ts","src/utils/theme/generateTheme.ts"],"sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateBorderRadii = ({ borderRadius }: Pick<Theme, 'borderRadius'>) => {\n if (!Boolean(borderRadius)) {\n return;\n }\n\n let smallRadius = 8;\n let mediumRadius = 16;\n let largeRadius = 24;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n smallRadius = 0;\n mediumRadius = 0;\n largeRadius = 0;\n break;\n }\n case 'xs': {\n smallRadius = 4;\n mediumRadius = 12;\n largeRadius = 20;\n break;\n }\n case 'md': {\n smallRadius = 12;\n mediumRadius = 20;\n largeRadius = 28;\n break;\n }\n case 'lg': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n break;\n }\n case 'full': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);\n};\n","import { Theme } from '../../interface';\n\nexport const generateFont = ({ font }: Pick<Theme, 'font'>) => {\n if (!Boolean(font)) {\n return;\n }\n\n document.documentElement.style.setProperty('--cpsl-default-font', font);\n};\n","/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}\n\nclass ColorError extends Error {\n constructor(color) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\nvar ColorError$1 = ColorError;\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color) {\n if (typeof color !== 'string') throw new ColorError$1(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];\n }\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];\n }\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];\n }\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError$1(color);\n if (guard(0, 100, l) !== l) throw new ColorError$1(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];\n }\n throw new ColorError$1(color);\n}\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i) {\n hash = hash * 33 ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\nconst colorToInt = x => parseInt(x.replace(/_/g, ''), 36);\nconst compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n acc[key] = `${prefix}${hex}`;\n return acc;\n}, {});\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color) {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError$1(color);\n return `#${result}`;\n}\nconst r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(`^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(',\\\\s*(\\\\d+)\\\\s*', 2)}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`, 'i');\nconst hslaRegex = /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\nconst roundColor = color => {\n return Math.round(color * 255);\n};\nconst hslToRgb = (hue, saturation, lightness) => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (hue % 360 + 360) % 360 / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n let red = 0;\n let green = 0;\n let blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n return [finalRed, finalGreen, finalBlue].map(roundColor);\n};\n\n// taken from:\n// https://github.com/styled-components/polished/blob/a23a6a2bb26802b3d922d9c3b67bac3f3a54a310/src/internalHelpers/_rgbToHsl.js\n\n/**\n * Parses a color in hue, saturation, lightness, and the alpha channel.\n *\n * Hue is a number between 0 and 360, saturation, lightness, and alpha are\n * decimal percentages between 0 and 1\n */\nfunction parseToHsla(color) {\n const [red, green, blue, alpha] = parseToRgba(color).map((value, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? value : value / 255);\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const lightness = (max + min) / 2;\n\n // achromatic\n if (max === min) return [0, 0, lightness, alpha];\n const delta = max - min;\n const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n const hue = 60 * (red === max ? (green - blue) / delta + (green < blue ? 6 : 0) : green === max ? (blue - red) / delta + 2 : (red - green) / delta + 4);\n return [hue, saturation, lightness, alpha];\n}\n\n/**\n * Takes in hsla parts and constructs an hsla string\n *\n * @param hue The color circle (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue\n * @param saturation Percentage of saturation, given as a decimal between 0 and 1\n * @param lightness Percentage of lightness, given as a decimal between 0 and 1\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction hsla(hue, saturation, lightness, alpha) {\n return `hsla(${(hue % 360).toFixed()}, ${guard(0, 100, saturation * 100).toFixed()}%, ${guard(0, 100, lightness * 100).toFixed()}%, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Adjusts the current hue of the color by the given degrees. Wraps around when\n * over 360.\n *\n * @param color input color\n * @param degrees degrees to adjust the input color, accepts degree integers\n * (0 - 360) and wraps around on overflow\n */\nfunction adjustHue(color, degrees) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h + degrees, s, l, a);\n}\n\n/**\n * Darkens using lightness. This is equivalent to subtracting the lightness\n * from the L in HSL.\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction darken(color, amount) {\n const [hue, saturation, lightness, alpha] = parseToHsla(color);\n return hsla(hue, saturation, lightness - amount, alpha);\n}\n\n/**\n * Desaturates the input color by the given amount via subtracting from the `s`\n * in `hsla`.\n *\n * @param amount The amount to desaturate, given as a decimal between 0 and 1\n */\nfunction desaturate(color, amount) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h, s - amount, l, a);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js\n\n/**\n * Returns a number (float) representing the luminance of a color.\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n function f(x) {\n const channel = x / 255;\n return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }\n const [r, g, b] = parseToRgba(color);\n return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getContrast.js\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n */\nfunction getContrast(color1, color2) {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05);\n}\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red, green, blue, alpha) {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Mixes two colors together. Taken from sass's implementation.\n */\nfunction mix(color1, color2, weight) {\n const normalize = (n, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? n : n / 255;\n const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);\n const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n const alphaDelta = a2 - a1;\n const normalizedWeight = weight * 2 - 1;\n const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);\n const weight2 = (combinedWeight + 1) / 2;\n const weight1 = 1 - weight2;\n const r = (r1 * weight1 + r2 * weight2) * 255;\n const g = (g1 * weight1 + g2 * weight2) * 255;\n const b = (b1 * weight1 + b2 * weight2) * 255;\n const a = a2 * weight + a1 * (1 - weight);\n return rgba(r, g, b, a);\n}\n\n/**\n * Given a series colors, this function will return a `scale(x)` function that\n * accepts a percentage as a decimal between 0 and 1 and returns the color at\n * that percentage in the scale.\n *\n * ```js\n * const scale = getScale('red', 'yellow', 'green');\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(0.5)); // rgba(255, 255, 0, 1)\n * console.log(scale(1)); // rgba(0, 128, 0, 1)\n * ```\n *\n * If you'd like to limit the domain and range like chroma-js, we recommend\n * wrapping scale again.\n *\n * ```js\n * const _scale = getScale('red', 'yellow', 'green');\n * const scale = x => _scale(x / 100);\n *\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(50)); // rgba(255, 255, 0, 1)\n * console.log(scale(100)); // rgba(0, 128, 0, 1)\n * ```\n */\nfunction getScale(...colors) {\n return n => {\n const lastIndex = colors.length - 1;\n const lowIndex = guard(0, lastIndex, Math.floor(n * lastIndex));\n const highIndex = guard(0, lastIndex, Math.ceil(n * lastIndex));\n const color1 = colors[lowIndex];\n const color2 = colors[highIndex];\n const unit = 1 / lastIndex;\n const weight = (n - unit * lowIndex) / unit;\n return mix(color1, color2, weight);\n };\n}\n\nconst guidelines = {\n decorative: 1.5,\n readable: 3,\n aa: 4.5,\n aaa: 7\n};\n\n/**\n * Returns whether or not a color has bad contrast against a background\n * according to a given standard.\n */\nfunction hasBadContrast(color, standard = 'aa', background = '#fff') {\n return getContrast(color, background) < guidelines[standard];\n}\n\n/**\n * Lightens a color by a given amount. This is equivalent to\n * `darken(color, -amount)`\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction lighten(color, amount) {\n return darken(color, -amount);\n}\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color, amount) {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\n/**\n * Takes a color and un-transparentizes it. Equivalent to\n * `transparentize(color, -amount)`\n *\n * @param amount The amount to increase the opacity by, given as a decimal between 0 and 1\n */\nfunction opacify(color, amount) {\n return transparentize(color, -amount);\n}\n\n/**\n * An alternative function to `readableColor`. Returns whether or not the \n * readable color (i.e. the color to be place on top the input color) should be\n * black.\n */\nfunction readableColorIsBlack(color) {\n return getLuminance(color) > 0.179;\n}\n\n/**\n * Returns black or white for best contrast depending on the luminosity of the\n * given color.\n */\nfunction readableColor(color) {\n return readableColorIsBlack(color) ? '#000' : '#fff';\n}\n\n/**\n * Saturates a color by converting it to `hsl` and increasing the saturation\n * amount. Equivalent to `desaturate(color, -amount)`\n * \n * @param color Input color\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction saturate(color, amount) {\n return desaturate(color, -amount);\n}\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color) {\n const [r, g, b, a] = parseToRgba(color);\n let hex = x => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\n/**\n * Takes in any color and returns it as an rgba string.\n */\nfunction toRgba(color) {\n return rgba(...parseToRgba(color));\n}\n\n/**\n * Takes in any color and returns it as an hsla string.\n */\nfunction toHsla(color) {\n return hsla(...parseToHsla(color));\n}\n\nexport { ColorError$1 as ColorError, adjustHue, darken, desaturate, getContrast, getLuminance, getScale, guard, hasBadContrast, hsla, lighten, mix, opacify, parseToHsla, parseToRgba, readableColor, readableColorIsBlack, rgba, saturate, toHex, toHsla, toRgba, transparentize };\n//# sourceMappingURL=index.module.es.js.map\n","import { CustomPalette } from '../../interface';\n\nexport const isColor = strColor => {\n const s = new Option().style;\n s.color = strColor;\n return s.color !== '';\n};\n\nconst toKebabCase = (pascal: string) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();\n\n// This function handles arrays and objects\nconst buildVars = (prev: string, obj: any): { [k: string]: string } => {\n let resp = {};\n\n for (const k in obj) {\n const name = `${prev}-${toKebabCase(k)}`;\n if (typeof obj[k] === 'object' && obj[k] !== null) {\n resp = { ...resp, ...buildVars(name, obj[k]) };\n } else {\n resp[name] = obj[k];\n }\n }\n\n return resp;\n};\n\nexport const getCssColors = (customPalette: CustomPalette): { [k: string]: string } => buildVars('--cpsl-color', customPalette);\n","import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor } from './utils';\nimport { DEFAULT_THEME } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n isDarkBackground: boolean;\n};\n\nconst MIXES = [0, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[7]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[7]);\n\n if (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\n};\n","import { DEFAULT_THEME } from '../../constants';\nimport { Theme } from '../../interface';\nimport { generateBorderRadii } from './generateBorderRadii';\nimport { generateFont } from './generateFont';\nimport { generatePalette } from './generatePalette';\n\n/**\n * Generates css theme variables.\n * @returns @boolean Whether background is dark or not.\n */\nconst generateTheme = ({ foregroundColor = DEFAULT_THEME.foregroundColor, backgroundColor = DEFAULT_THEME.backgroundColor, font, customPalette, borderRadius }: Theme): boolean => {\n const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });\n\n generateFont({ font });\n\n generateBorderRadii({ borderRadius });\n\n return palette.isDarkBackground;\n};\n\nexport default generateTheme;\n"],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-3fccb5b4.js');
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
7
7
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
10
10
|
await appGlobals.globalScripts();
|
11
|
-
return index.bootstrapLazy([["cpsl-col.cjs",[[1,"cpsl-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["cpsl-grid.cjs",[[1,"cpsl-grid",{"fixed":[4]}]]],["cpsl-info-box.cjs",[[1,"cpsl-info-box"]]],["cpsl-row.cjs",[[1,"cpsl-row"]]],["cpsl-alert_17.cjs",[[1,"cpsl-code-input",{"code":[1025],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"length":[2],"type":[1]}],[1,"cpsl-input",{"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"noAutoDisable":[4,"no-auto-disable"],"autofocus":[4],"disabled":[4],"enterkeyhint":[1],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"inputmode":[1],"label":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"startIconSrc":[1,"start-icon-src"],"startIcon":[1,"start-icon"],"step":[1],"type":[1],"value":[1025],"hasFocus":[32]},null,{"disabled":["handleDisable"]}],[1,"cpsl-
|
11
|
+
return index.bootstrapLazy([["cpsl-animation.cjs",[[1,"cpsl-animation",{"src":[1],"replayAnimation":[64]}]]],["cpsl-col.cjs",[[1,"cpsl-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["cpsl-grid.cjs",[[1,"cpsl-grid",{"fixed":[4]}]]],["cpsl-info-box.cjs",[[1,"cpsl-info-box"]]],["cpsl-row.cjs",[[1,"cpsl-row"]]],["cpsl-alert_17.cjs",[[1,"cpsl-code-input",{"code":[1025],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"length":[2],"type":[1]}],[1,"cpsl-input",{"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"noAutoDisable":[4,"no-auto-disable"],"autofocus":[4],"disabled":[4],"enterkeyhint":[1],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"inputmode":[1],"label":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"startIconSrc":[1,"start-icon-src"],"startIcon":[1,"start-icon"],"step":[1],"type":[1],"value":[1025],"hasFocus":[32]},null,{"disabled":["handleDisable"]}],[1,"cpsl-modal",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"footerExpanded":[4,"footer-expanded"],"footerTransitionDuration":[2,"footer-transition-duration"],"noOverlay":[4,"no-overlay"],"open":[4],"hasFooter":[32]},null,{"footerExpanded":["toggleHeight"],"open":["toggleModal"]}],[1,"cpsl-slide-button",{"disabled":[4],"endIcon":[1,"end-icon"],"endText":[1,"end-text"],"startIcon":[1,"start-icon"],"startText":[1,"start-text"]}],[1,"cpsl-tile-button",{"src":[1],"icon":[1]}],[1,"cpsl-alert",{"type":[1],"icon":[1]}],[1,"cpsl-button",{"disabled":[516],"variant":[513]}],[1,"cpsl-divider"],[1,"cpsl-pill",{"text":[1]}],[1,"cpsl-progress-indicator",{"totalSteps":[2,"total-steps"],"step":[2]}],[1,"cpsl-qr-code",{"url":[1],"imageSrc":[1,"image-src"],"size":[2]}],[1,"cpsl-spinner",{"size":[2],"speed":[2]}],[1,"cpsl-tab",{"selected":[4],"tab":[1]},[[8,"cpslTabsChanged","onTabsChanged"],[8,"cpslTabsInit","onTabsInit"]]],[1,"cpsl-tabs",{"fullWidth":[4,"full-width"],"selectedTab":[1,"selected-tab"],"selectedTabRect":[32],"loaded":[32]},null,{"fullWidth":["updateSlider"],"selectedTab":["updateTab"]}],[1,"cpsl-text"],[1,"cpsl-overlay",{"open":[4],"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"]},null,{"open":["toggleHeight"]}],[1,"cpsl-icon",{"src":[1],"icon":[1]}]]]], options);
|
12
12
|
};
|
13
13
|
|
14
14
|
exports.setNonce = index.setNonce;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<svg width="136" height="143" viewBox="0 0 136 143" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<circle cx="68" cy="75" r="29.5" stroke="#1F1F1F"/>
|
3
|
+
<circle cx="68" cy="75" r="49.5" stroke="#1F1F1F"/>
|
4
|
+
<circle cx="68" cy="75" r="67.5" stroke="#1F1F1F"/>
|
5
|
+
<path d="M89.02 57.6576C88.3792 59.8805 85.9296 60.9815 83.7947 60.096C81.8701 59.2979 80.9057 57.1608 81.3783 55.1295C81.6785 53.8391 81.8947 52.61 82.0272 51.4422C82.2878 49.2178 82.285 47.2405 82.0188 45.5103C81.7527 43.7801 81.2256 42.3467 80.4378 41.2101C79.6744 40.0512 78.6773 39.2165 77.4463 38.706C75.2591 37.7989 72.8404 38.1566 70.1901 39.7786C67.5512 41.3732 64.8329 44.1982 62.0349 48.2537C59.2486 52.2815 56.534 57.4892 53.8914 63.8768C51.203 70.3748 49.4158 76.0481 48.53 80.8965C47.6687 85.7227 47.6071 89.6171 48.3453 92.5798C49.1081 95.5201 50.5765 97.4412 52.7504 98.3427C53.9552 98.8423 55.2188 98.9776 56.541 98.7484C57.8878 98.497 59.2548 97.8816 60.6421 96.9019C62.0424 95.9275 63.4311 94.5922 64.8081 92.8955C65.5296 92.0178 66.2324 91.0453 66.9167 89.9778C68.0472 88.214 70.2569 87.3998 72.1817 88.2236C74.3002 89.1303 75.232 91.6409 74.0917 93.6454C72.6908 96.1079 71.1918 98.3985 69.5948 100.517C67.2268 103.682 64.749 106.315 62.161 108.417C59.5846 110.491 56.9995 111.881 54.406 112.587C51.8238 113.266 49.3344 113.108 46.9379 112.114C43.4019 110.648 40.9608 107.61 39.6144 103.003C38.268 98.3948 38.1459 92.4966 39.2481 85.3082C40.3502 78.1198 42.7889 69.9631 46.5641 60.838C50.3508 51.6853 54.3936 44.1938 58.6929 38.3637C63.0036 32.5059 67.2621 28.4245 71.4685 26.1194C75.6749 23.8143 79.5329 23.3895 83.0427 24.845C85.2821 25.7737 87.0898 27.3009 88.4659 29.4266C89.8418 31.5522 90.7509 34.2132 91.193 37.4094C91.6465 40.5779 91.5914 44.2158 91.0275 48.323C90.6426 51.2389 89.9734 54.3504 89.02 57.6576Z" fill="#FAFAFA"/>
|
6
|
+
<path d="M74.8659 71.539C75.8469 69.3089 78.5617 68.2499 80.9296 69.1737L81.1568 69.2623C83.5248 70.186 84.6493 72.7426 83.6685 74.9727C82.6876 77.2028 79.9728 78.2618 77.6048 77.338L77.3776 77.2494C75.0097 76.3257 73.8851 73.769 74.8659 71.539Z" fill="#FAFAFA"/>
|
7
|
+
<rect x="12.5" y="48.5" width="19" height="19" rx="3.5" fill="black"/>
|
8
|
+
<rect x="12.5" y="48.5" width="19" height="19" rx="3.5" stroke="#1F1F1F"/>
|
9
|
+
<path d="M20.0125 52.0719C20.8012 51.7495 21.6464 51.5835 22.5 51.5835V54.7918C22.0732 54.7918 21.6506 54.8748 21.2563 55.0361C20.862 55.1973 20.5037 55.4336 20.2019 55.7315C19.9001 56.0294 19.6607 56.3831 19.4974 56.7724C19.3341 57.1616 19.25 57.5788 19.25 58.0002H16C16 57.1575 16.1681 56.3231 16.4948 55.5446C16.8215 54.7661 17.3002 54.0588 17.9038 53.4629C18.5074 52.867 19.2239 52.3944 20.0125 52.0719Z" fill="#155EEF"/>
|
10
|
+
<path d="M16 58C16 58.8426 16.1681 59.6771 16.4948 60.4556C16.8215 61.2341 17.3002 61.9414 17.9038 62.5373C18.5074 63.1331 19.2239 63.6057 20.0125 63.9282C20.8012 64.2507 21.6464 64.4167 22.5 64.4167C23.3536 64.4167 24.1988 64.2507 24.9875 63.9282C25.7761 63.6057 26.4926 63.1331 27.0962 62.5373C27.6998 61.9414 28.1785 61.2341 28.5052 60.4556C28.8319 59.6771 29 58.8426 29 58H25.75C25.75 58.4213 25.6659 58.8385 25.5026 59.2278C25.3393 59.617 25.0999 59.9707 24.7981 60.2686C24.4963 60.5666 24.138 60.8029 23.7437 60.9641C23.3494 61.1254 22.9268 61.2083 22.5 61.2083C22.0732 61.2083 21.6506 61.1254 21.2563 60.9641C20.862 60.8029 20.5037 60.5666 20.2019 60.2686C19.9001 59.9707 19.6607 59.617 19.4974 59.2278C19.3341 58.8385 19.25 58.4213 19.25 58H16Z" fill="#84ADFF"/>
|
11
|
+
<path d="M22.5001 55.9585C21.3578 55.9585 20.4319 56.8726 20.4319 58.0002H24.5682C24.5682 56.8726 23.6423 55.9585 22.5001 55.9585Z" fill="#84ADFF"/>
|
12
|
+
<path d="M22.5001 60.042C21.3578 60.042 20.4319 59.1279 20.4319 58.0003H24.5682C24.5682 59.1279 23.6423 60.042 22.5001 60.042Z" fill="#155EEF"/>
|
13
|
+
<rect x="8.5" y="108.5" width="19" height="19" rx="3.5" fill="black"/>
|
14
|
+
<rect x="8.5" y="108.5" width="19" height="19" rx="3.5" stroke="#1F1F1F"/>
|
15
|
+
<path d="M22.5521 113.489C22.4146 113.354 22.2771 113.219 22.1396 113.083C21.727 112.651 21.2869 112.219 20.7368 111.949C20.1042 111.625 19.4166 111.706 18.7289 111.706C17.6838 111.706 15.0708 111.706 13.5305 111.706L14.5757 113.083C16.4735 113.083 19.4441 113.083 20.8193 113.083C21.3969 113.083 21.892 113.192 22.3596 113.489C22.4421 113.516 22.5246 113.516 22.5521 113.489Z" fill="#66C61C"/>
|
16
|
+
<path d="M23.7072 115.704C23.5697 115.568 23.4321 115.433 23.2946 115.298C22.882 114.866 22.442 114.434 21.8919 114.164C21.2593 113.84 20.5716 113.921 19.884 113.921C18.9763 113.921 16.8035 113.921 15.2632 113.921L16.3084 115.298C18.1787 115.298 20.7367 115.298 22.0019 115.298C22.5795 115.298 23.0746 115.406 23.5422 115.704C23.5972 115.731 23.6522 115.731 23.7072 115.704Z" fill="#4CA30D"/>
|
17
|
+
<path d="M25.0001 117.865C24.8626 117.73 24.725 117.595 24.5875 117.459C24.175 117.027 23.7349 116.595 23.1848 116.325C22.5522 116.001 21.8645 116.082 21.1769 116.082C20.3243 116.082 18.4539 116.082 16.9412 116.082L17.9863 117.459C19.8017 117.459 22.1121 117.459 23.2673 117.459C23.8449 117.459 24.34 117.568 24.8076 117.865C24.8901 117.892 24.9451 117.919 25.0001 117.865Z" fill="#3B7C0F"/>
|
18
|
+
<path d="M13.4204 121.511C13.5579 121.647 13.6955 121.782 13.833 121.917C14.2456 122.349 14.6856 122.781 15.2357 123.051C15.8683 123.375 16.556 123.294 17.2436 123.294H22.442L21.3968 121.917C19.499 121.917 16.5285 121.917 15.1532 121.917C14.5756 121.917 14.0805 121.809 13.6129 121.511C13.5304 121.484 13.4754 121.484 13.4204 121.511Z" fill="#66C61C"/>
|
19
|
+
<path d="M12.2651 119.297C12.4027 119.432 12.5402 119.567 12.6777 119.702C13.0903 120.134 13.5304 120.566 14.0805 120.836C14.7131 121.161 15.4007 121.08 16.0883 121.08H20.7091L19.664 119.702C17.7936 119.702 15.2357 119.702 13.9704 119.702C13.3928 119.702 12.8977 119.594 12.4302 119.297C12.3752 119.27 12.3201 119.27 12.2651 119.297Z" fill="#4CA30D"/>
|
20
|
+
<path d="M11 117.108C11.1375 117.243 11.275 117.378 11.4126 117.513C11.8251 117.946 12.2652 118.378 12.8153 118.648C13.4479 118.972 14.1356 118.891 14.8232 118.891H19.0589L18.0138 117.513C16.1984 117.513 13.888 117.513 12.7328 117.513C12.1552 117.513 11.6601 117.405 11.1925 117.108C11.11 117.081 11.055 117.081 11 117.108Z" fill="#3B7C0F"/>
|
21
|
+
<rect x="91.5" y="98.5" width="19" height="19" rx="3.5" fill="black"/>
|
22
|
+
<rect x="91.5" y="98.5" width="19" height="19" rx="3.5" stroke="#1F1F1F"/>
|
23
|
+
<path d="M106.162 108C104.886 109.158 103.032 109.887 100.968 109.887C98.9046 109.887 97.0504 109.158 95.7744 108C97.0504 106.842 98.9046 106.113 100.968 106.113C103.032 106.113 104.886 106.842 106.162 108Z" fill="white"/>
|
24
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M94 111.775C94 108.648 97.1198 106.113 100.968 106.113C98.9045 106.113 97.0503 106.842 95.7744 108C97.0503 109.158 98.9046 109.887 100.968 109.887C103.032 109.887 104.886 109.158 106.162 108C107.266 109.002 107.937 110.324 107.937 111.775V113.913C107.937 114.191 107.659 114.417 107.317 114.417H94.6194C94.2773 114.417 94 114.191 94 113.913V111.775ZM106.162 108C106.162 108 106.162 108 106.162 108V108Z" fill="#7CD4FD"/>
|
25
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M98.3546 109.476C97.3596 109.148 96.4788 108.64 95.7744 108C97.0503 106.842 98.9046 106.113 100.968 106.113C103.032 106.113 104.886 106.842 106.162 108C106.162 108 106.162 108 106.162 108C107.266 106.998 107.937 105.676 107.937 104.226V102.087C107.937 101.809 107.659 101.583 107.317 101.583L94.6194 101.583C94.2773 101.583 94 101.809 94 102.087L94 104.226C94 106.602 95.8012 108.636 98.3546 109.476Z" fill="#0BA5EC"/>
|
26
|
+
<rect x="116.5" y="28.5" width="19" height="19" rx="3.5" fill="black"/>
|
27
|
+
<rect x="116.5" y="28.5" width="19" height="19" rx="3.5" stroke="#1F1F1F"/>
|
28
|
+
<path d="M128.682 31.5835H123.318L119 35.5417V40.4586L123.318 44.4168H128.682L133 40.4586V35.5417L128.682 31.5835ZM124.06 40.5204L121.294 37.9847L124.06 35.449C125.106 34.4903 126.827 34.4903 127.872 35.449L130.639 37.9847L127.872 40.5204C126.827 41.4791 125.14 41.4791 124.06 40.5204Z" fill="#444CE7"/>
|
29
|
+
<rect x="42.5" y="0.5" width="19" height="19" rx="3.5" fill="black"/>
|
30
|
+
<rect x="42.5" y="0.5" width="19" height="19" rx="3.5" stroke="#1F1F1F"/>
|
31
|
+
<path d="M51.5 3.5835C47.9101 3.5835 45 6.45634 45 10.0002C45 13.544 47.9101 16.4168 51.5 16.4168C54.7208 16.4168 57.3944 14.1044 57.9101 11.0696H57.8635C57.3824 12.9146 55.6858 14.2779 53.6667 14.2779C51.2734 14.2779 49.3333 12.3627 49.3333 10.0002C49.3333 7.63761 51.2734 5.72239 53.6667 5.72239C55.6858 5.72239 57.3824 7.08568 57.8635 8.93072H57.9101C57.3944 5.89594 54.7208 3.5835 51.5 3.5835Z" fill="#A4BCFD"/>
|
32
|
+
<path d="M45 10.0002C45 6.45634 47.9102 3.5835 51.5 3.5835C54.7207 3.5835 57.3944 5.89594 57.9101 8.93072H53.5301C53.0491 7.08568 51.3525 5.72239 49.3333 5.72239C46.9401 5.72239 45 7.63761 45 10.0002Z" fill="#3538CD"/>
|
33
|
+
<path d="M45 10.0003C45 13.5442 47.9102 16.417 51.5 16.417C54.7207 16.417 57.3944 14.1045 57.9101 11.0698H53.5301C53.0491 12.9148 51.3525 14.2781 49.3333 14.2781C46.9401 14.2781 45 12.3629 45 10.0003Z" fill="#3538CD"/>
|
34
|
+
</svg>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<svg width="
|
2
|
-
<path d="
|
3
|
-
<path d="
|
4
|
-
</svg>
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="23" height="38" viewBox="0 0 23 38" fill="currentColor" stroke="none">
|
2
|
+
<path d="M21.4674 14.3948C21.1952 15.3389 20.1548 15.8066 19.248 15.4305C18.4305 15.0915 18.0209 14.1837 18.2216 13.321C18.3491 12.7729 18.441 12.2508 18.4973 11.7548C18.6079 10.81 18.6067 9.97015 18.4937 9.23528C18.3806 8.50037 18.1568 7.89155 17.8221 7.40879C17.4979 6.91656 17.0744 6.56204 16.5515 6.34517C15.6225 5.95992 14.5952 6.11184 13.4695 6.80079C12.3486 7.47808 11.194 8.67796 10.0056 10.4005C8.82215 12.1113 7.66917 14.3232 6.54672 17.0363C5.40484 19.7963 4.64575 22.206 4.26949 24.2654C3.90366 26.3153 3.87752 27.9694 4.19107 29.2278C4.51504 30.4766 5.13873 31.2926 6.0621 31.6755C6.57381 31.8877 7.11052 31.9452 7.67212 31.8478C8.24416 31.7411 8.8248 31.4797 9.41404 31.0635C10.0088 30.6497 10.5987 30.0825 11.1835 29.3618C11.49 28.9891 11.7885 28.576 12.0791 28.1226C12.5593 27.3734 13.4979 27.0276 14.3154 27.3775C15.2152 27.7626 15.611 28.829 15.1267 29.6804C14.5316 30.7263 13.895 31.6992 13.2167 32.5992C12.2109 33.9434 11.1584 35.0618 10.0592 35.9545C8.9649 36.8354 7.8669 37.4258 6.76529 37.7257C5.66854 38.0139 4.61119 37.9469 3.59326 37.5248C2.09138 36.902 1.05452 35.6119 0.482661 33.6548C-0.0891979 31.6977 -0.141065 29.1924 0.327059 26.1392C0.795183 23.086 1.83099 19.6215 3.43449 15.7456C5.04287 11.8581 6.76005 8.67612 8.58614 6.1998C10.4171 3.71174 12.2259 1.97817 14.0125 0.999097C15.7991 0.0200264 17.4378 -0.160397 18.9285 0.457829C19.8798 0.852293 20.6475 1.50095 21.232 2.40381C21.8165 3.30667 22.2026 4.43688 22.3903 5.79445C22.583 7.14028 22.5596 8.68543 22.3201 10.43C22.1566 11.6685 21.8723 12.99 21.4674 14.3948Z"/>
|
3
|
+
<path d="M15.4555 20.2909C15.8721 19.3437 17.0252 18.8939 18.031 19.2862L18.1275 19.3239C19.1333 19.7162 19.6109 20.8021 19.1943 21.7493C18.7777 22.6966 17.6246 23.1464 16.6188 22.754L16.5223 22.7164C15.5165 22.324 15.0389 21.2381 15.4555 20.2909Z"/>
|
4
|
+
</svg>
|
@@ -1,34 +1,12 @@
|
|
1
|
-
<svg width="
|
2
|
-
<g clip-path="url(#
|
3
|
-
<path d="
|
4
|
-
<path d="
|
5
|
-
<path d="
|
6
|
-
<path d="M11.3514 6.44293H41.9052C43.9763 6.44293 45.6552 8.12186 45.6552 10.1929V47.4327C45.6552 49.5038 43.9763 51.1827 41.9052 51.1827H11.3514C9.28037 51.1827 7.60144 49.5038 7.60144 47.4327V10.1929C7.60144 8.12187 9.28037 6.44293 11.3514 6.44293Z" fill="url(#paint0_linear_493_27099)" stroke="#EDEDED" stroke-width="0.5"/>
|
7
|
-
<path opacity="0.7" d="M52.5 21.2972V54.1528L22.7465 37.725L52.5 21.2972Z" fill="url(#paint1_linear_493_27099)" stroke="#DADADA"/>
|
8
|
-
<path opacity="0.7" d="M0.499994 54.1528L0.499997 21.2972L30.2535 37.725L0.499994 54.1528Z" fill="url(#paint2_linear_493_27099)" stroke="#DADADA"/>
|
9
|
-
<path opacity="0.7" d="M25.3425 33.3196L25.4304 33.2422C26.0646 32.7573 26.9717 32.7828 27.5771 33.3188L27.578 33.3196L51.5967 54.4819H1.32382L25.3425 33.3196Z" fill="url(#paint3_linear_493_27099)" stroke="#DADADA"/>
|
10
|
-
<path d="M21.2736 23.6536C20.5709 22.9594 21.0368 21.5032 20.6778 20.6507C20.3188 19.7981 18.9438 19.0511 18.9438 18.108C18.9438 17.1649 20.3035 16.4481 20.6778 15.5653C21.0521 14.6826 20.5709 13.2566 21.2736 12.5624C21.9764 11.8683 23.4507 12.3285 24.3138 11.9739C25.177 11.6193 25.9332 10.2612 26.888 10.2612C27.8429 10.2612 28.5685 11.6042 29.4623 11.9739C30.356 12.3436 31.7997 11.8683 32.5024 12.5624C33.2052 13.2566 32.7392 14.7127 33.0983 15.5653C33.4573 16.4179 34.8322 17.1649 34.8322 18.108C34.8322 19.0511 33.4726 19.7679 33.0983 20.6507C32.724 21.5334 33.2052 22.9594 32.5024 23.6536C31.7997 24.3477 30.3254 23.8875 29.4623 24.2421C28.5991 24.5967 27.8429 25.9548 26.888 25.9548C25.9332 25.9548 25.2075 24.6118 24.3138 24.2421C23.4201 23.8724 21.9764 24.3477 21.2736 23.6536Z" fill="#2E2E2E"/>
|
11
|
-
<path d="M30.249 16.2972L25.7652 20.5224L23.527 18.4098" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="none">
|
2
|
+
<g clip-path="url(#clip0_1824_12406)">
|
3
|
+
<path d="M32 45.5L0 27L32 12L64 27L32 45.5Z" class="background-16"/>
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 0H51C53.2091 0 55 1.79086 55 4V51C55 53.2091 53.2091 55 51 55H13C10.7909 55 9 53.2091 9 51V4C9 1.79086 10.7909 0 13 0ZM24.6852 23.8262C24.1488 23.2803 24.1351 22.3834 24.1216 21.5039C24.1121 20.8824 24.1027 20.2696 23.909 19.7957C23.7141 19.3188 23.2892 18.8665 22.86 18.4095C22.2593 17.77 21.6499 17.1213 21.6499 16.383C21.6499 15.6495 22.2446 15.0181 22.8397 14.3862L22.8397 14.3862C23.2717 13.9275 23.7039 13.4686 23.909 12.9702C24.1136 12.4732 24.122 11.8477 24.1304 11.2204C24.1421 10.3523 24.1538 9.48056 24.6852 8.93975C25.2217 8.39388 26.1032 8.3799 26.9674 8.36619C27.5782 8.3565 28.1804 8.34695 28.6461 8.14986C29.1148 7.9515 29.5593 7.51919 30.0084 7.08239C30.6368 6.47113 31.2744 5.85107 31.9999 5.85107C32.7207 5.85107 33.3412 6.4562 33.9622 7.06176C34.413 7.50135 34.864 7.94115 35.3537 8.14986C35.8422 8.35804 36.4568 8.36659 37.0733 8.37516C37.9264 8.38703 38.7831 8.39895 39.3146 8.93975C39.851 9.48562 39.8647 10.3826 39.8782 11.262C39.8877 11.8836 39.8971 12.4964 40.0908 12.9702C40.2858 13.4472 40.7106 13.8994 41.1398 14.3564C41.7406 14.996 42.3499 15.6447 42.3499 16.383C42.3499 17.1164 41.7552 17.7479 41.1601 18.3798C40.7281 18.8385 40.2959 19.2974 40.0908 19.7957C39.8862 20.2928 39.8778 20.9182 39.8694 21.5456C39.8577 22.4136 39.846 23.2854 39.3146 23.8262C38.7781 24.3721 37.8966 24.3861 37.0324 24.3998C36.4216 24.4095 35.8194 24.419 35.3537 24.6161C34.885 24.8145 34.4405 25.2468 33.9914 25.6836C33.363 26.2948 32.7254 26.9149 31.9999 26.9149C31.2791 26.9149 30.6586 26.3098 30.0376 25.7042C29.5868 25.2646 29.1358 24.8248 28.6461 24.6161C28.1576 24.4079 27.543 24.3994 26.9265 24.3908C26.0734 24.3789 25.2167 24.367 24.6852 23.8262ZM37.4391 13.2424C37.8733 13.7141 37.8496 14.4546 37.3862 14.8965L31.2494 20.7476C30.8068 21.1695 30.1183 21.1692 29.6761 20.7469L26.6129 17.8213C26.1498 17.3791 26.1267 16.6385 26.5614 16.1672C26.996 15.696 27.7238 15.6725 28.1869 16.1148L30.4637 18.2894L35.8136 13.1886C36.2771 12.7467 37.0048 12.7708 37.4391 13.2424Z" class="foreground-0" opacity="0.95"/>
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M32 45.5045L0 27.009V64H2.86102e-05H64L64 27.009L32 45.5045Z" class="background-16"/>
|
12
6
|
</g>
|
13
7
|
<defs>
|
14
|
-
<
|
15
|
-
<
|
16
|
-
<stop offset="1" stop-color="#DBDBDB"/>
|
17
|
-
</linearGradient>
|
18
|
-
<linearGradient id="paint1_linear_493_27099" x1="40.332" y1="44.3646" x2="52.9198" y2="20.3936" gradientUnits="userSpaceOnUse">
|
19
|
-
<stop stop-color="#C6C6C6"/>
|
20
|
-
<stop offset="1" stop-color="#EBEBEB"/>
|
21
|
-
</linearGradient>
|
22
|
-
<linearGradient id="paint2_linear_493_27099" x1="12.668" y1="31.0854" x2="0.0801635" y2="55.0563" gradientUnits="userSpaceOnUse">
|
23
|
-
<stop stop-color="#C6C6C6"/>
|
24
|
-
<stop offset="1" stop-color="#EBEBEB"/>
|
25
|
-
</linearGradient>
|
26
|
-
<linearGradient id="paint3_linear_493_27099" x1="26.4603" y1="32.3967" x2="26.4603" y2="54.9819" gradientUnits="userSpaceOnUse">
|
27
|
-
<stop stop-color="#E8E8E8"/>
|
28
|
-
<stop offset="1" stop-color="#C8C8C8"/>
|
29
|
-
</linearGradient>
|
30
|
-
<clipPath id="clip0_493_27099">
|
31
|
-
<rect width="53" height="55" fill="white"/>
|
8
|
+
<clipPath id="clip0_1824_12406">
|
9
|
+
<rect width="64" height="64" fill="white"/>
|
32
10
|
</clipPath>
|
33
11
|
</defs>
|
34
|
-
</svg>
|
12
|
+
</svg>
|