@atlaskit/select
Advanced tools
Comparing version 17.0.2 to 17.0.3
@@ -31,2 +31,4 @@ "use strict"; | ||
var _indicators = require("./indicators"); | ||
/** @jsx jsx */ | ||
var disabledStyles = (0, _react.css)({ | ||
@@ -40,6 +42,6 @@ display: 'none' | ||
var isDisabled = props.selectProps.isDisabled; | ||
return /*#__PURE__*/React.createElement(_reactSelect.components.MultiValueRemove, props, /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)(_reactSelect.components.MultiValueRemove, props, (0, _react.jsx)("div", { | ||
css: isDisabled ? disabledStyles : enabledStyles, | ||
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon' | ||
}, /*#__PURE__*/React.createElement(_selectClear.default, { | ||
}, (0, _react.jsx)(_selectClear.default, { | ||
label: "Clear", | ||
@@ -46,0 +48,0 @@ size: "small", |
@@ -16,3 +16,3 @@ "use strict"; | ||
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; } | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */ | ||
var iconContainerStyles = (0, _react.css)({ | ||
@@ -25,11 +25,11 @@ all: 'unset', | ||
var ClearIndicator = exports.ClearIndicator = function ClearIndicator(props) { | ||
return /*#__PURE__*/React.createElement(_reactSelect.components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, { | ||
return (0, _react.jsx)(_reactSelect.components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, { | ||
innerProps: _objectSpread(_objectSpread({}, props.innerProps), {}, { | ||
'aria-hidden': 'false' | ||
}) | ||
}), /*#__PURE__*/React.createElement("button", { | ||
}), (0, _react.jsx)("button", { | ||
css: iconContainerStyles, | ||
type: "button", | ||
tabIndex: -1 | ||
}, /*#__PURE__*/React.createElement(_selectClear.default, { | ||
}, (0, _react.jsx)(_selectClear.default, { | ||
size: "small", | ||
@@ -40,3 +40,3 @@ label: "clear" | ||
var DropdownIndicator = exports.DropdownIndicator = function DropdownIndicator(props) { | ||
return /*#__PURE__*/React.createElement(_reactSelect.components.DropdownIndicator, props, /*#__PURE__*/React.createElement(_chevronDown.default, { | ||
return (0, _react.jsx)(_reactSelect.components.DropdownIndicator, props, (0, _react.jsx)(_chevronDown.default, { | ||
label: "open" | ||
@@ -48,9 +48,8 @@ })); | ||
return ( | ||
/*#__PURE__*/ | ||
// This *must* be constructed this way because this is being consumed by | ||
// `react-select` and we don't control what it wants. | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
React.createElement("div", (0, _extends2.default)({ | ||
(0, _react.jsx)("div", (0, _extends2.default)({ | ||
css: loadingStyles | ||
}, props.innerProps), /*#__PURE__*/React.createElement(_spinner.default, { | ||
}, props.innerProps), (0, _react.jsx)(_spinner.default, { | ||
size: "small" | ||
@@ -57,0 +56,0 @@ })) |
@@ -28,3 +28,3 @@ "use strict"; | ||
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; } | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */ | ||
var getPrimitiveStyles = function getPrimitiveStyles(props) { | ||
@@ -205,11 +205,10 @@ var cx = props.cx, | ||
return ( | ||
/*#__PURE__*/ | ||
// These need to remain this way because `react-select` passes props with | ||
// styles inside, and that must be done dynamically. | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
React.createElement("div", (0, _extends2.default)({ | ||
(0, _react.jsx)("div", (0, _extends2.default)({ | ||
css: styles, | ||
className: classes, | ||
ref: innerRef | ||
}, props), /*#__PURE__*/React.createElement("div", { | ||
}, props), (0, _react.jsx)("div", { | ||
css: [baseIconStyles, | ||
@@ -231,7 +230,7 @@ // Here we are adding a border to the Checkbox and Radio SVG icons | ||
}] | ||
}, !!Icon ? /*#__PURE__*/React.createElement(Icon, { | ||
}, !!Icon ? (0, _react.jsx)(Icon, { | ||
label: "", | ||
primaryColor: getPrimaryColor(_objectSpread(_objectSpread({}, this.props), this.state)), | ||
secondaryColor: getSecondaryColor(_objectSpread(_objectSpread({}, this.props), this.state)) | ||
}) : null), /*#__PURE__*/React.createElement("div", { | ||
}) : null), (0, _react.jsx)("div", { | ||
css: baseOptionStyles | ||
@@ -245,3 +244,3 @@ }, children)) | ||
var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props) { | ||
return /*#__PURE__*/React.createElement(ControlOption, (0, _extends2.default)({ | ||
return (0, _react.jsx)(ControlOption, (0, _extends2.default)({ | ||
Icon: _checkbox.default | ||
@@ -251,5 +250,5 @@ }, props)); | ||
var RadioOption = exports.RadioOption = function RadioOption(props) { | ||
return /*#__PURE__*/React.createElement(ControlOption, (0, _extends2.default)({ | ||
return (0, _react.jsx)(ControlOption, (0, _extends2.default)({ | ||
Icon: _radio.default | ||
}, props)); | ||
}; |
@@ -12,2 +12,4 @@ "use strict"; | ||
var _Select = _interopRequireDefault(require("./Select")); | ||
/** @jsx jsx */ | ||
// custom option renderer | ||
@@ -26,5 +28,5 @@ var labelStyles = (0, _react.css)({ | ||
icon = _ref.icon; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: labelStyles | ||
}, /*#__PURE__*/React.createElement("span", { | ||
}, (0, _react.jsx)("span", { | ||
css: flagStyles | ||
@@ -49,3 +51,3 @@ }, icon), children); | ||
var controlLabel = function controlLabel(opt) { | ||
return /*#__PURE__*/React.createElement(Opt, { | ||
return (0, _react.jsx)(Opt, { | ||
icon: opt.icon | ||
@@ -60,3 +62,3 @@ }, opt.abbr.toUpperCase()); | ||
name = _ref3.name; | ||
return /*#__PURE__*/React.createElement(Opt, { | ||
return (0, _react.jsx)(Opt, { | ||
icon: icon | ||
@@ -78,3 +80,3 @@ }, getOptionLabel({ | ||
var CountrySelect = function CountrySelect(props) { | ||
return /*#__PURE__*/React.createElement(_Select.default, (0, _extends2.default)({ | ||
return (0, _react.jsx)(_Select.default, (0, _extends2.default)({ | ||
isClearable: false, | ||
@@ -81,0 +83,0 @@ formatOptionLabel: formatOptionLabel, |
@@ -17,2 +17,3 @@ "use strict"; | ||
var _excluded = ["innerRef", "innerProps"]; | ||
/** @jsx jsx */ | ||
// ============================== | ||
@@ -34,3 +35,3 @@ // Styled Components | ||
testId = _ref.testId; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: [menuDialogStyles, | ||
@@ -60,5 +61,5 @@ // There is not a limited amount of values for the widths, so they need | ||
var DropdownIndicator = function DropdownIndicator() { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: dropdownStyles | ||
}, /*#__PURE__*/React.createElement(_search.default, { | ||
}, (0, _react.jsx)(_search.default, { | ||
label: "open" | ||
@@ -74,6 +75,6 @@ })); | ||
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded); | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
ref: innerRef, | ||
css: controlStyles | ||
}, /*#__PURE__*/React.createElement(_reactSelect.components.Control, (0, _extends2.default)({}, props, { | ||
}, (0, _react.jsx)(_reactSelect.components.Control, (0, _extends2.default)({}, props, { | ||
innerProps: innerProps | ||
@@ -83,3 +84,3 @@ }))); | ||
var DummyControl = exports.DummyControl = function DummyControl(props) { | ||
return /*#__PURE__*/React.createElement(_visuallyHidden.default, null, /*#__PURE__*/React.createElement(_reactSelect.components.Control, props)); | ||
return (0, _react.jsx)(_visuallyHidden.default, null, (0, _react.jsx)(_reactSelect.components.Control, props)); | ||
}; | ||
@@ -91,3 +92,3 @@ | ||
innerProps = _ref3.innerProps; | ||
return /*#__PURE__*/React.createElement("div", innerProps, children); | ||
return (0, _react.jsx)("div", innerProps, children); | ||
}; | ||
@@ -94,0 +95,0 @@ var defaultComponents = exports.defaultComponents = { |
@@ -12,3 +12,3 @@ "use strict"; | ||
var packageName = "@atlaskit/select"; | ||
var packageVersion = "17.0.2"; | ||
var packageVersion = "17.0.3"; | ||
var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default); | ||
@@ -15,0 +15,0 @@ var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit'); |
@@ -1,2 +0,3 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { jsx, css } from '@emotion/react'; | ||
import SelectClearIcon from '@atlaskit/icon/glyph/select-clear'; | ||
@@ -15,6 +16,6 @@ import { components } from 'react-select'; | ||
} = props.selectProps; | ||
return /*#__PURE__*/React.createElement(components.MultiValueRemove, props, /*#__PURE__*/React.createElement("div", { | ||
return jsx(components.MultiValueRemove, props, jsx("div", { | ||
css: isDisabled ? disabledStyles : enabledStyles, | ||
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon' | ||
}, /*#__PURE__*/React.createElement(SelectClearIcon, { | ||
}, jsx(SelectClearIcon, { | ||
label: "Clear", | ||
@@ -21,0 +22,0 @@ size: "small", |
import _extends from "@babel/runtime/helpers/extends"; | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { jsx, css } from '@emotion/react'; | ||
import { components } from 'react-select'; | ||
@@ -13,3 +14,3 @@ import Spinner from '@atlaskit/spinner'; | ||
}); | ||
export const ClearIndicator = props => /*#__PURE__*/React.createElement(components.ClearIndicator, _extends({}, props, { | ||
export const ClearIndicator = props => jsx(components.ClearIndicator, _extends({}, props, { | ||
innerProps: { | ||
@@ -19,11 +20,11 @@ ...props.innerProps, | ||
} | ||
}), /*#__PURE__*/React.createElement("button", { | ||
}), jsx("button", { | ||
css: iconContainerStyles, | ||
type: "button", | ||
tabIndex: -1 | ||
}, /*#__PURE__*/React.createElement(SelectClearIcon, { | ||
}, jsx(SelectClearIcon, { | ||
size: "small", | ||
label: "clear" | ||
}))); | ||
export const DropdownIndicator = props => /*#__PURE__*/React.createElement(components.DropdownIndicator, props, /*#__PURE__*/React.createElement(DownIcon, { | ||
export const DropdownIndicator = props => jsx(components.DropdownIndicator, props, jsx(DownIcon, { | ||
label: "open" | ||
@@ -34,9 +35,8 @@ })); | ||
return ( | ||
/*#__PURE__*/ | ||
// This *must* be constructed this way because this is being consumed by | ||
// `react-select` and we don't control what it wants. | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
React.createElement("div", _extends({ | ||
jsx("div", _extends({ | ||
css: loadingStyles | ||
}, props.innerProps), /*#__PURE__*/React.createElement(Spinner, { | ||
}, props.innerProps), jsx(Spinner, { | ||
size: "small" | ||
@@ -43,0 +43,0 @@ })) |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { Component } from 'react'; | ||
@@ -176,11 +177,10 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags'; | ||
return ( | ||
/*#__PURE__*/ | ||
// These need to remain this way because `react-select` passes props with | ||
// styles inside, and that must be done dynamically. | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
React.createElement("div", _extends({ | ||
jsx("div", _extends({ | ||
css: styles, | ||
className: classes, | ||
ref: innerRef | ||
}, props), /*#__PURE__*/React.createElement("div", { | ||
}, props), jsx("div", { | ||
css: [baseIconStyles, | ||
@@ -205,3 +205,3 @@ // Here we are adding a border to the Checkbox and Radio SVG icons | ||
}] | ||
}, !!Icon ? /*#__PURE__*/React.createElement(Icon, { | ||
}, !!Icon ? jsx(Icon, { | ||
label: "", | ||
@@ -216,3 +216,3 @@ primaryColor: getPrimaryColor({ | ||
}) | ||
}) : null), /*#__PURE__*/React.createElement("div", { | ||
}) : null), jsx("div", { | ||
css: baseOptionStyles | ||
@@ -223,7 +223,7 @@ }, children)) | ||
} | ||
export const CheckboxOption = props => /*#__PURE__*/React.createElement(ControlOption, _extends({ | ||
export const CheckboxOption = props => jsx(ControlOption, _extends({ | ||
Icon: CheckboxIcon | ||
}, props)); | ||
export const RadioOption = props => /*#__PURE__*/React.createElement(ControlOption, _extends({ | ||
export const RadioOption = props => jsx(ControlOption, _extends({ | ||
Icon: RadioIcon | ||
}, props)); |
import _extends from "@babel/runtime/helpers/extends"; | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { jsx, css } from '@emotion/react'; | ||
import { groupedCountries } from './data/countries'; | ||
@@ -18,5 +20,5 @@ import Select from './Select'; | ||
icon | ||
}) => /*#__PURE__*/React.createElement("div", { | ||
}) => jsx("div", { | ||
css: labelStyles | ||
}, /*#__PURE__*/React.createElement("span", { | ||
}, jsx("span", { | ||
css: flagStyles | ||
@@ -36,3 +38,3 @@ }, icon), children); | ||
// the text node of the control | ||
const controlLabel = opt => /*#__PURE__*/React.createElement(Opt, { | ||
const controlLabel = opt => jsx(Opt, { | ||
icon: opt.icon | ||
@@ -46,3 +48,3 @@ }, opt.abbr.toUpperCase()); | ||
name | ||
}) => /*#__PURE__*/React.createElement(Opt, { | ||
}) => jsx(Opt, { | ||
icon: icon | ||
@@ -61,3 +63,3 @@ }, getOptionLabel({ | ||
// put it all together | ||
const CountrySelect = props => /*#__PURE__*/React.createElement(Select, _extends({ | ||
const CountrySelect = props => jsx(Select, _extends({ | ||
isClearable: false, | ||
@@ -64,0 +66,0 @@ formatOptionLabel: formatOptionLabel, |
import _extends from "@babel/runtime/helpers/extends"; | ||
/** @jsx jsx */ | ||
import { components } from 'react-select'; | ||
import { css } from '@emotion/react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import VisuallyHidden from '@atlaskit/visually-hidden'; | ||
@@ -25,3 +27,3 @@ import SearchIcon from '@atlaskit/icon/glyph/editor/search'; | ||
testId | ||
}) => /*#__PURE__*/React.createElement("div", { | ||
}) => jsx("div", { | ||
css: [menuDialogStyles, | ||
@@ -49,5 +51,5 @@ // There is not a limited amount of values for the widths, so they need | ||
}); | ||
const DropdownIndicator = () => /*#__PURE__*/React.createElement("div", { | ||
const DropdownIndicator = () => jsx("div", { | ||
css: dropdownStyles | ||
}, /*#__PURE__*/React.createElement(SearchIcon, { | ||
}, jsx(SearchIcon, { | ||
label: "open" | ||
@@ -62,9 +64,9 @@ })); | ||
...props | ||
}) => /*#__PURE__*/React.createElement("div", { | ||
}) => jsx("div", { | ||
ref: innerRef, | ||
css: controlStyles | ||
}, /*#__PURE__*/React.createElement(components.Control, _extends({}, props, { | ||
}, jsx(components.Control, _extends({}, props, { | ||
innerProps: innerProps | ||
}))); | ||
export const DummyControl = props => /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement(components.Control, props)); | ||
export const DummyControl = props => jsx(VisuallyHidden, null, jsx(components.Control, props)); | ||
@@ -75,3 +77,3 @@ // NOTE `props` intentionally omitted from `Fragment` | ||
innerProps | ||
}) => /*#__PURE__*/React.createElement("div", innerProps, children); | ||
}) => jsx("div", innerProps, children); | ||
export const defaultComponents = { | ||
@@ -78,0 +80,0 @@ Control, |
@@ -5,3 +5,3 @@ import Select from 'react-select'; | ||
const packageName = "@atlaskit/select"; | ||
const packageVersion = "17.0.2"; | ||
const packageVersion = "17.0.3"; | ||
export const SelectWithoutAnalytics = createSelect(Select); | ||
@@ -8,0 +8,0 @@ const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit'); |
@@ -1,2 +0,3 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { jsx, css } from '@emotion/react'; | ||
import SelectClearIcon from '@atlaskit/icon/glyph/select-clear'; | ||
@@ -13,6 +14,6 @@ import { components } from 'react-select'; | ||
var isDisabled = props.selectProps.isDisabled; | ||
return /*#__PURE__*/React.createElement(components.MultiValueRemove, props, /*#__PURE__*/React.createElement("div", { | ||
return jsx(components.MultiValueRemove, props, jsx("div", { | ||
css: isDisabled ? disabledStyles : enabledStyles, | ||
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon' | ||
}, /*#__PURE__*/React.createElement(SelectClearIcon, { | ||
}, jsx(SelectClearIcon, { | ||
label: "Clear", | ||
@@ -19,0 +20,0 @@ size: "small", |
@@ -5,3 +5,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { jsx, css } from '@emotion/react'; | ||
import { components } from 'react-select'; | ||
@@ -18,11 +19,11 @@ import Spinner from '@atlaskit/spinner'; | ||
export var ClearIndicator = function ClearIndicator(props) { | ||
return /*#__PURE__*/React.createElement(components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, { | ||
return jsx(components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, { | ||
innerProps: _objectSpread(_objectSpread({}, props.innerProps), {}, { | ||
'aria-hidden': 'false' | ||
}) | ||
}), /*#__PURE__*/React.createElement("button", { | ||
}), jsx("button", { | ||
css: iconContainerStyles, | ||
type: "button", | ||
tabIndex: -1 | ||
}, /*#__PURE__*/React.createElement(SelectClearIcon, { | ||
}, jsx(SelectClearIcon, { | ||
size: "small", | ||
@@ -33,3 +34,3 @@ label: "clear" | ||
export var DropdownIndicator = function DropdownIndicator(props) { | ||
return /*#__PURE__*/React.createElement(components.DropdownIndicator, props, /*#__PURE__*/React.createElement(DownIcon, { | ||
return jsx(components.DropdownIndicator, props, jsx(DownIcon, { | ||
label: "open" | ||
@@ -41,9 +42,8 @@ })); | ||
return ( | ||
/*#__PURE__*/ | ||
// This *must* be constructed this way because this is being consumed by | ||
// `react-select` and we don't control what it wants. | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
React.createElement("div", _extends({ | ||
jsx("div", _extends({ | ||
css: loadingStyles | ||
}, props.innerProps), /*#__PURE__*/React.createElement(Spinner, { | ||
}, props.innerProps), jsx(Spinner, { | ||
size: "small" | ||
@@ -50,0 +50,0 @@ })) |
@@ -16,3 +16,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { Component } from 'react'; | ||
@@ -198,11 +199,10 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags'; | ||
return ( | ||
/*#__PURE__*/ | ||
// These need to remain this way because `react-select` passes props with | ||
// styles inside, and that must be done dynamically. | ||
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
React.createElement("div", _extends({ | ||
jsx("div", _extends({ | ||
css: styles, | ||
className: classes, | ||
ref: innerRef | ||
}, props), /*#__PURE__*/React.createElement("div", { | ||
}, props), jsx("div", { | ||
css: [baseIconStyles, | ||
@@ -224,7 +224,7 @@ // Here we are adding a border to the Checkbox and Radio SVG icons | ||
}] | ||
}, !!Icon ? /*#__PURE__*/React.createElement(Icon, { | ||
}, !!Icon ? jsx(Icon, { | ||
label: "", | ||
primaryColor: getPrimaryColor(_objectSpread(_objectSpread({}, this.props), this.state)), | ||
secondaryColor: getSecondaryColor(_objectSpread(_objectSpread({}, this.props), this.state)) | ||
}) : null), /*#__PURE__*/React.createElement("div", { | ||
}) : null), jsx("div", { | ||
css: baseOptionStyles | ||
@@ -238,3 +238,3 @@ }, children)) | ||
export var CheckboxOption = function CheckboxOption(props) { | ||
return /*#__PURE__*/React.createElement(ControlOption, _extends({ | ||
return jsx(ControlOption, _extends({ | ||
Icon: CheckboxIcon | ||
@@ -244,5 +244,5 @@ }, props)); | ||
export var RadioOption = function RadioOption(props) { | ||
return /*#__PURE__*/React.createElement(ControlOption, _extends({ | ||
return jsx(ControlOption, _extends({ | ||
Icon: RadioIcon | ||
}, props)); | ||
}; |
import _extends from "@babel/runtime/helpers/extends"; | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { jsx, css } from '@emotion/react'; | ||
import { groupedCountries } from './data/countries'; | ||
@@ -18,5 +20,5 @@ import Select from './Select'; | ||
icon = _ref.icon; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: labelStyles | ||
}, /*#__PURE__*/React.createElement("span", { | ||
}, jsx("span", { | ||
css: flagStyles | ||
@@ -41,3 +43,3 @@ }, icon), children); | ||
var controlLabel = function controlLabel(opt) { | ||
return /*#__PURE__*/React.createElement(Opt, { | ||
return jsx(Opt, { | ||
icon: opt.icon | ||
@@ -52,3 +54,3 @@ }, opt.abbr.toUpperCase()); | ||
name = _ref3.name; | ||
return /*#__PURE__*/React.createElement(Opt, { | ||
return jsx(Opt, { | ||
icon: icon | ||
@@ -70,3 +72,3 @@ }, getOptionLabel({ | ||
var CountrySelect = function CountrySelect(props) { | ||
return /*#__PURE__*/React.createElement(Select, _extends({ | ||
return jsx(Select, _extends({ | ||
isClearable: false, | ||
@@ -73,0 +75,0 @@ formatOptionLabel: formatOptionLabel, |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; | ||
var _excluded = ["innerRef", "innerProps"]; | ||
/** @jsx jsx */ | ||
import { components } from 'react-select'; | ||
import { css } from '@emotion/react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import VisuallyHidden from '@atlaskit/visually-hidden'; | ||
@@ -27,3 +29,3 @@ import SearchIcon from '@atlaskit/icon/glyph/editor/search'; | ||
testId = _ref.testId; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: [menuDialogStyles, | ||
@@ -53,5 +55,5 @@ // There is not a limited amount of values for the widths, so they need | ||
var DropdownIndicator = function DropdownIndicator() { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: dropdownStyles | ||
}, /*#__PURE__*/React.createElement(SearchIcon, { | ||
}, jsx(SearchIcon, { | ||
label: "open" | ||
@@ -67,6 +69,6 @@ })); | ||
props = _objectWithoutProperties(_ref2, _excluded); | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
ref: innerRef, | ||
css: controlStyles | ||
}, /*#__PURE__*/React.createElement(components.Control, _extends({}, props, { | ||
}, jsx(components.Control, _extends({}, props, { | ||
innerProps: innerProps | ||
@@ -76,3 +78,3 @@ }))); | ||
export var DummyControl = function DummyControl(props) { | ||
return /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement(components.Control, props)); | ||
return jsx(VisuallyHidden, null, jsx(components.Control, props)); | ||
}; | ||
@@ -84,3 +86,3 @@ | ||
innerProps = _ref3.innerProps; | ||
return /*#__PURE__*/React.createElement("div", innerProps, children); | ||
return jsx("div", innerProps, children); | ||
}; | ||
@@ -87,0 +89,0 @@ export var defaultComponents = { |
@@ -5,3 +5,3 @@ import Select from 'react-select'; | ||
var packageName = "@atlaskit/select"; | ||
var packageVersion = "17.0.2"; | ||
var packageVersion = "17.0.3"; | ||
export var SelectWithoutAnalytics = createSelect(Select); | ||
@@ -8,0 +8,0 @@ var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit'); |
{ | ||
"name": "@atlaskit/select", | ||
"version": "17.0.2", | ||
"version": "17.0.3", | ||
"description": "Select allows users to make a single selection or multiple selections from a list of options.", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is too big to display
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
10944
0
547284