@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
@@ -5,6 +5,9 @@
5
5
 
6
6
  button {
7
7
  @apply transition-default psui-text-small;
8
+ &.status-disabled {
9
+ @apply cursor-not-allowed
10
+ }
8
11
  }
9
12
 
10
13
  &.status-disabled {
@@ -41,6 +44,10 @@
41
44
  &.status-active {
42
45
  @apply psui-text-white psui-bg-blue-60 psui-font-bold;
43
46
  }
47
+
48
+ &.status-disabled:hover {
49
+ @apply psui-text-gray-60;
50
+ }
44
51
  }
45
52
  }
46
53
  /* ----------------------------------------- Layout Standard */
@@ -59,12 +66,12 @@
59
66
  margin-right: 20px;
60
67
  }
61
68
 
62
- &:hover {
69
+ &.status-enable:hover {
63
70
  @apply psui-text-blue-60;
64
71
  }
65
72
 
66
73
  &.status-active {
67
- @apply psui-text-blue-60 psui-border-blue-60;
74
+ @apply psui-text-blue-60 psui-border-blue-50
68
75
  }
69
76
  }
70
77
  }
@@ -82,7 +89,7 @@
82
89
  margin-right: 4px;
83
90
  }
84
91
 
85
- &:hover {
92
+ &.status-enable:hover {
86
93
  @apply psui-text-gray-60;
87
94
  }
88
95
 
@@ -0,0 +1,52 @@
1
+ @layer components {
2
+ .psui-el-toast {
3
+ @apply psui-flex psui-items-center psui-text-big psui-text-white psui-py-3 psui-px-4 psui-rounded-md psui-font-bold;
4
+
5
+ .psui-el-toast-icon {
6
+ @apply psui-flex psui-mr-4;
7
+ font-size: 24px;
8
+ }
9
+
10
+ .psui-el-toast-message {
11
+ @apply psui-mr-auto
12
+ }
13
+
14
+ .psui-el-toast-actions {
15
+ @apply psui-flex psui-gap-4
16
+ }
17
+
18
+ &.fill-intense.layout{
19
+ &-info {
20
+ @apply psui-bg-blue-60
21
+ }
22
+
23
+ &-success {
24
+ @apply psui-bg-green-20
25
+ }
26
+
27
+ &-warning {
28
+ @apply psui-bg-yellow-20
29
+ }
30
+
31
+ &-error {
32
+ @apply psui-bg-red-20
33
+ }
34
+ }
35
+
36
+ &.fill-soft.layout {
37
+ &-info {
38
+ @apply psui-text-blue-60 psui-bg-blue-20
39
+ }
40
+
41
+ &-success {
42
+ @apply psui-text-green-20 psui-bg-green-10
43
+ }
44
+ &-warning {
45
+ @apply psui-text-yellow-20 psui-bg-yellow-10
46
+ }
47
+ &-error {
48
+ @apply psui-text-red-20 psui-bg-red-10
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,23 @@
1
+ @layer components{
2
+
3
+ .psui-el-toggle {
4
+ @apply psui-flex psui-rounded-sm psui-bg-gray-10 psui-gap-x-px;
5
+ padding: 2px;
6
+
7
+ 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;
9
+
10
+ &.status-active {
11
+ @apply psui-bg-blue-60 psui-text-white psui-font-bold psui-shadow-elevation-10;
12
+ }
13
+
14
+ &:not(.status-active) {
15
+ &:hover {
16
+ text-decoration: underline;
17
+ }
18
+ }
19
+ }
20
+
21
+ }
22
+
23
+ }
@@ -0,0 +1,118 @@
1
+ @layer components {
2
+ .psui-el-tooltip {
3
+
4
+ .psui-el-tooltip-wrapper{
5
+ @apply psui-relative;
6
+
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
+
10
+ .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
+
14
+ h2 {
15
+ @apply psui-font-bold;
16
+ }
17
+
18
+ .psui-el-tooltip-content-wrapper{
19
+ @apply psui-text-xsmall psui-font-bold;
20
+ }
21
+
22
+ &.layout {
23
+ &-gray {
24
+ @apply psui-bg-gray-30 psui-text-gray-80 psui-p-4 ;
25
+ font-size: 12px;
26
+ line-height: 120%;
27
+
28
+ .psui-el-tooltip-content-wrapper {
29
+ @apply psui-font-normal psui-mt-1
30
+ }
31
+ }
32
+
33
+ &-blue {
34
+ @apply psui-bg-blue-70 psui-text-white psui-p-4;
35
+ font-size: 12px;
36
+ line-height: 120%;
37
+
38
+ .psui-el-tooltip-content-wrapper {
39
+ @apply psui-font-normal psui-mt-1
40
+ }
41
+ }
42
+
43
+ &-red {
44
+ @apply psui-bg-red-10 psui-text-red-70 psui-p-4;
45
+ font-size: 12px;
46
+ line-height: 120%;
47
+
48
+ .psui-el-tooltip-content-wrapper {
49
+ @apply psui-font-normal psui-mt-1
50
+ }
51
+ }
52
+
53
+ &-white {
54
+ @apply psui-bg-white psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
55
+
56
+ h2 {
57
+ @apply psui-text-gray-80 psui-font-bold;
58
+ font-size: 17px;
59
+ line-height: 120%;
60
+ }
61
+
62
+ .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;
64
+
65
+ button {
66
+ @apply psui-rounded-md psui-bg-blue-20 psui-text-blue-60;
67
+ padding: 7px 16px;
68
+ width: fit-content;
69
+ }
70
+ }
71
+ }
72
+
73
+ &-dark {
74
+ @apply psui-bg-blue-70 psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
75
+
76
+ h2 {
77
+ @apply psui-text-white psui-font-bold;
78
+ font-size: 17px;
79
+ line-height: 120%;
80
+ }
81
+
82
+ .psui-el-tooltip-content-wrapper {
83
+ @apply psui-text-white psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
84
+
85
+ button {
86
+ @apply psui-rounded-md psui-bg-blue-60 psui-text-white;
87
+ padding: 7px 16px;
88
+ width: fit-content;
89
+ }
90
+ }
91
+ }
92
+
93
+ &-color {
94
+ @apply psui-bg-blue-50 psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
95
+
96
+ h2 {
97
+ @apply psui-text-white psui-font-bold;
98
+ font-size: 17px;
99
+ line-height: 120%;
100
+ }
101
+
102
+ .psui-el-tooltip-content-wrapper {
103
+ @apply psui-text-white psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
104
+
105
+ button {
106
+ @apply psui-rounded-md psui-bg-blue-60 psui-text-white;
107
+ padding: 7px 16px;
108
+ width: fit-content;
109
+ }
110
+ }
111
+ }
112
+
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
@@ -1,10 +1,13 @@
1
1
  <template>
2
- <div class="psui-border psui-border-gray-20 psui-rounded-md psui-flex psui-flex-col psui-items-center psui-justify-center psui-px-3 psui-py-2 psui-space-y-2">
3
- <h5 class="psui-text-xsmall psui-font-bold psui-text-gray-40">
4
- <span class="psui-text-gray-60">{{ title }} </span>{{ subtitle }}
2
+ <div
3
+ class="psui-el-card-infos"
4
+ @click="onClick()"
5
+ >
6
+ <h5 class="psui-el-card-infos-title">
7
+ <span class="psui-text-gray-60 psui-mr-1">{{ title }}</span>{{ subtitle }}
5
8
  </h5>
6
- <div class="psui-w-full psui-flex psui-justify-center psui-items-center psui-space-x-2 psui-text-p">
7
- <span class="psui-text-blue-50 material-icons-round">{{ icon }}</span>
9
+ <div class="psui-el-card-infos-content">
10
+ <span class="psui-el-card-infos-icon material-icons-round">{{ icon }}</span>
8
11
  <h5 class="psui-text-gray-80">{{ total }}</h5>
9
12
  </div>
10
13
  </div>
@@ -30,9 +33,13 @@ export default {
30
33
  type: String,
31
34
  default: '',
32
35
  },
36
+ },
37
+ methods: {
38
+ onClick() {
39
+ this.$emit('click')
40
+ }
33
41
  }
34
42
  }
35
43
  </script>
36
44
 
37
- <style scoped>
38
- </style>
45
+ <style> /* Please, use the file src/assets/scss/components/PsCardInfos.scss */</style>
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <div class="psui-flex psui-p-2 psui-rounded">
2
+ <div class="psui-el-chart-legend">
3
3
  <div class="psui-flex psui-flex-shrink-0">
4
- <div class="dot psui-rounded-full" :style="dotColor"></div>
4
+ <div class="psui-el-chart-legend-dot" :style="dotColor"></div>
5
5
  </div>
6
6
  <div class="psui-flex-grow-1">
7
- <div class="psui-text-xsmall psui-text-gray-50 psui-font-bold psui-mb-1">{{ text }}</div>
8
- <span v-if="this.total" class="psui-text-p psui-text-gray-80">{{ total }}</span>
9
- <span class="psui-text-gray-50" v-if="percentage"><span class="psui-text-gray-30" v-if="total && percentage"> | </span>{{ percentage }}%</span>
7
+ <div class="psui-el-chart-legend-text">{{ text }}</div>
8
+ <span v-if="this.total" class="psui-el-chart-legend-total">{{ total }}</span>
9
+ <span class="psui-el-chart-legend-percentage" v-if="percentage"><span class="psui-text-gray-30" v-if="total && percentage"> | </span>{{ percentage }}%</span>
10
10
  </div>
11
11
  </div>
12
12
  </template>
@@ -15,7 +15,7 @@
15
15
  export default {
16
16
  props: {
17
17
  text: {
18
- type: String,
18
+ type: [String, Number],
19
19
  default: 'Climate Zone 10',
20
20
  },
21
21
  total: {
@@ -34,10 +34,4 @@ export default {
34
34
  }
35
35
  </script>
36
36
 
37
- <style scoped>
38
- .dot {
39
- width: 14px; height: 14px;
40
- background-color: #43cec2;
41
- margin-right: 6px;
42
- }
43
- </style>
37
+ <style> /* Please, use the file src/assets/scss/components/PsChartLegend.scss */</style>
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <button
3
- class="psui-flex psui-p-3 psui-bg-gray-10 psui-text-gray-50 hover:psui-text-blue-60 hover:psui-bg-blue-20 psui-transition-all psui-duration-300 psui-ease-out psui-shadow-lg psui-rounded"
4
- >
5
- <i v-if="icon" class="material-icons psui-text-base"> {{ icon }} </i>
6
- <p class="psui-text-sm">10</p>
7
- </button>
2
+ <div class="psui-el-climate-zone-badge">
3
+ <i v-if="icon"> {{ icon }} </i>
4
+ <span>
5
+ {{ content }}
6
+ </span>
7
+ </div>
8
8
  </template>
9
9
 
10
10
  <script>
@@ -12,7 +12,16 @@ export default {
12
12
  props: {
13
13
  icon: {
14
14
  type: String,
15
+ default: 'area_chart',
16
+ },
17
+ content: {
18
+ type: Number,
19
+ default: 10,
15
20
  },
16
21
  },
17
22
  }
18
23
  </script>
24
+
25
+ <style>
26
+ /* Please, use the file src/assets/scss/components/PsClimateZoneBadge.scss */
27
+ </style>
@@ -1,33 +1,26 @@
1
1
  <template>
2
- <div>
3
- <div class="container">
4
- <div
5
- class="loading-bar"
6
- :class="{
7
- 'psui-bg-blue-20': value >= breakEven,
8
- 'psui-bg-red-10': value < breakEven,
9
- }"
10
- >
11
- <span class="breakEven" :style="breakEvenPosition"> </span>
2
+ <div class="psui-el-cost-effect-bar">
3
+ <div>
4
+ <span :style="breakEvenPosition"> </span>
12
5
 
13
- <input
14
- type="number"
15
- min="0"
16
- max="100"
17
- class="percentage"
18
- :style="{ width: `${value}px` }"
19
- :class="{
20
- 'psui-bg-blue-60': value >= breakEven,
21
- 'psui-bg-red-20': value < breakEven,
22
- }"
23
- />
24
- </div>
6
+ <PsProgressBar
7
+ :value="value"
8
+ :percentageColor="percentageColor"
9
+ :bgColor="bgColor"
10
+ >
11
+ </PsProgressBar>
25
12
  </div>
26
13
  </div>
27
14
  </template>
28
15
 
29
16
  <script>
17
+ import PsProgressBar from './PsProgressBar.vue'
30
18
  export default {
19
+ name: 'PsCostEffectBar',
20
+ components: {
21
+ PsProgressBar,
22
+ },
23
+
31
24
  props: {
32
25
  value: {
33
26
  type: Number,
@@ -37,7 +30,7 @@ export default {
37
30
  breakEven: {
38
31
  type: Number,
39
32
  required: true,
40
- default: 1,
33
+ default: 0,
41
34
  },
42
35
  },
43
36
  data() {
@@ -54,61 +47,30 @@ export default {
54
47
  },
55
48
 
56
49
  breakEvenPosition() {
57
- return `left: ${this.breakEven}px`
50
+ return `left: ${this.breakEven >= 98 ? 98 : this.breakEven}px`
58
51
  },
52
+
59
53
  getIsBreakEven() {
60
54
  if (this.breakEven < 0) return 0
61
55
  else if (this.breakEven > 100) return 100
62
56
  else return this.breakEven
63
- // else return true;
64
- // return this.value > this.breakEven ? true : false;
65
57
  },
66
- },
67
- }
68
- </script>
69
58
 
70
- <style scoped>
71
- .container {
72
- overflow: visible;
73
- }
74
-
75
- .loading-bar {
76
- position: relative;
77
- width: 100px;
78
- height: 8px;
79
- border-radius: 15px;
80
- }
81
-
82
- .loading-bar .percentage {
83
- position: absolute;
84
- display: block;
85
- max-width: 100px;
86
- height: 100%;
87
- border-radius: 15px;
88
- overflow: visible;
89
- background-size: 30px 30px;
90
- animation: animate-stripes 3s linear infinite;
91
- }
59
+ percentageColor() {
60
+ return this.value >= this.breakEven
61
+ ? 'psui-bg-blue-60'
62
+ : 'psui-bg-red-20'
63
+ },
92
64
 
93
- .breakEven {
94
- position: absolute;
95
- background-color: #d6dde5;
96
- width: 2px;
97
- height: 14px;
98
- /* max-width: 100px; */
99
- border-radius: 2px;
100
- top: -3px;
101
- z-index: 1;
102
- /* left: 2px; */
103
- /* right: -2px; */
65
+ bgColor() {
66
+ return this.value >= this.breakEven
67
+ ? 'psui-bg-blue-20'
68
+ : 'psui-bg-red-10'
69
+ },
70
+ },
104
71
  }
72
+ </script>
105
73
 
106
- @keyframes animate-stripes {
107
- 0% {
108
- background-position: 0 0;
109
- }
110
- 100% {
111
- background-position: 60px 0;
112
- }
113
- }
74
+ <style>
75
+ /* Please, use the file src/assets/scss/components/PsCostEffectBar.scss */
114
76
  </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="example">
3
- <div class="dot"></div>
2
+ <div class="psui-el-highlight-ripple-icon">
3
+ <div class="psui-el-icon"></div>
4
4
  </div>
5
5
  </template>
6
6
 
@@ -8,71 +8,5 @@
8
8
  export default {}
9
9
  </script>
10
10
 
11
- <style scoped>
12
- .example {
13
- position: static;
14
- /* margin: 0px 32px; */
15
- /* width: 275px;
16
- height: 229px; */
17
- /* left: 0px;
18
- top: 0px; */
19
- /* border: 1.5px dashed #9b51e0; */
20
- /* background: #f3f6f9; */
21
- box-sizing: border-box;
22
- }
23
- .dot {
24
- background: #5db883;
25
- /* border: solid 1px #2bb24c; */
26
- border-radius: 50%;
27
- /* box-shadow: 0px 0 2px #2bb24c; */
28
- width: 8px;
29
- height: 8px;
30
- /* left: 6px;
31
- top: 6px; */
32
- margin: 100px auto;
33
- position: relative;
34
- }
11
+ <style> /* Please, use the file src/assets/scss/components/PsHighlightRippleDot.scss */</style>
35
12
 
36
- .dot::before,
37
- .dot::after {
38
- background: #def8e8;
39
- border: solid 0px #2bb24c;
40
- border-radius: 50%;
41
- content: '';
42
- width: 36px;
43
- height: 36px;
44
- left: -8px;
45
- top: -8px;
46
- position: absolute;
47
- transform-origin: center center;
48
- transform: scale(1) translate(-1px, -1px);
49
- }
50
- .dot::before {
51
- animation: ripple 1s infinite;
52
- }
53
- .dot::after {
54
- animation: ripple 1s infinite;
55
- /* animation-delay: 0.4s; */
56
- }
57
-
58
- @keyframes ripple {
59
- 0% {
60
- /* transform: scale(1) translate(-1px, -1px);
61
- opacity: 0.75; */
62
- left: 5px;
63
- top: 5px;
64
- opacity: 0.95;
65
- width: 0;
66
- height: 0;
67
- }
68
- 100% {
69
- /* transform: scale(2) translate(-1px, -1px);
70
- opacity: 0; */
71
- left: -13px;
72
- top: -13px;
73
- opacity: 0;
74
- width: 36px;
75
- height: 36px;
76
- }
77
- }
78
- </style>
@@ -1,17 +1,23 @@
1
1
  <template>
2
- <div :class="cssClass">
3
- <div class="psui-w-full">{{ message }}</div>
2
+ <div class="psui-el-mini-tag" :class="getComponentClass">
3
+ <div>{{ message }}</div>
4
4
  </div>
5
5
  </template>
6
6
 
7
7
  <script>
8
- export const typeOptions = ['informative', 'success', 'warning', 'error']
8
+ export const typeOptions = [
9
+ 'info',
10
+ 'success',
11
+ 'warning',
12
+ 'error',
13
+ 'default',
14
+ ]
9
15
  export default {
10
16
  name: 'PsMiniTag',
11
17
  props: {
12
- type: {
18
+ layout: {
13
19
  type: String,
14
- default: 'informative',
20
+ default: 'info',
15
21
  validator: (value) => typeOptions.indexOf(value) !== -1,
16
22
  },
17
23
  message: {
@@ -19,28 +25,13 @@ export default {
19
25
  required: true,
20
26
  },
21
27
  },
22
- data() {
23
- return {
24
- colors: {
25
- informative: { background: 'blue-20', color: 'blue-60' },
26
- success: { background: 'green-10', color: 'green-70' },
27
- warning: { background: 'yellow-10', color: 'yellow-70' },
28
- error: { background: 'red-10', color: 'red-20' },
29
- },
30
- }
31
- },
32
28
  computed: {
33
- cssClass() {
34
- return `fit-content psui-flex psui-rounded-lg psui-px-2 psui-items-center psui-justify-center psui-flex-row psui-mx-6 psui-bg-${
35
- this.colors[this.type].background
36
- } psui-text-${this.colors[this.type].color}`
29
+ getComponentClass() {
30
+ return `psui-el-mini-tag-layout-${this.layout}`
37
31
  },
38
32
  },
39
33
  }
40
34
  </script>
41
35
 
42
- <style scoped>
43
- .fit-content {
44
- width: fit-content;
45
- }
46
- </style>
36
+ <style> /* Please, use the file src/assets/scss/components/PsMiniTag.scss */ </style>
37
+
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <div
3
+ class="psui-el-simple-progress-bar"
4
+ :class="bgColor"
5
+ >
6
+ <div
7
+ class="psui-el-simple-progress-bar-percentage"
8
+ :style="{ width: `${value}px` }"
9
+ :class="percentageColor"
10
+ ></div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ props: {
17
+ value: {
18
+ type: Number,
19
+ required: true,
20
+ default: 0,
21
+ validator: (value) => {
22
+ return value >= 0 && value <= 100
23
+ },
24
+ },
25
+ percentageColor: {
26
+ type: String,
27
+ default: 'psui-bg-blue-60'
28
+ // required: true,
29
+
30
+ },
31
+ bgColor: {
32
+ type: String,
33
+ default: 'psui-bg-blue-20'
34
+ // required: true,
35
+ },
36
+
37
+ },
38
+ }
39
+ </script>
40
+
41
+ <style> /* Please, use the file src/assets/scss/components/PsProgressBar.scss */ </style>
42
+