@usssa/component-library 1.0.0-alpha.83 → 1.0.0-alpha.84

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.83",
3
+ "version": "1.0.0-alpha.84",
4
4
  "description": "A Quasar component library project",
5
5
  "productName": "Quasar component library App",
6
6
  "author": "Troy Moreland <troy.moreland@usssa.com>",
@@ -26,8 +26,8 @@ const props = defineProps({
26
26
  })
27
27
 
28
28
  const model = defineModel()
29
-
30
29
  const emit = defineEmits(['onBackIconClick', 'hideDialog'])
30
+
31
31
  const dialogRef = ref(true)
32
32
 
33
33
  const handleBackClick = () => {
@@ -39,21 +39,20 @@ const headerClass = computed(() => {
39
39
  })
40
40
 
41
41
  const dialogStyle = computed(() => ({
42
- '--customSize': props.customSize
42
+ '--customSize': props.customSize,
43
43
  }))
44
-
45
44
  </script>
46
45
 
47
46
  <template>
48
47
  <q-dialog
48
+ v-bind="$attrs"
49
+ v-model="model"
50
+ :class="`dialog-${size}`"
51
+ full-width
49
52
  no-backdrop-dismiss
50
- ref="dialogRef"
51
53
  :position="position"
52
- full-width
53
- :class="`dialog-${size}`"
54
54
  :style="dialogStyle"
55
- v-model="model"
56
- v-bind="$attrs"
55
+ ref="dialogRef"
57
56
  >
58
57
  <q-card class="dialog-wrapper full-height">
59
58
  <q-card-section
@@ -63,8 +62,9 @@ const dialogStyle = computed(() => ({
63
62
  <div class="flex items-center dialog-heading-container">
64
63
  <div v-if="leftIcon">
65
64
  <UBtnStd
66
- tabindex="-1"
67
65
  class="dialog-action-icons"
66
+ tabindex="0"
67
+ :aria-label="leftIconLabel"
68
68
  :flat="true"
69
69
  @click="handleBackClick()"
70
70
  >
@@ -72,8 +72,7 @@ const dialogStyle = computed(() => ({
72
72
  class="icon-back"
73
73
  :class="leftIcon"
74
74
  size="1.5rem"
75
- :aria-label="leftIconLabel"
76
- tabindex="0"
75
+ tabindex="-1"
77
76
  />
78
77
  </UBtnStd>
79
78
  </div>
@@ -84,7 +83,7 @@ const dialogStyle = computed(() => ({
84
83
  </span>
85
84
  </div>
86
85
  <div>
87
- <span class="text-body-sm dialog-caption" v-if="headingCaption">
86
+ <span v-if="headingCaption" class="text-body-sm dialog-caption">
88
87
  {{ headingCaption }}
89
88
  </span>
90
89
  </div>
@@ -93,8 +92,9 @@ const dialogStyle = computed(() => ({
93
92
 
94
93
  <UBtnStd
95
94
  class="dialog-action-icons"
95
+ :aria-label="closeIconLabel"
96
96
  :flat="true"
97
- tabindex="-1"
97
+ tabindex="0"
98
98
  @click="dialogRef.hide()"
99
99
  >
100
100
  <q-icon
@@ -102,8 +102,7 @@ const dialogStyle = computed(() => ({
102
102
  class="icon-close"
103
103
  :class="closeIcon"
104
104
  size="1.5rem"
105
- :aria-label="closeIconLabel"
106
- tabindex="0"
105
+ tabindex="-1"
107
106
  />
108
107
  </UBtnStd>
109
108
  </div>
@@ -116,12 +115,12 @@ const dialogStyle = computed(() => ({
116
115
  <slot name="content" />
117
116
  </q-card-section>
118
117
 
119
- <div class="q-pa-ba action-wrapper" v-if="showActionButtons">
120
- <q-card-actions align="left" class="action-buttons">
118
+ <div v-if="showActionButtons" class="q-pa-ba action-wrapper">
119
+ <q-card-actions class="action-buttons" align="left">
121
120
  <slot name="action_secondary_one"></slot>
122
121
  <slot name="action_secondary_two"></slot>
123
122
  </q-card-actions>
124
- <q-card-actions align="right" class="action-buttons">
123
+ <q-card-actions class="action-buttons" align="right">
125
124
  <slot name="action_primary_one"></slot>
126
125
  <slot name="action_primary_two"></slot>
127
126
  </q-card-actions>
@@ -229,7 +228,11 @@ const dialogStyle = computed(() => ({
229
228
  padding: 0px 0px !important
230
229
  min-width: 0px !important
231
230
  min-height: 0px !important
232
- height: auto !important
231
+ height: fit-content !important
232
+ border-radius: 0px
233
+
234
+ &:focus
235
+ outline: auto !important
233
236
 
234
237
  .q-focus-helper
235
238
  background: transparent !important
@@ -3,6 +3,7 @@ import { computed } from 'vue'
3
3
  import { useRouter } from 'vue-router'
4
4
  import UBadgeStd from './UBadgeStd.vue'
5
5
  import UBtnIcon from './UBtnIcon.vue'
6
+ import UBtnStd from './UBtnStd.vue'
6
7
  import UMenuItem from './UMenuItem.vue'
7
8
  import UTooltip from './UTooltip.vue'
8
9
  const props = defineProps({
@@ -71,28 +72,31 @@ const getXOffset = (label) => {
71
72
  <q-scroll-area class="u-drawer-scrollable-area">
72
73
  <div
73
74
  :class="`flex items-center justify-${
74
- miniState ? 'center' : 'between'
75
- } ${miniState ? 'q-py-ba' : 'q-py-xs q-pl-ba q-pr-xxs'}`"
75
+ miniState ? 'center q-py-sm' : 'between q-py-xs q-pl-ba q-pr-xxs'
76
+ } `"
76
77
  >
77
- <NuxtLink
78
- class="flex items-center justify-center cursor-pointer"
78
+ <UBtnStd
79
+ class="flex items-center justify-center drawer-logo q-pa-none"
80
+ flat
81
+ :ripple="false"
82
+ size="sm"
79
83
  :to="homeLink"
80
84
  >
81
- <img
85
+ <q-img
82
86
  v-if="!miniState"
83
87
  class="full-logo"
84
88
  alt="usssa-logo"
85
89
  aria-label="usssa logo"
86
90
  :src="`${brandLogo}`"
87
91
  />
88
- <img
92
+ <q-img
89
93
  v-else
90
94
  class="mini-state-logo"
91
95
  alt="usssa-logo"
92
96
  aria-label="usssa logo"
93
97
  :src="brandMiniLogo"
94
98
  />
95
- </NuxtLink>
99
+ </UBtnStd>
96
100
  <div
97
101
  v-if="!miniState"
98
102
  class="drawer-open-close-icon-wrapper flex items-center justify-center"
@@ -106,6 +110,12 @@ const getXOffset = (label) => {
106
110
  size="sm"
107
111
  @click="handleCloseDrawer"
108
112
  />
113
+ <UTooltip
114
+ anchor="center right"
115
+ description="Collapse Menu"
116
+ :offset="[4, 14]"
117
+ self="center start"
118
+ />
109
119
  </div>
110
120
  </div>
111
121
  <q-list
@@ -163,7 +173,16 @@ const getXOffset = (label) => {
163
173
  background: $surface-bg-1
164
174
  .q-scrollarea__content
165
175
  width: 100%
166
-
176
+ .drawer-logo
177
+ padding: 0px !important
178
+ min-width: 0px !important
179
+ &.q-hoverable:hover > .q-focus-helper
180
+ opacity: 0
181
+ &:focus-visible
182
+ outline: auto !important
183
+ .q-focus-helper
184
+ display: none
185
+
167
186
  .u-drawer-scrollable-area
168
187
  height: calc(100% - 0px)
169
188
  margin-top: 0px
@@ -196,6 +196,7 @@ const updateToggle = (val) => {
196
196
  updateModelVal($event, titleToCamelCase(item.label))
197
197
  "
198
198
  />
199
+
199
200
  <UInputTextStd
200
201
  v-if="item.inputType === 'Date'"
201
202
  v-bind="item.props"
@@ -226,6 +227,7 @@ const updateToggle = (val) => {
226
227
  v-model="item.value"
227
228
  v-bind="item.dateProps"
228
229
  mask="MM/DD/YYYY"
230
+ :modelValue="getKeyValueByTitle(item.label)"
229
231
  @update:modelValue="
230
232
  updateModelVal($event, titleToCamelCase(item.label))
231
233
  "
@@ -32,7 +32,7 @@ const props = defineProps({
32
32
  },
33
33
  headerLabel: {
34
34
  type: String,
35
- default: 'I\'m looking for',
35
+ default: "I'm looking for",
36
36
  },
37
37
  labelIcon: {
38
38
  type: String,
@@ -99,7 +99,6 @@ const emit = defineEmits([
99
99
 
100
100
  const loading = defineModel('loading')
101
101
 
102
-
103
102
  const advancedSearchPendingFilterModel = structuredClone(toRaw(props.model))
104
103
  const advancedSearchSelectedTab = ref(props.advancedSearchSelectedTab ?? null)
105
104
 
@@ -220,6 +219,11 @@ const specialContextHandler = (results) => {
220
219
  }
221
220
  }
222
221
 
222
+ const convertDate = (inputDate) => {
223
+ const [month, day, year] = inputDate.split('/')
224
+ return `${year}-${month}-${day}`
225
+ }
226
+
223
227
  const search = async () => {
224
228
  try {
225
229
  if (props.searchText.length < 2) {
@@ -229,10 +233,9 @@ const search = async () => {
229
233
 
230
234
  loading.value = true
231
235
  const configPayload = {}
232
- if (advancedSearchSelectedTab.value) {
233
- configPayload.facetFilters = [
234
- `collection:${advancedSearchSelectedTab.value}`,
235
- ]
236
+ const selectedTab = advancedSearchSelectedTab.value
237
+ if (selectedTab) {
238
+ configPayload.facetFilters = [`collection:${selectedTab}`]
236
239
  } else {
237
240
  let advancedSearchTabOptions = props.options.map((option) => {
238
241
  return `collection:${option.id}`
@@ -251,20 +254,36 @@ const search = async () => {
251
254
 
252
255
  if (key === 'phoneNumber' && filterValue) {
253
256
  filterValue = phoneNumber
257
+ } else if (key === 'startDate' && filterValue) {
258
+ filterValue = convertDate(filters.startDate)
259
+ } else if (key === 'endDate' && filterValue) {
260
+ filterValue = convertDate(filters.endDate)
254
261
  }
255
262
 
256
263
  switch (key) {
257
264
  case 'city':
258
- key = 'address.city'
265
+ if (selectedTab === 'events' || selectedTab === 'venues') {
266
+ key = 'city'
267
+ } else {
268
+ key = 'address.city'
269
+ }
259
270
  break
260
- case 'selectedCountry':
261
- key = 'address.country'
271
+ case 'state':
272
+ if (selectedTab === 'events' || selectedTab === 'venues') {
273
+ key = 'state'
274
+ } else {
275
+ key = 'address.state'
276
+ }
262
277
  break
263
278
  case 'postalCode':
264
- key = 'address.postalCode'
279
+ if (selectedTab === 'venues') {
280
+ key = 'postalCode'
281
+ } else {
282
+ key = 'address.postalCode'
283
+ }
265
284
  break
266
- case 'state':
267
- key = 'address.state'
285
+ case 'selectedCountry':
286
+ key = 'address.country'
268
287
  break
269
288
  case 'emailAddress':
270
289
  key = 'email'
@@ -275,6 +294,21 @@ const search = async () => {
275
294
  case 'phoneNumber':
276
295
  key = 'mobileNumber'
277
296
  break
297
+ case 'venueName':
298
+ key = 'name'
299
+ break
300
+ case 'eventName':
301
+ key = 'name'
302
+ break
303
+ case 'startDate':
304
+ key = 'startsOn'
305
+ break
306
+ case 'endDate':
307
+ key = 'endsOn'
308
+ break
309
+ case 'venueAddress':
310
+ key = 'streetAddress'
311
+ break
278
312
  default:
279
313
  key = key
280
314
  }
@@ -282,7 +316,7 @@ const search = async () => {
282
316
  if (filterValue && filterValue.length) {
283
317
  algoliaFilter.length
284
318
  ? (algoliaFilter += ` AND ${key}:${filterValue}`)
285
- : (algoliaFilter += `${key}:'${filterValue}'`)
319
+ : (algoliaFilter += `${key}:"${filterValue}"`)
286
320
  }
287
321
  })
288
322
 
@@ -312,7 +346,6 @@ const search = async () => {
312
346
  } else {
313
347
  searchResults.value = null
314
348
  }
315
-
316
349
  return void 0
317
350
  } catch (error) {
318
351
  Notify.create({
@@ -344,7 +377,6 @@ const onApplyAdvancedSearchFilter = () => {
344
377
 
345
378
  search()
346
379
  updateAdvanceSearchToggle()
347
-
348
380
  }
349
381
 
350
382
  //Assign default model value on tab change
@@ -610,8 +642,7 @@ watch(
610
642
  outline
611
643
  size="sm"
612
644
  @click.stop="onItemActionClick(item)"
613
- >
614
- </UBtnStd>
645
+ />
615
646
  </q-item-section>
616
647
  </q-item>
617
648
  </template>
@@ -629,7 +660,6 @@ watch(
629
660
  padding-bottom: $ba
630
661
  max-height: 20rem
631
662
  box-shadow: 0px 8px 8px 0px rgba(16, 17, 20, 0.16)
632
- z-index: 1
633
663
  .u-typeahead-menu
634
664
  .u-tabs-outer .u-tab-button .truncated-label
635
665
  overflow-wrap: unset
@@ -676,5 +706,5 @@ watch(
676
706
  white-space: normal
677
707
  overflow: hidden
678
708
  word-wrap: break-word
679
- min-width: 13.75rem
709
+ max-width: 18rem
680
710
  </style>
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref } from 'vue'
2
+ import { ref, watch } from 'vue'
3
3
  import UTooltip from './UTooltip.vue'
4
4
  import UChip from './UChip.vue'
5
5
 
@@ -36,7 +36,7 @@ const props = defineProps({
36
36
  },
37
37
  placeholder: {
38
38
  type: String,
39
- default: 'Select',
39
+ default: '',
40
40
  },
41
41
  size: {
42
42
  type: String,
@@ -77,6 +77,20 @@ const props = defineProps({
77
77
  })
78
78
 
79
79
  const chipModelVal = ref(true)
80
+
81
+ const placeholderText = ref(props.placeholder)
82
+
83
+ const updateVal = (val) => {
84
+ props.updateFn(val)
85
+ placeholderText.value = val.length ? '' : props.placeholder
86
+ }
87
+
88
+ watch(
89
+ () => props.placeholder,
90
+ (value) => {
91
+ placeholderText.value = value
92
+ }
93
+ )
80
94
  </script>
81
95
 
82
96
  <template>
@@ -112,7 +126,7 @@ const chipModelVal = ref(true)
112
126
  :use-input="useInput"
113
127
  :option-label="optionLabel"
114
128
  :option-value="optionValue"
115
- :placeholder="placeholder"
129
+ :placeholder="placeholderText"
116
130
  bottom-slots
117
131
  outlined
118
132
  hide-bottom-space
@@ -135,7 +149,7 @@ const chipModelVal = ref(true)
135
149
  ...details,
136
150
  })
137
151
  "
138
- @update:model-value="(val) => updateFn(val)"
152
+ @update:model-value="(val) => updateVal(val)"
139
153
  @filter="filterFn"
140
154
  >
141
155
  <template v-slot:no-option>
@@ -204,6 +218,7 @@ const chipModelVal = ref(true)
204
218
  &.q-field--auto-height .q-field__native
205
219
  min-height: $md
206
220
  align-items: center
221
+ padding: 0px
207
222
 
208
223
  &.q-field--outlined .q-field__control
209
224
  border-radius: $xs
@@ -178,8 +178,9 @@ defineExpose({ upload })
178
178
  >
179
179
  <q-card
180
180
  v-for="(file, index) in scope.files"
181
- class="uploader-list q-py-sm q-px-sm"
182
- :class="`list-size-${size}`"
181
+ :class="`uploader-list list-size-${size} ${
182
+ file.__status == 'uploading' ? 'q-py-xs q-px-sm' : 'uploaded-container'
183
+ }`"
183
184
  :key="file.__key"
184
185
  >
185
186
  <!-- When File added but not uploaded on server -->
@@ -450,6 +451,8 @@ defineExpose({ upload })
450
451
  background: $neutral-2
451
452
  border-radius: $xs
452
453
  box-shadow: 0px 0px 2px 0px rgba(16, 17, 20, 0.04)
454
+ .uploaded-container
455
+ padding: $sm
453
456
  .list-items
454
457
  justify-content: space-between
455
458
  flex-wrap: nowrap