@pantheon-systems/pds-toolkit-react 1.0.0-dev.208 → 1.0.0-dev.209
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/CTASlice/CTASlice.d.ts +6 -14
- package/_dist/components/Icon/Icon.d.ts +2 -4
- package/_dist/components/Pagination/Pagination.d.ts +54 -0
- package/_dist/components/Pagination/usePagination.d.ts +7 -0
- package/_dist/components/buttons/MenuButton/MenuButton.d.ts +1 -2
- package/_dist/css/component-css/pds-card-select-group.css +1 -1
- package/_dist/css/component-css/pds-card.css +1 -1
- package/_dist/css/component-css/pds-index.css +3 -3
- package/_dist/css/component-css/pds-input-utilities.css +1 -1
- package/_dist/css/component-css/pds-new-site-card.css +1 -1
- package/_dist/css/component-css/pds-pagination.css +1 -0
- package/_dist/css/component-css/pds-pricing-card.css +1 -1
- package/_dist/css/component-css/pds-select.css +1 -1
- package/_dist/css/component-css/pds-site-card.css +1 -1
- package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +2 -0
- package/_dist/css/pds-components.css +3 -3
- package/_dist/css/pds-core.css +1 -1
- package/_dist/css/pds-layouts.css +1 -1
- package/_dist/index.css +1 -1
- package/_dist/index.d.ts +1 -1
- package/_dist/index.js +3131 -3400
- package/_dist/index.js.map +1 -1
- package/_dist/libs/components/utility-components.d.ts +4 -2
- package/_dist/mocks/data/pagination-items.d.ts +16 -0
- package/_dist/mocks/markup/dashboard-main-content.d.ts +1 -7
- package/package.json +2 -2
- package/_dist/components/Pager/AdvancedPagination.d.ts +0 -4
- package/_dist/components/Pager/BasicPagination.d.ts +0 -4
- package/_dist/components/Pager/MiniPagination.d.ts +0 -4
- package/_dist/components/Pager/NavigationButton.d.ts +0 -13
- package/_dist/components/Pager/Pager.d.ts +0 -24
- package/_dist/components/Pager/PagerContext.d.ts +0 -23
- package/_dist/components/Pager/PagerItem.d.ts +0 -14
- package/_dist/components/Pager/usePaginationUI.d.ts +0 -1
- package/_dist/css/component-css/pds-pager.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ComponentPropsWithoutRef } from 'react';
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import { ContainerWidth, HeadingLevel } from '@libs/types/custom-types';
|
|
3
3
|
import './../buttons/Button/button.css';
|
|
4
4
|
import './cta-slice.css';
|
|
@@ -24,21 +24,13 @@ interface CTASliceProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
24
24
|
*/
|
|
25
25
|
leadText?: string;
|
|
26
26
|
/**
|
|
27
|
-
* Primary link
|
|
27
|
+
* Primary link content
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
text: string;
|
|
31
|
-
url: string;
|
|
32
|
-
target: '_self' | '_blank';
|
|
33
|
-
};
|
|
29
|
+
primaryLinkContent: ReactNode;
|
|
34
30
|
/**
|
|
35
|
-
* Optional secondary link
|
|
31
|
+
* Optional secondary link content
|
|
36
32
|
*/
|
|
37
|
-
|
|
38
|
-
text: string;
|
|
39
|
-
url: string;
|
|
40
|
-
target: '_self' | '_blank';
|
|
41
|
-
};
|
|
33
|
+
secondaryLinkContent?: ReactNode;
|
|
42
34
|
/**
|
|
43
35
|
* Additional class names
|
|
44
36
|
*/
|
|
@@ -47,5 +39,5 @@ interface CTASliceProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
47
39
|
/**
|
|
48
40
|
* CTA Slice UI component
|
|
49
41
|
*/
|
|
50
|
-
export declare const CTASlice: ({ backgroundColor, containerWidth, headingLevel, headingText, leadText,
|
|
42
|
+
export declare const CTASlice: ({ backgroundColor, containerWidth, headingLevel, headingText, leadText, primaryLinkContent, secondaryLinkContent, className, ...props }: CTASliceProps) => React.JSX.Element;
|
|
51
43
|
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* when we refactor the dependent components to typescript.
|
|
5
|
-
* If we use this now, storybook won't compile.
|
|
3
|
+
* PDS Icon type.
|
|
6
4
|
*/
|
|
7
5
|
export type PDSIcon = keyof typeof svgData;
|
|
8
6
|
/**
|
|
@@ -660,5 +658,5 @@ declare const svgData: {
|
|
|
660
658
|
readonly width: "576";
|
|
661
659
|
};
|
|
662
660
|
};
|
|
663
|
-
export declare const iconList: ("
|
|
661
|
+
export declare const iconList: ("angleDown" | "angleLeft" | "angleRight" | "angleUp" | "anglesLeft" | "anglesRight" | "arrowDownToLine" | "arrowLeft" | "arrowRight" | "asterisk" | "banBug" | "bars" | "barsFilter" | "billboard" | "bitbucket" | "bolt" | "book" | "books" | "bracketRight" | "broomWide" | "building" | "buildings" | "calendarDays" | "ccAmex" | "ccDiscover" | "ccGeneric" | "ccMC" | "ccVisa" | "chartSimple" | "cloud" | "cloudArrowUp" | "cloudPlus" | "code" | "codeBranch" | "codeMerge" | "caretDown" | "caretLeft" | "caretRight" | "caretUp" | "chartLine" | "chartNetwork" | "check" | "circle" | "circleExclamation" | "circleCheck" | "circleInfo" | "circleMinus" | "circleMinusOutline" | "circleNotch" | "circlePlus" | "circlePlusOutline" | "circleQuestion" | "circleXmark" | "command" | "comment" | "copy" | "diamondExclamation" | "diamonds4" | "discourse" | "download" | "drupal" | "ellipsis" | "ellipsisVertical" | "emptySet" | "envelope" | "exclamation" | "externalLink" | "eye" | "eyeSlash" | "facebook" | "file" | "fileContract" | "fileCSV" | "fileDiff" | "fileExport" | "fileImport" | "fileLines" | "filePDF" | "folder" | "gear" | "github" | "gitlab" | "globe" | "globeLine" | "graduationCap" | "grid" | "gripDots" | "gripDotsVertical" | "heart" | "house" | "idCard" | "instagram" | "keySkeleton" | "laptopCode" | "leaf" | "lifeRing" | "linkedin" | "linkSimple" | "linkSimpleSlash" | "magnifyingGlass" | "messages" | "minus" | "moon" | "paperclip" | "paperPlane" | "pen" | "phone" | "play" | "plus" | "quotesLeft" | "quotesRight" | "rectangleList" | "rocketLaunch" | "robot" | "rotate" | "rotateClock" | "rss" | "save" | "server" | "shield" | "shovel" | "siren" | "sitemap" | "slack" | "slashForward" | "slidersSimple" | "snowflake" | "sparkles" | "squareCheck" | "squareCode" | "squareMinus" | "squarePen" | "squareQuestion" | "squareTerminal" | "star" | "sun" | "table" | "terminal" | "threads" | "thumbsDown" | "thumbsUp" | "trash" | "triangleExclamation" | "twitter" | "upload" | "user" | "userGear" | "userPlus" | "users" | "video" | "wavePulse" | "windowRestore" | "wordpress" | "wrench" | "xmark" | "xmarkLarge" | "xTwitter" | "youtube")[];
|
|
664
662
|
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { HeadingLevel } from '@libs/types/custom-types';
|
|
3
|
+
import './pagination.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for Pagination
|
|
6
|
+
*/
|
|
7
|
+
export interface PaginationProps extends ComponentPropsWithoutRef<'nav'> {
|
|
8
|
+
/**
|
|
9
|
+
* Minimum number of page buttons to buffer on either side of the current page.
|
|
10
|
+
* This will change the number of page buttons shown in total.
|
|
11
|
+
*/
|
|
12
|
+
bufferCount?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Current page number.
|
|
15
|
+
*/
|
|
16
|
+
currentPage: number;
|
|
17
|
+
/**
|
|
18
|
+
* Heading level. Defaults to `h2`.
|
|
19
|
+
*/
|
|
20
|
+
headingLevel?: HeadingLevel;
|
|
21
|
+
/**
|
|
22
|
+
* Heading text for the pagination component. Will only be accessible to screen readers.
|
|
23
|
+
*/
|
|
24
|
+
headingText?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Number of items per page.
|
|
27
|
+
*/
|
|
28
|
+
itemsPerPage?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Label strings for previous and next buttons.
|
|
31
|
+
*/
|
|
32
|
+
labelStrings?: {
|
|
33
|
+
previous: string;
|
|
34
|
+
next: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Callback to handle page change.
|
|
38
|
+
* Use a state hook to update the current page in a parent component.
|
|
39
|
+
* For example: `onPageChange={(page) => setCurrentPage(page)}`
|
|
40
|
+
*/
|
|
41
|
+
onPageChange?: (page: number) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Total number of items to paginate.
|
|
44
|
+
*/
|
|
45
|
+
totalItemCount: number;
|
|
46
|
+
/**
|
|
47
|
+
* Additional class names.
|
|
48
|
+
*/
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Pagination UI component
|
|
53
|
+
*/
|
|
54
|
+
export declare const Pagination: ({ bufferCount, currentPage, headingLevel, headingText, itemsPerPage, labelStrings, onPageChange, totalItemCount, className, ...props }: PaginationProps) => React.JSX.Element;
|
|
@@ -5,7 +5,7 @@ import './menu-button.css';
|
|
|
5
5
|
/**
|
|
6
6
|
* Prop types for MenuButton
|
|
7
7
|
*/
|
|
8
|
-
interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
8
|
+
export interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
9
9
|
/**
|
|
10
10
|
* Is the button disabled?
|
|
11
11
|
*/
|
|
@@ -71,4 +71,3 @@ interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
|
71
71
|
* MenuButton UI component
|
|
72
72
|
*/
|
|
73
73
|
export declare const MenuButton: ({ disabled, displayType, iconName, id, isSplitButton, label, menuItems, menuPosition, onClick, size, testId, undefinedLabel, variant, withinNavbar, className, ...props }: MenuButtonProps) => React.JSX.Element;
|
|
74
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-card-select-group{border:none;color:var(--pds-color-foreground-default);font-family:Poppins,sans-serif;margin-inline:0;padding:0;padding-block-start:.328rem}.pds-card-select-group__legend{display:block;font-size:1.2rem;font-weight:600;margin-block-end:.8rem;text-align:left}.pds-card-select-group__legend--center{text-align:center}.pds-card-select-group__option input[type=radio]{appearance:none}.pds-card-select-group__option-label{background-color:var(--pds-color-background-default);border-radius:.375rem;box-shadow:var(--pds-elevation-
|
|
1
|
+
.pds-card-select-group{border:none;color:var(--pds-color-foreground-default);font-family:Poppins,sans-serif;margin-inline:0;padding:0;padding-block-start:.328rem}.pds-card-select-group__legend{display:block;font-size:1.2rem;font-weight:600;margin-block-end:.8rem;text-align:left}.pds-card-select-group__legend--center{text-align:center}.pds-card-select-group__option input[type=radio]{appearance:none}.pds-card-select-group__option-label{background-color:var(--pds-color-background-default);border-radius:.375rem;box-shadow:var(--pds-elevation-card-default);box-sizing:border-box;column-gap:.8rem;display:inline-flex;font-size:1.2rem;font-weight:600;height:100%;margin-block-end:0;padding:1rem;width:100%}.pds-card-select-group__option-label--selected,.pds-card-select-group__option-label:hover{background-color:var(--pds-color-interactive-background-hover);cursor:pointer}.pds-card-select-group__option-icon{color:var(--pds-color-border-input)}.pds-card-select-group__option-icon--selected{color:var(--pds-color-semantic-success-foreground)}.pds-card-select-group__option-description{color:var(--pds-color-foreground-default-secondary);font-size:1rem;font-weight:400;line-height:140%;margin-block-start:.328rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-card{background-color:var(--pds-color-background-default);border-radius:.375rem;box-shadow:var(--pds-elevation-
|
|
1
|
+
.pds-card{background-color:var(--pds-color-background-default);border-radius:.375rem;box-shadow:var(--pds-elevation-card-default);color:var(--pds-color-foreground-default);display:flex;flex-direction:column;min-height:8rem}.pds-card__image{border-radius:.375rem .375rem 0 0;display:block;overflow:hidden}.pds-card__image img{display:block;width:100%}.pds-card__main{flex-grow:1;padding:1.25rem 1.563rem}.pds-card--transparent{background-color:transparent}.pds-card--pad-narrow .pds-card__main{padding:1rem}.pds-card--pad-wide .pds-card__main{padding:1.563rem 1.953rem}
|