@tekkare/romulus 0.1.364 → 0.1.366

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.363",
7
+ "version": "0.1.364",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -99,6 +99,8 @@ watch(() => props.modelValue, (open) => { if (open) fitRail() }, { immediate: tr
99
99
 
100
100
  const sideOffset = computed(() => props.offset ?? railFit.value?.offset ?? '0px')
101
101
  const edgeInset = computed(() => props.inset ?? railFit.value?.inset)
102
+ /** Le voile s'arrete au rail : le tiroir pose a cote, le rail reste net et cliquable. */
103
+ const overlayStyle = computed(() => [layer.value, railFit.value ? { right: railFit.value.offset } : {}])
102
104
  </script>
103
105
 
104
106
  <template>
@@ -107,7 +109,7 @@ const edgeInset = computed(() => props.inset ?? railFit.value?.inset)
107
109
  <div
108
110
  v-if="modelValue && overlay"
109
111
  class="rm-drawer-overlay"
110
- :style="layer"
112
+ :style="overlayStyle"
111
113
  @click="close"
112
114
  />
113
115
  </Transition>
@@ -88,6 +88,16 @@ function barWidth(row: RmHybridRow) {
88
88
  return `${Math.min((share(row) * 100) / reference.value, 100)}%`
89
89
  }
90
90
 
91
+ /**
92
+ * Une colonne `extra` arrive souvent deja formatee, part comprise :
93
+ * "53 298 (11.3 %)". La part finale entre parentheses est detachee pour
94
+ * prendre le meme gris que celle de la colonne valeur.
95
+ */
96
+ function splitShare(cell: string | number) {
97
+ const match = String(cell).match(/^(.*?)\s*(\([^()]*%\))$/)
98
+ return match ? { value: match[1], share: match[2] } : { value: cell, share: '' }
99
+ }
100
+
91
101
  function toggle() {
92
102
  showAll.value = !showAll.value
93
103
  emit('showState', showAll.value)
@@ -117,7 +127,8 @@ function toggle() {
117
127
  </span>
118
128
  </td>
119
129
  <td v-for="(cell, cellIndex) in row.extra ?? []" :key="cellIndex" class="rm-hybrid__value">
120
- {{ cell }}
130
+ {{ splitShare(cell).value }}
131
+ <span v-if="splitShare(cell).share" class="rm-hybrid__share">{{ splitShare(cell).share }}</span>
121
132
  </td>
122
133
  </tr>
123
134
  </tbody>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.364",
3
+ "version": "0.1.366",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",