Skip to content

Commit 523670d

Browse files
committed
chore: adjust component attribute assignment
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent fccdae5 commit 523670d

File tree

17 files changed

+66
-62
lines changed

17 files changed

+66
-62
lines changed

src/components/NcActionButton/NcActionButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ export default {
327327
<button
328328
:aria-label="ariaLabel"
329329
class="action-button button-vue"
330-
:class="[{
330+
:class="{
331331
'action-button--active': isChecked,
332332
focusable: isFocusable,
333-
}]"
333+
}"
334334
:disabled="disabled"
335335
:title="title"
336336
:type="nativeType"

src/components/NcActionInput/NcActionInput.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,20 @@ For the `NcSelect` component, all events will be passed through. Please see the
124124
<template>
125125
<li class="action" :class="[{ 'action--disabled': disabled }, $props.class]">
126126
<span
127+
class="action-input"
127128
:class="{
128129
'action-input-picker--disabled': disabled,
129130
'action-input--visible-label': labelOutside && label,
130131
}"
131-
class="action-input"
132132
@mouseleave="onLeave">
133133
<span class="action-input__icon-wrapper">
134134
<!-- @slot Manually provide icon -->
135135
<slot name="icon">
136136
<span
137-
:class="[isIconUrl ? 'action-input__icon--url' : icon]"
138-
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
139137
aria-hidden="true"
140-
class="action-input__icon" />
138+
class="action-input__icon"
139+
:class="[isIconUrl ? 'action-input__icon--url' : icon]"
140+
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }" />
141141
</slot>
142142
</span>
143143

@@ -221,9 +221,9 @@ For the `NcSelect` component, all events will be passed through. Please see the
221221
@update:model-value="onUpdateModelValue"
222222
@submit="$refs.form.requestSubmit()">
223223
<button
224-
:style="{ 'background-color': modelValue }"
225224
class="colorpicker__preview"
226-
:class="{ focusable: isFocusable }" />
225+
:class="{ focusable: isFocusable }"
226+
:style="{ 'background-color': modelValue }" />
227227
</NcColorPicker>
228228
</div>
229229
</div>

src/components/NcActionLink/NcActionLink.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ export default {
7575
<!-- @slot Manually provide icon -->
7676
<slot name="icon">
7777
<span
78-
:class="[isIconUrl ? 'action-link__icon--url' : icon]"
79-
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
8078
aria-hidden="true"
81-
class="action-link__icon" />
79+
class="action-link__icon"
80+
:class="[isIconUrl ? 'action-link__icon--url' : icon]"
81+
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }" />
8282
</slot>
8383

8484
<!-- long text with name -->

src/components/NcActionRadio/NcActionRadio.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ So that only one of each name set can be selected at the same time.
5050
:id="id"
5151
ref="radio"
5252
v-model="model"
53+
class="radio action-radio__radio"
54+
:class="{ focusable: isFocusable }"
5355
:disabled="disabled"
5456
:name="name"
5557
:value="value"
56-
:class="{ focusable: isFocusable }"
5758
type="radio"
58-
class="radio action-radio__radio"
5959
@keydown.enter.exact.prevent="toggleInput"
6060
@change="onChange">
6161
<label ref="label" :for="id" class="action-radio__label">{{ text }}</label>

src/components/NcActionRouter/NcActionRouter.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
<template>
77
<li class="action" :role="isInSemanticMenu && 'presentation'">
88
<RouterLink
9-
:to="to"
10-
:aria-label="ariaLabel"
11-
:title="title"
9+
:aria-label
1210
class="action-router focusable"
1311
rel="nofollow noreferrer noopener"
1412
:role="isInSemanticMenu && 'menuitem'"
13+
:title
14+
:to
1515
@click="onClick">
1616
<!-- @slot Manually provide icon -->
1717
<slot name="icon">
1818
<span
19-
:class="[isIconUrl ? 'action-router__icon--url' : icon]"
20-
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
19+
aria-hidden="true"
2120
class="action-router__icon"
22-
aria-hidden="true" />
21+
:class="[isIconUrl ? 'action-router__icon--url' : icon]"
22+
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }" />
2323
</slot>
2424

2525
<!-- long text with name -->

src/components/NcActionText/NcActionText.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<slot name="icon">
1313
<span
1414
v-if="icon !== ''"
15-
:class="[isIconUrl ? 'action-text__icon--url' : icon]"
1615
aria-hidden="true"
17-
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
18-
class="action-text__icon" />
16+
class="action-text__icon"
17+
:class="[isIconUrl ? 'action-text__icon--url' : icon]"
18+
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }" />
1919
</slot>
2020

2121
<!-- long text with name -->

src/components/NcActionTextEditable/NcActionTextEditable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ export default {
7070

7171
<textarea
7272
:id="computedId"
73+
class="action-text-editable__textarea"
74+
:class="[{ focusable: isFocusable }]"
7375
:disabled="disabled"
7476
:value="modelValue"
7577
v-bind="$attrs"
76-
class="action-text-editable__textarea"
77-
:class="[{ focusable: isFocusable }]"
7878
@input="onInput" />
7979

8080
<!-- allow the custom font to inject a ::before

src/components/NcAppNavigationItem/NcAppNavigationItem.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,12 @@ Just set the `pinned` prop.
287287
v-slot="{ href: routerLinkHref, navigate, isActive }"
288288
v-bind="{ ...isRouterLink && { custom: true, to } }">
289289
<div
290+
class="app-navigation-entry"
290291
:class="{
291292
'app-navigation-entry--editing': editingActive,
292293
'app-navigation-entry--deleted': undo,
293294
active: (isActive && to) || active,
294-
}"
295-
class="app-navigation-entry">
295+
}">
296296
<!-- Icon and name -->
297297
<a
298298
v-if="!undo"
@@ -311,8 +311,8 @@ Just set the `pinned` prop.
311311
<!-- icon if not collapsible -->
312312
<!-- never show the icon over the collapsible if mobile -->
313313
<div
314-
:class="{ [icon]: icon }"
315-
class="app-navigation-entry-icon">
314+
class="app-navigation-entry-icon"
315+
:class="{ [icon]: icon }">
316316
<NcLoadingIcon v-if="loading" />
317317
<!-- @slot Slot for the optional leading icon -->
318318
<slot v-else name="icon" />
@@ -352,10 +352,10 @@ Just set the `pinned` prop.
352352
<NcActions
353353
v-if="!!$slots.actions || (editable && !editingActive) || undo"
354354
ref="actions"
355-
:inline="inlineActions"
356355
class="app-navigation-entry__actions"
357356
container="#app-navigation-vue"
358357
:boundaries-element="actionsBoundariesElement"
358+
:inline="inlineActions"
359359
:placement="menuPlacement"
360360
:open="menuOpen"
361361
:force-menu="forceMenu"

src/components/NcAppNavigationNewItem/NcAppNavigationNewItem.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949

5050
<template>
5151
<li
52+
class="app-navigation-entry"
5253
:class="{
5354
'app-navigation-entry--newItemActive': newItemActive,
54-
}"
55-
class="app-navigation-entry">
55+
}">
5656
<!-- New Item -->
5757
<button class="app-navigation-entry-button" @click="handleNewItem">
5858
<span
59-
:class="{ [icon]: !loading }"
60-
class="app-navigation-entry-icon">
59+
class="app-navigation-entry-icon"
60+
:class="{ [icon]: !loading }">
6161
<NcLoadingIcon v-if="loading" />
6262
<slot v-else name="icon" />
6363
</span>

src/components/NcAppSidebar/NcAppSidebar.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,11 @@ export default {
577577
</Teleport>
578578

579579
<header
580+
class="app-sidebar-header"
580581
:class="{
581582
'app-sidebar-header--with-figure': isSlotPopulated($slots.header?.()) || background,
582583
'app-sidebar-header--compact': compact,
583-
}"
584-
class="app-sidebar-header">
584+
}">
585585
<!-- @slot Alternative to the default header info: use for bare NcAppSidebar with tabs.
586586
NcAppSidebarHeader would be required to use for accessibility reasons.
587587
This will be overridden by `empty` prop.
@@ -592,10 +592,10 @@ export default {
592592
<!-- sidebar header illustration/figure -->
593593
<div
594594
v-if="(isSlotPopulated($slots.header?.()) || background)"
595+
class="app-sidebar-header__figure"
595596
:class="{
596597
'app-sidebar-header__figure--with-action': hasFigureClickListener,
597598
}"
598-
class="app-sidebar-header__figure"
599599
:style="{
600600
backgroundImage: `url(${background})`,
601601
}"
@@ -607,13 +607,13 @@ export default {
607607

608608
<!-- sidebar details -->
609609
<div
610+
class="app-sidebar-header__desc"
610611
:class="{
611612
'app-sidebar-header__desc--with-tertiary-action': canStar || isSlotPopulated($slots['tertiary-actions']?.()),
612613
'app-sidebar-header__desc--editable': nameEditable && !subname,
613614
'app-sidebar-header__desc--with-subname--editable': nameEditable && subname,
614615
'app-sidebar-header__desc--without-actions': !isSlotPopulated($slots['secondary-actions']?.()),
615-
}"
616-
class="app-sidebar-header__desc">
616+
}">
617617
<!-- favourite icon -->
618618
<div v-if="canStar || isSlotPopulated($slots['tertiary-actions']?.())" class="app-sidebar-header__tertiary-actions">
619619
<slot name="tertiary-actions">

0 commit comments

Comments
 (0)