@policystudio/policy-studio-ui-vue 1.1.90-beta.25 → 1.1.90-beta.27
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 +14 -4
- package/dist/util/GeneralFunctions.js +6 -3
- package/dist/util/GeneralFunctions.js.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/PsAccordionItem.vue +16 -6
- package/src/components/forms/PsDropdown.vue +1 -1
- package/src/util/GeneralFunctions.js +10 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import url('https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Round');
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
! tailwindcss v3.4.
|
|
4
|
+
! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -213,6 +213,8 @@ textarea {
|
|
|
213
213
|
/* 1 */
|
|
214
214
|
line-height: inherit;
|
|
215
215
|
/* 1 */
|
|
216
|
+
letter-spacing: inherit;
|
|
217
|
+
/* 1 */
|
|
216
218
|
color: inherit;
|
|
217
219
|
/* 1 */
|
|
218
220
|
margin: 0;
|
|
@@ -236,9 +238,9 @@ select {
|
|
|
236
238
|
*/
|
|
237
239
|
|
|
238
240
|
button,
|
|
239
|
-
[type='button'],
|
|
240
|
-
[type='reset'],
|
|
241
|
-
[type='submit'] {
|
|
241
|
+
input:where([type='button']),
|
|
242
|
+
input:where([type='reset']),
|
|
243
|
+
input:where([type='submit']) {
|
|
242
244
|
-webkit-appearance: button;
|
|
243
245
|
/* 1 */
|
|
244
246
|
background-color: transparent;
|
|
@@ -494,6 +496,10 @@ video {
|
|
|
494
496
|
--tw-backdrop-opacity: ;
|
|
495
497
|
--tw-backdrop-saturate: ;
|
|
496
498
|
--tw-backdrop-sepia: ;
|
|
499
|
+
--tw-contain-size: ;
|
|
500
|
+
--tw-contain-layout: ;
|
|
501
|
+
--tw-contain-paint: ;
|
|
502
|
+
--tw-contain-style: ;
|
|
497
503
|
}
|
|
498
504
|
|
|
499
505
|
::backdrop{
|
|
@@ -544,6 +550,10 @@ video {
|
|
|
544
550
|
--tw-backdrop-opacity: ;
|
|
545
551
|
--tw-backdrop-saturate: ;
|
|
546
552
|
--tw-backdrop-sepia: ;
|
|
553
|
+
--tw-contain-size: ;
|
|
554
|
+
--tw-contain-layout: ;
|
|
555
|
+
--tw-contain-paint: ;
|
|
556
|
+
--tw-contain-style: ;
|
|
547
557
|
}
|
|
548
558
|
|
|
549
559
|
.psui-el-chips{
|
|
@@ -19,14 +19,17 @@ export const getParentScrollableEl = (node) => {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
export const getParentVueComponentByName = (comp, name) => {
|
|
22
|
-
if (!comp)
|
|
22
|
+
if (!comp)
|
|
23
23
|
return null;
|
|
24
|
+
if (comp?.appContext?.components[name]) {
|
|
25
|
+
return comp.appContext.components[name];
|
|
24
26
|
}
|
|
25
|
-
if (comp.$options.name === name) {
|
|
27
|
+
if (comp.$options && comp.$options.name === name) {
|
|
26
28
|
return comp;
|
|
27
29
|
}
|
|
28
|
-
|
|
30
|
+
if (comp.$parent) {
|
|
29
31
|
return getParentVueComponentByName(comp.$parent, name);
|
|
30
32
|
}
|
|
33
|
+
return null;
|
|
31
34
|
};
|
|
32
35
|
//# sourceMappingURL=GeneralFunctions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneralFunctions.js","sourceRoot":"","sources":["../../src/util/GeneralFunctions.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,EAAE;IACrC,IAAI,MAAM,GAAG,EAAE,CAAA;IACf,MAAM,UAAU,GACd,gEAAgE,CAAA;IAClE,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAA;IAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAA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AAE;QAChB,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE;QACzC,OAAO,IAAI,CAAA;KACZ;SAAM;QACL,OAAO,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;KAC9C;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IACxD,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,IAAI,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;KACxC;IAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,EAAE;QAChD,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,IAAI,CAAC,OAAO,EAAE;QAChB,OAAO,2BAA2B,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;KACvD;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -95,15 +95,25 @@ const isOpen = computed(() => {
|
|
|
95
95
|
|
|
96
96
|
const getParent = computed(() => {
|
|
97
97
|
const instance = getCurrentInstance()
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
|
|
99
|
+
if (instance?.parent) {
|
|
100
|
+
return getParentVueComponentByName(instance.parent, 'PsAccordion')
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (instance.proxy && instance.proxy.$parent) {
|
|
104
|
+
return getParentVueComponentByName(instance.proxy.$parent, 'PsAccordion')
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return null
|
|
100
108
|
})
|
|
101
109
|
|
|
102
110
|
const getIcon = computed(() => {
|
|
103
|
-
if(!getParent.value) return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (
|
|
111
|
+
if (!getParent.value) return
|
|
112
|
+
|
|
113
|
+
const layout = getParent.value._props ? getParent.value._props.layout : getParent?.value?.props.layout.default
|
|
114
|
+
if (layout === 'medium') return 'expand_more'
|
|
115
|
+
if (layout === 'big' && isOpen.value === false) return 'add'
|
|
116
|
+
if (layout === 'big' && isOpen.value === true) return 'remove'
|
|
107
117
|
return `${props.icon}`
|
|
108
118
|
})
|
|
109
119
|
|
|
@@ -184,7 +184,7 @@ const updatePosition = () => {
|
|
|
184
184
|
PSDropdownDialog.value.style.minWidth = `${rectTrigger.width}px`
|
|
185
185
|
|
|
186
186
|
if (rectTrigger.x + rectDialog.width + 20 > windowWidth) {
|
|
187
|
-
PSDropdownDialog.value.style.left = `${windowWidth - rectDialog.width
|
|
187
|
+
PSDropdownDialog.value.style.left = `${windowWidth - rectDialog.width - 30}px`
|
|
188
188
|
} else {
|
|
189
189
|
PSDropdownDialog.value.style.left = `${rectTrigger.x}px`
|
|
190
190
|
}
|
|
@@ -21,13 +21,19 @@ export const getParentScrollableEl = (node) => {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export const getParentVueComponentByName = (comp, name) => {
|
|
24
|
-
if (!comp)
|
|
25
|
-
|
|
24
|
+
if (!comp) return null
|
|
25
|
+
|
|
26
|
+
if (comp?.appContext?.components[name]) {
|
|
27
|
+
return comp.appContext.components[name]
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
if (comp.$options.name === name) {
|
|
30
|
+
if (comp.$options && comp.$options.name === name) {
|
|
29
31
|
return comp
|
|
30
|
-
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (comp.$parent) {
|
|
31
35
|
return getParentVueComponentByName(comp.$parent, name)
|
|
32
36
|
}
|
|
37
|
+
|
|
38
|
+
return null
|
|
33
39
|
}
|