carbon-react 104.9.0 → 104.11.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.
Files changed (34) hide show
  1. package/lib/components/advanced-color-picker/advanced-color-picker.style.d.ts +7 -1
  2. package/lib/components/dialog/dialog.component.d.ts +9 -2
  3. package/lib/components/dialog/dialog.component.js +12 -4
  4. package/lib/components/dialog/dialog.config.d.ts +3 -0
  5. package/lib/components/dialog/dialog.config.js +8 -2
  6. package/lib/components/dialog/dialog.d.ts +11 -1
  7. package/lib/components/dialog/dialog.style.d.ts +4 -1
  8. package/lib/components/dialog/dialog.style.js +66 -19
  9. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js +3 -0
  10. package/lib/components/icon/icon.component.js +1 -1
  11. package/lib/components/pager/pager.style.js +3 -1
  12. package/lib/components/search/search.style.js +31 -40
  13. package/lib/components/select/__internal__/select-list-context.d.ts +3 -0
  14. package/lib/components/select/__internal__/select-list-context.js +15 -0
  15. package/lib/components/select/__internal__/select-text/select-text.component.d.ts +30 -0
  16. package/lib/components/select/__internal__/select-text/select-text.component.js +111 -0
  17. package/lib/components/select/__internal__/select-text/select-text.d.ts +34 -0
  18. package/lib/components/select/__internal__/select-text/select-text.style.d.ts +2 -0
  19. package/lib/components/select/__internal__/select-text/select-text.style.js +65 -0
  20. package/lib/components/select/filterable-select/filterable-select.component.js +7 -4
  21. package/lib/components/select/multi-select/multi-select.component.js +23 -7
  22. package/lib/components/select/multi-select/multi-select.style.d.ts +1 -0
  23. package/lib/components/select/multi-select/multi-select.style.js +5 -1
  24. package/lib/components/select/option/option.component.js +32 -8
  25. package/lib/components/select/option-row/option-row.component.js +23 -6
  26. package/lib/components/select/select-list/select-list.component.js +36 -23
  27. package/lib/components/select/select-textbox/select-textbox.component.d.ts +113 -26
  28. package/lib/components/select/select-textbox/select-textbox.component.js +82 -3
  29. package/lib/components/select/select-textbox/select-textbox.d.ts +8 -2
  30. package/lib/components/select/select.style.js +10 -7
  31. package/lib/components/select/simple-select/simple-select.component.js +13 -20
  32. package/lib/style/themes/base/base-theme.config.d.ts +7 -0
  33. package/lib/style/themes/sage/index.d.ts +7 -0
  34. package/package.json +2 -2
@@ -2,7 +2,7 @@ export const StyledAdvancedColorPickerWrapper: import("styled-components").Style
2
2
  import StyledAdvancedColorPickerCell from "./advanced-color-picker-cell.style";
3
3
  export const StyledAdvancedColorPickerPreview: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export const DialogStyle: import("styled-components").StyledComponent<{
5
- ({ className, children, open, height, size, title, disableEscKey, subtitle, disableAutoFocus, focusFirstElement, onCancel, showCloseIcon, bespokeFocusTrap, disableClose, help, role, ...rest }: {
5
+ ({ className, children, open, height, size, title, disableEscKey, subtitle, disableAutoFocus, focusFirstElement, onCancel, showCloseIcon, bespokeFocusTrap, disableClose, help, role, contentPadding, ...rest }: {
6
6
  [x: string]: any;
7
7
  className: any;
8
8
  children: any;
@@ -20,6 +20,7 @@ export const DialogStyle: import("styled-components").StyledComponent<{
20
20
  disableClose: any;
21
21
  help: any;
22
22
  role?: string | undefined;
23
+ contentPadding?: {} | undefined;
23
24
  }): JSX.Element;
24
25
  propTypes: {
25
26
  "aria-describedby": import("prop-types").Requireable<string>;
@@ -43,6 +44,11 @@ export const DialogStyle: import("styled-components").StyledComponent<{
43
44
  disableAutoFocus: import("prop-types").Requireable<boolean>;
44
45
  bespokeFocusTrap: import("prop-types").Requireable<(...args: any[]) => any>;
45
46
  role: import("prop-types").Requireable<string>;
47
+ contentPadding: import("prop-types").Requireable<import("prop-types").InferProps<{
48
+ p: import("prop-types").Requireable<number>;
49
+ px: import("prop-types").Requireable<number>;
50
+ py: import("prop-types").Requireable<number>;
51
+ }>>;
46
52
  };
47
53
  defaultProps: {
48
54
  size: string;
@@ -1,5 +1,5 @@
1
1
  export default Dialog;
2
- declare function Dialog({ className, children, open, height, size, title, disableEscKey, subtitle, disableAutoFocus, focusFirstElement, onCancel, showCloseIcon, bespokeFocusTrap, disableClose, help, role, ...rest }: {
2
+ declare function Dialog({ className, children, open, height, size, title, disableEscKey, subtitle, disableAutoFocus, focusFirstElement, onCancel, showCloseIcon, bespokeFocusTrap, disableClose, help, role, contentPadding, ...rest }: {
3
3
  [x: string]: any;
4
4
  className: any;
5
5
  children: any;
@@ -17,6 +17,7 @@ declare function Dialog({ className, children, open, height, size, title, disabl
17
17
  disableClose: any;
18
18
  help: any;
19
19
  role?: string | undefined;
20
+ contentPadding?: {} | undefined;
20
21
  }): JSX.Element;
21
22
  declare namespace Dialog {
22
23
  const propTypes: {
@@ -28,7 +29,7 @@ declare namespace Dialog {
28
29
  */
29
30
  "aria-label": PropTypes.Requireable<string>;
30
31
  /**
31
- * Prop to specify the aria-labeledby property of the Dialog component
32
+ * Prop to specify the aria-labelledby property of the Dialog component
32
33
  * To be used when the title prop is a custom React Node,
33
34
  * or the component is labelled by an internal element other than the title.
34
35
  */
@@ -71,6 +72,12 @@ declare namespace Dialog {
71
72
  bespokeFocusTrap: PropTypes.Requireable<(...args: any[]) => any>;
72
73
  /** The ARIA role to be applied to the Dialog container */
73
74
  role: PropTypes.Requireable<string>;
75
+ /** Padding to be set on the Dialog content */
76
+ contentPadding: PropTypes.Requireable<PropTypes.InferProps<{
77
+ p: PropTypes.Requireable<number>;
78
+ px: PropTypes.Requireable<number>;
79
+ py: PropTypes.Requireable<number>;
80
+ }>>;
74
81
  };
75
82
  namespace defaultProps {
76
83
  const size: string;
@@ -56,6 +56,7 @@ const Dialog = ({
56
56
  disableClose,
57
57
  help,
58
58
  role = "dialog",
59
+ contentPadding = {},
59
60
  ...rest
60
61
  }) => {
61
62
  const locale = (0, _useLocale.default)();
@@ -190,9 +191,9 @@ const Dialog = ({
190
191
  "data-element": "dialog",
191
192
  "data-role": rest["data-role"],
192
193
  role: role
193
- }), dialogTitle(), /*#__PURE__*/_react.default.createElement(_dialog.DialogContentStyle, null, /*#__PURE__*/_react.default.createElement(_dialog.DialogInnerContentStyle, {
194
+ }, contentPadding), dialogTitle(), /*#__PURE__*/_react.default.createElement(_dialog.DialogContentStyle, contentPadding, /*#__PURE__*/_react.default.createElement(_dialog.DialogInnerContentStyle, _extends({
194
195
  ref: innerContentRef
195
- }, _react.default.Children.map(children, child => {
196
+ }, contentPadding), _react.default.Children.map(children, child => {
196
197
  if ((child === null || child === void 0 ? void 0 : child.type) === _form.default) {
197
198
  return /*#__PURE__*/_react.default.cloneElement(child, {
198
199
  dialogRef
@@ -214,7 +215,7 @@ Dialog.propTypes = {
214
215
  "aria-label": _propTypes.default.string,
215
216
 
216
217
  /**
217
- * Prop to specify the aria-labeledby property of the Dialog component
218
+ * Prop to specify the aria-labelledby property of the Dialog component
218
219
  * To be used when the title prop is a custom React Node,
219
220
  * or the component is labelled by an internal element other than the title.
220
221
  */
@@ -272,7 +273,14 @@ Dialog.propTypes = {
272
273
  bespokeFocusTrap: _propTypes.default.func,
273
274
 
274
275
  /** The ARIA role to be applied to the Dialog container */
275
- role: _propTypes.default.string
276
+ role: _propTypes.default.string,
277
+
278
+ /** Padding to be set on the Dialog content */
279
+ contentPadding: _propTypes.default.shape({
280
+ p: _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
281
+ px: _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
282
+ py: _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8])
283
+ })
276
284
  };
277
285
  Dialog.defaultProps = {
278
286
  size: "medium",
@@ -1,2 +1,5 @@
1
1
  export const DIALOG_SIZES: string[];
2
2
  export const TOP_MARGIN: 20;
3
+ export const CONTENT_TOP_PADDING: 24;
4
+ export const HORIZONTAL_PADDING: 32;
5
+ export const CONTENT_BOTTOM_PADDING: 30;
@@ -3,8 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TOP_MARGIN = exports.DIALOG_SIZES = void 0;
6
+ exports.CONTENT_BOTTOM_PADDING = exports.HORIZONTAL_PADDING = exports.CONTENT_TOP_PADDING = exports.TOP_MARGIN = exports.DIALOG_SIZES = void 0;
7
7
  const DIALOG_SIZES = ["extra-small", "small", "medium-small", "medium", "medium-large", "large", "extra-large"];
8
8
  exports.DIALOG_SIZES = DIALOG_SIZES;
9
9
  const TOP_MARGIN = 20;
10
- exports.TOP_MARGIN = TOP_MARGIN;
10
+ exports.TOP_MARGIN = TOP_MARGIN;
11
+ const CONTENT_TOP_PADDING = 24;
12
+ exports.CONTENT_TOP_PADDING = CONTENT_TOP_PADDING;
13
+ const HORIZONTAL_PADDING = 32;
14
+ exports.HORIZONTAL_PADDING = HORIZONTAL_PADDING;
15
+ const CONTENT_BOTTOM_PADDING = 30;
16
+ exports.CONTENT_BOTTOM_PADDING = CONTENT_BOTTOM_PADDING;
@@ -1,6 +1,14 @@
1
1
  import * as React from "react";
2
2
  import { ModalProps } from "../modal/modal";
3
3
 
4
+ type PaddingValues = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
5
+
6
+ interface ContentPaddingInterface {
7
+ p?: PaddingValues;
8
+ py?: PaddingValues;
9
+ px?: PaddingValues;
10
+ }
11
+
4
12
  export type DialogSizes =
5
13
  | "auto"
6
14
  | "extra-small"
@@ -20,7 +28,7 @@ export interface DialogProps extends ModalProps {
20
28
  */
21
29
  "aria-label"?: string;
22
30
  /**
23
- * Prop to specify the aria-labeledby property of the Dialog component
31
+ * Prop to specify the aria-labelledby property of the Dialog component
24
32
  * To be used when the title prop is a custom React Node,
25
33
  * or the component is labelled by an internal element other than the title.
26
34
  */
@@ -49,6 +57,8 @@ export interface DialogProps extends ModalProps {
49
57
  title?: React.ReactNode;
50
58
  /** The ARIA role to be applied to the Dialog container */
51
59
  role?: string;
60
+ /** Padding to be set on the Dialog content */
61
+ contentPadding?: ContentPaddingInterface;
52
62
  }
53
63
 
54
64
  declare function Dialog(props: DialogProps): JSX.Element;
@@ -1,4 +1,7 @@
1
1
  export const DialogStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  export const DialogTitleStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export const DialogContentStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export const DialogInnerContentStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export const DialogInnerContentStyle: import("styled-components").StyledComponent<"div", any, {
5
+ py: any;
6
+ p: any;
7
+ }, never>;
@@ -7,12 +7,18 @@ exports.DialogInnerContentStyle = exports.DialogContentStyle = exports.DialogTit
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
+ var _styledSystem = require("styled-system");
11
+
12
+ var _base = _interopRequireDefault(require("../../style/themes/base"));
13
+
10
14
  var _form = require("../form/form.style");
11
15
 
12
16
  var _heading = require("../heading/heading.style");
13
17
 
14
18
  var _iconButton = _interopRequireDefault(require("../icon-button/icon-button.style"));
15
19
 
20
+ var _dialog = require("./dialog.config");
21
+
16
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
23
 
18
24
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
@@ -29,8 +35,51 @@ const dialogSizes = {
29
35
  large: "960px",
30
36
  "extra-large": "1080px"
31
37
  };
32
- const HORIZONTAL_PADDING = 35;
33
- const CONTENT_BOTTOM_PADDING = 30;
38
+
39
+ const calculateWidthValue = props => {
40
+ const {
41
+ paddingLeft,
42
+ paddingRight,
43
+ padding
44
+ } = (0, _styledSystem.padding)(props);
45
+ const paddingValue = paddingLeft ?? paddingRight ?? padding;
46
+ return paddingValue === undefined ? _dialog.HORIZONTAL_PADDING * 2 : paddingValue * 2;
47
+ };
48
+
49
+ const calculateFormSpacingValues = (props, isFormContent) => {
50
+ const {
51
+ paddingTop,
52
+ paddingBottom,
53
+ paddingLeft,
54
+ paddingRight,
55
+ padding
56
+ } = (0, _styledSystem.padding)(props);
57
+ const spacingTopValue = paddingTop ?? padding ?? _dialog.CONTENT_TOP_PADDING;
58
+ const spacingRightValue = paddingRight ?? padding ?? _dialog.HORIZONTAL_PADDING;
59
+ const spacingBottomValue = paddingBottom ?? padding ?? _dialog.CONTENT_BOTTOM_PADDING;
60
+ const spacingLeftValue = paddingLeft ?? padding ?? _dialog.HORIZONTAL_PADDING;
61
+ return {
62
+ "margin-left": spacingLeftValue ? `-${spacingLeftValue}px` : spacingLeftValue,
63
+ "margin-right": spacingRightValue ? `-${spacingRightValue}px` : spacingRightValue,
64
+ ...(isFormContent && {
65
+ "margin-top": spacingTopValue ? `-${spacingTopValue}px` : spacingTopValue,
66
+ "padding-top": spacingTopValue,
67
+ "padding-bottom": spacingBottomValue,
68
+ "padding-left": spacingLeftValue,
69
+ "padding-right": spacingRightValue
70
+ }),
71
+ ...(!isFormContent && {
72
+ "margin-bottom": spacingBottomValue ? `-${spacingBottomValue}px` : spacingBottomValue,
73
+ bottom: spacingBottomValue ? `-${spacingBottomValue}px` : spacingBottomValue
74
+ })
75
+ };
76
+ };
77
+
78
+ const calculatePaddingTopInnerContent = ({
79
+ py,
80
+ p
81
+ }) => [py, p].some(padding => padding !== undefined) ? 0 : `${_dialog.CONTENT_TOP_PADDING}px`;
82
+
34
83
  const DialogStyle = _styledComponents.default.div`
35
84
  background-color: var(--colorsUtilityMajor025);
36
85
  box-shadow: var(--boxShadow300);
@@ -62,7 +111,7 @@ const DialogStyle = _styledComponents.default.div`
62
111
  dialogHeight
63
112
  }) => dialogHeight && (0, _styledComponents.css)`
64
113
  height: ${dialogHeight}px;
65
- `};
114
+ `}
66
115
 
67
116
  ${_form.StyledForm} {
68
117
  padding-bottom: 0px;
@@ -70,21 +119,12 @@ const DialogStyle = _styledComponents.default.div`
70
119
  }
71
120
 
72
121
  ${_form.StyledFormContent}.sticky {
73
- padding-right: ${HORIZONTAL_PADDING}px;
74
- padding-left: ${HORIZONTAL_PADDING}px;
75
- padding-top: 20px;
76
- margin-right: -${HORIZONTAL_PADDING}px;
77
- margin-left: -${HORIZONTAL_PADDING}px;
78
- margin-top: -20px;
122
+ ${props => calculateFormSpacingValues(props, true)}
79
123
  }
80
124
 
81
125
  ${_form.StyledFormFooter}.sticky {
82
- margin-left: -${HORIZONTAL_PADDING}px;
83
- bottom: -${CONTENT_BOTTOM_PADDING}px;
84
- margin-bottom: -${CONTENT_BOTTOM_PADDING}px;
85
- width: calc(100% + ${2 * HORIZONTAL_PADDING}px);
86
- padding-left: ${HORIZONTAL_PADDING}px;
87
- padding-right: ${HORIZONTAL_PADDING}px;
126
+ width: calc(100% + ${calculateWidthValue}px);
127
+ ${props => calculateFormSpacingValues(props, false)}
88
128
  }
89
129
 
90
130
  > ${_iconButton.default} {
@@ -101,7 +141,7 @@ const DialogStyle = _styledComponents.default.div`
101
141
  `;
102
142
  exports.DialogStyle = DialogStyle;
103
143
  const DialogTitleStyle = _styledComponents.default.div`
104
- padding: 23px ${HORIZONTAL_PADDING}px 0;
144
+ padding: 23px ${_dialog.HORIZONTAL_PADDING}px 0;
105
145
  border-bottom: 1px solid #ccd6db;
106
146
  ${({
107
147
  showCloseIcon
@@ -133,12 +173,19 @@ const DialogContentStyle = _styledComponents.default.div`
133
173
  overflow-y: auto;
134
174
  width: 100%;
135
175
  flex: 1;
136
- padding: 0px ${HORIZONTAL_PADDING}px ${CONTENT_BOTTOM_PADDING}px;
176
+ padding: 0px ${_dialog.HORIZONTAL_PADDING}px ${_dialog.CONTENT_BOTTOM_PADDING}px;
177
+ ${_styledSystem.padding}
137
178
  `;
138
179
  exports.DialogContentStyle = DialogContentStyle;
139
180
  const DialogInnerContentStyle = _styledComponents.default.div`
140
- padding-top: 20px;
141
181
  position: relative;
142
182
  flex: 1;
183
+ padding-top: ${calculatePaddingTopInnerContent};
143
184
  `;
144
- exports.DialogInnerContentStyle = DialogInnerContentStyle;
185
+ exports.DialogInnerContentStyle = DialogInnerContentStyle;
186
+ DialogStyle.defaultProps = {
187
+ theme: _base.default
188
+ };
189
+ DialogContentStyle.defaultProps = {
190
+ theme: _base.default
191
+ };
@@ -109,7 +109,10 @@ const FlatTableBodyDraggable = ({
109
109
  };
110
110
 
111
111
  FlatTableBodyDraggable.propTypes = {
112
+ /** Callback fired when order is changed */
112
113
  getOrder: _propTypes.default.func,
114
+
115
+ /** Array of FlatTableRow. */
113
116
  children: _propTypes.default.node.isRequired
114
117
  };
115
118
  var _default = FlatTableBodyDraggable;
@@ -121,7 +121,7 @@ const Icon = /*#__PURE__*/_react.default.forwardRef(({
121
121
 
122
122
  if (tooltipMessage) {
123
123
  const showTooltip = tooltipVisibleFromContext !== undefined ? tooltipVisibleFromContext : tooltipVisible;
124
- const visible = disabled ? false : showTooltip;
124
+ const visible = disabled ? undefined : showTooltip;
125
125
  return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
126
126
  message: tooltipMessage,
127
127
  position: tooltipPositionFromContext || tooltipPosition,
@@ -15,6 +15,8 @@ var _inputIconToggle = _interopRequireDefault(require("../../__internal__/input-
15
15
 
16
16
  var _base = _interopRequireDefault(require("../../style/themes/base"));
17
17
 
18
+ var _selectText = _interopRequireDefault(require("../select/__internal__/select-text/select-text.style"));
19
+
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
21
 
20
22
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
@@ -108,7 +110,7 @@ const StyledPagerSizeOptions = _styledComponents.default.div`
108
110
  min-width: 10px;
109
111
  margin: 0px 4px;
110
112
 
111
- ${_input.default} {
113
+ ${_selectText.default} {
112
114
  font-size: 14px;
113
115
  padding-right: 0px;
114
116
  padding-left: 8px;
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.StyledButtonIcon = exports.StyledSearchButton = exports.default = void 0;
7
7
 
8
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
-
10
8
  var _styledSystem = require("styled-system");
11
9
 
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+
12
12
  var _inputIconToggle = _interopRequireDefault(require("../../__internal__/input-icon-toggle/input-icon-toggle.style"));
13
13
 
14
14
  var _inputPresentation = _interopRequireDefault(require("../../__internal__/input/input-presentation.style"));
@@ -40,7 +40,7 @@ const StyledSearch = _styledComponents.default.div`
40
40
  variant
41
41
  }) => {
42
42
  const darkVariant = variant === "dark";
43
- const variantColor = darkVariant ? `${theme.search.darkVariantBorder}` : `${theme.search.passive}`;
43
+ const variantColor = darkVariant ? "var(--colorsUtilityMajor200)" : "var(--colorsUtilityMajor300)";
44
44
  const iconColor = darkVariant && (searchHasValue && isFocused || !searchHasValue && isFocused || !isFocused && searchHasValue && showSearchButton);
45
45
  return (0, _styledComponents.css)`
46
46
  ${_styledSystem.margin}
@@ -52,52 +52,53 @@ const StyledSearch = _styledComponents.default.div`
52
52
  font-size: 14px;
53
53
  font-weight: 700;
54
54
  :hover {
55
- border-bottom-color: ${theme.search.active};
55
+ border-bottom-color: ${darkVariant ? "var(--colorsUtilityMajor100)" : "var(--colorsUtilityMajor400)"};
56
56
  cursor: pointer;
57
57
  }
58
58
  ${(isFocused || searchHasValue) && (0, _styledComponents.css)`
59
59
  border-color: transparent;
60
60
  transition: background 0.2s ease;
61
- color: ${theme.icon.defaultHover};
62
61
  :hover {
63
62
  border-color: transparent;
64
63
  }
65
64
  `}
66
65
  ${isFocused && !searchIsActive && (0, _styledComponents.css)`
67
66
  border-color: transparent;
68
- color: ${theme.icon.defaultHover};
69
67
  `}
70
68
  ${!isFocused && searchHasValue && !showSearchButton && (0, _styledComponents.css)`
71
69
  border-bottom: 2px solid ${variantColor};
72
70
  :hover {
73
- border-bottom-color: ${theme.search.active};
71
+ border-bottom-color: var(--colorsUtilityMajor400);
74
72
  cursor: pointer;
75
73
  }
76
74
  `}
77
75
 
78
76
  ${_input.default} {
77
+ ::-moz-placeholder {
78
+ color: var(--colorsUtilityYin055);
79
+ opacity: 1;
80
+ }
81
+ ::placeholder {
82
+ color: var(--colorsUtilityYin055);
83
+ }
84
+
79
85
  ${darkVariant && !isFocused && (0, _styledComponents.css)`
80
86
  ::-moz-placeholder {
81
- color: ${theme.search.darkVariantPlaceholder};
87
+ color: var(--colorsUtilityMajor200);
82
88
  opacity: 1;
83
89
  }
84
90
  ::placeholder {
85
- color: ${theme.search.darkVariantPlaceholder};
91
+ color: var(--colorsUtilityMajor200);
86
92
  }
87
93
  `}
88
94
 
89
- ${darkVariant && (0, _styledComponents.css)`
90
- ${!isFocused && searchHasValue && !showSearchButton && (0, _styledComponents.css)`
91
- color: ${theme.search.darkVariantText};
92
- `}
93
- ${!isFocused && !searchHasValue && (0, _styledComponents.css)`
94
- color: ${theme.search.darkVariantPlaceholder};
95
- `}
95
+ ${darkVariant && !isFocused && searchHasValue && !showSearchButton && (0, _styledComponents.css)`
96
+ color: var(--colorsUtilityYang100);
96
97
  `}
97
98
  }
98
99
 
99
100
  ${_inputPresentation.default} {
100
- background-color: ${searchHasValue || isFocused ? `${theme.colors.white}` : "transparent"};
101
+ background-color: ${searchHasValue || isFocused ? "var(--colorsUtilityYang100)" : "transparent"};
101
102
  flex: 1;
102
103
  font-size: 14px;
103
104
  font-weight: 700;
@@ -106,11 +107,10 @@ const StyledSearch = _styledComponents.default.div`
106
107
  cursor: pointer;
107
108
  ${!isFocused && !searchHasValue && (0, _styledComponents.css)`
108
109
  border: 1px solid transparent;
109
- color: ${theme.icon.default};
110
110
  `}
111
111
  ${!isFocused && searchHasValue && !showSearchButton && (0, _styledComponents.css)`
112
112
  border: 1px solid transparent;
113
- background-color: ${darkVariant ? "transparent" : `${theme.colors.white}`};
113
+ background-color: ${darkVariant ? "transparent" : "var(--colorsUtilityYang100)"};
114
114
  `}
115
115
  }
116
116
 
@@ -118,24 +118,19 @@ const StyledSearch = _styledComponents.default.div`
118
118
  flex: 1;
119
119
  z-index: ${theme.zIndex.smallOverlay};
120
120
  }
121
- ${_button.default} {
122
- background-color: ${theme.search.button};
123
- cursor: pointer;
124
- color: ${theme.colors.white};
125
- }
126
121
  ${_icon.default} {
127
- color: ${iconColor ? `${theme.search.icon}` : `${theme.search.iconDarkVariant}`};
122
+ color: ${iconColor ? "var(--colorsUtilityMajor400)" : "var(--colorsUtilityMajor200)"};
128
123
  ${!darkVariant && (0, _styledComponents.css)`
129
- color: ${theme.search.icon};
124
+ color: var(--colorsUtilityMajor400);
130
125
  `}
131
126
 
132
127
  width: 20px;
133
128
  height: 20px;
134
129
  cursor: pointer;
135
130
  :hover {
136
- color: ${iconColor ? `${theme.search.iconHover}` : `${theme.search.iconDarkVariantHover}`};
131
+ color: ${iconColor ? "var(--colorsUtilityMajor500)" : "var(--colorsUtilityMajor100)"};
137
132
  ${!darkVariant && (0, _styledComponents.css)`
138
- color: ${theme.search.iconHover};
133
+ color: var(--colorsUtilityMajor500);
139
134
  `}
140
135
  }
141
136
  }
@@ -156,17 +151,13 @@ exports.default = _default;
156
151
  const StyledSearchButton = _styledComponents.default.div`
157
152
  display: inline-flex;
158
153
  border-bottom: none;
159
- &&& ${_button.default} {
160
- ${({
161
- theme
162
- }) => (0, _styledComponents.css)`
163
- background-color: ${theme.colors.primary};
164
- border-color: ${theme.colors.primary};
165
- :hover {
166
- background: ${theme.colors.secondary};
167
- border-color: ${theme.colors.secondary};
168
- }
169
- `}
154
+ & ${_button.default} {
155
+ background-color: var(--colorsActionMajor500);
156
+ border-color: var(--colorsActionMajorTransparent);
157
+ :hover {
158
+ background: var(--colorsActionMajor600);
159
+ border-color: var(--colorsActionMajorTransparent);
160
+ }
170
161
 
171
162
  width: 40px;
172
163
  margin: 0px 0px;
@@ -181,7 +172,7 @@ const StyledSearchButton = _styledComponents.default.div`
181
172
  exports.StyledSearchButton = StyledSearchButton;
182
173
  const StyledButtonIcon = _styledComponents.default.div`
183
174
  &&& ${_icon.default} {
184
- color: white;
175
+ color: var(--colorsActionMajorYang100);
185
176
  margin-right: 0px;
186
177
  }
187
178
  `;
@@ -0,0 +1,3 @@
1
+ export default SelectListContext;
2
+ declare const SelectListContext: React.Context<{}>;
3
+ import React from "react";
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const SelectListContext = /*#__PURE__*/_react.default.createContext({});
13
+
14
+ var _default = SelectListContext;
15
+ exports.default = _default;
@@ -0,0 +1,30 @@
1
+ export default SelectText;
2
+ declare function SelectText({ disabled, formattedValue, onClick, onKeyDown, onFocus, onBlur, onMouseDown, placeholder, readOnly, textId, transparent, }: {
3
+ disabled: any;
4
+ formattedValue: any;
5
+ onClick: any;
6
+ onKeyDown: any;
7
+ onFocus: any;
8
+ onBlur: any;
9
+ onMouseDown: any;
10
+ placeholder: any;
11
+ readOnly: any;
12
+ textId: any;
13
+ transparent: any;
14
+ }): JSX.Element;
15
+ declare namespace SelectText {
16
+ namespace propTypes {
17
+ const disabled: PropTypes.Requireable<boolean>;
18
+ const formattedValue: PropTypes.Requireable<string>;
19
+ const onBlur: PropTypes.Requireable<(...args: any[]) => any>;
20
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
21
+ const onFocus: PropTypes.Requireable<(...args: any[]) => any>;
22
+ const onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
23
+ const onMouseDown: PropTypes.Requireable<(...args: any[]) => any>;
24
+ const placeholder: PropTypes.Requireable<string>;
25
+ const readOnly: PropTypes.Requireable<boolean>;
26
+ const transparent: PropTypes.Requireable<boolean>;
27
+ const textId: PropTypes.Requireable<string>;
28
+ }
29
+ }
30
+ import PropTypes from "prop-types";