@spectrum-web-components/action-bar 0.5.0 → 0.5.1

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.5.0",
3
+ "version": "0.5.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -58,7 +58,7 @@
58
58
  ],
59
59
  "dependencies": {
60
60
  "@spectrum-web-components/base": "^0.7.0",
61
- "@spectrum-web-components/popover": "^0.12.0",
61
+ "@spectrum-web-components/popover": "^0.12.1",
62
62
  "tslib": "^2.0.0"
63
63
  },
64
64
  "devDependencies": {
@@ -70,5 +70,5 @@
70
70
  "./sp-*.js",
71
71
  "./**/*.dev.js"
72
72
  ],
73
- "gitHead": "05c81318844160db3f8156144106e643507fef97"
73
+ "gitHead": "1cfea66c39440232b9982509573801b8e3a9f692"
74
74
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  import { ActionBar } from "./src/ActionBar.dev.js";
2
3
  customElements.define("sp-action-bar", ActionBar);
3
4
  //# sourceMappingURL=sp-action-bar.dev.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["sp-action-bar.ts"],
4
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;",
5
+ "mappings": ";AAYA,SAAS,iBAAiB;AAE1B,eAAe,OAAO,iBAAiB,SAAS;",
6
6
  "names": []
7
7
  }
package/sp-action-bar.js CHANGED
@@ -1,2 +1,2 @@
1
- import{ActionBar as a}from"./src/ActionBar.js";customElements.define("sp-action-bar",a);
1
+ "use strict";import{ActionBar as a}from"./src/ActionBar.js";customElements.define("sp-action-bar",a);
2
2
  //# sourceMappingURL=sp-action-bar.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["sp-action-bar.ts"],
4
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,+CAEA,eAAe,OAAO,gBAAiB,CAAS",
6
- "names": []
5
+ "mappings": "aAYA,OAAS,aAAAA,MAAiB,qBAE1B,eAAe,OAAO,gBAAiBA,CAAS",
6
+ "names": ["ActionBar"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __decorateClass = (decorators, target, key, kind) => {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["ActionBar.ts"],
4
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,gBA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AK,WAAW;AAChB;AAAA,IACJ;AACA,SAAK,gBAAgB,SAAS;AAC9B,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,IAAW,UAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA,EAIgB,SAAyB;AACrC,WAAO;AAAA,gCACiB,KAAK;AAAA;AAAA;AAAA;AAAA,EAIjC;AACJ;AAtCW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAXjC,UAYF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAdjC,UAeF;AASI;AAAA,EADV,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAvBhC,UAwBE;",
6
6
  "names": []
7
7
  }
package/src/ActionBar.js CHANGED
@@ -1,6 +1,6 @@
1
- var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=(p,t,s,r)=>{for(var e=r>1?void 0:r?u(t,s):t,l=p.length-1,o;l>=0;l--)(o=p[l])&&(e=(r?o(t,s,e):o(e))||e);return r&&e&&n(t,s,e),e};import{html as c,SpectrumElement as m}from"@spectrum-web-components/base";import{property as a}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/popover/sp-popover.js";import v from"./action-bar.css.js";export const actionBarVariants=["sticky","fixed"];export class ActionBar extends m{constructor(){super(...arguments);this.flexible=!1;this.open=!1;this._variant=""}static get styles(){return[v]}set variant(t){if(t!==this.variant){if(actionBarVariants.includes(t)){this.setAttribute("variant",t),this._variant=t;return}this.removeAttribute("variant"),this._variant=""}}get variant(){return this._variant}render(){return c`
1
+ "use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var p=(s,r,t,i)=>{for(var e=i>1?void 0:i?u(r,t):r,l=s.length-1,o;l>=0;l--)(o=s[l])&&(e=(i?o(r,t,e):o(e))||e);return i&&e&&n(r,t,e),e};import{html as c,SpectrumElement as m}from"@spectrum-web-components/base";import{property as a}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/popover/sp-popover.js";import v from"./action-bar.css.js";export const actionBarVariants=["sticky","fixed"];export class ActionBar extends m{constructor(){super(...arguments);this.flexible=!1;this.open=!1;this._variant=""}static get styles(){return[v]}set variant(t){if(t!==this.variant){if(actionBarVariants.includes(t)){this.setAttribute("variant",t),this._variant=t;return}this.removeAttribute("variant"),this._variant=""}}get variant(){return this._variant}render(){return c`
2
2
  <sp-popover ?open=${this.open} id="popover">
3
3
  <slot></slot>
4
4
  </sp-popover>
5
- `}}i([a({type:Boolean,reflect:!0})],ActionBar.prototype,"flexible",2),i([a({type:Boolean,reflect:!0})],ActionBar.prototype,"open",2),i([a({type:String,reflect:!0})],ActionBar.prototype,"variant",1);
5
+ `}}p([a({type:Boolean,reflect:!0})],ActionBar.prototype,"flexible",2),p([a({type:Boolean,reflect:!0})],ActionBar.prototype,"open",2),p([a({type:String,reflect:!0})],ActionBar.prototype,"variant",1);
6
6
  //# sourceMappingURL=ActionBar.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["ActionBar.ts"],
4
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": "wMAYA,0EAMA,2EACA,uDACA,mCACO,YAAM,mBAAoB,CAAC,SAAU,OAAO,EAM5C,aAAM,iBAAkB,EAAgB,CAAxC,kCAYI,cAAW,GAGX,UAAO,GA0BN,cAAW,aAxCQ,SAAyB,CAChD,MAAO,CAAC,CAAe,CAC3B,IAqBW,SAAQ,EAAiB,CAChC,GAAI,IAAY,KAAK,QAGrB,IAAI,kBAAkB,SAAS,CAAO,EAAG,CACrC,KAAK,aAAa,UAAW,CAAO,EACpC,KAAK,SAAW,EAChB,MACJ,CACA,KAAK,gBAAgB,SAAS,EAC9B,KAAK,SAAW,GACpB,IAEW,UAAkB,CACzB,MAAO,MAAK,QAChB,CAIgB,QAAyB,CACrC,MAAO;AAAA,gCACiB,KAAK;AAAA;AAAA;AAAA,SAIjC,CACJ,CAtCW,GADP,AAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GACnC,AAZJ,UAYI,wBAGA,GADP,AAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GACnC,AAfJ,UAeI,oBASI,GADX,AAAC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAC9B,AAxBR,UAwBQ",
6
- "names": []
5
+ "mappings": "qNAYA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,MAAO,iDACP,OAAOC,MAAqB,sBACrB,aAAM,kBAAoB,CAAC,SAAU,OAAO,EAM5C,aAAM,kBAAkBF,CAAgB,CAAxC,kCAYH,KAAO,SAAW,GAGlB,KAAO,KAAO,GA0Bd,KAAQ,SAAW,GAxCnB,WAA2B,QAAyB,CAChD,MAAO,CAACE,CAAe,CAC3B,CAqBA,IAAW,QAAQC,EAAiB,CAChC,GAAIA,IAAY,KAAK,QAGrB,IAAI,kBAAkB,SAASA,CAAO,EAAG,CACrC,KAAK,aAAa,UAAWA,CAAO,EACpC,KAAK,SAAWA,EAChB,MACJ,CACA,KAAK,gBAAgB,SAAS,EAC9B,KAAK,SAAW,GACpB,CAEA,IAAW,SAAkB,CACzB,OAAO,KAAK,QAChB,CAIgB,QAAyB,CACrC,OAAOJ;AAAA,gCACiB,KAAK;AAAA;AAAA;AAAA,SAIjC,CACJ,CAtCWK,EAAA,CADNH,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAXjC,UAYF,wBAGAG,EAAA,CADNH,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAdjC,UAeF,oBASIG,EAAA,CADVH,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAvBhC,UAwBE",
6
+ "names": ["html", "SpectrumElement", "property", "actionBarStyles", "variant", "__decorateClass"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  import { css } from "@spectrum-web-components/base";
2
3
  const styles = css`
3
4
  :host{--spectrum-actionbar-height:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["action-bar.css.ts"],
4
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;",
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,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
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import{css as t}from"@spectrum-web-components/base";const i=t`
1
+ "use strict";import{css as t}from"@spectrum-web-components/base";const i=t`
2
2
  :host{--spectrum-actionbar-height:var(
3
3
  --spectrum-global-dimension-size-600
4
4
  );--spectrum-actionbar-padding-left:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["action-bar.css.ts"],
4
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,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBf,cAAe",
6
- "names": []
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBf,eAAeC",
6
+ "names": ["css", "styles"]
7
7
  }
package/src/index.dev.js CHANGED
@@ -1,2 +1,3 @@
1
+ "use strict";
1
2
  export * from "./ActionBar.dev.js";
2
3
  //# sourceMappingURL=index.dev.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["index.ts"],
4
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;",
5
+ "mappings": ";AAYA,cAAc;",
6
6
  "names": []
7
7
  }
package/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export*from"./ActionBar.js";
1
+ "use strict";export*from"./ActionBar.js";
2
2
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["index.ts"],
4
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",
5
+ "mappings": "aAYA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  import { css } from "@spectrum-web-components/base";
2
3
  const styles = css`
3
4
  :host{--spectrum-actionbar-height:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["spectrum-action-bar.css.ts"],
4
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;",
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,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
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import{css as t}from"@spectrum-web-components/base";const i=t`
1
+ "use strict";import{css as t}from"@spectrum-web-components/base";const i=t`
2
2
  :host{--spectrum-actionbar-height:var(
3
3
  --spectrum-global-dimension-size-600
4
4
  );--spectrum-actionbar-padding-left:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["spectrum-action-bar.css.ts"],
4
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,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBf,cAAe",
6
- "names": []
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBf,eAAeC",
6
+ "names": ["css", "styles"]
7
7
  }
@@ -1,4 +1,17 @@
1
- import{html as t}from"@spectrum-web-components/base";import"@spectrum-web-components/action-bar/sp-action-bar.js";import"@spectrum-web-components/checkbox/sp-checkbox.js";import"@spectrum-web-components/action-button/sp-action-button.js";import"@spectrum-web-components/action-group/sp-action-group.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";export default{title:"Action Bar",component:"sp-action-bar"};export const Default=()=>t`
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/checkbox/sp-checkbox.js";
5
+ import "@spectrum-web-components/action-button/sp-action-button.js";
6
+ import "@spectrum-web-components/action-group/sp-action-group.js";
7
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js";
8
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";
9
+ export default {
10
+ title: "Action Bar",
11
+ component: "sp-action-bar"
12
+ };
13
+ export const Default = () => {
14
+ return html`
2
15
  <sp-action-bar open>
3
16
  <sp-checkbox indeterminate>228 Selected</sp-checkbox>
4
17
  <sp-action-group quiet>
@@ -11,4 +24,5 @@ import{html as t}from"@spectrum-web-components/base";import"@spectrum-web-compon
11
24
  </sp-action-group>
12
25
  </sp-action-bar>
13
26
  `;
27
+ };
14
28
  //# sourceMappingURL=action-bar.stories.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["action-bar.stories.ts"],
4
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,qDAEA,6DACA,yDACA,mEACA,iEACA,sEACA,sEAEA,cAAe,CACX,MAAO,aACP,UAAW,eACf,EAEO,YAAM,SAAU,IACZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
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;AAAA;AAAA;AAaX;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,5 @@
1
- import*as r from"../stories/action-bar.stories.js";import{regressVisuals as s}from"../../../test/visual/test.js";s("ActionBarStories",r);
1
+ "use strict";
2
+ import * as stories from "../stories/action-bar.stories.js";
3
+ import { regressVisuals } from "../../../test/visual/test.js";
4
+ regressVisuals("ActionBarStories", stories);
2
5
  //# sourceMappingURL=action-bar.test-vrt.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["action-bar.test-vrt.ts"],
4
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,mDACA,8DAEA,EAAe,mBAAoB,CAAO",
5
+ "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAE/B,eAAe,oBAAoB,OAAO;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,55 @@
1
- import{elementUpdated as i,expect as a,fixture as e,html as r}from"@open-wc/testing";import"@spectrum-web-components/action-bar/sp-action-bar.js";import{Default as n}from"../stories/action-bar.stories.js";import{testForLitDevWarnings as o}from"../../../test/testing-helpers.js";describe("ActionBar",()=>{o(async()=>await e(n())),it("loads",async()=>{const t=await e(n());await i(t),a(t).to.not.be.undefined,await a(t).to.be.accessible()}),it("accepts variants",async()=>{const t=await e(r`
1
+ "use strict";
2
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
3
+ import "@spectrum-web-components/action-bar/sp-action-bar.js";
4
+ import { Default } from "../stories/action-bar.stories.js";
5
+ import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
6
+ describe("ActionBar", () => {
7
+ testForLitDevWarnings(async () => await fixture(Default()));
8
+ it("loads", async () => {
9
+ const el = await fixture(Default());
10
+ await elementUpdated(el);
11
+ expect(el).to.not.be.undefined;
12
+ await expect(el).to.be.accessible();
13
+ });
14
+ it("accepts variants", async () => {
15
+ const el = await fixture(
16
+ html`
2
17
  <sp-action-bar variant="sticky">Help text.</sp-action-bar>
3
- `);await i(t),a(t.variant).to.equal("sticky"),a(t.getAttribute("variant")).to.equal("sticky"),t.variant="fixed",await i(t),a(t.variant).to.equal("fixed"),a(t.getAttribute("variant")).to.equal("fixed"),t.setAttribute("variant","sticky"),await i(t),a(t.variant).to.equal("sticky"),a(t.getAttribute("variant")).to.equal("sticky"),t.removeAttribute("variant"),await i(t),a(t.variant).to.equal(""),a(t.hasAttribute("variant")).to.be.false}),it("validates variants",async()=>{const t=await e(r`
18
+ `
19
+ );
20
+ await elementUpdated(el);
21
+ expect(el.variant).to.equal("sticky");
22
+ expect(el.getAttribute("variant")).to.equal("sticky");
23
+ el.variant = "fixed";
24
+ await elementUpdated(el);
25
+ expect(el.variant).to.equal("fixed");
26
+ expect(el.getAttribute("variant")).to.equal("fixed");
27
+ el.setAttribute("variant", "sticky");
28
+ await elementUpdated(el);
29
+ expect(el.variant).to.equal("sticky");
30
+ expect(el.getAttribute("variant")).to.equal("sticky");
31
+ el.removeAttribute("variant");
32
+ await elementUpdated(el);
33
+ expect(el.variant).to.equal("");
34
+ expect(el.hasAttribute("variant")).to.be.false;
35
+ });
36
+ it("validates variants", async () => {
37
+ const el = await fixture(
38
+ html`
4
39
  <sp-action-bar variant="other">Help text.</sp-action-bar>
5
- `);await i(t),a(t.variant).to.equal(""),a(t.hasAttribute("variant")).to.be.false,t.variant="fixed",await i(t),a(t.variant).to.equal("fixed"),a(t.getAttribute("variant")).to.equal("fixed"),t.variant="fixed",await i(t),a(t.variant).to.equal("fixed"),a(t.getAttribute("variant")).to.equal("fixed")})});
40
+ `
41
+ );
42
+ await elementUpdated(el);
43
+ expect(el.variant).to.equal("");
44
+ expect(el.hasAttribute("variant")).to.be.false;
45
+ el.variant = "fixed";
46
+ await elementUpdated(el);
47
+ expect(el.variant).to.equal("fixed");
48
+ expect(el.getAttribute("variant")).to.equal("fixed");
49
+ el.variant = "fixed";
50
+ await elementUpdated(el);
51
+ expect(el.variant).to.equal("fixed");
52
+ expect(el.getAttribute("variant")).to.equal("fixed");
53
+ });
54
+ });
6
55
  //# sourceMappingURL=action-bar.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["action-bar.test.ts"],
4
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';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('ActionBar', () => {\n testForLitDevWarnings(async () => await fixture<ActionBar>(Default()));\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,qFAEA,6DAEA,2DACA,yEAEA,SAAS,YAAa,IAAM,CACxB,EAAsB,SAAY,KAAM,GA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O,EAAE,GAAG,MAAM,EAAE;AAC9B,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,GAAG;AAAA,EAC7C,CAAC;AACD,KAAG,sBAAsB,YAAY;AACjC,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;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
6
  "names": []
7
7
  }
@@ -1,4 +1,8 @@
1
- import"@spectrum-web-components/action-bar/sp-action-bar.js";import{html as r}from"lit";import{measureFixtureCreation as o}from"../../../../test/benchmark/helpers.js";o(r`
1
+ "use strict";
2
+ import "@spectrum-web-components/action-bar/sp-action-bar.js";
3
+ import { html } from "lit";
4
+ import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
5
+ measureFixtureCreation(html`
2
6
  <sp-action-bar open></sp-action-bar>
3
7
  `);
4
8
  //# sourceMappingURL=basic-test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["basic-test.ts"],
4
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,6DACA,2BACA,+EAEA,EAAuB;AAAA;AAAA,CAEtB",
5
+ "mappings": ";AAYA,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA,CAEtB;",
6
6
  "names": []
7
7
  }