@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.
- package/.eslintignore +1 -0
- package/.eslintrc.js +74 -67
- package/.github/workflows/deploy-storybook.yml +1 -1
- package/.storybook/PolicyStudio.ts +11 -0
- package/.storybook/eventBus.ts +26 -0
- package/.storybook/main.ts +21 -0
- package/.storybook/manager.ts +7 -0
- package/dist/css/psui_styles.css +4028 -110346
- package/package.json +50 -34
- package/postcss.config.js +1 -1
- package/scripts/kill-port.sh +12 -0
- package/src/App.vue +30 -0
- package/src/assets/scss/base.scss +27 -23
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +3 -3
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +2 -63
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/components/accordion/PsAccordion.vue +20 -21
- package/src/components/accordion/PsAccordionItem.vue +30 -8
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +8 -4
- package/src/components/badges-and-tags/PsCardInfos.vue +3 -1
- package/src/components/badges-and-tags/PsChartLegend.vue +19 -5
- package/src/components/badges-and-tags/PsCostEffectBar.vue +4 -5
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
- package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
- package/src/components/badges-and-tags/PsTestimonialCard.vue +6 -4
- package/src/components/buttons/PsButton.vue +85 -88
- package/src/components/chips/PsChips.vue +5 -2
- package/src/components/controls/PsCheckbox.vue +5 -2
- package/src/components/controls/PsCheckboxSimple.vue +4 -4
- package/src/components/controls/PsDraggable.vue +70 -67
- package/src/components/controls/PsInlineSelector.vue +13 -14
- package/src/components/controls/PsRadioButton.vue +10 -5
- package/src/components/controls/PsRadioButtonSimple.vue +3 -3
- package/src/components/controls/PsSlider.vue +6 -6
- package/src/components/controls/PsSwitch.vue +13 -3
- package/src/components/controls/PsToggle.vue +14 -11
- package/src/components/data-graphics/PsBarChart.vue +4 -2
- package/src/components/datatable/PsDataTable.vue +14 -5
- package/src/components/datatable/PsDataTableItem.vue +17 -4
- package/src/components/forms/PsDropdown.vue +8 -5
- package/src/components/forms/PsDropdownList.vue +1 -1
- package/src/components/forms/PsInput.vue +30 -14
- package/src/components/forms/PsInputSelect.vue +33 -11
- package/src/components/forms/PsInputTextArea.vue +15 -4
- package/src/components/navigations/PsBreadcrumb.vue +1 -1
- package/src/components/notifications/PsDialog.vue +11 -5
- package/src/components/notifications/PsSimpleAlert.vue +22 -10
- package/src/components/notifications/PsToast.vue +8 -3
- package/src/components/playground/PsScrollBar.vue +122 -50
- package/src/components/table-results/PsTableResults.vue +67 -51
- package/src/components/table-results/PsTableResultsBody.vue +3 -1
- package/src/components/table-results/PsTableResultsHead.vue +27 -8
- package/src/components/table-results/PsTableResultsHeadComparison.vue +24 -8
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +18 -6
- package/src/components/table-results/PsTableResultsRow.vue +6 -2
- package/src/components/tabs/PsTabHeader.vue +19 -16
- package/src/components/tooltip/PsDialogTooltip.vue +18 -8
- package/src/components/tooltip/PsRichTooltip.vue +12 -5
- package/src/components/tooltip/PsTooltip.vue +17 -9
- package/src/components/ui/PsDotLoader.vue +5 -5
- package/src/components/ui/PsIcon.vue +6 -2
- package/src/{index.js → index.ts} +4 -5
- package/src/shims-vue.d.ts +11 -0
- package/src/stories/{Accordion.stories.js → Accordion.stories.ts} +2 -2
- package/src/stories/{BadgeWithIcon.stories.js → BadgeWithIcon.stories.ts} +1 -1
- package/src/stories/{BarChart.stories.js → BarChart.stories.ts} +1 -1
- package/src/stories/{Breadcrumb.stories.js → Breadcrumb.stories.ts} +1 -4
- package/src/stories/Button.stories.ts +48 -0
- package/src/stories/Button.vue +59 -0
- package/src/stories/{CardInfos.stories.js → CardInfos.stories.ts} +1 -2
- package/src/stories/{ChartLegend.stories.js → ChartLegend.stories.ts} +1 -2
- package/src/stories/{Checkbox.stories.js → Checkbox.stories.ts} +1 -1
- package/src/stories/{CheckboxSimple.stories.js → CheckboxSimple.stories.ts} +1 -1
- package/src/stories/{Chips.stories.js → Chips.stories.ts} +24 -22
- package/src/stories/ClimateZoneBadge.stories.ts +28 -0
- package/src/stories/CostEffectBar.stories.ts +26 -0
- package/src/stories/{Datatable.stories.js → Datatable.stories.ts} +5 -2
- package/src/stories/{DateCardInfo.stories.js → DateCardInfo.stories.ts} +1 -5
- package/src/stories/{Dialog.stories.js → Dialog.stories.ts} +1 -1
- package/src/stories/Draggable.stories.ts +32 -0
- package/src/stories/{Dropdown.stories.js → Dropdown.stories.ts} +1 -11
- package/src/stories/{DropdownList.stories.js → DropdownList.stories.ts} +3 -1
- package/src/stories/{ElevationSystem.stories.mdx → ElevationSystem.mdx} +1 -1
- package/src/stories/Header.stories.ts +42 -0
- package/src/stories/Header.vue +77 -0
- package/src/stories/{HighlightRippleDot.stories.js → HighlightRippleDot.stories.ts} +2 -1
- package/src/stories/{Icon.stories.js → Icon.stories.ts} +2 -1
- package/src/stories/{InlineSelector.stories.js → InlineSelector.stories.ts} +1 -1
- package/src/stories/{Input.stories.js → Input.stories.ts} +6 -2
- package/src/stories/{InputSelect.stories.js → InputSelect.stories.ts} +2 -1
- package/src/stories/{InputTextArea.stories.js → InputTextArea.stories.ts} +1 -1
- package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +101 -101
- package/src/stories/{MiniTag.stories.js → MiniTag.stories.ts} +8 -1
- package/src/stories/{Playground.stories.js → Playground.stories.ts} +1 -1
- package/src/stories/{ProgressBar.stories.js → ProgressBar.stories.ts} +2 -1
- package/src/stories/{RadioButton.stories.js → RadioButton.stories.ts} +1 -0
- package/src/stories/{RadioButtonSimple.stories.js → RadioButtonSimple.stories.ts} +1 -1
- package/src/stories/{SimpleAlert.stories.js → SimpleAlert.stories.ts} +2 -1
- package/src/stories/{Slider.stories.js → Slider.stories.ts} +5 -1
- package/src/stories/{Switch.stories.js → Switch.stories.ts} +1 -1
- package/src/stories/{TabHeader.stories.js → TabHeader.stories.ts} +4 -0
- package/src/stories/{TableResults.stories.js → TableResults.stories.ts} +5 -1
- package/src/stories/{TagScope.stories.js → TagScope.stories.ts} +1 -1
- package/src/stories/{TestimonialCard.stories.js → TestimonialCard.stories.ts} +2 -2
- package/src/stories/{Toast.stories.js → Toast.stories.ts} +1 -1
- package/src/stories/{Toggle.stories.js → Toggle.stories.ts} +6 -3
- package/src/stories/{Tooltip.stories.js → Tooltip.stories.ts} +3 -3
- package/src/stories/{Typography.stories.mdx → Typography.mdx} +107 -105
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/util/{GeneralFunctions.js → GeneralFunctions.ts} +7 -7
- package/src/util/{imageLoader.js → imageLoader.ts} +15 -9
- package/tailwind.config.js +11 -2
- package/tsconfig.json +47 -0
- package/webpack.config.js +36 -0
- package/.storybook/PolicyStudio.js +0 -10
- package/.storybook/eventBus.js +0 -3
- package/.storybook/main.js +0 -25
- package/.storybook/manager.js +0 -6
- package/babel.config.js +0 -3
- package/backup-package-lock.json +0 -37194
- package/src/stories/Button.stories.js +0 -130
- package/src/stories/ClimateZoneBadge.stories.js +0 -17
- package/src/stories/CostEffectBar.stories.js +0 -23
- package/src/stories/Draggable.stories.js +0 -22
- /package/.storybook/{preview.js → preview.ts} +0 -0
- /package/src/contents/{ComparisonData.js → ComparisonData.ts} +0 -0
- /package/src/contents/{FlexibleData.js → FlexibleData.ts} +0 -0
- /package/src/contents/{ResultsData.js → ResultsData.ts} +0 -0
- /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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'eslint
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+
}
|
|
@@ -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;
|