@spectrum-web-components/button-group 0.37.0 → 0.38.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/custom-elements.json +1 -1
- package/package.json +4 -4
- package/src/ButtonGroup.d.ts +1 -1
- package/src/ButtonGroup.dev.js +6 -2
- package/src/ButtonGroup.dev.js.map +2 -2
- package/src/ButtonGroup.js +1 -1
- package/src/ButtonGroup.js.map +2 -2
- package/src/button-group.css.dev.js +1 -1
- package/src/button-group.css.dev.js.map +1 -1
- package/src/button-group.css.js +1 -1
- package/src/button-group.css.js.map +1 -1
- package/src/spectrum-button-group.css.dev.js +1 -1
- package/src/spectrum-button-group.css.dev.js.map +1 -1
- package/src/spectrum-button-group.css.js +1 -1
- package/src/spectrum-button-group.css.js.map +1 -1
- package/src/spectrum-config.js +2 -1
package/custom-elements.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/button-group",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"lit-html"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@spectrum-web-components/base": "^0.
|
|
61
|
-
"@spectrum-web-components/button": "^0.
|
|
60
|
+
"@spectrum-web-components/base": "^0.38.0",
|
|
61
|
+
"@spectrum-web-components/button": "^0.38.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@spectrum-css/buttongroup": "^6.0.61"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"./sp-*.js",
|
|
70
70
|
"./**/*.dev.js"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "9a099b7543672f2fd4030833ab813b16c2cad62e"
|
|
73
73
|
}
|
package/src/ButtonGroup.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare const ButtonGroup_base: typeof SpectrumElement & {
|
|
|
10
10
|
export declare class ButtonGroup extends ButtonGroup_base {
|
|
11
11
|
static get styles(): CSSResultArray;
|
|
12
12
|
vertical: boolean;
|
|
13
|
-
protected handleSlotchange({ target: slot }: Event & {
|
|
13
|
+
protected handleSlotchange({ target: slot, }: Event & {
|
|
14
14
|
target: HTMLSlotElement;
|
|
15
15
|
}): void;
|
|
16
16
|
protected render(): TemplateResult;
|
package/src/ButtonGroup.dev.js
CHANGED
|
@@ -17,7 +17,9 @@ import {
|
|
|
17
17
|
} from "@spectrum-web-components/base";
|
|
18
18
|
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
|
19
19
|
import styles from "./button-group.css.js";
|
|
20
|
-
export class ButtonGroup extends SizedMixin(SpectrumElement
|
|
20
|
+
export class ButtonGroup extends SizedMixin(SpectrumElement, {
|
|
21
|
+
noDefaultSize: true
|
|
22
|
+
}) {
|
|
21
23
|
constructor() {
|
|
22
24
|
super(...arguments);
|
|
23
25
|
this.vertical = false;
|
|
@@ -25,7 +27,9 @@ export class ButtonGroup extends SizedMixin(SpectrumElement) {
|
|
|
25
27
|
static get styles() {
|
|
26
28
|
return [styles];
|
|
27
29
|
}
|
|
28
|
-
handleSlotchange({
|
|
30
|
+
handleSlotchange({
|
|
31
|
+
target: slot
|
|
32
|
+
}) {
|
|
29
33
|
const assignedElements = slot.assignedElements();
|
|
30
34
|
assignedElements.forEach((button) => {
|
|
31
35
|
button.size = this.size;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ButtonGroup.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 SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport type { Button } from '@spectrum-web-components/button';\n\nimport styles from './button-group.css.js';\n\n/**\n * @element sp-button-group\n * @slot - the sp-button elements that make up the group\n */\nexport class ButtonGroup extends SizedMixin(SpectrumElement) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n protected handleSlotchange({
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAGzB,OAAO,YAAY;AAMZ,aAAM,oBAAoB,WAAW,eAAe,EAAE;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 {\n CSSResultArray,\n html,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport type { Button } from '@spectrum-web-components/button';\n\nimport styles from './button-group.css.js';\n\n/**\n * @element sp-button-group\n * @slot - the sp-button elements that make up the group\n */\nexport class ButtonGroup extends SizedMixin(SpectrumElement, {\n noDefaultSize: true,\n}) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n protected handleSlotchange({\n target: slot,\n }: Event & { target: HTMLSlotElement }): void {\n const assignedElements = slot.assignedElements() as Button[];\n assignedElements.forEach((button) => {\n button.size = this.size;\n });\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot @slotchange=${this.handleSlotchange}></slot>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAGzB,OAAO,YAAY;AAMZ,aAAM,oBAAoB,WAAW,iBAAiB;AAAA,EACzD,eAAe;AACnB,CAAC,EAAE;AAAA,EAFI;AAAA;AAQH,SAAO,WAAW;AAAA;AAAA,EALlB,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAKU,iBAAiB;AAAA,IACvB,QAAQ;AAAA,EACZ,GAA8C;AAC1C,UAAM,mBAAmB,KAAK,iBAAiB;AAC/C,qBAAiB,QAAQ,CAAC,WAAW;AACjC,aAAO,OAAO,KAAK;AAAA,IACvB,CAAC;AAAA,EACL;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA,gCACiB,KAAK,gBAAgB;AAAA;AAAA,EAEjD;AACJ;AAhBW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAPjC,YAQF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/ButtonGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var a=(o,t,r,s)=>{for(var e=s>1?void 0:s?m(t,r):t,l=o.length-1,n;l>=0;l--)(n=o[l])&&(e=(s?n(t,r,e):n(e))||e);return s&&e&&i(t,r,e),e};import{html as p,SizedMixin as c,SpectrumElement as u}from"@spectrum-web-components/base";import{property as d}from"@spectrum-web-components/base/src/decorators.js";import
|
|
1
|
+
"use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var a=(o,t,r,s)=>{for(var e=s>1?void 0:s?m(t,r):t,l=o.length-1,n;l>=0;l--)(n=o[l])&&(e=(s?n(t,r,e):n(e))||e);return s&&e&&i(t,r,e),e};import{html as p,SizedMixin as c,SpectrumElement as u}from"@spectrum-web-components/base";import{property as d}from"@spectrum-web-components/base/src/decorators.js";import S from"./button-group.css.js";export class ButtonGroup extends c(u,{noDefaultSize:!0}){constructor(){super(...arguments);this.vertical=!1}static get styles(){return[S]}handleSlotchange({target:r}){r.assignedElements().forEach(e=>{e.size=this.size})}render(){return p`
|
|
2
2
|
<slot @slotchange=${this.handleSlotchange}></slot>
|
|
3
3
|
`}}a([d({type:Boolean,reflect:!0})],ButtonGroup.prototype,"vertical",2);
|
|
4
4
|
//# sourceMappingURL=ButtonGroup.js.map
|
package/src/ButtonGroup.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ButtonGroup.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 SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport type { Button } from '@spectrum-web-components/button';\n\nimport styles from './button-group.css.js';\n\n/**\n * @element sp-button-group\n * @slot - the sp-button elements that make up the group\n */\nexport class ButtonGroup extends SizedMixin(SpectrumElement) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n protected handleSlotchange({
|
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,EACA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAGzB,OAAOC,MAAY,wBAMZ,aAAM,oBAAoBH,EAAWC,
|
|
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 SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport type { Button } from '@spectrum-web-components/button';\n\nimport styles from './button-group.css.js';\n\n/**\n * @element sp-button-group\n * @slot - the sp-button elements that make up the group\n */\nexport class ButtonGroup extends SizedMixin(SpectrumElement, {\n noDefaultSize: true,\n}) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n protected handleSlotchange({\n target: slot,\n }: Event & { target: HTMLSlotElement }): void {\n const assignedElements = slot.assignedElements() as Button[];\n assignedElements.forEach((button) => {\n button.size = this.size;\n });\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot @slotchange=${this.handleSlotchange}></slot>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAYA,OAEI,QAAAA,EACA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAGzB,OAAOC,MAAY,wBAMZ,aAAM,oBAAoBH,EAAWC,EAAiB,CACzD,cAAe,EACnB,CAAC,CAAE,CAFI,kCAQH,KAAO,SAAW,GALlB,WAA2B,QAAyB,CAChD,MAAO,CAACE,CAAM,CAClB,CAKU,iBAAiB,CACvB,OAAQC,CACZ,EAA8C,CACjBA,EAAK,iBAAiB,EAC9B,QAASC,GAAW,CACjCA,EAAO,KAAO,KAAK,IACvB,CAAC,CACL,CAEmB,QAAyB,CACxC,OAAON;AAAA,gCACiB,KAAK,gBAAgB;AAAA,SAEjD,CACJ,CAhBWO,EAAA,CADNJ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAPjC,YAQF",
|
|
6
6
|
"names": ["html", "SizedMixin", "SpectrumElement", "property", "styles", "slot", "button", "__decorateClass"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
:host
|
|
4
|
+
:host([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(
|
|
5
5
|
--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)
|
|
6
6
|
)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(
|
|
7
7
|
--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["button-group.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
|
|
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([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(\n--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)\n)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(\n--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)\n)}:host([vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-flex-grow:1}:host([dir=ltr][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:left}:host([dir=rtl][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:right}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/button-group.css.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";import{css as t}from"@spectrum-web-components/base";const r=t`
|
|
2
|
-
:host
|
|
2
|
+
:host([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(
|
|
3
3
|
--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)
|
|
4
4
|
)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(
|
|
5
5
|
--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["button-group.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
|
|
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([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(\n--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)\n)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(\n--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)\n)}:host([vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-flex-grow:1}:host([dir=ltr][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:left}:host([dir=rtl][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:right}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
:host
|
|
4
|
+
:host([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(
|
|
5
5
|
--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)
|
|
6
6
|
)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(
|
|
7
7
|
--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-button-group.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
|
|
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([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(\n--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)\n)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(\n--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)\n)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";import{css as t}from"@spectrum-web-components/base";const r=t`
|
|
2
|
-
:host
|
|
2
|
+
:host([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(
|
|
3
3
|
--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)
|
|
4
4
|
)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(
|
|
5
5
|
--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-button-group.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
|
|
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([size=s]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-200);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-200)}:host{--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=l]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host([size=xl]){--spectrum-buttongroup-spacing-horizontal:var(--spectrum-spacing-300);--spectrum-buttongroup-spacing-vertical:var(--spectrum-spacing-300)}:host{display:flex;flex-wrap:wrap;gap:var(\n--mod-buttongroup-spacing-horizontal,var(--spectrum-buttongroup-spacing-horizontal)\n)}::slotted(*){flex-shrink:0}:host([vertical]){display:inline-flex;flex-direction:column;gap:var(\n--mod-buttongroup-spacing-vertical,var(--spectrum-buttongroup-spacing-vertical)\n)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
package/src/spectrum-config.js
CHANGED
|
@@ -27,10 +27,11 @@ const config = {
|
|
|
27
27
|
components: [
|
|
28
28
|
converter.classToHost(),
|
|
29
29
|
converter.classToAttribute('spectrum-ButtonGroup--vertical'),
|
|
30
|
+
// Default to `size='m'` without needing the attribute
|
|
31
|
+
converter.classToHost('spectrum-ButtonGroup--sizeM'),
|
|
30
32
|
...converter.enumerateAttributes(
|
|
31
33
|
[
|
|
32
34
|
['spectrum-ButtonGroup--sizeS', 's'],
|
|
33
|
-
['spectrum-ButtonGroup--sizeM', 'm'],
|
|
34
35
|
['spectrum-ButtonGroup--sizeL', 'l'],
|
|
35
36
|
['spectrum-ButtonGroup--sizeXL', 'xl'],
|
|
36
37
|
],
|