@dmsi/wedgekit-react 0.0.231 → 0.0.233

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 (143) hide show
  1. package/dist/{chunk-FYW64H7N.js → chunk-3FOAGRIY.js} +3 -3
  2. package/dist/{chunk-BHJNYWQG.js → chunk-4AHS4CVA.js} +1 -1
  3. package/dist/{chunk-RDLEIAQU.js → chunk-6CTCHYIS.js} +5 -0
  4. package/dist/{chunk-2VRZB2A4.js → chunk-6ZYTR6DU.js} +1 -1
  5. package/dist/{chunk-CJELWEO2.js → chunk-7KLALK3J.js} +1 -1
  6. package/dist/{chunk-E3UOI2D2.js → chunk-DXVLA32J.js} +2 -2
  7. package/dist/{chunk-SYEJVSE4.js → chunk-FRHPFACM.js} +1 -1
  8. package/dist/{chunk-KGVKHWUK.js → chunk-FS2RQE55.js} +1 -1
  9. package/dist/{chunk-REOLWEZG.js → chunk-KEDK5EWD.js} +1 -1
  10. package/dist/{chunk-SK742QNF.js → chunk-KNP4LUFA.js} +1 -1
  11. package/dist/{chunk-A76MF7ZO.js → chunk-MQXOQL3T.js} +3 -3
  12. package/dist/{chunk-ARC7FOL2.js → chunk-NWELJDBW.js} +3 -3
  13. package/dist/{chunk-47KTDBGA.js → chunk-OGMN5SHL.js} +4 -4
  14. package/dist/{chunk-7BBXPM5C.js → chunk-OP5XCT3L.js} +1 -1
  15. package/dist/{chunk-BOWQUDUU.js → chunk-QA3KMRA6.js} +1 -1
  16. package/dist/{chunk-3WNXMCZV.js → chunk-QQ5G773N.js} +1 -1
  17. package/dist/{chunk-LPQ4QMAV.js → chunk-R2FGTCOY.js} +1 -1
  18. package/dist/{chunk-QHHNFGEX.js → chunk-RJBKI53P.js} +3 -3
  19. package/dist/{chunk-ED7FXZRX.js → chunk-UVG2TKTG.js} +5 -5
  20. package/dist/chunk-VDO7VGAD.js +1182 -0
  21. package/dist/{chunk-Q7ETEWBW.js → chunk-VGPOI7UP.js} +3 -3
  22. package/dist/{chunk-CJVTFYI4.js → chunk-VP7HJX24.js} +1 -1
  23. package/dist/{chunk-A5ROZWIH.js → chunk-VR7X3NMG.js} +5 -5
  24. package/dist/chunk-X73BO77J.js +493 -0
  25. package/dist/{chunk-XQILVD56.js → chunk-XO6PXENP.js} +1 -1
  26. package/dist/{chunk-5JVMULVC.js → chunk-YCKRRAJA.js} +2 -2
  27. package/dist/components/AccessChangerTabItem.cjs +5 -0
  28. package/dist/components/AccessChangerTabItem.js +2 -2
  29. package/dist/components/Accordion.cjs +5 -0
  30. package/dist/components/Accordion.js +4 -4
  31. package/dist/components/Breadcrumbs.cjs +15 -4
  32. package/dist/components/Breadcrumbs.js +12 -6
  33. package/dist/components/Button.cjs +5 -0
  34. package/dist/components/Button.js +2 -2
  35. package/dist/components/CalendarRange.cjs +4071 -224
  36. package/dist/components/CalendarRange.css +4830 -0
  37. package/dist/components/CalendarRange.js +24 -2
  38. package/dist/components/Caption.cjs +5 -0
  39. package/dist/components/Caption.js +1 -1
  40. package/dist/components/Checkbox.cjs +5 -0
  41. package/dist/components/Checkbox.js +3 -3
  42. package/dist/components/ContentTab.cjs +5 -0
  43. package/dist/components/ContentTab.js +3 -3
  44. package/dist/components/ContentTabs.cjs +5 -0
  45. package/dist/components/ContentTabs.js +3 -3
  46. package/dist/components/DataGridCell.cjs +5 -0
  47. package/dist/components/DataGridCell.js +7 -7
  48. package/dist/components/DateInput.cjs +3673 -326
  49. package/dist/components/DateInput.css +4830 -0
  50. package/dist/components/DateInput.js +23 -6
  51. package/dist/components/DateRangeInput.cjs +3673 -326
  52. package/dist/components/DateRangeInput.css +4830 -0
  53. package/dist/components/DateRangeInput.js +23 -6
  54. package/dist/components/Display.cjs +5 -0
  55. package/dist/components/Display.js +2 -2
  56. package/dist/components/FilterGroup.cjs +5 -0
  57. package/dist/components/FilterGroup.js +11 -11
  58. package/dist/components/Heading.cjs +5 -0
  59. package/dist/components/Heading.js +2 -2
  60. package/dist/components/Input.cjs +5 -0
  61. package/dist/components/Input.js +3 -3
  62. package/dist/components/InputGroup.cjs +5 -0
  63. package/dist/components/InputGroup.js +2 -2
  64. package/dist/components/Label.cjs +5 -0
  65. package/dist/components/Label.js +2 -2
  66. package/dist/components/Link.cjs +5 -0
  67. package/dist/components/Link.js +2 -2
  68. package/dist/components/MainBar.cjs +5 -0
  69. package/dist/components/MainBar.js +1 -1
  70. package/dist/components/MenuOption.cjs +5 -0
  71. package/dist/components/MenuOption.js +4 -4
  72. package/dist/components/MobileDataGrid.cjs +5 -0
  73. package/dist/components/MobileDataGrid.js +7 -7
  74. package/dist/components/Modal.cjs +5 -0
  75. package/dist/components/Modal.js +7 -7
  76. package/dist/components/ModalButtons.cjs +5 -0
  77. package/dist/components/ModalButtons.js +3 -3
  78. package/dist/components/ModalContent.cjs +5 -0
  79. package/dist/components/ModalContent.js +2 -2
  80. package/dist/components/ModalHeader.cjs +5 -0
  81. package/dist/components/ModalHeader.js +4 -4
  82. package/dist/components/NavigationTab.cjs +5 -0
  83. package/dist/components/NavigationTab.js +3 -3
  84. package/dist/components/NavigationTabs.cjs +5 -0
  85. package/dist/components/NavigationTabs.js +3 -3
  86. package/dist/components/NestedMenu.cjs +5 -0
  87. package/dist/components/NestedMenu.js +4 -4
  88. package/dist/components/Notification.cjs +5 -0
  89. package/dist/components/Notification.js +7 -7
  90. package/dist/components/OptionPill.cjs +5 -0
  91. package/dist/components/OptionPill.js +4 -4
  92. package/dist/components/PDFViewer.cjs +5 -0
  93. package/dist/components/PDFViewer.js +11 -11
  94. package/dist/components/Paragraph.cjs +5 -0
  95. package/dist/components/Paragraph.js +2 -2
  96. package/dist/components/Password.cjs +5 -0
  97. package/dist/components/Password.js +3 -3
  98. package/dist/components/ProjectBar.cjs +5 -0
  99. package/dist/components/ProjectBar.js +1 -1
  100. package/dist/components/Radio.cjs +5 -0
  101. package/dist/components/Radio.js +2 -2
  102. package/dist/components/Search.cjs +5 -0
  103. package/dist/components/Search.js +4 -4
  104. package/dist/components/Select.cjs +5 -0
  105. package/dist/components/Select.js +4 -4
  106. package/dist/components/SideMenuGroup.cjs +5 -0
  107. package/dist/components/SideMenuGroup.js +3 -3
  108. package/dist/components/SideMenuItem.cjs +5 -0
  109. package/dist/components/SideMenuItem.js +3 -3
  110. package/dist/components/Stack.cjs +5 -0
  111. package/dist/components/Stack.js +2 -2
  112. package/dist/components/StatusPill.cjs +5 -0
  113. package/dist/components/StatusPill.js +2 -2
  114. package/dist/components/Stepper.cjs +5 -0
  115. package/dist/components/Stepper.js +6 -6
  116. package/dist/components/Subheader.cjs +5 -0
  117. package/dist/components/Subheader.js +2 -2
  118. package/dist/components/Swatch.cjs +5 -0
  119. package/dist/components/Swatch.js +5 -5
  120. package/dist/components/Textarea.cjs +5 -0
  121. package/dist/components/Textarea.js +1 -1
  122. package/dist/components/Time.cjs +5 -0
  123. package/dist/components/Time.js +4 -4
  124. package/dist/components/Toast.cjs +5 -0
  125. package/dist/components/Toast.js +6 -6
  126. package/dist/components/Tooltip.cjs +5 -0
  127. package/dist/components/Tooltip.js +2 -2
  128. package/dist/components/TopBar.cjs +5 -0
  129. package/dist/components/TopBar.js +1 -1
  130. package/dist/components/Upload.cjs +5 -0
  131. package/dist/components/Upload.js +6 -6
  132. package/dist/components/index.cjs +5 -0
  133. package/dist/components/index.css +15 -13
  134. package/dist/components/index.js +20 -1150
  135. package/dist/index.css +15 -13
  136. package/package.json +1 -1
  137. package/src/classNames.ts +9 -3
  138. package/src/components/Breadcrumbs.tsx +13 -6
  139. package/src/components/CalendarRange.tsx +316 -165
  140. package/src/components/Link.tsx +1 -1
  141. package/src/components/Stack.tsx +1 -1
  142. package/src/index.css +4 -2
  143. package/dist/chunk-SE5DM2IJ.js +0 -350
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-VP36B2MM.js";
7
7
  import {
8
8
  MenuOption
9
- } from "./chunk-QHHNFGEX.js";
9
+ } from "./chunk-RJBKI53P.js";
10
10
  import {
11
11
  Search
12
- } from "./chunk-7BBXPM5C.js";
12
+ } from "./chunk-OP5XCT3L.js";
13
13
  import {
14
14
  CSS
15
15
  } from "./chunk-WVUIIBRR.js";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  componentPadding,
21
21
  paddingUsingComponentGap
22
- } from "./chunk-RDLEIAQU.js";
22
+ } from "./chunk-6CTCHYIS.js";
23
23
  import {
24
24
  __objRest,
25
25
  __spreadProps,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  componentPaddingXUsingComponentGap,
3
3
  typography
4
- } from "./chunk-RDLEIAQU.js";
4
+ } from "./chunk-6CTCHYIS.js";
5
5
  import {
6
6
  __objRest,
7
7
  __spreadProps,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  Heading2
3
- } from "./chunk-REOLWEZG.js";
4
- import {
5
- Button
6
- } from "./chunk-SK742QNF.js";
3
+ } from "./chunk-KEDK5EWD.js";
7
4
  import {
8
5
  Icon
9
6
  } from "./chunk-UAPWR2KE.js";
7
+ import {
8
+ Button
9
+ } from "./chunk-KNP4LUFA.js";
10
10
  import {
11
11
  layoutGroupGap,
12
12
  layoutPaddding
13
- } from "./chunk-RDLEIAQU.js";
13
+ } from "./chunk-6CTCHYIS.js";
14
14
 
15
15
  // src/components/ModalHeader.tsx
16
16
  import clsx from "clsx";
@@ -0,0 +1,493 @@
1
+ import {
2
+ Menu
3
+ } from "./chunk-NA3ODQCN.js";
4
+ import {
5
+ MenuOption
6
+ } from "./chunk-RJBKI53P.js";
7
+ import {
8
+ Icon
9
+ } from "./chunk-UAPWR2KE.js";
10
+ import {
11
+ componentPadding,
12
+ layoutGap,
13
+ layoutPaddding,
14
+ typography
15
+ } from "./chunk-6CTCHYIS.js";
16
+ import {
17
+ __objRest,
18
+ __spreadProps,
19
+ __spreadValues
20
+ } from "./chunk-BBZEL7EG.js";
21
+
22
+ // src/components/CalendarRange.tsx
23
+ import clsx from "clsx";
24
+ import React, { useEffect, useRef, useState } from "react";
25
+ import { Temporal } from "@js-temporal/polyfill";
26
+ import { jsx, jsxs } from "react/jsx-runtime";
27
+ function isWeekend(date) {
28
+ return date.dayOfWeek === 6 || date.dayOfWeek === 7;
29
+ }
30
+ function DateCell(_a) {
31
+ var _b = _a, {
32
+ date,
33
+ isInMonth,
34
+ isToday,
35
+ isSelected,
36
+ inRange,
37
+ isDisabled,
38
+ isRangeStart,
39
+ isRangeEnd,
40
+ onClick,
41
+ onMouseEnter,
42
+ onMouseLeave,
43
+ cellPadding = "",
44
+ isRangeDisabled = false,
45
+ id,
46
+ testid
47
+ } = _b, props = __objRest(_b, [
48
+ "date",
49
+ "isInMonth",
50
+ "isToday",
51
+ "isSelected",
52
+ "inRange",
53
+ "isDisabled",
54
+ "isRangeStart",
55
+ "isRangeEnd",
56
+ "onClick",
57
+ "onMouseEnter",
58
+ "onMouseLeave",
59
+ "cellPadding",
60
+ "isRangeDisabled",
61
+ "id",
62
+ "testid"
63
+ ]);
64
+ return /* @__PURE__ */ jsx(
65
+ "span",
66
+ __spreadProps(__spreadValues({}, props), {
67
+ id,
68
+ "data-testid": testid,
69
+ className: clsx(
70
+ "flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
71
+ typography.caption,
72
+ cellPadding,
73
+ !isToday && !isSelected && !inRange && !isDisabled && !isRangeStart && !isRangeEnd && "border-transparent",
74
+ !isInMonth && "border-transparent",
75
+ // Today: subtle border ring
76
+ isToday && !isSelected && !inRange && "rounded-full border-border-primary-normal ",
77
+ // Selected: Figma blue, white text, strong shadow
78
+ isSelected && "bg-action-400 text-white border-action-400 z-10",
79
+ !isSelected && !inRange && "rounded-base",
80
+ // When range is disabled OR when only 'from' is selected (no range yet), apply rounded corners
81
+ (isRangeDisabled || !inRange && isSelected) && "rounded-base",
82
+ inRange && isSelected && "hover:border-action-500",
83
+ // In range: Figma light blue background
84
+ inRange && !isSelected && "bg-action-100 text-text-primary-normal border-y-action-400 border-x-0 ",
85
+ // Disabled: Figma gray, no pointer, no hover
86
+ isDisabled && !inRange ? "text-text-primary-disabled bg-transparent pointer-events-none opacity-40 border-transparent" : [
87
+ "text-text-primary-normal cursor-pointer",
88
+ // Figma hover: blue bg, blue text (or red text if selected)
89
+ isSelected ? "hover:bg-background-action-primary-hover hover:text-white" : "hover:bg-action-100 hover:text-text-action-primary-hover",
90
+ // Figma active: darker blue bg, white text
91
+ "active:bg-action-300 active:text-white",
92
+ // Figma focus: ring
93
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-400"
94
+ ],
95
+ isRangeStart && "rounded-l",
96
+ isRangeEnd && "rounded-r"
97
+ ),
98
+ tabIndex: isDisabled ? -1 : 0,
99
+ "aria-disabled": isDisabled,
100
+ onClick: () => !isDisabled && isInMonth && onClick(),
101
+ onMouseEnter: () => isInMonth && onMouseEnter(),
102
+ onMouseLeave: () => isInMonth && onMouseLeave(),
103
+ children: isInMonth ? date.day : ""
104
+ })
105
+ );
106
+ }
107
+ function CalendarRange({
108
+ from,
109
+ to,
110
+ onChange,
111
+ isDateAvailable,
112
+ mode = "double",
113
+ cardStyle = false,
114
+ disableRange = false,
115
+ id,
116
+ testid
117
+ }) {
118
+ const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
119
+ const parseDate = (d) => {
120
+ if (!d) {
121
+ return void 0;
122
+ }
123
+ try {
124
+ if (typeof d === "number") {
125
+ return Temporal.PlainDate.from(new Date(d).toISOString().slice(0, 10));
126
+ }
127
+ if (typeof d === "string") {
128
+ return Temporal.PlainDate.from(d);
129
+ }
130
+ return void 0;
131
+ } catch (error) {
132
+ console.error("Invalid date format:", d, error);
133
+ return Temporal.Now.plainDateISO();
134
+ }
135
+ };
136
+ const fromDate = parseDate(from);
137
+ const toDate = parseDate(to);
138
+ const today = Temporal.Now.plainDateISO();
139
+ const [baseMonth, setBaseMonth] = useState(
140
+ fromDate != null ? fromDate : today.with({ day: 1 })
141
+ );
142
+ const [selecting, setSelecting] = useState("from");
143
+ const [pendingFrom, setPendingFrom] = useState(void 0);
144
+ const [hoveredDate, setHoveredDate] = useState(void 0);
145
+ useEffect(() => {
146
+ if (fromDate) {
147
+ setBaseMonth(fromDate.with({ day: 1 }));
148
+ } else if (toDate) {
149
+ setBaseMonth(toDate.with({ day: 1 }));
150
+ }
151
+ }, [from, to]);
152
+ useEffect(() => {
153
+ if (fromDate && toDate) {
154
+ setSelecting("from");
155
+ setPendingFrom(void 0);
156
+ setHoveredDate(void 0);
157
+ }
158
+ }, [from, to]);
159
+ function getMonthData(monthOffset) {
160
+ const monthDate = baseMonth.add({ months: monthOffset }).with({ day: 1 });
161
+ const days = monthDate.daysInMonth;
162
+ const firstDayOffset = monthDate.dayOfWeek % 7;
163
+ return {
164
+ name: monthDate.toLocaleString("en-US", { month: "long" }),
165
+ year: monthDate.year,
166
+ days,
167
+ firstDayOffset,
168
+ date: monthDate
169
+ };
170
+ }
171
+ function getMonthDataWith(monthOffset) {
172
+ const monthDate = baseMonth.with({ month: monthOffset }).with({ day: 1 });
173
+ const days = monthDate.daysInMonth;
174
+ const firstDayOffset = monthDate.dayOfWeek % 7;
175
+ return {
176
+ name: monthDate.toLocaleString("en-US", { month: "long" }),
177
+ year: monthDate.year,
178
+ days,
179
+ firstDayOffset,
180
+ date: monthDate
181
+ };
182
+ }
183
+ function handleDayClick(date) {
184
+ if (isDateAvailable && !isDateAvailable(date)) return;
185
+ if (mode === "single" && disableRange) {
186
+ if (onChange) {
187
+ onChange(date.toString(), date.toString());
188
+ }
189
+ return;
190
+ }
191
+ if (selecting === "from") {
192
+ setPendingFrom(date);
193
+ setSelecting("to");
194
+ setHoveredDate(void 0);
195
+ } else if (pendingFrom) {
196
+ if (onChange) {
197
+ const [start, end] = Temporal.PlainDate.compare(date, pendingFrom) < 0 ? [date, pendingFrom] : [pendingFrom, date];
198
+ onChange(start.toString(), end.toString());
199
+ }
200
+ setPendingFrom(void 0);
201
+ setSelecting("from");
202
+ setHoveredDate(void 0);
203
+ }
204
+ }
205
+ function isInRange(date) {
206
+ if (mode === "single" && disableRange) {
207
+ return false;
208
+ }
209
+ if (pendingFrom && selecting === "to" && hoveredDate) {
210
+ const [start, end] = Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0 ? [hoveredDate, pendingFrom] : [pendingFrom, hoveredDate];
211
+ return Temporal.PlainDate.compare(date, start) >= 0 && Temporal.PlainDate.compare(date, end) <= 0;
212
+ }
213
+ if (!pendingFrom && fromDate && toDate) {
214
+ return Temporal.PlainDate.compare(date, fromDate) >= 0 && Temporal.PlainDate.compare(date, toDate) <= 0;
215
+ }
216
+ return false;
217
+ }
218
+ return /* @__PURE__ */ jsx(
219
+ "div",
220
+ {
221
+ id,
222
+ "data-testid": testid,
223
+ className: clsx(
224
+ "relative bg-background-grouped-primary-normal rounded-base w-fit",
225
+ layoutPaddding,
226
+ layoutGap,
227
+ cardStyle && "shadow-4",
228
+ // baseTransition,
229
+ "overflow-hidden"
230
+ ),
231
+ children: /* @__PURE__ */ jsx(
232
+ "div",
233
+ {
234
+ className: clsx(
235
+ "flex flex-row items-start justify-start bg-background-primary-normal overflow-clip",
236
+ layoutGap
237
+ ),
238
+ children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
239
+ return /* @__PURE__ */ jsx(
240
+ CalendarPane,
241
+ {
242
+ getMonthData,
243
+ getMonthDataWith,
244
+ offset,
245
+ idx,
246
+ id,
247
+ testid,
248
+ baseMonth,
249
+ setBaseMonth,
250
+ mode,
251
+ pendingFrom,
252
+ weekDays,
253
+ fromDate,
254
+ toDate,
255
+ isDateAvailable,
256
+ disableRange,
257
+ hoveredDate,
258
+ isInRange,
259
+ today,
260
+ setHoveredDate,
261
+ handleDayClick
262
+ },
263
+ idx
264
+ );
265
+ })
266
+ }
267
+ )
268
+ }
269
+ );
270
+ }
271
+ function CalendarPane({
272
+ getMonthData,
273
+ getMonthDataWith,
274
+ offset,
275
+ idx,
276
+ id,
277
+ testid,
278
+ baseMonth,
279
+ setBaseMonth,
280
+ mode,
281
+ pendingFrom,
282
+ weekDays,
283
+ fromDate,
284
+ toDate,
285
+ isDateAvailable,
286
+ disableRange,
287
+ hoveredDate,
288
+ isInRange,
289
+ today,
290
+ setHoveredDate,
291
+ handleDayClick
292
+ }) {
293
+ const months = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
294
+ const years = Array.from({ length: 100 }).map(
295
+ (_, i) => baseMonth.year - 50 + i
296
+ );
297
+ const [monthMenuOpen, setMonthMenuOpen] = useState(false);
298
+ const [yearMenuOpen, setYearMenuOpen] = useState(false);
299
+ const monthMenuRef = useRef(null);
300
+ const yearMenuRef = useRef(null);
301
+ const month = getMonthData(offset);
302
+ const totalCells = 42;
303
+ const emptyCells = month.firstDayOffset;
304
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [
305
+ /* @__PURE__ */ jsxs(
306
+ "div",
307
+ {
308
+ className: clsx("flex flex-col"),
309
+ children: [
310
+ /* @__PURE__ */ jsxs(
311
+ "div",
312
+ {
313
+ className: clsx(
314
+ "flex flex-row items-center justify-between",
315
+ typography.label,
316
+ "text-text-action-primary-normal"
317
+ ),
318
+ children: [
319
+ idx === 0 ? /* @__PURE__ */ jsx(
320
+ "button",
321
+ {
322
+ id: id ? `${id}-prev-month-button` : void 0,
323
+ "data-testid": testid ? `${testid}-prev-month-button` : void 0,
324
+ type: "button",
325
+ className: clsx(
326
+ "flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
327
+ componentPadding
328
+ ),
329
+ "aria-label": "Previous month",
330
+ onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
331
+ children: /* @__PURE__ */ jsx(Icon, { name: "chevron_left", size: 24 })
332
+ }
333
+ ) : /* @__PURE__ */ jsx("span", { className: clsx(componentPadding, "mr-1") }),
334
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-desktop-compact-component-padding", children: [
335
+ /* @__PURE__ */ jsx(
336
+ "button",
337
+ {
338
+ ref: (el) => {
339
+ monthMenuRef.current = el;
340
+ },
341
+ type: "button",
342
+ onClick: () => {
343
+ setMonthMenuOpen(true);
344
+ setYearMenuOpen(false);
345
+ },
346
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] truncate",
347
+ children: month.name
348
+ }
349
+ ),
350
+ /* @__PURE__ */ jsx(
351
+ Menu,
352
+ {
353
+ show: monthMenuOpen,
354
+ positionTo: monthMenuRef,
355
+ setShow: () => setMonthMenuOpen(false),
356
+ children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ jsx(
357
+ MenuOption,
358
+ {
359
+ selected: baseMonth.month === x + 1,
360
+ onClick: () => {
361
+ setBaseMonth(baseMonth.with({ month: x + 1 }));
362
+ setMonthMenuOpen(false);
363
+ },
364
+ children: m.name
365
+ },
366
+ m.name
367
+ ))
368
+ }
369
+ ),
370
+ /* @__PURE__ */ jsx(
371
+ "button",
372
+ {
373
+ ref: (el) => {
374
+ yearMenuRef.current = el;
375
+ },
376
+ type: "button",
377
+ onClick: () => {
378
+ setYearMenuOpen(true);
379
+ setMonthMenuOpen(false);
380
+ },
381
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] truncate",
382
+ children: month.year
383
+ }
384
+ ),
385
+ /* @__PURE__ */ jsx(
386
+ Menu,
387
+ {
388
+ show: yearMenuOpen,
389
+ positionTo: yearMenuRef,
390
+ setShow: () => setYearMenuOpen(false),
391
+ children: years.map((y) => /* @__PURE__ */ jsx(
392
+ MenuOption,
393
+ {
394
+ selected: baseMonth.year === y,
395
+ onClick: () => {
396
+ setBaseMonth(baseMonth.with({ year: y }));
397
+ setYearMenuOpen(false);
398
+ },
399
+ children: y
400
+ },
401
+ y
402
+ ))
403
+ }
404
+ )
405
+ ] }),
406
+ (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ jsx(
407
+ "button",
408
+ {
409
+ id: id ? `${id}-next-month-button` : void 0,
410
+ "data-testid": testid ? `${testid}-next-month-button` : void 0,
411
+ type: "button",
412
+ className: clsx(
413
+ "flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
414
+ componentPadding
415
+ ),
416
+ "aria-label": "Next month",
417
+ onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
418
+ children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right", size: 24 })
419
+ }
420
+ ) : /* @__PURE__ */ jsx("span", { className: clsx(componentPadding, "ml-1") })
421
+ ]
422
+ }
423
+ ),
424
+ /* @__PURE__ */ jsx("div", { className: clsx("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ jsx(
425
+ "span",
426
+ {
427
+ className: clsx(
428
+ typography.caption,
429
+ "text-text-secondary-normal text-center",
430
+ "w-10"
431
+ ),
432
+ children: d
433
+ },
434
+ d
435
+ )) }),
436
+ /* @__PURE__ */ jsx("div", { className: clsx("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
437
+ const day = i - emptyCells + 1;
438
+ const date = month.date.with({ day: 1 }).add({
439
+ days: i - emptyCells
440
+ });
441
+ const isInMonth = day > 0 && day <= month.days;
442
+ const isToday = isInMonth && date.equals(today);
443
+ const isSelected = isInMonth && (!pendingFrom && fromDate && date.equals(fromDate) || !pendingFrom && toDate && date.equals(toDate) || pendingFrom && date.equals(pendingFrom));
444
+ const inRange = isInMonth && isInRange(date);
445
+ const isDisabled = !isInMonth || (isDateAvailable ? !isDateAvailable(date) : false);
446
+ const hoverDateIsBeforePendingFrom = hoveredDate && pendingFrom && Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0;
447
+ const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
448
+ const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
449
+ const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
450
+ return /* @__PURE__ */ jsx(
451
+ DateCell,
452
+ {
453
+ id: id ? `${id}-date-${date.toString()}` : void 0,
454
+ testid: testid ? `${testid}-date-${date.toString()}` : void 0,
455
+ date,
456
+ isInMonth: !!isInMonth,
457
+ isToday: !!isToday,
458
+ isSelected: !!isSelected,
459
+ inRange: !!inRange,
460
+ isDisabled: !!isDisabled,
461
+ onClick: () => handleDayClick(date),
462
+ onMouseEnter: () => setHoveredDate(date),
463
+ onMouseLeave: () => setHoveredDate(void 0),
464
+ isRangeStart: !!isRangeStart,
465
+ isRangeEnd: !!isRangeEnd,
466
+ isRangeDisabled: mode === "single" && disableRange,
467
+ cellPadding: componentPadding
468
+ },
469
+ i
470
+ );
471
+ }) })
472
+ ]
473
+ }
474
+ ),
475
+ mode === "double" && idx === 0 && /* @__PURE__ */ jsx(
476
+ "div",
477
+ {
478
+ className: clsx(
479
+ "self-stretch bg-border-primary-normal rounded-base",
480
+ // 1px width, full height, matches Figma divider
481
+ "w-px"
482
+ )
483
+ }
484
+ )
485
+ ] }, month.name + month.year);
486
+ }
487
+ var CalendarRange_default = CalendarRange;
488
+
489
+ export {
490
+ isWeekend,
491
+ CalendarRange,
492
+ CalendarRange_default
493
+ };
@@ -2,7 +2,7 @@ import {
2
2
  baseTransition,
3
3
  componentPaddingY,
4
4
  typography
5
- } from "./chunk-RDLEIAQU.js";
5
+ } from "./chunk-6CTCHYIS.js";
6
6
  import {
7
7
  __objRest,
8
8
  __spreadProps,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-5UH6QUFB.js";
6
6
  import {
7
7
  Label
8
- } from "./chunk-CJVTFYI4.js";
8
+ } from "./chunk-VP7HJX24.js";
9
9
  import {
10
10
  Icon
11
11
  } from "./chunk-UAPWR2KE.js";
@@ -15,7 +15,7 @@ import {
15
15
  componentPaddingMinusBorder,
16
16
  componentPaddingXUsingComponentGap,
17
17
  typography
18
- } from "./chunk-RDLEIAQU.js";
18
+ } from "./chunk-6CTCHYIS.js";
19
19
  import {
20
20
  __objRest,
21
21
  __spreadProps,
@@ -124,6 +124,11 @@ var typography = {
124
124
  "font-sans font-normal",
125
125
  "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
126
126
  "leading-caption-mobile desktop:leading-caption-desktop"
127
+ ),
128
+ breadcrumb: (0, import_clsx.default)(
129
+ "font-sans font-normal",
130
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
131
+ "leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb"
127
132
  )
128
133
  };
129
134
  var baseTransition = (0, import_clsx.default)(
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Subheader
3
- } from "../chunk-KGVKHWUK.js";
3
+ } from "../chunk-FS2RQE55.js";
4
4
  import {
5
5
  Icon
6
6
  } from "../chunk-UAPWR2KE.js";
7
- import "../chunk-RDLEIAQU.js";
7
+ import "../chunk-6CTCHYIS.js";
8
8
  import {
9
9
  __objRest,
10
10
  __spreadProps,
@@ -122,6 +122,11 @@ var typography = {
122
122
  "font-sans font-normal",
123
123
  "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
124
124
  "leading-caption-mobile desktop:leading-caption-desktop"
125
+ ),
126
+ breadcrumb: (0, import_clsx.default)(
127
+ "font-sans font-normal",
128
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
129
+ "leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb"
125
130
  )
126
131
  };
127
132
  var baseTransition = (0, import_clsx.default)(
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  Accordion
4
- } from "../chunk-ARC7FOL2.js";
5
- import "../chunk-BOWQUDUU.js";
4
+ } from "../chunk-NWELJDBW.js";
5
+ import "../chunk-QA3KMRA6.js";
6
6
  import "../chunk-TJWGFGWX.js";
7
- import "../chunk-CJELWEO2.js";
7
+ import "../chunk-7KLALK3J.js";
8
8
  import "../chunk-UAPWR2KE.js";
9
- import "../chunk-RDLEIAQU.js";
9
+ import "../chunk-6CTCHYIS.js";
10
10
  import "../chunk-BBZEL7EG.js";
11
11
  export {
12
12
  Accordion
@@ -127,6 +127,11 @@ var typography = {
127
127
  "font-sans font-normal",
128
128
  "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
129
129
  "leading-caption-mobile desktop:leading-caption-desktop"
130
+ ),
131
+ breadcrumb: (0, import_clsx.default)(
132
+ "font-sans font-normal",
133
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
134
+ "leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb"
130
135
  )
131
136
  };
132
137
  var baseTransition = (0, import_clsx.default)(
@@ -321,9 +326,9 @@ var Breadcrumb = ({
321
326
  }) => {
322
327
  const linkPadding = (0, import_clsx4.default)(
323
328
  "!text-text-link-normal whitespace-nowrap",
324
- "py-[calc(var(--spacing-mobile-component-padding)_+_3px)]",
325
- "desktop:py-[calc(var(--spacing-desktop-component-padding)_+_3px)]",
326
- "compact:py-[calc(var(--spacing-desktop-compact-component-padding)_+_3px)]"
329
+ "py-mobile-component-padding",
330
+ "desktop:py-desktop-component-padding",
331
+ "compact:py-desktop-compact-component-padding"
327
332
  );
328
333
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { id, "data-testid": testid, className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
329
334
  Link,
@@ -332,13 +337,19 @@ var Breadcrumb = ({
332
337
  "data-testid": testid ? `${testid}-link` : void 0,
333
338
  className: linkPadding,
334
339
  href,
340
+ typographyStyle: "breadcrumb",
335
341
  onClick,
336
342
  children
337
343
  }
338
344
  ) }, href);
339
345
  };
340
346
  var Chevron = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: "flex items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { name: "chevron_right", size: 16 }) });
341
- var Breadcrumbs = ({ asCardStyle, id, testid, crumbs }) => {
347
+ var Breadcrumbs = ({
348
+ asCardStyle,
349
+ id,
350
+ testid,
351
+ crumbs
352
+ }) => {
342
353
  const scrollableElement = import_react.default.useRef(null);
343
354
  const [isOverflow, setIsOverflow] = (0, import_react.useState)(false);
344
355
  (0, import_react.useLayoutEffect)(() => {