@pantheon-systems/pds-toolkit-react 1.0.0-dev.250 → 1.0.0-dev.251
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/_dist/components/BranchDiff/BranchDiff.d.ts +9 -1
- package/_dist/components/LinkNewWindow/LinkNewWindow.d.ts +5 -1
- package/_dist/components/buttons/UtilityButton/UtilityButton.d.ts +9 -1
- package/_dist/components/loading-indicators/Skeleton/Skeleton.d.ts +58 -0
- package/_dist/components/panels/PanelList/PanelList.d.ts +1 -1
- package/_dist/css/component-css/pds-branch-diff.css +1 -1
- package/_dist/css/component-css/pds-index.css +4 -4
- package/_dist/css/component-css/pds-link-new-window.css +1 -1
- package/_dist/css/component-css/pds-skeleton.css +1 -0
- package/_dist/css/component-css/pds-utility-button.css +1 -1
- package/_dist/css/pds-components.css +4 -4
- package/_dist/css/pds-core.css +1 -1
- package/_dist/index.css +1 -1
- package/_dist/index.d.ts +2 -1
- package/_dist/index.js +2952 -2810
- package/_dist/index.js.map +1 -1
- package/_dist/libs/types/custom-types.d.ts +24 -22
- package/_dist/vars/spacing.d.ts +29 -10
- package/_dist/vars/type-scale.d.ts +28 -0
- package/package.json +1 -1
- /package/_dist/components/{progress-indicators → loading-indicators}/Spinner/Spinner.d.ts +0 -0
|
@@ -4,6 +4,14 @@ import './branch-diff.css';
|
|
|
4
4
|
* Prop types for BranchDiff
|
|
5
5
|
*/
|
|
6
6
|
export interface BranchDiffProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* Is the component in the process of loading?
|
|
9
|
+
*/
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Text to be displayed in tooltip while component is loading.
|
|
13
|
+
*/
|
|
14
|
+
loadingText?: string;
|
|
7
15
|
/**
|
|
8
16
|
* The number of commits the current branch is ahead of its upstream branch.
|
|
9
17
|
*/
|
|
@@ -32,4 +40,4 @@ export interface BranchDiffProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
32
40
|
/**
|
|
33
41
|
* BranchDiff UI component
|
|
34
42
|
*/
|
|
35
|
-
export declare const BranchDiff: ({ numberAhead, numberAheadDescription, numberBehind, numberBehindDescription, componentWidth, className, ...props }: BranchDiffProps) => React.JSX.Element;
|
|
43
|
+
export declare const BranchDiff: ({ isLoading, loadingText, numberAhead, numberAheadDescription, numberBehind, numberBehindDescription, componentWidth, className, ...props }: BranchDiffProps) => React.JSX.Element;
|
|
@@ -12,6 +12,10 @@ export interface LinkNewWindowProps extends ComponentPropsWithoutRef<'a'> {
|
|
|
12
12
|
* Optional font size for the LinkNewWindow. If not provided, the font size will be inherited from the parent element.
|
|
13
13
|
*/
|
|
14
14
|
fontSize?: 'sm' | 'md' | 'lg';
|
|
15
|
+
/**
|
|
16
|
+
* Is the link in the process of loading?
|
|
17
|
+
*/
|
|
18
|
+
isLoading?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* Translation string for the "opens in a new window" message.
|
|
17
21
|
*/
|
|
@@ -28,4 +32,4 @@ export interface LinkNewWindowProps extends ComponentPropsWithoutRef<'a'> {
|
|
|
28
32
|
/**
|
|
29
33
|
* LinkNewWindow UI component
|
|
30
34
|
*/
|
|
31
|
-
export declare const LinkNewWindow: ({ children, fontSize, newWindowText, url, className, ...props }: LinkNewWindowProps) => React.JSX.Element;
|
|
35
|
+
export declare const LinkNewWindow: ({ children, fontSize, isLoading, newWindowText, url, className, ...props }: LinkNewWindowProps) => React.JSX.Element;
|
|
@@ -21,6 +21,14 @@ export interface UtilityButtonProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
21
21
|
* Is the button critical? If true, the button will be styled as critical on hover and focus.
|
|
22
22
|
*/
|
|
23
23
|
isCritical?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Is the button in the process of an initial load?
|
|
26
|
+
*/
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Is the button in the process of performing a task and should be disabled?
|
|
30
|
+
*/
|
|
31
|
+
isWorking?: boolean;
|
|
24
32
|
/**
|
|
25
33
|
* Should the button label use the monospace font?
|
|
26
34
|
*/
|
|
@@ -45,4 +53,4 @@ export interface UtilityButtonProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
45
53
|
/**
|
|
46
54
|
* UtilityButton UI component
|
|
47
55
|
*/
|
|
48
|
-
export declare const UtilityButton: ({ buttonProps, disabled, iconName, isCritical, isMonospace, label, onClick, tooltipText, className, ...props }: UtilityButtonProps) => React.JSX.Element;
|
|
56
|
+
export declare const UtilityButton: ({ buttonProps, disabled, iconName, isCritical, isLoading, isWorking, isMonospace, label, onClick, tooltipText, className, ...props }: UtilityButtonProps) => React.JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { SpacingScaleOptions, TypeScaleOptions } from '@libs/types/custom-types';
|
|
3
|
+
import './skeleton.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for Skeleton
|
|
6
|
+
*/
|
|
7
|
+
export interface SkeletonProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Skeleton color scheme.
|
|
10
|
+
*/
|
|
11
|
+
colorType?: 'regular' | 'bold';
|
|
12
|
+
/**
|
|
13
|
+
* Is the skeleton animated? This should almost always be true.
|
|
14
|
+
* If false, the skeleton will not animate and will be a static placeholder.
|
|
15
|
+
*/
|
|
16
|
+
isAnimated?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The shape of the skeleton.
|
|
19
|
+
*/
|
|
20
|
+
shape?: 'circular' | 'rectangular' | 'rounded' | 'text-block';
|
|
21
|
+
/**
|
|
22
|
+
* The size of the skeleton — height and width. These values can either be set with PDS spacing scale options or as a number in rems.
|
|
23
|
+
*
|
|
24
|
+
* If `shape` = `circular`, the `height` value will be used to set the `height` and `width`.
|
|
25
|
+
*
|
|
26
|
+
* If `shape` = `text-block`, only the `width` value will be used. The overall height will be determined by the `textLineCount` and `textSize` props.
|
|
27
|
+
*/
|
|
28
|
+
size?: {
|
|
29
|
+
height?: SpacingScaleOptions | number;
|
|
30
|
+
width?: SpacingScaleOptions | number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Is the text justified?
|
|
34
|
+
* If true, the block will span the prescribed width.
|
|
35
|
+
* If false, and there are multiple lines of text, the widths will vary.
|
|
36
|
+
* This is only used when the shape is 'text-block'.
|
|
37
|
+
*/
|
|
38
|
+
textIsJustified?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The number of lines for text skeletons.
|
|
41
|
+
* Values can be between 1 and 5.
|
|
42
|
+
* This is only used when the shape is 'text-block'.
|
|
43
|
+
*/
|
|
44
|
+
textLineCount?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The font-size of the text skeleton.
|
|
47
|
+
* This is only used when the shape is 'text-block'.
|
|
48
|
+
*/
|
|
49
|
+
textSize?: TypeScaleOptions;
|
|
50
|
+
/**
|
|
51
|
+
* Additional class names
|
|
52
|
+
*/
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Skeleton UI component
|
|
57
|
+
*/
|
|
58
|
+
export declare const Skeleton: ({ colorType, isAnimated, shape, size, textIsJustified, textLineCount, textSize, className, ...props }: SkeletonProps) => React.JSX.Element;
|
|
@@ -10,7 +10,7 @@ export interface PanelListProps extends ComponentPropsWithoutRef<'ul'> {
|
|
|
10
10
|
*/
|
|
11
11
|
background?: PanelListBackground;
|
|
12
12
|
/**
|
|
13
|
-
* Children components. These
|
|
13
|
+
* Children components. These should be PanelRow components.
|
|
14
14
|
*/
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-branch-diff{
|
|
1
|
+
.pds-branch-diff{height:2rem}.pds-branch-diff .pds-tooltip,.pds-branch-diff .pds-tooltip__trigger-custom{width:100%}.pds-branch-diff__content{display:flex;height:1.953rem}.pds-branch-diff__segment{position:relative;width:50%}.pds-branch-diff__segment--behind{text-align:right}.pds-branch-diff__segment--ahead{border-left:1px solid var(--pds-color-status-neutral-utility);text-align:left}.pds-branch-diff__number{display:block;font-size:.833rem;font-weight:400;height:1rem;line-height:120%;padding-block:.0625rem;padding-inline:.328rem;position:relative}.pds-branch-diff__line{height:.512rem;min-width:.0625rem;position:absolute;transition:width var(--pds-animation-transition-reveal-duration) var(--pds-animation-transition-default-timing-function);width:41.95%}.pds-branch-diff__line--behind{background-color:var(--pds-color-status-neutral-background);border-bottom-left-radius:var(--pds-border-radius-bar);border-top-left-radius:var(--pds-border-radius-bar);right:0}.pds-branch-diff__line--ahead{background-color:var(--pds-color-status-neutral-utility);border-bottom-right-radius:var(--pds-border-radius-bar);border-top-right-radius:var(--pds-border-radius-bar);left:0}.pds-branch-diff--loading .pds-branch-diff__segment--ahead{border-color:var(--pds-color-status-neutral-background)}.pds-branch-diff--loading .pds-branch-diff__line{background-color:var(--pulse-regular-base-color)}
|