@nova-design-system/nova-base 3.0.0-beta.16
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.MD +157 -0
- package/README.md +94 -0
- package/assets/fonts/TT_Norms_Pro_Bold.woff2 +0 -0
- package/assets/fonts/TT_Norms_Pro_Medium.woff2 +0 -0
- package/assets/fonts/TT_Norms_Pro_Mono_Bold.woff2 +0 -0
- package/assets/fonts/TT_Norms_Pro_Mono_Medium.woff2 +0 -0
- package/assets/fonts/TT_Norms_Pro_Mono_Regular.woff2 +0 -0
- package/assets/fonts/TT_Norms_Pro_Regular.woff2 +0 -0
- package/assets/icons/icon-sprite.svg +1 -0
- package/assets/nova-fonts.css +3 -0
- package/dist/css/nova-utils.css +27979 -0
- package/dist/css/ocean.css +1391 -0
- package/dist/css/spark.css +1391 -0
- package/dist/js/ocean_dark.d.ts +412 -0
- package/dist/js/ocean_dark.js +412 -0
- package/dist/js/ocean_light.d.ts +412 -0
- package/dist/js/ocean_light.js +412 -0
- package/dist/js/primitives.d.ts +282 -0
- package/dist/js/primitives.js +282 -0
- package/dist/js/spacings.d.ts +250 -0
- package/dist/js/spacings.js +250 -0
- package/dist/js/spark_dark.d.ts +412 -0
- package/dist/js/spark_dark.js +412 -0
- package/dist/js/spark_light.d.ts +412 -0
- package/dist/js/spark_light.js +412 -0
- package/dist/lib/cjs/index.js +19 -0
- package/dist/lib/cjs/nova-plugin.js +163 -0
- package/dist/lib/cjs/nova-safelist.js +333 -0
- package/dist/lib/cjs/nova-theme.js +236 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/nova-plugin.d.ts +7 -0
- package/dist/lib/nova-plugin.js +156 -0
- package/dist/lib/nova-safelist.d.ts +26 -0
- package/dist/lib/nova-safelist.js +344 -0
- package/dist/lib/nova-theme.d.ts +88 -0
- package/dist/lib/nova-theme.js +233 -0
- package/dist/tokens/ocean_dark.json +1900 -0
- package/dist/tokens/ocean_light.json +1900 -0
- package/dist/tokens/primitives.json +1358 -0
- package/dist/tokens/spacings.json +1110 -0
- package/dist/tokens/spark_dark.json +1901 -0
- package/dist/tokens/spark_light.json +1900 -0
- package/package.json +40 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview This file contains various tailwind utilities for nova
|
|
3
|
+
*/
|
|
4
|
+
import plugin from 'tailwindcss/plugin.js';
|
|
5
|
+
export const novaTailwindPlugin = plugin(({ addUtilities, addComponents, addBase, theme }) => {
|
|
6
|
+
addBase({
|
|
7
|
+
'body, html': {
|
|
8
|
+
'background-color': theme('colors.background'),
|
|
9
|
+
color: theme('colors.text'),
|
|
10
|
+
},
|
|
11
|
+
'*:disabled': {
|
|
12
|
+
cursor: 'not-allowed',
|
|
13
|
+
},
|
|
14
|
+
'*:focus, *:focus-within': {
|
|
15
|
+
outline: 'none',
|
|
16
|
+
},
|
|
17
|
+
'button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible': {
|
|
18
|
+
outline: 'var(--focus-outline-stroke) solid var(--color-focus-brand)',
|
|
19
|
+
'outline-offset': 'var(--focus-outline-offset)',
|
|
20
|
+
'border-radius': 'var(--radius-rounded)',
|
|
21
|
+
},
|
|
22
|
+
a: {
|
|
23
|
+
color: 'var(--color-interaction-link-inline-text)',
|
|
24
|
+
'text-decoration': 'underline',
|
|
25
|
+
fontWeight: '700',
|
|
26
|
+
},
|
|
27
|
+
'a:hover': {
|
|
28
|
+
color: 'var(--color-interaction-link-inline-text-hover)',
|
|
29
|
+
},
|
|
30
|
+
h1: {
|
|
31
|
+
fontSize: 'var(--global-typography-h1-font-size)',
|
|
32
|
+
lineHeight: 'var(--global-typography-h1-line-height)',
|
|
33
|
+
fontWeight: 'var(--global-typography-h1-font-weight)',
|
|
34
|
+
color: 'var(--color-base-content-high-emphasis)',
|
|
35
|
+
},
|
|
36
|
+
h2: {
|
|
37
|
+
fontSize: 'var(--global-typography-h2-font-size)',
|
|
38
|
+
lineHeight: 'var(--global-typography-h2-line-height)',
|
|
39
|
+
fontWeight: 'var(--global-typography-h2-font-weight)',
|
|
40
|
+
color: 'var(--color-base-content-high-emphasis)',
|
|
41
|
+
},
|
|
42
|
+
h3: {
|
|
43
|
+
fontSize: 'var(--global-typography-h3-font-size)',
|
|
44
|
+
lineHeight: 'var(--global-typography-h3-line-height)',
|
|
45
|
+
fontWeight: 'var(--global-typography-h3-font-weight)',
|
|
46
|
+
color: 'var(--color-base-content-high-emphasis)',
|
|
47
|
+
},
|
|
48
|
+
h4: {
|
|
49
|
+
fontSize: 'var(--global-typography-h4-font-size)',
|
|
50
|
+
lineHeight: 'var(--global-typography-h4-line-height)',
|
|
51
|
+
fontWeight: 'var(--global-typography-h4-font-weight)',
|
|
52
|
+
color: 'var(--color-base-content-high-emphasis)',
|
|
53
|
+
},
|
|
54
|
+
h5: {
|
|
55
|
+
fontSize: 'var(--global-typography-h4-font-size)',
|
|
56
|
+
lineHeight: 'var(--global-typography-h4-line-height)',
|
|
57
|
+
fontWeight: 'var(--font-weight-medium-emphasis)',
|
|
58
|
+
color: 'var(--color-base-content-medium-emphasis)',
|
|
59
|
+
},
|
|
60
|
+
h6: {
|
|
61
|
+
fontSize: 'var(--global-typography-h4-font-size)',
|
|
62
|
+
lineHeight: 'var(--global-typography-h4-line-height)',
|
|
63
|
+
fontWeight: 'var(--font-weight-low-emphasis)',
|
|
64
|
+
color: 'var(--color-base-content-low-emphasis)',
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
addComponents({
|
|
68
|
+
'.link': {
|
|
69
|
+
color: 'var(--color-interaction-link-standalone-text)',
|
|
70
|
+
fontWeight: '500',
|
|
71
|
+
'text-decoration': 'none',
|
|
72
|
+
},
|
|
73
|
+
'.link:hover': {
|
|
74
|
+
color: 'var(--color-interaction-link-standalone-text-hover)',
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
addUtilities({
|
|
78
|
+
'.visually-hidden': {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
padding: '0',
|
|
81
|
+
border: '0',
|
|
82
|
+
overflow: 'hidden',
|
|
83
|
+
'white-space': 'nowrap',
|
|
84
|
+
width: '1px',
|
|
85
|
+
height: '1px',
|
|
86
|
+
margin: '-1px',
|
|
87
|
+
clip: 'rect(0, 0, 0, 0)',
|
|
88
|
+
},
|
|
89
|
+
'.text-high-emphasis': {
|
|
90
|
+
color: 'var(--color-base-content-high-emphasis)',
|
|
91
|
+
},
|
|
92
|
+
'.text-medium-emphasis': {
|
|
93
|
+
color: 'var(--color-base-content-medium-emphasis)',
|
|
94
|
+
},
|
|
95
|
+
'.text-low-emphasis': {
|
|
96
|
+
color: 'var(--color-base-content-low-emphasis)',
|
|
97
|
+
},
|
|
98
|
+
'.bg-level-00': {
|
|
99
|
+
'background-color': 'var(--color-base-level-00)',
|
|
100
|
+
},
|
|
101
|
+
'.bg-level-00-hover': {
|
|
102
|
+
'background-color': 'var(--color-base-level-00-hover)',
|
|
103
|
+
},
|
|
104
|
+
'.bg-level-10': {
|
|
105
|
+
'background-color': 'var(--color-base-level-10)',
|
|
106
|
+
},
|
|
107
|
+
'.bg-level-10-hover': {
|
|
108
|
+
'background-color': 'var(--color-base-level-10-hover)',
|
|
109
|
+
},
|
|
110
|
+
'.bg-level-20': {
|
|
111
|
+
'background-color': 'var(--color-base-level-20)',
|
|
112
|
+
},
|
|
113
|
+
'.bg-level-20-hover': {
|
|
114
|
+
'background-color': 'var(--color-base-level-20-hover)',
|
|
115
|
+
},
|
|
116
|
+
'.bg-level-30': {
|
|
117
|
+
'background-color': 'var(--color-base-level-30)',
|
|
118
|
+
},
|
|
119
|
+
'.bg-level-30-hover': {
|
|
120
|
+
'background-color': 'var(--color-base-level-30-hover)',
|
|
121
|
+
},
|
|
122
|
+
'.bg-level-40': {
|
|
123
|
+
'background-color': 'var(--color-base-level-40)',
|
|
124
|
+
},
|
|
125
|
+
'.bg-level-40-hover': {
|
|
126
|
+
'background-color': 'var(--color-base-level-40-hover)',
|
|
127
|
+
},
|
|
128
|
+
'.border-high-emphasis': {
|
|
129
|
+
'border-color': 'var(--color-base-border-high-emphasis)',
|
|
130
|
+
},
|
|
131
|
+
'.border-medium-emphasis': {
|
|
132
|
+
'border-color': 'var(--color-base-border-medium-emphasis)',
|
|
133
|
+
},
|
|
134
|
+
'.border-low-emphasis': {
|
|
135
|
+
'border-color': 'var(--color-base-border-low-emphasis)',
|
|
136
|
+
},
|
|
137
|
+
'.w-inherit': {
|
|
138
|
+
width: 'inherit',
|
|
139
|
+
},
|
|
140
|
+
'.w-initial': {
|
|
141
|
+
width: 'initial',
|
|
142
|
+
},
|
|
143
|
+
'.w-max-content': {
|
|
144
|
+
width: 'max-content',
|
|
145
|
+
},
|
|
146
|
+
'.w-min-content': {
|
|
147
|
+
width: 'min-content',
|
|
148
|
+
},
|
|
149
|
+
'.w-revert': {
|
|
150
|
+
width: 'revert',
|
|
151
|
+
},
|
|
152
|
+
'.w-unset': {
|
|
153
|
+
width: 'unset',
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tailwind safelists for Nova
|
|
3
|
+
*
|
|
4
|
+
* This file defines various Tailwind safelists used to compile a CSS file
|
|
5
|
+
* containing utility classes frequently needed in Nova. The output CSS is
|
|
6
|
+
* comprehensive and may be large. If users prefer a more lightweight approach,
|
|
7
|
+
* they can configure Tailwind directly without using the predefined safelists.
|
|
8
|
+
*/
|
|
9
|
+
export declare const responsive: string[];
|
|
10
|
+
export declare const colorSchemes: string[];
|
|
11
|
+
export declare const pointer: string[];
|
|
12
|
+
export declare const padding: {
|
|
13
|
+
pattern: RegExp;
|
|
14
|
+
variants: string[];
|
|
15
|
+
}[];
|
|
16
|
+
export declare const margin: {
|
|
17
|
+
pattern: RegExp;
|
|
18
|
+
variants: string[];
|
|
19
|
+
}[];
|
|
20
|
+
export declare const gap: {
|
|
21
|
+
pattern: RegExp;
|
|
22
|
+
variants: string[];
|
|
23
|
+
}[];
|
|
24
|
+
export declare const novaThemeSafelist: {
|
|
25
|
+
pattern: RegExp;
|
|
26
|
+
}[];
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tailwind safelists for Nova
|
|
3
|
+
*
|
|
4
|
+
* This file defines various Tailwind safelists used to compile a CSS file
|
|
5
|
+
* containing utility classes frequently needed in Nova. The output CSS is
|
|
6
|
+
* comprehensive and may be large. If users prefer a more lightweight approach,
|
|
7
|
+
* they can configure Tailwind directly without using the predefined safelists.
|
|
8
|
+
*/
|
|
9
|
+
import { spacing } from './nova-theme.js';
|
|
10
|
+
// Enables responsive spacing modifiers for safelist variants
|
|
11
|
+
export const responsive = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'];
|
|
12
|
+
// Enables responsive color schemes for safelist variants
|
|
13
|
+
export const colorSchemes = ['light', 'dark'];
|
|
14
|
+
// Enables pointer states for safelist variants
|
|
15
|
+
export const pointer = ['hover', 'focus', 'active'];
|
|
16
|
+
export const padding = [
|
|
17
|
+
{
|
|
18
|
+
pattern: new RegExp(`^p-(${Object.keys(spacing).join('|')})$`),
|
|
19
|
+
variants: responsive,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
pattern: new RegExp(`^py-(${Object.keys(spacing).join('|')})$`),
|
|
23
|
+
variants: responsive,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
pattern: new RegExp(`^px-(${Object.keys(spacing).join('|')})$`),
|
|
27
|
+
variants: responsive,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
pattern: new RegExp(`^pt-(${Object.keys(spacing).join('|')})$`),
|
|
31
|
+
variants: responsive,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
pattern: new RegExp(`^pr-(${Object.keys(spacing).join('|')})$`),
|
|
35
|
+
variants: responsive,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
pattern: new RegExp(`^pb-(${Object.keys(spacing).join('|')})$`),
|
|
39
|
+
variants: responsive,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
pattern: new RegExp(`^pl-(${Object.keys(spacing).join('|')})$`),
|
|
43
|
+
variants: responsive,
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
export const margin = [
|
|
47
|
+
{
|
|
48
|
+
pattern: new RegExp(`^m-(${Object.keys(spacing).join('|')}|auto)$`),
|
|
49
|
+
variants: responsive,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
pattern: new RegExp(`^my-(${Object.keys(spacing).join('|')}|auto)$`),
|
|
53
|
+
variants: responsive,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
pattern: new RegExp(`^mx-(${Object.keys(spacing).join('|')}|auto)$`),
|
|
57
|
+
variants: responsive,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
pattern: new RegExp(`^mt-(${Object.keys(spacing).join('|')}|auto)$`),
|
|
61
|
+
variants: responsive,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
pattern: new RegExp(`^mr-(${Object.keys(spacing).join('|')}|auto)$`),
|
|
65
|
+
variants: responsive,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
pattern: new RegExp(`^mb-(${Object.keys(spacing).join('|')}|auto)$`),
|
|
69
|
+
variants: responsive,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
pattern: new RegExp(`^ml-(${Object.keys(spacing).join('|')}|auto)$`),
|
|
73
|
+
variants: responsive,
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
export const gap = [
|
|
77
|
+
{
|
|
78
|
+
pattern: new RegExp(`^gap-(${Object.keys(spacing).join('|')})$`),
|
|
79
|
+
variants: responsive,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
pattern: new RegExp(`^gap-x-(${Object.keys(spacing).join('|')})$`),
|
|
83
|
+
variants: responsive,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
pattern: new RegExp(`^gap-y-(${Object.keys(spacing).join('|')})$`),
|
|
87
|
+
variants: responsive,
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
const flexBox = [
|
|
91
|
+
{ pattern: /^flex$/, variants: responsive },
|
|
92
|
+
{ pattern: /^inline-flex$/, variants: responsive },
|
|
93
|
+
{ pattern: /^flex-row$/, variants: responsive },
|
|
94
|
+
{ pattern: /^flex-row-reverse$/, variants: responsive },
|
|
95
|
+
{ pattern: /^flex-col$/, variants: responsive },
|
|
96
|
+
{ pattern: /^flex-col-reverse$/, variants: responsive },
|
|
97
|
+
{ pattern: /^flex-wrap$/, variants: responsive },
|
|
98
|
+
{ pattern: /^flex-wrap-reverse$/, variants: responsive },
|
|
99
|
+
{ pattern: /^flex-nowrap$/, variants: responsive },
|
|
100
|
+
{
|
|
101
|
+
pattern: /^place-content-(start|end|center|between|around|evenly)$/,
|
|
102
|
+
variants: responsive,
|
|
103
|
+
},
|
|
104
|
+
{ pattern: /^place-items-(start|end|center|stretch)$/, variants: responsive },
|
|
105
|
+
{
|
|
106
|
+
pattern: /^place-self-(auto|start|end|center|stretch)$/,
|
|
107
|
+
variants: responsive,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
pattern: /^justify-(start|end|center|between|around|evenly)$/,
|
|
111
|
+
variants: responsive,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
pattern: /^justify-items-(start|end|center|stretch)$/,
|
|
115
|
+
variants: responsive,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
pattern: /^justify-self-(auto|start|end|center|stretch)$/,
|
|
119
|
+
variants: responsive,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
pattern: /^align-(start|end|center|baseline|stretch)$/,
|
|
123
|
+
variants: responsive,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
pattern: /^items-(start|end|center|baseline|stretch)$/,
|
|
127
|
+
variants: responsive,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
pattern: /^self-(auto|start|end|center|baseline|stretch)$/,
|
|
131
|
+
variants: responsive,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
pattern: /^content-(start|end|center|between|around|evenly)$/,
|
|
135
|
+
variants: responsive,
|
|
136
|
+
},
|
|
137
|
+
{ pattern: /^order-(\d+|first|last|none)$/, variants: responsive },
|
|
138
|
+
{ pattern: /^flex-(\d+|none|auto|initial)$/, variants: responsive },
|
|
139
|
+
{ pattern: /^grow-(0|1)$/, variants: responsive },
|
|
140
|
+
{ pattern: /^shrink-(0|1)$/, variants: responsive },
|
|
141
|
+
];
|
|
142
|
+
const grid = [
|
|
143
|
+
{ pattern: /^grid$/, variants: responsive },
|
|
144
|
+
{ pattern: /^inline-grid$/, variants: responsive },
|
|
145
|
+
{ pattern: /^grid-cols-(\d+|none|auto)$/, variants: responsive },
|
|
146
|
+
{ pattern: /^grid-rows-(\d+|none|auto)$/, variants: responsive },
|
|
147
|
+
{ pattern: /^col-span-(\d+|full)$/, variants: responsive },
|
|
148
|
+
{ pattern: /^col-start-(\d+|auto)$/, variants: responsive },
|
|
149
|
+
{ pattern: /^col-end-(\d+|auto)$/, variants: responsive },
|
|
150
|
+
{ pattern: /^row-span-(\d+|full)$/, variants: responsive },
|
|
151
|
+
{ pattern: /^row-start-(\d+|auto)$/, variants: responsive },
|
|
152
|
+
{ pattern: /^row-end-(\d+|auto)$/, variants: responsive },
|
|
153
|
+
{ pattern: /^gap-(\d+|px)$/, variants: responsive },
|
|
154
|
+
{ pattern: /^gap-x-(\d+|px)$/, variants: responsive },
|
|
155
|
+
{ pattern: /^gap-y-(\d+|px)$/, variants: responsive },
|
|
156
|
+
{
|
|
157
|
+
pattern: /^auto-cols-(auto|min|max|fr)$/,
|
|
158
|
+
variants: responsive,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
pattern: /^auto-rows-(auto|min|max|fr)$/,
|
|
162
|
+
variants: responsive,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
pattern: /^place-content-(start|end|center|between|around|evenly|stretch)$/,
|
|
166
|
+
variants: responsive,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
pattern: /^place-items-(start|end|center|stretch)$/,
|
|
170
|
+
variants: responsive,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
pattern: /^place-self-(auto|start|end|center|stretch)$/,
|
|
174
|
+
variants: responsive,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
pattern: /^justify-items-(start|end|center|stretch)$/,
|
|
178
|
+
variants: responsive,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
pattern: /^justify-self-(auto|start|end|center|stretch)$/,
|
|
182
|
+
variants: responsive,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
pattern: /^align-(start|end|center|baseline|stretch)$/,
|
|
186
|
+
variants: responsive,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
pattern: /^items-(start|end|center|baseline|stretch)$/,
|
|
190
|
+
variants: responsive,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
pattern: /^self-(auto|start|end|center|baseline|stretch)$/,
|
|
194
|
+
variants: responsive,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
pattern: /^content-(start|end|center|between|around|evenly|stretch)$/,
|
|
198
|
+
variants: responsive,
|
|
199
|
+
},
|
|
200
|
+
];
|
|
201
|
+
const spaceBetween = [
|
|
202
|
+
{
|
|
203
|
+
pattern: /^space-x-(\d+|px|reverse)$/,
|
|
204
|
+
variants: responsive,
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
pattern: /^space-y-(\d+|px|reverse)$/,
|
|
208
|
+
variants: responsive,
|
|
209
|
+
},
|
|
210
|
+
];
|
|
211
|
+
const overflow = [
|
|
212
|
+
{ pattern: /^overflow-(auto|hidden|visible|scroll)$/, variants: responsive },
|
|
213
|
+
{
|
|
214
|
+
pattern: /^overflow-x-(auto|hidden|visible|scroll)$/,
|
|
215
|
+
variants: responsive,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
pattern: /^overflow-y-(auto|hidden|visible|scroll)$/,
|
|
219
|
+
variants: responsive,
|
|
220
|
+
},
|
|
221
|
+
];
|
|
222
|
+
const position = [
|
|
223
|
+
{
|
|
224
|
+
pattern: /^(static|fixed|absolute|relative|sticky)$/,
|
|
225
|
+
variants: responsive,
|
|
226
|
+
},
|
|
227
|
+
{ pattern: /^inset-(0|auto|full)$/ },
|
|
228
|
+
{ pattern: /^inset-x-(0|auto|full)$/ },
|
|
229
|
+
{ pattern: /^inset-y-(0|auto|full)$/ },
|
|
230
|
+
{ pattern: /^top-(0|auto|full)$/, variants: responsive },
|
|
231
|
+
{ pattern: /^right-(0|auto|full)$/, variants: responsive },
|
|
232
|
+
{ pattern: /^bottom-(0|auto|full)$/, variants: responsive },
|
|
233
|
+
{ pattern: /^left-(0|auto|full)$/, variants: responsive },
|
|
234
|
+
{ pattern: /^z-(\d+|auto)$/ },
|
|
235
|
+
];
|
|
236
|
+
const display = [
|
|
237
|
+
{
|
|
238
|
+
pattern: /^(block|inline-block|inline|flex|inline-flex|table|inline-table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row-group|table-row|flow-root|grid|inline-grid|contents|hidden)$/,
|
|
239
|
+
},
|
|
240
|
+
];
|
|
241
|
+
const textAlign = [
|
|
242
|
+
{ pattern: /^text-(left|center|right|justify)$/, variants: responsive },
|
|
243
|
+
];
|
|
244
|
+
const textSize = [
|
|
245
|
+
{
|
|
246
|
+
pattern: /^text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,
|
|
247
|
+
variants: responsive,
|
|
248
|
+
},
|
|
249
|
+
];
|
|
250
|
+
const whitespace = [
|
|
251
|
+
{
|
|
252
|
+
pattern: /^whitespace-(normal|nowrap|pre|pre-line|pre-wrap)$/,
|
|
253
|
+
variants: responsive,
|
|
254
|
+
},
|
|
255
|
+
];
|
|
256
|
+
const verticalAlign = [
|
|
257
|
+
{ pattern: /^align-(baseline|top|middle|bottom|text-top|text-bottom)$/ },
|
|
258
|
+
];
|
|
259
|
+
const fontWeight = [
|
|
260
|
+
{
|
|
261
|
+
pattern: /^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$/,
|
|
262
|
+
},
|
|
263
|
+
];
|
|
264
|
+
const borders = [
|
|
265
|
+
{ pattern: /^border$/ },
|
|
266
|
+
{ pattern: /^border-(\d+|0)$/ },
|
|
267
|
+
{ pattern: /^border-(solid|dashed|dotted|double|none)$/ },
|
|
268
|
+
{ pattern: /^border-(t|r|b|l|x|y)$/ },
|
|
269
|
+
{ pattern: /^border-(t|r|b|l|x|y)-(\d+|0)$/ },
|
|
270
|
+
{ pattern: /^rounded$/ },
|
|
271
|
+
{ pattern: /^rounded-(t|r|b|l|full|none)$/ },
|
|
272
|
+
{ pattern: /^rounded-(tl|tr|bl|br)$/ },
|
|
273
|
+
{ pattern: /^rounded-(\d+|sm|md|lg|xl|2xl|3xl)$/ },
|
|
274
|
+
];
|
|
275
|
+
const width = [
|
|
276
|
+
{
|
|
277
|
+
pattern: /^w-(\d+|auto|full|screen|inherit|initial|max-content|min-content|revert|unset)$/,
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
pattern: /^max-w-(\d+|xs|sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|full|min|max|prose|screen-(sm|md|lg|xl|2xl))$/,
|
|
281
|
+
},
|
|
282
|
+
];
|
|
283
|
+
const height = [
|
|
284
|
+
{ pattern: /^h-(\d+|auto|full|screen)$/ },
|
|
285
|
+
{
|
|
286
|
+
pattern: /^max-h-(\d+|xs|sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|full|min|max|prose|screen-(sm|md|lg|xl|2xl))$/,
|
|
287
|
+
},
|
|
288
|
+
];
|
|
289
|
+
const colors = [
|
|
290
|
+
{ pattern: /^bg-(\w+)$/, variants: colorSchemes },
|
|
291
|
+
{ pattern: /^text-(\w+)$/, variants: colorSchemes },
|
|
292
|
+
{
|
|
293
|
+
pattern: /^bg-(green|turquoise|petrol|lime|crimson|red|yellow|gray|amber|orange)-(?!(950))\d{1,3}$/,
|
|
294
|
+
variants: colorSchemes,
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
pattern: /^text-(green|turquoise|petrol|lime|crimson|red|yellow|gray|amber|orange)-(?!(950))\d{1,3}$/,
|
|
298
|
+
variants: colorSchemes,
|
|
299
|
+
},
|
|
300
|
+
];
|
|
301
|
+
const cursors = [
|
|
302
|
+
{
|
|
303
|
+
pattern: /^cursor-(auto|default|pointer|wait|text|move|help|not-allowed|none|progress|crosshair|zoom-in|zoom-out|grab|grabbing|col-resize|row-resize|all-scroll)$/,
|
|
304
|
+
},
|
|
305
|
+
];
|
|
306
|
+
const resize = [
|
|
307
|
+
{
|
|
308
|
+
pattern: /^resize-(none|y|x)$/,
|
|
309
|
+
variants: responsive,
|
|
310
|
+
},
|
|
311
|
+
];
|
|
312
|
+
// From the nova tailwind plugin (nova-plugin.ts)
|
|
313
|
+
const utils = [
|
|
314
|
+
{ pattern: /^visually-hidden$/, variants: responsive },
|
|
315
|
+
{ pattern: /^font-(high|medium|low)-emphasis$/ },
|
|
316
|
+
{ pattern: /^bg-level-(00|10|20|30|40)(-hover)?$/ },
|
|
317
|
+
{ pattern: /^border-(high|medium|low)-emphasis$/ },
|
|
318
|
+
];
|
|
319
|
+
// From the nova tailwind plugin (nova-plugin.ts)
|
|
320
|
+
const components = [{ pattern: /^link$/, variants: pointer }];
|
|
321
|
+
export const novaThemeSafelist = [
|
|
322
|
+
...padding,
|
|
323
|
+
...margin,
|
|
324
|
+
...gap,
|
|
325
|
+
...flexBox,
|
|
326
|
+
...grid,
|
|
327
|
+
...spaceBetween,
|
|
328
|
+
...overflow,
|
|
329
|
+
...position,
|
|
330
|
+
...display,
|
|
331
|
+
...textAlign,
|
|
332
|
+
...textSize,
|
|
333
|
+
...whitespace,
|
|
334
|
+
...verticalAlign,
|
|
335
|
+
...fontWeight,
|
|
336
|
+
...borders,
|
|
337
|
+
...width,
|
|
338
|
+
...height,
|
|
339
|
+
...colors,
|
|
340
|
+
...cursors,
|
|
341
|
+
...resize,
|
|
342
|
+
...utils,
|
|
343
|
+
...components,
|
|
344
|
+
];
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview This file contains various tailwind extensions for nova
|
|
3
|
+
*/
|
|
4
|
+
import type { Config } from 'tailwindcss';
|
|
5
|
+
export declare const spacing: {
|
|
6
|
+
0: string;
|
|
7
|
+
0.5: string;
|
|
8
|
+
1: string;
|
|
9
|
+
1.5: string;
|
|
10
|
+
2: string;
|
|
11
|
+
2.5: string;
|
|
12
|
+
3: string;
|
|
13
|
+
3.5: string;
|
|
14
|
+
4: string;
|
|
15
|
+
5: string;
|
|
16
|
+
6: string;
|
|
17
|
+
7: string;
|
|
18
|
+
8: string;
|
|
19
|
+
9: string;
|
|
20
|
+
10: string;
|
|
21
|
+
11: string;
|
|
22
|
+
12: string;
|
|
23
|
+
14: string;
|
|
24
|
+
16: string;
|
|
25
|
+
20: string;
|
|
26
|
+
24: string;
|
|
27
|
+
28: string;
|
|
28
|
+
32: string;
|
|
29
|
+
36: string;
|
|
30
|
+
40: string;
|
|
31
|
+
44: string;
|
|
32
|
+
48: string;
|
|
33
|
+
52: string;
|
|
34
|
+
56: string;
|
|
35
|
+
60: string;
|
|
36
|
+
64: string;
|
|
37
|
+
72: string;
|
|
38
|
+
80: string;
|
|
39
|
+
96: string;
|
|
40
|
+
px: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const fontFamily: {
|
|
43
|
+
sans: string;
|
|
44
|
+
mono: string;
|
|
45
|
+
};
|
|
46
|
+
export declare const borderRadius: {
|
|
47
|
+
none: string;
|
|
48
|
+
sm: string;
|
|
49
|
+
DEFAULT: string;
|
|
50
|
+
md: string;
|
|
51
|
+
lg: string;
|
|
52
|
+
xl: string;
|
|
53
|
+
'2xl': string;
|
|
54
|
+
'3xl': string;
|
|
55
|
+
full: string;
|
|
56
|
+
};
|
|
57
|
+
export declare const fontSize: {
|
|
58
|
+
xs: [string, string];
|
|
59
|
+
sm: [string, string];
|
|
60
|
+
md: [string, string];
|
|
61
|
+
lg: [string, string];
|
|
62
|
+
xl: [string, string];
|
|
63
|
+
'2xl': [string, string];
|
|
64
|
+
'3xl': [string, string];
|
|
65
|
+
'4xl': [string, string];
|
|
66
|
+
'5xl': [string, string];
|
|
67
|
+
'6xl': [string, string];
|
|
68
|
+
'7xl': [string, string];
|
|
69
|
+
'8xl': [string, string];
|
|
70
|
+
'9xl': [string, string];
|
|
71
|
+
};
|
|
72
|
+
export declare const lineHeight: {
|
|
73
|
+
xs: string;
|
|
74
|
+
sm: string;
|
|
75
|
+
md: string;
|
|
76
|
+
lg: string;
|
|
77
|
+
xl: string;
|
|
78
|
+
'2xl': string;
|
|
79
|
+
'3xl': string;
|
|
80
|
+
'4xl': string;
|
|
81
|
+
'5xl': string;
|
|
82
|
+
'6xl': string;
|
|
83
|
+
'7xl': string;
|
|
84
|
+
'8xl': string;
|
|
85
|
+
'9xl': string;
|
|
86
|
+
};
|
|
87
|
+
export declare const colors: Config['theme']['colors'];
|
|
88
|
+
export declare const novaTailwindTheme: Config['theme'];
|