@meistrari/tela-build 1.62.0 → 1.63.0

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.
@@ -9,6 +9,7 @@ const props = defineProps<{
9
9
  projectLabel: string
10
10
  projectsLabel: string
11
11
  selectedLabel: string
12
+ loading?: boolean
12
13
  }>()
13
14
 
14
15
  const emit = defineEmits<{
@@ -24,39 +25,58 @@ function formatStat(count: number | undefined, singular: string, plural: string)
24
25
  </script>
25
26
 
26
27
  <template>
27
- <button
28
- v-for="workspace of workspaces"
29
- :key="workspace.id"
30
- h-64px
31
- flex w-full items-center px-16px
32
- hover:bg-muted
33
- first:rounded-t-12px
34
- last:rounded-b-12px
35
- not-last:border-b="0.5px border"
36
- data-testid="tela.switchWorkspace.workspaceButton"
37
- @click="emit('select', workspace)"
38
- >
39
- <div mr-12px :class="activeWorkspaceId === workspace.id && 'ring-1.5px ring-offset-2px ring-gray-400 rounded-10px'">
40
- <TelaAvatar size="md" :image="workspace.logo ?? undefined" :alt="workspace.name" class="!rounded-[10px]" />
41
- </div>
28
+ <template v-if="loading">
29
+ <div
30
+ v-for="index in 3"
31
+ :key="index"
32
+ h-64px
33
+ flex w-full items-center px-16px
34
+ not-last:border-b="0.5px border"
35
+ >
36
+ <TelaSkeleton mr-12px h-40px w-40px rounded-10px />
42
37
 
43
- <div flex="~ col" gap-2px>
44
- <h5 heading-h5-semibold text-primary text-start>
45
- {{ workspace.name }}
46
- </h5>
47
- <div flex items-center gap-4px>
48
- <p body-12-regular text-tertiary>
49
- {{ formatStat(workspace.stats?.memberCount, props.memberLabel, props.membersLabel) }}
50
- </p>
51
- <div aria-hidden="true" w-3px h-3px rounded-full bg-gray-200 />
52
- <p body-12-regular text-tertiary>
53
- {{ formatStat(workspace.stats?.projectCount, props.projectLabel, props.projectsLabel) }}
54
- </p>
38
+ <div flex="~ col" gap-8px>
39
+ <TelaSkeleton h-14px w-150px rounded-4px />
40
+ <TelaSkeleton h-12px w-96px rounded-4px />
55
41
  </div>
56
42
  </div>
43
+ </template>
44
+
45
+ <template v-else>
46
+ <button
47
+ v-for="workspace of workspaces"
48
+ :key="workspace.id"
49
+ h-64px
50
+ flex w-full items-center px-16px
51
+ hover:bg-muted
52
+ first:rounded-t-12px
53
+ last:rounded-b-12px
54
+ not-last:border-b="0.5px border"
55
+ data-testid="tela.switchWorkspace.workspaceButton"
56
+ @click="emit('select', workspace)"
57
+ >
58
+ <div mr-12px :class="activeWorkspaceId === workspace.id && 'ring-1.5px ring-offset-2px ring-gray-400 rounded-10px'">
59
+ <TelaAvatar size="md" :image="workspace.logo ?? undefined" :alt="workspace.name" class="!rounded-[10px]" />
60
+ </div>
61
+
62
+ <div flex="~ col" gap-2px>
63
+ <h5 heading-h5-semibold text-primary text-start>
64
+ {{ workspace.name }}
65
+ </h5>
66
+ <div flex items-center gap-4px>
67
+ <p body-12-regular text-tertiary>
68
+ {{ formatStat(workspace.stats?.memberCount, props.memberLabel, props.membersLabel) }}
69
+ </p>
70
+ <div aria-hidden="true" w-3px h-3px rounded-full bg-gray-200 />
71
+ <p body-12-regular text-tertiary>
72
+ {{ formatStat(workspace.stats?.projectCount, props.projectLabel, props.projectsLabel) }}
73
+ </p>
74
+ </div>
75
+ </div>
57
76
 
58
- <TelaBadge v-if="activeWorkspaceId === workspace.id" ml-auto>
59
- {{ props.selectedLabel }}
60
- </TelaBadge>
61
- </button>
77
+ <TelaBadge v-if="activeWorkspaceId === workspace.id" ml-auto>
78
+ {{ props.selectedLabel }}
79
+ </TelaBadge>
80
+ </button>
81
+ </template>
62
82
  </template>
@@ -11,6 +11,7 @@ defineProps<{
11
11
  projectLabel: string
12
12
  projectsLabel: string
13
13
  selectedLabel: string
14
+ loading?: boolean
14
15
  }>()
15
16
 
16
17
  const emit = defineEmits<{
@@ -60,6 +61,7 @@ function onClose() {
60
61
  <div overflow-y-auto no-scrollbar>
61
62
  <TelaModalSwitchWorkspaceContent
62
63
  :workspaces="workspaces"
64
+ :loading="loading"
63
65
  :active-workspace-id="activeWorkspaceId"
64
66
  :member-label="memberLabel"
65
67
  :members-label="membersLabel"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.62.0",
3
+ "version": "1.63.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",
package/unocss.config.ts CHANGED
@@ -13,6 +13,14 @@ const phosphorFillExtractor: Extractor = {
13
13
  }
14
14
 
15
15
  export default defineConfig({
16
+ content: {
17
+ pipeline: {
18
+ include: [
19
+ /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
20
+ /\/components\/.*\.ts($|\?)/,
21
+ ],
22
+ },
23
+ },
16
24
  extractors: [phosphorFillExtractor],
17
25
  theme: {
18
26
  ...DT,