@atlaskit/select 15.2.2 → 15.2.6

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.
@@ -1,12 +1,11 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
 
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
7
  import { gridSize, fontFamily } from '@atlaskit/theme/constants';
8
8
  import { B100, B400, B50, G400, N0, N20, N200, N30, N300, N40, N500, N70, N800, R400, R75 } from '@atlaskit/theme/colors';
9
- import { token } from '@atlaskit/tokens';
10
9
  var BORDER_WIDTH = 2;
11
10
  var ICON_PADDING = 2;
12
11
  var paddingExcludingBorder = gridSize() - BORDER_WIDTH;
@@ -24,37 +23,37 @@ export default function baseStyles(validationState, isCompact) {
24
23
  },
25
24
  input: function input(css) {
26
25
  return _objectSpread(_objectSpread({}, css), {}, {
27
- color: token('color.text.highEmphasis', 'hsl(0, 0%, 20%)')
26
+ color: "var(--ds-text-highEmphasis, hsl(0, 0%, 20%))"
28
27
  });
29
28
  },
30
29
  control: function control(css, _ref2) {
31
30
  var isFocused = _ref2.isFocused,
32
31
  isDisabled = _ref2.isDisabled;
33
- var borderColor = isFocused ? token('color.border.focus', B100) : token('color.border.neutral', N20);
34
- var backgroundColor = isFocused ? token('color.background.default', N0) : token('color.background.subtleNeutral.resting', N20);
35
- var backgroundColorHover = isFocused ? token('color.background.default', N0) : token('color.background.default', N30);
32
+ var borderColor = isFocused ? "var(--ds-border-focus, ".concat(B100, ")") : "var(--ds-border-neutral, ".concat(N20, ")");
33
+ var backgroundColor = isFocused ? "var(--ds-background-default, ".concat(N0, ")") : "var(--ds-background-subtleNeutral-resting, ".concat(N20, ")");
34
+ var backgroundColorHover = isFocused ? "var(--ds-background-default, ".concat(N0, ")") : "var(--ds-background-default, ".concat(N30, ")");
36
35
 
37
36
  if (isDisabled) {
38
- backgroundColor = token('color.background.subtleNeutral.resting', N20);
39
- borderColor = token('color.background.disabled', N20);
37
+ backgroundColor = "var(--ds-background-subtleNeutral-resting, ".concat(N20, ")");
38
+ borderColor = "var(--ds-background-disabled, ".concat(N20, ")");
40
39
  }
41
40
 
42
41
  if (validationState === 'error') {
43
- borderColor = token('color.iconBorder.danger', R400);
42
+ borderColor = "var(--ds-iconBorder-danger, ".concat(R400, ")");
44
43
  }
45
44
 
46
45
  if (validationState === 'success') {
47
- borderColor = token('color.iconBorder.success', G400);
46
+ borderColor = "var(--ds-iconBorder-success, ".concat(G400, ")");
48
47
  }
49
48
 
50
- var borderColorHover = isFocused ? token('color.border.focus', B100) : token('color.border.neutral', N30);
49
+ var borderColorHover = isFocused ? "var(--ds-border-focus, ".concat(B100, ")") : "var(--ds-border-neutral, ".concat(N30, ")");
51
50
 
52
51
  if (validationState === 'error') {
53
- borderColorHover = token('color.iconBorder.danger', R400);
52
+ borderColorHover = "var(--ds-iconBorder-danger, ".concat(R400, ")");
54
53
  }
55
54
 
56
55
  if (validationState === 'success') {
57
- borderColorHover = token('color.iconBorder.success', G400);
56
+ borderColorHover = "var(--ds-iconBorder-success, ".concat(G400, ")");
58
57
  }
59
58
 
60
59
  var transitionDuration = '200ms';
@@ -103,13 +102,13 @@ export default function baseStyles(validationState, isCompact) {
103
102
  },
104
103
  clearIndicator: function clearIndicator(css) {
105
104
  return _objectSpread(_objectSpread({}, css), {}, {
106
- color: token('color.text.lowEmphasis', N70),
105
+ color: "var(--ds-text-lowEmphasis, ".concat(N70, ")"),
107
106
  paddingLeft: ICON_PADDING,
108
107
  paddingRight: ICON_PADDING,
109
108
  paddingBottom: isCompact ? 0 : 6,
110
109
  paddingTop: isCompact ? 0 : 6,
111
110
  ':hover': {
112
- color: token('color.text.mediumEmphasis', N500)
111
+ color: "var(--ds-text-mediumEmphasis, ".concat(N500, ")")
113
112
  }
114
113
  });
115
114
  },
@@ -121,10 +120,10 @@ export default function baseStyles(validationState, isCompact) {
121
120
  },
122
121
  dropdownIndicator: function dropdownIndicator(css, _ref3) {
123
122
  var isDisabled = _ref3.isDisabled;
124
- var color = token('color.text.mediumEmphasis', N500);
123
+ var color = "var(--ds-text-mediumEmphasis, ".concat(N500, ")");
125
124
 
126
125
  if (isDisabled) {
127
- color = token('color.text.disabled', N70);
126
+ color = "var(--ds-text-disabled, ".concat(N70, ")");
128
127
  }
129
128
 
130
129
  return _objectSpread(_objectSpread({}, css), {}, {
@@ -134,7 +133,7 @@ export default function baseStyles(validationState, isCompact) {
134
133
  paddingBottom: isCompact ? 0 : 6,
135
134
  paddingTop: isCompact ? 0 : 6,
136
135
  ':hover': {
137
- color: token('color.text.mediumEmphasis', N200)
136
+ color: "var(--ds-text-mediumEmphasis, ".concat(N200, ")")
138
137
  }
139
138
  });
140
139
  },
@@ -147,12 +146,12 @@ export default function baseStyles(validationState, isCompact) {
147
146
  var isFocused = _ref4.isFocused,
148
147
  isSelected = _ref4.isSelected,
149
148
  isDisabled = _ref4.isDisabled;
150
- var color = token('color.text.highEmphasis', N800);
149
+ var color = "var(--ds-text-highEmphasis, ".concat(N800, ")");
151
150
 
152
151
  if (isDisabled) {
153
- color = token('color.text.disabled', N70);
152
+ color = "var(--ds-text-disabled, ".concat(N70, ")");
154
153
  } else if (isSelected) {
155
- color = token('color.text.selected', B400);
154
+ color = "var(--ds-text-selected, ".concat(B400, ")");
156
155
  }
157
156
 
158
157
  var boxShadow;
@@ -161,15 +160,15 @@ export default function baseStyles(validationState, isCompact) {
161
160
  if (isDisabled) {
162
161
  backgroundColor = undefined;
163
162
  } else if (isSelected && isFocused) {
164
- backgroundColor = token('color.background.selected.hover', B50);
163
+ backgroundColor = "var(--ds-background-selected-hover, ".concat(B50, ")");
165
164
  } else if (isSelected) {
166
- backgroundColor = token('color.background.selected.resting', B50);
165
+ backgroundColor = "var(--ds-background-selected-resting, ".concat(B50, ")");
167
166
  } else if (isFocused) {
168
- backgroundColor = token('color.background.transparentNeutral.hover', N20);
167
+ backgroundColor = "var(--ds-background-transparentNeutral-hover, ".concat(N20, ")");
169
168
  }
170
169
 
171
170
  if (!isDisabled && (isFocused || isSelected)) {
172
- boxShadow = "inset 2px 0px 0px ".concat(token('color.text.selected', B400));
171
+ boxShadow = "inset 2px 0px 0px ".concat("var(--ds-text-selected, ".concat(B400, ")"));
173
172
  }
174
173
 
175
174
  var cursor = isDisabled ? 'not-allowed' : undefined;
@@ -180,7 +179,7 @@ export default function baseStyles(validationState, isCompact) {
180
179
  cursor: cursor,
181
180
  boxShadow: boxShadow,
182
181
  ':active': {
183
- backgroundColor: !isDisabled ? isSelected ? token('color.background.selected.pressed', N20) : token('color.background.transparentNeutral.pressed', N30) : undefined
182
+ backgroundColor: !isDisabled ? isSelected ? "var(--ds-background-selected-pressed, ".concat(N20, ")") : "var(--ds-background-transparentNeutral-pressed, ".concat(N30, ")") : undefined
184
183
  },
185
184
  '@media screen and (-ms-high-contrast: active)': {
186
185
  borderLeft: !isDisabled && (isFocused || isSelected) ? '2px solid transparent' : ''
@@ -190,21 +189,21 @@ export default function baseStyles(validationState, isCompact) {
190
189
  placeholder: function placeholder(css, _ref5) {
191
190
  var isDisabled = _ref5.isDisabled;
192
191
  return _objectSpread(_objectSpread({}, css), {}, {
193
- color: isDisabled ? token('color.text.disabled', N300) : token('color.text.lowEmphasis', N300)
192
+ color: isDisabled ? "var(--ds-text-disabled, ".concat(N300, ")") : "var(--ds-text-lowEmphasis, ".concat(N300, ")")
194
193
  });
195
194
  },
196
195
  singleValue: function singleValue(css, _ref6) {
197
196
  var isDisabled = _ref6.isDisabled;
198
197
  return _objectSpread(_objectSpread({}, css), {}, {
199
- color: isDisabled ? token('color.text.disabled', N70) : token('color.text.highEmphasis', N800),
198
+ color: isDisabled ? "var(--ds-text-disabled, ".concat(N70, ")") : "var(--ds-text-highEmphasis, ".concat(N800, ")"),
200
199
  lineHeight: "".concat(gridSize() * 2, "px") // 16px
201
200
 
202
201
  });
203
202
  },
204
203
  menu: function menu(css) {
205
204
  return _objectSpread(_objectSpread({}, css), {}, {
206
- backgroundColor: token('color.background.overlay', 'white'),
207
- boxShadow: token('shadow.overlay', '0 0 0 1px hsl(0deg 0% 0% / 10%), 0 4px 11px hsl(0deg 0% 0% / 10%)')
205
+ backgroundColor: "var(--ds-background-overlay, white)",
206
+ boxShadow: "var(--ds-overlay, 0 0 0 1px hsl(0deg 0% 0% / 10%), 0 4px 11px hsl(0deg 0% 0% / 10%))"
208
207
  });
209
208
  },
210
209
  menuList: function menuList(css) {
@@ -217,8 +216,8 @@ export default function baseStyles(validationState, isCompact) {
217
216
  var isFocused = _ref7.isFocused;
218
217
  return _objectSpread(_objectSpread({}, css), {}, {
219
218
  borderRadius: '2px',
220
- backgroundColor: isFocused ? token('color.background.selected.resting', N40) : token('color.background.transparentNeutral.hover', N40),
221
- boxShadow: isFocused ? "0 0 0 2px ".concat(token('color.background.default', 'transparent'), ", 0 0 0 4px ").concat(token('color.border.focus', 'transparent')) : 'none',
219
+ backgroundColor: isFocused ? "var(--ds-background-selected-resting, ".concat(N40, ")") : "var(--ds-background-transparentNeutral-hover, ".concat(N40, ")"),
220
+ boxShadow: isFocused ? "0 0 0 2px ".concat("var(--ds-background-default, transparent)", ", 0 0 0 4px ").concat("var(--ds-border-focus, transparent)") : 'none',
222
221
  maxWidth: '100%',
223
222
  '@media screen and (-ms-high-contrast: active)': {
224
223
  border: isFocused ? '1px solid transparent' : 'none'
@@ -229,25 +228,25 @@ export default function baseStyles(validationState, isCompact) {
229
228
  var isFocused = _ref8.isFocused;
230
229
  return _objectSpread(_objectSpread({}, css), {}, {
231
230
  padding: '2px',
232
- color: isFocused ? token('color.text.selected', 'hsl(0, 0%, 20%)') : token('color.text.highEmphasis', 'hsl(0, 0%, 20%)'),
231
+ color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text-highEmphasis, hsl(0, 0%, 20%))",
233
232
  paddingRight: '2px'
234
233
  });
235
234
  },
236
235
  multiValueRemove: function multiValueRemove(css, _ref9) {
237
236
  var isFocused = _ref9.isFocused;
238
237
  return _objectSpread(_objectSpread({}, css), {}, {
239
- backgroundColor: isFocused && token('color.background.selected.resting', R75),
240
- fill: isFocused ? token('color.text.selected', '#000') : token('color.text.highEmphasis', '#000'),
238
+ backgroundColor: isFocused && "var(--ds-background-selected-resting, ".concat(R75, ")"),
239
+ fill: isFocused ? "var(--ds-text-selected, #000)" : "var(--ds-text-highEmphasis, #000)",
241
240
  paddingLeft: '2px',
242
241
  paddingRight: '2px',
243
242
  borderRadius: '0px 2px 2px 0px',
244
243
  ':hover': {
245
- backgroundColor: token('color.background.subtleDanger.hover', R75),
246
- fill: token('color.text.danger', '#000')
244
+ backgroundColor: "var(--ds-background-subtleDanger-hover, ".concat(R75, ")"),
245
+ fill: "var(--ds-text-danger, #000)"
247
246
  },
248
247
  ':active': {
249
- backgroundColor: token('color.background.subtleDanger.pressed', R75),
250
- fill: token('color.text.danger', '#000')
248
+ backgroundColor: "var(--ds-background-subtleDanger-pressed, ".concat(R75, ")"),
249
+ fill: "var(--ds-text-danger, #000)"
251
250
  }
252
251
  });
253
252
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "15.2.2",
3
+ "version": "15.2.6",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps, OptionType } from './types';
2
3
  declare const CheckboxSelect: ({ components, ...props }: SelectProps<OptionType, true>) => JSX.Element;
3
4
  export default CheckboxSelect;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const CountrySelect: (props: any) => JSX.Element;
2
3
  export default CountrySelect;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps, OptionType } from './types';
2
3
  declare const RadioSelect: ({ components, ...props }: SelectProps<OptionType>) => JSX.Element;
3
4
  export default RadioSelect;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export { ClearIndicator, DropdownIndicator, LoadingIndicator, } from './indicators';
2
3
  export declare const MultiValueRemove: (props: any) => JSX.Element;
3
4
  export declare const IndicatorSeparator: null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "15.2.2",
3
+ "version": "15.2.6",
4
4
  "description": "Select allows users to make a single selection or multiple selections from a list of options.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -17,7 +17,6 @@
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
19
  "deprecatedAutoEntryPoints": true,
20
- "inPublicMirror": true,
21
20
  "releaseModel": "scheduled",
22
21
  "website": {
23
22
  "name": "Select"
@@ -25,16 +24,16 @@
25
24
  },
26
25
  "dependencies": {
27
26
  "@atlaskit/analytics-next": "^8.2.0",
28
- "@atlaskit/icon": "^21.9.0",
27
+ "@atlaskit/icon": "^21.10.0",
29
28
  "@atlaskit/spinner": "^15.0.0",
30
- "@atlaskit/theme": "^12.0.0",
31
- "@atlaskit/tokens": "^0.2.0",
29
+ "@atlaskit/theme": "^12.1.0",
30
+ "@atlaskit/tokens": "^0.5.0",
32
31
  "@babel/runtime": "^7.0.0",
33
32
  "@emotion/core": "^10.0.9",
34
33
  "@popperjs/core": "^2.9.1",
35
34
  "@types/react-select": "^4.0.13",
36
35
  "focus-trap": "^2.4.5",
37
- "memoize-one": "^5.1.0",
36
+ "memoize-one": "^6.0.0",
38
37
  "react-fast-compare": "^2.0.1",
39
38
  "react-node-resolver": "^1.0.1",
40
39
  "react-popper": "^2.2.3",
@@ -47,14 +46,13 @@
47
46
  "react-dom": "^16.8.0"
48
47
  },
49
48
  "devDependencies": {
50
- "@atlaskit/build-utils": "*",
51
49
  "@atlaskit/button": "^16.0.0",
52
50
  "@atlaskit/checkbox": "^12.2.0",
53
51
  "@atlaskit/docs": "*",
54
- "@atlaskit/drawer": "^7.0.0",
52
+ "@atlaskit/drawer": "^7.1.0",
55
53
  "@atlaskit/form": "^8.4.0",
56
54
  "@atlaskit/logo": "^13.5.0",
57
- "@atlaskit/modal-dialog": "^12.0.0",
55
+ "@atlaskit/modal-dialog": "^12.2.0",
58
56
  "@atlaskit/section-message": "^6.0.0",
59
57
  "@atlaskit/ssr": "*",
60
58
  "@atlaskit/tooltip": "^17.5.0",
@@ -74,7 +72,10 @@
74
72
  "techstack": {
75
73
  "@repo/internal": {
76
74
  "theming": "tokens",
77
- "deprecation": "no-deprecated-imports"
75
+ "deprecation": "no-deprecated-imports",
76
+ "styling": [
77
+ "emotion"
78
+ ]
78
79
  }
79
80
  },
80
81
  "homepage": "https://atlassian.design/components/select/",