@policystudio/policy-studio-ui-vue 1.0.25 → 1.0.29

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.
Files changed (71) hide show
  1. package/dist/css/psui_styles.css +5030 -573
  2. package/package.json +1 -1
  3. package/src/assets/scss/base.scss +39 -3
  4. package/src/assets/scss/components/PsButton.scss +114 -120
  5. package/src/assets/scss/components/PsCardInfos.scss +26 -0
  6. package/src/assets/scss/components/PsChartLegend.scss +25 -0
  7. package/src/assets/scss/components/PsCheckbox.scss +96 -0
  8. package/src/assets/scss/components/PsChips.scss +155 -0
  9. package/src/assets/scss/components/PsClimateZoneBadge.scss +26 -0
  10. package/src/assets/scss/components/PsCostEffectBar.scss +31 -0
  11. package/src/assets/scss/components/PsDataTable.scss +50 -0
  12. package/src/assets/scss/components/PsDialog.scss +10 -1
  13. package/src/assets/scss/components/PsDropdown.scss +44 -0
  14. package/src/assets/scss/components/PsHighlightRippleDot.scss +48 -0
  15. package/src/assets/scss/components/PsInlineSelector.scss +81 -0
  16. package/src/assets/scss/components/PsInputSelect.scss +104 -0
  17. package/src/assets/scss/components/PsInputTextArea.scss +49 -0
  18. package/src/assets/scss/components/PsMiniTag.scss +36 -0
  19. package/src/assets/scss/components/PsProgressBar.scss +24 -0
  20. package/src/assets/scss/components/PsRadioButton.scss +78 -0
  21. package/src/assets/scss/components/PsSlider.scss +11 -0
  22. package/src/assets/scss/components/PsSwitch.scss +66 -0
  23. package/src/assets/scss/components/PsTabHeader.scss +10 -3
  24. package/src/assets/scss/components/PsToast.scss +52 -0
  25. package/src/assets/scss/components/PsToggle.scss +23 -0
  26. package/src/assets/scss/components/PsTooltip.scss +118 -0
  27. package/src/components/badges-and-tags/PsCardInfos.vue +14 -7
  28. package/src/components/badges-and-tags/PsChartLegend.vue +7 -13
  29. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +15 -6
  30. package/src/components/badges-and-tags/PsCostEffectBar.vue +32 -70
  31. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -69
  32. package/src/components/badges-and-tags/PsMiniTag.vue +15 -24
  33. package/src/components/badges-and-tags/PsProgressBar.vue +42 -0
  34. package/src/components/buttons/PsButton.vue +74 -78
  35. package/src/components/chips/PsChips.vue +46 -87
  36. package/src/components/controls/PsCheckbox.vue +58 -134
  37. package/src/components/controls/PsInlineSelector.vue +135 -0
  38. package/src/components/controls/PsRadioButton.vue +33 -88
  39. package/src/components/controls/PsSlider.vue +4 -5
  40. package/src/components/controls/PsSwitch.vue +29 -81
  41. package/src/components/controls/PsToggle.vue +45 -39
  42. package/src/components/datatable/PsDataTable.vue +3 -15
  43. package/src/components/forms/PsDropdown.vue +27 -11
  44. package/src/components/forms/PsDropdownCopy.vue +212 -0
  45. package/src/components/forms/PsInputSelect.vue +88 -0
  46. package/src/components/forms/PsInputTextArea.vue +80 -0
  47. package/src/components/notifications/PsDialog.vue +3 -0
  48. package/src/components/notifications/PsToast.vue +16 -28
  49. package/src/components/tabs/PsTabHeader.vue +30 -12
  50. package/src/components/tooltip/PsDialogTooltip.vue +6 -31
  51. package/src/components/tooltip/PsRichTooltip.vue +37 -44
  52. package/src/components/tooltip/PsTooltip.vue +18 -28
  53. package/src/components/ui/PsIcon.vue +9 -9
  54. package/src/index.js +9 -0
  55. package/src/stories/Button.stories.js +102 -112
  56. package/src/stories/Checkbox.stories.js +34 -37
  57. package/src/stories/Chips.stories.js +43 -54
  58. package/src/stories/ClimateZoneBadge.stories.js +0 -7
  59. package/src/stories/Dialog.stories.js +1 -1
  60. package/src/stories/InlineSelector.stories.js +18 -0
  61. package/src/stories/InputSelect.stories.js +30 -0
  62. package/src/stories/InputTextArea.stories.js +25 -0
  63. package/src/stories/MiniTag.stories.js +12 -6
  64. package/src/stories/RadioButton.stories.js +32 -29
  65. package/src/stories/Switch.stories.js +33 -0
  66. package/src/stories/Toast.stories.js +40 -46
  67. package/src/stories/Tooltip.stories.js +86 -86
  68. package/tailwind.config.js +7 -1
  69. package/src/assets/images/check-checkbox-button.svg +0 -1
  70. package/src/assets/images/radio-checked-button.svg +0 -1
  71. package/src/stories/Swith.stories.js +0 -38
@@ -0,0 +1,25 @@
1
+ import PsInputTextArea from '../components/forms/PsInputTextArea.vue'
2
+
3
+ export default {
4
+ title: 'Components/Input Textarea',
5
+ component: PsInputTextArea,
6
+ }
7
+
8
+ const Template = (args, {argTypes}) => ({
9
+ props: Object.keys(argTypes),
10
+ components: {PsInputTextArea},
11
+ template: `
12
+ <div style='background-color:#F3F6F9; width:400px; height: 100%; padding: 20px 20px; display: flex: display; flex-direction: column;'>
13
+ <div style='display: flex; align-items:center; gap:30px;'>
14
+ <h1>Default</h1>
15
+ <PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" optionalLabel="Optional helper/feedback text"></PsInputTextArea>
16
+ </div>
17
+ <div style='display: flex; align-items:center; gap:30px; margin-top:40px;'>
18
+ <h1>Disable</h1>
19
+ <PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" disabled ></PsInputTextArea>
20
+ </div>
21
+ </div>
22
+ `
23
+ })
24
+
25
+ export const Default = Template.bind({})
@@ -21,26 +21,32 @@ const Template = (args, { argTypes }) => ({
21
21
  template: '<PsMiniTag v-bind="$props" />',
22
22
  })
23
23
 
24
- export const Informative = Template.bind({})
25
- Informative.args = {
26
- type: 'informative',
24
+ export const Info = Template.bind({})
25
+ Info.args = {
26
+ layout: 'info',
27
27
  message: 'This is an info alert',
28
28
  }
29
29
 
30
30
  export const Success = Template.bind({})
31
31
  Success.args = {
32
- type: 'success',
32
+ layout: 'success',
33
33
  message: 'This is a success alert',
34
34
  }
35
35
 
36
36
  export const Warning = Template.bind({})
37
37
  Warning.args = {
38
- type: 'warning',
38
+ layout: 'warning',
39
39
  message: 'This is a warning alert',
40
40
  }
41
41
 
42
42
  export const Error = Template.bind({})
43
43
  Error.args = {
44
- type: 'error',
44
+ layout: 'error',
45
45
  message: 'This is an error alert',
46
46
  }
47
+
48
+ export const Default = Template.bind({})
49
+ Default.args = {
50
+ layout: 'default',
51
+ message: 'This is a default color',
52
+ }
@@ -3,35 +3,38 @@ import PsRadioButton from '../components/controls/PsRadioButton.vue'
3
3
  export default {
4
4
  title: 'Components/Radio Button',
5
5
  component: PsRadioButton,
6
- argTypes: {},
7
- }
6
+ }
8
7
 
9
- const Template = (args, { argTypes }) => ({
10
- props: Object.keys(argTypes),
11
- components: { PsRadioButton },
12
- data: () => {
13
- return {
14
- selectedValue: 2,
15
- }
16
- },
17
- template: `
18
- <div>
19
- <div>
20
- <PsRadioButton v-bind="$props" name="options" label="Label 1" value="1" v-model="selectedValue" />
21
- <PsRadioButton v-bind="$props" name="options" label="Label 2" value="2" v-model="selectedValue" />
22
- <PsRadioButton v-bind="$props" name="options" label="Label 3" value="3" v-model="selectedValue" />
23
- <div class="result">
24
- Radio button selection: {{selectedValue}}
25
- </div>
26
- </div>
27
- </div>
28
- `,
29
- })
8
+ const DefaultTemplate = (args,{ argTypes}) => ({
9
+ props: Object.keys(argTypes),
10
+ components: { PsRadioButton},
11
+ template: `
12
+ <div style='display: flex; gap: 20px;'>
13
+ <div style='display: flex; flex-direction: column; gap:10px;'>
14
+ <span>Resting</span>
15
+ <div style='display: flex; flex-direction:column; gap:5px;'>
16
+ <PsRadioButton v-bind='$props' label='Label 1' size='big'/>
17
+ <PsRadioButton v-bind='$props' label='Label 2' size='small'/>
18
+ </div>
19
+ </div>
20
+ <div style='display: flex; flex-direction: column; gap:10px;'>
21
+ <span>Active</span>
22
+ <div style='display: flex; flex-direction:column; gap:5px;'>
23
+ <PsRadioButton v-bind='$props' label='Label 3' size='big' checked/>
24
+ <PsRadioButton v-bind='$props' label='Label 4' size='small' checked/>
25
+ </div>
26
+ </div>
27
+ <div style='display: flex; flex-direction: column; gap:10px;'>
28
+ <span>Disable</span>
29
+ <div style='display: flex; flex-direction:column; gap:5px;'>
30
+ <PsRadioButton v-bind='$props' label='Label 5' size='big' disabled/>
31
+ <PsRadioButton v-bind='$props' label='Label 6' size='small' disabled/>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ `
36
+ })
30
37
 
31
- export const Default = Template.bind({})
32
- Default.args = {}
33
38
 
34
- export const Small = Template.bind({})
35
- Small.args = {
36
- small: true,
37
- }
39
+ export const Default = DefaultTemplate.bind({})
40
+
@@ -0,0 +1,33 @@
1
+ import PsSwitch from '../components/controls/PsSwitch.vue'
2
+ export default {
3
+ title: 'Components/Switch',
4
+ component: PsSwitch,
5
+ }
6
+
7
+ const Template = (args, { argTypes }) => ({
8
+ props: Object.keys(argTypes),
9
+ components: { PsSwitch },
10
+ template: `
11
+ <div style='display: flex; gap:10px;'>
12
+ <div style='display: flex; gap: 10px; flex-direction: column; margin-right: 10px;'>
13
+ <span>Size</span>
14
+ <span>BIG</span>
15
+ <span>SMALL</span>
16
+ </div>
17
+ <div style='display: flex; gap: 10px; flex-direction: column;'>
18
+ <span>Disable</span>
19
+ <PsSwitch v-bind="$props" label='Switch1' :value="${false}" size='big'/>
20
+ <PsSwitch v-bind="$props" label='Switch2' :value="${false}" size='small'/>
21
+ </div>
22
+ <div style='display: flex; gap: 10px; flex-direction: column;'>
23
+ <span>Enable</span>
24
+ <PsSwitch v-bind="$props" label='Switch3' value size='big'/>
25
+ <PsSwitch v-bind="$props" label='Switch4' value size='small'/>
26
+ </div>
27
+ </div>
28
+ `
29
+ })
30
+
31
+ export const Default = Template.bind({})
32
+
33
+
@@ -1,58 +1,52 @@
1
- import PsToast, { typeOptions, fillOptions } from '../components/notifications/PsToast.vue'
1
+ import PsToast from '../components/notifications/PsToast.vue'
2
2
  export default {
3
3
  title: 'Components/Toast',
4
4
  component: PsToast,
5
- argTypes: {
6
- type: { control: { type: 'select', options: typeOptions } },
7
- fill: { control: { type: 'select', options: fillOptions } }
8
- },
9
5
  }
10
6
 
11
7
  const Template = (args, { argTypes }) => ({
12
8
  props: Object.keys(argTypes),
13
9
  components: { PsToast },
14
- methods: {
15
- teste(message) {
16
- alert(message)
17
- }
18
- },
19
10
  template: `
20
- <PsToast v-bind="$props">
21
- <template v-if="${'default' in args}" v-slot>${args.default}</template>
22
- </PsToast>
11
+ <div style="display: flex; gap: 30px;">
12
+ <div style="display: flex; flex-direction: column; gap: 5px; width:500px;">
13
+ <PsToast v-bind="$props" message="This is a info alert" layout="info" icon="info" fill="intense" >
14
+ <p>Action 1</p>
15
+ <p>Action 2</p>
16
+ </PsToast>
17
+ <PsToast v-bind="$props" message="This is a success alert" layout="success" icon="check_circle" >
18
+ <p>Action 1</p>
19
+ <p>Action 2</p>
20
+ </PsToast>
21
+ <PsToast v-bind="$props" message="This is a warning alert" layout="warning" icon="warning">
22
+ <p>Action 1</p>
23
+ <p>Action 2</p>
24
+ </PsToast>
25
+ <PsToast v-bind="$props" message="This is a an error alert" layout="error" icon="warning" >
26
+ <p>Action 1</p>
27
+ <p>Action 2</p>
28
+ </PsToast>
29
+ </div>
30
+ <div style="display: flex; flex-direction: column; gap: 5px; width:500px;">
31
+ <PsToast v-bind="$props" message="This is a info alert" layout="info" icon="info" fill="soft" >
32
+ <p>Action 1</p>
33
+ <p>Action 2</p>
34
+ </PsToast>
35
+ <PsToast v-bind="$props" message="This is a success alert" layout="success" icon="check_circle" fill="soft">
36
+ <p>Action 1</p>
37
+ <p>Action 2</p>
38
+ </PsToast>
39
+ <PsToast v-bind="$props" message="This is a warning alert" layout="warning" icon="warning" fill="soft">
40
+ <p>Action 1</p>
41
+ <p>Action 2</p>
42
+ </PsToast>
43
+ <PsToast v-bind="$props" message="This is a an error alert" layout="error" icon="warning" fill="soft">
44
+ <p>Action 1</p>
45
+ <p>Action 2</p>
46
+ </PsToast>
47
+ </div>
48
+ <div>
23
49
  `
24
50
  })
25
51
 
26
- export const Info = Template.bind({})
27
- Info.args = {
28
- type: 'info',
29
- message: 'This is an info alert',
30
- }
31
-
32
- export const Success = Template.bind({})
33
- Success.args = {
34
- type: 'success',
35
- message: 'This is a success alert',
36
- }
37
-
38
- export const Warning = Template.bind({})
39
- Warning.args = {
40
- type: 'warning',
41
- message: 'This is a warning alert',
42
- }
43
-
44
- export const Error = Template.bind({})
45
- Error.args = {
46
- type: 'error',
47
- message: 'This is an error alert',
48
- }
49
-
50
- export const Actions = Template.bind({})
51
- Actions.args = {
52
- type: 'info',
53
- message: 'This is an info alert with actions',
54
- default: `
55
- <span class="psui-cursor-pointer" @click="teste('Callback Action 1')">ACTION1</span>
56
- <span class="psui-cursor-pointer" @click="teste('Callback Action 2')">ACTION2</span>
57
- `
58
- }
52
+ export const Default = Template.bind({})
@@ -1,6 +1,6 @@
1
1
  import PsTooltip from '../components/tooltip/PsTooltip.vue'
2
2
  import PsRichTooltip from '../components/tooltip/PsRichTooltip.vue'
3
- import PsDialogTooltip,{ CSSCOLORS} from '../components/tooltip/PsDialogTooltip.vue'
3
+ import PsDialogTooltip from '../components/tooltip/PsDialogTooltip.vue'
4
4
 
5
5
  export default {
6
6
  title: 'Components/Tooltip',
@@ -12,103 +12,103 @@ const TemplateDialog = (args, {argTypes}) => ({
12
12
  props: Object.keys(argTypes),
13
13
  components: {PsDialogTooltip},
14
14
  template: `
15
- <div style='display: flex; justify-content: flex-end;'>
16
- <PsDialogTooltip v-bind='$props'>
17
- <p>Trigger</p>
18
- </PsDialogTooltip>
19
- <div>
15
+ <div style='display: flex; justify-content: space-between;'>
16
+ <PsDialogTooltip v-bind='$props' layout='white' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
17
+ <template v-slot:trigger>
18
+ <p>Trigger</p>
19
+ </template>
20
+ <template v-slot:content>
21
+ <p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
22
+ </template>
23
+ </PsDialogTooltip>
24
+ <PsDialogTooltip v-bind='$props' layout='dark' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
25
+ <template v-slot:trigger>
26
+ <p>Trigger</p>
27
+ </template>
28
+ <template v-slot:content>
29
+ <p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
30
+ </template>
31
+ </PsDialogTooltip>
32
+ <PsDialogTooltip v-bind='$props' layout='color' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
33
+ <template v-slot:trigger>
34
+ <p>Trigger</p>
35
+ </template>
36
+ <template v-slot:content>
37
+ <p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
38
+ </template>
39
+ </PsDialogTooltip>
40
+ </div>
20
41
  `,
21
- argTypes:{
22
- type: { control : { type: 'select', options: CSSCOLORS}}
23
- }
24
42
  })
25
43
 
26
44
  const TemplateRich = (args,{argTypes})=>({
27
45
  props: Object.keys(argTypes),
28
46
  components: {PsRichTooltip},
29
47
  template: `
30
- <div style='display: flex; justify-content: flex-end;'>
31
- <PsRichTooltip v-bind='$props'>
32
- <p>Trigger</p>
33
- </PsRichTooltip>
34
- </div>
35
- `
48
+ <div style='display: flex; justify-content: space-between;'>
49
+ <PsRichTooltip v-bind='$props' layout='red' title='Measures that are not cost-effective cannot be added to a combination' cssClass='psui-w-48'>
50
+ <template v-slot:trigger>
51
+ <p>Trigger</p>
52
+ </template>
53
+ <template v-slot:content>
54
+ <p>Here you can add an optional supporting text</p>
55
+ </template>
56
+ </PsRichTooltip>
57
+ <PsRichTooltip v-bind='$props' layout='blue' title='Select to create a combination of measures for your Policy' cssClass='psui-w-48'>
58
+ <template v-slot:trigger>
59
+ <p>Trigger</p>
60
+ </template>
61
+ <template v-slot:content>
62
+ <p>Here you can add an optional supporting text</p>
63
+ </template>
64
+ </PsRichTooltip>
65
+ <PsRichTooltip v-bind='$props' layout='gray' title='Did not account for the cost of combustion safety testing' cssClass='psui-w-48'>
66
+ <template v-slot:trigger>
67
+ <p>Trigger</p>
68
+ </template>
69
+ <template v-slot:content>
70
+ <p>Here you can add an optional supporting text</p>
71
+ </template>
72
+ </PsRichTooltip>
73
+ </div>
74
+ `
36
75
  })
37
76
 
38
-
39
- const TemplateRight = (args,{argTypes})=>({
40
- props: Object.keys(argTypes),
41
- components: {PsTooltip},
42
- template: `
43
- <div style='display: flex; justify-content: flex-end;'>
44
- <PsTooltip v-bind='$props'>
45
- <template v-slot:trigger>
46
- Trigger
47
- </template>
48
- </PsTooltip>
49
- </div>
50
- `
51
- })
52
-
53
- const TemplateMiddle = (args, {argTypes})=> ({
54
- props: Object.keys(argTypes),
55
- components: {PsTooltip},
56
- template: `
57
- <div style='display: flex; justify-content: center;'>
58
- <PsTooltip v-bind='$props'>
59
- <template v-slot:trigger>
60
- Trigger
61
- </template>
62
- </PsTooltip>
63
- </div>
64
- `
65
- })
66
-
67
- const TemplateLeft = (args, {argTypes}) => ({
68
- props: Object.keys(argTypes),
69
- components: {PsTooltip},
70
- template: `
71
- <div style='display: flex; justify-content: flex-start;'>
72
- <PsTooltip v-bind='$props'>
73
- <template v-slot:trigger>
74
- Trigger
75
- </template>
76
- </PsTooltip>
77
- </div>
78
- `
77
+ const TemplateDefault = (args, {argTypes}) => ({
78
+ props: Object.keys(argTypes),
79
+ components: {PsTooltip},
80
+ template: `
81
+ <div style='display: flex; justify-content: space-between;'>
82
+ <PsTooltip v-bind='$props'>
83
+ <template v-slot:trigger>
84
+ Trigger
85
+ </template>
86
+ <template v-slot:content>
87
+ Basic Tooltip
88
+ </template>
89
+ </PsTooltip>
90
+ <PsTooltip v-bind='$props'>
91
+ <template v-slot:trigger>
92
+ Trigger
93
+ </template>
94
+ <template v-slot:content>
95
+ Basic Tooltip
96
+ </template>
97
+ </PsTooltip>
98
+ <PsTooltip v-bind='$props'>
99
+ <template v-slot:trigger>
100
+ Trigger
101
+ </template>
102
+ <template v-slot:content>
103
+ Basic Tooltip
104
+ </template>
105
+ </PsTooltip>
106
+ </div>
107
+ `
79
108
  })
80
109
 
81
110
  export const Dialog = TemplateDialog.bind({})
82
- Dialog.args = {
83
- text: 'Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.',
84
- title: 'Duct Sealing',
85
- buttonText: 'More info',
86
- cssClass: 'psui-w-32',
87
- type: 'color'
88
- }
89
111
 
90
112
  export const Rich = TemplateRich.bind({})
91
- Rich.args = {
92
- type: 'blue',
93
- title: 'This is a test!!',
94
- text: 'Here goes your text',
95
- cssClass: 'psui-w-32'
96
- }
97
-
98
- export const RightSide = TemplateRight.bind({})
99
- RightSide.args = {
100
- title: 'This is a test!!!',
101
- type: 'red',
102
- }
103
-
104
- export const Middle = TemplateMiddle.bind({})
105
- Middle.args = {
106
- title: 'This is a test!!!',
107
- type: 'blue',
108
- }
109
113
 
110
- export const Left = TemplateLeft.bind({})
111
- Left.args = {
112
- title: 'This is a test!!!',
113
- type: 'gray',
114
- }
114
+ export const Default = TemplateDefault.bind({})
@@ -112,6 +112,7 @@ module.exports = {
112
112
  'even',
113
113
  'first',
114
114
  'disabled',
115
+ 'checked',
115
116
  ],
116
117
  textColor: [
117
118
  'responsive',
@@ -121,8 +122,13 @@ module.exports = {
121
122
  'group-hover',
122
123
  'first',
123
124
  'disabled',
125
+ 'checked',
126
+ ],
127
+ borderColor: [
128
+ 'disabled',
129
+ 'hover',
130
+ 'checked'
124
131
  ],
125
- borderColor: ['disabled'],
126
132
  extend: {},
127
133
  },
128
134
  plugins: [],
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 24 24" width="16px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#64b5ce"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/><circle cx="12" cy="12" r="5"/></svg>
@@ -1,38 +0,0 @@
1
- import PsSwitch, { sizes } from '../components/controls/PsSwitch.vue'
2
- export default {
3
- title: 'Components/Switch',
4
- component: PsSwitch,
5
- argTypes: {
6
- size: { control: { type: 'select', options: sizes } }
7
- },
8
- }
9
-
10
- const Template = (args, { argTypes }) => ({
11
- props: Object.keys(argTypes),
12
- components: { PsSwitch },
13
- data: () => {
14
- return {
15
- model: true
16
- }
17
- },
18
- template: `
19
- <div>
20
- <PsSwitch v-bind="$props" v-model="model" />
21
- <p>{{ model }}</p>
22
- </div>
23
- `
24
- })
25
-
26
- export const Big = Template.bind({})
27
- Big.args = {
28
- size: 'big',
29
- label: 'Switch Big',
30
- }
31
-
32
- export const Small = Template.bind({})
33
- Small.args = {
34
- size: 'small',
35
- label: 'Switch Small',
36
- small: true
37
- }
38
-