@zendeskgarden/react-dropdowns 9.0.0-next.12 → 9.0.0-next.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/esm/elements/combobox/Option.js +7 -3
  2. package/dist/esm/elements/menu/Item.js +9 -7
  3. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-lg-stroke.svg.js +1 -1
  4. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +1 -1
  5. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +1 -1
  6. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +1 -1
  7. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/plus-stroke.svg.js +1 -1
  8. package/dist/esm/views/combobox/StyledCombobox.js +1 -1
  9. package/dist/esm/views/combobox/StyledContainer.js +1 -1
  10. package/dist/esm/views/combobox/StyledField.js +1 -1
  11. package/dist/esm/views/combobox/StyledFloatingListbox.js +1 -1
  12. package/dist/esm/views/combobox/StyledHint.js +1 -1
  13. package/dist/esm/views/combobox/StyledInput.js +10 -4
  14. package/dist/esm/views/combobox/StyledInputGroup.js +1 -1
  15. package/dist/esm/views/combobox/StyledInputIcon.js +26 -7
  16. package/dist/esm/views/combobox/StyledLabel.js +1 -1
  17. package/dist/esm/views/combobox/StyledListbox.js +1 -1
  18. package/dist/esm/views/combobox/StyledListboxSeparator.js +10 -4
  19. package/dist/esm/views/combobox/StyledMessage.js +1 -1
  20. package/dist/esm/views/combobox/StyledOptGroup.js +1 -1
  21. package/dist/esm/views/combobox/StyledOption.js +34 -13
  22. package/dist/esm/views/combobox/StyledOptionContent.js +1 -1
  23. package/dist/esm/views/combobox/StyledOptionIcon.js +25 -3
  24. package/dist/esm/views/combobox/StyledOptionMeta.js +12 -4
  25. package/dist/esm/views/combobox/StyledOptionTypeIcon.js +18 -8
  26. package/dist/esm/views/combobox/StyledTag.js +6 -3
  27. package/dist/esm/views/combobox/StyledTagsButton.js +10 -4
  28. package/dist/esm/views/combobox/StyledTrigger.js +64 -33
  29. package/dist/esm/views/combobox/StyledValue.js +11 -4
  30. package/dist/esm/views/menu/StyledFloatingMenu.js +1 -1
  31. package/dist/esm/views/menu/StyledItem.js +1 -1
  32. package/dist/esm/views/menu/StyledItemContent.js +1 -1
  33. package/dist/esm/views/menu/StyledItemGroup.js +1 -1
  34. package/dist/esm/views/menu/StyledItemIcon.js +1 -1
  35. package/dist/esm/views/menu/StyledItemMeta.js +1 -1
  36. package/dist/esm/views/menu/StyledItemTypeIcon.js +1 -1
  37. package/dist/esm/views/menu/StyledMenu.js +2 -2
  38. package/dist/esm/views/menu/StyledSeparator.js +1 -1
  39. package/dist/index.cjs.js +262 -117
  40. package/dist/typings/views/combobox/StyledOptionIcon.d.ts +7 -2
  41. package/dist/typings/views/menu/StyledItemIcon.d.ts +1 -1
  42. package/package.json +8 -9
  43. package/LICENSE.md +0 -176
@@ -61,8 +61,9 @@ const OptionComponent = forwardRef((_ref, ref) => {
61
61
  ...props
62
62
  } = _ref;
63
63
  const contextValue = useMemo(() => ({
64
- isDisabled
65
- }), [isDisabled]);
64
+ isDisabled,
65
+ type
66
+ }), [isDisabled, type]);
66
67
  const {
67
68
  activeValue,
68
69
  getOptionProps,
@@ -113,7 +114,10 @@ const OptionComponent = forwardRef((_ref, ref) => {
113
114
  }, props, optionProps), React__default.createElement(StyledOptionTypeIcon, {
114
115
  $isCompact: isCompact,
115
116
  $type: type
116
- }, renderActionIcon(type)), icon && React__default.createElement(StyledOptionIcon, null, icon), React__default.createElement(StyledOptionContent, null, children || label || value)));
117
+ }, renderActionIcon(type)), icon && React__default.createElement(StyledOptionIcon, {
118
+ $isDisabled: isDisabled,
119
+ $type: type
120
+ }, icon), React__default.createElement(StyledOptionContent, null, children || label || value)));
117
121
  });
118
122
  OptionComponent.displayName = 'Option';
119
123
  OptionComponent.propTypes = {
@@ -69,7 +69,8 @@ const ItemComponent = forwardRef((_ref, ref) => {
69
69
  } = useItemGroupContext();
70
70
  const {
71
71
  focusedValue,
72
- getItemProps
72
+ getItemProps,
73
+ isCompact
73
74
  } = useMenuContext();
74
75
  const item = {
75
76
  ...toItem({
@@ -92,9 +93,6 @@ const ItemComponent = forwardRef((_ref, ref) => {
92
93
  onMouseEnter
93
94
  });
94
95
  const isActive = value === focusedValue;
95
- const {
96
- isCompact
97
- } = useMenuContext();
98
96
  const renderActionIcon = iconType => {
99
97
  switch (iconType) {
100
98
  case 'add':
@@ -108,8 +106,9 @@ const ItemComponent = forwardRef((_ref, ref) => {
108
106
  }
109
107
  };
110
108
  const contextValue = useMemo(() => ({
111
- isDisabled
112
- }), [isDisabled]);
109
+ isDisabled,
110
+ type
111
+ }), [isDisabled, type]);
113
112
  return React__default.createElement(ItemContext.Provider, {
114
113
  value: contextValue
115
114
  }, React__default.createElement(StyledItem, Object.assign({
@@ -121,7 +120,10 @@ const ItemComponent = forwardRef((_ref, ref) => {
121
120
  }), React__default.createElement(StyledItemTypeIcon, {
122
121
  $isCompact: isCompact,
123
122
  $type: type
124
- }, renderActionIcon(type)), icon && React__default.createElement(StyledItemIcon, null, icon), React__default.createElement(StyledItemContent, null, children || label)));
123
+ }, renderActionIcon(type)), icon && React__default.createElement(StyledItemIcon, {
124
+ $isDisabled: isDisabled,
125
+ $type: type
126
+ }, icon), React__default.createElement(StyledItemContent, null, children || label)));
125
127
  });
126
128
  ItemComponent.displayName = 'Item';
127
129
  ItemComponent.propTypes = {
@@ -7,7 +7,7 @@
7
7
  import * as React from 'react';
8
8
 
9
9
  var _path;
10
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
11
11
  var SvgCheckLgStroke = function SvgCheckLgStroke(props) {
12
12
  return /*#__PURE__*/React.createElement("svg", _extends({
13
13
  xmlns: "http://www.w3.org/2000/svg",
@@ -7,7 +7,7 @@
7
7
  import * as React from 'react';
8
8
 
9
9
  var _path;
10
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
11
11
  var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
12
12
  return /*#__PURE__*/React.createElement("svg", _extends({
13
13
  xmlns: "http://www.w3.org/2000/svg",
@@ -7,7 +7,7 @@
7
7
  import * as React from 'react';
8
8
 
9
9
  var _path;
10
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
11
11
  var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
12
12
  return /*#__PURE__*/React.createElement("svg", _extends({
13
13
  xmlns: "http://www.w3.org/2000/svg",
@@ -7,7 +7,7 @@
7
7
  import * as React from 'react';
8
8
 
9
9
  var _path;
10
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
11
11
  var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
12
12
  return /*#__PURE__*/React.createElement("svg", _extends({
13
13
  xmlns: "http://www.w3.org/2000/svg",
@@ -7,7 +7,7 @@
7
7
  import * as React from 'react';
8
8
 
9
9
  var _path;
10
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
11
11
  var SvgPlusStroke = function SvgPlusStroke(props) {
12
12
  return /*#__PURE__*/React.createElement("svg", _extends({
13
13
  xmlns: "http://www.w3.org/2000/svg",
@@ -18,7 +18,7 @@ const sizeStyles = props => {
18
18
  };
19
19
  const StyledCombobox = styled.div.attrs({
20
20
  'data-garden-id': COMPONENT_ID,
21
- 'data-garden-version': '9.0.0-next.12'
21
+ 'data-garden-version': '9.0.0-next.13'
22
22
  }).withConfig({
23
23
  displayName: "StyledCombobox",
24
24
  componentId: "sc-13eybg8-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'dropdowns.combobox.container';
11
11
  const StyledContainer = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.12'
13
+ 'data-garden-version': '9.0.0-next.13'
14
14
  }).withConfig({
15
15
  displayName: "StyledContainer",
16
16
  componentId: "sc-14i9jid-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'dropdowns.combobox.field';
11
11
  const StyledField = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.12'
13
+ 'data-garden-version': '9.0.0-next.13'
14
14
  }).withConfig({
15
15
  displayName: "StyledField",
16
16
  componentId: "sc-zc57xl-0"
@@ -10,7 +10,7 @@ import { menuStyles, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgard
10
10
  const COMPONENT_ID = 'dropdowns.combobox.floating';
11
11
  const StyledFloatingListbox = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.12'
13
+ 'data-garden-version': '9.0.0-next.13'
14
14
  }).withConfig({
15
15
  displayName: "StyledFloatingListbox",
16
16
  componentId: "sc-1cp6spf-0"
@@ -11,7 +11,7 @@ import { Field } from '@zendeskgarden/react-forms';
11
11
  const COMPONENT_ID = 'dropdowns.combobox.hint';
12
12
  const StyledHint = styled(Field.Hint).attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.0.0-next.12'
14
+ 'data-garden-version': '9.0.0-next.13'
15
15
  }).withConfig({
16
16
  displayName: "StyledHint",
17
17
  componentId: "sc-106qvqx-0"
@@ -6,11 +6,17 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { hideVisually, math } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8, getLineHeight } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor, getLineHeight } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'dropdowns.combobox.input';
12
- const colorStyles = props => {
13
- const placeholderColor = getColorV8('neutralHue', 400, props.theme);
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme
15
+ } = _ref;
16
+ const placeholderColor = getColor({
17
+ theme,
18
+ variable: 'foreground.disabled'
19
+ });
14
20
  return css(["background-color:inherit;color:inherit;&::placeholder{opacity:1;color:", ";}"], placeholderColor);
15
21
  };
16
22
  const getHeight = props => {
@@ -29,7 +35,7 @@ const sizeStyles = props => {
29
35
  };
30
36
  const StyledInput = styled.input.attrs({
31
37
  'data-garden-id': COMPONENT_ID,
32
- 'data-garden-version': '9.0.0-next.12'
38
+ 'data-garden-version': '9.0.0-next.13'
33
39
  }).withConfig({
34
40
  displayName: "StyledInput",
35
41
  componentId: "sc-1lkqdg-0"
@@ -14,7 +14,7 @@ const sizeStyles = props => {
14
14
  };
15
15
  const StyledInputGroup = styled.div.attrs({
16
16
  'data-garden-id': COMPONENT_ID,
17
- 'data-garden-version': '9.0.0-next.12'
17
+ 'data-garden-version': '9.0.0-next.13'
18
18
  }).withConfig({
19
19
  displayName: "StyledInputGroup",
20
20
  componentId: "sc-yx3q7u-0"
@@ -6,16 +6,35 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
10
10
  import { getHeight } from './StyledInput.js';
11
11
  import { StyledTrigger } from './StyledTrigger.js';
12
12
 
13
13
  const COMPONENT_ID = 'dropdowns.combobox.input_icon';
14
- const colorStyles = props => {
15
- const color = getColorV8('neutralHue', 600, props.theme);
16
- const focusColor = getColorV8('neutralHue', 700, props.theme);
17
- const disabledColor = getColorV8('neutralHue', 400, props.theme);
18
- return css(["color:", ";", ":hover &,", ":focus-within &,", ":focus &{color:", ";}", "[aria-disabled='true'] &{color:", ";}"], props.$isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
14
+ const colorStyles = _ref => {
15
+ let {
16
+ theme,
17
+ $isLabelHovered
18
+ } = _ref;
19
+ const options = {
20
+ theme,
21
+ variable: 'foreground.subtle'
22
+ };
23
+ const color = getColor(options);
24
+ const focusColor = getColor({
25
+ ...options,
26
+ dark: {
27
+ offset: -100
28
+ },
29
+ light: {
30
+ offset: 100
31
+ }
32
+ });
33
+ const disabledColor = getColor({
34
+ theme,
35
+ variable: 'foreground.disabled'
36
+ });
37
+ return css(["color:", ";", ":hover &&,", ":focus-within &&,", ":focus &&{color:", ";}", "[aria-disabled='true'] &&{color:", ";}"], $isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
19
38
  };
20
39
  const sizeStyles = props => {
21
40
  const size = props.theme.iconSizes.md;
@@ -31,7 +50,7 @@ const sizeStyles = props => {
31
50
  };
32
51
  const StyledInputIcon = styled(StyledBaseIcon).attrs({
33
52
  'data-garden-id': COMPONENT_ID,
34
- 'data-garden-version': '9.0.0-next.12'
53
+ 'data-garden-version': '9.0.0-next.13'
35
54
  }).withConfig({
36
55
  displayName: "StyledInputIcon",
37
56
  componentId: "sc-gqbs1s-0"
@@ -11,7 +11,7 @@ import { Field } from '@zendeskgarden/react-forms';
11
11
  const COMPONENT_ID = 'dropdowns.combobox.label';
12
12
  const StyledLabel = styled(Field.Label).attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.0.0-next.12'
14
+ 'data-garden-version': '9.0.0-next.13'
15
15
  }).withConfig({
16
16
  displayName: "StyledLabel",
17
17
  componentId: "sc-az6now-0"
@@ -19,7 +19,7 @@ const sizeStyles = props => {
19
19
  };
20
20
  const StyledListbox = styled.ul.attrs({
21
21
  'data-garden-id': COMPONENT_ID,
22
- 'data-garden-version': '9.0.0-next.12'
22
+ 'data-garden-version': '9.0.0-next.13'
23
23
  }).withConfig({
24
24
  displayName: "StyledListbox",
25
25
  componentId: "sc-1k13ba7-0"
@@ -5,11 +5,17 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
9
9
 
10
10
  const COMPONENT_ID = 'dropdowns.combobox.separator';
11
- const colorStyles = props => {
12
- const backgroundColor = getColorV8('neutralHue', 200, props.theme);
11
+ const colorStyles = _ref => {
12
+ let {
13
+ theme
14
+ } = _ref;
15
+ const backgroundColor = getColor({
16
+ theme,
17
+ variable: 'border.subtle'
18
+ });
13
19
  return css(["background-color:", ";"], backgroundColor);
14
20
  };
15
21
  const sizeStyles = props => {
@@ -19,7 +25,7 @@ const sizeStyles = props => {
19
25
  };
20
26
  const StyledListboxSeparator = styled.li.attrs({
21
27
  'data-garden-id': COMPONENT_ID,
22
- 'data-garden-version': '9.0.0-next.12'
28
+ 'data-garden-version': '9.0.0-next.13'
23
29
  }).withConfig({
24
30
  displayName: "StyledListboxSeparator",
25
31
  componentId: "sc-1p6toh2-0"
@@ -11,7 +11,7 @@ import { Field } from '@zendeskgarden/react-forms';
11
11
  const COMPONENT_ID = 'dropdowns.combobox.message';
12
12
  const StyledMessage = styled(Field.Message).attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.0.0-next.12'
14
+ 'data-garden-version': '9.0.0-next.13'
15
15
  }).withConfig({
16
16
  displayName: "StyledMessage",
17
17
  componentId: "sc-jux8m5-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'dropdowns.combobox.optgroup';
11
11
  const StyledOptGroup = styled.ul.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.12'
13
+ 'data-garden-version': '9.0.0-next.13'
14
14
  }).withConfig({
15
15
  displayName: "StyledOptGroup",
16
16
  componentId: "sc-1kavqsx-0"
@@ -6,24 +6,45 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { hideVisually, math } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'dropdowns.combobox.option';
12
- const colorStyles = props => {
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme,
15
+ isActive,
16
+ $type
17
+ } = _ref;
13
18
  let backgroundColor;
14
19
  let boxShadow;
15
- if (props.isActive && props.$type !== 'group' && props.$type !== 'header') {
16
- const hue = props.$type === 'danger' ? 'dangerHue' : 'primaryHue';
17
- backgroundColor = getColorV8(hue, 600, props.theme, 0.08);
18
- boxShadow = `inset ${props.theme.rtl ? `-${props.theme.shadowWidths.md}` : props.theme.shadowWidths.md} 0 ${getColorV8(hue, 600, props.theme)}`;
20
+ if (isActive && $type !== 'group' && $type !== 'header') {
21
+ const variable = 'background.primaryEmphasis';
22
+ backgroundColor = getColor({
23
+ theme,
24
+ variable,
25
+ transparency: theme.opacity[100]
26
+ });
27
+ boxShadow = `inset ${theme.rtl ? `-${theme.shadowWidths.md}` : theme.shadowWidths.md} 0 ${getColor({
28
+ theme,
29
+ variable
30
+ })}`;
19
31
  }
20
- const disabledForegroundColor = getColorV8('neutralHue', 400, props.theme);
21
- let foregroundColor = getColorV8('foreground', 600 , props.theme);
22
- if (props.$type === 'add') {
23
- foregroundColor = getColorV8('primaryHue', 600, props.theme);
24
- } else if (props.$type === 'danger') {
25
- foregroundColor = getColorV8('dangerHue', 600, props.theme);
32
+ let foregroundVariable;
33
+ if ($type === 'add') {
34
+ foregroundVariable = 'foreground.primary';
35
+ } else if ($type === 'danger') {
36
+ foregroundVariable = 'foreground.danger';
37
+ } else {
38
+ foregroundVariable = 'foreground.default';
26
39
  }
40
+ const foregroundColor = getColor({
41
+ theme,
42
+ variable: foregroundVariable
43
+ });
44
+ const disabledForegroundColor = getColor({
45
+ theme,
46
+ variable: 'foreground.disabled'
47
+ });
27
48
  return css(["box-shadow:", ";background-color:", ";color:", ";&[aria-disabled='true']{background-color:transparent;color:", ";}"], boxShadow, backgroundColor, foregroundColor, disabledForegroundColor);
28
49
  };
29
50
  const getMinHeight = props => props.theme.space.base * (props.isCompact ? 7 : 9);
@@ -36,7 +57,7 @@ const sizeStyles = props => {
36
57
  };
37
58
  const StyledOption = styled.li.attrs({
38
59
  'data-garden-id': COMPONENT_ID,
39
- 'data-garden-version': '9.0.0-next.12'
60
+ 'data-garden-version': '9.0.0-next.13'
40
61
  }).withConfig({
41
62
  displayName: "StyledOption",
42
63
  componentId: "sc-jl4wn6-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'dropdowns.combobox.option.content';
11
11
  const StyledOptionContent = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.12'
13
+ 'data-garden-version': '9.0.0-next.13'
14
14
  }).withConfig({
15
15
  displayName: "StyledOptionContent",
16
16
  componentId: "sc-121ujpu-0"
@@ -6,9 +6,31 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'dropdowns.combobox.option.icon';
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme,
15
+ $isDisabled,
16
+ $type
17
+ } = _ref;
18
+ let variable;
19
+ if ($isDisabled) {
20
+ variable = 'foreground.disabled';
21
+ } else if ($type === 'danger') {
22
+ variable = 'foreground.danger';
23
+ } else if ($type === 'add') {
24
+ variable = 'foreground.primary';
25
+ } else {
26
+ variable = 'foreground.subtle';
27
+ }
28
+ const color = getColor({
29
+ theme,
30
+ variable
31
+ });
32
+ return css(["color:", ";"], color);
33
+ };
12
34
  const sizeStyles = props => {
13
35
  const size = props.theme.iconSizes.md;
14
36
  const marginTop = math(`(${props.theme.lineHeights.md} - ${size}) / 2`);
@@ -17,11 +39,11 @@ const sizeStyles = props => {
17
39
  };
18
40
  const StyledOptionIcon = styled(StyledBaseIcon).attrs({
19
41
  'data-garden-id': COMPONENT_ID,
20
- 'data-garden-version': '9.0.0-next.12'
42
+ 'data-garden-version': '9.0.0-next.13'
21
43
  }).withConfig({
22
44
  displayName: "StyledOptionIcon",
23
45
  componentId: "sc-qsab3y-0"
24
- })(["flex-shrink:0;", ";", ";"], sizeStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
46
+ })(["flex-shrink:0;", ";", ";", ";"], sizeStyles, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
25
47
  StyledOptionIcon.defaultProps = {
26
48
  theme: DEFAULT_THEME
27
49
  };
@@ -5,11 +5,19 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
9
9
 
10
10
  const COMPONENT_ID = 'dropdowns.combobox.option.meta';
11
- const colorStyles = props => {
12
- const color = getColorV8('neutralHue', props.isDisabled ? 400 : 600, props.theme);
11
+ const colorStyles = _ref => {
12
+ let {
13
+ theme,
14
+ isDisabled
15
+ } = _ref;
16
+ const variable = isDisabled ? 'foreground.disabled' : 'foreground.subtle';
17
+ const color = getColor({
18
+ theme,
19
+ variable
20
+ });
13
21
  return css(["color:", ";"], color);
14
22
  };
15
23
  const sizeStyles = props => {
@@ -19,7 +27,7 @@ const sizeStyles = props => {
19
27
  };
20
28
  const StyledOptionMeta = styled.div.attrs({
21
29
  'data-garden-id': COMPONENT_ID,
22
- 'data-garden-version': '9.0.0-next.12'
30
+ 'data-garden-version': '9.0.0-next.13'
23
31
  }).withConfig({
24
32
  displayName: "StyledOptionMeta",
25
33
  componentId: "sc-j6pu10-0"
@@ -6,19 +6,29 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
10
10
  import { StyledOption, getMinHeight } from './StyledOption.js';
11
11
 
12
12
  const COMPONENT_ID = 'dropdowns.combobox.option.type_icon';
13
- const colorStyles = props => {
14
- const opacity = props.$type && props.$type !== 'danger' ? 1 : 0;
13
+ const colorStyles = _ref => {
14
+ let {
15
+ theme,
16
+ $type
17
+ } = _ref;
18
+ const opacity = $type && $type !== 'danger' ? 1 : 0;
15
19
  let color;
16
- if (props.$type === 'add' || props.$type === 'danger') {
20
+ if ($type === 'add') {
17
21
  color = 'inherit';
18
- } else if (props.$type === 'header' || props.$type === 'next' || props.$type === 'previous') {
19
- color = getColorV8('neutralHue', 600, props.theme);
22
+ } else if ($type === 'header' || $type === 'next' || $type === 'previous') {
23
+ color = getColor({
24
+ theme,
25
+ variable: 'foreground.subtle'
26
+ });
20
27
  } else {
21
- color = getColorV8('primaryHue', 600, props.theme);
28
+ color = getColor({
29
+ theme,
30
+ variable: 'foreground.primary'
31
+ });
22
32
  }
23
33
  return css(["opacity:", ";color:", ";", "[aria-selected='true'] > &{opacity:1;}", "[aria-disabled='true'] > &{color:inherit;}"], opacity, color, StyledOption, StyledOption);
24
34
  };
@@ -36,7 +46,7 @@ const sizeStyles = props => {
36
46
  };
37
47
  const StyledOptionTypeIcon = styled(StyledBaseIcon).attrs({
38
48
  'data-garden-id': COMPONENT_ID,
39
- 'data-garden-version': '9.0.0-next.12'
49
+ 'data-garden-version': '9.0.0-next.13'
40
50
  }).withConfig({
41
51
  displayName: "StyledOptionTypeIcon",
42
52
  componentId: "sc-xpink2-0"
@@ -6,17 +6,20 @@
6
6
  */
7
7
  import styled from 'styled-components';
8
8
  import { hideVisually } from 'polished';
9
- import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { getColor, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
10
10
  import { Tag } from '@zendeskgarden/react-tags';
11
11
 
12
12
  const COMPONENT_ID = 'dropdowns.combobox.tag';
13
13
  const StyledTag = styled(Tag).attrs({
14
14
  'data-garden-id': COMPONENT_ID,
15
- 'data-garden-version': '9.0.0-next.12'
15
+ 'data-garden-version': '9.0.0-next.13'
16
16
  }).withConfig({
17
17
  displayName: "StyledTag",
18
18
  componentId: "sc-1alam0r-0"
19
- })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : getColorV8('neutralHue', 400, props.theme), hideVisually(), props => retrieveComponentStyles(COMPONENT_ID, props));
19
+ })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : getColor({
20
+ theme: props.theme,
21
+ variable: 'foreground.disabled'
22
+ }), hideVisually(), props => retrieveComponentStyles(COMPONENT_ID, props));
20
23
  StyledTag.defaultProps = {
21
24
  theme: DEFAULT_THEME
22
25
  };
@@ -5,18 +5,24 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
9
9
  import { StyledValue } from './StyledValue.js';
10
10
 
11
11
  const COMPONENT_ID = 'dropdowns.combobox.tags_button';
12
- const colorStyles = props => {
13
- const color = getColorV8('primaryHue', 600, props.theme);
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme
15
+ } = _ref;
16
+ const color = getColor({
17
+ theme,
18
+ variable: 'foreground.primary'
19
+ });
14
20
  return css(["color:", ";&:disabled{color:inherit;}"], color);
15
21
  };
16
22
  const StyledTagsButton = styled(StyledValue).attrs({
17
23
  as: 'button',
18
24
  'data-garden-id': COMPONENT_ID,
19
- 'data-garden-version': '9.0.0-next.12'
25
+ 'data-garden-version': '9.0.0-next.13'
20
26
  }).withConfig({
21
27
  displayName: "StyledTagsButton",
22
28
  componentId: "sc-6q5w33-0"