baseui 10.11.1 → 11.0.0
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 +60 -13
- package/accordion/accordion.js.flow +49 -12
- package/accordion/index.d.ts +0 -3
- package/accordion/panel.js +7 -6
- package/accordion/panel.js.flow +20 -20
- 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 +52 -12
- package/es/accordion/panel.js +7 -5
- 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/stateful-container.js +0 -1
- 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 +32 -20
- 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 +60 -13
- package/esm/accordion/panel.js +7 -6
- 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/stateful-container.js +0 -1
- 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 +34 -19
- 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/stateful-container.js +0 -1
- package/menu/stateful-container.js.flow +0 -1
- 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 +10 -10
- 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/progress-bar/index.d.ts +3 -3
- 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 +8 -3
- package/select/index.js +0 -6
- package/select/index.js.flow +0 -2
- package/select/select-component.js +34 -19
- package/select/select-component.js.flow +29 -13
- package/select/styled-components.js +4 -4
- package/select/styled-components.js.flow +4 -4
- package/select/types.js.flow +11 -7
- 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
|
@@ -6,21 +6,19 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// @flow
|
|
9
|
-
import { styled
|
|
10
|
-
import { STYLE_TYPE } from './constants.js';
|
|
9
|
+
import { styled } from '../styles/index.js';
|
|
11
10
|
|
|
12
11
|
import type { SharedStylePropsT } from './types.js';
|
|
13
12
|
|
|
14
13
|
function getBorderColor(props) {
|
|
15
|
-
const { $disabled, $checked, $
|
|
16
|
-
props;
|
|
14
|
+
const { $disabled, $checked, $error, $isIndeterminate, $theme, $isFocusVisible } = props;
|
|
17
15
|
const { colors } = $theme;
|
|
18
16
|
if ($disabled) {
|
|
19
17
|
return colors.tickFillDisabled;
|
|
20
18
|
} else if ($checked || $isIndeterminate) {
|
|
21
19
|
return 'transparent';
|
|
22
|
-
} else if ($error
|
|
23
|
-
return colors.
|
|
20
|
+
} else if ($error) {
|
|
21
|
+
return colors.borderNegative;
|
|
24
22
|
} else if ($isFocusVisible) {
|
|
25
23
|
return colors.borderSelected;
|
|
26
24
|
} else {
|
|
@@ -62,29 +60,15 @@ function getLabelPadding(props) {
|
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
function getBackgroundColor(props) {
|
|
65
|
-
const {
|
|
66
|
-
$disabled,
|
|
67
|
-
$checked,
|
|
68
|
-
$isIndeterminate,
|
|
69
|
-
$isError,
|
|
70
|
-
$error,
|
|
71
|
-
$isHovered,
|
|
72
|
-
$isActive,
|
|
73
|
-
$theme,
|
|
74
|
-
$checkmarkType,
|
|
75
|
-
} = props;
|
|
76
|
-
const isToggle = $checkmarkType === STYLE_TYPE.toggle;
|
|
63
|
+
const { $disabled, $checked, $isIndeterminate, $error, $isHovered, $isActive, $theme } = props;
|
|
77
64
|
const { colors } = $theme;
|
|
78
65
|
if ($disabled) {
|
|
79
|
-
if (isToggle) {
|
|
80
|
-
return colors.toggleFillDisabled;
|
|
81
|
-
}
|
|
82
66
|
if ($checked || $isIndeterminate) {
|
|
83
67
|
return colors.tickFillDisabled;
|
|
84
68
|
} else {
|
|
85
69
|
return colors.tickFill;
|
|
86
70
|
}
|
|
87
|
-
} else if (
|
|
71
|
+
} else if ($error && ($isIndeterminate || $checked)) {
|
|
88
72
|
if ($isActive) {
|
|
89
73
|
return colors.tickFillErrorSelectedHoverActive;
|
|
90
74
|
} else if ($isHovered) {
|
|
@@ -92,7 +76,7 @@ function getBackgroundColor(props) {
|
|
|
92
76
|
} else {
|
|
93
77
|
return colors.tickFillErrorSelected;
|
|
94
78
|
}
|
|
95
|
-
} else if ($error
|
|
79
|
+
} else if ($error) {
|
|
96
80
|
if ($isActive) {
|
|
97
81
|
return colors.tickFillErrorHoverActive;
|
|
98
82
|
} else if ($isHovered) {
|
|
@@ -110,11 +94,11 @@ function getBackgroundColor(props) {
|
|
|
110
94
|
}
|
|
111
95
|
} else {
|
|
112
96
|
if ($isActive) {
|
|
113
|
-
return
|
|
97
|
+
return colors.tickFillActive;
|
|
114
98
|
} else if ($isHovered) {
|
|
115
|
-
return
|
|
99
|
+
return colors.tickFillHover;
|
|
116
100
|
} else {
|
|
117
|
-
return
|
|
101
|
+
return colors.tickFill;
|
|
118
102
|
}
|
|
119
103
|
}
|
|
120
104
|
}
|
|
@@ -137,13 +121,12 @@ export const Root = styled<SharedStylePropsT>('label', (props) => {
|
|
|
137
121
|
});
|
|
138
122
|
|
|
139
123
|
export const Checkmark = styled<SharedStylePropsT>('span', (props) => {
|
|
140
|
-
const { $checked, $disabled, $
|
|
141
|
-
props;
|
|
124
|
+
const { $checked, $disabled, $error, $isIndeterminate, $theme, $isFocusVisible } = props;
|
|
142
125
|
const { sizing, animation } = $theme;
|
|
143
126
|
|
|
144
127
|
const tickColor = $disabled
|
|
145
128
|
? $theme.colors.tickMarkFillDisabled
|
|
146
|
-
: $
|
|
129
|
+
: $error
|
|
147
130
|
? $theme.colors.tickMarkFillError
|
|
148
131
|
: $theme.colors.tickMarkFill;
|
|
149
132
|
|
|
@@ -208,10 +191,9 @@ export const Checkmark = styled<SharedStylePropsT>('span', (props) => {
|
|
|
208
191
|
});
|
|
209
192
|
|
|
210
193
|
export const Label = styled<SharedStylePropsT>('div', (props) => {
|
|
211
|
-
const { $theme
|
|
194
|
+
const { $theme } = props;
|
|
212
195
|
const { typography } = $theme;
|
|
213
196
|
return ({
|
|
214
|
-
flex: $checkmarkType === STYLE_TYPE.toggle ? 'auto' : null,
|
|
215
197
|
verticalAlign: 'middle',
|
|
216
198
|
...getLabelPadding(props),
|
|
217
199
|
color: getLabelColor(props),
|
|
@@ -232,146 +214,58 @@ export const Input = styled('input', {
|
|
|
232
214
|
});
|
|
233
215
|
|
|
234
216
|
export const Toggle = styled<SharedStylePropsT>('div', (props) => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
backgroundColor: props.$theme.colors.mono100,
|
|
243
|
-
borderTopLeftRadius: borderRadius,
|
|
244
|
-
borderTopRightRadius: borderRadius,
|
|
245
|
-
borderBottomRightRadius: borderRadius,
|
|
246
|
-
borderBottomLeftRadius: borderRadius,
|
|
247
|
-
boxShadow: props.$isFocusVisible
|
|
248
|
-
? `0 0 0 3px ${props.$theme.colors.accent}`
|
|
249
|
-
: props.$theme.lighting.shadow400,
|
|
250
|
-
outline: 'none',
|
|
251
|
-
display: 'flex',
|
|
252
|
-
justifyContent: 'center',
|
|
253
|
-
height: props.$theme.sizing.scale800,
|
|
254
|
-
width: props.$theme.sizing.scale800,
|
|
255
|
-
}: {});
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (props.$checkmarkType === STYLE_TYPE.toggle_round) {
|
|
259
|
-
let backgroundColor = props.$theme.colors.toggleFill;
|
|
260
|
-
if (props.$disabled) {
|
|
261
|
-
backgroundColor = props.$theme.colors.toggleFillDisabled;
|
|
262
|
-
} else if (props.$checked && (props.$error || props.$isError)) {
|
|
263
|
-
backgroundColor = props.$theme.colors.borderError;
|
|
264
|
-
} else if (props.$checked) {
|
|
265
|
-
backgroundColor = props.$theme.colors.toggleFillChecked;
|
|
266
|
-
}
|
|
267
|
-
return {
|
|
268
|
-
backgroundColor,
|
|
269
|
-
borderTopLeftRadius: '50%',
|
|
270
|
-
borderTopRightRadius: '50%',
|
|
271
|
-
borderBottomRightRadius: '50%',
|
|
272
|
-
borderBottomLeftRadius: '50%',
|
|
273
|
-
boxShadow: props.$isFocusVisible
|
|
274
|
-
? `0 0 0 3px ${props.$theme.colors.accent}`
|
|
275
|
-
: props.$isHovered && !props.$disabled
|
|
276
|
-
? props.$theme.lighting.shadow500
|
|
277
|
-
: props.$theme.lighting.shadow400,
|
|
278
|
-
outline: 'none',
|
|
279
|
-
height: props.$theme.sizing.scale700,
|
|
280
|
-
width: props.$theme.sizing.scale700,
|
|
281
|
-
transform: props.$checked
|
|
282
|
-
? `translateX(${props.$theme.direction === 'rtl' ? '-100%' : '100%'})`
|
|
283
|
-
: null,
|
|
284
|
-
transition: `transform ${props.$theme.animation.timing200}`,
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
return {};
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
export const ToggleInner = styled<SharedStylePropsT>('div', (props) => {
|
|
292
|
-
if (props.$checkmarkType === STYLE_TYPE.toggle) {
|
|
293
|
-
// eslint-disable-next-line no-inner-declarations
|
|
294
|
-
const backgroundColor = () => {
|
|
295
|
-
if (props.$disabled) {
|
|
296
|
-
return props.$theme.colors.sliderHandleInnerFillDisabled;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
if (props.$isActive && props.$checked) {
|
|
300
|
-
return props.$theme.colors.sliderHandleInnerFillSelectedActive;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
if (props.$isHovered && props.$checked) {
|
|
304
|
-
return props.$theme.colors.sliderHandleInnerFillSelectedHover;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
return props.$theme.colors.toggleTrackFill;
|
|
308
|
-
};
|
|
309
|
-
return {
|
|
310
|
-
height: props.$theme.sizing.scale300,
|
|
311
|
-
width: props.$theme.sizing.scale0,
|
|
312
|
-
borderTopLeftRadius: props.$theme.borders.radius100,
|
|
313
|
-
borderTopRightRadius: props.$theme.borders.radius100,
|
|
314
|
-
borderBottomRightRadius: props.$theme.borders.radius100,
|
|
315
|
-
borderBottomLeftRadius: props.$theme.borders.radius100,
|
|
316
|
-
backgroundColor: backgroundColor(),
|
|
317
|
-
};
|
|
217
|
+
let backgroundColor = props.$theme.colors.toggleFill;
|
|
218
|
+
if (props.$disabled) {
|
|
219
|
+
backgroundColor = props.$theme.colors.toggleFillDisabled;
|
|
220
|
+
} else if (props.$checked && props.$error) {
|
|
221
|
+
backgroundColor = props.$theme.colors.tickFillErrorSelected;
|
|
222
|
+
} else if (props.$checked) {
|
|
223
|
+
backgroundColor = props.$theme.colors.toggleFillChecked;
|
|
318
224
|
}
|
|
319
225
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
226
|
+
return {
|
|
227
|
+
backgroundColor,
|
|
228
|
+
borderTopLeftRadius: '50%',
|
|
229
|
+
borderTopRightRadius: '50%',
|
|
230
|
+
borderBottomRightRadius: '50%',
|
|
231
|
+
borderBottomLeftRadius: '50%',
|
|
232
|
+
boxShadow: props.$isFocusVisible
|
|
233
|
+
? `0 0 0 3px ${props.$theme.colors.accent}`
|
|
234
|
+
: props.$isHovered && !props.$disabled
|
|
235
|
+
? props.$theme.lighting.shadow500
|
|
236
|
+
: props.$theme.lighting.shadow400,
|
|
237
|
+
outline: 'none',
|
|
238
|
+
height: props.$theme.sizing.scale700,
|
|
239
|
+
width: props.$theme.sizing.scale700,
|
|
240
|
+
transform: props.$checked
|
|
241
|
+
? `translateX(${props.$theme.direction === 'rtl' ? '-100%' : '100%'})`
|
|
242
|
+
: null,
|
|
243
|
+
transition: `transform ${props.$theme.animation.timing200}`,
|
|
244
|
+
};
|
|
325
245
|
});
|
|
326
246
|
|
|
327
247
|
export const ToggleTrack = styled<SharedStylePropsT>('div', (props) => {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
alignItems: 'center',
|
|
334
|
-
backgroundColor: getBackgroundColor(props),
|
|
335
|
-
borderTopLeftRadius: borderRadius,
|
|
336
|
-
borderTopRightRadius: borderRadius,
|
|
337
|
-
borderBottomRightRadius: borderRadius,
|
|
338
|
-
borderBottomLeftRadius: borderRadius,
|
|
339
|
-
display: 'flex',
|
|
340
|
-
height: props.$theme.sizing.scale600,
|
|
341
|
-
justifyContent: props.$checked ? 'flex-end' : 'flex-start',
|
|
342
|
-
marginTop: props.$theme.sizing.scale100,
|
|
343
|
-
marginBottom: props.$theme.sizing.scale100,
|
|
344
|
-
marginLeft: props.$theme.sizing.scale100,
|
|
345
|
-
marginRight: props.$theme.sizing.scale100,
|
|
346
|
-
width: props.$theme.sizing.scale1000,
|
|
347
|
-
}: {});
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
if (props.$checkmarkType === STYLE_TYPE.toggle_round) {
|
|
351
|
-
let backgroundColor = props.$theme.colors.toggleTrackFill;
|
|
352
|
-
if (props.$disabled) {
|
|
353
|
-
backgroundColor = props.$theme.colors.toggleTrackFillDisabled;
|
|
354
|
-
} else if ((props.$error || props.$isError) && props.$checked) {
|
|
355
|
-
backgroundColor = props.$theme.colors.tickFillError;
|
|
356
|
-
}
|
|
357
|
-
return {
|
|
358
|
-
alignItems: 'center',
|
|
359
|
-
backgroundColor,
|
|
360
|
-
borderTopLeftRadius: '7px',
|
|
361
|
-
borderTopRightRadius: '7px',
|
|
362
|
-
borderBottomRightRadius: '7px',
|
|
363
|
-
borderBottomLeftRadius: '7px',
|
|
364
|
-
display: 'flex',
|
|
365
|
-
height: props.$theme.sizing.scale550,
|
|
366
|
-
marginTop: props.$theme.sizing.scale200,
|
|
367
|
-
marginBottom: props.$theme.sizing.scale100,
|
|
368
|
-
marginLeft: props.$theme.sizing.scale200,
|
|
369
|
-
marginRight: props.$theme.sizing.scale100,
|
|
370
|
-
width: props.$theme.sizing.scale1000,
|
|
371
|
-
};
|
|
248
|
+
let backgroundColor = props.$theme.colors.toggleTrackFill;
|
|
249
|
+
if (props.$disabled) {
|
|
250
|
+
backgroundColor = props.$theme.colors.toggleTrackFillDisabled;
|
|
251
|
+
} else if (props.$error && props.$checked) {
|
|
252
|
+
backgroundColor = props.$theme.colors.tickFillError;
|
|
372
253
|
}
|
|
373
|
-
|
|
374
|
-
|
|
254
|
+
return {
|
|
255
|
+
alignItems: 'center',
|
|
256
|
+
backgroundColor,
|
|
257
|
+
borderTopLeftRadius: '7px',
|
|
258
|
+
borderTopRightRadius: '7px',
|
|
259
|
+
borderBottomRightRadius: '7px',
|
|
260
|
+
borderBottomLeftRadius: '7px',
|
|
261
|
+
display: 'flex',
|
|
262
|
+
height: props.$theme.sizing.scale550,
|
|
263
|
+
marginTop: props.$theme.sizing.scale200,
|
|
264
|
+
marginBottom: props.$theme.sizing.scale100,
|
|
265
|
+
marginLeft: props.$theme.sizing.scale200,
|
|
266
|
+
marginRight: props.$theme.sizing.scale100,
|
|
267
|
+
width: props.$theme.sizing.scale1000,
|
|
268
|
+
};
|
|
375
269
|
});
|
|
376
270
|
|
|
377
271
|
declare var __DEV__: boolean;
|
package/checkbox/types.js.flow
CHANGED
|
@@ -27,7 +27,6 @@ export type DefaultPropsT = {
|
|
|
27
27
|
children?: React$Node,
|
|
28
28
|
checked: boolean,
|
|
29
29
|
disabled: boolean,
|
|
30
|
-
isError: boolean,
|
|
31
30
|
error: boolean,
|
|
32
31
|
autoFocus: boolean,
|
|
33
32
|
isIndeterminate: boolean,
|
|
@@ -63,8 +62,6 @@ export type PropsT = {
|
|
|
63
62
|
required?: boolean,
|
|
64
63
|
/** Renders checkbox in errored state. */
|
|
65
64
|
error?: boolean,
|
|
66
|
-
/** You should use error instead. */
|
|
67
|
-
isError?: boolean,
|
|
68
65
|
/** Used to get a ref to the input element. Useful for programmatically focusing the input */
|
|
69
66
|
inputRef: ReactRefT<HTMLInputElement>,
|
|
70
67
|
/** Focus the checkbox on initial render. */
|
|
@@ -195,14 +192,12 @@ export type SharedStylePropsT = {
|
|
|
195
192
|
$isFocusVisible: boolean,
|
|
196
193
|
$isHovered: boolean,
|
|
197
194
|
$isActive: boolean,
|
|
198
|
-
$isError: boolean,
|
|
199
195
|
$error: boolean,
|
|
200
196
|
$checked: boolean,
|
|
201
197
|
$isIndeterminate: boolean,
|
|
202
198
|
$required: boolean,
|
|
203
199
|
$disabled: boolean,
|
|
204
200
|
$value: string,
|
|
205
|
-
$checkmarkType: StyleTypeT,
|
|
206
201
|
$labelPlacement: LabelPlacementT,
|
|
207
202
|
};
|
|
208
203
|
|
|
@@ -79,7 +79,7 @@ function FilterQuickControls(props) {
|
|
|
79
79
|
var locale = React.useContext(_index7.LocaleContext);
|
|
80
80
|
return /*#__PURE__*/React.createElement(_index2.ButtonGroup, {
|
|
81
81
|
size: _index.SIZE.mini,
|
|
82
|
-
kind: _index.KIND.
|
|
82
|
+
kind: _index.KIND.tertiary
|
|
83
83
|
}, /*#__PURE__*/React.createElement(_index.Button, {
|
|
84
84
|
type: "button",
|
|
85
85
|
onClick: props.onSelectAll
|
|
@@ -54,7 +54,7 @@ function FilterQuickControls(props: { onSelectAll: () => void, onClearSelection:
|
|
|
54
54
|
const locale = React.useContext(LocaleContext);
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
|
-
<ButtonGroup size={SIZE.mini} kind={KIND.
|
|
57
|
+
<ButtonGroup size={SIZE.mini} kind={KIND.tertiary}>
|
|
58
58
|
<Button type="button" onClick={props.onSelectAll}>
|
|
59
59
|
{locale.datatable.categoricalFilterSelectAll}
|
|
60
60
|
</Button>
|
|
@@ -456,7 +456,7 @@ function DatetimeFilter(props) {
|
|
|
456
456
|
if (Array.isArray(date)) {
|
|
457
457
|
if (!date.length) return;
|
|
458
458
|
var nextDates = date.map(function (d, i) {
|
|
459
|
-
return (0, _index13.applyDateToTime)(rangeDates[i], d);
|
|
459
|
+
return d ? (0, _index13.applyDateToTime)(rangeDates[i], d) : null;
|
|
460
460
|
});
|
|
461
461
|
setRangeDates(nextDates);
|
|
462
462
|
}
|
|
@@ -382,7 +382,9 @@ function DatetimeFilter(props) {
|
|
|
382
382
|
onChange={({ date }) => {
|
|
383
383
|
if (Array.isArray(date)) {
|
|
384
384
|
if (!date.length) return;
|
|
385
|
-
const nextDates = date.map((d, i) =>
|
|
385
|
+
const nextDates = date.map((d, i) =>
|
|
386
|
+
d ? applyDateToTime(rangeDates[i], d) : null
|
|
387
|
+
);
|
|
386
388
|
setRangeDates(nextDates);
|
|
387
389
|
}
|
|
388
390
|
}}
|
package/data-table/column.js
CHANGED
|
@@ -84,7 +84,11 @@ function Column(options) {
|
|
|
84
84
|
display: 'flex',
|
|
85
85
|
height: '100%'
|
|
86
86
|
})
|
|
87
|
-
}, Boolean(props.onSelect) && /*#__PURE__*/React.createElement(
|
|
87
|
+
}, Boolean(props.onSelect) && /*#__PURE__*/React.createElement("span", {
|
|
88
|
+
className: css({
|
|
89
|
+
paddingRight: theme.sizing.scale300
|
|
90
|
+
})
|
|
91
|
+
}, /*#__PURE__*/React.createElement(_index.Checkbox, {
|
|
88
92
|
onChange: props.onSelect,
|
|
89
93
|
checked: props.isSelected,
|
|
90
94
|
overrides: {
|
|
@@ -95,7 +99,7 @@ function Column(options) {
|
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
|
-
}), /*#__PURE__*/React.createElement(ProvidedCell, props)));
|
|
102
|
+
})), /*#__PURE__*/React.createElement(ProvidedCell, props)));
|
|
99
103
|
}),
|
|
100
104
|
renderFilter: options.renderFilter || function () {
|
|
101
105
|
return null;
|
|
@@ -62,13 +62,15 @@ function Column<ValueT, FilterParamsT>(
|
|
|
62
62
|
})}
|
|
63
63
|
>
|
|
64
64
|
{Boolean(props.onSelect) && (
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
<span className={css({ paddingRight: theme.sizing.scale300 })}>
|
|
66
|
+
<Checkbox
|
|
67
|
+
onChange={props.onSelect}
|
|
68
|
+
checked={props.isSelected}
|
|
69
|
+
overrides={{
|
|
70
|
+
Checkmark: { style: { marginTop: null, marginBottom: null } },
|
|
71
|
+
}}
|
|
72
|
+
/>
|
|
73
|
+
</span>
|
|
72
74
|
)}
|
|
73
75
|
<ProvidedCell {...props} />
|
|
74
76
|
</div>
|
package/data-table/data-table.js
CHANGED
|
@@ -485,7 +485,7 @@ var InnerTableElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
485
485
|
});
|
|
486
486
|
},
|
|
487
487
|
size: _index.SIZE.compact,
|
|
488
|
-
kind: _index.KIND.
|
|
488
|
+
kind: _index.KIND.tertiary,
|
|
489
489
|
shape: _index.SHAPE.round,
|
|
490
490
|
overrides: {
|
|
491
491
|
BaseButton: {
|
|
@@ -111,6 +111,9 @@ var HeaderCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
111
111
|
onFocus: handleFocus,
|
|
112
112
|
onBlur: handleBlur
|
|
113
113
|
}, props.isSelectable && /*#__PURE__*/React.createElement("span", {
|
|
114
|
+
className: css({
|
|
115
|
+
paddingRight: theme.sizing.scale300
|
|
116
|
+
}),
|
|
114
117
|
ref: checkboxRef
|
|
115
118
|
}, /*#__PURE__*/React.createElement(_index.Checkbox, {
|
|
116
119
|
onChange: function onChange(e) {
|
|
@@ -97,7 +97,7 @@ const HeaderCell = React.forwardRef<HeaderCellPropsT, HTMLDivElement>((props, re
|
|
|
97
97
|
onBlur={handleBlur}
|
|
98
98
|
>
|
|
99
99
|
{props.isSelectable && (
|
|
100
|
-
<span ref={checkboxRef}>
|
|
100
|
+
<span className={css({ paddingRight: theme.sizing.scale300 })} ref={checkboxRef}>
|
|
101
101
|
<Checkbox
|
|
102
102
|
onChange={(e) => {
|
|
103
103
|
if (props.isSelectedAll || props.isSelectedIndeterminate) {
|
package/datepicker/calendar.js
CHANGED
|
@@ -339,10 +339,16 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
339
339
|
|
|
340
340
|
|
|
341
341
|
if (Array.isArray(data.date)) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
342
|
+
var start = data.date[0] ? _this.dateHelpers.applyDateToTime(newTimeState[0], data.date[0]) : null;
|
|
343
|
+
var end = data.date[1] ? _this.dateHelpers.applyDateToTime(newTimeState[1], data.date[1]) : null;
|
|
344
|
+
newTimeState[0] = start;
|
|
345
|
+
|
|
346
|
+
if (end) {
|
|
347
|
+
updatedDate = [start, end];
|
|
348
|
+
newTimeState[1] = end;
|
|
349
|
+
} else {
|
|
350
|
+
updatedDate = [start];
|
|
351
|
+
}
|
|
346
352
|
} else if (!Array.isArray(_this.props.value) && data.date) {
|
|
347
353
|
newTimeState[0] = _this.dateHelpers.applyDateToTime(newTimeState[0], data.date);
|
|
348
354
|
updatedDate = newTimeState[0];
|
|
@@ -374,7 +380,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
374
380
|
|
|
375
381
|
if (Array.isArray(_this.props.value)) {
|
|
376
382
|
var dates = _this.props.value.map(function (date, i) {
|
|
377
|
-
if (index === i) {
|
|
383
|
+
if (date && index === i) {
|
|
378
384
|
return _this.dateHelpers.applyTimeToDate(date, time);
|
|
379
385
|
}
|
|
380
386
|
|
|
@@ -382,7 +388,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
382
388
|
});
|
|
383
389
|
|
|
384
390
|
onChange({
|
|
385
|
-
date: dates
|
|
391
|
+
date: [dates[0], dates[1]]
|
|
386
392
|
});
|
|
387
393
|
} else {
|
|
388
394
|
var date = _this.dateHelpers.applyTimeToDate(_this.props.value, time);
|
|
@@ -452,7 +458,9 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
452
458
|
overrides: overrides,
|
|
453
459
|
value: _this.props.value,
|
|
454
460
|
peekNextMonth: _this.props.peekNextMonth,
|
|
455
|
-
fixedHeight: _this.props.fixedHeight
|
|
461
|
+
fixedHeight: _this.props.fixedHeight,
|
|
462
|
+
hasLockedBehavior: !!_this.props.hasLockedBehavior,
|
|
463
|
+
selectedInput: _this.props.selectedInput
|
|
456
464
|
})));
|
|
457
465
|
monthList.push( /*#__PURE__*/React.createElement("div", {
|
|
458
466
|
key: "month-component-".concat(i)
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import dateFnsAdapter from './utils/date-fns-adapter.js';
|
|
23
23
|
import DateHelpers from './utils/date-helpers.js';
|
|
24
24
|
import { getOverrides, mergeOverrides } from '../helpers/overrides.js';
|
|
25
|
-
import type { CalendarPropsT, CalendarInternalState } from './types.js';
|
|
25
|
+
import type { CalendarPropsT, CalendarInternalState, DateValueT } from './types.js';
|
|
26
26
|
import { DENSITY, ORIENTATION } from './constants.js';
|
|
27
27
|
|
|
28
28
|
export default class Calendar<T = Date> extends React.Component<
|
|
@@ -134,7 +134,7 @@ export default class Calendar<T = Date> extends React.Component<
|
|
|
134
134
|
return monthDelta >= 0 && monthDelta < (this.props.monthsShown || 1);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
getSingleDate(value:
|
|
137
|
+
getSingleDate(value: DateValueT<T>): ?T {
|
|
138
138
|
// need to check this.props.range but flow would complain
|
|
139
139
|
// at the return value in the else clause
|
|
140
140
|
if (Array.isArray(value)) {
|
|
@@ -337,21 +337,33 @@ export default class Calendar<T = Date> extends React.Component<
|
|
|
337
337
|
this.props.onDayMouseLeave && this.props.onDayMouseLeave(data);
|
|
338
338
|
};
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
/** Responsible for merging time values into date values. Note: the 'Day' component
|
|
341
|
+
* determines how the days themselves change when a new day is selected. */
|
|
342
|
+
handleDateChange: ({ date: DateValueT<T> }) => void = (data) => {
|
|
341
343
|
const { onChange = (params) => {} } = this.props;
|
|
342
344
|
let updatedDate = data.date;
|
|
343
345
|
// We'll need to update the date in time values of internal state
|
|
344
346
|
const newTimeState = [...this.state.time];
|
|
345
347
|
// Apply the currently selected time values (saved in state) to the updated date
|
|
346
348
|
if (Array.isArray(data.date)) {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
const start = data.date[0]
|
|
350
|
+
? this.dateHelpers.applyDateToTime(newTimeState[0], data.date[0])
|
|
351
|
+
: null;
|
|
352
|
+
const end = data.date[1]
|
|
353
|
+
? this.dateHelpers.applyDateToTime(newTimeState[1], data.date[1])
|
|
354
|
+
: null;
|
|
355
|
+
newTimeState[0] = start;
|
|
356
|
+
if (end) {
|
|
357
|
+
updatedDate = [start, end];
|
|
358
|
+
newTimeState[1] = end;
|
|
359
|
+
} else {
|
|
360
|
+
updatedDate = [start];
|
|
361
|
+
}
|
|
351
362
|
} else if (!Array.isArray(this.props.value) && data.date) {
|
|
352
363
|
newTimeState[0] = this.dateHelpers.applyDateToTime(newTimeState[0], data.date);
|
|
353
364
|
updatedDate = newTimeState[0];
|
|
354
365
|
}
|
|
366
|
+
|
|
355
367
|
// Update the date in time values of internal state
|
|
356
368
|
this.setState({ time: newTimeState });
|
|
357
369
|
onChange({ date: updatedDate });
|
|
@@ -367,12 +379,12 @@ export default class Calendar<T = Date> extends React.Component<
|
|
|
367
379
|
// with the date value set to the date with updated time
|
|
368
380
|
if (Array.isArray(this.props.value)) {
|
|
369
381
|
const dates = this.props.value.map((date, i) => {
|
|
370
|
-
if (index === i) {
|
|
382
|
+
if (date && index === i) {
|
|
371
383
|
return this.dateHelpers.applyTimeToDate(date, time);
|
|
372
384
|
}
|
|
373
385
|
return date;
|
|
374
386
|
});
|
|
375
|
-
onChange({ date: dates });
|
|
387
|
+
onChange({ date: [dates[0], dates[1]] });
|
|
376
388
|
} else {
|
|
377
389
|
const date = this.dateHelpers.applyTimeToDate(this.props.value, time);
|
|
378
390
|
onChange({ date });
|
|
@@ -452,6 +464,8 @@ export default class Calendar<T = Date> extends React.Component<
|
|
|
452
464
|
value={this.props.value}
|
|
453
465
|
peekNextMonth={this.props.peekNextMonth}
|
|
454
466
|
fixedHeight={this.props.fixedHeight}
|
|
467
|
+
hasLockedBehavior={!!this.props.hasLockedBehavior}
|
|
468
|
+
selectedInput={this.props.selectedInput}
|
|
455
469
|
/>
|
|
456
470
|
</CalendarContainer>
|
|
457
471
|
);
|
package/datepicker/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.DENSITY = exports.DEFAULT_MONTHS = exports.WEEKDAYS = exports.STATE_CHANGE_TYPE = exports.ORIENTATION = exports.ISO_MONTH_FORMAT = exports.ISO_FORMAT = exports.DISPLAY_FORMAT = void 0;
|
|
6
|
+
exports.RANGED_CALENDAR_BEHAVIOR = exports.INPUT_ROLE = exports.DENSITY = exports.DEFAULT_MONTHS = exports.WEEKDAYS = exports.STATE_CHANGE_TYPE = exports.ORIENTATION = exports.ISO_MONTH_FORMAT = exports.ISO_FORMAT = exports.DISPLAY_FORMAT = void 0;
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Copyright (c) Uber Technologies, Inc.
|
|
@@ -40,4 +40,14 @@ var DENSITY = {
|
|
|
40
40
|
high: 'high',
|
|
41
41
|
default: 'default'
|
|
42
42
|
};
|
|
43
|
-
exports.DENSITY = DENSITY;
|
|
43
|
+
exports.DENSITY = DENSITY;
|
|
44
|
+
var INPUT_ROLE = {
|
|
45
|
+
startDate: 'startDate',
|
|
46
|
+
endDate: 'endDate'
|
|
47
|
+
};
|
|
48
|
+
exports.INPUT_ROLE = INPUT_ROLE;
|
|
49
|
+
var RANGED_CALENDAR_BEHAVIOR = {
|
|
50
|
+
default: 'default',
|
|
51
|
+
locked: 'locked'
|
|
52
|
+
};
|
|
53
|
+
exports.RANGED_CALENDAR_BEHAVIOR = RANGED_CALENDAR_BEHAVIOR;
|
|
@@ -33,6 +33,16 @@ export const DENSITY = {
|
|
|
33
33
|
default: 'default',
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
export const INPUT_ROLE = {
|
|
37
|
+
startDate: 'startDate',
|
|
38
|
+
endDate: 'endDate',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const RANGED_CALENDAR_BEHAVIOR = {
|
|
42
|
+
default: 'default',
|
|
43
|
+
locked: 'locked',
|
|
44
|
+
};
|
|
45
|
+
|
|
36
46
|
declare var __DEV__: boolean;
|
|
37
47
|
declare var __NODE__: boolean;
|
|
38
48
|
declare var __BROWSER__: boolean;
|