@pantheon-systems/pds-toolkit-react 2.0.0-alpha.75 → 2.0.0-alpha.77
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/Dropdown/Dropdown.d.ts +67 -2
- package/dist/components/RowActionsMenu/RowActionsMenu.d.ts +46 -0
- package/dist/components/Table/Table.d.ts +73 -7
- package/dist/components/buttons/MenuButton/MenuButton.d.ts +20 -4
- package/dist/components/buttons/SelectButton/SelectButton.d.ts +81 -0
- package/dist/components/empty-states/VerticalEmptyState/VerticalEmptyState.d.ts +3 -2
- package/dist/components/icons/Icon/generated-icon-data.d.ts +16 -2
- package/dist/components/notifications/SectionMessage/SectionMessage.d.ts +7 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +66 -0
- package/dist/components/overlays/BulkActionBar/BulkActionBar.d.ts +48 -0
- package/dist/components/pagination/PaginationCompact/PaginationCompact.d.ts +7 -2
- package/dist/css/component-css/pds-bottom-sheet.css +1 -0
- package/dist/css/component-css/pds-bulk-action-bar.css +1 -0
- package/dist/css/component-css/pds-dropdown.css +3 -2
- package/dist/css/component-css/pds-filter-button.css +1 -1
- package/dist/css/component-css/pds-icon-button.css +21 -15
- package/dist/css/component-css/pds-index.css +33 -23
- package/dist/css/component-css/pds-pagination-compact.css +1 -1
- package/dist/css/component-css/pds-row-actions-menu.css +2 -0
- package/dist/css/component-css/pds-section-message.css +1 -1
- package/dist/css/component-css/pds-select-button.css +1 -0
- package/dist/css/component-css/pds-table.css +4 -2
- package/dist/css/component-css/pds-user-menu.css +1 -1
- package/dist/css/component-css/pds-utility-bar.css +1 -1
- package/dist/css/design-tokens/variables.dark.css +1 -18
- package/dist/css/design-tokens/variables.light.css +1 -18
- package/dist/css/layout-css/pds-sidebar-layout.css +11 -3
- package/dist/css/pds-components.css +33 -23
- package/dist/css/pds-core.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2139 -1771
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +5 -0
- package/dist/layouts/SidebarLayout/SidebarLayout.d.ts +22 -3
- package/dist/svg/arrowDownWideShort.svg +3 -0
- package/dist/svg/arrowUpShortWide.svg +3 -0
- package/dist/utilities/auto-grid/AutoGrid.d.ts +48 -0
- package/dist/utilities/hooks/useDropdown/useDropdown.d.ts +11 -1
- package/package.json +2 -2
package/dist/index.source.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './components/buttons/FilterButton/FilterButton';
|
|
|
11
11
|
export * from './components/buttons/IconButton/IconButton';
|
|
12
12
|
export * from './components/buttons/MenuButton/MenuButton';
|
|
13
13
|
export * from './components/buttons/SegmentedButton/SegmentedButton';
|
|
14
|
+
export * from './components/buttons/SelectButton/SelectButton';
|
|
14
15
|
export * from './components/buttons/SplitButton/SplitButton';
|
|
15
16
|
export * from './components/buttons/SSOButton/SSOButton';
|
|
16
17
|
export * from './components/buttons/UtilityButton/UtilityButton';
|
|
@@ -74,6 +75,8 @@ export * from './components/notifications/SectionMessage/SectionMessage';
|
|
|
74
75
|
export * from './components/notifications/Toaster/Toast';
|
|
75
76
|
export * from './components/notifications/Toaster/Toaster';
|
|
76
77
|
export * from './components/notifications/Toaster/useToast';
|
|
78
|
+
export * from './components/overlays/BottomSheet/BottomSheet';
|
|
79
|
+
export * from './components/overlays/BulkActionBar/BulkActionBar';
|
|
77
80
|
export * from './components/overlays/Drawer/Drawer';
|
|
78
81
|
export * from './components/overlays/FullScreenOverlay/FullScreenOverlay';
|
|
79
82
|
export * from './components/overlays/Modal/Modal';
|
|
@@ -91,6 +94,7 @@ export * from './components/Popover/Popover';
|
|
|
91
94
|
export * from './components/progress-indicators/ProgressBar/ProgressBar';
|
|
92
95
|
export * from './components/progress-indicators/ProgressRing/ProgressRing';
|
|
93
96
|
export * from './components/ResultCount/ResultCount';
|
|
97
|
+
export * from './components/RowActionsMenu/RowActionsMenu';
|
|
94
98
|
export * from './components/SiteFooter/SiteFooter';
|
|
95
99
|
export * from './components/SiteSearch/SiteSearch';
|
|
96
100
|
export * from './components/SortableList/SortableList';
|
|
@@ -125,6 +129,7 @@ export * from './libs/types/custom-types';
|
|
|
125
129
|
export * from './libs/types/input-types';
|
|
126
130
|
export * from './libs/types/layout-types';
|
|
127
131
|
export * from './libs/types/navigation-types';
|
|
132
|
+
export * from './utilities/auto-grid/AutoGrid';
|
|
128
133
|
export * from './utilities/context-providers/ThemeContext/ThemeContext';
|
|
129
134
|
export * from './utilities/grid/Grid';
|
|
130
135
|
export * from './utilities/grid/GridItem';
|
|
@@ -7,7 +7,8 @@ import './sidebar-layout.css';
|
|
|
7
7
|
interface SidebarLayoutProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
8
|
/**
|
|
9
9
|
* Children to render in the layout. Main content can be passed without a slot attribute (unslotted).
|
|
10
|
-
* Optional named slots: `sidebar` for sidebar content, `
|
|
10
|
+
* Optional named slots: `sidebar` for sidebar content, `second-sidebar` for a second, opposite-side
|
|
11
|
+
* sidebar, `content` for backwards compatibility.
|
|
11
12
|
*/
|
|
12
13
|
children: ReactNode;
|
|
13
14
|
/**
|
|
@@ -15,10 +16,28 @@ interface SidebarLayoutProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
15
16
|
*/
|
|
16
17
|
className?: string;
|
|
17
18
|
/**
|
|
18
|
-
* Gap between the main content and sidebar, from the numbered spacing scale.
|
|
19
|
+
* Gap between the main content and sidebar(s), from the numbered spacing scale.
|
|
19
20
|
* Defaults to `xl`.
|
|
20
21
|
*/
|
|
21
22
|
gridGap?: GapScale;
|
|
23
|
+
/**
|
|
24
|
+
* Mobile position of the `second-sidebar` slot: `'before'` or `'after'` (default) the main content.
|
|
25
|
+
* When both sidebars resolve to `'after'`, they stack in the same left-to-right order they have
|
|
26
|
+
* on desktop.
|
|
27
|
+
*/
|
|
28
|
+
secondSidebarMobileLocation?: 'before' | 'after';
|
|
29
|
+
/**
|
|
30
|
+
* Width of the second sidebar as a percentage (e.g. `'33%'`). Defaults to `sidebarWidth`.
|
|
31
|
+
*/
|
|
32
|
+
secondSidebarWidth?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Maximum width of the second sidebar in rems. Defaults to `sidebarWidthMax`.
|
|
35
|
+
*/
|
|
36
|
+
secondSidebarWidthMax?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Minimum width of the second sidebar in rems. Defaults to `sidebarWidthMin`.
|
|
39
|
+
*/
|
|
40
|
+
secondSidebarWidthMin?: number;
|
|
22
41
|
/**
|
|
23
42
|
* Sidebar location.
|
|
24
43
|
*/
|
|
@@ -43,5 +62,5 @@ interface SidebarLayoutProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
43
62
|
/**
|
|
44
63
|
* SidebarLayout UI component
|
|
45
64
|
*/
|
|
46
|
-
export declare const SidebarLayout: ({ children, className, gridGap, sidebarLocation, sidebarMobileLocation, sidebarWidth, sidebarWidthMax, sidebarWidthMin, ...props }: SidebarLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare const SidebarLayout: ({ children, className, gridGap, secondSidebarMobileLocation, secondSidebarWidth, secondSidebarWidthMax, secondSidebarWidthMin, sidebarLocation, sidebarMobileLocation, sidebarWidth, sidebarWidthMax, sidebarWidthMin, ...props }: SidebarLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
66
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor" aria-hidden="true" focusable="false" role="img">
|
|
2
|
+
<path d="M249 369L145 473c-9.4 9.4-24.6 9.4-33.9 0L7 369c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l63 63 0-342.1c0-13.3 10.7-24 24-24s24 10.7 24 24l0 342.1 63-63c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zm63 111c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-48 0zm0-128c-13.3 0-24-10.7-24-24s10.7-24 24-24l112 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-112 0zm0-128c-13.3 0-24-10.7-24-24s10.7-24 24-24l176 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-176 0zm0-128c-13.3 0-24-10.7-24-24s10.7-24 24-24l240 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L312 96z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor" aria-hidden="true" focusable="false" role="img">
|
|
2
|
+
<path d="M145 39c-9.4-9.4-24.6-9.4-33.9 0L7 143c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l63-63 0 342.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-342.1 63 63c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L145 39zm167 9c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm0 128c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0zm0 128c-13.3 0-24 10.7-24 24s10.7 24 24 24l176 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-176 0zm0 128c-13.3 0-24 10.7-24 24s10.7 24 24 24l240 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-240 0z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { GapScale } from '../../libs/types/layout-types';
|
|
3
|
+
import './auto-grid.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for AutoGrid
|
|
6
|
+
*/
|
|
7
|
+
export interface AutoGridProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Grid content. Each child is placed directly as a grid item -- no
|
|
10
|
+
* wrapper component needed.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Additional class names
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Gap between items, from the numbered spacing scale. Fixed at all
|
|
19
|
+
* breakpoints; set `mobileGap` to change it on small screens. Defaults
|
|
20
|
+
* to `xl`.
|
|
21
|
+
*/
|
|
22
|
+
gap?: GapScale;
|
|
23
|
+
/**
|
|
24
|
+
* Minimum width of each item, as a CSS length (e.g. `'13rem'`). Items
|
|
25
|
+
* grow to evenly fill each row up to that width, wrapping to a new row
|
|
26
|
+
* once another item can't fit at it. Every item is always the same
|
|
27
|
+
* width, regardless of how many end up in the last row -- an
|
|
28
|
+
* incomplete row just leaves blank trailing space instead of
|
|
29
|
+
* stretching its items wider.
|
|
30
|
+
*/
|
|
31
|
+
itemMinWidth: string;
|
|
32
|
+
/**
|
|
33
|
+
* Caps the number of columns, regardless of how much width is
|
|
34
|
+
* available. Uncapped by default.
|
|
35
|
+
*/
|
|
36
|
+
maxColumns?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Gap on small (mobile) screens. If not set, uses the same value as `gap`.
|
|
39
|
+
*/
|
|
40
|
+
mobileGap?: GapScale;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* AutoGrid layout component — a responsive grid that fits as many
|
|
44
|
+
* `itemMinWidth`-wide items per row as will fit, evenly filling the row up
|
|
45
|
+
* to that width, and wraps the rest to new rows. Every item is always the
|
|
46
|
+
* same width. Optionally cap the column count with `maxColumns`.
|
|
47
|
+
*/
|
|
48
|
+
export declare const AutoGrid: ({ children, className, gap, itemMinWidth, maxColumns, mobileGap, ...props }: AutoGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Placement } from '@floating-ui/react';
|
|
2
|
-
import { useFloating, useInteractions } from '@floating-ui/react';
|
|
2
|
+
import { useFloating, useFloatingNodeId, useInteractions } from '@floating-ui/react';
|
|
3
3
|
export type DropdownRole = 'menu' | 'listbox' | 'dialog';
|
|
4
4
|
export type DropdownVariant = 'default' | 'input';
|
|
5
5
|
export interface UseDropdownOptions {
|
|
@@ -118,6 +118,16 @@ export interface UseDropdownReturn {
|
|
|
118
118
|
* Ref array for list item DOM nodes (used by useListNavigation).
|
|
119
119
|
*/
|
|
120
120
|
listRef: React.MutableRefObject<any[]>;
|
|
121
|
+
/**
|
|
122
|
+
* This instance's Floating UI tree node ID (`null` when not part of a
|
|
123
|
+
* `<FloatingTree>`). Consumers that can be nested inside another floating
|
|
124
|
+
* panel (e.g. MenuButton, Dropdown) wrap their rendered floating panel in
|
|
125
|
+
* a `<FloatingNode id={nodeId}>` so outside-click/Escape resolve to the
|
|
126
|
+
* correct (innermost) panel when nested. See each consumer's own
|
|
127
|
+
* `useFloatingParentNodeId()` check for whether it also needs to provide
|
|
128
|
+
* its own `<FloatingTree>` (root case) or can join an ancestor's.
|
|
129
|
+
*/
|
|
130
|
+
nodeId: ReturnType<typeof useFloatingNodeId>;
|
|
121
131
|
/**
|
|
122
132
|
* Floating UI refs for the reference and floating elements.
|
|
123
133
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pantheon-systems/pds-toolkit-react",
|
|
3
3
|
"technology": "React",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.77",
|
|
5
5
|
"description": "PDS toolkit built using the React framework",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"@floating-ui/react": "^0.24.3",
|
|
183
183
|
"@floating-ui/react-dom": "~1.3.0",
|
|
184
184
|
"@internationalized/date": "^3.12.2",
|
|
185
|
-
"@pantheon-systems/pds-design-tokens": "^2.0.0-alpha.
|
|
185
|
+
"@pantheon-systems/pds-design-tokens": "^2.0.0-alpha.70",
|
|
186
186
|
"@reactuses/core": "^5.0.15",
|
|
187
187
|
"date-fns": "^4.1.0",
|
|
188
188
|
"downshift": "^9.3.2",
|