@syscore/ui-library 2.0.0-beta-publish-workflow-beta.8 → 2.0.0-beta-publish-workflow-beta.10
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/client/components/ui/hero-split-image.tsx +38 -5
- package/client/global.css +50 -8
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +36 -1
- package/package.json +1 -1
|
@@ -1,15 +1,48 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
2
3
|
|
|
3
4
|
export interface HeroSplitImageProps {
|
|
4
5
|
src: string;
|
|
5
6
|
alt?: string;
|
|
6
7
|
}
|
|
7
8
|
|
|
9
|
+
|
|
8
10
|
export const HeroSplitImage = React.forwardRef<HTMLImageElement, HeroSplitImageProps>(
|
|
9
|
-
({ src, alt = '' }, ref) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
({ src, alt = '' }, ref) => {
|
|
12
|
+
const [current, setCurrent] = React.useState(src);
|
|
13
|
+
const [previous, setPrevious] = React.useState<string | null>(null);
|
|
14
|
+
const [isCurrentLoaded, setIsCurrentLoaded] = React.useState(false);
|
|
15
|
+
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
if (src === current) return;
|
|
18
|
+
setPrevious(current);
|
|
19
|
+
setCurrent(src);
|
|
20
|
+
setIsCurrentLoaded(false);
|
|
21
|
+
}, [src, current]);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<span className="hero-split-image-frame">
|
|
25
|
+
{previous ? (
|
|
26
|
+
<img
|
|
27
|
+
src={previous}
|
|
28
|
+
alt=""
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
className={cn('hero-split-image', !isCurrentLoaded && 'hero-split-image--loaded')}
|
|
31
|
+
onTransitionEnd={(event) => {
|
|
32
|
+
if (event.propertyName === 'opacity' && isCurrentLoaded) setPrevious(null);
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
) : null}
|
|
36
|
+
<img
|
|
37
|
+
ref={ref}
|
|
38
|
+
key={current}
|
|
39
|
+
src={current}
|
|
40
|
+
alt={alt}
|
|
41
|
+
className={cn('hero-split-image', isCurrentLoaded && 'hero-split-image--loaded')}
|
|
42
|
+
onLoad={() => setIsCurrentLoaded(true)}
|
|
43
|
+
/>
|
|
44
|
+
</span>
|
|
45
|
+
);
|
|
46
|
+
},
|
|
14
47
|
);
|
|
15
48
|
HeroSplitImage.displayName = 'HeroSplitImage';
|
package/client/global.css
CHANGED
|
@@ -8554,16 +8554,20 @@ body {
|
|
|
8554
8554
|
background-color: hsl(var(--accent) / 0.5);
|
|
8555
8555
|
}
|
|
8556
8556
|
|
|
8557
|
-
|
|
8557
|
+
|
|
8558
|
+
.calendar-cell:has(.calendar-day-range-middle[aria-selected]),
|
|
8559
|
+
.calendar-cell:has(.calendar-day-range-end[aria-selected]) {
|
|
8558
8560
|
background-color: hsl(var(--accent));
|
|
8559
8561
|
}
|
|
8560
8562
|
|
|
8561
|
-
.calendar-cell:has([aria-selected]):first-child
|
|
8563
|
+
.calendar-cell:has(.calendar-day-range-middle[aria-selected]):first-child,
|
|
8564
|
+
.calendar-cell:has(.calendar-day-range-end[aria-selected]):first-child {
|
|
8562
8565
|
border-top-left-radius: calc(var(--radius-md, 8px));
|
|
8563
8566
|
border-bottom-left-radius: calc(var(--radius-md, 8px));
|
|
8564
8567
|
}
|
|
8565
8568
|
|
|
8566
|
-
.calendar-cell:has([aria-selected]):last-child
|
|
8569
|
+
.calendar-cell:has(.calendar-day-range-middle[aria-selected]):last-child,
|
|
8570
|
+
.calendar-cell:has(.calendar-day-range-end[aria-selected]):last-child {
|
|
8567
8571
|
border-top-right-radius: calc(var(--radius-md, 8px));
|
|
8568
8572
|
border-bottom-right-radius: calc(var(--radius-md, 8px));
|
|
8569
8573
|
}
|
|
@@ -8585,20 +8589,30 @@ body {
|
|
|
8585
8589
|
}
|
|
8586
8590
|
|
|
8587
8591
|
.calendar-day-selected {
|
|
8588
|
-
background-color: hsl(var(--primary));
|
|
8589
8592
|
color: hsl(var(--primary-foreground));
|
|
8590
8593
|
}
|
|
8591
8594
|
|
|
8592
8595
|
.calendar-day-selected:hover {
|
|
8593
|
-
background-color: hsl(var(--primary));
|
|
8594
8596
|
color: hsl(var(--primary-foreground));
|
|
8595
8597
|
}
|
|
8596
8598
|
|
|
8597
8599
|
.calendar-day-selected:focus {
|
|
8598
|
-
background-color: hsl(var(--primary));
|
|
8599
8600
|
color: hsl(var(--primary-foreground));
|
|
8600
8601
|
}
|
|
8601
8602
|
|
|
8603
|
+
/* `<Calendar initialFocus>` (DatePicker/DateRangePicker) programmatically
|
|
8604
|
+
focuses the already-selected day the instant the popover opens — with no
|
|
8605
|
+
preceding pointer interaction, Chrome's :focus-visible heuristic treats
|
|
8606
|
+
that as a real focus event, so the base `.button:focus-visible` ring
|
|
8607
|
+
(box-shadow 2px currentColor + 4px white) stacks on top of this circle's
|
|
8608
|
+
own solid fill. That's the halo around the selected date on open, not an
|
|
8609
|
+
actual keyboard-navigation indicator — the fill already shows selection,
|
|
8610
|
+
so the redundant ring is suppressed here only. A real keyboard Tab/arrow
|
|
8611
|
+
move to a *different*, unselected day still gets the normal ring. */
|
|
8612
|
+
.calendar-day-selected:focus-visible {
|
|
8613
|
+
box-shadow: none;
|
|
8614
|
+
}
|
|
8615
|
+
|
|
8602
8616
|
.calendar-day-today {
|
|
8603
8617
|
background-color: hsl(var(--accent));
|
|
8604
8618
|
color: hsl(var(--accent-foreground));
|
|
@@ -11468,7 +11482,7 @@ body {
|
|
|
11468
11482
|
/* Vertical: each item is a row (indicator on left, label on right) */
|
|
11469
11483
|
.stepper--vertical .stepper-item {
|
|
11470
11484
|
flex-direction: row;
|
|
11471
|
-
align-items:
|
|
11485
|
+
align-items: baseline;
|
|
11472
11486
|
gap: 0.75rem;
|
|
11473
11487
|
}
|
|
11474
11488
|
|
|
@@ -13289,7 +13303,7 @@ body {
|
|
|
13289
13303
|
/* Vertical: each item is a row (indicator on left, label on right) */
|
|
13290
13304
|
.stepper--vertical .stepper-item {
|
|
13291
13305
|
flex-direction: row;
|
|
13292
|
-
align-items:
|
|
13306
|
+
align-items: baseline;
|
|
13293
13307
|
gap: 0.75rem;
|
|
13294
13308
|
}
|
|
13295
13309
|
|
|
@@ -15910,6 +15924,11 @@ body {
|
|
|
15910
15924
|
/* /DS_PENDING_CSS:ResourceThumbnail */
|
|
15911
15925
|
|
|
15912
15926
|
/* DS_PENDING_CSS:HeroSplitImage */
|
|
15927
|
+
@keyframes hero-split-image-shimmer {
|
|
15928
|
+
0% { background-position: 150% 0; }
|
|
15929
|
+
100% { background-position: -50% 0; }
|
|
15930
|
+
}
|
|
15931
|
+
|
|
15913
15932
|
.hero-split-image-frame {
|
|
15914
15933
|
display: block;
|
|
15915
15934
|
position: relative;
|
|
@@ -15918,6 +15937,20 @@ body {
|
|
|
15918
15937
|
margin: 0 -3.5rem 0 0;
|
|
15919
15938
|
border-radius: 0 var(--radius-lg, 12px) var(--radius-lg, 12px) 0;
|
|
15920
15939
|
overflow: hidden;
|
|
15940
|
+
background-color: var(--color-gray-100, #eff1f2);
|
|
15941
|
+
background-image: linear-gradient(
|
|
15942
|
+
100deg,
|
|
15943
|
+
transparent 35%,
|
|
15944
|
+
var(--color-gray-200, #d5d9dc) 50%,
|
|
15945
|
+
transparent 65%
|
|
15946
|
+
);
|
|
15947
|
+
background-size: 200% 100%;
|
|
15948
|
+
animation: hero-split-image-shimmer 1.6s ease-in-out infinite;
|
|
15949
|
+
}
|
|
15950
|
+
|
|
15951
|
+
.hero-split-image-frame:has(.hero-split-image--loaded) {
|
|
15952
|
+
animation: none;
|
|
15953
|
+
background-image: none;
|
|
15921
15954
|
}
|
|
15922
15955
|
|
|
15923
15956
|
.hero-split-image {
|
|
@@ -15927,6 +15960,15 @@ body {
|
|
|
15927
15960
|
width: 100%;
|
|
15928
15961
|
height: 100%;
|
|
15929
15962
|
object-fit: cover;
|
|
15963
|
+
opacity: 0;
|
|
15964
|
+
transform: scale(1.03);
|
|
15965
|
+
transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
|
|
15966
|
+
transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
|
|
15967
|
+
}
|
|
15968
|
+
|
|
15969
|
+
.hero-split-image--loaded {
|
|
15970
|
+
opacity: 1;
|
|
15971
|
+
transform: scale(1);
|
|
15930
15972
|
}
|
|
15931
15973
|
/* /DS_PENDING_CSS:HeroSplitImage */
|
|
15932
15974
|
|