@lukso/web-components 1.5.3 → 1.6.0
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/CHANGELOG.md +25 -0
- package/README.md +11 -7
- package/dist/components/index.js +828 -814
- package/dist/components/index.umd.cjs +156 -155
- package/dist/components/lukso-button/index.js +104 -104
- package/dist/components/lukso-button/index.umd.cjs +5 -5
- package/dist/components/lukso-card/index.d.ts +5 -2
- package/dist/components/lukso-card/index.js +221 -204
- package/dist/components/lukso-card/index.umd.cjs +26 -25
- package/dist/components/lukso-icon/index.js +78 -78
- package/dist/components/lukso-icon/index.umd.cjs +224 -224
- package/dist/components/lukso-input/index.js +31 -30
- package/dist/components/lukso-input/index.umd.cjs +13 -13
- package/dist/components/lukso-navbar/index.js +2 -2
- package/dist/components/lukso-navbar/index.umd.cjs +2 -2
- package/dist/components/lukso-profile/index.js +2 -2
- package/dist/components/lukso-profile/index.umd.cjs +2 -2
- package/dist/components/lukso-sanitize/index.js +39 -39
- package/dist/components/lukso-sanitize/index.umd.cjs +1 -1
- package/dist/components/lukso-tag/index.js +1 -1
- package/dist/components/lukso-tag/index.umd.cjs +1 -1
- package/dist/components/lukso-test/index.js +550 -550
- package/dist/components/lukso-test/index.umd.cjs +12 -12
- package/dist/components/lukso-username/index.js +19 -19
- package/dist/components/lukso-username/index.umd.cjs +1 -1
- package/dist/components/lukso-wizard/index.js +28 -28
- package/dist/components/lukso-wizard/index.umd.cjs +9 -9
- package/dist/index.js +828 -814
- package/dist/index.umd.cjs +156 -155
- package/dist/sass/typography.scss +23 -3
- package/dist/shared/tailwind-element/index.js +21 -21
- package/dist/shared/tailwind-element/index.umd.cjs +6 -6
- package/dist/shared/tailwind-element.js +21 -21
- package/dist/shared/tailwind-element.umd.cjs +6 -6
- package/dist/shared/{styles/hslColorMap.d.ts → utils/hsl-color-map.d.ts} +1 -1
- package/dist/shared/utils/{sliceAddress.d.ts → slice-address.d.ts} +1 -1
- package/dist/styles/main.css +18 -3
- package/package.json +4 -9
- package/src/components/lukso-card/index.ts +16 -3
- package/src/components/lukso-card/lukso-card.stories.ts +56 -4
- package/src/components/lukso-card/style.scss +3 -0
- package/src/components/lukso-icon/style.scss +1 -1
- package/src/components/lukso-input/index.ts +3 -2
- package/src/components/lukso-navbar/index.ts +1 -1
- package/src/components/lukso-profile/index.ts +1 -1
- package/src/components/lukso-username/index.ts +1 -1
- package/src/shared/styles/typography.scss +23 -3
- package/src/shared/utils/__tests__/{sliceAddress.spec.ts → slice-address.spec.ts} +1 -1
- package/{dist/sass → src/shared/utils}/color-palette.ts +1 -1
- package/src/shared/utils/copy-assets.ts +80 -0
- package/tailwind.config.cjs +3 -0
- package/tools/color-palette.cjs +17 -17
- package/tools/color-palette.d.ts +1 -1
- package/tools/color-palette.d.ts.map +1 -1
- package/tools/copy-assets.cjs +139 -0
- package/tools/copy-assets.d.ts +10 -0
- package/tools/copy-assets.d.ts.map +1 -0
- package/src/shared/styles/color-palette.ts +0 -76
- package/src/shared/styles/hslColorMap.ts +0 -20
- /package/dist/shared/{styles → utils}/color-palette.d.ts +0 -0
- /package/{dist/sass/hslColorMap.ts → src/shared/utils/hsl-color-map.ts} +0 -0
- /package/src/shared/utils/{sliceAddress.ts → slice-address.ts} +0 -0
|
@@ -47,11 +47,11 @@ export class LuksoInput extends TailwindElement {
|
|
|
47
47
|
private hasHocus = false
|
|
48
48
|
|
|
49
49
|
private defaultInputStyles = `bg-neutral-100 text-neutral-20 paragraph-16-regular px-4 py-3
|
|
50
|
-
border border-solid
|
|
50
|
+
border border-solid h-[48px] placeholder:text-neutral-70
|
|
51
51
|
outline-none transition transition-all duration-250 appearance-none`
|
|
52
52
|
|
|
53
53
|
private defaultUnitStyles = `paragraph-12-regular text-neutral-60 flex px-3.5 items-center relative
|
|
54
|
-
border border-solid
|
|
54
|
+
border border-solid h-[48px] transition transition-all duration-250
|
|
55
55
|
rounded-r-xl border-l-0 before:bg-neutral-90 before:absolute before:top-[calc(50%-12px)] before:left-0
|
|
56
56
|
before:w-[1px] before:h-[24px] whitespace-nowrap`
|
|
57
57
|
|
|
@@ -70,6 +70,7 @@ export class LuksoInput extends TailwindElement {
|
|
|
70
70
|
[this.defaultInputStyles]: true,
|
|
71
71
|
['border-red-85 text-red-65 focus:border-red-65']: this.error !== '',
|
|
72
72
|
['border-neutral-35']: this.hasHocus,
|
|
73
|
+
['border-neutral-90']: !this.hasHocus,
|
|
73
74
|
['rounded-l-xl border-r-0']: this.unit !== '',
|
|
74
75
|
['rounded-xl']: this.unit === '',
|
|
75
76
|
['w-full']: this.isFullWidth,
|
|
@@ -43,7 +43,7 @@ export class LuksoNavbar extends TailwindElement {
|
|
|
43
43
|
class="flex items-center px-10 h-full cursor-pointer"
|
|
44
44
|
@click=${this._onBrandClick}
|
|
45
45
|
>
|
|
46
|
-
<img src="assets/images/lukso-logo.svg" class="mr-4" />
|
|
46
|
+
<img src="/assets/images/lukso-logo.svg" class="mr-4" />
|
|
47
47
|
<div
|
|
48
48
|
class="text-purple-51 heading-h4-apax whitespace-pre-line flex leading-none"
|
|
49
49
|
>
|
|
@@ -53,7 +53,7 @@ export class LuksoProfile extends TailwindElement {
|
|
|
53
53
|
return this.sizes[this.size].identiconSize
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
private defaultProfileUrl = 'assets/images/profile-default.png'
|
|
56
|
+
private defaultProfileUrl = '/assets/images/profile-default.png'
|
|
57
57
|
|
|
58
58
|
private identicon() {
|
|
59
59
|
return this.hasIdenticon && this.profileAddress && this.identiconSize()
|
|
@@ -2,7 +2,7 @@ import { html } from 'lit'
|
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js'
|
|
3
3
|
import { styleMap } from 'lit-html/directives/style-map.js'
|
|
4
4
|
|
|
5
|
-
import { sliceAddress } from '@/shared/utils/
|
|
5
|
+
import { sliceAddress } from '@/shared/utils/slice-address'
|
|
6
6
|
import { TailwindElement } from '@/shared/tailwind-element'
|
|
7
7
|
import { customClassMap } from '@/shared/directives'
|
|
8
8
|
|
|
@@ -28,15 +28,35 @@
|
|
|
28
28
|
@apply text-14 not-italic font-700 leading-17 font-inter;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.heading-h1-apax {
|
|
31
|
+
.heading-h1-medium-apax {
|
|
32
|
+
@apply text-44 not-italic font-500 leading-40 font-apax;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.heading-h1-regular-apax {
|
|
36
|
+
@apply text-44 not-italic font-400 leading-40 font-apax;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.heading-h2-medium-apax {
|
|
32
40
|
@apply text-24 not-italic font-500 leading-28 font-apax;
|
|
33
41
|
}
|
|
34
42
|
|
|
35
|
-
.heading-
|
|
43
|
+
.heading-h3-medium-apax {
|
|
44
|
+
@apply text-16 not-italic font-500 leading-19 font-apax;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.heading-h4-medium-apax {
|
|
48
|
+
@apply text-14 not-italic font-500 leading-20 font-apax;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.heading-h4-medium-uppercase-apax {
|
|
36
52
|
@apply text-14 not-italic font-500 leading-20 font-apax uppercase tracking-[.08em];
|
|
37
53
|
}
|
|
38
54
|
|
|
39
|
-
.heading-h5-apax {
|
|
55
|
+
.heading-h5-medium-apax {
|
|
56
|
+
@apply text-8 not-italic font-500 leading-10 font-apax;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.heading-h5-medium-uppercase-apax {
|
|
40
60
|
@apply text-8 not-italic font-500 leading-10 font-apax uppercase tracking-[.08em];
|
|
41
61
|
}
|
|
42
62
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import fs from 'fs'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* List of allowed file extensions
|
|
6
|
+
*/
|
|
7
|
+
const fileExtensionWhitelist = [
|
|
8
|
+
'.woff2',
|
|
9
|
+
'.svg',
|
|
10
|
+
'.img',
|
|
11
|
+
'.jpg',
|
|
12
|
+
'.jpeg',
|
|
13
|
+
'.png',
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Copy file from source to destination
|
|
18
|
+
*
|
|
19
|
+
* @param source - Source path
|
|
20
|
+
* @param target - Destination path
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
function copyFileSync(source, target) {
|
|
24
|
+
let targetFile = target
|
|
25
|
+
|
|
26
|
+
// If target is a directory, a new file with the same name will be created
|
|
27
|
+
if (fs.existsSync(target)) {
|
|
28
|
+
if (fs.lstatSync(target).isDirectory()) {
|
|
29
|
+
targetFile = path.join(target, path.basename(source))
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (!fileExtensionWhitelist.includes(path.extname(source))) {
|
|
34
|
+
return
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
fs.writeFileSync(targetFile, fs.readFileSync(source))
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Recursively copy directory from source to destination
|
|
42
|
+
*
|
|
43
|
+
* @param source - source directory
|
|
44
|
+
* @param target - destination directory
|
|
45
|
+
*/
|
|
46
|
+
function copyFolderRecursiveSync(source, target) {
|
|
47
|
+
let files = []
|
|
48
|
+
|
|
49
|
+
// Check if folder needs to be created or integrated
|
|
50
|
+
const targetFolder = path.join(target, path.basename(source))
|
|
51
|
+
if (!fs.existsSync(targetFolder)) {
|
|
52
|
+
fs.mkdirSync(targetFolder)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Copy
|
|
56
|
+
if (fs.lstatSync(source).isDirectory()) {
|
|
57
|
+
files = fs.readdirSync(source)
|
|
58
|
+
files.forEach(function (file) {
|
|
59
|
+
const curSource = path.join(source, file)
|
|
60
|
+
if (fs.lstatSync(curSource).isDirectory()) {
|
|
61
|
+
copyFolderRecursiveSync(curSource, targetFolder)
|
|
62
|
+
} else {
|
|
63
|
+
copyFileSync(curSource, targetFolder)
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Copy asset directory from source to destination
|
|
71
|
+
*
|
|
72
|
+
* @param assetDir - destination directory
|
|
73
|
+
* @param assets - source directory
|
|
74
|
+
*/
|
|
75
|
+
export const copyAssets = (assetDir: string, assets: any) => {
|
|
76
|
+
if (!fs.existsSync(assetDir)) {
|
|
77
|
+
fs.mkdirSync(assetDir, { recursive: true })
|
|
78
|
+
}
|
|
79
|
+
copyFolderRecursiveSync(assets, assetDir)
|
|
80
|
+
}
|
package/tailwind.config.cjs
CHANGED
|
@@ -135,6 +135,7 @@ module.exports = {
|
|
|
135
135
|
21: '21px',
|
|
136
136
|
24: '24px',
|
|
137
137
|
26: '26px',
|
|
138
|
+
44: '44px',
|
|
138
139
|
},
|
|
139
140
|
fontWeight: {
|
|
140
141
|
100: '100',
|
|
@@ -153,12 +154,14 @@ module.exports = {
|
|
|
153
154
|
14: '14px',
|
|
154
155
|
15: '15px',
|
|
155
156
|
17: '17px',
|
|
157
|
+
19: '19px',
|
|
156
158
|
20: '20px',
|
|
157
159
|
22: '22px',
|
|
158
160
|
24: '24px',
|
|
159
161
|
26: '26px',
|
|
160
162
|
28: '28px',
|
|
161
163
|
31: '31px',
|
|
164
|
+
40: '40px',
|
|
162
165
|
},
|
|
163
166
|
transitionDuration: {
|
|
164
167
|
25: '25ms',
|
package/tools/color-palette.cjs
CHANGED
|
@@ -12,7 +12,7 @@ module.exports = (function () {
|
|
|
12
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
|
-
define("
|
|
15
|
+
define("hsl-color-map", ["require", "exports", "tinycolor2"], function (require, exports, tinycolor2_1) {
|
|
16
16
|
"use strict";
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.hslColorMap = void 0;
|
|
@@ -35,7 +35,7 @@ module.exports = (function () {
|
|
|
35
35
|
};
|
|
36
36
|
exports.hslColorMap = hslColorMap;
|
|
37
37
|
});
|
|
38
|
-
define("color-palette", ["require", "exports", "tinycolor2", "
|
|
38
|
+
define("color-palette", ["require", "exports", "tinycolor2", "hsl-color-map"], function (require, exports, tinycolor2_2, hsl_color_map_1) {
|
|
39
39
|
"use strict";
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.neutral3 = exports.neutral2 = exports.neutral1 = exports.colorPalette = void 0;
|
|
@@ -44,24 +44,24 @@ module.exports = (function () {
|
|
|
44
44
|
* Color palette based on the structure thats compatible with Tailwind config
|
|
45
45
|
*/
|
|
46
46
|
exports.colorPalette = {
|
|
47
|
-
neutral: (0,
|
|
47
|
+
neutral: (0, hsl_color_map_1.hslColorMap)(206, 30, [
|
|
48
48
|
10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
|
|
49
49
|
97, 98, 100,
|
|
50
50
|
]),
|
|
51
|
-
honey: (0,
|
|
52
|
-
coral: (0,
|
|
53
|
-
warm: (0,
|
|
54
|
-
'sea-salt': (0,
|
|
55
|
-
cloud: (0,
|
|
56
|
-
ocean: (0,
|
|
57
|
-
sky: (0,
|
|
58
|
-
lukso: (0,
|
|
59
|
-
yellow: (0,
|
|
60
|
-
green: (0,
|
|
61
|
-
blue: (0,
|
|
62
|
-
red: (0,
|
|
63
|
-
purple: (0,
|
|
64
|
-
pink: (0,
|
|
51
|
+
honey: (0, hsl_color_map_1.hslColorMap)(42, 93, [72, 75, 82, 85, 92]),
|
|
52
|
+
coral: (0, hsl_color_map_1.hslColorMap)(14, 87, [65, 74, 75, 84, 85, 94]),
|
|
53
|
+
warm: (0, hsl_color_map_1.hslColorMap)(25, 100, [77, 87, 97]),
|
|
54
|
+
'sea-salt': (0, hsl_color_map_1.hslColorMap)(180, 17, [57, 67, 88]),
|
|
55
|
+
cloud: (0, hsl_color_map_1.hslColorMap)(200, 38, [43, 75, 88]),
|
|
56
|
+
ocean: (0, hsl_color_map_1.hslColorMap)(209, 38, [38, 75, 88]),
|
|
57
|
+
sky: (0, hsl_color_map_1.hslColorMap)(209, 64, [64, 75, 85]),
|
|
58
|
+
lukso: (0, hsl_color_map_1.hslColorMap)(335, 33, [70, 80, 90]),
|
|
59
|
+
yellow: (0, hsl_color_map_1.hslColorMap)(36, 100, [55, 65, 75, 85]),
|
|
60
|
+
green: (0, hsl_color_map_1.hslColorMap)(135, 57, [45, 54, 75, 85]),
|
|
61
|
+
blue: (0, hsl_color_map_1.hslColorMap)(216, 96, [50, 60, 75, 85]),
|
|
62
|
+
red: (0, hsl_color_map_1.hslColorMap)(0, 75, [55, 65, 75, 85]),
|
|
63
|
+
purple: (0, hsl_color_map_1.hslColorMap)(230, 24, [94, 82, 63, 58, 51, 41, 31, 15]),
|
|
64
|
+
pink: (0, hsl_color_map_1.hslColorMap)(11, 73, [97, 96, 95, 94, 93, 92, 91, 90]),
|
|
65
65
|
'gradient-1': {
|
|
66
66
|
start: '#D39B9D',
|
|
67
67
|
end: '#9071D1',
|
package/tools/color-palette.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-palette.d.ts","sourceRoot":"","sources":["../src/shared/
|
|
1
|
+
{"version":3,"file":"color-palette.d.ts","sourceRoot":"","sources":["../src/shared/utils/hsl-color-map.ts","../src/shared/utils/color-palette.ts"],"names":[],"mappings":";IAEA;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,WAAW,gCASvB,CAAA;;;ICfD,KAAK,QAAQ,GAAG;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KACtB,CAAA;IAED;;OAEG;IACH,MAAM,CAAC,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCxB,CAAA;IAoBD;;OAEG;IACH,MAAM,CAAC,MAAM,QAAQ,UAAyC,CAAA;IAC9D,MAAM,CAAC,MAAM,QAAQ,UAA0C,CAAA;IAC/D,MAAM,CAAC,MAAM,QAAQ,UAIpB,CAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
module.exports = (function () {
|
|
2
|
+
var defines = {};
|
|
3
|
+
var entry = [null];
|
|
4
|
+
function define(name, dependencies, factory) {
|
|
5
|
+
defines[name] = { dependencies: dependencies, factory: factory };
|
|
6
|
+
entry[0] = name;
|
|
7
|
+
}
|
|
8
|
+
define("require", ["exports"], function (exports) {
|
|
9
|
+
Object.defineProperty(exports, "__cjsModule", { value: true });
|
|
10
|
+
Object.defineProperty(exports, "default", { value: function (name) { return resolve(name); } });
|
|
11
|
+
});
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
15
|
+
define("copy-assets", ["require", "exports", "fs", "path"], function (require, exports, fs_1, path_1) {
|
|
16
|
+
"use strict";
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.copyAssets = void 0;
|
|
19
|
+
fs_1 = __importDefault(fs_1);
|
|
20
|
+
path_1 = __importDefault(path_1);
|
|
21
|
+
/**
|
|
22
|
+
* List of allowed file extensions
|
|
23
|
+
*/
|
|
24
|
+
var fileExtensionWhitelist = [
|
|
25
|
+
'.woff2',
|
|
26
|
+
'.svg',
|
|
27
|
+
'.img',
|
|
28
|
+
'.jpg',
|
|
29
|
+
'.jpeg',
|
|
30
|
+
'.png',
|
|
31
|
+
];
|
|
32
|
+
/**
|
|
33
|
+
* Copy file from source to destination
|
|
34
|
+
*
|
|
35
|
+
* @param source - Source path
|
|
36
|
+
* @param target - Destination path
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
function copyFileSync(source, target) {
|
|
40
|
+
var targetFile = target;
|
|
41
|
+
// If target is a directory, a new file with the same name will be created
|
|
42
|
+
if (fs_1.default.existsSync(target)) {
|
|
43
|
+
if (fs_1.default.lstatSync(target).isDirectory()) {
|
|
44
|
+
targetFile = path_1.default.join(target, path_1.default.basename(source));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (!fileExtensionWhitelist.includes(path_1.default.extname(source))) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
fs_1.default.writeFileSync(targetFile, fs_1.default.readFileSync(source));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Recursively copy directory from source to destination
|
|
54
|
+
*
|
|
55
|
+
* @param source - source directory
|
|
56
|
+
* @param target - destination directory
|
|
57
|
+
*/
|
|
58
|
+
function copyFolderRecursiveSync(source, target) {
|
|
59
|
+
var files = [];
|
|
60
|
+
// Check if folder needs to be created or integrated
|
|
61
|
+
var targetFolder = path_1.default.join(target, path_1.default.basename(source));
|
|
62
|
+
if (!fs_1.default.existsSync(targetFolder)) {
|
|
63
|
+
fs_1.default.mkdirSync(targetFolder);
|
|
64
|
+
}
|
|
65
|
+
// Copy
|
|
66
|
+
if (fs_1.default.lstatSync(source).isDirectory()) {
|
|
67
|
+
files = fs_1.default.readdirSync(source);
|
|
68
|
+
files.forEach(function (file) {
|
|
69
|
+
var curSource = path_1.default.join(source, file);
|
|
70
|
+
if (fs_1.default.lstatSync(curSource).isDirectory()) {
|
|
71
|
+
copyFolderRecursiveSync(curSource, targetFolder);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
copyFileSync(curSource, targetFolder);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Copy asset directory from source to destination
|
|
81
|
+
*
|
|
82
|
+
* @param assetDir - destination directory
|
|
83
|
+
* @param assets - source directory
|
|
84
|
+
*/
|
|
85
|
+
var copyAssets = function (assetDir, assets) {
|
|
86
|
+
if (!fs_1.default.existsSync(assetDir)) {
|
|
87
|
+
fs_1.default.mkdirSync(assetDir, { recursive: true });
|
|
88
|
+
}
|
|
89
|
+
copyFolderRecursiveSync(assets, assetDir);
|
|
90
|
+
};
|
|
91
|
+
exports.copyAssets = copyAssets;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
'marker:resolver';
|
|
95
|
+
|
|
96
|
+
function get_define(name) {
|
|
97
|
+
if (defines[name]) {
|
|
98
|
+
return defines[name];
|
|
99
|
+
}
|
|
100
|
+
else if (defines[name + '/index']) {
|
|
101
|
+
return defines[name + '/index'];
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
var dependencies = ['exports'];
|
|
105
|
+
var factory = function (exports) {
|
|
106
|
+
try {
|
|
107
|
+
Object.defineProperty(exports, "__cjsModule", { value: true });
|
|
108
|
+
Object.defineProperty(exports, "default", { value: require(name) });
|
|
109
|
+
}
|
|
110
|
+
catch (_a) {
|
|
111
|
+
throw Error(['module "', name, '" not found.'].join(''));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
return { dependencies: dependencies, factory: factory };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
var instances = {};
|
|
118
|
+
function resolve(name) {
|
|
119
|
+
if (instances[name]) {
|
|
120
|
+
return instances[name];
|
|
121
|
+
}
|
|
122
|
+
if (name === 'exports') {
|
|
123
|
+
return {};
|
|
124
|
+
}
|
|
125
|
+
var define = get_define(name);
|
|
126
|
+
if (typeof define.factory !== 'function') {
|
|
127
|
+
return define.factory;
|
|
128
|
+
}
|
|
129
|
+
instances[name] = {};
|
|
130
|
+
var dependencies = define.dependencies.map(function (name) { return resolve(name); });
|
|
131
|
+
define.factory.apply(define, dependencies);
|
|
132
|
+
var exports = dependencies[define.dependencies.indexOf('exports')];
|
|
133
|
+
instances[name] = (exports['__cjsModule']) ? exports.default : exports;
|
|
134
|
+
return instances[name];
|
|
135
|
+
}
|
|
136
|
+
if (entry[0] !== null) {
|
|
137
|
+
return resolve(entry[0]);
|
|
138
|
+
}
|
|
139
|
+
})();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare module "copy-assets" {
|
|
2
|
+
/**
|
|
3
|
+
* Copy asset directory from source to destination
|
|
4
|
+
*
|
|
5
|
+
* @param assetDir - destination directory
|
|
6
|
+
* @param assets - source directory
|
|
7
|
+
*/
|
|
8
|
+
export const copyAssets: (assetDir: string, assets: any) => void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=copy-assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-assets.d.ts","sourceRoot":"","sources":["../src/shared/utils/copy-assets.ts"],"names":[],"mappings":";IAoEA;;;;;OAKG;IACH,MAAM,CAAC,MAAM,UAAU,aAAc,MAAM,UAAU,GAAG,SAKvD,CAAA"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import tinycolor from 'tinycolor2'
|
|
2
|
-
|
|
3
|
-
import { hslColorMap } from './hslColorMap'
|
|
4
|
-
|
|
5
|
-
type ColorMap = {
|
|
6
|
-
[key: string]: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Color palette based on the structure thats compatible with Tailwind config
|
|
11
|
-
*/
|
|
12
|
-
export const colorPalette = {
|
|
13
|
-
neutral: hslColorMap(
|
|
14
|
-
206,
|
|
15
|
-
30,
|
|
16
|
-
[
|
|
17
|
-
10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
|
|
18
|
-
97, 98, 100,
|
|
19
|
-
]
|
|
20
|
-
),
|
|
21
|
-
honey: hslColorMap(42, 93, [72, 75, 82, 85, 92]),
|
|
22
|
-
coral: hslColorMap(14, 87, [65, 74, 75, 84, 85, 94]),
|
|
23
|
-
warm: hslColorMap(25, 100, [77, 87, 97]),
|
|
24
|
-
'sea-salt': hslColorMap(180, 17, [57, 67, 88]),
|
|
25
|
-
cloud: hslColorMap(200, 38, [43, 75, 88]),
|
|
26
|
-
ocean: hslColorMap(209, 38, [38, 75, 88]),
|
|
27
|
-
sky: hslColorMap(209, 64, [64, 75, 85]),
|
|
28
|
-
lukso: hslColorMap(335, 33, [70, 80, 90]),
|
|
29
|
-
yellow: hslColorMap(36, 100, [55, 65, 75, 85]),
|
|
30
|
-
green: hslColorMap(135, 57, [45, 54, 75, 85]),
|
|
31
|
-
blue: hslColorMap(216, 96, [50, 60, 75, 85]),
|
|
32
|
-
red: hslColorMap(0, 75, [55, 65, 75, 85]),
|
|
33
|
-
purple: hslColorMap(230, 24, [94, 82, 63, 58, 51, 41, 31, 15]),
|
|
34
|
-
pink: hslColorMap(11, 73, [97, 96, 95, 94, 93, 92, 91, 90]),
|
|
35
|
-
'gradient-1': {
|
|
36
|
-
start: '#D39B9D',
|
|
37
|
-
end: '#9071D1',
|
|
38
|
-
},
|
|
39
|
-
'gradient-2': {
|
|
40
|
-
start: '#F8DAD3',
|
|
41
|
-
end: '#CC99AE',
|
|
42
|
-
},
|
|
43
|
-
'gradient-3': {
|
|
44
|
-
start: tinycolor({ h: 230, s: 20, l: 28 }).toHexString(),
|
|
45
|
-
end: tinycolor({ h: 230, s: 24, l: 51 }).toHexString(),
|
|
46
|
-
},
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Splits a color map into smaller color maps
|
|
51
|
-
*
|
|
52
|
-
* @param colors - color map to split
|
|
53
|
-
* @param from - index to start from
|
|
54
|
-
* @param to - index to end at
|
|
55
|
-
* @returns a new color map
|
|
56
|
-
*/
|
|
57
|
-
const splitColor = (colors: ColorMap, from: number, to: number): ColorMap => {
|
|
58
|
-
return Object.keys(colors)
|
|
59
|
-
.slice(from, to)
|
|
60
|
-
.reduce((result, key) => {
|
|
61
|
-
result[key] = colors[key]
|
|
62
|
-
|
|
63
|
-
return result
|
|
64
|
-
}, {})
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Color map subsets that can be used in the Storybook preview
|
|
69
|
-
*/
|
|
70
|
-
export const neutral1 = splitColor(colorPalette.neutral, 0, 8)
|
|
71
|
-
export const neutral2 = splitColor(colorPalette.neutral, 8, 16)
|
|
72
|
-
export const neutral3 = splitColor(
|
|
73
|
-
colorPalette.neutral,
|
|
74
|
-
16,
|
|
75
|
-
Object.keys(colorPalette.neutral).length
|
|
76
|
-
)
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import tinycolor from 'tinycolor2'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Generates a color map for a given hue, saturation and lightness values
|
|
5
|
-
*
|
|
6
|
-
* @param {*} h - hue
|
|
7
|
-
* @param {*} s - saturation
|
|
8
|
-
* @param {*} l - lightness as an array
|
|
9
|
-
* @returns object containing lightness as key and hex color as value e.g. { 10: '#000000', 20: '#111111' }
|
|
10
|
-
*/
|
|
11
|
-
export const hslColorMap = (h, s, l) => {
|
|
12
|
-
const colors = {}
|
|
13
|
-
|
|
14
|
-
for (let i = 0; i < l.length; i++) {
|
|
15
|
-
const lightness = l[i]
|
|
16
|
-
colors[lightness] = tinycolor({ h, s, l: lightness }).toHexString()
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return colors
|
|
20
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|