@policystudio/policy-studio-ui-vue 1.1.88 → 1.1.90-access.0
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 +75 -67
- package/.github/workflows/deploy-storybook.yml +5 -5
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6617 -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/doc/.storybook/PolicyStudio.ts +11 -0
- package/doc/.storybook/main.ts +27 -0
- package/doc/.storybook/manager.ts +7 -0
- package/{.storybook/preview.js → doc/.storybook/preview.ts} +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/doc/shims-vue.d.ts +6 -0
- package/{src/stories/Accordion.stories.js → doc/src/stories/Accordion.stories.ts} +4 -5
- package/{src/stories/BadgeWithIcon.stories.js → doc/src/stories/BadgeWithIcon.stories.ts} +2 -2
- package/{src/stories/BarChart.stories.js → doc/src/stories/BarChart.stories.ts} +2 -2
- package/{src/stories/Breadcrumb.stories.js → doc/src/stories/Breadcrumb.stories.ts} +2 -5
- package/{src/stories/Button.stories.js → doc/src/stories/Button.stories.ts} +130 -130
- package/{src/stories/CardInfos.stories.js → doc/src/stories/CardInfos.stories.ts} +2 -3
- package/{src/stories/ChartLegend.stories.js → doc/src/stories/ChartLegend.stories.ts} +2 -3
- package/{src/stories/Checkbox.stories.js → doc/src/stories/Checkbox.stories.ts} +2 -2
- package/{src/stories/CheckboxSimple.stories.js → doc/src/stories/CheckboxSimple.stories.ts} +2 -2
- package/{src/stories/Chips.stories.js → doc/src/stories/Chips.stories.ts} +22 -23
- package/{src/stories/ClimateZoneBadge.stories.js → doc/src/stories/ClimateZoneBadge.stories.ts} +3 -2
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src/stories/CostEffectBar.stories.js → doc/src/stories/CostEffectBar.stories.ts} +3 -2
- package/{src/stories/Datatable.stories.js → doc/src/stories/Datatable.stories.ts} +7 -4
- package/{src/stories/DateCardInfo.stories.js → doc/src/stories/DateCardInfo.stories.ts} +2 -6
- package/{src/stories/Dialog.stories.js → doc/src/stories/Dialog.stories.ts} +2 -2
- package/{src/stories/Draggable.stories.js → doc/src/stories/Draggable.stories.ts} +3 -2
- package/{src/stories/Dropdown.stories.js → doc/src/stories/Dropdown.stories.ts} +4 -3
- package/{src/stories/DropdownList.stories.js → doc/src/stories/DropdownList.stories.ts} +4 -2
- package/{src/stories/ElevationSystem.stories.mdx → doc/src/stories/ElevationSystem.mdx} +1 -1
- package/{src/stories/HighlightRippleDot.stories.js → doc/src/stories/HighlightRippleDot.stories.ts} +3 -2
- package/{src/stories/Icon.stories.js → doc/src/stories/Icon.stories.ts} +3 -1
- package/{src/stories/InlineSelector.stories.js → doc/src/stories/InlineSelector.stories.ts} +2 -2
- package/{src/stories/Input.stories.js → doc/src/stories/Input.stories.ts} +7 -4
- package/{src/stories/InputSelect.stories.js → doc/src/stories/InputSelect.stories.ts} +3 -2
- package/{src/stories/InputTextArea.stories.js → doc/src/stories/InputTextArea.stories.ts} +2 -2
- package/{src/stories/Introduction.stories.mdx → doc/src/stories/Introduction.mdx} +101 -101
- package/{src/stories/MiniTag.stories.js → doc/src/stories/MiniTag.stories.ts} +9 -2
- package/{src/stories/ProgressBar.stories.js → doc/src/stories/ProgressBar.stories.ts} +3 -2
- package/{src/stories/RadioButton.stories.js → doc/src/stories/RadioButton.stories.ts} +2 -2
- package/{src/stories/RadioButtonSimple.stories.js → doc/src/stories/RadioButtonSimple.stories.ts} +2 -2
- package/{src/stories/SimpleAlert.stories.js → doc/src/stories/SimpleAlert.stories.ts} +3 -2
- package/{src/stories/Slider.stories.js → doc/src/stories/Slider.stories.ts} +6 -2
- package/{src/stories/Switch.stories.js → doc/src/stories/Switch.stories.ts} +2 -2
- package/{src/stories/TabHeader.stories.js → doc/src/stories/TabHeader.stories.ts} +6 -1
- package/{src/stories/TableResults.stories.js → doc/src/stories/TableResults.stories.ts} +11 -7
- package/{src/stories/TagScope.stories.js → doc/src/stories/TagScope.stories.ts} +3 -2
- package/{src/stories/TestimonialCard.stories.js → doc/src/stories/TestimonialCard.stories.ts} +3 -3
- package/{src/stories/Toast.stories.js → doc/src/stories/Toast.stories.ts} +2 -2
- package/{src/stories/Toggle.stories.js → doc/src/stories/Toggle.stories.ts} +7 -4
- package/{src/stories/Tooltip.stories.js → doc/src/stories/Tooltip.stories.ts} +6 -6
- package/{src/stories/Typography.stories.mdx → doc/src/stories/Typography.mdx} +107 -105
- package/doc/tsconfig.json +17 -0
- package/package.json +43 -39
- package/scripts/gulp.js +11 -0
- package/scripts/kill-port.sh +12 -0
- package/src/App.vue +30 -0
- package/src/assets/scss/base.scss +3 -30
- package/src/assets/scss/components/PsAccordion.scss +2 -2
- package/src/assets/scss/components/PsButton.scss +7 -1
- package/src/assets/scss/components/PsChips.scss +12 -7
- package/src/assets/scss/components/PsCollapse.scss +71 -0
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDateCardInfo.scss +4 -5
- package/src/assets/scss/components/PsDialog.scss +7 -0
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsInput.scss +9 -0
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +57 -2
- package/src/assets/scss/components/PsTableResults.scss +53 -22
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/assets/scss/components/PsTooltip.scss +149 -145
- package/src/components/accordion/PsAccordion.vue +20 -21
- package/src/components/accordion/PsAccordionItem.vue +121 -81
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +37 -36
- package/src/components/badges-and-tags/PsCardInfos.vue +40 -40
- package/src/components/badges-and-tags/PsChartLegend.vue +50 -41
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +28 -61
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +4 -3
- 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 +25 -30
- package/src/components/buttons/PsButton.vue +90 -98
- package/src/components/chips/PsChips.vue +118 -103
- package/src/components/collapse/PsCollapse.vue +124 -0
- package/src/components/controls/PsCheckbox.vue +86 -83
- package/src/components/controls/PsCheckboxSimple.vue +97 -97
- package/src/components/controls/PsDraggable.vue +100 -99
- package/src/components/controls/PsInlineSelector.vue +111 -113
- package/src/components/controls/PsRadioButton.vue +72 -60
- package/src/components/controls/PsRadioButtonSimple.vue +81 -77
- package/src/components/controls/PsSlider.vue +190 -181
- package/src/components/controls/PsSwitch.vue +63 -54
- package/src/components/controls/PsToggle.vue +62 -57
- package/src/components/data-graphics/PsBarChart.vue +22 -23
- package/src/components/datatable/PsDataTable.vue +70 -65
- package/src/components/datatable/PsDataTableItem.vue +30 -32
- package/src/components/forms/PsDropdown.vue +173 -166
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +163 -146
- package/src/components/forms/PsInputSelect.vue +121 -100
- package/src/components/forms/PsInputTextArea.vue +84 -74
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +67 -60
- package/src/components/notifications/PsSimpleAlert.vue +47 -37
- package/src/components/notifications/PsToast.vue +48 -42
- package/src/components/table-results/PsTableResults.vue +534 -506
- package/src/components/table-results/PsTableResultsBody.vue +69 -68
- package/src/components/table-results/PsTableResultsHead.vue +108 -69
- package/src/components/table-results/PsTableResultsHeadComparison.vue +88 -69
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +112 -72
- package/src/components/table-results/PsTableResultsRow.vue +61 -58
- package/src/components/tabs/PsTabHeader.vue +138 -116
- package/src/components/tooltip/PsDialogTooltip.vue +112 -107
- package/src/components/tooltip/PsRichTooltip.vue +46 -43
- package/src/components/tooltip/PsTooltip.vue +126 -122
- package/src/components/ui/PsDotLoader.vue +6 -10
- package/src/components/ui/PsIcon.vue +149 -134
- package/src/index.ts +159 -0
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/GeneralFunctions.js +16 -7
- package/src/util/directives.ts +24 -0
- package/src/util/imageLoader.js +14 -7
- package/tailwind.config.js +12 -3
- package/tsconfig.json +47 -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/dist/css/psui_styles.css +0 -110890
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -248
- package/src/index.js +0 -167
- package/src/stories/Playground.stories.js +0 -16
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src/contents/ComparisonData.js → doc/src/contents/ComparisonData.ts} +0 -0
- /package/{src/contents/FlexibleData.js → doc/src/contents/FlexibleData.ts} +0 -0
- /package/{src/contents/ResultsData.js → doc/src/contents/ResultsData.ts} +0 -0
- /package/{src/stories/Colors.stories.mdx → doc/src/stories/Colors.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,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 },
|
package/{src/stories/TestimonialCard.stories.js → doc/src/stories/TestimonialCard.stories.ts}
RENAMED
|
@@ -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,13 +29,15 @@ 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'
|
|
39
42
|
myTemporaryInputElement.value = textToCopy
|
|
40
43
|
document.body.appendChild(myTemporaryInputElement)
|
|
@@ -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',
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
subcomponents: {PsRichTooltip, PsDialogTooltip}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const TemplateDialog = (args, {argTypes}) => ({
|
|
11
|
+
const TemplateDialog = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
13
13
|
components: {PsDialogTooltip},
|
|
14
14
|
template: `
|
|
@@ -41,7 +41,7 @@ const TemplateDialog = (args, {argTypes}) => ({
|
|
|
41
41
|
`,
|
|
42
42
|
})
|
|
43
43
|
|
|
44
|
-
const TemplateRich = (args,{argTypes})=>({
|
|
44
|
+
const TemplateRich = (args:any, {argTypes}:{argTypes:any})=>({
|
|
45
45
|
props: Object.keys(argTypes),
|
|
46
46
|
components: {PsRichTooltip},
|
|
47
47
|
template: `
|
|
@@ -74,7 +74,7 @@ const TemplateRich = (args,{argTypes})=>({
|
|
|
74
74
|
`
|
|
75
75
|
})
|
|
76
76
|
|
|
77
|
-
const TemplateDefault = (args, {argTypes}) => ({
|
|
77
|
+
const TemplateDefault = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
78
78
|
props: Object.keys(argTypes),
|
|
79
79
|
components: {PsTooltip},
|
|
80
80
|
template: `
|
|
@@ -1,111 +1,7 @@
|
|
|
1
|
-
import { Meta } from
|
|
1
|
+
import { Meta } from "@storybook/blocks";
|
|
2
2
|
|
|
3
3
|
<Meta title="Typography" />
|
|
4
4
|
|
|
5
|
-
<style>{`
|
|
6
|
-
.subheading {
|
|
7
|
-
--mediumdark: '#999999';
|
|
8
|
-
font-weight: 900;
|
|
9
|
-
font-size: 13px;
|
|
10
|
-
color: #999;
|
|
11
|
-
letter-spacing: 6px;
|
|
12
|
-
line-height: 24px;
|
|
13
|
-
text-transform: uppercase;
|
|
14
|
-
margin-bottom: 12px;
|
|
15
|
-
margin-top: 40px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.link-list {
|
|
19
|
-
display: grid;
|
|
20
|
-
grid-template-columns: 1fr;
|
|
21
|
-
grid-template-rows: 1fr 1fr;
|
|
22
|
-
row-gap: 10px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@media (min-width: 620px) {
|
|
26
|
-
.link-list {
|
|
27
|
-
row-gap: 20px;
|
|
28
|
-
column-gap: 20px;
|
|
29
|
-
grid-template-columns: 1fr 1fr;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@media all and (-ms-high-contrast:none) {
|
|
34
|
-
.link-list {
|
|
35
|
-
display: -ms-grid;
|
|
36
|
-
-ms-grid-columns: 1fr 1fr;
|
|
37
|
-
-ms-grid-rows: 1fr 1fr;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.link-item {
|
|
42
|
-
display: block;
|
|
43
|
-
padding: 20px 30px 20px 15px;
|
|
44
|
-
border: 1px solid #00000010;
|
|
45
|
-
border-radius: 5px;
|
|
46
|
-
transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
|
|
47
|
-
color: #333333;
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: flex-start;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.link-item:hover {
|
|
53
|
-
border-color: #1EA7FD50;
|
|
54
|
-
transform: translate3d(0, -3px, 0);
|
|
55
|
-
box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.link-item:active {
|
|
59
|
-
border-color: #1EA7FD;
|
|
60
|
-
transform: translate3d(0, 0, 0);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.link-item strong {
|
|
64
|
-
font-weight: 700;
|
|
65
|
-
display: block;
|
|
66
|
-
margin-bottom: 2px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.link-item img {
|
|
70
|
-
height: 40px;
|
|
71
|
-
width: 40px;
|
|
72
|
-
margin-right: 15px;
|
|
73
|
-
flex: none;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.link-item span {
|
|
77
|
-
font-size: 14px;
|
|
78
|
-
line-height: 20px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.tip {
|
|
82
|
-
display: inline-block;
|
|
83
|
-
border-radius: 1em;
|
|
84
|
-
font-size: 11px;
|
|
85
|
-
line-height: 12px;
|
|
86
|
-
font-weight: 700;
|
|
87
|
-
background: #E7FDD8;
|
|
88
|
-
color: #66BF3C;
|
|
89
|
-
padding: 4px 12px;
|
|
90
|
-
margin-right: 10px;
|
|
91
|
-
vertical-align: top;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.tip-wrapper {
|
|
95
|
-
font-size: 13px;
|
|
96
|
-
line-height: 20px;
|
|
97
|
-
margin-top: 40px;
|
|
98
|
-
margin-bottom: 40px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.tip-wrapper code {
|
|
102
|
-
font-size: 12px;
|
|
103
|
-
display: inline-block;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`}</style>
|
|
108
|
-
|
|
109
5
|
# Typography
|
|
110
6
|
Typography serves to present your design and content as clearly and efficiently as possible.
|
|
111
7
|
|
|
@@ -208,3 +104,109 @@ Keeping typography consistent and sticking to logical hierarchies ensures that e
|
|
|
208
104
|
</tr>
|
|
209
105
|
</table>
|
|
210
106
|
|
|
107
|
+
<style>
|
|
108
|
+
{`
|
|
109
|
+
.subheading {
|
|
110
|
+
--mediumdark: '#999999';
|
|
111
|
+
font-weight: 900;
|
|
112
|
+
font-size: 13px;
|
|
113
|
+
color: #999;
|
|
114
|
+
letter-spacing: 6px;
|
|
115
|
+
line-height: 24px;
|
|
116
|
+
text-transform: uppercase;
|
|
117
|
+
margin-bottom: 12px;
|
|
118
|
+
margin-top: 40px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.link-list {
|
|
122
|
+
display: grid;
|
|
123
|
+
grid-template-columns: 1fr;
|
|
124
|
+
grid-template-rows: 1fr 1fr;
|
|
125
|
+
row-gap: 10px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (min-width: 620px) {
|
|
129
|
+
.link-list {
|
|
130
|
+
row-gap: 20px;
|
|
131
|
+
column-gap: 20px;
|
|
132
|
+
grid-template-columns: 1fr 1fr;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media all and (-ms-high-contrast:none) {
|
|
137
|
+
.link-list {
|
|
138
|
+
display: -ms-grid;
|
|
139
|
+
-ms-grid-columns: 1fr 1fr;
|
|
140
|
+
-ms-grid-rows: 1fr 1fr;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.link-item {
|
|
145
|
+
display: block;
|
|
146
|
+
padding: 20px 30px 20px 15px;
|
|
147
|
+
border: 1px solid #00000010;
|
|
148
|
+
border-radius: 5px;
|
|
149
|
+
transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
|
|
150
|
+
color: #333333;
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: flex-start;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.link-item:hover {
|
|
156
|
+
border-color: #1EA7FD50;
|
|
157
|
+
transform: translate3d(0, -3px, 0);
|
|
158
|
+
box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.link-item:active {
|
|
162
|
+
border-color: #1EA7FD;
|
|
163
|
+
transform: translate3d(0, 0, 0);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.link-item strong {
|
|
167
|
+
font-weight: 700;
|
|
168
|
+
display: block;
|
|
169
|
+
margin-bottom: 2px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.link-item img {
|
|
173
|
+
height: 40px;
|
|
174
|
+
width: 40px;
|
|
175
|
+
margin-right: 15px;
|
|
176
|
+
flex: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.link-item span {
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
line-height: 20px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.tip {
|
|
185
|
+
display: inline-block;
|
|
186
|
+
border-radius: 1em;
|
|
187
|
+
font-size: 11px;
|
|
188
|
+
line-height: 12px;
|
|
189
|
+
font-weight: 700;
|
|
190
|
+
background: #E7FDD8;
|
|
191
|
+
color: #66BF3C;
|
|
192
|
+
padding: 4px 12px;
|
|
193
|
+
margin-right: 10px;
|
|
194
|
+
vertical-align: top;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.tip-wrapper {
|
|
198
|
+
font-size: 13px;
|
|
199
|
+
line-height: 20px;
|
|
200
|
+
margin-top: 40px;
|
|
201
|
+
margin-bottom: 40px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.tip-wrapper code {
|
|
205
|
+
font-size: 12px;
|
|
206
|
+
display: inline-block;
|
|
207
|
+
}
|
|
208
|
+
`}
|
|
209
|
+
</style>
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
@@ -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,57 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@policystudio/policy-studio-ui-vue",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.90-access.0",
|
|
4
4
|
"description": "Policy Studio UI",
|
|
5
|
-
"main": "src/index.js",
|
|
6
5
|
"author": "Policy Studio Team",
|
|
7
|
-
"url": "https://github.com/Policy-Studio/policy-studio-ui-vue",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"vue",
|
|
11
|
-
"ui"
|
|
12
|
-
],
|
|
13
6
|
"scripts": {
|
|
14
7
|
"lint": "vue-cli-service lint",
|
|
15
|
-
"build
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"watch-storybook": "start-storybook -p 6006",
|
|
22
|
-
"watch-prod-tailwind": "watch 'npm run build-tailwind' ./src/assets",
|
|
23
|
-
"watch-tailwind": "watch 'npm run build-temp-tailwind' ./src/assets"
|
|
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 access",
|
|
10
|
+
"kill-port": "sh ./scripts/kill-port.sh",
|
|
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"
|
|
24
14
|
},
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "src/types/index.d.ts",
|
|
25
17
|
"dependencies": {
|
|
18
|
+
"@vue/compat": "^3.4.5",
|
|
26
19
|
"core-js": "^3.6.5",
|
|
27
20
|
"v-tooltip": "^2.1.3",
|
|
28
|
-
"vue": "^
|
|
21
|
+
"vue": "^3.4.5"
|
|
29
22
|
},
|
|
30
23
|
"devDependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@vue/
|
|
38
|
-
"@vue/
|
|
39
|
-
"@vue/cli-service": "~4.5.0",
|
|
40
|
-
"@vue/eslint-config-prettier": "^6.0.0",
|
|
41
|
-
"babel-eslint": "^10.1.0",
|
|
42
|
-
"babel-loader": "^8.2.3",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
25
|
+
"@typescript-eslint/parser": "^5.4.0",
|
|
26
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
27
|
+
"@vue/cli-plugin-typescript": "~5.0.0",
|
|
28
|
+
"@vue/cli-service": "~5.0.8",
|
|
29
|
+
"@vue/compiler-sfc": "^3.4.5",
|
|
30
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
31
|
+
"@vue/eslint-config-typescript": "^9.1.0",
|
|
43
32
|
"concurrently": "^7.0.0",
|
|
44
|
-
"eslint": "^
|
|
45
|
-
"eslint-plugin-prettier": "^
|
|
46
|
-
"eslint-plugin-vue": "^
|
|
33
|
+
"eslint": "^8.56.0",
|
|
34
|
+
"eslint-plugin-prettier": "^5.1.2",
|
|
35
|
+
"eslint-plugin-vue": "^8.7.1",
|
|
36
|
+
"gulp": "^5.0.0",
|
|
37
|
+
"gulp-sass": "^5.1.0",
|
|
47
38
|
"postcss": "^8.3.11",
|
|
48
39
|
"postcss-cli": "^9.0.2",
|
|
49
40
|
"postcss-import": "^14.0.2",
|
|
50
41
|
"postcss-nested": "^5.0.6",
|
|
51
|
-
"prettier": "^
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
42
|
+
"prettier": "^3.1.1",
|
|
43
|
+
"sass": "^1.77.1",
|
|
44
|
+
"tailwindcss": "^3.4.1",
|
|
45
|
+
"ts-loader": "^9.5.1",
|
|
46
|
+
"typescript": "~4.5.5",
|
|
47
|
+
"vue-eslint-parser": "^9.3.2",
|
|
48
|
+
"vue-loader": "^17.4.2",
|
|
49
|
+
"watch": "^1.0.2",
|
|
50
|
+
"webpack": "^5.89.0"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": "20.11.0"
|
|
54
|
+
},
|
|
55
|
+
"keywords": [
|
|
56
|
+
"vue",
|
|
57
|
+
"ui"
|
|
58
|
+
],
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"url": "https://github.com/Policy-Studio/policy-studio-ui-vue"
|
|
57
61
|
}
|
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
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Find the process using port 3000
|
|
4
|
+
PROCESS_ID=$(lsof -t -i:6006)
|
|
5
|
+
|
|
6
|
+
# Check if a process is using the port
|
|
7
|
+
if [ -n "$PROCESS_ID" ]; then
|
|
8
|
+
echo "Killing process on port 6006 (PID: $PROCESS_ID)"
|
|
9
|
+
kill -9 $PROCESS_ID
|
|
10
|
+
else
|
|
11
|
+
echo "Port 6006 is not in use"
|
|
12
|
+
fi
|
package/src/App.vue
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img
|
|
3
|
+
alt="Vue logo"
|
|
4
|
+
src="./assets/logo.png"
|
|
5
|
+
>
|
|
6
|
+
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App" />
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { defineComponent } from 'vue'
|
|
11
|
+
import HelloWorld from './components/HelloWorld.vue'
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
name: 'App',
|
|
15
|
+
components: {
|
|
16
|
+
HelloWorld
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style>
|
|
22
|
+
#app {
|
|
23
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
24
|
+
-webkit-font-smoothing: antialiased;
|
|
25
|
+
-moz-osx-font-smoothing: grayscale;
|
|
26
|
+
text-align: center;
|
|
27
|
+
color: #2c3e50;
|
|
28
|
+
margin-top: 60px;
|
|
29
|
+
}
|
|
30
|
+
</style>
|