elseware-ui 2.15.3 → 2.16.0

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.
@@ -3,7 +3,7 @@ import { Variant, Shape, Size } from "../../../data/enums";
3
3
  export interface AvatarProps {
4
4
  alt?: string;
5
5
  icon?: ReactNode;
6
- children?: string;
6
+ children?: ReactNode;
7
7
  variant?: keyof typeof Variant;
8
8
  shape?: keyof typeof Shape;
9
9
  size?: keyof typeof Size;
@@ -9,6 +9,7 @@ export interface BadgeProps {
9
9
  shape?: keyof typeof Shape;
10
10
  size?: keyof typeof Size;
11
11
  showZero?: boolean;
12
+ position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
12
13
  styles?: string;
13
14
  }
14
- export declare const Badge: ({ children, offset, dot, count, variant, shape, size, showZero, styles, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Badge: ({ children, offset, dot, count, variant, shape, size, showZero, position, styles, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,9 @@
1
1
  export interface CloudinaryImageProps {
2
2
  publicId?: string;
3
+ cloudName?: string;
3
4
  secure?: boolean;
4
5
  alt?: string;
5
6
  styles?: string;
6
7
  }
7
- declare function CloudinaryImage({ publicId, secure, alt, styles }: CloudinaryImageProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function CloudinaryImage({ publicId, cloudName, secure, alt, styles, }: CloudinaryImageProps): import("react/jsx-runtime").JSX.Element;
8
9
  export default CloudinaryImage;
@@ -1,15 +1,14 @@
1
- export interface TableProps {
1
+ import { TableColumnConfig } from "./TableContent";
2
+ export interface TableProps<T> {
2
3
  title?: string;
3
- headers: {
4
- [key: string]: string;
5
- };
6
- data: any[];
4
+ columns: TableColumnConfig<T>[];
5
+ data: T[];
6
+ defaultPageSize?: number;
7
+ pageSizeOptions?: (number | "All")[];
7
8
  isLoading?: boolean;
8
9
  isSuccess?: boolean;
9
10
  isError?: boolean;
10
11
  error?: unknown;
11
- enableSelect: boolean;
12
- maxRowCount?: number;
13
12
  }
14
- declare function Table({ title, headers, data, isLoading, isSuccess, isError, error, enableSelect, maxRowCount, }: TableProps): import("react/jsx-runtime").JSX.Element;
13
+ declare function Table<T extends Record<string, any>>({ title, columns, data, defaultPageSize, pageSizeOptions, isLoading, isSuccess, isError, error, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
15
14
  export default Table;
@@ -1,11 +1,16 @@
1
- export interface TableContentProps {
1
+ import React from "react";
2
+ export type TableColumnConfig<T> = {
3
+ key: keyof T;
4
+ header: string;
5
+ render: (value: T[keyof T], record: T) => React.ReactNode;
6
+ sortable?: boolean;
7
+ };
8
+ type TableContentProps<T> = {
2
9
  title?: string;
3
- headers: {
4
- [key: string]: string;
5
- };
6
- data: any[];
7
- enableSelect: boolean;
8
- maxRowCount?: number;
9
- }
10
- declare function TableContent({ title, headers, data, enableSelect, maxRowCount, }: TableContentProps): import("react/jsx-runtime").JSX.Element;
11
- export default TableContent;
10
+ columns: TableColumnConfig<T>[];
11
+ data: T[];
12
+ defaultPageSize?: number;
13
+ pageSizeOptions?: (number | "All")[];
14
+ };
15
+ export declare function TableContent<T extends Record<string, any>>({ title, columns, data, defaultPageSize, pageSizeOptions, }: TableContentProps<T>): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from "react";
2
2
  import { Variant, Shape, Size } from "../../../data/enums";
3
3
  export interface ButtonProps {
4
- type: "button" | "submit";
4
+ type?: "button" | "submit";
5
5
  icon?: ReactNode;
6
6
  text?: string;
7
7
  children?: ReactNode;
@@ -1,11 +1,14 @@
1
1
  import { FieldHookConfig } from "formik";
2
- export interface InputProps {
2
+ import { Shape } from "../../../../data/enums";
3
+ export interface InputProps extends FieldHookConfig<string> {
3
4
  type: "text" | "password" | "number";
5
+ name: string;
4
6
  placeholder: string;
5
7
  styles?: string;
6
8
  step?: string;
9
+ shape?: keyof typeof Shape;
7
10
  }
8
11
  export interface PasswordVisibilityTogglerProps {
9
12
  onClick: (visibility: boolean) => void;
10
13
  }
11
- export declare const Input: ({ type, placeholder, styles, step, ...props }: FieldHookConfig<string> & InputProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const Input: ({ type, placeholder, styles, step, shape, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,3 @@
1
- import AdvancedTable from "./data-display/advanced-table/AdvancedTable";
2
- import { AdvancedTableColumnConfig } from "./data-display/advanced-table/AdvancedTableContent";
3
1
  import { Avatar } from "./data-display/avatar/Avatar";
4
2
  import { Badge } from "./data-display/badge/Badge";
5
3
  import TitleBanner from "./data-display/banners/TitleBanner";
@@ -16,6 +14,7 @@ import { PriceTag } from "./data-display/price-tag/PriceTag";
16
14
  import { StarRating, StarRatingDistribution } from "./data-display/rating";
17
15
  import Slider from "./data-display/slider/Slider";
18
16
  import Table from "./data-display/table/Table";
17
+ import { TableColumnConfig } from "./data-display/table/TableContent";
19
18
  import Tag from "./data-display/tag/Tag";
20
19
  import Tooltip from "./data-display/tooltip/Tooltip";
21
20
  import { Typography, Chapter, Section, Paragraph, Quote } from "./data-display/typography";
@@ -65,4 +64,4 @@ import { ThemeContext, ThemeProvider } from "./theme";
65
64
  import { ThemeSwitch } from "./theme";
66
65
  import AsyncComponentWrapper from "./utils/AsyncComponentWrapper";
67
66
  import ShowMore from "./utils/ShowMore";
68
- export { AdvancedTable, AdvancedTableColumnConfig, Avatar, Badge, TitleBanner, Brand, BarChart, LineChart, PieChart, Chip, Flag, Image, CloudinaryImage, Info, List, ListItem, PriceTag, StarRating, StarRatingDistribution, Slider, Table, Tag, Tooltip, Typography, Chapter, Section, Paragraph, Quote, ValueBadge, YoutubeVideoPlayer, WorldMap, WorldMapPoint, WorldMapCountryTable, Button, Checkbox, DateSelector, Form, FormResponse, ImageInput, InputResponse, InputLabel, Input, InputFile, InputList, InputListGroup, MultiImageInput, Radio, StarRatingInput, Select, Switch, Tags, TextArea, Backdrop, Skeleton, Toast, sendToast, Transition, ContentArea, Sidebar, Flex, FlexCol, FlexRow, Grid, Layout, Header, Content, Footer, MarkdownEditor, MarkdownViewer, Breadcrumb, BreadcrumbItem, Drawer, DrawerToggler, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemTitle, FooterNavItemContext, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemTitle, HeaderNavItemContext, Link, Menu, MenuGroup, MenuItem, MenuItemTitle, RouteTab, RouteTabs, Modal, UnderConstructionBanner, Accordion, Card, CardHeader, CardContent, CardFooter, ThemeContext, ThemeProvider, ThemeSwitch, AsyncComponentWrapper, ShowMore, };
67
+ export { Avatar, Badge, TitleBanner, Brand, BarChart, LineChart, PieChart, Chip, Flag, Image, CloudinaryImage, Info, List, ListItem, PriceTag, StarRating, StarRatingDistribution, Slider, Table, TableColumnConfig, Tag, Tooltip, Typography, Chapter, Section, Paragraph, Quote, ValueBadge, YoutubeVideoPlayer, WorldMap, WorldMapPoint, WorldMapCountryTable, Button, Checkbox, DateSelector, Form, FormResponse, ImageInput, InputResponse, InputLabel, Input, InputFile, InputList, InputListGroup, MultiImageInput, Radio, StarRatingInput, Select, Switch, Tags, TextArea, Backdrop, Skeleton, Toast, sendToast, Transition, ContentArea, Sidebar, Flex, FlexCol, FlexRow, Grid, Layout, Header, Content, Footer, MarkdownEditor, MarkdownViewer, Breadcrumb, BreadcrumbItem, Drawer, DrawerToggler, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemTitle, FooterNavItemContext, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemTitle, HeaderNavItemContext, Link, Menu, MenuGroup, MenuItem, MenuItemTitle, RouteTab, RouteTabs, Modal, UnderConstructionBanner, Accordion, Card, CardHeader, CardContent, CardFooter, ThemeContext, ThemeProvider, ThemeSwitch, AsyncComponentWrapper, ShowMore, };
@@ -22,10 +22,9 @@ export declare enum TextVariant {
22
22
  }
23
23
  export declare enum Shape {
24
24
  circle = "circle",
25
- square = "square",
26
25
  roundedSquare = "roundedSquare",
27
26
  softRoundedSquare = "softRoundedSquare",
28
- pill = "pill"
27
+ square = "square"
29
28
  }
30
29
  export declare enum Size {
31
30
  xs = "xs",
@@ -1,5 +1,6 @@
1
- export declare const COUNTRY_COORDINATES: Record<string, [number, number]>;
1
+ export declare const COUNTRY_CODES: Record<string, string>;
2
2
  export declare const COUNTRY_NAMES: Record<string, string>;
3
+ export declare const COUNTRY_COORDINATES: Record<string, [number, number]>;
3
4
  export declare const COUNTRIES: {
4
5
  code: string;
5
6
  name: string;
@@ -1,4 +1,4 @@
1
- export declare const currencies: {
1
+ export declare const CURRENCIES: {
2
2
  name: string;
3
3
  symbol: string;
4
4
  code: string;
@@ -65,3 +65,9 @@ export declare const targets: {
65
65
  parent: string;
66
66
  top: string;
67
67
  };
68
+ export declare const shapes: {
69
+ square: string;
70
+ roundedSquare: string;
71
+ softRoundedSquare: string;
72
+ circle: string;
73
+ };
@@ -0,0 +1,7 @@
1
+ import img_animals from "./img_animals.jpg";
2
+ import img_fruits from "./img_fruits.jpg";
3
+ import img_mountains from "./img_mountains.jpg";
4
+ import img_vehicles from "./img_vehicles.jpg";
5
+ import img_trees from "./img_trees.jpg";
6
+ import img_flowers from "./img_flowers.jpg";
7
+ export { img_animals, img_fruits, img_mountains, img_vehicles, img_trees, img_flowers, };
@@ -0,0 +1,7 @@
1
+ export type User = {
2
+ name: string;
3
+ age: number;
4
+ profile: string;
5
+ id: string;
6
+ };
7
+ export declare const userData: User[];