@usssa/component-library 1.0.0-alpha.1 → 1.0.0-alpha.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +18 -37
  2. package/package.json +17 -6
  3. package/src/assets/files.png +0 -0
  4. package/src/assets/logo.svg +19 -0
  5. package/src/assets/no-result.png +0 -0
  6. package/src/assets/quasar-logo-vertical.svg +15 -0
  7. package/src/components/ComponentLink.vue +26 -0
  8. package/src/components/core/UAvatar.vue +179 -0
  9. package/src/components/core/UAvatarGroup.vue +120 -0
  10. package/src/components/core/UBadgeStd.vue +91 -0
  11. package/src/components/core/UBannerStd.vue +142 -0
  12. package/src/components/core/UBreadCrumbs.vue +67 -0
  13. package/src/components/core/UBtnIcon.vue +158 -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 +244 -0
  19. package/src/components/core/UDrawer.vue +235 -0
  20. package/src/components/core/UInnerLoader.vue +58 -0
  21. package/src/components/core/UInputAddressLookup.vue +470 -0
  22. package/src/components/core/UInputPhoneStd.vue +299 -0
  23. package/src/components/core/UInputTextStd.vue +299 -0
  24. package/src/components/core/UInputTypeaheadAdvanceSearch.vue +59 -0
  25. package/src/components/core/UMenuButtonStd.vue +274 -0
  26. package/src/components/core/UMenuDropdown.vue +72 -0
  27. package/src/components/core/UMenuDropdownAdvancedSearch.vue +301 -0
  28. package/src/components/core/UMenuItem.vue +134 -0
  29. package/src/components/core/UMenuSearch.vue +752 -0
  30. package/src/components/core/UMultiSelectStd.vue +274 -0
  31. package/src/components/core/UPagination.vue +104 -0
  32. package/src/components/core/URadioBtn.vue +116 -0
  33. package/src/components/core/URadioStd.vue +62 -0
  34. package/src/components/core/USelectStd.vue +250 -0
  35. package/src/components/core/UTabBtnStd.vue +176 -0
  36. package/src/components/core/UTable/UTable.vue +93 -0
  37. package/src/components/core/UTable/UTd.vue +63 -0
  38. package/src/components/core/UTable/UTh.vue +48 -0
  39. package/src/components/core/UTable/UTr.vue +20 -0
  40. package/src/components/core/UTableStd.vue +1003 -0
  41. package/src/components/core/UTabsStd.vue +111 -0
  42. package/src/components/core/UToggleStd.vue +159 -0
  43. package/src/components/core/UToolbar.vue +94 -0
  44. package/src/components/core/UTooltip.vue +73 -0
  45. package/src/components/core/UUploader.vue +497 -0
  46. package/src/components/index.js +75 -0
  47. package/src/composables/useNotify.js +79 -0
  48. package/src/composables/useOverlayLoader.js +23 -0
  49. package/src/css/app.sass +159 -0
  50. package/src/css/colors.sass +101 -0
  51. package/src/css/media.sass +1 -0
  52. package/src/css/quasar.variables.sass +121 -0
  53. package/src/css/typography.sass +0 -0
  54. package/src/css/vars/colors.variables.sass +126 -0
  55. package/src/utils/data.ts +146 -0
  56. package/dist/spa/assets/Avatar.45667392.js +0 -9
  57. package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
  58. package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
  59. package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
  60. package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
  61. package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
  62. package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
  63. package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
  64. package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
  65. package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
  66. package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
  67. package/dist/spa/assets/Chip.49ffc857.js +0 -11
  68. package/dist/spa/assets/Chip.74acaa33.css +0 -1
  69. package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
  70. package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
  71. package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
  72. package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
  73. package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
  74. package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
  75. package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
  76. package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
  77. package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
  78. package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
  79. package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
  80. package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
  81. package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
  82. package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
  83. package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
  84. package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
  85. package/dist/spa/assets/QPage.ca395ec4.js +0 -1
  86. package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
  87. package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
  88. package/dist/spa/assets/QSelect.a40eb786.js +0 -1
  89. package/dist/spa/assets/QTabs.72f2507e.js +0 -1
  90. package/dist/spa/assets/QToggle.376c48be.js +0 -1
  91. package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
  92. package/dist/spa/assets/Radio.0ac35288.js +0 -7
  93. package/dist/spa/assets/Radio.aca54a89.css +0 -1
  94. package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
  95. package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
  96. package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
  97. package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
  98. package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
  99. package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
  100. package/dist/spa/assets/TogglePage.8129b631.css +0 -1
  101. package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
  102. package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
  103. package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
  104. package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
  105. package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
  106. package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
  107. package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
  108. package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
  109. package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
  110. package/dist/spa/assets/dom.e9d4ad51.js +0 -1
  111. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
  112. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
  113. package/dist/spa/assets/format.41663636.js +0 -1
  114. package/dist/spa/assets/index.43c62a18.js +0 -21
  115. package/dist/spa/assets/index.4fbd73cf.css +0 -5
  116. package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
  117. package/dist/spa/assets/render.e67ff27a.js +0 -1
  118. package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
  119. package/dist/spa/assets/touch.9135741d.js +0 -1
  120. package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
  121. package/dist/spa/favicon.ico +0 -0
  122. package/dist/spa/icons/caret-down.svg +0 -5
  123. package/dist/spa/icons/circle-xmark.svg +0 -6
  124. package/dist/spa/icons/favicon-128x128.png +0 -0
  125. package/dist/spa/icons/favicon-16x16.png +0 -0
  126. package/dist/spa/icons/favicon-32x32.png +0 -0
  127. package/dist/spa/icons/favicon-96x96.png +0 -0
  128. package/dist/spa/index.html +0 -3
@@ -0,0 +1,111 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ tabs: {
4
+ type: Array,
5
+ required: true,
6
+ },
7
+ align: { type: String, default: 'justify' },
8
+ })
9
+
10
+ const selectedTab = defineModel({
11
+ required: true,
12
+ type: [Boolean, String, Number],
13
+ })
14
+ </script>
15
+
16
+ <template>
17
+ <q-tabs
18
+ v-model="selectedTab"
19
+ :dense="true"
20
+ active-color="primary"
21
+ indicator-color="primary"
22
+ outside-arrows
23
+ inline-label
24
+ mobile-arrows
25
+ :align="align"
26
+ no-caps
27
+ class="u-tabs-std text-caption-md"
28
+ >
29
+ <template v-for="tab in tabs" :key="tab.name">
30
+ <q-tab
31
+ :aria-label="tab.label"
32
+ v-if="!tab.route"
33
+ :name="tab.name"
34
+ :ripple="false"
35
+ :disable="tab.disable"
36
+ >
37
+ <template v-slot:default>
38
+ <q-icon
39
+ :aria-label="tab.label"
40
+ :alt="tab.label"
41
+ v-if="tab.leftIcon"
42
+ :class="`left-icon ${tab.leftIcon}`"
43
+ />
44
+ <p class="q-ma-none">{{ tab.label }}</p>
45
+ <q-icon
46
+ :aria-label="tab.label"
47
+ :alt="tab.label"
48
+ v-if="tab.rightIcon"
49
+ :class="`right-icon ${tab.rightIcon}`"
50
+ />
51
+ </template>
52
+ </q-tab>
53
+ <q-route-tab
54
+ v-else
55
+ :name="tab.name"
56
+ :ripple="false"
57
+ :to="`${tab.route}`"
58
+ exact
59
+ :aria-label="tab.label"
60
+ :disable="tab.disable"
61
+ >
62
+ <template v-slot:default>
63
+ <q-icon
64
+ :aria-label="tab.label"
65
+ :alt="tab.label"
66
+ v-if="tab.leftIcon"
67
+ :class="`left-icon ${tab.leftIcon}`"
68
+ />
69
+ <p class="q-ma-none">{{ tab.label }}</p>
70
+ <q-icon
71
+ :aria-label="tab.label"
72
+ :alt="tab.label"
73
+ v-if="tab.rightIcon"
74
+ :class="`right-icon ${tab.rightIcon}`"
75
+ />
76
+ </template>
77
+ </q-route-tab>
78
+ </template>
79
+ </q-tabs>
80
+ </template>
81
+
82
+ <style lang="sass">
83
+ .u-tabs-std
84
+ color: $dark
85
+ font-weight: 500
86
+
87
+ & .q-tab__content
88
+ & .q-icon
89
+ width: $ms
90
+ height: $ms
91
+ font-size: $ms
92
+
93
+ & .left-icon
94
+ margin-right: 0.45rem
95
+
96
+ .right-icon
97
+ width: $ms
98
+ height: $ms
99
+ font-size: $ms
100
+ margin-left: 0.45rem
101
+
102
+ .q-tab--inactive, .q-tab--active
103
+ min-width: 5.5rem
104
+
105
+ .q-tab--inactive
106
+ border-bottom: 2px solid $neutral-3
107
+ opacity: 1
108
+
109
+ .q-tab--inactive:hover
110
+ color: $primary
111
+ </style>
@@ -0,0 +1,159 @@
1
+ <script setup>
2
+ import { onMounted, watch } from 'vue'
3
+
4
+ const props = defineProps({
5
+ name: {
6
+ type: String,
7
+ default: 'toggle',
8
+ },
9
+ disabled: {
10
+ type: Boolean,
11
+ default: false,
12
+ },
13
+ label: {
14
+ type: String,
15
+ default: '',
16
+ },
17
+ id: {
18
+ type: [String, Number],
19
+ default: 'u-toggle',
20
+ required: true, // it is required for to match accessibility crieteria
21
+ },
22
+ checkedIcon: {
23
+ type: String,
24
+ default: '',
25
+ },
26
+ unCheckedIcon: {
27
+ type: String,
28
+ default: '',
29
+ },
30
+ })
31
+
32
+ const toggle = defineModel({ default: false, type: Boolean })
33
+
34
+ /**
35
+ * adding icons as a child of toggle thumb to keep icons in center
36
+ */
37
+ const updateIconPosition = () => {
38
+ setTimeout(() => {
39
+ const thumbElement = document.getElementsByClassName('q-toggle__thumb')
40
+ const leftIconElement = document.getElementById(
41
+ `u-toggle-left-icon-${props.name}`
42
+ )
43
+ const rightIconElement = document.getElementById(
44
+ `u-toggle-right-icon-${props.name}`
45
+ )
46
+ if (thumbElement.length > 0) {
47
+ Array.from(thumbElement).forEach((element) => {
48
+ if (leftIconElement && element.id === props.id) {
49
+ leftIconElement.style.display = 'block'
50
+ element.appendChild(leftIconElement)
51
+ }
52
+ if (rightIconElement && element.id === props.id) {
53
+ rightIconElement.style.display = 'block'
54
+ element.appendChild(rightIconElement)
55
+ }
56
+ })
57
+ }
58
+ }, 100)
59
+ }
60
+
61
+ /**
62
+ * adding the label to corresponding toggle input to match the accessibility
63
+ */
64
+ onMounted(() => {
65
+ const toggleElement = document.getElementById(`u-toggle-${props.id}`)
66
+ if (toggleElement) {
67
+ const inputElement = toggleElement.querySelector('input')
68
+ const thumbElement = toggleElement.getElementsByClassName('q-toggle__thumb')
69
+ thumbElement[0].id = `${props.id}`
70
+ if (inputElement) {
71
+ inputElement.id = `u-toggle-${props.id}`
72
+ }
73
+ }
74
+ updateIconPosition()
75
+ })
76
+
77
+ watch(toggle, () => {
78
+ updateIconPosition()
79
+ })
80
+ </script>
81
+
82
+ <template>
83
+ <label class="hidden" :for="`u-toggle-${id}`">{{ label }}</label>
84
+ <q-toggle
85
+ :id="`u-toggle-${id}`"
86
+ v-model="toggle"
87
+ :name="name"
88
+ color="primary"
89
+ class="u-toggle"
90
+ :disable="disabled"
91
+ v-bind="$attrs"
92
+ >
93
+ <template v-slot:default>
94
+ <q-icon
95
+ v-if="checkedIcon && toggle"
96
+ :id="`u-toggle-right-icon-${name}`"
97
+ :class="`${checkedIcon} u-checked-icon`"
98
+ :aria-label="`${name ? name : ''} checked toggle icon`"
99
+ >
100
+ </q-icon>
101
+ <q-icon
102
+ v-if="unCheckedIcon && !toggle"
103
+ :id="`u-toggle-left-icon-${name}`"
104
+ :class="`${unCheckedIcon} u-unchecked-icon`"
105
+ :aria-label="`${name ? name : ''} unchecked toggle icon`"
106
+ >
107
+ </q-icon>
108
+ </template>
109
+ </q-toggle>
110
+ </template>
111
+
112
+ <style lang="sass">
113
+ .u-toggle
114
+ .q-toggle__inner
115
+ padding: 0
116
+
117
+ .q-toggle__label
118
+ q-label
119
+ position: absolute
120
+ bottom: 1.8rem
121
+ left: 4.8rem
122
+
123
+ .u-checked-icon
124
+ color: $primary !important
125
+ font-size: 1rem
126
+ display: none
127
+
128
+ .u-unchecked-icon
129
+ font-size: 1rem
130
+ color: $description !important
131
+ display: none
132
+
133
+ .q-toggle__inner--truthy
134
+ .q-toggle__track
135
+ background: $primary
136
+ opacity: 1
137
+
138
+ .q-toggle__thumb:after
139
+ background: $neutral-1
140
+
141
+ .q-toggle__track
142
+ height: $md
143
+ border-radius: 1.175em
144
+ width: 3.5rem
145
+ padding: $xxs
146
+ background: $neutral-4
147
+
148
+ .q-toggle__thumb
149
+ top: 0.26rem
150
+ left: 0.27rem
151
+ width: $ms
152
+ height: $ms
153
+
154
+ .q-toggle__inner--truthy
155
+ .q-toggle__thumb
156
+ left: 1.72rem
157
+ width: $ms
158
+ height: $ms
159
+ </style>
@@ -0,0 +1,94 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+ import UBtnIcon from './UBtnIcon.vue'
4
+ import UBtnStd from './UBtnStd.vue';
5
+
6
+
7
+ const emit = defineEmits(['navigateBack'])
8
+ const props = defineProps({
9
+ isMiniState: {
10
+ type: Boolean,
11
+ required: true,
12
+ },
13
+ title: {
14
+ type: String,
15
+ required: true,
16
+ },
17
+ isSubPage: {
18
+ type: Boolean,
19
+ required: true,
20
+ },
21
+ })
22
+
23
+ // Computed property for the title text
24
+ const pageTitle = computed(() => {
25
+ return props.isSubPage ? `Back to ${props.title} ` : props.title
26
+ })
27
+
28
+ // Function to handle the back navigation
29
+ const handleClick = () => {
30
+ emit('navigateBack')
31
+ }
32
+ </script>
33
+
34
+ <template>
35
+ <q-toolbar class="u-header-toolbar-container">
36
+ <!-- Expand icon to open sidebar or drawer-->
37
+ <UBtnIcon
38
+ v-if="isMiniState"
39
+ ariaLabel="Sidebar expand icon"
40
+ color="primary"
41
+ class="q-ml-xxs"
42
+ iconClass="fa-kit-duotone fa-sidebar-shrink"
43
+ size="md"
44
+ />
45
+
46
+ <section class="fit row justify-between items-center q-mx-ms">
47
+ <!-- Title container with dynamic title and optional back button -->
48
+ <UBtnStd
49
+ v-if="isSubPage"
50
+ :aria-label="pageTitle"
51
+ class="back_to_button"
52
+ color="primary"
53
+ :flat="true"
54
+ :label="pageTitle"
55
+ left-icon="fa-kit-duotone fa-circle-arrow-left"
56
+ @click="handleClick"
57
+ />
58
+ <span v-else class="q-my-none text-heading-sm">{{ pageTitle }}</span>
59
+
60
+ <!-- Action element container -->
61
+ <div class="u-header-toolbar-action-container">
62
+ <slot name="right_section"/>
63
+ </div>
64
+ </section>
65
+ </q-toolbar>
66
+ </template>
67
+
68
+ <style lang="sass">
69
+ .u-header-toolbar-container
70
+ background-color: white
71
+ width: 100%
72
+ padding: 0px
73
+ display: flex
74
+ align-items: center
75
+ align-self: stretch
76
+ padding: $sm 0
77
+
78
+ .u-header-toolbar-inner-container
79
+ width: 100%
80
+
81
+ .u-header-toolbar-title-container
82
+ display: flex
83
+ align-items: center
84
+ gap: $xs
85
+
86
+ .u-header-toolbar-action-container
87
+ display: flex
88
+ align-items: center
89
+ gap: $sm
90
+
91
+ .back_to_button
92
+ .button-label
93
+ color: $dark !important
94
+ </style>
@@ -0,0 +1,73 @@
1
+ <script setup>
2
+ import { computed, useSlots } from 'vue'
3
+
4
+ const props = defineProps({
5
+ icon: {
6
+ type: String,
7
+ },
8
+ description: {
9
+ type: String,
10
+ required: true,
11
+ },
12
+ anchor: {
13
+ type: String,
14
+ },
15
+ self: {
16
+ type: String,
17
+ },
18
+ offset: {
19
+ type: Array,
20
+ },
21
+ target: {
22
+ type: String,
23
+ default: '',
24
+ },
25
+ })
26
+
27
+ const slots = useSlots()
28
+
29
+ /**
30
+ * checking if string contains only white spaces
31
+ */
32
+ const getTooltipText = computed(() => {
33
+ if (!props.description.replace(/\s/g, '')) {
34
+ return null
35
+ } else {
36
+ return props.description
37
+ }
38
+ })
39
+ </script>
40
+
41
+ <template>
42
+ <q-tooltip
43
+ v-if="getTooltipText || slots.item"
44
+ v-bind="$attrs"
45
+ class="u-tooltip shadow-2 bg-dark row"
46
+ :anchor="anchor"
47
+ :offset="offset"
48
+ :self="self"
49
+ :target="target"
50
+ >
51
+ <div class="row no-wrap tooltip-content">
52
+ <div v-if="icon" class="flex items-center">
53
+ <q-icon :class="icon" size="1rem"></q-icon>
54
+ </div>
55
+ <div class="text-body-xs tooltip-text">{{ getTooltipText }}</div>
56
+ <slot name="item" />
57
+ </div>
58
+ </q-tooltip>
59
+ </template>
60
+
61
+ <style lang="sass">
62
+ .u-tooltip
63
+ border-radius: $xs
64
+ padding: $xs $sm
65
+ max-width: 22.5rem !important
66
+
67
+ .tooltip-text
68
+ color: $neutral-1
69
+ word-wrap: break-word
70
+
71
+ .tooltip-content
72
+ gap: $xxs
73
+ </style>