@spectrum-web-components/action-bar 0.4.16 → 0.4.17-devmode.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.4.16",
3
+ "version": "0.4.17-devmode.0+07474d44f",
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/*",
23
+ ".": {
24
+ "development": "./src/index.dev.js",
25
+ "default": "./src/index.js"
26
+ },
25
27
  "./package.json": "./package.json",
26
- "./sp-action-bar": "./sp-action-bar.js",
27
- "./sp-action-bar.js": "./sp-action-bar.js"
28
+ "./src/ActionBar.js": {
29
+ "development": "./src/ActionBar.dev.js",
30
+ "default": "./src/ActionBar.js"
31
+ },
32
+ "./src/action-bar.css.js": "./src/action-bar.css.js",
33
+ "./src/index.js": {
34
+ "development": "./src/index.dev.js",
35
+ "default": "./src/index.js"
36
+ },
37
+ "./sp-action-bar.js": {
38
+ "development": "./sp-action-bar.dev.js",
39
+ "default": "./sp-action-bar.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.8",
48
- "@spectrum-web-components/popover": "^0.11.16",
60
+ "@spectrum-web-components/base": "^0.5.9-devmode.24+07474d44f",
61
+ "@spectrum-web-components/popover": "^0.11.17-devmode.0+07474d44f",
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": "3be62133721efba844cd7032566a2c49ed6d9875"
72
+ "gitHead": "07474d44f6cee1db241b9ccf3dc812514ffbe7fa"
60
73
  }
@@ -0,0 +1,3 @@
1
+ import { ActionBar } from "./src/ActionBar.dev.js";
2
+ customElements.define("sp-action-bar", ActionBar);
3
+ //# sourceMappingURL=sp-action-bar.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-action-bar.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 { ActionBar } from './src/ActionBar.dev.js'\n\ncustomElements.define('sp-action-bar', ActionBar);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-bar': ActionBar;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,iBAAiB,SAAS;",
6
+ "names": []
7
+ }
package/sp-action-bar.js CHANGED
@@ -1,14 +1,3 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { ActionBar } from './src/ActionBar.js';
13
- customElements.define('sp-action-bar', ActionBar);
14
- //# sourceMappingURL=sp-action-bar.js.map
1
+ import { ActionBar } from "./src/ActionBar.js";
2
+ customElements.define("sp-action-bar", ActionBar);
3
+ //# sourceMappingURL=sp-action-bar.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"sp-action-bar.js","sourceRoot":"","sources":["sp-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC","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 { ActionBar } from './src/ActionBar.js';\n\ncustomElements.define('sp-action-bar', ActionBar);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-bar': ActionBar;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-action-bar.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 { ActionBar } from './src/ActionBar.js';\n\ncustomElements.define('sp-action-bar', ActionBar);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-bar': ActionBar;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,iBAAiB,SAAS;",
6
+ "names": []
7
+ }
@@ -0,0 +1,62 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SpectrumElement
15
+ } from "@spectrum-web-components/base";
16
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
17
+ import "@spectrum-web-components/popover/sp-popover.js";
18
+ import actionBarStyles from "./action-bar.css.js";
19
+ export const actionBarVariants = ["sticky", "fixed"];
20
+ export class ActionBar extends SpectrumElement {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.flexible = false;
24
+ this.open = false;
25
+ this._variant = "";
26
+ }
27
+ static get styles() {
28
+ return [actionBarStyles];
29
+ }
30
+ set variant(variant) {
31
+ if (variant === this.variant) {
32
+ return;
33
+ }
34
+ if (actionBarVariants.includes(variant)) {
35
+ this.setAttribute("variant", variant);
36
+ this._variant = variant;
37
+ return;
38
+ }
39
+ this.removeAttribute("variant");
40
+ this._variant = "";
41
+ }
42
+ get variant() {
43
+ return this._variant;
44
+ }
45
+ render() {
46
+ return html`
47
+ <sp-popover ?open=${this.open} id="popover">
48
+ <slot></slot>
49
+ </sp-popover>
50
+ `;
51
+ }
52
+ }
53
+ __decorateClass([
54
+ property({ type: Boolean, reflect: true })
55
+ ], ActionBar.prototype, "flexible", 2);
56
+ __decorateClass([
57
+ property({ type: Boolean, reflect: true })
58
+ ], ActionBar.prototype, "open", 2);
59
+ __decorateClass([
60
+ property({ type: String, reflect: true })
61
+ ], ActionBar.prototype, "variant", 1);
62
+ //# sourceMappingURL=ActionBar.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["ActionBar.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 {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/popover/sp-popover.js';\nimport actionBarStyles from './action-bar.css.js';\nexport const actionBarVariants = ['sticky', 'fixed'];\n\n/**\n * @element sp-action-bar\n * @slot - Content to display with the Action Bar\n */\nexport class ActionBar extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [actionBarStyles];\n }\n\n /**\n * When `flexible` the action bar sizes itself to its content\n * rather than a specific width.\n *\n * @param {Boolean} flexible\n */\n @property({ type: Boolean, reflect: true })\n public flexible = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * The variant applies specific styling when set to `sticky` or `fixed`.\n * `variant` attribute is removed when not matching one of the above.\n *\n * @param {String} variant\n */\n @property({ type: String, reflect: true })\n public set variant(variant: string) {\n if (variant === this.variant) {\n return;\n }\n if (actionBarVariants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n return;\n }\n this.removeAttribute('variant');\n this._variant = '';\n }\n\n public get variant(): string {\n return this._variant;\n }\n\n private _variant = '';\n\n public override render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot></slot>\n </sp-popover>\n `;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAMA;AACA;AACA;AACO,aAAM,oBAAoB,CAAC,UAAU,OAAO;AAM5C,aAAM,kBAAkB,gBAAgB;AAAA,EAAxC;AAAA;AAYI,oBAAW;AAGX,gBAAO;AA0BN,oBAAW;AAAA;AAAA,aAxCQ,SAAyB;AAChD,WAAO,CAAC,eAAe;AAAA,EAC3B;AAAA,MAqBW,QAAQ,SAAiB;AAChC,QAAI,YAAY,KAAK,SAAS;AAC1B;AAAA,IACJ;AACA,QAAI,kBAAkB,SAAS,OAAO,GAAG;AACrC,WAAK,aAAa,WAAW,OAAO;AACpC,WAAK,WAAW;AAChB;AAAA,IACJ;AACA,SAAK,gBAAgB,SAAS;AAC9B,SAAK,WAAW;AAAA,EACpB;AAAA,MAEW,UAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA,EAIgB,SAAyB;AACrC,WAAO;AAAA,gCACiB,KAAK;AAAA;AAAA;AAAA;AAAA,EAIjC;AACJ;AAtCW;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AAZJ,UAYI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AAfJ,UAeI;AASI;AAAA,EADX,AAAC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAC9B,AAxBR,UAwBQ;",
6
+ "names": []
7
+ }
package/src/ActionBar.js CHANGED
@@ -1,76 +1,62 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { __decorate } from "tslib";
13
- import { html, SpectrumElement, } from '@spectrum-web-components/base';
14
- import { property } from '@spectrum-web-components/base/src/decorators.js';
15
- import '@spectrum-web-components/popover/sp-popover.js';
16
- import actionBarStyles from './action-bar.css.js';
17
- export const actionBarVariants = ['sticky', 'fixed'];
18
- /**
19
- * @element sp-action-bar
20
- * @slot - Content to display with the Action Bar
21
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SpectrumElement
15
+ } from "@spectrum-web-components/base";
16
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
17
+ import "@spectrum-web-components/popover/sp-popover.js";
18
+ import actionBarStyles from "./action-bar.css.js";
19
+ export const actionBarVariants = ["sticky", "fixed"];
22
20
  export class ActionBar extends SpectrumElement {
23
- constructor() {
24
- super(...arguments);
25
- /**
26
- * When `flexible` the action bar sizes itself to its content
27
- * rather than a specific width.
28
- *
29
- * @param {Boolean} flexible
30
- */
31
- this.flexible = false;
32
- this.open = false;
33
- this._variant = '';
21
+ constructor() {
22
+ super(...arguments);
23
+ this.flexible = false;
24
+ this.open = false;
25
+ this._variant = "";
26
+ }
27
+ static get styles() {
28
+ return [actionBarStyles];
29
+ }
30
+ set variant(variant) {
31
+ if (variant === this.variant) {
32
+ return;
34
33
  }
35
- static get styles() {
36
- return [actionBarStyles];
34
+ if (actionBarVariants.includes(variant)) {
35
+ this.setAttribute("variant", variant);
36
+ this._variant = variant;
37
+ return;
37
38
  }
38
- /**
39
- * The variant applies specific styling when set to `sticky` or `fixed`.
40
- * `variant` attribute is removed when not matching one of the above.
41
- *
42
- * @param {String} variant
43
- */
44
- set variant(variant) {
45
- if (variant === this.variant) {
46
- return;
47
- }
48
- if (actionBarVariants.includes(variant)) {
49
- this.setAttribute('variant', variant);
50
- this._variant = variant;
51
- return;
52
- }
53
- this.removeAttribute('variant');
54
- this._variant = '';
55
- }
56
- get variant() {
57
- return this._variant;
58
- }
59
- render() {
60
- return html `
39
+ this.removeAttribute("variant");
40
+ this._variant = "";
41
+ }
42
+ get variant() {
43
+ return this._variant;
44
+ }
45
+ render() {
46
+ return html`
61
47
  <sp-popover ?open=${this.open} id="popover">
62
48
  <slot></slot>
63
49
  </sp-popover>
64
50
  `;
65
- }
51
+ }
66
52
  }
67
- __decorate([
68
- property({ type: Boolean, reflect: true })
69
- ], ActionBar.prototype, "flexible", void 0);
70
- __decorate([
71
- property({ type: Boolean, reflect: true })
72
- ], ActionBar.prototype, "open", void 0);
73
- __decorate([
74
- property({ type: String, reflect: true })
75
- ], ActionBar.prototype, "variant", null);
76
- //# sourceMappingURL=ActionBar.js.map
53
+ __decorateClass([
54
+ property({ type: Boolean, reflect: true })
55
+ ], ActionBar.prototype, "flexible", 2);
56
+ __decorateClass([
57
+ property({ type: Boolean, reflect: true })
58
+ ], ActionBar.prototype, "open", 2);
59
+ __decorateClass([
60
+ property({ type: String, reflect: true })
61
+ ], ActionBar.prototype, "variant", 1);
62
+ //# sourceMappingURL=ActionBar.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"ActionBar.js","sourceRoot":"","sources":["ActionBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EACJ,eAAe,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,gDAAgD,CAAC;AACxD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,eAAe;IAA9C;;QAKI;;;;;WAKG;QAEI,aAAQ,GAAG,KAAK,CAAC;QAGjB,SAAI,GAAG,KAAK,CAAC;QA0BZ,aAAQ,GAAG,EAAE,CAAC;IAS1B,CAAC;IAjDU,MAAM,KAAc,MAAM;QAC7B,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7B,CAAC;IAcD;;;;;OAKG;IAEH,IAAW,OAAO,CAAC,OAAe;QAC9B,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;YAC1B,OAAO;SACV;QACD,IAAI,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YACrC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,OAAO;SACV;QACD,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAIe,MAAM;QAClB,OAAO,IAAI,CAAA;gCACa,IAAI,CAAC,IAAI;;;SAGhC,CAAC;IACN,CAAC;CACJ;AAtCG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACnB;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACvB;AASpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAYzC","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 {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/popover/sp-popover.js';\nimport actionBarStyles from './action-bar.css.js';\nexport const actionBarVariants = ['sticky', 'fixed'];\n\n/**\n * @element sp-action-bar\n * @slot - Content to display with the Action Bar\n */\nexport class ActionBar extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [actionBarStyles];\n }\n\n /**\n * When `flexible` the action bar sizes itself to its content\n * rather than a specific width.\n *\n * @param {Boolean} flexible\n */\n @property({ type: Boolean, reflect: true })\n public flexible = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * The variant applies specific styling when set to `sticky` or `fixed`.\n * `variant` attribute is removed when not matching one of the above.\n *\n * @param {String} variant\n */\n @property({ type: String, reflect: true })\n public set variant(variant: string) {\n if (variant === this.variant) {\n return;\n }\n if (actionBarVariants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n return;\n }\n this.removeAttribute('variant');\n this._variant = '';\n }\n\n public get variant(): string {\n return this._variant;\n }\n\n private _variant = '';\n\n public override render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot></slot>\n </sp-popover>\n `;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["ActionBar.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 {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/popover/sp-popover.js';\nimport actionBarStyles from './action-bar.css.js';\nexport const actionBarVariants = ['sticky', 'fixed'];\n\n/**\n * @element sp-action-bar\n * @slot - Content to display with the Action Bar\n */\nexport class ActionBar extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [actionBarStyles];\n }\n\n /**\n * When `flexible` the action bar sizes itself to its content\n * rather than a specific width.\n *\n * @param {Boolean} flexible\n */\n @property({ type: Boolean, reflect: true })\n public flexible = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * The variant applies specific styling when set to `sticky` or `fixed`.\n * `variant` attribute is removed when not matching one of the above.\n *\n * @param {String} variant\n */\n @property({ type: String, reflect: true })\n public set variant(variant: string) {\n if (variant === this.variant) {\n return;\n }\n if (actionBarVariants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n return;\n }\n this.removeAttribute('variant');\n this._variant = '';\n }\n\n public get variant(): string {\n return this._variant;\n }\n\n private _variant = '';\n\n public override render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot></slot>\n </sp-popover>\n `;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAMA;AACA;AACA;AACO,aAAM,oBAAoB,CAAC,UAAU,OAAO;AAM5C,aAAM,kBAAkB,gBAAgB;AAAA,EAAxC;AAAA;AAYI,oBAAW;AAGX,gBAAO;AA0BN,oBAAW;AAAA;AAAA,aAxCQ,SAAyB;AAChD,WAAO,CAAC,eAAe;AAAA,EAC3B;AAAA,MAqBW,QAAQ,SAAiB;AAChC,QAAI,YAAY,KAAK,SAAS;AAC1B;AAAA,IACJ;AACA,QAAI,kBAAkB,SAAS,OAAO,GAAG;AACrC,WAAK,aAAa,WAAW,OAAO;AACpC,WAAK,WAAW;AAChB;AAAA,IACJ;AACA,SAAK,gBAAgB,SAAS;AAC9B,SAAK,WAAW;AAAA,EACpB;AAAA,MAEW,UAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA,EAIgB,SAAyB;AACrC,WAAO;AAAA,gCACiB,KAAK;AAAA;AAAA;AAAA;AAAA,EAIjC;AACJ;AAtCW;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AAZJ,UAYI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AAfJ,UAeI;AASI;AAAA,EADX,AAAC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAC9B,AAxBR,UAwBQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,27 @@
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ :host{--spectrum-actionbar-height:var(
4
+ --spectrum-global-dimension-size-600
5
+ );--spectrum-actionbar-padding-left:var(
6
+ --spectrum-global-dimension-size-200
7
+ );--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(
8
+ --spectrum-actionbar-height,
9
+ var(--spectrum-global-dimension-size-600)
10
+ ) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(
11
+ --spectrum-actionbar-padding-left
12
+ )}:host([dir=rtl]) #popover{padding-right:var(
13
+ --spectrum-actionbar-padding-left
14
+ )}:host([dir=ltr]) #popover{padding-right:var(
15
+ --spectrum-actionbar-padding-right
16
+ )}:host([dir=rtl]) #popover{padding-left:var(
17
+ --spectrum-actionbar-padding-right
18
+ )}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(
19
+ --spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)
20
+ );justify-content:space-between;margin:auto;max-width:var(
21
+ --spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)
22
+ );min-width:var(
23
+ --spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)
24
+ );pointer-events:auto;position:relative;width:100%}
25
+ `;
26
+ export default styles;
27
+ //# sourceMappingURL=action-bar.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["action-bar.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-actionbar-height:var(\n--spectrum-global-dimension-size-600\n);--spectrum-actionbar-padding-left:var(\n--spectrum-global-dimension-size-200\n);--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(\n--spectrum-actionbar-height,\nvar(--spectrum-global-dimension-size-600)\n) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=rtl]) #popover{padding-right:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=ltr]) #popover{padding-right:var(\n--spectrum-actionbar-padding-right\n)}:host([dir=rtl]) #popover{padding-left:var(\n--spectrum-actionbar-padding-right\n)}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(\n--spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)\n);justify-content:space-between;margin:auto;max-width:var(\n--spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)\n);min-width:var(\n--spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)\n);pointer-events:auto;position:relative;width:100%}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBf,eAAe;",
6
+ "names": []
7
+ }
@@ -1,16 +1,5 @@
1
- /*
2
- Copyright 2022 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { css } from '@spectrum-web-components/base';
13
- const styles = css `
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
14
3
  :host{--spectrum-actionbar-height:var(
15
4
  --spectrum-global-dimension-size-600
16
5
  );--spectrum-actionbar-padding-left:var(
@@ -35,4 +24,4 @@ var(--spectrum-global-dimension-size-600)
35
24
  );pointer-events:auto;position:relative;width:100%}
36
25
  `;
37
26
  export default styles;
38
- //# sourceMappingURL=action-bar.css.js.map
27
+ //# sourceMappingURL=action-bar.css.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"action-bar.css.js","sourceRoot":"","sources":["action-bar.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-actionbar-height:var(\n--spectrum-global-dimension-size-600\n);--spectrum-actionbar-padding-left:var(\n--spectrum-global-dimension-size-200\n);--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(\n--spectrum-actionbar-height,\nvar(--spectrum-global-dimension-size-600)\n) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=rtl]) #popover{padding-right:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=ltr]) #popover{padding-right:var(\n--spectrum-actionbar-padding-right\n)}:host([dir=rtl]) #popover{padding-left:var(\n--spectrum-actionbar-padding-right\n)}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(\n--spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)\n);justify-content:space-between;margin:auto;max-width:var(\n--spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)\n);min-width:var(\n--spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)\n);pointer-events:auto;position:relative;width:100%}\n`;\nexport default styles;"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["action-bar.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-actionbar-height:var(\n--spectrum-global-dimension-size-600\n);--spectrum-actionbar-padding-left:var(\n--spectrum-global-dimension-size-200\n);--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(\n--spectrum-actionbar-height,\nvar(--spectrum-global-dimension-size-600)\n) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=rtl]) #popover{padding-right:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=ltr]) #popover{padding-right:var(\n--spectrum-actionbar-padding-right\n)}:host([dir=rtl]) #popover{padding-left:var(\n--spectrum-actionbar-padding-right\n)}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(\n--spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)\n);justify-content:space-between;margin:auto;max-width:var(\n--spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)\n);min-width:var(\n--spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)\n);pointer-events:auto;position:relative;width:100%}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./ActionBar.dev.js";
2
+ //# sourceMappingURL=index.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './ActionBar.dev.js'\n"],
5
+ "mappings": "AAYA;",
6
+ "names": []
7
+ }
package/src/index.js CHANGED
@@ -1,13 +1,2 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- export * from './ActionBar.js';
13
- //# sourceMappingURL=index.js.map
1
+ export * from "./ActionBar.js";
2
+ //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,cAAc,gBAAgB,CAAC","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\nexport * from './ActionBar.js';\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './ActionBar.js';\n"],
5
+ "mappings": "AAYA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,27 @@
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ :host{--spectrum-actionbar-height:var(
4
+ --spectrum-global-dimension-size-600
5
+ );--spectrum-actionbar-padding-left:var(
6
+ --spectrum-global-dimension-size-200
7
+ );--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(
8
+ --spectrum-actionbar-height,
9
+ var(--spectrum-global-dimension-size-600)
10
+ ) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(
11
+ --spectrum-actionbar-padding-left
12
+ )}:host([dir=rtl]) #popover{padding-right:var(
13
+ --spectrum-actionbar-padding-left
14
+ )}:host([dir=ltr]) #popover{padding-right:var(
15
+ --spectrum-actionbar-padding-right
16
+ )}:host([dir=rtl]) #popover{padding-left:var(
17
+ --spectrum-actionbar-padding-right
18
+ )}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(
19
+ --spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)
20
+ );justify-content:space-between;margin:auto;max-width:var(
21
+ --spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)
22
+ );min-width:var(
23
+ --spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)
24
+ );pointer-events:auto;position:relative;width:100%}
25
+ `;
26
+ export default styles;
27
+ //# sourceMappingURL=spectrum-action-bar.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-action-bar.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-actionbar-height:var(\n--spectrum-global-dimension-size-600\n);--spectrum-actionbar-padding-left:var(\n--spectrum-global-dimension-size-200\n);--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(\n--spectrum-actionbar-height,\nvar(--spectrum-global-dimension-size-600)\n) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=rtl]) #popover{padding-right:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=ltr]) #popover{padding-right:var(\n--spectrum-actionbar-padding-right\n)}:host([dir=rtl]) #popover{padding-left:var(\n--spectrum-actionbar-padding-right\n)}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(\n--spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)\n);justify-content:space-between;margin:auto;max-width:var(\n--spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)\n);min-width:var(\n--spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)\n);pointer-events:auto;position:relative;width:100%}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBf,eAAe;",
6
+ "names": []
7
+ }
@@ -1,16 +1,5 @@
1
- /*
2
- Copyright 2022 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { css } from '@spectrum-web-components/base';
13
- const styles = css `
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
14
3
  :host{--spectrum-actionbar-height:var(
15
4
  --spectrum-global-dimension-size-600
16
5
  );--spectrum-actionbar-padding-left:var(
@@ -35,4 +24,4 @@ var(--spectrum-global-dimension-size-600)
35
24
  );pointer-events:auto;position:relative;width:100%}
36
25
  `;
37
26
  export default styles;
38
- //# sourceMappingURL=spectrum-action-bar.css.js.map
27
+ //# sourceMappingURL=spectrum-action-bar.css.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"spectrum-action-bar.css.js","sourceRoot":"","sources":["spectrum-action-bar.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-actionbar-height:var(\n--spectrum-global-dimension-size-600\n);--spectrum-actionbar-padding-left:var(\n--spectrum-global-dimension-size-200\n);--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(\n--spectrum-actionbar-height,\nvar(--spectrum-global-dimension-size-600)\n) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=rtl]) #popover{padding-right:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=ltr]) #popover{padding-right:var(\n--spectrum-actionbar-padding-right\n)}:host([dir=rtl]) #popover{padding-left:var(\n--spectrum-actionbar-padding-right\n)}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(\n--spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)\n);justify-content:space-between;margin:auto;max-width:var(\n--spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)\n);min-width:var(\n--spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)\n);pointer-events:auto;position:relative;width:100%}\n`;\nexport default styles;"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-action-bar.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-actionbar-height:var(\n--spectrum-global-dimension-size-600\n);--spectrum-actionbar-padding-left:var(\n--spectrum-global-dimension-size-200\n);--spectrum-actionbar-padding-right:calc(var(--spectrum-global-dimension-size-200)/2);--spectrum-actionbar-margin-x:var(--spectrum-global-dimension-size-200);--spectrum-actionbar-min-width:280px;--spectrum-actionbar-max-width:960px}:host{bottom:0;box-sizing:border-box;display:flex;height:0;justify-content:center;opacity:0;overflow:hidden;padding:0 var(--spectrum-actionbar-margin-x);pointer-events:none;transition:height var(--spectrum-global-animation-duration-100,.13s) ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s) ease-in-out;z-index:1}:host([open]){height:calc(var(\n--spectrum-actionbar-height,\nvar(--spectrum-global-dimension-size-600)\n) + var(--spectrum-actionbar-margin-x)*2);opacity:1}:host([dir=ltr][variant=sticky]){left:0}:host([dir=rtl][variant=sticky]){right:0}:host([dir=ltr][variant=sticky]){right:0}:host([dir=rtl][variant=sticky]){left:0}:host([variant=sticky]){position:sticky}:host([flexible]) #popover{width:auto}:host([variant=fixed]){position:fixed}:host([dir=ltr]) #popover{padding-left:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=rtl]) #popover{padding-right:var(\n--spectrum-actionbar-padding-left\n)}:host([dir=ltr]) #popover{padding-right:var(\n--spectrum-actionbar-padding-right\n)}:host([dir=rtl]) #popover{padding-left:var(\n--spectrum-actionbar-padding-right\n)}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(\n--spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)\n);justify-content:space-between;margin:auto;max-width:var(\n--spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)\n);min-width:var(\n--spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)\n);pointer-events:auto;position:relative;width:100%}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBf,eAAe;",
6
+ "names": []
7
+ }
@@ -1,27 +1,16 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { html } from '@spectrum-web-components/base';
13
- import '../sp-action-bar.js';
14
- import '@spectrum-web-components/checkbox/sp-checkbox.js';
15
- import '@spectrum-web-components/action-button/sp-action-button.js';
16
- import '@spectrum-web-components/action-group/sp-action-group.js';
17
- import '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';
18
- import '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';
1
+ import { html } from "@spectrum-web-components/base";
2
+ import "@spectrum-web-components/action-bar/sp-action-bar.js";
3
+ import "@spectrum-web-components/checkbox/sp-checkbox.js";
4
+ import "@spectrum-web-components/action-button/sp-action-button.js";
5
+ import "@spectrum-web-components/action-group/sp-action-group.js";
6
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js";
7
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";
19
8
  export default {
20
- title: 'Action Bar',
21
- component: 'sp-action-bar',
9
+ title: "Action Bar",
10
+ component: "sp-action-bar"
22
11
  };
23
12
  export const Default = () => {
24
- return html `
13
+ return html`
25
14
  <sp-action-bar open>
26
15
  <sp-checkbox indeterminate>228 Selected</sp-checkbox>
27
16
  <sp-action-group quiet>
@@ -35,4 +24,4 @@ export const Default = () => {
35
24
  </sp-action-bar>
36
25
  `;
37
26
  };
38
- //# sourceMappingURL=action-bar.stories.js.map
27
+ //# sourceMappingURL=action-bar.stories.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"action-bar.stories.js","sourceRoot":"","sources":["action-bar.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AAErE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kDAAkD,CAAC;AAC1D,OAAO,4DAA4D,CAAC;AACpE,OAAO,0DAA0D,CAAC;AAClE,OAAO,+DAA+D,CAAC;AACvE,OAAO,+DAA+D,CAAC;AAEvE,eAAe;IACX,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,eAAe;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAmB,EAAE;IACxC,OAAO,IAAI,CAAA;;;;;;;;;;;;KAYV,CAAC;AACN,CAAC,CAAC","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 '../sp-action-bar.js';\nimport '@spectrum-web-components/checkbox/sp-checkbox.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 <sp-checkbox indeterminate>228 Selected</sp-checkbox>\n <sp-action-group quiet>\n <sp-action-button>\n <sp-icon-edit slot=\"icon\" label=\"Edit\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button>\n <sp-icon-more slot=\"icon\" label=\"More\"></sp-icon-more>\n </sp-action-button>\n </sp-action-group>\n </sp-action-bar>\n `;\n};\n"]}
1
+ {
2
+ "version": 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/checkbox/sp-checkbox.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 <sp-checkbox indeterminate>228 Selected</sp-checkbox>\n <sp-action-group quiet>\n <sp-action-button>\n <sp-icon-edit slot=\"icon\" label=\"Edit\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button>\n <sp-icon-more slot=\"icon\" label=\"More\"></sp-icon-more>\n </sp-action-button>\n </sp-action-group>\n </sp-action-bar>\n `;\n};\n"],
5
+ "mappings": "AAYA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaX;",
6
+ "names": []
7
+ }
@@ -1,15 +1,4 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import * as stories from '../stories/action-bar.stories.js';
13
- import { regressVisuals } from '../../../test/visual/test.js';
14
- regressVisuals('ActionBarStories', stories);
15
- //# sourceMappingURL=action-bar.test-vrt.js.map
1
+ import * as stories from "../stories/action-bar.stories.js";
2
+ import { regressVisuals } from "../../../test/visual/test.js";
3
+ regressVisuals("ActionBarStories", stories);
4
+ //# sourceMappingURL=action-bar.test-vrt.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"action-bar.test-vrt.js","sourceRoot":"","sources":["action-bar.test-vrt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,cAAc,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC","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 * as stories from '../stories/action-bar.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ActionBarStories', stories);\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["action-bar.test-vrt.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 * as stories from '../stories/action-bar.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ActionBarStories', stories);\n"],
5
+ "mappings": "AAYA;AACA;AAEA,eAAe,oBAAoB,OAAO;",
6
+ "names": []
7
+ }
@@ -1,59 +1,48 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { elementUpdated, expect, fixture, html } from '@open-wc/testing';
13
- import '../sp-action-bar.js';
14
- import { Default } from '../stories/action-bar.stories.js';
15
- describe('ActionBar', () => {
16
- it('loads', async () => {
17
- const el = await fixture(Default());
18
- await elementUpdated(el);
19
- expect(el).to.not.be.undefined;
20
- await expect(el).to.be.accessible();
21
- });
22
- it('accepts variants', async () => {
23
- const el = await fixture(html `
1
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
2
+ import "@spectrum-web-components/action-bar/sp-action-bar.js";
3
+ import { Default } from "../stories/action-bar.stories.js";
4
+ describe("ActionBar", () => {
5
+ it("loads", async () => {
6
+ const el = await fixture(Default());
7
+ await elementUpdated(el);
8
+ expect(el).to.not.be.undefined;
9
+ await expect(el).to.be.accessible();
10
+ });
11
+ it("accepts variants", async () => {
12
+ const el = await fixture(html`
24
13
  <sp-action-bar variant="sticky">Help text.</sp-action-bar>
25
14
  `);
26
- await elementUpdated(el);
27
- expect(el.variant).to.equal('sticky');
28
- expect(el.getAttribute('variant')).to.equal('sticky');
29
- el.variant = 'fixed';
30
- await elementUpdated(el);
31
- expect(el.variant).to.equal('fixed');
32
- expect(el.getAttribute('variant')).to.equal('fixed');
33
- el.setAttribute('variant', 'sticky');
34
- await elementUpdated(el);
35
- expect(el.variant).to.equal('sticky');
36
- expect(el.getAttribute('variant')).to.equal('sticky');
37
- el.removeAttribute('variant');
38
- await elementUpdated(el);
39
- expect(el.variant).to.equal('');
40
- expect(el.hasAttribute('variant')).to.be.false;
41
- });
42
- it('validates variants', async () => {
43
- const el = await fixture(html `
15
+ await elementUpdated(el);
16
+ expect(el.variant).to.equal("sticky");
17
+ expect(el.getAttribute("variant")).to.equal("sticky");
18
+ el.variant = "fixed";
19
+ await elementUpdated(el);
20
+ expect(el.variant).to.equal("fixed");
21
+ expect(el.getAttribute("variant")).to.equal("fixed");
22
+ el.setAttribute("variant", "sticky");
23
+ await elementUpdated(el);
24
+ expect(el.variant).to.equal("sticky");
25
+ expect(el.getAttribute("variant")).to.equal("sticky");
26
+ el.removeAttribute("variant");
27
+ await elementUpdated(el);
28
+ expect(el.variant).to.equal("");
29
+ expect(el.hasAttribute("variant")).to.be.false;
30
+ });
31
+ it("validates variants", async () => {
32
+ const el = await fixture(html`
44
33
  <sp-action-bar variant="other">Help text.</sp-action-bar>
45
34
  `);
46
- await elementUpdated(el);
47
- expect(el.variant).to.equal('');
48
- expect(el.hasAttribute('variant')).to.be.false;
49
- el.variant = 'fixed';
50
- await elementUpdated(el);
51
- expect(el.variant).to.equal('fixed');
52
- expect(el.getAttribute('variant')).to.equal('fixed');
53
- el.variant = 'fixed';
54
- await elementUpdated(el);
55
- expect(el.variant).to.equal('fixed');
56
- expect(el.getAttribute('variant')).to.equal('fixed');
57
- });
35
+ await elementUpdated(el);
36
+ expect(el.variant).to.equal("");
37
+ expect(el.hasAttribute("variant")).to.be.false;
38
+ el.variant = "fixed";
39
+ await elementUpdated(el);
40
+ expect(el.variant).to.equal("fixed");
41
+ expect(el.getAttribute("variant")).to.equal("fixed");
42
+ el.variant = "fixed";
43
+ await elementUpdated(el);
44
+ expect(el.variant).to.equal("fixed");
45
+ expect(el.getAttribute("variant")).to.equal("fixed");
46
+ });
58
47
  });
59
- //# sourceMappingURL=action-bar.test.js.map
48
+ //# sourceMappingURL=action-bar.test.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"action-bar.test.js","sourceRoot":"","sources":["action-bar.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACvB,EAAE,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;QACnB,MAAM,EAAE,GAAG,MAAM,OAAO,CAAY,OAAO,EAAE,CAAC,CAAC;QAE/C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC;QAE/B,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,EAAE,GAAG,MAAM,OAAO,CACpB,IAAI,CAAA;;aAEH,CACJ,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACtC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEtD,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;QAErB,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAErD,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAErC,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACtC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEtD,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAE9B,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACnD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;QAChC,MAAM,EAAE,GAAG,MAAM,OAAO,CACpB,IAAI,CAAA;;aAEH,CACJ,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAE/C,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;QAErB,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAErD,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;QAErB,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","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-action-bar.js';\nimport { ActionBar } from '..';\nimport { Default } from '../stories/action-bar.stories.js';\n\ndescribe('ActionBar', () => {\n it('loads', async () => {\n const el = await fixture<ActionBar>(Default());\n\n await elementUpdated(el);\n\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n\n it('accepts variants', async () => {\n const el = await fixture<ActionBar>(\n html`\n <sp-action-bar variant=\"sticky\">Help text.</sp-action-bar>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('sticky');\n expect(el.getAttribute('variant')).to.equal('sticky');\n\n el.variant = 'fixed';\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('fixed');\n expect(el.getAttribute('variant')).to.equal('fixed');\n\n el.setAttribute('variant', 'sticky');\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('sticky');\n expect(el.getAttribute('variant')).to.equal('sticky');\n\n el.removeAttribute('variant');\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('');\n expect(el.hasAttribute('variant')).to.be.false;\n });\n it('validates variants', async () => {\n const el = await fixture<ActionBar>(\n html`\n <sp-action-bar variant=\"other\">Help text.</sp-action-bar>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('');\n expect(el.hasAttribute('variant')).to.be.false;\n\n el.variant = 'fixed';\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('fixed');\n expect(el.getAttribute('variant')).to.equal('fixed');\n\n el.variant = 'fixed';\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('fixed');\n expect(el.getAttribute('variant')).to.equal('fixed');\n });\n});\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["action-bar.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 '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport { ActionBar } from '@spectrum-web-components/action-bar';\nimport { Default } from '../stories/action-bar.stories.js';\n\ndescribe('ActionBar', () => {\n it('loads', async () => {\n const el = await fixture<ActionBar>(Default());\n\n await elementUpdated(el);\n\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n\n it('accepts variants', async () => {\n const el = await fixture<ActionBar>(\n html`\n <sp-action-bar variant=\"sticky\">Help text.</sp-action-bar>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('sticky');\n expect(el.getAttribute('variant')).to.equal('sticky');\n\n el.variant = 'fixed';\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('fixed');\n expect(el.getAttribute('variant')).to.equal('fixed');\n\n el.setAttribute('variant', 'sticky');\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('sticky');\n expect(el.getAttribute('variant')).to.equal('sticky');\n\n el.removeAttribute('variant');\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('');\n expect(el.hasAttribute('variant')).to.be.false;\n });\n it('validates variants', async () => {\n const el = await fixture<ActionBar>(\n html`\n <sp-action-bar variant=\"other\">Help text.</sp-action-bar>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('');\n expect(el.hasAttribute('variant')).to.be.false;\n\n el.variant = 'fixed';\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('fixed');\n expect(el.getAttribute('variant')).to.equal('fixed');\n\n el.variant = 'fixed';\n\n await elementUpdated(el);\n\n expect(el.variant).to.equal('fixed');\n expect(el.getAttribute('variant')).to.equal('fixed');\n });\n});\n"],
5
+ "mappings": "AAYA;AAEA;AAEA;AAEA,SAAS,aAAa,MAAM;AACxB,KAAG,SAAS,YAAY;AACpB,UAAM,KAAK,MAAM,QAAmB,QAAQ,CAAC;AAE7C,UAAM,eAAe,EAAE;AAEvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AAErB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AAED,KAAG,oBAAoB,YAAY;AAC/B,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,QAAQ;AACpC,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,QAAQ;AAEpD,OAAG,UAAU;AAEb,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,OAAO;AACnC,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,OAAO;AAEnD,OAAG,aAAa,WAAW,QAAQ;AAEnC,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,QAAQ;AACpC,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,QAAQ;AAEpD,OAAG,gBAAgB,SAAS;AAE5B,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE;AAC9B,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,GAAG;AAAA,EAC7C,CAAC;AACD,KAAG,sBAAsB,YAAY;AACjC,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE;AAC9B,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,GAAG;AAEzC,OAAG,UAAU;AAEb,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,OAAO;AACnC,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,OAAO;AAEnD,OAAG,UAAU;AAEb,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,OAAO;AACnC,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,OAAO;AAAA,EACvD,CAAC;AACL,CAAC;",
6
+ "names": []
7
+ }
@@ -1,18 +1,7 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import '@spectrum-web-components/action-bar/sp-action-bar.js';
13
- import { html } from 'lit';
14
- import { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';
15
- measureFixtureCreation(html `
1
+ import "@spectrum-web-components/action-bar/sp-action-bar.js";
2
+ import { html } from "lit";
3
+ import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
4
+ measureFixtureCreation(html`
16
5
  <sp-action-bar open></sp-action-bar>
17
6
  `);
18
- //# sourceMappingURL=basic-test.js.map
7
+ //# sourceMappingURL=basic-test.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"basic-test.js","sourceRoot":"","sources":["basic-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,sDAAsD,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,sBAAsB,CAAC,IAAI,CAAA;;CAE1B,CAAC,CAAC","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/action-bar/sp-action-bar.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-action-bar open></sp-action-bar>\n`);\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["basic-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 '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-action-bar open></sp-action-bar>\n`);\n"],
5
+ "mappings": "AAYA;AACA;AACA;AAEA,uBAAuB;AAAA;AAAA,CAEtB;",
6
+ "names": []
7
+ }