@globalbrain/sefirot 3.33.0 → 3.34.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.
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import { isArray } from '../support/Utils'
2
4
  import SAvatar from './SAvatar.vue'
3
5
  import SDescEmpty from './SDescEmpty.vue'
4
6
 
@@ -7,21 +9,32 @@ export interface Avatar {
7
9
  name?: string | null
8
10
  }
9
11
 
10
- defineProps<{
11
- avatar?: Avatar | null
12
- }>()
12
+ const props = withDefaults(defineProps<{
13
+ avatar?: Avatar | Avatar[] | null
14
+ dir?: 'column' | 'row'
15
+ }>(), {
16
+ dir: 'column'
17
+ })
18
+
19
+ const _avatar = computed(() => {
20
+ if (!props.avatar) {
21
+ return null
22
+ }
23
+
24
+ return isArray(props.avatar) ? props.avatar : [props.avatar]
25
+ })
13
26
  </script>
14
27
 
15
28
  <template>
16
- <div v-if="avatar" class="SDescAvatar">
17
- <div class="value">
29
+ <div v-if="_avatar?.length" class="SDescAvatar" :class="[dir]">
30
+ <div v-for="a, i in _avatar" :key="i" class="value">
18
31
  <SAvatar
19
32
  size="nano"
20
- :avatar="avatar.avatar"
21
- :name="avatar.name"
33
+ :avatar="a.avatar"
34
+ :name="a.name"
22
35
  />
23
- <span v-if="avatar.name" class="name">
24
- {{ avatar.name }}
36
+ <span v-if="a.name" class="name">
37
+ {{ a.name }}
25
38
  </span>
26
39
  </div>
27
40
  </div>
@@ -29,6 +42,21 @@ defineProps<{
29
42
  </template>
30
43
 
31
44
  <style scoped lang="postcss">
45
+ .SDescAvatar {
46
+ display: flex;
47
+ flex-wrap: wrap;
48
+ }
49
+
50
+ .SDescAvatar.column {
51
+ flex-direction: column;
52
+ gap: 4px;
53
+ }
54
+
55
+ .SDescAvatar.row {
56
+ flex-direction: row;
57
+ gap: 4px 12px;
58
+ }
59
+
32
60
  .value {
33
61
  display: flex;
34
62
  align-items: center;
@@ -42,6 +42,17 @@ h6 {
42
42
  font-weight: inherit;
43
43
  }
44
44
 
45
+ h1,
46
+ h2,
47
+ h3,
48
+ h4,
49
+ h5,
50
+ h6,
51
+ li,
52
+ p {
53
+ overflow-wrap: break-word;
54
+ }
55
+
45
56
  /**
46
57
  * Avoid 300ms click delay on touch devices that support the `touch-action`
47
58
  * CSS property.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "3.33.0",
4
- "packageManager": "pnpm@8.15.3",
3
+ "version": "3.34.0",
4
+ "packageManager": "pnpm@8.15.4",
5
5
  "description": "Vue Components for Global Brain Design System.",
6
6
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",
7
7
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "@types/markdown-it": "^13.0.7",
47
47
  "@vuelidate/core": "^2.0.3",
48
48
  "@vuelidate/validators": "^2.0.4",
49
- "@vueuse/core": "^10.7.2",
49
+ "@vueuse/core": "^10.8.0",
50
50
  "body-scroll-lock": "4.0.0-beta.0",
51
51
  "fuse.js": "^7.0.0",
52
52
  "lodash-es": "^4.17.21",
@@ -56,8 +56,8 @@
56
56
  "postcss": "^8.4.35",
57
57
  "postcss-nested": "^6.0.1",
58
58
  "v-calendar": "^3.1.2",
59
- "vue": "^3.4.19",
60
- "vue-router": "^4.2.5"
59
+ "vue": "^3.4.20",
60
+ "vue-router": "^4.3.0"
61
61
  },
62
62
  "dependencies": {
63
63
  "@tanstack/vue-virtual": "3.0.0-beta.62",
@@ -80,17 +80,17 @@
80
80
  "@types/body-scroll-lock": "^3.1.2",
81
81
  "@types/lodash-es": "^4.17.12",
82
82
  "@types/markdown-it": "^13.0.7",
83
- "@types/node": "^20.11.19",
83
+ "@types/node": "^20.11.20",
84
84
  "@vitejs/plugin-vue": "^5.0.4",
85
- "@vitest/coverage-v8": "^1.3.0",
85
+ "@vitest/coverage-v8": "^1.3.1",
86
86
  "@vue/test-utils": "^2.4.4",
87
87
  "@vuelidate/core": "^2.0.3",
88
88
  "@vuelidate/validators": "^2.0.4",
89
- "@vueuse/core": "^10.7.2",
89
+ "@vueuse/core": "^10.8.0",
90
90
  "body-scroll-lock": "4.0.0-beta.0",
91
- "eslint": "^8.56.0",
91
+ "eslint": "^8.57.0",
92
92
  "fuse.js": "^7.0.0",
93
- "happy-dom": "^13.3.8",
93
+ "happy-dom": "^13.6.0",
94
94
  "histoire": "^0.16.5",
95
95
  "lodash-es": "^4.17.21",
96
96
  "markdown-it": "^14.0.0",
@@ -102,11 +102,11 @@
102
102
  "release-it": "^17.1.1",
103
103
  "typescript": "~5.3.3",
104
104
  "v-calendar": "^3.1.2",
105
- "vite": "^5.1.3",
105
+ "vite": "^5.1.4",
106
106
  "vitepress": "1.0.0-rc.44",
107
- "vitest": "^1.3.0",
108
- "vue": "^3.4.19",
109
- "vue-router": "^4.2.5",
107
+ "vitest": "^1.3.1",
108
+ "vue": "^3.4.20",
109
+ "vue-router": "^4.3.0",
110
110
  "vue-tsc": "^1.8.27"
111
111
  }
112
112
  }