@spectrum-web-components/toast 0.11.11-react.50 → 0.11.11-react.75
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/README.md +12 -2
- package/package.json +7 -7
- package/stories/toast.stories.js +8 -1
- package/stories/toast.stories.js.map +2 -2
package/README.md
CHANGED
|
@@ -37,7 +37,12 @@ import { Toast } from '@spectrum-web-components/toast';
|
|
|
37
37
|
```html
|
|
38
38
|
<sp-toast open>
|
|
39
39
|
This is important information that you should read, soon.
|
|
40
|
-
<sp-button
|
|
40
|
+
<sp-button
|
|
41
|
+
slot="action"
|
|
42
|
+
static="white"
|
|
43
|
+
variant="secondary"
|
|
44
|
+
treatment="outline"
|
|
45
|
+
>
|
|
41
46
|
Do something
|
|
42
47
|
</sp-button>
|
|
43
48
|
</sp-toast>
|
|
@@ -48,7 +53,12 @@ import { Toast } from '@spectrum-web-components/toast';
|
|
|
48
53
|
```html
|
|
49
54
|
<sp-toast open style="width: 300px">
|
|
50
55
|
This is important information that you should read, soon.
|
|
51
|
-
<sp-button
|
|
56
|
+
<sp-button
|
|
57
|
+
slot="action"
|
|
58
|
+
static="white"
|
|
59
|
+
variant="secondary"
|
|
60
|
+
treatment="outline"
|
|
61
|
+
>
|
|
52
62
|
Do something
|
|
53
63
|
</sp-button>
|
|
54
64
|
</sp-toast>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/toast",
|
|
3
|
-
"version": "0.11.11-react.
|
|
3
|
+
"version": "0.11.11-react.75+9897d0a1c",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"lit-html"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@spectrum-web-components/base": "^0.7.5-react.
|
|
61
|
-
"@spectrum-web-components/button": "^0.19.11-react.
|
|
62
|
-
"@spectrum-web-components/icon": "^0.12.8-react.
|
|
63
|
-
"@spectrum-web-components/icons-workflow": "^0.9.8-react.
|
|
60
|
+
"@spectrum-web-components/base": "^0.7.5-react.75+9897d0a1c",
|
|
61
|
+
"@spectrum-web-components/button": "^0.19.11-react.75+9897d0a1c",
|
|
62
|
+
"@spectrum-web-components/icon": "^0.12.8-react.75+9897d0a1c",
|
|
63
|
+
"@spectrum-web-components/icons-workflow": "^0.9.8-react.75+9897d0a1c"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@spectrum-css/toast": "^8.0.
|
|
66
|
+
"@spectrum-css/toast": "^8.0.15"
|
|
67
67
|
},
|
|
68
68
|
"types": "./src/index.d.ts",
|
|
69
69
|
"customElements": "custom-elements.json",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"./sp-*.js",
|
|
72
72
|
"./**/*.dev.js"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "9897d0a1c48b8cee4e5a19c58acfdec2c1dc0623"
|
|
75
75
|
}
|
package/stories/toast.stories.js
CHANGED
|
@@ -12,7 +12,14 @@ const toast = ({
|
|
|
12
12
|
?open=${open}
|
|
13
13
|
>
|
|
14
14
|
${content}
|
|
15
|
-
<sp-button
|
|
15
|
+
<sp-button
|
|
16
|
+
slot="action"
|
|
17
|
+
static="white"
|
|
18
|
+
variant="secondary"
|
|
19
|
+
treatment="outline"
|
|
20
|
+
>
|
|
21
|
+
Undo
|
|
22
|
+
</sp-button>
|
|
16
23
|
</sp-toast>
|
|
17
24
|
`;
|
|
18
25
|
export default {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["toast.stories.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/toast/sp-toast.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\nconst toast = ({\n variant = '',\n open = true,\n content = '',\n}): TemplateResult => html`\n <sp-toast\n variant=${variant as\n | ''\n | 'negative'\n | 'positive'\n | 'info'\n | 'error'\n | 'warning'}\n ?open=${open}\n >\n ${content}\n <sp-button
|
|
5
|
-
"mappings": ";AAWA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AAEP,MAAM,QAAQ,CAAC;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AACd,MAAsB;AAAA;AAAA,kBAEJ;AAAA,gBAOF;AAAA;AAAA,UAEN;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/toast/sp-toast.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\nconst toast = ({\n variant = '',\n open = true,\n content = '',\n}): TemplateResult => html`\n <sp-toast\n variant=${variant as\n | ''\n | 'negative'\n | 'positive'\n | 'info'\n | 'error'\n | 'warning'}\n ?open=${open}\n >\n ${content}\n <sp-button\n slot=\"action\"\n static=\"white\"\n variant=\"secondary\"\n treatment=\"outline\"\n >\n Undo\n </sp-button>\n </sp-toast>\n`;\n\nexport default {\n component: 'sp-toast',\n title: 'Toast',\n args: {\n content: 'This is a toast message.',\n open: true,\n },\n argTypes: {\n content: {\n name: 'content',\n type: { name: 'string', required: false },\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: '' },\n },\n control: 'text',\n },\n open: {\n name: 'open',\n type: { name: 'boolean', required: false },\n description: 'Whether the toast is open.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n },\n};\n\ninterface Properties {\n variant: '' | 'negative' | 'positive' | 'info' | 'error' | 'warning';\n open: boolean;\n content: string;\n onClose: (event: Event) => void;\n}\n\nexport const Default = ({\n variant,\n open,\n content,\n}: Properties): TemplateResult => {\n return toast({ variant, open, content });\n};\n\nconst variantDemo = ({\n variant,\n open,\n content,\n}: Properties): TemplateResult => {\n return toast({ variant, open, content });\n};\n\nexport const Positive = (args: Properties): TemplateResult =>\n variantDemo({ ...args, variant: 'positive' });\n\nexport const Negative = (args: Properties): TemplateResult =>\n variantDemo({ ...args, variant: 'negative' });\n\nexport const Info = (args: Properties): TemplateResult =>\n variantDemo({ ...args, variant: 'info' });\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AAEP,MAAM,QAAQ,CAAC;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AACd,MAAsB;AAAA;AAAA,kBAEJ;AAAA,gBAOF;AAAA;AAAA,UAEN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYV,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,IACF,SAAS;AAAA,IACT,MAAM;AAAA,EACV;AAAA,EACA,UAAU;AAAA,IACN,SAAS;AAAA,MACL,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,UAAU,UAAU,MA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