@sps-woodland/focused-task 8.53.7 → 8.53.8
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.umd.cjs +1 -1
- package/lib/style.css +1 -1
- package/package.json +3 -3
- package/vite.config.mjs +17 -14
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(t,s){typeof exports=="object"&&typeof module<"u"?s(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"],s):(t=typeof globalThis<"u"?globalThis:t||self,s(t.FocusedTask={},t.
|
|
1
|
+
(function(t,s){typeof exports=="object"&&typeof module<"u"?s(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"],s):(t=typeof globalThis<"u"?globalThis:t||self,s(t.FocusedTask={},t.spsWoodlandCoreFocusedTask,t.react,t.spscommerceUtils))})(this,(function(t,s,d,l){"use strict";function r(o){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(a,n,c.get?c:{enumerable:!0,get:()=>o[n]})}}return a.default=o,Object.freeze(a)}const e=r(d),u={"Focused Task":{components:[s.FocusedTask],examples:{hooks:{label:"Using the Hook",description:()=>e.createElement(e.Fragment,null,e.createElement("p",null,"To use the focused task component, you must call the ",e.createElement("code",null,"useFocusedTask")," hook. Optional arguments for this hook include:"),e.createElement("dl",null,e.createElement("dt",null,e.createElement("code",null,"isOpen"),": boolean"),e.createElement("dd",null,"Whether the overlay is open by default (controlled)"),e.createElement("dt",null,e.createElement("code",null,"defaultOpen"),": boolean"),e.createElement("dd",null,"Whether the overlay is open by default (uncontrolled)."),e.createElement("dt",null,e.createElement("code",null,"onOpenChange"),": function"),e.createElement("dd",null,"Handler that is called when the overlay's open state changes.",e.createElement("code",null,"(isOpen: boolean) => void"))),e.createElement("h5",null,"Focused Task Props, Focused Task State, and Trigger Props"),e.createElement("p",null,"The ",e.createElement("code",null,"useFocusedTask")," returns an object with ",e.createElement("code",null,"focusedTaskProps"),","," ",e.createElement("code",null,"focusedTaskState")," and ",e.createElement("code",null,"triggerProps")),e.createElement("p",null,"The ",e.createElement("code",null,"triggerProps")," need to be spread on the element that triggers the focused task."),e.createElement("p",null,"The ",e.createElement("code",null,"focusedTaskState")," object (which is also included in ",e.createElement("code",null,"focusedTaskProps"),") allows programmatic access to the state of the focused task. This includes a read only"," ",e.createElement("code",null,"isOpen")," property, a ",e.createElement("code",null,"setOpen(isOpen: boolean)")," method which can be use to set whether the overlay is open, an ",e.createElement("code",null,"open()")," method which opens the overlay, a ",e.createElement("code",null,"close()")," method which closes the overlay and a"," ",e.createElement("code",null,"toggle()")," method that toggles the overlay's visiblity."),e.createElement("p",null,"The ",e.createElement("code",null,"focusedTaskProps")," should be spread on the actual ",e.createElement("code",null,"FocusedTask")," component."),e.createElement("p",null,"Please refer to the examples to see its implementation"))},standard:{label:"Standard",examples:{basic:{react:l.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";
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib0{background-color:#f3f4f4;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:fixed;text-align:center;transition:top .3s ease;width:100%;padding-bottom:2rem}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib1{margin:0 auto;max-width:1280px;padding:0 1rem 1rem}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib2{max-width:100%}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib4{margin:1rem auto .5rem;max-width:1280px;min-width:0;padding:0 1rem;text-align:right}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib5{color:#4b5356;border-width:0;right:.5rem}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib6{padding:0 .25rem}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib7{position:fixed;z-index:1000;inset:0;background:#f3f4f4;display:flex;align-items:center;justify-content:center;padding:1rem}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib8{align-items:center;background-color:#fff;bottom:0;box-shadow:0 -.0625rem .125rem #00000026;display:flex;height:3.125rem;justify-content:center;left:0;padding:.5rem;position:fixed;right:0;z-index:1}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29ib9{display:flex;max-width:1180px;width:100%}.pkg_sps-woodland_core__version_8_53_8__hash_1fv29iba{align-items:center;display:flex;flex:1;white-space:nowrap;justify-content:center}.z-stratum-dropdown{z-index:1100}
|
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.53.
|
|
4
|
+
"version": "8.53.8",
|
|
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.53.
|
|
33
|
+
"@sps-woodland/core": "8.53.8"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "9.0.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.53.
|
|
40
|
+
"@sps-woodland/core": "8.53.8"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm run build:js && pnpm run build:types && pnpm run build:css",
|
package/vite.config.mjs
CHANGED
|
@@ -2,22 +2,25 @@ import path from "node:path";
|
|
|
2
2
|
import { defineConfig } from "vite";
|
|
3
3
|
import pkg from "./package.json";
|
|
4
4
|
import { getPeerDepsExternal } from "../../../scripts/get-peer-deps-external.mjs";
|
|
5
|
+
import { withOutputGlobals } from "../../../scripts/with-output-globals.mjs";
|
|
5
6
|
|
|
6
7
|
// Focused-task is now a wrapper package that re-exports from @sps-woodland/core.
|
|
7
8
|
// No vanilla-extract needed - CSS is provided by the mono-package.
|
|
8
9
|
|
|
9
|
-
export default defineConfig(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
export default defineConfig(
|
|
11
|
+
withOutputGlobals({
|
|
12
|
+
build: {
|
|
13
|
+
lib: {
|
|
14
|
+
entry: path.resolve(__dirname, "src/index.ts"),
|
|
15
|
+
name: "FocusedTask",
|
|
16
|
+
fileName: "index",
|
|
17
|
+
},
|
|
18
|
+
outDir: path.resolve(__dirname, "./lib"),
|
|
19
|
+
emptyOutDir: false,
|
|
20
|
+
rollupOptions: {
|
|
21
|
+
// External must match subpath imports like @sps-woodland/core/focused-task
|
|
22
|
+
external: getPeerDepsExternal(pkg),
|
|
23
|
+
},
|
|
15
24
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
rollupOptions: {
|
|
19
|
-
// External must match subpath imports like @sps-woodland/core/focused-task
|
|
20
|
-
external: getPeerDepsExternal(pkg),
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
25
|
+
})
|
|
26
|
+
);
|