@spectrum-web-components/action-bar 0.4.7 → 0.4.8-express.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/action-bar",
3
- "version": "0.4.7",
3
+ "version": "0.4.8-express.0+7a2be85d7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -45,7 +45,7 @@
45
45
  ],
46
46
  "dependencies": {
47
47
  "@spectrum-web-components/base": "^0.5.3",
48
- "@spectrum-web-components/popover": "^0.11.7",
48
+ "@spectrum-web-components/popover": "^0.11.8-express.0+7a2be85d7",
49
49
  "tslib": "^2.0.0"
50
50
  },
51
51
  "devDependencies": {
@@ -56,5 +56,5 @@
56
56
  "sideEffects": [
57
57
  "./sp-*.js"
58
58
  ],
59
- "gitHead": "57aba8030b6af96af4015a0aa830e342a17dc219"
59
+ "gitHead": "7a2be85d7e231dcf4141a86b7056f6c139a43851"
60
60
  }
@@ -0,0 +1,6 @@
1
+ import { ActionBar } from './src/ActionBar.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'sp-action-bar': ActionBar;
5
+ }
6
+ }
@@ -0,0 +1,14 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { ActionBar } from './src/ActionBar.js';
13
+ customElements.define('sp-action-bar', ActionBar);
14
+ //# sourceMappingURL=sp-action-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sp-action-bar.js","sourceRoot":"","sources":["sp-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { ActionBar } from './src/ActionBar.js';\n\ncustomElements.define('sp-action-bar', ActionBar);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-bar': ActionBar;\n }\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { CSSResultArray, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
2
+ import '@spectrum-web-components/popover/sp-popover.js';
3
+ export declare const actionBarVariants: string[];
4
+ /**
5
+ * @element sp-action-bar
6
+ * @slot - Content to display with the Action Bar
7
+ */
8
+ export declare class ActionBar extends SpectrumElement {
9
+ static get styles(): CSSResultArray;
10
+ /**
11
+ * When `flexible` the action bar sizes itself to its content
12
+ * rather than a specific width.
13
+ *
14
+ * @param {Boolean} flexible
15
+ */
16
+ flexible: boolean;
17
+ open: boolean;
18
+ /**
19
+ * The variant applies specific styling when set to `sticky` or `fixed`.
20
+ * `variant` attribute is removed when not matching one of the above.
21
+ *
22
+ * @param {String} variant
23
+ */
24
+ set variant(variant: string);
25
+ get variant(): string;
26
+ private _variant;
27
+ render(): TemplateResult;
28
+ }
@@ -0,0 +1,76 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { __decorate } from "tslib";
13
+ import { html, SpectrumElement, } from '@spectrum-web-components/base';
14
+ import { property } from '@spectrum-web-components/base/src/decorators.js';
15
+ import '@spectrum-web-components/popover/sp-popover.js';
16
+ import actionBarStyles from './action-bar.css.js';
17
+ export const actionBarVariants = ['sticky', 'fixed'];
18
+ /**
19
+ * @element sp-action-bar
20
+ * @slot - Content to display with the Action Bar
21
+ */
22
+ export class ActionBar extends SpectrumElement {
23
+ constructor() {
24
+ super(...arguments);
25
+ /**
26
+ * When `flexible` the action bar sizes itself to its content
27
+ * rather than a specific width.
28
+ *
29
+ * @param {Boolean} flexible
30
+ */
31
+ this.flexible = false;
32
+ this.open = false;
33
+ this._variant = '';
34
+ }
35
+ static get styles() {
36
+ return [actionBarStyles];
37
+ }
38
+ /**
39
+ * The variant applies specific styling when set to `sticky` or `fixed`.
40
+ * `variant` attribute is removed when not matching one of the above.
41
+ *
42
+ * @param {String} variant
43
+ */
44
+ set variant(variant) {
45
+ if (variant === this.variant) {
46
+ return;
47
+ }
48
+ if (actionBarVariants.includes(variant)) {
49
+ this.setAttribute('variant', variant);
50
+ this._variant = variant;
51
+ return;
52
+ }
53
+ this.removeAttribute('variant');
54
+ this._variant = '';
55
+ }
56
+ get variant() {
57
+ return this._variant;
58
+ }
59
+ render() {
60
+ return html `
61
+ <sp-popover ?open=${this.open} id="popover">
62
+ <slot></slot>
63
+ </sp-popover>
64
+ `;
65
+ }
66
+ }
67
+ __decorate([
68
+ property({ type: Boolean, reflect: true })
69
+ ], ActionBar.prototype, "flexible", void 0);
70
+ __decorate([
71
+ property({ type: Boolean, reflect: true })
72
+ ], ActionBar.prototype, "open", void 0);
73
+ __decorate([
74
+ property({ type: String, reflect: true })
75
+ ], ActionBar.prototype, "variant", null);
76
+ //# sourceMappingURL=ActionBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionBar.js","sourceRoot":"","sources":["ActionBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EACJ,eAAe,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,gDAAgD,CAAC;AACxD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,eAAe;IAA9C;;QAKI;;;;;WAKG;QAEI,aAAQ,GAAG,KAAK,CAAC;QAGjB,SAAI,GAAG,KAAK,CAAC;QA0BZ,aAAQ,GAAG,EAAE,CAAC;IAS1B,CAAC;IAjDU,MAAM,KAAK,MAAM;QACpB,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7B,CAAC;IAcD;;;;;OAKG;IAEH,IAAW,OAAO,CAAC,OAAe;QAC9B,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;YAC1B,OAAO;SACV;QACD,IAAI,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YACrC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,OAAO;SACV;QACD,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAIM,MAAM;QACT,OAAO,IAAI,CAAA;gCACa,IAAI,CAAC,IAAI;;;SAGhC,CAAC;IACN,CAAC;CACJ;AAtCG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACnB;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACvB;AASpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAYzC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/popover/sp-popover.js';\nimport actionBarStyles from './action-bar.css.js';\nexport const actionBarVariants = ['sticky', 'fixed'];\n\n/**\n * @element sp-action-bar\n * @slot - Content to display with the Action Bar\n */\nexport class ActionBar extends SpectrumElement {\n public static 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 render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot></slot>\n </sp-popover>\n `;\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,38 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { css } from '@spectrum-web-components/base';
13
+ const styles = css `
14
+ :host{--spectrum-actionbar-height:var(
15
+ --spectrum-global-dimension-size-600
16
+ );--spectrum-actionbar-padding-left:var(
17
+ --spectrum-global-dimension-size-200
18
+ );--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(
19
+ --spectrum-actionbar-height,
20
+ var(--spectrum-global-dimension-size-600)
21
+ ) + 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(
22
+ --spectrum-actionbar-padding-left
23
+ )}:host([dir=rtl]) #popover{padding-right:var(
24
+ --spectrum-actionbar-padding-left
25
+ )}:host([dir=ltr]) #popover{padding-right:var(
26
+ --spectrum-actionbar-padding-right
27
+ )}:host([dir=rtl]) #popover{padding-left:var(
28
+ --spectrum-actionbar-padding-right
29
+ )}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(
30
+ --spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)
31
+ );justify-content:space-between;margin:auto;max-width:var(
32
+ --spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)
33
+ );min-width:var(
34
+ --spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)
35
+ );pointer-events:auto;position:relative;width:100%}
36
+ `;
37
+ export default styles;
38
+ //# sourceMappingURL=action-bar.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-bar.css.js","sourceRoot":"","sources":["action-bar.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 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 { 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;"]}
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './ActionBar.js';
package/src/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ export * from './ActionBar.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,cAAc,gBAAgB,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nexport * from './ActionBar.js';\n"]}
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,38 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { css } from '@spectrum-web-components/base';
13
+ const styles = css `
14
+ :host{--spectrum-actionbar-height:var(
15
+ --spectrum-global-dimension-size-600
16
+ );--spectrum-actionbar-padding-left:var(
17
+ --spectrum-global-dimension-size-200
18
+ );--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(
19
+ --spectrum-actionbar-height,
20
+ var(--spectrum-global-dimension-size-600)
21
+ ) + 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(
22
+ --spectrum-actionbar-padding-left
23
+ )}:host([dir=rtl]) #popover{padding-right:var(
24
+ --spectrum-actionbar-padding-left
25
+ )}:host([dir=ltr]) #popover{padding-right:var(
26
+ --spectrum-actionbar-padding-right
27
+ )}:host([dir=rtl]) #popover{padding-left:var(
28
+ --spectrum-actionbar-padding-right
29
+ )}#popover{align-items:center;box-sizing:border-box;flex-direction:row;height:var(
30
+ --spectrum-actionbar-height,var(--spectrum-global-dimension-size-600)
31
+ );justify-content:space-between;margin:auto;max-width:var(
32
+ --spectrum-actionbar-max-width,var(--spectrum-global-dimension-static-size-3500)
33
+ );min-width:var(
34
+ --spectrum-actionbar-min-width,var(--spectrum-global-dimension-static-size-3500)
35
+ );pointer-events:auto;position:relative;width:100%}
36
+ `;
37
+ export default styles;
38
+ //# sourceMappingURL=spectrum-action-bar.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spectrum-action-bar.css.js","sourceRoot":"","sources":["spectrum-action-bar.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 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 { 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;"]}
@@ -0,0 +1,38 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { html } from '@spectrum-web-components/base';
13
+ import '../sp-action-bar.js';
14
+ import '@spectrum-web-components/checkbox/sp-checkbox.js';
15
+ import '@spectrum-web-components/action-button/sp-action-button.js';
16
+ import '@spectrum-web-components/action-group/sp-action-group.js';
17
+ import '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';
18
+ import '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';
19
+ export default {
20
+ title: 'Action Bar',
21
+ component: 'sp-action-bar',
22
+ };
23
+ export const Default = () => {
24
+ return html `
25
+ <sp-action-bar open>
26
+ <sp-checkbox indeterminate>228 Selected</sp-checkbox>
27
+ <sp-action-group quiet>
28
+ <sp-action-button>
29
+ <sp-icon-edit slot="icon" label="Edit"></sp-icon-edit>
30
+ </sp-action-button>
31
+ <sp-action-button>
32
+ <sp-icon-more slot="icon" label="More"></sp-icon-more>
33
+ </sp-action-button>
34
+ </sp-action-group>
35
+ </sp-action-bar>
36
+ `;
37
+ };
38
+ //# sourceMappingURL=action-bar.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-bar.stories.js","sourceRoot":"","sources":["action-bar.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AAErE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kDAAkD,CAAC;AAC1D,OAAO,4DAA4D,CAAC;AACpE,OAAO,0DAA0D,CAAC;AAClE,OAAO,+DAA+D,CAAC;AACvE,OAAO,+DAA+D,CAAC;AAEvE,eAAe;IACX,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,eAAe;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAmB,EAAE;IACxC,OAAO,IAAI,CAAA;;;;;;;;;;;;KAYV,CAAC;AACN,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '../sp-action-bar.js';\nimport '@spectrum-web-components/checkbox/sp-checkbox.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\n\nexport default {\n title: 'Action Bar',\n component: 'sp-action-bar',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-action-bar open>\n <sp-checkbox indeterminate>228 Selected</sp-checkbox>\n <sp-action-group quiet>\n <sp-action-button>\n <sp-icon-edit slot=\"icon\" label=\"Edit\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button>\n <sp-icon-more slot=\"icon\" label=\"More\"></sp-icon-more>\n </sp-action-button>\n </sp-action-group>\n </sp-action-bar>\n `;\n};\n"]}