@jobber/components 4.26.0 → 4.26.2

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,21 @@
1
+ import React from "react";
2
+ export interface DataListProps {
3
+ /**
4
+ * Tell the DataList if the data loading
5
+ * @default false
6
+ */
7
+ loading?: boolean;
8
+ items: any[];
9
+ /**
10
+ * Temporary prop for setting default state for if filters are applied
11
+ * @default false
12
+ */
13
+ filterApplied?: boolean;
14
+ children?: React.ReactElement | React.ReactElement[];
15
+ }
16
+ export declare const EMPTY_FILTER_RESULTS_MESSAGE = "No Results for Selected Filters";
17
+ export declare const EMPTY_FILTER_RESULTS_ACTION_LABEL = "Clear Filters";
18
+ export declare function DataList({ loading, items, filterApplied, children, }: DataListProps): JSX.Element;
19
+ export declare namespace DataList {
20
+ var EmptyState: typeof import("./components/EmptyState").EmptyState;
21
+ }
@@ -0,0 +1,6 @@
1
+ import { ComponentMeta, ComponentStory } from "@storybook/react";
2
+ import { DataList } from "./DataList";
3
+ declare const _default: ComponentMeta<typeof DataList>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof DataList>;
6
+ export declare const EmptyState: ComponentStory<typeof DataList>;
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { XOR } from "ts-xor";
3
+ import { ButtonProps } from "../../../Button";
4
+ interface ActionBase {
5
+ label: string;
6
+ }
7
+ interface AnchorAction extends ActionBase {
8
+ url: ButtonProps["url"];
9
+ }
10
+ interface LinkAction extends ActionBase {
11
+ to: ButtonProps["to"];
12
+ }
13
+ interface ClickAction extends ActionBase {
14
+ onClick: ButtonProps["onClick"];
15
+ }
16
+ export interface EmptyStateProps {
17
+ message: string;
18
+ action?: XOR<ClickAction, XOR<AnchorAction, LinkAction>>;
19
+ }
20
+ export declare function DataListEmptyState({ message, action }: EmptyStateProps): JSX.Element;
21
+ export {};
@@ -0,0 +1 @@
1
+ export { DataListEmptyState as EmptyState, EmptyStateProps, } from "./EmptyState";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.26.0",
3
+ "version": "4.26.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -83,5 +83,5 @@
83
83
  "> 1%",
84
84
  "IE 10"
85
85
  ],
86
- "gitHead": "19970bb0a29255bc0d1b7aad61997cae80d6b2e1"
86
+ "gitHead": "985a940e3f30d53ed2a8865692822be06c7ace9d"
87
87
  }