@usssa/component-library 1.0.0-alpha.4 → 1.0.0-alpha.41

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.
Files changed (161) hide show
  1. package/README.md +4 -1
  2. package/package.json +6 -4
  3. package/src/App.vue +9 -0
  4. package/src/assets/quasar-logo-vertical.svg +15 -0
  5. package/src/boot/.gitkeep +0 -0
  6. package/src/boot/google-maps.js +11 -0
  7. package/src/components/ComponentLink.vue +26 -0
  8. package/src/components/core/UAvatar.vue +161 -0
  9. package/src/components/core/UAvatarGroup.vue +119 -0
  10. package/src/components/core/UBadgeStd.vue +91 -0
  11. package/src/components/core/UBannerStd.vue +115 -0
  12. package/src/components/core/UBreadCrumbs.vue +67 -0
  13. package/src/components/core/UBtnIcon.vue +159 -0
  14. package/src/components/core/UBtnStd.vue +129 -0
  15. package/src/components/core/UBtnToggle.vue +68 -0
  16. package/src/components/core/UCheckboxStd.vue +95 -0
  17. package/src/components/core/UChip.vue +251 -0
  18. package/src/components/core/UDialogStd.vue +242 -0
  19. package/src/components/core/UDrawer.vue +211 -0
  20. package/src/components/core/UInnerLoader.vue +58 -0
  21. package/src/components/core/UInputAddressLookup.vue +466 -0
  22. package/src/components/core/UInputPhoneStd.vue +295 -0
  23. package/src/components/core/UInputTextStd.vue +293 -0
  24. package/src/components/core/UMenuButtonStd.vue +274 -0
  25. package/src/components/core/UMenuDropdown.vue +77 -0
  26. package/src/components/core/UMenuDropdownAdvancedSearch.vue +262 -0
  27. package/src/components/core/UMenuItem.vue +132 -0
  28. package/src/components/core/UMultiSelectStd.vue +259 -0
  29. package/src/components/core/UPagination.vue +104 -0
  30. package/src/components/core/URadioBtn.vue +116 -0
  31. package/src/components/core/URadioStd.vue +62 -0
  32. package/src/components/core/USelectStd.vue +233 -0
  33. package/src/components/core/UTabBtnStd.vue +167 -0
  34. package/src/components/core/UTable/UTable.vue +93 -0
  35. package/src/components/core/UTable/UTd.vue +63 -0
  36. package/src/components/core/UTable/UTh.vue +48 -0
  37. package/src/components/core/UTable/UTr.vue +20 -0
  38. package/src/components/core/UTableStd.vue +636 -0
  39. package/src/components/core/UTabsStd.vue +111 -0
  40. package/src/components/core/UToggleStd.vue +159 -0
  41. package/src/components/core/UTooltip.vue +71 -0
  42. package/src/components/index.js +66 -0
  43. package/src/composables/useNotify.js +79 -0
  44. package/src/composables/useOverlayLoader.js +23 -0
  45. package/src/css/app.sass +159 -0
  46. package/src/css/colors.sass +101 -0
  47. package/src/css/media.sass +1 -0
  48. package/src/css/quasar.variables.sass +119 -0
  49. package/src/css/typography.sass +0 -0
  50. package/src/css/vars/colors.variables.sass +126 -0
  51. package/src/layouts/MainLayout.vue +173 -0
  52. package/src/pages/AdvancedSearch.vue +512 -0
  53. package/src/pages/Avatar.vue +77 -0
  54. package/src/pages/AvatarGroup.vue +139 -0
  55. package/src/pages/BadgeStd.vue +83 -0
  56. package/src/pages/BannerPage.vue +76 -0
  57. package/src/pages/BreadCrumbs.vue +100 -0
  58. package/src/pages/BtnIcon.vue +120 -0
  59. package/src/pages/BtnStd.vue +138 -0
  60. package/src/pages/BtnToggle.vue +131 -0
  61. package/src/pages/CheckBox.vue +62 -0
  62. package/src/pages/Chip.vue +108 -0
  63. package/src/pages/ComponentBase.vue +54 -0
  64. package/src/pages/Dialog.vue +221 -0
  65. package/src/pages/Drawer.vue +128 -0
  66. package/src/pages/ErrorNotFound.vue +11 -0
  67. package/src/pages/IndexPage.vue +11 -0
  68. package/src/pages/InnerLoader.vue +81 -0
  69. package/src/pages/InputAddressLookup.vue +258 -0
  70. package/src/pages/InputPhone.vue +152 -0
  71. package/src/pages/InputText.vue +140 -0
  72. package/src/pages/MenuButton.vue +194 -0
  73. package/src/pages/MenuDropdown.vue +79 -0
  74. package/src/pages/MenuItem.vue +68 -0
  75. package/src/pages/MultiSelectStd.vue +174 -0
  76. package/src/pages/NotifyPage.vue +109 -0
  77. package/src/pages/OverlayLoader.vue +128 -0
  78. package/src/pages/Pagination.vue +71 -0
  79. package/src/pages/Radio.vue +80 -0
  80. package/src/pages/RadioBtn.vue +104 -0
  81. package/src/pages/SelectStd.vue +160 -0
  82. package/src/pages/TabButtonPage.vue +126 -0
  83. package/src/pages/TablePage.vue +375 -0
  84. package/src/pages/TabsPage.vue +261 -0
  85. package/src/pages/TogglePage.vue +58 -0
  86. package/src/pages/TooltipPage.vue +125 -0
  87. package/src/router/index.js +34 -0
  88. package/src/router/routes.js +149 -0
  89. package/dist/spa/assets/Avatar.45667392.js +0 -9
  90. package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
  91. package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
  92. package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
  93. package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
  94. package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
  95. package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
  96. package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
  97. package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
  98. package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
  99. package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
  100. package/dist/spa/assets/Chip.49ffc857.js +0 -11
  101. package/dist/spa/assets/Chip.74acaa33.css +0 -1
  102. package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
  103. package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
  104. package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
  105. package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
  106. package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
  107. package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
  108. package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
  109. package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
  110. package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
  111. package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
  112. package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
  113. package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
  114. package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
  115. package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
  116. package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
  117. package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
  118. package/dist/spa/assets/QPage.ca395ec4.js +0 -1
  119. package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
  120. package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
  121. package/dist/spa/assets/QSelect.a40eb786.js +0 -1
  122. package/dist/spa/assets/QTabs.72f2507e.js +0 -1
  123. package/dist/spa/assets/QToggle.376c48be.js +0 -1
  124. package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
  125. package/dist/spa/assets/Radio.0ac35288.js +0 -7
  126. package/dist/spa/assets/Radio.aca54a89.css +0 -1
  127. package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
  128. package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
  129. package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
  130. package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
  131. package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
  132. package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
  133. package/dist/spa/assets/TogglePage.8129b631.css +0 -1
  134. package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
  135. package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
  136. package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
  137. package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
  138. package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
  139. package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
  140. package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
  141. package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
  142. package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
  143. package/dist/spa/assets/dom.e9d4ad51.js +0 -1
  144. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
  145. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
  146. package/dist/spa/assets/format.41663636.js +0 -1
  147. package/dist/spa/assets/index.43c62a18.js +0 -21
  148. package/dist/spa/assets/index.4fbd73cf.css +0 -5
  149. package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
  150. package/dist/spa/assets/render.e67ff27a.js +0 -1
  151. package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
  152. package/dist/spa/assets/touch.9135741d.js +0 -1
  153. package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
  154. package/dist/spa/favicon.ico +0 -0
  155. package/dist/spa/icons/caret-down.svg +0 -5
  156. package/dist/spa/icons/circle-xmark.svg +0 -6
  157. package/dist/spa/icons/favicon-128x128.png +0 -0
  158. package/dist/spa/icons/favicon-16x16.png +0 -0
  159. package/dist/spa/icons/favicon-32x32.png +0 -0
  160. package/dist/spa/icons/favicon-96x96.png +0 -0
  161. package/dist/spa/index.html +0 -3
@@ -0,0 +1,132 @@
1
+ <script setup>
2
+ import { computed, ref, watch } from 'vue'
3
+
4
+ const props = defineProps({
5
+ leftIcon: {
6
+ type: String,
7
+ },
8
+ rightIcon: {
9
+ type: String,
10
+ },
11
+ label: {
12
+ type: String,
13
+ },
14
+ selected: {
15
+ type: Boolean,
16
+ default: false,
17
+ },
18
+ destructive: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ iconClass: {
23
+ type: String,
24
+ },
25
+ })
26
+
27
+ const type = ref(props.destructive ? 'destructive' : 'default')
28
+
29
+ watch(
30
+ () => props.destructive,
31
+ (newValue) => {
32
+ type.value = newValue ? 'destructive' : 'default'
33
+ }
34
+ )
35
+
36
+ const emit = defineEmits(['onClick'])
37
+
38
+ const handleClick = () => {
39
+ return emit('onClick')
40
+ }
41
+
42
+ const labelColor = computed(() => {
43
+ if (props.destructive) {
44
+ return 'text-red-6'
45
+ } else if (props.selected) {
46
+ return 'text-primary'
47
+ }
48
+ return 'text-dark'
49
+ })
50
+
51
+ const iconColor = computed(() => {
52
+ if (props.destructive) {
53
+ return 'red-6'
54
+ } else if (props.selected) {
55
+ return 'primary'
56
+ }
57
+ return 'dark'
58
+ })
59
+
60
+ const backgroundColor = computed(() => {
61
+ if (props.selected && !props.destructive) {
62
+ return 'bg-blue-1'
63
+ }
64
+ return 'bg-neutral-1'
65
+ })
66
+ </script>
67
+
68
+ <template>
69
+ <div class="u-menu-link q-mb-xxs">
70
+ <q-item
71
+ clickable
72
+ role="button"
73
+ :class="`${backgroundColor} item-${type}`"
74
+ @click="handleClick"
75
+ :aria-label="label"
76
+ >
77
+ <q-item-section side v-if="leftIcon">
78
+ <q-icon
79
+ :color="iconColor"
80
+ :class="`${leftIcon} ${iconClass}`"
81
+ size="1rem"
82
+ :aria-hidden="true"
83
+ />
84
+ </q-item-section>
85
+
86
+ <slot name="leading_slot"></slot>
87
+
88
+ <q-item-section class="text-body-sm label" :class="labelColor">
89
+ {{ label }}
90
+ </q-item-section>
91
+
92
+ <q-item-section side v-if="rightIcon">
93
+ <q-icon
94
+ :color="iconColor"
95
+ :class="`${rightIcon} ${iconClass}`"
96
+ size="1rem"
97
+ :aria-hidden="true"
98
+ />
99
+ </q-item-section>
100
+
101
+ <slot name="trailing_slot"></slot>
102
+ </q-item>
103
+ </div>
104
+ </template>
105
+
106
+ <style lang="sass">
107
+ .u-menu-link
108
+ .q-item
109
+ border-radius: $xxs
110
+ padding: 0rem $xs
111
+ align-items: center
112
+ display: flex
113
+ min-height: $lg
114
+ gap: $xs
115
+ .q-item__section--avatar
116
+ min-width: 0px
117
+ .q-item__section--side
118
+ padding: 0px
119
+ &.item-destructive
120
+ &.q-hoverable:hover > .q-focus-helper:after
121
+ background: $red-6
122
+ opacity: 1
123
+ &.item-default
124
+ &.q-hoverable:hover > .q-focus-helper:after
125
+ background: $surface-bg-link-hover
126
+ opacity: 1
127
+ .label
128
+ word-break: break-all
129
+
130
+ .u-menu-link:last-child
131
+ margin-bottom : 0
132
+ </style>
@@ -0,0 +1,259 @@
1
+ <script setup>
2
+ import { ref } from 'vue'
3
+ import UTooltip from './UTooltip.vue'
4
+ import UChip from './UChip.vue'
5
+
6
+ const props = defineProps({
7
+ modelValue: {
8
+ type: [Array, String, null],
9
+ required: true,
10
+ },
11
+ color: {
12
+ type: String,
13
+ default: 'neutral-7',
14
+ },
15
+ hintText: {
16
+ type: String,
17
+ },
18
+ hintIcon: {
19
+ type: String,
20
+ default: 'fa-kit-duotone fa-triangle-exclamation',
21
+ },
22
+ isRequired: {
23
+ type: Boolean,
24
+ default: false,
25
+ },
26
+ label: {
27
+ type: String,
28
+ default: 'Label',
29
+ },
30
+ leftIcon: {
31
+ type: String,
32
+ },
33
+ options: {
34
+ type: Array,
35
+ required: true,
36
+ },
37
+ placeholder: {
38
+ type: String,
39
+ default: 'Select',
40
+ },
41
+ size: {
42
+ type: String,
43
+ default: 'md',
44
+ validator: (val) => ['sm', 'md', 'lg'].includes(val),
45
+ },
46
+ toolTipText: {
47
+ type: String,
48
+ },
49
+ updateFn: {
50
+ type: Function,
51
+ required: true,
52
+ },
53
+ filterFn: {
54
+ type: Function,
55
+ required: false,
56
+ },
57
+ useInput: {
58
+ type: Boolean,
59
+ required: false,
60
+ },
61
+ multiSelect: {
62
+ type: Boolean,
63
+ default: true,
64
+ },
65
+ noSearchText: {
66
+ type: String,
67
+ required: false,
68
+ },
69
+ optionValue: {
70
+ type: String,
71
+ default: 'value',
72
+ },
73
+ optionLabel: {
74
+ type: String,
75
+ default: 'label',
76
+ },
77
+ })
78
+
79
+ const chipModelVal = ref(true)
80
+ </script>
81
+
82
+ <template>
83
+ <div class="q-gutter-xs">
84
+ <label for="select" class="row items-center">
85
+ <div class="u-select-label text-body-sm">
86
+ {{ label }}
87
+ <span class="text-red-5 q-ml-xs" v-if="isRequired">*</span>
88
+ </div>
89
+
90
+ <q-icon
91
+ class="q-ml-xs fa-kit-duotone fa-circle-info cursor-pointer"
92
+ v-if="toolTipText"
93
+ size="1rem"
94
+ color="neutral-9"
95
+ aria-hidden="true"
96
+ >
97
+ <UTooltip
98
+ :description="toolTipText"
99
+ anchor="top middle"
100
+ self="bottom middle"
101
+ />
102
+ </q-icon>
103
+ </label>
104
+ <q-select
105
+ class="u-multi-select"
106
+ id="multi-select"
107
+ :class="`field-${size}`"
108
+ :modelValue="modelValue"
109
+ :color="color"
110
+ multiple
111
+ :options="options"
112
+ :use-input="useInput"
113
+ :option-label="optionLabel"
114
+ :option-value="optionValue"
115
+ :placeholder="placeholder"
116
+ bottom-slots
117
+ outlined
118
+ hide-bottom-space
119
+ use-chips
120
+ :menu-offset="[0, 5]"
121
+ options-selected-class="primary bg-blue-1"
122
+ popup-content-class="u-option-menu"
123
+ v-bind="$attrs"
124
+ @add="
125
+ (details) =>
126
+ updateFn({
127
+ ...details,
128
+ multiSelect,
129
+ })
130
+ "
131
+ @remove="
132
+ (details) =>
133
+ updateFn({
134
+ remove: true,
135
+ ...details,
136
+ })
137
+ "
138
+ @update:model-value="(val) => updateFn(val)"
139
+ @filter="filterFn"
140
+ >
141
+ <template v-slot:no-option>
142
+ <q-item>
143
+ <q-item-section class="text-grey">
144
+ {{ noSearchText }}
145
+ </q-item-section>
146
+ </q-item>
147
+ </template>
148
+
149
+ <template v-if="leftIcon" v-slot:prepend>
150
+ <q-icon :class="leftIcon" size="1rem" />
151
+ </template>
152
+
153
+ <template v-if="hintText" v-slot:hint>
154
+ <div class="row no-wrap items-center">
155
+ <q-icon :class="hintIcon" size="1rem" v-if="hintIcon" />
156
+
157
+ <div class="q-mx-xxs text-body-xs">
158
+ {{ hintText }}
159
+ </div>
160
+ </div>
161
+ </template>
162
+
163
+ <template v-slot:option="scope">
164
+ <q-item class="items-center u-custom-options" v-bind="scope.itemProps">
165
+ <div class="q-pr-xs" v-if="scope.opt.icon">
166
+ <q-icon :class="scope.opt.icon" color="neutral-13" size="1rem" />
167
+ </div>
168
+
169
+ <q-item-section>
170
+ <q-item-label class="text-body-sm">
171
+ {{ scope.opt.label }}
172
+ </q-item-label>
173
+ <q-item-label caption v-if="scope.opt.description">
174
+ {{ scope.opt.description }}
175
+ </q-item-label>
176
+ </q-item-section>
177
+
178
+ <q-item-section v-if="scope.selected" side>
179
+ <q-icon
180
+ class="fa-kit-duotone fa-circle-check"
181
+ color="primary"
182
+ size="1rem"
183
+ />
184
+ </q-item-section>
185
+ </q-item>
186
+ </template>
187
+ <template v-slot:selected-item="scope">
188
+ <UChip
189
+ v-model="chipModelVal"
190
+ :chipLabel="scope.opt.label"
191
+ :removable="true"
192
+ @remove="scope.removeAtIndex(scope.index)"
193
+ :tabindex="scope.tabindex"
194
+ dense
195
+ />
196
+ </template>
197
+ </q-select>
198
+ </div>
199
+ </template>
200
+
201
+ <style lang="sass">
202
+ .u-multi-select
203
+ &.q-field--auto-height .q-field__control,
204
+ &.q-field--auto-height .q-field__native
205
+ min-height: $md
206
+ align-items: center
207
+
208
+ &.q-field--outlined .q-field__control
209
+ border-radius: $xs
210
+ padding: 0 $xs
211
+
212
+ &::before
213
+ background: white
214
+ border: 1.5px solid $neutral-4
215
+
216
+ &.field-sm
217
+ .q-field__marginal
218
+ height: $md
219
+
220
+ &.field-md
221
+ .q-field__marginal
222
+ height: $lg
223
+
224
+ &.field-lg
225
+ .q-field__marginal
226
+ height: $xl
227
+
228
+ &:hover .q-field__control::before
229
+ border: 1.5px solid $primary
230
+
231
+ &.q-field--with-bottom
232
+ padding-bottom: 0
233
+
234
+ .q-field__control:focus-within
235
+ box-shadow : 0 0 0 2px $primary-transparent
236
+
237
+ .q-field__bottom
238
+ padding: 4px 0 0 0
239
+
240
+ .q-chip__content
241
+ color: $neutral-9
242
+
243
+ .q-field__prepend
244
+ padding-right: $xs
245
+
246
+ .u-option-menu
247
+ border-radius: $xs
248
+ box-shadow: $shadow-2
249
+ max-height: 11.25rem !important
250
+ width: 18rem
251
+ overflow-y: auto
252
+ scrollbar-width: none
253
+
254
+ .u-custom-options
255
+ margin: $xxs
256
+ border-radius: $xxs
257
+ padding: $xs
258
+ min-height: $lg
259
+ </style>
@@ -0,0 +1,104 @@
1
+ <script setup>
2
+ import { ref, watch } from 'vue'
3
+ import USelectStd from './USelectStd.vue'
4
+ const props = defineProps({
5
+ modelValue: {
6
+ type: Number,
7
+ default: 1,
8
+ },
9
+ rowPerPage: {
10
+ type: Number,
11
+ default: 5,
12
+ },
13
+ maxPageLink: {
14
+ //Maximum number of page links to display at a time
15
+ type: Number,
16
+ default: 2,
17
+ },
18
+ maxPages: {
19
+ type: Number,
20
+ default: 10,
21
+ },
22
+ perPageOptions: {
23
+ type: Array,
24
+ default: () => [
25
+ { label: '5 / per page', value: 5 },
26
+ { label: '10 / per page', value: 10 },
27
+ { label: '15 / per page', value: 15 },
28
+ { label: '20 / per page', value: 20 },
29
+ ],
30
+ },
31
+ })
32
+ const emit = defineEmits(['update:modelValue', 'onRowChange', 'onPageChange'])
33
+ const rowPerPage = ref(props.rowPerPage)
34
+ const currentPage = ref(props.modelValue)
35
+
36
+ watch(currentPage, (newValue) => {
37
+ emit('update:modelValue', newValue)
38
+ emit('onPageChange', newValue)
39
+ })
40
+ const onPageChange = (newPage) => {
41
+ currentPage.value = newPage
42
+ }
43
+ const onRowChange = (newRowPerPage) => {
44
+ emit('onRowChange', newRowPerPage)
45
+ }
46
+ </script>
47
+
48
+ <template>
49
+ <div class="row u-pagination-container">
50
+ <q-pagination
51
+ class="u-pagination"
52
+ v-model="currentPage"
53
+ direction-links
54
+ flat
55
+ color="dark"
56
+ active-color="primary"
57
+ :max="maxPages"
58
+ :max-pages="maxPageLink"
59
+ boundary-numbers
60
+ @update:model-value="onPageChange"
61
+ gutter="sm"
62
+ />
63
+
64
+ <USelectStd
65
+ class="q-gutter-x-sm text-body-sm perpage-dropdown"
66
+ v-model="rowPerPage"
67
+ color="primary"
68
+ :options="perPageOptions"
69
+ popupClass="pagination-dropdown"
70
+ @update:model-value="onRowChange"
71
+ />
72
+ </div>
73
+ </template>
74
+
75
+ <style lang="sass">
76
+ .pagination-dropdown
77
+ width: auto !important
78
+
79
+ .perpage-dropdown
80
+ width: 9.375rem
81
+ .q-field__marginal
82
+ padding-left: $xs
83
+ .q-field--outlined .q-field__control
84
+ display: inline-flex
85
+ width: 8.75rem
86
+
87
+ .u-pagination
88
+ .q-icon
89
+ font-size: $ba
90
+ .q-btn
91
+ background: $neutral-1
92
+ border-radius: $xs
93
+ width: $md
94
+ height: $md
95
+ font-size: $sm
96
+ font-style: normal
97
+ font-weight: 500
98
+ line-height: 1.25rem
99
+ letter-spacing: .03333rem
100
+ &:hover
101
+ background: $blue-1
102
+ &::before
103
+ box-shadow: none
104
+ </style>
@@ -0,0 +1,116 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+ import URadioStd from './URadioStd.vue'
4
+ const props = defineProps({
5
+ iconClass: {
6
+ type: String,
7
+ default: '',
8
+ },
9
+ label: {
10
+ type: String,
11
+ default: '',
12
+ },
13
+ description: {
14
+ type: String,
15
+ default: '',
16
+ },
17
+ value: {
18
+ type: String,
19
+ default: '',
20
+ },
21
+ image: {
22
+ type: String,
23
+ default: '',
24
+ },
25
+ imgAriaLabel: {
26
+ type: String,
27
+ default: '',
28
+ },
29
+ altText: {
30
+ type: String,
31
+ default: '',
32
+ },
33
+ iconColor: {
34
+ type: String,
35
+ default: 'primary',
36
+ },
37
+
38
+ id: { String },
39
+ })
40
+
41
+ const emit = defineEmits(['onClick', 'onButtonClick'])
42
+ const model = defineModel()
43
+
44
+ const handleChange = () => {
45
+ model.value = props.value
46
+ }
47
+
48
+ const activeClass = computed(() => {
49
+ if (model.value === props.value) {
50
+ return 'active'
51
+ }
52
+ return ''
53
+ })
54
+ </script>
55
+
56
+ <template>
57
+ <q-btn flat class="u-radio-btn" @click="handleChange" :class="activeClass">
58
+ <div class="radio-btn-content flex items-center">
59
+ <URadioStd v-model="model" :value="value" :id="id" :aria-label="label" />
60
+ <div class="button-text">
61
+ <div class="text-caption-lg">{{ label }}</div>
62
+ <div class="description-text text-body-sm">{{ description }}</div>
63
+ </div>
64
+
65
+ <img
66
+ class="radio-btn-img"
67
+ v-if="image"
68
+ size="1.5rem"
69
+ :src="image"
70
+ :alt="altText"
71
+ :aria-label="imgAriaLabel"
72
+ />
73
+ <q-icon
74
+ v-if="iconClass"
75
+ :aria-label="imgAriaLabel"
76
+ :color="iconColor"
77
+ size="1.5rem"
78
+ :class="iconClass"
79
+ />
80
+ </div>
81
+ </q-btn>
82
+ </template>
83
+
84
+ <style lang="sass">
85
+ .u-radio-btn
86
+ padding: $xs $sm
87
+ border: 2px solid $neutral-4
88
+ border-radius: $xs
89
+ min-height: $lg
90
+ .q-radio__label
91
+ padding-left: 0 !important
92
+
93
+ .radio-btn-content
94
+ gap: $xs
95
+
96
+ .button-text
97
+ text-align: left !important
98
+ min-width: 6.063rem
99
+
100
+ .description-text
101
+ color: $description
102
+
103
+ .radio-btn-img
104
+ width: $ms
105
+ height: $ms
106
+
107
+ .active
108
+ border: 2px solid $primary
109
+
110
+ .u-radio-btn:hover
111
+ border: 2px solid $primary
112
+ background-color: $primary-transparent
113
+
114
+ .q-radio .q-radio__inner
115
+ color: $primary !important
116
+ </style>
@@ -0,0 +1,62 @@
1
+ <script setup>
2
+ import { onMounted } from 'vue'
3
+
4
+ const props = defineProps({
5
+ label: {
6
+ type: String,
7
+ },
8
+ ariaLabel: {
9
+ type: String,
10
+ },
11
+ value: {
12
+ type: String,
13
+ },
14
+ disable: {
15
+ type: Boolean,
16
+ default: false,
17
+ },
18
+ id: {
19
+ type: [String, Number],
20
+ default: 'u-radio',
21
+ required: true, // it is required for to match accessibility crieteria
22
+ },
23
+ })
24
+ onMounted(() => {
25
+ const radioElement = document.getElementById(props.id)
26
+ if (radioElement) {
27
+ const inputElement = radioElement.querySelector('input')
28
+ inputElement.id = props.id
29
+ }
30
+ })
31
+
32
+ const radioValue = defineModel()
33
+ </script>
34
+
35
+ <template>
36
+ <label class="hidden" :for="id" v-if="label || ariaLabel">{{
37
+ label || ariaLabel
38
+ }}</label>
39
+ <q-radio
40
+ v-model="radioValue"
41
+ class="u-radio"
42
+ :val="value"
43
+ color="primary"
44
+ keep-color
45
+ dense
46
+ size="3rem"
47
+ :disable="disable"
48
+ :id="id"
49
+ >
50
+ <div class="text-center text-caption-lg radio-label" v-if="label">
51
+ {{ label }}
52
+ </div>
53
+ </q-radio>
54
+ </template>
55
+
56
+ <style lang="sass">
57
+ .u-radio
58
+ .q-radio__label
59
+ padding-left: $xs !important
60
+ .radio-label
61
+ color: $primary
62
+ </style>