@pantheon-systems/pds-toolkit-react 1.0.0-dev.147 → 1.0.0-dev.149

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.
Files changed (34) hide show
  1. package/_dist/components/CTALink/CTALink.d.ts +1 -1
  2. package/_dist/components/Callout/Callout.d.ts +2 -3
  3. package/_dist/components/ComparisonList/ComparisonList.d.ts +2 -2
  4. package/_dist/components/Modal/Modal.d.ts +37 -22
  5. package/_dist/components/Panel/Panel.d.ts +29 -14
  6. package/_dist/components/Popover/Popover.d.ts +51 -27
  7. package/_dist/components/Skiplink/Skiplink.d.ts +20 -14
  8. package/_dist/components/Tag/Tag.d.ts +37 -21
  9. package/_dist/components/badges/IndicatorBadge/IndicatorBadge.d.ts +2 -3
  10. package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +2 -3
  11. package/_dist/components/badges/Tally/Tally.d.ts +3 -3
  12. package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +1 -2
  13. package/_dist/components/inputs/TextInput/TextInput.d.ts +123 -0
  14. package/_dist/components/inputs/input-utilities.d.ts +44 -0
  15. package/_dist/components/notifications/InlineMessage/InlineMessage.d.ts +1 -1
  16. package/_dist/components/notifications/SectionMessage/SectionMessage.d.ts +2 -2
  17. package/_dist/components/progress-indicators/Spinner/Spinner.d.ts +28 -16
  18. package/_dist/css/component-css/pds-button.css +1 -1
  19. package/_dist/css/component-css/pds-dashboard-nav.css +2 -2
  20. package/_dist/css/component-css/pds-index.css +5 -5
  21. package/_dist/css/component-css/pds-input-group.css +1 -1
  22. package/_dist/css/component-css/pds-input-utilities.css +1 -0
  23. package/_dist/css/component-css/pds-panel.css +1 -1
  24. package/_dist/css/component-css/pds-skiplink.css +1 -1
  25. package/_dist/css/component-css/pds-text-input.css +1 -0
  26. package/_dist/css/component-css/pds-workspace-selector.css +1 -1
  27. package/_dist/css/pds-components.css +5 -5
  28. package/_dist/css/pds-layouts.css +1 -1
  29. package/_dist/index.css +1 -1
  30. package/_dist/index.d.ts +14 -13
  31. package/_dist/index.js +3385 -3301
  32. package/_dist/index.js.map +1 -1
  33. package/_dist/layouts/DashboardLayout/DashboardLayout.d.ts +2 -3
  34. package/package.json +2 -1
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, ComponentPropsWithoutRef } from 'react';
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import './cta-link.css';
3
3
  export interface CTALinkProps extends ComponentPropsWithoutRef<'div'> {
4
4
  /**
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
2
  import './callout.css';
3
- interface CalloutProps {
3
+ export interface CalloutProps extends ComponentPropsWithoutRef<'div'> {
4
4
  /**
5
5
  * Callout main content.
6
6
  */
@@ -22,4 +22,3 @@ interface CalloutProps {
22
22
  * Callout UI component
23
23
  */
24
24
  export declare const Callout: ({ children, title, type, className, ...props }: CalloutProps) => React.JSX.Element;
25
- export {};
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, ComponentPropsWithoutRef } from 'react';
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import './comparison-list.css';
3
3
  interface TypeLabels {
4
4
  included: string;
@@ -33,7 +33,7 @@ export interface ComparisonListProps extends ComponentPropsWithoutRef<'div'> {
33
33
  /**
34
34
  * Additional class names
35
35
  */
36
- className: string;
36
+ className?: string;
37
37
  }
38
38
  /**
39
39
  * ComparisonList UI component
@@ -1,25 +1,40 @@
1
- export function Modal({ ariaLabel, children, hasCloseButton, modalIsOpen, setModalIsOpen, size, title, className, ...props }: {
2
- [x: string]: any;
3
- ariaLabel: any;
4
- children: any;
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import './modal.css';
3
+ export interface ModalProps extends ComponentPropsWithoutRef<'div'> {
4
+ /**
5
+ * Aria label that describes the modal. Will default to the title if not provided.
6
+ */
7
+ ariaLabel?: string;
8
+ /**
9
+ * Main content for modal.
10
+ */
11
+ children?: ReactNode;
12
+ /**
13
+ * Indicates if the built-in close button will be shown.
14
+ */
5
15
  hasCloseButton?: boolean;
16
+ /**
17
+ * Is the modal open?
18
+ */
6
19
  modalIsOpen?: boolean;
7
- setModalIsOpen?: () => void;
8
- size?: string;
9
- title: any;
10
- className: any;
11
- }): React.JSX.Element;
12
- export namespace Modal {
13
- namespace propTypes {
14
- let ariaLabel: PropTypes.Requireable<string>;
15
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
16
- let hasCloseButton: PropTypes.Requireable<boolean>;
17
- let modalIsOpen: PropTypes.Requireable<boolean>;
18
- let setModalIsOpen: PropTypes.Requireable<(...args: any[]) => any>;
19
- let size: PropTypes.Requireable<string>;
20
- let title: PropTypes.Validator<string>;
21
- let className: PropTypes.Requireable<string>;
22
- }
20
+ /**
21
+ * Function to set the modal open state.
22
+ */
23
+ setModalIsOpen?: (isOpen: boolean) => void;
24
+ /**
25
+ * The width of the modal.
26
+ */
27
+ size?: 'sm' | 'md' | 'lg';
28
+ /**
29
+ * Text for modal title
30
+ */
31
+ title: string;
32
+ /**
33
+ * Additional class names
34
+ */
35
+ className?: string;
23
36
  }
24
- import React from 'react';
25
- import PropTypes from 'prop-types';
37
+ /**
38
+ * Modal UI component
39
+ */
40
+ export declare const Modal: ({ ariaLabel, children, hasCloseButton, modalIsOpen, setModalIsOpen, size, title, className, ...props }: ModalProps) => React.JSX.Element;
@@ -1,15 +1,30 @@
1
- export function Panel({ children, variant, className, ...props }: {
2
- [x: string]: any;
3
- children: any;
4
- variant?: string;
5
- className: any;
6
- }): React.JSX.Element;
7
- export namespace Panel {
8
- namespace propTypes {
9
- let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
10
- let variant: PropTypes.Requireable<string>;
11
- let className: PropTypes.Requireable<string>;
12
- }
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import './panel.css';
3
+ type StatusType = 'info' | 'success' | 'warning' | 'critical';
4
+ export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * Panel content.
7
+ */
8
+ children: ReactNode;
9
+ /**
10
+ * Should the panel show a status indicator.
11
+ */
12
+ hasStatusIndicator?: boolean;
13
+ /**
14
+ * Status type for panel. Only renders if `hasStatusIndicator` is true.
15
+ */
16
+ statusType: StatusType;
17
+ /**
18
+ * Which variant of panel to render
19
+ */
20
+ variant?: 'default' | 'sunken' | 'raised' | 'overlay' | 'critical';
21
+ /**
22
+ * Additional class names
23
+ */
24
+ className?: string;
13
25
  }
14
- import React from 'react';
15
- import PropTypes from 'prop-types';
26
+ /**
27
+ * Panel UI component
28
+ */
29
+ export declare const Panel: ({ children, hasStatusIndicator, statusType, variant, className, ...props }: PanelProps) => React.JSX.Element;
30
+ export {};
@@ -1,33 +1,57 @@
1
- export function Popover({ content, customTrigger, hasCloseButton, offsetValue, onClose, placement, title, triggerIcon, triggerAccessibleText, popoverIsOpen, setPopoverIsOpen, className, ...props }: {
2
- [x: string]: any;
3
- content: any;
4
- customTrigger?: boolean;
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import './popover.css';
3
+ interface PopoverProps extends Omit<ComponentPropsWithoutRef<'div'>, 'content'> {
4
+ /**
5
+ * Content to display in the popover.
6
+ */
7
+ content?: ReactNode;
8
+ /**
9
+ * Text or HTML content to use as the trigger instead of an icon. Leave null to use the icon. This allows passing HTML content to customize the trigger appearance or functionality.
10
+ */
11
+ customTrigger?: ReactNode;
12
+ /**
13
+ * Indicates if close button will be shown.
14
+ */
5
15
  hasCloseButton?: boolean;
16
+ /**
17
+ * Additional spacing between the trigger and the popover. Only applies to popovers with a custom trigger. Icon triggers have a fixed spacing.
18
+ */
6
19
  offsetValue?: number;
20
+ /**
21
+ * Callback function that triggers when closing Popover.
22
+ */
7
23
  onClose?: () => void;
8
- placement?: string;
9
- title: any;
10
- triggerIcon?: string;
24
+ /**
25
+ * Preferred placement of the popover in relation to the trigger. Will be modified if there is not enough space.
26
+ */
27
+ placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
28
+ /**
29
+ * Text for popover title
30
+ */
31
+ title?: string;
32
+ /**
33
+ * The accessible text for the trigger. Only necessary when the trigger is an icon.
34
+ */
11
35
  triggerAccessibleText?: string;
36
+ /**
37
+ * Icon to trigger Popover.
38
+ */
39
+ triggerIcon?: 'circleInfo' | 'circleQuestion';
40
+ /**
41
+ * Is the Popover open?
42
+ */
12
43
  popoverIsOpen?: boolean;
13
- setPopoverIsOpen?: () => void;
14
- className: any;
15
- }): React.JSX.Element;
16
- export namespace Popover {
17
- namespace propTypes {
18
- let content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
19
- let customTrigger: PropTypes.Requireable<PropTypes.ReactNodeLike>;
20
- let hasCloseButton: PropTypes.Requireable<boolean>;
21
- let offsetValue: PropTypes.Requireable<number>;
22
- let onClose: PropTypes.Requireable<(...args: any[]) => any>;
23
- let placement: PropTypes.Requireable<string>;
24
- let title: PropTypes.Requireable<string>;
25
- let triggerAccessibleText: PropTypes.Requireable<string>;
26
- let triggerIcon: PropTypes.Requireable<string>;
27
- let popoverIsOpen: PropTypes.Requireable<boolean>;
28
- let setPopoverIsOpen: PropTypes.Requireable<(...args: any[]) => any>;
29
- let className: PropTypes.Requireable<string>;
30
- }
44
+ /**
45
+ * Function to set Popover open state
46
+ */
47
+ setPopoverIsOpen?: (isOpen: boolean) => void;
48
+ /**
49
+ * Additional class names.
50
+ */
51
+ className?: string;
31
52
  }
32
- import React from 'react';
33
- import PropTypes from 'prop-types';
53
+ /**
54
+ * Popover UI component
55
+ */
56
+ export declare const Popover: ({ content, customTrigger, hasCloseButton, offsetValue, onClose, placement, title, triggerIcon, triggerAccessibleText, popoverIsOpen, setPopoverIsOpen, className, ...props }: PopoverProps) => React.JSX.Element;
57
+ export {};
@@ -1,15 +1,21 @@
1
- export function Skiplink({ destination, text, className, ...props }: {
2
- [x: string]: any;
3
- destination?: string;
4
- text?: string;
5
- className: any;
6
- }): React.JSX.Element;
7
- export namespace Skiplink {
8
- namespace propTypes {
9
- let destination: PropTypes.Requireable<string>;
10
- let text: PropTypes.Requireable<string>;
11
- let className: PropTypes.Requireable<string>;
12
- }
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
+ import './skiplink.css';
3
+ interface SkiplinkProps extends ComponentPropsWithoutRef<'a'> {
4
+ /**
5
+ * The ID of the element to skip to.
6
+ */
7
+ destination: string;
8
+ /**
9
+ * The text of the skip link.
10
+ */
11
+ text: string;
12
+ /**
13
+ * Additional class names
14
+ */
15
+ className?: string;
13
16
  }
14
- import React from 'react';
15
- import PropTypes from 'prop-types';
17
+ /**
18
+ * Skiplink UI component
19
+ */
20
+ export declare const Skiplink: ({ destination, text, className, ...props }: SkiplinkProps) => React.JSX.Element;
21
+ export {};
@@ -1,23 +1,39 @@
1
- export function Tag({ linkContent, isRemovable, onRemove, removeLabel, tagColor, tagLabel, className, ...props }: {
2
- [x: string]: any;
3
- linkContent: any;
4
- isRemovable: any;
5
- onRemove: any;
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import './tag.css';
3
+ export declare let tagColors: string[];
4
+ type TagColor = (typeof tagColors)[number];
5
+ interface TagProps extends ComponentPropsWithoutRef<'div'> {
6
+ /**
7
+ * Should the tag be a link? If yes, provide a link element.
8
+ */
9
+ linkContent?: ReactNode;
10
+ /**
11
+ * Should the tag be removable?
12
+ */
13
+ isRemovable?: boolean;
14
+ /**
15
+ * Function to execute when the tag is removed.
16
+ */
17
+ onRemove?: () => void;
18
+ /**
19
+ * Label for the remove button. Tag text will be appended to this label.
20
+ */
6
21
  removeLabel?: string;
7
- tagColor: any;
8
- tagLabel: any;
9
- className: any;
10
- }): React.JSX.Element;
11
- export namespace Tag {
12
- namespace propTypes {
13
- let linkContent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
- let isRemovable: PropTypes.Requireable<boolean>;
15
- let onRemove: PropTypes.Requireable<(...args: any[]) => any>;
16
- let removeLabel: PropTypes.Requireable<string>;
17
- let tagColor: PropTypes.Requireable<string>;
18
- let tagLabel: PropTypes.Validator<string>;
19
- let className: PropTypes.Requireable<string>;
20
- }
22
+ /**
23
+ * Tag color. Will use random color if not selected.
24
+ */
25
+ tagColor?: TagColor;
26
+ /**
27
+ * Tag text
28
+ */
29
+ tagLabel: string;
30
+ /**
31
+ * Additional class names
32
+ */
33
+ className?: string;
21
34
  }
22
- import React from 'react';
23
- import PropTypes from 'prop-types';
35
+ /**
36
+ * Tag UI component
37
+ */
38
+ export declare const Tag: ({ linkContent, isRemovable, onRemove, removeLabel, tagColor, tagLabel, className, ...props }: TagProps) => React.JSX.Element;
39
+ export {};
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
2
  import './indicator-badge.css';
3
3
  /**
4
4
  * IndicatorBadge component props
5
5
  */
6
- interface IndicatorBadgeProps {
6
+ export interface IndicatorBadgeProps extends ComponentPropsWithoutRef<'span'> {
7
7
  /**
8
8
  * Badge color
9
9
  */
@@ -25,4 +25,3 @@ interface IndicatorBadgeProps {
25
25
  * IndicatorBadge UI component
26
26
  */
27
27
  export declare const IndicatorBadge: ({ label, size, color, className, ...props }: IndicatorBadgeProps) => React.JSX.Element;
28
- export {};
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
2
  import './status-badge.css';
3
3
  /**
4
4
  * StatusBadge component props
5
5
  */
6
- interface StatusBadgeProps {
6
+ export interface StatusBadgeProps extends ComponentPropsWithoutRef<'div'> {
7
7
  /**
8
8
  * Background color for badge
9
9
  */
@@ -33,4 +33,3 @@ interface StatusBadgeProps {
33
33
  * StatusBadge UI component
34
34
  */
35
35
  export declare const StatusBadge: ({ color, hasStatusIndicator, label, statusIndicatorText, statusType, className, ...props }: StatusBadgeProps) => React.JSX.Element;
36
- export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
2
  import './tally.css';
3
3
  interface TypeLabels {
4
4
  info?: string;
@@ -10,7 +10,7 @@ interface TypeLabels {
10
10
  /**
11
11
  * Prop types for Tally
12
12
  */
13
- interface TallyProps {
13
+ export interface TallyProps extends ComponentPropsWithoutRef<'div'> {
14
14
  /**
15
15
  * Label text
16
16
  */
@@ -25,7 +25,7 @@ interface TallyProps {
25
25
  typeLabels?: TypeLabels;
26
26
  /**
27
27
  * Additional class names
28
- */
28
+ */
29
29
  className?: string;
30
30
  }
31
31
  /**
@@ -4,7 +4,7 @@ import './segmented-button.css';
4
4
  /**
5
5
  * Prop types for SegmentedButton
6
6
  */
7
- interface SegmentedButtonProps {
7
+ export interface SegmentedButtonProps {
8
8
  /**
9
9
  * Is the ToggleButton disabled?
10
10
  */
@@ -43,4 +43,3 @@ interface SegmentedButtonProps {
43
43
  * SegmentedButton UI component
44
44
  */
45
45
  export declare const SegmentedButton: ({ disabled, id, initialSelection, label, onChange, options, className, ...props }: SegmentedButtonProps) => React.JSX.Element;
46
- export {};
@@ -0,0 +1,123 @@
1
+ import React, { ComponentPropsWithoutRef, ChangeEvent, FocusEvent } from 'react';
2
+ import './text-input.css';
3
+ type TranslationStringProps = {
4
+ clearButton: string;
5
+ counterOverLimit?: string;
6
+ searchShortcut: string;
7
+ visibilityStatus: string;
8
+ visibilityToggleHide: string;
9
+ visibilityToggleShow: string;
10
+ };
11
+ type HtmlInputTypes = 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search';
12
+ type ValidationStatus = 'success' | 'error';
13
+ /**
14
+ * Prop types for TextInput
15
+ */
16
+ export interface TextInputProps extends ComponentPropsWithoutRef<'div'> {
17
+ /**
18
+ * Auto complete attribute for the input field. The attribute value is either the keyword `off` or `on`, or an ordered list of space-separated tokens. Password fields are automatically off.
19
+ */
20
+ autoComplete?: string;
21
+ /**
22
+ * Maximum character count for the character counter. Leave blank for no counter. Not valid for type `password`.
23
+ */
24
+ counterMaxLength?: number;
25
+ /**
26
+ * Initial value for the input field. Only valid if the input is uncontrolled. Cannot be used in conjunction with the `value` prop.
27
+ */
28
+ defaultValue?: string;
29
+ /**
30
+ * Is the field disabled?
31
+ */
32
+ disabled?: boolean;
33
+ /**
34
+ * Does the input contain a clear button?
35
+ */
36
+ hasClearButton?: boolean;
37
+ /**
38
+ * Does the input contain the search shortcut?
39
+ * Only valid if the input type is `search`.
40
+ */
41
+ hasSearchShortcut?: boolean;
42
+ /**
43
+ * Input ID.
44
+ */
45
+ id: string;
46
+ /**
47
+ * Width of the input field. Accepts a number in pixels. Leave blank for width: 100%.
48
+ */
49
+ inputWidth?: number;
50
+ /**
51
+ * Input label.
52
+ */
53
+ label: string;
54
+ /**
55
+ * Input message. Used to provide supplemental text. Will be displayed below the input field.
56
+ */
57
+ message?: string;
58
+ /**
59
+ * onBlur event handler.
60
+ */
61
+ onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
62
+ /**
63
+ * onChange event handler. Controlled inputs should use this to manage the input value. Uncontrolled inputs will manage their own state, but may still use this to access the event object.
64
+ */
65
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
66
+ /**
67
+ * Function to clear the input field. Only necessary if the input is controlled. This functionality is built-in for uncontrolled inputs.
68
+ */
69
+ onClear?: () => void;
70
+ /**
71
+ * onFocus event handler.
72
+ */
73
+ onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
74
+ /**
75
+ * Optional placeholder text to display when the input field is empty.
76
+ */
77
+ placeholder?: string;
78
+ /**
79
+ * Is the field read-only?
80
+ */
81
+ readonly?: boolean;
82
+ /**
83
+ * Is this field required?
84
+ */
85
+ required?: boolean;
86
+ /**
87
+ * Should the label be visible? If false, it will render for screen readers only.
88
+ */
89
+ showLabel?: boolean;
90
+ /**
91
+ * Toggle visibility of the input value. Valid for type `password` only.
92
+ */
93
+ toggleVisibility?: boolean;
94
+ /**
95
+ * Translation strings for various labels or other visually-hidden text.
96
+ */
97
+ translationStrings?: TranslationStringProps;
98
+ /**
99
+ * Type of input field to use.
100
+ */
101
+ type: HtmlInputTypes;
102
+ /**
103
+ * Validation message for the input field based on the validation status.
104
+ */
105
+ validationMessage?: string;
106
+ /**
107
+ * Validation status of the input field.
108
+ */
109
+ validationStatus?: ValidationStatus;
110
+ /**
111
+ * Value of the input field. Used to set the value of the input field when controlled. Cannot be used in conjunction with the `defaultValue` prop.
112
+ */
113
+ value?: string;
114
+ /**
115
+ * Additional class names for input.
116
+ */
117
+ className?: string;
118
+ }
119
+ /**
120
+ * TextInput UI component
121
+ */
122
+ export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
123
+ export {};
@@ -0,0 +1,44 @@
1
+ import React, { MouseEventHandler } from 'react';
2
+ import './input-utilities.css';
3
+ export declare const inputCommonClasses: {
4
+ base: string;
5
+ disabled: string;
6
+ required: string;
7
+ error: string;
8
+ success: string;
9
+ readonly: string;
10
+ };
11
+ export declare const InputLabel: ({ id, label, showLabel, required, disabled, isLegend, }: {
12
+ id: string;
13
+ label: string;
14
+ showLabel: boolean;
15
+ required?: boolean;
16
+ disabled?: boolean;
17
+ isLegend?: boolean;
18
+ }) => React.JSX.Element;
19
+ export declare const InputMessage: ({ id, message, hasValidationMessage, validationStatus, }: {
20
+ id: string;
21
+ message: string;
22
+ hasValidationMessage: boolean;
23
+ validationStatus: string;
24
+ }) => React.JSX.Element;
25
+ type DecoratorVariants = 'search' | 'error' | 'success';
26
+ export declare const InputDecorator: ({ variant }: {
27
+ variant: DecoratorVariants;
28
+ }) => React.JSX.Element;
29
+ export declare const SearchShortcut: ({ inputId, shortcutLabel, }: {
30
+ inputId: string;
31
+ shortcutLabel: string;
32
+ }) => React.JSX.Element;
33
+ export declare const ClearButton: ({ id, clearLabel, handleClearInput, }: {
34
+ id: string;
35
+ clearLabel: string;
36
+ handleClearInput: MouseEventHandler<HTMLButtonElement>;
37
+ }) => React.JSX.Element;
38
+ export declare const CharacterCounter: ({ id, currentLength, maxLength, overLimitMessage, }: {
39
+ id: string;
40
+ currentLength: number;
41
+ maxLength: number;
42
+ overLimitMessage: string;
43
+ }) => React.JSX.Element;
44
+ export {};
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, ComponentPropsWithoutRef } from 'react';
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import './inline-message.css';
3
3
  /**
4
4
  * The type of message to display.
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, MouseEvent, ComponentPropsWithoutRef } from 'react';
1
+ import React, { ComponentPropsWithoutRef, MouseEvent, ReactNode } from 'react';
2
2
  import './section-message.css';
3
3
  type MessageType = 'info' | 'success' | 'warning' | 'critical' | 'discovery';
4
4
  type TypeLabels = Record<MessageType, string>;
@@ -38,7 +38,7 @@ export interface SectionMessageProps extends ComponentPropsWithoutRef<'div'> {
38
38
  /**
39
39
  * Additional class names.
40
40
  */
41
- className: string;
41
+ className?: string;
42
42
  }
43
43
  /**
44
44
  * SectionMessage UI component
@@ -1,21 +1,33 @@
1
- export function Spinner({ colorType, isInline, label, showLabel, size, className, ...props }: {
2
- [x: string]: any;
3
- colorType?: string;
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
+ import './spinner.css';
3
+ interface SpinnerProps extends ComponentPropsWithoutRef<'span'> {
4
+ /**
5
+ * Spinner color
6
+ */
7
+ colorType?: 'full-color' | 'monochromatic' | 'monochromatic-reverse';
8
+ /**
9
+ * Should the spinner be an inline element? If true, it will be displayed inline-block without a visible label.
10
+ */
4
11
  isInline?: boolean;
12
+ /**
13
+ * Spinner label. Will be displayed below the Spinner if `showLabel` is true.
14
+ */
5
15
  label?: string;
16
+ /**
17
+ * Should the label be visible? If false, it will render for screen readers only.
18
+ */
6
19
  showLabel?: boolean;
7
- size?: string;
20
+ /**
21
+ * Spinner size
22
+ */
23
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
24
+ /**
25
+ * Additional class names
26
+ */
8
27
  className?: string;
9
- }): React.JSX.Element;
10
- export namespace Spinner {
11
- namespace propTypes {
12
- let colorType: PropTypes.Requireable<string>;
13
- let isInline: PropTypes.Requireable<boolean>;
14
- let label: PropTypes.Validator<string>;
15
- let showLabel: PropTypes.Requireable<boolean>;
16
- let size: PropTypes.Requireable<string>;
17
- let className: PropTypes.Requireable<string>;
18
- }
19
28
  }
20
- import React from 'react';
21
- import PropTypes from 'prop-types';
29
+ /**
30
+ * Spinner UI component
31
+ */
32
+ export declare const Spinner: ({ colorType, isInline, label, showLabel, size, className, ...props }: SpinnerProps) => React.JSX.Element;
33
+ export {};
@@ -2,7 +2,7 @@ a.pds-button,button.pds-button{--pds-button-color-background:var(
2
2
  --pds-color-button-primary-background-default
3
3
  );--pds-button-color-foreground:var(
4
4
  --pds-color-button-primary-foreground-default
5
- );--pds-button-color-border:var(--pds-color-button-primary-border-default);align-items:center;background-color:var(--pds-button-color-background);border:.0625rem solid var(--pds-button-color-border);border-radius:.1875rem;box-sizing:border-box;color:var(--pds-button-color-foreground);cursor:pointer;display:inline-flex;font-family:Poppins,sans-serif;font-size:1rem;font-weight:600;gap:.64rem;height:2.441rem;justify-content:center;letter-spacing:0;line-height:1;max-height:2.441rem;padding:.64rem .8rem;text-decoration:none;transition:all .2s ease-in-out 0s;white-space:nowrap}.pds-button__icon--wrapper{align-items:center;display:flex}.pds-button__loading-indicator{--pds-spinner-size:1rem;--pds-spinner-color-1:#fff;--pds-spinner-color-2:#f1f1f1;--pds-spinner-color-3:#cfcfd3}a.pds-button:disabled,button.pds-button:disabled{cursor:not-allowed;opacity:50%}a.pds-button:hover,button.pds-button:hover:enabled{--pds-button-color-background:var(
5
+ );--pds-button-color-border:var(--pds-color-button-primary-border-default);align-items:center;background-color:var(--pds-button-color-background);border:.0625rem solid var(--pds-button-color-border);border-radius:.1875rem;box-sizing:border-box;color:var(--pds-button-color-foreground);cursor:pointer;display:inline-flex;font-family:Poppins,sans-serif;font-size:1rem;font-weight:600;gap:.64rem;height:2.441rem;justify-content:center;letter-spacing:0;line-height:1;max-height:2.441rem;padding:.64rem .8rem;text-decoration:none;transition:all .2s ease-in-out 0s;white-space:nowrap}.pds-button__icon--wrapper{align-items:center;display:flex}.pds-button__icon{flex-shrink:0}.pds-button__loading-indicator{--pds-spinner-size:1rem;--pds-spinner-color-1:#fff;--pds-spinner-color-2:#f1f1f1;--pds-spinner-color-3:#cfcfd3}a.pds-button:disabled,button.pds-button:disabled{cursor:not-allowed;opacity:50%}a.pds-button:hover,button.pds-button:hover:enabled{--pds-button-color-background:var(
6
6
  --pds-color-button-primary-background-hover
7
7
  );--pds-button-color-border:var(--pds-color-button-primary-border-hover);--pds-button-color-foreground:var(
8
8
  --pds-color-button-primary-foreground-hover