baseui 0.0.0-next-0494f3c → 0.0.0-next-79ec2e2
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/es/select/select-component.js +1 -1
- package/es/tokens/index.js +1 -1
- package/esm/select/select-component.js +1 -1
- package/esm/tokens/index.js +1 -1
- package/package.json +1 -1
- package/select/select-component.js +1 -1
- package/styles/types.d.ts +4 -4
- package/styles/types.js.flow +5 -5
- package/themes/dark-theme/color-component-tokens.d.ts +2 -2
- package/themes/dark-theme/color-component-tokens.js.flow +2 -2
- package/themes/dark-theme/color-semantic-tokens.d.ts +2 -2
- package/themes/dark-theme/color-semantic-tokens.js.flow +2 -2
- package/themes/dark-theme/color-tokens.d.ts +2 -2
- package/themes/dark-theme/color-tokens.js.flow +2 -2
- package/themes/dark-theme/create-dark-theme.js.flow +2 -2
- package/themes/index.d.ts +1 -1
- package/themes/light-theme/color-component-tokens.d.ts +2 -2
- package/themes/light-theme/color-component-tokens.js.flow +2 -2
- package/themes/light-theme/color-semantic-tokens.d.ts +2 -2
- package/themes/light-theme/color-semantic-tokens.js.flow +2 -2
- package/themes/light-theme/color-tokens.d.ts +2 -2
- package/themes/light-theme/color-tokens.js.flow +2 -2
- package/themes/light-theme/create-light-theme.js.flow +5 -5
- package/themes/types.d.ts +2 -2
- package/themes/types.js.flow +2 -2
- package/tokens/colors.d.ts +2 -2
- package/tokens/colors.js.flow +2 -2
- package/tokens/index.d.ts +3 -3
- package/tokens/types.d.ts +1 -1
- package/tokens/types.js.flow +1 -1
|
@@ -285,7 +285,7 @@ class Select extends React.Component {
|
|
|
285
285
|
switch (event.keyCode) {
|
|
286
286
|
case 8:
|
|
287
287
|
// backspace
|
|
288
|
-
if (!this.state.inputValue && this.props.backspaceRemoves) {
|
|
288
|
+
if (!this.state.inputValue && this.props.clearable && this.props.backspaceRemoves) {
|
|
289
289
|
event.preventDefault();
|
|
290
290
|
this.backspaceValue();
|
|
291
291
|
}
|
package/es/tokens/index.js
CHANGED
|
@@ -6,4 +6,4 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
export { default as colors } from './colors';
|
|
8
8
|
export * from './types';
|
|
9
|
-
/** @deprecated use
|
|
9
|
+
/** @deprecated use PrimitiveColorTokens instead. To be removed in future versions.*/
|
|
@@ -361,7 +361,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
361
361
|
switch (event.keyCode) {
|
|
362
362
|
case 8:
|
|
363
363
|
// backspace
|
|
364
|
-
if (!_this.state.inputValue && _this.props.backspaceRemoves) {
|
|
364
|
+
if (!_this.state.inputValue && _this.props.clearable && _this.props.backspaceRemoves) {
|
|
365
365
|
event.preventDefault();
|
|
366
366
|
|
|
367
367
|
_this.backspaceValue();
|
package/esm/tokens/index.js
CHANGED
|
@@ -6,4 +6,4 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
export { default as colors } from './colors';
|
|
8
8
|
export * from './types';
|
|
9
|
-
/** @deprecated use
|
|
9
|
+
/** @deprecated use PrimitiveColorTokens instead. To be removed in future versions.*/
|
package/package.json
CHANGED
|
@@ -382,7 +382,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
382
382
|
switch (event.keyCode) {
|
|
383
383
|
case 8:
|
|
384
384
|
// backspace
|
|
385
|
-
if (!_this.state.inputValue && _this.props.backspaceRemoves) {
|
|
385
|
+
if (!_this.state.inputValue && _this.props.clearable && _this.props.backspaceRemoves) {
|
|
386
386
|
event.preventDefault();
|
|
387
387
|
|
|
388
388
|
_this.backspaceValue();
|
package/styles/types.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type { IconProps } from '../icon';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { FoundationColorTokens, ComponentColorTokens, SemanticColorTokens, Animation, Breakpoints, Border, Borders, Font, Grid, Lighting, MediaQuery, Sizing, Typography, ZIndex } from '../themes';
|
|
4
|
+
import type { PrimitiveColorTokens } from '../tokens';
|
|
5
5
|
export type { Animation, Breakpoints, Border, Borders, Font, Grid, Lighting, MediaQuery, Sizing, Typography, ZIndex, };
|
|
6
|
-
export type
|
|
6
|
+
export type ColorTokens = {} & PrimitiveColorTokens & FoundationColorTokens & ComponentColorTokens & SemanticColorTokens;
|
|
7
7
|
export type Theme = {
|
|
8
8
|
name: string;
|
|
9
9
|
animation: Animation;
|
|
10
10
|
borders: Borders;
|
|
11
11
|
breakpoints: Breakpoints;
|
|
12
|
-
colors:
|
|
12
|
+
colors: ColorTokens;
|
|
13
13
|
direction: 'auto' | 'rtl' | 'ltr';
|
|
14
14
|
grid: Grid;
|
|
15
15
|
icons?: Icon;
|
package/styles/types.js.flow
CHANGED
|
@@ -9,7 +9,7 @@ import type { ComponentType } from 'react';
|
|
|
9
9
|
import type { IconPropsT } from '../icon/types.js';
|
|
10
10
|
|
|
11
11
|
import type {
|
|
12
|
-
|
|
12
|
+
FoundationColorTokensT,
|
|
13
13
|
ComponentColorTokensT,
|
|
14
14
|
SemanticColorTokensT,
|
|
15
15
|
AnimationT,
|
|
@@ -24,7 +24,7 @@ import type {
|
|
|
24
24
|
TypographyT,
|
|
25
25
|
ZIndexT,
|
|
26
26
|
} from '../themes/types.js';
|
|
27
|
-
import type {
|
|
27
|
+
import type { PrimitiveColorTokensT } from '../tokens/types.js';
|
|
28
28
|
|
|
29
29
|
export type {
|
|
30
30
|
AnimationT,
|
|
@@ -41,9 +41,9 @@ export type {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// $FlowFixMe[cannot-spread-inexact]
|
|
44
|
-
export type
|
|
44
|
+
export type ColorTokensT = {
|
|
45
45
|
...PrimitiveColorTokensT,
|
|
46
|
-
...
|
|
46
|
+
...FoundationColorTokensT,
|
|
47
47
|
...ComponentColorTokensT,
|
|
48
48
|
...SemanticColorTokensT,
|
|
49
49
|
};
|
|
@@ -53,7 +53,7 @@ export type ThemeT = {|
|
|
|
53
53
|
animation: AnimationT,
|
|
54
54
|
borders: BordersT,
|
|
55
55
|
breakpoints: BreakpointsT,
|
|
56
|
-
colors:
|
|
56
|
+
colors: ColorTokensT,
|
|
57
57
|
direction: 'auto' | 'rtl' | 'ltr',
|
|
58
58
|
grid: GridT,
|
|
59
59
|
icons?: IconT,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const _default: (themePrimitives?:
|
|
1
|
+
import type { FoundationColorTokens, ComponentColorTokens } from '../types';
|
|
2
|
+
declare const _default: (themePrimitives?: FoundationColorTokens) => ComponentColorTokens;
|
|
3
3
|
export default _default;
|
|
@@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import defaultFoundationColorTokens from './color-tokens.js';
|
|
9
|
-
import type {
|
|
9
|
+
import type { FoundationColorTokensT, ComponentColorTokensT } from '../types.js';
|
|
10
10
|
|
|
11
11
|
const tagHoverBackground = `rgba(255, 255, 255, 0.2)`;
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ const tagHoverBackground = `rgba(255, 255, 255, 0.2)`;
|
|
|
16
16
|
// Due to the legacy `createTheme` type the values
|
|
17
17
|
// need to be overrideable through primitives
|
|
18
18
|
export default (
|
|
19
|
-
themePrimitives:
|
|
19
|
+
themePrimitives: FoundationColorTokensT = defaultFoundationColorTokens
|
|
20
20
|
): ComponentColorTokensT => ({
|
|
21
21
|
bannerActionLowInfo: themePrimitives.accent600,
|
|
22
22
|
bannerActionLowNegative: themePrimitives.negative600,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const _default: (foundation?:
|
|
1
|
+
import type { FoundationColorTokens, SemanticColorTokens } from '../types';
|
|
2
|
+
declare const _default: (foundation?: FoundationColorTokens) => SemanticColorTokens;
|
|
3
3
|
export default _default;
|
|
@@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import type {
|
|
9
|
-
|
|
9
|
+
FoundationColorTokensT,
|
|
10
10
|
CoreSemanticColorTokensT,
|
|
11
11
|
CoreExtensionSemanticColorTokensT,
|
|
12
12
|
DeprecatedSemanticColorTokensT,
|
|
@@ -18,7 +18,7 @@ import colors from '../../tokens/colors.js';
|
|
|
18
18
|
|
|
19
19
|
export default (
|
|
20
20
|
// themePrimitives or foundation colors
|
|
21
|
-
foundation:
|
|
21
|
+
foundation: FoundationColorTokensT = defaultFoundationColorTokens
|
|
22
22
|
): SemanticColorTokensT => {
|
|
23
23
|
const core: CoreSemanticColorTokensT = {
|
|
24
24
|
// Background
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const darkColorTokens:
|
|
1
|
+
import type { FoundationColorTokens } from '../types';
|
|
2
|
+
export declare const darkColorTokens: FoundationColorTokens;
|
|
3
3
|
export default darkColorTokens;
|
|
@@ -6,10 +6,10 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import { colors } from '../../tokens/index.js';
|
|
9
|
-
import type {
|
|
9
|
+
import type { FoundationColorTokensT } from '../types.js';
|
|
10
10
|
|
|
11
11
|
// color constants
|
|
12
|
-
export const darkColorTokens:
|
|
12
|
+
export const darkColorTokens: FoundationColorTokensT = {
|
|
13
13
|
// Primary Palette
|
|
14
14
|
primaryA: colors.gray200,
|
|
15
15
|
primaryB: colors.gray900,
|
|
@@ -20,7 +20,7 @@ import lighting from '../shared/lighting.js';
|
|
|
20
20
|
import mediaQuery from '../shared/media-query.js';
|
|
21
21
|
import sizing from '../shared/sizing.js';
|
|
22
22
|
|
|
23
|
-
import type { PrimitivesT,
|
|
23
|
+
import type { PrimitivesT, FoundationColorTokensT } from '../types.js';
|
|
24
24
|
import type { ThemeT } from '../../styles/types.js';
|
|
25
25
|
|
|
26
26
|
export default function createDarkTheme(
|
|
@@ -32,7 +32,7 @@ export default function createDarkTheme(
|
|
|
32
32
|
// Extract font tokens and color tokens from primitives
|
|
33
33
|
const { primaryFontFamily, ...customFoundationColorTokens } = primitives;
|
|
34
34
|
// Assemble color tokens by overriding defaults with custom color tokens
|
|
35
|
-
const foundationColorTokens:
|
|
35
|
+
const foundationColorTokens: FoundationColorTokensT = {
|
|
36
36
|
...defaultFoundationColorTokens,
|
|
37
37
|
...customFoundationColorTokens,
|
|
38
38
|
};
|
package/themes/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import createLightTheme from './light-theme/create-light-theme';
|
|
|
7
7
|
import darkThemePrimitives from './dark-theme/primitives';
|
|
8
8
|
import lightThemePrimitives from './light-theme/primitives';
|
|
9
9
|
import type { Primitives } from './types';
|
|
10
|
-
import type {
|
|
10
|
+
import type { ColorTokens as StyleColors } from '../styles';
|
|
11
11
|
export { createDarkTheme, createLightTheme, createLightTheme as createTheme, LightTheme, LightThemeMove, lightThemePrimitives, DarkTheme, DarkThemeMove, darkThemePrimitives, DarkTheme as darkThemeOverrides, };
|
|
12
12
|
export * from './types';
|
|
13
13
|
/** @deprecated use ColorTokens instead. To be removed in future versions.*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const _default: (themePrimitives?:
|
|
1
|
+
import type { FoundationColorTokens, ComponentColorTokens } from '../types';
|
|
2
|
+
declare const _default: (themePrimitives?: FoundationColorTokens) => ComponentColorTokens;
|
|
3
3
|
export default _default;
|
|
@@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import defaultFoundationColorTokens from './color-tokens.js';
|
|
9
|
-
import type {
|
|
9
|
+
import type { FoundationColorTokensT, ComponentColorTokensT } from '../types.js';
|
|
10
10
|
|
|
11
11
|
const tagHoverBackground = `rgba(0, 0, 0, 0.08)`;
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ const tagHoverBackground = `rgba(0, 0, 0, 0.08)`;
|
|
|
16
16
|
// Due to the legacy `createTheme` type the value need to be
|
|
17
17
|
// overrideable through primitives (`foundation` )
|
|
18
18
|
export default (
|
|
19
|
-
themePrimitives:
|
|
19
|
+
themePrimitives: FoundationColorTokensT = defaultFoundationColorTokens
|
|
20
20
|
): ComponentColorTokensT => ({
|
|
21
21
|
bannerActionLowInfo: themePrimitives.accent100,
|
|
22
22
|
bannerActionLowNegative: themePrimitives.negative100,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const _default: (foundation?:
|
|
1
|
+
import type { FoundationColorTokens, SemanticColorTokens } from '../types';
|
|
2
|
+
declare const _default: (foundation?: FoundationColorTokens) => SemanticColorTokens;
|
|
3
3
|
export default _default;
|
|
@@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import type {
|
|
9
|
-
|
|
9
|
+
FoundationColorTokensT,
|
|
10
10
|
CoreSemanticColorTokensT,
|
|
11
11
|
CoreExtensionSemanticColorTokensT,
|
|
12
12
|
DeprecatedSemanticColorTokensT,
|
|
@@ -18,7 +18,7 @@ import colors from '../../tokens/colors.js';
|
|
|
18
18
|
|
|
19
19
|
export default (
|
|
20
20
|
// themePrimitives or foundation colors
|
|
21
|
-
foundation:
|
|
21
|
+
foundation: FoundationColorTokensT = defaultFoundationColorTokens
|
|
22
22
|
): SemanticColorTokensT => {
|
|
23
23
|
const core: CoreSemanticColorTokensT = {
|
|
24
24
|
// Background
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const lightColorTokens:
|
|
1
|
+
import type { FoundationColorTokens } from '../types';
|
|
2
|
+
declare const lightColorTokens: FoundationColorTokens;
|
|
3
3
|
export default lightColorTokens;
|
|
@@ -6,10 +6,10 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import { colors } from '../../tokens/index.js';
|
|
9
|
-
import type {
|
|
9
|
+
import type { FoundationColorTokensT } from '../types.js';
|
|
10
10
|
|
|
11
11
|
// color constants
|
|
12
|
-
const lightColorTokens:
|
|
12
|
+
const lightColorTokens: FoundationColorTokensT = {
|
|
13
13
|
// Primary Palette
|
|
14
14
|
primaryA: colors.black,
|
|
15
15
|
primaryB: colors.white,
|
|
@@ -20,7 +20,7 @@ import lighting from '../shared/lighting.js';
|
|
|
20
20
|
import mediaQuery from '../shared/media-query.js';
|
|
21
21
|
import sizing from '../shared/sizing.js';
|
|
22
22
|
|
|
23
|
-
import type { PrimitivesT,
|
|
23
|
+
import type { PrimitivesT, FoundationColorTokensT } from '../types.js';
|
|
24
24
|
import type { ThemeT } from '../../styles/types.js';
|
|
25
25
|
|
|
26
26
|
export default function createLightTheme(
|
|
@@ -32,7 +32,7 @@ export default function createLightTheme(
|
|
|
32
32
|
// Extract font tokens and color tokens from primitives
|
|
33
33
|
const { primaryFontFamily, ...customFoundationColorTokens } = primitives;
|
|
34
34
|
// Assemble color tokens by overriding defaults with custom color tokens
|
|
35
|
-
const
|
|
35
|
+
const foundationColorTokens: FoundationColorTokensT = {
|
|
36
36
|
...defaultFoundationColorTokens,
|
|
37
37
|
...customFoundationColorTokens,
|
|
38
38
|
};
|
|
@@ -43,9 +43,9 @@ export default function createLightTheme(
|
|
|
43
43
|
// $FlowFixMe[cannot-spread-inexact]
|
|
44
44
|
colors: {
|
|
45
45
|
...primitiveColorTokens,
|
|
46
|
-
...
|
|
47
|
-
...getComponentColorTokens(
|
|
48
|
-
...getSemanticColorTokens(
|
|
46
|
+
...foundationColorTokens,
|
|
47
|
+
...getComponentColorTokens(foundationColorTokens),
|
|
48
|
+
...getSemanticColorTokens(foundationColorTokens),
|
|
49
49
|
},
|
|
50
50
|
direction: 'auto',
|
|
51
51
|
grid,
|
package/themes/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Properties } from 'csstype';
|
|
|
2
2
|
import type { Responsive, CSSLengthUnit } from '../layout-grid';
|
|
3
3
|
export type Globals = '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'unset';
|
|
4
4
|
export type LineStyle = 'dashed' | 'dotted' | 'double' | 'groove' | 'hidden' | 'inset' | 'none' | 'outset' | 'ridge' | 'solid';
|
|
5
|
-
export type
|
|
5
|
+
export type FoundationColorTokens = {
|
|
6
6
|
primaryA: string;
|
|
7
7
|
primaryB: string;
|
|
8
8
|
primary: string;
|
|
@@ -429,7 +429,7 @@ export type ComponentColorTokens = {
|
|
|
429
429
|
export type FontTokens = {
|
|
430
430
|
primaryFontFamily: string;
|
|
431
431
|
};
|
|
432
|
-
export type Primitives = {} &
|
|
432
|
+
export type Primitives = {} & FoundationColorTokens & FontTokens;
|
|
433
433
|
export type Font = {
|
|
434
434
|
fontFamily: string;
|
|
435
435
|
fontWeight: Globals | 'bold' | 'normal' | 'bolder' | 'lighter' | number;
|
package/themes/types.js.flow
CHANGED
|
@@ -21,7 +21,7 @@ export type LineStyle =
|
|
|
21
21
|
| 'ridge'
|
|
22
22
|
| 'solid';
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type FoundationColorTokensT = {
|
|
25
25
|
// Primary Palette
|
|
26
26
|
primaryA: string,
|
|
27
27
|
primaryB: string,
|
|
@@ -535,7 +535,7 @@ export type FontTokensT = {|
|
|
|
535
535
|
|
|
536
536
|
// TODO(#2318) Deprecate in the next major version
|
|
537
537
|
export type PrimitivesT = {
|
|
538
|
-
...
|
|
538
|
+
...FoundationColorTokensT,
|
|
539
539
|
...FontTokensT,
|
|
540
540
|
};
|
|
541
541
|
|
package/tokens/colors.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const colors:
|
|
1
|
+
import type { PrimitiveColorTokens } from './types';
|
|
2
|
+
declare const colors: PrimitiveColorTokens;
|
|
3
3
|
export default colors;
|
package/tokens/colors.js.flow
CHANGED
|
@@ -5,9 +5,9 @@ This source code is licensed under the MIT license found in the
|
|
|
5
5
|
LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
|
-
import type {
|
|
8
|
+
import type { PrimitiveColorTokensT } from './types.js';
|
|
9
9
|
|
|
10
|
-
const colors:
|
|
10
|
+
const colors: PrimitiveColorTokensT = {
|
|
11
11
|
white: '#FFFFFF',
|
|
12
12
|
gray50: '#F6F6F6',
|
|
13
13
|
gray100: '#EEEEEE',
|
package/tokens/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PrimitiveColorTokens } from './types';
|
|
2
2
|
export { default as colors } from './colors';
|
|
3
3
|
export * from './types';
|
|
4
|
-
/** @deprecated use
|
|
5
|
-
export type TokenColors =
|
|
4
|
+
/** @deprecated use PrimitiveColorTokens instead. To be removed in future versions.*/
|
|
5
|
+
export type TokenColors = PrimitiveColorTokens;
|
package/tokens/types.d.ts
CHANGED
package/tokens/types.js.flow
CHANGED