@savvycal/calendar 0.11.0 → 0.11.1

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":"AllDayEventChip.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/AllDayEventChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,UAAU,oBAAoB;IAC5B,UAAU,EAAE,qBAAqB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,qBAAqB,KAAK,MAAM,CAAC;IAClD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,eAAe,4DA+G1B,CAAC"}
1
+ {"version":3,"file":"AllDayEventChip.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/AllDayEventChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,UAAU,oBAAoB;IAC5B,UAAU,EAAE,qBAAqB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,qBAAqB,KAAK,MAAM,CAAC;IAClD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,eAAe,4DAyG1B,CAAC"}
@@ -1,33 +1,33 @@
1
1
  import { jsxs as D, Fragment as x, jsx as n } from "react/jsx-runtime";
2
2
  import { memo as L } from "react";
3
- import { cn as o } from "../../lib/utils.js";
3
+ import { cn as s } from "../../lib/utils.js";
4
4
  import { getEventLabel as N, getClientNameLabel as S } from "../../lib/accessibility.js";
5
- const k = L(function({
6
- positioned: v,
7
- laneOffset: b,
5
+ const w = L(function({
6
+ positioned: p,
7
+ laneOffset: f,
8
8
  cls: t,
9
- onEventClick: s,
10
- selectedEventId: h,
11
- selectedEventRef: C
9
+ onEventClick: c,
10
+ selectedEventId: u,
11
+ selectedEventRef: y
12
12
  }) {
13
13
  const {
14
14
  event: e,
15
- gridColumnStart: c,
16
- gridColumnSpan: d,
17
- lane: E,
18
- continuesBefore: l,
19
- continuesAfter: m
20
- } = v, R = e.id === h, p = E + 1 + b, a = [N(e), "all day"], u = S(e);
21
- u && a.push(u);
22
- const f = l ? 2 : 4, g = m ? 2 : 4, i = {
23
- ...l ? {
15
+ gridColumnStart: g,
16
+ gridColumnSpan: v,
17
+ lane: b,
18
+ continuesBefore: i,
19
+ continuesAfter: d
20
+ } = p, h = e.id === u, C = b + 1 + f, l = [N(e), "all day"], m = S(e);
21
+ m && l.push(m);
22
+ const E = i ? 2 : 4, R = d ? 2 : 4, a = {
23
+ ...i ? {
24
24
  borderTopLeftRadius: 0,
25
25
  borderBottomLeftRadius: 0,
26
26
  paddingLeft: 4
27
27
  } : {},
28
- ...m ? { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
29
- }, r = /* @__PURE__ */ D(x, { children: [
30
- e.color && !l && /* @__PURE__ */ n(
28
+ ...d ? { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
29
+ }, o = /* @__PURE__ */ D(x, { children: [
30
+ e.color && !i && /* @__PURE__ */ n(
31
31
  "div",
32
32
  {
33
33
  className: t("allDayEventColorBar"),
@@ -35,44 +35,38 @@ const k = L(function({
35
35
  }
36
36
  ),
37
37
  /* @__PURE__ */ n("span", { className: t("allDayEventTitle"), children: e.title })
38
- ] }), y = {
39
- gridColumn: `${c} / span ${d}`,
40
- gridRow: p,
41
- marginLeft: f,
42
- marginRight: g
38
+ ] }), r = {
39
+ gridColumn: `${g} / span ${v}`,
40
+ gridRow: C,
41
+ marginLeft: E,
42
+ marginRight: R,
43
+ contain: "inline-size"
43
44
  };
44
45
  return e.interactive === !1 ? /* @__PURE__ */ n(
45
46
  "div",
46
47
  {
47
- className: o(t("allDayEvent"), "relative flex items-center gap-1"),
48
- style: { ...y, ...i, pointerEvents: "none" },
49
- children: r
48
+ className: s(t("allDayEvent"), "relative flex items-center gap-1"),
49
+ style: { ...r, ...a, pointerEvents: "none" },
50
+ children: o
50
51
  }
51
- ) : R ? /* @__PURE__ */ n(
52
+ ) : h ? /* @__PURE__ */ n(
52
53
  "div",
53
54
  {
54
- ref: C,
55
- style: {
56
- gridColumn: `${c} / span ${d}`,
57
- gridRow: p,
58
- display: "flex",
59
- minWidth: 0,
60
- marginLeft: f,
61
- marginRight: g
62
- },
55
+ ref: y,
56
+ style: { ...r, display: "flex", minWidth: 0 },
63
57
  children: /* @__PURE__ */ n(
64
58
  "button",
65
59
  {
66
60
  type: "button",
67
- "aria-label": a.join(", "),
68
- className: o(
61
+ "aria-label": l.join(", "),
62
+ className: s(
69
63
  t("allDayEvent"),
70
64
  t("allDayEventSelected"),
71
65
  "relative flex items-center gap-1 w-full"
72
66
  ),
73
- style: i,
74
- onClick: () => s?.(e),
75
- children: r
67
+ style: a,
68
+ onClick: () => c?.(e),
69
+ children: o
76
70
  }
77
71
  )
78
72
  }
@@ -80,14 +74,14 @@ const k = L(function({
80
74
  "button",
81
75
  {
82
76
  type: "button",
83
- "aria-label": a.join(", "),
84
- className: o(t("allDayEvent"), "relative flex items-center gap-1"),
85
- style: { ...y, ...i },
86
- onClick: () => s?.(e),
87
- children: r
77
+ "aria-label": l.join(", "),
78
+ className: s(t("allDayEvent"), "relative flex items-center gap-1"),
79
+ style: { ...r, ...a },
80
+ onClick: () => c?.(e),
81
+ children: o
88
82
  }
89
83
  );
90
84
  });
91
85
  export {
92
- k as AllDayEventChip
86
+ w as AllDayEventChip
93
87
  };
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,qBAAqB,CAqD/D,CAAC"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,qBAAqB,CAsD/D,CAAC"}
@@ -28,7 +28,7 @@ const e = {
28
28
  allDayEvent: "rounded-md pl-2.5 pr-1.5 py-0.5 overflow-hidden cursor-pointer select-none text-left bg-cal-event-bg ring-1 ring-inset ring-cal-event-ring min-w-0",
29
29
  allDayEventSelected: "shadow-lg shadow-cal-event-shadow ring-cal-event-ring-selected",
30
30
  allDayEventColorBar: "absolute left-0 top-0 bottom-0 w-1",
31
- allDayEventTitle: "text-cal-text-body text-xs/4 font-medium truncate",
31
+ allDayEventTitle: "text-cal-text-body text-xs/4 font-medium whitespace-nowrap",
32
32
  overflowChip: "absolute right-0.5 min-w-9 h-[22px] p-0 border-0 cursor-pointer select-none text-center rounded-md bg-cal-surface ring-1 ring-cal-event-ring shadow-lg shadow-cal-event-shadow hover:ring-cal-event-ring-selected",
33
33
  overflowChipLabel: "block px-1 py-0.5 text-cal-text-body text-xs/4 font-medium",
34
34
  overflowPopover: "w-64 rounded-lg bg-cal-surface p-1 shadow-lg shadow-cal-event-shadow ring-1 ring-cal-event-ring max-h-[min(20rem,calc(100dvh-1rem))] overflow-auto",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/calendar",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {