@dargmuesli/nuxt-vio 16.0.5 → 17.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/css/forms.css +90 -0
- package/assets/css/tailwind.css +207 -20
- package/components/vio/_/VioLink.vue +1 -1
- package/components/vio/button/VioButtonColored.vue +2 -2
- package/components/vio/form/VioFormCheckbox.vue +1 -1
- package/components/vio/form/input/VioFormInput.vue +1 -1
- package/components/vio/form/input/VioFormInputIconWrapper.vue +1 -1
- package/components/vio/layout/VioLayoutBreadcrumbs.vue +3 -3
- package/components/vio/layout/VioLayoutFooterCategory.vue +1 -1
- package/components/vio/layout/VioLayoutTbody.vue +1 -1
- package/components/vio/layout/VioLayoutThead.vue +1 -1
- package/nuxt.config.ts +5 -10
- package/package.json +7 -8
- package/tailwind.config.ts +0 -253
@@ -0,0 +1,90 @@
|
|
1
|
+
/* stylelint-disable plugin/no-unsupported-browser-features */
|
2
|
+
@layer components {
|
3
|
+
.form-input {
|
4
|
+
appearance: none;
|
5
|
+
background-color: #fff;
|
6
|
+
border-color: oklch(55.1% 0.027 264.364deg);
|
7
|
+
border-width: 1px;
|
8
|
+
border-radius: 0;
|
9
|
+
padding: 0.75rem 0.5rem;
|
10
|
+
font-size: 1rem;
|
11
|
+
line-height: 1.5rem;
|
12
|
+
|
13
|
+
--tw-shadow: 0 0 #0000;
|
14
|
+
|
15
|
+
&:focus {
|
16
|
+
outline: 2px solid transparent;
|
17
|
+
outline-offset: 2px;
|
18
|
+
|
19
|
+
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
20
|
+
--tw-ring-offset-width: 0px;
|
21
|
+
--tw-ring-offset-color: #fff;
|
22
|
+
--tw-ring-color: oklch(54.6% 0.245 262.881deg);
|
23
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
24
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
25
|
+
|
26
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
27
|
+
border-color: oklch(54.6% 0.245 262.881deg);
|
28
|
+
}
|
29
|
+
|
30
|
+
&::placeholder {
|
31
|
+
color: oklch(55.1% 0.027 264.364deg);
|
32
|
+
opacity: 1;
|
33
|
+
}
|
34
|
+
|
35
|
+
&::-webkit-datetime-edit-fields-wrapper {
|
36
|
+
padding: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
&::-webkit-date-and-time-value {
|
40
|
+
min-height: 1.5em;
|
41
|
+
text-align: inherit;
|
42
|
+
}
|
43
|
+
|
44
|
+
&::-webkit-datetime-edit {
|
45
|
+
display: inline-flex;
|
46
|
+
padding-top: 0;
|
47
|
+
padding-bottom: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
&::-webkit-datetime-edit-year-field {
|
51
|
+
padding-top: 0;
|
52
|
+
padding-bottom: 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
&::-webkit-datetime-edit-month-field {
|
56
|
+
padding-top: 0;
|
57
|
+
padding-bottom: 0;
|
58
|
+
}
|
59
|
+
|
60
|
+
&::-webkit-datetime-edit-day-field {
|
61
|
+
padding-top: 0;
|
62
|
+
padding-bottom: 0;
|
63
|
+
}
|
64
|
+
|
65
|
+
&::-webkit-datetime-edit-hour-field {
|
66
|
+
padding-top: 0;
|
67
|
+
padding-bottom: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
&::-webkit-datetime-edit-minute-field {
|
71
|
+
padding-top: 0;
|
72
|
+
padding-bottom: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
&::-webkit-datetime-edit-second-field {
|
76
|
+
padding-top: 0;
|
77
|
+
padding-bottom: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
&::-webkit-datetime-edit-millisecond-field {
|
81
|
+
padding-top: 0;
|
82
|
+
padding-bottom: 0;
|
83
|
+
}
|
84
|
+
|
85
|
+
&::-webkit-datetime-edit-meridiem-field {
|
86
|
+
padding-top: 0;
|
87
|
+
padding-bottom: 0;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
package/assets/css/tailwind.css
CHANGED
@@ -1,25 +1,212 @@
|
|
1
|
+
/* stylelint-disable at-rule-no-deprecated */
|
1
2
|
/* stylelint-disable at-rule-no-unknown */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
/* stylelint-disable custom-property-pattern */
|
4
|
+
/* stylelint-disable import-notation */
|
5
|
+
/* stylelint-disable plugin/no-unsupported-browser-features */
|
6
|
+
|
7
|
+
@import 'tailwindcss';
|
8
|
+
@import './forms.css';
|
9
|
+
|
10
|
+
@plugin "@tailwindcss/forms" {
|
11
|
+
strategy: 'base';
|
12
|
+
}
|
13
|
+
|
14
|
+
@plugin "@tailwindcss/typography";
|
15
|
+
|
16
|
+
@theme {
|
17
|
+
--animate-shake: shake 0.6s ease-in-out 0s 1 normal forwards running;
|
18
|
+
|
19
|
+
@keyframes shake {
|
20
|
+
0%,
|
21
|
+
100% {
|
22
|
+
transform: translateX(0);
|
23
|
+
}
|
24
|
+
|
25
|
+
15% {
|
26
|
+
transform: translateX(0.375rem);
|
27
|
+
}
|
28
|
+
|
29
|
+
30% {
|
30
|
+
transform: translateX(-0.375rem);
|
31
|
+
}
|
32
|
+
|
33
|
+
45% {
|
34
|
+
transform: translateX(0.375rem);
|
35
|
+
}
|
36
|
+
|
37
|
+
60% {
|
38
|
+
transform: translateX(-0.375rem);
|
39
|
+
}
|
40
|
+
|
41
|
+
75% {
|
42
|
+
transform: translateX(0.375rem);
|
43
|
+
}
|
44
|
+
|
45
|
+
90% {
|
46
|
+
transform: translateX(-0.375rem);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
--color-background-bright: rgb(255 255 255);
|
51
|
+
--color-background-brighten: rgb(229 231 235);
|
52
|
+
--color-background-dark: rgb(31 41 55);
|
53
|
+
--color-background-darken: rgb(55 65 81);
|
54
|
+
--color-link-bright: rgb(96 165 250);
|
55
|
+
--color-link-dark: rgb(37 99 235);
|
56
|
+
--color-text-bright: rgb(249 250 251);
|
57
|
+
--color-text-dark: rgb(17 24 39);
|
58
|
+
--color-vio-primary-bg: rgb(243 244 246);
|
59
|
+
--color-vio-primary-text: rgb(17 24 39);
|
60
|
+
|
61
|
+
/* --text-3xl--line-height: calc(2.5 / 1.875);
|
62
|
+
--text-4xl--line-height: calc(3 / 2.25);
|
63
|
+
--text-5xl--line-height: calc(4 / 3);
|
64
|
+
--text-6xl--line-height: calc(4.75 / 3.75);
|
65
|
+
--text-7xl--line-height: calc(4.75 / 4);
|
66
|
+
--text-8xl--line-height: calc(7.5 / 6);
|
67
|
+
--text-9xl--line-height: calc(10 / 8); */
|
68
|
+
}
|
6
69
|
|
7
|
-
/* doiuse-disable css-cascade-layers */
|
8
70
|
@layer base {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
71
|
+
::placeholder {
|
72
|
+
@apply italic;
|
73
|
+
}
|
74
|
+
|
75
|
+
:disabled {
|
76
|
+
/* pointer-events-none */
|
77
|
+
@apply cursor-not-allowed opacity-50;
|
78
|
+
}
|
79
|
+
|
80
|
+
a,
|
81
|
+
button {
|
82
|
+
@apply focus:ring-3 focus:ring-blue-500/50 focus:outline-none;
|
83
|
+
}
|
84
|
+
|
85
|
+
a[target='_blank']:not([is-external-icon-disabled])::after {
|
86
|
+
/* inline-table centers the element vertically in the tiptap text area, instead of inline-block */
|
87
|
+
@apply ml-[5px] inline-table h-3 w-3 bg-current;
|
88
|
+
|
89
|
+
content: '';
|
90
|
+
mask: url('data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSIgZGF0YS1wcmVmaXg9ImZhcyIgZGF0YS1pY29uPSJhcnJvdy11cC1y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
+
cursor: pointer;
|
102
|
+
}
|
103
|
+
|
104
|
+
h1 {
|
105
|
+
/* mb-4 */
|
106
|
+
@apply heading text-center text-4xl;
|
107
|
+
}
|
108
|
+
|
109
|
+
h2 {
|
110
|
+
@apply heading text-3xl;
|
111
|
+
}
|
112
|
+
|
113
|
+
h3 {
|
114
|
+
@apply heading text-2xl;
|
115
|
+
}
|
116
|
+
|
117
|
+
h4 {
|
118
|
+
@apply heading text-xl;
|
119
|
+
}
|
120
|
+
|
121
|
+
h5 {
|
122
|
+
@apply heading text-lg;
|
123
|
+
}
|
124
|
+
|
125
|
+
h6 {
|
126
|
+
@apply heading;
|
127
|
+
}
|
128
|
+
|
129
|
+
img::before {
|
130
|
+
@apply flex h-full items-center justify-center;
|
131
|
+
}
|
132
|
+
|
133
|
+
table {
|
134
|
+
@apply w-full;
|
135
|
+
}
|
136
|
+
|
137
|
+
td {
|
138
|
+
@apply px-4 py-6 whitespace-nowrap;
|
139
|
+
}
|
140
|
+
|
141
|
+
th {
|
142
|
+
@apply px-3 py-6 text-left text-xs font-medium tracking-wider uppercase;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
@layer components {
|
147
|
+
.form-input {
|
148
|
+
appearance: none;
|
149
|
+
background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
|
150
|
+
border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));
|
151
|
+
border-radius: 0.25rem;
|
152
|
+
border-width: 1px;
|
153
|
+
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
|
154
|
+
color: rgb(24 24 27 / var(--tw-text-opacity, 1));
|
155
|
+
line-height: 1.25;
|
156
|
+
padding: 0.5rem 1rem;
|
157
|
+
width: 100%;
|
158
|
+
}
|
159
|
+
|
160
|
+
.form-input:focus {
|
161
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
162
|
+
}
|
163
|
+
|
164
|
+
.form-input::placeholder {
|
165
|
+
opacity: 0.5;
|
166
|
+
}
|
167
|
+
|
168
|
+
.form-input-error .form-input {
|
169
|
+
border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
|
170
|
+
}
|
171
|
+
|
172
|
+
.form-input-success .form-input {
|
173
|
+
border-color: rgb(22 163 74 / var(--tw-border-opacity, 1));
|
174
|
+
}
|
175
|
+
|
176
|
+
.form-input-warning .form-input {
|
177
|
+
border-color: rgb(202 138 4 / var(--tw-border-opacity, 1));
|
178
|
+
}
|
179
|
+
|
180
|
+
.form-textarea::placeholder {
|
181
|
+
opacity: 0.5;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
@utility disabled {
|
186
|
+
/* pointer-events-none */
|
187
|
+
@apply cursor-not-allowed opacity-50;
|
188
|
+
}
|
189
|
+
|
190
|
+
@utility heading {
|
191
|
+
@apply font-bold;
|
192
|
+
} /* set overflow truncate/ellipsis in the surrounding container, or larger fonts will be cut off due to their line-heights */
|
193
|
+
|
194
|
+
.dark {
|
195
|
+
@apply scheme-dark;
|
196
|
+
}
|
197
|
+
|
198
|
+
.prose {
|
199
|
+
a {
|
200
|
+
/* color-link */
|
201
|
+
@apply no-underline;
|
202
|
+
}
|
203
|
+
|
204
|
+
h1,
|
205
|
+
h2,
|
206
|
+
h3,
|
207
|
+
h4,
|
208
|
+
h5,
|
209
|
+
h6 {
|
210
|
+
@apply leading-snug;
|
24
211
|
}
|
25
212
|
}
|
@@ -7,10 +7,10 @@
|
|
7
7
|
[
|
8
8
|
...(isPrimary
|
9
9
|
? [
|
10
|
-
'
|
10
|
+
'text-text-bright dark:bg-vio-primary-bg dark:text-vio-primary-text border-transparent bg-gray-800 hover:brightness-90',
|
11
11
|
]
|
12
12
|
: [
|
13
|
-
'
|
13
|
+
'text-text-dark dark:text-text-bright border-gray-300 hover:bg-black/5 dark:border-gray-600 dark:hover:bg-black/30',
|
14
14
|
]),
|
15
15
|
].join(' ')
|
16
16
|
"
|
@@ -16,7 +16,7 @@
|
|
16
16
|
>
|
17
17
|
<span>{{ t('separator') }}</span>
|
18
18
|
<VioLink
|
19
|
-
class="whitespace-nowrap
|
19
|
+
class="text-2xl whitespace-nowrap"
|
20
20
|
:data-testid="`breadcrumb-prefix-${prefix.to}`"
|
21
21
|
:is-colored="false"
|
22
22
|
:to="prefix.to"
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<span>{{ t('separator') }}</span>
|
29
29
|
<VioLink :is-colored="false" :to="route.path">
|
30
30
|
<span
|
31
|
-
class="
|
31
|
+
class="text-2xl font-bold whitespace-nowrap"
|
32
32
|
data-testid="breadcrumb"
|
33
33
|
>
|
34
34
|
<slot />
|
@@ -42,7 +42,7 @@
|
|
42
42
|
>
|
43
43
|
<span>{{ t('separator') }}</span>
|
44
44
|
<VioLink
|
45
|
-
class="whitespace-nowrap
|
45
|
+
class="text-2xl whitespace-nowrap"
|
46
46
|
:data-testid="`breadcrumb-suffix-${suffix.to}`"
|
47
47
|
:is-colored="false"
|
48
48
|
:to="suffix.to"
|
package/nuxt.config.ts
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { fileURLToPath } from 'node:url'
|
3
|
-
|
1
|
+
import tailwindcss from '@tailwindcss/vite'
|
4
2
|
import { defu } from 'defu'
|
5
3
|
|
6
4
|
import {
|
@@ -12,9 +10,6 @@ import {
|
|
12
10
|
} from './utils/constants'
|
13
11
|
import { VIO_NUXT_BASE_CONFIG } from './utils/nuxt'
|
14
12
|
|
15
|
-
const currentDir = dirname(fileURLToPath(import.meta.url))
|
16
|
-
|
17
|
-
// https://v3.nuxtjs.org/api/configuration/nuxt.config
|
18
13
|
export default defineNuxtConfig(
|
19
14
|
defu(
|
20
15
|
{
|
@@ -30,6 +25,7 @@ export default defineNuxtConfig(
|
|
30
25
|
},
|
31
26
|
},
|
32
27
|
compatibilityDate: '2024-04-03',
|
28
|
+
css: ['./assets/css/tailwind.css'],
|
33
29
|
...(process.env.NUXT_PUBLIC_SITE_URL
|
34
30
|
? {}
|
35
31
|
: {
|
@@ -54,7 +50,6 @@ export default defineNuxtConfig(
|
|
54
50
|
'@nuxtjs/html-validator',
|
55
51
|
'@nuxtjs/i18n',
|
56
52
|
'@nuxtjs/seo',
|
57
|
-
'@nuxtjs/tailwindcss',
|
58
53
|
'@pinia/nuxt',
|
59
54
|
'nuxt-gtag',
|
60
55
|
(_options, nuxt) => {
|
@@ -125,6 +120,9 @@ export default defineNuxtConfig(
|
|
125
120
|
// },
|
126
121
|
},
|
127
122
|
},
|
123
|
+
vite: {
|
124
|
+
plugins: [tailwindcss()],
|
125
|
+
},
|
128
126
|
|
129
127
|
// modules
|
130
128
|
colorMode: {
|
@@ -256,9 +254,6 @@ export default defineNuxtConfig(
|
|
256
254
|
sitemap: {
|
257
255
|
credits: false,
|
258
256
|
},
|
259
|
-
tailwindcss: {
|
260
|
-
cssPath: join(currentDir, './assets/css/tailwind.css'),
|
261
|
-
},
|
262
257
|
|
263
258
|
// environments
|
264
259
|
$development: {
|
package/package.json
CHANGED
@@ -5,14 +5,13 @@
|
|
5
5
|
"@heroicons/vue": "2.2.0",
|
6
6
|
"@http-util/status-i18n": "0.8.1",
|
7
7
|
"@intlify/eslint-plugin-vue-i18n": "4.0.0-next.1",
|
8
|
-
"@nuxt/devtools": "2.
|
8
|
+
"@nuxt/devtools": "2.1.0",
|
9
9
|
"@nuxt/eslint": "1.0.1",
|
10
10
|
"@nuxt/image": "1.9.0",
|
11
11
|
"@nuxtjs/color-mode": "3.5.2",
|
12
12
|
"@nuxtjs/html-validator": "1.8.2",
|
13
13
|
"@nuxtjs/i18n": "9.1.1",
|
14
14
|
"@nuxtjs/seo": "2.1.1",
|
15
|
-
"@nuxtjs/tailwindcss": "6.13.1",
|
16
15
|
"@pinia/nuxt": "0.10.1",
|
17
16
|
"@tailwindcss/forms": "0.5.10",
|
18
17
|
"@tailwindcss/typography": "0.5.16",
|
@@ -30,13 +29,14 @@
|
|
30
29
|
"eslint-plugin-yml": "1.16.0",
|
31
30
|
"globals": "15.15.0",
|
32
31
|
"jiti": "2.4.2",
|
33
|
-
"jose": "5.
|
32
|
+
"jose": "5.10.0",
|
34
33
|
"nuxt-gtag": "3.0.2",
|
35
34
|
"nuxt-security": "2.1.5",
|
36
|
-
"sweetalert2": "11.
|
35
|
+
"sweetalert2": "11.17.2",
|
37
36
|
"vue-tsc": "2.2.0"
|
38
37
|
},
|
39
38
|
"devDependencies": {
|
39
|
+
"@tailwindcss/vite": "4.0.6",
|
40
40
|
"@unhead/vue": "1.11.19",
|
41
41
|
"@urql/devtools": "2.0.3",
|
42
42
|
"@urql/exchange-graphcache": "7.2.2",
|
@@ -55,7 +55,7 @@
|
|
55
55
|
"stylelint-config-recommended-vue": "1.6.0",
|
56
56
|
"stylelint-config-standard": "37.0.0",
|
57
57
|
"stylelint-no-unsupported-browser-features": "8.0.4",
|
58
|
-
"tailwindcss": "
|
58
|
+
"tailwindcss": "4.0.6",
|
59
59
|
"unhead": "1.11.19",
|
60
60
|
"vue": "3.5.13",
|
61
61
|
"vue-router": "4.5.0"
|
@@ -80,8 +80,7 @@
|
|
80
80
|
"error.vue",
|
81
81
|
"i18n.config.ts",
|
82
82
|
"nuxt.config.ts",
|
83
|
-
"package.json"
|
84
|
-
"tailwind.config.ts"
|
83
|
+
"package.json"
|
85
84
|
],
|
86
85
|
"main": "nuxt.config.ts",
|
87
86
|
"name": "@dargmuesli/nuxt-vio",
|
@@ -118,5 +117,5 @@
|
|
118
117
|
"start:static": "serve .playground/.output/public --ssl-cert ./.config/certificates/ssl.crt --ssl-key ./.config/certificates/ssl.key"
|
119
118
|
},
|
120
119
|
"type": "module",
|
121
|
-
"version": "
|
120
|
+
"version": "17.0.0-beta.1"
|
122
121
|
}
|
package/tailwind.config.ts
DELETED
@@ -1,253 +0,0 @@
|
|
1
|
-
import type { ModuleOptions } from '@nuxtjs/tailwindcss'
|
2
|
-
import formsPlugin from '@tailwindcss/forms'
|
3
|
-
import typographyPlugin from '@tailwindcss/typography'
|
4
|
-
import type { PluginAPI } from 'tailwindcss/types/config'
|
5
|
-
|
6
|
-
const heading = (theme: PluginAPI['theme']): Record<string, string> => ({
|
7
|
-
fontWeight: theme('fontWeight.bold'),
|
8
|
-
// marginBottom: theme('margin.1'),
|
9
|
-
// marginTop: theme('margin.4'),
|
10
|
-
// set overflow truncate/ellipsis in the surrounding container, or larger fonts will be cut off due to their line-heights
|
11
|
-
})
|
12
|
-
|
13
|
-
const prose = (theme: PluginAPI['theme']) => ({
|
14
|
-
css: {
|
15
|
-
a: {
|
16
|
-
color: theme('colors.link'),
|
17
|
-
textDecoration: 'none',
|
18
|
-
},
|
19
|
-
h1: {
|
20
|
-
lineHeight: theme('lineHeight.snug'),
|
21
|
-
},
|
22
|
-
h2: {
|
23
|
-
lineHeight: theme('lineHeight.snug'),
|
24
|
-
},
|
25
|
-
h3: {
|
26
|
-
lineHeight: theme('lineHeight.snug'),
|
27
|
-
},
|
28
|
-
h4: {
|
29
|
-
lineHeight: theme('lineHeight.snug'),
|
30
|
-
},
|
31
|
-
h5: {
|
32
|
-
lineHeight: theme('lineHeight.snug'),
|
33
|
-
},
|
34
|
-
h6: {
|
35
|
-
lineHeight: theme('lineHeight.snug'),
|
36
|
-
},
|
37
|
-
},
|
38
|
-
})
|
39
|
-
|
40
|
-
export default {
|
41
|
-
darkMode: 'class',
|
42
|
-
plugins: [
|
43
|
-
formsPlugin,
|
44
|
-
typographyPlugin,
|
45
|
-
({ addBase, addComponents, addUtilities, theme }: PluginAPI) => {
|
46
|
-
addBase({
|
47
|
-
':disabled': {
|
48
|
-
cursor: theme('cursor.not-allowed'),
|
49
|
-
opacity: theme('opacity.50'),
|
50
|
-
},
|
51
|
-
'a[target="_blank"]:not([is-external-icon-disabled]):after': {
|
52
|
-
backgroundColor: 'currentColor',
|
53
|
-
content: '""',
|
54
|
-
display: 'inline-table', // inline-table centers the element vertically in the tiptap text area, instead of inline-block
|
55
|
-
mask: 'url(data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdX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-
width: theme('fontSize.xs'),
|
60
|
-
},
|
61
|
-
'a:focus': {
|
62
|
-
// @apply outline-none ring
|
63
|
-
outline: '2px solid transparent',
|
64
|
-
outlineOffset: '2px',
|
65
|
-
boxShadow:
|
66
|
-
'var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)',
|
67
|
-
},
|
68
|
-
address: {
|
69
|
-
margin: theme('margin.4'),
|
70
|
-
},
|
71
|
-
'button:focus': {
|
72
|
-
// @apply outline-none ring
|
73
|
-
outline: '2px solid transparent',
|
74
|
-
outlineOffset: '2px',
|
75
|
-
boxShadow:
|
76
|
-
'var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)',
|
77
|
-
},
|
78
|
-
h1: {
|
79
|
-
...heading(theme),
|
80
|
-
fontSize: theme('fontSize.4xl'),
|
81
|
-
// marginBottom: theme('margin.4'),
|
82
|
-
textAlign: 'center',
|
83
|
-
},
|
84
|
-
h2: {
|
85
|
-
...heading(theme),
|
86
|
-
fontSize: theme('fontSize.3xl'),
|
87
|
-
},
|
88
|
-
h3: {
|
89
|
-
...heading(theme),
|
90
|
-
fontSize: theme('fontSize.2xl'),
|
91
|
-
},
|
92
|
-
h4: {
|
93
|
-
...heading(theme),
|
94
|
-
fontSize: theme('fontSize.xl'),
|
95
|
-
},
|
96
|
-
h5: {
|
97
|
-
...heading(theme),
|
98
|
-
fontSize: theme('fontSize.lg'),
|
99
|
-
},
|
100
|
-
h6: {
|
101
|
-
...heading(theme),
|
102
|
-
},
|
103
|
-
img: {
|
104
|
-
'&::before': {
|
105
|
-
alignItems: 'center',
|
106
|
-
display: 'flex',
|
107
|
-
height: '100%',
|
108
|
-
justifyContent: 'center',
|
109
|
-
},
|
110
|
-
},
|
111
|
-
table: {
|
112
|
-
width: '100%',
|
113
|
-
},
|
114
|
-
td: {
|
115
|
-
padding: theme('padding.4') + ' ' + theme('padding.6'),
|
116
|
-
whiteSpace: 'nowrap',
|
117
|
-
},
|
118
|
-
th: {
|
119
|
-
padding: theme('padding.3') + ' ' + theme('padding.6'),
|
120
|
-
textAlign: 'left',
|
121
|
-
fontSize: theme('fontSize.xs'),
|
122
|
-
fontWeight: theme('fontWeight.medium'),
|
123
|
-
textTransform: 'uppercase',
|
124
|
-
letterSpacing: theme('letterSpacing.wider'),
|
125
|
-
},
|
126
|
-
})
|
127
|
-
addComponents({
|
128
|
-
'::placeholder': {
|
129
|
-
fontStyle: 'italic',
|
130
|
-
'.form-input&,.form-textarea&': {
|
131
|
-
opacity: '0.5',
|
132
|
-
},
|
133
|
-
},
|
134
|
-
'.form-input': {
|
135
|
-
appearance: 'none',
|
136
|
-
backgroundColor: theme('colors.gray.50'),
|
137
|
-
borderColor: theme('colors.gray.300'),
|
138
|
-
borderRadius: theme('borderRadius.DEFAULT'),
|
139
|
-
borderWidth: theme('borderWidth.DEFAULT'),
|
140
|
-
boxShadow: theme('boxShadow.sm'),
|
141
|
-
color: theme('colors.text.dark'),
|
142
|
-
lineHeight: theme('lineHeight.tight'),
|
143
|
-
padding: theme('padding.2') + ' ' + theme('padding.4'),
|
144
|
-
width: theme('width.full'),
|
145
|
-
'&:focus': {
|
146
|
-
backgroundColor: theme('colors.white'),
|
147
|
-
},
|
148
|
-
},
|
149
|
-
'.form-input-error': {
|
150
|
-
'.form-input': {
|
151
|
-
borderColor: theme('colors.red.500'),
|
152
|
-
},
|
153
|
-
},
|
154
|
-
'.form-input-success': {
|
155
|
-
'.form-input': {
|
156
|
-
borderColor: theme('colors.green.600'),
|
157
|
-
},
|
158
|
-
},
|
159
|
-
'.form-input-warning': {
|
160
|
-
'.form-input': {
|
161
|
-
borderColor: theme('colors.yellow.600'),
|
162
|
-
},
|
163
|
-
},
|
164
|
-
'.fullscreen': {
|
165
|
-
bottom: '0',
|
166
|
-
height: theme('height.full'),
|
167
|
-
left: '0',
|
168
|
-
position: 'absolute',
|
169
|
-
right: '0',
|
170
|
-
top: '0',
|
171
|
-
width: theme('width.full'),
|
172
|
-
},
|
173
|
-
'.object-position-custom': {
|
174
|
-
objectPosition: '50% 30%',
|
175
|
-
},
|
176
|
-
})
|
177
|
-
addUtilities({
|
178
|
-
'.disabled': {
|
179
|
-
cursor: theme('cursor.not-allowed'),
|
180
|
-
opacity: theme('opacity.50'),
|
181
|
-
},
|
182
|
-
})
|
183
|
-
},
|
184
|
-
],
|
185
|
-
theme: {
|
186
|
-
extend: {
|
187
|
-
animation: {
|
188
|
-
shake: 'shake 0.6s ease-in-out 0s 1 normal forwards running',
|
189
|
-
},
|
190
|
-
colors: {
|
191
|
-
background: {
|
192
|
-
bright: 'rgb(var(--color-background-bright))',
|
193
|
-
brighten: 'rgb(var(--color-background-brighten))',
|
194
|
-
dark: 'rgb(var(--color-background-dark))',
|
195
|
-
darken: 'rgb(var(--color-background-darken))',
|
196
|
-
},
|
197
|
-
link: {
|
198
|
-
bright: 'rgb(var(--color-link-bright))',
|
199
|
-
dark: 'rgb(var(--color-link-dark))',
|
200
|
-
},
|
201
|
-
text: {
|
202
|
-
bright: 'rgb(var(--color-text-bright))',
|
203
|
-
dark: 'rgb(var(--color-text-dark))',
|
204
|
-
},
|
205
|
-
vio: {
|
206
|
-
primary: {
|
207
|
-
bg: 'rgb(var(--color-vio-primary-bg))',
|
208
|
-
text: 'rgb(var(--color-vio-primary-text))',
|
209
|
-
},
|
210
|
-
},
|
211
|
-
},
|
212
|
-
keyframes: {
|
213
|
-
shake: {
|
214
|
-
'0%': {
|
215
|
-
transform: 'translateX(0)',
|
216
|
-
},
|
217
|
-
'15%': {
|
218
|
-
transform: 'translateX(0.375rem)',
|
219
|
-
},
|
220
|
-
'30%': {
|
221
|
-
transform: 'translateX(-0.375rem)',
|
222
|
-
},
|
223
|
-
'45%': {
|
224
|
-
transform: 'translateX(0.375rem)',
|
225
|
-
},
|
226
|
-
'60%': {
|
227
|
-
transform: 'translateX(-0.375rem)',
|
228
|
-
},
|
229
|
-
'75%': {
|
230
|
-
transform: 'translateX(0.375rem)',
|
231
|
-
},
|
232
|
-
'90%': {
|
233
|
-
transform: 'translateX(-0.375rem)',
|
234
|
-
},
|
235
|
-
'100%': {
|
236
|
-
transform: 'translateX(0)',
|
237
|
-
},
|
238
|
-
},
|
239
|
-
},
|
240
|
-
screens: {
|
241
|
-
12: { raw: '(min-aspect-ratio: 2/1)' },
|
242
|
-
},
|
243
|
-
typography: (theme: PluginAPI['theme']) => ({
|
244
|
-
DEFAULT: prose(theme),
|
245
|
-
sm: prose(theme),
|
246
|
-
base: prose(theme),
|
247
|
-
lg: prose(theme),
|
248
|
-
xl: prose(theme),
|
249
|
-
'2xl': prose(theme),
|
250
|
-
}),
|
251
|
-
},
|
252
|
-
},
|
253
|
-
} as ModuleOptions['config']
|