@sps-woodland/focused-task 8.51.3 → 8.52.1

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/README.md CHANGED
@@ -1,28 +1,3 @@
1
1
  ## [@sps-woodland/focused-task](https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/focused-task#readme)
2
2
 
3
- SPS Woodland Design System focused task component.
4
-
5
- > **Heads up — this is a wrapper package.** The component source now lives in
6
- > [`@sps-woodland/core`](../core). This package re-exports from core so existing
7
- > imports keep working, but new code should prefer the core paths.
8
-
9
- ### Preferred imports (core)
10
-
11
- ```ts
12
- import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/core/focused-task";
13
- // or, if you only need the actions footer:
14
- import { FocusedTaskActions } from "@sps-woodland/core/focused-task-actions";
15
-
16
- import "@sps-woodland/core/focused-task/style.css";
17
- ```
18
-
19
- `FocusedTask` is barrel-only (the family name and the parent component share a
20
- name). The `useFocusedTask` hook is also barrel-only. `FocusedTaskActions`
21
- additionally has its own flat subpath.
22
-
23
- ### Legacy imports (still supported)
24
-
25
- ```ts
26
- import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
27
- import "@sps-woodland/focused-task/style.css";
28
- ```
3
+ SPS Woodland Design System focused task component
@@ -0,0 +1,14 @@
1
+ import type { VariantDefinitions, BooleanRecipeVariant } from "@sps-woodland/core";
2
+ interface FocusedTaskVariantDefinitions extends VariantDefinitions {
3
+ fullWidth: BooleanRecipeVariant;
4
+ }
5
+ export declare const focusedTask: string;
6
+ export declare const body: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<FocusedTaskVariantDefinitions>;
7
+ export declare const title: string;
8
+ export declare const closeButtonBox: string;
9
+ export declare const closeButtonIcon: string;
10
+ export declare const underlay: string;
11
+ export declare const listActionBarContainer: string;
12
+ export declare const listActionBar: string;
13
+ export declare const listActionBarActions: string;
14
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { ComponentProps, ChildrenFn } from "@sps-woodland/core";
2
+ import type { AriaModalOverlayProps, AriaDialogProps, OverlayTriggerAria } from "react-aria";
3
+ import type { OverlayTriggerState } from "react-stately";
4
+ import * as React from "react";
5
+ interface FocusedTaskFromHook {
6
+ state: OverlayTriggerState;
7
+ overlayProps: OverlayTriggerAria["overlayProps"];
8
+ }
9
+ type FocusedTaskContentRenderFn = (close: OverlayTriggerState["close"]) => React.ReactNode;
10
+ type FocusedTaskProps = FocusedTaskFromHook & AriaModalOverlayProps & AriaDialogProps & {
11
+ onClose?: () => void;
12
+ fullWidth?: boolean;
13
+ };
14
+ declare function FocusedTaskInternal({ children, className, "data-testid": dataTestId, onBlur, onFocus, overlayProps, state, onClose, fullWidth, ...rest }: ComponentProps<FocusedTaskProps, HTMLDivElement> & ChildrenFn<FocusedTaskContentRenderFn>): React.ReactElement;
15
+ export declare function FocusedTask(props: Parameters<typeof FocusedTaskInternal>[0]): React.ReactElement;
16
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { AriaButtonProps, OverlayTriggerAria } from "react-aria";
2
+ import type { OverlayTriggerState, OverlayTriggerProps } from "react-stately";
3
+ import type { RefObject } from "react";
4
+ interface FocusedTaskPropsAndState {
5
+ triggerProps: Omit<AriaButtonProps, "onPress"> & {
6
+ onClick: ((e: any) => void) | undefined;
7
+ ref: RefObject<any | null>;
8
+ };
9
+ focusedTaskState: OverlayTriggerState;
10
+ focusedTaskProps: {
11
+ state: OverlayTriggerState;
12
+ overlayProps: OverlayTriggerAria["overlayProps"];
13
+ };
14
+ }
15
+ export declare function useFocusedTask(config?: OverlayTriggerProps): FocusedTaskPropsAndState;
16
+ export {};
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ import type { ComponentProps } from "@sps-woodland/core";
3
+ export declare function FocusedTaskActions({ children, className, ...rest }: ComponentProps<unknown, HTMLDivElement>): React.ReactElement;
package/lib/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
- export * from "@sps-woodland/core/focused-task";
1
+ export * from "./focused-task/FocusedTask";
2
+ export * from "./focused-task-actions/FocusedTaskActions";
3
+ export * from "./focused-task/useFocusedTask";
2
4
  export * from "./manifest";