@sps-woodland/modal 8.53.6 → 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 +18 -16
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(r,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@sps-woodland/core/modal"),require("@spscommerce/utils"),require("react")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core/modal","@spscommerce/utils","react"],a):(r=typeof globalThis<"u"?globalThis:r||self,a(r.Modal={},r.
|
|
1
|
+
(function(r,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@sps-woodland/core/modal"),require("@spscommerce/utils"),require("react")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core/modal","@spscommerce/utils","react"],a):(r=typeof globalThis<"u"?globalThis:r||self,a(r.Modal={},r.spsWoodlandCoreModal,r.spscommerceUtils,r.react))})(this,(function(r,a,e,s){"use strict";function i(t){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(d,l,n.get?n:{enumerable:!0,get:()=>t[l]})}}return d.default=t,Object.freeze(d)}const o=i(s),m={Modals:{description:()=>o.createElement("p",null,"Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[a.Modal],examples:{general:{label:"Usage",description:({NavigateTo:t})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a Modal:"),o.createElement("ul",null,o.createElement("li",null,"When the user needs to confirm a basic decision, such as deleting a record."),o.createElement("li",null,"When important information needs to be displayed to the user before continuing."),o.createElement("li",null,"When a simple selection, such as a single form input, is required before proceeding.")),o.createElement("h5",null,"Avoid a Modal:"),o.createElement("ul",null,o.createElement("li",null,"When a complex form is required. Use a ",o.createElement(t,{to:"focused-task"},"Focused Task View")," instead."),o.createElement("li",null,"When sharing non-critical or tertiary information. Use a ",o.createElement(t,{to:"growlers"},"Growler")," instead.")))},implementation:{label:"Close Button",description:()=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Close Button and Modal dismissiability"),o.createElement("p",null,"Remove the Close Button in the upper right of the Modal if the user must choose the course of action before proceeding."),o.createElement("p",null,"The close button is included by default and omitted when the prop ",o.createElement("code",null,"dismissable")," is set to ",o.createElement("strong",null,"false"),"."),o.createElement("p",null,"Setting the ",o.createElement("code",null,"dismissable")," prop to false also prevents dismissing the modal by clicking outside of the modal or by using the"," ",o.createElement("strong",null,"escape")," key.")),examples:{basic:{react:e.code`
|
|
2
2
|
import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
|
|
3
3
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
4
4
|
import { Button } from "@sps-woodland/buttons";
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__version_8_53_8__hash_41ksem0{background-color:#fff;border-style:solid;border-width:.0625rem;border-radius:.25rem;display:flex;flex-direction:column;overflow:hidden;max-height:100%}.pkg_sps-woodland_core__version_8_53_8__hash_41ksem1{border-color:#007db8}.pkg_sps-woodland_core__version_8_53_8__hash_41ksem2,.pkg_sps-woodland_core__version_8_53_8__hash_41ksem3{border-color:#de002e}.pkg_sps-woodland_core__version_8_53_8__hash_41ksem4{border-color:#0b8940}.pkg_sps-woodland_core__version_8_53_8__hash_41ksem5,.pkg_sps-woodland_core__version_8_53_8__hash_41ksem6{border-color:#e7760b}.pkg_sps-woodland_core__version_8_53_8__hash_41ksem7{border-color:#4b5356}.pkg_sps-woodland_core__version_8_53_8__hash_41ksem8{width:23.75rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksem9{width:36.25rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksema{width:48.75rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemb{width:73.75rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemc{height:100%}.pkg_sps-woodland_core__version_8_53_8__hash_41kseme{align-items:center;color:#fff;display:flex;padding:1rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemf{background-color:#4b5356}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemg,.pkg_sps-woodland_core__version_8_53_8__hash_41ksemh{background-color:#de002e}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemi{background-color:#007db8}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemj{background-color:#0b8940}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemk,.pkg_sps-woodland_core__version_8_53_8__hash_41kseml{background-color:#e7760b}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemm{flex-grow:1;font-size:.875rem;font-weight:600;line-height:1.25rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemn{font-weight:600;line-height:.875rem;font-size:.875rem;margin-right:.5rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemo{overflow-y:auto;padding:1rem;flex:1}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemp{align-items:center;background-color:#f3f4f4;display:flex;justify-content:flex-end;padding:.5rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemq{color:#fff;border-width:0}.pkg_sps-woodland_core__version_8_53_8__hash_41ksemr{padding:0 .25rem}.pkg_sps-woodland_core__version_8_53_8__hash_41ksems{position:fixed;z-index:1000;inset:0;background:#f3f4f4cc;display:flex;align-items:start;justify-content:center;padding:4rem 1rem 1rem}.z-stratum-dropdown{z-index:1100}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/modal",
|
|
3
3
|
"description": "SPS Woodland Design System modal 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/modal",
|
|
@@ -30,13 +30,13 @@
|
|
|
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
|
"react": "16.14.0",
|
|
38
38
|
"react-dom": "16.14.0",
|
|
39
|
-
"@sps-woodland/core": "8.53.
|
|
39
|
+
"@sps-woodland/core": "8.53.8"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "pnpm run build:js && pnpm run build:types && pnpm run build:css",
|
package/vite.config.mjs
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { defineConfig } from "vite";
|
|
3
3
|
import pkg from "./package.json";
|
|
4
|
+
import { getPeerDepsExternal } from "../../../scripts/get-peer-deps-external.mjs";
|
|
5
|
+
import { withOutputGlobals } from "../../../scripts/with-output-globals.mjs";
|
|
4
6
|
|
|
5
7
|
// Modal is now a wrapper package that re-exports from @sps-woodland/core.
|
|
6
8
|
// No vanilla-extract needed - CSS is provided by the mono-package.
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
export default defineConfig(
|
|
11
|
+
withOutputGlobals({
|
|
12
|
+
build: {
|
|
13
|
+
lib: {
|
|
14
|
+
entry: path.resolve(__dirname, "src/index.ts"),
|
|
15
|
+
name: "Modal",
|
|
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/modal
|
|
22
|
+
external: getPeerDepsExternal(pkg),
|
|
23
|
+
},
|
|
22
24
|
},
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
+
})
|
|
26
|
+
);
|