@spectrum-web-components/action-bar 0.40.5 → 0.41.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.40.5",
3
+ "version": "0.41.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,11 +57,11 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/action-group": "^0.40.5",
61
- "@spectrum-web-components/base": "^0.40.5",
62
- "@spectrum-web-components/button": "^0.40.5",
63
- "@spectrum-web-components/field-label": "^0.40.5",
64
- "@spectrum-web-components/popover": "^0.40.5"
60
+ "@spectrum-web-components/action-group": "^0.41.0",
61
+ "@spectrum-web-components/base": "^0.41.0",
62
+ "@spectrum-web-components/button": "^0.41.0",
63
+ "@spectrum-web-components/field-label": "^0.41.0",
64
+ "@spectrum-web-components/popover": "^0.41.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@spectrum-css/actionbar": "^7.1.0"
@@ -72,5 +72,5 @@
72
72
  "./sp-*.js",
73
73
  "./**/*.dev.js"
74
74
  ],
75
- "gitHead": "2e0006478841b07af63c19a0167a136bf724d064"
75
+ "gitHead": "0bf38fd427adc39804b228a4c61de623e5ebb82e"
76
76
  }
@@ -6,23 +6,14 @@ 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 { Template } from "./template.js";
9
10
  export default {
10
11
  title: "Action Bar",
11
12
  component: "sp-action-bar"
12
13
  };
13
- export const Default = () => {
14
- return html`
15
- <sp-action-bar open>
16
- 2 selected
17
- <sp-action-button slot="buttons" label="Edit">
18
- <sp-icon-edit slot="icon"></sp-icon-edit>
19
- </sp-action-button>
20
- <sp-action-button slot="buttons" label="More">
21
- <sp-icon-more slot="icon"></sp-icon-more>
22
- </sp-action-button>
23
- </sp-action-bar>
24
- `;
25
- };
14
+ export const Default = () => Template({
15
+ open: true
16
+ });
26
17
  export const emphasized = () => {
27
18
  return html`
28
19
  <sp-action-bar open emphasized>
@@ -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\nexport default {\n title: 'Action Bar',\n component: 'sp-action-bar',\n};\n\nexport const Default = (): 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-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 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,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;AAEO,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';\n\nimport { Template } from './template.js';\n\nexport default {\n title: 'Action Bar',\n component: 'sp-action-bar',\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;AACf;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;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ export const argTypes = {
3
+ open: {
4
+ name: "open",
5
+ type: { name: "boolean", required: false },
6
+ description: "Whether the Action Bar is open and visible.",
7
+ table: {
8
+ type: { summary: "boolean" },
9
+ defaultValue: { summary: true }
10
+ },
11
+ control: {
12
+ type: "boolean"
13
+ }
14
+ },
15
+ emphasized: {
16
+ name: "emphasized",
17
+ type: { name: "boolean", required: false },
18
+ description: "Whether the Action Bar is emphasized for the viewer.",
19
+ table: {
20
+ type: { summary: "boolean" },
21
+ defaultValue: { summary: false }
22
+ },
23
+ control: {
24
+ type: "boolean"
25
+ }
26
+ },
27
+ tools: {
28
+ name: "tools",
29
+ type: { name: "boolean", required: false },
30
+ description: "Whether to display tools in the action bar.",
31
+ table: {
32
+ type: { summary: "boolean" },
33
+ defaultValue: { summary: true }
34
+ },
35
+ control: {
36
+ type: "boolean"
37
+ }
38
+ }
39
+ };
40
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["args.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\nexport const argTypes = {\n open: {\n name: 'open',\n type: { name: 'boolean', required: false },\n description: 'Whether the Action Bar is open and visible.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: true },\n },\n control: {\n type: 'boolean',\n },\n },\n emphasized: {\n name: 'emphasized',\n type: { name: 'boolean', required: false },\n description: 'Whether the Action Bar is emphasized for the viewer.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n tools: {\n name: 'tools',\n type: { name: 'boolean', required: false },\n description: 'Whether to display tools in the action bar.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: true },\n },\n control: {\n type: 'boolean',\n },\n },\n};\n"],
5
+ "mappings": ";AAYO,aAAM,WAAW;AAAA,EACpB,MAAM;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,IACzC,aAAa;AAAA,IACb,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,UAAU;AAAA,MAC3B,cAAc,EAAE,SAAS,KAAK;AAAA,IAClC;AAAA,IACA,SAAS;AAAA,MACL,MAAM;AAAA,IACV;AAAA,EACJ;AAAA,EACA,YAAY;AAAA,IACR,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,IACzC,aAAa;AAAA,IACb,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,UAAU;AAAA,MAC3B,cAAc,EAAE,SAAS,MAAM;AAAA,IACnC;AAAA,IACA,SAAS;AAAA,MACL,MAAM;AAAA,IACV;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,IACzC,aAAa;AAAA,IACb,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,UAAU;AAAA,MAC3B,cAAc,EAAE,SAAS,KAAK;AAAA,IAClC;AAAA,IACA,SAAS;AAAA,MACL,MAAM;AAAA,IACV;AAAA,EACJ;AACJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ import { html } from "@spectrum-web-components/base";
3
+ import "@spectrum-web-components/action-bar/sp-action-bar.js";
4
+ import "@spectrum-web-components/action-button/sp-action-button.js";
5
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js";
6
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";
7
+ export const Template = ({
8
+ emphasized,
9
+ open,
10
+ tools = true
11
+ }) => {
12
+ return html`
13
+ <sp-action-bar ?open=${open} ?emphasized=${emphasized}>
14
+ 2 selected
15
+ ${tools ? html`
16
+ <sp-action-button slot="buttons" label="Edit">
17
+ <sp-icon-edit slot="icon"></sp-icon-edit>
18
+ </sp-action-button>
19
+ <sp-action-button slot="buttons" label="More">
20
+ <sp-icon-more slot="icon"></sp-icon-more>
21
+ </sp-action-button>
22
+ ` : html``}
23
+ </sp-action-bar>
24
+ `;
25
+ };
26
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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;",
6
+ "names": []
7
+ }