@causw/core 0.0.9 → 0.0.10

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/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
1
- import React from 'react';
1
+ import React, { ComponentProps, ReactNode, ElementType } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { borderRadius } from '@causw/tokens';
3
4
  import { ClassValue } from 'clsx';
4
5
 
5
6
  type Typography = 'caption-sm' | 'caption-sm-point' | 'caption-md' | 'caption-md-point' | 'body2-sm' | 'body2-sm-point' | 'body2-md' | 'body2-md-point' | 'body-sm' | 'body-sm-point' | 'body-md' | 'body-md-point' | 'subtitle-sm' | 'subtitle-sm-point' | 'subtitle-md' | 'subtitle-md-point' | 'title-sm' | 'title-md' | 'head-sm' | 'head-md' | 'fixed-12' | 'fixed-14' | 'fixed-15' | 'fixed-16' | 'fixed-18' | 'fixed-20' | 'fixed-24';
6
- type TextColor = 'gray-50' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'gray-700' | 'gray-800' | 'gray-900' | 'blue-50' | 'blue-500' | 'blue-700' | 'red-100' | 'red-400' | 'white' | 'black';
7
+ type TextColor = 'gray-50' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'gray-700' | 'gray-800' | 'gray-900' | 'blue-100' | 'blue-500' | 'blue-700' | 'red-100' | 'red-400' | 'white' | 'black';
7
8
  type TextAlign = 'left' | 'center' | 'right' | 'justify';
8
9
 
9
10
  /**
@@ -204,4 +205,145 @@ declare const Checkbox: {
204
205
  };
205
206
  };
206
207
 
207
- export { Checkbox, type CheckboxLabelProps, type CheckboxRootProps, Field, type FieldDescriptionProps, type FieldErrorDescriptionProps, type FieldLabelProps, type FieldProps, type PolymorphicProps, type PolymorphicPropsWithoutRef, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Text, TextArea, type TextAreaFooterProps, type TextAreaInputProps, type TextAreaProps, type TextColor, TextInput, type TextInputProps, type TextInputVariant, type TextProps, type TextStyleProps, Toggle, type ToggleLabelProps, type ToggleRootProps, type Typography, mergeStyles, useRadioGroupContext };
208
+ type ButtonSize = 'sm' | 'md';
209
+ type ButtonColor = 'white' | 'gray' | 'red';
210
+
211
+ interface ButtonProps extends ComponentProps<'button'> {
212
+ size?: ButtonSize;
213
+ color?: ButtonColor;
214
+ active?: boolean;
215
+ fullWidth?: boolean;
216
+ }
217
+ declare function Button({ size, color, active, fullWidth, disabled, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
218
+
219
+ type CTAButtonColor = 'blue' | 'red' | 'dark' | 'light' | 'white';
220
+
221
+ interface CTAButtonProps extends ComponentProps<'button'> {
222
+ color?: CTAButtonColor;
223
+ fullWidth?: boolean;
224
+ asChild?: boolean;
225
+ }
226
+ declare function CTAButton({ color, fullWidth, disabled, asChild, className, children, ...props }: CTAButtonProps): react_jsx_runtime.JSX.Element;
227
+
228
+ interface FloatingActionButtonProps extends ComponentProps<'button'> {
229
+ leftIcon?: ReactNode;
230
+ rightIcon?: ReactNode;
231
+ asChild?: boolean;
232
+ }
233
+ declare function FloatingActionButton({ leftIcon, rightIcon, disabled, asChild, children, className, ...props }: FloatingActionButtonProps): react_jsx_runtime.JSX.Element;
234
+
235
+ type BoxRadius = 'none' | keyof typeof borderRadius;
236
+ type BoxPadding = 'none' | 'xs' | 'sm' | 'md' | 'lg';
237
+ type BoxDisplay = 'block' | 'flex' | 'grid' | 'inline-block' | 'inline-flex' | 'none';
238
+ type BoxBackground = 'default' | 'subtle' | 'inverse' | 'transparent';
239
+ interface BoxStylesOptions {
240
+ padding?: BoxPadding;
241
+ radius?: BoxRadius;
242
+ display?: BoxDisplay;
243
+ background?: BoxBackground;
244
+ }
245
+
246
+ type BoxBaseProps = BoxStylesOptions;
247
+ type BoxProps<E extends ElementType = 'div'> = PolymorphicProps<E, BoxBaseProps>;
248
+ declare const Box: {
249
+ <E extends ElementType = "div">({ as, padding, radius, display, background, className, children, ...props }: BoxProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
250
+ displayName: string;
251
+ };
252
+
253
+ type StackDirection = 'horizontal' | 'vertical';
254
+ type StackGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
255
+ type StackAlign = 'start' | 'center' | 'end' | 'stretch';
256
+ type StackJustify = 'start' | 'center' | 'end' | 'between';
257
+ interface StackStylesOptions {
258
+ direction?: StackDirection;
259
+ gap?: StackGap;
260
+ align?: StackAlign;
261
+ justify?: StackJustify;
262
+ }
263
+
264
+ type StackBaseProps = StackStylesOptions;
265
+ type StackProps<E extends ElementType = 'div'> = PolymorphicProps<E, StackBaseProps>;
266
+ /**
267
+ * Stack is a layout component that arranges its children in a horizontal or vertical line.
268
+ * It abstracts Flexbox behaviors to easily manage spacing, alignment, and direction.
269
+ */
270
+ declare const Stack: {
271
+ <E extends ElementType = "div">({ as, direction, gap, align, justify, className, children, ...props }: StackProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
272
+ displayName: string;
273
+ };
274
+
275
+ type VStackProps<E extends ElementType = 'div'> = Omit<StackProps<E>, 'direction'>;
276
+ declare const VStack: {
277
+ <E extends ElementType = "div">({ ...props }: VStackProps<E>): react_jsx_runtime.JSX.Element;
278
+ displayName: string;
279
+ };
280
+
281
+ type HStackProps<E extends ElementType = 'div'> = Omit<StackProps<E>, 'direction'>;
282
+ declare const HStack: {
283
+ <E extends ElementType = "div">({ ...props }: HStackProps<E>): react_jsx_runtime.JSX.Element;
284
+ displayName: string;
285
+ };
286
+
287
+ type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
288
+ type FlexGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
289
+ type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
290
+ type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
291
+ type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
292
+ interface FlexStylesOptions {
293
+ direction?: FlexDirection;
294
+ gap?: FlexGap;
295
+ align?: FlexAlign;
296
+ justify?: FlexJustify;
297
+ wrap?: FlexWrap;
298
+ }
299
+
300
+ type FlexBaseProps = FlexStylesOptions;
301
+ type FlexProps<E extends ElementType = 'div'> = PolymorphicProps<E, FlexBaseProps>;
302
+ declare const Flex: {
303
+ <E extends ElementType = "div">({ as, direction, gap, align, justify, wrap, className, children, ...props }: FlexProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
304
+ displayName: string;
305
+ };
306
+
307
+ type GridColumns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'none';
308
+ type GridRows = 1 | 2 | 3 | 4 | 5 | 6 | 'none';
309
+ type GridGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
310
+ type GridFlow = 'row' | 'col' | 'row-dense' | 'col-dense';
311
+ interface GridStylesOptions {
312
+ columns?: GridColumns;
313
+ rows?: GridRows;
314
+ gap?: GridGap;
315
+ flow?: GridFlow;
316
+ }
317
+
318
+ type GridBaseProps = GridStylesOptions;
319
+ type GridProps<E extends ElementType = 'div'> = PolymorphicProps<E, GridBaseProps>;
320
+ declare const Grid: {
321
+ <E extends ElementType = "div">({ as, columns, rows, gap, flow, className, children, ...props }: GridProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
322
+ displayName: string;
323
+ };
324
+
325
+ type SeparatorOrientation = 'horizontal' | 'vertical';
326
+ interface SeparatorStylesOptions {
327
+ orientation?: SeparatorOrientation;
328
+ }
329
+
330
+ type SeparatorBaseProps = SeparatorStylesOptions;
331
+ type SeparatorProps<E extends ElementType = 'div'> = PolymorphicProps<E, SeparatorBaseProps>;
332
+ declare const Separator: {
333
+ <E extends ElementType = "div">({ as, orientation, className, ...props }: SeparatorProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
334
+ displayName: string;
335
+ };
336
+
337
+ type SpacerSize = 1 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 'auto';
338
+ interface SpacerStylesOptions {
339
+ size?: SpacerSize;
340
+ }
341
+
342
+ type SpacerBaseProps = SpacerStylesOptions;
343
+ type SpacerProps<E extends ElementType = 'div'> = PolymorphicProps<E, SpacerBaseProps>;
344
+ declare const Spacer: {
345
+ <E extends ElementType = "div">({ as, size, className, ...props }: SpacerProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
346
+ displayName: string;
347
+ };
348
+
349
+ export { Box, type BoxBackground, type BoxDisplay, type BoxPadding, type BoxProps, type BoxRadius, Button, type ButtonProps, CTAButton, type CTAButtonProps, Checkbox, type CheckboxLabelProps, type CheckboxRootProps, Field, type FieldDescriptionProps, type FieldErrorDescriptionProps, type FieldLabelProps, type FieldProps, Flex, type FlexAlign, type FlexDirection, type FlexGap, type FlexJustify, type FlexProps, FloatingActionButton, type FloatingActionButtonProps, Grid, type GridColumns, type GridFlow, type GridGap, type GridProps, type GridRows, HStack, type HStackProps, type PolymorphicProps, type PolymorphicPropsWithoutRef, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Separator, type SeparatorOrientation, type SeparatorProps, Spacer, type SpacerProps, type SpacerSize, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, Text, TextArea, type TextAreaFooterProps, type TextAreaInputProps, type TextAreaProps, type TextColor, TextInput, type TextInputProps, type TextInputVariant, type TextProps, type TextStyleProps, Toggle, type ToggleLabelProps, type ToggleRootProps, type Typography, VStack, type VStackProps, mergeStyles, useRadioGroupContext };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import React from 'react';
1
+ import React, { ComponentProps, ReactNode, ElementType } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { borderRadius } from '@causw/tokens';
3
4
  import { ClassValue } from 'clsx';
4
5
 
5
6
  type Typography = 'caption-sm' | 'caption-sm-point' | 'caption-md' | 'caption-md-point' | 'body2-sm' | 'body2-sm-point' | 'body2-md' | 'body2-md-point' | 'body-sm' | 'body-sm-point' | 'body-md' | 'body-md-point' | 'subtitle-sm' | 'subtitle-sm-point' | 'subtitle-md' | 'subtitle-md-point' | 'title-sm' | 'title-md' | 'head-sm' | 'head-md' | 'fixed-12' | 'fixed-14' | 'fixed-15' | 'fixed-16' | 'fixed-18' | 'fixed-20' | 'fixed-24';
6
- type TextColor = 'gray-50' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'gray-700' | 'gray-800' | 'gray-900' | 'blue-50' | 'blue-500' | 'blue-700' | 'red-100' | 'red-400' | 'white' | 'black';
7
+ type TextColor = 'gray-50' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'gray-700' | 'gray-800' | 'gray-900' | 'blue-100' | 'blue-500' | 'blue-700' | 'red-100' | 'red-400' | 'white' | 'black';
7
8
  type TextAlign = 'left' | 'center' | 'right' | 'justify';
8
9
 
9
10
  /**
@@ -204,4 +205,145 @@ declare const Checkbox: {
204
205
  };
205
206
  };
206
207
 
207
- export { Checkbox, type CheckboxLabelProps, type CheckboxRootProps, Field, type FieldDescriptionProps, type FieldErrorDescriptionProps, type FieldLabelProps, type FieldProps, type PolymorphicProps, type PolymorphicPropsWithoutRef, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Text, TextArea, type TextAreaFooterProps, type TextAreaInputProps, type TextAreaProps, type TextColor, TextInput, type TextInputProps, type TextInputVariant, type TextProps, type TextStyleProps, Toggle, type ToggleLabelProps, type ToggleRootProps, type Typography, mergeStyles, useRadioGroupContext };
208
+ type ButtonSize = 'sm' | 'md';
209
+ type ButtonColor = 'white' | 'gray' | 'red';
210
+
211
+ interface ButtonProps extends ComponentProps<'button'> {
212
+ size?: ButtonSize;
213
+ color?: ButtonColor;
214
+ active?: boolean;
215
+ fullWidth?: boolean;
216
+ }
217
+ declare function Button({ size, color, active, fullWidth, disabled, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
218
+
219
+ type CTAButtonColor = 'blue' | 'red' | 'dark' | 'light' | 'white';
220
+
221
+ interface CTAButtonProps extends ComponentProps<'button'> {
222
+ color?: CTAButtonColor;
223
+ fullWidth?: boolean;
224
+ asChild?: boolean;
225
+ }
226
+ declare function CTAButton({ color, fullWidth, disabled, asChild, className, children, ...props }: CTAButtonProps): react_jsx_runtime.JSX.Element;
227
+
228
+ interface FloatingActionButtonProps extends ComponentProps<'button'> {
229
+ leftIcon?: ReactNode;
230
+ rightIcon?: ReactNode;
231
+ asChild?: boolean;
232
+ }
233
+ declare function FloatingActionButton({ leftIcon, rightIcon, disabled, asChild, children, className, ...props }: FloatingActionButtonProps): react_jsx_runtime.JSX.Element;
234
+
235
+ type BoxRadius = 'none' | keyof typeof borderRadius;
236
+ type BoxPadding = 'none' | 'xs' | 'sm' | 'md' | 'lg';
237
+ type BoxDisplay = 'block' | 'flex' | 'grid' | 'inline-block' | 'inline-flex' | 'none';
238
+ type BoxBackground = 'default' | 'subtle' | 'inverse' | 'transparent';
239
+ interface BoxStylesOptions {
240
+ padding?: BoxPadding;
241
+ radius?: BoxRadius;
242
+ display?: BoxDisplay;
243
+ background?: BoxBackground;
244
+ }
245
+
246
+ type BoxBaseProps = BoxStylesOptions;
247
+ type BoxProps<E extends ElementType = 'div'> = PolymorphicProps<E, BoxBaseProps>;
248
+ declare const Box: {
249
+ <E extends ElementType = "div">({ as, padding, radius, display, background, className, children, ...props }: BoxProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
250
+ displayName: string;
251
+ };
252
+
253
+ type StackDirection = 'horizontal' | 'vertical';
254
+ type StackGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
255
+ type StackAlign = 'start' | 'center' | 'end' | 'stretch';
256
+ type StackJustify = 'start' | 'center' | 'end' | 'between';
257
+ interface StackStylesOptions {
258
+ direction?: StackDirection;
259
+ gap?: StackGap;
260
+ align?: StackAlign;
261
+ justify?: StackJustify;
262
+ }
263
+
264
+ type StackBaseProps = StackStylesOptions;
265
+ type StackProps<E extends ElementType = 'div'> = PolymorphicProps<E, StackBaseProps>;
266
+ /**
267
+ * Stack is a layout component that arranges its children in a horizontal or vertical line.
268
+ * It abstracts Flexbox behaviors to easily manage spacing, alignment, and direction.
269
+ */
270
+ declare const Stack: {
271
+ <E extends ElementType = "div">({ as, direction, gap, align, justify, className, children, ...props }: StackProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
272
+ displayName: string;
273
+ };
274
+
275
+ type VStackProps<E extends ElementType = 'div'> = Omit<StackProps<E>, 'direction'>;
276
+ declare const VStack: {
277
+ <E extends ElementType = "div">({ ...props }: VStackProps<E>): react_jsx_runtime.JSX.Element;
278
+ displayName: string;
279
+ };
280
+
281
+ type HStackProps<E extends ElementType = 'div'> = Omit<StackProps<E>, 'direction'>;
282
+ declare const HStack: {
283
+ <E extends ElementType = "div">({ ...props }: HStackProps<E>): react_jsx_runtime.JSX.Element;
284
+ displayName: string;
285
+ };
286
+
287
+ type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
288
+ type FlexGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
289
+ type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
290
+ type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
291
+ type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
292
+ interface FlexStylesOptions {
293
+ direction?: FlexDirection;
294
+ gap?: FlexGap;
295
+ align?: FlexAlign;
296
+ justify?: FlexJustify;
297
+ wrap?: FlexWrap;
298
+ }
299
+
300
+ type FlexBaseProps = FlexStylesOptions;
301
+ type FlexProps<E extends ElementType = 'div'> = PolymorphicProps<E, FlexBaseProps>;
302
+ declare const Flex: {
303
+ <E extends ElementType = "div">({ as, direction, gap, align, justify, wrap, className, children, ...props }: FlexProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
304
+ displayName: string;
305
+ };
306
+
307
+ type GridColumns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'none';
308
+ type GridRows = 1 | 2 | 3 | 4 | 5 | 6 | 'none';
309
+ type GridGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
310
+ type GridFlow = 'row' | 'col' | 'row-dense' | 'col-dense';
311
+ interface GridStylesOptions {
312
+ columns?: GridColumns;
313
+ rows?: GridRows;
314
+ gap?: GridGap;
315
+ flow?: GridFlow;
316
+ }
317
+
318
+ type GridBaseProps = GridStylesOptions;
319
+ type GridProps<E extends ElementType = 'div'> = PolymorphicProps<E, GridBaseProps>;
320
+ declare const Grid: {
321
+ <E extends ElementType = "div">({ as, columns, rows, gap, flow, className, children, ...props }: GridProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
322
+ displayName: string;
323
+ };
324
+
325
+ type SeparatorOrientation = 'horizontal' | 'vertical';
326
+ interface SeparatorStylesOptions {
327
+ orientation?: SeparatorOrientation;
328
+ }
329
+
330
+ type SeparatorBaseProps = SeparatorStylesOptions;
331
+ type SeparatorProps<E extends ElementType = 'div'> = PolymorphicProps<E, SeparatorBaseProps>;
332
+ declare const Separator: {
333
+ <E extends ElementType = "div">({ as, orientation, className, ...props }: SeparatorProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
334
+ displayName: string;
335
+ };
336
+
337
+ type SpacerSize = 1 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 'auto';
338
+ interface SpacerStylesOptions {
339
+ size?: SpacerSize;
340
+ }
341
+
342
+ type SpacerBaseProps = SpacerStylesOptions;
343
+ type SpacerProps<E extends ElementType = 'div'> = PolymorphicProps<E, SpacerBaseProps>;
344
+ declare const Spacer: {
345
+ <E extends ElementType = "div">({ as, size, className, ...props }: SpacerProps<E>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
346
+ displayName: string;
347
+ };
348
+
349
+ export { Box, type BoxBackground, type BoxDisplay, type BoxPadding, type BoxProps, type BoxRadius, Button, type ButtonProps, CTAButton, type CTAButtonProps, Checkbox, type CheckboxLabelProps, type CheckboxRootProps, Field, type FieldDescriptionProps, type FieldErrorDescriptionProps, type FieldLabelProps, type FieldProps, Flex, type FlexAlign, type FlexDirection, type FlexGap, type FlexJustify, type FlexProps, FloatingActionButton, type FloatingActionButtonProps, Grid, type GridColumns, type GridFlow, type GridGap, type GridProps, type GridRows, HStack, type HStackProps, type PolymorphicProps, type PolymorphicPropsWithoutRef, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Separator, type SeparatorOrientation, type SeparatorProps, Spacer, type SpacerProps, type SpacerSize, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, Text, TextArea, type TextAreaFooterProps, type TextAreaInputProps, type TextAreaProps, type TextColor, TextInput, type TextInputProps, type TextInputVariant, type TextProps, type TextStyleProps, Toggle, type ToggleLabelProps, type ToggleRootProps, type Typography, VStack, type VStackProps, mergeStyles, useRadioGroupContext };