@weni/unnnic-system 2.0.27 → 2.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -71,11 +71,11 @@
71
71
  </div>
72
72
 
73
73
  <div
74
- v-if="$slots.title || title"
74
+ v-if="$slots.title?.().length || title"
75
75
  class="title"
76
76
  >
77
77
  <slot
78
- v-if="$slots.title"
78
+ v-if="$slots.title?.().length"
79
79
  name="title"
80
80
  ></slot>
81
81
 
@@ -83,13 +83,14 @@
83
83
  </div>
84
84
 
85
85
  <div
86
- v-if="$slots.description || description"
86
+ v-if="$slots.description?.().length || description"
87
87
  class="description"
88
88
  >
89
89
  <slot
90
- v-if="$slots.description"
90
+ v-if="$slots.description?.().length"
91
91
  name="description"
92
- ></slot>
92
+ >
93
+ </slot>
93
94
 
94
95
  <template v-else>{{ description }}</template>
95
96
  </div>
@@ -118,7 +119,7 @@
118
119
  type="tertiary"
119
120
  :disabled="actionPrimaryLoading"
120
121
  @click="
121
- $attrs['click-action-secondary']
122
+ $attrs['onClickActionSecondary']
122
123
  ? $emit('click-action-secondary', { close: justClose })
123
124
  : $emit('close')
124
125
  "
@@ -137,7 +138,7 @@
137
138
  :disabled="disabled || actionPrimaryLoading"
138
139
  :loading="actionPrimaryLoading"
139
140
  @click="
140
- $attrs['click-action-primary']
141
+ $attrs['onClickActionPrimary']
141
142
  ? $emit('click-action-primary', { close: justClose })
142
143
  : null
143
144
  "
@@ -157,6 +158,7 @@ import UnnnicInput from '../Input/Input.vue';
157
158
  import UnnnicButton from '../Button/Button.vue';
158
159
 
159
160
  export default {
161
+ name: 'UnnnicModalNext',
160
162
  components: {
161
163
  UnnnicIcon,
162
164
  UnnnicInput,
@@ -190,7 +192,7 @@ export default {
190
192
  showCloseButton: Boolean,
191
193
  },
192
194
 
193
- emits: ['close', 'click-action-primary', 'click-action-secondary'],
195
+ emits: ['close'],
194
196
 
195
197
  data() {
196
198
  return {
@@ -1,6 +1,8 @@
1
1
  import unnnicModalNext from '../components/ModalNext/ModalNext.vue';
2
2
  import icons from '../utils/icons';
3
3
 
4
+ import { action } from '@storybook/addon-actions';
5
+
4
6
  const iconsOptions = Object.keys(icons);
5
7
 
6
8
  const schemesOptions = [
@@ -183,7 +185,8 @@ export const AlertWithActionButtons = {
183
185
  confirmButtonType: undefined,
184
186
  actionPrimaryLabel: 'Confirm',
185
187
  actionSecondaryLabel: 'Cancel',
186
- actionPrimaryButtonType: undefined,
187
188
  showCloseButton: true,
189
+ onClickActionSecondary: action('click-action-secondary'),
190
+ onClickActionPrimary: action('click-action-primay'),
188
191
  },
189
192
  };