@appquality/unguess-design-system 0.3.5 → 2.2.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 +37 -0
- package/CHANGELOG.md +143 -0
- package/README.md +53 -26
- package/build/index.d.ts +8 -1
- package/build/index.js +93 -4
- package/build/stories/accordions/_types.d.ts +25 -0
- package/build/stories/accordions/index.d.ts +17 -0
- package/build/stories/accordions/index.stories.d.ts +20 -0
- package/build/stories/avatar/_types.d.ts +17 -0
- package/build/stories/avatar/index.d.ts +13 -0
- package/build/stories/avatar/index.stories.d.ts +13 -0
- package/build/stories/breadcrumbs/_types.d.ts +5 -0
- package/build/stories/breadcrumbs/index.d.ts +11 -0
- package/build/stories/breadcrumbs/index.stories.d.ts +6 -0
- package/build/stories/buttons/anchor/_types.d.ts +11 -0
- package/build/stories/buttons/anchor/index.d.ts +12 -0
- package/build/stories/buttons/anchor/index.stories.d.ts +8 -0
- package/build/stories/buttons/button/_types.d.ts +30 -0
- package/build/stories/buttons/button/index.d.ts +22 -0
- package/build/stories/buttons/button/index.stories.d.ts +19 -0
- package/build/stories/buttons/button-group/_types.d.ts +5 -0
- package/build/stories/buttons/button-group/index.d.ts +9 -0
- package/build/stories/buttons/button-group/index.stories.d.ts +15 -0
- package/build/stories/buttons/icon-button/_types.d.ts +19 -0
- package/build/stories/buttons/icon-button/index.d.ts +14 -0
- package/build/stories/buttons/icon-button/index.stories.d.ts +9 -0
- package/build/stories/buttons/shared/_shared.d.ts +2 -0
- package/build/stories/buttons/split-button/_types.d.ts +2 -0
- package/build/stories/buttons/split-button/index.d.ts +11 -0
- package/build/stories/buttons/split-button/index.stories.d.ts +6 -0
- package/build/stories/buttons/utils/useButtonVariant.d.ts +5 -0
- package/build/stories/cards/_types.d.ts +7 -0
- package/build/stories/cards/index.d.ts +10 -0
- package/build/stories/cards/index.stories.d.ts +11 -0
- package/build/stories/close/_types.d.ts +3 -0
- package/build/stories/close/index.d.ts +7 -0
- package/build/stories/close/index.stories.d.ts +6 -0
- package/build/stories/dropdowns/select/_types.d.ts +27 -0
- package/build/stories/dropdowns/select/index.d.ts +0 -0
- package/build/stories/dropdowns/select/index.stories.d.ts +0 -0
- package/build/stories/field/_types.d.ts +3 -0
- package/build/stories/field/index.d.ts +7 -0
- package/build/stories/field/index.stories.d.ts +6 -0
- package/build/stories/forms/checkbox/_types.d.ts +8 -0
- package/build/stories/forms/checkbox/index.d.ts +14 -0
- package/build/stories/forms/checkbox/index.stories.d.ts +6 -0
- package/build/stories/forms/input/_types.d.ts +9 -0
- package/build/stories/forms/input/index.d.ts +11 -0
- package/build/stories/forms/input/index.stories.d.ts +9 -0
- package/build/stories/grid/col/_types.d.ts +77 -0
- package/build/stories/grid/col/index.d.ts +4 -0
- package/build/stories/grid/col/index.stories.d.ts +8 -0
- package/build/stories/grid/grid/_types.d.ts +9 -0
- package/build/stories/grid/grid/index.d.ts +10 -0
- package/build/stories/grid/grid/index.stories.d.ts +12 -0
- package/build/stories/grid/row/_types.d.ts +48 -0
- package/build/stories/grid/row/index.d.ts +4 -0
- package/build/stories/grid/row/index.stories.d.ts +10 -0
- package/build/stories/label/_types.d.ts +5 -0
- package/build/stories/label/index.d.ts +8 -0
- package/build/stories/label/index.stories.d.ts +7 -0
- package/build/stories/loaders/progress/_types.d.ts +12 -0
- package/build/stories/loaders/progress/index.d.ts +14 -0
- package/build/stories/loaders/progress/index.stories.d.ts +6 -0
- package/build/stories/loaders/skeleton/_types.d.ts +9 -0
- package/build/stories/loaders/skeleton/index.d.ts +17 -0
- package/build/stories/loaders/skeleton/index.stories.d.ts +7 -0
- package/build/stories/loaders/spinner/_types.d.ts +19 -0
- package/build/stories/loaders/spinner/index.d.ts +11 -0
- package/build/stories/loaders/spinner/index.stories.d.ts +6 -0
- package/build/stories/notifications/_types.d.ts +9 -0
- package/build/stories/notifications/index.d.ts +20 -0
- package/build/stories/notifications/index.stories.d.ts +10 -0
- package/build/stories/theme/index.d.ts +1 -1
- package/build/stories/title/_types.d.ts +5 -0
- package/build/stories/title/index.d.ts +7 -0
- package/build/stories/title/index.stories.d.ts +6 -0
- package/build/stories/typography/block-quote/_types.d.ts +5 -0
- package/build/stories/typography/block-quote/index.d.ts +7 -0
- package/build/stories/typography/block-quote/index.stories.d.ts +5 -0
- package/build/stories/typography/code/_types.d.ts +7 -0
- package/build/stories/typography/code/index.d.ts +7 -0
- package/build/stories/typography/code/index.stories.d.ts +8 -0
- package/build/stories/typography/ellipsis/_types.d.ts +9 -0
- package/build/stories/typography/ellipsis/index.d.ts +7 -0
- package/build/stories/typography/ellipsis/index.stories.d.ts +5 -0
- package/build/stories/typography/lists/_types.d.ts +17 -0
- package/build/stories/typography/lists/index.d.ts +16 -0
- package/build/stories/typography/lists/ordered.stories.d.ts +9 -0
- package/build/stories/typography/lists/unordered.stories.d.ts +9 -0
- package/build/stories/typography/paragraph/_types.d.ts +5 -0
- package/build/stories/typography/paragraph/index.d.ts +7 -0
- package/build/stories/typography/paragraph/ordered.stories.d.ts +6 -0
- package/build/stories/typography/typescale/_types.d.ts +43 -0
- package/build/stories/typography/typescale/index.d.ts +12 -0
- package/build/stories/typography/typescale/index.stories.d.ts +5 -0
- package/generate-story.sh +61 -0
- package/package.json +37 -13
- package/build/stories/button/index.d.ts +0 -3
- package/build/stories/button/index.stories.d.ts +0 -13
- package/rollup.config.js +0 -28
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* Buttons let users take action quickly.
|
|
5
|
+
* Use a Button to enable actions or decisions that are important to a user’s workflow.
|
|
6
|
+
* <hr>
|
|
7
|
+
* Used for this:
|
|
8
|
+
- To enable user action
|
|
9
|
+
- To draw attention to relevant actions in a user's workflow
|
|
10
|
+
*/
|
|
11
|
+
declare const Button: {
|
|
12
|
+
(props: ButtonArgs): JSX.Element;
|
|
13
|
+
StartIcon: {
|
|
14
|
+
(props: import("@zendeskgarden/react-buttons").IButtonStartIconProps): JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
EndIcon: {
|
|
18
|
+
(props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export { Button };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { ButtonArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<ButtonArgs>;
|
|
5
|
+
export declare const Basic: Story<ButtonArgs>;
|
|
6
|
+
export declare const Primary: Story<ButtonArgs>;
|
|
7
|
+
export declare const WithIcon: Story<ButtonArgs>;
|
|
8
|
+
declare const _default: ComponentMeta<{
|
|
9
|
+
(props: ButtonArgs): JSX.Element;
|
|
10
|
+
StartIcon: {
|
|
11
|
+
(props: import("@zendeskgarden/react-buttons").IButtonStartIconProps): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
EndIcon: {
|
|
15
|
+
(props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonGroupArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
A Button group lets users make a selection from a set of options.
|
|
5
|
+
|
|
6
|
+
This is a legacy component and may be deprecated in the future. UNGUESS does not presently recommend the use of Button groups.
|
|
7
|
+
**/
|
|
8
|
+
declare const ButtonGroup: (props: ButtonGroupArgs) => JSX.Element;
|
|
9
|
+
export { ButtonGroup };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { ButtonGroupArgs } from "./_types";
|
|
4
|
+
interface ButtonGroupProps extends ButtonGroupArgs {
|
|
5
|
+
/**
|
|
6
|
+
The children of the button group.
|
|
7
|
+
@default []
|
|
8
|
+
*/
|
|
9
|
+
items: any[];
|
|
10
|
+
}
|
|
11
|
+
export declare const TwoItems: Story<ButtonGroupProps>;
|
|
12
|
+
export declare const WithBorders: Story<ButtonGroupProps>;
|
|
13
|
+
export declare const RoundedItems: Story<ButtonGroupProps>;
|
|
14
|
+
declare const _default: ComponentMeta<(props: ButtonGroupArgs) => JSX.Element>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IIconButtonProps } from "@zendeskgarden/react-buttons";
|
|
2
|
+
export interface IconButtonArgs extends IIconButtonProps {
|
|
3
|
+
/** Applies neutral button styling */
|
|
4
|
+
isNeutral?: boolean;
|
|
5
|
+
/** Applies primary button styling */
|
|
6
|
+
isPrimary?: boolean;
|
|
7
|
+
/** Applies danger button styling */
|
|
8
|
+
isDanger?: boolean;
|
|
9
|
+
/** Applies basic button styling */
|
|
10
|
+
isBasic?: boolean;
|
|
11
|
+
/** Applies pill button styling */
|
|
12
|
+
isPill?: boolean;
|
|
13
|
+
/** Applies inset `box-shadow` styling on focus */
|
|
14
|
+
focusInset?: boolean;
|
|
15
|
+
/** Rotates icon 180 degrees */
|
|
16
|
+
isRotated?: boolean;
|
|
17
|
+
/** Specifies icon button size */
|
|
18
|
+
size?: 'small' | 'medium' | 'large';
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconButtonArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
Icon buttons (like Buttons) let users take action.
|
|
5
|
+
They are used for repeated or persistent actions on a page and lack visible labels to simplify the UI.
|
|
6
|
+
<br>
|
|
7
|
+
Do this: <b>Include a Tooltip to help any users who may be unfamiliar with the icon.</b>
|
|
8
|
+
<hr>
|
|
9
|
+
Used for this
|
|
10
|
+
- To simplify the appearance of repeated or persistent actions on a page
|
|
11
|
+
- To enable action in a toolbar
|
|
12
|
+
**/
|
|
13
|
+
declare const IconButton: (props: IconButtonArgs) => JSX.Element;
|
|
14
|
+
export { IconButton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { IconButtonArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<IconButtonArgs>;
|
|
5
|
+
export declare const Danger: Story<IconButtonArgs>;
|
|
6
|
+
export declare const Disabled: Story<IconButtonArgs>;
|
|
7
|
+
export declare const Shape: Story<IconButtonArgs>;
|
|
8
|
+
declare const _default: ComponentMeta<(props: IconButtonArgs) => JSX.Element>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SplitButtonArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
A Split button is a hybrid between a Dropdown Menu and a Button. It lets users choose from parallel actions and take action on their choice.
|
|
5
|
+
<hr>
|
|
6
|
+
Used for this:
|
|
7
|
+
- To let users select from multiple parallel actions. Actions are parallel when each represents a path forward for the user and none cancel the action.
|
|
8
|
+
- To reduce visual complexity when there are multiple actions a user can take
|
|
9
|
+
**/
|
|
10
|
+
declare const SplitButton: (props: SplitButtonArgs) => JSX.Element;
|
|
11
|
+
export { SplitButton };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { SplitButtonArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<SplitButtonArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<(props: import("../icon-button/_types").IconButtonArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CardProps } from './_types';
|
|
3
|
+
/**
|
|
4
|
+
* A Card is a container that groups related content.
|
|
5
|
+
* <hr>
|
|
6
|
+
* Used for this:
|
|
7
|
+
- To group related content
|
|
8
|
+
*/
|
|
9
|
+
declare const Card: (props: CardProps) => JSX.Element;
|
|
10
|
+
export { Card };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { CardProps } from "./_types";
|
|
4
|
+
interface CardStoryProps extends CardProps {
|
|
5
|
+
title: string;
|
|
6
|
+
content: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const Default: Story<CardStoryProps>;
|
|
9
|
+
export declare const Floating: Story<CardStoryProps>;
|
|
10
|
+
declare const _default: ComponentMeta<(props: CardProps) => JSX.Element>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { CloseArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<CloseArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<(props: CloseArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IDropdownProps, ISelectProps } from "@zendeskgarden/react-dropdowns";
|
|
2
|
+
export interface DropdownArgs extends IDropdownProps {
|
|
3
|
+
/** Opens the dropdown */
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
/** Identifies the currently selected item */
|
|
6
|
+
selectedItem?: any;
|
|
7
|
+
/** Identifies the currently selected items */
|
|
8
|
+
selectedItems?: any[];
|
|
9
|
+
/** Highlights an element at a selected index */
|
|
10
|
+
highlightedIndex?: number;
|
|
11
|
+
/** Sets the value of the input element*/
|
|
12
|
+
inputValue?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SelectArgs extends ISelectProps {
|
|
15
|
+
/** Applies compact styling */
|
|
16
|
+
isCompact?: boolean;
|
|
17
|
+
/** Removes borders and padding */
|
|
18
|
+
isBare?: boolean;
|
|
19
|
+
/** Indicates that the element is not interactive */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Applies inset `box-shadow` styling on focus */
|
|
22
|
+
focusInset?: boolean;
|
|
23
|
+
/** Defines the element's validation state */
|
|
24
|
+
validation?: 'success' | 'warning' | 'error';
|
|
25
|
+
/** Defines the icon rendered before the element's content */
|
|
26
|
+
start?: any;
|
|
27
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { FieldArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<FieldArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<(props: FieldArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICheckboxProps } from "@zendeskgarden/react-forms";
|
|
2
|
+
export interface CheckboxArgs extends ICheckboxProps {
|
|
3
|
+
/**
|
|
4
|
+
* Sets the checkbox state to
|
|
5
|
+
* [indeterminate](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes)
|
|
6
|
+
*/
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CheckboxArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* A Checkbox lets users select and unselect options from a list.
|
|
5
|
+
* <hr>
|
|
6
|
+
* Used for this:
|
|
7
|
+
* - To let users compare options from a list and select all, any, or none of those items
|
|
8
|
+
* - To turn a single option on or off
|
|
9
|
+
* Not for this:
|
|
10
|
+
* - To give the user a mutually exclusive choice, use the Radio component instead
|
|
11
|
+
* - To let users activate an option that takes effect immediately, use a Toggle instead
|
|
12
|
+
**/
|
|
13
|
+
declare const Checkbox: (props: CheckboxArgs) => JSX.Element;
|
|
14
|
+
export { Checkbox };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { CheckboxArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<CheckboxArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<(props: CheckboxArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IInputProps } from "@zendeskgarden/react-forms";
|
|
2
|
+
export interface InputArgs extends IInputProps {
|
|
3
|
+
/** Removes borders and padding */
|
|
4
|
+
isBare?: boolean;
|
|
5
|
+
/** Applies inset `box-shadow` styling on focus */
|
|
6
|
+
focusInset?: boolean;
|
|
7
|
+
/** Applies validation state styling */
|
|
8
|
+
validation?: 'success' | 'warning' | 'error';
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* An Input lets users enter text into a field.
|
|
5
|
+
* <hr>
|
|
6
|
+
* Used for this:
|
|
7
|
+
* - To let the user enter data into a field
|
|
8
|
+
* - To enter multiline text, use a Textarea
|
|
9
|
+
**/
|
|
10
|
+
declare const Input: (props: InputArgs) => JSX.Element;
|
|
11
|
+
export { Input };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { InputArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<InputArgs>;
|
|
5
|
+
export declare const Success: Story<InputArgs>;
|
|
6
|
+
export declare const Warning: Story<InputArgs>;
|
|
7
|
+
export declare const Error: Story<InputArgs>;
|
|
8
|
+
declare const _default: ComponentMeta<(props: InputArgs) => JSX.Element>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { IColProps, GRID_NUMBER, BREAKPOINT, ALIGN_SELF, TEXT_ALIGN } from "@zendeskgarden/react-grid";
|
|
2
|
+
export interface ColArgs extends IColProps {
|
|
3
|
+
/** Sets the total number of grid `columns` that the column spans on all screen sizes */
|
|
4
|
+
size?: GRID_NUMBER;
|
|
5
|
+
/** Defines the column size on extra-small screens.
|
|
6
|
+
* See [breakpoints](/components/theme-object#default_theme).
|
|
7
|
+
*/
|
|
8
|
+
xs?: BREAKPOINT;
|
|
9
|
+
/** Defines the column size on small screens*/
|
|
10
|
+
sm?: BREAKPOINT;
|
|
11
|
+
/** Defines the column size on medium screens */
|
|
12
|
+
md?: BREAKPOINT;
|
|
13
|
+
/** Defines the column size on large screens */
|
|
14
|
+
lg?: BREAKPOINT;
|
|
15
|
+
/** Defines the column size on extra-large screens */
|
|
16
|
+
xl?: BREAKPOINT;
|
|
17
|
+
/**
|
|
18
|
+
* Applies the `align-self` flex item property, overriding `Row alignItems`
|
|
19
|
+
* vertical alignment on all screen sizes
|
|
20
|
+
*/
|
|
21
|
+
alignSelf?: ALIGN_SELF;
|
|
22
|
+
/** Applies the `align-self` flex item property to the column on extra-small screens */
|
|
23
|
+
alignSelfXs?: ALIGN_SELF;
|
|
24
|
+
/** Applies the `align-self` flex item property to the column on small screens */
|
|
25
|
+
alignSelfSm?: ALIGN_SELF;
|
|
26
|
+
/** Applies the `align-self` flex item property to the column on medium screens */
|
|
27
|
+
alignSelfMd?: ALIGN_SELF;
|
|
28
|
+
/** Applies the `align-self` flex item property to the column on large screens */
|
|
29
|
+
alignSelfLg?: ALIGN_SELF;
|
|
30
|
+
/** Applies the `align-self` flex item property to the column on extra-large screens */
|
|
31
|
+
alignSelfXl?: ALIGN_SELF;
|
|
32
|
+
/**
|
|
33
|
+
* Applies the RTL-aware `text-align` property to the column on all screen sizes
|
|
34
|
+
*/
|
|
35
|
+
textAlign?: TEXT_ALIGN;
|
|
36
|
+
/** Applies the `text-align` property to the column on extra-small screens */
|
|
37
|
+
textAlignXs?: TEXT_ALIGN;
|
|
38
|
+
/** Applies the `text-align` property to the column on small screens */
|
|
39
|
+
textAlignSm?: TEXT_ALIGN;
|
|
40
|
+
/** Applies the `text-align` property to the column on medium screens */
|
|
41
|
+
textAlignMd?: TEXT_ALIGN;
|
|
42
|
+
/** Applies the `text-align` property to the column on large screens */
|
|
43
|
+
textAlignLg?: TEXT_ALIGN;
|
|
44
|
+
/** Applies the `text-align` property to the column on extra-large screens */
|
|
45
|
+
textAlignXl?: TEXT_ALIGN;
|
|
46
|
+
/**
|
|
47
|
+
* Offsets the column relative to the total number of `columns` in the
|
|
48
|
+
* grid on all screen sizes
|
|
49
|
+
*/
|
|
50
|
+
offset?: GRID_NUMBER;
|
|
51
|
+
/** Applies offset to the column on extra-small screens */
|
|
52
|
+
offsetXs?: GRID_NUMBER;
|
|
53
|
+
/** Applies offset to the column on small screens */
|
|
54
|
+
offsetSm?: GRID_NUMBER;
|
|
55
|
+
/** Applies offset to the column on medium screens */
|
|
56
|
+
offsetMd?: GRID_NUMBER;
|
|
57
|
+
/** Applies offset to the column on large screens */
|
|
58
|
+
offsetLg?: GRID_NUMBER;
|
|
59
|
+
/** Applies offset to the column on extra-large screens */
|
|
60
|
+
offsetXl?: GRID_NUMBER;
|
|
61
|
+
/**
|
|
62
|
+
* Applies the `order` flex item property to the column on all screen sizes. Note that
|
|
63
|
+
* order modification can introduce accessibility problems by
|
|
64
|
+
* confusing tab ordering. Rely on semantic DOM ordering whenever possible.
|
|
65
|
+
*/
|
|
66
|
+
order?: GRID_NUMBER;
|
|
67
|
+
/** Sets the `order` flex item property of the column on extra-small screens */
|
|
68
|
+
orderXs?: GRID_NUMBER;
|
|
69
|
+
/** Sets the `order` flex item property of the column on small screens */
|
|
70
|
+
orderSm?: GRID_NUMBER;
|
|
71
|
+
/** Sets the `order` flex item property of the column on medium screens */
|
|
72
|
+
orderMd?: GRID_NUMBER;
|
|
73
|
+
/** Sets the `order` flex item property of the column on large screens */
|
|
74
|
+
orderLg?: GRID_NUMBER;
|
|
75
|
+
/** Sets the `order` flex item property of the column on extra-large screens */
|
|
76
|
+
orderXl?: GRID_NUMBER;
|
|
77
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { ColArgs } from "./_types";
|
|
4
|
+
export declare const Basic: Story<(props: ColArgs) => JSX.Element>;
|
|
5
|
+
export declare const Breaks: Story<(props: ColArgs) => JSX.Element>;
|
|
6
|
+
export declare const Offset: Story<(props: ColArgs) => JSX.Element>;
|
|
7
|
+
declare const _default: ComponentMeta<(props: ColArgs) => JSX.Element>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IGridProps, GRID_NUMBER, SPACE } from "@zendeskgarden/react-grid";
|
|
2
|
+
export interface GridArgs extends IGridProps {
|
|
3
|
+
/** Defines the number of individual columns that the grid contains */
|
|
4
|
+
columns?: GRID_NUMBER;
|
|
5
|
+
/** Specifies the grid column gutter width. The value `false` collapses the gutters */
|
|
6
|
+
gutters?: SPACE;
|
|
7
|
+
/** Highlights the columns for layout debugging */
|
|
8
|
+
debug?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GridArgs } from './_types';
|
|
3
|
+
/**
|
|
4
|
+
* The Grid component is a framework for building modular layouts.
|
|
5
|
+
* <hr>
|
|
6
|
+
* Used for this:
|
|
7
|
+
- To structure the layout of a page
|
|
8
|
+
*/
|
|
9
|
+
declare const Grid: (props: GridArgs) => JSX.Element;
|
|
10
|
+
export { Grid };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { RowStoryArg } from "../row/index.stories";
|
|
4
|
+
import { GridArgs } from "./_types";
|
|
5
|
+
interface GridProps extends GridArgs {
|
|
6
|
+
rows: Array<RowStoryArg>;
|
|
7
|
+
}
|
|
8
|
+
export declare const Default: Story<GridProps>;
|
|
9
|
+
export declare const EqualColumns: Story<GridProps>;
|
|
10
|
+
export declare const OneWiderColumn: Story<GridProps>;
|
|
11
|
+
declare const _default: ComponentMeta<(props: GridArgs) => JSX.Element>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IRowProps, ALIGN_ITEMS, JUSTIFY_CONTENT, WRAP } from "@zendeskgarden/react-grid";
|
|
2
|
+
export interface RowArgs extends IRowProps {
|
|
3
|
+
/**
|
|
4
|
+
* Applies the `align-items` flex container property to the row.
|
|
5
|
+
* This affects vertical `Col` alignment on all screen sizes.
|
|
6
|
+
*/
|
|
7
|
+
alignItems?: ALIGN_ITEMS;
|
|
8
|
+
/** Applies the `align-items` flex container property to the row on extra-small screens */
|
|
9
|
+
alignItemsXs?: ALIGN_ITEMS;
|
|
10
|
+
/** Applies the `align-items` flex container property to the row on small screens */
|
|
11
|
+
alignItemsSm?: ALIGN_ITEMS;
|
|
12
|
+
/** Applies the `align-items` flex container property to the row on medium screens */
|
|
13
|
+
alignItemsMd?: ALIGN_ITEMS;
|
|
14
|
+
/** Applies the `align-items` flex container property to the row on large screens */
|
|
15
|
+
alignItemsLg?: ALIGN_ITEMS;
|
|
16
|
+
/** Applies the `align-items` flex container property to the row on extra-large screens */
|
|
17
|
+
alignItemsXl?: ALIGN_ITEMS;
|
|
18
|
+
/**
|
|
19
|
+
* Applies the `justify-content` flex container property to the row.
|
|
20
|
+
* This affects horizontal `Col` alignment on all screen sizes.
|
|
21
|
+
*/
|
|
22
|
+
justifyContent?: JUSTIFY_CONTENT;
|
|
23
|
+
/** Applies the `justify-content` flex container property to the row on extra-small screens */
|
|
24
|
+
justifyContentXs?: JUSTIFY_CONTENT;
|
|
25
|
+
/** Applies the `justify-content` flex container property to the row on small screens */
|
|
26
|
+
justifyContentSm?: JUSTIFY_CONTENT;
|
|
27
|
+
/** Applies the `justify-content` flex container property to the row on medium screens */
|
|
28
|
+
justifyContentMd?: JUSTIFY_CONTENT;
|
|
29
|
+
/** Applies the `justify-content` flex container property to the row on large screens */
|
|
30
|
+
justifyContentLg?: JUSTIFY_CONTENT;
|
|
31
|
+
/** Applies the `justify-content` flex container property to the row on extra-large screens */
|
|
32
|
+
justifyContentXl?: JUSTIFY_CONTENT;
|
|
33
|
+
/**
|
|
34
|
+
* Applies the `flex-wrap` container property to the row. This affects `Col` wrapping on
|
|
35
|
+
* all screen sizes.
|
|
36
|
+
*/
|
|
37
|
+
wrap?: WRAP;
|
|
38
|
+
/** Applies the `flex-wrap` container property to the row on extra-small screens */
|
|
39
|
+
wrapXs?: WRAP;
|
|
40
|
+
/** Applies the `flex-wrap` container property to the row on small screens */
|
|
41
|
+
wrapSm?: WRAP;
|
|
42
|
+
/** Applies the `flex-wrap` container property to the row on medium screens */
|
|
43
|
+
wrapMd?: WRAP;
|
|
44
|
+
/** Applies the `flex-wrap` container property to the row on large screens */
|
|
45
|
+
wrapLg?: WRAP;
|
|
46
|
+
/** Applies the `flex-wrap` container property to the row on extra-large screens */
|
|
47
|
+
wrapXl?: WRAP;
|
|
48
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { RowArgs } from "./_types";
|
|
4
|
+
import { ColArgs } from "../col/_types";
|
|
5
|
+
export interface RowStoryArg extends RowArgs {
|
|
6
|
+
cols: Array<ColArgs>;
|
|
7
|
+
}
|
|
8
|
+
export declare const Basic: Story<RowStoryArg>;
|
|
9
|
+
declare const _default: ComponentMeta<(props: RowArgs) => JSX.Element>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { LabelArgs } from "./_types";
|
|
4
|
+
export declare const Basic: Story<LabelArgs>;
|
|
5
|
+
export declare const Bold: Story<LabelArgs>;
|
|
6
|
+
declare const _default: ComponentMeta<(props: LabelArgs) => JSX.Element>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IProgressProps } from '@zendeskgarden/react-loaders';
|
|
2
|
+
export interface ProgressArgs extends IProgressProps {
|
|
3
|
+
/** Sets the progress as a value between 0 and 100 */
|
|
4
|
+
value?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Sets the foreground bar's fill color.
|
|
7
|
+
* Defaults to the `successHue` [theme](/components/theme-object#colors) value.
|
|
8
|
+
*/
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Adjusts the height */
|
|
11
|
+
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProgressArgs } from './_types';
|
|
3
|
+
/**
|
|
4
|
+
* A Progress loader communicates progress when downloading or uploading content.
|
|
5
|
+
* <hr>
|
|
6
|
+
* Used for this:
|
|
7
|
+
* - To communicate the amount of time left when downloading or uploading content
|
|
8
|
+
*
|
|
9
|
+
Not for this:
|
|
10
|
+
- When the loading time is unknown, use a Spinner instead
|
|
11
|
+
- When loading page content, use a Skeleton loader instead
|
|
12
|
+
*/
|
|
13
|
+
declare const Progress: (props: ProgressArgs) => JSX.Element;
|
|
14
|
+
export { Progress };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { ProgressArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<ProgressArgs>;
|
|
5
|
+
declare const _default: ComponentMeta<(props: ProgressArgs) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ISkeletonProps } from '@zendeskgarden/react-loaders';
|
|
2
|
+
export interface SkeletonArgs extends ISkeletonProps {
|
|
3
|
+
/** Sets the width in px or in percentage of the the parent element's width */
|
|
4
|
+
width?: string;
|
|
5
|
+
/** Sets the height in px or in percentage of parent element's height if the height is not already inherited by `line-height` */
|
|
6
|
+
height?: string;
|
|
7
|
+
/** Inverts the color for use on dark backgrounds */
|
|
8
|
+
isLight?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonArgs } from './_types';
|
|
3
|
+
/**
|
|
4
|
+
* A Skeleton loader shows users a blank version of a page or section of a page into which content is gradually loaded. It provides a visual estimate of the space needed.
|
|
5
|
+
* <hr>
|
|
6
|
+
* Used for this:
|
|
7
|
+
- Skeleton is the default loader, used whenever the system can predict the format of the loading content
|
|
8
|
+
- To progressively load different parts of a page
|
|
9
|
+
- To avoid large layout shifts
|
|
10
|
+
|
|
11
|
+
* Not for this:
|
|
12
|
+
- When the system doesn’t have control over the content that is loading, use a Spinner instead
|
|
13
|
+
- To indicate that a component (like a button or search input) is busy, use Dots instead
|
|
14
|
+
- To communicate a typing status, use Inline instead
|
|
15
|
+
*/
|
|
16
|
+
declare const Skeleton: (props: SkeletonArgs) => JSX.Element;
|
|
17
|
+
export { Skeleton };
|