From 82b799c1a4a4bbf4ab422effdc9061c1552bf77a Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Wed, 18 Dec 2024 13:05:08 -0500 Subject: [PATCH] Prettier --- scripts/build.js | 4 +++- src/components/tree-item/tree-item.ts | 8 ++++---- src/internal/default-value.ts | 2 +- src/styles/native/input.css | 22 +++++++++++----------- src/styles/themes/migration.css | 3 ++- src/styles/utilities/gap.css | 22 +++++++++++----------- 6 files changed, 32 insertions(+), 29 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 4895d54b8..1c96dfa57 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -338,7 +338,9 @@ if (isDeveloping) { filename.includes('components/') && filename.includes('.ts') && !isCssStylesheet && !isTestFile; // Re-bundle when relevant files change - if (isTestFile) { return } + if (isTestFile) { + return; + } await regenerateBundle(); diff --git a/src/components/tree-item/tree-item.ts b/src/components/tree-item/tree-item.ts index 88944dee7..0234c5656 100644 --- a/src/components/tree-item/tree-item.ts +++ b/src/components/tree-item/tree-item.ts @@ -274,10 +274,10 @@ export default class WaTreeItem extends WebAwesomeElement { aria-hidden="true" > - ${when( - this.loading, - () => html` `, - )} + ${when( + this.loading, + () => html` `, + )} diff --git a/src/internal/default-value.ts b/src/internal/default-value.ts index 1c6240a0f..72ca4bf8c 100644 --- a/src/internal/default-value.ts +++ b/src/internal/default-value.ts @@ -35,7 +35,7 @@ export const defaultValue = if (name === attributeName) { const converter = options.converter || defaultConverter; const fromAttribute = - typeof converter === 'function' ? converter : converter?.fromAttribute ?? defaultConverter.fromAttribute; + typeof converter === 'function' ? converter : (converter?.fromAttribute ?? defaultConverter.fromAttribute); const newValue: unknown = fromAttribute!(value, options.type); diff --git a/src/styles/native/input.css b/src/styles/native/input.css index c095753e3..d73ce4635 100644 --- a/src/styles/native/input.css +++ b/src/styles/native/input.css @@ -1,16 +1,16 @@ /* Exclude inputs that don't accept text, referenced in subsequent rules with :where(&) */ :not( - [type='button'], - [type='checkbox'], - [type='color'], - [type='file'], - [type='hidden'], - [type='image'], - [type='radio'], - [type='range'], - [type='reset'], - [type='submit'] - ) { + [type='button'], + [type='checkbox'], + [type='color'], + [type='file'], + [type='hidden'], + [type='image'], + [type='radio'], + [type='range'], + [type='reset'], + [type='submit'] +) { /* Set custom properties for native and WA inputs */ input:where(:not(:host input)):where(&), :host(&) { diff --git a/src/styles/themes/migration.css b/src/styles/themes/migration.css index a9bc021d7..d90cf82e1 100644 --- a/src/styles/themes/migration.css +++ b/src/styles/themes/migration.css @@ -542,7 +542,8 @@ wa-input, wa-select { - --box-shadow: var(--wa-shadow-offset-x-s) var(--wa-shadow-offset-y-s) var(--wa-shadow-blur-s) -0.08em var(--wa-color-shadow); + --box-shadow: var(--wa-shadow-offset-x-s) var(--wa-shadow-offset-y-s) var(--wa-shadow-blur-s) -0.08em + var(--wa-color-shadow); & wa-icon { color: var(--wa-color-text-quiet); } diff --git a/src/styles/utilities/gap.css b/src/styles/utilities/gap.css index 6649beef8..44fd917db 100644 --- a/src/styles/utilities/gap.css +++ b/src/styles/utilities/gap.css @@ -1,16 +1,16 @@ /* Apply Flexbox with 0 specificity to ensure a gap util produces a visible change */ :where( - .wa-gap-0, - .wa-gap-3xs, - .wa-gap-2xs, - .wa-gap-xs, - .wa-gap-s, - .wa-gap-m, - .wa-gap-l, - .wa-gap-xl, - .wa-gap-2xl, - .wa-gap-3xl - ) { + .wa-gap-0, + .wa-gap-3xs, + .wa-gap-2xs, + .wa-gap-xs, + .wa-gap-s, + .wa-gap-m, + .wa-gap-l, + .wa-gap-xl, + .wa-gap-2xl, + .wa-gap-3xl +) { display: flex; }