@platformatic/ui-components 0.1.131 → 0.1.132
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import styles from './Checkbox.module.css'
|
|
5
|
-
import { MAIN_DARK_BLUE, WHITE } from './constants'
|
|
5
|
+
import { MAIN_DARK_BLUE, RICH_BLACK, WHITE } from './constants'
|
|
6
6
|
function Checkbox ({ disabled, color, ...rest }) {
|
|
7
7
|
let className = `${styles.checkbox} `
|
|
8
8
|
className += styles[`checkbox--${color}`]
|
|
@@ -20,7 +20,7 @@ Checkbox.propTypes = {
|
|
|
20
20
|
/**
|
|
21
21
|
* color
|
|
22
22
|
*/
|
|
23
|
-
color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE])
|
|
23
|
+
color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE, RICH_BLACK])
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
Checkbox.defaultProps = {
|
|
@@ -6,20 +6,19 @@
|
|
|
6
6
|
.checkbox--main-dark-blue {
|
|
7
7
|
@apply border-light-green bg-main-dark-blue
|
|
8
8
|
}
|
|
9
|
+
.checkbox--main-dark-blue:checked {
|
|
10
|
+
@apply bg-light-green text-main-dark-blue;
|
|
11
|
+
}
|
|
9
12
|
|
|
10
13
|
.checkbox--white {
|
|
11
14
|
@apply border-main-dark-blue bg-white
|
|
12
15
|
}
|
|
13
|
-
|
|
14
16
|
.checkbox--white:checked {
|
|
15
17
|
@apply bg-main-dark-blue text-white;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
.checkbox--main-dark-blue:checked
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.checkbox:checked:after {
|
|
20
|
+
.checkbox--main-dark-blue:checked:after,
|
|
21
|
+
.checkbox--white:checked:after {
|
|
23
22
|
@apply absolute top-[-4px] left-[1px] h-full w-full;
|
|
24
23
|
content: url('data:image/svg+xml,%3Csvg%20width=%2213%22%20height=%229%22%20viewBox=%220%200%2013%209%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M1%204L5%208L12%201%22%20stroke=%22white%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E');
|
|
25
24
|
}
|
|
@@ -28,3 +27,16 @@
|
|
|
28
27
|
@apply border-white;
|
|
29
28
|
}
|
|
30
29
|
|
|
30
|
+
.checkbox--rich-black {
|
|
31
|
+
@apply border-white bg-rich-black
|
|
32
|
+
}
|
|
33
|
+
.checkbox--rich-black:checked {
|
|
34
|
+
@apply bg-white text-rich-black;
|
|
35
|
+
}
|
|
36
|
+
.checkbox--rich-black:checked:after {
|
|
37
|
+
@apply absolute top-[-4px] left-[1px] h-full w-full;
|
|
38
|
+
content: url('data:image/svg+xml,%3Csvg%20width=%2213%22%20height=%229%22%20viewBox=%220%200%2013%209%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M1%204L5%208L12%201%22%20stroke=%22#00050B%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|