@nextui-org/react 1.0.2-beta.5-dbg2 → 1.0.2-beta.5

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.
Files changed (63) hide show
  1. package/cjs/button/button.js +1 -1
  2. package/cjs/checkbox/checkbox.js +1 -1
  3. package/cjs/collapse/collapse.js +1 -1
  4. package/cjs/collapse/collapse.styles.js +1 -1
  5. package/cjs/grid/grid-container.js +1 -1
  6. package/cjs/grid/grid-item.js +1 -1
  7. package/cjs/grid/grid.js +1 -1
  8. package/cjs/image/image.js +1 -1
  9. package/cjs/image/image.styles.js +1 -1
  10. package/cjs/snippet/snippet.js +1 -1
  11. package/cjs/spacer/spacer.js +1 -1
  12. package/cjs/table/table.js +1 -1
  13. package/cjs/table/table.styles.js +1 -1
  14. package/cjs/theme/theme-provider.js +1 -1
  15. package/cjs/user/user.js +1 -1
  16. package/esm/button/button.js +1 -1
  17. package/esm/checkbox/checkbox.js +1 -1
  18. package/esm/collapse/collapse.js +1 -1
  19. package/esm/collapse/collapse.styles.js +1 -1
  20. package/esm/grid/grid-container.js +1 -1
  21. package/esm/grid/grid-item.js +1 -1
  22. package/esm/grid/grid.js +1 -1
  23. package/esm/image/image.js +1 -1
  24. package/esm/image/image.styles.js +1 -1
  25. package/esm/snippet/snippet.js +1 -1
  26. package/esm/spacer/spacer.js +1 -1
  27. package/esm/table/table.js +1 -1
  28. package/esm/table/table.styles.js +1 -1
  29. package/esm/theme/theme-provider.js +1 -1
  30. package/esm/user/user.js +1 -1
  31. package/package.json +1 -1
  32. package/types/backdrop/backdrop.styles.d.ts +1 -1
  33. package/types/button/button-group.styles.d.ts +1 -1
  34. package/types/button/button.d.ts +1 -0
  35. package/types/button/button.styles.d.ts +1 -1
  36. package/types/card/card.styles.d.ts +3 -3
  37. package/types/checkbox/checkbox.styles.d.ts +3 -3
  38. package/types/collapse/collapse.styles.d.ts +954 -4
  39. package/types/grid/grid-container.d.ts +7 -10
  40. package/types/grid/grid-item.d.ts +3 -9
  41. package/types/grid/grid.d.ts +3 -3
  42. package/types/image/image.styles.d.ts +1 -1
  43. package/types/input/input-props.d.ts +1 -1
  44. package/types/input/input.styles.d.ts +5 -5
  45. package/types/modal/modal.styles.d.ts +1 -1
  46. package/types/pagination/pagination.styles.d.ts +5 -5
  47. package/types/radio/radio.styles.d.ts +3 -3
  48. package/types/snippet/snippet.styles.d.ts +1 -1
  49. package/types/spacer/spacer.d.ts +1 -1
  50. package/types/spacer/spacer.styles.d.ts +1 -1
  51. package/types/switch/switch.styles.d.ts +1 -1
  52. package/types/table/table-column-header.d.ts +12 -1
  53. package/types/table/table.d.ts +3 -2
  54. package/types/table/table.styles.d.ts +966 -12
  55. package/types/theme/stitches.config.d.ts +1 -1
  56. package/types/tooltip/tooltip.styles.d.ts +1 -1
  57. package/umd/nextui.js +13264 -11734
  58. package/umd/nextui.min.js +1 -1
  59. package/types/table/table-cell-old.d.ts +0 -22
  60. package/types/table/table-column.d.ts +0 -17
  61. package/types/table/table-old.d.ts +0 -49
  62. package/types/table/table-types.d.ts +0 -30
  63. package/types/theme/ssr-provider.d.ts +0 -7
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import React, { RefAttributes, PropsWithoutRef } from 'react';
2
2
  import { CSS } from '../theme/stitches.config';
3
3
  import { GridItemProps } from './grid-item';
4
4
  import { Wrap } from '../utils/prop-types';
5
5
  interface Props {
6
- gap: number;
7
- wrap: Wrap;
8
- className: string;
6
+ gap?: number;
7
+ wrap?: Wrap;
8
+ className?: string;
9
9
  css?: CSS;
10
10
  }
11
11
  declare const defaultProps: {
@@ -13,10 +13,7 @@ declare const defaultProps: {
13
13
  wrap: "nowrap" | "wrap" | "wrap-reverse";
14
14
  className: string;
15
15
  };
16
- export declare type GridContainerProps = Props & typeof defaultProps & GridItemProps;
17
- declare const _default: React.ComponentType<Partial<{
18
- gap: number;
19
- wrap: "nowrap" | "wrap" | "wrap-reverse";
20
- className: string;
21
- }> & Omit<React.PropsWithChildren<GridContainerProps>, "wrap" | "gap" | "className">>;
16
+ export declare type GridContainerProps = Props & Partial<typeof defaultProps> & GridItemProps;
17
+ declare type GridContainerComponent<T, P = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
18
+ declare const _default: GridContainerComponent<HTMLDivElement, GridContainerProps>;
22
19
  export default _default;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { RefAttributes, PropsWithoutRef } from 'react';
2
2
  import { BreakpointsValue, Justify, Direction, AlignItems, AlignContent } from '../utils/prop-types';
3
3
  import { CSS } from '../theme/stitches.config';
4
4
  import { GridItemVariantProps } from './grid.styles';
@@ -26,12 +26,6 @@ declare const defaultProps: {
26
26
  };
27
27
  declare type NativeAttrs = Omit<React.HTMLAttributes<unknown>, keyof Props>;
28
28
  export declare type GridItemProps = Props & Partial<typeof defaultProps> & NativeAttrs & GridItemVariantProps;
29
- declare const _default: React.ComponentType<Partial<{
30
- xs: BreakpointsValue;
31
- sm: BreakpointsValue;
32
- md: BreakpointsValue;
33
- lg: BreakpointsValue;
34
- xl: BreakpointsValue;
35
- className: string;
36
- }> & Omit<React.PropsWithChildren<GridItemProps>, "xs" | "sm" | "md" | "lg" | "xl" | "className">>;
29
+ declare type GridItemComponent<T, P = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
30
+ declare const _default: GridItemComponent<HTMLDivElement, GridItemProps>;
37
31
  export default _default;
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import React, { RefAttributes, PropsWithoutRef } from 'react';
2
2
  import GridContainer from './grid-container';
3
3
  import { GridItemProps } from './grid-item';
4
4
  export declare type GridProps = GridItemProps;
5
- declare type GridComponent<P = {}> = React.NamedExoticComponent<P> & {
5
+ declare type GridComponent<T, P = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> & {
6
6
  Container: typeof GridContainer;
7
7
  };
8
- declare const _default: GridComponent<GridItemProps>;
8
+ declare const _default: GridComponent<HTMLDivElement, GridItemProps>;
9
9
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from '../theme/stitches.config';
2
2
  export declare const StyledImageContainer: import("@stitches/react/types/styled-component").StyledComponent<"div", {
3
- ready?: boolean | "false" | "true" | undefined;
3
+ ready?: boolean | "true" | "false" | undefined;
4
4
  }, {
5
5
  xs: string;
6
6
  sm: string;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { NormalSizes, SimpleColors, ContentPosition, NormalWeights, AsProp } from '../utils/prop-types';
3
3
  export declare type FormElement = HTMLInputElement | HTMLTextAreaElement;
4
4
  export interface Props extends AsProp<'input' | 'textarea'>, React.HTMLAttributes<FormElement> {
5
- value?: string;
5
+ value?: string | ReadonlyArray<string> | number;
6
6
  fullWidth?: boolean;
7
7
  initialValue?: string;
8
8
  placeholder?: string;
@@ -943,7 +943,7 @@ export declare const StyledInputContainer: import("@stitches/react/types/styled-
943
943
  focused?: boolean | "true" | undefined;
944
944
  isReadOnly?: boolean | "false" | undefined;
945
945
  underlined?: boolean | "true" | undefined;
946
- animated?: boolean | "false" | "true" | undefined;
946
+ animated?: boolean | "true" | "false" | undefined;
947
947
  }, {
948
948
  xs: string;
949
949
  sm: string;
@@ -2820,9 +2820,9 @@ export declare const StyledInputWrapper: import("@stitches/react/types/styled-co
2820
2820
  bordered?: boolean | "true" | undefined;
2821
2821
  shadow?: boolean | "true" | undefined;
2822
2822
  disabled?: boolean | "true" | undefined;
2823
- underlined?: boolean | "false" | "true" | undefined;
2823
+ underlined?: boolean | "true" | "false" | undefined;
2824
2824
  animated?: boolean | "false" | undefined;
2825
- isTextarea?: boolean | "false" | "true" | undefined;
2825
+ isTextarea?: boolean | "true" | "false" | undefined;
2826
2826
  }, {
2827
2827
  xs: string;
2828
2828
  sm: string;
@@ -3755,7 +3755,7 @@ export declare const StyledInputWrapper: import("@stitches/react/types/styled-co
3755
3755
  };
3756
3756
  }>>;
3757
3757
  export declare const StyledHelperTextContainer: import("@stitches/react/types/styled-component").StyledComponent<"div", {
3758
- animated?: boolean | "false" | "true" | undefined;
3758
+ animated?: boolean | "true" | "false" | undefined;
3759
3759
  withValue?: boolean | "true" | undefined;
3760
3760
  }, {
3761
3761
  xs: string;
@@ -7492,7 +7492,7 @@ export declare const StyledInputBlockLabel: import("@stitches/react/types/styled
7492
7492
  };
7493
7493
  }>>;
7494
7494
  export declare const StyledInputLabel: import("@stitches/react/types/styled-component").StyledComponent<"span", {
7495
- isRight?: boolean | "false" | "true" | undefined;
7495
+ isRight?: boolean | "true" | "false" | undefined;
7496
7496
  isDark?: boolean | "true" | undefined;
7497
7497
  isDefaultStatus?: boolean | "true" | undefined;
7498
7498
  underlined?: boolean | "true" | undefined;
@@ -4666,7 +4666,7 @@ export declare const StyledModalFooter: import("@stitches/react/types/styled-com
4666
4666
  };
4667
4667
  }>>;
4668
4668
  export declare const StyledModal: import("@stitches/react/types/styled-component").StyledComponent<"section", {
4669
- fullScreen?: boolean | "false" | "true" | undefined;
4669
+ fullScreen?: boolean | "true" | "false" | undefined;
4670
4670
  scroll?: boolean | "true" | undefined;
4671
4671
  closeButton?: boolean | "true" | undefined;
4672
4672
  isDark?: boolean | "true" | undefined;
@@ -2803,7 +2803,7 @@ export declare const StyledPaginationItem: import("@stitches/react/types/styled-
2803
2803
  bordered?: boolean | "true" | undefined;
2804
2804
  onlyDots?: boolean | "true" | undefined;
2805
2805
  preserveContent?: boolean | "true" | undefined;
2806
- animated?: boolean | "false" | "true" | undefined;
2806
+ animated?: boolean | "true" | "false" | undefined;
2807
2807
  }, {
2808
2808
  xs: string;
2809
2809
  sm: string;
@@ -3736,7 +3736,7 @@ export declare const StyledPaginationItem: import("@stitches/react/types/styled-
3736
3736
  };
3737
3737
  }>>;
3738
3738
  export declare const StyledPaginationHighlight: import("@stitches/react/types/styled-component").StyledComponent<"div", {
3739
- animated?: boolean | "false" | "true" | undefined;
3739
+ animated?: boolean | "true" | "false" | undefined;
3740
3740
  noMargin?: boolean | "true" | undefined;
3741
3741
  rounded?: boolean | "true" | undefined;
3742
3742
  shadow?: boolean | "true" | undefined;
@@ -4676,9 +4676,9 @@ export declare const StyledPagination: import("@stitches/react/types/styled-comp
4676
4676
  size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
4677
4677
  borderWeight?: "light" | "normal" | "bold" | "extrabold" | "black" | undefined;
4678
4678
  bordered?: boolean | "true" | undefined;
4679
- onlyDots?: boolean | "false" | "true" | undefined;
4680
- rounded?: boolean | "false" | "true" | undefined;
4681
- noMargin?: boolean | "false" | "true" | undefined;
4679
+ onlyDots?: boolean | "true" | "false" | undefined;
4680
+ rounded?: boolean | "true" | "false" | undefined;
4681
+ noMargin?: boolean | "true" | "false" | undefined;
4682
4682
  }, {
4683
4683
  xs: string;
4684
4684
  sm: string;
@@ -2799,9 +2799,9 @@ export declare const StyledRadio: import("@stitches/react/types/styled-component
2799
2799
  color?: "default" | "primary" | "secondary" | "success" | "warning" | "error" | undefined;
2800
2800
  size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
2801
2801
  disabled?: boolean | "true" | undefined;
2802
- squared?: boolean | "false" | "true" | undefined;
2802
+ squared?: boolean | "true" | "false" | undefined;
2803
2803
  active?: boolean | "true" | undefined;
2804
- animated?: boolean | "false" | "true" | undefined;
2804
+ animated?: boolean | "true" | "false" | undefined;
2805
2805
  }, {
2806
2806
  xs: string;
2807
2807
  sm: string;
@@ -3735,7 +3735,7 @@ export declare const StyledRadio: import("@stitches/react/types/styled-component
3735
3735
  }>>;
3736
3736
  export declare const StyledRadioGroup: import("@stitches/react/types/styled-component").StyledComponent<"div", {
3737
3737
  size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
3738
- row?: boolean | "false" | "true" | undefined;
3738
+ row?: boolean | "true" | "false" | undefined;
3739
3739
  }, {
3740
3740
  xs: string;
3741
3741
  sm: string;
@@ -936,7 +936,7 @@ export declare const StyledSnippet: import("@stitches/react/types/styled-compone
936
936
  };
937
937
  }>>;
938
938
  export declare const StyledSnippetPre: import("@stitches/react/types/styled-component").StyledComponent<"pre", {
939
- withCopyButton?: boolean | "false" | "true" | undefined;
939
+ withCopyButton?: boolean | "true" | "false" | undefined;
940
940
  }, {
941
941
  xs: string;
942
942
  sm: string;
@@ -20,7 +20,7 @@ declare const _default: React.ComponentType<Partial<{
20
20
  x: number;
21
21
  y: number;
22
22
  } & NativeAttrs & import("@stitches/react/types/styled-component").TransformProps<{
23
- inline?: boolean | "false" | "true" | undefined;
23
+ inline?: boolean | "true" | "false" | undefined;
24
24
  }, {
25
25
  xs: string;
26
26
  sm: string;
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from '../theme/stitches.config';
2
2
  export declare const StyledSpacer: import("@stitches/react/types/styled-component").StyledComponent<"span", {
3
- inline?: boolean | "false" | "true" | undefined;
3
+ inline?: boolean | "true" | "false" | undefined;
4
4
  }, {
5
5
  xs: string;
6
6
  sm: string;
@@ -2804,7 +2804,7 @@ export declare const StyledSwitch: import("@stitches/react/types/styled-componen
2804
2804
  squared?: boolean | "true" | undefined;
2805
2805
  shadow?: boolean | "true" | undefined;
2806
2806
  disabled?: boolean | "true" | undefined;
2807
- animated?: boolean | "false" | "true" | undefined;
2807
+ animated?: boolean | "true" | "false" | undefined;
2808
2808
  }, {
2809
2809
  xs: string;
2810
2810
  sm: string;
@@ -51,7 +51,11 @@ declare const TableColumnHeader: React.ForwardRefExoticComponent<Props<unknown>
51
51
  };
52
52
  allowsSorting: {
53
53
  true: {
54
+ transition: string;
54
55
  cursor: string;
56
+ '@motion': {
57
+ transition: string;
58
+ };
55
59
  '&:hover': {
56
60
  color: string;
57
61
  bg: string;
@@ -63,9 +67,16 @@ declare const TableColumnHeader: React.ForwardRefExoticComponent<Props<unknown>
63
67
  align: "left";
64
68
  animated: true;
65
69
  };
70
+ compoundVariants: {
71
+ animated: false;
72
+ allowsSorting: true;
73
+ css: {
74
+ transition: string;
75
+ };
76
+ }[];
66
77
  }, import("@stitches/react/types/styled-component").CssComponent<never, {
67
78
  animated?: boolean | "false" | undefined;
68
- isFocusVisible?: boolean | "false" | "true" | undefined;
79
+ isFocusVisible?: boolean | "true" | "false" | undefined;
69
80
  }, {
70
81
  xs: string;
71
82
  sm: string;
@@ -4,7 +4,7 @@ import { SelectionMode, SelectionBehavior } from '@react-types/shared';
4
4
  import { CSS } from '../theme/stitches.config';
5
5
  import { TableColumn as TableColumnBase, TableCell as TableCellBase, TableRow as TableRowBase, TableBody as TableBodyBase, TableHeader as TableHeaderBase } from './base';
6
6
  import TablePagination from './table-pagination';
7
- import { TableVariantsProps } from './table.styles';
7
+ import { TableVariantsProps, TableContainerVariantsProps } from './table.styles';
8
8
  interface Props<T> extends TableStateProps<T> {
9
9
  selectionMode?: SelectionMode;
10
10
  selectionBehavior?: SelectionBehavior;
@@ -13,8 +13,9 @@ interface Props<T> extends TableStateProps<T> {
13
13
  as?: keyof JSX.IntrinsicElements;
14
14
  }
15
15
  declare type NativeAttrs = Omit<React.TableHTMLAttributes<unknown>, keyof Props<object>>;
16
- export declare type TableProps<T = object> = Props<T> & NativeAttrs & Omit<TableVariantsProps, 'isMultiple'> & {
16
+ export declare type TableProps<T = object> = Props<T> & NativeAttrs & Omit<TableVariantsProps, 'isMultiple' | 'shadow' | 'hasPagination'> & TableContainerVariantsProps & {
17
17
  css?: CSS;
18
+ containerCss?: CSS;
18
19
  };
19
20
  declare type TableComponent<T, P = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> & {
20
21
  Cell: typeof TableCellBase;