editor.css000064400000003071150212215240006537 0ustar00.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{ height:auto; } .wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{ width:auto; } .wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{ word-break:break-word; } .wp-block[data-align=center]>.wp-block-table{ text-align:initial; } .wp-block[data-align=center]>.wp-block-table table{ margin:0 auto; } .wp-block-table td,.wp-block-table th{ border:1px solid; padding:.5em; } .wp-block-table td.is-selected,.wp-block-table th.is-selected{ border-color:var(--wp-admin-theme-color); border-style:double; box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{ border:1px solid; } .blocks-table__placeholder-form.blocks-table__placeholder-form{ align-items:flex-start; display:flex; flex-direction:column; gap:8px; } @media (min-width:782px){ .blocks-table__placeholder-form.blocks-table__placeholder-form{ align-items:flex-end; flex-direction:row; } } .blocks-table__placeholder-input{ width:112px; }editor.min.css000064400000002727150212215240007330 0ustar00.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column;gap:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}}.blocks-table__placeholder-input{width:112px}style.css000064400000007724150212215240006422 0ustar00.wp-block-table{ overflow-x:auto; } .wp-block-table table{ border-collapse:collapse; width:100%; } .wp-block-table thead{ border-bottom:3px solid; } .wp-block-table tfoot{ border-top:3px solid; } .wp-block-table td,.wp-block-table th{ border:1px solid; padding:.5em; } .wp-block-table .has-fixed-layout{ table-layout:fixed; width:100%; } .wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{ word-break:break-word; } .wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{ display:table; width:auto; } .wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{ word-break:break-word; } .wp-block-table .has-subtle-light-gray-background-color{ background-color:#f3f4f5; } .wp-block-table .has-subtle-pale-green-background-color{ background-color:#e9fbe5; } .wp-block-table .has-subtle-pale-blue-background-color{ background-color:#e7f5fe; } .wp-block-table .has-subtle-pale-pink-background-color{ background-color:#fcf0ef; } .wp-block-table.is-style-stripes{ background-color:initial; border-bottom:1px solid #f0f0f0; border-collapse:inherit; border-spacing:0; } .wp-block-table.is-style-stripes tbody tr:nth-child(odd){ background-color:#f0f0f0; } .wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){ background-color:#f3f4f5; } .wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){ background-color:#e9fbe5; } .wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){ background-color:#e7f5fe; } .wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){ background-color:#fcf0ef; } .wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{ border-color:#0000; } .wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{ border-color:inherit; } .wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{ border-top-color:inherit; } .wp-block-table table[style*=border-top-color] tr:not(:first-child){ border-top-color:initial; } .wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{ border-right-color:inherit; } .wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{ border-bottom-color:inherit; } .wp-block-table table[style*=border-bottom-color] tr:not(:last-child){ border-bottom-color:initial; } .wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{ border-left-color:inherit; } .wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{ border-style:inherit; } .wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{ border-style:inherit; border-width:inherit; }style.min.css000064400000007417150212215240007203 0ustar00.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit}style-rtl.css000064400000007724150212215240007221 0ustar00.wp-block-table{ overflow-x:auto; } .wp-block-table table{ border-collapse:collapse; width:100%; } .wp-block-table thead{ border-bottom:3px solid; } .wp-block-table tfoot{ border-top:3px solid; } .wp-block-table td,.wp-block-table th{ border:1px solid; padding:.5em; } .wp-block-table .has-fixed-layout{ table-layout:fixed; width:100%; } .wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{ word-break:break-word; } .wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{ display:table; width:auto; } .wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{ word-break:break-word; } .wp-block-table .has-subtle-light-gray-background-color{ background-color:#f3f4f5; } .wp-block-table .has-subtle-pale-green-background-color{ background-color:#e9fbe5; } .wp-block-table .has-subtle-pale-blue-background-color{ background-color:#e7f5fe; } .wp-block-table .has-subtle-pale-pink-background-color{ background-color:#fcf0ef; } .wp-block-table.is-style-stripes{ background-color:initial; border-bottom:1px solid #f0f0f0; border-collapse:inherit; border-spacing:0; } .wp-block-table.is-style-stripes tbody tr:nth-child(odd){ background-color:#f0f0f0; } .wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){ background-color:#f3f4f5; } .wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){ background-color:#e9fbe5; } .wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){ background-color:#e7f5fe; } .wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){ background-color:#fcf0ef; } .wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{ border-color:#0000; } .wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{ border-color:inherit; } .wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{ border-top-color:inherit; } .wp-block-table table[style*=border-top-color] tr:not(:first-child){ border-top-color:initial; } .wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{ border-left-color:inherit; } .wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{ border-bottom-color:inherit; } .wp-block-table table[style*=border-bottom-color] tr:not(:last-child){ border-bottom-color:initial; } .wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{ border-right-color:inherit; } .wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{ border-style:inherit; } .wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{ border-style:inherit; border-width:inherit; }block.json000064400000010470150212215240006525 0ustar00{ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "core/table", "title": "Table", "category": "text", "description": "Create structured content in rows and columns to display information.", "textdomain": "default", "attributes": { "hasFixedLayout": { "type": "boolean", "default": true }, "caption": { "type": "rich-text", "source": "rich-text", "selector": "figcaption" }, "head": { "type": "array", "default": [], "source": "query", "selector": "thead tr", "query": { "cells": { "type": "array", "default": [], "source": "query", "selector": "td,th", "query": { "content": { "type": "rich-text", "source": "rich-text" }, "tag": { "type": "string", "default": "td", "source": "tag" }, "scope": { "type": "string", "source": "attribute", "attribute": "scope" }, "align": { "type": "string", "source": "attribute", "attribute": "data-align" }, "colspan": { "type": "string", "source": "attribute", "attribute": "colspan" }, "rowspan": { "type": "string", "source": "attribute", "attribute": "rowspan" } } } } }, "body": { "type": "array", "default": [], "source": "query", "selector": "tbody tr", "query": { "cells": { "type": "array", "default": [], "source": "query", "selector": "td,th", "query": { "content": { "type": "rich-text", "source": "rich-text" }, "tag": { "type": "string", "default": "td", "source": "tag" }, "scope": { "type": "string", "source": "attribute", "attribute": "scope" }, "align": { "type": "string", "source": "attribute", "attribute": "data-align" }, "colspan": { "type": "string", "source": "attribute", "attribute": "colspan" }, "rowspan": { "type": "string", "source": "attribute", "attribute": "rowspan" } } } } }, "foot": { "type": "array", "default": [], "source": "query", "selector": "tfoot tr", "query": { "cells": { "type": "array", "default": [], "source": "query", "selector": "td,th", "query": { "content": { "type": "rich-text", "source": "rich-text" }, "tag": { "type": "string", "default": "td", "source": "tag" }, "scope": { "type": "string", "source": "attribute", "attribute": "scope" }, "align": { "type": "string", "source": "attribute", "attribute": "data-align" }, "colspan": { "type": "string", "source": "attribute", "attribute": "colspan" }, "rowspan": { "type": "string", "source": "attribute", "attribute": "rowspan" } } } } } }, "supports": { "anchor": true, "align": true, "color": { "__experimentalSkipSerialization": true, "gradients": true, "__experimentalDefaultControls": { "background": true, "text": true } }, "spacing": { "margin": true, "padding": true, "__experimentalDefaultControls": { "margin": false, "padding": false } }, "typography": { "fontSize": true, "lineHeight": true, "__experimentalFontFamily": true, "__experimentalFontStyle": true, "__experimentalFontWeight": true, "__experimentalLetterSpacing": true, "__experimentalTextTransform": true, "__experimentalTextDecoration": true, "__experimentalDefaultControls": { "fontSize": true } }, "__experimentalBorder": { "__experimentalSkipSerialization": true, "color": true, "style": true, "width": true, "__experimentalDefaultControls": { "color": true, "style": true, "width": true } }, "interactivity": { "clientNavigation": true } }, "selectors": { "root": ".wp-block-table > table", "spacing": ".wp-block-table" }, "styles": [ { "name": "regular", "label": "Default", "isDefault": true }, { "name": "stripes", "label": "Stripes" } ], "editorStyle": "wp-block-table-editor", "style": "wp-block-table" } theme-rtl.min.css000064400000000350150212215240007731 0ustar00.wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table :where(figcaption){color:#ffffffa6}editor-rtl.min.css000064400000002727150212215240010127 0ustar00.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column;gap:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}}.blocks-table__placeholder-input{width:112px}editor-rtl.css000064400000003071150212215240007336 0ustar00.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{ height:auto; } .wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{ width:auto; } .wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{ word-break:break-word; } .wp-block[data-align=center]>.wp-block-table{ text-align:initial; } .wp-block[data-align=center]>.wp-block-table table{ margin:0 auto; } .wp-block-table td,.wp-block-table th{ border:1px solid; padding:.5em; } .wp-block-table td.is-selected,.wp-block-table th.is-selected{ border-color:var(--wp-admin-theme-color); border-style:double; box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{ border:1px solid; } .blocks-table__placeholder-form.blocks-table__placeholder-form{ align-items:flex-start; display:flex; flex-direction:column; gap:8px; } @media (min-width:782px){ .blocks-table__placeholder-form.blocks-table__placeholder-form{ align-items:flex-end; flex-direction:row; } } .blocks-table__placeholder-input{ width:112px; }theme.css000064400000000405150212215240006351 0ustar00.wp-block-table{ margin:0 0 1em; } .wp-block-table td,.wp-block-table th{ word-break:normal; } .wp-block-table :where(figcaption){ color:#555; font-size:13px; text-align:center; } .is-dark-theme .wp-block-table :where(figcaption){ color:#ffffffa6; }style-rtl.min.css000064400000007417150212215240010002 0ustar00.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit}theme-rtl.css000064400000000405150212215240007150 0ustar00.wp-block-table{ margin:0 0 1em; } .wp-block-table td,.wp-block-table th{ word-break:normal; } .wp-block-table :where(figcaption){ color:#555; font-size:13px; text-align:center; } .is-dark-theme .wp-block-table :where(figcaption){ color:#ffffffa6; }theme.min.css000064400000000350150212215240007132 0ustar00.wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table :where(figcaption){color:#ffffffa6}build/index.php000064400000000034150212463150007457 0ustar00 array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-server-side-render', 'wp-shortcode'), 'version' => '1c73b075950049289e13'); build/index.js000064400000012353150212463150007313 0ustar00(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var s in r)e.o(r,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:r[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,r=window.wp.shortcode;var s=e.n(r);const a=JSON.parse('{"UU":"tablepress/table"}'),l=e=>{let t=Object.entries(e.named).map((([e,t])=>{let r="";return t=t.replace(/“([^”]*)”/g,"$1"),(/\s/.test(t)||""===t)&&(r='"'),t.includes('"')&&(r="'"),`${e}=${r}${t}${r}`})).join(" ");return e.numeric.forEach((e=>{/\s/.test(e)?t+=' "'+e+'"':t+=" "+e})),t},n=e=>{delete e.named.id;let t=l(e);return t=t.replace(/=“([^”]*)”/g,'="$1"'),t=t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll("[","[").replaceAll("]","]"),t},o=e=>{let r=s().next(tp.table.shortcode,e).shortcode.attrs;r={named:{...r.named},numeric:[...r.numeric]};const l=r.named.id,o=n(r);return(0,t.createBlock)(a.UU,{id:l,parameters:o})},i={from:[{type:"shortcode",tag:tp.table.shortcode,attributes:{id:{type:"string",shortcode:({named:{id:e=""}})=>e},parameters:{type:"string",shortcode:e=>(e={named:{...e.named},numeric:[...e.numeric]},n(e))}}},{type:"enter",regExp:s().regexp(tp.table.shortcode),transform:({content:e})=>o(e)},{type:"block",blocks:["core/shortcode"],transform:({text:e})=>o(e),isMatch:({text:e})=>void 0!==s().next(tp.table.shortcode,e),isMultiBlock:!1}],to:[{type:"block",blocks:["core/shortcode"],transform:({id:e,parameters:r})=>{""!==(r=r.trim())&&(r=(r+=" ").replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll("[","[").replaceAll("]","]"));const s=`[${tp.table.shortcode} id=${e} ${r}/]`;return(0,t.createBlock)("core/shortcode",{text:s})}}]},c=window.wp.i18n,p=window.wp.serverSideRender;var d=e.n(p);const b=window.wp.blockEditor,h=window.wp.components,m=window.wp.primitives,u=window.ReactJSXRuntime,x=(0,u.jsxs)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-32 -32 64 64",fill:"#50575e",children:[(0,u.jsx)(m.Path,{d:"M0-25.854h-25.854v51.708h51.708V0H21v21h-42v-42H0Z"}),(0,u.jsx)(m.Path,{d:"M-18-18h10v10h-10zM-18-5h10V5h-10zM-5-5H5V5H-5zM-18 8h10v10h-10zM-5 8H5v10H-5zM8 8h10v10H8zM5-31h6.18v6.18H5zM19-25h6.18v6.18H19zM0-15h3.82v3.82H0zM10-20h3.82v3.82H10zM25-12h3.82v3.82H25zM8-13h10v10H8z"})]}),w=Object.entries(tp.tables).map((([e,t])=>({value:e,label:(0,c.sprintf)((0,c.__)("ID %1$s: “%2$s”","tablepress"),e,t)}))),_=function(){return""!==tp.url&&(0,u.jsx)(h.ExternalLink,{href:tp.url,children:(0,c.__)("Manage your tables.","tablepress")})},v=window.wp.element;let g=null;const j=Object.keys(tp.tables);j.length&&(g={attributes:{id:j[Math.floor(Math.random()*j.length)],parameters:""}});const f=g;(0,t.registerBlockType)(a.UU,{transforms:i,edit:({attributes:e,setAttributes:t})=>{const r=(0,b.useBlockProps)();let n;if(e.id&&tp.tables.hasOwnProperty(e.id))n=(0,u.jsxs)("div",{...r,children:[tp.load_block_preview&&(0,u.jsx)(d(),{block:a.UU,attributes:{id:e.id,parameters:`block_preview=true ${e.parameters}`.trim()},className:"render-wrapper"}),(0,u.jsx)("div",{className:"table-overlay",children:(0,c.sprintf)((0,c.__)("TablePress table %1$s: “%2$s”","tablepress"),e.id,tp.tables[e.id])})]});else{let t=0{null!=e||(e=""),t({id:e.replace(/[^0-9a-zA-Z-_]/g,"")})}}):(0,u.jsxs)(u.Fragment,{children:[(0,c.__)("There are no TablePress tables on this site yet.","tablepress"),""!==tp.url&&" ",(0,u.jsx)(_,{})]})})}),e.id&&tp.tables.hasOwnProperty(e.id)&&(0,u.jsx)(b.InspectorAdvancedControls,{children:(0,u.jsx)(h.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,c.__)("Configuration parameters:","tablepress"),help:(0,c.__)("These additional parameters can be used to modify specific table features.","tablepress")+" "+(0,c.__)("See the TablePress Documentation for more information.","tablepress"),value:e.parameters,onChange:e=>{e=(e=s().replace(tp.table.shortcode,e,(({attrs:e})=>(delete(e={named:{...e.named},numeric:[...e.numeric]}).named.id," "+l(e)+" ")))).replace(/=“([^”]*)”/g,'="$1"'),t({parameters:e})},onBlur:e=>{const r=e.target.value.trim();t({parameters:r})}})})]});return(0,u.jsxs)(u.Fragment,{children:[n,o]})},save:({attributes:{id:e="",parameters:t=""}})=>""===e?"":(""!==(t=t.trim())&&(t+=" "),(0,u.jsx)(v.RawHTML,{children:`[${tp.table.shortcode} id=${e} ${t}/]`})),example:f,icon:x})})();build/index.css000064400000001641150212463150007465 0ustar00.wp-block-tablepress-table>.render-wrapper{max-height:400px;min-height:64px;overflow:scroll}.wp-block-tablepress-table>.render-wrapper>.tablepress{margin:0 auto;pointer-events:none}.wp-block-tablepress-table>div>div>.render-wrapper{display:none}.wp-block-tablepress-table>div>div{margin-top:8px!important}.wp-block-tablepress-table .table-overlay{background-color:#ffffff80;box-shadow:inset 0 0 50px #ccc;box-sizing:border-box;font-weight:700;height:100%;padding:2em;top:0;width:100%}.block-editor-block-preview__content-iframe .wp-block-tablepress-table .table-overlay{display:none}.wp-block-tablepress-table .render-wrapper+.table-overlay{position:absolute}.wp-block-tablepress-table:hover .render-wrapper+.table-overlay{display:none}.wp-block-tablepress-table .components-placeholder__label{font-size:18px}.wp-block-tablepress-table-inspector-panel .components-checkbox-control__input[type=checkbox]:indeterminate{opacity:.4} index.php000064400000000034150212463150006360 0ustar00, label: }, ... ]. const ComboboxControlOptions = Object.entries( tp.tables ).map( ( [ id, name ] ) => { return { value: id, label: sprintf( __( 'ID %1$s: “%2$s”', 'tablepress' ), id, name ), }; } ); /** * Custom component for the "Manage your tables." link. */ const ManageTablesLink = function () { return ( '' !== tp.url && { __( 'Manage your tables.', 'tablepress' ) } ); } /** * The edit function describes the structure of your block in the context of the * editor. This represents what the editor will render when the block is used. * * @param {Object} params Function parameters. * @param {Object} params.attributes Block attributes. * @param {Function} params.setAttributes Function to set block attributes. * @return {Element} Element to render. */ const TablePressTableEdit = ( { attributes, setAttributes } ) => { const blockProps = useBlockProps(); let blockMarkup; if ( attributes.id && tp.tables.hasOwnProperty( attributes.id ) ) { blockMarkup = (
{ tp.load_block_preview && }
{ sprintf( __( 'TablePress table %1$s: “%2$s”', 'tablepress' ), attributes.id, tp.tables[ attributes.id ] ) }
); } else { let instructions = 0 < ComboboxControlOptions.length ? __( 'Select the TablePress table that you want to embed in the Settings sidebar.', 'tablepress' ) : __( 'There are no TablePress tables on this site yet.', 'tablepress' ); if ( attributes.id ) { // Show an error message if a table could not be found (e.g. after a table was deleted). The tp.tables.hasOwnProperty( attributes.id ) check happens above. instructions = sprintf( __( 'There is a problem: The TablePress table with the ID “%1$s” could not be found.', 'tablepress' ), attributes.id ) + ' ' + instructions; } blockMarkup = (
} label={ __( 'TablePress table', 'tablepress' ) } instructions={ instructions } >
); } const sidebarMarkup = ( <> { 0 < ComboboxControlOptions.length ? { __( 'Select the TablePress table that you want to embed.', 'tablepress' ) } { '' !== tp.url && ' ' } } value={ attributes.id } options={ ComboboxControlOptions } onChange={ ( id ) => { id ??= ''; setAttributes( { id: id.replace( /[^0-9a-zA-Z-_]/g, '' ) } ); } } /> : <> { __( 'There are no TablePress tables on this site yet.', 'tablepress' ) } { '' !== tp.url && ' ' } } { attributes.id && tp.tables.hasOwnProperty( attributes.id ) && { parameters = shortcode.replace( tp.table.shortcode, parameters, ( { attrs: shortcodeAttrs } ) => { shortcodeAttrs = { named: { ...shortcodeAttrs.named }, numeric: [ ...shortcodeAttrs.numeric ] }; // Use object destructuring to get a clone of the object. delete shortcodeAttrs.named.id; return ' ' + shortcodeAttrsToString( shortcodeAttrs ) + ' '; // Add spaces around replacement text to have separation to possibly already existing parameters. } ); parameters = parameters.replace( /=“([^”]*)”/g, '="$1"' ); // Replace curly quotation marks around a value with normal ones. setAttributes( { parameters } ); } } onBlur={ ( event ) => { const parameters = event.target.value.trim(); // Remove leading and trailing whitespace from the parameter string. setAttributes( { parameters } ); } } /> } ); return ( <> { blockMarkup } { sidebarMarkup } ); }; export default TablePressTableEdit; src/icon.jsx000064400000001300150212463150007002 0ustar00/** * JavaScript code for the TablePress table block icon in the block editor. * * @package TablePress * @subpackage Blocks * @author Tobias Bäthge * @since 3.0.0 */ /** * WordPress dependencies. */ import { SVG, Path } from '@wordpress/primitives'; const TablePressTableIcon = ( ); export default TablePressTableIcon; src/editor.scss000064400000003727150212463150007526 0ustar00/** * CSS for the TablePress table block in the block editor. * * @package TablePress * @subpackage Blocks * @author Tobias Bäthge * @since 2.0.0 */ .wp-block-tablepress-table { $parent: &; /* Limit the height of server-side render preview in the block editor. */ > .render-wrapper { overflow: scroll; min-height: 64px; max-height: 400px; > .tablepress { /* Prevent interaction with elements like links inside tables, similar to the `Disabled` component from Gutenberg. */ pointer-events: none; /* Remove the bottom margin in the block preview. */ margin: 0 auto; } } /* Hide the server-side render wrapper while it's being refreshed. */ > div > div > .render-wrapper { display: none; } /* Move the loading spinner inside the table overlay. */ > div > div { margin-top: 8px !important; /* The !important flag is necessary to overwrite an inline style. */ } /* Show an overlay on top of the table, to indicate that it's not fully shown. */ @at-root .table-overlay { #{$parent} & { box-sizing: border-box; top: 0; width: 100%; height: 100%; box-shadow: inset 0 0 50px #cccccc; background-color: rgba(255, 255, 255, 0.5); padding: 2em; font-weight: bold; /* Hide the table overlay in the block preview. */ .block-editor-block-preview__content-iframe & { display: none; } } /* Position the table overlay above the table preview once it's loaded. */ #{$parent} .render-wrapper + & { position: absolute; } /* Hide the table overlay when it's hovered while a table preview is shown. */ #{$parent}:hover .render-wrapper + & { display: none; } } /* Increase the placeholder label font size. */ .components-placeholder__label { font-size: 18px; } /* Elements inside the InspectorControls PanelBodys. */ &-inspector-panel { /* Make the indeterminate state of a checkbox lighter. */ .components-checkbox-control__input[type="checkbox"] { &:indeterminate { opacity: 0.4; } } } } src/save.js000064400000002037150212463150006630 0ustar00/** * JavaScript code for the TablePress table block in the block editor. * * @package TablePress * @subpackage Blocks * @author Tobias Bäthge * @since 2.0.0 */ /** * WordPress dependencies */ import { RawHTML } from '@wordpress/element'; /** * The save function defines the way in which the different attributes should * be combined into the final markup, which is then serialized by the block * editor into `post_content`. * * @param {Object} params Function parameters. * @param {Object} params.attributes Block attributes. * @param {string} params.attributes.id Table ID. * @param {string} params.attributes.parameters Table render attributes. * @return {Element} Element to render. */ const save = ( { attributes: { id = '', parameters = '' } } ) => { if ( '' === id ) { return ''; } parameters = parameters.trim(); if ( '' !== parameters ) { parameters += ' '; } return { `[${ tp.table.shortcode } id=${ id } ${ parameters }/]` }; }; export default save; src/index.php000064400000000034150212463150007147 0ustar00 { // Convert named attributes. let shortcodeAttrsString = Object.entries( shortcodeAttrs.named ).map( ( [ attribute, value ] ) => { let enclose = ''; // Don't enclose values by default. // Remove curly quotation marks around a value. value = value.replace( /“([^”]*)”/g, '$1' ); // Use " as delimiter if value contains whitespace or is empty. if ( /\s/.test( value ) || '' === value ) { enclose = '"'; } // Use ' as delimiter if value contains ". if ( value.includes( '"' ) ) { enclose = '\''; } return `${ attribute }=${ enclose }${ value }${ enclose }`; } ).join( ' ' ); // Convert numeric attributes. shortcodeAttrs.numeric.forEach( ( value ) => { if ( /\s/.test( value ) ) { shortcodeAttrsString += ' "' + value + '"'; } else { shortcodeAttrsString += ' ' + value; } } ); return shortcodeAttrsString; }; src/common/index.php000064400000000034150212463150010437 0ustar00 { // Remove the `id` attribute from the Shortcode parameters, as it is handled separately. delete shortcodeAttrs.named.id; let parameters = shortcodeAttrsToString( shortcodeAttrs ); // Replace curly quotation marks around a value with normal ones. parameters = parameters.replace( /=“([^”]*)”/g, '="$1"' ); // Decode HTML entities like `&`, `<`, `>`, `[`, and `]` that were encoded in the Shortcode. parameters = parameters.replaceAll( '&', '&' ).replaceAll( '<', '<' ).replaceAll( '>', '>' ).replaceAll( '[', '[' ).replaceAll( ']', ']' ); return parameters; }; /** * Converts a textual Shortcode to a TablePress table block. * * @param {string} content The Shortcode as a text string. * @return {Object} TablePress table block. */ const convertShortcodeTextToBlock = ( content ) => { let shortcodeAttrs = shortcode.next( tp.table.shortcode, content ).shortcode.attrs; shortcodeAttrs = { named: { ...shortcodeAttrs.named }, numeric: [ ...shortcodeAttrs.numeric ] }; // Use object destructuring to get a clone of the object. const id = shortcodeAttrs.named.id; const parameters = convertShortcodeAttrsToParametersString( shortcodeAttrs ); return createBlock( block.name, { id, parameters } ); }; const transforms = { from: [ // Detect table Shortcodes that are pasted into the block editor. { type: 'shortcode', tag: tp.table.shortcode, attributes: { id: { type: 'string', shortcode: ( { named: { id = '' } } ) => { return id; }, }, parameters: { type: 'string', shortcode: ( shortcodeAttrs ) => { shortcodeAttrs = { named: { ...shortcodeAttrs.named }, numeric: [ ...shortcodeAttrs.numeric ] }; // Use object destructuring to get a clone of the object. return convertShortcodeAttrsToParametersString( shortcodeAttrs ); }, }, }, }, // Detect table Shortcodes that are typed into the block editor. { type: 'enter', regExp: shortcode.regexp( tp.table.shortcode ), transform: ( { content } ) => convertShortcodeTextToBlock( content ), }, // Add conversion option from "Shortcode" to "TablePress table" block. { type: 'block', blocks: [ 'core/shortcode' ], transform: ( { text: content } ) => convertShortcodeTextToBlock( content ), isMatch: ( { text } ) => { return ( undefined !== shortcode.next( tp.table.shortcode, text ) ); }, isMultiBlock: false, }, ], to: [ // Add conversion option from "TablePress table" to "Shortcode" block. { type: 'block', blocks: [ 'core/shortcode' ], transform: ( { id, parameters } ) => { parameters = parameters.trim(); if ( '' !== parameters ) { parameters += ' '; // Encode characters that cause problems in Shortcodes, e.g. due to sanitization, like `&`, `<`, `>`, `[`, and `]` to HTML entities. parameters = parameters.replaceAll( '&', '&' ).replaceAll( '<', '<' ).replaceAll( '>', '>' ).replaceAll( '[', '[' ).replaceAll( ']', ']' ); } const text = `[${ tp.table.shortcode } id=${ id } ${ parameters }/]`; return createBlock( 'core/shortcode', { text } ); }, }, ], }; export default transforms;