baseui 11.0.3 → 11.1.2

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 (240) hide show
  1. package/a11y/index.d.ts +1 -1
  2. package/accordion/index.d.ts +25 -28
  3. package/app-nav-bar/app-nav-bar.js +33 -40
  4. package/app-nav-bar/app-nav-bar.js.flow +46 -62
  5. package/app-nav-bar/index.d.ts +9 -8
  6. package/app-nav-bar/styled-components.js +83 -29
  7. package/app-nav-bar/styled-components.js.flow +59 -9
  8. package/app-nav-bar/types.js.flow +2 -0
  9. package/aspect-ratio-box/index.d.ts +2 -4
  10. package/avatar/index.d.ts +6 -12
  11. package/badge/badge.js +109 -0
  12. package/badge/badge.js.flow +91 -0
  13. package/badge/constants.js +54 -0
  14. package/badge/constants.js.flow +52 -0
  15. package/badge/hint-dot.js +96 -0
  16. package/badge/hint-dot.js.flow +68 -0
  17. package/badge/index.d.ts +97 -0
  18. package/badge/index.js +80 -0
  19. package/badge/index.js.flow +20 -0
  20. package/badge/notification-circle.js +103 -0
  21. package/badge/notification-circle.js.flow +81 -0
  22. package/badge/package.json +4 -0
  23. package/badge/styled-components.js +242 -0
  24. package/badge/styled-components.js.flow +325 -0
  25. package/badge/types.js +11 -0
  26. package/badge/types.js.flow +59 -0
  27. package/badge/utils.js +33 -0
  28. package/badge/utils.js.flow +23 -0
  29. package/banner/banner.js +283 -0
  30. package/banner/banner.js.flow +253 -0
  31. package/banner/constants.js +35 -0
  32. package/banner/constants.js.flow +33 -0
  33. package/banner/index.d.ts +75 -0
  34. package/banner/index.js +44 -0
  35. package/banner/index.js.flow +16 -0
  36. package/banner/package.json +4 -0
  37. package/banner/styled-components.js +131 -0
  38. package/banner/styled-components.js.flow +119 -0
  39. package/banner/types.js +11 -0
  40. package/banner/types.js.flow +66 -0
  41. package/block/index.d.ts +4 -4
  42. package/breadcrumbs/breadcrumbs.js +5 -1
  43. package/breadcrumbs/breadcrumbs.js.flow +2 -2
  44. package/breadcrumbs/index.d.ts +5 -5
  45. package/button/button.js +2 -1
  46. package/button/button.js.flow +1 -0
  47. package/button/index.d.ts +19 -29
  48. package/button-group/index.d.ts +18 -24
  49. package/card/index.d.ts +16 -14
  50. package/checkbox/index.d.ts +17 -21
  51. package/combobox/index.d.ts +7 -11
  52. package/data-table/index.d.ts +7 -10
  53. package/datepicker/index.d.ts +42 -63
  54. package/datepicker/utils/date-helpers.js +1 -1
  55. package/datepicker/utils/date-helpers.js.flow +1 -1
  56. package/dnd-list/index.d.ts +22 -35
  57. package/drawer/index.d.ts +22 -27
  58. package/es/app-nav-bar/app-nav-bar.js +9 -19
  59. package/es/app-nav-bar/styled-components.js +64 -13
  60. package/es/badge/badge.js +70 -0
  61. package/es/badge/constants.js +42 -0
  62. package/es/badge/hint-dot.js +55 -0
  63. package/es/badge/index.js +11 -0
  64. package/es/badge/notification-circle.js +65 -0
  65. package/es/badge/styled-components.js +296 -0
  66. package/es/badge/types.js +8 -0
  67. package/es/badge/utils.js +17 -0
  68. package/es/banner/banner.js +213 -0
  69. package/es/banner/constants.js +24 -0
  70. package/es/banner/index.js +9 -0
  71. package/es/banner/styled-components.js +122 -0
  72. package/es/banner/types.js +8 -0
  73. package/es/breadcrumbs/breadcrumbs.js +5 -1
  74. package/es/button/button.js +1 -0
  75. package/es/datepicker/utils/date-helpers.js +1 -1
  76. package/es/file-uploader/file-uploader.js +8 -5
  77. package/es/helper/helper-steps.js +3 -1
  78. package/es/input/base-input.js +18 -11
  79. package/es/input/input.js +15 -10
  80. package/es/input/masked-input.js +5 -2
  81. package/es/input/utils.js +4 -2
  82. package/es/locale/tr_TR.js +115 -0
  83. package/es/notification/notification.js +16 -1
  84. package/es/payment-card/custom-cards.config.js +22 -0
  85. package/es/payment-card/icons/uatp.js +52 -0
  86. package/es/payment-card/payment-card.js +8 -3
  87. package/es/popover/popover.js +2 -1
  88. package/es/popover/stateful-container.js +2 -0
  89. package/es/popover/styled-components.js +2 -1
  90. package/es/progress-steps/numbered-step.js +2 -2
  91. package/es/select/select-component.js +38 -21
  92. package/es/table-semantic/styled-components.js +14 -0
  93. package/es/table-semantic/table-builder.js +12 -5
  94. package/es/textarea/textarea.js +15 -9
  95. package/es/themes/dark-theme/color-component-tokens.js +8 -0
  96. package/es/themes/light-theme/color-component-tokens.js +8 -0
  97. package/es/tree-view/tree-label.js +9 -1
  98. package/esm/app-nav-bar/app-nav-bar.js +32 -38
  99. package/esm/app-nav-bar/styled-components.js +79 -28
  100. package/esm/badge/badge.js +97 -0
  101. package/esm/badge/constants.js +42 -0
  102. package/esm/badge/hint-dot.js +83 -0
  103. package/esm/badge/index.js +11 -0
  104. package/esm/badge/notification-circle.js +91 -0
  105. package/esm/badge/styled-components.js +235 -0
  106. package/esm/badge/types.js +8 -0
  107. package/esm/badge/utils.js +17 -0
  108. package/esm/banner/banner.js +271 -0
  109. package/esm/banner/constants.js +24 -0
  110. package/esm/banner/index.js +9 -0
  111. package/esm/banner/styled-components.js +113 -0
  112. package/esm/banner/types.js +8 -0
  113. package/esm/breadcrumbs/breadcrumbs.js +5 -1
  114. package/esm/button/button.js +2 -1
  115. package/esm/datepicker/utils/date-helpers.js +1 -1
  116. package/esm/file-uploader/file-uploader.js +23 -8
  117. package/esm/helper/helper-steps.js +3 -1
  118. package/esm/input/base-input.js +18 -11
  119. package/esm/input/input.js +15 -10
  120. package/esm/input/masked-input.js +6 -3
  121. package/esm/input/utils.js +4 -2
  122. package/esm/locale/tr_TR.js +115 -0
  123. package/esm/notification/notification.js +17 -1
  124. package/esm/payment-card/custom-cards.config.js +22 -0
  125. package/esm/payment-card/icons/uatp.js +53 -0
  126. package/esm/payment-card/payment-card.js +9 -7
  127. package/esm/popover/popover.js +2 -1
  128. package/esm/popover/stateful-container.js +2 -0
  129. package/esm/popover/styled-components.js +3 -2
  130. package/esm/progress-steps/numbered-step.js +2 -2
  131. package/esm/select/select-component.js +75 -57
  132. package/esm/table-semantic/styled-components.js +31 -18
  133. package/esm/table-semantic/table-builder.js +34 -23
  134. package/esm/textarea/textarea.js +15 -9
  135. package/esm/themes/dark-theme/color-component-tokens.js +8 -0
  136. package/esm/themes/light-theme/color-component-tokens.js +8 -0
  137. package/esm/tree-view/tree-label.js +10 -2
  138. package/file-uploader/file-uploader.js +23 -8
  139. package/file-uploader/file-uploader.js.flow +18 -5
  140. package/file-uploader/index.d.ts +11 -11
  141. package/file-uploader/types.js.flow +3 -0
  142. package/flex-grid/index.d.ts +3 -3
  143. package/form-control/index.d.ts +7 -19
  144. package/header-navigation/index.d.ts +8 -9
  145. package/heading/index.d.ts +3 -4
  146. package/helper/helper-steps.js +19 -13
  147. package/helper/helper-steps.js.flow +3 -1
  148. package/helper/index.d.ts +7 -7
  149. package/helpers/base-provider.d.ts +16 -0
  150. package/helpers/overrides.d.ts +23 -0
  151. package/icon/index.d.ts +32 -32
  152. package/index.d.ts +34 -99
  153. package/input/base-input.js +18 -11
  154. package/input/base-input.js.flow +18 -6
  155. package/input/index.d.ts +29 -32
  156. package/input/input.js +15 -10
  157. package/input/input.js.flow +10 -5
  158. package/input/masked-input.js +6 -3
  159. package/input/masked-input.js.flow +3 -0
  160. package/input/types.js.flow +4 -0
  161. package/input/utils.js +4 -2
  162. package/input/utils.js.flow +2 -1
  163. package/layer/index.d.ts +6 -11
  164. package/layout-grid/index.d.ts +25 -7
  165. package/link/index.d.ts +2 -2
  166. package/list/index.d.ts +26 -31
  167. package/{locale.ts → locale/index.d.ts} +8 -0
  168. package/locale/tr_TR.js +123 -0
  169. package/locale/tr_TR.js.flow +124 -0
  170. package/map-marker/index.d.ts +41 -47
  171. package/menu/index.d.ts +27 -37
  172. package/modal/index.d.ts +28 -38
  173. package/notification/index.d.ts +2 -3
  174. package/notification/notification.js +18 -1
  175. package/notification/notification.js.flow +15 -1
  176. package/overrides.ts +2 -22
  177. package/package.json +26 -17
  178. package/pagination/index.d.ts +22 -26
  179. package/payment-card/custom-cards.config.js +30 -0
  180. package/payment-card/custom-cards.config.js.flow +29 -0
  181. package/payment-card/icons/uatp.js +67 -0
  182. package/payment-card/icons/uatp.js.flow +62 -0
  183. package/payment-card/index.d.ts +8 -8
  184. package/payment-card/payment-card.js +12 -7
  185. package/payment-card/payment-card.js.flow +12 -0
  186. package/phone-input/index.d.ts +261 -269
  187. package/pin-code/index.d.ts +11 -18
  188. package/popover/index.d.ts +39 -55
  189. package/popover/popover.js +2 -1
  190. package/popover/popover.js.flow +2 -1
  191. package/popover/stateful-container.js +2 -0
  192. package/popover/stateful-container.js.flow +2 -0
  193. package/popover/styled-components.js +3 -2
  194. package/popover/styled-components.js.flow +2 -1
  195. package/popover/types.js.flow +1 -0
  196. package/progress-bar/index.d.ts +11 -12
  197. package/progress-steps/index.d.ts +16 -16
  198. package/progress-steps/numbered-step.js.flow +2 -2
  199. package/radio/index.d.ts +12 -15
  200. package/rating/index.d.ts +9 -12
  201. package/select/index.d.ts +33 -36
  202. package/select/select-component.js +72 -54
  203. package/select/select-component.js.flow +35 -30
  204. package/side-navigation/index.d.ts +11 -13
  205. package/skeleton/index.d.ts +1 -1
  206. package/slider/index.d.ts +17 -26
  207. package/snackbar/index.d.ts +8 -8
  208. package/spinner/index.d.ts +2 -2
  209. package/styles/index.d.ts +82 -2
  210. package/table/index.d.ts +16 -16
  211. package/table-grid/index.d.ts +6 -8
  212. package/table-semantic/index.d.ts +26 -32
  213. package/table-semantic/styled-components.js +33 -19
  214. package/table-semantic/styled-components.js.flow +12 -0
  215. package/table-semantic/table-builder.js +38 -22
  216. package/table-semantic/table-builder.js.flow +32 -17
  217. package/table-semantic/types.js.flow +1 -0
  218. package/tabs/index.d.ts +20 -23
  219. package/tabs-motion/index.d.ts +23 -23
  220. package/tag/index.d.ts +14 -18
  221. package/textarea/index.d.ts +11 -14
  222. package/textarea/textarea.js +15 -9
  223. package/textarea/textarea.js.flow +11 -5
  224. package/textarea/types.js.flow +1 -0
  225. package/theme.ts +36 -777
  226. package/themes/dark-theme/color-component-tokens.js +8 -0
  227. package/themes/dark-theme/color-component-tokens.js.flow +9 -0
  228. package/themes/index.d.ts +765 -0
  229. package/themes/light-theme/color-component-tokens.js +8 -0
  230. package/themes/light-theme/color-component-tokens.js.flow +9 -0
  231. package/themes/types.js.flow +9 -0
  232. package/timepicker/index.d.ts +5 -8
  233. package/timezonepicker/index.d.ts +5 -8
  234. package/toast/index.d.ts +26 -40
  235. package/tokens/index.d.ts +1 -1
  236. package/tooltip/index.d.ts +7 -9
  237. package/tree-view/index.d.ts +15 -19
  238. package/tree-view/tree-label.js +10 -2
  239. package/tree-view/tree-label.js.flow +4 -4
  240. package/typography/index.d.ts +37 -37
package/a11y/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
 
3
- export const Unstable_A11y: React.FC;
3
+ export declare const Unstable_A11y: React.FC;
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import {StyletronComponent} from 'styletron-react';
3
- import {Override} from '../overrides';
2
+ import { StyletronComponent } from 'styletron-react';
3
+ import { Override } from '../overrides';
4
4
 
5
- export interface STATE_CHANGE_TYPE {
5
+ export declare const STATE_CHANGE_TYPE: {
6
6
  expand: 'expand';
7
- }
7
+ };
8
8
 
9
9
  export interface AccordionOverrides<T> {
10
10
  Content?: Override<T>;
@@ -24,9 +24,9 @@ export interface SharedProps {
24
24
  }
25
25
 
26
26
  export type StateReducer<T> = (
27
- stateChangeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
27
+ stateChangeType: typeof STATE_CHANGE_TYPE[keyof typeof STATE_CHANGE_TYPE],
28
28
  nextState: T,
29
- currentState: T,
29
+ currentState: T
30
30
  ) => T;
31
31
 
32
32
  export interface AccordionProps {
@@ -34,7 +34,7 @@ export interface AccordionProps {
34
34
  children: React.ReactNode;
35
35
  disabled?: boolean;
36
36
  initialState?: AccordionState;
37
- onChange?: (args: {expanded: React.Key[]}) => any;
37
+ onChange?: (args: { expanded: React.Key[] }) => any;
38
38
  overrides?: AccordionOverrides<SharedProps>;
39
39
  stateReducer?: StateReducer<AccordionState>;
40
40
  renderAll?: boolean;
@@ -45,12 +45,12 @@ export type StatelessAccordionProps = {
45
45
  children: React.ReactNode;
46
46
  disabled?: boolean;
47
47
  expanded: React.Key[];
48
- onChange?: (args: {expanded: React.Key[]; key: React.Key}) => any;
48
+ onChange?: (args: { expanded: React.Key[]; key: React.Key }) => any;
49
49
  overrides?: AccordionOverrides<SharedProps> & PanelOverrides<SharedProps>;
50
50
  renderAll?: boolean;
51
51
  };
52
52
 
53
- export const StatelessAccordion: React.FC<StatelessAccordionProps>;
53
+ export declare const StatelessAccordion: React.FC<StatelessAccordionProps>;
54
54
 
55
55
  export interface AccordionState {
56
56
  expanded: React.Key[];
@@ -59,8 +59,8 @@ export interface AccordionState {
59
59
  export class Accordion extends React.Component<AccordionProps, AccordionState> {
60
60
  onPanelChange(key: React.Key, onChange: () => any, ...args: any): void;
61
61
  internalSetState(
62
- type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
63
- changes: AccordionState,
62
+ type: typeof STATE_CHANGE_TYPE[keyof typeof STATE_CHANGE_TYPE],
63
+ changes: AccordionState
64
64
  ): void;
65
65
  getItems(): React.ReactNode;
66
66
  }
@@ -78,7 +78,7 @@ export interface SharedPanelProps {
78
78
  children: React.ReactNode;
79
79
  disabled?: boolean;
80
80
  key?: React.Key;
81
- onChange?: (args: {expanded: boolean}) => any;
81
+ onChange?: (args: { expanded: boolean }) => any;
82
82
  onClick?: (e: Event) => any;
83
83
  onKeyDown?: (e: KeyboardEvent) => any;
84
84
  overrides?: PanelOverrides<SharedProps>;
@@ -88,11 +88,11 @@ export interface SharedPanelProps {
88
88
 
89
89
  export interface SharedStatefulPanelContainerProps {
90
90
  initialState?: PanelState;
91
- onChange?: (args: {expanded: boolean}) => any;
91
+ onChange?: (args: { expanded: boolean }) => any;
92
92
  stateReducer?: StateReducer<PanelState>;
93
93
  }
94
94
 
95
- export type PanelProps = SharedPanelProps & {expanded?: boolean};
95
+ export type PanelProps = SharedPanelProps & { expanded?: boolean };
96
96
 
97
97
  export class Panel extends React.Component<PanelProps> {
98
98
  onClick(e: Event): void;
@@ -100,10 +100,9 @@ export class Panel extends React.Component<PanelProps> {
100
100
  getSharedProps(): SharedProps;
101
101
  }
102
102
 
103
- export type StatefulPanelProps = SharedPanelProps &
104
- SharedStatefulPanelContainerProps;
103
+ export type StatefulPanelProps = SharedPanelProps & SharedStatefulPanelContainerProps;
105
104
 
106
- export const StatefulPanel: React.FC<StatefulPanelProps>;
105
+ export declare const StatefulPanel: React.FC<StatefulPanelProps>;
107
106
 
108
107
  export type StatefulPanelContainerProps = SharedStatefulPanelContainerProps & {
109
108
  children: React.ReactNode;
@@ -119,17 +118,15 @@ export class StatefulPanelContainer extends React.Component<
119
118
  > {
120
119
  onChange(args: any): void;
121
120
  internalSetState(
122
- type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
123
- changes: PanelState,
121
+ type: typeof STATE_CHANGE_TYPE[keyof typeof STATE_CHANGE_TYPE],
122
+ changes: PanelState
124
123
  ): void;
125
124
  }
126
125
 
127
- export const StyledRoot: StyletronComponent<any>;
128
- export const StyledPanelContainer: StyletronComponent<any>;
129
- export const StyledHeader: StyletronComponent<any>;
130
- export const StyledContent: StyletronComponent<any>;
131
- export const StyledContentAnimationContainer: StyletronComponent<any>;
132
- export const StyledToggleIcon: StyletronComponent<any>;
133
- export const StyledToggleIconGroup: StyletronComponent<any>;
134
-
135
- export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
126
+ export declare const StyledRoot: StyletronComponent<any>;
127
+ export declare const StyledPanelContainer: StyletronComponent<any>;
128
+ export declare const StyledHeader: StyletronComponent<any>;
129
+ export declare const StyledContent: StyletronComponent<any>;
130
+ export declare const StyledContentAnimationContainer: StyletronComponent<any>;
131
+ export declare const StyledToggleIcon: StyletronComponent<any>;
132
+ export declare const StyledToggleIconGroup: StyletronComponent<any>;
@@ -11,9 +11,7 @@ var React = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _overrides = require("../helpers/overrides.js");
13
13
 
14
- var _index = require("../layout-grid/index.js");
15
-
16
- var _index2 = require("../styles/index.js");
14
+ var _index = require("../styles/index.js");
17
15
 
18
16
  var _focusVisible = require("../utils/focusVisible.js");
19
17
 
@@ -113,19 +111,12 @@ function SecondaryMenu(props) {
113
111
  _props$overrides2 = props.overrides,
114
112
  overrides = _props$overrides2 === void 0 ? {} : _props$overrides2;
115
113
 
116
- var _getOverrides3 = (0, _overrides.getOverrides)(overrides.SubnavContainer, _styledComponents.StyledSubnavContainer),
114
+ var _getOverrides3 = (0, _overrides.getOverrides)(overrides.SecondaryMenuContainer, _styledComponents.StyledSecondaryMenuContainer),
117
115
  _getOverrides4 = _slicedToArray(_getOverrides3, 2),
118
- SubnavContainer = _getOverrides4[0],
119
- subnavContainerProps = _getOverrides4[1];
120
-
121
- var _getOverrides5 = (0, _overrides.getOverrides)(overrides.SecondaryMenuContainer, _styledComponents.StyledSecondaryMenuContainer),
122
- _getOverrides6 = _slicedToArray(_getOverrides5, 2),
123
- SecondaryMenuContainer = _getOverrides6[0],
124
- secondaryMenuContainerProps = _getOverrides6[1];
116
+ SecondaryMenuContainer = _getOverrides4[0],
117
+ secondaryMenuContainerProps = _getOverrides4[1];
125
118
 
126
- return /*#__PURE__*/React.createElement(SubnavContainer, subnavContainerProps, /*#__PURE__*/React.createElement(_index.Grid, null, /*#__PURE__*/React.createElement(_index.Cell, {
127
- span: [0, 8, 12]
128
- }, /*#__PURE__*/React.createElement(SecondaryMenuContainer, _extends({
119
+ return /*#__PURE__*/React.createElement(SecondaryMenuContainer, _extends({
129
120
  role: "navigation",
130
121
  "aria-label": "Secondary navigation"
131
122
  }, secondaryMenuContainerProps), items.map(function (item, index) {
@@ -141,11 +132,11 @@ function SecondaryMenu(props) {
141
132
  overrides: overrides
142
133
  })
143
134
  );
144
- })))));
135
+ }));
145
136
  }
146
137
 
147
138
  function AppNavBar(props) {
148
- var _useStyletron = (0, _index2.useStyletron)(),
139
+ var _useStyletron = (0, _index.useStyletron)(),
149
140
  _useStyletron2 = _slicedToArray(_useStyletron, 2),
150
141
  css = _useStyletron2[0],
151
142
  theme = _useStyletron2[1];
@@ -172,25 +163,35 @@ function AppNavBar(props) {
172
163
  return props.mainItems || [];
173
164
  }, [props.mainItems, props.isMainItemActive]);
174
165
 
175
- var _getOverrides7 = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.StyledRoot),
166
+ var _getOverrides5 = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.StyledRoot),
167
+ _getOverrides6 = _slicedToArray(_getOverrides5, 2),
168
+ Root = _getOverrides6[0],
169
+ rootProps = _getOverrides6[1];
170
+
171
+ var _getOverrides7 = (0, _overrides.getOverrides)(overrides.Spacing, _styledComponents.StyledSpacing),
176
172
  _getOverrides8 = _slicedToArray(_getOverrides7, 2),
177
- Root = _getOverrides8[0],
178
- rootProps = _getOverrides8[1];
173
+ Spacing = _getOverrides8[0],
174
+ spacingProps = _getOverrides8[1];
179
175
 
180
- var _getOverrides9 = (0, _overrides.getOverrides)(overrides.Spacing, _styledComponents.StyledSpacing),
176
+ var _getOverrides9 = (0, _overrides.getOverrides)(overrides.AppName, _styledComponents.StyledAppName),
181
177
  _getOverrides10 = _slicedToArray(_getOverrides9, 2),
182
- Spacing = _getOverrides10[0],
183
- spacingProps = _getOverrides10[1];
178
+ AppName = _getOverrides10[0],
179
+ appNameProps = _getOverrides10[1];
184
180
 
185
- var _getOverrides11 = (0, _overrides.getOverrides)(overrides.AppName, _styledComponents.StyledAppName),
181
+ var _getOverrides11 = (0, _overrides.getOverrides)(overrides.PrimaryMenuContainer, _styledComponents.StyledPrimaryMenuContainer),
186
182
  _getOverrides12 = _slicedToArray(_getOverrides11, 2),
187
- AppName = _getOverrides12[0],
188
- appNameProps = _getOverrides12[1];
183
+ PrimaryMenuContainer = _getOverrides12[0],
184
+ primaryMenuContainerProps = _getOverrides12[1];
189
185
 
190
- var _getOverrides13 = (0, _overrides.getOverrides)(overrides.PrimaryMenuContainer, _styledComponents.StyledPrimaryMenuContainer),
186
+ var _getOverrides13 = (0, _overrides.getOverrides)(overrides.DesktopMenuContainer, _styledComponents.StyledDesktopMenuContainer),
191
187
  _getOverrides14 = _slicedToArray(_getOverrides13, 2),
192
- PrimaryMenuContainer = _getOverrides14[0],
193
- primaryMenuContainerProps = _getOverrides14[1];
188
+ DesktopMenuContainer = _getOverrides14[0],
189
+ desktopMenuContainerProps = _getOverrides14[1];
190
+
191
+ var _getOverrides15 = (0, _overrides.getOverrides)(overrides.DesktopMenu, _styledComponents.StyledDesktopMenu),
192
+ _getOverrides16 = _slicedToArray(_getOverrides15, 2),
193
+ DesktopMenu = _getOverrides16[0],
194
+ desktopMenuProps = _getOverrides16[1];
194
195
 
195
196
  var secondaryMenu;
196
197
  var desktopSubNavPosition = _constants.POSITION.horizontal;
@@ -201,9 +202,7 @@ function AppNavBar(props) {
201
202
  className: css(_defineProperty({}, "@media screen and (min-width: ".concat(theme.breakpoints.large, "px)"), {
202
203
  display: 'none'
203
204
  }))
204
- }, /*#__PURE__*/React.createElement(_index.Grid, null, /*#__PURE__*/React.createElement(_index.Cell, {
205
- span: [4, 8, 0]
206
- }, /*#__PURE__*/React.createElement(Spacing, spacingProps, mainItems.length || userItems.length ? /*#__PURE__*/React.createElement(_mobileMenu.default, props) : null, /*#__PURE__*/React.createElement(AppName, appNameProps, title)))), secondaryMenu && mobileSubNavPosition === _constants.POSITION.horizontal && /*#__PURE__*/React.createElement(SecondaryMenu, {
205
+ }, /*#__PURE__*/React.createElement(Spacing, spacingProps, mainItems.length || userItems.length ? /*#__PURE__*/React.createElement(_mobileMenu.default, props) : null, /*#__PURE__*/React.createElement(AppName, appNameProps, title)), secondaryMenu && mobileSubNavPosition === _constants.POSITION.horizontal && /*#__PURE__*/React.createElement(SecondaryMenu, {
207
206
  items: secondaryMenu,
208
207
  mapItemToNode: mapItemToNode,
209
208
  onSelect: onMainItemSelect,
@@ -212,11 +211,7 @@ function AppNavBar(props) {
212
211
  className: css(_defineProperty({}, "@media screen and (max-width: ".concat(theme.breakpoints.large - 1, "px)"), {
213
212
  display: 'none'
214
213
  }))
215
- }, /*#__PURE__*/React.createElement(_index.Grid, null, /*#__PURE__*/React.createElement(_index.Cell, {
216
- span: [0, 3, 3]
217
- }, /*#__PURE__*/React.createElement(Spacing, spacingProps, /*#__PURE__*/React.createElement(AppName, appNameProps, title))), /*#__PURE__*/React.createElement(_index.Cell, {
218
- span: userItems.length ? [0, 4, 8] : [0, 5, 9]
219
- }, /*#__PURE__*/React.createElement(PrimaryMenuContainer, _extends({
214
+ }, /*#__PURE__*/React.createElement(DesktopMenuContainer, desktopMenuContainerProps, /*#__PURE__*/React.createElement(DesktopMenu, desktopMenuProps, /*#__PURE__*/React.createElement(AppName, appNameProps, title), /*#__PURE__*/React.createElement(PrimaryMenuContainer, _extends({
220
215
  role: "navigation",
221
216
  "aria-label": "Main navigation"
222
217
  }, primaryMenuContainerProps), mainItems.map(function (item, index) {
@@ -237,9 +232,7 @@ function AppNavBar(props) {
237
232
  onSelect: onMainItemSelect,
238
233
  overrides: overrides
239
234
  });
240
- }))), userItems.length ? /*#__PURE__*/React.createElement(_index.Cell, {
241
- span: [0, 1, 1]
242
- }, /*#__PURE__*/React.createElement(Spacing, spacingProps, /*#__PURE__*/React.createElement(_userMenu.default, {
235
+ })), userItems.length ? /*#__PURE__*/React.createElement(_userMenu.default, {
243
236
  mapItemToNode: mapItemToNode,
244
237
  onItemSelect: onUserItemSelect,
245
238
  overrides: overrides,
@@ -247,7 +240,7 @@ function AppNavBar(props) {
247
240
  usernameSubtitle: usernameSubtitle,
248
241
  userImgUrl: userImgUrl,
249
242
  userItems: userItems
250
- }))) : null), secondaryMenu && desktopSubNavPosition === _constants.POSITION.horizontal && /*#__PURE__*/React.createElement(SecondaryMenu, {
243
+ }) : null)), secondaryMenu && desktopSubNavPosition === _constants.POSITION.horizontal && /*#__PURE__*/React.createElement(SecondaryMenu, {
251
244
  items: secondaryMenu,
252
245
  mapItemToNode: mapItemToNode,
253
246
  onSelect: onMainItemSelect,
@@ -9,7 +9,6 @@ LICENSE file in the root directory of this source tree.
9
9
  import * as React from 'react';
10
10
 
11
11
  import { getOverrides } from '../helpers/overrides.js';
12
- import { Cell, Grid } from '../layout-grid/index.js';
13
12
  import { useStyletron } from '../styles/index.js';
14
13
  import { isFocusVisible } from '../utils/focusVisible.js';
15
14
 
@@ -20,10 +19,11 @@ import {
20
19
  StyledRoot,
21
20
  StyledSpacing,
22
21
  StyledPrimaryMenuContainer,
23
- StyledSubnavContainer,
24
22
  StyledSecondaryMenuContainer,
25
23
  StyledAppName,
26
24
  StyledMainMenuItem,
25
+ StyledDesktopMenuContainer,
26
+ StyledDesktopMenu,
27
27
  } from './styled-components.js';
28
28
  import type { AppNavBarPropsT } from './types.js';
29
29
  import { defaultMapItemToNode, mapItemsActive } from './utils.js';
@@ -82,39 +82,29 @@ function MainMenuItem(props) {
82
82
  function SecondaryMenu(props) {
83
83
  const { items = [], mapItemToNode, onSelect, overrides = {} } = props;
84
84
 
85
- const [SubnavContainer, subnavContainerProps] = getOverrides(
86
- overrides.SubnavContainer,
87
- StyledSubnavContainer
88
- );
89
85
  const [SecondaryMenuContainer, secondaryMenuContainerProps] = getOverrides(
90
86
  overrides.SecondaryMenuContainer,
91
87
  StyledSecondaryMenuContainer
92
88
  );
93
89
 
94
90
  return (
95
- <SubnavContainer {...subnavContainerProps}>
96
- <Grid>
97
- <Cell span={[0, 8, 12]}>
98
- <SecondaryMenuContainer
99
- role="navigation"
100
- aria-label="Secondary navigation"
101
- {...secondaryMenuContainerProps}
102
- >
103
- {items.map((item, index) => (
104
- // Replace with a menu item renderer
105
- <MainMenuItem
106
- mapItemToNode={mapItemToNode}
107
- item={item}
108
- kind={KIND.secondary}
109
- key={index}
110
- onSelect={onSelect}
111
- overrides={overrides}
112
- />
113
- ))}
114
- </SecondaryMenuContainer>
115
- </Cell>
116
- </Grid>
117
- </SubnavContainer>
91
+ <SecondaryMenuContainer
92
+ role="navigation"
93
+ aria-label="Secondary navigation"
94
+ {...secondaryMenuContainerProps}
95
+ >
96
+ {items.map((item, index) => (
97
+ // Replace with a menu item renderer
98
+ <MainMenuItem
99
+ mapItemToNode={mapItemToNode}
100
+ item={item}
101
+ kind={KIND.secondary}
102
+ key={index}
103
+ onSelect={onSelect}
104
+ overrides={overrides}
105
+ />
106
+ ))}
107
+ </SecondaryMenuContainer>
118
108
  );
119
109
  }
120
110
 
@@ -146,6 +136,11 @@ export default function AppNavBar(props: AppNavBarPropsT) {
146
136
  overrides.PrimaryMenuContainer,
147
137
  StyledPrimaryMenuContainer
148
138
  );
139
+ const [DesktopMenuContainer, desktopMenuContainerProps] = getOverrides(
140
+ overrides.DesktopMenuContainer,
141
+ StyledDesktopMenuContainer
142
+ );
143
+ const [DesktopMenu, desktopMenuProps] = getOverrides(overrides.DesktopMenu, StyledDesktopMenu);
149
144
 
150
145
  let secondaryMenu;
151
146
  let desktopSubNavPosition = POSITION.horizontal;
@@ -161,14 +156,10 @@ export default function AppNavBar(props: AppNavBarPropsT) {
161
156
  },
162
157
  })}
163
158
  >
164
- <Grid>
165
- <Cell span={[4, 8, 0]}>
166
- <Spacing {...spacingProps}>
167
- {mainItems.length || userItems.length ? <MobileNav {...props} /> : null}
168
- <AppName {...appNameProps}>{title}</AppName>
169
- </Spacing>
170
- </Cell>
171
- </Grid>
159
+ <Spacing {...spacingProps}>
160
+ {mainItems.length || userItems.length ? <MobileNav {...props} /> : null}
161
+ <AppName {...appNameProps}>{title}</AppName>
162
+ </Spacing>
172
163
 
173
164
  {secondaryMenu && mobileSubNavPosition === POSITION.horizontal && (
174
165
  <SecondaryMenu
@@ -188,14 +179,11 @@ export default function AppNavBar(props: AppNavBarPropsT) {
188
179
  },
189
180
  })}
190
181
  >
191
- <Grid>
192
- <Cell span={[0, 3, 3]}>
193
- <Spacing {...spacingProps}>
194
- {/* Replace with a Logo renderer */}
195
- <AppName {...appNameProps}>{title}</AppName>
196
- </Spacing>
197
- </Cell>
198
- <Cell span={userItems.length ? [0, 4, 8] : [0, 5, 9]}>
182
+ <DesktopMenuContainer {...desktopMenuContainerProps}>
183
+ <DesktopMenu {...desktopMenuProps}>
184
+ {/* Replace with a Logo renderer */}
185
+ <AppName {...appNameProps}>{title}</AppName>
186
+
199
187
  <PrimaryMenuContainer
200
188
  role="navigation"
201
189
  aria-label="Main navigation"
@@ -221,24 +209,20 @@ export default function AppNavBar(props: AppNavBarPropsT) {
221
209
  );
222
210
  })}
223
211
  </PrimaryMenuContainer>
224
- </Cell>
225
212
 
226
- {userItems.length ? (
227
- <Cell span={[0, 1, 1]}>
228
- <Spacing {...spacingProps}>
229
- <UserMenu
230
- mapItemToNode={mapItemToNode}
231
- onItemSelect={onUserItemSelect}
232
- overrides={overrides}
233
- username={username}
234
- usernameSubtitle={usernameSubtitle}
235
- userImgUrl={userImgUrl}
236
- userItems={userItems}
237
- />
238
- </Spacing>
239
- </Cell>
240
- ) : null}
241
- </Grid>
213
+ {userItems.length ? (
214
+ <UserMenu
215
+ mapItemToNode={mapItemToNode}
216
+ onItemSelect={onUserItemSelect}
217
+ overrides={overrides}
218
+ username={username}
219
+ usernameSubtitle={usernameSubtitle}
220
+ userImgUrl={userImgUrl}
221
+ userItems={userItems}
222
+ />
223
+ ) : null}
224
+ </DesktopMenu>
225
+ </DesktopMenuContainer>
242
226
 
243
227
  {secondaryMenu && desktopSubNavPosition === POSITION.horizontal && (
244
228
  <SecondaryMenu
@@ -1,9 +1,11 @@
1
1
  import * as React from 'react';
2
- import {Override} from '../overrides';
2
+ import { Override } from '../overrides';
3
3
 
4
4
  export interface AppNavBarOverridesT {
5
5
  Root?: Override<any>;
6
6
  AppName?: Override<any>;
7
+ DesktopMenu?: Override<any>;
8
+ DesktopMenuContainer?: Override<any>;
7
9
  MainMenuItem?: Override<any>;
8
10
  PrimaryMenuContainer?: Override<any>;
9
11
  ProfileTileContainer?: Override<any>;
@@ -31,8 +33,8 @@ export type NavItemT = {
31
33
  children?: NavItemT[];
32
34
  navExitIcon?: React.ComponentType<any>;
33
35
  navPosition?: {
34
- desktop?: POSITION[keyof POSITION];
35
- mobile?: POSITION[keyof POSITION];
36
+ desktop?: typeof POSITION[keyof typeof POSITION];
37
+ mobile?: typeof POSITION[keyof typeof POSITION];
36
38
  };
37
39
  };
38
40
 
@@ -53,16 +55,15 @@ export type AppNavBarPropsT = UserMenuPropsT & {
53
55
  title?: React.ReactNode;
54
56
  };
55
57
 
56
- export interface POSITION {
58
+ export declare const POSITION: {
57
59
  horizontal: 'horizontal';
58
60
  vertical: 'vertical';
59
- }
61
+ };
60
62
 
61
63
  export class AppNavBar extends React.Component<AppNavBarPropsT> {}
62
- export const POSITION: POSITION;
63
64
 
64
- export const setItemActive: (
65
+ export declare const setItemActive: (
65
66
  items: NavItemT[],
66
67
  item: NavItemT,
67
- getUniqueueIdentifier?: (currentItem: NavItemT) => string | number,
68
+ getUniqueueIdentifier?: (currentItem: NavItemT) => string | number
68
69
  ) => NavItemT[];