1- import { Tag } from 'antd'
21import styled from 'styled-components'
2+ import { Form , Tag , Select , Input } from 'antd'
33
44const SelectTag = styled ( Tag ) `
55 margin-inline-end: 4px;
@@ -16,10 +16,44 @@ const SelectTagSpan = styled.span`
1616 flex-direction: column;
1717`
1818
19+ const MaxTagPlacheolder = styled . div `
20+ padding-left: 16px;
21+ `
22+
23+ type TMaxTagPlaceholderLengthProps = {
24+ $colorBorder : string
25+ }
26+
27+ const MaxTagPlacheolderLength = styled . span < TMaxTagPlaceholderLengthProps > `
28+ min-height: 20px;
29+ padding-right: 4px;
30+ padding-left: 4px;
31+ border: 1px solid ${ ( { $colorBorder } ) => $colorBorder } ;
32+ border-radius: 20px;
33+ `
34+
35+ type TBackgroundContainerProps = {
36+ $colorBorder : string
37+ $colorBgLayout : string
38+ }
39+
40+ const BackgroundContainer = styled . div < TBackgroundContainerProps > `
41+ width: 100%;
42+ gap: 8px;
43+ border: 1px solid ${ ( { $colorBorder } ) => $colorBorder } ;
44+ border-radius: 6px;
45+ background: ${ ( { $colorBgLayout } ) => $colorBgLayout } ;
46+ padding: 8px;
47+ `
48+
1949const FormContainer = styled . div `
2050 display: grid;
21- grid-template-columns: 300px 100px 1fr 100px;
22- gap: 16px;
51+ grid-template-columns: 2fr 10fr 75px;
52+ gap: 8px;
53+ `
54+
55+ const ResetedFormItem = styled ( Form . Item ) `
56+ margin-bottom: 0;
2357`
2458
2559type THideableContainerProps = {
@@ -30,9 +64,85 @@ const HideableContainer = styled.div<THideableContainerProps>`
3064 display: ${ ( { $isHidden } ) => ( $isHidden ? 'none' : 'initial' ) } ;
3165`
3266
67+ const CompoundItem = styled . div `
68+ display: grid;
69+ grid-template-columns: 130px 1fr;
70+ `
71+
72+ const LeftSideSelect = styled ( Select ) `
73+ /* stylelint-disable declaration-no-important */
74+
75+ .ant-select-selector {
76+ border-top-right-radius: 0 !important;
77+ border-bottom-right-radius: 0 !important;
78+ border-right-width: 0 !important;
79+ height: 32px !important;
80+ }
81+ `
82+
83+ const RightSideInput = styled ( Input ) `
84+ &&&.ant-input-outlined {
85+ border-top-left-radius: 0 !important;
86+ border-bottom-left-radius: 0 !important;
87+ border-left-width: 0 !important;
88+ height: 32px !important;
89+ }
90+ `
91+
92+ const RightSideSelect = styled ( Select ) `
93+ .ant-select-selector {
94+ border-top-left-radius: 0 !important;
95+ border-bottom-left-radius: 0 !important;
96+ border-left-width: 0 !important;
97+ height: 32px !important;
98+ }
99+ `
100+
101+ const BottomTagsHolder = styled . div `
102+ display: flex;
103+ gap: 4px;
104+ flex-wrap: wrap;
105+ margin-top: 8px;
106+ `
107+
108+ const CustomTag = styled ( Tag ) `
109+ font-size: 14px;
110+ height: 22px;
111+ margin-inline-end: 0 !important;
112+ `
113+
114+ type TAbbrProps = {
115+ $bgColor : string
116+ }
117+
118+ const Abbr = styled . span < TAbbrProps > `
119+ background-color: ${ ( { $bgColor } ) => $bgColor } ;
120+ border-radius: 13px;
121+ padding: 2px 5px;
122+ margin-right: 10px;
123+ `
124+
125+ const ClearButtonHolder = styled . div `
126+ display: flex;
127+ justify-content: flex-end;
128+ margin-top: 8px;
129+ `
130+
33131export const Styled = {
34132 SelectTag,
35133 SelectTagSpan,
134+ MaxTagPlacheolder,
135+ MaxTagPlacheolderLength,
136+ BackgroundContainer,
36137 FormContainer,
138+ ResetedFormItem,
37139 HideableContainer,
140+ CompoundItem,
141+ LeftSideSelect,
142+ RightSideInput,
143+ RightSideSelect,
144+ BottomTagsHolder,
145+ CustomTag,
146+ Abbr,
147+ ClearButtonHolder,
38148}
0 commit comments