@spectrum-web-components/dropzone 0.10.0 → 0.10.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/dropzone",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,8 +57,7 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/base": "^0.7.0",
61
- "tslib": "^2.0.0"
60
+ "@spectrum-web-components/base": "^0.7.1"
62
61
  },
63
62
  "devDependencies": {
64
63
  "@spectrum-css/dropzone": "^3.0.25"
@@ -69,5 +68,5 @@
69
68
  "./sp-*.js",
70
69
  "./**/*.dev.js"
71
70
  ],
72
- "gitHead": "05c81318844160db3f8156144106e643507fef97"
71
+ "gitHead": "8bd87724e91e23df83dbf63a434bbbe10b8daaa6"
73
72
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  import { Dropzone } from "./src/Dropzone.dev.js";
2
3
  customElements.define("sp-dropzone", Dropzone);
3
4
  //# sourceMappingURL=sp-dropzone.dev.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["sp-dropzone.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*/\nimport { Dropzone } from './src/Dropzone.dev.js'\n\ncustomElements.define('sp-dropzone', Dropzone);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-dropzone': Dropzone;\n }\n}\n"],
5
- "mappings": "AAWA;AAEA,eAAe,OAAO,eAAe,QAAQ;",
5
+ "mappings": ";AAWA,SAAS,gBAAgB;AAEzB,eAAe,OAAO,eAAe,QAAQ;",
6
6
  "names": []
7
7
  }
package/sp-dropzone.js CHANGED
@@ -1,2 +1,2 @@
1
- import{Dropzone as e}from"./src/Dropzone.js";customElements.define("sp-dropzone",e);
1
+ "use strict";import{Dropzone as e}from"./src/Dropzone.js";customElements.define("sp-dropzone",e);
2
2
  //# sourceMappingURL=sp-dropzone.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["sp-dropzone.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*/\nimport { Dropzone } from './src/Dropzone.js';\n\ncustomElements.define('sp-dropzone', Dropzone);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-dropzone': Dropzone;\n }\n}\n"],
5
- "mappings": "AAWA,6CAEA,eAAe,OAAO,cAAe,CAAQ",
6
- "names": []
5
+ "mappings": "aAWA,OAAS,YAAAA,MAAgB,oBAEzB,eAAe,OAAO,cAAeA,CAAQ",
6
+ "names": ["Dropzone"]
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": ["Dropzone.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';\n\nimport dropzoneStyles from './dropzone.css.js';\n\nexport type DropzoneEventDetail = DragEvent;\n\nexport type DropEffects = 'copy' | 'move' | 'link' | 'none';\n\n/**\n * @element sp-dropzone\n *\n * @slot - The default slot on an `sp-dropzone` is a great place to place upload instructions\n * built with an `sp-illustrated-message` or other information, possibly even built from data\n * provided by the upload, to support users successfully interacting with the drag and drop\n * based features of your application\n *\n * @fires sp-dropzone-should-accept - A cancellable event that confirms whether or not\n * a file dropped on the UI should be accepted.\n * @fires sp-dropzone-dragover - Announces when files have been dragged over the UI, but not yet dropped.\n * @fires sp-dropzone-dragleave - Announces when dragged files have been moved out of the UI without having been dropped.\n * @fires sp-dropzone-drop - Announces when dragged files have been dropped on the UI.\n */\nexport class Dropzone extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [dropzoneStyles];\n }\n\n /**\n * Controls the feedback (typically visual) the user is given during a drag and drop operation\n * @attr\n * @type {'copy' | 'move' | 'link' | 'none'}\n */\n public get dropEffect(): DropEffects {\n return this._dropEffect;\n }\n public set dropEffect(value: DropEffects) {\n if (['copy', 'move', 'link', 'none'].includes(value)) {\n this._dropEffect = value;\n }\n }\n private _dropEffect: DropEffects = 'copy';\n\n @property({ type: Boolean, reflect: true, attribute: 'dragged' })\n public isDragged = false;\n\n private debouncedDragLeave: number | null = null;\n\n public override connectedCallback(): void {\n super.connectedCallback();\n\n this.addEventListener('drop', this.onDrop);\n this.addEventListener('dragover', this.onDragOver);\n this.addEventListener('dragleave', this.onDragLeave);\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n\n this.removeEventListener('drop', this.onDrop);\n this.removeEventListener('dragover', this.onDragOver);\n this.removeEventListener('dragleave', this.onDragLeave);\n }\n\n public onDragOver(event: DragEvent): void {\n const shouldAcceptEvent = new CustomEvent('sp-dropzone-should-accept', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: event,\n });\n const shouldAccept = this.dispatchEvent(shouldAcceptEvent);\n if (!event.dataTransfer) {\n return;\n }\n if (!shouldAccept) {\n event.dataTransfer.dropEffect = 'none';\n return;\n }\n\n event.preventDefault();\n\n this.clearDebouncedDragLeave();\n\n this.isDragged = true;\n\n event.dataTransfer.dropEffect = this.dropEffect;\n const dragOverEvent = new CustomEvent('sp-dropzone-dragover', {\n bubbles: true,\n composed: true,\n detail: event,\n });\n this.dispatchEvent(dragOverEvent);\n }\n\n public onDragLeave(event: DragEvent): void {\n this.clearDebouncedDragLeave();\n\n this.debouncedDragLeave = window.setTimeout(() => {\n this.isDragged = false;\n\n const dragLeave = new CustomEvent('sp-dropzone-dragleave', {\n bubbles: true,\n composed: true,\n detail: event,\n });\n this.dispatchEvent(dragLeave);\n }, 100);\n }\n\n public onDrop(event: DragEvent): void {\n event.preventDefault();\n\n this.clearDebouncedDragLeave();\n\n this.isDragged = false;\n const dropEvent = new CustomEvent('sp-dropzone-drop', {\n bubbles: true,\n composed: true,\n detail: event,\n });\n this.dispatchEvent(dropEvent);\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot></slot>\n `;\n }\n\n protected clearDebouncedDragLeave(): void {\n if (this.debouncedDragLeave) {\n clearTimeout(this.debouncedDragLeave);\n this.debouncedDragLeave = null;\n }\n }\n}\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n 'sp-dropzone:should-accept': CustomEvent<DragEvent>;\n 'sp-dropzone:dragover': CustomEvent<DragEvent>;\n 'sp-dropzone:dragleave': Custom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AAU;AAAA,QACV,QAAQ;AAAA,MACZ,CAAC;AACD,WAAK,cAAc,SAAS;AAAA,IAChC,GAAG,GAAG;AAAA,EACV;AAAA,EAEO,OAAO,OAAwB;AAClC,UAAM,eAAe;AAErB,SAAK,wBAAwB;AAE7B,SAAK,YAAY;AACjB,UAAM,YAAY,IAAI,YAAY,oBAAoB;AAAA,MAClD,SAAS;AAAA,MACT,UAAU;AAAA,MACV,QAAQ;AAAA,IACZ,CAAC;AACD,SAAK,cAAc,SAAS;AAAA,EAChC;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,EAGX;AAAA,EAEU,0BAAgC;AACtC,QAAI,KAAK,oBAAoB;AACzB,mBAAa,KAAK,kBAAkB;AACpC,WAAK,qBAAqB;AAAA,IAC9B;AAAA,EACJ;AACJ;AA5FW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,UAAU,CAAC;AAAA,GApBvD,SAqBF;",
6
6
  "names": []
7
7
  }
package/src/Dropzone.js CHANGED
@@ -1,4 +1,4 @@
1
- var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=(a,e,t,o)=>{for(var r=o>1?void 0:o?p(e,t):e,n=a.length-1,s;n>=0;n--)(s=a[n])&&(r=(o?s(e,t,r):s(r))||r);return o&&r&&i(e,t,r),r};import{html as c,SpectrumElement as l}from"@spectrum-web-components/base";import{property as v}from"@spectrum-web-components/base/src/decorators.js";import u from"./dropzone.css.js";export class Dropzone extends l{constructor(){super(...arguments);this._dropEffect="copy";this.isDragged=!1;this.debouncedDragLeave=null}static get styles(){return[u]}get dropEffect(){return this._dropEffect}set dropEffect(e){["copy","move","link","none"].includes(e)&&(this._dropEffect=e)}connectedCallback(){super.connectedCallback(),this.addEventListener("drop",this.onDrop),this.addEventListener("dragover",this.onDragOver),this.addEventListener("dragleave",this.onDragLeave)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("drop",this.onDrop),this.removeEventListener("dragover",this.onDragOver),this.removeEventListener("dragleave",this.onDragLeave)}onDragOver(e){const t=new CustomEvent("sp-dropzone-should-accept",{bubbles:!0,cancelable:!0,composed:!0,detail:e}),o=this.dispatchEvent(t);if(!e.dataTransfer)return;if(!o){e.dataTransfer.dropEffect="none";return}e.preventDefault(),this.clearDebouncedDragLeave(),this.isDragged=!0,e.dataTransfer.dropEffect=this.dropEffect;const r=new CustomEvent("sp-dropzone-dragover",{bubbles:!0,composed:!0,detail:e});this.dispatchEvent(r)}onDragLeave(e){this.clearDebouncedDragLeave(),this.debouncedDragLeave=window.setTimeout(()=>{this.isDragged=!1;const t=new CustomEvent("sp-dropzone-dragleave",{bubbles:!0,composed:!0,detail:e});this.dispatchEvent(t)},100)}onDrop(e){e.preventDefault(),this.clearDebouncedDragLeave(),this.isDragged=!1;const t=new CustomEvent("sp-dropzone-drop",{bubbles:!0,composed:!0,detail:e});this.dispatchEvent(t)}render(){return c`
1
+ "use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=(n,o,e,t)=>{for(var r=t>1?void 0:t?p(o,e):o,a=n.length-1,s;a>=0;a--)(s=n[a])&&(r=(t?s(o,e,r):s(r))||r);return t&&r&&i(o,e,r),r};import{html as c,SpectrumElement as l}from"@spectrum-web-components/base";import{property as v}from"@spectrum-web-components/base/src/decorators.js";import u from"./dropzone.css.js";export class Dropzone extends l{constructor(){super(...arguments);this._dropEffect="copy";this.isDragged=!1;this.debouncedDragLeave=null}static get styles(){return[u]}get dropEffect(){return this._dropEffect}set dropEffect(e){["copy","move","link","none"].includes(e)&&(this._dropEffect=e)}connectedCallback(){super.connectedCallback(),this.addEventListener("drop",this.onDrop),this.addEventListener("dragover",this.onDragOver),this.addEventListener("dragleave",this.onDragLeave)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("drop",this.onDrop),this.removeEventListener("dragover",this.onDragOver),this.removeEventListener("dragleave",this.onDragLeave)}onDragOver(e){const t=new CustomEvent("sp-dropzone-should-accept",{bubbles:!0,cancelable:!0,composed:!0,detail:e}),r=this.dispatchEvent(t);if(!e.dataTransfer)return;if(!r){e.dataTransfer.dropEffect="none";return}e.preventDefault(),this.clearDebouncedDragLeave(),this.isDragged=!0,e.dataTransfer.dropEffect=this.dropEffect;const a=new CustomEvent("sp-dropzone-dragover",{bubbles:!0,composed:!0,detail:e});this.dispatchEvent(a)}onDragLeave(e){this.clearDebouncedDragLeave(),this.debouncedDragLeave=window.setTimeout(()=>{this.isDragged=!1;const t=new CustomEvent("sp-dropzone-dragleave",{bubbles:!0,composed:!0,detail:e});this.dispatchEvent(t)},100)}onDrop(e){e.preventDefault(),this.clearDebouncedDragLeave(),this.isDragged=!1;const t=new CustomEvent("sp-dropzone-drop",{bubbles:!0,composed:!0,detail:e});this.dispatchEvent(t)}render(){return c`
2
2
  <slot></slot>
3
3
  `}clearDebouncedDragLeave(){this.debouncedDragLeave&&(clearTimeout(this.debouncedDragLeave),this.debouncedDragLeave=null)}}d([v({type:Boolean,reflect:!0,attribute:"dragged"})],Dropzone.prototype,"isDragged",2);
4
4
  //# sourceMappingURL=Dropzone.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["Dropzone.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';\n\nimport dropzoneStyles from './dropzone.css.js';\n\nexport type DropzoneEventDetail = DragEvent;\n\nexport type DropEffects = 'copy' | 'move' | 'link' | 'none';\n\n/**\n * @element sp-dropzone\n *\n * @slot - The default slot on an `sp-dropzone` is a great place to place upload instructions\n * built with an `sp-illustrated-message` or other information, possibly even built from data\n * provided by the upload, to support users successfully interacting with the drag and drop\n * based features of your application\n *\n * @fires sp-dropzone-should-accept - A cancellable event that confirms whether or not\n * a file dropped on the UI should be accepted.\n * @fires sp-dropzone-dragover - Announces when files have been dragged over the UI, but not yet dropped.\n * @fires sp-dropzone-dragleave - Announces when dragged files have been moved out of the UI without having been dropped.\n * @fires sp-dropzone-drop - Announces when dragged files have been dropped on the UI.\n */\nexport class Dropzone extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [dropzoneStyles];\n }\n\n /**\n * Controls the feedback (typically visual) the user is given during a drag and drop operation\n * @attr\n * @type {'copy' | 'move' | 'link' | 'none'}\n */\n public get dropEffect(): DropEffects {\n return this._dropEffect;\n }\n public set dropEffect(value: DropEffects) {\n if (['copy', 'move', 'link', 'none'].includes(value)) {\n this._dropEffect = value;\n }\n }\n private _dropEffect: DropEffects = 'copy';\n\n @property({ type: Boolean, reflect: true, attribute: 'dragged' })\n public isDragged = false;\n\n private debouncedDragLeave: number | null = null;\n\n public override connectedCallback(): void {\n super.connectedCallback();\n\n this.addEventListener('drop', this.onDrop);\n this.addEventListener('dragover', this.onDragOver);\n this.addEventListener('dragleave', this.onDragLeave);\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n\n this.removeEventListener('drop', this.onDrop);\n this.removeEventListener('dragover', this.onDragOver);\n this.removeEventListener('dragleave', this.onDragLeave);\n }\n\n public onDragOver(event: DragEvent): void {\n const shouldAcceptEvent = new CustomEvent('sp-dropzone-should-accept', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: event,\n });\n const shouldAccept = this.dispatchEvent(shouldAcceptEvent);\n if (!event.dataTransfer) {\n return;\n }\n if (!shouldAccept) {\n event.dataTransfer.dropEffect = 'none';\n return;\n }\n\n event.preventDefault();\n\n this.clearDebouncedDragLeave();\n\n this.isDragged = true;\n\n event.dataTransfer.dropEffect = this.dropEffect;\n const dragOverEvent = new CustomEvent('sp-dropzone-dragover', {\n bubbles: true,\n composed: true,\n detail: event,\n });\n this.dispatchEvent(dragOverEvent);\n }\n\n public onDragLeave(event: DragEvent): void {\n this.clearDebouncedDragLeave();\n\n this.debouncedDragLeave = window.setTimeout(() => {\n this.isDragged = false;\n\n const dragLeave = new CustomEvent('sp-dropzone-dragleave', {\n bubbles: true,\n composed: true,\n detail: event,\n });\n this.dispatchEvent(dragLeave);\n }, 100);\n }\n\n public onDrop(event: DragEvent): void {\n event.preventDefault();\n\n this.clearDebouncedDragLeave();\n\n this.isDragged = false;\n const dropEvent = new CustomEvent('sp-dropzone-drop', {\n bubbles: true,\n composed: true,\n detail: event,\n });\n this.dispatchEvent(dropEvent);\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot></slot>\n `;\n }\n\n protected clearDebouncedDragLeave(): void {\n if (this.debouncedDragLeave) {\n clearTimeout(this.debouncedDragLeave);\n this.debouncedDragLeave = null;\n }\n }\n}\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n 'sp-dropzone:should-accept': CustomEvent<DragEvent>;\n 'sp-dropzone:dragover': CustomEvent<DragEvent>;\n 'sp-dropzone:dragleave': CustomEvent<DragEvent>;\n 'sp-dropzone:drop': CustomEvent<DragEvent>;\n }\n}\n"],
5
- "mappings": "wMAYA,0EAMA,2EAEA,iCAoBO,aAAM,gBAAiB,EAAgB,CAAvC,kCAkBK,iBAA2B,OAG5B,eAAY,GAEX,wBAAoC,eAtBjB,SAAyB,CAChD,MAAO,CAAC,CAAc,CAC1B,IAOW,aAA0B,CACjC,MAAO,MAAK,WAChB,IACW,YAAW,EAAoB,CACtC,AAAI,CAAC,OAAQ,OAAQ,OAAQ,MAAM,EAAE,SAAS,CAAK,GAC/C,MAAK,YAAc,EAE3B,CAQgB,mBAA0B,CACtC,MAAM,kBAAkB,EAExB,KAAK,iBAAiB,OAAQ,KAAK,MAAM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C1D,QAAS,GACT,SAAU,GACV,OAAQH,CACZ,CAAC,EACD,KAAK,cAAcG,CAAa,CACpC,CAEO,YAAYH,EAAwB,CACvC,KAAK,wBAAwB,EAE7B,KAAK,mBAAqB,OAAO,WAAW,IAAM,CAC9C,KAAK,UAAY,GAEjB,MAAMI,EAAY,IAAI,YAAY,wBAAyB,CACvD,QAAS,GACT,SAAU,GACV,OAAQJ,CACZ,CAAC,EACD,KAAK,cAAcI,CAAS,CAChC,EAAG,GAAG,CACV,CAEO,OAAOJ,EAAwB,CAClCA,EAAM,eAAe,EAErB,KAAK,wBAAwB,EAE7B,KAAK,UAAY,GACjB,MAAMK,EAAY,IAAI,YAAY,mBAAoB,CAClD,QAAS,GACT,SAAU,GACV,OAAQL,CACZ,CAAC,EACD,KAAK,cAAcK,CAAS,CAChC,CAEmB,QAAyB,CACxC,OAAOV;AAAA;AAAA,SAGX,CAEU,yBAAgC,CAClC,KAAK,qBACL,aAAa,KAAK,kBAAkB,EACpC,KAAK,mBAAqB,KAElC,CACJ,CA5FWW,EAAA,CADNT,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,SAAU,CAAC,GApBvD,SAqBF",
6
+ "names": ["html", "SpectrumElement", "property", "dropzoneStyles", "value", "event", "shouldAcceptEvent", "shouldAccept", "dragOverEvent", "dragLeave", "dropEvent", "__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{border-radius:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["dropzone.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{border-radius:var(\n--spectrum-dropzone-border-radius,var(--spectrum-alias-border-radius-regular)\n);border-style:dashed;border-width:var(\n--spectrum-dropzone-border-width,var(--spectrum-alias-border-size-thick)\n);padding:var(\n--spectrum-dropzone-padding,var(--spectrum-global-dimension-size-900)\n);text-align:center}:host([dragged]){border-style:solid}:host(:focus){border-style:dashed;outline:0}:host(:focus.focus-visible){border-style:solid}:host(:focus:focus-visible){border-style:solid}:host{border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host([dragged]){background-color:var(\n--spectrum-dropzone-background-color-selected-hover,var(--spectrum-alias-highlight-selected)\n);border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host([dragged]) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus){border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host(:focus) ::slotted(*){color:var(\n--spectrum-global-color-static-gray-500,rgb(var(--spectrum-global-color-static-gray-500-rgb))\n)}:host(:focus.focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus:focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus[dragged].focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus[dragged]:focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host{--spectrum-dropzone-illustration-color:var(\n--spectrum-global-color-static-blue-400\n);display:block}::slotted(*){font-family:var(\n--spectrum-body-m-text-font-family,var(--spectrum-alias-body-text-font-family)\n);font-size:var(\n--spectrum-body-s-text-size,var(--spectrum-alias-font-size-default)\n);font-style:var(\n--spectrum-body-s-text-font-style,var(--spectrum-global-font-style-regular)\n);font-weight:var(\n--spectrum-body-s-text-font-weight,var(--spectrum-alias-body-text-font-weight)\n);letter-spacing:var(\n--spectrum-body-s-text-letter-spacing,var(--spectrum-global-font-letter-spacing-none)\n);line-height:var(\n--spectrum-body-s-text-line-height,var(--spectrum-alias-body-text-line-height)\n);margin-bottom:0;margin-top:0;text-transform:var(--spectrum-body-s-text-transform,none)}:host([dragged]) ::slotted(*){--spectrum-global-color-gray-500:var(\n--spectrum-dropzone-illustration-color\n)}\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Cf,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Cf,eAAe;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import{css as o}from"@spectrum-web-components/base";const r=o`
1
+ "use strict";import{css as o}from"@spectrum-web-components/base";const r=o`
2
2
  :host{border-radius:var(
3
3
  --spectrum-dropzone-border-radius,var(--spectrum-alias-border-radius-regular)
4
4
  );border-style:dashed;border-width:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["dropzone.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{border-radius:var(\n--spectrum-dropzone-border-radius,var(--spectrum-alias-border-radius-regular)\n);border-style:dashed;border-width:var(\n--spectrum-dropzone-border-width,var(--spectrum-alias-border-size-thick)\n);padding:var(\n--spectrum-dropzone-padding,var(--spectrum-global-dimension-size-900)\n);text-align:center}:host([dragged]){border-style:solid}:host(:focus){border-style:dashed;outline:0}:host(:focus.focus-visible){border-style:solid}:host(:focus:focus-visible){border-style:solid}:host{border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host([dragged]){background-color:var(\n--spectrum-dropzone-background-color-selected-hover,var(--spectrum-alias-highlight-selected)\n);border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host([dragged]) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus){border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host(:focus) ::slotted(*){color:var(\n--spectrum-global-color-static-gray-500,rgb(var(--spectrum-global-color-static-gray-500-rgb))\n)}:host(:focus.focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus:focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus[dragged].focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus[dragged]:focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host{--spectrum-dropzone-illustration-color:var(\n--spectrum-global-color-static-blue-400\n);display:block}::slotted(*){font-family:var(\n--spectrum-body-m-text-font-family,var(--spectrum-alias-body-text-font-family)\n);font-size:var(\n--spectrum-body-s-text-size,var(--spectrum-alias-font-size-default)\n);font-style:var(\n--spectrum-body-s-text-font-style,var(--spectrum-global-font-style-regular)\n);font-weight:var(\n--spectrum-body-s-text-font-weight,var(--spectrum-alias-body-text-font-weight)\n);letter-spacing:var(\n--spectrum-body-s-text-letter-spacing,var(--spectrum-global-font-letter-spacing-none)\n);line-height:var(\n--spectrum-body-s-text-line-height,var(--spectrum-alias-body-text-line-height)\n);margin-bottom:0;margin-top:0;text-transform:var(--spectrum-body-s-text-transform,none)}:host([dragged]) ::slotted(*){--spectrum-global-color-gray-500:var(\n--spectrum-dropzone-illustration-color\n)}\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6Cf,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6Cf,eAAeC",
6
+ "names": ["css", "styles"]
7
7
  }
package/src/index.dev.js CHANGED
@@ -1,2 +1,3 @@
1
+ "use strict";
1
2
  export * from "./Dropzone.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*/\nexport * from './Dropzone.dev.js'\n"],
5
- "mappings": "AAWA;",
5
+ "mappings": ";AAWA,cAAc;",
6
6
  "names": []
7
7
  }
package/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export*from"./Dropzone.js";
1
+ "use strict";export*from"./Dropzone.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*/\nexport * from './Dropzone.js';\n"],
5
- "mappings": "AAWA",
5
+ "mappings": "aAWA,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{border-radius:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["spectrum-dropzone.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{border-radius:var(\n--spectrum-dropzone-border-radius,var(--spectrum-alias-border-radius-regular)\n);border-style:dashed;border-width:var(\n--spectrum-dropzone-border-width,var(--spectrum-alias-border-size-thick)\n);padding:var(\n--spectrum-dropzone-padding,var(--spectrum-global-dimension-size-900)\n);text-align:center}:host([dragged]){border-style:solid}:host(:focus){border-style:dashed;outline:0}:host(:focus.focus-visible){border-style:solid}:host(:focus:focus-visible){border-style:solid}:host{border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host([dragged]){background-color:var(\n--spectrum-dropzone-background-color-selected-hover,var(--spectrum-alias-highlight-selected)\n);border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host([dragged]) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus){border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host(:focus) ::slotted(*){color:var(\n--spectrum-global-color-static-gray-500,rgb(var(--spectrum-global-color-static-gray-500-rgb))\n)}:host(:focus.focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus:focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus[dragged].focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus[dragged]:focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}\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;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Bf,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;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Bf,eAAe;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import{css as o}from"@spectrum-web-components/base";const r=o`
1
+ "use strict";import{css as o}from"@spectrum-web-components/base";const r=o`
2
2
  :host{border-radius:var(
3
3
  --spectrum-dropzone-border-radius,var(--spectrum-alias-border-radius-regular)
4
4
  );border-style:dashed;border-width:var(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["spectrum-dropzone.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{border-radius:var(\n--spectrum-dropzone-border-radius,var(--spectrum-alias-border-radius-regular)\n);border-style:dashed;border-width:var(\n--spectrum-dropzone-border-width,var(--spectrum-alias-border-size-thick)\n);padding:var(\n--spectrum-dropzone-padding,var(--spectrum-global-dimension-size-900)\n);text-align:center}:host([dragged]){border-style:solid}:host(:focus){border-style:dashed;outline:0}:host(:focus.focus-visible){border-style:solid}:host(:focus:focus-visible){border-style:solid}:host{border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host([dragged]){background-color:var(\n--spectrum-dropzone-background-color-selected-hover,var(--spectrum-alias-highlight-selected)\n);border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host([dragged]) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus){border-color:var(\n--spectrum-dropzone-border-color,var(--spectrum-global-color-gray-300)\n)}:host(:focus) ::slotted(*){color:var(\n--spectrum-global-color-static-gray-500,rgb(var(--spectrum-global-color-static-gray-500-rgb))\n)}:host(:focus.focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus:focus-visible){border-color:var(\n--spectrum-dropzone-border-color-selected-hover,var(--spectrum-global-color-blue-400)\n)}:host(:focus[dragged].focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}:host(:focus[dragged]:focus-visible) ::slotted(*){color:var(\n--spectrum-global-color-blue-400\n)}\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;AAAA;AAAA;AAAA;AAAA;AAAA,EA6Bf,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;AAAA;AAAA;AAAA;AAAA;AAAA,EA6Bf,eAAeC",
6
+ "names": ["css", "styles"]
7
7
  }
@@ -1,7 +1,34 @@
1
- import{html as t}from"@spectrum-web-components/base";import"@spectrum-web-components/dropzone/sp-dropzone.js";import{illustration as o}from"../test/test-svg";import"@spectrum-web-components/illustrated-message/sp-illustrated-message.js";import"@spectrum-web-components/link/sp-link.js";export default{component:"sp-dropzone",title:"Dropzone",args:{isDragged:!1},argTypes:{isDragged:{name:"isDragged",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}}}};export const Default=e=>t`
2
- <sp-dropzone id="dropzone" tabindex="0" ?dragged=${e.isDragged}>
1
+ "use strict";
2
+ import { html } from "@spectrum-web-components/base";
3
+ import "@spectrum-web-components/dropzone/sp-dropzone.js";
4
+ import { illustration } from "../test/test-svg";
5
+ import "@spectrum-web-components/illustrated-message/sp-illustrated-message.js";
6
+ import "@spectrum-web-components/link/sp-link.js";
7
+ export default {
8
+ component: "sp-dropzone",
9
+ title: "Dropzone",
10
+ args: {
11
+ isDragged: false
12
+ },
13
+ argTypes: {
14
+ isDragged: {
15
+ name: "isDragged",
16
+ type: { name: "boolean", required: false },
17
+ table: {
18
+ type: { summary: "boolean" },
19
+ defaultValue: { summary: false }
20
+ },
21
+ control: {
22
+ type: "boolean"
23
+ }
24
+ }
25
+ }
26
+ };
27
+ export const Default = (args) => {
28
+ return html`
29
+ <sp-dropzone id="dropzone" tabindex="0" ?dragged=${args.isDragged}>
3
30
  <sp-illustrated-message heading="Drag and Drop Your File" cta>
4
- ${o}
31
+ ${illustration}
5
32
  <div slot="description">
6
33
  <label for="file-input">
7
34
  <sp-link>Select a File</sp-link>
@@ -17,10 +44,13 @@ import{html as t}from"@spectrum-web-components/base";import"@spectrum-web-compon
17
44
  </div>
18
45
  </sp-illustrated-message>
19
46
  </sp-dropzone>
20
- `,Dragged=e=>t`
21
- <sp-dropzone id="dropzone" tabindex="0" ?dragged=${e.isDragged}>
47
+ `;
48
+ };
49
+ export const Dragged = (args) => {
50
+ return html`
51
+ <sp-dropzone id="dropzone" tabindex="0" ?dragged=${args.isDragged}>
22
52
  <sp-illustrated-message heading="Drag and Drop Your File" cta>
23
- ${o}
53
+ ${illustration}
24
54
  <div slot="description">
25
55
  <label for="file-input">
26
56
  <sp-link>Select a File</sp-link>
@@ -36,5 +66,9 @@ import{html as t}from"@spectrum-web-components/base";import"@spectrum-web-compon
36
66
  </div>
37
67
  </sp-illustrated-message>
38
68
  </sp-dropzone>
39
- `;Dragged.args={isDragged:!0};
69
+ `;
70
+ };
71
+ Dragged.args = {
72
+ isDragged: true
73
+ };
40
74
  //# sourceMappingURL=dropzone.stories.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["dropzone.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*/\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/dropzone/sp-dropzone.js';\nimport { illustration } from '../test/test-svg';\nimport '@spectrum-web-components/illustrated-message/sp-illustrated-message.js';\nimport '@spectrum-web-components/link/sp-link.js';\n\nexport default {\n component: 'sp-dropzone',\n title: 'Dropzone',\n args: {\n isDragged: false,\n },\n argTypes: {\n isDragged: {\n name: 'isDragged',\n type: { name: 'boolean', required: false },\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n },\n};\n\ntype StoryArgs = {\n isDragged?: boolean;\n};\n\nexport const Default = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-dropzone id=\"dropzone\" tabindex=\"0\" ?dragged=${args.isDragged}>\n <sp-illustrated-message heading=\"Drag and Drop Your File\" cta>\n ${illustration}\n <div slot=\"description\">\n <label for=\"file-input\">\n <sp-link>Select a File</sp-link>\n from your computer\n </label>\n <input type=\"file\" id=\"file-input\" style=\"display: none\" />\n </div>\n <div slot=\"description\">\n or\n <sp-link href=\"http://stock.adobe.com\" target=\"blank\">\n Search Adobe Stock\n </sp-link>\n </div>\n </sp-illustrated-message>\n </sp-dropzone>\n `;\n};\n\nexport const Dragged = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-dropzone id=\"dropzone\" tabindex=\"0\" ?dragged=${args.isDragged}>\n <sp-illustrated-message heading=\"Drag and Drop Your File\" cta>\n ${illustration}\n <div slot=\"description\">\n <label for=\"file-input\">\n <sp-link>Select a File</sp-link>\n from your computer\n </label>\n <input type=\"file\" id=\"file-input\" style=\"display: none\" />\n </div>\n <div slot=\"description\">\n or\n <sp-link href=\"http://stock.adobe.com\" target=\"blank\">\n Search Adobe Stock\n </sp-link>\n </div>\n </sp-illustrated-message>\n </sp-dropzone>\n `;\n};\nDragged.args = {\n isDragged: true,\n};\n"],
5
- "mappings": "AAWA,qDAEA,yDACA,gDACA,+EACA,iDAEA,cAAe,CACX,UAAW,cACX,MAAO,WACP,KAAM,CACF,UAAW,EACf,EACA,SAAU,CACN,UAAW,CACP,KAAM,YACN,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,CACJ,CACJ,EAMO,YAAM,SAAU,AAAC,GACb;AAAA,2DACgD,EAAK;AAAA;AAAA,kBAE9C;AAAA;AAAA;AAAA;AAA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import{measureFixtureCreation as i}from"../../../../test/benchmark/helpers.js";i(e`
1
+ "use strict";
2
+ import "@spectrum-web-components/dropzone/sp-dropzone.js";
3
+ import { html } from "lit";
4
+ import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
5
+ measureFixtureCreation(html`
2
6
  <sp-dropzone id="dropzone">
3
7
  <sp-illustrated-message heading="Drag and Drop Your File">
4
8
  <svg>
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["test-basic.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/dropzone/sp-dropzone.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-dropzone id=\"dropzone\">\n <sp-illustrated-message heading=\"Drag and Drop Your File\">\n <svg>\n <use xlink:href=\"geometry.svg#upload_geometry\" />\n </svg>\n </sp-illustrated-message>\n\n <div style=\"color: grey\">\n <div>\n <label for=\"file-input\">\n <sp-link>Select a File</sp-link>\n from your computer\n </label>\n <input type=\"file\" id=\"file-input\" style=\"display: none\" />\n </div>\n <div>\n or\n <sp-link href=\"http://stock.adobe.com\" target=\"blank\">\n Search Adobe Stock\n </sp-link>\n </div>\n </div>\n </sp-dropzone>\n`);\n"],
5
- "mappings": "AAYA,yDACA,2BACA,+EAEA,EAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAwBtB",
5
+ "mappings": ";AAYA,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAwBtB;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,5 @@
1
- import*as r from"../stories/dropzone.stories.js";import{regressVisuals as o}from"../../../test/visual/test.js";o("DropzoneStories",r);
1
+ "use strict";
2
+ import * as stories from "../stories/dropzone.stories.js";
3
+ import { regressVisuals } from "../../../test/visual/test.js";
4
+ regressVisuals("DropzoneStories", stories);
2
5
  //# sourceMappingURL=dropzone.test-vrt.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["dropzone.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/dropzone.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('DropzoneStories', stories);\n"],
5
- "mappings": "AAYA,iDACA,8DAEA,EAAe,kBAAmB,CAAO",
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/dropzone.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('DropzoneStories', stories as unknown as TestsType);\n"],
5
+ "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,mBAAmB,OAA+B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,15 @@
1
- import"@spectrum-web-components/dropzone/sp-dropzone.js";import{illustration as p}from"./test-svg.js";import{waitForPredicate as i}from"../../../test/testing-helpers.js";import{elementUpdated as r,expect as a,fixture as n,html as d}from"@open-wc/testing";describe("Dropzone",()=>{it("loads",async()=>{const e=await n(d`
1
+ "use strict";
2
+ import "@spectrum-web-components/dropzone/sp-dropzone.js";
3
+ import { illustration } from "./test-svg.js";
4
+ import { waitForPredicate } from "../../../test/testing-helpers.js";
5
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
6
+ describe("Dropzone", () => {
7
+ it("loads", async () => {
8
+ const el = await fixture(
9
+ html`
2
10
  <sp-dropzone id="dropzone">
3
11
  <sp-illustrated-message heading="Drag and Drop Your File">
4
- ${p}
12
+ ${illustration}
5
13
  </sp-illustrated-message>
6
14
 
7
15
  <div style="color: grey">
@@ -27,24 +35,116 @@ import"@spectrum-web-components/dropzone/sp-dropzone.js";import{illustration as
27
35
  </div>
28
36
  </div>
29
37
  </sp-dropzone>
30
- `);if(a(e).to.not.equal(void 0),!e.shadowRoot)throw new Error("No shadowRoot");const t=e.shadowRoot.querySelector("slot");return a(t).to.not.equal(void 0),!0}),it("manages `dropEffects`",async()=>{const e=await n(d`
38
+ `
39
+ );
40
+ expect(el).to.not.equal(void 0);
41
+ if (!el.shadowRoot)
42
+ throw new Error("No shadowRoot");
43
+ const slot = el.shadowRoot.querySelector("slot");
44
+ expect(slot).to.not.equal(void 0);
45
+ return true;
46
+ });
47
+ it("manages `dropEffects`", async () => {
48
+ const el = await fixture(
49
+ html`
31
50
  <sp-dropzone id="dropzone"></sp-dropzone>
32
- `);await r(e),a(e.dropEffect).to.equal("copy"),e.dropEffect="move",await r(e),a(e.dropEffect).to.equal("move")}),it("manages `dragover` events",async()=>{const e=await n(d`
51
+ `
52
+ );
53
+ await elementUpdated(el);
54
+ expect(el.dropEffect).to.equal("copy");
55
+ el.dropEffect = "move";
56
+ await elementUpdated(el);
57
+ expect(el.dropEffect).to.equal("move");
58
+ });
59
+ it("manages `dragover` events", async () => {
60
+ const el = await fixture(
61
+ html`
33
62
  <sp-dropzone id="dropzone"></sp-dropzone>
34
- `);await r(e),a(e.isDragged).to.be.false,e.dispatchEvent(new DragEvent("dragover")),a(e.isDragged).to.be.false;let t=!1;try{t=new DataTransfer}catch(o){}if(t){const o=new DragEvent("dragover",{dataTransfer:t});e.dispatchEvent(o),a(e.isDragged).to.be.true}}),it("allows `dragover` events to be canceled",async()=>{const t=await n(d`
63
+ `
64
+ );
65
+ await elementUpdated(el);
66
+ expect(el.isDragged).to.be.false;
67
+ el.dispatchEvent(new DragEvent("dragover"));
68
+ expect(el.isDragged).to.be.false;
69
+ let dataTransfer = false;
70
+ try {
71
+ dataTransfer = new DataTransfer();
72
+ } catch (error) {
73
+ }
74
+ if (dataTransfer) {
75
+ const dragOverEvent = new DragEvent("dragover", {
76
+ dataTransfer
77
+ });
78
+ el.dispatchEvent(dragOverEvent);
79
+ expect(el.isDragged).to.be.true;
80
+ }
81
+ });
82
+ it("allows `dragover` events to be canceled", async () => {
83
+ const canceledDrag = (event) => {
84
+ event.preventDefault();
85
+ };
86
+ const el = await fixture(
87
+ html`
35
88
  <sp-dropzone
36
89
  id="dropzone"
37
- @sp-dropzone-should-accept=${s=>{s.preventDefault()}}
90
+ @sp-dropzone-should-accept=${canceledDrag}
38
91
  ></sp-dropzone>
39
- `);await r(t),a(t.isDragged).to.be.false;let o=!1;try{o=new DataTransfer}catch(s){}if(o){const s=new DragEvent("dragover",{dataTransfer:o});t.dispatchEvent(s),a(t.isDragged).to.be.false,a(o.dropEffect).to.not.equal(t.dropEffect),a(o.dropEffect).to.equal("none")}}),it("manages `dragleave` events via debounce",async()=>{let e=0;const o=await n(d`
92
+ `
93
+ );
94
+ await elementUpdated(el);
95
+ expect(el.isDragged).to.be.false;
96
+ let dataTransfer = false;
97
+ try {
98
+ dataTransfer = new DataTransfer();
99
+ } catch (error) {
100
+ }
101
+ if (dataTransfer) {
102
+ const dragOverEvent = new DragEvent("dragover", {
103
+ dataTransfer
104
+ });
105
+ el.dispatchEvent(dragOverEvent);
106
+ expect(el.isDragged).to.be.false;
107
+ expect(dataTransfer.dropEffect).to.not.equal(el.dropEffect);
108
+ expect(dataTransfer.dropEffect).to.equal("none");
109
+ }
110
+ });
111
+ it("manages `dragleave` events via debounce", async () => {
112
+ let dragLeftCount = 0;
113
+ const onDragLeave = () => {
114
+ dragLeftCount += 1;
115
+ };
116
+ const el = await fixture(
117
+ html`
40
118
  <sp-dropzone
41
119
  id="dropzone"
42
- @sp-dropzone-dragleave=${()=>{e+=1}}
120
+ @sp-dropzone-dragleave=${onDragLeave}
43
121
  ></sp-dropzone>
44
- `);await r(o),a(e).to.equal(0),o.dispatchEvent(new DragEvent("dragleave")),o.dispatchEvent(new DragEvent("dragleave")),await i(()=>e===1),a(e).to.equal(1)}),it("manages `dragleave` events",async()=>{let e=!1;const o=await n(d`
122
+ `
123
+ );
124
+ await elementUpdated(el);
125
+ expect(dragLeftCount).to.equal(0);
126
+ el.dispatchEvent(new DragEvent("dragleave"));
127
+ el.dispatchEvent(new DragEvent("dragleave"));
128
+ await waitForPredicate(() => dragLeftCount === 1);
129
+ expect(dragLeftCount).to.equal(1);
130
+ });
131
+ it("manages `dragleave` events", async () => {
132
+ let dropped = false;
133
+ const onDrop = () => {
134
+ dropped = true;
135
+ };
136
+ const el = await fixture(
137
+ html`
45
138
  <sp-dropzone
46
139
  id="dropzone"
47
- @sp-dropzone-drop=${()=>{e=!0}}
140
+ @sp-dropzone-drop=${onDrop}
48
141
  ></sp-dropzone>
49
- `);await r(o),a(e).to.be.false,o.dispatchEvent(new DragEvent("drop")),a(e).to.be.true})});
142
+ `
143
+ );
144
+ await elementUpdated(el);
145
+ expect(dropped).to.be.false;
146
+ el.dispatchEvent(new DragEvent("drop"));
147
+ expect(dropped).to.be.true;
148
+ });
149
+ });
50
150
  //# sourceMappingURL=dropzone.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["dropzone.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*/\nimport '@spectrum-web-components/dropzone/sp-dropzone.js';\nimport { Dropzone } from '@spectrum-web-components/dropzone';\nimport { illustration } from './test-svg.js';\nimport { waitForPredicate } from '../../../test/testing-helpers.js';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\ndescribe('Dropzone', () => {\n it('loads', async () => {\n const el = await fixture<Dropzone>(\n html`\n <sp-dropzone id=\"dropzone\">\n <sp-illustrated-message heading=\"Drag and Drop Your File\">\n ${illustration}\n </sp-illustrated-message>\n\n <div style=\"color: grey\">\n <div>\n <label for=\"file-input\">\n <sp-link>Select a File</sp-link>\n from your computer\n </label>\n <input\n type=\"file\"\n id=\"file-input\"\n style=\"display: none\"\n />\n </div>\n <div>\n or\n <sp-link\n href=\"http://stock.adobe.com\"\n target=\"blank\"\n >\n Search Adobe Stock\n </sp-link>\n </div>\n </div>\n </sp-dropzone>\n `\n );\n expect(el).to.not.equal(undefined);\n if (!el.shadowRoot) throw new Error('No shadowRoot');\n const slot = el.shadowRoot.querySelector('slot') as HTMLSlotElement;\n expect(slot).to.not.equal(undefined);\n return true;\n });\n it('manages `dropEffects`', async () => {\n const el = await fixture<Dropzone>(\n html`\n <sp-dropzone id=\"dropzone\"></sp-dropzone>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.dropEffect).to.equal('copy');\n\n el.dropEffect = 'move';\n\n await elementUpdated(el);\n\n expect(el.dropEffect).to.equal('move');\n });\n it('manages `dragover` events', async () => {\n const el = await fixture<Dropzone>(\n html`\n <sp-dropzone id=\"dropzone\"></sp-dropzone>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.isDragged).to.be.false;\n\n el.dispatchEvent(new DragEvent('dragover'));\n\n expect(el.isDragged).to.be.false;\n\n let dataTransfer: DataTransfer | boolean = false;\n try {\n // Safari doesn't like this...\n dataTransfer = new DataTransfer();\n } catch (error) {}\n if (dataTransfer) {\n const dragOverEvent = new DragEvent('dragover', {\n dataTransfer,\n });\n\n el.dispatchEvent(dragOverEvent);\n\n expect(el.isDragged).to.be.true;\n // We should be able to make the following test here:\n // expect(dataTransfer.dropEffect).to.equal(el.dropEffect);\n // However, Chrome doesn't like it in the context of a test...\n }\n });\n it('allows `dragover` events to be canceled', async () => {\n const canceledDrag = (event: DragEvent): void => {\n event.preventDefault();\n };\n const el = await fixture<Dropzone>(\n html`\n <sp-dropzone\n id=\"dropzone\"\n @sp-dropzone-should-accept=${canceledDrag}\n ></sp-dropzone>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.isDragged).to.be.false;\n\n let dataTransfer: DataTransfer | boolean = false;\n try {\n // Safari doesn't like this...\n dataTransfer = new DataTransfer();\n } catch (error) {}\n if (dataTransfer) {\n const dragOverEvent = new DragEvent('dragover', {\n dataTransfer,\n });\n\n el.dispatchEvent(dragOverEvent);\n\n expect(el.isDragged).to.be.false;\n expect(dataTransfer.dropEffect).to.not.equal(el.dropEffect);\n expect(dataTransfer.dropEffect).to.equal('none');\n }\n });\n it('manages `dragleave` events via debounce', async () => {\n let dragLeftCount = 0;\n const onDragLeave = (): void => {\n dragLeftCount += 1;\n };\n const el = await fixture<Dropzone>(\n html`\n <sp-dropzone\n id=\"dropzone\"\n @sp-dropzone-dragleave=${onDragLeave}\n ></sp-dropzone>\n `\n );\n\n await elementUpdated(el);\n\n expect(dragLeftCount).to.equal(0);\n\n el.dispatchEvent(new DragEvent('dragleave'));\n el.dispatchEvent(new DragEvent('dragleave'));\n\n await waitForPredicate(() => dragLeftCount === 1);\n\n expect(dragLeftCount).to.equal(1);\n });\n\n it('manages `dragleave` events', async () => {\n let dropped = false;\n const onDrop = (): void => {\n dropped = true;\n };\n const el = await fixture<Dropzone>(\n html`\n <sp-dropzone\n id=\"dropzone\"\n @sp-dropzone-drop=${onDrop}\n ></sp-dropzone>\n `\n );\n\n await elementUpdated(el);\n\n expect(dropped).to.be.false;\n\n el.dispatchEvent(new DragEvent('drop'));\n\n expect(dropped).to.be.true;\n });\n});\n"],
5
- "mappings": "AAWA,yDAEA,6CACA,oEACA,qFAEA,SAAS,WAAY,IAAM,CACvB,GAAG,QAAS,SAAY,CACpB,KAAM,GAAK,KAAM,GACb;AAAA;AAAA;AAAA,0BAGc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aA2BlB,EAEA,GADA,EAAO,CAAE,EAAE,GAAG,IAAI,MAAM,MAAS,EAC7B,CAAC,EAAG,WAAY,KAAM,IAAI,OAAM,eAAe,EACnD,KAAM,GAAO,EAAG,WAAW,cAAc,MAAM,EAC/C,SAAO,CAAI,EAAE,GAAG,IAAI,MAAM,MAAS,EAC5B,EACX,CAAC,EACD,GAAG,wBAAyB,SAAY,CACpC,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,aAGJ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,MACJ,CAAC;AAED,SAAG,cAAc,aAAa;AAE9B,aAAO,GAAG,SAAS,EAAE,GAAG,GAAG;AAC3B,aAAO,aAAa,UAAU,EAAE,GAAG,IAAI,MAAM,GAAG,UAAU;AAC1D,aAAO,aAAa,UAAU,EAAE,GAAG,MAAM,MAAM;AAAA,IACnD;AAAA,EACJ,CAAC;AACD,KAAG,2CAA2C,YAAY;AACtD,QAAI,gBAAgB;AACpB,UAAM,cAAc,MAAY;AAC5B,uBAAiB;AAAA,IACrB;AACA,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,6CAGiC;AAAA;AAAA;AAAA,IAGrC;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,aAAa,EAAE,GAAG,MAAM,CAAC;AAEhC,OAAG,cAAc,IAAI,UAAU,WAAW,CAAC;AAC3C,OAAG,cAAc,IAAI,UAAU,WAAW,CAAC;AAE3C,UAAM,iBAAiB,MAAM,kBAAkB,CAAC;AAEhD,WAAO,aAAa,EAAE,GAAG,MAAM,CAAC;AAAA,EACpC,CAAC;AAED,KAAG,8BAA8B,YAAY;AACzC,QAAI,UAAU;AACd,UAAM,SAAS,MAAY;AACvB,gBAAU;AAAA,IACd;AACA,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,wCAG4B;AAAA;AAAA;AAAA,IAGhC;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,OAAO,EAAE,GAAG,GAAG;AAEtB,OAAG,cAAc,IAAI,UAAU,MAAM,CAAC;AAEtC,WAAO,OAAO,EAAE,GAAG,GAAG;AAAA,EAC1B,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }
package/test/test-svg.js CHANGED
@@ -1,4 +1,6 @@
1
- import{html as s}from"@spectrum-web-components/base";export const illustration=s`
1
+ "use strict";
2
+ import { html } from "@spectrum-web-components/base";
3
+ export const illustration = html`
2
4
  <svg
3
5
  xmlns="http://www.w3.org/2000/svg"
4
6
  viewBox="0 0 200 100"
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["test-svg.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*/\nimport { html } from '@spectrum-web-components/base';\n\nexport const illustration = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 200 100\"\n width=\"200\"\n height=\"100\"\n >\n <defs>\n <style>\n .cls-1,\n .cls-2 {\n fill: none;\n stroke-linecap: round;\n stroke-linejoin: round;\n }\n .cls-1 {\n stroke-width: 3px;\n }\n .cls-2 {\n stroke-width: 2px;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M110.53,85.66,100.26,95.89a1.09,1.09,0,0,1-1.52,0L88.47,85.66\"\n ></path>\n <line class=\"cls-1\" x1=\"99.5\" y1=\"95.5\" x2=\"99.5\" y2=\"58.5\"></line>\n <path class=\"cls-1\" d=\"M105.5,73.5h19a2,2,0,0,0,2-2v-43\"></path>\n <path\n class=\"cls-1\"\n d=\"M126.5,22.5h-19a2,2,0,0,1-2-2V1.5h-31a2,2,0,0,0-2,2v68a2,2,0,0,0,2,2h19\"\n ></path>\n <line class=\"cls-1\" x1=\"105.5\" y1=\"1.5\" x2=\"126.5\" y2=\"22.5\"></line>\n <path\n class=\"cls-2\"\n d=\"M47.93,50.49a5,5,0,1,0-4.83-5A4.93,4.93,0,0,0,47.93,50.49Z\"\n ></path>\n <path\n class=\"cls-2\"\n d=\"M36.6,65.93,42.05,60A2.06,2.06,0,0,1,45,60l12.68,13.2\"\n ></path>\n <path\n class=\"cls-2\"\n d=\"M3.14,73.23,22.42,53.76a1.65,1.65,0,0,1,2.38,0l19.05,19.7\"\n ></path>\n <path\n class=\"cls-1\"\n d=\"M139.5,36.5H196A1.49,1.49,0,0,1,197.5,38V72A1.49,1.49,0,0,1,196,73.5H141A1.49,1.49,0,0,1,139.5,72V32A1.49,1.49,0,0,1,141,30.5H154a2.43,2.43,0,0,1,1.67.66l6,5.66\"\n ></path>\n <rect\n class=\"cls-1\"\n x=\"1.5\"\n y=\"34.5\"\n width=\"58\"\n height=\"39\"\n rx=\"2\"\n ry=\"2\"\n ></rect>\n </svg>\n`;\n"],
5
- "mappings": "AAWA,qDAEO,YAAM,cAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
5
+ "mappings": ";AAWA,SAAS,YAAY;AAEd,aAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }