@atlaskit/datetime-picker 13.11.2 → 14.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.
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
  /**
4
3
  * @jsxRuntime classic
@@ -9,7 +8,6 @@ import React from 'react';
9
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
9
  import { css, jsx } from '@emotion/react';
11
10
  import { format, isValid, parseISO } from 'date-fns';
12
- import pick from 'lodash/pick';
13
11
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
14
12
  import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
15
13
  import { mergeStyles } from '@atlaskit/select';
@@ -20,7 +18,7 @@ import { convertTokens } from '../internal/parse-tokens';
20
18
  import DatePicker from './date-picker';
21
19
  import TimePicker from './time-picker';
22
20
  const packageName = "@atlaskit/datetime-picker";
23
- const packageVersion = "13.11.2";
21
+ const packageVersion = "14.0.0";
24
22
  // Make DatePicker 50% the width of DateTimePicker
25
23
  // If rendering an icon container, shrink the TimePicker
26
24
  const datePickerContainerStyles = css({
@@ -83,8 +81,6 @@ const dateTimePickerDefaultProps = {
83
81
  isInvalid: false,
84
82
  datePickerProps: {},
85
83
  timePickerProps: {},
86
- datePickerSelectProps: {},
87
- timePickerSelectProps: {},
88
84
  times: defaultTimes,
89
85
  spacing: 'default',
90
86
  locale: 'en-US'
@@ -105,15 +101,10 @@ class DateTimePickerComponent extends React.Component {
105
101
  });
106
102
  // All state needs to be accessed via this function so that the state is mapped from props
107
103
  // correctly to allow controlled/uncontrolled usage.
108
- _defineProperty(this, "getSafeState", () => {
109
- const mappedState = {
110
- ...this.state,
111
- ...pick(this.props, ['value'])
112
- };
113
- return {
114
- ...mappedState,
115
- ...this.parseValue(mappedState.value, mappedState.dateValue, mappedState.timeValue, mappedState.zoneValue)
116
- };
104
+ _defineProperty(this, "getParsedValues", () => this.parseValue(this.getValue(), this.state.dateValue, this.state.timeValue, this.state.zoneValue));
105
+ _defineProperty(this, "getValue", () => {
106
+ var _this$props$value;
107
+ return (_this$props$value = this.props.value) !== null && _this$props$value !== void 0 ? _this$props$value : this.state.value;
117
108
  });
118
109
  _defineProperty(this, "onBlur", event => {
119
110
  this.setState({
@@ -128,28 +119,44 @@ class DateTimePickerComponent extends React.Component {
128
119
  this.props.onFocus(event);
129
120
  });
130
121
  _defineProperty(this, "onDateChange", dateValue => {
122
+ const parsedValues = this.getParsedValues();
131
123
  this.onValueChange({
132
- ...this.getSafeState(),
133
- dateValue
124
+ dateValue,
125
+ timeValue: parsedValues.timeValue,
126
+ zoneValue: parsedValues.zoneValue
134
127
  });
135
128
  });
136
129
  _defineProperty(this, "onTimeChange", timeValue => {
130
+ const parsedValues = this.getParsedValues();
137
131
  this.onValueChange({
138
- ...this.getSafeState(),
139
- timeValue
132
+ dateValue: parsedValues.dateValue,
133
+ timeValue,
134
+ zoneValue: parsedValues.zoneValue
140
135
  });
141
136
  });
142
137
  _defineProperty(this, "onClear", () => {
138
+ const parsedValues = this.getParsedValues();
143
139
  this.onValueChange({
144
- ...this.getSafeState(),
140
+ dateValue: '',
145
141
  timeValue: '',
146
- dateValue: ''
142
+ zoneValue: parsedValues.zoneValue
147
143
  });
148
144
  });
149
145
  }
150
146
  parseValue(value, dateValue, timeValue, zoneValue) {
151
147
  if (this.props.parseValue) {
152
- return this.props.parseValue(value, dateValue, timeValue, zoneValue);
148
+ const parsedFromFn = this.props.parseValue(value, dateValue, timeValue, zoneValue);
149
+ // This handles cases found in Jira where the parse function actually does
150
+ // nothing and returns undefined. The previous `getSafeState` function
151
+ // just spread the values over the state, but if it returned `undefined`,
152
+ // it would just rely on the previous state values. Considering this is
153
+ // what is input to this function anyway, this is a safe way to handle
154
+ // this, colocate the behavior, and not rely on `getSafeState`.
155
+ return parsedFromFn || {
156
+ dateValue,
157
+ timeValue,
158
+ zoneValue
159
+ };
153
160
  }
154
161
  const parsed = parseISO(value);
155
162
  return isValid(parsed) ? {
@@ -183,7 +190,7 @@ class DateTimePickerComponent extends React.Component {
183
190
  });
184
191
  this.props.onChange(valueWithValidZone);
185
192
  // If the date or time value was cleared when there is an existing datetime value, then clear the value.
186
- } else if (this.getSafeState().value) {
193
+ } else if (this.getValue()) {
187
194
  this.setState({
188
195
  value: ''
189
196
  });
@@ -195,9 +202,7 @@ class DateTimePickerComponent extends React.Component {
195
202
  'aria-describedby': ariaDescribedBy,
196
203
  appearance,
197
204
  autoFocus,
198
- dateFormat,
199
- datePickerProps,
200
- datePickerSelectProps,
205
+ datePickerProps: datePickerPropsWithSelectProps,
201
206
  id,
202
207
  innerProps,
203
208
  isDisabled,
@@ -206,35 +211,34 @@ class DateTimePickerComponent extends React.Component {
206
211
  name,
207
212
  spacing,
208
213
  testId,
209
- timeFormat,
210
- timeIsEditable,
211
- timePickerProps,
212
- timePickerSelectProps,
213
- times
214
+ timePickerProps: timePickerPropsWithSelectProps
214
215
  } = this.props;
216
+ const value = this.getValue();
215
217
  const {
216
- isFocused,
217
- value,
218
- dateValue,
219
- timeValue
220
- } = this.getSafeState();
221
- const {
222
- styles: datePickerStyles = {}
223
- } = datePickerSelectProps;
218
+ isFocused
219
+ } = this.state;
220
+ const parsedValues = this.getParsedValues();
221
+ const dateValue = parsedValues === null || parsedValues === void 0 ? void 0 : parsedValues.dateValue;
222
+ const timeValue = parsedValues === null || parsedValues === void 0 ? void 0 : parsedValues.timeValue;
224
223
  const {
225
- styles: timePickerStyles = {}
226
- } = timePickerSelectProps;
224
+ selectProps: datePickerSelectProps,
225
+ ...datePickerProps
226
+ } = datePickerPropsWithSelectProps;
227
+ const datePickerAriaDescribedBy = datePickerProps['aria-describedby'] || ariaDescribedBy;
228
+ const datePickerLabel = datePickerProps.label || datePickerDefaultAriaLabel;
227
229
  const mergedDatePickerSelectProps = {
228
230
  ...datePickerSelectProps,
229
- 'aria-describedby': datePickerProps['aria-describedby'] || ariaDescribedBy,
230
- 'aria-label': datePickerProps['label'] || datePickerSelectProps['aria-label'] || datePickerDefaultAriaLabel,
231
- styles: mergeStyles(styles, datePickerStyles)
231
+ styles: mergeStyles(styles, datePickerSelectProps === null || datePickerSelectProps === void 0 ? void 0 : datePickerSelectProps.styles)
232
232
  };
233
+ const {
234
+ selectProps: timePickerSelectProps,
235
+ ...timePickerProps
236
+ } = timePickerPropsWithSelectProps;
237
+ const timePickerAriaDescribedBy = timePickerProps['aria-describedby'] || ariaDescribedBy;
238
+ const timePickerLabel = timePickerProps.label || timePickerDefaultAriaLabel;
233
239
  const mergedTimePickerSelectProps = {
234
240
  ...timePickerSelectProps,
235
- 'aria-describedby': timePickerProps['aria-describedby'] || ariaDescribedBy,
236
- 'aria-label': timePickerProps['label'] || timePickerSelectProps['aria-label'] || timePickerDefaultAriaLabel,
237
- styles: mergeStyles(styles, timePickerStyles)
241
+ styles: mergeStyles(styles, timePickerSelectProps === null || timePickerSelectProps === void 0 ? void 0 : timePickerSelectProps.styles)
238
242
  };
239
243
 
240
244
  // Render DateTimePicker's IconContainer when a value has been filled
@@ -254,10 +258,11 @@ class DateTimePickerComponent extends React.Component {
254
258
  "data-testid": testId && `${testId}--input`
255
259
  }), jsx("div", {
256
260
  css: datePickerContainerStyles
257
- }, jsx(DatePicker, _extends({
261
+ }, jsx(DatePicker, {
258
262
  appearance: appearance,
263
+ "aria-describedby": datePickerAriaDescribedBy,
259
264
  autoFocus: datePickerProps.autoFocus || autoFocus,
260
- dateFormat: datePickerProps.dateFormat || dateFormat,
265
+ dateFormat: datePickerProps.dateFormat,
261
266
  defaultIsOpen: datePickerProps.defaultIsOpen,
262
267
  defaultValue: datePickerProps.defaultValue,
263
268
  disabled: datePickerProps.disabled,
@@ -268,15 +273,9 @@ class DateTimePickerComponent extends React.Component {
268
273
  id: datePickerProps.id || id,
269
274
  innerProps: datePickerProps.innerProps,
270
275
  isDisabled: datePickerProps.isDisabled || isDisabled,
271
- isInvalid: datePickerProps.isInvalid || isInvalid
272
- // If you set this or `value` explicitly like
273
- // `isOpen={datePickerProps.isOpen}`, the date picker will set
274
- // `isOpen` to `undefined` forever. I believe this has to do with
275
- // the `getSafeState` function in the picker, since it overwrites
276
- // state with values from the props.
277
- }, datePickerProps.isOpen ? {
278
- isOpen: datePickerProps.isOpen
279
- } : {}, {
276
+ isInvalid: datePickerProps.isInvalid || isInvalid,
277
+ isOpen: datePickerProps.isOpen,
278
+ label: datePickerLabel,
280
279
  locale: datePickerProps.locale || locale,
281
280
  maxDate: datePickerProps.maxDate,
282
281
  minDate: datePickerProps.minDate,
@@ -293,10 +292,11 @@ class DateTimePickerComponent extends React.Component {
293
292
  testId: testId && `${testId}--datepicker` || datePickerProps.testId,
294
293
  value: dateValue,
295
294
  weekStartDay: datePickerProps.weekStartDay
296
- }))), jsx("div", {
295
+ })), jsx("div", {
297
296
  css: timePickerContainerStyles
298
- }, jsx(TimePicker, _extends({
297
+ }, jsx(TimePicker, {
299
298
  appearance: timePickerProps.appearance || appearance,
299
+ "aria-describedby": timePickerAriaDescribedBy,
300
300
  autoFocus: timePickerProps.autoFocus,
301
301
  defaultIsOpen: timePickerProps.defaultIsOpen,
302
302
  defaultValue: timePickerProps.defaultValue,
@@ -305,15 +305,9 @@ class DateTimePickerComponent extends React.Component {
305
305
  id: timePickerProps.id,
306
306
  innerProps: timePickerProps.innerProps,
307
307
  isDisabled: timePickerProps.isDisabled || isDisabled,
308
- isInvalid: timePickerProps.isInvalid || isInvalid
309
- // If you set this or `value` explicitly like
310
- // `isOpen={datePickerProps.isOpen}`, the date picker will set
311
- // `isOpen` to `undefined` forever. I believe this has to do with
312
- // the `getSafeState` function in the picker, since it overwrites
313
- // state with values from the props.
314
- }, timePickerProps.isOpen ? {
315
- isOpen: timePickerProps.isOpen
316
- } : {}, {
308
+ isInvalid: timePickerProps.isInvalid || isInvalid,
309
+ isOpen: timePickerProps.isOpen,
310
+ label: timePickerLabel,
317
311
  locale: timePickerProps.locale || locale,
318
312
  name: timePickerProps.name,
319
313
  onBlur: timePickerProps.onBlur || this.onBlur,
@@ -324,11 +318,11 @@ class DateTimePickerComponent extends React.Component {
324
318
  selectProps: mergedTimePickerSelectProps,
325
319
  spacing: timePickerProps.spacing || spacing,
326
320
  testId: timePickerProps.testId || testId && `${testId}--timepicker`,
327
- timeFormat: timePickerProps.timeFormat || timeFormat,
328
- timeIsEditable: timePickerProps.timeIsEditable || timeIsEditable,
329
- times: timePickerProps.times || times,
321
+ timeFormat: timePickerProps.timeFormat,
322
+ timeIsEditable: timePickerProps.timeIsEditable,
323
+ times: timePickerProps.times,
330
324
  value: timeValue
331
- }))), isClearable && !isDisabled ? jsx("button", {
325
+ })), isClearable && !isDisabled ? jsx("button", {
332
326
  css: iconContainerStyles,
333
327
  onClick: this.onClear,
334
328
  "data-testid": testId && `${testId}--icon--container`,
@@ -4,7 +4,6 @@ import React from 'react';
4
4
 
5
5
  // eslint-disable-next-line no-restricted-imports
6
6
  import { format, isValid } from 'date-fns';
7
- import pick from 'lodash/pick';
8
7
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
9
8
  import { createLocalizationProvider } from '@atlaskit/locale';
10
9
  import Select, { CreatableSelect, mergeStyles } from '@atlaskit/select';
@@ -16,7 +15,7 @@ import parseTime from '../internal/parse-time';
16
15
  import { convertTokens } from '../internal/parse-tokens';
17
16
  import { makeSingleValue } from '../internal/single-value';
18
17
  const packageName = "@atlaskit/datetime-picker";
19
- const packageVersion = "13.11.2";
18
+ const packageVersion = "14.0.0";
20
19
  const menuStyles = {
21
20
  /* Need to remove default absolute positioning as that causes issues with position fixed */
22
21
  position: 'static',
@@ -65,11 +64,13 @@ class TimePickerComponent extends React.Component {
65
64
  });
66
65
  // All state needs to be accessed via this function so that the state is mapped from props
67
66
  // correctly to allow controlled/uncontrolled usage.
68
- _defineProperty(this, "getSafeState", () => {
69
- return {
70
- ...this.state,
71
- ...pick(this.props, ['value', 'isOpen'])
72
- };
67
+ _defineProperty(this, "getValue", () => {
68
+ var _this$props$value;
69
+ return (_this$props$value = this.props.value) !== null && _this$props$value !== void 0 ? _this$props$value : this.state.value;
70
+ });
71
+ _defineProperty(this, "getIsOpen", () => {
72
+ var _this$props$isOpen;
73
+ return (_this$props$isOpen = this.props.isOpen) !== null && _this$props$isOpen !== void 0 ? _this$props$isOpen : this.state.isOpen;
73
74
  });
74
75
  _defineProperty(this, "onChange", (newValue, action) => {
75
76
  const rawValue = newValue ? newValue.value || newValue : '';
@@ -114,7 +115,7 @@ class TimePickerComponent extends React.Component {
114
115
  });
115
116
  _defineProperty(this, "onMenuOpen", () => {
116
117
  // Don't open menu after the user has clicked clear
117
- if (this.getSafeState().clearingFromIcon) {
118
+ if (this.state.clearingFromIcon) {
118
119
  this.setState({
119
120
  clearingFromIcon: false
120
121
  });
@@ -126,7 +127,7 @@ class TimePickerComponent extends React.Component {
126
127
  });
127
128
  _defineProperty(this, "onMenuClose", () => {
128
129
  // Don't close menu after the user has clicked clear
129
- if (this.getSafeState().clearingFromIcon) {
130
+ if (this.state.clearingFromIcon) {
130
131
  this.setState({
131
132
  clearingFromIcon: false
132
133
  });
@@ -162,7 +163,7 @@ class TimePickerComponent extends React.Component {
162
163
  key
163
164
  } = event;
164
165
  const keyPressed = key.toLowerCase();
165
- if (this.getSafeState().clearingFromIcon && (keyPressed === 'backspace' || keyPressed === 'delete')) {
166
+ if (this.state.clearingFromIcon && (keyPressed === 'backspace' || keyPressed === 'delete')) {
166
167
  // If being cleared from keyboard, don't change behaviour
167
168
  this.setState({
168
169
  clearingFromIcon: false
@@ -194,10 +195,8 @@ class TimePickerComponent extends React.Component {
194
195
  } = this.props;
195
196
  const ICON_PADDING = 2;
196
197
  const l10n = createLocalizationProvider(locale);
197
- const {
198
- value = '',
199
- isOpen
200
- } = this.getSafeState();
198
+ const value = this.getValue() || '';
199
+ const isOpen = this.getIsOpen();
201
200
  const {
202
201
  styles: selectStyles = {},
203
202
  ...otherSelectProps
@@ -20,7 +20,6 @@ import { Component } from 'react';
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
21
  import { jsx } from '@emotion/react';
22
22
  import { format, isValid, lastDayOfMonth, parseISO } from 'date-fns';
23
- import pick from 'lodash/pick';
24
23
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
25
24
  import CalendarIcon from '@atlaskit/icon/glyph/calendar';
26
25
  import { createLocalizationProvider } from '@atlaskit/locale';
@@ -31,7 +30,7 @@ import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date'
31
30
  import { convertTokens } from '../internal/parse-tokens';
32
31
  import { makeSingleValue } from '../internal/single-value';
33
32
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "13.11.2";
33
+ var packageVersion = "14.0.0";
35
34
  var datePickerDefaultProps = {
36
35
  appearance: 'default',
37
36
  autoFocus: false,
@@ -73,8 +72,13 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
73
72
  _defineProperty(_assertThisInitialized(_this), "containerRef", null);
74
73
  // All state needs to be accessed via this function so that the state is mapped from props
75
74
  // correctly to allow controlled/uncontrolled usage.
76
- _defineProperty(_assertThisInitialized(_this), "getSafeState", function () {
77
- return _objectSpread(_objectSpread(_objectSpread({}, _this.state), pick(_this.props, ['value', 'isOpen'])), pick(_this.props.selectProps, ['inputValue']));
75
+ _defineProperty(_assertThisInitialized(_this), "getValue", function () {
76
+ var _this$props$value;
77
+ return (_this$props$value = _this.props.value) !== null && _this$props$value !== void 0 ? _this$props$value : _this.state.value;
78
+ });
79
+ _defineProperty(_assertThisInitialized(_this), "getIsOpen", function () {
80
+ var _this$props$isOpen;
81
+ return (_this$props$isOpen = _this.props.isOpen) !== null && _this$props$isOpen !== void 0 ? _this$props$isOpen : _this.state.isOpen;
78
82
  });
79
83
  _defineProperty(_assertThisInitialized(_this), "isDateDisabled", function (date) {
80
84
  return _this.props.disabled.indexOf(date) > -1;
@@ -124,7 +128,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
124
128
  });
125
129
  });
126
130
  _defineProperty(_assertThisInitialized(_this), "onInputClick", function () {
127
- if (!_this.props.isDisabled && !_this.getSafeState().isOpen) {
131
+ if (!_this.props.isDisabled && !_this.getIsOpen()) {
128
132
  _this.setState({
129
133
  isOpen: true
130
134
  });
@@ -149,7 +153,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
149
153
  _defineProperty(_assertThisInitialized(_this), "onSelectBlur", function (event) {
150
154
  var _this$containerRef3;
151
155
  var newlyFocusedElement = event.relatedTarget;
152
- if (_this.getSafeState().clearingFromIcon) {
156
+ if (_this.state.clearingFromIcon) {
153
157
  // Don't close menu if blurring after the user has clicked clear
154
158
  _this.setState({
155
159
  clearingFromIcon: false
@@ -164,9 +168,8 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
164
168
  }
165
169
  });
166
170
  _defineProperty(_assertThisInitialized(_this), "onSelectFocus", function (event) {
167
- var _this$getSafeState = _this.getSafeState(),
168
- clearingFromIcon = _this$getSafeState.clearingFromIcon,
169
- value = _this$getSafeState.value;
171
+ var clearingFromIcon = _this.state.clearingFromIcon;
172
+ var value = _this.getValue();
170
173
  if (clearingFromIcon) {
171
174
  // Don't open menu if focussing after the user has clicked clear
172
175
  _this.setState({
@@ -200,9 +203,8 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
200
203
  });
201
204
  _defineProperty(_assertThisInitialized(_this), "onInputKeyDown", function (event) {
202
205
  var _this$containerRef4;
203
- var _this$getSafeState2 = _this.getSafeState(),
204
- value = _this$getSafeState2.value,
205
- calendarValue = _this$getSafeState2.calendarValue;
206
+ var calendarValue = _this.state.calendarValue;
207
+ var value = _this.getValue();
206
208
  var keyPressed = event.key.toLowerCase();
207
209
 
208
210
  // If the input is focused and the calendar is not visible, handle space and enter clicks
@@ -330,8 +332,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
330
332
  if (parseInputValue) {
331
333
  return parseInputValue(date, dateFormat || defaultDateFormat);
332
334
  }
333
- var _this$getSafeState3 = _this.getSafeState(),
334
- l10n = _this$getSafeState3.l10n;
335
+ var l10n = _this.state.l10n;
335
336
  return l10n.parseDate(date);
336
337
  });
337
338
  /**
@@ -345,8 +346,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
345
346
  var _this$props2 = _this.props,
346
347
  formatDisplayLabel = _this$props2.formatDisplayLabel,
347
348
  dateFormat = _this$props2.dateFormat;
348
- var _this$getSafeState4 = _this.getSafeState(),
349
- l10n = _this$getSafeState4.l10n;
349
+ var l10n = _this.state.l10n;
350
350
  if (formatDisplayLabel) {
351
351
  return formatDisplayLabel(value, dateFormat || defaultDateFormat);
352
352
  }
@@ -358,8 +358,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
358
358
  if (placeholder) {
359
359
  return placeholder;
360
360
  }
361
- var _this$getSafeState5 = _this.getSafeState(),
362
- l10n = _this$getSafeState5.l10n;
361
+ var l10n = _this.state.l10n;
363
362
  return l10n.formatDate(placeholderDatetime);
364
363
  });
365
364
  _this.state = {
@@ -401,14 +400,13 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
401
400
  locale = _this$props3.locale,
402
401
  testId = _this$props3.testId,
403
402
  weekStartDay = _this$props3.weekStartDay;
404
- var _this$getSafeState6 = this.getSafeState(),
405
- value = _this$getSafeState6.value,
406
- calendarValue = _this$getSafeState6.calendarValue,
407
- isOpen = _this$getSafeState6.isOpen,
408
- selectInputValue = _this$getSafeState6.selectInputValue;
403
+ var _this$state = this.state,
404
+ calendarValue = _this$state.calendarValue,
405
+ selectInputValue = _this$state.selectInputValue;
406
+ var value = this.getValue();
409
407
  var actualSelectInputValue;
410
408
  actualSelectInputValue = selectInputValue;
411
- var menuIsOpen = isOpen && !isDisabled;
409
+ var menuIsOpen = this.getIsOpen() && !isDisabled;
412
410
  var showClearIndicator = Boolean((value || selectInputValue) && !hideIcon);
413
411
  var dropDownIcon = appearance === 'subtle' || hideIcon || showClearIndicator ? null : icon;
414
412
  var SingleValue = makeSingleValue({