@atlaskit/react-select 3.16.0 → 3.16.2
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/async.js +1 -6
- package/dist/cjs/compiled/components/indicators-container.compiled.css +5 -0
- package/dist/cjs/compiled/components/indicators-container.js +40 -0
- package/dist/cjs/compiled/components/select-container.compiled.css +6 -0
- package/dist/cjs/compiled/components/select-container.js +52 -0
- package/dist/cjs/compiled/components/value-container.compiled.css +20 -0
- package/dist/cjs/compiled/components/{containers.js → value-container.js} +7 -69
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/multi-value.js +13 -2
- package/dist/cjs/creatable.js +1 -6
- package/dist/cjs/entry-points/async.js +4 -4
- package/dist/cjs/entry-points/creatable.js +4 -4
- package/dist/cjs/internal/select-get-styles-context.js +20 -0
- package/dist/cjs/internal/use-select-get-styles.js +18 -0
- package/dist/cjs/select.js +6 -3
- package/dist/cjs/theme.js +1 -7
- package/dist/es2019/async.js +0 -1
- package/dist/es2019/compiled/components/indicators-container.compiled.css +5 -0
- package/dist/es2019/compiled/components/indicators-container.js +35 -0
- package/dist/es2019/compiled/components/select-container.compiled.css +6 -0
- package/dist/es2019/compiled/components/select-container.js +47 -0
- package/dist/es2019/compiled/components/value-container.compiled.css +20 -0
- package/dist/es2019/compiled/components/{containers.js → value-container.js} +2 -70
- package/dist/es2019/components/index.js +1 -0
- package/dist/es2019/components/multi-value.js +13 -2
- package/dist/es2019/creatable.js +1 -1
- package/dist/es2019/entry-points/async.js +1 -1
- package/dist/es2019/entry-points/creatable.js +1 -1
- package/dist/es2019/internal/select-get-styles-context.js +14 -0
- package/dist/es2019/internal/use-select-get-styles.js +10 -0
- package/dist/es2019/select.js +6 -3
- package/dist/es2019/theme.js +0 -7
- package/dist/esm/async.js +0 -1
- package/dist/esm/compiled/components/indicators-container.compiled.css +5 -0
- package/dist/esm/compiled/components/indicators-container.js +32 -0
- package/dist/esm/compiled/components/select-container.compiled.css +6 -0
- package/dist/esm/compiled/components/select-container.js +44 -0
- package/dist/esm/compiled/components/value-container.compiled.css +20 -0
- package/dist/esm/compiled/components/value-container.js +50 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/multi-value.js +13 -2
- package/dist/esm/creatable.js +1 -1
- package/dist/esm/entry-points/async.js +1 -1
- package/dist/esm/entry-points/creatable.js +1 -1
- package/dist/esm/internal/select-get-styles-context.js +14 -0
- package/dist/esm/internal/use-select-get-styles.js +12 -0
- package/dist/esm/select.js +6 -3
- package/dist/esm/theme.js +0 -7
- package/dist/types/async.d.ts +1 -2
- package/dist/types/compiled/components/indicators-container.d.ts +18 -0
- package/dist/types/compiled/components/select-container.d.ts +22 -0
- package/dist/types/compiled/components/value-container.d.ts +22 -0
- package/dist/types/creatable.d.ts +1 -2
- package/dist/types/entry-points/async.d.ts +1 -1
- package/dist/types/entry-points/creatable.d.ts +1 -1
- package/dist/types/internal/select-get-styles-context.d.ts +12 -0
- package/dist/types/internal/use-select-get-styles.d.ts +1 -0
- package/dist/types/theme.d.ts +0 -2
- package/dist/types-ts4.5/async.d.ts +1 -2
- package/dist/types-ts4.5/compiled/components/indicators-container.d.ts +18 -0
- package/dist/types-ts4.5/compiled/components/select-container.d.ts +22 -0
- package/dist/types-ts4.5/compiled/components/value-container.d.ts +22 -0
- package/dist/types-ts4.5/creatable.d.ts +1 -2
- package/dist/types-ts4.5/entry-points/async.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/creatable.d.ts +1 -1
- package/dist/types-ts4.5/internal/select-get-styles-context.d.ts +12 -0
- package/dist/types-ts4.5/internal/use-select-get-styles.d.ts +1 -0
- package/dist/types-ts4.5/theme.d.ts +0 -2
- package/package.json +7 -5
- package/dist/cjs/compiled/components/containers.compiled.css +0 -28
- package/dist/es2019/compiled/components/containers.compiled.css +0 -28
- package/dist/esm/compiled/components/containers.compiled.css +0 -28
- package/dist/esm/compiled/components/containers.js +0 -112
- package/dist/types/compiled/components/containers.d.ts +0 -50
- package/dist/types-ts4.5/compiled/components/containers.d.ts +0 -50
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/react-select
|
|
2
2
|
|
|
3
|
+
## 3.16.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6622a9a9710ad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6622a9a9710ad) -
|
|
8
|
+
[ux] Fix for select not detecting a case of custom styling and overwriting styles behind a ff.
|
|
9
|
+
|
|
10
|
+
## 3.16.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 3.16.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/cjs/async.js
CHANGED
|
@@ -6,12 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
Object.defineProperty(exports, "useAsync", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function get() {
|
|
12
|
-
return _useAsync.default;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
11
|
var _select = _interopRequireDefault(require("./select"));
|
|
@@ -29,5 +23,6 @@ var AsyncSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
29
23
|
ref: ref
|
|
30
24
|
}, selectProps));
|
|
31
25
|
});
|
|
26
|
+
|
|
32
27
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
33
28
|
var _default = exports.default = AsyncSelect;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* indicators-container.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.IndicatorsContainer = void 0;
|
|
10
|
+
require("./indicators-container.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
+
var _react2 = require("@compiled/react");
|
|
15
|
+
var _getStyleProps2 = require("../../get-style-props");
|
|
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
|
+
// ==============================
|
|
18
|
+
// Indicator Container
|
|
19
|
+
// ==============================
|
|
20
|
+
|
|
21
|
+
var indicatorContainerStyles = null;
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
24
|
+
var IndicatorsContainer = exports.IndicatorsContainer = function IndicatorsContainer(props) {
|
|
25
|
+
var children = props.children,
|
|
26
|
+
innerProps = props.innerProps,
|
|
27
|
+
xcss = props.xcss;
|
|
28
|
+
var _getStyleProps = (0, _getStyleProps2.getStyleProps)(props, 'indicatorsContainer', {
|
|
29
|
+
indicators: true
|
|
30
|
+
}),
|
|
31
|
+
css = _getStyleProps.css,
|
|
32
|
+
className = _getStyleProps.className;
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
35
|
+
style: css
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
37
|
+
,
|
|
38
|
+
className: (0, _runtime.ax)(["_1e0c1txw _4cvr1h6o _1o9zidpf _1wpz1fhb _y4ti1b66", (0, _react2.cx)(className, xcss, '-IndicatorsContainer')])
|
|
39
|
+
}, innerProps), children);
|
|
40
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._1eim1xrj{direction:rtl}
|
|
3
|
+
._80om13gf{cursor:not-allowed}
|
|
4
|
+
._kqswh2mm{position:relative}
|
|
5
|
+
._lcxv1rj4{pointer-events:all}
|
|
6
|
+
@media (min-width:30rem){._1tn2fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* select-container.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.SelectContainer = void 0;
|
|
10
|
+
require("./select-container.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
+
var _react2 = require("@compiled/react");
|
|
15
|
+
var _getStyleProps2 = require("../../get-style-props");
|
|
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
|
+
// ==============================
|
|
18
|
+
// Root Container
|
|
19
|
+
// ==============================
|
|
20
|
+
|
|
21
|
+
// iOS Safari automatically zooms into form inputs on focus when the font size is less than 16px.
|
|
22
|
+
// To prevent this zoom behaviour on mobile devices, the select container uses font.body.large (16px) by default,
|
|
23
|
+
// then switches to the smaller font.body on screens wider than 30rem (desktop).
|
|
24
|
+
// @see: https://medium.com/@rares.popescu/2-ways-to-avoid-the-automatic-zoom-in-on-input-fields-8a71479e542e
|
|
25
|
+
|
|
26
|
+
var containerStyles = {
|
|
27
|
+
default: "_11c81d4k _kqswh2mm _lcxv1rj4 _1tn2fhey",
|
|
28
|
+
rtl: "_1eim1xrj",
|
|
29
|
+
disabled: "_80om13gf"
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
33
|
+
var SelectContainer = exports.SelectContainer = function SelectContainer(props) {
|
|
34
|
+
var children = props.children,
|
|
35
|
+
innerProps = props.innerProps,
|
|
36
|
+
isDisabled = props.isDisabled,
|
|
37
|
+
isRtl = props.isRtl,
|
|
38
|
+
xcss = props.xcss;
|
|
39
|
+
var _getStyleProps = (0, _getStyleProps2.getStyleProps)(props, 'container', {
|
|
40
|
+
'--is-disabled': isDisabled,
|
|
41
|
+
'--is-rtl': isRtl
|
|
42
|
+
}),
|
|
43
|
+
className = _getStyleProps.className,
|
|
44
|
+
css = _getStyleProps.css;
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
47
|
+
className: (0, _runtime.ax)([containerStyles.default, isRtl && containerStyles.rtl, isDisabled && containerStyles.disabled, (0, _react2.cx)(className, xcss, '-container')])
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
49
|
+
,
|
|
50
|
+
style: css
|
|
51
|
+
}, innerProps), children);
|
|
52
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}._16jlkb7n{flex-grow:1}
|
|
3
|
+
._18m915vq{overflow-y:hidden}
|
|
4
|
+
._1e0c11p5{display:grid}
|
|
5
|
+
._1e0c1txw{display:flex}
|
|
6
|
+
._1n261g80{flex-wrap:wrap}
|
|
7
|
+
._1o9zkb7n{flex-shrink:1}
|
|
8
|
+
._1q511b66{padding-block-start:var(--ds-space-050,4px)}
|
|
9
|
+
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
10
|
+
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
11
|
+
._1reo15vq{overflow-x:hidden}
|
|
12
|
+
._4cvr1h6o{align-items:center}
|
|
13
|
+
._85i51b66{padding-block-end:var(--ds-space-050,4px)}
|
|
14
|
+
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
15
|
+
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
16
|
+
._8am5i4x0{-webkit-overflow-scrolling:touch}
|
|
17
|
+
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
18
|
+
._i0dlf1ug{flex-basis:0%}
|
|
19
|
+
._kqswh2mm{position:relative}
|
|
20
|
+
._y4ti12x7{padding-inline-end:var(--ds-space-075,6px)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* value-container.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,52 +6,15 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.ValueContainer =
|
|
10
|
-
require("./
|
|
9
|
+
exports.ValueContainer = void 0;
|
|
10
|
+
require("./value-container.compiled.css");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
14
|
var _react2 = require("@compiled/react");
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
-
var
|
|
16
|
+
var _getStyleProps2 = require("../../get-style-props");
|
|
17
17
|
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); }
|
|
18
|
-
// ==============================
|
|
19
|
-
// Root Container
|
|
20
|
-
// ==============================
|
|
21
|
-
|
|
22
|
-
// iOS Safari automatically zooms into form inputs on focus when the font size is less than 16px.
|
|
23
|
-
// To prevent this zoom behaviour on mobile devices, the select container uses font.body.large (16px) by default,
|
|
24
|
-
// then switches to the smaller font.body on screens wider than 30rem (desktop).
|
|
25
|
-
// @see: https://medium.com/@rares.popescu/2-ways-to-avoid-the-automatic-zoom-in-on-input-fields-8a71479e542e
|
|
26
|
-
|
|
27
|
-
var containerStyles = {
|
|
28
|
-
default: "_11c81d4k _kqswh2mm _lcxv1rj4 _1tn2fhey",
|
|
29
|
-
rtl: "_1eim1xrj",
|
|
30
|
-
disabled: "_80om13gf"
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
34
|
-
var SelectContainer = exports.SelectContainer = function SelectContainer(props) {
|
|
35
|
-
var children = props.children,
|
|
36
|
-
innerProps = props.innerProps,
|
|
37
|
-
isDisabled = props.isDisabled,
|
|
38
|
-
isRtl = props.isRtl,
|
|
39
|
-
xcss = props.xcss;
|
|
40
|
-
var _getStyleProps = (0, _getStyleProps4.getStyleProps)(props, 'container', {
|
|
41
|
-
'--is-disabled': isDisabled,
|
|
42
|
-
'--is-rtl': isRtl
|
|
43
|
-
}),
|
|
44
|
-
className = _getStyleProps.className,
|
|
45
|
-
css = _getStyleProps.css;
|
|
46
|
-
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
48
|
-
className: (0, _runtime.ax)([containerStyles.default, isRtl && containerStyles.rtl, isDisabled && containerStyles.disabled, (0, _react2.cx)(className, xcss, '-container')])
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
50
|
-
,
|
|
51
|
-
style: css
|
|
52
|
-
}, innerProps), children);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
18
|
// ==============================
|
|
56
19
|
// Value Container
|
|
57
20
|
// ==============================
|
|
@@ -75,13 +38,13 @@ var ValueContainer = exports.ValueContainer = function ValueContainer(props) {
|
|
|
75
38
|
isCompact = props.isCompact,
|
|
76
39
|
xcss = props.xcss,
|
|
77
40
|
controlShouldRenderValue = props.selectProps.controlShouldRenderValue;
|
|
78
|
-
var
|
|
41
|
+
var _getStyleProps = (0, _getStyleProps2.getStyleProps)(props, 'valueContainer', {
|
|
79
42
|
'value-container': true,
|
|
80
43
|
'value-container--is-multi': isMulti,
|
|
81
44
|
'value-container--has-value': hasValue
|
|
82
45
|
}),
|
|
83
|
-
css =
|
|
84
|
-
className =
|
|
46
|
+
css = _getStyleProps.css,
|
|
47
|
+
className = _getStyleProps.className;
|
|
85
48
|
var ffTagUplifts = (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts');
|
|
86
49
|
var tagUpliftMultiVertical = ffTagUplifts && isMulti;
|
|
87
50
|
var tagUpliftChipRow = ffTagUplifts && isMulti && hasValue && controlShouldRenderValue;
|
|
@@ -92,29 +55,4 @@ var ValueContainer = exports.ValueContainer = function ValueContainer(props) {
|
|
|
92
55
|
,
|
|
93
56
|
style: css
|
|
94
57
|
}, innerProps), children);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
// ==============================
|
|
98
|
-
// Indicator Container
|
|
99
|
-
// ==============================
|
|
100
|
-
|
|
101
|
-
var indicatorContainerStyles = null;
|
|
102
|
-
|
|
103
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
104
|
-
var IndicatorsContainer = exports.IndicatorsContainer = function IndicatorsContainer(props) {
|
|
105
|
-
var children = props.children,
|
|
106
|
-
innerProps = props.innerProps,
|
|
107
|
-
xcss = props.xcss;
|
|
108
|
-
var _getStyleProps3 = (0, _getStyleProps4.getStyleProps)(props, 'indicatorsContainer', {
|
|
109
|
-
indicators: true
|
|
110
|
-
}),
|
|
111
|
-
css = _getStyleProps3.css,
|
|
112
|
-
className = _getStyleProps3.className;
|
|
113
|
-
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
114
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
115
|
-
style: css
|
|
116
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
117
|
-
,
|
|
118
|
-
className: (0, _runtime.ax)(["_1e0c1txw _4cvr1h6o _1o9zidpf _1wpz1fhb _y4ti1b66", (0, _react2.cx)(className, xcss, '-IndicatorsContainer')])
|
|
119
|
-
}, innerProps), children);
|
|
120
58
|
};
|
|
@@ -56,6 +56,7 @@ var components = exports.components = {
|
|
|
56
56
|
SingleValue: _singleValue.default,
|
|
57
57
|
ValueContainer: _valueContainer.ValueContainer
|
|
58
58
|
};
|
|
59
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
59
60
|
var defaultComponents = exports.defaultComponents = function defaultComponents(props) {
|
|
60
61
|
return _objectSpread(_objectSpread({}, components), props.components);
|
|
61
62
|
};
|
|
@@ -16,6 +16,7 @@ var _react2 = require("@compiled/react");
|
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _tag = _interopRequireDefault(require("@atlaskit/tag"));
|
|
18
18
|
var _getStyleProps4 = require("../get-style-props");
|
|
19
|
+
var _useSelectGetStyles = require("../internal/use-select-get-styles");
|
|
19
20
|
var _multiValueLabel = require("./multi-value-label");
|
|
20
21
|
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); }
|
|
21
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -91,8 +92,18 @@ var MultiValue = function MultiValue(props) {
|
|
|
91
92
|
removeCss = _getStyleProps3.css,
|
|
92
93
|
removeClassName = _getStyleProps3.className;
|
|
93
94
|
var hasCustomLabel = Label !== _multiValueLabel.MultiValueLabel;
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
var selectStyles = selectProps.styles;
|
|
96
|
+
var hasCustomMultiValueStyles = Boolean((selectStyles === null || selectStyles === void 0 ? void 0 : selectStyles.multiValue) || (selectStyles === null || selectStyles === void 0 ? void 0 : selectStyles.multiValueLabel) || (selectStyles === null || selectStyles === void 0 ? void 0 : selectStyles.multiValueRemove));
|
|
97
|
+
var selectClassNames = selectProps.classNames;
|
|
98
|
+
var hasCustomMultiValueClassNames = Boolean((selectClassNames === null || selectClassNames === void 0 ? void 0 : selectClassNames.multiValue) || (selectClassNames === null || selectClassNames === void 0 ? void 0 : selectClassNames.multiValueLabel) || (selectClassNames === null || selectClassNames === void 0 ? void 0 : selectClassNames.multiValueRemove));
|
|
99
|
+
// Detect if getStyles was overridden directly on this component instance (e.g. via the
|
|
100
|
+
// components prop wrapper passing a custom getStyles). The context holds the original
|
|
101
|
+
// Select instance's getStyles — a reference inequality means a custom override was passed.
|
|
102
|
+
// When context is absent (e.g. in mocked/test contexts), assume no override.
|
|
103
|
+
var selectGetStyles = (0, _useSelectGetStyles.useSelectGetStyles)();
|
|
104
|
+
var hasOverriddenGetStyles = selectGetStyles !== undefined && props.getStyles !== selectGetStyles;
|
|
105
|
+
var hasCustomContainerStyles = hasCustomMultiValueStyles || hasCustomMultiValueClassNames || hasOverriddenGetStyles;
|
|
106
|
+
if (ffTagUplifts && isPlainLabel && !hasCustomLabel && !hasCustomContainerStyles) {
|
|
96
107
|
var _ref = data !== null && data !== void 0 ? data : {},
|
|
97
108
|
elemBefore = _ref.elemBefore,
|
|
98
109
|
tagColor = _ref.color;
|
package/dist/cjs/creatable.js
CHANGED
|
@@ -6,12 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
Object.defineProperty(exports, "useCreatable", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function get() {
|
|
12
|
-
return _useCreatable.default;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
11
|
var _select = _interopRequireDefault(require("./select"));
|
|
@@ -25,5 +19,6 @@ var CreatableSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
25
19
|
ref: ref
|
|
26
20
|
}, selectProps));
|
|
27
21
|
});
|
|
22
|
+
|
|
28
23
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
29
24
|
var _default = exports.default = CreatableSelect;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -13,8 +13,8 @@ Object.defineProperty(exports, "default", {
|
|
|
13
13
|
Object.defineProperty(exports, "useAsync", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function get() {
|
|
16
|
-
return
|
|
16
|
+
return _useAsync.default;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
|
|
19
|
+
var _useAsync = _interopRequireDefault(require("../use-async"));
|
|
20
|
+
var _async = _interopRequireDefault(require("../async"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -13,8 +13,8 @@ Object.defineProperty(exports, "default", {
|
|
|
13
13
|
Object.defineProperty(exports, "useCreatable", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function get() {
|
|
16
|
-
return
|
|
16
|
+
return _useCreatable.default;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
|
|
19
|
+
var _useCreatable = _interopRequireDefault(require("../use-creatable"));
|
|
20
|
+
var _creatable = _interopRequireDefault(require("../creatable"));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SelectGetStylesContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
/**
|
|
9
|
+
* Internal context used to pass the original Select instance's getStyles function
|
|
10
|
+
* down to components like MultiValue, without polluting the public CommonProps API.
|
|
11
|
+
*
|
|
12
|
+
* This allows MultiValue to detect whether getStyles has been overridden on a
|
|
13
|
+
* component instance (e.g. via a custom component wrapper passing a different
|
|
14
|
+
* getStyles prop), by comparing props.getStyles against the original.
|
|
15
|
+
*
|
|
16
|
+
* @internal — not part of the public API
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
20
|
+
var SelectGetStylesContext = exports.SelectGetStylesContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useSelectGetStyles = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _selectGetStylesContext = require("./select-get-styles-context");
|
|
9
|
+
/**
|
|
10
|
+
* Hook to consume the SelectGetStylesContext.
|
|
11
|
+
*
|
|
12
|
+
* @internal — not part of the public API
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
16
|
+
var useSelectGetStyles = exports.useSelectGetStyles = function useSelectGetStyles() {
|
|
17
|
+
return (0, _react.useContext)(_selectGetStylesContext.SelectGetStylesContext);
|
|
18
|
+
};
|
package/dist/cjs/select.js
CHANGED
|
@@ -38,6 +38,7 @@ var _notifyOpenLayerObserver = require("./internal/notify-open-layer-observer");
|
|
|
38
38
|
var _requiredInput = _interopRequireDefault(require("./internal/required-input"));
|
|
39
39
|
var _scrollManager = _interopRequireDefault(require("./internal/scroll-manager"));
|
|
40
40
|
var _scrollTo = require("./internal/scroll-to");
|
|
41
|
+
var _selectGetStylesContext = require("./internal/select-get-styles-context");
|
|
41
42
|
var _singleValueAsValue = require("./internal/single-value-as-value");
|
|
42
43
|
var _valueTernary = require("./internal/value-ternary");
|
|
43
44
|
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" != _typeof3(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); }
|
|
@@ -312,7 +313,7 @@ var shouldHideSelectedOptions = function shouldHideSelectedOptions(props) {
|
|
|
312
313
|
};
|
|
313
314
|
var instanceId = 1;
|
|
314
315
|
|
|
315
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
316
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, @atlaskit/volt-strict-mode/no-multiple-exports
|
|
316
317
|
var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
317
318
|
// Lifecycle
|
|
318
319
|
// ------------------------------
|
|
@@ -1966,7 +1967,9 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1966
1967
|
var isFocused = this.state.isFocused;
|
|
1967
1968
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
1968
1969
|
var isCompact = spacing === 'compact';
|
|
1969
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
1970
|
+
return /*#__PURE__*/_react.default.createElement(_selectGetStylesContext.SelectGetStylesContext.Provider, {
|
|
1971
|
+
value: this.getStyles
|
|
1972
|
+
}, /*#__PURE__*/_react.default.createElement(SelectContainer, (0, _extends2.default)({}, commonProps, {
|
|
1970
1973
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
1971
1974
|
className: className,
|
|
1972
1975
|
innerProps: _objectSpread({
|
|
@@ -2010,7 +2013,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
2010
2013
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField(), /*#__PURE__*/_react.default.createElement(_notifyOpenLayerObserver.NotifyOpenLayerObserver, {
|
|
2011
2014
|
isOpen: this.props.menuIsOpen,
|
|
2012
2015
|
onClose: this.handleOpenLayerObserverCloseSignal
|
|
2013
|
-
}));
|
|
2016
|
+
})));
|
|
2014
2017
|
}
|
|
2015
2018
|
}], [{
|
|
2016
2019
|
key: "getDerivedStateFromProps",
|
package/dist/cjs/theme.js
CHANGED
|
@@ -9,9 +9,8 @@ Object.defineProperty(exports, "colors", {
|
|
|
9
9
|
return _colors.colors;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
exports.spacing =
|
|
12
|
+
exports.spacing = void 0;
|
|
13
13
|
var _colors = require("./colors");
|
|
14
|
-
var borderRadius = 4;
|
|
15
14
|
// Used to calculate consistent margin/padding on elements
|
|
16
15
|
var baseUnit = 4;
|
|
17
16
|
// The minimum height of the control
|
|
@@ -22,9 +21,4 @@ var spacing = exports.spacing = {
|
|
|
22
21
|
baseUnit: baseUnit,
|
|
23
22
|
controlHeight: controlHeight,
|
|
24
23
|
menuGutter: menuGutter
|
|
25
|
-
};
|
|
26
|
-
var defaultTheme = exports.defaultTheme = {
|
|
27
|
-
borderRadius: borderRadius,
|
|
28
|
-
colors: _colors.colors,
|
|
29
|
-
spacing: spacing
|
|
30
24
|
};
|
package/dist/es2019/async.js
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* indicators-container.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./indicators-container.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import { getStyleProps } from '../../get-style-props';
|
|
8
|
+
|
|
9
|
+
// ==============================
|
|
10
|
+
// Indicator Container
|
|
11
|
+
// ==============================
|
|
12
|
+
|
|
13
|
+
const indicatorContainerStyles = null;
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
16
|
+
export const IndicatorsContainer = props => {
|
|
17
|
+
const {
|
|
18
|
+
children,
|
|
19
|
+
innerProps,
|
|
20
|
+
xcss
|
|
21
|
+
} = props;
|
|
22
|
+
const {
|
|
23
|
+
css,
|
|
24
|
+
className
|
|
25
|
+
} = getStyleProps(props, 'indicatorsContainer', {
|
|
26
|
+
indicators: true
|
|
27
|
+
});
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
30
|
+
style: css
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
32
|
+
,
|
|
33
|
+
className: ax(["_1e0c1txw _4cvr1h6o _1o9zidpf _1wpz1fhb _y4ti1b66", cx(className, xcss, '-IndicatorsContainer')])
|
|
34
|
+
}, innerProps), children);
|
|
35
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._1eim1xrj{direction:rtl}
|
|
3
|
+
._80om13gf{cursor:not-allowed}
|
|
4
|
+
._kqswh2mm{position:relative}
|
|
5
|
+
._lcxv1rj4{pointer-events:all}
|
|
6
|
+
@media (min-width:30rem){._1tn2fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* select-container.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./select-container.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import { getStyleProps } from '../../get-style-props';
|
|
8
|
+
|
|
9
|
+
// ==============================
|
|
10
|
+
// Root Container
|
|
11
|
+
// ==============================
|
|
12
|
+
|
|
13
|
+
// iOS Safari automatically zooms into form inputs on focus when the font size is less than 16px.
|
|
14
|
+
// To prevent this zoom behaviour on mobile devices, the select container uses font.body.large (16px) by default,
|
|
15
|
+
// then switches to the smaller font.body on screens wider than 30rem (desktop).
|
|
16
|
+
// @see: https://medium.com/@rares.popescu/2-ways-to-avoid-the-automatic-zoom-in-on-input-fields-8a71479e542e
|
|
17
|
+
|
|
18
|
+
const containerStyles = {
|
|
19
|
+
default: "_11c81d4k _kqswh2mm _lcxv1rj4 _1tn2fhey",
|
|
20
|
+
rtl: "_1eim1xrj",
|
|
21
|
+
disabled: "_80om13gf"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
25
|
+
export const SelectContainer = props => {
|
|
26
|
+
const {
|
|
27
|
+
children,
|
|
28
|
+
innerProps,
|
|
29
|
+
isDisabled,
|
|
30
|
+
isRtl,
|
|
31
|
+
xcss
|
|
32
|
+
} = props;
|
|
33
|
+
const {
|
|
34
|
+
className,
|
|
35
|
+
css
|
|
36
|
+
} = getStyleProps(props, 'container', {
|
|
37
|
+
'--is-disabled': isDisabled,
|
|
38
|
+
'--is-rtl': isRtl
|
|
39
|
+
});
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
42
|
+
className: ax([containerStyles.default, isRtl && containerStyles.rtl, isDisabled && containerStyles.disabled, cx(className, xcss, '-container')])
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
44
|
+
,
|
|
45
|
+
style: css
|
|
46
|
+
}, innerProps), children);
|
|
47
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}._16jlkb7n{flex-grow:1}
|
|
3
|
+
._18m915vq{overflow-y:hidden}
|
|
4
|
+
._1e0c11p5{display:grid}
|
|
5
|
+
._1e0c1txw{display:flex}
|
|
6
|
+
._1n261g80{flex-wrap:wrap}
|
|
7
|
+
._1o9zkb7n{flex-shrink:1}
|
|
8
|
+
._1q511b66{padding-block-start:var(--ds-space-050,4px)}
|
|
9
|
+
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
10
|
+
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
11
|
+
._1reo15vq{overflow-x:hidden}
|
|
12
|
+
._4cvr1h6o{align-items:center}
|
|
13
|
+
._85i51b66{padding-block-end:var(--ds-space-050,4px)}
|
|
14
|
+
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
15
|
+
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
16
|
+
._8am5i4x0{-webkit-overflow-scrolling:touch}
|
|
17
|
+
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
18
|
+
._i0dlf1ug{flex-basis:0%}
|
|
19
|
+
._kqswh2mm{position:relative}
|
|
20
|
+
._y4ti12x7{padding-inline-end:var(--ds-space-075,6px)}
|