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

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 (69) hide show
  1. package/.storybook/preview.js +7 -1
  2. package/README.md +6 -2
  3. package/dist/css/psui_styles.css +461 -139
  4. package/package.json +15 -5
  5. package/src/assets/scss/base.scss +2 -0
  6. package/src/assets/scss/components/PsAccordion.scss +28 -11
  7. package/src/assets/scss/components/PsButton.scss +21 -4
  8. package/src/assets/scss/components/PsCardInfos.scss +1 -1
  9. package/src/assets/scss/components/PsCheckbox.scss +4 -5
  10. package/src/assets/scss/components/PsChips.scss +13 -8
  11. package/src/assets/scss/components/PsDialog.scss +5 -2
  12. package/src/assets/scss/components/PsDraggable.scss +64 -0
  13. package/src/assets/scss/components/PsDropdown.scss +5 -22
  14. package/src/assets/scss/components/PsDropdownList.scss +19 -0
  15. package/src/assets/scss/components/PsInput.scss +8 -3
  16. package/src/assets/scss/components/PsInputSelect.scss +6 -3
  17. package/src/assets/scss/components/PsInputTextArea.scss +5 -2
  18. package/src/assets/scss/components/PsRadioButton.scss +5 -5
  19. package/src/assets/scss/components/PsSwitch.scss +4 -4
  20. package/src/assets/scss/components/PsTabHeader.scss +14 -0
  21. package/src/assets/scss/components/PsToast.scss +3 -3
  22. package/src/assets/scss/components/PsToggle.scss +6 -2
  23. package/src/assets/scss/components/PsTooltip.scss +51 -18
  24. package/src/components/accordion/PsAccordion.vue +7 -23
  25. package/src/components/accordion/PsAccordionItem.vue +41 -25
  26. package/src/components/badges-and-tags/PsCardInfos.vue +12 -0
  27. package/src/components/badges-and-tags/PsChartLegend.vue +13 -0
  28. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +7 -0
  29. package/src/components/badges-and-tags/PsCostEffectBar.vue +6 -0
  30. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -1
  31. package/src/components/badges-and-tags/PsMiniTag.vue +6 -0
  32. package/src/components/badges-and-tags/PsProgressBar.vue +17 -9
  33. package/src/components/buttons/PsButton.vue +22 -1
  34. package/src/components/chips/PsChips.vue +24 -3
  35. package/src/components/controls/PsCheckbox.vue +32 -16
  36. package/src/components/controls/PsDraggable.vue +39 -150
  37. package/src/components/controls/PsInlineSelector.vue +30 -0
  38. package/src/components/controls/PsRadioButton.vue +28 -15
  39. package/src/components/controls/PsSwitch.vue +20 -11
  40. package/src/components/controls/PsToggle.vue +33 -12
  41. package/src/components/datatable/PsDataTable.vue +18 -0
  42. package/src/components/forms/PsDropdown.vue +18 -60
  43. package/src/components/forms/PsDropdownList.vue +82 -0
  44. package/src/components/forms/PsInput.vue +28 -1
  45. package/src/components/forms/PsInputSelect.vue +21 -0
  46. package/src/components/forms/PsInputTextArea.vue +53 -40
  47. package/src/components/notifications/PsDialog.vue +15 -0
  48. package/src/components/notifications/PsToast.vue +12 -0
  49. package/src/components/playground/PsScrollBar.vue +15 -0
  50. package/src/components/tabs/PsTabHeader.vue +18 -0
  51. package/src/components/tooltip/PsDialogTooltip.vue +103 -20
  52. package/src/components/tooltip/PsRichTooltip.vue +6 -3
  53. package/src/components/tooltip/PsTooltip.vue +19 -3
  54. package/src/components/ui/PsIcon.vue +30 -0
  55. package/src/index.js +30 -2
  56. package/src/stories/Accordion.stories.js +12 -48
  57. package/src/stories/Button.stories.js +30 -7
  58. package/src/stories/Chips.stories.js +14 -2
  59. package/src/stories/Dropdown.stories.js +36 -13
  60. package/src/stories/Playground.stories.js +16 -0
  61. package/src/stories/Switch.stories.js +8 -2
  62. package/src/stories/Toast.stories.js +16 -16
  63. package/src/stories/Tooltip.stories.js +6 -6
  64. package/src/stories/Typography.stories.mdx +22 -18
  65. package/src/util/GeneralFunctions.js +8 -0
  66. package/tailwind.config.js +7 -3
  67. package/vetur/attributes.json +1376 -0
  68. package/vetur/tags.json +632 -0
  69. package/src/components/forms/PsDropdownCopy.vue +0 -212
@@ -1,11 +1,15 @@
1
1
  @layer components{
2
2
 
3
3
  .psui-el-toggle {
4
- @apply psui-flex psui-rounded-sm psui-bg-gray-10 psui-gap-x-px;
4
+ @apply psui-flex psui-bg-gray-10 psui-items-center;
5
5
  padding: 2px;
6
+ gap: 2px;
7
+ border-radius: 4px;
6
8
 
7
9
  button {
8
- @apply transition-default psui-inline-flex psui-rounded-sm psui-text-small psui-bg-gray-10 psui-text-blue-60 psui-px-2;
10
+ @apply transition-default psui-inline-flex psui-text-small psui-bg-gray-10 psui-text-blue-60 psui-outline-none psui-align-middle;
11
+ border-radius: 4px;
12
+ padding:1px 8px;
9
13
 
10
14
  &.status-active {
11
15
  @apply psui-bg-blue-60 psui-text-white psui-font-bold psui-shadow-elevation-10;
@@ -5,11 +5,14 @@
5
5
  @apply psui-relative;
6
6
 
7
7
  .psui-el-tooltip-dialog {
8
- @apply psui-fixed psui-hidden psui-opacity-0 psui-transition-opacity psui-duration-500 psui-ease-in-out;
9
-
8
+ @apply psui-fixed psui-opacity-0 psui-transition-opacity psui-duration-300 psui-ease-in-out;
9
+ transition-delay: 0.4s;
10
+ min-width: 256px;
11
+
10
12
  .psui-el-tooltip-content {
11
- @apply psui-flex psui-flex-col psui-rounded-md psui-shadow-md psui-z-20 psui-bg-gray-50 psui-text-white;
12
- padding: 5px 8px;
13
+ @apply psui-flex psui-flex-col psui-bg-gray-50 psui-text-white;
14
+ padding: 5px 8px 4px 8px;
15
+ border-radius: 4px;
13
16
 
14
17
  h2 {
15
18
  @apply psui-font-bold;
@@ -21,9 +24,10 @@
21
24
 
22
25
  &.layout {
23
26
  &-gray {
24
- @apply psui-bg-gray-30 psui-text-gray-80 psui-p-4 ;
27
+ @apply psui-bg-gray-30 psui-text-gray-80 psui-shadow-none;
25
28
  font-size: 12px;
26
29
  line-height: 120%;
30
+ padding: 10px 16px 12px 16px;
27
31
 
28
32
  .psui-el-tooltip-content-wrapper {
29
33
  @apply psui-font-normal psui-mt-1
@@ -31,9 +35,10 @@
31
35
  }
32
36
 
33
37
  &-blue {
34
- @apply psui-bg-blue-70 psui-text-white psui-p-4;
38
+ @apply psui-bg-blue-70 psui-text-white psui-shadow-none;
35
39
  font-size: 12px;
36
40
  line-height: 120%;
41
+ padding: 10px 16px 12px 16px;
37
42
 
38
43
  .psui-el-tooltip-content-wrapper {
39
44
  @apply psui-font-normal psui-mt-1
@@ -41,9 +46,10 @@
41
46
  }
42
47
 
43
48
  &-red {
44
- @apply psui-bg-red-10 psui-text-red-70 psui-p-4;
49
+ @apply psui-bg-red-10 psui-text-red-70 psui-shadow-none;
45
50
  font-size: 12px;
46
51
  line-height: 120%;
52
+ padding: 10px 16px 12px 16px;
47
53
 
48
54
  .psui-el-tooltip-content-wrapper {
49
55
  @apply psui-font-normal psui-mt-1
@@ -51,7 +57,8 @@
51
57
  }
52
58
 
53
59
  &-white {
54
- @apply psui-bg-white psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
60
+ @apply psui-bg-white psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
61
+ gap: 8.8px;
55
62
 
56
63
  h2 {
57
64
  @apply psui-text-gray-80 psui-font-bold;
@@ -60,19 +67,27 @@
60
67
  }
61
68
 
62
69
  .psui-el-tooltip-content-wrapper {
63
- @apply psui-text-gray-50 psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
70
+ @apply psui-text-gray-50 psui-font-normal psui-flex psui-flex-col;
71
+ gap: 13.6px;
72
+ font-size: 14px;
73
+ line-height: 120%;
64
74
 
65
75
  button {
66
- @apply psui-rounded-md psui-bg-blue-20 psui-text-blue-60;
76
+ @apply psui-rounded-md psui-bg-blue-20 psui-text-blue-60 psui-font-bold;
67
77
  padding: 7px 16px;
68
78
  width: fit-content;
79
+
80
+ &:focus {
81
+ outline: none;
82
+ }
69
83
  }
70
84
  }
71
85
  }
72
86
 
73
87
  &-dark {
74
- @apply psui-bg-blue-70 psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
75
-
88
+ @apply psui-bg-blue-70 psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
89
+ gap: 8.8px;
90
+
76
91
  h2 {
77
92
  @apply psui-text-white psui-font-bold;
78
93
  font-size: 17px;
@@ -80,19 +95,29 @@
80
95
  }
81
96
 
82
97
  .psui-el-tooltip-content-wrapper {
83
- @apply psui-text-white psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
98
+ @apply psui-text-white psui-font-normal psui-flex psui-flex-col;
99
+ gap: 13.6px;
100
+ font-size: 14px;
101
+ line-height: 120%;
84
102
 
85
103
  button {
86
- @apply psui-rounded-md psui-bg-blue-60 psui-text-white;
104
+ @apply psui-rounded-md psui-bg-blue-60 psui-text-white psui-font-bold;
87
105
  padding: 7px 16px;
88
106
  width: fit-content;
107
+
108
+ &:focus {
109
+ outline: none;
110
+ }
111
+
89
112
  }
90
113
  }
91
114
  }
92
115
 
93
116
  &-color {
94
- @apply psui-bg-blue-50 psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
95
-
117
+ @apply psui-bg-blue-50 psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
118
+ gap: 8.8px;
119
+
120
+
96
121
  h2 {
97
122
  @apply psui-text-white psui-font-bold;
98
123
  font-size: 17px;
@@ -100,12 +125,20 @@
100
125
  }
101
126
 
102
127
  .psui-el-tooltip-content-wrapper {
103
- @apply psui-text-white psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
128
+ @apply psui-text-white psui-font-normal psui-flex psui-flex-col;
129
+ gap: 13.6px;
130
+ font-size: 14px;
131
+ line-height: 120%;
104
132
 
105
133
  button {
106
- @apply psui-rounded-md psui-bg-blue-60 psui-text-white;
134
+ @apply psui-rounded-md psui-bg-blue-60 psui-text-white psui-font-bold;
107
135
  padding: 7px 16px;
108
136
  width: fit-content;
137
+
138
+ &:focus {
139
+ outline: none;
140
+ }
141
+
109
142
  }
110
143
  }
111
144
  }
@@ -1,42 +1,26 @@
1
1
  <template>
2
- <div class="psui-el-accordion" :class="`layout-${layout}`">
2
+ <div class="psui-el-accordion" :class="getComponentClass">
3
3
  <slot></slot>
4
4
  </div>
5
5
  </template>
6
6
 
7
7
  <script>
8
8
  export const layouts = ['big', 'medium']
9
- export const defaultIconsByLayout = {
10
- big: {
11
- 'iconOpened': 'remove',
12
- 'iconClosed': 'add'
13
- },
14
- medium: {
15
- 'iconOpened': 'expand_less',
16
- 'iconClosed': 'expand_more'
17
- }
18
- }
19
9
  export default {
20
10
  name: 'PsAccordion',
21
11
  props: {
12
+ /**
13
+ * It defines the size of the accordion items. eg: text size and font.
14
+ */
22
15
  layout: {
23
16
  type: String,
24
17
  default: 'medium',
25
- validator: (value) => layouts.indexOf(value) !== -1,
18
+ validator: (value) => ['medium','big'].includes(value),
26
19
  },
27
- 'iconOpened': {
28
- type: String,
29
- },
30
- 'iconClosed': {
31
- type: String,
32
- }
33
20
  },
34
21
  computed: {
35
- getIcons() {
36
- return {
37
- 'iconOpened' : this.iconOpened ?? defaultIconsByLayout[this.layout].iconOpened,
38
- 'iconClosed' : this.iconClosed ?? defaultIconsByLayout[this.layout].iconClosed,
39
- }
22
+ getComponentClass() {
23
+ return `layout-${this.layout}`
40
24
  }
41
25
  }
42
26
  }
@@ -2,31 +2,46 @@
2
2
  <div class="psui-el-accordion-item" :class="`status-${isOpen ? 'opened' : 'closed'}`">
3
3
  <div @click="toggle" class="psui-el-accordion-item-header">
4
4
  <h2 v-if="title" class="psui-el-accordion-item-title">{{ title }}</h2>
5
- <i class="psui-el-accordion-item-icon material-icons">{{ getIcon }}</i>
6
- </div>
7
- <div v-if="isOpen" class="psui-el-accordion-item-content">
8
- <slot></slot>
5
+ <i class="psui-el-accordion-item-icon">{{ getIcon }}</i>
9
6
  </div>
7
+ <transition
8
+ name="accordion-fade"
9
+ @enter="start"
10
+ @after-enter="end"
11
+ @before-leave="start"
12
+ @after-leave="end"
13
+ >
14
+ <div v-if="isOpen" class="psui-el-accordion-item-content">
15
+ <slot></slot>
16
+ </div>
17
+ </transition>
10
18
  </div>
11
19
  </template>
12
20
 
13
21
  <script>
22
+ import { getParentVueComponentByName } from '../../util/GeneralFunctions'
14
23
  export default {
15
24
  name: "PsAccordionItem",
16
25
  props: {
26
+ /**
27
+ * It sets the title of the accordion item.
28
+ */
17
29
  title: {
18
30
  type: String,
19
31
  required: true,
20
32
  },
21
- 'iconOpened': {
22
- type: String,
23
- },
24
- 'iconClosed': {
25
- type: String,
26
- },
33
+ /**
34
+ * It sets the status of the accordion item when mounted.
35
+ */
27
36
  opened: {
28
37
  type: [Boolean],
29
38
  default: false
39
+ },
40
+ /**
41
+ * 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/.
42
+ */
43
+ icon: {
44
+ type: String
30
45
  }
31
46
  },
32
47
  data() {
@@ -35,17 +50,17 @@ export default {
35
50
  }
36
51
  },
37
52
  computed: {
38
- getIcons() {
39
- return {
40
- 'iconOpened' : this.iconOpened ?? this.getParentVueComponentByName(this.$parent, 'PsAccordion').getIcons.iconOpened,
41
- 'iconClosed' : this.iconClosed ?? this.getParentVueComponentByName(this.$parent, 'PsAccordion').getIcons.iconClosed,
42
- }
43
- },
44
- getIcon() {
45
- return this.isOpen ? this.getIcons.iconOpened : this.getIcons.iconClosed
46
- },
47
53
  isOpen() {
48
54
  return this.localOpened !== null ? this.localOpened : this.opened
55
+ },
56
+ getParent() {
57
+ return getParentVueComponentByName(this,'PsAccordion')
58
+ },
59
+ getIcon(){
60
+ if(this.getParent._props.layout === 'medium') return 'expand_more'
61
+ if(this.getParent._props.layout === 'big' && this.isOpen === false) return 'add'
62
+ if(this.getParent._props.layout === 'big' && this.isOpen === true) return 'remove'
63
+ return `${this.icon}`
49
64
  }
50
65
  },
51
66
  methods: {
@@ -56,12 +71,13 @@ export default {
56
71
  this.localOpened = !this.localOpened
57
72
  }
58
73
  },
59
- getParentVueComponentByName(comp, name) {
60
- if (comp.$options.name === name) {
61
- return comp
62
- } else {
63
- return this.getParentVueComponentByName(comp.$parent, name)
64
- }
74
+ start(el) {
75
+ el.style.height = el.scrollHeight + 'px'
76
+ el.style.padding = el.srcollPaddingBottom + 'px'
77
+ },
78
+ end(el) {
79
+ el.style.height = ''
80
+ el.style.padding = ''
65
81
  }
66
82
  }
67
83
  }
@@ -17,18 +17,30 @@
17
17
  export default {
18
18
  name: 'PsCardInfos',
19
19
  props: {
20
+ /**
21
+ * It sets the title of your card.
22
+ */
20
23
  title: {
21
24
  type: String,
22
25
  default: 'Total',
23
26
  },
27
+ /**
28
+ * It sets the subtitle of your card if needed.
29
+ */
24
30
  subtitle: {
25
31
  type: String,
26
32
  default: '',
27
33
  },
34
+ /**
35
+ * It sets the text key to get the svg icon in Google Fonts. Make sure to get the right description of your icon on https://fonts.google.com/.
36
+ */
28
37
  icon: {
29
38
  type: String,
30
39
  default: 'edit',
31
40
  },
41
+ /**
42
+ * It sets the data that will show up when component is mounted.
43
+ */
32
44
  total: {
33
45
  type: String,
34
46
  default: '',
@@ -13,19 +13,32 @@
13
13
 
14
14
  <script>
15
15
  export default {
16
+ name: 'PsChartLegend',
16
17
  props: {
18
+ /**
19
+ * It sets the text of the chart legend.
20
+ */
17
21
  text: {
18
22
  type: [String, Number],
19
23
  default: 'Climate Zone 10',
20
24
  },
25
+ /**
26
+ * It sets the data that will show up when component is mounted.
27
+ */
21
28
  total: {
22
29
  type: String,
23
30
  default: null,
24
31
  },
32
+ /**
33
+ * It sets the data that wull show up when component is mounted.
34
+ */
25
35
  percentage: {
26
36
  type: String,
27
37
  default: null,
28
38
  },
39
+ /**
40
+ * It sets the color of the dot component.
41
+ */
29
42
  dotColor: {
30
43
  type: Object,
31
44
  default: null
@@ -9,11 +9,18 @@
9
9
 
10
10
  <script>
11
11
  export default {
12
+ name: 'PsClimateZoneBadge',
12
13
  props: {
14
+ /**
15
+ * It sets the text key to get the svg icon in Google Fonts. Make sure to get the right description of your icon on https://fonts.google.com/.
16
+ */
13
17
  icon: {
14
18
  type: String,
15
19
  default: 'area_chart',
16
20
  },
21
+ /**
22
+ * It sets the content that will show up when the component is rendered.
23
+ */
17
24
  content: {
18
25
  type: Number,
19
26
  default: 10,
@@ -22,11 +22,17 @@ export default {
22
22
  },
23
23
 
24
24
  props: {
25
+ /**
26
+ * It sets the value of the progress bar within costeffectbar.
27
+ */
25
28
  value: {
26
29
  type: Number,
27
30
  required: true,
28
31
  default: 0,
29
32
  },
33
+ /**
34
+ * It sets the threshold of being effective or not effective within costeffectbar.
35
+ */
30
36
  breakEven: {
31
37
  type: Number,
32
38
  required: true,
@@ -5,7 +5,9 @@
5
5
  </template>
6
6
 
7
7
  <script>
8
- export default {}
8
+ export default {
9
+ name: 'PsHighlightRippleDot',
10
+ }
9
11
  </script>
10
12
 
11
13
  <style> /* Please, use the file src/assets/scss/components/PsHighlightRippleDot.scss */</style>
@@ -15,11 +15,17 @@ export const typeOptions = [
15
15
  export default {
16
16
  name: 'PsMiniTag',
17
17
  props: {
18
+ /**
19
+ * It sets the layout of the the minitag. eg: info, success, warning, error and default.
20
+ */
18
21
  layout: {
19
22
  type: String,
20
23
  default: 'info',
21
24
  validator: (value) => typeOptions.indexOf(value) !== -1,
22
25
  },
26
+ /**
27
+ * It sets the message that will show up within the minitag when component is rendered.
28
+ */
23
29
  message: {
24
30
  type: String,
25
31
  required: true,
@@ -13,21 +13,29 @@
13
13
 
14
14
  <script>
15
15
  export default {
16
+ name: 'PsProgressBar',
16
17
  props: {
17
- value: {
18
- type: Number,
19
- required: true,
20
- default: 0,
21
- validator: (value) => {
22
- return value >= 0 && value <= 100
23
- },
18
+ /**
19
+ * It sets the value of the progress bar.
20
+ */
21
+ value: {
22
+ type: Number,
23
+ required: true,
24
+ default: 0,
25
+ validator: (value) => {
26
+ return value >= 0 && value <= 100
24
27
  },
28
+ },
29
+ /**
30
+ * It sets the color of the progressbar.
31
+ */
25
32
  percentageColor: {
26
33
  type: String,
27
34
  default: 'psui-bg-blue-60'
28
- // required: true,
29
-
30
35
  },
36
+ /**
37
+ * It sets the background color of the progressbar.
38
+ */
31
39
  bgColor: {
32
40
  type: String,
33
41
  default: 'psui-bg-blue-20'
@@ -14,31 +14,52 @@
14
14
  <script>
15
15
  export default {
16
16
  props: {
17
+ /**
18
+ * It set de label of the button when component is rendered.
19
+ */
17
20
  label: {
18
21
  type: String,
19
22
  },
23
+ /**
24
+ * It set the layout of the button. eg: solid, outline, ghost, onlytext and caution.
25
+ */
20
26
  layout: {
21
27
  type: String,
22
28
  default: 'solid',
23
- validator: (value) => ['solid','outline','ghost','onlytext'].includes(value)
29
+ validator: (value) => ['solid','outline','ghost','onlytext','caution'].includes(value)
24
30
  },
31
+ /**
32
+ * It sets the text key which will retrieve a icon from Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
33
+ */
25
34
  icon: {
26
35
  type: String,
27
36
  },
37
+ /**
38
+ * It sets the position of the icon. eg: left or right.
39
+ */
28
40
  iconPosition:{
29
41
  type: String,
30
42
  default: 'left',
31
43
  validator: (value) => ['left','right'].includes(value)
32
44
  },
45
+ /**
46
+ * It sets the size of the icon. eg: small, medium and big.
47
+ */
33
48
  size: {
34
49
  type: String,
35
50
  default: 'big',
36
51
  validator: (value) => ['small','medium','big'].includes(value)
37
52
  },
53
+ /**
54
+ * It disable the button. All mouse event are disabled.
55
+ */
38
56
  disabled: {
39
57
  type: Boolean,
40
58
  default: false
41
59
  },
60
+ /**
61
+ * It set any further css style that might be needed.
62
+ */
42
63
  iconClass:{
43
64
  type: String
44
65
  }
@@ -5,6 +5,7 @@
5
5
  >
6
6
  <input
7
7
  @change="onChange"
8
+ :disabled="disabled"
8
9
  v-if="type != 'button'"
9
10
  :type="type"
10
11
  :id="label"
@@ -12,6 +13,7 @@
12
13
  />
13
14
  <label
14
15
  @click="onClick"
16
+ :disabled="disabled"
15
17
  :for="label"
16
18
  :class="getCssClass"
17
19
  >
@@ -34,33 +36,54 @@ export const type = ["radio", "checkbox", "button"]
34
36
  export default {
35
37
  name: "PsChips",
36
38
  props: {
39
+ /**
40
+ * It sets the label of the chips button.
41
+ */
37
42
  label: {
38
43
  type: String,
39
44
  default: "",
40
45
  },
46
+ /**
47
+ * It sets the type of the chips button. eg: radio, checkbox, button.
48
+ */
41
49
  type: {
42
50
  type: String,
43
51
  required: true,
44
52
  default: 'button',
45
53
  validator: (type) => ["radio", "checkbox", "button"].includes(type)
46
54
  },
55
+ /**
56
+ * It sets the layout of the chipsbutton. eg: simple, with-icon, rich.
57
+ */
47
58
  layout: {
48
59
  type: String,
49
60
  default: 'simple',
50
61
  validator: (value) => ['simple', 'with-icon', 'rich'].includes(value)
51
62
  },
63
+ /**
64
+ * It sets the text key which will retrieve a icon from Google Fonts. Make sure to get the right description of your icon on https://fonts.google.com/.
65
+ */
52
66
  icon: {
53
67
  type: String,
54
68
  default: "",
55
69
  },
70
+ /**
71
+ * It sets if the button was checked or not checked.
72
+ */
56
73
  checked: {
57
74
  type: Boolean,
58
75
  default: false
59
76
  },
77
+ /**
78
+ * It disables the chips button.
79
+ */
60
80
  disabled: {
61
81
  type: Boolean,
62
82
  default: false
63
83
  },
84
+ /**
85
+ * It sets if the button is active or not.
86
+ */
64
87
  active: {
65
88
  type: Boolean,
66
89
  default: false
@@ -96,11 +119,9 @@ export default {
96
119
  this.$emit("click")
97
120
  },
98
121
  onChange(event) {
99
-
100
122
  this.isChecked = event.target.checked
101
-
102
123
  this.$emit('update:checked', event.target.checked)
103
- this.$emit("change")
124
+ this.$emit("change", event)
104
125
  },
105
126
  onClose() {
106
127
  this.$emit("close")