@typeolymp/ui-components 1.18.3 → 1.19.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.
package/README.md CHANGED
@@ -16,9 +16,9 @@ Open [http://localhost:6006](http://localhost:6006) with your browser to see the
16
16
  ## 👫 Contributing
17
17
  To contribute to the `ui-components` package, follow these step:
18
18
  1. **Clone the Repository:** Clone the [repository](https://github.com/TypeOlymp/ui-components) to your local machine.
19
- 3. **Create a Branch:** Create a new branch for your changes using a descriptive name: `git checkout -b feature/my-new-feature`.
20
- 4. **Make Changes:** Make your desired changes and improvements to the codebase.
21
- 5. **Commit Changes:** Commit your changes with a clear and concise commit message: `git commit -m "Add a new feature"`.
22
- 6. **Push Changes:** Push your changes to your development branch: `git push origin feature/my-new-feature`.
23
- 7. **Update the CHANGELOG:** Update the `CHANGELOG.md` file with the new changes.
24
- 8. **Open a Pull Request:** Visit the [repository](https://github.com/TypeOlymp/ui-components) and open a Pull Request. Describe your changes, and submit the pull request.
19
+ 2. **Create a Branch:** Create a new branch for your changes using a descriptive name: `git checkout -b feature/my-new-feature`.
20
+ 3. **Make Changes:** Make your desired changes and improvements to the codebase.
21
+ 4. **Commit Changes:** Commit your changes with a clear and concise commit message: `git commit -m "Add a new feature"`.
22
+ 5. **Push Changes:** Push your changes to your development branch: `git push origin feature/my-new-feature`.
23
+ 6. **Update the CHANGELOG:** Update the `CHANGELOG.md` file with the new changes.
24
+ 7. **Open a Pull Request:** Visit the [repository](https://github.com/TypeOlymp/ui-components) and open a Pull Request. Describe your changes, and submit the pull request.
@@ -0,0 +1,18 @@
1
+ import { FC } from "react";
2
+ import { Locale } from "@typeolymp/utils/enums";
3
+ declare type BasePropsType = {
4
+ title: string;
5
+ data: string[] | {
6
+ label: string;
7
+ value: string;
8
+ }[];
9
+ };
10
+ export declare type PropsType = (BasePropsType & {
11
+ onEdit?: never;
12
+ locale?: never;
13
+ }) | (BasePropsType & {
14
+ onEdit?(): void;
15
+ locale: Locale;
16
+ });
17
+ declare const DataSummary: FC<PropsType>;
18
+ export default DataSummary;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { PropsType } from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.FC<PropsType>;
6
+ };
7
+ export default _default;
8
+ export declare const Overview: () => JSX.Element;
9
+ export declare const Playground: {
10
+ (args: any): JSX.Element;
11
+ args: {};
12
+ argTypes: {};
13
+ };
@@ -0,0 +1,2 @@
1
+ export declare const Container: any;
2
+ export declare const Data: any;
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
  export declare type PropsType = {
3
- type: "check" | "chevronUp" | "chevronRight" | "chevronDown" | "chevronLeft" | "eye" | "eyeInvisible" | "warning" | "questionCircle" | "play" | "lock" | "cross" | "bulb" | "star" | "setting" | "reload" | "expand" | "calendar" | "plus" | "envelope" | "facebook" | "instagram" | "menuAlt" | "link" | "heart" | "thunder" | "fire" | "control" | "fileAdd" | "fileCheck" | "fileError" | "fileArrow" | "download" | "upload" | "dotsVertical" | "dotsHorizontal";
3
+ type: "check" | "chevronUp" | "chevronRight" | "chevronDown" | "chevronLeft" | "eye" | "eyeInvisible" | "warning" | "questionCircle" | "play" | "lock" | "cross" | "bulb" | "star" | "setting" | "reload" | "expand" | "calendar" | "plus" | "envelope" | "facebook" | "instagram" | "menuAlt" | "link" | "heart" | "thunder" | "fire" | "control" | "fileAdd" | "fileCheck" | "fileError" | "fileArrow" | "download" | "upload" | "dotsVertical" | "dotsHorizontal" | "bell";
4
4
  size?: "tiny" | "small" | "medium" | "large";
5
5
  color?: "blue" | "green" | "orange" | "red" | "purple" | "gray" | "darkGray" | "lightGray" | "white";
6
6
  onClick?(e?: MouseEvent): void;
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
  export declare type PropsType = {
3
- type: "keyboard" | "accuracy" | "speed" | "trophy" | "clipboard" | "rankings" | "lock" | "lockOpen" | "idCard" | "cookie" | "classroom" | "student" | "school" | "organisation" | "coach";
3
+ type: "keyboard" | "accuracy" | "speed" | "trophy" | "clipboard" | "rankings" | "lock" | "lockOpen" | "idCard" | "cookie" | "classroom" | "student" | "school" | "organisation" | "coach" | "certificate";
4
4
  size?: "tiny" | "small" | "medium" | "large";
5
5
  };
6
6
  declare const Illustration: FC<PropsType>;
@@ -1,14 +1,20 @@
1
1
  import { FC, ReactNode } from "react";
2
+ export declare type ColumnType = {
3
+ title?: string;
4
+ dataIndex: string;
5
+ render?(value: any, row: any): ReactNode;
6
+ align?: "left" | "right" | "center";
7
+ };
8
+ export declare type DataType = {
9
+ key: string;
10
+ [key: string]: any;
11
+ };
2
12
  export declare type PropsType = {
3
- columns: Array<{
4
- title?: string;
5
- dataIndex: string;
6
- render?(value: any, row: any): ReactNode;
7
- align?: "left" | "right" | "center";
8
- }>;
9
- data: Array<{
10
- [key: string]: any;
11
- }>;
13
+ columns: ColumnType[];
14
+ data: DataType[];
15
+ rowSelection?: {
16
+ onChange(selectedRowKeys: string[], selectedRowKey: string, selectedRows: DataType[], selectedRow: DataType): void;
17
+ };
12
18
  empytText?: string;
13
19
  };
14
20
  declare const Table: FC<PropsType>;
package/build/index.d.ts CHANGED
@@ -15,6 +15,7 @@ import Range from "./components/atoms/Range";
15
15
  import Select from "./components/atoms/Select";
16
16
  import Spacer from "./components/atoms/Spacer";
17
17
  import Subheading from "./components/atoms/Subheading";
18
+ import DataSummary from "./components/atoms/DataSummary";
18
19
  import Tag from "./components/atoms/Tag";
19
20
  import Toggle from "./components/atoms/Toggle";
20
21
  import Trophy from "./components/atoms/Trophy";
@@ -51,4 +52,4 @@ import Modal from "./components/organisms/Modal";
51
52
  import Result from "./components/organisms/Result";
52
53
  import Table from "./components/organisms/Table";
53
54
  import Transfer from "./components/organisms/Transfer";
54
- export { theme, Button, Checkbox, Flag, Heading, Icon, Illustration, Input, Logo, Medal, Number, Paragraph, Radio, Range, Select, Spacer, Subheading, Tag, Toggle, Trophy, Alert, Card, Checkboxes, Collapse, Countdown, DateInputField, Dropdown, FileUpload, IconButton, InputField, Key, Link, Loading, LocaleSelect, Medals, Notification, NumberField, PasswordInputField, Popup, ProgressBar, Steps, Tabs, RadioGroup, SelectField, ToggleField, Tooltip, Chart, Form, Keyboard, Modal, Result, Table, Transfer, };
55
+ export { theme, Button, Checkbox, Flag, Heading, Icon, Illustration, Input, Logo, Medal, Number, Paragraph, Radio, Range, Select, Spacer, Subheading, DataSummary, Tag, Toggle, Trophy, Alert, Card, Checkboxes, Collapse, Countdown, DateInputField, Dropdown, FileUpload, IconButton, InputField, Key, Link, Loading, LocaleSelect, Medals, Notification, NumberField, PasswordInputField, Popup, ProgressBar, Steps, Tabs, RadioGroup, SelectField, ToggleField, Tooltip, Chart, Form, Keyboard, Modal, Result, Table, Transfer, };