@devalok/shilp-sutra 0.5.0 → 0.6.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.
Files changed (53) hide show
  1. package/dist/composed/command-palette.d.ts +1 -2
  2. package/dist/composed/command-palette.d.ts.map +1 -1
  3. package/dist/composed/command-palette.js +27 -33
  4. package/dist/composed/content-card.d.ts +1 -1
  5. package/dist/composed/date-picker/calendar-grid.d.ts +7 -0
  6. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  7. package/dist/composed/date-picker/calendar-grid.js +92 -72
  8. package/dist/composed/date-picker/index.d.ts +1 -1
  9. package/dist/composed/date-picker/index.d.ts.map +1 -1
  10. package/dist/composed/index.d.ts +6 -1
  11. package/dist/composed/index.d.ts.map +1 -1
  12. package/dist/composed/index.js +43 -37
  13. package/dist/composed/page-header.d.ts +1 -1
  14. package/dist/composed/page-header.d.ts.map +1 -1
  15. package/dist/composed/page-header.js +63 -59
  16. package/dist/composed/priority-indicator.d.ts +1 -1
  17. package/dist/composed/priority-indicator.d.ts.map +1 -1
  18. package/dist/composed/priority-indicator.js +15 -15
  19. package/dist/composed/schedule-view.d.ts +26 -0
  20. package/dist/composed/schedule-view.d.ts.map +1 -0
  21. package/dist/composed/schedule-view.js +183 -0
  22. package/dist/composed/simple-tooltip.d.ts +15 -0
  23. package/dist/composed/simple-tooltip.d.ts.map +1 -0
  24. package/dist/composed/simple-tooltip.js +17 -0
  25. package/dist/composed/status-badge.d.ts +2 -1
  26. package/dist/composed/status-badge.d.ts.map +1 -1
  27. package/dist/composed/status-badge.js +37 -22
  28. package/dist/shell/app-command-palette.js +87 -87
  29. package/dist/shell/bottom-navbar.d.ts +1 -3
  30. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  31. package/dist/shell/bottom-navbar.js +37 -37
  32. package/dist/shell/notification-preferences.d.ts.map +1 -1
  33. package/dist/shell/notification-preferences.js +31 -31
  34. package/dist/shell/sidebar.d.ts +1 -3
  35. package/dist/shell/sidebar.d.ts.map +1 -1
  36. package/dist/shell/sidebar.js +6 -6
  37. package/dist/ui/alert.d.ts +3 -0
  38. package/dist/ui/alert.d.ts.map +1 -1
  39. package/dist/ui/alert.js +56 -31
  40. package/dist/ui/badge.d.ts +1 -1
  41. package/dist/ui/badge.d.ts.map +1 -1
  42. package/dist/ui/badge.js +17 -8
  43. package/dist/ui/button.d.ts +2 -2
  44. package/dist/ui/button.d.ts.map +1 -1
  45. package/dist/ui/button.js +28 -14
  46. package/dist/ui/card.d.ts +1 -1
  47. package/dist/ui/sidebar.d.ts +1 -1
  48. package/dist/ui/stat-card.d.ts +4 -1
  49. package/dist/ui/stat-card.d.ts.map +1 -1
  50. package/dist/ui/stat-card.js +12 -11
  51. package/dist/ui/toggle-group.d.ts +2 -2
  52. package/dist/ui/toggle.d.ts +2 -2
  53. package/package.json +526 -208
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/composed/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,UAAU,wFAwEf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/composed/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,UAAU,wFA+Ef,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -1,65 +1,69 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { cn as s } from "../ui/lib/utils.js";
4
- import { IconChevronRight as p } from "@tabler/icons-react";
5
- const f = o.forwardRef(
6
- ({ title: i, subtitle: d, actions: c, breadcrumbs: t, titleClassName: x, className: m, ...h }, n) => /* @__PURE__ */ l(
7
- "div",
8
- {
9
- ref: n,
10
- className: s(
11
- "flex flex-col gap-ds-05 border-b border-border pb-ds-06",
12
- m
13
- ),
14
- ...h,
15
- children: [
16
- t && t.length > 0 && /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: "flex items-center gap-ds-02b", children: t.map((a, r) => /* @__PURE__ */ l(o.Fragment, { children: [
17
- r > 0 && /* @__PURE__ */ e(
18
- p,
19
- {
20
- className: "h-ico-sm w-ico-sm text-text-placeholder",
21
- stroke: 1.5
22
- }
23
- ),
24
- a.href ? /* @__PURE__ */ e(
25
- "a",
26
- {
27
- href: a.href,
28
- className: "text-ds-sm text-text-placeholder transition-colors hover:text-text-secondary",
29
- children: a.label
30
- }
31
- ) : /* @__PURE__ */ e(
32
- "span",
33
- {
34
- className: s(
35
- "text-ds-sm",
36
- r === t.length - 1 ? "text-text-primary" : "text-text-placeholder"
37
- ),
38
- children: a.label
39
- }
40
- )
41
- ] }, r)) }),
42
- /* @__PURE__ */ l("div", { className: "flex items-start justify-between gap-ds-05", children: [
43
- /* @__PURE__ */ l("div", { className: "flex flex-col gap-ds-02b", children: [
44
- /* @__PURE__ */ e(
45
- "h1",
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import * as h from "react";
3
+ import { cn as i } from "../ui/lib/utils.js";
4
+ import { IconChevronRight as g } from "@tabler/icons-react";
5
+ const N = h.forwardRef(
6
+ ({ title: n, subtitle: s, actions: r, breadcrumbs: e, titleClassName: c, className: p, ...m }, f) => {
7
+ var x;
8
+ const o = n ?? ((x = e == null ? void 0 : e[e.length - 1]) == null ? void 0 : x.label) ?? "";
9
+ return /* @__PURE__ */ a(
10
+ "div",
11
+ {
12
+ ref: f,
13
+ className: i(
14
+ "flex flex-col gap-ds-05 border-b border-border pb-ds-06",
15
+ p
16
+ ),
17
+ ...m,
18
+ children: [
19
+ e && e.length > 0 && /* @__PURE__ */ t("nav", { "aria-label": "Breadcrumb", className: "flex items-center gap-ds-02b", children: e.map((l, d) => /* @__PURE__ */ a(h.Fragment, { children: [
20
+ d > 0 && /* @__PURE__ */ t(
21
+ g,
46
22
  {
47
- className: s(
48
- "text-ds-2xl text-text-primary",
49
- x
50
- ),
51
- children: i
23
+ className: "h-ico-sm w-ico-sm text-text-placeholder",
24
+ stroke: 1.5
52
25
  }
53
26
  ),
54
- d && /* @__PURE__ */ e("p", { className: "text-ds-md text-text-placeholder", children: d })
55
- ] }),
56
- c && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-ds-03", children: c })
57
- ] })
58
- ]
59
- }
60
- )
27
+ l.href ? /* @__PURE__ */ t(
28
+ "a",
29
+ {
30
+ href: l.href,
31
+ className: "text-ds-sm text-text-placeholder transition-colors hover:text-text-secondary",
32
+ children: l.label
33
+ }
34
+ ) : /* @__PURE__ */ t(
35
+ "span",
36
+ {
37
+ className: i(
38
+ "text-ds-sm",
39
+ d === e.length - 1 ? "text-text-primary" : "text-text-placeholder"
40
+ ),
41
+ children: l.label
42
+ }
43
+ )
44
+ ] }, d)) }),
45
+ (o || s || r) && /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-ds-05", children: [
46
+ /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-02b", children: [
47
+ o && /* @__PURE__ */ t(
48
+ "h1",
49
+ {
50
+ className: i(
51
+ "text-ds-2xl text-text-primary",
52
+ c
53
+ ),
54
+ children: o
55
+ }
56
+ ),
57
+ s && /* @__PURE__ */ t("p", { className: "text-ds-md text-text-placeholder", children: s })
58
+ ] }),
59
+ r && /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-ds-03", children: r })
60
+ ] })
61
+ ]
62
+ }
63
+ );
64
+ }
61
65
  );
62
- f.displayName = "PageHeader";
66
+ N.displayName = "PageHeader";
63
67
  export {
64
- f as PageHeader
68
+ N as PageHeader
65
69
  };
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
- export type Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';
3
+ export type Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT' | 'low' | 'medium' | 'high' | 'urgent';
4
4
  declare const priorityVariants: (props?: ({
5
5
  display?: "compact" | "full" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"priority-indicator.d.ts","sourceRoot":"","sources":["../../src/composed/priority-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAUjE,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;AAgC3D,QAAA,MAAM,gBAAgB;;8EAarB,CAAA;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAC5D,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,QAAQ,EAAE,QAAQ,CAAA;CACnB;AAED,QAAA,MAAM,iBAAiB,+FA0CtB,CAAA;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"priority-indicator.d.ts","sourceRoot":"","sources":["../../src/composed/priority-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAUjE,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;AAgClG,QAAA,MAAM,gBAAgB;;8EAarB,CAAA;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAC5D,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,QAAQ,EAAE,QAAQ,CAAA;CACnB;AAED,QAAA,MAAM,iBAAiB,+FA2CtB,CAAA;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1,9 +1,9 @@
1
- import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { cva as d } from "class-variance-authority";
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import * as d from "react";
3
+ import { cva as f } from "class-variance-authority";
4
4
  import { cn as e } from "../ui/lib/utils.js";
5
- import { IconAlertTriangle as f, IconArrowUp as g, IconMinus as b, IconArrowDown as x } from "@tabler/icons-react";
6
- const p = {
5
+ import { IconAlertTriangle as g, IconArrowUp as b, IconMinus as p, IconArrowDown as x } from "@tabler/icons-react";
6
+ const u = {
7
7
  LOW: {
8
8
  icon: x,
9
9
  color: "text-category-slate-text",
@@ -11,24 +11,24 @@ const p = {
11
11
  label: "Low"
12
12
  },
13
13
  MEDIUM: {
14
- icon: b,
14
+ icon: p,
15
15
  color: "text-warning-text",
16
16
  bgColor: "bg-warning-surface",
17
17
  label: "Medium"
18
18
  },
19
19
  HIGH: {
20
- icon: g,
20
+ icon: b,
21
21
  color: "text-error-text",
22
22
  bgColor: "bg-error-surface",
23
23
  label: "High"
24
24
  },
25
25
  URGENT: {
26
- icon: f,
26
+ icon: g,
27
27
  color: "text-error-text",
28
28
  bgColor: "bg-error-surface",
29
29
  label: "Urgent"
30
30
  }
31
- }, u = d(
31
+ }, y = f(
32
32
  "inline-flex items-center gap-ds-02b font-body",
33
33
  {
34
34
  variants: {
@@ -41,9 +41,9 @@ const p = {
41
41
  display: "full"
42
42
  }
43
43
  }
44
- ), y = m.forwardRef(
44
+ ), w = d.forwardRef(
45
45
  ({ priority: s, display: t, className: i, ...c }, n) => {
46
- const o = p[s], l = o.icon;
46
+ const a = s.toUpperCase(), o = u[a], l = o.icon;
47
47
  return t === "compact" ? /* @__PURE__ */ r(
48
48
  "div",
49
49
  {
@@ -57,11 +57,11 @@ const p = {
57
57
  ...c,
58
58
  children: /* @__PURE__ */ r(l, { className: e("h-ico-sm w-ico-sm", o.color), stroke: 2 })
59
59
  }
60
- ) : /* @__PURE__ */ a(
60
+ ) : /* @__PURE__ */ m(
61
61
  "div",
62
62
  {
63
63
  ref: n,
64
- className: e(u({ display: t }), i),
64
+ className: e(y({ display: t }), i),
65
65
  ...c,
66
66
  children: [
67
67
  /* @__PURE__ */ r(
@@ -80,7 +80,7 @@ const p = {
80
80
  );
81
81
  }
82
82
  );
83
- y.displayName = "PriorityIndicator";
83
+ w.displayName = "PriorityIndicator";
84
84
  export {
85
- y as PriorityIndicator
85
+ w as PriorityIndicator
86
86
  };
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ export interface ScheduleEvent {
4
+ id: string;
5
+ title: string;
6
+ start: Date;
7
+ end: Date;
8
+ color?: 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
9
+ }
10
+ export interface ScheduleViewProps extends React.HTMLAttributes<HTMLDivElement> {
11
+ view: 'day' | 'week';
12
+ /** Current day (day view) or any date within the target week (week view). */
13
+ date: Date;
14
+ events: ScheduleEvent[];
15
+ onEventClick?: (event: ScheduleEvent) => void;
16
+ onSlotClick?: (start: Date, end: Date) => void;
17
+ /** First visible hour (default 8). */
18
+ startHour?: number;
19
+ /** Last visible hour — exclusive (default 18). */
20
+ endHour?: number;
21
+ /** Slot duration in minutes (default 30). */
22
+ slotDuration?: number;
23
+ }
24
+ declare const ScheduleView: React.ForwardRefExoticComponent<ScheduleViewProps & React.RefAttributes<HTMLDivElement>>;
25
+ export { ScheduleView };
26
+ //# sourceMappingURL=schedule-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-view.d.ts","sourceRoot":"","sources":["../../src/composed/schedule-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,IAAI,CAAA;IACT,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CACzE;AAED,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;IACpB,6EAA6E;IAC7E,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAC7C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,CAAA;IAC9C,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AA8MD,QAAA,MAAM,YAAY,0FAyDjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,183 @@
1
+ "use client";
2
+ import { jsxs as w, jsx as a } from "react/jsx-runtime";
3
+ import * as $ from "react";
4
+ import { startOfWeek as S, addDays as E, format as u, isSameDay as D, isToday as I, getHours as N, getMinutes as v, differenceInMinutes as A } from "date-fns";
5
+ import { cn as y } from "../ui/lib/utils.js";
6
+ const O = {
7
+ primary: "bg-interactive-subtle border-interactive text-interactive",
8
+ success: "bg-success-surface border-success text-success-text",
9
+ warning: "bg-warning-surface border-warning text-warning-text",
10
+ error: "bg-error-surface border-error text-error-text",
11
+ info: "bg-info-surface border-info text-info-text",
12
+ neutral: "bg-layer-02 border-border text-text-secondary"
13
+ };
14
+ function P(t) {
15
+ return t === 0 ? "12 AM" : t < 12 ? `${t} AM` : t === 12 ? "12 PM" : `${t - 12} PM`;
16
+ }
17
+ function T(t, s, o) {
18
+ const i = (o - s) * 60, r = (N(t.start) - s) * 60 + v(t.start), d = A(t.end, t.start), l = r / i * 100, f = d / i * 100;
19
+ return {
20
+ top: `${l}%`,
21
+ height: `${f}%`
22
+ };
23
+ }
24
+ function V({ startHour: t, endHour: s }) {
25
+ const o = [];
26
+ for (let r = t; r < s; r++)
27
+ o.push(r);
28
+ const i = 100 / (s - t);
29
+ return /* @__PURE__ */ a(
30
+ "div",
31
+ {
32
+ className: "relative shrink-0 w-[60px] border-r border-border",
33
+ "aria-hidden": "true",
34
+ children: o.map((r) => /* @__PURE__ */ a(
35
+ "div",
36
+ {
37
+ className: "text-ds-xs text-text-secondary pr-ds-02 text-right",
38
+ style: { height: `${i}%` },
39
+ children: P(r)
40
+ },
41
+ r
42
+ ))
43
+ }
44
+ );
45
+ }
46
+ function j({
47
+ date: t,
48
+ events: s,
49
+ startHour: o,
50
+ endHour: i,
51
+ slotDuration: r,
52
+ onEventClick: d,
53
+ onSlotClick: l,
54
+ showHeader: f
55
+ }) {
56
+ const g = s.filter((e) => D(e.start, t)), x = (i - o) * 60, p = x / r, m = [];
57
+ for (let e = 0; e < p; e++) {
58
+ const n = new Date(t);
59
+ n.setHours(o, e * r, 0, 0);
60
+ const b = new Date(n);
61
+ b.setMinutes(b.getMinutes() + r), m.push({ start: n, end: b });
62
+ }
63
+ const c = I(t);
64
+ let h = null;
65
+ if (c) {
66
+ const e = /* @__PURE__ */ new Date(), n = N(e), b = v(e);
67
+ n >= o && n < i && (h = ((n - o) * 60 + b) / x * 100);
68
+ }
69
+ return /* @__PURE__ */ w("div", { className: "flex flex-1 flex-col min-w-[80px]", children: [
70
+ f && /* @__PURE__ */ a(
71
+ "div",
72
+ {
73
+ className: y(
74
+ "text-center text-ds-sm font-semibold py-ds-02 border-b border-border",
75
+ c ? "text-interactive bg-interactive-subtle" : "text-text-primary bg-layer-01"
76
+ ),
77
+ children: u(t, "EEE d")
78
+ }
79
+ ),
80
+ /* @__PURE__ */ w("div", { className: "relative flex-1", children: [
81
+ m.map((e, n) => /* @__PURE__ */ a(
82
+ "button",
83
+ {
84
+ type: "button",
85
+ className: y(
86
+ "block w-full border-b border-border/50 hover:bg-layer-02/50 transition-colors",
87
+ n % 2 === 0 ? "border-border" : "border-border/30"
88
+ ),
89
+ style: { height: `${100 / p}%` },
90
+ onClick: () => l == null ? void 0 : l(e.start, e.end),
91
+ "aria-label": `${u(e.start, "h:mm a")} to ${u(e.end, "h:mm a")}`
92
+ },
93
+ n
94
+ )),
95
+ g.map((e) => {
96
+ const n = T(e, o, i), b = O[e.color ?? "primary"];
97
+ return /* @__PURE__ */ a(
98
+ "button",
99
+ {
100
+ type: "button",
101
+ className: y(
102
+ "absolute left-ds-01 right-ds-01 rounded-ds-sm border-l-[3px] px-ds-02 py-ds-01",
103
+ "text-left text-ds-xs font-medium overflow-hidden cursor-pointer",
104
+ "hover:opacity-90 transition-opacity",
105
+ b
106
+ ),
107
+ style: n,
108
+ onClick: (M) => {
109
+ M.stopPropagation(), d == null || d(e);
110
+ },
111
+ "aria-label": `${e.title}, ${u(e.start, "h:mm a")} to ${u(e.end, "h:mm a")}`,
112
+ children: /* @__PURE__ */ a("span", { className: "line-clamp-2", children: e.title })
113
+ },
114
+ e.id
115
+ );
116
+ }),
117
+ h != null && /* @__PURE__ */ a(
118
+ "div",
119
+ {
120
+ className: "absolute left-0 right-0 h-[2px] bg-error z-10 pointer-events-none",
121
+ style: { top: `${h}%` },
122
+ "aria-hidden": "true",
123
+ children: /* @__PURE__ */ a("span", { className: "absolute -left-[5px] -top-[4px] h-[10px] w-[10px] rounded-ds-full bg-error" })
124
+ }
125
+ )
126
+ ] })
127
+ ] });
128
+ }
129
+ const R = $.forwardRef(
130
+ ({
131
+ view: t,
132
+ date: s,
133
+ events: o,
134
+ onEventClick: i,
135
+ onSlotClick: r,
136
+ startHour: d = 8,
137
+ endHour: l = 18,
138
+ slotDuration: f = 30,
139
+ className: g,
140
+ ...x
141
+ }, p) => {
142
+ const m = $.useMemo(() => {
143
+ if (t === "day") return [s];
144
+ const c = S(s, { weekStartsOn: 1 });
145
+ return Array.from({ length: 7 }, (h, e) => E(c, e));
146
+ }, [t, s]);
147
+ return /* @__PURE__ */ w(
148
+ "div",
149
+ {
150
+ ref: p,
151
+ role: "region",
152
+ "aria-label": t === "day" ? `Schedule for ${u(s, "EEEE, MMMM d, yyyy")}` : `Week schedule starting ${u(m[0], "MMMM d, yyyy")}`,
153
+ className: y(
154
+ "flex rounded-ds-md border border-border bg-layer-01 overflow-hidden",
155
+ "h-[480px]",
156
+ g
157
+ ),
158
+ ...x,
159
+ children: [
160
+ /* @__PURE__ */ a(V, { startHour: d, endHour: l }),
161
+ /* @__PURE__ */ a("div", { className: "flex flex-1 divide-x divide-border overflow-x-auto", children: m.map((c) => /* @__PURE__ */ a(
162
+ j,
163
+ {
164
+ date: c,
165
+ events: o,
166
+ startHour: d,
167
+ endHour: l,
168
+ slotDuration: f,
169
+ onEventClick: i,
170
+ onSlotClick: r,
171
+ showHeader: t === "week"
172
+ },
173
+ c.toISOString()
174
+ )) })
175
+ ]
176
+ }
177
+ );
178
+ }
179
+ );
180
+ R.displayName = "ScheduleView";
181
+ export {
182
+ R as ScheduleView
183
+ };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ export interface SimpleTooltipProps {
4
+ content: React.ReactNode;
5
+ side?: 'top' | 'right' | 'bottom' | 'left';
6
+ align?: 'start' | 'center' | 'end';
7
+ delayDuration?: number;
8
+ children: React.ReactNode;
9
+ }
10
+ declare const SimpleTooltip: {
11
+ ({ content, side, align, delayDuration, children, }: SimpleTooltipProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export { SimpleTooltip };
15
+ //# sourceMappingURL=simple-tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-tooltip.d.ts","sourceRoot":"","sources":["../../src/composed/simple-tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,aAAa;yDAMhB,kBAAkB;;CASpB,CAAA;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as o, jsxs as p } from "react/jsx-runtime";
3
+ import { TooltipProvider as m, Tooltip as n, TooltipTrigger as T, TooltipContent as d } from "../ui/tooltip.js";
4
+ const s = ({
5
+ content: i,
6
+ side: t = "top",
7
+ align: r = "center",
8
+ delayDuration: e = 300,
9
+ children: l
10
+ }) => /* @__PURE__ */ o(m, { delayDuration: e, children: /* @__PURE__ */ p(n, { children: [
11
+ /* @__PURE__ */ o(T, { asChild: !0, children: l }),
12
+ /* @__PURE__ */ o(d, { side: t, align: r, children: i })
13
+ ] }) });
14
+ s.displayName = "SimpleTooltip";
15
+ export {
16
+ s as SimpleTooltip
17
+ };
@@ -2,9 +2,10 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const statusBadgeVariants: (props?: ({
4
4
  status?: "active" | "completed" | "pending" | "approved" | "rejected" | "blocked" | "cancelled" | "draft" | null | undefined;
5
+ color?: "error" | "warning" | "success" | "neutral" | "info" | null | undefined;
5
6
  size?: "sm" | "md" | null | undefined;
6
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
- export interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'>, VariantProps<typeof statusBadgeVariants> {
8
+ export interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'color'>, VariantProps<typeof statusBadgeVariants> {
8
9
  label?: string;
9
10
  hideDot?: boolean;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/composed/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,mBAAmB;;;8EAwBxB,CAAA;AAaD,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,EAC7D,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,WAAW,0FA0BhB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/composed/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,mBAAmB;;;;8EA8BxB,CAAA;AAqBD,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,EACvE,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,WAAW,0FAwChB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
@@ -1,8 +1,8 @@
1
- import { jsxs as l, jsx as p } from "react/jsx-runtime";
2
- import * as u from "react";
3
- import { cva as g } from "class-variance-authority";
4
- import { cn as r } from "../ui/lib/utils.js";
5
- const x = g(
1
+ import { jsxs as b, jsx as p } from "react/jsx-runtime";
2
+ import * as f from "react";
3
+ import { cva as m } from "class-variance-authority";
4
+ import { cn as a } from "../ui/lib/utils.js";
5
+ const y = m(
6
6
  "inline-flex items-center gap-ds-02b rounded-ds-full font-body",
7
7
  {
8
8
  variants: {
@@ -16,17 +16,23 @@ const x = g(
16
16
  cancelled: "bg-layer-02 text-text-placeholder",
17
17
  draft: "bg-layer-02 text-text-tertiary"
18
18
  },
19
+ color: {
20
+ success: "bg-success-surface text-text-success",
21
+ warning: "bg-warning-surface text-text-warning",
22
+ error: "bg-error-surface text-text-error",
23
+ info: "bg-info-surface text-text-info",
24
+ neutral: "bg-layer-02 text-text-tertiary"
25
+ },
19
26
  size: {
20
27
  sm: "px-ds-03 py-ds-01 text-ds-xs font-semibold",
21
28
  md: "px-ds-04 py-ds-02 text-ds-sm font-medium"
22
29
  }
23
30
  },
24
31
  defaultVariants: {
25
- status: "pending",
26
32
  size: "md"
27
33
  }
28
34
  }
29
- ), b = {
35
+ ), w = {
30
36
  active: "bg-success",
31
37
  pending: "bg-warning",
32
38
  approved: "bg-success",
@@ -35,35 +41,44 @@ const x = g(
35
41
  blocked: "bg-error",
36
42
  cancelled: "bg-icon-disabled",
37
43
  draft: "bg-icon-secondary"
38
- }, f = u.forwardRef(
39
- ({ status: s, size: t, label: a, hideDot: c = !1, className: d, ...n }, o) => {
40
- const e = s ?? "pending", i = a ?? e.charAt(0).toUpperCase() + e.slice(1);
41
- return /* @__PURE__ */ l(
44
+ }, h = {
45
+ success: "bg-success",
46
+ warning: "bg-warning",
47
+ error: "bg-error",
48
+ info: "bg-info",
49
+ neutral: "bg-icon-secondary"
50
+ }, v = f.forwardRef(
51
+ ({ status: c, color: e, size: r, label: o, hideDot: n = !1, className: d, ...i }, u) => {
52
+ const t = e != null, s = t ? void 0 : c ?? "pending", g = t ? e : void 0, l = o ?? (t ? e.charAt(0).toUpperCase() + e.slice(1) : s.charAt(0).toUpperCase() + s.slice(1)), x = t ? h[e] : w[s];
53
+ return /* @__PURE__ */ b(
42
54
  "span",
43
55
  {
44
- ref: o,
45
- className: r(x({ status: s, size: t }), d),
46
- ...n,
56
+ ref: u,
57
+ className: a(
58
+ y({ status: s, color: g, size: r }),
59
+ d
60
+ ),
61
+ ...i,
47
62
  children: [
48
- !c && /* @__PURE__ */ p(
63
+ !n && /* @__PURE__ */ p(
49
64
  "span",
50
65
  {
51
- className: r(
66
+ className: a(
52
67
  "shrink-0 rounded-ds-full",
53
- t === "sm" ? "h-ds-02b w-ds-02b" : "h-[8px] w-[8px]",
54
- b[e]
68
+ r === "sm" ? "h-ds-02b w-ds-02b" : "h-[8px] w-[8px]",
69
+ x
55
70
  ),
56
71
  "aria-hidden": "true"
57
72
  }
58
73
  ),
59
- i
74
+ l
60
75
  ]
61
76
  }
62
77
  );
63
78
  }
64
79
  );
65
- f.displayName = "StatusBadge";
80
+ v.displayName = "StatusBadge";
66
81
  export {
67
- f as StatusBadge,
68
- x as statusBadgeVariants
82
+ v as StatusBadge,
83
+ y as statusBadgeVariants
69
84
  };