@usssa/component-library 1.0.0-alpha.4 → 1.0.0-alpha.40
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 +4 -1
- package/package.json +6 -4
- package/src/App.vue +9 -0
- package/src/assets/quasar-logo-vertical.svg +15 -0
- package/src/boot/.gitkeep +0 -0
- package/src/boot/google-maps.js +11 -0
- package/src/components/ComponentLink.vue +26 -0
- package/src/components/core/UAvatar.vue +161 -0
- package/src/components/core/UAvatarGroup.vue +119 -0
- package/src/components/core/UBadgeStd.vue +91 -0
- package/src/components/core/UBannerStd.vue +115 -0
- package/src/components/core/UBreadCrumbs.vue +67 -0
- package/src/components/core/UBtnIcon.vue +159 -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 +228 -0
- package/src/components/core/UDrawer.vue +211 -0
- package/src/components/core/UInnerLoader.vue +58 -0
- package/src/components/core/UInputAddressLookup.vue +466 -0
- package/src/components/core/UInputPhoneStd.vue +295 -0
- package/src/components/core/UInputTextStd.vue +293 -0
- package/src/components/core/UMenuButtonStd.vue +274 -0
- package/src/components/core/UMenuDropdown.vue +77 -0
- package/src/components/core/UMenuDropdownAdvancedSearch.vue +262 -0
- package/src/components/core/UMenuItem.vue +132 -0
- package/src/components/core/UMultiSelectStd.vue +259 -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 +233 -0
- package/src/components/core/UTabBtnStd.vue +167 -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 +636 -0
- package/src/components/core/UTabsStd.vue +111 -0
- package/src/components/core/UToggleStd.vue +159 -0
- package/src/components/core/UTooltip.vue +71 -0
- package/src/components/index.js +66 -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 +119 -0
- package/src/css/typography.sass +0 -0
- package/src/css/vars/colors.variables.sass +126 -0
- package/src/layouts/MainLayout.vue +177 -0
- package/src/pages/AdvancedSearch.vue +512 -0
- package/src/pages/Avatar.vue +77 -0
- package/src/pages/AvatarGroup.vue +139 -0
- package/src/pages/BadgeStd.vue +83 -0
- package/src/pages/BannerPage.vue +76 -0
- package/src/pages/BreadCrumbs.vue +100 -0
- package/src/pages/BtnIcon.vue +120 -0
- package/src/pages/BtnStd.vue +138 -0
- package/src/pages/BtnToggle.vue +131 -0
- package/src/pages/CheckBox.vue +62 -0
- package/src/pages/Chip.vue +108 -0
- package/src/pages/ComponentBase.vue +54 -0
- package/src/pages/Dialog.vue +206 -0
- package/src/pages/Drawer.vue +128 -0
- package/src/pages/ErrorNotFound.vue +11 -0
- package/src/pages/IndexPage.vue +11 -0
- package/src/pages/InnerLoader.vue +81 -0
- package/src/pages/InputAddressLookup.vue +258 -0
- package/src/pages/InputPhone.vue +152 -0
- package/src/pages/InputText.vue +140 -0
- package/src/pages/MenuButton.vue +194 -0
- package/src/pages/MenuDropdown.vue +79 -0
- package/src/pages/MenuItem.vue +68 -0
- package/src/pages/MultiSelectStd.vue +174 -0
- package/src/pages/NotifyPage.vue +109 -0
- package/src/pages/OverlayLoader.vue +128 -0
- package/src/pages/Pagination.vue +71 -0
- package/src/pages/Radio.vue +80 -0
- package/src/pages/RadioBtn.vue +104 -0
- package/src/pages/SelectStd.vue +160 -0
- package/src/pages/TabButtonPage.vue +126 -0
- package/src/pages/TablePage.vue +375 -0
- package/src/pages/TabsPage.vue +261 -0
- package/src/pages/TogglePage.vue +58 -0
- package/src/pages/TooltipPage.vue +125 -0
- package/src/router/index.js +34 -0
- package/src/router/routes.js +149 -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,194 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ComponentBase from './ComponentBase.vue'
|
|
3
|
+
import UMenuButtonStd from '../components/core/UMenuButtonStd.vue'
|
|
4
|
+
import UMenuDropdown from '../components/core/UMenuDropdown.vue'
|
|
5
|
+
import { computed, ref } from 'vue'
|
|
6
|
+
|
|
7
|
+
// state of menu button
|
|
8
|
+
const anchor = ref('center left')
|
|
9
|
+
const ariaLabel = ref('Btn Icon')
|
|
10
|
+
const avatarUrl = ref('https://cdn.quasar.dev/img/avatar1.jpg')
|
|
11
|
+
const color = ref('primary')
|
|
12
|
+
const displayName = ref('Label')
|
|
13
|
+
const iconClass = ref('fa-kit-duotone fa-filter-list')
|
|
14
|
+
const label = ref('Label')
|
|
15
|
+
const menuOffset = ref([4, 4])
|
|
16
|
+
const states = ref('Basic')
|
|
17
|
+
const statesOptions = ['Basic', 'Icon', 'Button', 'Avatar', 'Prefix']
|
|
18
|
+
const size = ref('md')
|
|
19
|
+
const sizeOptions = ['sm', 'md', 'lg']
|
|
20
|
+
const self = ref('center end')
|
|
21
|
+
const selectedCountry = ref({
|
|
22
|
+
name: 'United States',
|
|
23
|
+
code: '+1',
|
|
24
|
+
flag: 'us',
|
|
25
|
+
})
|
|
26
|
+
const tooltip = ref('Tooltip')
|
|
27
|
+
const type = ref('standard')
|
|
28
|
+
|
|
29
|
+
const anchorOptions = [
|
|
30
|
+
'top left',
|
|
31
|
+
'top middle',
|
|
32
|
+
'top right',
|
|
33
|
+
'top start',
|
|
34
|
+
'top end',
|
|
35
|
+
'center left',
|
|
36
|
+
'center middle',
|
|
37
|
+
'center right',
|
|
38
|
+
'center start',
|
|
39
|
+
'center end',
|
|
40
|
+
'bottom left',
|
|
41
|
+
'bottom middle',
|
|
42
|
+
'bottom right',
|
|
43
|
+
'bottom start',
|
|
44
|
+
'bottom end',
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
const selfOptions = [
|
|
48
|
+
'top left',
|
|
49
|
+
'top middle',
|
|
50
|
+
'top right',
|
|
51
|
+
'top start',
|
|
52
|
+
'top end',
|
|
53
|
+
'center left',
|
|
54
|
+
'center middle',
|
|
55
|
+
'center right',
|
|
56
|
+
'center start',
|
|
57
|
+
'center end',
|
|
58
|
+
'bottom left',
|
|
59
|
+
'bottom middle',
|
|
60
|
+
'bottom right',
|
|
61
|
+
'bottom start',
|
|
62
|
+
'bottom end',
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
const htmlContent = `<UMenuButtonStd
|
|
66
|
+
ref="btn"
|
|
67
|
+
:size="size"
|
|
68
|
+
:label="label"
|
|
69
|
+
:states="states"
|
|
70
|
+
:color="colorClass"
|
|
71
|
+
:icon-class="iconClass"
|
|
72
|
+
:ariaLabel="ariaLabel"
|
|
73
|
+
:tooltip="tooltip"
|
|
74
|
+
:selected-country="selectedCountry"
|
|
75
|
+
@update-country="selectCountry"
|
|
76
|
+
:displayName="displayName"
|
|
77
|
+
:avatarUrl="avatarUrl"
|
|
78
|
+
:anchor="anchor"
|
|
79
|
+
:self="self"
|
|
80
|
+
:menu-offset="menuOffset"
|
|
81
|
+
>
|
|
82
|
+
<template #menu>
|
|
83
|
+
<q-menu>
|
|
84
|
+
<q-list>
|
|
85
|
+
<q-item clickable v-ripple>
|
|
86
|
+
<q-item-section>Option 1</q-item-section>
|
|
87
|
+
</q-item>
|
|
88
|
+
<q-item clickable v-ripple>
|
|
89
|
+
<q-item-section>Option 2</q-item-section>
|
|
90
|
+
</q-item>
|
|
91
|
+
</q-list>
|
|
92
|
+
</q-menu>
|
|
93
|
+
</template>
|
|
94
|
+
</UMenuButtonStd>`
|
|
95
|
+
|
|
96
|
+
defineOptions({
|
|
97
|
+
name: 'BtnStd',
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
const selectCountry = (value) => {
|
|
101
|
+
selectedCountry.value = value
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const countryOptions = [
|
|
105
|
+
{ label: 'United States', code: '+1', leftIcon: 'fi fi-us' },
|
|
106
|
+
{ label: 'Canada', code: '+1', leftIcon: 'fi fi-ca' },
|
|
107
|
+
{ label: 'Mexico', code: '+52', leftIcon: 'fi fi-mx' },
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
const colorClass = computed(() => states.value === 'Avatar' ? 'neutral-2' : 'primary' )
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<template>
|
|
114
|
+
<q-page class="flex flex-center">
|
|
115
|
+
<ComponentBase
|
|
116
|
+
figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=3449-13467&node-type=instance&m=dev"
|
|
117
|
+
>
|
|
118
|
+
<template v-slot:component>
|
|
119
|
+
<UMenuButtonStd
|
|
120
|
+
ref="btn"
|
|
121
|
+
:size="size"
|
|
122
|
+
:label="label"
|
|
123
|
+
:states="states"
|
|
124
|
+
:color="colorClass"
|
|
125
|
+
:icon-class="iconClass"
|
|
126
|
+
:ariaLabel="ariaLabel"
|
|
127
|
+
:tooltip="tooltip"
|
|
128
|
+
:selected-country="selectedCountry"
|
|
129
|
+
@update-country="selectCountry"
|
|
130
|
+
:displayName="displayName"
|
|
131
|
+
:avatarUrl="avatarUrl"
|
|
132
|
+
:anchor="anchor"
|
|
133
|
+
:self="self"
|
|
134
|
+
:menu-offset="menuOffset"
|
|
135
|
+
>
|
|
136
|
+
<template #menu>
|
|
137
|
+
<!-- <q-menu>
|
|
138
|
+
<q-list>
|
|
139
|
+
<q-item clickable v-ripple>
|
|
140
|
+
<q-item-section>Option 1</q-item-section>
|
|
141
|
+
</q-item>
|
|
142
|
+
<q-item clickable v-ripple>
|
|
143
|
+
<q-item-section>Option 2</q-item-section>
|
|
144
|
+
</q-item>
|
|
145
|
+
</q-list>
|
|
146
|
+
</q-menu> -->
|
|
147
|
+
</template>
|
|
148
|
+
</UMenuButtonStd>
|
|
149
|
+
</template>
|
|
150
|
+
|
|
151
|
+
<template v-slot:properties>
|
|
152
|
+
<div class="column q-gutter-y-lg">
|
|
153
|
+
<q-select v-model="states" :options="statesOptions" label="Menu state" />
|
|
154
|
+
<q-select
|
|
155
|
+
v-model="iconClass"
|
|
156
|
+
:options="['fa-kit-duotone fa-filter-list','fa-kit fa-caret-down']"
|
|
157
|
+
label="Icon"
|
|
158
|
+
v-if="['Basic','Button','Icon'].includes(states)"
|
|
159
|
+
/>
|
|
160
|
+
<q-input
|
|
161
|
+
label="Label"
|
|
162
|
+
v-model="label"
|
|
163
|
+
v-if="['Basic','Button'].includes(states)"
|
|
164
|
+
/>
|
|
165
|
+
<q-input label="Tooltip" v-model="tooltip" v-if="states === 'Icon'" />
|
|
166
|
+
<q-input label="Aria Label" v-model="ariaLabel" v-if="states === 'Icon'" />
|
|
167
|
+
<q-input label="AVatar url" v-model="avatarUrl" v-if="states === 'Avatar'"/>
|
|
168
|
+
<q-input label="Avatar name" v-model="displayName" v-if="states === 'Avatar'"/>
|
|
169
|
+
<!-- <q-input label="Icon" v-model="iconClass" /> -->
|
|
170
|
+
<q-select v-model="size" :options="sizeOptions" label="Size" />
|
|
171
|
+
<div class="column" v-if="states === 'Icon'">
|
|
172
|
+
<span class="text-grey-8 text-caption-sm">Tooltip Position</span>
|
|
173
|
+
<div>
|
|
174
|
+
<q-select
|
|
175
|
+
v-model="anchor"
|
|
176
|
+
:options="anchorOptions"
|
|
177
|
+
label="Anchor Origin"
|
|
178
|
+
/>
|
|
179
|
+
<q-select
|
|
180
|
+
v-model="self"
|
|
181
|
+
:options="selfOptions"
|
|
182
|
+
label="Self Origin"
|
|
183
|
+
/>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</template>
|
|
188
|
+
|
|
189
|
+
<template v-slot:code>
|
|
190
|
+
<pre><code>{{ htmlContent }}</code></pre>
|
|
191
|
+
</template>
|
|
192
|
+
</ComponentBase>
|
|
193
|
+
</q-page>
|
|
194
|
+
</template>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { UMenuDropdown } from 'src/components'
|
|
4
|
+
import ComponentBase from './ComponentBase.vue'
|
|
5
|
+
|
|
6
|
+
const Data = [
|
|
7
|
+
{
|
|
8
|
+
label: 'Profile',
|
|
9
|
+
leftIcon: 'fa-kit-duotone fa-user',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: 'Settings',
|
|
13
|
+
leftIcon: 'fa-kit-duotone fa-admin',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: 'Logout',
|
|
17
|
+
leftIcon: 'fa-kit-duotone fa-logout',
|
|
18
|
+
},
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const size = ref('sm')
|
|
22
|
+
const sizeOptions = ['sm', 'md', 'lg']
|
|
23
|
+
|
|
24
|
+
const htmlContent = `<UMenuDropdown
|
|
25
|
+
:data="Data"
|
|
26
|
+
@onClick="onClick"
|
|
27
|
+
iconClass="icon-secondary-opacity"
|
|
28
|
+
:size="size"
|
|
29
|
+
/>`
|
|
30
|
+
|
|
31
|
+
defineOptions({
|
|
32
|
+
name: 'UMenuDropdown',
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const onClick = () => {
|
|
36
|
+
console.log('check....')
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<q-page class="flex flex-center">
|
|
42
|
+
<ComponentBase
|
|
43
|
+
figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=4-24&node-type=canvas&t=nWq2UjUIdqvWKgPg-0"
|
|
44
|
+
>
|
|
45
|
+
<template v-slot:component>
|
|
46
|
+
<!-- Using test-cls to demonstrate how to pass custom css -->
|
|
47
|
+
<UMenuDropdown
|
|
48
|
+
:data="Data"
|
|
49
|
+
@onClick="onClick"
|
|
50
|
+
iconClass="icon-secondary-opacity"
|
|
51
|
+
:size="size"
|
|
52
|
+
menuClass="test-cls"
|
|
53
|
+
>
|
|
54
|
+
<!-- Use slot here like this -->
|
|
55
|
+
<!-- <template #trailing_slot>
|
|
56
|
+
Write your code here
|
|
57
|
+
</template> -->
|
|
58
|
+
</UMenuDropdown>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template v-slot:properties>
|
|
62
|
+
<div class="q-gutter-y-lg">
|
|
63
|
+
<q-select v-model="size" :options="sizeOptions" label="Size" />
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<template v-slot:code>
|
|
68
|
+
<pre>{{ htmlContent }}</pre>
|
|
69
|
+
</template>
|
|
70
|
+
</ComponentBase>
|
|
71
|
+
</q-page>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<style lang="sass">
|
|
75
|
+
.test-cls
|
|
76
|
+
max-height: 11.25rem !important
|
|
77
|
+
overflow-y: auto
|
|
78
|
+
scrollbar-width: none // use this if we dont want to show scrollbar
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { UMenuItem } from 'src/components'
|
|
4
|
+
import ComponentBase from './ComponentBase.vue'
|
|
5
|
+
|
|
6
|
+
const leftIcon = ref('fa-kit-duotone fa-home')
|
|
7
|
+
const rightIcon = ref('fa-kit-duotone fa-circle-check')
|
|
8
|
+
const label = ref('Label')
|
|
9
|
+
const selected = ref(false)
|
|
10
|
+
const destructive = ref(false)
|
|
11
|
+
|
|
12
|
+
const htmlContent = `<UMenuItem
|
|
13
|
+
:label="label"
|
|
14
|
+
:leftIcon="leftIcon"
|
|
15
|
+
:rightIcon="rightIcon"
|
|
16
|
+
:selected="selected"
|
|
17
|
+
:destructive="destructive"
|
|
18
|
+
/>`
|
|
19
|
+
|
|
20
|
+
defineOptions({
|
|
21
|
+
name: 'UMenuItem',
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const handleClick = () => {
|
|
25
|
+
console.log('item clicked')
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<q-page class="flex flex-center">
|
|
31
|
+
<ComponentBase
|
|
32
|
+
figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=4-24&node-type=canvas&t=nWq2UjUIdqvWKgPg-0"
|
|
33
|
+
>
|
|
34
|
+
<template v-slot:component>
|
|
35
|
+
<UMenuItem
|
|
36
|
+
:label="label"
|
|
37
|
+
:leftIcon="leftIcon"
|
|
38
|
+
:rightIcon="rightIcon"
|
|
39
|
+
:selected="selected"
|
|
40
|
+
:destructive="destructive"
|
|
41
|
+
iconClass="icon-secondary-opacity"
|
|
42
|
+
@onClick="handleClick"
|
|
43
|
+
/>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<template v-slot:properties>
|
|
47
|
+
<div class="q-gutter-y-lg">
|
|
48
|
+
<q-input label="Label" v-model="label" />
|
|
49
|
+
<q-input label="Left Icon" v-model="leftIcon" />
|
|
50
|
+
<q-input label="Right Icon" v-model="rightIcon" />
|
|
51
|
+
<div>
|
|
52
|
+
<q-checkbox
|
|
53
|
+
size="xs"
|
|
54
|
+
v-model="selected"
|
|
55
|
+
label="Selected"
|
|
56
|
+
v-if="!destructive"
|
|
57
|
+
/>
|
|
58
|
+
<q-checkbox size="xs" v-model="destructive" label="Destructive" />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<template v-slot:code>
|
|
64
|
+
<pre>{{ htmlContent }}</pre>
|
|
65
|
+
</template>
|
|
66
|
+
</ComponentBase>
|
|
67
|
+
</q-page>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { UMultiSelectStd } from 'src/components'
|
|
4
|
+
import ComponentBase from './ComponentBase.vue'
|
|
5
|
+
|
|
6
|
+
const options_data = [
|
|
7
|
+
{
|
|
8
|
+
label: 'Guatemala',
|
|
9
|
+
value: 'Guatemala',
|
|
10
|
+
icon: 'fa-kit-duotone fa-home',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: 'Colombia',
|
|
14
|
+
value: 'Colombia',
|
|
15
|
+
icon: 'fa-kit-duotone fa-home',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: 'Turkmenistan',
|
|
19
|
+
value: 'Turkmenistan',
|
|
20
|
+
icon: 'fa-kit-duotone fa-home',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'France',
|
|
24
|
+
value: 'France',
|
|
25
|
+
icon: 'fa-kit-duotone fa-home',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: 'Philippines',
|
|
29
|
+
value: 'Philippines',
|
|
30
|
+
icon: 'fa-kit-duotone fa-home',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: 'Greece',
|
|
34
|
+
value: 'Greece',
|
|
35
|
+
icon: 'fa-kit-duotone fa-home',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: 'Indonesia',
|
|
39
|
+
value: 'Indonesia',
|
|
40
|
+
icon: 'fa-kit-duotone fa-home',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'Russia',
|
|
44
|
+
value: 'Russia',
|
|
45
|
+
icon: 'fa-kit-duotone fa-home',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: 'Albania',
|
|
49
|
+
value: 'Albania',
|
|
50
|
+
icon: 'fa-kit-duotone fa-home',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'Sweden',
|
|
54
|
+
value: 'Sweden',
|
|
55
|
+
icon: 'fa-kit-duotone fa-home',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Japan',
|
|
59
|
+
value: 'Japan',
|
|
60
|
+
icon: 'fa-kit-duotone fa-home',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: 'Czech Republic',
|
|
64
|
+
value: 'Czech Republic',
|
|
65
|
+
icon: 'fa-kit-duotone fa-home',
|
|
66
|
+
},
|
|
67
|
+
]
|
|
68
|
+
const options = ref(options_data)
|
|
69
|
+
|
|
70
|
+
const modelMultiple = ref([])
|
|
71
|
+
|
|
72
|
+
const updateFn = (val) => {
|
|
73
|
+
const { multiSelect, remove, value } = val
|
|
74
|
+
if (multiSelect) {
|
|
75
|
+
modelMultiple.value.push(value)
|
|
76
|
+
} else if (remove) {
|
|
77
|
+
modelMultiple.value = modelMultiple.value.filter((v) => v !== value)
|
|
78
|
+
}
|
|
79
|
+
return
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const filterFn = (val, update) => {
|
|
83
|
+
if (val === '') {
|
|
84
|
+
update(() => {
|
|
85
|
+
options.value = options_data
|
|
86
|
+
})
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
update(() => {
|
|
91
|
+
const needle = val.toLowerCase()
|
|
92
|
+
options.value = options_data.filter(
|
|
93
|
+
(v) => v.value.toLowerCase().indexOf(needle) > -1
|
|
94
|
+
)
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const sizeOptions = ['sm', 'md', 'lg']
|
|
99
|
+
|
|
100
|
+
const size = ref('sm')
|
|
101
|
+
const useInput = ref(true)
|
|
102
|
+
const hintText = ref('This is hint text')
|
|
103
|
+
const toolTipText = ref('This is tooltip text')
|
|
104
|
+
const label = ref('Label')
|
|
105
|
+
const hintIcon = ref('fa-kit-duotone fa-triangle-exclamation')
|
|
106
|
+
const leftIcon = ref('')
|
|
107
|
+
const isRequired = ref(true)
|
|
108
|
+
const placeholderText = ref('Placeholder')
|
|
109
|
+
const htmlContent = ` <UMultiSelectStd
|
|
110
|
+
:options="options"
|
|
111
|
+
v-model="modelMultiple"
|
|
112
|
+
:label="label"
|
|
113
|
+
:updateFn="updateFn"
|
|
114
|
+
:filterFn="filterFn"
|
|
115
|
+
:useInput="useInput"
|
|
116
|
+
:size="size"
|
|
117
|
+
:hintText="hintText"
|
|
118
|
+
:isRequired="isRequired"
|
|
119
|
+
:toolTipText="toolTipText"
|
|
120
|
+
:hintIcon="hintIcon"
|
|
121
|
+
:leftIcon="leftIcon"
|
|
122
|
+
:placeholder="placeholderText"
|
|
123
|
+
color="$primary"
|
|
124
|
+
noSearchText="No result"
|
|
125
|
+
/>`
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<template>
|
|
129
|
+
<q-page class="flex flex-center">
|
|
130
|
+
<ComponentBase
|
|
131
|
+
figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2290-151315&t=qG4NJ0uRZzUxQs9M-0"
|
|
132
|
+
>
|
|
133
|
+
<template v-slot:component>
|
|
134
|
+
<UMultiSelectStd
|
|
135
|
+
:options="options"
|
|
136
|
+
v-model="modelMultiple"
|
|
137
|
+
:label="label"
|
|
138
|
+
:updateFn="updateFn"
|
|
139
|
+
:filterFn="filterFn"
|
|
140
|
+
:useInput="useInput"
|
|
141
|
+
:size="size"
|
|
142
|
+
:hintText="hintText"
|
|
143
|
+
:isRequired="isRequired"
|
|
144
|
+
:toolTipText="toolTipText"
|
|
145
|
+
:hintIcon="hintIcon"
|
|
146
|
+
:leftIcon="leftIcon"
|
|
147
|
+
:placeholder="placeholderText"
|
|
148
|
+
color="$primary"
|
|
149
|
+
noSearchText="No result"
|
|
150
|
+
/>
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<template v-slot:properties>
|
|
154
|
+
<div class="q-gutter-y-lg">
|
|
155
|
+
<q-input label="Label" v-model="label" />
|
|
156
|
+
<q-select v-model="size" :options="sizeOptions" label="Size" />
|
|
157
|
+
<q-input label="Hint Icon" v-model="hintIcon" />
|
|
158
|
+
<q-input label="Hint Text" v-model="hintText" />
|
|
159
|
+
<q-input label="Tooltip Text" v-model="toolTipText" />
|
|
160
|
+
<q-input label="Placeholder" v-model="placeholderText" />
|
|
161
|
+
<q-input label="Left Icon" v-model="leftIcon" />
|
|
162
|
+
|
|
163
|
+
<div class="row">
|
|
164
|
+
<q-checkbox size="xs" v-model="isRequired" label="Required" />
|
|
165
|
+
<q-checkbox size="xs" v-model="useInput" label="Use Input" />
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</template>
|
|
169
|
+
<template v-slot:code>
|
|
170
|
+
<pre>{{ htmlContent }}</pre>
|
|
171
|
+
</template>
|
|
172
|
+
</ComponentBase>
|
|
173
|
+
</q-page>
|
|
174
|
+
</template>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import ComponentBase from './ComponentBase.vue'
|
|
4
|
+
import { useNotify } from '../composables/useNotify'
|
|
5
|
+
|
|
6
|
+
defineOptions({
|
|
7
|
+
name: 'NotifyPage',
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const htmlContent = `notify({
|
|
11
|
+
type: type.value,
|
|
12
|
+
label: label.value,
|
|
13
|
+
message: message.value,
|
|
14
|
+
color: type.value,
|
|
15
|
+
timeout: timeout.value,
|
|
16
|
+
position: position.value,
|
|
17
|
+
progress: progress.value,
|
|
18
|
+
actionLabel: actionLabel.value,
|
|
19
|
+
icon: customLeftIcon.value, // if user want to pass custom icon then need to add icon prop
|
|
20
|
+
handler: () => {
|
|
21
|
+
console.log('clicked')
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
// how to use in different places
|
|
25
|
+
const { notify } = useNotify()
|
|
26
|
+
})`
|
|
27
|
+
|
|
28
|
+
const typeOptions = ['info', 'positive', 'accent', 'warning']
|
|
29
|
+
const positionOptions = [
|
|
30
|
+
'top-left',
|
|
31
|
+
'top',
|
|
32
|
+
'top-right',
|
|
33
|
+
'left',
|
|
34
|
+
'center',
|
|
35
|
+
'right',
|
|
36
|
+
'bottom-left',
|
|
37
|
+
'bottom',
|
|
38
|
+
'bottom-right',
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
const label = ref('Label')
|
|
42
|
+
const message = ref('This is Message')
|
|
43
|
+
const type = ref('positive')
|
|
44
|
+
const position = ref('bottom')
|
|
45
|
+
const progress = ref(false)
|
|
46
|
+
const timeout = ref(3000)
|
|
47
|
+
const actionLabel = ref('Dismiss')
|
|
48
|
+
const customLeftIcon = ref(null)
|
|
49
|
+
const { notify } = useNotify()
|
|
50
|
+
|
|
51
|
+
const showNotify = () => {
|
|
52
|
+
notify({
|
|
53
|
+
type: type.value,
|
|
54
|
+
label: label.value,
|
|
55
|
+
message: message.value,
|
|
56
|
+
color: type.value,
|
|
57
|
+
timeout: timeout.value,
|
|
58
|
+
position: position.value,
|
|
59
|
+
progress: progress.value,
|
|
60
|
+
actionLabel: actionLabel.value,
|
|
61
|
+
icon: customLeftIcon.value,
|
|
62
|
+
handler: () => {
|
|
63
|
+
alert('Button clicked!')
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<q-page class="flex flex-center">
|
|
71
|
+
<ComponentBase
|
|
72
|
+
figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=3100-159608&t=PqBNKCpUHh5pEmuS-0"
|
|
73
|
+
cardWidth="50%"
|
|
74
|
+
>
|
|
75
|
+
<template v-slot:component>
|
|
76
|
+
|
|
77
|
+
<q-btn color="primary" @click="showNotify" label="Show" />
|
|
78
|
+
</template>
|
|
79
|
+
<template v-slot:properties>
|
|
80
|
+
<div class="column q-gutter-y-md">
|
|
81
|
+
<q-input label="Label" v-model="label" />
|
|
82
|
+
<div class="flex justify-between items-center">
|
|
83
|
+
<q-input
|
|
84
|
+
style="width: 80%"
|
|
85
|
+
label="Timeout"
|
|
86
|
+
v-model="timeout"
|
|
87
|
+
:disable="!progress"
|
|
88
|
+
/>
|
|
89
|
+
<q-checkbox size="xs" v-model="progress" label="Progress" />
|
|
90
|
+
</div>
|
|
91
|
+
<q-input label="Message" v-model="message" />
|
|
92
|
+
<q-input label="Action label" v-model="actionLabel" />
|
|
93
|
+
<q-input label="Custom Left icon" v-model="customLeftIcon" />
|
|
94
|
+
<q-select v-model="type" :options="typeOptions" label="Type" />
|
|
95
|
+
<q-select
|
|
96
|
+
v-model="position"
|
|
97
|
+
:options="positionOptions"
|
|
98
|
+
label="Position"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
102
|
+
<template v-slot:code>
|
|
103
|
+
<pre style="font-size: 12px"><code>{{ htmlContent }}</code></pre>
|
|
104
|
+
</template>
|
|
105
|
+
</ComponentBase>
|
|
106
|
+
</q-page>
|
|
107
|
+
</template>
|
|
108
|
+
|
|
109
|
+
<style lang="sass"></style>
|