@shwfed/nuxt 0.10.9 → 0.10.10
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
|
@@ -132,6 +132,17 @@ function handleConfiguratorConfirm(nextConfig) {
|
|
|
132
132
|
function isDropdownItem(item) {
|
|
133
133
|
return "items" in item;
|
|
134
134
|
}
|
|
135
|
+
function hasLeadingPrimaryGap(items, itemIndex) {
|
|
136
|
+
if (itemIndex === 0) {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
const item = items[itemIndex];
|
|
140
|
+
const previousItem = items[itemIndex - 1];
|
|
141
|
+
if (!item || !previousItem || isDropdownItem(item) || isDropdownItem(previousItem)) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
return item.variant === "primary" && previousItem.variant === "primary";
|
|
145
|
+
}
|
|
135
146
|
</script>
|
|
136
147
|
|
|
137
148
|
<script>
|
|
@@ -177,7 +188,7 @@ export { ButtonActionC, ButtonConfigC, ButtonConfigInputC, ButtonDropdownC, Butt
|
|
|
177
188
|
orientation="horizontal"
|
|
178
189
|
>
|
|
179
190
|
<template
|
|
180
|
-
v-for="item in group.items"
|
|
191
|
+
v-for="(item, itemIndex) in group.items"
|
|
181
192
|
:key="item.id"
|
|
182
193
|
>
|
|
183
194
|
<Button
|
|
@@ -185,6 +196,7 @@ export { ButtonActionC, ButtonConfigC, ButtonConfigInputC, ButtonDropdownC, Butt
|
|
|
185
196
|
data-slot="buttons-item"
|
|
186
197
|
:variant="item.variant"
|
|
187
198
|
:disabled="isButtonDisabled(item.id)"
|
|
199
|
+
:class="hasLeadingPrimaryGap(group.items, itemIndex) ? 'ml-px' : void 0"
|
|
188
200
|
:title="item.hideTitle ? getButtonLabel(item) : void 0"
|
|
189
201
|
@click="void runButton(item.id)"
|
|
190
202
|
>
|
|
@@ -208,6 +220,7 @@ export { ButtonActionC, ButtonConfigC, ButtonConfigInputC, ButtonDropdownC, Butt
|
|
|
208
220
|
data-slot="buttons-item"
|
|
209
221
|
:variant="item.variant"
|
|
210
222
|
:disabled="isButtonDisabled(item.id)"
|
|
223
|
+
:class="hasLeadingPrimaryGap(group.items, itemIndex) ? 'ml-px' : void 0"
|
|
211
224
|
:title="item.hideTitle ? getButtonLabel(item) : void 0"
|
|
212
225
|
@click="void runButton(item.id)"
|
|
213
226
|
>
|