@empoweredvote/ev-ui 0.7.1 → 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/README.md +111 -111
- package/dist/index.js +532 -486
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +198 -152
- package/dist/index.mjs.map +1 -1
- package/package.json +47 -45
- package/src/tailwind-preset.js +81 -81
- package/src/tokens.js +415 -415
package/package.json
CHANGED
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@empoweredvote/ev-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/EmpoweredVote/ev-ui.git"
|
|
8
|
-
},
|
|
9
|
-
"main": "dist/index.js",
|
|
10
|
-
"module": "dist/index.mjs",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.mjs",
|
|
14
|
-
"require": "./dist/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./tokens": {
|
|
17
|
-
"import": "./src/tokens.js"
|
|
18
|
-
},
|
|
19
|
-
"./tailwind-preset": {
|
|
20
|
-
"import": "./src/tailwind-preset.js"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"dist",
|
|
25
|
-
"src/tokens.js",
|
|
26
|
-
"src/tailwind-preset.js"
|
|
27
|
-
],
|
|
28
|
-
"publishConfig": {
|
|
29
|
-
"access": "public"
|
|
30
|
-
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"react": ">=17",
|
|
33
|
-
"react-dom": ">=17",
|
|
34
|
-
"@react-spring/web": ">=9"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@empoweredvote/ev-ui",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/EmpoweredVote/ev-ui.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/index.mjs",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.mjs",
|
|
14
|
+
"require": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./tokens": {
|
|
17
|
+
"import": "./src/tokens.js"
|
|
18
|
+
},
|
|
19
|
+
"./tailwind-preset": {
|
|
20
|
+
"import": "./src/tailwind-preset.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"src/tokens.js",
|
|
26
|
+
"src/tailwind-preset.js"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": ">=17",
|
|
33
|
+
"react-dom": ">=17",
|
|
34
|
+
"@react-spring/web": ">=9",
|
|
35
|
+
"@floating-ui/react": "^0.27.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"tsup": "^8.0.0",
|
|
39
|
+
"typescript": "^5.4.0",
|
|
40
|
+
"@react-spring/web": "^9.7.2",
|
|
41
|
+
"@floating-ui/react": "^0.27.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup",
|
|
45
|
+
"sync-penpot": "node scripts/sync-penpot-tokens.js"
|
|
46
|
+
}
|
|
47
|
+
}
|
package/src/tailwind-preset.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Empowered Vote Tailwind CSS Preset
|
|
3
|
-
* Import in any app's tailwind config or CSS:
|
|
4
|
-
*
|
|
5
|
-
* Tailwind v4 (CSS):
|
|
6
|
-
* @import "@empoweredvote/ev-ui/tailwind-preset";
|
|
7
|
-
*
|
|
8
|
-
* Tailwind v3 (config):
|
|
9
|
-
* presets: [require('@empoweredvote/ev-ui/tailwind-preset')]
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
colorScales, colors, fontSizes, fonts, spacing, borderRadius, breakpoints,
|
|
14
|
-
shadows, duration, easing, zIndex, opacity,
|
|
15
|
-
} from './tokens.js';
|
|
16
|
-
|
|
17
|
-
// Flatten color scales for Tailwind: ev-coral-500, ev-teal-050, etc.
|
|
18
|
-
const flatColors = {};
|
|
19
|
-
for (const [hue, shades] of Object.entries(colorScales)) {
|
|
20
|
-
for (const [step, value] of Object.entries(shades)) {
|
|
21
|
-
flatColors[`ev-${hue}-${step}`] = value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default {
|
|
26
|
-
theme: {
|
|
27
|
-
extend: {
|
|
28
|
-
colors: {
|
|
29
|
-
...flatColors,
|
|
30
|
-
'ev-coral': colors.evCoral,
|
|
31
|
-
'ev-muted-blue': colors.evMutedBlue,
|
|
32
|
-
'ev-light-blue': colors.evLightBlue,
|
|
33
|
-
'ev-yellow': colors.evYellow,
|
|
34
|
-
'ev-yellow-light': colors.evYellowLight,
|
|
35
|
-
'ev-yellow-dark': colors.evYellowDark,
|
|
36
|
-
// Legacy aliases
|
|
37
|
-
'ev-teal': colors.evTeal,
|
|
38
|
-
'ev-teal-dark': colors.evTealDark,
|
|
39
|
-
'ev-black': colors.black,
|
|
40
|
-
'ev-bg-light': colors.bgLight,
|
|
41
|
-
// State colors
|
|
42
|
-
'ev-error': colors.error,
|
|
43
|
-
'ev-error-light': colors.errorLight,
|
|
44
|
-
'ev-success': colors.success,
|
|
45
|
-
'ev-success-light': colors.successLight,
|
|
46
|
-
'ev-warning': colors.warning,
|
|
47
|
-
'ev-warning-light': colors.warningLight,
|
|
48
|
-
'ev-info': colors.info,
|
|
49
|
-
'ev-info-light': colors.infoLight,
|
|
50
|
-
},
|
|
51
|
-
fontFamily: {
|
|
52
|
-
manrope: [fonts.primary],
|
|
53
|
-
},
|
|
54
|
-
fontSize: fontSizes,
|
|
55
|
-
spacing,
|
|
56
|
-
borderRadius,
|
|
57
|
-
screens: breakpoints,
|
|
58
|
-
boxShadow: shadows,
|
|
59
|
-
zIndex,
|
|
60
|
-
opacity,
|
|
61
|
-
transitionDuration: duration,
|
|
62
|
-
transitionTimingFunction: easing,
|
|
63
|
-
animation: {
|
|
64
|
-
'fade-in': 'ev-fade-in 200ms cubic-bezier(0, 0, 0.2, 1)',
|
|
65
|
-
'fade-out': 'ev-fade-out 150ms cubic-bezier(0.4, 0, 1, 1)',
|
|
66
|
-
'slide-up': 'ev-slide-up 350ms cubic-bezier(0, 0, 0.2, 1)',
|
|
67
|
-
'slide-down': 'ev-slide-down 350ms cubic-bezier(0, 0, 0.2, 1)',
|
|
68
|
-
'scale-in': 'ev-scale-in 200ms cubic-bezier(0.34, 1.56, 0.64, 1)',
|
|
69
|
-
'skeleton': 'ev-skeleton 1.5s ease-in-out infinite',
|
|
70
|
-
},
|
|
71
|
-
keyframes: {
|
|
72
|
-
'ev-fade-in': { from: { opacity: '0' }, to: { opacity: '1' } },
|
|
73
|
-
'ev-fade-out': { from: { opacity: '1' }, to: { opacity: '0' } },
|
|
74
|
-
'ev-slide-up': { from: { opacity: '0', transform: 'translateY(8px)' }, to: { opacity: '1', transform: 'translateY(0)' } },
|
|
75
|
-
'ev-slide-down': { from: { opacity: '0', transform: 'translateY(-8px)' }, to: { opacity: '1', transform: 'translateY(0)' } },
|
|
76
|
-
'ev-scale-in': { from: { opacity: '0', transform: 'scale(0.95)' }, to: { opacity: '1', transform: 'scale(1)' } },
|
|
77
|
-
'ev-skeleton': { '0%, 100%': { opacity: '0.4' }, '50%': { opacity: '1' } },
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Empowered Vote Tailwind CSS Preset
|
|
3
|
+
* Import in any app's tailwind config or CSS:
|
|
4
|
+
*
|
|
5
|
+
* Tailwind v4 (CSS):
|
|
6
|
+
* @import "@empoweredvote/ev-ui/tailwind-preset";
|
|
7
|
+
*
|
|
8
|
+
* Tailwind v3 (config):
|
|
9
|
+
* presets: [require('@empoweredvote/ev-ui/tailwind-preset')]
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
colorScales, colors, fontSizes, fonts, spacing, borderRadius, breakpoints,
|
|
14
|
+
shadows, duration, easing, zIndex, opacity,
|
|
15
|
+
} from './tokens.js';
|
|
16
|
+
|
|
17
|
+
// Flatten color scales for Tailwind: ev-coral-500, ev-teal-050, etc.
|
|
18
|
+
const flatColors = {};
|
|
19
|
+
for (const [hue, shades] of Object.entries(colorScales)) {
|
|
20
|
+
for (const [step, value] of Object.entries(shades)) {
|
|
21
|
+
flatColors[`ev-${hue}-${step}`] = value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
theme: {
|
|
27
|
+
extend: {
|
|
28
|
+
colors: {
|
|
29
|
+
...flatColors,
|
|
30
|
+
'ev-coral': colors.evCoral,
|
|
31
|
+
'ev-muted-blue': colors.evMutedBlue,
|
|
32
|
+
'ev-light-blue': colors.evLightBlue,
|
|
33
|
+
'ev-yellow': colors.evYellow,
|
|
34
|
+
'ev-yellow-light': colors.evYellowLight,
|
|
35
|
+
'ev-yellow-dark': colors.evYellowDark,
|
|
36
|
+
// Legacy aliases
|
|
37
|
+
'ev-teal': colors.evTeal,
|
|
38
|
+
'ev-teal-dark': colors.evTealDark,
|
|
39
|
+
'ev-black': colors.black,
|
|
40
|
+
'ev-bg-light': colors.bgLight,
|
|
41
|
+
// State colors
|
|
42
|
+
'ev-error': colors.error,
|
|
43
|
+
'ev-error-light': colors.errorLight,
|
|
44
|
+
'ev-success': colors.success,
|
|
45
|
+
'ev-success-light': colors.successLight,
|
|
46
|
+
'ev-warning': colors.warning,
|
|
47
|
+
'ev-warning-light': colors.warningLight,
|
|
48
|
+
'ev-info': colors.info,
|
|
49
|
+
'ev-info-light': colors.infoLight,
|
|
50
|
+
},
|
|
51
|
+
fontFamily: {
|
|
52
|
+
manrope: [fonts.primary],
|
|
53
|
+
},
|
|
54
|
+
fontSize: fontSizes,
|
|
55
|
+
spacing,
|
|
56
|
+
borderRadius,
|
|
57
|
+
screens: breakpoints,
|
|
58
|
+
boxShadow: shadows,
|
|
59
|
+
zIndex,
|
|
60
|
+
opacity,
|
|
61
|
+
transitionDuration: duration,
|
|
62
|
+
transitionTimingFunction: easing,
|
|
63
|
+
animation: {
|
|
64
|
+
'fade-in': 'ev-fade-in 200ms cubic-bezier(0, 0, 0.2, 1)',
|
|
65
|
+
'fade-out': 'ev-fade-out 150ms cubic-bezier(0.4, 0, 1, 1)',
|
|
66
|
+
'slide-up': 'ev-slide-up 350ms cubic-bezier(0, 0, 0.2, 1)',
|
|
67
|
+
'slide-down': 'ev-slide-down 350ms cubic-bezier(0, 0, 0.2, 1)',
|
|
68
|
+
'scale-in': 'ev-scale-in 200ms cubic-bezier(0.34, 1.56, 0.64, 1)',
|
|
69
|
+
'skeleton': 'ev-skeleton 1.5s ease-in-out infinite',
|
|
70
|
+
},
|
|
71
|
+
keyframes: {
|
|
72
|
+
'ev-fade-in': { from: { opacity: '0' }, to: { opacity: '1' } },
|
|
73
|
+
'ev-fade-out': { from: { opacity: '1' }, to: { opacity: '0' } },
|
|
74
|
+
'ev-slide-up': { from: { opacity: '0', transform: 'translateY(8px)' }, to: { opacity: '1', transform: 'translateY(0)' } },
|
|
75
|
+
'ev-slide-down': { from: { opacity: '0', transform: 'translateY(-8px)' }, to: { opacity: '1', transform: 'translateY(0)' } },
|
|
76
|
+
'ev-scale-in': { from: { opacity: '0', transform: 'scale(0.95)' }, to: { opacity: '1', transform: 'scale(1)' } },
|
|
77
|
+
'ev-skeleton': { '0%, 100%': { opacity: '0.4' }, '50%': { opacity: '1' } },
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|