srcdev-nuxt-components 4.0.5 → 5.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 (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 +49 -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/content-grid/ContentGrid.vue +85 -0
  25. package/components/display-details/DisplayDetailsCore.vue +49 -60
  26. package/components/{functional/display-dialog → display-dialog}/DisplayDialogCore.vue +49 -38
  27. package/components/display-prompt/DisplayPromptCore.vue +187 -0
  28. package/components/expanding-panel/ExpandingPanel.vue +124 -0
  29. package/components/responsive-header/NavigationItems.vue +23 -18
  30. package/components/responsive-header/ResponsiveHeader.vue +345 -278
  31. package/components/{presentation/tabs → tabs}/TabsCore.vue +27 -58
  32. package/composables/useDialogControls.ts +22 -1
  33. package/package.json +1 -1
  34. package/assets/styles/a11y/index.css +0 -2
  35. package/assets/styles/forms/index.css +0 -2
  36. package/assets/styles/forms/themes/_error.css +0 -77
  37. package/assets/styles/forms/themes/_ghost.css +0 -77
  38. package/assets/styles/forms/themes/_input-action.css +0 -20
  39. package/assets/styles/forms/themes/_primary.css +0 -82
  40. package/assets/styles/forms/themes/_secondary.css +0 -77
  41. package/assets/styles/forms/themes/_success.css +0 -77
  42. package/assets/styles/forms/themes/_tertiary.css +0 -77
  43. package/assets/styles/forms/themes/_warning.css +0 -77
  44. package/assets/styles/forms/themes/index.css +0 -8
  45. package/assets/styles/forms/variables/_sizes.css +0 -82
  46. package/assets/styles/forms/variables/index.css +0 -2
  47. package/assets/styles/typography/index.css +0 -2
  48. package/assets/styles/typography/utils/_font-classes.css +0 -160
  49. package/assets/styles/typography/utils/_weights.css +0 -69
  50. package/assets/styles/typography/utils/index.css +0 -2
  51. package/assets/styles/typography/variables/_colors.css +0 -14
  52. package/assets/styles/typography/variables/index.css +0 -2
  53. package/assets/styles/utils/_animations.css +0 -42
  54. package/assets/styles/utils/_canvasWidths.css +0 -18
  55. package/assets/styles/utils/_display.css +0 -7
  56. package/assets/styles/utils/_page.css +0 -27
  57. package/assets/styles/utils/_placement.css +0 -73
  58. package/assets/styles/utils/index.css +0 -7
  59. package/assets/styles/variables/components/_accordian.css +0 -7
  60. package/assets/styles/variables/components/_container-glow-core.css +0 -16
  61. package/assets/styles/variables/components/_display-dialog-core.css +0 -35
  62. package/assets/styles/variables/components/_tabs.css +0 -18
  63. package/assets/styles/variables/components/display-prompt-core/_scaffolding.css +0 -57
  64. package/assets/styles/variables/components/display-prompt-core/index.css +0 -2
  65. package/assets/styles/variables/components/display-prompt-core/themes/_error.css +0 -39
  66. package/assets/styles/variables/components/display-prompt-core/themes/_info.css +0 -39
  67. package/assets/styles/variables/components/display-prompt-core/themes/_success.css +0 -39
  68. package/assets/styles/variables/components/display-prompt-core/themes/_warning.css +0 -39
  69. package/assets/styles/variables/components/index.css +0 -5
  70. package/assets/styles/variables/index.css +0 -2
  71. package/components/functional/accordian/AccordianCore.vue +0 -138
  72. package/components/presentation/display-prompt/DisplayPromptCore.vue +0 -150
  73. /package/assets/styles/{variables/components/display-prompt-core → extends-layer/srcdev-components}/themes/index.css +0 -0
  74. /package/assets/styles/{a11y → setup/a11y}/_utils.css +0 -0
  75. /package/assets/styles/{typography/variables/_reponsive-font-size.css → setup/typography/vars/_reponsive-font-sizes.css} +0 -0
  76. /package/assets/styles/{utils → setup/utility-classes}/_margin-helpers.css +0 -0
  77. /package/assets/styles/{utils → setup/utility-classes}/_padding-helpers.css +0 -0
  78. /package/assets/styles/{variables → setup/variables}/colors/_blue.css +0 -0
  79. /package/assets/styles/{variables → setup/variables}/colors/_gray.css +0 -0
  80. /package/assets/styles/{variables → setup/variables}/colors/_green.css +0 -0
  81. /package/assets/styles/{variables → setup/variables}/colors/_orange.css +0 -0
  82. /package/assets/styles/{variables → setup/variables}/colors/_red.css +0 -0
  83. /package/assets/styles/{variables → setup/variables}/colors/_yellow.css +0 -0
  84. /package/assets/styles/{variables/colors/colors.css → setup/variables/colors/index.css} +0 -0
  85. /package/components/{functional/display-dialog → display-dialog}/variants/DisplayDialogConfirm.vue +0 -0
  86. /package/components/{functional/display-dialog → display-dialog}/variants/DisplayDialogScrollableContent.vue +0 -0
  87. /package/components/{presentation/display-grid → display-grid}/DisplayGridCore.vue +0 -0
  88. /package/components/{presentation/display-prompt → display-prompt}/variants/DisplayPromptError.vue +0 -0
  89. /package/components/{presentation/layout-grids → layout-grids}/LayoutGridA.vue +0 -0
  90. /package/components/{presentation/layout-grids → layout-grids}/LayoutGridB.vue +0 -0
  91. /package/components/{presentation/layout-row → layout-row}/LayoutRow.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
  }
@@ -0,0 +1,85 @@
1
+ <template>
2
+ <div class="ui-content-grid" :class="[applyClasses]" :data-testid="dataTestid">
3
+ <div v-if="hasSlot1" class="col-1">
4
+ <slot name="slot1"></slot>
5
+ </div>
6
+ <div v-if="hasSlot2" class="col-2">
7
+ <slot name="slot2"></slot>
8
+ </div>
9
+ </div>
10
+ </template>
11
+
12
+ <script setup lang="ts">
13
+ const props = defineProps({
14
+ dataTestid: {
15
+ type: String,
16
+ default: 'ui-content-grid',
17
+ },
18
+ applyClasses: {
19
+ type: String,
20
+ default: '',
21
+ },
22
+ });
23
+
24
+ const slots = useSlots();
25
+ const hasSlot1 = ref(slots.slot1 !== undefined);
26
+ const hasSlot2 = ref(slots.slot2 !== undefined);
27
+ </script>
28
+
29
+ <style lang="css">
30
+ .ui-content-grid {
31
+ --_margin-inline: 0;
32
+ --_grid-template-columns: repeat(4, 1fr);
33
+ --_grid-template-rows: repeat(2, auto);
34
+ --_grid-gap: 1.6rem;
35
+
36
+ display: grid;
37
+ gap: var(--_grid-gap);
38
+ grid-template-columns: var(--_grid-template-columns);
39
+ grid-template-rows: var(--_grid-template-rows);
40
+ margin-inline: var(--_margin-inline);
41
+
42
+ @container content (min-width: 768px) {
43
+ --_margin-inline: 0;
44
+ --_grid-template-columns: repeat(6, 1fr);
45
+ --_grid-gap: 3.2rem;
46
+ }
47
+
48
+ @container content (min-width: 1024px) {
49
+ --_margin-inline: 0;
50
+ --_grid-template-columns: repeat(12, 1fr);
51
+ --_grid-template-rows: initial;
52
+ }
53
+
54
+ .col-1 {
55
+ --_grid-column: 1 / span 4;
56
+ --_grid-row: 1;
57
+ grid-column: var(--_grid-column);
58
+ grid-row: var(--_grid-row);
59
+
60
+ @container content (min-width: 768px) {
61
+ --_grid-column: 1 / span 6;
62
+ }
63
+
64
+ @container content (min-width: 1024px) {
65
+ --_grid-column: 1 / span 6;
66
+ }
67
+ }
68
+
69
+ .col-2 {
70
+ --_grid-column: 1 / span 4;
71
+ --_grid-row: 2;
72
+ grid-column: var(--_grid-column);
73
+ grid-row: var(--_grid-row);
74
+
75
+ @container content (min-width: 768px) {
76
+ --_grid-column: 1 / span 6;
77
+ }
78
+
79
+ @container content (min-width: 1024px) {
80
+ --_grid-column: 7 / span 6;
81
+ --_grid-row: 1;
82
+ }
83
+ }
84
+ }
85
+ </style>
@@ -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>