@edu-tosel/design 1.0.299 → 1.0.301

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.299",
3
+ "version": "1.0.301",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -0,0 +1,63 @@
1
+ const colors = [
2
+ "red",
3
+ "orange",
4
+ "amber",
5
+ "yellow",
6
+ "lime",
7
+ "green",
8
+ "emerald",
9
+ "teal",
10
+ "cyan",
11
+ "sky",
12
+ "blue",
13
+ "indigo",
14
+ "violet",
15
+ "purple",
16
+ "fuchsia",
17
+ "pink",
18
+ "rose",
19
+ "slate",
20
+ "gray",
21
+ "zinc",
22
+ "neutral",
23
+ "stone",
24
+ ];
25
+ const intensities = [
26
+ "50",
27
+ "100",
28
+ "200",
29
+ "300",
30
+ "400",
31
+ "500",
32
+ "600",
33
+ "700",
34
+ "800",
35
+ "900",
36
+ ];
37
+ const variants = ["hover"];
38
+ const safelist = [
39
+ // bg-{color}-{intensity}
40
+ ...colors.flatMap((color) =>
41
+ intensities.map((intensity) => `bg-${color}-${intensity}`)
42
+ ),
43
+
44
+ // text-{color}-{intensity}
45
+ ...colors.flatMap((color) =>
46
+ intensities.map((intensity) => `text-${color}-${intensity}`)
47
+ ),
48
+
49
+ // hover:bg-{color}-{intensity}
50
+ ...variants.flatMap((variant) =>
51
+ colors.flatMap((color) =>
52
+ intensities.map((intensity) => `${variant}:bg-${color}-${intensity}`)
53
+ )
54
+ ),
55
+
56
+ // hover:text-{color}-{intensity}
57
+ ...variants.flatMap((variant) =>
58
+ colors.flatMap((color) =>
59
+ intensities.map((intensity) => `${variant}:text-${color}-${intensity}`)
60
+ )
61
+ ),
62
+ ];
63
+ export default safelist;
@@ -4,6 +4,7 @@ import type { PluginAPI } from "tailwindcss/types/config";
4
4
 
5
5
  // import twElements from "tw-elements/dist/plugin";
6
6
  // import tailwindcssDirectionalShadows from "tailwindcss-directional-shadows";
7
+ import safelist from "./tailwind.config.safelist";
7
8
 
8
9
  export default {
9
10
  content: [
@@ -648,29 +649,7 @@ export default {
648
649
  },
649
650
  },
650
651
  },
651
- safelist: [
652
- {
653
- pattern: /top-.*/,
654
- },
655
- {
656
- pattern: /-top-.*/,
657
- },
658
- {
659
- pattern: /bottom*.*/,
660
- },
661
- {
662
- pattern: /left-.*/,
663
- },
664
- {
665
- pattern: /-left-.*/,
666
- },
667
- {
668
- pattern: /right*.*/,
669
- },
670
- {
671
- pattern: /delay-.*/,
672
- },
673
- ],
652
+ safelist,
674
653
  plugins: [
675
654
  tailwindcssAnimate,
676
655
  function ({ addUtilities }: PluginAPI) {
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.299
1
+ 1.0.301