@cntrl-site/components 1.0.116 → 1.0.117

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.
package/dist/sources.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { W as n, b as e, T as t, g as i, f as o, S as r, P as a, O as s, h as l, a as c, M as d, L as u, d as g, e as m, H as p, i as h, G as f, F as v, c as P, C as x, j as b, B as y } from "./ChroniclesComponent-0ZWBPdbh.mjs";
1
+ import { W as n, b as e, T as t, g as i, f as o, S as r, P as a, O as s, h as l, a as c, M as d, L as u, d as g, e as m, H as p, i as h, G as f, F as v, c as P, C as x, j as b, B as y } from "./ChroniclesComponent-Szt0H-op.mjs";
2
2
  const S = `import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
3
3
  import { CommonComponentProps } from '../props';
4
4
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -5702,7 +5702,6 @@ function getGridTextLeadingVars(
5702
5702
  const HOVER_ANIM_MS = 400;
5703
5703
  const HOVER_EASING = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
5704
5704
  const HOVER_ZOOM = 1.1;
5705
- const HOVER_ZOOM_INSET = \`\${(((1 - 1 / HOVER_ZOOM) / 2) * 100).toFixed(4)}%\`;
5706
5705
  const MEDIA_RADIUS_VAR = '--grid-media-radius';
5707
5706
 
5708
5707
  function getCSS(P: string): string {
@@ -5848,10 +5847,16 @@ function getCSS(P: string): string {
5848
5847
  .\${P}-show-text-hover .\${P}-item-inner-hidden:hover .\${P}-item-subtitle {
5849
5848
  opacity: 1;
5850
5849
  }
5850
+ @property --\${P}-hover-zoom {
5851
+ syntax: '<number>';
5852
+ inherits: false;
5853
+ initial-value: 1;
5854
+ }
5851
5855
  .\${P}-hover-zoom-in .\${P}-item-image,
5852
5856
  .\${P}-hover-zoom-in .\${P}-item-video {
5853
- clip-path: inset(0 round var(\${MEDIA_RADIUS_VAR}, 0px));
5854
- transition: transform \${HOVER_ANIM_MS}ms \${HOVER_EASING}, clip-path \${HOVER_ANIM_MS}ms \${HOVER_EASING};
5857
+ transform: scale(var(--\${P}-hover-zoom));
5858
+ clip-path: inset(calc(50% - 50% / var(--\${P}-hover-zoom)) round calc(var(\${MEDIA_RADIUS_VAR}, 0px) / var(--\${P}-hover-zoom)));
5859
+ transition: --\${P}-hover-zoom \${HOVER_ANIM_MS}ms \${HOVER_EASING};
5855
5860
  }
5856
5861
  .\${P}-hover-scale-down .\${P}-item-image,
5857
5862
  .\${P}-hover-scale-down .\${P}-item-video {
@@ -5862,8 +5867,7 @@ function getCSS(P: string): string {
5862
5867
  }
5863
5868
  @media (hover: hover) {
5864
5869
  .\${P}-hover-zoom-in .\${P}-item-image-wrapper:has(.\${P}-item-image:hover, .\${P}-item-video:hover) :is(.\${P}-item-image, .\${P}-item-video) {
5865
- transform: scale(\${HOVER_ZOOM});
5866
- clip-path: inset(\${HOVER_ZOOM_INSET} round calc(var(\${MEDIA_RADIUS_VAR}, 0px) / \${HOVER_ZOOM}));
5870
+ --\${P}-hover-zoom: \${HOVER_ZOOM};
5867
5871
  }
5868
5872
  .\${P}-hover-scale-down .\${P}-item-image-wrapper:hover .\${P}-item-image,
5869
5873
  .\${P}-hover-scale-down .\${P}-item-image-wrapper:hover .\${P}-item-video {
@@ -11031,7 +11035,6 @@ import { buildJournalSlides, findJournalUrlSlideNumber, getEntryImages, hasJourn
11031
11035
  const HOVER_ANIM_MS = 400;
11032
11036
  const HOVER_EASING = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
11033
11037
  const HOVER_ZOOM = 1.1;
11034
- const HOVER_ZOOM_INSET = \`\${(((1 - 1 / HOVER_ZOOM) / 2) * 100).toFixed(4)}%\`;
11035
11038
 
11036
11039
  function getCSS(P: string): string {
11037
11040
  return \`
@@ -11079,9 +11082,16 @@ function getCSS(P: string): string {
11079
11082
  max-width: 100%;
11080
11083
  }
11081
11084
 
11085
+ @property --\${P}-hover-zoom {
11086
+ syntax: '<number>';
11087
+ inherits: false;
11088
+ initial-value: 1;
11089
+ }
11090
+
11082
11091
  .\${P}-hover-zoom-in .\${P}-cover-image {
11083
- clip-path: inset(0);
11084
- transition: transform \${HOVER_ANIM_MS}ms \${HOVER_EASING}, clip-path \${HOVER_ANIM_MS}ms \${HOVER_EASING};
11092
+ transform: scale(var(--\${P}-hover-zoom));
11093
+ clip-path: inset(calc(50% - 50% / var(--\${P}-hover-zoom)));
11094
+ transition: --\${P}-hover-zoom \${HOVER_ANIM_MS}ms \${HOVER_EASING};
11085
11095
  }
11086
11096
 
11087
11097
  .\${P}-hover-scale-down .\${P}-cover-image {
@@ -11094,8 +11104,7 @@ function getCSS(P: string): string {
11094
11104
 
11095
11105
  @media (hover: hover) {
11096
11106
  .\${P}-hover-zoom-in .\${P}-cover:hover .\${P}-cover-image {
11097
- transform: scale(\${HOVER_ZOOM});
11098
- clip-path: inset(\${HOVER_ZOOM_INSET});
11107
+ --\${P}-hover-zoom: \${HOVER_ZOOM};
11099
11108
  }
11100
11109
  .\${P}-hover-scale-down .\${P}-cover:hover .\${P}-cover-image {
11101
11110
  transform: scale(0.9);
@@ -11845,7 +11854,6 @@ export type {
11845
11854
  const HOVER_ANIM_MS = 400;
11846
11855
  const HOVER_EASING = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
11847
11856
  const HOVER_ZOOM = 1.1;
11848
- const HOVER_ZOOM_INSET = \`\${(((1 - 1 / HOVER_ZOOM) / 2) * 100).toFixed(4)}%\`;
11849
11857
 
11850
11858
  function getCSS(P: string): string {
11851
11859
  return \`
@@ -11893,9 +11901,16 @@ function getCSS(P: string): string {
11893
11901
  max-width: 100%;
11894
11902
  }
11895
11903
 
11904
+ @property --\${P}-hover-zoom {
11905
+ syntax: '<number>';
11906
+ inherits: false;
11907
+ initial-value: 1;
11908
+ }
11909
+
11896
11910
  .\${P}-hover-zoom-in .\${P}-cover-image {
11897
- clip-path: inset(0);
11898
- transition: transform \${HOVER_ANIM_MS}ms \${HOVER_EASING}, clip-path \${HOVER_ANIM_MS}ms \${HOVER_EASING};
11911
+ transform: scale(var(--\${P}-hover-zoom));
11912
+ clip-path: inset(calc(50% - 50% / var(--\${P}-hover-zoom)));
11913
+ transition: --\${P}-hover-zoom \${HOVER_ANIM_MS}ms \${HOVER_EASING};
11899
11914
  }
11900
11915
 
11901
11916
  .\${P}-hover-scale-down .\${P}-cover-image {
@@ -11908,8 +11923,7 @@ function getCSS(P: string): string {
11908
11923
 
11909
11924
  @media (hover: hover) {
11910
11925
  .\${P}-hover-zoom-in .\${P}-cover:hover .\${P}-cover-image {
11911
- transform: scale(\${HOVER_ZOOM});
11912
- clip-path: inset(\${HOVER_ZOOM_INSET});
11926
+ --\${P}-hover-zoom: \${HOVER_ZOOM};
11913
11927
  }
11914
11928
  .\${P}-hover-scale-down .\${P}-cover:hover .\${P}-cover-image {
11915
11929
  transform: scale(0.9);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/components",
3
- "version": "1.0.116",
3
+ "version": "1.0.117",
4
4
  "description": "Custom components for control editor and public websites.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",