@usssa/component-library 1.0.0-alpha.47 → 1.0.0-alpha.49
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/package.json +1 -1
- package/src/assets/files.png +0 -0
- package/src/assets/logo.svg +19 -0
- package/src/components/core/UDrawer.vue +7 -3
- package/src/components/core/UInputPhoneStd.vue +22 -22
- package/src/components/core/UMenuDropdown.vue +3 -7
- package/src/components/core/UMenuItem.vue +14 -2
- package/src/components/core/UMenuSearch.vue +2 -2
- package/src/components/core/UTabBtnStd.vue +18 -9
- package/src/components/core/UTableStd.vue +59 -62
- package/src/components/core/UUploader.vue +1 -1
- package/src/pages/InputPhone.vue +17 -16
- package/src/pages/MenuDropdown.vue +6 -1
- package/src/pages/TabButtonPage.vue +13 -2
- package/src/pages/TablePage.vue +18 -4
package/package.json
CHANGED
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg width="95" height="24" viewBox="0 0 95 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Logo">
|
|
3
|
+
<g id="Lettering">
|
|
4
|
+
<path d="M3.80408 2.66675H8.95923L4.80595 13.2946L11.6168 13.2333L15.8059 2.66675H20.8L16.7704 12.978C15.8482 15.3379 13.5896 16.889 11.0754 16.889H3.24023L3.23972 16.8853C0.95221 16.7796 -0.597379 14.4417 0.221722 12.2504L3.80408 2.66675Z" fill="#234BA9"/>
|
|
5
|
+
<path d="M25.3431 2.66675C24.1871 2.66675 23.1592 3.40891 22.7861 4.5129L22.2017 6.24262L21.3962 8.1931L20.9479 9.20419C20.5153 10.1799 21.2229 11.2814 22.2822 11.2814H30.0955L29.3215 13.3117H19.4306L17.9807 16.8876H30.4658C31.6432 16.8876 32.7118 16.1933 33.199 15.1119L34.01 13.3117H33.9934L34.7674 11.2814H34.7746L35.0296 10.6669C35.5176 9.49105 34.6615 8.1931 33.398 8.1931H26.3902L27.1957 6.24262H36.3783L37.8282 2.66675H25.3431Z" fill="#234BA9"/>
|
|
6
|
+
<path d="M65.9075 2.66675C64.7515 2.66675 63.7235 3.40891 63.3505 4.5129L62.7661 6.24262L61.9606 8.1931L61.5123 9.20419C61.0797 10.1799 61.7873 11.2814 62.8466 11.2814H70.6599L69.8859 13.3117H59.995L58.5451 16.8876H71.0302C72.2076 16.8876 73.2762 16.1933 73.7634 15.1119L74.5744 13.3117H74.5578L75.3318 11.2814H75.339L75.594 10.6669C76.0819 9.49105 75.2259 8.1931 73.9624 8.1931H66.9546L67.7601 6.24262H76.9427L78.3926 2.66675H65.9075Z" fill="#234BA9"/>
|
|
7
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M92.0723 2.66675H80.9702L79.6009 6.24262H89.5386L88.7205 8.27437H81.103C79.3981 8.27437 77.8944 9.40113 77.4017 11.0479L76.8451 12.908C76.2519 14.8906 77.7229 16.8889 79.7755 16.8888L90.3945 16.8883L93.6818 8.51818H93.697L94.5025 6.24262C95.162 4.52034 93.9023 2.66675 92.0723 2.66675ZM81.373 13.3131L82.259 11.2001H87.6558L86.7698 13.3131H81.373Z" fill="#234BA9"/>
|
|
8
|
+
</g>
|
|
9
|
+
<path id="top" d="M47.7783 0.00113767H62.8782C61.1471 3.8405 58.0313 4.88033 55.3948 4.88033H49.6691V1.41424L47.2456 4.88033H43.464L45.8076 6.95998L43.464 10.3994L47.3255 8.34642L49.6957 10.4794L49.6691 6.95998H54.5426C58.271 6.93332 58.8036 10.4794 58.1378 11.8125H42.7184C41.3069 11.8125 37.1258 10.7724 39.0166 5.76018C40.7743 1.78735 44.982 -0.0524702 47.7783 0.00113767Z" fill="#234BA9"/>
|
|
10
|
+
<g id="bottom">
|
|
11
|
+
<path d="M32.3588 20.1976C32.705 18.5712 34.7556 15.5317 38.484 15.2917H46.1804C46.3668 15.2917 46.8835 15.2704 47.2456 14.5452L47.7516 13.1987H57.6318C57.2324 14.2741 55.7943 16.5448 52.6518 16.7315H46.5532C46.5 16.7315 45.6899 16.8463 45.3282 17.6913C44.9287 18.6245 44.2097 18.7845 43.8368 18.8111H35.9007C35.2616 18.8378 33.7702 19.0511 32.3588 20.1976Z" fill="#CB2A3D"/>
|
|
12
|
+
<path d="M56.1937 16.7181C55.7943 18.3445 53.8875 21.4054 50.0952 21.5973H44.1032C43.5439 21.6507 42.9484 21.7679 42.6118 22.6105C42.2603 23.4904 41.4933 23.7037 40.9873 23.7037H30.8674C31.258 22.6372 32.7902 20.4455 35.7942 20.2109H43.5173C43.7658 20.202 44.2363 20.1842 44.6092 19.3044C44.982 18.4245 45.2217 18.1312 46.0639 18.1046H52.6252C53.1844 18.1135 54.8089 17.838 56.1937 16.7181Z" fill="#CB2A3D"/>
|
|
13
|
+
</g>
|
|
14
|
+
<g id="shadow">
|
|
15
|
+
<path d="M49.7491 13.1987L48.3643 16.7315H46.7132C46.367 16.7493 45.6394 16.9261 45.2985 17.758L46.2871 15.2864C46.4735 15.2784 46.8996 15.1611 47.2192 14.5852L47.7518 13.1987H49.7491Z" fill="#951F23"/>
|
|
16
|
+
<path d="M42.6119 22.6114L42.6274 22.5736C42.959 21.7945 43.8175 21.5982 44.2631 21.5982H45.6745L47.0594 18.1055H46.0474C45.1419 18.0788 44.8377 18.6727 44.5747 19.3844C44.4761 19.651 44.1299 20.1538 43.5973 20.2072L42.6274 22.5736C42.6221 22.586 42.617 22.5986 42.6119 22.6114Z" fill="#951F23"/>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useRouter } from 'vue-router'
|
|
3
|
-
import UMenuItem from './UMenuItem.vue'
|
|
4
2
|
import { computed } from 'vue'
|
|
3
|
+
import { useRouter } from 'vue-router'
|
|
4
|
+
import UBadgeStd from './UBadgeStd.vue'
|
|
5
5
|
import UBtnIcon from './UBtnIcon.vue'
|
|
6
|
+
import UMenuItem from './UMenuItem.vue'
|
|
6
7
|
import UTooltip from './UTooltip.vue'
|
|
7
|
-
import UBadgeStd from './UBadgeStd.vue'
|
|
8
8
|
const props = defineProps({
|
|
9
9
|
menu: {
|
|
10
10
|
default: () => [],
|
|
@@ -191,6 +191,10 @@ const getXOffset = (label) => {
|
|
|
191
191
|
.drawer-menu-list
|
|
192
192
|
padding: 0px $xs
|
|
193
193
|
|
|
194
|
+
.u-menu-link
|
|
195
|
+
.q-item
|
|
196
|
+
margin-bottom: 0
|
|
197
|
+
|
|
194
198
|
.drawer-menu-mini-list
|
|
195
199
|
display: grid
|
|
196
200
|
place-content: center
|
|
@@ -70,7 +70,6 @@ const props = defineProps({
|
|
|
70
70
|
})
|
|
71
71
|
|
|
72
72
|
const modelValue = defineModel()
|
|
73
|
-
|
|
74
73
|
const emit = defineEmits(['update-country'])
|
|
75
74
|
|
|
76
75
|
const selectCountry = (country) => {
|
|
@@ -82,64 +81,65 @@ const toLowerCase = (str) => str.toLowerCase()
|
|
|
82
81
|
|
|
83
82
|
<template>
|
|
84
83
|
<UInputTextStd
|
|
84
|
+
v-model="modelValue"
|
|
85
|
+
:borderless="borderless"
|
|
85
86
|
class="phone-input"
|
|
87
|
+
:disable="disable"
|
|
88
|
+
:error="error"
|
|
89
|
+
:error-message="errorMessage"
|
|
90
|
+
:hintText="hintText"
|
|
91
|
+
:hintIcon="hintIcon"
|
|
86
92
|
:label="label"
|
|
87
93
|
:isRequired="isRequired"
|
|
88
|
-
v-model="modelValue"
|
|
89
|
-
:mask="mask"
|
|
90
|
-
:validationRules="validationRules"
|
|
91
94
|
leftIcon="true"
|
|
92
|
-
:
|
|
93
|
-
:
|
|
94
|
-
:hintIcon="hintIcon"
|
|
95
|
-
:toolTipText="toolTipText"
|
|
95
|
+
:mask="mask"
|
|
96
|
+
:outlined="outlined"
|
|
96
97
|
:placeholder="placeholder"
|
|
97
|
-
:size="size"
|
|
98
|
-
:disable="disable"
|
|
99
98
|
:readonly="readonly"
|
|
100
|
-
:
|
|
101
|
-
:
|
|
102
|
-
:
|
|
103
|
-
:
|
|
99
|
+
:rightIcon="rightIcon"
|
|
100
|
+
:size="size"
|
|
101
|
+
:toolTipText="toolTipText"
|
|
102
|
+
:validationRules="validationRules"
|
|
104
103
|
>
|
|
105
104
|
<template v-slot:prepend>
|
|
106
105
|
<q-btn-dropdown
|
|
106
|
+
v-bind="$attrs"
|
|
107
107
|
:disable="readonly"
|
|
108
|
-
rounded
|
|
109
|
-
flat
|
|
110
|
-
class="u-phone-dropdown text-body-sm"
|
|
111
108
|
:class="`btn-field-${size}`"
|
|
109
|
+
class="u-phone-dropdown text-body-sm"
|
|
112
110
|
content-class="u-dropdown-list"
|
|
111
|
+
flat
|
|
113
112
|
menu-anchor="top right"
|
|
114
113
|
menu-self="bottom middle"
|
|
115
114
|
:menu-offset="[30, 5]"
|
|
115
|
+
rounded
|
|
116
116
|
>
|
|
117
117
|
<template #label>
|
|
118
118
|
<q-icon
|
|
119
|
-
left
|
|
120
119
|
:aria-label="selectedCountry.name"
|
|
121
120
|
:class="`fi fi-${toLowerCase(
|
|
122
121
|
selectedCountry.flag
|
|
123
122
|
)} flag-icon q-mr-xs`"
|
|
123
|
+
left
|
|
124
124
|
/>
|
|
125
|
-
<label class="selected-code">
|
|
125
|
+
<label class="selected-code">{{ selectedCountry.code }}</label>
|
|
126
126
|
</template>
|
|
127
127
|
|
|
128
128
|
<q-list class="u-list">
|
|
129
129
|
<q-item
|
|
130
130
|
v-for="country in options"
|
|
131
|
-
|
|
131
|
+
class="q-my-xxs"
|
|
132
132
|
clickable
|
|
133
|
+
:key="country.code"
|
|
133
134
|
v-close-popup
|
|
134
135
|
v-ripple
|
|
135
136
|
@click="selectCountry(country)"
|
|
136
|
-
class="q-my-xxs"
|
|
137
137
|
>
|
|
138
138
|
<q-item-section class="flag-section">
|
|
139
139
|
<q-icon
|
|
140
140
|
:aria-label="country.name"
|
|
141
|
-
left
|
|
142
141
|
:class="`fi fi-${toLowerCase(country.flag)} flag-icon q-mr-xs`"
|
|
142
|
+
left
|
|
143
143
|
size="1.25rem"
|
|
144
144
|
/>
|
|
145
145
|
</q-item-section>
|
|
@@ -24,12 +24,6 @@ const props = defineProps({
|
|
|
24
24
|
type: Boolean,
|
|
25
25
|
},
|
|
26
26
|
})
|
|
27
|
-
|
|
28
|
-
const emit = defineEmits(['onClick'])
|
|
29
|
-
|
|
30
|
-
const handleClick = () => {
|
|
31
|
-
return emit('onClick')
|
|
32
|
-
}
|
|
33
27
|
</script>
|
|
34
28
|
|
|
35
29
|
<template>
|
|
@@ -39,9 +33,11 @@ const handleClick = () => {
|
|
|
39
33
|
:label="item.label"
|
|
40
34
|
:leftIcon="item.leftIcon"
|
|
41
35
|
:rightIcon="item.rightIcon"
|
|
42
|
-
@onClick="handleClick"
|
|
43
36
|
:destructive="destructive"
|
|
44
37
|
:iconClass="iconClass"
|
|
38
|
+
:hide="item.hide"
|
|
39
|
+
:disable="item.disable"
|
|
40
|
+
@onClick="item.handler"
|
|
45
41
|
>
|
|
46
42
|
<template #leading_slot>
|
|
47
43
|
<slot name="leading_slot"></slot>
|
|
@@ -22,6 +22,14 @@ const props = defineProps({
|
|
|
22
22
|
iconClass: {
|
|
23
23
|
type: String,
|
|
24
24
|
},
|
|
25
|
+
hide: {
|
|
26
|
+
default: false,
|
|
27
|
+
type: Boolean,
|
|
28
|
+
},
|
|
29
|
+
disable: {
|
|
30
|
+
default: false,
|
|
31
|
+
type: Boolean,
|
|
32
|
+
},
|
|
25
33
|
})
|
|
26
34
|
|
|
27
35
|
const type = ref(props.destructive ? 'destructive' : 'default')
|
|
@@ -66,12 +74,15 @@ const backgroundColor = computed(() => {
|
|
|
66
74
|
</script>
|
|
67
75
|
|
|
68
76
|
<template>
|
|
77
|
+
<div v-if="!hide" class="u-menu-link">
|
|
69
78
|
<q-item
|
|
79
|
+
:class="`${backgroundColor} item-${type} u-menu-link q-mb-xxs`"
|
|
70
80
|
clickable
|
|
71
81
|
role="button"
|
|
72
|
-
|
|
73
|
-
@click="handleClick"
|
|
82
|
+
tabindex="0"
|
|
74
83
|
:aria-label="label"
|
|
84
|
+
:disable="disable"
|
|
85
|
+
@click="handleClick"
|
|
75
86
|
>
|
|
76
87
|
<q-item-section side v-if="leftIcon">
|
|
77
88
|
<q-icon
|
|
@@ -99,6 +110,7 @@ const backgroundColor = computed(() => {
|
|
|
99
110
|
|
|
100
111
|
<slot name="trailing_slot"></slot>
|
|
101
112
|
</q-item>
|
|
113
|
+
</div>
|
|
102
114
|
</template>
|
|
103
115
|
|
|
104
116
|
<style lang="sass">
|
|
@@ -234,7 +234,7 @@ const onInvitePerson = (item) => {
|
|
|
234
234
|
<div v-if="searchText.length && !searchResults.length && !exceedLimit">
|
|
235
235
|
<div class="items-center column q-py-ba">
|
|
236
236
|
<img
|
|
237
|
-
src="/
|
|
237
|
+
src="../../assets/no-result.png"
|
|
238
238
|
alt="No result found"
|
|
239
239
|
aria-label="No result found"
|
|
240
240
|
/>
|
|
@@ -263,7 +263,7 @@ const onInvitePerson = (item) => {
|
|
|
263
263
|
<img
|
|
264
264
|
alt="No result found"
|
|
265
265
|
aria-label="No result found"
|
|
266
|
-
src="/
|
|
266
|
+
src="../../assets/no-result.png"
|
|
267
267
|
/>
|
|
268
268
|
<span class="text-caption-lg">Results exceeds limit.</span>
|
|
269
269
|
<span class="text-body-sm text-neutral-9 q-mt-xxs text-center">
|
|
@@ -10,15 +10,22 @@ const props = defineProps({
|
|
|
10
10
|
type: Boolean,
|
|
11
11
|
default: false,
|
|
12
12
|
},
|
|
13
|
-
selectedTab: {
|
|
14
|
-
type: [String, Number],
|
|
15
|
-
default: null,
|
|
16
|
-
},
|
|
17
13
|
buttonTabsOptions: {
|
|
18
14
|
type: Array,
|
|
19
15
|
default: () => [],
|
|
20
16
|
},
|
|
21
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
|
+
}
|
|
22
29
|
</script>
|
|
23
30
|
|
|
24
31
|
<template>
|
|
@@ -33,21 +40,22 @@ const props = defineProps({
|
|
|
33
40
|
>
|
|
34
41
|
<template v-for="(tabOption, key) in buttonTabsOptions" :key="tabOption.id">
|
|
35
42
|
<q-tab
|
|
43
|
+
v-if="tabOption.icon"
|
|
36
44
|
:class="`u-tab-button text-caption-${size} u-tab-${size} ${
|
|
37
45
|
key !== buttonTabsOptions.length - 1 ? 'q-mr-xs' : ''
|
|
38
46
|
}`"
|
|
39
47
|
:ripple="false"
|
|
48
|
+
:disable="tabOption.disable"
|
|
40
49
|
:name="tabOption.id"
|
|
41
|
-
v-if="tabOption.icon"
|
|
42
50
|
:aria-label="tabOption.label"
|
|
43
|
-
|
|
51
|
+
@click="handleTabClick(tabOption.id)"
|
|
44
52
|
>
|
|
45
53
|
<template v-slot:default>
|
|
46
54
|
<q-icon
|
|
47
|
-
:aria-label="tabOption.label"
|
|
48
|
-
:alt="tabOption.label"
|
|
49
55
|
v-if="tabOption.icon"
|
|
50
56
|
:class="tabOption.icon"
|
|
57
|
+
:aria-label="tabOption.label"
|
|
58
|
+
:alt="tabOption.label"
|
|
51
59
|
/>
|
|
52
60
|
<p class="u-tab-label truncated-label left-icon-label">
|
|
53
61
|
{{ tabOption.label ? tabOption.label : '' }}
|
|
@@ -62,14 +70,15 @@ const props = defineProps({
|
|
|
62
70
|
</template>
|
|
63
71
|
</q-tab>
|
|
64
72
|
<q-tab
|
|
73
|
+
v-else
|
|
65
74
|
:class="`u-tab-button text-caption-${size} u-tab-${size} ${
|
|
66
75
|
key !== buttonTabsOptions.length - 1 ? 'q-mr-xs' : ''
|
|
67
76
|
}`"
|
|
68
77
|
:ripple="false"
|
|
69
78
|
:name="tabOption.id"
|
|
70
|
-
v-else
|
|
71
79
|
:aria-label="tabOption.label"
|
|
72
80
|
:disable="tabOption.disable"
|
|
81
|
+
@click="handleTabClick(tabOption.id)"
|
|
73
82
|
>
|
|
74
83
|
<template v-slot:default>
|
|
75
84
|
<p class="u-tab-label truncated-label">
|
|
@@ -11,7 +11,6 @@ import UTable from './UTable/UTable.vue'
|
|
|
11
11
|
import UTd from './UTable/UTd.vue'
|
|
12
12
|
import UTh from './UTable/UTh.vue'
|
|
13
13
|
import UTr from './UTable/UTr.vue'
|
|
14
|
-
import UTooltip from './UTooltip.vue'
|
|
15
14
|
|
|
16
15
|
const props = defineProps({
|
|
17
16
|
title: {
|
|
@@ -290,7 +289,6 @@ const handleMouseLeave = (type, index) => {
|
|
|
290
289
|
} else {
|
|
291
290
|
hoveringMenu.value[index] = false
|
|
292
291
|
}
|
|
293
|
-
|
|
294
292
|
setTimeout(() => {
|
|
295
293
|
if (!hoveringButton.value[index] && !hoveringMenu.value[index]) {
|
|
296
294
|
openMenu.value[index] = false
|
|
@@ -332,47 +330,42 @@ const handleMouseLeave = (type, index) => {
|
|
|
332
330
|
:indeterminate="true"
|
|
333
331
|
/>
|
|
334
332
|
</UTh>
|
|
335
|
-
<
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
col.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
?
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<span
|
|
354
|
-
:class="`${col.field === 'action' ? 'hidden-header-label' : ''}`"
|
|
333
|
+
<template v-for="(col, key) in props.cols">
|
|
334
|
+
<UTh
|
|
335
|
+
v-if="typeof col.show === 'undefined' || col.show"
|
|
336
|
+
:class="`${col.sortable ? 'cursor-pointer' : ''} ${
|
|
337
|
+
col.headerClasses
|
|
338
|
+
}`"
|
|
339
|
+
:key="key"
|
|
340
|
+
:tableHeaderAutoWidth="col.autoWidth"
|
|
341
|
+
:tableHeadAlignment="col.field === 'action' ? col.align : col.align"
|
|
342
|
+
@click="
|
|
343
|
+
col.sortable
|
|
344
|
+
? isCustomSort
|
|
345
|
+
? handleCustomSort(col.field, col.sortOrder, col.type)
|
|
346
|
+
: handleSort(col.field, col.sortOrder, col.type)
|
|
347
|
+
: null
|
|
348
|
+
"
|
|
349
|
+
:separator="separator"
|
|
350
|
+
:style="col.headerStyle"
|
|
355
351
|
>
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
<span v-if="col.sortable && col.field !== 'action'">
|
|
360
|
-
<q-btn
|
|
361
|
-
class="u-sorting-btn"
|
|
362
|
-
:aria-label="`Sort ${col.label}`"
|
|
363
|
-
label="Sorting Button"
|
|
364
|
-
:ripple="false"
|
|
365
|
-
tabindex="0"
|
|
352
|
+
<span
|
|
353
|
+
:class="`${col.field === 'action' ? 'hidden-header-label' : ''}`"
|
|
366
354
|
>
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
355
|
+
{{ col.field === 'action' ? 'Action' : col.label }}
|
|
356
|
+
</span>
|
|
357
|
+
|
|
358
|
+
<span v-if="col.sortable && col.field !== 'action'">
|
|
359
|
+
<UBtnIcon
|
|
360
|
+
:class="`more-action-icon cursor-pointer`"
|
|
361
|
+
:iconClass="`${getSortingIcon(col)}`"
|
|
362
|
+
ref="btn-icon"
|
|
363
|
+
:aria-label="`Sort ${col.label}`"
|
|
364
|
+
size="sm"
|
|
365
|
+
/>
|
|
366
|
+
</span>
|
|
367
|
+
</UTh>
|
|
368
|
+
</template>
|
|
376
369
|
</UTr>
|
|
377
370
|
</template>
|
|
378
371
|
<!-- custom body slots to add customized cell data -->
|
|
@@ -399,7 +392,10 @@ const handleMouseLeave = (type, index) => {
|
|
|
399
392
|
<template v-for="(col, index) in props.cols" :key="index">
|
|
400
393
|
<!-- to show the cell data without the action cell -->
|
|
401
394
|
<UTd
|
|
402
|
-
v-if="
|
|
395
|
+
v-if="
|
|
396
|
+
col.field !== 'action' &&
|
|
397
|
+
(typeof col.show === 'undefined' || col.show)
|
|
398
|
+
"
|
|
403
399
|
:row="props.row"
|
|
404
400
|
:col="col"
|
|
405
401
|
:index="index"
|
|
@@ -493,7 +489,7 @@ const handleMouseLeave = (type, index) => {
|
|
|
493
489
|
<!-- to the action cell, it can have single and multiple -->
|
|
494
490
|
|
|
495
491
|
<UTd
|
|
496
|
-
v-else
|
|
492
|
+
v-else-if="typeof col.show === 'undefined' || col.show"
|
|
497
493
|
:class="col.classes"
|
|
498
494
|
:index="index"
|
|
499
495
|
:tableDataAlignment="col.align"
|
|
@@ -513,6 +509,7 @@ const handleMouseLeave = (type, index) => {
|
|
|
513
509
|
:key="key"
|
|
514
510
|
:label="action.label"
|
|
515
511
|
:flat="action.flat"
|
|
512
|
+
:outline="action.outline"
|
|
516
513
|
:leftIcon="action.icon"
|
|
517
514
|
:color="action.color"
|
|
518
515
|
:disable="
|
|
@@ -521,17 +518,7 @@ const handleMouseLeave = (type, index) => {
|
|
|
521
518
|
"
|
|
522
519
|
:size="action.size"
|
|
523
520
|
@onClick="action.handler(props.row)"
|
|
524
|
-
|
|
525
|
-
<template v-slot:tooltip>
|
|
526
|
-
<UTooltip
|
|
527
|
-
v-if="action.tooltip"
|
|
528
|
-
:description="action.tooltip"
|
|
529
|
-
:anchor="action.anchor ? action.anchor : 'bottom middle'"
|
|
530
|
-
:self="action.self ? action.self : 'bottom middle'"
|
|
531
|
-
:offset="action.offset ? action.offset : [14, 40]"
|
|
532
|
-
/>
|
|
533
|
-
</template>
|
|
534
|
-
</UBtnStd>
|
|
521
|
+
/>
|
|
535
522
|
</template>
|
|
536
523
|
</template>
|
|
537
524
|
<!-- to show the actions list if the actions are multiple -->
|
|
@@ -542,21 +529,24 @@ const handleMouseLeave = (type, index) => {
|
|
|
542
529
|
iconClass="fa-kit fa-ellipsis-vertical"
|
|
543
530
|
ref="btn-icon"
|
|
544
531
|
ariaLabel="More action"
|
|
545
|
-
|
|
532
|
+
@focus="handleMouseEnter('button', props.row.id)"
|
|
546
533
|
@mouseover="handleMouseEnter('button', props.row.id)"
|
|
547
534
|
@mouseleave="handleMouseLeave('button', props.row.id)"
|
|
535
|
+
@blur="handleMouseLeave('button', props.row.id)"
|
|
548
536
|
@click.stop="handleMenuEventStop"
|
|
549
537
|
>
|
|
550
538
|
<template #menu>
|
|
551
539
|
<q-menu
|
|
552
540
|
v-if="!verticalMoreActions"
|
|
553
541
|
v-model="openMenu[props.row.id]"
|
|
542
|
+
role="list"
|
|
554
543
|
no-focus
|
|
555
544
|
no-refocus
|
|
556
|
-
role="list"
|
|
557
545
|
persistent
|
|
546
|
+
@focus="handleMouseEnter('button', props.row.id)"
|
|
558
547
|
@mouseleave="handleMouseLeave('menu', props.row.id)"
|
|
559
548
|
@mouseover="handleMouseEnter('menu', props.row.id)"
|
|
549
|
+
@blur="handleMouseLeave('button', props.row.id)"
|
|
560
550
|
>
|
|
561
551
|
<div
|
|
562
552
|
:class="`${
|
|
@@ -583,6 +573,7 @@ const handleMouseLeave = (type, index) => {
|
|
|
583
573
|
:tooltip="action.tooltip"
|
|
584
574
|
@onClick="action.handler(props.row)"
|
|
585
575
|
@click.stop="handleMenuEventStop"
|
|
576
|
+
@focus="handleMouseEnter('button', props.row.id)"
|
|
586
577
|
/>
|
|
587
578
|
</template>
|
|
588
579
|
</div>
|
|
@@ -591,12 +582,14 @@ const handleMouseLeave = (type, index) => {
|
|
|
591
582
|
<q-menu
|
|
592
583
|
v-else
|
|
593
584
|
v-model="openMenu[props.row.id]"
|
|
585
|
+
role="list"
|
|
594
586
|
no-focus
|
|
595
587
|
no-refocus
|
|
596
|
-
role="list"
|
|
597
588
|
persistent
|
|
589
|
+
@focus="handleMouseEnter('button', props.row.id)"
|
|
598
590
|
@mouseleave="handleMouseLeave('menu', props.row.id)"
|
|
599
591
|
@mouseover="handleMouseEnter('menu', props.row.id)"
|
|
592
|
+
@blur="handleMouseLeave('button', props.row.id)"
|
|
600
593
|
>
|
|
601
594
|
<UMenuDropdown
|
|
602
595
|
v-if="verticalMoreActions"
|
|
@@ -605,6 +598,15 @@ const handleMouseLeave = (type, index) => {
|
|
|
605
598
|
return {
|
|
606
599
|
label: action.label,
|
|
607
600
|
leftIcon: action.icon,
|
|
601
|
+
hide: !(typeof action.hide === 'function'
|
|
602
|
+
? !action.hide(props.row)
|
|
603
|
+
: true),
|
|
604
|
+
disable:
|
|
605
|
+
typeof action.disable === 'function' &&
|
|
606
|
+
action.disable(props.row),
|
|
607
|
+
handler: function () {
|
|
608
|
+
return action.handler(props.row)
|
|
609
|
+
},
|
|
608
610
|
}
|
|
609
611
|
})
|
|
610
612
|
"
|
|
@@ -717,11 +719,6 @@ const handleMouseLeave = (type, index) => {
|
|
|
717
719
|
color: $neutral-9 !important
|
|
718
720
|
font-size: $ba !important
|
|
719
721
|
|
|
720
|
-
.sorting-icon
|
|
721
|
-
color: $description
|
|
722
|
-
padding-left: $xs
|
|
723
|
-
font-size: $ba !important
|
|
724
|
-
|
|
725
722
|
.selected-data-row
|
|
726
723
|
background: #F7F7F7
|
|
727
724
|
|
|
@@ -138,7 +138,7 @@ defineExpose({ upload })
|
|
|
138
138
|
<template v-slot:header="scope">
|
|
139
139
|
<div v-if="scope.canAddFiles" class="q-py-md q-px-xl bg-neutral-2">
|
|
140
140
|
<div class="text-center">
|
|
141
|
-
<img src="/
|
|
141
|
+
<img src="../../assets/files.png" alt="Upload Files" />
|
|
142
142
|
<div class="text-body-md">
|
|
143
143
|
{{ description }}
|
|
144
144
|
</div>
|
package/src/pages/InputPhone.vue
CHANGED
|
@@ -79,26 +79,27 @@ defineOptions({
|
|
|
79
79
|
>
|
|
80
80
|
<template v-slot:component>
|
|
81
81
|
<UInputPhoneStd
|
|
82
|
-
|
|
82
|
+
v-model="inputValue"
|
|
83
|
+
aria-label="Country code selection"
|
|
84
|
+
:borderless="borderless"
|
|
85
|
+
:disable="disabled"
|
|
86
|
+
:error="isError"
|
|
87
|
+
:error-message="errorMessage"
|
|
83
88
|
:isRequired="isRequired"
|
|
89
|
+
:label="label"
|
|
90
|
+
lazy-rules
|
|
84
91
|
:mask="mask"
|
|
85
|
-
v-model="inputValue"
|
|
86
|
-
:validationRules="validationRules"
|
|
87
|
-
:rightIcon="rightIcon"
|
|
88
92
|
:hintText="hintText"
|
|
89
93
|
:hintIcon="hintIcon"
|
|
90
|
-
:
|
|
94
|
+
:options="countryOptions"
|
|
95
|
+
:outlined="outline"
|
|
91
96
|
:placeholder="placeholder"
|
|
92
|
-
:
|
|
93
|
-
:disable="disabled"
|
|
97
|
+
:rightIcon="rightIcon"
|
|
94
98
|
:readonly="readonly"
|
|
95
|
-
:
|
|
96
|
-
lazy-rules
|
|
97
|
-
:error-message="errorMessage"
|
|
98
|
-
:borderless="borderless"
|
|
99
|
-
:outlined="outline"
|
|
100
|
-
:options="countryOptions"
|
|
99
|
+
:size="size"
|
|
101
100
|
:selected-country="selectedCountry"
|
|
101
|
+
:toolTipText="toolTipText"
|
|
102
|
+
:validationRules="validationRules"
|
|
102
103
|
@update-country="selectCountry"
|
|
103
104
|
/>
|
|
104
105
|
</template>
|
|
@@ -120,11 +121,11 @@ defineOptions({
|
|
|
120
121
|
<div>
|
|
121
122
|
<q-radio dense v-model="type" val="outline" label="Outline" />
|
|
122
123
|
<q-radio
|
|
123
|
-
dense
|
|
124
124
|
v-model="type"
|
|
125
|
-
val="borderless"
|
|
126
|
-
label="Borderless"
|
|
127
125
|
class="q-pa-sm"
|
|
126
|
+
dense
|
|
127
|
+
label="Borderless"
|
|
128
|
+
val="borderless"
|
|
128
129
|
/>
|
|
129
130
|
</div>
|
|
130
131
|
</div>
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref } from 'vue'
|
|
3
2
|
import { UMenuDropdown } from 'src/components'
|
|
3
|
+
import { ref } from 'vue'
|
|
4
4
|
import ComponentBase from './ComponentBase.vue'
|
|
5
5
|
|
|
6
6
|
const Data = [
|
|
7
7
|
{
|
|
8
8
|
label: 'Profile',
|
|
9
9
|
leftIcon: 'fa-kit-duotone fa-user',
|
|
10
|
+
hide: false,
|
|
10
11
|
},
|
|
11
12
|
{
|
|
12
13
|
label: 'Settings',
|
|
13
14
|
leftIcon: 'fa-kit-duotone fa-admin',
|
|
15
|
+
disable: true,
|
|
14
16
|
},
|
|
15
17
|
{
|
|
16
18
|
label: 'Logout',
|
|
17
19
|
leftIcon: 'fa-kit-duotone fa-logout',
|
|
20
|
+
handler: function () {
|
|
21
|
+
console.log('demoooo')
|
|
22
|
+
},
|
|
18
23
|
},
|
|
19
24
|
]
|
|
20
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { UTabBtnStd } from 'src/components'
|
|
3
|
-
import ComponentBase from './ComponentBase.vue'
|
|
4
3
|
import { ref } from 'vue'
|
|
4
|
+
import ComponentBase from './ComponentBase.vue'
|
|
5
5
|
|
|
6
6
|
defineOptions({
|
|
7
7
|
name: 'TabButtonPage',
|
|
@@ -11,6 +11,8 @@ const htmlContent = `<UTabBtnStd
|
|
|
11
11
|
:buttonTabsOptions="buttonTabsOptions"
|
|
12
12
|
v-model="selectedTab"
|
|
13
13
|
:size="size"
|
|
14
|
+
:standard="standard"
|
|
15
|
+
@on-tab-click="handleTabChange"
|
|
14
16
|
/>`
|
|
15
17
|
|
|
16
18
|
const selectedTab = ref('1')
|
|
@@ -37,6 +39,14 @@ const buttonTabsOptions = ref([
|
|
|
37
39
|
const updateItem = (index, key, value) => {
|
|
38
40
|
buttonTabsOptions.value[index][key] = value
|
|
39
41
|
}
|
|
42
|
+
|
|
43
|
+
const handleTabChange = (value) => {
|
|
44
|
+
if (selectedTab.value === value) {
|
|
45
|
+
selectedTab.value = null
|
|
46
|
+
} else {
|
|
47
|
+
selectedTab.value = value
|
|
48
|
+
}
|
|
49
|
+
}
|
|
40
50
|
</script>
|
|
41
51
|
|
|
42
52
|
<template>
|
|
@@ -48,9 +58,10 @@ const updateItem = (index, key, value) => {
|
|
|
48
58
|
<template v-slot:component>
|
|
49
59
|
<UTabBtnStd
|
|
50
60
|
:buttonTabsOptions="buttonTabsOptions"
|
|
51
|
-
v-model="selectedTab"
|
|
61
|
+
v-model:selectedTab="selectedTab"
|
|
52
62
|
:size="size"
|
|
53
63
|
:standard="standard"
|
|
64
|
+
@on-tab-click="handleTabChange"
|
|
54
65
|
/>
|
|
55
66
|
<q-tab-panels
|
|
56
67
|
class="bg-transparent"
|
package/src/pages/TablePage.vue
CHANGED
|
@@ -47,6 +47,7 @@ const htmlContent = `<UTableStd
|
|
|
47
47
|
headerStyle: 'width:50%', // custom header style
|
|
48
48
|
headerClasses: 'my-header-class', // custom header classes
|
|
49
49
|
showChipTooltip:true/false // to hide show tooltip on chip
|
|
50
|
+
show: to show/hide columns
|
|
50
51
|
}
|
|
51
52
|
`
|
|
52
53
|
|
|
@@ -107,6 +108,14 @@ const columns = ref([
|
|
|
107
108
|
align: 'center',
|
|
108
109
|
autoWidth: true,
|
|
109
110
|
},
|
|
111
|
+
// {
|
|
112
|
+
// label: '',
|
|
113
|
+
// field: 'test',
|
|
114
|
+
// type: 'text',
|
|
115
|
+
// align: 'center',
|
|
116
|
+
// autoWidth: true,
|
|
117
|
+
// show: false,
|
|
118
|
+
// },
|
|
110
119
|
{
|
|
111
120
|
label: 'Active',
|
|
112
121
|
field: 'active',
|
|
@@ -146,6 +155,7 @@ const columns = ref([
|
|
|
146
155
|
// {
|
|
147
156
|
// label: 'View Team',
|
|
148
157
|
// flat: true,
|
|
158
|
+
// outline: false,
|
|
149
159
|
// icon: 'fa-kit-duotone fa-eye',
|
|
150
160
|
// handler: () => {
|
|
151
161
|
// console.log('clicked', row)
|
|
@@ -166,9 +176,6 @@ const columns = ref([
|
|
|
166
176
|
anchor: 'bottom middle',
|
|
167
177
|
self: 'bottom middle',
|
|
168
178
|
hide: () => {
|
|
169
|
-
return false
|
|
170
|
-
},
|
|
171
|
-
disable: () => {
|
|
172
179
|
return true
|
|
173
180
|
},
|
|
174
181
|
},
|
|
@@ -189,15 +196,21 @@ const columns = ref([
|
|
|
189
196
|
tooltip: 'Down',
|
|
190
197
|
anchor: 'bottom middle',
|
|
191
198
|
self: 'bottom middle',
|
|
199
|
+
disable: () => {
|
|
200
|
+
return true
|
|
201
|
+
},
|
|
192
202
|
},
|
|
193
203
|
{
|
|
194
204
|
icon: 'fa-kit-duotone fa-circle-arrow-up',
|
|
195
|
-
label: 'Open', //for aria label
|
|
205
|
+
label: 'Open 2', //for aria label
|
|
196
206
|
handler: (row) => handleOpen(row),
|
|
197
207
|
size: 'sm',
|
|
198
208
|
tooltip: 'UP',
|
|
199
209
|
anchor: 'bottom middle',
|
|
200
210
|
self: 'bottom middle',
|
|
211
|
+
hide: (row) => {
|
|
212
|
+
return row.test
|
|
213
|
+
},
|
|
201
214
|
},
|
|
202
215
|
],
|
|
203
216
|
},
|
|
@@ -234,6 +247,7 @@ const rowsData = computed(() => {
|
|
|
234
247
|
active: index % 2 ? 'Active' : isPrime(index) ? 'Reghold' : 'Inactive',
|
|
235
248
|
iron: index % 2 ? `fa-kit-duotone fa-circle-bolt` : null,
|
|
236
249
|
// iconColor: 'primary',
|
|
250
|
+
test: index % 2 ? true : false,
|
|
237
251
|
image: {
|
|
238
252
|
type: 'initials',
|
|
239
253
|
value: 'AC',
|