@billgangcom/theme-lib 1.64.0 → 1.65.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.
@@ -5,9 +5,9 @@ export interface ThemeSettingsBlock {
5
5
  name: ThemeSettingsName;
6
6
  }
7
7
  export declare const themeSettingsBlocks: ThemeSettingsBlock[];
8
- export type FontTypeHeading = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
9
- export type FontTypeParagraph = 'text';
10
- export type FontType = 'heading' | 'paragraph';
8
+ export type FontTypeHeading = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7';
9
+ export type FontTypeBody = 'lg' | 'md' | 'sm';
10
+ export type FontType = 'heading' | 'body';
11
11
  export type BorderType = 'radius' | 'thickness';
12
12
  export type ButtonType = 'primary' | 'secondary' | 'link';
13
13
  export type Weight = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
@@ -15,6 +15,7 @@ export interface FontFields {
15
15
  font: string;
16
16
  size: number;
17
17
  weight: Weight;
18
+ boldWeight: Weight;
18
19
  }
19
20
  export interface ButtonFields {
20
21
  size: number;
@@ -37,7 +38,7 @@ export interface BorderFields {
37
38
  thickness: string;
38
39
  }
39
40
  type Font = {
40
- [head in FontTypeHeading | FontTypeParagraph]: FontFields;
41
+ [head in FontTypeHeading | FontTypeBody]: FontFields;
41
42
  };
42
43
  export type Alignment = 'left' | 'center' | 'right';
43
44
  export type BorderStyle = 'solid' | 'dashed';
@@ -107,7 +108,7 @@ export interface ThemeSettings {
107
108
  };
108
109
  desktop: {
109
110
  heading: Partial<Font>;
110
- paragraph: Partial<Font>;
111
+ body: Partial<Font>;
111
112
  };
112
113
  };
113
114
  borders: BorderFields;
@@ -1,17 +1,17 @@
1
- import { BorderFields, ButtonFields, FontFields, FontType, FontTypeHeading, FontTypeParagraph, ThemeSettings, ThemeSettingsBlock } from '../constants';
1
+ import { BorderFields, ButtonFields, FontFields, FontType, FontTypeHeading, FontTypeBody, ThemeSettings, ThemeSettingsBlock } from '../constants';
2
2
  interface Options {
3
3
  activeBlock: ThemeSettingsBlock | null;
4
4
  setActiveBlock: (activeBlock: ThemeSettingsBlock | null) => void;
5
5
  themeSettings: ThemeSettings;
6
6
  setThemeSettings: (themeSettings: ThemeSettings) => void;
7
7
  updateColor: (category: keyof ThemeSettings['colors'], colorType: string, newColor: string) => void;
8
- updateFont: (deviceType: 'mobile' | 'tablet' | 'desktop', fontType: FontType, id: FontTypeHeading | FontTypeParagraph, field: keyof FontFields, newValue: string | number) => void;
8
+ updateFont: (deviceType: 'mobile' | 'tablet' | 'desktop', fontType: FontType, id: FontTypeHeading | FontTypeBody, field: keyof FontFields, newValue: string | number) => void;
9
9
  updateBorder: (field: keyof BorderFields, newValue: string | number) => void;
10
10
  updateButton: (category: keyof ThemeSettings['buttons'], field: keyof ButtonFields, newValue: string | number | boolean | object) => void;
11
11
  activeColorCategory: keyof ThemeSettings['colors'] | null;
12
12
  setActiveColorCategory: (activeColorCategory: keyof ThemeSettings['colors'] | null) => void;
13
- activeFont: FontTypeHeading | FontTypeParagraph | null;
14
- setActiveFont: (activeFont: FontTypeHeading | FontTypeParagraph | null) => void;
13
+ activeFont: FontTypeHeading | FontTypeBody | null;
14
+ setActiveFont: (activeFont: FontTypeHeading | FontTypeBody | null) => void;
15
15
  updateInput: (category: keyof ThemeSettings['inputs'], value: string | number | boolean, field: keyof ThemeSettings['inputs']['general'] | keyof ThemeSettings['inputs']['border'] | keyof ThemeSettings['inputs']['label'] | keyof ThemeSettings['inputs']['field']) => void;
16
16
  updateFontSizePercentage: (fontType: 'mobile' | 'tablet', newValue: number) => void;
17
17
  isLoadingThemeSettings: boolean;