@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.
- package/package.json +3 -2
- package/dist/package.json +0 -65
- package/rollup.config.js +0 -70
- package/src/components/Alert/Alert.jsx +0 -94
- package/src/components/Alert/index.ts +0 -1
- package/src/components/Alert/readme.md +0 -114
- package/src/components/Button/Button.jsx +0 -161
- package/src/components/Button/index.ts +0 -1
- package/src/components/Button/readme.md +0 -173
- package/src/components/Card/Card.jsx +0 -34
- package/src/components/Card/index.ts +0 -1
- package/src/components/Card/readme.md +0 -54
- package/src/components/CardHeader/CardHeader.jsx +0 -40
- package/src/components/CardHeader/index.ts +0 -1
- package/src/components/Checkbox/Checkbox.jsx +0 -123
- package/src/components/Checkbox/index.ts +0 -1
- package/src/components/Checkbox/readme.md +0 -54
- package/src/components/CheckboxTree/CheckboxTree.jsx +0 -167
- package/src/components/CheckboxTree/CheckboxTree.styles.ts +0 -49
- package/src/components/CheckboxTree/index.ts +0 -1
- package/src/components/CheckboxTree/readme.md +0 -60
- package/src/components/IconContainer/IconContainer.jsx +0 -51
- package/src/components/IconContainer/index.ts +0 -1
- package/src/components/Input/Input.jsx +0 -27
- package/src/components/Input/OutlineInput/OutlineInput.jsx +0 -188
- package/src/components/Input/RegularInput/RegularInput.jsx +0 -55
- package/src/components/Input/RegularInput/RegularInput.styles.ts +0 -98
- package/src/components/Input/index.ts +0 -1
- package/src/components/Input/readme.md +0 -82
- package/src/components/Pagination/Pagination.jsx +0 -111
- package/src/components/Pagination/index.ts +0 -1
- package/src/components/Pagination/readme.md +0 -34
- package/src/components/Radio/Radio.jsx +0 -121
- package/src/components/Radio/index.ts +0 -1
- package/src/components/Radio/readme.md +0 -90
- package/src/components/Select/Select.jsx +0 -360
- package/src/components/Select/SelectComponents.jsx +0 -342
- package/src/components/Select/index.ts +0 -1
- package/src/components/Select/readme.md +0 -2507
- package/src/components/Switch/Switch.jsx +0 -130
- package/src/components/Switch/index.ts +0 -1
- package/src/components/Switch/readme.md +0 -55
- package/src/components/Table/ExportCSVButton.jsx +0 -34
- package/src/components/Table/Table.jsx +0 -872
- package/src/components/Table/TableComponents.jsx +0 -239
- package/src/components/Table/TableFilters.jsx +0 -23
- package/src/components/Table/TableStyles.jsx +0 -514
- package/src/components/Table/index.ts +0 -1
- package/src/components/Table/readme.md +0 -2190
- package/src/components/Tabs/Tabs.jsx +0 -116
- package/src/components/Tabs/TabsComponents.jsx +0 -124
- package/src/components/Tabs/index.ts +0 -1
- package/src/components/Tabs/readme.md +0 -171
- package/src/components/Typography/Typography.jsx +0 -77
- package/src/components/Typography/index.ts +0 -1
- package/src/components/Typography/readme.md +0 -88
- package/src/components/icons/ActionsIcon.jsx +0 -24
- package/src/components/icons/AddIcon.jsx +0 -8
- package/src/components/icons/Arrow.jsx +0 -39
- package/src/components/icons/ArrowDown.jsx +0 -8
- package/src/components/icons/ArrowIcon.jsx +0 -25
- package/src/components/icons/ArrowUp.jsx +0 -8
- package/src/components/icons/BarchartHorizontal.jsx +0 -18
- package/src/components/icons/BellIcon.jsx +0 -19
- package/src/components/icons/BimiSetupIcon.jsx +0 -25
- package/src/components/icons/Chevron.jsx +0 -42
- package/src/components/icons/ChevronLeft.jsx +0 -8
- package/src/components/icons/ChevronRight.jsx +0 -8
- package/src/components/icons/ClearIcon.jsx +0 -8
- package/src/components/icons/Cloud.jsx +0 -34
- package/src/components/icons/Cross.jsx +0 -25
- package/src/components/icons/DeleteIcon.jsx +0 -19
- package/src/components/icons/DynamicDmarcIcon.jsx +0 -43
- package/src/components/icons/EditOutline.jsx +0 -8
- package/src/components/icons/Email.jsx +0 -68
- package/src/components/icons/EmailSourcesIcon.jsx +0 -36
- package/src/components/icons/ExpandLayoutIcon.jsx +0 -38
- package/src/components/icons/ExportIcon.jsx +0 -7
- package/src/components/icons/Eye.jsx +0 -28
- package/src/components/icons/Facebook.jsx +0 -31
- package/src/components/icons/FilterList.jsx +0 -8
- package/src/components/icons/FindOutHowIcon.jsx +0 -49
- package/src/components/icons/FlatArrow.jsx +0 -33
- package/src/components/icons/ForwardArrowIcon.jsx +0 -54
- package/src/components/icons/Github.jsx +0 -41
- package/src/components/icons/Globe.jsx +0 -29
- package/src/components/icons/Hand.jsx +0 -21
- package/src/components/icons/InfinityLoop.jsx +0 -22
- package/src/components/icons/InfinityLoopBreak.jsx +0 -35
- package/src/components/icons/IngrainIcon.jsx +0 -33
- package/src/components/icons/LanguageIcon.jsx +0 -44
- package/src/components/icons/Linkedin.jsx +0 -37
- package/src/components/icons/LocationPin.jsx +0 -34
- package/src/components/icons/MicrosoftShield.jsx +0 -44
- package/src/components/icons/News.jsx +0 -65
- package/src/components/icons/Nodes.jsx +0 -17
- package/src/components/icons/OnDmarcIcon.jsx +0 -29
- package/src/components/icons/OnDmarcLogo.jsx +0 -74
- package/src/components/icons/OnDomainIcon.jsx +0 -27
- package/src/components/icons/OnInboxIcon.jsx +0 -42
- package/src/components/icons/OnInboxLogo.jsx +0 -97
- package/src/components/icons/OnInboxManagerIcon.jsx +0 -46
- package/src/components/icons/OpenInNewTabIcon.jsx +0 -28
- package/src/components/icons/Padlock.jsx +0 -37
- package/src/components/icons/PlusIcon.jsx +0 -16
- package/src/components/icons/Question.jsx +0 -19
- package/src/components/icons/Recruiting.jsx +0 -34
- package/src/components/icons/ReportsIcon.jsx +0 -25
- package/src/components/icons/SearchIcon.jsx +0 -7
- package/src/components/icons/Shield.jsx +0 -17
- package/src/components/icons/ShieldPassIcon.jsx +0 -23
- package/src/components/icons/ShieldSolid.jsx +0 -33
- package/src/components/icons/ShieldWarningIcon.jsx +0 -40
- package/src/components/icons/ShieldWarningInvertedIcon.jsx +0 -36
- package/src/components/icons/Spinner.jsx +0 -100
- package/src/components/icons/Team.jsx +0 -164
- package/src/components/icons/ThreeDotsIcon.jsx +0 -18
- package/src/components/icons/Thumb.jsx +0 -17
- package/src/components/icons/Traffic.jsx +0 -22
- package/src/components/icons/Twitter.jsx +0 -47
- package/src/components/icons/Upload.jsx +0 -12
- package/src/components/icons/VerticalDots.jsx +0 -28
- package/src/components/icons/Warning.jsx +0 -36
- package/src/components/icons/WarningTriangle.jsx +0 -44
- package/src/components/icons/Youtube.jsx +0 -28
- package/src/components/icons/index.ts +0 -69
- package/src/hooks/useDebouncedValue.jsx +0 -19
- package/src/hooks/useFetch.jsx +0 -26
- package/src/hooks/useIsMobile.jsx +0 -25
- package/src/hooks/useOnClickOutside.jsx +0 -14
- package/src/hooks/useToggle.jsx +0 -8
- package/src/index.ts +0 -23
- package/tsconfig.json +0 -3
- /package/{dist/CONTRIBUTING.md → CONTRIBUTING.md} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/index.js.map → index.js.map} +0 -0
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { Typography } from '../Typography';
|
|
4
|
-
|
|
5
|
-
const SwitchContainer = styled.div`
|
|
6
|
-
position: relative;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
width: 32px;
|
|
9
|
-
height: 14px;
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
const SwitchInput = styled.input`
|
|
13
|
-
display: none;
|
|
14
|
-
&:checked + span {
|
|
15
|
-
background-color: ${props =>
|
|
16
|
-
props.disabled
|
|
17
|
-
? "rgba(0, 0, 0, 0.12)"
|
|
18
|
-
: props.color
|
|
19
|
-
? props.color
|
|
20
|
-
: "#ccc"};
|
|
21
|
-
border-color: ${props =>
|
|
22
|
-
props.disabled
|
|
23
|
-
? "rgba(0, 0, 0, 0.12)"
|
|
24
|
-
: props.color
|
|
25
|
-
? props.color
|
|
26
|
-
: "#ccc"};
|
|
27
|
-
}
|
|
28
|
-
&:checked + span:before {
|
|
29
|
-
border-color: ${props =>
|
|
30
|
-
props.disabled
|
|
31
|
-
? "rgba(0, 0, 0, 0.12)"
|
|
32
|
-
: props.color
|
|
33
|
-
? props.color
|
|
34
|
-
: "#ccc"};
|
|
35
|
-
background-color: ${props => (props.disabled ? "#ccc" : "#fff")};
|
|
36
|
-
-webkit-transform: translateX(15px);
|
|
37
|
-
-ms-transform: translateX(15px);
|
|
38
|
-
transform: translateX(15px);
|
|
39
|
-
transition: all 0.3s ease;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
const SwitchSlider = styled.span`
|
|
44
|
-
border-radius: 14px;
|
|
45
|
-
position: absolute;
|
|
46
|
-
cursor: ${props => (props.disabled ? "default" : "pointer")};
|
|
47
|
-
top: 0;
|
|
48
|
-
left: 0;
|
|
49
|
-
right: 0;
|
|
50
|
-
bottom: 0;
|
|
51
|
-
border: 1px solid;
|
|
52
|
-
background-color: ${props =>
|
|
53
|
-
props.disabled ? "rgba(0, 0, 0, 0.12)" : "#ccc"};
|
|
54
|
-
border-color: ${props => (props.disabled ? "rgba(0, 0, 0, 0.12)" : "#ccc")};
|
|
55
|
-
-webkit-transition: 0.4s;
|
|
56
|
-
transition: 0.4s;
|
|
57
|
-
&:before {
|
|
58
|
-
position: absolute;
|
|
59
|
-
content: "";
|
|
60
|
-
height: 20px;
|
|
61
|
-
width: 20px;
|
|
62
|
-
left: -3px;
|
|
63
|
-
bottom: -4px;
|
|
64
|
-
border: 1px solid;
|
|
65
|
-
background-color: ${props => (props.disabled ? "#ccc" : "#fff")};
|
|
66
|
-
border-color: ${props => (props.disabled ? "rgba(0, 0, 0, 0.12)" : "#ccc")};
|
|
67
|
-
-webkit-transition: 0.4s;
|
|
68
|
-
transition: 0.4s;
|
|
69
|
-
border-radius: 50%;
|
|
70
|
-
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
|
|
71
|
-
0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
|
72
|
-
}
|
|
73
|
-
`;
|
|
74
|
-
|
|
75
|
-
const SwitchLabel = styled(Typography)`
|
|
76
|
-
margin-left: ${props => (props.labelPosition === "right" ? "15px" : "0px")};
|
|
77
|
-
margin-right: ${props => (props.labelPosition === "left" ? "15px" : "0px")};
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
const Wrapper = styled.label`
|
|
81
|
-
display: flex;
|
|
82
|
-
align-items: center;
|
|
83
|
-
margin-left: 5px;
|
|
84
|
-
cursor: ${props => (props.disabled ? "default" : "pointer")};
|
|
85
|
-
`;
|
|
86
|
-
|
|
87
|
-
export const Switch = ({
|
|
88
|
-
label,
|
|
89
|
-
checked,
|
|
90
|
-
defaultChecked,
|
|
91
|
-
disabled,
|
|
92
|
-
id,
|
|
93
|
-
onChange,
|
|
94
|
-
inputProps,
|
|
95
|
-
labelProps,
|
|
96
|
-
sliderProps,
|
|
97
|
-
labelPosition = "right",
|
|
98
|
-
color,
|
|
99
|
-
...rest
|
|
100
|
-
}) => {
|
|
101
|
-
return (
|
|
102
|
-
<Wrapper {...rest} disabled={disabled} htmlFor={id}>
|
|
103
|
-
{labelPosition === "left" && (
|
|
104
|
-
<SwitchLabel labelPosition={labelPosition} {...labelProps}>
|
|
105
|
-
{label}
|
|
106
|
-
</SwitchLabel>
|
|
107
|
-
)}
|
|
108
|
-
<SwitchContainer>
|
|
109
|
-
<SwitchInput
|
|
110
|
-
id={id}
|
|
111
|
-
role="switch"
|
|
112
|
-
aria-checked={checked}
|
|
113
|
-
type="checkbox"
|
|
114
|
-
checked={checked}
|
|
115
|
-
defaultChecked={defaultChecked}
|
|
116
|
-
onChange={onChange}
|
|
117
|
-
{...inputProps}
|
|
118
|
-
color={color}
|
|
119
|
-
disabled={disabled}
|
|
120
|
-
/>
|
|
121
|
-
<SwitchSlider color={color} disabled={disabled} {...sliderProps} />
|
|
122
|
-
</SwitchContainer>
|
|
123
|
-
{labelPosition === "right" && (
|
|
124
|
-
<SwitchLabel labelPosition={labelPosition} {...labelProps}>
|
|
125
|
-
{label}
|
|
126
|
-
</SwitchLabel>
|
|
127
|
-
)}
|
|
128
|
-
</Wrapper>
|
|
129
|
-
);
|
|
130
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Switch';
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
### Accessibility
|
|
2
|
-
|
|
3
|
-
- Ensure both the label and id props are completed
|
|
4
|
-
|
|
5
|
-
### Props
|
|
6
|
-
|
|
7
|
-
| Prop | Default | Options |
|
|
8
|
-
| :------------: | :-----: | --------------------------: |
|
|
9
|
-
| color | #ccc | Color |
|
|
10
|
-
| label | | string **Required** |
|
|
11
|
-
| id | | string **Required** |
|
|
12
|
-
| checked | false | Boolean |
|
|
13
|
-
| defaultChecked | false | Boolean |
|
|
14
|
-
| disabled | false | Boolean |
|
|
15
|
-
| onChange | | Function |
|
|
16
|
-
| inputProps | | Props passed to the input |
|
|
17
|
-
| labelPosition | 'right' | 'right', 'left' |
|
|
18
|
-
| labelProps | | Props passed to the label |
|
|
19
|
-
| sliderProps | | Props passed to the slider |
|
|
20
|
-
| ...rest | | Props passed to the Wrapper |
|
|
21
|
-
|
|
22
|
-
### Examples
|
|
23
|
-
|
|
24
|
-
```js
|
|
25
|
-
<div
|
|
26
|
-
style={{
|
|
27
|
-
display: "flex",
|
|
28
|
-
flexWrap: "wrap",
|
|
29
|
-
flexDirection: "row",
|
|
30
|
-
alignItems: "center",
|
|
31
|
-
justifyContent: "space-evenly"
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
<Switch label="Default" id="one" />
|
|
35
|
-
<Switch label="OnDMARC" defaultChecked id="ondmarc1" color="#02ac61" />
|
|
36
|
-
<Switch label="OnINBOX" defaultChecked id="oninbox1" color="#33b222" />
|
|
37
|
-
<Switch label="InGRAIN" defaultChecked id="ingrain1" color="#53C3EB" />
|
|
38
|
-
<Switch disabled label="Disabled" id="disabled1" />
|
|
39
|
-
<Switch disabled label="Disabled" defaultChecked id="disabled2" />
|
|
40
|
-
</div>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
```js
|
|
44
|
-
<div
|
|
45
|
-
style={{
|
|
46
|
-
display: "flex",
|
|
47
|
-
flexWrap: "wrap",
|
|
48
|
-
flexDirection: "row",
|
|
49
|
-
alignItems: "center",
|
|
50
|
-
justifyContent: "space-evenly"
|
|
51
|
-
}}
|
|
52
|
-
>
|
|
53
|
-
<Switch label="Default Left" labelPosition="left" id="left" />
|
|
54
|
-
</div>
|
|
55
|
-
```
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CSVLink } from "react-csv";
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
import { ExportIcon } from '../icons';
|
|
6
|
-
import { ActionIcon } from "./TableStyles";
|
|
7
|
-
|
|
8
|
-
const StyledCSVLink = styled(CSVLink)`
|
|
9
|
-
&,
|
|
10
|
-
&:hover {
|
|
11
|
-
text-decoration: none;
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
export const ExportCSVButton = ({
|
|
16
|
-
locale,
|
|
17
|
-
data,
|
|
18
|
-
filename,
|
|
19
|
-
headers,
|
|
20
|
-
hoverColor,
|
|
21
|
-
activeColor,
|
|
22
|
-
...rest
|
|
23
|
-
}) => {
|
|
24
|
-
return (
|
|
25
|
-
<StyledCSVLink data={data} filename={filename} headers={headers} {...rest}>
|
|
26
|
-
<ActionIcon
|
|
27
|
-
label={locale("export", "Export")}
|
|
28
|
-
icon={() => <ExportIcon width={18} />}
|
|
29
|
-
hoverColor={hoverColor}
|
|
30
|
-
activeColor={activeColor}
|
|
31
|
-
/>
|
|
32
|
-
</StyledCSVLink>
|
|
33
|
-
);
|
|
34
|
-
};
|