@appquality/unguess-design-system 2.3.0 → 2.4.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/build/index.d.ts +31 -1
  3. package/build/index.js +486 -19
  4. package/build/stories/accordions/index.stories.d.ts +1 -0
  5. package/build/stories/avatar/index.d.ts +1 -1
  6. package/build/stories/dropdowns/field/_types.d.ts +2 -0
  7. package/build/stories/dropdowns/field/index.d.ts +4 -0
  8. package/build/stories/dropdowns/item/_types.d.ts +9 -0
  9. package/build/stories/dropdowns/item/index.d.ts +4 -0
  10. package/build/stories/dropdowns/menu/_types.d.ts +31 -0
  11. package/build/stories/dropdowns/menu/index.d.ts +7 -0
  12. package/build/stories/dropdowns/multiselect/_types.d.ts +17 -0
  13. package/build/stories/dropdowns/multiselect/index.d.ts +11 -0
  14. package/build/stories/dropdowns/multiselect/index.stories.d.ts +21 -0
  15. package/build/stories/dropdowns/select/_types.d.ts +5 -1
  16. package/build/stories/dropdowns/select/index.d.ts +16 -0
  17. package/build/stories/dropdowns/select/index.stories.d.ts +20 -0
  18. package/build/stories/{field → forms/field}/_types.d.ts +0 -0
  19. package/build/stories/{field → forms/field}/index.d.ts +0 -0
  20. package/build/stories/{field → forms/field}/index.stories.d.ts +0 -0
  21. package/build/stories/forms/radio/_types.d.ts +3 -0
  22. package/build/stories/forms/radio/index.d.ts +14 -0
  23. package/build/stories/forms/radio/index.stories.d.ts +7 -0
  24. package/build/stories/forms/textarea/_types.d.ts +15 -0
  25. package/build/stories/forms/textarea/index.d.ts +10 -0
  26. package/build/stories/forms/textarea/index.stories.d.ts +8 -0
  27. package/build/stories/forms/toggle/_types.d.ts +3 -0
  28. package/build/stories/forms/toggle/index.d.ts +13 -0
  29. package/build/stories/forms/toggle/index.stories.d.ts +10 -0
  30. package/build/stories/login-form/_types.d.ts +23 -0
  31. package/build/stories/login-form/index.d.ts +10 -0
  32. package/build/stories/login-form/index.stories.d.ts +7 -0
  33. package/build/stories/logo/_types.d.ts +14 -0
  34. package/build/stories/logo/index.d.ts +27 -0
  35. package/build/stories/logo/index.stories.d.ts +19 -0
  36. package/build/stories/pagination/_types.d.ts +34 -0
  37. package/build/stories/pagination/index.d.ts +17 -0
  38. package/build/stories/pagination/index.stories.d.ts +7 -0
  39. package/build/stories/table/_types.d.ts +54 -0
  40. package/build/stories/table/index.d.ts +21 -0
  41. package/build/stories/table/index.stories.d.ts +32 -0
  42. package/build/stories/tags/_types.d.ts +17 -0
  43. package/build/stories/tags/index.d.ts +22 -0
  44. package/build/stories/tags/index.stories.d.ts +19 -0
  45. package/build/stories/theme/gradients.d.ts +4 -0
  46. package/build/stories/theme/index.d.ts +155 -11
  47. package/build/stories/theme/palette.d.ts +141 -0
  48. package/build/stories/theme/palette.stories.d.ts +15 -0
  49. package/build/stories/theme/utils.d.ts +1 -0
  50. package/build/stories/tiles/_types.d.ts +12 -0
  51. package/build/stories/tiles/index.d.ts +22 -0
  52. package/build/stories/tiles/index.stories.d.ts +25 -0
  53. package/build/stories/trigger/_types.d.ts +3 -0
  54. package/build/stories/trigger/index.d.ts +7 -0
  55. package/build/stories/typography/paragraph/{ordered.stories.d.ts → index.stories.d.ts} +0 -0
  56. package/build/stories/typography/span/_types.d.ts +13 -0
  57. package/build/stories/typography/span/index.d.ts +13 -0
  58. package/build/stories/typography/span/index.stories.d.ts +6 -0
  59. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ItemArgs } from "./_types";
3
+ declare const Item: (props: ItemArgs) => JSX.Element;
4
+ export { Item };
@@ -0,0 +1,31 @@
1
+ import { IMenuProps } from "@zendeskgarden/react-dropdowns";
2
+ export interface MenuArgs extends IMenuProps {
3
+ /**
4
+ * Allows the menu to reposition during browser resize events
5
+ */
6
+ eventsEnabled?: boolean;
7
+ /**
8
+ * Sets the `z-index` of the menu
9
+ */
10
+ zIndex?: number;
11
+ /**
12
+ * Adjusts the placement of the menu
13
+ */
14
+ placement?: 'auto' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'end' | 'end-top' | 'end-bottom' | 'start' | 'start-top' | 'start-bottom';
15
+ /**
16
+ * Animates the menu
17
+ */
18
+ isAnimated?: boolean;
19
+ /**
20
+ * Applies compact styling
21
+ */
22
+ isCompact?: boolean;
23
+ /**
24
+ * Attaches an arrow that points towards the menu trigger
25
+ */
26
+ hasArrow?: boolean;
27
+ /**
28
+ * Sets the `max-height` of the menu
29
+ */
30
+ maxHeight?: string;
31
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { MenuArgs } from "./_types";
3
+ /**
4
+ * A Menu is a wrapper for items elements
5
+ **/
6
+ declare const Menu: (props: MenuArgs) => JSX.Element;
7
+ export { Menu };
@@ -0,0 +1,17 @@
1
+ import { IMultiselectProps } from "@zendeskgarden/react-dropdowns";
2
+ export interface MultiselectArgs extends IMultiselectProps {
3
+ /** Applies compact styling */
4
+ isCompact?: boolean;
5
+ /** Removes borders and padding */
6
+ isBare?: boolean;
7
+ /** Indicates that the element is not interactive */
8
+ disabled?: boolean;
9
+ /** Applies inset `box-shadow` styling on focus */
10
+ focusInset?: boolean;
11
+ /** Defines text that appears in the element when no items are selected */
12
+ placeholder?: string;
13
+ /** Defines the element's validation state */
14
+ validation?: "success" | "warning" | "error";
15
+ /** Determines the maximum number of items displayed while collapsed */
16
+ maxItems?: number;
17
+ }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { MultiselectArgs } from "./_types";
3
+ /**
4
+ * Multiselect lets users select multiple items from a list. Options are dynamically filtered as a user types in the input field and their selections appear as tags in the input field.
5
+ * <hr>
6
+ * Used for this:
7
+ - To choose multiple items from a list of options
8
+ - To filter through a set of data by typing
9
+ */
10
+ declare const Multiselect: (props: MultiselectArgs) => JSX.Element;
11
+ export { Multiselect };
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { MultiselectArgs } from "./_types";
4
+ import { MenuArgs } from "../../menu/_types";
5
+ import { DropdownArgs } from "../select/_types";
6
+ interface IItem {
7
+ label: string;
8
+ value: string;
9
+ }
10
+ interface MenuStoryArgs {
11
+ dropdown: DropdownArgs;
12
+ menu: MenuArgs;
13
+ items: Array<IItem>;
14
+ select: MultiselectArgs;
15
+ validation?: "success" | "warning" | "error";
16
+ hasHelpText?: boolean;
17
+ }
18
+ export declare const Default: Story<MenuStoryArgs>;
19
+ export declare const Validation: Story<MenuStoryArgs>;
20
+ declare const _default: ComponentMeta<(props: MultiselectArgs) => JSX.Element>;
21
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { IDropdownProps, ISelectProps } from "@zendeskgarden/react-dropdowns";
1
+ import { IDropdownProps, ISelectProps, IMessageProps } from "@zendeskgarden/react-dropdowns";
2
2
  export interface DropdownArgs extends IDropdownProps {
3
3
  /** Opens the dropdown */
4
4
  isOpen?: boolean;
@@ -25,3 +25,7 @@ export interface SelectArgs extends ISelectProps {
25
25
  /** Defines the icon rendered before the element's content */
26
26
  start?: any;
27
27
  }
28
+ export interface MessageArgs extends IMessageProps {
29
+ /** Applies styles based on validation state */
30
+ validation?: 'success' | 'warning' | 'error';
31
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { SelectArgs, DropdownArgs, MessageArgs } from "./_types";
3
+ /**
4
+ * Select allows a user to pick one option from a list. This helps simplify the UI when space is limited
5
+ * <hr>
6
+ * Used for this:
7
+ - To make a selection from a list of options
8
+ * Not for this:
9
+ - To filter a large list of options, use Autocomplete instead
10
+ - To make multiple selections from a list, use Multiselect instead
11
+ - To select from a list on mobile, use a native Select instead
12
+ */
13
+ declare const Select: (props: SelectArgs) => JSX.Element;
14
+ declare const Dropdown: (props: DropdownArgs) => JSX.Element;
15
+ declare const Message: (props: MessageArgs) => JSX.Element;
16
+ export { Select, Dropdown, Message };
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { DropdownArgs, SelectArgs } from "./_types";
4
+ import { MenuArgs } from "../../menu/_types";
5
+ interface IItem {
6
+ label: string;
7
+ value: string;
8
+ }
9
+ interface MenuStoryArgs {
10
+ dropdown: DropdownArgs;
11
+ menu: MenuArgs;
12
+ items: Array<IItem>;
13
+ select: SelectArgs;
14
+ validation?: "success" | "warning" | "error";
15
+ hasHelpText?: boolean;
16
+ }
17
+ export declare const Default: Story<MenuStoryArgs>;
18
+ export declare const Validation: Story<MenuStoryArgs>;
19
+ declare const _default: ComponentMeta<(props: DropdownArgs) => JSX.Element>;
20
+ export default _default;
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ import { IRadioProps } from "@zendeskgarden/react-forms";
2
+ export interface RadioArgs extends IRadioProps {
3
+ }
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { RadioArgs } from "./_types";
3
+ /**
4
+ * Radio buttons let users choose a single option among two or more mutually exclusive options.
5
+ * <hr>
6
+ * Used for this:
7
+ * - For choices or options that can't occur at the same time
8
+ * - To indicate that two or more options are mutually exclusive
9
+ * Not for this:
10
+ * - If the user can choose more than one option at once, use a Checkbox instead
11
+ * - To select from a long list of options, use Select instead
12
+ **/
13
+ declare const Radio: (props: RadioArgs) => JSX.Element;
14
+ export { Radio };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { RadioArgs } from "./_types";
4
+ export declare const Default: Story<RadioArgs>;
5
+ export declare const Checked: Story<RadioArgs>;
6
+ declare const _default: ComponentMeta<(props: RadioArgs) => JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { ITextareaProps } from "@zendeskgarden/react-forms";
2
+ export interface TextareaArgs extends ITextareaProps {
3
+ /** Removes borders and padding */
4
+ isBare?: boolean;
5
+ /** Applies inset `box-shadow` styling on focus */
6
+ focusInset?: boolean;
7
+ /** Enables manual vertical resize */
8
+ isResizable?: boolean;
9
+ /** Defines the minimum height in rows */
10
+ minRows?: number;
11
+ /** Defines the maximum height in rows */
12
+ maxRows?: number;
13
+ /** Applies validation state styling */
14
+ validation?: 'success' | 'warning' | 'error';
15
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { TextareaArgs } from "./_types";
3
+ /**
4
+ * A Textarea is a form control for multi-line text.
5
+ * <hr>
6
+ * Used for this:
7
+ * - To enter multi-line text
8
+ **/
9
+ declare const Textarea: (props: TextareaArgs) => JSX.Element;
10
+ export { Textarea };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { TextareaArgs } from "./_types";
4
+ export declare const Default: Story<TextareaArgs>;
5
+ export declare const Warning: Story<TextareaArgs>;
6
+ export declare const Resize: Story<TextareaArgs>;
7
+ declare const _default: ComponentMeta<(props: TextareaArgs) => JSX.Element>;
8
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { IToggleProps } from "@zendeskgarden/react-forms";
2
+ export interface ToggleArgs extends IToggleProps {
3
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { ToggleArgs } from "./_types";
3
+ /**
4
+ * A Toggle lets users turn something on and off like a light switch. Unlike a Checkbox, which is used for selection, a Toggle is used for activation.
5
+ * <hr>
6
+ * Used for this:
7
+ * - To see or compare the results of a settings change
8
+ * - To activate a mode (such as "dark mode") which takes immediate effect
9
+ * Not for this:
10
+ * - To let users select from a list of settings, use Checkboxes instead
11
+ **/
12
+ declare const Toggle: (props: ToggleArgs) => JSX.Element;
13
+ export { Toggle };
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { LabelArgs } from "../../label/_types";
4
+ import { ToggleArgs } from "./_types";
5
+ interface ToggleStoryProps extends ToggleArgs {
6
+ label: LabelArgs;
7
+ }
8
+ export declare const Default: Story<ToggleStoryProps>;
9
+ declare const _default: ComponentMeta<(props: ToggleArgs) => JSX.Element>;
10
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { FormikTouched, FormikErrors, FormikValues } from "formik";
2
+ export interface LoginFormArgs {
3
+ /**
4
+ * Handles accordion expansion changes
5
+ *
6
+ * @param {number} index A section index
7
+ */
8
+ onSubmit: (values: FormikValues, actions: any) => void | Promise<any> | any;
9
+ onBlur?: (formData: any) => void;
10
+ validate?: (values: FormikValues) => void | object | Promise<FormikErrors<LoginFields>>;
11
+ validateOnChange: boolean;
12
+ errors: FormikErrors<any>;
13
+ touched: FormikTouched<any>;
14
+ initialValues: LoginFields;
15
+ title: string;
16
+ buttonText: string;
17
+ placeholderEmail: string;
18
+ placeholderPassword: string;
19
+ }
20
+ export interface LoginFields {
21
+ email: string;
22
+ password: string;
23
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { LoginFormArgs } from "./_types";
3
+ /**
4
+ * Login Form
5
+ * <hr>
6
+ * Used for this:
7
+ - Login user to the application
8
+ */
9
+ declare const LoginForm: (props: LoginFormArgs) => JSX.Element;
10
+ export { LoginForm };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { LoginFormArgs } from "./_types";
4
+ export declare const Default: Story<LoginFormArgs>;
5
+ export declare const Filled: Story<LoginFormArgs>;
6
+ declare const _default: ComponentMeta<(props: LoginFormArgs) => JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { ImgHTMLAttributes } from 'react';
2
+ export interface LogoArgs extends ImgHTMLAttributes<HTMLImageElement> {
3
+ /** Specifies the kind of logo */
4
+ type: Type;
5
+ /** Specifies the css class */
6
+ className: string;
7
+ /** Sets the image dimension */
8
+ size: number;
9
+ }
10
+ export declare enum Type {
11
+ vertical = "vertical",
12
+ horizontal = "horizontal",
13
+ icon = "icon"
14
+ }
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from "prop-types";
3
+ import { LogoArgs, Type } from './_types';
4
+ /**
5
+ * A Logo is a visual way to represent a brand logo.
6
+ * <hr>
7
+ * Used for this:
8
+ * - To visually represent a brand or product
9
+ *
10
+ * Not for this:
11
+ * - To visually represent a common image
12
+ */
13
+ declare const Logo: {
14
+ (props: LogoArgs): JSX.Element;
15
+ propTypes: {
16
+ type: PropTypes.Requireable<string>;
17
+ className: PropTypes.Requireable<string>;
18
+ size: PropTypes.Requireable<number>;
19
+ };
20
+ defaultProps: {
21
+ type: Type;
22
+ size: number;
23
+ style: {};
24
+ className: string;
25
+ };
26
+ };
27
+ export { Logo };
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { LogoArgs } from "./_types";
4
+ export declare const Default: Story<LogoArgs>;
5
+ declare const _default: ComponentMeta<{
6
+ (props: LogoArgs): JSX.Element;
7
+ propTypes: {
8
+ type: import("prop-types").Requireable<string>;
9
+ className: import("prop-types").Requireable<string>;
10
+ size: import("prop-types").Requireable<number>;
11
+ };
12
+ defaultProps: {
13
+ type: import("./_types").Type;
14
+ size: number;
15
+ style: {};
16
+ className: string;
17
+ };
18
+ }>;
19
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { IPaginationProps, PAGE_TYPE } from "@zendeskgarden/react-pagination";
2
+ export interface PaginationProps extends IPaginationProps {
3
+ /**
4
+ * Sets the current page. Pages start at 1.
5
+ */
6
+ currentPage: number;
7
+ /**
8
+ * Defines the total number of pages
9
+ */
10
+ totalPages: number;
11
+ /**
12
+ * Sets the number of pages that appear between the current page and a gap indicator
13
+ */
14
+ pagePadding?: number;
15
+ /**
16
+ * Positions the leading and trailing gap indicator, based on
17
+ * the current and total pages
18
+ */
19
+ pageGap?: number;
20
+ /**
21
+ * Handles page change events
22
+ *
23
+ * @param {any} currentPage The current page
24
+ */
25
+ onChange?: (currentPage: number) => void;
26
+ /**
27
+ * Applies localized labels, test attributes, etc. to individual pages
28
+ *
29
+ * @param {string} pageType The type of the page accepting the props; one of:
30
+ * "previous", "gap", "page", "next"
31
+ * @param {any} props Default page props to transform
32
+ */
33
+ transformPageProps?: (pageType: PAGE_TYPE, props: any) => any;
34
+ }
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { PaginationProps } from './_types';
3
+ /**
4
+ * Pagination separates content into pages and allows users to navigate between those pages.
5
+
6
+ * Used for this:
7
+ - To divide large amounts of data into manageable chunks
8
+
9
+ */
10
+ declare const Pagination: (props: PaginationProps) => JSX.Element;
11
+ declare const CursorPagination: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>> & {
12
+ First: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
13
+ Last: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
14
+ Next: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
15
+ Previous: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
16
+ };
17
+ export { Pagination, CursorPagination };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { PaginationProps } from "./_types";
4
+ export declare const CursorPagination: Story<PaginationProps>;
5
+ export declare const NumberedPagination: Story<PaginationProps>;
6
+ declare const _default: ComponentMeta<(props: PaginationProps) => JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,54 @@
1
+ import { ITableProps, IRowProps, ICellProps, IHeaderCellProps } from "@zendeskgarden/react-tables";
2
+ import { SIZE } from "@zendeskgarden/react-tables/dist/typings/styled";
3
+ export interface TableProps extends ITableProps {
4
+ /** Sets the table size */
5
+ size?: SIZE;
6
+ /** Removes interactive styling from table rows */
7
+ isReadOnly?: boolean;
8
+ }
9
+ export interface HeaderCellArgs extends IHeaderCellProps {
10
+ /** Applies striped styling */
11
+ isStriped?: boolean;
12
+ /** @ignore Applies focus styling */
13
+ isFocused?: boolean;
14
+ /** @ignore Applies hover styling */
15
+ isHovered?: boolean;
16
+ /** Applies selected styling */
17
+ isSelected?: boolean;
18
+ }
19
+ export interface RowArgs extends IRowProps {
20
+ /** Applies striped styling */
21
+ isStriped?: boolean;
22
+ /** @ignore Applies focus styling */
23
+ isFocused?: boolean;
24
+ /** @ignore Applies hover styling */
25
+ isHovered?: boolean;
26
+ /** Applies selected styling */
27
+ isSelected?: boolean;
28
+ }
29
+ export interface CellArgs extends ICellProps {
30
+ /**
31
+ * Applies minimum fixed width styling (e.g. for cells that contain
32
+ * checkboxes or icons)
33
+ */
34
+ isMinimum?: boolean;
35
+ /** Truncates long text with an ellipsis */
36
+ isTruncated?: boolean;
37
+ /** Applies styling for a cell that contains an overflow menu */
38
+ hasOverflow?: boolean;
39
+ /** Adjusts the [width](https://developer.mozilla.org/en-US/docs/Web/CSS/width) of the cell */
40
+ width?: string | number;
41
+ }
42
+ export interface HeadArgs extends ICellProps {
43
+ /**
44
+ * Applies minimum fixed width styling (e.g. for cells that contain
45
+ * checkboxes or icons)
46
+ */
47
+ isMinimum?: boolean;
48
+ /** Truncates long text with an ellipsis */
49
+ isTruncated?: boolean;
50
+ /** Applies styling for a cell that contains an overflow menu */
51
+ hasOverflow?: boolean;
52
+ /** Adjusts the [width](https://developer.mozilla.org/en-US/docs/Web/CSS/width) of the cell */
53
+ width?: string | number;
54
+ }
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { CellArgs, HeaderCellArgs, RowArgs, TableProps } from './_types';
3
+ /**
4
+ * A Table organizes data into columns and rows. Tables make it easier for users to compare and analyze information.
5
+
6
+ * Used for this:
7
+ - To organize and display read-only data with logical relationships
8
+
9
+ * Not for this:
10
+ - To structure content on a page, use the Grid component instead
11
+ */
12
+ declare const Table: (props: TableProps) => JSX.Element;
13
+ declare const Head: (props: HTMLAttributes<HTMLTableSectionElement>) => JSX.Element;
14
+ declare const HeaderRow: (props: RowArgs) => JSX.Element;
15
+ declare const HeaderCell: (props: HeaderCellArgs) => JSX.Element;
16
+ declare const Body: (props: HTMLAttributes<HTMLTableSectionElement>) => JSX.Element;
17
+ declare const Row: (props: RowArgs) => JSX.Element;
18
+ declare const Cell: (props: CellArgs) => JSX.Element;
19
+ declare const GroupRow: (props: RowArgs) => JSX.Element;
20
+ declare const Caption: (props: HTMLAttributes<HTMLTableCaptionElement>) => JSX.Element;
21
+ export { Table, Head, HeaderRow, HeaderCell, Body, Row, Cell, GroupRow, Caption };
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { TableProps } from "./_types";
4
+ interface IRow {
5
+ id?: number | string;
6
+ groupName?: string;
7
+ fruit?: string;
8
+ sunExposure?: string;
9
+ soil?: string;
10
+ selected?: boolean;
11
+ }
12
+ interface TableStoryArg extends TableProps {
13
+ columns: Array<string>;
14
+ items: Array<IRow>;
15
+ isStriped?: boolean;
16
+ hasCaption?: boolean;
17
+ isTruncated?: boolean;
18
+ }
19
+ export declare const Default: Story<TableStoryArg>;
20
+ export declare const Grouped: Story<TableStoryArg>;
21
+ export declare const WithPagination: Story<TableStoryArg>;
22
+ /** STRIPED */
23
+ export declare const Striped: Story<TableStoryArg>;
24
+ /** WITH CAPTION */
25
+ export declare const WithCaption: Story<TableStoryArg>;
26
+ /** TRUNCATED */
27
+ export declare const Truncated: Story<TableStoryArg>;
28
+ export declare const Scroll: Story<TableStoryArg>;
29
+ export declare const Selection: Story<TableStoryArg>;
30
+ export declare const VirtualScrolling: Story<TableStoryArg>;
31
+ declare const _default: ComponentMeta<(props: TableProps) => JSX.Element>;
32
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { ITagProps } from '@zendeskgarden/react-tags';
2
+ export interface TagArgs extends ITagProps {
3
+ /** Adjusts font size and padding */
4
+ size?: 'small' | 'medium' | 'large';
5
+ /**
6
+ * Sets the color of the tag. Refer to
7
+ * [PALETTE](/components/palette#palette)
8
+ * for available colors. Accepts any hex value.
9
+ */
10
+ hue?: string;
11
+ /** Applies pill styling */
12
+ isPill?: boolean;
13
+ /** Applies styles to round the tag */
14
+ isRound?: boolean;
15
+ /** Applies regular (non-bold) font weight */
16
+ isRegular?: boolean;
17
+ }
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { TagArgs } from "./_types";
3
+ /**
4
+ * Tags let users categorize content using a keyword.
5
+
6
+ * Used for this:
7
+ - To add metadata to an element such as category, attribute, or property
8
+ - To communicate status
9
+ - To represent parameters of a filter
10
+
11
+ * Not for this:
12
+ - To prompt an action by the user, use a Button instead
13
+ */
14
+ declare const Tag: {
15
+ (props: TagArgs): JSX.Element;
16
+ Avatar: {
17
+ (props: import("react").HTMLAttributes<HTMLElement>): JSX.Element;
18
+ displayName: string;
19
+ };
20
+ Close: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
21
+ };
22
+ export { Tag };
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { TagArgs } from "./_types";
4
+ interface TagStoryProps extends TagArgs {
5
+ canBeClosed: boolean;
6
+ hasAvatar: boolean;
7
+ }
8
+ export declare const Default: Story<TagStoryProps>;
9
+ export declare const Avatar: Story<TagStoryProps>;
10
+ export declare const Close: Story<TagStoryProps>;
11
+ declare const _default: ComponentMeta<{
12
+ (props: TagArgs): JSX.Element;
13
+ Avatar: {
14
+ (props: import("react").HTMLAttributes<HTMLElement>): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ Close: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
18
+ }>;
19
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export declare const gradients: {
2
+ horizontal: string;
3
+ dark: string;
4
+ };