@sps-woodland/growler 8.2.2 → 8.3.0
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/Growler.d.ts +1 -1
- package/lib/GrowlerListProvider.d.ts +1 -1
- package/lib/index.es.js +33 -40
- package/lib/style.css +1 -1
- package/package.json +7 -7
package/lib/Growler.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export declare function Growler({ children, className, imgSrc, kind, onClose, re
|
|
|
16
16
|
persist?: boolean;
|
|
17
17
|
title: string;
|
|
18
18
|
id?: string | number;
|
|
19
|
-
}> & React.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
19
|
+
}> & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare type RenderFn = () => React.ReactElement;
|
|
3
|
-
export declare function GrowlerListProvider(props: any): JSX.Element;
|
|
3
|
+
export declare function GrowlerListProvider(props: any): React.JSX.Element;
|
|
4
4
|
export declare const useGrowler: () => {
|
|
5
5
|
addGrowler: (NewGrowler: RenderFn) => void;
|
|
6
6
|
};
|
package/lib/index.es.js
CHANGED
|
@@ -105,34 +105,28 @@ function E({
|
|
|
105
105
|
}
|
|
106
106
|
return e.useEffect(() => (g(), () => {
|
|
107
107
|
G();
|
|
108
|
-
}), []), /* @__PURE__ */ e.createElement(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
src: t,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
kind: "icon",
|
|
131
|
-
icon: "x",
|
|
132
|
-
title: M("design-system:growler.dismiss"),
|
|
133
|
-
className: F,
|
|
134
|
-
onClick: O
|
|
135
|
-
})));
|
|
108
|
+
}), []), /* @__PURE__ */ e.createElement(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
role: "alert",
|
|
112
|
+
"aria-live": "polite",
|
|
113
|
+
className: A(D({ kind: n, fade: v }), o),
|
|
114
|
+
onMouseEnter: y,
|
|
115
|
+
onMouseLeave: g,
|
|
116
|
+
...d
|
|
117
|
+
},
|
|
118
|
+
/* @__PURE__ */ e.createElement("div", { className: V }, t && /* @__PURE__ */ e.createElement("img", { src: t, alt: "" }), n === "progress" ? /* @__PURE__ */ e.createElement(L, null) : /* @__PURE__ */ e.createElement(N, { icon: J[n], className: W })),
|
|
119
|
+
/* @__PURE__ */ e.createElement("div", { className: z }, /* @__PURE__ */ e.createElement("div", { className: q }, l && /* @__PURE__ */ e.createElement("span", { className: H }, l), /* @__PURE__ */ e.createElement("div", null, r)), /* @__PURE__ */ e.createElement(
|
|
120
|
+
x,
|
|
121
|
+
{
|
|
122
|
+
kind: "icon",
|
|
123
|
+
icon: "x",
|
|
124
|
+
title: M("design-system:growler.dismiss"),
|
|
125
|
+
className: F,
|
|
126
|
+
onClick: O
|
|
127
|
+
}
|
|
128
|
+
))
|
|
129
|
+
);
|
|
136
130
|
}
|
|
137
131
|
b.set(E, {
|
|
138
132
|
name: "Growler",
|
|
@@ -159,14 +153,16 @@ function X(r) {
|
|
|
159
153
|
t((l) => l.filter((u) => a !== u.id));
|
|
160
154
|
}, s = o.map(({ G: a, id: l }) => e.cloneElement(a(), { key: l, id: l, removeFromList: n })).filter((a) => b.get(a.type).name === "Growler" ? !0 : (console.error(
|
|
161
155
|
"addGrowler only accepts a function that returns a Growler"
|
|
162
|
-
), !1)), c = /* @__PURE__ */ e.createElement(
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
156
|
+
), !1)), c = /* @__PURE__ */ e.createElement(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
"data-testid": r["data-testid"],
|
|
160
|
+
"data-portalid": "growler-portal",
|
|
161
|
+
className: j
|
|
162
|
+
},
|
|
163
|
+
s
|
|
164
|
+
);
|
|
165
|
+
return /* @__PURE__ */ e.createElement(B.Provider, { value: { growlerList: o, setGrowlerList: t } }, _.createPortal(c, document.body), r.children);
|
|
170
166
|
}
|
|
171
167
|
const oe = () => {
|
|
172
168
|
const r = e.useContext(B);
|
|
@@ -188,10 +184,7 @@ const oe = () => {
|
|
|
188
184
|
examples: {
|
|
189
185
|
general: {
|
|
190
186
|
label: "General Usage",
|
|
191
|
-
description: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("p", null, "Use the following guidelines to write an effective Growler message."), /* @__PURE__ */ e.createElement("ul", null, /* @__PURE__ */ e.createElement("li", null, "Write all messages in sentence case.", /* @__PURE__ */ e.createElement("ul", null, /* @__PURE__ */ e.createElement("li", null, "Capitalize the first word of the message."), /* @__PURE__ */ e.createElement("li", null, "Add punctuation, such as a period, at the end of the message."))), /* @__PURE__ */ e.createElement("li", null, "Keep messages as succinct as possible while also providing sufficient information to the customer."), /* @__PURE__ */ e.createElement("li", null, "If you can clearly convey your message in a single statement, use only the Primary Message."), /* @__PURE__ */ e.createElement("li", null, "If the message requires additional details, such as further information or instructions, use both the Primary and Secondary Messages.")), /* @__PURE__ */ e.createElement("p", null, "For more examples of effective feedback message writing, refer to ", /* @__PURE__ */ e.createElement("a", {
|
|
192
|
-
href: "https://atlassian.design/content/messaging-guidelines",
|
|
193
|
-
target: "_blank"
|
|
194
|
-
}, "Atlassian's Messaging Guidelines"), "."))
|
|
187
|
+
description: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("p", null, "Use the following guidelines to write an effective Growler message."), /* @__PURE__ */ e.createElement("ul", null, /* @__PURE__ */ e.createElement("li", null, "Write all messages in sentence case.", /* @__PURE__ */ e.createElement("ul", null, /* @__PURE__ */ e.createElement("li", null, "Capitalize the first word of the message."), /* @__PURE__ */ e.createElement("li", null, "Add punctuation, such as a period, at the end of the message."))), /* @__PURE__ */ e.createElement("li", null, "Keep messages as succinct as possible while also providing sufficient information to the customer."), /* @__PURE__ */ e.createElement("li", null, "If you can clearly convey your message in a single statement, use only the Primary Message."), /* @__PURE__ */ e.createElement("li", null, "If the message requires additional details, such as further information or instructions, use both the Primary and Secondary Messages.")), /* @__PURE__ */ e.createElement("p", null, "For more examples of effective feedback message writing, refer to ", /* @__PURE__ */ e.createElement("a", { href: "https://atlassian.design/content/messaging-guidelines", target: "_blank" }, "Atlassian's Messaging Guidelines"), "."))
|
|
195
188
|
},
|
|
196
189
|
provider: {
|
|
197
190
|
label: "Growler List Provider",
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes _1c5fbnk0{0%{opacity:1}to{opacity:0}}._1c5fbnk1{border-radius:.25rem;box-shadow:0 0 .3125rem #00000040;display:flex;margin-bottom:1rem;overflow:hidden;width:25rem}._1c5fbnk2{background
|
|
1
|
+
@keyframes _1c5fbnk0{0%{opacity:1}to{opacity:0}}._1c5fbnk1{border-radius:.25rem;box-shadow:0 0 .3125rem #00000040;display:flex;margin-bottom:1rem;overflow:hidden;width:25rem}._1c5fbnk2{background:oklch(93.43% .001 286.37);border:.0625rem oklch(56.48% .008 219.62) solid}._1c5fbnk3{background:oklch(56.21% .128 239.83);border:.0625rem oklch(56.21% .128 239.83) solid}._1c5fbnk4{background:oklch(50.83% .125 337.21);border:.0625rem oklch(50.83% .125 337.21) solid}._1c5fbnk5{background:oklch(56.83% .229 22.94);border:.0625rem oklch(56.83% .229 22.94) solid}._1c5fbnk6{background:oklch(55.21% .148 150.27);border:.0625rem oklch(55.21% .148 150.27) solid}._1c5fbnk7{background:oklch(68.35% .17 53.59);border:.0625rem oklch(68.35% .17 53.59) solid}._1c5fbnk8{animation-name:_1c5fbnk0;animation-duration:2s}._1c5fbnk9{opacity:1}._1c5fbnka{display:flex;flex-direction:column;position:fixed;right:1.875rem;top:5.625rem;width:25rem}._1c5fbnkb{align-items:center;display:flex;flex-grow:0;flex-shrink:0;flex-basis:4.375rem;justify-content:center}._1c5fbnkc{color:oklch(100% 0 0);font-size:1.875rem}._1c5fbnkd{background-color:oklch(100% 0 0);padding:1rem 2.625rem 1rem 1rem;position:relative;display:flex;flex-grow:1}._1c5fbnke{flex-grow:1;font-size:.75rem;line-height:1.25rem}._1c5fbnkf{font-weight:600}._1c5fbnkg{color:oklch(43.62% .011 222.24);overflow-wrap:break-word;width:16.5rem}._1c5fbnkh{position:absolute;right:.5rem;top:.5rem}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/growler",
|
|
3
3
|
"description": "SPS Woodland Design System growler component and hook",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.3.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/growler",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@spscommerce/utils": "^6.12.1",
|
|
34
34
|
"react": "^16.9.0",
|
|
35
35
|
"react-dom": "^16.9.0",
|
|
36
|
-
"@sps-woodland/core": "8.
|
|
37
|
-
"@sps-woodland/tokens": "8.
|
|
38
|
-
"@sps-woodland/buttons": "8.
|
|
36
|
+
"@sps-woodland/core": "8.3.0",
|
|
37
|
+
"@sps-woodland/tokens": "8.3.0",
|
|
38
|
+
"@sps-woodland/buttons": "8.3.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@spscommerce/utils": "^6.12.1",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@vanilla-extract/recipes": "^0.2.5",
|
|
44
44
|
"react": "^16.9.0",
|
|
45
45
|
"react-dom": "^16.9.0",
|
|
46
|
-
"@sps-woodland/core": "8.
|
|
47
|
-
"@sps-woodland/tokens": "8.
|
|
48
|
-
"@sps-woodland/buttons": "8.
|
|
46
|
+
"@sps-woodland/core": "8.3.0",
|
|
47
|
+
"@sps-woodland/tokens": "8.3.0",
|
|
48
|
+
"@sps-woodland/buttons": "8.3.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "pnpm run build:js && pnpm run build:types",
|