@luminescent/ui 0.7.6 → 0.8.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/LICENSE +661 -661
- package/README.md +48 -48
- package/lib/index.qwik.cjs +302 -545
- package/lib/index.qwik.mjs +303 -546
- package/lib-types/components/elements/ColorInput.d.ts +12 -2
- package/lib-types/components/logos/LoadingIcon.d.ts +8 -0
- package/lib-types/utils/simple-color-picker/color.d.ts +6 -21
- package/package.json +62 -62
- package/src/tailwind.config.js +71 -71
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import type { QRL } from '@builder.io/qwik';
|
|
1
|
+
import type { PropsOf, QRL } from '@builder.io/qwik';
|
|
2
2
|
import type { TextInputRawProps } from './TextInput';
|
|
3
3
|
export interface ColorInputProps extends Omit<TextInputRawProps, 'onInput$' | 'children'> {
|
|
4
|
-
onInput$?: QRL<(color: string
|
|
4
|
+
onInput$?: QRL<(color: string) => void>;
|
|
5
5
|
value?: string;
|
|
6
6
|
presetColors?: string[];
|
|
7
7
|
preview?: 'left' | 'right' | 'top' | 'bottom' | 'full';
|
|
8
|
+
id: string;
|
|
8
9
|
}
|
|
9
10
|
export declare const ColorInput: import("@builder.io/qwik").Component<ColorInputProps>;
|
|
11
|
+
export interface ColorPickerProps extends Omit<PropsOf<'div'>, 'class' | 'onInput$'> {
|
|
12
|
+
class: {
|
|
13
|
+
[key: string]: boolean;
|
|
14
|
+
};
|
|
15
|
+
onInput$?: QRL<(color: string) => void>;
|
|
16
|
+
color: string;
|
|
17
|
+
colors: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare const ColorPickerRaw: import("@builder.io/qwik").Component<ColorPickerProps>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
2
|
+
export declare function getMousePosition(e: MouseEvent | TouchEvent): {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const pad2: (c: string) => string;
|
|
1
7
|
export type RGBAColor = {
|
|
2
8
|
r: number;
|
|
3
9
|
g: number;
|
|
@@ -10,26 +16,6 @@ export type HSVAColor = {
|
|
|
10
16
|
v: number;
|
|
11
17
|
a?: number;
|
|
12
18
|
};
|
|
13
|
-
export declare class Color {
|
|
14
|
-
private _rgba;
|
|
15
|
-
private _hsva;
|
|
16
|
-
private _hexNumber;
|
|
17
|
-
private _brightness;
|
|
18
|
-
private _hexString;
|
|
19
|
-
private _isDark;
|
|
20
|
-
private _isLight;
|
|
21
|
-
constructor(color: number | string);
|
|
22
|
-
fromHex(color?: number | string): void;
|
|
23
|
-
fromHsv(color: HSVAColor): void;
|
|
24
|
-
private _updateBrightness;
|
|
25
|
-
get rgb(): RGBAColor;
|
|
26
|
-
get hsv(): HSVAColor;
|
|
27
|
-
get hex(): number;
|
|
28
|
-
get hexString(): string;
|
|
29
|
-
get brightness(): number;
|
|
30
|
-
get isDark(): boolean;
|
|
31
|
-
get isLight(): boolean;
|
|
32
|
-
}
|
|
33
19
|
export declare function getBrightness(color: RGBAColor): number;
|
|
34
20
|
export declare function hexNumberToRgb(color: number): {
|
|
35
21
|
r: number;
|
|
@@ -37,7 +23,6 @@ export declare function hexNumberToRgb(color: number): {
|
|
|
37
23
|
b: number;
|
|
38
24
|
};
|
|
39
25
|
export declare function rgbToHex(color: RGBAColor): string;
|
|
40
|
-
export declare const numberToHexString: (color: number) => string;
|
|
41
26
|
export declare const hexStringToNumber: (color: string) => number;
|
|
42
27
|
export declare function hsvToRgb(color: HSVAColor): {
|
|
43
28
|
r: number;
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@luminescent/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Luminescent UI library",
|
|
5
|
-
"main": "./lib/index.qwik.mjs",
|
|
6
|
-
"qwik": "./lib/index.qwik.mjs",
|
|
7
|
-
"types": "./lib-types/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./lib/index.qwik.mjs",
|
|
11
|
-
"require": "./lib/index.qwik.cjs",
|
|
12
|
-
"types": "./lib-types/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./config": "./src/tailwind.config.js"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"lib",
|
|
18
|
-
"lib-types",
|
|
19
|
-
"src/tailwind.config.js"
|
|
20
|
-
],
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=15.0.0"
|
|
23
|
-
},
|
|
24
|
-
"license": "AGPL-3.0-or-later",
|
|
25
|
-
"private": false,
|
|
26
|
-
"type": "module",
|
|
27
|
-
"publishConfig": {
|
|
28
|
-
"access": "public"
|
|
29
|
-
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "qwik build",
|
|
32
|
-
"build.lib": "vite build --mode lib",
|
|
33
|
-
"build.types": "tsc --emitDeclarationOnly",
|
|
34
|
-
"dev": "vite --mode ssr",
|
|
35
|
-
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
|
|
36
|
-
"lint": "eslint \"src/**/*.ts*\"",
|
|
37
|
-
"release": "np",
|
|
38
|
-
"start": "vite --open --mode ssr",
|
|
39
|
-
"test": "echo \"No test specified\" && exit 0",
|
|
40
|
-
"qwik": "qwik"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@anuragroy/tailwindcss-animate": "^1.0.6",
|
|
44
|
-
"@builder.io/qwik": "1.4.5",
|
|
45
|
-
"@builder.io/qwik-city": "^1.4.5",
|
|
46
|
-
"@types/eslint": "^8.56.
|
|
47
|
-
"@types/node": "^20.11.
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
49
|
-
"@typescript-eslint/parser": "^7.0.2",
|
|
50
|
-
"autoprefixer": "^10.4.17",
|
|
51
|
-
"chart.js": "^4.4.1",
|
|
52
|
-
"eslint": "^8.
|
|
53
|
-
"eslint-plugin-qwik": "latest",
|
|
54
|
-
"np": "^9.2.0",
|
|
55
|
-
"postcss": "^8.4.35",
|
|
56
|
-
"tailwindcss": "3.4.1",
|
|
57
|
-
"typescript": "5.3.3",
|
|
58
|
-
"undici": "*",
|
|
59
|
-
"vite": "^5.1.
|
|
60
|
-
"vite-tsconfig-paths": "^4.3.1"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@luminescent/ui",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Luminescent UI library",
|
|
5
|
+
"main": "./lib/index.qwik.mjs",
|
|
6
|
+
"qwik": "./lib/index.qwik.mjs",
|
|
7
|
+
"types": "./lib-types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./lib/index.qwik.mjs",
|
|
11
|
+
"require": "./lib/index.qwik.cjs",
|
|
12
|
+
"types": "./lib-types/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./config": "./src/tailwind.config.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"lib",
|
|
18
|
+
"lib-types",
|
|
19
|
+
"src/tailwind.config.js"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=15.0.0"
|
|
23
|
+
},
|
|
24
|
+
"license": "AGPL-3.0-or-later",
|
|
25
|
+
"private": false,
|
|
26
|
+
"type": "module",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "qwik build",
|
|
32
|
+
"build.lib": "vite build --mode lib",
|
|
33
|
+
"build.types": "tsc --emitDeclarationOnly",
|
|
34
|
+
"dev": "vite --mode ssr",
|
|
35
|
+
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
|
|
36
|
+
"lint": "eslint \"src/**/*.ts*\"",
|
|
37
|
+
"release": "np",
|
|
38
|
+
"start": "vite --open --mode ssr",
|
|
39
|
+
"test": "echo \"No test specified\" && exit 0",
|
|
40
|
+
"qwik": "qwik"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@anuragroy/tailwindcss-animate": "^1.0.6",
|
|
44
|
+
"@builder.io/qwik": "1.4.5",
|
|
45
|
+
"@builder.io/qwik-city": "^1.4.5",
|
|
46
|
+
"@types/eslint": "^8.56.3",
|
|
47
|
+
"@types/node": "^20.11.20",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
49
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
50
|
+
"autoprefixer": "^10.4.17",
|
|
51
|
+
"chart.js": "^4.4.1",
|
|
52
|
+
"eslint": "^8.57.0",
|
|
53
|
+
"eslint-plugin-qwik": "latest",
|
|
54
|
+
"np": "^9.2.0",
|
|
55
|
+
"postcss": "^8.4.35",
|
|
56
|
+
"tailwindcss": "3.4.1",
|
|
57
|
+
"typescript": "5.3.3",
|
|
58
|
+
"undici": "*",
|
|
59
|
+
"vite": "^5.1.4",
|
|
60
|
+
"vite-tsconfig-paths": "^4.3.1"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/tailwind.config.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
function getBlobKeyFrame() {
|
|
2
|
-
const translateXPercentages = [0, 19, 38, 57, 76];
|
|
3
|
-
const translateYPercentages = [0, 12, 25, 38, 50];
|
|
4
|
-
const scaleValues = [0.8, 1, 1.2, 1.4];
|
|
5
|
-
|
|
6
|
-
const translateX0Key = Math.floor(Math.random() * 70);
|
|
7
|
-
const translateX0 = Math.floor(Math.random() * 70);
|
|
8
|
-
translateXPercentages.splice(translateX0Key, 1);
|
|
9
|
-
const translateX1Key = Math.floor(Math.random() * translateXPercentages.length);
|
|
10
|
-
const translateX1 = translateXPercentages[translateX1Key];
|
|
11
|
-
translateXPercentages.splice(translateX1Key, 1);
|
|
12
|
-
const translateX2Key = Math.floor(Math.random() * translateXPercentages.length);
|
|
13
|
-
const translateX2 = translateXPercentages[translateX2Key];
|
|
14
|
-
translateXPercentages.splice(translateX2Key, 1);
|
|
15
|
-
const translateX3Key = Math.floor(Math.random() * translateXPercentages.length);
|
|
16
|
-
const translateX3 = translateXPercentages[translateX3Key];
|
|
17
|
-
translateXPercentages.splice(translateX3Key, 1);
|
|
18
|
-
|
|
19
|
-
const translateY0Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
20
|
-
const translateY0 = translateYPercentages[translateY0Key];
|
|
21
|
-
translateYPercentages.splice(translateY0Key, 1);
|
|
22
|
-
const translateY1Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
23
|
-
const translateY1 = translateYPercentages[translateY1Key];
|
|
24
|
-
translateYPercentages.splice(translateY1Key, 1);
|
|
25
|
-
const translateY2Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
26
|
-
const translateY2 = translateYPercentages[translateY2Key];
|
|
27
|
-
translateYPercentages.splice(translateY2Key, 1);
|
|
28
|
-
const translateY3Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
29
|
-
const translateY3 = translateYPercentages[translateY3Key];
|
|
30
|
-
translateYPercentages.splice(translateY3Key, 1);
|
|
31
|
-
|
|
32
|
-
const scale0 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
33
|
-
const scale1 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
34
|
-
const scale2 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
35
|
-
const scale3 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
36
|
-
|
|
37
|
-
const keyframe = {
|
|
38
|
-
'0%, 100%': { transform: `translate(${translateX0}cqw, ${translateY0}cqh) scale(${scale0})` },
|
|
39
|
-
'25%': { transform: `translate(${translateX1}cqw, ${translateY1}cqh) scale(${scale1})` },
|
|
40
|
-
'50%': { transform: `translate(${translateX2}cqw, ${translateY2}cqh) scale(${scale2})` },
|
|
41
|
-
'75%': { transform: `translate(${translateX3}cqw, ${translateY3}cqh) scale(${scale3})` },
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return keyframe;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = {
|
|
48
|
-
content: ['./node_modules/@luminescent/ui/**/*.{mjs,cjs}'],
|
|
49
|
-
theme: {
|
|
50
|
-
extend: {
|
|
51
|
-
animation: {
|
|
52
|
-
blob: 'blob 15s infinite',
|
|
53
|
-
blob1: 'blob1 15s infinite',
|
|
54
|
-
blob2: 'blob2 15s infinite',
|
|
55
|
-
blob3: 'blob3 15s infinite',
|
|
56
|
-
blob4: 'blob4 15s infinite',
|
|
57
|
-
blob5: 'blob5 15s infinite',
|
|
58
|
-
blob6: 'blob6 15s infinite',
|
|
59
|
-
float: 'float 6s infinite',
|
|
60
|
-
},
|
|
61
|
-
keyframes: {
|
|
62
|
-
blob: getBlobKeyFrame(),
|
|
63
|
-
blob1: getBlobKeyFrame(),
|
|
64
|
-
blob2: getBlobKeyFrame(),
|
|
65
|
-
blob3: getBlobKeyFrame(),
|
|
66
|
-
blob4: getBlobKeyFrame(),
|
|
67
|
-
blob5: getBlobKeyFrame(),
|
|
68
|
-
blob6: getBlobKeyFrame(),
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
1
|
+
function getBlobKeyFrame() {
|
|
2
|
+
const translateXPercentages = [0, 19, 38, 57, 76];
|
|
3
|
+
const translateYPercentages = [0, 12, 25, 38, 50];
|
|
4
|
+
const scaleValues = [0.8, 1, 1.2, 1.4];
|
|
5
|
+
|
|
6
|
+
const translateX0Key = Math.floor(Math.random() * 70);
|
|
7
|
+
const translateX0 = Math.floor(Math.random() * 70);
|
|
8
|
+
translateXPercentages.splice(translateX0Key, 1);
|
|
9
|
+
const translateX1Key = Math.floor(Math.random() * translateXPercentages.length);
|
|
10
|
+
const translateX1 = translateXPercentages[translateX1Key];
|
|
11
|
+
translateXPercentages.splice(translateX1Key, 1);
|
|
12
|
+
const translateX2Key = Math.floor(Math.random() * translateXPercentages.length);
|
|
13
|
+
const translateX2 = translateXPercentages[translateX2Key];
|
|
14
|
+
translateXPercentages.splice(translateX2Key, 1);
|
|
15
|
+
const translateX3Key = Math.floor(Math.random() * translateXPercentages.length);
|
|
16
|
+
const translateX3 = translateXPercentages[translateX3Key];
|
|
17
|
+
translateXPercentages.splice(translateX3Key, 1);
|
|
18
|
+
|
|
19
|
+
const translateY0Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
20
|
+
const translateY0 = translateYPercentages[translateY0Key];
|
|
21
|
+
translateYPercentages.splice(translateY0Key, 1);
|
|
22
|
+
const translateY1Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
23
|
+
const translateY1 = translateYPercentages[translateY1Key];
|
|
24
|
+
translateYPercentages.splice(translateY1Key, 1);
|
|
25
|
+
const translateY2Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
26
|
+
const translateY2 = translateYPercentages[translateY2Key];
|
|
27
|
+
translateYPercentages.splice(translateY2Key, 1);
|
|
28
|
+
const translateY3Key = Math.floor(Math.random() * translateYPercentages.length);
|
|
29
|
+
const translateY3 = translateYPercentages[translateY3Key];
|
|
30
|
+
translateYPercentages.splice(translateY3Key, 1);
|
|
31
|
+
|
|
32
|
+
const scale0 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
33
|
+
const scale1 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
34
|
+
const scale2 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
35
|
+
const scale3 = scaleValues[Math.floor(Math.random() * scaleValues.length)];
|
|
36
|
+
|
|
37
|
+
const keyframe = {
|
|
38
|
+
'0%, 100%': { transform: `translate(${translateX0}cqw, ${translateY0}cqh) scale(${scale0})` },
|
|
39
|
+
'25%': { transform: `translate(${translateX1}cqw, ${translateY1}cqh) scale(${scale1})` },
|
|
40
|
+
'50%': { transform: `translate(${translateX2}cqw, ${translateY2}cqh) scale(${scale2})` },
|
|
41
|
+
'75%': { transform: `translate(${translateX3}cqw, ${translateY3}cqh) scale(${scale3})` },
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return keyframe;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = {
|
|
48
|
+
content: ['./node_modules/@luminescent/ui/**/*.{mjs,cjs}'],
|
|
49
|
+
theme: {
|
|
50
|
+
extend: {
|
|
51
|
+
animation: {
|
|
52
|
+
blob: 'blob 15s infinite',
|
|
53
|
+
blob1: 'blob1 15s infinite',
|
|
54
|
+
blob2: 'blob2 15s infinite',
|
|
55
|
+
blob3: 'blob3 15s infinite',
|
|
56
|
+
blob4: 'blob4 15s infinite',
|
|
57
|
+
blob5: 'blob5 15s infinite',
|
|
58
|
+
blob6: 'blob6 15s infinite',
|
|
59
|
+
float: 'float 6s infinite',
|
|
60
|
+
},
|
|
61
|
+
keyframes: {
|
|
62
|
+
blob: getBlobKeyFrame(),
|
|
63
|
+
blob1: getBlobKeyFrame(),
|
|
64
|
+
blob2: getBlobKeyFrame(),
|
|
65
|
+
blob3: getBlobKeyFrame(),
|
|
66
|
+
blob4: getBlobKeyFrame(),
|
|
67
|
+
blob5: getBlobKeyFrame(),
|
|
68
|
+
blob6: getBlobKeyFrame(),
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
72
|
};
|