@policystudio/policy-studio-ui-vue 1.1.90-beta.10 → 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 (132) 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 +56 -66
  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} +3 -5
  58. package/src/util/directives.ts +24 -0
  59. package/src/util/eventBus.js +10 -0
  60. package/src/util/{imageLoader.ts → imageLoader.js} +9 -8
  61. package/tailwind.config.js +1 -1
  62. package/tsconfig.json +16 -18
  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/css/psui_styles.css +0 -4647
  69. package/postcss.config.js +0 -8
  70. package/src/assets/images/multifamily-units.svg +0 -10
  71. package/src/assets/images/policy-studio.svg +0 -15
  72. package/src/components/playground/PsScrollBar.vue +0 -320
  73. package/src/contents/ComparisonData.ts +0 -378
  74. package/src/contents/FlexibleData.ts +0 -502
  75. package/src/contents/ResultsData.ts +0 -531
  76. package/src/stories/Accordion.stories.ts +0 -59
  77. package/src/stories/BadgeWithIcon.stories.ts +0 -31
  78. package/src/stories/BarChart.stories.ts +0 -17
  79. package/src/stories/Breadcrumb.stories.ts +0 -22
  80. package/src/stories/Button.stories.ts +0 -48
  81. package/src/stories/Button.vue +0 -59
  82. package/src/stories/CardInfos.stories.ts +0 -15
  83. package/src/stories/ChartLegend.stories.ts +0 -15
  84. package/src/stories/Checkbox.stories.ts +0 -45
  85. package/src/stories/CheckboxSimple.stories.ts +0 -49
  86. package/src/stories/Chips.stories.ts +0 -33
  87. package/src/stories/ClimateZoneBadge.stories.ts +0 -28
  88. package/src/stories/Colors.mdx +0 -70
  89. package/src/stories/CostEffectBar.stories.ts +0 -26
  90. package/src/stories/Datatable.stories.ts +0 -53
  91. package/src/stories/DateCardInfo.stories.ts +0 -20
  92. package/src/stories/Dialog.stories.ts +0 -131
  93. package/src/stories/Draggable.stories.ts +0 -32
  94. package/src/stories/Dropdown.stories.ts +0 -89
  95. package/src/stories/DropdownList.stories.ts +0 -213
  96. package/src/stories/ElevationSystem.mdx +0 -41
  97. package/src/stories/Header.stories.ts +0 -42
  98. package/src/stories/Header.vue +0 -77
  99. package/src/stories/HighlightRippleDot.stories.ts +0 -16
  100. package/src/stories/Icon.stories.ts +0 -22
  101. package/src/stories/InlineSelector.stories.ts +0 -18
  102. package/src/stories/Input.stories.ts +0 -244
  103. package/src/stories/InputSelect.stories.ts +0 -31
  104. package/src/stories/InputTextArea.stories.ts +0 -25
  105. package/src/stories/Introduction.mdx +0 -211
  106. package/src/stories/MiniTag.stories.ts +0 -59
  107. package/src/stories/Playground.stories.ts +0 -16
  108. package/src/stories/ProgressBar.stories.ts +0 -24
  109. package/src/stories/RadioButton.stories.ts +0 -41
  110. package/src/stories/RadioButtonSimple.stories.ts +0 -43
  111. package/src/stories/SimpleAlert.stories.ts +0 -22
  112. package/src/stories/Slider.stories.ts +0 -79
  113. package/src/stories/Switch.stories.ts +0 -39
  114. package/src/stories/TabHeader.stories.ts +0 -56
  115. package/src/stories/TableResults.stories.ts +0 -728
  116. package/src/stories/TagScope.stories.ts +0 -17
  117. package/src/stories/TestimonialCard.stories.ts +0 -27
  118. package/src/stories/Toast.stories.ts +0 -52
  119. package/src/stories/Toggle.stories.ts +0 -48
  120. package/src/stories/Tooltip.stories.ts +0 -114
  121. package/src/stories/Typography.mdx +0 -212
  122. package/src/stories/assets/code-brackets.svg +0 -1
  123. package/src/stories/assets/colors.svg +0 -1
  124. package/src/stories/assets/comments.svg +0 -1
  125. package/src/stories/assets/direction.svg +0 -1
  126. package/src/stories/assets/flow.svg +0 -1
  127. package/src/stories/assets/plugin.svg +0 -1
  128. package/src/stories/assets/repo.svg +0 -1
  129. package/src/stories/assets/stackalt.svg +0 -1
  130. package/src/stories/button.css +0 -30
  131. package/src/stories/header.css +0 -32
  132. package/webpack.config.js +0 -36
package/src/index.ts CHANGED
@@ -1,52 +1,53 @@
1
1
  /**
2
2
  * General Components
3
3
  */
4
+ import { directives } from './util/directives'
4
5
 
5
- import PsButton from './components/buttons/PsButton.vue'
6
- import PsCheckbox from './components/controls/PsCheckbox.vue'
7
- import PsRadioButton from './components/controls/PsRadioButton.vue'
8
- import PsSlider from './components/controls/PsSlider.vue'
9
- import PsSwitch from './components/controls/PsSwitch.vue'
10
- import PsToggle from './components/controls/PsToggle.vue'
11
- import PsInput from './components/forms/PsInput.vue'
12
- import PsDropdown from './components/forms/PsDropdown.vue'
13
- import PsDropdownList from './components/forms/PsDropdownList.vue'
14
- import PsInputTextArea from './components/forms/PsInputTextArea.vue'
15
- import PsInputSelect from './components/forms/PsInputSelect.vue'
16
- import PsDialog from './components/notifications/PsDialog.vue'
17
- import PsToast from './components/notifications/PsToast.vue'
18
- import PsTabHeader from './components/tabs/PsTabHeader.vue'
19
- import PsAccordion from './components/accordion/PsAccordion.vue'
20
- import PsAccordionItem from './components/accordion/PsAccordionItem.vue'
21
- import PsChips from './components/chips/PsChips.vue'
22
- import PsDataTable from './components/datatable/PsDataTable.vue'
23
- import PsDataTableItem from './components/datatable/PsDataTableItem.vue'
24
- import PsTableResults from './components/table-results/PsTableResults.vue'
25
- import PsTableResultsBody from './components/table-results/PsTableResultsBody.vue'
26
- import PsTableResultsHead from './components/table-results/PsTableResultsHead.vue'
27
- import PsTableResultsHeadComparison from './components/table-results/PsTableResultsHeadComparison.vue'
28
- import PsTableResultsHeadFlexible from './components/table-results/PsTableResultsHeadFlexible.vue'
29
- import PsIcon from './components/ui/PsIcon.vue'
30
- import PsDotLoader from './components/ui/PsDotLoader.vue'
31
- import PsTooltip from './components/tooltip/PsTooltip.vue'
32
- import PsRichTooltip from './components/tooltip/PsRichTooltip.vue'
33
- import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
34
- import PsDraggable from './components/controls/PsDraggable.vue'
35
- import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
36
- import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
37
- import PsInlineSelector from './components/controls/PsInlineSelector.vue'
38
- import PsScrollBar from './components/playground/PsScrollBar.vue'
39
- import PsMiniTag from './components/badges-and-tags/PsMiniTag.vue'
40
- import PsCheckboxSimple from './components/controls/PsCheckboxSimple.vue'
41
- import PsBadgeWithIcon from './components/badges-and-tags/PsBadgeWithIcon.vue'
42
- import PsProgressBar from './components/badges-and-tags/PsProgressBar.vue'
43
- import PsRadioButtonSimple from './components/controls/PsRadioButtonSimple.vue'
44
- import PsTestimonialCard from './components/badges-and-tags/PsTestimonialCard.vue'
45
- import PsDateCardInfo from './components/badges-and-tags/PsDateCardInfo.vue'
46
- import PsTagScope from './components/badges-and-tags/PsTagScope.vue'
47
- import PsBarChart from './components/data-graphics/PsBarChart.vue'
48
- import PsSimpleAlert from './components/notifications/PsSimpleAlert.vue'
49
- import PsBreadcrumb from './components/navigations/PsBreadcrumb.vue'
6
+ import PsButton from '../src/components/buttons/PsButton.vue'
7
+ import PsCheckbox from '../src/components/controls/PsCheckbox.vue'
8
+ import PsRadioButton from '../src/components/controls/PsRadioButton.vue'
9
+ import PsSlider from '../src/components/controls/PsSlider.vue'
10
+ import PsSwitch from '../src/components/controls/PsSwitch.vue'
11
+ import PsToggle from '../src/components/controls/PsToggle.vue'
12
+ import PsInput from '../src/components/forms/PsInput.vue'
13
+ import PsDropdown from '../src/components/forms/PsDropdown.vue'
14
+ import PsDropdownList from '../src/components/forms/PsDropdownList.vue'
15
+ import PsInputTextArea from '../src/components/forms/PsInputTextArea.vue'
16
+ import PsInputSelect from '../src/components/forms/PsInputSelect.vue'
17
+ import PsDialog from '../src/components/notifications/PsDialog.vue'
18
+ import PsToast from '../src/components/notifications/PsToast.vue'
19
+ import PsTabHeader from '../src/components/tabs/PsTabHeader.vue'
20
+ import PsAccordion from '../src/components/accordion/PsAccordion.vue'
21
+ import PsAccordionItem from '../src/components/accordion/PsAccordionItem.vue'
22
+ import PsChips from '../src/components/chips/PsChips.vue'
23
+ import PsDataTable from '../src/components/datatable/PsDataTable.vue'
24
+ import PsDataTableItem from '../src/components/datatable/PsDataTableItem.vue'
25
+ import PsTableResults from '../src/components/table-results/PsTableResults.vue'
26
+ import PsTableResultsBody from '../src/components/table-results/PsTableResultsBody.vue'
27
+ import PsTableResultsHead from '../src/components/table-results/PsTableResultsHead.vue'
28
+ import PsTableResultsHeadComparison from '../src/components/table-results/PsTableResultsHeadComparison.vue'
29
+ import PsTableResultsHeadFlexible from '../src/components/table-results/PsTableResultsHeadFlexible.vue'
30
+ import PsTableResultsRow from '../src/components/table-results/PsTableResultsRow.vue'
31
+ import PsIcon from '../src/components/ui/PsIcon.vue'
32
+ import PsDotLoader from '../src/components/ui/PsDotLoader.vue'
33
+ import PsTooltip from '../src/components/tooltip/PsTooltip.vue'
34
+ import PsRichTooltip from '../src/components/tooltip/PsRichTooltip.vue'
35
+ import PsDialogTooltip from '../src/components/tooltip/PsDialogTooltip.vue'
36
+ import PsDraggable from '../src/components/controls/PsDraggable.vue'
37
+ import PsCardInfos from '../src/components/badges-and-tags/PsCardInfos.vue'
38
+ import PsChartLegend from '../src/components/badges-and-tags/PsChartLegend.vue'
39
+ import PsInlineSelector from '../src/components/controls/PsInlineSelector.vue'
40
+ import PsMiniTag from '../src/components/badges-and-tags/PsMiniTag.vue'
41
+ import PsCheckboxSimple from '../src/components/controls/PsCheckboxSimple.vue'
42
+ import PsBadgeWithIcon from '../src/components/badges-and-tags/PsBadgeWithIcon.vue'
43
+ import PsProgressBar from '../src/components/badges-and-tags/PsProgressBar.vue'
44
+ import PsRadioButtonSimple from '../src/components/controls/PsRadioButtonSimple.vue'
45
+ import PsTestimonialCard from '../src/components/badges-and-tags/PsTestimonialCard.vue'
46
+ import PsDateCardInfo from '../src/components/badges-and-tags/PsDateCardInfo.vue'
47
+ import PsTagScope from '../src/components/badges-and-tags/PsTagScope.vue'
48
+ import PsBarChart from '../src/components/data-graphics/PsBarChart.vue'
49
+ import PsSimpleAlert from '../src/components/notifications/PsSimpleAlert.vue'
50
+ import PsBreadcrumb from '../src/components/navigations/PsBreadcrumb.vue'
50
51
 
51
52
 
52
53
  export default {
@@ -66,9 +67,10 @@ export default {
66
67
  Vue.component('PsChips', PsChips)
67
68
  Vue.component('PsDataTable', PsDataTable)
68
69
  Vue.component('PsDataTableItem', PsDataTableItem)
69
- Vue.component('PsTableResults', PsTableResults)
70
70
  Vue.component('PsTableResultsHead', PsTableResultsHead)
71
71
  Vue.component('PsTableResultsHeadComparison', PsTableResultsHeadComparison)
72
+ Vue.component('PsTableResults', PsTableResults)
73
+ Vue.component('PsTableResultsRow', PsTableResultsRow)
72
74
  Vue.component('PsTableResultsBody', PsTableResultsBody)
73
75
  Vue.component('PsTableResultsHeadFlexible',PsTableResultsHeadFlexible)
74
76
  Vue.component('PsIcon', PsIcon)
@@ -84,7 +86,6 @@ export default {
84
86
  Vue.component('PsInputSelect', PsInputSelect)
85
87
  Vue.component('PsDropdown',PsDropdown)
86
88
  Vue.component('PsDropdownList', PsDropdownList)
87
- Vue.component('PsScrollBar', PsScrollBar)
88
89
  Vue.component('PsMiniTag', PsMiniTag)
89
90
  Vue.component('PsCheckboxSimple', PsCheckboxSimple)
90
91
  Vue.component('PsBadgeWithIcon', PsBadgeWithIcon)
@@ -97,22 +98,11 @@ export default {
97
98
  Vue.component('PsSimpleAlert',PsSimpleAlert)
98
99
  Vue.component('PsBreadcrumb', PsBreadcrumb)
99
100
 
100
-
101
- Vue.directive('click-outside', {
102
- bind: function (el:any, binding:any, vnode:any) {
103
- el.clickOutsideEvent = function (event:any) {
104
- // here I check that click was outside the el and his children
105
- if (!(el == event.target || el.contains(event.target))) {
106
- // and if it did, call method provided in attribute value
107
- vnode.context[binding.expression](event)
108
- }
109
- }
110
- document.body.addEventListener('click', el.clickOutsideEvent)
111
- },
112
- unbind: function (el:any) {
113
- document.body.removeEventListener('click', el.clickOutsideEvent)
114
- },
115
- })
101
+ /**
102
+ * Initialize directives
103
+ */
104
+ directives(Vue)
105
+
116
106
  },
117
107
  }
118
108
 
@@ -132,7 +122,6 @@ export {
132
122
  PsChips,
133
123
  PsDataTable,
134
124
  PsDataTableItem,
135
- PsTableResults,
136
125
  PsTableResultsHead,
137
126
  PsTableResultsBody,
138
127
  PsTableResultsHeadFlexible,
@@ -150,7 +139,6 @@ export {
150
139
  PsInputSelect,
151
140
  PsDropdown,
152
141
  PsDropdownList,
153
- PsScrollBar,
154
142
  PsMiniTag,
155
143
  PsCheckboxSimple,
156
144
  PsBadgeWithIcon,
@@ -161,6 +149,8 @@ export {
161
149
  PsTagScope,
162
150
  PsBarChart,
163
151
  PsSimpleAlert,
164
- PsBreadcrumb
152
+ PsBreadcrumb,
153
+ PsTableResults,
154
+ PsTableResultsRow
165
155
  }
166
156
 
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "rootDir": "../",
4
+ "strict": true,
5
+ "outDir": "../dist",
6
+ "resolveJsonModule": true,
7
+ "allowJs": true
8
+ },
9
+ "references": [
10
+ {"path": "../"}
11
+ ]
12
+ }
@@ -4,8 +4,3 @@ declare module '*.vue' {
4
4
  const component: DefineComponent<{}, {}, any>
5
5
  export default component
6
6
  }
7
-
8
- declare module '*.svg' {
9
- const content: string;
10
- export default content;
11
- }
@@ -1,4 +1,4 @@
1
- export const randomString = (length:any) => {
1
+ export const randomString = (length) => {
2
2
  let result = ''
3
3
  const characters =
4
4
  'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
@@ -8,8 +8,7 @@ export const randomString = (length:any) => {
8
8
  }
9
9
  return result
10
10
  }
11
-
12
- export const getParentScrollableEl = (node:any):any => {
11
+ export const getParentScrollableEl = (node) => {
13
12
  if (node == null) {
14
13
  return null
15
14
  }
@@ -20,8 +19,7 @@ export const getParentScrollableEl = (node:any):any => {
20
19
  return getParentScrollableEl(node.parentNode)
21
20
  }
22
21
  }
23
-
24
- export const getParentVueComponentByName = (comp:any, name:any):any => {
22
+ export const getParentVueComponentByName = (comp, name) => {
25
23
  if (comp.$options.name === name) {
26
24
  return comp
27
25
  } else {
@@ -0,0 +1,24 @@
1
+
2
+ export const directives = (Vue: any) => {
3
+ Vue.directive('click-outside', {
4
+ bind(el: any, binding: any, vnode: any) {
5
+ // Define a function to handle click events outside the element
6
+ const handler = (event: any) => {
7
+ if (binding?.value && !(el === event.target || el.contains(event.target))) {
8
+ // Call the method provided in the directive value
9
+ binding.value(event)
10
+ }
11
+ }
12
+
13
+ // Store the handler function on the element
14
+ el.__clickOutsideHandler__ = handler
15
+
16
+ // Add a click event listener to the body
17
+ document.body.addEventListener('click', handler)
18
+ },
19
+ unbind(el: any) {
20
+ // Remove the click event listener when the element is unbound
21
+ document.body.removeEventListener('click', el.__clickOutsideHandler__)
22
+ },
23
+ })
24
+ }
@@ -0,0 +1,10 @@
1
+ import emitter from 'tiny-emitter/instance'
2
+
3
+ export default {
4
+ $on: (...args) => emitter.on(...args),
5
+ $once: (...args) => emitter.once(...args),
6
+ $off: (...args) => emitter.off(...args),
7
+ $emit: (...args) => emitter.emit(...args)
8
+ }
9
+
10
+
@@ -1,6 +1,4 @@
1
- // @ts-ignore
2
-
3
- export default ({ imageUrl, onProgress = null, returnsBase64 = true }:{imageUrl:any, onProgress:any, returnsBase64:any}) => {
1
+ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
4
2
  return new Promise((resolve, reject) => {
5
3
  const xhr = new XMLHttpRequest()
6
4
  let notifiedNotComputable = false
@@ -8,14 +6,16 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }:{imageUrl:
8
6
  xhr.open('GET', imageUrl, true)
9
7
  xhr.responseType = 'arraybuffer'
10
8
 
11
- xhr.onprogress = (ev:any) => {
9
+ xhr.onprogress = (ev) => {
12
10
  if (ev.lengthComputable) {
13
- // @ts-ignore
11
+
14
12
  const progress = parseInt((ev.loaded / ev.total) * 100)
13
+
15
14
  if(onProgress) onProgress(progress)
16
15
  } else {
17
16
  if (!notifiedNotComputable) {
18
17
  notifiedNotComputable = true
18
+
19
19
  if(onProgress) onProgress(-1)
20
20
  }
21
21
  }
@@ -23,22 +23,23 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }:{imageUrl:
23
23
 
24
24
  xhr.onloadend = () => {
25
25
  const contentType = xhr.getResponseHeader('Content-Type')
26
- // @ts-ignore
26
+
27
27
  if (!contentType.includes('image')) {
28
28
  reject(xhr)
29
29
  } else {
30
30
  if (!notifiedNotComputable) {
31
+
31
32
  if(onProgress) onProgress(100)
32
33
  }
33
34
 
34
35
  if(!returnsBase64) {
35
- // @ts-ignore
36
+
36
37
  resolve()
37
38
  } else {
38
39
  const options = {}
39
40
  const headers = xhr.getAllResponseHeaders()
40
41
  const mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
41
- // @ts-ignore
42
+
42
43
  if (mime && mime[1]) options.type = mime[1]
43
44
  const blob = new Blob([xhr.response], options)
44
45
  resolve(window.URL.createObjectURL(blob))
@@ -1,6 +1,6 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
2
 
3
- module.exports = {
3
+ export default {
4
4
  prefix: 'psui-',
5
5
  content: [
6
6
  './index.html',
package/tsconfig.json CHANGED
@@ -3,45 +3,43 @@
3
3
  "target": "esnext",
4
4
  "module": "esnext",
5
5
  "strict": true,
6
+ "strictNullChecks": true,
7
+ "jsx": "preserve",
8
+ "declaration": true,
6
9
  "moduleResolution": "node",
7
- "allowJs": true,
10
+ "composite": true,
8
11
  "noEmitOnError": false,
9
- "outDir": "./dist",
10
- "rootDir": "./src",
11
- "skipLibCheck": true, //this make ts ignore error
12
- "skipDefaultLibCheck": true, //this make ts ignore error
13
- "noEmit": true, //this make ts ignore error
12
+ "outDir": "dist",
13
+ "rootDir": "src",
14
+ "skipLibCheck": false,
15
+ "skipDefaultLibCheck": true,
14
16
  "esModuleInterop": true,
15
17
  "allowSyntheticDefaultImports": true,
16
18
  "forceConsistentCasingInFileNames": true,
17
19
  "useDefineForClassFields": true,
18
20
  "sourceMap": true,
19
- "baseUrl": ".",
21
+ "allowJs": true,
22
+ "baseUrl": "",
23
+
20
24
  "types": [
21
- "webpack-env"
25
+ "webpack-env",
22
26
  ],
23
- "paths": {
24
- "@/*": [
25
- "src/*"
26
- ]
27
- },
28
27
  "lib": [
29
28
  "esnext",
30
- "dom",
29
+ "dom",
31
30
  "dom.iterable",
32
31
  "scripthost"
33
32
  ]
34
33
  },
35
34
  "include": [
36
35
  "src/**/*.ts",
37
- "src/**/*.tsx",
38
36
  "src/**/*.d.ts",
39
37
  "src/**/*.vue",
40
- "src/**/*.stories.ts",
41
38
  "tests/**/*.ts",
42
- "tests/**/*.tsx",
39
+ "tests/**/*.tsx", "src/util/eventBus.js", "src/util/GeneralFunctions.js", "src/util/imageLoader.js",
43
40
  ],
44
41
  "exclude": [
45
- "node_modules"
42
+ "node_modules",
43
+ "doc"
46
44
  ]
47
45
  }
@@ -1,11 +0,0 @@
1
- import { create } from '@storybook/theming'
2
- import PolicyStudioUiLogo from '../src/assets/images/policy-studio.svg'
3
-
4
-
5
- export default create({
6
- base: 'light',
7
- brandTitle: 'Policy Studio UI Vue',
8
- brandUrl: 'https://policystudio.co/',
9
- brandImage: PolicyStudioUiLogo,
10
- brandTarget: '_blank',
11
- });
@@ -1,26 +0,0 @@
1
- // this was a vue2 syntax
2
- // import Vue from 'vue';
3
- // export const eventBus = new Vue();
4
-
5
- // import { createApp } from 'vue';
6
-
7
- // export const app = createApp({});
8
- // const emitter = app.config.globalProperties.$emitter = {};
9
-
10
- // export const eventBus = {
11
- // on(event, callback) {
12
- // if (!emitter[event]) {
13
- // emitter[event] = [];
14
- // }
15
- // emitter[event].push(callback);
16
- // },
17
- // emit(event, ...args) {
18
- // if (emitter[event]) {
19
- // emitter[event].forEach(callback => {
20
- // callback(...args);
21
- // });
22
- // }
23
- // },
24
- // };
25
-
26
- // app.mount('#app');
@@ -1,21 +0,0 @@
1
- /** @type { import('@storybook/vue3-webpack5').StorybookConfig } */
2
- const config = {
3
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
4
- addons: [
5
- "@storybook/addon-links",
6
- "@storybook/addon-essentials",
7
- "@storybook/addon-interactions",
8
- ],
9
- framework: {
10
- name: "@storybook/vue3-webpack5",
11
- options: {
12
- builder: {
13
- useSWC: true,
14
- },
15
- },
16
- },
17
- docs: {
18
- autodocs: "tag",
19
- },
20
- };
21
- export default config;
@@ -1,7 +0,0 @@
1
- import { addons } from '@storybook/manager-api'
2
-
3
- import PolicyStudio from './PolicyStudio'
4
-
5
- addons.setConfig({
6
- theme: PolicyStudio,
7
- });
@@ -1,17 +0,0 @@
1
-
2
- /**
3
- * Import tailwind css file (bundle) based on environment
4
- */
5
- const cssEnvFolder = (process.env.STORYBOOK_ENV === 'production') ? 'dist' : 'temp'
6
- require( `../${cssEnvFolder}/css/psui_styles.css`)
7
- console.warn(`Using tailwind css file(bundle) from: ../${cssEnvFolder}/css/psui_styles.css`)
8
-
9
- export const parameters = {
10
- actions: { argTypesRegex: "^on[A-Z].*" },
11
- controls: {
12
- matchers: {
13
- color: /(background|color)$/i,
14
- date: /Date$/,
15
- },
16
- },
17
- }