baseui 11.0.1 → 11.1.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/a11y/index.d.ts +1 -1
- package/accordion/index.d.ts +25 -28
- package/app-nav-bar/app-nav-bar.js +33 -40
- package/app-nav-bar/app-nav-bar.js.flow +46 -62
- package/app-nav-bar/index.d.ts +9 -8
- package/app-nav-bar/styled-components.js +49 -29
- package/app-nav-bar/styled-components.js.flow +25 -8
- package/app-nav-bar/types.js.flow +2 -0
- package/aspect-ratio-box/index.d.ts +2 -4
- package/avatar/index.d.ts +6 -12
- package/badge/badge.js +109 -0
- package/badge/badge.js.flow +91 -0
- package/badge/constants.js +54 -0
- package/badge/constants.js.flow +52 -0
- package/badge/hint-dot.js +96 -0
- package/badge/hint-dot.js.flow +68 -0
- package/badge/index.d.ts +97 -0
- package/badge/index.js +80 -0
- package/badge/index.js.flow +20 -0
- package/badge/notification-circle.js +103 -0
- package/badge/notification-circle.js.flow +81 -0
- package/badge/package.json +4 -0
- package/badge/styled-components.js +242 -0
- package/badge/styled-components.js.flow +325 -0
- package/badge/types.js +11 -0
- package/badge/types.js.flow +59 -0
- package/badge/utils.js +33 -0
- package/badge/utils.js.flow +23 -0
- package/banner/banner.js +283 -0
- package/banner/banner.js.flow +253 -0
- package/banner/constants.js +35 -0
- package/banner/constants.js.flow +33 -0
- package/banner/index.d.ts +75 -0
- package/banner/index.js +44 -0
- package/banner/index.js.flow +16 -0
- package/banner/package.json +4 -0
- package/banner/styled-components.js +131 -0
- package/banner/styled-components.js.flow +119 -0
- package/banner/types.js +11 -0
- package/banner/types.js.flow +66 -0
- package/block/index.d.ts +4 -4
- package/breadcrumbs/breadcrumbs.js +5 -1
- package/breadcrumbs/breadcrumbs.js.flow +2 -2
- package/breadcrumbs/index.d.ts +5 -5
- package/button/button.js +2 -1
- package/button/button.js.flow +1 -0
- package/button/index.d.ts +19 -29
- package/button-group/index.d.ts +18 -24
- package/card/index.d.ts +16 -14
- package/checkbox/index.d.ts +17 -21
- package/combobox/index.d.ts +7 -11
- package/data-table/index.d.ts +7 -10
- package/datepicker/calendar.js +16 -11
- package/datepicker/calendar.js.flow +12 -9
- package/datepicker/datepicker.js +58 -58
- package/datepicker/datepicker.js.flow +51 -34
- package/datepicker/index.d.ts +42 -63
- package/datepicker/stateful-calendar.js +6 -1
- package/datepicker/stateful-calendar.js.flow +8 -1
- package/datepicker/stateful-container.js +23 -2
- package/datepicker/stateful-container.js.flow +17 -4
- package/datepicker/stateful-datepicker.js +6 -1
- package/datepicker/stateful-datepicker.js.flow +7 -1
- package/datepicker/types.js.flow +21 -43
- package/datepicker/utils/date-helpers.js +1 -1
- package/datepicker/utils/date-helpers.js.flow +1 -1
- package/dnd-list/index.d.ts +22 -35
- package/drawer/index.d.ts +22 -27
- package/es/app-nav-bar/app-nav-bar.js +9 -19
- package/es/app-nav-bar/styled-components.js +32 -13
- package/es/badge/badge.js +70 -0
- package/es/badge/constants.js +42 -0
- package/es/badge/hint-dot.js +55 -0
- package/es/badge/index.js +11 -0
- package/es/badge/notification-circle.js +65 -0
- package/es/badge/styled-components.js +296 -0
- package/es/badge/types.js +8 -0
- package/es/badge/utils.js +17 -0
- package/es/banner/banner.js +213 -0
- package/es/banner/constants.js +24 -0
- package/es/banner/index.js +9 -0
- package/es/banner/styled-components.js +122 -0
- package/es/banner/types.js +8 -0
- package/es/breadcrumbs/breadcrumbs.js +5 -1
- package/es/button/button.js +1 -0
- package/es/datepicker/calendar.js +15 -10
- package/es/datepicker/datepicker.js +52 -52
- package/es/datepicker/stateful-calendar.js +6 -1
- package/es/datepicker/stateful-container.js +22 -2
- package/es/datepicker/stateful-datepicker.js +6 -1
- package/es/datepicker/utils/date-helpers.js +1 -1
- package/es/helper/helper-steps.js +3 -1
- package/es/input/base-input.js +18 -11
- package/es/input/input.js +15 -10
- package/es/input/masked-input.js +5 -2
- package/es/input/utils.js +4 -2
- package/es/locale/tr_TR.js +115 -0
- package/es/notification/notification.js +16 -1
- package/es/payment-card/custom-cards.config.js +22 -0
- package/es/payment-card/icons/uatp.js +52 -0
- package/es/payment-card/payment-card.js +8 -3
- package/es/popover/popover.js +2 -1
- package/es/popover/stateful-container.js +2 -0
- package/es/popover/styled-components.js +2 -1
- package/es/progress-steps/numbered-step.js +2 -2
- package/es/select/select-component.js +48 -23
- package/es/select/utils/default-filter-options.js +1 -1
- package/es/snackbar/snackbar-context.js +1 -1
- package/es/table-semantic/styled-components.js +14 -0
- package/es/table-semantic/table-builder.js +12 -5
- package/es/textarea/textarea.js +15 -9
- package/es/themes/dark-theme/color-component-tokens.js +8 -0
- package/es/themes/light-theme/color-component-tokens.js +8 -0
- package/es/tree-view/tree-label.js +9 -1
- package/esm/app-nav-bar/app-nav-bar.js +32 -38
- package/esm/app-nav-bar/styled-components.js +46 -28
- package/esm/badge/badge.js +97 -0
- package/esm/badge/constants.js +42 -0
- package/esm/badge/hint-dot.js +83 -0
- package/esm/badge/index.js +11 -0
- package/esm/badge/notification-circle.js +91 -0
- package/esm/badge/styled-components.js +235 -0
- package/esm/badge/types.js +8 -0
- package/esm/badge/utils.js +17 -0
- package/esm/banner/banner.js +271 -0
- package/esm/banner/constants.js +24 -0
- package/esm/banner/index.js +9 -0
- package/esm/banner/styled-components.js +113 -0
- package/esm/banner/types.js +8 -0
- package/esm/breadcrumbs/breadcrumbs.js +5 -1
- package/esm/button/button.js +2 -1
- package/esm/datepicker/calendar.js +16 -11
- package/esm/datepicker/datepicker.js +58 -58
- package/esm/datepicker/stateful-calendar.js +6 -1
- package/esm/datepicker/stateful-container.js +23 -2
- package/esm/datepicker/stateful-datepicker.js +6 -1
- package/esm/datepicker/utils/date-helpers.js +1 -1
- package/esm/helper/helper-steps.js +3 -1
- package/esm/input/base-input.js +18 -11
- package/esm/input/input.js +15 -10
- package/esm/input/masked-input.js +6 -3
- package/esm/input/utils.js +4 -2
- package/esm/locale/tr_TR.js +115 -0
- package/esm/notification/notification.js +17 -1
- package/esm/payment-card/custom-cards.config.js +22 -0
- package/esm/payment-card/icons/uatp.js +53 -0
- package/esm/payment-card/payment-card.js +9 -7
- package/esm/popover/popover.js +2 -1
- package/esm/popover/stateful-container.js +2 -0
- package/esm/popover/styled-components.js +3 -2
- package/esm/progress-steps/numbered-step.js +2 -2
- package/esm/select/select-component.js +85 -59
- package/esm/select/utils/default-filter-options.js +1 -1
- package/esm/snackbar/snackbar-context.js +1 -1
- package/esm/table-semantic/styled-components.js +31 -18
- package/esm/table-semantic/table-builder.js +34 -23
- package/esm/textarea/textarea.js +15 -9
- package/esm/themes/dark-theme/color-component-tokens.js +8 -0
- package/esm/themes/light-theme/color-component-tokens.js +8 -0
- package/esm/tree-view/tree-label.js +10 -2
- package/file-uploader/index.d.ts +11 -11
- package/flex-grid/index.d.ts +3 -3
- package/form-control/index.d.ts +7 -19
- package/header-navigation/index.d.ts +8 -9
- package/heading/index.d.ts +3 -4
- package/helper/helper-steps.js +19 -13
- package/helper/helper-steps.js.flow +3 -1
- package/helper/index.d.ts +7 -7
- package/helpers/base-provider.d.ts +16 -0
- package/helpers/overrides.d.ts +23 -0
- package/icon/index.d.ts +32 -32
- package/index.d.ts +34 -114
- package/input/base-input.js +18 -11
- package/input/base-input.js.flow +18 -6
- package/input/index.d.ts +29 -32
- package/input/input.js +15 -10
- package/input/input.js.flow +10 -5
- package/input/masked-input.js +6 -3
- package/input/masked-input.js.flow +3 -0
- package/input/types.js.flow +4 -0
- package/input/utils.js +4 -2
- package/input/utils.js.flow +2 -1
- package/layer/index.d.ts +6 -11
- package/layout-grid/index.d.ts +25 -7
- package/link/index.d.ts +2 -2
- package/list/index.d.ts +26 -31
- package/{locale.ts → locale/index.d.ts} +8 -0
- package/locale/tr_TR.js +123 -0
- package/locale/tr_TR.js.flow +124 -0
- package/map-marker/index.d.ts +41 -47
- package/menu/index.d.ts +27 -37
- package/modal/index.d.ts +28 -38
- package/notification/index.d.ts +2 -3
- package/notification/notification.js +18 -1
- package/notification/notification.js.flow +15 -1
- package/overrides.ts +2 -22
- package/package.json +26 -17
- package/pagination/index.d.ts +22 -26
- package/payment-card/custom-cards.config.js +30 -0
- package/payment-card/custom-cards.config.js.flow +29 -0
- package/payment-card/icons/uatp.js +67 -0
- package/payment-card/icons/uatp.js.flow +62 -0
- package/payment-card/index.d.ts +8 -8
- package/payment-card/payment-card.js +12 -7
- package/payment-card/payment-card.js.flow +12 -0
- package/phone-input/index.d.ts +261 -269
- package/pin-code/index.d.ts +11 -18
- package/popover/index.d.ts +39 -55
- package/popover/popover.js +2 -1
- package/popover/popover.js.flow +2 -1
- package/popover/stateful-container.js +2 -0
- package/popover/stateful-container.js.flow +2 -0
- package/popover/styled-components.js +3 -2
- package/popover/styled-components.js.flow +2 -1
- package/popover/types.js.flow +1 -0
- package/progress-bar/index.d.ts +11 -12
- package/progress-steps/index.d.ts +16 -16
- package/progress-steps/numbered-step.js.flow +2 -2
- package/radio/index.d.ts +12 -15
- package/rating/index.d.ts +9 -12
- package/select/index.d.ts +34 -36
- package/select/select-component.js +82 -56
- package/select/select-component.js.flow +46 -34
- package/select/types.js.flow +1 -0
- package/select/utils/default-filter-options.js +1 -1
- package/select/utils/default-filter-options.js.flow +1 -1
- package/side-navigation/index.d.ts +11 -13
- package/skeleton/index.d.ts +1 -1
- package/slider/index.d.ts +17 -26
- package/snackbar/index.d.ts +8 -8
- package/snackbar/snackbar-context.js +1 -1
- package/snackbar/snackbar-context.js.flow +1 -1
- package/spinner/index.d.ts +4 -3
- package/styles/index.d.ts +82 -2
- package/table/index.d.ts +16 -16
- package/table-grid/index.d.ts +6 -8
- package/table-semantic/index.d.ts +26 -32
- package/table-semantic/styled-components.js +33 -19
- package/table-semantic/styled-components.js.flow +12 -0
- package/table-semantic/table-builder.js +38 -22
- package/table-semantic/table-builder.js.flow +32 -17
- package/table-semantic/types.js.flow +1 -0
- package/tabs/index.d.ts +20 -23
- package/tabs-motion/index.d.ts +23 -23
- package/tag/index.d.ts +14 -18
- package/tag/types.js.flow +1 -1
- package/textarea/index.d.ts +11 -14
- package/textarea/textarea.js +15 -9
- package/textarea/textarea.js.flow +11 -5
- package/textarea/types.js.flow +1 -0
- package/theme.ts +36 -777
- package/themes/dark-theme/color-component-tokens.js +8 -0
- package/themes/dark-theme/color-component-tokens.js.flow +9 -0
- package/themes/index.d.ts +765 -0
- package/themes/light-theme/color-component-tokens.js +8 -0
- package/themes/light-theme/color-component-tokens.js.flow +9 -0
- package/themes/types.js.flow +9 -0
- package/timepicker/index.d.ts +5 -8
- package/timezonepicker/index.d.ts +5 -8
- package/toast/index.d.ts +26 -40
- package/tokens/index.d.ts +1 -1
- package/tooltip/index.d.ts +7 -9
- package/tree-view/index.d.ts +15 -19
- package/tree-view/tree-label.js +10 -2
- package/tree-view/tree-label.js.flow +4 -4
- package/typography/index.d.ts +37 -37
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {StyletronComponent} from 'styletron-react';
|
|
3
|
-
import {Override} from '../overrides';
|
|
2
|
+
import { StyletronComponent } from 'styletron-react';
|
|
3
|
+
import { Override } from '../overrides';
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export declare const STATE_CHANGE_TYPE: {
|
|
6
6
|
change: 'change';
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
|
|
9
9
|
export interface Item {
|
|
10
10
|
title: React.ReactNode;
|
|
@@ -25,7 +25,7 @@ export interface NavigationProps {
|
|
|
25
25
|
activeItemId: string;
|
|
26
26
|
activePredicate?: (item: any, activeItemId: string) => boolean;
|
|
27
27
|
items?: Item[];
|
|
28
|
-
onChange?: (args: {item: any; event: React.SyntheticEvent<any>}) => any;
|
|
28
|
+
onChange?: (args: { item: any; event: React.SyntheticEvent<any> }) => any;
|
|
29
29
|
overrides?: NavigationOverrides;
|
|
30
30
|
mapItem?: (item: Item) => Item;
|
|
31
31
|
}
|
|
@@ -44,7 +44,7 @@ export interface NavItemProps {
|
|
|
44
44
|
$level?: number;
|
|
45
45
|
$selectable?: boolean;
|
|
46
46
|
item: Item;
|
|
47
|
-
onSelect?: (args: {item: any; event: Event | KeyboardEvent}) => any;
|
|
47
|
+
onSelect?: (args: { item: any; event: Event | KeyboardEvent }) => any;
|
|
48
48
|
overrides?: NavItemOverrides;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -53,10 +53,8 @@ export class NavItem extends React.Component<NavItemProps> {
|
|
|
53
53
|
handleKeyDown(event: React.KeyboardEvent): void;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export const StyledRoot: StyletronComponent<any>;
|
|
57
|
-
export const StyledNavItemContainer: StyletronComponent<any>;
|
|
58
|
-
export const StyledNavLink: StyletronComponent<any>;
|
|
59
|
-
export const StyledNavItem: StyletronComponent<any>;
|
|
60
|
-
export const StyledSubNavContainer: StyletronComponent<any>;
|
|
61
|
-
|
|
62
|
-
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
|
56
|
+
export declare const StyledRoot: StyletronComponent<any>;
|
|
57
|
+
export declare const StyledNavItemContainer: StyletronComponent<any>;
|
|
58
|
+
export declare const StyledNavLink: StyletronComponent<any>;
|
|
59
|
+
export declare const StyledNavItem: StyletronComponent<any>;
|
|
60
|
+
export declare const StyledSubNavContainer: StyletronComponent<any>;
|
package/skeleton/index.d.ts
CHANGED
package/slider/index.d.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {StyletronComponent} from 'styletron-react';
|
|
3
|
-
import {Override} from '../overrides';
|
|
2
|
+
import { StyletronComponent } from 'styletron-react';
|
|
3
|
+
import { Override } from '../overrides';
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export declare const STATE_CHANGE_TYPE: {
|
|
6
6
|
change: 'change';
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
|
|
9
9
|
export interface State {
|
|
10
10
|
value: number[];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export type StateReducer = (
|
|
14
|
-
stateType: string,
|
|
15
|
-
nextState: State,
|
|
16
|
-
currentState: State,
|
|
17
|
-
) => State;
|
|
13
|
+
export type StateReducer = (stateType: string, nextState: State, currentState: State) => State;
|
|
18
14
|
|
|
19
15
|
export interface SliderOverrides {
|
|
20
16
|
Root?: Override<SharedProps>;
|
|
@@ -78,24 +74,19 @@ export type SharedProps = {
|
|
|
78
74
|
$marks: boolean;
|
|
79
75
|
};
|
|
80
76
|
|
|
81
|
-
export const Slider: React.FC<SliderProps>;
|
|
82
|
-
export const StatefulSlider: React.FC<StatefulSliderProps>;
|
|
83
|
-
export class StatefulContainer extends React.Component<
|
|
84
|
-
StatefulContainerProps,
|
|
85
|
-
State
|
|
86
|
-
> {
|
|
77
|
+
export declare const Slider: React.FC<SliderProps>;
|
|
78
|
+
export declare const StatefulSlider: React.FC<StatefulSliderProps>;
|
|
79
|
+
export class StatefulContainer extends React.Component<StatefulContainerProps, State> {
|
|
87
80
|
onChange(params: State): any;
|
|
88
81
|
onFinalChange?: (params: State) => any;
|
|
89
|
-
internalSetState(type: 'change', {value}: State): void;
|
|
82
|
+
internalSetState(type: 'change', { value }: State): void;
|
|
90
83
|
}
|
|
91
84
|
|
|
92
|
-
export const StyledRoot: StyletronComponent<any>;
|
|
93
|
-
export const StyledTrack: StyletronComponent<any>;
|
|
94
|
-
export const StyledInnerTrack: StyletronComponent<any>;
|
|
95
|
-
export const StyledThumb: StyletronComponent<any>;
|
|
96
|
-
export const StyledInnerThumb: StyletronComponent<any>;
|
|
97
|
-
export const StyledTick: StyletronComponent<any>;
|
|
98
|
-
export const StyledTickBar: StyletronComponent<any>;
|
|
99
|
-
export const StyledMark: StyletronComponent<any>;
|
|
100
|
-
|
|
101
|
-
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
|
85
|
+
export declare const StyledRoot: StyletronComponent<any>;
|
|
86
|
+
export declare const StyledTrack: StyletronComponent<any>;
|
|
87
|
+
export declare const StyledInnerTrack: StyletronComponent<any>;
|
|
88
|
+
export declare const StyledThumb: StyletronComponent<any>;
|
|
89
|
+
export declare const StyledInnerThumb: StyletronComponent<any>;
|
|
90
|
+
export declare const StyledTick: StyletronComponent<any>;
|
|
91
|
+
export declare const StyledTickBar: StyletronComponent<any>;
|
|
92
|
+
export declare const StyledMark: StyletronComponent<any>;
|
package/snackbar/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {Override} from '../overrides';
|
|
3
|
+
import { Override } from '../overrides';
|
|
4
4
|
|
|
5
5
|
declare const DURATION: {
|
|
6
6
|
infinite: number;
|
|
@@ -17,11 +17,11 @@ declare const PLACEMENT: {
|
|
|
17
17
|
bottom: 'bottom';
|
|
18
18
|
bottomLeft: 'bottomLeft';
|
|
19
19
|
};
|
|
20
|
-
export {DURATION, PLACEMENT};
|
|
20
|
+
export { DURATION, PLACEMENT };
|
|
21
21
|
|
|
22
|
-
export type DurationT =
|
|
22
|
+
export type DurationT = typeof DURATION[keyof typeof DURATION];
|
|
23
23
|
|
|
24
|
-
export type PlacementT =
|
|
24
|
+
export type PlacementT = typeof PLACEMENT[keyof typeof PLACEMENT];
|
|
25
25
|
|
|
26
26
|
export type SnackbarElementOverridesT = {
|
|
27
27
|
Root?: Override<any>;
|
|
@@ -40,7 +40,7 @@ export type SnackbarElementPropsT = {
|
|
|
40
40
|
message: React.ReactNode;
|
|
41
41
|
overrides?: SnackbarElementOverridesT;
|
|
42
42
|
progress?: boolean;
|
|
43
|
-
startEnhancer?: React.FC<{size: number}>;
|
|
43
|
+
startEnhancer?: React.FC<{ size: number }>;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export type SnackbarProviderPropsT = {
|
|
@@ -52,9 +52,9 @@ export type SnackbarProviderPropsT = {
|
|
|
52
52
|
defaultDuration?: DurationT;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
export const SnackbarElement: React.FC<SnackbarElementPropsT>;
|
|
56
|
-
export const SnackbarProvider: React.FC<SnackbarProviderPropsT>;
|
|
57
|
-
export const useSnackbar: () => {
|
|
55
|
+
export declare const SnackbarElement: React.FC<SnackbarElementPropsT>;
|
|
56
|
+
export declare const SnackbarProvider: React.FC<SnackbarProviderPropsT>;
|
|
57
|
+
export declare const useSnackbar: () => {
|
|
58
58
|
enqueue: (elementProps: SnackbarElementPropsT, duration?: DurationT) => any;
|
|
59
59
|
dequeue: () => any;
|
|
60
60
|
};
|
package/spinner/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {StyletronComponent} from 'styletron-react';
|
|
2
|
-
import {Sizing} from '../theme
|
|
1
|
+
import { StyletronComponent } from 'styletron-react';
|
|
2
|
+
import { Sizing } from '../theme';
|
|
3
3
|
|
|
4
4
|
export enum SIZE {
|
|
5
5
|
small = 'small',
|
|
@@ -8,9 +8,10 @@ export enum SIZE {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface SpinnerProps {
|
|
11
|
+
[key: string]: any;
|
|
11
12
|
$color?: string;
|
|
12
13
|
$borderWidth?: number | string | SIZE | Sizing;
|
|
13
14
|
$size?: number | string | SIZE | Sizing;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const Spinner: StyletronComponent<SpinnerProps>;
|
|
17
|
+
export declare const Spinner: StyletronComponent<SpinnerProps>;
|
package/styles/index.d.ts
CHANGED
|
@@ -1,4 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
Animation,
|
|
3
|
+
Border,
|
|
4
|
+
Borders,
|
|
5
|
+
Breakpoints,
|
|
6
|
+
Colors,
|
|
7
|
+
Grid,
|
|
8
|
+
Lighting,
|
|
9
|
+
MediaQuery,
|
|
10
|
+
Sizing,
|
|
11
|
+
Typography,
|
|
12
|
+
ZIndex,
|
|
13
|
+
} from '../theme';
|
|
14
|
+
import type { StyleObject, StyletronComponent } from 'styletron-react';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
|
|
17
|
+
type StyletronStyledFn = typeof import('styletron-react').styled;
|
|
18
|
+
type StyletronWithStyleFn = typeof import('styletron-react').withStyle;
|
|
3
19
|
|
|
4
20
|
export function expandBorderStyles(borderStyles: Border): StyleObject;
|
|
21
|
+
|
|
22
|
+
export interface Theme {
|
|
23
|
+
name: string;
|
|
24
|
+
direction: 'auto' | 'rtl' | 'ltr';
|
|
25
|
+
breakpoints: Breakpoints;
|
|
26
|
+
mediaQuery: MediaQuery;
|
|
27
|
+
grid: Grid;
|
|
28
|
+
colors: Colors;
|
|
29
|
+
typography: Typography;
|
|
30
|
+
sizing: Sizing;
|
|
31
|
+
lighting: Lighting;
|
|
32
|
+
animation: Animation;
|
|
33
|
+
borders: Borders;
|
|
34
|
+
zIndex: ZIndex;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type UseStyletronFn<Theme> = () => [(arg: StyleObject) => string, Theme];
|
|
38
|
+
export function createThemedUseStyletron<Theme>(): UseStyletronFn<Theme>;
|
|
39
|
+
export declare const useStyletron: UseStyletronFn<Theme>;
|
|
40
|
+
export function withWrapper<C extends StyletronComponent<any>, P extends object>(
|
|
41
|
+
component: C,
|
|
42
|
+
wrapper: (component: C) => React.ComponentType<P>
|
|
43
|
+
): StyletronComponent<React.ComponentProps<C> & P>;
|
|
44
|
+
|
|
45
|
+
export function styled<
|
|
46
|
+
P extends object,
|
|
47
|
+
C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,
|
|
48
|
+
T = Theme
|
|
49
|
+
>(
|
|
50
|
+
component: C,
|
|
51
|
+
styledFn: StyleObject | ((props: { $theme: T } & P) => StyleObject)
|
|
52
|
+
): StyletronComponent<
|
|
53
|
+
Pick<React.ComponentProps<C>, Exclude<keyof React.ComponentProps<C>, { className: string }>> & P
|
|
54
|
+
>;
|
|
55
|
+
export function withStyle<C extends StyletronComponent<any>, P extends object, T = Theme>(
|
|
56
|
+
component: C,
|
|
57
|
+
styledFn: StyleObject | ((props: { $theme: T } & P) => StyleObject)
|
|
58
|
+
): StyletronComponent<React.ComponentProps<C> & P>;
|
|
59
|
+
|
|
60
|
+
export interface StyledFn<T> extends StyletronStyledFn {
|
|
61
|
+
<C extends keyof JSX.IntrinsicElements | React.ComponentType<any>, P extends object>(
|
|
62
|
+
component: C,
|
|
63
|
+
style: (props: { $theme: T } & P) => StyleObject
|
|
64
|
+
): StyletronComponent<
|
|
65
|
+
Pick<React.ComponentProps<C>, Exclude<keyof React.ComponentProps<C>, { className: string }>> & P
|
|
66
|
+
>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function createThemedStyled<Theme>(): StyledFn<Theme>;
|
|
70
|
+
|
|
71
|
+
export interface WithStyleFn<T = Theme> extends StyletronWithStyleFn {
|
|
72
|
+
<C extends StyletronComponent<any>, P extends object, T1 = T>(
|
|
73
|
+
component: C,
|
|
74
|
+
style: (props: P & { $theme: T1 }) => StyleObject
|
|
75
|
+
): StyletronComponent<React.ComponentProps<C> & P>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function createThemedWithStyle<Theme>(): WithStyleFn<Theme>;
|
|
79
|
+
|
|
80
|
+
export interface ThemeProviderProps {
|
|
81
|
+
theme: Theme;
|
|
82
|
+
children?: React.ReactNode;
|
|
83
|
+
}
|
|
84
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
package/table/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 enum SORT_DIRECTION {
|
|
6
6
|
ASC = 'ASC',
|
|
@@ -23,7 +23,7 @@ export interface SortableHeadCellProps {
|
|
|
23
23
|
title: React.ReactNode;
|
|
24
24
|
fillClickTarget?: boolean;
|
|
25
25
|
}
|
|
26
|
-
export const SortableHeadCell: React.FC<SortableHeadCellProps>;
|
|
26
|
+
export declare const SortableHeadCell: React.FC<SortableHeadCellProps>;
|
|
27
27
|
|
|
28
28
|
export interface TableProps {
|
|
29
29
|
columns: Array<string | React.ReactNode>;
|
|
@@ -52,17 +52,17 @@ export interface FilterProps {
|
|
|
52
52
|
overrides?: FilterOverrides;
|
|
53
53
|
returnFocus?: boolean;
|
|
54
54
|
}
|
|
55
|
-
export const Filter: React.FC<FilterProps>;
|
|
55
|
+
export declare const Filter: React.FC<FilterProps>;
|
|
56
56
|
|
|
57
|
-
export const StyledTable: StyletronComponent<any>;
|
|
58
|
-
export const StyledFilterButton: StyletronComponent<any>;
|
|
59
|
-
export const StyledFilterContent: StyletronComponent<any>;
|
|
60
|
-
export const StyledFilterHeading: StyletronComponent<any>;
|
|
61
|
-
export const StyledFilterFooter: StyletronComponent<any>;
|
|
62
|
-
export const StyledHead: StyletronComponent<any>;
|
|
63
|
-
export const StyledHeadCell: StyletronComponent<any>;
|
|
64
|
-
export const StyledBody: StyletronComponent<any>;
|
|
65
|
-
export const StyledRow: StyletronComponent<any>;
|
|
66
|
-
export const StyledCell: StyletronComponent<any>;
|
|
67
|
-
export const StyledAction: StyletronComponent<any>;
|
|
68
|
-
export const StyledSortableLabel: StyletronComponent<any>;
|
|
57
|
+
export declare const StyledTable: StyletronComponent<any>;
|
|
58
|
+
export declare const StyledFilterButton: StyletronComponent<any>;
|
|
59
|
+
export declare const StyledFilterContent: StyletronComponent<any>;
|
|
60
|
+
export declare const StyledFilterHeading: StyletronComponent<any>;
|
|
61
|
+
export declare const StyledFilterFooter: StyletronComponent<any>;
|
|
62
|
+
export declare const StyledHead: StyletronComponent<any>;
|
|
63
|
+
export declare const StyledHeadCell: StyletronComponent<any>;
|
|
64
|
+
export declare const StyledBody: StyletronComponent<any>;
|
|
65
|
+
export declare const StyledRow: StyletronComponent<any>;
|
|
66
|
+
export declare const StyledCell: StyletronComponent<any>;
|
|
67
|
+
export declare const StyledAction: StyletronComponent<any>;
|
|
68
|
+
export declare const StyledSortableLabel: StyletronComponent<any>;
|
package/table-grid/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {StyletronComponent} from 'styletron-react';
|
|
4
|
-
import {SORT_DIRECTION, SortableHeadCell} from '../table/';
|
|
1
|
+
import { StyletronComponent } from 'styletron-react';
|
|
2
|
+
import { SORT_DIRECTION, SortableHeadCell } from '../table/';
|
|
5
3
|
|
|
6
|
-
export const StyledTable: StyletronComponent<any>;
|
|
7
|
-
export const StyledHeadCell: StyletronComponent<any>;
|
|
8
|
-
export const StyledBodyCell: StyletronComponent<any>;
|
|
9
|
-
export {SORT_DIRECTION, SortableHeadCell};
|
|
4
|
+
export declare const StyledTable: StyletronComponent<any>;
|
|
5
|
+
export declare const StyledHeadCell: StyletronComponent<any>;
|
|
6
|
+
export declare const StyledBodyCell: StyletronComponent<any>;
|
|
7
|
+
export { SORT_DIRECTION, SortableHeadCell };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {StyletronComponent} from 'styletron-react';
|
|
3
|
-
import {Override} from '../overrides';
|
|
2
|
+
import { StyletronComponent } from 'styletron-react';
|
|
3
|
+
import { Override } from '../overrides';
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export declare const DIVIDER: {
|
|
6
6
|
horizontal: 'horizontal';
|
|
7
7
|
vertical: 'vertical';
|
|
8
8
|
grid: 'grid';
|
|
9
9
|
clean: 'clean';
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
|
|
12
|
-
export
|
|
12
|
+
export declare const SIZE: {
|
|
13
13
|
compact: 'compact';
|
|
14
14
|
default: 'default';
|
|
15
15
|
spacious: 'spacious';
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
|
|
18
18
|
export interface TableOverrides {
|
|
19
19
|
Root?: Override<any>;
|
|
@@ -31,17 +31,18 @@ export interface TableProps {
|
|
|
31
31
|
overrides?: TableOverrides;
|
|
32
32
|
columns: Array<React.ReactNode>;
|
|
33
33
|
data: React.ReactNode[][];
|
|
34
|
-
divider?: DIVIDER[keyof DIVIDER];
|
|
34
|
+
divider?: typeof DIVIDER[keyof typeof DIVIDER];
|
|
35
35
|
horizontalScrollWidth?: string;
|
|
36
36
|
isLoading?: boolean;
|
|
37
37
|
loadingMessage?: React.ReactNode | (() => React.ReactNode);
|
|
38
38
|
emptyMessage?: React.ReactNode | (() => React.ReactNode);
|
|
39
|
-
size?: SIZE[keyof SIZE];
|
|
39
|
+
size?: typeof SIZE[keyof typeof SIZE];
|
|
40
40
|
}
|
|
41
41
|
export class Table extends React.Component<TableProps> {}
|
|
42
42
|
|
|
43
43
|
export interface BuilderOverrides extends TableOverrides {
|
|
44
44
|
TableHeadCellSortable?: Override<any>;
|
|
45
|
+
SortIconContainer?: Override<any>;
|
|
45
46
|
SortAscIcon?: Override<any>;
|
|
46
47
|
SortDescIcon?: Override<any>;
|
|
47
48
|
SortNoneIcon?: Override<any>;
|
|
@@ -57,11 +58,9 @@ export interface TableBuilderProps<RowT> {
|
|
|
57
58
|
isLoading?: boolean;
|
|
58
59
|
loadingMessage?: React.ReactNode | (() => React.ReactNode);
|
|
59
60
|
emptyMessage?: React.ReactNode | (() => React.ReactNode);
|
|
60
|
-
size?: SIZE[keyof SIZE];
|
|
61
|
+
size?: typeof SIZE[keyof typeof SIZE];
|
|
61
62
|
}
|
|
62
|
-
export class TableBuilder<RowT> extends React.Component<
|
|
63
|
-
TableBuilderProps<RowT>
|
|
64
|
-
> {}
|
|
63
|
+
export class TableBuilder<RowT> extends React.Component<TableBuilderProps<RowT>> {}
|
|
65
64
|
|
|
66
65
|
export interface ColumnOverrides {
|
|
67
66
|
TableHeadCell?: Override<any>;
|
|
@@ -80,24 +79,19 @@ export interface TableBuilderColumnProps<RowT> {
|
|
|
80
79
|
sortable?: boolean;
|
|
81
80
|
tableHeadAriaLabel?: string;
|
|
82
81
|
}
|
|
83
|
-
export class TableBuilderColumn<RowT> extends React.Component<
|
|
84
|
-
TableBuilderColumnProps<RowT>
|
|
85
|
-
> {}
|
|
86
|
-
|
|
87
|
-
export const StyledRoot: StyletronComponent<any>;
|
|
88
|
-
export const StyledTable: StyletronComponent<any>;
|
|
89
|
-
export const StyledTableHead: StyletronComponent<any>;
|
|
90
|
-
export const StyledTableHeadRow: StyletronComponent<any>;
|
|
91
|
-
export const StyledTableHeadCell: StyletronComponent<any>;
|
|
92
|
-
export const StyledTableHeadCellSortable: StyletronComponent<any>;
|
|
93
|
-
export const StyledTableBody: StyletronComponent<any>;
|
|
94
|
-
export const StyledTableBodyRow: StyletronComponent<any>;
|
|
95
|
-
export const StyledTableBodyCell: StyletronComponent<any>;
|
|
96
|
-
export const StyledTableLoadingMessage: StyletronComponent<any>;
|
|
97
|
-
export const StyledTableEmptyMessage: StyletronComponent<any>;
|
|
98
|
-
export const StyledSortAscIcon: StyletronComponent<any>;
|
|
99
|
-
export const StyledSortDescIcon: StyletronComponent<any>;
|
|
100
|
-
export const StyledSortNoneIcon: StyletronComponent<any>;
|
|
82
|
+
export class TableBuilderColumn<RowT> extends React.Component<TableBuilderColumnProps<RowT>> {}
|
|
101
83
|
|
|
102
|
-
export const
|
|
103
|
-
export const
|
|
84
|
+
export declare const StyledRoot: StyletronComponent<any>;
|
|
85
|
+
export declare const StyledTable: StyletronComponent<any>;
|
|
86
|
+
export declare const StyledTableHead: StyletronComponent<any>;
|
|
87
|
+
export declare const StyledTableHeadRow: StyletronComponent<any>;
|
|
88
|
+
export declare const StyledTableHeadCell: StyletronComponent<any>;
|
|
89
|
+
export declare const StyledTableHeadCellSortable: StyletronComponent<any>;
|
|
90
|
+
export declare const StyledTableBody: StyletronComponent<any>;
|
|
91
|
+
export declare const StyledTableBodyRow: StyletronComponent<any>;
|
|
92
|
+
export declare const StyledTableBodyCell: StyletronComponent<any>;
|
|
93
|
+
export declare const StyledTableLoadingMessage: StyletronComponent<any>;
|
|
94
|
+
export declare const StyledTableEmptyMessage: StyletronComponent<any>;
|
|
95
|
+
export declare const StyledSortAscIcon: StyletronComponent<any>;
|
|
96
|
+
export declare const StyledSortDescIcon: StyletronComponent<any>;
|
|
97
|
+
export declare const StyledSortNoneIcon: StyletronComponent<any>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledTableEmptyMessage = exports.StyledTableLoadingMessage = exports.StyledTableBodyCell = exports.StyledTableBodyRow = exports.StyledTableBody = exports.StyledSortNoneIcon = exports.StyledSortDescIcon = exports.StyledSortAscIcon = exports.StyledTableHeadCellSortable = exports.StyledTableHeadCell = exports.StyledTableHeadRow = exports.StyledTableHead = exports.StyledTable = exports.StyledRoot = void 0;
|
|
6
|
+
exports.StyledTableEmptyMessage = exports.StyledTableLoadingMessage = exports.StyledTableBodyCell = exports.StyledTableBodyRow = exports.StyledTableBody = exports.StyledSortNoneIcon = exports.StyledSortDescIcon = exports.StyledSortAscIcon = exports.StyledSortIconContainer = exports.StyledTableHeadCellSortable = exports.StyledTableHeadCell = exports.StyledTableHeadRow = exports.StyledTableHead = exports.StyledTable = exports.StyledRoot = void 0;
|
|
7
7
|
|
|
8
8
|
var _blank = _interopRequireDefault(require("../icon/blank.js"));
|
|
9
9
|
|
|
@@ -128,8 +128,22 @@ var StyledTableHeadCellSortable = (0, _index.withStyle)(StyledTableHeadCell, fun
|
|
|
128
128
|
});
|
|
129
129
|
exports.StyledTableHeadCellSortable = StyledTableHeadCellSortable;
|
|
130
130
|
StyledTableHeadCellSortable.displayName = "StyledTableHeadCellSortable";
|
|
131
|
-
var
|
|
131
|
+
var StyledSortIconContainer = (0, _index.styled)('span', function (_ref7) {
|
|
132
132
|
var $theme = _ref7.$theme;
|
|
133
|
+
return {
|
|
134
|
+
display: 'flex',
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
position: 'absolute',
|
|
137
|
+
top: '50%',
|
|
138
|
+
right: $theme.sizing.scale500,
|
|
139
|
+
transform: 'translateY(-50%)'
|
|
140
|
+
};
|
|
141
|
+
}); // No longer used, but will maintain for some time to support existing usage
|
|
142
|
+
|
|
143
|
+
exports.StyledSortIconContainer = StyledSortIconContainer;
|
|
144
|
+
StyledSortIconContainer.displayName = "StyledSortIconContainer";
|
|
145
|
+
var StyledSortAscIcon = (0, _index.styled)(_chevronUp.default, function (_ref8) {
|
|
146
|
+
var $theme = _ref8.$theme;
|
|
133
147
|
return {
|
|
134
148
|
position: 'absolute',
|
|
135
149
|
top: '50%',
|
|
@@ -139,8 +153,8 @@ var StyledSortAscIcon = (0, _index.styled)(_chevronUp.default, function (_ref7)
|
|
|
139
153
|
});
|
|
140
154
|
exports.StyledSortAscIcon = StyledSortAscIcon;
|
|
141
155
|
StyledSortAscIcon.displayName = "StyledSortAscIcon";
|
|
142
|
-
var StyledSortDescIcon = (0, _index.styled)(_chevronDown.default, function (
|
|
143
|
-
var $theme =
|
|
156
|
+
var StyledSortDescIcon = (0, _index.styled)(_chevronDown.default, function (_ref9) {
|
|
157
|
+
var $theme = _ref9.$theme;
|
|
144
158
|
return {
|
|
145
159
|
position: 'absolute',
|
|
146
160
|
top: '50%',
|
|
@@ -150,8 +164,8 @@ var StyledSortDescIcon = (0, _index.styled)(_chevronDown.default, function (_ref
|
|
|
150
164
|
});
|
|
151
165
|
exports.StyledSortDescIcon = StyledSortDescIcon;
|
|
152
166
|
StyledSortDescIcon.displayName = "StyledSortDescIcon";
|
|
153
|
-
var StyledSortNoneIcon = (0, _index.styled)(_blank.default, function (
|
|
154
|
-
var $theme =
|
|
167
|
+
var StyledSortNoneIcon = (0, _index.styled)(_blank.default, function (_ref10) {
|
|
168
|
+
var $theme = _ref10.$theme;
|
|
155
169
|
return {
|
|
156
170
|
position: 'absolute',
|
|
157
171
|
top: '50%',
|
|
@@ -161,14 +175,14 @@ var StyledSortNoneIcon = (0, _index.styled)(_blank.default, function (_ref9) {
|
|
|
161
175
|
});
|
|
162
176
|
exports.StyledSortNoneIcon = StyledSortNoneIcon;
|
|
163
177
|
StyledSortNoneIcon.displayName = "StyledSortNoneIcon";
|
|
164
|
-
var StyledTableBody = (0, _index.styled)('tbody', function (
|
|
165
|
-
var $theme =
|
|
178
|
+
var StyledTableBody = (0, _index.styled)('tbody', function (_ref11) {
|
|
179
|
+
var $theme = _ref11.$theme;
|
|
166
180
|
return {};
|
|
167
181
|
});
|
|
168
182
|
exports.StyledTableBody = StyledTableBody;
|
|
169
183
|
StyledTableBody.displayName = "StyledTableBody";
|
|
170
|
-
var StyledTableBodyRow = (0, _index.styled)('tr', function (
|
|
171
|
-
var $theme =
|
|
184
|
+
var StyledTableBodyRow = (0, _index.styled)('tr', function (_ref12) {
|
|
185
|
+
var $theme = _ref12.$theme;
|
|
172
186
|
return {
|
|
173
187
|
':hover': {
|
|
174
188
|
backgroundColor: $theme.colors.tableStripedBackground
|
|
@@ -177,15 +191,15 @@ var StyledTableBodyRow = (0, _index.styled)('tr', function (_ref11) {
|
|
|
177
191
|
});
|
|
178
192
|
exports.StyledTableBodyRow = StyledTableBodyRow;
|
|
179
193
|
StyledTableBodyRow.displayName = "StyledTableBodyRow";
|
|
180
|
-
var StyledTableBodyCell = (0, _index.styled)('td', function (
|
|
194
|
+
var StyledTableBodyCell = (0, _index.styled)('td', function (_ref13) {
|
|
181
195
|
var _notLastChild2;
|
|
182
196
|
|
|
183
|
-
var $theme =
|
|
184
|
-
$size =
|
|
185
|
-
$divider =
|
|
186
|
-
$isNumeric =
|
|
187
|
-
$isLastRow =
|
|
188
|
-
$isSortable =
|
|
197
|
+
var $theme = _ref13.$theme,
|
|
198
|
+
$size = _ref13.$size,
|
|
199
|
+
$divider = _ref13.$divider,
|
|
200
|
+
$isNumeric = _ref13.$isNumeric,
|
|
201
|
+
$isLastRow = _ref13.$isLastRow,
|
|
202
|
+
$isSortable = _ref13.$isSortable;
|
|
189
203
|
var borderDir = $theme.direction === 'rtl' ? 'Left' : 'Right';
|
|
190
204
|
var borderVertical = $divider === _constants.DIVIDER.vertical || $divider === _constants.DIVIDER.grid;
|
|
191
205
|
var borderHorizontal = $divider === undefined || $divider === _constants.DIVIDER.horizontal || $divider === _constants.DIVIDER.grid;
|
|
@@ -206,8 +220,8 @@ var StyledTableBodyCell = (0, _index.styled)('td', function (_ref12) {
|
|
|
206
220
|
});
|
|
207
221
|
exports.StyledTableBodyCell = StyledTableBodyCell;
|
|
208
222
|
StyledTableBodyCell.displayName = "StyledTableBodyCell";
|
|
209
|
-
var StyledTableLoadingMessage = (0, _index.styled)('div', function (
|
|
210
|
-
var $theme =
|
|
223
|
+
var StyledTableLoadingMessage = (0, _index.styled)('div', function (_ref14) {
|
|
224
|
+
var $theme = _ref14.$theme;
|
|
211
225
|
return _objectSpread(_objectSpread({}, $theme.typography.ParagraphSmall), {}, {
|
|
212
226
|
color: $theme.colors.contentPrimary,
|
|
213
227
|
padding: $theme.sizing.scale600
|
|
@@ -140,6 +140,18 @@ export const StyledTableHeadCellSortable = withStyle<
|
|
|
140
140
|
};
|
|
141
141
|
});
|
|
142
142
|
|
|
143
|
+
export const StyledSortIconContainer = styled<{}>('span', ({ $theme }) => {
|
|
144
|
+
return {
|
|
145
|
+
display: 'flex',
|
|
146
|
+
alignItems: 'center',
|
|
147
|
+
position: 'absolute',
|
|
148
|
+
top: '50%',
|
|
149
|
+
right: $theme.sizing.scale500,
|
|
150
|
+
transform: 'translateY(-50%)',
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// No longer used, but will maintain for some time to support existing usage
|
|
143
155
|
export const StyledSortAscIcon = styled<typeof ChevronUp, {}>(ChevronUp, ({ $theme }) => {
|
|
144
156
|
return {
|
|
145
157
|
position: 'absolute',
|