linkedunion-design-kit 0.1.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/.eslintrc.json +6 -0
- package/.storybook/main.ts +20 -0
- package/.storybook/preview.ts +15 -0
- package/README.md +36 -0
- package/_test_/Color.test.js +42 -0
- package/app/favicon.ico +0 -0
- package/app/globals.css +27 -0
- package/app/layout.tsx +22 -0
- package/app/page.tsx +113 -0
- package/components/Color/Color.stories.tsx +87 -0
- package/components/Color/Color.tsx +19 -0
- package/components/Typography/Typography.stories.tsx +59 -0
- package/components/Typography/Typography.tsx +8 -0
- package/dist/app/layout.d.ts +6 -0
- package/dist/app/layout.jsx +13 -0
- package/dist/app/page.d.ts +1 -0
- package/dist/app/page.jsx +71 -0
- package/dist/components/Color/Color.d.ts +3 -0
- package/dist/components/Color/Color.jsx +16 -0
- package/dist/components/Color/Color.stories.d.ts +10 -0
- package/dist/components/Color/Color.stories.jsx +76 -0
- package/dist/components/Typography/Typography.d.ts +3 -0
- package/dist/components/Typography/Typography.jsx +7 -0
- package/dist/components/Typography/Typography.stories.d.ts +5 -0
- package/dist/components/Typography/Typography.stories.jsx +51 -0
- package/dist/global.css +8806 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/tailwind.config.d.ts +3 -0
- package/dist/tailwind.config.js +75 -0
- package/dist/utils/index.d.ts +305 -0
- package/dist/utils/index.js +413 -0
- package/index.ts +3 -0
- package/jest.config.js +23 -0
- package/jest.setup.js +25 -0
- package/next.config.js +4 -0
- package/package-lock.json +12682 -0
- package/package.json +60 -0
- package/postcss.config.js +6 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/tailwind.config.ts +89 -0
- package/tsconfig.json +50 -0
- package/types/interface.d.ts +18 -0
- package/utils/index.ts +439 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
//************Used for typography and color utilities Storybook************
|
|
2
|
+
export var text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
|
|
3
|
+
export var colorGroups = {
|
|
4
|
+
primary: [
|
|
5
|
+
"bg-primary-0",
|
|
6
|
+
"bg-primary-100",
|
|
7
|
+
"bg-primary-200",
|
|
8
|
+
"bg-primary-300",
|
|
9
|
+
"bg-primary-400",
|
|
10
|
+
"bg-primary-500",
|
|
11
|
+
"bg-primary-600",
|
|
12
|
+
"bg-primary-700",
|
|
13
|
+
"bg-primary-800",
|
|
14
|
+
"bg-primary-900",
|
|
15
|
+
"bg-primary-1000",
|
|
16
|
+
],
|
|
17
|
+
gray: [
|
|
18
|
+
"bg-gray-0",
|
|
19
|
+
"bg-gray-100",
|
|
20
|
+
"bg-gray-200",
|
|
21
|
+
"bg-gray-300",
|
|
22
|
+
"bg-gray-400",
|
|
23
|
+
"bg-gray-500",
|
|
24
|
+
"bg-gray-600",
|
|
25
|
+
"bg-gray-700",
|
|
26
|
+
"bg-gray-800",
|
|
27
|
+
"bg-gray-900",
|
|
28
|
+
"bg-gray-1000",
|
|
29
|
+
],
|
|
30
|
+
success: [
|
|
31
|
+
"bg-success-0",
|
|
32
|
+
"bg-success-100",
|
|
33
|
+
"bg-success-200",
|
|
34
|
+
"bg-success-300",
|
|
35
|
+
"bg-success-400",
|
|
36
|
+
"bg-success-500",
|
|
37
|
+
"bg-success-600",
|
|
38
|
+
"bg-success-700",
|
|
39
|
+
"bg-success-800",
|
|
40
|
+
"bg-success-900",
|
|
41
|
+
"bg-success-1000",
|
|
42
|
+
],
|
|
43
|
+
warning: [
|
|
44
|
+
"bg-warning-0",
|
|
45
|
+
"bg-warning-100",
|
|
46
|
+
"bg-warning-200",
|
|
47
|
+
"bg-warning-300",
|
|
48
|
+
"bg-warning-400",
|
|
49
|
+
"bg-warning-500",
|
|
50
|
+
"bg-warning-600",
|
|
51
|
+
"bg-warning-700",
|
|
52
|
+
"bg-warning-800",
|
|
53
|
+
"bg-warning-900",
|
|
54
|
+
"bg-warning-1000",
|
|
55
|
+
],
|
|
56
|
+
danger: [
|
|
57
|
+
"bg-danger-0",
|
|
58
|
+
"bg-danger-100",
|
|
59
|
+
"bg-danger-200",
|
|
60
|
+
"bg-danger-300",
|
|
61
|
+
"bg-danger-400",
|
|
62
|
+
"bg-danger-500",
|
|
63
|
+
"bg-danger-600",
|
|
64
|
+
"bg-danger-700",
|
|
65
|
+
"bg-danger-800",
|
|
66
|
+
"bg-danger-900",
|
|
67
|
+
"bg-danger-1000",
|
|
68
|
+
],
|
|
69
|
+
info: [
|
|
70
|
+
"bg-info-0",
|
|
71
|
+
"bg-info-100",
|
|
72
|
+
"bg-info-200",
|
|
73
|
+
"bg-info-300",
|
|
74
|
+
"bg-info-400",
|
|
75
|
+
"bg-info-500",
|
|
76
|
+
"bg-info-600",
|
|
77
|
+
"bg-info-700",
|
|
78
|
+
"bg-info-800",
|
|
79
|
+
"bg-info-900",
|
|
80
|
+
"bg-info-1000",
|
|
81
|
+
]
|
|
82
|
+
};
|
|
83
|
+
export var fontSizes = [
|
|
84
|
+
{ key: 'lu-base-font-size', label: 'lu-base-font-size: 16px' },
|
|
85
|
+
{ key: 'lu-font-size-x-small', label: 'lu-font-size-x-small: 12px' },
|
|
86
|
+
{ key: 'lu-font-size-small', label: 'lu-font-size-small: 14px' },
|
|
87
|
+
{ key: 'lu-font-size-medium', label: 'lu-font-size-medium: 16px' },
|
|
88
|
+
{ key: 'lu-font-size-large', label: 'lu-font-size-large: 18px' },
|
|
89
|
+
{ key: 'lu-font-size-x-large', label: 'lu-font-size-x-large: 20px' },
|
|
90
|
+
{ key: 'lu-font-size-2x-large', label: 'lu-font-size-2x-large: 24px' },
|
|
91
|
+
{ key: 'lu-font-size-3x-large', label: 'lu-font-size-3x-large: 28px' },
|
|
92
|
+
{ key: 'lu-font-size-4x-large', label: 'lu-font-size-4x-large: 32px' },
|
|
93
|
+
{ key: 'lu-font-size-5x-large', label: 'lu-font-size-5x-large: 36px' },
|
|
94
|
+
{ key: 'lu-font-size-6x-large', label: 'lu-font-size-6x-large: 40px' },
|
|
95
|
+
{ key: 'lu-font-size-7x-large', label: 'lu-font-size-7x-large: 48px' },
|
|
96
|
+
{ key: 'lu-font-size-huge', label: 'lu-font-size-huge: 64px' },
|
|
97
|
+
];
|
|
98
|
+
export var fontWeights = [
|
|
99
|
+
{ key: 'lu-font-weight-thin', label: 'lu-font-weight-thin: 100' },
|
|
100
|
+
{ key: 'lu-font-weight-extra-light', label: 'lu-font-weight-extra-light: 200' },
|
|
101
|
+
{ key: 'lu-font-weight-light', label: 'lu-font-weight-light: 300' },
|
|
102
|
+
{ key: 'lu-font-weight-regular', label: 'lu-font-weight-regular: 400' },
|
|
103
|
+
{ key: 'lu-font-weight-medium', label: 'lu-font-weight-medium: 500' },
|
|
104
|
+
{ key: 'lu-font-weight-semibold', label: 'lu-font-weight-semibold: 600' },
|
|
105
|
+
{ key: 'lu-font-weight-bold', label: 'lu-font-weight-bold: 700' },
|
|
106
|
+
{ key: 'lu-font-weight-extra-bold', label: 'lu-font-weight-extra-bold: 800' },
|
|
107
|
+
{ key: 'lu-font-weight-black', label: 'lu-font-weight-black: 900' },
|
|
108
|
+
];
|
|
109
|
+
export var lineHeights = [
|
|
110
|
+
{ key: 'lu-line-height-xs', label: 'lu-line-height-xs: 1' },
|
|
111
|
+
{ key: 'lu-line-height-sm', label: 'lu-line-height-sm: 1.25' },
|
|
112
|
+
{ key: 'lu-line-height-base', label: 'lu-line-height-base: 1.5' },
|
|
113
|
+
{ key: 'lu-line-height-lg', label: 'lu-line-height-lg: 2' }
|
|
114
|
+
];
|
|
115
|
+
export var textAlignment = [
|
|
116
|
+
{ key: 'lu-text-left', label: 'lu-text-left: left' },
|
|
117
|
+
{ key: 'lu-text-center', label: 'lu-text-center: center' },
|
|
118
|
+
{ key: 'lu-text-right', label: 'lu-text-right: right' },
|
|
119
|
+
{ key: 'lu-text-justify', label: 'lu-text-justify: justify' },
|
|
120
|
+
{ key: 'lu-text-space-between', label: 'lu-text-space-between: space-between' },
|
|
121
|
+
];
|
|
122
|
+
export var textTransform = [
|
|
123
|
+
{ key: 'lu-text-lowercase', label: 'lu-text-lowercase: lowercase' },
|
|
124
|
+
{ key: 'lu-text-uppercase', label: 'lu-text-uppercase: uppercase' },
|
|
125
|
+
{ key: 'lu-text-capitalize', label: 'lu-text-capitalize: capitalize' },
|
|
126
|
+
];
|
|
127
|
+
export var textDecorations = [
|
|
128
|
+
{ key: 'lu-text-decoration-none', label: 'lu-text-decoration-none: none' },
|
|
129
|
+
{ key: 'lu-text-decoration-underline', label: 'lu-text-decoration-underline: underline' },
|
|
130
|
+
{ key: 'lu-text-decoration-linethrough', label: 'lu-text-decoration-linethrough: linethrough' },
|
|
131
|
+
];
|
|
132
|
+
export var textWraps = [
|
|
133
|
+
{ key: 'lu-text-wrap', label: 'lu-text-wrap: normal' },
|
|
134
|
+
{ key: 'lu-text-nowrap', label: 'lu-text-nowrap: nowrap' },
|
|
135
|
+
];
|
|
136
|
+
//Plugin for generating utilities (Used in tailwind.config.js)
|
|
137
|
+
export default function generateUtilities(property, theme) {
|
|
138
|
+
var utilities = theme(property);
|
|
139
|
+
var newUtilities = Object.keys(utilities).reduce(function (acc, key) {
|
|
140
|
+
var _a;
|
|
141
|
+
acc[".".concat(key)] = (_a = {}, _a[property] = utilities[key], _a);
|
|
142
|
+
return acc;
|
|
143
|
+
}, {});
|
|
144
|
+
return newUtilities;
|
|
145
|
+
}
|
|
146
|
+
//************Used for tailwind configuration************
|
|
147
|
+
export var customColors = {
|
|
148
|
+
white: '#FEFEFE',
|
|
149
|
+
black: '#0F0F0F',
|
|
150
|
+
primary: {
|
|
151
|
+
0: '#FBFCFE',
|
|
152
|
+
100: '#E2EDF9',
|
|
153
|
+
200: '#B8D3EF',
|
|
154
|
+
300: '#8EB9E6',
|
|
155
|
+
400: '#649EDD',
|
|
156
|
+
500: '#3A84D4',
|
|
157
|
+
600: '#276AB3',
|
|
158
|
+
700: '#1E528A',
|
|
159
|
+
800: '#153960',
|
|
160
|
+
900: '#0C2036',
|
|
161
|
+
1000: '#03080D'
|
|
162
|
+
},
|
|
163
|
+
gray: {
|
|
164
|
+
0: '#FCFCFD',
|
|
165
|
+
100: '#ECEDEE',
|
|
166
|
+
200: '#D2D4D5',
|
|
167
|
+
300: '#B7BABD',
|
|
168
|
+
400: '#9DA1A5',
|
|
169
|
+
500: '#82878C',
|
|
170
|
+
600: '#696E72',
|
|
171
|
+
700: '#515458',
|
|
172
|
+
800: '#383B3D',
|
|
173
|
+
900: '#202122',
|
|
174
|
+
1000: '#070808'
|
|
175
|
+
},
|
|
176
|
+
success: {
|
|
177
|
+
0: '#FCFDFC',
|
|
178
|
+
100: '#EBF5F0',
|
|
179
|
+
200: '#D1E7DD',
|
|
180
|
+
300: '#A3CFBB',
|
|
181
|
+
400: '#75B798',
|
|
182
|
+
500: '#479F76',
|
|
183
|
+
600: '#198653',
|
|
184
|
+
700: '#146C43',
|
|
185
|
+
800: '#0F5132',
|
|
186
|
+
900: '#0A3622',
|
|
187
|
+
1000: '#051B11'
|
|
188
|
+
},
|
|
189
|
+
warning: {
|
|
190
|
+
0: '#FFFDF5',
|
|
191
|
+
100: '#FFF9E5',
|
|
192
|
+
200: '#FFF4CC',
|
|
193
|
+
300: '#FFE999',
|
|
194
|
+
400: '#FFDE66',
|
|
195
|
+
500: '#FFD333',
|
|
196
|
+
600: '#FFC700',
|
|
197
|
+
700: '#DBAC00',
|
|
198
|
+
800: '#8A6C00',
|
|
199
|
+
900: '#665000',
|
|
200
|
+
1000: '#473800'
|
|
201
|
+
},
|
|
202
|
+
danger: {
|
|
203
|
+
0: '#FFFAFA',
|
|
204
|
+
100: '#FFE0E4',
|
|
205
|
+
200: '#FEC6CB',
|
|
206
|
+
300: '#FD9EA7',
|
|
207
|
+
400: '#FC7784',
|
|
208
|
+
500: '#FA4F5F',
|
|
209
|
+
600: '#E0061B',
|
|
210
|
+
700: '#B30515',
|
|
211
|
+
800: '#73030E',
|
|
212
|
+
900: '#460208',
|
|
213
|
+
1000: '#230104'
|
|
214
|
+
},
|
|
215
|
+
info: {
|
|
216
|
+
0: '#FBFBFE',
|
|
217
|
+
100: '#ECE9FB',
|
|
218
|
+
200: '#D5CFF6',
|
|
219
|
+
300: '#C3BAF2',
|
|
220
|
+
400: '#ADA0EE',
|
|
221
|
+
500: '#8976E6',
|
|
222
|
+
600: '#6249DE',
|
|
223
|
+
700: '#4226CF',
|
|
224
|
+
800: '#341EA4',
|
|
225
|
+
900: '#261679',
|
|
226
|
+
1000: '#190E4E'
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
export var customFontSize = {
|
|
230
|
+
'lu-base-font-size': '16px',
|
|
231
|
+
'lu-font-size-x-small': '12px',
|
|
232
|
+
'lu-font-size-small': '14px',
|
|
233
|
+
'lu-font-size-medium': '16px',
|
|
234
|
+
'lu-font-size-large': '18px',
|
|
235
|
+
'lu-font-size-x-large': '20px',
|
|
236
|
+
'lu-font-size-2x-large': '24px',
|
|
237
|
+
'lu-font-size-3x-large': '28px',
|
|
238
|
+
'lu-font-size-4x-large': '32px',
|
|
239
|
+
'lu-font-size-5x-large': '36px',
|
|
240
|
+
'lu-font-size-6x-large': '40px',
|
|
241
|
+
'lu-font-size-7x-large': '48px',
|
|
242
|
+
'lu-font-size-huge': '64px',
|
|
243
|
+
};
|
|
244
|
+
export var customFontWeight = {
|
|
245
|
+
'lu-font-weight-thin': '100',
|
|
246
|
+
'lu-font-weight-extra-light': '200',
|
|
247
|
+
'lu-font-weight-light': '300',
|
|
248
|
+
'lu-font-weight-regular': '400',
|
|
249
|
+
'lu-font-weight-medium': '500',
|
|
250
|
+
'lu-font-weight-semibold': '600',
|
|
251
|
+
'lu-font-weight-bold': '700',
|
|
252
|
+
'lu-font-weight-extra-bold': '800',
|
|
253
|
+
'lu-font-weight-black': '900',
|
|
254
|
+
};
|
|
255
|
+
export var customLineHeight = {
|
|
256
|
+
'lu-line-height-xs': '1',
|
|
257
|
+
'lu-line-height-sm': '1.25',
|
|
258
|
+
'lu-line-height-base': '1.5',
|
|
259
|
+
'lu-line-height-lg': '2',
|
|
260
|
+
};
|
|
261
|
+
export var customTextAlignment = {
|
|
262
|
+
'lu-text-left': 'left',
|
|
263
|
+
'lu-text-center': 'center',
|
|
264
|
+
'lu-text-right': 'right',
|
|
265
|
+
'lu-text-justify': 'justify',
|
|
266
|
+
'lu-text-space-between': 'space-between',
|
|
267
|
+
};
|
|
268
|
+
export var customTextTransform = {
|
|
269
|
+
'lu-text-lowercase': 'lowercase',
|
|
270
|
+
'lu-text-uppercase': 'uppercase',
|
|
271
|
+
'lu-text-capitalize': 'capitalize',
|
|
272
|
+
};
|
|
273
|
+
export var customTextDecoration = {
|
|
274
|
+
'lu-text-decoration-none': 'none',
|
|
275
|
+
'lu-text-decoration-underline': 'underline',
|
|
276
|
+
'lu-text-decoration-linethrough': 'line-through',
|
|
277
|
+
};
|
|
278
|
+
export var customTextWrap = {
|
|
279
|
+
'lu-text-wrap': 'normal',
|
|
280
|
+
'lu-text-nowrap': 'nowrap',
|
|
281
|
+
};
|
|
282
|
+
export var customSize = {
|
|
283
|
+
'lu-size-050': '4px',
|
|
284
|
+
'lu-size-100': '8px',
|
|
285
|
+
'lu-size-200': '16px',
|
|
286
|
+
'lu-size-300': '24px',
|
|
287
|
+
'lu-size-400': '32px',
|
|
288
|
+
'lu-size-500': '40px',
|
|
289
|
+
'lu-size-600': '48px',
|
|
290
|
+
'lu-size-800': '64px',
|
|
291
|
+
'lu-size-1000': '80px',
|
|
292
|
+
'lu-size-1500': '120px',
|
|
293
|
+
'lu-size-2000': '160px',
|
|
294
|
+
'lu-size-2500': '200px',
|
|
295
|
+
};
|
|
296
|
+
export var customWidth = {
|
|
297
|
+
'lu-width-10': '10%',
|
|
298
|
+
'lu-width-25': '25%',
|
|
299
|
+
'lu-width-50': '50%',
|
|
300
|
+
'lu-width-75': '75%',
|
|
301
|
+
'lu-width-100': '100%'
|
|
302
|
+
};
|
|
303
|
+
export var customHeight = {
|
|
304
|
+
'lu-height-10': '10%',
|
|
305
|
+
'lu-height-25': '25%',
|
|
306
|
+
'lu-height-50': '50%',
|
|
307
|
+
'lu-height-75': '75%',
|
|
308
|
+
'lu-height-100': '100%'
|
|
309
|
+
};
|
|
310
|
+
export var customMinWidth = {
|
|
311
|
+
'lu-min-width-400': '32px',
|
|
312
|
+
'lu-min-width-500': '40px',
|
|
313
|
+
'lu-min-width-600': '48px',
|
|
314
|
+
'lu-min-width-800': '64px',
|
|
315
|
+
'lu-min-width-1000': '80px',
|
|
316
|
+
'lu-min-width-1500': '120px',
|
|
317
|
+
'lu-min-width-2000': '160px',
|
|
318
|
+
'lu-min-width-2500': '200px',
|
|
319
|
+
'lu-min-width-3000': '240px',
|
|
320
|
+
};
|
|
321
|
+
export var customMinHeight = {
|
|
322
|
+
'lu-min-height-400': '32px',
|
|
323
|
+
'lu-min-height-500': '40px',
|
|
324
|
+
'lu-min-height-600': '48px',
|
|
325
|
+
'lu-min-height-800': '64px',
|
|
326
|
+
'lu-min-height-1000': '80px',
|
|
327
|
+
'lu-min-height-1500': '120px',
|
|
328
|
+
'lu-min-height-2000': '160px',
|
|
329
|
+
'lu-min-height-2500': '200px',
|
|
330
|
+
'lu-min-height-3000': '240px',
|
|
331
|
+
};
|
|
332
|
+
export var customLogoSize = {
|
|
333
|
+
'lu-primary-logo': '75px',
|
|
334
|
+
'lu-secondary-logo': '32px',
|
|
335
|
+
'lu-favicon-logo': '32px'
|
|
336
|
+
};
|
|
337
|
+
export var customSpacing = {
|
|
338
|
+
'lu-space-0': '0px',
|
|
339
|
+
'lu-space-050': '4px',
|
|
340
|
+
'lu-space-100': '8px',
|
|
341
|
+
'lu-space-150': '12px',
|
|
342
|
+
'lu-space-200': '16px',
|
|
343
|
+
'lu-space-250': '20px',
|
|
344
|
+
'lu-space-300': '24px',
|
|
345
|
+
'lu-space-400': '32px',
|
|
346
|
+
'lu-space-500': '40px',
|
|
347
|
+
'lu-space-600': '48px',
|
|
348
|
+
'lu-space-800': '64px',
|
|
349
|
+
'lu-space-1000': '80px',
|
|
350
|
+
'lu-space-1500': '120px',
|
|
351
|
+
'lu-space-2000': '160px',
|
|
352
|
+
'lu-space-2500': '200px',
|
|
353
|
+
'lu-space-3000': '240px'
|
|
354
|
+
};
|
|
355
|
+
export var customOpacity = {
|
|
356
|
+
'lu-opacity-0': '0.0',
|
|
357
|
+
'lu-opacity-5': '0.05',
|
|
358
|
+
'lu-opacity-10': '0.1',
|
|
359
|
+
'lu-opacity-15': '0.15',
|
|
360
|
+
'lu-opacity-20': '0.2',
|
|
361
|
+
'lu-opacity-25': '0.25',
|
|
362
|
+
'lu-opacity-30': '0.3',
|
|
363
|
+
'lu-opacity-40': '0.4',
|
|
364
|
+
'lu-opacity-50': '0.5',
|
|
365
|
+
'lu-opacity-60': '0.6',
|
|
366
|
+
'lu-opacity-70': '0.7',
|
|
367
|
+
'lu-opacity-75': '0.75',
|
|
368
|
+
'lu-opacity-80': '0.8',
|
|
369
|
+
'lu-opacity-90': '0.9',
|
|
370
|
+
'lu-opacity-95': '0.95',
|
|
371
|
+
'lu-opacity-100': '1',
|
|
372
|
+
};
|
|
373
|
+
export var customBorderWidth = {
|
|
374
|
+
'lu-border-width-0125': '1px',
|
|
375
|
+
'lu-border-width-025': '2px',
|
|
376
|
+
'lu-border-width-050': '4px',
|
|
377
|
+
'lu-border-width-100': '8px',
|
|
378
|
+
};
|
|
379
|
+
export var customBorderRadius = {
|
|
380
|
+
'lu-border-rounded-none': '0px',
|
|
381
|
+
'lu-border-rounded-xs': '2px',
|
|
382
|
+
'lu-border-rounded-sm': '4px',
|
|
383
|
+
'lu-border-rounded-md': '6px',
|
|
384
|
+
'lu-border-rounded-lg': '8px',
|
|
385
|
+
'lu-border-rounded-xl': '12px',
|
|
386
|
+
'lu-border-rounded-2xl': '16px',
|
|
387
|
+
'lu-border-rounded-3xl': '24px',
|
|
388
|
+
'lu-border-rounded-full': '9999px',
|
|
389
|
+
};
|
|
390
|
+
export var customAspectRatio = {
|
|
391
|
+
'lu-aspect-square': '1 / 1',
|
|
392
|
+
'lu-aspect-2/1-landsc': '2 / 1',
|
|
393
|
+
'lu-aspect-1/2-por': '1 / 2',
|
|
394
|
+
'lu-aspect-3/2-landsc': '3 / 2',
|
|
395
|
+
'lu-aspect-2/3-por': '2 / 3',
|
|
396
|
+
'lu-aspect-4/3-landsc': '4/3',
|
|
397
|
+
'lu-aspect-3/4-por': '3 / 4',
|
|
398
|
+
'lu-aspect-5/4-landsc': '5 / 4',
|
|
399
|
+
'lu-aspect-4/5-por': '4 / 5',
|
|
400
|
+
'lu-aspect-7/5-landsc': '7 / 5',
|
|
401
|
+
'lu-aspect-5/7-por': '5 / 7',
|
|
402
|
+
'lu-aspect-16/9-landsc': '16 / 9',
|
|
403
|
+
'lu-aspect-9/16-por': '9 / 16',
|
|
404
|
+
'lu-aspect-21/9-landscape': '21 / 9',
|
|
405
|
+
'lu-aspect-9/21-por': '9 / 21',
|
|
406
|
+
};
|
|
407
|
+
export var customBoxShadow = {
|
|
408
|
+
'lu-shadow-xs': '0px 4px 4px 0 rgba(52, 52, 52, 0.05)',
|
|
409
|
+
'lu-shadow-sm': '0px 4px 8px 0 rgba(52, 52, 52, 0.1)',
|
|
410
|
+
'lu-shadow-md': '0px 4px 12px 0 rgba(52, 52, 52, 0.15)',
|
|
411
|
+
'lu-shadow-lg': '0px 4px 18px 0 rgba(52, 52, 52, 0.15)',
|
|
412
|
+
'lu-shadow-xl': '0px 8px 24px 0 rgba(52, 52, 52, 0.15)',
|
|
413
|
+
};
|
package/index.ts
ADDED
package/jest.config.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const nextJest = require('next/jest')
|
|
2
|
+
|
|
3
|
+
const createJestConfig = nextJest({
|
|
4
|
+
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
|
|
5
|
+
dir: './',
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
// Add any custom config to be passed to Jest
|
|
9
|
+
/** @type {import('jest').Config} */
|
|
10
|
+
const config = {
|
|
11
|
+
// Add more setup options before each test is run
|
|
12
|
+
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
|
13
|
+
moduleNameMapper: {
|
|
14
|
+
'^@/components/(.*)$': '<rootDir>/components/$1',
|
|
15
|
+
},
|
|
16
|
+
testEnvironment: 'jest-environment-jsdom',
|
|
17
|
+
maxWorkers: 1, // Set to 1 to run tests sequentially
|
|
18
|
+
// collectCoverageFrom: ['components/**/*.{js,jsx,ts,tsx}'],
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
|
|
23
|
+
module.exports = createJestConfig(config)
|
package/jest.setup.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
2
|
+
import fetchMock from 'jest-fetch-mock';
|
|
3
|
+
import 'matchmedia-polyfill';
|
|
4
|
+
import 'matchmedia-polyfill/matchMedia.addListener';
|
|
5
|
+
import "jest-canvas-mock";
|
|
6
|
+
|
|
7
|
+
// Enable mocking of the fetch function
|
|
8
|
+
fetchMock.enableMocks();
|
|
9
|
+
|
|
10
|
+
console.error = jest.fn();
|
|
11
|
+
console.warn = jest.fn();
|
|
12
|
+
|
|
13
|
+
// Mock `next/config`
|
|
14
|
+
jest.mock('next/config', () => {
|
|
15
|
+
const originalConfig = jest.requireActual('next/config');
|
|
16
|
+
return () => ({
|
|
17
|
+
...originalConfig(),
|
|
18
|
+
publicRuntimeConfig: {
|
|
19
|
+
experimental: {
|
|
20
|
+
typedRoutes: true,
|
|
21
|
+
serverActions: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
});
|
package/next.config.js
ADDED