@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.91

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 (131) hide show
  1. package/.eslintrc.js +67 -81
  2. package/.github/workflows/deploy-storybook.yml +1 -1
  3. package/.storybook/PolicyStudio.js +10 -0
  4. package/.storybook/eventBus.js +3 -0
  5. package/.storybook/main.js +25 -0
  6. package/.storybook/manager.js +6 -0
  7. package/babel.config.js +3 -17
  8. package/backup-package-lock.json +37194 -0
  9. package/dist/css/psui_styles.css +110273 -4031
  10. package/package.json +33 -52
  11. package/postcss.config.js +1 -1
  12. package/src/assets/scss/base.scss +23 -27
  13. package/src/assets/scss/components/PsAccordion.scss +1 -1
  14. package/src/assets/scss/components/PsChips.scss +3 -3
  15. package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
  16. package/src/assets/scss/components/PsProgressBar.scss +4 -4
  17. package/src/assets/scss/components/PsTabHeader.scss +1 -1
  18. package/src/assets/scss/components/PsTableResults.scss +1 -1
  19. package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
  20. package/src/components/accordion/PsAccordion.vue +21 -20
  21. package/src/components/accordion/PsAccordionItem.vue +8 -30
  22. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +4 -8
  23. package/src/components/badges-and-tags/PsCardInfos.vue +1 -3
  24. package/src/components/badges-and-tags/PsChartLegend.vue +5 -19
  25. package/src/components/badges-and-tags/PsCostEffectBar.vue +5 -4
  26. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
  27. package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
  28. package/src/components/badges-and-tags/PsTestimonialCard.vue +4 -6
  29. package/src/components/buttons/PsButton.vue +88 -85
  30. package/src/components/chips/PsChips.vue +2 -5
  31. package/src/components/controls/PsCheckbox.vue +2 -5
  32. package/src/components/controls/PsCheckboxSimple.vue +4 -4
  33. package/src/components/controls/PsDraggable.vue +67 -70
  34. package/src/components/controls/PsInlineSelector.vue +14 -13
  35. package/src/components/controls/PsRadioButton.vue +5 -10
  36. package/src/components/controls/PsRadioButtonSimple.vue +3 -3
  37. package/src/components/controls/PsSlider.vue +6 -6
  38. package/src/components/controls/PsSwitch.vue +3 -13
  39. package/src/components/controls/PsToggle.vue +11 -14
  40. package/src/components/data-graphics/PsBarChart.vue +2 -4
  41. package/src/components/datatable/PsDataTable.vue +5 -14
  42. package/src/components/datatable/PsDataTableItem.vue +4 -17
  43. package/src/components/forms/PsDropdown.vue +5 -8
  44. package/src/components/forms/PsDropdownList.vue +1 -1
  45. package/src/components/forms/PsInput.vue +14 -30
  46. package/src/components/forms/PsInputSelect.vue +11 -33
  47. package/src/components/forms/PsInputTextArea.vue +4 -15
  48. package/src/components/navigations/PsBreadcrumb.vue +1 -1
  49. package/src/components/notifications/PsDialog.vue +5 -11
  50. package/src/components/notifications/PsSimpleAlert.vue +10 -22
  51. package/src/components/notifications/PsToast.vue +3 -8
  52. package/src/components/playground/PsScrollBar.vue +50 -122
  53. package/src/components/table-results/PsTableResults.vue +60 -76
  54. package/src/components/table-results/PsTableResultsBody.vue +1 -3
  55. package/src/components/table-results/PsTableResultsHead.vue +13 -32
  56. package/src/components/table-results/PsTableResultsHeadComparison.vue +8 -24
  57. package/src/components/table-results/PsTableResultsHeadFlexible.vue +11 -23
  58. package/src/components/table-results/PsTableResultsRow.vue +2 -6
  59. package/src/components/tabs/PsTabHeader.vue +16 -19
  60. package/src/components/tooltip/PsDialogTooltip.vue +8 -18
  61. package/src/components/tooltip/PsRichTooltip.vue +5 -12
  62. package/src/components/tooltip/PsTooltip.vue +9 -17
  63. package/src/components/ui/PsDotLoader.vue +5 -5
  64. package/src/components/ui/PsIcon.vue +2 -6
  65. package/src/{index.ts → index.js} +1 -0
  66. package/src/stories/{Accordion.stories.ts → Accordion.stories.js} +2 -2
  67. package/src/stories/{BadgeWithIcon.stories.ts → BadgeWithIcon.stories.js} +1 -1
  68. package/src/stories/{BarChart.stories.ts → BarChart.stories.js} +1 -1
  69. package/src/stories/{Breadcrumb.stories.ts → Breadcrumb.stories.js} +4 -1
  70. package/src/stories/Button.stories.js +130 -0
  71. package/src/stories/{CardInfos.stories.ts → CardInfos.stories.js} +2 -1
  72. package/src/stories/{ChartLegend.stories.ts → ChartLegend.stories.js} +2 -1
  73. package/src/stories/{Checkbox.stories.ts → Checkbox.stories.js} +1 -1
  74. package/src/stories/{CheckboxSimple.stories.ts → CheckboxSimple.stories.js} +1 -1
  75. package/src/stories/{Chips.stories.ts → Chips.stories.js} +22 -24
  76. package/src/stories/{ClimateZoneBadge.stories.ts → ClimateZoneBadge.stories.js} +1 -1
  77. package/src/stories/{CostEffectBar.stories.ts → CostEffectBar.stories.js} +1 -1
  78. package/src/stories/{Datatable.stories.ts → Datatable.stories.js} +2 -2
  79. package/src/stories/{DateCardInfo.stories.ts → DateCardInfo.stories.js} +5 -1
  80. package/src/stories/{ElevationSystem.mdx → ElevationSystem.stories.mdx} +1 -1
  81. package/src/stories/{InlineSelector.stories.ts → InlineSelector.stories.js} +1 -1
  82. package/src/stories/{InputTextArea.stories.ts → InputTextArea.stories.js} +1 -1
  83. package/src/stories/{Introduction.mdx → Introduction.stories.mdx} +101 -101
  84. package/src/stories/{RadioButtonSimple.stories.ts → RadioButtonSimple.stories.js} +1 -1
  85. package/src/stories/{Toggle.stories.ts → Toggle.stories.js} +1 -1
  86. package/src/stories/{Tooltip.stories.ts → Tooltip.stories.js} +3 -3
  87. package/src/stories/{Typography.mdx → Typography.stories.mdx} +105 -107
  88. package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +4 -4
  89. package/src/util/{imageLoader.ts → imageLoader.js} +7 -7
  90. package/tailwind.config.js +2 -11
  91. package/.eslintignore +0 -1
  92. package/.storybook/PolicyStudio.ts +0 -11
  93. package/.storybook/eventBus.ts +0 -26
  94. package/.storybook/main.ts +0 -21
  95. package/.storybook/manager.ts +0 -7
  96. package/scripts/kill-port.sh +0 -12
  97. package/src/App.vue +0 -30
  98. package/src/shims-vue.d.ts +0 -11
  99. package/src/stories/Button.stories.ts +0 -48
  100. package/src/stories/Button.vue +0 -59
  101. package/src/stories/Header.stories.ts +0 -41
  102. package/src/stories/Header.vue +0 -77
  103. package/src/stories/button.css +0 -30
  104. package/src/stories/header.css +0 -32
  105. package/tsconfig.json +0 -42
  106. package/webpack.config.js +0 -22
  107. /package/.storybook/{preview.ts → preview.js} +0 -0
  108. /package/src/contents/{ComparisonData.ts → ComparisonData.js} +0 -0
  109. /package/src/contents/{FlexibleData.ts → FlexibleData.js} +0 -0
  110. /package/src/contents/{ResultsData.ts → ResultsData.js} +0 -0
  111. /package/src/stories/{Colors.mdx → Colors.stories.mdx} +0 -0
  112. /package/src/stories/{Dialog.stories.ts → Dialog.stories.js} +0 -0
  113. /package/src/stories/{Draggable.stories.ts → Draggable.stories.js} +0 -0
  114. /package/src/stories/{Dropdown.stories.ts → Dropdown.stories.js} +0 -0
  115. /package/src/stories/{DropdownList.stories.ts → DropdownList.stories.js} +0 -0
  116. /package/src/stories/{HighlightRippleDot.stories.ts → HighlightRippleDot.stories.js} +0 -0
  117. /package/src/stories/{Icon.stories.ts → Icon.stories.js} +0 -0
  118. /package/src/stories/{Input.stories.ts → Input.stories.js} +0 -0
  119. /package/src/stories/{InputSelect.stories.ts → InputSelect.stories.js} +0 -0
  120. /package/src/stories/{MiniTag.stories.ts → MiniTag.stories.js} +0 -0
  121. /package/src/stories/{Playground.stories.ts → Playground.stories.js} +0 -0
  122. /package/src/stories/{ProgressBar.stories.ts → ProgressBar.stories.js} +0 -0
  123. /package/src/stories/{RadioButton.stories.ts → RadioButton.stories.js} +0 -0
  124. /package/src/stories/{SimpleAlert.stories.ts → SimpleAlert.stories.js} +0 -0
  125. /package/src/stories/{Slider.stories.ts → Slider.stories.js} +0 -0
  126. /package/src/stories/{Switch.stories.ts → Switch.stories.js} +0 -0
  127. /package/src/stories/{TabHeader.stories.ts → TabHeader.stories.js} +0 -0
  128. /package/src/stories/{TableResults.stories.ts → TableResults.stories.js} +0 -0
  129. /package/src/stories/{TagScope.stories.ts → TagScope.stories.js} +0 -0
  130. /package/src/stories/{TestimonialCard.stories.ts → TestimonialCard.stories.js} +0 -0
  131. /package/src/stories/{Toast.stories.ts → Toast.stories.js} +0 -0
@@ -1,24 +1,21 @@
1
1
  <template>
2
2
  <div
3
3
  ref="tooltip"
4
- class="psui-el-tooltip"
4
+ class='psui-el-tooltip'
5
5
  @mouseenter="open"
6
6
  @mouseleave="close"
7
7
  >
8
- <div
9
- ref="tooltiptrigger"
10
- class="psui-el-tooltip-trigger"
11
- >
12
- <slot name="trigger" />
8
+ <div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
9
+ <slot name="trigger"></slot>
13
10
  </div>
14
11
 
15
12
  <div
16
- class="psui-el-tooltip-wrapper"
13
+ class='psui-el-tooltip-wrapper'
17
14
  >
18
15
  <div
19
16
  role="menu"
20
17
  ref="dialog"
21
- class="psui-el-tooltip-dialog"
18
+ class='psui-el-tooltip-dialog'
22
19
  :class="cssClass"
23
20
  >
24
21
  <div
@@ -26,14 +23,9 @@
26
23
  aria-orientation="vertical"
27
24
  :class="getComponentClass"
28
25
  >
29
- <h2 v-if="title">
30
- {{ title }}
31
- </h2>
32
- <div
33
- v-else
34
- class="psui-el-tooltip-content-wrapper"
35
- >
36
- <slot name="content" />
26
+ <h2 v-if="title">{{ title}}</h2>
27
+ <div v-else class="psui-el-tooltip-content-wrapper">
28
+ <slot name="content"></slot>
37
29
  </div>
38
30
  </div>
39
31
  </div>
@@ -102,7 +94,7 @@ export default {
102
94
  mounted() {
103
95
  document.addEventListener('resize', this.updatePosition)
104
96
  },
105
- beforeUnmount() {
97
+ beforeDestroy() {
106
98
  document.removeEventListener('resize', this.updatePosition)
107
99
  },
108
100
  methods: {
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="psui-el-dotloader">
3
- <div class="psui-el-dotloader-wrapper">
4
- <span />
5
- <span />
6
- <span />
7
- </div>
3
+ <div class="psui-el-dotloader-wrapper">
4
+ <span></span>
5
+ <span></span>
6
+ <span></span>
7
+ </div>
8
8
  </div>
9
9
  </template>
10
10
 
@@ -8,11 +8,7 @@
8
8
  >
9
9
  {{ getIcon }}
10
10
  </span>
11
- <img
12
- v-else-if="getIconType === 'url'"
13
- :src="icon"
14
- :class="[iconClasses]"
15
- >
11
+ <img v-else-if="getIconType === 'url'" :src="icon" :class="[iconClasses]" />
16
12
  <inline-svg
17
13
  v-else
18
14
  :src="icon"
@@ -20,7 +16,7 @@
20
16
  :height="size"
21
17
  :stroke="getColor"
22
18
  :fill="getColor"
23
- />
19
+ ></inline-svg>
24
20
  </div>
25
21
  </template>
26
22
 
@@ -1,3 +1,4 @@
1
+
1
2
  /**
2
3
  * General Components
3
4
  */
@@ -8,8 +8,8 @@ export default {
8
8
  }
9
9
 
10
10
 
11
- export const Index = (args:any, { argTypes }: { argTypes:any }) => ({
12
- props: Object.keys({argTypes, args}),
11
+ export const Index = (args, { argTypes }) => ({
12
+ props: Object.keys(argTypes, args),
13
13
  components: { PsAccordion, PsAccordionItem },
14
14
  template:
15
15
  `
@@ -7,7 +7,7 @@ export default {
7
7
  },
8
8
  }
9
9
 
10
- const TemplateDefault = (args:any, {argTypes}:{argTypes:any})=>({
10
+ const TemplateDefault = (args, {argTypes})=>({
11
11
  props: Object.keys(argTypes),
12
12
  components:{PsBadgeWithIcon},
13
13
  template: `
@@ -4,7 +4,7 @@ export default {
4
4
  component: PsBarChart,
5
5
  }
6
6
 
7
- const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
7
+ const defaultTemplate = (args, {argTypes}) => ({
8
8
  props: Object.keys(argTypes),
9
9
  components: { PsBarChart },
10
10
  template: `
@@ -11,7 +11,7 @@ const items = [
11
11
  { title: '4th level', route: '' },
12
12
  ]
13
13
 
14
- const Template = (args:any, { argTypes }:{argTypes:any}) => ({
14
+ const Template = (args, { argTypes }) => ({
15
15
  props: Object.keys(argTypes),
16
16
  components: { PsBreadcrumb },
17
17
  template: `
@@ -20,3 +20,6 @@ const Template = (args:any, { argTypes }:{argTypes:any}) => ({
20
20
  })
21
21
 
22
22
  export const Default = Template.bind({})
23
+ Default.args = {
24
+ items: items,
25
+ }
@@ -0,0 +1,130 @@
1
+ import PsButton, { sizes } from '../components/buttons/PsButton.vue'
2
+ const icons = ['add_circle', 'delete', 'done', 'info', 'send']
3
+ export default {
4
+ title: 'Components/Button',
5
+ component: PsButton,
6
+ argTypes: {
7
+ size: { control: { type: 'select', options: sizes } },
8
+ disabled: { control: 'boolean' },
9
+ icon: { control: { type: 'select', options: icons } },
10
+ iconRight: { control: { type: 'select', options: icons } },
11
+ },
12
+ }
13
+
14
+ const TemplateDefault = (args, { argTypes }) => ({
15
+ props: Object.keys(argTypes),
16
+ components: { PsButton },
17
+ template: `
18
+ <div style="display:flex; flex-direction: column;">
19
+ <p>Size: Big</p>
20
+ <div style="display: flex; flex-direction: column; gap: 10px;">
21
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;">
22
+ <span style="text-align: center; color: black;">Solid Style</span>
23
+ <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left'/>
24
+ <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right'/>
25
+ <PsButton label='Text Only' layout='solid' />
26
+ <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled/>
27
+ <PsButton label='Loading Solid' layout='solid' icon='verified' iconPosition='left' loading />
28
+ </div>
29
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
30
+ <span style="text-align: center; color: blue;">Outline Style</span>
31
+ <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
32
+ <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
33
+ <PsButton label='Text Only' layout='outline'/>
34
+ <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
35
+ <PsButton label='Loading Outline' layout='outline' icon='verified' iconPosition='left' loading />
36
+ </div>
37
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
38
+ <span style="text-align: center; color: brown;">Ghost Style</span>
39
+ <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
40
+ <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
41
+ <PsButton label='Text Only' layout='ghost' />
42
+ <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
43
+ <PsButton label='Loading Ghost' layout='ghost' icon='verified' iconPosition='left' loading />
44
+ </div>
45
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
46
+ <span style="text-align: center; color: green;">Only-Text Style</span>
47
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
48
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
49
+ <PsButton label='Text Only' layout='onlytext'/>
50
+ <PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
51
+ <PsButton label='Loading Only-Text' layout='onlytext' icon='verified' iconPosition='left' loading />
52
+ </div>
53
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
54
+ <span style="text-align: center; color: red;">Caution Button</span>
55
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left'/>
56
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right'/>
57
+ <PsButton label='Text Only' layout='caution' />
58
+ <PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled/>
59
+ <PsButton label='Loading Caution' layout='caution' icon='verified' iconPosition='left' loading />
60
+ </div>
61
+
62
+
63
+ </div>
64
+ <p>Size: Medium</p>
65
+ <div style="display: flex; flex-direction: column; gap: 10px;">
66
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
67
+ <span style="text-align: center; color: black;">Solid Style</span>
68
+ <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
69
+ <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
70
+ <PsButton label='Text Only' layout='solid' size='medium'/>
71
+ <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
72
+ </div>
73
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
74
+ <span style="text-align: center; color: blue;">Outline Style</span>
75
+ <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
76
+ <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
77
+ <PsButton label='Text Only' layout='outline' size='medium'/>
78
+ <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
79
+ </div>
80
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
81
+ <span style="text-align: center; color: brown;">Ghost Style</span>
82
+ <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
83
+ <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
84
+ <PsButton label='Text Only' layout='ghost' size='medium'/>
85
+ <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
86
+ </div>
87
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
88
+ <span style="text-align: center; color: green;">Only-Text Style</span>
89
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
90
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
91
+ <PsButton label='Text Only' layout='onlytext' size='medium'/>
92
+ <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
93
+ </div>
94
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
95
+ <span style="text-align: center; color: red;">Caution Button</span>
96
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='medium'/>
97
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='medium'/>
98
+ <PsButton label='Text Only' layout='caution' size='medium'/>
99
+ <PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled size='medium'/>
100
+ </div>
101
+ </div>
102
+ <p>Size: Small</p>
103
+ <div style="display: flex; flex-direction: column; gap: 10px;">
104
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
105
+ <span style="text-align: center; color: black;">Solid Style</span>
106
+ <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
107
+ <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
108
+ <PsButton label='Text Only' layout='solid' size='small'/>
109
+ <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
110
+ </div>
111
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
112
+ <span style="text-align: center; color: green;">Only-Text Style</span>
113
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
114
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
115
+ <PsButton label='Text Only' layout='onlytext' size='small'/>
116
+ <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
117
+ </div>
118
+ <div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
119
+ <span style="text-align: center; color: red;">Caution Button</span>
120
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='small'/>
121
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='small'/>
122
+ <PsButton label='Text Only' layout='caution' size='small'/>
123
+ <PsButton label='Disabled' layout='caution' disabled icon='verified' iconPosition='left' size='small'/>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ `,
128
+ })
129
+
130
+ export const Default = TemplateDefault.bind({})
@@ -6,10 +6,11 @@ export default {
6
6
  argTypes: {},
7
7
  }
8
8
 
9
- const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
9
+ const Template = (args, { argTypes }) => ({
10
10
  props: Object.keys(argTypes),
11
11
  components: { PsCardInfos },
12
12
  template: '<PsCardInfos v-bind="$props" />',
13
13
  })
14
14
 
15
15
  export const CardInfos = Template.bind({})
16
+ CardInfos.args = {}
@@ -6,10 +6,11 @@ export default {
6
6
  argTypes: {},
7
7
  }
8
8
 
9
- const Template = (args:any, { argTypes } : { argTypes:any }) => ({
9
+ const Template = (args, { argTypes }) => ({
10
10
  props: Object.keys(argTypes),
11
11
  components: { PsChartLegend },
12
12
  template: '<PsChartLegend v-bind="$props" />',
13
13
  })
14
14
 
15
15
  export const ChartLegend = Template.bind({})
16
+ ChartLegend.args = {}
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsCheckbox,
6
6
  }
7
7
 
8
- const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
8
+ const defaultTemplate = (args, {argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsCheckbox},
11
11
  template: `
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsCheckboxSimple,
6
6
  }
7
7
 
8
- const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
8
+ const defaultTemplate = (args, {argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsCheckboxSimple },
11
11
  data: () => ({
@@ -1,33 +1,31 @@
1
1
  import PsChips from '../components/chips/PsChips.vue'
2
- import type { Meta, StoryObj } from '@storybook/vue3'
3
2
 
4
- import * as HeaderStories from '../stories/Header.stories'
5
-
6
- const meta: Meta<typeof PsChips> = {
7
- component: PsChips
3
+ export default {
4
+ title: 'Components/Chips',
5
+ component: PsChips,
8
6
  }
9
7
 
10
- export default meta
11
-
12
- type Story = StoryObj<typeof PsChips>
13
-
14
- export const Primary: Story = {
15
- render: (args) => ({
16
- components: { PsChips },
17
- setup(){
18
- return { args }
19
- },
20
- template: `<div style="display:flex; gap: 10px;">
8
+ const Template = (args, { argTypes }) => ({
9
+ props: Object.keys(argTypes),
10
+ components: { PsChips },
11
+ data: ()=>{
12
+ return{
13
+ isChecked: true,
14
+ isCheckedTwo: null,
15
+ }
16
+ },
17
+ template: `<div style="display:flex; gap: 10px;">
18
+ <PsChips v-bind='$props' type="button" @update:checked='isChecked = $event' :checked='isChecked'/>
21
19
  <PsChips v-bind='$props' label="Simple chips with icons" type="button" layout="with-icon" icon="home" @update:checked='isChecked = $event' :checked='isChecked'/>
22
20
  <PsChips v-bind='$props' label="Radio chips" type="radio" @update:checked='isChecked = $event' :checked='isChecked'/>
23
21
  <PsChips v-bind='$props' label="Checkbox chips" type="checkbox" @update:checked='isCheckedTwo = $event' :checked='isCheckedTwo'/>
24
22
  <PsChips v-bind='$props' label="Rich chips" type="button" layout="rich" icon="text_snippet" @update:checked='isChecked = $event' :checked='isChecked'/>
25
23
  </div>
26
- `,
27
- args:{
28
- label: 'Simple Chip',
29
- icon:'',
30
- ...HeaderStories.LoggedIn.args
31
- }
32
- })
33
- }
24
+ `
25
+ })
26
+
27
+ export const Default = Template.bind({})
28
+ Default.args = {
29
+ label: 'Simple Chip',
30
+ icon:'',
31
+ }
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsClimateZoneBadge,
6
6
  }
7
7
 
8
- const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
8
+ const Template = (args, { argTypes }) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsClimateZoneBadge },
11
11
  template: '<PsClimateZoneBadge v-bind="$props" />',
@@ -13,7 +13,7 @@ export default {
13
13
  },
14
14
  }
15
15
 
16
- const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
16
+ const Template = (args, { argTypes }) => ({
17
17
  props: Object.keys(argTypes),
18
18
  components: { PsCostEffectBar },
19
19
  template: '<PsCostEffectBar v-bind="$props" />',
@@ -10,7 +10,7 @@ export default {
10
10
  }
11
11
  }
12
12
 
13
- const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
13
+ const Template = (args, { argTypes }) => ({
14
14
  props: Object.keys(argTypes),
15
15
  components: {PsDataTable},
16
16
  template: `
@@ -20,7 +20,7 @@ const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
20
20
  `
21
21
  })
22
22
 
23
- const RichTemplate = (args:any, { argTypes }:{ argTypes:any } ) => ({
23
+ const RichTemplate = (args, { argTypes } ) => ({
24
24
  props: Object.keys(argTypes),
25
25
  components: {PsDataTable, PsDataTableItem},
26
26
  template: `
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsDateCardInfo,
6
6
  }
7
7
 
8
- const Template = (args:any, {argTypes}:{argTypes:any}) => ({
8
+ const Template = (args,{argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components:{PsDateCardInfo},
11
11
  template: `
@@ -18,3 +18,7 @@ export default {
18
18
  })
19
19
 
20
20
  export const Default = Template.bind({})
21
+
22
+ Default.args = {
23
+ date: '2021/02/23'
24
+ }
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from '@storybook/addon-docs';
1
+ import { Canvas, Meta, Story } from '@storybook/addon-docs';
2
2
 
3
3
  <Meta title="Elevation system" />
4
4
 
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsInlineSelector,
6
6
  }
7
7
 
8
- const TemplateDefault = (args:any, {argTypes}:{argTypes:any}) => ({
8
+ const TemplateDefault = (args, {argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: {PsInlineSelector},
11
11
  template: `
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsInputTextArea,
6
6
  }
7
7
 
8
- const Template = (args:any, {argTypes}:{argTypes:any}) => ({
8
+ const Template = (args, {argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: {PsInputTextArea},
11
11
  template: `