@policystudio/policy-studio-ui-vue 1.1.90-beta.0 → 1.1.90-beta.12
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 +12 -8
- package/.storybook/PolicyStudio.ts +11 -0
- package/.storybook/manager.ts +7 -0
- package/dist/contents/ComparisonData.js +376 -0
- package/dist/contents/ComparisonData.js.map +1 -0
- package/dist/contents/FlexibleData.js +501 -0
- package/dist/contents/FlexibleData.js.map +1 -0
- package/dist/contents/ResultsData.js +530 -0
- package/dist/contents/ResultsData.js.map +1 -0
- package/dist/css/psui_styles.css +4035 -110277
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/stories/Accordion.stories.js +56 -0
- package/dist/stories/Accordion.stories.js.map +1 -0
- package/dist/stories/BadgeWithIcon.stories.js +28 -0
- package/dist/stories/BadgeWithIcon.stories.js.map +1 -0
- package/dist/stories/BarChart.stories.js +16 -0
- package/dist/stories/BarChart.stories.js.map +1 -0
- package/dist/stories/Breadcrumb.stories.js +21 -0
- package/dist/stories/Breadcrumb.stories.js.map +1 -0
- package/dist/stories/Button.stories.js +44 -0
- package/dist/stories/Button.stories.js.map +1 -0
- package/dist/stories/CardInfos.stories.js +13 -0
- package/dist/stories/CardInfos.stories.js.map +1 -0
- package/dist/stories/ChartLegend.stories.js +13 -0
- package/dist/stories/ChartLegend.stories.js.map +1 -0
- package/dist/stories/Checkbox.stories.js +44 -0
- package/dist/stories/Checkbox.stories.js.map +1 -0
- package/dist/stories/CheckboxSimple.stories.js +48 -0
- package/dist/stories/CheckboxSimple.stories.js.map +1 -0
- package/dist/stories/Chips.stories.js +27 -0
- package/dist/stories/Chips.stories.js.map +1 -0
- package/dist/stories/ClimateZoneBadge.stories.js +15 -0
- package/dist/stories/ClimateZoneBadge.stories.js.map +1 -0
- package/dist/stories/CostEffectBar.stories.js +21 -0
- package/dist/stories/CostEffectBar.stories.js.map +1 -0
- package/dist/stories/Datatable.stories.js +45 -0
- package/dist/stories/Datatable.stories.js.map +1 -0
- package/dist/stories/DateCardInfo.stories.js +18 -0
- package/dist/stories/DateCardInfo.stories.js.map +1 -0
- package/dist/stories/Dialog.stories.js +127 -0
- package/dist/stories/Dialog.stories.js.map +1 -0
- package/dist/stories/Draggable.stories.js +20 -0
- package/dist/stories/Draggable.stories.js.map +1 -0
- package/dist/stories/Dropdown.stories.js +98 -0
- package/dist/stories/Dropdown.stories.js.map +1 -0
- package/dist/stories/DropdownList.stories.js +208 -0
- package/dist/stories/DropdownList.stories.js.map +1 -0
- package/dist/stories/Header.stories.js +39 -0
- package/dist/stories/Header.stories.js.map +1 -0
- package/dist/stories/HighlightRippleDot.stories.js +13 -0
- package/dist/stories/HighlightRippleDot.stories.js.map +1 -0
- package/dist/stories/Icon.stories.js +19 -0
- package/dist/stories/Icon.stories.js.map +1 -0
- package/dist/stories/InlineSelector.stories.js +16 -0
- package/dist/stories/InlineSelector.stories.js.map +1 -0
- package/dist/stories/Input.stories.js +235 -0
- package/dist/stories/Input.stories.js.map +1 -0
- package/dist/stories/InputSelect.stories.js +28 -0
- package/dist/stories/InputSelect.stories.js.map +1 -0
- package/dist/stories/InputTextArea.stories.js +23 -0
- package/dist/stories/InputTextArea.stories.js.map +1 -0
- package/dist/stories/MiniTag.stories.js +44 -0
- package/dist/stories/MiniTag.stories.js.map +1 -0
- package/dist/stories/Playground.stories.js +14 -0
- package/dist/stories/Playground.stories.js.map +1 -0
- package/dist/stories/ProgressBar.stories.js +21 -0
- package/dist/stories/ProgressBar.stories.js.map +1 -0
- package/dist/stories/RadioButton.stories.js +36 -0
- package/dist/stories/RadioButton.stories.js.map +1 -0
- package/dist/stories/RadioButtonSimple.stories.js +40 -0
- package/dist/stories/RadioButtonSimple.stories.js.map +1 -0
- package/dist/stories/SimpleAlert.stories.js +19 -0
- package/dist/stories/SimpleAlert.stories.js.map +1 -0
- package/dist/stories/Slider.stories.js +70 -0
- package/dist/stories/Slider.stories.js.map +1 -0
- package/dist/stories/Switch.stories.js +35 -0
- package/dist/stories/Switch.stories.js.map +1 -0
- package/dist/stories/TabHeader.stories.js +48 -0
- package/dist/stories/TabHeader.stories.js.map +1 -0
- package/dist/stories/TableResults.stories.js +717 -0
- package/dist/stories/TableResults.stories.js.map +1 -0
- package/dist/stories/TagScope.stories.js +16 -0
- package/dist/stories/TagScope.stories.js.map +1 -0
- package/dist/stories/TestimonialCard.stories.js +24 -0
- package/dist/stories/TestimonialCard.stories.js.map +1 -0
- package/dist/stories/Toast.stories.js +51 -0
- package/dist/stories/Toast.stories.js.map +1 -0
- package/dist/stories/Toggle.stories.js +42 -0
- package/dist/stories/Toggle.stories.js.map +1 -0
- package/dist/stories/Tooltip.stories.js +108 -0
- package/dist/stories/Tooltip.stories.js.map +1 -0
- package/dist/util/GeneralFunctions.js +29 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/package.json +25 -22
- package/postcss.config.js +1 -1
- 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 +1 -1
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +2 -1
- package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
- package/src/components/buttons/PsButton.vue +74 -96
- package/src/{index.js → index.ts} +4 -0
- 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/{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.js → ClimateZoneBadge.stories.ts} +2 -1
- package/src/stories/{CostEffectBar.stories.js → CostEffectBar.stories.ts} +2 -1
- 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.js → Draggable.stories.ts} +2 -1
- package/src/stories/{Dropdown.stories.js → Dropdown.stories.ts} +2 -1
- package/src/stories/{DropdownList.stories.js → DropdownList.stories.ts} +3 -1
- package/src/stories/{Header.stories.js → Header.stories.ts} +1 -0
- package/src/stories/{HighlightRippleDot.stories.js → HighlightRippleDot.stories.ts} +2 -1
- package/src/stories/{Icon.stories.js → Icon.stories.ts} +2 -0
- package/src/stories/{InlineSelector.stories.js → InlineSelector.stories.ts} +1 -1
- package/src/stories/{Input.stories.js → Input.stories.ts} +6 -3
- 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/{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 -1
- 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} +5 -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/util/{GeneralFunctions.js → GeneralFunctions.ts} +7 -6
- package/src/util/{imageLoader.js → imageLoader.ts} +15 -7
- package/tailwind.config.js +11 -2
- package/tsconfig.json +47 -0
- package/webpack.config.js +17 -3
- package/.storybook/PolicyStudio.js +0 -10
- package/.storybook/manager.js +0 -6
- package/babel.config.js +0 -17
- /package/.storybook/{eventBus.js → eventBus.ts} +0 -0
- /package/.storybook/{main.js → main.ts} +0 -0
- /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/{Button.stories.js → Button.stories.ts} +0 -0
|
@@ -6,6 +6,7 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// @ts-ignore
|
|
9
10
|
const Template = (args, { argTypes }) => ({
|
|
10
11
|
props: Object.keys(argTypes),
|
|
11
12
|
components: { PsIcon },
|
|
@@ -18,4 +19,5 @@ export default {
|
|
|
18
19
|
})
|
|
19
20
|
|
|
20
21
|
export const IconSimple = Template.bind({})
|
|
22
|
+
// @ts-ignore
|
|
21
23
|
IconSimple.args = {}
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
required: { control: 'boolean' },
|
|
8
8
|
},
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
// @ts-ignore
|
|
11
11
|
const TemplateInputText = (args, { argTypes }) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
13
13
|
components: { PsInput },
|
|
@@ -79,7 +79,7 @@ const TemplateInputText = (args, { argTypes }) => ({
|
|
|
79
79
|
</div>
|
|
80
80
|
`
|
|
81
81
|
})
|
|
82
|
-
|
|
82
|
+
// @ts-ignore
|
|
83
83
|
const TemplateInputPassword = (args, { argTypes }) => ({
|
|
84
84
|
props: Object.keys(argTypes),
|
|
85
85
|
components: { PsInput },
|
|
@@ -183,7 +183,7 @@ const TemplateInputPassword = (args, { argTypes }) => ({
|
|
|
183
183
|
</div>
|
|
184
184
|
`
|
|
185
185
|
})
|
|
186
|
-
|
|
186
|
+
// @ts-ignore
|
|
187
187
|
const TemplateSlots = (args, { argTypes }) => ({
|
|
188
188
|
props: Object.keys(argTypes),
|
|
189
189
|
components: { PsInput },
|
|
@@ -212,6 +212,7 @@ const TemplateSlots = (args, { argTypes }) => ({
|
|
|
212
212
|
})
|
|
213
213
|
|
|
214
214
|
export const InputText = TemplateInputText.bind({})
|
|
215
|
+
// @ts-ignore
|
|
215
216
|
InputText.args = {
|
|
216
217
|
label: 'Input Text',
|
|
217
218
|
placeholder: 'Placeholder',
|
|
@@ -222,6 +223,7 @@ InputText.args = {
|
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
export const InputPassword = TemplateInputPassword.bind({})
|
|
226
|
+
// @ts-ignore
|
|
225
227
|
InputPassword.args = {
|
|
226
228
|
type: 'password',
|
|
227
229
|
label: 'Password',
|
|
@@ -231,6 +233,7 @@ InputPassword.args = {
|
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
export const InputSlots = TemplateSlots.bind({})
|
|
236
|
+
// @ts-ignore
|
|
234
237
|
InputSlots.args = {
|
|
235
238
|
label: 'Label',
|
|
236
239
|
placeholder: 'Placeholder',
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
title: 'Text fields & Forms/InputSelect',
|
|
5
5
|
component: PsInputSelect
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const TemplateDefault = (args, {argTypes})=> ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: {PsInputSelect},
|
|
@@ -25,6 +25,7 @@ const TemplateDefault = (args, {argTypes})=> ({
|
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
export const Default = TemplateDefault.bind({})
|
|
28
|
+
// @ts-ignore
|
|
28
29
|
Default.args = {
|
|
29
30
|
items: [{title:'Text 1', value:'Value 1'}, {title:'Text 2', value:'Value 2'}]
|
|
30
31
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
|
|
1
2
|
import PsMiniTag, {
|
|
3
|
+
// @ts-ignore
|
|
2
4
|
typeOptions,
|
|
3
5
|
} from '../components/badges-and-tags/PsMiniTag.vue'
|
|
4
6
|
|
|
@@ -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',
|
|
@@ -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 = {}
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
component: PsRadioButtonSimple,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const defaultTemplate = (args, {argTypes}) => ({
|
|
8
|
+
const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsRadioButtonSimple },
|
|
11
11
|
data: () => ({
|
|
@@ -4,7 +4,7 @@ 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
|
}
|
|
@@ -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,
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
// @ts-ignore
|
|
1
2
|
import PsTableResults, { tableLayout } from '../components/table-results/PsTableResults.vue'
|
|
2
3
|
import PsTableResultsHead from '../components/table-results/PsTableResultsHead.vue'
|
|
3
4
|
import PsTableResultsHeadFlexible from '../components/table-results/PsTableResultsHeadFlexible.vue'
|
|
@@ -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,
|
|
@@ -4,7 +4,7 @@ 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',
|
|
@@ -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)
|
|
@@ -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,14 +1,15 @@
|
|
|
1
|
+
// @ts-ignore
|
|
1
2
|
export const randomString = (length) => {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
let result = ''
|
|
4
|
+
const characters =
|
|
4
5
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
|
5
|
-
|
|
6
|
-
for (
|
|
6
|
+
const charactersLength = characters.length
|
|
7
|
+
for (let i = 0; i < length; i++) {
|
|
7
8
|
result += characters.charAt(Math.floor(Math.random() * charactersLength))
|
|
8
9
|
}
|
|
9
10
|
return result
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
// @ts-ignore
|
|
12
13
|
export const getParentScrollableEl = (node) => {
|
|
13
14
|
if (node == null) {
|
|
14
15
|
return null
|
|
@@ -20,7 +21,7 @@ export const getParentScrollableEl = (node) => {
|
|
|
20
21
|
return getParentScrollableEl(node.parentNode)
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
+
// @ts-ignore
|
|
24
25
|
export const getParentVueComponentByName = (comp, name) => {
|
|
25
26
|
if (comp.$options.name === name) {
|
|
26
27
|
return comp
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
// @ts-ignore
|
|
1
2
|
export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
|
|
2
3
|
return new Promise((resolve, reject) => {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
const xhr = new XMLHttpRequest()
|
|
5
|
+
let notifiedNotComputable = false
|
|
5
6
|
|
|
6
7
|
xhr.open('GET', imageUrl, true)
|
|
7
8
|
xhr.responseType = 'arraybuffer'
|
|
8
9
|
|
|
9
10
|
xhr.onprogress = (ev) => {
|
|
10
11
|
if (ev.lengthComputable) {
|
|
11
|
-
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
const progress = parseInt((ev.loaded / ev.total) * 100)
|
|
14
|
+
// @ts-ignore
|
|
12
15
|
if(onProgress) onProgress(progress)
|
|
13
16
|
} else {
|
|
14
17
|
if (!notifiedNotComputable) {
|
|
15
18
|
notifiedNotComputable = true
|
|
19
|
+
// @ts-ignore
|
|
16
20
|
if(onProgress) onProgress(-1)
|
|
17
21
|
}
|
|
18
22
|
}
|
|
@@ -20,21 +24,25 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
|
|
|
20
24
|
|
|
21
25
|
xhr.onloadend = () => {
|
|
22
26
|
const contentType = xhr.getResponseHeader('Content-Type')
|
|
27
|
+
// @ts-ignore
|
|
23
28
|
if (!contentType.includes('image')) {
|
|
24
29
|
reject(xhr)
|
|
25
30
|
} else {
|
|
26
31
|
if (!notifiedNotComputable) {
|
|
32
|
+
// @ts-ignore
|
|
27
33
|
if(onProgress) onProgress(100)
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
if(!returnsBase64) {
|
|
37
|
+
// @ts-ignore
|
|
31
38
|
resolve()
|
|
32
39
|
} else {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
const options = {}
|
|
41
|
+
const headers = xhr.getAllResponseHeaders()
|
|
42
|
+
const mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
|
|
43
|
+
// @ts-ignore
|
|
36
44
|
if (mime && mime[1]) options.type = mime[1]
|
|
37
|
-
|
|
45
|
+
const blob = new Blob([xhr.response], options)
|
|
38
46
|
resolve(window.URL.createObjectURL(blob))
|
|
39
47
|
}
|
|
40
48
|
}
|
package/tailwind.config.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
prefix: 'psui-',
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
content: [
|
|
6
|
+
'./index.html',
|
|
7
|
+
'./src/**/*.vue',
|
|
8
|
+
'./src/**/*.js',
|
|
9
|
+
'./src/**/*.ts',
|
|
10
|
+
'./src/**/*.jsx',
|
|
11
|
+
'./src/**/*.tsx',
|
|
12
|
+
],
|
|
13
|
+
darkMode: 'media', // or 'media' or 'class'
|
|
5
14
|
theme: {
|
|
6
15
|
colors: {
|
|
7
16
|
'white': '#ffffff ',
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"noEmitOnError": false,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"rootDir": "./src",
|
|
12
|
+
"skipLibCheck": true, //this make ts ignore error
|
|
13
|
+
"skipDefaultLibCheck": true, //this make ts ignore error
|
|
14
|
+
"noEmit": true, //this make ts ignore error
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true,
|
|
17
|
+
"forceConsistentCasingInFileNames": true,
|
|
18
|
+
"useDefineForClassFields": true,
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"baseUrl": ".",
|
|
21
|
+
"types": [
|
|
22
|
+
"webpack-env"
|
|
23
|
+
],
|
|
24
|
+
"paths": {
|
|
25
|
+
"@/*": [
|
|
26
|
+
"src/*"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"lib": [
|
|
30
|
+
"esnext",
|
|
31
|
+
"dom",
|
|
32
|
+
"dom.iterable",
|
|
33
|
+
"scripthost"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"include": [
|
|
37
|
+
"src/**/*.ts",
|
|
38
|
+
"src/**/*.stories.ts",
|
|
39
|
+
"src/**/*.d.ts",
|
|
40
|
+
"src/**/*.vue",
|
|
41
|
+
"tests/**/*.ts",
|
|
42
|
+
"tests/**/*.tsx",
|
|
43
|
+
],
|
|
44
|
+
"exclude": [
|
|
45
|
+
"node_modules"
|
|
46
|
+
]
|
|
47
|
+
}
|
package/webpack.config.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
const { VueLoaderPlugin} = require('vue-loader')
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
resolve: {
|
|
3
5
|
alias: {
|
|
4
6
|
vue: '@vue/compat'
|
|
5
|
-
}
|
|
7
|
+
},
|
|
8
|
+
extensions: ['.js','.ts','.vue']
|
|
6
9
|
},
|
|
7
10
|
module: {
|
|
8
11
|
rules: [
|
|
@@ -16,7 +19,18 @@ module.exports = {
|
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
test: /\.tsx?$/,
|
|
25
|
+
loader: 'ts-loader',
|
|
26
|
+
options: {
|
|
27
|
+
appendTsSuffixTo: [/\.vue$/],
|
|
28
|
+
},
|
|
29
|
+
exclude: /node_modules/,
|
|
30
|
+
},
|
|
20
31
|
]
|
|
21
|
-
}
|
|
32
|
+
},
|
|
33
|
+
plugins:[
|
|
34
|
+
new VueLoaderPlugin()
|
|
35
|
+
]
|
|
22
36
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { create } from '@storybook/theming';
|
|
2
|
-
import logo from '../src/assets/images/policy-studio.svg';
|
|
3
|
-
|
|
4
|
-
export default create({
|
|
5
|
-
base: 'light',
|
|
6
|
-
brandTitle: 'Policy Studio UI Vue',
|
|
7
|
-
brandUrl: 'https://policystudio.co/',
|
|
8
|
-
brandImage: logo,
|
|
9
|
-
brandTarget: '_blank',
|
|
10
|
-
});
|
package/.storybook/manager.js
DELETED
package/babel.config.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|