baseui 0.0.0-next-29453ad → 0.0.0-next-4e68b3e
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/README.md +3 -3
- package/accordion/accordion.js +0 -11
- package/accordion/accordion.js.flow +1 -12
- package/accordion/index.d.ts +0 -3
- package/accordion/panel.js +1 -3
- package/accordion/panel.js.flow +1 -7
- package/accordion/stateless-accordion.js +2 -4
- package/accordion/stateless-accordion.js.flow +0 -2
- package/accordion/types.js.flow +0 -5
- package/button/constants.js +1 -2
- package/button/constants.js.flow +0 -1
- package/button/index.d.ts +0 -1
- package/button/styled-components.js +2 -29
- package/button/styled-components.js.flow +2 -30
- package/checkbox/checkbox.js +6 -30
- package/checkbox/checkbox.js.flow +7 -38
- package/checkbox/constants.js +2 -1
- package/checkbox/constants.js.flow +2 -1
- package/checkbox/index.d.ts +4 -6
- package/checkbox/index.js +0 -6
- package/checkbox/index.js.flow +0 -1
- package/checkbox/styled-components.js +52 -149
- package/checkbox/styled-components.js.flow +59 -165
- package/checkbox/types.js.flow +0 -5
- package/data-table/column-categorical.js +1 -1
- package/data-table/column-categorical.js.flow +1 -1
- package/data-table/column-datetime.js +1 -1
- package/data-table/column-datetime.js.flow +3 -1
- package/data-table/column.js +6 -2
- package/data-table/column.js.flow +9 -7
- package/data-table/data-table.js +1 -1
- package/data-table/data-table.js.flow +1 -1
- package/data-table/header-cell.js +3 -0
- package/data-table/header-cell.js.flow +1 -1
- package/datepicker/calendar.js +15 -7
- package/datepicker/calendar.js.flow +23 -9
- package/datepicker/constants.js +12 -2
- package/datepicker/constants.js.flow +10 -0
- package/datepicker/datepicker.js +61 -30
- package/datepicker/datepicker.js.flow +77 -37
- package/datepicker/day.js +85 -34
- package/datepicker/day.js.flow +118 -54
- package/datepicker/locale.js.flow +0 -1
- package/datepicker/month.js +3 -1
- package/datepicker/month.js.flow +2 -0
- package/datepicker/stateful-container.js.flow +2 -1
- package/datepicker/styled-components.js +23 -1
- package/datepicker/styled-components.js.flow +12 -2
- package/datepicker/types.js.flow +35 -10
- package/datepicker/utils/date-helpers.js +30 -0
- package/datepicker/utils/date-helpers.js.flow +12 -0
- package/datepicker/week.js +3 -1
- package/datepicker/week.js.flow +2 -0
- package/es/accordion/accordion.js +0 -10
- package/es/accordion/panel.js +1 -2
- package/es/accordion/stateless-accordion.js +2 -4
- package/es/button/constants.js +1 -2
- package/es/button/styled-components.js +2 -29
- package/es/checkbox/checkbox.js +7 -32
- package/es/checkbox/constants.js +2 -1
- package/es/checkbox/index.js +1 -1
- package/es/checkbox/styled-components.js +51 -146
- package/es/data-table/column-categorical.js +1 -1
- package/es/data-table/column-datetime.js +1 -1
- package/es/data-table/column.js +6 -2
- package/es/data-table/data-table.js +1 -1
- package/es/data-table/header-cell.js +3 -0
- package/es/datepicker/calendar.js +15 -7
- package/es/datepicker/constants.js +8 -0
- package/es/datepicker/datepicker.js +56 -29
- package/es/datepicker/day.js +77 -34
- package/es/datepicker/month.js +3 -1
- package/es/datepicker/styled-components.js +8 -2
- package/es/datepicker/types.js +1 -1
- package/es/datepicker/utils/date-helpers.js +16 -0
- package/es/datepicker/week.js +3 -1
- package/es/file-uploader/file-uploader.js +4 -4
- package/es/header-navigation/styled-components.js +3 -3
- package/es/helpers/overrides.js +1 -2
- package/es/input/styled-components.js +4 -4
- package/es/layer/layer.js +4 -4
- package/es/locale/index.js +0 -7
- package/es/menu/styled-components.js +1 -1
- package/es/modal/index.js +1 -1
- package/es/modal/modal.js +19 -65
- package/es/modal/styled-components.js +12 -48
- package/es/phone-input/default-props.js +1 -1
- package/es/phone-input/index.js +0 -4
- package/es/phone-input/phone-input-lite.js +55 -31
- package/es/radio/radio.js +1 -7
- package/es/radio/radiogroup.js +3 -28
- package/es/radio/styled-components.js +4 -5
- package/es/rating/styled-components.js +3 -3
- package/es/select/index.js +1 -2
- package/es/select/select-component.js +4 -8
- package/es/select/styled-components.js +4 -4
- package/es/snackbar/styled-components.js +2 -2
- package/es/spinner/index.js +3 -9
- package/es/spinner/styled-components.js +2 -32
- package/es/table/filter.js +3 -3
- package/es/tag/styled-components.js +1 -1
- package/es/themes/dark-theme/color-component-tokens.js +0 -38
- package/es/themes/dark-theme/color-tokens.js +0 -2
- package/es/themes/dark-theme/create-dark-theme.js +0 -2
- package/es/themes/dark-theme/dark-theme.js +0 -2
- package/es/themes/light-theme/color-component-tokens.js +0 -38
- package/es/themes/light-theme/color-tokens.js +0 -2
- package/es/themes/light-theme/create-light-theme.js +0 -2
- package/es/themes/light-theme/light-theme.js +0 -2
- package/es/timepicker/timepicker.js +1 -8
- package/es/typography/index.js +1 -31
- package/esm/accordion/accordion.js +0 -11
- package/esm/accordion/panel.js +1 -3
- package/esm/accordion/stateless-accordion.js +2 -4
- package/esm/button/constants.js +1 -2
- package/esm/button/styled-components.js +2 -29
- package/esm/checkbox/checkbox.js +7 -30
- package/esm/checkbox/constants.js +2 -1
- package/esm/checkbox/index.js +1 -1
- package/esm/checkbox/styled-components.js +52 -147
- package/esm/data-table/column-categorical.js +1 -1
- package/esm/data-table/column-datetime.js +1 -1
- package/esm/data-table/column.js +6 -2
- package/esm/data-table/data-table.js +1 -1
- package/esm/data-table/header-cell.js +3 -0
- package/esm/datepicker/calendar.js +15 -7
- package/esm/datepicker/constants.js +8 -0
- package/esm/datepicker/datepicker.js +60 -30
- package/esm/datepicker/day.js +84 -34
- package/esm/datepicker/month.js +3 -1
- package/esm/datepicker/styled-components.js +24 -2
- package/esm/datepicker/types.js +1 -1
- package/esm/datepicker/utils/date-helpers.js +30 -0
- package/esm/datepicker/week.js +3 -1
- package/esm/file-uploader/file-uploader.js +4 -4
- package/esm/header-navigation/styled-components.js +3 -3
- package/esm/helpers/overrides.js +1 -2
- package/esm/input/styled-components.js +4 -4
- package/esm/layer/layer.js +4 -4
- package/esm/locale/index.js +0 -7
- package/esm/menu/styled-components.js +1 -1
- package/esm/modal/index.js +1 -1
- package/esm/modal/modal.js +28 -71
- package/esm/modal/styled-components.js +6 -38
- package/esm/phone-input/default-props.js +1 -1
- package/esm/phone-input/index.js +0 -4
- package/esm/phone-input/phone-input-lite.js +60 -37
- package/esm/radio/radio.js +1 -7
- package/esm/radio/radiogroup.js +3 -28
- package/esm/radio/styled-components.js +4 -5
- package/esm/rating/styled-components.js +3 -3
- package/esm/select/index.js +1 -2
- package/esm/select/select-component.js +4 -8
- package/esm/select/styled-components.js +4 -4
- package/esm/snackbar/styled-components.js +2 -2
- package/esm/spinner/index.js +3 -9
- package/esm/spinner/styled-components.js +2 -40
- package/esm/table/filter.js +3 -3
- package/esm/tag/styled-components.js +1 -1
- package/esm/themes/dark-theme/color-component-tokens.js +0 -38
- package/esm/themes/dark-theme/color-tokens.js +0 -2
- package/esm/themes/dark-theme/create-dark-theme.js +1 -2
- package/esm/themes/dark-theme/dark-theme.js +1 -2
- package/esm/themes/light-theme/color-component-tokens.js +0 -38
- package/esm/themes/light-theme/color-tokens.js +0 -2
- package/esm/themes/light-theme/create-light-theme.js +1 -2
- package/esm/themes/light-theme/light-theme.js +1 -2
- package/esm/timepicker/timepicker.js +1 -8
- package/esm/typography/index.js +1 -35
- package/file-uploader/file-uploader.js +3 -3
- package/file-uploader/file-uploader.js.flow +4 -4
- package/header-navigation/styled-components.js +3 -3
- package/header-navigation/styled-components.js.flow +3 -3
- package/helpers/overrides.js +1 -2
- package/helpers/overrides.js.flow +1 -1
- package/input/index.d.ts +5 -9
- package/input/styled-components.js +4 -4
- package/input/styled-components.js.flow +4 -4
- package/layer/layer.js +4 -4
- package/layer/layer.js.flow +4 -3
- package/locale/index.js +0 -7
- package/locale/index.js.flow +0 -7
- package/locale.ts +0 -1
- package/menu/index.d.ts +1 -3
- package/menu/styled-components.js +1 -1
- package/menu/styled-components.js.flow +1 -1
- package/modal/index.d.ts +4 -6
- package/modal/index.js +0 -6
- package/modal/index.js.flow +0 -1
- package/modal/modal.js +27 -70
- package/modal/modal.js.flow +17 -83
- package/modal/styled-components.js +7 -40
- package/modal/styled-components.js.flow +12 -44
- package/modal/types.js.flow +1 -10
- package/package.json +2 -2
- package/phone-input/default-props.js +1 -1
- package/phone-input/default-props.js.flow +1 -1
- package/phone-input/index.d.ts +0 -1
- package/phone-input/index.js +0 -36
- package/phone-input/index.js.flow +0 -4
- package/phone-input/phone-input-lite.js +63 -38
- package/phone-input/phone-input-lite.js.flow +66 -44
- package/radio/index.d.ts +4 -9
- package/radio/radio.js +1 -7
- package/radio/radio.js.flow +1 -8
- package/radio/radiogroup.js +3 -28
- package/radio/radiogroup.js.flow +2 -26
- package/radio/styled-components.js +4 -5
- package/radio/styled-components.js.flow +3 -4
- package/radio/types.js.flow +4 -15
- package/rating/styled-components.js +3 -3
- package/rating/styled-components.js.flow +3 -3
- package/select/index.d.ts +0 -2
- package/select/index.js +0 -6
- package/select/index.js.flow +0 -2
- package/select/select-component.js +4 -8
- package/select/select-component.js.flow +2 -3
- package/select/styled-components.js +4 -4
- package/select/styled-components.js.flow +4 -4
- package/snackbar/styled-components.js +1 -1
- package/snackbar/styled-components.js.flow +11 -11
- package/spinner/index.d.ts +5 -18
- package/spinner/index.js +2 -68
- package/spinner/index.js.flow +2 -27
- package/spinner/styled-components.js +9 -45
- package/spinner/styled-components.js.flow +2 -34
- package/spinner/types.js.flow +1 -19
- package/styles/types.js.flow +0 -2
- package/table/filter.js +3 -3
- package/table/filter.js.flow +3 -3
- package/tag/styled-components.js +1 -1
- package/tag/styled-components.js.flow +1 -1
- package/theme.ts +0 -81
- package/themes/dark-theme/color-component-tokens.js +0 -38
- package/themes/dark-theme/color-component-tokens.js.flow +0 -42
- package/themes/dark-theme/color-tokens.js +0 -2
- package/themes/dark-theme/color-tokens.js.flow +0 -2
- package/themes/dark-theme/create-dark-theme.js +1 -3
- package/themes/dark-theme/create-dark-theme.js.flow +0 -2
- package/themes/dark-theme/dark-theme.js +1 -3
- package/themes/dark-theme/dark-theme.js.flow +0 -2
- package/themes/light-theme/color-component-tokens.js +0 -38
- package/themes/light-theme/color-component-tokens.js.flow +0 -43
- package/themes/light-theme/color-tokens.js +0 -2
- package/themes/light-theme/color-tokens.js.flow +0 -2
- package/themes/light-theme/create-light-theme.js +1 -3
- package/themes/light-theme/create-light-theme.js.flow +0 -2
- package/themes/light-theme/light-theme.js +1 -3
- package/themes/light-theme/light-theme.js.flow +0 -2
- package/themes/types.js.flow +0 -68
- package/timepicker/timepicker.js +1 -8
- package/timepicker/timepicker.js.flow +4 -10
- package/typography/index.d.ts +0 -23
- package/typography/index.js +2 -57
- package/typography/index.js.flow +0 -31
- package/es/spinner/spinner.js +0 -68
- package/es/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -35
- package/es/themes/light-theme/color-deprecated-semantic-tokens.js +0 -35
- package/esm/spinner/spinner.js +0 -125
- package/esm/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -38
- package/esm/themes/light-theme/color-deprecated-semantic-tokens.js +0 -38
- package/spinner/spinner.js +0 -136
- package/spinner/spinner.js.flow +0 -75
- package/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -50
- package/themes/dark-theme/color-deprecated-semantic-tokens.js.flow +0 -42
- package/themes/light-theme/color-deprecated-semantic-tokens.js +0 -50
- package/themes/light-theme/color-deprecated-semantic-tokens.js.flow +0 -42
package/README.md
CHANGED
|
@@ -24,14 +24,14 @@ Add `baseui` and its peer dependencies to your project:
|
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
# using yarn
|
|
27
|
-
yarn add baseui styletron-react styletron-engine-
|
|
27
|
+
yarn add baseui styletron-react styletron-engine-monolithic
|
|
28
28
|
|
|
29
29
|
# using npm
|
|
30
|
-
npm install baseui styletron-react styletron-engine-
|
|
30
|
+
npm install baseui styletron-react styletron-engine-monolithic
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
```javascript
|
|
34
|
-
import {Client as Styletron} from 'styletron-engine-
|
|
34
|
+
import {Client as Styletron} from 'styletron-engine-monolithic';
|
|
35
35
|
import {Provider as StyletronProvider} from 'styletron-react';
|
|
36
36
|
import {LightTheme, BaseProvider, styled} from 'baseui';
|
|
37
37
|
import {StatefulInput} from 'baseui/input';
|
package/accordion/accordion.js
CHANGED
|
@@ -195,7 +195,6 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
195
195
|
accordion = _this$props2.accordion,
|
|
196
196
|
disabled = _this$props2.disabled,
|
|
197
197
|
children = _this$props2.children,
|
|
198
|
-
renderPanelContent = _this$props2.renderPanelContent,
|
|
199
198
|
renderAll = _this$props2.renderAll,
|
|
200
199
|
overrides = _this$props2.overrides; // flowlint-next-line unclear-type:off
|
|
201
200
|
|
|
@@ -220,7 +219,6 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
220
219
|
ref: itemRef,
|
|
221
220
|
expanded: isExpanded || child.props.expanded,
|
|
222
221
|
accordion: accordion,
|
|
223
|
-
renderPanelContent: renderPanelContent,
|
|
224
222
|
renderAll: renderAll,
|
|
225
223
|
overrides: child.props.overrides || overrides,
|
|
226
224
|
disabled: child.props.disabled || disabled,
|
|
@@ -235,14 +233,6 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
235
233
|
return /*#__PURE__*/React.cloneElement(child, props);
|
|
236
234
|
});
|
|
237
235
|
}
|
|
238
|
-
}, {
|
|
239
|
-
key: "componentDidMount",
|
|
240
|
-
value: function componentDidMount() {
|
|
241
|
-
// TODO(v11)
|
|
242
|
-
if (process.env.NODE_ENV !== "production" && this.props.renderPanelContent) {
|
|
243
|
-
console.warn('baseui:Accordion The `renderPanelContent` prop is deprecated. Please update your code to use `renderAll`.');
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
236
|
}, {
|
|
247
237
|
key: "render",
|
|
248
238
|
value: function render() {
|
|
@@ -278,7 +268,6 @@ _defineProperty(Accordion, "defaultProps", {
|
|
|
278
268
|
onChange: function onChange() {},
|
|
279
269
|
overrides: {},
|
|
280
270
|
renderAll: false,
|
|
281
|
-
renderPanelContent: false,
|
|
282
271
|
stateReducer: function stateReducer(type, newState) {
|
|
283
272
|
return newState;
|
|
284
273
|
}
|
|
@@ -22,7 +22,6 @@ export default class Accordion extends React.Component<AccordionPropsT, Accordio
|
|
|
22
22
|
onChange: () => {},
|
|
23
23
|
overrides: {},
|
|
24
24
|
renderAll: false,
|
|
25
|
-
renderPanelContent: false,
|
|
26
25
|
stateReducer: (type, newState) => newState,
|
|
27
26
|
};
|
|
28
27
|
|
|
@@ -105,7 +104,7 @@ export default class Accordion extends React.Component<AccordionPropsT, Accordio
|
|
|
105
104
|
|
|
106
105
|
getItems() {
|
|
107
106
|
const { expanded } = this.state;
|
|
108
|
-
const { accordion, disabled, children,
|
|
107
|
+
const { accordion, disabled, children, renderAll, overrides } = this.props;
|
|
109
108
|
// flowlint-next-line unclear-type:off
|
|
110
109
|
return React.Children.map(children, (child: any, index) => {
|
|
111
110
|
if (!child) return;
|
|
@@ -127,7 +126,6 @@ export default class Accordion extends React.Component<AccordionPropsT, Accordio
|
|
|
127
126
|
ref: itemRef,
|
|
128
127
|
expanded: isExpanded || child.props.expanded,
|
|
129
128
|
accordion,
|
|
130
|
-
renderPanelContent,
|
|
131
129
|
renderAll,
|
|
132
130
|
overrides: child.props.overrides || overrides,
|
|
133
131
|
disabled: child.props.disabled || disabled,
|
|
@@ -137,15 +135,6 @@ export default class Accordion extends React.Component<AccordionPropsT, Accordio
|
|
|
137
135
|
});
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
componentDidMount() {
|
|
141
|
-
// TODO(v11)
|
|
142
|
-
if (__DEV__ && this.props.renderPanelContent) {
|
|
143
|
-
console.warn(
|
|
144
|
-
'baseui:Accordion The `renderPanelContent` prop is deprecated. Please update your code to use `renderAll`.'
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
138
|
render() {
|
|
150
139
|
const { overrides = {} } = this.props;
|
|
151
140
|
const { Root: RootOverride } = overrides;
|
package/accordion/index.d.ts
CHANGED
|
@@ -37,7 +37,6 @@ export interface AccordionProps {
|
|
|
37
37
|
onChange?: (args: {expanded: React.Key[]}) => any;
|
|
38
38
|
overrides?: AccordionOverrides<SharedProps>;
|
|
39
39
|
stateReducer?: StateReducer<AccordionState>;
|
|
40
|
-
renderPanelContent?: boolean;
|
|
41
40
|
renderAll?: boolean;
|
|
42
41
|
}
|
|
43
42
|
|
|
@@ -48,7 +47,6 @@ export type StatelessAccordionProps = {
|
|
|
48
47
|
expanded: React.Key[];
|
|
49
48
|
onChange?: (args: {expanded: React.Key[]; key: React.Key}) => any;
|
|
50
49
|
overrides?: AccordionOverrides<SharedProps> & PanelOverrides<SharedProps>;
|
|
51
|
-
renderPanelContent?: boolean;
|
|
52
50
|
renderAll?: boolean;
|
|
53
51
|
};
|
|
54
52
|
|
|
@@ -85,7 +83,6 @@ export interface SharedPanelProps {
|
|
|
85
83
|
onKeyDown?: (e: KeyboardEvent) => any;
|
|
86
84
|
overrides?: PanelOverrides<SharedProps>;
|
|
87
85
|
title?: React.ReactNode;
|
|
88
|
-
renderPanelContent?: boolean;
|
|
89
86
|
renderAll?: boolean;
|
|
90
87
|
}
|
|
91
88
|
|
package/accordion/panel.js
CHANGED
|
@@ -58,8 +58,6 @@ var Panel = function Panel(_ref, ref) {
|
|
|
58
58
|
overrides = _ref$overrides === void 0 ? {} : _ref$overrides,
|
|
59
59
|
_ref$title = _ref.title,
|
|
60
60
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
61
|
-
_ref$renderPanelConte = _ref.renderPanelContent,
|
|
62
|
-
renderPanelContent = _ref$renderPanelConte === void 0 ? false : _ref$renderPanelConte,
|
|
63
61
|
_ref$renderAll = _ref.renderAll,
|
|
64
62
|
renderAll = _ref$renderAll === void 0 ? false : _ref$renderAll;
|
|
65
63
|
|
|
@@ -241,7 +239,7 @@ var Panel = function Panel(_ref, ref) {
|
|
|
241
239
|
ref: _animateRef
|
|
242
240
|
}, sharedProps, contentProps, ariaControls ? {
|
|
243
241
|
id: ariaControls
|
|
244
|
-
} : {}), localState.expanded || renderAll ||
|
|
242
|
+
} : {}), localState.expanded || renderAll || localState.animationInProgress ? children : null)));
|
|
245
243
|
});
|
|
246
244
|
};
|
|
247
245
|
|
package/accordion/panel.js.flow
CHANGED
|
@@ -31,7 +31,6 @@ const Panel = (
|
|
|
31
31
|
onKeyDown = () => {},
|
|
32
32
|
overrides = {},
|
|
33
33
|
title = '',
|
|
34
|
-
renderPanelContent = false,
|
|
35
34
|
renderAll = false,
|
|
36
35
|
}: PanelPropsT,
|
|
37
36
|
ref
|
|
@@ -219,12 +218,7 @@ const Panel = (
|
|
|
219
218
|
{...contentProps}
|
|
220
219
|
{...(ariaControls ? { id: ariaControls } : {})}
|
|
221
220
|
>
|
|
222
|
-
{localState.expanded ||
|
|
223
|
-
renderAll ||
|
|
224
|
-
renderPanelContent ||
|
|
225
|
-
localState.animationInProgress
|
|
226
|
-
? children
|
|
227
|
-
: null}
|
|
221
|
+
{localState.expanded || renderAll || localState.animationInProgress ? children : null}
|
|
228
222
|
</Content>
|
|
229
223
|
</ContentAnimationContainer>
|
|
230
224
|
</PanelContainer>
|
|
@@ -52,8 +52,7 @@ function StatelessAccordion(_ref) {
|
|
|
52
52
|
onChange = _ref.onChange,
|
|
53
53
|
_ref$overrides = _ref.overrides,
|
|
54
54
|
overrides = _ref$overrides === void 0 ? {} : _ref$overrides,
|
|
55
|
-
renderAll = _ref.renderAll
|
|
56
|
-
renderPanelContent = _ref.renderPanelContent;
|
|
55
|
+
renderAll = _ref.renderAll;
|
|
57
56
|
|
|
58
57
|
var RootOverrides = overrides.Root,
|
|
59
58
|
PanelOverrides = _objectWithoutProperties(overrides, ["Root"]);
|
|
@@ -97,8 +96,7 @@ function StatelessAccordion(_ref) {
|
|
|
97
96
|
});
|
|
98
97
|
} : onChange,
|
|
99
98
|
overrides: child.props.overrides || PanelOverrides,
|
|
100
|
-
renderAll: renderAll
|
|
101
|
-
renderPanelContent: renderPanelContent
|
|
99
|
+
renderAll: renderAll
|
|
102
100
|
});
|
|
103
101
|
}));
|
|
104
102
|
}
|
|
@@ -18,7 +18,6 @@ function StatelessAccordion({
|
|
|
18
18
|
onChange,
|
|
19
19
|
overrides = {},
|
|
20
20
|
renderAll,
|
|
21
|
-
renderPanelContent,
|
|
22
21
|
}: StatelessAccordionPropsT) {
|
|
23
22
|
const { Root: RootOverrides, ...PanelOverrides } = overrides;
|
|
24
23
|
const [Root, rootProps] = getOverrides(RootOverrides, StyledRoot);
|
|
@@ -53,7 +52,6 @@ function StatelessAccordion({
|
|
|
53
52
|
: onChange,
|
|
54
53
|
overrides: child.props.overrides || PanelOverrides,
|
|
55
54
|
renderAll,
|
|
56
|
-
renderPanelContent,
|
|
57
55
|
});
|
|
58
56
|
})}
|
|
59
57
|
</Root>
|
package/accordion/types.js.flow
CHANGED
|
@@ -77,11 +77,6 @@ export type AccordionPropsT = {
|
|
|
77
77
|
/** Handler called each time the component state changes.
|
|
78
78
|
* Used to override default state-change functionality. */
|
|
79
79
|
stateReducer: StateReducerT,
|
|
80
|
-
/**
|
|
81
|
-
* Allows users to render all child content whether a panel is expanded or not
|
|
82
|
-
* for SEO purposed
|
|
83
|
-
*/
|
|
84
|
-
renderPanelContent?: boolean,
|
|
85
80
|
/**
|
|
86
81
|
* Allows users to render all child content whether a panel is expanded or not
|
|
87
82
|
* for SEO purposed
|
package/button/constants.js
CHANGED
package/button/constants.js.flow
CHANGED
package/button/index.d.ts
CHANGED
|
@@ -215,14 +215,6 @@ function getLoadingSpinnerColors(_ref8) {
|
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
case _constants.KIND.minimal:
|
|
219
|
-
{
|
|
220
|
-
return {
|
|
221
|
-
foreground: $theme.colors.buttonMinimalSpinnerForeground,
|
|
222
|
-
background: $theme.colors.buttonMinimalSpinnerBackground
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
218
|
case _constants.KIND.primary:
|
|
227
219
|
default:
|
|
228
220
|
{
|
|
@@ -291,7 +283,7 @@ function getDisabledStyles(_ref11) {
|
|
|
291
283
|
color: $theme.colors.buttonDisabledActiveText,
|
|
292
284
|
backgroundColor: $theme.colors.buttonDisabledActiveFill
|
|
293
285
|
};
|
|
294
|
-
} else if ($kind === _constants.KIND.
|
|
286
|
+
} else if ($kind === _constants.KIND.tertiary) {
|
|
295
287
|
return {
|
|
296
288
|
backgroundColor: $theme.colors.buttonTertiaryDisabledActiveFill,
|
|
297
289
|
color: $theme.colors.buttonTertiaryDisabledActiveText
|
|
@@ -300,7 +292,7 @@ function getDisabledStyles(_ref11) {
|
|
|
300
292
|
}
|
|
301
293
|
|
|
302
294
|
return {
|
|
303
|
-
backgroundColor: $kind === _constants.KIND.
|
|
295
|
+
backgroundColor: $kind === _constants.KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
|
|
304
296
|
color: $theme.colors.buttonDisabledText
|
|
305
297
|
};
|
|
306
298
|
}
|
|
@@ -429,25 +421,6 @@ function getColorStyles(_ref13) {
|
|
|
429
421
|
}
|
|
430
422
|
};
|
|
431
423
|
|
|
432
|
-
case _constants.KIND.minimal:
|
|
433
|
-
if ($isSelected) {
|
|
434
|
-
return {
|
|
435
|
-
color: $theme.colors.buttonMinimalSelectedText,
|
|
436
|
-
backgroundColor: $theme.colors.buttonMinimalSelectedFill
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
return {
|
|
441
|
-
color: $theme.colors.buttonMinimalText,
|
|
442
|
-
backgroundColor: $theme.colors.buttonMinimalFill,
|
|
443
|
-
':hover': {
|
|
444
|
-
backgroundColor: $isLoading ? $theme.colors.buttonMinimalActive : $theme.colors.buttonMinimalHover
|
|
445
|
-
},
|
|
446
|
-
':active': {
|
|
447
|
-
backgroundColor: $theme.colors.buttonMinimalActive
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
|
|
451
424
|
default:
|
|
452
425
|
return Object.freeze({});
|
|
453
426
|
}
|
|
@@ -175,12 +175,6 @@ function getLoadingSpinnerColors({ $theme, $kind, $disabled }) {
|
|
|
175
175
|
background: $theme.colors.buttonTertiarySpinnerBackground,
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
case KIND.minimal: {
|
|
179
|
-
return {
|
|
180
|
-
foreground: $theme.colors.buttonMinimalSpinnerForeground,
|
|
181
|
-
background: $theme.colors.buttonMinimalSpinnerBackground,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
178
|
case KIND.primary:
|
|
185
179
|
default: {
|
|
186
180
|
return {
|
|
@@ -234,7 +228,7 @@ function getDisabledStyles({ $theme, $kind, $isSelected, $disabled }) {
|
|
|
234
228
|
color: $theme.colors.buttonDisabledActiveText,
|
|
235
229
|
backgroundColor: $theme.colors.buttonDisabledActiveFill,
|
|
236
230
|
};
|
|
237
|
-
} else if ($kind === KIND.
|
|
231
|
+
} else if ($kind === KIND.tertiary) {
|
|
238
232
|
return {
|
|
239
233
|
backgroundColor: $theme.colors.buttonTertiaryDisabledActiveFill,
|
|
240
234
|
color: $theme.colors.buttonTertiaryDisabledActiveText,
|
|
@@ -243,10 +237,7 @@ function getDisabledStyles({ $theme, $kind, $isSelected, $disabled }) {
|
|
|
243
237
|
}
|
|
244
238
|
|
|
245
239
|
return {
|
|
246
|
-
backgroundColor:
|
|
247
|
-
$kind === KIND.minimal || $kind === KIND.tertiary
|
|
248
|
-
? 'transparent'
|
|
249
|
-
: $theme.colors.buttonDisabledFill,
|
|
240
|
+
backgroundColor: $kind === KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
|
|
250
241
|
color: $theme.colors.buttonDisabledText,
|
|
251
242
|
};
|
|
252
243
|
}
|
|
@@ -383,25 +374,6 @@ function getColorStyles({
|
|
|
383
374
|
backgroundColor: $theme.colors.buttonTertiaryActive,
|
|
384
375
|
},
|
|
385
376
|
};
|
|
386
|
-
case KIND.minimal:
|
|
387
|
-
if ($isSelected) {
|
|
388
|
-
return {
|
|
389
|
-
color: $theme.colors.buttonMinimalSelectedText,
|
|
390
|
-
backgroundColor: $theme.colors.buttonMinimalSelectedFill,
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
return {
|
|
394
|
-
color: $theme.colors.buttonMinimalText,
|
|
395
|
-
backgroundColor: $theme.colors.buttonMinimalFill,
|
|
396
|
-
':hover': {
|
|
397
|
-
backgroundColor: $isLoading
|
|
398
|
-
? $theme.colors.buttonMinimalActive
|
|
399
|
-
: $theme.colors.buttonMinimalHover,
|
|
400
|
-
},
|
|
401
|
-
':active': {
|
|
402
|
-
backgroundColor: $theme.colors.buttonMinimalActive,
|
|
403
|
-
},
|
|
404
|
-
};
|
|
405
377
|
default:
|
|
406
378
|
return Object.freeze({});
|
|
407
379
|
}
|
package/checkbox/checkbox.js
CHANGED
|
@@ -133,10 +133,6 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
_defineProperty(_assertThisInitialized(_this), "isToggle", function () {
|
|
137
|
-
return _this.props.checkmarkType === _constants.STYLE_TYPE.toggle || _this.props.checkmarkType === _constants.STYLE_TYPE.toggle_round;
|
|
138
|
-
});
|
|
139
|
-
|
|
140
136
|
return _this;
|
|
141
137
|
}
|
|
142
138
|
|
|
@@ -149,32 +145,19 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
149
145
|
|
|
150
146
|
if (autoFocus && inputRef.current) {
|
|
151
147
|
inputRef.current.focus();
|
|
152
|
-
} // TODO(v11)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (process.env.NODE_ENV !== "production") {
|
|
156
|
-
if (this.props.checkmarkType === _constants.STYLE_TYPE.toggle) {
|
|
157
|
-
console.warn("baseui:Checkbox The STYLE_TYPE.toggle value on the 'checkmarkType' prop does not conform to the current base design specification. " + 'Please update your code to STYLE_TYPE.toggle_round. This will be updated automatically in a future major version.');
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (this.props.isError) {
|
|
161
|
-
console.warn('baseui:Checkbox Property "isError" will be removed in the next major version. Use "error" property instead.');
|
|
162
|
-
}
|
|
163
148
|
}
|
|
164
149
|
}
|
|
165
150
|
}, {
|
|
166
151
|
key: "render",
|
|
167
152
|
value: function render() {
|
|
168
|
-
var checkmarkType = this.props.checkmarkType;
|
|
169
153
|
var _this$props2 = this.props,
|
|
170
154
|
_this$props2$override = _this$props2.overrides,
|
|
171
155
|
overrides = _this$props2$override === void 0 ? {} : _this$props2$override,
|
|
172
156
|
onChange = _this$props2.onChange,
|
|
173
157
|
_this$props2$labelPla = _this$props2.labelPlacement,
|
|
174
|
-
labelPlacement = _this$props2$labelPla === void 0 ? this.
|
|
158
|
+
labelPlacement = _this$props2$labelPla === void 0 ? this.props.checkmarkType === _constants.STYLE_TYPE.toggle ? 'left' : 'right' : _this$props2$labelPla,
|
|
175
159
|
inputRef = _this$props2.inputRef,
|
|
176
160
|
isIndeterminate = _this$props2.isIndeterminate,
|
|
177
|
-
isError = _this$props2.isError,
|
|
178
161
|
error = _this$props2.error,
|
|
179
162
|
disabled = _this$props2.disabled,
|
|
180
163
|
value = _this$props2.value,
|
|
@@ -189,7 +172,6 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
189
172
|
LabelOverride = overrides.Label,
|
|
190
173
|
InputOverride = overrides.Input,
|
|
191
174
|
ToggleOverride = overrides.Toggle,
|
|
192
|
-
ToggleInnerOverride = overrides.ToggleInner,
|
|
193
175
|
ToggleTrackOverride = overrides.ToggleTrack;
|
|
194
176
|
|
|
195
177
|
var Root = (0, _overrides.getOverride)(RootOverride) || _styledComponents.Root;
|
|
@@ -202,8 +184,6 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
202
184
|
|
|
203
185
|
var Toggle = (0, _overrides.getOverride)(ToggleOverride) || _styledComponents.Toggle;
|
|
204
186
|
|
|
205
|
-
var ToggleInner = (0, _overrides.getOverride)(ToggleInnerOverride) || _styledComponents.ToggleInner;
|
|
206
|
-
|
|
207
187
|
var ToggleTrack = (0, _overrides.getOverride)(ToggleTrackOverride) || _styledComponents.ToggleTrack;
|
|
208
188
|
|
|
209
189
|
var inputEvents = {
|
|
@@ -222,17 +202,14 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
222
202
|
$isFocusVisible: this.state.isFocusVisible,
|
|
223
203
|
$isHovered: this.state.isHovered,
|
|
224
204
|
$isActive: this.state.isActive,
|
|
225
|
-
$isError: isError,
|
|
226
205
|
$error: error,
|
|
227
206
|
$checked: checked,
|
|
228
207
|
$isIndeterminate: isIndeterminate,
|
|
229
208
|
$required: required,
|
|
230
209
|
$disabled: disabled,
|
|
231
|
-
$value: value
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
var labelComp = /*#__PURE__*/React.createElement(Label, _extends({
|
|
210
|
+
$value: value
|
|
211
|
+
};
|
|
212
|
+
var labelComp = children && /*#__PURE__*/React.createElement(Label, _extends({
|
|
236
213
|
$labelPlacement: labelPlacement
|
|
237
214
|
}, sharedProps, (0, _overrides.getOverrideProps)(LabelOverride)), this.props.containsInteractiveElement ?
|
|
238
215
|
/*#__PURE__*/
|
|
@@ -247,7 +224,7 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
247
224
|
"data-baseweb": "checkbox",
|
|
248
225
|
title: title || null,
|
|
249
226
|
$labelPlacement: labelPlacement
|
|
250
|
-
}, sharedProps, mouseEvents, (0, _overrides.getOverrideProps)(RootOverride)), (labelPlacement === 'top' || labelPlacement === 'left') && labelComp, this.
|
|
227
|
+
}, sharedProps, mouseEvents, (0, _overrides.getOverrideProps)(RootOverride)), (labelPlacement === 'top' || labelPlacement === 'left') && labelComp, this.props.checkmarkType === _constants.STYLE_TYPE.toggle ? /*#__PURE__*/React.createElement(ToggleTrack, _extends({}, sharedProps, (0, _overrides.getOverrideProps)(ToggleTrackOverride)), /*#__PURE__*/React.createElement(Toggle, _extends({}, sharedProps, (0, _overrides.getOverrideProps)(ToggleOverride)))) : /*#__PURE__*/React.createElement(Checkmark, _extends({}, sharedProps, (0, _overrides.getOverrideProps)(CheckmarkOverride))), /*#__PURE__*/React.createElement(Input, _extends({
|
|
251
228
|
value: value,
|
|
252
229
|
name: name,
|
|
253
230
|
checked: checked,
|
|
@@ -256,7 +233,7 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
256
233
|
"aria-checked": isIndeterminate ? 'mixed' : checked,
|
|
257
234
|
"aria-describedby": this.props['aria-describedby'],
|
|
258
235
|
"aria-errormessage": this.props['aria-errormessage'],
|
|
259
|
-
"aria-invalid": error ||
|
|
236
|
+
"aria-invalid": error || null,
|
|
260
237
|
"aria-required": required || null,
|
|
261
238
|
disabled: disabled,
|
|
262
239
|
type: type,
|
|
@@ -279,7 +256,6 @@ _defineProperty(StatelessCheckbox, "defaultProps", {
|
|
|
279
256
|
autoFocus: false,
|
|
280
257
|
isIndeterminate: false,
|
|
281
258
|
inputRef: /*#__PURE__*/React.createRef(),
|
|
282
|
-
isError: false,
|
|
283
259
|
error: false,
|
|
284
260
|
type: 'checkbox',
|
|
285
261
|
checkmarkType: _constants.STYLE_TYPE.default,
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
Label as StyledLabel,
|
|
15
15
|
Root as StyledRoot,
|
|
16
16
|
Toggle as StyledToggle,
|
|
17
|
-
ToggleInner as StyledToggleInner,
|
|
18
17
|
ToggleTrack as StyledToggleTrack,
|
|
19
18
|
} from './styled-components.js';
|
|
20
19
|
import { STYLE_TYPE } from './constants.js';
|
|
@@ -31,7 +30,6 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
31
30
|
autoFocus: false,
|
|
32
31
|
isIndeterminate: false,
|
|
33
32
|
inputRef: React.createRef(),
|
|
34
|
-
isError: false,
|
|
35
33
|
error: false,
|
|
36
34
|
type: 'checkbox',
|
|
37
35
|
checkmarkType: STYLE_TYPE.default,
|
|
@@ -56,21 +54,6 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
56
54
|
if (autoFocus && inputRef.current) {
|
|
57
55
|
inputRef.current.focus();
|
|
58
56
|
}
|
|
59
|
-
|
|
60
|
-
// TODO(v11)
|
|
61
|
-
if (__DEV__) {
|
|
62
|
-
if (this.props.checkmarkType === STYLE_TYPE.toggle) {
|
|
63
|
-
console.warn(
|
|
64
|
-
"baseui:Checkbox The STYLE_TYPE.toggle value on the 'checkmarkType' prop does not conform to the current base design specification. " +
|
|
65
|
-
'Please update your code to STYLE_TYPE.toggle_round. This will be updated automatically in a future major version.'
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
if (this.props.isError) {
|
|
69
|
-
console.warn(
|
|
70
|
-
'baseui:Checkbox Property "isError" will be removed in the next major version. Use "error" property instead.'
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
57
|
}
|
|
75
58
|
|
|
76
59
|
onMouseEnter = (e: SyntheticInputEvent<HTMLInputElement>) => {
|
|
@@ -109,22 +92,13 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
109
92
|
}
|
|
110
93
|
};
|
|
111
94
|
|
|
112
|
-
isToggle = () => {
|
|
113
|
-
return (
|
|
114
|
-
this.props.checkmarkType === STYLE_TYPE.toggle ||
|
|
115
|
-
this.props.checkmarkType === STYLE_TYPE.toggle_round
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
95
|
render() {
|
|
120
|
-
const { checkmarkType } = this.props;
|
|
121
96
|
const {
|
|
122
97
|
overrides = {},
|
|
123
98
|
onChange,
|
|
124
|
-
labelPlacement = this.
|
|
99
|
+
labelPlacement = this.props.checkmarkType === STYLE_TYPE.toggle ? 'left' : 'right',
|
|
125
100
|
inputRef,
|
|
126
101
|
isIndeterminate,
|
|
127
|
-
isError,
|
|
128
102
|
error,
|
|
129
103
|
disabled,
|
|
130
104
|
value,
|
|
@@ -142,7 +116,6 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
142
116
|
Label: LabelOverride,
|
|
143
117
|
Input: InputOverride,
|
|
144
118
|
Toggle: ToggleOverride,
|
|
145
|
-
ToggleInner: ToggleInnerOverride,
|
|
146
119
|
ToggleTrack: ToggleTrackOverride,
|
|
147
120
|
} = overrides;
|
|
148
121
|
|
|
@@ -151,7 +124,6 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
151
124
|
const Label = getOverride(LabelOverride) || StyledLabel;
|
|
152
125
|
const Input = getOverride(InputOverride) || StyledInput;
|
|
153
126
|
const Toggle = getOverride(ToggleOverride) || StyledToggle;
|
|
154
|
-
const ToggleInner = getOverride(ToggleInnerOverride) || StyledToggleInner;
|
|
155
127
|
const ToggleTrack = getOverride(ToggleTrackOverride) || StyledToggleTrack;
|
|
156
128
|
|
|
157
129
|
const inputEvents = {
|
|
@@ -170,17 +142,15 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
170
142
|
$isFocusVisible: this.state.isFocusVisible,
|
|
171
143
|
$isHovered: this.state.isHovered,
|
|
172
144
|
$isActive: this.state.isActive,
|
|
173
|
-
$isError: isError,
|
|
174
145
|
$error: error,
|
|
175
146
|
$checked: checked,
|
|
176
147
|
$isIndeterminate: isIndeterminate,
|
|
177
148
|
$required: required,
|
|
178
149
|
$disabled: disabled,
|
|
179
150
|
$value: value,
|
|
180
|
-
$checkmarkType: checkmarkType,
|
|
181
151
|
};
|
|
182
|
-
|
|
183
|
-
const labelComp = (
|
|
152
|
+
|
|
153
|
+
const labelComp = children && (
|
|
184
154
|
<Label $labelPlacement={labelPlacement} {...sharedProps} {...getOverrideProps(LabelOverride)}>
|
|
185
155
|
{this.props.containsInteractiveElement ? (
|
|
186
156
|
// Prevents the event from bubbling up to the label and moving focus to the radio button
|
|
@@ -191,6 +161,7 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
191
161
|
)}
|
|
192
162
|
</Label>
|
|
193
163
|
);
|
|
164
|
+
|
|
194
165
|
return (
|
|
195
166
|
<Root
|
|
196
167
|
data-baseweb="checkbox"
|
|
@@ -201,11 +172,9 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
201
172
|
{...getOverrideProps(RootOverride)}
|
|
202
173
|
>
|
|
203
174
|
{(labelPlacement === 'top' || labelPlacement === 'left') && labelComp}
|
|
204
|
-
{this.
|
|
175
|
+
{this.props.checkmarkType === STYLE_TYPE.toggle ? (
|
|
205
176
|
<ToggleTrack {...sharedProps} {...getOverrideProps(ToggleTrackOverride)}>
|
|
206
|
-
<Toggle {...sharedProps} {...getOverrideProps(ToggleOverride)}
|
|
207
|
-
<ToggleInner {...sharedProps} {...getOverrideProps(ToggleInnerOverride)} />
|
|
208
|
-
</Toggle>
|
|
177
|
+
<Toggle {...sharedProps} {...getOverrideProps(ToggleOverride)} />
|
|
209
178
|
</ToggleTrack>
|
|
210
179
|
) : (
|
|
211
180
|
<Checkmark {...sharedProps} {...getOverrideProps(CheckmarkOverride)} />
|
|
@@ -219,7 +188,7 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
219
188
|
aria-checked={isIndeterminate ? 'mixed' : checked}
|
|
220
189
|
aria-describedby={this.props['aria-describedby']}
|
|
221
190
|
aria-errormessage={this.props['aria-errormessage']}
|
|
222
|
-
aria-invalid={error ||
|
|
191
|
+
aria-invalid={error || null}
|
|
223
192
|
aria-required={required || null}
|
|
224
193
|
disabled={disabled}
|
|
225
194
|
type={type}
|
package/checkbox/constants.js
CHANGED
|
@@ -20,7 +20,8 @@ exports.STATE_TYPE = STATE_TYPE;
|
|
|
20
20
|
var STYLE_TYPE = Object.freeze({
|
|
21
21
|
default: 'default',
|
|
22
22
|
toggle: 'toggle',
|
|
23
|
-
|
|
23
|
+
// maintaining key with aliased value to assist in transition to v11 but will be removed soon after release
|
|
24
|
+
toggle_round: 'toggle'
|
|
24
25
|
});
|
|
25
26
|
exports.STYLE_TYPE = STYLE_TYPE;
|
|
26
27
|
var LABEL_PLACEMENT = Object.freeze({
|
|
@@ -14,7 +14,8 @@ export const STATE_TYPE = {
|
|
|
14
14
|
export const STYLE_TYPE = Object.freeze({
|
|
15
15
|
default: 'default',
|
|
16
16
|
toggle: 'toggle',
|
|
17
|
-
|
|
17
|
+
// maintaining key with aliased value to assist in transition to v11 but will be removed soon after release
|
|
18
|
+
toggle_round: 'toggle',
|
|
18
19
|
});
|
|
19
20
|
|
|
20
21
|
export const LABEL_PLACEMENT = Object.freeze({
|
package/checkbox/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
5
|
export interface STATE_TYPE {
|
|
6
6
|
change: 'CHANGE';
|
|
@@ -8,7 +8,7 @@ export interface STATE_TYPE {
|
|
|
8
8
|
export interface STYLE_TYPE {
|
|
9
9
|
default: 'default';
|
|
10
10
|
toggle: 'toggle';
|
|
11
|
-
toggle_round: '
|
|
11
|
+
toggle_round: 'toggle';
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface LABEL_PLACEMENT {
|
|
@@ -35,7 +35,7 @@ export type StateReducer = (
|
|
|
35
35
|
stateType: string,
|
|
36
36
|
nextState: CheckboxState,
|
|
37
37
|
currentState: CheckboxState,
|
|
38
|
-
event: React.SyntheticEvent<HTMLInputElement
|
|
38
|
+
event: React.SyntheticEvent<HTMLInputElement>
|
|
39
39
|
) => CheckboxState;
|
|
40
40
|
|
|
41
41
|
export interface StatefulContainerProps {
|
|
@@ -56,7 +56,6 @@ export const StatefulContainer: React.FC<StatefulContainerProps>;
|
|
|
56
56
|
export interface StatefulCheckboxProps {
|
|
57
57
|
overrides?: CheckboxOverrides;
|
|
58
58
|
disabled?: boolean;
|
|
59
|
-
isError?: boolean;
|
|
60
59
|
error?: boolean;
|
|
61
60
|
containsInteractiveElement?: boolean;
|
|
62
61
|
labelPlacement?: 'top' | 'right' | 'bottom' | 'left';
|
|
@@ -94,7 +93,6 @@ export interface CheckboxProps {
|
|
|
94
93
|
checked?: boolean;
|
|
95
94
|
disabled?: boolean;
|
|
96
95
|
required?: boolean;
|
|
97
|
-
isError?: boolean;
|
|
98
96
|
error?: boolean;
|
|
99
97
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
100
98
|
autoFocus?: boolean;
|
package/checkbox/index.js
CHANGED
|
@@ -51,12 +51,6 @@ Object.defineProperty(exports, "StyledToggle", {
|
|
|
51
51
|
return _styledComponents.Toggle;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
Object.defineProperty(exports, "StyledToggleInner", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _styledComponents.ToggleInner;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
54
|
Object.defineProperty(exports, "StyledToggleTrack", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
get: function get() {
|