baseui 0.0.0-next-5961c4d → 0.0.0-next-e23ee12
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.
- package/accordion/index.d.ts +3 -0
- package/accordion/stateless-accordion.js +10 -4
- package/accordion/types.d.ts +2 -3
- package/app-nav-bar/index.d.ts +9 -0
- package/badge/index.d.ts +17 -0
- package/banner/index.d.ts +7 -0
- package/button/index.d.ts +3 -0
- package/card/types.d.ts +2 -2
- package/checkbox/types.d.ts +8 -8
- package/combobox/index.d.ts +3 -0
- package/data-table/index.d.ts +11 -0
- package/datepicker/index.d.ts +3 -0
- package/divider/constants.d.ts +5 -0
- package/divider/constants.js +19 -0
- package/divider/constants.js.flow +16 -0
- package/divider/index.d.ts +2 -0
- package/divider/index.js +46 -0
- package/divider/index.js.flow +25 -0
- package/divider/package.json +4 -0
- package/divider/styled-components.d.ts +2 -0
- package/divider/styled-components.js +67 -0
- package/divider/styled-components.js.flow +45 -0
- package/divider/types.d.ts +4 -0
- package/divider/types.js +5 -0
- package/divider/types.js.flow +17 -0
- package/dnd-list/index.d.ts +3 -0
- package/es/accordion/stateless-accordion.js +9 -4
- package/es/app-nav-bar/index.js +2 -1
- package/es/badge/index.js +2 -1
- package/es/banner/index.js +2 -1
- package/es/button/index.js +2 -1
- package/es/card/index.js +2 -1
- package/es/combobox/index.js +2 -1
- package/es/divider/constants.js +11 -0
- package/es/divider/index.js +17 -0
- package/es/divider/styled-components.js +58 -0
- package/es/divider/types.js +1 -0
- package/es/dnd-list/index.js +2 -1
- package/es/helper/index.js +2 -1
- package/es/icon/index.js +2 -1
- package/es/layout-grid/index.js +2 -1
- package/es/link/index.js +2 -1
- package/es/list/index.js +2 -1
- package/es/map-marker/index.js +2 -1
- package/es/overrides.js +1 -0
- package/es/pin-code/index.js +3 -1
- package/es/side-navigation/index.js +2 -1
- package/es/skeleton/index.js +2 -1
- package/es/slider/index.js +2 -1
- package/es/snackbar/index.js +2 -1
- package/es/styles/styled.js +2 -1
- package/es/table/index.js +2 -1
- package/es/tabs/index.js +2 -1
- package/es/tabs-motion/index.js +4 -1
- package/es/theme.js +1 -0
- package/es/themes/index.js +2 -1
- package/es/timezonepicker/index.js +2 -1
- package/es/toast/index.js +2 -1
- package/es/tokens/index.js +2 -1
- package/es/tree-view/index.js +3 -1
- package/esm/accordion/stateless-accordion.js +9 -4
- package/esm/app-nav-bar/index.js +2 -1
- package/esm/badge/index.js +2 -1
- package/esm/banner/index.js +2 -1
- package/esm/button/index.js +2 -1
- package/esm/card/index.js +2 -1
- package/esm/combobox/index.js +2 -1
- package/esm/divider/constants.js +11 -0
- package/esm/divider/index.js +19 -0
- package/esm/divider/styled-components.js +57 -0
- package/esm/divider/types.js +1 -0
- package/esm/dnd-list/index.js +2 -1
- package/esm/helper/index.js +2 -1
- package/esm/icon/index.js +2 -1
- package/esm/layout-grid/index.js +2 -1
- package/esm/link/index.js +2 -1
- package/esm/list/index.js +2 -1
- package/esm/map-marker/index.js +2 -1
- package/esm/overrides.js +1 -0
- package/esm/pin-code/index.js +3 -1
- package/esm/side-navigation/index.js +2 -1
- package/esm/skeleton/index.js +2 -1
- package/esm/slider/index.js +2 -1
- package/esm/snackbar/index.js +2 -1
- package/esm/styles/styled.js +2 -1
- package/esm/table/index.js +2 -1
- package/esm/tabs/index.js +2 -1
- package/esm/tabs-motion/index.js +4 -1
- package/esm/theme.js +1 -0
- package/esm/themes/index.js +2 -1
- package/esm/timezonepicker/index.js +2 -1
- package/esm/toast/index.js +2 -1
- package/esm/tokens/index.js +2 -1
- package/esm/tree-view/index.js +3 -1
- package/helper/index.d.ts +3 -0
- package/helpers/overrides.d.ts +2 -2
- package/helpers/types.d.ts +5 -4
- package/icon/index.d.ts +3 -0
- package/index.d.ts +4 -1
- package/input/types.d.ts +7 -7
- package/layout-grid/index.d.ts +3 -0
- package/layout-grid/index.js +2 -0
- package/layout-grid/types.d.ts +9 -7
- package/link/index.d.ts +3 -0
- package/link/index.js +2 -0
- package/list/index.d.ts +25 -0
- package/locale/index.d.ts +39 -2
- package/map-marker/index.d.ts +45 -0
- package/menu/index.d.ts +19 -1
- package/menu/nested-menus.d.ts +3 -4
- package/menu/types.d.ts +8 -7
- package/overrides.d.ts +2 -0
- package/overrides.js +5 -0
- package/package.json +1 -3
- package/pagination/index.d.ts +5 -0
- package/payment-card/types.d.ts +5 -5
- package/phone-input/flag.d.ts +3 -2
- package/phone-input/index.d.ts +1 -1
- package/phone-input/types.d.ts +14 -13
- package/pin-code/index.d.ts +4 -0
- package/pin-code/index.js +20 -0
- package/pin-code/pin-code.d.ts +2 -2
- package/pin-code/types.d.ts +9 -8
- package/progress-bar/types.d.ts +8 -7
- package/radio/radiogroup.d.ts +2 -2
- package/radio/stateful-radiogroup.d.ts +2 -2
- package/radio/types.d.ts +4 -4
- package/select/index.d.ts +5 -0
- package/side-navigation/nav.d.ts +2 -2
- package/side-navigation/types.d.ts +16 -14
- package/skeleton/index.d.ts +3 -0
- package/slider/index.d.ts +3 -0
- package/snackbar/index.d.ts +11 -0
- package/styles/index.d.ts +1 -1
- package/styles/styled.d.ts +6 -0
- package/styles/styled.js +2 -1
- package/styles/theme-provider.d.ts +3 -3
- package/table/types.d.ts +12 -10
- package/tabs/index.d.ts +3 -0
- package/tabs-motion/index.d.ts +7 -0
- package/theme.d.ts +4 -0
- package/theme.js +5 -0
- package/themes/index.d.ts +6 -0
- package/timepicker/types.d.ts +4 -3
- package/timezonepicker/index.d.ts +3 -0
- package/timezonepicker/types.d.ts +4 -3
- package/toast/index.d.ts +4 -1
- package/tokens/index.d.ts +3 -0
- package/tree-view/index.d.ts +5 -1
- package/tree-view/index.js +4 -4
package/accordion/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SharedStylePropsArg } from './types';
|
|
1
2
|
export { default as Accordion } from './accordion';
|
|
2
3
|
export { default as Panel } from './panel';
|
|
3
4
|
export { default as StatefulPanel } from './stateful-panel';
|
|
@@ -7,3 +8,5 @@ export { STATE_CHANGE_TYPE } from './constants';
|
|
|
7
8
|
export { Root as StyledRoot, PanelContainer as StyledPanelContainer, Header as StyledHeader, Content as StyledContent, ContentAnimationContainer as StyledContentAnimationContainer, ToggleIcon as StyledToggleIcon, ToggleIconGroup as StyledToggleIconGroup, } from './styled-components';
|
|
8
9
|
export * from './types';
|
|
9
10
|
export type { AccordionLocale } from './locale';
|
|
11
|
+
/** @deprecated use SharedStylePropsArg instead. To be removed in future versions.*/
|
|
12
|
+
export declare type SharedProps = SharedStylePropsArg;
|
|
@@ -9,6 +9,8 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _reactIs = require("react-is");
|
|
13
|
+
|
|
12
14
|
var _overrides = require("../helpers/overrides");
|
|
13
15
|
|
|
14
16
|
var _styledComponents = require("./styled-components");
|
|
@@ -67,9 +69,13 @@ function StatelessAccordion(_ref) {
|
|
|
67
69
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
68
70
|
"data-baseweb": "accordion"
|
|
69
71
|
}, rootProps), React.Children.map(children, function (child, index) {
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
var normalizedChild = (0, _reactIs.isElement)(child) || (0, _reactIs.isPortal)(child) ? child :
|
|
73
|
+
/*#__PURE__*/
|
|
74
|
+
// if primitive value - wrap it in a fragment
|
|
75
|
+
React.createElement(React.Fragment, null, child);
|
|
76
|
+
var key = normalizedChild.key || String(index);
|
|
77
|
+
return /*#__PURE__*/React.cloneElement(normalizedChild, {
|
|
78
|
+
disabled: normalizedChild.props.disabled || disabled,
|
|
73
79
|
expanded: expanded.includes(key),
|
|
74
80
|
key: key,
|
|
75
81
|
onChange: // Don't bother constructing the wrapper function if no one is listening
|
|
@@ -97,7 +103,7 @@ function StatelessAccordion(_ref) {
|
|
|
97
103
|
expanded: next
|
|
98
104
|
});
|
|
99
105
|
} : onChange,
|
|
100
|
-
overrides:
|
|
106
|
+
overrides: normalizedChild.props.overrides || PanelOverrides,
|
|
101
107
|
renderAll: renderAll
|
|
102
108
|
});
|
|
103
109
|
}));
|
package/accordion/types.d.ts
CHANGED
|
@@ -33,14 +33,13 @@ export declare type OnChangeHandler = (a: {
|
|
|
33
33
|
export declare type AccordionOnChangeHandler = (a: {
|
|
34
34
|
expanded: Array<React.Key>;
|
|
35
35
|
}) => unknown;
|
|
36
|
-
declare type Children = Array<React.ReactElement<any>> | React.ReactElement<any>;
|
|
37
36
|
export declare type AccordionProps = {
|
|
38
37
|
/** Determines how many panels may be expanded at a time. If set to
|
|
39
38
|
* true it will collapse a current panel when a new panel is expanded.
|
|
40
39
|
* If set to false more than one panel may be expanded at a time. */
|
|
41
40
|
accordion?: boolean;
|
|
42
41
|
/** Accordion expandable items. See Panel API below for reference. */
|
|
43
|
-
children:
|
|
42
|
+
children: React.ReactNode;
|
|
44
43
|
/** If set to true all its children panels will be disabled from toggling. */
|
|
45
44
|
disabled?: boolean;
|
|
46
45
|
initialState?: AccordionState;
|
|
@@ -67,7 +66,7 @@ export declare type StatelessAccordionProps = {
|
|
|
67
66
|
* If set to false more than one panel may be expanded at a time. */
|
|
68
67
|
accordion?: boolean;
|
|
69
68
|
/** Accordion expandable items. See Panel API below for reference. */
|
|
70
|
-
children:
|
|
69
|
+
children: React.ReactNode;
|
|
71
70
|
/** If set to true all its children panels will be disabled from toggling. */
|
|
72
71
|
disabled?: boolean;
|
|
73
72
|
/** List of Panel keys which are expanded. */
|
package/app-nav-bar/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import type { AppNavBarOverrides, NavItem, UserMenuProps, AppNavBarProps } from './types';
|
|
1
2
|
export { default as AppNavBar } from './app-nav-bar';
|
|
2
3
|
export { POSITION } from './constants';
|
|
3
4
|
export * from './styled-components';
|
|
4
5
|
export * from './types';
|
|
5
6
|
export { setItemActive } from './utils';
|
|
7
|
+
/** @deprecated use AppNavBarOverrides instead. To be removed in future versions.*/
|
|
8
|
+
export declare type AppNavBarOverridesT = AppNavBarOverrides;
|
|
9
|
+
/** @deprecated use NavItem instead. To be removed in future versions.*/
|
|
10
|
+
export declare type NavItemT = NavItem;
|
|
11
|
+
/** @deprecated use UserMenuProps instead. To be removed in future versions.*/
|
|
12
|
+
export declare type UserMenuPropsT = UserMenuProps;
|
|
13
|
+
/** @deprecated use AppNavBarProps instead. To be removed in future versions.*/
|
|
14
|
+
export declare type AppNavBarPropsT = AppNavBarProps;
|
package/badge/index.d.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
import type { Hierarchy, Shape, Color, Placement, BadgeOverrides, BadgeProps, NotificationCircleProps, HintDotProps } from './types';
|
|
1
2
|
export { default as Badge } from './badge';
|
|
2
3
|
export { default as NotificationCircle } from './notification-circle';
|
|
3
4
|
export { default as HintDot } from './hint-dot';
|
|
4
5
|
export { HIERARCHY, SHAPE, COLOR, PLACEMENT } from './constants';
|
|
5
6
|
export * from './styled-components';
|
|
6
7
|
export * from './types';
|
|
8
|
+
/** @deprecated use Hierarchy instead. To be removed in future versions.*/
|
|
9
|
+
export declare type HierarchyT = Hierarchy;
|
|
10
|
+
/** @deprecated use Shape instead. To be removed in future versions.*/
|
|
11
|
+
export declare type ShapeT = Shape;
|
|
12
|
+
/** @deprecated use Color instead. To be removed in future versions.*/
|
|
13
|
+
export declare type ColorT = Color;
|
|
14
|
+
/** @deprecated use Placement instead. To be removed in future versions.*/
|
|
15
|
+
export declare type PlacementT = Placement;
|
|
16
|
+
/** @deprecated use BadgeOverrides instead. To be removed in future versions.*/
|
|
17
|
+
export declare type BadgeOverridesT = BadgeOverrides;
|
|
18
|
+
/** @deprecated use BadgeProps instead. To be removed in future versions.*/
|
|
19
|
+
export declare type BadgePropsT = BadgeProps;
|
|
20
|
+
/** @deprecated use NotificationCircleProps instead. To be removed in future versions.*/
|
|
21
|
+
export declare type NotificationCirclePropsT = NotificationCircleProps;
|
|
22
|
+
/** @deprecated use HintDotProps instead. To be removed in future versions.*/
|
|
23
|
+
export declare type HintDotPropsT = HintDotProps;
|
package/banner/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { ActionContent, ArtworkContent, BannerProps } from './types';
|
|
1
2
|
export { Banner } from './banner';
|
|
2
3
|
export * from './constants';
|
|
3
4
|
export * from './styled-components';
|
|
4
5
|
export * from './types';
|
|
6
|
+
/** @deprecated use ActionContent instead. To be removed in future versions.*/
|
|
7
|
+
export declare type ActionContentT = ActionContent;
|
|
8
|
+
/** @deprecated use ArtworkContent instead. To be removed in future versions.*/
|
|
9
|
+
export declare type ArtworkContentT = ArtworkContent;
|
|
10
|
+
/** @deprecated use BannerProps instead. To be removed in future versions.*/
|
|
11
|
+
export declare type PropsT = BannerProps;
|
package/button/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { CustomColors } from './types';
|
|
1
2
|
export { default as Button } from './button';
|
|
2
3
|
export { KIND, SIZE, SHAPE } from './constants';
|
|
3
4
|
export { BaseButton as StyledBaseButton, StartEnhancer as StyledStartEnhancer, EndEnhancer as StyledEndEnhancer, LoadingSpinner as StyledLoadingSpinner, LoadingSpinnerContainer as StyledLoadingSpinnerContainer, } from './styled-components';
|
|
4
5
|
export * from './types';
|
|
6
|
+
/** @deprecated use CustomColors instead. To be removed in future versions.*/
|
|
7
|
+
export declare type CustomColorsT = CustomColors;
|
package/card/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { Override } from '../helpers/overrides';
|
|
3
|
-
export declare type
|
|
3
|
+
export declare type CardOverrides = {
|
|
4
4
|
Action?: Override;
|
|
5
5
|
Body?: Override;
|
|
6
6
|
Contents?: Override;
|
|
@@ -36,7 +36,7 @@ export declare type CardProps = {
|
|
|
36
36
|
}) => boolean;
|
|
37
37
|
/** Image to be positioned at the top of the Card. Can be a string representing the img src or an object with img attrs */
|
|
38
38
|
readonly headerImage?: string | ImageProps;
|
|
39
|
-
readonly overrides:
|
|
39
|
+
readonly overrides: CardOverrides;
|
|
40
40
|
/** Image src that by default is rendered to the side of children content. */
|
|
41
41
|
readonly thumbnail?: string;
|
|
42
42
|
/** Content to render above the body content. */
|
package/checkbox/types.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare type CheckboxProps = {
|
|
|
55
55
|
/** Renders checkbox in errored state. */
|
|
56
56
|
error?: boolean;
|
|
57
57
|
/** Used to get a ref to the input element. Useful for programmatically focusing the input */
|
|
58
|
-
inputRef
|
|
58
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
59
59
|
/** Focus the checkbox on initial render. */
|
|
60
60
|
autoFocus?: boolean;
|
|
61
61
|
/** Passed to the input element type attribute */
|
|
@@ -69,23 +69,23 @@ export declare type CheckboxProps = {
|
|
|
69
69
|
/** How to position the label relative to the checkbox itself. */
|
|
70
70
|
labelPlacement?: LabelPlacement;
|
|
71
71
|
/** Renders UI as checkmark or toggle switch. */
|
|
72
|
-
checkmarkType
|
|
72
|
+
checkmarkType?: StyleType;
|
|
73
73
|
/** Text to display in native OS tooltip on long hover. */
|
|
74
74
|
title?: string | null;
|
|
75
75
|
/** Handler for change events on trigger element. */
|
|
76
76
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => unknown;
|
|
77
77
|
/** Handler for mouseenter events on trigger element. */
|
|
78
|
-
onMouseEnter
|
|
78
|
+
onMouseEnter?: (e: ChangeEvent<HTMLInputElement>) => unknown;
|
|
79
79
|
/** Handler for mouseleave events on trigger element. */
|
|
80
|
-
onMouseLeave
|
|
80
|
+
onMouseLeave?: (e: ChangeEvent<HTMLInputElement>) => unknown;
|
|
81
81
|
/** Handler for mousedown events on trigger element. */
|
|
82
|
-
onMouseDown
|
|
82
|
+
onMouseDown?: (e: ChangeEvent<HTMLInputElement>) => unknown;
|
|
83
83
|
/** Handler for mouseup events on trigger element. */
|
|
84
|
-
onMouseUp
|
|
84
|
+
onMouseUp?: (e: ChangeEvent<HTMLInputElement>) => unknown;
|
|
85
85
|
/** handler for focus events on trigger element. */
|
|
86
|
-
onFocus
|
|
86
|
+
onFocus?: (e: ChangeEvent<HTMLInputElement>) => unknown;
|
|
87
87
|
/** handler for blur events on trigger element. */
|
|
88
|
-
onBlur
|
|
88
|
+
onBlur?: (e: ChangeEvent<HTMLInputElement>) => unknown;
|
|
89
89
|
};
|
|
90
90
|
export declare type CheckboxState = {
|
|
91
91
|
isFocused: boolean;
|
package/combobox/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { ComboboxProps } from './types';
|
|
1
2
|
export { SIZE } from '../input';
|
|
2
3
|
export { default as Combobox } from './combobox';
|
|
3
4
|
export { StyledRoot, StyledInputContainer, StyledListBox, StyledListItem, } from './styled-components';
|
|
4
5
|
export * from './types';
|
|
6
|
+
/** @deprecated use ComboboxProps instead. To be removed in future versions.*/
|
|
7
|
+
export declare type PropsT = ComboboxProps;
|
package/data-table/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SortDirections, ColumnOptions, Row, BatchAction, RowAction } from './types';
|
|
1
2
|
export { DataTable } from './data-table';
|
|
2
3
|
export { StatefulContainer } from './stateful-container';
|
|
3
4
|
export { StatefulDataTable } from './stateful-data-table';
|
|
@@ -15,3 +16,13 @@ export { default as StringColumn } from './column-string';
|
|
|
15
16
|
export { COLUMNS, DATETIME_OPERATIONS, NUMERICAL_FORMATS, SORT_DIRECTIONS } from './constants';
|
|
16
17
|
export * from './types';
|
|
17
18
|
export type { DataTableLocale } from './locale';
|
|
19
|
+
/** @deprecated use SortDirections instead. To be removed in future versions.*/
|
|
20
|
+
export declare type SortDirectionsT = SortDirections;
|
|
21
|
+
/** @deprecated use ColumnOptions instead. To be removed in future versions.*/
|
|
22
|
+
export declare type ColumnT = ColumnOptions;
|
|
23
|
+
/** @deprecated use Row instead. To be removed in future versions.*/
|
|
24
|
+
export declare type RowT = Row;
|
|
25
|
+
/** @deprecated use BatchAction instead. To be removed in future versions.*/
|
|
26
|
+
export declare type BatchActionT = BatchAction;
|
|
27
|
+
/** @deprecated use RowAction instead. To be removed in future versions.*/
|
|
28
|
+
export declare type RowActionT = RowAction;
|
package/datepicker/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SharedStyleProps } from './types';
|
|
1
2
|
export { default as StatefulContainer } from './stateful-container';
|
|
2
3
|
export { default as Calendar } from './calendar';
|
|
3
4
|
export { default as StatefulCalendar } from './stateful-calendar';
|
|
@@ -10,3 +11,5 @@ export * from '../timepicker';
|
|
|
10
11
|
export * from '../timezonepicker';
|
|
11
12
|
export * from './types';
|
|
12
13
|
export type { DatepickerLocale } from './locale';
|
|
14
|
+
/** @deprecated use SharedStyleProps instead. To be removed in future versions.*/
|
|
15
|
+
export declare type SharedStylePropsT = SharedStyleProps;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SIZE = void 0;
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Copyright (c) Uber Technologies, Inc.
|
|
10
|
+
|
|
11
|
+
This source code is licensed under the MIT license found in the
|
|
12
|
+
LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var SIZE = {
|
|
15
|
+
cell: 'cell',
|
|
16
|
+
section: 'section',
|
|
17
|
+
module: 'module'
|
|
18
|
+
};
|
|
19
|
+
exports.SIZE = SIZE;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
// @flow
|
|
8
|
+
export const SIZE = {
|
|
9
|
+
cell: 'cell',
|
|
10
|
+
section: 'section',
|
|
11
|
+
module: 'module',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
declare var __DEV__: boolean;
|
|
15
|
+
declare var __NODE__: boolean;
|
|
16
|
+
declare var __BROWSER__: boolean;
|
package/divider/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
var _exportNames = {
|
|
9
|
+
StyledDivider: true
|
|
10
|
+
};
|
|
11
|
+
exports.StyledDivider = void 0;
|
|
12
|
+
|
|
13
|
+
var React = _interopRequireWildcard(require("react"));
|
|
14
|
+
|
|
15
|
+
var _index = require("../styles/index");
|
|
16
|
+
|
|
17
|
+
var _styledComponents = require("./styled-components");
|
|
18
|
+
|
|
19
|
+
var _constants = require("./constants");
|
|
20
|
+
|
|
21
|
+
Object.keys(_constants).forEach(function (key) {
|
|
22
|
+
if (key === "default" || key === "__esModule") return;
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
24
|
+
if (key in exports && exports[key] === _constants[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _constants[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
34
|
+
|
|
35
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
36
|
+
|
|
37
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
38
|
+
|
|
39
|
+
var StyledDivider = (0, _index.withWrapper)(_styledComponents.StyledDivider, function (StyledComponent) {
|
|
40
|
+
return function StyledDivider(props) {
|
|
41
|
+
return /*#__PURE__*/React.createElement(StyledComponent, _extends({
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
}, props));
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
exports.StyledDivider = StyledDivider;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
// @flow
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { withWrapper } from '../styles/index.js';
|
|
10
|
+
|
|
11
|
+
import { StyledDivider as StyledDividerElement } from './styled-components.js';
|
|
12
|
+
|
|
13
|
+
export * from './constants.js';
|
|
14
|
+
|
|
15
|
+
export const StyledDivider = withWrapper(
|
|
16
|
+
StyledDividerElement,
|
|
17
|
+
(StyledComponent) =>
|
|
18
|
+
function StyledDivider(props) {
|
|
19
|
+
return <StyledComponent aria-hidden="true" {...props} />;
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
declare var __DEV__: boolean;
|
|
24
|
+
declare var __NODE__: boolean;
|
|
25
|
+
declare var __BROWSER__: boolean;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledDivider = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = require("../styles/index");
|
|
9
|
+
|
|
10
|
+
var _constants = require("./constants");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
Copyright (c) Uber Technologies, Inc.
|
|
14
|
+
|
|
15
|
+
This source code is licensed under the MIT license found in the
|
|
16
|
+
LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
var StyledDivider = (0, _index.styled)('hr', function (props) {
|
|
19
|
+
var $theme = props.$theme,
|
|
20
|
+
_props$$size = props.$size,
|
|
21
|
+
$size = _props$$size === void 0 ? _constants.SIZE.section : _props$$size;
|
|
22
|
+
|
|
23
|
+
if ($size === _constants.SIZE.cell) {
|
|
24
|
+
return {
|
|
25
|
+
borderTopWidth: '1px',
|
|
26
|
+
borderTopColor: $theme.colors.borderOpaque,
|
|
27
|
+
borderTopStyle: 'solid',
|
|
28
|
+
// base styles
|
|
29
|
+
borderRightWidth: 0,
|
|
30
|
+
borderBottomWidth: 0,
|
|
31
|
+
borderLeftWidth: 0,
|
|
32
|
+
borderRightStyle: 'none',
|
|
33
|
+
borderBottomStyle: 'none',
|
|
34
|
+
borderLeftStyle: 'none'
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if ($size === _constants.SIZE.module) {
|
|
39
|
+
return {
|
|
40
|
+
borderTopWidth: '8px',
|
|
41
|
+
borderTopColor: $theme.colors.backgroundTertiary,
|
|
42
|
+
borderTopStyle: 'solid',
|
|
43
|
+
// base styles
|
|
44
|
+
borderRightWidth: 0,
|
|
45
|
+
borderBottomWidth: 0,
|
|
46
|
+
borderLeftWidth: 0,
|
|
47
|
+
borderRightStyle: 'none',
|
|
48
|
+
borderBottomStyle: 'none',
|
|
49
|
+
borderLeftStyle: 'none'
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
borderTopWidth: '2px',
|
|
55
|
+
borderTopColor: $theme.colors.borderOpaque,
|
|
56
|
+
borderTopStyle: 'solid',
|
|
57
|
+
// base styles
|
|
58
|
+
borderRightWidth: 0,
|
|
59
|
+
borderBottomWidth: 0,
|
|
60
|
+
borderLeftWidth: 0,
|
|
61
|
+
borderRightStyle: 'none',
|
|
62
|
+
borderBottomStyle: 'none',
|
|
63
|
+
borderLeftStyle: 'none'
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
exports.StyledDivider = StyledDivider;
|
|
67
|
+
StyledDivider.displayName = "StyledDivider";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
// @flow
|
|
8
|
+
import { styled } from '../styles/index.js';
|
|
9
|
+
import { SIZE } from './constants.js';
|
|
10
|
+
import type { DividerProps } from './types.js';
|
|
11
|
+
|
|
12
|
+
export const StyledDivider = styled<DividerProps>('hr', ({ $theme, $size = SIZE.section }) => {
|
|
13
|
+
const borderResetStyles = {
|
|
14
|
+
borderRightWidth: 0,
|
|
15
|
+
borderBottomWidth: 0,
|
|
16
|
+
borderLeftWidth: 0,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
if ($size === SIZE.cell) {
|
|
20
|
+
return {
|
|
21
|
+
...borderResetStyles,
|
|
22
|
+
borderTopWidth: '1px',
|
|
23
|
+
borderTopColor: $theme.colors.borderOpaque,
|
|
24
|
+
borderTopStyle: 'solid',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if ($size === SIZE.module) {
|
|
28
|
+
return {
|
|
29
|
+
...borderResetStyles,
|
|
30
|
+
borderTopWidth: '8px',
|
|
31
|
+
borderTopColor: $theme.colors.backgroundTertiary,
|
|
32
|
+
borderTopStyle: 'solid',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
...borderResetStyles,
|
|
37
|
+
borderTopWidth: '2px',
|
|
38
|
+
borderTopColor: $theme.colors.borderOpaque,
|
|
39
|
+
borderTopStyle: 'solid',
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
declare var __DEV__: boolean;
|
|
44
|
+
declare var __NODE__: boolean;
|
|
45
|
+
declare var __BROWSER__: boolean;
|
package/divider/types.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
// @flow
|
|
8
|
+
import { SIZE } from './constants.js';
|
|
9
|
+
|
|
10
|
+
export type DividerProps = {
|
|
11
|
+
/** Thickness of the divider. */
|
|
12
|
+
$size?: $Keys<typeof SIZE>,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
declare var __DEV__: boolean;
|
|
16
|
+
declare var __NODE__: boolean;
|
|
17
|
+
declare var __BROWSER__: boolean;
|
package/dnd-list/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { arrayMove, arrayRemove } from 'react-movable';
|
|
2
|
+
import type { SharedStylePropsArg } from './types';
|
|
2
3
|
export { arrayMove, arrayRemove };
|
|
3
4
|
export { default as StatefulList } from './stateful-list';
|
|
4
5
|
export { default as StatefulListContainer } from './stateful-list-container';
|
|
@@ -6,3 +7,5 @@ export { default as List } from './list';
|
|
|
6
7
|
export { STATE_CHANGE_TYPE } from './constants';
|
|
7
8
|
export { Root as StyledRoot, List as StyledList, Item as StyledItem, DragHandle as StyledDragHandle, CloseHandle as StyledCloseHandle, Label as StyledLabel, } from './styled-components';
|
|
8
9
|
export * from './types';
|
|
10
|
+
/** @deprecated use SharedStylePropsArg instead. To be removed in future versions.*/
|
|
11
|
+
export declare type SharedStylePropsArgT = SharedStylePropsArg;
|
|
@@ -7,6 +7,7 @@ This source code is licensed under the MIT license found in the
|
|
|
7
7
|
LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import * as React from 'react';
|
|
10
|
+
import { isElement, isPortal } from 'react-is';
|
|
10
11
|
import { getOverrides } from '../helpers/overrides';
|
|
11
12
|
import { Root as StyledRoot } from './styled-components';
|
|
12
13
|
|
|
@@ -27,9 +28,13 @@ function StatelessAccordion({
|
|
|
27
28
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
28
29
|
"data-baseweb": "accordion"
|
|
29
30
|
}, rootProps), React.Children.map(children, (child, index) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
let normalizedChild = isElement(child) || isPortal(child) ? child :
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
// if primitive value - wrap it in a fragment
|
|
34
|
+
React.createElement(React.Fragment, null, child);
|
|
35
|
+
const key = normalizedChild.key || String(index);
|
|
36
|
+
return /*#__PURE__*/React.cloneElement(normalizedChild, {
|
|
37
|
+
disabled: normalizedChild.props.disabled || disabled,
|
|
33
38
|
expanded: expanded.includes(key),
|
|
34
39
|
key,
|
|
35
40
|
onChange: // Don't bother constructing the wrapper function if no one is listening
|
|
@@ -55,7 +60,7 @@ function StatelessAccordion({
|
|
|
55
60
|
expanded: next
|
|
56
61
|
});
|
|
57
62
|
} : onChange,
|
|
58
|
-
overrides:
|
|
63
|
+
overrides: normalizedChild.props.overrides || PanelOverrides,
|
|
59
64
|
renderAll
|
|
60
65
|
});
|
|
61
66
|
}));
|
package/es/app-nav-bar/index.js
CHANGED
|
@@ -8,4 +8,5 @@ export { default as AppNavBar } from './app-nav-bar';
|
|
|
8
8
|
export { POSITION } from './constants';
|
|
9
9
|
export * from './styled-components';
|
|
10
10
|
export * from './types';
|
|
11
|
-
export { setItemActive } from './utils';
|
|
11
|
+
export { setItemActive } from './utils';
|
|
12
|
+
/** @deprecated use AppNavBarOverrides instead. To be removed in future versions.*/
|
package/es/badge/index.js
CHANGED
|
@@ -9,4 +9,5 @@ export { default as NotificationCircle } from './notification-circle';
|
|
|
9
9
|
export { default as HintDot } from './hint-dot';
|
|
10
10
|
export { HIERARCHY, SHAPE, COLOR, PLACEMENT } from './constants';
|
|
11
11
|
export * from './styled-components';
|
|
12
|
-
export * from './types';
|
|
12
|
+
export * from './types';
|
|
13
|
+
/** @deprecated use Hierarchy instead. To be removed in future versions.*/
|
package/es/banner/index.js
CHANGED
|
@@ -7,4 +7,5 @@ LICENSE file in the root directory of this source tree.
|
|
|
7
7
|
export { Banner } from './banner';
|
|
8
8
|
export * from './constants';
|
|
9
9
|
export * from './styled-components';
|
|
10
|
-
export * from './types';
|
|
10
|
+
export * from './types';
|
|
11
|
+
/** @deprecated use ActionContent instead. To be removed in future versions.*/
|
package/es/button/index.js
CHANGED
|
@@ -10,4 +10,5 @@ export { KIND, SIZE, SHAPE } from './constants'; // Styled elements
|
|
|
10
10
|
|
|
11
11
|
export { BaseButton as StyledBaseButton, StartEnhancer as StyledStartEnhancer, EndEnhancer as StyledEndEnhancer, LoadingSpinner as StyledLoadingSpinner, LoadingSpinnerContainer as StyledLoadingSpinnerContainer } from './styled-components'; // Types
|
|
12
12
|
|
|
13
|
-
export * from './types';
|
|
13
|
+
export * from './types';
|
|
14
|
+
/** @deprecated use CustomColors instead. To be removed in future versions.*/
|
package/es/card/index.js
CHANGED
|
@@ -6,4 +6,5 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
export { default as Card, hasThumbnail } from './card';
|
|
8
8
|
export { Action as StyledAction, Body as StyledBody, Contents as StyledContents, HeaderImage as StyledHeaderImage, Thumbnail as StyledThumbnail, Title as StyledTitle, Root as StyledRoot, Root as StyledWrapper } from './styled-components';
|
|
9
|
-
export * from './types';
|
|
9
|
+
export * from './types';
|
|
10
|
+
/** @deprecated To be removed in future versions */
|
package/es/combobox/index.js
CHANGED
|
@@ -7,4 +7,5 @@ LICENSE file in the root directory of this source tree.
|
|
|
7
7
|
export { SIZE } from '../input';
|
|
8
8
|
export { default as Combobox } from './combobox';
|
|
9
9
|
export { StyledRoot, StyledInputContainer, StyledListBox, StyledListItem } from './styled-components';
|
|
10
|
-
export * from './types';
|
|
10
|
+
export * from './types';
|
|
11
|
+
/** @deprecated use ComboboxProps instead. To be removed in future versions.*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
export const SIZE = {
|
|
8
|
+
cell: 'cell',
|
|
9
|
+
section: 'section',
|
|
10
|
+
module: 'module'
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright (c) Uber Technologies, Inc.
|
|
5
|
+
|
|
6
|
+
This source code is licensed under the MIT license found in the
|
|
7
|
+
LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { withWrapper } from '../styles/index';
|
|
11
|
+
import { StyledDivider as StyledDividerElement } from './styled-components';
|
|
12
|
+
export * from './constants';
|
|
13
|
+
export const StyledDivider = withWrapper(StyledDividerElement, StyledComponent => function StyledDivider(props) {
|
|
14
|
+
return /*#__PURE__*/React.createElement(StyledComponent, _extends({
|
|
15
|
+
"aria-hidden": "true"
|
|
16
|
+
}, props));
|
|
17
|
+
});
|