@tecsinapse/cortex-react 1.3.0-beta.23 → 1.3.0-beta.24

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.
@@ -1,6 +1,2 @@
1
- import { ReactNode } from 'react';
2
- interface ContentProps {
3
- children: ReactNode;
4
- }
1
+ import { ContentProps } from './types';
5
2
  export declare const Content: ({ children }: ContentProps) => JSX.Element;
6
- export {};
@@ -1,6 +1,2 @@
1
- export interface SelectGroupedOptionsProps<T> {
2
- onSelect: (value: T) => void;
3
- options?: Map<string, T[]>;
4
- groupedLabelExtractor: (value: string) => string;
5
- }
1
+ import { SelectGroupedOptionsProps } from '.';
6
2
  export declare const SelectGroupedOptions: <T>({ onSelect, groupedLabelExtractor, options, }: SelectGroupedOptionsProps<T>) => JSX.Element;
@@ -1,4 +1,2 @@
1
- export interface SelectMultiCheckAllOptionsProps {
2
- checkAllLabel?: string;
3
- }
1
+ import { SelectMultiCheckAllOptionsProps } from './types';
4
2
  export declare const SelectMultiCheckAllOptions: <T>({ checkAllLabel, }: SelectMultiCheckAllOptionsProps) => JSX.Element;
@@ -1,8 +1,2 @@
1
- import React from 'react';
2
- export interface SelectMultiGroupedOptionsProps<T> {
3
- onSelect: (value: T[]) => void;
4
- options?: Map<string, T[]>;
5
- groupedLabelExtractor: (value: string) => string;
6
- children?: React.ReactNode;
7
- }
1
+ import { SelectMultiGroupedOptionsProps } from '.';
8
2
  export declare const SelectMultiGroupedOptions: <T>({ onSelect, groupedLabelExtractor, options, children, }: SelectMultiGroupedOptionsProps<T>) => JSX.Element;
@@ -1,6 +1,2 @@
1
- export interface SelectMultiOptionProps<T> {
2
- option: T;
3
- onSelectOption: (option: T) => void;
4
- grouped?: boolean;
5
- }
1
+ import { SelectMultiOptionProps } from './types';
6
2
  export declare const SelectMultiOption: <T>({ onSelectOption, option, grouped, }: SelectMultiOptionProps<T>) => JSX.Element;
@@ -1,7 +1,2 @@
1
- import React from 'react';
2
- export interface SelectMultiOptionsProps<T> {
3
- options?: T[];
4
- onSelect: (value: T[]) => void;
5
- children?: React.ReactNode;
6
- }
1
+ import { SelectMultiOptionsProps } from '.';
7
2
  export declare const SelectMultiOptions: <T>({ onSelect, options, children, }: SelectMultiOptionsProps<T>) => JSX.Element;
@@ -1,6 +1,2 @@
1
- export interface SelectOptionProps<T> {
2
- option: T;
3
- onSelectOption: (option: T) => void;
4
- grouped?: boolean;
5
- }
1
+ import { SelectOptionProps } from './types';
6
2
  export declare const SelectOption: <T>({ onSelectOption, option, grouped, }: SelectOptionProps<T>) => JSX.Element;
@@ -1,5 +1,2 @@
1
- export interface SelectOptionsProps<T> {
2
- options?: T[];
3
- onSelect: (value: T) => void;
4
- }
1
+ import { SelectOptionsProps } from '.';
5
2
  export declare const SelectOptions: <T>({ onSelect, options, }: SelectOptionsProps<T>) => JSX.Element;
@@ -1,5 +1,2 @@
1
- import { ReactNode } from 'react';
2
- export interface SelectPopoverProps {
3
- children: ReactNode;
4
- }
1
+ import { SelectPopoverProps } from './types';
5
2
  export declare const SelectPopover: ({ children }: SelectPopoverProps) => JSX.Element;
@@ -1,8 +1,2 @@
1
- import { ReactNode } from 'react';
2
- export interface SelectRootProps<T> {
3
- children: ReactNode;
4
- value?: T | T[];
5
- keyExtractor: (value: T) => string;
6
- labelExtractor: (value: T) => string;
7
- }
1
+ import { SelectRootProps } from './types';
8
2
  export declare const SelectRoot: <T>({ children, value, keyExtractor, labelExtractor, }: SelectRootProps<T>) => JSX.Element;
@@ -1,5 +1,2 @@
1
- export interface SelectTriggerProps {
2
- label: string;
3
- disabled?: boolean;
4
- }
1
+ import { SelectTriggerProps } from './types';
5
2
  export declare const SelectTrigger: ({ label, disabled }: SelectTriggerProps) => JSX.Element;
@@ -1,12 +1,13 @@
1
1
  export declare const Select: {
2
- Root: <T>({ children, value, keyExtractor, labelExtractor, }: import("./Root").SelectRootProps<T>) => JSX.Element;
3
- Trigger: ({ label, disabled }: import("./Trigger").SelectTriggerProps) => JSX.Element;
4
- Popover: ({ children }: import("./Popover").SelectPopoverProps) => JSX.Element;
5
- Options: <T_1>({ onSelect, options, }: import("./Options").SelectOptionsProps<T_1>) => JSX.Element;
6
- GroupedOptions: <T_2>({ onSelect, groupedLabelExtractor, options, }: import("./GroupedOptions").SelectGroupedOptionsProps<T_2>) => JSX.Element;
7
- Option: <T_3>({ onSelectOption, option, grouped, }: import("./Option").SelectOptionProps<T_3>) => JSX.Element;
8
- MultiOptions: <T_4>({ onSelect, options, children, }: import("./MultiOptions").SelectMultiOptionsProps<T_4>) => JSX.Element;
9
- MultiGroupedOptions: <T_5>({ onSelect, groupedLabelExtractor, options, children, }: import("./MultiGroupedOptions").SelectMultiGroupedOptionsProps<T_5>) => JSX.Element;
10
- MultiOption: <T_6>({ onSelectOption, option, grouped, }: import("./MultiOption").SelectMultiOptionProps<T_6>) => JSX.Element;
11
- MultiCheckAllOptions: <T_7>({ checkAllLabel, }: import("./MultiCheckAllOptions").SelectMultiCheckAllOptionsProps) => JSX.Element;
2
+ Root: <T>({ children, value, keyExtractor, labelExtractor, }: import("./types").SelectRootProps<T>) => JSX.Element;
3
+ Trigger: ({ label, disabled }: import("./types").SelectTriggerProps) => JSX.Element;
4
+ Popover: ({ children }: import("./types").SelectPopoverProps) => JSX.Element;
5
+ Options: <T_1>({ onSelect, options, }: import("./types").SelectOptionsProps<T_1>) => JSX.Element;
6
+ GroupedOptions: <T_2>({ onSelect, groupedLabelExtractor, options, }: import("./types").SelectGroupedOptionsProps<T_2>) => JSX.Element;
7
+ Option: <T_3>({ onSelectOption, option, grouped, }: import("./types").SelectOptionProps<T_3>) => JSX.Element;
8
+ MultiOptions: <T_4>({ onSelect, options, children, }: import("./types").SelectMultiOptionsProps<T_4>) => JSX.Element;
9
+ MultiGroupedOptions: <T_5>({ onSelect, groupedLabelExtractor, options, children, }: import("./types").SelectMultiGroupedOptionsProps<T_5>) => JSX.Element;
10
+ MultiOption: <T_6>({ onSelectOption, option, grouped, }: import("./types").SelectMultiOptionProps<T_6>) => JSX.Element;
11
+ MultiCheckAllOptions: <T_7>({ checkAllLabel, }: import("./types").SelectMultiCheckAllOptionsProps) => JSX.Element;
12
12
  };
13
+ export * from './types';
@@ -0,0 +1,50 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ContentProps {
3
+ children: ReactNode;
4
+ }
5
+ export interface SelectGroupedOptionsProps<T> {
6
+ onSelect: (value: T) => void;
7
+ options?: Map<string, T[]>;
8
+ groupedLabelExtractor: (value: string) => string;
9
+ }
10
+ export interface SelectMultiCheckAllOptionsProps {
11
+ checkAllLabel?: string;
12
+ }
13
+ export interface SelectMultiGroupedOptionsProps<T> {
14
+ onSelect: (value: T[]) => void;
15
+ options?: Map<string, T[]>;
16
+ groupedLabelExtractor: (value: string) => string;
17
+ children?: React.ReactNode;
18
+ }
19
+ export interface SelectMultiOptionProps<T> {
20
+ option: T;
21
+ onSelectOption: (option: T) => void;
22
+ grouped?: boolean;
23
+ }
24
+ export interface SelectMultiOptionsProps<T> {
25
+ options?: T[];
26
+ onSelect: (value: T[]) => void;
27
+ children?: React.ReactNode;
28
+ }
29
+ export interface SelectOptionProps<T> {
30
+ option: T;
31
+ onSelectOption: (option: T) => void;
32
+ grouped?: boolean;
33
+ }
34
+ export interface SelectOptionsProps<T> {
35
+ options?: T[];
36
+ onSelect: (value: T) => void;
37
+ }
38
+ export interface SelectPopoverProps {
39
+ children: ReactNode;
40
+ }
41
+ export interface SelectRootProps<T> {
42
+ children: ReactNode;
43
+ value?: T | T[];
44
+ keyExtractor: (value: T) => string;
45
+ labelExtractor: (value: T) => string;
46
+ }
47
+ export interface SelectTriggerProps {
48
+ label: string;
49
+ disabled?: boolean;
50
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tecsinapse/cortex-react",
3
- "version": "1.3.0-beta.23",
3
+ "version": "1.3.0-beta.24",
4
4
  "description": "React components based in @tecsinapse/cortex-core",
5
5
  "license": "MIT",
6
6
  "main": "dist/esm/index.js",
@@ -43,5 +43,5 @@
43
43
  "react-dom": ">=18.0.0",
44
44
  "tailwind": ">=3.3.0"
45
45
  },
46
- "gitHead": "51b45071d2ed294e4730031f44470b1f1a0a3f63"
46
+ "gitHead": "7b74015412114e20cb6e950c3400fd1ce7cbb25e"
47
47
  }