@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.
- package/README.md +4 -1
- package/package.json +6 -4
- package/src/App.vue +9 -0
- package/src/assets/quasar-logo-vertical.svg +15 -0
- package/src/boot/.gitkeep +0 -0
- package/src/boot/google-maps.js +11 -0
- package/src/components/ComponentLink.vue +26 -0
- package/src/components/core/UAvatar.vue +161 -0
- package/src/components/core/UAvatarGroup.vue +119 -0
- package/src/components/core/UBadgeStd.vue +91 -0
- package/src/components/core/UBannerStd.vue +115 -0
- package/src/components/core/UBreadCrumbs.vue +67 -0
- package/src/components/core/UBtnIcon.vue +159 -0
- package/src/components/core/UBtnStd.vue +129 -0
- package/src/components/core/UBtnToggle.vue +68 -0
- package/src/components/core/UCheckboxStd.vue +95 -0
- package/src/components/core/UChip.vue +251 -0
- package/src/components/core/UDialogStd.vue +242 -0
- package/src/components/core/UDrawer.vue +211 -0
- package/src/components/core/UInnerLoader.vue +58 -0
- package/src/components/core/UInputAddressLookup.vue +466 -0
- package/src/components/core/UInputPhoneStd.vue +295 -0
- package/src/components/core/UInputTextStd.vue +293 -0
- package/src/components/core/UMenuButtonStd.vue +274 -0
- package/src/components/core/UMenuDropdown.vue +77 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +262 -0
- package/src/components/core/UMenuItem.vue +132 -0
- package/src/components/core/UMultiSelectStd.vue +259 -0
- package/src/components/core/UPagination.vue +104 -0
- package/src/components/core/URadioBtn.vue +116 -0
- package/src/components/core/URadioStd.vue +62 -0
- package/src/components/core/USelectStd.vue +233 -0
- package/src/components/core/UTabBtnStd.vue +167 -0
- package/src/components/core/UTable/UTable.vue +93 -0
- package/src/components/core/UTable/UTd.vue +63 -0
- package/src/components/core/UTable/UTh.vue +48 -0
- package/src/components/core/UTable/UTr.vue +20 -0
- package/src/components/core/UTableStd.vue +636 -0
- package/src/components/core/UTabsStd.vue +111 -0
- package/src/components/core/UToggleStd.vue +159 -0
- package/src/components/core/UTooltip.vue +71 -0
- package/src/components/index.js +66 -0
- package/src/composables/useNotify.js +79 -0
- package/src/composables/useOverlayLoader.js +23 -0
- package/src/css/app.sass +159 -0
- package/src/css/colors.sass +101 -0
- package/src/css/media.sass +1 -0
- package/src/css/quasar.variables.sass +119 -0
- package/src/css/typography.sass +0 -0
- package/src/css/vars/colors.variables.sass +126 -0
- package/src/layouts/MainLayout.vue +173 -0
- package/src/pages/AdvancedSearch.vue +512 -0
- package/src/pages/Avatar.vue +77 -0
- package/src/pages/AvatarGroup.vue +139 -0
- package/src/pages/BadgeStd.vue +83 -0
- package/src/pages/BannerPage.vue +76 -0
- package/src/pages/BreadCrumbs.vue +100 -0
- package/src/pages/BtnIcon.vue +120 -0
- package/src/pages/BtnStd.vue +138 -0
- package/src/pages/BtnToggle.vue +131 -0
- package/src/pages/CheckBox.vue +62 -0
- package/src/pages/Chip.vue +108 -0
- package/src/pages/ComponentBase.vue +54 -0
- package/src/pages/Dialog.vue +221 -0
- package/src/pages/Drawer.vue +128 -0
- package/src/pages/ErrorNotFound.vue +11 -0
- package/src/pages/IndexPage.vue +11 -0
- package/src/pages/InnerLoader.vue +81 -0
- package/src/pages/InputAddressLookup.vue +258 -0
- package/src/pages/InputPhone.vue +152 -0
- package/src/pages/InputText.vue +140 -0
- package/src/pages/MenuButton.vue +194 -0
- package/src/pages/MenuDropdown.vue +79 -0
- package/src/pages/MenuItem.vue +68 -0
- package/src/pages/MultiSelectStd.vue +174 -0
- package/src/pages/NotifyPage.vue +109 -0
- package/src/pages/OverlayLoader.vue +128 -0
- package/src/pages/Pagination.vue +71 -0
- package/src/pages/Radio.vue +80 -0
- package/src/pages/RadioBtn.vue +104 -0
- package/src/pages/SelectStd.vue +160 -0
- package/src/pages/TabButtonPage.vue +126 -0
- package/src/pages/TablePage.vue +375 -0
- package/src/pages/TabsPage.vue +261 -0
- package/src/pages/TogglePage.vue +58 -0
- package/src/pages/TooltipPage.vue +125 -0
- package/src/router/index.js +34 -0
- package/src/router/routes.js +149 -0
- package/dist/spa/assets/Avatar.45667392.js +0 -9
- package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
- package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
- package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
- package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
- package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
- package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
- package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
- package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
- package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
- package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
- package/dist/spa/assets/Chip.49ffc857.js +0 -11
- package/dist/spa/assets/Chip.74acaa33.css +0 -1
- package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
- package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
- package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
- package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
- package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
- package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
- package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
- package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
- package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
- package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
- package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
- package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
- package/dist/spa/assets/QPage.ca395ec4.js +0 -1
- package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
- package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
- package/dist/spa/assets/QSelect.a40eb786.js +0 -1
- package/dist/spa/assets/QTabs.72f2507e.js +0 -1
- package/dist/spa/assets/QToggle.376c48be.js +0 -1
- package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
- package/dist/spa/assets/Radio.0ac35288.js +0 -7
- package/dist/spa/assets/Radio.aca54a89.css +0 -1
- package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
- package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
- package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
- package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
- package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
- package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
- package/dist/spa/assets/TogglePage.8129b631.css +0 -1
- package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
- package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
- package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
- package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
- package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
- package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
- package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
- package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
- package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
- package/dist/spa/assets/dom.e9d4ad51.js +0 -1
- package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
- package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
- package/dist/spa/assets/format.41663636.js +0 -1
- package/dist/spa/assets/index.43c62a18.js +0 -21
- package/dist/spa/assets/index.4fbd73cf.css +0 -5
- package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
- package/dist/spa/assets/render.e67ff27a.js +0 -1
- package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
- package/dist/spa/assets/touch.9135741d.js +0 -1
- package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
- package/dist/spa/favicon.ico +0 -0
- package/dist/spa/icons/caret-down.svg +0 -5
- package/dist/spa/icons/circle-xmark.svg +0 -6
- package/dist/spa/icons/favicon-128x128.png +0 -0
- package/dist/spa/icons/favicon-16x16.png +0 -0
- package/dist/spa/icons/favicon-32x32.png +0 -0
- package/dist/spa/icons/favicon-96x96.png +0 -0
- package/dist/spa/index.html +0 -3
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import UTooltip from './UTooltip.vue'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
label: {
|
|
7
|
+
type: String,
|
|
8
|
+
},
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
requried: true,
|
|
12
|
+
},
|
|
13
|
+
options: {
|
|
14
|
+
type: Array,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
optionValue: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
optionLabel: {
|
|
21
|
+
type: String,
|
|
22
|
+
},
|
|
23
|
+
isRequired: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
toolTipText: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
leftIcon: {
|
|
31
|
+
type: String,
|
|
32
|
+
},
|
|
33
|
+
hintText: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
hintIcon: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'fa-kit-duotone fa-triangle-exclamation',
|
|
39
|
+
},
|
|
40
|
+
placeholder: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'Select',
|
|
43
|
+
},
|
|
44
|
+
useInput: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
required: false,
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'md',
|
|
51
|
+
validator: (val) => ['sm', 'md', 'lg'].includes(val),
|
|
52
|
+
},
|
|
53
|
+
noSearchText: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: false,
|
|
56
|
+
},
|
|
57
|
+
filterFn: {
|
|
58
|
+
type: Function,
|
|
59
|
+
required: false,
|
|
60
|
+
},
|
|
61
|
+
color: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'neutral-7',
|
|
64
|
+
},
|
|
65
|
+
popupClass: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: '',
|
|
68
|
+
},
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
const emit = defineEmits(['update:modelValue'])
|
|
72
|
+
|
|
73
|
+
const model = computed({
|
|
74
|
+
get() {
|
|
75
|
+
return props.modelValue
|
|
76
|
+
},
|
|
77
|
+
set(value) {
|
|
78
|
+
return emit('update:modelValue', value)
|
|
79
|
+
},
|
|
80
|
+
})
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<section class="column q-gutter-y-xs">
|
|
85
|
+
<label for="select" class="row items-center">
|
|
86
|
+
<div class="u-select-label text-body-sm">
|
|
87
|
+
{{ label }}
|
|
88
|
+
<span class="text-red-5 q-ml-xs" v-if="isRequired">*</span>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<q-icon
|
|
92
|
+
class="q-ml-xs fa-kit-duotone fa-circle-info cursor-pointer"
|
|
93
|
+
v-if="toolTipText"
|
|
94
|
+
size="1rem"
|
|
95
|
+
color="neutral-9"
|
|
96
|
+
aria-hidden="true"
|
|
97
|
+
>
|
|
98
|
+
<UTooltip
|
|
99
|
+
:description="toolTipText"
|
|
100
|
+
anchor="top middle"
|
|
101
|
+
self="bottom middle"
|
|
102
|
+
/>
|
|
103
|
+
</q-icon>
|
|
104
|
+
</label>
|
|
105
|
+
|
|
106
|
+
<q-select
|
|
107
|
+
class="u-select"
|
|
108
|
+
:class="`field-${size}`"
|
|
109
|
+
id="select"
|
|
110
|
+
:color="color"
|
|
111
|
+
emit-value
|
|
112
|
+
map-options
|
|
113
|
+
:menu-offset="[0, 5]"
|
|
114
|
+
:option-value="optionValue"
|
|
115
|
+
:option-label="optionLabel"
|
|
116
|
+
:options="options"
|
|
117
|
+
outlined
|
|
118
|
+
options-selected-class="primary bg-blue-1"
|
|
119
|
+
:popup-content-class="`u-options-menu ${popupClass}`"
|
|
120
|
+
v-model="model"
|
|
121
|
+
hide-bottom-space
|
|
122
|
+
bottom-slots
|
|
123
|
+
v-bind="$attrs"
|
|
124
|
+
:use-input="useInput"
|
|
125
|
+
@filter="filterFn"
|
|
126
|
+
:placeholder="placeholder"
|
|
127
|
+
>
|
|
128
|
+
<template v-slot:no-option>
|
|
129
|
+
<q-item>
|
|
130
|
+
<q-item-section class="text-grey">
|
|
131
|
+
{{ noSearchText }}
|
|
132
|
+
</q-item-section>
|
|
133
|
+
</q-item>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<template v-if="leftIcon" v-slot:prepend>
|
|
137
|
+
<q-icon :class="leftIcon" size="1rem" />
|
|
138
|
+
</template>
|
|
139
|
+
|
|
140
|
+
<template v-if="hintText" v-slot:hint>
|
|
141
|
+
<div class="row no-wrap items-center text-neutral-9">
|
|
142
|
+
<q-icon :class="hintIcon" size="1rem" v-if="hintIcon" />
|
|
143
|
+
|
|
144
|
+
<div class="q-mx-xxs text-body-xs">
|
|
145
|
+
{{ hintText }}
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</template>
|
|
149
|
+
|
|
150
|
+
<template v-slot:option="scope">
|
|
151
|
+
<q-item class="items-center u-custom-option" v-bind="scope.itemProps">
|
|
152
|
+
<div class="q-pr-xs" v-if="scope.opt.icon">
|
|
153
|
+
<q-icon :class="scope.opt.icon" color="neutral-13" size="1rem" />
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<q-item-section>
|
|
157
|
+
<q-item-label class="text-body-sm">
|
|
158
|
+
{{ scope.opt.label }}
|
|
159
|
+
</q-item-label>
|
|
160
|
+
<q-item-label caption v-if="scope.opt.description">
|
|
161
|
+
{{ scope.opt.description }}
|
|
162
|
+
</q-item-label>
|
|
163
|
+
</q-item-section>
|
|
164
|
+
|
|
165
|
+
<q-item-section v-if="scope.selected" side>
|
|
166
|
+
<q-icon
|
|
167
|
+
class="fa-kit-duotone fa-circle-check"
|
|
168
|
+
color="primary"
|
|
169
|
+
size="1rem"
|
|
170
|
+
/>
|
|
171
|
+
</q-item-section>
|
|
172
|
+
</q-item>
|
|
173
|
+
</template>
|
|
174
|
+
</q-select>
|
|
175
|
+
</section>
|
|
176
|
+
</template>
|
|
177
|
+
|
|
178
|
+
<style lang="sass">
|
|
179
|
+
.u-select
|
|
180
|
+
&.q-field--auto-height .q-field__control,
|
|
181
|
+
&.q-field--auto-height .q-field__native
|
|
182
|
+
min-height: $md
|
|
183
|
+
align-items: center
|
|
184
|
+
|
|
185
|
+
&.q-field--outlined .q-field__control
|
|
186
|
+
border-radius: $xs
|
|
187
|
+
padding: 0 $xs
|
|
188
|
+
|
|
189
|
+
&::before
|
|
190
|
+
background: white
|
|
191
|
+
border: 1.5px solid $neutral-4
|
|
192
|
+
|
|
193
|
+
&.field-sm
|
|
194
|
+
.q-field__marginal
|
|
195
|
+
height: $md
|
|
196
|
+
|
|
197
|
+
&.field-md
|
|
198
|
+
.q-field__marginal
|
|
199
|
+
height: $lg
|
|
200
|
+
|
|
201
|
+
&.field-lg
|
|
202
|
+
.q-field__marginal
|
|
203
|
+
height: $xl
|
|
204
|
+
|
|
205
|
+
&:hover .q-field__control::before
|
|
206
|
+
border: 1.5px solid $primary
|
|
207
|
+
|
|
208
|
+
&.q-field--with-bottom
|
|
209
|
+
padding-bottom: 0
|
|
210
|
+
|
|
211
|
+
.q-field__control:focus-within
|
|
212
|
+
box-shadow : 0 0 0 2px rgba(35, 75, 169, .20)
|
|
213
|
+
|
|
214
|
+
.q-field__bottom
|
|
215
|
+
padding: 4px 0 0 0
|
|
216
|
+
|
|
217
|
+
.q-field__prepend
|
|
218
|
+
padding-right: $xs
|
|
219
|
+
|
|
220
|
+
.u-options-menu
|
|
221
|
+
border-radius: $xs
|
|
222
|
+
box-shadow: $shadow-2
|
|
223
|
+
max-height: 11.25rem !important
|
|
224
|
+
width: 18rem
|
|
225
|
+
overflow-y: auto
|
|
226
|
+
scrollbar-width: none
|
|
227
|
+
|
|
228
|
+
.u-custom-option
|
|
229
|
+
margin: $xxs
|
|
230
|
+
border-radius: $xxs
|
|
231
|
+
padding: $xs
|
|
232
|
+
min-height: $lg
|
|
233
|
+
</style>
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UBadgeStd from './UBadgeStd.vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
size: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: 'md',
|
|
8
|
+
},
|
|
9
|
+
standard: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
selectedTab: {
|
|
14
|
+
type: [String, Number],
|
|
15
|
+
default: null,
|
|
16
|
+
},
|
|
17
|
+
buttonTabsOptions: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => [],
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<q-tabs
|
|
26
|
+
dense
|
|
27
|
+
indicator-color="transparent"
|
|
28
|
+
inline-label
|
|
29
|
+
:model-value="selectedTab"
|
|
30
|
+
no-caps
|
|
31
|
+
class="u-tabs-outer"
|
|
32
|
+
:active-class="`u-tab-active ${standard ? 'tab-standard' : ''}`"
|
|
33
|
+
>
|
|
34
|
+
<template v-for="(tabOption, key) in buttonTabsOptions" :key="tabOption.id">
|
|
35
|
+
<q-tab
|
|
36
|
+
:class="`u-tab-button text-caption-${size} u-tab-${size} ${
|
|
37
|
+
key !== buttonTabsOptions.length - 1 ? 'q-mr-xs' : ''
|
|
38
|
+
}`"
|
|
39
|
+
:ripple="false"
|
|
40
|
+
:name="tabOption.id"
|
|
41
|
+
v-if="tabOption.icon"
|
|
42
|
+
:aria-label="tabOption.label"
|
|
43
|
+
:disable="tabOption.disable"
|
|
44
|
+
>
|
|
45
|
+
<template v-slot:default>
|
|
46
|
+
<q-icon
|
|
47
|
+
:aria-label="tabOption.label"
|
|
48
|
+
:alt="tabOption.label"
|
|
49
|
+
v-if="tabOption.icon"
|
|
50
|
+
:class="tabOption.icon"
|
|
51
|
+
/>
|
|
52
|
+
<p class="u-tab-label truncated-label left-icon-label">
|
|
53
|
+
{{ tabOption.label ? tabOption.label : '' }}
|
|
54
|
+
</p>
|
|
55
|
+
<UBadgeStd
|
|
56
|
+
v-if="tabOption.badgeLabel"
|
|
57
|
+
:label="tabOption.badgeLabel"
|
|
58
|
+
color="primary"
|
|
59
|
+
:size="size === 'md' ? 'md' : ''"
|
|
60
|
+
:class="`q-ml-xs ${size === 'sm' ? 'badge-small' : ''}`"
|
|
61
|
+
/>
|
|
62
|
+
</template>
|
|
63
|
+
</q-tab>
|
|
64
|
+
<q-tab
|
|
65
|
+
:class="`u-tab-button text-caption-${size} u-tab-${size} ${
|
|
66
|
+
key !== buttonTabsOptions.length - 1 ? 'q-mr-xs' : ''
|
|
67
|
+
}`"
|
|
68
|
+
:ripple="false"
|
|
69
|
+
:name="tabOption.id"
|
|
70
|
+
v-else
|
|
71
|
+
:aria-label="tabOption.label"
|
|
72
|
+
:disable="tabOption.disable"
|
|
73
|
+
>
|
|
74
|
+
<template v-slot:default>
|
|
75
|
+
<p class="u-tab-label truncated-label">
|
|
76
|
+
{{ tabOption.label ? tabOption.label : '' }}
|
|
77
|
+
</p>
|
|
78
|
+
<UBadgeStd
|
|
79
|
+
v-if="tabOption.badgeLabel"
|
|
80
|
+
:label="tabOption.badgeLabel"
|
|
81
|
+
color="primary"
|
|
82
|
+
:size="size === 'md' ? 'md' : ''"
|
|
83
|
+
:class="`q-ml-xs ${size === 'sm' ? 'badge-small' : ''}`"
|
|
84
|
+
/>
|
|
85
|
+
</template>
|
|
86
|
+
</q-tab>
|
|
87
|
+
</template>
|
|
88
|
+
</q-tabs>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<style lang="sass">
|
|
92
|
+
.u-tabs-outer
|
|
93
|
+
.u-tab-label
|
|
94
|
+
margin: 0
|
|
95
|
+
font-weight: 500
|
|
96
|
+
|
|
97
|
+
.u-tab-button
|
|
98
|
+
flex: 0 auto
|
|
99
|
+
border: 1px solid $neutral-4
|
|
100
|
+
border-radius: $xs
|
|
101
|
+
color: $dark
|
|
102
|
+
gap: $xs
|
|
103
|
+
max-width: 12.5rem
|
|
104
|
+
word-wrap: break-word
|
|
105
|
+
|
|
106
|
+
.truncated-label
|
|
107
|
+
flex: 1
|
|
108
|
+
white-space: normal
|
|
109
|
+
overflow-wrap: anywhere
|
|
110
|
+
|
|
111
|
+
&:hover
|
|
112
|
+
background: $neutral-2
|
|
113
|
+
|
|
114
|
+
& .badge-small
|
|
115
|
+
line-height: 1.013rem !important
|
|
116
|
+
& div
|
|
117
|
+
font-size: 0.55rem
|
|
118
|
+
|
|
119
|
+
.u-tabs-outer
|
|
120
|
+
.left-icon-label
|
|
121
|
+
margin-left: $ba
|
|
122
|
+
|
|
123
|
+
.u-tab-sm
|
|
124
|
+
padding: 0 $sm
|
|
125
|
+
margin: $xxs
|
|
126
|
+
|
|
127
|
+
.q-tab__content
|
|
128
|
+
padding: $xxs 0
|
|
129
|
+
|
|
130
|
+
.u-tab-label
|
|
131
|
+
font-size: $sm
|
|
132
|
+
|
|
133
|
+
.q-icon
|
|
134
|
+
font-size: 1rem
|
|
135
|
+
position: absolute
|
|
136
|
+
left: -4px
|
|
137
|
+
|
|
138
|
+
.u-tab-md
|
|
139
|
+
padding: 0 $ba
|
|
140
|
+
|
|
141
|
+
.q-tab__content
|
|
142
|
+
padding: $xs 0
|
|
143
|
+
|
|
144
|
+
.u-tab-label
|
|
145
|
+
font-size: 0.875rem
|
|
146
|
+
|
|
147
|
+
.q-icon
|
|
148
|
+
font-size: 1.2rem
|
|
149
|
+
position: absolute
|
|
150
|
+
left: -8px
|
|
151
|
+
|
|
152
|
+
.u-tab-active
|
|
153
|
+
background: $blue-1 !important
|
|
154
|
+
color: $primary !important
|
|
155
|
+
|
|
156
|
+
.tab-standard
|
|
157
|
+
background: $primary !important
|
|
158
|
+
color: $neutral-1 !important
|
|
159
|
+
|
|
160
|
+
.u-tab-badge-sm
|
|
161
|
+
font-size: $xs
|
|
162
|
+
font-weight: 500
|
|
163
|
+
|
|
164
|
+
.u-tab-badge-md
|
|
165
|
+
font-size: $sm
|
|
166
|
+
font-weight: 500
|
|
167
|
+
</style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
title: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: '',
|
|
6
|
+
},
|
|
7
|
+
rowKey: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'name',
|
|
10
|
+
},
|
|
11
|
+
separator: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'horizontal',
|
|
14
|
+
},
|
|
15
|
+
flat: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
19
|
+
bordered: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false,
|
|
22
|
+
},
|
|
23
|
+
grid: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
virtualScroll: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
},
|
|
31
|
+
stickyHeader: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
showPagination: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: true,
|
|
38
|
+
},
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const pagination = defineModel('pagination', {
|
|
42
|
+
default: { page: 1, rowsPerPage: 15 },
|
|
43
|
+
type: Object,
|
|
44
|
+
})
|
|
45
|
+
const loading = defineModel('loading', {
|
|
46
|
+
default: null,
|
|
47
|
+
type: Boolean,
|
|
48
|
+
})
|
|
49
|
+
const rows = defineModel('rows', {
|
|
50
|
+
default: () => [],
|
|
51
|
+
type: Array,
|
|
52
|
+
})
|
|
53
|
+
const columns = defineModel('columns', {
|
|
54
|
+
default: () => [],
|
|
55
|
+
type: Array,
|
|
56
|
+
})
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<q-table
|
|
61
|
+
v-bind="$attrs"
|
|
62
|
+
:title="title"
|
|
63
|
+
:columns="columns"
|
|
64
|
+
:rows="rows"
|
|
65
|
+
:row-key="rowKey"
|
|
66
|
+
:flat="flat"
|
|
67
|
+
:bordered="bordered"
|
|
68
|
+
:separator="separator"
|
|
69
|
+
:loading="loading"
|
|
70
|
+
hide-pagination
|
|
71
|
+
:grid="grid"
|
|
72
|
+
:class="`u-table ${virtualScroll ? 'u-virtualscroll-table' : ''} ${
|
|
73
|
+
grid ? 'u-virtualscroll-grid-table' : ''
|
|
74
|
+
} ${stickyHeader ? 'u-sticky-table-header' : ''} ${
|
|
75
|
+
showPagination && pagination.rowsPerPage < 50
|
|
76
|
+
? 'force-auto-height-table'
|
|
77
|
+
: ''
|
|
78
|
+
}`"
|
|
79
|
+
:virtual-scroll="!grid && virtualScroll"
|
|
80
|
+
v-model:pagination="pagination"
|
|
81
|
+
:rows-per-page-options="[0]"
|
|
82
|
+
:virtual-scroll-item-size="48"
|
|
83
|
+
:virtual-scroll-sticky-size-start="48"
|
|
84
|
+
>
|
|
85
|
+
<template
|
|
86
|
+
v-for="(_, slotName, index) in $slots"
|
|
87
|
+
v-slot:[slotName]="scope"
|
|
88
|
+
:key="index"
|
|
89
|
+
>
|
|
90
|
+
<slot :name="slotName" v-bind="{ ...scope }" />
|
|
91
|
+
</template>
|
|
92
|
+
</q-table>
|
|
93
|
+
</template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
row: {
|
|
4
|
+
type: [Object, Array, Number, String],
|
|
5
|
+
},
|
|
6
|
+
col: {
|
|
7
|
+
type: [Object, Array, Number, String],
|
|
8
|
+
},
|
|
9
|
+
index: { type: Number },
|
|
10
|
+
tableDataAutoWidth: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: true,
|
|
13
|
+
},
|
|
14
|
+
tableDataAlignment: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'left',
|
|
17
|
+
},
|
|
18
|
+
separator: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'horizontal',
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<q-td
|
|
27
|
+
:class="`u-td-std text-body-sm u-td-primary-text ${
|
|
28
|
+
tableDataAutoWidth ? 'td-col-auto-width' : ''
|
|
29
|
+
} text-${tableDataAlignment} ${
|
|
30
|
+
separator === 'vertical' || separator === 'none'
|
|
31
|
+
? 'no-border-bottom-cell'
|
|
32
|
+
: ''
|
|
33
|
+
}`"
|
|
34
|
+
v-bind="$attrs"
|
|
35
|
+
:auto-width="tableDataAutoWidth"
|
|
36
|
+
>
|
|
37
|
+
<template
|
|
38
|
+
v-for="(_, slotName, index) in $slots"
|
|
39
|
+
v-slot:[slotName]="scope"
|
|
40
|
+
:key="index"
|
|
41
|
+
>
|
|
42
|
+
<slot :name="slotName" v-bind="{ ...scope }" />
|
|
43
|
+
</template>
|
|
44
|
+
</q-td>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<style lang="sass">
|
|
48
|
+
.u-td-std
|
|
49
|
+
min-height: $xl
|
|
50
|
+
padding: $xs !important
|
|
51
|
+
color: $dark
|
|
52
|
+
background: $surface-bg-1
|
|
53
|
+
width: 11.938rem
|
|
54
|
+
line-height: 1.5rem
|
|
55
|
+
letter-spacing: .01786rem
|
|
56
|
+
border-bottom: 1.5px solid $neutral-4 !important
|
|
57
|
+
|
|
58
|
+
.u-td-primary-text
|
|
59
|
+
font-size: 0.875rem !important
|
|
60
|
+
|
|
61
|
+
.td-col-auto-width
|
|
62
|
+
width: 1px !important
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
tableHeaderAutoWidth: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
default: true,
|
|
6
|
+
},
|
|
7
|
+
tableHeadAlignment: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'left',
|
|
10
|
+
},
|
|
11
|
+
separator: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'horizontal',
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<q-th
|
|
20
|
+
:class="`u-table-th text-caption-md text-${tableHeadAlignment} ${
|
|
21
|
+
tableHeaderAutoWidth ? 'th-col-auto-width' : ''
|
|
22
|
+
} ${separator === 'none' ? 'no-border-bottom-cell' : ''}`"
|
|
23
|
+
v-bind="$attrs"
|
|
24
|
+
:auto-width="tableHeaderAutoWidth"
|
|
25
|
+
>
|
|
26
|
+
<template
|
|
27
|
+
v-for="(_, slotName, index) in $slots"
|
|
28
|
+
v-slot:[slotName]="scope"
|
|
29
|
+
:key="index"
|
|
30
|
+
>
|
|
31
|
+
<slot :name="slotName" v-bind="{ ...scope }" />
|
|
32
|
+
</template>
|
|
33
|
+
</q-th>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<style lang="sass">
|
|
37
|
+
.u-table-th
|
|
38
|
+
min-height: $xl
|
|
39
|
+
width: 16.188rem
|
|
40
|
+
padding: $xs !important
|
|
41
|
+
border-bottom: 1.5px solid $neutral-4 !important
|
|
42
|
+
background: $neutral-1
|
|
43
|
+
font-size: 0.875rem !important
|
|
44
|
+
color: $description
|
|
45
|
+
|
|
46
|
+
.th-col-auto-width
|
|
47
|
+
width: auto !important
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
tableRowHover: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
default: false,
|
|
6
|
+
},
|
|
7
|
+
})
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<q-tr v-bind="$attrs" :no-hover="tableRowHover" :props="props">
|
|
12
|
+
<template
|
|
13
|
+
v-for="(_, slotName, index) in $slots"
|
|
14
|
+
v-slot:[slotName]="scope"
|
|
15
|
+
:key="index"
|
|
16
|
+
>
|
|
17
|
+
<slot :name="slotName" v-bind="{ ...scope }" />
|
|
18
|
+
</template>
|
|
19
|
+
</q-tr>
|
|
20
|
+
</template>
|