math-main-components 0.0.221 → 0.0.225

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 (41) hide show
  1. package/dist/components/Checkbox/Checkbox.d.ts +1 -2
  2. package/dist/components/_custom/CardButton/CardButton.d.ts +7 -0
  3. package/dist/components/_custom/CardButton/CardButton.stories.d.ts +13 -0
  4. package/dist/components/_custom/CardButton/index.d.ts +1 -0
  5. package/dist/components/_custom/ChooseRole/ChooseRole.d.ts +11 -0
  6. package/dist/components/_custom/ChooseRole/ChooseRole.stories.d.ts +13 -0
  7. package/dist/components/_custom/ChooseRole/index.d.ts +1 -0
  8. package/dist/components/_custom/CopyCode/CopyCode.d.ts +5 -0
  9. package/dist/components/_custom/CopyCode/CopyCode.stories.d.ts +13 -0
  10. package/dist/components/_custom/CopyCode/index.d.ts +1 -0
  11. package/dist/components/_custom/EmptyCard/EmptyCard.stories.d.ts +13 -0
  12. package/dist/components/_custom/EmptyCard/index.d.ts +8 -0
  13. package/dist/components/_custom/NumberDropdown/NumberDropdown.stories.d.ts +19 -0
  14. package/dist/components/_custom/NumberDropdown/index.d.ts +12 -0
  15. package/dist/components/_custom/NumberField/NumberField.stories.d.ts +13 -0
  16. package/dist/components/_custom/NumberField/index.d.ts +17 -0
  17. package/dist/components/_custom/OptionField/OptionField.d.ts +7 -0
  18. package/dist/components/_custom/OptionField/OptionField.stories.d.ts +13 -0
  19. package/dist/components/_custom/OptionField/index.d.ts +1 -0
  20. package/dist/components/_custom/OptionField2/OptionField2.d.ts +7 -0
  21. package/dist/components/_custom/OptionField2/OptionField2.stories.d.ts +13 -0
  22. package/dist/components/_custom/OptionField2/index.d.ts +1 -0
  23. package/dist/components/_custom/Popover/index.d.ts +6 -0
  24. package/dist/components/_custom/SearchChips/SearchChips.d.ts +11 -0
  25. package/dist/components/_custom/SearchChips/Searchbar.stories.d.ts +13 -0
  26. package/dist/components/_custom/SearchChips/index.d.ts +1 -0
  27. package/dist/components/_custom/SelectFileCard/SelectFileCard.stories.d.ts +11 -0
  28. package/dist/components/_custom/SelectFileCard/index.d.ts +8 -0
  29. package/dist/components/_custom/Table/Table.d.ts +29 -0
  30. package/dist/components/_custom/Table/Table.stories.d.ts +26 -0
  31. package/dist/components/_custom/Table/index.d.ts +1 -0
  32. package/dist/components/_custom/TextWithIcon/TextWithIcon.d.ts +5 -0
  33. package/dist/components/_custom/TextWithIcon/TextWithIcon.stories.d.ts +11 -0
  34. package/dist/components/_custom/TextWithIcon/index.d.ts +1 -0
  35. package/dist/components/_custom/UsageCard/UsageCard.d.ts +7 -0
  36. package/dist/components/_custom/UsageCard/UsageCard.stories.d.ts +11 -0
  37. package/dist/components/_custom/UsageCard/index.d.ts +1 -0
  38. package/dist/index.cjs.js +342 -340
  39. package/dist/index.d.ts +14 -14
  40. package/dist/index.esm.js +342 -340
  41. package/package.json +1 -1
@@ -1,8 +1,7 @@
1
1
  import React, { ChangeEvent, HTMLAttributes, ReactNode } from 'react';
2
- export declare function Checkbox({ id, name, checked, defaultChecked, onInput, children, ...props }: {
2
+ export declare function Checkbox({ id, name, defaultChecked, onInput, children, ...props }: {
3
3
  id?: string;
4
4
  name: string;
5
- checked?: boolean;
6
5
  onInput?: (event: ChangeEvent<HTMLInputElement>) => void;
7
6
  defaultChecked?: boolean;
8
7
  children: ReactNode;
@@ -0,0 +1,7 @@
1
+ import React, { MouseEvent } from 'react';
2
+ export declare function CardButton({ id, children, iconName, onClick, ...props }: {
3
+ id?: string;
4
+ children: React.ReactNode;
5
+ iconName: string;
6
+ onClick?: (event: MouseEvent<HTMLDivElement>) => {};
7
+ } & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { CardButton } from '.';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof CardButton;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { CardButton } from './CardButton';
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export type ChooseRoleItem = {
3
+ title: string;
4
+ value: string;
5
+ };
6
+ export declare function ChooseRole({ roles, defaultSelected, readOnly, onChange }: {
7
+ readOnly?: boolean;
8
+ roles: ChooseRoleItem[];
9
+ defaultSelected: string;
10
+ onChange: (item: string) => void;
11
+ }): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { ChooseRole } from '.';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof ChooseRole;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { ChooseRole, type ChooseRoleItem } from './ChooseRole';
@@ -0,0 +1,5 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ export declare function CopyCode({ code, onCopy, ...props }: {
3
+ code: string;
4
+ onCopy?: () => void;
5
+ } & HTMLAttributes<HTMLDivElement>): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { CopyCode } from '.';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof CopyCode;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { CopyCode } from './CopyCode';
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { EmptyCard } from '.';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof EmptyCard;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare function EmptyCard({ title, subtitle, iconName, button, onClick }: {
3
+ title?: string;
4
+ subtitle?: string;
5
+ iconName?: string;
6
+ button?: string;
7
+ onClick?: () => void;
8
+ }): React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import type { StoryObj } from '@storybook/react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: <Type extends string>({ options, unit, defaultValue, onChangeDropdown, onChangeInput, ...props }: {
6
+ options: import(".").NumberDropdownOption<Type>[];
7
+ defaultValue: Type;
8
+ onChangeDropdown?: ((oldValue: Type, newValue: Type) => void) | undefined;
9
+ onChangeInput?: ((value: number) => void) | undefined;
10
+ unit?: string | undefined;
11
+ } & import("react").InputHTMLAttributes<HTMLInputElement>) => import("react").JSX.Element;
12
+ parameters: {
13
+ layout: string;
14
+ };
15
+ tags: string[];
16
+ };
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+ export declare const Primary: Story;
@@ -0,0 +1,12 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ export type NumberDropdownOption<Type> = {
3
+ value: Type;
4
+ label: string;
5
+ };
6
+ export declare const NumberDropdown: <Type extends string>({ options, unit, defaultValue, onChangeDropdown, onChangeInput, ...props }: {
7
+ options: NumberDropdownOption<Type>[];
8
+ defaultValue: Type;
9
+ onChangeDropdown?: ((oldValue: Type, newValue: Type) => void) | undefined;
10
+ onChangeInput?: ((value: number) => void) | undefined;
11
+ unit?: string | undefined;
12
+ } & React.InputHTMLAttributes<HTMLInputElement>) => React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { NumberField } from '.';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof NumberField;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1,17 @@
1
+ import React, { HTMLInputTypeAttribute } from 'react';
2
+ export declare function NumberField<Type>({ placeholder, type, active, onChangeActive, enableLocked, locked, onChangeLocked, title, unit, name, defaultValue, onUpdate, disabled, min, max, validate, ...props }: {
3
+ placeholder?: string;
4
+ type?: HTMLInputTypeAttribute;
5
+ title?: string;
6
+ unit?: string;
7
+ active?: boolean;
8
+ onChangeActive?: (active: boolean) => void;
9
+ name: Type;
10
+ defaultValue?: number;
11
+ disabled?: boolean;
12
+ enableLocked?: boolean;
13
+ locked?: boolean;
14
+ onChangeLocked?: (locked: boolean) => void;
15
+ onUpdate?: (value: number) => void;
16
+ validate?: (name: Type, value: number) => boolean;
17
+ } & React.InputHTMLAttributes<HTMLInputElement>): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare function OptionField({ id, headline, description, iconName }: {
3
+ id?: string;
4
+ headline: string;
5
+ description: string;
6
+ iconName?: string;
7
+ }): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { OptionField } from './OptionField';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof OptionField;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { OptionField } from './OptionField';
@@ -0,0 +1,7 @@
1
+ import React, { MouseEvent } from 'react';
2
+ export declare function OptionField2({ title, iconName, onClick, preselected }: {
3
+ title: string;
4
+ iconName?: string;
5
+ onClick?: (event: MouseEvent<HTMLDivElement>) => void;
6
+ preselected?: boolean;
7
+ }): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { OptionField2 } from './OptionField2';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof OptionField2;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { OptionField2 } from './OptionField2';
@@ -0,0 +1,6 @@
1
+ import React, { ReactNode } from 'react';
2
+ export declare function Popover({ children, active, onClose }: {
3
+ children: ReactNode;
4
+ active: boolean;
5
+ onClose?: () => void;
6
+ }): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export type SearchChip = {
3
+ title: string;
4
+ value: string;
5
+ selected: boolean;
6
+ };
7
+ export declare function SearchChips({ items, onChange, chipsVisible }: {
8
+ items: SearchChip[];
9
+ onChange?: (chips: SearchChip[]) => void;
10
+ chipsVisible?: number;
11
+ }): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { SearchChips } from './SearchChips';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof SearchChips;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { SearchChips, type SearchChip } from './SearchChips';
@@ -0,0 +1,11 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { SelectFileCard } from '.';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof SelectFileCard;
6
+ parameters: {};
7
+ tags: string[];
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const Primary: Story;
@@ -0,0 +1,8 @@
1
+ import React, { CSSProperties, HTMLAttributes } from 'react';
2
+ export declare function SelectFileCard({ accept, maxSize, onFileSelected, onFileTooLarge, ...props }: {
3
+ style?: CSSProperties;
4
+ accept?: string;
5
+ maxSize?: number;
6
+ onFileSelected: (file: File) => void;
7
+ onFileTooLarge?: () => void;
8
+ } & HTMLAttributes<HTMLFormElement>): React.JSX.Element;
@@ -0,0 +1,29 @@
1
+ import React, { MouseEvent, ReactNode } from 'react';
2
+ export type TableActionType = "red" | "default";
3
+ export type TableItem<DataType> = {
4
+ title: string;
5
+ subtitle?: string;
6
+ moreText?: string;
7
+ iconName?: string;
8
+ data: DataType;
9
+ };
10
+ export type TableItemAction<DataType> = {
11
+ title: string;
12
+ iconName: string;
13
+ onClick: (event: MouseEvent<HTMLDivElement>, item: TableItem<DataType>, index: number) => void;
14
+ type: TableActionType;
15
+ };
16
+ export declare function Table<DataType>({ items, title, actions, moreActions, selected, style, marginTop, width, emptyTitle, emptySubtitle, emptyIconName, enableEmptyCard }: {
17
+ items: TableItem<DataType>[];
18
+ title: string;
19
+ selected?: number;
20
+ style?: "default" | "blue";
21
+ width?: string;
22
+ actions?: TableItemAction<DataType>[];
23
+ moreActions?: ((data: DataType, index: number) => ReactNode)[];
24
+ marginTop?: number;
25
+ emptyTitle?: string;
26
+ emptySubtitle?: string;
27
+ emptyIconName?: string;
28
+ enableEmptyCard?: boolean;
29
+ }): React.JSX.Element;
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import type { StoryObj } from '@storybook/react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ items, title, actions, moreActions, selected, style, marginTop, width, emptyTitle, emptySubtitle, emptyIconName, enableEmptyCard }: {
6
+ items: import("./Table").TableItem<null>[];
7
+ title: string;
8
+ selected?: number | undefined;
9
+ style?: "blue" | "default" | undefined;
10
+ width?: string | undefined;
11
+ actions?: import("./Table").TableItemAction<null>[] | undefined;
12
+ moreActions?: ((data: null, index: number) => import("react").ReactNode)[] | undefined;
13
+ marginTop?: number | undefined;
14
+ emptyTitle?: string | undefined;
15
+ emptySubtitle?: string | undefined;
16
+ emptyIconName?: string | undefined;
17
+ enableEmptyCard?: boolean | undefined;
18
+ }) => import("react").JSX.Element;
19
+ parameters: {
20
+ layout: string;
21
+ };
22
+ tags: string[];
23
+ };
24
+ export default meta;
25
+ type Story = StoryObj<typeof meta>;
26
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { Table, type TableActionType, type TableItem, type TableItemAction } from './Table';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare function TextWithIcon({ iconName, label, }: {
3
+ iconName: string;
4
+ label: string;
5
+ }): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { TextWithIcon } from './TextWithIcon';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof TextWithIcon;
6
+ parameters: {};
7
+ tags: string[];
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { TextWithIcon } from './TextWithIcon';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare function UsageCard({ title, subtitle, ratio, loading }: {
3
+ title?: string;
4
+ subtitle?: string;
5
+ ratio?: number;
6
+ loading?: boolean;
7
+ }): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { UsageCard } from './UsageCard';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof UsageCard;
6
+ parameters: {};
7
+ tags: string[];
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { UsageCard } from './UsageCard';