@pushwoosh/dumb-components 1.0.67 → 1.0.68

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 { type ReactElement } from 'react';
2
+ import type { EmptyPageProps } from './types';
3
+ export declare function EmptyPage(props: EmptyPageProps): ReactElement;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { Color } from '@pushwoosh/kit-constants';
3
+ import { Vertical } from '@pushwoosh/kit-helpers';
4
+ import { CheckRoundIcon } from '@pushwoosh/kit-icons';
5
+ import { H1, Paragraph } from '@pushwoosh/kit-typography';
6
+ import { RootBox, ContentBox, UnorderedList, UnorderedListItem, UnorderedListIcon, Image } from './styles';
7
+ export function EmptyPage(props) {
8
+ const {
9
+ title,
10
+ description,
11
+ checkList = [],
12
+ image,
13
+ actions
14
+ } = props;
15
+ return React.createElement(RootBox, null, React.createElement(ContentBox, null, React.createElement(Vertical, {
16
+ "$gap": 16
17
+ }, React.createElement(Vertical, {
18
+ "$gap": 4
19
+ }, React.createElement(H1, null, title), React.createElement(Paragraph, null, description)), !!checkList.length && React.createElement(UnorderedList, null, checkList.map(text => React.createElement(UnorderedListItem, {
20
+ key: `item-${text}`
21
+ }, React.createElement(UnorderedListIcon, null, React.createElement(CheckRoundIcon, {
22
+ color: Color.SUCCESS,
23
+ size: "small",
24
+ type: "fill",
25
+ view: "filled"
26
+ })), text)))), actions), React.createElement(Image, {
27
+ alt: title,
28
+ src: image
29
+ }));
30
+ }
@@ -0,0 +1,2 @@
1
+ export { EmptyPage } from './EmptyPage';
2
+ export type { EmptyPageProps } from './types';
@@ -0,0 +1 @@
1
+ export { EmptyPage } from './EmptyPage';
@@ -0,0 +1,6 @@
1
+ export declare const RootBox: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const ContentBox: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const UnorderedList: import("styled-components").StyledComponent<"ul", any, {}, never>;
4
+ export declare const UnorderedListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
5
+ export declare const UnorderedListIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const Image: import("styled-components").StyledComponent<"img", any, {}, never>;
@@ -0,0 +1,26 @@
1
+ import styled from 'styled-components';
2
+ import { UnitSize } from '@pushwoosh/kit-constants';
3
+ export const RootBox = styled.div.withConfig({
4
+ displayName: "RootBox",
5
+ componentId: "sc-rxhe82-0"
6
+ })(["display:flex;align-items:center;justify-content:center;width:", ";gap:40px;"], UnitSize.PAGE_WIDTH);
7
+ export const ContentBox = styled.div.withConfig({
8
+ displayName: "ContentBox",
9
+ componentId: "sc-rxhe82-1"
10
+ })(["display:flex;flex-direction:column;width:340px;gap:24px;"]);
11
+ export const UnorderedList = styled.ul.withConfig({
12
+ displayName: "UnorderedList",
13
+ componentId: "sc-rxhe82-2"
14
+ })(["display:flex;flex-direction:column;padding:0;margin:0;list-style:none;gap:8px;"]);
15
+ export const UnorderedListItem = styled.li.withConfig({
16
+ displayName: "UnorderedListItem",
17
+ componentId: "sc-rxhe82-3"
18
+ })(["display:flex;align-items:center;gap:8px;"]);
19
+ export const UnorderedListIcon = styled.div.withConfig({
20
+ displayName: "UnorderedListIcon",
21
+ componentId: "sc-rxhe82-4"
22
+ })(["display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:#64DB2C24;border-radius:50%;padding:4px;"]);
23
+ export const Image = styled.img.withConfig({
24
+ displayName: "Image",
25
+ componentId: "sc-rxhe82-5"
26
+ })(["max-width:380px;"]);
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface EmptyPageProps {
3
+ title: string;
4
+ description: string;
5
+ checkList: string[];
6
+ image: string;
7
+ actions: ReactNode;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
package/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export { Checkbox } from './Checkbox';
6
6
  export { Drawer, DrawerHeader, DrawerTitle, DrawerBody, DrawerDocs, useDocs, } from './Drawer';
7
7
  export { DatePicker, DatePickerField, DateTimePicker, DateTimePickerField, } from './DateTimePicker';
8
8
  export { DropdownMenu, DropdownMenuButton, DropdownMenuSection, DropdownMenuItem, } from './DropdownMenu';
9
+ export { EmptyPage } from './EmptyPage';
9
10
  export { EditableField } from './EditableField';
10
11
  export { InputFile } from './InputFile';
11
12
  export { Modal, ModalTitle, ModalConfirm, ModalConfirmProvider, useModalConfirm, ModalHeader, ModalBodyGroup, ModalBodyItem, ModalBody, ModalFooter, } from './Modal';
package/index.js CHANGED
@@ -6,6 +6,7 @@ export { Checkbox } from './Checkbox';
6
6
  export { Drawer, DrawerHeader, DrawerTitle, DrawerBody, DrawerDocs, useDocs } from './Drawer';
7
7
  export { DatePicker, DatePickerField, DateTimePicker, DateTimePickerField } from './DateTimePicker';
8
8
  export { DropdownMenu, DropdownMenuButton, DropdownMenuSection, DropdownMenuItem } from './DropdownMenu';
9
+ export { EmptyPage } from './EmptyPage';
9
10
  export { EditableField } from './EditableField';
10
11
  export { InputFile } from './InputFile';
11
12
  export { Modal, ModalTitle, ModalConfirm, ModalConfirmProvider, useModalConfirm, ModalHeader, ModalBodyGroup, ModalBodyItem, ModalBody, ModalFooter } from './Modal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",