@wireapp/react-ui-kit 9.52.1 → 9.54.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.
- package/lib/Form/Select/BaseSelect/BaseSelect.styles.d.ts +46 -0
- package/lib/Form/Select/BaseSelect/BaseSelect.styles.d.ts.map +1 -0
- package/lib/Form/Select/BaseSelect/BaseSelect.styles.js +160 -0
- package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.d.ts +3 -0
- package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.d.ts.map +1 -0
- package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.js +29 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.d.ts +17 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.d.ts.map +1 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.js +44 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.d.ts +33 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.d.ts.map +1 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.js +115 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.d.ts +17 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.d.ts.map +1 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.js +113 -0
- package/lib/Form/Select/Select.d.ts.map +1 -0
- package/lib/Form/{Select.js → Select/Select.js} +19 -13
- package/lib/Form/Select/Select.stories.d.ts +110 -0
- package/lib/Form/Select/Select.stories.d.ts.map +1 -0
- package/lib/Form/{Select.stories.js → Select/Select.stories.js} +8 -19
- package/lib/Form/Select/Select.styles.d.ts +14 -0
- package/lib/Form/Select/Select.styles.d.ts.map +1 -0
- package/lib/Form/Select/Select.styles.js +91 -0
- package/lib/Form/Select/SelectContainer/SelectContainer.d.ts +3 -0
- package/lib/Form/Select/SelectContainer/SelectContainer.d.ts.map +1 -0
- package/lib/Form/Select/SelectContainer/SelectContainer.js +28 -0
- package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.d.ts +4 -0
- package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.d.ts.map +1 -0
- package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.js +29 -0
- package/lib/Form/Select/SelectMenu/SelectMenu.d.ts +4 -0
- package/lib/Form/Select/SelectMenu/SelectMenu.d.ts.map +1 -0
- package/lib/Form/Select/SelectMenu/SelectMenu.js +13 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.d.ts +6 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.d.ts.map +1 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.js +39 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.styles.d.ts +5 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.styles.d.ts.map +1 -0
- package/lib/Form/{SelectComponents.styles.js → Select/SelectMenuList/SelectMenuList.styles.js} +5 -5
- package/lib/Form/Select/SelectOption/SelectOption.d.ts +5 -0
- package/lib/Form/Select/SelectOption/SelectOption.d.ts.map +1 -0
- package/lib/Form/Select/SelectOption/SelectOption.js +53 -0
- package/lib/Form/Select/SelectValueContainer/SelectValueContainer.d.ts +4 -0
- package/lib/Form/Select/SelectValueContainer/SelectValueContainer.d.ts.map +1 -0
- package/lib/Form/Select/SelectValueContainer/SelectValueContainer.js +21 -0
- package/lib/Form/index.d.ts +2 -1
- package/lib/Form/index.d.ts.map +1 -1
- package/lib/Form/index.js +2 -1
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts +3 -2
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +2 -2
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.js +6 -1
- package/lib/Misc/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/lib/Misc/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/Breadcrumbs.js +2 -20
- package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -0
- package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.js +14 -1
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.d.ts +2 -0
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.js +1 -19
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.d.ts +1 -0
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.js +6 -1
- package/package.json +3 -3
- package/lib/Form/Select.d.ts.map +0 -1
- package/lib/Form/Select.stories.d.ts +0 -16
- package/lib/Form/Select.stories.d.ts.map +0 -1
- package/lib/Form/SelectComponents.d.ts +0 -16
- package/lib/Form/SelectComponents.d.ts.map +0 -1
- package/lib/Form/SelectComponents.js +0 -93
- package/lib/Form/SelectComponents.styles.d.ts +0 -5
- package/lib/Form/SelectComponents.styles.d.ts.map +0 -1
- package/lib/Form/SelectStyles.d.ts +0 -2802
- package/lib/Form/SelectStyles.d.ts.map +0 -1
- package/lib/Form/SelectStyles.js +0 -227
- /package/lib/Form/{Select.d.ts → Select/Select.d.ts} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
2
|
+
import { Theme } from '../../../Layout';
|
|
3
|
+
export interface BaseSelectStylesParams {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
markInvalid?: boolean;
|
|
6
|
+
menuPosition?: 'absolute' | 'relative';
|
|
7
|
+
controlCSS?: CSSObject;
|
|
8
|
+
containerCSS?: CSSObject;
|
|
9
|
+
}
|
|
10
|
+
export declare const baseIndicatorSeparatorStyles: () => CSSObject;
|
|
11
|
+
export declare const baseContainerStyles: (containerCSS: CSSObject) => CSSObject;
|
|
12
|
+
export declare const baseControlStyles: ({ theme, isDisabled, markInvalid, selectProps, controlCSS, }: {
|
|
13
|
+
theme: Theme;
|
|
14
|
+
isDisabled: boolean;
|
|
15
|
+
markInvalid: boolean;
|
|
16
|
+
selectProps: {
|
|
17
|
+
isDisabled: boolean;
|
|
18
|
+
menuIsOpen: boolean;
|
|
19
|
+
};
|
|
20
|
+
controlCSS: CSSObject;
|
|
21
|
+
}) => CSSObject;
|
|
22
|
+
export declare const baseDropdownIndicatorStyles: ({ theme, selectProps, }: {
|
|
23
|
+
theme: Theme;
|
|
24
|
+
selectProps: {
|
|
25
|
+
isDisabled: boolean;
|
|
26
|
+
};
|
|
27
|
+
}) => CSSObject;
|
|
28
|
+
export declare const baseMenuStyles: ({ theme, menuPosition, }: {
|
|
29
|
+
theme: Theme;
|
|
30
|
+
menuPosition: "absolute" | "relative";
|
|
31
|
+
}) => CSSObject;
|
|
32
|
+
export declare const baseMenuListStyles: () => CSSObject;
|
|
33
|
+
export declare const baseOptionStyles: ({ theme, isDisabled, isFocused, isSelected, isMulti, }: {
|
|
34
|
+
theme: Theme;
|
|
35
|
+
isDisabled: boolean;
|
|
36
|
+
isFocused: boolean;
|
|
37
|
+
isSelected: boolean;
|
|
38
|
+
isMulti: boolean;
|
|
39
|
+
}) => CSSObject;
|
|
40
|
+
export declare const baseSingleValueStyles: ({ theme, selectProps, }: {
|
|
41
|
+
theme: Theme;
|
|
42
|
+
selectProps: {
|
|
43
|
+
isDisabled: boolean;
|
|
44
|
+
};
|
|
45
|
+
}) => CSSObject;
|
|
46
|
+
//# sourceMappingURL=BaseSelect.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseSelect.styles.d.ts","sourceRoot":"","sources":["../../../../src/Form/Select/BaseSelect/BaseSelect.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAGtC,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACvC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED,eAAO,MAAM,4BAA4B,QAAO,SAE9C,CAAC;AAEH,eAAO,MAAM,mBAAmB,iBAAkB,SAAS,KAAG,SAW5D,CAAC;AAEH,eAAO,MAAM,iBAAiB,iEAM3B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE;QACX,UAAU,EAAE,OAAO,CAAC;QACpB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,UAAU,EAAE,SAAS,CAAC;CACvB,KAAG,SA4BF,CAAC;AAEH,eAAO,MAAM,2BAA2B,4BAGrC;IACD,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE;QACX,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;CACH,KAAG,SAOH,CAAC;AAEF,eAAO,MAAM,cAAc,6BAGxB;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,UAAU,GAAG,UAAU,CAAC;CACvC,KAAG,SAOF,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAAO,SAKpC,CAAC;AAEH,eAAO,MAAM,gBAAgB,2DAM1B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,KAAG,SAyDF,CAAC;AAEH,eAAO,MAAM,qBAAqB,4BAG/B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE;QACX,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;CACH,KAAG,SAKH,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2024 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.baseSingleValueStyles = exports.baseOptionStyles = exports.baseMenuListStyles = exports.baseMenuStyles = exports.baseDropdownIndicatorStyles = exports.baseControlStyles = exports.baseContainerStyles = exports.baseIndicatorSeparatorStyles = void 0;
|
|
22
|
+
const Input_1 = require("../../Input");
|
|
23
|
+
const baseIndicatorSeparatorStyles = () => ({
|
|
24
|
+
display: 'none',
|
|
25
|
+
});
|
|
26
|
+
exports.baseIndicatorSeparatorStyles = baseIndicatorSeparatorStyles;
|
|
27
|
+
const baseContainerStyles = (containerCSS) => ({
|
|
28
|
+
'& > div': {
|
|
29
|
+
height: 'auto',
|
|
30
|
+
minHeight: '48px',
|
|
31
|
+
'&:-moz-focusring': {
|
|
32
|
+
color: 'transparent',
|
|
33
|
+
textShadow: '0 0 0 #000',
|
|
34
|
+
},
|
|
35
|
+
position: 'relative',
|
|
36
|
+
...containerCSS,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
exports.baseContainerStyles = baseContainerStyles;
|
|
40
|
+
const baseControlStyles = ({ theme, isDisabled, markInvalid, selectProps, controlCSS, }) => ({
|
|
41
|
+
display: 'flex',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
appearance: 'none',
|
|
44
|
+
padding: '0 8px 0 16px',
|
|
45
|
+
height: 'auto',
|
|
46
|
+
minHeight: '48px',
|
|
47
|
+
...(0, Input_1.inputStyle)(theme, { disabled: selectProps.isDisabled, markInvalid }),
|
|
48
|
+
borderRadius: 12,
|
|
49
|
+
...(isDisabled && {
|
|
50
|
+
backgroundColor: theme.Input.backgroundColorDisabled,
|
|
51
|
+
color: theme.Select.disabledColor,
|
|
52
|
+
cursor: 'default',
|
|
53
|
+
}),
|
|
54
|
+
...(markInvalid && {
|
|
55
|
+
boxShadow: `0 0 0 1px ${theme.general.dangerColor}`,
|
|
56
|
+
}),
|
|
57
|
+
...(selectProps.menuIsOpen && {
|
|
58
|
+
boxShadow: `0 0 0 1px ${theme.general.primaryColor}`,
|
|
59
|
+
'&:hover': {
|
|
60
|
+
boxShadow: `0 0 0 1px ${theme.general.primaryColor}`,
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
cursor: !selectProps.isDisabled && 'pointer',
|
|
64
|
+
'&:focus:visible, active': {
|
|
65
|
+
boxShadow: !selectProps.isDisabled && `0 0 0 1px ${theme.general.primaryColor}`,
|
|
66
|
+
},
|
|
67
|
+
...controlCSS,
|
|
68
|
+
});
|
|
69
|
+
exports.baseControlStyles = baseControlStyles;
|
|
70
|
+
const baseDropdownIndicatorStyles = ({ theme, selectProps, }) => {
|
|
71
|
+
const isSelectDisabled = selectProps.isDisabled;
|
|
72
|
+
return {
|
|
73
|
+
'& > svg': {
|
|
74
|
+
fill: isSelectDisabled && theme.Input.placeholderColor,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
exports.baseDropdownIndicatorStyles = baseDropdownIndicatorStyles;
|
|
79
|
+
const baseMenuStyles = ({ theme, menuPosition, }) => ({
|
|
80
|
+
boxShadow: `0 0 0 1px ${theme.general.primaryColor}, 0 4px 11px hsl(0deg 0% 0% / 10%)`,
|
|
81
|
+
borderRadius: 12,
|
|
82
|
+
marginBottom: 0,
|
|
83
|
+
marginTop: 4,
|
|
84
|
+
overflowY: 'auto',
|
|
85
|
+
position: menuPosition,
|
|
86
|
+
});
|
|
87
|
+
exports.baseMenuStyles = baseMenuStyles;
|
|
88
|
+
const baseMenuListStyles = () => ({
|
|
89
|
+
borderRadius: 0,
|
|
90
|
+
paddingBottom: 0,
|
|
91
|
+
paddingTop: 0,
|
|
92
|
+
maxHeight: 400,
|
|
93
|
+
});
|
|
94
|
+
exports.baseMenuListStyles = baseMenuListStyles;
|
|
95
|
+
const baseOptionStyles = ({ theme, isDisabled, isFocused, isSelected, isMulti, }) => ({
|
|
96
|
+
backgroundColor: theme.Input.backgroundColor,
|
|
97
|
+
color: theme.general.color,
|
|
98
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
99
|
+
fontSize: theme.fontSizes.base,
|
|
100
|
+
lineHeight: '1.5rem',
|
|
101
|
+
...(isSelected &&
|
|
102
|
+
!isDisabled &&
|
|
103
|
+
!isMulti && {
|
|
104
|
+
background: theme.general.primaryColor,
|
|
105
|
+
borderColor: theme.general.primaryColor,
|
|
106
|
+
color: theme.Select.contrastTextColor,
|
|
107
|
+
'&:hover': {
|
|
108
|
+
backgroundColor: theme.Select.selectedActiveBg,
|
|
109
|
+
},
|
|
110
|
+
'&:active': {
|
|
111
|
+
backgroundColor: theme.general.primaryColor,
|
|
112
|
+
boxShadow: `inset 0 0 0 1px ${theme.Select.selectedActiveBg}`,
|
|
113
|
+
color: theme.general.contrastColor,
|
|
114
|
+
},
|
|
115
|
+
}),
|
|
116
|
+
...(isFocused &&
|
|
117
|
+
!isDisabled &&
|
|
118
|
+
!isSelected && {
|
|
119
|
+
backgroundColor: theme.Select.optionHoverBg,
|
|
120
|
+
borderColor: theme.Select.optionHoverBg,
|
|
121
|
+
color: theme.general.color,
|
|
122
|
+
'&:active': {
|
|
123
|
+
background: theme.Select.optionHoverBg,
|
|
124
|
+
boxShadow: `inset 0 0 0 1px ${theme.Select.selectedActiveBg}`,
|
|
125
|
+
color: theme.general.color,
|
|
126
|
+
},
|
|
127
|
+
}),
|
|
128
|
+
...(isMulti &&
|
|
129
|
+
isSelected && {
|
|
130
|
+
backgroundColor: theme.Input.backgroundColor,
|
|
131
|
+
'&:hover': {
|
|
132
|
+
backgroundColor: theme.Select.optionHoverBg,
|
|
133
|
+
},
|
|
134
|
+
'&:active': {
|
|
135
|
+
background: theme.Select.optionHoverBg,
|
|
136
|
+
boxShadow: `inset 0 0 0 1px ${theme.Select.selectedActiveBg}`,
|
|
137
|
+
color: theme.general.color,
|
|
138
|
+
},
|
|
139
|
+
}),
|
|
140
|
+
...(isDisabled && {
|
|
141
|
+
backgroundColor: theme.Input.backgroundColorDisabled,
|
|
142
|
+
color: theme.Select.disabledColor,
|
|
143
|
+
'&:hover, &:active, &:focus': {
|
|
144
|
+
backgroundColor: theme.Select.borderColor,
|
|
145
|
+
color: theme.Select.disabledColor,
|
|
146
|
+
},
|
|
147
|
+
...(isFocused && {
|
|
148
|
+
backgroundColor: theme.Select.borderColor,
|
|
149
|
+
color: theme.Select.disabledColor,
|
|
150
|
+
}),
|
|
151
|
+
}),
|
|
152
|
+
});
|
|
153
|
+
exports.baseOptionStyles = baseOptionStyles;
|
|
154
|
+
const baseSingleValueStyles = ({ theme, selectProps, }) => {
|
|
155
|
+
const isSelectDisabled = selectProps.isDisabled;
|
|
156
|
+
return {
|
|
157
|
+
color: isSelectDisabled ? theme.Input.placeholderColor : theme.general.color,
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
exports.baseSingleValueStyles = baseSingleValueStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseSelectDropdownIndicator.d.ts","sourceRoot":"","sources":["../../../../src/Form/Select/BaseSelect/BaseSelectDropdownIndicator.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAa,sBAAsB,EAAC,MAAM,cAAc,CAAC;AAIhE,eAAO,MAAM,2BAA2B,UAAW,sBAAsB,qDASxE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseSelectDropdownIndicator = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
/*
|
|
6
|
+
* Wire
|
|
7
|
+
* Copyright (C) 2022 Wire Swiss GmbH
|
|
8
|
+
*
|
|
9
|
+
* This program is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const react_select_1 = require("react-select");
|
|
24
|
+
const ArrowDown_1 = require("../../../Icon/ArrowDown");
|
|
25
|
+
const BaseSelectDropdownIndicator = (props) => {
|
|
26
|
+
const { menuIsOpen } = props.selectProps;
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(react_select_1.components.DropdownIndicator, { ...props, children: (0, jsx_runtime_1.jsx)(ArrowDown_1.ArrowDown, { css: { ...(menuIsOpen ? { transform: 'rotateX(180deg)', marginTop: 2 } : { marginTop: 4 }) } }) }));
|
|
28
|
+
};
|
|
29
|
+
exports.BaseSelectDropdownIndicator = BaseSelectDropdownIndicator;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Option } from '../Select';
|
|
2
|
+
export interface ComboboxSelectProps {
|
|
3
|
+
id: string;
|
|
4
|
+
options: Option[];
|
|
5
|
+
value?: Option | Option[];
|
|
6
|
+
onChange?: (value: Option | Option[]) => void;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
dataUieName?: string;
|
|
10
|
+
onCreateOption: (inputValue: string) => void;
|
|
11
|
+
createOptionLabel: (inputValue: string) => string;
|
|
12
|
+
noOptionsMessage: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const ComboboxSelect: ({ id, options, value, onChange, isDisabled, placeholder, dataUieName, onCreateOption, createOptionLabel, noOptionsMessage, label, required, }: ComboboxSelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=ComboboxSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxSelect.d.ts","sourceRoot":"","sources":["../../../../src/Form/Select/ComboboxSelect/ComboboxSelect.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,kJAaxB,mBAAmB,qDAiCrB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ComboboxSelect = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
8
|
+
/*
|
|
9
|
+
* Wire
|
|
10
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
11
|
+
*
|
|
12
|
+
* This program is free software: you can redistribute it and/or modify
|
|
13
|
+
* it under the terms of the GNU General Public License as published by
|
|
14
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
15
|
+
* (at your option) any later version.
|
|
16
|
+
*
|
|
17
|
+
* This program is distributed in the hope that it will be useful,
|
|
18
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20
|
+
* GNU General Public License for more details.
|
|
21
|
+
*
|
|
22
|
+
* You should have received a copy of the GNU General Public License
|
|
23
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
const react_1 = require("@emotion/react");
|
|
27
|
+
const react_select_1 = require("react-select");
|
|
28
|
+
const creatable_1 = __importDefault(require("react-select/creatable"));
|
|
29
|
+
const ComboboxSelect_styles_1 = require("./ComboboxSelect.styles");
|
|
30
|
+
const CloseIcon_1 = require("../../../Icon/CloseIcon");
|
|
31
|
+
const InputLabel_1 = require("../../InputLabel");
|
|
32
|
+
const BaseSelectDropdownIndicator_1 = require("../BaseSelect/BaseSelectDropdownIndicator");
|
|
33
|
+
const ComboboxSelect = ({ id, options, value, onChange, isDisabled = false, placeholder, dataUieName, onCreateOption, createOptionLabel, noOptionsMessage, label, required, }) => {
|
|
34
|
+
const theme = (0, react_1.useTheme)();
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: ComboboxSelect_styles_1.wrapperStyles, "data-uie-name": dataUieName, children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: id, isRequired: required, children: label })), (0, jsx_runtime_1.jsx)(creatable_1.default, { id: id, options: options, value: value, onChange: onChange, isMulti: true, isSearchable: true, isDisabled: isDisabled, placeholder: placeholder, styles: (0, ComboboxSelect_styles_1.selectStyles)({ theme }), classNamePrefix: "select", formatCreateLabel: createOptionLabel, onCreateOption: onCreateOption, closeMenuOnSelect: false, components: {
|
|
36
|
+
ClearIndicator: () => null,
|
|
37
|
+
DropdownIndicator: BaseSelectDropdownIndicator_1.BaseSelectDropdownIndicator,
|
|
38
|
+
MultiValueRemove: props => (0, jsx_runtime_1.jsx)(MultiValueRemove, { ...props }),
|
|
39
|
+
NoOptionsMessage: props => (0, jsx_runtime_1.jsx)(NoOptionsMessage, { ...props, message: noOptionsMessage }),
|
|
40
|
+
} })] }));
|
|
41
|
+
};
|
|
42
|
+
exports.ComboboxSelect = ComboboxSelect;
|
|
43
|
+
const MultiValueRemove = (props) => ((0, jsx_runtime_1.jsx)(react_select_1.components.MultiValueRemove, { ...props, children: (0, jsx_runtime_1.jsx)(CloseIcon_1.CloseIcon, { width: 10, height: 10 }) }));
|
|
44
|
+
const NoOptionsMessage = ({ message, ...props }) => ((0, jsx_runtime_1.jsx)(react_select_1.components.NoOptionsMessage, { ...props, children: (0, jsx_runtime_1.jsx)("div", { css: ComboboxSelect_styles_1.noOptionsMessageStyles, children: message }) }));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { type ComboboxSelectProps } from './ComboboxSelect';
|
|
3
|
+
import type { Option } from '../Select';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ id, options, value, onChange, isDisabled, placeholder, dataUieName, onCreateOption, createOptionLabel, noOptionsMessage, label, required, }: ComboboxSelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
11
|
+
id: string;
|
|
12
|
+
options: Option[];
|
|
13
|
+
value?: Option | Option[];
|
|
14
|
+
onChange?: (value: Option | Option[]) => void;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
dataUieName?: string;
|
|
18
|
+
onCreateOption: (inputValue: string) => void;
|
|
19
|
+
createOptionLabel: (inputValue: string) => string;
|
|
20
|
+
noOptionsMessage: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
}>) => import("@emotion/react/jsx-runtime").JSX.Element)[];
|
|
24
|
+
tags: string[];
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Default: Story;
|
|
29
|
+
export declare const WithValue: Story;
|
|
30
|
+
export declare const Disabled: Story;
|
|
31
|
+
export declare const Creatable: Story;
|
|
32
|
+
export declare const WithLabel: Story;
|
|
33
|
+
//# sourceMappingURL=ComboboxSelect.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxSelect.stories.d.ts","sourceRoot":"","sources":["../../../../src/Form/Select/ComboboxSelect/ComboboxSelect.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAiB,KAAK,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAE1E,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AAQtC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;CAc6B,CAAC;AAExC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AA8BF,eAAO,MAAM,SAAS,EAAE,KAYvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WithLabel = exports.Creatable = exports.Disabled = exports.WithValue = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
/*
|
|
6
|
+
* Wire
|
|
7
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
8
|
+
*
|
|
9
|
+
* This program is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const react_1 = require("react");
|
|
24
|
+
const ComboboxSelect_1 = require("./ComboboxSelect");
|
|
25
|
+
const initialOptions = [
|
|
26
|
+
{ value: '1', label: 'Option 1' },
|
|
27
|
+
{ value: '2', label: 'Option 2' },
|
|
28
|
+
{ value: '3', label: 'Option 3' },
|
|
29
|
+
];
|
|
30
|
+
const meta = {
|
|
31
|
+
title: 'Form/ComboboxSelect',
|
|
32
|
+
component: ComboboxSelect_1.ComboboxSelect,
|
|
33
|
+
parameters: {
|
|
34
|
+
layout: 'centered',
|
|
35
|
+
},
|
|
36
|
+
decorators: [
|
|
37
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { width: '476px' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
38
|
+
],
|
|
39
|
+
tags: ['autodocs'],
|
|
40
|
+
};
|
|
41
|
+
exports.default = meta;
|
|
42
|
+
exports.Default = {
|
|
43
|
+
args: {
|
|
44
|
+
id: 'default-select',
|
|
45
|
+
options: initialOptions,
|
|
46
|
+
placeholder: 'Select options...',
|
|
47
|
+
dataUieName: 'default-select',
|
|
48
|
+
createOptionLabel: inputValue => `Create item "${inputValue}"`,
|
|
49
|
+
onCreateOption: () => { },
|
|
50
|
+
noOptionsMessage: 'No options available',
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
exports.WithValue = {
|
|
54
|
+
args: {
|
|
55
|
+
id: 'with-value-select',
|
|
56
|
+
options: initialOptions,
|
|
57
|
+
value: [initialOptions[0], initialOptions[1]],
|
|
58
|
+
placeholder: 'Select options...',
|
|
59
|
+
dataUieName: 'with-value-select',
|
|
60
|
+
createOptionLabel: inputValue => `Create item "${inputValue}"`,
|
|
61
|
+
onCreateOption: () => { },
|
|
62
|
+
noOptionsMessage: 'No options available',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
exports.Disabled = {
|
|
66
|
+
args: {
|
|
67
|
+
id: 'disabled-select',
|
|
68
|
+
options: initialOptions,
|
|
69
|
+
isDisabled: true,
|
|
70
|
+
placeholder: 'Select options...',
|
|
71
|
+
dataUieName: 'disabled-select',
|
|
72
|
+
createOptionLabel: inputValue => `Create item "${inputValue}"`,
|
|
73
|
+
onCreateOption: () => { },
|
|
74
|
+
noOptionsMessage: 'No options available',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
const CreatableSelectWrapper = (args) => {
|
|
78
|
+
const [options, setOptions] = (0, react_1.useState)(initialOptions);
|
|
79
|
+
const [selectedValue, setSelectedValue] = (0, react_1.useState)([]);
|
|
80
|
+
const handleCreateOption = (inputValue) => {
|
|
81
|
+
const newOption = {
|
|
82
|
+
value: inputValue.toLowerCase().replace(/\W/g, ''),
|
|
83
|
+
label: inputValue,
|
|
84
|
+
};
|
|
85
|
+
setOptions(prev => [...prev, newOption]);
|
|
86
|
+
setSelectedValue(prev => [...prev, newOption]);
|
|
87
|
+
};
|
|
88
|
+
const handleChange = (value) => {
|
|
89
|
+
setSelectedValue(Array.isArray(value) ? value : [value]);
|
|
90
|
+
};
|
|
91
|
+
return ((0, jsx_runtime_1.jsx)(ComboboxSelect_1.ComboboxSelect, { ...args, options: options, value: selectedValue, onChange: handleChange, onCreateOption: handleCreateOption }));
|
|
92
|
+
};
|
|
93
|
+
exports.Creatable = {
|
|
94
|
+
args: {
|
|
95
|
+
id: 'creatable-select',
|
|
96
|
+
options: initialOptions,
|
|
97
|
+
placeholder: 'Select or create options...',
|
|
98
|
+
dataUieName: 'creatable-select',
|
|
99
|
+
createOptionLabel: inputValue => `Create item "${inputValue}"`,
|
|
100
|
+
onCreateOption: () => { },
|
|
101
|
+
noOptionsMessage: 'No options available',
|
|
102
|
+
required: true,
|
|
103
|
+
},
|
|
104
|
+
render: args => (0, jsx_runtime_1.jsx)(CreatableSelectWrapper, { ...args }),
|
|
105
|
+
};
|
|
106
|
+
exports.WithLabel = {
|
|
107
|
+
args: {
|
|
108
|
+
id: 'with-label-select',
|
|
109
|
+
label: 'Select options',
|
|
110
|
+
options: initialOptions,
|
|
111
|
+
createOptionLabel: inputValue => `Create item "${inputValue}"`,
|
|
112
|
+
onCreateOption: () => { },
|
|
113
|
+
noOptionsMessage: 'No options available',
|
|
114
|
+
},
|
|
115
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
2
|
+
import { StylesConfig } from 'react-select';
|
|
3
|
+
import { Theme } from '../../../Layout';
|
|
4
|
+
interface SelectStylesParams {
|
|
5
|
+
theme: Theme;
|
|
6
|
+
markInvalid?: boolean;
|
|
7
|
+
menuPosition?: 'absolute' | 'relative';
|
|
8
|
+
controlCSS?: CSSObject;
|
|
9
|
+
containerCSS?: CSSObject;
|
|
10
|
+
}
|
|
11
|
+
export declare const wrapperStyles: CSSObject;
|
|
12
|
+
export declare const selectStyles: ({ theme, markInvalid, controlCSS, containerCSS, }: SelectStylesParams) => StylesConfig;
|
|
13
|
+
export declare const noOptionsMessageStyles: {
|
|
14
|
+
padding: string;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ComboboxSelect.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxSelect.styles.d.ts","sourceRoot":"","sources":["../../../../src/Form/Select/ComboboxSelect/ComboboxSelect.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAYtC,UAAU,kBAAkB;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACvC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,SAO3B,CAAC;AAEF,eAAO,MAAM,YAAY,sDAKtB,kBAAkB,KAAG,YAgFtB,CAAC;AAEH,eAAO,MAAM,sBAAsB;;CAElC,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2024 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.noOptionsMessageStyles = exports.selectStyles = exports.wrapperStyles = void 0;
|
|
22
|
+
const BaseSelect_styles_1 = require("../BaseSelect/BaseSelect.styles");
|
|
23
|
+
exports.wrapperStyles = {
|
|
24
|
+
marginBottom: '20px',
|
|
25
|
+
width: '100%',
|
|
26
|
+
position: 'relative',
|
|
27
|
+
'& .select__menu': {
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const selectStyles = ({ theme, markInvalid = false, controlCSS = {}, containerCSS = {}, }) => ({
|
|
32
|
+
indicatorSeparator: () => (0, BaseSelect_styles_1.baseIndicatorSeparatorStyles)(),
|
|
33
|
+
indicatorsContainer: provided => provided,
|
|
34
|
+
container: provided => ({
|
|
35
|
+
...provided,
|
|
36
|
+
...(0, BaseSelect_styles_1.baseContainerStyles)(containerCSS),
|
|
37
|
+
}),
|
|
38
|
+
control: (_, { isDisabled, selectProps }) => (0, BaseSelect_styles_1.baseControlStyles)({ theme, isDisabled, markInvalid, selectProps, controlCSS }),
|
|
39
|
+
dropdownIndicator: (provided, selectProps) => ({
|
|
40
|
+
...provided,
|
|
41
|
+
...(0, BaseSelect_styles_1.baseDropdownIndicatorStyles)({ theme, selectProps }),
|
|
42
|
+
}),
|
|
43
|
+
menuList: provided => ({
|
|
44
|
+
...provided,
|
|
45
|
+
...(0, BaseSelect_styles_1.baseMenuListStyles)(),
|
|
46
|
+
}),
|
|
47
|
+
option: (provided, { isDisabled, isFocused, isSelected, isMulti }) => ({
|
|
48
|
+
...provided,
|
|
49
|
+
...(0, BaseSelect_styles_1.baseOptionStyles)({ theme, isDisabled, isFocused, isSelected, isMulti }),
|
|
50
|
+
padding: '10px 18px',
|
|
51
|
+
fontWeight: 400,
|
|
52
|
+
'&:not(:last-of-type)': {
|
|
53
|
+
borderBottom: `1px solid ${theme.Select.borderColor}`,
|
|
54
|
+
},
|
|
55
|
+
'&:first-of-type': {
|
|
56
|
+
borderRadius: '0',
|
|
57
|
+
},
|
|
58
|
+
'&:last-of-type': {
|
|
59
|
+
borderRadius: '0',
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
singleValue: (provided, selectProps) => ({
|
|
63
|
+
...provided,
|
|
64
|
+
...(0, BaseSelect_styles_1.baseSingleValueStyles)({ theme, selectProps }),
|
|
65
|
+
}),
|
|
66
|
+
menu: provided => ({
|
|
67
|
+
...provided,
|
|
68
|
+
...(0, BaseSelect_styles_1.baseMenuStyles)({ theme, menuPosition: 'absolute' }),
|
|
69
|
+
width: '100%',
|
|
70
|
+
zIndex: 1,
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
}),
|
|
73
|
+
multiValue: provided => ({
|
|
74
|
+
...provided,
|
|
75
|
+
backgroundColor: theme.Select.optionHoverBg,
|
|
76
|
+
borderRadius: 8,
|
|
77
|
+
margin: 4,
|
|
78
|
+
fontSize: '14px',
|
|
79
|
+
height: '24px',
|
|
80
|
+
}),
|
|
81
|
+
multiValueLabel: provided => ({
|
|
82
|
+
...provided,
|
|
83
|
+
color: theme.general.primaryColor,
|
|
84
|
+
fontWeight: 500,
|
|
85
|
+
padding: '0 8px 0 0',
|
|
86
|
+
}),
|
|
87
|
+
multiValueRemove: provided => ({
|
|
88
|
+
...provided,
|
|
89
|
+
color: theme.general.primaryColor,
|
|
90
|
+
paddingLeft: 2,
|
|
91
|
+
paddingRight: 6,
|
|
92
|
+
':hover': {
|
|
93
|
+
backgroundColor: 'transparent',
|
|
94
|
+
color: theme.general.primaryColor,
|
|
95
|
+
},
|
|
96
|
+
'& svg': {
|
|
97
|
+
fill: 'currentColor',
|
|
98
|
+
},
|
|
99
|
+
}),
|
|
100
|
+
valueContainer: provided => ({
|
|
101
|
+
...provided,
|
|
102
|
+
padding: 0,
|
|
103
|
+
width: '100%',
|
|
104
|
+
display: 'flex',
|
|
105
|
+
flexWrap: 'wrap',
|
|
106
|
+
maxHeight: '72px',
|
|
107
|
+
overflowY: 'auto',
|
|
108
|
+
}),
|
|
109
|
+
});
|
|
110
|
+
exports.selectStyles = selectStyles;
|
|
111
|
+
exports.noOptionsMessageStyles = {
|
|
112
|
+
padding: '8px 12px',
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/Form/Select/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AACnD,OAAoB,EAAC,SAAS,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAevF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,WAAW,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,CACnF,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,OAAO,UAAU,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,yOAmBpF,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,qDAuE7B,CAAC"}
|