@usssa/component-library 1.0.0-alpha.13 → 1.0.0-alpha.131

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 (55) hide show
  1. package/README.md +6 -3
  2. package/package.json +23 -5
  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/core/UAvatar.vue +56 -24
  8. package/src/components/core/UAvatarGroup.vue +62 -52
  9. package/src/components/core/UBadgeStd.vue +6 -1
  10. package/src/components/core/UBannerStd.vue +100 -33
  11. package/src/components/core/UBreadCrumbs.vue +93 -0
  12. package/src/components/core/UBtnIcon.vue +60 -48
  13. package/src/components/core/UBtnStd.vue +54 -42
  14. package/src/components/core/UBtnToggle.vue +11 -6
  15. package/src/components/core/UCheckboxStd.vue +26 -20
  16. package/src/components/core/UChip.vue +56 -27
  17. package/src/components/core/UDate.vue +574 -0
  18. package/src/components/core/UDialogStd.vue +87 -40
  19. package/src/components/core/UDrawer.vue +240 -0
  20. package/src/components/core/UInnerLoader.vue +67 -0
  21. package/src/components/core/UInputAddressLookup.vue +471 -0
  22. package/src/components/core/UInputPhoneStd.vue +73 -68
  23. package/src/components/core/UInputTextStd.vue +132 -108
  24. package/src/components/core/UInputTypeaheadAdvanceSearch.vue +64 -0
  25. package/src/components/core/UMenuButtonStd.vue +280 -0
  26. package/src/components/core/UMenuDropdown.vue +80 -0
  27. package/src/components/core/UMenuDropdownAdvancedSearch.vue +288 -0
  28. package/src/components/core/UMenuItem.vue +150 -0
  29. package/src/components/core/UMenuSearch.vue +831 -0
  30. package/src/components/core/UMultiSelectStd.vue +73 -57
  31. package/src/components/core/UPagination.vue +46 -24
  32. package/src/components/core/URadioBtn.vue +32 -22
  33. package/src/components/core/URadioStd.vue +19 -12
  34. package/src/components/core/USelectStd.vue +125 -80
  35. package/src/components/core/USheet.vue +338 -0
  36. package/src/components/core/UTabBtnStd.vue +87 -59
  37. package/src/components/core/UTable/UTable.vue +75 -41
  38. package/src/components/core/UTableStd.vue +701 -281
  39. package/src/components/core/UTabsStd.vue +33 -16
  40. package/src/components/core/UToggleStd.vue +43 -29
  41. package/src/components/core/UToolbar/UCustomMenuIcon.vue +60 -0
  42. package/src/components/core/UToolbar/UToolbar.vue +206 -0
  43. package/src/components/core/UTooltip.vue +31 -10
  44. package/src/components/core/UUploader.vue +508 -0
  45. package/src/components/index.js +59 -21
  46. package/src/composables/useNotify.js +16 -16
  47. package/src/composables/useOverlayLoader.js +23 -0
  48. package/src/composables/useScreenType.js +30 -0
  49. package/src/css/app.sass +168 -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 +127 -0
  55. package/src/utils/data.ts +146 -0
@@ -0,0 +1,30 @@
1
+ import { computed, ref, watch } from 'vue'
2
+ import { useQuasar } from 'quasar'
3
+
4
+ export const useScreenType = () => {
5
+ const $q = useQuasar()
6
+
7
+ const getScreenType = () => {
8
+ if ($q.screen.xs) return 'mobile' // Extra small screens (phones)
9
+ if ($q.screen.sm) return 'tablet' // Small screens (tablets)
10
+ return 'desktop' // Default is desktop
11
+ }
12
+
13
+ const screenType = ref(getScreenType())
14
+
15
+ const screen = computed(() => ({
16
+ isDesktop: screenType.value === 'desktop',
17
+ isMobile: screenType.value === 'mobile',
18
+ isTablet: screenType.value === 'tablet',
19
+ }))
20
+
21
+ // Watch for Quasar's screen changes and update `screenType`
22
+ watch(
23
+ () => $q.screen.name,
24
+ () => {
25
+ screenType.value = getScreenType()
26
+ }
27
+ )
28
+
29
+ return screen
30
+ }
@@ -0,0 +1,168 @@
1
+ @import './vars/colors.variables'
2
+ @import './colors'
3
+ @import './typography'
4
+ @import 'flag-icons/css/flag-icons.min'
5
+
6
+ // @import './media'
7
+
8
+ *
9
+ font-family: 'neue-haas-grotesk-text', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'
10
+
11
+ //FOCUS CLASSES
12
+
13
+ .focus-primary
14
+ &:focus
15
+ box-shadow: 0 0 0 2px rgba(35, 75, 169, .20)
16
+
17
+ .focus-positive
18
+ &:focus
19
+ box-shadow: 0 0 0 2px rgba(36, 133, 96, .20)
20
+
21
+ .focus-warning
22
+ &:focus
23
+ box-shadow: 0 0 0 2px rgba(254, 78, 17, .20)
24
+
25
+ .focus-accent
26
+ &:focus
27
+ box-shadow: 0 0 0 2px rgba(203, 42, 61, .20)
28
+
29
+ .focus-info
30
+ &:focus
31
+ box-shadow: 0 0 0 2px rgba(92, 74, 184, .20)
32
+
33
+ .focus-neutral
34
+ &:focus
35
+ box-shadow: 0 0 0 2px rgba(220, 225, 233, .20)
36
+
37
+ //Shadow CLASSES
38
+
39
+ .shadow-1
40
+ box-shadow: 0px 0px 4px 0px rgba(16, 17, 20, 0.08)
41
+
42
+ .shadow-2
43
+ box-shadow: 0px 0px 8px 0px rgba(16, 17, 20, 0.12)
44
+
45
+ .shadow-3
46
+ box-shadow: 0px 12px 12px 0px rgba(16, 17, 20, 0.16)
47
+
48
+ .shadow-4
49
+ box-shadow: 0px 0px 16px 0px rgba(16, 17, 20, 0.20)
50
+
51
+ .shadow-down-1
52
+ box-shadow: 0px 2px 2px 0px rgba(16, 17, 20, 0.04)
53
+
54
+ .shadow-down-2
55
+ box-shadow: 0px 4px 4px 0px rgba(16, 17, 20, 0.08)
56
+
57
+ .shadow-down-3
58
+ box-shadow: 0px 8px 8px 0px rgba(16, 17, 20, 0.12)
59
+
60
+ .shadow-down-4
61
+ box-shadow: 0px 12px 12px 0px rgba(16, 17, 20, 0.16)
62
+
63
+ .shadow-up-1
64
+ box-shadow: 0px -2px 2px 0px rgba(16, 17, 20, 0.04)
65
+
66
+ .shadow-up-2
67
+ box-shadow: 0px -4px 4px 0px rgba(16, 17, 20, 0.08)
68
+
69
+ .shadow-up-3
70
+ box-shadow: 0px -8px 8px 0px rgba(16, 17, 20, 0.12)
71
+
72
+ .shadow-up-4
73
+ box-shadow: 0px -12px 12px 0px rgba(16, 17, 20, 0.16)
74
+
75
+
76
+ // NOTIFY Custom CLASSES
77
+
78
+ .u-notify
79
+ width: 25.25rem
80
+ min-height: $xxl
81
+ border-radius: $xs
82
+ padding: $sm $sm $xs $sm
83
+ box-shadow: 0px 0px 8px 0px rgba(16, 17, 20, 0.12)
84
+
85
+ .q-notification__actions
86
+ padding: 0rem 0.5rem
87
+
88
+ .q-notification__progress
89
+ width: 25.25rem
90
+ bottom: -0.5rem
91
+ border-radius: 0rem 0.25rem
92
+ height: 0.25rem
93
+
94
+ .q-notification__content
95
+ .q-icon
96
+ margin-right: $xs
97
+
98
+ .q-notification__message
99
+ padding: 0rem
100
+ > div:first-child
101
+ font-size: 0.875rem
102
+ font-weight: 500
103
+ line-height: 1.25rem
104
+ letter-spacing: 0.03333rem
105
+ overflow-wrap: break-word
106
+
107
+ .q-notification__caption
108
+ font-size: 0.75rem
109
+ font-weight: 400
110
+ line-height: 1.25rem
111
+ letter-spacing: 0.01786rem
112
+ overflow-wrap: break-word
113
+
114
+ .u-notify-action-button
115
+ height: $lg
116
+ min-width: 5.5rem
117
+ max-width: 6.5rem
118
+ padding: 0rem $ba
119
+ border-radius: $xs
120
+ overflow-wrap: break-word
121
+ .block
122
+ white-space: nowrap
123
+ width: 6.5rem
124
+ overflow: hidden
125
+ text-overflow: ellipsis
126
+
127
+ .u-notify-action-icon
128
+ background: transparent !important
129
+
130
+ .u-action-icon-positive
131
+ .q-icon
132
+ color: $positive
133
+ .u-action-icon-info
134
+ .q-icon
135
+ color: $info
136
+ .u-action-icon-warning
137
+ .q-icon
138
+ color: $warning
139
+ .u-action-icon-accent
140
+ .q-icon
141
+ color: $accent
142
+
143
+ .u-type-positive
144
+ background: $green-2 !important
145
+ color: $green-7 !important
146
+ .q-btn
147
+ background: $positive
148
+
149
+ .u-type-info
150
+ background: $purple-1 !important
151
+ color: $purple-7 !important
152
+ .q-btn
153
+ background: $info
154
+
155
+ .u-type-warning
156
+ background: $orange-1 !important
157
+ color: $orange-7 !important
158
+ .q-btn
159
+ background: $warning
160
+
161
+ .u-type-accent
162
+ background: $red-1 !important
163
+ color: $red-7 !important
164
+ .q-btn
165
+ background: $accent
166
+
167
+ .icon-secondary-opacity
168
+ --fa-secondary-opacity: 0.20
@@ -0,0 +1,101 @@
1
+
2
+ // GOLD TEXT
3
+ .text-gold-1
4
+ color: $gold-1 !important
5
+ .text-gold-2
6
+ color: $gold-2 !important
7
+ .text-gold-3
8
+ color: $gold-3 !important
9
+ .text-gold-4
10
+ color: $gold-4 !important
11
+ .text-gold-5
12
+ color: $gold-5 !important
13
+ .text-gold-6
14
+ color: $gold-6 !important
15
+ .text-gold-7
16
+ color: $gold-7 !important
17
+ .text-gold-8
18
+ color: $gold-8 !important
19
+ .text-gold-9
20
+ color: $gold-9 !important
21
+
22
+ // GOLD BACKGROUND
23
+ .bg-gold-1
24
+ background-color: $gold-1 !important
25
+ .bg-gold-2
26
+ background-color: $gold-2 !important
27
+ .bg-gold-3
28
+ background-color: $gold-3 !important
29
+ .bg-gold-4
30
+ background-color: $gold-4 !important
31
+ .bg-gold-5
32
+ background-color: $gold-5 !important
33
+ .bg-gold-6
34
+ background-color: $gold-6 !important
35
+ .bg-gold-7
36
+ background-color: $gold-7 !important
37
+ .bg-gold-8
38
+ background-color: $gold-8 !important
39
+ .bg-gold-9
40
+ background-color: $gold-9 !important
41
+
42
+
43
+ // NEUTRAL TEXT
44
+ .text-neutral-1
45
+ color: $neutral-1 !important
46
+ .text-neutral-2
47
+ color: $neutral-2 !important
48
+ .text-neutral-3
49
+ color: $neutral-3 !important
50
+ .text-neutral-4
51
+ color: $neutral-4 !important
52
+ .text-neutral-5
53
+ color: $neutral-5 !important
54
+ .text-neutral-6
55
+ color: $neutral-6 !important
56
+ .text-neutral-7
57
+ color: $neutral-7 !important
58
+ .text-neutral-8
59
+ color: $neutral-8 !important
60
+ .text-neutral-9
61
+ color: $neutral-9 !important
62
+
63
+ // RED TEXT
64
+ .text-red-5
65
+ color: $red-5 !important
66
+
67
+ // NEUTRAL BACKGROUND
68
+ .bg-neutral-1
69
+ background-color: $neutral-1 !important
70
+ .bg-neutral-2
71
+ background-color: $neutral-2 !important
72
+ .bg-neutral-3
73
+ background-color: $neutral-3 !important
74
+ .bg-neutral-4
75
+ background-color: $neutral-4 !important
76
+ .bg-neutral-5
77
+ background-color: $neutral-5 !important
78
+ .bg-neutral-6
79
+ background-color: $neutral-6 !important
80
+ .bg-neutral-7
81
+ background-color: $neutral-7 !important
82
+ .bg-neutral-8
83
+ background-color: $neutral-8 !important
84
+ .bg-neutral-9
85
+ background-color: $neutral-9 !important
86
+
87
+ //BLUE BACKGROUND
88
+ .bg-blue-1
89
+ background-color: $blue-1 !important
90
+
91
+
92
+ //USSSA Description content color
93
+ .text-description
94
+ color: $description
95
+
96
+ .bg-description
97
+ background-color: $description
98
+
99
+ //USSSA Surface background color
100
+ .bg-surface-bg-1
101
+ background-color: $surface-bg-1
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,121 @@
1
+ // Quasar Sass (& SCSS) Variables
2
+ // --------------------------------------------------
3
+ // To customize the look and feel of this app, you can override
4
+ // the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
5
+
6
+ // Check documentation for full list of Quasar variables
7
+
8
+ // Your own variables (that are declared here) and Quasar's own
9
+ // ones will be available out of the box in your .vue/.scss/.sass files
10
+
11
+ // It's highly recommended to change the default colors
12
+ // to match your app's branding.
13
+ // Tip: Use the "Theme Builder" on Quasar's documentation website.
14
+
15
+ @import 'vars/colors.variables'
16
+ $primary : #234BA9
17
+ $secondary : #143066
18
+ $accent : #CB2A3D
19
+
20
+ $dark : #101114
21
+ $dark-page : #121212
22
+
23
+ $positive : #248560
24
+ $negative : #CB2A3D
25
+ $info : #5C4AB8
26
+ $warning : #D33809
27
+
28
+ // USSSA TYPOGRAPHY RESET
29
+ $h1: (size: 4.063rem, line-height: 5.079rem, letter-spacing: .35px, weight: 700) !default
30
+ $h2: (size: 2.5rem, line-height: 3.125rem, letter-spacing: .35px, weight: 700) !default
31
+ $h3: (size: 1.5rem, line-height: 1.875rem, letter-spacing: .35px, weight: 700) !default
32
+ $h4: (size: 1.25rem, line-height: 1.563rem, letter-spacing: .35px, weight: 700) !default
33
+
34
+ // QUASAR DEFAULTS
35
+ $h5: (size: 1.5rem, line-height: 2rem, letter-spacing: normal, weight: 700) !default
36
+ $h6: (size: 1.25rem, line-height: 2rem, letter-spacing: .0125em, weight: 700) !default
37
+
38
+ // USSSA CUSTOM
39
+ $h1-md: (size: 3.00rem , line-height: 3.75rem, letter-spacing: .35px, weight: bold) !default
40
+ $h1-sm: (size: 2.50rem , line-height: 3.44rem, letter-spacing: .35px, weight: bold) !default
41
+
42
+ $h2-md: (size: 2.25rem , line-height: 2.813rem, letter-spacing: .35px, weight: bold) !default
43
+ $h2-sm: (size: 2.00rem , line-height: 2.50rem, letter-spacing: .35px, weight: bold) !default
44
+
45
+ $h3-md: (size: 1.375rem , line-height: 1.719rem, letter-spacing: .35px, weight: bold) !default
46
+ $h3-sm: (size: 1.250rem , line-height: 1.563rem, letter-spacing: .35px, weight: bold) !default
47
+
48
+ $h4-md: (size: 1.125rem , line-height: 1.406rem, letter-spacing: .35px, weight: bold) !default
49
+ $h4-sm: (size: 1.00rem , line-height: 1.25rem, letter-spacing: .35px, weight: bold) !default
50
+
51
+
52
+ // DESKTOP
53
+ $caption-lg: (size: 1rem, line-height: 1.25rem, letter-spacing: .03333rem, weight: 500) !default
54
+ $caption-md: (size: 0.875rem, line-height: 1.25rem, letter-spacing: .03333rem, weight: 500) !default
55
+ $caption-sm: (size: 0.75rem, line-height: 1.25rem, letter-spacing: .03333rem, weight: 500) !default
56
+ $caption-xs: (size: 0.688rem, line-height: 1.25rem, letter-spacing: .03333rem, weight: 500) !default
57
+
58
+ $body-xl: (size: 1.25rem, line-height: 2.5rem, letter-spacing: .03215rem, weight: 400) !default
59
+ $body-lg: (size: 1.125rem, line-height: 1.75rem, letter-spacing: .03215rem, weight: 400) !default
60
+ $body-md: (size: 1.00rem, line-height: 1.5rem, letter-spacing: .01786rem, weight: 400) !default
61
+ $body-sm: (size: 0.875rem, line-height: 1.5rem, letter-spacing: .01786rem, weight: 400) !default
62
+ $body-xs: (size: 0.75rem, line-height: 1.25rem, letter-spacing: .01786rem, weight: 400) !default
63
+ $body-xxs: (size: 0.688rem, line-height: 1.25rem, letter-spacing: .01786rem, weight: 400) !default
64
+
65
+ $overline-lg: (size: 1.00rem, line-height: 1.50rem, letter-spacing: .53px, weight: 500) !default
66
+ $overline-md: (size: 0.875rem, line-height: 2rem, letter-spacing: .53px, weight: 500) !default
67
+ $overline-sm: (size: 0.75rem, line-height: 2rem, letter-spacing: .53px, weight: 500) !default
68
+ $overline-xs: (size: 0.688rem, line-height: 2rem, letter-spacing: .53px, weight: 500) !default
69
+
70
+ $heading-xxxl: (size: 3rem, line-height: 3.75rem, letter-spacing: -0.0156rem, weight: 700) !default
71
+ $heading-xxl: (size: 2.5rem, line-height: 3.125rem, letter-spacing: 0rem, weight: 700) !default
72
+ $heading-xl: (size: 2.0rem, line-height: 2.5rem, letter-spacing: 0rem, weight: 700) !default
73
+ $heading-lg: (size: 1.75rem, line-height: 2.188rem, letter-spacing: .00714rem, weight: 700) !default
74
+ $heading-md: (size: 1.5rem, line-height: 1.875rem, letter-spacing: .00714rem, weight: 700) !default
75
+ $heading-sm: (size: 1.25rem, line-height: 2rem, letter-spacing: 0rem, weight: 700) !default
76
+ $heading-xs: (size: 1.125rem, line-height: 1.406rem, letter-spacing: .0125rem, weight: 700) !default
77
+ $heading-xxs: (size: 1.0rem, line-height: 1.5rem, letter-spacing: .0125rem, weight: 700) !default
78
+
79
+ // VARIABLE ASSIGNMENT
80
+ $headings: ('h1': $h1, 'h1-md': $h1-md, 'h1-sm': $h1-sm, 'h2': $h2, 'h2-md': $h2-md, 'h2-sm': $h2-sm, 'h3': $h3, 'h3-md': $h3-md, 'h3-sm': $h3-sm, 'h4': $h4, 'h4-md': $h4-md, 'h4-sm': $h4-sm, 'h5': $h5, 'h6': $h6, 'body-xl': $body-xl, 'body-lg': $body-lg, 'body-md': $body-md, 'body-sm': $body-sm, 'body-xs': $body-xs, 'body-xxs': $body-xxs, 'overline-lg': $overline-lg, 'overline-md': $overline-md, 'overline-sm': $overline-sm,'overline-xs': $overline-xs, 'caption-lg': $caption-lg, 'caption-md': $caption-md, 'caption-sm': $caption-sm, 'caption-xs': $caption-xs, 'heading-xxxl': $heading-xxxl, 'heading-xxl':$heading-xxl,'heading-xl':$heading-xl,'heading-lg':$heading-lg,'heading-md':$heading-md,'heading-sm':$heading-sm,'heading-xs':$heading-xs,'heading-xxs': $heading-xxs) !default
81
+
82
+ // SPACING BASE
83
+ $space-base : 1rem !default
84
+ $space-x-base : $space-base !default
85
+ $space-y-base : $space-base !default
86
+
87
+ // SPACING SINGLE VARIABLES
88
+ $xxs : $space-base * .25 !default
89
+ $xs : $space-base * .5 !default
90
+ $sm : $space-base * .75 !default
91
+ $ms : $space-base * 1.5 !default
92
+ $ba : $space-base * 1 !default
93
+ $md : $space-base * 2 !default
94
+ $lg : $space-base * 2.5 !default
95
+ $xl : $space-base * 3 !default
96
+ $xxl : $space-base * 3.375 !default
97
+
98
+ // SPACING VARIABLES FOR QUASAR SPACING UTILITY CLASSES
99
+ $space-none : (x: 0, y: 0) !default
100
+ $space-xxs : (x: ($space-x-base * .25), y: ($space-y-base * .25)) !default
101
+ $space-xs : (x: ($space-x-base * .5), y: ($space-y-base * .5)) !default
102
+ $space-sm : (x: ($space-x-base * .75), y: ($space-y-base * .75)) !default
103
+ $space-ms : (x: ($space-x-base * 1.5), y: ($space-y-base * 1.5)) !default
104
+ $space-ba : (x: ($space-x-base * 1), y: ($space-y-base * 1)) !default
105
+ $space-md : (x: $space-x-base * 2, y: $space-y-base * 2) !default
106
+ $space-lg : (x: ($space-x-base * 2.5), y: ($space-y-base * 2.5)) !default
107
+ $space-xl : (x: ($space-x-base * 3), y: ($space-y-base * 3)) !default
108
+ $space-xxl : (x: ($space-x-base * 3.375), y: ($space-y-base * 3.375)) !default
109
+
110
+ $spaces: ('none': $space-none, 'xxs': $space-xxs, 'xs': $space-xs, 'sm': $space-sm, 'ms': $space-ms, 'ba': $space-ba, 'md': $space-md, 'lg': $space-lg, 'xl': $space-xl, 'xxl': $space-xxl) !default
111
+
112
+ //Shadow variables
113
+
114
+ $shadow-inner: 0px 0px 1px 1px rgb(16, 17, 20, .12) inset
115
+ $shadow-skeumorphic-primary: 0px 1px 0.4px 0px rgba(136, 136, 138, 0.40) inset, 0px -1px 0.4px 0px rgba(16, 17, 20, 0.40) inset, 0px 4px 10px 0px rgba(16,17,20,0.00), 0px 0px 0px 1px rgb(35,75,169)
116
+ $stroke-skeuomorphic: 1px solid rgba(255, 255, 255, 0.12)
117
+ $shadow-2: 0px 0px 8px 0px rgba(16, 17, 20, 0.12)
118
+ $accent-bg-hover: rgba(203, 42, 61, 0.15)
119
+ $surface-bg-link-hover :rgba(16, 17, 20, .5)
120
+ $border-radius-sm: .75rem
121
+ $border-radius-xs: .5rem
File without changes
@@ -0,0 +1,127 @@
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
11
+
12
+ // USSSA GOLD
13
+ $gold-1: #FBF6EE !default
14
+ $gold-2: #EEEAD3 !default
15
+ $gold-3: #DED5AA !default
16
+ $gold-4: #C5B16A !default
17
+ $gold-5: #AC8D46 !default
18
+ $gold-6: #93723B !default
19
+ $gold-7: #775631 !default
20
+ $gold-8: #64482F !default
21
+ $gold-9: #312017 !default
22
+
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
33
+
34
+ // USSSA NEUTRAL
35
+ $neutral-1: #FFFFFF !default
36
+ $neutral-2: #F5F7F9 !default
37
+ $neutral-3: #EBEFF3 !default
38
+ $neutral-4: #DCE1E9 !default
39
+ $neutral-5: #CFD5E1 !default
40
+ $neutral-6: #C2CAD9 !default
41
+ $neutral-7: #929CB0 !default
42
+ $neutral-8: #7D89A1 !default
43
+ $neutral-9: #566176 !default
44
+ $neutral-10: #3D4452 !default
45
+ $neutral-11: #2E333D !default
46
+ $neutral-12: #202328 !default
47
+ $neutral-13: #101114 !default
48
+
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
59
+
60
+ // USSSA PINK
61
+ $pink-1: #FAE0F4 !default
62
+ $pink-2: #EA99D8 !default
63
+ $pink-3: #E067C6 !default
64
+ $pink-4: #D945B9 !default
65
+ $pink-5: #CB2AA8 !default
66
+ $pink-6: #A9238C !default
67
+ $pink-7: #771862 !default
68
+ $pink-8: #661454 !default
69
+ $pink-9: #440D38 !default
70
+
71
+ // USSSA PURPLE
72
+ $purple-1: #F0F2FD !default
73
+ $purple-2: #CED3F7 !default
74
+ $purple-3: #B0B6F1 !default
75
+ $purple-4: #7B75DF !default
76
+ $purple-5: #6B5AD1 !default
77
+ $purple-6: #5C4AB8 !default
78
+ $purple-7: #4B3F94 !default
79
+ $purple-8: #403877 !default
80
+ $purple-9: #262145 !default
81
+
82
+ // USSSA RED
83
+ $red-1: #FEF2F2 !default
84
+ $red-2: #FCCCCE !default
85
+ $red-3: #F9A8AB !default
86
+ $red-4: #E94A50 !default
87
+ $red-5: #CB2A3D !default
88
+ $red-6: #B42126 !default
89
+ $red-7: #951F23 !default
90
+ $red-8: #7C2023 !default
91
+ $red-9: #430C0E !default
92
+
93
+ // USSSA TEAL
94
+ $teal-1: #CCEDF5 !default
95
+ $teal-2: #99DBEA !default
96
+ $teal-3: #67CAE0 !default
97
+ $teal-4: #45BED9 !default
98
+ $teal-5: #2AAECB !default
99
+ $teal-6: #2390A9 !default
100
+ $teal-7: #186677 !default
101
+ $teal-8: #145766 !default
102
+ $teal-9: #0D3A44 !default
103
+
104
+ // USSSA YELLOW
105
+ $yellow-1: #FBF4D8 !default
106
+ $yellow-2: #FFF5CC !default
107
+ $yellow-3: #FBE589 !default
108
+ $yellow-4: #FCDE62 !default
109
+ $yellow-5: #F8D547 !default
110
+ $yellow-6: #EBC321 !default
111
+ $yellow-7: #D2AB0C !default
112
+ $yellow-8: #B49104 !default
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
127
+ $bg-blue-1: #E1E9F9
@@ -0,0 +1,146 @@
1
+ /**
2
+ * @description Format date
3
+ * @param {string} date
4
+ * @returns {string} - Returns Formatted Date
5
+ */
6
+
7
+ export const formatDate = (date) => {
8
+ return (
9
+ String(date.getDate()).padStart(2, '0') +
10
+ '/' +
11
+ (date.getMonth() + 1) +
12
+ '/' +
13
+ String(date.getFullYear()).slice(-2)
14
+ )
15
+ }
16
+
17
+ /**
18
+ * @description Return String with Fixed Length
19
+ * @param {string} string, length
20
+ * @returns {string} - Returns Return partial String
21
+ */
22
+ export const fixStringLength = (str, length) => {
23
+ if (str.length > length) {
24
+ return str.substring(0, length) + '....'
25
+ } else {
26
+ return str.padEnd(length, ' ')
27
+ }
28
+ }
29
+
30
+ /**
31
+ * @description Get File Category from MIME Types
32
+ * @param {string} str - Mime Type
33
+ * @returns {string} - Returns Category :- pdf, video, audio, doc etc.
34
+ **/
35
+ export const getFileCategory = (mimeType) => {
36
+ const mimeTypes = {
37
+ // Document MIME types
38
+ 'application/pdf': 'pdf',
39
+ 'application/msword': 'word',
40
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
41
+ 'doc',
42
+ 'text/plain': 'text',
43
+ 'application/vnd.ms-excel': 'excel',
44
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'doc',
45
+ 'application/vnd.ms-powerpoint': 'doc',
46
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
47
+ 'doc',
48
+
49
+ // Image MIME types
50
+ 'image/jpeg': 'image',
51
+ 'image/png': 'image',
52
+ 'image/gif': 'image',
53
+ 'image/bmp': 'image',
54
+ 'image/svg+xml': 'image',
55
+
56
+ // Video MIME types
57
+ 'video/mp4': 'video',
58
+ 'video/x-msvideo': 'video',
59
+ 'video/x-matroska': 'video',
60
+ 'video/quicktime': 'video',
61
+ 'video/x-ms-wmv': 'video',
62
+ 'video/avi': 'video',
63
+
64
+ // Audio MIME types
65
+ 'audio/mpeg': 'audio',
66
+ 'audio/wav': 'audio',
67
+ 'audio/aac': 'audio',
68
+ 'audio/flac': 'audio',
69
+
70
+ // Archive MIME types
71
+ 'application/zip': 'archive',
72
+ 'application/x-rar-compressed': 'archive',
73
+ 'application/x-tar': 'archive',
74
+ 'application/gzip': 'archive',
75
+
76
+ // Add more MIME types as needed
77
+ }
78
+
79
+ return mimeTypes[mimeType] || 'Unknown'
80
+ }
81
+ /**
82
+ * @description Parses intials from a "name" string
83
+ * @param {string} str - Name string (e.g. "John Hancock", "John", "John Tyler Smith")
84
+ * @returns {string} - Returns initials
85
+ **/
86
+ export const parseInitials = (str: string): string | void => {
87
+ if (!str) return void 0
88
+ const parts = str.split(' ')
89
+
90
+ if (parts.length === 1) return parts[0].substring(0, 2).toUpperCase()
91
+
92
+ return `${parts[0].substring(0, 1).toUpperCase()}${parts[1]
93
+ .substring(0, 1)
94
+ .toUpperCase()}`
95
+ }
96
+
97
+ export function categorizeObjects(
98
+ array: Record<string, any>[],
99
+ categoryField: string
100
+ ): Record<string, any[]> {
101
+ return array.reduce((acc, item) => {
102
+ if (!acc[item[categoryField]]) {
103
+ acc[item[categoryField]] = []
104
+ }
105
+ acc[item[categoryField]].push(item)
106
+ return acc
107
+ }, {})
108
+ }
109
+
110
+ export function deepEqual(
111
+ obj1: Record<string, any>,
112
+ obj2: Record<string, any>
113
+ ) {
114
+ // Check if both are the same reference
115
+ if (obj1 === obj2) {
116
+ return true
117
+ }
118
+
119
+ // Check if either is null or not an object
120
+ if (
121
+ obj1 == null ||
122
+ typeof obj1 !== 'object' ||
123
+ obj2 == null ||
124
+ typeof obj2 !== 'object'
125
+ ) {
126
+ return false
127
+ }
128
+
129
+ // Get the keys of both objects
130
+ const keys1 = Object.keys(obj1)
131
+ const keys2 = Object.keys(obj2)
132
+
133
+ // Check if they have the same number of keys
134
+ if (keys1.length !== keys2.length) {
135
+ return false
136
+ }
137
+
138
+ // Check if all keys and values are the same
139
+ for (let key of keys1) {
140
+ if (!keys2.includes(key) || !deepEqual(obj1[key], obj2[key])) {
141
+ return false
142
+ }
143
+ }
144
+
145
+ return true
146
+ }