Skip to content

Commit

Permalink
Run Prettier
Browse files Browse the repository at this point in the history
Prettier v3 formats things slightly different.
  • Loading branch information
Windvis committed Sep 13, 2023
1 parent 495bd24 commit daa1ba3
Show file tree
Hide file tree
Showing 42 changed files with 173 additions and 111 deletions.
2 changes: 1 addition & 1 deletion addon/components/au-control-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class AuControlCheckbox extends Component {
since: {
enabled: '2.5.0',
},
}
},
);
}

Expand Down
2 changes: 1 addition & 1 deletion addon/components/au-control-radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class AuControlRadio extends Component {
since: {
enabled: '2.5.0',
},
}
},
);
}

Expand Down
4 changes: 2 additions & 2 deletions addon/components/au-date-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ function ensureIsoDate(argValue) {

assert(
`@value should be a ISO 8601 formatted date string or a Date instance but it is a "${typeof argValue}"`,
typeof argValue === 'string' || argValue instanceof Date
typeof argValue === 'string' || argValue instanceof Date,
);

if (argValue instanceof Date) {
return toIsoDateString(argValue);
} else {
assert(
`@value ("${argValue}") should be a valid ISO 8601 formatted date`,
isIsoDateString(argValue)
isIsoDateString(argValue),
);
return argValue;
}
Expand Down
16 changes: 8 additions & 8 deletions addon/components/au-date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class AuDatePickerComponent extends Component {
this.registerDuetDatePicker();

let isNewImplementation = macroCondition(
getOwnConfig().dutchDatePickerLocalization
getOwnConfig().dutchDatePickerLocalization,
)
? true
: false;
Expand All @@ -92,7 +92,7 @@ export default class AuDatePickerComponent extends Component {
since: {
enabled: '1.9.0',
},
}
},
);
}

Expand Down Expand Up @@ -161,27 +161,27 @@ export default class AuDatePickerComponent extends Component {
function validateAdapter(adapterArg) {
assert(
`The @adapter argument needs to be an object but it is a "${typeof adapterArg}"`,
Boolean(adapterArg) && typeof adapterArg === 'object'
Boolean(adapterArg) && typeof adapterArg === 'object',
);

Object.keys(adapterArg).map((key) => {
assert(
`"${key}" is not a property of adapter, maybe it is just a typo?`,
key in DEFAULT_ADAPTER
key in DEFAULT_ADAPTER,
);
});
}

function validateLocalization(localizationArg) {
assert(
`The @localization argument needs to be an object but it is a "${typeof localizationArg}"`,
Boolean(localizationArg) && typeof localizationArg === 'object'
Boolean(localizationArg) && typeof localizationArg === 'object',
);

Object.keys(localizationArg).map((key) => {
assert(
`"${key}" is not a property of localization, maybe it is just a typo?`,
key in DEFAULT_LOCALIZATION
key in DEFAULT_LOCALIZATION,
);
});
}
Expand All @@ -197,15 +197,15 @@ function asIsoDate(target, key /*, descriptor */) {

assert(
`@${key} should be a string or a Date instance but it is a "${typeof argValue}"`,
typeof argValue === 'string' || argValue instanceof Date
typeof argValue === 'string' || argValue instanceof Date,
);

if (argValue instanceof Date) {
return toIsoDateString(argValue);
} else {
assert(
`@${key} ("${argValue}") should be a valid ISO 8601 formatted date`,
isIsoDateString(argValue)
isIsoDateString(argValue),
);
return argValue;
}
Expand Down
4 changes: 2 additions & 2 deletions addon/components/au-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ export default class AuDropdown extends Component {
(element) => {
this.referenceElement = element;
},
{ eager: false }
{ eager: false },
);

arrow = modifier(
(element) => {
this.arrowElement = element;
},
{ eager: false }
{ eager: false },
);

@action
Expand Down
4 changes: 2 additions & 2 deletions addon/components/au-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class AuInput extends Component {
assert(
'<AuInput>: An `@onChange` handler was provided but that will only be called if `@mask` or `@maskOptions` is provided as well.',
!this.args.onChange ||
(typeof this.args.onChange === 'function' && this.isMasked)
(typeof this.args.onChange === 'function' && this.isMasked),
);
}

Expand Down Expand Up @@ -107,5 +107,5 @@ const InputmaskModifier = modifier(
input.inputmask.remove();
};
},
{ eager: false }
{ eager: false },
);
4 changes: 2 additions & 2 deletions addon/components/au-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class AuModal extends Component {

assert(
'au-modal: No target element was found. Please add the `<AuModalContainer />` component where appropriate.',
this.destinationElement
this.destinationElement,
);
}

Expand Down Expand Up @@ -44,7 +44,7 @@ export default class AuModal extends Component {

get additionalElements() {
return FOCUS_TRAP_ADDITIONAL_ELEMENTS.filter(
(element) => document.querySelector(element) !== null
(element) => document.querySelector(element) !== null,
);
}

Expand Down
2 changes: 1 addition & 1 deletion addon/components/au-toggle-switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class AuToggleSwitch extends Component {
since: {
enabled: '2.6.0',
},
}
},
);
}

Expand Down
2 changes: 1 addition & 1 deletion addon/modifiers/au-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export default modifier(
element[propertyName] = properties[propertyName];
}
},
{ eager: false }
{ eager: false },
);
2 changes: 1 addition & 1 deletion addon/private/helpers/link-to-models.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { assert } from '@ember/debug';
export function linkToModels([model, models]) {
assert(
'You cannot provide both the `@model` and `@models` arguments to the component.',
!model || !models
!model || !models,
);

if (model) {
Expand Down
14 changes: 7 additions & 7 deletions addon/private/modifiers/floating-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default modifier(
(
floatingElement,
[_referenceElement, _arrowElement],
{ defaultPlacement = 'bottom-start', options = {} }
{ defaultPlacement = 'bottom-start', options = {} },
) => {
const referenceElement =
typeof _referenceElement === 'string'
Expand All @@ -42,18 +42,18 @@ export default modifier(

assert(
`FloatingUI (modifier): No reference element was defined.`,
referenceElement instanceof HTMLElement
referenceElement instanceof HTMLElement,
);

assert(
`FloatingUI (modifier): The reference and floating elements cannot be the same element.`,
floatingElement !== referenceElement
floatingElement !== referenceElement,
);

assert(
`FloatingUI (modifier): @placement must start with either 'bottom' or 'top'.`,
defaultPlacement.startsWith('bottom') ||
defaultPlacement.startsWith('top')
defaultPlacement.startsWith('top'),
);

Object.assign(floatingElement.style, {
Expand All @@ -74,7 +74,7 @@ export default modifier(
arrow({
element: arrowElement,
padding: options.arrow.padding,
})
}),
);
}

Expand All @@ -85,7 +85,7 @@ export default modifier(
{
middleware,
placement: defaultPlacement,
}
},
);

Object.assign(floatingElement.style, {
Expand Down Expand Up @@ -152,5 +152,5 @@ export default modifier(
cleanup();
};
},
{ eager: false }
{ eager: false },
);
7 changes: 5 additions & 2 deletions app/styles/ember-appuniversum/_c-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ $au-button-link-icon-only-width: $au-button-link-height !default;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: color var(--au-transition), background-color var(--au-transition),
border-color var(--au-transition), box-shadow var(--au-transition);
transition:
color var(--au-transition),
background-color var(--au-transition),
border-color var(--au-transition),
box-shadow var(--au-transition);

&,
&:visited {
Expand Down
6 changes: 4 additions & 2 deletions app/styles/ember-appuniversum/_c-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ $au-card-radius: var(--au-radius) !default;

.au-c-card--shadow {
border: 0;
box-shadow: 0 1px 3px rgba($au-gray-900, 0.1),
0 4px 20px rgba($au-gray-900, 0.035), 0 1px 1px rgba($au-gray-900, 0.025);
box-shadow:
0 1px 3px rgba($au-gray-900, 0.1),
0 4px 20px rgba($au-gray-900, 0.035),
0 1px 1px rgba($au-gray-900, 0.025);
}

.au-c-card--standout {
Expand Down
4 changes: 3 additions & 1 deletion app/styles/ember-appuniversum/_c-dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ $au-dropdown-caret-size: 0.4rem !default;
z-index: var(--au-z-index-beta);
width: auto;

box-shadow: 0 0 12px rgba($au-gray-900, 0.15), 0 0 2px rgba($au-gray-900, 0.1);
box-shadow:
0 0 12px rgba($au-gray-900, 0.15),
0 0 2px rgba($au-gray-900, 0.1);
border-radius: var(--au-radius);
background-color: var(--au-white);

Expand Down
4 changes: 3 additions & 1 deletion app/styles/ember-appuniversum/_c-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ $au-link-secondary-active-color: var(--au-gray-900) !default;
gap: $au-unit-tiny;
align-items: center;
font-family: var(--au-font);
transition: color var(--au-transition), text-decoration var(--au-transition);
transition:
color var(--au-transition),
text-decoration var(--au-transition);
font-weight: var(--au-regular);
text-decoration-color: $au-link-color-underline;

Expand Down
4 changes: 3 additions & 1 deletion app/styles/ember-appuniversum/_c-list-navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ $au-list-navigation-border-color: var(--au-divider-color) !default;
display: flex;
align-items: center;
font-family: var(--au-font);
transition: color var(--au-transition), text-decoration var(--au-transition);
transition:
color var(--au-transition),
text-decoration var(--au-transition);
font-weight: var(--au-regular);
padding: $au-unit-tiny * 1.5 $au-unit-small;
text-decoration-color: var(
Expand Down
28 changes: 21 additions & 7 deletions app/styles/ember-appuniversum/_c-loader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
height: 0.4rem;
background-color: transparent;
border-radius: 50%;
box-shadow: 1rem 0 var(--au-white), 2rem 0 var(--au-white),
box-shadow:
1rem 0 var(--au-white),
2rem 0 var(--au-white),
3rem 0 var(--au-white);
animation: loader-wave infinite 1s linear;
}
Expand All @@ -46,27 +48,39 @@
0%,
100%,
60% {
box-shadow: 1rem 0 var(--au-gray-600), 2rem 0 var(--au-gray-600),
box-shadow:
1rem 0 var(--au-gray-600),
2rem 0 var(--au-gray-600),
3rem 0 var(--au-gray-600);
}
10% {
box-shadow: 1rem -0.3rem var(--au-gray-600), 2rem 0 var(--au-gray-600),
box-shadow:
1rem -0.3rem var(--au-gray-600),
2rem 0 var(--au-gray-600),
3rem 0 var(--au-gray-600);
}
20% {
box-shadow: 1rem -0.6rem var(--au-gray-600), 2rem -0.3rem var(--au-gray-600),
box-shadow:
1rem -0.6rem var(--au-gray-600),
2rem -0.3rem var(--au-gray-600),
3rem 0 var(--au-gray-600);
}
30% {
box-shadow: 1rem -0.3rem var(--au-gray-600), 2rem -0.6rem var(--au-gray-600),
box-shadow:
1rem -0.3rem var(--au-gray-600),
2rem -0.6rem var(--au-gray-600),
3rem -0.3rem var(--au-gray-600);
}
40% {
box-shadow: 1rem 0 var(--au-gray-600), 2rem -0.3rem var(--au-gray-600),
box-shadow:
1rem 0 var(--au-gray-600),
2rem -0.3rem var(--au-gray-600),
3rem -0.6rem var(--au-gray-600);
}
50% {
box-shadow: 1rem 0 var(--au-gray-600), 2rem 0 var(--au-gray-600),
box-shadow:
1rem 0 var(--au-gray-600),
2rem 0 var(--au-gray-600),
3rem -0.3rem var(--au-gray-600);
}
}
9 changes: 6 additions & 3 deletions app/styles/ember-appuniversum/_c-main-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ $au-main-header-divider-rotation: -19deg !default;
justify-content: space-between;
align-items: center;
background-color: $au-main-header-bg;
box-shadow: 0 1px 3px rgba($au-gray-900, 0.1),
0 4px 20px rgba($au-gray-900, 0.035), 0 1px 1px rgba($au-gray-900, 0.025);
box-shadow:
0 1px 3px rgba($au-gray-900, 0.1),
0 4px 20px rgba($au-gray-900, 0.035),
0 1px 1px rgba($au-gray-900, 0.025);
}

.au-c-main-header__title-group {
Expand All @@ -43,7 +45,8 @@ $au-main-header-divider-rotation: -19deg !default;
display: block;
padding: $au-unit-tiny;
color: $au-main-header-color;
transition: color var(--au-transition),
transition:
color var(--au-transition),
text-decoration-color var(--au-transition);
letter-spacing: 0.03ex;
white-space: nowrap;
Expand Down
6 changes: 4 additions & 2 deletions app/styles/ember-appuniversum/_c-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ $au-modal-backdrop-z-index: 9998 !default;
visibility: visible;
border-radius: var(--au-radius);
z-index: $au-modal-z-index;
box-shadow: 0 1px 3px rgba($au-gray-1000, 0.1),
0 4px 20px rgba($au-gray-1000, 0.035), 0 1px 1px rgba($au-gray-1000, 0.025);
box-shadow:
0 1px 3px rgba($au-gray-1000, 0.1),
0 4px 20px rgba($au-gray-1000, 0.035),
0 1px 1px rgba($au-gray-1000, 0.025);
transition: var(--au-transition);
display: none;

Expand Down
3 changes: 2 additions & 1 deletion app/styles/ember-appuniversum/_c-sidebar-action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ $au-sidebar-border: var(--au-divider-color) !default;
.au-c-action-sidebar {
@include mq(medium) {
border-left: 0.1rem solid $au-sidebar-border;
box-shadow: 0 0 6rem rgba($au-gray-900, 0.2),
box-shadow:
0 0 6rem rgba($au-gray-900, 0.2),
0 0 0.3rem rgba($au-gray-900, 0.1);
}
}
Expand Down
Loading

0 comments on commit daa1ba3

Please sign in to comment.