@spscommerce/ds-react 6.4.0 → 6.4.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/lib/index.cjs.js +1 -1
- package/lib/index.es.js +1 -1
- package/package.json +11 -11
package/lib/index.cjs.js
CHANGED
|
@@ -2993,7 +2993,7 @@ var a=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2993
2993
|
</>
|
|
2994
2994
|
)
|
|
2995
2995
|
}
|
|
2996
|
-
`}}}},Gk={imgSrc:"string",kind:"GrowlerKind",onClose:"() => void",persist:"boolean",title:"string"},jk=$(I({},U),{imgSrc:w.exports.string,kind:fe(O.GrowlerKind),onClose:ae(),persist:w.exports.bool,title:w.exports.string});function br(e){const A=e,{children:t,className:n,imgSrc:a,kind:o=O.GrowlerKind.INFO,onClose:i,persist:l,title:c,unsafelyReplaceClassName:u}=A,p=z(A,["children","className","imgSrc","kind","onClose","persist","title","unsafelyReplaceClassName"]),f=s.useRef(i);s.useEffect(()=>{f.current=i},[i]);const{t:m}=s.useContext(Ae),[g,S]=s.useState(!0),[E,D]=s.useState(!1);function T(){return[window.setTimeout(()=>D(!0),O.GROWLER_VISIBLE_DURATION_MS),window.setTimeout(()=>{S(!1),f.current&&f.current()},O.GROWLER_VISIBLE_DURATION_MS+O.GROWLER_FADEOUT_DURATION_MS)]}const y=s.useRef([]);function x(){l||(y.current=T())}function v(){for(const P of y.current)window.clearTimeout(P);y.current=[]}function k(){v(),S(!0),D(!1)}function _(){k(),D(!1),S(!1),i&&i()}const R=o===O.GrowlerKind.PROGRESS?"sps-spinner":F("sps-icon",`sps-icon-${O.GrowlerIcon.get(o)}`),M=F(u||"sps-growler",g&&"show",E&&"fade",`sps-growler--${o}`,n);return s.useEffect(()=>(x(),()=>{v()}),[]),Un("sps-growler-display-area",["sps-growler-area","z-stratum-
|
|
2996
|
+
`}}}},Gk={imgSrc:"string",kind:"GrowlerKind",onClose:"() => void",persist:"boolean",title:"string"},jk=$(I({},U),{imgSrc:w.exports.string,kind:fe(O.GrowlerKind),onClose:ae(),persist:w.exports.bool,title:w.exports.string});function br(e){const A=e,{children:t,className:n,imgSrc:a,kind:o=O.GrowlerKind.INFO,onClose:i,persist:l,title:c,unsafelyReplaceClassName:u}=A,p=z(A,["children","className","imgSrc","kind","onClose","persist","title","unsafelyReplaceClassName"]),f=s.useRef(i);s.useEffect(()=>{f.current=i},[i]);const{t:m}=s.useContext(Ae),[g,S]=s.useState(!0),[E,D]=s.useState(!1);function T(){return[window.setTimeout(()=>D(!0),O.GROWLER_VISIBLE_DURATION_MS),window.setTimeout(()=>{S(!1),f.current&&f.current()},O.GROWLER_VISIBLE_DURATION_MS+O.GROWLER_FADEOUT_DURATION_MS)]}const y=s.useRef([]);function x(){l||(y.current=T())}function v(){for(const P of y.current)window.clearTimeout(P);y.current=[]}function k(){v(),S(!0),D(!1)}function _(){k(),D(!1),S(!1),i&&i()}const R=o===O.GrowlerKind.PROGRESS?"sps-spinner":F("sps-icon",`sps-icon-${O.GrowlerIcon.get(o)}`),M=F(u||"sps-growler",g&&"show",E&&"fade",`sps-growler--${o}`,n);return s.useEffect(()=>(x(),()=>{v()}),[]),Un("sps-growler-display-area",["sps-growler-area","z-stratum-growlers"])(s.createElement("div",I({role:"alert",className:M,onMouseEnter:k,onMouseLeave:x},p),s.createElement("div",{className:"sps-growler__icon-box"},a&&s.createElement("img",{src:a,alt:""}),!a&&s.createElement("i",{className:R,"aria-hidden":"true"})),s.createElement("div",{className:"sps-growler__message-box"},s.createElement("div",{className:"sps-growler__message-box-text"},c&&s.createElement("span",{className:"sps-growler__message-box-title d-block"},c),s.createElement("div",{className:"sps-growler__message-box-subtitle"},t)),s.createElement("button",{type:"button",className:"sps-growler__close-button","aria-hidden":"true",onClick:_},s.createElement("i",{className:"sps-icon sps-icon-x",title:m("design-system:growler.dismiss")})))))}Object.assign(br,{props:Gk,propTypes:jk,displayName:"SpsGrowler"});const Vm={writingGuidelines:{label:"Writing Guidelines",customSection:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Use the following guidelines to write an effective Growler message."),s.createElement("ul",null,s.createElement("li",null,"Write all messages in sentence case.",s.createElement("ul",null,s.createElement("li",null,"Capitalize the first word of the message."),s.createElement("li",null,"Add punctuation, such as a period, at the end of the message."))),s.createElement("li",null,"Keep messages as succinct as possible while also providing sufficient information to the customer."),s.createElement("li",null,"If you can clearly convey your message in a single statement, use only the Primary Message."),s.createElement("li",null,"If the message requires additional details, such as further information or instructions, use both the Primary and Secondary Messages.")),s.createElement("p",null,"For more examples of effective feedback message writing, refer to"," ",s.createElement("a",{href:"https://atlassian.design/content/messaging-guidelines",target:"_blank",rel:"noreferrer"},"Atlassian's Messaging Guidelines"),"."))},error:{label:"Error",description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Acceptable message: Document ABC123 has not been sent. Check the form and try sending it again."),s.createElement("p",null,`Unacceptable message: Can't send your document."`)),examples:{primary:{description:"Primary Message Only",react:C.code`
|
|
2997
2997
|
import { SpsButton, SpsGrowler } from "@spscommerce/ds-react";
|
|
2998
2998
|
import { ButtonKind, GrowlerKind } from "@spscommerce/ds-shared";
|
|
2999
2999
|
|
package/lib/index.es.js
CHANGED
|
@@ -24197,7 +24197,7 @@ function SpsGrowler(props2) {
|
|
|
24197
24197
|
clearTimers();
|
|
24198
24198
|
};
|
|
24199
24199
|
}, []);
|
|
24200
|
-
const portal = usePortal("sps-growler-display-area", ["sps-growler-area", "z-stratum-
|
|
24200
|
+
const portal = usePortal("sps-growler-display-area", ["sps-growler-area", "z-stratum-growlers"]);
|
|
24201
24201
|
return portal(/* @__PURE__ */ React.createElement("div", __spreadValues({
|
|
24202
24202
|
role: "alert",
|
|
24203
24203
|
className: classes,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/ds-react",
|
|
3
3
|
"description": "SPS Design System React components",
|
|
4
|
-
"version": "6.4.
|
|
4
|
+
"version": "6.4.1",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "6.4.
|
|
32
|
-
"@spscommerce/ds-illustrations": "6.4.
|
|
33
|
-
"@spscommerce/ds-shared": "6.4.
|
|
34
|
-
"@spscommerce/positioning": "6.4.
|
|
35
|
-
"@spscommerce/utils": "6.4.
|
|
31
|
+
"@spscommerce/ds-colors": "6.4.1",
|
|
32
|
+
"@spscommerce/ds-illustrations": "6.4.1",
|
|
33
|
+
"@spscommerce/ds-shared": "6.4.1",
|
|
34
|
+
"@spscommerce/positioning": "6.4.1",
|
|
35
|
+
"@spscommerce/utils": "6.4.1",
|
|
36
36
|
"moment": "^2.25.3",
|
|
37
37
|
"moment-timezone": "^0.5.28",
|
|
38
38
|
"react": "^16.9.0",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@react-stately/collections": "^3.3.3",
|
|
43
|
-
"@spscommerce/ds-colors": "6.4.
|
|
44
|
-
"@spscommerce/ds-illustrations": "6.4.
|
|
45
|
-
"@spscommerce/ds-shared": "6.4.
|
|
46
|
-
"@spscommerce/positioning": "6.4.
|
|
47
|
-
"@spscommerce/utils": "6.4.
|
|
43
|
+
"@spscommerce/ds-colors": "6.4.1",
|
|
44
|
+
"@spscommerce/ds-illustrations": "6.4.1",
|
|
45
|
+
"@spscommerce/ds-shared": "6.4.1",
|
|
46
|
+
"@spscommerce/positioning": "6.4.1",
|
|
47
|
+
"@spscommerce/utils": "6.4.1",
|
|
48
48
|
"@testing-library/react": "^9.3.2",
|
|
49
49
|
"@types/prop-types": "^15.7.1",
|
|
50
50
|
"@types/react": "^16.9.0",
|