@policystudio/policy-studio-ui-vue 1.0.30 → 1.0.33

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 (78) 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 +483 -143
  6. package/package.json +16 -5
  7. package/postcss.config.js +1 -1
  8. package/src/assets/images/multifamily-units.svg +10 -0
  9. package/src/assets/scss/base.scss +2 -0
  10. package/src/assets/scss/components/PsAccordion.scss +28 -11
  11. package/src/assets/scss/components/PsButton.scss +21 -4
  12. package/src/assets/scss/components/PsCardInfos.scss +1 -1
  13. package/src/assets/scss/components/PsCheckbox.scss +4 -5
  14. package/src/assets/scss/components/PsChips.scss +17 -12
  15. package/src/assets/scss/components/PsDataTable.scss +17 -0
  16. package/src/assets/scss/components/PsDialog.scss +5 -2
  17. package/src/assets/scss/components/PsDraggable.scss +64 -0
  18. package/src/assets/scss/components/PsDropdown.scss +9 -24
  19. package/src/assets/scss/components/PsDropdownList.scss +19 -0
  20. package/src/assets/scss/components/PsInput.scss +8 -3
  21. package/src/assets/scss/components/PsInputSelect.scss +6 -3
  22. package/src/assets/scss/components/PsInputTextArea.scss +5 -2
  23. package/src/assets/scss/components/PsRadioButton.scss +5 -5
  24. package/src/assets/scss/components/PsSwitch.scss +4 -4
  25. package/src/assets/scss/components/PsTabHeader.scss +14 -0
  26. package/src/assets/scss/components/PsToast.scss +3 -3
  27. package/src/assets/scss/components/PsToggle.scss +6 -2
  28. package/src/assets/scss/components/PsTooltip.scss +50 -18
  29. package/src/components/accordion/PsAccordion.vue +7 -23
  30. package/src/components/accordion/PsAccordionItem.vue +42 -26
  31. package/src/components/badges-and-tags/PsCardInfos.vue +12 -0
  32. package/src/components/badges-and-tags/PsChartLegend.vue +13 -0
  33. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +7 -0
  34. package/src/components/badges-and-tags/PsCostEffectBar.vue +6 -0
  35. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -1
  36. package/src/components/badges-and-tags/PsMiniTag.vue +6 -0
  37. package/src/components/badges-and-tags/PsProgressBar.vue +17 -9
  38. package/src/components/buttons/PsButton.vue +22 -1
  39. package/src/components/chips/PsChips.vue +33 -12
  40. package/src/components/controls/PsCheckbox.vue +32 -16
  41. package/src/components/controls/PsDraggable.vue +39 -150
  42. package/src/components/controls/PsInlineSelector.vue +30 -0
  43. package/src/components/controls/PsRadioButton.vue +28 -15
  44. package/src/components/controls/PsSwitch.vue +17 -11
  45. package/src/components/controls/PsToggle.vue +33 -12
  46. package/src/components/datatable/PsDataTable.vue +21 -1
  47. package/src/components/datatable/PsDataTableItem.vue +1 -1
  48. package/src/components/forms/PsDropdown.vue +73 -101
  49. package/src/components/forms/PsDropdownList.vue +82 -0
  50. package/src/components/forms/PsInput.vue +28 -1
  51. package/src/components/forms/PsInputSelect.vue +21 -0
  52. package/src/components/forms/PsInputTextArea.vue +54 -41
  53. package/src/components/notifications/PsDialog.vue +15 -0
  54. package/src/components/notifications/PsToast.vue +12 -0
  55. package/src/components/playground/PsScrollBar.vue +248 -0
  56. package/src/components/tabs/PsTabHeader.vue +31 -5
  57. package/src/components/tooltip/PsDialogTooltip.vue +107 -24
  58. package/src/components/tooltip/PsRichTooltip.vue +12 -9
  59. package/src/components/tooltip/PsTooltip.vue +27 -11
  60. package/src/components/ui/PsIcon.vue +30 -0
  61. package/src/index.js +30 -2
  62. package/src/stories/Accordion.stories.js +12 -48
  63. package/src/stories/Button.stories.js +30 -7
  64. package/src/stories/Chips.stories.js +11 -24
  65. package/src/stories/Dropdown.stories.js +81 -14
  66. package/src/stories/Icon.stories.js +21 -0
  67. package/src/stories/InlineSelector.stories.js +1 -1
  68. package/src/stories/Playground.stories.js +16 -0
  69. package/src/stories/Switch.stories.js +8 -2
  70. package/src/stories/Toast.stories.js +16 -16
  71. package/src/stories/Tooltip.stories.js +6 -6
  72. package/src/stories/Typography.stories.mdx +22 -18
  73. package/src/util/GeneralFunctions.js +8 -0
  74. package/src/util/imageLoader.js +1 -1
  75. package/tailwind.config.js +7 -3
  76. package/vetur/attributes.json +1376 -0
  77. package/vetur/tags.json +632 -0
  78. package/src/components/forms/PsDropdownCopy.vue +0 -212
@@ -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(() => {
@@ -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'
@@ -22,8 +26,9 @@ import PsDraggable from './components/controls/PsDraggable.vue'
22
26
  import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
23
27
  import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
24
28
  import PsInlineSelector from './components/controls/PsInlineSelector.vue'
25
- import PsInputTextArea from './components/forms/PsInputTextArea.vue'
26
- import PsInputSelect from './components/forms/PsInputSelect.vue'
29
+ import PsScrollBar from './components/playground/PsScrollBar.vue'
30
+
31
+
27
32
 
28
33
  export default {
29
34
  install(Vue) {
@@ -53,6 +58,25 @@ export default {
53
58
  Vue.component('PsInlineSelector', PsInlineSelector)
54
59
  Vue.component('PsInputTextArea', PsInputTextArea)
55
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
+ })
56
80
  },
57
81
  }
58
82
 
@@ -83,4 +107,8 @@ export {
83
107
  PsInlineSelector,
84
108
  PsInputTextArea,
85
109
  PsInputSelect,
110
+ PsDropdown,
111
+ PsDropdownList,
112
+ PsScrollBar
86
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
  })
@@ -6,12 +6,12 @@ export default {
6
6
  argTypes: {
7
7
  size: { control: { type: 'select', options: sizes } },
8
8
  disabled: { control: 'boolean' },
9
- icon: { control: { type: 'select', options: icons} },
10
- iconRight: { control: { type: 'select', options: icons} }
9
+ icon: { control: { type: 'select', options: icons } },
10
+ iconRight: { control: { type: 'select', options: icons } },
11
11
  },
12
12
  }
13
13
 
14
- const TemplateDefault = (args, {argTypes}) => ({
14
+ const TemplateDefault = (args, { argTypes }) => ({
15
15
  props: Object.keys(argTypes),
16
16
  components: { PsButton },
17
17
  template: `
@@ -19,7 +19,7 @@ const TemplateDefault = (args, {argTypes}) => ({
19
19
  <p>Size: Big</p>
20
20
  <div style="display: flex; flex-direction: column; gap: 10px;">
21
21
  <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;">
22
- <span style="text-align: center; color: red;">Solid Style</span>
22
+ <span style="text-align: center; color: black;">Solid Style</span>
23
23
  <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left'/>
24
24
  <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right'/>
25
25
  <PsButton label='Text Only' layout='solid' />
@@ -46,11 +46,20 @@ const TemplateDefault = (args, {argTypes}) => ({
46
46
  <PsButton label='Text Only' layout='onlytext'/>
47
47
  <PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
48
48
  </div>
49
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
50
+ <span style="text-align: center; color: red;">Caution Button</span>
51
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left'/>
52
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right'/>
53
+ <PsButton label='Text Only' layout='caution' />
54
+ <PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled/>
55
+ </div>
56
+
57
+
49
58
  </div>
50
59
  <p>Size: Medium</p>
51
60
  <div style="display: flex; flex-direction: column; gap: 10px;">
52
61
  <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
53
- <span style="text-align: center; color: red;">Solid Style</span>
62
+ <span style="text-align: center; color: black;">Solid Style</span>
54
63
  <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
55
64
  <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
56
65
  <PsButton label='Text Only' layout='solid' size='medium'/>
@@ -77,11 +86,18 @@ const TemplateDefault = (args, {argTypes}) => ({
77
86
  <PsButton label='Text Only' layout='onlytext' size='medium'/>
78
87
  <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
79
88
  </div>
89
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
90
+ <span style="text-align: center; color: red;">Caution Button</span>
91
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='medium'/>
92
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='medium'/>
93
+ <PsButton label='Text Only' layout='caution' size='medium'/>
94
+ <PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled size='medium'/>
95
+ </div>
80
96
  </div>
81
97
  <p>Size: Small</p>
82
98
  <div style="display: flex; flex-direction: column; gap: 10px;">
83
99
  <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
84
- <span style="text-align: center; color: red;">Solid Style</span>
100
+ <span style="text-align: center; color: black;">Solid Style</span>
85
101
  <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
86
102
  <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
87
103
  <PsButton label='Text Only' layout='solid' size='small'/>
@@ -94,9 +110,16 @@ const TemplateDefault = (args, {argTypes}) => ({
94
110
  <PsButton label='Text Only' layout='onlytext' size='small'/>
95
111
  <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
96
112
  </div>
113
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
114
+ <span style="text-align: center; color: red;">Caution Button</span>
115
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='small'/>
116
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='small'/>
117
+ <PsButton label='Text Only' layout='caution' size='small'/>
118
+ <PsButton label='Disabled' layout='caution' disabled icon='verified' iconPosition='left' size='small'/>
119
+ </div>
97
120
  </div>
98
121
  </div>
99
- `
122
+ `,
100
123
  })
101
124
 
102
125
  export const Default = TemplateDefault.bind({})
@@ -1,4 +1,4 @@
1
- import PsChips from "../components/chips/PsChips.vue"
1
+ import PsChips from '../components/chips/PsChips.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/Chips',
@@ -11,34 +11,21 @@ const Template = (args, { argTypes }) => ({
11
11
  data: ()=>{
12
12
  return{
13
13
  isChecked: null,
14
+ isCheckedTwo: null,
14
15
  }
15
16
  },
16
- template: `<div >
17
- <PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
17
+ template: `<div style="display:flex; gap: 10px;">
18
+ <PsChips v-bind='$props' type="button" @update:checked='isChecked = $event' :checked='isChecked'/>
19
+ <PsChips v-bind='$props' label="Simple chips with icons" type="button" layout="with-icon" icon="home" @update:checked='isChecked = $event' :checked='isChecked'/>
20
+ <PsChips v-bind='$props' label="Radio chips" type="radio" @update:checked='isChecked = $event' :checked='isChecked'/>
21
+ <PsChips v-bind='$props' label="Checkbox chips" type="checkbox" @update:checked='isCheckedTwo = $event' :checked='isCheckedTwo'/>
22
+ <PsChips v-bind='$props' label="Rich chips" type="button" layout="rich" icon="text_snippet" @update:checked='isChecked = $event' :checked='isChecked'/>
18
23
  </div>
19
24
  `
20
25
  })
21
26
 
22
- export const Simple = Template.bind({})
23
- Simple.args = {
27
+ export const Default = Template.bind({})
28
+ Default.args = {
24
29
  label: 'Simple Chip',
25
- icon:"",
26
- }
27
-
28
- export const SimpleWithIcon = Template.bind({})
29
- SimpleWithIcon.args = {
30
- label: 'Simple With Icon',
31
- icon: 'home',
32
- }
33
-
34
- export const Radio = Template.bind({})
35
- Radio.args = {
36
- label: 'Radio Chip',
37
- type:'radio'
38
- }
39
-
40
- export const Checkbox = Template.bind({})
41
- Checkbox.args = {
42
- label: 'Checkbox Chip',
43
- type: 'checkbox'
30
+ icon:'',
44
31
  }
@@ -1,32 +1,99 @@
1
1
  import PsDropdown from '../components/forms/PsDropdown.vue'
2
+ import PsDropdownList from '../components/forms/PsDropdownList.vue'
2
3
  export default {
3
4
  title: 'Components/Dropdown',
4
- component: PsDropdown,
5
- argTypes: {},
5
+ component: { PsDropdown, PsDropdownList },
6
6
  }
7
7
 
8
8
  const Template = (args, { argTypes }) => ({
9
9
  props: Object.keys(argTypes),
10
- components: { PsDropdown },
10
+ components: { PsDropdown, PsDropdownList },
11
11
  template: `
12
- <div>
13
- <PsDropdown
14
- buttonClasses="psui-p-3 "
15
- >
16
- <template v-slot:dropdownTrigger>
17
- <div>Custom Trigger</div>
12
+ <div style='background: #E6ECF2; width:1200px; height: 700px; padding: 20px;' class='psui-flex psui-gap-64 psui-bg-gray-20 '>
13
+ <PsDropdown>
14
+ <template #dropdownTrigger>
15
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
18
16
  </template>
19
- <template v-slot:items>
17
+ <template #items>
18
+ <div class='psui-pb-5'>
19
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 20px 8px 20px;'>divider label</p>
20
+
20
21
  <ul>
21
- <li>Small list of the drop down</li>
22
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 01</li>
23
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 02</li>
24
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 03</li>
25
+
26
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
27
+
28
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 04</li>
29
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 05</li>
30
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 06</li>
22
31
  </ul>
32
+ </div>
23
33
  </template>
24
34
  </PsDropdown>
35
+
36
+ <PsDropdown>
37
+ <template #dropdownTrigger>
38
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
39
+ </template>
40
+ <template #items>
41
+ <div class='psui-pb-5'>
42
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
43
+
44
+ <ul>
45
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
46
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
47
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
48
+
49
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
50
+
51
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
52
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
53
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
54
+ </ul>
55
+ </div>
56
+ </template>
57
+ </PsDropdown>
58
+
59
+ <PsDropdown>
60
+ <template #dropdownTrigger>
61
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
62
+ </template>
63
+ <template #items>
64
+ <PsDropdownList v-bind='$props'></PsDropdownList>
65
+ </template>
66
+ </PsDropdown>
67
+
68
+ <PsDropdown>
69
+ <template #dropdownTrigger>
70
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
71
+ </template>
72
+ <template #items>
73
+ <div class='psui-my-3'>
74
+ <ul>
75
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
76
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
77
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
78
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
79
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
80
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
81
+ </ul>
82
+ </div>
83
+ </template>
84
+ </PsDropdown>
25
85
  </div>
26
86
  `,
27
87
  })
28
88
 
29
- export const CustomTrigger = Template.bind({})
30
- CustomTrigger.args = {
31
- title: 'Custom trigger',
89
+ export const DropdownMenu = Template.bind({})
90
+ DropdownMenu.args = {
91
+ items: [
92
+ 'Selectable option 01',
93
+ 'Selectable option 02',
94
+ 'Selectable option 03',
95
+ 'Selectable option 04',
96
+ 'Selectable option 05',
97
+ 'Selectable option 06',
98
+ ],
32
99
  }
@@ -0,0 +1,21 @@
1
+ import PsIcon from '../components/ui/PsIcon.vue'
2
+
3
+ export default {
4
+ title: 'Components/Icon',
5
+ component: PsIcon,
6
+ argTypes: {},
7
+ }
8
+
9
+ const Template = (args, { argTypes }) => ({
10
+ props: Object.keys(argTypes),
11
+ components: { PsIcon },
12
+ template: `
13
+ <div class='psui-flex'>
14
+ <PsIcon v-bind="$props" type='svg' icon="/images/multifamily-units.svg" />
15
+ <PsIcon v-bind="$props" type='svg' icon="/images/multifamily-units.svg"/>
16
+ </div>
17
+ `,
18
+ })
19
+
20
+ export const IconSimple = Template.bind({})
21
+ IconSimple.args = {}
@@ -1,4 +1,4 @@
1
- import PsInlineSelector from "../components/controls/PsInlineSelector.vue"
1
+ import PsInlineSelector from '../components/controls/PsInlineSelector.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/InlineSelector',
@@ -0,0 +1,16 @@
1
+ import PsScrollBar from '../components/playground/PsScrollBar.vue'
2
+
3
+ export default {
4
+ title: 'Components/Playground',
5
+ component: PsScrollBar
6
+ }
7
+
8
+ const Template = (args, {argTypes}) => ({
9
+ props: Object.keys(argTypes),
10
+ components: { PsScrollBar},
11
+ template: `
12
+ <PsScrollBar v-bind='$props' scrollWidth='30'></PsScrollbar>
13
+ `
14
+ })
15
+
16
+ export const ScrollBar = Template.bind({})
@@ -7,6 +7,12 @@ export default {
7
7
  const Template = (args, { argTypes }) => ({
8
8
  props: Object.keys(argTypes),
9
9
  components: { PsSwitch },
10
+ data(){
11
+ return {
12
+ dt: false
13
+
14
+ }
15
+ },
10
16
  template: `
11
17
  <div style='display: flex; gap:10px;'>
12
18
  <div style='display: flex; gap: 10px; flex-direction: column; margin-right: 10px;'>
@@ -16,8 +22,8 @@ const Template = (args, { argTypes }) => ({
16
22
  </div>
17
23
  <div style='display: flex; gap: 10px; flex-direction: column;'>
18
24
  <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'/>
25
+ <PsSwitch v-bind="$props" v-model="dt" label='Switch1' size='big'/>
26
+ <PsSwitch v-bind="$props" v-model="dt" label='Switch2' size='small'/>
21
27
  </div>
22
28
  <div style='display: flex; gap: 10px; flex-direction: column;'>
23
29
  <span>Enable</span>