@importcsv/react 0.2.5 → 0.2.6

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 (29) hide show
  1. package/build/preact/components/Modal/index.d.ts +12 -0
  2. package/build/preact/importer/components/Table/types/index.d.ts +42 -0
  3. package/build/preact/importer/components/ui/alert.d.ts +4 -1
  4. package/build/preact/importer/components/ui/tooltip.d.ts +6 -2
  5. package/build/preact/index.d.ts +1 -0
  6. package/build/preact/index.esm.js +3994 -3823
  7. package/build/preact/index.esm.js.map +1 -1
  8. package/build/preact/index.js +31 -31
  9. package/build/preact/index.js.map +1 -1
  10. package/build/react/components/CSVImporter/index.d.ts +1 -1
  11. package/build/react/components/Modal/index.d.ts +1 -1
  12. package/build/react/importer/components/Root/index.d.ts +1 -1
  13. package/build/react/importer/components/ui/alert.d.ts +3 -3
  14. package/build/react/importer/components/ui/button.d.ts +1 -1
  15. package/build/react/importer/components/ui/card.d.ts +6 -6
  16. package/build/react/importer/components/ui/checkbox.d.ts +1 -1
  17. package/build/react/importer/components/ui/dialog.d.ts +5 -5
  18. package/build/react/importer/components/ui/flex.d.ts +5 -5
  19. package/build/react/importer/components/ui/input.d.ts +1 -1
  20. package/build/react/importer/components/ui/select.d.ts +1 -1
  21. package/build/react/importer/components/ui/switch.d.ts +1 -1
  22. package/build/react/importer/components/ui/toast.d.ts +5 -5
  23. package/build/react/importer/components/ui/tooltip.d.ts +2 -2
  24. package/build/react/index.esm.js +4 -4
  25. package/build/react/index.js +10 -10
  26. package/build/react/index.js.map +1 -1
  27. package/build/react/js.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/build/preact/utils/injectStyles.d.ts +0 -14
@@ -0,0 +1,12 @@
1
+ import { ComponentChildren } from 'preact';
2
+ interface ModalProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ children: ComponentChildren;
6
+ closeOnOutsideClick?: boolean;
7
+ className?: string;
8
+ overlayClassName?: string;
9
+ contentClassName?: string;
10
+ }
11
+ declare const Modal: ({ isOpen, onClose, children, closeOnOutsideClick, className, overlayClassName, contentClassName }: ModalProps) => import('preact').VNode<any> | null;
12
+ export default Modal;
@@ -0,0 +1,42 @@
1
+ import { JSX } from 'preact';
2
+ type Style = {
3
+ readonly [key: string]: string;
4
+ };
5
+ type Primitive = string | number | boolean | null | undefined;
6
+ export type TableComposite = {
7
+ raw: Primitive;
8
+ content: Primitive | JSX.Element;
9
+ tooltip?: string;
10
+ captionInfo?: string;
11
+ };
12
+ export type TableValue = Primitive | TableComposite;
13
+ export type TableDatum = {
14
+ [key: string]: TableValue;
15
+ };
16
+ export type TableData = TableDatum[];
17
+ export type TableProps = {
18
+ data: TableData;
19
+ keyAsId?: string;
20
+ theme?: Style;
21
+ mergeThemes?: boolean;
22
+ highlightColumns?: string[];
23
+ hideColumns?: string[];
24
+ emptyState?: ReactElement;
25
+ heading?: ReactElement;
26
+ background?: "zebra" | "dark" | "light" | "transparent";
27
+ columnWidths?: string[];
28
+ columnAlignments?: ("left" | "center" | "right" | "")[];
29
+ fixHeader?: boolean;
30
+ onRowClick?: (row: TableDatum) => void;
31
+ };
32
+ export type RowProps = {
33
+ datum: TableDatum;
34
+ isHeading?: boolean;
35
+ onClick?: (row: TableDatum) => void;
36
+ };
37
+ export type CellProps = PropsWithChildren<{
38
+ cellClass?: string;
39
+ cellStyle: Style;
40
+ tooltip?: string;
41
+ }>;
42
+ export {};
@@ -1,4 +1,7 @@
1
- declare const Alert: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<any> & {
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const Alert: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
3
+ variant?: "default" | "destructive" | null | undefined;
4
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string>> & {
2
5
  ref?: import('preact').Ref<HTMLDivElement> | undefined;
3
6
  }>;
4
7
  declare const AlertTitle: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLHeadingElement>> & {
@@ -11,10 +11,14 @@ declare const TooltipProvider: ({ children }: {
11
11
  children: ComponentChildren;
12
12
  }) => import("react/jsx-runtime").JSX.Element;
13
13
  declare const TooltipRoot: ({ content, children, delayDuration, side, className }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
14
- declare const TooltipTrigger: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<any> & {
14
+ declare const TooltipTrigger: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement> & {
15
+ asChild?: boolean | undefined;
16
+ }> & {
15
17
  ref?: import('preact').Ref<HTMLDivElement> | undefined;
16
18
  }>;
17
- declare const TooltipContent: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<any> & {
19
+ declare const TooltipContent: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement> & {
20
+ sideOffset?: number | undefined;
21
+ }> & {
18
22
  ref?: import('preact').Ref<HTMLDivElement> | undefined;
19
23
  }>;
20
24
  export { Tooltip, TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -1,4 +1,5 @@
1
1
  import { default as CSVImporter } from './components/CSVImporter';
2
2
  export { CSVImporter };
3
+ export default CSVImporter;
3
4
  export { importcsvStyles } from './styles';
4
5
  export type { Column, Validator, Transformer } from './types';