@cronocode/react-box 1.7.2 → 1.7.3

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 DELETED
@@ -1,245 +0,0 @@
1
- type Hovered<T> = {
2
- [K in keyof T as K extends string ? `${K}H` : never]: T[K];
3
- };
4
- type Focused<T> = {
5
- [K in keyof T as K extends string ? `${K}F` : never]: T[K];
6
- };
7
- type Activated<T> = {
8
- [K in keyof T as K extends string ? `${K}A` : never]: T[K];
9
- };
10
- export declare const styleVariables: {
11
- display: readonly ["none", "block", "inline-block", "flex", "inline-flex", "grid", "inline-grid", "contents"];
12
- boxSizing: readonly ["border-box", "content-box"];
13
- position: readonly ["static", "relative", "absolute", "fixed", "sticky"];
14
- sizeSpecialValues: readonly ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"];
15
- widthHeightSizes: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 88, 96, 100];
16
- widthHeightStringSizes: readonly ["1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
17
- borderAndOutlineStyles: readonly ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"];
18
- overflows: readonly ["auto", "hidden", "scroll", "visible"];
19
- textDecoration: readonly ["none", "underline"];
20
- textTransform: readonly ["none", "capitalize", "lowercase", "uppercase"];
21
- textAlign: readonly ["left", "right", "center", "justify"];
22
- opacity: readonly [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
23
- cursors: readonly ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "e-resize", "n-resize", "ne-resize", "nw-resize", "s-resize", "se-resize", "sw-resize", "w-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "col-resize", "row-resize", "all-scroll", "zoom-in", "zoom-out", "grab", "grabbing"];
24
- positiveSizes: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 64, 68, 72, 76, 80, 88, 96, 100];
25
- negativeSizes: readonly [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -20, -24, -28, -32, -36, -40, -44, -48, -52, -56, -60, -68, -76, -84, -92, -100];
26
- sizeMultiplier: number;
27
- borderSizes: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
28
- fontSizes: readonly [6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 64, 70, 78, 86, 96];
29
- fontStyle: readonly ["italic", "normal", "oblique"];
30
- fontWeight: readonly [100, 200, 300, 400, 500, 600, 700, 800, 900];
31
- zIndexSizes: readonly [1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105, 1000, 1001, 1002, 1003, 1004, 1005];
32
- justifyContent: readonly ["start", "end", "flex-start", "flex-end", "center", "left", "right", "space-between", "space-around", "space-evenly", "stretch"];
33
- alignItems: readonly ["stretch", "flex-start", "flex-end", "center", "baseline", "start", "end", "self-start", "self-end"];
34
- alignContent: readonly ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly", "stretch", "start", "end", "baseline"];
35
- flexDirection: readonly ["row", "row-reverse", "column", "column-reverse"];
36
- gap: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
37
- order: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
38
- flexWrap: readonly ["nowrap", "wrap", "wrap-reverse"];
39
- flexGrow: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
40
- flexShrink: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
41
- flexSelf: readonly ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"];
42
- outlineOffset: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
43
- transition: readonly ["none"];
44
- background: readonly ["none"];
45
- userSelect: readonly ["none", "auto", "text", "all"];
46
- appearance: readonly ["none"];
47
- pointerEvents: readonly ["none", "auto", "all"];
48
- whiteSpace: readonly ["break-spaces", "normal", "nowrap", "pre", "pre-line", "pre-wrap"];
49
- textOverflow: readonly ["clip", "ellipsis"];
50
- gridColumns: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
51
- };
52
- export declare const sizes: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 64, 68, 72, 76, 80, 88, 96, 100, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -20, -24, -28, -32, -36, -40, -44, -48, -52, -56, -60, -68, -76, -84, -92, -100];
53
- type GapType = (typeof styleVariables.gap)[number];
54
- type WidthHeightSizeType = (typeof styleVariables.sizeSpecialValues)[number] | (typeof styleVariables.widthHeightSizes)[number] | (typeof styleVariables.widthHeightStringSizes)[number];
55
- type BorderSizeType = (typeof styleVariables.borderSizes)[number];
56
- type SizeType = (typeof sizes)[number];
57
- type CursorType = (typeof styleVariables.cursors)[number];
58
- type OverflowType = (typeof styleVariables.overflows)[number];
59
- type FontSizeType = (typeof styleVariables.fontSizes)[number];
60
- type FontStyleType = (typeof styleVariables.fontStyle)[number];
61
- type FontWeightType = (typeof styleVariables.fontWeight)[number];
62
- type ZIndexSizeType = (typeof styleVariables.zIndexSizes)[number];
63
- type OpacitySizeType = (typeof styleVariables.opacity)[number];
64
- type TextDecorationType = (typeof styleVariables.textDecoration)[number];
65
- type TextTransformType = (typeof styleVariables.textTransform)[number];
66
- type TextAlignType = (typeof styleVariables.textAlign)[number];
67
- type BorderAndOutlineStyleType = (typeof styleVariables.borderAndOutlineStyles)[number];
68
- type TransitionType = (typeof styleVariables.transition)[number];
69
- type UserSelectType = (typeof styleVariables.userSelect)[number];
70
- type AppearanceType = (typeof styleVariables.appearance)[number];
71
- type PointerEventsType = (typeof styleVariables.pointerEvents)[number];
72
- type WhiteSpaceType = (typeof styleVariables.whiteSpace)[number];
73
- type TextOverflowType = (typeof styleVariables.textOverflow)[number];
74
- interface BoxPseudoClasses {
75
- hover?: boolean;
76
- focus?: boolean;
77
- }
78
- interface BoxDisplay {
79
- display?: (typeof styleVariables.display)[number];
80
- inline?: boolean;
81
- }
82
- interface BoxSizing {
83
- boxSizing?: (typeof styleVariables.boxSizing)[number];
84
- }
85
- export interface BoxPosition {
86
- position?: (typeof styleVariables.position)[number];
87
- inset?: (typeof styleVariables.positiveSizes)[number];
88
- top?: SizeType;
89
- right?: SizeType;
90
- bottom?: SizeType;
91
- left?: SizeType;
92
- }
93
- export interface BoxSize {
94
- width?: WidthHeightSizeType;
95
- height?: WidthHeightSizeType;
96
- minWidth?: WidthHeightSizeType;
97
- minHeight?: WidthHeightSizeType;
98
- maxWidth?: WidthHeightSizeType;
99
- maxHeight?: WidthHeightSizeType;
100
- }
101
- interface BoxMargin {
102
- margin?: (typeof styleVariables.positiveSizes)[number] | 'auto';
103
- m?: (typeof styleVariables.positiveSizes)[number] | 'auto';
104
- marginHorizontal?: (typeof styleVariables.positiveSizes)[number] | 'auto';
105
- mx?: (typeof styleVariables.positiveSizes)[number] | 'auto';
106
- marginVertical?: (typeof styleVariables.positiveSizes)[number] | 'auto';
107
- my?: (typeof styleVariables.positiveSizes)[number] | 'auto';
108
- marginTop?: SizeType | 'auto';
109
- mt?: SizeType | 'auto';
110
- marginRight?: SizeType | 'auto';
111
- mr?: SizeType | 'auto';
112
- marginBottom?: SizeType | 'auto';
113
- mb?: SizeType | 'auto';
114
- marginLeft?: SizeType | 'auto';
115
- ml?: SizeType | 'auto';
116
- }
117
- interface BoxPadding {
118
- padding?: (typeof styleVariables.positiveSizes)[number];
119
- p?: (typeof styleVariables.positiveSizes)[number];
120
- paddingHorizontal?: (typeof styleVariables.positiveSizes)[number];
121
- px?: (typeof styleVariables.positiveSizes)[number];
122
- paddingVertical?: (typeof styleVariables.positiveSizes)[number];
123
- py?: (typeof styleVariables.positiveSizes)[number];
124
- paddingTop?: SizeType;
125
- pt?: SizeType;
126
- paddingRight?: SizeType;
127
- pr?: SizeType;
128
- paddingBottom?: SizeType;
129
- pb?: SizeType;
130
- paddingLeft?: SizeType;
131
- pl?: SizeType;
132
- }
133
- interface BoxOutline {
134
- outline?: BorderSizeType;
135
- outlineStyle?: BorderAndOutlineStyleType;
136
- outlineOffset?: (typeof styleVariables.outlineOffset)[number];
137
- }
138
- interface BoxBorder {
139
- border?: BorderSizeType;
140
- b?: BorderSizeType;
141
- borderHorizontal?: BorderSizeType;
142
- bx?: BorderSizeType;
143
- borderVertical?: BorderSizeType;
144
- by?: BorderSizeType;
145
- borderTop?: BorderSizeType;
146
- bt?: BorderSizeType;
147
- borderRight?: BorderSizeType;
148
- br?: BorderSizeType;
149
- borderBottom?: BorderSizeType;
150
- bb?: BorderSizeType;
151
- borderLeft?: BorderSizeType;
152
- bl?: BorderSizeType;
153
- borderStyle?: BorderAndOutlineStyleType;
154
- borderRadius?: (typeof styleVariables.positiveSizes)[number];
155
- borderRadiusTop?: (typeof styleVariables.positiveSizes)[number];
156
- borderRadiusRight?: (typeof styleVariables.positiveSizes)[number];
157
- borderRadiusBottom?: (typeof styleVariables.positiveSizes)[number];
158
- borderRadiusLeft?: (typeof styleVariables.positiveSizes)[number];
159
- borderRadiusTopLeft?: (typeof styleVariables.positiveSizes)[number];
160
- borderRadiusTopRight?: (typeof styleVariables.positiveSizes)[number];
161
- borderRadiusBottomLeft?: (typeof styleVariables.positiveSizes)[number];
162
- borderRadiusBottomRight?: (typeof styleVariables.positiveSizes)[number];
163
- }
164
- interface BoxCursor {
165
- cursor?: CursorType;
166
- }
167
- interface BoxZIndex {
168
- zIndex?: ZIndexSizeType;
169
- }
170
- interface BoxOverflow {
171
- overflow?: OverflowType;
172
- overflowX?: OverflowType;
173
- overflowY?: OverflowType;
174
- }
175
- interface BoxOpacity {
176
- opacity?: OpacitySizeType;
177
- }
178
- interface BoxFont {
179
- fontSize?: FontSizeType;
180
- lineHeight?: FontSizeType | 'font-size';
181
- fontWeight?: FontWeightType;
182
- letterSpacing?: SizeType;
183
- fontStyle?: FontStyleType;
184
- }
185
- interface BoxText {
186
- textDecoration?: TextDecorationType;
187
- textTransform?: TextTransformType;
188
- textAlign?: TextAlignType;
189
- whiteSpace?: WhiteSpaceType;
190
- textOverflow?: TextOverflowType;
191
- }
192
- interface BoxFlex {
193
- flexWrap?: (typeof styleVariables.flexWrap)[number];
194
- justifyContent?: (typeof styleVariables.justifyContent)[number];
195
- jc?: (typeof styleVariables.justifyContent)[number];
196
- alignItems?: (typeof styleVariables.alignItems)[number];
197
- ai?: (typeof styleVariables.alignItems)[number];
198
- alignContent?: (typeof styleVariables.alignContent)[number];
199
- ac?: (typeof styleVariables.alignContent)[number];
200
- flex1?: boolean;
201
- flexDirection?: (typeof styleVariables.flexDirection)[number];
202
- d?: (typeof styleVariables.flexDirection)[number];
203
- gap?: GapType;
204
- rowGap?: GapType;
205
- columnGap?: GapType;
206
- order?: (typeof styleVariables.order)[number];
207
- flexGrow?: (typeof styleVariables.flexGrow)[number];
208
- flexShrink?: (typeof styleVariables.flexShrink)[number];
209
- alignSelf?: (typeof styleVariables.flexSelf)[number];
210
- justifySelf?: (typeof styleVariables.flexSelf)[number];
211
- }
212
- interface BoxGrid {
213
- gridColumns?: (typeof styleVariables.gridColumns)[number];
214
- colSpan?: (typeof styleVariables.gridColumns)[number] | 'full-row';
215
- colStart?: (typeof styleVariables.gridColumns)[number];
216
- colEnd?: (typeof styleVariables.gridColumns)[number];
217
- }
218
- interface BoxTransition {
219
- transition?: TransitionType;
220
- }
221
- interface BoxUserSelect {
222
- userSelect?: UserSelectType;
223
- }
224
- interface BoxAppearance {
225
- appearance?: AppearanceType;
226
- }
227
- interface BoxPointerEvents {
228
- pointerEvents?: PointerEventsType;
229
- }
230
- type BoxNormalStyles = BoxPseudoClasses & BoxDisplay & BoxSizing & BoxPosition & BoxSize & BoxMargin & BoxPadding & BoxBorder & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxOutline & BoxTransition & BoxUserSelect & BoxAppearance & BoxPointerEvents & BoxGrid;
231
- export declare namespace Augmented {
232
- interface BoxProps {
233
- }
234
- interface SvgProps {
235
- }
236
- }
237
- export type BoxStyles = BoxNormalStyles & Hovered<BoxNormalStyles> & Focused<BoxNormalStyles> & Activated<BoxNormalStyles> & Augmented.BoxProps;
238
- export declare const themeClasses: Partial<Record<string, string>>;
239
- interface SvgNormalStyles {
240
- rotate?: 0 | 90 | 180 | 270 | -90 | -180 | -270;
241
- flip?: 'xAxis' | 'yAxis';
242
- }
243
- export type SvgStyles = SvgNormalStyles & Hovered<SvgNormalStyles> & Focused<SvgNormalStyles> & Activated<SvgNormalStyles> & Augmented.SvgProps;
244
- export declare const themeSvgClasses: Partial<Record<string, string>>;
245
- export {};
@@ -1,5 +0,0 @@
1
- declare namespace ClassNameUtils {
2
- type ClassNameType = undefined | string | string[] | Record<string, boolean> | ClassNameType[];
3
- function classNames(...classNameRules: ClassNameType[]): string[];
4
- }
5
- export default ClassNameUtils;