@weni/unnnic-system 2.0.8 → 2.0.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.
@@ -4,7 +4,8 @@ export default {
4
4
  title: 'Rating/StarRating',
5
5
  component: unnnicStarRating,
6
6
  argTypes: {
7
- value: { control: { type: 'number', min: 0, max: 5, step: 0.1 } },
7
+ showValue: { control: { type: 'boolean' } },
8
+ readonly: { control: { type: 'boolean' } },
8
9
  },
9
10
  };
10
11
 
@@ -15,10 +16,16 @@ const Template = (args, { argTypes }) => ({
15
16
  unnnicStarRating,
16
17
  },
17
18
 
19
+ data() {
20
+ return {
21
+ value: 4,
22
+ };
23
+ },
24
+
18
25
  template: `
19
26
  <div>
20
27
  <pre>v-model: {{ value }}</pre>
21
- <unnnic-star-rating v-bind="$props">
28
+ <unnnic-star-rating v-model="value" showValue readonly>
22
29
  </unnnic-star-rating>
23
30
  </div>
24
31
  `,
@@ -6,37 +6,44 @@ export default {
6
6
  argTypes: {
7
7
  size: { control: { type: 'select', options: ['md', 'sm'] } },
8
8
  },
9
+ render: (args) => ({
10
+ components: {
11
+ unnnicTab,
12
+ },
13
+ setup() {
14
+ return { args };
15
+ },
16
+ template: `
17
+ <unnnic-tab v-bind="args">
18
+ <template #tab-head-first>
19
+ First
20
+ </template>
21
+ <template #tab-head-first-tooltip>
22
+ Tooltip text
23
+ </template>
24
+ <template #tab-panel-first>
25
+ <h2 class="title">First Content</h2>
26
+ <p class="description">
27
+ First description
28
+ </p>
29
+ </template>
30
+ <template #tab-head-second>
31
+ Second
32
+ </template>
33
+ <template #tab-panel-second>
34
+ <h2 class="title">Second Content</h2>
35
+ <p class="description">
36
+ Second description
37
+ </p>
38
+ </template>
39
+ </unnnic-tab>
40
+ `,
41
+ }),
9
42
  };
10
43
 
11
- const Template = (args, { argTypes }) => ({
12
- props: Object.keys(argTypes),
13
- components: { unnnicTab },
14
- template: `
15
- <unnnic-tab v-bind="$props">
16
- <template slot="tab-head-first">
17
- First
18
- </template>
19
- <template slot="tab-panel-first">
20
- <h2 class="title">First Content</h2>
21
- <p class="description">
22
- First description
23
- </p>
24
- </template>
25
- <template slot="tab-head-second">
26
- Second
27
- </template>
28
- <template slot="tab-panel-second">
29
- <h2 class="title">Second Content</h2>
30
- <p class="description">
31
- Second description
32
- </p>
33
- </template>
34
- </unnnic-tab>
35
- `,
36
- });
37
-
38
- export const Default = Template.bind({});
39
- Default.args = {
40
- initialTab: 'first',
41
- tabs: ['first', 'second'],
44
+ export const Default = {
45
+ args: {
46
+ initialTab: 'first',
47
+ tabs: ['first', 'second'],
48
+ },
42
49
  };
@@ -12,6 +12,17 @@ export default {
12
12
  maxWidth: { control: { type: 'text' } },
13
13
  forceOpen: { control: { type: 'boolean' } },
14
14
  },
15
+ render: (args) => ({
16
+ components: {
17
+ unnnicToolTip,
18
+ },
19
+ setup() {
20
+ return { args };
21
+ },
22
+ template: `
23
+ <unnnic-tool-tip v-bind="args"> Hover over text </unnnic-tool-tip>
24
+ `,
25
+ }),
15
26
  };
16
27
 
17
28
  export const Normal = {