@appquality/unguess-design-system 2.4.0 → 2.5.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.
- package/CHANGELOG.md +54 -0
- package/build/hooks/useWindowSize.d.ts +4 -0
- package/build/index.d.ts +18 -0
- package/build/index.js +633 -160
- package/build/stories/avatar/_types.d.ts +2 -0
- package/build/stories/avatar/index.stories.d.ts +2 -5
- package/build/stories/counter/_types.d.ts +5 -0
- package/build/stories/counter/index.d.ts +13 -0
- package/build/stories/counter/index.stories.d.ts +15 -0
- package/build/stories/dropdowns/multiselect/index.stories.d.ts +1 -1
- package/build/stories/dropdowns/select/index.d.ts +2 -2
- package/build/stories/dropdowns/select/index.stories.d.ts +2 -2
- package/build/stories/icons/_types.d.ts +7 -0
- package/build/stories/icons/index.d.ts +4 -0
- package/build/stories/icons/index.stories.d.ts +6 -0
- package/build/stories/login-form/_types.d.ts +4 -0
- package/build/stories/logo/_types.d.ts +9 -0
- package/build/stories/logo/index.d.ts +13 -0
- package/build/stories/logo/index.stories.d.ts +6 -0
- package/build/stories/modals/_types.d.ts +34 -0
- package/build/stories/modals/index.d.ts +10 -0
- package/build/stories/modals/index.stories.d.ts +19 -0
- package/build/stories/navigation/app-header/_types.d.ts +17 -0
- package/build/stories/navigation/app-header/index.d.ts +8 -0
- package/build/stories/navigation/app-header/index.stories.d.ts +6 -0
- package/build/stories/navigation/body/_types.d.ts +5 -0
- package/build/stories/navigation/body/index.d.ts +7 -0
- package/build/stories/navigation/chrome/_types.d.ts +7 -0
- package/build/stories/navigation/chrome/index.d.ts +10 -0
- package/build/stories/navigation/content/_types.d.ts +2 -0
- package/build/stories/navigation/content/index.d.ts +7 -0
- package/build/stories/navigation/header/_types.d.ts +5 -0
- package/build/stories/navigation/header/header-item/_types.d.ts +32 -0
- package/build/stories/navigation/header/header-item/brandItem.d.ts +4 -0
- package/build/stories/navigation/header/header-item/headerItem.d.ts +4 -0
- package/build/stories/navigation/header/header-item/headerItemIcon.d.ts +4 -0
- package/build/stories/navigation/header/header-item/headerItemText.d.ts +4 -0
- package/build/stories/navigation/header/header-item/index.d.ts +5 -0
- package/build/stories/navigation/header/header-item/utils.d.ts +13 -0
- package/build/stories/navigation/header/index.d.ts +13 -0
- package/build/stories/navigation/main/_types.d.ts +2 -0
- package/build/stories/navigation/main/index.d.ts +7 -0
- package/build/stories/navigation/nav/_types.d.ts +5 -0
- package/build/stories/navigation/nav/index.d.ts +10 -0
- package/build/stories/navigation/nav/nav-item/_types.d.ts +29 -0
- package/build/stories/navigation/nav/nav-item/index.d.ts +7 -0
- package/build/stories/navigation/nav/nav-item/navDivider.d.ts +4 -0
- package/build/stories/navigation/nav/nav-item/navItem.d.ts +4 -0
- package/build/stories/navigation/nav/nav-item/navItemIcon.d.ts +4 -0
- package/build/stories/navigation/nav/nav-item/navItemProject.d.ts +8 -0
- package/build/stories/navigation/nav/nav-item/navItemText.d.ts +4 -0
- package/build/stories/navigation/nav/nav-item/navToggle.d.ts +4 -0
- package/build/stories/navigation/sidebar/_types.d.ts +15 -0
- package/build/stories/navigation/sidebar/index.d.ts +10 -0
- package/build/stories/navigation/sidebar/index.stories.d.ts +9 -0
- package/build/stories/page/index.d.ts +8 -0
- package/build/stories/page/index.stories.d.ts +6 -0
- package/build/stories/table/_types.d.ts +10 -2
- package/build/stories/table/index.d.ts +3 -2
- package/build/stories/table/index.stories.d.ts +8 -0
- package/package.json +5 -3
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
3
|
import { AvatarArgs } from "./_types";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
export declare const Default: Story<AvatarProps>;
|
|
8
|
-
export declare const Square: Story<AvatarProps>;
|
|
4
|
+
export declare const Default: Story<AvatarArgs>;
|
|
5
|
+
export declare const Square: Story<AvatarArgs>;
|
|
9
6
|
declare const _default: ComponentMeta<{
|
|
10
7
|
(props: AvatarArgs): JSX.Element;
|
|
11
8
|
Text: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CounterArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* Counter let users categorize content using a keyword.
|
|
5
|
+
*/
|
|
6
|
+
declare const Counter: {
|
|
7
|
+
(props: CounterArgs): JSX.Element;
|
|
8
|
+
Avatar: {
|
|
9
|
+
(props: import("react").HTMLAttributes<HTMLElement>): JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export { Counter };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { CounterArgs } from "./_types";
|
|
4
|
+
interface TagStoryProps extends CounterArgs {
|
|
5
|
+
hasAvatar: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const Default: Story<TagStoryProps>;
|
|
8
|
+
declare const _default: ComponentMeta<{
|
|
9
|
+
(props: CounterArgs): JSX.Element;
|
|
10
|
+
Avatar: {
|
|
11
|
+
(props: import("react").HTMLAttributes<HTMLElement>): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
3
|
import { MultiselectArgs } from "./_types";
|
|
4
|
-
import { MenuArgs } from "
|
|
4
|
+
import { MenuArgs } from "../menu/_types";
|
|
5
5
|
import { DropdownArgs } from "../select/_types";
|
|
6
6
|
interface IItem {
|
|
7
7
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
2
|
import { SelectArgs, DropdownArgs, MessageArgs } from "./_types";
|
|
3
3
|
/**
|
|
4
4
|
* Select allows a user to pick one option from a list. This helps simplify the UI when space is limited
|
|
@@ -11,6 +11,6 @@ import { SelectArgs, DropdownArgs, MessageArgs } from "./_types";
|
|
|
11
11
|
- To select from a list on mobile, use a native Select instead
|
|
12
12
|
*/
|
|
13
13
|
declare const Select: (props: SelectArgs) => JSX.Element;
|
|
14
|
-
declare const Dropdown: (props: DropdownArgs) => JSX.Element;
|
|
14
|
+
declare const Dropdown: (props: PropsWithChildren<DropdownArgs>) => JSX.Element;
|
|
15
15
|
declare const Message: (props: MessageArgs) => JSX.Element;
|
|
16
16
|
export { Select, Dropdown, Message };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
3
|
import { DropdownArgs, SelectArgs } from "./_types";
|
|
4
|
-
import { MenuArgs } from "
|
|
4
|
+
import { MenuArgs } from "../menu/_types";
|
|
5
5
|
interface IItem {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string;
|
|
@@ -16,5 +16,5 @@ interface MenuStoryArgs {
|
|
|
16
16
|
}
|
|
17
17
|
export declare const Default: Story<MenuStoryArgs>;
|
|
18
18
|
export declare const Validation: Story<MenuStoryArgs>;
|
|
19
|
-
declare const _default: ComponentMeta<(props: DropdownArgs) => JSX.Element>;
|
|
19
|
+
declare const _default: ComponentMeta<(props: import("react").PropsWithChildren<DropdownArgs>) => JSX.Element>;
|
|
20
20
|
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { IconArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<IconArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<(props: IconArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -12,6 +12,10 @@ export interface LoginFormArgs {
|
|
|
12
12
|
errors: FormikErrors<any>;
|
|
13
13
|
touched: FormikTouched<any>;
|
|
14
14
|
initialValues: LoginFields;
|
|
15
|
+
title: string;
|
|
16
|
+
buttonText: string;
|
|
17
|
+
placeholderEmail: string;
|
|
18
|
+
placeholderPassword: string;
|
|
15
19
|
}
|
|
16
20
|
export interface LoginFields {
|
|
17
21
|
email: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ImgHTMLAttributes } from 'react';
|
|
2
|
+
export interface LogoArgs extends ImgHTMLAttributes<HTMLImageElement> {
|
|
3
|
+
/** Specifies the kind of logo */
|
|
4
|
+
type: 'vertical' | 'horizontal' | 'icon';
|
|
5
|
+
/** Specifies the css class */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Sets the image dimension */
|
|
8
|
+
size?: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LogoArgs } from './_types';
|
|
3
|
+
/**
|
|
4
|
+
* A Logo is a visual way to represent a brand logo.
|
|
5
|
+
* <hr>
|
|
6
|
+
* Used for this:
|
|
7
|
+
* - To visually represent a brand or product
|
|
8
|
+
*
|
|
9
|
+
* Not for this:
|
|
10
|
+
* - To visually represent a common image
|
|
11
|
+
*/
|
|
12
|
+
declare const Logo: (props: LogoArgs) => JSX.Element;
|
|
13
|
+
export { Logo };
|
|
@@ -0,0 +1,6 @@
|
|
|
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<(props: LogoArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IModalProps } from "@zendeskgarden/react-modals";
|
|
2
|
+
import { KeyboardEvent, MouseEvent } from "react";
|
|
3
|
+
export interface ModalArgs extends IModalProps {
|
|
4
|
+
/**
|
|
5
|
+
* Handles close actions. Can be triggered from the backdrop and from the close icon.
|
|
6
|
+
*
|
|
7
|
+
* @param {Object} event The DOM event that triggered the close action
|
|
8
|
+
*/
|
|
9
|
+
onClose?: (event: KeyboardEvent | MouseEvent) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Centers the modal on the backdrop
|
|
12
|
+
*/
|
|
13
|
+
isCentered?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Animates the modal
|
|
16
|
+
*/
|
|
17
|
+
isAnimated?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Defines the DOM element that the modal will attatch to
|
|
20
|
+
*/
|
|
21
|
+
appendToNode?: Element;
|
|
22
|
+
/**
|
|
23
|
+
* Applies large styling
|
|
24
|
+
*/
|
|
25
|
+
isLarge?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Directs keyboard focus to the modal on mount
|
|
28
|
+
*/
|
|
29
|
+
focusOnMount?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Returns keyboard focus to the element that triggered the modal
|
|
32
|
+
*/
|
|
33
|
+
restoreFocus?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModalArgs } from "./_types";
|
|
3
|
+
declare const Modal: {
|
|
4
|
+
(props: ModalArgs): JSX.Element;
|
|
5
|
+
Header: import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-modals/dist/typings/elements/Header").IHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Body: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
7
|
+
Footer: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
};
|
|
9
|
+
declare const FooterItem: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
export { Modal, FooterItem };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModalArgs } from "./_types";
|
|
3
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
4
|
+
interface ModalStoryArgs extends ModalArgs {
|
|
5
|
+
content: string | any;
|
|
6
|
+
title: string;
|
|
7
|
+
isDanger?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const Default: Story<ModalStoryArgs>;
|
|
10
|
+
export declare const Danger: Story<ModalStoryArgs>;
|
|
11
|
+
export declare const Large: Story<ModalStoryArgs>;
|
|
12
|
+
export declare const WithCustomContent: Story<ModalStoryArgs>;
|
|
13
|
+
declare const _default: ComponentMeta<{
|
|
14
|
+
(props: ModalArgs): JSX.Element;
|
|
15
|
+
Header: import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-modals/dist/typings/elements/Header").IHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
Body: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
17
|
+
Footer: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BrandItemArgs } from "../header/header-item/_types";
|
|
2
|
+
import { AvatarArgs } from "../../avatar/_types";
|
|
3
|
+
import { HeaderArgs } from "../header/_types";
|
|
4
|
+
export interface AppHeaderArgs extends HeaderArgs {
|
|
5
|
+
/** Display the changelog trigger item */
|
|
6
|
+
hasChangelog?: boolean;
|
|
7
|
+
/** Triggered when the changelog is clicked */
|
|
8
|
+
onChangelogClick?: () => void;
|
|
9
|
+
/** Set Brand Item settings */
|
|
10
|
+
brand?: BrandItemArgs;
|
|
11
|
+
/** Set Avatar settings */
|
|
12
|
+
avatar?: AvatarArgs & {
|
|
13
|
+
onProfileModalToggle?: () => void;
|
|
14
|
+
};
|
|
15
|
+
/** Toggle Sidebar */
|
|
16
|
+
onSidebarMenuToggle?: () => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AppHeaderArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* An Header is a visual way to display general information.
|
|
5
|
+
* This can include navList Items, modal, profile settings.
|
|
6
|
+
*/
|
|
7
|
+
declare const AppHeader: ({ brand, avatar, ...args }: AppHeaderArgs) => JSX.Element;
|
|
8
|
+
export { AppHeader };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { AppHeaderArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<AppHeaderArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<({ brand, avatar, ...args }: AppHeaderArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IChromeProps } from '@zendeskgarden/react-chrome';
|
|
2
|
+
export interface ChromeArgs extends IChromeProps {
|
|
3
|
+
/** Applies a custom hue to the chrome navigation */
|
|
4
|
+
hue?: string;
|
|
5
|
+
/** Prevents fixed positioning from being applied to the `<html>` element */
|
|
6
|
+
isFluid?: boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChromeArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* The Chrome component provides a high-level layout structure and sets a framework for navigating around Zendesk products.
|
|
5
|
+
* <br>
|
|
6
|
+
* Used for this:
|
|
7
|
+
- To give a consistent dashboard and navigation experience
|
|
8
|
+
*/
|
|
9
|
+
declare const Chrome: (props: ChromeArgs) => JSX.Element;
|
|
10
|
+
export { Chrome };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from "react";
|
|
2
|
+
import { IHeaderItemProps, IHeaderItemTextProps } from "@zendeskgarden/react-chrome";
|
|
3
|
+
export interface HeaderItemArgs extends IHeaderItemProps {
|
|
4
|
+
/** Maximizes the width of a flex item in the header */
|
|
5
|
+
maxX?: boolean;
|
|
6
|
+
/** Maximizes the height of the item (i.e. contains a search input) */
|
|
7
|
+
maxY?: boolean;
|
|
8
|
+
/** Rounds the border radius of the item */
|
|
9
|
+
isRound?: boolean;
|
|
10
|
+
/** Applies header logo styles to the item */
|
|
11
|
+
hasLogo?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface BrandItemArgs extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
/** Maximizes the width of a flex item in the header */
|
|
15
|
+
maxX?: boolean;
|
|
16
|
+
/** Maximizes the height of the item (i.e. contains a search input) */
|
|
17
|
+
maxY?: boolean;
|
|
18
|
+
/** Rounds the border radius of the item */
|
|
19
|
+
isRound?: boolean;
|
|
20
|
+
/** Display a brand identity name */
|
|
21
|
+
brandName?: string;
|
|
22
|
+
/** Add a descriptive text to the menu item icon*/
|
|
23
|
+
menuLabel?: string;
|
|
24
|
+
/** Triggered when the menu item is clicked */
|
|
25
|
+
toggleMenu?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export interface HeaderItemTextArgs extends IHeaderItemTextProps {
|
|
28
|
+
/** Hides item text. Text remains accessible to screen readers. */
|
|
29
|
+
isClipped?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface HeaderItemIconArgs extends HTMLAttributes<HTMLDivElement> {
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ThemeProps } from "styled-components";
|
|
2
|
+
import { theme } from "../../../theme";
|
|
3
|
+
/**
|
|
4
|
+
* Get unitless line height based on the given pixel-valued height and font size.
|
|
5
|
+
*
|
|
6
|
+
* @param {string|number} height Desired line height in pixels.
|
|
7
|
+
* @param {string|number} fontSize Font size (in pixels) of text contained within the line.
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
*/
|
|
11
|
+
declare const getLineHeight: (height: string | number, fontSize: string | number) => number;
|
|
12
|
+
export declare const getNavWidth: (props: ThemeProps<typeof theme>) => string;
|
|
13
|
+
export { getLineHeight };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HeaderArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* An Header is a visual way to display general information.
|
|
5
|
+
* This can include navList Items, modal, profile settings.
|
|
6
|
+
*/
|
|
7
|
+
declare const Header: {
|
|
8
|
+
(props: HeaderArgs): JSX.Element;
|
|
9
|
+
HeaderItem: (props: import("./header-item/_types").HeaderItemArgs) => JSX.Element;
|
|
10
|
+
HeaderItemText: (props: import("./header-item/_types").HeaderItemTextArgs) => JSX.Element;
|
|
11
|
+
HeaderItemIcon: (props: import("react").PropsWithChildren<import("./header-item/_types").HeaderItemIconArgs>) => JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export { Header };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NavArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* The Nav component provides a high-level layout structure and sets a framework for navigating around dashboards.
|
|
5
|
+
* <br>
|
|
6
|
+
* Used for this:
|
|
7
|
+
- To give a consistent dashboard and navigation experience
|
|
8
|
+
*/
|
|
9
|
+
declare const Nav: (props: NavArgs) => JSX.Element;
|
|
10
|
+
export { Nav };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { INavItemProps, INavItemTextProps } from "@zendeskgarden/react-chrome";
|
|
2
|
+
import { HTMLAttributes, PropsWithChildren } from "react";
|
|
3
|
+
import { LabelArgs } from "../../../label/_types";
|
|
4
|
+
export interface NavItemArgs extends INavItemProps {
|
|
5
|
+
/** Indicates that the item is current in the nav */
|
|
6
|
+
isCurrent?: boolean;
|
|
7
|
+
/** Indicates that the item contains a product logo */
|
|
8
|
+
hasLogo?: boolean;
|
|
9
|
+
/** Indicates that the item contains the company brandmark */
|
|
10
|
+
hasBrandmark?: boolean;
|
|
11
|
+
/** Expands the nav area to display the item text */
|
|
12
|
+
isExpanded?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface NavItemTextArgs extends INavItemTextProps {
|
|
15
|
+
/** Wraps overflow item text instead of truncating long strings with an ellipsis **/
|
|
16
|
+
isWrapped?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface NavItemIconArgs extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
|
|
19
|
+
/** Indicates that the item is current in the nav */
|
|
20
|
+
isCurrent?: boolean;
|
|
21
|
+
/** Indicates that the item has a gradient style when selected */
|
|
22
|
+
isStyled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface NavToggleArgs extends NavItemIconArgs {
|
|
25
|
+
/** Expands the nav area to display the item text */
|
|
26
|
+
isExpanded?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface NavDividerArgs extends LabelArgs {
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NavItem } from "./navItem";
|
|
2
|
+
import { NavItemIcon } from "./navItemIcon";
|
|
3
|
+
import { NavItemText } from "./navItemText";
|
|
4
|
+
import { NavToggle } from "./navToggle";
|
|
5
|
+
import { NavDivider } from "./navDivider";
|
|
6
|
+
import { NavItemProject } from "./navItemProject";
|
|
7
|
+
export { NavItem, NavItemIcon, NavItemText, NavToggle, NavDivider, NavItemProject };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NavItemArgs } from "./_types";
|
|
3
|
+
declare const NavItemProject: {
|
|
4
|
+
(props: NavItemArgs): JSX.Element;
|
|
5
|
+
Title: (props: import("./_types").NavItemTextArgs) => JSX.Element;
|
|
6
|
+
SubTitle: import("styled-components").StyledComponent<(props: import("./_types").NavItemTextArgs) => JSX.Element, any, NavItemArgs, never>;
|
|
7
|
+
};
|
|
8
|
+
export { NavItemProject };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NavArgs } from "../nav/_types";
|
|
2
|
+
export interface SidebarArgs extends NavArgs {
|
|
3
|
+
projects?: Array<ProjectItem>;
|
|
4
|
+
currentRoute?: string;
|
|
5
|
+
homeItemLabel?: string;
|
|
6
|
+
dividerLabel?: string;
|
|
7
|
+
tokens?: string;
|
|
8
|
+
isExpanded?: boolean;
|
|
9
|
+
onToggleMenu?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface ProjectItem {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
campaigns: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SidebarArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* The UNGUESS Sidebar component provides a high-level layout structure and sets a framework for navigating around projects.
|
|
5
|
+
* <br>
|
|
6
|
+
* Used for this:
|
|
7
|
+
- To give a consistent dashboard and navigation experience
|
|
8
|
+
*/
|
|
9
|
+
declare const Sidebar: (props: SidebarArgs) => JSX.Element;
|
|
10
|
+
export { Sidebar };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { SidebarArgs } from "./_types";
|
|
4
|
+
interface SidebarStoryArgs extends SidebarArgs {
|
|
5
|
+
}
|
|
6
|
+
export declare const Default: Story<SidebarStoryArgs>;
|
|
7
|
+
export declare const WithTokens: Story<SidebarStoryArgs>;
|
|
8
|
+
declare const _default: ComponentMeta<(props: SidebarArgs) => JSX.Element>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SidebarArgs } from "../navigation/sidebar/_types";
|
|
3
|
+
import { AppHeaderArgs } from "../navigation/app-header/_types";
|
|
4
|
+
export interface PageTemplatesArgs {
|
|
5
|
+
sidebar?: SidebarArgs;
|
|
6
|
+
header?: AppHeaderArgs;
|
|
7
|
+
}
|
|
8
|
+
export declare const PageTemplate: ({ sidebar, header, ...args }: PageTemplatesArgs) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { PageTemplatesArgs } from ".";
|
|
4
|
+
export declare const Default: Story<PageTemplatesArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<({ sidebar, header, ...args }: PageTemplatesArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ITableProps, IRowProps, ICellProps, IHeaderCellProps } from "@zendeskgarden/react-tables";
|
|
2
|
-
import { SIZE } from "@zendeskgarden/react-tables/dist/typings/styled";
|
|
1
|
+
import { ITableProps, IRowProps, ICellProps, IHeaderCellProps, ISortableCellProps } from "@zendeskgarden/react-tables";
|
|
2
|
+
import { SIZE, SORT } from "@zendeskgarden/react-tables/dist/typings/styled";
|
|
3
3
|
export interface TableProps extends ITableProps {
|
|
4
4
|
/** Sets the table size */
|
|
5
5
|
size?: SIZE;
|
|
@@ -52,3 +52,11 @@ export interface HeadArgs extends ICellProps {
|
|
|
52
52
|
/** Adjusts the [width](https://developer.mozilla.org/en-US/docs/Web/CSS/width) of the cell */
|
|
53
53
|
width?: string | number;
|
|
54
54
|
}
|
|
55
|
+
export interface SortableCellArgs extends ISortableCellProps {
|
|
56
|
+
/** Sets the sort order */
|
|
57
|
+
sort?: SORT;
|
|
58
|
+
/** Sets the width of the cell */
|
|
59
|
+
width?: string | number;
|
|
60
|
+
/** Passes props to the cell */
|
|
61
|
+
cellProps?: any;
|
|
62
|
+
}
|