@usssa/component-library 1.0.0-alpha.1 → 1.0.0-alpha.100

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 (128) hide show
  1. package/README.md +18 -37
  2. package/package.json +17 -6
  3. package/src/assets/files.png +0 -0
  4. package/src/assets/logo.svg +19 -0
  5. package/src/assets/no-result.png +0 -0
  6. package/src/assets/quasar-logo-vertical.svg +15 -0
  7. package/src/components/ComponentLink.vue +26 -0
  8. package/src/components/core/UAvatar.vue +179 -0
  9. package/src/components/core/UAvatarGroup.vue +120 -0
  10. package/src/components/core/UBadgeStd.vue +91 -0
  11. package/src/components/core/UBannerStd.vue +142 -0
  12. package/src/components/core/UBreadCrumbs.vue +67 -0
  13. package/src/components/core/UBtnIcon.vue +158 -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 +244 -0
  19. package/src/components/core/UDrawer.vue +235 -0
  20. package/src/components/core/UInnerLoader.vue +58 -0
  21. package/src/components/core/UInputAddressLookup.vue +470 -0
  22. package/src/components/core/UInputPhoneStd.vue +299 -0
  23. package/src/components/core/UInputTextStd.vue +299 -0
  24. package/src/components/core/UInputTypeaheadAdvanceSearch.vue +59 -0
  25. package/src/components/core/UMenuButtonStd.vue +274 -0
  26. package/src/components/core/UMenuDropdown.vue +72 -0
  27. package/src/components/core/UMenuDropdownAdvancedSearch.vue +301 -0
  28. package/src/components/core/UMenuItem.vue +134 -0
  29. package/src/components/core/UMenuSearch.vue +752 -0
  30. package/src/components/core/UMultiSelectStd.vue +274 -0
  31. package/src/components/core/UPagination.vue +104 -0
  32. package/src/components/core/URadioBtn.vue +116 -0
  33. package/src/components/core/URadioStd.vue +62 -0
  34. package/src/components/core/USelectStd.vue +250 -0
  35. package/src/components/core/UTabBtnStd.vue +176 -0
  36. package/src/components/core/UTable/UTable.vue +93 -0
  37. package/src/components/core/UTable/UTd.vue +63 -0
  38. package/src/components/core/UTable/UTh.vue +48 -0
  39. package/src/components/core/UTable/UTr.vue +20 -0
  40. package/src/components/core/UTableStd.vue +1003 -0
  41. package/src/components/core/UTabsStd.vue +111 -0
  42. package/src/components/core/UToggleStd.vue +159 -0
  43. package/src/components/core/UToolbar.vue +94 -0
  44. package/src/components/core/UTooltip.vue +73 -0
  45. package/src/components/core/UUploader.vue +497 -0
  46. package/src/components/index.js +75 -0
  47. package/src/composables/useNotify.js +79 -0
  48. package/src/composables/useOverlayLoader.js +23 -0
  49. package/src/css/app.sass +159 -0
  50. package/src/css/colors.sass +101 -0
  51. package/src/css/media.sass +1 -0
  52. package/src/css/quasar.variables.sass +121 -0
  53. package/src/css/typography.sass +0 -0
  54. package/src/css/vars/colors.variables.sass +126 -0
  55. package/src/utils/data.ts +146 -0
  56. package/dist/spa/assets/Avatar.45667392.js +0 -9
  57. package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
  58. package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
  59. package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
  60. package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
  61. package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
  62. package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
  63. package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
  64. package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
  65. package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
  66. package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
  67. package/dist/spa/assets/Chip.49ffc857.js +0 -11
  68. package/dist/spa/assets/Chip.74acaa33.css +0 -1
  69. package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
  70. package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
  71. package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
  72. package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
  73. package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
  74. package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
  75. package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
  76. package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
  77. package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
  78. package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
  79. package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
  80. package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
  81. package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
  82. package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
  83. package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
  84. package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
  85. package/dist/spa/assets/QPage.ca395ec4.js +0 -1
  86. package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
  87. package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
  88. package/dist/spa/assets/QSelect.a40eb786.js +0 -1
  89. package/dist/spa/assets/QTabs.72f2507e.js +0 -1
  90. package/dist/spa/assets/QToggle.376c48be.js +0 -1
  91. package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
  92. package/dist/spa/assets/Radio.0ac35288.js +0 -7
  93. package/dist/spa/assets/Radio.aca54a89.css +0 -1
  94. package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
  95. package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
  96. package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
  97. package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
  98. package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
  99. package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
  100. package/dist/spa/assets/TogglePage.8129b631.css +0 -1
  101. package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
  102. package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
  103. package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
  104. package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
  105. package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
  106. package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
  107. package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
  108. package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
  109. package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
  110. package/dist/spa/assets/dom.e9d4ad51.js +0 -1
  111. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
  112. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
  113. package/dist/spa/assets/format.41663636.js +0 -1
  114. package/dist/spa/assets/index.43c62a18.js +0 -21
  115. package/dist/spa/assets/index.4fbd73cf.css +0 -5
  116. package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
  117. package/dist/spa/assets/render.e67ff27a.js +0 -1
  118. package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
  119. package/dist/spa/assets/touch.9135741d.js +0 -1
  120. package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
  121. package/dist/spa/favicon.ico +0 -0
  122. package/dist/spa/icons/caret-down.svg +0 -5
  123. package/dist/spa/icons/circle-xmark.svg +0 -6
  124. package/dist/spa/icons/favicon-128x128.png +0 -0
  125. package/dist/spa/icons/favicon-16x16.png +0 -0
  126. package/dist/spa/icons/favicon-32x32.png +0 -0
  127. package/dist/spa/icons/favicon-96x96.png +0 -0
  128. package/dist/spa/index.html +0 -3
@@ -0,0 +1,274 @@
1
+ <script setup>
2
+ import { ref, watch } from 'vue'
3
+ import UChip from './UChip.vue'
4
+ import UTooltip from './UTooltip.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: '',
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
+
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
+ )
94
+ </script>
95
+
96
+ <template>
97
+ <div class="q-gutter-xs">
98
+ <label for="select" class="row items-center">
99
+ <div class="u-select-label text-body-sm">
100
+ <span>{{ label }}</span>
101
+ <span v-if="isRequired" class="text-red-5 q-ml-xs">*</span>
102
+ </div>
103
+
104
+ <q-icon
105
+ v-if="toolTipText"
106
+ class="q-ml-xs fa-kit-duotone fa-circle-info cursor-pointer"
107
+ aria-hidden="true"
108
+ color="neutral-9"
109
+ size="1rem"
110
+ >
111
+ <UTooltip
112
+ anchor="top middle"
113
+ :description="toolTipText"
114
+ self="bottom middle"
115
+ />
116
+ </q-icon>
117
+ </label>
118
+ <q-select
119
+ v-bind="$attrs"
120
+ class="u-multi-select"
121
+ :class="`field-${size}`"
122
+ options-selected-class="primary bg-blue-1"
123
+ bottom-slots
124
+ :color="color"
125
+ hide-bottom-space
126
+ id="multi-select"
127
+ :menu-offset="[0, 5]"
128
+ :modelValue="modelValue"
129
+ multiple
130
+ :option-label="optionLabel"
131
+ :option-value="optionValue"
132
+ :options="options"
133
+ outlined
134
+ :placeholder="placeholderText"
135
+ popup-content-class="u-option-menu"
136
+ use-chips
137
+ :use-input="useInput"
138
+ @add="
139
+ (details) =>
140
+ updateFn({
141
+ ...details,
142
+ multiSelect,
143
+ })
144
+ "
145
+ @filter="filterFn"
146
+ @remove="
147
+ (details) =>
148
+ updateFn({
149
+ remove: true,
150
+ ...details,
151
+ })
152
+ "
153
+ @update:model-value="(val) => updateVal(val)"
154
+ >
155
+ <template v-slot:no-option>
156
+ <q-item>
157
+ <q-item-section class="text-grey">
158
+ {{ noSearchText }}
159
+ </q-item-section>
160
+ </q-item>
161
+ </template>
162
+
163
+ <template v-if="leftIcon" v-slot:prepend>
164
+ <q-icon :class="leftIcon" size="1rem" />
165
+ </template>
166
+
167
+ <template v-if="hintText" v-slot:hint>
168
+ <div class="row no-wrap items-center">
169
+ <q-icon v-if="hintIcon" :class="hintIcon" size="1rem"/>
170
+
171
+ <div class="q-mx-xxs text-body-xs">
172
+ {{ hintText }}
173
+ </div>
174
+ </div>
175
+ </template>
176
+
177
+ <template v-slot:option="scope">
178
+ <q-item v-bind="scope.itemProps" class="items-center u-custom-options">
179
+ <div v-if="scope.opt.icon" class="q-pr-xs">
180
+ <q-icon :class="scope.opt.icon" color="neutral-13" size="1rem" />
181
+ </div>
182
+
183
+ <q-item-section>
184
+ <q-item-label class="text-body-sm">
185
+ {{ scope.opt.label }}
186
+ </q-item-label>
187
+ <q-item-label caption v-if="scope.opt.description">
188
+ {{ scope.opt.description }}
189
+ </q-item-label>
190
+ </q-item-section>
191
+
192
+ <q-item-section v-if="scope.selected" side>
193
+ <q-icon
194
+ class="fa-kit-duotone fa-circle-check"
195
+ color="primary"
196
+ size="1rem"
197
+ />
198
+ </q-item-section>
199
+ </q-item>
200
+ </template>
201
+ <template v-slot:selected-item="scope">
202
+ <UChip
203
+ v-model="chipModelVal"
204
+ dense
205
+ :chipLabel="scope.opt.label"
206
+ :removable="true"
207
+ :tabindex="scope.tabindex"
208
+ @remove="scope.removeAtIndex(scope.index)"
209
+ />
210
+ </template>
211
+ </q-select>
212
+ </div>
213
+ </template>
214
+
215
+ <style lang="sass">
216
+ .u-multi-select
217
+ &.q-field--auto-height .q-field__control,
218
+ &.q-field--auto-height .q-field__native
219
+ min-height: $md
220
+ align-items: center
221
+ padding: 0px
222
+
223
+ &.q-field--outlined .q-field__control
224
+ border-radius: $xs
225
+ padding: 0 $xs
226
+
227
+ &::before
228
+ background: white
229
+ border: 1.5px solid $neutral-4
230
+
231
+ &.field-sm
232
+ .q-field__marginal
233
+ height: $md
234
+
235
+ &.field-md
236
+ .q-field__marginal
237
+ height: $lg
238
+
239
+ &.field-lg
240
+ .q-field__marginal
241
+ height: $xl
242
+
243
+ &:hover .q-field__control::before
244
+ border: 1.5px solid $primary
245
+
246
+ &.q-field--with-bottom
247
+ padding-bottom: 0
248
+
249
+ .q-field__control:focus-within
250
+ box-shadow : 0 0 0 2px $primary-transparent
251
+
252
+ .q-field__bottom
253
+ padding: 4px 0 0 0
254
+
255
+ .q-chip__content
256
+ color: $neutral-9
257
+
258
+ .q-field__prepend
259
+ padding-right: $xs
260
+
261
+ .u-option-menu
262
+ border-radius: $xs
263
+ box-shadow: $shadow-2
264
+ max-height: 11.25rem !important
265
+ width: 18rem
266
+ overflow-y: auto
267
+ scrollbar-width: none
268
+
269
+ .u-custom-options
270
+ margin: $xxs
271
+ border-radius: $xxs
272
+ padding: $xs
273
+ min-height: $lg
274
+ </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>