@tekkare/romulus 0.1.169 → 0.1.170

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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
- "version": "0.1.168",
7
+ "version": "0.1.169",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -53,6 +53,11 @@ const props = withDefaults(defineProps<{
53
53
  highlight?: boolean
54
54
  /** Bouton de copie du titre. */
55
55
  copyable?: boolean
56
+ /**
57
+ * Bouton d'edition dans l'en-tete. Reserve aux profils qui ont le droit de
58
+ * corriger le referentiel : la fiche n'en decide pas, elle l'affiche.
59
+ */
60
+ editable?: boolean
56
61
  }>(), {
57
62
  country: undefined,
58
63
  flag: undefined,
@@ -67,9 +72,10 @@ const props = withDefaults(defineProps<{
67
72
  lang: 'fr',
68
73
  highlight: false,
69
74
  copyable: true,
75
+ editable: false,
70
76
  })
71
77
 
72
- const emit = defineEmits<{ copy: [title: string] }>()
78
+ const emit = defineEmits<{ copy: [title: string], edit: [] }>()
73
79
 
74
80
  /** Etat deplie, liable en `v-model` quand le panneau veut le piloter. */
75
81
  const open = defineModel<boolean>({ default: false })
@@ -86,6 +92,7 @@ const WORDS = {
86
92
  collapse: 'Replier la source',
87
93
  copy: 'Copier le titre',
88
94
  copied: 'Titre copié',
95
+ edit: 'Modifier la source',
89
96
  sectors: {
90
97
  'public': 'Public',
91
98
  'private': 'Privé',
@@ -111,6 +118,7 @@ const WORDS = {
111
118
  collapse: 'Collapse source',
112
119
  copy: 'Copy title',
113
120
  copied: 'Title copied',
121
+ edit: 'Edit source',
114
122
  sectors: {
115
123
  'public': 'Public',
116
124
  'private': 'Private',
@@ -252,6 +260,16 @@ onUnmounted(() => clearTimeout(copyTimer))
252
260
  </button>
253
261
 
254
262
  <div class="rm-src__actions">
263
+ <button
264
+ v-if="editable"
265
+ type="button"
266
+ class="rm-src__btn"
267
+ :aria-label="t.edit"
268
+ :title="t.edit"
269
+ @click="emit('edit')"
270
+ >
271
+ <RmIcon name="PencilSimple" :size="14" />
272
+ </button>
255
273
  <button
256
274
  v-if="copyable"
257
275
  type="button"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.169",
3
+ "version": "0.1.170",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",