@usssa/component-library 1.0.0-alpha.87 → 1.0.0-alpha.89

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": "@usssa/component-library",
3
- "version": "1.0.0-alpha.87",
3
+ "version": "1.0.0-alpha.89",
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
+ import UTooltip from './UTooltip.vue'
4
5
 
5
6
  const props = defineProps({
6
7
  color: {
@@ -39,6 +40,10 @@ const props = defineProps({
39
40
  type: Boolean,
40
41
  default: true,
41
42
  },
43
+ showTooltip: {
44
+ type: Boolean,
45
+ default: false,
46
+ },
42
47
  })
43
48
 
44
49
  const emit = defineEmits(['onClick'])
@@ -81,16 +86,24 @@ const initials = computed(() => {
81
86
 
82
87
  <template>
83
88
  <q-avatar
89
+ v-bind="$attrs"
84
90
  class="u-avatar"
85
91
  :class="`size-${size}`"
86
92
  :color="bgColor"
93
+ :icon="icon"
87
94
  :round="round"
88
95
  :rounded="!round"
89
- :icon="icon"
90
96
  @click="handleClick"
91
- v-bind="$attrs"
92
97
  >
93
- <img v-if="image" :src="image" :alt="`avatar ${name}`" :aria-label="name" />
98
+ <UTooltip
99
+ v-if="showTooltip"
100
+ anchor="bottom middle"
101
+ :description="name"
102
+ :offset="[4, 4]"
103
+ self="top middle"
104
+ >
105
+ </UTooltip>
106
+ <img v-if="image" :alt="`avatar ${name}`" :aria-label="name" :src="image"/>
94
107
  <span
95
108
  v-if="!image"
96
109
  class="name"
@@ -100,9 +113,10 @@ const initials = computed(() => {
100
113
  </span>
101
114
  <UBadgeStd
102
115
  v-if="showIndicator"
103
- :color="indicatorColor"
104
116
  :class="`indicator`"
117
+ :color="indicatorColor"
105
118
  size="xs"
119
+ tabindex="-1"
106
120
  type="indicator"
107
121
  />
108
122
  <slot name="item" />
@@ -23,10 +23,6 @@ const props = defineProps({
23
23
  type: String,
24
24
  default: 'neutral-4',
25
25
  },
26
- name: {
27
- type: String,
28
- required: true,
29
- },
30
26
  showIndicator: {
31
27
  type: Boolean,
32
28
  default: false,
@@ -39,6 +35,10 @@ const props = defineProps({
39
35
  type: Number,
40
36
  default: 4,
41
37
  },
38
+ showEachTooltip: {
39
+ type: Boolean,
40
+ default: true
41
+ }
42
42
  })
43
43
 
44
44
  const emit = defineEmits(['onClick'])
@@ -59,27 +59,28 @@ const remainingAvatars = computed(() => {
59
59
  <UAvatar
60
60
  v-for="(avatar, index) in displayedAvatars"
61
61
  class="avatarGroup"
62
- :name="avatar.name"
63
- :size="size"
64
- :showIndicator="showIndicator"
65
- :indicatorColor="indicatorColor"
66
- :round="round"
67
62
  :image="avatar.image"
63
+ :indicatorColor="indicatorColor"
68
64
  :key="index"
65
+ :name="avatar.name"
66
+ :round="round"
67
+ :showIndicator="showIndicator"
68
+ :showTooltip="showEachTooltip"
69
+ :size="size"
70
+ tabindex="0"
69
71
  @click="handleClick"
70
72
  />
71
-
72
73
  <q-icon
74
+ v-if="remainingAvatars.length"
73
75
  :class="`avatarGroup additonalUsersAvatar size-${size} fa-duotone fa-solid fa-circle-plus`"
74
- color="primary"
75
76
  aria-label="See more Avatar"
76
- v-if="remainingAvatars.length"
77
+ color="primary"
77
78
  >
78
79
  <UTooltip
79
80
  anchor="bottom middle"
80
81
  description=""
81
- self="top middle"
82
82
  :offset="[4, 4]"
83
+ self="top middle"
83
84
  >
84
85
  <template v-slot:item>
85
86
  <div class="text-body-xs tooltip-text">
@@ -97,7 +98,6 @@ const remainingAvatars = computed(() => {
97
98
  border-radius:50%
98
99
 
99
100
  .additonalUsersAvatar
100
- cursor: pointer
101
101
 
102
102
  &.size-sm
103
103
  font-size: $ba !important
@@ -113,6 +113,7 @@ const remainingAvatars = computed(() => {
113
113
 
114
114
  .avatarGroup
115
115
  margin: -0.125rem
116
+
116
117
  .avatarGroup:not(:nth-child(1)) .q-avatar__content
117
118
  border: 1.5px solid $neutral-1
118
119
  background : lightgray 0px -0.033px / 100% 150.273% no-repeat
@@ -348,13 +348,14 @@ watch(modelValue, async (value) => {
348
348
  </template>
349
349
  </q-input>
350
350
  </div>
351
+
351
352
  <UInputTextStd
352
353
  v-if="JSON.stringify(resultItem) !== '{}'"
353
354
  v-model="resultItem.street_address"
354
355
  :label="label"
355
356
  readonly
356
357
  rightIcon="fa-kit-duotone fa-circle-xmark"
357
- size="sm"
358
+ :size="size"
358
359
  @onRightIconClick="handleClear"
359
360
  />
360
361
  </template>
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed } from 'vue'
2
+ import { computed, useSlots } from 'vue'
3
3
 
4
4
  const props = defineProps({
5
5
  icon: {
@@ -24,6 +24,8 @@ const props = defineProps({
24
24
  },
25
25
  })
26
26
 
27
+ const slots = useSlots()
28
+
27
29
  /**
28
30
  * checking if string contains only white spaces
29
31
  */
@@ -38,16 +40,16 @@ const getTooltipText = computed(() => {
38
40
 
39
41
  <template>
40
42
  <q-tooltip
41
- class="u-tooltip shadow-2 bg-dark row"
43
+ v-if="getTooltipText || slots.item"
42
44
  v-bind="$attrs"
45
+ class="u-tooltip shadow-2 bg-dark row"
43
46
  :anchor="anchor"
44
- :self="self"
45
47
  :offset="offset"
48
+ :self="self"
46
49
  :target="target"
47
- v-if="getTooltipText"
48
50
  >
49
51
  <div class="row no-wrap tooltip-content">
50
- <div class="flex items-center" v-if="icon">
52
+ <div v-if="icon" class="flex items-center">
51
53
  <q-icon :class="icon" size="1rem"></q-icon>
52
54
  </div>
53
55
  <div class="text-body-xs tooltip-text">{{ getTooltipText }}</div>
@@ -482,7 +482,7 @@ defineExpose({ upload })
482
482
  .q-uploader__overlay
483
483
  display: none !important
484
484
  .progress-bar
485
- width: 85% !important
485
+ width: 84% !important
486
486
  .progress-bar-container
487
487
  gap: $xs
488
488
  .card-section