@removify/tailwind-preset 1.0.7 → 1.0.8

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/index.d.ts DELETED
@@ -1,711 +0,0 @@
1
- import { Config } from 'tailwindcss';
2
-
3
- declare const colorsNames: readonly ["primary", "bateau", "secondary", "pompelmo", "green", "fuchsia", "indigo", "neutral", "orange", "red", "amber", "seafoam"];
4
-
5
- type ColorsNames = typeof colorsNames[number];
6
- type RatingVariations = `${'low' | 'high' | 'medium'}${'' | '-star'}`;
7
- declare const ratingColorVariations: RatingVariations[];
8
- type CustomColors = 'rating' | 'table';
9
- type TableVariations = 'border';
10
- type ColorsVariations = 'DEFAULT' | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
11
- interface MainColors {
12
- black: string;
13
- white: string;
14
- inherit: 'inherit';
15
- current: 'currentColor';
16
- transparent: 'transparent';
17
- }
18
- interface DefaultColors {
19
- danger: string;
20
- warning: string;
21
- success: string;
22
- info: string;
23
- special: string;
24
- }
25
- type Colors = DefaultColors & MainColors & Record<ColorsNames, Record<ColorsVariations, string>> & {
26
- [K in Extract<CustomColors, 'rating'>]: Record<RatingVariations, string>;
27
- } & {
28
- [K in Extract<CustomColors, 'table'>]: Record<TableVariations, string>;
29
- };
30
- type ColorString = `${ColorsNames}-${ColorsVariations}` | keyof DefaultColors | keyof MainColors | CustomColors;
31
-
32
- declare const configuredThemes: readonly ["colors", "boxShadow", "fontSize", "fontFamily", "animation", "keyframes", "screens"];
33
- type ConfiguredThemes = typeof configuredThemes[number];
34
- interface ThemeOptions {
35
- enabled?: boolean;
36
- prefix?: string;
37
- }
38
- type BuildThemeOptions = {
39
- [k in ConfiguredThemes]?: ThemeOptions;
40
- };
41
-
42
- /**
43
- * Converts the given string from camel-case to kebab-case.
44
- * @template T The string to convert the case.
45
- * @see https://gist.github.com/albertms10/09f14ef7ebdc3ce0e95683c728616253
46
- * @example
47
- * type Kebab = CamelToKebab<'exampleVarName'>;
48
- * // 'example-var-name'
49
- */
50
- type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : '';
51
- type CamelToKebabKeys<T> = {
52
- [K in keyof T as K extends string ? CamelToKebab<K> : K]: T[K];
53
- };
54
-
55
- /**
56
- * tailwindcss font-size configuration
57
- * @see https://tailwindcss.com/docs/font-size
58
- *
59
- * @note For unocss, the keys are kebab-case
60
- * @see https://github.com/unocss/unocss/issues/3663#issuecomment-2024909371
61
- */
62
-
63
- interface FontSizeDetail {
64
- lineHeight?: string;
65
- letterSpacing?: string;
66
- fontWeight?: number;
67
- }
68
- type FontValue = `${number}px` | `${number}rem`;
69
- type FontAndLineHeight = [FontValue, FontValue];
70
- type DetailFont = [
71
- FontValue,
72
- FontSizeDetail
73
- ];
74
- type UnocssDetailFont = [FontValue, CamelToKebabKeys<FontSizeDetail>];
75
- type FontSize = FontAndLineHeight | FontValue | DetailFont;
76
- type UnocssFontSize = FontValue | FontAndLineHeight | UnocssDetailFont;
77
- type SizeKeys = `${number}xs` | 'xs' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | `${number}xl`;
78
- type HeadingKeys = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
79
- type DisplayKeys = 'display1' | 'display2' | 'display3' | 'display4';
80
- type FontSizeKeys = SizeKeys | HeadingKeys | DisplayKeys;
81
- declare function isDetailFont(value: FontSize): value is DetailFont;
82
- type FontSizes = {
83
- [K in FontSizeKeys]?: FontSize;
84
- };
85
- type UnocssFontSizes = {
86
- [K in FontSizeKeys]?: UnocssFontSize;
87
- };
88
-
89
- declare const screenSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl", "tablet", "tablet-lg", "laptop", "desktop"];
90
- type Screens = Record<typeof screenSizes[number], `${number}px`>;
91
- type ExtractNumber<T extends string> = T extends `${infer N extends number}px` ? N : never;
92
- type ScreensNumber = {
93
- [K in keyof Screens]: ExtractNumber<Screens[K]>;
94
- };
95
-
96
- type BorderSize = 0 | `${number}px`;
97
- type RgbValue = number;
98
- type Shadow = `${BorderSize} ${BorderSize} ${BorderSize} ${BorderSize} rgba(${RgbValue}, ${RgbValue}, ${RgbValue}, ${RgbValue})`;
99
- type ShadowSize = 0 | 1 | 2 | 3 | 4 | 5;
100
- type ShadowKeys = `elevation-${ShadowSize}`;
101
- declare const shadowVariations: ShadowKeys[];
102
- type Shadows = Record<ShadowKeys, Shadow>;
103
-
104
- declare const animation: {
105
- 'radix-accordion-down': string;
106
- 'radix-accordion-up': string;
107
- 'radix-collapsible-down': string;
108
- 'radix-collapsible-up': string;
109
- 'reka-accordion-down': string;
110
- 'reka-accordion-up': string;
111
- 'reka-collapsible-down': string;
112
- 'reka-collapsible-up': string;
113
- 'accordion-down': string;
114
- 'accordion-up': string;
115
- 'collapsible-down': string;
116
- 'collapsible-up': string;
117
- };
118
- declare const keyframes: {
119
- 'radix-accordion-down': {
120
- from: {
121
- height: string;
122
- };
123
- to: {
124
- height: string;
125
- };
126
- };
127
- 'radix-accordion-up': {
128
- from: {
129
- height: string;
130
- };
131
- to: {
132
- height: string;
133
- };
134
- };
135
- 'radix-collapsible-down': {
136
- from: {
137
- height: string;
138
- };
139
- to: {
140
- height: string;
141
- };
142
- };
143
- 'radix-collapsible-up': {
144
- from: {
145
- height: string;
146
- };
147
- to: {
148
- height: string;
149
- };
150
- };
151
- 'reka-accordion-down': {
152
- from: {
153
- height: string;
154
- };
155
- to: {
156
- height: string;
157
- };
158
- };
159
- 'reka-accordion-up': {
160
- from: {
161
- height: string;
162
- };
163
- to: {
164
- height: string;
165
- };
166
- };
167
- 'reka-collapsible-down': {
168
- from: {
169
- height: string;
170
- };
171
- to: {
172
- height: string;
173
- };
174
- };
175
- 'reka-collapsible-up': {
176
- from: {
177
- height: string;
178
- };
179
- to: {
180
- height: string;
181
- };
182
- };
183
- 'accordion-down': {
184
- from: {
185
- height: string;
186
- };
187
- to: {
188
- height: string;
189
- };
190
- };
191
- 'accordion-up': {
192
- from: {
193
- height: string;
194
- };
195
- to: {
196
- height: string;
197
- };
198
- };
199
- 'collapsible-down': {
200
- from: {
201
- height: string;
202
- };
203
- to: {
204
- height: string;
205
- };
206
- };
207
- 'collapsible-up': {
208
- from: {
209
- height: string;
210
- };
211
- to: {
212
- height: string;
213
- };
214
- };
215
- };
216
-
217
- declare const colors: {
218
- primary: {
219
- DEFAULT: string;
220
- 50: string;
221
- 100: string;
222
- 200: string;
223
- 300: string;
224
- 400: string;
225
- 500: string;
226
- 600: string;
227
- 700: string;
228
- 800: string;
229
- 900: string;
230
- 950: string;
231
- };
232
- secondary: {
233
- DEFAULT: string;
234
- 50: string;
235
- 100: string;
236
- 200: string;
237
- 300: string;
238
- 400: string;
239
- 500: string;
240
- 600: string;
241
- 700: string;
242
- 800: string;
243
- 900: string;
244
- 950: string;
245
- };
246
- inherit: "inherit";
247
- current: "currentColor";
248
- transparent: "transparent";
249
- danger: string;
250
- warning: string;
251
- success: string;
252
- info: string;
253
- special: string;
254
- black: string;
255
- white: string;
256
- bateau: {
257
- DEFAULT: string;
258
- 50: string;
259
- 100: string;
260
- 200: string;
261
- 300: string;
262
- 400: string;
263
- 500: string;
264
- 600: string;
265
- 700: string;
266
- 800: string;
267
- 900: string;
268
- 950: string;
269
- };
270
- pompelmo: {
271
- DEFAULT: string;
272
- 50: string;
273
- 100: string;
274
- 200: string;
275
- 300: string;
276
- 400: string;
277
- 500: string;
278
- 600: string;
279
- 700: string;
280
- 800: string;
281
- 900: string;
282
- 950: string;
283
- };
284
- neutral: {
285
- DEFAULT: string;
286
- 50: string;
287
- 100: string;
288
- 200: string;
289
- 300: string;
290
- 400: string;
291
- 500: string;
292
- 600: string;
293
- 700: string;
294
- 800: string;
295
- 900: string;
296
- 950: string;
297
- };
298
- orange: {
299
- DEFAULT: string;
300
- 50: string;
301
- 100: string;
302
- 200: string;
303
- 300: string;
304
- 400: string;
305
- 500: string;
306
- 600: string;
307
- 700: string;
308
- 800: string;
309
- 900: string;
310
- 950: string;
311
- };
312
- amber: {
313
- DEFAULT: string;
314
- 50: string;
315
- 100: string;
316
- 200: string;
317
- 300: string;
318
- 400: string;
319
- 500: string;
320
- 600: string;
321
- 700: string;
322
- 800: string;
323
- 900: string;
324
- 950: string;
325
- };
326
- indigo: {
327
- DEFAULT: string;
328
- 50: string;
329
- 100: string;
330
- 200: string;
331
- 300: string;
332
- 400: string;
333
- 500: string;
334
- 600: string;
335
- 700: string;
336
- 800: string;
337
- 900: string;
338
- 950: string;
339
- };
340
- seafoam: {
341
- DEFAULT: string;
342
- 50: string;
343
- 100: string;
344
- 200: string;
345
- 300: string;
346
- 400: string;
347
- 500: string;
348
- 600: string;
349
- 700: string;
350
- 800: string;
351
- 900: string;
352
- 950: string;
353
- };
354
- green: {
355
- DEFAULT: string;
356
- 50: string;
357
- 100: string;
358
- 200: string;
359
- 300: string;
360
- 400: string;
361
- 500: string;
362
- 600: string;
363
- 700: string;
364
- 800: string;
365
- 900: string;
366
- 950: string;
367
- };
368
- fuchsia: {
369
- DEFAULT: string;
370
- 50: string;
371
- 100: string;
372
- 200: string;
373
- 300: string;
374
- 400: string;
375
- 500: string;
376
- 600: string;
377
- 700: string;
378
- 800: string;
379
- 900: string;
380
- 950: string;
381
- };
382
- red: {
383
- DEFAULT: string;
384
- 50: string;
385
- 100: string;
386
- 200: string;
387
- 300: string;
388
- 400: string;
389
- 500: string;
390
- 600: string;
391
- 700: string;
392
- 800: string;
393
- 900: string;
394
- 950: string;
395
- };
396
- rating: {
397
- high: string;
398
- medium: string;
399
- low: string;
400
- 'high-star': string;
401
- 'medium-star': string;
402
- 'low-star': string;
403
- };
404
- table: {
405
- border: string;
406
- };
407
- };
408
-
409
- declare const customFontFamily: {
410
- sans: string[];
411
- };
412
-
413
- declare const fontSize: {
414
- '2xs': ["0.6875rem", "1rem"];
415
- xs: ["0.75rem", "1rem"];
416
- sm: ["0.875rem", "1.25rem"];
417
- base: ["1rem", "1.5rem"];
418
- md: ["1.125rem", "1.5rem"];
419
- lg: ["1.25rem", "1.625rem"];
420
- display1: ["3.75rem", {
421
- fontWeight: number;
422
- lineHeight: string;
423
- letterSpacing: string;
424
- }];
425
- display2: ["3.25rem", {
426
- fontWeight: number;
427
- lineHeight: string;
428
- letterSpacing: string;
429
- }];
430
- display3: ["2.75rem", {
431
- fontWeight: number;
432
- lineHeight: string;
433
- letterSpacing: string;
434
- }];
435
- h1: ["3rem", {
436
- fontWeight: number;
437
- lineHeight: string;
438
- letterSpacing: string;
439
- }];
440
- h2: ["2.5rem", {
441
- fontWeight: number;
442
- lineHeight: string;
443
- letterSpacing: string;
444
- }];
445
- h3: ["2.25rem", {
446
- fontWeight: number;
447
- lineHeight: string;
448
- letterSpacing: string;
449
- }];
450
- h4: ["2rem", {
451
- fontWeight: number;
452
- lineHeight: string;
453
- letterSpacing: string;
454
- }];
455
- h5: ["1.5rem", {
456
- fontWeight: number;
457
- lineHeight: string;
458
- letterSpacing: string;
459
- }];
460
- h6: ["1.25rem", {
461
- fontWeight: number;
462
- lineHeight: string;
463
- letterSpacing: string;
464
- }];
465
- };
466
-
467
- declare const screensNumber: {
468
- xs: number;
469
- sm: number;
470
- md: number;
471
- lg: number;
472
- xl: number;
473
- '2xl': number;
474
- tablet: number;
475
- 'tablet-lg': number;
476
- laptop: number;
477
- desktop: number;
478
- };
479
- declare const screens: {
480
- xs: `${number}px`;
481
- sm: `${number}px`;
482
- md: `${number}px`;
483
- lg: `${number}px`;
484
- xl: `${number}px`;
485
- '2xl': `${number}px`;
486
- tablet: `${number}px`;
487
- 'tablet-lg': `${number}px`;
488
- laptop: `${number}px`;
489
- desktop: `${number}px`;
490
- };
491
-
492
- declare const boxShadow: {
493
- 'elevation-0': "0 0 0 0 rgba(0, 0, 0, 0.10)";
494
- 'elevation-1': "0 1px 2px 0 rgba(0, 0, 0, 0.10)";
495
- 'elevation-2': "0 4px 8px 0 rgba(0, 0, 0, 0.10)";
496
- 'elevation-3': "0 6px 12px 0 rgba(0, 0, 0, 0.10)";
497
- 'elevation-4': "0 8px 16px 0 rgba(0, 0, 0, 0.10)";
498
- 'elevation-5': "0 12px 24px 0 rgba(0, 0, 0, 0.10)";
499
- };
500
-
501
- declare function buildTheme<T extends object>(object: T, option?: ThemeOptions): null | T | {
502
- [K in keyof T as `${string}${string & K}`]: T[K];
503
- };
504
- declare function factory(options?: BuildThemeOptions): Config['theme'];
505
- declare const defaultTheme: Config['theme'];
506
- declare const unocssTheme: {
507
- colors: {
508
- primary: {
509
- DEFAULT: string;
510
- 50: string;
511
- 100: string;
512
- 200: string;
513
- 300: string;
514
- 400: string;
515
- 500: string;
516
- 600: string;
517
- 700: string;
518
- 800: string;
519
- 900: string;
520
- 950: string;
521
- };
522
- secondary: {
523
- DEFAULT: string;
524
- 50: string;
525
- 100: string;
526
- 200: string;
527
- 300: string;
528
- 400: string;
529
- 500: string;
530
- 600: string;
531
- 700: string;
532
- 800: string;
533
- 900: string;
534
- 950: string;
535
- };
536
- inherit: "inherit";
537
- current: "currentColor";
538
- transparent: "transparent";
539
- danger: string;
540
- warning: string;
541
- success: string;
542
- info: string;
543
- special: string;
544
- black: string;
545
- white: string;
546
- bateau: {
547
- DEFAULT: string;
548
- 50: string;
549
- 100: string;
550
- 200: string;
551
- 300: string;
552
- 400: string;
553
- 500: string;
554
- 600: string;
555
- 700: string;
556
- 800: string;
557
- 900: string;
558
- 950: string;
559
- };
560
- pompelmo: {
561
- DEFAULT: string;
562
- 50: string;
563
- 100: string;
564
- 200: string;
565
- 300: string;
566
- 400: string;
567
- 500: string;
568
- 600: string;
569
- 700: string;
570
- 800: string;
571
- 900: string;
572
- 950: string;
573
- };
574
- neutral: {
575
- DEFAULT: string;
576
- 50: string;
577
- 100: string;
578
- 200: string;
579
- 300: string;
580
- 400: string;
581
- 500: string;
582
- 600: string;
583
- 700: string;
584
- 800: string;
585
- 900: string;
586
- 950: string;
587
- };
588
- orange: {
589
- DEFAULT: string;
590
- 50: string;
591
- 100: string;
592
- 200: string;
593
- 300: string;
594
- 400: string;
595
- 500: string;
596
- 600: string;
597
- 700: string;
598
- 800: string;
599
- 900: string;
600
- 950: string;
601
- };
602
- amber: {
603
- DEFAULT: string;
604
- 50: string;
605
- 100: string;
606
- 200: string;
607
- 300: string;
608
- 400: string;
609
- 500: string;
610
- 600: string;
611
- 700: string;
612
- 800: string;
613
- 900: string;
614
- 950: string;
615
- };
616
- indigo: {
617
- DEFAULT: string;
618
- 50: string;
619
- 100: string;
620
- 200: string;
621
- 300: string;
622
- 400: string;
623
- 500: string;
624
- 600: string;
625
- 700: string;
626
- 800: string;
627
- 900: string;
628
- 950: string;
629
- };
630
- seafoam: {
631
- DEFAULT: string;
632
- 50: string;
633
- 100: string;
634
- 200: string;
635
- 300: string;
636
- 400: string;
637
- 500: string;
638
- 600: string;
639
- 700: string;
640
- 800: string;
641
- 900: string;
642
- 950: string;
643
- };
644
- green: {
645
- DEFAULT: string;
646
- 50: string;
647
- 100: string;
648
- 200: string;
649
- 300: string;
650
- 400: string;
651
- 500: string;
652
- 600: string;
653
- 700: string;
654
- 800: string;
655
- 900: string;
656
- 950: string;
657
- };
658
- fuchsia: {
659
- DEFAULT: string;
660
- 50: string;
661
- 100: string;
662
- 200: string;
663
- 300: string;
664
- 400: string;
665
- 500: string;
666
- 600: string;
667
- 700: string;
668
- 800: string;
669
- 900: string;
670
- 950: string;
671
- };
672
- red: {
673
- DEFAULT: string;
674
- 50: string;
675
- 100: string;
676
- 200: string;
677
- 300: string;
678
- 400: string;
679
- 500: string;
680
- 600: string;
681
- 700: string;
682
- 800: string;
683
- 900: string;
684
- 950: string;
685
- };
686
- rating: {
687
- high: string;
688
- medium: string;
689
- low: string;
690
- 'high-star': string;
691
- 'medium-star': string;
692
- 'low-star': string;
693
- };
694
- table: {
695
- border: string;
696
- };
697
- };
698
- boxShadow: {
699
- 'elevation-0': "0 0 0 0 rgba(0, 0, 0, 0.10)";
700
- 'elevation-1': "0 1px 2px 0 rgba(0, 0, 0, 0.10)";
701
- 'elevation-2': "0 4px 8px 0 rgba(0, 0, 0, 0.10)";
702
- 'elevation-3': "0 6px 12px 0 rgba(0, 0, 0, 0.10)";
703
- 'elevation-4': "0 8px 16px 0 rgba(0, 0, 0, 0.10)";
704
- 'elevation-5': "0 12px 24px 0 rgba(0, 0, 0, 0.10)";
705
- };
706
- fontSize: UnocssFontSizes;
707
- };
708
-
709
- declare function buildPreset(extend?: boolean, buildOptions?: BuildThemeOptions): Partial<Config>;
710
-
711
- export { type BorderSize, type BuildThemeOptions, type ColorString, type Colors, type ColorsNames, type ColorsVariations, type ConfiguredThemes, type CustomColors, type DefaultColors, type DetailFont, type DisplayKeys, type ExtractNumber, type FontAndLineHeight, type FontSize, type FontSizeDetail, type FontSizeKeys, type FontSizes, type FontValue, type HeadingKeys, type MainColors, type RatingVariations, type RgbValue, type Screens, type ScreensNumber, type Shadow, type ShadowKeys, type ShadowSize, type Shadows, type SizeKeys, type TableVariations, type ThemeOptions, type UnocssDetailFont, type UnocssFontSize, type UnocssFontSizes, animation, boxShadow, buildPreset, buildTheme, colors, colorsNames, configuredThemes, defaultTheme, factory, customFontFamily as fontFamily, fontSize, isDetailFont, keyframes, ratingColorVariations, screenSizes, screens, screensNumber, shadowVariations, unocssTheme };