@spectrum-web-components/toast 0.11.11-react.50 → 0.11.11

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 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 slot="action" variant="overBackground" quiet>
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 slot="action" variant="overBackground" quiet>
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>
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "sp-toast.ts",
7
+ "path": "sp-toast.js",
8
8
  "declarations": [],
9
9
  "exports": [
10
10
  {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "kind": "javascript-module",
22
- "path": "src/Toast.ts",
22
+ "path": "src/Toast.js",
23
23
  "declarations": [
24
24
  {
25
25
  "kind": "variable",
@@ -271,7 +271,7 @@
271
271
  "name": "toastVariants",
272
272
  "declaration": {
273
273
  "name": "toastVariants",
274
- "module": "src/Toast.ts"
274
+ "module": "src/Toast.js"
275
275
  }
276
276
  },
277
277
  {
@@ -279,7 +279,7 @@
279
279
  "name": "Toast",
280
280
  "declaration": {
281
281
  "name": "Toast",
282
- "module": "src/Toast.ts"
282
+ "module": "src/Toast.js"
283
283
  }
284
284
  }
285
285
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/toast",
3
- "version": "0.11.11-react.50+474992be7",
3
+ "version": "0.11.11",
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.50+474992be7",
61
- "@spectrum-web-components/button": "^0.19.11-react.50+474992be7",
62
- "@spectrum-web-components/icon": "^0.12.8-react.50+474992be7",
63
- "@spectrum-web-components/icons-workflow": "^0.9.8-react.50+474992be7"
60
+ "@spectrum-web-components/base": "^0.7.4",
61
+ "@spectrum-web-components/button": "^0.20.0",
62
+ "@spectrum-web-components/icon": "^0.12.8",
63
+ "@spectrum-web-components/icons-workflow": "^0.9.8"
64
64
  },
65
65
  "devDependencies": {
66
- "@spectrum-css/toast": "^8.0.12"
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": "474992be7513cad160eeeec0b522600243babc70"
74
+ "gitHead": "007a762c0257af4cd74e3781d877a8a8343acfd0"
75
75
  }
@@ -12,7 +12,14 @@ const toast = ({
12
12
  ?open=${open}
13
13
  >
14
14
  ${content}
15
- <sp-button slot="action" variant="overBackground" quiet>Undo</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 slot=\"action\" variant=\"overBackground\" quiet>Undo</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,U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right 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,MAAM;AAAA,MACxC,OAAO;AAAA,QACH,MAAM,EAAE,SAAS,SAAS;AAAA,QAC1B,cAAc,EAAE,SAAS,GAAG;AAAA,MAChC;AAAA,MACA,SAAS;AAAA,IACb;AAAA,IACA,MAAM;AAAA,MACF,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,MACzC,aAAa;AAAA,MACb,OAAO;AAAA,QACH,MAAM,EAAE,SAAS,UAAU;AAAA,QAC3B,cAAc,EAAE,SAAS,MAAM;AAAA,MACnC;AAAA,MACA,SAAS;AAAA,QACL,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,EACJ;AACJ;AASO,aAAM,UAAU,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACJ,MAAkC;AAC9B,SAAO,MAAM,EAAE,SAAS,MAAM,QAAQ,CAAC;AAC3C;AAEA,MAAM,cAAc,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACJ,MAAkC;AAC9B,SAAO,MAAM,EAAE,SAAS,MAAM,QAAQ,CAAC;AAC3C;AAEO,aAAM,WAAW,CA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