@atlaskit/select 15.2.4 → 15.2.5
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/CHANGELOG.md +7 -0
- package/dist/cjs/PopupSelect/PopupSelect.js +1 -3
- package/dist/cjs/PopupSelect/components.js +2 -4
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/components/input-options.js +34 -36
- package/dist/cjs/styles.js +37 -39
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/PopupSelect/PopupSelect.js +1 -2
- package/dist/es2019/PopupSelect/components.js +2 -3
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/components/input-options.js +34 -35
- package/dist/es2019/styles.js +37 -38
- package/dist/es2019/version.json +1 -1
- package/dist/esm/PopupSelect/PopupSelect.js +1 -2
- package/dist/esm/PopupSelect/components.js +2 -3
- package/dist/esm/Select.js +1 -1
- package/dist/esm/components/input-options.js +34 -35
- package/dist/esm/styles.js +37 -38
- package/dist/esm/version.json +1 -1
- package/package.json +8 -5
|
@@ -9,7 +9,6 @@ import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
|
9
9
|
import { themed } from '@atlaskit/theme/components';
|
|
10
10
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
11
11
|
import { B100, B200, B300, B400, B75, DN200, DN10, DN30, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
|
|
14
13
|
const getPrimitiveStyles = props => {
|
|
15
14
|
const {
|
|
@@ -22,15 +21,15 @@ const getPrimitiveStyles = props => {
|
|
|
22
21
|
} = props;
|
|
23
22
|
const styles = {
|
|
24
23
|
alignItems: 'center',
|
|
25
|
-
backgroundColor: isFocused ?
|
|
26
|
-
color: isDisabled ?
|
|
24
|
+
backgroundColor: isFocused ? `var(--ds-background-transparentNeutral-hover, ${N20})` : 'transparent',
|
|
25
|
+
color: isDisabled ? "var(--ds-text-disabled, inherit)" : 'inherit',
|
|
27
26
|
display: 'flex ',
|
|
28
27
|
paddingBottom: 4,
|
|
29
28
|
paddingLeft: `${gridSize() * 2}px`,
|
|
30
29
|
paddingTop: 4,
|
|
31
|
-
boxShadow: isFocused ? `inset 2px 0px 0px ${
|
|
30
|
+
boxShadow: isFocused ? `inset 2px 0px 0px ${`var(--ds-text-selected, ${B400})`};` : '',
|
|
32
31
|
':active': {
|
|
33
|
-
backgroundColor:
|
|
32
|
+
backgroundColor: `var(--ds-background-transparentNeutral-pressed, ${N30})`
|
|
34
33
|
},
|
|
35
34
|
'@media screen and (-ms-high-contrast: active)': {
|
|
36
35
|
borderLeft: isFocused ? '2px solid transparent' : ''
|
|
@@ -51,8 +50,8 @@ const getPrimitiveStyles = props => {
|
|
|
51
50
|
|
|
52
51
|
|
|
53
52
|
const backgroundColor = themed({
|
|
54
|
-
light:
|
|
55
|
-
dark:
|
|
53
|
+
light: `var(--ds-background-subtleNeutral-resting, ${N0})`,
|
|
54
|
+
dark: `var(--ds-background-subtleNeutral-resting, ${DN10})`
|
|
56
55
|
});
|
|
57
56
|
const transparent = themed({
|
|
58
57
|
light: 'transparent',
|
|
@@ -71,38 +70,38 @@ const getPrimaryColor = ({
|
|
|
71
70
|
|
|
72
71
|
if (isDisabled && isSelected) {
|
|
73
72
|
color = themed({
|
|
74
|
-
light:
|
|
75
|
-
dark:
|
|
73
|
+
light: `var(--ds-background-disabled, ${B75})`,
|
|
74
|
+
dark: `var(--ds-background-disabled, ${DN200})`
|
|
76
75
|
});
|
|
77
76
|
} else if (isDisabled) {
|
|
78
77
|
color = themed({
|
|
79
|
-
light:
|
|
80
|
-
dark:
|
|
78
|
+
light: `var(--ds-background-disabled, ${N20A})`,
|
|
79
|
+
dark: `var(--ds-background-disabled, ${DN10})`
|
|
81
80
|
});
|
|
82
81
|
} else if (isSelected && isActive) {
|
|
83
82
|
color = themed({
|
|
84
|
-
light:
|
|
85
|
-
dark:
|
|
83
|
+
light: `var(--ds-background-boldBrand-pressed, ${B75})`,
|
|
84
|
+
dark: `var(--ds-background-boldBrand-pressed, ${B200})`
|
|
86
85
|
});
|
|
87
86
|
} else if (isActive) {
|
|
88
87
|
color = themed({
|
|
89
|
-
light:
|
|
90
|
-
dark:
|
|
88
|
+
light: `var(--ds-background-subtleBrand-pressed, ${B75})`,
|
|
89
|
+
dark: `var(--ds-background-subtleBrand-pressed, ${B200})`
|
|
91
90
|
});
|
|
92
91
|
} else if (isFocused && isSelected) {
|
|
93
92
|
color = themed({
|
|
94
|
-
light:
|
|
95
|
-
dark:
|
|
93
|
+
light: `var(--ds-background-boldBrand-hover, ${B300})`,
|
|
94
|
+
dark: `var(--ds-background-boldBrand-hover, ${B75})`
|
|
96
95
|
});
|
|
97
96
|
} else if (isFocused) {
|
|
98
97
|
color = themed({
|
|
99
|
-
light:
|
|
100
|
-
dark:
|
|
98
|
+
light: `var(--ds-background-default, ${N0})`,
|
|
99
|
+
dark: `var(--ds-background-default, ${DN30})`
|
|
101
100
|
});
|
|
102
101
|
} else if (isSelected) {
|
|
103
102
|
color = themed({
|
|
104
|
-
light:
|
|
105
|
-
dark:
|
|
103
|
+
light: `var(--ds-background-boldBrand-resting, ${B400})`,
|
|
104
|
+
dark: `var(--ds-background-boldBrand-resting, ${B100})`
|
|
106
105
|
});
|
|
107
106
|
}
|
|
108
107
|
|
|
@@ -117,19 +116,19 @@ const getSecondaryColor = ({
|
|
|
117
116
|
...rest
|
|
118
117
|
}) => {
|
|
119
118
|
let color = themed({
|
|
120
|
-
light:
|
|
121
|
-
dark:
|
|
119
|
+
light: `var(--ds-background-default, ${N0})`,
|
|
120
|
+
dark: `var(--ds-background-default, ${DN10})`
|
|
122
121
|
});
|
|
123
122
|
|
|
124
123
|
if (isDisabled && isSelected) {
|
|
125
124
|
color = themed({
|
|
126
|
-
light:
|
|
127
|
-
dark:
|
|
125
|
+
light: `var(--ds-text-disabled, ${N70})`,
|
|
126
|
+
dark: `var(--ds-text-disabled, ${DN10})`
|
|
128
127
|
});
|
|
129
128
|
} else if (isActive && isSelected && !isDisabled) {
|
|
130
129
|
color = themed({
|
|
131
|
-
light:
|
|
132
|
-
dark:
|
|
130
|
+
light: `var(--ds-background-default, ${B400})`,
|
|
131
|
+
dark: `var(--ds-background-default, ${DN10})`
|
|
133
132
|
});
|
|
134
133
|
} else if (!isSelected) {
|
|
135
134
|
color = transparent;
|
|
@@ -147,22 +146,22 @@ const getBorderColor = ({
|
|
|
147
146
|
...rest
|
|
148
147
|
}) => {
|
|
149
148
|
if (isDisabled && isSelected) {
|
|
150
|
-
return
|
|
149
|
+
return `var(--ds-background-disabled, ${B400})`;
|
|
151
150
|
} else if (isDisabled) {
|
|
152
|
-
return
|
|
151
|
+
return `var(--ds-background-disabled, ${N100})`;
|
|
153
152
|
} else if (isSelected && isActive) {
|
|
154
|
-
return
|
|
153
|
+
return `var(--ds-background-boldBrand-pressed, ${B400})`;
|
|
155
154
|
} else if (isActive) {
|
|
156
|
-
return
|
|
155
|
+
return `var(--ds-background-boldBrand-resting, ${B400})`;
|
|
157
156
|
} else if (isFocused && isSelected) {
|
|
158
|
-
return
|
|
157
|
+
return `var(--ds-background-boldBrand-hover, ${B400})`;
|
|
159
158
|
} else if (isFocused) {
|
|
160
|
-
return
|
|
159
|
+
return `var(--ds-border-neutral, ${N100})`;
|
|
161
160
|
} else if (isSelected) {
|
|
162
|
-
return
|
|
161
|
+
return `var(--ds-background-boldBrand-resting, ${B400})`;
|
|
163
162
|
}
|
|
164
163
|
|
|
165
|
-
return
|
|
164
|
+
return `var(--ds-border-neutral, ${N100})`;
|
|
166
165
|
};
|
|
167
166
|
|
|
168
167
|
class ControlOption extends Component {
|
package/dist/es2019/styles.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { gridSize, fontFamily } from '@atlaskit/theme/constants';
|
|
2
2
|
import { B100, B400, B50, G400, N0, N20, N200, N30, N300, N40, N500, N70, N800, R400, R75 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
const BORDER_WIDTH = 2;
|
|
5
4
|
const ICON_PADDING = 2;
|
|
6
5
|
const paddingExcludingBorder = gridSize() - BORDER_WIDTH;
|
|
@@ -16,37 +15,37 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
16
15
|
cursor: isDisabled ? 'not-allowed' : undefined
|
|
17
16
|
}),
|
|
18
17
|
input: css => ({ ...css,
|
|
19
|
-
color:
|
|
18
|
+
color: "var(--ds-text-highEmphasis, hsl(0, 0%, 20%))"
|
|
20
19
|
}),
|
|
21
20
|
control: (css, {
|
|
22
21
|
isFocused,
|
|
23
22
|
isDisabled
|
|
24
23
|
}) => {
|
|
25
|
-
let borderColor = isFocused ?
|
|
26
|
-
let backgroundColor = isFocused ?
|
|
27
|
-
let backgroundColorHover = isFocused ?
|
|
24
|
+
let borderColor = isFocused ? `var(--ds-border-focus, ${B100})` : `var(--ds-border-neutral, ${N20})`;
|
|
25
|
+
let backgroundColor = isFocused ? `var(--ds-background-default, ${N0})` : `var(--ds-background-subtleNeutral-resting, ${N20})`;
|
|
26
|
+
let backgroundColorHover = isFocused ? `var(--ds-background-default, ${N0})` : `var(--ds-background-default, ${N30})`;
|
|
28
27
|
|
|
29
28
|
if (isDisabled) {
|
|
30
|
-
backgroundColor =
|
|
31
|
-
borderColor =
|
|
29
|
+
backgroundColor = `var(--ds-background-subtleNeutral-resting, ${N20})`;
|
|
30
|
+
borderColor = `var(--ds-background-disabled, ${N20})`;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
if (validationState === 'error') {
|
|
35
|
-
borderColor =
|
|
34
|
+
borderColor = `var(--ds-iconBorder-danger, ${R400})`;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
if (validationState === 'success') {
|
|
39
|
-
borderColor =
|
|
38
|
+
borderColor = `var(--ds-iconBorder-success, ${G400})`;
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
let borderColorHover = isFocused ?
|
|
41
|
+
let borderColorHover = isFocused ? `var(--ds-border-focus, ${B100})` : `var(--ds-border-neutral, ${N30})`;
|
|
43
42
|
|
|
44
43
|
if (validationState === 'error') {
|
|
45
|
-
borderColorHover =
|
|
44
|
+
borderColorHover = `var(--ds-iconBorder-danger, ${R400})`;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
if (validationState === 'success') {
|
|
49
|
-
borderColorHover =
|
|
48
|
+
borderColorHover = `var(--ds-iconBorder-success, ${G400})`;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
const transitionDuration = '200ms';
|
|
@@ -93,13 +92,13 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
93
92
|
paddingTop: isCompact ? 0 : 2
|
|
94
93
|
}),
|
|
95
94
|
clearIndicator: css => ({ ...css,
|
|
96
|
-
color:
|
|
95
|
+
color: `var(--ds-text-lowEmphasis, ${N70})`,
|
|
97
96
|
paddingLeft: ICON_PADDING,
|
|
98
97
|
paddingRight: ICON_PADDING,
|
|
99
98
|
paddingBottom: isCompact ? 0 : 6,
|
|
100
99
|
paddingTop: isCompact ? 0 : 6,
|
|
101
100
|
':hover': {
|
|
102
|
-
color:
|
|
101
|
+
color: `var(--ds-text-mediumEmphasis, ${N500})`
|
|
103
102
|
}
|
|
104
103
|
}),
|
|
105
104
|
loadingIndicator: css => ({ ...css,
|
|
@@ -109,10 +108,10 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
109
108
|
dropdownIndicator: (css, {
|
|
110
109
|
isDisabled
|
|
111
110
|
}) => {
|
|
112
|
-
let color =
|
|
111
|
+
let color = `var(--ds-text-mediumEmphasis, ${N500})`;
|
|
113
112
|
|
|
114
113
|
if (isDisabled) {
|
|
115
|
-
color =
|
|
114
|
+
color = `var(--ds-text-disabled, ${N70})`;
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
return { ...css,
|
|
@@ -122,7 +121,7 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
122
121
|
paddingBottom: isCompact ? 0 : 6,
|
|
123
122
|
paddingTop: isCompact ? 0 : 6,
|
|
124
123
|
':hover': {
|
|
125
|
-
color:
|
|
124
|
+
color: `var(--ds-text-mediumEmphasis, ${N200})`
|
|
126
125
|
}
|
|
127
126
|
};
|
|
128
127
|
},
|
|
@@ -134,12 +133,12 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
134
133
|
isSelected,
|
|
135
134
|
isDisabled
|
|
136
135
|
}) => {
|
|
137
|
-
let color =
|
|
136
|
+
let color = `var(--ds-text-highEmphasis, ${N800})`;
|
|
138
137
|
|
|
139
138
|
if (isDisabled) {
|
|
140
|
-
color =
|
|
139
|
+
color = `var(--ds-text-disabled, ${N70})`;
|
|
141
140
|
} else if (isSelected) {
|
|
142
|
-
color =
|
|
141
|
+
color = `var(--ds-text-selected, ${B400})`;
|
|
143
142
|
}
|
|
144
143
|
|
|
145
144
|
let boxShadow;
|
|
@@ -148,15 +147,15 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
148
147
|
if (isDisabled) {
|
|
149
148
|
backgroundColor = undefined;
|
|
150
149
|
} else if (isSelected && isFocused) {
|
|
151
|
-
backgroundColor =
|
|
150
|
+
backgroundColor = `var(--ds-background-selected-hover, ${B50})`;
|
|
152
151
|
} else if (isSelected) {
|
|
153
|
-
backgroundColor =
|
|
152
|
+
backgroundColor = `var(--ds-background-selected-resting, ${B50})`;
|
|
154
153
|
} else if (isFocused) {
|
|
155
|
-
backgroundColor =
|
|
154
|
+
backgroundColor = `var(--ds-background-transparentNeutral-hover, ${N20})`;
|
|
156
155
|
}
|
|
157
156
|
|
|
158
157
|
if (!isDisabled && (isFocused || isSelected)) {
|
|
159
|
-
boxShadow = `inset 2px 0px 0px ${
|
|
158
|
+
boxShadow = `inset 2px 0px 0px ${`var(--ds-text-selected, ${B400})`}`;
|
|
160
159
|
}
|
|
161
160
|
|
|
162
161
|
const cursor = isDisabled ? 'not-allowed' : undefined;
|
|
@@ -167,7 +166,7 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
167
166
|
cursor,
|
|
168
167
|
boxShadow,
|
|
169
168
|
':active': {
|
|
170
|
-
backgroundColor: !isDisabled ? isSelected ?
|
|
169
|
+
backgroundColor: !isDisabled ? isSelected ? `var(--ds-background-selected-pressed, ${N20})` : `var(--ds-background-transparentNeutral-pressed, ${N30})` : undefined
|
|
171
170
|
},
|
|
172
171
|
'@media screen and (-ms-high-contrast: active)': {
|
|
173
172
|
borderLeft: !isDisabled && (isFocused || isSelected) ? '2px solid transparent' : ''
|
|
@@ -177,18 +176,18 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
177
176
|
placeholder: (css, {
|
|
178
177
|
isDisabled
|
|
179
178
|
}) => ({ ...css,
|
|
180
|
-
color: isDisabled ?
|
|
179
|
+
color: isDisabled ? `var(--ds-text-disabled, ${N300})` : `var(--ds-text-lowEmphasis, ${N300})`
|
|
181
180
|
}),
|
|
182
181
|
singleValue: (css, {
|
|
183
182
|
isDisabled
|
|
184
183
|
}) => ({ ...css,
|
|
185
|
-
color: isDisabled ?
|
|
184
|
+
color: isDisabled ? `var(--ds-text-disabled, ${N70})` : `var(--ds-text-highEmphasis, ${N800})`,
|
|
186
185
|
lineHeight: `${gridSize() * 2}px` // 16px
|
|
187
186
|
|
|
188
187
|
}),
|
|
189
188
|
menu: css => ({ ...css,
|
|
190
|
-
backgroundColor:
|
|
191
|
-
boxShadow:
|
|
189
|
+
backgroundColor: "var(--ds-background-overlay, white)",
|
|
190
|
+
boxShadow: "var(--ds-overlay, 0 0 0 1px hsl(0deg 0% 0% / 10%), 0 4px 11px hsl(0deg 0% 0% / 10%))"
|
|
192
191
|
}),
|
|
193
192
|
menuList: css => ({ ...css,
|
|
194
193
|
paddingTop: gridSize(),
|
|
@@ -198,8 +197,8 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
198
197
|
isFocused
|
|
199
198
|
}) => ({ ...css,
|
|
200
199
|
borderRadius: '2px',
|
|
201
|
-
backgroundColor: isFocused ?
|
|
202
|
-
boxShadow: isFocused ? `0 0 0 2px ${
|
|
200
|
+
backgroundColor: isFocused ? `var(--ds-background-selected-resting, ${N40})` : `var(--ds-background-transparentNeutral-hover, ${N40})`,
|
|
201
|
+
boxShadow: isFocused ? `0 0 0 2px ${"var(--ds-background-default, transparent)"}, 0 0 0 4px ${"var(--ds-border-focus, transparent)"}` : 'none',
|
|
203
202
|
maxWidth: '100%',
|
|
204
203
|
'@media screen and (-ms-high-contrast: active)': {
|
|
205
204
|
border: isFocused ? '1px solid transparent' : 'none'
|
|
@@ -209,25 +208,25 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
209
208
|
isFocused
|
|
210
209
|
}) => ({ ...css,
|
|
211
210
|
padding: '2px',
|
|
212
|
-
color: isFocused ?
|
|
211
|
+
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text-highEmphasis, hsl(0, 0%, 20%))",
|
|
213
212
|
paddingRight: '2px'
|
|
214
213
|
}),
|
|
215
214
|
multiValueRemove: (css, {
|
|
216
215
|
// @ts-ignore: missing in @types/react-select
|
|
217
216
|
isFocused
|
|
218
217
|
}) => ({ ...css,
|
|
219
|
-
backgroundColor: isFocused &&
|
|
220
|
-
fill: isFocused ?
|
|
218
|
+
backgroundColor: isFocused && `var(--ds-background-selected-resting, ${R75})`,
|
|
219
|
+
fill: isFocused ? "var(--ds-text-selected, #000)" : "var(--ds-text-highEmphasis, #000)",
|
|
221
220
|
paddingLeft: '2px',
|
|
222
221
|
paddingRight: '2px',
|
|
223
222
|
borderRadius: '0px 2px 2px 0px',
|
|
224
223
|
':hover': {
|
|
225
|
-
backgroundColor:
|
|
226
|
-
fill:
|
|
224
|
+
backgroundColor: `var(--ds-background-subtleDanger-hover, ${R75})`,
|
|
225
|
+
fill: "var(--ds-text-danger, #000)"
|
|
227
226
|
},
|
|
228
227
|
':active': {
|
|
229
|
-
backgroundColor:
|
|
230
|
-
fill:
|
|
228
|
+
backgroundColor: `var(--ds-background-subtleDanger-pressed, ${R75})`,
|
|
229
|
+
fill: "var(--ds-text-danger, #000)"
|
|
231
230
|
}
|
|
232
231
|
})
|
|
233
232
|
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -25,7 +25,6 @@ import { Manager, Reference, Popper } from 'react-popper';
|
|
|
25
25
|
import NodeResolver from 'react-node-resolver';
|
|
26
26
|
import shallowEqualObjects from 'shallow-equal/objects';
|
|
27
27
|
import { N80 } from '@atlaskit/theme/colors';
|
|
28
|
-
import { token } from '@atlaskit/tokens';
|
|
29
28
|
import { MenuDialog, DummyControl, defaultComponents } from './components';
|
|
30
29
|
import baseStyles from '../styles';
|
|
31
30
|
|
|
@@ -90,7 +89,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
90
89
|
_defineProperty(_assertThisInitialized(_this), "defaultStyles", mergeStyles(baseStyles(_this.props.validationState, _this.props.spacing === 'compact'), {
|
|
91
90
|
groupHeading: function groupHeading(provided) {
|
|
92
91
|
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
93
|
-
color:
|
|
92
|
+
color: "var(--ds-text-lowEmphasis, ".concat(N80, ")")
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
95
|
}));
|
|
@@ -7,7 +7,6 @@ import { jsx } from '@emotion/core';
|
|
|
7
7
|
import SearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
8
8
|
import { layers } from '@atlaskit/theme/constants';
|
|
9
9
|
import { N40A } from '@atlaskit/theme/colors';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
export var MenuDialog = function MenuDialog(_ref) {
|
|
12
11
|
var maxWidth = _ref.maxWidth,
|
|
13
12
|
minWidth = _ref.minWidth,
|
|
@@ -16,9 +15,9 @@ export var MenuDialog = function MenuDialog(_ref) {
|
|
|
16
15
|
style = _ref.style;
|
|
17
16
|
return jsx("div", {
|
|
18
17
|
css: {
|
|
19
|
-
backgroundColor:
|
|
18
|
+
backgroundColor: "var(--ds-background-overlay, white)",
|
|
20
19
|
borderRadius: 4,
|
|
21
|
-
boxShadow:
|
|
20
|
+
boxShadow: "var(--ds-overlay, ".concat("0 0 0 1px ".concat(N40A, ", 0 4px 11px ").concat(N40A), ")"),
|
|
22
21
|
maxWidth: maxWidth,
|
|
23
22
|
minWidth: minWidth,
|
|
24
23
|
zIndex: layers.modal()
|
package/dist/esm/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select from 'react-select';
|
|
|
2
2
|
import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import createSelect from './createSelect';
|
|
4
4
|
var packageName = "@atlaskit/select";
|
|
5
|
-
var packageVersion = "15.2.
|
|
5
|
+
var packageVersion = "15.2.5";
|
|
6
6
|
export var SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -25,7 +25,6 @@ import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
|
25
25
|
import { themed } from '@atlaskit/theme/components';
|
|
26
26
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
27
27
|
import { B100, B200, B300, B400, B75, DN200, DN10, DN30, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
|
|
28
|
-
import { token } from '@atlaskit/tokens';
|
|
29
28
|
|
|
30
29
|
var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
31
30
|
var cx = props.cx,
|
|
@@ -36,15 +35,15 @@ var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
|
36
35
|
isSelected = props.isSelected;
|
|
37
36
|
var styles = {
|
|
38
37
|
alignItems: 'center',
|
|
39
|
-
backgroundColor: isFocused ?
|
|
40
|
-
color: isDisabled ?
|
|
38
|
+
backgroundColor: isFocused ? "var(--ds-background-transparentNeutral-hover, ".concat(N20, ")") : 'transparent',
|
|
39
|
+
color: isDisabled ? "var(--ds-text-disabled, inherit)" : 'inherit',
|
|
41
40
|
display: 'flex ',
|
|
42
41
|
paddingBottom: 4,
|
|
43
42
|
paddingLeft: "".concat(gridSize() * 2, "px"),
|
|
44
43
|
paddingTop: 4,
|
|
45
|
-
boxShadow: isFocused ? "inset 2px 0px 0px ".concat(
|
|
44
|
+
boxShadow: isFocused ? "inset 2px 0px 0px ".concat("var(--ds-text-selected, ".concat(B400, ")"), ";") : '',
|
|
46
45
|
':active': {
|
|
47
|
-
backgroundColor:
|
|
46
|
+
backgroundColor: "var(--ds-background-transparentNeutral-pressed, ".concat(N30, ")")
|
|
48
47
|
},
|
|
49
48
|
'@media screen and (-ms-high-contrast: active)': {
|
|
50
49
|
borderLeft: isFocused ? '2px solid transparent' : ''
|
|
@@ -65,8 +64,8 @@ var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
|
65
64
|
|
|
66
65
|
|
|
67
66
|
var backgroundColor = themed({
|
|
68
|
-
light:
|
|
69
|
-
dark:
|
|
67
|
+
light: "var(--ds-background-subtleNeutral-resting, ".concat(N0, ")"),
|
|
68
|
+
dark: "var(--ds-background-subtleNeutral-resting, ".concat(DN10, ")")
|
|
70
69
|
});
|
|
71
70
|
var transparent = themed({
|
|
72
71
|
light: 'transparent',
|
|
@@ -85,38 +84,38 @@ var getPrimaryColor = function getPrimaryColor(_ref) {
|
|
|
85
84
|
|
|
86
85
|
if (isDisabled && isSelected) {
|
|
87
86
|
color = themed({
|
|
88
|
-
light:
|
|
89
|
-
dark:
|
|
87
|
+
light: "var(--ds-background-disabled, ".concat(B75, ")"),
|
|
88
|
+
dark: "var(--ds-background-disabled, ".concat(DN200, ")")
|
|
90
89
|
});
|
|
91
90
|
} else if (isDisabled) {
|
|
92
91
|
color = themed({
|
|
93
|
-
light:
|
|
94
|
-
dark:
|
|
92
|
+
light: "var(--ds-background-disabled, ".concat(N20A, ")"),
|
|
93
|
+
dark: "var(--ds-background-disabled, ".concat(DN10, ")")
|
|
95
94
|
});
|
|
96
95
|
} else if (isSelected && isActive) {
|
|
97
96
|
color = themed({
|
|
98
|
-
light:
|
|
99
|
-
dark:
|
|
97
|
+
light: "var(--ds-background-boldBrand-pressed, ".concat(B75, ")"),
|
|
98
|
+
dark: "var(--ds-background-boldBrand-pressed, ".concat(B200, ")")
|
|
100
99
|
});
|
|
101
100
|
} else if (isActive) {
|
|
102
101
|
color = themed({
|
|
103
|
-
light:
|
|
104
|
-
dark:
|
|
102
|
+
light: "var(--ds-background-subtleBrand-pressed, ".concat(B75, ")"),
|
|
103
|
+
dark: "var(--ds-background-subtleBrand-pressed, ".concat(B200, ")")
|
|
105
104
|
});
|
|
106
105
|
} else if (isFocused && isSelected) {
|
|
107
106
|
color = themed({
|
|
108
|
-
light:
|
|
109
|
-
dark:
|
|
107
|
+
light: "var(--ds-background-boldBrand-hover, ".concat(B300, ")"),
|
|
108
|
+
dark: "var(--ds-background-boldBrand-hover, ".concat(B75, ")")
|
|
110
109
|
});
|
|
111
110
|
} else if (isFocused) {
|
|
112
111
|
color = themed({
|
|
113
|
-
light:
|
|
114
|
-
dark:
|
|
112
|
+
light: "var(--ds-background-default, ".concat(N0, ")"),
|
|
113
|
+
dark: "var(--ds-background-default, ".concat(DN30, ")")
|
|
115
114
|
});
|
|
116
115
|
} else if (isSelected) {
|
|
117
116
|
color = themed({
|
|
118
|
-
light:
|
|
119
|
-
dark:
|
|
117
|
+
light: "var(--ds-background-boldBrand-resting, ".concat(B400, ")"),
|
|
118
|
+
dark: "var(--ds-background-boldBrand-resting, ".concat(B100, ")")
|
|
120
119
|
});
|
|
121
120
|
}
|
|
122
121
|
|
|
@@ -131,19 +130,19 @@ var getSecondaryColor = function getSecondaryColor(_ref2) {
|
|
|
131
130
|
rest = _objectWithoutProperties(_ref2, ["isActive", "isDisabled", "isSelected"]);
|
|
132
131
|
|
|
133
132
|
var color = themed({
|
|
134
|
-
light:
|
|
135
|
-
dark:
|
|
133
|
+
light: "var(--ds-background-default, ".concat(N0, ")"),
|
|
134
|
+
dark: "var(--ds-background-default, ".concat(DN10, ")")
|
|
136
135
|
});
|
|
137
136
|
|
|
138
137
|
if (isDisabled && isSelected) {
|
|
139
138
|
color = themed({
|
|
140
|
-
light:
|
|
141
|
-
dark:
|
|
139
|
+
light: "var(--ds-text-disabled, ".concat(N70, ")"),
|
|
140
|
+
dark: "var(--ds-text-disabled, ".concat(DN10, ")")
|
|
142
141
|
});
|
|
143
142
|
} else if (isActive && isSelected && !isDisabled) {
|
|
144
143
|
color = themed({
|
|
145
|
-
light:
|
|
146
|
-
dark:
|
|
144
|
+
light: "var(--ds-background-default, ".concat(B400, ")"),
|
|
145
|
+
dark: "var(--ds-background-default, ".concat(DN10, ")")
|
|
147
146
|
});
|
|
148
147
|
} else if (!isSelected) {
|
|
149
148
|
color = transparent;
|
|
@@ -161,22 +160,22 @@ var getBorderColor = function getBorderColor(_ref3) {
|
|
|
161
160
|
rest = _objectWithoutProperties(_ref3, ["isActive", "isDisabled", "isFocused", "isSelected"]);
|
|
162
161
|
|
|
163
162
|
if (isDisabled && isSelected) {
|
|
164
|
-
return
|
|
163
|
+
return "var(--ds-background-disabled, ".concat(B400, ")");
|
|
165
164
|
} else if (isDisabled) {
|
|
166
|
-
return
|
|
165
|
+
return "var(--ds-background-disabled, ".concat(N100, ")");
|
|
167
166
|
} else if (isSelected && isActive) {
|
|
168
|
-
return
|
|
167
|
+
return "var(--ds-background-boldBrand-pressed, ".concat(B400, ")");
|
|
169
168
|
} else if (isActive) {
|
|
170
|
-
return
|
|
169
|
+
return "var(--ds-background-boldBrand-resting, ".concat(B400, ")");
|
|
171
170
|
} else if (isFocused && isSelected) {
|
|
172
|
-
return
|
|
171
|
+
return "var(--ds-background-boldBrand-hover, ".concat(B400, ")");
|
|
173
172
|
} else if (isFocused) {
|
|
174
|
-
return
|
|
173
|
+
return "var(--ds-border-neutral, ".concat(N100, ")");
|
|
175
174
|
} else if (isSelected) {
|
|
176
|
-
return
|
|
175
|
+
return "var(--ds-background-boldBrand-resting, ".concat(B400, ")");
|
|
177
176
|
}
|
|
178
177
|
|
|
179
|
-
return
|
|
178
|
+
return "var(--ds-border-neutral, ".concat(N100, ")");
|
|
180
179
|
};
|
|
181
180
|
|
|
182
181
|
var ControlOption = /*#__PURE__*/function (_Component) {
|