tide-design-system 2.2.0 → 2.2.2

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.
@@ -6,26 +6,44 @@ import { nextTick } from 'vue';
6
6
  * HTML dialog elements.
7
7
  */
8
8
  export const setScrollLock = async (isLocked: boolean) => {
9
- const BODY_LOCK_CLASS = 'body-scroll-lock';
9
+ // Cannot be applied to body tag in marketplace repo due to data-css-scope
10
+ // const BODY_LOCK_CLASS = 'body-scroll-lock';
11
+
10
12
  const body = document.body;
11
13
 
12
14
  if (isLocked) {
13
15
  if (!body.dataset.scrollLockY) {
14
16
  const scrollY = window.scrollY;
17
+
15
18
  body.dataset.scrollLockY = scrollY.toString();
16
19
  body.style.setProperty('--saved-scroll-y', `${scrollY}px`);
17
- body.classList.add(BODY_LOCK_CLASS);
20
+ body.style.setProperty('inset', '0');
21
+ body.style.setProperty('margin-top', `calc(0px - var(--saved-scroll-y, 0px))`);
22
+ body.style.setProperty('overflow-y', 'scroll');
23
+ body.style.setProperty('position', 'fixed');
24
+
25
+ // Cannot be applied to body tag in marketplace repo due to data-css-scope
26
+ // body.classList.add(BODY_LOCK_CLASS);
18
27
  }
19
28
  } else {
20
29
  await nextTick();
21
30
  if (!document.querySelector('dialog[open]')) {
22
31
  const savedScrollY = parseInt(body.dataset.scrollLockY || '0');
23
- body.classList.remove(BODY_LOCK_CLASS);
32
+
33
+ // Cannot be applied to body tag in marketplace repo due to data-css-scope
34
+ // body.classList.remove(BODY_LOCK_CLASS);
35
+
36
+ body.style.removeProperty('inset');
37
+ body.style.removeProperty('marginTop');
38
+ body.style.removeProperty('overflowY');
39
+ body.style.removeProperty('position');
24
40
  body.style.removeProperty('--saved-scroll-y');
41
+
25
42
  window.scrollTo({
26
43
  behavior: 'auto',
27
44
  top: savedScrollY,
28
45
  });
46
+
29
47
  delete body.dataset.scrollLockY;
30
48
  }
31
49
  }
package/package.json CHANGED
@@ -61,7 +61,7 @@
61
61
  "main": "dist/tide-design-system.cjs",
62
62
  "module": "dist/tide-design-system.esm.js",
63
63
  "types": "dist/tide-design-system.esm.d.ts",
64
- "version": "2.2.0",
64
+ "version": "2.2.2",
65
65
  "dependencies": {
66
66
  "@floating-ui/vue": "^1.1.6"
67
67
  }
@@ -5,6 +5,7 @@ body {
5
5
  line-height: 1.4;
6
6
  }
7
7
 
8
+ /* Cannot be applied to body tag in marketplace repo due to data-css-scope */
8
9
  .body-scroll-lock {
9
10
  inset: 0;
10
11
  margin-top: calc(0px - var(--saved-scroll-y, 0px));
@@ -20,15 +20,14 @@
20
20
  <div
21
21
  :class="[
22
22
  'tide-badge',
23
- props.isFloating
24
- ? [CSS.BG.SURFACE.FLOATING, CSS.FONT.ROLE.LABEL_3, CSS.SHADOW.BOTTOM]
25
- : [CSS.BG.SURFACE.VARIANT, CSS.FONT.ROLE.LABEL_2],
23
+ props.isFloating ? [CSS.BG.SURFACE.FLOATING, CSS.SHADOW.BOTTOM] : [CSS.BG.SURFACE.VARIANT],
26
24
  CSS.DISPLAY.INLINE_FLEX,
27
25
  CSS.AXIS2.CENTER,
28
26
  CSS.GAP.QUARTER,
29
27
  CSS.BORDER.RADIUS.QUARTER,
30
28
  CSS.PADDING.Y.QUARTER,
31
29
  CSS.PADDING.X.HALF,
30
+ CSS.FONT.ROLE.LABEL_2,
32
31
  ]"
33
32
  >
34
33
  <TideIcon
@@ -185,6 +185,7 @@
185
185
  :class="[
186
186
  'tide-carousel-button-overlay',
187
187
  CSS.POSITION.ABSOLUTE,
188
+ CSS.POSITIONING.TOP,
188
189
  CSS.DISPLAY.FLEX,
189
190
  CSS.AXIS1.BETWEEN,
190
191
  CSS.AXIS2.CENTER,
@@ -16,6 +16,7 @@
16
16
  <template>
17
17
  <div
18
18
  :class="[
19
+ 'tide-divider',
19
20
  CSS.BORDER.COLOR.LOW,
20
21
  props.orientation === ORIENTATION.HORIZONTAL
21
22
  ? [CSS.MARGIN.Y.HALF, CSS.BORDER.BOTTOM.ONE]
@@ -6,26 +6,44 @@ import { nextTick } from 'vue';
6
6
  * HTML dialog elements.
7
7
  */
8
8
  export const setScrollLock = async (isLocked: boolean) => {
9
- const BODY_LOCK_CLASS = 'body-scroll-lock';
9
+ // Cannot be applied to body tag in marketplace repo due to data-css-scope
10
+ // const BODY_LOCK_CLASS = 'body-scroll-lock';
11
+
10
12
  const body = document.body;
11
13
 
12
14
  if (isLocked) {
13
15
  if (!body.dataset.scrollLockY) {
14
16
  const scrollY = window.scrollY;
17
+
15
18
  body.dataset.scrollLockY = scrollY.toString();
16
19
  body.style.setProperty('--saved-scroll-y', `${scrollY}px`);
17
- body.classList.add(BODY_LOCK_CLASS);
20
+ body.style.setProperty('inset', '0');
21
+ body.style.setProperty('margin-top', `calc(0px - var(--saved-scroll-y, 0px))`);
22
+ body.style.setProperty('overflow-y', 'scroll');
23
+ body.style.setProperty('position', 'fixed');
24
+
25
+ // Cannot be applied to body tag in marketplace repo due to data-css-scope
26
+ // body.classList.add(BODY_LOCK_CLASS);
18
27
  }
19
28
  } else {
20
29
  await nextTick();
21
30
  if (!document.querySelector('dialog[open]')) {
22
31
  const savedScrollY = parseInt(body.dataset.scrollLockY || '0');
23
- body.classList.remove(BODY_LOCK_CLASS);
32
+
33
+ // Cannot be applied to body tag in marketplace repo due to data-css-scope
34
+ // body.classList.remove(BODY_LOCK_CLASS);
35
+
36
+ body.style.removeProperty('inset');
37
+ body.style.removeProperty('marginTop');
38
+ body.style.removeProperty('overflowY');
39
+ body.style.removeProperty('position');
24
40
  body.style.removeProperty('--saved-scroll-y');
41
+
25
42
  window.scrollTo({
26
43
  behavior: 'auto',
27
44
  top: savedScrollY,
28
45
  });
46
+
29
47
  delete body.dataset.scrollLockY;
30
48
  }
31
49
  }