@spectrum-web-components/action-bar 0.42.5 → 0.44.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/action-bar",
3
- "version": "0.42.5",
3
+ "version": "0.44.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,14 +57,14 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/action-group": "^0.42.5",
61
- "@spectrum-web-components/base": "^0.42.5",
62
- "@spectrum-web-components/button": "^0.42.5",
63
- "@spectrum-web-components/field-label": "^0.42.5",
64
- "@spectrum-web-components/popover": "^0.42.5"
60
+ "@spectrum-web-components/action-group": "^0.44.0",
61
+ "@spectrum-web-components/base": "^0.44.0",
62
+ "@spectrum-web-components/button": "^0.44.0",
63
+ "@spectrum-web-components/field-label": "^0.44.0",
64
+ "@spectrum-web-components/popover": "^0.44.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@spectrum-css/actionbar": "^8.1.0"
67
+ "@spectrum-css/actionbar": "^8.1.1"
68
68
  },
69
69
  "types": "./src/index.d.ts",
70
70
  "customElements": "custom-elements.json",
@@ -72,5 +72,5 @@
72
72
  "./sp-*.js",
73
73
  "./**/*.dev.js"
74
74
  ],
75
- "gitHead": "f29fd737947945de8cd6f5bc03fb389d386c9c3a"
75
+ "gitHead": "0002d42ce82463b85022e5aa5f7aba8484cba096"
76
76
  }
@@ -6,6 +6,9 @@ import "@spectrum-web-components/action-button/sp-action-button.js";
6
6
  import "@spectrum-web-components/action-group/sp-action-group.js";
7
7
  import "@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js";
8
8
  import "@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";
9
+ import "@spectrum-web-components/action-menu/sp-action-menu.js";
10
+ import "@spectrum-web-components/menu/sp-menu.js";
11
+ import "@spectrum-web-components/menu/sp-menu-item.js";
9
12
  import { Template } from "./template.js";
10
13
  export default {
11
14
  title: "Action Bar",
@@ -28,9 +31,6 @@ export const emphasized = () => {
28
31
  <sp-action-button slot="buttons" label="Edit">
29
32
  <sp-icon-edit slot="icon"></sp-icon-edit>
30
33
  </sp-action-button>
31
- <sp-action-button slot="buttons" label="More">
32
- <sp-icon-more slot="icon"></sp-icon-more>
33
- </sp-action-button>
34
34
  </sp-action-bar>
35
35
  `;
36
36
  };
@@ -47,9 +47,6 @@ export const fixed = () => {
47
47
  <sp-action-button slot="buttons" label="Edit">
48
48
  <sp-icon-edit slot="icon"></sp-icon-edit>
49
49
  </sp-action-button>
50
- <sp-action-button slot="buttons" label="More">
51
- <sp-icon-more slot="icon"></sp-icon-more>
52
- </sp-action-button>
53
50
  </sp-action-bar>
54
51
  `;
55
52
  };
@@ -60,9 +57,28 @@ export const flexible = () => {
60
57
  <sp-action-button slot="buttons" label="Edit">
61
58
  <sp-icon-edit slot="icon"></sp-icon-edit>
62
59
  </sp-action-button>
63
- <sp-action-button slot="buttons" label="More">
64
- <sp-icon-more slot="icon"></sp-icon-more>
60
+ </sp-action-bar>
61
+ `;
62
+ };
63
+ export const hasActionMenuAsChild = () => {
64
+ return html`
65
+ <sp-action-bar open>
66
+ 2 selected
67
+ <sp-action-button slot="buttons" label="Edit">
68
+ <sp-icon-edit slot="icon"></sp-icon-edit>
65
69
  </sp-action-button>
70
+ <sp-action-menu label="More Actions" slot="buttons">
71
+ <sp-menu-item>One</sp-menu-item>
72
+ <sp-menu-item>Two</sp-menu-item>
73
+ <sp-menu-item>
74
+ Select some items
75
+ <sp-menu slot="submenu" selects="multiple">
76
+ <sp-menu-item>A</sp-menu-item>
77
+ <sp-menu-item selected>B</sp-menu-item>
78
+ <sp-menu-item>C</sp-menu-item>
79
+ </sp-menu>
80
+ </sp-menu-item>
81
+ </sp-action-menu>
66
82
  </sp-action-bar>
67
83
  `;
68
84
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["action-bar.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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\n\nimport { Template } from './template.js';\n\nexport default {\n title: 'Action Bar',\n component: 'sp-action-bar',\n parameters: {\n // Getting the Figma link: https://help.figma.com/hc/en-us/articles/360045003494-Storybook-and-Figma\n design: {\n type: 'figma',\n url: 'https://www.figma.com/file/MPtRIVRzPp2VHiEplwXL2X/S-%2F-Manual?node-id=465%3A3127&t=xbooxCWItOFgG2xM-1',\n },\n },\n};\n\nexport const Default = (): TemplateResult =>\n Template({\n open: true,\n });\n\nexport const emphasized = (): TemplateResult => {\n return html`\n <sp-action-bar open emphasized>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const fixed = (): TemplateResult => {\n return html`\n <style>\n [variant='fixed'] {\n bottom: 2.5em;\n inset-inline-end: 1em;\n }\n </style>\n <sp-action-bar open variant=\"fixed\">\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const flexible = (): TemplateResult => {\n return html`\n <sp-action-bar open flexible emphasized>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n"],
5
- "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAEP,SAAS,gBAAgB;AAEzB,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA;AAAA,IAER,QAAQ;AAAA,MACJ,MAAM;AAAA,MACN,KAAK;AAAA,IACT;AAAA,EACJ;AACJ;AAEO,aAAM,UAAU,MACnB,SAAS;AAAA,EACL,MAAM;AACV,CAAC;AAEE,aAAM,aAAa,MAAsB;AAC5C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBX;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;",
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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\nimport '@spectrum-web-components/action-menu/sp-action-menu.js';\nimport '@spectrum-web-components/menu/sp-menu.js';\nimport '@spectrum-web-components/menu/sp-menu-item.js';\n\nimport { Template } from './template.js';\n\nexport default {\n title: 'Action Bar',\n component: 'sp-action-bar',\n parameters: {\n // Getting the Figma link: https://help.figma.com/hc/en-us/articles/360045003494-Storybook-and-Figma\n design: {\n type: 'figma',\n url: 'https://www.figma.com/file/MPtRIVRzPp2VHiEplwXL2X/S-%2F-Manual?node-id=465%3A3127&t=xbooxCWItOFgG2xM-1',\n },\n },\n};\n\nexport const Default = (): TemplateResult =>\n Template({\n open: true,\n });\n\nexport const emphasized = (): TemplateResult => {\n return html`\n <sp-action-bar open emphasized>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const fixed = (): TemplateResult => {\n return html`\n <style>\n [variant='fixed'] {\n bottom: 2.5em;\n inset-inline-end: 1em;\n }\n </style>\n <sp-action-bar open variant=\"fixed\">\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const flexible = (): TemplateResult => {\n return html`\n <sp-action-bar open flexible emphasized>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const hasActionMenuAsChild = (): TemplateResult => {\n return html`\n <sp-action-bar open>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-menu label=\"More Actions\" slot=\"buttons\">\n <sp-menu-item>One</sp-menu-item>\n <sp-menu-item>Two</sp-menu-item>\n <sp-menu-item>\n Select some items\n <sp-menu slot=\"submenu\" selects=\"multiple\">\n <sp-menu-item>A</sp-menu-item>\n <sp-menu-item selected>B</sp-menu-item>\n <sp-menu-item>C</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-action-menu>\n </sp-action-bar>\n `;\n};\n"],
5
+ "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAEP,SAAS,gBAAgB;AAEzB,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA;AAAA,IAER,QAAQ;AAAA,MACJ,MAAM;AAAA,MACN,KAAK;AAAA,IACT;AAAA,EACJ;AACJ;AAEO,aAAM,UAAU,MACnB,SAAS;AAAA,EACL,MAAM;AACV,CAAC;AAEE,aAAM,aAAa,MAAsB;AAC5C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQX;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcX;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQX;AAEO,aAAM,uBAAuB,MAAsB;AACtD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBX;",
6
6
  "names": []
7
7
  }
@@ -3,7 +3,7 @@ import { html } from "@spectrum-web-components/base";
3
3
  import "@spectrum-web-components/action-bar/sp-action-bar.js";
4
4
  import "@spectrum-web-components/action-button/sp-action-button.js";
5
5
  import "@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js";
6
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";
6
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-share-light.js";
7
7
  export const Template = ({
8
8
  emphasized,
9
9
  open,
@@ -16,8 +16,10 @@ export const Template = ({
16
16
  <sp-action-button slot="buttons" label="Edit">
17
17
  <sp-icon-edit slot="icon"></sp-icon-edit>
18
18
  </sp-action-button>
19
- <sp-action-button slot="buttons" label="More">
20
- <sp-icon-more slot="icon"></sp-icon-more>
19
+ <sp-action-button slot="buttons" label="Share">
20
+ <sp-icon-share-light
21
+ slot="icon"
22
+ ></sp-icon-share-light>
21
23
  </sp-action-button>
22
24
  ` : html``}
23
25
  </sp-action-bar>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["template.ts"],
4
- "sourcesContent": ["/*\nCopyright 2024 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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\n\nexport interface Properties {\n emphasized?: boolean;\n open?: boolean;\n tools?: boolean;\n}\n\nexport const Template = ({\n emphasized,\n open,\n tools = true,\n}: Properties): TemplateResult => {\n return html`\n <sp-action-bar ?open=${open} ?emphasized=${emphasized}>\n 2 selected\n ${tools\n ? html`\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n `\n : html``}\n </sp-action-bar>\n `;\n};\n"],
5
- "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAQA,aAAM,WAAW,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,QAAQ;AACZ,MAAkC;AAC9B,SAAO;AAAA,+BACoB,IAAI,gBAAgB,UAAU;AAAA;AAAA,cAE/C,QACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAQA,MAAM;AAAA;AAAA;AAGxB;",
4
+ "sourcesContent": ["/*\nCopyright 2024 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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-share-light.js';\n\nexport interface Properties {\n emphasized?: boolean;\n open?: boolean;\n tools?: boolean;\n}\n\nexport const Template = ({\n emphasized,\n open,\n tools = true,\n}: Properties): TemplateResult => {\n return html`\n <sp-action-bar ?open=${open} ?emphasized=${emphasized}>\n 2 selected\n ${tools\n ? html`\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"Share\">\n <sp-icon-share-light\n slot=\"icon\"\n ></sp-icon-share-light>\n </sp-action-button>\n `\n : html``}\n </sp-action-bar>\n `;\n};\n"],
5
+ "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAQA,aAAM,WAAW,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,QAAQ;AACZ,MAAkC;AAC9B,SAAO;AAAA,+BACoB,IAAI,gBAAgB,UAAU;AAAA;AAAA,cAE/C,QACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAUA,MAAM;AAAA;AAAA;AAGxB;",
6
6
  "names": []
7
7
  }