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

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 (74) hide show
  1. package/dist/css/psui_styles.css +6011 -496
  2. package/package.json +1 -1
  3. package/src/assets/scss/base.scss +40 -3
  4. package/src/assets/scss/components/PsButton.scss +115 -117
  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 +26 -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/PsDotLoader.scss +45 -0
  14. package/src/assets/scss/components/PsDropdown.scss +44 -0
  15. package/src/assets/scss/components/PsHighlightRippleDot.scss +48 -0
  16. package/src/assets/scss/components/PsInlineSelector.scss +96 -0
  17. package/src/assets/scss/components/PsInputSelect.scss +104 -0
  18. package/src/assets/scss/components/PsInputTextArea.scss +49 -0
  19. package/src/assets/scss/components/PsMiniTag.scss +36 -0
  20. package/src/assets/scss/components/PsProgressBar.scss +24 -0
  21. package/src/assets/scss/components/PsRadioButton.scss +78 -0
  22. package/src/assets/scss/components/PsSlider.scss +11 -0
  23. package/src/assets/scss/components/PsSwitch.scss +66 -0
  24. package/src/assets/scss/components/PsTabHeader.scss +10 -3
  25. package/src/assets/scss/components/PsToast.scss +52 -0
  26. package/src/assets/scss/components/PsToggle.scss +23 -0
  27. package/src/assets/scss/components/PsTooltip.scss +118 -0
  28. package/src/components/badges-and-tags/PsCardInfos.vue +14 -7
  29. package/src/components/badges-and-tags/PsChartLegend.vue +7 -13
  30. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +15 -6
  31. package/src/components/badges-and-tags/PsCostEffectBar.vue +32 -70
  32. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -69
  33. package/src/components/badges-and-tags/PsMiniTag.vue +15 -24
  34. package/src/components/badges-and-tags/PsProgressBar.vue +42 -0
  35. package/src/components/buttons/PsButton.vue +78 -78
  36. package/src/components/chips/PsChips.vue +45 -87
  37. package/src/components/controls/PsCheckbox.vue +58 -134
  38. package/src/components/controls/PsInlineSelector.vue +123 -0
  39. package/src/components/controls/PsRadioButton.vue +33 -88
  40. package/src/components/controls/PsSlider.vue +5 -6
  41. package/src/components/controls/PsSwitch.vue +29 -81
  42. package/src/components/controls/PsToggle.vue +45 -39
  43. package/src/components/datatable/PsDataTable.vue +3 -15
  44. package/src/components/forms/PsDropdown.vue +28 -12
  45. package/src/components/forms/PsDropdownCopy.vue +212 -0
  46. package/src/components/forms/PsInputSelect.vue +88 -0
  47. package/src/components/forms/PsInputTextArea.vue +80 -0
  48. package/src/components/notifications/PsDialog.vue +3 -0
  49. package/src/components/notifications/PsToast.vue +16 -28
  50. package/src/components/tabs/PsTabHeader.vue +30 -12
  51. package/src/components/tooltip/PsDialogTooltip.vue +6 -31
  52. package/src/components/tooltip/PsRichTooltip.vue +37 -44
  53. package/src/components/tooltip/PsTooltip.vue +18 -28
  54. package/src/components/ui/PsDotLoader.vue +15 -0
  55. package/src/components/ui/PsIcon.vue +9 -9
  56. package/src/index.js +17 -4
  57. package/src/stories/Button.stories.js +102 -112
  58. package/src/stories/Checkbox.stories.js +34 -37
  59. package/src/stories/Chips.stories.js +43 -54
  60. package/src/stories/ClimateZoneBadge.stories.js +0 -7
  61. package/src/stories/Colors.stories.mdx +1 -0
  62. package/src/stories/Dialog.stories.js +1 -1
  63. package/src/stories/InlineSelector.stories.js +18 -0
  64. package/src/stories/InputSelect.stories.js +30 -0
  65. package/src/stories/InputTextArea.stories.js +25 -0
  66. package/src/stories/MiniTag.stories.js +12 -6
  67. package/src/stories/RadioButton.stories.js +32 -29
  68. package/src/stories/Switch.stories.js +33 -0
  69. package/src/stories/Toast.stories.js +40 -46
  70. package/src/stories/Tooltip.stories.js +86 -86
  71. package/tailwind.config.js +8 -1
  72. package/src/assets/images/check-checkbox-button.svg +0 -1
  73. package/src/assets/images/radio-checked-button.svg +0 -1
  74. package/src/stories/Swith.stories.js +0 -38
@@ -1,39 +1,25 @@
1
1
  <template>
2
- <div @mouseover="open" @mouseleave="close" ref="tooltip">
3
- <div ref="tooltiptrigger">
2
+ <div @mouseover="open" @mouseleave="close" ref="tooltip" class='psui-el-tooltip'>
3
+ <div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
4
4
  <slot name="trigger"></slot>
5
5
  </div>
6
6
 
7
- <div class="psui-relative">
7
+ <div class='psui-el-tooltip-wrapper'>
8
8
  <div
9
9
  role="menu"
10
10
  ref="dialog"
11
- class="
12
- psui-fixed
13
- psui-hidden
14
- psui-opacity-0
15
- psui-transition-opacity
16
- psui-duration-500
17
- psui-ease-in-out
18
- "
11
+ class='psui-el-tooltip-dialog'
12
+ :class="cssClass"
19
13
  >
20
14
  <div
21
- class="
22
- psui-flex
23
- psui-flex-col
24
- psui-rounded-md
25
- psui-shadow-md
26
- psui-z-20
27
- psui-p-4
28
- "
15
+ class="psui-el-tooltip-content"
29
16
  aria-orientation="vertical"
30
- :class="cssClass"
17
+ :class="getComponentClass"
31
18
  >
32
- <h2 v-if="title" class="psui-font-bold">{{ title}}</h2>
33
- <slot name="dialog" class="psui-font-normal"
34
- >
35
- </slot
36
- >
19
+ <h2 v-if="title">{{ title}}</h2>
20
+ <div class="psui-el-tooltip-content-wrapper">
21
+ <slot name="content"></slot>
22
+ </div>
37
23
  </div>
38
24
  </div>
39
25
  </div>
@@ -51,12 +37,11 @@ export default {
51
37
  type: Boolean,
52
38
  default: false,
53
39
  },
54
- keepOpen: {
55
- default: false,
40
+ layout:{
41
+ type: String,
56
42
  },
57
43
  cssClass:{
58
44
  type: String,
59
- default: 'psui-bg-gray-50 psui-text-white'
60
45
  }
61
46
  },
62
47
  inheritAttrs: true,
@@ -67,6 +52,11 @@ export default {
67
52
  closingTimeout: null,
68
53
  }
69
54
  },
55
+ computed:{
56
+ getComponentClass(){
57
+ return `layout-${this.layout}`
58
+ }
59
+ },
70
60
  mounted() {
71
61
  document.addEventListener("resize", this.updatePosition)
72
62
  },
@@ -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>
@@ -27,7 +27,7 @@ export default {
27
27
  props: {
28
28
  icon: {
29
29
  type: String,
30
- required: true
30
+ default: 'more_horiz'
31
31
  },
32
32
  type: {
33
33
  type: String,
@@ -39,11 +39,11 @@ export default {
39
39
  type: [Number, String],
40
40
  },
41
41
  width: {
42
- type: Number,
42
+ type: [Number, String],
43
43
  default: 24
44
44
  },
45
45
  height: {
46
- type: Number,
46
+ type: [Number, String],
47
47
  default: 24
48
48
  },
49
49
  stroke: {
@@ -54,7 +54,7 @@ export default {
54
54
  type: String,
55
55
  default: null,
56
56
  validator: value => {
57
- return value.includes('psui-text-') &&
57
+ return value?.includes('psui-text-') &&
58
58
  typeof(tailwindConfig.theme.colors[value.replace('psui-text-', '')]) != 'undefined' ||
59
59
  typeof(tailwindConfig.theme.colors[value]) != 'undefined'
60
60
  }
@@ -78,15 +78,15 @@ export default {
78
78
  getIconType() {
79
79
  if(this.imageLoadError || !this.finishedImageLoad) return 'material-icons'
80
80
  if(this.type) return this.type
81
- if(!this.icon.includes('/')) return 'material-icons'
82
- if(!this.icon.includes('.svg')) return 'url'
81
+ if(!this.icon?.includes('/')) return 'material-icons'
82
+ if(!this.icon?.includes('.svg')) return 'url'
83
83
  return 'svg'
84
84
  },
85
85
  getIcon() {
86
- if(!this.icon.includes('/')) return this.icon
86
+ if(!this.icon?.includes('/')) return this.icon ? this.icon : this.loaderErrorIcon
87
87
  if(!this.finishedImageLoad && !this.imageLoadError && this.loaderIcon) return this.loaderIcon
88
88
  if(this.imageLoadError) return this.loaderErrorIcon
89
- return this.icon ? this.icon : ''
89
+ return this.icon ? this.icon : this.loaderErrorIcon
90
90
  },
91
91
  getIconClasses() {
92
92
  if(this.iconClasses) return this.iconClasses
@@ -111,7 +111,7 @@ export default {
111
111
  }
112
112
  },
113
113
  mounted() {
114
- if(this.icon.includes('/')) this.loadImage()
114
+ if(this.icon?.includes('/')) this.loadImage()
115
115
  },
116
116
  methods: {
117
117
  loadImage() {
package/src/index.js CHANGED
@@ -14,12 +14,16 @@ import PsChips from './components/chips/PsChips.vue'
14
14
  import PsDataTable from './components/datatable/PsDataTable.vue'
15
15
  import PsDataTableItem from './components/datatable/PsDataTableItem.vue'
16
16
  import PsIcon from './components/ui/PsIcon.vue'
17
+ import PsDotLoader from './components/ui/PsDotLoader.vue'
17
18
  import PsTooltip from './components/tooltip/PsTooltip.vue'
18
19
  import PsRichTooltip from './components/tooltip/PsRichTooltip.vue'
19
20
  import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
20
21
  import PsDraggable from './components/controls/PsDraggable.vue'
21
22
  import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
22
23
  import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
24
+ import PsInlineSelector from './components/controls/PsInlineSelector.vue'
25
+ import PsInputTextArea from './components/forms/PsInputTextArea.vue'
26
+ import PsInputSelect from './components/forms/PsInputSelect.vue'
23
27
 
24
28
  export default {
25
29
  install(Vue) {
@@ -39,35 +43,44 @@ export default {
39
43
  Vue.component('PsDataTable', PsDataTable)
40
44
  Vue.component('PsDataTableItem', PsDataTableItem)
41
45
  Vue.component('PsIcon', PsIcon)
46
+ Vue.component('PsDotLoader', PsDotLoader)
42
47
  Vue.component('PsTooltip', PsTooltip)
43
48
  Vue.component('PsRichTooltip', PsRichTooltip)
44
49
  Vue.component('PsDialogTooltip', PsDialogTooltip)
45
50
  Vue.component('PsDraggable', PsDraggable)
46
51
  Vue.component('PsCardInfos', PsCardInfos)
47
52
  Vue.component('PsChartLegend', PsChartLegend)
53
+ Vue.component('PsInlineSelector', PsInlineSelector)
54
+ Vue.component('PsInputTextArea', PsInputTextArea)
55
+ Vue.component('PsInputSelect', PsInputSelect)
48
56
  },
49
57
  }
50
58
 
51
59
  export {
52
60
  PsButton,
53
61
  PsCheckbox,
54
- PsDialog,
55
- PsToast,
56
- PsTabHeader,
57
62
  PsRadioButton,
58
63
  PsSlider,
59
64
  PsSwitch,
60
- PsInput,
61
65
  PsToggle,
66
+ PsInput,
67
+ PsDialog,
68
+ PsToast,
69
+ PsTabHeader,
62
70
  PsAccordion,
63
71
  PsAccordionItem,
64
72
  PsChips,
65
73
  PsDataTable,
66
74
  PsDataTableItem,
75
+ PsIcon,
76
+ PsDotLoader,
67
77
  PsTooltip,
68
78
  PsRichTooltip,
69
79
  PsDialogTooltip,
70
80
  PsDraggable,
71
81
  PsCardInfos,
72
82
  PsChartLegend,
83
+ PsInlineSelector,
84
+ PsInputTextArea,
85
+ PsInputSelect,
73
86
  }
@@ -1,112 +1,102 @@
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(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
22
- <span style="text-align: center; color: red;">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
- </div>
28
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
29
- <span style="text-align: center; color: blue;">Outline Style</span>
30
- <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
31
- <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
32
- <PsButton label='Text Only' layout='outline'/>
33
- <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
34
- </div>
35
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
36
- <span style="text-align: center; color: brown;">Ghost Style</span>
37
- <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
38
- <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
39
- <PsButton label='Text Only' layout='ghost' />
40
- <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
41
- </div>
42
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
43
- <span style="text-align: center; color: green;">Only-Text Style</span>
44
- <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
45
- <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
46
- <PsButton label='Text Only' layout='onlytext'/>
47
- <PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
48
- </div>
49
- </div>
50
- <p>Size: Medium</p>
51
- <div style="display: flex; flex-direction: column; gap: 10px;">
52
- <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>
54
- <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
55
- <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
56
- <PsButton label='Text Only' layout='solid' size='medium'/>
57
- <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
58
- </div>
59
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
60
- <span style="text-align: center; color: blue;">Outline Style</span>
61
- <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
62
- <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
63
- <PsButton label='Text Only' layout='outline' size='medium'/>
64
- <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
65
- </div>
66
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
67
- <span style="text-align: center; color: brown;">Ghost Style</span>
68
- <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
69
- <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
70
- <PsButton label='Text Only' layout='ghost' size='medium'/>
71
- <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
72
- </div>
73
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
74
- <span style="text-align: center; color: green;">Only-Text Style</span>
75
- <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
76
- <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
77
- <PsButton label='Text Only' layout='onlytext' size='medium'/>
78
- <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
79
- </div>
80
- </div>
81
- <p>Size: Small</p>
82
- <div style="display: flex; flex-direction: column; gap: 10px;">
83
- <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>
85
- <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
86
- <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
87
- <PsButton label='Text Only' layout='solid' size='small'/>
88
- <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
89
- </div>
90
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
91
- <span style="text-align: center; color: green;">Only-Text Style</span>
92
- <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
93
- <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
94
- <PsButton label='Text Only' layout='onlytext' size='small'/>
95
- <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
96
- </div>
97
- </div>
98
- <p>Size: Custom</p>
99
- <div style="display: flex; flex-direction: column; gap: 10px;">
100
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
101
- <span style="text-align: center; color: green;">Only-Text Style</span>
102
- <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
103
- <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
104
- <PsButton label='Text Only' layout='onlytext'/>
105
- <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' />
106
- </div>
107
- </div>
108
- </div>
109
- `
110
- })
111
-
112
- export const Default = TemplateDefault.bind({})
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(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;">
22
+ <span style="text-align: center; color: red;">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
+ </div>
28
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
29
+ <span style="text-align: center; color: blue;">Outline Style</span>
30
+ <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
31
+ <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
32
+ <PsButton label='Text Only' layout='outline'/>
33
+ <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
34
+ </div>
35
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
36
+ <span style="text-align: center; color: brown;">Ghost Style</span>
37
+ <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
38
+ <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
39
+ <PsButton label='Text Only' layout='ghost' />
40
+ <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
41
+ </div>
42
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
43
+ <span style="text-align: center; color: green;">Only-Text Style</span>
44
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
45
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
46
+ <PsButton label='Text Only' layout='onlytext'/>
47
+ <PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
48
+ </div>
49
+ </div>
50
+ <p>Size: Medium</p>
51
+ <div style="display: flex; flex-direction: column; gap: 10px;">
52
+ <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>
54
+ <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
55
+ <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
56
+ <PsButton label='Text Only' layout='solid' size='medium'/>
57
+ <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
58
+ </div>
59
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
60
+ <span style="text-align: center; color: blue;">Outline Style</span>
61
+ <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
62
+ <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
63
+ <PsButton label='Text Only' layout='outline' size='medium'/>
64
+ <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
65
+ </div>
66
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
67
+ <span style="text-align: center; color: brown;">Ghost Style</span>
68
+ <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
69
+ <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
70
+ <PsButton label='Text Only' layout='ghost' size='medium'/>
71
+ <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
72
+ </div>
73
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
74
+ <span style="text-align: center; color: green;">Only-Text Style</span>
75
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
76
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
77
+ <PsButton label='Text Only' layout='onlytext' size='medium'/>
78
+ <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
79
+ </div>
80
+ </div>
81
+ <p>Size: Small</p>
82
+ <div style="display: flex; flex-direction: column; gap: 10px;">
83
+ <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>
85
+ <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
86
+ <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
87
+ <PsButton label='Text Only' layout='solid' size='small'/>
88
+ <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
89
+ </div>
90
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
91
+ <span style="text-align: center; color: green;">Only-Text Style</span>
92
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
93
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
94
+ <PsButton label='Text Only' layout='onlytext' size='small'/>
95
+ <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
96
+ </div>
97
+ </div>
98
+ </div>
99
+ `
100
+ })
101
+
102
+ export const Default = TemplateDefault.bind({})
@@ -3,46 +3,43 @@ import PsCheckbox from '../components/controls/PsCheckbox.vue'
3
3
  export default {
4
4
  title: 'Components/Checkbox',
5
5
  component: PsCheckbox,
6
- argTypes: {
7
- disabled: { control: 'boolean' },
8
- },
9
6
  }
10
7
 
11
- const Template = (args, { argTypes }) => ({
8
+ const defaultTemplate = (args, {argTypes}) => ({
12
9
  props: Object.keys(argTypes),
13
- components: { PsCheckbox },
14
- data: () => {
15
- return {
16
- items: {
17
- BUILDING_TYPE: {
18
- label: 'Building Type',
19
- key: 'BUILDING_TYPE'
20
- },
21
- CLIMATE_ZONE: {
22
- label: 'Climate Zone',
23
- key: 'CLIMATE_ZONE'
24
- },
25
- YEAR: {
26
- label: "Year",
27
- key: "YEAR"
28
- }
29
- },
30
- selected: []
31
- }
32
- },
10
+ components: { PsCheckbox},
33
11
  template: `
34
- <div>
35
- <PsCheckbox v-bind="$props" v-for="(item, key) in items" :label="item.label" :inputValue="item.key" v-model="selected" />
36
- <p>Checked: {{ selected }}</p>
37
- </div>
38
- `
12
+ <div style='display:flex; gap: 20px;'>
13
+ <div style='display:flex; flex-direction:column; gap:5px;'>
14
+ <p>Resting</p>
15
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
16
+ <PsCheckbox v-bind="$props" label='Label 1' />
17
+ <PsCheckbox v-bind="$props" label='Label 2' size='small' />
18
+ </div>
19
+ </div>
20
+ <div style='display:flex; flex-direction:column; gap:5px;'>
21
+ <p>Active</p>
22
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
23
+ <PsCheckbox v-bind="$props" label='Label 3' checked />
24
+ <PsCheckbox v-bind="$props" label='Label 4' checked size='small'/>
25
+ </div>
26
+ </div>
27
+ <div style='display:flex; flex-direction:column; gap:5px;'>
28
+ <p>Mixed</p>
29
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
30
+ <PsCheckbox v-bind="$props" label='Label 5' layout='mixed' checked />
31
+ <PsCheckbox v-bind="$props" label='Label 6' layout='mixed' size='small' checked />
32
+ </div>
33
+ </div>
34
+ <div style='display:flex; flex-direction:column; gap:5px;'>
35
+ <p>Disabled</p>
36
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
37
+ <PsCheckbox v-bind="$props" label='Label 7' disabled/>
38
+ <PsCheckbox v-bind="$props" label='Label 8' size='small' disabled/>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ `
39
43
  })
40
44
 
41
- export const Default = Template.bind({})
42
- Default.args = {
43
- size: 18,
44
- disabled: false,
45
- label: 'Label',
46
- labelClasses: '',
47
- }
48
-
45
+ export const Default = defaultTemplate.bind({})
@@ -1,55 +1,44 @@
1
- import PsChips from "../components/chips/PsChips.vue"
2
-
3
- export default {
4
- title: 'Components/Chips',
5
- component: PsChips,
6
- }
7
-
8
- const Template = (args, { argTypes }) => ({
9
- props: Object.keys(argTypes),
10
- components: { PsChips },
11
- data: ()=>{
12
- return{
13
- isChecked: null,
14
- }
15
- },
16
- template: `<div >
17
- <PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
18
- <pre>{{isChecked}}</pre>
19
- </div>
20
- `
21
- })
22
-
23
- export const Simple = Template.bind({})
24
- Simple.args = {
25
- title: 'Simple Chip',
26
- icon:"",
27
- type: 'text'
28
- }
29
-
30
- export const SimpleWithIcon = Template.bind({})
31
- SimpleWithIcon.args = {
32
- title: 'Simple With Icon',
33
- icon: 'home',
34
- type: 'text'
35
- }
36
-
37
- export const Radio = Template.bind({})
38
- Radio.args = {
39
- title: 'Radio Chip',
40
- type:'radio'
41
- }
42
-
43
- export const Checkbox = Template.bind({})
44
- Checkbox.args = {
45
- title: 'Checkbox Chip',
46
- type: 'checkbox'
47
- }
48
-
49
- export const Rich = Template.bind({})
50
- Rich.args = {
51
- title: 'Rich chips',
52
- type: 'text',
53
- icon: 'description',
54
- rich: true
1
+ import PsChips from "../components/chips/PsChips.vue"
2
+
3
+ export default {
4
+ title: 'Components/Chips',
5
+ component: PsChips,
6
+ }
7
+
8
+ const Template = (args, { argTypes }) => ({
9
+ props: Object.keys(argTypes),
10
+ components: { PsChips },
11
+ data: ()=>{
12
+ return{
13
+ isChecked: null,
14
+ }
15
+ },
16
+ template: `<div >
17
+ <PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
18
+ </div>
19
+ `
20
+ })
21
+
22
+ export const Simple = Template.bind({})
23
+ Simple.args = {
24
+ 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'
55
44
  }
@@ -1,15 +1,8 @@
1
1
  import PsClimateZoneBadge from '../components/badges-and-tags/PsClimateZoneBadge.vue'
2
2
 
3
- // const icons = ["area_chart"];
4
-
5
3
  export default {
6
4
  title: 'Components/ClimateZoneBadge',
7
5
  component: PsClimateZoneBadge,
8
- argTypes: {
9
- type: {
10
- // icon: { control: { type: "select", options: icons } },
11
- },
12
- },
13
6
  }
14
7
 
15
8
  const Template = (args, { argTypes }) => ({
@@ -54,6 +54,7 @@ Out colors are designed to be harmonious, ensure accessible text, and distinguis
54
54
  <div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-80 click-to-copy" data-to-copy="psui-bg-red-80">Red 80 <div>#832F2E</div></div>
55
55
  <div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-70 click-to-copy" data-to-copy="psui-bg-red-70">Red 70 <div>#AA3937</div></div>
56
56
  <div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-20 click-to-copy" data-to-copy="psui-bg-red-20">Red 20 <div>#D65C5A</div></div>
57
+ <div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-red-20 psui-bg-red-15 click-to-copy" data-to-copy="psui-bg-red-15">Red 15 <div>#EAC5C5</div></div>
57
58
  <div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-red-20 psui-bg-red-10 click-to-copy" data-to-copy="psui-bg-red-10">Red 10 <div>#FCEBEB</div></div>
58
59
  </div>
59
60