srcdev-nuxt-components 5.0.2 → 6.0.0

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 (75) hide show
  1. package/README.md +1 -9
  2. package/nuxt.config.ts +5 -2
  3. package/package.json +11 -12
  4. package/assets/styles/extends-layer/srcdev-components/display-prompt-core/index.css +0 -70
  5. package/assets/styles/extends-layer/srcdev-components/index.css +0 -2
  6. package/assets/styles/extends-layer/srcdev-components/themes/_error.css +0 -15
  7. package/assets/styles/extends-layer/srcdev-components/themes/_info.css +0 -15
  8. package/assets/styles/extends-layer/srcdev-components/themes/_success.css +0 -15
  9. package/assets/styles/extends-layer/srcdev-components/themes/_warning.css +0 -15
  10. package/assets/styles/extends-layer/srcdev-components/themes/index.css +0 -4
  11. package/assets/styles/main.css +0 -2
  12. package/assets/styles/setup/_head.css +0 -5
  13. package/assets/styles/setup/a11y/_utils.css +0 -20
  14. package/assets/styles/setup/a11y/_variables.css +0 -10
  15. package/assets/styles/setup/a11y/index.css +0 -2
  16. package/assets/styles/setup/index.css +0 -5
  17. package/assets/styles/setup/typography/index.css +0 -2
  18. package/assets/styles/setup/typography/utility-classes/_generic-font-classes.css +0 -192
  19. package/assets/styles/setup/typography/utility-classes/_generic-font-variation-settings.css +0 -29
  20. package/assets/styles/setup/typography/utility-classes/_generic-font-weights.css +0 -41
  21. package/assets/styles/setup/typography/utility-classes/index.css +0 -3
  22. package/assets/styles/setup/typography/vars/_reponsive-font-sizes.css +0 -10
  23. package/assets/styles/setup/typography/vars/index.css +0 -1
  24. package/assets/styles/setup/utility-classes/_margin-helpers.css +0 -334
  25. package/assets/styles/setup/utility-classes/_padding-helpers.css +0 -308
  26. package/assets/styles/setup/utility-classes/_page.css +0 -50
  27. package/assets/styles/setup/utility-classes/index.css +0 -3
  28. package/assets/styles/setup/variables/colors/_blue.css +0 -15
  29. package/assets/styles/setup/variables/colors/_gray.css +0 -16
  30. package/assets/styles/setup/variables/colors/_green.css +0 -15
  31. package/assets/styles/setup/variables/colors/_orange.css +0 -15
  32. package/assets/styles/setup/variables/colors/_red.css +0 -15
  33. package/assets/styles/setup/variables/colors/_yellow.css +0 -15
  34. package/assets/styles/setup/variables/colors/index.css +0 -6
  35. package/assets/styles/setup/variables/index.css +0 -1
  36. package/components/accordian/AccordianCore.vue +0 -46
  37. package/components/animated-svg-text/AnimatedSvgText.vue +0 -87
  38. package/components/canvas-switcher/CanvasSwitcher.vue +0 -77
  39. package/components/carousel-basic/CarouselBasic.vue +0 -291
  40. package/components/carousel-basic/CarouselFlip.vue +0 -461
  41. package/components/carousel-basic/CarouselInfinite.vue +0 -325
  42. package/components/clip-element/ClipElement.vue +0 -73
  43. package/components/clipped-panels/ClippedPanel.vue +0 -73
  44. package/components/container-glow/ContainerGlowCore.vue +0 -211
  45. package/components/content-grid/ContentGrid.vue +0 -85
  46. package/components/deep-expanding-menu/DeepExpandingMenu.vue +0 -214
  47. package/components/deep-expanding-menu/DeepExpandingMenuOld.vue +0 -218
  48. package/components/display-banner/DisplayBanner.vue +0 -63
  49. package/components/display-details/DisplayDetailsCore.vue +0 -301
  50. package/components/display-dialog/DisplayDialogCore.vue +0 -255
  51. package/components/display-dialog/variants/DisplayDialogConfirm.vue +0 -45
  52. package/components/display-dialog/variants/DisplayDialogScrollableContent.vue +0 -49
  53. package/components/display-grid/DisplayGridCore.vue +0 -22
  54. package/components/display-prompt/DisplayPromptCore.vue +0 -187
  55. package/components/display-prompt/variants/DisplayPromptError.vue +0 -53
  56. package/components/expanding-panel/ExpandingPanel.vue +0 -124
  57. package/components/image-galleries/SliderGallery.vue +0 -784
  58. package/components/layout-grids/LayoutGridA.vue +0 -103
  59. package/components/layout-grids/LayoutGridB.vue +0 -132
  60. package/components/layout-row/LayoutRow.vue +0 -165
  61. package/components/masonry-grid/MasonryGrid.vue +0 -62
  62. package/components/masonry-grid-ordered/MasonryGridOrdered.vue +0 -158
  63. package/components/masonry-grid-sorted/MasonryGridSorted.vue +0 -115
  64. package/components/pop-over/PopOver.vue +0 -88
  65. package/components/responsive-header/NavigationItems.vue +0 -169
  66. package/components/responsive-header/ResponsiveHeader.vue +0 -686
  67. package/components/rotating-carousel/RotatingCarouselImage.vue +0 -200
  68. package/components/skip-links/SkipLinks.vue +0 -92
  69. package/components/tabs/TabsCore.vue +0 -277
  70. package/composables/useDialogControls.ts +0 -44
  71. package/composables/useStyleClassPassthrough.ts +0 -35
  72. package/composables/useTabs.ts +0 -201
  73. package/types/gallery-data.ts +0 -13
  74. package/types/responsiveHeader.ts +0 -38
  75. package/types/types.carousel-basic.ts +0 -19
@@ -1,201 +0,0 @@
1
- import { useResizeObserver } from '@vueuse/core';
2
-
3
- const useTabs = (axis: string, tabsNavRef: Ref<HTMLElement | null>, tabsContentRefs: Ref<HTMLElement[] | null>, duration: number) => {
4
- const navItems = ref<HTMLElement[] | null>(null);
5
- const previousActiveTab = useState<HTMLElement | null>('previousActiveTab', () => null);
6
- const currentActiveTab = ref<HTMLElement>();
7
-
8
- const previousHoveredTab = ref<HTMLElement>();
9
- const currentHoveredTab = ref<HTMLElement>();
10
- const tagName = ref<string>();
11
-
12
- const initNavDecorators = () => {
13
- navItems.value = tabsNavRef.value ? (Array.from(tabsNavRef.value.querySelectorAll('[data-nav-item')) as HTMLElement[]) : [];
14
- tagName.value = navItems.value[0].tagName.toLowerCase();
15
-
16
- const activeIndex = ref(0);
17
-
18
- // Temporarily set the first nav item as active
19
- navItems.value[0].setAttribute('aria-selected', 'true');
20
-
21
- // Test if navItems are hyperlinks
22
- if (navItems.value[0].tagName.toLowerCase() === 'a') {
23
- // Find index of element with class "router-link-active"
24
- activeIndex.value = navItems.value.findIndex((el) => el.classList.contains('router-link-active'));
25
- }
26
- // else {
27
- // Set actve tab
28
- // }
29
-
30
- currentActiveTab.value = navItems.value[activeIndex.value];
31
- currentHoveredTab.value = navItems.value[activeIndex.value];
32
-
33
- previousActiveTab.value = navItems.value[activeIndex.value];
34
- previousHoveredTab.value = navItems.value[activeIndex.value];
35
-
36
- addNavDecorators();
37
- setActiveTabContent();
38
- };
39
-
40
- const addNavDecorators = () => {
41
- const elementClasses = ['nav__active-indicator', 'nav__active', 'nav__hovered'];
42
- if (tabsNavRef.value) {
43
- for (let i = 0; i < 3; i++) {
44
- const div = document.createElement('div');
45
- div.classList.add(elementClasses[i]);
46
- tabsNavRef.value.appendChild(div);
47
- }
48
- }
49
- };
50
-
51
- const navItemHovered = (event: Event) => {
52
- const target = event.target as HTMLElement;
53
- const newTabPosition = currentHoveredTab.value ? currentHoveredTab.value.compareDocumentPosition(target) : 0;
54
-
55
- if (newTabPosition !== 0) {
56
- previousHoveredTab.value = currentHoveredTab.value;
57
- currentHoveredTab.value = target;
58
- moveHoveredIndicator();
59
- }
60
- };
61
-
62
- const resetHoverToActivePosition = () => {
63
- previousHoveredTab.value = currentHoveredTab.value;
64
- currentHoveredTab.value = currentActiveTab.value;
65
- moveHoveredIndicator();
66
- };
67
-
68
- const navItemClicked = (event: Event) => {
69
- const target = event.target as HTMLElement;
70
-
71
- previousActiveTab.value = currentActiveTab.value || null;
72
- currentActiveTab.value = target;
73
-
74
- navItems.value?.forEach((tab) => {
75
- tab.setAttribute('aria-selected', currentActiveTab.value === tab ? 'true' : 'false');
76
- });
77
-
78
- moveActiveIndicator();
79
- setActiveTabContent();
80
- };
81
-
82
- const handleTransitioningClass = (transitionDuration: number = 200) => {
83
- if (previousHoveredTab.value && currentHoveredTab.value) {
84
- const newTabPosition = previousHoveredTab.value.compareDocumentPosition(currentHoveredTab.value);
85
- const navItemsArray = navItems.value || [];
86
-
87
- const timeout = Math.floor(transitionDuration / Math.abs(navItemsArray.indexOf(currentHoveredTab.value) - navItemsArray.indexOf(previousHoveredTab.value)));
88
-
89
- if (newTabPosition === 4) {
90
- for (let i = navItemsArray.indexOf(previousHoveredTab.value); i < navItemsArray.indexOf(currentHoveredTab.value); i++) {
91
- navItemsArray[i].classList.add('transitioning');
92
- if (i >= navItemsArray.indexOf(previousHoveredTab.value) && i < navItemsArray.indexOf(currentHoveredTab.value)) {
93
- setTimeout(() => {
94
- navItemsArray[i].classList.remove('transitioning');
95
- // }, timeout * (i - navItemsArray.indexOf(previousHoveredTab.value) - 1));
96
- }, duration * 1.5);
97
- }
98
- }
99
- } else {
100
- for (let i = navItemsArray.indexOf(previousHoveredTab.value); i > navItemsArray.indexOf(currentHoveredTab.value); i--) {
101
- navItemsArray[i].classList.add('transitioning');
102
- if (i <= navItemsArray.indexOf(previousHoveredTab.value) && i > navItemsArray.indexOf(currentHoveredTab.value)) {
103
- setTimeout(() => {
104
- navItemsArray[i].classList.remove('transitioning');
105
- // }, timeout * (i - navItemsArray.indexOf(previousHoveredTab.value) - 1));
106
- }, duration * 1.5);
107
- }
108
- }
109
- }
110
- }
111
- };
112
-
113
- const setFinalHoveredPositions = (resized: boolean = false) => {
114
- const setDuration = resized ? 0 : duration;
115
- // const tabsNavRefYPosition = tabsNavRef.value?.getBoundingClientRect().top || 0;
116
- const newTabWidth = currentHoveredTab.value && tabsNavRef.value ? currentHoveredTab.value.offsetWidth / tabsNavRef.value.offsetWidth : 0;
117
- tabsNavRef.value?.style.setProperty('--_transition-duration', setDuration + 'ms');
118
- tabsNavRef.value?.style.setProperty('--_x-hovered', currentHoveredTab.value?.offsetLeft + 'px');
119
-
120
- tabsNavRef.value?.style.setProperty('--_width-hovered', newTabWidth?.toString());
121
- tabsNavRef.value?.style.setProperty('--_y-hovered', currentHoveredTab.value?.offsetTop + 'px');
122
- tabsNavRef.value?.style.setProperty('--_y-height', currentHoveredTab.value?.offsetHeight + 'px');
123
- tabsNavRef.value?.style.setProperty('--_y-width', currentHoveredTab.value?.offsetWidth + 'px');
124
- };
125
-
126
- const setFinalActivePositions = (resized: boolean = false) => {
127
- const setDuration = resized ? 0 : duration;
128
- const newTabWidth = currentActiveTab.value && tabsNavRef.value ? currentActiveTab.value.offsetWidth / tabsNavRef.value.offsetWidth : 0;
129
- tabsNavRef.value?.style.setProperty('--_transition-duration', setDuration + 'ms');
130
- tabsNavRef.value?.style.setProperty('--_x-active', currentActiveTab.value?.offsetLeft + 'px');
131
- tabsNavRef.value?.style.setProperty('--_width-active', newTabWidth?.toString());
132
- tabsNavRef.value?.style.setProperty('--_y-active', currentActiveTab.value?.offsetTop + 'px');
133
- tabsNavRef.value?.style.setProperty('--_y-height', currentActiveTab.value?.offsetHeight + 'px');
134
- tabsNavRef.value?.style.setProperty('--_y-width', currentActiveTab.value?.offsetWidth + 'px');
135
- };
136
-
137
- const moveActiveIndicator = () => {
138
- tabsNavRef.value?.style.setProperty('--_transition-duration', duration + 'ms');
139
-
140
- const newTabPosition = previousActiveTab.value && currentActiveTab.value ? previousActiveTab.value.compareDocumentPosition(currentActiveTab.value) : 0;
141
- let transitionWidth;
142
-
143
- if (newTabPosition === 4) {
144
- transitionWidth = currentActiveTab.value && previousActiveTab.value ? currentActiveTab.value.offsetLeft + currentActiveTab.value.offsetWidth - previousActiveTab.value.offsetLeft : 0;
145
- } else {
146
- transitionWidth = previousActiveTab.value && currentActiveTab.value ? previousActiveTab.value.offsetLeft + previousActiveTab.value.offsetWidth - currentActiveTab.value.offsetLeft : 0;
147
- tabsNavRef.value?.style.setProperty('--_x-active', currentActiveTab.value ? currentActiveTab.value.offsetLeft + 'px' : '0');
148
- }
149
-
150
- tabsNavRef.value?.style.setProperty('--_width-active', String(transitionWidth / tabsNavRef.value.offsetWidth));
151
-
152
- handleTransitioningClass(duration);
153
-
154
- setTimeout(() => {
155
- setFinalActivePositions();
156
- }, Math.floor(duration + 20));
157
- };
158
-
159
- const moveHoveredIndicator = () => {
160
- tabsNavRef.value?.style.setProperty('--_transition-duration', duration + 'ms');
161
-
162
- const newTabPosition = previousHoveredTab.value && currentHoveredTab.value ? previousHoveredTab.value.compareDocumentPosition(currentHoveredTab.value) : 0;
163
- let transitionWidth;
164
-
165
- if (newTabPosition === 4) {
166
- transitionWidth = currentHoveredTab.value && previousHoveredTab.value ? currentHoveredTab.value.offsetLeft + currentHoveredTab.value.offsetWidth - previousHoveredTab.value.offsetLeft : 0;
167
- } else {
168
- transitionWidth = previousHoveredTab.value && currentHoveredTab.value ? previousHoveredTab.value.offsetLeft + previousHoveredTab.value.offsetWidth - currentHoveredTab.value.offsetLeft : 0;
169
- tabsNavRef.value?.style.setProperty('--_x-hovered', currentHoveredTab.value ? currentHoveredTab.value.offsetLeft + 'px' : '0');
170
- }
171
-
172
- tabsNavRef.value?.style.setProperty('--_width-hovered', String(transitionWidth / tabsNavRef.value.offsetWidth));
173
-
174
- handleTransitioningClass(duration);
175
-
176
- setTimeout(() => {
177
- setFinalHoveredPositions();
178
- }, Math.floor(duration + 20));
179
- };
180
-
181
- const setActiveTabContent = () => {
182
- const activeIndex = navItems.value?.findIndex((el) => el === currentActiveTab.value);
183
- tabsContentRefs.value?.forEach((tabContent: HTMLElement, index: number) => {
184
- tabContent.style.display = activeIndex === index ? 'block' : 'none';
185
- });
186
- };
187
-
188
- useResizeObserver(tabsNavRef, () => {
189
- setFinalActivePositions(true);
190
- setFinalHoveredPositions(true);
191
- });
192
-
193
- return {
194
- initNavDecorators,
195
- navItemClicked,
196
- navItemHovered,
197
- resetHoverToActivePosition,
198
- };
199
- };
200
-
201
- export default useTabs;
@@ -1,13 +0,0 @@
1
- export interface IGalleryData {
2
- src: string;
3
- alt: string;
4
- stylist?: string;
5
- title?: string;
6
- category?: string;
7
- description?: string;
8
- thumbnail?: {
9
- title: string;
10
- description: string;
11
- };
12
- textBrightness: 'light' | 'dark';
13
- }
@@ -1,38 +0,0 @@
1
- export interface ResponsiveHeaderNavItem {
2
- name: string;
3
- path?: string;
4
- iconName?: string;
5
- imageSrc?: string;
6
- imageAlt?: string;
7
- description?: string;
8
- isActive?: boolean;
9
- isExternal?: boolean;
10
- childLinksTitle?: string;
11
- childLinks?: ResponsiveHeaderNavItem[];
12
- config?: ResponsiveHeaderItemRects;
13
- }
14
-
15
- export interface ResponsiveHeaderProp {
16
- [key: string]: ResponsiveHeaderNavItem[];
17
- }
18
-
19
- export interface IFlooredRect {
20
- left: number;
21
- right: number;
22
- top: number;
23
- bottom: number;
24
- width: number;
25
- height: number;
26
- }
27
-
28
- export interface ResponsiveHeaderItemRects {
29
- left: number;
30
- right: number;
31
- width?: number;
32
- visible: boolean;
33
- }
34
-
35
- export interface ResponsiveHeaderState {
36
- navListVisibility: Record<string, boolean>;
37
- clonedNavLinks?: ResponsiveHeaderProp;
38
- }
@@ -1,19 +0,0 @@
1
- export interface CarouselBasicItem {
2
- id: number | string;
3
- url: string;
4
- alt: string;
5
- }
6
-
7
- export interface CarouselModifiedItem {
8
- id: number | string;
9
- url: string;
10
- alt: string;
11
- order: number;
12
- }
13
-
14
- export interface ICarouselBasic {
15
- items: CarouselBasicItem[] | CarouselModifiedItem[];
16
- total: number;
17
- skip: number;
18
- limit: number;
19
- }