@spectrum-web-components/table 0.42.2 → 0.42.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -9
- package/src/Table.dev.js +7 -14
- package/src/Table.dev.js.map +2 -2
- package/src/Table.js.map +2 -2
- package/src/TableBody.dev.js +1 -2
- package/src/TableBody.dev.js.map +2 -2
- package/src/TableBody.js.map +2 -2
- package/src/TableCell.dev.js +1 -2
- package/src/TableCell.dev.js.map +2 -2
- package/src/TableCell.js +2 -2
- package/src/TableCell.js.map +2 -2
- package/src/TableCheckboxCell.dev.js +1 -2
- package/src/TableCheckboxCell.dev.js.map +2 -2
- package/src/TableCheckboxCell.js.map +2 -2
- package/src/TableHead.dev.js +1 -2
- package/src/TableHead.dev.js.map +2 -2
- package/src/TableHead.js +2 -2
- package/src/TableHead.js.map +2 -2
- package/src/TableHeadCell.d.ts +1 -1
- package/src/TableHeadCell.dev.js +2 -4
- package/src/TableHeadCell.dev.js.map +2 -2
- package/src/TableHeadCell.js +2 -2
- package/src/TableHeadCell.js.map +2 -2
- package/src/TableRow.dev.js +3 -6
- package/src/TableRow.dev.js.map +2 -2
- package/src/TableRow.js +1 -1
- package/src/TableRow.js.map +2 -2
- package/src/spectrum-table-cell.css.dev.js +1 -1
- package/src/spectrum-table-cell.css.dev.js.map +1 -1
- package/src/spectrum-table-cell.css.js +1 -1
- package/src/spectrum-table-cell.css.js.map +1 -1
- package/src/spectrum-table-checkbox-cell.css.dev.js +1 -1
- package/src/spectrum-table-checkbox-cell.css.dev.js.map +1 -1
- package/src/spectrum-table-checkbox-cell.css.js +1 -1
- package/src/spectrum-table-checkbox-cell.css.js.map +1 -1
- package/src/spectrum-table-head-cell.css.dev.js +1 -1
- package/src/spectrum-table-head-cell.css.dev.js.map +1 -1
- package/src/spectrum-table-head-cell.css.js +1 -1
- package/src/spectrum-table-head-cell.css.js.map +1 -1
- package/src/spectrum-table-head.css.dev.js +1 -1
- package/src/spectrum-table-head.css.dev.js.map +1 -1
- package/src/spectrum-table-head.css.js +1 -1
- package/src/spectrum-table-head.css.js.map +1 -1
- package/src/spectrum-table-row.css.dev.js +1 -1
- package/src/spectrum-table-row.css.dev.js.map +1 -1
- package/src/spectrum-table-row.css.js +1 -1
- package/src/spectrum-table-row.css.js.map +1 -1
- package/src/spectrum-table.css.dev.js +1 -1
- package/src/spectrum-table.css.dev.js.map +1 -1
- package/src/spectrum-table.css.js +1 -1
- package/src/spectrum-table.css.js.map +1 -1
- package/src/table-cell.css.dev.js +1 -1
- package/src/table-cell.css.dev.js.map +1 -1
- package/src/table-cell.css.js +1 -1
- package/src/table-cell.css.js.map +1 -1
- package/src/table-checkbox-cell.css.dev.js +1 -1
- package/src/table-checkbox-cell.css.dev.js.map +1 -1
- package/src/table-checkbox-cell.css.js +1 -1
- package/src/table-checkbox-cell.css.js.map +1 -1
- package/src/table-head-cell.css.dev.js +1 -1
- package/src/table-head-cell.css.dev.js.map +1 -1
- package/src/table-head-cell.css.js +1 -1
- package/src/table-head-cell.css.js.map +1 -1
- package/src/table-head.css.dev.js +1 -1
- package/src/table-head.css.dev.js.map +1 -1
- package/src/table-head.css.js +1 -1
- package/src/table-head.css.js.map +1 -1
- package/src/table-row.css.dev.js +1 -1
- package/src/table-row.css.dev.js.map +1 -1
- package/src/table-row.css.js +1 -1
- package/src/table-row.css.js.map +1 -1
- package/src/table.css.dev.js +1 -1
- package/src/table.css.dev.js.map +1 -1
- package/src/table.css.js +1 -1
- package/src/table.css.js.map +1 -1
- package/stories/table-virtualized.stories.js +1 -2
- package/stories/table-virtualized.stories.js.map +1 -1
- package/test/table-memory.test.js +6 -0
- package/test/table-memory.test.js.map +7 -0
package/src/TableHead.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["TableHead.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\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 type { TableHeadCell } from './TableHeadCell.js';\nimport { TableCheckboxCell } from './TableCheckboxCell.js';\n\nimport styles from './table-head.css.js';\n\n/**\n * @element sp-table-head\n *\n */\nexport class TableHead extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ reflect: true })\n public role = 'row';\n\n @property({ type: Boolean, reflect: true })\n public selected?: boolean;\n\n private handleSorted({ target }: Event): void {\n const childCells = [...this.children] as TableHeadCell[];\n childCells.forEach((cell) => {\n if (cell !== target) {\n cell.sortDirection = undefined;\n }\n });\n }\n\n protected handleChange({\n target: checkboxCell,\n }: Event & { target: TableCheckboxCell }): void {\n this.selected =\n checkboxCell.checkbox.checked ||\n checkboxCell.checkbox.indeterminate;\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot\n @sorted=${this.handleSorted}\n @change=${this.handleChange}\n ></slot>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": "qNAWA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAIzB,OAAOC,MAAY,sBAMZ,aAAM,kBAAkBF,CAAgB,CAAxC,kCAMH,
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\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 type { TableHeadCell } from './TableHeadCell.js';\nimport { TableCheckboxCell } from './TableCheckboxCell.js';\n\nimport styles from './table-head.css.js';\n\n/**\n * @element sp-table-head\n *\n */\nexport class TableHead extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ reflect: true })\n public override role = 'row';\n\n @property({ type: Boolean, reflect: true })\n public selected?: boolean;\n\n private handleSorted({ target }: Event): void {\n const childCells = [...this.children] as TableHeadCell[];\n childCells.forEach((cell) => {\n if (cell !== target) {\n cell.sortDirection = undefined;\n }\n });\n }\n\n protected handleChange({\n target: checkboxCell,\n }: Event & { target: TableCheckboxCell }): void {\n this.selected =\n checkboxCell.checkbox.checked ||\n checkboxCell.checkbox.indeterminate;\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot\n @sorted=${this.handleSorted}\n @change=${this.handleChange}\n ></slot>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAWA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAIzB,OAAOC,MAAY,sBAMZ,aAAM,kBAAkBF,CAAgB,CAAxC,kCAMH,KAAgB,KAAO,MALvB,WAA2B,QAAyB,CAChD,MAAO,CAACE,CAAM,CAClB,CAQQ,aAAa,CAAE,OAAAC,CAAO,EAAgB,CACvB,CAAC,GAAG,KAAK,QAAQ,EACzB,QAASC,GAAS,CACrBA,IAASD,IACTC,EAAK,cAAgB,OAE7B,CAAC,CACL,CAEU,aAAa,CACnB,OAAQC,CACZ,EAAgD,CAC5C,KAAK,SACDA,EAAa,SAAS,SACtBA,EAAa,SAAS,aAC9B,CAEmB,QAAyB,CACxC,OAAON;AAAA;AAAA,0BAEW,KAAK,YAAY;AAAA,0BACjB,KAAK,YAAY;AAAA;AAAA,SAGvC,CACJ,CA9BoBO,EAAA,CADfL,EAAS,CAAE,QAAS,EAAK,CAAC,GALlB,UAMO,oBAGTK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARjC,UASF",
|
|
6
6
|
"names": ["html", "SpectrumElement", "property", "styles", "target", "cell", "checkboxCell", "__decorateClass"]
|
|
7
7
|
}
|
package/src/TableHeadCell.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
|
|
2
2
|
import '@spectrum-web-components/icons-ui/icons/sp-icon-arrow100.js';
|
|
3
|
-
export
|
|
3
|
+
export type SortedEventDetails = {
|
|
4
4
|
sortDirection: 'asc' | 'desc';
|
|
5
5
|
sortKey: string;
|
|
6
6
|
};
|
package/src/TableHeadCell.dev.js
CHANGED
|
@@ -6,8 +6,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
6
6
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7
7
|
if (decorator = decorators[i])
|
|
8
8
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9
|
-
if (kind && result)
|
|
10
|
-
__defProp(target, key, result);
|
|
9
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
10
|
return result;
|
|
12
11
|
};
|
|
13
12
|
import {
|
|
@@ -37,8 +36,7 @@ export class TableHeadCell extends SpectrumElement {
|
|
|
37
36
|
return [styles, arrowStyles];
|
|
38
37
|
}
|
|
39
38
|
handleClick() {
|
|
40
|
-
if (!this.sortable)
|
|
41
|
-
return;
|
|
39
|
+
if (!this.sortable) return;
|
|
42
40
|
if (this.sortDirection) {
|
|
43
41
|
this.sortDirection = this.sortDirection === "asc" ? "desc" : "asc";
|
|
44
42
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["TableHeadCell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-arrow100.js';\n\nimport styles from './table-head-cell.css.js';\nimport arrowStyles from '@spectrum-web-components/icon/src/spectrum-icon-arrow.css.js';\n\nexport type SortedEventDetails = {\n sortDirection: 'asc' | 'desc';\n sortKey: string;\n};\n\nconst ariaSortValue = (sortDirection?: 'asc' | 'desc'): string => {\n const values = {\n asc: 'ascending',\n desc: 'descending',\n };\n return values[sortDirection as 'asc' | 'desc'] || 'none';\n};\n\n/**\n * @element sp-table-head-cell\n *\n * @fires sorted - Announces that the table head has been sorted and handles the sorted event\n */\nexport class TableHeadCell extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles, arrowStyles];\n }\n\n @property({ reflect: true })\n public role = 'columnheader';\n\n @property({ type: Boolean, reflect: true })\n public sortable = false;\n\n @property({ reflect: true, attribute: 'sort-direction' })\n public sortDirection: 'asc' | 'desc' | undefined;\n\n @property({ attribute: 'sort-key' })\n public sortKey = '';\n\n protected handleClick(): void {\n if (!this.sortable) return;\n if (this.sortDirection) {\n this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortDirection = 'asc';\n }\n this.dispatchEvent(\n new CustomEvent<SortedEventDetails>('sorted', {\n bubbles: true,\n detail: {\n sortDirection: this.sortDirection,\n sortKey: this.sortKey,\n },\n })\n );\n }\n\n protected override render(): TemplateResult {\n const visiblySorted = this.sortable && !!this.sortDirection;\n return html`\n ${visiblySorted\n ? html`\n <sp-icon-arrow100\n class=\"sortedIcon spectrum-UIIcon-ArrowDown100\"\n ></sp-icon-arrow100>\n `\n : nothing}\n <slot></slot>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.addEventListener('click', this.handleClick);\n }\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('sortDirection')) {\n this.setAttribute('aria-sort', ariaSortValue(this.sortDirection));\n }\n if (changes.has('sortable')) {\n this.tabIndex = this.sortable ? 0 : -1;\n }\n super.update(changes);\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-arrow100.js';\n\nimport styles from './table-head-cell.css.js';\nimport arrowStyles from '@spectrum-web-components/icon/src/spectrum-icon-arrow.css.js';\n\nexport type SortedEventDetails = {\n sortDirection: 'asc' | 'desc';\n sortKey: string;\n};\n\nconst ariaSortValue = (sortDirection?: 'asc' | 'desc'): string => {\n const values = {\n asc: 'ascending',\n desc: 'descending',\n };\n return values[sortDirection as 'asc' | 'desc'] || 'none';\n};\n\n/**\n * @element sp-table-head-cell\n *\n * @fires sorted - Announces that the table head has been sorted and handles the sorted event\n */\nexport class TableHeadCell extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles, arrowStyles];\n }\n\n @property({ reflect: true })\n public override role = 'columnheader';\n\n @property({ type: Boolean, reflect: true })\n public sortable = false;\n\n @property({ reflect: true, attribute: 'sort-direction' })\n public sortDirection: 'asc' | 'desc' | undefined;\n\n @property({ attribute: 'sort-key' })\n public sortKey = '';\n\n protected handleClick(): void {\n if (!this.sortable) return;\n if (this.sortDirection) {\n this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortDirection = 'asc';\n }\n this.dispatchEvent(\n new CustomEvent<SortedEventDetails>('sorted', {\n bubbles: true,\n detail: {\n sortDirection: this.sortDirection,\n sortKey: this.sortKey,\n },\n })\n );\n }\n\n protected override render(): TemplateResult {\n const visiblySorted = this.sortable && !!this.sortDirection;\n return html`\n ${visiblySorted\n ? html`\n <sp-icon-arrow100\n class=\"sortedIcon spectrum-UIIcon-ArrowDown100\"\n ></sp-icon-arrow100>\n `\n : nothing}\n <slot></slot>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.addEventListener('click', this.handleClick);\n }\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('sortDirection')) {\n this.setAttribute('aria-sort', ariaSortValue(this.sortDirection));\n }\n if (changes.has('sortable')) {\n this.tabIndex = this.sortable ? 0 : -1;\n }\n super.update(changes);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAWA;AAAA,EAEI;AAAA,EACA;AAAA,EAEA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,OAAO;AAEP,OAAO,YAAY;AACnB,OAAO,iBAAiB;AAOxB,MAAM,gBAAgB,CAAC,kBAA2C;AAC9D,QAAM,SAAS;AAAA,IACX,KAAK;AAAA,IACL,MAAM;AAAA,EACV;AACA,SAAO,OAAO,aAA+B,KAAK;AACtD;AAOO,aAAM,sBAAsB,gBAAgB;AAAA,EAA5C;AAAA;AAMH,SAAgB,OAAO;AAGvB,SAAO,WAAW;AAMlB,SAAO,UAAU;AAAA;AAAA,EAdjB,WAA2B,SAAyB;AAChD,WAAO,CAAC,QAAQ,WAAW;AAAA,EAC/B;AAAA,EAcU,cAAoB;AAC1B,QAAI,CAAC,KAAK,SAAU;AACpB,QAAI,KAAK,eAAe;AACpB,WAAK,gBAAgB,KAAK,kBAAkB,QAAQ,SAAS;AAAA,IACjE,OAAO;AACH,WAAK,gBAAgB;AAAA,IACzB;AACA,SAAK;AAAA,MACD,IAAI,YAAgC,UAAU;AAAA,QAC1C,SAAS;AAAA,QACT,QAAQ;AAAA,UACJ,eAAe,KAAK;AAAA,UACpB,SAAS,KAAK;AAAA,QAClB;AAAA,MACJ,CAAC;AAAA,IACL;AAAA,EACJ;AAAA,EAEmB,SAAyB;AACxC,UAAM,gBAAgB,KAAK,YAAY,CAAC,CAAC,KAAK;AAC9C,WAAO;AAAA,cACD,gBACI;AAAA;AAAA;AAAA;AAAA,sBAKA,OAAO;AAAA;AAAA;AAAA,EAGrB;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,SAAK,iBAAiB,SAAS,KAAK,WAAW;AAAA,EACnD;AAAA,EAEmB,OAAO,SAA+B;AACrD,QAAI,QAAQ,IAAI,eAAe,GAAG;AAC9B,WAAK,aAAa,aAAa,cAAc,KAAK,aAAa,CAAC;AAAA,IACpE;AACA,QAAI,QAAQ,IAAI,UAAU,GAAG;AACzB,WAAK,WAAW,KAAK,WAAW,IAAI;AAAA,IACxC;AACA,UAAM,OAAO,OAAO;AAAA,EACxB;AACJ;AAzDoB;AAAA,EADf,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GALlB,cAMO;AAGT;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GARjC,cASF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,iBAAiB,CAAC;AAAA,GAX/C,cAYF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,WAAW,CAAC;AAAA,GAd1B,cAeF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/TableHeadCell.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var o=(s,r,t,i)=>{for(var e=i>1?void 0:i?p(r,t):r,n=s.length-1,a;n>=0;n--)(a=s[n])&&(e=(i?a(r,t,e):a(e))||e);return i&&e&&l(r,t,e),e};import{html as d,nothing as u,SpectrumElement as h}from"@spectrum-web-components/base";import{property as c}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-arrow100.js";import m from"./table-head-cell.css.js";import y from"@spectrum-web-components/icon/src/spectrum-icon-arrow.css.js";const
|
|
1
|
+
"use strict";var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var o=(s,r,t,i)=>{for(var e=i>1?void 0:i?p(r,t):r,n=s.length-1,a;n>=0;n--)(a=s[n])&&(e=(i?a(r,t,e):a(e))||e);return i&&e&&l(r,t,e),e};import{html as d,nothing as u,SpectrumElement as h}from"@spectrum-web-components/base";import{property as c}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-arrow100.js";import m from"./table-head-cell.css.js";import y from"@spectrum-web-components/icon/src/spectrum-icon-arrow.css.js";const v=s=>({asc:"ascending",desc:"descending"})[s]||"none";export class TableHeadCell extends h{constructor(){super(...arguments);this.role="columnheader";this.sortable=!1;this.sortKey=""}static get styles(){return[m,y]}handleClick(){this.sortable&&(this.sortDirection?this.sortDirection=this.sortDirection==="asc"?"desc":"asc":this.sortDirection="asc",this.dispatchEvent(new CustomEvent("sorted",{bubbles:!0,detail:{sortDirection:this.sortDirection,sortKey:this.sortKey}})))}render(){const t=this.sortable&&!!this.sortDirection;return d`
|
|
2
2
|
${t?d`
|
|
3
3
|
<sp-icon-arrow100
|
|
4
4
|
class="sortedIcon spectrum-UIIcon-ArrowDown100"
|
|
5
5
|
></sp-icon-arrow100>
|
|
6
6
|
`:u}
|
|
7
7
|
<slot></slot>
|
|
8
|
-
`}firstUpdated(t){super.firstUpdated(t),this.addEventListener("click",this.handleClick)}update(t){t.has("sortDirection")&&this.setAttribute("aria-sort",
|
|
8
|
+
`}firstUpdated(t){super.firstUpdated(t),this.addEventListener("click",this.handleClick)}update(t){t.has("sortDirection")&&this.setAttribute("aria-sort",v(this.sortDirection)),t.has("sortable")&&(this.tabIndex=this.sortable?0:-1),super.update(t)}}o([c({reflect:!0})],TableHeadCell.prototype,"role",2),o([c({type:Boolean,reflect:!0})],TableHeadCell.prototype,"sortable",2),o([c({reflect:!0,attribute:"sort-direction"})],TableHeadCell.prototype,"sortDirection",2),o([c({attribute:"sort-key"})],TableHeadCell.prototype,"sortKey",2);
|
|
9
9
|
//# sourceMappingURL=TableHeadCell.js.map
|
package/src/TableHeadCell.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["TableHeadCell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-arrow100.js';\n\nimport styles from './table-head-cell.css.js';\nimport arrowStyles from '@spectrum-web-components/icon/src/spectrum-icon-arrow.css.js';\n\nexport type SortedEventDetails = {\n sortDirection: 'asc' | 'desc';\n sortKey: string;\n};\n\nconst ariaSortValue = (sortDirection?: 'asc' | 'desc'): string => {\n const values = {\n asc: 'ascending',\n desc: 'descending',\n };\n return values[sortDirection as 'asc' | 'desc'] || 'none';\n};\n\n/**\n * @element sp-table-head-cell\n *\n * @fires sorted - Announces that the table head has been sorted and handles the sorted event\n */\nexport class TableHeadCell extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles, arrowStyles];\n }\n\n @property({ reflect: true })\n public role = 'columnheader';\n\n @property({ type: Boolean, reflect: true })\n public sortable = false;\n\n @property({ reflect: true, attribute: 'sort-direction' })\n public sortDirection: 'asc' | 'desc' | undefined;\n\n @property({ attribute: 'sort-key' })\n public sortKey = '';\n\n protected handleClick(): void {\n if (!this.sortable) return;\n if (this.sortDirection) {\n this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortDirection = 'asc';\n }\n this.dispatchEvent(\n new CustomEvent<SortedEventDetails>('sorted', {\n bubbles: true,\n detail: {\n sortDirection: this.sortDirection,\n sortKey: this.sortKey,\n },\n })\n );\n }\n\n protected override render(): TemplateResult {\n const visiblySorted = this.sortable && !!this.sortDirection;\n return html`\n ${visiblySorted\n ? html`\n <sp-icon-arrow100\n class=\"sortedIcon spectrum-UIIcon-ArrowDown100\"\n ></sp-icon-arrow100>\n `\n : nothing}\n <slot></slot>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.addEventListener('click', this.handleClick);\n }\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('sortDirection')) {\n this.setAttribute('aria-sort', ariaSortValue(this.sortDirection));\n }\n if (changes.has('sortable')) {\n this.tabIndex = this.sortable ? 0 : -1;\n }\n super.update(changes);\n }\n}\n"],
|
|
5
|
-
"mappings": "qNAWA,OAEI,QAAAA,EACA,WAAAC,EAEA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,MAAO,8DAEP,OAAOC,MAAY,2BACnB,OAAOC,MAAiB,+DAOxB,MAAMC,EAAiBC,IACJ,CACX,IAAK,YACL,KAAM,YACV,GACcA,CAA+B,GAAK,OAQ/C,aAAM,sBAAsBL,CAAgB,CAA5C,kCAMH,
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-arrow100.js';\n\nimport styles from './table-head-cell.css.js';\nimport arrowStyles from '@spectrum-web-components/icon/src/spectrum-icon-arrow.css.js';\n\nexport type SortedEventDetails = {\n sortDirection: 'asc' | 'desc';\n sortKey: string;\n};\n\nconst ariaSortValue = (sortDirection?: 'asc' | 'desc'): string => {\n const values = {\n asc: 'ascending',\n desc: 'descending',\n };\n return values[sortDirection as 'asc' | 'desc'] || 'none';\n};\n\n/**\n * @element sp-table-head-cell\n *\n * @fires sorted - Announces that the table head has been sorted and handles the sorted event\n */\nexport class TableHeadCell extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles, arrowStyles];\n }\n\n @property({ reflect: true })\n public override role = 'columnheader';\n\n @property({ type: Boolean, reflect: true })\n public sortable = false;\n\n @property({ reflect: true, attribute: 'sort-direction' })\n public sortDirection: 'asc' | 'desc' | undefined;\n\n @property({ attribute: 'sort-key' })\n public sortKey = '';\n\n protected handleClick(): void {\n if (!this.sortable) return;\n if (this.sortDirection) {\n this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortDirection = 'asc';\n }\n this.dispatchEvent(\n new CustomEvent<SortedEventDetails>('sorted', {\n bubbles: true,\n detail: {\n sortDirection: this.sortDirection,\n sortKey: this.sortKey,\n },\n })\n );\n }\n\n protected override render(): TemplateResult {\n const visiblySorted = this.sortable && !!this.sortDirection;\n return html`\n ${visiblySorted\n ? html`\n <sp-icon-arrow100\n class=\"sortedIcon spectrum-UIIcon-ArrowDown100\"\n ></sp-icon-arrow100>\n `\n : nothing}\n <slot></slot>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.addEventListener('click', this.handleClick);\n }\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('sortDirection')) {\n this.setAttribute('aria-sort', ariaSortValue(this.sortDirection));\n }\n if (changes.has('sortable')) {\n this.tabIndex = this.sortable ? 0 : -1;\n }\n super.update(changes);\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAWA,OAEI,QAAAA,EACA,WAAAC,EAEA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,MAAO,8DAEP,OAAOC,MAAY,2BACnB,OAAOC,MAAiB,+DAOxB,MAAMC,EAAiBC,IACJ,CACX,IAAK,YACL,KAAM,YACV,GACcA,CAA+B,GAAK,OAQ/C,aAAM,sBAAsBL,CAAgB,CAA5C,kCAMH,KAAgB,KAAO,eAGvB,KAAO,SAAW,GAMlB,KAAO,QAAU,GAdjB,WAA2B,QAAyB,CAChD,MAAO,CAACE,EAAQC,CAAW,CAC/B,CAcU,aAAoB,CACrB,KAAK,WACN,KAAK,cACL,KAAK,cAAgB,KAAK,gBAAkB,MAAQ,OAAS,MAE7D,KAAK,cAAgB,MAEzB,KAAK,cACD,IAAI,YAAgC,SAAU,CAC1C,QAAS,GACT,OAAQ,CACJ,cAAe,KAAK,cACpB,QAAS,KAAK,OAClB,CACJ,CAAC,CACL,EACJ,CAEmB,QAAyB,CACxC,MAAMG,EAAgB,KAAK,UAAY,CAAC,CAAC,KAAK,cAC9C,OAAOR;AAAA,cACDQ,EACIR;AAAA;AAAA;AAAA;AAAA,oBAKAC,CAAO;AAAA;AAAA,SAGrB,CAEmB,aAAaQ,EAA+B,CAC3D,MAAM,aAAaA,CAAO,EAC1B,KAAK,iBAAiB,QAAS,KAAK,WAAW,CACnD,CAEmB,OAAOA,EAA+B,CACjDA,EAAQ,IAAI,eAAe,GAC3B,KAAK,aAAa,YAAaH,EAAc,KAAK,aAAa,CAAC,EAEhEG,EAAQ,IAAI,UAAU,IACtB,KAAK,SAAW,KAAK,SAAW,EAAI,IAExC,MAAM,OAAOA,CAAO,CACxB,CACJ,CAzDoBC,EAAA,CADfP,EAAS,CAAE,QAAS,EAAK,CAAC,GALlB,cAMO,oBAGTO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARjC,cASF,wBAGAO,EAAA,CADNP,EAAS,CAAE,QAAS,GAAM,UAAW,gBAAiB,CAAC,GAX/C,cAYF,6BAGAO,EAAA,CADNP,EAAS,CAAE,UAAW,UAAW,CAAC,GAd1B,cAeF",
|
|
6
6
|
"names": ["html", "nothing", "SpectrumElement", "property", "styles", "arrowStyles", "ariaSortValue", "sortDirection", "visiblySorted", "changes", "__decorateClass"]
|
|
7
7
|
}
|
package/src/TableRow.dev.js
CHANGED
|
@@ -6,8 +6,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
6
6
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7
7
|
if (decorator = decorators[i])
|
|
8
8
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9
|
-
if (kind && result)
|
|
10
|
-
__defProp(target, key, result);
|
|
9
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
10
|
return result;
|
|
12
11
|
};
|
|
13
12
|
import {
|
|
@@ -59,8 +58,7 @@ export class TableRow extends SpectrumElement {
|
|
|
59
58
|
this.removeAttribute("aria-selected");
|
|
60
59
|
}
|
|
61
60
|
const [checkboxCell] = this.checkboxCells;
|
|
62
|
-
if (!checkboxCell)
|
|
63
|
-
return;
|
|
61
|
+
if (!checkboxCell) return;
|
|
64
62
|
checkboxCell.checked = this.selected;
|
|
65
63
|
}
|
|
66
64
|
handleClick(event) {
|
|
@@ -70,8 +68,7 @@ export class TableRow extends SpectrumElement {
|
|
|
70
68
|
return;
|
|
71
69
|
}
|
|
72
70
|
const [checkboxCell] = this.checkboxCells;
|
|
73
|
-
if (!checkboxCell)
|
|
74
|
-
return;
|
|
71
|
+
if (!checkboxCell) return;
|
|
75
72
|
checkboxCell.click();
|
|
76
73
|
}
|
|
77
74
|
render() {
|
package/src/TableRow.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["TableRow.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedElements,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-row.css.js';\nimport { TableCheckboxCell } from './TableCheckboxCell.dev.js'\n\n/**\n * @element sp-table-row\n *\n * @fires sorted - Announces that `selected` of the table row has changed\n */\nexport class TableRow extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @queryAssignedElements({\n selector: 'sp-table-checkbox-cell',\n flatten: true,\n })\n checkboxCells!: TableCheckboxCell[];\n\n @property({ reflect: true })\n public role = 'row';\n\n @property({ type: Boolean })\n public selectable = false;\n\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n @property({ type: String })\n public value = '';\n\n protected async handleChange(\n event: Event & { target: TableCheckboxCell }\n ): Promise<void> {\n if (!event.target.checkbox) {\n return;\n }\n\n this.selected = event.target.checkbox.checked;\n\n await 0;\n\n if (event.defaultPrevented) {\n this.selected = !this.selected;\n }\n }\n\n protected handleSlotchange({\n target,\n }: Event & { target: HTMLSlotElement }): void {\n const assignedElements = target.assignedElements();\n this.selectable = !!assignedElements.find(\n (el) => el.localName === 'sp-table-checkbox-cell'\n );\n }\n\n protected async manageSelected(): Promise<void> {\n await this.updateComplete;\n // Manage differently when parent table does not have `role=\"grid\"`.\n // See: https://github.com/adobe/spectrum-web-components/issues/3397 and https://github.com/adobe/spectrum-web-components/issues/3395\n if (this.selectable) {\n this.setAttribute(\n 'aria-selected',\n this.selected ? 'true' : 'false'\n );\n } else {\n this.removeAttribute('aria-selected');\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) return;\n checkboxCell.checked = this.selected;\n }\n\n protected handleClick(event: Event): void {\n if (\n event\n .composedPath()\n .find(\n (node) =>\n (node as HTMLElement).localName ===\n 'sp-table-checkbox-cell'\n )\n ) {\n return;\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) /* c8 ignore next */ return;\n checkboxCell.click();\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot\n @change=${this.handleChange}\n @slotchange=${this.handleSlotchange}\n ></slot>\n `;\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (changed.has('selected')) {\n this.manageSelected();\n }\n if (changed.has('selectable')) {\n if (this.selectable) {\n this.addEventListener('click', this.handleClick);\n } else {\n this.removeEventListener('click', this.handleClick);\n }\n }\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedElements,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-row.css.js';\nimport { TableCheckboxCell } from './TableCheckboxCell.dev.js'\n\n/**\n * @element sp-table-row\n *\n * @fires sorted - Announces that `selected` of the table row has changed\n */\nexport class TableRow extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @queryAssignedElements({\n selector: 'sp-table-checkbox-cell',\n flatten: true,\n })\n checkboxCells!: TableCheckboxCell[];\n\n @property({ reflect: true })\n public override role = 'row';\n\n @property({ type: Boolean })\n public selectable = false;\n\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n @property({ type: String })\n public value = '';\n\n protected async handleChange(\n event: Event & { target: TableCheckboxCell }\n ): Promise<void> {\n if (!event.target.checkbox) {\n return;\n }\n\n this.selected = event.target.checkbox.checked;\n\n await 0;\n\n if (event.defaultPrevented) {\n this.selected = !this.selected;\n }\n }\n\n protected handleSlotchange({\n target,\n }: Event & { target: HTMLSlotElement }): void {\n const assignedElements = target.assignedElements();\n this.selectable = !!assignedElements.find(\n (el) => el.localName === 'sp-table-checkbox-cell'\n );\n }\n\n protected async manageSelected(): Promise<void> {\n await this.updateComplete;\n // Manage differently when parent table does not have `role=\"grid\"`.\n // See: https://github.com/adobe/spectrum-web-components/issues/3397 and https://github.com/adobe/spectrum-web-components/issues/3395\n if (this.selectable) {\n this.setAttribute(\n 'aria-selected',\n this.selected ? 'true' : 'false'\n );\n } else {\n this.removeAttribute('aria-selected');\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) return;\n checkboxCell.checked = this.selected;\n }\n\n protected handleClick(event: Event): void {\n if (\n event\n .composedPath()\n .find(\n (node) =>\n (node as HTMLElement).localName ===\n 'sp-table-checkbox-cell'\n )\n ) {\n return;\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) /* c8 ignore next */ return;\n checkboxCell.click();\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot\n @change=${this.handleChange}\n @slotchange=${this.handleSlotchange}\n ></slot>\n `;\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (changed.has('selected')) {\n this.manageSelected();\n }\n if (changed.has('selectable')) {\n if (this.selectable) {\n this.addEventListener('click', this.handleClick);\n } else {\n this.removeEventListener('click', this.handleClick);\n }\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAWA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,OAAO,YAAY;AAQZ,aAAM,iBAAiB,gBAAgB;AAAA,EAAvC;AAAA;AAYH,SAAgB,OAAO;AAGvB,SAAO,aAAa;AAGpB,SAAO,WAAW;AAGlB,SAAO,QAAQ;AAAA;AAAA,EApBf,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAoBA,MAAgB,aACZ,OACa;AACb,QAAI,CAAC,MAAM,OAAO,UAAU;AACxB;AAAA,IACJ;AAEA,SAAK,WAAW,MAAM,OAAO,SAAS;AAEtC,UAAM;AAEN,QAAI,MAAM,kBAAkB;AACxB,WAAK,WAAW,CAAC,KAAK;AAAA,IAC1B;AAAA,EACJ;AAAA,EAEU,iBAAiB;AAAA,IACvB;AAAA,EACJ,GAA8C;AAC1C,UAAM,mBAAmB,OAAO,iBAAiB;AACjD,SAAK,aAAa,CAAC,CAAC,iBAAiB;AAAA,MACjC,CAAC,OAAO,GAAG,cAAc;AAAA,IAC7B;AAAA,EACJ;AAAA,EAEA,MAAgB,iBAAgC;AAC5C,UAAM,KAAK;AAGX,QAAI,KAAK,YAAY;AACjB,WAAK;AAAA,QACD;AAAA,QACA,KAAK,WAAW,SAAS;AAAA,MAC7B;AAAA,IACJ,OAAO;AACH,WAAK,gBAAgB,eAAe;AAAA,IACxC;AACA,UAAM,CAAC,YAAY,IAAI,KAAK;AAC5B,QAAI,CAAC,aAAc;AACnB,iBAAa,UAAU,KAAK;AAAA,EAChC;AAAA,EAEU,YAAY,OAAoB;AACtC,QACI,MACK,aAAa,EACb;AAAA,MACG,CAAC,SACI,KAAqB,cACtB;AAAA,IACR,GACN;AACE;AAAA,IACJ;AACA,UAAM,CAAC,YAAY,IAAI,KAAK;AAC5B,QAAI,CAAC,aAAmC;AACxC,iBAAa,MAAM;AAAA,EACvB;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA,0BAEW,KAAK,YAAY;AAAA,8BACb,KAAK,gBAAgB;AAAA;AAAA;AAAA,EAG/C;AAAA,EAEmB,WAAW,SAAqC;AAC/D,QAAI,QAAQ,IAAI,UAAU,GAAG;AACzB,WAAK,eAAe;AAAA,IACxB;AACA,QAAI,QAAQ,IAAI,YAAY,GAAG;AAC3B,UAAI,KAAK,YAAY;AACjB,aAAK,iBAAiB,SAAS,KAAK,WAAW;AAAA,MACnD,OAAO;AACH,aAAK,oBAAoB,SAAS,KAAK,WAAW;AAAA,MACtD;AAAA,IACJ;AAAA,EACJ;AACJ;AA9FI;AAAA,EAJC,sBAAsB;AAAA,IACnB,UAAU;AAAA,IACV,SAAS;AAAA,EACb,CAAC;AAAA,GARQ,SAST;AAGgB;AAAA,EADf,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAXlB,SAYO;AAGT;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GAdlB,SAeF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAjBjC,SAkBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GApBjB,SAqBF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/TableRow.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var
|
|
1
|
+
"use strict";var h=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var s=(i,c,e,l)=>{for(var t=l>1?void 0:l?d(c,e):c,a=i.length-1,o;a>=0;a--)(o=i[a])&&(t=(l?o(c,e,t):o(t))||t);return l&&t&&h(c,e,t),t};import{html as n,SpectrumElement as p}from"@spectrum-web-components/base";import{property as r,queryAssignedElements as m}from"@spectrum-web-components/base/src/decorators.js";import u from"./table-row.css.js";export class TableRow extends p{constructor(){super(...arguments);this.role="row";this.selectable=!1;this.selected=!1;this.value=""}static get styles(){return[u]}async handleChange(e){e.target.checkbox&&(this.selected=e.target.checkbox.checked,await 0,e.defaultPrevented&&(this.selected=!this.selected))}handleSlotchange({target:e}){const l=e.assignedElements();this.selectable=!!l.find(t=>t.localName==="sp-table-checkbox-cell")}async manageSelected(){await this.updateComplete,this.selectable?this.setAttribute("aria-selected",this.selected?"true":"false"):this.removeAttribute("aria-selected");const[e]=this.checkboxCells;e&&(e.checked=this.selected)}handleClick(e){if(e.composedPath().find(t=>t.localName==="sp-table-checkbox-cell"))return;const[l]=this.checkboxCells;l&&l.click()}render(){return n`
|
|
2
2
|
<slot
|
|
3
3
|
@change=${this.handleChange}
|
|
4
4
|
@slotchange=${this.handleSlotchange}
|
package/src/TableRow.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["TableRow.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedElements,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-row.css.js';\nimport { TableCheckboxCell } from './TableCheckboxCell.js';\n\n/**\n * @element sp-table-row\n *\n * @fires sorted - Announces that `selected` of the table row has changed\n */\nexport class TableRow extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @queryAssignedElements({\n selector: 'sp-table-checkbox-cell',\n flatten: true,\n })\n checkboxCells!: TableCheckboxCell[];\n\n @property({ reflect: true })\n public role = 'row';\n\n @property({ type: Boolean })\n public selectable = false;\n\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n @property({ type: String })\n public value = '';\n\n protected async handleChange(\n event: Event & { target: TableCheckboxCell }\n ): Promise<void> {\n if (!event.target.checkbox) {\n return;\n }\n\n this.selected = event.target.checkbox.checked;\n\n await 0;\n\n if (event.defaultPrevented) {\n this.selected = !this.selected;\n }\n }\n\n protected handleSlotchange({\n target,\n }: Event & { target: HTMLSlotElement }): void {\n const assignedElements = target.assignedElements();\n this.selectable = !!assignedElements.find(\n (el) => el.localName === 'sp-table-checkbox-cell'\n );\n }\n\n protected async manageSelected(): Promise<void> {\n await this.updateComplete;\n // Manage differently when parent table does not have `role=\"grid\"`.\n // See: https://github.com/adobe/spectrum-web-components/issues/3397 and https://github.com/adobe/spectrum-web-components/issues/3395\n if (this.selectable) {\n this.setAttribute(\n 'aria-selected',\n this.selected ? 'true' : 'false'\n );\n } else {\n this.removeAttribute('aria-selected');\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) return;\n checkboxCell.checked = this.selected;\n }\n\n protected handleClick(event: Event): void {\n if (\n event\n .composedPath()\n .find(\n (node) =>\n (node as HTMLElement).localName ===\n 'sp-table-checkbox-cell'\n )\n ) {\n return;\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) /* c8 ignore next */ return;\n checkboxCell.click();\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot\n @change=${this.handleChange}\n @slotchange=${this.handleSlotchange}\n ></slot>\n `;\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (changed.has('selected')) {\n this.manageSelected();\n }\n if (changed.has('selectable')) {\n if (this.selectable) {\n this.addEventListener('click', this.handleClick);\n } else {\n this.removeEventListener('click', this.handleClick);\n }\n }\n }\n}\n"],
|
|
5
|
-
"mappings": "qNAWA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OACI,YAAAC,EACA,yBAAAC,MACG,kDACP,OAAOC,MAAY,qBAQZ,aAAM,iBAAiBH,CAAgB,CAAvC,kCAYH,
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedElements,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-row.css.js';\nimport { TableCheckboxCell } from './TableCheckboxCell.js';\n\n/**\n * @element sp-table-row\n *\n * @fires sorted - Announces that `selected` of the table row has changed\n */\nexport class TableRow extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @queryAssignedElements({\n selector: 'sp-table-checkbox-cell',\n flatten: true,\n })\n checkboxCells!: TableCheckboxCell[];\n\n @property({ reflect: true })\n public override role = 'row';\n\n @property({ type: Boolean })\n public selectable = false;\n\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n @property({ type: String })\n public value = '';\n\n protected async handleChange(\n event: Event & { target: TableCheckboxCell }\n ): Promise<void> {\n if (!event.target.checkbox) {\n return;\n }\n\n this.selected = event.target.checkbox.checked;\n\n await 0;\n\n if (event.defaultPrevented) {\n this.selected = !this.selected;\n }\n }\n\n protected handleSlotchange({\n target,\n }: Event & { target: HTMLSlotElement }): void {\n const assignedElements = target.assignedElements();\n this.selectable = !!assignedElements.find(\n (el) => el.localName === 'sp-table-checkbox-cell'\n );\n }\n\n protected async manageSelected(): Promise<void> {\n await this.updateComplete;\n // Manage differently when parent table does not have `role=\"grid\"`.\n // See: https://github.com/adobe/spectrum-web-components/issues/3397 and https://github.com/adobe/spectrum-web-components/issues/3395\n if (this.selectable) {\n this.setAttribute(\n 'aria-selected',\n this.selected ? 'true' : 'false'\n );\n } else {\n this.removeAttribute('aria-selected');\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) return;\n checkboxCell.checked = this.selected;\n }\n\n protected handleClick(event: Event): void {\n if (\n event\n .composedPath()\n .find(\n (node) =>\n (node as HTMLElement).localName ===\n 'sp-table-checkbox-cell'\n )\n ) {\n return;\n }\n const [checkboxCell] = this.checkboxCells;\n if (!checkboxCell) /* c8 ignore next */ return;\n checkboxCell.click();\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot\n @change=${this.handleChange}\n @slotchange=${this.handleSlotchange}\n ></slot>\n `;\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (changed.has('selected')) {\n this.manageSelected();\n }\n if (changed.has('selectable')) {\n if (this.selectable) {\n this.addEventListener('click', this.handleClick);\n } else {\n this.removeEventListener('click', this.handleClick);\n }\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAWA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OACI,YAAAC,EACA,yBAAAC,MACG,kDACP,OAAOC,MAAY,qBAQZ,aAAM,iBAAiBH,CAAgB,CAAvC,kCAYH,KAAgB,KAAO,MAGvB,KAAO,WAAa,GAGpB,KAAO,SAAW,GAGlB,KAAO,MAAQ,GApBf,WAA2B,QAAyB,CAChD,MAAO,CAACG,CAAM,CAClB,CAoBA,MAAgB,aACZC,EACa,CACRA,EAAM,OAAO,WAIlB,KAAK,SAAWA,EAAM,OAAO,SAAS,QAEtC,KAAM,GAEFA,EAAM,mBACN,KAAK,SAAW,CAAC,KAAK,UAE9B,CAEU,iBAAiB,CACvB,OAAAC,CACJ,EAA8C,CAC1C,MAAMC,EAAmBD,EAAO,iBAAiB,EACjD,KAAK,WAAa,CAAC,CAACC,EAAiB,KAChCC,GAAOA,EAAG,YAAc,wBAC7B,CACJ,CAEA,MAAgB,gBAAgC,CAC5C,MAAM,KAAK,eAGP,KAAK,WACL,KAAK,aACD,gBACA,KAAK,SAAW,OAAS,OAC7B,EAEA,KAAK,gBAAgB,eAAe,EAExC,KAAM,CAACC,CAAY,EAAI,KAAK,cACvBA,IACLA,EAAa,QAAU,KAAK,SAChC,CAEU,YAAYJ,EAAoB,CACtC,GACIA,EACK,aAAa,EACb,KACIK,GACIA,EAAqB,YACtB,wBACR,EAEJ,OAEJ,KAAM,CAACD,CAAY,EAAI,KAAK,cACvBA,GACLA,EAAa,MAAM,CACvB,CAEmB,QAAyB,CACxC,OAAOT;AAAA;AAAA,0BAEW,KAAK,YAAY;AAAA,8BACb,KAAK,gBAAgB;AAAA;AAAA,SAG/C,CAEmB,WAAWW,EAAqC,CAC3DA,EAAQ,IAAI,UAAU,GACtB,KAAK,eAAe,EAEpBA,EAAQ,IAAI,YAAY,IACpB,KAAK,WACL,KAAK,iBAAiB,QAAS,KAAK,WAAW,EAE/C,KAAK,oBAAoB,QAAS,KAAK,WAAW,EAG9D,CACJ,CA9FIC,EAAA,CAJCT,EAAsB,CACnB,SAAU,yBACV,QAAS,EACb,CAAC,GARQ,SAST,6BAGgBS,EAAA,CADfV,EAAS,CAAE,QAAS,EAAK,CAAC,GAXlB,SAYO,oBAGTU,EAAA,CADNV,EAAS,CAAE,KAAM,OAAQ,CAAC,GAdlB,SAeF,0BAGAU,EAAA,CADNV,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAjBjC,SAkBF,wBAGAU,EAAA,CADNV,EAAS,CAAE,KAAM,MAAO,CAAC,GApBjB,SAqBF",
|
|
6
6
|
"names": ["html", "SpectrumElement", "property", "queryAssignedElements", "styles", "event", "target", "assignedElements", "el", "checkboxCell", "node", "changed", "__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
|
-
@media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host(:focus-visible)
|
|
4
|
+
@media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}.divider{border-inline-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)))}:host{display:table-cell}.spectrum-Table-cell--collapsible{padding-block:0;padding-inline-start:calc(var(--spectrum-table-row-tier,0px)*var(--spectrum-table-collapsible-tier-indent))}
|
|
5
5
|
`;
|
|
6
6
|
export default styles;
|
|
7
7
|
//# sourceMappingURL=spectrum-table-cell.css.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-table-cell.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host(:focus-visible)
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}.divider{border-inline-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)))}:host{display:table-cell}.spectrum-Table-cell--collapsible{padding-block:0;padding-inline-start:calc(var(--spectrum-table-row-tier,0px)*var(--spectrum-table-collapsible-tier-indent))}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";import{css as t}from"@spectrum-web-components/base";const e=t`
|
|
2
|
-
@media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host(:focus-visible)
|
|
2
|
+
@media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}.divider{border-inline-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)))}:host{display:table-cell}.spectrum-Table-cell--collapsible{padding-block:0;padding-inline-start:calc(var(--spectrum-table-row-tier,0px)*var(--spectrum-table-collapsible-tier-indent))}
|
|
3
3
|
`;export default e;
|
|
4
4
|
//# sourceMappingURL=spectrum-table-cell.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-table-cell.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host(:focus-visible)
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{forced-color-adjust:none}}:host([align=center]){text-align:center}:host([align=end]){text-align:end}:host{border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)));position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}.divider{border-inline-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)))}:host{display:table-cell}.spectrum-Table-cell--collapsible{padding-block:0;padding-inline-start:calc(var(--spectrum-table-row-tier,0px)*var(--spectrum-table-collapsible-tier-indent))}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,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
|
-
@media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])
|
|
4
|
+
@media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])[focused]),:host(:not([head-cell]):focus-visible),:host([head-cell][focused]),:host([head-cell]:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host(:host){inline-size:var(--spectrum-checkbox-control-size-small);padding-block:0;padding-inline-end:calc(var(--mod-table-checkbox-to-text,var(--spectrum-table-checkbox-to-text)) - var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)))}:host(:host) sp-checkbox{--mod-checkbox-spacing:0px;min-block-size:0}:host(:host:not([head-cell])) sp-checkbox{margin-block-start:calc(var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing))}:host(:host[head-cell]) sp-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host(:not([head-cell])),:host([head-cell]){display:table-cell}
|
|
5
5
|
`;
|
|
6
6
|
export default styles;
|
|
7
7
|
//# sourceMappingURL=spectrum-table-checkbox-cell.css.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-table-checkbox-cell.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])[focused]),:host(:not([head-cell]):focus-visible),:host([head-cell][focused]),:host([head-cell]:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host(:host){inline-size:var(--spectrum-checkbox-control-size-small);padding-block:0;padding-inline-end:calc(var(--mod-table-checkbox-to-text,var(--spectrum-table-checkbox-to-text)) - var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)))}:host(:host) sp-checkbox{--mod-checkbox-spacing:0px;min-block-size:0}:host(:host:not([head-cell])) sp-checkbox{margin-block-start:calc(var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing))}:host(:host[head-cell]) sp-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host(:not([head-cell])),:host([head-cell]){display:table-cell}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";import{css as e}from"@spectrum-web-components/base";const t=e`
|
|
2
|
-
@media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])
|
|
2
|
+
@media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])[focused]),:host(:not([head-cell]):focus-visible),:host([head-cell][focused]),:host([head-cell]:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host(:host){inline-size:var(--spectrum-checkbox-control-size-small);padding-block:0;padding-inline-end:calc(var(--mod-table-checkbox-to-text,var(--spectrum-table-checkbox-to-text)) - var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)))}:host(:host) sp-checkbox{--mod-checkbox-spacing:0px;min-block-size:0}:host(:host:not([head-cell])) sp-checkbox{margin-block-start:calc(var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing))}:host(:host[head-cell]) sp-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host(:not([head-cell])),:host([head-cell]){display:table-cell}
|
|
3
3
|
`;export default t;
|
|
4
4
|
//# sourceMappingURL=spectrum-table-checkbox-cell.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-table-checkbox-cell.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host(:not([head-cell])){forced-color-adjust:none}}:host([head-cell]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}:host(:not([head-cell])){border-block-start:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-divider-color,var(--mod-table-divider-color,var(--spectrum-table-divider-color)));box-sizing:border-box;font-size:var(--mod-table-row-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-row-font-weight,var(--spectrum-table-row-font-weight));line-height:var(--mod-table-row-line-height,var(--spectrum-table-row-line-height));vertical-align:var(--mod-table-default-vertical-align,var(--spectrum-table-default-vertical-align));color:var(--highcontrast-table-row-text-color,var(--mod-table-row-text-color,var(--spectrum-table-row-text-color)));background-color:var(--spectrum-table-cell-background-color);block-size:var(--mod-table-min-row-height,var(--spectrum-table-min-row-height));padding-block-start:calc(var(--mod-table-row-top-to-text,var(--spectrum-table-row-top-to-text)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));padding-block-end:var(--mod-table-row-bottom-to-text,var(--spectrum-table-row-bottom-to-text));padding-inline:calc(var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)) - var(--mod-table-outer-border-inline-width,var(--spectrum-table-outer-border-inline-width)))}:host(:not([head-cell])),:host([head-cell]){position:relative}:host(:not([head-cell])[focused]),:host(:not([head-cell]):focus-visible),:host([head-cell][focused]),:host([head-cell]:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host(:host){inline-size:var(--spectrum-checkbox-control-size-small);padding-block:0;padding-inline-end:calc(var(--mod-table-checkbox-to-text,var(--spectrum-table-checkbox-to-text)) - var(--mod-table-edge-to-content,var(--spectrum-table-edge-to-content)))}:host(:host) sp-checkbox{--mod-checkbox-spacing:0px;min-block-size:0}:host(:host:not([head-cell])) sp-checkbox{margin-block-start:calc(var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-row-checkbox-block-spacing,var(--spectrum-table-row-checkbox-block-spacing))}:host(:host[head-cell]) sp-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host(:not([head-cell])),:host([head-cell]){display:table-cell}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,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
|
-
.sortedIcon{vertical-align:
|
|
4
|
+
.sortedIcon{vertical-align:initial;transition:transform var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;margin-inline-start:var(--mod-table-sort-icon-inline-start-spacing,0);margin-inline-end:var(--mod-table-sort-icon-inline-end-spacing,var(--mod-table-icon-to-text,var(--spectrum-table-icon-to-text)));display:none}:host{--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}.spectrum-Table-menuIcon,.sortedIcon{color:var(--spectrum-table-icon-color)}:host([sortable]){cursor:var(--mod-table-cursor-header-sortable,pointer)}:host([sortable][active]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-active,var(--spectrum-table-icon-color-active)))}:host([sortable]:focus){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus,var(--spectrum-table-icon-color-focus)))}:host([sortable]) .is-keyboardFocused,:host([sortable]:focus-visible){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-key-focus,var(--spectrum-table-icon-color-key-focus)))}:host([sort-direction=asc]) .sortedIcon,:host([sort-direction=desc]) .sortedIcon{display:inline-block}:host([sort-direction=asc]) .sortedIcon{transform:rotate(-90deg)}:host{position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host .spectrum-Table-checkboxCell .spectrum-Table-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host{display:table-cell}:host .spectrum-Table-scroller{border-block-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-border-color,var(--mod-table-border-color,var(--spectrum-table-border-color)))}@media (hover:hover){:host([sortable]:hover){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-hover,var(--spectrum-table-icon-color-hover)))}:host([sortable]:focus):hover{--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus-hover,var(--spectrum-table-icon-color-focus-hover)))}}
|
|
5
5
|
`;
|
|
6
6
|
export default styles;
|
|
7
7
|
//# sourceMappingURL=spectrum-table-head-cell.css.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-table-head-cell.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 .sortedIcon{vertical-align:
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 .sortedIcon{vertical-align:initial;transition:transform var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;margin-inline-start:var(--mod-table-sort-icon-inline-start-spacing,0);margin-inline-end:var(--mod-table-sort-icon-inline-end-spacing,var(--mod-table-icon-to-text,var(--spectrum-table-icon-to-text)));display:none}:host{--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}.spectrum-Table-menuIcon,.sortedIcon{color:var(--spectrum-table-icon-color)}:host([sortable]){cursor:var(--mod-table-cursor-header-sortable,pointer)}:host([sortable][active]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-active,var(--spectrum-table-icon-color-active)))}:host([sortable]:focus){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus,var(--spectrum-table-icon-color-focus)))}:host([sortable]) .is-keyboardFocused,:host([sortable]:focus-visible){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-key-focus,var(--spectrum-table-icon-color-key-focus)))}:host([sort-direction=asc]) .sortedIcon,:host([sort-direction=desc]) .sortedIcon{display:inline-block}:host([sort-direction=asc]) .sortedIcon{transform:rotate(-90deg)}:host{position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host .spectrum-Table-checkboxCell .spectrum-Table-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host{display:table-cell}:host .spectrum-Table-scroller{border-block-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-border-color,var(--mod-table-border-color,var(--spectrum-table-border-color)))}@media (hover:hover){:host([sortable]:hover){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-hover,var(--spectrum-table-icon-color-hover)))}:host([sortable]:focus):hover{--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus-hover,var(--spectrum-table-icon-color-focus-hover)))}}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";import{css as o}from"@spectrum-web-components/base";const t=o`
|
|
2
|
-
.sortedIcon{vertical-align:
|
|
2
|
+
.sortedIcon{vertical-align:initial;transition:transform var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;margin-inline-start:var(--mod-table-sort-icon-inline-start-spacing,0);margin-inline-end:var(--mod-table-sort-icon-inline-end-spacing,var(--mod-table-icon-to-text,var(--spectrum-table-icon-to-text)));display:none}:host{--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}.spectrum-Table-menuIcon,.sortedIcon{color:var(--spectrum-table-icon-color)}:host([sortable]){cursor:var(--mod-table-cursor-header-sortable,pointer)}:host([sortable][active]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-active,var(--spectrum-table-icon-color-active)))}:host([sortable]:focus){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus,var(--spectrum-table-icon-color-focus)))}:host([sortable]) .is-keyboardFocused,:host([sortable]:focus-visible){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-key-focus,var(--spectrum-table-icon-color-key-focus)))}:host([sort-direction=asc]) .sortedIcon,:host([sort-direction=desc]) .sortedIcon{display:inline-block}:host([sort-direction=asc]) .sortedIcon{transform:rotate(-90deg)}:host{position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host .spectrum-Table-checkboxCell .spectrum-Table-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host{display:table-cell}:host .spectrum-Table-scroller{border-block-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-border-color,var(--mod-table-border-color,var(--spectrum-table-border-color)))}@media (hover:hover){:host([sortable]:hover){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-hover,var(--spectrum-table-icon-color-hover)))}:host([sortable]:focus):hover{--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus-hover,var(--spectrum-table-icon-color-focus-hover)))}}
|
|
3
3
|
`;export default t;
|
|
4
4
|
//# sourceMappingURL=spectrum-table-head-cell.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-table-head-cell.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 .sortedIcon{vertical-align:
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 .sortedIcon{vertical-align:initial;transition:transform var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;margin-inline-start:var(--mod-table-sort-icon-inline-start-spacing,0);margin-inline-end:var(--mod-table-sort-icon-inline-end-spacing,var(--mod-table-icon-to-text,var(--spectrum-table-icon-to-text)));display:none}:host{--spectrum-table-icon-color:var(--highcontrast-table-icon-color,var(--mod-table-icon-color-default,var(--spectrum-table-icon-color-default)));box-sizing:border-box;text-align:start;vertical-align:var(--mod-table-header-vertical-align,var(--spectrum-table-header-vertical-align));font-family:var(--mod-table-header-font-family,var(--spectrum-table-row-font-family));font-size:var(--mod-table-header-font-size,var(--spectrum-table-row-font-size));font-weight:var(--mod-table-header-font-weight,var(--spectrum-table-header-font-weight));line-height:var(--mod-table-header-line-height,var(--spectrum-table-row-line-height));text-transform:var(--mod-table-header-text-transform,none);block-size:var(--mod-table-min-header-height,var(--spectrum-table-min-header-height));padding-block:var(--mod-table-header-top-to-text,var(--spectrum-table-header-top-to-text))var(--mod-table-header-bottom-to-text,var(--spectrum-table-header-bottom-to-text));padding-inline:var(--mod-table-cell-inline-space,var(--spectrum-table-cell-inline-space));color:var(--mod-table-header-text-color,var(--spectrum-table-header-text-color));background-color:var(--mod-table-header-background-color,var(--spectrum-table-header-background-color));transition:color var(--highcontrast-table-transition-duration,var(--mod-table-transition-duration,var(--spectrum-table-transition-duration)))ease-in-out;cursor:var(--mod-table-cursor-header-default,initial);border-radius:0;outline:0}.spectrum-Table-menuIcon,.sortedIcon{color:var(--spectrum-table-icon-color)}:host([sortable]){cursor:var(--mod-table-cursor-header-sortable,pointer)}:host([sortable][active]){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-active,var(--spectrum-table-icon-color-active)))}:host([sortable]:focus){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus,var(--spectrum-table-icon-color-focus)))}:host([sortable]) .is-keyboardFocused,:host([sortable]:focus-visible){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-key-focus,var(--spectrum-table-icon-color-key-focus)))}:host([sort-direction=asc]) .sortedIcon,:host([sort-direction=desc]) .sortedIcon{display:inline-block}:host([sort-direction=asc]) .sortedIcon{transform:rotate(-90deg)}:host{position:relative}:host([focused]),:host(:focus-visible){outline-width:var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness));outline-style:solid;outline-color:var(--highcontrast-table-cell-focus-indicator-color,var(--highcontrast-table-focus-indicator-color,var(--mod-table-focus-indicator-color,var(--spectrum-table-focus-indicator-color))));outline-offset:calc(var(--mod-table-focus-indicator-thickness,var(--spectrum-table-focus-indicator-thickness))*-1 - var(--highcontrast-table-cell-focus-extra-offset,0px))}:host .spectrum-Table-checkboxCell .spectrum-Table-checkbox{margin-block-start:calc(var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing)) - var(--mod-table-border-width,var(--spectrum-table-border-width)));margin-block-end:var(--mod-table-header-checkbox-block-spacing,var(--spectrum-table-header-checkbox-block-spacing))}:host{display:table-cell}:host .spectrum-Table-scroller{border-block-end:var(--mod-table-border-width,var(--spectrum-table-border-width))solid var(--highcontrast-table-border-color,var(--mod-table-border-color,var(--spectrum-table-border-color)))}@media (hover:hover){:host([sortable]:hover){--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-hover,var(--spectrum-table-icon-color-hover)))}:host([sortable]:focus):hover{--spectrum-table-icon-color:var(--highcontrast-table-icon-color-focus,var(--mod-table-icon-color-focus-hover,var(--spectrum-table-icon-color-focus-hover)))}}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|