@milaboratories/uikit 2.2.56 → 2.2.58

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.56",
3
+ "version": "2.2.58",
4
4
  "type": "module",
5
5
  "main": "dist/pl-uikit.umd.js",
6
6
  "module": "dist/pl-uikit.js",
@@ -34,9 +34,9 @@
34
34
  "yarpm": "^1.2.0",
35
35
  "svgo": "^3.3.2",
36
36
  "@types/d3": "^7.4.3",
37
+ "@milaboratories/eslint-config": "^1.0.1",
37
38
  "@milaboratories/helpers": "^1.6.11",
38
- "@platforma-sdk/model": "^1.22.18",
39
- "@milaboratories/eslint-config": "^1.0.1"
39
+ "@platforma-sdk/model": "^1.22.18"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "vite",
@@ -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%);
@@ -67,6 +67,7 @@
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;
@@ -6,8 +6,8 @@ import type { PlProgressCellProps } from './types';
6
6
 
7
7
  const props = withDefaults(defineProps<PlProgressCellProps>(), {
8
8
  stage: 'not_started',
9
- step: '',
10
- progressString: '',
9
+ step: '', // main text (left)
10
+ progressString: '', // appended text on the right side (right)
11
11
  progress: undefined,
12
12
  error: '',
13
13
  });
@@ -10,15 +10,15 @@
10
10
  background: var(--txt-error);
11
11
  }
12
12
 
13
- &.error {
13
+ &.not-started {
14
14
  * {
15
- color: var(--txt-error) !important;
15
+ color: var(--txt-03) !important;
16
16
  }
17
17
  }
18
18
 
19
- &.not-started {
19
+ &.error {
20
20
  * {
21
- color: var(--txt-03) !important;
21
+ color: var(--txt-error) !important;
22
22
  }
23
23
  }
24
24
 
@@ -1,7 +1,7 @@
1
1
  export type PlProgressCellProps = {
2
2
  stage: 'not_started' | 'running' | 'done';
3
- step?: string; // "Alignment" / "Queued"
4
- progressString?: string; // "20%" or "2 / 4"
5
- progress?: number; // i.e. 0.2 for 20%; 'undefined' for unknown progress = animated progressbar
3
+ step?: string; // "Alignment" / "Queued" (main left text)
4
+ progressString?: string; // "20%" or "2 / 4" (right text)
5
+ progress?: number; // Percent value! (from 0 to 100) i.e. 20 for 20%; 'undefined' for unknown progress = animated progressbar
6
6
  error?: string;
7
7
  };
@@ -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>