@appquality/unguess-design-system 2.6.2 → 2.8.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/.github/workflows/storybook.yml +2 -2
- package/CHANGELOG.md +40 -0
- package/build/index.d.ts +62 -60
- package/build/index.js +583 -195
- package/build/stories/campaignCards/_types.d.ts +6 -2
- package/build/stories/dropdowns/menu/_types.d.ts +17 -1
- package/build/stories/dropdowns/menu/index.d.ts +10 -3
- package/build/stories/dropdowns/menu/index.stories.d.ts +6 -0
- package/build/stories/navigation/app-header/_types.d.ts +3 -3
- package/build/stories/profile-modal/UserContainer.d.ts +3 -0
- package/build/stories/profile-modal/_types.d.ts +41 -0
- package/build/stories/profile-modal/helpMenuItem.d.ts +18 -0
- package/build/stories/profile-modal/index.d.ts +11 -0
- package/build/stories/profile-modal/index.stories.d.ts +6 -0
- package/build/stories/profile-modal/languageMenuItem.d.ts +14 -0
- package/build/stories/profile-modal/menuItem.d.ts +11 -0
- package/build/stories/profile-modal/menuItemIcon.d.ts +9 -0
- package/build/stories/profile-modal/previousMenuButton.d.ts +3 -0
- package/build/stories/profile-modal/userMenu.d.ts +3 -0
- package/build/stories/profile-modal/utils.d.ts +1 -0
- package/build/stories/table/_types.d.ts +21 -0
- package/build/stories/table/grouped.d.ts +5 -0
- package/build/stories/table/index.d.ts +3 -4
- package/build/stories/table/index.stories.d.ts +10 -32
- package/build/stories/theme/mixins.d.ts +3 -0
- package/package.json +1 -1
|
@@ -12,11 +12,11 @@ export interface CampaignCardsProps extends CardProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* the main topic of the card
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
projectTitle: string;
|
|
16
16
|
/**
|
|
17
17
|
* a specification to the topic of the card
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
campaignTitle: string;
|
|
20
20
|
/**
|
|
21
21
|
* the status of the card,
|
|
22
22
|
* can be only
|
|
@@ -36,4 +36,8 @@ export interface CampaignCardsProps extends CardProps {
|
|
|
36
36
|
* if the value is not defined the pill text will not be shown
|
|
37
37
|
*/
|
|
38
38
|
pillText?: string;
|
|
39
|
+
/**
|
|
40
|
+
* this renders the new flag label
|
|
41
|
+
*/
|
|
42
|
+
labelNew?: string;
|
|
39
43
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMenuProps } from "@zendeskgarden/react-dropdowns";
|
|
1
|
+
import { IItemProps, IMenuProps } from "@zendeskgarden/react-dropdowns";
|
|
2
2
|
export interface MenuArgs extends IMenuProps {
|
|
3
3
|
/**
|
|
4
4
|
* Allows the menu to reposition during browser resize events
|
|
@@ -29,3 +29,19 @@ export interface MenuArgs extends IMenuProps {
|
|
|
29
29
|
*/
|
|
30
30
|
maxHeight?: string;
|
|
31
31
|
}
|
|
32
|
+
export interface PreviousItemArgs extends IItemProps {
|
|
33
|
+
/** Sets the value that is returned upon selection */
|
|
34
|
+
value?: any;
|
|
35
|
+
/** Indicates that the element is not interactive */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Applies danger styling */
|
|
38
|
+
isDanger?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface NextItemArgs extends IItemProps {
|
|
41
|
+
/** Sets the value that is returned upon selection */
|
|
42
|
+
value?: any;
|
|
43
|
+
/** Indicates that the element is not interactive */
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Applies danger styling */
|
|
46
|
+
isDanger?: boolean;
|
|
47
|
+
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { MenuArgs, NextItemArgs, PreviousItemArgs } from "./_types";
|
|
2
|
+
import { HTMLAttributes, LiHTMLAttributes } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* A Menu is a wrapper for items elements
|
|
5
5
|
**/
|
|
6
6
|
declare const Menu: (props: MenuArgs) => JSX.Element;
|
|
7
|
-
|
|
7
|
+
declare const PreviousItem: (props: PreviousItemArgs) => JSX.Element;
|
|
8
|
+
declare const Separator: (props: LiHTMLAttributes<HTMLLIElement>) => JSX.Element;
|
|
9
|
+
declare const NextItem: (props: NextItemArgs) => JSX.Element;
|
|
10
|
+
declare const ItemMeta: (props: HTMLAttributes<HTMLSpanElement>) => JSX.Element;
|
|
11
|
+
declare const MediaBody: (props: HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
12
|
+
declare const MediaFigure: (props: HTMLAttributes<Element>) => JSX.Element;
|
|
13
|
+
declare const MediaItem: (props: LiHTMLAttributes<HTMLLIElement>) => JSX.Element;
|
|
14
|
+
export { Menu, PreviousItem, Separator, NextItem, ItemMeta, MediaBody, MediaFigure, MediaItem };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from '@storybook/react';
|
|
3
|
+
export declare const Default: Story<any>;
|
|
4
|
+
export declare const Nested: Story<any>;
|
|
5
|
+
declare const _default: ComponentMeta<(props: import("./_types").MenuArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -9,9 +9,9 @@ export interface AppHeaderArgs extends HeaderArgs {
|
|
|
9
9
|
/** Set Brand Item settings */
|
|
10
10
|
brand?: BrandItemArgs;
|
|
11
11
|
/** Set Avatar settings */
|
|
12
|
-
avatar?: AvatarArgs
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
avatar?: AvatarArgs;
|
|
13
|
+
isProfileModalOpen?: boolean;
|
|
14
|
+
onProfileModalToggle?: () => void;
|
|
15
15
|
/** Toggle Sidebar */
|
|
16
16
|
onSidebarMenuToggle?: () => void;
|
|
17
17
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { LiHTMLAttributes } from "react";
|
|
2
|
+
import { NextItemArgs } from "../dropdowns/menu/_types";
|
|
3
|
+
import { ModalArgs } from "../modals/_types";
|
|
4
|
+
export interface ProfileModalArgs extends ModalArgs {
|
|
5
|
+
menuArgs: UserMenuArgs;
|
|
6
|
+
}
|
|
7
|
+
export interface MenuItemProps extends NextItemArgs {
|
|
8
|
+
selectedItem?: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
content?: any;
|
|
11
|
+
setActive: (item: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface Language {
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UserProfileProps {
|
|
18
|
+
name: string;
|
|
19
|
+
email: string;
|
|
20
|
+
picture?: string;
|
|
21
|
+
company?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UserMenuArgs extends LiHTMLAttributes<HTMLLIElement> {
|
|
24
|
+
user: UserProfileProps;
|
|
25
|
+
csm: UserProfileProps;
|
|
26
|
+
feedbackTitle?: string;
|
|
27
|
+
feedbackSubTitle?: string;
|
|
28
|
+
csmTitle?: string;
|
|
29
|
+
csmContactLabel?: string;
|
|
30
|
+
languageTitle?: string;
|
|
31
|
+
currentLanguageLabel?: string;
|
|
32
|
+
languages: {
|
|
33
|
+
[key: string]: Language;
|
|
34
|
+
};
|
|
35
|
+
currentLanguage: string;
|
|
36
|
+
logoutTitle?: string;
|
|
37
|
+
onSelectLanguage: (lang: string) => void;
|
|
38
|
+
onFeedbackClick: () => void;
|
|
39
|
+
onToggleChat: () => void;
|
|
40
|
+
onLogout: () => void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuItemProps } from "./_types";
|
|
3
|
+
interface HelpItemProps extends MenuItemProps {
|
|
4
|
+
title: string;
|
|
5
|
+
value: string;
|
|
6
|
+
contactLabel: string;
|
|
7
|
+
copyLabel?: string;
|
|
8
|
+
chatSupportLabel?: string;
|
|
9
|
+
/** Toggle Chat https://docs.customerly.io/api/is-it-possible-to-open-the-live-chat-directly-from-a-link-or-a-custom-button */
|
|
10
|
+
toggleChat: () => void;
|
|
11
|
+
csm: {
|
|
12
|
+
name: string;
|
|
13
|
+
email: string;
|
|
14
|
+
picture?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const HelpItem: (props: HelpItemProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProfileModalArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* Profile Modal
|
|
5
|
+
|
|
6
|
+
* Used for this:
|
|
7
|
+
- Show user main infos and actions
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
declare const ProfileModal: ({ menuArgs, ...args }: ProfileModalArgs) => JSX.Element;
|
|
11
|
+
export { ProfileModal };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { ProfileModalArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<ProfileModalArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<({ menuArgs, ...args }: ProfileModalArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Language, MenuItemProps } from "./_types";
|
|
3
|
+
interface LanguagesProps extends MenuItemProps {
|
|
4
|
+
title: string;
|
|
5
|
+
value: string;
|
|
6
|
+
languages: {
|
|
7
|
+
[key: string]: Language;
|
|
8
|
+
};
|
|
9
|
+
currentLanguage: string;
|
|
10
|
+
currentLanguageLabel?: string;
|
|
11
|
+
onSelectLanguage: (lang: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const LanguageItem: (props: LanguagesProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuItemProps } from "./_types";
|
|
3
|
+
export interface IStyledItemProps {
|
|
4
|
+
isFocused?: boolean;
|
|
5
|
+
isCompact?: boolean;
|
|
6
|
+
isDanger?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const MenuItemBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const MenuItem: ({ children, selectedItem, content, ...props }: MenuItemProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IStyledItemIconProps {
|
|
3
|
+
isCompact?: boolean;
|
|
4
|
+
isVisible?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const StyledMenuItemIcon: import("styled-components").StyledComponent<"div", any, IStyledItemIconProps, never>;
|
|
8
|
+
export declare const MenuItemIcon: (props: IStyledItemIconProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getInitials: (name: string) => string;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { ITableProps, IRowProps, ICellProps, IHeaderCellProps, ISortableCellProps } from "@zendeskgarden/react-tables";
|
|
2
2
|
import { SIZE, SORT } from "@zendeskgarden/react-tables/dist/typings/styled";
|
|
3
|
+
import { IconArgs } from "../icons/_types";
|
|
3
4
|
export interface TableProps extends ITableProps {
|
|
4
5
|
/** Sets the table size */
|
|
5
6
|
size?: SIZE;
|
|
6
7
|
/** Removes interactive styling from table rows */
|
|
7
8
|
isReadOnly?: boolean;
|
|
9
|
+
columns?: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
field: string;
|
|
12
|
+
}>;
|
|
13
|
+
items?: Array<IRow>;
|
|
14
|
+
groups?: Array<Group> | null;
|
|
15
|
+
isStriped?: boolean;
|
|
16
|
+
hasCaption?: boolean;
|
|
17
|
+
isTruncated?: boolean;
|
|
8
18
|
}
|
|
9
19
|
export interface HeaderCellArgs extends IHeaderCellProps {
|
|
10
20
|
/** Applies striped styling */
|
|
@@ -60,3 +70,14 @@ export interface SortableCellArgs extends ISortableCellProps {
|
|
|
60
70
|
/** Passes props to the cell */
|
|
61
71
|
cellProps?: any;
|
|
62
72
|
}
|
|
73
|
+
export interface IRow {
|
|
74
|
+
id?: number | string;
|
|
75
|
+
groupName?: string;
|
|
76
|
+
selected?: boolean;
|
|
77
|
+
[index: string]: any;
|
|
78
|
+
}
|
|
79
|
+
export interface Group {
|
|
80
|
+
groupName: string;
|
|
81
|
+
groupIcon: IconArgs["type"];
|
|
82
|
+
items: Array<IRow>;
|
|
83
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes } from
|
|
2
|
-
import { CellArgs, HeaderCellArgs, RowArgs, SortableCellArgs, TableProps } from
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { CellArgs, HeaderCellArgs, RowArgs, SortableCellArgs, TableProps } from "./_types";
|
|
3
3
|
/**
|
|
4
4
|
* A Table organizes data into columns and rows. Tables make it easier for users to compare and analyze information.
|
|
5
5
|
|
|
@@ -16,7 +16,6 @@ declare const HeaderCell: (props: HeaderCellArgs) => JSX.Element;
|
|
|
16
16
|
declare const Body: (props: HTMLAttributes<HTMLTableSectionElement>) => JSX.Element;
|
|
17
17
|
declare const Row: (props: RowArgs) => JSX.Element;
|
|
18
18
|
declare const Cell: (props: CellArgs) => JSX.Element;
|
|
19
|
-
declare const GroupRow: (props: RowArgs) => JSX.Element;
|
|
20
19
|
declare const Caption: (props: HTMLAttributes<HTMLTableCaptionElement>) => JSX.Element;
|
|
21
20
|
declare const SortableCell: (props: SortableCellArgs) => JSX.Element;
|
|
22
|
-
export { Table, Head, HeaderRow, HeaderCell, Body, Row, Cell,
|
|
21
|
+
export { Table, Head, HeaderRow, HeaderCell, Body, Row, Cell, Caption, SortableCell };
|
|
@@ -1,40 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
3
|
import { TableProps } from "./_types";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
groupName?: string;
|
|
8
|
-
fruit?: string;
|
|
9
|
-
sunExposure?: string;
|
|
10
|
-
soil?: string;
|
|
11
|
-
selected?: boolean;
|
|
12
|
-
}
|
|
13
|
-
interface Group {
|
|
14
|
-
groupName: string;
|
|
15
|
-
groupIcon: IconArgs["type"];
|
|
16
|
-
items: Array<IRow>;
|
|
17
|
-
}
|
|
18
|
-
interface TableStoryArg extends TableProps {
|
|
19
|
-
columns: Array<string>;
|
|
20
|
-
items: Array<IRow>;
|
|
21
|
-
groups: Array<Group> | null;
|
|
22
|
-
isStriped?: boolean;
|
|
23
|
-
hasCaption?: boolean;
|
|
24
|
-
isTruncated?: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare const Default: Story<TableStoryArg>;
|
|
27
|
-
export declare const Grouped: Story<TableStoryArg>;
|
|
28
|
-
export declare const WithPagination: Story<TableStoryArg>;
|
|
4
|
+
export declare const Default: Story<TableProps>;
|
|
5
|
+
export declare const Grouped: Story<TableProps>;
|
|
6
|
+
export declare const WithPagination: Story<TableProps>;
|
|
29
7
|
/** STRIPED */
|
|
30
|
-
export declare const Striped: Story<
|
|
8
|
+
export declare const Striped: Story<TableProps>;
|
|
31
9
|
/** WITH CAPTION */
|
|
32
|
-
export declare const WithCaption: Story<
|
|
10
|
+
export declare const WithCaption: Story<TableProps>;
|
|
33
11
|
/** TRUNCATED */
|
|
34
|
-
export declare const Truncated: Story<
|
|
35
|
-
export declare const Scroll: Story<
|
|
36
|
-
export declare const Selection: Story<
|
|
37
|
-
export declare const Sort: Story<
|
|
38
|
-
export declare const VirtualScrolling: Story<
|
|
12
|
+
export declare const Truncated: Story<TableProps>;
|
|
13
|
+
export declare const Scroll: Story<TableProps>;
|
|
14
|
+
export declare const Selection: Story<TableProps>;
|
|
15
|
+
export declare const Sort: Story<TableProps>;
|
|
16
|
+
export declare const VirtualScrolling: Story<TableProps>;
|
|
39
17
|
declare const _default: ComponentMeta<(props: TableProps) => JSX.Element>;
|
|
40
18
|
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const flexCenter: import("styled-components").FlattenSimpleInterpolation;
|
|
2
|
+
export declare const flexColumnCenter: import("styled-components").FlattenSimpleInterpolation;
|
|
3
|
+
export declare const flexStart: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|