@redis-ui/styles 19.0.0 → 20.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.
@@ -0,0 +1,2 @@
1
+ import { RsuiteCommonTheme } from '../types/theme/rsuite.types';
2
+ export declare const rsuiteCommon: RsuiteCommonTheme;
@@ -0,0 +1,35 @@
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
+ };
@@ -0,0 +1,3 @@
1
+ import { RsuiteTheme } from '../../types/theme/rsuite.types';
2
+ declare const theme: RsuiteTheme;
3
+ export default theme;
@@ -0,0 +1,37 @@
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;
@@ -61,6 +61,8 @@ 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';
64
66
  export const theme = {
65
67
  name: 'dark',
66
68
  mode: 'dark',
@@ -128,5 +130,6 @@ export const theme = {
128
130
  globals: {
129
131
  body,
130
132
  scrollbar
131
- }
133
+ },
134
+ rsuite
132
135
  };
@@ -0,0 +1,3 @@
1
+ import { RsuiteTheme } from '../../types/theme/rsuite.types';
2
+ declare const theme: RsuiteTheme;
3
+ export default theme;
@@ -0,0 +1,37 @@
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;
@@ -61,6 +61,8 @@ 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';
64
66
  export const theme = {
65
67
  name: 'light',
66
68
  mode: 'light',
@@ -128,5 +130,6 @@ export const theme = {
128
130
  globals: {
129
131
  body,
130
132
  scrollbar
131
- }
133
+ },
134
+ rsuite
132
135
  };
@@ -1,5 +1,6 @@
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';
3
4
  export * from './theme/themeCore.types';
4
5
  export * from './theme/components';
5
6
  export * from './theme/globals';
@@ -0,0 +1,69 @@
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;
@@ -0,0 +1 @@
1
+ export {};
@@ -2,6 +2,7 @@ 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';
5
6
  export interface Theme extends ThemeCore, Tokens {
6
7
  components: {
7
8
  actionIconButton: ActionIconButtonTheme;
@@ -67,4 +68,5 @@ export interface Theme extends ThemeCore, Tokens {
67
68
  body: BodyTheme;
68
69
  scrollbar: ScrollbarTheme;
69
70
  };
71
+ rsuite?: RsuiteTheme;
70
72
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/styles",
3
3
  "license": "UNLICENSED",
4
- "version": "19.0.0",
4
+ "version": "20.0.0",
5
5
  "repository": "git@github.com:redislabsdev/redis-ui.git",
6
6
  "type": "module",
7
7
  "files": [
@@ -32,12 +32,18 @@
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",
35
36
  "styled-components": "^5.0.0"
36
37
  },
38
+ "peerDependenciesMeta": {
39
+ "rsuite": {
40
+ "optional": true
41
+ }
42
+ },
37
43
  "devDependencies": {
38
44
  "style-dictionary": "^3.7.2",
39
45
  "type-fest": "^5.4.4",
40
- "typescript": "^5.9.3"
46
+ "typescript": "^6.0.3"
41
47
  },
42
48
  "dependencies": {
43
49
  "color-alpha": "^2.0.0",