srcdev-nuxt-components 2.5.18 → 3.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 (87) hide show
  1. package/nuxt.config.ts +3 -1
  2. package/package.json +1 -1
  3. package/assets/styles/a11y/_utils.css +0 -20
  4. package/assets/styles/a11y/_variables.css +0 -8
  5. package/assets/styles/a11y/index.css +0 -2
  6. package/assets/styles/forms/index.css +0 -2
  7. package/assets/styles/forms/themes/_error.css +0 -77
  8. package/assets/styles/forms/themes/_ghost.css +0 -77
  9. package/assets/styles/forms/themes/_input-action.css +0 -20
  10. package/assets/styles/forms/themes/_primary.css +0 -82
  11. package/assets/styles/forms/themes/_secondary.css +0 -77
  12. package/assets/styles/forms/themes/_success.css +0 -77
  13. package/assets/styles/forms/themes/_tertiary.css +0 -77
  14. package/assets/styles/forms/themes/_warning.css +0 -77
  15. package/assets/styles/forms/themes/index.css +0 -8
  16. package/assets/styles/forms/variables/_sizes.css +0 -82
  17. package/assets/styles/forms/variables/_theme.css +0 -11
  18. package/assets/styles/forms/variables/index.css +0 -2
  19. package/assets/styles/main.css +0 -5
  20. package/assets/styles/typography/index.css +0 -2
  21. package/assets/styles/typography/utils/_font-classes.css +0 -160
  22. package/assets/styles/typography/utils/_weights.css +0 -69
  23. package/assets/styles/typography/utils/index.css +0 -2
  24. package/assets/styles/typography/variables/_colors.css +0 -14
  25. package/assets/styles/typography/variables/_reponsive-font-size.css +0 -10
  26. package/assets/styles/typography/variables/index.css +0 -2
  27. package/assets/styles/utils/_animations.css +0 -42
  28. package/assets/styles/utils/_canvasWidths.css +0 -18
  29. package/assets/styles/utils/_display.css +0 -7
  30. package/assets/styles/utils/_margin-helpers.css +0 -334
  31. package/assets/styles/utils/_padding-helpers.css +0 -308
  32. package/assets/styles/utils/_page.css +0 -24
  33. package/assets/styles/utils/_placement.css +0 -73
  34. package/assets/styles/utils/index.css +0 -7
  35. package/assets/styles/variables/colors/_blue.css +0 -15
  36. package/assets/styles/variables/colors/_gray.css +0 -16
  37. package/assets/styles/variables/colors/_green.css +0 -15
  38. package/assets/styles/variables/colors/_orange.css +0 -15
  39. package/assets/styles/variables/colors/_red.css +0 -15
  40. package/assets/styles/variables/colors/_yellow.css +0 -15
  41. package/assets/styles/variables/colors/colors.css +0 -6
  42. package/assets/styles/variables/components/_accordian.css +0 -7
  43. package/assets/styles/variables/components/_container-glow-core.css +0 -16
  44. package/assets/styles/variables/components/_display-dialog-core.css +0 -35
  45. package/assets/styles/variables/components/_tabs.css +0 -18
  46. package/assets/styles/variables/components/display-prompt-core/_scaffolding.css +0 -57
  47. package/assets/styles/variables/components/display-prompt-core/index.css +0 -2
  48. package/assets/styles/variables/components/display-prompt-core/themes/_error.css +0 -39
  49. package/assets/styles/variables/components/display-prompt-core/themes/_info.css +0 -39
  50. package/assets/styles/variables/components/display-prompt-core/themes/_success.css +0 -39
  51. package/assets/styles/variables/components/display-prompt-core/themes/_warning.css +0 -39
  52. package/assets/styles/variables/components/display-prompt-core/themes/index.css +0 -4
  53. package/assets/styles/variables/components/index.css +0 -5
  54. package/assets/styles/variables/index.css +0 -2
  55. package/components/animated-svg-text/AnimatedSvgText.vue +0 -87
  56. package/components/canvas-switcher/CanvasSwitcher.vue +0 -77
  57. package/components/clip-element/ClipElement.vue +0 -73
  58. package/components/clipped-panels/ClippedPanel.vue +0 -73
  59. package/components/deep-expanding-menu/DeepExpandingMenu.vue +0 -214
  60. package/components/deep-expanding-menu/DeepExpandingMenuOld.vue +0 -218
  61. package/components/display-banner/DisplayBanner.vue +0 -63
  62. package/components/display-details/DisplayDetailsCore.vue +0 -312
  63. package/components/functional/accordian/AccordianCore.vue +0 -138
  64. package/components/functional/display-dialog/DisplayDialogCore.vue +0 -244
  65. package/components/functional/display-dialog/variants/DisplayDialogConfirm.vue +0 -45
  66. package/components/functional/display-dialog/variants/DisplayDialogScrollableContent.vue +0 -49
  67. package/components/functional/pop-over/PopOver.vue +0 -88
  68. package/components/image-galleries/SliderGallery.vue +0 -778
  69. package/components/masonry-grid-ordered/MasonryGridOrdered.vue +0 -158
  70. package/components/presentation/container-glow/ContainerGlowCore.vue +0 -211
  71. package/components/presentation/display-grid/DisplayGridCore.vue +0 -22
  72. package/components/presentation/display-prompt/DisplayPromptCore.vue +0 -150
  73. package/components/presentation/display-prompt/variants/DisplayPromptError.vue +0 -53
  74. package/components/presentation/layout-grids/LayoutGridA.vue +0 -103
  75. package/components/presentation/layout-grids/LayoutGridB.vue +0 -132
  76. package/components/presentation/layout-row/LayoutRow.vue +0 -157
  77. package/components/presentation/masonry-grid/MasonryGrid.vue +0 -62
  78. package/components/presentation/masonry-grid-sorted/MasonryGridSorted.vue +0 -115
  79. package/components/presentation/tabs/TabsCore.vue +0 -308
  80. package/components/responsive-header/NavigationItems.vue +0 -164
  81. package/components/responsive-header/ResponsiveHeader.vue +0 -586
  82. package/components/rotating-carousel/RotatingCarouselImage.vue +0 -200
  83. package/composables/useDialogControls.ts +0 -23
  84. package/composables/useStyleClassPassthrough.ts +0 -35
  85. package/composables/useTabs.ts +0 -201
  86. package/types/gallery-data.ts +0 -13
  87. package/types/responsiveHeader.ts +0 -38
@@ -1,158 +0,0 @@
1
- <template>
2
- <div class="masonry-grid-ordered" :class="[elementClasses]">
3
- <div class="masonry-grid-ordered-wrapper" ref="gridWrapper">
4
- <div v-for="item in gridData" :key="item.id" class="masonry-grid-ordered-item" ref="gridItemsRefs">
5
- <slot :name="item.id"></slot>
6
- </div>
7
- </div>
8
- </div>
9
- </template>
10
-
11
- <script setup lang="ts">
12
- import { useBreakpoints, useElementSize, useResizeObserver } from '@vueuse/core';
13
-
14
- const props = defineProps({
15
- gridData: {
16
- type: Object,
17
- default: {},
18
- },
19
- minTileWidth: {
20
- type: Number,
21
- default: 312,
22
- },
23
- gap: {
24
- type: Number,
25
- default: 12,
26
- },
27
- styleClassPassthrough: {
28
- type: Array as PropType<string[]>,
29
- default: () => [],
30
- },
31
- mobilePreferredColCount: {
32
- type: Number,
33
- default: 1,
34
- },
35
- fixedWidth: {
36
- type: Boolean,
37
- default: false,
38
- },
39
- justify: {
40
- type: String as PropType<String>,
41
- default: 'left',
42
- validator: (val: string) => ['left', 'center', 'right'].includes(val),
43
- },
44
- });
45
-
46
- const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
47
-
48
- const gridData = toRef(() => props.gridData);
49
-
50
- const minTileWidth = toRef(() => props.minTileWidth);
51
- const gridWrapper = ref<null | HTMLDivElement>(null);
52
- const gridItemsRefs = ref<HTMLDivElement[]>([]);
53
- const { width } = useElementSize(gridWrapper);
54
- const columnCount = computed(() => {
55
- return Math.floor(width.value / minTileWidth.value);
56
- });
57
-
58
- const gapNum = toRef(props.gap);
59
- const gapStr = toRef(props.gap + 'px');
60
-
61
- const fixedWidth = toRef(() => props.fixedWidth);
62
- const minTileWidthStr = toRef(props.minTileWidth + 'px');
63
- const maxTileWidth = computed(() => {
64
- return fixedWidth.value ? minTileWidth.value + 'px' : '1fr';
65
- });
66
-
67
- const justify = computed(() => {
68
- return fixedWidth.value ? props.justify : 'stretch';
69
- });
70
-
71
- const updateGrid = () => {
72
- if (gridWrapper.value !== null) {
73
- const wrapperWidth = gridWrapper.value?.offsetWidth ?? 0;
74
- const itemWidth = fixedWidth.value ? minTileWidth.value : Math.floor((wrapperWidth - (columnCount.value - 1) * gapNum.value) / columnCount.value);
75
-
76
- const colHeights = Array(columnCount.value).fill(0);
77
-
78
- gridItemsRefs.value.forEach((item) => {
79
- const minHeight = Math.min(...colHeights);
80
- const minIndex = colHeights.indexOf(minHeight);
81
-
82
- item?.style.setProperty('--_position', 'absolute');
83
- item?.style.setProperty('--_position-top', minHeight + 'px');
84
- item?.style.setProperty('--_position-left', minIndex * (100 / columnCount.value) + '%');
85
- item?.style.setProperty('--_element-width', itemWidth + 'px');
86
-
87
- colHeights[minIndex] += Math.floor(item.offsetHeight + gapNum.value);
88
- });
89
-
90
- const maxHeight = Math.max(...colHeights);
91
- gridWrapper.value?.style.setProperty('--_wrapper-height', maxHeight + 'px');
92
- }
93
- };
94
-
95
- useResizeObserver(gridWrapper, () => {
96
- updateGrid();
97
- });
98
-
99
- watch(
100
- () => fixedWidth.value,
101
- () => {
102
- updateGrid();
103
- }
104
- );
105
-
106
- watch(
107
- () => props.styleClassPassthrough,
108
- () => {
109
- resetElementClasses(props.styleClassPassthrough);
110
- }
111
- );
112
- </script>
113
-
114
- <style scoped lang="css">
115
- .masonry-grid-ordered {
116
- --_border-color: light-dark(hsl(0, 29%, 3%), hsl(0, 0%, 92%));
117
- --_transition-duration: 0.3s;
118
-
119
- container-type: inline-size;
120
- position: relative;
121
-
122
- transition: max-width var(--_transition-duration) ease;
123
-
124
- .masonry-grid-ordered-wrapper {
125
- display: grid;
126
- justify-self: v-bind(justify);
127
- grid-gap: v-bind(gapStr);
128
- grid-template-columns: repeat(1, minmax(v-bind(minTileWidthStr), v-bind(maxTileWidth)));
129
- position: relative;
130
-
131
- height: var(--_wrapper-height);
132
-
133
- @container (min-width: 768px) {
134
- grid-template-columns: repeat(2, minmax(v-bind(minTileWidthStr), v-bind(maxTileWidth)));
135
- }
136
-
137
- @container (min-width: 1024px) {
138
- grid-template-columns: repeat(3, minmax(v-bind(minTileWidthStr), v-bind(maxTileWidth)));
139
- }
140
- @container (min-width: 1280px) {
141
- grid-template-columns: repeat(4, minmax(v-bind(minTileWidthStr), v-bind(maxTileWidth)));
142
- }
143
-
144
- .masonry-grid-ordered-item {
145
- transition: position var(--_transition-duration) ease, top var(--_transition-duration) ease, left var(--_transition-duration) ease;
146
-
147
- position: var(--_position);
148
- top: var(--_position-top);
149
- left: var(--_position-left);
150
- width: var(--_element-width);
151
-
152
- outline: 0.1rem solid var(--_border-color);
153
- padding: 1.2rem;
154
- border-radius: 4px;
155
- }
156
- }
157
- }
158
- </style>
@@ -1,211 +0,0 @@
1
- <template>
2
- <div class="container-glow-wrapper" ref="containerGlowWrapper">
3
- <template v-for="(item, key) in data" :key="key">
4
- <component :is="tag" class="container-glow-core" :class="elementClasses" ref="containerGlowItem">
5
- <div class="glows"></div>
6
- <slot :name="`container-glow-${key}`"></slot>
7
- </component>
8
- </template>
9
- </div>
10
- </template>
11
-
12
- <script setup lang="ts">
13
- interface Data {
14
- title: string;
15
- content: string;
16
- }
17
-
18
- const props = defineProps({
19
- data: {
20
- type: Array as PropType<Data[]>,
21
- default: () => [],
22
- },
23
- tag: {
24
- type: String as PropType<string>,
25
- default: 'div',
26
- },
27
- styleClassPassthrough: {
28
- type: Array as PropType<string[]>,
29
- default: () => [],
30
- },
31
- });
32
-
33
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
34
-
35
- const controller = new AbortController();
36
-
37
- const containerGlowWrapper = ref<HTMLElement>();
38
- const containerGlowItem = ref<HTMLElement[]>([]);
39
-
40
- const CONFIG = {
41
- proximity: 40,
42
- spread: 80,
43
- blur: 20,
44
- gap: 32,
45
- vertical: false,
46
- opacity: 0,
47
- };
48
-
49
- const PROXIMITY = 10;
50
-
51
- const UPDATE = (event: PointerEvent) => {
52
- // get the angle based on the center point of the card and pointer position
53
- for (const CARD of containerGlowItem.value) {
54
- // Check the card against the proximity and then start updating
55
- const CARD_BOUNDS = CARD.getBoundingClientRect();
56
- // Get distance between pointer and outerbounds of card
57
- if (
58
- event?.x > CARD_BOUNDS.left - CONFIG.proximity &&
59
- event?.x < CARD_BOUNDS.left + CARD_BOUNDS.width + CONFIG.proximity &&
60
- event?.y > CARD_BOUNDS.top - CONFIG.proximity &&
61
- event?.y < CARD_BOUNDS.top + CARD_BOUNDS.height + CONFIG.proximity
62
- ) {
63
- // If within proximity set the active opacity
64
- CARD.style.setProperty('--active', String(1));
65
- } else {
66
- CARD.style.setProperty('--active', String(CONFIG.opacity));
67
- }
68
- const CARD_CENTER = [CARD_BOUNDS.left + CARD_BOUNDS.width * 0.5, CARD_BOUNDS.top + CARD_BOUNDS.height * 0.5];
69
- let ANGLE = (Math.atan2(event?.y - CARD_CENTER[1], event?.x - CARD_CENTER[0]) * 180) / Math.PI;
70
- ANGLE = ANGLE < 0 ? ANGLE + 360 : ANGLE;
71
- CARD.style.setProperty('--start', String(ANGLE + 90));
72
- }
73
- };
74
-
75
- const RESTYLE = () => {
76
- containerGlowWrapper.value?.style.setProperty('--gap', String(CONFIG.gap));
77
- containerGlowWrapper.value?.style.setProperty('--blur', String(CONFIG.blur));
78
- containerGlowWrapper.value?.style.setProperty('--spread', String(CONFIG.spread));
79
- containerGlowWrapper.value?.style.setProperty('--direction', CONFIG.vertical ? 'column' : 'row');
80
- };
81
-
82
- // document.body.addEventListener('pointermove', UPDATE);
83
-
84
- onMounted(() => {
85
- RESTYLE();
86
- if (containerGlowWrapper.value) {
87
- document.body.addEventListener('pointermove', UPDATE, {
88
- signal: controller.signal,
89
- });
90
- }
91
- });
92
-
93
- onBeforeUnmount(() => {
94
- return controller.abort();
95
- });
96
- </script>
97
-
98
- <style lang="css">
99
- .container-glow-wrapper {
100
- --container-bg-colour: light-dark(hsl(250, 18%, 93%), hsl(246 44% 7%));
101
- --container-border-colour: hsl(280 10% 50% / 1);
102
- --card: light-dark(white, hsl(246 44% 7%));
103
- --container-border-width: 2px;
104
- --container-border-radius: 12px;
105
- --gradient: conic-gradient(
106
- from 180deg at 50% 70%,
107
- hsla(0, 0%, 98%, 1) 0deg,
108
- #eec32d 72.0000010728836deg,
109
- #ec4b4b 144.0000021457672deg,
110
- #709ab9 216.00000858306885deg,
111
- #4dffbf 288.0000042915344deg,
112
- hsla(0, 0%, 98%, 1) 1turn
113
- );
114
-
115
- @property --start {
116
- syntax: '<number>';
117
- inherits: true;
118
- initial-value: 0;
119
- }
120
-
121
- display: flex;
122
- gap: 3.2rem;
123
-
124
- .container-glow-core {
125
- & *,
126
- & *:after,
127
- & *:before {
128
- box-sizing: border-box;
129
- }
130
-
131
- --active: 0.15;
132
- --start: 0;
133
- height: 100%;
134
- background: var(--card);
135
- padding: 2rem;
136
- aspect-ratio: 330 / 400;
137
- border-radius: var(--container-border-radius);
138
- min-width: 280px;
139
- max-width: 280px;
140
- display: flex;
141
- flex-direction: column;
142
- gap: 0.25rem;
143
- position: relative;
144
-
145
- &:is(:hover, :focus-visible) {
146
- z-index: 2;
147
- }
148
-
149
- &::before {
150
- position: absolute;
151
- inset: 0;
152
- border: var(--container-border-width) solid transparent;
153
- content: '';
154
- border-radius: var(--container-border-radius);
155
- pointer-events: none;
156
- background: var(--container-border-colour);
157
- background-attachment: fixed;
158
- border-radius: var(--container-border-radius);
159
- mask: linear-gradient(#0000, #0000),
160
- conic-gradient(from calc(((var(--start) + (var(--spread) * 0.25)) - (var(--spread) * 1.5)) * 1deg), hsl(0 0% 100% / 0.15) 0deg, white, hsl(0 0% 100% / 0.15) calc(var(--spread) * 2.5deg));
161
- mask-clip: padding-box, border-box;
162
- mask-composite: intersect;
163
- opacity: var(--active);
164
- transition: opacity 1s;
165
- }
166
-
167
- &::after {
168
- /* --container-bg-colour-size: 100%; */
169
- content: '';
170
- pointer-events: none;
171
- position: absolute;
172
- background: var(--gradient);
173
- background-attachment: fixed;
174
- border-radius: var(--container-border-radius);
175
- opacity: var(--active, 0);
176
- transition: opacity 1s;
177
- --alpha: 0;
178
- inset: 0;
179
- border: var(--container-border-width) solid transparent;
180
- mask: linear-gradient(#0000, #0000), conic-gradient(from calc(((var(--start) + (var(--spread) * 0.25)) - (var(--spread) * 0.5)) * 1deg), #0000 0deg, #fff, #0000 calc(var(--spread) * 0.5deg));
181
- filter: brightness(1.5);
182
- mask-clip: padding-box, border-box;
183
- mask-composite: intersect;
184
- }
185
-
186
- .glows {
187
- pointer-events: none;
188
- position: absolute;
189
- inset: 0;
190
- filter: blur(calc(var(--blur) * 1px));
191
-
192
- &::after,
193
- &::before {
194
- --alpha: 0;
195
- content: '';
196
- background: var(--gradient);
197
- background-attachment: fixed;
198
- position: absolute;
199
- inset: -5px;
200
- border: 10px solid transparent;
201
- border-radius: var(--container-border-radius);
202
- mask: linear-gradient(#0000, #0000), conic-gradient(from calc((var(--start) - (var(--spread) * 0.5)) * 1deg), #000 0deg, #fff, #0000 calc(var(--spread) * 1deg));
203
- mask-composite: intersect;
204
- mask-clip: padding-box, border-box;
205
- opacity: var(--active);
206
- transition: opacity 1s;
207
- }
208
- }
209
- }
210
- }
211
- </style>
@@ -1,22 +0,0 @@
1
- <template>
2
- <div :class="[elementClasses]">
3
- <slot v-for="item in gridData" :key="item.id" :name="item.id"></slot>
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- const props = defineProps({
9
- gridData: {
10
- type: Object,
11
- default: {},
12
- },
13
- styleClassPassthrough: {
14
- type: Array as PropType<string[]>,
15
- default: () => [],
16
- },
17
- });
18
-
19
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
20
-
21
- const gridData = toRef(() => props.gridData);
22
- </script>
@@ -1,150 +0,0 @@
1
- <template>
2
- <div class="display-prompt-wrapper" :data-prompt-theme="theme" :class="[elementClasses, { dismissed: hide }]" data-test-id="display-prompt">
3
- <div class="display-prompt-inner">
4
- <div class="display-prompt-icon" data-test-id="prompt-icon">
5
- <slot name="icon"></slot>
6
- </div>
7
- <div class="display-prompt-content">
8
- <p class="title" data-test-id="display-prompt-title">
9
- <slot name="title"></slot>
10
- </p>
11
- <p v-if="hasContent" class="text" data-test-id="display-prompt-content">
12
- <slot name="content"></slot>
13
- </p>
14
- </div>
15
- <button v-if="dismissible" @click.prevent="dismissPrompt()" data-test-id="display-prompt-action" class="display-prompt-action">
16
- <Icon name="bitcoin-icons:cross-filled" class="icon" />
17
- <span class="sr-only">Really Close</span>
18
- </button>
19
- </div>
20
- </div>
21
- </template>
22
-
23
- <script setup lang="ts">
24
- const props = defineProps({
25
- dismissible: {
26
- type: Boolean,
27
- default: false,
28
- },
29
- theme: {
30
- type: String,
31
- default: 'error',
32
- validator(value: string) {
33
- return ['error', 'info', 'success', 'warning', 'secondary'].includes(value);
34
- },
35
- },
36
- styleClassPassthrough: {
37
- type: Array as PropType<string[]>,
38
- default: () => [],
39
- },
40
- iconColor: {
41
- type: String as PropType<string>,
42
- default: 'dark-grey',
43
- validator(value: string) {
44
- return ['dark-grey', 'white'].includes(value);
45
- },
46
- },
47
- });
48
-
49
- const slots = useSlots();
50
- const hasContent = ref(slots.content !== undefined);
51
- const hide = ref(false);
52
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
53
-
54
- const dismissPrompt = () => {
55
- // styleClassPassthrough.value = '';
56
- hide.value = true;
57
- };
58
- </script>
59
-
60
- <style lang="css">
61
- .display-prompt-wrapper {
62
- background-color: var(--display-prompt-wrapper-background-color);
63
- border-radius: var(--display-prompt-wrapper-border-radius);
64
- border: var(--display-prompt-wrapper-border);
65
- outline: var(--display-prompt-wrapper-outline);
66
- overflow: hidden;
67
- transition: height 200ms, opacity 200ms, display 200ms;
68
- transition-behavior: allow-discrete;
69
-
70
- &.dismissed {
71
- opacity: 0;
72
- height: 0;
73
- display: none;
74
- }
75
-
76
- .display-prompt-inner {
77
- background-color: var(--display-prompt-inner-background-color);
78
- align-items: center;
79
- border-radius: var(--display-prompt-inner-border-radius);
80
- display: flex;
81
- gap: var(--display-prompt-inner-gap);
82
- justify-content: space-between;
83
- padding: var(--display-prompt-inner-padding);
84
- margin: var(--display-prompt-inner-margin);
85
-
86
- .display-prompt-icon {
87
- display: inline-flex;
88
- .icon {
89
- color: var(--display-prompt-icon-color);
90
- display: inline-block;
91
- font-size: var(--display-prompt-icon-size);
92
- font-style: normal;
93
- font-weight: var(--display-prompt-icon-weight);
94
- overflow: hidden;
95
- }
96
- }
97
-
98
- .display-prompt-content {
99
- display: block flex;
100
- flex-direction: column;
101
- flex-grow: 1;
102
- gap: var(--display-prompt-inner-content-gap);
103
- margin: var(--display-prompt-content-margin);
104
- padding: var(--display-prompt-content-padding);
105
-
106
- .title {
107
- font-size: var(--display-prompt-content-title-font-size);
108
- font-weight: var(--display-prompt-content-title-font-weight);
109
- line-height: var(--display-prompt-content-title-line-height);
110
- color: var(--display-prompt-content-title-color);
111
- margin: var(--display-prompt-content-title-margin);
112
- padding: var(--display-prompt-content-title-padding);
113
- }
114
-
115
- .text {
116
- font-size: var(--display-prompt-content-text-font-size);
117
- font-weight: var(--display-prompt-content-text-font-weight);
118
- line-height: var(--display-prompt-content-text-line-height);
119
- color: var(--display-prompt-content-text-color);
120
- margin: var(--display-prompt-content-text-margin);
121
- padding: var(--display-prompt-content-text-padding);
122
- }
123
- }
124
- .display-prompt-action {
125
- /* all: unset; */
126
- background-color: transparent;
127
- display: block flex;
128
- align-items: center;
129
- justify-content: center;
130
- margin: var(--display-prompt-button-margin);
131
- padding: var(--display-prompt-button-padding);
132
- border: var(--display-prompt-button-border);
133
- border-radius: var(--display-prompt-button-border-radius);
134
- outline: var(--display-prompt-button-outline);
135
-
136
- &:hover {
137
- cursor: pointer;
138
- }
139
-
140
- .icon {
141
- color: var(--display-prompt-button-icon-color);
142
- display: block;
143
- font-size: var(--display-prompt-button-icon-font-size);
144
- border: 1px solid green;
145
- padding: 1rem;
146
- }
147
- }
148
- }
149
- }
150
- </style>
@@ -1,53 +0,0 @@
1
- <template>
2
- <DisplayPromptCore variant="error" :dismissible icon-color="white" :style-class-passthrough>
3
- <template #icon>
4
- <Icon name="akar-icons:circle-alert" class="icon" />
5
- </template>
6
- <template #title>
7
- <slot name="title"></slot>
8
- </template>
9
- <template v-if="hasContent" #content>
10
- <slot name="content"></slot>
11
- </template>
12
- </DisplayPromptCore>
13
- </template>
14
-
15
- <script setup lang="ts">
16
- const props = defineProps({
17
- dismissible: {
18
- type: Boolean,
19
- default: false,
20
- },
21
- styleClassPassthrough: {
22
- type: Array as PropType<string[]>,
23
- default: () => [],
24
- },
25
- });
26
-
27
- const slots = useSlots();
28
- const hasContent = ref(slots.content !== undefined);
29
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
30
- </script>
31
-
32
- <style lang="css">
33
- .display-prompt.error {
34
- --bg-color: var(--red-2);
35
- --text-color: var(--gray-00);
36
- }
37
-
38
- .display-prompt {
39
- &.error {
40
- background-color: var(--bg-color);
41
- }
42
-
43
- &-icon {
44
- .icon {
45
- color: var(--text-color);
46
- }
47
- }
48
-
49
- &-content {
50
- color: var(--text-color);
51
- }
52
- }
53
- </style>
@@ -1,103 +0,0 @@
1
- <template>
2
- <div class="layout-grid-a-wrapper" :class="[elementClasses]">
3
- <div class="layout-grid-a">
4
- <div class="slot1">
5
- <slot name="slot1"></slot>
6
- </div>
7
- <div class="slot2">
8
- <slot name="slot2"></slot>
9
- </div>
10
- <div class="slot3">
11
- <slot name="slot3"></slot>
12
- </div>
13
- <div class="slot4">
14
- <slot name="slot4"></slot>
15
- </div>
16
- </div>
17
- </div>
18
- </template>
19
-
20
- <script setup lang="ts">
21
- const props = defineProps({
22
- styleClassPassthrough: {
23
- type: Array as PropType<string[]>,
24
- default: () => [],
25
- },
26
- });
27
-
28
- const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
29
-
30
- watch(
31
- () => props.styleClassPassthrough,
32
- () => {
33
- resetElementClasses(props.styleClassPassthrough);
34
- }
35
- );
36
- </script>
37
-
38
- <style lang="css">
39
- .layout-grid-a-wrapper {
40
- container-type: inline-size;
41
-
42
- .layout-grid-a {
43
- display: grid;
44
- gap: 20px;
45
-
46
- & > div {
47
- padding: 20px;
48
- outline: 1px solid light-dark(black, white);
49
- border-radius: 5px;
50
- }
51
-
52
- @container (min-width: 768px) {
53
- grid-template-columns: repeat(2, auto);
54
- grid-template-rows: repeat(3, auto);
55
-
56
- .slot1 {
57
- grid-column: 1 / span 2;
58
- grid-row: 1;
59
- }
60
-
61
- .slot2 {
62
- grid-column: 1 / span 2;
63
- grid-row: 2;
64
- }
65
-
66
- .slot3 {
67
- grid-column: 1;
68
- grid-row: 3;
69
- }
70
-
71
- .slot4 {
72
- grid-column: 2;
73
- grid-row: 3;
74
- }
75
- }
76
-
77
- @container (min-width: 1060px) {
78
- grid-template-columns: repeat(3, auto);
79
- grid-template-rows: repeat(2, auto);
80
-
81
- .slot1 {
82
- grid-column: 1;
83
- grid-row: 1 / span 2;
84
- }
85
-
86
- .slot2 {
87
- grid-column: 2 / span 2;
88
- grid-row: 1;
89
- }
90
-
91
- .slot3 {
92
- grid-column: 2;
93
- grid-row: 2;
94
- }
95
-
96
- .slot4 {
97
- grid-column: 3;
98
- grid-row: 2;
99
- }
100
- }
101
- }
102
- }
103
- </style>