baseui 0.0.0-next-90efe07 → 0.0.0-next-0b9fd6a

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 (63) hide show
  1. package/button/styled-components.js +1 -1
  2. package/button/styled-components.js.flow +1 -1
  3. package/checkbox/styled-components.js +1 -1
  4. package/checkbox/styled-components.js.flow +1 -1
  5. package/datepicker/index.d.ts +1 -1
  6. package/datepicker/index.js +7 -0
  7. package/datepicker/index.js.flow +1 -1
  8. package/es/button/styled-components.js +1 -1
  9. package/es/checkbox/styled-components.js +1 -1
  10. package/es/datepicker/index.js +1 -1
  11. package/es/icon/index.js +1 -1
  12. package/es/input/styled-components.js +8 -2
  13. package/es/input/utils.js +2 -0
  14. package/es/message-card/message-card.js +3 -1
  15. package/es/select/styled-components.js +17 -5
  16. package/es/textarea/styled-components.js +16 -11
  17. package/es/textarea/textarea.js +4 -2
  18. package/es/themes/move-theme/typography.js +36 -0
  19. package/es/themes/shared/borders.js +8 -3
  20. package/es/themes/shared/typography.js +10 -10
  21. package/esm/button/styled-components.js +1 -1
  22. package/esm/checkbox/styled-components.js +1 -1
  23. package/esm/datepicker/index.js +1 -1
  24. package/esm/icon/index.js +1 -1
  25. package/esm/input/styled-components.js +8 -2
  26. package/esm/input/utils.js +2 -0
  27. package/esm/message-card/message-card.js +3 -1
  28. package/esm/select/styled-components.js +17 -5
  29. package/esm/textarea/styled-components.js +7 -5
  30. package/esm/textarea/textarea.js +4 -2
  31. package/esm/themes/move-theme/typography.js +36 -0
  32. package/esm/themes/shared/borders.js +8 -3
  33. package/esm/themes/shared/typography.js +10 -10
  34. package/icon/index.d.ts +1 -1
  35. package/icon/index.js +8 -1
  36. package/icon/index.js.flow +1 -1
  37. package/input/styled-components.js +8 -2
  38. package/input/styled-components.js.flow +9 -2
  39. package/input/types.d.ts +3 -0
  40. package/input/types.js.flow +3 -0
  41. package/input/utils.js +2 -0
  42. package/message-card/message-card.js +3 -1
  43. package/package.json +1 -1
  44. package/select/styled-components.js +17 -5
  45. package/select/styled-components.js.flow +25 -5
  46. package/textarea/styled-components.js +7 -5
  47. package/textarea/textarea.js +4 -2
  48. package/textarea/types.d.ts +3 -0
  49. package/textarea/types.js.flow +3 -1
  50. package/themes/move-theme/typography.d.ts +36 -0
  51. package/themes/move-theme/typography.js +36 -0
  52. package/themes/move-theme/typography.js.flow +12 -0
  53. package/themes/shared/borders.js +8 -3
  54. package/themes/shared/borders.js.flow +7 -3
  55. package/themes/shared/typography.js +10 -10
  56. package/themes/shared/typography.js.flow +10 -10
  57. package/themes/types.d.ts +3 -0
  58. package/themes/types.js.flow +3 -0
  59. package/card/images.d.ts +0 -2
  60. package/card/images.js +0 -17
  61. package/card/images.js.flow +0 -18
  62. package/es/card/images.js +0 -8
  63. package/esm/card/images.js +0 -8
@@ -248,7 +248,7 @@ function getBorderRadiiStyles(_ref9) {
248
248
  } else if ($shape === _constants.SHAPE.circle || $shape === _constants.SHAPE.round) {
249
249
  value = '50%';
250
250
  } else if ($size === _constants.SIZE.mini) {
251
- value = $theme.borders.radius200;
251
+ value = $theme.borders.buttonBorderRadiusMini;
252
252
  }
253
253
 
254
254
  return {
@@ -199,7 +199,7 @@ function getBorderRadiiStyles({ $theme, $size, $shape }) {
199
199
  } else if ($shape === SHAPE.circle || $shape === SHAPE.round) {
200
200
  value = '50%';
201
201
  } else if ($size === SIZE.mini) {
202
- value = $theme.borders.radius200;
202
+ value = $theme.borders.buttonBorderRadiusMini;
203
203
  }
204
204
 
205
205
  return {
@@ -155,7 +155,7 @@ var Checkmark = (0, _styles.styled)('span', function (props) {
155
155
  var tickColor = $disabled ? $theme.colors.tickMarkFillDisabled : $error ? $theme.colors.tickMarkFillError : $theme.colors.tickMarkFill;
156
156
  var indeterminate = encodeURIComponent("\n <svg width=\"14\" height=\"4\" viewBox=\"0 0 14 4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M14 0.5H0V3.5H14V0.5Z\" fill=\"".concat(tickColor, "\"/>\n </svg>\n "));
157
157
  var check = encodeURIComponent("\n <svg width=\"17\" height=\"13\" viewBox=\"0 0 17 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.50002 12.6L0.400024 6.60002L2.60002 4.40002L6.50002 8.40002L13.9 0.900024L16.1 3.10002L6.50002 12.6Z\" fill=\"".concat(tickColor, "\"/>\n </svg>\n "));
158
- var borderRadius = $theme.borders.inputBorderRadius;
158
+ var borderRadius = $theme.borders.checkboxBorderRadius;
159
159
  var borderColor = getBorderColor(props);
160
160
  return {
161
161
  flex: '0 0 auto',
@@ -142,7 +142,7 @@ export const Checkmark = styled<SharedStylePropsT>('span', (props) => {
142
142
  </svg>
143
143
  `);
144
144
 
145
- const borderRadius = $theme.borders.inputBorderRadius;
145
+ const borderRadius = $theme.borders.checkboxBorderRadius;
146
146
  const borderColor = getBorderColor(props);
147
147
 
148
148
  return ({
@@ -5,7 +5,7 @@ export { default as StatefulCalendar } from './stateful-calendar';
5
5
  export { default as Datepicker, default as DatePicker } from './datepicker';
6
6
  export { default as StatefulDatepicker, default as StatefulDatePicker, } from './stateful-datepicker';
7
7
  export { formatDate } from './utils';
8
- export { ORIENTATION, STATE_CHANGE_TYPE } from './constants';
8
+ export { DENSITY, ORIENTATION, STATE_CHANGE_TYPE } from './constants';
9
9
  export * from './styled-components';
10
10
  export * from '../timepicker';
11
11
  export * from '../timezonepicker';
@@ -12,6 +12,7 @@ var _exportNames = {
12
12
  StatefulDatepicker: true,
13
13
  StatefulDatePicker: true,
14
14
  formatDate: true,
15
+ DENSITY: true,
15
16
  ORIENTATION: true,
16
17
  STATE_CHANGE_TYPE: true
17
18
  };
@@ -21,6 +22,12 @@ Object.defineProperty(exports, "Calendar", {
21
22
  return _calendar.default;
22
23
  }
23
24
  });
25
+ Object.defineProperty(exports, "DENSITY", {
26
+ enumerable: true,
27
+ get: function get() {
28
+ return _constants.DENSITY;
29
+ }
30
+ });
24
31
  Object.defineProperty(exports, "DatePicker", {
25
32
  enumerable: true,
26
33
  get: function get() {
@@ -18,7 +18,7 @@ export { default as TimezonePicker } from '../timezonepicker/timezone-picker.js'
18
18
  // Util functions
19
19
  export { formatDate } from './utils/index.js';
20
20
  // Constants
21
- export { ORIENTATION, STATE_CHANGE_TYPE } from './constants.js';
21
+ export { DENSITY, ORIENTATION, STATE_CHANGE_TYPE } from './constants.js';
22
22
  // Styled elements
23
23
  export * from './styled-components.js';
24
24
  // Flow
@@ -245,7 +245,7 @@ function getBorderRadiiStyles({
245
245
  } else if ($shape === SHAPE.circle || $shape === SHAPE.round) {
246
246
  value = '50%';
247
247
  } else if ($size === SIZE.mini) {
248
- value = $theme.borders.radius200;
248
+ value = $theme.borders.buttonBorderRadiusMini;
249
249
  }
250
250
 
251
251
  return {
@@ -180,7 +180,7 @@ export const Checkmark = styled('span', props => {
180
180
  <path d="M6.50002 12.6L0.400024 6.60002L2.60002 4.40002L6.50002 8.40002L13.9 0.900024L16.1 3.10002L6.50002 12.6Z" fill="${tickColor}"/>
181
181
  </svg>
182
182
  `);
183
- const borderRadius = $theme.borders.inputBorderRadius;
183
+ const borderRadius = $theme.borders.checkboxBorderRadius;
184
184
  const borderColor = getBorderColor(props);
185
185
  return {
186
186
  flex: '0 0 auto',
@@ -12,7 +12,7 @@ export { default as StatefulDatepicker, default as StatefulDatePicker } from './
12
12
 
13
13
  export { formatDate } from './utils'; // Constants
14
14
 
15
- export { ORIENTATION, STATE_CHANGE_TYPE } from './constants'; // Styled elements
15
+ export { DENSITY, ORIENTATION, STATE_CHANGE_TYPE } from './constants'; // Styled elements
16
16
 
17
17
  export * from './styled-components'; // Dependency components and their types
18
18
 
package/es/icon/index.js CHANGED
@@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the
5
5
  LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { default as Icon } from './icon';
8
- export { Svg as StyledSvg } from './styled-components';
8
+ export { Svg as StyledSvg, getSvgStyles } from './styled-components';
9
9
  export * from './icon-exports';
10
10
  export * from './types';
11
11
  /** @deprecated use StyledComponentArgs instead. To be removed in future versions.*/
@@ -163,7 +163,13 @@ function getRootColors($disabled, $isFocused, $error, $positive = false, colors)
163
163
  };
164
164
  }
165
165
 
166
- function getRootBorderRadius(radius) {
166
+ function getRootBorderRadius(size, borders) {
167
+ let radius = borders.inputBorderRadius;
168
+
169
+ if (size === SIZE.mini) {
170
+ radius = borders.inputBorderRadiusMini;
171
+ }
172
+
167
173
  return {
168
174
  borderTopLeftRadius: radius,
169
175
  borderBottomLeftRadius: radius,
@@ -206,7 +212,7 @@ export const getRootStyles = props => {
206
212
  transitionProperty: 'border',
207
213
  transitionDuration: animation.timing200,
208
214
  transitionTimingFunction: animation.easeOutCurve,
209
- ...getRootBorderRadius(borders.inputBorderRadius),
215
+ ...getRootBorderRadius($size, borders),
210
216
  ...getFont($size, typography),
211
217
  ...getRootColors($disabled, $isFocused, $error, $positive, colors),
212
218
  ...getRootPadding($adjoined, $size, sizing, $theme.direction, $hasIconTrailing)
package/es/input/utils.js CHANGED
@@ -12,6 +12,7 @@ export function getSharedProps(props, state) {
12
12
  adjoined,
13
13
  size,
14
14
  required,
15
+ resize,
15
16
  readOnly
16
17
  } = props;
17
18
  const {
@@ -25,6 +26,7 @@ export function getSharedProps(props, state) {
25
26
  $adjoined: adjoined,
26
27
  $size: size,
27
28
  $required: required,
29
+ $resize: resize,
28
30
  $isReadOnly: readOnly
29
31
  };
30
32
  }
@@ -82,11 +82,12 @@ const MessageCard = ({
82
82
  $imageLayout: layout
83
83
  }, RootProps), image && /*#__PURE__*/React.createElement(Image, _extends({
84
84
  role: "img",
85
- ariaLabel: ariaLabel,
85
+ "aria-label": ariaLabel,
86
86
  $src: src,
87
87
  $imageLayout: layout,
88
88
  $backgroundPosition: backgroundPosition
89
89
  }, ImageProps)), /*#__PURE__*/React.createElement(ContentContainer, ContentContainerProps, heading && /*#__PURE__*/React.createElement(HeadingContainer, HeadingContainerProps, heading), paragraph && /*#__PURE__*/React.createElement(ParagraphContainer, ParagraphContainerProps, paragraph), buttonLabel && /*#__PURE__*/React.createElement(Button, _extends({
90
+ $as: "div",
90
91
  kind: buttonKind,
91
92
  shape: SHAPE.pill,
92
93
  size: SIZE.compact,
@@ -96,6 +97,7 @@ const MessageCard = ({
96
97
  overrides: {
97
98
  BaseButton: {
98
99
  style: {
100
+ textAlign: 'center',
99
101
  pointerEvents: 'none',
100
102
  ...(buttonKind === BUTTON_KIND.tertiary ? {
101
103
  marginTop: theme.sizing.scale100,
@@ -19,6 +19,21 @@ function getFont(size = SIZE.default, typography) {
19
19
  }[size];
20
20
  }
21
21
 
22
+ function getBorderRadius(size, borders) {
23
+ let radius = borders.inputBorderRadius;
24
+
25
+ if (size === SIZE.mini) {
26
+ radius = borders.inputBorderRadiusMini;
27
+ }
28
+
29
+ return {
30
+ borderTopLeftRadius: radius,
31
+ borderBottomLeftRadius: radius,
32
+ borderTopRightRadius: radius,
33
+ borderBottomRightRadius: radius
34
+ };
35
+ }
36
+
22
37
  function getControlPadding(props) {
23
38
  const {
24
39
  $theme,
@@ -170,17 +185,14 @@ export const StyledControlContainer = styled('div', props => {
170
185
  $isPseudoFocused,
171
186
  $type,
172
187
  $searchable,
188
+ $size,
173
189
  $theme: {
174
190
  borders,
175
191
  colors,
176
192
  animation
177
193
  }
178
194
  } = props;
179
- return {
180
- borderTopLeftRadius: borders.inputBorderRadius,
181
- borderTopRightRadius: borders.inputBorderRadius,
182
- borderBottomRightRadius: borders.inputBorderRadius,
183
- borderBottomLeftRadius: borders.inputBorderRadius,
195
+ return { ...getBorderRadius($size, borders),
184
196
  boxSizing: 'border-box',
185
197
  overflow: 'hidden',
186
198
  width: '100%',
@@ -7,23 +7,28 @@ LICENSE file in the root directory of this source tree.
7
7
  import { styled } from '../styles';
8
8
  import { getInputStyles, getInputContainerStyles, getRootStyles } from '../input/styled-components';
9
9
  export const StyledTextAreaRoot = styled('div', props => {
10
- return getRootStyles({
11
- $positive: false,
12
- ...props,
13
- $hasIconTrailing: false
14
- });
10
+ return { ...getRootStyles({
11
+ $positive: false,
12
+ ...props,
13
+ $hasIconTrailing: false
14
+ }),
15
+ width: props.$resize ? 'fit-content' : '100%'
16
+ };
15
17
  });
16
18
  StyledTextAreaRoot.displayName = "StyledTextAreaRoot";
17
19
  StyledTextAreaRoot.displayName = 'StyledTextAreaRoot';
18
- export const StyledTextareaContainer = styled('div', props => ({ ...getInputContainerStyles({
20
+ export const StyledTextareaContainer = styled('div', props => {
21
+ return getInputContainerStyles({
19
22
  $positive: false,
20
23
  ...props
21
- })
22
- }));
24
+ });
25
+ });
23
26
  StyledTextareaContainer.displayName = "StyledTextareaContainer";
24
27
  StyledTextareaContainer.displayName = 'StyledTextareaContainer';
25
- export const StyledTextarea = styled('textarea', props => ({ ...getInputStyles(props),
26
- resize: 'none'
27
- }));
28
+ export const StyledTextarea = styled('textarea', props => {
29
+ return { ...getInputStyles(props),
30
+ resize: props.$resize || 'none'
31
+ };
32
+ });
28
33
  StyledTextarea.displayName = "StyledTextarea";
29
34
  StyledTextarea.displayName = 'StyledTextarea';
@@ -60,12 +60,14 @@ class Textarea extends React.Component {
60
60
  $disabled: this.props.disabled,
61
61
  $error: this.props.error,
62
62
  $positive: this.props.positive,
63
- $required: this.props.required
63
+ $required: this.props.required,
64
+ $resize: this.props.resize
64
65
  }, rootProps), /*#__PURE__*/React.createElement(BaseInput, _extends({}, this.props, {
65
66
  type: CUSTOM_INPUT_TYPE.textarea,
66
67
  overrides: inputOverrides,
67
68
  onFocus: this.onFocus,
68
- onBlur: this.onBlur
69
+ onBlur: this.onBlur,
70
+ resize: this.props.resize
69
71
  })));
70
72
  }
71
73
 
@@ -22,6 +22,24 @@ export const typography = {
22
22
  font1150: {
23
23
  fontFamily: secondaryFontFamily
24
24
  },
25
+ font1050: {
26
+ fontFamily: secondaryFontFamily
27
+ },
28
+ font950: {
29
+ fontFamily: secondaryFontFamily
30
+ },
31
+ font850: {
32
+ fontFamily: secondaryFontFamily
33
+ },
34
+ font750: {
35
+ fontFamily: secondaryFontFamily
36
+ },
37
+ font650: {
38
+ fontFamily: secondaryFontFamily
39
+ },
40
+ font550: {
41
+ fontFamily: secondaryFontFamily
42
+ },
25
43
  DisplayLarge: {
26
44
  fontFamily: secondaryFontFamily
27
45
  },
@@ -34,6 +52,24 @@ export const typography = {
34
52
  DisplayXSmall: {
35
53
  fontFamily: secondaryFontFamily
36
54
  },
55
+ HeadingXXLarge: {
56
+ fontFamily: secondaryFontFamily
57
+ },
58
+ HeadingXLarge: {
59
+ fontFamily: secondaryFontFamily
60
+ },
61
+ HeadingLarge: {
62
+ fontFamily: secondaryFontFamily
63
+ },
64
+ HeadingMedium: {
65
+ fontFamily: secondaryFontFamily
66
+ },
67
+ HeadingSmall: {
68
+ fontFamily: secondaryFontFamily
69
+ },
70
+ HeadingXSmall: {
71
+ fontFamily: secondaryFontFamily
72
+ },
37
73
  MonoParagraphXSmall: {
38
74
  fontFamily: monoFontFamily
39
75
  },
@@ -47,13 +47,18 @@ const borders = {
47
47
  useRoundedCorners: true,
48
48
 
49
49
  /** Button, ButtonGroup */
50
+ buttonBorderRadiusMini: '4px',
50
51
  buttonBorderRadius: '8px',
51
52
 
52
- /** Input, Select, Textarea, Checkbox */
53
- inputBorderRadius: '0px',
53
+ /** Checkbox */
54
+ checkboxBorderRadius: '0px',
55
+
56
+ /** Input, Select, Textarea */
57
+ inputBorderRadiusMini: '4px',
58
+ inputBorderRadius: '8px',
54
59
 
55
60
  /** Popover, Menu, Tooltip */
56
- popoverBorderRadius: '0px',
61
+ popoverBorderRadius: '8px',
57
62
 
58
63
  /** Card, Datepicker, Modal, Toast, Notification */
59
64
  surfaceBorderRadius: '0px',
@@ -60,61 +60,61 @@ export default ((fontTokens = defaultFontTokens) => {
60
60
  const font550 = {
61
61
  fontFamily: fontTokens.primaryFontFamily,
62
62
  fontSize: '20px',
63
- fontWeight: 500,
63
+ fontWeight: 700,
64
64
  lineHeight: '28px'
65
65
  };
66
66
  const font650 = {
67
67
  fontFamily: fontTokens.primaryFontFamily,
68
68
  fontSize: '24px',
69
- fontWeight: 500,
69
+ fontWeight: 700,
70
70
  lineHeight: '32px'
71
71
  };
72
72
  const font750 = {
73
73
  fontFamily: fontTokens.primaryFontFamily,
74
74
  fontSize: '28px',
75
- fontWeight: 500,
75
+ fontWeight: 700,
76
76
  lineHeight: '36px'
77
77
  };
78
78
  const font850 = {
79
79
  fontFamily: fontTokens.primaryFontFamily,
80
80
  fontSize: '32px',
81
- fontWeight: 500,
81
+ fontWeight: 700,
82
82
  lineHeight: '40px'
83
83
  };
84
84
  const font950 = {
85
85
  fontFamily: fontTokens.primaryFontFamily,
86
86
  fontSize: '36px',
87
- fontWeight: 500,
87
+ fontWeight: 700,
88
88
  lineHeight: '44px'
89
89
  };
90
90
  const font1050 = {
91
91
  fontFamily: fontTokens.primaryFontFamily,
92
92
  fontSize: '40px',
93
- fontWeight: 500,
93
+ fontWeight: 700,
94
94
  lineHeight: '52px'
95
95
  };
96
96
  const font1150 = {
97
97
  fontFamily: fontTokens.primaryFontFamily,
98
98
  fontSize: '36px',
99
- fontWeight: 500,
99
+ fontWeight: 700,
100
100
  lineHeight: '44px'
101
101
  };
102
102
  const font1250 = {
103
103
  fontFamily: fontTokens.primaryFontFamily,
104
104
  fontSize: '44px',
105
- fontWeight: 500,
105
+ fontWeight: 700,
106
106
  lineHeight: '52px'
107
107
  };
108
108
  const font1350 = {
109
109
  fontFamily: fontTokens.primaryFontFamily,
110
110
  fontSize: '52px',
111
- fontWeight: 500,
111
+ fontWeight: 700,
112
112
  lineHeight: '64px'
113
113
  };
114
114
  const font1450 = {
115
115
  fontFamily: fontTokens.primaryFontFamily,
116
116
  fontSize: '96px',
117
- fontWeight: 500,
117
+ fontWeight: 700,
118
118
  lineHeight: '112px'
119
119
  };
120
120
  return {
@@ -240,7 +240,7 @@ function getBorderRadiiStyles(_ref9) {
240
240
  } else if ($shape === SHAPE.circle || $shape === SHAPE.round) {
241
241
  value = '50%';
242
242
  } else if ($size === SIZE.mini) {
243
- value = $theme.borders.radius200;
243
+ value = $theme.borders.buttonBorderRadiusMini;
244
244
  }
245
245
 
246
246
  return {
@@ -153,7 +153,7 @@ export var Checkmark = styled('span', function (props) {
153
153
  var tickColor = $disabled ? $theme.colors.tickMarkFillDisabled : $error ? $theme.colors.tickMarkFillError : $theme.colors.tickMarkFill;
154
154
  var indeterminate = encodeURIComponent("\n <svg width=\"14\" height=\"4\" viewBox=\"0 0 14 4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M14 0.5H0V3.5H14V0.5Z\" fill=\"".concat(tickColor, "\"/>\n </svg>\n "));
155
155
  var check = encodeURIComponent("\n <svg width=\"17\" height=\"13\" viewBox=\"0 0 17 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.50002 12.6L0.400024 6.60002L2.60002 4.40002L6.50002 8.40002L13.9 0.900024L16.1 3.10002L6.50002 12.6Z\" fill=\"".concat(tickColor, "\"/>\n </svg>\n "));
156
- var borderRadius = $theme.borders.inputBorderRadius;
156
+ var borderRadius = $theme.borders.checkboxBorderRadius;
157
157
  var borderColor = getBorderColor(props);
158
158
  return {
159
159
  flex: '0 0 auto',
@@ -12,7 +12,7 @@ export { default as StatefulDatepicker, default as StatefulDatePicker } from './
12
12
 
13
13
  export { formatDate } from './utils'; // Constants
14
14
 
15
- export { ORIENTATION, STATE_CHANGE_TYPE } from './constants'; // Styled elements
15
+ export { DENSITY, ORIENTATION, STATE_CHANGE_TYPE } from './constants'; // Styled elements
16
16
 
17
17
  export * from './styled-components'; // Dependency components and their types
18
18
 
package/esm/icon/index.js CHANGED
@@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the
5
5
  LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { default as Icon } from './icon';
8
- export { Svg as StyledSvg } from './styled-components';
8
+ export { Svg as StyledSvg, getSvgStyles } from './styled-components';
9
9
  export * from './icon-exports';
10
10
  export * from './types';
11
11
  /** @deprecated use StyledComponentArgs instead. To be removed in future versions.*/
@@ -160,7 +160,13 @@ function getRootColors($disabled, $isFocused, $error) {
160
160
  };
161
161
  }
162
162
 
163
- function getRootBorderRadius(radius) {
163
+ function getRootBorderRadius(size, borders) {
164
+ var radius = borders.inputBorderRadius;
165
+
166
+ if (size === SIZE.mini) {
167
+ radius = borders.inputBorderRadiusMini;
168
+ }
169
+
164
170
  return {
165
171
  borderTopLeftRadius: radius,
166
172
  borderBottomLeftRadius: radius,
@@ -200,7 +206,7 @@ export var getRootStyles = function getRootStyles(props) {
200
206
  transitionProperty: 'border',
201
207
  transitionDuration: animation.timing200,
202
208
  transitionTimingFunction: animation.easeOutCurve
203
- }, getRootBorderRadius(borders.inputBorderRadius)), getFont($size, typography)), getRootColors($disabled, $isFocused, $error, $positive, colors)), getRootPadding($adjoined, $size, sizing, $theme.direction, $hasIconTrailing));
209
+ }, getRootBorderRadius($size, borders)), getFont($size, typography)), getRootColors($disabled, $isFocused, $error, $positive, colors)), getRootPadding($adjoined, $size, sizing, $theme.direction, $hasIconTrailing));
204
210
  };
205
211
  export var Root = styled('div', getRootStyles);
206
212
  Root.displayName = "Root";
@@ -11,6 +11,7 @@ export function getSharedProps(props, state) {
11
11
  adjoined = props.adjoined,
12
12
  size = props.size,
13
13
  required = props.required,
14
+ resize = props.resize,
14
15
  readOnly = props.readOnly;
15
16
  var isFocused = state.isFocused;
16
17
  return {
@@ -21,6 +22,7 @@ export function getSharedProps(props, state) {
21
22
  $adjoined: adjoined,
22
23
  $size: size,
23
24
  $required: required,
25
+ $resize: resize,
24
26
  $isReadOnly: readOnly
25
27
  };
26
28
  }
@@ -137,11 +137,12 @@ var MessageCard = function MessageCard(_ref2) {
137
137
  $imageLayout: layout
138
138
  }, RootProps), image && /*#__PURE__*/React.createElement(Image, _extends({
139
139
  role: "img",
140
- ariaLabel: ariaLabel,
140
+ "aria-label": ariaLabel,
141
141
  $src: src,
142
142
  $imageLayout: layout,
143
143
  $backgroundPosition: backgroundPosition
144
144
  }, ImageProps)), /*#__PURE__*/React.createElement(ContentContainer, ContentContainerProps, heading && /*#__PURE__*/React.createElement(HeadingContainer, HeadingContainerProps, heading), paragraph && /*#__PURE__*/React.createElement(ParagraphContainer, ParagraphContainerProps, paragraph), buttonLabel && /*#__PURE__*/React.createElement(Button, _extends({
145
+ $as: "div",
145
146
  kind: buttonKind,
146
147
  shape: SHAPE.pill,
147
148
  size: SIZE.compact,
@@ -151,6 +152,7 @@ var MessageCard = function MessageCard(_ref2) {
151
152
  overrides: {
152
153
  BaseButton: {
153
154
  style: _objectSpread({
155
+ textAlign: 'center',
154
156
  pointerEvents: 'none'
155
157
  }, buttonKind === BUTTON_KIND.tertiary ? {
156
158
  marginTop: theme.sizing.scale100,
@@ -24,6 +24,21 @@ function getFont() {
24
24
  return (_SIZE$mini$SIZE$compa = {}, _defineProperty(_SIZE$mini$SIZE$compa, SIZE.mini, typography.font100), _defineProperty(_SIZE$mini$SIZE$compa, SIZE.compact, typography.font200), _defineProperty(_SIZE$mini$SIZE$compa, SIZE.default, typography.font300), _defineProperty(_SIZE$mini$SIZE$compa, SIZE.large, typography.font400), _SIZE$mini$SIZE$compa)[size];
25
25
  }
26
26
 
27
+ function getBorderRadius(size, borders) {
28
+ var radius = borders.inputBorderRadius;
29
+
30
+ if (size === SIZE.mini) {
31
+ radius = borders.inputBorderRadiusMini;
32
+ }
33
+
34
+ return {
35
+ borderTopLeftRadius: radius,
36
+ borderBottomLeftRadius: radius,
37
+ borderTopRightRadius: radius,
38
+ borderBottomRightRadius: radius
39
+ };
40
+ }
41
+
27
42
  function getControlPadding(props) {
28
43
  var _SIZE$mini, _SIZE$compact, _SIZE$default, _SIZE$large, _SIZE$mini$SIZE$compa2;
29
44
 
@@ -154,15 +169,12 @@ export var StyledControlContainer = styled('div', function (props) {
154
169
  $isPseudoFocused = props.$isPseudoFocused,
155
170
  $type = props.$type,
156
171
  $searchable = props.$searchable,
172
+ $size = props.$size,
157
173
  _props$$theme = props.$theme,
158
174
  borders = _props$$theme.borders,
159
175
  colors = _props$$theme.colors,
160
176
  animation = _props$$theme.animation;
161
- return _objectSpread({
162
- borderTopLeftRadius: borders.inputBorderRadius,
163
- borderTopRightRadius: borders.inputBorderRadius,
164
- borderBottomRightRadius: borders.inputBorderRadius,
165
- borderBottomLeftRadius: borders.inputBorderRadius,
177
+ return _objectSpread(_objectSpread({}, getBorderRadius($size, borders)), {}, {
166
178
  boxSizing: 'border-box',
167
179
  overflow: 'hidden',
168
180
  width: '100%',
@@ -13,24 +13,26 @@ LICENSE file in the root directory of this source tree.
13
13
  import { styled } from '../styles';
14
14
  import { getInputStyles, getInputContainerStyles, getRootStyles } from '../input/styled-components';
15
15
  export var StyledTextAreaRoot = styled('div', function (props) {
16
- return getRootStyles(_objectSpread(_objectSpread({
16
+ return _objectSpread(_objectSpread({}, getRootStyles(_objectSpread(_objectSpread({
17
17
  $positive: false
18
18
  }, props), {}, {
19
19
  $hasIconTrailing: false
20
- }));
20
+ }))), {}, {
21
+ width: props.$resize ? 'fit-content' : '100%'
22
+ });
21
23
  });
22
24
  StyledTextAreaRoot.displayName = "StyledTextAreaRoot";
23
25
  StyledTextAreaRoot.displayName = 'StyledTextAreaRoot';
24
26
  export var StyledTextareaContainer = styled('div', function (props) {
25
- return _objectSpread({}, getInputContainerStyles(_objectSpread({
27
+ return getInputContainerStyles(_objectSpread({
26
28
  $positive: false
27
- }, props)));
29
+ }, props));
28
30
  });
29
31
  StyledTextareaContainer.displayName = "StyledTextareaContainer";
30
32
  StyledTextareaContainer.displayName = 'StyledTextareaContainer';
31
33
  export var StyledTextarea = styled('textarea', function (props) {
32
34
  return _objectSpread(_objectSpread({}, getInputStyles(props)), {}, {
33
- resize: 'none'
35
+ resize: props.$resize || 'none'
34
36
  });
35
37
  });
36
38
  StyledTextarea.displayName = "StyledTextarea";
@@ -116,12 +116,14 @@ var Textarea = /*#__PURE__*/function (_React$Component) {
116
116
  $disabled: this.props.disabled,
117
117
  $error: this.props.error,
118
118
  $positive: this.props.positive,
119
- $required: this.props.required
119
+ $required: this.props.required,
120
+ $resize: this.props.resize
120
121
  }, rootProps), /*#__PURE__*/React.createElement(BaseInput, _extends({}, this.props, {
121
122
  type: CUSTOM_INPUT_TYPE.textarea,
122
123
  overrides: inputOverrides,
123
124
  onFocus: this.onFocus,
124
- onBlur: this.onBlur
125
+ onBlur: this.onBlur,
126
+ resize: this.props.resize
125
127
  })));
126
128
  }
127
129
  }]);