@policystudio/policy-studio-ui-vue 1.1.90-access.2 → 1.1.90-access.4
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/dist/css/psui_styles_output.css +220 -179
- package/package.json +4 -2
- package/src/assets/scss/components/PsAccordion.scss +0 -12
- package/src/assets/scss/components/PsCardInfos.scss +1 -1
- package/src/assets/scss/components/PsCheckbox.scss +11 -1
- package/src/assets/scss/components/PsChips.scss +71 -30
- package/src/assets/scss/components/PsCollapse.scss +9 -0
- package/src/assets/scss/components/PsDropdown.scss +11 -10
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsToast.scss +10 -0
- package/src/components/accordion/PsAccordionItem.vue +65 -9
- package/src/components/badges-and-tags/PsCardInfos.vue +26 -2
- package/src/components/chips/PsChips.vue +22 -2
- package/src/components/collapse/PsCollapse.vue +1 -0
- package/src/components/controls/PsCheckbox.vue +1 -0
- package/src/components/controls/PsRadioButton.vue +1 -0
- package/src/components/controls/PsRadioButtonSimple.vue +1 -0
- package/src/components/forms/PsDropdown.vue +92 -176
- package/src/components/notifications/PsDialog.vue +11 -1
- package/src/components/notifications/PsToast.vue +1 -0
|
@@ -3,10 +3,70 @@
|
|
|
3
3
|
.psui-el-chips {
|
|
4
4
|
@apply psui-inline-flex psui-relative;
|
|
5
5
|
|
|
6
|
+
&:focus {
|
|
7
|
+
outline: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:focus-visible {
|
|
11
|
+
outline: 2px solid #2563EB;
|
|
12
|
+
outline-offset: 2px;
|
|
13
|
+
border-radius: 6px;
|
|
14
|
+
}
|
|
15
|
+
|
|
6
16
|
&-icon {
|
|
7
17
|
@apply psui-icon;
|
|
8
18
|
}
|
|
9
19
|
|
|
20
|
+
.psui-el-chips-text {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
position: relative;
|
|
26
|
+
|
|
27
|
+
&::after {
|
|
28
|
+
content: attr(data-text);
|
|
29
|
+
@apply psui-font-bold psui-h-0 psui-invisible psui-overflow-hidden psui-select-none psui-pointer-events-none psui-whitespace-nowrap;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
label {
|
|
34
|
+
@apply psui-flex psui-bg-white psui-items-center psui-justify-center psui-text-gray-60 psui-transition-colors psui-cursor-pointer psui-rounded psui-py-1 psui-px-3 psui-text-small psui-border psui-border-gray-40;
|
|
35
|
+
padding: 5px 8px 5px 8px;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
@apply psui-bg-blue-10;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:focus,
|
|
42
|
+
&:active {
|
|
43
|
+
@apply psui-text-blue-70 psui-bg-blue-10 psui-border-blue-60 psui-font-bold;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.checked {
|
|
47
|
+
@apply psui-text-blue-70 psui-bg-blue-10 psui-border-blue-60;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.icon-position-right {
|
|
51
|
+
@apply psui-flex-row-reverse;
|
|
52
|
+
padding: 5px 6px 5px 8px;
|
|
53
|
+
|
|
54
|
+
.psui-el-chips-icon {
|
|
55
|
+
@apply psui-ml-1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.psui-el-chips-icon {
|
|
62
|
+
@apply psui-icon;
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
|
|
65
|
+
&.is-rotated {
|
|
66
|
+
transform: rotate(180deg);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
10
70
|
&.type-checkbox,
|
|
11
71
|
&.type-radio {
|
|
12
72
|
font-size: 14px;
|
|
@@ -18,8 +78,6 @@
|
|
|
18
78
|
|
|
19
79
|
&:checked {
|
|
20
80
|
+ label {
|
|
21
|
-
@apply psui-text-blue-60 psui-bg-blue-20;
|
|
22
|
-
|
|
23
81
|
&.layout-disabled {
|
|
24
82
|
@apply psui-bg-gray-20 psui-text-gray-40 psui-cursor-default;
|
|
25
83
|
|
|
@@ -29,29 +87,28 @@
|
|
|
29
87
|
}
|
|
30
88
|
|
|
31
89
|
&:before {
|
|
32
|
-
@apply psui-text-blue-
|
|
90
|
+
@apply psui-text-blue-60;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:hover {
|
|
94
|
+
@apply psui-text-gray-60;
|
|
33
95
|
}
|
|
34
96
|
}
|
|
35
97
|
}
|
|
36
98
|
}
|
|
37
99
|
|
|
38
100
|
label {
|
|
39
|
-
@apply psui-flex psui-items-center psui-justify-center psui-text-gray-50 psui-bg-gray-10 psui-transition-all psui-cursor-pointer psui-rounded;
|
|
40
|
-
padding: 4px 8px 4px 6px;
|
|
41
101
|
|
|
42
102
|
&:before {
|
|
43
|
-
@apply psui-inline-block psui-text-gray-
|
|
103
|
+
@apply psui-inline-block psui-mr-1 psui-text-gray-50 psui-cursor-pointer psui-transition-all;
|
|
44
104
|
content: '';
|
|
45
105
|
font-family: 'Material Icons Round';
|
|
46
106
|
font-size: 18px;
|
|
47
|
-
margin-right: 6px;
|
|
48
107
|
}
|
|
49
108
|
|
|
50
109
|
&:hover {
|
|
51
|
-
@apply psui-
|
|
52
|
-
|
|
53
|
-
@apply psui-text-blue-50;
|
|
54
|
-
}
|
|
110
|
+
@apply psui-bg-blue-10;
|
|
111
|
+
|
|
55
112
|
}
|
|
56
113
|
}
|
|
57
114
|
}
|
|
@@ -90,22 +147,6 @@
|
|
|
90
147
|
}
|
|
91
148
|
|
|
92
149
|
&.type-button {
|
|
93
|
-
label {
|
|
94
|
-
@apply psui-flex psui-items-center psui-justify-center psui-text-gray-60 psui-transition-all psui-cursor-pointer psui-rounded psui-py-1 psui-px-3 psui-text-small;
|
|
95
|
-
background-color: #F6F7F8;
|
|
96
|
-
&:hover {
|
|
97
|
-
@apply psui-text-blue-60 psui-bg-white;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&:focus,
|
|
101
|
-
&:active {
|
|
102
|
-
@apply psui-text-blue-60 psui-bg-blue-20;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&.checked {
|
|
106
|
-
@apply psui-text-blue-60 psui-bg-blue-20;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
150
|
|
|
110
151
|
&.layout-with-icon {
|
|
111
152
|
label {
|
|
@@ -155,15 +196,15 @@
|
|
|
155
196
|
}
|
|
156
197
|
|
|
157
198
|
.psui-el-chips-icon {
|
|
158
|
-
font-size:
|
|
199
|
+
font-size: 16px;
|
|
159
200
|
|
|
160
201
|
&-prepend {
|
|
161
|
-
@apply psui-bg-gray-30 psui-rounded-full psui-text-white psui-
|
|
202
|
+
@apply psui-bg-gray-30 psui-rounded-full psui-text-white psui-w-6 psui-h-6 psui-flex psui-items-center psui-justify-center;
|
|
162
203
|
}
|
|
163
204
|
}
|
|
164
205
|
|
|
165
206
|
.psui-el-chips-close {
|
|
166
|
-
@apply psui-text-gray-40 psui-flex psui-items-center psui-justify-center
|
|
207
|
+
@apply psui-text-gray-40 psui-flex psui-items-center psui-justify-center;
|
|
167
208
|
}
|
|
168
209
|
}
|
|
169
210
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
|
|
3
3
|
.psui-el-collapse {
|
|
4
|
+
&:focus {
|
|
5
|
+
outline: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&:focus-visible {
|
|
9
|
+
outline: 2px solid #2563EB;
|
|
10
|
+
outline-offset: 2px;
|
|
11
|
+
border-radius: 6px;
|
|
12
|
+
}
|
|
4
13
|
|
|
5
14
|
.psui-el-collapse-item-content {
|
|
6
15
|
@apply psui-relative psui-pl-4;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.psui-el-dropdown-menu {
|
|
3
3
|
@apply psui-relative psui-inline-block psui-text-left;
|
|
4
|
+
|
|
5
|
+
&:focus {
|
|
6
|
+
outline: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&:focus-visible {
|
|
10
|
+
outline: 2px solid #2563EB;
|
|
11
|
+
outline-offset: 2px;
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
}
|
|
4
14
|
|
|
5
15
|
button {
|
|
6
16
|
@apply psui-inline-flex psui-justify-center psui-items-center psui-w-full psui-font-medium psui-leading-none;
|
|
@@ -10,19 +20,10 @@
|
|
|
10
20
|
min-height: 27px;
|
|
11
21
|
font-size: 0.875rem;
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
&:focus {
|
|
15
|
-
outline: none;
|
|
16
|
-
box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
|
|
17
|
-
}
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
&-dialog-wrapper {
|
|
21
|
-
@apply psui-
|
|
22
|
-
|
|
23
|
-
&-dialog {
|
|
24
|
-
@apply psui-w-full;
|
|
25
|
-
}
|
|
26
|
+
@apply psui-z-50 psui-overflow-auto psui-h-auto;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.psui-el-dropdown-menu-list {
|
|
3
|
-
@apply psui-w-full psui-flex psui-flex-col psui-font-medium psui-my-4;
|
|
3
|
+
@apply psui-w-full psui-flex psui-flex-col psui-font-medium psui-my-4 psui-space-y-1;
|
|
4
4
|
|
|
5
5
|
.psui-el-dropdown-menu-list-item {
|
|
6
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;
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
.psui-el-toast {
|
|
3
3
|
@apply psui-flex psui-items-center psui-text-big psui-text-white psui-py-3 psui-px-4 psui-rounded-md psui-font-bold psui-shadow-elevation-20;
|
|
4
4
|
|
|
5
|
+
&:focus {
|
|
6
|
+
outline: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&:focus-visible {
|
|
10
|
+
outline: 2px solid #2563EB;
|
|
11
|
+
outline-offset: 2px;
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
.psui-el-toast-icon {
|
|
6
16
|
@apply psui-flex psui-mr-4;
|
|
7
17
|
font-size: 24px;
|
|
@@ -31,10 +31,12 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
<transition
|
|
33
33
|
name="accordion-fade"
|
|
34
|
-
|
|
35
|
-
@
|
|
36
|
-
@
|
|
37
|
-
@after-
|
|
34
|
+
:css="false"
|
|
35
|
+
@before-enter="beforeEnter"
|
|
36
|
+
@enter="enter"
|
|
37
|
+
@after-enter="afterEnter"
|
|
38
|
+
@before-leave="beforeLeave"
|
|
39
|
+
@leave="leave"
|
|
38
40
|
>
|
|
39
41
|
<div
|
|
40
42
|
v-if="isOpen"
|
|
@@ -129,13 +131,67 @@ const toggle = () => {
|
|
|
129
131
|
localOpened.value = !localOpened.value
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
|
-
|
|
134
|
+
|
|
135
|
+
const beforeEnter = (el) => {
|
|
136
|
+
el.style.height = '0'
|
|
137
|
+
el.style.opacity = '0'
|
|
138
|
+
el.style.overflow = 'hidden'
|
|
139
|
+
el.style.paddingTop = '0'
|
|
140
|
+
el.style.paddingBottom = '0'
|
|
141
|
+
el.style.marginTop = '0'
|
|
142
|
+
el.style.marginBottom = '0'
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const enter = (el, done) => {
|
|
146
|
+
void el.offsetHeight
|
|
147
|
+
|
|
148
|
+
el.style.transition = 'all 0.3s ease-in-out'
|
|
133
149
|
el.style.height = el.scrollHeight + 'px'
|
|
134
|
-
el.style.
|
|
150
|
+
el.style.opacity = '1'
|
|
151
|
+
|
|
152
|
+
el.style.removeProperty('padding-top')
|
|
153
|
+
el.style.removeProperty('padding-bottom')
|
|
154
|
+
el.style.removeProperty('margin-top')
|
|
155
|
+
el.style.removeProperty('margin-bottom')
|
|
156
|
+
|
|
157
|
+
el.addEventListener('transitionend', done, { once: true })
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const afterEnter = (el) => {
|
|
161
|
+
el.style.height = 'auto'
|
|
162
|
+
el.style.overflow = 'visible'
|
|
163
|
+
el.style.transition = ''
|
|
135
164
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
el
|
|
165
|
+
|
|
166
|
+
const beforeLeave = (el) => {
|
|
167
|
+
if (!el) return
|
|
168
|
+
|
|
169
|
+
el.style.height = el.scrollHeight + 'px'
|
|
170
|
+
el.style.overflow = 'hidden'
|
|
171
|
+
|
|
172
|
+
const style = window.getComputedStyle(el)
|
|
173
|
+
el.style.paddingTop = style.paddingTop
|
|
174
|
+
el.style.paddingBottom = style.paddingBottom
|
|
175
|
+
el.style.marginTop = style.marginTop
|
|
176
|
+
el.style.marginBottom = style.marginBottom
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const leave = (el, done) => {
|
|
180
|
+
if (!el) return
|
|
181
|
+
|
|
182
|
+
void el.offsetHeight
|
|
183
|
+
el.style.transition = 'all 0.3s ease-in-out'
|
|
184
|
+
|
|
185
|
+
requestAnimationFrame(() => {
|
|
186
|
+
el.style.height = '0'
|
|
187
|
+
el.style.opacity = '0'
|
|
188
|
+
el.style.paddingTop = '0'
|
|
189
|
+
el.style.paddingBottom = '0'
|
|
190
|
+
el.style.marginTop = '0'
|
|
191
|
+
el.style.marginBottom = '0'
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
el.addEventListener('transitionend', done, { once: true })
|
|
139
195
|
}
|
|
140
196
|
</script>
|
|
141
197
|
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
@click="onClick()"
|
|
5
5
|
>
|
|
6
6
|
<h5 class="psui-el-card-infos-title">
|
|
7
|
-
<span class="
|
|
7
|
+
<span :class="[titleClass, 'psui-mr-1']">{{ title }}</span>
|
|
8
|
+
<slot name="subtitle">
|
|
9
|
+
<span :class="subtitleClass">{{ subtitle }}</span>
|
|
10
|
+
</slot>
|
|
8
11
|
</h5>
|
|
9
12
|
<div class="psui-el-card-infos-content">
|
|
10
13
|
<span class="psui-el-card-infos-icon material-icons-round">{{ icon }}</span>
|
|
11
|
-
<h5 class="
|
|
14
|
+
<h5 :class="totalClass">
|
|
12
15
|
{{ total }}
|
|
13
16
|
</h5>
|
|
14
17
|
</div>
|
|
@@ -45,6 +48,27 @@ defineProps({
|
|
|
45
48
|
type: String,
|
|
46
49
|
default: '',
|
|
47
50
|
},
|
|
51
|
+
/**
|
|
52
|
+
* It sets the class for the title text (color, font-weight, font-size, etc.).
|
|
53
|
+
*/
|
|
54
|
+
titleClass: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: 'psui-text-gray-60 psui-font-bold',
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* It sets the class for the subtitle text (color, font-weight, font-size, etc.).
|
|
60
|
+
*/
|
|
61
|
+
subtitleClass: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'psui-text-gray-40 psui-font-bold',
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* It sets the class for the total text (color, font-weight, font-size, etc.).
|
|
67
|
+
*/
|
|
68
|
+
totalClass: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'psui-text-gray-80',
|
|
71
|
+
},
|
|
48
72
|
})
|
|
49
73
|
|
|
50
74
|
const onClick = () => {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
@mouseover="isHovering = true"
|
|
12
12
|
@mouseleave="isHovering = false"
|
|
13
13
|
@click="emit('click')"
|
|
14
|
+
tabindex="0"
|
|
14
15
|
>
|
|
15
16
|
<input
|
|
16
17
|
@change="onChange"
|
|
@@ -23,13 +24,23 @@
|
|
|
23
24
|
<label
|
|
24
25
|
:disabled="disabled"
|
|
25
26
|
:for="getInputId"
|
|
26
|
-
:class="
|
|
27
|
+
:class="[
|
|
28
|
+
{'checked': checked && type === 'button', 'layout-disabled': layout === 'disabled'},
|
|
29
|
+
`icon-position-${iconPosition}`
|
|
30
|
+
]"
|
|
27
31
|
>
|
|
28
32
|
<i
|
|
29
33
|
v-if="icon"
|
|
30
34
|
class="psui-el-chips-icon psui-el-chips-icon-prepend"
|
|
35
|
+
:class="{ 'is-rotated': rotableIcon }"
|
|
31
36
|
>{{ icon }}</i>
|
|
32
|
-
|
|
37
|
+
<span
|
|
38
|
+
class="psui-el-chips-text"
|
|
39
|
+
:data-text="label"
|
|
40
|
+
>
|
|
41
|
+
{{ label }}
|
|
42
|
+
</span>
|
|
43
|
+
|
|
33
44
|
<button
|
|
34
45
|
@click="onClose"
|
|
35
46
|
v-if="layout === 'rich'"
|
|
@@ -82,6 +93,15 @@ const props = defineProps({
|
|
|
82
93
|
/**
|
|
83
94
|
* It sets if the button was checked or not checked.
|
|
84
95
|
*/
|
|
96
|
+
iconPosition: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: 'left',
|
|
99
|
+
validator: (value) => ['left', 'right'].includes(value)
|
|
100
|
+
},
|
|
101
|
+
rotableIcon:{
|
|
102
|
+
type: Boolean,
|
|
103
|
+
defaul: false
|
|
104
|
+
},
|
|
85
105
|
checked: {
|
|
86
106
|
type: Boolean,
|
|
87
107
|
default: false,
|