@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.
- package/README.md +18 -37
- package/package.json +17 -6
- 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/ComponentLink.vue +26 -0
- package/src/components/core/UAvatar.vue +179 -0
- package/src/components/core/UAvatarGroup.vue +120 -0
- package/src/components/core/UBadgeStd.vue +91 -0
- package/src/components/core/UBannerStd.vue +142 -0
- package/src/components/core/UBreadCrumbs.vue +67 -0
- package/src/components/core/UBtnIcon.vue +158 -0
- package/src/components/core/UBtnStd.vue +129 -0
- package/src/components/core/UBtnToggle.vue +68 -0
- package/src/components/core/UCheckboxStd.vue +95 -0
- package/src/components/core/UChip.vue +251 -0
- 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 +299 -0
- 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 +274 -0
- package/src/components/core/UPagination.vue +104 -0
- package/src/components/core/URadioBtn.vue +116 -0
- package/src/components/core/URadioStd.vue +62 -0
- package/src/components/core/USelectStd.vue +250 -0
- package/src/components/core/UTabBtnStd.vue +176 -0
- 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 +111 -0
- package/src/components/core/UToggleStd.vue +159 -0
- package/src/components/core/UToolbar.vue +94 -0
- package/src/components/core/UTooltip.vue +73 -0
- package/src/components/core/UUploader.vue +497 -0
- package/src/components/index.js +75 -0
- 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
- package/dist/spa/assets/Avatar.45667392.js +0 -9
- package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
- package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
- package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
- package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
- package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
- package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
- package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
- package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
- package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
- package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
- package/dist/spa/assets/Chip.49ffc857.js +0 -11
- package/dist/spa/assets/Chip.74acaa33.css +0 -1
- package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
- package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
- package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
- package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
- package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
- package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
- package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
- package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
- package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
- package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
- package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
- package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
- package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
- package/dist/spa/assets/QPage.ca395ec4.js +0 -1
- package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
- package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
- package/dist/spa/assets/QSelect.a40eb786.js +0 -1
- package/dist/spa/assets/QTabs.72f2507e.js +0 -1
- package/dist/spa/assets/QToggle.376c48be.js +0 -1
- package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
- package/dist/spa/assets/Radio.0ac35288.js +0 -7
- package/dist/spa/assets/Radio.aca54a89.css +0 -1
- package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
- package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
- package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
- package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
- package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
- package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
- package/dist/spa/assets/TogglePage.8129b631.css +0 -1
- package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
- package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
- package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
- package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
- package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
- package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
- package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
- package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
- package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
- package/dist/spa/assets/dom.e9d4ad51.js +0 -1
- package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
- package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
- package/dist/spa/assets/format.41663636.js +0 -1
- package/dist/spa/assets/index.43c62a18.js +0 -21
- package/dist/spa/assets/index.4fbd73cf.css +0 -5
- package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
- package/dist/spa/assets/render.e67ff27a.js +0 -1
- package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
- package/dist/spa/assets/touch.9135741d.js +0 -1
- package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
- package/dist/spa/favicon.ico +0 -0
- package/dist/spa/icons/caret-down.svg +0 -5
- package/dist/spa/icons/circle-xmark.svg +0 -6
- package/dist/spa/icons/favicon-128x128.png +0 -0
- package/dist/spa/icons/favicon-16x16.png +0 -0
- package/dist/spa/icons/favicon-32x32.png +0 -0
- package/dist/spa/icons/favicon-96x96.png +0 -0
- package/dist/spa/index.html +0 -3
|
@@ -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>
|