diff --git a/docs/css-parts.html b/docs/css-parts.html index c48a7bfb..1a71cd62 100644 --- a/docs/css-parts.html +++ b/docs/css-parts.html @@ -269,6 +269,13 @@

CSS Parts

+ Tab Panels + + + tab-panel, tab-btn, tab-btn-row, tab-content + + + Checkboxes/ Toggles diff --git a/src/components/api-request.js b/src/components/api-request.js index 85d10b4c..1b6a5486 100644 --- a/src/components/api-request.js +++ b/src/components/api-request.js @@ -438,19 +438,19 @@ export default class ApiRequest extends LitElement { ` : paramSchema.type === 'object' ? html` -
-
+
- - + +
- ${html`
+ ${html`
` } - ${html`
+ ${html`
-
- - +
+
+ +
- ${html`
${reqBodyExampleHtml}
`} - ${html`
${reqBodySchemaHtml}
`} + ${html`
${reqBodyExampleHtml}
`} + ${html`
${reqBodySchemaHtml}
`}
` : html` ${reqBodyFileInputHtml} @@ -821,7 +821,7 @@ export default class ApiRequest extends LitElement { ); return html` -
+
-
-
+
- - + + ${this.showCurlBeforeTry === 'true' ? '' - : html``} + : html``}
${this.responseIsBlob ? html` -
+
${this.responseBlobType === 'image' ? html`` : '' @@ -1082,12 +1082,12 @@ export default class ApiRequest extends LitElement { }
` : html` -
+
${responseContent}
` } -
+
${unsafeHTML(Prism.highlight(this.responseHeaders, Prism.languages.css, 'css'))}
diff --git a/src/components/api-response.js b/src/components/api-response.js index 82179055..5cc8daf2 100644 --- a/src/components/api-response.js +++ b/src/components/api-response.js @@ -181,10 +181,10 @@ export default class ApiResponse extends LitElement { ${Object.keys(this.mimeResponsesForEachStatus[status]).length === 0 ? '' : html` -
-
- - +
+
+ +
${Object.keys(this.mimeResponsesForEachStatus[status]).length === 1 ? html` ${Object.keys(this.mimeResponsesForEachStatus[status])[0]} ` @@ -192,10 +192,10 @@ export default class ApiResponse extends LitElement { }
${this.activeSchemaTab === 'example' - ? html`
+ ? html`
${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[status][this.selectedMimeType])}
` - : html`
+ : html`
${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[status][this.selectedMimeType])}
` } diff --git a/src/templates/callback-template.js b/src/templates/callback-template.js index dfd4d66e..ae75113f 100644 --- a/src/templates/callback-template.js +++ b/src/templates/callback-template.js @@ -40,6 +40,7 @@ export default function callbackTemplate(callbacks) { schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : 'true'}" fetch-credentials = "${this.fetchCredentials}" exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp, + tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content, file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" > @@ -58,7 +59,8 @@ export default function callbackTemplate(callbacks) { schema-hide-read-only = "${this.schemaHideReadOnly === 'never' ? 'false' : 'true'}" schema-hide-write-only = "false" exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy, - schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" + tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content, + schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" >
diff --git a/src/templates/code-samples-template.js b/src/templates/code-samples-template.js index c1312a30..65ed8151 100644 --- a/src/templates/code-samples-template.js +++ b/src/templates/code-samples-template.js @@ -7,7 +7,7 @@ import { copyToClipboard } from '~/utils/common-utils'; export default function codeSamplesTemplate(xCodeSamples) { return html`
CODE SAMPLES
-
-
- ${xCodeSamples.map((v, i) => html``)} +
+ ${xCodeSamples.map((v, i) => html``)}
${xCodeSamples.map((v, i) => html`
diff --git a/src/templates/endpoint-template.js b/src/templates/endpoint-template.js index 67063944..9bf6602d 100644 --- a/src/templates/endpoint-template.js +++ b/src/templates/endpoint-template.js @@ -155,6 +155,7 @@ function endpointBodyTemplate(path) { schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'true' : 'false'}" fetch-credentials = "${this.fetchCredentials}" exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp, + tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content, file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" > @@ -177,8 +178,9 @@ function endpointBodyTemplate(path) { schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'false' : 'true'}" selected-status = "${Object.keys(path.responses || {})[0] || ''}" exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input, - textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp, - schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" + textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp, + tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content, + schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" >
`; diff --git a/src/templates/expanded-endpoint-template.js b/src/templates/expanded-endpoint-template.js index 51a4d7ca..38e4e0c0 100644 --- a/src/templates/expanded-endpoint-template.js +++ b/src/templates/expanded-endpoint-template.js @@ -143,6 +143,7 @@ export function expandedEndpointBodyTemplate(path, tagName = '', tagDescription schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'true' : 'false'}" fetch-credentials = "${this.fetchCredentials}" exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp, + tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content, file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" > @@ -164,7 +165,8 @@ export function expandedEndpointBodyTemplate(path, tagName = '', tagDescription schema-hide-write-only = "${this.schemaHideWriteOnly === 'never' ? 'false' : path.isWebhook ? 'false' : 'true'}" selected-status = "${Object.keys(path.responses || {})[0] || ''}" exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy, - schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" + tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content, + schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle" >