@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,250 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+ import UAvatar from './UAvatar.vue'
4
+ import UMenuItem from './UMenuItem.vue'
5
+ import UTooltip from './UTooltip.vue'
6
+
7
+ const emit = defineEmits(['update:modelValue'])
8
+
9
+ const props = defineProps({
10
+ label: {
11
+ type: String,
12
+ },
13
+ modelValue: {
14
+ type: [String, Number],
15
+ requried: true,
16
+ },
17
+ options: {
18
+ type: Array,
19
+ required: true,
20
+ },
21
+ optionValue: {
22
+ type: String,
23
+ },
24
+ optionLabel: {
25
+ type: String,
26
+ },
27
+ isRequired: {
28
+ type: Boolean,
29
+ default: false,
30
+ },
31
+ toolTipText: {
32
+ type: String,
33
+ },
34
+ leftIcon: {
35
+ type: String,
36
+ },
37
+ hintText: {
38
+ type: String,
39
+ },
40
+ hintIcon: {
41
+ type: String,
42
+ default: 'fa-kit-duotone fa-triangle-exclamation',
43
+ },
44
+ placeholder: {
45
+ type: String,
46
+ default: 'Select',
47
+ },
48
+ useInput: {
49
+ type: Boolean,
50
+ required: false,
51
+ },
52
+ disableAvatar: {
53
+ type: Boolean,
54
+ default: true,
55
+ },
56
+ size: {
57
+ type: String,
58
+ default: 'md',
59
+ validator: (val) => ['sm', 'md', 'lg'].includes(val),
60
+ },
61
+ noSearchText: {
62
+ type: String,
63
+ required: false,
64
+ },
65
+ filterFn: {
66
+ type: Function,
67
+ required: false,
68
+ },
69
+ color: {
70
+ type: String,
71
+ default: 'neutral-7',
72
+ },
73
+ popupClass: {
74
+ type: String,
75
+ default: '',
76
+ },
77
+ showErrorIcon: {
78
+ type: Boolean,
79
+ default: false,
80
+ },
81
+ })
82
+
83
+ const model = computed({
84
+ get() {
85
+ return props.modelValue
86
+ },
87
+ set(value) {
88
+ return emit('update:modelValue', value)
89
+ },
90
+ })
91
+ </script>
92
+
93
+ <template>
94
+ <section class="column q-gutter-y-xs">
95
+ <label class="row items-center" for="select">
96
+ <div class="u-select-label text-body-sm">
97
+ <span>{{ label }}</span>
98
+ <span v-if="isRequired" class="text-red-5 q-ml-xs">*</span>
99
+ </div>
100
+
101
+ <q-icon
102
+ v-if="toolTipText"
103
+ class="q-ml-xs fa-kit-duotone fa-circle-info cursor-pointer"
104
+ aria-hidden="true"
105
+ color="neutral-9"
106
+ size="1rem"
107
+ >
108
+ <UTooltip
109
+ anchor="top middle"
110
+ :description="toolTipText"
111
+ self="bottom middle"
112
+ />
113
+ </q-icon>
114
+ </label>
115
+
116
+ <q-select
117
+ v-bind="$attrs"
118
+ v-model="model"
119
+ :class="`u-select field-${size}`"
120
+ :popup-content-class="`u-options-menu ${popupClass}`"
121
+ bottom-slots
122
+ :color="color"
123
+ emit-value
124
+ hide-bottom-space
125
+ id="select"
126
+ map-options
127
+ :menu-offset="[0, 5]"
128
+ :no-error-icon="!showErrorIcon"
129
+ :option-label="optionLabel"
130
+ :option-value="optionValue"
131
+ :options="options"
132
+ options-selected-class="primary bg-blue-1"
133
+ outlined
134
+ :placeholder="placeholder"
135
+ :use-input="useInput"
136
+ @filter="filterFn"
137
+ >
138
+ <template v-slot:no-option>
139
+ <q-item>
140
+ <q-item-section class="text-grey">
141
+ {{ noSearchText }}
142
+ </q-item-section>
143
+ </q-item>
144
+ </template>
145
+
146
+ <template v-if="leftIcon" v-slot:prepend>
147
+ <q-icon :class="leftIcon" size="1rem" />
148
+ </template>
149
+
150
+ <template v-if="hintText" v-slot:hint>
151
+ <div class="row no-wrap items-center text-neutral-9">
152
+ <q-icon v-if="hintIcon" :class="hintIcon" size="1rem" />
153
+ <div class="q-mx-xxs text-body-xs">
154
+ {{ hintText }}
155
+ </div>
156
+ </div>
157
+ </template>
158
+
159
+ <template v-slot:option="scope">
160
+ <UMenuItem
161
+ v-bind="scope.itemProps"
162
+ class="q-ma-xxs"
163
+ iconClass="icon-secondary-opacity"
164
+ :label="scope.opt.label"
165
+ :leftIcon="scope.opt.leftIcon"
166
+ :rightIcon="scope.opt.rightIcon"
167
+ :selected="scope.selected"
168
+ >
169
+ <template #leading_slot>
170
+ <slot name="leading_slot" />
171
+ <div v-if="!disableAvatar">
172
+ <UAvatar
173
+ v-if="scope.opt.avatarUrl"
174
+ :image="scope.opt.avatarUrl"
175
+ :name="scope.opt.label"
176
+ size="md"
177
+ />
178
+ <UAvatar v-else :name="scope.opt.label" size="md" />
179
+ </div>
180
+ </template>
181
+ <template #trailing_slot>
182
+ <slot name="trailing_slot">
183
+ <q-icon
184
+ v-if="scope.selected"
185
+ class="fa-kit-duotone fa-circle-check"
186
+ color="primary"
187
+ size="1rem"
188
+ />
189
+ </slot>
190
+ </template>
191
+ </UMenuItem>
192
+ </template>
193
+ </q-select>
194
+ </section>
195
+ </template>
196
+
197
+ <style lang="sass">
198
+ .u-select
199
+ &.q-field--auto-height .q-field__control,
200
+ &.q-field--auto-height .q-field__native
201
+ min-height: $md
202
+ align-items: center
203
+
204
+ &.q-field--outlined .q-field__control
205
+ border-radius: $xs
206
+ padding: 0 $xs
207
+
208
+ &::before
209
+ background: white
210
+ border: 1.5px solid $neutral-4
211
+
212
+ &.field-sm
213
+ .q-field__marginal
214
+ height: $md
215
+
216
+ &.field-md
217
+ .q-field__marginal
218
+ height: $lg
219
+
220
+ &.field-lg
221
+ .q-field__marginal
222
+ height: $xl
223
+
224
+ &:hover .q-field__control::before
225
+ border: 1.5px solid $primary
226
+
227
+ &.q-field--with-bottom
228
+ padding-bottom: 0
229
+
230
+ .q-field__control:focus-within
231
+ box-shadow : 0 0 0 2px rgba(35, 75, 169, .20)
232
+
233
+ .q-field__bottom
234
+ padding: 4px 0 0 0
235
+
236
+ .q-field__prepend
237
+ padding-right: $xs
238
+
239
+ .u-options-menu
240
+ border-radius: $xs
241
+ box-shadow: $shadow-2
242
+ max-height: 11.25rem !important
243
+ width: 18rem
244
+ overflow-y: auto
245
+ scrollbar-width: none
246
+
247
+ .u-options-menu
248
+ .q-item:last-child
249
+ margin-bottom: $xxs
250
+ </style>
@@ -0,0 +1,176 @@
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
+ buttonTabsOptions: {
14
+ type: Array,
15
+ default: () => [],
16
+ },
17
+ })
18
+
19
+ const selectedTab = defineModel('selectedTab', {
20
+ type: [String, Number],
21
+ default: null,
22
+ })
23
+
24
+ const emit = defineEmits(['onTabClick'])
25
+
26
+ const handleTabClick = (value) => {
27
+ emit('onTabClick', value)
28
+ }
29
+ </script>
30
+
31
+ <template>
32
+ <q-tabs
33
+ dense
34
+ indicator-color="transparent"
35
+ inline-label
36
+ :model-value="selectedTab"
37
+ no-caps
38
+ class="u-tabs-outer"
39
+ :active-class="`u-tab-active ${standard ? 'tab-standard' : ''}`"
40
+ >
41
+ <template v-for="(tabOption, key) in buttonTabsOptions" :key="tabOption.id">
42
+ <q-tab
43
+ v-if="tabOption.icon"
44
+ :class="`u-tab-button text-caption-${size} u-tab-${size} ${
45
+ key !== buttonTabsOptions.length - 1 ? 'q-mr-xs' : ''
46
+ }`"
47
+ :ripple="false"
48
+ :disable="tabOption.disable"
49
+ :name="tabOption.id"
50
+ :aria-label="tabOption.label"
51
+ @click="handleTabClick(tabOption.id)"
52
+ >
53
+ <template v-slot:default>
54
+ <q-icon
55
+ v-if="tabOption.icon"
56
+ :class="tabOption.icon"
57
+ :aria-label="tabOption.label"
58
+ :alt="tabOption.label"
59
+ />
60
+ <p class="u-tab-label truncated-label left-icon-label">
61
+ {{ tabOption.label ? tabOption.label : '' }}
62
+ </p>
63
+ <UBadgeStd
64
+ v-if="tabOption.badgeLabel"
65
+ :label="tabOption.badgeLabel"
66
+ color="primary"
67
+ :size="size === 'md' ? 'md' : ''"
68
+ :class="`q-ml-xs ${size === 'sm' ? 'badge-small' : ''}`"
69
+ />
70
+ </template>
71
+ </q-tab>
72
+ <q-tab
73
+ v-else
74
+ :class="`u-tab-button text-caption-${size} u-tab-${size} ${
75
+ key !== buttonTabsOptions.length - 1 ? 'q-mr-xs' : ''
76
+ }`"
77
+ :ripple="false"
78
+ :name="tabOption.id"
79
+ :aria-label="tabOption.label"
80
+ :disable="tabOption.disable"
81
+ @click="handleTabClick(tabOption.id)"
82
+ >
83
+ <template v-slot:default>
84
+ <p class="u-tab-label truncated-label">
85
+ {{ tabOption.label ? tabOption.label : '' }}
86
+ </p>
87
+ <UBadgeStd
88
+ v-if="tabOption.badgeLabel"
89
+ :label="tabOption.badgeLabel"
90
+ color="primary"
91
+ :size="size === 'md' ? 'md' : ''"
92
+ :class="`q-ml-xs ${size === 'sm' ? 'badge-small' : ''}`"
93
+ />
94
+ </template>
95
+ </q-tab>
96
+ </template>
97
+ </q-tabs>
98
+ </template>
99
+
100
+ <style lang="sass">
101
+ .u-tabs-outer
102
+ .u-tab-label
103
+ margin: 0
104
+ font-weight: 500
105
+
106
+ .u-tab-button
107
+ flex: 0 auto
108
+ border: 1px solid $neutral-4
109
+ border-radius: $xs
110
+ color: $dark
111
+ gap: $xs
112
+ max-width: 12.5rem
113
+ word-wrap: break-word
114
+
115
+ .truncated-label
116
+ flex: 1
117
+ white-space: normal
118
+ overflow-wrap: anywhere
119
+
120
+ &:hover
121
+ background: $neutral-2
122
+
123
+ & .badge-small
124
+ line-height: 1.013rem !important
125
+ & div
126
+ font-size: 0.55rem
127
+
128
+ .u-tabs-outer
129
+ .left-icon-label
130
+ margin-left: $ba
131
+
132
+ .u-tab-sm
133
+ padding: 0 $sm
134
+ margin: $xxs
135
+
136
+ .q-tab__content
137
+ padding: $xxs 0
138
+
139
+ .u-tab-label
140
+ font-size: $sm
141
+
142
+ .q-icon
143
+ font-size: 1rem
144
+ position: absolute
145
+ left: -4px
146
+
147
+ .u-tab-md
148
+ padding: 0 $ba
149
+
150
+ .q-tab__content
151
+ padding: $xs 0
152
+
153
+ .u-tab-label
154
+ font-size: 0.875rem
155
+
156
+ .q-icon
157
+ font-size: 1.2rem
158
+ position: absolute
159
+ left: -8px
160
+
161
+ .u-tab-active
162
+ background: $blue-1 !important
163
+ color: $primary !important
164
+
165
+ .tab-standard
166
+ background: $primary !important
167
+ color: $neutral-1 !important
168
+
169
+ .u-tab-badge-sm
170
+ font-size: $xs
171
+ font-weight: 500
172
+
173
+ .u-tab-badge-md
174
+ font-size: $sm
175
+ font-weight: 500
176
+ </style>
@@ -0,0 +1,93 @@
1
+ <script setup>
2
+ const pagination = defineModel('pagination', {
3
+ default: { page: 1, rowsPerPage: 15 },
4
+ type: Object,
5
+ })
6
+ const loading = defineModel('loading', {
7
+ default: null,
8
+ type: Boolean,
9
+ })
10
+ const rows = defineModel('rows', {
11
+ default: () => [],
12
+ type: Array,
13
+ })
14
+ const columns = defineModel('columns', {
15
+ default: () => [],
16
+ type: Array,
17
+ })
18
+
19
+ const props = defineProps({
20
+ title: {
21
+ type: String,
22
+ default: '',
23
+ },
24
+ rowKey: {
25
+ type: String,
26
+ default: 'name',
27
+ },
28
+ separator: {
29
+ type: String,
30
+ default: 'horizontal',
31
+ },
32
+ flat: {
33
+ type: Boolean,
34
+ default: false,
35
+ },
36
+ bordered: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ grid: {
41
+ type: Boolean,
42
+ default: false,
43
+ },
44
+ virtualScroll: {
45
+ type: Boolean,
46
+ default: false,
47
+ },
48
+ stickyHeader: {
49
+ type: Boolean,
50
+ default: false,
51
+ },
52
+ showPagination: {
53
+ type: Boolean,
54
+ default: true,
55
+ },
56
+ })
57
+ </script>
58
+
59
+ <template>
60
+ <q-table
61
+ v-model:pagination="pagination"
62
+ v-bind="$attrs"
63
+ :class="`u-table ${virtualScroll ? 'u-virtualscroll-table' : ''} ${
64
+ grid ? 'u-virtualscroll-grid-table' : ''
65
+ } ${stickyHeader ? 'u-sticky-table-header' : ''} ${
66
+ showPagination && pagination.rowsPerPage < 50
67
+ ? 'force-auto-height-table'
68
+ : ''
69
+ }`"
70
+ :bordered="bordered"
71
+ :columns="columns"
72
+ :flat="flat"
73
+ :grid="grid"
74
+ hide-pagination
75
+ :loading="loading"
76
+ :separator="separator"
77
+ :rows="rows"
78
+ :row-key="rowKey"
79
+ :rows-per-page-options="[0]"
80
+ :title="title"
81
+ :virtual-scroll="!grid && virtualScroll"
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>