@usssa/component-library 1.0.0-alpha.27 → 1.0.0-alpha.29

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Component Library v1.0.0-alpha.27
1
+ # Component Library v1.0.0-alpha.29
2
2
 
3
3
  This library provides custom UI components for USSSA applications.
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usssa/component-library",
3
- "version": "1.0.0-alpha.27",
3
+ "version": "1.0.0-alpha.29",
4
4
  "description": "A Quasar component library project",
5
5
  "productName": "Quasar component library App",
6
6
  "author": "Troy Moreland <troy.moreland@usssa.com>",
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
2
  import { computed } from 'vue'
3
3
  import UBadgeStd from './UBadgeStd.vue'
4
+
4
5
  const props = defineProps({
5
6
  color: {
6
7
  type: String,
@@ -59,6 +60,19 @@ const labelSize = computed(() => {
59
60
 
60
61
  return props.size
61
62
  })
63
+
64
+ const initials = computed(() => {
65
+ if (props.name) {
66
+ const parts = props.name.split(' ')
67
+
68
+ if (parts.length === 1) return parts[0].substring(0, 2).toUpperCase()
69
+
70
+ return `${parts[0].substring(0, 1).toUpperCase()}${parts[1]
71
+ .substring(0, 1)
72
+ .toUpperCase()}`
73
+ }
74
+ return props?.name
75
+ })
62
76
  </script>
63
77
 
64
78
  <template>
@@ -77,7 +91,7 @@ const labelSize = computed(() => {
77
91
  class="name"
78
92
  :class="`text-${color} text-caption-${labelSize}`"
79
93
  >
80
- {{ name }}
94
+ {{ initials }}
81
95
  </span>
82
96
  <UBadgeStd
83
97
  v-if="showIndicator"
@@ -57,14 +57,12 @@ const headerClass = computed(() => {
57
57
  tabindex="-1"
58
58
  class="dialog-action-icons"
59
59
  :flat="true"
60
- :aria-label="leftIconLabel"
61
60
  @click="handleBackClick()"
62
61
  >
63
62
  <q-icon
64
63
  class="icon-back"
65
64
  :class="leftIcon"
66
65
  size="1.5rem"
67
- @click="handleBackClick()"
68
66
  :aria-label="leftIconLabel"
69
67
  tabindex="0"
70
68
  />
@@ -83,10 +81,10 @@ const headerClass = computed(() => {
83
81
  </div>
84
82
  </div>
85
83
  </div>
84
+
86
85
  <UBtnStd
87
86
  class="dialog-action-icons"
88
87
  :flat="true"
89
- :aria-label="closeIconLabel"
90
88
  tabindex="-1"
91
89
  @click="dialogRef.hide()"
92
90
  >
@@ -95,9 +93,7 @@ const headerClass = computed(() => {
95
93
  class="icon-close"
96
94
  :class="closeIcon"
97
95
  size="1.5rem"
98
- @click="dialogRef.hide()"
99
96
  :aria-label="closeIconLabel"
100
- :aria-hidden="false"
101
97
  tabindex="0"
102
98
  />
103
99
  </UBtnStd>
@@ -223,4 +219,10 @@ const headerClass = computed(() => {
223
219
 
224
220
  .q-focus-helper
225
221
  background: transparent !important
222
+
223
+ #closeIconLabelRef
224
+ display: none
225
+
226
+ #leftIconLabelRef
227
+ display: none
226
228
  </style>