@factorearth/component-library 3.2.11-alpha.0 → 3.3.0

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.
Files changed (33) hide show
  1. package/README.md +11 -11
  2. package/dist/Atoms/Buttons/Button.js +16 -16
  3. package/dist/Atoms/ContentDropdown/ContentDropdown.d.ts +11 -0
  4. package/dist/Atoms/ContentDropdown/ContentDropdown.js +37 -0
  5. package/dist/Atoms/ContentDropdown/ContentDropdown.js.map +1 -0
  6. package/dist/Atoms/DateField/DateField.js +94 -94
  7. package/dist/Atoms/FieldWrapper/FieldWrapper.js +21 -21
  8. package/dist/Atoms/MoreHorizonButton/MoreHorizonButton.js +52 -52
  9. package/dist/Atoms/NoteField/NoteField.js +38 -38
  10. package/dist/Atoms/NumberField/NumberField.js +63 -63
  11. package/dist/Atoms/Pagination/Pagination.js +26 -26
  12. package/dist/Atoms/PhoneNumberField/PhoneNumberField.js +4 -4
  13. package/dist/Atoms/SelectField/SelectField.js +14 -1
  14. package/dist/Atoms/SelectField/SelectField.js.map +1 -1
  15. package/dist/Atoms/SortDropdown/SortDropdown.js +39 -39
  16. package/dist/Atoms/Tab/Tab.d.ts +10 -0
  17. package/dist/Atoms/Tab/Tab.js +26 -0
  18. package/dist/Atoms/Tab/Tab.js.map +1 -0
  19. package/dist/Atoms/TextField/TextField.js +20 -20
  20. package/dist/Molecules/Form/Form.d.ts +14 -0
  21. package/dist/Molecules/Form/Form.js +16 -0
  22. package/dist/Molecules/Form/Form.js.map +1 -0
  23. package/dist/Molecules/Thumbnail/Thumbnail.js +47 -47
  24. package/dist/Organisms/Card/Card.js +36 -36
  25. package/dist/Organisms/Modal/Modal.js +68 -68
  26. package/dist/Organisms/TabManager/TabManager.d.ts +9 -0
  27. package/dist/Organisms/TabManager/TabManager.js +46 -0
  28. package/dist/Organisms/TabManager/TabManager.js.map +1 -0
  29. package/dist/Theme/ThemeProvider.js +7 -7
  30. package/dist/Theme/ThemeProvider.js.map +1 -1
  31. package/dist/Theme/tokens.json +109 -16
  32. package/dist/Theme/types.d.ts +1 -1
  33. package/package.json +2 -2
@@ -1,44 +1,44 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import styled from "@emotion/styled";
3
- const CardContainer = styled.div `
4
- padding: 24px;
5
- background-color: ${({ colorPalette }) => colorPalette.background.primary};
6
- border-width: 0.5px;
7
- border-style: solid;
8
- border-color: ${({ colorPalette }) => colorPalette.border.primary};
9
- border-right: none;
10
- border-left: none;
3
+ const CardContainer = styled.div `
4
+ padding: 24px;
5
+ background-color: ${({ colorPalette }) => colorPalette.background.primary};
6
+ border-width: 0.5px;
7
+ border-style: solid;
8
+ border-color: ${({ colorPalette }) => colorPalette.border.primary};
9
+ border-right: none;
10
+ border-left: none;
11
11
  `;
12
- const FieldsXThumbnailSection = styled.section `
13
- display: flex;
14
- justify-content: space-between;
15
- flex-direction: row-reverse;
16
- background-color: ${({ colorPalette }) => colorPalette.background.primary};
17
- @media (max-width: 600px) {
18
- flex-direction: column;
19
- align-items: flex-end;
20
- }
21
-
22
- :has(div > div[aria-label="show-image"]) {
23
- flex-direction: column;
24
- }
12
+ const FieldsXThumbnailSection = styled.section `
13
+ display: flex;
14
+ justify-content: space-between;
15
+ flex-direction: row-reverse;
16
+ background-color: ${({ colorPalette }) => colorPalette.background.primary};
17
+ @media (max-width: 600px) {
18
+ flex-direction: column;
19
+ align-items: flex-end;
20
+ }
21
+
22
+ :has(div > div[aria-label="show-image"]) {
23
+ flex-direction: column;
24
+ }
25
25
  `;
26
- const ThumbnailSectionFields = styled.section `
27
- padding: 16px 24px 0px 0px;
28
- background-color: ${({ colorPalette }) => colorPalette.background.primary};
29
- display: flex;
30
- flex-direction: column;
31
- justify-content: center;
32
- width: 100%;
33
- @media (max-width: 600px) {
34
- padding: 16px 0px 0px 24px;
35
- }
26
+ const ThumbnailSectionFields = styled.section `
27
+ padding: 16px 24px 0px 0px;
28
+ background-color: ${({ colorPalette }) => colorPalette.background.primary};
29
+ display: flex;
30
+ flex-direction: column;
31
+ justify-content: center;
32
+ width: 100%;
33
+ @media (max-width: 600px) {
34
+ padding: 16px 0px 0px 24px;
35
+ }
36
36
  `;
37
- const ButtonContainer = styled.div `
38
- display: flex;
39
- justify-content: flex-end;
40
- gap: 24px;
41
- padding-top: 24px;
37
+ const ButtonContainer = styled.div `
38
+ display: flex;
39
+ justify-content: flex-end;
40
+ gap: 24px;
41
+ padding-top: 24px;
42
42
  `;
43
43
  export const Card = forwardRef((props, ref) => {
44
44
  const { colorPalette, thumbnail, thumbnailSectionFields, remainingFields, buttons, } = props;
@@ -3,82 +3,82 @@ import * as Dialog from "@radix-ui/react-dialog";
3
3
  import styled from "@emotion/styled";
4
4
  import { Button } from "../../Atoms/Buttons/Button";
5
5
  import { FiX } from "react-icons/fi";
6
- export const StyledDialog = styled(Dialog.Overlay) `
7
- background-color: ${({ colorPalette }) => colorPalette.background.secondary};
8
- opacity: 0.8;
9
- position: absolute;
10
- inset: 0;
11
- animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
12
- z-index: 1000;
6
+ export const StyledDialog = styled(Dialog.Overlay) `
7
+ background-color: ${({ colorPalette }) => colorPalette.background.secondary};
8
+ opacity: 0.8;
9
+ position: absolute;
10
+ inset: 0;
11
+ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
12
+ z-index: 1000;
13
13
  `;
14
- export const StyledContent = styled(Dialog.Content) `
15
- background-color: ${({ colorPalette }) => colorPalette.background.primary};
16
- box-shadow: ${({ colorPalette }) => `${colorPalette.background.secondary} 0px 5px 15px`};
17
- color: ${({ colorPalette }) => colorPalette.text.primary};
18
- border-radius: 4px;
19
- position: fixed;
20
- top: 50%;
21
- left: 50%;
22
- transform: translate(-50%, -50%);
23
- max-height: 85vh;
24
- animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25
- z-index: 1000;
26
- display: flex;
27
- flex-direction: column;
28
- min-width: 300px;
29
- gap: 16px;
30
- :focus {
31
- outline: none;
32
- }
14
+ export const StyledContent = styled(Dialog.Content) `
15
+ background-color: ${({ colorPalette }) => colorPalette.background.primary};
16
+ box-shadow: ${({ colorPalette }) => `${colorPalette.background.secondary} 0px 5px 15px`};
17
+ color: ${({ colorPalette }) => colorPalette.text.primary};
18
+ border-radius: 4px;
19
+ position: fixed;
20
+ top: 50%;
21
+ left: 50%;
22
+ transform: translate(-50%, -50%);
23
+ max-height: 85vh;
24
+ animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25
+ z-index: 1000;
26
+ display: flex;
27
+ flex-direction: column;
28
+ min-width: 300px;
29
+ gap: 16px;
30
+ :focus {
31
+ outline: none;
32
+ }
33
33
  `;
34
- export const DialogContainer = styled.div `
35
- display: flex;
36
- padding: 24px 24px 0px 24px;
37
- flex-direction: column;
38
- align-items: center;
39
- gap: 16px;
40
- align-self: stretch;
34
+ export const DialogContainer = styled.div `
35
+ display: flex;
36
+ padding: 24px 24px 0px 24px;
37
+ flex-direction: column;
38
+ align-items: center;
39
+ gap: 16px;
40
+ align-self: stretch;
41
41
  `;
42
- export const ModalTitleContainer = styled.div `
43
- display: flex;
44
- justify-content: space-between;
45
- width: 100%;
42
+ export const ModalTitleContainer = styled.div `
43
+ display: flex;
44
+ justify-content: space-between;
45
+ width: 100%;
46
46
  `;
47
- export const ModalTitle = styled.div `
48
- font-size: 24px;
49
- font-style: normal;
50
- font-weight: 600;
51
- line-height: 150%;
47
+ export const ModalTitle = styled.div `
48
+ font-size: 24px;
49
+ font-style: normal;
50
+ font-weight: 600;
51
+ line-height: 150%;
52
52
  `;
53
- export const ModalHeading = styled.div `
54
- font-size: 16px;
55
- font-style: normal;
56
- font-weight: 700;
57
- line-height: 150%;
53
+ export const ModalHeading = styled.div `
54
+ font-size: 16px;
55
+ font-style: normal;
56
+ font-weight: 700;
57
+ line-height: 150%;
58
58
  `;
59
- export const ModelSubHeading = styled.div `
60
- font-size: 16px;
61
- font-style: normal;
62
- font-weight: 400;
63
- line-height: 24px; /* 150% */
64
- letter-spacing: 0.16px;
65
- width: 100%;
59
+ export const ModelSubHeading = styled.div `
60
+ font-size: 16px;
61
+ font-style: normal;
62
+ font-weight: 400;
63
+ line-height: 24px; /* 150% */
64
+ letter-spacing: 0.16px;
65
+ width: 100%;
66
66
  `;
67
- export const ModalFooter = styled.div `
68
- display: flex;
69
- padding: 24px 16px;
70
- justify-content: center;
71
- align-items: center;
72
- gap: 16px;
73
- align-self: stretch;
67
+ export const ModalFooter = styled.div `
68
+ display: flex;
69
+ padding: 24px 16px;
70
+ justify-content: center;
71
+ align-items: center;
72
+ gap: 16px;
73
+ align-self: stretch;
74
74
  `;
75
- export const ModalInputBox = styled.div `
76
- display: flex;
77
- width: 322px;
78
- flex-direction: column;
79
- justify-content: center;
80
- align-items: flex-start;
81
- gap: 8px;
75
+ export const ModalInputBox = styled.div `
76
+ display: flex;
77
+ width: 322px;
78
+ flex-direction: column;
79
+ justify-content: center;
80
+ align-items: flex-start;
81
+ gap: 8px;
82
82
  `;
83
83
  export const Modal = (props) => {
84
84
  const { open, children, colorPalette, setOpen, ...remainderProps } = props;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { Colors } from "../../Theme/types";
3
+ interface Props {
4
+ colors: Colors;
5
+ tabLabels: string[];
6
+ forms: JSX.Element[];
7
+ }
8
+ export declare function TabManager(props: Props): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,46 @@
1
+ import styled from "@emotion/styled";
2
+ import React, { useMemo, useState } from "react";
3
+ import { MdPersonAddAlt } from "react-icons/md";
4
+ import ContentDropdown from "../../Atoms/ContentDropdown/ContentDropdown";
5
+ import { Tab } from "../../Atoms/Tab/Tab";
6
+ const Container = styled.div `
7
+ display: flex;
8
+ width: 100%;
9
+ padding: 16px 0px;
10
+ flex-direction: column;
11
+ align-items: flex-start;
12
+ background-color: ${({ colors }) => colors.background.absolute}
13
+ `;
14
+ const NavBar = styled.div `
15
+ display: flex;
16
+ padding: 0px 16px;
17
+ align-items: flex-start;
18
+ gap: 8px;
19
+ align-self: stretch;
20
+ border-bottom: 0.5px solid #89949F;
21
+ `;
22
+ export function TabManager(props) {
23
+ const { colors, tabLabels, forms } = props;
24
+ if (tabLabels.length <= 0)
25
+ throw new Error(`No tab labels provided`);
26
+ if (forms.length <= 0)
27
+ throw new Error(`No forms provided`);
28
+ if (tabLabels.length !== forms.length)
29
+ throw new Error(`Number of tab labels does not match number of forms`);
30
+ const [expanded, setExpanded] = useState(false);
31
+ const [selectedTab, setSelectedTab] = useState(0);
32
+ const tabs = useMemo(() => {
33
+ function handleSelectTab(index) {
34
+ setSelectedTab(index);
35
+ }
36
+ return tabLabels.map((label, index) => {
37
+ return (React.createElement(Tab, { colors: colors, selected: index === selectedTab, handleClick: () => handleSelectTab(index), label: label }));
38
+ });
39
+ }, [tabLabels, selectedTab]);
40
+ return (React.createElement(Container, { colors: colors },
41
+ React.createElement(ContentDropdown, { colors: colors, expanded: expanded, style: { alignItems: "flex-start" }, handleClick: () => setExpanded(!expanded), icon: React.createElement(MdPersonAddAlt, { color: colors.buttonText.outlined, style: { width: "24px", height: "24px" } }), label: "Advanced", role: "button", tabIndex: 0 }),
42
+ expanded && (React.createElement(React.Fragment, null,
43
+ React.createElement(NavBar, null, tabs),
44
+ forms[selectedTab]))));
45
+ }
46
+ //# sourceMappingURL=TabManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabManager.js","sourceRoot":"","sources":["../../../lib/Organisms/TabManager/TabManager.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,eAAe,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAG1C,MAAM,SAAS,GAAG,MAAM,CAAC,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ACN,oBAAC,SAAS,IACT,MAAM,EAAE,MAAM;QAEd,oBAAC,eAAe,IACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,EACnC,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,EACzC,IAAI,EAAE,oBAAC,cAAc,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAI,EACrG,KAAK,EAAC,UAAU,EAChB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,GACV;QACD,QAAQ,IAAI,CACZ;YACC,oBAAC,MAAM,QACL,IAAI,CACG;YACR,KAAK,CAAC,WAAW,CAAC,CACjB,CACH,CACU,CACZ,CAAC;AACH,CAAC"}
@@ -17,7 +17,7 @@ const { grey, blue, green, red } = {
17
17
  500: tokens.global["Base Colors"]["500-green"].value,
18
18
  },
19
19
  red: {
20
- 500: tokens.global["Base Colors"]["500-red"].value,
20
+ 700: tokens.global["Base Colors"]["700-red"].value,
21
21
  },
22
22
  };
23
23
  export const lightTheme = {
@@ -44,7 +44,7 @@ export const lightTheme = {
44
44
  },
45
45
  utils: {
46
46
  success: green["500"],
47
- error: red["500"],
47
+ error: red["700"],
48
48
  icon: grey["700"],
49
49
  disabled: grey["500"],
50
50
  },
@@ -57,13 +57,13 @@ export const lightTheme = {
57
57
  buttonBorder: {
58
58
  filled: blue["700"],
59
59
  outlined: blue["700"],
60
- destructive: red["500"],
60
+ destructive: red["700"],
61
61
  success: green["500"],
62
62
  },
63
63
  buttonBackground: {
64
64
  filled: blue["700"],
65
65
  outlined: grey["200"],
66
- destructive: red["500"],
66
+ destructive: red["700"],
67
67
  success: green["500"],
68
68
  },
69
69
  theme: "light",
@@ -92,7 +92,7 @@ export const darkTheme = {
92
92
  },
93
93
  utils: {
94
94
  success: green["500"],
95
- error: red["500"],
95
+ error: red["700"],
96
96
  icon: grey["200"],
97
97
  disabled: grey["700"],
98
98
  },
@@ -105,13 +105,13 @@ export const darkTheme = {
105
105
  buttonBorder: {
106
106
  filled: blue["700"],
107
107
  outlined: grey["200"],
108
- destructive: red["500"],
108
+ destructive: red["700"],
109
109
  success: green["500"]
110
110
  },
111
111
  buttonBackground: {
112
112
  filled: grey["200"],
113
113
  outlined: grey["700"],
114
- destructive: red["500"],
114
+ destructive: red["700"],
115
115
  success: green["500"],
116
116
  },
117
117
  theme: "dark",
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../../lib/Theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,MAAM,MAAM,eAAe,CAAC;AAInC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAoB;IACnD,IAAI,EAAE;QACL,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC,KAAK;QAC1D,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK;QACzD,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK;KACnD;IACD,IAAI,EAAE;QACL,GAAG,EAA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AC,UAAU,CAAC,YAAY,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAsD,EAAE,EAAE;IAC7G,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,CAAC,SAA2B,EAAE,EAAE;QACnD,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;YAC3B,QAAQ,CAAC,UAAU,CAAC,CAAC;YACrB,OAAO;QACR,CAAC;QACD,QAAQ,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,CACN,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE;QACzE,6BACC,KAAK,EAAE;gBACN,eAAe,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO;gBACzC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO;aACzB,IAEA,QAAQ,CACJ,CACiB,CACxB,CAAC;AACH,CAAC,CAAC"}
@@ -8,61 +8,112 @@
8
8
  "200-white-grey": {
9
9
  "value": "#FCFCFD",
10
10
  "type": "color",
11
- "parent": "Collection 1/Mode 1"
11
+ "parent": "Collection 1/Mode 1",
12
+ "description": "Container Background, Text Dark"
12
13
  },
13
14
  "300-French-grey": {
14
15
  "value": "#d0d8dc",
15
16
  "type": "color",
16
17
  "parent": "Collection 1/Mode 1",
17
- "description": ""
18
+ "description": "Text 2 Dark"
18
19
  },
19
20
  "400-cadet-grey": {
20
21
  "value": "#9aa3ac",
21
22
  "type": "color",
22
23
  "parent": "Collection 1/Mode 1",
23
- "description": ""
24
+ "description": "Text 3"
24
25
  },
25
26
  "500-slate-grey": {
26
27
  "value": "#6e7a87",
27
28
  "type": "color",
28
29
  "parent": "Collection 1/Mode 1",
29
- "description": ""
30
+ "description": "Text 3"
30
31
  },
31
32
  "600-space-grey": {
32
33
  "value": "#2f3034",
33
34
  "type": "color",
34
35
  "parent": "Collection 1/Mode 1",
35
- "description": ""
36
+ "description": "Text 2, Container Background 2 Dark"
36
37
  },
37
38
  "700-grey": {
38
39
  "value": "#1b1b1e",
39
40
  "type": "color",
40
41
  "parent": "Collection 1/Mode 1",
41
- "description": ""
42
+ "description": "Text, Container Background Dark, Primary Label Dark"
42
43
  },
43
44
  "300-light-blue": {
44
45
  "value": "#ebf7ff",
45
46
  "type": "color",
46
47
  "parent": "Collection 1/Mode 1",
47
- "description": ""
48
+ "description": "Container Background 2"
48
49
  },
49
50
  "700-blue": {
50
- "value": "#0065a3",
51
+ "value": "#004F80",
51
52
  "type": "color",
52
53
  "parent": "Collection 1/Mode 1",
53
- "description": ""
54
+ "description": "Primary Button Background, Primary Link"
54
55
  },
55
56
  "500-green": {
56
- "value": "#428c74",
57
+ "value": "#365E3D",
57
58
  "type": "color",
58
- "parent": "Collection 1/Mode 1",
59
- "description": ""
59
+ "parent": "Collection 1/Mode 1"
60
60
  },
61
- "500-red": {
62
- "value": "#e8504f",
61
+ "700-red": {
62
+ "value": "#BF4040",
63
63
  "type": "color",
64
- "parent": "Collection 1/Mode 1",
65
- "description": ""
64
+ "parent": "Collection 1/Mode 1"
65
+ },
66
+ "100-white": {
67
+ "value": "#FFFFFF",
68
+ "type": "color",
69
+ "description": "Background, Primary Button Background Dark, Primary Link Dark"
70
+ },
71
+ "500-regent-grey": {
72
+ "value": "#89949F",
73
+ "type": "color",
74
+ "description": "Border"
75
+ },
76
+ "300-iron-grey": {
77
+ "value": "#DCDEE0",
78
+ "type": "color",
79
+ "description": "Border 2, Border Dark"
80
+ },
81
+ "800-black": {
82
+ "value": "#000000",
83
+ "type": "color",
84
+ "description": "Background Dark"
85
+ },
86
+ "300-porcelain-grey": {
87
+ "value": "#EFF0F0",
88
+ "type": "color",
89
+ "description": "Border 2 Dark"
90
+ }
91
+ },
92
+ "Brand Colors": {
93
+ "Factor Earth Fuscia": {
94
+ "value": "#A44D9B",
95
+ "type": "color",
96
+ "description": "Factor Earth Fuscia"
97
+ },
98
+ "Factor Earth Grain": {
99
+ "value": "#DCCAAD",
100
+ "type": "color",
101
+ "description": "Factor Earth Grain"
102
+ },
103
+ "Factor Earth Tea Flower": {
104
+ "value": "#BEDFB9",
105
+ "type": "color",
106
+ "description": "Factor Earth Tea Flower"
107
+ },
108
+ "Factor Earth Tropaz": {
109
+ "value": "#325690",
110
+ "type": "color",
111
+ "description": "Factor Earth Tropaz"
112
+ },
113
+ "Metcalf Bison Blue": {
114
+ "value": "#142541",
115
+ "type": "color",
116
+ "description": "Metcalf Bison Blue"
66
117
  }
67
118
  },
68
119
  "border-radius-sm": {
@@ -182,6 +233,48 @@
182
233
  "paragraphIndent": "0"
183
234
  },
184
235
  "type": "typography"
236
+ },
237
+ "Badge Colors": {
238
+ "Info Blue Background": {
239
+ "value": "#E6EEFE",
240
+ "type": "color",
241
+ "description": "Info Blue Background"
242
+ },
243
+ "Info Blue Label": {
244
+ "value": "#002266",
245
+ "type": "color",
246
+ "description": "Info Blue Label"
247
+ },
248
+ "Success Green Background": {
249
+ "value": "#EBFAED",
250
+ "type": "color",
251
+ "description": "Success Green Background"
252
+ },
253
+ "Sucess Green Label": {
254
+ "value": "#365E3D",
255
+ "type": "color",
256
+ "description": "Success Green Label"
257
+ },
258
+ "Warning Orange Background": {
259
+ "value": "#FCF2E9",
260
+ "type": "color",
261
+ "description": "Warning Orange Background"
262
+ },
263
+ "Warning Orange Label": {
264
+ "value": "#663300",
265
+ "type": "color",
266
+ "description": "Warning Orange Label"
267
+ },
268
+ "Error Red Background": {
269
+ "value": "#FCE9E9",
270
+ "type": "color",
271
+ "description": "Error Red Background"
272
+ },
273
+ "Error Red Label": {
274
+ "value": "#660000",
275
+ "type": "color",
276
+ "description": "Error Red Label"
277
+ }
185
278
  }
186
279
  },
187
280
  "$themes": [],
@@ -14,7 +14,7 @@ interface GreenColorMapping {
14
14
  500: string;
15
15
  }
16
16
  interface RedColorMapping {
17
- 500: string;
17
+ 700: string;
18
18
  }
19
19
  export interface ThemeBaseColors {
20
20
  grey: GreyColorMapping;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorearth/component-library",
3
- "version": "3.2.11-alpha.0",
3
+ "version": "3.3.0",
4
4
  "description": " A storybook component library for FactorEarth",
5
5
  "author": "madtrx <marlin.makori@gmail.com>",
6
6
  "homepage": "https://github.com/FactorEarth/RecordMiddleware#readme",
@@ -46,7 +46,7 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org/"
48
48
  },
49
- "gitHead": "f49a9ace2360be7a343f2ac46be5aef7f458db17",
49
+ "gitHead": "d21113da0a3bc5b0724302cde649ee0647840b9c",
50
50
  "dependencies": {
51
51
  "@emotion/react": "^11.13.0",
52
52
  "@emotion/styled": "^11.13.0",