@cronocode/react-box 1.1.6 → 1.1.9

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.
package/types.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export declare type Hovered<T> = {
1
+ export type Hovered<T> = {
2
2
  [K in keyof T as K extends string ? `${K}H` : never]: T[K];
3
3
  };
4
- export declare type Focused<T> = {
4
+ export type Focused<T> = {
5
5
  [K in keyof T as K extends string ? `${K}F` : never]: T[K];
6
6
  };
7
- export declare type Activated<T> = {
7
+ export type Activated<T> = {
8
8
  [K in keyof T as K extends string ? `${K}A` : never]: T[K];
9
9
  };
10
10
  export declare const styleVariables: {
11
- display: readonly ["none", "block", "inline-block", "flex", "inline-flex", "grid", "contents"];
11
+ display: readonly ["none", "block", "inline-block", "flex", "inline-flex", "grid", "inline-grid", "contents"];
12
12
  boxSizing: readonly ["border-box", "content-box"];
13
13
  position: readonly ["static", "relative", "absolute", "fixed", "sticky"];
14
14
  sizeSpecialValues: readonly ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"];
@@ -38,23 +38,27 @@ export declare const styleVariables: {
38
38
  flexSelf: readonly ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"];
39
39
  outlineOffset: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
40
40
  transition: readonly ["none"];
41
+ background: readonly ["none"];
42
+ userSelect: readonly ["none"];
41
43
  };
42
- declare type GapType = (typeof styleVariables.gap)[number];
43
- declare type BoxSizeValue = (typeof styleVariables.sizeSpecialValues)[number];
44
- declare type BorderSizeType = (typeof styleVariables.borderSizes)[number];
45
- declare type SizeType = (typeof styleVariables.sizes)[number];
46
- export declare type ColorType = (typeof styleVariables.baseColors)[number];
47
- declare type CursorType = (typeof styleVariables.cursors)[number];
48
- declare type OverflowType = (typeof styleVariables.overflows)[number];
49
- declare type FontSizeType = (typeof styleVariables.fontSizes)[number];
50
- declare type FontWeightType = (typeof styleVariables.fontWeight)[number];
51
- declare type ZIndexSizeType = (typeof styleVariables.zIndexSizes)[number];
52
- declare type OpacitySizeType = (typeof styleVariables.opacity)[number];
53
- declare type TextDecorationType = (typeof styleVariables.textDecoration)[number];
54
- declare type TextTransformType = (typeof styleVariables.textTransform)[number];
55
- declare type TextAlignType = (typeof styleVariables.textAlign)[number];
56
- declare type BorderAndOutlineStyleType = (typeof styleVariables.borderAndOutlineStyles)[number];
57
- declare type TransitionType = (typeof styleVariables.transition)[number];
44
+ type GapType = (typeof styleVariables.gap)[number];
45
+ type BoxSizeValue = (typeof styleVariables.sizeSpecialValues)[number];
46
+ type BorderSizeType = (typeof styleVariables.borderSizes)[number];
47
+ type SizeType = (typeof styleVariables.sizes)[number];
48
+ export type ColorType = (typeof styleVariables.baseColors)[number];
49
+ type CursorType = (typeof styleVariables.cursors)[number];
50
+ type OverflowType = (typeof styleVariables.overflows)[number];
51
+ type FontSizeType = (typeof styleVariables.fontSizes)[number];
52
+ type FontWeightType = (typeof styleVariables.fontWeight)[number];
53
+ type ZIndexSizeType = (typeof styleVariables.zIndexSizes)[number];
54
+ type OpacitySizeType = (typeof styleVariables.opacity)[number];
55
+ type TextDecorationType = (typeof styleVariables.textDecoration)[number];
56
+ type TextTransformType = (typeof styleVariables.textTransform)[number];
57
+ type TextAlignType = (typeof styleVariables.textAlign)[number];
58
+ type BorderAndOutlineStyleType = (typeof styleVariables.borderAndOutlineStyles)[number];
59
+ type TransitionType = (typeof styleVariables.transition)[number];
60
+ type BackgroundType = (typeof styleVariables.background)[number];
61
+ type UserSelectType = (typeof styleVariables.userSelect)[number];
58
62
  interface BoxPseudoClasses {
59
63
  hover?: boolean;
60
64
  focus?: boolean;
@@ -149,8 +153,8 @@ interface BoxShadow {
149
153
  shadow?: string;
150
154
  }
151
155
  interface BoxBackground {
152
- background?: string;
153
- bg?: string;
156
+ background?: BackgroundType | string;
157
+ bg?: BackgroundType | string;
154
158
  }
155
159
  interface BoxColors {
156
160
  color?: ColorType | string;
@@ -203,7 +207,10 @@ interface BoxFlex {
203
207
  interface BoxTransition {
204
208
  transition?: TransitionType;
205
209
  }
206
- declare type BoxNormalStyles = BoxPseudoClasses & BoxDisplay & BoxSizing & BoxPosition & BoxSize & BoxMargin & BoxPadding & BoxBorder & BoxShadow & BoxBackground & BoxColors & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxOutline & BoxTransition;
207
- export declare type BoxStyles = BoxNormalStyles & Hovered<BoxNormalStyles> & Focused<BoxNormalStyles> & Activated<BoxNormalStyles>;
210
+ interface BoxUserSelect {
211
+ userSelect?: UserSelectType;
212
+ }
213
+ type BoxNormalStyles = BoxPseudoClasses & BoxDisplay & BoxSizing & BoxPosition & BoxSize & BoxMargin & BoxPadding & BoxBorder & BoxShadow & BoxBackground & BoxColors & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxOutline & BoxTransition & BoxUserSelect;
214
+ export type BoxStyles = BoxNormalStyles & Hovered<BoxNormalStyles> & Focused<BoxNormalStyles> & Activated<BoxNormalStyles>;
208
215
  export declare const themeClasses: Array<keyof BoxStyles>;
209
216
  export {};
@@ -1,4 +1,4 @@
1
- declare type FormValue = string | string[] | number | number[] | boolean;
1
+ type FormValue = string | string[] | number | number[] | boolean;
2
2
  interface FormObject {
3
3
  [index: string]: FormValue | FormObject;
4
4
  }
package/vite-env.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />