@savvycal/calendar 0.10.1 → 0.10.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnavailabilityOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/shared/UnavailabilityOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,UAAU,0BAA0B;IAClC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,kBAAkB,KAAK,MAAM,CAAC;CAChD;AAED,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"UnavailabilityOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/shared/UnavailabilityOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,UAAU,0BAA0B;IAClC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,kBAAkB,KAAK,MAAM,CAAC;CAChD;AAED,eAAO,MAAM,qBAAqB,kEAuChC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
const
|
|
2
|
+
import { memo as r } from "react";
|
|
3
|
+
const p = r(function({
|
|
4
4
|
blocks: t,
|
|
5
|
-
column:
|
|
6
|
-
cls:
|
|
5
|
+
column: o,
|
|
6
|
+
cls: a
|
|
7
7
|
}) {
|
|
8
8
|
return t.length === 0 ? null : /* @__PURE__ */ e(
|
|
9
9
|
"div",
|
|
@@ -11,28 +11,34 @@ const v = o(function({
|
|
|
11
11
|
"aria-hidden": "true",
|
|
12
12
|
style: {
|
|
13
13
|
gridRow: "3 / -1",
|
|
14
|
-
gridColumn:
|
|
14
|
+
gridColumn: o,
|
|
15
15
|
position: "relative",
|
|
16
|
-
pointerEvents: "none"
|
|
16
|
+
pointerEvents: "none",
|
|
17
|
+
// One compositor layer for the row-spanning grid item. Safari
|
|
18
|
+
// otherwise fragments that item and paints semi-transparent
|
|
19
|
+
// backgrounds once per row.
|
|
20
|
+
isolation: "isolate",
|
|
21
|
+
transform: "translateZ(0)",
|
|
22
|
+
overflow: "hidden"
|
|
17
23
|
},
|
|
18
|
-
children: t.map((i,
|
|
24
|
+
children: t.map((i, n) => /* @__PURE__ */ e(
|
|
19
25
|
"div",
|
|
20
26
|
{
|
|
21
|
-
className:
|
|
27
|
+
className: a("unavailableOverlay"),
|
|
22
28
|
style: {
|
|
23
29
|
position: "absolute",
|
|
24
30
|
top: i.top,
|
|
25
31
|
left: 0,
|
|
26
32
|
right: 0,
|
|
27
33
|
height: i.height,
|
|
28
|
-
backgroundPosition: `0 ${-i.top}px`
|
|
34
|
+
backgroundPosition: `0 ${-Math.round(i.top)}px`
|
|
29
35
|
}
|
|
30
36
|
},
|
|
31
|
-
|
|
37
|
+
n
|
|
32
38
|
))
|
|
33
39
|
}
|
|
34
40
|
);
|
|
35
41
|
});
|
|
36
42
|
export {
|
|
37
|
-
|
|
43
|
+
p as UnavailabilityOverlay
|
|
38
44
|
};
|
package/dist/components.css
CHANGED
|
@@ -8,27 +8,23 @@
|
|
|
8
8
|
* @import "@savvycal/calendar/components.css";
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
/* Unavailable time overlay with
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
/* Unavailable time overlay with diagonal stripes.
|
|
12
|
+
*
|
|
13
|
+
* Use a repeating SVG tile, not repeating-linear-gradient. Safari paints
|
|
14
|
+
* angled repeating gradients on tall grid items as stacked, offset bands.
|
|
15
|
+
* Overlay blocks set background-position from their grid top so disjoint
|
|
16
|
+
* ranges share one stripe origin. Do not use background-attachment: fixed
|
|
17
|
+
* — mobile browsers fail to paint fixed backgrounds inside overflow
|
|
18
|
+
* scrollers.
|
|
19
|
+
*/
|
|
16
20
|
.cal-unavailable-overlay {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
oklch(0 0 0 / 0.08) 6px
|
|
23
|
-
);
|
|
21
|
+
isolation: isolate;
|
|
22
|
+
transform: translateZ(0);
|
|
23
|
+
background-repeat: repeat;
|
|
24
|
+
background-size: 8px 8px;
|
|
25
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='rgba(0,0,0,0.02)'/%3E%3Cpath d='M-2,2 l4,-4 M0,8 l8,-8 M6,10 l4,-4' stroke='rgba(0,0,0,0.08)' stroke-width='3' fill='none'/%3E%3C/svg%3E");
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
.dark .cal-unavailable-overlay {
|
|
27
|
-
background-image:
|
|
28
|
-
-45deg,
|
|
29
|
-
oklch(1 0 0 / 0.02),
|
|
30
|
-
oklch(1 0 0 / 0.02) 3px,
|
|
31
|
-
oklch(1 0 0 / 0.08) 3px,
|
|
32
|
-
oklch(1 0 0 / 0.08) 6px
|
|
33
|
-
);
|
|
29
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='rgba(255,255,255,0.02)'/%3E%3Cpath d='M-2,2 l4,-4 M0,8 l8,-8 M6,10 l4,-4' stroke='rgba(255,255,255,0.08)' stroke-width='3' fill='none'/%3E%3C/svg%3E");
|
|
34
30
|
}
|