@usssa/component-library 1.0.0-alpha.15 → 1.0.0-alpha.151
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 +6 -3
- package/package.json +23 -5
- package/src/assets/logo.svg +19 -0
- package/src/assets/no-result.svg +25 -0
- package/src/assets/quasar-logo-vertical.svg +15 -0
- package/src/assets/upload-illustration.svg +48 -0
- package/src/components/core/UAvatar.vue +56 -24
- package/src/components/core/UAvatarGroup.vue +62 -52
- package/src/components/core/UBadgeStd.vue +6 -1
- package/src/components/core/UBannerStd.vue +100 -31
- package/src/components/core/UBreadCrumbs.vue +171 -0
- package/src/components/core/UBtnIcon.vue +58 -53
- package/src/components/core/UBtnStd.vue +39 -31
- package/src/components/core/UBtnToggle.vue +11 -6
- package/src/components/core/UCheckboxStd.vue +26 -20
- package/src/components/core/UChip.vue +76 -42
- package/src/components/core/UDate.vue +565 -0
- package/src/components/core/UDialogStd.vue +460 -53
- package/src/components/core/UDrawer.vue +321 -0
- package/src/components/core/UInnerLoader.vue +69 -0
- package/src/components/core/UInputAddressLookup.vue +471 -0
- package/src/components/core/UInputPhoneStd.vue +73 -68
- package/src/components/core/UInputTextStd.vue +133 -116
- package/src/components/core/UInputTypeahead.vue +44 -0
- package/src/components/core/UInputTypeaheadAdvanceSearch.vue +126 -0
- package/src/components/core/UMenuButtonStd.vue +280 -0
- package/src/components/core/UMenuDropdown.vue +80 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +293 -0
- package/src/components/core/UMenuItem.vue +161 -0
- package/src/components/core/UMenuSearch.vue +69 -0
- package/src/components/core/UMultiSelectStd.vue +258 -54
- package/src/components/core/UPagination.vue +67 -27
- package/src/components/core/URadioBtn.vue +66 -43
- package/src/components/core/URadioStd.vue +19 -12
- package/src/components/core/USelectStd.vue +360 -80
- package/src/components/core/USheet.vue +349 -0
- package/src/components/core/UTabBtnStd.vue +87 -59
- package/src/components/core/UTable/UTable.vue +811 -42
- package/src/components/core/UTableStd.vue +875 -275
- package/src/components/core/UTabsStd.vue +57 -16
- package/src/components/core/UToggleStd.vue +43 -29
- package/src/components/core/UToolbar/UCustomMenuIcon.vue +58 -0
- package/src/components/core/UToolbar/UToolbar.vue +210 -0
- package/src/components/core/UTooltip.vue +31 -10
- package/src/components/core/UTypeahead.vue +830 -0
- package/src/components/core/UUploader.vue +535 -0
- package/src/components/index.js +61 -21
- package/src/composables/useNotify.js +16 -16
- package/src/composables/useOverlayLoader.js +23 -0
- package/src/composables/useScreenType.js +30 -0
- package/src/css/app.sass +168 -0
- package/src/css/colors.sass +103 -0
- package/src/css/media.sass +1 -0
- package/src/css/quasar.variables.sass +121 -0
- package/src/css/typography.sass +0 -0
- package/src/css/vars/colors.variables.sass +127 -0
- package/src/utils/data.ts +146 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
const props = defineProps({
|
|
3
|
+
dataTestId: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: 'toggle-btn',
|
|
6
|
+
},
|
|
3
7
|
options: {
|
|
4
8
|
type: Array,
|
|
5
9
|
require: true,
|
|
@@ -10,16 +14,17 @@ const model = defineModel()
|
|
|
10
14
|
|
|
11
15
|
<template>
|
|
12
16
|
<q-btn-toggle
|
|
13
|
-
class="u-btn-toggle"
|
|
14
17
|
v-model="model"
|
|
15
|
-
|
|
16
|
-
text-color="dark"
|
|
17
|
-
unelevated
|
|
18
|
+
class="u-btn-toggle"
|
|
18
19
|
color="white"
|
|
20
|
+
:dataTestId="dataTestId"
|
|
19
21
|
no-caps
|
|
22
|
+
:options="options"
|
|
23
|
+
size="md"
|
|
20
24
|
spread
|
|
25
|
+
text-color="dark"
|
|
21
26
|
toggle-color="primary"
|
|
22
|
-
|
|
27
|
+
unelevated
|
|
23
28
|
>
|
|
24
29
|
<template
|
|
25
30
|
v-for="(option, index) in options"
|
|
@@ -28,8 +33,8 @@ const model = defineModel()
|
|
|
28
33
|
>
|
|
29
34
|
<div class="row items-center no-wrap slot">
|
|
30
35
|
<q-icon
|
|
31
|
-
:class="options[index].iconClass"
|
|
32
36
|
v-if="options[index].iconClass"
|
|
37
|
+
:class="options[index].iconClass"
|
|
33
38
|
/>
|
|
34
39
|
<div class="text-center text-caption-md">
|
|
35
40
|
{{ options[index].name }}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { onMounted } from 'vue'
|
|
3
3
|
|
|
4
|
+
const isChecked = defineModel({ default: false, type: Boolean })
|
|
4
5
|
const props = defineProps({
|
|
5
|
-
|
|
6
|
-
type: String,
|
|
7
|
-
default: '',
|
|
8
|
-
},
|
|
9
|
-
name: {
|
|
6
|
+
dataTestId: {
|
|
10
7
|
type: String,
|
|
11
|
-
default: '',
|
|
8
|
+
default: 'checkbox-std',
|
|
12
9
|
},
|
|
13
10
|
disabled: {
|
|
14
11
|
type: Boolean,
|
|
15
12
|
default: false,
|
|
16
13
|
},
|
|
17
|
-
showLabel: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: true,
|
|
20
|
-
},
|
|
21
14
|
id: {
|
|
22
15
|
type: [String, Number],
|
|
23
16
|
default: 'u-checkbox',
|
|
@@ -27,15 +20,27 @@ const props = defineProps({
|
|
|
27
20
|
type: Boolean,
|
|
28
21
|
default: false,
|
|
29
22
|
},
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: '',
|
|
26
|
+
},
|
|
27
|
+
name: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: '',
|
|
30
|
+
},
|
|
31
|
+
showLabel: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: true,
|
|
34
|
+
},
|
|
30
35
|
})
|
|
31
36
|
|
|
32
|
-
const isChecked = defineModel({ default: false, type: Boolean })
|
|
33
|
-
|
|
34
37
|
onMounted(() => {
|
|
35
38
|
const checkboxElement = document.getElementById(`${props.id}`)
|
|
36
39
|
if (checkboxElement) {
|
|
37
40
|
const inputElement = checkboxElement.querySelector('input')
|
|
38
|
-
inputElement
|
|
41
|
+
if (inputElement) {
|
|
42
|
+
inputElement.id = `${props.id}`
|
|
43
|
+
}
|
|
39
44
|
} else {
|
|
40
45
|
// need to add if element is not found
|
|
41
46
|
}
|
|
@@ -43,19 +48,20 @@ onMounted(() => {
|
|
|
43
48
|
</script>
|
|
44
49
|
|
|
45
50
|
<template>
|
|
46
|
-
<label
|
|
51
|
+
<label :for="`${id}`" style="display: none">Checkbox</label>
|
|
47
52
|
<q-checkbox
|
|
48
|
-
|
|
49
|
-
class="u-checkbox text-caption-lg"
|
|
50
|
-
:name="name"
|
|
53
|
+
v-bind="$attrs"
|
|
51
54
|
v-model="isChecked"
|
|
55
|
+
class="u-checkbox text-caption-lg"
|
|
56
|
+
color="primary"
|
|
57
|
+
:dataTestId="dataTestId"
|
|
52
58
|
:disable="disabled"
|
|
59
|
+
:id="`${id}`"
|
|
60
|
+
keep-color
|
|
53
61
|
:label="showLabel ? label : ''"
|
|
62
|
+
:name="name"
|
|
54
63
|
size="md"
|
|
55
|
-
keep-color
|
|
56
|
-
color="primary"
|
|
57
64
|
:toggle-indeterminate="indeterminate"
|
|
58
|
-
v-bind="$attrs"
|
|
59
65
|
/>
|
|
60
66
|
</template>
|
|
61
67
|
|
|
@@ -1,32 +1,46 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from 'vue'
|
|
3
|
+
import UTooltip from './UTooltip.vue'
|
|
3
4
|
|
|
5
|
+
const emit = defineEmits(['update:modelValue', 'onClick'])
|
|
4
6
|
const props = defineProps({
|
|
7
|
+
anchor: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'bottom middle',
|
|
10
|
+
},
|
|
11
|
+
avatarLabel: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: '',
|
|
14
|
+
},
|
|
5
15
|
chipLabel: {
|
|
6
16
|
type: String,
|
|
7
17
|
default: 'Chip',
|
|
8
18
|
},
|
|
9
|
-
|
|
10
|
-
type:
|
|
11
|
-
default:
|
|
19
|
+
dataTestId: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'u-chip'
|
|
12
22
|
},
|
|
13
|
-
|
|
23
|
+
dense: {
|
|
14
24
|
type: Boolean,
|
|
15
25
|
default: false,
|
|
16
26
|
},
|
|
17
|
-
avatarLabel: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '',
|
|
20
|
-
},
|
|
21
27
|
icon: {
|
|
22
28
|
type: String,
|
|
23
29
|
},
|
|
24
30
|
iconClass: {
|
|
25
31
|
type: String,
|
|
26
32
|
},
|
|
27
|
-
|
|
28
|
-
type:
|
|
29
|
-
default:
|
|
33
|
+
isShowTooltip: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
modelValue: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
offset: {
|
|
42
|
+
default: () => [14, 14],
|
|
43
|
+
type: Array,
|
|
30
44
|
},
|
|
31
45
|
removable: {
|
|
32
46
|
type: Boolean,
|
|
@@ -35,13 +49,19 @@ const props = defineProps({
|
|
|
35
49
|
remove: {
|
|
36
50
|
type: Function,
|
|
37
51
|
},
|
|
52
|
+
type: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: 'neutral',
|
|
55
|
+
},
|
|
38
56
|
})
|
|
39
57
|
|
|
40
|
-
const
|
|
58
|
+
const avatarLabel = computed(() => {
|
|
59
|
+
if (props.avatarLabel && props.avatarLabel.length > 2) {
|
|
60
|
+
return props.avatarLabel.substring(0, 2)
|
|
61
|
+
}
|
|
62
|
+
return props.avatarLabel
|
|
63
|
+
})
|
|
41
64
|
|
|
42
|
-
const handleClick = () => {
|
|
43
|
-
return emit('onClick')
|
|
44
|
-
}
|
|
45
65
|
const size = computed(() => {
|
|
46
66
|
if (props.dense) {
|
|
47
67
|
return 'xs'
|
|
@@ -49,26 +69,24 @@ const size = computed(() => {
|
|
|
49
69
|
return 'sm'
|
|
50
70
|
})
|
|
51
71
|
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
return props.avatarLabel
|
|
57
|
-
})
|
|
72
|
+
const handleClick = () => {
|
|
73
|
+
return emit('onClick')
|
|
74
|
+
}
|
|
58
75
|
</script>
|
|
59
76
|
|
|
60
77
|
<template>
|
|
61
78
|
<q-chip
|
|
79
|
+
v-bind="$attrs"
|
|
62
80
|
v-if="chipLabel"
|
|
63
81
|
class="u-chip q-px-xs"
|
|
64
|
-
v-bind="$attrs"
|
|
65
82
|
:class="type"
|
|
66
|
-
:
|
|
83
|
+
:aria-label="chipLabel"
|
|
84
|
+
:dataTestId="dataTestId"
|
|
67
85
|
:dense="dense"
|
|
68
|
-
|
|
86
|
+
:modelValue="modelValue"
|
|
69
87
|
:removable="removable"
|
|
70
|
-
:aria-label="chipLabel"
|
|
71
88
|
@click="handleClick"
|
|
89
|
+
@remove="remove"
|
|
72
90
|
>
|
|
73
91
|
<q-avatar v-if="avatarLabel" class="u-avatar">
|
|
74
92
|
<span class="text-caption-xs">{{ avatarLabel }}</span>
|
|
@@ -79,6 +97,12 @@ const avatarLabel = computed(() => {
|
|
|
79
97
|
<span :class="`chip-label text-overline-${size} text-uppercase`">
|
|
80
98
|
{{ chipLabel }}
|
|
81
99
|
</span>
|
|
100
|
+
<UTooltip
|
|
101
|
+
v-if="isShowTooltip"
|
|
102
|
+
:anchor="anchor"
|
|
103
|
+
:description="chipLabel"
|
|
104
|
+
:offset="offset"
|
|
105
|
+
/>
|
|
82
106
|
</q-chip>
|
|
83
107
|
</template>
|
|
84
108
|
|
|
@@ -87,13 +111,17 @@ const avatarLabel = computed(() => {
|
|
|
87
111
|
padding: $xs
|
|
88
112
|
border-radius: 20px
|
|
89
113
|
height: $lg
|
|
114
|
+
margin-left: 0px !important
|
|
115
|
+
|
|
116
|
+
&.q-chip--dense
|
|
117
|
+
.chip-label
|
|
118
|
+
line-height: 2 !important
|
|
90
119
|
|
|
91
120
|
.u-avatar
|
|
92
121
|
width: $ms
|
|
93
122
|
height: $ms
|
|
94
123
|
margin-left:0 !important
|
|
95
124
|
|
|
96
|
-
|
|
97
125
|
.q-icon
|
|
98
126
|
width: $ba
|
|
99
127
|
height: $ba
|
|
@@ -106,7 +134,6 @@ const avatarLabel = computed(() => {
|
|
|
106
134
|
padding: $xs 0 $xs $xs
|
|
107
135
|
margin:0
|
|
108
136
|
|
|
109
|
-
|
|
110
137
|
&.neutral
|
|
111
138
|
background-color: $neutral-3
|
|
112
139
|
color: $neutral-9
|
|
@@ -128,24 +155,24 @@ const avatarLabel = computed(() => {
|
|
|
128
155
|
color: $primary !important
|
|
129
156
|
|
|
130
157
|
&.positive
|
|
131
|
-
background-color: $green-
|
|
132
|
-
color: $
|
|
158
|
+
background-color: $green-1
|
|
159
|
+
color: $positive
|
|
133
160
|
.q-avatar
|
|
134
|
-
background-color: $
|
|
135
|
-
color: $green-
|
|
161
|
+
background-color: $positive !important
|
|
162
|
+
color: $green-1 !important
|
|
136
163
|
|
|
137
164
|
.q-icon
|
|
138
|
-
color: $
|
|
165
|
+
color: $positive !important
|
|
139
166
|
|
|
140
167
|
&.accent
|
|
141
|
-
background-color: $red-
|
|
142
|
-
color: $
|
|
168
|
+
background-color: $red-1
|
|
169
|
+
color: $accent
|
|
143
170
|
.q-avatar
|
|
144
|
-
background-color: $
|
|
145
|
-
color: $red-
|
|
171
|
+
background-color: $accent !important
|
|
172
|
+
color: $red-1 !important
|
|
146
173
|
|
|
147
174
|
.q-icon
|
|
148
|
-
color: $
|
|
175
|
+
color: $accent !important
|
|
149
176
|
|
|
150
177
|
&.info
|
|
151
178
|
background-color: $purple-2
|
|
@@ -158,14 +185,14 @@ const avatarLabel = computed(() => {
|
|
|
158
185
|
color: $purple-7 !important
|
|
159
186
|
|
|
160
187
|
&.warning
|
|
161
|
-
background-color: $orange-
|
|
162
|
-
color: $
|
|
188
|
+
background-color: $orange-1
|
|
189
|
+
color: $warning
|
|
163
190
|
.q-avatar
|
|
164
|
-
background-color: $
|
|
165
|
-
color: $orange-
|
|
191
|
+
background-color: $warning !important
|
|
192
|
+
color: $orange-1 !important
|
|
166
193
|
|
|
167
194
|
.q-icon
|
|
168
|
-
color: $
|
|
195
|
+
color: $warning !important
|
|
169
196
|
&.yellow
|
|
170
197
|
background-color: $yellow-1
|
|
171
198
|
color: $yellow-9
|
|
@@ -223,4 +250,11 @@ const avatarLabel = computed(() => {
|
|
|
223
250
|
|
|
224
251
|
.q-chip__icon--remove
|
|
225
252
|
padding: $xxs
|
|
253
|
+
|
|
254
|
+
.chip-label
|
|
255
|
+
max-width: 12.5rem
|
|
256
|
+
white-space: normal
|
|
257
|
+
overflow-wrap: break-word
|
|
258
|
+
line-height: 1.5 !important // over-ridding this in long chip label case
|
|
259
|
+
|
|
226
260
|
</style>
|