srcdev-nuxt-components 6.0.0 → 6.1.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 (82) hide show
  1. package/README.md +2 -2
  2. package/app/assets/styles/extends-layer/srcdev-components/components/_display-prompt-core.css +72 -0
  3. package/app/assets/styles/extends-layer/srcdev-components/components/index.css +1 -0
  4. package/app/assets/styles/extends-layer/srcdev-components/index.css +2 -0
  5. package/app/assets/styles/extends-layer/srcdev-components/setup/index.css +1 -0
  6. package/app/assets/styles/extends-layer/srcdev-components/setup/themes/_error.css +15 -0
  7. package/app/assets/styles/extends-layer/srcdev-components/setup/themes/_info.css +15 -0
  8. package/app/assets/styles/extends-layer/srcdev-components/setup/themes/_secondary.css +15 -0
  9. package/app/assets/styles/extends-layer/srcdev-components/setup/themes/_success.css +15 -0
  10. package/app/assets/styles/extends-layer/srcdev-components/setup/themes/_warning.css +15 -0
  11. package/app/assets/styles/extends-layer/srcdev-components/setup/themes/index.css +5 -0
  12. package/app/assets/styles/main.css +2 -0
  13. package/app/assets/styles/setup/_head.css +36 -0
  14. package/app/assets/styles/setup/a11y/_utils.css +20 -0
  15. package/app/assets/styles/setup/a11y/_variables.css +8 -0
  16. package/app/assets/styles/setup/a11y/index.css +2 -0
  17. package/app/assets/styles/setup/index.css +5 -0
  18. package/app/assets/styles/setup/typography/index.css +2 -0
  19. package/app/assets/styles/setup/typography/utility-classes/_generic-font-classes.css +217 -0
  20. package/app/assets/styles/setup/typography/utility-classes/_generic-font-variation-settings.css +29 -0
  21. package/app/assets/styles/setup/typography/utility-classes/_generic-font-weights.css +39 -0
  22. package/app/assets/styles/setup/typography/utility-classes/index.css +3 -0
  23. package/app/assets/styles/setup/typography/vars/_colors.css +14 -0
  24. package/app/assets/styles/setup/typography/vars/_reponsive-font-sizes.css +12 -0
  25. package/app/assets/styles/setup/typography/vars/index.css +2 -0
  26. package/app/assets/styles/setup/utility-classes/_fluid-spacing.css +13 -0
  27. package/app/assets/styles/setup/utility-classes/animations/_auto-rotate.css +13 -0
  28. package/app/assets/styles/setup/utility-classes/animations/_entry-exit-blur.css +16 -0
  29. package/app/assets/styles/setup/utility-classes/animations/_entry-slide-in.css +15 -0
  30. package/app/assets/styles/setup/utility-classes/animations/_entry-zoom-reveal.css +15 -0
  31. package/app/assets/styles/setup/utility-classes/animations/index.css +4 -0
  32. package/app/assets/styles/setup/utility-classes/index.css +2 -0
  33. package/app/assets/styles/setup/variables/colors/_blue.css +15 -0
  34. package/app/assets/styles/setup/variables/colors/_gray.css +16 -0
  35. package/app/assets/styles/setup/variables/colors/_green.css +15 -0
  36. package/app/assets/styles/setup/variables/colors/_orange.css +15 -0
  37. package/app/assets/styles/setup/variables/colors/_red.css +15 -0
  38. package/app/assets/styles/setup/variables/colors/_yellow.css +15 -0
  39. package/app/assets/styles/setup/variables/colors/index.css +6 -0
  40. package/app/assets/styles/setup/variables/index.css +1 -0
  41. package/app/components/accordian/AccordianCore.vue +53 -0
  42. package/app/components/animated-svg-text/AnimatedSvgText.vue +87 -0
  43. package/app/components/canvas-switcher/CanvasSwitcher.vue +77 -0
  44. package/app/components/carousel-basic/CarouselBasic.vue +291 -0
  45. package/app/components/carousel-basic/CarouselFlip.vue +461 -0
  46. package/app/components/carousel-basic/CarouselInfinite.vue +325 -0
  47. package/app/components/clip-element/ClipElement.vue +73 -0
  48. package/app/components/clipped-panels/ClippedPanel.vue +73 -0
  49. package/app/components/container-glow/ContainerGlowCore.vue +211 -0
  50. package/app/components/content-grid/ContentGrid.vue +85 -0
  51. package/app/components/deep-expanding-menu/DeepExpandingMenu.vue +214 -0
  52. package/app/components/deep-expanding-menu/DeepExpandingMenuOld.vue +218 -0
  53. package/app/components/display-banner/DisplayBanner.vue +63 -0
  54. package/app/components/display-details/DisplayDetailsCore.vue +301 -0
  55. package/app/components/display-dialog/DisplayDialogCore.vue +255 -0
  56. package/app/components/display-dialog/variants/DisplayDialogConfirm.vue +45 -0
  57. package/app/components/display-dialog/variants/DisplayDialogScrollableContent.vue +49 -0
  58. package/app/components/display-grid/DisplayGridCore.vue +22 -0
  59. package/app/components/display-prompt/DisplayPromptCore.vue +187 -0
  60. package/app/components/display-prompt/variants/DisplayPromptError.vue +53 -0
  61. package/app/components/expanding-panel/ExpandingPanel.vue +124 -0
  62. package/app/components/image-galleries/SliderGallery.vue +784 -0
  63. package/app/components/layout-grids/LayoutGridA.vue +103 -0
  64. package/app/components/layout-grids/LayoutGridB.vue +132 -0
  65. package/app/components/layout-row/LayoutRow.vue +165 -0
  66. package/app/components/masonry-grid/MasonryGrid.vue +62 -0
  67. package/app/components/masonry-grid-ordered/MasonryGridOrdered.vue +158 -0
  68. package/app/components/masonry-grid-sorted/MasonryGridSorted.vue +115 -0
  69. package/app/components/pop-over/PopOver.vue +88 -0
  70. package/app/components/responsive-header/NavigationItems.vue +169 -0
  71. package/app/components/responsive-header/ResponsiveHeader.vue +686 -0
  72. package/app/components/rotating-carousel/RotatingCarouselImage.vue +200 -0
  73. package/app/components/skip-links/SkipLinks.vue +92 -0
  74. package/app/components/tabs/TabsCore.vue +277 -0
  75. package/app/composables/useDialogControls.ts +44 -0
  76. package/app/composables/useStyleClassPassthrough.ts +35 -0
  77. package/app/composables/useTabs.ts +201 -0
  78. package/app/types/gallery-data.ts +13 -0
  79. package/app/types/responsiveHeader.ts +38 -0
  80. package/app/types/types.carousel-basic.ts +19 -0
  81. package/nuxt.config.ts +14 -14
  82. package/package.json +4 -7
@@ -0,0 +1,115 @@
1
+ <template>
2
+ <div class="masonry-grid-wrapper" :class="[elementClasses]" :style="`--_masonry-grid-gap: ${gap}${unit}; --_item-min-width: ${itemMinWidth}px`" ref="gridWrapper">
3
+ <template v-for="item in rearrangedItems" :key="item.id">
4
+ <div class="masonry-grid-item">
5
+ <slot :name="item.id"></slot>
6
+ </div>
7
+ </template>
8
+ </div>
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ import { useResizeObserver } from '@vueuse/core';
13
+
14
+ const props = defineProps({
15
+ gridData: {
16
+ type: Array as PropType<any[]>,
17
+ default: () => [],
18
+ },
19
+ itemMinWidth: {
20
+ type: Number,
21
+ default: 300,
22
+ },
23
+ gap: {
24
+ type: Number,
25
+ default: 1.2,
26
+ },
27
+ unit: {
28
+ type: String,
29
+ default: 'rem',
30
+ },
31
+ styleClassPassthrough: {
32
+ type: Array as PropType<string[]>,
33
+ default: () => [],
34
+ },
35
+ });
36
+
37
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
38
+
39
+ const gridData = toRef(() => props.gridData);
40
+
41
+ const gridWrapper = ref<HTMLDivElement>();
42
+
43
+ const getColumnCountWithinGridWrapper = () => {
44
+ return gridWrapper.value ? Math.floor(gridWrapper.value.clientWidth / props.itemMinWidth) : 0;
45
+ };
46
+
47
+ // const columns = ref(4);
48
+ const columns = computed(() => {
49
+ return gridWrapper.value ? Math.floor(gridWrapper.value.clientWidth / props.itemMinWidth) : 0;
50
+ });
51
+
52
+ const rearrangeArray = (items: any[], columns: number): any[] => {
53
+ const rows = Math.ceil(items.length / columns);
54
+ const rearrangedArray = [];
55
+
56
+ for (let col = 0; col < columns; col++) {
57
+ for (let row = 0; row < rows; row++) {
58
+ const index = row * columns + col;
59
+ if (index < items.length) {
60
+ rearrangedArray.push(items[index]);
61
+ }
62
+ }
63
+ }
64
+
65
+ return rearrangedArray;
66
+ };
67
+
68
+ const rearrangedItems = computed(() => rearrangeArray(props.gridData, columns.value));
69
+ // const rearrangedItems = computed(() => {
70
+ // const rows = Math.ceil(props.gridData.length / columns.value);
71
+ // const rearrangedArray = [];
72
+
73
+ // for (let col = 0; col < columns.value; col++) {
74
+ // for (let row = 0; row < rows; row++) {
75
+ // const index = row * columns.value + col;
76
+ // if (index < props.gridData.length) {
77
+ // rearrangedArray.push(props.gridData[index]);
78
+ // }
79
+ // }
80
+ // }
81
+
82
+ // return rearrangedArray;
83
+ // });
84
+
85
+ watch(
86
+ () => props.styleClassPassthrough,
87
+ () => {
88
+ resetElementClasses(props.styleClassPassthrough);
89
+ }
90
+ );
91
+
92
+ // onMounted(() => {
93
+ // console.log(getColumnCountWithinGridWrapper());
94
+ // });
95
+
96
+ // useResizeObserver(gridWrapper, () => {
97
+ // console.log(getColumnCountWithinGridWrapper());
98
+ // });
99
+ </script>
100
+
101
+ <style lang="css">
102
+ .masonry-grid-wrapper {
103
+ --_border-color: light-dark(hsl(0, 29%, 3%), hsl(0, 0%, 92%));
104
+
105
+ columns: var(--_item-min-width);
106
+ gap: var(--_masonry-grid-gap);
107
+
108
+ .masonry-grid-item {
109
+ break-inside: avoid;
110
+ outline: 0.1rem solid var(--_border-color);
111
+ padding: 1.2rem;
112
+ margin-block-end: var(--_masonry-grid-gap);
113
+ }
114
+ }
115
+ </style>
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <ClientOnly>
3
+ <button :popovertarget popovertargetaction="toggle" class="popover-trigger" :class="[elementClasses]">
4
+ <slot name="trigger"></slot>
5
+ </button>
6
+
7
+ <div class="dialog" popover role="tooltip" :id="popovertarget" :class="[elementClasses]">
8
+ <button :popovertarget popovertargetaction="hide">x</button>
9
+ <slot name="popoverCotent"></slot>
10
+ </div>
11
+ </ClientOnly>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ const props = defineProps({
16
+ popovertarget: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ styleClassPassthrough: {
21
+ type: Array as PropType<string[]>,
22
+ default: () => [],
23
+ },
24
+ });
25
+
26
+ const anchorName = `--anchor-${useId()}`;
27
+
28
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
29
+ </script>
30
+
31
+ <style scoped lang="css">
32
+ @layer popover-setup {
33
+ /* @position-try --right {
34
+ inset: auto;
35
+ top: anchor(top);
36
+ left: calc(anchor(right) + 10px);
37
+ }
38
+
39
+ @position-try --left {
40
+ inset: auto;
41
+ top: anchor(top);
42
+ right: calc(anchor(left) + 10px);
43
+ } */
44
+
45
+ .popover-trigger {
46
+ anchor-name: v-bind(anchorName);
47
+ }
48
+
49
+ .dialog {
50
+ display: none;
51
+ position: absolute;
52
+ position-anchor: v-bind(anchorName);
53
+ margin: 0;
54
+ inset: auto;
55
+ top: calc(anchor(top) + 0px);
56
+ left: calc(anchor(right) + 10px);
57
+ opacity: 0;
58
+ transition: opacity 200ms, display 200ms, overlay 200ms;
59
+ transition-behavior: allow-discrete;
60
+
61
+ position-try-fallbacks: flip-inline;
62
+
63
+ &:popover-open {
64
+ display: block;
65
+ opacity: 1;
66
+
67
+ @starting-style {
68
+ display: block;
69
+ opacity: 0;
70
+ }
71
+ }
72
+ }
73
+
74
+ @position-try --top-left {
75
+ top: anchor(top);
76
+ right: calc(anchor(left + 10px));
77
+ left: unset;
78
+ /* width: revert; */
79
+ }
80
+
81
+ @position-try --bottom-right {
82
+ top: anchor(bottom);
83
+ /* right: calc(anchor(left + 10px)); */
84
+ /* left: unset; */
85
+ /* width: revert; */
86
+ }
87
+ }
88
+ </style>
@@ -0,0 +1,169 @@
1
+ <template>
2
+ <div class="overflow-navigation-wrapper" :class="elementClasses" role="menu" aria-label="Overflow navigation menu">
3
+ <ul
4
+ v-for="(navGroup, groupKey) in mainNavigationState.clonedNavLinks"
5
+ :key="groupKey"
6
+ class="overflow-navigation-list"
7
+ :class="[{ visible: !mainNavigationState.navListVisibility[groupKey] }]"
8
+ :style="{ '--_overflow-navigation-list-min-width': widestNavLinkWidthInMainNavigationState + 'px' }"
9
+ role="none"
10
+ >
11
+ <template v-for="(link, localIndex) in navGroup" :key="localIndex">
12
+ <li
13
+ v-if="link.path"
14
+ class="overflow-navigation-item"
15
+ :class="{ visible: !mainNavigationState.clonedNavLinks?.[groupKey]?.[localIndex]?.config?.visible }"
16
+ :style="{ '--_main-navigation-item-width': mainNavigationState.clonedNavLinks?.[groupKey]?.[localIndex]?.config?.width + 'px' }"
17
+ :data-group-key="groupKey"
18
+ :data-local-index="localIndex"
19
+ role="none"
20
+ >
21
+ <NuxtLink class="overflow-navigation-link" :to="link.path" role="menuitem">
22
+ <span class="overflow-navigation-text">{{ link.name }}</span>
23
+ </NuxtLink>
24
+ </li>
25
+ <li
26
+ v-else
27
+ class="overflow-navigation-item"
28
+ :class="{ visible: !mainNavigationState.clonedNavLinks?.[groupKey]?.[localIndex]?.config?.visible }"
29
+ :style="{ '--_main-navigation-item-width': mainNavigationState.clonedNavLinks?.[groupKey]?.[localIndex]?.config?.width + 'px' }"
30
+ :data-group-key="groupKey"
31
+ :data-local-index="localIndex"
32
+ role="none"
33
+ >
34
+ <DisplayDetailsCore
35
+ :id="useId()"
36
+ name="overflow-navigation-group"
37
+ :animation-duration="detailsAanimationDuration"
38
+ icon-size="medium"
39
+ :style-class-passthrough="['overflow-navigation-details']"
40
+ >
41
+ <template #summary>
42
+ <span class="overflow-navigation-text" :aria-label="`${link.childLinksTitle} submenu`" role="menuitem" :aria-haspopup="true">{{ link.childLinksTitle }}</span>
43
+ </template>
44
+ <template #summaryIcon>
45
+ <Icon name="mdi:chevron-down" class="icon" :aria-hidden="true" />
46
+ </template>
47
+ <template #layout-content>
48
+ <div class="overflow-navigation-sub-nav-inner">
49
+ <ul class="overflow-navigation-sub-nav-list">
50
+ <li v-for="childLink in link.childLinks" :key="childLink.name" class="overflow-navigation-sub-nav-item">
51
+ <NuxtLink :to="childLink.path" class="overflow-navigation-sub-nav-link" role="menuitem">
52
+ <span class="overflow-navigation-sub-nav-text">{{ childLink.name }}</span>
53
+ </NuxtLink>
54
+ </li>
55
+ </ul>
56
+ </div>
57
+ </template>
58
+ </DisplayDetailsCore>
59
+ </li>
60
+ </template>
61
+ </ul>
62
+ </div>
63
+ </template>
64
+
65
+ <script setup lang="ts">
66
+ import type { ResponsiveHeaderState } from '@/types/responsiveHeader';
67
+
68
+ const props = defineProps({
69
+ mainNavigationState: {
70
+ type: Object as PropType<ResponsiveHeaderState>,
71
+ default: () => [],
72
+ },
73
+ styleClassPassthrough: {
74
+ type: Array as PropType<string[]>,
75
+ default: () => [],
76
+ },
77
+ });
78
+
79
+ const detailsAanimationDuration = 200;
80
+ const detailsAanimationDurationString = `${detailsAanimationDuration}ms`;
81
+
82
+ const widestNavLinkWidthInMainNavigationState = computed(() => {
83
+ return Object.values(props.mainNavigationState.clonedNavLinks || {}).reduce((maxWidth, group) => {
84
+ return Math.max(maxWidth, ...group.map((link) => link.config?.width || 0));
85
+ }, 0);
86
+ });
87
+
88
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
89
+
90
+ watch(
91
+ () => props.styleClassPassthrough,
92
+ () => {
93
+ resetElementClasses(props.styleClassPassthrough);
94
+ }
95
+ );
96
+ </script>
97
+
98
+ <style lang="css">
99
+ .overflow-navigation-wrapper {
100
+ display: flex;
101
+ flex-direction: column;
102
+ gap: 12px;
103
+
104
+ .overflow-navigation-list {
105
+ display: none;
106
+
107
+ &.visible {
108
+ display: flex;
109
+ flex-direction: column;
110
+ gap: 12px;
111
+ min-width: var(--_overflow-navigation-list-min-width, auto);
112
+ }
113
+
114
+ .overflow-navigation-item {
115
+ display: none;
116
+
117
+ &.visible {
118
+ display: block;
119
+ }
120
+
121
+ .overflow-navigation-link {
122
+ text-decoration: none;
123
+ color: inherit;
124
+ }
125
+
126
+ .overflow-navigation-details {
127
+ --_overflow-navigation-sub-nav-list-margin-block-start: 0;
128
+
129
+ &[open] {
130
+ --_overflow-navigation-sub-nav-list-margin-block-start: 12px;
131
+ }
132
+
133
+ &.display-details {
134
+ margin-block-end: 0;
135
+
136
+ .display-details-summary {
137
+ .label {
138
+ .overflow-navigation-text {
139
+ text-wrap: nowrap;
140
+ }
141
+ }
142
+ /* .icon {} */
143
+ }
144
+ .display-details-content {
145
+ .overflow-navigation-sub-nav-inner {
146
+ .overflow-navigation-sub-nav-list {
147
+ display: flex;
148
+ flex-direction: column;
149
+ gap: 12px;
150
+ margin-block-start: var(--_overflow-navigation-sub-nav-list-margin-block-start);
151
+ transition: margin-block-start v-bind(detailsAanimationDurationString) ease;
152
+
153
+ .overflow-navigation-sub-nav-item {
154
+ .overflow-navigation-sub-nav-link {
155
+ text-decoration: none;
156
+ color: inherit;
157
+
158
+ /* .overflow-navigation-sub-nav-text {} */
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+ </style>