@spectrum-web-components/action-bar 0.34.0 → 0.35.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/README.md +35 -17
- package/custom-elements.json +39 -0
- package/package.json +7 -5
- package/src/ActionBar.d.ts +8 -0
- package/src/ActionBar.dev.js +41 -1
- package/src/ActionBar.dev.js.map +2 -2
- package/src/ActionBar.js +20 -3
- package/src/ActionBar.js.map +3 -3
- package/src/action-bar.css.dev.js +60 -12
- package/src/action-bar.css.dev.js.map +2 -2
- package/src/action-bar.css.js +62 -14
- package/src/action-bar.css.js.map +2 -2
- package/src/spectrum-action-bar.css.dev.js +60 -12
- package/src/spectrum-action-bar.css.dev.js.map +2 -2
- package/src/spectrum-action-bar.css.js +62 -14
- package/src/spectrum-action-bar.css.js.map +2 -2
- package/src/spectrum-config.js +4 -0
- package/stories/action-bar.stories.js +53 -10
- package/stories/action-bar.stories.js.map +2 -2
package/README.md
CHANGED
|
@@ -28,15 +28,29 @@ import { ActionBar } from '@spectrum-web-components/action-bar';
|
|
|
28
28
|
|
|
29
29
|
```html
|
|
30
30
|
<sp-action-bar open>
|
|
31
|
-
|
|
32
|
-
<sp-action-
|
|
33
|
-
<sp-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<sp-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
2 selected
|
|
32
|
+
<sp-action-button slot="buttons" label="Edit">
|
|
33
|
+
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
34
|
+
</sp-action-button>
|
|
35
|
+
<sp-action-button slot="buttons" label="More">
|
|
36
|
+
<sp-icon-more slot="icon"></sp-icon-more>
|
|
37
|
+
</sp-action-button>
|
|
38
|
+
</sp-action-bar>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Emphasized
|
|
42
|
+
|
|
43
|
+
Use the `emphasized` attribute to add priority to the information that is delivered within your `<sp-action-bar>` element:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<sp-action-bar emphasized open>
|
|
47
|
+
2 selected
|
|
48
|
+
<sp-action-button slot="buttons" label="Edit">
|
|
49
|
+
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
50
|
+
</sp-action-button>
|
|
51
|
+
<sp-action-button slot="buttons" label="More">
|
|
52
|
+
<sp-icon-more slot="icon"></sp-icon-more>
|
|
53
|
+
</sp-action-button>
|
|
40
54
|
</sp-action-bar>
|
|
41
55
|
```
|
|
42
56
|
|
|
@@ -48,14 +62,12 @@ When using `[variant="fixed"]`, the `<sp-action-bar>` will display by default at
|
|
|
48
62
|
|
|
49
63
|
```html
|
|
50
64
|
<h4>Look down and to the left when toggling.</h4>
|
|
51
|
-
<sp-action-bar variant="fixed">
|
|
52
|
-
<sp-checkbox indeterminate>228 Selected</sp-checkbox>
|
|
53
|
-
</sp-action-bar>
|
|
54
65
|
<sp-button
|
|
55
|
-
onclick="javascript:this.
|
|
66
|
+
onclick="javascript:this.nextElementSibling.open = !this.nextElementSibling.open;"
|
|
56
67
|
>
|
|
57
68
|
Toggle fixed action bar
|
|
58
69
|
</sp-button>
|
|
70
|
+
<sp-action-bar variant="fixed">2 selected</sp-action-bar>
|
|
59
71
|
```
|
|
60
72
|
|
|
61
73
|
### Sticky
|
|
@@ -65,9 +77,6 @@ When using `[variant="sticky"]`, be sure you've spent some time touching up on [
|
|
|
65
77
|
```html
|
|
66
78
|
<section style="position: relative; max-height: 6em; overflow: auto;">
|
|
67
79
|
<h4>Scroll down for toggle button</h4>
|
|
68
|
-
<sp-action-bar variant="sticky" style="top: 0;">
|
|
69
|
-
<sp-checkbox indeterminate>228 Selected</sp-checkbox>
|
|
70
|
-
</sp-action-bar>
|
|
71
80
|
<p>
|
|
72
81
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
73
82
|
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
|
|
@@ -78,9 +87,18 @@ When using `[variant="sticky"]`, be sure you've spent some time touching up on [
|
|
|
78
87
|
mollit anim id est laborum.
|
|
79
88
|
</p>
|
|
80
89
|
<sp-button
|
|
81
|
-
onclick="javascript:this.
|
|
90
|
+
onclick="javascript:this.nextElementSibling.open = !this.nextElementSibling.open;"
|
|
82
91
|
>
|
|
83
92
|
Toggle sticky action bar
|
|
84
93
|
</sp-button>
|
|
94
|
+
<sp-action-bar variant="sticky" style="inset-block: 0px">
|
|
95
|
+
2 selected
|
|
96
|
+
<sp-action-button slot="buttons" label="Edit">
|
|
97
|
+
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
98
|
+
</sp-action-button>
|
|
99
|
+
<sp-action-button slot="buttons" label="More">
|
|
100
|
+
<sp-icon-more slot="icon"></sp-icon-more>
|
|
101
|
+
</sp-action-button>
|
|
102
|
+
</sp-action-bar>
|
|
85
103
|
</section>
|
|
86
104
|
```
|
package/custom-elements.json
CHANGED
|
@@ -40,6 +40,18 @@
|
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
42
|
"members": [
|
|
43
|
+
{
|
|
44
|
+
"kind": "field",
|
|
45
|
+
"name": "emphasized",
|
|
46
|
+
"type": {
|
|
47
|
+
"text": "boolean"
|
|
48
|
+
},
|
|
49
|
+
"privacy": "public",
|
|
50
|
+
"default": "false",
|
|
51
|
+
"description": "Deliver the Action Bar with additional visual emphasis.",
|
|
52
|
+
"attribute": "emphasized",
|
|
53
|
+
"reflects": true
|
|
54
|
+
},
|
|
43
55
|
{
|
|
44
56
|
"kind": "field",
|
|
45
57
|
"name": "flexible",
|
|
@@ -98,9 +110,36 @@
|
|
|
98
110
|
},
|
|
99
111
|
"privacy": "private",
|
|
100
112
|
"default": "''"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"kind": "method",
|
|
116
|
+
"name": "handleClick",
|
|
117
|
+
"privacy": "private",
|
|
118
|
+
"return": {
|
|
119
|
+
"type": {
|
|
120
|
+
"text": "void"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"events": [
|
|
126
|
+
{
|
|
127
|
+
"name": "close",
|
|
128
|
+
"type": {
|
|
129
|
+
"text": "Event"
|
|
130
|
+
}
|
|
101
131
|
}
|
|
102
132
|
],
|
|
103
133
|
"attributes": [
|
|
134
|
+
{
|
|
135
|
+
"name": "emphasized",
|
|
136
|
+
"type": {
|
|
137
|
+
"text": "boolean"
|
|
138
|
+
},
|
|
139
|
+
"default": "false",
|
|
140
|
+
"description": "Deliver the Action Bar with additional visual emphasis.",
|
|
141
|
+
"fieldName": "emphasized"
|
|
142
|
+
},
|
|
104
143
|
{
|
|
105
144
|
"name": "flexible",
|
|
106
145
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/action-bar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,11 +57,13 @@
|
|
|
57
57
|
"lit-html"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@spectrum-web-components/
|
|
61
|
-
"@spectrum-web-components/
|
|
60
|
+
"@spectrum-web-components/action-group": "^0.35.0",
|
|
61
|
+
"@spectrum-web-components/base": "^0.35.0",
|
|
62
|
+
"@spectrum-web-components/button": "^0.35.0",
|
|
63
|
+
"@spectrum-web-components/popover": "^0.35.0"
|
|
62
64
|
},
|
|
63
65
|
"devDependencies": {
|
|
64
|
-
"@spectrum-css/actionbar": "^
|
|
66
|
+
"@spectrum-css/actionbar": "^6.0.52"
|
|
65
67
|
},
|
|
66
68
|
"types": "./src/index.d.ts",
|
|
67
69
|
"customElements": "custom-elements.json",
|
|
@@ -69,5 +71,5 @@
|
|
|
69
71
|
"./sp-*.js",
|
|
70
72
|
"./**/*.dev.js"
|
|
71
73
|
],
|
|
72
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "1ee5a6c92838cdf48321276d97f61c20f8476ac1"
|
|
73
75
|
}
|
package/src/ActionBar.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { CSSResultArray, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
|
|
2
2
|
import '@spectrum-web-components/popover/sp-popover.js';
|
|
3
|
+
import '@spectrum-web-components/action-group/sp-action-group.js';
|
|
4
|
+
import '@spectrum-web-components/button/sp-close-button.js';
|
|
5
|
+
import '@spectrum-web-components/field-label/sp-field-label.js';
|
|
3
6
|
export declare const actionBarVariants: string[];
|
|
4
7
|
/**
|
|
5
8
|
* @element sp-action-bar
|
|
@@ -7,6 +10,10 @@ export declare const actionBarVariants: string[];
|
|
|
7
10
|
*/
|
|
8
11
|
export declare class ActionBar extends SpectrumElement {
|
|
9
12
|
static get styles(): CSSResultArray;
|
|
13
|
+
/**
|
|
14
|
+
* Deliver the Action Bar with additional visual emphasis.
|
|
15
|
+
*/
|
|
16
|
+
emphasized: boolean;
|
|
10
17
|
/**
|
|
11
18
|
* When `flexible` the action bar sizes itself to its content
|
|
12
19
|
* rather than a specific width.
|
|
@@ -24,5 +31,6 @@ export declare class ActionBar extends SpectrumElement {
|
|
|
24
31
|
set variant(variant: string);
|
|
25
32
|
get variant(): string;
|
|
26
33
|
private _variant;
|
|
34
|
+
private handleClick;
|
|
27
35
|
render(): TemplateResult;
|
|
28
36
|
}
|
package/src/ActionBar.dev.js
CHANGED
|
@@ -16,11 +16,16 @@ import {
|
|
|
16
16
|
} from "@spectrum-web-components/base";
|
|
17
17
|
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
|
18
18
|
import "@spectrum-web-components/popover/sp-popover.js";
|
|
19
|
+
import "@spectrum-web-components/action-group/sp-action-group.js";
|
|
20
|
+
import "@spectrum-web-components/button/sp-close-button.js";
|
|
21
|
+
import "@spectrum-web-components/field-label/sp-field-label.js";
|
|
19
22
|
import actionBarStyles from "./action-bar.css.js";
|
|
23
|
+
import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
|
|
20
24
|
export const actionBarVariants = ["sticky", "fixed"];
|
|
21
25
|
export class ActionBar extends SpectrumElement {
|
|
22
26
|
constructor() {
|
|
23
27
|
super(...arguments);
|
|
28
|
+
this.emphasized = false;
|
|
24
29
|
this.flexible = false;
|
|
25
30
|
this.open = false;
|
|
26
31
|
this._variant = "";
|
|
@@ -43,14 +48,49 @@ export class ActionBar extends SpectrumElement {
|
|
|
43
48
|
get variant() {
|
|
44
49
|
return this._variant;
|
|
45
50
|
}
|
|
51
|
+
handleClick() {
|
|
52
|
+
this.open = false;
|
|
53
|
+
const applyDefault = this.dispatchEvent(
|
|
54
|
+
new Event("close", {
|
|
55
|
+
bubbles: true
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
if (!applyDefault) {
|
|
59
|
+
this.open = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
46
62
|
render() {
|
|
47
63
|
return html`
|
|
48
64
|
<sp-popover ?open=${this.open} id="popover">
|
|
49
|
-
<slot
|
|
65
|
+
<slot name="override">
|
|
66
|
+
<sp-close-button
|
|
67
|
+
static=${ifDefined(
|
|
68
|
+
this.emphasized ? "white" : void 0
|
|
69
|
+
)}
|
|
70
|
+
class="close-button"
|
|
71
|
+
label="Clear selection"
|
|
72
|
+
@click=${this.handleClick}
|
|
73
|
+
></sp-close-button>
|
|
74
|
+
<sp-field-label class="field-label">
|
|
75
|
+
<slot></slot>
|
|
76
|
+
</sp-field-label>
|
|
77
|
+
<sp-action-group
|
|
78
|
+
class="action-group"
|
|
79
|
+
quiet
|
|
80
|
+
static=${ifDefined(
|
|
81
|
+
this.emphasized ? "white" : void 0
|
|
82
|
+
)}
|
|
83
|
+
>
|
|
84
|
+
<slot name="buttons"></slot>
|
|
85
|
+
</sp-action-group>
|
|
86
|
+
</slot>
|
|
50
87
|
</sp-popover>
|
|
51
88
|
`;
|
|
52
89
|
}
|
|
53
90
|
}
|
|
91
|
+
__decorateClass([
|
|
92
|
+
property({ type: Boolean, reflect: true })
|
|
93
|
+
], ActionBar.prototype, "emphasized", 2);
|
|
54
94
|
__decorateClass([
|
|
55
95
|
property({ type: Boolean, reflect: true })
|
|
56
96
|
], ActionBar.prototype, "flexible", 2);
|
package/src/ActionBar.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ActionBar.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/popover/sp-popover.js';\nimport actionBarStyles from './action-bar.css.js';\nexport const actionBarVariants = ['sticky', 'fixed'];\n\n/**\n * @element sp-action-bar\n * @slot - Content to display with the Action Bar\n */\nexport class ActionBar extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [actionBarStyles];\n }\n\n /**\n * When `flexible` the action bar sizes itself to its content\n * rather than a specific width.\n *\n * @param {Boolean} flexible\n */\n @property({ type: Boolean, reflect: true })\n public flexible = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * The variant applies specific styling when set to `sticky` or `fixed`.\n * `variant` attribute is removed when not matching one of the above.\n *\n * @param {String} variant\n */\n @property({ type: String, reflect: true })\n public set variant(variant: string) {\n if (variant === this.variant) {\n return;\n }\n if (actionBarVariants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n return;\n }\n this.removeAttribute('variant');\n this._variant = '';\n }\n\n public get variant(): string {\n return this._variant;\n }\n\n private _variant = '';\n\n public override render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot></slot>\n </sp-popover>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,OAAO;AACP,OAAO,qBAAqB;
|
|
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 '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/button/sp-close-button.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport actionBarStyles from './action-bar.css.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.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 * Deliver the Action Bar with additional visual emphasis.\n */\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\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 private handleClick(): void {\n this.open = false;\n\n const applyDefault = this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n\n if (!applyDefault) {\n this.open = true;\n }\n }\n\n public override render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot name=\"override\">\n <sp-close-button\n static=${ifDefined(\n this.emphasized ? 'white' : undefined\n )}\n class=\"close-button\"\n label=\"Clear selection\"\n @click=${this.handleClick}\n ></sp-close-button>\n <sp-field-label class=\"field-label\">\n <slot></slot>\n </sp-field-label>\n <sp-action-group\n class=\"action-group\"\n quiet\n static=${ifDefined(\n this.emphasized ? 'white' : undefined\n )}\n >\n <slot name=\"buttons\"></slot>\n </sp-action-group>\n </slot>\n </sp-popover>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,qBAAqB;AAC5B,SAAS,iBAAiB;AACnB,aAAM,oBAAoB,CAAC,UAAU,OAAO;AAM5C,aAAM,kBAAkB,gBAAgB;AAAA,EAAxC;AAAA;AASH,SAAO,aAAa;AASpB,SAAO,WAAW;AAGlB,SAAO,OAAO;AA0Bd,SAAQ,WAAW;AAAA;AAAA,EA9CnB,WAA2B,SAAyB;AAChD,WAAO,CAAC,eAAe;AAAA,EAC3B;AAAA,EA2BA,IAAW,QAAQ,SAAiB;AAChC,QAAI,YAAY,KAAK,SAAS;AAC1B;AAAA,IACJ;AACA,QAAI,kBAAkB,SAAS,OAAO,GAAG;AACrC,WAAK,aAAa,WAAW,OAAO;AACpC,WAAK,WAAW;AAChB;AAAA,IACJ;AACA,SAAK,gBAAgB,SAAS;AAC9B,SAAK,WAAW;AAAA,EACpB;AAAA,EAEA,IAAW,UAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA,EAIQ,cAAoB;AACxB,SAAK,OAAO;AAEZ,UAAM,eAAe,KAAK;AAAA,MACtB,IAAI,MAAM,SAAS;AAAA,QACf,SAAS;AAAA,MACb,CAAC;AAAA,IACL;AAEA,QAAI,CAAC,cAAc;AACf,WAAK,OAAO;AAAA,IAChB;AAAA,EACJ;AAAA,EAEgB,SAAyB;AACrC,WAAO;AAAA,gCACiB,KAAK;AAAA;AAAA;AAAA,iCAGJ;AAAA,MACL,KAAK,aAAa,UAAU;AAAA,IAChC;AAAA;AAAA;AAAA,iCAGS,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAQL;AAAA,MACL,KAAK,aAAa,UAAU;AAAA,IAChC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB;AACJ;AAlFW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GARjC,UASF;AASA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAjBjC,UAkBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GApBjC,UAqBF;AASI;AAAA,EADV,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GA7BhC,UA8BE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/ActionBar.js
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var u=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var r=(o,i,e,s)=>{for(var t=s>1?void 0:s?c(i,e):i,p=o.length-1,a;p>=0;p--)(a=o[p])&&(t=(s?a(i,e,t):a(t))||t);return s&&t&&u(i,e,t),t};import{html as f,SpectrumElement as d}from"@spectrum-web-components/base";import{property as l}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/popover/sp-popover.js";import"@spectrum-web-components/action-group/sp-action-group.js";import"@spectrum-web-components/button/sp-close-button.js";import"@spectrum-web-components/field-label/sp-field-label.js";import m from"./action-bar.css.js";import{ifDefined as n}from"@spectrum-web-components/base/src/directives.js";export const actionBarVariants=["sticky","fixed"];export class ActionBar extends d{constructor(){super(...arguments);this.emphasized=!1;this.flexible=!1;this.open=!1;this._variant=""}static get styles(){return[m]}set variant(e){if(e!==this.variant){if(actionBarVariants.includes(e)){this.setAttribute("variant",e),this._variant=e;return}this.removeAttribute("variant"),this._variant=""}}get variant(){return this._variant}handleClick(){this.open=!1,this.dispatchEvent(new Event("close",{bubbles:!0}))||(this.open=!0)}render(){return f`
|
|
2
2
|
<sp-popover ?open=${this.open} id="popover">
|
|
3
|
-
<slot
|
|
3
|
+
<slot name="override">
|
|
4
|
+
<sp-close-button
|
|
5
|
+
static=${n(this.emphasized?"white":void 0)}
|
|
6
|
+
class="close-button"
|
|
7
|
+
label="Clear selection"
|
|
8
|
+
@click=${this.handleClick}
|
|
9
|
+
></sp-close-button>
|
|
10
|
+
<sp-field-label class="field-label">
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</sp-field-label>
|
|
13
|
+
<sp-action-group
|
|
14
|
+
class="action-group"
|
|
15
|
+
quiet
|
|
16
|
+
static=${n(this.emphasized?"white":void 0)}
|
|
17
|
+
>
|
|
18
|
+
<slot name="buttons"></slot>
|
|
19
|
+
</sp-action-group>
|
|
20
|
+
</slot>
|
|
4
21
|
</sp-popover>
|
|
5
|
-
`}}
|
|
22
|
+
`}}r([l({type:Boolean,reflect:!0})],ActionBar.prototype,"emphasized",2),r([l({type:Boolean,reflect:!0})],ActionBar.prototype,"flexible",2),r([l({type:Boolean,reflect:!0})],ActionBar.prototype,"open",2),r([l({type:String,reflect:!0})],ActionBar.prototype,"variant",1);
|
|
6
23
|
//# sourceMappingURL=ActionBar.js.map
|
package/src/ActionBar.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ActionBar.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/popover/sp-popover.js';\nimport actionBarStyles from './action-bar.css.js';\nexport const actionBarVariants = ['sticky', 'fixed'];\n\n/**\n * @element sp-action-bar\n * @slot - Content to display with the Action Bar\n */\nexport class ActionBar extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [actionBarStyles];\n }\n\n /**\n * When `flexible` the action bar sizes itself to its content\n * rather than a specific width.\n *\n * @param {Boolean} flexible\n */\n @property({ type: Boolean, reflect: true })\n public flexible = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * The variant applies specific styling when set to `sticky` or `fixed`.\n * `variant` attribute is removed when not matching one of the above.\n *\n * @param {String} variant\n */\n @property({ type: String, reflect: true })\n public set variant(variant: string) {\n if (variant === this.variant) {\n return;\n }\n if (actionBarVariants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n return;\n }\n this.removeAttribute('variant');\n this._variant = '';\n }\n\n public get variant(): string {\n return this._variant;\n }\n\n private _variant = '';\n\n public override render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot></slot>\n </sp-popover>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,MAAO,iDACP,OAAOC,MAAqB,
|
|
6
|
-
"names": ["html", "SpectrumElement", "property", "actionBarStyles", "variant", "__decorateClass"]
|
|
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 '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/button/sp-close-button.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport actionBarStyles from './action-bar.css.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.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 * Deliver the Action Bar with additional visual emphasis.\n */\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\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 private handleClick(): void {\n this.open = false;\n\n const applyDefault = this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n\n if (!applyDefault) {\n this.open = true;\n }\n }\n\n public override render(): TemplateResult {\n return html`\n <sp-popover ?open=${this.open} id=\"popover\">\n <slot name=\"override\">\n <sp-close-button\n static=${ifDefined(\n this.emphasized ? 'white' : undefined\n )}\n class=\"close-button\"\n label=\"Clear selection\"\n @click=${this.handleClick}\n ></sp-close-button>\n <sp-field-label class=\"field-label\">\n <slot></slot>\n </sp-field-label>\n <sp-action-group\n class=\"action-group\"\n quiet\n static=${ifDefined(\n this.emphasized ? 'white' : undefined\n )}\n >\n <slot name=\"buttons\"></slot>\n </sp-action-group>\n </slot>\n </sp-popover>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAYA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,MAAO,iDACP,MAAO,2DACP,MAAO,qDACP,MAAO,yDACP,OAAOC,MAAqB,sBAC5B,OAAS,aAAAC,MAAiB,kDACnB,aAAM,kBAAoB,CAAC,SAAU,OAAO,EAM5C,aAAM,kBAAkBH,CAAgB,CAAxC,kCASH,KAAO,WAAa,GASpB,KAAO,SAAW,GAGlB,KAAO,KAAO,GA0Bd,KAAQ,SAAW,GA9CnB,WAA2B,QAAyB,CAChD,MAAO,CAACE,CAAe,CAC3B,CA2BA,IAAW,QAAQE,EAAiB,CAChC,GAAIA,IAAY,KAAK,QAGrB,IAAI,kBAAkB,SAASA,CAAO,EAAG,CACrC,KAAK,aAAa,UAAWA,CAAO,EACpC,KAAK,SAAWA,EAChB,OAEJ,KAAK,gBAAgB,SAAS,EAC9B,KAAK,SAAW,GACpB,CAEA,IAAW,SAAkB,CACzB,OAAO,KAAK,QAChB,CAIQ,aAAoB,CACxB,KAAK,KAAO,GAES,KAAK,cACtB,IAAI,MAAM,QAAS,CACf,QAAS,EACb,CAAC,CACL,IAGI,KAAK,KAAO,GAEpB,CAEgB,QAAyB,CACrC,OAAOL;AAAA,gCACiB,KAAK;AAAA;AAAA;AAAA,iCAGJI,EACL,KAAK,WAAa,QAAU,MAChC;AAAA;AAAA;AAAA,iCAGS,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAQLA,EACL,KAAK,WAAa,QAAU,MAChC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAOpB,CACJ,CAlFWE,EAAA,CADNJ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARjC,UASF,0BASAI,EAAA,CADNJ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAjBjC,UAkBF,wBAGAI,EAAA,CADNJ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GApBjC,UAqBF,oBASII,EAAA,CADVJ,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA7BhC,UA8BE",
|
|
6
|
+
"names": ["html", "SpectrumElement", "property", "actionBarStyles", "ifDefined", "variant", "__decorateClass"]
|
|
7
7
|
}
|
|
@@ -1,18 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
:host{--spectrum-actionbar-height:var(--spectrum-
|
|
5
|
-
--spectrum-
|
|
6
|
-
);--spectrum-actionbar-
|
|
7
|
-
--spectrum-
|
|
8
|
-
var(--spectrum-
|
|
9
|
-
|
|
10
|
-
--spectrum-actionbar-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
--spectrum-actionbar-
|
|
15
|
-
|
|
4
|
+
:host{--spectrum-actionbar-height:var(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(
|
|
5
|
+
--spectrum-line-height-100
|
|
6
|
+
);--spectrum-actionbar-item-counter-color:var(
|
|
7
|
+
--spectrum-neutral-content-color-default
|
|
8
|
+
);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(
|
|
9
|
+
--spectrum-informative-background-color-default
|
|
10
|
+
);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(
|
|
11
|
+
--spectrum-spacing-100
|
|
12
|
+
);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(
|
|
13
|
+
--spectrum-action-bar-top-to-item-counter
|
|
14
|
+
);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(
|
|
15
|
+
--spectrum-cjk-line-height-100
|
|
16
|
+
)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(
|
|
17
|
+
--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)
|
|
18
|
+
);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(
|
|
19
|
+
--mod-actionbar-spacing-outer-edge,
|
|
20
|
+
var(--spectrum-actionbar-spacing-outer-edge)
|
|
21
|
+
) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(
|
|
22
|
+
--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)
|
|
23
|
+
);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(
|
|
24
|
+
--highcontrast-actionbar-popover-border-color,var(
|
|
25
|
+
--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)
|
|
26
|
+
)
|
|
27
|
+
);border-radius:var(
|
|
28
|
+
--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)
|
|
29
|
+
);box-sizing:border-box;display:flex;filter:drop-shadow(var(
|
|
30
|
+
--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)
|
|
31
|
+
) var(
|
|
32
|
+
--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)
|
|
33
|
+
) var(
|
|
34
|
+
--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)
|
|
35
|
+
) var(
|
|
36
|
+
--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)
|
|
37
|
+
));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(
|
|
38
|
+
--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)
|
|
39
|
+
);margin-inline-end:var(
|
|
40
|
+
--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)
|
|
41
|
+
);margin-inline-start:var(
|
|
42
|
+
--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)
|
|
43
|
+
)}.field-label{color:var(
|
|
44
|
+
--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)
|
|
45
|
+
);font-size:var(
|
|
46
|
+
--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)
|
|
47
|
+
);line-height:var(
|
|
48
|
+
--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)
|
|
49
|
+
);margin-block-start:var(
|
|
50
|
+
--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)
|
|
51
|
+
);margin-inline-end:var(
|
|
52
|
+
--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)
|
|
53
|
+
);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(
|
|
54
|
+
--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)
|
|
55
|
+
)}.action-group{margin-block-start:var(
|
|
56
|
+
--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)
|
|
57
|
+
);margin-inline-end:var(
|
|
58
|
+
--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)
|
|
59
|
+
);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(
|
|
60
|
+
--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)
|
|
61
|
+
);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(
|
|
62
|
+
--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)
|
|
63
|
+
)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}:host{display:block}:host([flexible]){display:inline-block}
|
|
16
64
|
`;
|
|
17
65
|
export default styles;
|
|
18
66
|
//# sourceMappingURL=action-bar.css.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["action-bar.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(\n--spectrum-line-height-100\n);--spectrum-actionbar-item-counter-color:var(\n--spectrum-neutral-content-color-default\n);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(\n--spectrum-informative-background-color-default\n);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(\n--spectrum-spacing-100\n);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(\n--spectrum-action-bar-top-to-item-counter\n);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(\n--spectrum-cjk-line-height-100\n)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(\n--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)\n);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(\n--mod-actionbar-spacing-outer-edge,\nvar(--spectrum-actionbar-spacing-outer-edge)\n) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(\n--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)\n);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(\n--highcontrast-actionbar-popover-border-color,var(\n--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)\n)\n);border-radius:var(\n--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)\n);box-sizing:border-box;display:flex;filter:drop-shadow(var(\n--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)\n) var(\n--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)\n) var(\n--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)\n) var(\n--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)\n));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(\n--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)\n);margin-inline-start:var(\n--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)\n)}.field-label{color:var(\n--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)\n);font-size:var(\n--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)\n);line-height:var(\n--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)\n);margin-block-start:var(\n--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)\n);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(\n--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)\n)}.action-group{margin-block-start:var(\n--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)\n);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(\n--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)\n);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(\n--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)\n)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}:host{display:block}:host([flexible]){display:inline-block}\n`;\nexport default styles;"],
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8Df,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/action-bar.css.js
CHANGED
|
@@ -1,15 +1,63 @@
|
|
|
1
|
-
"use strict";import{css as
|
|
2
|
-
:host{--spectrum-actionbar-height:var(--spectrum-
|
|
3
|
-
--spectrum-
|
|
4
|
-
);--spectrum-actionbar-
|
|
5
|
-
--spectrum-
|
|
6
|
-
var(--spectrum-
|
|
7
|
-
|
|
8
|
-
--spectrum-actionbar-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
--spectrum-actionbar-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";import{css as r}from"@spectrum-web-components/base";const o=r`
|
|
2
|
+
:host{--spectrum-actionbar-height:var(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(
|
|
3
|
+
--spectrum-line-height-100
|
|
4
|
+
);--spectrum-actionbar-item-counter-color:var(
|
|
5
|
+
--spectrum-neutral-content-color-default
|
|
6
|
+
);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(
|
|
7
|
+
--spectrum-informative-background-color-default
|
|
8
|
+
);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(
|
|
9
|
+
--spectrum-spacing-100
|
|
10
|
+
);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(
|
|
11
|
+
--spectrum-action-bar-top-to-item-counter
|
|
12
|
+
);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(
|
|
13
|
+
--spectrum-cjk-line-height-100
|
|
14
|
+
)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(
|
|
15
|
+
--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)
|
|
16
|
+
);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(
|
|
17
|
+
--mod-actionbar-spacing-outer-edge,
|
|
18
|
+
var(--spectrum-actionbar-spacing-outer-edge)
|
|
19
|
+
) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(
|
|
20
|
+
--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)
|
|
21
|
+
);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(
|
|
22
|
+
--highcontrast-actionbar-popover-border-color,var(
|
|
23
|
+
--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)
|
|
24
|
+
)
|
|
25
|
+
);border-radius:var(
|
|
26
|
+
--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)
|
|
27
|
+
);box-sizing:border-box;display:flex;filter:drop-shadow(var(
|
|
28
|
+
--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)
|
|
29
|
+
) var(
|
|
30
|
+
--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)
|
|
31
|
+
) var(
|
|
32
|
+
--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)
|
|
33
|
+
) var(
|
|
34
|
+
--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)
|
|
35
|
+
));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(
|
|
36
|
+
--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)
|
|
37
|
+
);margin-inline-end:var(
|
|
38
|
+
--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)
|
|
39
|
+
);margin-inline-start:var(
|
|
40
|
+
--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)
|
|
41
|
+
)}.field-label{color:var(
|
|
42
|
+
--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)
|
|
43
|
+
);font-size:var(
|
|
44
|
+
--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)
|
|
45
|
+
);line-height:var(
|
|
46
|
+
--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)
|
|
47
|
+
);margin-block-start:var(
|
|
48
|
+
--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)
|
|
49
|
+
);margin-inline-end:var(
|
|
50
|
+
--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)
|
|
51
|
+
);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(
|
|
52
|
+
--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)
|
|
53
|
+
)}.action-group{margin-block-start:var(
|
|
54
|
+
--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)
|
|
55
|
+
);margin-inline-end:var(
|
|
56
|
+
--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)
|
|
57
|
+
);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(
|
|
58
|
+
--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)
|
|
59
|
+
);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(
|
|
60
|
+
--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)
|
|
61
|
+
)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}:host{display:block}:host([flexible]){display:inline-block}
|
|
62
|
+
`;export default o;
|
|
15
63
|
//# sourceMappingURL=action-bar.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["action-bar.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(\n--spectrum-line-height-100\n);--spectrum-actionbar-item-counter-color:var(\n--spectrum-neutral-content-color-default\n);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(\n--spectrum-informative-background-color-default\n);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(\n--spectrum-spacing-100\n);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(\n--spectrum-action-bar-top-to-item-counter\n);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(\n--spectrum-cjk-line-height-100\n)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(\n--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)\n);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(\n--mod-actionbar-spacing-outer-edge,\nvar(--spectrum-actionbar-spacing-outer-edge)\n) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(\n--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)\n);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(\n--highcontrast-actionbar-popover-border-color,var(\n--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)\n)\n);border-radius:var(\n--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)\n);box-sizing:border-box;display:flex;filter:drop-shadow(var(\n--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)\n) var(\n--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)\n) var(\n--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)\n) var(\n--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)\n));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(\n--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)\n);margin-inline-start:var(\n--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)\n)}.field-label{color:var(\n--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)\n);font-size:var(\n--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)\n);line-height:var(\n--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)\n);margin-block-start:var(\n--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)\n);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(\n--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)\n)}.action-group{margin-block-start:var(\n--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)\n);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(\n--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)\n);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(\n--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)\n)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}:host{display:block}:host([flexible]){display:inline-block}\n`;\nexport default styles;"],
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8Df,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
|
@@ -1,18 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
:host{--spectrum-actionbar-height:var(--spectrum-
|
|
5
|
-
--spectrum-
|
|
6
|
-
);--spectrum-actionbar-
|
|
7
|
-
--spectrum-
|
|
8
|
-
var(--spectrum-
|
|
9
|
-
|
|
10
|
-
--spectrum-actionbar-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
--spectrum-actionbar-
|
|
15
|
-
|
|
4
|
+
:host{--spectrum-actionbar-height:var(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(
|
|
5
|
+
--spectrum-line-height-100
|
|
6
|
+
);--spectrum-actionbar-item-counter-color:var(
|
|
7
|
+
--spectrum-neutral-content-color-default
|
|
8
|
+
);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(
|
|
9
|
+
--spectrum-informative-background-color-default
|
|
10
|
+
);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(
|
|
11
|
+
--spectrum-spacing-100
|
|
12
|
+
);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(
|
|
13
|
+
--spectrum-action-bar-top-to-item-counter
|
|
14
|
+
);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(
|
|
15
|
+
--spectrum-cjk-line-height-100
|
|
16
|
+
)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(
|
|
17
|
+
--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)
|
|
18
|
+
);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(
|
|
19
|
+
--mod-actionbar-spacing-outer-edge,
|
|
20
|
+
var(--spectrum-actionbar-spacing-outer-edge)
|
|
21
|
+
) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(
|
|
22
|
+
--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)
|
|
23
|
+
);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(
|
|
24
|
+
--highcontrast-actionbar-popover-border-color,var(
|
|
25
|
+
--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)
|
|
26
|
+
)
|
|
27
|
+
);border-radius:var(
|
|
28
|
+
--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)
|
|
29
|
+
);box-sizing:border-box;display:flex;filter:drop-shadow(var(
|
|
30
|
+
--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)
|
|
31
|
+
) var(
|
|
32
|
+
--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)
|
|
33
|
+
) var(
|
|
34
|
+
--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)
|
|
35
|
+
) var(
|
|
36
|
+
--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)
|
|
37
|
+
));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(
|
|
38
|
+
--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)
|
|
39
|
+
);margin-inline-end:var(
|
|
40
|
+
--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)
|
|
41
|
+
);margin-inline-start:var(
|
|
42
|
+
--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)
|
|
43
|
+
)}.field-label{color:var(
|
|
44
|
+
--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)
|
|
45
|
+
);font-size:var(
|
|
46
|
+
--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)
|
|
47
|
+
);line-height:var(
|
|
48
|
+
--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)
|
|
49
|
+
);margin-block-start:var(
|
|
50
|
+
--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)
|
|
51
|
+
);margin-inline-end:var(
|
|
52
|
+
--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)
|
|
53
|
+
);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(
|
|
54
|
+
--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)
|
|
55
|
+
)}.action-group{margin-block-start:var(
|
|
56
|
+
--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)
|
|
57
|
+
);margin-inline-end:var(
|
|
58
|
+
--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)
|
|
59
|
+
);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(
|
|
60
|
+
--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)
|
|
61
|
+
);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(
|
|
62
|
+
--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)
|
|
63
|
+
)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}
|
|
16
64
|
`;
|
|
17
65
|
export default styles;
|
|
18
66
|
//# sourceMappingURL=spectrum-action-bar.css.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-action-bar.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(\n--spectrum-line-height-100\n);--spectrum-actionbar-item-counter-color:var(\n--spectrum-neutral-content-color-default\n);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(\n--spectrum-informative-background-color-default\n);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(\n--spectrum-spacing-100\n);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(\n--spectrum-action-bar-top-to-item-counter\n);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(\n--spectrum-cjk-line-height-100\n)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(\n--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)\n);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(\n--mod-actionbar-spacing-outer-edge,\nvar(--spectrum-actionbar-spacing-outer-edge)\n) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(\n--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)\n);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(\n--highcontrast-actionbar-popover-border-color,var(\n--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)\n)\n);border-radius:var(\n--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)\n);box-sizing:border-box;display:flex;filter:drop-shadow(var(\n--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)\n) var(\n--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)\n) var(\n--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)\n) var(\n--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)\n));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(\n--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)\n);margin-inline-start:var(\n--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)\n)}.field-label{color:var(\n--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)\n);font-size:var(\n--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)\n);line-height:var(\n--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)\n);margin-block-start:var(\n--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)\n);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(\n--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)\n)}.action-group{margin-block-start:var(\n--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)\n);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(\n--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)\n);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(\n--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)\n)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}\n`;\nexport default styles;"],
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8Df,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,15 +1,63 @@
|
|
|
1
|
-
"use strict";import{css as
|
|
2
|
-
:host{--spectrum-actionbar-height:var(--spectrum-
|
|
3
|
-
--spectrum-
|
|
4
|
-
);--spectrum-actionbar-
|
|
5
|
-
--spectrum-
|
|
6
|
-
var(--spectrum-
|
|
7
|
-
|
|
8
|
-
--spectrum-actionbar-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
--spectrum-actionbar-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";import{css as r}from"@spectrum-web-components/base";const o=r`
|
|
2
|
+
:host{--spectrum-actionbar-height:var(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(
|
|
3
|
+
--spectrum-line-height-100
|
|
4
|
+
);--spectrum-actionbar-item-counter-color:var(
|
|
5
|
+
--spectrum-neutral-content-color-default
|
|
6
|
+
);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(
|
|
7
|
+
--spectrum-informative-background-color-default
|
|
8
|
+
);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(
|
|
9
|
+
--spectrum-spacing-100
|
|
10
|
+
);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(
|
|
11
|
+
--spectrum-action-bar-top-to-item-counter
|
|
12
|
+
);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(
|
|
13
|
+
--spectrum-cjk-line-height-100
|
|
14
|
+
)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(
|
|
15
|
+
--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)
|
|
16
|
+
);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(
|
|
17
|
+
--mod-actionbar-spacing-outer-edge,
|
|
18
|
+
var(--spectrum-actionbar-spacing-outer-edge)
|
|
19
|
+
) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(
|
|
20
|
+
--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)
|
|
21
|
+
);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(
|
|
22
|
+
--highcontrast-actionbar-popover-border-color,var(
|
|
23
|
+
--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)
|
|
24
|
+
)
|
|
25
|
+
);border-radius:var(
|
|
26
|
+
--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)
|
|
27
|
+
);box-sizing:border-box;display:flex;filter:drop-shadow(var(
|
|
28
|
+
--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)
|
|
29
|
+
) var(
|
|
30
|
+
--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)
|
|
31
|
+
) var(
|
|
32
|
+
--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)
|
|
33
|
+
) var(
|
|
34
|
+
--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)
|
|
35
|
+
));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(
|
|
36
|
+
--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)
|
|
37
|
+
);margin-inline-end:var(
|
|
38
|
+
--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)
|
|
39
|
+
);margin-inline-start:var(
|
|
40
|
+
--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)
|
|
41
|
+
)}.field-label{color:var(
|
|
42
|
+
--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)
|
|
43
|
+
);font-size:var(
|
|
44
|
+
--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)
|
|
45
|
+
);line-height:var(
|
|
46
|
+
--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)
|
|
47
|
+
);margin-block-start:var(
|
|
48
|
+
--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)
|
|
49
|
+
);margin-inline-end:var(
|
|
50
|
+
--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)
|
|
51
|
+
);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(
|
|
52
|
+
--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)
|
|
53
|
+
)}.action-group{margin-block-start:var(
|
|
54
|
+
--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)
|
|
55
|
+
);margin-inline-end:var(
|
|
56
|
+
--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)
|
|
57
|
+
);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(
|
|
58
|
+
--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)
|
|
59
|
+
);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(
|
|
60
|
+
--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)
|
|
61
|
+
)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}
|
|
62
|
+
`;export default o;
|
|
15
63
|
//# sourceMappingURL=spectrum-action-bar.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-action-bar.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 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(--spectrum-action-bar-height);--spectrum-actionbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-actionbar-item-counter-font-size:var(--spectrum-font-size-100);--spectrum-actionbar-item-counter-line-height:var(\n--spectrum-line-height-100\n);--spectrum-actionbar-item-counter-color:var(\n--spectrum-neutral-content-color-default\n);--spectrum-actionbar-popover-background-color:var(--spectrum-gray-50);--spectrum-actionbar-popover-border-color:var(--spectrum-gray-400);--spectrum-actionbar-emphasized-background-color:var(\n--spectrum-informative-background-color-default\n);--spectrum-actionbar-emphasized-item-counter-color:var(--spectrum-white);--spectrum-actionbar-spacing-outer-edge:var(--spectrum-spacing-300);--spectrum-actionbar-spacing-close-button-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-close-button-start:var(\n--spectrum-spacing-100\n);--spectrum-actionbar-spacing-close-button-end:var(--spectrum-spacing-75);--spectrum-actionbar-spacing-item-counter-top:var(\n--spectrum-action-bar-top-to-item-counter\n);--spectrum-actionbar-spacing-item-counter-end:var(--spectrum-spacing-400);--spectrum-actionbar-spacing-action-group-top:var(--spectrum-spacing-100);--spectrum-actionbar-spacing-action-group-end:var(--spectrum-spacing-100);--spectrum-actionbar-shadow-horizontal:var(--spectrum-drop-shadow-x);--spectrum-actionbar-shadow-vertical:var(--spectrum-drop-shadow-y);--spectrum-actionbar-shadow-blur:var(--spectrum-drop-shadow-blur);--spectrum-actionbar-shadow-color:var(--spectrum-drop-shadow-color)}:host:lang(ja),:host:lang(ko),:host:lang(zh){--spectrum-actionbar-item-counter-line-height-cjk:var(\n--spectrum-cjk-line-height-100\n)}@media (forced-colors:active){:host{--highcontrast-actionbar-popover-border-color:CanvasText}:host([emphasized]) #popover{--highcontrast-actionbar-popover-border-color:CanvasText}}:host{block-size:0;box-sizing:border-box;inset-block-end:0;opacity:0;padding:0 var(\n--mod-actionbar-spacing-outer-edge,var(--spectrum-actionbar-spacing-outer-edge)\n);pointer-events:none;z-index:1}:host([open]){block-size:calc(var(\n--mod-actionbar-spacing-outer-edge,\nvar(--spectrum-actionbar-spacing-outer-edge)\n) + var(--mod-actionbar-height, var(--spectrum-actionbar-height)));opacity:1}#popover{background-color:var(\n--mod-actionbar-popover-background-color,var(--spectrum-actionbar-popover-background-color)\n);block-size:var(--mod-actionbar-height,var(--spectrum-actionbar-height));border-color:var(\n--highcontrast-actionbar-popover-border-color,var(\n--mod-actionbar-popover-border-color,var(--spectrum-actionbar-popover-border-color)\n)\n);border-radius:var(\n--mod-actionbar-corner-radius,var(--spectrum-actionbar-corner-radius)\n);box-sizing:border-box;display:flex;filter:drop-shadow(var(\n--mod-actionbar-shadow-horizontal,var(--spectrum-actionbar-shadow-horizontal)\n) var(\n--mod-actionbar-shadow-vertical,var(--spectrum-actionbar-shadow-vertical)\n) var(\n--mod-actionbar-shadow-blur,var(--spectrum-actionbar-shadow-blur)\n) var(\n--mod-actionbar-shadow-color,var(--spectrum-actionbar-shadow-color)\n));flex-direction:row;inline-size:100%;margin:auto;padding-block:0;pointer-events:auto;position:relative}.close-button{flex-shrink:0;margin-block-start:var(\n--mod-actionbar-spacing-close-button-top,var(--spectrum-actionbar-spacing-close-button-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-close-button-end,var(--spectrum-actionbar-spacing-close-button-end)\n);margin-inline-start:var(\n--mod-actionbar-spacing-close-button-start,var(--spectrum-actionbar-spacing-close-button-start)\n)}.field-label{color:var(\n--mod-actionbar-item-counter-color,var(--spectrum-actionbar-item-counter-color)\n);font-size:var(\n--mod-actionbar-item-counter-font-size,var(--spectrum-actionbar-item-counter-font-size)\n);line-height:var(\n--mod-actionbar-item-counter-line-height,var(--spectrum-actionbar-item-counter-line-height)\n);margin-block-start:var(\n--mod-actionbar-spacing-item-counter-top,var(--spectrum-actionbar-spacing-item-counter-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-item-counter-end,var(--spectrum-actionbar-spacing-item-counter-end)\n);padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(\n--mod-actionbar-item-counter-line-height-cjk,var(--spectrum-actionbar-item-counter-line-height-cjk)\n)}.action-group{margin-block-start:var(\n--mod-actionbar-spacing-action-group-top,var(--spectrum-actionbar-spacing-action-group-top)\n);margin-inline-end:var(\n--mod-actionbar-spacing-action-group-end,var(--spectrum-actionbar-spacing-action-group-end)\n);margin-inline-start:auto}:host([emphasized]) #popover{background-color:var(\n--mod-actionbar-emphasized-background-color,var(--spectrum-actionbar-emphasized-background-color)\n);border-color:#0000;filter:none}:host([emphasized]) .field-label{color:var(\n--mod-actionbar-emphasized-item-counter-color,var(--spectrum-actionbar-emphasized-item-counter-color)\n)}:host([variant=sticky]){inset-inline:0;position:sticky}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}\n`;\nexport default styles;"],
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8Df,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
package/src/spectrum-config.js
CHANGED
|
@@ -28,6 +28,10 @@ const config = {
|
|
|
28
28
|
converter.classToHost(),
|
|
29
29
|
converter.classToAttribute('is-open', 'open'),
|
|
30
30
|
converter.classToAttribute('spectrum-ActionBar--flexible'),
|
|
31
|
+
converter.classToAttribute('spectrum-ActionBar--emphasized'),
|
|
32
|
+
converter.classToClass('spectrum-CloseButton', 'close-button'),
|
|
33
|
+
converter.classToClass('spectrum-ActionGroup', 'action-group'),
|
|
34
|
+
converter.classToClass('spectrum-FieldLabel', 'field-label'),
|
|
31
35
|
...converter.enumerateAttributes(
|
|
32
36
|
[
|
|
33
37
|
['spectrum-ActionBar--sticky'],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { html } from "@spectrum-web-components/base";
|
|
3
3
|
import "@spectrum-web-components/action-bar/sp-action-bar.js";
|
|
4
|
-
import "@spectrum-web-components/
|
|
4
|
+
import "@spectrum-web-components/field-label/sp-field-label.js";
|
|
5
5
|
import "@spectrum-web-components/action-button/sp-action-button.js";
|
|
6
6
|
import "@spectrum-web-components/action-group/sp-action-group.js";
|
|
7
7
|
import "@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js";
|
|
@@ -13,15 +13,58 @@ export default {
|
|
|
13
13
|
export const Default = () => {
|
|
14
14
|
return html`
|
|
15
15
|
<sp-action-bar open>
|
|
16
|
-
|
|
17
|
-
<sp-action-
|
|
18
|
-
<sp-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<sp-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
2 selected
|
|
17
|
+
<sp-action-button slot="buttons" label="Edit">
|
|
18
|
+
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
19
|
+
</sp-action-button>
|
|
20
|
+
<sp-action-button slot="buttons" label="More">
|
|
21
|
+
<sp-icon-more slot="icon"></sp-icon-more>
|
|
22
|
+
</sp-action-button>
|
|
23
|
+
</sp-action-bar>
|
|
24
|
+
`;
|
|
25
|
+
};
|
|
26
|
+
export const emphasized = () => {
|
|
27
|
+
return html`
|
|
28
|
+
<sp-action-bar open emphasized>
|
|
29
|
+
2 selected
|
|
30
|
+
<sp-action-button slot="buttons" label="Edit">
|
|
31
|
+
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
32
|
+
</sp-action-button>
|
|
33
|
+
<sp-action-button slot="buttons" label="More">
|
|
34
|
+
<sp-icon-more slot="icon"></sp-icon-more>
|
|
35
|
+
</sp-action-button>
|
|
36
|
+
</sp-action-bar>
|
|
37
|
+
`;
|
|
38
|
+
};
|
|
39
|
+
export const fixed = () => {
|
|
40
|
+
return html`
|
|
41
|
+
<style>
|
|
42
|
+
[variant='fixed'] {
|
|
43
|
+
bottom: 2.5em;
|
|
44
|
+
inset-inline-end: 1em;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
<sp-action-bar open variant="fixed">
|
|
48
|
+
2 selected
|
|
49
|
+
<sp-action-button slot="buttons" label="Edit">
|
|
50
|
+
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
51
|
+
</sp-action-button>
|
|
52
|
+
<sp-action-button slot="buttons" label="More">
|
|
53
|
+
<sp-icon-more slot="icon"></sp-icon-more>
|
|
54
|
+
</sp-action-button>
|
|
55
|
+
</sp-action-bar>
|
|
56
|
+
`;
|
|
57
|
+
};
|
|
58
|
+
export const flexible = () => {
|
|
59
|
+
return html`
|
|
60
|
+
<sp-action-bar open flexible emphasized>
|
|
61
|
+
2 selected
|
|
62
|
+
<sp-action-button slot="buttons" label="Edit">
|
|
63
|
+
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
64
|
+
</sp-action-button>
|
|
65
|
+
<sp-action-button slot="buttons" label="More">
|
|
66
|
+
<sp-icon-more slot="icon"></sp-icon-more>
|
|
67
|
+
</sp-action-button>
|
|
25
68
|
</sp-action-bar>
|
|
26
69
|
`;
|
|
27
70
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["action-bar.stories.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport '@spectrum-web-components/
|
|
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;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/action-bar/sp-action-bar.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\n\nexport default {\n title: 'Action Bar',\n component: 'sp-action-bar',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-action-bar open>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const emphasized = (): TemplateResult => {\n return html`\n <sp-action-bar open emphasized>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const fixed = (): TemplateResult => {\n return html`\n <style>\n [variant='fixed'] {\n bottom: 2.5em;\n inset-inline-end: 1em;\n }\n </style>\n <sp-action-bar open variant=\"fixed\">\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n\nexport const flexible = (): TemplateResult => {\n return html`\n <sp-action-bar open flexible emphasized>\n 2 selected\n <sp-action-button slot=\"buttons\" label=\"Edit\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n </sp-action-button>\n <sp-action-button slot=\"buttons\" label=\"More\">\n <sp-icon-more slot=\"icon\"></sp-icon-more>\n </sp-action-button>\n </sp-action-bar>\n `;\n};\n"],
|
|
5
|
+
"mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAEP,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;AAEO,aAAM,aAAa,MAAsB;AAC5C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBX;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|