Skip to content

Commit

Permalink
Merge pull request #1331 from db-ui/refactor-run-prettier-on-the-code…
Browse files Browse the repository at this point in the history
…base

refactor: running prettier on the codebase
  • Loading branch information
mfranzke authored Jul 26, 2023
2 parents 12afa4d + 5aebed5 commit df3143e
Show file tree
Hide file tree
Showing 47 changed files with 88 additions and 75 deletions.
2 changes: 1 addition & 1 deletion packages/components/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
16 changes: 8 additions & 8 deletions packages/components/src/components/alert/alert.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { onMount, Show, useMetadata, useStore } from "@builder.io/mitosis";
import { DBAlertProps, DBAlertState } from "./model";
import { DBIcon } from "../icon";
import { DefaultVariantsIcon } from "../../shared/model";
import { DBButton } from "../button";
import { DBLink } from "../link";
import { DEFAULT_CLOSE_BUTTON } from "../../shared/constants";
import { cls } from "../../utils";
import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import { DBAlertProps, DBAlertState } from './model';
import { DBIcon } from '../icon';
import { DefaultVariantsIcon } from '../../shared/model';
import { DBButton } from '../button';
import { DBLink } from '../link';
import { DEFAULT_CLOSE_BUTTON } from '../../shared/constants';
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/alert/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
7 changes: 3 additions & 4 deletions packages/components/src/components/brand/brand.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ useMetadata({
{
name: 'imgSrc',
type: 'SingleLine.URL',
defaultValue: 'https://ppassets.azureedge.net/assets/images/db_logo.svg'
defaultValue:
'https://ppassets.azureedge.net/assets/images/db_logo.svg'
},
{
name: 'imgAlt',
Expand Down Expand Up @@ -71,9 +72,7 @@ export default function DBBrand(props: DBBrandProps) {
</Show>

<a
href={
props.anchorRef ?? state.defaultValues.anchorRef
}
href={props.anchorRef ?? state.defaultValues.anchorRef}
title={props.anchorTitle}
rel={props.anchorRelation}>
<Show when={!props.hideDefaultAsset}>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/brand/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/button/button.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import type { DBButtonProps, DBButtonState } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/button/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/card/card.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import type { DBCardState, DBCardProps } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/card/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { DBCheckboxProps, DBCheckboxState } from './model';
import { uuid } from '../../utils';
import { DEFAULT_ID } from '../../shared/constants';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/checkbox/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@builder.io/mitosis';
import { DBCodeDocsProps, DBCodeDocsState } from './model';
import { DBCard } from '../card';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import { DBDividerState, DBDividerProps } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/divider/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/drawer/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/header/header.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
useStore
} from '@builder.io/mitosis';
import { DBHeaderState, DBHeaderProps } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/header/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
7 changes: 2 additions & 5 deletions packages/components/src/components/icon/icon.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import type { DBIconState, DBIconProps } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down Expand Up @@ -34,10 +34,7 @@ export default function DBIcon(props: DBIconProps) {
return (
<span
ref={component}
class={cls(
'db-icon',
props.className
)}
class={cls('db-icon', props.className)}
data-icon={props.icon}
aria-hidden="true"
title={props.title}>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/icon/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/infotext/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import { DBIcon } from '../icon';
import { DBInfotextState, DBInfotextProps } from './model';
import { DefaultVariantsIcon } from '../../shared/model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/input/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/input/input.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ export default function DBInput(props: DBInputProps) {
name={props.name}
type={props.type || 'text'}
placeholder={
props.placeholder ??
state.defaultValues.placeholder
props.placeholder ?? state.defaultValues.placeholder
}
aria-labelledby={state._id + '-label'}
disabled={props.disabled}
Expand Down
17 changes: 10 additions & 7 deletions packages/components/src/components/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
) {
$transformScale: -1.25;

transition: opacity 0.08s, transform 0.15s;
transition:
opacity 0.08s,
transform 0.15s;
opacity: var(--db-input-focus-opacity);

// add 0.1em to adjust label with input padding-inline-start
Expand Down Expand Up @@ -229,12 +231,13 @@
&:not(:placeholder-shown) {
// move filled text for expressive and regular to center with focused label
padding-block: calc(
var(--db-spacing-fixed-xs) + 0.25em *
var(--db-input-focus-opacity)
) calc(
$db-spacing-fixed-xs - var(--db-input-focus-opacity) *
$db-spacing-fixed-xs
);
var(--db-spacing-fixed-xs) + 0.25em *
var(--db-input-focus-opacity)
)
calc(
$db-spacing-fixed-xs - var(--db-input-focus-opacity) *
$db-spacing-fixed-xs
);

+ label {
@include label-focus-animation();
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/link/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/link/link.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import { DBLinkState, DBLinkProps } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: false,
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/components/link/link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
text-decoration-thickness: to-rem($pxValue: 1);

// Changing color on hover should be animated by a transition
transition: outline 0.06s, color $db-transition-color;
transition:
outline 0.06s,
color $db-transition-color;

a {
// Workaround for angular
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useStore
} from '@builder.io/mitosis';
import { DBNavigationItemProps, DBNavigationItemState } from './model';
import { cls, uuid } from "../../utils";
import { cls, uuid } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/page/page.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
useStore
} from '@builder.io/mitosis';
import { DBPageProps, DBPageState } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/radio/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/radio/radio.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { DBRadioProps, DBRadioState } from './model';
import { uuid } from '../../utils';
import { DEFAULT_ID } from '../../shared/constants';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/section/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import { DBSectionState, DBSectionProps } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/select/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
9 changes: 7 additions & 2 deletions packages/components/src/components/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@
label {
@extend %db-body-2xs;
inset-block-start: $db-spacing-fixed-2xs;
transition: left, top, font-size 0.2s $db-transition-functional-timing;
transition:
left,
top,
font-size 0.2s $db-transition-functional-timing;
inset-inline-start: calc(
var(--has-before) * ($db-sizing-md - $db-spacing-fixed-sm) +
$db-spacing-fixed-sm
Expand All @@ -109,7 +112,9 @@
&::after,
&::before,
.icon-state {
inset-block-start: calc(var(--db-base-font-size) * var(--db-base-line-height) / 2);
inset-block-start: calc(
var(--db-base-font-size) * var(--db-base-line-height) / 2
);
}

&::before {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { For, onMount, Show, useMetadata, useStore } from '@builder.io/mitosis';
import { DBTab } from '../tab';
import type { DBTabProps } from '../tab/model';
import type { DBTabBarState, DBTabBarProps } from './model';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/tab/tab.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { DEFAULT_ID } from '../../shared/constants';
import type { DBTabState, DBTabProps } from './model';
import { uuid } from '../../utils';
import { cls } from "../../utils";
import { cls } from '../../utils';

useMetadata({
isAttachedToShadowDom: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/tag/docs/Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

### sizes

| Before | Status | After | Description |
| ------- | :----: | :---: | ------------------------------------------------------------------------------------------------------------------ |
| Before | Status | After | Description |
| ------- | :----: | :---: | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `small` ||| We removed small tags because of tonality. But you can use `type` property with value `strong` to emphasize a tag for a differentiation. |

### variants
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/tag/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/components/tag/tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
block-size: $db-sizing-sm;
min-inline-size: $db-sizing-sm;
inline-size: fit-content;
transition: background-color $db-transition-color,
transition:
background-color $db-transition-color,
color $db-transition-color;

&:not(&[data-interactive="true"]) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/test/playwright/boilerplate/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Loading

0 comments on commit df3143e

Please sign in to comment.