@policystudio/policy-studio-ui-vue 1.1.90-beta.26 → 1.1.90-beta.28

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.
@@ -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.1 | MIT License | https://tailwindcss.com
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
- else {
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,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAA;KAC1E;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,EAAE;IAC5C,IAAI,IAAI,IAAI,IAAI,EAAE;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,EAAE;QACT,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,IAAI,CAAC,QAAQ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C,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.90-beta.26",
3
+ "version": "1.1.90-beta.28",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -95,15 +95,25 @@ const isOpen = computed(() => {
95
95
 
96
96
  const getParent = computed(() => {
97
97
  const instance = getCurrentInstance()
98
- let parent = instance.proxy.$parent
99
- return getParentVueComponentByName(parent, 'PsAccordion')
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
- if (getParent.value._props.layout === 'medium') return 'expand_more'
105
- if (getParent.value._props.layout === 'big' && isOpen.value === false) return 'add'
106
- if (getParent.value._props.layout === 'big' && isOpen.value === true) return 'remove'
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
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <button
3
- @click="onClick()"
3
+ @click="onClick($event)"
4
4
  @mouseenter="onMouseEnter"
5
5
  @mouseleave="onMouseLeave"
6
6
  class="psui-el-button"
@@ -90,9 +90,9 @@ const getComponentClass = computed(() => {
90
90
  }
91
91
  })
92
92
 
93
- const onClick = () => {
93
+ const onClick = (event) => {
94
94
  if (props.disabled) return
95
- emit('click')
95
+ emit('click', event)
96
96
  }
97
97
 
98
98
  const onMouseEnter = () => {
@@ -8,14 +8,14 @@
8
8
  <div
9
9
  ref="PSDropdownTrigger"
10
10
  v-if="$slots.dropdownTrigger"
11
- @click="show.value && !toggleWhenActive ? '' : toggle()"
11
+ @click="show && !toggleWhenActive ? '' : toggle($event)"
12
12
  >
13
13
  <slot name="dropdownTrigger" />
14
14
  </div>
15
15
 
16
16
  <button
17
17
  v-else
18
- @click="show.value && !toggleWhenActive ? '' : toggle()"
18
+ @click="show && !toggleWhenActive ? '' : toggle($event)"
19
19
  type="button"
20
20
  :id="id.value"
21
21
  aria-haspopup="true"
@@ -115,13 +115,14 @@ onBeforeUnmount(() => {
115
115
  unwatchParentScrolling()
116
116
  })
117
117
 
118
- const toggle = () => {
118
+ const toggle = (event) => {
119
119
  if (props.disabled) return
120
120
  if (!show.value) {
121
121
  open()
122
122
  } else {
123
123
  close()
124
124
  }
125
+ event.stopPropagation()
125
126
  }
126
127
 
127
128
  const handleEsc = (evt) => {
@@ -94,12 +94,12 @@
94
94
  :style="item.text_color ? `color: ${item.text_color};` : ''"
95
95
  >
96
96
  {{ item.title }}
97
-
97
+
98
98
  <PsIcon
99
99
  v-if="item.has_helper"
100
- icon="info"
101
- size="14"
102
- class="psui-text-gray-40 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
100
+ icon="info_outline"
101
+ size="16"
102
+ class="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
103
103
  display="flex"
104
104
  @click.native="emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
105
105
  />
@@ -116,10 +116,9 @@
116
116
 
117
117
  <PsIcon
118
118
  v-if="item.has_helper"
119
- icon="info"
120
- size="14"
121
- :class="[{ 'psui-text-gray-50': item.tooltip_text }, { 'psui-text-blue-60': !item.tooltip_text }]"
122
- class="psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
119
+ icon="info_outline"
120
+ size="16"
121
+ class="psui-opacity-0 psui-text-gray-40 hover:psui-text-blue-60 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
123
122
  display="flex"
124
123
  @click.native="emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
125
124
  />
@@ -149,7 +148,7 @@
149
148
  <PsIcon
150
149
  :icon="getIcon(item)"
151
150
  class="psui-flex psui-text-gray-40 psui-cursor-pointer leading-none hover:psui-text-blue-60 psui-gap-3 psui-px-5 psui-py-1 transition-all"
152
- size="18"
151
+ size="16"
153
152
  display="flex"
154
153
  @click.native="executeCallback(item)"
155
154
  />
@@ -19,10 +19,10 @@
19
19
  {{ columnGroup.title }}
20
20
  </p>
21
21
  <PsIcon
22
- icon="info"
23
- size="18"
22
+ icon="info_outline"
23
+ size="16"
24
24
  class="psui-cursor-pointer"
25
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
25
+ icon-classes="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
26
26
  :style="{ display: 'flex' }"
27
27
  @click="emit('click-column-group-helper', columnGroup, $event)"
28
28
  />
@@ -61,10 +61,10 @@
61
61
  />
62
62
 
63
63
  <PsIcon
64
- icon="info"
64
+ icon="info_outline"
65
65
  size="16"
66
66
  class="psui-cursor-pointer helper"
67
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
67
+ icon-classes="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
68
68
  :style="{ display: 'flex' }"
69
69
  @click="emit('click-column-helper', column, $event)"
70
70
  />
@@ -11,10 +11,10 @@
11
11
  {{ columnGroup.title }}
12
12
  </p>
13
13
  <PsIcon
14
- icon="info"
15
- size="18"
14
+ icon="info_outline"
15
+ size="16"
16
16
  class="psui-cursor-pointer"
17
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
17
+ icon-classes="psui-text-blue-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
18
18
  :style="{ display: 'flex' }"
19
19
  @click="emit('click-column-group-helper', columnGroup, $event)"
20
20
  />
@@ -43,10 +43,10 @@
43
43
  </p>
44
44
 
45
45
  <PsIcon
46
- icon="info"
46
+ icon="info_outline"
47
47
  size="16"
48
48
  class="psui-cursor-pointer helper"
49
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
49
+ icon-classes="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
50
50
  :style="{ display: 'flex' }"
51
51
  @click="emit('click-column-helper', column, $event)"
52
52
  />
@@ -21,13 +21,19 @@ export const getParentScrollableEl = (node) => {
21
21
  }
22
22
 
23
23
  export const getParentVueComponentByName = (comp, name) => {
24
- if (!comp) {
25
- return null
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
- } else {
32
+ }
33
+
34
+ if (comp.$parent) {
31
35
  return getParentVueComponentByName(comp.$parent, name)
32
36
  }
37
+
38
+ return null
33
39
  }