@spectrum-web-components/badge 0.1.4-devmode.0 → 0.1.4-devmode.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/badge",
3
- "version": "0.1.4-devmode.0+07474d44f",
3
+ "version": "0.1.4-devmode.7+8303f3a2a",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,11 +20,24 @@
20
20
  "module": "src/index.js",
21
21
  "type": "module",
22
22
  "exports": {
23
- ".": "./src/index.js",
24
- "./src/*": "./src/*.js",
23
+ ".": {
24
+ "development": "./src/index.dev.js",
25
+ "default": "./src/index.js"
26
+ },
25
27
  "./package.json": "./package.json",
26
- "./sp-badge": "./sp-badge.js",
27
- "./sp-badge.js": "./sp-badge.js"
28
+ "./src/Badge.js": {
29
+ "development": "./src/Badge.dev.js",
30
+ "default": "./src/Badge.js"
31
+ },
32
+ "./src/badge.css.js": "./src/badge.css.js",
33
+ "./src/index.js": {
34
+ "development": "./src/index.dev.js",
35
+ "default": "./src/index.js"
36
+ },
37
+ "./sp-badge.js": {
38
+ "development": "./sp-badge.dev.js",
39
+ "default": "./sp-badge.js"
40
+ }
28
41
  },
29
42
  "scripts": {
30
43
  "test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
@@ -44,8 +57,8 @@
44
57
  "lit-html"
45
58
  ],
46
59
  "dependencies": {
47
- "@spectrum-web-components/base": "^0.5.9-devmode.24+07474d44f",
48
- "@spectrum-web-components/shared": "^0.14.5-devmode.0+07474d44f",
60
+ "@spectrum-web-components/base": "^0.5.9-devmode.31+8303f3a2a",
61
+ "@spectrum-web-components/shared": "^0.14.5-devmode.7+8303f3a2a",
49
62
  "tslib": "^2.0.0"
50
63
  },
51
64
  "devDependencies": {
@@ -56,5 +69,5 @@
56
69
  "sideEffects": [
57
70
  "./sp-*.js"
58
71
  ],
59
- "gitHead": "07474d44f6cee1db241b9ccf3dc812514ffbe7fa"
72
+ "gitHead": "8303f3a2a90b0aedc15158797662ccfa8f4a2031"
60
73
  }
@@ -1,4 +1,4 @@
1
- import "../sp-badge.js";
1
+ import "@spectrum-web-components/badge/sp-badge.js";
2
2
  import { html } from "@spectrum-web-components/base";
3
3
  import "@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js";
4
4
  export default {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["badge.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*/\n\nimport '../sp-badge.js';\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js';\n\nexport default {\n title: 'Badge',\n component: 'sp-badge',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-badge>Badge</sp-badge>\n `;\n};\n\nexport const Icons = (): TemplateResult => {\n return html`\n <sp-badge>No icon</sp-badge>\n\n <sp-badge>\n <sp-icon-checkmark-circle slot=\"icon\"></sp-icon-checkmark-circle>\n Icon and label\n </sp-badge>\n\n <sp-badge>\n <sp-icon-checkmark-circle slot=\"icon\"></sp-icon-checkmark-circle>\n </sp-badge>\n `;\n};\n\nexport const Sizes = (): TemplateResult => {\n return html`\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <sp-badge size=\"s\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Small\n </sp-badge>\n <sp-badge size=\"m\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Medium\n </sp-badge>\n <sp-badge size=\"l\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Large\n </sp-badge>\n <sp-badge size=\"xl\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Extra-large\n </sp-badge>\n <sp-badge style=\"max-width: 180px\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n This long content automatically wraps, but shows no more than\n two lines\n </sp-badge>\n </div>\n `;\n};\n\nexport const Semantic = (): TemplateResult => {\n return html`\n <sp-badge variant=\"positive\">Positive</sp-badge>\n <sp-badge variant=\"informative\">Informative</sp-badge>\n <sp-badge variant=\"negative\">Negative</sp-badge>\n <sp-badge variant=\"neutral\">Neutral</sp-badge>\n `;\n};\n\nexport const NonSemantic = (): TemplateResult => {\n return html`\n <sp-badge variant=\"seafoam\">Seafoam</sp-badge>\n <sp-badge variant=\"indigo\">Indigo</sp-badge>\n <sp-badge variant=\"purple\">Purple</sp-badge>\n <sp-badge variant=\"fuchsia\">Fuchsia</sp-badge>\n <sp-badge variant=\"magenta\">Magenta</sp-badge>\n <sp-badge variant=\"yellow\">Yellow</sp-badge>\n `;\n};\n\nexport const Inline = (): TemplateResult => {\n return html`\n Badge is a simple\n <sp-badge variant=\"positive\" size=\"s\">inline</sp-badge>\n element that should\n <sp-badge variant=\"magenta\" size=\"s\">flow</sp-badge>\n with the rest of the page:\n <sp-badge variant=\"negative\">Missing</sp-badge>\n <sp-badge variant=\"positive\">Successful</sp-badge>\n <sp-badge variant=\"purple\">Purple</sp-badge>\n `;\n};\n\nexport const Fixed = (): TemplateResult => {\n return html`\n <div\n style=\"position: relative; width: 400px; height: 200px; background: #eee\"\n >\n <sp-badge>None</sp-badge>\n <sp-badge\n fixed=\"top\"\n style=\"position: absolute; top: 0; left: 200px;\"\n >\n Top\n </sp-badge>\n <sp-badge\n fixed=\"right\"\n style=\"position: absolute; right: 0; top: 100px;\"\n >\n Right\n </sp-badge>\n <sp-badge\n fixed=\"bottom\"\n style=\"position: absolute; bottom: 0; left: 200px;\"\n >\n Bottom\n </sp-badge>\n <sp-badge\n fixed=\"left\"\n style=\"position: absolute; left: 0; top: 100px;\"\n >\n Left\n </sp-badge>\n </div>\n `;\n};\n"],
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*/\n\nimport '@spectrum-web-components/badge/sp-badge.js';\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js';\n\nexport default {\n title: 'Badge',\n component: 'sp-badge',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-badge>Badge</sp-badge>\n `;\n};\n\nexport const Icons = (): TemplateResult => {\n return html`\n <sp-badge>No icon</sp-badge>\n\n <sp-badge>\n <sp-icon-checkmark-circle slot=\"icon\"></sp-icon-checkmark-circle>\n Icon and label\n </sp-badge>\n\n <sp-badge>\n <sp-icon-checkmark-circle slot=\"icon\"></sp-icon-checkmark-circle>\n </sp-badge>\n `;\n};\n\nexport const Sizes = (): TemplateResult => {\n return html`\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <sp-badge size=\"s\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Small\n </sp-badge>\n <sp-badge size=\"m\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Medium\n </sp-badge>\n <sp-badge size=\"l\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Large\n </sp-badge>\n <sp-badge size=\"xl\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Extra-large\n </sp-badge>\n <sp-badge style=\"max-width: 180px\">\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n This long content automatically wraps, but shows no more than\n two lines\n </sp-badge>\n </div>\n `;\n};\n\nexport const Semantic = (): TemplateResult => {\n return html`\n <sp-badge variant=\"positive\">Positive</sp-badge>\n <sp-badge variant=\"informative\">Informative</sp-badge>\n <sp-badge variant=\"negative\">Negative</sp-badge>\n <sp-badge variant=\"neutral\">Neutral</sp-badge>\n `;\n};\n\nexport const NonSemantic = (): TemplateResult => {\n return html`\n <sp-badge variant=\"seafoam\">Seafoam</sp-badge>\n <sp-badge variant=\"indigo\">Indigo</sp-badge>\n <sp-badge variant=\"purple\">Purple</sp-badge>\n <sp-badge variant=\"fuchsia\">Fuchsia</sp-badge>\n <sp-badge variant=\"magenta\">Magenta</sp-badge>\n <sp-badge variant=\"yellow\">Yellow</sp-badge>\n `;\n};\n\nexport const Inline = (): TemplateResult => {\n return html`\n Badge is a simple\n <sp-badge variant=\"positive\" size=\"s\">inline</sp-badge>\n element that should\n <sp-badge variant=\"magenta\" size=\"s\">flow</sp-badge>\n with the rest of the page:\n <sp-badge variant=\"negative\">Missing</sp-badge>\n <sp-badge variant=\"positive\">Successful</sp-badge>\n <sp-badge variant=\"purple\">Purple</sp-badge>\n `;\n};\n\nexport const Fixed = (): TemplateResult => {\n return html`\n <div\n style=\"position: relative; width: 400px; height: 200px; background: #eee\"\n >\n <sp-badge>None</sp-badge>\n <sp-badge\n fixed=\"top\"\n style=\"position: absolute; top: 0; left: 200px;\"\n >\n Top\n </sp-badge>\n <sp-badge\n fixed=\"right\"\n style=\"position: absolute; right: 0; top: 100px;\"\n >\n Right\n </sp-badge>\n <sp-badge\n fixed=\"bottom\"\n style=\"position: absolute; bottom: 0; left: 200px;\"\n >\n Bottom\n </sp-badge>\n <sp-badge\n fixed=\"left\"\n style=\"position: absolute; left: 0; top: 100px;\"\n >\n Left\n </sp-badge>\n </div>\n `;\n};\n"],
5
5
  "mappings": "AAYA;AACA;AACA;AAEA,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYX;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmCX;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAMX;AAEO,aAAM,cAAc,MAAsB;AAC7C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQX;AAEO,aAAM,SAAS,MAAsB;AACxC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUX;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BX;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
2
- import "../sp-badge.js";
3
- import "../../icons-workflow/icons/sp-icon-checkmark-circle.js";
2
+ import "@spectrum-web-components/badge/sp-badge.js";
3
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js";
4
4
  describe("Badge", () => {
5
5
  it("loads default badge accessibly", async () => {
6
6
  const el = await fixture(html`
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["badge.test.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*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '../sp-badge.js';\nimport '../../icons-workflow/icons/sp-icon-checkmark-circle.js';\nimport { Badge } from '../src/Badge.js';\n\ndescribe('Badge', () => {\n it('loads default badge accessibly', async () => {\n const el = await fixture<Badge>(\n html`\n <sp-badge>\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Icon and label\n </sp-badge>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n});\n"],
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*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/badge/sp-badge.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js';\nimport { Badge } from '../src/Badge.js';\n\ndescribe('Badge', () => {\n it('loads default badge accessibly', async () => {\n const el = await fixture<Badge>(\n html`\n <sp-badge>\n <sp-icon-checkmark-circle\n slot=\"icon\"\n ></sp-icon-checkmark-circle>\n Icon and label\n </sp-badge>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n});\n"],
5
5
  "mappings": "AAYA;AAEA;AACA;AAGA,SAAS,SAAS,MAAM;AACpB,KAAG,kCAAkC,YAAY;AAC7C,UAAM,KAAK,MAAM,QACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAQJ;AAEA,UAAM,eAAe,EAAE;AAEvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }