@redsift/design-system-legacy 8.0.1 → 8.0.2

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 (136) hide show
  1. package/package.json +3 -2
  2. package/dist/package.json +0 -65
  3. package/rollup.config.js +0 -70
  4. package/src/components/Alert/Alert.jsx +0 -94
  5. package/src/components/Alert/index.ts +0 -1
  6. package/src/components/Alert/readme.md +0 -114
  7. package/src/components/Button/Button.jsx +0 -161
  8. package/src/components/Button/index.ts +0 -1
  9. package/src/components/Button/readme.md +0 -173
  10. package/src/components/Card/Card.jsx +0 -34
  11. package/src/components/Card/index.ts +0 -1
  12. package/src/components/Card/readme.md +0 -54
  13. package/src/components/CardHeader/CardHeader.jsx +0 -40
  14. package/src/components/CardHeader/index.ts +0 -1
  15. package/src/components/Checkbox/Checkbox.jsx +0 -123
  16. package/src/components/Checkbox/index.ts +0 -1
  17. package/src/components/Checkbox/readme.md +0 -54
  18. package/src/components/CheckboxTree/CheckboxTree.jsx +0 -167
  19. package/src/components/CheckboxTree/CheckboxTree.styles.ts +0 -49
  20. package/src/components/CheckboxTree/index.ts +0 -1
  21. package/src/components/CheckboxTree/readme.md +0 -60
  22. package/src/components/IconContainer/IconContainer.jsx +0 -51
  23. package/src/components/IconContainer/index.ts +0 -1
  24. package/src/components/Input/Input.jsx +0 -27
  25. package/src/components/Input/OutlineInput/OutlineInput.jsx +0 -188
  26. package/src/components/Input/RegularInput/RegularInput.jsx +0 -55
  27. package/src/components/Input/RegularInput/RegularInput.styles.ts +0 -98
  28. package/src/components/Input/index.ts +0 -1
  29. package/src/components/Input/readme.md +0 -82
  30. package/src/components/Pagination/Pagination.jsx +0 -111
  31. package/src/components/Pagination/index.ts +0 -1
  32. package/src/components/Pagination/readme.md +0 -34
  33. package/src/components/Radio/Radio.jsx +0 -121
  34. package/src/components/Radio/index.ts +0 -1
  35. package/src/components/Radio/readme.md +0 -90
  36. package/src/components/Select/Select.jsx +0 -360
  37. package/src/components/Select/SelectComponents.jsx +0 -342
  38. package/src/components/Select/index.ts +0 -1
  39. package/src/components/Select/readme.md +0 -2507
  40. package/src/components/Switch/Switch.jsx +0 -130
  41. package/src/components/Switch/index.ts +0 -1
  42. package/src/components/Switch/readme.md +0 -55
  43. package/src/components/Table/ExportCSVButton.jsx +0 -34
  44. package/src/components/Table/Table.jsx +0 -872
  45. package/src/components/Table/TableComponents.jsx +0 -239
  46. package/src/components/Table/TableFilters.jsx +0 -23
  47. package/src/components/Table/TableStyles.jsx +0 -514
  48. package/src/components/Table/index.ts +0 -1
  49. package/src/components/Table/readme.md +0 -2190
  50. package/src/components/Tabs/Tabs.jsx +0 -116
  51. package/src/components/Tabs/TabsComponents.jsx +0 -124
  52. package/src/components/Tabs/index.ts +0 -1
  53. package/src/components/Tabs/readme.md +0 -171
  54. package/src/components/Typography/Typography.jsx +0 -77
  55. package/src/components/Typography/index.ts +0 -1
  56. package/src/components/Typography/readme.md +0 -88
  57. package/src/components/icons/ActionsIcon.jsx +0 -24
  58. package/src/components/icons/AddIcon.jsx +0 -8
  59. package/src/components/icons/Arrow.jsx +0 -39
  60. package/src/components/icons/ArrowDown.jsx +0 -8
  61. package/src/components/icons/ArrowIcon.jsx +0 -25
  62. package/src/components/icons/ArrowUp.jsx +0 -8
  63. package/src/components/icons/BarchartHorizontal.jsx +0 -18
  64. package/src/components/icons/BellIcon.jsx +0 -19
  65. package/src/components/icons/BimiSetupIcon.jsx +0 -25
  66. package/src/components/icons/Chevron.jsx +0 -42
  67. package/src/components/icons/ChevronLeft.jsx +0 -8
  68. package/src/components/icons/ChevronRight.jsx +0 -8
  69. package/src/components/icons/ClearIcon.jsx +0 -8
  70. package/src/components/icons/Cloud.jsx +0 -34
  71. package/src/components/icons/Cross.jsx +0 -25
  72. package/src/components/icons/DeleteIcon.jsx +0 -19
  73. package/src/components/icons/DynamicDmarcIcon.jsx +0 -43
  74. package/src/components/icons/EditOutline.jsx +0 -8
  75. package/src/components/icons/Email.jsx +0 -68
  76. package/src/components/icons/EmailSourcesIcon.jsx +0 -36
  77. package/src/components/icons/ExpandLayoutIcon.jsx +0 -38
  78. package/src/components/icons/ExportIcon.jsx +0 -7
  79. package/src/components/icons/Eye.jsx +0 -28
  80. package/src/components/icons/Facebook.jsx +0 -31
  81. package/src/components/icons/FilterList.jsx +0 -8
  82. package/src/components/icons/FindOutHowIcon.jsx +0 -49
  83. package/src/components/icons/FlatArrow.jsx +0 -33
  84. package/src/components/icons/ForwardArrowIcon.jsx +0 -54
  85. package/src/components/icons/Github.jsx +0 -41
  86. package/src/components/icons/Globe.jsx +0 -29
  87. package/src/components/icons/Hand.jsx +0 -21
  88. package/src/components/icons/InfinityLoop.jsx +0 -22
  89. package/src/components/icons/InfinityLoopBreak.jsx +0 -35
  90. package/src/components/icons/IngrainIcon.jsx +0 -33
  91. package/src/components/icons/LanguageIcon.jsx +0 -44
  92. package/src/components/icons/Linkedin.jsx +0 -37
  93. package/src/components/icons/LocationPin.jsx +0 -34
  94. package/src/components/icons/MicrosoftShield.jsx +0 -44
  95. package/src/components/icons/News.jsx +0 -65
  96. package/src/components/icons/Nodes.jsx +0 -17
  97. package/src/components/icons/OnDmarcIcon.jsx +0 -29
  98. package/src/components/icons/OnDmarcLogo.jsx +0 -74
  99. package/src/components/icons/OnDomainIcon.jsx +0 -27
  100. package/src/components/icons/OnInboxIcon.jsx +0 -42
  101. package/src/components/icons/OnInboxLogo.jsx +0 -97
  102. package/src/components/icons/OnInboxManagerIcon.jsx +0 -46
  103. package/src/components/icons/OpenInNewTabIcon.jsx +0 -28
  104. package/src/components/icons/Padlock.jsx +0 -37
  105. package/src/components/icons/PlusIcon.jsx +0 -16
  106. package/src/components/icons/Question.jsx +0 -19
  107. package/src/components/icons/Recruiting.jsx +0 -34
  108. package/src/components/icons/ReportsIcon.jsx +0 -25
  109. package/src/components/icons/SearchIcon.jsx +0 -7
  110. package/src/components/icons/Shield.jsx +0 -17
  111. package/src/components/icons/ShieldPassIcon.jsx +0 -23
  112. package/src/components/icons/ShieldSolid.jsx +0 -33
  113. package/src/components/icons/ShieldWarningIcon.jsx +0 -40
  114. package/src/components/icons/ShieldWarningInvertedIcon.jsx +0 -36
  115. package/src/components/icons/Spinner.jsx +0 -100
  116. package/src/components/icons/Team.jsx +0 -164
  117. package/src/components/icons/ThreeDotsIcon.jsx +0 -18
  118. package/src/components/icons/Thumb.jsx +0 -17
  119. package/src/components/icons/Traffic.jsx +0 -22
  120. package/src/components/icons/Twitter.jsx +0 -47
  121. package/src/components/icons/Upload.jsx +0 -12
  122. package/src/components/icons/VerticalDots.jsx +0 -28
  123. package/src/components/icons/Warning.jsx +0 -36
  124. package/src/components/icons/WarningTriangle.jsx +0 -44
  125. package/src/components/icons/Youtube.jsx +0 -28
  126. package/src/components/icons/index.ts +0 -69
  127. package/src/hooks/useDebouncedValue.jsx +0 -19
  128. package/src/hooks/useFetch.jsx +0 -26
  129. package/src/hooks/useIsMobile.jsx +0 -25
  130. package/src/hooks/useOnClickOutside.jsx +0 -14
  131. package/src/hooks/useToggle.jsx +0 -8
  132. package/src/index.ts +0 -23
  133. package/tsconfig.json +0 -3
  134. /package/{dist/CONTRIBUTING.md → CONTRIBUTING.md} +0 -0
  135. /package/{dist/index.js → index.js} +0 -0
  136. /package/{dist/index.js.map → index.js.map} +0 -0
@@ -1,116 +0,0 @@
1
- import React, { createRef, useEffect, useState, useRef } from 'react';
2
- import PropTypes from "prop-types";
3
- import {
4
- BottomShadowBlocker,
5
- Container,
6
- Tab,
7
- TabContent,
8
- TabsContent,
9
- TabsWrapper,
10
- } from "./TabsComponents";
11
-
12
- export const Tabs = ({
13
- accessibilityLabel,
14
- activeTabIndex,
15
- defaultTabIndex = 0,
16
- onClickTab,
17
- onChangeTabIndex,
18
- tabs = [],
19
- tintColor = "#333",
20
- ...rest
21
- }) => {
22
- const [selectedTabIndex, setSelectedTabIndex] = useState(
23
- activeTabIndex || defaultTabIndex || 0
24
- );
25
- const tabsRefs = useRef(tabs.map(createRef));
26
-
27
- useEffect(() => {
28
- if (tabsRefs.current.length !== tabs.length) {
29
- tabsRefs.current = tabs.map(
30
- (_, idx) => tabsRefs.current[idx] || createRef()
31
- );
32
- }
33
- }, [tabs]);
34
-
35
- if (tabs.length === 0 || tabs.length !== tabsRefs.current.length) {
36
- return null;
37
- }
38
-
39
- const selectTabIndex = (idx) => {
40
- if (typeof activeTabIndex === "undefined") {
41
- setSelectedTabIndex(idx);
42
- }
43
- if (typeof onChangeTabIndex === "function") {
44
- onChangeTabIndex(idx);
45
- }
46
- };
47
-
48
- const onTabKeyDown = (tabIndex) => (evt) => {
49
- const { keyCode, shiftKey } = evt.nativeEvent;
50
- if (![39, 37, 9].includes(keyCode)) return;
51
-
52
- const targetTab =
53
- keyCode === 39 || (keyCode === 9 && !shiftKey) // right arrow or simple tab
54
- ? Math.min(tabs.length - 1, tabIndex + 1)
55
- : Math.max(0, tabIndex - 1);
56
-
57
- tabsRefs.current[targetTab].current.focus();
58
- setSelectedTabIndex(targetTab);
59
- };
60
-
61
- const SelectedTab = tabs[selectedTabIndex];
62
-
63
- return (
64
- <Container noPadding {...rest}>
65
- <TabsWrapper role="tablist" aria-label={accessibilityLabel}>
66
- {tabs.map(({ label, accessibilityLabel, title }, idx) => {
67
- const isTabSelected = idx === selectedTabIndex;
68
- return (
69
- <Tab
70
- key={accessibilityLabel}
71
- role="tab"
72
- aria-selected={isTabSelected.toString()}
73
- aria-controls={`${accessibilityLabel}-tab`}
74
- tabindex={isTabSelected ? "0" : "-1"}
75
- tintColor={tintColor}
76
- title={title || label}
77
- onClick={() => {
78
- if (onClickTab) {
79
- onClickTab({ label, index: idx, title });
80
- }
81
- selectTabIndex(idx);
82
- }}
83
- onKeyDown={onTabKeyDown(selectedTabIndex)}
84
- ref={tabsRefs.current[idx]}
85
- >
86
- <TabContent>{label}</TabContent>
87
- {isTabSelected && <BottomShadowBlocker />}
88
- </Tab>
89
- );
90
- })}
91
- </TabsWrapper>
92
- <TabsContent
93
- role="tabpanel"
94
- aria-labelledby={`${SelectedTab.accessibilityLabel}-tab`}
95
- tabindex="0"
96
- >
97
- <SelectedTab.component />
98
- </TabsContent>
99
- </Container>
100
- );
101
- };
102
- Tabs.propTypes = {
103
- accessibilityLabel: PropTypes.string,
104
- activeTabIndex: PropTypes.number,
105
- defaultTabIndex: PropTypes.number,
106
- onClickTab: PropTypes.func,
107
- onChangeTabIndex: PropTypes.func,
108
- tabs: PropTypes.arrayOf(
109
- PropTypes.shape({
110
- label: PropTypes.string,
111
- accessibilityLabel: PropTypes.string,
112
- title: PropTypes.string,
113
- }).isRequired
114
- ).isRequired,
115
- tintColor: PropTypes.string,
116
- };
@@ -1,124 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import { Card } from '../Card';
3
-
4
- const borderRadius = "10px";
5
- const shadowColor = "#dfdfdf";
6
-
7
- export const Container = styled(Card)`
8
- overflow: hidden;
9
- `;
10
-
11
- export const TabsWrapper = styled.div`
12
- display: flex;
13
- background-color: #fafafa;
14
- `;
15
-
16
- export const TabContent = styled.div`
17
- position: relative;
18
- `;
19
-
20
- export const selectedTabMixin = css`
21
- color: ${(props) => props.tintColor};
22
- cursor: default;
23
- box-shadow: 0 0 10px 2px ${shadowColor};
24
- background-color: white;
25
- &:before,
26
- &:after {
27
- background-color: white;
28
- z-index: 1;
29
- }
30
- &:before,
31
- &:after,
32
- & ${TabContent}:before, & ${TabContent}:after {
33
- position: absolute;
34
- bottom: 0;
35
- }
36
- & ${TabContent} {
37
- &:after,
38
- &:before {
39
- width: 10px;
40
- height: 11px;
41
- background-color: #fafafa;
42
- z-index: 2;
43
- content: "";
44
- bottom: -16px;
45
- }
46
- &:before {
47
- left: -42px;
48
- box-shadow: inset -8px -9px 8px -10px ${shadowColor};
49
- border-bottom-right-radius: ${borderRadius};
50
- }
51
- &:after {
52
- right: -42px;
53
- box-shadow: inset 8px -9px 8px -10px ${shadowColor};
54
- border-bottom-left-radius: ${borderRadius};
55
- }
56
- }
57
- `;
58
-
59
- export const Tab = styled.button`
60
- border: none;
61
- font-weight: 500;
62
- font-size: 14px;
63
- height: 48px;
64
- cursor: pointer;
65
- user-select: none;
66
- position: relative;
67
- display: block;
68
- white-space: nowrap;
69
- padding-left: 32px;
70
- padding-right: 32px;
71
- background-color: transparent;
72
- border-top-left-radius: ${borderRadius};
73
- border-top-right-radius: ${borderRadius};
74
- margin-bottom: 0;
75
- color: rgba(0, 0, 0, 0.87);
76
- ${TabContent} {
77
- font-family: Raleway;
78
- }
79
- &:before,
80
- &:after {
81
- content: "";
82
- }
83
-
84
- &:before,
85
- &:after {
86
- background-color: transparent;
87
- width: 10px;
88
- height: 10px;
89
- }
90
- &:before {
91
- left: -10px;
92
- }
93
- &:after {
94
- right: -10px;
95
- }
96
-
97
- &:hover {
98
- color: ${(props) => props.tintColor};
99
- }
100
-
101
- &:focus {
102
- outline: none;
103
- }
104
-
105
- ${(props) => (props["aria-selected"] === "true" ? selectedTabMixin : "")};
106
- `;
107
-
108
- export const TabsContent = styled.div`
109
- box-shadow: -11px -10px 8px -12px ${shadowColor},
110
- 11px -12px 8px -12px ${shadowColor};
111
- position: relative;
112
- background-color: #fff;
113
- padding: 1.875rem;
114
- `;
115
-
116
- export const BottomShadowBlocker = styled.div`
117
- position: absolute;
118
- bottom: 0;
119
- right: 0;
120
- left: 0;
121
- height: 8px;
122
- background-color: #fff;
123
- z-index: 1;
124
- `;
@@ -1 +0,0 @@
1
- export * from './Tabs';
@@ -1,171 +0,0 @@
1
- ### Accessibility
2
-
3
- - Ensure the accessibilityLabel prop is present on both, `<Tabs />` and on every tab element on `tabs` property.
4
-
5
- ### Props
6
-
7
- | Prop | Default | Options |
8
- | :----------------: | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------: |
9
- | accessibilityLabel | | label to describe tabs content (i.e. "Security products") **Required** |
10
- | tabs | `[]` | Array of { accessibilityLabel: string, label: string or ReactComponent, title?: string (defaults to label), component: ReactComponent} **Required** |
11
- | tintColor | `#333` | Color |
12
- | defaultTabIndex | 0 | number |
13
- | activeTabIndex | undefined | If defined, will be the selected tab index |
14
- | onClickTab | undefined | (tab: {label: string, index: number, title: string}) => void |
15
- | onChangeTabIndex | undefined | (newIndex: number) => void |
16
- | ...rest | | |
17
-
18
- ### Examples
19
-
20
- #### Basic example
21
-
22
- ```js
23
- <div style={{ display: 'flex', flexDirection: 'column' }}>
24
- <Tabs
25
- accessibilityLabel="Red Sift products (basic)"
26
- tabs={[
27
- {
28
- accessibilityLabel: 'onINBOX',
29
- label: 'OnINBOX',
30
- component: () => <h1>onINBOX tab content</h1>,
31
- },
32
- {
33
- accessibilityLabel: 'onDMARC',
34
- label: 'OnDMARC',
35
- component: () => <h1>onDMARC tab content</h1>,
36
- },
37
- ]}
38
- onChangeTabIndex={(...args) =>
39
- console.log('Tabs.BasicExample.onChangeTabIndex(', ...args, ')')
40
- }
41
- />
42
- </div>
43
- ```
44
-
45
- #### Using component on tab labels
46
-
47
- ```js
48
- <div style={{ display: 'flex', flexDirection: 'column' }}>
49
- <Tabs
50
- accessibilityLabel="Red Sift products (with components)"
51
- tabs={[
52
- {
53
- accessibilityLabel: 'onINBOX',
54
- label: 'OnINBOX',
55
- component: () => <h1>onINBOX tab content</h1>,
56
- },
57
- {
58
- accessibilityLabel: 'onDMARC',
59
- label: (
60
- <div
61
- style={{
62
- display: 'flex',
63
- flexDirection: 'row',
64
- alignItems: 'center',
65
- }}
66
- >
67
- <div
68
- style={{
69
- width: 10,
70
- height: 10,
71
- backgroundColor: 'brown',
72
- borderRadius: 5,
73
- marginRight: 10,
74
- }}
75
- />
76
- OnDMARC
77
- </div>
78
- ),
79
- component: () => <h1>onDMARC tab content</h1>,
80
- },
81
- ]}
82
- onChangeTabIndex={(...args) =>
83
- console.log('Tabs.WithComponents.onChangeTabIndex(', ...args, ')')
84
- }
85
- />
86
- </div>
87
- ```
88
-
89
- #### Default tab
90
-
91
- ```js
92
- <div style={{ display: 'flex', flexDirection: 'column' }}>
93
- <Tabs
94
- accessibilityLabel="Red Sift products (default)"
95
- defaultTabIndex={1}
96
- tabs={[
97
- {
98
- accessibilityLabel: 'onINBOX',
99
- label: 'OnINBOX',
100
- component: () => <h1>onINBOX tab content</h1>,
101
- },
102
- {
103
- accessibilityLabel: 'onDMARC',
104
- label: 'OnDMARC',
105
- component: () => <h1>onDMARC tab content</h1>,
106
- },
107
- ]}
108
- onChangeTabIndex={(...args) =>
109
- console.log('Tabs.DefaultTab.onChangeTabIndex(', ...args, ')')
110
- }
111
- />
112
- </div>
113
- ```
114
-
115
- #### Fixed tab
116
-
117
- ```js
118
- <div style={{ display: 'flex', flexDirection: 'column' }}>
119
- <Tabs
120
- accessibilityLabel="Red Sift products (fixed)"
121
- activeTabIndex={1}
122
- tabs={[
123
- {
124
- accessibilityLabel: 'onINBOX',
125
- label: 'OnINBOX',
126
- component: () => <h1>onINBOX tab content</h1>,
127
- },
128
- {
129
- accessibilityLabel: 'onDMARC',
130
- label: 'OnDMARC',
131
- component: () => <h1>onDMARC tab content</h1>,
132
- },
133
- ]}
134
- onChangeTabIndex={(...args) =>
135
- console.log('Tabs.FixedTab.onChangeTabIndex(', ...args, ')')
136
- }
137
- />
138
- </div>
139
- ```
140
-
141
- #### Fixed tab using a custom title
142
-
143
- ```js
144
- <div style={{ display: 'flex', flexDirection: 'column' }}>
145
- <Tabs
146
- accessibilityLabel="Red Sift products (fixed)"
147
- activeTabIndex={0}
148
- tabs={[
149
- {
150
- accessibilityLabel: 'onINBOX',
151
- label: (
152
- <bold>
153
- <img src="https://via.placeholder.com/10" />
154
- OnINBOX
155
- </bold>
156
- ),
157
- title: 'OnINBOX with image',
158
- component: () => <h1>onINBOX tab content</h1>,
159
- },
160
- {
161
- accessibilityLabel: 'onDMARC',
162
- label: 'OnDMARC',
163
- component: () => <h1>onDMARC tab content</h1>,
164
- },
165
- ]}
166
- onChangeTabIndex={(...args) =>
167
- console.log('Tabs.FixedTab.onChangeTabIndex(', ...args, ')')
168
- }
169
- />
170
- </div>
171
- ```
@@ -1,77 +0,0 @@
1
- import React from 'react';
2
- import styled, { css } from 'styled-components';
3
- import PropTypes from "prop-types";
4
-
5
- export const fontSizes = {
6
- small: "0.8125rem", // 13px
7
- body: "0.875rem", // 14px
8
- h1: "2.5rem", // 40px
9
- h2: "1.75rem", // 28px
10
- h3: "1.313rem", // 21px
11
- h4: "1rem", // 16px
12
- };
13
-
14
- const StyledText = styled.div`
15
- ${({ bold, color, gutterBottom, noWrap, number, size }) => css`
16
- font-family: ${number
17
- ? "Source Code Pro"
18
- : size && ["h1", "h2", "h3", "h4"].includes(size)
19
- ? "Electrolize"
20
- : "Raleway"},
21
- sans-serif;
22
- font-size: ${size ? fontSizes[size] || "" : "0.875rem"};
23
- word-wrap: break-word;
24
- white-space: ${noWrap ? "nowrap" : "normal"};
25
- overflow-wrap: break-word;
26
- overflow: ${noWrap ? "hidden" : "auto"};
27
- text-overflow: ${noWrap ? "ellipsis" : "initial"};
28
- color: ${color ? color : "#333333"};
29
- font-weight: ${bold ? "600" : "normal"};
30
- margin-bottom: ${gutterBottom ? "1em" : "0px"};
31
- margin-top: 0;
32
- `}
33
- `;
34
-
35
- export const Typography = ({
36
- bold,
37
- children,
38
- className,
39
- color,
40
- component,
41
- gutterBottom,
42
- noWrap,
43
- number,
44
- size,
45
- style,
46
- ...otherProps
47
- }) => {
48
- return (
49
- <StyledText
50
- as={component}
51
- bold={bold}
52
- className={className}
53
- color={color}
54
- gutterBottom={gutterBottom}
55
- noWrap={noWrap}
56
- number={number}
57
- size={size || component}
58
- style={style}
59
- {...otherProps}
60
- >
61
- {children}
62
- </StyledText>
63
- );
64
- };
65
-
66
- Typography.propTypes = {
67
- bold: PropTypes.bool,
68
- children: PropTypes.node,
69
- className: PropTypes.string,
70
- color: PropTypes.string,
71
- component: PropTypes.string,
72
- gutterBottom: PropTypes.bool,
73
- noWrap: PropTypes.bool,
74
- number: PropTypes.bool,
75
- size: PropTypes.oneOf(Object.keys(fontSizes)),
76
- style: PropTypes.object,
77
- };
@@ -1 +0,0 @@
1
- export * from './Typography';
@@ -1,88 +0,0 @@
1
- ### Accessibility
2
-
3
- - Ensure the `as` prop is completed appropriately
4
- - Use `rem` measurements for font, for being responsive to users that change their browser font size setting
5
- - Ensure h1-h6 hierarchy is followed
6
- - h1-h6 is unrelated to the font size. An `<h1>` can be smaller than an `<h6>`, if that is the design
7
- - h1-h6 elements must not be used to markup subheadings, subtitles, alternative titles and taglines unless intended to be the heading for a new section or subsection.
8
- - A page should only have one `<h1>`, such as the company logo
9
- - A page title might be a `<h2>`, then a card title might be a `<h3>`, and so forth
10
- - if an `<h3>` is used, the `h1` and `h2` should also be used
11
-
12
- ### Props
13
-
14
- | Prop | Default | Options |
15
- | :----------: | :--------------------------------: | --------------------------------------------------------------------------------------------------------------------------: |
16
- | component | `div` | any html element including: `h1-h6,p,span,div` |
17
- | color | `#333333` | Color |
18
- | size | 'body': (Raleway, 0.875rem [14px]) | 'small': (Raleway, 0.8125rem [13px]), 'h1'-'h4': (Electrolize: 2.5rem [40px], 1.75rem [28px], 1.313rem [21px], 1rem [16px]) |
19
- | noWrap | `false` | If true, the text will not wrap, but instead will truncate with an ellipsis. |
20
- | number | `false` | If true, will use font for numbers (Source Code Pro) |
21
- | bold | `false` | If true, will use font weight of 600 |
22
- | gutterBottom | `false` | If true, will add `margin-bottom: 1em` |
23
- | children | | `node` |
24
- | ...rest | | |
25
-
26
- ### Examples
27
-
28
- ```js
29
- <div style={{ display: "flex", flexDirection: "column" }}>
30
- <Typography bold as="h1" size="h1">
31
- Header One Bold
32
- </Typography>
33
- <Typography as="h1" size="h1">
34
- Header One
35
- </Typography>
36
- <Typography as="h2" size="h2">
37
- Header Two
38
- </Typography>
39
- <Typography as="h3" size="h3">
40
- Header Three
41
- </Typography>
42
- <Typography as="h4" size="h4" gutterBottom>
43
- Header Four
44
- </Typography>
45
- <Typography as="p" gutterBottom>
46
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin egestas,
47
- lacus a dictum ullamcorper, sem nunc consequat nisl, ac convallis sapien
48
- odio quis nibh. Pellentesque orci diam, rutrum eget vehicula sit amet,
49
- vulputate molestie ipsum. Sed euismod neque massa, sed convallis magna
50
- vestibulum in. Vestibulum vel auctor ante, quis ornare leo. Curabitur leo
51
- lacus, auctor ut justo non, aliquet volutpat nunc. In interdum posuere
52
- sapien, et dictum sapien sagittis vitae. Aliquam vehicula elit quis felis
53
- pretium fermentum. Sed non quam in magna cursus laoreet eu eu purus.
54
- Curabitur vestibulum velit vel diam euismod bibendum.
55
- </Typography>
56
- <Typography as="p" noWrap gutterBottom bold>
57
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin egestas,
58
- lacus a dictum ullamcorper, sem nunc consequat nisl, ac convallis sapien
59
- odio quis nibh. Pellentesque orci diam, rutrum eget vehicula sit amet,
60
- vulputate molestie ipsum. Sed euismod neque massa, sed convallis magna
61
- vestibulum in. Vestibulum vel auctor ante, quis ornare leo. Curabitur leo
62
- lacus, auctor ut justo non, aliquet volutpat nunc. In interdum posuere
63
- sapien, et dictum sapien sagittis vitae. Aliquam vehicula elit quis felis
64
- pretium fermentum. Sed non quam in magna cursus laoreet eu eu purus.
65
- Curabitur vestibulum velit vel diam euismod bibendum.
66
- </Typography>
67
- <Typography as="p" noWrap size="small" gutterBottom>
68
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin egestas,
69
- lacus a dictum ullamcorper, sem nunc consequat nisl, ac convallis sapien
70
- odio quis nibh. Pellentesque orci diam, rutrum eget vehicula sit amet,
71
- vulputate molestie ipsum. Sed euismod neque massa, sed convallis magna
72
- vestibulum in. Vestibulum vel auctor ante, quis ornare leo. Curabitur leo
73
- lacus, auctor ut justo non, aliquet volutpat nunc. In interdum posuere
74
- sapien, et dictum sapien sagittis vitae. Aliquam vehicula elit quis felis
75
- pretium fermentum. Sed non quam in magna cursus laoreet eu eu purus.
76
- Curabitur vestibulum velit vel diam euismod bibendum.
77
- </Typography>
78
- <Typography bold as="span" size="h1" number>
79
- 1,000
80
- </Typography>
81
- <Typography as="span" size="h1" number>
82
- 1,000
83
- </Typography>
84
- <Typography as="span" size="h2" number>
85
- 1,000
86
- </Typography>
87
- </div>
88
- ```
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
-
3
- import { IconContainer, IconContainerPropTypes } from '../IconContainer';
4
-
5
- export const ActionsIcon = (props) => (
6
- <IconContainer {...props}>
7
- <svg
8
- width="38"
9
- height="37"
10
- viewBox="0 0 38 37"
11
- fill="none"
12
- xmlns="http://www.w3.org/2000/svg"
13
- >
14
- <path
15
- d="M18.4785 34.5281L19.1002 34.8363L19.722 34.5281C33.4973 27.9248 33.2682 7.29155 33.2467 5.36221C33.2462 5.31036 33.2457 5.27202 33.2457 5.24782V4.16907L19.1002 0.316406L5.11016 4.16907L5.11016 5.24782C5.11016 5.27597 5.10944 5.32339 5.10844 5.38907C5.07667 7.48129 4.76351 28.1032 18.4785 34.5281ZM18.9447 31.446C8.99623 26.0522 8.06356 10.7957 8.06356 6.48067L18.9447 3.39854L29.9813 6.48067C29.9813 10.7957 28.8932 26.0522 18.9447 31.446Z"
16
- className="fill"
17
- />
18
- </svg>
19
- </IconContainer>
20
- );
21
-
22
- ActionsIcon.propTypes = {
23
- ...IconContainerPropTypes,
24
- };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
-
3
- export const AddIcon = () => (
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
- <path fill="none" d="M0 0h24v24H0V0z"/>
6
- <path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z"/>
7
- </svg>
8
- );
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
-
3
- export const Arrow = ({
4
- titleTag = "Arrow",
5
- width = 30,
6
- fill = "#000",
7
- direction = "right"
8
- }) => {
9
- const degree = {
10
- left: 90,
11
- right: -90,
12
- up: -180,
13
- down: 0
14
- };
15
- const arrowDirection = `translate(379 210), rotate(${degree[direction]})`;
16
-
17
- return (
18
- <svg
19
- xmlns="http://www.w3.org/2000/svg"
20
- viewBox="-944 188 34 34"
21
- style={{
22
- width
23
- }}
24
- >
25
- {titleTag && <title>{titleTag}</title>}
26
- <g transform="translate(-1323 -22)">
27
- <g transform={arrowDirection} transform-origin="50% 50%">
28
- <path
29
- d="M2274.83-12244.371l-4.769-4.77a.5.5,0,0,1,0-.707.5.5,0,0,1,.354-.146.5.5,0,0,1,
30
- .354.146l4.268,4.268V-12260a.5.5,0,0,1,.5-.5.5.5,0,0,1,.5.5v14.419l4.268-4.268a.5.5,
31
- 0,0,1,.354-.146.5.5,0,0,1,.354.146.5.5,0,0,1,0,.707l-4.769,4.77-.182.182-.02.02-.506.5Z"
32
- fill={fill}
33
- transform="translate(-2258.536 12269)"
34
- />
35
- </g>
36
- </g>
37
- </svg>
38
- );
39
- };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
-
3
- export const ArrowDown = () => (
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
- <path fill="none" d="M0 0h24v24H0V0z"/>
6
- <path fill="#010101" d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"/>
7
- </svg>
8
- );
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
-
3
- export const ArrowIcon = ({
4
- width,
5
- height,
6
- fillColor,
7
- strokeColor,
8
- strokeWidth,
9
- ...restProps
10
- }) => (
11
- <svg
12
- {...restProps}
13
- width={width || 14}
14
- height={height || 9}
15
- xmlns="http://www.w3.org/2000/svg"
16
- >
17
- <path
18
- d="M12.414 5.189L9.0468 8.5555a.353.353 0 01-.499 0 .353.353 0 01-.1032-.2499.353.353 0 01.1031-.2499l3.0127-3.0127H1.3817a.353.353 0 110-.7058h10.1781L8.5471 1.3244a.353.353 0 01-.103-.25.353.353 0 01.103-.2498.353.353 0 01.499 0l3.3671 3.3663.1285.1285.0141.0141.353.3572-.4949.4984z"
19
- fill={fillColor || "#FFF"}
20
- stroke={strokeColor || "#333"}
21
- strokeWidth={strokeWidth || ".7059"}
22
- fillRule="evenodd"
23
- />
24
- </svg>
25
- );