@weni/unnnic-system 3.28.2-alpha.1 → 3.28.2-alpha.2

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": "3.28.2-alpha.1",
3
+ "version": "3.28.2-alpha.2",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -3,13 +3,15 @@
3
3
  :class="['unnnic-disclaimer', `unnnic-disclaimer--${type}`]"
4
4
  data-testid="disclaimer"
5
5
  >
6
- <UnnnicIcon
7
- class="unnnic-disclaimer__icon"
8
- size="ant"
9
- :icon="variant.icon"
10
- :scheme="variant.scheme"
11
- data-testid="disclaimer-icon"
12
- />
6
+ <slot name="icon">
7
+ <UnnnicIcon
8
+ class="unnnic-disclaimer__icon"
9
+ size="ant"
10
+ :icon="variant.icon"
11
+ :scheme="variant.scheme"
12
+ data-testid="disclaimer-icon"
13
+ />
14
+ </slot>
13
15
 
14
16
  <section class="unnnic-disclaimer__content">
15
17
  <p
@@ -57,7 +59,7 @@ const slots = useSlots();
57
59
  const hasDescription = computed(() => {
58
60
  return (
59
61
  Boolean(props.description) ||
60
- (slots.description && slots.description().length > 0)
62
+ (slots.description && slots.description({}).length > 0)
61
63
  );
62
64
  });
63
65
 
@@ -44,6 +44,10 @@ const props = defineProps({
44
44
  type: String,
45
45
  default: 'lg',
46
46
  },
47
+ strokeWidth: {
48
+ type: Number,
49
+ default: 5,
50
+ },
47
51
  });
48
52
 
49
53
  defineOptions({ name: 'UnnnicIconLoading' });
@@ -79,6 +83,7 @@ const sizeInPixels = computed(() => SIZE_MAP[props.size] ?? props.size);
79
83
 
80
84
  .unnnic-icon-loading {
81
85
  display: inline-flex;
86
+ align-items: center;
82
87
  user-select: none;
83
88
 
84
89
  svg {
@@ -87,7 +92,7 @@ const sizeInPixels = computed(() => SIZE_MAP[props.size] ?? props.size);
87
92
  circle {
88
93
  fill: none;
89
94
  stroke: currentColor;
90
- stroke-width: 5;
95
+ stroke-width: v-bind(strokeWidth);
91
96
  stroke-linecap: round;
92
97
  animation: unnnic-icon-loading-dash 1s ease-in-out infinite;
93
98
  }
@@ -1,4 +1,5 @@
1
1
  import UnnnicDisclaimer from '../components/Disclaimer/Disclaimer.vue';
2
+ import UnnnicIconLoading from '../components/IconLoading/IconLoading.vue';
2
3
 
3
4
  export default {
4
5
  title: 'Feedback/Disclaimer',
@@ -75,3 +76,18 @@ export const WithDescriptionSlot = TemplateWithDescriptionSlot.bind({});
75
76
  WithDescriptionSlot.args = {
76
77
  ...Default.args,
77
78
  };
79
+
80
+ const TemplateWithCustomIcon = (args) => ({
81
+ components: { UnnnicDisclaimer, UnnnicIconLoading },
82
+ setup() {
83
+ return { args };
84
+ },
85
+ template:
86
+ '<UnnnicDisclaimer v-bind="args"><template #icon><UnnnicIconLoading size="sm" scheme="fg-emphasized" stroke-width="3" /></template></UnnnicDisclaimer>',
87
+ });
88
+
89
+ export const WithCustomIcon = TemplateWithCustomIcon.bind({});
90
+ WithCustomIcon.args = {
91
+ text: '',
92
+ description: 'Analysis in progress · 381 of 437 items processed.',
93
+ };
@@ -55,3 +55,9 @@ export const CustomSize = {
55
55
  size: '64px',
56
56
  },
57
57
  };
58
+
59
+ export const CustomStrokeWidth = {
60
+ args: {
61
+ strokeWidth: 3,
62
+ },
63
+ };