@usssa/component-library 1.0.0-alpha.4 → 1.0.0-alpha.41
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 +242 -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 +173 -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 +221 -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,140 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { UInputTextStd } from 'src/components'
|
|
3
|
+
import ComponentBase from './ComponentBase.vue'
|
|
4
|
+
import { computed, ref } from 'vue'
|
|
5
|
+
|
|
6
|
+
const inputValue = ref('')
|
|
7
|
+
const isRequired = ref(true)
|
|
8
|
+
const validationRules = [(val) => val.length <= 3]
|
|
9
|
+
const errorMessage = ref('Error message would go here')
|
|
10
|
+
const hintText = ref('This is hint text')
|
|
11
|
+
const placeholder = ref('Placeholder')
|
|
12
|
+
const toolTipText = ref('This is tooltip')
|
|
13
|
+
const hintIcon = ref('fa-kit-duotone fa-triangle-exclamation')
|
|
14
|
+
const leftIcon = ref('fa-kit-duotone fa-magnifying-glass')
|
|
15
|
+
const rightIcon = ref('fa-kit-duotone fa-triangle-exclamation')
|
|
16
|
+
const size = ref('sm')
|
|
17
|
+
const sizeOptions = ['sm', 'md', 'lg']
|
|
18
|
+
const disabled = ref(false)
|
|
19
|
+
const readonly = ref(false)
|
|
20
|
+
const isError = ref(false)
|
|
21
|
+
const leftBorderRadius = ref(false)
|
|
22
|
+
const type = ref('outline')
|
|
23
|
+
const label = ref('Label')
|
|
24
|
+
|
|
25
|
+
const borderless = computed(() => {
|
|
26
|
+
return type.value === 'borderless'
|
|
27
|
+
})
|
|
28
|
+
const outline = computed(() => {
|
|
29
|
+
return type.value === 'outline'
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const htmlContent = `<UInputTextStd
|
|
33
|
+
:label="label"
|
|
34
|
+
:isRequired="isRequired"
|
|
35
|
+
v-model="inputValue"
|
|
36
|
+
:validationRules="validationRules"
|
|
37
|
+
:leftIcon="leftIcon"
|
|
38
|
+
:rightIcon="rightIcon"
|
|
39
|
+
:hintText="hintText"
|
|
40
|
+
:hintIcon="hintIcon"
|
|
41
|
+
:toolTipText="toolTipText"
|
|
42
|
+
:placeholder="placeholder"
|
|
43
|
+
:size="size"
|
|
44
|
+
:disable="disabled"
|
|
45
|
+
:readonly="readonly"
|
|
46
|
+
:error="checkValidation()"
|
|
47
|
+
error-message="Error message would go here"
|
|
48
|
+
:borderless="borderless"
|
|
49
|
+
:outlined="outline"
|
|
50
|
+
:leftBorderRadius="leftBorderRadius"
|
|
51
|
+
/>`
|
|
52
|
+
|
|
53
|
+
defineOptions({
|
|
54
|
+
name: 'UInputTextStd',
|
|
55
|
+
})
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<template>
|
|
59
|
+
<q-page class="flex flex-center">
|
|
60
|
+
<ComponentBase
|
|
61
|
+
figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=3395-4968"
|
|
62
|
+
>
|
|
63
|
+
<template v-slot:component>
|
|
64
|
+
<UInputTextStd
|
|
65
|
+
:label="label"
|
|
66
|
+
:isRequired="isRequired"
|
|
67
|
+
v-model="inputValue"
|
|
68
|
+
:validationRules="validationRules"
|
|
69
|
+
:leftIcon="leftIcon"
|
|
70
|
+
:rightIcon="rightIcon"
|
|
71
|
+
:hintText="hintText"
|
|
72
|
+
:hintIcon="hintIcon"
|
|
73
|
+
:toolTipText="toolTipText"
|
|
74
|
+
:placeholder="placeholder"
|
|
75
|
+
:size="size"
|
|
76
|
+
:disable="disabled"
|
|
77
|
+
:readonly="readonly"
|
|
78
|
+
:error="isError"
|
|
79
|
+
:error-message="errorMessage"
|
|
80
|
+
:borderless="borderless"
|
|
81
|
+
:outlined="outline"
|
|
82
|
+
:leftBorderRadius="leftBorderRadius"
|
|
83
|
+
parentClass="q-mb-ms"
|
|
84
|
+
/>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<template v-slot:properties>
|
|
88
|
+
<div class="column q-gutter-y-lg">
|
|
89
|
+
<q-input label="Label" v-model="label" />
|
|
90
|
+
<q-input label="Placeholder" v-model="placeholder" />
|
|
91
|
+
<q-input label="Error Message" v-model="errorMessage" />
|
|
92
|
+
<q-input label="Left Icon" v-model="leftIcon" />
|
|
93
|
+
<q-input label="Right Icon" v-model="rightIcon" />
|
|
94
|
+
<q-input label="Hint Icon" v-model="hintIcon" />
|
|
95
|
+
<q-input label="Hint Text" v-model="hintText" />
|
|
96
|
+
<q-input label="Tooltip Text" v-model="toolTipText" />
|
|
97
|
+
|
|
98
|
+
<q-select v-model="size" :options="sizeOptions" label="Size" />
|
|
99
|
+
|
|
100
|
+
<div class="column">
|
|
101
|
+
<span class="text-grey-8 text-caption-sm">Type</span>
|
|
102
|
+
<div>
|
|
103
|
+
<q-radio dense v-model="type" val="outline" label="Outline" />
|
|
104
|
+
<q-radio
|
|
105
|
+
dense
|
|
106
|
+
v-model="type"
|
|
107
|
+
val="borderless"
|
|
108
|
+
label="Borderless"
|
|
109
|
+
class="q-pa-sm"
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div>
|
|
114
|
+
<q-checkbox size="xs" v-model="disabled" label="Disable" />
|
|
115
|
+
</div>
|
|
116
|
+
<div>
|
|
117
|
+
<q-checkbox size="xs" v-model="readonly" label="Readonly" />
|
|
118
|
+
</div>
|
|
119
|
+
<div>
|
|
120
|
+
<q-checkbox size="xs" v-model="isError" label="Is Error" />
|
|
121
|
+
</div>
|
|
122
|
+
<div>
|
|
123
|
+
<q-checkbox
|
|
124
|
+
size="xs"
|
|
125
|
+
v-model="leftBorderRadius"
|
|
126
|
+
label="Left border radius"
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
<div>
|
|
130
|
+
<q-checkbox size="xs" v-model="isRequired" label="Is required" />
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<template v-slot:code>
|
|
136
|
+
<pre><code>{{ htmlContent }}</code></pre>
|
|
137
|
+
</template>
|
|
138
|
+
</ComponentBase>
|
|
139
|
+
</q-page>
|
|
140
|
+
</template>
|
|
@@ -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>
|