@capillarytech/blaze-ui 0.3.3 → 1.0.1
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 +168 -65
- package/dist/CapAlert/CapAlert.d.ts +12 -0
- package/dist/CapAlert/CapAlert.d.ts.map +1 -0
- package/dist/CapAlert/CapAlert.test.d.ts +2 -0
- package/dist/CapAlert/CapAlert.test.d.ts.map +1 -0
- package/dist/CapAlert/index.d.ts +3 -0
- package/dist/CapAlert/index.d.ts.map +1 -0
- package/dist/CapAlert/index.js +696 -0
- package/dist/CapAlert/index.js.map +1 -0
- package/dist/CapButton/CapButton.d.ts +11 -0
- package/dist/CapButton/CapButton.d.ts.map +1 -0
- package/dist/CapButton/CapButton.test.d.ts +2 -0
- package/dist/CapButton/CapButton.test.d.ts.map +1 -0
- package/dist/CapButton/index.d.ts +3 -0
- package/dist/CapButton/index.d.ts.map +1 -0
- package/dist/CapButton/index.js +998 -0
- package/dist/CapButton/index.js.map +1 -0
- package/dist/CapCard/CapCard.d.ts +9 -0
- package/dist/CapCard/CapCard.d.ts.map +1 -0
- package/dist/CapCard/CapCard.test.d.ts +2 -0
- package/dist/CapCard/CapCard.test.d.ts.map +1 -0
- package/dist/CapCard/index.d.ts +3 -0
- package/dist/CapCard/index.d.ts.map +1 -0
- package/dist/CapCard/index.js +697 -0
- package/dist/CapCard/index.js.map +1 -0
- package/dist/CapCheckbox/CapCheckbox.d.ts +17 -0
- package/dist/CapCheckbox/CapCheckbox.d.ts.map +1 -0
- package/dist/CapCheckbox/CapCheckbox.test.d.ts +2 -0
- package/dist/CapCheckbox/CapCheckbox.test.d.ts.map +1 -0
- package/dist/CapCheckbox/index.d.ts +3 -0
- package/dist/CapCheckbox/index.d.ts.map +1 -0
- package/dist/CapCheckbox/index.js +917 -0
- package/dist/CapCheckbox/index.js.map +1 -0
- package/dist/CapColumn/CapColumn.d.ts +9 -0
- package/dist/CapColumn/CapColumn.d.ts.map +1 -0
- package/dist/CapColumn/CapColumn.test.d.ts +2 -0
- package/dist/CapColumn/CapColumn.test.d.ts.map +1 -0
- package/dist/CapColumn/index.d.ts +3 -0
- package/dist/CapColumn/index.d.ts.map +1 -0
- package/dist/CapColumn/index.js +694 -0
- package/dist/CapColumn/index.js.map +1 -0
- package/dist/CapDivider/CapDivider.d.ts +9 -0
- package/dist/CapDivider/CapDivider.d.ts.map +1 -0
- package/dist/CapDivider/CapDivider.test.d.ts +2 -0
- package/dist/CapDivider/CapDivider.test.d.ts.map +1 -0
- package/dist/CapDivider/index.d.ts +3 -0
- package/dist/CapDivider/index.d.ts.map +1 -0
- package/dist/CapDivider/index.js +696 -0
- package/dist/CapDivider/index.js.map +1 -0
- package/dist/CapDropdown/CapDropdown.d.ts +20 -0
- package/dist/CapDropdown/CapDropdown.d.ts.map +1 -0
- package/dist/CapDropdown/CapDropdown.test.d.ts +2 -0
- package/dist/CapDropdown/CapDropdown.test.d.ts.map +1 -0
- package/dist/CapDropdown/index.d.ts +3 -0
- package/dist/CapDropdown/index.d.ts.map +1 -0
- package/dist/CapDropdown/index.js +715 -0
- package/dist/CapDropdown/index.js.map +1 -0
- package/dist/CapForm/CapForm.d.ts +10 -0
- package/dist/CapForm/CapForm.d.ts.map +1 -0
- package/dist/CapForm/CapForm.test.d.ts +2 -0
- package/dist/CapForm/CapForm.test.d.ts.map +1 -0
- package/dist/CapForm/index.d.ts +3 -0
- package/dist/CapForm/index.d.ts.map +1 -0
- package/dist/CapForm/index.js +696 -0
- package/dist/CapForm/index.js.map +1 -0
- package/dist/CapFormItem/CapFormItem.d.ts +13 -0
- package/dist/CapFormItem/CapFormItem.d.ts.map +1 -0
- package/dist/CapFormItem/CapFormItem.test.d.ts +2 -0
- package/dist/CapFormItem/CapFormItem.test.d.ts.map +1 -0
- package/dist/CapFormItem/index.d.ts +3 -0
- package/dist/CapFormItem/index.d.ts.map +1 -0
- package/dist/CapFormItem/index.js +697 -0
- package/dist/CapFormItem/index.js.map +1 -0
- package/dist/CapIcon/CapIcon.d.ts +31 -0
- package/dist/CapIcon/CapIcon.d.ts.map +1 -0
- package/dist/CapIcon/CapIcon.test.d.ts +2 -0
- package/dist/CapIcon/CapIcon.test.d.ts.map +1 -0
- package/dist/CapIcon/index.d.ts +3 -0
- package/dist/CapIcon/index.d.ts.map +1 -0
- package/dist/CapIcon/index.js +853 -0
- package/dist/CapIcon/index.js.map +1 -0
- package/dist/CapInput/CapInput.d.ts +11 -0
- package/dist/CapInput/CapInput.d.ts.map +1 -0
- package/dist/CapInput/CapInput.test.d.ts +2 -0
- package/dist/CapInput/CapInput.test.d.ts.map +1 -0
- package/dist/CapInput/Number.d.ts +9 -0
- package/dist/CapInput/Number.d.ts.map +1 -0
- package/dist/CapInput/Number.test.d.ts +2 -0
- package/dist/CapInput/Number.test.d.ts.map +1 -0
- package/dist/CapInput/Search.d.ts +9 -0
- package/dist/CapInput/Search.d.ts.map +1 -0
- package/dist/CapInput/Search.test.d.ts +2 -0
- package/dist/CapInput/Search.test.d.ts.map +1 -0
- package/dist/CapInput/TextArea.d.ts +9 -0
- package/dist/CapInput/TextArea.d.ts.map +1 -0
- package/dist/CapInput/TextArea.test.d.ts +2 -0
- package/dist/CapInput/TextArea.test.d.ts.map +1 -0
- package/dist/CapInput/index.d.ts +9 -0
- package/dist/CapInput/index.d.ts.map +1 -0
- package/dist/CapInput/index.js +744 -0
- package/dist/CapInput/index.js.map +1 -0
- package/dist/CapLabel/CapLabel.d.ts +23 -0
- package/dist/CapLabel/CapLabel.d.ts.map +1 -0
- package/dist/CapLabel/CapLabel.test.d.ts +2 -0
- package/dist/CapLabel/CapLabel.test.d.ts.map +1 -0
- package/dist/CapLabel/index.d.ts +3 -0
- package/dist/CapLabel/index.d.ts.map +1 -0
- package/dist/CapLabel/index.js +760 -0
- package/dist/CapLabel/index.js.map +1 -0
- package/dist/CapMenu/CapMenu.d.ts +27 -0
- package/dist/CapMenu/CapMenu.d.ts.map +1 -0
- package/dist/CapMenu/CapMenu.test.d.ts +2 -0
- package/dist/CapMenu/CapMenu.test.d.ts.map +1 -0
- package/dist/CapMenu/index.d.ts +3 -0
- package/dist/CapMenu/index.d.ts.map +1 -0
- package/dist/CapMenu/index.js +716 -0
- package/dist/CapMenu/index.js.map +1 -0
- package/dist/CapRadio/CapRadio.d.ts +18 -0
- package/dist/CapRadio/CapRadio.d.ts.map +1 -0
- package/dist/CapRadio/CapRadio.test.d.ts +2 -0
- package/dist/CapRadio/CapRadio.test.d.ts.map +1 -0
- package/dist/CapRadio/index.d.ts +3 -0
- package/dist/CapRadio/index.d.ts.map +1 -0
- package/dist/CapRadio/index.js +918 -0
- package/dist/CapRadio/index.js.map +1 -0
- package/dist/CapRow/CapRow.d.ts +27 -0
- package/dist/CapRow/CapRow.d.ts.map +1 -0
- package/dist/CapRow/CapRow.test.d.ts +2 -0
- package/dist/CapRow/CapRow.test.d.ts.map +1 -0
- package/dist/CapRow/index.d.ts +3 -0
- package/dist/CapRow/index.d.ts.map +1 -0
- package/dist/CapRow/index.js +751 -0
- package/dist/CapRow/index.js.map +1 -0
- package/dist/CapSkeleton/CapSkeleton.d.ts +8 -0
- package/dist/CapSkeleton/CapSkeleton.d.ts.map +1 -0
- package/dist/CapSkeleton/CapSkeleton.test.d.ts +2 -0
- package/dist/CapSkeleton/CapSkeleton.test.d.ts.map +1 -0
- package/dist/CapSkeleton/index.d.ts +3 -0
- package/dist/CapSkeleton/index.d.ts.map +1 -0
- package/dist/CapSkeleton/index.js +124 -0
- package/dist/CapSkeleton/index.js.map +1 -0
- package/dist/CapSpin/CapSpin.d.ts +8 -0
- package/dist/CapSpin/CapSpin.d.ts.map +1 -0
- package/dist/CapSpin/CapSpin.test.d.ts +2 -0
- package/dist/CapSpin/CapSpin.test.d.ts.map +1 -0
- package/dist/CapSpin/index.d.ts +3 -0
- package/dist/CapSpin/index.d.ts.map +1 -0
- package/dist/CapSpin/index.js +123 -0
- package/dist/CapSpin/index.js.map +1 -0
- package/dist/CapSwitch/CapSwitch.d.ts +12 -0
- package/dist/CapSwitch/CapSwitch.d.ts.map +1 -0
- package/dist/CapSwitch/CapSwitch.test.d.ts +2 -0
- package/dist/CapSwitch/CapSwitch.test.d.ts.map +1 -0
- package/dist/CapSwitch/index.d.ts +3 -0
- package/dist/CapSwitch/index.d.ts.map +1 -0
- package/dist/CapSwitch/index.js +700 -0
- package/dist/CapSwitch/index.js.map +1 -0
- package/dist/CapTab/CapTab.d.ts +21 -0
- package/dist/CapTab/CapTab.d.ts.map +1 -0
- package/dist/CapTab/CapTab.test.d.ts +2 -0
- package/dist/CapTab/CapTab.test.d.ts.map +1 -0
- package/dist/CapTab/index.d.ts +3 -0
- package/dist/CapTab/index.d.ts.map +1 -0
- package/dist/CapTab/index.js +729 -0
- package/dist/CapTab/index.js.map +1 -0
- package/dist/CapTable/CapTable.d.ts +27 -0
- package/dist/CapTable/CapTable.d.ts.map +1 -0
- package/dist/CapTable/CapTable.test.d.ts +2 -0
- package/dist/CapTable/CapTable.test.d.ts.map +1 -0
- package/dist/CapTable/index.d.ts +3 -0
- package/dist/CapTable/index.d.ts.map +1 -0
- package/dist/CapTable/index.js +18315 -0
- package/dist/CapTable/index.js.map +1 -0
- package/dist/CapTable/loadable.d.ts +5 -0
- package/dist/CapTable/loadable.d.ts.map +1 -0
- package/dist/CapTable/loadable.test.d.ts +2 -0
- package/dist/CapTable/loadable.test.d.ts.map +1 -0
- package/dist/CapTestSelect/CapTestSelect.d.ts +24 -0
- package/dist/CapTestSelect/CapTestSelect.d.ts.map +1 -0
- package/dist/CapTestSelect/CapTestSelect.test.d.ts +2 -0
- package/dist/CapTestSelect/CapTestSelect.test.d.ts.map +1 -0
- package/dist/CapTestSelect/index.d.ts +3 -0
- package/dist/CapTestSelect/index.d.ts.map +1 -0
- package/dist/CapTestSelect/index.js +130 -0
- package/dist/CapTestSelect/index.js.map +1 -0
- package/dist/CapTooltip/CapTooltip.d.ts +10 -0
- package/dist/CapTooltip/CapTooltip.d.ts.map +1 -0
- package/dist/CapTooltip/CapTooltip.test.d.ts +2 -0
- package/dist/CapTooltip/CapTooltip.test.d.ts.map +1 -0
- package/dist/CapTooltip/index.d.ts +3 -0
- package/dist/CapTooltip/index.d.ts.map +1 -0
- package/dist/CapTooltip/index.js +730 -0
- package/dist/CapTooltip/index.js.map +1 -0
- package/dist/CapTooltipWithInfo/CapTooltipWithInfo.d.ts +18 -0
- package/dist/CapTooltipWithInfo/CapTooltipWithInfo.d.ts.map +1 -0
- package/dist/CapTooltipWithInfo/CapTooltipWithInfo.test.d.ts +2 -0
- package/dist/CapTooltipWithInfo/CapTooltipWithInfo.test.d.ts.map +1 -0
- package/dist/CapTooltipWithInfo/index.d.ts +3 -0
- package/dist/CapTooltipWithInfo/index.d.ts.map +1 -0
- package/dist/CapTooltipWithInfo/index.js +1156 -0
- package/dist/CapTooltipWithInfo/index.js.map +1 -0
- package/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts +52 -0
- package/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/CapUnifiedSelect.test.d.ts +2 -0
- package/dist/CapUnifiedSelect/CapUnifiedSelect.test.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/index.d.ts +3 -0
- package/dist/CapUnifiedSelect/index.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/index.js +2092 -0
- package/dist/CapUnifiedSelect/index.js.map +1 -0
- package/dist/CapUnifiedSelect/messages.d.ts +24 -0
- package/dist/CapUnifiedSelect/messages.d.ts.map +1 -0
- package/dist/LocaleHoc/index.d.ts +9 -0
- package/dist/LocaleHoc/index.d.ts.map +1 -0
- package/{translations/en.js → dist/LocaleHoc/index.js} +169 -35
- package/dist/LocaleHoc/index.js.map +1 -0
- package/dist/LocaleHoc/index.test.d.ts +2 -0
- package/dist/LocaleHoc/index.test.d.ts.map +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23022 -0
- package/dist/index.js.map +1 -0
- package/dist/styled/variables.d.ts +150 -0
- package/dist/styled/variables.d.ts.map +1 -0
- package/dist/styled/variables.scss +194 -0
- package/dist/utils/fonts.d.ts +49 -0
- package/dist/utils/fonts.d.ts.map +1 -0
- package/dist/utils/fonts.test.d.ts +2 -0
- package/dist/utils/fonts.test.d.ts.map +1 -0
- package/dist/utils/index.d.ts +44 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +1147 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/styles.d.ts +19 -0
- package/dist/utils/styles.d.ts.map +1 -0
- package/package.json +263 -20
- package/CapIcon/CapIcon.js +0 -183
- package/CapIcon/index.js +0 -3
- package/CapIcon/styles.js +0 -76
- package/CapInput/CapInput.js +0 -67
- package/CapInput/Number.js +0 -38
- package/CapInput/Search.js +0 -32
- package/CapInput/TextArea.js +0 -45
- package/CapInput/index.js +0 -10
- package/CapInput/messages.js +0 -27
- package/CapInput/styles.js +0 -81
- package/CapLabel/CapLabel.js +0 -83
- package/CapLabel/index.js +0 -3
- package/CapLabel/styles.js +0 -259
- package/CapRow/CapRow.js +0 -123
- package/CapRow/index.js +0 -3
- package/CapRow/styles.js +0 -50
- package/CapSkeleton/CapSkeleton.js +0 -17
- package/CapSkeleton/index.js +0 -1
- package/CapSpin/CapSpin.js +0 -23
- package/CapSpin/index.js +0 -1
- package/CapTable/CapTable.js +0 -146
- package/CapTable/index.js +0 -3
- package/CapTable/loadable.js +0 -13
- package/CapTable/styles.js +0 -134
- package/CapTestSelect/CapTestSelect.js +0 -47
- package/CapTestSelect/index.js +0 -1
- package/CapTooltip/CapTooltip.js +0 -98
- package/CapTooltip/index.js +0 -3
- package/CapTooltip/styles.js +0 -34
- package/CapTooltipWithInfo/CapTooltipWithInfo.js +0 -74
- package/CapTooltipWithInfo/index.js +0 -3
- package/CapTooltipWithInfo/styles.js +0 -22
- package/CapUnifiedSelect/CapUnifiedSelect.js +0 -541
- package/CapUnifiedSelect/index.js +0 -1
- package/CapUnifiedSelect/messages.js +0 -24
- package/CapUnifiedSelect/styles.js +0 -441
- package/LocaleHoc/index.js +0 -38
- package/index.js +0 -21
- package/styled/index.js +0 -6
- package/styled/variables.js +0 -91
- package/utils/index.js +0 -1
- package/utils/withMemo.js +0 -33
- package/utils/withStyles.js +0 -24
- /package/{assets → dist/assets}/upload.svg +0 -0
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import * as styledVars from '../styled/variables';
|
|
3
|
-
|
|
4
|
-
export const HeaderWrapper = styled.div`
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
|
|
8
|
-
&.disabled {
|
|
9
|
-
opacity: 0.5;
|
|
10
|
-
cursor: not-allowed;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
export const selectStyles = css`
|
|
15
|
-
&.cap-unified-select-container {
|
|
16
|
-
text-align: justify;
|
|
17
|
-
&.disabled {
|
|
18
|
-
cursor: not-allowed;
|
|
19
|
-
}
|
|
20
|
-
.cap-unified-select-more-text {
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
color: ${styledVars.CAP_G01};
|
|
23
|
-
margin-right: ${styledVars.SPACING_04};
|
|
24
|
-
position: relative;
|
|
25
|
-
}
|
|
26
|
-
.cap-unified-select-suffix-icon {
|
|
27
|
-
color: ${styledVars.CAP_G01};
|
|
28
|
-
}
|
|
29
|
-
.ant-select-outlined {
|
|
30
|
-
&:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) {
|
|
31
|
-
&:hover {
|
|
32
|
-
.ant-select-selector {
|
|
33
|
-
border-color: ${styledVars.CAP_G11};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.cap-unified-tree-select-readonly.ant-select-outlined {
|
|
40
|
-
&:hover .ant-select-selector,
|
|
41
|
-
&:active .ant-select-selector,
|
|
42
|
-
&:focus .ant-select-selector {
|
|
43
|
-
border-color: ${styledVars.CAP_G08} !important;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
.ant-select-selector .ant-select-selection-placeholder{
|
|
47
|
-
pointer-events: unset;
|
|
48
|
-
}
|
|
49
|
-
.ant-select-prefix {
|
|
50
|
-
font-size: 1rem;
|
|
51
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
52
|
-
color: ${styledVars.CAP_G01};
|
|
53
|
-
line-height: 1.429rem;
|
|
54
|
-
}
|
|
55
|
-
.cap-unified-select-header-label {
|
|
56
|
-
font-family: ${styledVars.FONT_FAMILY};
|
|
57
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
58
|
-
font-size: 1rem;
|
|
59
|
-
line-height: 1.429rem;
|
|
60
|
-
letter-spacing: 0;
|
|
61
|
-
}
|
|
62
|
-
.cap-unified-select-header-byline-text {
|
|
63
|
-
font-family: ${styledVars.FONT_FAMILY};
|
|
64
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
65
|
-
font-size: 0.857rem;
|
|
66
|
-
letter-spacing: 0;
|
|
67
|
-
color: ${styledVars.CAP_G05};
|
|
68
|
-
}
|
|
69
|
-
.ant-input-affix-wrapper .ant-input-prefix {
|
|
70
|
-
left: ${styledVars.SPACING_12};
|
|
71
|
-
}
|
|
72
|
-
.cap-tooltip-with-info-icon {
|
|
73
|
-
margin-top: 0.143rem;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.cap-unified-tree-select {
|
|
77
|
-
min-width: 14.286rem;
|
|
78
|
-
|
|
79
|
-
&.cap-unified-tree-select-readonly {
|
|
80
|
-
pointer-events: none;
|
|
81
|
-
.ant-select-selector {
|
|
82
|
-
background-color: ${styledVars.CAP_WHITE};
|
|
83
|
-
border-color: ${styledVars.CAP_G08} !important;
|
|
84
|
-
cursor: default;
|
|
85
|
-
}
|
|
86
|
-
.ant-select-arrow {
|
|
87
|
-
pointer-events: auto;
|
|
88
|
-
color: ${styledVars.CAP_G06};
|
|
89
|
-
}
|
|
90
|
-
&:hover .ant-select-selector {
|
|
91
|
-
border-color: ${styledVars.CAP_G08} !important;
|
|
92
|
-
}
|
|
93
|
-
.cap-unified-select-more-text {
|
|
94
|
-
pointer-events: auto;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
|
|
100
|
-
.ant-select-selector {
|
|
101
|
-
border-color: ${styledVars.CAP_G11} !important;
|
|
102
|
-
box-shadow: none;
|
|
103
|
-
outline: 0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
|
|
107
|
-
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
108
|
-
}
|
|
109
|
-
.ant-select-dropdown {
|
|
110
|
-
margin-top: -0.571rem !important;
|
|
111
|
-
border-radius: ${styledVars.RADIUS_04};
|
|
112
|
-
box-shadow:
|
|
113
|
-
0 0.286rem 0.571rem -0.143rem ${styledVars.CAP_G01},
|
|
114
|
-
0 0 0.071rem 0 ${styledVars.CAP_G01};
|
|
115
|
-
max-height: 25.714rem;
|
|
116
|
-
overflow: visible;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.ant-select-selection-item {
|
|
120
|
-
background: transparent;
|
|
121
|
-
}
|
|
122
|
-
.ant-select-multiple .ant-select-selection-wrap {
|
|
123
|
-
align-self: center;
|
|
124
|
-
}
|
|
125
|
-
.cap-unified-tree-select .ant-select-selector:focus {
|
|
126
|
-
border: 0.071rem solid ${styledVars.CAP_G11};
|
|
127
|
-
}
|
|
128
|
-
.cap-unified-tree-select .ant-select-tree-treenode {
|
|
129
|
-
padding-left: ${styledVars.SPACING_04};
|
|
130
|
-
}
|
|
131
|
-
.cap-unified-select-status {
|
|
132
|
-
color: ${styledVars.CAP_RED};
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* Common styles for all types */
|
|
137
|
-
&.custom-popup-container {
|
|
138
|
-
width: max-content;
|
|
139
|
-
|
|
140
|
-
.ant-select-tree {
|
|
141
|
-
.ant-select-tree-node-content-wrapper {
|
|
142
|
-
background-color: transparent;
|
|
143
|
-
height: 100%;
|
|
144
|
-
.cap-unified-select-option-with-suffix{
|
|
145
|
-
display: flex;
|
|
146
|
-
justify-content: flex-start;
|
|
147
|
-
align-items: center;
|
|
148
|
-
width: 100%;
|
|
149
|
-
height: 100%;
|
|
150
|
-
.cap-unified-select-option-label{
|
|
151
|
-
flex: 1;
|
|
152
|
-
}
|
|
153
|
-
.cap-unified-select-option-suffix{
|
|
154
|
-
display: flex;
|
|
155
|
-
align-items: center;
|
|
156
|
-
padding: 0 ${styledVars.SPACING_08};
|
|
157
|
-
max-height: 1.429rem;
|
|
158
|
-
white-space: nowrap;
|
|
159
|
-
margin-left: ${styledVars.SPACING_08};
|
|
160
|
-
}
|
|
161
|
-
.cap-tooltip-with-info-icon{
|
|
162
|
-
margin-top: 0.357rem;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
.ant-select-tree-node-content-wrapper:hover {
|
|
167
|
-
background-color: transparent;
|
|
168
|
-
}
|
|
169
|
-
.ant-select-tree-treenode {
|
|
170
|
-
height: 2.857rem;
|
|
171
|
-
margin-bottom: 0;
|
|
172
|
-
.ant-select-tree-checkbox .ant-select-tree-checkbox-inner {
|
|
173
|
-
height: 1.286rem;
|
|
174
|
-
width: 1.286rem;
|
|
175
|
-
border: 0.143rem solid ${styledVars.CAP_G06};
|
|
176
|
-
border-radius: ${styledVars.RADIUS_04};
|
|
177
|
-
}
|
|
178
|
-
&:hover {
|
|
179
|
-
background-color: #fffbe6;
|
|
180
|
-
}
|
|
181
|
-
&:not(.ant-select-tree-treenode-disabled)
|
|
182
|
-
.ant-select-tree-node-content-wrapper:hover {
|
|
183
|
-
background-color: none;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
.ant-select-tree-treenode-disabled{
|
|
187
|
-
.cap-unified-select-option-label{
|
|
188
|
-
color: ${styledVars.CAP_G06};
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
.ant-select-tree-node-content-wrapper {
|
|
192
|
-
border-radius: 0;
|
|
193
|
-
padding-left: 0.214rem;
|
|
194
|
-
}
|
|
195
|
-
.ant-select-tree-indent {
|
|
196
|
-
margin-left: ${styledVars.SPACING_12};
|
|
197
|
-
}
|
|
198
|
-
.ant-select-tree-switcher:not(
|
|
199
|
-
.ant-select-tree-switcher-noop
|
|
200
|
-
):hover:before {
|
|
201
|
-
background-color: transparent;
|
|
202
|
-
}
|
|
203
|
-
.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner {
|
|
204
|
-
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
205
|
-
border: 0.143rem solid ${styledVars.CAP_PRIMARY.base} !important;
|
|
206
|
-
&:hover {
|
|
207
|
-
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
208
|
-
border: 0.143rem solid ${styledVars.CAP_PRIMARY.base} !important;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
.ant-select-tree-switcher .ant-select-tree-switcher-icon {
|
|
212
|
-
font-size: 0.857rem;
|
|
213
|
-
margin-top: 1.286rem;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
217
|
-
.ant-select-tree-checkbox-inner {
|
|
218
|
-
background-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
219
|
-
border-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
223
|
-
.ant-select-tree-checkbox-inner::after {
|
|
224
|
-
content: '';
|
|
225
|
-
position: absolute;
|
|
226
|
-
top: 50%;
|
|
227
|
-
left: 50%;
|
|
228
|
-
width: 0.714rem;
|
|
229
|
-
height: 0.143rem;
|
|
230
|
-
background-color: ${styledVars.CAP_WHITE};
|
|
231
|
-
transform: translate(-50%, -50%);
|
|
232
|
-
border-radius: 0.071rem;
|
|
233
|
-
}
|
|
234
|
-
.cap-unified-select-upload-container {
|
|
235
|
-
cursor: pointer;
|
|
236
|
-
display: flex;
|
|
237
|
-
align-items: center;
|
|
238
|
-
border-bottom: 0.071rem solid ${styledVars.CAP_G08};
|
|
239
|
-
height: 2.857rem;
|
|
240
|
-
padding-left: ${styledVars.SPACING_16};
|
|
241
|
-
|
|
242
|
-
.cap-unified-select-upload-label {
|
|
243
|
-
margin-left: ${styledVars.SPACING_12};
|
|
244
|
-
color: ${styledVars.CAP_SECONDARY.base};
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
.cap-unified-select-select-all-container {
|
|
248
|
-
padding: 0.643rem 1.071rem;
|
|
249
|
-
cursor: pointer;
|
|
250
|
-
display: flex;
|
|
251
|
-
align-items: center;
|
|
252
|
-
border-bottom: 0.071rem solid ${styledVars.CAP_G08};
|
|
253
|
-
height: 2.857rem;
|
|
254
|
-
.cap-unified-select-select-all-checkbox {
|
|
255
|
-
display: contents !important;
|
|
256
|
-
.ant-checkbox-inner {
|
|
257
|
-
height: 1.286rem;
|
|
258
|
-
width: 1.286rem;
|
|
259
|
-
border: 0.143rem solid ${styledVars.CAP_G06};
|
|
260
|
-
border-radius: ${styledVars.RADIUS_04};
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover
|
|
264
|
-
.ant-checkbox-checked:not(.ant-checkbox-disabled)
|
|
265
|
-
.ant-checkbox-inner {
|
|
266
|
-
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
267
|
-
border: 0.143rem solid ${styledVars.CAP_PRIMARY.base} !important;
|
|
268
|
-
}
|
|
269
|
-
.ant-checkbox-indeterminate .ant-checkbox-inner {
|
|
270
|
-
background-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
271
|
-
border-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
272
|
-
}
|
|
273
|
-
.ant-checkbox-indeterminate .ant-checkbox-inner::after {
|
|
274
|
-
content: '';
|
|
275
|
-
position: absolute;
|
|
276
|
-
top: 50%;
|
|
277
|
-
left: 50%;
|
|
278
|
-
width: 0.714rem;
|
|
279
|
-
height: 0.143rem;
|
|
280
|
-
background-color: ${styledVars.CAP_WHITE};
|
|
281
|
-
transform: translate(-50%, -50%);
|
|
282
|
-
border-radius: 0.071rem;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
.ant-select-tree-treenode.ant-select-tree-treenode-selected {
|
|
286
|
-
background-color: ${styledVars.CAP_PALE_GREY};
|
|
287
|
-
}
|
|
288
|
-
.ant-select-tree-list-holder-inner {
|
|
289
|
-
width: fit-content !important;
|
|
290
|
-
min-width: 100%;
|
|
291
|
-
}
|
|
292
|
-
.cap-unified-select-no-result {
|
|
293
|
-
display: flex;
|
|
294
|
-
flex-direction: column;
|
|
295
|
-
align-items: center;
|
|
296
|
-
justify-content: center;
|
|
297
|
-
height: 14.286rem;
|
|
298
|
-
color: ${styledVars.CAP_G05};
|
|
299
|
-
font-size: 1rem;
|
|
300
|
-
}
|
|
301
|
-
.cap-unified-select-no-result-icon {
|
|
302
|
-
font-size: 2.571rem;
|
|
303
|
-
margin-bottom: ${styledVars.SPACING_08};
|
|
304
|
-
color: ${styledVars.CAP_G06};
|
|
305
|
-
}
|
|
306
|
-
.cap-unified-select-no-result-text {
|
|
307
|
-
font-weight: 500;
|
|
308
|
-
}
|
|
309
|
-
.ant-tree-select:hover .ant-select-selector {
|
|
310
|
-
border-color: ${styledVars.CAP_G11};
|
|
311
|
-
}
|
|
312
|
-
.ant-tree-select-focused .ant-select-selector,
|
|
313
|
-
.ant-tree-select-open .ant-select-selector {
|
|
314
|
-
border-color: ${styledVars.CAP_G11};
|
|
315
|
-
box-shadow: none;
|
|
316
|
-
outline: none;
|
|
317
|
-
}
|
|
318
|
-
.cap-unified-select-search-container {
|
|
319
|
-
border-bottom: 0.071rem solid ${styledVars.CAP_G08} !important;
|
|
320
|
-
line-height: 2.857rem !important;
|
|
321
|
-
.ant-input-affix-wrapper {
|
|
322
|
-
padding-left: ${styledVars.SPACING_08};
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
.cap-unified-select-upload-button {
|
|
326
|
-
border: none;
|
|
327
|
-
padding-left: 1.071rem;
|
|
328
|
-
}
|
|
329
|
-
.cap-unified-select-confirm-container {
|
|
330
|
-
display: flex;
|
|
331
|
-
align-items: center;
|
|
332
|
-
height: 3.429rem;
|
|
333
|
-
padding: 0.5rem;
|
|
334
|
-
border-top: 0.071rem solid ${styledVars.CAP_G08};
|
|
335
|
-
}
|
|
336
|
-
.cap-unified-select-confirm-button-group {
|
|
337
|
-
display: flex;
|
|
338
|
-
padding-left: ${styledVars.SPACING_08};
|
|
339
|
-
align-items: center;
|
|
340
|
-
.cap-unified-select-confirm-button {
|
|
341
|
-
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
342
|
-
height: 2.286rem;
|
|
343
|
-
width: 6.714rem;
|
|
344
|
-
color: ${ styledVars.CAP_WHITE };
|
|
345
|
-
&:hover {
|
|
346
|
-
background-color: ${styledVars.CAP_PRIMARY.hover};
|
|
347
|
-
}
|
|
348
|
-
&:disabled {
|
|
349
|
-
background-color: ${styledVars.CAP_PRIMARY.disabled};};
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
.cap-unified-select-cancel-button {
|
|
353
|
-
border: transparent;
|
|
354
|
-
box-shadow: none;
|
|
355
|
-
width: 5.714rem;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
.cap-unified-select-selected-count {
|
|
359
|
-
display: flex;
|
|
360
|
-
margin-left: auto; /* pushes to far right */
|
|
361
|
-
font-size: 0.857rem;
|
|
362
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
363
|
-
line-height: 1.143rem;
|
|
364
|
-
color: ${styledVars.CAP_G04};
|
|
365
|
-
}
|
|
366
|
-
.cap-unified-select-search-container {
|
|
367
|
-
.ant-input-affix-wrapper {
|
|
368
|
-
border: none;
|
|
369
|
-
box-shadow: none;
|
|
370
|
-
border-radius: 0;
|
|
371
|
-
border-bottom: 0.071rem solid transparent;
|
|
372
|
-
transition: border-color 0.2s ease;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.ant-input-affix-wrapper:hover {
|
|
376
|
-
border-bottom: 0.071rem solid ${styledVars.CAP_G11} !important;
|
|
377
|
-
box-shadow: none;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.ant-input-affix-wrapper:focus-within {
|
|
381
|
-
border-bottom: 0.071rem solid ${styledVars.CAP_G01} !important;
|
|
382
|
-
box-shadow: none;
|
|
383
|
-
outline: none;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.ant-input {
|
|
387
|
-
border: none !important;
|
|
388
|
-
box-shadow: none !important;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
.cap-unified-select-tree-clear-container{
|
|
392
|
-
display: flex;
|
|
393
|
-
justify-content: center;
|
|
394
|
-
align-items: center;
|
|
395
|
-
height: 2.857rem;
|
|
396
|
-
border-top: 0.071rem solid #EBECF0;
|
|
397
|
-
cursor: pointer;
|
|
398
|
-
color: ${styledVars.CAP_G01};
|
|
399
|
-
&:hover{
|
|
400
|
-
background-color: ${styledVars.CAP_G08};
|
|
401
|
-
}
|
|
402
|
-
.cap-unified-select-tree-clear-label{
|
|
403
|
-
font-size: 1rem;
|
|
404
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
&.custom-popup-container {
|
|
410
|
-
/* Multi Select */
|
|
411
|
-
.multiSelect-popup-container {
|
|
412
|
-
.ant-select-tree-list {
|
|
413
|
-
.ant-select-tree-treenode-leaf {
|
|
414
|
-
.ant-select-tree-switcher-noop {
|
|
415
|
-
display: none;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
.ant-select-tree-indent {
|
|
420
|
-
margin-left: 1.071rem;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
.multiTreeSelect-popup-container {
|
|
424
|
-
min-width: 20rem;
|
|
425
|
-
}
|
|
426
|
-
.treeSelect-popup-container {
|
|
427
|
-
min-width: 20rem;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/* Single Select */
|
|
431
|
-
.select-popup-container {
|
|
432
|
-
.ant-select-tree-list {
|
|
433
|
-
.ant-select-tree-treenode-leaf {
|
|
434
|
-
.ant-select-tree-switcher-noop {
|
|
435
|
-
display: none;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
`;
|
package/LocaleHoc/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import { injectIntl } from 'react-intl';
|
|
3
|
-
import enTranslation from '../translations/en';
|
|
4
|
-
|
|
5
|
-
const prefix = `blaze.components`;
|
|
6
|
-
|
|
7
|
-
const LocaleHoc = (WrapperComponent, customProps) => {
|
|
8
|
-
const Wrapper = (props) => {
|
|
9
|
-
const componentName = customProps.key;
|
|
10
|
-
const translatedDefaults = enTranslation[componentName];
|
|
11
|
-
const { intl } = props;
|
|
12
|
-
|
|
13
|
-
const translatedProps = useMemo(() => {
|
|
14
|
-
if(!translatedDefaults) return {};
|
|
15
|
-
return Object.keys(translatedDefaults).reduce((acc, key) => {
|
|
16
|
-
const id = `${prefix}.${componentName}.${key}`
|
|
17
|
-
const defaultMessage = translatedDefaults[key]
|
|
18
|
-
try{
|
|
19
|
-
acc[key] = intl.formatMessage({ id, defaultMessage });
|
|
20
|
-
}catch(err){
|
|
21
|
-
acc[key] = defaultMessage;
|
|
22
|
-
}
|
|
23
|
-
return acc;
|
|
24
|
-
}, {});
|
|
25
|
-
}, [translatedDefaults, intl]);
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<WrapperComponent
|
|
29
|
-
{...translatedProps}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return injectIntl(Wrapper);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default LocaleHoc;
|
package/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Import and export all components
|
|
2
|
-
export { default as CapIcon } from './CapIcon';
|
|
3
|
-
export { default as CapInput } from './CapInput';
|
|
4
|
-
export { default as CapLabel } from './CapLabel';
|
|
5
|
-
export { default as CapRow } from './CapRow';
|
|
6
|
-
export { default as CapSkeleton } from './CapSkeleton';
|
|
7
|
-
export { default as CapSpin } from './CapSpin';
|
|
8
|
-
export { default as CapTable } from './CapTable';
|
|
9
|
-
export { default as CapTooltip } from './CapTooltip';
|
|
10
|
-
export { default as CapTooltipWithInfo } from './CapTooltipWithInfo';
|
|
11
|
-
export { default as CapUnifiedSelect } from './CapUnifiedSelect';
|
|
12
|
-
|
|
13
|
-
// Export utilities
|
|
14
|
-
export { default as LocaleHoc } from './LocaleHoc';
|
|
15
|
-
|
|
16
|
-
// Export styled utilities
|
|
17
|
-
export * as styledVars from './styled/variables';
|
|
18
|
-
export { default as styled } from './styled';
|
|
19
|
-
|
|
20
|
-
// Export utils
|
|
21
|
-
export * as Utils from './utils';
|
package/styled/index.js
DELETED
package/styled/variables.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/* Color Palette */
|
|
2
|
-
//========================
|
|
3
|
-
|
|
4
|
-
// Primary colors
|
|
5
|
-
export const CAP_PRIMARY = {
|
|
6
|
-
base: "#47af46",
|
|
7
|
-
hover: "#1f9a1d",
|
|
8
|
-
disabled: "#a1d8a0",
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// Secondary colors
|
|
12
|
-
export const CAP_SECONDARY = {
|
|
13
|
-
base: "#2466ea",
|
|
14
|
-
light: 'rgba("#2466ea", 0.1)',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const NORMAL_LINE_HEIGHT = "normal";
|
|
18
|
-
|
|
19
|
-
// Custom colors
|
|
20
|
-
export const CAP_ORANGE = "#f87d23";
|
|
21
|
-
export const CAP_ORANGE01 = "#ffe5d2";
|
|
22
|
-
export const CAP_ORANGE02 = "#fa7d02";
|
|
23
|
-
export const CAP_YELLOW = "#fec52e";
|
|
24
|
-
export const CAP_YELLOW01 = "#e8bc25";
|
|
25
|
-
export const CAP_YELLOW02 = "#f9d438";
|
|
26
|
-
export const CAP_BLUE = "#23cccc";
|
|
27
|
-
export const CAP_PURPLE = "#8517e5";
|
|
28
|
-
export const CAP_PINK = "#e51fa3";
|
|
29
|
-
export const CAP_RED = "#ea213a";
|
|
30
|
-
export const CAP_ICON = "#7a869a";
|
|
31
|
-
export const CAP_PALE_GREY = "#e9f0fe";
|
|
32
|
-
export const CAP_BLUE01 = "#2466eb";
|
|
33
|
-
export const CAP_BLUE02 = "#1d61ee";
|
|
34
|
-
export const CAP_RED01 = "#e51fa3";
|
|
35
|
-
export const CAP_RED02 = "#f5222d";
|
|
36
|
-
export const CAP_RED03 = "#ed1b34";
|
|
37
|
-
export const CAP_PURPLE01 = "#6563ff";
|
|
38
|
-
export const CAP_PURPLE02 = "#a451ff";
|
|
39
|
-
export const CAP_PURPLE03 = "#f2e7fe";
|
|
40
|
-
export const CAP_PURPLE04 = "#d4e1fc";
|
|
41
|
-
export const CAP_GREEN01 = "#6bb56b";
|
|
42
|
-
export const CAP_GREEN02 = "#ecf7ec";
|
|
43
|
-
|
|
44
|
-
// Grey colors
|
|
45
|
-
export const CAP_G01 = "#091e42";
|
|
46
|
-
export const CAP_G02 = "#253858";
|
|
47
|
-
export const CAP_G03 = "#42526e";
|
|
48
|
-
export const CAP_G04 = "#5e6c84";
|
|
49
|
-
export const CAP_G05 = "#97a0af";
|
|
50
|
-
export const CAP_G06 = "#b3bac5";
|
|
51
|
-
export const CAP_G07 = "#dfe2e7";
|
|
52
|
-
export const CAP_G08 = "#ebecf0";
|
|
53
|
-
export const CAP_G09 = "#f4f5f7";
|
|
54
|
-
export const CAP_G10 = "#fafbfc";
|
|
55
|
-
export const CAP_G11 = "#7a869a";
|
|
56
|
-
export const CAP_G12 = "#e8e8e8";
|
|
57
|
-
export const CAP_G13 = "#ecece7";
|
|
58
|
-
export const CAP_G14 = "#e9f0fd";
|
|
59
|
-
export const CAP_G15 = "#efefef";
|
|
60
|
-
export const CAP_G16 = "#2a2a2a";
|
|
61
|
-
export const CAP_G17 = "#7F8185";
|
|
62
|
-
export const CAP_G18 = "#dcdee2";
|
|
63
|
-
export const CAP_G19 = "#8a9ab2";
|
|
64
|
-
export const CAP_G20 = "#c2c2c2";
|
|
65
|
-
|
|
66
|
-
export const CAP_WHITE = "#ffffff";
|
|
67
|
-
export const CAP_BLACK = "#000000";
|
|
68
|
-
|
|
69
|
-
/* Fonts */
|
|
70
|
-
// ==============
|
|
71
|
-
export const FONT_FAMILY = '"Roboto", sans-serif';
|
|
72
|
-
export const FONT_WEIGHT_REGULAR = 400;
|
|
73
|
-
export const FONT_WEIGHT_MEDIUM = 500;
|
|
74
|
-
|
|
75
|
-
/* Spacing */
|
|
76
|
-
// ==============
|
|
77
|
-
export const SPACING_04 = "4px";
|
|
78
|
-
export const SPACING_08 = "8px";
|
|
79
|
-
export const SPACING_12 = "12px";
|
|
80
|
-
export const SPACING_16 = "16px";
|
|
81
|
-
export const SPACING_24 = "24px";
|
|
82
|
-
export const SPACING_32 = "32px";
|
|
83
|
-
|
|
84
|
-
/* Border Radius */
|
|
85
|
-
// ==============
|
|
86
|
-
export const RADIUS_04 = "4px";
|
|
87
|
-
export const RADIUS_08 = "8px";
|
|
88
|
-
|
|
89
|
-
/* Transition */
|
|
90
|
-
// ==============
|
|
91
|
-
export const TRANSITION_ALL = "all 0.3s ease";
|
package/utils/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as withStyles } from './withStyles';
|
package/utils/withMemo.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const withMemo = (Component, isEqual, log = false) => {
|
|
4
|
-
const defaultIsEqual = (prevProps, nextProps) => {
|
|
5
|
-
const prevKeys = Object.keys(prevProps).filter((key) => key !== 'intl');
|
|
6
|
-
const changedProps = [];
|
|
7
|
-
const isEqual = prevKeys.every((key) => {
|
|
8
|
-
const areEqual = prevProps[key] === nextProps[key];
|
|
9
|
-
if (!areEqual) {
|
|
10
|
-
changedProps.push({
|
|
11
|
-
key,
|
|
12
|
-
prevValue: prevProps[key],
|
|
13
|
-
nextValue: nextProps[key],
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return areEqual;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
if (log && changedProps.length > 0) {
|
|
20
|
-
// eslint-disable-next-line no-console
|
|
21
|
-
console.log('Props changed:', changedProps);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return isEqual;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
if (typeof isEqual !== 'function') {
|
|
28
|
-
return React.memo(Component, defaultIsEqual);
|
|
29
|
-
}
|
|
30
|
-
return React.memo(Component, isEqual);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export default withMemo;
|
package/utils/withStyles.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Enhances a React component with additional styles using styled-components.
|
|
5
|
-
* @param {React.ComponentType} WrappedComponent - The React component to enhance.
|
|
6
|
-
* @param {TemplateStringsArray} styles - CSS styles as a TemplateStringsArray.
|
|
7
|
-
* @returns {React.ComponentType} Returns the enhanced styled component.
|
|
8
|
-
*/
|
|
9
|
-
const withStyledComponent = (WrappedComponent, styles) => {
|
|
10
|
-
/**
|
|
11
|
-
* A styled component generated by combining WrappedComponent with additional styles.
|
|
12
|
-
* @type {React.ComponentType}
|
|
13
|
-
*/
|
|
14
|
-
const StyledComponent = styled(WrappedComponent)`
|
|
15
|
-
${styles};
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
// Set default props from the original component to the styled component
|
|
19
|
-
StyledComponent.defaultProps = WrappedComponent.defaultProps;
|
|
20
|
-
|
|
21
|
-
return StyledComponent;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default withStyledComponent;
|
|
File without changes
|