@colisweb/rescript-toolkit 5.18.0 → 5.19.1
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
|
@@ -15,7 +15,7 @@ type color = [
|
|
|
15
15
|
| #danger
|
|
16
16
|
| #neutral
|
|
17
17
|
| #neutralLight
|
|
18
|
-
| #
|
|
18
|
+
| #dynamic
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
let baseStyle = () =>
|
|
@@ -26,7 +26,7 @@ let colorStyle = (~color: color, ~variant, ~disabled) =>
|
|
|
26
26
|
| #pill
|
|
27
27
|
| #default =>
|
|
28
28
|
switch color {
|
|
29
|
-
| #
|
|
29
|
+
| #dynamic => "bg-primaryCta text-primaryCtaText hover:opacity-80 disabled:bg-gray-800 border border-transparent"
|
|
30
30
|
| #black => "bg-gray-900 hover:bg-gray-800 disabled:bg-gray-800 text-white border border-transparent"
|
|
31
31
|
| #white => "bg-white hover:bg-gray-100 text-gray-800 border border-gray-300"
|
|
32
32
|
| #gray => "bg-gray-200 hover:bg-gray-300 disabled:bg-gray-300 text-gray-800 border border-gray-300"
|
|
@@ -61,7 +61,7 @@ let colorStyle = (~color: color, ~variant, ~disabled) =>
|
|
|
61
61
|
| #danger => "uppercase hover:bg-danger-50 text-danger-600"
|
|
62
62
|
| #neutral => "hover:bg-neutral-100 text-neutral-700 hover:border-neutral-400 disabled:text-neutral-500 uppercase"
|
|
63
63
|
| #neutralLight => "uppercase text-primary-700 hover:bg-neutral-100 disabled:text-neutral-400"
|
|
64
|
-
| #
|
|
64
|
+
| #dynamic => "uppercase text-primaryText hover:bg-primaryCta hover:text-primaryCtaText disabled:text-neutral-400"
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
| #link => "text-info-500 hover:underline"
|
|
@@ -77,7 +77,7 @@ let colorStyle = (~color: color, ~variant, ~disabled) =>
|
|
|
77
77
|
| #neutralLight => "border border-neutral-300 text-primary-700 hover:bg-neutral-200 disabled:bg-neutral-100"
|
|
78
78
|
| #danger => "border border-danger-400 text-danger-600 hover:bg-danger-50 disabled:bg-danger-300"
|
|
79
79
|
| #primary => "border border-primary-700 text-primary-700 hover:bg-neutral-300"
|
|
80
|
-
| #
|
|
80
|
+
| #dynamic => "border border-primaryText text-primaryText hover:bg-primaryCta hover:text-primaryCtaText"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -16,7 +16,7 @@ let colorStyle = (~color: color, ~variant, ~disabled) =>
|
|
|
16
16
|
| #default =>
|
|
17
17
|
switch color {
|
|
18
18
|
| #black => "bg-gray-900 hover:bg-gray-800 disabled:bg-gray-800 text-white border border-transparent"
|
|
19
|
-
| #
|
|
19
|
+
| #dynamic => "bg-primaryCta text-primaryCtaText hover:opacity-80 disabled:bg-gray-800 border border-transparent"
|
|
20
20
|
| #white => "bg-white hover:bg-gray-100 text-gray-800 border border-gray-300"
|
|
21
21
|
| #gray => "bg-gray-200 hover:bg-gray-300 disabled:bg-gray-300 text-gray-800 border border-gray-300"
|
|
22
22
|
| #success => "bg-success-600 hover:bg-success-700 disabled:bg-success-700 text-white border border-transparent"
|
|
@@ -50,7 +50,7 @@ let colorStyle = (~color: color, ~variant, ~disabled) =>
|
|
|
50
50
|
| #danger => "uppercase hover:bg-danger-50 text-danger-600"
|
|
51
51
|
| #neutral => "hover:bg-neutral-100 text-neutral-700 hover:border-neutral-400 disabled:text-neutral-500 uppercase"
|
|
52
52
|
| #neutralLight => "uppercase text-primary-700 hover:bg-neutral-100 disabled:text-neutral-400"
|
|
53
|
-
| #
|
|
53
|
+
| #dynamic => "uppercase text-primaryText hover:bg-primaryCta hover:text-primaryCtaText disabled:text-neutral-400"
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
| #link => "text-info-500 hover:underline"
|
|
@@ -66,7 +66,7 @@ let colorStyle = (~color: color, ~variant, ~disabled) =>
|
|
|
66
66
|
| #neutralLight => "border border-neutral-300 text-primary-700 hover:bg-neutral-200 disabled:bg-neutral-100"
|
|
67
67
|
| #danger => "border border-danger-400 text-danger-600 hover:bg-danger-50 disabled:bg-danger-300"
|
|
68
68
|
| #primary => "border border-primary-500 text-primary-500 hover:bg-primary-50"
|
|
69
|
-
| #
|
|
69
|
+
| #dynamic => "border border-primaryText text-primaryText hover:bg-primaryCta hover:text-primaryCtaText"
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
type size = [#xs | #sm | #md | #lg | #custom(int)]
|
|
2
|
-
type color = [#primary | #success | #danger | #neutral]
|
|
2
|
+
type color = [#primary | #success | #danger | #neutral | #dynamic]
|
|
3
3
|
type style = [#default | #colored(color)]
|
|
4
4
|
|
|
5
|
-
let modalStyle = (~type_) =>
|
|
5
|
+
let modalStyle = (~type_: style) =>
|
|
6
6
|
switch type_ {
|
|
7
7
|
| #default => "rounded"
|
|
8
8
|
| #colored(color) =>
|
|
@@ -11,10 +11,11 @@ let modalStyle = (~type_) =>
|
|
|
11
11
|
| #success => "rounded-lg border-2 border-success-500"
|
|
12
12
|
| #danger => "rounded-lg border-4 border-danger-700"
|
|
13
13
|
| #neutral => "rounded-lg"
|
|
14
|
+
| #dynamic => ""
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
let headerStyle = (~type_) =>
|
|
18
|
+
let headerStyle = (~type_: style) =>
|
|
18
19
|
switch type_ {
|
|
19
20
|
| #default => ""
|
|
20
21
|
| #colored(color) =>
|
|
@@ -23,18 +24,21 @@ let headerStyle = (~type_) =>
|
|
|
23
24
|
| #success => "bg-success-500 rounded-t"
|
|
24
25
|
| #danger => "bg-danger-700"
|
|
25
26
|
| #neutral => "bg-neutral-700 rounded-t-lg"
|
|
27
|
+
| #dynamic => ""
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
let titleStyle = (~type_) =>
|
|
30
32
|
switch type_ {
|
|
31
33
|
| #default => "w-full border-b border-info-500"
|
|
34
|
+
| #colored(#dynamic) => "w-full border-b border-primaryText"
|
|
32
35
|
| #colored(_color) => "text-white"
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
let closeIconStyle = (~type_) =>
|
|
36
39
|
switch type_ {
|
|
37
40
|
| #default => "hover:bg-gray-200"
|
|
41
|
+
| #colored(#dynamic) => "hover:bg-gray-200"
|
|
38
42
|
| #colored(_) => "hover:bg-white hover:text-black text-white"
|
|
39
43
|
}
|
|
40
44
|
|