baseui 0.0.0-alpha-3479e57 → 0.0.0-alpha-8ab2335

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 (199) hide show
  1. package/accordion/types.d.ts +2 -2
  2. package/app-nav-bar/types.d.ts +2 -2
  3. package/aspect-ratio-box/aspect-ratio-box-body.d.ts +1 -1
  4. package/aspect-ratio-box/types.d.ts +1 -1
  5. package/badge/styled-components.js +4 -4
  6. package/badge/styled-components.js.flow +4 -4
  7. package/badge/types.d.ts +2 -2
  8. package/banner/index.d.ts +1 -1
  9. package/banner/styled-components.js +4 -1
  10. package/banner/types.d.ts +3 -4
  11. package/block/types.d.ts +3 -4
  12. package/breadcrumbs/styled-components.js +2 -1
  13. package/button/styled-components.js +2 -0
  14. package/button/styled-components.js.flow +2 -0
  15. package/button/types.d.ts +4 -5
  16. package/button-group/types.d.ts +4 -5
  17. package/checkbox/styled-components.js +1 -1
  18. package/checkbox/styled-components.js.flow +1 -1
  19. package/checkbox/types.d.ts +36 -37
  20. package/combobox/types.d.ts +4 -5
  21. package/data-table/measure-column-widths.js +3 -3
  22. package/data-table/types.d.ts +4 -5
  23. package/datepicker/index.d.ts +1 -1
  24. package/datepicker/index.js +7 -0
  25. package/datepicker/index.js.flow +1 -1
  26. package/datepicker/types.d.ts +2 -2
  27. package/divider/types.d.ts +1 -1
  28. package/dnd-list/types.d.ts +2 -2
  29. package/drawer/types.d.ts +2 -2
  30. package/es/badge/styled-components.js +4 -4
  31. package/es/banner/styled-components.js +4 -1
  32. package/es/breadcrumbs/styled-components.js +2 -1
  33. package/es/button/styled-components.js +2 -0
  34. package/es/checkbox/styled-components.js +1 -1
  35. package/es/data-table/measure-column-widths.js +3 -3
  36. package/es/datepicker/index.js +1 -1
  37. package/es/file-uploader/file-uploader.js +82 -78
  38. package/es/icon/index.js +1 -1
  39. package/es/input/base-input.js +8 -12
  40. package/es/input/input.js +9 -13
  41. package/es/input/styled-components.js +8 -2
  42. package/es/input/utils.js +2 -0
  43. package/es/list/styled-components.js +2 -0
  44. package/es/menu/index.js +1 -1
  45. package/es/menu/menu.js +7 -1
  46. package/es/menu/styled-components.js +18 -1
  47. package/es/message-card/message-card.js +4 -2
  48. package/es/popover/popover.js +1 -0
  49. package/es/popover/stateful-container.js +4 -1
  50. package/es/select/default-props.js +1 -1
  51. package/es/select/styled-components.js +17 -5
  52. package/es/table-semantic/styled-components.js +0 -1
  53. package/es/tabs-motion/styled-components.js +23 -1
  54. package/es/tabs-motion/tabs.js +29 -5
  55. package/es/textarea/styled-components.js +16 -11
  56. package/es/textarea/textarea.js +13 -15
  57. package/es/themes/dark-theme/color-component-tokens.js +1 -1
  58. package/es/themes/light-theme/color-component-tokens.js +1 -1
  59. package/es/themes/move-theme/typography.js +36 -0
  60. package/es/themes/shared/borders.js +8 -3
  61. package/es/timezonepicker/timezone-picker.js +5 -1
  62. package/es/timezonepicker/tzdata.js +1 -1
  63. package/es/timezonepicker/update-tzdata.js +11 -6
  64. package/esm/badge/styled-components.js +4 -4
  65. package/esm/banner/styled-components.js +4 -1
  66. package/esm/breadcrumbs/styled-components.js +2 -1
  67. package/esm/button/styled-components.js +2 -0
  68. package/esm/checkbox/styled-components.js +1 -1
  69. package/esm/data-table/measure-column-widths.js +3 -3
  70. package/esm/datepicker/index.js +1 -1
  71. package/esm/file-uploader/file-uploader.js +87 -83
  72. package/esm/icon/index.js +1 -1
  73. package/esm/input/base-input.js +8 -12
  74. package/esm/input/input.js +9 -13
  75. package/esm/input/styled-components.js +8 -2
  76. package/esm/input/utils.js +2 -0
  77. package/esm/list/styled-components.js +2 -0
  78. package/esm/menu/index.js +1 -1
  79. package/esm/menu/menu.js +10 -1
  80. package/esm/menu/styled-components.js +19 -1
  81. package/esm/message-card/message-card.js +4 -2
  82. package/esm/popover/popover.js +1 -0
  83. package/esm/popover/stateful-container.js +4 -1
  84. package/esm/select/default-props.js +1 -1
  85. package/esm/select/styled-components.js +17 -5
  86. package/esm/table-semantic/styled-components.js +0 -1
  87. package/esm/tabs-motion/styled-components.js +60 -39
  88. package/esm/tabs-motion/tabs.js +85 -57
  89. package/esm/textarea/styled-components.js +7 -5
  90. package/esm/textarea/textarea.js +13 -15
  91. package/esm/themes/dark-theme/color-component-tokens.js +1 -1
  92. package/esm/themes/light-theme/color-component-tokens.js +1 -1
  93. package/esm/themes/move-theme/typography.js +36 -0
  94. package/esm/themes/shared/borders.js +8 -3
  95. package/esm/timezonepicker/timezone-picker.js +6 -2
  96. package/esm/timezonepicker/tzdata.js +1 -1
  97. package/esm/timezonepicker/update-tzdata.js +51 -39
  98. package/file-uploader/file-uploader.js +87 -83
  99. package/flex-grid/types.d.ts +1 -1
  100. package/form-control/types.d.ts +1 -1
  101. package/heading/types.d.ts +1 -1
  102. package/helpers/types.d.ts +1 -1
  103. package/icon/index.d.ts +1 -1
  104. package/icon/index.js +8 -1
  105. package/icon/index.js.flow +1 -1
  106. package/icon/types.d.ts +1 -1
  107. package/input/base-input.js +8 -12
  108. package/input/base-input.js.flow +4 -8
  109. package/input/input.js +9 -13
  110. package/input/input.js.flow +5 -9
  111. package/input/styled-components.js +8 -2
  112. package/input/styled-components.js.flow +9 -2
  113. package/input/types.d.ts +16 -14
  114. package/input/types.js.flow +3 -0
  115. package/input/utils.js +2 -0
  116. package/layer/types.d.ts +2 -2
  117. package/layout-grid/types.d.ts +2 -2
  118. package/list/styled-components.js +2 -0
  119. package/list/types.d.ts +2 -2
  120. package/locale/en_US.d.ts +1 -1
  121. package/locale/es_AR.d.ts +1 -1
  122. package/locale/tr_TR.d.ts +1 -1
  123. package/map-marker/types.d.ts +5 -5
  124. package/map-marker/types.js.flow +3 -3
  125. package/menu/index.d.ts +2 -3
  126. package/menu/index.js +8 -1
  127. package/menu/index.js.flow +1 -0
  128. package/menu/menu.js +9 -0
  129. package/menu/menu.js.flow +11 -1
  130. package/menu/styled-components.d.ts +1 -0
  131. package/menu/styled-components.js +21 -2
  132. package/menu/styled-components.js.flow +13 -0
  133. package/menu/types.d.ts +13 -13
  134. package/menu/types.js.flow +1 -0
  135. package/message-card/message-card.js +4 -2
  136. package/message-card/types.d.ts +1 -1
  137. package/modal/types.d.ts +2 -2
  138. package/package.json +2 -2
  139. package/pagination/types.d.ts +2 -2
  140. package/phone-input/types.d.ts +5 -6
  141. package/pin-code/types.d.ts +2 -2
  142. package/popover/popover.js +1 -0
  143. package/popover/stateful-container.js +5 -1
  144. package/popover/types.d.ts +2 -2
  145. package/progress-bar/styled-components.d.ts +4 -1
  146. package/progress-bar/types.d.ts +2 -2
  147. package/radio/types.d.ts +19 -20
  148. package/select/default-props.js +1 -1
  149. package/select/styled-components.js +17 -5
  150. package/select/styled-components.js.flow +25 -5
  151. package/select/types.d.ts +5 -6
  152. package/side-navigation/types.d.ts +4 -4
  153. package/slider/types.d.ts +1 -1
  154. package/snackbar/types.d.ts +3 -4
  155. package/spinner/types.d.ts +1 -1
  156. package/styles/styled.d.ts +1 -1
  157. package/table/types.d.ts +2 -2
  158. package/table-semantic/styled-components.js +0 -1
  159. package/table-semantic/types.d.ts +2 -2
  160. package/tabs/types.d.ts +2 -2
  161. package/tabs-motion/styled-components.d.ts +5 -0
  162. package/tabs-motion/styled-components.js +63 -40
  163. package/tabs-motion/styled-components.js.flow +21 -0
  164. package/tabs-motion/tabs.d.ts +1 -1
  165. package/tabs-motion/tabs.js +85 -56
  166. package/tabs-motion/tabs.js.flow +69 -38
  167. package/tabs-motion/types.d.ts +5 -2
  168. package/tabs-motion/types.js.flow +3 -0
  169. package/tabs-motion/utils.d.ts +1 -1
  170. package/tag/types.d.ts +4 -5
  171. package/textarea/styled-components.js +7 -5
  172. package/textarea/textarea.js +13 -15
  173. package/textarea/textarea.js.flow +5 -9
  174. package/textarea/types.d.ts +6 -5
  175. package/textarea/types.js.flow +3 -1
  176. package/themes/dark-theme/color-component-tokens.js +1 -1
  177. package/themes/dark-theme/color-component-tokens.js.flow +1 -1
  178. package/themes/light-theme/color-component-tokens.js +1 -1
  179. package/themes/light-theme/color-component-tokens.js.flow +1 -1
  180. package/themes/move-theme/typography.d.ts +36 -0
  181. package/themes/move-theme/typography.js +36 -0
  182. package/themes/move-theme/typography.js.flow +12 -0
  183. package/themes/shared/borders.js +8 -3
  184. package/themes/shared/borders.js.flow +7 -3
  185. package/themes/types.d.ts +3 -0
  186. package/themes/types.js.flow +3 -0
  187. package/timezonepicker/timezone-picker.js +6 -2
  188. package/timezonepicker/types.d.ts +1 -0
  189. package/timezonepicker/types.js.flow +1 -0
  190. package/timezonepicker/tzdata.js +1 -1
  191. package/timezonepicker/update-tzdata.js +51 -39
  192. package/toast/types.d.ts +2 -2
  193. package/tree-view/types.d.ts +3 -4
  194. package/utils/focusVisible.d.ts +1 -1
  195. package/card/images.d.ts +0 -2
  196. package/card/images.js +0 -17
  197. package/card/images.js.flow +0 -18
  198. package/es/card/images.js +0 -8
  199. package/esm/card/images.js +0 -8
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
- import { STATE_CHANGE_TYPE } from './constants';
3
+ import type { STATE_CHANGE_TYPE } from './constants';
4
4
  export declare type AccordionState = {
5
5
  expanded: Array<React.Key>;
6
6
  };
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { POSITION } from './constants';
1
+ import type * as React from 'react';
2
+ import type { POSITION } from './constants';
3
3
  import type { Override } from '../helpers/overrides';
4
4
  export declare type AppNavBarOverrides = {
5
5
  Root?: Override;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { StyledBlockProps, BlockProps } from '../block';
2
+ import type { StyledBlockProps, BlockProps } from '../block';
3
3
  interface AspectRatioBoxBodyComponentType<D extends React.ElementType> {
4
4
  <C extends React.ElementType = D>(props: BlockProps<C> & Omit<StyledBlockProps & React.ComponentProps<C>, keyof BlockProps>): JSX.Element;
5
5
  displayName?: string;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { BlockProps } from '../block';
3
3
  export declare type AspectRatioBoxProps<T extends React.ElementType = React.ElementType> = {
4
4
  /** Aspect ratio is width divided by height. */
@@ -24,19 +24,19 @@ function getColorStyles(_ref) {
24
24
  $hierarchy = _ref.$hierarchy,
25
25
  $color = _ref.$color;
26
26
  var COLOR_STYLES = (_COLOR_STYLES = {}, _defineProperty(_COLOR_STYLES, _constants.HIERARCHY.primary, (_HIERARCHY$primary = {}, _defineProperty(_HIERARCHY$primary, _constants.COLOR.accent, {
27
- color: $theme.colors.contentInversePrimary,
27
+ color: $theme.colors.contentOnColor,
28
28
  backgroundColor: $theme.colors.backgroundAccent
29
29
  }), _defineProperty(_HIERARCHY$primary, _constants.COLOR.primary, {
30
30
  color: $theme.colors.contentInversePrimary,
31
31
  backgroundColor: $theme.colors.backgroundInversePrimary
32
32
  }), _defineProperty(_HIERARCHY$primary, _constants.COLOR.positive, {
33
- color: $theme.colors.contentInversePrimary,
33
+ color: $theme.colors.contentOnColor,
34
34
  backgroundColor: $theme.colors.backgroundPositive
35
35
  }), _defineProperty(_HIERARCHY$primary, _constants.COLOR.negative, {
36
- color: $theme.colors.contentInversePrimary,
36
+ color: $theme.colors.contentOnColor,
37
37
  backgroundColor: $theme.colors.backgroundNegative
38
38
  }), _defineProperty(_HIERARCHY$primary, _constants.COLOR.warning, {
39
- color: $theme.colors.primaryA,
39
+ color: $theme.colors.contentOnColorInverse,
40
40
  backgroundColor: $theme.colors.backgroundWarning
41
41
  }), _HIERARCHY$primary)), _defineProperty(_COLOR_STYLES, _constants.HIERARCHY.secondary, (_HIERARCHY$secondary = {}, _defineProperty(_HIERARCHY$secondary, _constants.COLOR.accent, {
42
42
  color: $theme.colors.contentAccent,
@@ -16,7 +16,7 @@ function getColorStyles({ $theme, $hierarchy, $color }): {|
16
16
  const COLOR_STYLES = {
17
17
  [HIERARCHY.primary]: {
18
18
  [COLOR.accent]: {
19
- color: $theme.colors.contentInversePrimary,
19
+ color: $theme.colors.contentOnColor,
20
20
  backgroundColor: $theme.colors.backgroundAccent,
21
21
  },
22
22
  [COLOR.primary]: {
@@ -24,15 +24,15 @@ function getColorStyles({ $theme, $hierarchy, $color }): {|
24
24
  backgroundColor: $theme.colors.backgroundInversePrimary,
25
25
  },
26
26
  [COLOR.positive]: {
27
- color: $theme.colors.contentInversePrimary,
27
+ color: $theme.colors.contentOnColor,
28
28
  backgroundColor: $theme.colors.backgroundPositive,
29
29
  },
30
30
  [COLOR.negative]: {
31
- color: $theme.colors.contentInversePrimary,
31
+ color: $theme.colors.contentOnColor,
32
32
  backgroundColor: $theme.colors.backgroundNegative,
33
33
  },
34
34
  [COLOR.warning]: {
35
- color: $theme.colors.primaryA,
35
+ color: $theme.colors.contentOnColorInverse,
36
36
  backgroundColor: $theme.colors.backgroundWarning,
37
37
  },
38
38
  },
package/badge/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { HIERARCHY, SHAPE, COLOR, PLACEMENT, ROLE } from './constants';
1
+ import type * as React from 'react';
2
+ import type { HIERARCHY, SHAPE, COLOR, PLACEMENT, ROLE } from './constants';
3
3
  import type { Override } from '../helpers/overrides';
4
4
  export declare type Hierarchy = typeof HIERARCHY[keyof typeof HIERARCHY];
5
5
  export declare type Shape = typeof SHAPE[keyof typeof SHAPE];
package/banner/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ActionContent, ArtworkContent, BannerProps } from './types';
1
+ import type { ActionContent, ArtworkContent, BannerProps } from './types';
2
2
  export { Banner } from './banner';
3
3
  export * from './constants';
4
4
  export * from './styled-components';
@@ -32,7 +32,10 @@ var StyledRoot = (0, _styles.styled)('div', function (_ref) {
32
32
  gridColumnGap: $theme.sizing.scale600,
33
33
  gridTemplateColumns: 'min-content auto min-content',
34
34
  gridTemplateRows: 'auto min-content',
35
- margin: $theme.sizing.scale600
35
+ marginTop: $theme.sizing.scale600,
36
+ marginRight: $theme.sizing.scale600,
37
+ marginBottom: $theme.sizing.scale600,
38
+ marginLeft: $theme.sizing.scale600
36
39
  };
37
40
  });
38
41
  exports.StyledRoot = StyledRoot;
package/banner/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
- import { ACTION_POSITION, ARTWORK_TYPE, HIERARCHY, KIND } from './constants';
4
- import type { SyntheticEvent } from 'react';
3
+ import type { ACTION_POSITION, ARTWORK_TYPE, HIERARCHY, KIND } from './constants';
5
4
  export declare type ActionPosition = typeof ACTION_POSITION[keyof typeof ACTION_POSITION];
6
5
  export declare type ArtworkType = typeof ARTWORK_TYPE[keyof typeof ARTWORK_TYPE];
7
6
  export declare type Hierarchy = typeof HIERARCHY[keyof typeof HIERARCHY];
@@ -11,7 +10,7 @@ export declare type ActionContent = {
11
10
  icon?: (a: {
12
11
  size: string;
13
12
  }) => React.ReactNode;
14
- onClick: (a: SyntheticEvent<HTMLButtonElement>) => unknown;
13
+ onClick: (a: React.SyntheticEvent<HTMLButtonElement>) => unknown;
15
14
  position?: ActionPosition;
16
15
  };
17
16
  export declare type ArtworkContent = {
package/block/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import type { ElementType, ReactNode } from 'react';
1
+ import type * as React from 'react';
2
2
  import type { StyleObject } from 'styletron-standard';
3
3
  import type { Override } from '../helpers/overrides';
4
- import * as React from 'react';
5
4
  export declare type BlockOverrides = {
6
5
  Block?: Override;
7
6
  };
@@ -20,8 +19,8 @@ declare type Position = 'static' | 'absolute' | 'relative' | 'fixed' | 'sticky';
20
19
  declare type Overflow = 'visible' | 'hidden' | 'scroll' | 'scrollX' | 'scrollY' | 'auto' | 'inherit' | 'initial' | 'unset';
21
20
  export declare type Scale = 0 | string;
22
21
  export declare type WhiteSpace = 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line' | 'break-spaces' | 'inherit' | 'initial' | 'unset';
23
- export declare type BlockProps<T extends ElementType = ElementType> = {
24
- children?: ReactNode;
22
+ export declare type BlockProps<T extends React.ElementType = React.ElementType> = {
23
+ children?: React.ReactNode;
25
24
  /** Modifies the base element used to render the block. */
26
25
  as?: T;
27
26
  overrides?: BlockOverrides;
@@ -45,7 +45,8 @@ StyledListItem.displayName = 'StyledListItem';
45
45
  var StyledSeparator = (0, _styles.styled)('div', function (_ref4) {
46
46
  var $theme = _ref4.$theme;
47
47
  return {
48
- display: 'inline-block',
48
+ display: 'inline-flex',
49
+ alignItems: 'center',
49
50
  color: $theme.colors.breadcrumbsSeparatorFill,
50
51
  marginLeft: $theme.sizing.scale300,
51
52
  marginRight: $theme.sizing.scale300,
@@ -247,6 +247,8 @@ function getBorderRadiiStyles(_ref9) {
247
247
  }
248
248
  } else if ($shape === _constants.SHAPE.circle || $shape === _constants.SHAPE.round) {
249
249
  value = '50%';
250
+ } else if ($size === _constants.SIZE.mini) {
251
+ value = $theme.borders.buttonBorderRadiusMini;
250
252
  }
251
253
 
252
254
  return {
@@ -198,6 +198,8 @@ function getBorderRadiiStyles({ $theme, $size, $shape }) {
198
198
  }
199
199
  } else if ($shape === SHAPE.circle || $shape === SHAPE.round) {
200
200
  value = '50%';
201
+ } else if ($size === SIZE.mini) {
202
+ value = $theme.borders.buttonBorderRadiusMini;
201
203
  }
202
204
 
203
205
  return {
package/button/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import * as React from 'react';
2
- import { KIND, SIZE, SHAPE } from './constants';
1
+ import type * as React from 'react';
2
+ import type { KIND, SIZE, SHAPE } from './constants';
3
3
  import type { Override } from '../helpers/overrides';
4
- import type { ReactNode, SyntheticEvent } from 'react';
5
4
  export declare type ButtonOverrides = {
6
5
  Root?: Override;
7
6
  BaseButton?: Override;
@@ -15,7 +14,7 @@ export declare type CustomColors = {
15
14
  color: string;
16
15
  };
17
16
  export declare type ButtonProps = {
18
- children?: ReactNode;
17
+ children?: React.ReactNode;
19
18
  colors?: CustomColors;
20
19
  disabled?: boolean;
21
20
  /** A helper rendered at the end of the button. */
@@ -26,7 +25,7 @@ export declare type ButtonProps = {
26
25
  isSelected?: boolean;
27
26
  /** Defines the kind (purpose) of a button */
28
27
  kind?: keyof typeof KIND;
29
- onClick?: (a: SyntheticEvent<HTMLButtonElement>) => unknown;
28
+ onClick?: (a: React.SyntheticEvent<HTMLButtonElement>) => unknown;
30
29
  overrides?: ButtonOverrides;
31
30
  /** Defines the shape of the button */
32
31
  shape?: keyof typeof SHAPE;
@@ -1,8 +1,7 @@
1
- import * as React from 'react';
2
- import { SIZE, SHAPE, KIND } from '../button';
1
+ import type * as React from 'react';
2
+ import type { SIZE, SHAPE, KIND } from '../button';
3
3
  import type { Override } from '../helpers/overrides';
4
- import { MODE, STATE_CHANGE_TYPE } from './constants';
5
- import type { SyntheticEvent } from 'react';
4
+ import type { MODE, STATE_CHANGE_TYPE } from './constants';
6
5
  export declare type ButtonGroupProps = {
7
6
  /** Accessible label. */
8
7
  ariaLabel?: string;
@@ -55,5 +54,5 @@ export declare type State = {
55
54
  selected: Array<number>;
56
55
  };
57
56
  export declare type StateReducer = (stateType: typeof STATE_CHANGE_TYPE[keyof typeof STATE_CHANGE_TYPE], nextState: State, currentState: State) => State;
58
- declare type ClickHandler = (event: SyntheticEvent<HTMLButtonElement>, index: number) => unknown;
57
+ declare type ClickHandler = (event: React.SyntheticEvent<HTMLButtonElement>, index: number) => unknown;
59
58
  export {};
@@ -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 ({
@@ -1,7 +1,6 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
- import { STYLE_TYPE } from './constants';
4
- import type { ReactNode, ChangeEvent } from 'react';
3
+ import type { STYLE_TYPE } from './constants';
5
4
  export declare type LabelPlacement = 'top' | 'right' | 'bottom' | 'left';
6
5
  export declare type StyleType = keyof typeof STYLE_TYPE;
7
6
  export declare type CheckboxOverrides = {
@@ -15,7 +14,7 @@ export declare type CheckboxOverrides = {
15
14
  };
16
15
  export declare type DefaultProps = {
17
16
  overrides?: any;
18
- children?: ReactNode;
17
+ children?: React.ReactNode;
19
18
  checked: boolean;
20
19
  disabled: boolean;
21
20
  error: boolean;
@@ -24,13 +23,13 @@ export declare type DefaultProps = {
24
23
  isIndeterminate: boolean;
25
24
  inputRef: React.RefObject<HTMLInputElement>;
26
25
  checkmarkType: StyleType;
27
- onChange: (e: ChangeEvent<HTMLInputElement>) => unknown;
28
- onMouseEnter: (e: ChangeEvent<HTMLInputElement>) => unknown;
29
- onMouseLeave: (e: ChangeEvent<HTMLInputElement>) => unknown;
30
- onMouseDown: (e: ChangeEvent<HTMLInputElement>) => unknown;
31
- onMouseUp: (e: ChangeEvent<HTMLInputElement>) => unknown;
32
- onFocus: (e: ChangeEvent<HTMLInputElement>) => unknown;
33
- onBlur: (e: ChangeEvent<HTMLInputElement>) => unknown;
26
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
27
+ onMouseEnter: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
28
+ onMouseLeave: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
29
+ onMouseDown: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
30
+ onMouseUp: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
31
+ onFocus: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
32
+ onBlur: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
34
33
  containsInteractiveElement?: boolean;
35
34
  };
36
35
  export declare type CheckboxProps = {
@@ -42,7 +41,7 @@ export declare type CheckboxProps = {
42
41
  ariaLabel?: string;
43
42
  'aria-label'?: string;
44
43
  /** Component or String value for label of checkbox. */
45
- children?: ReactNode;
44
+ children?: React.ReactNode;
46
45
  /** Indicates if this checkbox children contain an interactive element (prevents the label from moving focus from the child element to the radio button) */
47
46
  containsInteractiveElement?: boolean;
48
47
  overrides?: CheckboxOverrides;
@@ -73,19 +72,19 @@ export declare type CheckboxProps = {
73
72
  /** Text to display in native OS tooltip on long hover. */
74
73
  title?: string | null;
75
74
  /** Handler for change events on trigger element. */
76
- onChange?: (e: ChangeEvent<HTMLInputElement>) => unknown;
75
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
77
76
  /** Handler for mouseenter events on trigger element. */
78
- onMouseEnter?: (e: ChangeEvent<HTMLInputElement>) => unknown;
77
+ onMouseEnter?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
79
78
  /** Handler for mouseleave events on trigger element. */
80
- onMouseLeave?: (e: ChangeEvent<HTMLInputElement>) => unknown;
79
+ onMouseLeave?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
81
80
  /** Handler for mousedown events on trigger element. */
82
- onMouseDown?: (e: ChangeEvent<HTMLInputElement>) => unknown;
81
+ onMouseDown?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
83
82
  /** Handler for mouseup events on trigger element. */
84
- onMouseUp?: (e: ChangeEvent<HTMLInputElement>) => unknown;
83
+ onMouseUp?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
85
84
  /** handler for focus events on trigger element. */
86
- onFocus?: (e: ChangeEvent<HTMLInputElement>) => unknown;
85
+ onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
87
86
  /** handler for blur events on trigger element. */
88
- onBlur?: (e: ChangeEvent<HTMLInputElement>) => unknown;
87
+ onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
89
88
  };
90
89
  export declare type CheckboxState = {
91
90
  isFocused: boolean;
@@ -97,50 +96,50 @@ export declare type CheckboxReducerState = {
97
96
  checked?: boolean;
98
97
  isIndeterminate?: boolean;
99
98
  };
100
- export declare type StateReducer = (stateType: string, nextState: CheckboxReducerState, currentState: CheckboxReducerState, event: ChangeEvent<HTMLInputElement>) => CheckboxReducerState;
99
+ export declare type StateReducer = (stateType: string, nextState: CheckboxReducerState, currentState: CheckboxReducerState, event: React.ChangeEvent<HTMLInputElement>) => CheckboxReducerState;
101
100
  export declare type StatefulContainerChildProps = {
102
101
  overrides?: CheckboxOverrides;
103
102
  /** Handler for change events on trigger element. */
104
- onChange?: (e: ChangeEvent<HTMLInputElement>) => unknown;
103
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
105
104
  /** Handler for mouseenter events on trigger element. */
106
- onMouseEnter?: (e: ChangeEvent<HTMLInputElement>) => unknown;
105
+ onMouseEnter?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
107
106
  /** Handler for mouseleave events on trigger element. */
108
- onMouseLeave?: (e: ChangeEvent<HTMLInputElement>) => unknown;
107
+ onMouseLeave?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
109
108
  /** Handler for focus events on trigger element. */
110
- onFocus?: (e: ChangeEvent<HTMLInputElement>) => unknown;
109
+ onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
111
110
  /** Handler for blur events on trigger element. */
112
- onBlur?: (e: ChangeEvent<HTMLInputElement>) => unknown;
111
+ onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
113
112
  /** Focus the checkbox on initial render. */
114
113
  autoFocus?: boolean;
115
114
  } & CheckboxReducerState;
116
115
  export declare type DefaultStatefulProps = {
117
116
  initialState: CheckboxReducerState;
118
- children?: (a: StatefulContainerChildProps) => ReactNode;
117
+ children?: (a: StatefulContainerChildProps) => React.ReactNode;
119
118
  stateReducer: StateReducer;
120
- onChange: (e: ChangeEvent<HTMLInputElement>) => unknown;
121
- onMouseEnter: (e: ChangeEvent<HTMLInputElement>) => unknown;
122
- onMouseLeave: (e: ChangeEvent<HTMLInputElement>) => unknown;
123
- onFocus: (e: ChangeEvent<HTMLInputElement>) => unknown;
124
- onBlur: (e: ChangeEvent<HTMLInputElement>) => unknown;
119
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
120
+ onMouseEnter: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
121
+ onMouseLeave: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
122
+ onFocus: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
123
+ onBlur: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
125
124
  };
126
125
  export declare type StatefulContainerProps = {
127
126
  overrides?: CheckboxOverrides;
128
127
  /** Component or String value for label of checkbox. */
129
- children?: (a: StatefulContainerChildProps) => ReactNode;
128
+ children?: (a: StatefulContainerChildProps) => React.ReactNode;
130
129
  /** Defines the components initial state value */
131
130
  initialState?: CheckboxReducerState;
132
131
  /** A state change handler. Used to override default state transitions. */
133
132
  stateReducer: StateReducer;
134
133
  /** Handler for change events on trigger element. */
135
- onChange?: (e: ChangeEvent<HTMLInputElement>) => unknown;
134
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
136
135
  /** Handler for mouseenter events on trigger element. */
137
- onMouseEnter?: (e: ChangeEvent<HTMLInputElement>) => unknown;
136
+ onMouseEnter?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
138
137
  /** Handler for mouseleave events on trigger element. */
139
- onMouseLeave?: (e: ChangeEvent<HTMLInputElement>) => unknown;
138
+ onMouseLeave?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
140
139
  /** Handler for focus events on trigger element. */
141
- onFocus?: (e: ChangeEvent<HTMLInputElement>) => unknown;
140
+ onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
142
141
  /** Handler for blur events on trigger element. */
143
- onBlur?: (e: ChangeEvent<HTMLInputElement>) => unknown;
142
+ onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
144
143
  /** Focus the checkbox on initial render. */
145
144
  autoFocus?: boolean;
146
145
  };
@@ -1,7 +1,6 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
- import { SIZE } from '../input';
4
- import type { ChangeEvent } from 'react';
3
+ import type { SIZE } from '../input';
5
4
  export declare type ComboboxOverrides = {
6
5
  Root?: Override;
7
6
  InputContainer?: Override;
@@ -23,9 +22,9 @@ export declare type ComboboxProps<Option = unknown> = {
23
22
  id?: string;
24
23
  name?: string;
25
24
  inputRef?: React.Ref<HTMLElement>;
26
- onBlur?: (a: ChangeEvent<HTMLInputElement>) => unknown;
25
+ onBlur?: (a: React.ChangeEvent<HTMLInputElement>) => unknown;
27
26
  onChange: (b: string, a: Option | null) => unknown;
28
- onFocus?: (a: ChangeEvent<HTMLInputElement>) => unknown;
27
+ onFocus?: (a: React.ChangeEvent<HTMLInputElement>) => unknown;
29
28
  onSubmit?: (a: {
30
29
  closeListbox: () => void;
31
30
  value: string;
@@ -51,7 +51,7 @@ function MeasureColumn(_ref) {
51
51
  onLayout(columnIndex, ref.current.getBoundingClientRect());
52
52
  }
53
53
  }
54
- }, []);
54
+ }, [onLayout]);
55
55
  return /*#__PURE__*/React.createElement("div", {
56
56
  ref: ref,
57
57
  className: css({
@@ -133,7 +133,7 @@ function MeasureColumnWidths(_ref2) {
133
133
 
134
134
  var widthMap = React.useMemo(function () {
135
135
  return new Map();
136
- }, []);
136
+ }, [rows]);
137
137
  var sampleSize = rows.length < MAX_SAMPLE_SIZE ? rows.length : MAX_SAMPLE_SIZE;
138
138
  var finishedMeasurementCount = (sampleSize + 1) * columns.length;
139
139
  var sampleIndexes = React.useMemo(function () {
@@ -152,7 +152,7 @@ function MeasureColumnWidths(_ref2) {
152
152
  widthMap.size === Math.floor(columns.length / 4)) {
153
153
  onWidthsChange(Array.from(widthMap.values()));
154
154
  }
155
- }, [columns, finishedMeasurementCount, onWidthsChange]);
155
+ }, [columns, rows, finishedMeasurementCount, onWidthsChange]);
156
156
  var hiddenStyle = css({
157
157
  position: 'absolute',
158
158
  overflow: 'hidden',
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
- import { COLUMNS, SORT_DIRECTIONS } from './constants';
3
- import type { SyntheticEvent } from 'react';
1
+ import type * as React from 'react';
2
+ import type { COLUMNS, SORT_DIRECTIONS } from './constants';
4
3
  export declare type SortDirections = typeof SORT_DIRECTIONS[keyof typeof SORT_DIRECTIONS];
5
4
  export declare type Columns = typeof COLUMNS[keyof typeof COLUMNS];
6
5
  export declare type SharedColumnOptions<Value> = {
@@ -45,7 +44,7 @@ export declare type BatchAction = {
45
44
  label: string;
46
45
  onClick: (a: {
47
46
  clearSelection: () => unknown;
48
- event: SyntheticEvent<HTMLButtonElement>;
47
+ event: React.SyntheticEvent<HTMLButtonElement>;
49
48
  selection: Row[];
50
49
  }) => unknown;
51
50
  renderIcon?: React.ComponentType<{
@@ -55,7 +54,7 @@ export declare type BatchAction = {
55
54
  export declare type RowAction = {
56
55
  label: string;
57
56
  onClick: (a: {
58
- event: SyntheticEvent<HTMLButtonElement>;
57
+ event: React.SyntheticEvent<HTMLButtonElement>;
59
58
  row: Row;
60
59
  }) => unknown;
61
60
  renderIcon: React.ComponentType<{
@@ -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
@@ -1,7 +1,7 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
3
  import type { Size } from '../input';
4
- import { INPUT_ROLE, ORIENTATION, RANGED_CALENDAR_BEHAVIOR, STATE_CHANGE_TYPE, DENSITY } from './constants';
4
+ import type { INPUT_ROLE, ORIENTATION, RANGED_CALENDAR_BEHAVIOR, STATE_CHANGE_TYPE, DENSITY } from './constants';
5
5
  import type { DateIOAdapter } from './utils/types';
6
6
  declare type Locale = any;
7
7
  export declare type Density = keyof typeof DENSITY;
@@ -1,4 +1,4 @@
1
- import { SIZE } from './constants';
1
+ import type { SIZE } from './constants';
2
2
  export declare type DividerProps = {
3
3
  $size?: keyof typeof SIZE;
4
4
  };
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
- import { STATE_CHANGE_TYPE } from './constants';
3
+ import type { STATE_CHANGE_TYPE } from './constants';
4
4
  export declare type State = {
5
5
  items: Array<React.ReactNode>;
6
6
  };
package/drawer/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
- import { SIZE, CLOSE_SOURCE, ANCHOR } from './constants';
3
+ import type { SIZE, CLOSE_SOURCE, ANCHOR } from './constants';
4
4
  export declare type Size = keyof typeof SIZE;
5
5
  export declare type SizeProp = Size | string;
6
6
  export declare type Anchor = keyof typeof ANCHOR;
@@ -15,7 +15,7 @@ function getColorStyles({
15
15
  const COLOR_STYLES = {
16
16
  [HIERARCHY.primary]: {
17
17
  [COLOR.accent]: {
18
- color: $theme.colors.contentInversePrimary,
18
+ color: $theme.colors.contentOnColor,
19
19
  backgroundColor: $theme.colors.backgroundAccent
20
20
  },
21
21
  [COLOR.primary]: {
@@ -23,15 +23,15 @@ function getColorStyles({
23
23
  backgroundColor: $theme.colors.backgroundInversePrimary
24
24
  },
25
25
  [COLOR.positive]: {
26
- color: $theme.colors.contentInversePrimary,
26
+ color: $theme.colors.contentOnColor,
27
27
  backgroundColor: $theme.colors.backgroundPositive
28
28
  },
29
29
  [COLOR.negative]: {
30
- color: $theme.colors.contentInversePrimary,
30
+ color: $theme.colors.contentOnColor,
31
31
  backgroundColor: $theme.colors.backgroundNegative
32
32
  },
33
33
  [COLOR.warning]: {
34
- color: $theme.colors.primaryA,
34
+ color: $theme.colors.contentOnColorInverse,
35
35
  backgroundColor: $theme.colors.backgroundWarning
36
36
  }
37
37
  },
@@ -24,7 +24,10 @@ export const StyledRoot = styled('div', ({
24
24
  gridColumnGap: $theme.sizing.scale600,
25
25
  gridTemplateColumns: 'min-content auto min-content',
26
26
  gridTemplateRows: 'auto min-content',
27
- margin: $theme.sizing.scale600
27
+ marginTop: $theme.sizing.scale600,
28
+ marginRight: $theme.sizing.scale600,
29
+ marginBottom: $theme.sizing.scale600,
30
+ marginLeft: $theme.sizing.scale600
28
31
  };
29
32
  });
30
33
  StyledRoot.displayName = "StyledRoot";
@@ -41,7 +41,8 @@ export const StyledSeparator = styled('div', ({
41
41
  $theme
42
42
  }) => {
43
43
  return {
44
- display: 'inline-block',
44
+ display: 'inline-flex',
45
+ alignItems: 'center',
45
46
  color: $theme.colors.breadcrumbsSeparatorFill,
46
47
  marginLeft: $theme.sizing.scale300,
47
48
  marginRight: $theme.sizing.scale300,
@@ -244,6 +244,8 @@ function getBorderRadiiStyles({
244
244
  }
245
245
  } else if ($shape === SHAPE.circle || $shape === SHAPE.round) {
246
246
  value = '50%';
247
+ } else if ($size === SIZE.mini) {
248
+ value = $theme.borders.buttonBorderRadiusMini;
247
249
  }
248
250
 
249
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',