srcdev-nuxt-components 4.0.6 → 5.0.1

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 (94) hide show
  1. package/README.md +171 -2
  2. package/assets/styles/extends-layer/srcdev-components/display-prompt-core/index.css +70 -0
  3. package/assets/styles/extends-layer/srcdev-components/index.css +2 -0
  4. package/assets/styles/extends-layer/srcdev-components/themes/_error.css +15 -0
  5. package/assets/styles/extends-layer/srcdev-components/themes/_info.css +15 -0
  6. package/assets/styles/extends-layer/srcdev-components/themes/_success.css +15 -0
  7. package/assets/styles/extends-layer/srcdev-components/themes/_warning.css +15 -0
  8. package/assets/styles/main.css +2 -5
  9. package/assets/styles/{forms/variables/_theme.css → setup/_head.css} +0 -6
  10. package/assets/styles/{a11y → setup/a11y}/_variables.css +2 -0
  11. package/assets/styles/setup/a11y/index.css +2 -0
  12. package/assets/styles/setup/index.css +5 -0
  13. package/assets/styles/setup/typography/index.css +2 -0
  14. package/assets/styles/setup/typography/utility-classes/_generic-font-classes.css +192 -0
  15. package/assets/styles/setup/typography/utility-classes/_generic-font-variation-settings.css +29 -0
  16. package/assets/styles/setup/typography/utility-classes/_generic-font-weights.css +41 -0
  17. package/assets/styles/setup/typography/utility-classes/index.css +3 -0
  18. package/assets/styles/setup/typography/vars/index.css +1 -0
  19. package/assets/styles/setup/utility-classes/_page.css +50 -0
  20. package/assets/styles/setup/utility-classes/index.css +3 -0
  21. package/assets/styles/setup/variables/index.css +1 -0
  22. package/components/accordian/AccordianCore.vue +46 -0
  23. package/components/{presentation/container-glow → container-glow}/ContainerGlowCore.vue +80 -80
  24. package/components/display-details/DisplayDetailsCore.vue +49 -60
  25. package/components/{functional/display-dialog → display-dialog}/DisplayDialogCore.vue +49 -38
  26. package/components/display-prompt/DisplayPromptCore.vue +187 -0
  27. package/components/expanding-panel/ExpandingPanel.vue +124 -0
  28. package/components/{presentation/layout-row → layout-row}/LayoutRow.vue +12 -4
  29. package/components/responsive-header/NavigationItems.vue +23 -18
  30. package/components/responsive-header/ResponsiveHeader.vue +376 -276
  31. package/components/skip-links/SkipLinks.vue +85 -0
  32. package/components/{presentation/tabs → tabs}/TabsCore.vue +27 -58
  33. package/composables/useDialogControls.ts +22 -1
  34. package/package.json +1 -1
  35. package/assets/styles/a11y/index.css +0 -2
  36. package/assets/styles/forms/index.css +0 -2
  37. package/assets/styles/forms/themes/_error.css +0 -77
  38. package/assets/styles/forms/themes/_ghost.css +0 -77
  39. package/assets/styles/forms/themes/_input-action.css +0 -20
  40. package/assets/styles/forms/themes/_primary.css +0 -82
  41. package/assets/styles/forms/themes/_secondary.css +0 -77
  42. package/assets/styles/forms/themes/_success.css +0 -77
  43. package/assets/styles/forms/themes/_tertiary.css +0 -77
  44. package/assets/styles/forms/themes/_warning.css +0 -77
  45. package/assets/styles/forms/themes/index.css +0 -8
  46. package/assets/styles/forms/variables/_sizes.css +0 -82
  47. package/assets/styles/forms/variables/index.css +0 -2
  48. package/assets/styles/typography/index.css +0 -2
  49. package/assets/styles/typography/utils/_font-classes.css +0 -160
  50. package/assets/styles/typography/utils/_weights.css +0 -69
  51. package/assets/styles/typography/utils/index.css +0 -2
  52. package/assets/styles/typography/variables/_colors.css +0 -14
  53. package/assets/styles/typography/variables/index.css +0 -2
  54. package/assets/styles/utils/_animations.css +0 -42
  55. package/assets/styles/utils/_canvasWidths.css +0 -18
  56. package/assets/styles/utils/_display.css +0 -7
  57. package/assets/styles/utils/_page.css +0 -27
  58. package/assets/styles/utils/_placement.css +0 -73
  59. package/assets/styles/utils/index.css +0 -7
  60. package/assets/styles/variables/components/_accordian.css +0 -7
  61. package/assets/styles/variables/components/_container-glow-core.css +0 -16
  62. package/assets/styles/variables/components/_display-dialog-core.css +0 -35
  63. package/assets/styles/variables/components/_tabs.css +0 -18
  64. package/assets/styles/variables/components/display-prompt-core/_scaffolding.css +0 -57
  65. package/assets/styles/variables/components/display-prompt-core/index.css +0 -2
  66. package/assets/styles/variables/components/display-prompt-core/themes/_error.css +0 -39
  67. package/assets/styles/variables/components/display-prompt-core/themes/_info.css +0 -39
  68. package/assets/styles/variables/components/display-prompt-core/themes/_success.css +0 -39
  69. package/assets/styles/variables/components/display-prompt-core/themes/_warning.css +0 -39
  70. package/assets/styles/variables/components/index.css +0 -5
  71. package/assets/styles/variables/index.css +0 -2
  72. package/components/functional/accordian/AccordianCore.vue +0 -138
  73. package/components/presentation/display-prompt/DisplayPromptCore.vue +0 -150
  74. /package/assets/styles/{variables/components/display-prompt-core → extends-layer/srcdev-components}/themes/index.css +0 -0
  75. /package/assets/styles/{a11y → setup/a11y}/_utils.css +0 -0
  76. /package/assets/styles/{typography/variables/_reponsive-font-size.css → setup/typography/vars/_reponsive-font-sizes.css} +0 -0
  77. /package/assets/styles/{utils → setup/utility-classes}/_margin-helpers.css +0 -0
  78. /package/assets/styles/{utils → setup/utility-classes}/_padding-helpers.css +0 -0
  79. /package/assets/styles/{variables → setup/variables}/colors/_blue.css +0 -0
  80. /package/assets/styles/{variables → setup/variables}/colors/_gray.css +0 -0
  81. /package/assets/styles/{variables → setup/variables}/colors/_green.css +0 -0
  82. /package/assets/styles/{variables → setup/variables}/colors/_orange.css +0 -0
  83. /package/assets/styles/{variables → setup/variables}/colors/_red.css +0 -0
  84. /package/assets/styles/{variables → setup/variables}/colors/_yellow.css +0 -0
  85. /package/assets/styles/{variables/colors/colors.css → setup/variables/colors/index.css} +0 -0
  86. /package/components/{functional/display-dialog → display-dialog}/variants/DisplayDialogConfirm.vue +0 -0
  87. /package/components/{functional/display-dialog → display-dialog}/variants/DisplayDialogScrollableContent.vue +0 -0
  88. /package/components/{presentation/display-grid → display-grid}/DisplayGridCore.vue +0 -0
  89. /package/components/{presentation/display-prompt → display-prompt}/variants/DisplayPromptError.vue +0 -0
  90. /package/components/{presentation/layout-grids → layout-grids}/LayoutGridA.vue +0 -0
  91. /package/components/{presentation/layout-grids → layout-grids}/LayoutGridB.vue +0 -0
  92. /package/components/{presentation/masonry-grid → masonry-grid}/MasonryGrid.vue +0 -0
  93. /package/components/{presentation/masonry-grid-sorted → masonry-grid-sorted}/MasonryGridSorted.vue +0 -0
  94. /package/components/{functional/pop-over → pop-over}/PopOver.vue +0 -0
@@ -0,0 +1 @@
1
+ @import './colors/';
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <div class="display-accordian" :class="[elementClasses]">
3
+ <ExpandingPanel v-for="(item, key) in itemCount" :key="key" :name :animation-duration="300" icon-size="medium" :style-class-passthrough="['accordian-item']">
4
+ <template #summary>
5
+ <slot :name="`accordian-${key}-summary`"></slot>
6
+ </template>
7
+ <template #icon>
8
+ <slot :name="`accordian-${key}-icon`"></slot>
9
+ </template>
10
+ <template #content>
11
+ <slot :name="`accordian-${key}-content`"></slot>
12
+ </template>
13
+ </ExpandingPanel>
14
+ </div>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ const props = defineProps({
19
+ name: {
20
+ type: String,
21
+ default: null,
22
+ },
23
+ itemCount: {
24
+ type: Number as PropType<number>,
25
+ default: 0,
26
+ },
27
+ animationDuration: {
28
+ type: Number,
29
+ default: 400,
30
+ },
31
+ styleClassPassthrough: {
32
+ type: Array as PropType<string[]>,
33
+ default: () => [],
34
+ },
35
+ });
36
+
37
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
38
+ const animationDurationStr = computed(() => `${props.animationDuration}ms`);
39
+ </script>
40
+
41
+ <style lang="css">
42
+ .display-accordian {
43
+ max-width: 600px;
44
+ margin: 0 auto;
45
+ }
46
+ </style>
@@ -1,24 +1,26 @@
1
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>
2
+ <div class="container-glow-wrapper" :class="elementClasses" ref="containerGlowWrapper">
3
+ <component :is="tag" v-for="(item, key) in itemCount" :key="key" class="container-glow-core" ref="containerGlowItem">
4
+ <div class="glows"></div>
5
+ <slot :name="`container-glow-${key}`"></slot>
6
+ </component>
9
7
  </div>
10
8
  </template>
11
9
 
12
10
  <script setup lang="ts">
13
- interface Data {
14
- title: string;
15
- content: string;
11
+ interface Config {
12
+ proximity: number;
13
+ spread: number;
14
+ blur: number;
15
+ gap: number;
16
+ vertical: boolean;
17
+ opacity: number;
16
18
  }
17
19
 
18
20
  const props = defineProps({
19
- data: {
20
- type: Array as PropType<Data[]>,
21
- default: () => [],
21
+ itemCount: {
22
+ type: Number,
23
+ required: true,
22
24
  },
23
25
  tag: {
24
26
  type: String as PropType<string>,
@@ -28,6 +30,17 @@ const props = defineProps({
28
30
  type: Array as PropType<string[]>,
29
31
  default: () => [],
30
32
  },
33
+ config: {
34
+ type: Object as PropType<Config>,
35
+ default: () => ({
36
+ proximity: 40,
37
+ spread: 80,
38
+ blur: 20,
39
+ gap: 32,
40
+ vertical: false,
41
+ opacity: 0.15,
42
+ }),
43
+ },
31
44
  });
32
45
 
33
46
  const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
@@ -37,54 +50,43 @@ const controller = new AbortController();
37
50
  const containerGlowWrapper = ref<HTMLElement>();
38
51
  const containerGlowItem = ref<HTMLElement[]>([]);
39
52
 
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) => {
53
+ const updateStyles = (event: PointerEvent) => {
52
54
  // get the angle based on the center point of the card and pointer position
53
- for (const CARD of containerGlowItem.value) {
55
+ for (const cardElem of containerGlowItem.value) {
54
56
  // Check the card against the proximity and then start updating
55
- const CARD_BOUNDS = CARD.getBoundingClientRect();
57
+ const cardBounds = cardElem.getBoundingClientRect();
56
58
  // Get distance between pointer and outerbounds of card
57
59
  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
60
+ event?.x > cardBounds.left - props.config.proximity &&
61
+ event?.x < cardBounds.left + cardBounds.width + props.config.proximity &&
62
+ event?.y > cardBounds.top - props.config.proximity &&
63
+ event?.y < cardBounds.top + cardBounds.height + props.config.proximity
62
64
  ) {
63
65
  // If within proximity set the active opacity
64
- CARD.style.setProperty('--active', String(1));
66
+ cardElem.style.setProperty('--opacity-active', String(1));
65
67
  } else {
66
- CARD.style.setProperty('--active', String(CONFIG.opacity));
68
+ cardElem.style.setProperty('--opacity-active', String(props.config.opacity));
67
69
  }
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));
70
+ const cardCentre = [cardBounds.left + cardBounds.width * 0.5, cardBounds.top + cardBounds.height * 0.5];
71
+ let angle = (Math.atan2(event?.y - cardCentre[1], event?.x - cardCentre[0]) * 180) / Math.PI;
72
+ angle = angle < 0 ? angle + 360 : angle;
73
+ cardElem.style.setProperty('--start', String(angle + 90));
72
74
  }
73
75
  };
74
76
 
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');
77
+ const applyStyles = () => {
78
+ containerGlowWrapper.value?.style.setProperty('--gap', String(props.config.gap));
79
+ containerGlowWrapper.value?.style.setProperty('--blur', String(props.config.blur));
80
+ containerGlowWrapper.value?.style.setProperty('--spread', String(props.config.spread));
81
+ containerGlowWrapper.value?.style.setProperty('--direction', props.config.vertical ? 'column' : 'row');
80
82
  };
81
83
 
82
- // document.body.addEventListener('pointermove', UPDATE);
84
+ // document.body.addEventListener('pointermove', updateStyles);
83
85
 
84
86
  onMounted(() => {
85
- RESTYLE();
87
+ applyStyles();
86
88
  if (containerGlowWrapper.value) {
87
- document.body.addEventListener('pointermove', UPDATE, {
89
+ document.body.addEventListener('pointermove', updateStyles, {
88
90
  signal: controller.signal,
89
91
  });
90
92
  }
@@ -97,21 +99,6 @@ onBeforeUnmount(() => {
97
99
 
98
100
  <style lang="css">
99
101
  .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
102
  @property --start {
116
103
  syntax: '<number>';
117
104
  inherits: true;
@@ -128,55 +115,68 @@ onBeforeUnmount(() => {
128
115
  box-sizing: border-box;
129
116
  }
130
117
 
131
- --active: 0.15;
118
+ --gradient: conic-gradient(
119
+ from 180deg at 50% 70%,
120
+ hsla(0, 0%, 98%, 1) 0deg,
121
+ #eec32d 72.0000010728836deg,
122
+ #ec4b4b 144.0000021457672deg,
123
+ #709ab9 216.00000858306885deg,
124
+ #4dffbf 288.0000042915344deg,
125
+ hsla(0, 0%, 98%, 1) 1turn
126
+ );
127
+ --opacity-active: 0.15;
132
128
  --start: 0;
129
+
130
+ position: relative;
131
+
133
132
  height: 100%;
134
- background: var(--card);
133
+ background: light-dark(white, hsl(246 44% 7%));
135
134
  padding: 2rem;
136
135
  aspect-ratio: 330 / 400;
137
- border-radius: var(--container-border-radius);
136
+ border-radius: 12px;
138
137
  min-width: 280px;
139
138
  max-width: 280px;
140
139
  display: flex;
141
140
  flex-direction: column;
142
141
  gap: 0.25rem;
143
- position: relative;
144
142
 
145
143
  &:is(:hover, :focus-visible) {
146
144
  z-index: 2;
147
145
  }
148
146
 
149
- &::before {
147
+ &::before,
148
+ &::after {
149
+ content: '';
150
150
  position: absolute;
151
151
  inset: 0;
152
- border: var(--container-border-width) solid transparent;
153
- content: '';
154
- border-radius: var(--container-border-radius);
152
+ }
153
+
154
+ &::before {
155
155
  pointer-events: none;
156
- background: var(--container-border-colour);
156
+
157
+ border: 2px solid transparent;
158
+ border-radius: 12px;
159
+ background: hsl(280 10% 50% / 1);
157
160
  background-attachment: fixed;
158
- border-radius: var(--container-border-radius);
161
+ border-radius: 12px;
159
162
  mask: linear-gradient(#0000, #0000),
160
163
  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
164
  mask-clip: padding-box, border-box;
162
165
  mask-composite: intersect;
163
- opacity: var(--active);
166
+ opacity: var(--opacity-active);
164
167
  transition: opacity 1s;
165
168
  }
166
169
 
167
170
  &::after {
168
- /* --container-bg-colour-size: 100%; */
169
- content: '';
170
171
  pointer-events: none;
171
- position: absolute;
172
+
172
173
  background: var(--gradient);
173
174
  background-attachment: fixed;
174
- border-radius: var(--container-border-radius);
175
- opacity: var(--active, 0);
175
+ border-radius: 12px;
176
+ opacity: var(--opacity-active, 0);
176
177
  transition: opacity 1s;
177
178
  --alpha: 0;
178
- inset: 0;
179
- border: var(--container-border-width) solid transparent;
179
+ border: 2px solid transparent;
180
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
181
  filter: brightness(1.5);
182
182
  mask-clip: padding-box, border-box;
@@ -198,11 +198,11 @@ onBeforeUnmount(() => {
198
198
  position: absolute;
199
199
  inset: -5px;
200
200
  border: 10px solid transparent;
201
- border-radius: var(--container-border-radius);
201
+ border-radius: 12px;
202
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
203
  mask-composite: intersect;
204
204
  mask-clip: padding-box, border-box;
205
- opacity: var(--active);
205
+ opacity: var(--opacity-active);
206
206
  transition: opacity 1s;
207
207
  }
208
208
  }
@@ -18,7 +18,13 @@
18
18
  // Create a global store to track open details elements by name
19
19
  const openDetailsByName = reactive(new Map<string, HTMLDetailsElement>());
20
20
 
21
- export const useDetailsTransition = (detailsRef: Ref<HTMLDetailsElement | null>, summaryRef: Ref<HTMLElement | null>, contentRef: Ref<HTMLDivElement | null>, name: string, animationDuration: number) => {
21
+ export const useDetailsTransition = (
22
+ detailsRef: Ref<HTMLDetailsElement | null>,
23
+ summaryRef: Ref<HTMLElement | null>,
24
+ contentRef: Ref<HTMLDivElement | null>,
25
+ name: string,
26
+ animationDuration: number
27
+ ) => {
22
28
  // State
23
29
  const animation = ref<Animation | null>(null);
24
30
  const isClosing = ref(false);
@@ -101,7 +107,7 @@ export const useDetailsTransition = (detailsRef: Ref<HTMLDetailsElement | null>,
101
107
  },
102
108
  {
103
109
  duration: animationDuration,
104
- easing: 'ease-out',
110
+ easing: 'linear',
105
111
  }
106
112
  );
107
113
 
@@ -140,7 +146,7 @@ export const useDetailsTransition = (detailsRef: Ref<HTMLDetailsElement | null>,
140
146
  },
141
147
  {
142
148
  duration: animationDuration,
143
- easing: 'ease-out',
149
+ easing: 'linear',
144
150
  }
145
151
  );
146
152
 
@@ -237,76 +243,59 @@ onMounted(() => {
237
243
  </script>
238
244
 
239
245
  <style lang="css">
240
- .display-details {
241
- /* Component setup */
242
- --_display-details-icon-transform: scaleY(1);
243
- --_display-details-icon-size: 1.2rem;
246
+ .display-details {
247
+ border: none;
248
+ outline: none;
249
+ box-shadow: none;
250
+ border-radius: 0;
244
251
 
245
- /* Configurable properties */
246
- --_display-details-border: none;
247
- --_display-details-outline: none;
248
- --_display-details-box-shadow: none;
249
- --_display-details-border-radius: 0;
250
- --_display-details-mbe: 1em;
251
-
252
- --_display-details-summary-gap: 12px;
253
- --_display-details-summary-flex-direction: row;
254
-
255
- --_display-details-content-padding: 0;
256
-
257
- &.medium {
258
- --_display-details-icon-size: 1.8rem;
259
- }
260
- &.large {
261
- --_display-details-icon-size: 2.4rem;
252
+ &[open] {
253
+ .display-details-summary {
254
+ .icon {
255
+ transform: scaleY(-1);
256
+ }
262
257
  }
258
+ }
263
259
 
264
- &[open] {
265
- --_display-details-icon-transform: scaleY(-1);
266
- }
260
+ .display-details-summary {
261
+ display: flex;
262
+ align-items: center;
263
+ justify-content: space-between;
264
+ flex-direction: row;
265
+ gap: 0;
267
266
 
268
- border: var(--_display-details-border);
269
- outline: var(--_display-details-outline);
270
- box-shadow: var(--_display-details-box-shadow);
271
- border-radius: var(--_display-details-border-radius);
272
- margin-block-end: var(--_display-details-mbe);
267
+ list-style: none;
273
268
 
274
- .display-details-summary {
269
+ &::-webkit-details-marker,
270
+ &::marker {
271
+ display: none;
272
+ }
275
273
 
276
- display: flex;
277
- align-items: center;
278
- justify-content: space-between;
274
+ overflow: clip;
279
275
 
280
- list-style: none;
276
+ .label {
277
+ display: block;
278
+ flex-grow: 1;
279
+ }
281
280
 
282
- &::-webkit-details-marker,
283
- &::marker {
284
- display: none;
285
- }
281
+ .icon {
282
+ display: block;
286
283
 
287
- display: flex !important;
288
- flex-direction: var(--_display-details-summary-flex-direction);
289
- align-items: center;
290
- gap: var(--_display-details-summary-gap);
291
- overflow: clip;
284
+ transform: scaleY(1);
285
+ transition: transform 200ms;
292
286
 
293
- .label {
294
- display: block;
295
- flex-grow: 1;
287
+ font-size: 1.2rem;
288
+ &.medium {
289
+ font-size: 1.8rem;
296
290
  }
297
-
298
- .icon {
299
- display: block;
300
-
301
- font-size: var(--_display-details-icon-size);
302
- transform: var(--_display-details-icon-transform);
303
- transition: transform 200ms;
291
+ &.large {
292
+ font-size: 2.4rem;
304
293
  }
305
294
  }
306
-
307
- .display-details-content {
308
- padding: var(--_display-details-content-padding);
309
- }
310
295
  }
311
296
 
297
+ .display-details-content {
298
+ /* Use an inner element for styling */
299
+ }
300
+ }
312
301
  </style>
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <dialog class="display-dialog-core" :class="[variant, elementClasses]" role="dialog" :align-dialog :open :data-dialog-id="dataDialogId" ref="dialogRef">
2
+ <dialog class="display-dialog-core" :class="[elementClasses]" role="dialog" :align-dialog :justify-dialog :open :data-dialog-id="dataDialogId" ref="dialogRef">
3
3
  <focus-trap v-model:active="open" :clickOutsideDeactivates="true" @deactivate="closeDialog()">
4
- <div class="inner">
4
+ <div class="inner" :class="[variant]">
5
5
  <div class="header">
6
6
  <div v-if="hasDialogTitle" class="col-left">
7
7
  <slot name="dialogTitle"></slot>
@@ -40,15 +40,15 @@ const props = defineProps({
40
40
  default: 'dialog',
41
41
  validator: (val) => ['dialog', 'modal', 'confirm'].includes(val as string),
42
42
  },
43
- positionX: {
43
+ justifyDialog: {
44
44
  type: String,
45
45
  default: 'center',
46
- validator: (val) => ['left', 'center', 'right'].includes(val as string),
46
+ validator: (val) => ['start', 'center', 'end'].includes(val as string),
47
47
  },
48
- positionY: {
48
+ alignDialog: {
49
49
  type: String,
50
50
  default: 'center',
51
- validator: (val) => ['top', 'center', 'bottom'].includes(val as string),
51
+ validator: (val) => ['start', 'center', 'end'].includes(val as string),
52
52
  },
53
53
  lockViewport: {
54
54
  type: Boolean,
@@ -83,8 +83,6 @@ const hasDialogTitle = computed(() => slots.dialogTitle !== undefined);
83
83
  const hasDialogContent = computed(() => slots.dialogContent !== undefined);
84
84
  const hasActionButtons = computed(() => slots.actionButtons !== undefined);
85
85
 
86
- const alignDialog = computed(() => `${props.positionY}-${props.positionX}`);
87
-
88
86
  onMounted(() => {
89
87
  bodyTag.value = document.querySelector('body');
90
88
  if (lockViewport.value && bodyTag.value !== null) {
@@ -95,9 +93,6 @@ onMounted(() => {
95
93
 
96
94
  <style lang="css">
97
95
  .display-dialog-core {
98
- --_dialog-inner-height: initial;
99
- --_dialog-inner-width: 100vw;
100
-
101
96
  display: flex;
102
97
  position: fixed;
103
98
  left: 0;
@@ -106,7 +101,7 @@ onMounted(() => {
106
101
  height: 100%;
107
102
  backdrop-filter: blur(5px);
108
103
  background-color: rgba(0, 0, 0, 0.5);
109
- z-index: 13;
104
+ z-index: 999999;
110
105
  opacity: 0;
111
106
  border: none;
112
107
  padding: 0;
@@ -125,54 +120,70 @@ onMounted(() => {
125
120
  }
126
121
  }
127
122
 
128
- &[align-dialog$='center'] {
129
- justify-content: center;
130
- }
131
- &[align-dialog^='center'] {
132
- align-items: center;
123
+ /* * Positioning the dialog */
124
+ &[justify-dialog='start'] {
125
+ justify-content: flex-start;
133
126
  }
134
127
 
135
- &.confirm {
136
- --_dialog-inner-width: initial;
128
+ &[justify-dialog='center'] {
129
+ justify-content: center;
137
130
  }
138
131
 
139
- &.dialog {
140
- --_dialog-inner-height: 70dvh;
141
- --_dialog-inner-width: min(75%, 720px);
132
+ &[justify-dialog='end'] {
133
+ justify-content: flex-end;
142
134
  }
143
135
 
144
- &.form {
145
- --_dialog-inner-width: initial;
136
+ &[align-dialog='start'] {
137
+ align-items: flex-start;
146
138
  }
147
139
 
148
- &.fullscreen {
149
- --_dialog-inner-width: initial;
140
+ &[align-dialog='center'] {
141
+ align-items: center;
150
142
  }
151
-
152
- &.modal {
153
- --_dialog-inner-width: initial;
143
+ &[align-dialog='end'] {
144
+ align-items: flex-end;
154
145
  }
155
146
 
156
147
  .inner {
157
148
  display: grid;
158
149
  grid-template-rows: auto 1fr auto;
159
150
 
160
- border-radius: var(--dialog-border-radius);
161
- border: var(--dialog-border);
162
- outline: var(--dialog-outline);
151
+ border-radius: 8px;
152
+ border: 1px solid light-dark(var(--gray-10), var(--gray-2));
153
+ outline: 1px solid light-dark(var(--gray-12), var(--gray-0));
163
154
 
164
155
  background-color: var(--dialog-inner-background);
165
- height: var(--_dialog-inner-height);
166
- width: var(--_dialog-inner-width);
167
-
156
+ height: initial;
157
+ width: 100vw;
168
158
  overflow: hidden;
169
159
 
160
+ &.confirm {
161
+ width: initial;
162
+ }
163
+
164
+ &.dialog {
165
+ height: 70dvh;
166
+ width: min(75%, 720px);
167
+ }
168
+
169
+ &.form {
170
+ width: initial;
171
+ }
172
+
173
+ &.fullscreen {
174
+ width: initial;
175
+ }
176
+
177
+ &.modal {
178
+ width: initial;
179
+ }
180
+
170
181
  .header {
171
182
  display: grid;
172
183
  grid-template-columns: auto 1fr auto;
173
184
  align-items: center;
174
185
 
175
- padding: var(--dialog-header-padding);
186
+ padding: 12px;
176
187
 
177
188
  .col-left {
178
189
  /* grid-column: 1; */
@@ -223,7 +234,7 @@ onMounted(() => {
223
234
 
224
235
  .dialog-content {
225
236
  overflow: hidden;
226
- padding: var(--dialog-content-padding);
237
+ padding: 12px;
227
238
 
228
239
  &.allow-content-scroll {
229
240
  overflow-y: auto;
@@ -237,7 +248,7 @@ onMounted(() => {
237
248
  display: flex;
238
249
  gap: 1.2rem;
239
250
  justify-content: flex-end;
240
- padding: var(--dialog-footer-padding);
251
+ padding: 12px;
241
252
  }
242
253
  }
243
254
  }