@policystudio/policy-studio-ui-vue 1.1.89 → 1.1.90-beta.10

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 (134) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +74 -67
  3. package/.github/workflows/deploy-storybook.yml +1 -1
  4. package/.storybook/PolicyStudio.ts +11 -0
  5. package/.storybook/eventBus.ts +26 -0
  6. package/.storybook/main.ts +21 -0
  7. package/.storybook/manager.ts +7 -0
  8. package/dist/css/psui_styles.css +4028 -110346
  9. package/package.json +50 -34
  10. package/postcss.config.js +1 -1
  11. package/scripts/kill-port.sh +12 -0
  12. package/src/App.vue +30 -0
  13. package/src/assets/scss/base.scss +27 -23
  14. package/src/assets/scss/components/PsAccordion.scss +1 -1
  15. package/src/assets/scss/components/PsChips.scss +3 -3
  16. package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
  17. package/src/assets/scss/components/PsProgressBar.scss +4 -4
  18. package/src/assets/scss/components/PsTabHeader.scss +1 -1
  19. package/src/assets/scss/components/PsTableResults.scss +2 -63
  20. package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
  21. package/src/components/accordion/PsAccordion.vue +20 -21
  22. package/src/components/accordion/PsAccordionItem.vue +30 -8
  23. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +8 -4
  24. package/src/components/badges-and-tags/PsCardInfos.vue +3 -1
  25. package/src/components/badges-and-tags/PsChartLegend.vue +19 -5
  26. package/src/components/badges-and-tags/PsCostEffectBar.vue +4 -5
  27. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
  28. package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
  29. package/src/components/badges-and-tags/PsTestimonialCard.vue +6 -4
  30. package/src/components/buttons/PsButton.vue +85 -88
  31. package/src/components/chips/PsChips.vue +5 -2
  32. package/src/components/controls/PsCheckbox.vue +5 -2
  33. package/src/components/controls/PsCheckboxSimple.vue +4 -4
  34. package/src/components/controls/PsDraggable.vue +70 -67
  35. package/src/components/controls/PsInlineSelector.vue +13 -14
  36. package/src/components/controls/PsRadioButton.vue +10 -5
  37. package/src/components/controls/PsRadioButtonSimple.vue +3 -3
  38. package/src/components/controls/PsSlider.vue +6 -6
  39. package/src/components/controls/PsSwitch.vue +13 -3
  40. package/src/components/controls/PsToggle.vue +14 -11
  41. package/src/components/data-graphics/PsBarChart.vue +4 -2
  42. package/src/components/datatable/PsDataTable.vue +14 -5
  43. package/src/components/datatable/PsDataTableItem.vue +17 -4
  44. package/src/components/forms/PsDropdown.vue +8 -5
  45. package/src/components/forms/PsDropdownList.vue +1 -1
  46. package/src/components/forms/PsInput.vue +30 -14
  47. package/src/components/forms/PsInputSelect.vue +33 -11
  48. package/src/components/forms/PsInputTextArea.vue +15 -4
  49. package/src/components/navigations/PsBreadcrumb.vue +1 -1
  50. package/src/components/notifications/PsDialog.vue +11 -5
  51. package/src/components/notifications/PsSimpleAlert.vue +22 -10
  52. package/src/components/notifications/PsToast.vue +8 -3
  53. package/src/components/playground/PsScrollBar.vue +122 -50
  54. package/src/components/table-results/PsTableResults.vue +67 -51
  55. package/src/components/table-results/PsTableResultsBody.vue +3 -1
  56. package/src/components/table-results/PsTableResultsHead.vue +27 -8
  57. package/src/components/table-results/PsTableResultsHeadComparison.vue +24 -8
  58. package/src/components/table-results/PsTableResultsHeadFlexible.vue +18 -6
  59. package/src/components/table-results/PsTableResultsRow.vue +6 -2
  60. package/src/components/tabs/PsTabHeader.vue +19 -16
  61. package/src/components/tooltip/PsDialogTooltip.vue +18 -8
  62. package/src/components/tooltip/PsRichTooltip.vue +12 -5
  63. package/src/components/tooltip/PsTooltip.vue +17 -9
  64. package/src/components/ui/PsDotLoader.vue +5 -5
  65. package/src/components/ui/PsIcon.vue +6 -2
  66. package/src/{index.js → index.ts} +4 -5
  67. package/src/shims-vue.d.ts +11 -0
  68. package/src/stories/{Accordion.stories.js → Accordion.stories.ts} +2 -2
  69. package/src/stories/{BadgeWithIcon.stories.js → BadgeWithIcon.stories.ts} +1 -1
  70. package/src/stories/{BarChart.stories.js → BarChart.stories.ts} +1 -1
  71. package/src/stories/{Breadcrumb.stories.js → Breadcrumb.stories.ts} +1 -4
  72. package/src/stories/Button.stories.ts +48 -0
  73. package/src/stories/Button.vue +59 -0
  74. package/src/stories/{CardInfos.stories.js → CardInfos.stories.ts} +1 -2
  75. package/src/stories/{ChartLegend.stories.js → ChartLegend.stories.ts} +1 -2
  76. package/src/stories/{Checkbox.stories.js → Checkbox.stories.ts} +1 -1
  77. package/src/stories/{CheckboxSimple.stories.js → CheckboxSimple.stories.ts} +1 -1
  78. package/src/stories/{Chips.stories.js → Chips.stories.ts} +24 -22
  79. package/src/stories/ClimateZoneBadge.stories.ts +28 -0
  80. package/src/stories/CostEffectBar.stories.ts +26 -0
  81. package/src/stories/{Datatable.stories.js → Datatable.stories.ts} +5 -2
  82. package/src/stories/{DateCardInfo.stories.js → DateCardInfo.stories.ts} +1 -5
  83. package/src/stories/{Dialog.stories.js → Dialog.stories.ts} +1 -1
  84. package/src/stories/Draggable.stories.ts +32 -0
  85. package/src/stories/{Dropdown.stories.js → Dropdown.stories.ts} +1 -11
  86. package/src/stories/{DropdownList.stories.js → DropdownList.stories.ts} +3 -1
  87. package/src/stories/{ElevationSystem.stories.mdx → ElevationSystem.mdx} +1 -1
  88. package/src/stories/Header.stories.ts +42 -0
  89. package/src/stories/Header.vue +77 -0
  90. package/src/stories/{HighlightRippleDot.stories.js → HighlightRippleDot.stories.ts} +2 -1
  91. package/src/stories/{Icon.stories.js → Icon.stories.ts} +2 -1
  92. package/src/stories/{InlineSelector.stories.js → InlineSelector.stories.ts} +1 -1
  93. package/src/stories/{Input.stories.js → Input.stories.ts} +6 -2
  94. package/src/stories/{InputSelect.stories.js → InputSelect.stories.ts} +2 -1
  95. package/src/stories/{InputTextArea.stories.js → InputTextArea.stories.ts} +1 -1
  96. package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +101 -101
  97. package/src/stories/{MiniTag.stories.js → MiniTag.stories.ts} +8 -1
  98. package/src/stories/{Playground.stories.js → Playground.stories.ts} +1 -1
  99. package/src/stories/{ProgressBar.stories.js → ProgressBar.stories.ts} +2 -1
  100. package/src/stories/{RadioButton.stories.js → RadioButton.stories.ts} +1 -0
  101. package/src/stories/{RadioButtonSimple.stories.js → RadioButtonSimple.stories.ts} +1 -1
  102. package/src/stories/{SimpleAlert.stories.js → SimpleAlert.stories.ts} +2 -1
  103. package/src/stories/{Slider.stories.js → Slider.stories.ts} +5 -1
  104. package/src/stories/{Switch.stories.js → Switch.stories.ts} +1 -1
  105. package/src/stories/{TabHeader.stories.js → TabHeader.stories.ts} +4 -0
  106. package/src/stories/{TableResults.stories.js → TableResults.stories.ts} +5 -1
  107. package/src/stories/{TagScope.stories.js → TagScope.stories.ts} +1 -1
  108. package/src/stories/{TestimonialCard.stories.js → TestimonialCard.stories.ts} +2 -2
  109. package/src/stories/{Toast.stories.js → Toast.stories.ts} +1 -1
  110. package/src/stories/{Toggle.stories.js → Toggle.stories.ts} +6 -3
  111. package/src/stories/{Tooltip.stories.js → Tooltip.stories.ts} +3 -3
  112. package/src/stories/{Typography.stories.mdx → Typography.mdx} +107 -105
  113. package/src/stories/button.css +30 -0
  114. package/src/stories/header.css +32 -0
  115. package/src/util/{GeneralFunctions.js → GeneralFunctions.ts} +7 -7
  116. package/src/util/{imageLoader.js → imageLoader.ts} +15 -9
  117. package/tailwind.config.js +11 -2
  118. package/tsconfig.json +47 -0
  119. package/webpack.config.js +36 -0
  120. package/.storybook/PolicyStudio.js +0 -10
  121. package/.storybook/eventBus.js +0 -3
  122. package/.storybook/main.js +0 -25
  123. package/.storybook/manager.js +0 -6
  124. package/babel.config.js +0 -3
  125. package/backup-package-lock.json +0 -37194
  126. package/src/stories/Button.stories.js +0 -130
  127. package/src/stories/ClimateZoneBadge.stories.js +0 -17
  128. package/src/stories/CostEffectBar.stories.js +0 -23
  129. package/src/stories/Draggable.stories.js +0 -22
  130. /package/.storybook/{preview.js → preview.ts} +0 -0
  131. /package/src/contents/{ComparisonData.js → ComparisonData.ts} +0 -0
  132. /package/src/contents/{FlexibleData.js → FlexibleData.ts} +0 -0
  133. /package/src/contents/{ResultsData.js → ResultsData.ts} +0 -0
  134. /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
package/.eslintignore ADDED
@@ -0,0 +1 @@
1
+ .storybook
package/.eslintrc.js CHANGED
@@ -1,68 +1,75 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- node: true
5
- },
6
- extends: [
7
- 'plugin:vue/essential',
8
- 'eslint:recommended',
9
- ],
10
- parserOptions: {
11
- parser: 'babel-eslint',
12
- requireConfigFile: false,
13
- },
14
- rules: {
15
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
17
- 'semi': ['warn', 'never'],
18
- 'quotes': [2, 'single'],
19
- 'vue/order-in-components': ['warn', {
20
- 'order': [
21
- 'el',
22
- 'name',
23
- 'key',
24
- 'parent',
25
- ['components', 'directives', 'filters'],
26
- ['props', 'propsData'],
27
- 'functional',
28
- ['delimiters', 'comments'],
29
- 'extends',
30
- 'mixins',
31
- ['provide', 'inject'],
32
- 'ROUTER_GUARDS',
33
- 'layout',
34
- 'middleware',
35
- 'validate',
36
- 'scrollToTop',
37
- 'transition',
38
- 'loading',
39
- 'inheritAttrs',
40
- 'model',
41
- 'emits',
42
- 'setup',
43
- 'asyncData',
44
- 'data',
45
- 'fetch',
46
- 'head',
47
- 'computed',
48
- 'watch',
49
- 'watchQuery',
50
- 'LIFECYCLE_HOOKS',
51
- 'methods',
52
- ['template', 'render'],
53
- 'renderError'
54
- ]
55
- }]
56
- },
57
- overrides: [
58
- {
59
- files: [
60
- '**/__tests__/*.{j,t}s?(x)',
61
- '**/tests/unit/**/*.spec.{j,t}s?(x)'
62
- ],
63
- env: {
64
- jest: true
1
+ module.exports = {
2
+ root: true,
3
+
4
+ env: {
5
+ node: true
6
+ },
7
+
8
+ parser: 'vue-eslint-parser',
9
+
10
+ parserOptions: {
11
+ parser: '@typescript-eslint/parser',
12
+ requireConfigFile: false,
13
+ },
14
+ extends: [
15
+ 'plugin:vue/vue3-essential',
16
+ 'eslint:recommended',
17
+ 'plugin:vue/vue3-strongly-recommended',
18
+ '@vue/typescript'
19
+ ],
20
+ rules: {
21
+ 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
22
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
23
+ 'semi': ['warn', 'never'],
24
+ 'quotes': [2, 'single'],
25
+ 'vue/order-in-components': ['warn', {
26
+ 'order': [
27
+ 'el',
28
+ 'name',
29
+ 'key',
30
+ 'parent',
31
+ ['components', 'directives', 'filters'],
32
+ ['props', 'propsData'],
33
+ 'functional',
34
+ ['delimiters', 'comments'],
35
+ 'extends',
36
+ 'mixins',
37
+ ['provide', 'inject'],
38
+ 'ROUTER_GUARDS',
39
+ 'layout',
40
+ 'middleware',
41
+ 'validate',
42
+ 'scrollToTop',
43
+ 'transition',
44
+ 'loading',
45
+ 'inheritAttrs',
46
+ 'model',
47
+ 'emits',
48
+ 'setup',
49
+ 'asyncData',
50
+ 'data',
51
+ 'fetch',
52
+ 'head',
53
+ 'computed',
54
+ 'watch',
55
+ 'watchQuery',
56
+ 'LIFECYCLE_HOOKS',
57
+ 'methods',
58
+ ['template', 'render'],
59
+ 'renderError'
60
+ ]
61
+ }]
62
+ },
63
+
64
+ overrides: [
65
+ {
66
+ files: [
67
+ '**/__tests__/*.{j,t}s?(x)',
68
+ '**/tests/unit/**/*.spec.{j,t}s?(x)'
69
+ ],
70
+ env: {
71
+ jest: true
72
+ }
65
73
  }
66
- }
67
- ]
68
- }
74
+ ],
75
+ }
@@ -26,7 +26,7 @@ jobs:
26
26
  - name: Setup Node.js
27
27
  uses: actions/setup-node@v2
28
28
  with:
29
- node-version: ^14.0.0
29
+ node-version: 18.19.0
30
30
 
31
31
  - name: Install dependencies
32
32
  run: npm install && npm install vercel@25.1.0 && npm install -g vercel@25.1.0
@@ -0,0 +1,11 @@
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
+ });
@@ -0,0 +1,26 @@
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');
@@ -0,0 +1,21 @@
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;
@@ -0,0 +1,7 @@
1
+ import { addons } from '@storybook/manager-api'
2
+
3
+ import PolicyStudio from './PolicyStudio'
4
+
5
+ addons.setConfig({
6
+ theme: PolicyStudio,
7
+ });