@usssa/component-library 1.0.0-alpha.125 → 1.0.0-alpha.127

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.125
1
+ # Component Library v1.0.0-alpha.126
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.125",
3
+ "version": "1.0.0-alpha.127",
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,11 +1,12 @@
1
1
  <script setup>
2
2
  import { computed } from 'vue'
3
3
  import UBtnStd from './UBtnStd.vue'
4
+ import { useScreenType } from '../../composables/useScreenType'
4
5
 
5
6
  const emit = defineEmits(['primaryAction', 'secondaryAction'])
6
7
 
7
8
  const props = defineProps({
8
- dataTestId:{
9
+ dataTestId: {
9
10
  type: String,
10
11
  default: 'banner-std',
11
12
  },
@@ -13,6 +14,10 @@ const props = defineProps({
13
14
  type: String,
14
15
  default: 'fa-kit-duotone fa-circle-info',
15
16
  },
17
+ label: {
18
+ type: String,
19
+ default: '',
20
+ },
16
21
  message: {
17
22
  type: String,
18
23
  default: '',
@@ -31,7 +36,7 @@ const props = defineProps({
31
36
  },
32
37
  showBorder: {
33
38
  type: Boolean,
34
- default: true
39
+ default: true,
35
40
  },
36
41
  type: {
37
42
  type: String,
@@ -39,6 +44,8 @@ const props = defineProps({
39
44
  },
40
45
  })
41
46
 
47
+ const $screen = useScreenType()
48
+
42
49
  const bordered = computed(() => {
43
50
  if (props.showBorder) {
44
51
  return 'bordered'
@@ -57,10 +64,13 @@ const handleSecondaryActionClick = () => {
57
64
 
58
65
  <template>
59
66
  <q-banner
60
- v-if="show && message"
61
- :class="`u-banner u-banner-${type} ${
62
- !icon ? 'no-padding-label' : ''
63
- } ${bordered}`"
67
+ v-if="show && (message.trim() || label.trim())"
68
+ :class="[
69
+ `u-banner u-banner-${type}`,
70
+ !icon ? 'no-padding-label' : '',
71
+ bordered,
72
+ $screen.isMobile ? 'u-banner-sm' : 'u-banner-md',
73
+ ]"
64
74
  :dataTestId="dataTestId"
65
75
  inline-actions
66
76
  tabindex="0"
@@ -72,41 +82,68 @@ const handleSecondaryActionClick = () => {
72
82
  alt="Banner Info Icon"
73
83
  aria-label="Banner Icon"
74
84
  :color="type"
75
- size="1.5rem"
85
+ size="sm"
76
86
  />
77
87
  </template>
78
- <span class="text-caption-lg">{{ message }}</span>
88
+
89
+ <div>
90
+ <span v-if="!label" class="text-caption-lg">{{ message }}</span>
91
+ <div v-else class="column">
92
+ <span class="text-caption-lg">{{ label }}</span>
93
+ <span class="text-body-sm">{{ message }}</span>
94
+ </div>
95
+ </div>
96
+
79
97
  <template v-slot:action>
80
- <u-btn-std
81
- v-if="primaryActionLabel"
82
- :color="type"
83
- :flat="false"
84
- :label="primaryActionLabel"
85
- size="md"
86
- @onClick="handlePrimaryActionClick"
87
- />
88
- <u-btn-std
89
- v-if="secondaryActionLabel"
90
- class="q-ml-sm"
91
- :color="type"
92
- :label="secondaryActionLabel"
93
- :outline="true"
94
- size="md"
95
- @onClick="handleSecondaryActionClick"
96
- />
98
+ <div :class="['row', $screen.isMobile ? 'full-width q-mt-ba' : '']">
99
+ <u-btn-std
100
+ v-if="primaryActionLabel"
101
+ :color="type"
102
+ :label="primaryActionLabel"
103
+ :outline="true"
104
+ size="md"
105
+ @onClick="handlePrimaryActionClick"
106
+ />
107
+ <u-btn-std
108
+ v-if="secondaryActionLabel"
109
+ :color="type"
110
+ :label="secondaryActionLabel"
111
+ size="md"
112
+ @onClick="handleSecondaryActionClick"
113
+ />
114
+ </div>
97
115
  </template>
98
116
  </q-banner>
99
117
  </template>
100
118
 
101
119
  <style lang="sass">
102
120
  .u-banner
103
- min-width: 24.563rem
104
- padding: $sm
105
121
  .q-banner__avatar
106
122
  align-self: center
107
123
 
108
124
  .q-banner__content
109
125
  padding-left: $xs !important
126
+ word-break: break-word
127
+ overflow-wrap: break-word
128
+
129
+ .u-banner-sm
130
+ flex-wrap: wrap
131
+ padding: $ba
132
+ .q-banner__actions
133
+ width: 100%
134
+ padding-left: 0px !important
135
+ >div
136
+ gap: $sm
137
+ .q-btn
138
+ flex: 1
139
+ min-width: 0
140
+
141
+ .u-banner-md
142
+ padding: $sm
143
+ .q-banner__actions
144
+ padding-left: $xs
145
+ >div
146
+ gap: $xs !important
110
147
 
111
148
  .u-banner-positive
112
149
  background: $green-1 !important
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
2
  defineProps({
3
- dataTestId:{
4
- type: String,
5
- default: 'inner-loader'
3
+ dataTestId: {
4
+ type: String,
5
+ default: 'inner-loader',
6
6
  },
7
7
  image: {
8
8
  type: String,
@@ -30,11 +30,16 @@ defineProps({
30
30
  type: String,
31
31
  requried: false,
32
32
  default: '2rem',
33
- }
33
+ },
34
34
  })
35
35
  </script>
36
36
  <template>
37
- <q-inner-loading v-bind="$attrs" color="primary" :dataTestId="dataTestId" :showing="loading" >
37
+ <q-inner-loading
38
+ v-bind="$attrs"
39
+ color="primary"
40
+ :dataTestId="dataTestId"
41
+ :showing="loading"
42
+ >
38
43
  <div class="column items-center q-gutter-y-sm">
39
44
  <img
40
45
  class="q-my-none"
@@ -44,10 +49,10 @@ defineProps({
44
49
  :width="imageWidth"
45
50
  />
46
51
  <div class="row items-center">
47
- <div v-if="loadingMessage">
52
+ <div v-if="loadingMessage" class="text-center">
48
53
  <span class="message q-mr-sm">{{ loadingMessage }}</span>
54
+ <q-spinner-facebook :color="spinnerColor" :size="spinnerSize" />
49
55
  </div>
50
- <q-spinner-facebook :color="spinnerColor" :size="spinnerSize" />
51
56
  </div>
52
57
  </div>
53
58
  </q-inner-loading>