@atlaskit/select 18.5.3 → 18.6.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/CHANGELOG.md +12 -0
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/components/input-options.js +55 -4
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/components/input-options.js +48 -4
- package/dist/esm/Select.js +1 -1
- package/dist/esm/components/input-options.js +55 -4
- package/package.json +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/select
|
|
2
2
|
|
|
3
|
+
## 18.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#167480](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167480)
|
|
8
|
+
[`e78013c5d716b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e78013c5d716b) -
|
|
9
|
+
Update checkbox and radio select to match new icon styles behind feature flag.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 18.5.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/Select.js
CHANGED
|
@@ -11,7 +11,7 @@ var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
|
11
11
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
12
12
|
|
|
13
13
|
var packageName = "@atlaskit/select";
|
|
14
|
-
var packageVersion = "18.
|
|
14
|
+
var packageVersion = "18.6.0";
|
|
15
15
|
var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_async.default);
|
|
16
16
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
17
17
|
var Select = (0, _analyticsNext.withAnalyticsContext)({
|
|
@@ -19,6 +19,8 @@ var _react = require("react");
|
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
20
|
var _checkbox = _interopRequireDefault(require("@atlaskit/icon/glyph/checkbox"));
|
|
21
21
|
var _radio = _interopRequireDefault(require("@atlaskit/icon/glyph/radio"));
|
|
22
|
+
var _svg = _interopRequireDefault(require("@atlaskit/icon/svg"));
|
|
23
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
24
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
25
|
var _excluded = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
24
26
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
@@ -238,15 +240,59 @@ var ControlOption = /*#__PURE__*/function (_Component) {
|
|
|
238
240
|
}]);
|
|
239
241
|
return ControlOption;
|
|
240
242
|
}(_react.Component);
|
|
243
|
+
var NewCheckboxIcon = function NewCheckboxIcon(props) {
|
|
244
|
+
return (
|
|
245
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
246
|
+
(0, _react2.jsx)(_svg.default, props, (0, _react2.jsx)("g", {
|
|
247
|
+
fillRule: "evenodd"
|
|
248
|
+
}, (0, _react2.jsx)("rect", {
|
|
249
|
+
x: "5.5",
|
|
250
|
+
y: "5.5",
|
|
251
|
+
width: "13",
|
|
252
|
+
height: "13",
|
|
253
|
+
rx: "1.5",
|
|
254
|
+
fill: "currentColor"
|
|
255
|
+
}), (0, _react2.jsx)("path", {
|
|
256
|
+
fillRule: "evenodd",
|
|
257
|
+
clipRule: "evenodd",
|
|
258
|
+
d: "M16.3262 9.48011L15.1738 8.51984L10.75 13.8284L8.82616 11.5198L7.67383 12.4801L10.1738 15.4801C10.3163 15.6511 10.5274 15.75 10.75 15.75C10.9726 15.75 11.1837 15.6511 11.3262 15.4801L16.3262 9.48011Z",
|
|
259
|
+
fill: "inherit"
|
|
260
|
+
})))
|
|
261
|
+
);
|
|
262
|
+
};
|
|
263
|
+
var NewRadioIcon = function NewRadioIcon(props) {
|
|
264
|
+
return (
|
|
265
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
266
|
+
(0, _react2.jsx)(_svg.default, props, (0, _react2.jsx)("g", {
|
|
267
|
+
fillRule: "evenodd"
|
|
268
|
+
}, (0, _react2.jsx)("circle", {
|
|
269
|
+
cx: "12",
|
|
270
|
+
cy: "12",
|
|
271
|
+
r: "6.75",
|
|
272
|
+
fill: "currentColor",
|
|
273
|
+
strokeWidth: "1.5"
|
|
274
|
+
}), (0, _react2.jsx)("circle", {
|
|
275
|
+
cx: "12",
|
|
276
|
+
cy: "12",
|
|
277
|
+
r: "3",
|
|
278
|
+
fill: "inherit"
|
|
279
|
+
})))
|
|
280
|
+
);
|
|
281
|
+
};
|
|
282
|
+
|
|
241
283
|
/**
|
|
242
284
|
* __Checkbox option__
|
|
243
285
|
*/
|
|
244
286
|
var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props
|
|
245
|
-
//
|
|
246
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
|
|
287
|
+
// ): JSX.Element => <ControlOption<OptionT, true> Icon={CheckboxIcon} {...props} />;
|
|
247
288
|
) {
|
|
248
289
|
return (0, _react2.jsx)(ControlOption, (0, _extends2.default)({
|
|
249
|
-
Icon:
|
|
290
|
+
Icon:
|
|
291
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
292
|
+
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration') ? NewCheckboxIcon :
|
|
293
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
294
|
+
_checkbox.default
|
|
295
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
250
296
|
}, props));
|
|
251
297
|
};
|
|
252
298
|
|
|
@@ -258,7 +304,12 @@ var RadioOption = exports.RadioOption = function RadioOption(props) {
|
|
|
258
304
|
// TODO https://product-fabric.atlassian.net/browse/DSP-20769
|
|
259
305
|
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
|
|
260
306
|
(0, _react2.jsx)(ControlOption, (0, _extends2.default)({
|
|
261
|
-
Icon:
|
|
307
|
+
Icon:
|
|
308
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
309
|
+
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration') ? NewRadioIcon :
|
|
310
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
311
|
+
_radio.default
|
|
312
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
262
313
|
}, props))
|
|
263
314
|
);
|
|
264
315
|
};
|
package/dist/es2019/Select.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
3
3
|
import AsyncSelect from '@atlaskit/react-select/async';
|
|
4
4
|
import createSelect from './createSelect';
|
|
5
5
|
const packageName = "@atlaskit/select";
|
|
6
|
-
const packageVersion = "18.
|
|
6
|
+
const packageVersion = "18.6.0";
|
|
7
7
|
export const SelectWithoutAnalytics = createSelect(AsyncSelect);
|
|
8
8
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
9
9
|
const Select = withAnalyticsContext({
|
|
@@ -9,6 +9,8 @@ import { Component } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
11
11
|
import RadioIcon from '@atlaskit/icon/glyph/radio';
|
|
12
|
+
import PrimitiveSVGIcon from '@atlaskit/icon/svg';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
14
|
import { B300, B400, B75, N0, N100, N20, N20A, N30, N70 } from '@atlaskit/theme/colors';
|
|
13
15
|
const getPrimitiveStyles = props => {
|
|
14
16
|
const {
|
|
@@ -221,15 +223,52 @@ class ControlOption extends Component {
|
|
|
221
223
|
);
|
|
222
224
|
}
|
|
223
225
|
}
|
|
226
|
+
const NewCheckboxIcon = props =>
|
|
227
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
228
|
+
jsx(PrimitiveSVGIcon, props, jsx("g", {
|
|
229
|
+
fillRule: "evenodd"
|
|
230
|
+
}, jsx("rect", {
|
|
231
|
+
x: "5.5",
|
|
232
|
+
y: "5.5",
|
|
233
|
+
width: "13",
|
|
234
|
+
height: "13",
|
|
235
|
+
rx: "1.5",
|
|
236
|
+
fill: "currentColor"
|
|
237
|
+
}), jsx("path", {
|
|
238
|
+
fillRule: "evenodd",
|
|
239
|
+
clipRule: "evenodd",
|
|
240
|
+
d: "M16.3262 9.48011L15.1738 8.51984L10.75 13.8284L8.82616 11.5198L7.67383 12.4801L10.1738 15.4801C10.3163 15.6511 10.5274 15.75 10.75 15.75C10.9726 15.75 11.1837 15.6511 11.3262 15.4801L16.3262 9.48011Z",
|
|
241
|
+
fill: "inherit"
|
|
242
|
+
})));
|
|
243
|
+
const NewRadioIcon = props =>
|
|
244
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
245
|
+
jsx(PrimitiveSVGIcon, props, jsx("g", {
|
|
246
|
+
fillRule: "evenodd"
|
|
247
|
+
}, jsx("circle", {
|
|
248
|
+
cx: "12",
|
|
249
|
+
cy: "12",
|
|
250
|
+
r: "6.75",
|
|
251
|
+
fill: "currentColor",
|
|
252
|
+
strokeWidth: "1.5"
|
|
253
|
+
}), jsx("circle", {
|
|
254
|
+
cx: "12",
|
|
255
|
+
cy: "12",
|
|
256
|
+
r: "3",
|
|
257
|
+
fill: "inherit"
|
|
258
|
+
})));
|
|
224
259
|
|
|
225
260
|
/**
|
|
226
261
|
* __Checkbox option__
|
|
227
262
|
*/
|
|
228
263
|
export const CheckboxOption = (props
|
|
229
|
-
//
|
|
230
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
|
|
264
|
+
// ): JSX.Element => <ControlOption<OptionT, true> Icon={CheckboxIcon} {...props} />;
|
|
231
265
|
) => jsx(ControlOption, _extends({
|
|
232
|
-
Icon:
|
|
266
|
+
Icon:
|
|
267
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
268
|
+
fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? NewCheckboxIcon :
|
|
269
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
270
|
+
CheckboxIcon
|
|
271
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
233
272
|
}, props));
|
|
234
273
|
|
|
235
274
|
/**
|
|
@@ -239,5 +278,10 @@ export const RadioOption = props =>
|
|
|
239
278
|
// TODO https://product-fabric.atlassian.net/browse/DSP-20769
|
|
240
279
|
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
|
|
241
280
|
jsx(ControlOption, _extends({
|
|
242
|
-
Icon:
|
|
281
|
+
Icon:
|
|
282
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
283
|
+
fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? NewRadioIcon :
|
|
284
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
285
|
+
RadioIcon
|
|
286
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
243
287
|
}, props));
|
package/dist/esm/Select.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
3
3
|
import AsyncSelect from '@atlaskit/react-select/async';
|
|
4
4
|
import createSelect from './createSelect';
|
|
5
5
|
var packageName = "@atlaskit/select";
|
|
6
|
-
var packageVersion = "18.
|
|
6
|
+
var packageVersion = "18.6.0";
|
|
7
7
|
export var SelectWithoutAnalytics = createSelect(AsyncSelect);
|
|
8
8
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
9
9
|
var Select = withAnalyticsContext({
|
|
@@ -22,6 +22,8 @@ import { Component } from 'react';
|
|
|
22
22
|
import { css, jsx } from '@emotion/react';
|
|
23
23
|
import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
24
24
|
import RadioIcon from '@atlaskit/icon/glyph/radio';
|
|
25
|
+
import PrimitiveSVGIcon from '@atlaskit/icon/svg';
|
|
26
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
27
|
import { B300, B400, B75, N0, N100, N20, N20A, N30, N70 } from '@atlaskit/theme/colors';
|
|
26
28
|
var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
27
29
|
var cx = props.cx,
|
|
@@ -233,15 +235,59 @@ var ControlOption = /*#__PURE__*/function (_Component) {
|
|
|
233
235
|
}]);
|
|
234
236
|
return ControlOption;
|
|
235
237
|
}(Component);
|
|
238
|
+
var NewCheckboxIcon = function NewCheckboxIcon(props) {
|
|
239
|
+
return (
|
|
240
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
241
|
+
jsx(PrimitiveSVGIcon, props, jsx("g", {
|
|
242
|
+
fillRule: "evenodd"
|
|
243
|
+
}, jsx("rect", {
|
|
244
|
+
x: "5.5",
|
|
245
|
+
y: "5.5",
|
|
246
|
+
width: "13",
|
|
247
|
+
height: "13",
|
|
248
|
+
rx: "1.5",
|
|
249
|
+
fill: "currentColor"
|
|
250
|
+
}), jsx("path", {
|
|
251
|
+
fillRule: "evenodd",
|
|
252
|
+
clipRule: "evenodd",
|
|
253
|
+
d: "M16.3262 9.48011L15.1738 8.51984L10.75 13.8284L8.82616 11.5198L7.67383 12.4801L10.1738 15.4801C10.3163 15.6511 10.5274 15.75 10.75 15.75C10.9726 15.75 11.1837 15.6511 11.3262 15.4801L16.3262 9.48011Z",
|
|
254
|
+
fill: "inherit"
|
|
255
|
+
})))
|
|
256
|
+
);
|
|
257
|
+
};
|
|
258
|
+
var NewRadioIcon = function NewRadioIcon(props) {
|
|
259
|
+
return (
|
|
260
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
261
|
+
jsx(PrimitiveSVGIcon, props, jsx("g", {
|
|
262
|
+
fillRule: "evenodd"
|
|
263
|
+
}, jsx("circle", {
|
|
264
|
+
cx: "12",
|
|
265
|
+
cy: "12",
|
|
266
|
+
r: "6.75",
|
|
267
|
+
fill: "currentColor",
|
|
268
|
+
strokeWidth: "1.5"
|
|
269
|
+
}), jsx("circle", {
|
|
270
|
+
cx: "12",
|
|
271
|
+
cy: "12",
|
|
272
|
+
r: "3",
|
|
273
|
+
fill: "inherit"
|
|
274
|
+
})))
|
|
275
|
+
);
|
|
276
|
+
};
|
|
277
|
+
|
|
236
278
|
/**
|
|
237
279
|
* __Checkbox option__
|
|
238
280
|
*/
|
|
239
281
|
export var CheckboxOption = function CheckboxOption(props
|
|
240
|
-
//
|
|
241
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
|
|
282
|
+
// ): JSX.Element => <ControlOption<OptionT, true> Icon={CheckboxIcon} {...props} />;
|
|
242
283
|
) {
|
|
243
284
|
return jsx(ControlOption, _extends({
|
|
244
|
-
Icon:
|
|
285
|
+
Icon:
|
|
286
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
287
|
+
fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? NewCheckboxIcon :
|
|
288
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
289
|
+
CheckboxIcon
|
|
290
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
245
291
|
}, props));
|
|
246
292
|
};
|
|
247
293
|
|
|
@@ -253,7 +299,12 @@ export var RadioOption = function RadioOption(props) {
|
|
|
253
299
|
// TODO https://product-fabric.atlassian.net/browse/DSP-20769
|
|
254
300
|
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
|
|
255
301
|
jsx(ControlOption, _extends({
|
|
256
|
-
Icon:
|
|
302
|
+
Icon:
|
|
303
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
304
|
+
fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? NewRadioIcon :
|
|
305
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
306
|
+
RadioIcon
|
|
307
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
257
308
|
}, props))
|
|
258
309
|
);
|
|
259
310
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.6.0",
|
|
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/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"team": "Design System Team",
|
|
29
29
|
"website": {
|
|
30
30
|
"name": "Select",
|
|
31
|
-
"category": "
|
|
31
|
+
"category": "Forms and input"
|
|
32
32
|
},
|
|
33
33
|
"runReact18": true
|
|
34
34
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
44
44
|
"@atlaskit/ds-lib": "^3.2.0",
|
|
45
|
-
"@atlaskit/icon": "^22.
|
|
45
|
+
"@atlaskit/icon": "^22.26.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
47
47
|
"@atlaskit/primitives": "^13.2.0",
|
|
48
48
|
"@atlaskit/react-select": "^1.4.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@af/visual-regression": "*",
|
|
70
70
|
"@atlaskit/checkbox": "^15.1.0",
|
|
71
71
|
"@atlaskit/modal-dialog": "^12.17.0",
|
|
72
|
-
"@atlaskit/radio": "^6.
|
|
72
|
+
"@atlaskit/radio": "^6.6.0",
|
|
73
73
|
"@atlaskit/ssr": "*",
|
|
74
74
|
"@atlaskit/visual-regression": "*",
|
|
75
75
|
"@atlassian/feature-flags-test-utils": "*",
|
|
@@ -108,6 +108,12 @@
|
|
|
108
108
|
"design_system_select-a11y-improvement": {
|
|
109
109
|
"type": "boolean",
|
|
110
110
|
"referenceOnly": true
|
|
111
|
+
},
|
|
112
|
+
"platform-visual-refresh-icons": {
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
},
|
|
115
|
+
"platform-icon-control-migration": {
|
|
116
|
+
"type": "boolean"
|
|
111
117
|
}
|
|
112
118
|
},
|
|
113
119
|
"homepage": "https://atlassian.design/components/select/"
|