@policystudio/policy-studio-ui-vue 1.1.90-beta.4 → 1.1.90-beta.40
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/.eslintrc.js +2 -8
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6607 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/util/GeneralFunctions.d.ts +3 -0
- package/dist/util/GeneralFunctions.js +35 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/directives.d.ts +1 -0
- package/dist/util/directives.js +22 -0
- package/dist/util/directives.js.map +1 -0
- package/dist/util/imageLoader.d.ts +6 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/doc/.nvmrc +1 -0
- package/{.storybook → doc/.storybook}/main.ts +8 -2
- package/{.storybook → doc/.storybook}/preview.ts +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/{src → doc}/shims-vue.d.ts +0 -5
- package/{src → doc/src}/stories/Accordion.stories.ts +2 -3
- package/{src → doc/src}/stories/BadgeWithIcon.stories.ts +1 -1
- package/{src → doc/src}/stories/BarChart.stories.ts +1 -1
- package/{src → doc/src}/stories/Breadcrumb.stories.ts +1 -1
- package/doc/src/stories/Button.stories.ts +130 -0
- package/{src → doc/src}/stories/CardInfos.stories.ts +1 -1
- package/{src → doc/src}/stories/ChartLegend.stories.ts +1 -1
- package/{src → doc/src}/stories/Checkbox.stories.ts +1 -1
- package/{src → doc/src}/stories/CheckboxSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/Chips.stories.ts +1 -4
- package/{src → doc/src}/stories/ClimateZoneBadge.stories.ts +2 -1
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src → doc/src}/stories/CostEffectBar.stories.ts +2 -1
- package/{src → doc/src}/stories/Datatable.stories.ts +5 -2
- package/{src → doc/src}/stories/DateCardInfo.stories.ts +1 -1
- package/{src → doc/src}/stories/Dialog.stories.ts +2 -2
- package/{src → doc/src}/stories/Draggable.stories.ts +3 -2
- package/{src → doc/src}/stories/Dropdown.stories.ts +4 -3
- package/{src → doc/src}/stories/DropdownList.stories.ts +4 -2
- package/{src → doc/src}/stories/HighlightRippleDot.stories.ts +3 -2
- package/{src → doc/src}/stories/Icon.stories.ts +3 -1
- package/{src → doc/src}/stories/InlineSelector.stories.ts +1 -1
- package/{src → doc/src}/stories/Input.stories.ts +7 -4
- package/{src → doc/src}/stories/InputSelect.stories.ts +3 -2
- package/{src → doc/src}/stories/InputTextArea.stories.ts +1 -1
- package/{src → doc/src}/stories/MiniTag.stories.ts +9 -2
- package/{src → doc/src}/stories/ProgressBar.stories.ts +3 -2
- package/{src → doc/src}/stories/RadioButton.stories.ts +2 -2
- package/{src → doc/src}/stories/RadioButtonSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/SimpleAlert.stories.ts +3 -2
- package/{src → doc/src}/stories/Slider.stories.ts +6 -2
- package/{src → doc/src}/stories/Switch.stories.ts +2 -2
- package/{src → doc/src}/stories/TabHeader.stories.ts +6 -1
- package/{src → doc/src}/stories/TableResults.stories.ts +11 -7
- package/{src → doc/src}/stories/TagScope.stories.ts +3 -2
- package/{src → doc/src}/stories/TestimonialCard.stories.ts +3 -3
- package/{src → doc/src}/stories/Toast.stories.ts +2 -2
- package/{src → doc/src}/stories/Toggle.stories.ts +6 -3
- package/{src → doc/src}/stories/Tooltip.stories.ts +3 -3
- package/doc/tsconfig.json +17 -0
- package/package.json +13 -28
- package/scripts/gulp.js +11 -0
- package/src/assets/scss/base.scss +3 -34
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsCollapse.scss +74 -0
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsTooltip.scss +2 -1
- package/src/components/accordion/PsAccordionItem.vue +88 -74
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
- package/src/components/badges-and-tags/PsCardInfos.vue +39 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +46 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
- package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
- package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
- package/src/components/badges-and-tags/PsTagScope.vue +17 -22
- package/src/components/badges-and-tags/PsTestimonialCard.vue +19 -26
- package/src/components/buttons/PsButton.vue +61 -62
- package/src/components/chips/PsChips.vue +98 -101
- package/src/components/collapse/PsCollapse.vue +124 -0
- package/src/components/controls/PsCheckbox.vue +84 -84
- package/src/components/controls/PsCheckboxSimple.vue +95 -95
- package/src/components/controls/PsDraggable.vue +53 -55
- package/src/components/controls/PsInlineSelector.vue +98 -99
- package/src/components/controls/PsRadioButton.vue +65 -58
- package/src/components/controls/PsRadioButtonSimple.vue +79 -75
- package/src/components/controls/PsSlider.vue +185 -176
- package/src/components/controls/PsSwitch.vue +51 -52
- package/src/components/controls/PsToggle.vue +52 -50
- package/src/components/data-graphics/PsBarChart.vue +18 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +13 -28
- package/src/components/forms/PsDropdown.vue +166 -162
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +154 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +70 -71
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +27 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +461 -468
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +67 -61
- package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +68 -61
- package/src/components/table-results/PsTableResultsRow.vue +55 -56
- package/src/components/tabs/PsTabHeader.vue +106 -100
- package/src/components/tooltip/PsDialogTooltip.vue +96 -101
- package/src/components/tooltip/PsRichTooltip.vue +41 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +128 -129
- package/src/index.ts +60 -67
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +12 -3
- package/src/util/directives.ts +24 -0
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -0
- package/tailwind.config.js +1 -1
- package/tsconfig.json +19 -14
- package/.storybook/eventBus.ts +0 -26
- package/babel.config.js +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/Header.stories.ts +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/Playground.stories.ts +0 -16
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -22
- /package/{.storybook → doc/.storybook}/PolicyStudio.ts +0 -0
- /package/{.storybook → doc/.storybook}/manager.ts +0 -0
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src → doc/src}/contents/ComparisonData.ts +0 -0
- /package/{src → doc/src}/contents/FlexibleData.ts +0 -0
- /package/{src → doc/src}/contents/ResultsData.ts +0 -0
- /package/{src → doc/src}/stories/Colors.mdx +0 -0
- /package/{src → doc/src}/stories/ElevationSystem.mdx +0 -0
- /package/{src → doc/src}/stories/Introduction.mdx +0 -0
- /package/{src → doc/src}/stories/Typography.mdx +0 -0
- /package/{src → doc/src}/stories/assets/code-brackets.svg +0 -0
- /package/{src → doc/src}/stories/assets/colors.svg +0 -0
- /package/{src → doc/src}/stories/assets/comments.svg +0 -0
- /package/{src → doc/src}/stories/assets/direction.svg +0 -0
- /package/{src → doc/src}/stories/assets/flow.svg +0 -0
- /package/{src → doc/src}/stories/assets/plugin.svg +0 -0
- /package/{src → doc/src}/stories/assets/repo.svg +0 -0
- /package/{src → doc/src}/stories/assets/stackalt.svg +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
|
|
1
2
|
import PsMiniTag, {
|
|
3
|
+
// @ts-ignore
|
|
2
4
|
typeOptions,
|
|
3
|
-
} from '
|
|
5
|
+
} from '../../../src/components/badges-and-tags/PsMiniTag.vue'
|
|
4
6
|
|
|
5
7
|
export default {
|
|
6
8
|
title: 'Badges & Tags/Tags/Mini Tag',
|
|
@@ -14,7 +16,7 @@ export default {
|
|
|
14
16
|
},
|
|
15
17
|
},
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
// @ts-ignore
|
|
18
20
|
const Template = (args, { argTypes }) => ({
|
|
19
21
|
props: Object.keys(argTypes),
|
|
20
22
|
components: { PsMiniTag },
|
|
@@ -22,30 +24,35 @@ const Template = (args, { argTypes }) => ({
|
|
|
22
24
|
})
|
|
23
25
|
|
|
24
26
|
export const Info = Template.bind({})
|
|
27
|
+
// @ts-ignore
|
|
25
28
|
Info.args = {
|
|
26
29
|
layout: 'info',
|
|
27
30
|
message: 'This is an info alert',
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
export const Success = Template.bind({})
|
|
34
|
+
// @ts-ignore
|
|
31
35
|
Success.args = {
|
|
32
36
|
layout: 'success',
|
|
33
37
|
message: 'This is a success alert',
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
export const Warning = Template.bind({})
|
|
41
|
+
// @ts-ignore
|
|
37
42
|
Warning.args = {
|
|
38
43
|
layout: 'warning',
|
|
39
44
|
message: 'This is a warning alert',
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
export const Error = Template.bind({})
|
|
48
|
+
// @ts-ignore
|
|
43
49
|
Error.args = {
|
|
44
50
|
layout: 'error',
|
|
45
51
|
message: 'This is an error alert',
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
export const Default = Template.bind({})
|
|
55
|
+
// @ts-ignore
|
|
49
56
|
Default.args = {
|
|
50
57
|
layout: 'default',
|
|
51
58
|
message: 'This is a default color',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsProgressBar from '
|
|
1
|
+
import PsProgressBar from '../../../src/components/badges-and-tags/PsProgressBar.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Badges & Tags/Badges/ProgressBar',
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
// @ts-ignore
|
|
16
16
|
const TemplateDefault = (args, { argTypes }) => ({
|
|
17
17
|
props: Object.keys(argTypes),
|
|
18
18
|
components: { PsProgressBar },
|
|
@@ -20,4 +20,5 @@ const TemplateDefault = (args, { argTypes }) => ({
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
export const Default = TemplateDefault.bind({})
|
|
23
|
+
// @ts-ignore
|
|
23
24
|
Default.args = {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsRadioButton from '
|
|
1
|
+
import PsRadioButton from '../../../src/components/controls/PsRadioButton.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Controls & Selectors/Radio Button',
|
|
5
5
|
component: PsRadioButton,
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const DefaultTemplate = (args,{ argTypes}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsRadioButton},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsSimpleAlert from '
|
|
1
|
+
import PsSimpleAlert from '../../../src/components/notifications/PsSimpleAlert.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Notifications/Simple Alert',
|
|
5
5
|
component: PsSimpleAlert,
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const TemplateDefault = (args, { argTypes }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsSimpleAlert },
|
|
@@ -16,6 +16,7 @@ export default {
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
export const Default = TemplateDefault.bind({})
|
|
19
|
+
// @ts-ignore
|
|
19
20
|
Default.args = {
|
|
20
21
|
message:'lorem'
|
|
21
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsSlider from '
|
|
1
|
+
import PsSlider from '../../../src/components/controls/PsSlider.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Text fields & Forms/Slider',
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
// layout: { control: { type: 'inline-radio', options: sliderLayout } },
|
|
8
8
|
// },
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
// @ts-ignore
|
|
11
11
|
const Template = (args, { argTypes }) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
13
13
|
components: { PsSlider },
|
|
@@ -29,6 +29,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
29
29
|
})
|
|
30
30
|
|
|
31
31
|
export const Label = Template.bind({})
|
|
32
|
+
// @ts-ignore
|
|
32
33
|
Label.args = {
|
|
33
34
|
min: 0,
|
|
34
35
|
max: 200,
|
|
@@ -39,6 +40,7 @@ Label.args = {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export const NoLabel = Template.bind({})
|
|
43
|
+
// @ts-ignore
|
|
42
44
|
NoLabel.args = {
|
|
43
45
|
min: 0,
|
|
44
46
|
max: 200,
|
|
@@ -48,6 +50,7 @@ NoLabel.args = {
|
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
export const Bubble = Template.bind({})
|
|
53
|
+
// @ts-ignore
|
|
51
54
|
Bubble.args = {
|
|
52
55
|
min: 0,
|
|
53
56
|
max: 200,
|
|
@@ -62,6 +65,7 @@ const sliderColors = [
|
|
|
62
65
|
{ start: 170, end: 200, bgColor: '#D65C5A' },
|
|
63
66
|
]
|
|
64
67
|
export const Rich = Template.bind({})
|
|
68
|
+
// @ts-ignore
|
|
65
69
|
Rich.args = {
|
|
66
70
|
min: 0,
|
|
67
71
|
max: 200,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import PsSwitch from '
|
|
1
|
+
import PsSwitch from '../../../src/components/controls/PsSwitch.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Controls & Selectors/Switch',
|
|
4
4
|
component: PsSwitch,
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
// @ts-ignore
|
|
7
7
|
const Template = (args, { argTypes }) => ({
|
|
8
8
|
props: Object.keys(argTypes),
|
|
9
9
|
components: { PsSwitch },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsTabHeader from '
|
|
1
|
+
import PsTabHeader from '../../../src/components/tabs/PsTabHeader.vue'
|
|
2
2
|
const items = ['Existing Buildings', 'New Constructions', 'Other tab']
|
|
3
3
|
const item = items[0]
|
|
4
4
|
|
|
@@ -7,6 +7,8 @@ export default {
|
|
|
7
7
|
component: PsTabHeader,
|
|
8
8
|
argTypes: {}
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
// @ts-ignore
|
|
10
12
|
const Template = (args, { argTypes }) => ({
|
|
11
13
|
props: Object.keys(argTypes),
|
|
12
14
|
components: { PsTabHeader },
|
|
@@ -31,6 +33,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
31
33
|
})
|
|
32
34
|
|
|
33
35
|
export const Standard = Template.bind({})
|
|
36
|
+
// @ts-ignore
|
|
34
37
|
Standard.args = {
|
|
35
38
|
layout: 'standard',
|
|
36
39
|
items: items,
|
|
@@ -38,6 +41,7 @@ Standard.args = {
|
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
export const Underline = Template.bind({})
|
|
44
|
+
// @ts-ignore
|
|
41
45
|
Underline.args = {
|
|
42
46
|
layout: 'underline',
|
|
43
47
|
items: items,
|
|
@@ -45,6 +49,7 @@ Underline.args = {
|
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
export const Folder = Template.bind({})
|
|
52
|
+
// @ts-ignore
|
|
48
53
|
Folder.args = {
|
|
49
54
|
layout: 'folder',
|
|
50
55
|
items: items,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import PsTableResults, { tableLayout } from '../../../src/components/table-results/PsTableResults.vue'
|
|
3
|
+
import PsTableResultsHead from '../../../src/components/table-results/PsTableResultsHead.vue'
|
|
4
|
+
import PsTableResultsHeadFlexible from '../../../src/components/table-results/PsTableResultsHeadFlexible.vue'
|
|
5
|
+
import PsTableResultsHeadComparison from '../../../src/components/table-results/PsTableResultsHeadComparison.vue'
|
|
6
|
+
import PsProgressBar from '../../../src/components/badges-and-tags/PsProgressBar.vue'
|
|
7
|
+
import PsSwitch from '../../../src/components/controls/PsSwitch.vue'
|
|
7
8
|
|
|
8
9
|
import { resultsDataHeader, resultsDataColumnGroup, resultsDataSummary } from '../contents/ResultsData'
|
|
9
10
|
import { comparisonDataHeader, comparisonDataColumnGroup, comparisonDataSummary } from '../contents/ComparisonData'
|
|
@@ -18,7 +19,7 @@ export default {
|
|
|
18
19
|
onCollapse: { action: 'clicked' },
|
|
19
20
|
},
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
// @ts-ignore
|
|
22
23
|
const TableResults = (args, { argTypes }) => ({
|
|
23
24
|
props: Object.keys(argTypes),
|
|
24
25
|
components: { PsTableResults, PsTableResultsHead, PsTableResultsHeadComparison, PsTableResultsHeadFlexible },
|
|
@@ -54,6 +55,7 @@ const TableResults = (args, { argTypes }) => ({
|
|
|
54
55
|
})
|
|
55
56
|
|
|
56
57
|
export const Results = TableResults.bind({})
|
|
58
|
+
// @ts-ignore
|
|
57
59
|
Results.args = {
|
|
58
60
|
layout: 'results',
|
|
59
61
|
header: resultsDataHeader,
|
|
@@ -64,6 +66,7 @@ Results.args = {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
export const Comparison = TableResults.bind({})
|
|
69
|
+
// @ts-ignore
|
|
67
70
|
Comparison.args = {
|
|
68
71
|
layout: 'comparison',
|
|
69
72
|
header: comparisonDataHeader,
|
|
@@ -74,6 +77,7 @@ Comparison.args = {
|
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
export const Flexible = TableResults.bind({})
|
|
80
|
+
// @ts-ignore
|
|
77
81
|
Flexible.args = {
|
|
78
82
|
layout: 'flexible',
|
|
79
83
|
header: flexibleDataHeader,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import PsTagScope from '
|
|
1
|
+
import PsTagScope from '../../../src/components/badges-and-tags/PsTagScope.vue'
|
|
2
|
+
|
|
2
3
|
export default {
|
|
3
4
|
title: 'Badges & Tags/Tags/Tag Scope',
|
|
4
5
|
component: PsTagScope,
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
// @ts-ignore
|
|
7
8
|
const defaultTemplate = (args, {argTypes}) => ({
|
|
8
9
|
props: Object.keys(argTypes),
|
|
9
10
|
components: { PsTagScope },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsTestimonialCard from '
|
|
1
|
+
import PsTestimonialCard from '../../../src/components/badges-and-tags/PsTestimonialCard.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/TestimonialCard',
|
|
5
5
|
component: PsTestimonialCard,
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const Template = (args,{argTypes}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components:{PsTestimonialCard},
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
export const Default = Template.bind({})
|
|
21
|
-
|
|
21
|
+
// @ts-ignore
|
|
22
22
|
Default.args = {
|
|
23
23
|
testimonial: 'I used to spend most of my time helping California cities make reach codes. Now, i just show them the Explorer and get to focus on helping cities in other states.',
|
|
24
24
|
user:'Amy Rider',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import PsToast from '
|
|
1
|
+
import PsToast from '../../../src/components/notifications/PsToast.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Notifications/Toast',
|
|
4
4
|
component: PsToast,
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
// @ts-ignore
|
|
7
7
|
const Template = (args, { argTypes }) => ({
|
|
8
8
|
props: Object.keys(argTypes),
|
|
9
9
|
components: { PsToast },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsToggle from '
|
|
1
|
+
import PsToggle from '../../../src/components/controls/PsToggle.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Components/Toggle',
|
|
4
4
|
component: PsToggle,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
}
|
|
7
7
|
const items = ['Option 1', 'Option 2', 'Option 3']
|
|
8
8
|
const selected = 'Option 2'
|
|
9
|
-
|
|
9
|
+
// @ts-ignore
|
|
10
10
|
const Template = (args, { argTypes }) => ({
|
|
11
11
|
props: Object.keys(argTypes),
|
|
12
12
|
components: { PsToggle },
|
|
@@ -16,6 +16,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
export const Default = Template.bind({})
|
|
19
|
+
// @ts-ignore
|
|
19
20
|
Default.args = {
|
|
20
21
|
items: items,
|
|
21
22
|
selected: selected,
|
|
@@ -28,11 +29,13 @@ Default.args = {
|
|
|
28
29
|
* Se quiser dar uma melhorada nessa parte, fique a vontade meu chegado! TMJ
|
|
29
30
|
*/
|
|
30
31
|
window.addEventListener('click', (ev) => {
|
|
32
|
+
// @ts-ignore
|
|
31
33
|
if (ev.target.classList.contains('click-to-copy')) {
|
|
34
|
+
// @ts-ignore
|
|
32
35
|
copyText(ev.target.dataset.toCopy)
|
|
33
36
|
}
|
|
34
37
|
})
|
|
35
|
-
|
|
38
|
+
// @ts-ignore
|
|
36
39
|
function copyText(textToCopy) {
|
|
37
40
|
const myTemporaryInputElement = document.createElement('input')
|
|
38
41
|
myTemporaryInputElement.type = 'text'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import PsTooltip from '
|
|
2
|
-
import PsRichTooltip from '
|
|
3
|
-
import PsDialogTooltip from '
|
|
1
|
+
import PsTooltip from '../../../src/components/tooltip/PsTooltip.vue'
|
|
2
|
+
import PsRichTooltip from '../../../src/components/tooltip/PsRichTooltip.vue'
|
|
3
|
+
import PsDialogTooltip from '../../../src/components/tooltip/PsDialogTooltip.vue'
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Components/Tooltip',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "../",
|
|
4
|
+
"strict": true,
|
|
5
|
+
"outDir": "../dist",
|
|
6
|
+
},
|
|
7
|
+
"include": [
|
|
8
|
+
"doc/src/**/*.ts",
|
|
9
|
+
"doc/.storybook/**/*.ts",
|
|
10
|
+
"doc/src/**/*.stories.ts",
|
|
11
|
+
"doc/*.d.ts",
|
|
12
|
+
],
|
|
13
|
+
"references": [
|
|
14
|
+
{"path": "../"}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
|
package/package.json
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@policystudio/policy-studio-ui-vue",
|
|
3
|
-
"version": "1.1.90-beta.
|
|
3
|
+
"version": "1.1.90-beta.40",
|
|
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
|
|
10
|
-
"
|
|
11
|
-
"build-temp-tailwind": "postcss src/assets/scss/base.scss -o temp/css/psui_styles.css",
|
|
12
|
-
"full-publish": "npm run lint && npm run build-tailwind && npm run build-storybook && npm publish --tag beta",
|
|
8
|
+
"build": "tsc -p tsconfig.json && npm run build:tailwind && npm run gulp",
|
|
9
|
+
"full-publish": "npm run lint && npm run build && npm publish --tag beta",
|
|
13
10
|
"kill-port": "sh ./scripts/kill-port.sh",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"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",
|
|
13
|
+
"gulp": "gulp --gulpfile scripts/gulp.js build"
|
|
18
14
|
},
|
|
19
|
-
"main": "
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "src/types/index.d.ts",
|
|
20
17
|
"dependencies": {
|
|
21
18
|
"@vue/compat": "^3.4.5",
|
|
22
19
|
"core-js": "^3.6.5",
|
|
@@ -24,17 +21,6 @@
|
|
|
24
21
|
"vue": "^3.4.5"
|
|
25
22
|
},
|
|
26
23
|
"devDependencies": {
|
|
27
|
-
"@babel/cli": "^7.23.4",
|
|
28
|
-
"@babel/core": "^7.23.7",
|
|
29
|
-
"@babel/eslint-parser": "^7.23.3",
|
|
30
|
-
"@babel/preset-env": "^7.23.7",
|
|
31
|
-
"@storybook/addon-essentials": "^7.6.7",
|
|
32
|
-
"@storybook/addon-interactions": "^7.6.7",
|
|
33
|
-
"@storybook/addon-links": "^7.6.7",
|
|
34
|
-
"@storybook/blocks": "^7.6.7",
|
|
35
|
-
"@storybook/test": "^7.6.7",
|
|
36
|
-
"@storybook/vue3": "^7.6.7",
|
|
37
|
-
"@storybook/vue3-webpack5": "^7.6.7",
|
|
38
24
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
39
25
|
"@typescript-eslint/parser": "^5.4.0",
|
|
40
26
|
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
@@ -43,21 +29,20 @@
|
|
|
43
29
|
"@vue/compiler-sfc": "^3.4.5",
|
|
44
30
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
45
31
|
"@vue/eslint-config-typescript": "^9.1.0",
|
|
46
|
-
"babel-eslint": "^10.1.0",
|
|
47
32
|
"concurrently": "^7.0.0",
|
|
48
33
|
"eslint": "^8.56.0",
|
|
49
34
|
"eslint-plugin-prettier": "^5.1.2",
|
|
50
|
-
"eslint-plugin-storybook": "^0.6.15",
|
|
51
35
|
"eslint-plugin-vue": "^8.7.1",
|
|
36
|
+
"gulp": "^5.0.0",
|
|
37
|
+
"gulp-sass": "^5.1.0",
|
|
52
38
|
"postcss": "^8.3.11",
|
|
53
39
|
"postcss-cli": "^9.0.2",
|
|
54
40
|
"postcss-import": "^14.0.2",
|
|
55
41
|
"postcss-nested": "^5.0.6",
|
|
56
42
|
"prettier": "^3.1.1",
|
|
57
|
-
"
|
|
58
|
-
"react-dom": "^18.2.0",
|
|
59
|
-
"storybook": "^7.6.7",
|
|
43
|
+
"sass": "^1.77.1",
|
|
60
44
|
"tailwindcss": "^3.4.1",
|
|
45
|
+
"ts-loader": "^9.5.1",
|
|
61
46
|
"typescript": "~4.5.5",
|
|
62
47
|
"vue-eslint-parser": "^9.3.2",
|
|
63
48
|
"vue-loader": "^17.4.2",
|
|
@@ -65,7 +50,7 @@
|
|
|
65
50
|
"webpack": "^5.89.0"
|
|
66
51
|
},
|
|
67
52
|
"engines": {
|
|
68
|
-
"node": "
|
|
53
|
+
"node": "20.11.0"
|
|
69
54
|
},
|
|
70
55
|
"keywords": [
|
|
71
56
|
"vue",
|
package/scripts/gulp.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const gulp = require('gulp')
|
|
2
|
+
const sass = require('gulp-sass')(require('sass'))
|
|
3
|
+
|
|
4
|
+
gulp.task('build', () => {
|
|
5
|
+
|
|
6
|
+
return gulp.src([
|
|
7
|
+
'../dist/css/psui_styles_output.css'
|
|
8
|
+
])
|
|
9
|
+
.pipe(sass().on('error',sass.logError))
|
|
10
|
+
.pipe(gulp.dest('../dist/css'))
|
|
11
|
+
})
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
@import './components/PsBarChart.scss';
|
|
36
36
|
@import './components/PsSimpleAlert.scss';
|
|
37
37
|
@import './components/PsBreadcrumb.scss';
|
|
38
|
+
@import './components/PsCollapse.scss';
|
|
39
|
+
|
|
40
|
+
|
|
38
41
|
@import "tailwindcss/base";
|
|
39
42
|
@import "tailwindcss/components";
|
|
40
43
|
@import "tailwindcss/utilities";
|
|
@@ -68,38 +71,4 @@ html {
|
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
|
|
71
|
-
@layer components {
|
|
72
|
-
.psui-card {
|
|
73
|
-
@apply .psui-w-full .psui-bg-white .psui-rounded-lg .psui-px-6 .psui-py-4 .psui-shadow-elevation-5;
|
|
74
|
-
|
|
75
|
-
&-header {
|
|
76
|
-
@apply .psui-flex .psui-items-center .psui-justify-between .psui-mb-4;
|
|
77
|
-
|
|
78
|
-
h4 {
|
|
79
|
-
@apply .psui-text-h6 .psui-font-bold .psui-text-gray-80;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.psui-show-childrens-on-hover {
|
|
85
|
-
&:hover {
|
|
86
|
-
* {
|
|
87
|
-
opacity: 1 !important;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.absolute-childrens {
|
|
92
|
-
@apply psui-relative;
|
|
93
|
-
|
|
94
|
-
.helper {
|
|
95
|
-
@apply psui-absolute psui-top-0;
|
|
96
|
-
right: -18px;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.psui-transition {
|
|
102
|
-
@apply psui-transition-all psui-ease-in-out psui-duration-150;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
74
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
|
|
3
|
+
.psui-el-collapse {
|
|
4
|
+
|
|
5
|
+
.psui-el-collapse-item-content {
|
|
6
|
+
@apply psui-relative psui-pl-4;
|
|
7
|
+
|
|
8
|
+
&::before {
|
|
9
|
+
@apply psui-bg-gray-30 psui-ml-2;
|
|
10
|
+
content: "";
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
width: 1px;
|
|
15
|
+
height: 100%;
|
|
16
|
+
transform: translateX(-50%);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
&.disabled {
|
|
22
|
+
.psui-el-collapse-item-header {
|
|
23
|
+
.psui-el-collapse-item-header-wrapper {
|
|
24
|
+
@apply psui-text-gray-50 hover:psui-text-gray-50;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.psui-el-collapse-item-header {
|
|
30
|
+
@apply psui-flex psui-items-center psui-cursor-pointer;
|
|
31
|
+
|
|
32
|
+
.psui-el-collapse-item-icon {
|
|
33
|
+
@apply psui-text-gray-50 psui-transition-all;
|
|
34
|
+
transition-duration: 0.4s;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.psui-el-collapse-item-header-wrapper {
|
|
39
|
+
@apply psui-flex psui-items-center psui-py-2 psui-text-small psui-w-full;
|
|
40
|
+
|
|
41
|
+
.psui-el-collapse-item-title {
|
|
42
|
+
@apply psui-ml-1 psui-text-gray-70 hover:psui-text-blue-60;
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.psui-el-collapse-item-header-action {
|
|
47
|
+
@apply psui-invisible psui-ml-auto psui-text-gray-70 hover:psui-text-blue-60;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
.psui-el-collapse-item-header-wrapper {
|
|
53
|
+
.psui-el-collapse-item-header-action {
|
|
54
|
+
@apply psui-visible;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
.collapse-fade-enter-active,
|
|
62
|
+
.collapse-fade-leave-active {
|
|
63
|
+
will-change: height, margin-bottom;
|
|
64
|
+
transition: height 0.4s ease-in-out, margin-bottom 0.4s ease-in-out;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.collapse-fade-enter-from,
|
|
69
|
+
.collapse-fade-leave-to {
|
|
70
|
+
height: 0 !important;
|
|
71
|
+
margin-bottom: 0 !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@apply psui-w-full psui-flex psui-flex-col psui-font-medium psui-my-4;
|
|
4
4
|
|
|
5
5
|
.psui-el-dropdown-menu-list-item {
|
|
6
|
-
@apply psui-flex psui-items-end psui-justify-between psui-mx-0 psui-text-small psui-text-gray-60 psui-cursor-pointer psui-transition-all
|
|
6
|
+
@apply psui-flex psui-items-end psui-justify-between psui-mx-0 psui-text-small psui-text-gray-60 psui-cursor-pointer psui-transition-all;
|
|
7
7
|
padding: 7px 20px;
|
|
8
8
|
|
|
9
9
|
&-left-label {
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
@apply psui-relative;
|
|
6
6
|
|
|
7
7
|
.psui-el-tooltip-dialog {
|
|
8
|
-
@apply psui-fixed psui-opacity-0 psui-transition-opacity psui-duration-300 psui-ease-in-out psui-
|
|
8
|
+
@apply psui-fixed psui-opacity-0 psui-transition-opacity psui-duration-300 psui-ease-in-out psui-hidden;
|
|
9
9
|
transition-delay: 0.4s;
|
|
10
|
+
z-index: 999;
|
|
10
11
|
|
|
11
12
|
.psui-el-tooltip-content {
|
|
12
13
|
@apply psui-flex psui-flex-col psui-bg-gray-50 psui-text-white;
|