@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,kEAiChC,CAAC"}
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 o } from "react";
3
- const v = o(function({
2
+ import { memo as r } from "react";
3
+ const p = r(function({
4
4
  blocks: t,
5
- column: n,
6
- cls: r
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: n,
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, a) => /* @__PURE__ */ e(
24
+ children: t.map((i, n) => /* @__PURE__ */ e(
19
25
  "div",
20
26
  {
21
- className: r("unavailableOverlay"),
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
- a
37
+ n
32
38
  ))
33
39
  }
34
40
  );
35
41
  });
36
42
  export {
37
- v as UnavailabilityOverlay
43
+ p as UnavailabilityOverlay
38
44
  };
@@ -8,27 +8,23 @@
8
8
  * @import "@savvycal/calendar/components.css";
9
9
  */
10
10
 
11
- /* Unavailable time overlay with cross-hatching.
12
- * Do not use background-attachment: fixed — mobile browsers fail to paint
13
- * fixed backgrounds inside overflow scrollers. Overlay blocks set
14
- * background-position from their grid top so disjoint ranges share one
15
- * stripe origin. */
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
- background-image: repeating-linear-gradient(
18
- -45deg,
19
- oklch(0 0 0 / 0.02),
20
- oklch(0 0 0 / 0.02) 3px,
21
- oklch(0 0 0 / 0.08) 3px,
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: repeating-linear-gradient(
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/calendar",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {