@usssa/component-library 1.0.0-alpha.10 → 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.
- package/README.md +5 -2
- package/package.json +19 -4
- package/src/assets/files.png +0 -0
- package/src/assets/logo.svg +19 -0
- package/src/assets/no-result.png +0 -0
- package/src/assets/quasar-logo-vertical.svg +15 -0
- package/src/components/core/UAvatar.vue +39 -6
- package/src/components/core/UAvatarGroup.vue +15 -14
- package/src/components/core/UBannerStd.vue +51 -22
- package/src/components/core/UBreadCrumbs.vue +67 -0
- package/src/components/core/UBtnIcon.vue +24 -14
- package/src/components/core/UBtnStd.vue +35 -31
- package/src/components/core/UBtnToggle.vue +68 -0
- package/src/components/core/UCheckboxStd.vue +25 -8
- package/src/components/core/UChip.vue +30 -4
- package/src/components/core/UDialogStd.vue +244 -0
- package/src/components/core/UDrawer.vue +235 -0
- package/src/components/core/UInnerLoader.vue +58 -0
- package/src/components/core/UInputAddressLookup.vue +470 -0
- package/src/components/core/UInputPhoneStd.vue +299 -0
- package/src/components/core/UInputTextStd.vue +114 -85
- package/src/components/core/UInputTypeaheadAdvanceSearch.vue +59 -0
- package/src/components/core/UMenuButtonStd.vue +274 -0
- package/src/components/core/UMenuDropdown.vue +72 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +301 -0
- package/src/components/core/UMenuItem.vue +134 -0
- package/src/components/core/UMenuSearch.vue +752 -0
- package/src/components/core/UMultiSelectStd.vue +63 -57
- package/src/components/core/UPagination.vue +104 -0
- package/src/components/core/URadioBtn.vue +116 -0
- package/src/components/core/URadioStd.vue +7 -3
- package/src/components/core/USelectStd.vue +74 -59
- package/src/components/core/UTabBtnStd.vue +82 -59
- 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 +1003 -0
- package/src/components/core/UTabsStd.vue +17 -5
- package/src/components/core/UToggleStd.vue +30 -20
- package/src/components/core/UToolbar.vue +94 -0
- package/src/components/core/UTooltip.vue +25 -4
- package/src/components/core/UUploader.vue +497 -0
- package/src/components/index.js +57 -6
- 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 +121 -0
- package/src/css/typography.sass +0 -0
- package/src/css/vars/colors.variables.sass +126 -0
- package/src/utils/data.ts +146 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, watch } from 'vue'
|
|
3
|
+
|
|
4
|
+
const emit = defineEmits(['onClick'])
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
destructive: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: false,
|
|
9
|
+
},
|
|
10
|
+
disable: {
|
|
11
|
+
default: false,
|
|
12
|
+
type: Boolean,
|
|
13
|
+
},
|
|
14
|
+
hide: {
|
|
15
|
+
default: false,
|
|
16
|
+
type: Boolean,
|
|
17
|
+
},
|
|
18
|
+
iconClass: {
|
|
19
|
+
type: String,
|
|
20
|
+
},
|
|
21
|
+
label: {
|
|
22
|
+
type: String,
|
|
23
|
+
},
|
|
24
|
+
leftIcon: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
rightIcon: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
selected: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const type = ref(props.destructive ? 'destructive' : 'default')
|
|
37
|
+
|
|
38
|
+
/* Computed variables */
|
|
39
|
+
const backgroundColor = computed(() => {
|
|
40
|
+
if (props.selected && !props.destructive) {
|
|
41
|
+
return 'bg-blue-1'
|
|
42
|
+
}
|
|
43
|
+
return 'bg-neutral-1'
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const iconColor = computed(() => {
|
|
47
|
+
if (props.destructive) {
|
|
48
|
+
return 'accent'
|
|
49
|
+
} else if (props.selected) {
|
|
50
|
+
return 'primary'
|
|
51
|
+
}
|
|
52
|
+
return 'dark'
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const labelColor = computed(() => {
|
|
56
|
+
if (props.destructive) {
|
|
57
|
+
return 'text-accent'
|
|
58
|
+
} else if (props.selected) {
|
|
59
|
+
return 'text-primary'
|
|
60
|
+
}
|
|
61
|
+
return 'text-dark'
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
const handleClick = () => {
|
|
65
|
+
return emit('onClick')
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
watch(
|
|
69
|
+
() => props.destructive,
|
|
70
|
+
(newValue) => {
|
|
71
|
+
type.value = newValue ? 'destructive' : 'default'
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<template>
|
|
77
|
+
<q-item
|
|
78
|
+
v-if="!hide"
|
|
79
|
+
:class="`${backgroundColor} item-${type} u-menu-link q-mb-xxs`"
|
|
80
|
+
:aria-label="label"
|
|
81
|
+
clickable
|
|
82
|
+
:disable="disable"
|
|
83
|
+
role="button"
|
|
84
|
+
tabindex="0"
|
|
85
|
+
@click="handleClick"
|
|
86
|
+
>
|
|
87
|
+
<q-item-section v-if="leftIcon" side>
|
|
88
|
+
<q-icon
|
|
89
|
+
:class="`${leftIcon} ${iconClass}`"
|
|
90
|
+
:aria-hidden="true"
|
|
91
|
+
:color="iconColor"
|
|
92
|
+
size="1rem"
|
|
93
|
+
/>
|
|
94
|
+
</q-item-section>
|
|
95
|
+
<slot name="leading_slot"></slot>
|
|
96
|
+
<q-item-section class="text-body-sm label" :class="labelColor">
|
|
97
|
+
{{ label }}
|
|
98
|
+
</q-item-section>
|
|
99
|
+
<q-item-section v-if="rightIcon" side>
|
|
100
|
+
<q-icon
|
|
101
|
+
:class="`${rightIcon} ${iconClass}`"
|
|
102
|
+
:aria-hidden="true"
|
|
103
|
+
:color="iconColor"
|
|
104
|
+
size="1rem"
|
|
105
|
+
/>
|
|
106
|
+
</q-item-section>
|
|
107
|
+
<slot name="trailing_slot"></slot>
|
|
108
|
+
</q-item>
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<style lang="sass">
|
|
112
|
+
.u-menu-link
|
|
113
|
+
&.q-item
|
|
114
|
+
border-radius: $xxs
|
|
115
|
+
padding: 0rem $xs
|
|
116
|
+
align-items: center
|
|
117
|
+
display: flex
|
|
118
|
+
min-height: $lg
|
|
119
|
+
gap: $xs
|
|
120
|
+
.q-item__section--avatar
|
|
121
|
+
min-width: 0px
|
|
122
|
+
.q-item__section--side
|
|
123
|
+
padding: 0px
|
|
124
|
+
&.item-destructive
|
|
125
|
+
&.q-hoverable:hover > .q-focus-helper:after
|
|
126
|
+
background: $red-6
|
|
127
|
+
opacity: 1
|
|
128
|
+
&.item-default
|
|
129
|
+
&.q-hoverable:hover > .q-focus-helper:after
|
|
130
|
+
background: $surface-bg-link-hover
|
|
131
|
+
opacity: 1
|
|
132
|
+
.label
|
|
133
|
+
word-break: break-all
|
|
134
|
+
</style>
|