@atlaskit/checkbox 15.4.0 → 17.0.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/cjs/checkbox.compiled.css +53 -0
  3. package/dist/cjs/checkbox.js +22 -146
  4. package/dist/cjs/internal/checkbox-icon.js +15 -17
  5. package/dist/cjs/internal/label-text.compiled.css +2 -0
  6. package/dist/cjs/internal/label-text.js +10 -13
  7. package/dist/cjs/internal/label.compiled.css +29 -0
  8. package/dist/cjs/internal/label.js +32 -60
  9. package/dist/cjs/internal/required-indicator.compiled.css +2 -0
  10. package/dist/cjs/internal/required-indicator.js +15 -18
  11. package/dist/es2019/checkbox.compiled.css +53 -0
  12. package/dist/es2019/checkbox.js +13 -144
  13. package/dist/es2019/internal/checkbox-icon.js +11 -15
  14. package/dist/es2019/internal/label-text.compiled.css +2 -0
  15. package/dist/es2019/internal/label-text.js +7 -12
  16. package/dist/es2019/internal/label.compiled.css +29 -0
  17. package/dist/es2019/internal/label.js +10 -58
  18. package/dist/es2019/internal/required-indicator.compiled.css +2 -0
  19. package/dist/es2019/internal/required-indicator.js +9 -17
  20. package/dist/esm/checkbox.compiled.css +53 -0
  21. package/dist/esm/checkbox.js +18 -146
  22. package/dist/esm/internal/checkbox-icon.js +11 -15
  23. package/dist/esm/internal/label-text.compiled.css +2 -0
  24. package/dist/esm/internal/label-text.js +7 -12
  25. package/dist/esm/internal/label.compiled.css +29 -0
  26. package/dist/esm/internal/label.js +29 -59
  27. package/dist/esm/internal/required-indicator.compiled.css +2 -0
  28. package/dist/esm/internal/required-indicator.js +12 -17
  29. package/dist/types/checkbox.d.ts +1 -1
  30. package/dist/types/internal/label-text.d.ts +2 -2
  31. package/dist/types/internal/label.d.ts +2 -6
  32. package/dist/types/internal/required-indicator.d.ts +2 -6
  33. package/dist/types-ts4.5/checkbox.d.ts +1 -1
  34. package/dist/types-ts4.5/internal/label-text.d.ts +2 -2
  35. package/dist/types-ts4.5/internal/label.d.ts +2 -6
  36. package/dist/types-ts4.5/internal/required-indicator.d.ts +2 -6
  37. package/package.json +12 -13
@@ -1,27 +1,24 @@
1
+ /* required-indicator.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.default = RequiredIndicator;
7
- var _react = require("@emotion/react");
9
+ require("./required-indicator.compiled.css");
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _runtime = require("@compiled/react/runtime");
8
12
  var _colors = require("@atlaskit/theme/colors");
9
- /**
10
- * @jsxRuntime classic
11
- * @jsx jsx
12
- */
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
-
15
- var requiredIndicatorStyles = (0, _react.css)({
16
- color: "var(--ds-text-danger, ".concat(_colors.R500, ")"),
17
- paddingInlineStart: "var(--ds-space-025, 2px)"
18
- });
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ var requiredIndicatorStyles = null;
19
16
  function RequiredIndicator() {
20
- return (
21
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text
22
- (0, _react.jsx)("span", {
23
- css: requiredIndicatorStyles,
24
- "aria-hidden": true
25
- }, "*")
26
- );
17
+ return /*#__PURE__*/React.createElement("span", {
18
+ "aria-hidden": true,
19
+ className: (0, _runtime.ax)(["_syaz1ml5 _bozgv77o"]),
20
+ style: {
21
+ "--_1xw92dq": (0, _runtime.ix)("var(--ds-text-danger, ".concat(_colors.R500, ")"))
22
+ }
23
+ }, "*");
27
24
  }
@@ -0,0 +1,53 @@
1
+
2
+ ._19itglyw{border:none}
3
+ ._19op11so+svg rect:first-of-type{transition:stroke .2s ease-in-out}
4
+ ._1ef7js4s._1ef7js4s:checked:focus+svg, ._1h6rjs4s._1h6rjs4s:focus+svg{border-radius:var(--ds-border-radius,.25rem)}
5
+ ._9bg71mn3+svg{transition:color .2s ease-in-out,fill .2s ease-in-out}
6
+ ._nd5lfibj{grid-area:1/1/2/2}
7
+ ._r050fibj+svg{grid-area:1/1/2/2}
8
+ ._smzgj3jf._smzgj3jf:checked:focus+svg, ._1dk7j3jf._1dk7j3jf:focus+svg{outline:var(--ds-border-width-outline,2px) solid var(--ds-border-focused,#2684ff)}._10oaq2ws:checked[data-invalid]+svg{--checkbox-border-color:var(--local-border-checked-invalid)}
9
+ ._10y313gf:disabled+svg, ._1wt913gf:disabled:active+svg, ._qq8613gf:disabled:focus+svg, ._1adw13gf:disabled:hover+svg, ._12sr13gf:disabled[data-invalid]+svg{cursor:not-allowed}
10
+ ._12ji1r31{outline-color:currentColor}
11
+ ._12l2ze3t{margin-inline-end:var(--ds-space-0,0)}
12
+ ._12y31o36{outline-width:medium}
13
+ ._13wo93zu+svg{--checkbox-background-color:var(--local-background)}
14
+ ._15y61vek:active+svg{--checkbox-border-color:var(--local-border-active)}
15
+ ._1610e4h9+svg rect:first-of-type{stroke-width:var(--ds-border-width,1px)}
16
+ ._16jiglyw:disabled+svg, ._693jglyw:disabled:active+svg, ._1niqglyw:disabled:focus+svg, ._cl9tglyw:disabled:hover+svg, ._1jbnglyw:disabled[data-invalid]+svg{pointer-events:none}
17
+ ._18qu1ps2:indeterminate+svg{--checkbox-background-color:var(--local-background-checked)}
18
+ ._1ah9199y:hover+svg{--checkbox-border-color:var(--local-border-hover)}
19
+ ._1bok170n:checked+svg{--checkbox-border-color:var(--local-border-checked)}
20
+ ._1bsb1osq{width:100%}
21
+ ._1fo21cni+svg{fill:var(--checkbox-tick-color)}
22
+ ._1frj180l:checked:hover+svg{--checkbox-background-color:var(--local-background-checked-hover)}
23
+ ._1g52170n:indeterminate+svg{--checkbox-border-color:var(--local-border-checked)}
24
+ ._1log17cl:indeterminate+svg{--checkbox-tick-color:var(--local-tick-checked)}
25
+ ._1mhr17cl:checked+svg{--checkbox-tick-color:var(--local-tick-checked)}
26
+ ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
27
+ ._1qu2glyw{outline-style:none}
28
+ ._1vv91diq:disabled:indeterminate+svg{--checkbox-border-color:var(--local-border-disabled)}
29
+ ._32hzmz2b:disabled:indeterminate+svg{--checkbox-background-color:var(--local-background-disabled)}
30
+ ._4t3i1osq{height:100%}
31
+ ._6rthze3t{margin-block-end:var(--ds-space-0,0)}
32
+ ._8gq114p8+svg{--checkbox-tick-color:var(--local-tick-rest)}
33
+ ._a30fhteq+svg rect:first-of-type{stroke:var(--checkbox-border-color)}
34
+ ._ahbqze3t{margin-inline-start:var(--ds-space-0,0)}
35
+ ._axq81diq:disabled+svg, ._1jiz1diq:disabled:active+svg, ._s9051diq:disabled:focus+svg, ._1efy1diq:disabled:hover+svg, ._1oav1diq:disabled[data-invalid]+svg{--checkbox-border-color:var(--local-border-disabled)}
36
+ ._dwvb1ps2:checked+svg{--checkbox-background-color:var(--local-background-checked)}
37
+ ._e6ww155b:checked:active+svg{--checkbox-background-color:var(--local-background-active)}
38
+ ._eyedglyw+svg{pointer-events:none}
39
+ ._fx2i3rva[data-invalid]+svg{--checkbox-border-color:var(--local-border-invalid)}
40
+ ._h78e1g3k:checked:hover+svg{--checkbox-border-color:var(--local-border-checked-hover)}
41
+ ._j1ta1hou:disabled:checked+svg{--checkbox-tick-color:var(--local-tick-disabled)}
42
+ ._l71j1i6y._l71j1i6y:checked:focus+svg, ._t34a1i6y._t34a1i6y:focus+svg{outline-offset:var(--ds-space-negative-025,-2px)}
43
+ ._q5a61gyf+svg{--checkbox-border-color:var(--local-border)}
44
+ ._r06hglyw{-webkit-appearance:none;appearance:none}
45
+ ._rphw18jz:checked:active+svg{--checkbox-tick-color:var(--local-tick-active)}
46
+ ._sg1j1vek:checked:active+svg{--checkbox-border-color:var(--local-border-active)}
47
+ ._tzy4idpf{opacity:0}
48
+ ._w12s155b:active+svg{--checkbox-background-color:var(--local-background-active)}
49
+ ._wje2mov0+svg{color:var(--checkbox-background-color)}
50
+ ._y32gkivo:hover+svg{--checkbox-background-color:var(--local-background-hover)}
51
+ ._y9y9mz2b:disabled+svg, ._141bmz2b:disabled:active+svg, ._255gmz2b:disabled:focus+svg, ._jj67mz2b:disabled:hover+svg, ._swhgmz2b:disabled[data-invalid]+svg{--checkbox-background-color:var(--local-background-disabled)}
52
+ ._yjhd1hou:disabled:indeterminate+svg{--checkbox-tick-color:var(--local-tick-disabled)}
53
+ @media screen and (forced-colors:active){._w1cowc43+svg{--checkbox-background-color:Canvas}._jdqn1onz+svg{--checkbox-border-color:CanvasText}._4y4t1onz+svg{--checkbox-tick-color:CanvasText}._lvfrwc43:checked+svg, ._g68dwc43:checked:hover+svg{--checkbox-background-color:Canvas}._13dk1onz:checked+svg, ._w1el1onz:checked:hover+svg{--checkbox-border-color:CanvasText}._a9yw1onz:checked+svg, ._1l3g1onz:checked:hover+svg{--checkbox-tick-color:CanvasText}._dcdpgir2:focus+svg rect:first-of-type{stroke:Highlight}._wobcgir2[data-invalid]+svg{--checkbox-border-color:Highlight}._rp9wgir2:checked[data-invalid]+svg{--checkbox-border-color:Highlight}._9ebfwc43:disabled+svg, ._e43iwc43:disabled:active+svg, ._1tkuwc43:disabled:focus+svg, ._1lehwc43:disabled:hover+svg, ._b9q3wc43:disabled[data-invalid]+svg{--checkbox-background-color:Canvas}._tu2918qt:disabled+svg, ._1uxv18qt:disabled:active+svg, ._1ufw18qt:disabled:focus+svg, ._opo918qt:disabled:hover+svg, ._1e8318qt:disabled[data-invalid]+svg{--checkbox-border-color:GrayText}._1k3d18qt:disabled+svg, ._25yv18qt:disabled:active+svg, ._1igz18qt:disabled:focus+svg, ._c7cc18qt:disabled:hover+svg, ._1swg18qt:disabled[data-invalid]+svg{--checkbox-tick-color:GrayText}}
@@ -1,147 +1,14 @@
1
+ /* checkbox.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
3
+ import "./checkbox.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
6
  import { forwardRef, memo, useCallback, useEffect, useRef, useState } from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { css, jsx } from '@emotion/react';
10
7
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
11
8
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
12
9
  import { B200 } from '@atlaskit/theme/colors';
13
10
  import { CheckboxIcon, Label, LabelText, RequiredIndicator } from './internal';
14
- /* eslint-disable @atlaskit/design-system/no-nested-styles */
15
- const checkboxStyles = css({
16
- width: '100%',
17
- height: '100%',
18
- margin: "var(--ds-space-0, 0px)",
19
- appearance: 'none',
20
- border: 'none',
21
- gridArea: '1 / 1 / 2 / 2',
22
- opacity: 0,
23
- outline: 'none',
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
- '& + svg': {
26
- /**
27
- * Change the variables --checkbox-background-color, --checkbox-border-color
28
- * and --checkbox-tick-color according to user interactions.
29
- * All other variables are constant.
30
- * All styles from the input target the sibling svg.
31
- */
32
- '--checkbox-background-color': 'var(--local-background)',
33
- '--checkbox-border-color': 'var(--local-border)',
34
- '--checkbox-tick-color': 'var(--local-tick-rest)',
35
- color: 'var(--checkbox-background-color)',
36
- fill: 'var(--checkbox-tick-color)',
37
- gridArea: '1 / 1 / 2 / 2',
38
- pointerEvents: 'none',
39
- transition: 'color 0.2s ease-in-out, fill 0.2s ease-in-out',
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
41
- 'rect:first-of-type': {
42
- stroke: 'var(--checkbox-border-color)',
43
- strokeWidth: "var(--ds-border-width, 1px)",
44
- transition: 'stroke 0.2s ease-in-out'
45
- }
46
- },
47
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
48
- '&&:focus + svg, &&:checked:focus + svg': {
49
- borderRadius: "var(--ds-border-radius, 0.25rem)",
50
- outline: `${"var(--ds-border-width-outline, 2px)"} solid ${`var(--ds-border-focused, ${B200})`}`,
51
- outlineOffset: "var(--ds-space-negative-025, -2px)"
52
- },
53
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
54
- '&:hover + svg': {
55
- '--checkbox-background-color': 'var(--local-background-hover)',
56
- '--checkbox-border-color': 'var(--local-border-hover)'
57
- },
58
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
59
- '&:checked:hover + svg': {
60
- '--checkbox-background-color': 'var(--local-background-checked-hover)',
61
- '--checkbox-border-color': 'var(--local-border-checked-hover)'
62
- },
63
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
64
- '&:checked + svg': {
65
- '--checkbox-background-color': 'var(--local-background-checked)',
66
- '--checkbox-border-color': 'var(--local-border-checked)',
67
- '--checkbox-tick-color': 'var(--local-tick-checked)'
68
- },
69
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
70
- '&[data-invalid] + svg': {
71
- '--checkbox-border-color': 'var(--local-border-invalid)'
72
- },
73
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
74
- '&:checked[data-invalid] + svg': {
75
- '--checkbox-border-color': 'var(--local-border-checked-invalid)'
76
- },
77
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
78
- '&:active + svg': {
79
- '--checkbox-background-color': 'var(--local-background-active)',
80
- '--checkbox-border-color': 'var(--local-border-active)'
81
- },
82
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
83
- '&:checked:active + svg': {
84
- '--checkbox-background-color': 'var(--local-background-active)',
85
- '--checkbox-border-color': 'var(--local-border-active)',
86
- '--checkbox-tick-color': 'var(--local-tick-active)'
87
- },
88
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
89
- '&:disabled + svg, &:disabled:hover + svg, &:disabled:focus + svg, &:disabled:active + svg, &:disabled[data-invalid] + svg': {
90
- '--checkbox-background-color': 'var(--local-background-disabled)',
91
- '--checkbox-border-color': 'var(--local-border-disabled)',
92
- cursor: 'not-allowed',
93
- pointerEvents: 'none'
94
- },
95
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
96
- '&:disabled:checked + svg': {
97
- '--checkbox-tick-color': 'var(--local-tick-disabled)'
98
- },
99
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-19551
100
- '&:indeterminate + svg': {
101
- '--checkbox-background-color': 'var(--local-background-checked)',
102
- '--checkbox-border-color': 'var(--local-border-checked)',
103
- '--checkbox-tick-color': 'var(--local-tick-checked)'
104
- },
105
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-19551
106
- '&:disabled:indeterminate + svg': {
107
- '--checkbox-background-color': 'var(--local-background-disabled)',
108
- '--checkbox-border-color': 'var(--local-border-disabled)',
109
- '--checkbox-tick-color': 'var(--local-tick-disabled)'
110
- },
111
- '@media screen and (forced-colors: active)': {
112
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
113
- '& + svg': {
114
- '--checkbox-background-color': 'Canvas',
115
- '--checkbox-border-color': 'CanvasText',
116
- '--checkbox-tick-color': 'CanvasText'
117
- },
118
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
119
- '&:checked + svg, &:checked:hover + svg': {
120
- '--checkbox-background-color': 'Canvas',
121
- '--checkbox-border-color': 'CanvasText',
122
- '--checkbox-tick-color': 'CanvasText'
123
- },
124
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
125
- '&:focus + svg rect:first-of-type': {
126
- stroke: 'Highlight'
127
- },
128
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
129
- '&[data-invalid] + svg': {
130
- '--checkbox-border-color': 'Highlight'
131
- },
132
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
133
- '&:checked[data-invalid] + svg': {
134
- '--checkbox-border-color': 'Highlight'
135
- },
136
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
137
- '&:disabled + svg, &:disabled:hover + svg, &:disabled:focus + svg, &:disabled:active + svg, &:disabled[data-invalid] + svg': {
138
- '--checkbox-background-color': 'Canvas',
139
- '--checkbox-border-color': 'GrayText',
140
- '--checkbox-tick-color': 'GrayText'
141
- }
142
- }
143
- });
144
- /* eslint-enable @atlaskit/design-system/no-nested-styles */
11
+ const checkboxStyles = null;
145
12
 
146
13
  /**
147
14
  * __Checkbox__
@@ -167,6 +34,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
167
34
  isRequired,
168
35
  testId,
169
36
  xcss,
37
+ className,
170
38
  ...rest
171
39
  } = props;
172
40
  const [isCheckedState, setIsCheckedState] = useState(isCheckedProp !== undefined ? isCheckedProp : defaultChecked);
@@ -182,7 +50,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
182
50
  analyticsData: analyticsContext,
183
51
  componentName: 'checkbox',
184
52
  packageName: "@atlaskit/checkbox",
185
- packageVersion: "15.4.0"
53
+ packageVersion: "17.0.0"
186
54
  });
187
55
  const internalRef = useRef(null);
188
56
  const mergedRefs = mergeRefs([internalRef, ref]);
@@ -194,7 +62,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
194
62
  internalRef.current.indeterminate = isIndeterminate;
195
63
  }
196
64
  }, [isIndeterminate]);
197
- return jsx(Label, {
65
+ return /*#__PURE__*/React.createElement(Label, {
198
66
  isDisabled: isDisabled,
199
67
  label: label,
200
68
  id: rest.id ? `${rest.id}-label` : undefined,
@@ -204,7 +72,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
204
72
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
205
73
  ,
206
74
  xcss: xcss
207
- }, jsx("input", _extends({
75
+ }, /*#__PURE__*/React.createElement("input", _extends({
208
76
  // It is necessary only for Safari. It allows to render focus styles.
209
77
  tabIndex: 0
210
78
  }, rest, {
@@ -215,15 +83,16 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
215
83
  value: value,
216
84
  name: name,
217
85
  required: isRequired,
218
- css: checkboxStyles,
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
87
+ className: ax(["_19itglyw _nd5lfibj _12ji1r31 _1qu2glyw _12y31o36 _1bsb1osq _4t3i1osq _r06hglyw _6rthze3t _1pfhze3t _12l2ze3t _ahbqze3t _tzy4idpf _r050fibj _9bg71mn3 _19op11so _a30fhteq _1610e4h9 _13wo93zu _q5a61gyf _8gq114p8 _wje2mov0 _1fo21cni _eyedglyw _1ef7js4s _1h6rjs4s _smzgj3jf _1dk7j3jf _l71j1i6y _t34a1i6y _y32gkivo _1ah9199y _1frj180l _h78e1g3k _dwvb1ps2 _1bok170n _1mhr17cl _fx2i3rva _10oaq2ws _w12s155b _15y61vek _e6ww155b _sg1j1vek _rphw18jz _y9y9mz2b _141bmz2b _255gmz2b _jj67mz2b _swhgmz2b _axq81diq _1jiz1diq _s9051diq _1efy1diq _1oav1diq _10y313gf _1wt913gf _qq8613gf _1adw13gf _12sr13gf _16jiglyw _693jglyw _1niqglyw _cl9tglyw _1jbnglyw _j1ta1hou _18qu1ps2 _1g52170n _1log17cl _32hzmz2b _1vv91diq _yjhd1hou _w1cowc43 _jdqn1onz _4y4t1onz _lvfrwc43 _g68dwc43 _13dk1onz _w1el1onz _a9yw1onz _1l3g1onz _dcdpgir2 _wobcgir2 _rp9wgir2 _9ebfwc43 _e43iwc43 _1tkuwc43 _1lehwc43 _b9q3wc43 _tu2918qt _1uxv18qt _1ufw18qt _opo918qt _1e8318qt _1k3d18qt _25yv18qt _1igz18qt _c7cc18qt _1swg18qt", className]),
219
88
  onChange: onChangeAnalytics,
220
89
  "aria-invalid": isInvalid ? 'true' : undefined,
221
90
  "data-testid": testId && `${testId}--hidden-checkbox`,
222
91
  "data-invalid": isInvalid ? 'true' : undefined
223
- })), jsx(CheckboxIcon, {
92
+ })), /*#__PURE__*/React.createElement(CheckboxIcon, {
224
93
  isIndeterminate: isIndeterminate,
225
94
  isChecked: isChecked
226
- }), label && jsx(LabelText, null, label, isRequired && jsx(RequiredIndicator, null)));
95
+ }), label && /*#__PURE__*/React.createElement(LabelText, null, label, isRequired && /*#__PURE__*/React.createElement(RequiredIndicator, null)));
227
96
  }));
228
97
  Checkbox.displayName = 'Checkbox';
229
98
  export default Checkbox;
@@ -1,25 +1,21 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
1
+ /* checkbox-icon.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import * as React from 'react';
3
+ import { ax, ix } from "@compiled/react/runtime";
5
4
  import { memo, useMemo } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx } from '@emotion/react';
9
5
  import PrimitiveSVGIcon from '@atlaskit/icon/svg';
10
6
  import { fg } from '@atlaskit/platform-feature-flags';
11
7
  function getIcon(isIndeterminate, isChecked) {
12
8
  if (isIndeterminate) {
13
9
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
14
10
  if (fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration')) {
15
- return jsx("path", {
11
+ return /*#__PURE__*/React.createElement("path", {
16
12
  fillRule: "evenodd",
17
13
  clipRule: "evenodd",
18
14
  d: "M7.75 12.75H16.25V11.25H7.75V12.75Z",
19
15
  fill: "inherit"
20
16
  });
21
17
  } else {
22
- return jsx("rect", {
18
+ return /*#__PURE__*/React.createElement("rect", {
23
19
  fill: "inherit",
24
20
  x: "8",
25
21
  y: "11",
@@ -32,14 +28,14 @@ function getIcon(isIndeterminate, isChecked) {
32
28
  if (isChecked) {
33
29
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
34
30
  if (fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration')) {
35
- return jsx("path", {
31
+ return /*#__PURE__*/React.createElement("path", {
36
32
  fillRule: "evenodd",
37
33
  clipRule: "evenodd",
38
34
  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",
39
35
  fill: "inherit"
40
36
  });
41
37
  } else {
42
- return jsx("path", {
38
+ return /*#__PURE__*/React.createElement("path", {
43
39
  d: "M9.707 11.293a1 1 0 1 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 1 0-1.414-1.414L11 12.586l-1.293-1.293z",
44
40
  fill: "inherit"
45
41
  });
@@ -63,22 +59,22 @@ const CheckboxIcon = /*#__PURE__*/memo(({
63
59
  isChecked
64
60
  }) => {
65
61
  const icon = useMemo(() => getIcon(isIndeterminate, isChecked), [isIndeterminate, isChecked]);
66
- return jsx(PrimitiveSVGIcon, {
62
+ return /*#__PURE__*/React.createElement(PrimitiveSVGIcon, {
67
63
  label: "",
68
64
  primaryColor: "var(--checkbox-background-color)",
69
65
  secondaryColor: "var(--checkbox-tick-color)"
70
- }, jsx("g", {
66
+ }, /*#__PURE__*/React.createElement("g", {
71
67
  fillRule: "evenodd"
72
68
  },
73
69
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
74
- fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? jsx("rect", {
70
+ fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? /*#__PURE__*/React.createElement("rect", {
75
71
  fill: "currentColor",
76
72
  x: "5.5",
77
73
  y: "5.5",
78
74
  width: "13",
79
75
  height: "13",
80
76
  rx: "1.5"
81
- }) : jsx("rect", {
77
+ }) : /*#__PURE__*/React.createElement("rect", {
82
78
  fill: "currentColor",
83
79
  x: "6",
84
80
  y: "6",
@@ -0,0 +1,2 @@
1
+
2
+ ._nd5l11ig{grid-area:1/2/2/3}._1wpz1h6o{align-self:center}
@@ -1,17 +1,12 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
7
- const labelTextStyles = css({
8
- alignSelf: 'center',
9
- gridArea: '1 / 2 / 2 / 3'
10
- });
1
+ /* label-text.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./label-text.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ const labelTextStyles = null;
11
6
  export default function LabelText({
12
7
  children
13
8
  }) {
14
- return jsx("span", {
15
- css: labelTextStyles
9
+ return /*#__PURE__*/React.createElement("span", {
10
+ className: ax(["_nd5l11ig _1wpz1h6o"])
16
11
  }, children);
17
12
  }
@@ -0,0 +1,29 @@
1
+ ._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._zulp1nu5{gap:var(--ds-space-0,0) var(--ds-space-050,4px)}
3
+ ._13hr1j28{--local-tick-rest:transparent}
4
+ ._18q015t7{--local-tick-disabled:var(--ds-icon-disabled,#a5adba)}
5
+ ._1dikhh5a{--local-border-checked-hover:var(--ds-background-selected-bold-hovered,#0065ff)}
6
+ ._1e0c11p5{display:grid}
7
+ ._1ejihkll{grid-auto-columns:1fr}
8
+ ._1eszzyvw{--local-background-checked:var(--ds-background-selected-bold,#0052cc)}
9
+ ._1g1funzk{--local-border-active:var(--ds-border,#deebff)}
10
+ ._1j3h1q3k{--local-border-invalid:var(--ds-border-danger,#ff5630)}
11
+ ._1nzs11d3{--local-background-active:var(--ds-background-input-pressed,#deebff)}
12
+ ._1rda1qbb{--local-tick-checked:var(--ds-icon-inverse,#fafbfc)}
13
+ ._1sfg1q3k{--local-border-checked-invalid:var(--ds-border-danger,#ff5630)}
14
+ ._1yjc194a{--local-border-focus:var(--ds-border-focused,#2684ff)}
15
+ ._80om13gf{cursor:not-allowed}
16
+ ._80om73ad{cursor:default}
17
+ ._ay2w1y1w{--local-background-disabled:var(--ds-background-disabled,#f4f5f7)}
18
+ ._d51u10ko{--local-background-hover:var(--ds-background-input-hovered,#ebecf0)}
19
+ ._eawb1dzn{--local-tick-active:var(--ds-icon-inverse,#0052cc)}
20
+ ._fpdj1y1w{--local-border-disabled:var(--ds-background-disabled,#f4f5f7)}
21
+ ._h5e3mag2{--local-background:var(--ds-background-input,#fafbfc)}
22
+ ._l6wkzyvw{--local-border-checked:var(--ds-background-selected-bold,#0052cc)}
23
+ ._oaj11fmg{--local-border-hover:var(--ds-border-input,#7a869a)}
24
+ ._phft1fmg{--local-border:var(--ds-border-input,#7a869a)}
25
+ ._syaz1tvo{color:var(--ds-text-disabled,#97a0af)}
26
+ ._syazj3m3{color:var(--ds-text,#091e42)}
27
+ ._umai184x{grid-auto-rows:min-content}
28
+ ._yp0jhh5a{--local-background-checked-hover:var(--ds-background-selected-bold-hovered,#0065ff)}
29
+ ._yv0ey09t{grid-template-columns:min-content auto}
@@ -1,56 +1,12 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
1
+ /* label.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./label.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
7
5
  import { B200, B300, B400, B50, N10, N100, N20, N30, N70, N80, N900, R300 } from '@atlaskit/theme/colors';
8
- const baseStyles = css({
9
- display: 'grid',
10
- gridAutoColumns: '1fr',
11
- gridAutoRows: 'min-content',
12
- color: `var(--ds-text, ${N900})`,
13
- cursor: 'default',
14
- font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
15
- });
16
- const textLabelLayoutStyles = css({
17
- gap: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-050, 4px)"}`,
18
- gridTemplateColumns: 'min-content auto'
19
- });
20
- const disabledStyles = css({
21
- color: `var(--ds-text-disabled, ${N80})`,
22
- cursor: 'not-allowed'
23
- });
24
- const labelStyles = css({
25
- /**
26
- * Background
27
- */
28
- '--local-background': `var(--ds-background-input, ${N10})`,
29
- '--local-background-active': `var(--ds-background-input-pressed, ${B50})`,
30
- '--local-background-checked': `var(--ds-background-selected-bold, ${B400})`,
31
- '--local-background-checked-hover': `var(--ds-background-selected-bold-hovered, ${B300})`,
32
- '--local-background-disabled': `var(--ds-background-disabled, ${N20})`,
33
- '--local-background-hover': `var(--ds-background-input-hovered, ${N30})`,
34
- /**
35
- * Border
36
- */
37
- '--local-border': `var(--ds-border-input, ${N100})`,
38
- '--local-border-active': `var(--ds-border, ${B50})`,
39
- '--local-border-checked': `var(--ds-background-selected-bold, ${B400})`,
40
- '--local-border-checked-hover': `var(--ds-background-selected-bold-hovered, ${B300})`,
41
- '--local-border-checked-invalid': `var(--ds-border-danger, ${R300})`,
42
- '--local-border-disabled': `var(--ds-background-disabled, ${N20})`,
43
- '--local-border-focus': `var(--ds-border-focused, ${B200})`,
44
- '--local-border-hover': `var(--ds-border-input, ${N100})`,
45
- '--local-border-invalid': `var(--ds-border-danger, ${R300})`,
46
- /**
47
- * Tick
48
- */
49
- '--local-tick-active': `var(--ds-icon-inverse, ${B400})`,
50
- '--local-tick-checked': `var(--ds-icon-inverse, ${N10})`,
51
- '--local-tick-disabled': `var(--ds-icon-disabled, ${N70})`,
52
- '--local-tick-rest': 'transparent'
53
- });
6
+ const baseStyles = null;
7
+ const textLabelLayoutStyles = null;
8
+ const disabledStyles = null;
9
+ const labelStyles = null;
54
10
  export default function Label({
55
11
  children,
56
12
  isDisabled,
@@ -59,12 +15,8 @@ export default function Label({
59
15
  id,
60
16
  xcss
61
17
  }) {
62
- return jsx("label", {
63
- // Because we're using Emotion local jsx namespace we have to coerce xcss prop to a string.
64
- // When we're fully on Compiled its local jsx namespace accepts the output of xcss prop.
65
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- This rule still fails because of the TS assertion
66
- className: xcss,
67
- css: [baseStyles, label && textLabelLayoutStyles, isDisabled && disabledStyles, labelStyles],
18
+ return /*#__PURE__*/React.createElement("label", {
19
+ className: ax(["_11c81oud _1e0c11p5 _1ejihkll _umai184x _syazj3m3 _80om73ad", label && "_zulp1nu5 _yv0ey09t", isDisabled && "_syaz1tvo _80om13gf", "_h5e3mag2 _1nzs11d3 _1eszzyvw _yp0jhh5a _ay2w1y1w _d51u10ko _phft1fmg _1g1funzk _l6wkzyvw _1dikhh5a _1sfg1q3k _fpdj1y1w _1yjc194a _oaj11fmg _1j3h1q3k _eawb1dzn _1rda1qbb _18q015t7 _13hr1j28", xcss]),
68
20
  "data-testid": testId,
69
21
  "data-disabled": isDisabled || undefined,
70
22
  id: id
@@ -0,0 +1,2 @@
1
+ ._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
2
+ ._syaz1gtz{color:var(--ds-text-danger,#bf2600)}
@@ -1,20 +1,12 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
1
+ /* required-indicator.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./required-indicator.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
7
5
  import { R500 } from '@atlaskit/theme/colors';
8
- const requiredIndicatorStyles = css({
9
- color: `var(--ds-text-danger, ${R500})`,
10
- paddingInlineStart: "var(--ds-space-025, 2px)"
11
- });
6
+ const requiredIndicatorStyles = null;
12
7
  export default function RequiredIndicator() {
13
- return (
14
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text
15
- jsx("span", {
16
- css: requiredIndicatorStyles,
17
- "aria-hidden": true
18
- }, "*")
19
- );
8
+ return /*#__PURE__*/React.createElement("span", {
9
+ "aria-hidden": true,
10
+ className: ax(["_syaz1gtz _bozgv77o"])
11
+ }, "*");
20
12
  }
@@ -0,0 +1,53 @@
1
+
2
+ ._19itglyw{border:none}
3
+ ._19op11so+svg rect:first-of-type{transition:stroke .2s ease-in-out}
4
+ ._1ef7js4s._1ef7js4s:checked:focus+svg, ._1h6rjs4s._1h6rjs4s:focus+svg{border-radius:var(--ds-border-radius,.25rem)}
5
+ ._9bg71mn3+svg{transition:color .2s ease-in-out,fill .2s ease-in-out}
6
+ ._nd5lfibj{grid-area:1/1/2/2}
7
+ ._r050fibj+svg{grid-area:1/1/2/2}
8
+ ._smzgo41a._smzgo41a:checked:focus+svg, ._1dk7o41a._1dk7o41a:focus+svg{outline:var(--_gqccd2)}._10oaq2ws:checked[data-invalid]+svg{--checkbox-border-color:var(--local-border-checked-invalid)}
9
+ ._10y313gf:disabled+svg, ._1wt913gf:disabled:active+svg, ._qq8613gf:disabled:focus+svg, ._1adw13gf:disabled:hover+svg, ._12sr13gf:disabled[data-invalid]+svg{cursor:not-allowed}
10
+ ._12ji1r31{outline-color:currentColor}
11
+ ._12l2ze3t{margin-inline-end:var(--ds-space-0,0)}
12
+ ._12y31o36{outline-width:medium}
13
+ ._13wo93zu+svg{--checkbox-background-color:var(--local-background)}
14
+ ._15y61vek:active+svg{--checkbox-border-color:var(--local-border-active)}
15
+ ._1610e4h9+svg rect:first-of-type{stroke-width:var(--ds-border-width,1px)}
16
+ ._16jiglyw:disabled+svg, ._693jglyw:disabled:active+svg, ._1niqglyw:disabled:focus+svg, ._cl9tglyw:disabled:hover+svg, ._1jbnglyw:disabled[data-invalid]+svg{pointer-events:none}
17
+ ._18qu1ps2:indeterminate+svg{--checkbox-background-color:var(--local-background-checked)}
18
+ ._1ah9199y:hover+svg{--checkbox-border-color:var(--local-border-hover)}
19
+ ._1bok170n:checked+svg{--checkbox-border-color:var(--local-border-checked)}
20
+ ._1bsb1osq{width:100%}
21
+ ._1fo21cni+svg{fill:var(--checkbox-tick-color)}
22
+ ._1frj180l:checked:hover+svg{--checkbox-background-color:var(--local-background-checked-hover)}
23
+ ._1g52170n:indeterminate+svg{--checkbox-border-color:var(--local-border-checked)}
24
+ ._1log17cl:indeterminate+svg{--checkbox-tick-color:var(--local-tick-checked)}
25
+ ._1mhr17cl:checked+svg{--checkbox-tick-color:var(--local-tick-checked)}
26
+ ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
27
+ ._1qu2glyw{outline-style:none}
28
+ ._1vv91diq:disabled:indeterminate+svg{--checkbox-border-color:var(--local-border-disabled)}
29
+ ._32hzmz2b:disabled:indeterminate+svg{--checkbox-background-color:var(--local-background-disabled)}
30
+ ._4t3i1osq{height:100%}
31
+ ._6rthze3t{margin-block-end:var(--ds-space-0,0)}
32
+ ._8gq114p8+svg{--checkbox-tick-color:var(--local-tick-rest)}
33
+ ._a30fhteq+svg rect:first-of-type{stroke:var(--checkbox-border-color)}
34
+ ._ahbqze3t{margin-inline-start:var(--ds-space-0,0)}
35
+ ._axq81diq:disabled+svg, ._1jiz1diq:disabled:active+svg, ._s9051diq:disabled:focus+svg, ._1efy1diq:disabled:hover+svg, ._1oav1diq:disabled[data-invalid]+svg{--checkbox-border-color:var(--local-border-disabled)}
36
+ ._dwvb1ps2:checked+svg{--checkbox-background-color:var(--local-background-checked)}
37
+ ._e6ww155b:checked:active+svg{--checkbox-background-color:var(--local-background-active)}
38
+ ._eyedglyw+svg{pointer-events:none}
39
+ ._fx2i3rva[data-invalid]+svg{--checkbox-border-color:var(--local-border-invalid)}
40
+ ._h78e1g3k:checked:hover+svg{--checkbox-border-color:var(--local-border-checked-hover)}
41
+ ._j1ta1hou:disabled:checked+svg{--checkbox-tick-color:var(--local-tick-disabled)}
42
+ ._l71j1i6y._l71j1i6y:checked:focus+svg, ._t34a1i6y._t34a1i6y:focus+svg{outline-offset:var(--ds-space-negative-025,-2px)}
43
+ ._q5a61gyf+svg{--checkbox-border-color:var(--local-border)}
44
+ ._r06hglyw{-webkit-appearance:none;appearance:none}
45
+ ._rphw18jz:checked:active+svg{--checkbox-tick-color:var(--local-tick-active)}
46
+ ._sg1j1vek:checked:active+svg{--checkbox-border-color:var(--local-border-active)}
47
+ ._tzy4idpf{opacity:0}
48
+ ._w12s155b:active+svg{--checkbox-background-color:var(--local-background-active)}
49
+ ._wje2mov0+svg{color:var(--checkbox-background-color)}
50
+ ._y32gkivo:hover+svg{--checkbox-background-color:var(--local-background-hover)}
51
+ ._y9y9mz2b:disabled+svg, ._141bmz2b:disabled:active+svg, ._255gmz2b:disabled:focus+svg, ._jj67mz2b:disabled:hover+svg, ._swhgmz2b:disabled[data-invalid]+svg{--checkbox-background-color:var(--local-background-disabled)}
52
+ ._yjhd1hou:disabled:indeterminate+svg{--checkbox-tick-color:var(--local-tick-disabled)}
53
+ @media screen and (forced-colors:active){._w1cowc43+svg{--checkbox-background-color:Canvas}._jdqn1onz+svg{--checkbox-border-color:CanvasText}._4y4t1onz+svg{--checkbox-tick-color:CanvasText}._lvfrwc43:checked+svg, ._g68dwc43:checked:hover+svg{--checkbox-background-color:Canvas}._13dk1onz:checked+svg, ._w1el1onz:checked:hover+svg{--checkbox-border-color:CanvasText}._a9yw1onz:checked+svg, ._1l3g1onz:checked:hover+svg{--checkbox-tick-color:CanvasText}._dcdpgir2:focus+svg rect:first-of-type{stroke:Highlight}._wobcgir2[data-invalid]+svg{--checkbox-border-color:Highlight}._rp9wgir2:checked[data-invalid]+svg{--checkbox-border-color:Highlight}._9ebfwc43:disabled+svg, ._e43iwc43:disabled:active+svg, ._1tkuwc43:disabled:focus+svg, ._1lehwc43:disabled:hover+svg, ._b9q3wc43:disabled[data-invalid]+svg{--checkbox-background-color:Canvas}._tu2918qt:disabled+svg, ._1uxv18qt:disabled:active+svg, ._1ufw18qt:disabled:focus+svg, ._opo918qt:disabled:hover+svg, ._1e8318qt:disabled[data-invalid]+svg{--checkbox-border-color:GrayText}._1k3d18qt:disabled+svg, ._25yv18qt:disabled:active+svg, ._1igz18qt:disabled:focus+svg, ._c7cc18qt:disabled:hover+svg, ._1swg18qt:disabled[data-invalid]+svg{--checkbox-tick-color:GrayText}}