@pantheon-systems/pds-toolkit-react 2.0.0-alpha.45 → 2.0.0-alpha.47

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.
@@ -126,6 +126,7 @@ export * from './utilities/grid/GridItem';
126
126
  export * from './utilities/hooks/useBreakpoint/useBreakpoint';
127
127
  export * from './utilities/hooks/useClipboard/useClipboard';
128
128
  export * from './utilities/hooks/useDropdown';
129
+ export * from './utilities/hooks/useIsMobile/useIsMobile';
129
130
  export * from './utilities/hooks/useKeyPress/useKeyPress';
130
131
  export * from './utilities/hooks/useMediaQuery/useMediaQuery';
131
132
  export * from './utilities/hooks/useWindowWidth/useWindowWidth';
@@ -12,9 +12,13 @@ interface StepperLayoutProps {
12
12
  * Additional class names
13
13
  */
14
14
  className?: string;
15
+ /**
16
+ * Wrap the entire experience (stepper, form, and buttons) in a Panel.
17
+ */
18
+ hasPanel?: boolean;
15
19
  }
16
20
  /**
17
21
  * StepperLayout UI component
18
22
  */
19
- export declare const StepperLayout: ({ children, className, ...props }: StepperLayoutProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const StepperLayout: ({ children, className, hasPanel, ...props }: StepperLayoutProps) => import("react/jsx-runtime").JSX.Element;
20
24
  export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Returns whether the layout is currently in its mobile presentation, tracking
3
+ * the `data-pds-mobile` attribute that `GlobalWrapper` sets on the document
4
+ * root. Reactive: updates when the breakpoint is crossed.
5
+ *
6
+ * Use this to render only the active responsive variant of a component, rather
7
+ * than mounting both a mobile and a desktop tree and toggling them with CSS —
8
+ * mounting both duplicates any ids in the slotted content (invalid HTML) and
9
+ * makes `getElementById`/`htmlFor`/`aria-controls` resolve to the hidden copy.
10
+ *
11
+ * SSR-safe: resolves to `false` (desktop) on the server and on the first client
12
+ * render, then updates after `GlobalWrapper` applies the attribute.
13
+ *
14
+ * @returns {boolean} `true` when the mobile presentation is active.
15
+ */
16
+ export declare const useIsMobile: () => boolean;
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.45",
4
+ "version": "2.0.0-alpha.47",
5
5
  "description": "PDS toolkit built using the React framework",
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -181,7 +181,7 @@
181
181
  "@dnd-kit/utilities": "^3.2.2",
182
182
  "@floating-ui/react": "^0.24.3",
183
183
  "@floating-ui/react-dom": "~1.3.0",
184
- "@pantheon-systems/pds-design-tokens": "^2.0.0-alpha.57",
184
+ "@pantheon-systems/pds-design-tokens": "^2.0.0-alpha.58",
185
185
  "@reactuses/core": "^5.0.15",
186
186
  "date-fns": "^4.1.0",
187
187
  "downshift": "^9.3.2",