@sps-woodland/focused-task 8.56.2 → 8.56.3
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/lib/index.js +26 -35
- package/lib/index.umd.cjs +3 -3
- package/lib/style.css +2 -1
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { FocusedTask as
|
|
1
|
+
import { FocusedTask as e } from "@sps-woodland/core/focused-task";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { code as n } from "@spscommerce/utils";
|
|
2
4
|
export * from "@sps-woodland/core/focused-task";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
basic: {
|
|
16
|
-
react: o`
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/manifest.ts
|
|
7
|
+
var r = { "Focused Task": {
|
|
8
|
+
components: [e],
|
|
9
|
+
examples: {
|
|
10
|
+
hooks: {
|
|
11
|
+
label: "Using the Hook",
|
|
12
|
+
description: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("p", null, "To use the focused task component, you must call the ", /* @__PURE__ */ t.createElement("code", null, "useFocusedTask"), " hook. Optional arguments for this hook include:"), /* @__PURE__ */ t.createElement("dl", null, /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "isOpen"), ": boolean"), /* @__PURE__ */ t.createElement("dd", null, "Whether the overlay is open by default (controlled)"), /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "defaultOpen"), ": boolean"), /* @__PURE__ */ t.createElement("dd", null, "Whether the overlay is open by default (uncontrolled)."), /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "onOpenChange"), ": function"), /* @__PURE__ */ t.createElement("dd", null, "Handler that is called when the overlay's open state changes.", /* @__PURE__ */ t.createElement("code", null, "(isOpen: boolean) => void"))), /* @__PURE__ */ t.createElement("h5", null, "Focused Task Props, Focused Task State, and Trigger Props"), /* @__PURE__ */ t.createElement("p", null, "The ", /* @__PURE__ */ t.createElement("code", null, "useFocusedTask"), " returns an object with ", /* @__PURE__ */ t.createElement("code", null, "focusedTaskProps"), ",", " ", /* @__PURE__ */ t.createElement("code", null, "focusedTaskState"), " and ", /* @__PURE__ */ t.createElement("code", null, "triggerProps")), /* @__PURE__ */ t.createElement("p", null, "The ", /* @__PURE__ */ t.createElement("code", null, "triggerProps"), " need to be spread on the element that triggers the focused task."), /* @__PURE__ */ t.createElement("p", null, "The ", /* @__PURE__ */ t.createElement("code", null, "focusedTaskState"), " object (which is also included in ", /* @__PURE__ */ t.createElement("code", null, "focusedTaskProps"), ") allows programmatic access to the state of the focused task. This includes a read only", " ", /* @__PURE__ */ t.createElement("code", null, "isOpen"), " property, a ", /* @__PURE__ */ t.createElement("code", null, "setOpen(isOpen: boolean)"), " method which can be use to set whether the overlay is open, an ", /* @__PURE__ */ t.createElement("code", null, "open()"), " method which opens the overlay, a ", /* @__PURE__ */ t.createElement("code", null, "close()"), " method which closes the overlay and a", " ", /* @__PURE__ */ t.createElement("code", null, "toggle()"), " method that toggles the overlay's visiblity."), /* @__PURE__ */ t.createElement("p", null, "The ", /* @__PURE__ */ t.createElement("code", null, "focusedTaskProps"), " should be spread on the actual ", /* @__PURE__ */ t.createElement("code", null, "FocusedTask"), " component."), /* @__PURE__ */ t.createElement("p", null, "Please refer to the examples to see its implementation"))
|
|
13
|
+
},
|
|
14
|
+
standard: {
|
|
15
|
+
label: "Standard",
|
|
16
|
+
examples: { basic: { react: n`
|
|
17
17
|
import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
|
|
18
18
|
import { Button } from "@sps-woodland/buttons";
|
|
19
19
|
import { Card } from "@sps-woodland/cards";
|
|
@@ -51,15 +51,11 @@ const s = {
|
|
|
51
51
|
</>
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
|
-
`
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
label: "Fill Width",
|
|
60
|
-
examples: {
|
|
61
|
-
basic: {
|
|
62
|
-
react: o`
|
|
54
|
+
` } }
|
|
55
|
+
},
|
|
56
|
+
fullWidth: {
|
|
57
|
+
label: "Fill Width",
|
|
58
|
+
examples: { basic: { react: n`
|
|
63
59
|
import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
|
|
64
60
|
import { Button } from "@sps-woodland/buttons";
|
|
65
61
|
import { Card } from "@sps-woodland/cards";
|
|
@@ -98,14 +94,9 @@ const s = {
|
|
|
98
94
|
</>
|
|
99
95
|
)
|
|
100
96
|
}
|
|
101
|
-
`
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"Focused Task": s
|
|
108
|
-
};
|
|
109
|
-
export {
|
|
110
|
-
l as MANIFEST
|
|
111
|
-
};
|
|
97
|
+
` } }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
} };
|
|
101
|
+
//#endregion
|
|
102
|
+
export { r as MANIFEST };
|
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(t
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@sps-woodland/core/focused-task"),require("react"),require("@spscommerce/utils")):typeof define==`function`&&define.amd?define([`exports`,`@sps-woodland/core/focused-task`,`react`,`@spscommerce/utils`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FocusedTask={},e.spsWoodlandCoreFocusedTask,e.react,e.spscommerceUtils))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:i(c(e)),u(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1),e.MANIFEST={"Focused Task":{components:[t.FocusedTask],examples:{hooks:{label:`Using the Hook`,description:()=>n.createElement(n.Fragment,null,n.createElement(`p`,null,`To use the focused task component, you must call the `,n.createElement(`code`,null,`useFocusedTask`),` hook. Optional arguments for this hook include:`),n.createElement(`dl`,null,n.createElement(`dt`,null,n.createElement(`code`,null,`isOpen`),`: boolean`),n.createElement(`dd`,null,`Whether the overlay is open by default (controlled)`),n.createElement(`dt`,null,n.createElement(`code`,null,`defaultOpen`),`: boolean`),n.createElement(`dd`,null,`Whether the overlay is open by default (uncontrolled).`),n.createElement(`dt`,null,n.createElement(`code`,null,`onOpenChange`),`: function`),n.createElement(`dd`,null,`Handler that is called when the overlay's open state changes.`,n.createElement(`code`,null,`(isOpen: boolean) => void`))),n.createElement(`h5`,null,`Focused Task Props, Focused Task State, and Trigger Props`),n.createElement(`p`,null,`The `,n.createElement(`code`,null,`useFocusedTask`),` returns an object with `,n.createElement(`code`,null,`focusedTaskProps`),`,`,` `,n.createElement(`code`,null,`focusedTaskState`),` and `,n.createElement(`code`,null,`triggerProps`)),n.createElement(`p`,null,`The `,n.createElement(`code`,null,`triggerProps`),` need to be spread on the element that triggers the focused task.`),n.createElement(`p`,null,`The `,n.createElement(`code`,null,`focusedTaskState`),` object (which is also included in `,n.createElement(`code`,null,`focusedTaskProps`),`) allows programmatic access to the state of the focused task. This includes a read only`,` `,n.createElement(`code`,null,`isOpen`),` property, a `,n.createElement(`code`,null,`setOpen(isOpen: boolean)`),` method which can be use to set whether the overlay is open, an `,n.createElement(`code`,null,`open()`),` method which opens the overlay, a `,n.createElement(`code`,null,`close()`),` method which closes the overlay and a`,` `,n.createElement(`code`,null,`toggle()`),` method that toggles the overlay's visiblity.`),n.createElement(`p`,null,`The `,n.createElement(`code`,null,`focusedTaskProps`),` should be spread on the actual `,n.createElement(`code`,null,`FocusedTask`),` component.`),n.createElement(`p`,null,`Please refer to the examples to see its implementation`))},standard:{label:`Standard`,examples:{basic:{react:r.code`
|
|
2
2
|
import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
|
|
3
3
|
import { Button } from "@sps-woodland/buttons";
|
|
4
4
|
import { Card } from "@sps-woodland/cards";
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</>
|
|
37
37
|
)
|
|
38
38
|
}
|
|
39
|
-
`}}},fullWidth:{label
|
|
39
|
+
`}}},fullWidth:{label:`Fill Width`,examples:{basic:{react:r.code`
|
|
40
40
|
import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
|
|
41
41
|
import { Button } from "@sps-woodland/buttons";
|
|
42
42
|
import { Card } from "@sps-woodland/cards";
|
|
@@ -75,4 +75,4 @@
|
|
|
75
75
|
</>
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
|
-
`}}}}}}
|
|
78
|
+
`}}}}}},Object.keys(t).forEach(function(n){n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})});
|
package/lib/style.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
.pkg_sps-woodland_core__family_focused-
|
|
1
|
+
.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib0{text-align:center;background-color:#f3f4f4;width:100%;height:100%;padding-bottom:2rem;transition:top .3s;position:fixed;left:0;overflow:hidden auto}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib1{max-width:1280px;margin:0 auto;padding:0 1rem 1rem}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib2{max-width:100%}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib4{text-align:right;min-width:0;max-width:1280px;margin:1rem auto .5rem;padding:0 1rem}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib5{color:#4b5356;border-width:0;right:.5rem}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib6{padding:0 .25rem}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib7{z-index:1000;background:#f3f4f4;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib8{z-index:1;background-color:#fff;justify-content:center;align-items:center;height:3.125rem;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0;box-shadow:0 -.0625rem .125rem #00000026}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29ib9{width:100%;max-width:1180px;display:flex}.pkg_sps-woodland_core__family_focused-task__version_8_56_3__hash_1fv29iba{white-space:nowrap;flex:1;justify-content:center;align-items:center;display:flex}.z-stratum-dropdown{z-index:1100}
|
|
2
|
+
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/focused-task",
|
|
3
3
|
"description": "SPS Woodland Design System focused task component",
|
|
4
|
-
"version": "8.56.
|
|
4
|
+
"version": "8.56.3",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/focused-task",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"@spscommerce/utils": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
31
31
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
32
32
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
33
|
-
"@sps-woodland/core": "8.56.
|
|
33
|
+
"@sps-woodland/core": "8.56.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@spscommerce/utils": "9.
|
|
36
|
+
"@spscommerce/utils": "9.3.3",
|
|
37
37
|
"@types/react": "16.14.35",
|
|
38
38
|
"react": "16.14.0",
|
|
39
39
|
"react-dom": "16.14.0",
|
|
40
|
-
"@sps-woodland/core": "8.56.
|
|
40
|
+
"@sps-woodland/core": "8.56.3"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm run build:js && pnpm run build:types && pnpm run build:css",
|