@aic-kits/react 0.7.1 → 0.9.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.
@@ -4,6 +4,7 @@ export declare const defaultScale: {
4
4
  size: number;
5
5
  font: {
6
6
  neutral: string;
7
+ heading: string;
7
8
  };
8
9
  fontSize: number;
9
10
  radius: number;
@@ -1,4 +1,4 @@
1
- export type Size = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
1
+ export type Size = '2xs' | 'xs' | 'sm' | 'sm-md' | 'md' | 'md-lg' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
2
2
  export type Sizes = Record<Size, number>;
3
3
  export declare const getSizes: (baseSize: number) => Sizes;
4
4
  export declare const isSize: (value: string) => value is Size;
@@ -1,12 +1,20 @@
1
1
  import { Scale } from './scale';
2
- export type FontSize = '2xs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | '2xl' | '3xl';
2
+ export type FontSize = '2xs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
3
3
  export type FontWeight = 'extra-light' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
4
- export type Typeface = 'neutral';
4
+ /** Type representing the available font typefaces. */
5
+ export type Typeface = 'neutral' | 'heading';
6
+ /** Type representing a record mapping typeface names to font family strings. */
5
7
  type Fonts = Record<Typeface, string>;
6
8
  type FontSizes = Record<FontSize, number>;
7
9
  type FontWeights = Record<FontWeight, number>;
8
10
  type LineHeights = Record<FontSize, number>;
9
- export declare const getFonts: ({ neutral }: Scale["font"]) => Fonts;
11
+ /**
12
+ * Generates font family strings based on the provided font names in the scale.
13
+ * Includes fallback fonts.
14
+ * @param {Scale['font']} fontNames - An object containing font names for each typeface.
15
+ * @returns {Fonts} An object mapping typeface names to CSS font-family strings.
16
+ */
17
+ export declare const getFonts: ({ neutral, heading }: Scale["font"]) => Fonts;
10
18
  export declare const getFontSizes: (baseFontSize: number) => FontSizes;
11
19
  export declare const getLineHeights: (baseFontSize: number) => LineHeights;
12
20
  export declare const getFontWeights: () => FontWeights;
@@ -1,8 +1,19 @@
1
1
  import { Theme } from '../';
2
+ import { Space, Size } from '../common';
2
3
  export interface BaseThemeConfig {
4
+ /** Default background color for the Base component. */
3
5
  defaultBackgroundColor: string;
6
+ /** Default parameters passed to the Header component. */
4
7
  defaultHeaderParams: {
5
8
  backgroundColor: string;
6
9
  };
10
+ /** Media query string to determine desktop view (e.g., '(min-width: 768px)'). */
11
+ desktopMediaQuery: string;
12
+ /** Default horizontal padding for mobile view. */
13
+ mobilePaddingX: Space;
14
+ /** Default horizontal padding for desktop view in 'padded' mode. */
15
+ desktopPaddingX: Space;
16
+ /** Default max-width for desktop view in 'maxWidth' mode. */
17
+ desktopContentMaxWidth: Size | string | number;
7
18
  }
8
19
  export declare const baseTheme: (_theme: Theme) => BaseThemeConfig;
@@ -1,5 +1,16 @@
1
+ import { IconWeight } from '@phosphor-icons/react';
1
2
  import { Theme } from '../';
2
- import { BorderWidth, Color, Space } from '../common';
3
+ import { BorderWidth, Color, FontSize, FontWeight, Size, Space } from '../common';
4
+ export type ButtonSize = 'sm' | 'md' | 'lg';
5
+ export interface ButtonSizeConfig {
6
+ paddingHorizontal: Space;
7
+ paddingVertical: Space;
8
+ fontSize: FontSize;
9
+ iconSize: Size;
10
+ borderWidth: BorderWidth;
11
+ fontWeight: FontWeight;
12
+ iconWeight: IconWeight;
13
+ }
3
14
  export interface ButtonThemeConfig {
4
15
  squircleBorderRadii: {
5
16
  circle: string;
@@ -11,14 +22,12 @@ export interface ButtonThemeConfig {
11
22
  };
12
23
  defaultColor: Color;
13
24
  defaultTextColor: Color;
14
- borderWidth: BorderWidth;
15
25
  iconSpacing?: Space;
26
+ sizes: Record<ButtonSize, ButtonSizeConfig>;
16
27
  variants?: Record<string, {
17
28
  bgColor?: Color;
18
29
  textColor?: Color;
19
30
  borderColor?: Color;
20
- paddingHorizontal?: Space;
21
- paddingVertical?: Space;
22
31
  }>;
23
32
  }
24
33
  export declare const buttonTheme: (_theme: Theme) => ButtonThemeConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aic-kits/react",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -46,5 +46,5 @@
46
46
  "vite-plugin-dts": "^4.3.0",
47
47
  "vitest": "^2.1.8"
48
48
  },
49
- "gitHead": "c1408946def5ff1ca86f58bb567f429eb0a77f9d"
49
+ "gitHead": "f9f3f8258603f7f73f9774e84a2e17b1b37405aa"
50
50
  }