@atlaskit/checkbox 17.1.21 → 17.1.23
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 +13 -0
- package/dist/cjs/internal/checkbox-icon.compiled.css +4 -0
- package/dist/cjs/internal/checkbox-icon.js +33 -0
- package/dist/es2019/internal/checkbox-icon.compiled.css +4 -0
- package/dist/es2019/internal/checkbox-icon.js +33 -0
- package/dist/esm/internal/checkbox-icon.compiled.css +4 -0
- package/dist/esm/internal/checkbox-icon.js +33 -0
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/checkbox
|
|
2
2
|
|
|
3
|
+
## 17.1.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4a5c758f659f7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4a5c758f659f7) -
|
|
8
|
+
Changing internal use of SVG icons behind a feature flag.
|
|
9
|
+
|
|
10
|
+
## 17.1.22
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 17.1.21
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -7,12 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.default = void 0;
|
|
10
|
+
require("./checkbox-icon.compiled.css");
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var React = _react;
|
|
12
13
|
var _runtime = require("@compiled/react/runtime");
|
|
13
14
|
var _svg = _interopRequireDefault(require("@atlaskit/icon/svg"));
|
|
14
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
|
+
var svgStyles = null;
|
|
16
18
|
function getIcon(isIndeterminate, isChecked) {
|
|
17
19
|
if (isIndeterminate) {
|
|
18
20
|
if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons')) {
|
|
@@ -67,6 +69,37 @@ var CheckboxIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
67
69
|
var icon = (0, _react.useMemo)(function () {
|
|
68
70
|
return getIcon(isIndeterminate, isChecked);
|
|
69
71
|
}, [isIndeterminate, isChecked]);
|
|
72
|
+
if ((0, _platformFeatureFlags.fg)('platform-custom-icon-migration')) {
|
|
73
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
74
|
+
width: 24,
|
|
75
|
+
height: 24,
|
|
76
|
+
viewBox: "0 0 24 24",
|
|
77
|
+
style: {
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
79
|
+
color: 'var(--checkbox-background-color)',
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
81
|
+
fill: "var(--checkbox-tick-color)"
|
|
82
|
+
},
|
|
83
|
+
role: "presentation",
|
|
84
|
+
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw"])
|
|
85
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
86
|
+
fillRule: "evenodd"
|
|
87
|
+
}, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? /*#__PURE__*/React.createElement("rect", {
|
|
88
|
+
fill: "currentColor",
|
|
89
|
+
x: "5.5",
|
|
90
|
+
y: "5.5",
|
|
91
|
+
width: "13",
|
|
92
|
+
height: "13",
|
|
93
|
+
rx: "1.5"
|
|
94
|
+
}) : /*#__PURE__*/React.createElement("rect", {
|
|
95
|
+
fill: "currentColor",
|
|
96
|
+
x: "6",
|
|
97
|
+
y: "6",
|
|
98
|
+
width: "12",
|
|
99
|
+
height: "12",
|
|
100
|
+
rx: "2"
|
|
101
|
+
}), icon));
|
|
102
|
+
}
|
|
70
103
|
return (
|
|
71
104
|
/*#__PURE__*/
|
|
72
105
|
// eslint-disable-next-line @atlaskit/design-system/no-custom-icons
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/* checkbox-icon.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./checkbox-icon.compiled.css";
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
5
|
import { memo, useMemo } from 'react';
|
|
5
6
|
import PrimitiveSVGIcon from '@atlaskit/icon/svg';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
const svgStyles = null;
|
|
7
9
|
function getIcon(isIndeterminate, isChecked) {
|
|
8
10
|
if (isIndeterminate) {
|
|
9
11
|
if (fg('platform-visual-refresh-icons')) {
|
|
@@ -57,6 +59,37 @@ const CheckboxIcon = /*#__PURE__*/memo(({
|
|
|
57
59
|
isChecked
|
|
58
60
|
}) => {
|
|
59
61
|
const icon = useMemo(() => getIcon(isIndeterminate, isChecked), [isIndeterminate, isChecked]);
|
|
62
|
+
if (fg('platform-custom-icon-migration')) {
|
|
63
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
64
|
+
width: 24,
|
|
65
|
+
height: 24,
|
|
66
|
+
viewBox: "0 0 24 24",
|
|
67
|
+
style: {
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
69
|
+
color: 'var(--checkbox-background-color)',
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
71
|
+
fill: "var(--checkbox-tick-color)"
|
|
72
|
+
},
|
|
73
|
+
role: "presentation",
|
|
74
|
+
className: ax(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw"])
|
|
75
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
76
|
+
fillRule: "evenodd"
|
|
77
|
+
}, fg('platform-visual-refresh-icons') ? /*#__PURE__*/React.createElement("rect", {
|
|
78
|
+
fill: "currentColor",
|
|
79
|
+
x: "5.5",
|
|
80
|
+
y: "5.5",
|
|
81
|
+
width: "13",
|
|
82
|
+
height: "13",
|
|
83
|
+
rx: "1.5"
|
|
84
|
+
}) : /*#__PURE__*/React.createElement("rect", {
|
|
85
|
+
fill: "currentColor",
|
|
86
|
+
x: "6",
|
|
87
|
+
y: "6",
|
|
88
|
+
width: "12",
|
|
89
|
+
height: "12",
|
|
90
|
+
rx: "2"
|
|
91
|
+
}), icon));
|
|
92
|
+
}
|
|
60
93
|
return (
|
|
61
94
|
/*#__PURE__*/
|
|
62
95
|
// eslint-disable-next-line @atlaskit/design-system/no-custom-icons
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/* checkbox-icon.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./checkbox-icon.compiled.css";
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
5
|
import { memo, useMemo } from 'react';
|
|
5
6
|
import PrimitiveSVGIcon from '@atlaskit/icon/svg';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
var svgStyles = null;
|
|
7
9
|
function getIcon(isIndeterminate, isChecked) {
|
|
8
10
|
if (isIndeterminate) {
|
|
9
11
|
if (fg('platform-visual-refresh-icons')) {
|
|
@@ -58,6 +60,37 @@ var CheckboxIcon = /*#__PURE__*/memo(function (_ref) {
|
|
|
58
60
|
var icon = useMemo(function () {
|
|
59
61
|
return getIcon(isIndeterminate, isChecked);
|
|
60
62
|
}, [isIndeterminate, isChecked]);
|
|
63
|
+
if (fg('platform-custom-icon-migration')) {
|
|
64
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
65
|
+
width: 24,
|
|
66
|
+
height: 24,
|
|
67
|
+
viewBox: "0 0 24 24",
|
|
68
|
+
style: {
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
70
|
+
color: 'var(--checkbox-background-color)',
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
72
|
+
fill: "var(--checkbox-tick-color)"
|
|
73
|
+
},
|
|
74
|
+
role: "presentation",
|
|
75
|
+
className: ax(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw"])
|
|
76
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
77
|
+
fillRule: "evenodd"
|
|
78
|
+
}, fg('platform-visual-refresh-icons') ? /*#__PURE__*/React.createElement("rect", {
|
|
79
|
+
fill: "currentColor",
|
|
80
|
+
x: "5.5",
|
|
81
|
+
y: "5.5",
|
|
82
|
+
width: "13",
|
|
83
|
+
height: "13",
|
|
84
|
+
rx: "1.5"
|
|
85
|
+
}) : /*#__PURE__*/React.createElement("rect", {
|
|
86
|
+
fill: "currentColor",
|
|
87
|
+
x: "6",
|
|
88
|
+
y: "6",
|
|
89
|
+
width: "12",
|
|
90
|
+
height: "12",
|
|
91
|
+
rx: "2"
|
|
92
|
+
}), icon));
|
|
93
|
+
}
|
|
61
94
|
return (
|
|
62
95
|
/*#__PURE__*/
|
|
63
96
|
// eslint-disable-next-line @atlaskit/design-system/no-custom-icons
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/checkbox",
|
|
3
|
-
"version": "17.1.
|
|
3
|
+
"version": "17.1.23",
|
|
4
4
|
"description": "A checkbox is an input control that allows a user to select one or more options from a number of choices.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
36
|
-
"@atlaskit/css": "^0.
|
|
37
|
-
"@atlaskit/ds-lib": "^5.
|
|
36
|
+
"@atlaskit/css": "^0.17.0",
|
|
37
|
+
"@atlaskit/ds-lib": "^5.3.0",
|
|
38
38
|
"@atlaskit/icon": "^29.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/theme": "^21.0.0",
|
|
41
|
-
"@atlaskit/tokens": "^8.
|
|
41
|
+
"@atlaskit/tokens": "^8.4.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@compiled/react": "^0.18.6"
|
|
44
44
|
},
|
|
@@ -51,12 +51,10 @@
|
|
|
51
51
|
"@af/visual-regression": "workspace:^",
|
|
52
52
|
"@atlaskit/button": "^23.6.0",
|
|
53
53
|
"@atlaskit/docs": "^11.2.0",
|
|
54
|
-
"@atlaskit/form": "^14.
|
|
54
|
+
"@atlaskit/form": "^14.3.0",
|
|
55
55
|
"@atlaskit/link": "^3.2.0",
|
|
56
|
-
"@atlaskit/primitives": "^16.
|
|
56
|
+
"@atlaskit/primitives": "^16.4.0",
|
|
57
57
|
"@atlaskit/section-message": "^8.9.0",
|
|
58
|
-
"@atlaskit/ssr": "workspace:^",
|
|
59
|
-
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
60
58
|
"@atlassian/ssr-tests": "workspace:^",
|
|
61
59
|
"@testing-library/react": "^13.4.0",
|
|
62
60
|
"jscodeshift": "^17.0.0",
|
|
@@ -92,6 +90,9 @@
|
|
|
92
90
|
"platform-feature-flags": {
|
|
93
91
|
"platform-visual-refresh-icons": {
|
|
94
92
|
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"platform-custom-icon-migration": {
|
|
95
|
+
"type": "boolean"
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
}
|