Skip to content

Commit

Permalink
Fix formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anicyne committed Mar 13, 2024
1 parent ccfcb5a commit 4c0972b
Show file tree
Hide file tree
Showing 86 changed files with 177 additions and 184 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class InputIconController extends InputController implements Watches {
beforePatch: beforePatchIcons,
},
required: true,
},
}
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/abbr/test/html.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getAbbrHtml = (props: AbbrProps): string => {
_label: '', // ⚠ required
_tooltipAlign: 'top',
},
props,
props
);
return `
<kol-abbr class="kol-abbr">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ executeTests<AbbrProps>(
getAbbrHtml,
{
execMode: 'default', // ready
},
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ export const getAccordionHtml = (
slots: {
default?: string;
footer?: string;
} = {},
} = {}
): string => {
props = mixMembers(
{
_label: '', // ⚠ required
_level: 1,
},
props,
props
);
return `<kol-accordion${props._open ? ' _open' : ''} class="kol-accordion">
<mock:shadow-root>
Expand All @@ -37,10 +37,10 @@ export const getAccordionHtml = (
_label: props._label,
},
undefined,
' class="accordion-button kol-button-wc" slot="expert"',
' class="accordion-button kol-button-wc" slot="expert"'
)}`,
},
` class="accordion-heading kol-heading-wc"`,
` class="accordion-heading kol-heading-wc"`
)}
<div class="wrapper">
<div class="animation-wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ executeTests<AccordionProps>(
getAccordionHtml,
{
execMode: 'default', // ready
},
}
);
6 changes: 3 additions & 3 deletions packages/components/src/components/alert/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class KolAlertWc implements AlertAPI {
'_on',
{
onClose: (value as KoliBriAlertEventCallbacks).onClose,
},
}
// {
// afterPatch: (value: unknown) => {
// this._hasCloser = this.validateOnValue(value);
Expand All @@ -210,7 +210,7 @@ export class KolAlertWc implements AlertAPI {
'_type',
(value?) => typeof value === 'string' && alertTypeOptions.includes(value),
new Set(`String {${alertTypeOptions.join(', ')}`),
value,
value
);
}

Expand All @@ -221,7 +221,7 @@ export class KolAlertWc implements AlertAPI {
'_variant',
(value?) => typeof value === 'string' && alertVariantOptions.includes(value),
new Set(`AlertVariant {${alertVariantOptions.join(', ')}`),
value,
value
);
}

Expand Down
40 changes: 20 additions & 20 deletions packages/components/src/components/alert/test/html.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const getAlertHtml = (props: AlertProps, innerHTML = '', additionalHTML =
{
_level: 1,
},
props,
props
);
const type: string = props._type !== undefined ? props._type : 'default';
props._type = props._type || 'default';
Expand All @@ -26,26 +26,26 @@ export const getAlertHtml = (props: AlertProps, innerHTML = '', additionalHTML =
props._label !== undefined
? ''
: props._type === 'success'
? 'kol-success'
: props._type === 'error'
? 'kol-error'
: props._type === 'warning'
? 'kol-warning'
: props._type === 'info'
? 'kol-info'
: 'kol-message',
? 'kol-success'
: props._type === 'error'
? 'kol-error'
: props._type === 'warning'
? 'kol-warning'
: props._type === 'info'
? 'kol-info'
: 'kol-message',
_icons:
props._type === 'success'
? 'codicon codicon-pass'
: props._type === 'error'
? 'codicon codicon-error'
: props._type === 'warning'
? 'codicon codicon-warning'
: props._type === 'info'
? 'codicon codicon-info'
: 'codicon codicon-comment',
? 'codicon codicon-error'
: props._type === 'warning'
? 'codicon codicon-warning'
: props._type === 'info'
? 'codicon codicon-info'
: 'codicon codicon-comment',
},
` class="heading-icon kol-icon"`,
` class="heading-icon kol-icon"`
)}
<div class="heading-content">
${
Expand All @@ -58,8 +58,8 @@ export const getAlertHtml = (props: AlertProps, innerHTML = '', additionalHTML =
{
expert: props._label,
},
` class="kol-heading-wc"`,
)
` class="kol-heading-wc"`
)
: ''
}
${
Expand All @@ -84,8 +84,8 @@ export const getAlertHtml = (props: AlertProps, innerHTML = '', additionalHTML =
_tooltipAlign: 'left',
},
{},
` class="close"`,
)
` class="close"`
)
: ''
}
</div>${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ executeTests<AlertProps>(
getAlertHtml,
{
needTimers: true,
},
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getAvatarHtml = (props: AvatarProps): string => {
_src: '',
_label: '', // ⚠ required
},
props,
props
);

return `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ executeTests<AvatarProps>(
_label: ['Erika Maria Mustermann', `Erika`],
_src: [`/example-image.jpg`],
},
getAvatarHtml,
getAvatarHtml
);
2 changes: 1 addition & 1 deletion packages/components/src/components/badge/test/html.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const getBadgeHtml = (props: BadgeProps, options?: SpanOptions): string =
foregroundColor: '#fff',
},
},
props,
props
);

state._color = handleColorChange(props._color || '#000');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ executeTests<BadgeProps>(
(props) => getBadgeHtml(props),
{
execMode: 'default', // ready
},
}
);
10 changes: 5 additions & 5 deletions packages/components/src/components/breadcrumb/test/html.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const getBreadcrumbHtml = (props: BreadcrumbProps): string => {
_label: '', // ⚠ required
_links: [],
},
props,
props
);

const lastIndex = state._links.length - 1;
Expand All @@ -24,7 +24,7 @@ export const getBreadcrumbHtml = (props: BreadcrumbProps): string => {
? getIconHtml({
_label: '',
_icons: 'codicon codicon-chevron-right',
})
})
: ''
}
${
Expand All @@ -34,9 +34,9 @@ export const getBreadcrumbHtml = (props: BreadcrumbProps): string => {
? getIconHtml({
_label: link._label,
_icons: link._icons as AnyIconFontClass,
})
})
: link._label
}</span>`
}</span>`
: getLinkHtml(link)
}
</li>
Expand All @@ -53,7 +53,7 @@ export const getBreadcrumbHtml = (props: BreadcrumbProps): string => {
? `<li>${getIconHtml({
_label: '',
_icons: 'codicon codicon-home',
})}…</li>`
})}…</li>`
: ''
}
${list}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ executeTests<BreadcrumbProps>(
getBreadcrumbHtml,
{
execMode: 'default', // ready
},
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ executeTests<ButtonGroupProps>(
getButtonGroupHtml,
{
execMode: 'default',
},
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const getButtonLinkHtml = (props: ButtonLinkProps): string => {
_type: 'button',
_variant: 'normal',
},
props,
props
);

return `<kol-button-link class="kol-button-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ executeTests<ButtonLinkProps>(
{
_label: [`Beschreibung`],
},
getButtonLinkHtml,
getButtonLinkHtml
);
12 changes: 6 additions & 6 deletions packages/components/src/components/button/test/html.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const getButtonWcHtml = (
slots: Slots = {
expert: undefined,
},
additionalAttrs = '',
additionalAttrs = ''
): string => {
const state = mixMembers<ButtonProps, ButtonStates>(
{
Expand All @@ -27,7 +27,7 @@ export const getButtonWcHtml = (
_type: 'button',
_variant: 'normal',
},
props,
props
);
const ariaControls = typeof state._ariaControls === 'string' ? state._ariaControls : undefined;
const ariaExpanded = typeof state._ariaExpanded === 'boolean' ? state._ariaExpanded : undefined;
Expand Down Expand Up @@ -56,15 +56,15 @@ export const getButtonWcHtml = (
_label: state._label,
},
slots,
{ additionalClassNames: ['button-inner', 'kol-span-wc'] },
{ additionalClassNames: ['button-inner', 'kol-span-wc'] }
)}
</button>
${getTooltipHtml(
{
_align: state._tooltipAlign,
_label: state._label,
},
` aria-hidden="true"${hasExpertSlot || !state._hideLabel ? ' hidden' : ''}`,
` aria-hidden="true"${hasExpertSlot || !state._hideLabel ? ' hidden' : ''}`
)}
</kol-button-wc>`;
};
Expand All @@ -77,7 +77,7 @@ export const getButtonHtml = (props: ButtonProps): string => {
_type: 'button',
_variant: 'normal',
},
props,
props
);
return `<kol-button class="kol-button">
<mock:shadow-root>
Expand All @@ -86,7 +86,7 @@ export const getButtonHtml = (props: ButtonProps): string => {
{
expert: `<slot name="expert" slot="expert"></slot>`,
},
` class="kol-button-wc button ${state._variant}"`,
` class="kol-button-wc button ${state._variant}"`
)}
</mock:shadow-root>
</kol-button>`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ executeTests<ButtonProps>(
_label: ['Label'],
_variant: ['primary', 'secondary', 'normal', 'danger', 'ghost'],
},
getButtonHtml,
getButtonHtml
);
8 changes: 4 additions & 4 deletions packages/components/src/components/card/test/html.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getCardHtml = (props: CardProps): string => {
{
_label: '', // ⚠ required
},
props,
props
);
return `<kol-card class="kol-card">
<mock:shadow-root>
Expand All @@ -24,7 +24,7 @@ export const getCardHtml = (props: CardProps): string => {
{
expert: '',
},
` class="kol-heading-wc"`,
` class="kol-heading-wc"`
)}
</div>
<div class="content">
Expand All @@ -44,8 +44,8 @@ export const getCardHtml = (props: CardProps): string => {
_tooltipAlign: 'left',
},
undefined,
' class=" kol-button-wc close"',
)
' class=" kol-button-wc close"'
)
: ``
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ executeTests<CardProps>(
getCardHtml,
{
execMode: 'default', // ready
},
}
);
Loading

0 comments on commit 4c0972b

Please sign in to comment.