@redis-ui/styles 21.0.0 → 21.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/dist/index.js +1344 -1272
- package/dist/index.umd.cjs +8 -8
- package/dist/themes/themeDark/theme/components/gauge.d.ts +3 -0
- package/dist/themes/themeDark/theme/components/gauge.js +38 -0
- package/dist/themes/themeDark/theme.js +2 -0
- package/dist/themes/themeLight/theme/components/gauge.d.ts +3 -0
- package/dist/themes/themeLight/theme/components/gauge.js +38 -0
- package/dist/themes/themeLight/theme.js +2 -0
- package/dist/themes/types/theme/components/gauge.types.d.ts +21 -0
- package/dist/themes/types/theme/components/gauge.types.js +1 -0
- package/dist/themes/types/theme/components/index.d.ts +1 -0
- package/dist/themes/types/theme/components/index.js +1 -0
- package/dist/themes/types/theme/theme.types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { tokens } from '../../tokens';
|
|
2
|
+
const theme = {
|
|
3
|
+
variant: {
|
|
4
|
+
success: {
|
|
5
|
+
arcColor: tokens.semantic.color.background.success300,
|
|
6
|
+
trackColor: tokens.semantic.color.background.success700,
|
|
7
|
+
textColor: tokens.semantic.color.text.success300
|
|
8
|
+
},
|
|
9
|
+
attention: {
|
|
10
|
+
arcColor: tokens.semantic.color.background.attention200,
|
|
11
|
+
trackColor: tokens.semantic.color.background.attention600,
|
|
12
|
+
textColor: tokens.semantic.color.text.attention300
|
|
13
|
+
},
|
|
14
|
+
danger: {
|
|
15
|
+
arcColor: tokens.semantic.color.background.danger200,
|
|
16
|
+
trackColor: tokens.semantic.color.background.danger500,
|
|
17
|
+
textColor: tokens.semantic.color.text.danger300
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
S: {
|
|
22
|
+
diameter: '4rem',
|
|
23
|
+
strokeWidth: '12',
|
|
24
|
+
fontSize: tokens.core.font.fontSize.s10
|
|
25
|
+
},
|
|
26
|
+
M: {
|
|
27
|
+
diameter: '5.3rem',
|
|
28
|
+
strokeWidth: '11',
|
|
29
|
+
fontSize: tokens.core.font.fontSize.s12
|
|
30
|
+
},
|
|
31
|
+
L: {
|
|
32
|
+
diameter: '7.2rem',
|
|
33
|
+
strokeWidth: '10',
|
|
34
|
+
fontSize: tokens.core.font.fontSize.s16
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export default theme;
|
|
@@ -18,6 +18,7 @@ import countryFlag from './theme/components/countryFlag';
|
|
|
18
18
|
import drawer from './theme/components/drawer';
|
|
19
19
|
import filters from './theme/components/filters';
|
|
20
20
|
import formField from './theme/components/formField';
|
|
21
|
+
import gauge from './theme/components/gauge';
|
|
21
22
|
import highlightedIcon from './theme/components/highlightedIcon';
|
|
22
23
|
import icon from './theme/components/icon';
|
|
23
24
|
import iconButton from './theme/components/iconButton';
|
|
@@ -84,6 +85,7 @@ export const theme = {
|
|
|
84
85
|
drawer,
|
|
85
86
|
filters,
|
|
86
87
|
formField,
|
|
88
|
+
gauge,
|
|
87
89
|
highlightedIcon,
|
|
88
90
|
icon,
|
|
89
91
|
iconButton,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { tokens } from '../../tokens';
|
|
2
|
+
const theme = {
|
|
3
|
+
variant: {
|
|
4
|
+
success: {
|
|
5
|
+
arcColor: tokens.semantic.color.background.success600,
|
|
6
|
+
trackColor: tokens.semantic.color.background.success50,
|
|
7
|
+
textColor: tokens.semantic.color.text.success600
|
|
8
|
+
},
|
|
9
|
+
attention: {
|
|
10
|
+
arcColor: tokens.semantic.color.background.attention400,
|
|
11
|
+
trackColor: tokens.semantic.color.background.attention50,
|
|
12
|
+
textColor: tokens.semantic.color.text.attention400
|
|
13
|
+
},
|
|
14
|
+
danger: {
|
|
15
|
+
arcColor: tokens.semantic.color.background.danger500,
|
|
16
|
+
trackColor: tokens.semantic.color.background.danger50,
|
|
17
|
+
textColor: tokens.semantic.color.text.danger500
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
S: {
|
|
22
|
+
diameter: '4rem',
|
|
23
|
+
strokeWidth: '12',
|
|
24
|
+
fontSize: tokens.core.font.fontSize.s10
|
|
25
|
+
},
|
|
26
|
+
M: {
|
|
27
|
+
diameter: '5.3rem',
|
|
28
|
+
strokeWidth: '11',
|
|
29
|
+
fontSize: tokens.core.font.fontSize.s12
|
|
30
|
+
},
|
|
31
|
+
L: {
|
|
32
|
+
diameter: '7.2rem',
|
|
33
|
+
strokeWidth: '10',
|
|
34
|
+
fontSize: tokens.core.font.fontSize.s16
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export default theme;
|
|
@@ -18,6 +18,7 @@ import countryFlag from './theme/components/countryFlag';
|
|
|
18
18
|
import drawer from './theme/components/drawer';
|
|
19
19
|
import filters from './theme/components/filters';
|
|
20
20
|
import formField from './theme/components/formField';
|
|
21
|
+
import gauge from './theme/components/gauge';
|
|
21
22
|
import highlightedIcon from './theme/components/highlightedIcon';
|
|
22
23
|
import icon from './theme/components/icon';
|
|
23
24
|
import iconButton from './theme/components/iconButton';
|
|
@@ -84,6 +85,7 @@ export const theme = {
|
|
|
84
85
|
drawer,
|
|
85
86
|
filters,
|
|
86
87
|
formField,
|
|
88
|
+
gauge,
|
|
87
89
|
highlightedIcon,
|
|
88
90
|
icon,
|
|
89
91
|
iconButton,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type GaugeVariant = 'success' | 'attention' | 'danger';
|
|
2
|
+
export type GaugeSize = 'S' | 'M' | 'L';
|
|
3
|
+
export interface GaugeVariantProperties {
|
|
4
|
+
arcColor: string;
|
|
5
|
+
trackColor: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GaugeSizeProperties {
|
|
9
|
+
/** Rendered diameter of the gauge. */
|
|
10
|
+
diameter: string;
|
|
11
|
+
/** Ring thickness, expressed in SVG viewBox units (0-100). */
|
|
12
|
+
strokeWidth: string;
|
|
13
|
+
/** Font size of the centered label. */
|
|
14
|
+
fontSize: string;
|
|
15
|
+
}
|
|
16
|
+
export type GaugeVariantStyles = Record<GaugeVariant, GaugeVariantProperties>;
|
|
17
|
+
export type GaugeSizeStyles = Record<GaugeSize, GaugeSizeProperties>;
|
|
18
|
+
export interface GaugeTheme {
|
|
19
|
+
variant: GaugeVariantStyles;
|
|
20
|
+
size: GaugeSizeStyles;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,6 +16,7 @@ export * from './countryFlag.types';
|
|
|
16
16
|
export * from './drawer.types';
|
|
17
17
|
export * from './filters.types';
|
|
18
18
|
export * from './formField.types';
|
|
19
|
+
export * from './gauge.types';
|
|
19
20
|
export * from './global.types';
|
|
20
21
|
export * from './highlightedIcon.types';
|
|
21
22
|
export * from './icon.types';
|
|
@@ -16,6 +16,7 @@ export * from './countryFlag.types';
|
|
|
16
16
|
export * from './drawer.types';
|
|
17
17
|
export * from './filters.types';
|
|
18
18
|
export * from './formField.types';
|
|
19
|
+
export * from './gauge.types';
|
|
19
20
|
export * from './global.types';
|
|
20
21
|
export * from './highlightedIcon.types';
|
|
21
22
|
export * from './icon.types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tokens } from './tokens.types';
|
|
2
|
-
import { ActionIconButtonTheme, AppBarTheme, AppSelectionMenuTheme, AutoCompleteTheme, BadgeTheme, BannerTheme, BoxSelectionGroupTheme, BreadcrumbsTheme, ButtonGroupTheme, ButtonTheme, CardTheme, CheckboxTheme, ChipListTheme, ChipTheme, CountryFlagTheme, DrawerTheme, FiltersTheme, FormFieldTheme, HighlightedIconTheme, IconTheme, IconButtonTheme, InputTheme, KeyValueListTheme, LabelTheme, LayoutsTheme, LinkTheme, LoaderTheme, MenuTheme, MidBarTheme, ModalTheme, MoreInfoIconTheme, PopoverTheme, PopupCardTheme, ProfileIconTheme, ProgressBarTheme, RadioTheme, SearchBarTheme, SectionTheme, SelectTheme, SemanticButtonTheme, SemanticContainerTheme, SemanticIconTheme, SideBarTheme, SkeletonTheme, SliderTheme, StepperTheme, SwitchTheme, TableHeadingTheme, TableTheme, TabsTheme, TextButtonTheme, ThemeModeSwitchTheme, ToastTheme, ToggleButtonTheme, TooltipTheme, TreeViewTheme, TypoTheme, WindowBarTheme } from './components';
|
|
2
|
+
import { ActionIconButtonTheme, AppBarTheme, AppSelectionMenuTheme, AutoCompleteTheme, BadgeTheme, BannerTheme, BoxSelectionGroupTheme, BreadcrumbsTheme, ButtonGroupTheme, ButtonTheme, CardTheme, CheckboxTheme, ChipListTheme, ChipTheme, CountryFlagTheme, DrawerTheme, FiltersTheme, FormFieldTheme, GaugeTheme, HighlightedIconTheme, IconTheme, IconButtonTheme, InputTheme, KeyValueListTheme, LabelTheme, LayoutsTheme, LinkTheme, LoaderTheme, MenuTheme, MidBarTheme, ModalTheme, MoreInfoIconTheme, PopoverTheme, PopupCardTheme, ProfileIconTheme, ProgressBarTheme, RadioTheme, SearchBarTheme, SectionTheme, SelectTheme, SemanticButtonTheme, SemanticContainerTheme, SemanticIconTheme, SideBarTheme, SkeletonTheme, SliderTheme, StepperTheme, SwitchTheme, TableHeadingTheme, TableTheme, TabsTheme, TextButtonTheme, ThemeModeSwitchTheme, ToastTheme, ToggleButtonTheme, TooltipTheme, TreeViewTheme, TypoTheme, WindowBarTheme } from './components';
|
|
3
3
|
import { BodyTheme, ScrollbarTheme } from './globals';
|
|
4
4
|
import { ThemeCore } from './themeCore.types';
|
|
5
5
|
export interface Theme extends ThemeCore, Tokens {
|
|
@@ -22,6 +22,7 @@ export interface Theme extends ThemeCore, Tokens {
|
|
|
22
22
|
drawer: DrawerTheme;
|
|
23
23
|
filters: FiltersTheme;
|
|
24
24
|
formField: FormFieldTheme;
|
|
25
|
+
gauge: GaugeTheme;
|
|
25
26
|
highlightedIcon: HighlightedIconTheme;
|
|
26
27
|
icon: IconTheme;
|
|
27
28
|
iconButton: IconButtonTheme;
|