@milaboratories/uikit 2.2.55 → 2.2.57

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/uikit",
3
- "version": "2.2.55",
3
+ "version": "2.2.57",
4
4
  "type": "module",
5
5
  "main": "dist/pl-uikit.umd.js",
6
6
  "module": "dist/pl-uikit.js",
@@ -26,8 +26,6 @@
26
26
  --color-ic-01: #110529;
27
27
  --color-ic-02: #cfd1db;
28
28
 
29
- --bg-base-dark: #110529;
30
- --bg-base-light: #f7f8fa;
31
29
  --bg-elevated-01: #fff;
32
30
  --bg-elevated-02: #e1e3eb;
33
31
  --bg-notification-error: linear-gradient(90deg, #ffcecc 0%, #ffffff 100%);
@@ -96,9 +96,8 @@
96
96
  }
97
97
 
98
98
  &::-webkit-scrollbar {
99
- width: 6px;
99
+ width: var(--scrollbar-width, 6px);
100
100
  height: 5px;
101
- padding-right: 5px;
102
101
  background-color: transparent;
103
102
  display: block;
104
103
  }
@@ -67,12 +67,16 @@
67
67
  --gap-v: 24px;
68
68
  --gap-h: 12px;
69
69
  // @TODO global overlays
70
+ --z-splash: 50;
70
71
  --z-slide-shadow: 80;
71
72
  --z-slide-dialog: 81;
72
73
  --z-dialog: 100;
73
74
  --z-dropdown-options: 110;
74
75
  --z-tooltip: 120;
75
76
  --z-context-menu: 1001;
77
+
78
+ // Base custom scrollbar width (see mixins)
79
+ --scrollbar-width: 6px;
76
80
  }
77
81
 
78
82
  [data-theme='dark'] {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  const onStart = (el: Element) => {
3
- (el as HTMLElement).style.setProperty('--component-height', el.scrollHeight + 'px');
4
3
  el.classList.add('expand-collapse-fix');
4
+ (el as HTMLElement).style.setProperty('--component-height', el.scrollHeight + 'px');
5
5
  };
6
6
 
7
7
  const onAfter = (el: Element) => {
@@ -50,28 +50,35 @@ defineProps<{
50
50
  </script>
51
51
 
52
52
  <template>
53
- <PlSectionSeparator :class="$style.separator" :compact="compact" @click="open = !open">
54
- <PlMaskIcon16 name="chevron-right" :class="[{ [$style.down]: open }, $style.chevron]" />
55
- {{ label }}
56
- </PlSectionSeparator>
57
- <ExpandTransition>
58
- <div v-if="open" :class="$style.content">
59
- <slot />
60
- </div>
61
- </ExpandTransition>
53
+ <div class="pl-accordion-section">
54
+ <PlSectionSeparator :class="$style.separator" :compact="compact" @click="open = !open">
55
+ <PlMaskIcon16 name="chevron-right" :class="[{ [$style.down]: open }, $style.chevron]" />
56
+ {{ label }}
57
+ </PlSectionSeparator>
58
+ <ExpandTransition>
59
+ <div v-if="open" :class="$style.content">
60
+ <slot />
61
+ </div>
62
+ </ExpandTransition>
63
+ </div>
62
64
  </template>
63
65
 
64
66
  <style module>
65
67
  .content {
66
68
  display: flex;
67
69
  flex-direction: column;
68
- gap: inherit;
70
+ gap: var(--gap-v);
69
71
  will-change: height, opacity;
70
- transform: translateZ(0);
71
- backface-visibility: hidden;
72
- perspective: 1000px;
73
- margin-top: -8px;
74
- padding-top: 8px;
72
+ /* transform: translateZ(0);
73
+ backface-visibility: hidden; */
74
+ }
75
+
76
+ .content > *:first-child {
77
+ margin-top: 24px;
78
+ }
79
+
80
+ .content > *:last-child {
81
+ margin-bottom: 4px;
75
82
  }
76
83
 
77
84
  .separator:hover {
@@ -2,9 +2,8 @@
2
2
 
3
3
  .pl-btn-group {
4
4
  --pl-btn-group-height: 40px;
5
- box-sizing: content-box;
5
+ box-sizing: border-box;
6
6
  position: relative;
7
- min-height: var(--pl-btn-group-height);
8
7
  font-family: var(--control-font-family);
9
8
 
10
9
  label {
@@ -26,6 +25,7 @@
26
25
  }
27
26
 
28
27
  .inner-border {
28
+ height: var(--pl-btn-group-height);
29
29
  min-height: var(--pl-btn-group-height);
30
30
 
31
31
  &::after {
@@ -55,7 +55,7 @@
55
55
  font-size: 28px;
56
56
  font-style: normal;
57
57
  font-weight: 500;
58
- line-height: 32px;
58
+ line-height: 40px;
59
59
  /* 114.286% */
60
60
  letter-spacing: -0.56px;
61
61
  padding: 24px;
@@ -91,9 +91,10 @@
91
91
  display: flex;
92
92
  flex-direction: column;
93
93
  gap: 24px;
94
- padding: 16px 24px;
94
+ padding: 16px calc(24px - var(--scrollbar-width)) 16px 24px;
95
95
  margin: 0 0;
96
96
  @include scrollbar(true);
97
+ scrollbar-gutter: stable;
97
98
  }
98
99
 
99
100
  &__shadow {
@@ -4,20 +4,29 @@ import { PlLoaderCircular } from '@/components/PlLoaderCircular';
4
4
 
5
5
  withDefaults(defineProps<{
6
6
  /**
7
- * Optional string that sets size for PlLoaderCircular.
7
+ * Optional string that sets text that will be shown below the PlLoaderCircular.
8
8
  */
9
- size?: '16' | '24' | '48' | string;
9
+ loadingText?: string;
10
10
  /**
11
- * Optional string that sets text that will be shown below the PlLoaderCircular.
11
+ * If `true` the loading overlay is shown.
12
12
  */
13
- text?: string;
14
-
15
- }>(), { size: '48', text: 'Loading' });
13
+ loading?: boolean;
14
+ /**
15
+ * @TODO
16
+ */
17
+ type?: 'table' | 'transparent';
18
+ }>(), { loadingText: undefined, loading: false, type: undefined });
16
19
  </script>
17
20
 
18
21
  <template>
19
- <div :class="style.container">
20
- <PlLoaderCircular :size="size" />
21
- <h3 :class="style.text">{{ text }}</h3>
22
+ <div :class="[style.splash, {[style.table]: type === 'table', [style.transparent]: type === 'transparent'}]">
23
+ <div v-if="loading" :class="[style.overlay]">
24
+ <div>
25
+ <!-- @TODO refactor PlLoaderCircular size property -->
26
+ <PlLoaderCircular size="48" />
27
+ <div v-if="loadingText" :class="style.text">{{ loadingText }}</div>
28
+ </div>
29
+ </div>
30
+ <slot />
22
31
  </div>
23
32
  </template>
@@ -1,9 +1,45 @@
1
- .container {
2
- display: flex;
3
- flex-direction: column;
4
- }
5
-
6
- .text {
7
- margin-top: 24px;
8
- color: var(--txt-mask);
9
- }
1
+ .splash {
2
+ --pl-splash-overlay-background: rgba(255, 255, 255, 0.94);
3
+
4
+ position: relative;
5
+
6
+ &.table {
7
+ --pl-splash-overlay-background: var(--bg-base-light);
8
+ }
9
+
10
+ &.transparent {
11
+ --pl-splash-overlay-background: transparent;
12
+ }
13
+
14
+ .overlay {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ right: 0;
19
+ bottom: 0;
20
+ display: flex;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ justify-content: center;
24
+ background: var(--pl-splash-overlay-background);
25
+ z-index: var(--z-splash);
26
+
27
+ > div {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 24px;
31
+
32
+ .text {
33
+ user-select: none;
34
+ color: var(--txt-mask);
35
+ font-family: var(--font-family-base);
36
+ font-size: 28px;
37
+ font-style: normal;
38
+ font-weight: 500;
39
+ line-height: 32px;
40
+ letter-spacing: -0.56px;
41
+ margin: 0;
42
+ }
43
+ }
44
+ }
45
+ }
@@ -8,11 +8,23 @@ export default {
8
8
  <script lang="ts" setup>
9
9
  import { useSlots } from 'vue';
10
10
  import './pl-block-page.scss';
11
+ import PlSplash from '@/components/PlSplash/PlSplash.vue';
11
12
 
12
13
  const slots = useSlots();
13
14
 
14
15
  defineProps<{
16
+ /**
17
+ * If `true` body gutters are removed
18
+ */
15
19
  noBodyGutters?: boolean;
20
+ /**
21
+ * If `true`, a loading overlay is displayed on the page body (over all default slot content)
22
+ */
23
+ bodyLoading?: boolean;
24
+ /**
25
+ * Optional body loading text
26
+ */
27
+ bodyLoadingText?: string;
16
28
  }>();
17
29
 
18
30
  const setTitleIfNeeded = (el: HTMLElement) => {
@@ -40,8 +52,8 @@ const vTextOverflownTitle = {
40
52
  </div>
41
53
  </div>
42
54
  <div v-else />
43
- <div class="pl-block-page__body">
55
+ <PlSplash :loading="bodyLoading" :loading-text="bodyLoadingText" class="pl-block-page__body">
44
56
  <slot />
45
- </div>
57
+ </PlSplash>
46
58
  </div>
47
59
  </template>
@@ -8,9 +8,21 @@ export default {
8
8
  <script lang="ts" setup>
9
9
  import { computed } from 'vue';
10
10
  import './pl-container.scss';
11
+ import PlSplash from '@/components/PlSplash/PlSplash.vue';
11
12
 
12
13
  const props = defineProps<{
14
+ /**
15
+ * CSS width value (px, %)
16
+ */
13
17
  width?: string;
18
+ /**
19
+ * Shows loading overlay
20
+ */
21
+ loading?: boolean;
22
+ /**
23
+ * Optional loading text
24
+ */
25
+ loadingText?: string;
14
26
  }>();
15
27
 
16
28
  const style = computed(() => ({
@@ -19,7 +31,7 @@ const style = computed(() => ({
19
31
  </script>
20
32
 
21
33
  <template>
22
- <div class="pl-container pl-layout-component" :style="style">
34
+ <PlSplash :loading="loading" :loading-text="loadingText" class="pl-container pl-layout-component" :style="style">
23
35
  <slot />
24
- </div>
36
+ </PlSplash>
25
37
  </template>