@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.
Files changed (161) hide show
  1. package/README.md +4 -1
  2. package/package.json +6 -4
  3. package/src/App.vue +9 -0
  4. package/src/assets/quasar-logo-vertical.svg +15 -0
  5. package/src/boot/.gitkeep +0 -0
  6. package/src/boot/google-maps.js +11 -0
  7. package/src/components/ComponentLink.vue +26 -0
  8. package/src/components/core/UAvatar.vue +161 -0
  9. package/src/components/core/UAvatarGroup.vue +119 -0
  10. package/src/components/core/UBadgeStd.vue +91 -0
  11. package/src/components/core/UBannerStd.vue +115 -0
  12. package/src/components/core/UBreadCrumbs.vue +67 -0
  13. package/src/components/core/UBtnIcon.vue +159 -0
  14. package/src/components/core/UBtnStd.vue +129 -0
  15. package/src/components/core/UBtnToggle.vue +68 -0
  16. package/src/components/core/UCheckboxStd.vue +95 -0
  17. package/src/components/core/UChip.vue +251 -0
  18. package/src/components/core/UDialogStd.vue +228 -0
  19. package/src/components/core/UDrawer.vue +211 -0
  20. package/src/components/core/UInnerLoader.vue +58 -0
  21. package/src/components/core/UInputAddressLookup.vue +466 -0
  22. package/src/components/core/UInputPhoneStd.vue +295 -0
  23. package/src/components/core/UInputTextStd.vue +293 -0
  24. package/src/components/core/UMenuButtonStd.vue +274 -0
  25. package/src/components/core/UMenuDropdown.vue +77 -0
  26. package/src/components/core/UMenuDropdownAdvancedSearch.vue +262 -0
  27. package/src/components/core/UMenuItem.vue +132 -0
  28. package/src/components/core/UMultiSelectStd.vue +259 -0
  29. package/src/components/core/UPagination.vue +104 -0
  30. package/src/components/core/URadioBtn.vue +116 -0
  31. package/src/components/core/URadioStd.vue +62 -0
  32. package/src/components/core/USelectStd.vue +233 -0
  33. package/src/components/core/UTabBtnStd.vue +167 -0
  34. package/src/components/core/UTable/UTable.vue +93 -0
  35. package/src/components/core/UTable/UTd.vue +63 -0
  36. package/src/components/core/UTable/UTh.vue +48 -0
  37. package/src/components/core/UTable/UTr.vue +20 -0
  38. package/src/components/core/UTableStd.vue +636 -0
  39. package/src/components/core/UTabsStd.vue +111 -0
  40. package/src/components/core/UToggleStd.vue +159 -0
  41. package/src/components/core/UTooltip.vue +71 -0
  42. package/src/components/index.js +66 -0
  43. package/src/composables/useNotify.js +79 -0
  44. package/src/composables/useOverlayLoader.js +23 -0
  45. package/src/css/app.sass +159 -0
  46. package/src/css/colors.sass +101 -0
  47. package/src/css/media.sass +1 -0
  48. package/src/css/quasar.variables.sass +119 -0
  49. package/src/css/typography.sass +0 -0
  50. package/src/css/vars/colors.variables.sass +126 -0
  51. package/src/layouts/MainLayout.vue +177 -0
  52. package/src/pages/AdvancedSearch.vue +512 -0
  53. package/src/pages/Avatar.vue +77 -0
  54. package/src/pages/AvatarGroup.vue +139 -0
  55. package/src/pages/BadgeStd.vue +83 -0
  56. package/src/pages/BannerPage.vue +76 -0
  57. package/src/pages/BreadCrumbs.vue +100 -0
  58. package/src/pages/BtnIcon.vue +120 -0
  59. package/src/pages/BtnStd.vue +138 -0
  60. package/src/pages/BtnToggle.vue +131 -0
  61. package/src/pages/CheckBox.vue +62 -0
  62. package/src/pages/Chip.vue +108 -0
  63. package/src/pages/ComponentBase.vue +54 -0
  64. package/src/pages/Dialog.vue +206 -0
  65. package/src/pages/Drawer.vue +128 -0
  66. package/src/pages/ErrorNotFound.vue +11 -0
  67. package/src/pages/IndexPage.vue +11 -0
  68. package/src/pages/InnerLoader.vue +81 -0
  69. package/src/pages/InputAddressLookup.vue +258 -0
  70. package/src/pages/InputPhone.vue +152 -0
  71. package/src/pages/InputText.vue +140 -0
  72. package/src/pages/MenuButton.vue +194 -0
  73. package/src/pages/MenuDropdown.vue +79 -0
  74. package/src/pages/MenuItem.vue +68 -0
  75. package/src/pages/MultiSelectStd.vue +174 -0
  76. package/src/pages/NotifyPage.vue +109 -0
  77. package/src/pages/OverlayLoader.vue +128 -0
  78. package/src/pages/Pagination.vue +71 -0
  79. package/src/pages/Radio.vue +80 -0
  80. package/src/pages/RadioBtn.vue +104 -0
  81. package/src/pages/SelectStd.vue +160 -0
  82. package/src/pages/TabButtonPage.vue +126 -0
  83. package/src/pages/TablePage.vue +375 -0
  84. package/src/pages/TabsPage.vue +261 -0
  85. package/src/pages/TogglePage.vue +58 -0
  86. package/src/pages/TooltipPage.vue +125 -0
  87. package/src/router/index.js +34 -0
  88. package/src/router/routes.js +149 -0
  89. package/dist/spa/assets/Avatar.45667392.js +0 -9
  90. package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
  91. package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
  92. package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
  93. package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
  94. package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
  95. package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
  96. package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
  97. package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
  98. package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
  99. package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
  100. package/dist/spa/assets/Chip.49ffc857.js +0 -11
  101. package/dist/spa/assets/Chip.74acaa33.css +0 -1
  102. package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
  103. package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
  104. package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
  105. package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
  106. package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
  107. package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
  108. package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
  109. package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
  110. package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
  111. package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
  112. package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
  113. package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
  114. package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
  115. package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
  116. package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
  117. package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
  118. package/dist/spa/assets/QPage.ca395ec4.js +0 -1
  119. package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
  120. package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
  121. package/dist/spa/assets/QSelect.a40eb786.js +0 -1
  122. package/dist/spa/assets/QTabs.72f2507e.js +0 -1
  123. package/dist/spa/assets/QToggle.376c48be.js +0 -1
  124. package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
  125. package/dist/spa/assets/Radio.0ac35288.js +0 -7
  126. package/dist/spa/assets/Radio.aca54a89.css +0 -1
  127. package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
  128. package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
  129. package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
  130. package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
  131. package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
  132. package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
  133. package/dist/spa/assets/TogglePage.8129b631.css +0 -1
  134. package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
  135. package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
  136. package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
  137. package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
  138. package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
  139. package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
  140. package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
  141. package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
  142. package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
  143. package/dist/spa/assets/dom.e9d4ad51.js +0 -1
  144. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
  145. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
  146. package/dist/spa/assets/format.41663636.js +0 -1
  147. package/dist/spa/assets/index.43c62a18.js +0 -21
  148. package/dist/spa/assets/index.4fbd73cf.css +0 -5
  149. package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
  150. package/dist/spa/assets/render.e67ff27a.js +0 -1
  151. package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
  152. package/dist/spa/assets/touch.9135741d.js +0 -1
  153. package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
  154. package/dist/spa/favicon.ico +0 -0
  155. package/dist/spa/icons/caret-down.svg +0 -5
  156. package/dist/spa/icons/circle-xmark.svg +0 -6
  157. package/dist/spa/icons/favicon-128x128.png +0 -0
  158. package/dist/spa/icons/favicon-16x16.png +0 -0
  159. package/dist/spa/icons/favicon-32x32.png +0 -0
  160. package/dist/spa/icons/favicon-96x96.png +0 -0
  161. package/dist/spa/index.html +0 -3
@@ -0,0 +1,128 @@
1
+ <script setup>
2
+ import { ref } from 'vue'
3
+ import { useOverlayLoader } from '../composables/useOverlayLoader'
4
+ import ComponentBase from './ComponentBase.vue'
5
+ import UBtnStd from 'src/components/core/UBtnStd.vue'
6
+ import {
7
+ QSpinnerGears,
8
+ QSpinnerFacebook,
9
+ QSpinnerBars,
10
+ QSpinnerDots,
11
+ } from 'quasar'
12
+
13
+ defineOptions({
14
+ name: 'OverlayLoader',
15
+ })
16
+
17
+ const { showLoader, hideLoader } = useOverlayLoader()
18
+ const messageColors = ['dark', 'white', 'primary', 'positive', 'warning']
19
+ const backgroundColors = ['dark', 'white', 'primary', 'positive', 'warning']
20
+ const spinnerColors = ['dark', 'white', 'primary', 'positive', 'warning']
21
+ const spinnerOptions = [
22
+ {
23
+ label: 'QSpinnerGears',
24
+ value: QSpinnerGears,
25
+ },
26
+ {
27
+ label: 'QSpinnerBars',
28
+ value: QSpinnerBars,
29
+ },
30
+ {
31
+ label: 'QSpinnerDots',
32
+ value: QSpinnerDots,
33
+ },
34
+ {
35
+ label: 'QSpinnerFacebook',
36
+ value: QSpinnerFacebook,
37
+ },
38
+ ]
39
+ const customProps = ref({
40
+ backgroundColor: 'dark',
41
+ message: 'Authenticating User',
42
+ messageColor: 'white',
43
+ spinner: spinnerOptions[0],
44
+ spinnerSize: '6rem',
45
+ spinnerColor: 'white',
46
+ })
47
+
48
+ const htmlContent = `
49
+ const { showLoader, hideLoader } = useOverlayLoader()
50
+
51
+ --To show the loader--
52
+
53
+ showLoader({
54
+ backgroundColor:props.backgroundColor,
55
+ message: props..message,
56
+ messageColor: props.messageColor
57
+ spinner: props.spinner
58
+ spinnerSize: props.spinnerSize,
59
+ spinnerColor: props.spinnerColor,
60
+ })
61
+
62
+ --To hide the loader--
63
+
64
+ hideLoader()`
65
+
66
+ const showOverlayLoader = () => {
67
+ showLoader({
68
+ backgroundColor: customProps.value?.backgroundColor,
69
+ message: customProps.value?.message,
70
+ messageColor: customProps.value.messageColor,
71
+ spinner: customProps.value.spinner.value,
72
+ spinnerSize: customProps.value.spinnerSize,
73
+ spinnerColor: customProps.value.spinnerColor,
74
+ })
75
+
76
+ setTimeout(() => {
77
+ hideLoader()
78
+ }, 2000)
79
+ }
80
+
81
+ </script>
82
+
83
+ <template>
84
+ <q-page class="flex flex-center">
85
+ <ComponentBase figmaUrl="#">
86
+ <template v-slot:component>
87
+ <UBtnStd label="Show loader" color="primary" @on-click="showOverlayLoader" />
88
+ </template>
89
+
90
+ <template v-slot:properties>
91
+ <div class="column q-gutter-y-lg">
92
+ <q-input label="Message" v-model="customProps.message" />
93
+ <q-input
94
+ label="Spinner size (In rem)"
95
+ v-model="customProps.spinnerSize"
96
+ />
97
+
98
+ <q-select
99
+ v-model="customProps.messageColor"
100
+ :options="messageColors"
101
+ label="Message color"
102
+ />
103
+ <q-select
104
+ v-model="customProps.backgroundColor"
105
+ :options="backgroundColors"
106
+ label="Background color"
107
+ />
108
+ <q-select
109
+ v-model="customProps.spinnerColor"
110
+ :options="spinnerColors"
111
+ label="Spinner color"
112
+ />
113
+ <q-select
114
+ v-model="customProps.spinner"
115
+ :options="spinnerOptions"
116
+ option-value="value"
117
+ option-label="label"
118
+ label="Spinner"
119
+ />
120
+ </div>
121
+ </template>
122
+
123
+ <template v-slot:code>
124
+ <pre><code>{{ htmlContent }}</code></pre>
125
+ </template>
126
+ </ComponentBase>
127
+ </q-page>
128
+ </template>
@@ -0,0 +1,71 @@
1
+ <script setup>
2
+ import ComponentBase from './ComponentBase.vue'
3
+ import UPagination from 'src/components/core/UPagination.vue'
4
+ import { ref } from 'vue'
5
+
6
+ const perPageOptions = [
7
+ { label: '5 / per page', value: 5 },
8
+ { label: '10 / per page', value: 10 },
9
+ { label: '15 / per page', value: 15 },
10
+ { label: '20 / per page', value: 20 },
11
+ { label: '25 / per page', value: 25 },
12
+ ]
13
+
14
+ const currentPage = ref(5)
15
+ const rowPerPage = ref(10)
16
+ const maxPages = ref(20)
17
+ const maxPageLink = ref(6)
18
+
19
+ const htmlContent = `<UPagination
20
+ v-model="currentPage"
21
+ :perPageOptions="perPageOptions"
22
+ :maxPageLink="Number(maxPageLink)"
23
+ :maxPages="Number(maxPages)"
24
+ @onPageChange="onPageChange"
25
+ @onRowChange="onRowPerPageChange"
26
+ />`
27
+
28
+ const onPageChange = (page) => {
29
+ currentPage.value = page
30
+ }
31
+ const onRowPerPageChange = (newRowPerPage) => {
32
+ rowPerPage.value = newRowPerPage
33
+ currentPage.value = 1
34
+ }
35
+ defineOptions({
36
+ name: 'PaginationStd',
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=4007-38376"
44
+ >
45
+ <template v-slot:component>
46
+ <UPagination
47
+ v-model="currentPage"
48
+ :perPageOptions="perPageOptions"
49
+ :maxPageLink="Number(maxPageLink)"
50
+ :maxPages="Number(maxPages)"
51
+ @onPageChange="onPageChange"
52
+ @onRowChange="onRowPerPageChange"
53
+ />
54
+ </template>
55
+
56
+ <template v-slot:properties>
57
+ <div class="column q-gutter-y-lg">
58
+ <q-input label="Max page" v-model="maxPages"></q-input>
59
+ <q-input
60
+ label="Max number of page link"
61
+ v-model="maxPageLink"
62
+ ></q-input>
63
+ </div>
64
+ </template>
65
+
66
+ <template v-slot:code>
67
+ <pre>{{ htmlContent }}</pre>
68
+ </template>
69
+ </ComponentBase>
70
+ </q-page>
71
+ </template>
@@ -0,0 +1,80 @@
1
+ <script setup>
2
+ import { ref } from 'vue'
3
+ import ComponentBase from './ComponentBase.vue'
4
+ import { URadioStd } from 'src/components'
5
+
6
+ const disabledFirst = ref(false)
7
+ const disabledSecond = ref(false)
8
+
9
+ const label1 = ref('Radio1')
10
+
11
+ const label2 = ref('Radio2')
12
+
13
+ const value1 = ref('one')
14
+ const value2 = ref('two')
15
+ const radioValue = ref()
16
+
17
+ const htmlContent = `<URadioStd
18
+ :label="label"
19
+ v-model="radioValue"
20
+ :value="value"
21
+ :disable="disabled"
22
+ :id="id"
23
+ />`
24
+
25
+ defineOptions({
26
+ name: 'URadio',
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=2290-152010&t=ZyHTLbK43OFj9gBL-0"
34
+ >
35
+ <template v-slot:component>
36
+ <div class="q-gutter-x-md q-mb-sm">
37
+ <URadioStd
38
+ :label="label1"
39
+ v-model="radioValue"
40
+ :value="value1"
41
+ :disable="disabledFirst"
42
+ id="u-radio"
43
+ />
44
+ <URadioStd
45
+ :label="label2"
46
+ v-model="radioValue"
47
+ :value="value2"
48
+ :disable="disabledSecond"
49
+ id="u-radio-2"
50
+ />
51
+ </div>
52
+ <div>
53
+ <p>Your selection is: {{ radioValue }}</p>
54
+ </div>
55
+ </template>
56
+
57
+ <template v-slot:properties>
58
+ <div class="column q-gutter-y-lg">
59
+ <q-input label="Label1" v-model="label1" />
60
+ <q-input label="Label2" v-model="label2" />
61
+
62
+ <q-checkbox
63
+ size="xs"
64
+ v-model="disabledFirst"
65
+ label="Disable Radio1"
66
+ />
67
+ <q-checkbox
68
+ size="xs"
69
+ v-model="disabledSecond"
70
+ label="Disable Radio2"
71
+ />
72
+ </div>
73
+ </template>
74
+
75
+ <template v-slot:code>
76
+ <pre><code>{{ htmlContent }}</code></pre>
77
+ </template>
78
+ </ComponentBase>
79
+ </q-page>
80
+ </template>
@@ -0,0 +1,104 @@
1
+ <script setup>
2
+ import { URadioBtn } from 'src/components'
3
+ import ComponentBase from './ComponentBase.vue'
4
+ import { ref } from 'vue'
5
+
6
+ const label = ref('Label')
7
+ const description = ref('Text')
8
+ const imgAriaLabel = ref('Visa Logo')
9
+ const altText = ref('Visa Logo')
10
+ const iconColor = ref('primary')
11
+
12
+ const label1 = ref('Label-1')
13
+ const description1 = ref('Text-1')
14
+
15
+ const image = ref('/icons/visa.svg')
16
+
17
+ const value1 = ref('1')
18
+ const value2 = ref('2')
19
+
20
+ const colorOptions = ['primary', 'neutral', 'accent', 'white']
21
+
22
+ const id = ref('1')
23
+ const id1 = ref('2')
24
+
25
+ const modelValue = ref()
26
+ const iconClass = ref()
27
+
28
+ const htmlContent = ` <URadioBtn
29
+ :label="label"
30
+ :description="description"
31
+ :image="image"
32
+ :icon-class="iconClass"
33
+ :value="value1"
34
+ v-model="modelValue"
35
+ :icon-color="iconColor"
36
+ :id="id"
37
+ />`
38
+
39
+ defineOptions({
40
+ name: 'RadionBtn',
41
+ })
42
+ </script>
43
+
44
+ <template>
45
+ <q-page class="flex flex-center">
46
+ <ComponentBase
47
+ figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=3721-441044"
48
+ >
49
+ <template v-slot:component>
50
+ <div class="flex" style="gap: 0.5rem">
51
+ <URadioBtn
52
+ :label="label"
53
+ :description="description"
54
+ :image="image"
55
+ :icon-class="iconClass"
56
+ :value="value1"
57
+ :altText="altText"
58
+ :imgAriaLabel="imgAriaLabel"
59
+ :icon-color="iconColor"
60
+ v-model="modelValue"
61
+ :id="id"
62
+ />
63
+
64
+ <URadioBtn
65
+ :label="label1"
66
+ :icon-class="iconClass"
67
+ :image="image"
68
+ :description="description1"
69
+ :value="value2"
70
+ v-model="modelValue"
71
+ :altText="altText"
72
+ :imgAriaLabel="imgAriaLabel"
73
+ :icon-color="iconColor"
74
+ :id="id1"
75
+ />
76
+ </div>
77
+ </template>
78
+
79
+ <template v-slot:properties>
80
+ <div class="column q-gutter-y-lg">
81
+ <q-input label="Label" v-model="label"></q-input>
82
+ <q-input label="Description" v-model="description"></q-input>
83
+ <q-input label="Image" v-model="image"></q-input>
84
+ <q-input label="Image Aria Label" v-model="imgAriaLabel"></q-input>
85
+ <q-input label="Image Alt text" v-model="altText"></q-input>
86
+ <q-input
87
+ label="Icon Class"
88
+ v-model="iconClass"
89
+ placeholder="fa-kit-duotone fa-circle-bolt"
90
+ ></q-input>
91
+ <q-select
92
+ v-model="iconColor"
93
+ :options="colorOptions"
94
+ label="Icon Color"
95
+ />
96
+ </div>
97
+ </template>
98
+
99
+ <template v-slot:code>
100
+ <pre>{{ htmlContent }}</pre>
101
+ </template>
102
+ </ComponentBase>
103
+ </q-page>
104
+ </template>
@@ -0,0 +1,160 @@
1
+ <script setup>
2
+ import { ref } from 'vue'
3
+ import ComponentBase from './ComponentBase.vue'
4
+ import { USelectStd } from 'src/components'
5
+
6
+ const options_data = [
7
+ {
8
+ label: 'Guatemala',
9
+ value: 'Guatemala',
10
+ icon: 'fa-kit-duotone fa-home',
11
+ },
12
+ {
13
+ label: 'Philippines',
14
+ value: 'Philippines',
15
+ icon: 'fa-kit-duotone fa-home',
16
+ },
17
+ {
18
+ label: 'Colombia',
19
+ value: 'Colombia',
20
+ icon: 'fa-kit-duotone fa-home',
21
+ },
22
+ {
23
+ label: 'Turkmenistan',
24
+ value: 'Turkmenistan',
25
+ icon: 'fa-kit-duotone fa-home',
26
+ },
27
+ {
28
+ label: 'France',
29
+ value: 'France',
30
+ icon: 'fa-kit-duotone fa-home',
31
+ },
32
+ {
33
+ label: 'Philippines',
34
+ value: 'Philippines',
35
+ icon: 'fa-kit-duotone fa-home',
36
+ },
37
+ {
38
+ label: 'Greece',
39
+ value: 'Greece',
40
+ icon: 'fa-kit-duotone fa-home',
41
+ },
42
+ {
43
+ label: 'Indonesia',
44
+ value: 'Indonesia',
45
+ icon: 'fa-kit-duotone fa-home',
46
+ },
47
+ {
48
+ label: 'Russia',
49
+ value: 'Russia',
50
+ icon: 'fa-kit-duotone fa-home',
51
+ },
52
+ {
53
+ label: 'Albania',
54
+ value: 'Albania',
55
+ icon: 'fa-kit-duotone fa-home',
56
+ },
57
+ {
58
+ label: 'Sweden',
59
+ value: 'Sweden',
60
+ icon: 'fa-kit-duotone fa-home',
61
+ },
62
+ {
63
+ label: 'Japan',
64
+ value: 'Japan',
65
+ icon: 'fa-kit-duotone fa-home',
66
+ },
67
+ {
68
+ label: 'Czech Republic',
69
+ value: 'Czech Republic',
70
+ icon: 'fa-kit-duotone fa-home',
71
+ },
72
+ ]
73
+ const options = ref(options_data)
74
+
75
+ const modelMultiple = ref(null)
76
+
77
+ const sizeOptions = ['sm', 'md', 'lg']
78
+
79
+ const filterFn = (val, update) => {
80
+ update(() => {
81
+ const needle = val.toLowerCase()
82
+ options.value = options_data.filter(
83
+ (v) => v.value.toLowerCase().indexOf(needle) > -1
84
+ )
85
+ })
86
+ }
87
+
88
+ const size = ref('sm')
89
+ const useInput = ref(false)
90
+ const hintText = ref('This is hint text')
91
+ const toolTipText = ref('This is tooltip text')
92
+ const label = ref('Label')
93
+ const hintIcon = ref('fa-kit-duotone fa-triangle-exclamation')
94
+ const leftIcon = ref('')
95
+ const isRequired = ref(true)
96
+ const placeholderText = ref('Placeholder')
97
+ const htmlContent = `<USelectStd
98
+ v-model="modelMultiple"
99
+ color="$primary"
100
+ noSearchText="No result"
101
+ :options="options"
102
+ :label="label"
103
+ :size="size"
104
+ :hintText="hintText"
105
+ :isRequired="isRequired"
106
+ :toolTipText="toolTipText"
107
+ :hintIcon="hintIcon"
108
+ :useInput="useInput"
109
+ :leftIcon="leftIcon"
110
+ :filterFn="filterFn"
111
+ :placeholder="placeholderText"
112
+ />`
113
+ </script>
114
+
115
+ <template>
116
+ <q-page class="flex flex-center">
117
+ <ComponentBase
118
+ figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2290-151315&t=qG4NJ0uRZzUxQs9M-0"
119
+ >
120
+ <template v-slot:component>
121
+ <USelectStd
122
+ v-model="modelMultiple"
123
+ color="$primary"
124
+ noSearchText="No result"
125
+ :options="options"
126
+ :label="label"
127
+ :size="size"
128
+ :hintText="hintText"
129
+ :isRequired="isRequired"
130
+ :toolTipText="toolTipText"
131
+ :hintIcon="hintIcon"
132
+ :useInput="useInput"
133
+ :leftIcon="leftIcon"
134
+ :filterFn="filterFn"
135
+ :placeholder="placeholderText"
136
+ />
137
+ </template>
138
+
139
+ <template v-slot:properties>
140
+ <div class="q-gutter-y-lg">
141
+ <q-input label="Label" v-model="label" />
142
+ <q-select v-model="size" :options="sizeOptions" label="Size" />
143
+ <q-input label="Hint Icon" v-model="hintIcon" />
144
+ <q-input label="Hint Text" v-model="hintText" />
145
+ <q-input label="Tooltip Text" v-model="toolTipText" />
146
+ <q-input label="Placeholder" v-model="placeholderText" />
147
+ <q-input label="Left Icon" v-model="leftIcon" />
148
+
149
+ <div class="row">
150
+ <q-checkbox size="xs" v-model="isRequired" label="Required" />
151
+ <q-checkbox size="xs" v-model="useInput" label="Use Input" />
152
+ </div>
153
+ </div>
154
+ </template>
155
+ <template v-slot:code>
156
+ <pre>{{ htmlContent }}</pre>
157
+ </template>
158
+ </ComponentBase>
159
+ </q-page>
160
+ </template>
@@ -0,0 +1,126 @@
1
+ <script setup>
2
+ import { UTabBtnStd } from 'src/components'
3
+ import ComponentBase from './ComponentBase.vue'
4
+ import { ref } from 'vue'
5
+
6
+ defineOptions({
7
+ name: 'TabButtonPage',
8
+ })
9
+
10
+ const htmlContent = `<UTabBtnStd
11
+ :buttonTabsOptions="buttonTabsOptions"
12
+ v-model="selectedTab"
13
+ :size="size"
14
+ />`
15
+
16
+ const selectedTab = ref('1')
17
+ const size = ref('md')
18
+ const standard = ref(false)
19
+ const sizeOptions = ['sm', 'md']
20
+ const buttonTabsOptions = ref([
21
+ {
22
+ label: 'Button 1',
23
+ id: '1',
24
+ icon: 'fa-kit-duotone fa-circle-bolt',
25
+ badgeLabel: null,
26
+ disable: false,
27
+ },
28
+ {
29
+ label: 'Button 2',
30
+ id: '2',
31
+ icon: 'fa-kit-duotone fa-circle-bolt',
32
+ badgeLabel: null,
33
+ disable: false,
34
+ },
35
+ ])
36
+
37
+ const updateItem = (index, key, value) => {
38
+ buttonTabsOptions.value[index][key] = value
39
+ }
40
+ </script>
41
+
42
+ <template>
43
+ <q-page class="flex flex-center">
44
+ <ComponentBase
45
+ figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=4-28&t=K9pIC6Ve5iom3wvc-0"
46
+ cardWidth="50%"
47
+ >
48
+ <template v-slot:component>
49
+ <UTabBtnStd
50
+ :buttonTabsOptions="buttonTabsOptions"
51
+ v-model="selectedTab"
52
+ :size="size"
53
+ :standard="standard"
54
+ />
55
+ <q-tab-panels
56
+ class="bg-transparent"
57
+ v-model="selectedTab"
58
+ keep-alive
59
+ animated
60
+ transition-prev="scale"
61
+ transition-next="scale"
62
+ >
63
+ <q-tab-panel class="text-center" name="1">
64
+ <q-card class="q-pa-sm">
65
+ <div class="text-h6">First</div>
66
+ This is a example q-tab-panels with animation - First
67
+ </q-card>
68
+ </q-tab-panel>
69
+ <q-tab-panel class="text-center" name="2">
70
+ <q-card class="q-pa-sm">
71
+ <div class="text-h6">Second</div>
72
+ This is a example q-tab-panels with animation - Second
73
+ </q-card>
74
+ </q-tab-panel>
75
+ </q-tab-panels>
76
+ </template>
77
+ <template v-slot:properties>
78
+ <div class="column q-gutter-y-lg">
79
+ <q-select v-model="size" :options="sizeOptions" label="Size" />
80
+ <q-checkbox size="xs" v-model="standard" label="Standard tab" />
81
+ <div class="row playground-wrapper">
82
+ <div
83
+ class="tab-playground-wrapper"
84
+ v-for="(tabOption, index) in buttonTabsOptions"
85
+ :key="tabOption.id"
86
+ >
87
+ <q-checkbox
88
+ size="xs"
89
+ @input="updateItem(index, 'disable', tabOption.disable)"
90
+ v-model="tabOption.disable"
91
+ label="Disable tab"
92
+ />
93
+ <q-input
94
+ v-model="tabOption.label"
95
+ label="Label"
96
+ @input="updateItem(index, 'label', tabOption.label)"
97
+ />
98
+ <q-input
99
+ @input="updateItem(index, 'icon', tabOption.icon)"
100
+ v-model="tabOption.icon"
101
+ label="Icon"
102
+ />
103
+ <q-input
104
+ v-model="tabOption.badgeLabel"
105
+ label="Badge Info"
106
+ @input="updateItem(index, 'badgeLabel', tabOption.badgeLabel)"
107
+ />
108
+ </div>
109
+ </div>
110
+ </div>
111
+ </template>
112
+ <template v-slot:code>
113
+ <pre><code>{{ htmlContent }}</code></pre>
114
+ </template>
115
+ </ComponentBase>
116
+ </q-page>
117
+ </template>
118
+
119
+ <style lang="sass">
120
+ .playground-wrapper
121
+ gap: 1rem
122
+ flex-wrap: nowrap
123
+
124
+ .tab-playground-wrapper
125
+ width: 100%
126
+ </style>