@usssa/component-library 1.0.0-alpha.21 → 1.0.0-alpha.211

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.
Files changed (97) hide show
  1. package/README.md +8 -5
  2. package/package.json +25 -6
  3. package/src/assets/fonts/CorneroRegular.woff +0 -0
  4. package/src/assets/fonts/CorneroRegular.woff2 +0 -0
  5. package/src/assets/logo.svg +19 -0
  6. package/src/assets/no-result.svg +25 -0
  7. package/src/assets/upload-illustration.svg +48 -0
  8. package/src/components/core/UAccordionSelect.vue +237 -0
  9. package/src/components/core/UAvatar.vue +90 -26
  10. package/src/components/core/UAvatarGroup.vue +62 -52
  11. package/src/components/core/UBadgeStd.vue +6 -1
  12. package/src/components/core/UBannerStd.vue +100 -31
  13. package/src/components/core/UBreadCrumbs.vue +171 -0
  14. package/src/components/core/UBtnIcon.vue +57 -52
  15. package/src/components/core/UBtnStd.vue +38 -31
  16. package/src/components/core/UBtnToggle.vue +11 -6
  17. package/src/components/core/UCheckboxStd.vue +26 -20
  18. package/src/components/core/UChip.vue +91 -43
  19. package/src/components/core/UDate.vue +581 -0
  20. package/src/components/core/UDialogStd.vue +452 -58
  21. package/src/components/core/UDrawer/UDrawer.vue +471 -0
  22. package/src/components/core/UDrawer/UDrawerMenuItem.vue +124 -0
  23. package/src/components/core/UEventCard.vue +419 -0
  24. package/src/components/core/UExpansionStd.vue +274 -0
  25. package/src/components/core/UExpansionTableStd.vue +297 -0
  26. package/src/components/core/UFilter.vue +89 -0
  27. package/src/components/core/UGameObject.vue +441 -0
  28. package/src/components/core/UInnerLoader.vue +69 -0
  29. package/src/components/core/UInputAddressLookup.vue +484 -0
  30. package/src/components/core/UInputPhoneStd.vue +74 -68
  31. package/src/components/core/UInputTextStd.vue +137 -116
  32. package/src/components/core/UInputTypeahead.vue +44 -0
  33. package/src/components/core/UInputTypeaheadAdvanceSearch.vue +134 -0
  34. package/src/components/core/UMenuButtonStd.vue +280 -0
  35. package/src/components/core/UMenuDropdown.vue +82 -0
  36. package/src/components/core/UMenuDropdownAdvancedSearch.vue +306 -0
  37. package/src/components/core/UMenuItem.vue +221 -0
  38. package/src/components/core/UMenuSearch.vue +73 -0
  39. package/src/components/core/UModal.vue +660 -0
  40. package/src/components/core/UMultiSelectStd.vue +501 -61
  41. package/src/components/core/UPagination.vue +84 -25
  42. package/src/components/core/URadioBtn.vue +66 -43
  43. package/src/components/core/URadioStd.vue +23 -14
  44. package/src/components/core/USelectStd.vue +415 -84
  45. package/src/components/core/USheet.vue +349 -0
  46. package/src/components/core/UStepper/UProgress.vue +157 -0
  47. package/src/components/core/UStepper/UStepper.vue +211 -0
  48. package/src/components/core/UTabBtnStd.vue +36 -22
  49. package/src/components/core/UTable/UTable.vue +2061 -57
  50. package/src/components/core/UTableStd.vue +1311 -273
  51. package/src/components/core/UTabsStd.vue +52 -23
  52. package/src/components/core/UToggleStd.vue +18 -13
  53. package/src/components/core/UToolbar/UCustomMenuIcon.vue +58 -0
  54. package/src/components/core/UToolbar/UToolbar.vue +226 -0
  55. package/src/components/core/UTooltip.vue +31 -10
  56. package/src/components/core/UTypeahead.vue +890 -0
  57. package/src/components/core/UUploader.vue +644 -0
  58. package/src/components/index.js +77 -26
  59. package/src/composables/useNotify.js +16 -16
  60. package/src/composables/useOverlayLoader.js +23 -0
  61. package/src/composables/useScreenType.js +30 -0
  62. package/src/css/app.sass +42 -25
  63. package/src/css/colors.sass +2 -0
  64. package/src/css/quasar.variables.sass +99 -68
  65. package/src/css/vars/colors.variables.sass +28 -41
  66. package/src/utils/data.ts +177 -0
  67. package/src/App.vue +0 -9
  68. package/src/boot/.gitkeep +0 -0
  69. package/src/layouts/MainLayout.vue +0 -137
  70. package/src/pages/Avatar.vue +0 -77
  71. package/src/pages/AvatarGroup.vue +0 -139
  72. package/src/pages/BadgeStd.vue +0 -83
  73. package/src/pages/BannerPage.vue +0 -76
  74. package/src/pages/BtnIcon.vue +0 -120
  75. package/src/pages/BtnStd.vue +0 -126
  76. package/src/pages/BtnToggle.vue +0 -131
  77. package/src/pages/CheckBox.vue +0 -62
  78. package/src/pages/Chip.vue +0 -92
  79. package/src/pages/ComponentBase.vue +0 -54
  80. package/src/pages/Dialog.vue +0 -206
  81. package/src/pages/ErrorNotFound.vue +0 -11
  82. package/src/pages/IndexPage.vue +0 -11
  83. package/src/pages/InputPhone.vue +0 -152
  84. package/src/pages/InputText.vue +0 -139
  85. package/src/pages/MultiSelectStd.vue +0 -174
  86. package/src/pages/NotifyPage.vue +0 -109
  87. package/src/pages/Pagination.vue +0 -71
  88. package/src/pages/Radio.vue +0 -80
  89. package/src/pages/RadioBtn.vue +0 -104
  90. package/src/pages/SelectStd.vue +0 -160
  91. package/src/pages/TabButtonPage.vue +0 -126
  92. package/src/pages/TablePage.vue +0 -371
  93. package/src/pages/TabsPage.vue +0 -261
  94. package/src/pages/TogglePage.vue +0 -58
  95. package/src/pages/TooltipPage.vue +0 -125
  96. package/src/router/index.js +0 -34
  97. package/src/router/routes.js +0 -113
@@ -1,13 +1,13 @@
1
1
  // USSSA BLUE
2
- $blue-1: #E1E9F9 !default
3
- $blue-2: #CADBF9 !default
4
- $blue-3: #678BE0 !default
5
- $blue-4: #4571D9 !default
6
- $blue-5: #2A5ACB !default
7
- $blue-6: #234BA9 !default
8
- $blue-7: #183477 !default
9
- $blue-8: #143066 !default
10
- $blue-9: #0D2044 !default
2
+ $blue-1: #EEF8FF !default
3
+ $blue-2: #D8EDFF !default
4
+ $blue-3: #B9E0FF !default
5
+ $blue-4: #52B3FF !default
6
+ $blue-5: #1371FD !default
7
+ $blue-6: #0C5DF3 !default
8
+ $blue-7: #1048BD !default
9
+ $blue-8: #12316C !default
10
+ $blue-9: #0D1F45 !default
11
11
 
12
12
  // USSSA GOLD
13
13
  $gold-1: #FBF6EE !default
@@ -21,15 +21,15 @@ $gold-8: #64482F !default
21
21
  $gold-9: #312017 !default
22
22
 
23
23
  // USSSA GREEN
24
- $green-1: #EFFAF4 !default
25
- $green-2: #D9F2E3 !default
26
- $green-3: #85D0AD !default
27
- $green-4: #53B48A !default
28
- $green-5: #248560 !default
29
- $green-6: #1A6248 !default
30
- $green-7: #174E3A !default
31
- $green-8: #144031 !default
32
- $green-9: #0A241C !default
24
+ $green-1: #E4F6EB !default
25
+ $green-2: #BCEACE !default
26
+ $green-3: #6CCD91 !default
27
+ $green-4: #0DBD76 !default
28
+ $green-5: #009B5F !default
29
+ $green-6: #007A4B !default
30
+ $green-7: #00613C !default
31
+ $green-8: #004839 !default
32
+ $green-9: #002920 !default
33
33
 
34
34
  // USSSA NEUTRAL
35
35
  $neutral-1: #FFFFFF !default
@@ -47,15 +47,15 @@ $neutral-12: #202328 !default
47
47
  $neutral-13: #101114 !default
48
48
 
49
49
  // USSSA ORANGE
50
- $orange-1: #FEEEEB !default
51
- $orange-2: #FEE0D7 !default
52
- $orange-3: #FDBEAA !default
53
- $orange-4: #FA6C3D !default
54
- $orange-5: #FE4C10 !default
55
- $orange-6: #F8430D !default
56
- $orange-7: #D33809 !default
57
- $orange-8: #8C3712 !default
58
- $orange-9: #542007 !default
50
+ $orange-1: #FEEEE2 !default
51
+ $orange-2: #FEC49A !default
52
+ $orange-3: #FBA66A !default
53
+ $orange-4: #FD8B3A !default
54
+ $orange-5: #FE7310 !default
55
+ $orange-6: #E36002 !default
56
+ $orange-7: #B74A01 !default
57
+ $orange-8: #652B01 !default
58
+ $orange-9: #3D1A01 !default
59
59
 
60
60
  // USSSA PINK
61
61
  $pink-1: #FAE0F4 !default
@@ -80,7 +80,7 @@ $purple-8: #403877 !default
80
80
  $purple-9: #262145 !default
81
81
 
82
82
  // USSSA RED
83
- $red-1: #FEF2F2 !default
83
+ $red-1: #FFECE9 !default
84
84
  $red-2: #FCCCCE !default
85
85
  $red-3: #F9A8AB !default
86
86
  $red-4: #E94A50 !default
@@ -111,16 +111,3 @@ $yellow-6: #EBC321 !default
111
111
  $yellow-7: #D2AB0C !default
112
112
  $yellow-8: #B49104 !default
113
113
  $yellow-9: #8C7000 !default
114
-
115
- // USSSA RED TRANSPARENT
116
- $accent-transparent: rgba(203, 42, 61, .20)
117
- $accent-bg-hover: rgba(203, 42, 61, 0.15)
118
-
119
- // USSSA BLUE TRANSPARENT
120
- $primary-transparent: rgba(35, 75, 169, .20)
121
- $primary-bg-hover: rgba(35, 75, 169, .15)
122
-
123
- //USSSA Description content color
124
- $description : $neutral-9
125
-
126
- $surface-bg-1: #FFFFFF
@@ -0,0 +1,177 @@
1
+ /**
2
+ * @description Format date
3
+ * @param {string} date
4
+ * @returns {string} - Returns Formatted Date
5
+ */
6
+
7
+ export const formatDate = (date: Date | string | number) => {
8
+ const d = new Date(date)
9
+ return (
10
+ String(d.getDate()).padStart(2, '0') +
11
+ '/' +
12
+ String(d.getMonth() + 1).padStart(2, '0') +
13
+ '/' +
14
+ String(d.getFullYear()).slice(-2)
15
+ )
16
+ }
17
+
18
+ /**
19
+ * @description Return String with Fixed Length
20
+ * @param {string} string, length
21
+ * @returns {string} - Returns Return partial String
22
+ */
23
+ export const fixStringLength = (str: string, length: number) => {
24
+ if (str?.length > length) {
25
+ return str.substring(0, length) + '....'
26
+ } else {
27
+ return str.padEnd(length, ' ')
28
+ }
29
+ }
30
+
31
+ /**
32
+ * @description Get File Category from MIME Types
33
+ * @param {string} str - Mime Type
34
+ * @returns {string} - Returns Category :- pdf, video, audio, doc etc.
35
+ **/
36
+ export const getFileCategory = (mimeType) => {
37
+ const mimeTypes = {
38
+ // Document MIME types
39
+ 'application/pdf': 'pdf',
40
+ 'application/msword': 'word',
41
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
42
+ 'doc',
43
+ 'text/plain': 'text',
44
+ 'application/vnd.ms-excel': 'excel',
45
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
46
+ 'excel',
47
+ 'application/vnd.ms-powerpoint': 'doc',
48
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
49
+ 'doc',
50
+
51
+ // Image MIME types
52
+ 'image/jpeg': 'image',
53
+ 'image/png': 'image',
54
+ 'image/gif': 'image',
55
+ 'image/bmp': 'image',
56
+ 'image/svg+xml': 'image',
57
+ 'image/webp': 'image',
58
+
59
+ // Video MIME types
60
+ 'video/mp4': 'video',
61
+ 'video/x-msvideo': 'video',
62
+ 'video/x-matroska': 'video',
63
+ 'video/quicktime': 'video',
64
+ 'video/x-ms-wmv': 'video',
65
+ 'video/avi': 'video',
66
+
67
+ // Audio MIME types
68
+ 'audio/mpeg': 'audio',
69
+ 'audio/wav': 'audio',
70
+ 'audio/aac': 'audio',
71
+ 'audio/flac': 'audio',
72
+
73
+ // Archive MIME types
74
+ 'application/zip': 'archive',
75
+ 'application/x-rar-compressed': 'archive',
76
+ 'application/x-tar': 'archive',
77
+ 'application/gzip': 'archive',
78
+
79
+ // Add more MIME types as needed
80
+ }
81
+
82
+ return mimeTypes[mimeType] || 'Unknown'
83
+ }
84
+ /**
85
+ * @description Parses intials from a "name" string
86
+ * @param {string} str - Name string (e.g. "John Hancock", "John", "John Tyler Smith")
87
+ * @returns {string} - Returns initials
88
+ **/
89
+ export const parseInitials = (str: string): string | void => {
90
+ if (!str) return void 0
91
+ const parts = str.split(' ')
92
+
93
+ if (parts.length === 1) return parts[0].substring(0, 2).toUpperCase()
94
+
95
+ return `${parts[0].substring(0, 1).toUpperCase()}${parts[1]
96
+ .substring(0, 1)
97
+ .toUpperCase()}`
98
+ }
99
+
100
+ export const isQuasarColor = (color: string) => {
101
+ const quasarColors = [
102
+ 'accent',
103
+ 'dark',
104
+ 'gold',
105
+ 'info',
106
+ 'negative',
107
+ 'neutral',
108
+ 'positive',
109
+ 'pink',
110
+ 'primary',
111
+ 'secondary',
112
+ 'teal',
113
+ 'warning',
114
+ 'yellow',
115
+ ]
116
+ const quasarShadeRegex = /^[a-zA-Z]+-\d+$/
117
+
118
+ return quasarColors.includes(color) || quasarShadeRegex.test(color)
119
+ }
120
+
121
+ export function categorizeObjects(
122
+ array: Record<string, any>[],
123
+ categoryField: string
124
+ ): Record<string, any[]> {
125
+ return array.reduce((acc, item) => {
126
+ if (!acc[item[categoryField]]) {
127
+ acc[item[categoryField]] = []
128
+ }
129
+ acc[item[categoryField]].push(item)
130
+ return acc
131
+ }, {})
132
+ }
133
+
134
+ export function deepEqual(
135
+ obj1: Record<string, any>,
136
+ obj2: Record<string, any>
137
+ ) {
138
+ // Check if both are the same reference
139
+ if (obj1 === obj2) {
140
+ return true
141
+ }
142
+
143
+ // Check if either is null or not an object
144
+ if (
145
+ obj1 == null ||
146
+ typeof obj1 !== 'object' ||
147
+ obj2 == null ||
148
+ typeof obj2 !== 'object'
149
+ ) {
150
+ return false
151
+ }
152
+
153
+ // Get the keys of both objects
154
+ const keys1 = Object.keys(obj1)
155
+ const keys2 = Object.keys(obj2)
156
+
157
+ // Check if they have the same number of keys
158
+ if (keys1.length !== keys2.length) {
159
+ return false
160
+ }
161
+
162
+ // Check if all keys and values are the same
163
+ for (let key of keys1) {
164
+ if (!keys2.includes(key) || !deepEqual(obj1[key], obj2[key])) {
165
+ return false
166
+ }
167
+ }
168
+
169
+ return true
170
+ }
171
+
172
+ export function trimmedLabel(text = '', maxLength = 20, fallback = '') {
173
+ const safeText = text || fallback
174
+ const isTrimmed = safeText.length > maxLength
175
+ const trimmed = isTrimmed ? safeText.slice(0, maxLength) + '...' : safeText
176
+ return { text: trimmed, isTrimmed }
177
+ }
package/src/App.vue DELETED
@@ -1,9 +0,0 @@
1
- <template>
2
- <router-view />
3
- </template>
4
-
5
- <script setup>
6
- defineOptions({
7
- name: "App",
8
- });
9
- </script>
package/src/boot/.gitkeep DELETED
File without changes
@@ -1,137 +0,0 @@
1
- <script setup>
2
- import { ref } from 'vue'
3
-
4
- defineOptions({
5
- name: 'MainLayout',
6
- })
7
-
8
- const components = [
9
- {
10
- title: 'Avatar',
11
- path: '/avatar',
12
- },
13
- {
14
- title: 'Avatar Group',
15
- path: '/avatar-group',
16
- },
17
- {
18
- title: 'Badge',
19
- path: '/badge',
20
- },
21
- {
22
- title: 'Banner',
23
- path: '/banner',
24
- },
25
- {
26
- title: 'Button',
27
- path: '/button-standard',
28
- },
29
- {
30
- title: 'Button Icon',
31
- path: '/button-icon',
32
- },
33
- {
34
- title: 'Button Toggle',
35
- path: '/button-toggle',
36
- },
37
- {
38
- title: 'Checkbox',
39
- path: '/check-box',
40
- },
41
- {
42
- title: 'Chip',
43
- path: 'chip',
44
- },
45
- {
46
- title: 'Dialog',
47
- path: 'dialog',
48
- },
49
- {
50
- title: 'Input Text',
51
- path: 'input-text',
52
- },
53
- {
54
- title: 'Input Phone',
55
- path: 'input-phone',
56
- },
57
- {
58
- title: 'MultiSelect',
59
- path: 'multiselect-standard',
60
- },
61
- {
62
- title: 'Notify',
63
- path: '/notify',
64
- },
65
- {
66
- title: 'Pagination',
67
- path: 'pagination',
68
- },
69
- {
70
- title: 'Radio',
71
- path: 'radio',
72
- },
73
- {
74
- title: 'Radio Button',
75
- path: 'radio-btn',
76
- },
77
- {
78
- title: 'Select',
79
- path: 'select',
80
- },
81
- {
82
- title: 'Tabs',
83
- path: '/tabs/home',
84
- },
85
- {
86
- title: 'Tab Button',
87
- path: '/tab-button',
88
- },
89
- {
90
- title: 'Tooltip',
91
- path: '/tooltip',
92
- },
93
- {
94
- title: 'Toggle',
95
- path: '/toggle',
96
- },
97
- {
98
- title: 'Table',
99
- path: '/table',
100
- },
101
- ]
102
-
103
- const leftDrawerOpen = ref(true)
104
- </script>
105
-
106
- <template>
107
- <q-layout view="hHh lpr fFf">
108
- <q-header bordered>
109
- <q-toolbar class="bg-primary">
110
- <q-toolbar-title>USSSA Component Library</q-toolbar-title>
111
- </q-toolbar>
112
- </q-header>
113
-
114
- <q-drawer v-model="leftDrawerOpen" bordered>
115
- <q-list separator>
116
- <q-item-label class="bg-grey-8 text-grey-3" header>
117
- Select Component
118
- </q-item-label>
119
-
120
- <q-item
121
- v-for="c of components.sort((a, b) => a.title.localeCompare(b.title))"
122
- :key="c.title"
123
- active-class="bg-info text-grey-1 text-weight-bold"
124
- clickable
125
- :to="c.path"
126
- >
127
- <q-item-section>
128
- <q-item-label>{{ c.title }}</q-item-label>
129
- </q-item-section>
130
- </q-item>
131
- </q-list>
132
- </q-drawer>
133
- <q-page-container>
134
- <router-view />
135
- </q-page-container>
136
- </q-layout>
137
- </template>
@@ -1,77 +0,0 @@
1
- <script setup>
2
- import { UAvatar } from 'src/components'
3
- import ComponentBase from './ComponentBase.vue'
4
- import { ref } from 'vue'
5
-
6
- const type = ref('label')
7
- const round = ref(true)
8
- const name = ref('A')
9
- const indicatorColor = ref('')
10
- const image = ref('')
11
- const size = ref('sm')
12
- const indicatorColorOptions = ['primary', 'accent', 'positive', 'neutral']
13
- const sizeOptions = ['sm', 'md', 'lg', 'xl']
14
- const showIndicator = ref(true)
15
- const htmlContent = `<UAvatar
16
- ref="avatar"
17
- :name="name"
18
- :size="size"
19
- :showIndicator="showIndicator"
20
- :indicatorColor="indicatorColor"
21
- :round="round"
22
- :image="image"
23
- />`
24
-
25
- defineOptions({
26
- name: 'UAvatar',
27
- })
28
- </script>
29
-
30
- <template>
31
- <q-page class="flex flex-center">
32
- <ComponentBase
33
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2246-39909"
34
- >
35
- <template v-slot:component>
36
- <UAvatar
37
- ref="avatar"
38
- :name="name"
39
- :size="size"
40
- :showIndicator="showIndicator"
41
- :indicatorColor="indicatorColor"
42
- :round="round"
43
- :image="image"
44
- />
45
- </template>
46
-
47
- <template v-slot:properties>
48
- <div class="column q-gutter-y-lg">
49
- <q-input label="Name" v-model="name"></q-input>
50
- <q-input label="image" v-model="image"></q-input>
51
- <q-select v-model="size" :options="sizeOptions" label="Size" />
52
- <div class="column">
53
- <span class="text-grey-8 text-caption-sm">Show Indicator</span>
54
- <q-checkbox
55
- size="xs"
56
- v-model="showIndicator"
57
- :val="true"
58
- label="Show Indicator"
59
- />
60
- </div>
61
- <div>
62
- <q-checkbox size="xs" v-model="round" :val="true" label="Round" />
63
- </div>
64
- <q-select
65
- v-model="indicatorColor"
66
- :options="indicatorColorOptions"
67
- label="Indicator Color"
68
- />
69
- </div>
70
- </template>
71
-
72
- <template v-slot:code>
73
- <pre>{{ htmlContent }}</pre>
74
- </template>
75
- </ComponentBase>
76
- </q-page>
77
- </template>
@@ -1,139 +0,0 @@
1
- <script setup>
2
- import { UAvatarGroup } from 'src/components'
3
- import ComponentBase from './ComponentBase.vue'
4
- import { ref } from 'vue'
5
-
6
- const round = ref(true)
7
- const label = ref('A')
8
- const indicatorColor = ref('')
9
-
10
- const size = ref('xl')
11
- const indicatorColorOptions = ['primary', 'accent', 'positive', 'neutral']
12
- const sizeOptions = ['sm', 'md', 'lg', 'xl']
13
- const showIndicator = ref(true)
14
- const avatarLimit = ref(4)
15
-
16
- const htmlContent = `<UAvatarGroup
17
- ref="avatar"
18
- :label="label"
19
- :size="size"
20
- :showIndicator="showIndicator"
21
- :indicatorColor="indicatorColor"
22
- :round="round"
23
- :images="users"
24
- />`
25
-
26
- defineOptions({
27
- name: 'UAvatarGroup',
28
- })
29
- </script>
30
-
31
- <template>
32
- <q-page class="flex flex-center">
33
- <ComponentBase
34
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2246-39909"
35
- >
36
- <template v-slot:component>
37
- <UAvatarGroup
38
- ref="avatar"
39
- :label="label"
40
- :size="size"
41
- :showIndicator="showIndicator"
42
- :indicatorColor="indicatorColor"
43
- :round="round"
44
- :images="users"
45
- :avatarLimit="avatarLimit"
46
- />
47
- </template>
48
-
49
- <template v-slot:properties>
50
- <div class="column q-gutter-y-lg">
51
- <div v-for="(item, index) in users" :key="index">
52
- <span class="text-grey-8 text-caption-sm"
53
- >User {{ index + 1 }}</span
54
- >
55
-
56
- <q-input
57
- v-model="users[index].name"
58
- :val="users[index].name"
59
- label="Name"
60
- ></q-input>
61
- <q-input
62
- v-model="users[index].image"
63
- :val="item.image"
64
- label="Image"
65
- ></q-input>
66
- <div
67
- class="full-width row justify-end q-mt-xs"
68
- style="cursor: pointer"
69
- >
70
- <q-icon
71
- @click="removeField(index)"
72
- class="fa-duotone fa-solid fa-circle-minus"
73
- size="sm"
74
- color="primary"
75
- />
76
- </div>
77
- </div>
78
- <div class="full-width row justify-end q-mt-sm">
79
- <q-icon
80
- @click="addField"
81
- style="cursor: pointer"
82
- class="fa-duotone fa-solid fa-circle-plus"
83
- size="xl"
84
- color="primary"
85
- />
86
- </div>
87
- </div>
88
- <div class="column q-gutter-y-lg">
89
- <q-input v-model="avatarLimit" label="Avatar Limit" />
90
- </div>
91
- <div class="column q-gutter-y-lg">
92
- <q-select v-model="size" :options="sizeOptions" label="Size" />
93
- </div>
94
- <div class="column">
95
- <span class="text-grey-8 text-caption-sm">Show Indicator</span>
96
- <q-checkbox
97
- size="xs"
98
- v-model="showIndicator"
99
- :val="true"
100
- label="Show Indicator"
101
- />
102
- </div>
103
- <q-select
104
- v-model="indicatorColor"
105
- :options="indicatorColorOptions"
106
- label="Indicator Color"
107
- />
108
- </template>
109
-
110
- <template v-slot:code>
111
- <pre>{{ htmlContent }}</pre>
112
- </template>
113
- </ComponentBase>
114
- </q-page>
115
- </template>
116
- <script>
117
- export default {
118
- data() {
119
- return {
120
- users: [
121
- { name: 'Alice', image: 'https://cdn.quasar.dev/img/avatar1.jpg' },
122
- { name: 'Bob', image: 'https://cdn.quasar.dev/img/avatar2.jpg' },
123
- { name: 'Charlie', image: 'https://cdn.quasar.dev/img/avatar3.jpg' },
124
- { name: 'Diana', image: 'https://cdn.quasar.dev/img/avatar4.jpg' },
125
- { name: 'Edward', image: 'https://cdn.quasar.dev/img/avatar5.jpg' },
126
- { name: 'Alex', image: 'https://cdn.quasar.dev/img/avatar6.jpg' },
127
- ],
128
- }
129
- },
130
- methods: {
131
- addField() {
132
- this.users.push({ name: '', image: '' })
133
- },
134
- removeField(index) {
135
- this.users.splice(index, 1)
136
- },
137
- },
138
- }
139
- </script>