@tekkare/romulus 0.1.218 → 0.1.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -37,6 +37,11 @@ const props = withDefaults(
|
|
|
37
37
|
saveLabel?: string
|
|
38
38
|
/** Rien a sauvegarder (aucun filtre pose, par exemple). */
|
|
39
39
|
saveDisabled?: boolean
|
|
40
|
+
/**
|
|
41
|
+
* Libelle du bouton « Nouvelle vue », a cote du Sauvegarder : la page
|
|
42
|
+
* repart de zero (plus de vue, filtres au defaut). Vide : pas de bouton.
|
|
43
|
+
*/
|
|
44
|
+
resetLabel?: string
|
|
40
45
|
/** Onglets de portee. Masques s'il y en a moins de deux. */
|
|
41
46
|
tabs?: RmSavedViewsTab[]
|
|
42
47
|
/** Onglet courant (v-model). */
|
|
@@ -68,6 +73,7 @@ const props = withDefaults(
|
|
|
68
73
|
description: '',
|
|
69
74
|
saveLabel: '',
|
|
70
75
|
saveDisabled: false,
|
|
76
|
+
resetLabel: '',
|
|
71
77
|
tabs: () => [],
|
|
72
78
|
tab: '',
|
|
73
79
|
menu: () => [],
|
|
@@ -87,6 +93,8 @@ const props = withDefaults(
|
|
|
87
93
|
const emit = defineEmits<{
|
|
88
94
|
'update:tab': [key: string]
|
|
89
95
|
'save-current': []
|
|
96
|
+
/** « Nouvelle vue » : remettre la page a l'etat vierge. */
|
|
97
|
+
reset: []
|
|
90
98
|
activate: [id: string]
|
|
91
99
|
star: [id: string]
|
|
92
100
|
rename: [id: string, title: string]
|
|
@@ -169,19 +177,31 @@ const visibleTabs = computed(() => (props.tabs.length > 1 ? props.tabs : []))
|
|
|
169
177
|
|
|
170
178
|
<template>
|
|
171
179
|
<div class="rm-views">
|
|
172
|
-
<div v-if="title || saveLabel" class="rm-views__head">
|
|
180
|
+
<div v-if="title || saveLabel || resetLabel" class="rm-views__head">
|
|
173
181
|
<h2 v-if="title" class="rm-views__title">{{ title }}</h2>
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
<div v-if="saveLabel || resetLabel" class="rm-views__actions" :class="{ 'rm-views__actions--block': !title }">
|
|
183
|
+
<RmButton
|
|
184
|
+
v-if="saveLabel"
|
|
185
|
+
variant="primary"
|
|
186
|
+
size="sm"
|
|
187
|
+
prefix-icon="BookmarkSimple"
|
|
188
|
+
:disabled="saveDisabled"
|
|
189
|
+
:block="!title"
|
|
190
|
+
@click="emit('save-current')"
|
|
191
|
+
>
|
|
192
|
+
{{ saveLabel }}
|
|
193
|
+
</RmButton>
|
|
194
|
+
<RmButton
|
|
195
|
+
v-if="resetLabel"
|
|
196
|
+
variant="secondary"
|
|
197
|
+
size="sm"
|
|
198
|
+
prefix-icon="Plus"
|
|
199
|
+
:block="!title"
|
|
200
|
+
@click="emit('reset')"
|
|
201
|
+
>
|
|
202
|
+
{{ resetLabel }}
|
|
203
|
+
</RmButton>
|
|
204
|
+
</div>
|
|
185
205
|
</div>
|
|
186
206
|
|
|
187
207
|
<p v-if="description" class="rm-views__desc">{{ description }}</p>
|
|
@@ -291,5 +311,5 @@ const visibleTabs = computed(() => (props.tabs.length > 1 ? props.tabs : []))
|
|
|
291
311
|
</template>
|
|
292
312
|
|
|
293
313
|
<style scoped>
|
|
294
|
-
.rm-views{flex-direction:column;font-family:var(--font-sans)}.rm-views,.rm-views__head{display:flex;gap:var(--space-12)}.rm-views__head{align-items:center;justify-content:space-between}.rm-views__title{color:var(--text-primary);font-family:var(--font-serif);font-size:var(--font-22);font-weight:var(--weight-bold);margin:0}.rm-views__desc{color:var(--text-secondary);font-size:var(--font-13);line-height:1.5;margin:0}.rm-views__tabs{align-items:stretch;border-bottom:1px solid var(--border-default);display:flex}.rm-views__tab{align-items:center;background:none;border:none;border-bottom:3px solid transparent;color:var(--text-secondary);cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-14);font-weight:var(--weight-semibold);gap:var(--space-6);padding:var(--space-12) var(--space-16);transition:color var(--duration-fast) var(--ease-out)}.rm-views__tab:hover{color:var(--text-primary)}.rm-views__tab--active{background:linear-gradient(180deg,transparent 30%,rgba(var(--brand-rgb),.06) 100%);border-bottom-color:var(--color-primary);border-radius:6px 6px 0 0;color:var(--color-primary);font-weight:var(--weight-bold)}.rm-views__tab-count{background:var(--bg-surface-3);border-radius:var(--radius-pill);color:var(--text-muted);font-size:var(--font-11);font-variant-numeric:tabular-nums;font-weight:var(--weight-bold);min-width:18px;padding:0 var(--space-6);text-align:center}.rm-views__tab--active .rm-views__tab-count{background:var(--bg-hover);color:var(--color-secondary)}.rm-views__search{align-items:center;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-md);color:var(--text-muted);display:flex;gap:var(--space-8);padding:var(--space-8) var(--space-12)}.rm-views__search:focus-within{border-color:var(--color-secondary);box-shadow:0 0 0 3px rgba(var(--brand-rgb),.1)}.rm-views__search input{background:none;border:none;color:var(--text-primary);flex:1;font-family:inherit;font-size:var(--font-13);min-width:0;outline:none}.rm-views__search input::-moz-placeholder{color:var(--text-muted)}.rm-views__search input::placeholder{color:var(--text-muted)}.rm-views__chips{display:flex;flex-wrap:wrap;gap:var(--space-6)}.rm-views__chip{align-items:center;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-pill);color:var(--text-secondary);cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-12);gap:var(--space-4);padding:5px var(--space-10)}.rm-views__chip:hover{background:var(--bg-surface-3)}.rm-views__chip--on{background:var(--bg-hover);border-color:var(--color-violet-pale);color:var(--color-primary);font-weight:var(--weight-semibold)}.rm-views__chip-count{font-variant-numeric:tabular-nums;opacity:.8}.rm-views__list{display:flex;flex-direction:column;gap:var(--space-12)}
|
|
314
|
+
.rm-views{flex-direction:column;font-family:var(--font-sans)}.rm-views,.rm-views__head{display:flex;gap:var(--space-12)}.rm-views__head{align-items:center;justify-content:space-between}.rm-views__actions{align-items:center;display:flex;gap:var(--space-8)}.rm-views__actions--block,.rm-views__actions--block>*{flex:1}.rm-views__title{color:var(--text-primary);font-family:var(--font-serif);font-size:var(--font-22);font-weight:var(--weight-bold);margin:0}.rm-views__desc{color:var(--text-secondary);font-size:var(--font-13);line-height:1.5;margin:0}.rm-views__tabs{align-items:stretch;border-bottom:1px solid var(--border-default);display:flex}.rm-views__tab{align-items:center;background:none;border:none;border-bottom:3px solid transparent;color:var(--text-secondary);cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-14);font-weight:var(--weight-semibold);gap:var(--space-6);padding:var(--space-12) var(--space-16);transition:color var(--duration-fast) var(--ease-out)}.rm-views__tab:hover{color:var(--text-primary)}.rm-views__tab--active{background:linear-gradient(180deg,transparent 30%,rgba(var(--brand-rgb),.06) 100%);border-bottom-color:var(--color-primary);border-radius:6px 6px 0 0;color:var(--color-primary);font-weight:var(--weight-bold)}.rm-views__tab-count{background:var(--bg-surface-3);border-radius:var(--radius-pill);color:var(--text-muted);font-size:var(--font-11);font-variant-numeric:tabular-nums;font-weight:var(--weight-bold);min-width:18px;padding:0 var(--space-6);text-align:center}.rm-views__tab--active .rm-views__tab-count{background:var(--bg-hover);color:var(--color-secondary)}.rm-views__search{align-items:center;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-md);color:var(--text-muted);display:flex;gap:var(--space-8);padding:var(--space-8) var(--space-12)}.rm-views__search:focus-within{border-color:var(--color-secondary);box-shadow:0 0 0 3px rgba(var(--brand-rgb),.1)}.rm-views__search input{background:none;border:none;color:var(--text-primary);flex:1;font-family:inherit;font-size:var(--font-13);min-width:0;outline:none}.rm-views__search input::-moz-placeholder{color:var(--text-muted)}.rm-views__search input::placeholder{color:var(--text-muted)}.rm-views__chips{display:flex;flex-wrap:wrap;gap:var(--space-6)}.rm-views__chip{align-items:center;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-pill);color:var(--text-secondary);cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-12);gap:var(--space-4);padding:5px var(--space-10)}.rm-views__chip:hover{background:var(--bg-surface-3)}.rm-views__chip--on{background:var(--bg-hover);border-color:var(--color-violet-pale);color:var(--color-primary);font-weight:var(--weight-semibold)}.rm-views__chip-count{font-variant-numeric:tabular-nums;opacity:.8}.rm-views__list{display:flex;flex-direction:column;gap:var(--space-12)}
|
|
295
315
|
</style>
|