tw-react-components 0.0.185 → 0.0.190

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tw-react-components",
3
3
  "description": "A set of React components build with TailwindCSS to make a nice dashboard.",
4
- "version": "0.0.185",
4
+ "version": "0.0.190",
5
5
  "license": "MIT",
6
6
  "homepage": "https://bacali95.github.io/tw-react-components",
7
7
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "import": "./index.esm.js",
23
- "types": "./index.esm.d.ts"
23
+ "types": "./index.d.ts"
24
24
  },
25
25
  "./css": {
26
26
  "default": "./index.css"
@@ -35,5 +35,5 @@
35
35
  },
36
36
  "module": "./index.esm.js",
37
37
  "main": "./index.esm.js",
38
- "types": "./index.esm.d.ts"
38
+ "types": "./index.d.ts"
39
39
  }
@@ -0,0 +1,19 @@
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import type { ComponentProps, FC } from 'react';
3
+ export type AccordionProps = ComponentProps<typeof AccordionPrimitive.Root> & {
4
+ dataTestId?: string;
5
+ };
6
+ export type AccordionItemProps = ComponentProps<typeof AccordionPrimitive.Item> & {
7
+ dataTestId?: string;
8
+ };
9
+ export type AccordionTriggerProps = ComponentProps<typeof AccordionPrimitive.Trigger> & {
10
+ dataTestId?: string;
11
+ };
12
+ export type AccordionContentProps = ComponentProps<typeof AccordionPrimitive.Content> & {
13
+ dataTestId?: string;
14
+ };
15
+ export declare const Accordion: FC<AccordionProps> & {
16
+ Item: FC<AccordionItemProps>;
17
+ Trigger: FC<AccordionTriggerProps>;
18
+ Content: FC<AccordionContentProps>;
19
+ };
@@ -19,7 +19,6 @@ export declare const BasicInput: <Type extends InputType>({ className, inputClas
19
19
  export declare const BasicInputExtension: FC<PropsWithChildren<{
20
20
  className?: string;
21
21
  size: Size;
22
- hasErrors?: boolean;
23
22
  disabled?: boolean;
24
23
  dataTestId?: string;
25
24
  onClick?: (event: MouseEvent<HTMLDivElement>) => void;
@@ -8,6 +8,7 @@ export type WithFormProps<Type extends InputType | SelectInputType, Props = Type
8
8
  validate?: Type extends 'number' ? Validate<number, any> : Type extends DateTimeInputType ? Validate<Date, any> : Type extends SelectInputType ? Validate<any, any> : Validate<string, any>;
9
9
  } & Omit<Props, 'pattern' | keyof Omit<ControllerRenderProps, 'disabled' | 'ref'>>;
10
10
  export declare const FormInputs: {
11
+ BasicInput: FC<WithFormProps<InputType, BasicInputProps<InputType>>>;
11
12
  Text: FC<WithFormProps<"text", TextInputProps>>;
12
13
  Email: FC<WithFormProps<"email", EmailInputProps>>;
13
14
  Password: FC<WithFormProps<"password", PasswordInputProps>>;
@@ -1,6 +1,7 @@
1
1
  import type { FC } from 'react';
2
2
  type Props = {
3
3
  className?: string;
4
+ spinnerClassName?: string;
4
5
  fullScreen?: boolean;
5
6
  dataTestId?: string;
6
7
  };
@@ -1,3 +1,4 @@
1
+ export * from './Accordion';
1
2
  export * from './Badge';
2
3
  export * from './Block';
3
4
  export * from './Button';
@@ -1,5 +1,5 @@
1
1
  export type Size = 'small' | 'medium';
2
- export type Color = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'fuchsia' | 'purple' | 'pink' | 'rose';
2
+ export type Color = 'primary' | 'secondary' | 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'fuchsia' | 'purple' | 'pink' | 'rose';
3
3
  type NextDepth = {
4
4
  '1': never;
5
5
  '2': '1';
File without changes