@policystudio/policy-studio-ui-vue 1.0.19 → 1.0.20
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 +1 -2
- package/.storybook/main.js +3 -3
- package/.storybook/preview.js +1 -1
- package/README.md +8 -0
- package/babel.config.js +3 -0
- package/backup-package-lock.json +37194 -0
- package/dist/css/psui_styles.css +31 -50
- package/package.json +28 -22
- package/src/assets/scss/base.scss +1 -28
- package/src/components/accordion/PsAccordion.vue +9 -1
- package/src/components/accordion/PsAccordionItem.vue +1 -1
- package/src/components/buttons/PsButton.vue +32 -12
- package/src/components/chips/PsChips.vue +46 -28
- package/src/components/controls/PsDraggable.vue +27 -2
- package/src/components/controls/PsRadioButton.vue +63 -38
- package/src/components/controls/PsSwitch.vue +75 -76
- package/src/components/datatable/PsDataTable.vue +25 -29
- package/src/components/datatable/PsDataTableItem.vue +2 -2
- package/src/components/tooltip/PsDialogTooltip.vue +79 -0
- package/src/components/tooltip/PsRichTooltip.vue +38 -0
- package/src/components/tooltip/PsTooltip.vue +120 -0
- package/src/components/ui/PsIcon.vue +87 -24
- package/src/index.js +15 -1
- package/src/stories/Accordion.stories.js +2 -2
- package/src/stories/Button.stories.js +11 -11
- package/src/stories/Checkbox.stories.js +6 -6
- package/src/stories/Chips.stories.js +7 -7
- package/src/stories/Colors.stories.mdx +35 -35
- package/src/stories/Datatable.stories.js +15 -8
- package/src/stories/Dialog.stories.js +9 -9
- package/src/stories/Draggable.stories.js +24 -0
- package/src/stories/Dropdown.stories.js +5 -5
- package/src/stories/Input.stories.js +10 -10
- package/src/stories/RadioButton.stories.js +14 -14
- package/src/stories/Slider.stories.js +9 -9
- package/src/stories/Swith.stories.js +10 -10
- package/src/stories/TabHeader.stories.js +9 -9
- package/src/stories/Toast.stories.js +13 -13
- package/src/stories/Toggle.stories.js +5 -5
- package/src/stories/Tooltip.stories.js +113 -0
- package/src/util/GeneralFunctions.js +8 -8
- package/src/util/imageLoader.js +50 -0
- package/tailwind.config.js +1 -0
- package/src/assets/scss/tailwind.css +0 -70643
- package/src/assets/scss/tailwind.scss +0 -61088
package/dist/css/psui_styles.css
CHANGED
|
@@ -7135,6 +7135,11 @@ video {
|
|
|
7135
7135
|
height: 100vh;
|
|
7136
7136
|
}
|
|
7137
7137
|
|
|
7138
|
+
.psui-text-big {
|
|
7139
|
+
font-size: 16px;
|
|
7140
|
+
line-height: 130%;
|
|
7141
|
+
}
|
|
7142
|
+
|
|
7138
7143
|
.psui-text-small {
|
|
7139
7144
|
font-size: 14px;
|
|
7140
7145
|
line-height: 130%;
|
|
@@ -12622,6 +12627,7 @@ video {
|
|
|
12622
12627
|
.psui-select-all {
|
|
12623
12628
|
-webkit-user-select: all;
|
|
12624
12629
|
-moz-user-select: all;
|
|
12630
|
+
-ms-user-select: all;
|
|
12625
12631
|
user-select: all;
|
|
12626
12632
|
}
|
|
12627
12633
|
|
|
@@ -15937,55 +15943,6 @@ html {
|
|
|
15937
15943
|
-moz-osx-font-smoothing: grayscale;
|
|
15938
15944
|
}
|
|
15939
15945
|
|
|
15940
|
-
.toggle-bg:after {
|
|
15941
|
-
content: '';
|
|
15942
|
-
position: absolute;
|
|
15943
|
-
background-color: #ffffff;
|
|
15944
|
-
--border-opacity: 1;
|
|
15945
|
-
border-color: #A2ACB7;
|
|
15946
|
-
border-color: rgba(162, 172, 183, var(--border-opacity));
|
|
15947
|
-
border-radius: 9999px;
|
|
15948
|
-
height: 1.25rem;
|
|
15949
|
-
width: 1.25rem;
|
|
15950
|
-
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
|
|
15951
|
-
}
|
|
15952
|
-
|
|
15953
|
-
.toggle-bg:after + .ps-switch-small {
|
|
15954
|
-
content: '';
|
|
15955
|
-
position: absolute;
|
|
15956
|
-
background-color: #ffffff;
|
|
15957
|
-
--border-opacity: 1;
|
|
15958
|
-
border-color: #A2ACB7;
|
|
15959
|
-
border-color: rgba(162, 172, 183, var(--border-opacity));
|
|
15960
|
-
border-radius: 9999px;
|
|
15961
|
-
height: 0.5rem;
|
|
15962
|
-
width: 0.5rem;
|
|
15963
|
-
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
|
|
15964
|
-
}
|
|
15965
|
-
|
|
15966
|
-
input:checked + .toggle-bg:after + .ps-switch-small {
|
|
15967
|
-
transform: translateX(100%);
|
|
15968
|
-
position: absolute;
|
|
15969
|
-
left: 2px;
|
|
15970
|
-
border-color: #ffffff;
|
|
15971
|
-
}
|
|
15972
|
-
|
|
15973
|
-
input:checked + .toggle-bg:after {
|
|
15974
|
-
transform: translateX(100%);
|
|
15975
|
-
position: absolute;
|
|
15976
|
-
left: 4px;
|
|
15977
|
-
border-color: #ffffff;
|
|
15978
|
-
}
|
|
15979
|
-
|
|
15980
|
-
input:checked + .toggle-bg {
|
|
15981
|
-
--bg-opacity: 1;
|
|
15982
|
-
background-color: #5DB883;
|
|
15983
|
-
background-color: rgba(93, 184, 131, var(--bg-opacity));
|
|
15984
|
-
--border-opacity: 1;
|
|
15985
|
-
border-color: #5DB883;
|
|
15986
|
-
border-color: rgba(93, 184, 131, var(--border-opacity));
|
|
15987
|
-
}
|
|
15988
|
-
|
|
15989
15946
|
@media (min-width: 640px) {
|
|
15990
15947
|
.sm\:psui-container {
|
|
15991
15948
|
width: 100%;
|
|
@@ -21028,6 +20985,11 @@ input:checked + .toggle-bg {
|
|
|
21028
20985
|
height: 100vh;
|
|
21029
20986
|
}
|
|
21030
20987
|
|
|
20988
|
+
.sm\:psui-text-big {
|
|
20989
|
+
font-size: 16px;
|
|
20990
|
+
line-height: 130%;
|
|
20991
|
+
}
|
|
20992
|
+
|
|
21031
20993
|
.sm\:psui-text-small {
|
|
21032
20994
|
font-size: 14px;
|
|
21033
20995
|
line-height: 130%;
|
|
@@ -26411,6 +26373,7 @@ input:checked + .toggle-bg {
|
|
|
26411
26373
|
.sm\:psui-select-all {
|
|
26412
26374
|
-webkit-user-select: all;
|
|
26413
26375
|
-moz-user-select: all;
|
|
26376
|
+
-ms-user-select: all;
|
|
26414
26377
|
user-select: all;
|
|
26415
26378
|
}
|
|
26416
26379
|
|
|
@@ -34692,6 +34655,11 @@ input:checked + .toggle-bg {
|
|
|
34692
34655
|
height: 100vh;
|
|
34693
34656
|
}
|
|
34694
34657
|
|
|
34658
|
+
.md\:psui-text-big {
|
|
34659
|
+
font-size: 16px;
|
|
34660
|
+
line-height: 130%;
|
|
34661
|
+
}
|
|
34662
|
+
|
|
34695
34663
|
.md\:psui-text-small {
|
|
34696
34664
|
font-size: 14px;
|
|
34697
34665
|
line-height: 130%;
|
|
@@ -40075,6 +40043,7 @@ input:checked + .toggle-bg {
|
|
|
40075
40043
|
.md\:psui-select-all {
|
|
40076
40044
|
-webkit-user-select: all;
|
|
40077
40045
|
-moz-user-select: all;
|
|
40046
|
+
-ms-user-select: all;
|
|
40078
40047
|
user-select: all;
|
|
40079
40048
|
}
|
|
40080
40049
|
|
|
@@ -48356,6 +48325,11 @@ input:checked + .toggle-bg {
|
|
|
48356
48325
|
height: 100vh;
|
|
48357
48326
|
}
|
|
48358
48327
|
|
|
48328
|
+
.lg\:psui-text-big {
|
|
48329
|
+
font-size: 16px;
|
|
48330
|
+
line-height: 130%;
|
|
48331
|
+
}
|
|
48332
|
+
|
|
48359
48333
|
.lg\:psui-text-small {
|
|
48360
48334
|
font-size: 14px;
|
|
48361
48335
|
line-height: 130%;
|
|
@@ -53739,6 +53713,7 @@ input:checked + .toggle-bg {
|
|
|
53739
53713
|
.lg\:psui-select-all {
|
|
53740
53714
|
-webkit-user-select: all;
|
|
53741
53715
|
-moz-user-select: all;
|
|
53716
|
+
-ms-user-select: all;
|
|
53742
53717
|
user-select: all;
|
|
53743
53718
|
}
|
|
53744
53719
|
|
|
@@ -62020,6 +61995,11 @@ input:checked + .toggle-bg {
|
|
|
62020
61995
|
height: 100vh;
|
|
62021
61996
|
}
|
|
62022
61997
|
|
|
61998
|
+
.xl\:psui-text-big {
|
|
61999
|
+
font-size: 16px;
|
|
62000
|
+
line-height: 130%;
|
|
62001
|
+
}
|
|
62002
|
+
|
|
62023
62003
|
.xl\:psui-text-small {
|
|
62024
62004
|
font-size: 14px;
|
|
62025
62005
|
line-height: 130%;
|
|
@@ -67403,6 +67383,7 @@ input:checked + .toggle-bg {
|
|
|
67403
67383
|
.xl\:psui-select-all {
|
|
67404
67384
|
-webkit-user-select: all;
|
|
67405
67385
|
-moz-user-select: all;
|
|
67386
|
+
-ms-user-select: all;
|
|
67406
67387
|
user-select: all;
|
|
67407
67388
|
}
|
|
67408
67389
|
|
|
@@ -70640,4 +70621,4 @@ input:checked + .toggle-bg {
|
|
|
70640
70621
|
-webkit-animation: bounce 1s infinite;
|
|
70641
70622
|
animation: bounce 1s infinite;
|
|
70642
70623
|
}
|
|
70643
|
-
}
|
|
70624
|
+
}
|
package/package.json
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@policystudio/policy-studio-ui-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "Policy Studio UI",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Policy Studio Team",
|
|
7
7
|
"url": "https://bitbucket.org/policy-studio/policy-studio-ui-vue",
|
|
8
|
-
"
|
|
9
|
-
"storybook": "start-storybook -p 6006",
|
|
10
|
-
"build-storybook": "build-storybook",
|
|
11
|
-
"build-tailwind": "postcss src/assets/scss/base.scss -o src/assets/scss/tailwind.css && postcss src/assets/scss/base.scss -o dist/css/psui_styles.css",
|
|
12
|
-
"publish": "npm run build-tailwind && npm publish"
|
|
13
|
-
},
|
|
8
|
+
"license": "MIT",
|
|
14
9
|
"keywords": [
|
|
15
10
|
"vue",
|
|
16
11
|
"ui"
|
|
17
12
|
],
|
|
18
|
-
"
|
|
13
|
+
"scripts": {
|
|
14
|
+
"lint": "vue-cli-service lint",
|
|
15
|
+
"storybook": "start-storybook -p 6006",
|
|
16
|
+
"build-storybook": "build-storybook",
|
|
17
|
+
"build-tailwind": "postcss src/assets/scss/base.scss -o dist/css/psui_styles.css",
|
|
18
|
+
"publish": "npm run lint && npm run build-tailwind && npm publish"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"core-js": "^3.6.5",
|
|
22
|
+
"vue": "^2.6.11"
|
|
23
|
+
},
|
|
19
24
|
"devDependencies": {
|
|
20
|
-
"@babel/core": "^7.16.
|
|
21
|
-
"@
|
|
22
|
-
"@storybook/addon-
|
|
23
|
-
"@storybook/addon-
|
|
24
|
-
"@storybook/
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"
|
|
25
|
+
"@babel/core": "^7.16.7",
|
|
26
|
+
"@storybook/addon-actions": "^6.4.13",
|
|
27
|
+
"@storybook/addon-essentials": "^6.4.13",
|
|
28
|
+
"@storybook/addon-links": "^6.4.13",
|
|
29
|
+
"@storybook/vue": "^6.4.13",
|
|
30
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
31
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
32
|
+
"@vue/cli-service": "~4.5.0",
|
|
33
|
+
"@vue/eslint-config-prettier": "^6.0.0",
|
|
34
|
+
"babel-eslint": "^10.1.0",
|
|
28
35
|
"babel-loader": "^8.2.3",
|
|
29
|
-
"eslint": "^
|
|
30
|
-
"eslint-plugin-
|
|
31
|
-
"eslint-plugin-vue": "^
|
|
36
|
+
"eslint": "^6.7.2",
|
|
37
|
+
"eslint-plugin-prettier": "^3.3.1",
|
|
38
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
32
39
|
"postcss": "^8.3.11",
|
|
33
40
|
"postcss-cli": "^9.0.2",
|
|
41
|
+
"prettier": "^2.2.1",
|
|
34
42
|
"tailwindcss": "^1.9.6",
|
|
35
|
-
"vue": "^2.6.14",
|
|
36
43
|
"vue-loader": "^15.9.8",
|
|
37
|
-
"vue-
|
|
38
|
-
"vue-template-compiler": "^2.6.14"
|
|
44
|
+
"vue-template-compiler": "^2.6.11"
|
|
39
45
|
}
|
|
40
46
|
}
|
|
@@ -9,31 +9,4 @@
|
|
|
9
9
|
html {
|
|
10
10
|
-webkit-font-smoothing: antialiased;
|
|
11
11
|
-moz-osx-font-smoothing: grayscale;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.toggle-bg:after {
|
|
15
|
-
content: '';
|
|
16
|
-
@apply psui-absolute psui-bg-white psui-border-gray-40 psui-rounded-full psui-h-5 psui-w-5 psui-transition;
|
|
17
|
-
}
|
|
18
|
-
.toggle-bg:after + .ps-switch-small {
|
|
19
|
-
content: '';
|
|
20
|
-
@apply psui-absolute psui-bg-white psui-border-gray-40 psui-rounded-full psui-h-2 psui-w-2 psui-transition;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
input:checked + .toggle-bg:after + .ps-switch-small {
|
|
24
|
-
transform: translateX(100%);
|
|
25
|
-
position: absolute;
|
|
26
|
-
left: 2px;
|
|
27
|
-
@apply border-white;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
input:checked + .toggle-bg:after {
|
|
31
|
-
transform: translateX(100%);
|
|
32
|
-
position: absolute;
|
|
33
|
-
left: 4px;
|
|
34
|
-
@apply border-white;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
input:checked + .toggle-bg {
|
|
38
|
-
@apply psui-bg-green-20 psui-border-green-20;
|
|
39
|
-
}
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="classes" class='
|
|
2
|
+
<div :class="classes" class='accordion' >
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -33,4 +33,12 @@ export default {
|
|
|
33
33
|
.big {
|
|
34
34
|
width: 580px;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
.accordion {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
border-right:1px solid #e6ecf2;
|
|
41
|
+
border-left:1px solid #e6ecf2;
|
|
42
|
+
border-top:1px solid #e6ecf2;
|
|
43
|
+
}
|
|
36
44
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
|
-
class="psui-font-bold psui-
|
|
3
|
+
class="psui-font-bold psui-items-center psui-flex psui-rounded-md"
|
|
4
4
|
:class="classes"
|
|
5
5
|
@click="onClick()"
|
|
6
6
|
>
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
>
|
|
11
11
|
{{ icon }}
|
|
12
12
|
</i>
|
|
13
|
-
<
|
|
13
|
+
<span
|
|
14
14
|
v-if="label"
|
|
15
15
|
class="psui-flex-grow psui-text-left"
|
|
16
16
|
>{{ label }}
|
|
17
|
-
</
|
|
17
|
+
</span>
|
|
18
18
|
<i
|
|
19
19
|
v-if="iconRight"
|
|
20
20
|
:class="['psui-ml-2', iconClasses]"
|
|
@@ -72,31 +72,34 @@ export default {
|
|
|
72
72
|
},
|
|
73
73
|
computed: {
|
|
74
74
|
iconClasses() {
|
|
75
|
-
const size = this.
|
|
75
|
+
const size = this.size === 'small' ? 'psui-text-small' : this.size === 'medium' ? 'psui-text-small' : 'psui-text-big'
|
|
76
76
|
const color = this.iconColor.length > 0 ? `psui-text-${this.iconColor}` : ''
|
|
77
77
|
return `psui-my-auto material-icons ${size} ${color}`
|
|
78
78
|
},
|
|
79
79
|
classes() {
|
|
80
|
-
let sizeCss = '
|
|
81
|
-
|
|
82
|
-
if (this.size === '
|
|
83
|
-
if (this.
|
|
84
|
-
if (this.
|
|
80
|
+
let sizeCss = ''
|
|
81
|
+
|
|
82
|
+
if (this.size === 'medium') sizeCss = 'medium'
|
|
83
|
+
if (this.size === 'small') sizeCss = 'small'
|
|
84
|
+
if (this.size === 'big') sizeCss = 'big'
|
|
85
|
+
|
|
86
|
+
if (this.outline) return `${sizeCss} psui-bg-white psui-border ${this.disabled ? 'psui-border-gray-40 psui-text-gray-40 psui-cursor-default' : 'psui-border-blue-60 psui-text-blue-60'}`
|
|
87
|
+
if (this.ghost) return `${sizeCss} ${this.disabled ? 'psui-bg-gray-20 psui-text-gray-40 psui-cursor-default' : 'psui-bg-blue-20 psui-text-blue-60 active:psui-shadow-inner'}`
|
|
85
88
|
if (this.textOnly) {
|
|
86
89
|
const hasTextColor = this.textColor.length > 0
|
|
87
90
|
const color = hasTextColor ? this.textColor.split('hover:')[0] : ''
|
|
88
91
|
const hover = hasTextColor ? this.textColor.split('hover:')[1] : ''
|
|
89
92
|
|
|
90
93
|
let textCss = 'psui-text-blue-50 hover:psui-text-blue-60'
|
|
91
|
-
if (this.disabled) textCss = 'psui-text-gray-40'
|
|
94
|
+
if (this.disabled) textCss = 'psui-text-gray-40 psui-cursor-default'
|
|
92
95
|
|
|
93
96
|
if (hasTextColor) textCss = `psui-text-${color}`
|
|
94
97
|
if (hover) textCss += `hover:psui-text-${hover}`
|
|
95
98
|
|
|
96
99
|
return `${sizeCss} ${textCss}`
|
|
97
100
|
}
|
|
98
|
-
if (this.disabled) return `${sizeCss} psui-bg-gray-20 psui-text-gray-40`
|
|
99
|
-
return `${sizeCss} psui-bg-blue-60 hover:psui-bg-blue-50 psui-text-white active:psui-shadow-inner`
|
|
101
|
+
if (this.disabled) return `${sizeCss} psui-bg-gray-20 psui-text-gray-40 psui-cursor-default`
|
|
102
|
+
return `${sizeCss} psui-bg-blue-60 hover:psui-bg-blue-50 psui-text-white active:psui-shadow-inner psui-cursor-pointer`
|
|
100
103
|
}
|
|
101
104
|
},
|
|
102
105
|
methods: {
|
|
@@ -107,3 +110,20 @@ export default {
|
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
</script>
|
|
113
|
+
|
|
114
|
+
<style scoped>
|
|
115
|
+
.small {
|
|
116
|
+
padding: 4px 8px 4px 8px;
|
|
117
|
+
font-size: 14px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.medium{
|
|
121
|
+
padding: 7px 16px 7px 16px;
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.big{
|
|
126
|
+
padding: 9.5px 16px 9.5px 16px;
|
|
127
|
+
font-size: 16px;
|
|
128
|
+
}
|
|
129
|
+
</style>
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<label
|
|
3
3
|
@click="onClick"
|
|
4
|
-
|
|
5
4
|
:for="title"
|
|
6
|
-
|
|
7
5
|
:class="cssClass"
|
|
8
|
-
|
|
9
6
|
class="
|
|
10
7
|
psui-flex
|
|
11
|
-
psui-items-center
|
|
12
8
|
psui-gap-2
|
|
13
|
-
psui-justify-center
|
|
14
9
|
psui-bg-gray-10
|
|
15
|
-
psui-text-gray-
|
|
16
|
-
psui-rounded-md
|
|
17
|
-
psui-py-1
|
|
10
|
+
psui-text-gray-50
|
|
18
11
|
psui-px-2
|
|
19
|
-
psui-
|
|
12
|
+
psui-py-1
|
|
13
|
+
psui-rounded-md
|
|
14
|
+
psui-items-center
|
|
20
15
|
"
|
|
21
16
|
>
|
|
22
|
-
<input
|
|
17
|
+
<input
|
|
18
|
+
@change="onChange"
|
|
19
|
+
v-if="type !== 'text'"
|
|
20
|
+
:type="type"
|
|
21
|
+
:id="title"
|
|
22
|
+
:checked="checked"
|
|
23
|
+
/>
|
|
23
24
|
<i v-if="icon" class="material-icons">{{ icon }}</i>
|
|
24
25
|
{{ title }}
|
|
25
26
|
<button @click="onClose" v-if="rich" class="psui-flex psui-items-center">
|
|
@@ -47,53 +48,62 @@ export default {
|
|
|
47
48
|
default: "",
|
|
48
49
|
},
|
|
49
50
|
rich: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
checked: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
},
|
|
53
57
|
},
|
|
54
58
|
emits: ["click", "change"],
|
|
55
59
|
data() {
|
|
56
60
|
return {
|
|
57
61
|
isChecked: false,
|
|
62
|
+
value: null,
|
|
58
63
|
}
|
|
59
64
|
},
|
|
60
65
|
computed: {
|
|
61
66
|
cssClass() {
|
|
67
|
+
let cssClass = ''
|
|
68
|
+
|
|
62
69
|
if (this.isChecked === true && this.type === "radio") {
|
|
63
|
-
|
|
70
|
+
cssClass = "psui-text-blue-50 psui-bg-blue-20"
|
|
64
71
|
}
|
|
65
72
|
|
|
66
73
|
if (this.isChecked === true && this.type === "checkbox") {
|
|
67
|
-
|
|
74
|
+
cssClass = "psui-text-blue-50 psui-bg-blue-20"
|
|
68
75
|
}
|
|
69
76
|
|
|
70
|
-
if (this.isChecked === true){
|
|
71
|
-
|
|
77
|
+
if (this.isChecked === true) {
|
|
78
|
+
cssClass = "psui-text-blue-50 psui-bg-blue-20"
|
|
72
79
|
}
|
|
73
|
-
|
|
80
|
+
|
|
81
|
+
return cssClass
|
|
74
82
|
},
|
|
75
83
|
},
|
|
76
84
|
methods: {
|
|
77
85
|
onClick() {
|
|
78
86
|
if (this.disabled) return false
|
|
87
|
+
|
|
79
88
|
if (this.type !== "checkbox" || this.type !== "radio") {
|
|
80
89
|
this.isChecked = !this.isChecked
|
|
81
90
|
}
|
|
91
|
+
|
|
82
92
|
this.$emit("click")
|
|
83
93
|
},
|
|
84
94
|
onChange(event) {
|
|
85
95
|
this.isChecked = event.target.checked
|
|
86
|
-
this
|
|
96
|
+
this.checked = event.target.checked
|
|
97
|
+
this.$emit("change", event.target.checked)
|
|
87
98
|
},
|
|
88
|
-
onClose(){
|
|
99
|
+
onClose() {
|
|
89
100
|
this.$emit("close")
|
|
90
|
-
}
|
|
91
|
-
}
|
|
101
|
+
},
|
|
102
|
+
},
|
|
92
103
|
}
|
|
93
104
|
</script>
|
|
94
105
|
|
|
95
106
|
<style scoped>
|
|
96
|
-
|
|
97
107
|
input[type="radio"] {
|
|
98
108
|
-webkit-appearance: none;
|
|
99
109
|
-moz-appearance: none;
|
|
@@ -103,7 +113,8 @@ input[type="radio"] {
|
|
|
103
113
|
width: 16px;
|
|
104
114
|
height: 16px;
|
|
105
115
|
border-radius: 50%;
|
|
106
|
-
border: 1px solid #
|
|
116
|
+
border: 1px solid #d6dde5;
|
|
117
|
+
cursor: pointer;
|
|
107
118
|
}
|
|
108
119
|
|
|
109
120
|
input[type="checkbox"] {
|
|
@@ -115,7 +126,8 @@ input[type="checkbox"] {
|
|
|
115
126
|
width: 16px;
|
|
116
127
|
height: 16px;
|
|
117
128
|
border-radius: 25%;
|
|
118
|
-
border: 1px solid #
|
|
129
|
+
border: 1px solid #d6dde5;
|
|
130
|
+
cursor: pointer;
|
|
119
131
|
}
|
|
120
132
|
|
|
121
133
|
input[type="radio"]:hover,
|
|
@@ -125,16 +137,19 @@ input[type="checkbox"]:hover {
|
|
|
125
137
|
|
|
126
138
|
input[type="radio"]:checked {
|
|
127
139
|
border-color: #64b5ce;
|
|
128
|
-
background: url(
|
|
140
|
+
background: url("../../assets/images/radio-checked-button.svg") #ffffff
|
|
141
|
+
no-repeat center;
|
|
129
142
|
}
|
|
130
143
|
|
|
131
144
|
input[type="checkbox"]:checked {
|
|
132
145
|
border-color: #64b5ce;
|
|
133
|
-
background: url(
|
|
146
|
+
background: url("../../assets/images/check-checkbox-button.svg") #64b5ce
|
|
147
|
+
no-repeat center;
|
|
134
148
|
}
|
|
135
149
|
|
|
136
150
|
label {
|
|
137
|
-
|
|
151
|
+
width: fit-content;
|
|
152
|
+
cursor: pointer;
|
|
138
153
|
}
|
|
139
154
|
|
|
140
155
|
label:hover {
|
|
@@ -142,5 +157,8 @@ label:hover {
|
|
|
142
157
|
background: #ffffff;
|
|
143
158
|
}
|
|
144
159
|
|
|
160
|
+
button {
|
|
161
|
+
outline: none;
|
|
162
|
+
}
|
|
145
163
|
</style>
|
|
146
164
|
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<div class="psui-bg-gray-20 psui-rounded-lg psui-mb-4">
|
|
5
|
+
<div class="psui-flex psui-justify-between psui-items-center psui-p-2">
|
|
6
|
+
<h2 class="psui-text-gray-80 psui-font-bold psui-leading-4">Cost Effectiveness</h2>
|
|
7
|
+
<i class="material-icons-round psui-text-gray-40" >drag_indicator</i>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div>
|
|
11
|
+
<div class="psui-flex psui-flex-col psui-bg-gray-20 psui-rounded-lg psui-mb-4">
|
|
12
|
+
<div class="psui-flex psui-justify-between psui-items-center psui-p-2">
|
|
13
|
+
<h2 class="psui-text-gray-80 psui-font-bold psui-leading-4">Per Home Results</h2>
|
|
14
|
+
<i class="material-icons-round psui-text-gray-40">drag_indicator</i>
|
|
15
|
+
</div>
|
|
16
|
+
<slot>
|
|
17
|
+
</slot>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
3
22
|
</template>
|
|
4
23
|
|
|
5
24
|
<script>
|
|
6
25
|
export default {
|
|
7
|
-
|
|
26
|
+
name: 'PsDraggable',
|
|
27
|
+
props:{
|
|
28
|
+
data: {
|
|
29
|
+
type: Array,
|
|
30
|
+
required: true,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
8
33
|
}
|
|
9
34
|
</script>
|
|
10
35
|
|