winduum 0.1.4 → 0.1.5
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/dist/tailwind.css +1 -1
- package/package.json +16 -12
- package/src/App.vue +1 -1
- package/src/index.html +1 -0
- package/src/scripts/{Libraries → libraries}/Dialog.js +0 -0
- package/src/styles/{Base → base}/config.css +0 -0
- package/src/styles/{Base → base}/default.css +0 -0
- package/src/styles/{Base → base}/icons.css +0 -0
- package/src/styles/{Base → base}/keyframes.css +0 -0
- package/src/styles/{Base → base}/reset.css +0 -0
- package/src/styles/{Base → base}/tailwind/base.css +2 -2
- package/src/styles/{Base → base}/theme/dark.css +0 -0
- package/src/styles/{Base → base}/theme/default.css +0 -0
- package/src/styles/{Components → components}/+.css +0 -0
- package/src/styles/{Components → components}/Dialog.css +0 -0
- package/src/styles/{Components → components}/Drawer.css +0 -0
- package/src/styles/{Components → components}/Dropdown.css +0 -0
- package/src/styles/{Components → components}/Field.css +0 -0
- package/src/styles/{Components → components}/Table.css +0 -0
- package/src/styles/{Libraries → libraries}/+.css +0 -0
- package/src/styles/{Libraries → libraries}/Dialog.css +0 -0
- package/src/styles/{Libraries → libraries}/Hint.css +0 -0
- package/src/styles/main.css +10 -10
- package/src/styles/tailwind.css +1 -1
- package/src/styles/{Ui → ui}/+.css +0 -0
- package/src/styles/{Ui → ui}/Badge.css +0 -0
- package/src/styles/{Ui → ui}/Btn.css +0 -0
- package/src/styles/{Ui → ui}/Checkbox.css +0 -0
- package/src/styles/{Ui → ui}/Heading.css +0 -0
- package/src/styles/{Ui → ui}/Image.css +0 -0
- package/src/styles/{Ui → ui}/Info.css +0 -0
- package/src/styles/{Ui → ui}/Input.css +0 -0
- package/src/styles/{Ui → ui}/Label.css +0 -0
- package/src/styles/{Ui → ui}/Link.css +0 -0
- package/src/styles/{Ui → ui}/Notice.css +0 -0
- package/src/styles/{Ui → ui}/Progress.css +0 -0
- package/src/styles/{Ui → ui}/Radio.css +0 -0
- package/src/styles/{Ui → ui}/Range.css +0 -0
- package/src/styles/{Ui → ui}/Select.css +0 -0
- package/src/styles/{Ui → ui}/Switch.css +0 -0
- package/src/styles/{Ui → ui}/Text.css +0 -0
- package/src/styles/{Ui → ui}/Title.css +0 -0
- package/tailwind.config.cjs +1 -53
- package/utils/tailwind.cjs +175 -0
- package/utils/tailwind.js +164 -0
- package/utils/helpers.cjs +0 -67
- package/utils/helpers.js +0 -59
package/dist/tailwind.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-3{grid-column:span 3 / span 3}.col-span-12{grid-column:span 12 / span 12}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.w-full{width:100%}.w-24{width:6rem}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.gap-4{gap:1rem}.gap-2{gap:.5rem}.gap-8{gap:2rem}.rounded-full{border-radius:var(--rounded-full)}.rounded{border-radius:var(--rounded)}.bg-blue-100\/10{background-color:#dbeafe1a}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(var(--color-secondary) / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(var(--color-accent) / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(var(--color-primary) / var(--tw-bg-opacity))}.bg-info{--tw-bg-opacity: 1;background-color:rgb(var(--color-info) / var(--tw-bg-opacity))}.bg-warning{--tw-bg-opacity: 1;background-color:rgb(var(--color-warning) / var(--tw-bg-opacity))}.bg-error{--tw-bg-opacity: 1;background-color:rgb(var(--color-error) / var(--tw-bg-opacity))}.bg-success{--tw-bg-opacity: 1;background-color:rgb(var(--color-success) / var(--tw-bg-opacity))}.bg-light{--tw-bg-opacity: 1;background-color:rgb(var(--color-light) / var(--tw-bg-opacity))}.bg-dark{--tw-bg-opacity: 1;background-color:rgb(var(--color-dark) / var(--tw-bg-opacity))}.bg-default{--tw-bg-opacity: 1;background-color:rgb(var(--color-default) / var(--tw-bg-opacity))}.bg-current{--tw-bg-opacity: 1;background-color:rgb(var(--color-current) / var(--tw-bg-opacity))}.bg-background{--tw-bg-opacity: 1;background-color:rgb(var(--color-background) / var(--tw-bg-opacity))}.bg-opacity-10{--tw-bg-opacity: .1}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-purple-600{--tw-gradient-from: #9333ea;--tw-gradient-to: rgb(147 51 234 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-500{--tw-gradient-to: #3b82f6}.p-md{padding:var(--spacing-md)}.p-xs{padding:var(--spacing-xs)}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.font-primary{font-family:var(--font-primary)}.font-secondary{font-family:var(--font-secondary)}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:var(--font-bold)}.font-light{font-weight:var(--font-light)}.font-normal{font-weight:var(--font-normal)}.font-medium{font-weight:var(--font-medium)}.font-semibold{font-weight:var(--font-semibold)}.font-extrabold{font-weight:var(--font-extrabold)}.uppercase{text-transform:uppercase}.
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-3{grid-column:span 3 / span 3}.col-span-12{grid-column:span 12 / span 12}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.w-full{width:100%}.w-24{width:6rem}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.gap-4{gap:1rem}.gap-2{gap:.5rem}.gap-8{gap:2rem}.rounded-full{border-radius:var(--rounded-full)}.rounded{border-radius:var(--rounded)}.bg-blue-100\/10{background-color:#dbeafe1a}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(var(--color-secondary) / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(var(--color-accent) / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(var(--color-primary) / var(--tw-bg-opacity))}.bg-info{--tw-bg-opacity: 1;background-color:rgb(var(--color-info) / var(--tw-bg-opacity))}.bg-warning{--tw-bg-opacity: 1;background-color:rgb(var(--color-warning) / var(--tw-bg-opacity))}.bg-error{--tw-bg-opacity: 1;background-color:rgb(var(--color-error) / var(--tw-bg-opacity))}.bg-success{--tw-bg-opacity: 1;background-color:rgb(var(--color-success) / var(--tw-bg-opacity))}.bg-light{--tw-bg-opacity: 1;background-color:rgb(var(--color-light) / var(--tw-bg-opacity))}.bg-dark{--tw-bg-opacity: 1;background-color:rgb(var(--color-dark) / var(--tw-bg-opacity))}.bg-default{--tw-bg-opacity: 1;background-color:rgb(var(--color-default) / var(--tw-bg-opacity))}.bg-current{--tw-bg-opacity: 1;background-color:rgb(var(--color-current) / var(--tw-bg-opacity))}.bg-background{--tw-bg-opacity: 1;background-color:rgb(var(--color-background) / var(--tw-bg-opacity))}.bg-opacity-10{--tw-bg-opacity: .1}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-purple-600{--tw-gradient-from: #9333ea;--tw-gradient-to: rgb(147 51 234 / 0);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-500{--tw-gradient-to: #3b82f6}.p-md{padding:var(--spacing-md)}.p-xs{padding:var(--spacing-xs)}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.font-primary{font-family:var(--font-primary)}.font-secondary{font-family:var(--font-secondary)}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:var(--font-bold)}.font-light{font-weight:var(--font-light)}.font-normal{font-weight:var(--font-normal)}.font-medium{font-weight:var(--font-medium)}.font-semibold{font-weight:var(--font-semibold)}.font-extrabold{font-weight:var(--font-extrabold)}.uppercase{text-transform:uppercase}.accent-current{--color-accent: var(--color-current);accent-color:rgb(var(--color-accent))}.accent-background{--color-accent: var(--color-background);accent-color:rgb(var(--color-accent))}.accent-default{--color-accent: var(--color-default);accent-color:rgb(var(--color-accent))}.accent-light{--color-accent: var(--color-light);accent-color:rgb(var(--color-accent))}.accent-dark{--color-accent: var(--color-dark);accent-color:rgb(var(--color-accent))}.accent-primary{--color-accent: var(--color-primary);accent-color:rgb(var(--color-accent))}.accent-secondary{--color-accent: var(--color-secondary);accent-color:rgb(var(--color-accent))}.accent-warning{--color-accent: var(--color-warning);accent-color:rgb(var(--color-accent))}.accent-error{--color-accent: var(--color-error);accent-color:rgb(var(--color-accent))}.accent-info{--color-accent: var(--color-info);accent-color:rgb(var(--color-accent))}.accent-success{--color-accent: var(--color-success);accent-color:rgb(var(--color-accent))}.accent-accent{--color-accent: var(--color-accent);accent-color:rgb(var(--color-accent))}.text-current{--color-current: var(--color-current);color:rgb(var(--color-current))}.text-background{--color-current: var(--color-background);color:rgb(var(--color-current))}.text-default{--color-current: var(--color-default);color:rgb(var(--color-current))}.text-light{--color-current: var(--color-light);color:rgb(var(--color-current))}.text-dark{--color-current: var(--color-dark);color:rgb(var(--color-current))}.text-primary{--color-current: var(--color-primary);color:rgb(var(--color-current))}.text-secondary{--color-current: var(--color-secondary);color:rgb(var(--color-current))}.text-warning{--color-current: var(--color-warning);color:rgb(var(--color-current))}.text-error{--color-current: var(--color-error);color:rgb(var(--color-current))}.text-info{--color-current: var(--color-info);color:rgb(var(--color-current))}.text-success{--color-current: var(--color-success);color:rgb(var(--color-current))}.text-accent{--color-current: var(--color-accent);color:rgb(var(--color-current))}:where(.col){display:flex;flex-direction:column}:where(.container):where(.is-sm){--container-width: var(--container-width-sm)}.dark .dark\:bg-dark{--tw-bg-opacity: 1;background-color:rgb(var(--color-dark) / var(--tw-bg-opacity))}.dark .dark\:text-light{--color-current: var(--color-light);color:rgb(var(--color-current))}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "winduum",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,25 +9,28 @@
|
|
|
9
9
|
"build-prod": "vite build -c vite.config.prod.js",
|
|
10
10
|
"eslint": "eslint '**/*.js' --fix",
|
|
11
11
|
"stylelint": "npx stylelint '**/*.css' --fix",
|
|
12
|
-
"tailwind
|
|
12
|
+
"tailwind": "rollup utils/tailwind.js --file utils/tailwind.cjs -f cjs --exports named"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"lodash": "^4.17.21"
|
|
13
16
|
},
|
|
14
17
|
"devDependencies": {
|
|
15
18
|
"@vitejs/plugin-vue": "^4.0.0",
|
|
16
19
|
"autoprefixer": "^10.4.13",
|
|
17
|
-
"css-has-pseudo": "^
|
|
18
|
-
"eslint": "^8.
|
|
20
|
+
"css-has-pseudo": "^5.0.1",
|
|
21
|
+
"eslint": "^8.33.0",
|
|
19
22
|
"eslint-config-standard": "^17.0.0",
|
|
20
23
|
"postcss": "^8.4.21",
|
|
21
|
-
"postcss-custom-media": "^9.
|
|
22
|
-
"postcss-custom-properties": "^
|
|
23
|
-
"postcss-custom-selectors": "^7.
|
|
24
|
+
"postcss-custom-media": "^9.1.1",
|
|
25
|
+
"postcss-custom-properties": "^13.1.1",
|
|
26
|
+
"postcss-custom-selectors": "^7.1.1",
|
|
24
27
|
"postcss-import": "^15.1.0",
|
|
25
|
-
"postcss-nesting": "^
|
|
28
|
+
"postcss-nesting": "^11.1.0",
|
|
26
29
|
"stylelint-config-standard": "^29.0.0",
|
|
27
30
|
"tailwindcss": "^3.2.4",
|
|
28
31
|
"fast-glob": "^3.2.12",
|
|
29
|
-
"vite": "^4.
|
|
30
|
-
"vue": "^3.2.
|
|
32
|
+
"vite": "^4.1.1",
|
|
33
|
+
"vue": "^3.2.47"
|
|
31
34
|
},
|
|
32
35
|
"files": [
|
|
33
36
|
"index.js",
|
|
@@ -37,8 +40,9 @@
|
|
|
37
40
|
"utils"
|
|
38
41
|
],
|
|
39
42
|
"exports": {
|
|
40
|
-
".": "./
|
|
41
|
-
"./tailwind
|
|
43
|
+
".": "./utils/tailwind.cjs",
|
|
44
|
+
"./tailwind-cjs": "./utils/tailwind.cjs",
|
|
45
|
+
"./tailwind-esm": "./utils/tailwind.js",
|
|
42
46
|
"./main.css": "./dist/main.css",
|
|
43
47
|
"./tailwind.css": "./dist/tailwind.css",
|
|
44
48
|
"./src/*": "./src/*",
|
package/src/App.vue
CHANGED
package/src/index.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.container {
|
|
16
|
+
:where(.container) {
|
|
17
17
|
margin-left: auto;
|
|
18
18
|
margin-right: auto;
|
|
19
19
|
padding-left: var(--container-padding);
|
|
20
20
|
padding-right: var(--container-padding);
|
|
21
21
|
max-width: var(--container-width);
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
&:where(.is-sm) {
|
|
24
24
|
--container-width: var(--container-width-sm);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/styles/main.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@import "
|
|
2
|
-
@import "
|
|
3
|
-
@import "
|
|
4
|
-
@import "
|
|
5
|
-
@import "
|
|
6
|
-
@import "
|
|
7
|
-
@import "
|
|
8
|
-
@import "
|
|
9
|
-
@import "
|
|
10
|
-
@import "
|
|
1
|
+
@import "base/reset.css";
|
|
2
|
+
@import "base/default.css";
|
|
3
|
+
@import "base/config.css";
|
|
4
|
+
@import "base/icons.css";
|
|
5
|
+
@import "base/keyframes.css";
|
|
6
|
+
@import "base/theme/default.css";
|
|
7
|
+
@import "base/theme/dark.css";
|
|
8
|
+
@import "ui/+.css";
|
|
9
|
+
@import "components/+.css";
|
|
10
|
+
@import "libraries/+.css";
|
package/src/styles/tailwind.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "
|
|
1
|
+
@import "base/tailwind/base.css";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/tailwind.config.cjs
CHANGED
|
@@ -1,61 +1,9 @@
|
|
|
1
|
-
const { tailwindColors, tailwindVariables, tailwindColorsAccent, tailwindColorsCurrent, tailwindAnimations } = require('./utils/helpers.cjs')
|
|
2
|
-
const plugin = require('tailwindcss/plugin')
|
|
3
|
-
|
|
4
|
-
const colors = [
|
|
5
|
-
'background', 'default', 'light', 'dark', 'primary', 'secondary',
|
|
6
|
-
'warning', 'error', 'info', 'success', 'accent', `current`
|
|
7
|
-
]
|
|
8
|
-
|
|
9
|
-
const animations = [
|
|
10
|
-
'fade-in', 'fade-out'
|
|
11
|
-
]
|
|
12
|
-
|
|
13
1
|
module.exports = {
|
|
14
2
|
darkMode: 'class',
|
|
15
3
|
content: [
|
|
16
4
|
'./src/**/*.{js,html}'
|
|
17
5
|
],
|
|
18
|
-
corePlugins: {
|
|
19
|
-
preflight: false,
|
|
20
|
-
container: false,
|
|
21
|
-
accentColor: false
|
|
22
|
-
},
|
|
23
|
-
theme: {
|
|
24
|
-
extend: {
|
|
25
|
-
colors: tailwindColors(colors),
|
|
26
|
-
fontFamily: tailwindVariables('font', ['primary', 'secondary']),
|
|
27
|
-
fontWeight: tailwindVariables('font', ['light', 'normal', 'medium', 'semibold', 'bold', 'extrabold']),
|
|
28
|
-
zIndex: tailwindVariables('z', [10, 20, 30, 40, 50, 60], {
|
|
29
|
-
0: 0,
|
|
30
|
-
auto: 'auto'
|
|
31
|
-
}),
|
|
32
|
-
spacing: tailwindVariables('spacing', ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'section']),
|
|
33
|
-
borderRadius: tailwindVariables('rounded', ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'full'], {
|
|
34
|
-
DEFAULT: 'var(--rounded)'
|
|
35
|
-
}),
|
|
36
|
-
screens: {
|
|
37
|
-
'xs': '22.5em',
|
|
38
|
-
'sm': '26em',
|
|
39
|
-
'md': '48em',
|
|
40
|
-
'lg': '60em',
|
|
41
|
-
'xl': '76em',
|
|
42
|
-
'2xl': '82em',
|
|
43
|
-
'3xl': '88em',
|
|
44
|
-
'4xl': '100em',
|
|
45
|
-
'xxl': '126em',
|
|
46
|
-
'2xxl': '158em'
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
6
|
plugins: [
|
|
51
|
-
|
|
52
|
-
addUtilities(tailwindColorsAccent(colors))
|
|
53
|
-
}),
|
|
54
|
-
plugin(({ addUtilities }) => {
|
|
55
|
-
addUtilities(tailwindColorsCurrent(colors))
|
|
56
|
-
}),
|
|
57
|
-
plugin(({ addUtilities }) => {
|
|
58
|
-
addUtilities(tailwindAnimations(animations))
|
|
59
|
-
})
|
|
7
|
+
require('winduum')()
|
|
60
8
|
],
|
|
61
9
|
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var plugin = require('tailwindcss/plugin');
|
|
4
|
+
var twColors = require('tailwindcss/colors');
|
|
5
|
+
var lodash = require('lodash');
|
|
6
|
+
|
|
7
|
+
const defaultConfig = {
|
|
8
|
+
colors: [
|
|
9
|
+
'background', 'default', 'light', 'dark', 'primary', 'secondary',
|
|
10
|
+
'warning', 'error', 'info', 'success', 'accent', `current`
|
|
11
|
+
],
|
|
12
|
+
fontFamily: ['primary', 'secondary'],
|
|
13
|
+
fontWeight: ['light', 'normal', 'medium', 'semibold', 'bold', 'extrabold'],
|
|
14
|
+
zIndex: [10, 20, 30, 40, 50, 60],
|
|
15
|
+
spacing: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'section'],
|
|
16
|
+
borderRadius: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'full'],
|
|
17
|
+
animations: ['fade-in', 'fade-out'],
|
|
18
|
+
screens: {
|
|
19
|
+
'xs': '22.5em',
|
|
20
|
+
'sm': '26em',
|
|
21
|
+
'md': '48em',
|
|
22
|
+
'lg': '60em',
|
|
23
|
+
'xl': '76em',
|
|
24
|
+
'2xl': '82em',
|
|
25
|
+
'3xl': '88em',
|
|
26
|
+
'4xl': '100em',
|
|
27
|
+
'xxl': '126em',
|
|
28
|
+
'2xxl': '158em'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const hexToRgb = hex => hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(m, r, g, b) => '#' + r + r + g + g + b + b)
|
|
33
|
+
.substring(1).match(/.{2}/g)
|
|
34
|
+
.map(x => parseInt(x, 16));
|
|
35
|
+
|
|
36
|
+
const getTailwindColors = (twColors) => {
|
|
37
|
+
const accentColors = [];
|
|
38
|
+
|
|
39
|
+
Object.keys(twColors).forEach(color => {
|
|
40
|
+
if (color.match(/(lightBlue|warmGray|trueGray|coolGray|blueGray)/)) {
|
|
41
|
+
return
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (typeof twColors[color] === "object") {
|
|
45
|
+
Object.keys(twColors[color]).forEach(variant => {
|
|
46
|
+
accentColors.push([`${color.replace(/[A-Z]/g, m => "-" + m.toLowerCase())}-${variant}`, twColors[color][variant]]);
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
accentColors.push([color, twColors[color]]);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return accentColors
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const tailwindColors = (colors = []) => {
|
|
57
|
+
colors.forEach(name => {
|
|
58
|
+
colors[name] = ({ opacityValue }) => {
|
|
59
|
+
if (opacityValue === undefined) {
|
|
60
|
+
return `rgb(var(--color-${name}))`
|
|
61
|
+
}
|
|
62
|
+
return `rgb(var(--color-${name}) / ${opacityValue})`
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return colors
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const tailwindColorsAccent = (colors = []) => {
|
|
70
|
+
const result = {};
|
|
71
|
+
|
|
72
|
+
colors.forEach(color => {
|
|
73
|
+
if (Array.isArray(color)) {
|
|
74
|
+
const rgb = hexToRgb(color[1]);
|
|
75
|
+
|
|
76
|
+
result[`.accent-${color[0]}`] = {
|
|
77
|
+
'--color-accent': `${rgb[0]} ${rgb[1]} ${rgb[2]}`,
|
|
78
|
+
'accent-color': 'rgb(var(--color-accent))'
|
|
79
|
+
};
|
|
80
|
+
} else {
|
|
81
|
+
result[`.accent-${color}`] = {
|
|
82
|
+
'--color-accent': `var(--color-${color})`,
|
|
83
|
+
'accent-color': 'rgb(var(--color-accent))'
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
return result
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const tailwindColorsCurrent = (colors = []) => {
|
|
92
|
+
const result = {};
|
|
93
|
+
|
|
94
|
+
colors.forEach(color => {
|
|
95
|
+
if (Array.isArray(color)) {
|
|
96
|
+
const rgb = hexToRgb(color[1]);
|
|
97
|
+
|
|
98
|
+
result[`.text-${color[0]}`] = {
|
|
99
|
+
'--color-current': `${rgb[0]} ${rgb[1]} ${rgb[2]}`,
|
|
100
|
+
'color': 'rgb(var(--color-current))'
|
|
101
|
+
};
|
|
102
|
+
} else {
|
|
103
|
+
result[`.text-${color}`] = {
|
|
104
|
+
'--color-current': `var(--color-${color})`,
|
|
105
|
+
'color': 'rgb(var(--color-current))'
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return result
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const tailwindVariables = (type, variables = [], values = {}) => {
|
|
114
|
+
variables.forEach(name => {
|
|
115
|
+
values[name] = `var(--${type}-${name})`;
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
return values
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const tailwindAnimations = (values) => {
|
|
122
|
+
const result = {};
|
|
123
|
+
|
|
124
|
+
values.forEach(value => {
|
|
125
|
+
result[`.animation-${value}`] = {
|
|
126
|
+
'animation-name': value
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
return result
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const createPlugin = (userConfig = {}) => {
|
|
134
|
+
userConfig = lodash.merge(defaultConfig, userConfig);
|
|
135
|
+
|
|
136
|
+
return plugin(({addUtilities}) => {
|
|
137
|
+
addUtilities(Object.assign(tailwindColorsAccent(getTailwindColors(twColors)), tailwindColorsAccent(userConfig.colors)));
|
|
138
|
+
addUtilities(Object.assign(tailwindColorsCurrent(getTailwindColors(twColors)), tailwindColorsCurrent(userConfig.colors)));
|
|
139
|
+
addUtilities(tailwindAnimations(userConfig.animations));
|
|
140
|
+
}, {
|
|
141
|
+
corePlugins: {
|
|
142
|
+
preflight: false,
|
|
143
|
+
container: false,
|
|
144
|
+
accentColor: false,
|
|
145
|
+
textColor: false
|
|
146
|
+
},
|
|
147
|
+
theme: {
|
|
148
|
+
extend: {
|
|
149
|
+
colors: tailwindColors(userConfig.colors),
|
|
150
|
+
fontFamily: tailwindVariables('font', userConfig.fontFamily),
|
|
151
|
+
fontWeight: tailwindVariables('font', userConfig.fontWeight),
|
|
152
|
+
zIndex: tailwindVariables('z', userConfig.zIndex, {
|
|
153
|
+
0: 0,
|
|
154
|
+
auto: 'auto'
|
|
155
|
+
}),
|
|
156
|
+
spacing: tailwindVariables('spacing', userConfig.spacing),
|
|
157
|
+
borderRadius: tailwindVariables('rounded', userConfig.borderRadius, {
|
|
158
|
+
DEFAULT: 'var(--rounded)'
|
|
159
|
+
}),
|
|
160
|
+
screens: userConfig.screens
|
|
161
|
+
},
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
module.exports.createPlugin = createPlugin;
|
|
167
|
+
module.exports = createPlugin;
|
|
168
|
+
module.exports.defaultConfig = defaultConfig;
|
|
169
|
+
module.exports.getTailwindColors = getTailwindColors;
|
|
170
|
+
module.exports.hexToRgb = hexToRgb;
|
|
171
|
+
module.exports.tailwindAnimations = tailwindAnimations;
|
|
172
|
+
module.exports.tailwindColors = tailwindColors;
|
|
173
|
+
module.exports.tailwindColorsAccent = tailwindColorsAccent;
|
|
174
|
+
module.exports.tailwindColorsCurrent = tailwindColorsCurrent;
|
|
175
|
+
module.exports.tailwindVariables = tailwindVariables;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import plugin from 'tailwindcss/plugin'
|
|
2
|
+
import twColors from "tailwindcss/colors"
|
|
3
|
+
import lodash from 'lodash'
|
|
4
|
+
|
|
5
|
+
export const defaultConfig = {
|
|
6
|
+
colors: [
|
|
7
|
+
'background', 'default', 'light', 'dark', 'primary', 'secondary',
|
|
8
|
+
'warning', 'error', 'info', 'success', 'accent', `current`
|
|
9
|
+
],
|
|
10
|
+
fontFamily: ['primary', 'secondary'],
|
|
11
|
+
fontWeight: ['light', 'normal', 'medium', 'semibold', 'bold', 'extrabold'],
|
|
12
|
+
zIndex: [10, 20, 30, 40, 50, 60],
|
|
13
|
+
spacing: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'section'],
|
|
14
|
+
borderRadius: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'full'],
|
|
15
|
+
animations: ['fade-in', 'fade-out'],
|
|
16
|
+
screens: {
|
|
17
|
+
'xs': '22.5em',
|
|
18
|
+
'sm': '26em',
|
|
19
|
+
'md': '48em',
|
|
20
|
+
'lg': '60em',
|
|
21
|
+
'xl': '76em',
|
|
22
|
+
'2xl': '82em',
|
|
23
|
+
'3xl': '88em',
|
|
24
|
+
'4xl': '100em',
|
|
25
|
+
'xxl': '126em',
|
|
26
|
+
'2xxl': '158em'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const hexToRgb = hex => hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(m, r, g, b) => '#' + r + r + g + g + b + b)
|
|
31
|
+
.substring(1).match(/.{2}/g)
|
|
32
|
+
.map(x => parseInt(x, 16))
|
|
33
|
+
|
|
34
|
+
export const getTailwindColors = (twColors) => {
|
|
35
|
+
const accentColors = []
|
|
36
|
+
|
|
37
|
+
Object.keys(twColors).forEach(color => {
|
|
38
|
+
if (color.match(/(lightBlue|warmGray|trueGray|coolGray|blueGray)/)) {
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (typeof twColors[color] === "object") {
|
|
43
|
+
Object.keys(twColors[color]).forEach(variant => {
|
|
44
|
+
accentColors.push([`${color.replace(/[A-Z]/g, m => "-" + m.toLowerCase())}-${variant}`, twColors[color][variant]])
|
|
45
|
+
})
|
|
46
|
+
} else {
|
|
47
|
+
accentColors.push([color, twColors[color]])
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
return accentColors
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const tailwindColors = (colors = []) => {
|
|
55
|
+
colors.forEach(name => {
|
|
56
|
+
colors[name] = ({ opacityValue }) => {
|
|
57
|
+
if (opacityValue === undefined) {
|
|
58
|
+
return `rgb(var(--color-${name}))`
|
|
59
|
+
}
|
|
60
|
+
return `rgb(var(--color-${name}) / ${opacityValue})`
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
return colors
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const tailwindColorsAccent = (colors = []) => {
|
|
68
|
+
const result = {};
|
|
69
|
+
|
|
70
|
+
colors.forEach(color => {
|
|
71
|
+
if (Array.isArray(color)) {
|
|
72
|
+
const rgb = hexToRgb(color[1])
|
|
73
|
+
|
|
74
|
+
result[`.accent-${color[0]}`] = {
|
|
75
|
+
'--color-accent': `${rgb[0]} ${rgb[1]} ${rgb[2]}`,
|
|
76
|
+
'accent-color': 'rgb(var(--color-accent))'
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
result[`.accent-${color}`] = {
|
|
80
|
+
'--color-accent': `var(--color-${color})`,
|
|
81
|
+
'accent-color': 'rgb(var(--color-accent))'
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
return result
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const tailwindColorsCurrent = (colors = []) => {
|
|
90
|
+
const result = {};
|
|
91
|
+
|
|
92
|
+
colors.forEach(color => {
|
|
93
|
+
if (Array.isArray(color)) {
|
|
94
|
+
const rgb = hexToRgb(color[1])
|
|
95
|
+
|
|
96
|
+
result[`.text-${color[0]}`] = {
|
|
97
|
+
'--color-current': `${rgb[0]} ${rgb[1]} ${rgb[2]}`,
|
|
98
|
+
'color': 'rgb(var(--color-current))'
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
result[`.text-${color}`] = {
|
|
102
|
+
'--color-current': `var(--color-${color})`,
|
|
103
|
+
'color': 'rgb(var(--color-current))'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
return result
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const tailwindVariables = (type, variables = [], values = {}) => {
|
|
112
|
+
variables.forEach(name => {
|
|
113
|
+
values[name] = `var(--${type}-${name})`
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
return values
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const tailwindAnimations = (values) => {
|
|
120
|
+
const result = {}
|
|
121
|
+
|
|
122
|
+
values.forEach(value => {
|
|
123
|
+
result[`.animation-${value}`] = {
|
|
124
|
+
'animation-name': value
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
return result
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export const createPlugin = (userConfig = {}) => {
|
|
132
|
+
userConfig = lodash.merge(defaultConfig, userConfig)
|
|
133
|
+
|
|
134
|
+
return plugin(({addUtilities}) => {
|
|
135
|
+
addUtilities(Object.assign(tailwindColorsAccent(getTailwindColors(twColors)), tailwindColorsAccent(userConfig.colors)))
|
|
136
|
+
addUtilities(Object.assign(tailwindColorsCurrent(getTailwindColors(twColors)), tailwindColorsCurrent(userConfig.colors)))
|
|
137
|
+
addUtilities(tailwindAnimations(userConfig.animations))
|
|
138
|
+
}, {
|
|
139
|
+
corePlugins: {
|
|
140
|
+
preflight: false,
|
|
141
|
+
container: false,
|
|
142
|
+
accentColor: false,
|
|
143
|
+
textColor: false
|
|
144
|
+
},
|
|
145
|
+
theme: {
|
|
146
|
+
extend: {
|
|
147
|
+
colors: tailwindColors(userConfig.colors),
|
|
148
|
+
fontFamily: tailwindVariables('font', userConfig.fontFamily),
|
|
149
|
+
fontWeight: tailwindVariables('font', userConfig.fontWeight),
|
|
150
|
+
zIndex: tailwindVariables('z', userConfig.zIndex, {
|
|
151
|
+
0: 0,
|
|
152
|
+
auto: 'auto'
|
|
153
|
+
}),
|
|
154
|
+
spacing: tailwindVariables('spacing', userConfig.spacing),
|
|
155
|
+
borderRadius: tailwindVariables('rounded', userConfig.borderRadius, {
|
|
156
|
+
DEFAULT: 'var(--rounded)'
|
|
157
|
+
}),
|
|
158
|
+
screens: userConfig.screens
|
|
159
|
+
},
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export default createPlugin
|
package/utils/helpers.cjs
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const tailwindColors = (colors = []) => {
|
|
6
|
-
colors.forEach(name => {
|
|
7
|
-
colors[name] = ({ opacityValue }) => {
|
|
8
|
-
if (opacityValue === undefined) {
|
|
9
|
-
return `rgb(var(--color-${name}))`
|
|
10
|
-
}
|
|
11
|
-
return `rgb(var(--color-${name}) / ${opacityValue})`
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
return colors
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const tailwindColorsAccent = (colors = []) => {
|
|
19
|
-
const result = {};
|
|
20
|
-
|
|
21
|
-
colors.forEach(color => {
|
|
22
|
-
result[`.accent-${color}`] = {
|
|
23
|
-
'--color-accent': `var(--color-${color})`,
|
|
24
|
-
'accent-color': 'rgb(var(--color-accent))'
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
return result
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const tailwindColorsCurrent = (colors = []) => {
|
|
32
|
-
const result = {};
|
|
33
|
-
|
|
34
|
-
colors.forEach(color => {
|
|
35
|
-
result[`.text-${color}`] = {
|
|
36
|
-
'--color-current': `var(--color-${color})`
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
return result
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const tailwindVariables = (type, variables = [], values = {}) => {
|
|
44
|
-
variables.forEach(name => {
|
|
45
|
-
values[name] = `var(--${type}-${name})`;
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return values
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const tailwindAnimations = (values) => {
|
|
52
|
-
const result = {};
|
|
53
|
-
|
|
54
|
-
values.forEach(value => {
|
|
55
|
-
result[`.animation-${value}`] = {
|
|
56
|
-
'animation-name': value
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
return result
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
exports.tailwindAnimations = tailwindAnimations;
|
|
64
|
-
exports.tailwindColors = tailwindColors;
|
|
65
|
-
exports.tailwindColorsAccent = tailwindColorsAccent;
|
|
66
|
-
exports.tailwindColorsCurrent = tailwindColorsCurrent;
|
|
67
|
-
exports.tailwindVariables = tailwindVariables;
|
package/utils/helpers.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const tailwindColors = (colors = []) => {
|
|
2
|
-
colors.forEach(name => {
|
|
3
|
-
colors[name] = ({ opacityValue }) => {
|
|
4
|
-
if (opacityValue === undefined) {
|
|
5
|
-
return `rgb(var(--color-${name}))`
|
|
6
|
-
}
|
|
7
|
-
return `rgb(var(--color-${name}) / ${opacityValue})`
|
|
8
|
-
}
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
return colors
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const tailwindColorsAccent = (colors = []) => {
|
|
15
|
-
const result = {}
|
|
16
|
-
|
|
17
|
-
colors.forEach(color => {
|
|
18
|
-
result[`.accent-${color}`] = {
|
|
19
|
-
'--color-accent': `var(--color-${color})`,
|
|
20
|
-
'accent-color': 'rgb(var(--color-accent))'
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
return result
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const tailwindColorsCurrent = (colors = []) => {
|
|
28
|
-
const result = {}
|
|
29
|
-
|
|
30
|
-
colors.forEach(color => {
|
|
31
|
-
result[`.text-${color}`] = {
|
|
32
|
-
'--color-current': `var(--color-${color})`
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
return result
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const tailwindVariables = (type, variables = [], values = {}) => {
|
|
40
|
-
variables.forEach(name => {
|
|
41
|
-
values[name] = `var(--${type}-${name})`
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
return values
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const tailwindAnimations = (values) => {
|
|
48
|
-
const result = {}
|
|
49
|
-
|
|
50
|
-
values.forEach(value => {
|
|
51
|
-
result[`.animation-${value}`] = {
|
|
52
|
-
'animation-name': value
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
return result
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export { tailwindColors, tailwindVariables, tailwindColorsAccent, tailwindColorsCurrent, tailwindAnimations }
|