@redis-ui/styles 20.0.0 → 21.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.
@@ -1,15 +1,31 @@
1
1
  import { tokens } from '../../tokens';
2
2
  const theme = {
3
- flexGroup: {
4
- gap: {
5
- XXS: tokens.core.space.space025,
6
- XS: tokens.core.space.space050,
7
- S: tokens.core.space.space100,
8
- M: tokens.core.space.space150,
9
- L: tokens.core.space.space200,
10
- XL: tokens.core.space.space300,
11
- XXL: tokens.core.space.space400
12
- }
3
+ gap: {
4
+ XXS: tokens.core.space.space025,
5
+ XS: tokens.core.space.space050,
6
+ S: tokens.core.space.space100,
7
+ M: tokens.core.space.space150,
8
+ L: tokens.core.space.space200,
9
+ XL: tokens.core.space.space300,
10
+ XXL: tokens.core.space.space400
11
+ },
12
+ padding: {
13
+ XXS: tokens.core.space.space025,
14
+ XS: tokens.core.space.space050,
15
+ S: tokens.core.space.space100,
16
+ M: tokens.core.space.space150,
17
+ L: tokens.core.space.space200,
18
+ XL: tokens.core.space.space250,
19
+ XXL: tokens.core.space.space300
20
+ },
21
+ margin: {
22
+ XXS: tokens.core.space.space025,
23
+ XS: tokens.core.space.space050,
24
+ S: tokens.core.space.space100,
25
+ M: tokens.core.space.space150,
26
+ L: tokens.core.space.space200,
27
+ XL: tokens.core.space.space250,
28
+ XXL: tokens.core.space.space300
13
29
  },
14
30
  flexDivider: {
15
31
  color: tokens.semantic.color.background.secondary700,
@@ -61,8 +61,6 @@ import windowBar from './theme/components/windowBar';
61
61
  // globals:
62
62
  import body from './theme/globals/body';
63
63
  import scrollbar from './theme/globals/scrollbar';
64
- // rsuite:
65
- import rsuite from './theme/rsuite';
66
64
  export const theme = {
67
65
  name: 'dark',
68
66
  mode: 'dark',
@@ -130,6 +128,5 @@ export const theme = {
130
128
  globals: {
131
129
  body,
132
130
  scrollbar
133
- },
134
- rsuite
131
+ }
135
132
  };
@@ -1,15 +1,31 @@
1
1
  import { tokens } from '../../tokens';
2
2
  const theme = {
3
- flexGroup: {
4
- gap: {
5
- XXS: tokens.core.space.space025,
6
- XS: tokens.core.space.space050,
7
- S: tokens.core.space.space100,
8
- M: tokens.core.space.space150,
9
- L: tokens.core.space.space200,
10
- XL: tokens.core.space.space300,
11
- XXL: tokens.core.space.space400
12
- }
3
+ gap: {
4
+ XXS: tokens.core.space.space025,
5
+ XS: tokens.core.space.space050,
6
+ S: tokens.core.space.space100,
7
+ M: tokens.core.space.space150,
8
+ L: tokens.core.space.space200,
9
+ XL: tokens.core.space.space300,
10
+ XXL: tokens.core.space.space400
11
+ },
12
+ padding: {
13
+ XXS: tokens.core.space.space025,
14
+ XS: tokens.core.space.space050,
15
+ S: tokens.core.space.space100,
16
+ M: tokens.core.space.space150,
17
+ L: tokens.core.space.space200,
18
+ XL: tokens.core.space.space250,
19
+ XXL: tokens.core.space.space300
20
+ },
21
+ margin: {
22
+ XXS: tokens.core.space.space025,
23
+ XS: tokens.core.space.space050,
24
+ S: tokens.core.space.space100,
25
+ M: tokens.core.space.space150,
26
+ L: tokens.core.space.space200,
27
+ XL: tokens.core.space.space250,
28
+ XXL: tokens.core.space.space300
13
29
  },
14
30
  flexDivider: {
15
31
  color: tokens.semantic.color.background.secondary300,
@@ -61,8 +61,6 @@ import windowBar from './theme/components/windowBar';
61
61
  // globals:
62
62
  import body from './theme/globals/body';
63
63
  import scrollbar from './theme/globals/scrollbar';
64
- // rsuite:
65
- import rsuite from './theme/rsuite';
66
64
  export const theme = {
67
65
  name: 'light',
68
66
  mode: 'light',
@@ -130,6 +128,5 @@ export const theme = {
130
128
  globals: {
131
129
  body,
132
130
  scrollbar
133
- },
134
- rsuite
131
+ }
135
132
  };
@@ -1,6 +1,5 @@
1
1
  export type { Theme } from './theme/theme.types';
2
2
  export type { Tokens } from './theme/tokens.types';
3
- export type { RsuiteTheme, RsuiteColorTheme, RsuiteCommonTheme } from './theme/rsuite.types';
4
3
  export * from './theme/themeCore.types';
5
4
  export * from './theme/components';
6
5
  export * from './theme/globals';
@@ -1,9 +1,9 @@
1
- type FlexGroupGapSize = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL';
1
+ type LayoutSpacingSize = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL';
2
2
  type FlexDividerPaddingSize = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL' | 'none';
3
3
  export type LayoutsTheme = {
4
- flexGroup: {
5
- gap: Record<FlexGroupGapSize, string>;
6
- };
4
+ gap: Record<LayoutSpacingSize, string>;
5
+ padding: Record<LayoutSpacingSize, string>;
6
+ margin: Record<LayoutSpacingSize, string>;
7
7
  flexDivider: {
8
8
  color: string;
9
9
  size: string;
@@ -2,7 +2,6 @@ import { Tokens } from './tokens.types';
2
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';
3
3
  import { BodyTheme, ScrollbarTheme } from './globals';
4
4
  import { ThemeCore } from './themeCore.types';
5
- import { RsuiteTheme } from './rsuite.types';
6
5
  export interface Theme extends ThemeCore, Tokens {
7
6
  components: {
8
7
  actionIconButton: ActionIconButtonTheme;
@@ -68,5 +67,4 @@ export interface Theme extends ThemeCore, Tokens {
68
67
  body: BodyTheme;
69
68
  scrollbar: ScrollbarTheme;
70
69
  };
71
- rsuite?: RsuiteTheme;
72
70
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/styles",
3
3
  "license": "UNLICENSED",
4
- "version": "20.0.0",
4
+ "version": "21.0.0",
5
5
  "repository": "git@github.com:redislabsdev/redis-ui.git",
6
6
  "type": "module",
7
7
  "files": [
@@ -32,14 +32,8 @@
32
32
  "modern-normalize": "^3.0.1",
33
33
  "react": "^18.0.0 || ^19.0.0",
34
34
  "react-dom": "^18.0.0 || ^19.0.0",
35
- "rsuite": "^6.0.0",
36
35
  "styled-components": "^5.0.0"
37
36
  },
38
- "peerDependenciesMeta": {
39
- "rsuite": {
40
- "optional": true
41
- }
42
- },
43
37
  "devDependencies": {
44
38
  "style-dictionary": "^3.7.2",
45
39
  "type-fest": "^5.4.4",
@@ -1,2 +0,0 @@
1
- import { RsuiteCommonTheme } from '../types/theme/rsuite.types';
2
- export declare const rsuiteCommon: RsuiteCommonTheme;
@@ -1,35 +0,0 @@
1
- import { tokens as light2Tokens } from '../themeLight/tokens';
2
- export const rsuiteCommon = {
3
- '--rs-font-size-base': light2Tokens.core.font.fontSize.s14,
4
- '--rs-font-size-4xs': light2Tokens.core.font.fontSize.s8,
5
- '--rs-font-size-3xs': light2Tokens.core.font.fontSize.s10,
6
- '--rs-font-size-2xs': light2Tokens.core.font.fontSize.s12,
7
- '--rs-font-size-xs': light2Tokens.core.font.fontSize.s13,
8
- '--rs-font-size-sm': light2Tokens.core.font.fontSize.s14,
9
- '--rs-font-size-md': light2Tokens.core.font.fontSize.s15,
10
- '--rs-font-size-lg': light2Tokens.core.font.fontSize.s16,
11
- '--rs-font-size-xl': light2Tokens.core.font.fontSize.s18,
12
- '--rs-font-size-2xl': light2Tokens.core.font.fontSize.s20,
13
- '--rs-font-size-3xl': light2Tokens.core.font.fontSize.s22,
14
- '--rs-font-size-4xl': light2Tokens.core.font.fontSize.s24,
15
- '--rs-font-size-5xl': light2Tokens.core.font.fontSize.s26,
16
- '--rs-font-size-6xl': light2Tokens.core.font.fontSize.s28,
17
- '--rs-btn-icon-size-xs': light2Tokens.core.icon.size.S,
18
- '--rs-btn-icon-size-sm': light2Tokens.core.icon.size.M,
19
- '--rs-btn-icon-size-md': light2Tokens.core.icon.size.L,
20
- '--rs-btn-icon-size-lg': light2Tokens.core.icon.size.XL,
21
- '--rs-input-padding-block-md': '0.55rem',
22
- '--rs-input-padding-inline-md': '1.2rem',
23
- '--rs-btn-padding-inline-xs': '1rem',
24
- '--rs-btn-padding-inline-sm': '1.2rem',
25
- '--rs-btn-padding-inline-md': '1.6rem',
26
- '--rs-btn-padding-inline-lg': '1.6rem',
27
- '--rs-btn-padding-block-xs': '0.4rem',
28
- '--rs-btn-padding-block-sm': '0.55rem',
29
- '--rs-btn-padding-block-md': '0.8rem',
30
- '--rs-btn-padding-block-lg': '0.8rem',
31
- '--rs-btn-size-xs': '2.4rem',
32
- '--rs-btn-size-sm': '3rem',
33
- '--rs-btn-size-md': '3.6rem',
34
- '--rs-btn-size-lg': '3.6rem'
35
- };
@@ -1,3 +0,0 @@
1
- import { RsuiteTheme } from '../../types/theme/rsuite.types';
2
- declare const theme: RsuiteTheme;
3
- export default theme;
@@ -1,37 +0,0 @@
1
- import { rsuiteCommon } from '../../common/rsuiteCommon';
2
- import { tokens } from '../tokens';
3
- const colorTheme = {
4
- '--rs-bg-active': 'var(--rs-primary-400)',
5
- '--rs-bg-overlay': tokens.semantic.color.background.secondary900,
6
- '--rs-input-bg': tokens.semantic.color.background.secondary950,
7
- '--rs-input-focus-border': tokens.semantic.color.border.primary500,
8
- '--rs-input-disabled-bg': tokens.semantic.color.background.secondary900,
9
- '--rs-border-primary': tokens.semantic.color.border.secondary600,
10
- '--rs-text-primary': tokens.semantic.color.text.secondary50,
11
- '--rs-text-active': tokens.semantic.color.text.primary300,
12
- '--rs-text-secondary': tokens.semantic.color.text.secondary500,
13
- '--rs-text-disabled': tokens.semantic.color.text.secondary600,
14
- '--rs-primary-400': tokens.semantic.color.background.primary400,
15
- '--rs-primary-500': tokens.semantic.color.background.primary500,
16
- '--rs-primary-600': tokens.semantic.color.background.primary600,
17
- '--rs-primary-700': tokens.semantic.color.background.primary700,
18
- '--rs-btn-primary-bg': 'var(--rs-primary-400)',
19
- '--rs-btn-subtle-text': tokens.semantic.color.text.secondary600,
20
- '--rs-btn-subtle-hover-text': tokens.semantic.color.text.secondary0,
21
- '--rs-btn-subtle-hover-bg': tokens.semantic.color.background.secondary700,
22
- '--rs-btn-subtle-active-bg': tokens.semantic.color.background.secondary800,
23
- '--rs-btn-subtle-active-text': tokens.semantic.color.text.secondary0,
24
- '--rs-btn-link-text': tokens.semantic.color.text.primary300,
25
- '--rs-btn-link-hover-text': tokens.semantic.color.text.primary300,
26
- '--rs-listbox-option-hover-text': tokens.semantic.color.text.secondary0,
27
- '--rs-listbox-option-hover-bg': tokens.semantic.color.background.secondary700,
28
- '--rs-listbox-option-active-text': tokens.semantic.color.text.secondary0,
29
- '--rs-listbox-option-active-bg': tokens.semantic.color.background.secondary800,
30
- '--rs-placeholder': tokens.semantic.color.text.neutral600,
31
- '--rs-divider-border': tokens.semantic.color.border.secondary700
32
- };
33
- const theme = {
34
- ...rsuiteCommon,
35
- ...colorTheme
36
- };
37
- export default theme;
@@ -1,3 +0,0 @@
1
- import { RsuiteTheme } from '../../types/theme/rsuite.types';
2
- declare const theme: RsuiteTheme;
3
- export default theme;
@@ -1,37 +0,0 @@
1
- import { rsuiteCommon } from '../../common/rsuiteCommon';
2
- import { tokens } from '../tokens';
3
- const colorTheme = {
4
- '--rs-bg-active': 'var(--rs-primary-400)',
5
- '--rs-bg-overlay': tokens.semantic.color.background.secondary0,
6
- '--rs-input-bg': tokens.semantic.color.background.secondary0,
7
- '--rs-input-focus-border': tokens.semantic.color.border.primary400,
8
- '--rs-input-disabled-bg': tokens.semantic.color.background.secondary200,
9
- '--rs-border-primary': tokens.semantic.color.border.neutral200,
10
- '--rs-text-primary': tokens.semantic.color.text.secondary950,
11
- '--rs-text-active': 'var(--rs-primary-400)',
12
- '--rs-text-secondary': tokens.semantic.color.text.secondary600,
13
- '--rs-text-disabled': tokens.semantic.color.text.secondary600,
14
- '--rs-primary-400': tokens.semantic.color.background.primary400,
15
- '--rs-primary-500': tokens.semantic.color.background.primary500,
16
- '--rs-primary-600': tokens.semantic.color.background.primary600,
17
- '--rs-primary-700': tokens.semantic.color.background.primary700,
18
- '--rs-btn-primary-bg': 'var(--rs-primary-400)',
19
- '--rs-btn-subtle-text': tokens.semantic.color.text.secondary600,
20
- '--rs-btn-subtle-hover-text': tokens.semantic.color.text.secondary950,
21
- '--rs-btn-subtle-hover-bg': tokens.semantic.color.background.secondary200,
22
- '--rs-btn-subtle-active-bg': tokens.semantic.color.background.secondary300,
23
- '--rs-btn-subtle-active-text': tokens.semantic.color.text.secondary950,
24
- '--rs-btn-link-text': 'var(--rs-primary-400)',
25
- '--rs-btn-link-hover-text': 'var(--rs-primary-400)',
26
- '--rs-listbox-option-hover-text': tokens.semantic.color.text.secondary950,
27
- '--rs-listbox-option-hover-bg': tokens.semantic.color.background.secondary200,
28
- '--rs-listbox-option-active-text': tokens.semantic.color.text.secondary950,
29
- '--rs-listbox-option-active-bg': tokens.semantic.color.background.secondary300,
30
- '--rs-placeholder': tokens.semantic.color.text.neutral600,
31
- '--rs-divider-border': tokens.semantic.color.border.secondary300
32
- };
33
- const theme = {
34
- ...rsuiteCommon,
35
- ...colorTheme
36
- };
37
- export default theme;
@@ -1,69 +0,0 @@
1
- export type RsuiteCommonTheme = {
2
- '--rs-font-size-base'?: string;
3
- '--rs-font-size-4xs'?: string;
4
- '--rs-font-size-3xs'?: string;
5
- '--rs-font-size-2xs'?: string;
6
- '--rs-font-size-xs'?: string;
7
- '--rs-font-size-s'?: string;
8
- '--rs-font-size-sm'?: string;
9
- '--rs-font-size-md'?: string;
10
- '--rs-font-size-lg'?: string;
11
- '--rs-font-size-xl'?: string;
12
- '--rs-font-size-2xl'?: string;
13
- '--rs-font-size-3xl'?: string;
14
- '--rs-font-size-4xl'?: string;
15
- '--rs-font-size-5xl'?: string;
16
- '--rs-font-size-6xl'?: string;
17
- '--rs-btn-icon-size-xs'?: string;
18
- '--rs-btn-icon-size-sm'?: string;
19
- '--rs-btn-icon-size-md'?: string;
20
- '--rs-btn-icon-size-lg'?: string;
21
- '--rs-input-padding-block-md'?: string;
22
- '--rs-input-padding-inline-md'?: string;
23
- '--rs-btn-padding-block-xs'?: string;
24
- '--rs-btn-padding-block-sm'?: string;
25
- '--rs-btn-padding-block-md'?: string;
26
- '--rs-btn-padding-block-lg'?: string;
27
- '--rs-btn-padding-inline-xs'?: string;
28
- '--rs-btn-padding-inline-sm'?: string;
29
- '--rs-btn-padding-inline-md'?: string;
30
- '--rs-btn-padding-inline-lg'?: string;
31
- '--rs-btn-size-xs'?: string;
32
- '--rs-btn-size-sm'?: string;
33
- '--rs-btn-size-md'?: string;
34
- '--rs-btn-size-lg'?: string;
35
- };
36
- export type RsuiteColorTheme = {
37
- '--rs-bg-active'?: string;
38
- '--rs-bg-overlay'?: string;
39
- '--rs-input-bg'?: string;
40
- '--rs-input-focus-border'?: string;
41
- '--rs-input-disabled-bg'?: string;
42
- '--rs-input-padding-block-md'?: string;
43
- '--rs-input-padding-inline-md'?: string;
44
- '--rs-border-primary'?: string;
45
- '--rs-text-primary'?: string;
46
- '--rs-text-active'?: string;
47
- '--rs-text-secondary'?: string;
48
- '--rs-text-disabled'?: string;
49
- '--rs-primary-400'?: string;
50
- '--rs-primary-500'?: string;
51
- '--rs-primary-600'?: string;
52
- '--rs-primary-700'?: string;
53
- '--rs-btn-primary-bg'?: string;
54
- '--rs-btn-subtle-text'?: string;
55
- '--rs-btn-subtle-hover-text'?: string;
56
- '--rs-btn-subtle-hover-bg'?: string;
57
- '--rs-btn-subtle-active-bg'?: string;
58
- '--rs-btn-subtle-active-text'?: string;
59
- '--rs-btn-link-text'?: string;
60
- '--rs-btn-link-hover-text'?: string;
61
- '--rs-listbox-option-hover-text'?: string;
62
- '--rs-listbox-option-hover-bg'?: string;
63
- '--rs-listbox-option-active-text'?: string;
64
- '--rs-listbox-option-active-bg'?: string;
65
- '--rs-calendar-in-menu-content-side-length'?: string;
66
- '--rs-placeholder'?: string;
67
- '--rs-divider-border'?: string;
68
- };
69
- export type RsuiteTheme = RsuiteCommonTheme & RsuiteColorTheme;
@@ -1 +0,0 @@
1
- export {};