@pantheon-systems/pds-toolkit-react 1.0.0-dev.199 → 1.0.0-dev.200

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.
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { HeadingLevel } from '@libs/types/custom-types';
3
3
  interface HxProps {
4
4
  baseClass?: string;
@@ -6,7 +6,8 @@ interface HxProps {
6
6
  className?: string;
7
7
  level: HeadingLevel;
8
8
  }
9
- export declare const Hx: ({ baseClass, children, level, className, ...props }: HxProps) => import("react").DetailedReactHTMLElement<{
9
+ export declare const Hx: ({ baseClass, children, level, className, ...props }: HxProps) => React.DetailedReactHTMLElement<{
10
10
  className: any;
11
11
  }, HTMLElement>;
12
+ export declare const extractText: (node: ReactNode) => string;
12
13
  export {};
@@ -12,7 +12,33 @@ export type FuiOffset = number | {
12
12
  alignmentAxis?: number | null;
13
13
  };
14
14
  export type FuiPlacement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
15
+ export type HeadingItemType = {
16
+ /**
17
+ * Label for a menu item
18
+ */
19
+ label: string;
20
+ /**
21
+ * Is the item a heading?
22
+ */
23
+ isHeading: boolean;
24
+ };
15
25
  export type HeadingLevel = 'h2' | 'h3' | 'h4' | 'span';
26
+ export type NodeItemType = {
27
+ /**
28
+ * Is the item a node?
29
+ */
30
+ isNode: boolean;
31
+ /**
32
+ * The content of the node.
33
+ */
34
+ nodeContent?: ReactNode;
35
+ };
36
+ export type SeparatorItemType = {
37
+ /**
38
+ * Is the item a separator?
39
+ */
40
+ isSeparator: boolean;
41
+ };
16
42
  export type SitePlanLevel = 'basic' | 'performance-small' | 'performance-medium' | 'performance-large' | 'performance-xl' | 'elite';
17
43
  export declare const SitePlanLevelLabel: Record<SitePlanLevel, string>;
18
44
  export type SiteStatus = 'active' | 'frozen';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pantheon-systems/pds-toolkit-react",
3
3
  "technology": "React",
4
- "version": "1.0.0-dev.199",
4
+ "version": "1.0.0-dev.200",
5
5
  "description": "PDS toolkit built using the React framework",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1 +0,0 @@
1
- export const iconList: string[];
@@ -1,85 +0,0 @@
1
- export const PDSIcon: PropTypes.Requireable<string>;
2
- export const ContainerWidth: PropTypes.Requireable<string>;
3
- export const HeadingItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
4
- /**
5
- * Label for a menu item
6
- */
7
- label: PropTypes.Validator<string>;
8
- /**
9
- * Is the item a heading?
10
- */
11
- isHeading: PropTypes.Validator<boolean>;
12
- }>>>;
13
- export const LinkItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
14
- /**
15
- * Description of the item
16
- */
17
- description: PropTypes.Requireable<string>;
18
- /**
19
- * Is this item disabled?
20
- */
21
- disabled: PropTypes.Requireable<boolean>;
22
- /**
23
- * Optional icon for this item. Choose from available icons in the Icon component.
24
- */
25
- iconName: PropTypes.Requireable<string>;
26
- /**
27
- * Is the item a link?
28
- */
29
- isLink: PropTypes.Validator<boolean>;
30
- /**
31
- * The content of the link.
32
- */
33
- linkContent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
34
- /**
35
- * Optional `data-testid` value for this item.
36
- */
37
- testId: PropTypes.Requireable<string>;
38
- }>>>;
39
- export const MenuItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
40
- /**
41
- * (optional) Callback function to execute when menu item is activated
42
- */
43
- callback: PropTypes.Requireable<(...args: any[]) => any>;
44
- /**
45
- * Description of the item
46
- */
47
- description: PropTypes.Requireable<string>;
48
- /**
49
- * Is this item disabled?
50
- */
51
- disabled: PropTypes.Requireable<boolean>;
52
- /**
53
- * Optional icon for this item. Choose from available icons in the Icon component.
54
- */
55
- iconName: PropTypes.Requireable<string>;
56
- /**
57
- * Optional ID value for this item.
58
- */
59
- id: PropTypes.Requireable<string>;
60
- /**
61
- * Label for a menu item
62
- */
63
- label: PropTypes.Validator<string>;
64
- /**
65
- * Optional `data-testid` value for this item.
66
- */
67
- testId: PropTypes.Requireable<string>;
68
- }>>>;
69
- export const NodeItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
70
- /**
71
- * Is the item a node?
72
- */
73
- isNode: PropTypes.Validator<boolean>;
74
- /**
75
- * The content of the node.
76
- */
77
- nodeContent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
78
- }>>>;
79
- export const SeparatorItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
80
- /**
81
- * Is the item a separator?
82
- */
83
- isSeparator: PropTypes.Validator<boolean>;
84
- }>>>;
85
- import PropTypes from 'prop-types';