@pantheon-systems/pds-toolkit-react 1.0.0-beta.5 → 1.0.0-beta.7

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 (55) hide show
  1. package/_dist/components/Callout/Callout.d.ts +2 -1
  2. package/_dist/components/DashboardStat/DashboardStat.d.ts +2 -2
  3. package/_dist/components/StatusIndicator/StatusIndicator.d.ts +2 -1
  4. package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +2 -1
  5. package/_dist/components/buttons/Button/Button.d.ts +5 -4
  6. package/_dist/components/buttons/IconButton/IconButton.d.ts +3 -2
  7. package/_dist/components/buttons/MenuButton/MenuButton.d.ts +3 -3
  8. package/_dist/components/buttons/SplitButton/SplitButton.d.ts +3 -3
  9. package/_dist/components/cards/Card/Card.d.ts +1 -1
  10. package/_dist/components/inputs/Checkbox/Checkbox.d.ts +1 -1
  11. package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +1 -1
  12. package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  13. package/_dist/components/inputs/Combobox/Combobox.d.ts +1 -1
  14. package/_dist/components/inputs/FileUpload/FileUpload.d.ts +1 -1
  15. package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -1
  16. package/_dist/components/inputs/Select/Select.d.ts +1 -1
  17. package/_dist/components/inputs/Select/select-sample-data.d.ts +6 -0
  18. package/_dist/components/inputs/TextInput/TextInput.d.ts +3 -3
  19. package/_dist/components/inputs/Textarea/Textarea.d.ts +4 -3
  20. package/_dist/components/navigation/ButtonNav/ButtonNav.d.ts +1 -1
  21. package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +3 -3
  22. package/_dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +1 -1
  23. package/_dist/components/navigation/NavMenu/NavMenu.d.ts +2 -2
  24. package/_dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +2 -2
  25. package/_dist/components/navigation/SideNav/SideNav.d.ts +1 -1
  26. package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +1 -1
  27. package/_dist/components/navigation/SideNavGlobal/SideNavGlobalItem.d.ts +3 -3
  28. package/_dist/components/navigation/TabMenu/TabMenu.d.ts +3 -3
  29. package/_dist/components/navigation/TabMenu/TabMenuDropdown.d.ts +3 -3
  30. package/_dist/components/navigation/navigation-utilities.d.ts +1 -1
  31. package/_dist/components/notifications/Banner/Banner.d.ts +3 -1
  32. package/_dist/components/notifications/InlineMessage/InlineMessage.d.ts +2 -1
  33. package/_dist/components/notifications/SectionMessage/SectionMessage.d.ts +2 -1
  34. package/_dist/components/panels/Panel/Panel.d.ts +11 -4
  35. package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +2 -1
  36. package/_dist/css/component-css/pds-combobox-multiselect.css +1 -1
  37. package/_dist/css/component-css/pds-combobox.css +1 -1
  38. package/_dist/css/component-css/pds-index.css +3 -3
  39. package/_dist/css/component-css/pds-navbar.css +1 -1
  40. package/_dist/css/pds-components.css +3 -3
  41. package/_dist/index.css +1 -1
  42. package/_dist/index.d.ts +3 -1
  43. package/_dist/index.js +4494 -4384
  44. package/_dist/index.js.map +1 -1
  45. package/_dist/layouts/FlexContainer/FlexContainer.d.ts +1 -1
  46. package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +1 -1
  47. package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +1 -1
  48. package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +1 -1
  49. package/_dist/libs/types/custom-types.d.ts +4 -1
  50. package/_dist/{components/navigation → libs/types}/navigation-types.d.ts +2 -2
  51. package/_dist/mocks/data/navigation-items.d.ts +2 -2
  52. package/_dist/utilities/context-providers/OverlayContext/OverlayContext.d.ts +12 -0
  53. package/package.json +5 -5
  54. /package/_dist/{components/inputs → libs/types}/input-types.d.ts +0 -0
  55. /package/_dist/{layouts → libs/types}/layout-types.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { GridGapOptions } from '@layouts/layout-types';
2
+ import { GridGapOptions } from '@libs/types/layout-types';
3
3
  import './flex-container.css';
4
4
  type FlexAlignContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';
5
5
  type FlexAlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { GridGapOptions } from '@layouts/layout-types';
2
+ import { GridGapOptions } from '@libs/types/layout-types';
3
3
  /**
4
4
  * Prop types for SidebarLayout
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { GridGapOptions, VerticalAlignOptions } from '@layouts/layout-types';
2
+ import { GridGapOptions, VerticalAlignOptions } from '@libs/types/layout-types';
3
3
  import '../../utilities/grid/grid.css';
4
4
  import './three-item-layout.css';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { GridGapOptions, VerticalAlignOptions } from '@layouts/layout-types';
2
+ import { GridGapOptions, VerticalAlignOptions } from '@libs/types/layout-types';
3
3
  import '../../utilities/grid/grid.css';
4
4
  import './two-item-layout.css';
5
5
  /**
@@ -4,9 +4,12 @@ export type BadgeColor = 'success' | 'critical' | 'info' | 'warning' | 'neutral'
4
4
  export type ButtonDisplayType = 'label-only' | 'icon-start' | 'icon-end';
5
5
  export type ButtonSize = 'sm' | 'md' | 'lg';
6
6
  export type ButtonType = 'button' | 'submit' | 'reset';
7
- export type ButtonVariant = 'primary' | 'secondary' | 'subtle' | 'brand' | 'brand-secondary' | 'critical' | 'navbar' | 'inline';
7
+ export type ButtonVariant = 'primary' | 'secondary' | 'subtle' | 'brand' | 'brand-secondary' | 'critical' | 'critical-secondary' | 'navbar' | 'inline';
8
8
  export type ContainerWidth = 'narrow' | 'standard' | 'wide' | 'x-wide' | 'full';
9
9
  export type Display = 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid' | 'flow-root' | 'none' | 'contents' | 'table' | 'table-row' | 'table-cell' | 'table-caption' | 'table-column' | 'table-column-group' | 'table-footer-group' | 'table-header-group' | 'table-row-group' | 'list-item' | 'inherit' | 'initial' | 'revert' | 'unset';
10
+ export type StatusType = 'info' | 'success' | 'warning' | 'critical' | 'discovery';
11
+ export type StatusTypeExtended = StatusType | 'neutral' | 'working';
12
+ export declare const StatusTypeLabels: Record<StatusType, string>;
10
13
  export type FuiOffset = number | {
11
14
  alignmentAxis?: number | null;
12
15
  crossAxis?: number;
@@ -27,11 +27,11 @@ export type FlattenedNavigationItem = {
27
27
  */
28
28
  linkContent: ReactElement;
29
29
  };
30
- export interface MenuItem {
30
+ export interface NavMenuItem {
31
31
  id?: string;
32
32
  isActive?: boolean;
33
33
  isSeparator?: boolean;
34
34
  label: string;
35
35
  linkContent?: ReactElement;
36
- links?: MenuItem[];
36
+ links?: NavMenuItem[];
37
37
  }
@@ -55,7 +55,7 @@ export declare const micrositeMenuItems: ({
55
55
  label?: undefined;
56
56
  links?: undefined;
57
57
  })[];
58
- export declare const navMenuSampleMenuItems: ({
58
+ export declare const navMenuSampleNavMenuItems: ({
59
59
  label: string;
60
60
  links: ({
61
61
  linkContent: import("react/jsx-runtime").JSX.Element;
@@ -77,7 +77,7 @@ export declare const navMenuSampleMenuItems: ({
77
77
  links?: undefined;
78
78
  isActive?: undefined;
79
79
  })[];
80
- export declare const navMenuSampleMenuItemsRR: ({
80
+ export declare const navMenuSampleNavMenuItemsRR: ({
81
81
  label: string;
82
82
  links: ({
83
83
  linkContent: import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface OverlayContextType {
3
+ closeOverlay: () => void;
4
+ hasOpenOverlay: boolean;
5
+ openOverlay: () => void;
6
+ }
7
+ export declare const OverlayContext: React.Context<OverlayContextType>;
8
+ export declare const OverlayContextProvider: ({ children, }: {
9
+ children: ReactNode;
10
+ }) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const useOverlayContext: () => OverlayContextType;
12
+ export {};
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-beta.5",
4
+ "version": "1.0.0-beta.7",
5
5
  "description": "PDS toolkit built using the React framework",
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -38,7 +38,7 @@
38
38
  "type": "module",
39
39
  "scripts": {
40
40
  "build": "npm run vite build && npm run build:types || true",
41
- "build:types": "tsc -p tsconfig.build.json",
41
+ "build:types": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
42
42
  "postbuild": "npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run build:css:packageExtraCss",
43
43
  "build:css": "postcss src/core.css -o _dist/css/pds-core.css",
44
44
  "build:css:components": "postcss src/components/index.css -o _dist/css/pds-components.css",
@@ -128,6 +128,7 @@
128
128
  "react": "^18.2.0",
129
129
  "react-dom": "^18.2.0",
130
130
  "storybook": "^9.1.12",
131
+ "tsc-alias": "^1.8.16",
131
132
  "typescript": "^5.4.5",
132
133
  "vite": "^7.2.2",
133
134
  "vite-plugin-lib-inject-css": "^2.1.1",
@@ -156,8 +157,7 @@
156
157
  "react-toastify": "^9.0.3"
157
158
  },
158
159
  "lint-staged": {
159
- "src/**/*.{js,jsx,ts,tsx}": [
160
- "npm run eslint"
161
- ]
160
+ "*": "prettier --write --ignore-unknown",
161
+ "src/**/*.{js,jsx,ts,tsx}": "npm run eslint -- --fix"
162
162
  }
163
163
  }
File without changes