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

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 (84) hide show
  1. package/.eslintrc.js +36 -35
  2. package/.storybook/preview.js +7 -1
  3. package/README.md +6 -2
  4. package/babel.config.js +1 -1
  5. package/dist/css/psui_styles.css +1580 -185
  6. package/package.json +16 -5
  7. package/postcss.config.js +1 -1
  8. package/src/assets/scss/base.scss +3 -0
  9. package/src/assets/scss/components/PsAccordion.scss +28 -11
  10. package/src/assets/scss/components/PsButton.scss +39 -18
  11. package/src/assets/scss/components/PsCardInfos.scss +1 -1
  12. package/src/assets/scss/components/PsCheckbox.scss +4 -5
  13. package/src/assets/scss/components/PsChips.scss +13 -8
  14. package/src/assets/scss/components/PsClimateZoneBadge.scss +1 -1
  15. package/src/assets/scss/components/PsCostEffectBar.scss +22 -27
  16. package/src/assets/scss/components/PsDataTable.scss +17 -0
  17. package/src/assets/scss/components/PsDialog.scss +5 -2
  18. package/src/assets/scss/components/PsDotLoader.scss +45 -0
  19. package/src/assets/scss/components/PsDraggable.scss +64 -0
  20. package/src/assets/scss/components/PsDropdown.scss +9 -24
  21. package/src/assets/scss/components/PsDropdownList.scss +19 -0
  22. package/src/assets/scss/components/PsInlineSelector.scss +40 -25
  23. package/src/assets/scss/components/PsInput.scss +8 -3
  24. package/src/assets/scss/components/PsInputSelect.scss +6 -3
  25. package/src/assets/scss/components/PsInputTextArea.scss +5 -2
  26. package/src/assets/scss/components/PsMiniTag.scss +3 -3
  27. package/src/assets/scss/components/PsRadioButton.scss +5 -5
  28. package/src/assets/scss/components/PsSwitch.scss +4 -4
  29. package/src/assets/scss/components/PsTabHeader.scss +14 -0
  30. package/src/assets/scss/components/PsToast.scss +3 -3
  31. package/src/assets/scss/components/PsToggle.scss +6 -2
  32. package/src/assets/scss/components/PsTooltip.scss +50 -18
  33. package/src/components/accordion/PsAccordion.vue +7 -23
  34. package/src/components/accordion/PsAccordionItem.vue +42 -26
  35. package/src/components/badges-and-tags/PsCardInfos.vue +12 -0
  36. package/src/components/badges-and-tags/PsChartLegend.vue +13 -0
  37. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +7 -0
  38. package/src/components/badges-and-tags/PsCostEffectBar.vue +6 -0
  39. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -1
  40. package/src/components/badges-and-tags/PsMiniTag.vue +6 -0
  41. package/src/components/badges-and-tags/PsProgressBar.vue +17 -9
  42. package/src/components/buttons/PsButton.vue +27 -2
  43. package/src/components/chips/PsChips.vue +33 -13
  44. package/src/components/controls/PsCheckbox.vue +32 -16
  45. package/src/components/controls/PsDraggable.vue +39 -150
  46. package/src/components/controls/PsInlineSelector.vue +34 -16
  47. package/src/components/controls/PsRadioButton.vue +28 -15
  48. package/src/components/controls/PsSlider.vue +1 -1
  49. package/src/components/controls/PsSwitch.vue +20 -11
  50. package/src/components/controls/PsToggle.vue +33 -12
  51. package/src/components/datatable/PsDataTable.vue +21 -1
  52. package/src/components/datatable/PsDataTableItem.vue +1 -1
  53. package/src/components/forms/PsDropdown.vue +73 -101
  54. package/src/components/forms/PsDropdownList.vue +82 -0
  55. package/src/components/forms/PsInput.vue +28 -1
  56. package/src/components/forms/PsInputSelect.vue +21 -0
  57. package/src/components/forms/PsInputTextArea.vue +54 -41
  58. package/src/components/notifications/PsDialog.vue +15 -0
  59. package/src/components/notifications/PsToast.vue +12 -0
  60. package/src/components/playground/PsScrollBar.vue +54 -0
  61. package/src/components/tabs/PsTabHeader.vue +31 -5
  62. package/src/components/tooltip/PsDialogTooltip.vue +107 -24
  63. package/src/components/tooltip/PsRichTooltip.vue +12 -9
  64. package/src/components/tooltip/PsTooltip.vue +27 -11
  65. package/src/components/ui/PsDotLoader.vue +15 -0
  66. package/src/components/ui/PsIcon.vue +30 -0
  67. package/src/index.js +39 -7
  68. package/src/stories/Accordion.stories.js +12 -48
  69. package/src/stories/Button.stories.js +30 -7
  70. package/src/stories/Chips.stories.js +16 -4
  71. package/src/stories/Colors.stories.mdx +1 -0
  72. package/src/stories/Dropdown.stories.js +81 -14
  73. package/src/stories/InlineSelector.stories.js +1 -1
  74. package/src/stories/Playground.stories.js +16 -0
  75. package/src/stories/Switch.stories.js +8 -2
  76. package/src/stories/Toast.stories.js +16 -16
  77. package/src/stories/Tooltip.stories.js +6 -6
  78. package/src/stories/Typography.stories.mdx +22 -18
  79. package/src/util/GeneralFunctions.js +8 -0
  80. package/src/util/imageLoader.js +1 -1
  81. package/tailwind.config.js +8 -3
  82. package/vetur/attributes.json +1376 -0
  83. package/vetur/tags.json +632 -0
  84. package/src/components/forms/PsDropdownCopy.vue +0 -212
@@ -7,18 +7,26 @@
7
7
 
8
8
  <template v-for="item in getItems">
9
9
  <slot v-bind:item="item" >
10
+ <PsRichTooltip v-if="item.tooltip" :title="item.tooltip" layout="blue">
11
+ <template v-slot:trigger>
12
+ <button
13
+ :key="item[keyValue]"
14
+ type="button"
15
+ @click="selectTab(item)"
16
+ :class="getButtonClass(item)"
17
+ >
18
+ <span>{{ item[keyLabel] }}</span>
19
+ </button>
20
+ </template>
21
+ </PsRichTooltip>
10
22
  <button
23
+ v-else
11
24
  :key="item[keyValue]"
12
25
  type="button"
13
26
  @click="selectTab(item)"
14
27
  :class="getButtonClass(item)"
15
28
  >
16
- <PsRichTooltip v-if="item.tooltip" :title="item.tooltip" type="blue">
17
- <template v-slot:trigger>
18
29
  <span>{{ item[keyLabel] }}</span>
19
- </template>
20
- </PsRichTooltip>
21
- <span v-else>{{ item[keyLabel] }}</span>
22
30
  </button>
23
31
  </slot>
24
32
  </template>
@@ -31,27 +39,45 @@ export default {
31
39
  name: 'PsTabHeader',
32
40
  components: { PsRichTooltip },
33
41
  props: {
42
+ /**
43
+ * It sets the layout of the tabheader. eg: standard, underline and folder.
44
+ */
34
45
  layout: {
35
46
  type: String,
36
47
  default: 'standard',
37
48
  validator: (value) => ['standard', 'underline', 'folder'].includes(value)
38
49
  },
50
+ /**
51
+ * It sets the tabs which will be rendered.
52
+ */
39
53
  items: {
40
54
  type: Array,
41
55
  required: true
42
56
  },
57
+ /**
58
+ * It sets the key label of the items if needed.
59
+ */
43
60
  keyLabel: {
44
61
  type: String,
45
62
  default: 'label'
46
63
  },
64
+ /**
65
+ * It sets the key value of the items if needed.
66
+ */
47
67
  keyValue: {
48
68
  type: String,
49
69
  default: 'value'
50
70
  },
71
+ /**
72
+ * It disabled the tab header. All mouse events are disabled.
73
+ */
51
74
  disabled: {
52
75
  type: Boolean,
53
76
  default: false
54
77
  },
78
+ /**
79
+ * It sets the tab seleced.
80
+ */
55
81
  selected: {},
56
82
  },
57
83
  computed: {
@@ -1,52 +1,135 @@
1
1
  <template>
2
- <PsTooltip :layout="layout" :cssClass="cssClass" :title="title">
3
- <template v-slot:trigger>
2
+ <div @mouseenter="open" v-click-outside="close" ref="tooltip" class='psui-el-tooltip'>
3
+ <div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
4
4
  <slot name="trigger"></slot>
5
- </template>
6
- <template
7
- v-slot:content
8
- >
9
- <slot name="content"></slot>
10
- <button
11
- v-if="buttonText"
12
- @click="onClick"
5
+ </div>
6
+
7
+ <div class='psui-el-tooltip-wrapper'>
8
+ <div
9
+ role="menu"
10
+ ref="dialog"
11
+ class='psui-el-tooltip-dialog'
12
+ :class="cssClass"
13
13
  >
14
- {{ buttonText }}
15
- </button>
16
- </template>
17
- </PsTooltip>
14
+ <div
15
+ class="psui-el-tooltip-content"
16
+ aria-orientation="vertical"
17
+ :class="getComponentClass"
18
+ >
19
+ <h2 v-if="title">{{ title}}</h2>
20
+ <div class="psui-el-tooltip-content-wrapper">
21
+ <slot name="content"></slot>
22
+ <button
23
+ v-if="buttonText"
24
+ @click="onClick"
25
+ >
26
+ {{ buttonText }}
27
+ </button>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
18
33
  </template>
19
34
 
20
35
  <script>
21
- import PsTooltip from "./PsTooltip.vue"
22
36
 
23
37
  export default {
24
- name: "PsDialogTooltip",
25
- components: { PsTooltip },
38
+ name: 'PsDialogTooltip',
26
39
  props: {
27
- text: {
28
- type: String,
29
- },
40
+ /**
41
+ * It sets the title of the tooltip if needed.
42
+ */
30
43
  title: {
31
44
  type: String,
32
45
  },
46
+ /**
47
+ * It sets the label of the button within the tooltip if needed.
48
+ */
33
49
  buttonText: {
34
50
  type: String,
35
51
  },
52
+ /**
53
+ * It sets the layout of the tooltip. eg: white, dark and color.
54
+ */
36
55
  layout: {
37
56
  type: String,
38
- default: "white",
39
- validator: (value) => ["white", "dark", "color"].includes(value),
57
+ default: 'white',
58
+ validator: (value) => ['white', 'dark', 'color'].includes(value),
40
59
  },
60
+ /**
61
+ * It sets a additional styling if needed.
62
+ */
41
63
  cssClass: {
42
64
  type: String,
43
65
  required: false,
44
66
  },
45
67
  },
46
- emits: ["click"],
68
+ inheritAttrs: true,
69
+ emits: ['show', 'click'],
70
+ data() {
71
+ return {
72
+ show: false,
73
+ closingTimeout: null,
74
+ }
75
+ },
76
+ computed:{
77
+ getComponentClass(){
78
+ return `layout-${this.layout}`
79
+ }
80
+ },
81
+ mounted() {
82
+ document.addEventListener('resize', this.updatePosition)
83
+ },
84
+ beforeDestroy() {
85
+ document.removeEventListener('resize', this.updatePosition)
86
+ },
47
87
  methods: {
88
+ open() {
89
+ if (this.show || this.ignoreDialog) return
90
+ this.$emit('show')
91
+ this.show = true
92
+
93
+ this.$refs.dialog.style.display = 'block'
94
+ this.$refs.dialog.style.opacity = 0
95
+
96
+ setTimeout(() => {
97
+ this.updatePosition()
98
+ }, 10)
99
+ },
100
+ close() {
101
+ if (this.show && this.$refs.dialog) {
102
+ this.$emit('close')
103
+ this.show = false
104
+
105
+ this.$refs.dialog.style.display = 'none'
106
+ }
107
+ },
108
+ updatePosition() {
109
+ const dialog = this.$refs.dialog
110
+ const trigger = this.$refs.tooltiptrigger
111
+
112
+ const rectDialog = dialog.getBoundingClientRect()
113
+ const rectTrigger = trigger.getBoundingClientRect()
114
+ const windowWidth = document.documentElement.clientWidth
115
+ dialog.style.top = `${rectTrigger.y + rectTrigger.height + 8}px`
116
+
117
+ if (rectTrigger.x + rectDialog.width + 20 > windowWidth) {
118
+ dialog.style.left = `${windowWidth - rectDialog.width - 30}px`
119
+ } else if (rectTrigger.x - Math.abs(rectTrigger.width-rectDialog.width) < 0) {
120
+ dialog.style.left = `${rectTrigger.x + 10}px`
121
+ } else if (rectDialog.width >= rectTrigger.width){
122
+ dialog.style.left = `${rectTrigger.x - ((rectDialog.width - rectTrigger.width)/2)}px`
123
+ } else {
124
+ dialog.style.left = `${rectTrigger.x + ((rectTrigger.width - rectDialog.width)/2)}px`
125
+ }
126
+
127
+ setTimeout(() => {
128
+ dialog.style.opacity = 100
129
+ }, 100)
130
+ },
48
131
  onClick() {
49
- this.$emit("click", this.$event)
132
+ this.$emit('click', this.$event)
50
133
  },
51
134
  },
52
135
  }
@@ -10,27 +10,30 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
- import PsTooltip from "../tooltip/PsTooltip.vue"
13
+ import PsTooltip from '../tooltip/PsTooltip.vue'
14
14
 
15
15
  export default {
16
- name: "PsRichTooltip",
16
+ name: 'PsRichTooltip',
17
17
  components: { PsTooltip },
18
18
  props: {
19
+ /**
20
+ * It sets the title of the tooltip if needed.
21
+ */
19
22
  title: {
20
23
  type: String,
21
- default: "",
24
+ default: '',
22
25
  },
26
+ /**
27
+ * It sets the layout of the tooltip. eg: gray, red and blue.
28
+ */
23
29
  layout: {
24
30
  type: String,
25
- default: "gray",
26
- validator: (type) => ["gray", "red", "blue"].includes(type),
27
- },
28
- text: {
29
- type: String,
31
+ default: 'gray',
32
+ validator: (type) => ['gray', 'red', 'blue'].includes(type),
30
33
  },
31
34
  cssClass: {
32
35
  type: String,
33
- default: "",
36
+ default: '',
34
37
  },
35
38
  },
36
39
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div @mouseover="open" @mouseleave="close" ref="tooltip" class='psui-el-tooltip'>
2
+ <div @mouseenter="open" @mouseleave="close" ref="tooltip" class='psui-el-tooltip'>
3
3
  <div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
4
4
  <slot name="trigger"></slot>
5
5
  </div>
@@ -28,24 +28,36 @@
28
28
 
29
29
  <script>
30
30
  export default {
31
- name: "PsTooltip",
31
+ name: 'PsTooltip',
32
32
  props: {
33
+ /**
34
+ * It sets the title of the tooltip if needed.
35
+ */
33
36
  title: {
34
37
  type: String,
35
38
  },
39
+ /**
40
+ * It disables the dialog section.
41
+ */
36
42
  ignoreDialog: {
37
43
  type: Boolean,
38
44
  default: false,
39
45
  },
46
+ /**
47
+ * It sets the layout of the tooltip if needed. Usefull when using rich or dialog tooltip.
48
+ */
40
49
  layout:{
41
50
  type: String,
42
51
  },
52
+ /**
53
+ * It sets a additional styling if needed.
54
+ */
43
55
  cssClass:{
44
56
  type: String,
45
57
  }
46
58
  },
47
59
  inheritAttrs: true,
48
- emits: ["show"],
60
+ emits: ['show'],
49
61
  data() {
50
62
  return {
51
63
  show: false,
@@ -58,18 +70,18 @@ export default {
58
70
  }
59
71
  },
60
72
  mounted() {
61
- document.addEventListener("resize", this.updatePosition)
73
+ document.addEventListener('resize', this.updatePosition)
62
74
  },
63
75
  beforeDestroy() {
64
- document.removeEventListener("resize", this.updatePosition)
76
+ document.removeEventListener('resize', this.updatePosition)
65
77
  },
66
78
  methods: {
67
79
  open() {
68
80
  if (this.show || this.ignoreDialog) return
69
- this.$emit("show")
81
+ this.$emit('show')
70
82
  this.show = true
71
83
 
72
- this.$refs.dialog.style.display = "block"
84
+ this.$refs.dialog.style.display = 'block'
73
85
  this.$refs.dialog.style.opacity = 0
74
86
 
75
87
  setTimeout(() => {
@@ -78,10 +90,10 @@ export default {
78
90
  },
79
91
  close() {
80
92
  if (this.show && this.$refs.dialog) {
81
- this.$emit("close")
93
+ this.$emit('close')
82
94
  this.show = false
83
95
 
84
- this.$refs.dialog.style.display = "none"
96
+ this.$refs.dialog.style.display = 'none'
85
97
  }
86
98
  },
87
99
  updatePosition() {
@@ -91,12 +103,16 @@ export default {
91
103
  const rectDialog = dialog.getBoundingClientRect()
92
104
  const rectTrigger = trigger.getBoundingClientRect()
93
105
  const windowWidth = document.documentElement.clientWidth
94
- dialog.style.top = `${rectTrigger.y + rectTrigger.height}px`
106
+ dialog.style.top = `${rectTrigger.y + rectTrigger.height + 8}px`
95
107
 
96
108
  if (rectTrigger.x + rectDialog.width + 20 > windowWidth) {
97
109
  dialog.style.left = `${windowWidth - rectDialog.width - 30}px`
110
+ } else if (rectTrigger.x - Math.abs(rectTrigger.width-rectDialog.width) < 0) {
111
+ dialog.style.left = `${rectTrigger.x + 10}px`
112
+ } else if (rectDialog.width >= rectTrigger.width){
113
+ dialog.style.left = `${rectTrigger.x - ((rectDialog.width - rectTrigger.width)/2)}px`
98
114
  } else {
99
- dialog.style.left = `${rectTrigger.x}px`
115
+ dialog.style.left = `${rectTrigger.x + ((rectTrigger.width - rectDialog.width)/2)}px`
100
116
  }
101
117
 
102
118
  setTimeout(() => {
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <div class="psui-el-dotloader">
3
+ <div class="psui-el-dotloader-wrapper">
4
+ <span></span>
5
+ <span></span>
6
+ <span></span>
7
+ </div>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'PsDotLoader',
14
+ }
15
+ </script>
@@ -25,31 +25,55 @@ import imageLoader from '../../util/imageLoader'
25
25
  export default {
26
26
  name: 'AppIcon',
27
27
  props: {
28
+ /**
29
+ * It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
30
+ */
28
31
  icon: {
29
32
  type: String,
30
33
  default: 'more_horiz'
31
34
  },
35
+ /**
36
+ * It sets the type of the icon.
37
+ */
32
38
  type: {
33
39
  type: String,
34
40
  },
41
+ /**
42
+ * It sets the style of the icon.
43
+ */
35
44
  iconClasses: {
36
45
  type: String
37
46
  },
47
+ /**
48
+ * It sets the size of the icon.
49
+ */
38
50
  size: {
39
51
  type: [Number, String],
40
52
  },
53
+ /**
54
+ * It sets the width of the icon.
55
+ */
41
56
  width: {
42
57
  type: [Number, String],
43
58
  default: 24
44
59
  },
60
+ /**
61
+ * It sets the height of the icon.
62
+ */
45
63
  height: {
46
64
  type: [Number, String],
47
65
  default: 24
48
66
  },
67
+ /**
68
+ * It sets fill property of the icon.
69
+ */
49
70
  stroke: {
50
71
  type: String,
51
72
  default: null
52
73
  },
74
+ /**
75
+ * It sets the color of the icon.
76
+ */
53
77
  color: {
54
78
  type: String,
55
79
  default: null,
@@ -59,10 +83,16 @@ export default {
59
83
  typeof(tailwindConfig.theme.colors[value]) != 'undefined'
60
84
  }
61
85
  },
86
+ /**
87
+ * It set a animation icon if needed.
88
+ */
62
89
  loaderIcon: {
63
90
  type: String,
64
91
  default: 'hourglass_top'
65
92
  },
93
+ /**
94
+ * It sets a error when the icon is not available.
95
+ */
66
96
  loaderErrorIcon: {
67
97
  type: String,
68
98
  default: 'more_horiz'
package/src/index.js CHANGED
@@ -5,6 +5,10 @@ import PsSlider from './components/controls/PsSlider.vue'
5
5
  import PsSwitch from './components/controls/PsSwitch.vue'
6
6
  import PsToggle from './components/controls/PsToggle.vue'
7
7
  import PsInput from './components/forms/PsInput.vue'
8
+ import PsDropdown from './components/forms/PsDropdown.vue'
9
+ import PsDropdownList from './components/forms/PsDropdownList.vue'
10
+ import PsInputTextArea from './components/forms/PsInputTextArea.vue'
11
+ import PsInputSelect from './components/forms/PsInputSelect.vue'
8
12
  import PsDialog from './components/notifications/PsDialog.vue'
9
13
  import PsToast from './components/notifications/PsToast.vue'
10
14
  import PsTabHeader from './components/tabs/PsTabHeader.vue'
@@ -14,6 +18,7 @@ import PsChips from './components/chips/PsChips.vue'
14
18
  import PsDataTable from './components/datatable/PsDataTable.vue'
15
19
  import PsDataTableItem from './components/datatable/PsDataTableItem.vue'
16
20
  import PsIcon from './components/ui/PsIcon.vue'
21
+ import PsDotLoader from './components/ui/PsDotLoader.vue'
17
22
  import PsTooltip from './components/tooltip/PsTooltip.vue'
18
23
  import PsRichTooltip from './components/tooltip/PsRichTooltip.vue'
19
24
  import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
@@ -21,8 +26,9 @@ import PsDraggable from './components/controls/PsDraggable.vue'
21
26
  import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
22
27
  import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
23
28
  import PsInlineSelector from './components/controls/PsInlineSelector.vue'
24
- import PsInputTextArea from './components/forms/PsInputTextArea.vue'
25
- import PsInputSelect from './components/forms/PsInputSelect.vue'
29
+ import PsScrollBar from './components/playground/PsScrollBar.vue'
30
+
31
+
26
32
 
27
33
  export default {
28
34
  install(Vue) {
@@ -42,6 +48,7 @@ export default {
42
48
  Vue.component('PsDataTable', PsDataTable)
43
49
  Vue.component('PsDataTableItem', PsDataTableItem)
44
50
  Vue.component('PsIcon', PsIcon)
51
+ Vue.component('PsDotLoader', PsDotLoader)
45
52
  Vue.component('PsTooltip', PsTooltip)
46
53
  Vue.component('PsRichTooltip', PsRichTooltip)
47
54
  Vue.component('PsDialogTooltip', PsDialogTooltip)
@@ -51,25 +58,46 @@ export default {
51
58
  Vue.component('PsInlineSelector', PsInlineSelector)
52
59
  Vue.component('PsInputTextArea', PsInputTextArea)
53
60
  Vue.component('PsInputSelect', PsInputSelect)
61
+ Vue.component('PsDropdown',PsDropdown)
62
+ Vue.component('PsDropdownList', PsDropdownList)
63
+ Vue.component('PsScrollBar', PsScrollBar)
64
+
65
+ Vue.directive('click-outside', {
66
+ bind: function (el, binding, vnode) {
67
+ el.clickOutsideEvent = function (event) {
68
+ // here I check that click was outside the el and his children
69
+ if (!(el == event.target || el.contains(event.target))) {
70
+ // and if it did, call method provided in attribute value
71
+ vnode.context[binding.expression](event)
72
+ }
73
+ }
74
+ document.body.addEventListener('click', el.clickOutsideEvent)
75
+ },
76
+ unbind: function (el) {
77
+ document.body.removeEventListener('click', el.clickOutsideEvent)
78
+ },
79
+ })
54
80
  },
55
81
  }
56
82
 
57
83
  export {
58
84
  PsButton,
59
85
  PsCheckbox,
60
- PsDialog,
61
- PsToast,
62
- PsTabHeader,
63
86
  PsRadioButton,
64
87
  PsSlider,
65
88
  PsSwitch,
66
- PsInput,
67
89
  PsToggle,
90
+ PsInput,
91
+ PsDialog,
92
+ PsToast,
93
+ PsTabHeader,
68
94
  PsAccordion,
69
95
  PsAccordionItem,
70
96
  PsChips,
71
97
  PsDataTable,
72
98
  PsDataTableItem,
99
+ PsIcon,
100
+ PsDotLoader,
73
101
  PsTooltip,
74
102
  PsRichTooltip,
75
103
  PsDialogTooltip,
@@ -78,5 +106,9 @@ export {
78
106
  PsChartLegend,
79
107
  PsInlineSelector,
80
108
  PsInputTextArea,
81
- PsInputSelect
109
+ PsInputSelect,
110
+ PsDropdown,
111
+ PsDropdownList,
112
+ PsScrollBar
82
113
  }
114
+
@@ -1,21 +1,10 @@
1
- import PsAccordionItem, {
2
- iconTypes,
3
- fontCss,
4
- } from '../components/accordion/PsAccordionItem.vue'
5
- import PsAccordion, { sizes } from '../components/accordion/PsAccordion.vue'
1
+ import PsAccordionItem from '../components/accordion/PsAccordionItem.vue'
2
+ import PsAccordion from '../components/accordion/PsAccordion.vue'
6
3
 
7
4
  export default {
8
5
  title: 'Components/Accordion',
9
6
  component: PsAccordion,
10
7
  subcomponents: { PsAccordionItem },
11
- argTypes: {
12
- size: { control: { type: 'select', options: sizes } },
13
- iconType: { control: { type: 'select', options: iconTypes } },
14
- fontCss: { control: { type: 'select', options: fontCss } },
15
- },
16
- args: {
17
- title: 'Section 1',
18
- },
19
8
  }
20
9
 
21
10
 
@@ -23,8 +12,8 @@ export const Index = (args, { argTypes }) => ({
23
12
  props: Object.keys(argTypes, args),
24
13
  components: { PsAccordion, PsAccordionItem },
25
14
  template:
26
- `<div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-2 psui-gap-6">
27
-
15
+ `
16
+ <div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-2 psui-gap-6">
28
17
  <div>
29
18
  <div class="psui-my-4">
30
19
  <h1 class="psui-font-bold psui-border-b psui-border-gray-30">Accordion Big</h1>
@@ -32,6 +21,10 @@ export const Index = (args, { argTypes }) => ({
32
21
  <PsAccordion layout="big" class="psui-bg-white">
33
22
  <PsAccordionItem title="Header 01">
34
23
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
24
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
25
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
26
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
27
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
35
28
  </PsAccordionItem>
36
29
  <PsAccordionItem title="Header 02">
37
30
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
@@ -49,6 +42,9 @@ export const Index = (args, { argTypes }) => ({
49
42
  <PsAccordion layout="medium" class="psui-bg-white">
50
43
  <PsAccordionItem title="Header 01">
51
44
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
45
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
46
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
47
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
52
48
  </PsAccordionItem>
53
49
  <PsAccordionItem title="Header 02" :opened="false">
54
50
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
@@ -58,38 +54,6 @@ export const Index = (args, { argTypes }) => ({
58
54
  </PsAccordionItem>
59
55
  </PsAccordion>
60
56
  </div>
61
-
62
- <div>
63
- <div class="psui-my-4">
64
- <h1 class="psui-font-bold psui-border-b psui-border-gray-30">Variations</h1>
65
- </div>
66
- <PsAccordion layout="medium" class="psui-bg-white" iconOpened="thumb_down" iconClosed="thumb_up">
67
- <PsAccordionItem title="Custom Icon">
68
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
69
- </PsAccordionItem>
70
- <PsAccordionItem title="Initial Content Opened" :opened="true">
71
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
72
- </PsAccordionItem>
73
- </PsAccordion>
74
- </div>
75
-
76
- <div>
77
- <div class="psui-my-4">
78
- <h1 class="psui-font-bold psui-border-b psui-border-gray-30">Custom Icons By Accordion Item</h1>
79
- </div>
80
- <PsAccordion layout="medium" class="psui-bg-white">
81
- <PsAccordionItem title="Custom Icon" iconOpened="thumb_down" iconClosed="thumb_up">
82
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
83
- </PsAccordionItem>
84
- <PsAccordionItem title="Initial Content Opened" :opened="true">
85
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
86
- </PsAccordionItem>
87
- <PsAccordionItem title="Initial Content Opened" iconOpened="visibility_off" iconClosed="visibility_on">
88
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p>
89
- </PsAccordionItem>
90
- </PsAccordion>
91
- </div>
92
-
93
- </div>
57
+ </div>
94
58
  `,
95
59
  })