@aic-kits/react 0.12.2 → 0.13.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,4 +1,4 @@
1
- export type Space = 'none' | 'xxs' | 'xs' | 'sm' | 'sm-md' | 'md' | 'md-lg' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '-xxs' | '-xs' | '-sm' | '-sm-md' | '-md' | '-md-lg' | '-lg' | '-xl' | '-2xl' | '-3xl' | '-4xl';
1
+ export type Space = 'none' | '2xs' | 'xs' | 'sm' | 'sm-md' | 'md' | 'md-lg' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '-xxs' | '-xs' | '-sm' | '-sm-md' | '-md' | '-md-lg' | '-lg' | '-xl' | '-2xl' | '-3xl' | '-4xl';
2
2
  export type Spaces = Record<Space, number>;
3
3
  export declare const getSpaces: (baseSpace: number) => Spaces;
4
4
  export declare const isSpace: (key: string) => key is Space;
@@ -0,0 +1,28 @@
1
+ import { Size, Space, Radius, Color, BorderWidth, FontSize } from '../common';
2
+ import { Theme } from '../getTheme';
3
+ export type CheckboxSize = 'sm' | 'md' | 'lg';
4
+ export interface CheckboxSizeConfig {
5
+ labelFontSize: FontSize;
6
+ labelPaddingLeft: Space;
7
+ iconSize: Size;
8
+ iconMargin: Space;
9
+ borderRadius: Radius;
10
+ borderWidth: BorderWidth;
11
+ }
12
+ export interface CheckboxThemeConfig {
13
+ defaultColor: Color;
14
+ defaultSize: CheckboxSize;
15
+ checkedBackgroundColor: Color;
16
+ uncheckedBorderColor: Color;
17
+ disabledColor: Color;
18
+ disabledTextColor: Color;
19
+ focusBorderColor: Color;
20
+ iconColor: Color;
21
+ textColor: Color;
22
+ sizes: Record<CheckboxSize, CheckboxSizeConfig>;
23
+ animation: {
24
+ duration: number;
25
+ easing: string;
26
+ };
27
+ }
28
+ export declare const checkboxTheme: (_theme: Theme) => CheckboxThemeConfig;
@@ -4,11 +4,13 @@ import { ArtThemeConfig } from './art';
4
4
  import { BaseThemeConfig } from './base';
5
5
  import { ButtonThemeConfig } from './button';
6
6
  import { CarouselThemeConfig } from './carousel';
7
+ import { CheckboxThemeConfig } from './checkbox';
7
8
  import { DividerThemeConfig } from './divider';
8
9
  import { HeaderThemeConfig } from './header';
9
10
  import { InputThemeConfig } from './input';
10
11
  import { ListThemeConfig } from './list';
11
12
  import { LoadingThemeConfig } from './loading';
13
+ import { SelectThemeConfig, SelectSize, SelectVariant } from './select';
12
14
  import { SkeletonThemeConfig } from './skeleton';
13
15
  import { TagThemeConfig } from './tag';
14
16
  import { TouchableThemeConfig } from './touchable';
@@ -28,6 +30,8 @@ export interface ComponentsTheme {
28
30
  carousel: CarouselThemeConfig;
29
31
  accordion: AccordionThemeConfig;
30
32
  tag: TagThemeConfig;
33
+ checkbox: CheckboxThemeConfig;
34
+ select: SelectThemeConfig;
31
35
  }
32
36
  export declare const getComponentsTheme: (theme: Theme) => ComponentsTheme;
33
37
  export * from './art';
@@ -44,3 +48,6 @@ export * from './vimeo';
44
48
  export * from './carousel';
45
49
  export * from './accordion';
46
50
  export * from './tag';
51
+ export * from './checkbox';
52
+ export * from './select';
53
+ export type { SelectSize, SelectVariant };
@@ -1,11 +1,17 @@
1
1
  import { Theme } from '..';
2
- import { FontSize, Color, Radius, Space, BorderWidth } from '../common';
2
+ import { FontSize, Color, Radius, Space, BorderWidth, Size } from '../common';
3
+ interface InputStateStyles {
4
+ borderColor: Color;
5
+ backgroundColor: Color;
6
+ boxShadow: string;
7
+ }
8
+ interface InputStateConfig {
9
+ default: InputStateStyles;
10
+ focused: InputStateStyles;
11
+ error: InputStateStyles;
12
+ disabled: InputStateStyles;
13
+ }
3
14
  export interface InputThemeConfig {
4
- defaultBorderColor: Color;
5
- activeBorderColor: Color;
6
- errorColor: Color;
7
- disabledBgColor: Color;
8
- defaultBgColor: Color;
9
15
  borderRadius: Radius;
10
16
  borderWidth: BorderWidth;
11
17
  padding: {
@@ -15,5 +21,14 @@ export interface InputThemeConfig {
15
21
  fontSize: FontSize;
16
22
  placeholderColor: Color;
17
23
  iconSpacing: Space;
24
+ iconSize: Size;
25
+ iconColor: Color;
26
+ states: InputStateConfig;
27
+ textColor: Color;
28
+ disabledTextColor: Color;
29
+ disabledBorderColor: Color;
30
+ focusColor: Color;
31
+ errorColor: Color;
18
32
  }
19
33
  export declare const inputTheme: (_theme: Theme) => InputThemeConfig;
34
+ export {};
@@ -0,0 +1,68 @@
1
+ import { Theme } from '../';
2
+ import { Color, FontSize, Radius, Size, Space, BorderWidth, Shadow } from '../common';
3
+ export type SelectSize = 'sm' | 'md' | 'lg';
4
+ export type SelectVariant = 'outlined' | 'filled';
5
+ export interface SelectSizeConfig {
6
+ paddingVertical: Space;
7
+ paddingHorizontal: Space;
8
+ fontSize: FontSize;
9
+ borderWidth: BorderWidth;
10
+ iconSize: Size;
11
+ gap: Space;
12
+ dropdownPaddingVertical: Space;
13
+ dropdownPaddingHorizontal: Space;
14
+ }
15
+ interface SelectStateStyles {
16
+ backgroundColor: Color;
17
+ borderColor: Color;
18
+ borderWidth: BorderWidth;
19
+ }
20
+ interface SelectVariantStateConfig {
21
+ default: SelectStateStyles;
22
+ hover: SelectStateStyles;
23
+ focused: SelectStateStyles;
24
+ disabled: SelectStateStyles;
25
+ errored: SelectStateStyles;
26
+ }
27
+ export interface SelectThemeConfig {
28
+ defaultColor: Color;
29
+ defaultSize: SelectSize;
30
+ defaultVariant: SelectVariant;
31
+ defaultCorner: 'circle' | 'rounded';
32
+ squircleBorderRadii: {
33
+ circle: string;
34
+ rounded: string;
35
+ };
36
+ labelColor: Color;
37
+ disabledLabelColor: Color;
38
+ valueColor: Color;
39
+ placeholderColor: Color;
40
+ helperTextColor: Color;
41
+ errorColor: Color;
42
+ iconColor: Color;
43
+ disabledContentColor: Color;
44
+ disabledOpacity: number;
45
+ sizes: Record<SelectSize, SelectSizeConfig>;
46
+ variants: Record<SelectVariant, SelectVariantStateConfig>;
47
+ animation: {
48
+ duration: number;
49
+ easing: string;
50
+ };
51
+ dropdown: {
52
+ backgroundColor: Color;
53
+ borderColor: Color;
54
+ shadow: Shadow;
55
+ offset: Space;
56
+ zIndex: number;
57
+ maxHeight: number;
58
+ borderRadiusForCircle: Radius;
59
+ borderRadiusForRounded: Radius;
60
+ itemTextColor: Color;
61
+ itemSelectedTextColor: Color;
62
+ itemHoverBackgroundColor: Color;
63
+ itemSelectedBackgroundColor: Color;
64
+ emptyTextColor: Color;
65
+ };
66
+ }
67
+ export declare const selectTheme: (_theme: Theme) => SelectThemeConfig;
68
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aic-kits/react",
3
- "version": "0.12.2",
3
+ "version": "0.13.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": "400f7d88e0d94fabe17f8986940b610448532a35"
49
+ "gitHead": "00b010209a4e7ed2da6b561986ce6eaa3a158d81"
50
50
  }