@usssa/component-library 1.0.0-alpha.21 → 1.0.0-alpha.210
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 +8 -5
- package/package.json +25 -6
- package/src/assets/fonts/CorneroRegular.woff +0 -0
- package/src/assets/fonts/CorneroRegular.woff2 +0 -0
- package/src/assets/logo.svg +19 -0
- package/src/assets/no-result.svg +25 -0
- package/src/assets/upload-illustration.svg +48 -0
- package/src/components/core/UAccordionSelect.vue +237 -0
- package/src/components/core/UAvatar.vue +90 -26
- 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 +57 -52
- package/src/components/core/UBtnStd.vue +38 -31
- package/src/components/core/UBtnToggle.vue +11 -6
- package/src/components/core/UCheckboxStd.vue +26 -20
- package/src/components/core/UChip.vue +91 -43
- package/src/components/core/UDate.vue +581 -0
- package/src/components/core/UDialogStd.vue +452 -58
- package/src/components/core/UDrawer/UDrawer.vue +471 -0
- package/src/components/core/UDrawer/UDrawerMenuItem.vue +124 -0
- package/src/components/core/UEventCard.vue +419 -0
- package/src/components/core/UExpansionStd.vue +274 -0
- package/src/components/core/UExpansionTableStd.vue +297 -0
- package/src/components/core/UFilter.vue +89 -0
- package/src/components/core/UGameObject.vue +441 -0
- package/src/components/core/UInnerLoader.vue +69 -0
- package/src/components/core/UInputAddressLookup.vue +484 -0
- package/src/components/core/UInputPhoneStd.vue +74 -68
- package/src/components/core/UInputTextStd.vue +137 -116
- package/src/components/core/UInputTypeahead.vue +44 -0
- package/src/components/core/UInputTypeaheadAdvanceSearch.vue +134 -0
- package/src/components/core/UMenuButtonStd.vue +280 -0
- package/src/components/core/UMenuDropdown.vue +82 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +306 -0
- package/src/components/core/UMenuItem.vue +221 -0
- package/src/components/core/UMenuSearch.vue +73 -0
- package/src/components/core/UModal.vue +660 -0
- package/src/components/core/UMultiSelectStd.vue +501 -61
- package/src/components/core/UPagination.vue +84 -25
- package/src/components/core/URadioBtn.vue +66 -43
- package/src/components/core/URadioStd.vue +23 -14
- package/src/components/core/USelectStd.vue +415 -84
- package/src/components/core/USheet.vue +349 -0
- package/src/components/core/UStepper/UProgress.vue +157 -0
- package/src/components/core/UStepper/UStepper.vue +211 -0
- package/src/components/core/UTabBtnStd.vue +36 -22
- package/src/components/core/UTable/UTable.vue +2055 -57
- package/src/components/core/UTableStd.vue +1301 -273
- package/src/components/core/UTabsStd.vue +52 -23
- package/src/components/core/UToggleStd.vue +18 -13
- package/src/components/core/UToolbar/UCustomMenuIcon.vue +58 -0
- package/src/components/core/UToolbar/UToolbar.vue +226 -0
- package/src/components/core/UTooltip.vue +31 -10
- package/src/components/core/UTypeahead.vue +890 -0
- package/src/components/core/UUploader.vue +644 -0
- package/src/components/index.js +77 -26
- 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 +42 -25
- package/src/css/colors.sass +2 -0
- package/src/css/quasar.variables.sass +99 -68
- package/src/css/vars/colors.variables.sass +28 -41
- package/src/utils/data.ts +177 -0
- package/src/App.vue +0 -9
- package/src/boot/.gitkeep +0 -0
- package/src/layouts/MainLayout.vue +0 -137
- package/src/pages/Avatar.vue +0 -77
- package/src/pages/AvatarGroup.vue +0 -139
- package/src/pages/BadgeStd.vue +0 -83
- package/src/pages/BannerPage.vue +0 -76
- package/src/pages/BtnIcon.vue +0 -120
- package/src/pages/BtnStd.vue +0 -126
- package/src/pages/BtnToggle.vue +0 -131
- package/src/pages/CheckBox.vue +0 -62
- package/src/pages/Chip.vue +0 -92
- package/src/pages/ComponentBase.vue +0 -54
- package/src/pages/Dialog.vue +0 -206
- package/src/pages/ErrorNotFound.vue +0 -11
- package/src/pages/IndexPage.vue +0 -11
- package/src/pages/InputPhone.vue +0 -152
- package/src/pages/InputText.vue +0 -139
- package/src/pages/MultiSelectStd.vue +0 -174
- package/src/pages/NotifyPage.vue +0 -109
- package/src/pages/Pagination.vue +0 -71
- package/src/pages/Radio.vue +0 -80
- package/src/pages/RadioBtn.vue +0 -104
- package/src/pages/SelectStd.vue +0 -160
- package/src/pages/TabButtonPage.vue +0 -126
- package/src/pages/TablePage.vue +0 -371
- package/src/pages/TabsPage.vue +0 -261
- package/src/pages/TogglePage.vue +0 -58
- package/src/pages/TooltipPage.vue +0 -125
- package/src/router/index.js +0 -34
- package/src/router/routes.js +0 -113
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, watch } from 'vue'
|
|
2
|
+
import { computed, ref, watch } from 'vue'
|
|
3
|
+
import { useScreenType } from '../../composables/useScreenType'
|
|
3
4
|
import USelectStd from './USelectStd.vue'
|
|
5
|
+
|
|
6
|
+
const emit = defineEmits(['update:modelValue', 'onRowChange', 'onPageChange'])
|
|
7
|
+
|
|
8
|
+
const model = defineModel()
|
|
9
|
+
|
|
4
10
|
const props = defineProps({
|
|
5
|
-
|
|
6
|
-
type:
|
|
7
|
-
default:
|
|
11
|
+
applyLabel: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'Apply',
|
|
8
14
|
},
|
|
9
|
-
|
|
10
|
-
type:
|
|
11
|
-
default:
|
|
15
|
+
cancelLabel: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'Cancel',
|
|
18
|
+
},
|
|
19
|
+
closeIconLabel: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'Close icon'
|
|
22
|
+
},
|
|
23
|
+
dataTestId: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'pagination-std',
|
|
12
26
|
},
|
|
13
27
|
maxPageLink: {
|
|
14
28
|
//Maximum number of page links to display at a time
|
|
@@ -17,7 +31,11 @@ const props = defineProps({
|
|
|
17
31
|
},
|
|
18
32
|
maxPages: {
|
|
19
33
|
type: Number,
|
|
20
|
-
default:
|
|
34
|
+
default: 1,
|
|
35
|
+
},
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 1,
|
|
21
39
|
},
|
|
22
40
|
perPageOptions: {
|
|
23
41
|
type: Array,
|
|
@@ -28,47 +46,78 @@ const props = defineProps({
|
|
|
28
46
|
{ label: '20 / per page', value: 20 },
|
|
29
47
|
],
|
|
30
48
|
},
|
|
49
|
+
rowPerPage: {
|
|
50
|
+
type: Number,
|
|
51
|
+
default: 5,
|
|
52
|
+
},
|
|
53
|
+
sheetLabel: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'Selections Per Page',
|
|
56
|
+
},
|
|
31
57
|
})
|
|
32
|
-
|
|
33
|
-
const
|
|
58
|
+
|
|
59
|
+
const $screen = useScreenType()
|
|
60
|
+
|
|
61
|
+
// refs
|
|
34
62
|
const currentPage = ref(props.modelValue)
|
|
63
|
+
const rowPerPage = ref(props.rowPerPage)
|
|
35
64
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
65
|
+
const perPageOptionsList = computed(() => {
|
|
66
|
+
if ($screen.value.isMobile) {
|
|
67
|
+
return [...props.perPageOptions].map((option) => ({
|
|
68
|
+
...option,
|
|
69
|
+
label: option.label.split(' ')[0],
|
|
70
|
+
}))
|
|
71
|
+
}
|
|
72
|
+
return props.perPageOptions
|
|
39
73
|
})
|
|
74
|
+
|
|
75
|
+
// custom functions
|
|
40
76
|
const onPageChange = (newPage) => {
|
|
41
77
|
currentPage.value = newPage
|
|
42
78
|
}
|
|
43
79
|
const onRowChange = (newRowPerPage) => {
|
|
44
80
|
emit('onRowChange', newRowPerPage)
|
|
45
81
|
}
|
|
82
|
+
|
|
83
|
+
// watcher function
|
|
84
|
+
watch(currentPage, (newValue) => {
|
|
85
|
+
emit('update:modelValue', newValue)
|
|
86
|
+
emit('onPageChange', newValue)
|
|
87
|
+
})
|
|
46
88
|
</script>
|
|
47
89
|
|
|
48
90
|
<template>
|
|
49
|
-
<div
|
|
91
|
+
<div
|
|
92
|
+
:class="`row u-pagination-container no-wrap items-center ${
|
|
93
|
+
$screen.isMobile ? 'justify-between' : 'justify-end'
|
|
94
|
+
}`"
|
|
95
|
+
>
|
|
50
96
|
<q-pagination
|
|
97
|
+
v-model="model"
|
|
51
98
|
class="u-pagination"
|
|
52
|
-
|
|
99
|
+
active-color="primary"
|
|
100
|
+
boundary-numbers
|
|
101
|
+
color="dark"
|
|
102
|
+
:dataTestId="dataTestId"
|
|
53
103
|
direction-links
|
|
54
104
|
flat
|
|
55
|
-
|
|
56
|
-
active-color="primary"
|
|
105
|
+
gutter="sm"
|
|
57
106
|
:max="maxPages"
|
|
58
107
|
:max-pages="maxPageLink"
|
|
59
|
-
boundary-numbers
|
|
60
108
|
@update:model-value="onPageChange"
|
|
61
|
-
icon-prev="img:icons/chevron-left.svg"
|
|
62
|
-
icon-next="img:icons/chevron-right.svg"
|
|
63
|
-
gutter="sm"
|
|
64
109
|
/>
|
|
65
110
|
|
|
66
111
|
<USelectStd
|
|
67
|
-
class="q-gutter-x-sm text-body-sm"
|
|
68
112
|
v-model="rowPerPage"
|
|
69
|
-
|
|
70
|
-
:options="perPageOptions"
|
|
113
|
+
class="q-gutter-x-sm text-body-sm perpage-dropdown"
|
|
71
114
|
popupClass="pagination-dropdown"
|
|
115
|
+
:apply-label="applyLabel"
|
|
116
|
+
:cancel-label="cancelLabel"
|
|
117
|
+
:close-icon-label="closeIconLabel"
|
|
118
|
+
color="primary"
|
|
119
|
+
:options="perPageOptionsList"
|
|
120
|
+
:sheetLabel="sheetLabel"
|
|
72
121
|
@update:model-value="onRowChange"
|
|
73
122
|
/>
|
|
74
123
|
</div>
|
|
@@ -76,7 +125,17 @@ const onRowChange = (newRowPerPage) => {
|
|
|
76
125
|
|
|
77
126
|
<style lang="sass">
|
|
78
127
|
.pagination-dropdown
|
|
79
|
-
width: auto
|
|
128
|
+
width: auto !important
|
|
129
|
+
|
|
130
|
+
.perpage-dropdown
|
|
131
|
+
.q-field__marginal
|
|
132
|
+
padding-left: $xs
|
|
133
|
+
.q-field--outlined
|
|
134
|
+
margin-top: 0 !important
|
|
135
|
+
.q-field--outlined .q-field__control
|
|
136
|
+
display: inline-flex
|
|
137
|
+
max-width: 8.75rem
|
|
138
|
+
|
|
80
139
|
.u-pagination
|
|
81
140
|
.q-icon
|
|
82
141
|
font-size: $ba
|
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
import URadioStd from './URadioStd.vue'
|
|
4
|
+
import { useScreenType } from '../../composables/useScreenType'
|
|
5
|
+
|
|
6
|
+
const emit = defineEmits(['onClick', 'onButtonClick'])
|
|
7
|
+
const model = defineModel()
|
|
4
8
|
const props = defineProps({
|
|
5
|
-
|
|
9
|
+
altText: {
|
|
6
10
|
type: String,
|
|
7
11
|
default: '',
|
|
8
12
|
},
|
|
9
|
-
|
|
13
|
+
dataTestId: {
|
|
10
14
|
type: String,
|
|
11
|
-
default: '',
|
|
15
|
+
default: 'radio-btn-std',
|
|
12
16
|
},
|
|
13
17
|
description: {
|
|
14
18
|
type: String,
|
|
15
19
|
default: '',
|
|
16
20
|
},
|
|
17
|
-
|
|
21
|
+
iconClass: {
|
|
18
22
|
type: String,
|
|
19
23
|
default: '',
|
|
20
24
|
},
|
|
25
|
+
iconColor: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: 'primary',
|
|
28
|
+
},
|
|
29
|
+
id: { String },
|
|
21
30
|
image: {
|
|
22
31
|
type: String,
|
|
23
32
|
default: '',
|
|
@@ -26,24 +35,17 @@ const props = defineProps({
|
|
|
26
35
|
type: String,
|
|
27
36
|
default: '',
|
|
28
37
|
},
|
|
29
|
-
|
|
38
|
+
label: {
|
|
30
39
|
type: String,
|
|
31
40
|
default: '',
|
|
32
41
|
},
|
|
33
|
-
|
|
42
|
+
value: {
|
|
34
43
|
type: String,
|
|
35
|
-
default: '
|
|
44
|
+
default: '',
|
|
36
45
|
},
|
|
37
|
-
|
|
38
|
-
id: { String },
|
|
39
46
|
})
|
|
40
47
|
|
|
41
|
-
const
|
|
42
|
-
const model = defineModel()
|
|
43
|
-
|
|
44
|
-
const handleChange = () => {
|
|
45
|
-
model.value = props.value
|
|
46
|
-
}
|
|
48
|
+
const $screen = useScreenType()
|
|
47
49
|
|
|
48
50
|
const activeClass = computed(() => {
|
|
49
51
|
if (model.value === props.value) {
|
|
@@ -51,32 +53,56 @@ const activeClass = computed(() => {
|
|
|
51
53
|
}
|
|
52
54
|
return ''
|
|
53
55
|
})
|
|
56
|
+
|
|
57
|
+
const isMobile = computed(() => $screen.value.isMobile)
|
|
58
|
+
|
|
59
|
+
const handleChange = () => {
|
|
60
|
+
model.value = props.value
|
|
61
|
+
}
|
|
54
62
|
</script>
|
|
55
63
|
|
|
56
64
|
<template>
|
|
57
|
-
<q-btn
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
<q-btn
|
|
66
|
+
:class="`u-radio-btn ${activeClass}${isMobile ? ' full-width' : ''}`"
|
|
67
|
+
:dataTestId="dataTestId"
|
|
68
|
+
flat
|
|
69
|
+
@click="handleChange"
|
|
70
|
+
>
|
|
71
|
+
<div class="radio-btn-content flex items-center justify-between full-width">
|
|
72
|
+
<div
|
|
73
|
+
class="flex items-center justify-center radio-btn-text-wrapper no-wrap"
|
|
74
|
+
>
|
|
75
|
+
<URadioStd
|
|
76
|
+
v-model="model"
|
|
77
|
+
:aria-label="label"
|
|
78
|
+
:id="id"
|
|
79
|
+
:value="value"
|
|
80
|
+
/>
|
|
81
|
+
<div class="button-text q-ml-xs">
|
|
82
|
+
<div class="text-caption-lg">{{ label }}</div>
|
|
83
|
+
<div class="description-text text-body-sm">
|
|
84
|
+
{{ description }}
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
63
87
|
</div>
|
|
64
88
|
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
89
|
+
<div class="flex items-center">
|
|
90
|
+
<img
|
|
91
|
+
v-if="image"
|
|
92
|
+
class="radio-btn-img"
|
|
93
|
+
:alt="altText"
|
|
94
|
+
:aria-label="imgAriaLabel"
|
|
95
|
+
size="1.5rem"
|
|
96
|
+
:src="image"
|
|
97
|
+
/>
|
|
98
|
+
<q-icon
|
|
99
|
+
v-if="iconClass"
|
|
100
|
+
:class="iconClass"
|
|
101
|
+
:aria-label="imgAriaLabel"
|
|
102
|
+
:color="iconColor"
|
|
103
|
+
size="1.5rem"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
80
106
|
</div>
|
|
81
107
|
</q-btn>
|
|
82
108
|
</template>
|
|
@@ -84,31 +110,28 @@ const activeClass = computed(() => {
|
|
|
84
110
|
<style lang="sass">
|
|
85
111
|
.u-radio-btn
|
|
86
112
|
padding: $xs $sm
|
|
87
|
-
border:
|
|
113
|
+
border: 0.125rem solid $neutral-4
|
|
88
114
|
border-radius: $xs
|
|
89
115
|
min-height: $lg
|
|
90
116
|
.q-radio__label
|
|
91
117
|
padding-left: 0 !important
|
|
92
118
|
|
|
93
|
-
.radio-btn-content
|
|
94
|
-
gap: $xs
|
|
95
|
-
|
|
96
119
|
.button-text
|
|
97
120
|
text-align: left !important
|
|
98
|
-
min-width: 6.063rem
|
|
99
121
|
|
|
100
122
|
.description-text
|
|
101
123
|
color: $description
|
|
124
|
+
white-space: nowrap
|
|
102
125
|
|
|
103
126
|
.radio-btn-img
|
|
104
127
|
width: $ms
|
|
105
128
|
height: $ms
|
|
106
129
|
|
|
107
130
|
.active
|
|
108
|
-
border:
|
|
131
|
+
border: 0.125rem solid $primary
|
|
109
132
|
|
|
110
133
|
.u-radio-btn:hover
|
|
111
|
-
border:
|
|
134
|
+
border: 0.125rem solid $primary
|
|
112
135
|
background-color: $primary-transparent
|
|
113
136
|
|
|
114
137
|
.q-radio .q-radio__inner
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { onMounted } from 'vue'
|
|
3
3
|
|
|
4
|
+
const radioValue = defineModel()
|
|
5
|
+
|
|
4
6
|
const props = defineProps({
|
|
5
|
-
label: {
|
|
6
|
-
type: String,
|
|
7
|
-
},
|
|
8
7
|
ariaLabel: {
|
|
9
8
|
type: String,
|
|
10
9
|
},
|
|
11
|
-
|
|
10
|
+
dataTestId: {
|
|
12
11
|
type: String,
|
|
12
|
+
default: 'radio-std',
|
|
13
13
|
},
|
|
14
14
|
disable: {
|
|
15
15
|
type: Boolean,
|
|
@@ -20,34 +20,43 @@ const props = defineProps({
|
|
|
20
20
|
default: 'u-radio',
|
|
21
21
|
required: true, // it is required for to match accessibility crieteria
|
|
22
22
|
},
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
},
|
|
26
|
+
value: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
23
29
|
})
|
|
24
30
|
onMounted(() => {
|
|
25
31
|
const radioElement = document.getElementById(props.id)
|
|
26
32
|
if (radioElement) {
|
|
27
33
|
const inputElement = radioElement.querySelector('input')
|
|
28
|
-
inputElement
|
|
34
|
+
if (inputElement) {
|
|
35
|
+
inputElement.id = props.id
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
})
|
|
31
|
-
|
|
32
|
-
const radioValue = defineModel()
|
|
33
39
|
</script>
|
|
34
40
|
|
|
35
41
|
<template>
|
|
36
|
-
<label class="hidden" :for="id"
|
|
37
|
-
label || ariaLabel
|
|
38
|
-
|
|
42
|
+
<label v-if="label || ariaLabel" class="hidden" :for="id">
|
|
43
|
+
{{ label || ariaLabel }}
|
|
44
|
+
</label>
|
|
39
45
|
<q-radio
|
|
46
|
+
v-bind="$attrs"
|
|
40
47
|
v-model="radioValue"
|
|
48
|
+
:aria-label="ariaLabel"
|
|
41
49
|
class="u-radio"
|
|
42
|
-
:val="value"
|
|
43
50
|
color="primary"
|
|
44
|
-
|
|
51
|
+
:dataTestId="dataTestId"
|
|
45
52
|
dense
|
|
46
|
-
size="3rem"
|
|
47
53
|
:disable="disable"
|
|
48
54
|
:id="id"
|
|
55
|
+
keep-color
|
|
56
|
+
size="3rem"
|
|
57
|
+
:val="value"
|
|
49
58
|
>
|
|
50
|
-
<div class="text-center text-caption-lg radio-label"
|
|
59
|
+
<div v-if="label" class="text-center text-caption-lg radio-label">
|
|
51
60
|
{{ label }}
|
|
52
61
|
</div>
|
|
53
62
|
</q-radio>
|