@atlaskit/checkbox 16.0.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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/checkbox.compiled.css +53 -0
- package/dist/cjs/checkbox.js +22 -146
- package/dist/cjs/internal/checkbox-icon.js +15 -17
- package/dist/cjs/internal/label-text.compiled.css +2 -0
- package/dist/cjs/internal/label-text.js +10 -13
- package/dist/cjs/internal/label.compiled.css +29 -0
- package/dist/cjs/internal/label.js +32 -60
- package/dist/cjs/internal/required-indicator.compiled.css +2 -0
- package/dist/cjs/internal/required-indicator.js +15 -18
- package/dist/es2019/checkbox.compiled.css +53 -0
- package/dist/es2019/checkbox.js +13 -144
- package/dist/es2019/internal/checkbox-icon.js +11 -15
- package/dist/es2019/internal/label-text.compiled.css +2 -0
- package/dist/es2019/internal/label-text.js +7 -12
- package/dist/es2019/internal/label.compiled.css +29 -0
- package/dist/es2019/internal/label.js +10 -58
- package/dist/es2019/internal/required-indicator.compiled.css +2 -0
- package/dist/es2019/internal/required-indicator.js +9 -17
- package/dist/esm/checkbox.compiled.css +53 -0
- package/dist/esm/checkbox.js +18 -146
- package/dist/esm/internal/checkbox-icon.js +11 -15
- package/dist/esm/internal/label-text.compiled.css +2 -0
- package/dist/esm/internal/label-text.js +7 -12
- package/dist/esm/internal/label.compiled.css +29 -0
- package/dist/esm/internal/label.js +29 -59
- package/dist/esm/internal/required-indicator.compiled.css +2 -0
- package/dist/esm/internal/required-indicator.js +12 -17
- package/dist/types/checkbox.d.ts +1 -1
- package/dist/types/internal/label-text.d.ts +2 -2
- package/dist/types/internal/label.d.ts +2 -6
- package/dist/types/internal/required-indicator.d.ts +2 -6
- package/dist/types-ts4.5/checkbox.d.ts +1 -1
- package/dist/types-ts4.5/internal/label-text.d.ts +2 -2
- package/dist/types-ts4.5/internal/label.d.ts +2 -6
- package/dist/types-ts4.5/internal/required-indicator.d.ts +2 -6
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/checkbox
|
|
2
2
|
|
|
3
|
+
## 17.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#117762](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/117762)
|
|
8
|
+
[`424fded960a12`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/424fded960a12) -
|
|
9
|
+
Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
|
|
10
|
+
the rest of the Atlaskit techstack, and support React 18 Streaming SSR. Please note, in order to
|
|
11
|
+
use this version of `@atlaskit/checkbox`, you will need to ensure that your bundler is configured
|
|
12
|
+
to handle `.css` imports correctly.
|
|
13
|
+
|
|
14
|
+
Most bundlers come with built-in support for `.css` imports, so you may not need to do anything.
|
|
15
|
+
If you are using a different bundler, please refer to the documentation for that bundler to
|
|
16
|
+
understand how to handle `.css` imports. For more information on the migration, please refer to
|
|
17
|
+
[RFC-73 Migrating our components to Compiled CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953).
|
|
18
|
+
|
|
3
19
|
## 16.0.0
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
|
@@ -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}}
|
package/dist/cjs/checkbox.js
CHANGED
|
@@ -1,156 +1,27 @@
|
|
|
1
|
+
/* checkbox.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./checkbox.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
16
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _react = require("react");
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
17
|
var _usePlatformLeafEventHandler = require("@atlaskit/analytics-next/usePlatformLeafEventHandler");
|
|
14
18
|
var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
15
19
|
var _colors = require("@atlaskit/theme/colors");
|
|
16
20
|
var _internal = require("./internal");
|
|
17
|
-
var _excluded = ["isChecked", "isDisabled", "isInvalid", "defaultChecked", "isIndeterminate", "onChange", "analyticsContext", "label", "name", "value", "isRequired", "testId", "xcss"];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
-
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
24
|
-
var checkboxStyles = (0, _react2.css)({
|
|
25
|
-
width: '100%',
|
|
26
|
-
height: '100%',
|
|
27
|
-
margin: "var(--ds-space-0, 0px)",
|
|
28
|
-
appearance: 'none',
|
|
29
|
-
border: 'none',
|
|
30
|
-
gridArea: '1 / 1 / 2 / 2',
|
|
31
|
-
opacity: 0,
|
|
32
|
-
outline: 'none',
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
|
-
'& + svg': {
|
|
35
|
-
/**
|
|
36
|
-
* Change the variables --checkbox-background-color, --checkbox-border-color
|
|
37
|
-
* and --checkbox-tick-color according to user interactions.
|
|
38
|
-
* All other variables are constant.
|
|
39
|
-
* All styles from the input target the sibling svg.
|
|
40
|
-
*/
|
|
41
|
-
'--checkbox-background-color': 'var(--local-background)',
|
|
42
|
-
'--checkbox-border-color': 'var(--local-border)',
|
|
43
|
-
'--checkbox-tick-color': 'var(--local-tick-rest)',
|
|
44
|
-
color: 'var(--checkbox-background-color)',
|
|
45
|
-
fill: 'var(--checkbox-tick-color)',
|
|
46
|
-
gridArea: '1 / 1 / 2 / 2',
|
|
47
|
-
pointerEvents: 'none',
|
|
48
|
-
transition: 'color 0.2s ease-in-out, fill 0.2s ease-in-out',
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
50
|
-
'rect:first-of-type': {
|
|
51
|
-
stroke: 'var(--checkbox-border-color)',
|
|
52
|
-
strokeWidth: "var(--ds-border-width, 1px)",
|
|
53
|
-
transition: 'stroke 0.2s ease-in-out'
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
57
|
-
'&&:focus + svg, &&:checked:focus + svg': {
|
|
58
|
-
borderRadius: "var(--ds-border-radius, 0.25rem)",
|
|
59
|
-
outline: "var(--ds-border-width-outline, 2px)".concat(" solid ", "var(--ds-border-focused, ".concat(_colors.B200, ")")),
|
|
60
|
-
outlineOffset: "var(--ds-space-negative-025, -2px)"
|
|
61
|
-
},
|
|
62
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
|
-
'&:hover + svg': {
|
|
64
|
-
'--checkbox-background-color': 'var(--local-background-hover)',
|
|
65
|
-
'--checkbox-border-color': 'var(--local-border-hover)'
|
|
66
|
-
},
|
|
67
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
68
|
-
'&:checked:hover + svg': {
|
|
69
|
-
'--checkbox-background-color': 'var(--local-background-checked-hover)',
|
|
70
|
-
'--checkbox-border-color': 'var(--local-border-checked-hover)'
|
|
71
|
-
},
|
|
72
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
73
|
-
'&:checked + svg': {
|
|
74
|
-
'--checkbox-background-color': 'var(--local-background-checked)',
|
|
75
|
-
'--checkbox-border-color': 'var(--local-border-checked)',
|
|
76
|
-
'--checkbox-tick-color': 'var(--local-tick-checked)'
|
|
77
|
-
},
|
|
78
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
79
|
-
'&[data-invalid] + svg': {
|
|
80
|
-
'--checkbox-border-color': 'var(--local-border-invalid)'
|
|
81
|
-
},
|
|
82
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
83
|
-
'&:checked[data-invalid] + svg': {
|
|
84
|
-
'--checkbox-border-color': 'var(--local-border-checked-invalid)'
|
|
85
|
-
},
|
|
86
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
87
|
-
'&:active + svg': {
|
|
88
|
-
'--checkbox-background-color': 'var(--local-background-active)',
|
|
89
|
-
'--checkbox-border-color': 'var(--local-border-active)'
|
|
90
|
-
},
|
|
91
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
92
|
-
'&:checked:active + svg': {
|
|
93
|
-
'--checkbox-background-color': 'var(--local-background-active)',
|
|
94
|
-
'--checkbox-border-color': 'var(--local-border-active)',
|
|
95
|
-
'--checkbox-tick-color': 'var(--local-tick-active)'
|
|
96
|
-
},
|
|
97
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
98
|
-
'&:disabled + svg, &:disabled:hover + svg, &:disabled:focus + svg, &:disabled:active + svg, &:disabled[data-invalid] + svg': {
|
|
99
|
-
'--checkbox-background-color': 'var(--local-background-disabled)',
|
|
100
|
-
'--checkbox-border-color': 'var(--local-border-disabled)',
|
|
101
|
-
cursor: 'not-allowed',
|
|
102
|
-
pointerEvents: 'none'
|
|
103
|
-
},
|
|
104
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
105
|
-
'&:disabled:checked + svg': {
|
|
106
|
-
'--checkbox-tick-color': 'var(--local-tick-disabled)'
|
|
107
|
-
},
|
|
108
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-19551
|
|
109
|
-
'&:indeterminate + svg': {
|
|
110
|
-
'--checkbox-background-color': 'var(--local-background-checked)',
|
|
111
|
-
'--checkbox-border-color': 'var(--local-border-checked)',
|
|
112
|
-
'--checkbox-tick-color': 'var(--local-tick-checked)'
|
|
113
|
-
},
|
|
114
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-19551
|
|
115
|
-
'&:disabled:indeterminate + svg': {
|
|
116
|
-
'--checkbox-background-color': 'var(--local-background-disabled)',
|
|
117
|
-
'--checkbox-border-color': 'var(--local-border-disabled)',
|
|
118
|
-
'--checkbox-tick-color': 'var(--local-tick-disabled)'
|
|
119
|
-
},
|
|
120
|
-
'@media screen and (forced-colors: active)': {
|
|
121
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
122
|
-
'& + svg': {
|
|
123
|
-
'--checkbox-background-color': 'Canvas',
|
|
124
|
-
'--checkbox-border-color': 'CanvasText',
|
|
125
|
-
'--checkbox-tick-color': 'CanvasText'
|
|
126
|
-
},
|
|
127
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
128
|
-
'&:checked + svg, &:checked:hover + svg': {
|
|
129
|
-
'--checkbox-background-color': 'Canvas',
|
|
130
|
-
'--checkbox-border-color': 'CanvasText',
|
|
131
|
-
'--checkbox-tick-color': 'CanvasText'
|
|
132
|
-
},
|
|
133
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
134
|
-
'&:focus + svg rect:first-of-type': {
|
|
135
|
-
stroke: 'Highlight'
|
|
136
|
-
},
|
|
137
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
138
|
-
'&[data-invalid] + svg': {
|
|
139
|
-
'--checkbox-border-color': 'Highlight'
|
|
140
|
-
},
|
|
141
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
142
|
-
'&:checked[data-invalid] + svg': {
|
|
143
|
-
'--checkbox-border-color': 'Highlight'
|
|
144
|
-
},
|
|
145
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
146
|
-
'&:disabled + svg, &:disabled:hover + svg, &:disabled:focus + svg, &:disabled:active + svg, &:disabled[data-invalid] + svg': {
|
|
147
|
-
'--checkbox-background-color': 'Canvas',
|
|
148
|
-
'--checkbox-border-color': 'GrayText',
|
|
149
|
-
'--checkbox-tick-color': 'GrayText'
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
/* eslint-enable @atlaskit/design-system/no-nested-styles */
|
|
21
|
+
var _excluded = ["isChecked", "isDisabled", "isInvalid", "defaultChecked", "isIndeterminate", "onChange", "analyticsContext", "label", "name", "value", "isRequired", "testId", "xcss", "className"];
|
|
22
|
+
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); }
|
|
23
|
+
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; }
|
|
24
|
+
var checkboxStyles = null;
|
|
154
25
|
|
|
155
26
|
/**
|
|
156
27
|
* __Checkbox__
|
|
@@ -179,6 +50,7 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
|
|
|
179
50
|
isRequired = props.isRequired,
|
|
180
51
|
testId = props.testId,
|
|
181
52
|
xcss = props.xcss,
|
|
53
|
+
className = props.className,
|
|
182
54
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
183
55
|
var _useState = (0, _react.useState)(isCheckedProp !== undefined ? isCheckedProp : defaultChecked),
|
|
184
56
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -196,7 +68,7 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
|
|
|
196
68
|
analyticsData: analyticsContext,
|
|
197
69
|
componentName: 'checkbox',
|
|
198
70
|
packageName: "@atlaskit/checkbox",
|
|
199
|
-
packageVersion: "
|
|
71
|
+
packageVersion: "17.0.0"
|
|
200
72
|
});
|
|
201
73
|
var internalRef = (0, _react.useRef)(null);
|
|
202
74
|
var mergedRefs = (0, _mergeRefs.default)([internalRef, ref]);
|
|
@@ -208,7 +80,7 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
|
|
|
208
80
|
internalRef.current.indeterminate = isIndeterminate;
|
|
209
81
|
}
|
|
210
82
|
}, [isIndeterminate]);
|
|
211
|
-
return
|
|
83
|
+
return /*#__PURE__*/React.createElement(_internal.Label, {
|
|
212
84
|
isDisabled: isDisabled,
|
|
213
85
|
label: label,
|
|
214
86
|
id: rest.id ? "".concat(rest.id, "-label") : undefined,
|
|
@@ -218,7 +90,7 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
|
|
|
218
90
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
219
91
|
,
|
|
220
92
|
xcss: xcss
|
|
221
|
-
},
|
|
93
|
+
}, /*#__PURE__*/React.createElement("input", (0, _extends2.default)({
|
|
222
94
|
// It is necessary only for Safari. It allows to render focus styles.
|
|
223
95
|
tabIndex: 0
|
|
224
96
|
}, rest, {
|
|
@@ -229,15 +101,19 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
|
|
|
229
101
|
value: value,
|
|
230
102
|
name: name,
|
|
231
103
|
required: isRequired,
|
|
232
|
-
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
105
|
+
className: (0, _runtime.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 _smzgo41a _1dk7o41a _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]),
|
|
233
106
|
onChange: onChangeAnalytics,
|
|
234
107
|
"aria-invalid": isInvalid ? 'true' : undefined,
|
|
235
108
|
"data-testid": testId && "".concat(testId, "--hidden-checkbox"),
|
|
236
|
-
"data-invalid": isInvalid ? 'true' : undefined
|
|
237
|
-
|
|
109
|
+
"data-invalid": isInvalid ? 'true' : undefined,
|
|
110
|
+
style: {
|
|
111
|
+
"--_gqccd2": (0, _runtime.ix)("var(--ds-border-width-outline, 2px)".concat(" solid ", "var(--ds-border-focused, ".concat(_colors.B200, ")")))
|
|
112
|
+
}
|
|
113
|
+
})), /*#__PURE__*/React.createElement(_internal.CheckboxIcon, {
|
|
238
114
|
isIndeterminate: isIndeterminate,
|
|
239
115
|
isChecked: isChecked
|
|
240
|
-
}), label &&
|
|
116
|
+
}), label && /*#__PURE__*/React.createElement(_internal.LabelText, null, label, isRequired && /*#__PURE__*/React.createElement(_internal.RequiredIndicator, null)));
|
|
241
117
|
}));
|
|
242
118
|
Checkbox.displayName = 'Checkbox';
|
|
243
119
|
var _default = exports.default = Checkbox;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
+
/* checkbox-icon.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var React = _react;
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
10
13
|
var _svg = _interopRequireDefault(require("@atlaskit/icon/svg"));
|
|
11
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* @jsx jsx
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
|
-
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
19
17
|
function getIcon(isIndeterminate, isChecked) {
|
|
20
18
|
if (isIndeterminate) {
|
|
21
19
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
22
20
|
if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration')) {
|
|
23
|
-
return
|
|
21
|
+
return /*#__PURE__*/React.createElement("path", {
|
|
24
22
|
fillRule: "evenodd",
|
|
25
23
|
clipRule: "evenodd",
|
|
26
24
|
d: "M7.75 12.75H16.25V11.25H7.75V12.75Z",
|
|
27
25
|
fill: "inherit"
|
|
28
26
|
});
|
|
29
27
|
} else {
|
|
30
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement("rect", {
|
|
31
29
|
fill: "inherit",
|
|
32
30
|
x: "8",
|
|
33
31
|
y: "11",
|
|
@@ -40,14 +38,14 @@ function getIcon(isIndeterminate, isChecked) {
|
|
|
40
38
|
if (isChecked) {
|
|
41
39
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
42
40
|
if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration')) {
|
|
43
|
-
return
|
|
41
|
+
return /*#__PURE__*/React.createElement("path", {
|
|
44
42
|
fillRule: "evenodd",
|
|
45
43
|
clipRule: "evenodd",
|
|
46
44
|
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",
|
|
47
45
|
fill: "inherit"
|
|
48
46
|
});
|
|
49
47
|
} else {
|
|
50
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement("path", {
|
|
51
49
|
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",
|
|
52
50
|
fill: "inherit"
|
|
53
51
|
});
|
|
@@ -72,22 +70,22 @@ var CheckboxIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
72
70
|
var icon = (0, _react.useMemo)(function () {
|
|
73
71
|
return getIcon(isIndeterminate, isChecked);
|
|
74
72
|
}, [isIndeterminate, isChecked]);
|
|
75
|
-
return
|
|
73
|
+
return /*#__PURE__*/React.createElement(_svg.default, {
|
|
76
74
|
label: "",
|
|
77
75
|
primaryColor: "var(--checkbox-background-color)",
|
|
78
76
|
secondaryColor: "var(--checkbox-tick-color)"
|
|
79
|
-
},
|
|
77
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
80
78
|
fillRule: "evenodd"
|
|
81
79
|
},
|
|
82
80
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
83
|
-
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration') ?
|
|
81
|
+
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration') ? /*#__PURE__*/React.createElement("rect", {
|
|
84
82
|
fill: "currentColor",
|
|
85
83
|
x: "5.5",
|
|
86
84
|
y: "5.5",
|
|
87
85
|
width: "13",
|
|
88
86
|
height: "13",
|
|
89
87
|
rx: "1.5"
|
|
90
|
-
}) :
|
|
88
|
+
}) : /*#__PURE__*/React.createElement("rect", {
|
|
91
89
|
fill: "currentColor",
|
|
92
90
|
x: "6",
|
|
93
91
|
y: "6",
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
+
/* label-text.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 = LabelText;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var labelTextStyles = (0, _react.css)({
|
|
15
|
-
alignSelf: 'center',
|
|
16
|
-
gridArea: '1 / 2 / 2 / 3'
|
|
17
|
-
});
|
|
9
|
+
require("./label-text.compiled.css");
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
var labelTextStyles = null;
|
|
18
15
|
function LabelText(_ref) {
|
|
19
16
|
var children = _ref.children;
|
|
20
|
-
return
|
|
21
|
-
|
|
17
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
18
|
+
className: (0, _runtime.ax)(["_nd5l11ig _1wpz1h6o"])
|
|
22
19
|
}, children);
|
|
23
20
|
}
|
|
@@ -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
|
+
._zulp1te3{gap:var(--_1l71759)}
|
|
3
|
+
._13hr1j28{--local-tick-rest:transparent}
|
|
4
|
+
._18q0snw8{--local-tick-disabled:var(--_1xmcmw9)}
|
|
5
|
+
._1dik1ehr{--local-border-checked-hover:var(--_14y1fod)}
|
|
6
|
+
._1e0c11p5{display:grid}
|
|
7
|
+
._1ejihkll{grid-auto-columns:1fr}
|
|
8
|
+
._1esz1j4g{--local-background-checked:var(--_1gcp7nr)}
|
|
9
|
+
._1g1fe69j{--local-border-active:var(--_rczcge)}
|
|
10
|
+
._1j3h1380{--local-border-invalid:var(--_1i4xulb)}
|
|
11
|
+
._1nzs1kc0{--local-background-active:var(--_1cd0fcx)}
|
|
12
|
+
._1rdaeh7q{--local-tick-checked:var(--_jf353p)}
|
|
13
|
+
._1sfg1380{--local-border-checked-invalid:var(--_1i4xulb)}
|
|
14
|
+
._1yjc3zdg{--local-border-focus:var(--_xjqa3d)}
|
|
15
|
+
._80om13gf{cursor:not-allowed}
|
|
16
|
+
._80om73ad{cursor:default}
|
|
17
|
+
._ay2w1ouc{--local-background-disabled:var(--_r5pknd)}
|
|
18
|
+
._d51u12ci{--local-background-hover:var(--_1z08gfx)}
|
|
19
|
+
._eawbxz7c{--local-tick-active:var(--_uq1ko9)}
|
|
20
|
+
._fpdj1ouc{--local-border-disabled:var(--_r5pknd)}
|
|
21
|
+
._h5e31kd8{--local-background:var(--_4mkb4g)}
|
|
22
|
+
._l6wk1j4g{--local-border-checked:var(--_1gcp7nr)}
|
|
23
|
+
._oaj1ddza{--local-border-hover:var(--_vnm8xo)}
|
|
24
|
+
._phftddza{--local-border:var(--_vnm8xo)}
|
|
25
|
+
._syaz7wap{color:var(--_1ynhf1h)}
|
|
26
|
+
._syazovqm{color:var(--_5xk3r4)}
|
|
27
|
+
._umai184x{grid-auto-rows:min-content}
|
|
28
|
+
._yp0j1ehr{--local-background-checked-hover:var(--_14y1fod)}
|
|
29
|
+
._yv0ey09t{grid-template-columns:min-content auto}
|
|
@@ -1,63 +1,21 @@
|
|
|
1
|
+
/* label.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 = Label;
|
|
7
|
-
|
|
9
|
+
require("./label.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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var baseStyles = (0, _react.css)({
|
|
16
|
-
display: 'grid',
|
|
17
|
-
gridAutoColumns: '1fr',
|
|
18
|
-
gridAutoRows: 'min-content',
|
|
19
|
-
color: "var(--ds-text, ".concat(_colors.N900, ")"),
|
|
20
|
-
cursor: 'default',
|
|
21
|
-
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
22
|
-
});
|
|
23
|
-
var textLabelLayoutStyles = (0, _react.css)({
|
|
24
|
-
gap: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)"),
|
|
25
|
-
gridTemplateColumns: 'min-content auto'
|
|
26
|
-
});
|
|
27
|
-
var disabledStyles = (0, _react.css)({
|
|
28
|
-
color: "var(--ds-text-disabled, ".concat(_colors.N80, ")"),
|
|
29
|
-
cursor: 'not-allowed'
|
|
30
|
-
});
|
|
31
|
-
var labelStyles = (0, _react.css)({
|
|
32
|
-
/**
|
|
33
|
-
* Background
|
|
34
|
-
*/
|
|
35
|
-
'--local-background': "var(--ds-background-input, ".concat(_colors.N10, ")"),
|
|
36
|
-
'--local-background-active': "var(--ds-background-input-pressed, ".concat(_colors.B50, ")"),
|
|
37
|
-
'--local-background-checked': "var(--ds-background-selected-bold, ".concat(_colors.B400, ")"),
|
|
38
|
-
'--local-background-checked-hover': "var(--ds-background-selected-bold-hovered, ".concat(_colors.B300, ")"),
|
|
39
|
-
'--local-background-disabled': "var(--ds-background-disabled, ".concat(_colors.N20, ")"),
|
|
40
|
-
'--local-background-hover': "var(--ds-background-input-hovered, ".concat(_colors.N30, ")"),
|
|
41
|
-
/**
|
|
42
|
-
* Border
|
|
43
|
-
*/
|
|
44
|
-
'--local-border': "var(--ds-border-input, ".concat(_colors.N100, ")"),
|
|
45
|
-
'--local-border-active': "var(--ds-border, ".concat(_colors.B50, ")"),
|
|
46
|
-
'--local-border-checked': "var(--ds-background-selected-bold, ".concat(_colors.B400, ")"),
|
|
47
|
-
'--local-border-checked-hover': "var(--ds-background-selected-bold-hovered, ".concat(_colors.B300, ")"),
|
|
48
|
-
'--local-border-checked-invalid': "var(--ds-border-danger, ".concat(_colors.R300, ")"),
|
|
49
|
-
'--local-border-disabled': "var(--ds-background-disabled, ".concat(_colors.N20, ")"),
|
|
50
|
-
'--local-border-focus': "var(--ds-border-focused, ".concat(_colors.B200, ")"),
|
|
51
|
-
'--local-border-hover': "var(--ds-border-input, ".concat(_colors.N100, ")"),
|
|
52
|
-
'--local-border-invalid': "var(--ds-border-danger, ".concat(_colors.R300, ")"),
|
|
53
|
-
/**
|
|
54
|
-
* Tick
|
|
55
|
-
*/
|
|
56
|
-
'--local-tick-active': "var(--ds-icon-inverse, ".concat(_colors.B400, ")"),
|
|
57
|
-
'--local-tick-checked': "var(--ds-icon-inverse, ".concat(_colors.N10, ")"),
|
|
58
|
-
'--local-tick-disabled': "var(--ds-icon-disabled, ".concat(_colors.N70, ")"),
|
|
59
|
-
'--local-tick-rest': 'transparent'
|
|
60
|
-
});
|
|
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 baseStyles = null;
|
|
16
|
+
var textLabelLayoutStyles = null;
|
|
17
|
+
var disabledStyles = null;
|
|
18
|
+
var labelStyles = null;
|
|
61
19
|
function Label(_ref) {
|
|
62
20
|
var children = _ref.children,
|
|
63
21
|
isDisabled = _ref.isDisabled,
|
|
@@ -65,14 +23,28 @@ function Label(_ref) {
|
|
|
65
23
|
label = _ref.label,
|
|
66
24
|
id = _ref.id,
|
|
67
25
|
xcss = _ref.xcss;
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
// When we're fully on Compiled its local jsx namespace accepts the output of xcss prop.
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- This rule still fails because of the TS assertion
|
|
72
|
-
className: xcss,
|
|
73
|
-
css: [baseStyles, label && textLabelLayoutStyles, isDisabled && disabledStyles, labelStyles],
|
|
26
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
27
|
+
className: (0, _runtime.ax)(["_11c81oud _1e0c11p5 _1ejihkll _umai184x _syazovqm _80om73ad", label && "_zulp1te3 _yv0ey09t", isDisabled && "_syaz7wap _80om13gf", "_h5e31kd8 _1nzs1kc0 _1esz1j4g _yp0j1ehr _ay2w1ouc _d51u12ci _phftddza _1g1fe69j _l6wk1j4g _1dik1ehr _1sfg1380 _fpdj1ouc _1yjc3zdg _oaj1ddza _1j3h1380 _eawbxz7c _1rdaeh7q _18q0snw8 _13hr1j28", xcss]),
|
|
74
28
|
"data-testid": testId,
|
|
75
29
|
"data-disabled": isDisabled || undefined,
|
|
76
|
-
id: id
|
|
30
|
+
id: id,
|
|
31
|
+
style: {
|
|
32
|
+
"--_5xk3r4": (0, _runtime.ix)("var(--ds-text, ".concat(_colors.N900, ")")),
|
|
33
|
+
"--_1l71759": (0, _runtime.ix)("var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-050, 4px)")),
|
|
34
|
+
"--_1ynhf1h": (0, _runtime.ix)("var(--ds-text-disabled, ".concat(_colors.N80, ")")),
|
|
35
|
+
"--_4mkb4g": (0, _runtime.ix)("var(--ds-background-input, ".concat(_colors.N10, ")")),
|
|
36
|
+
"--_1cd0fcx": (0, _runtime.ix)("var(--ds-background-input-pressed, ".concat(_colors.B50, ")")),
|
|
37
|
+
"--_1gcp7nr": (0, _runtime.ix)("var(--ds-background-selected-bold, ".concat(_colors.B400, ")")),
|
|
38
|
+
"--_14y1fod": (0, _runtime.ix)("var(--ds-background-selected-bold-hovered, ".concat(_colors.B300, ")")),
|
|
39
|
+
"--_r5pknd": (0, _runtime.ix)("var(--ds-background-disabled, ".concat(_colors.N20, ")")),
|
|
40
|
+
"--_1z08gfx": (0, _runtime.ix)("var(--ds-background-input-hovered, ".concat(_colors.N30, ")")),
|
|
41
|
+
"--_vnm8xo": (0, _runtime.ix)("var(--ds-border-input, ".concat(_colors.N100, ")")),
|
|
42
|
+
"--_rczcge": (0, _runtime.ix)("var(--ds-border, ".concat(_colors.B50, ")")),
|
|
43
|
+
"--_1i4xulb": (0, _runtime.ix)("var(--ds-border-danger, ".concat(_colors.R300, ")")),
|
|
44
|
+
"--_xjqa3d": (0, _runtime.ix)("var(--ds-border-focused, ".concat(_colors.B200, ")")),
|
|
45
|
+
"--_uq1ko9": (0, _runtime.ix)("var(--ds-icon-inverse, ".concat(_colors.B400, ")")),
|
|
46
|
+
"--_jf353p": (0, _runtime.ix)("var(--ds-icon-inverse, ".concat(_colors.N10, ")")),
|
|
47
|
+
"--_1xmcmw9": (0, _runtime.ix)("var(--ds-icon-disabled, ".concat(_colors.N70, ")"))
|
|
48
|
+
}
|
|
77
49
|
}, children);
|
|
78
50
|
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
22
|
-
(0,
|
|
23
|
-
|
|
24
|
-
"
|
|
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
|
}
|