@soppiya/elementus 1.0.9 → 1.1.1

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.
@@ -0,0 +1,3 @@
1
+ import { FilterProps } from './filter.schema';
2
+ declare const Filters: ({ queryValue, queryPlaceholder, focused, filters, appliedFilters, onQueryChange, onClearAll, onQueryBlur, onQueryFocus, disabled, hideFilters, hideQueryField, disableQueryField, disableFilters, loading, children, onAddFilterClick }: FilterProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Filters;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { default as Filters } from './Filters';
3
+ declare const meta: Meta<any>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Filters>;
6
+ export declare const Default: Story;
@@ -0,0 +1,35 @@
1
+ export interface AppliedFilterInterface {
2
+ key: string;
3
+ label: string;
4
+ onRemove(): void;
5
+ }
6
+ export interface FilterInterface {
7
+ key: string;
8
+ label: string;
9
+ filter: React.ReactNode;
10
+ pinned?: boolean;
11
+ disabled?: boolean;
12
+ hideClearButton?: boolean;
13
+ suffix?: React.ReactNode;
14
+ hidden?: boolean;
15
+ onAction?: () => void;
16
+ }
17
+ export interface FilterProps {
18
+ queryValue?: string;
19
+ queryPlaceholder?: string;
20
+ focused?: boolean;
21
+ filters: FilterInterface[];
22
+ appliedFilters?: AppliedFilterInterface[];
23
+ onQueryChange?: (queryValue: string) => void;
24
+ onClearAll?: () => void;
25
+ onQueryBlur?: () => void;
26
+ onQueryFocus?: () => void;
27
+ disabled?: boolean;
28
+ hideFilters?: boolean;
29
+ hideQueryField?: boolean;
30
+ disableQueryField?: boolean;
31
+ disableFilters?: boolean;
32
+ loading?: boolean;
33
+ children?: React.ReactNode;
34
+ onAddFilterClick?: () => void;
35
+ }
@@ -0,0 +1 @@
1
+ export { default as Filters } from './Filters';
@@ -0,0 +1,6 @@
1
+ interface CreateNewViewProps {
2
+ disabled?: boolean;
3
+ onCreate?: (name: string) => void;
4
+ }
5
+ declare const CreateNewView: ({ disabled, onCreate }: CreateNewViewProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default CreateNewView;
@@ -0,0 +1,8 @@
1
+ interface DeleteViewProps {
2
+ name?: string;
3
+ index: number;
4
+ onAction?: () => void;
5
+ onDelete?: (index: number) => void;
6
+ }
7
+ declare const DeleteView: ({ name, index, onAction, onDelete }: DeleteViewProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default DeleteView;
@@ -0,0 +1,7 @@
1
+ interface CreateNewViewProps {
2
+ duplicateName?: string;
3
+ onAction?: () => void;
4
+ onDuplicate?: (name: string) => void;
5
+ }
6
+ declare const DuplicateView: ({ duplicateName, onAction, onDuplicate }: CreateNewViewProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default DuplicateView;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { FilterProps } from '../filters/filter.schema';
3
+ import { IndexSortingProps } from '../index-sorting/indexSorting.schema';
4
+ interface IndexFilterProps extends IndexSortingProps, FilterProps {
5
+ tabs: string[];
6
+ sortFilter?: React.ReactNode;
7
+ searchFilterBtn?: React.ReactNode;
8
+ selected: number;
9
+ canCreateNewView?: boolean;
10
+ disabled?: boolean;
11
+ onAction: () => void;
12
+ onSelect: (selectedTabIndex: number) => void;
13
+ onCreateNewView?: (name: string) => Promise<boolean>;
14
+ }
15
+ declare const IndexFilter: ({ tabs, sortFilter, searchFilterBtn, selected, onSelect, onAction, disabled, canCreateNewView, onCreateNewView, queryValue, queryPlaceholder, focused, filters, appliedFilters, onQueryChange, onClearAll, onQueryBlur, onQueryFocus, hideFilters, hideQueryField, disableFilters, loading, children, onAddFilterClick, choices, selectedOrder, defaultDirection, onChangeKey, onChangeDirection, }: IndexFilterProps) => import("react/jsx-runtime").JSX.Element;
16
+ export default IndexFilter;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { default as IndexFilter } from './IndexFilter';
3
+ declare const meta: Meta<any>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof IndexFilter>;
6
+ export declare const Default: Story;
@@ -0,0 +1,11 @@
1
+ interface IndexTabProps {
2
+ tabs: string[];
3
+ selected: number;
4
+ disabled?: boolean;
5
+ canCreateNewView?: boolean;
6
+ onSelect: (selectedTabIndex: number) => void;
7
+ onAction: () => void;
8
+ onCreateNewView?: (name: string) => Promise<boolean>;
9
+ }
10
+ declare const IndexTab: ({ tabs, selected, disabled, canCreateNewView, onSelect, onAction, onCreateNewView }: IndexTabProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default IndexTab;
@@ -0,0 +1,8 @@
1
+ interface CreateNewViewProps {
2
+ rename?: string;
3
+ disabled?: boolean;
4
+ onAction?: () => void;
5
+ onRename?: (name: string) => void;
6
+ }
7
+ declare const RenameView: ({ rename, disabled, onAction, onRename }: CreateNewViewProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default RenameView;
@@ -0,0 +1 @@
1
+ export { default as IndexFilter } from './IndexFilter';
@@ -0,0 +1,14 @@
1
+ export type TabAction = 'rename' | 'duplicate' | 'delete';
2
+ export interface TabActionDescriptor {
3
+ type: TabAction;
4
+ onAction?: (name: string) => void;
5
+ onPrimaryAction?: (name: string) => Promise<boolean> | void;
6
+ }
7
+ export interface TabProps {
8
+ onAction?: () => void;
9
+ id: string;
10
+ isLocked?: boolean;
11
+ content: string;
12
+ actions?: TabActionDescriptor[];
13
+ viewNames?: string[];
14
+ }
@@ -0,0 +1,3 @@
1
+ import { IndexSortingProps } from './indexSorting.schema';
2
+ declare const IndexSorting: ({ choices, selectedOrder, defaultDirection, disabled, onChangeKey, onChangeDirection, }: IndexSortingProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default IndexSorting;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { default as IndexSorting } from './IndexSorting';
3
+ declare const meta: Meta<any>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof IndexSorting>;
6
+ export declare const Default: Story;
@@ -0,0 +1 @@
1
+ export { default as IndexSorting } from './IndexSorting';
@@ -0,0 +1,16 @@
1
+ type SortValue = `${string} ${"asc" | "desc"}`;
2
+ export interface Choice {
3
+ label: string;
4
+ disabled?: boolean;
5
+ value: SortValue;
6
+ directionLabel: string;
7
+ }
8
+ export interface IndexSortingProps {
9
+ choices: Choice[];
10
+ selectedOrder: string;
11
+ defaultDirection?: string;
12
+ disabled?: boolean;
13
+ onChangeKey?: (key: string) => void;
14
+ onChangeDirection?: (direction: string) => void;
15
+ }
16
+ export {};
@@ -18,8 +18,11 @@ export { DropdownPagination } from './dropdownPagination';
18
18
  export { EdgeBlurWrapper } from './edgeBlurWrapper';
19
19
  export { EmptyState } from './emptyState';
20
20
  export { ExceptionList } from './exceptionList';
21
+ export { Filters } from './filters';
21
22
  export { Grid } from './grid';
22
23
  export { Image } from './image';
24
+ export { IndexFilter } from './index-filters';
25
+ export { IndexSorting } from './index-sorting';
23
26
  export { InlineStack } from './inlineStack';
24
27
  export { Input } from './input';
25
28
  export { List } from './list';
@@ -34,6 +37,7 @@ export { ProgressBar } from './progressBar';
34
37
  export { Radio } from './radio';
35
38
  export { Range } from './range';
36
39
  export { ResourceItem } from './resourceItem';
40
+ export { SectionHeading } from './section-heading';
37
41
  export { Select } from './select';
38
42
  export { SkeletonBodyText } from './skeletonBodyText';
39
43
  export { SkeletonDisplayText } from './skeletonDisplayText';
@@ -0,0 +1,24 @@
1
+ import { AllowedTextElementsProps, ColorProps, FontWeightProps, ResponsiveColorProps, ResponsiveFontWeightProps, ResponsiveTextAlignProps, ResponsiveTruncateProps, TextAlignProps, TruncateProps } from '../../utils/types/types';
2
+ /*************************
3
+ *Props
4
+ *************************/
5
+ interface SectionHeadingProps {
6
+ title?: string | React.ReactNode;
7
+ titleAlign?: ResponsiveTextAlignProps | TextAlignProps;
8
+ titleFontWeight?: ResponsiveFontWeightProps | FontWeightProps;
9
+ subTitle?: string | React.ReactNode;
10
+ subTitleAlign?: ResponsiveTextAlignProps | TextAlignProps;
11
+ titleTAs?: AllowedTextElementsProps;
12
+ subTitleColor?: ResponsiveColorProps | ColorProps;
13
+ titleButton?: React.ReactNode;
14
+ children_width?: "max-content" | "min-content" | "fit-content" | "auto";
15
+ gap?: string;
16
+ isInfoButton?: boolean;
17
+ infoButtonText?: string;
18
+ infoButtonUrl?: string;
19
+ children?: React.ReactNode;
20
+ titleTruncate?: ResponsiveTruncateProps | TruncateProps;
21
+ subTitleTruncate?: ResponsiveTruncateProps | TruncateProps;
22
+ }
23
+ declare const SectionHeading: ({ title, titleTAs, titleFontWeight, subTitle, isInfoButton, subTitleAlign, titleAlign, subTitleColor, titleButton, children, titleTruncate, subTitleTruncate }: SectionHeadingProps) => import("react/jsx-runtime").JSX.Element;
24
+ export default SectionHeading;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { default as SectionHeading } from './SectionHeading';
3
+ declare const meta: Meta<any>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SectionHeading>;
6
+ export declare const Default: Story;
@@ -0,0 +1 @@
1
+ export { default as SectionHeading } from './SectionHeading';