@pibit.ai/cure-design-system 0.3.17 → 0.3.20

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 (144) hide show
  1. package/dist/applications/schedule-calendar/index.d.ts +4 -0
  2. package/dist/applications/schedule-calendar/index.d.ts.map +1 -0
  3. package/dist/applications/schedule-calendar/schedule-calendar.d.ts +3 -0
  4. package/dist/applications/schedule-calendar/schedule-calendar.d.ts.map +1 -0
  5. package/dist/applications/schedule-calendar/schedule-calendar.js +202 -0
  6. package/dist/applications/schedule-calendar/types.d.ts +56 -0
  7. package/dist/applications/schedule-calendar/types.d.ts.map +1 -0
  8. package/dist/applications/schedule-calendar/types.js +40 -0
  9. package/dist/applications/schedule-calendar/utils.d.ts +21 -0
  10. package/dist/applications/schedule-calendar/utils.d.ts.map +1 -0
  11. package/dist/applications/schedule-calendar/utils.js +152 -0
  12. package/dist/applications/schedule-calendar/utils.test.d.ts +2 -0
  13. package/dist/applications/schedule-calendar/utils.test.d.ts.map +1 -0
  14. package/dist/assets/icons/group-by.svg.js +4 -0
  15. package/dist/assets/icons/reorder-dots-new.svg.js +4 -0
  16. package/dist/assets/icons/reorder-dots.svg.js +4 -0
  17. package/dist/assets/icons/resize-1.svg.js +4 -0
  18. package/dist/assets/icons/resize-2.svg.js +4 -0
  19. package/dist/assets/icons/resize-4.svg.js +4 -0
  20. package/dist/assets/icons/resize-5.svg.js +4 -0
  21. package/dist/assets/icons/show-summary.svg.js +4 -0
  22. package/dist/index.d.ts +5 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +132 -59
  25. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +46 -0
  26. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +34 -0
  27. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +65 -0
  28. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +17 -0
  29. package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +5 -0
  30. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js +70 -0
  31. package/dist/node_modules/framer-motion/dist/es/value/use-combine-values.js +15 -0
  32. package/dist/node_modules/framer-motion/dist/es/value/use-computed.js +10 -0
  33. package/dist/node_modules/framer-motion/dist/es/value/use-motion-value.js +15 -0
  34. package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +23 -0
  35. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +1 -1
  36. package/dist/node_modules/motion-dom/dist/es/utils/transform.js +8 -0
  37. package/dist/node_modules/motion-dom/dist/es/value/index.js +21 -18
  38. package/dist/node_modules/motion-utils/dist/es/array.js +15 -6
  39. package/dist/patterns/table/TablePagination.d.ts +23 -0
  40. package/dist/patterns/table/TablePagination.d.ts.map +1 -0
  41. package/dist/patterns/table/TablePagination.js +60 -0
  42. package/dist/patterns/table/TableWrapper.d.ts +2 -72
  43. package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
  44. package/dist/patterns/table/TableWrapper.js +730 -75
  45. package/dist/patterns/table/index.d.ts +11 -1
  46. package/dist/patterns/table/index.d.ts.map +1 -1
  47. package/dist/patterns/table/pagination-base.d.ts +78 -0
  48. package/dist/patterns/table/pagination-base.d.ts.map +1 -0
  49. package/dist/patterns/table/pagination-base.js +127 -0
  50. package/dist/patterns/table/pagination-card.d.ts +9 -0
  51. package/dist/patterns/table/pagination-card.d.ts.map +1 -0
  52. package/dist/patterns/table/pagination-card.js +65 -0
  53. package/dist/patterns/table/row-height-icons.d.ts +9 -0
  54. package/dist/patterns/table/row-height-icons.d.ts.map +1 -0
  55. package/dist/patterns/table/row-height-icons.js +13 -0
  56. package/dist/patterns/table/storyHelpers/mockToolbarSlots.d.ts +7 -0
  57. package/dist/patterns/table/storyHelpers/mockToolbarSlots.d.ts.map +1 -0
  58. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts +31 -0
  59. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts.map +1 -0
  60. package/dist/patterns/table/storyHelpers/useMockTableToolbar.d.ts +3 -0
  61. package/dist/patterns/table/storyHelpers/useMockTableToolbar.d.ts.map +1 -0
  62. package/dist/patterns/table/table.d.ts +10 -13
  63. package/dist/patterns/table/table.d.ts.map +1 -1
  64. package/dist/patterns/table/table.js +235 -312
  65. package/dist/patterns/table/toolbar/AlignDropdown.d.ts +11 -0
  66. package/dist/patterns/table/toolbar/AlignDropdown.d.ts.map +1 -0
  67. package/dist/patterns/table/toolbar/AlignDropdown.js +77 -0
  68. package/dist/patterns/table/toolbar/BasicSortPanel.d.ts +6 -0
  69. package/dist/patterns/table/toolbar/BasicSortPanel.d.ts.map +1 -0
  70. package/dist/patterns/table/toolbar/BulkActionBar.d.ts +12 -0
  71. package/dist/patterns/table/toolbar/BulkActionBar.d.ts.map +1 -0
  72. package/dist/patterns/table/toolbar/BulkActionBar.js +62 -0
  73. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts +41 -0
  74. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts.map +1 -0
  75. package/dist/patterns/table/toolbar/ColumnHeaderMenu.js +171 -0
  76. package/dist/patterns/table/toolbar/GroupByDropdown.d.ts +11 -0
  77. package/dist/patterns/table/toolbar/GroupByDropdown.d.ts.map +1 -0
  78. package/dist/patterns/table/toolbar/GroupByDropdown.js +80 -0
  79. package/dist/patterns/table/toolbar/HideFieldsDropdown.d.ts +13 -0
  80. package/dist/patterns/table/toolbar/HideFieldsDropdown.d.ts.map +1 -0
  81. package/dist/patterns/table/toolbar/HideFieldsDropdown.js +180 -0
  82. package/dist/patterns/table/toolbar/LegacySortFilterTools.d.ts +9 -0
  83. package/dist/patterns/table/toolbar/LegacySortFilterTools.d.ts.map +1 -0
  84. package/dist/patterns/table/toolbar/RowActionsMenu.d.ts +19 -0
  85. package/dist/patterns/table/toolbar/RowActionsMenu.d.ts.map +1 -0
  86. package/dist/patterns/table/toolbar/RowActionsMenu.js +84 -0
  87. package/dist/patterns/table/toolbar/RowHeightDropdown.d.ts +9 -0
  88. package/dist/patterns/table/toolbar/RowHeightDropdown.d.ts.map +1 -0
  89. package/dist/patterns/table/toolbar/RowHeightDropdown.js +60 -0
  90. package/dist/patterns/table/toolbar/ShowSummaryDropdown.d.ts +8 -0
  91. package/dist/patterns/table/toolbar/ShowSummaryDropdown.d.ts.map +1 -0
  92. package/dist/patterns/table/toolbar/ShowSummaryDropdown.js +22 -0
  93. package/dist/patterns/table/toolbar/SummaryFooter.d.ts +16 -0
  94. package/dist/patterns/table/toolbar/SummaryFooter.d.ts.map +1 -0
  95. package/dist/patterns/table/toolbar/SummaryFooter.js +83 -0
  96. package/dist/patterns/table/toolbar/TableToolbar.d.ts +55 -0
  97. package/dist/patterns/table/toolbar/TableToolbar.d.ts.map +1 -0
  98. package/dist/patterns/table/toolbar/TableToolbar.js +234 -0
  99. package/dist/patterns/table/toolbar/ToolbarRadio.d.ts +18 -0
  100. package/dist/patterns/table/toolbar/ToolbarRadio.d.ts.map +1 -0
  101. package/dist/patterns/table/toolbar/ToolbarRadio.js +63 -0
  102. package/dist/patterns/table/toolbar/index.d.ts +24 -0
  103. package/dist/patterns/table/toolbar/index.d.ts.map +1 -0
  104. package/dist/patterns/table/toolbar/legacyToolbarTypes.d.ts +69 -0
  105. package/dist/patterns/table/toolbar/legacyToolbarTypes.d.ts.map +1 -0
  106. package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts +35 -0
  107. package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts.map +1 -0
  108. package/dist/patterns/table/toolbar/tableToolbarHelpers.js +259 -0
  109. package/dist/patterns/table/toolbar/tableToolbarHelpers.test.d.ts +2 -0
  110. package/dist/patterns/table/toolbar/tableToolbarHelpers.test.d.ts.map +1 -0
  111. package/dist/patterns/table/toolbar/toolbarExtensions.d.ts +12 -0
  112. package/dist/patterns/table/toolbar/toolbarExtensions.d.ts.map +1 -0
  113. package/dist/patterns/table/toolbar/toolbarExtensions.js +18 -0
  114. package/dist/patterns/table/toolbar-icons.d.ts +8 -0
  115. package/dist/patterns/table/toolbar-icons.d.ts.map +1 -0
  116. package/dist/patterns/table/toolbar-icons.js +13 -0
  117. package/dist/patterns/table/types.d.ts +141 -0
  118. package/dist/patterns/table/types.d.ts.map +1 -0
  119. package/dist/patterns/table/useGridKeyboardNavigation.d.ts +38 -0
  120. package/dist/patterns/table/useGridKeyboardNavigation.d.ts.map +1 -0
  121. package/dist/patterns/table/useGridKeyboardNavigation.js +65 -0
  122. package/dist/primitives/checkbox/checkbox.d.ts +2 -2
  123. package/dist/primitives/checkbox/checkbox.d.ts.map +1 -1
  124. package/dist/primitives/dropdown/dropdown.d.ts +32 -0
  125. package/dist/primitives/dropdown/dropdown.d.ts.map +1 -0
  126. package/dist/primitives/dropdown/dropdown.js +118 -0
  127. package/dist/primitives/dropdown/index.d.ts +2 -0
  128. package/dist/primitives/dropdown/index.d.ts.map +1 -0
  129. package/dist/primitives/select/ExpandableSearchInput.d.ts +5 -1
  130. package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -1
  131. package/dist/primitives/select/ExpandableSearchInput.js +80 -77
  132. package/dist/primitives/shimmer/index.d.ts +2 -0
  133. package/dist/primitives/shimmer/index.d.ts.map +1 -0
  134. package/dist/primitives/shimmer/shimmer.d.ts +24 -0
  135. package/dist/primitives/shimmer/shimmer.d.ts.map +1 -0
  136. package/dist/primitives/shimmer/shimmer.js +37 -0
  137. package/dist/primitives/snackbar/index.d.ts +2 -0
  138. package/dist/primitives/snackbar/index.d.ts.map +1 -0
  139. package/dist/primitives/snackbar/snackbar.d.ts +27 -0
  140. package/dist/primitives/snackbar/snackbar.d.ts.map +1 -0
  141. package/dist/primitives/snackbar/snackbar.js +107 -0
  142. package/dist/styles/components.css +1 -1
  143. package/dist/styles/theme.css +1 -1
  144. package/package.json +4 -1
@@ -0,0 +1,4 @@
1
+ export { ScheduleCalendar } from './schedule-calendar';
2
+ export { WEEKDAYS, type WeekdayKey, type ScheduleWindow, type DaySchedule, type ScheduleCalendarProps, } from './types';
3
+ export { formatHour, formatHourLabel, formatSlotLabel, formatTime, schedulesToCellSet, cellSetToSchedules, mergeHoursToWindows, mergeSlotsToWindows, getSlotRange, } from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/applications/schedule-calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,QAAQ,EACR,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,qBAAqB,GAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,UAAU,EACV,eAAe,EACf,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,GACb,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ScheduleCalendarProps } from './types';
2
+ export declare function ScheduleCalendar({ value, onChange, startHour: startHourProp, endHour: endHourProp, halfHourIntervals, className, disabled, }: ScheduleCalendarProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=schedule-calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-calendar.d.ts","sourceRoot":"","sources":["../../../src/applications/schedule-calendar/schedule-calendar.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAIL,KAAK,qBAAqB,EAE3B,MAAM,SAAS,CAAC;AAQjB,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,SAAS,EAAE,aAAiB,EAC5B,OAAO,EAAE,WAAgB,EACzB,iBAAyB,EACzB,SAAS,EACT,QAAgB,GACjB,EAAE,qBAAqB,2CA6PvB"}
@@ -0,0 +1,202 @@
1
+ import { jsx as i, jsxs as A } from "react/jsx-runtime";
2
+ import { useMemo as w, useRef as P, useState as K, useCallback as u, useEffect as q } from "react";
3
+ import { cn as b } from "../../utils/cn.js";
4
+ import { getHourRange as G, clampHourRange as Y, getSlotRange as B, schedulesToCellSet as J, cellKey as C, cellSetToSchedules as Q, formatHourLabel as V, formatSlotLabel as X, getRectangleCells as Z } from "./utils.js";
5
+ import { WEEKDAYS as p } from "./types.js";
6
+ function oe({
7
+ value: k,
8
+ onChange: v,
9
+ startHour: F = 0,
10
+ endHour: T = 23,
11
+ halfHourIntervals: n = !1,
12
+ className: j,
13
+ disabled: c = !1
14
+ }) {
15
+ const { startHour: m, endHour: y } = Y(F, T), E = w(
16
+ () => G(m, y),
17
+ [m, y]
18
+ ), l = w(
19
+ () => B(m, y, n),
20
+ [m, y, n]
21
+ ), g = w(
22
+ () => J(k, n),
23
+ [k, n]
24
+ ), h = P(null), [R, N] = K(!1), [a, x] = K(null), L = P(null), M = u(
25
+ (e, r) => g.has(C(e, r)),
26
+ [g]
27
+ ), f = u(
28
+ (e) => {
29
+ const r = new Set(g);
30
+ e(r), v(Q(r, n));
31
+ },
32
+ [n, v, g]
33
+ ), D = u(
34
+ (e) => {
35
+ const r = C(e.day, e.hour);
36
+ f((t) => {
37
+ t.has(r) ? t.delete(r) : t.add(r);
38
+ });
39
+ },
40
+ [f]
41
+ ), z = u(
42
+ (e, r) => {
43
+ f((t) => {
44
+ for (const s of e) {
45
+ const o = C(s.day, s.hour);
46
+ r === "select" && !t.has(o) && t.add(o), r === "deselect" && t.has(o) && t.delete(o);
47
+ }
48
+ });
49
+ },
50
+ [f]
51
+ ), $ = u(() => {
52
+ const e = h.current;
53
+ e && !e.moved && D(e.anchor), h.current = null, N(!1);
54
+ }, [D]);
55
+ q(() => {
56
+ if (!R) return;
57
+ const e = () => {
58
+ $();
59
+ };
60
+ return window.addEventListener("pointerup", e), () => {
61
+ window.removeEventListener("pointerup", e);
62
+ };
63
+ }, [$, R]);
64
+ const O = (e) => {
65
+ c || (h.current = {
66
+ anchor: e,
67
+ mode: M(e.day, e.hour) ? "deselect" : "select",
68
+ moved: !1
69
+ }, N(!0), x(e));
70
+ }, U = (e) => {
71
+ const r = h.current;
72
+ if (!r || c) return;
73
+ r.moved = !0;
74
+ const t = Z(
75
+ r.anchor,
76
+ e,
77
+ l
78
+ );
79
+ z(t, r.mode);
80
+ }, W = (e) => {
81
+ var t;
82
+ x(e);
83
+ const r = (t = L.current) == null ? void 0 : t.querySelector(
84
+ `[data-day="${e.day}"][data-hour="${e.hour}"]`
85
+ );
86
+ r == null || r.focus();
87
+ }, _ = (e) => {
88
+ if (c || !a) return;
89
+ const r = p.findIndex((d) => d.key === a.day), t = l.findIndex((d) => d === a.hour);
90
+ let s = r, o = t;
91
+ switch (e.key) {
92
+ case "ArrowLeft":
93
+ o = Math.max(0, t - 1);
94
+ break;
95
+ case "ArrowRight":
96
+ o = Math.min(l.length - 1, t + 1);
97
+ break;
98
+ case "ArrowUp":
99
+ s = Math.max(0, r - 1);
100
+ break;
101
+ case "ArrowDown":
102
+ s = Math.min(p.length - 1, r + 1);
103
+ break;
104
+ case " ":
105
+ case "Enter":
106
+ e.preventDefault(), D(a);
107
+ return;
108
+ default:
109
+ return;
110
+ }
111
+ e.preventDefault();
112
+ const S = {
113
+ day: p[s].key,
114
+ hour: l[o]
115
+ };
116
+ W(S);
117
+ };
118
+ return /* @__PURE__ */ i("div", { className: b("w-full overflow-x-auto", j), children: /* @__PURE__ */ A(
119
+ "div",
120
+ {
121
+ ref: L,
122
+ role: "grid",
123
+ "aria-label": "Weekly schedule",
124
+ "aria-disabled": c || void 0,
125
+ className: b(
126
+ "inline-grid min-w-full select-none border border-secondary bg-primary",
127
+ c && "cursor-not-allowed opacity-60"
128
+ ),
129
+ style: {
130
+ gridTemplateColumns: `minmax(7rem, auto) repeat(${l.length}, minmax(${n ? "1.5rem" : "2.75rem"}, 1fr))`
131
+ },
132
+ onKeyDown: _,
133
+ children: [
134
+ /* @__PURE__ */ i(
135
+ "div",
136
+ {
137
+ role: "columnheader",
138
+ className: "sticky left-0 z-20 border-b border-r border-secondary bg-secondary_subtle px-3 py-2 text-xs font-medium text-tertiary",
139
+ children: "Days"
140
+ }
141
+ ),
142
+ E.map((e, r) => /* @__PURE__ */ i(
143
+ "div",
144
+ {
145
+ role: "columnheader",
146
+ style: n ? { gridColumn: "span 2" } : void 0,
147
+ className: b(
148
+ "border-b border-r border-secondary bg-secondary_subtle px-2 py-2 text-center text-xs font-medium text-tertiary",
149
+ r === E.length - 1 && "border-r-0"
150
+ ),
151
+ children: V(e)
152
+ },
153
+ e
154
+ )),
155
+ p.map((e) => /* @__PURE__ */ A("div", { role: "row", className: "contents", children: [
156
+ /* @__PURE__ */ i(
157
+ "div",
158
+ {
159
+ role: "rowheader",
160
+ className: "sticky left-0 z-10 border-b border-r border-secondary bg-primary px-3 py-2 text-xs text-secondary last:border-b-0",
161
+ children: e.value
162
+ }
163
+ ),
164
+ l.map((r, t) => {
165
+ const s = M(e.key, r), o = (a == null ? void 0 : a.day) === e.key && a.hour === r, S = t === l.length - 1;
166
+ return /* @__PURE__ */ i(
167
+ "div",
168
+ {
169
+ role: "gridcell",
170
+ "data-day": e.key,
171
+ "data-hour": r,
172
+ tabIndex: o ? 0 : -1,
173
+ "aria-selected": s,
174
+ "aria-label": `${e.value} ${X(r, n)}`,
175
+ className: b(
176
+ "h-10 border-b border-r border-secondary",
177
+ S && "border-r-0",
178
+ !c && "cursor-crosshair",
179
+ s ? "bg-brand-solid" : "bg-primary",
180
+ o && "ring-2 ring-focus-ring ring-inset"
181
+ ),
182
+ onPointerDown: (d) => {
183
+ d.preventDefault(), O({ day: e.key, hour: r });
184
+ },
185
+ onPointerEnter: () => {
186
+ U({ day: e.key, hour: r });
187
+ },
188
+ onFocus: () => {
189
+ x({ day: e.key, hour: r });
190
+ }
191
+ },
192
+ r
193
+ );
194
+ })
195
+ ] }, e.key))
196
+ ]
197
+ }
198
+ ) });
199
+ }
200
+ export {
201
+ oe as ScheduleCalendar
202
+ };
@@ -0,0 +1,56 @@
1
+ export declare const WEEKDAYS: readonly [{
2
+ readonly key: "MONDAY";
3
+ readonly value: "Monday";
4
+ readonly order: 0;
5
+ }, {
6
+ readonly key: "TUESDAY";
7
+ readonly value: "Tuesday";
8
+ readonly order: 1;
9
+ }, {
10
+ readonly key: "WEDNESDAY";
11
+ readonly value: "Wednesday";
12
+ readonly order: 2;
13
+ }, {
14
+ readonly key: "THURSDAY";
15
+ readonly value: "Thursday";
16
+ readonly order: 3;
17
+ }, {
18
+ readonly key: "FRIDAY";
19
+ readonly value: "Friday";
20
+ readonly order: 4;
21
+ }, {
22
+ readonly key: "SATURDAY";
23
+ readonly value: "Saturday";
24
+ readonly order: 5;
25
+ }, {
26
+ readonly key: "SUNDAY";
27
+ readonly value: "Sunday";
28
+ readonly order: 6;
29
+ }];
30
+ export type WeekdayKey = (typeof WEEKDAYS)[number]["key"];
31
+ export type ScheduleWindow = {
32
+ start: string;
33
+ end: string;
34
+ };
35
+ export type DaySchedule = {
36
+ day_of_week: WeekdayKey;
37
+ windows: ScheduleWindow[];
38
+ };
39
+ export type ScheduleCalendarProps = {
40
+ value: DaySchedule[];
41
+ onChange: (value: DaySchedule[]) => void;
42
+ /** First hour column to display (0–23). @default 0 */
43
+ startHour?: number;
44
+ /** Last hour column to display (0–23). @default 23 */
45
+ endHour?: number;
46
+ /** When true, show two 30-minute cells per hour instead of one hourly cell. @default false */
47
+ halfHourIntervals?: boolean;
48
+ className?: string;
49
+ disabled?: boolean;
50
+ };
51
+ export type CellCoordinate = {
52
+ day: WeekdayKey;
53
+ hour: number;
54
+ };
55
+ export type DragMode = "select" | "deselect";
56
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/applications/schedule-calendar/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCX,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,UAAU,CAAC;IACxB,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IACzC,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC"}
@@ -0,0 +1,40 @@
1
+ const e = [
2
+ {
3
+ key: "MONDAY",
4
+ value: "Monday",
5
+ order: 0
6
+ },
7
+ {
8
+ key: "TUESDAY",
9
+ value: "Tuesday",
10
+ order: 1
11
+ },
12
+ {
13
+ key: "WEDNESDAY",
14
+ value: "Wednesday",
15
+ order: 2
16
+ },
17
+ {
18
+ key: "THURSDAY",
19
+ value: "Thursday",
20
+ order: 3
21
+ },
22
+ {
23
+ key: "FRIDAY",
24
+ value: "Friday",
25
+ order: 4
26
+ },
27
+ {
28
+ key: "SATURDAY",
29
+ value: "Saturday",
30
+ order: 5
31
+ },
32
+ {
33
+ key: "SUNDAY",
34
+ value: "Sunday",
35
+ order: 6
36
+ }
37
+ ];
38
+ export {
39
+ e as WEEKDAYS
40
+ };
@@ -0,0 +1,21 @@
1
+ import { CellCoordinate, DaySchedule, WeekdayKey } from './types';
2
+ export declare function formatHour(hour: number): string;
3
+ export declare function formatTime(minutesFromMidnight: number): string;
4
+ export declare function parseHour(time: string): number;
5
+ export declare function parseTimeToMinutes(time: string): number;
6
+ export declare function formatHourLabel(hour: number): string;
7
+ export declare function formatSlotLabel(slotValue: number, halfHourIntervals: boolean): string;
8
+ export declare function cellKey(day: WeekdayKey, slotValue: number): string;
9
+ export declare const HALF_HOUR_SLOT_MINUTES = 30;
10
+ export declare function schedulesToCellSet(value: DaySchedule[], halfHourIntervals?: boolean): Set<string>;
11
+ export declare function cellSetToSchedules(cells: Set<string>, halfHourIntervals?: boolean): DaySchedule[];
12
+ export declare function mergeHoursToWindows(hours: number[]): DaySchedule["windows"];
13
+ export declare function mergeSlotsToWindows(slots: number[]): DaySchedule["windows"];
14
+ export declare function getHourRange(startHour: number, endHour: number): number[];
15
+ export declare function getSlotRange(startHour: number, endHour: number, halfHourIntervals: boolean): number[];
16
+ export declare function getRectangleCells(anchor: CellCoordinate, current: CellCoordinate, hours: number[]): CellCoordinate[];
17
+ export declare function clampHourRange(startHour: number, endHour: number): {
18
+ startHour: number;
19
+ endHour: number;
20
+ };
21
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/applications/schedule-calendar/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3F,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,UAAU,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAI9D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MA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AOzG"}
@@ -0,0 +1,152 @@
1
+ import { WEEKDAYS as h } from "./types.js";
2
+ function m(t) {
3
+ return `${String(t).padStart(2, "0")}:00`;
4
+ }
5
+ function p(t) {
6
+ const e = Math.floor(t / 60), n = t % 60;
7
+ return `${String(e).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
8
+ }
9
+ function y(t) {
10
+ const [e] = t.split(":");
11
+ return Number.parseInt(e, 10);
12
+ }
13
+ function S(t) {
14
+ const [e, n = "0"] = t.split(":");
15
+ return Number.parseInt(e, 10) * 60 + Number.parseInt(n, 10);
16
+ }
17
+ function g(t) {
18
+ return t === 0 ? "12am" : t < 12 ? `${t}am` : t === 12 ? "12pm" : `${t - 12}pm`;
19
+ }
20
+ function O(t, e) {
21
+ if (!e)
22
+ return g(t);
23
+ const n = Math.floor(t / 60), o = t % 60;
24
+ if (o === 0)
25
+ return g(n);
26
+ const r = n < 12 ? "am" : "pm";
27
+ return `${n === 0 ? 12 : n > 12 ? n - 12 : n}:${String(o).padStart(2, "0")}${r}`;
28
+ }
29
+ function M(t, e) {
30
+ return `${t}:${e}`;
31
+ }
32
+ const f = 30;
33
+ function b(t, e = !1) {
34
+ const n = /* @__PURE__ */ new Set();
35
+ for (const o of t)
36
+ for (const r of o.windows) {
37
+ if (e) {
38
+ const u = S(r.start), d = S(r.end);
39
+ for (let c = u; c < d; c += f)
40
+ n.add(M(o.day_of_week, c));
41
+ continue;
42
+ }
43
+ const s = y(r.start), a = y(r.end);
44
+ for (let u = s; u <= a; u++)
45
+ n.add(M(o.day_of_week, u));
46
+ }
47
+ return n;
48
+ }
49
+ function D(t, e = !1) {
50
+ const n = /* @__PURE__ */ new Map();
51
+ for (const r of t) {
52
+ const [s, a] = r.split(":"), u = Number.parseInt(a, 10), d = s, c = n.get(d) ?? [];
53
+ c.push(u), n.set(d, c);
54
+ }
55
+ const o = [];
56
+ for (const r of h) {
57
+ const s = n.get(r.key);
58
+ s != null && s.length && o.push({
59
+ day_of_week: r.key,
60
+ windows: e ? $(s) : I(s)
61
+ });
62
+ }
63
+ return o;
64
+ }
65
+ function I(t) {
66
+ const e = [...t].sort((s, a) => s - a), n = [];
67
+ let o = e[0], r = e[0];
68
+ for (let s = 1; s < e.length; s++) {
69
+ const a = e[s];
70
+ if (a === r + 1) {
71
+ r = a;
72
+ continue;
73
+ }
74
+ n.push({
75
+ start: m(o),
76
+ end: m(r)
77
+ }), o = a, r = a;
78
+ }
79
+ return n.push({
80
+ start: m(o),
81
+ end: m(r)
82
+ }), n;
83
+ }
84
+ function $(t) {
85
+ const e = [...t].sort((s, a) => s - a), n = [];
86
+ let o = e[0], r = e[0];
87
+ for (let s = 1; s < e.length; s++) {
88
+ const a = e[s];
89
+ if (a === r + f) {
90
+ r = a;
91
+ continue;
92
+ }
93
+ n.push({
94
+ start: p(o),
95
+ end: p(r + f)
96
+ }), o = a, r = a;
97
+ }
98
+ return n.push({
99
+ start: p(o),
100
+ end: p(r + f)
101
+ }), n;
102
+ }
103
+ function T(t, e) {
104
+ const n = [];
105
+ for (let o = t; o <= e; o++)
106
+ n.push(o);
107
+ return n;
108
+ }
109
+ function E(t, e, n) {
110
+ if (!n)
111
+ return T(t, e);
112
+ const o = [], r = t * 60, s = e * 60 + f;
113
+ for (let a = r; a <= s; a += f)
114
+ o.push(a);
115
+ return o;
116
+ }
117
+ function N(t, e, n) {
118
+ const o = new Map(h.map((i) => [i.key, i.order])), r = new Map(n.map((i, l) => [i, l])), s = o.get(t.day) ?? 0, a = o.get(e.day) ?? 0, u = r.get(t.hour) ?? 0, d = r.get(e.hour) ?? 0, c = Math.min(s, a), x = Math.max(s, a), H = Math.min(u, d), k = Math.max(u, d), w = [];
119
+ for (const i of h)
120
+ if (!(i.order < c || i.order > x))
121
+ for (let l = H; l <= k; l++)
122
+ w.push({
123
+ day: i.key,
124
+ hour: n[l]
125
+ });
126
+ return w;
127
+ }
128
+ function R(t, e) {
129
+ const n = Math.max(0, Math.min(23, t)), o = Math.max(0, Math.min(23, e));
130
+ return {
131
+ startHour: Math.min(n, o),
132
+ endHour: Math.max(n, o)
133
+ };
134
+ }
135
+ export {
136
+ f as HALF_HOUR_SLOT_MINUTES,
137
+ M as cellKey,
138
+ D as cellSetToSchedules,
139
+ R as clampHourRange,
140
+ m as formatHour,
141
+ g as formatHourLabel,
142
+ O as formatSlotLabel,
143
+ p as formatTime,
144
+ T as getHourRange,
145
+ N as getRectangleCells,
146
+ E as getSlotRange,
147
+ I as mergeHoursToWindows,
148
+ $ as mergeSlotsToWindows,
149
+ y as parseHour,
150
+ S as parseTimeToMinutes,
151
+ b as schedulesToCellSet
152
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=utils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../src/applications/schedule-calendar/utils.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ const C = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.9%205C9.46005%205%209.74008%205%209.95399%204.89101C10.1422%204.79513%2010.2951%204.64215%2010.391%204.45399C10.5%204.24008%2010.5%203.96005%2010.5%203.4V3.1C10.5%202.53995%2010.5%202.25992%2010.391%202.04601C10.2951%201.85785%2010.1422%201.70487%209.95399%201.60899C9.74008%201.5%209.46005%201.5%208.9%201.5L3.1%201.5C2.53995%201.5%202.25992%201.5%202.04601%201.60899C1.85785%201.70487%201.70487%201.85785%201.60899%202.04601C1.5%202.25992%201.5%202.53995%201.5%203.1L1.5%203.4C1.5%203.96005%201.5%204.24008%201.60899%204.45399C1.70487%204.64215%201.85785%204.79513%202.04601%204.89101C2.25992%205%202.53995%205%203.1%205L8.9%205Z'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.9%2010.5C9.46005%2010.5%209.74008%2010.5%209.95399%2010.391C10.1422%2010.2951%2010.2951%2010.1422%2010.391%209.95399C10.5%209.74008%2010.5%209.46005%2010.5%208.9V8.6C10.5%208.03995%2010.5%207.75992%2010.391%207.54601C10.2951%207.35785%2010.1422%207.20487%209.95399%207.10899C9.74008%207%209.46005%207%208.9%207L3.1%207C2.53995%207%202.25992%207%202.04601%207.10899C1.85785%207.20487%201.70487%207.35785%201.60899%207.54601C1.5%207.75992%201.5%208.03995%201.5%208.6L1.5%208.9C1.5%209.46005%201.5%209.74008%201.60899%209.95399C1.70487%2010.1422%201.85785%2010.2951%202.04601%2010.391C2.25992%2010.5%202.53995%2010.5%203.1%2010.5H8.9Z'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ C as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const o = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.66667%204.00033C6.03486%204.00033%206.33333%203.70185%206.33333%203.33366C6.33333%202.96547%206.03486%202.66699%205.66667%202.66699C5.29848%202.66699%205%202.96547%205%203.33366C5%203.70185%205.29848%204.00033%205.66667%204.00033Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.66667%208.66699C6.03486%208.66699%206.33333%208.36852%206.33333%208.00033C6.33333%207.63214%206.03486%207.33366%205.66667%207.33366C5.29848%207.33366%205%207.63214%205%208.00033C5%208.36852%205.29848%208.66699%205.66667%208.66699Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.66667%2013.3337C6.03486%2013.3337%206.33333%2013.0352%206.33333%2012.667C6.33333%2012.2988%206.03486%2012.0003%205.66667%2012.0003C5.29848%2012.0003%205%2012.2988%205%2012.667C5%2013.0352%205.29848%2013.3337%205.66667%2013.3337Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.3333%204.00033C10.7015%204.00033%2011%203.70185%2011%203.33366C11%202.96547%2010.7015%202.66699%2010.3333%202.66699C9.96514%202.66699%209.66667%202.96547%209.66667%203.33366C9.66667%203.70185%209.96514%204.00033%2010.3333%204.00033Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.3333%208.66699C10.7015%208.66699%2011%208.36852%2011%208.00033C11%207.63214%2010.7015%207.33366%2010.3333%207.33366C9.96514%207.33366%209.66667%207.63214%209.66667%208.00033C9.66667%208.36852%209.96514%208.66699%2010.3333%208.66699Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.3333%2013.3337C10.7015%2013.3337%2011%2013.0352%2011%2012.667C11%2012.2988%2010.7015%2012.0003%2010.3333%2012.0003C9.96514%2012.0003%209.66667%2012.2988%209.66667%2012.667C9.66667%2013.0352%209.96514%2013.3337%2010.3333%2013.3337Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const o = "data:image/svg+xml,%3csvg%20width='8'%20height='14'%20viewBox='0%200%208%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.375%202.125C1.78921%202.125%202.125%201.78921%202.125%201.375C2.125%200.960786%201.78921%200.625%201.375%200.625C0.960786%200.625%200.625%200.960786%200.625%201.375C0.625%201.78921%200.960786%202.125%201.375%202.125Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.375%207.375C1.78921%207.375%202.125%207.03921%202.125%206.625C2.125%206.21079%201.78921%205.875%201.375%205.875C0.960786%205.875%200.625%206.21079%200.625%206.625C0.625%207.03921%200.960786%207.375%201.375%207.375Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.375%2012.625C1.78921%2012.625%202.125%2012.2892%202.125%2011.875C2.125%2011.4608%201.78921%2011.125%201.375%2011.125C0.960786%2011.125%200.625%2011.4608%200.625%2011.875C0.625%2012.2892%200.960786%2012.625%201.375%2012.625Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.625%202.125C7.03921%202.125%207.375%201.78921%207.375%201.375C7.375%200.960786%207.03921%200.625%206.625%200.625C6.21079%200.625%205.875%200.960786%205.875%201.375C5.875%201.78921%206.21079%202.125%206.625%202.125Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.625%207.375C7.03921%207.375%207.375%207.03921%207.375%206.625C7.375%206.21079%207.03921%205.875%206.625%205.875C6.21079%205.875%205.875%206.21079%205.875%206.625C5.875%207.03921%206.21079%207.375%206.625%207.375Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.625%2012.625C7.03921%2012.625%207.375%2012.2892%207.375%2011.875C7.375%2011.4608%207.03921%2011.125%206.625%2011.125C6.21079%2011.125%205.875%2011.4608%205.875%2011.875C5.875%2012.2892%206.21079%2012.625%206.625%2012.625Z'%20stroke='currentColor'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.6666%207.99967L7.99992%207.99967M14.6666%203.66634H7.99992M14.6666%2012.333H7.99992M3.33325%2012.6663L3.33325%203.33301M5.33325%2011.333L3.33325%2012.6663L1.33325%2011.333M5.33325%204.66634L3.33325%203.33301L1.33325%204.66634'%20stroke='%23818792'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.6666%208.99967H7.99992M14.6666%2012.333H7.99992M3.33325%2012.6663L3.33325%203.33301M5.33325%2011.333L3.33325%2012.6663L1.33325%2011.333M5.33325%204.66634L3.33325%203.33301L1.33325%204.66634M9.06659%205.99967H13.5999C13.9733%205.99967%2014.16%205.99967%2014.3026%205.92701C14.428%205.8631%2014.53%205.76111%2014.5939%205.63567C14.6666%205.49306%2014.6666%205.30638%2014.6666%204.93301V4.39967C14.6666%204.02631%2014.6666%203.83962%2014.5939%203.69701C14.53%203.57157%2014.428%203.46959%2014.3026%203.40567C14.16%203.33301%2013.9733%203.33301%2013.5999%203.33301H9.06659C8.69322%203.33301%208.50653%203.33301%208.36392%203.40567C8.23848%203.46959%208.1365%203.57157%208.07258%203.69701C7.99992%203.83962%207.99992%204.02631%207.99992%204.39967V4.93301C7.99992%205.30638%207.99992%205.49306%208.07258%205.63567C8.1365%205.76111%208.23848%205.8631%208.36392%205.92701C8.50653%205.99967%208.69322%205.99967%209.06659%205.99967Z'%20stroke='%23818792'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.6666%209.66634H7.99992M14.6666%2012.333H7.99992M3.33325%2012.6663L3.33325%203.33301M5.33325%2011.333L3.33325%2012.6663L1.33325%2011.333M5.33325%204.66634L3.33325%203.33301L1.33325%204.66634M9.59992%207.33301H13.0666C13.6266%207.33301%2013.9067%207.33301%2014.1206%207.22401C14.3087%207.12814%2014.4617%206.97516%2014.5576%206.787C14.6666%206.57309%2014.6666%206.29306%2014.6666%205.73301V4.93301C14.6666%204.37296%2014.6666%204.09293%2014.5576%203.87902C14.4617%203.69086%2014.3087%203.53787%2014.1206%203.442C13.9067%203.33301%2013.6266%203.33301%2013.0666%203.33301H9.59992C9.03987%203.33301%208.75984%203.33301%208.54593%203.442C8.35777%203.53787%208.20479%203.69086%208.10891%203.87902C7.99992%204.09293%207.99992%204.37296%207.99992%204.93301V5.73301C7.99992%206.29306%207.99992%206.57309%208.10891%206.787C8.20479%206.97516%208.35777%207.12814%208.54593%207.22401C8.75984%207.33301%209.03987%207.33301%209.59992%207.33301Z'%20stroke='%23818792'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.33325%2012.6663L3.33325%203.33301M5.33325%2011.333L3.33325%2012.6663L1.33325%2011.333M5.33325%204.66634L3.33325%203.33301L1.33325%204.66634M9.59992%2012.333H13.0666C13.6266%2012.333%2013.9067%2012.333%2014.1206%2012.224C14.3087%2012.1281%2014.4617%2011.9752%2014.5576%2011.787C14.6666%2011.5731%2014.6666%2011.2931%2014.6666%2010.733V4.93301C14.6666%204.37296%2014.6666%204.09293%2014.5576%203.87902C14.4617%203.69086%2014.3087%203.53787%2014.1206%203.442C13.9067%203.33301%2013.6266%203.33301%2013.0666%203.33301H9.59992C9.03987%203.33301%208.75984%203.33301%208.54593%203.442C8.35777%203.53787%208.20479%203.69086%208.10891%203.87902C7.99992%204.09293%207.99992%204.37296%207.99992%204.93301V10.733C7.99992%2011.2931%207.99992%2011.5731%208.10891%2011.787C8.20479%2011.9752%208.35777%2012.1281%208.54593%2012.224C8.75984%2012.333%209.03987%2012.333%209.59992%2012.333Z'%20stroke='%23818792'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.25%201.5H1.75M10.25%204.5H1.75M1.5%209C1.5%208.53406%201.5%208.30109%201.57612%208.11732C1.67761%207.87229%201.87229%207.67761%202.11732%207.57612C2.30109%207.5%202.53406%207.5%203%207.5L9%207.5C9.46594%207.5%209.69891%207.5%209.88268%207.57612C10.1277%207.67761%2010.3224%207.87229%2010.4239%208.11732C10.5%208.30109%2010.5%208.53406%2010.5%209C10.5%209.46594%2010.5%209.69891%2010.4239%209.88268C10.3224%2010.1277%2010.1277%2010.3224%209.88268%2010.4239C9.69891%2010.5%209.46594%2010.5%209%2010.5H3C2.53406%2010.5%202.30109%2010.5%202.11732%2010.4239C1.87229%2010.3224%201.67761%2010.1277%201.57612%209.88268C1.5%209.69891%201.5%209.46594%201.5%209Z'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2
+ export {
3
+ e as default
4
+ };
package/dist/index.d.ts CHANGED
@@ -10,7 +10,11 @@ export { Heading, type HeadingProps } from './primitives/heading';
10
10
  export { Select, type SelectProps, SearchableSelect, type SearchableSelectProps, MultiSelect, type MultiSelectProps, Popover, type PopoverProps, ExpandableSearchInput, type ExpandableSearchInputProps, } from './primitives/select';
11
11
  export { Tooltip, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, EllipsisContentWithTooltip, createEllipsisContent, type EllipsisContentWithTooltipProps, } from './primitives/tooltip';
12
12
  export { CustomIcon, ICONS, type CustomIconProps, type CustomIconType } from './primitives/custom-icon';
13
- export { Table, TableCard, TableCell, TableWrapper, type TableWrapperProps, } from './patterns/table';
13
+ export { Dropdown, type DropdownItemProps, type DropdownMenuProps, type DropdownPopoverProps, } from './primitives/dropdown';
14
+ export { Shimmer, ShimmerLine, ShimmerCircle, ShimmerBox } from './primitives/shimmer';
15
+ export { Snackbar, type SnackbarProps } from './primitives/snackbar';
16
+ export { ScheduleCalendar, WEEKDAYS, formatHour, formatHourLabel, schedulesToCellSet, cellSetToSchedules, mergeHoursToWindows, type WeekdayKey, type ScheduleWindow, type DaySchedule, type ScheduleCalendarProps, } from './applications/schedule-calendar';
17
+ export { Table, TableCard, TableCell, TableRowActionsDropdown, TableWrapper, type TableWrapperProps, type TableWrapperPaginationConfig, type TableWrapperToolbarConfig, type BulkActionContext, type TableWrapperEditChrome, type TableWrapperSelectedKeys, type TableWrapperSelectionChange, type ColumnConfig, TablePagination, type TablePaginationConfig, type TablePaginationProps, PaginationCardDefault, Pagination, ROW_HEIGHT_ICONS, type RowHeightIconKey, TOOLBAR_ICONS, type TableColumnSchema, type TableColumnMenuSchema, type TableColumnValueType, TableToolbar, pickCoreToolbarProps, registerToolbarExtensions, getToolbarExtensions, type ToolbarExtensionComponents, type SortToolConfig, type FilterToolConfig, type LegacySortToolConfig, type LegacyFilterToolConfig, RowHeightDropdown, HideFieldsDropdown, AlignDropdown, GroupByDropdown, ShowSummaryDropdown, SummaryFooterRow, ColumnHeaderMenu, RowActionsMenu, BulkActionBar, applyHideAndReorder, getDefaultAlignmentForType, getEffectiveAlignment, alignmentClass, getAggregationsForType, computeAggregation, groupRows, resolveColumnLabel, ROW_HEIGHT_CLASS, AGGREGATION_LABELS, type SearchToolConfig, type RowHeightToolConfig, type HideFieldsToolConfig, type AlignToolConfig, type GroupByToolConfig, type SummaryToolConfig, type RowHeightOption, type SummaryFooterRowProps, type ColumnMenuAction, type ColumnMenuCapabilities, type RowActionsConfig, type CellAlignment, type AggregationType, type AggregationOption, type RowGroup, GridNavProvider, useGridKeyboardNavigation, isWithinCellEditor, findGridCell, focusGridCell, getGridNeighbor, getGridTabNeighbor, type GridNavDirection, type GridNeighbor, type GridNavValue, } from './patterns/table';
14
18
  export { TreeView, buildTreeViewNodes, type TreeViewNode, type TreeViewProps, type TreeViewBuildConfig, } from './patterns/tree-view';
15
19
  export { cn, cx, sortCx } from './utils/cn';
16
20
  export { isReactComponent, isFunctionComponent, isClassComponent, isForwardRefComponent, } from './utils/is-react-component';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAG5B,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,KAAK,IAAI,cAAc,EAC5B,KAAK,WAAW,IAAI,iBAAiB,EACrC,MAAM,IAAI,YAAY,EACtB,aAAa,EACb,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACL,KAAK,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,SAAS,EACT,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,C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