@policystudio/policy-studio-ui-vue 1.1.90-beta.12 → 1.1.90-beta.17

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 (224) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.github/workflows/deploy-storybook.yml +4 -4
  3. package/.nvmrc +1 -0
  4. package/dist/css/psui_styles_output.css +6986 -0
  5. package/package.json +9 -23
  6. package/src/assets/scss/components/PsDataTable.scss +1 -1
  7. package/src/components/accordion/PsAccordionItem.vue +75 -75
  8. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
  9. package/src/components/badges-and-tags/PsCardInfos.vue +40 -41
  10. package/src/components/badges-and-tags/PsChartLegend.vue +47 -51
  11. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +14 -19
  12. package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
  13. package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
  14. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
  15. package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
  16. package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
  17. package/src/components/badges-and-tags/PsTagScope.vue +17 -22
  18. package/src/components/badges-and-tags/PsTestimonialCard.vue +20 -26
  19. package/src/components/buttons/PsButton.vue +61 -62
  20. package/src/components/chips/PsChips.vue +98 -101
  21. package/src/components/controls/PsCheckbox.vue +84 -84
  22. package/src/components/controls/PsCheckboxSimple.vue +95 -95
  23. package/src/components/controls/PsDraggable.vue +53 -55
  24. package/src/components/controls/PsInlineSelector.vue +99 -99
  25. package/src/components/controls/PsRadioButton.vue +59 -58
  26. package/src/components/controls/PsRadioButtonSimple.vue +79 -75
  27. package/src/components/controls/PsSlider.vue +185 -176
  28. package/src/components/controls/PsSwitch.vue +51 -52
  29. package/src/components/controls/PsToggle.vue +53 -50
  30. package/src/components/data-graphics/PsBarChart.vue +19 -21
  31. package/src/components/datatable/PsDataTable.vue +56 -60
  32. package/src/components/datatable/PsDataTableItem.vue +14 -28
  33. package/src/components/forms/PsDropdown.vue +164 -162
  34. package/src/components/forms/PsDropdownList.vue +132 -129
  35. package/src/components/forms/PsInput.vue +155 -153
  36. package/src/components/forms/PsInputSelect.vue +91 -92
  37. package/src/components/forms/PsInputTextArea.vue +71 -71
  38. package/src/components/navigations/PsBreadcrumb.vue +26 -34
  39. package/src/components/notifications/PsDialog.vue +57 -56
  40. package/src/components/notifications/PsSimpleAlert.vue +28 -29
  41. package/src/components/notifications/PsToast.vue +40 -39
  42. package/src/components/table-results/PsTableResults.vue +452 -458
  43. package/src/components/table-results/PsTableResultsBody.vue +66 -67
  44. package/src/components/table-results/PsTableResultsHead.vue +62 -56
  45. package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
  46. package/src/components/table-results/PsTableResultsHeadFlexible.vue +63 -56
  47. package/src/components/table-results/PsTableResultsRow.vue +55 -56
  48. package/src/components/tabs/PsTabHeader.vue +106 -100
  49. package/src/components/tooltip/PsDialogTooltip.vue +96 -101
  50. package/src/components/tooltip/PsRichTooltip.vue +42 -45
  51. package/src/components/tooltip/PsTooltip.vue +111 -116
  52. package/src/components/ui/PsDotLoader.vue +1 -5
  53. package/src/components/ui/PsIcon.vue +126 -129
  54. package/src/index.ts +57 -71
  55. package/src/tsconfig.json +12 -0
  56. package/src/{shims-vue.d.ts → types/index.d.ts} +0 -5
  57. package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +0 -3
  58. package/src/util/directives.ts +24 -0
  59. package/src/util/eventBus.js +10 -0
  60. package/src/util/{imageLoader.ts → imageLoader.js} +7 -8
  61. package/tailwind.config.js +1 -1
  62. package/tsconfig.json +15 -17
  63. package/.storybook/PolicyStudio.ts +0 -11
  64. package/.storybook/eventBus.ts +0 -26
  65. package/.storybook/main.ts +0 -21
  66. package/.storybook/manager.ts +0 -7
  67. package/.storybook/preview.ts +0 -17
  68. package/dist/contents/ComparisonData.js +0 -376
  69. package/dist/contents/ComparisonData.js.map +0 -1
  70. package/dist/contents/FlexibleData.js +0 -501
  71. package/dist/contents/FlexibleData.js.map +0 -1
  72. package/dist/contents/ResultsData.js +0 -530
  73. package/dist/contents/ResultsData.js.map +0 -1
  74. package/dist/css/psui_styles.css +0 -4647
  75. package/dist/index.js +0 -114
  76. package/dist/index.js.map +0 -1
  77. package/dist/stories/Accordion.stories.js +0 -56
  78. package/dist/stories/Accordion.stories.js.map +0 -1
  79. package/dist/stories/BadgeWithIcon.stories.js +0 -28
  80. package/dist/stories/BadgeWithIcon.stories.js.map +0 -1
  81. package/dist/stories/BarChart.stories.js +0 -16
  82. package/dist/stories/BarChart.stories.js.map +0 -1
  83. package/dist/stories/Breadcrumb.stories.js +0 -21
  84. package/dist/stories/Breadcrumb.stories.js.map +0 -1
  85. package/dist/stories/Button.stories.js +0 -44
  86. package/dist/stories/Button.stories.js.map +0 -1
  87. package/dist/stories/CardInfos.stories.js +0 -13
  88. package/dist/stories/CardInfos.stories.js.map +0 -1
  89. package/dist/stories/ChartLegend.stories.js +0 -13
  90. package/dist/stories/ChartLegend.stories.js.map +0 -1
  91. package/dist/stories/Checkbox.stories.js +0 -44
  92. package/dist/stories/Checkbox.stories.js.map +0 -1
  93. package/dist/stories/CheckboxSimple.stories.js +0 -48
  94. package/dist/stories/CheckboxSimple.stories.js.map +0 -1
  95. package/dist/stories/Chips.stories.js +0 -27
  96. package/dist/stories/Chips.stories.js.map +0 -1
  97. package/dist/stories/ClimateZoneBadge.stories.js +0 -15
  98. package/dist/stories/ClimateZoneBadge.stories.js.map +0 -1
  99. package/dist/stories/CostEffectBar.stories.js +0 -21
  100. package/dist/stories/CostEffectBar.stories.js.map +0 -1
  101. package/dist/stories/Datatable.stories.js +0 -45
  102. package/dist/stories/Datatable.stories.js.map +0 -1
  103. package/dist/stories/DateCardInfo.stories.js +0 -18
  104. package/dist/stories/DateCardInfo.stories.js.map +0 -1
  105. package/dist/stories/Dialog.stories.js +0 -127
  106. package/dist/stories/Dialog.stories.js.map +0 -1
  107. package/dist/stories/Draggable.stories.js +0 -20
  108. package/dist/stories/Draggable.stories.js.map +0 -1
  109. package/dist/stories/Dropdown.stories.js +0 -98
  110. package/dist/stories/Dropdown.stories.js.map +0 -1
  111. package/dist/stories/DropdownList.stories.js +0 -208
  112. package/dist/stories/DropdownList.stories.js.map +0 -1
  113. package/dist/stories/Header.stories.js +0 -39
  114. package/dist/stories/Header.stories.js.map +0 -1
  115. package/dist/stories/HighlightRippleDot.stories.js +0 -13
  116. package/dist/stories/HighlightRippleDot.stories.js.map +0 -1
  117. package/dist/stories/Icon.stories.js +0 -19
  118. package/dist/stories/Icon.stories.js.map +0 -1
  119. package/dist/stories/InlineSelector.stories.js +0 -16
  120. package/dist/stories/InlineSelector.stories.js.map +0 -1
  121. package/dist/stories/Input.stories.js +0 -235
  122. package/dist/stories/Input.stories.js.map +0 -1
  123. package/dist/stories/InputSelect.stories.js +0 -28
  124. package/dist/stories/InputSelect.stories.js.map +0 -1
  125. package/dist/stories/InputTextArea.stories.js +0 -23
  126. package/dist/stories/InputTextArea.stories.js.map +0 -1
  127. package/dist/stories/MiniTag.stories.js +0 -44
  128. package/dist/stories/MiniTag.stories.js.map +0 -1
  129. package/dist/stories/Playground.stories.js +0 -14
  130. package/dist/stories/Playground.stories.js.map +0 -1
  131. package/dist/stories/ProgressBar.stories.js +0 -21
  132. package/dist/stories/ProgressBar.stories.js.map +0 -1
  133. package/dist/stories/RadioButton.stories.js +0 -36
  134. package/dist/stories/RadioButton.stories.js.map +0 -1
  135. package/dist/stories/RadioButtonSimple.stories.js +0 -40
  136. package/dist/stories/RadioButtonSimple.stories.js.map +0 -1
  137. package/dist/stories/SimpleAlert.stories.js +0 -19
  138. package/dist/stories/SimpleAlert.stories.js.map +0 -1
  139. package/dist/stories/Slider.stories.js +0 -70
  140. package/dist/stories/Slider.stories.js.map +0 -1
  141. package/dist/stories/Switch.stories.js +0 -35
  142. package/dist/stories/Switch.stories.js.map +0 -1
  143. package/dist/stories/TabHeader.stories.js +0 -48
  144. package/dist/stories/TabHeader.stories.js.map +0 -1
  145. package/dist/stories/TableResults.stories.js +0 -717
  146. package/dist/stories/TableResults.stories.js.map +0 -1
  147. package/dist/stories/TagScope.stories.js +0 -16
  148. package/dist/stories/TagScope.stories.js.map +0 -1
  149. package/dist/stories/TestimonialCard.stories.js +0 -24
  150. package/dist/stories/TestimonialCard.stories.js.map +0 -1
  151. package/dist/stories/Toast.stories.js +0 -51
  152. package/dist/stories/Toast.stories.js.map +0 -1
  153. package/dist/stories/Toggle.stories.js +0 -42
  154. package/dist/stories/Toggle.stories.js.map +0 -1
  155. package/dist/stories/Tooltip.stories.js +0 -108
  156. package/dist/stories/Tooltip.stories.js.map +0 -1
  157. package/dist/util/GeneralFunctions.js +0 -29
  158. package/dist/util/GeneralFunctions.js.map +0 -1
  159. package/dist/util/imageLoader.js +0 -52
  160. package/dist/util/imageLoader.js.map +0 -1
  161. package/postcss.config.js +0 -8
  162. package/src/assets/images/multifamily-units.svg +0 -10
  163. package/src/assets/images/policy-studio.svg +0 -15
  164. package/src/components/playground/PsScrollBar.vue +0 -320
  165. package/src/contents/ComparisonData.ts +0 -378
  166. package/src/contents/FlexibleData.ts +0 -502
  167. package/src/contents/ResultsData.ts +0 -531
  168. package/src/stories/Accordion.stories.ts +0 -59
  169. package/src/stories/BadgeWithIcon.stories.ts +0 -31
  170. package/src/stories/BarChart.stories.ts +0 -17
  171. package/src/stories/Breadcrumb.stories.ts +0 -22
  172. package/src/stories/Button.stories.ts +0 -48
  173. package/src/stories/Button.vue +0 -59
  174. package/src/stories/CardInfos.stories.ts +0 -15
  175. package/src/stories/ChartLegend.stories.ts +0 -15
  176. package/src/stories/Checkbox.stories.ts +0 -45
  177. package/src/stories/CheckboxSimple.stories.ts +0 -49
  178. package/src/stories/Chips.stories.ts +0 -33
  179. package/src/stories/ClimateZoneBadge.stories.ts +0 -18
  180. package/src/stories/Colors.mdx +0 -70
  181. package/src/stories/CostEffectBar.stories.ts +0 -24
  182. package/src/stories/Datatable.stories.ts +0 -53
  183. package/src/stories/DateCardInfo.stories.ts +0 -20
  184. package/src/stories/Dialog.stories.ts +0 -131
  185. package/src/stories/Draggable.stories.ts +0 -23
  186. package/src/stories/Dropdown.stories.ts +0 -100
  187. package/src/stories/DropdownList.stories.ts +0 -213
  188. package/src/stories/ElevationSystem.mdx +0 -41
  189. package/src/stories/Header.stories.ts +0 -42
  190. package/src/stories/Header.vue +0 -77
  191. package/src/stories/HighlightRippleDot.stories.ts +0 -16
  192. package/src/stories/Icon.stories.ts +0 -23
  193. package/src/stories/InlineSelector.stories.ts +0 -18
  194. package/src/stories/Input.stories.ts +0 -243
  195. package/src/stories/InputSelect.stories.ts +0 -31
  196. package/src/stories/InputTextArea.stories.ts +0 -25
  197. package/src/stories/Introduction.mdx +0 -211
  198. package/src/stories/MiniTag.stories.ts +0 -59
  199. package/src/stories/Playground.stories.ts +0 -16
  200. package/src/stories/ProgressBar.stories.ts +0 -24
  201. package/src/stories/RadioButton.stories.ts +0 -40
  202. package/src/stories/RadioButtonSimple.stories.ts +0 -43
  203. package/src/stories/SimpleAlert.stories.ts +0 -22
  204. package/src/stories/Slider.stories.ts +0 -79
  205. package/src/stories/Switch.stories.ts +0 -39
  206. package/src/stories/TabHeader.stories.ts +0 -57
  207. package/src/stories/TableResults.stories.ts +0 -728
  208. package/src/stories/TagScope.stories.ts +0 -17
  209. package/src/stories/TestimonialCard.stories.ts +0 -27
  210. package/src/stories/Toast.stories.ts +0 -52
  211. package/src/stories/Toggle.stories.ts +0 -48
  212. package/src/stories/Tooltip.stories.ts +0 -114
  213. package/src/stories/Typography.mdx +0 -212
  214. package/src/stories/assets/code-brackets.svg +0 -1
  215. package/src/stories/assets/colors.svg +0 -1
  216. package/src/stories/assets/comments.svg +0 -1
  217. package/src/stories/assets/direction.svg +0 -1
  218. package/src/stories/assets/flow.svg +0 -1
  219. package/src/stories/assets/plugin.svg +0 -1
  220. package/src/stories/assets/repo.svg +0 -1
  221. package/src/stories/assets/stackalt.svg +0 -1
  222. package/src/stories/button.css +0 -30
  223. package/src/stories/header.css +0 -32
  224. package/webpack.config.js +0 -36
package/package.json CHANGED
@@ -1,37 +1,26 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.90-beta.12",
3
+ "version": "1.1.90-beta.17",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
7
- "serve": "concurrently --kill-others \"npm run watch-storybook\" \"npm run watch-tailwind\"",
8
7
  "lint": "vue-cli-service lint",
9
- "build-storybook": "storybook build",
10
- "build-ts":"tsc",
11
- "build-tailwind": "postcss src/assets/scss/base.scss -o dist/css/psui_styles.css",
12
- "build-temp-tailwind": "postcss src/assets/scss/base.scss -o temp/css/psui_styles.css",
13
- "full-publish": "npm run lint && npm run build-ts && npm run build-tailwind && npm run build-storybook && npm publish --tag beta",
8
+ "build": "tsc -p tsconfig.json && npm run build:tailwind",
9
+ "full-publish": "npm run lint && npm run build && npm publish --tag beta",
14
10
  "kill-port": "sh ./scripts/kill-port.sh",
15
- "serve-prod": "concurrently --kill-others \"npm run watch-storybook\" \"npm run watch-prod-tailwind\"",
16
- "storybook": "concurrently \"npm run kill-port\" \"npm run watch-prod-tailwind\" \"storybook dev -p 6006\"",
17
- "watch-prod-tailwind": "watch 'npm run build-tailwind' ./src/assets",
18
- "watch-tailwind": "watch 'npm run build-temp-tailwind' ./src/assets"
11
+ "build:tailwind": "tailwindcss build -i src/assets/scss/base.scss -o dist/css/psui_styles_output.css -c tailwind.config.js",
12
+ "watch:tailwind": "watch 'npm run build:tailwind' dist/css"
19
13
  },
20
14
  "main": "dist/index.js",
15
+ "types": "src/types/index.d.ts",
21
16
  "dependencies": {
22
17
  "@vue/compat": "^3.4.5",
23
18
  "core-js": "^3.6.5",
19
+ "tiny-emitter": "^2.1.0",
24
20
  "v-tooltip": "^2.1.3",
25
21
  "vue": "^3.4.5"
26
22
  },
27
23
  "devDependencies": {
28
- "@storybook/addon-essentials": "^7.6.7",
29
- "@storybook/addon-interactions": "^7.6.7",
30
- "@storybook/addon-links": "^7.6.7",
31
- "@storybook/blocks": "^7.6.7",
32
- "@storybook/test": "^7.6.7",
33
- "@storybook/vue3": "^7.6.7",
34
- "@storybook/vue3-webpack5": "^7.6.7",
35
24
  "@typescript-eslint/eslint-plugin": "^5.4.0",
36
25
  "@typescript-eslint/parser": "^5.4.0",
37
26
  "@vue/cli-plugin-eslint": "^5.0.8",
@@ -43,16 +32,12 @@
43
32
  "concurrently": "^7.0.0",
44
33
  "eslint": "^8.56.0",
45
34
  "eslint-plugin-prettier": "^5.1.2",
46
- "eslint-plugin-storybook": "^0.6.15",
47
35
  "eslint-plugin-vue": "^8.7.1",
48
36
  "postcss": "^8.3.11",
49
37
  "postcss-cli": "^9.0.2",
50
38
  "postcss-import": "^14.0.2",
51
39
  "postcss-nested": "^5.0.6",
52
40
  "prettier": "^3.1.1",
53
- "react": "^18.2.0",
54
- "react-dom": "^18.2.0",
55
- "storybook": "^7.6.7",
56
41
  "tailwindcss": "^3.4.1",
57
42
  "ts-loader": "^9.5.1",
58
43
  "typescript": "~4.5.5",
@@ -62,7 +47,8 @@
62
47
  "webpack": "^5.89.0"
63
48
  },
64
49
  "engines": {
65
- "node": "18.19.0"
50
+ "node": "20.11.0",
51
+ "npm":"10.2.4"
66
52
  },
67
53
  "keywords": [
68
54
  "vue",
@@ -58,7 +58,7 @@
58
58
  td,
59
59
  tr {
60
60
  padding: 7px 16px;
61
- @apply .psui-text-gray-80;
61
+ @apply psui-text-gray-80;
62
62
  }
63
63
  }
64
64
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  class="psui-el-accordion-item"
4
- :class="{'status-opened':isOpen, 'disabled':disabled}"
4
+ :class="{ 'status-opened': isOpen, disabled: disabled }"
5
5
  >
6
6
  <div class="psui-el-accordion-item-header">
7
7
  <slot
@@ -24,7 +24,7 @@
24
24
  <i
25
25
  v-if="!disabled"
26
26
  class="psui-el-accordion-item-icon"
27
- >{{ getIcon }}</i>
27
+ >{{ getIcon }}</i>
28
28
  </div>
29
29
  </slot>
30
30
  </div>
@@ -45,84 +45,84 @@
45
45
  </div>
46
46
  </template>
47
47
 
48
- <script>
49
- import { getParentVueComponentByName } from '../../util/GeneralFunctions'
48
+ <script setup>
49
+ import { getParentVueComponentByName } from '../../util/GeneralFunctions.js'
50
+ import { defineProps, ref, computed, getCurrentInstance } from 'vue'
50
51
 
51
- export default {
52
- name: 'PsAccordionItem',
53
- props: {
54
- /**
55
- * It sets the title of the accordion item.
56
- */
57
- title: {
58
- type: String,
59
- },
60
- /**
61
- * It sets the status of the accordion item when mounted.
62
- */
63
- opened: {
64
- type: [Boolean],
65
- default: false
66
- },
67
- /**
68
- * 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/.
69
- */
70
- icon: {
71
- type: String
72
- },
73
- /**
74
- * It sets if it has a custom header.
75
- */
76
- hasCustomHeader: {
77
- type: Boolean,
78
- default: false
79
- },
80
- /**
81
- * It sets the disabled status.
82
- */
83
- disabled: {
84
- type: Boolean,
85
- default: false
86
- }
52
+ const localOpened = ref(null)
53
+
54
+ const props = defineProps({
55
+ /**
56
+ * It sets the title of the accordion item.
57
+ */
58
+ title: {
59
+ type: String,
60
+ default: '',
61
+ },
62
+ /**
63
+ * It sets the status of the accordion item when mounted.
64
+ */
65
+ opened: {
66
+ type: [Boolean],
67
+ default: false,
68
+ },
69
+ /**
70
+ * 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/.
71
+ */
72
+ icon: {
73
+ type: String,
74
+ default: '',
87
75
  },
88
- data() {
89
- return {
90
- localOpened: null,
91
- }
76
+ /**
77
+ * It sets if it has a custom header.
78
+ */
79
+ hasCustomHeader: {
80
+ type: Boolean,
81
+ default: false,
92
82
  },
93
- computed: {
94
- isOpen() {
95
- return this.localOpened !== null ? this.localOpened : this.opened
96
- },
97
- getParent() {
98
- return getParentVueComponentByName(this,'PsAccordion')
99
- },
100
- getIcon(){
101
- if(this.getParent._props.layout === 'medium') return 'expand_more'
102
- if(this.getParent._props.layout === 'big' && this.isOpen === false) return 'add'
103
- if(this.getParent._props.layout === 'big' && this.isOpen === true) return 'remove'
104
- return `${this.icon}`
105
- }
83
+ /**
84
+ * It sets the disabled status.
85
+ */
86
+ disabled: {
87
+ type: Boolean,
88
+ default: false,
106
89
  },
107
- methods: {
108
- toggle() {
109
- if (this.localOpened === null) {
110
- this.localOpened = !this.opened
111
- } else {
112
- this.localOpened = !this.localOpened
113
- }
114
- },
115
- start(el) {
116
- el.style.height = el.scrollHeight + 'px'
117
- el.style.padding = el.srcollPaddingBottom + 'px'
118
- },
119
- end(el) {
120
- el.style.height = ''
121
- el.style.padding = ''
122
- }
90
+ })
91
+
92
+ const isOpen = computed(() => {
93
+ return localOpened.value !== null ? localOpened.value : props.opened
94
+ })
95
+
96
+ const getParent = computed(() => {
97
+ const instance = getCurrentInstance()
98
+ let parent = instance.proxy.$parent
99
+ return getParentVueComponentByName(parent, 'PsAccordion')
100
+ })
101
+
102
+ const getIcon = computed(() => {
103
+ if (getParent.value._props.layout === 'medium') return 'expand_more'
104
+ if (getParent.value._props.layout === 'big' && isOpen.value === false) return 'add'
105
+ if (getParent.value._props.layout === 'big' && isOpen.value === true) return 'remove'
106
+ return `${props.icon}`
107
+ })
108
+
109
+ const toggle = () => {
110
+ if (localOpened.value === null) {
111
+ localOpened.value = !props.opened
112
+ } else {
113
+ localOpened.value = !localOpened.value
123
114
  }
124
115
  }
116
+ const start = (el) => {
117
+ el.style.height = el.scrollHeight + 'px'
118
+ el.style.padding = el.srcollPaddingBottom + 'px'
119
+ }
120
+ const end = (el) => {
121
+ el.style.height = ''
122
+ el.style.padding = ''
123
+ }
125
124
  </script>
126
125
 
127
- <style> /* Please, use the file src/assets/scss/components/PsAccordion.scss */</style>
128
-
126
+ <style>
127
+ /* Please, use the file src/assets/scss/components/PsAccordion.scss */
128
+ </style>
@@ -3,8 +3,8 @@
3
3
  class="psui-el-badge-with-icon"
4
4
  :class="getComponentClass"
5
5
  >
6
- <i
7
- v-if="icon"
6
+ <i
7
+ v-if="icon"
8
8
  :class="iconClass"
9
9
  class="psui-el-badge-with-icon-icon"
10
10
  >{{ icon }}</i>
@@ -12,36 +12,33 @@
12
12
  </div>
13
13
  </template>
14
14
 
15
- <script>
16
- export default {
17
- name: 'PsBadgeWithIcon',
18
- props: {
19
- icon: {
20
- type: String,
21
- default:'info'
22
- },
23
- /**
24
- * It set any further css style that might be needed.
25
- */
26
- iconClass: {
27
- type: String,
28
- default:''
29
- },
30
- message: {
31
- type: String,
32
- default: 'Lorem ipsum'
33
- },
34
- layout: {
35
- type: String,
36
- default: 'grey',
37
- validator: (value) => ['grey', 'blue', 'green','yellow'].includes(value)
38
- }
39
- },
40
- computed:{
41
- getComponentClass(){
42
- return `layout-${this.layout}`
43
- }
44
- }
45
- }
46
- </script>
15
+ <script setup>
16
+ import { defineProps, computed } from 'vue'
17
+
18
+ const props = defineProps({
19
+ icon: {
20
+ type: String,
21
+ default: 'info',
22
+ },
23
+ /**
24
+ * It set any further css style that might be needed.
25
+ */
26
+ iconClass: {
27
+ type: String,
28
+ default: '',
29
+ },
30
+ message: {
31
+ type: String,
32
+ default: 'Lorem ipsum',
33
+ },
34
+ layout: {
35
+ type: String,
36
+ default: 'grey',
37
+ validator: (value) => ['grey', 'blue', 'green', 'yellow'].includes(value),
38
+ },
39
+ })
47
40
 
41
+ const getComponentClass = computed(() => {
42
+ return `layout-${props.layout}`
43
+ })
44
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div
2
+ <div
3
3
  class="psui-el-card-infos"
4
4
  @click="onClick()"
5
5
  >
@@ -8,52 +8,51 @@
8
8
  </h5>
9
9
  <div class="psui-el-card-infos-content">
10
10
  <span class="psui-el-card-infos-icon material-icons-round">{{ icon }}</span>
11
- <h5 class="psui-text-gray-80">
12
- {{ total }}
11
+ <h5 class="psui-text-gray-80">
12
+ {{ total }}
13
13
  </h5>
14
14
  </div>
15
15
  </div>
16
16
  </template>
17
17
 
18
- <script>
19
- export default {
20
- name: 'PsCardInfos',
21
- props: {
22
- /**
23
- * It sets the title of your card.
24
- */
25
- title: {
26
- type: String,
27
- default: 'Total',
28
- },
29
- /**
30
- * It sets the subtitle of your card if needed.
31
- */
32
- subtitle: {
33
- type: String,
34
- default: '',
35
- },
36
- /**
37
- * 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/.
38
- */
39
- icon: {
40
- type: String,
41
- default: 'edit',
42
- },
43
- /**
44
- * It sets the data that will show up when component is mounted.
45
- */
46
- total: {
47
- type: String,
48
- default: '',
49
- },
18
+ <script setup>
19
+ import { defineProps, defineEmits } from 'vue'
20
+
21
+ const emit = defineEmits(['click'])
22
+
23
+ defineProps({
24
+ title: {
25
+ type: String,
26
+ default: 'Total',
27
+ },
28
+ /**
29
+ * It sets the subtitle of your card if needed.
30
+ */
31
+ subtitle: {
32
+ type: String,
33
+ default: '',
50
34
  },
51
- methods: {
52
- onClick() {
53
- this.$emit('click')
54
- }
55
- }
35
+ /**
36
+ * 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/.
37
+ */
38
+ icon: {
39
+ type: String,
40
+ default: 'edit',
41
+ },
42
+ /**
43
+ * It sets the data that will show up when component is mounted.
44
+ */
45
+ total: {
46
+ type: String,
47
+ default: '',
48
+ },
49
+ })
50
+
51
+ const onClick = () => {
52
+ emit('click')
56
53
  }
57
54
  </script>
58
55
 
59
- <style> /* Please, use the file src/assets/scss/components/PsCardInfos.scss */</style>
56
+ <style>
57
+ /* Please, use the file src/assets/scss/components/PsCardInfos.scss */
58
+ </style>
@@ -1,69 +1,65 @@
1
1
  <template>
2
2
  <div class="psui-el-chart-legend">
3
3
  <div class="psui-flex psui-flex-shrink-0">
4
- <div
5
- class="psui-el-chart-legend-dot"
6
- :style="dotColor"
4
+ <div
5
+ class="psui-el-chart-legend-dot"
6
+ :style="dotColor"
7
7
  />
8
8
  </div>
9
9
  <div class="psui-flex-grow-1 flex psui-flex-col">
10
- <div class="psui-el-chart-legend-text">
11
- {{ text }}
10
+ <div class="psui-el-chart-legend-text">
11
+ {{ text }}
12
12
  </div>
13
13
  <div class="flex psui-items-center psui-flex-shrink-0 psui-gap-1">
14
- <span
15
- v-if="this.total"
16
- class="psui-el-chart-legend-total"
14
+ <span
15
+ v-if="total"
16
+ class="psui-el-chart-legend-total"
17
17
  >{{ total }}</span>
18
- <span
19
- class="psui-text-gray-30"
20
- v-if="total && percentage"
18
+ <span
19
+ class="psui-text-gray-30"
20
+ v-if="total && percentage"
21
21
  > | </span>
22
- <span
23
- class="psui-el-chart-legend-percentage"
24
- v-if="percentage"
25
- >
26
- {{ percentage }}%
27
- </span>
22
+ <span
23
+ class="psui-el-chart-legend-percentage"
24
+ v-if="percentage"
25
+ > {{ percentage }}% </span>
28
26
  </div>
29
27
  </div>
30
28
  </div>
31
29
  </template>
32
30
 
33
- <script>
34
- export default {
35
- name: 'PsChartLegend',
36
- props: {
37
- /**
38
- * It sets the text of the chart legend.
39
- */
40
- text: {
41
- type: [String, Number],
42
- default: 'Climate Zone 10',
43
- },
44
- /**
45
- * It sets the data that will show up when component is mounted.
46
- */
47
- total: {
48
- type: String,
49
- default: null,
50
- },
51
- /**
52
- * It sets the data that wull show up when component is mounted.
53
- */
54
- percentage: {
55
- type: String,
56
- default: null,
57
- },
58
- /**
59
- * It sets the color of the dot component.
60
- */
61
- dotColor: {
62
- type: Object,
63
- default: null
64
- },
31
+ <script setup>
32
+ import { defineProps } from 'vue'
33
+
34
+ defineProps({
35
+ text: {
36
+ type: [String, Number],
37
+ default: 'Climate Zone 10',
38
+ },
39
+ /**
40
+ * It sets the data that will show up when component is mounted.
41
+ */
42
+ total: {
43
+ type: String,
44
+ default: null,
45
+ },
46
+ /**
47
+ * It sets the data that wull show up when component is mounted.
48
+ */
49
+ percentage: {
50
+ type: String,
51
+ default: null,
52
+ },
53
+ /**
54
+ * It sets the color of the dot component.
55
+ */
56
+ dotColor: {
57
+ type: Object,
58
+ default: null,
65
59
  },
66
- }
60
+ })
67
61
  </script>
68
62
 
69
- <style> /* Please, use the file src/assets/scss/components/PsChartLegend.scss */</style>
63
+ <style>
64
+ /* Please, use the file src/assets/scss/components/PsChartLegend.scss */
65
+ </style>
@@ -7,26 +7,21 @@
7
7
  </div>
8
8
  </template>
9
9
 
10
- <script>
11
- export default {
12
- name: 'PsClimateZoneBadge',
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
- */
17
- icon: {
18
- type: String,
19
- default: 'area_chart',
20
- },
21
- /**
22
- * It sets the content that will show up when the component is rendered.
23
- */
24
- content: {
25
- type: Number,
26
- default: 10,
27
- },
10
+ <script setup>
11
+ import { defineProps } from 'vue'
12
+ defineProps({
13
+ icon: {
14
+ type: String,
15
+ default: 'area_chart',
28
16
  },
29
- }
17
+ /**
18
+ * It sets the content that will show up when the component is rendered.
19
+ */
20
+ content: {
21
+ type: Number,
22
+ default: 10,
23
+ },
24
+ })
30
25
  </script>
31
26
 
32
27
  <style>