colibri-ui 0.7.7 → 0.7.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/README.md CHANGED
@@ -4,7 +4,7 @@ React UI components library.
4
4
 
5
5
  ## Demo
6
6
 
7
- [Demo](https://66463ad45ac665db2620044b-jravylsyiw.chromatic.com)
7
+ [Demo](https://godfreyd.github.io/colibri-ui)
8
8
 
9
9
  ## Installation
10
10
 
package/Theme/color.d.ts CHANGED
@@ -40,10 +40,15 @@ export declare const TretiaryBA: {
40
40
  TRETIARY_BA_4: string;
41
41
  TRETIARY_BA_5: string;
42
42
  };
43
- export declare const TextBA: {
44
- TEXT_BA_PRIMARY: string;
45
- TEXT_BA_SECONDARY: string;
46
- TEXT_BA_TRETIARY: string;
43
+ export declare const BrandDefault: {
44
+ BRAND_DEFAULT_1: string;
45
+ BRAND_DEFAULT_2: string;
46
+ BRAND_DEFAULT_3: string;
47
+ };
48
+ export declare const BrandBA: {
49
+ BRAND_BA_1: string;
50
+ BRAND_BA_2: string;
51
+ BRAND_BA_3: string;
47
52
  };
48
53
  export declare const Common: {
49
54
  WHITE: string;
@@ -99,9 +104,12 @@ export declare const Color: {
99
104
  BG_3: string;
100
105
  BG_4: string;
101
106
  BG_5: string;
102
- TEXT_BA_PRIMARY: string;
103
- TEXT_BA_SECONDARY: string;
104
- TEXT_BA_TRETIARY: string;
107
+ BRAND_BA_1: string;
108
+ BRAND_BA_2: string;
109
+ BRAND_BA_3: string;
110
+ BRAND_DEFAULT_1: string;
111
+ BRAND_DEFAULT_2: string;
112
+ BRAND_DEFAULT_3: string;
105
113
  ALERT: string;
106
114
  SUCCESS: string;
107
115
  WHITE: string;
package/Theme/color.js CHANGED
@@ -46,10 +46,15 @@ var TretiaryBA = {
46
46
  TRETIARY_BA_4: "#b1bcc8",
47
47
  TRETIARY_BA_5: "#87929d"
48
48
  };
49
- var TextBA = {
50
- TEXT_BA_PRIMARY: "#000",
51
- TEXT_BA_SECONDARY: "#fffbe9",
52
- TEXT_BA_TRETIARY: "#D5D500"
49
+ var BrandDefault = {
50
+ BRAND_DEFAULT_1: "#F393D2",
51
+ BRAND_DEFAULT_2: "#4BDCF8",
52
+ BRAND_DEFAULT_3: "#D5D500"
53
+ };
54
+ var BrandBA = {
55
+ BRAND_BA_1: "#B54141",
56
+ BRAND_BA_2: "#fffbe9",
57
+ BRAND_BA_3: "#D5D500"
53
58
  };
54
59
  var Common = {
55
60
  WHITE: "#fff",
@@ -66,17 +71,18 @@ var Accents = {
66
71
  ALERT: "#ff564e",
67
72
  SUCCESS: "#28bc00"
68
73
  };
69
- var Color = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, Common), Accents), TextBA), Backgrounds), Primary), Secondary), Tretiary), PrimaryBA), SecondaryBA), TretiaryBA);
74
+ var Color = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, Common), Accents), BrandDefault), BrandBA), Backgrounds), Primary), Secondary), Tretiary), PrimaryBA), SecondaryBA), TretiaryBA);
70
75
 
71
76
  exports.Accents = Accents;
72
77
  exports.Backgrounds = Backgrounds;
78
+ exports.BrandBA = BrandBA;
79
+ exports.BrandDefault = BrandDefault;
73
80
  exports.Color = Color;
74
81
  exports.Common = Common;
75
82
  exports.Primary = Primary;
76
83
  exports.PrimaryBA = PrimaryBA;
77
84
  exports.Secondary = Secondary;
78
85
  exports.SecondaryBA = SecondaryBA;
79
- exports.TextBA = TextBA;
80
86
  exports.Tretiary = Tretiary;
81
87
  exports.TretiaryBA = TretiaryBA;
82
88
  exports.default = Color;
package/Theme/index.d.ts CHANGED
@@ -64,9 +64,12 @@ export declare const THEMES: {
64
64
  BG_3: string;
65
65
  BG_4: string;
66
66
  BG_5: string;
67
- TEXT_BA_PRIMARY: string;
68
- TEXT_BA_SECONDARY: string;
69
- TEXT_BA_TRETIARY: string;
67
+ BRAND_BA_1: string;
68
+ BRAND_BA_2: string;
69
+ BRAND_BA_3: string;
70
+ BRAND_DEFAULT_1: string;
71
+ BRAND_DEFAULT_2: string;
72
+ BRAND_DEFAULT_3: string;
70
73
  ALERT: string;
71
74
  SUCCESS: string;
72
75
  WHITE: string;
@@ -136,9 +139,12 @@ export declare const THEMES: {
136
139
  BG_3: string;
137
140
  BG_4: string;
138
141
  BG_5: string;
139
- TEXT_BA_PRIMARY: string;
140
- TEXT_BA_SECONDARY: string;
141
- TEXT_BA_TRETIARY: string;
142
+ BRAND_BA_1: string;
143
+ BRAND_BA_2: string;
144
+ BRAND_BA_3: string;
145
+ BRAND_DEFAULT_1: string;
146
+ BRAND_DEFAULT_2: string;
147
+ BRAND_DEFAULT_3: string;
142
148
  ALERT: string;
143
149
  SUCCESS: string;
144
150
  WHITE: string;
@@ -88,9 +88,12 @@ export declare const THEME_BA: {
88
88
  BG_3: string;
89
89
  BG_4: string;
90
90
  BG_5: string;
91
- TEXT_BA_PRIMARY: string;
92
- TEXT_BA_SECONDARY: string;
93
- TEXT_BA_TRETIARY: string;
91
+ BRAND_BA_1: string;
92
+ BRAND_BA_2: string;
93
+ BRAND_BA_3: string;
94
+ BRAND_DEFAULT_1: string;
95
+ BRAND_DEFAULT_2: string;
96
+ BRAND_DEFAULT_3: string;
94
97
  ALERT: string;
95
98
  SUCCESS: string;
96
99
  WHITE: string;
@@ -31,9 +31,9 @@ var ButtonThemeBA = {
31
31
  borderColor: color.Color.PRIMARY_BA_5
32
32
  },
33
33
  disabled: {
34
- color: color.Color.PRIMARY_BA_3,
35
- backgroundColor: color.Color.PRIMARY_BA_2,
36
- borderColor: color.Color.PRIMARY_BA_2
34
+ color: color.Color.BG_3,
35
+ backgroundColor: color.Color.BG_1,
36
+ borderColor: color.Color.BG_1
37
37
  }
38
38
  },
39
39
  secondary: {
@@ -58,9 +58,9 @@ var ButtonThemeBA = {
58
58
  borderColor: color.Color.SECONDARY_BA_5
59
59
  },
60
60
  disabled: {
61
- color: color.Color.SECONDARY_BA_3,
62
- backgroundColor: color.Color.SECONDARY_BA_2,
63
- borderColor: color.Color.SECONDARY_BA_2
61
+ color: color.Color.BG_3,
62
+ backgroundColor: color.Color.BG_1,
63
+ borderColor: color.Color.BG_1
64
64
  }
65
65
  },
66
66
  clear: {
@@ -80,9 +80,9 @@ var ButtonThemeBA = {
80
80
  borderColor: color.Color.TRETIARY_BA_2
81
81
  },
82
82
  disabled: {
83
- color: color.Color.TRETIARY_BA_3,
84
- backgroundColor: color.Color.TRETIARY_BA_1,
85
- borderColor: color.Color.TRETIARY_BA_1
83
+ color: color.Color.BG_3,
84
+ backgroundColor: color.Color.BG_1,
85
+ borderColor: color.Color.BG_1
86
86
  }
87
87
  }
88
88
  };
@@ -124,8 +124,8 @@ var SwitchThemeDefault = {
124
124
  },
125
125
  state: {
126
126
  normal: {
127
- backgroundColor: color.Color.BG_1,
128
- borderColor: color.Color.BG_1
127
+ backgroundColor: color.Color.BG_2,
128
+ borderColor: color.Color.BG_2
129
129
  },
130
130
  checked: {
131
131
  backgroundColor: color.Color.PRIMARY_BA_5,
@@ -88,9 +88,12 @@ export declare const THEME_DEFAULT: {
88
88
  BG_3: string;
89
89
  BG_4: string;
90
90
  BG_5: string;
91
- TEXT_BA_PRIMARY: string;
92
- TEXT_BA_SECONDARY: string;
93
- TEXT_BA_TRETIARY: string;
91
+ BRAND_BA_1: string;
92
+ BRAND_BA_2: string;
93
+ BRAND_BA_3: string;
94
+ BRAND_DEFAULT_1: string;
95
+ BRAND_DEFAULT_2: string;
96
+ BRAND_DEFAULT_3: string;
94
97
  ALERT: string;
95
98
  SUCCESS: string;
96
99
  WHITE: string;
@@ -30,9 +30,9 @@ var ButtonThemeDefault = {
30
30
  borderColor: color.Color.PRIMARY_5
31
31
  },
32
32
  disabled: {
33
- color: color.Color.PRIMARY_3,
34
- backgroundColor: color.Color.PRIMARY_2,
35
- borderColor: color.Color.PRIMARY_2
33
+ color: color.Color.BG_3,
34
+ backgroundColor: color.Color.BG_1,
35
+ borderColor: color.Color.BG_1
36
36
  }
37
37
  },
38
38
  secondary: {
@@ -57,9 +57,9 @@ var ButtonThemeDefault = {
57
57
  borderColor: color.Color.SECONDARY_5
58
58
  },
59
59
  disabled: {
60
- color: color.Color.SECONDARY_3,
61
- backgroundColor: color.Color.SECONDARY_2,
62
- borderColor: color.Color.SECONDARY_2
60
+ color: color.Color.BG_3,
61
+ backgroundColor: color.Color.BG_1,
62
+ borderColor: color.Color.BG_1
63
63
  }
64
64
  },
65
65
  clear: {
@@ -79,9 +79,9 @@ var ButtonThemeDefault = {
79
79
  borderColor: color.Color.TRETIARY_2
80
80
  },
81
81
  disabled: {
82
- color: color.Color.TRETIARY_3,
83
- backgroundColor: color.Color.TRETIARY_1,
84
- borderColor: color.Color.TRETIARY_1
82
+ color: color.Color.BG_3,
83
+ backgroundColor: color.Color.BG_1,
84
+ borderColor: color.Color.BG_1
85
85
  }
86
86
  }
87
87
  };
@@ -123,8 +123,8 @@ var SwitchThemeDefault = {
123
123
  },
124
124
  state: {
125
125
  normal: {
126
- backgroundColor: color.Color.BG_1,
127
- borderColor: color.Color.BG_1
126
+ backgroundColor: color.Color.BG_2,
127
+ borderColor: color.Color.BG_2
128
128
  },
129
129
  checked: {
130
130
  backgroundColor: color.Color.PRIMARY_5,
@@ -0,0 +1,44 @@
1
+ import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
2
+ import { Control, FakeCheckbox, Text, Label } from './styles.js';
3
+
4
+ var Checkbox = function Checkbox(_a) {
5
+ var id = _a.id,
6
+ name = _a.name,
7
+ value = _a.value,
8
+ text = _a.text,
9
+ checked = _a.checked,
10
+ onChange = _a.onChange,
11
+ onFocus = _a.onFocus,
12
+ onBlur = _a.onBlur,
13
+ _b = _a.variant,
14
+ variant = _b === void 0 ? "primary" : _b,
15
+ className = _a.className,
16
+ disabled = _a.disabled,
17
+ error = _a.error;
18
+ var control = jsxs(Fragment, {
19
+ children: [jsx(Control, {
20
+ className: className,
21
+ type: "checkbox",
22
+ id: id,
23
+ variant: variant,
24
+ name: name,
25
+ value: value,
26
+ checked: checked,
27
+ onChange: onChange,
28
+ onFocus: onFocus,
29
+ onBlur: onBlur,
30
+ disabled: disabled
31
+ }), jsx(FakeCheckbox, {
32
+ variant: variant,
33
+ checked: checked,
34
+ error: error
35
+ }), jsx(Text, {
36
+ children: text
37
+ })]
38
+ });
39
+ return jsx(Label, {
40
+ children: control
41
+ });
42
+ };
43
+
44
+ export { Checkbox as default };