@borisj74/bv-ds 0.1.8 → 0.1.10
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.
- package/dist/index.cjs +574 -299
- package/dist/index.d.cts +101 -22
- package/dist/index.d.ts +101 -22
- package/dist/index.js +577 -304
- package/package.json +7 -2
- package/src/components/Calendar/Calendar.tsx +249 -0
- package/src/components/Calendar/index.ts +2 -0
- package/src/components/ComboBox/ComboBox.tsx +114 -0
- package/src/components/ComboBox/index.ts +2 -0
- package/src/components/TagsInputField/TagsInputField.tsx +35 -1
- package/src/components/TextEditor/TextEditor.tsx +13 -0
- package/src/index.ts +2 -0
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var React28 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var reactBigCalendar = require('react-big-calendar');
|
|
6
|
+
var dateFns = require('date-fns');
|
|
7
|
+
var locale$1 = require('date-fns/locale');
|
|
5
8
|
var bvDsIcons = require('@borisj74/bv-ds-icons');
|
|
6
9
|
var react = require('@tiptap/react');
|
|
7
10
|
var starterKit = require('@tiptap/starter-kit');
|
|
@@ -6122,6 +6125,91 @@ function ButtonUtility({
|
|
|
6122
6125
|
) : null
|
|
6123
6126
|
] });
|
|
6124
6127
|
}
|
|
6128
|
+
function IconBox({ size = 20, className, children }) {
|
|
6129
|
+
const icon = React28.isValidElement(children) ? React28.cloneElement(children, {
|
|
6130
|
+
viewBox: children.props.viewBox ?? "0 0 24 24",
|
|
6131
|
+
className: clsx_default("w-full h-full", children.props.className)
|
|
6132
|
+
}) : children;
|
|
6133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6134
|
+
"span",
|
|
6135
|
+
{
|
|
6136
|
+
className: clsx_default("relative flex shrink-0 items-center justify-center", className),
|
|
6137
|
+
style: { width: size, height: size },
|
|
6138
|
+
children: icon
|
|
6139
|
+
}
|
|
6140
|
+
);
|
|
6141
|
+
}
|
|
6142
|
+
function CalendarHeader({
|
|
6143
|
+
title,
|
|
6144
|
+
range: range6,
|
|
6145
|
+
supportingText,
|
|
6146
|
+
badge,
|
|
6147
|
+
dateIcon,
|
|
6148
|
+
actions,
|
|
6149
|
+
className
|
|
6150
|
+
}) {
|
|
6151
|
+
const subtitle = range6 ?? supportingText;
|
|
6152
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6153
|
+
"div",
|
|
6154
|
+
{
|
|
6155
|
+
className: clsx_default(
|
|
6156
|
+
"flex flex-wrap items-start justify-between gap-lg font-body",
|
|
6157
|
+
className
|
|
6158
|
+
),
|
|
6159
|
+
children: [
|
|
6160
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-lg", children: [
|
|
6161
|
+
dateIcon,
|
|
6162
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-xxs", children: [
|
|
6163
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-md", children: [
|
|
6164
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold text-text-primary", children: title }),
|
|
6165
|
+
badge
|
|
6166
|
+
] }),
|
|
6167
|
+
subtitle ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-text-tertiary", children: subtitle }) : null
|
|
6168
|
+
] })
|
|
6169
|
+
] }),
|
|
6170
|
+
actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-md", children: actions }) : null
|
|
6171
|
+
]
|
|
6172
|
+
}
|
|
6173
|
+
);
|
|
6174
|
+
}
|
|
6175
|
+
function CalendarColumnHeader({
|
|
6176
|
+
weekday,
|
|
6177
|
+
date: date2,
|
|
6178
|
+
type,
|
|
6179
|
+
current = false,
|
|
6180
|
+
orientation = "vertical",
|
|
6181
|
+
breakpoint = "desktop",
|
|
6182
|
+
className
|
|
6183
|
+
}) {
|
|
6184
|
+
const state = type ?? (current ? "selected" : "default");
|
|
6185
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6186
|
+
"div",
|
|
6187
|
+
{
|
|
6188
|
+
className: clsx_default(
|
|
6189
|
+
"flex items-center justify-center gap-md py-md font-body",
|
|
6190
|
+
orientation === "vertical" && "flex-col gap-xs",
|
|
6191
|
+
breakpoint === "desktop" && "w-[160px]",
|
|
6192
|
+
className
|
|
6193
|
+
),
|
|
6194
|
+
children: [
|
|
6195
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-text-quaternary", children: weekday }),
|
|
6196
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6197
|
+
"span",
|
|
6198
|
+
{
|
|
6199
|
+
className: clsx_default(
|
|
6200
|
+
"flex items-center justify-center text-xs font-semibold",
|
|
6201
|
+
state === "selected" && "size-6 rounded-full bg-bg-brand-solid text-white",
|
|
6202
|
+
state === "today" && "border-b-2 border-border-brand pb-xxs text-text-brand-secondary",
|
|
6203
|
+
state === "default" && "text-text-secondary"
|
|
6204
|
+
),
|
|
6205
|
+
"aria-current": state !== "default" ? "date" : void 0,
|
|
6206
|
+
children: date2
|
|
6207
|
+
}
|
|
6208
|
+
)
|
|
6209
|
+
]
|
|
6210
|
+
}
|
|
6211
|
+
);
|
|
6212
|
+
}
|
|
6125
6213
|
var dotClasses = {
|
|
6126
6214
|
neutral: "bg-utility-neutral-500",
|
|
6127
6215
|
brand: "bg-utility-brand-500",
|
|
@@ -6213,6 +6301,281 @@ function CalendarEvent({
|
|
|
6213
6301
|
}
|
|
6214
6302
|
);
|
|
6215
6303
|
}
|
|
6304
|
+
var DEFAULT_OPTIONS = [
|
|
6305
|
+
{ value: "day", label: "Day view", shortcut: "\u2318D" },
|
|
6306
|
+
{ value: "week", label: "Week view", shortcut: "\u2318W" },
|
|
6307
|
+
{ value: "month", label: "Month view", shortcut: "\u2318M" }
|
|
6308
|
+
];
|
|
6309
|
+
function Chevron2() {
|
|
6310
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6311
|
+
"path",
|
|
6312
|
+
{
|
|
6313
|
+
d: "m5 7.5 5 5 5-5",
|
|
6314
|
+
stroke: "currentColor",
|
|
6315
|
+
strokeWidth: "1.667",
|
|
6316
|
+
strokeLinecap: "round",
|
|
6317
|
+
strokeLinejoin: "round"
|
|
6318
|
+
}
|
|
6319
|
+
) });
|
|
6320
|
+
}
|
|
6321
|
+
function CalendarViewDropdown({
|
|
6322
|
+
value,
|
|
6323
|
+
onChange,
|
|
6324
|
+
onSelect,
|
|
6325
|
+
open: openProp,
|
|
6326
|
+
onOpenChange,
|
|
6327
|
+
options = DEFAULT_OPTIONS,
|
|
6328
|
+
className
|
|
6329
|
+
}) {
|
|
6330
|
+
const [internalOpen, setInternalOpen] = React28.useState(false);
|
|
6331
|
+
const isControlled = openProp !== void 0;
|
|
6332
|
+
const open = isControlled ? openProp : internalOpen;
|
|
6333
|
+
const setOpen = (next) => {
|
|
6334
|
+
if (!isControlled) setInternalOpen(next);
|
|
6335
|
+
onOpenChange?.(next);
|
|
6336
|
+
};
|
|
6337
|
+
const selected = options.find((o) => o.value === value) ?? options[0];
|
|
6338
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("relative inline-block font-body", className), children: [
|
|
6339
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6340
|
+
"button",
|
|
6341
|
+
{
|
|
6342
|
+
type: "button",
|
|
6343
|
+
"aria-haspopup": "listbox",
|
|
6344
|
+
"aria-expanded": open,
|
|
6345
|
+
onClick: () => setOpen(!open),
|
|
6346
|
+
className: "inline-flex items-center gap-md rounded-md border border-border-primary bg-bg-primary px-lg py-md text-sm font-semibold text-text-secondary shadow-skeuomorphic transition-colors hover:bg-bg-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-brand focus-visible:ring-offset-2 focus-visible:ring-offset-bg-primary",
|
|
6347
|
+
children: [
|
|
6348
|
+
selected.label,
|
|
6349
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-fg-quaternary", children: /* @__PURE__ */ jsxRuntime.jsx(Chevron2, {}) })
|
|
6350
|
+
]
|
|
6351
|
+
}
|
|
6352
|
+
),
|
|
6353
|
+
open ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6354
|
+
"ul",
|
|
6355
|
+
{
|
|
6356
|
+
role: "listbox",
|
|
6357
|
+
className: "absolute left-0 z-10 mt-xs min-w-[200px] rounded-md border border-border-secondary bg-bg-primary p-xs shadow-lg",
|
|
6358
|
+
children: options.map((opt) => {
|
|
6359
|
+
const isSelected = opt.value === value;
|
|
6360
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { role: "option", "aria-selected": isSelected, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6361
|
+
"button",
|
|
6362
|
+
{
|
|
6363
|
+
type: "button",
|
|
6364
|
+
onClick: () => {
|
|
6365
|
+
onChange?.(opt.value);
|
|
6366
|
+
onSelect?.(opt.value);
|
|
6367
|
+
setOpen(false);
|
|
6368
|
+
},
|
|
6369
|
+
className: "flex w-full items-center gap-md rounded-sm px-md py-xs text-sm font-medium text-text-secondary transition-colors hover:bg-bg-primary-hover",
|
|
6370
|
+
children: [
|
|
6371
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6372
|
+
"span",
|
|
6373
|
+
{
|
|
6374
|
+
className: clsx_default(
|
|
6375
|
+
"flex size-4 shrink-0 items-center justify-center rounded-full border",
|
|
6376
|
+
isSelected ? "border-border-brand" : "border-border-primary"
|
|
6377
|
+
),
|
|
6378
|
+
children: isSelected ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-2 rounded-full bg-bg-brand-solid" }) : null
|
|
6379
|
+
}
|
|
6380
|
+
),
|
|
6381
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-left", children: opt.label }),
|
|
6382
|
+
opt.shortcut ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-text-quaternary", children: opt.shortcut }) : null
|
|
6383
|
+
]
|
|
6384
|
+
}
|
|
6385
|
+
) }, opt.value);
|
|
6386
|
+
})
|
|
6387
|
+
}
|
|
6388
|
+
) : null
|
|
6389
|
+
] });
|
|
6390
|
+
}
|
|
6391
|
+
var localizer = reactBigCalendar.dateFnsLocalizer({
|
|
6392
|
+
format: dateFns.format,
|
|
6393
|
+
parse: dateFns.parse,
|
|
6394
|
+
// Monday-first week, matching the Figma column-header order (Mon…Sun).
|
|
6395
|
+
startOfWeek: (date2) => dateFns.startOfWeek(date2, { weekStartsOn: 1 }),
|
|
6396
|
+
getDay: dateFns.getDay,
|
|
6397
|
+
locales: { "en-US": locale$1.enUS }
|
|
6398
|
+
});
|
|
6399
|
+
var rbcStructural = clsx_default(
|
|
6400
|
+
"h-full font-body",
|
|
6401
|
+
"[&_.rbc-month-view]:flex [&_.rbc-month-view]:flex-1 [&_.rbc-month-view]:flex-col [&_.rbc-month-view]:overflow-hidden",
|
|
6402
|
+
"[&_.rbc-month-header]:flex [&_.rbc-month-header]:flex-row",
|
|
6403
|
+
"[&_.rbc-header]:min-w-0 [&_.rbc-header]:flex-1 [&_.rbc-header]:overflow-hidden",
|
|
6404
|
+
"[&_.rbc-month-row]:relative [&_.rbc-month-row]:flex [&_.rbc-month-row]:min-h-[120px] [&_.rbc-month-row]:flex-1 [&_.rbc-month-row]:flex-col [&_.rbc-month-row]:overflow-hidden",
|
|
6405
|
+
"[&_.rbc-row-bg]:absolute [&_.rbc-row-bg]:inset-0 [&_.rbc-row-bg]:flex [&_.rbc-row-bg]:flex-row",
|
|
6406
|
+
"[&_.rbc-day-bg]:min-w-0 [&_.rbc-day-bg]:flex-1 [&_.rbc-day-bg]:border-b [&_.rbc-day-bg]:border-r [&_.rbc-day-bg]:border-border-secondary [&_.rbc-day-bg]:bg-bg-primary",
|
|
6407
|
+
"[&_.rbc-off-range-bg]:!bg-bg-secondary-alt",
|
|
6408
|
+
"[&_.rbc-row-content]:relative [&_.rbc-row-content]:z-[1] [&_.rbc-row-content]:flex [&_.rbc-row-content]:flex-1 [&_.rbc-row-content]:flex-col",
|
|
6409
|
+
"[&_.rbc-row]:flex [&_.rbc-row]:flex-row",
|
|
6410
|
+
"[&_.rbc-date-cell]:min-w-0 [&_.rbc-date-cell]:flex-1",
|
|
6411
|
+
"[&_.rbc-off-range]:opacity-50",
|
|
6412
|
+
"[&_.rbc-row-segment]:min-w-0 [&_.rbc-row-segment]:px-md [&_.rbc-row-segment]:pb-xxs",
|
|
6413
|
+
"[&_.rbc-event]:block [&_.rbc-event]:w-full [&_.rbc-event]:outline-none",
|
|
6414
|
+
"[&_.rbc-show-more]:block [&_.rbc-show-more]:px-md [&_.rbc-show-more]:text-xs [&_.rbc-show-more]:font-semibold [&_.rbc-show-more]:text-utility-neutral-500"
|
|
6415
|
+
);
|
|
6416
|
+
function NavArrow({ dir }) {
|
|
6417
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IconBox, { size: 20, children: dir === "left" ? /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.ArrowLeft, {}) : /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.ArrowRight, {}) });
|
|
6418
|
+
}
|
|
6419
|
+
function Calendar({
|
|
6420
|
+
events,
|
|
6421
|
+
defaultView = "month",
|
|
6422
|
+
defaultDate,
|
|
6423
|
+
onNavigate,
|
|
6424
|
+
onView,
|
|
6425
|
+
onSelectEvent,
|
|
6426
|
+
onSelectSlot,
|
|
6427
|
+
onAddEvent,
|
|
6428
|
+
className
|
|
6429
|
+
}) {
|
|
6430
|
+
const [date2, setDate] = React28.useState(defaultDate ?? new Date(2027, 0, 1));
|
|
6431
|
+
const [view, setView] = React28.useState(defaultView);
|
|
6432
|
+
const [selected, setSelected] = React28.useState(null);
|
|
6433
|
+
const handleNavigate = React28.useCallback(
|
|
6434
|
+
(next) => {
|
|
6435
|
+
setDate(next);
|
|
6436
|
+
onNavigate?.(next);
|
|
6437
|
+
},
|
|
6438
|
+
[onNavigate]
|
|
6439
|
+
);
|
|
6440
|
+
const handleView = React28.useCallback(
|
|
6441
|
+
(next) => {
|
|
6442
|
+
setView(next);
|
|
6443
|
+
onView?.(next);
|
|
6444
|
+
},
|
|
6445
|
+
[onView]
|
|
6446
|
+
);
|
|
6447
|
+
const handleSelectSlot = React28.useCallback(
|
|
6448
|
+
(slot) => {
|
|
6449
|
+
setSelected(slot.start);
|
|
6450
|
+
onSelectSlot?.(slot);
|
|
6451
|
+
},
|
|
6452
|
+
[onSelectSlot]
|
|
6453
|
+
);
|
|
6454
|
+
const components = React28.useMemo(
|
|
6455
|
+
() => ({
|
|
6456
|
+
// Header bar → CalendarHeader primitive + nav/view/add controls.
|
|
6457
|
+
toolbar: (tb) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border-secondary px-3xl py-2xl", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6458
|
+
CalendarHeader,
|
|
6459
|
+
{
|
|
6460
|
+
title: tb.label,
|
|
6461
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-lg", children: [
|
|
6462
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center overflow-hidden rounded-md border border-border-primary shadow-xs", children: [
|
|
6463
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6464
|
+
"button",
|
|
6465
|
+
{
|
|
6466
|
+
type: "button",
|
|
6467
|
+
"aria-label": "Previous",
|
|
6468
|
+
onClick: () => tb.onNavigate("PREV"),
|
|
6469
|
+
className: "flex items-center justify-center bg-bg-primary px-[10px] py-md text-fg-quaternary transition-colors hover:bg-bg-primary-hover",
|
|
6470
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(NavArrow, { dir: "left" })
|
|
6471
|
+
}
|
|
6472
|
+
),
|
|
6473
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6474
|
+
"button",
|
|
6475
|
+
{
|
|
6476
|
+
type: "button",
|
|
6477
|
+
onClick: () => tb.onNavigate("TODAY"),
|
|
6478
|
+
className: "border-x border-border-primary bg-bg-primary px-[14px] py-md text-sm font-semibold text-text-secondary transition-colors hover:bg-bg-primary-hover",
|
|
6479
|
+
children: "Today"
|
|
6480
|
+
}
|
|
6481
|
+
),
|
|
6482
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6483
|
+
"button",
|
|
6484
|
+
{
|
|
6485
|
+
type: "button",
|
|
6486
|
+
"aria-label": "Next",
|
|
6487
|
+
onClick: () => tb.onNavigate("NEXT"),
|
|
6488
|
+
className: "flex items-center justify-center bg-bg-primary px-[10px] py-md text-fg-quaternary transition-colors hover:bg-bg-primary-hover",
|
|
6489
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(NavArrow, { dir: "right" })
|
|
6490
|
+
}
|
|
6491
|
+
)
|
|
6492
|
+
] }),
|
|
6493
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6494
|
+
CalendarViewDropdown,
|
|
6495
|
+
{
|
|
6496
|
+
value: tb.view,
|
|
6497
|
+
onChange: (v) => tb.onView(v)
|
|
6498
|
+
}
|
|
6499
|
+
),
|
|
6500
|
+
onAddEvent && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6501
|
+
"button",
|
|
6502
|
+
{
|
|
6503
|
+
type: "button",
|
|
6504
|
+
onClick: onAddEvent,
|
|
6505
|
+
className: "flex items-center gap-xs rounded-md border-2 border-white/[0.12] bg-bg-brand-solid px-lg py-md text-sm font-semibold text-text-white shadow-skeuomorphic",
|
|
6506
|
+
children: [
|
|
6507
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(IconBox, { size: 20, children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Plus, {}) }) }),
|
|
6508
|
+
"Add event"
|
|
6509
|
+
]
|
|
6510
|
+
}
|
|
6511
|
+
)
|
|
6512
|
+
] })
|
|
6513
|
+
}
|
|
6514
|
+
) }),
|
|
6515
|
+
month: {
|
|
6516
|
+
// Weekday column header → CalendarColumnHeader primitive.
|
|
6517
|
+
header: ({ label }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center border-b border-r border-border-secondary bg-bg-primary p-md", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarColumnHeader, { weekday: label, date: "" }) }),
|
|
6518
|
+
// Date-number circle (Figma 7991:81840): default / today / selected.
|
|
6519
|
+
dateHeader: ({ date: cellDate, label }) => {
|
|
6520
|
+
const today = dateFns.isSameDay(cellDate, /* @__PURE__ */ new Date());
|
|
6521
|
+
const isSel = selected ? dateFns.isSameDay(cellDate, selected) : false;
|
|
6522
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex p-md", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6523
|
+
"span",
|
|
6524
|
+
{
|
|
6525
|
+
className: clsx_default(
|
|
6526
|
+
"flex size-6 items-center justify-center rounded-full text-xs font-semibold",
|
|
6527
|
+
today ? "bg-bg-brand-solid text-text-white" : isSel ? "bg-bg-secondary text-text-secondary" : "text-text-secondary"
|
|
6528
|
+
),
|
|
6529
|
+
children: label
|
|
6530
|
+
}
|
|
6531
|
+
) });
|
|
6532
|
+
},
|
|
6533
|
+
// Event chip → CalendarEvent primitive (desktop, filled).
|
|
6534
|
+
event: ({ event }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6535
|
+
CalendarEvent,
|
|
6536
|
+
{
|
|
6537
|
+
title: event.title,
|
|
6538
|
+
time: event.allDay ? void 0 : dateFns.format(event.start, "h:mm a"),
|
|
6539
|
+
color: event.color ?? "brand",
|
|
6540
|
+
filled: true
|
|
6541
|
+
}
|
|
6542
|
+
)
|
|
6543
|
+
}
|
|
6544
|
+
}),
|
|
6545
|
+
[onAddEvent, selected]
|
|
6546
|
+
);
|
|
6547
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6548
|
+
"div",
|
|
6549
|
+
{
|
|
6550
|
+
className: clsx_default(
|
|
6551
|
+
"flex w-full flex-col overflow-hidden rounded-xl border border-border-secondary bg-bg-primary shadow-xs",
|
|
6552
|
+
className
|
|
6553
|
+
),
|
|
6554
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6555
|
+
reactBigCalendar.Calendar,
|
|
6556
|
+
{
|
|
6557
|
+
localizer,
|
|
6558
|
+
events,
|
|
6559
|
+
date: date2,
|
|
6560
|
+
view,
|
|
6561
|
+
onNavigate: handleNavigate,
|
|
6562
|
+
onView: handleView,
|
|
6563
|
+
views: ["month", "week", "day"],
|
|
6564
|
+
selectable: true,
|
|
6565
|
+
popup: true,
|
|
6566
|
+
startAccessor: "start",
|
|
6567
|
+
endAccessor: "end",
|
|
6568
|
+
onSelectEvent: (e) => onSelectEvent?.(e),
|
|
6569
|
+
onSelectSlot: handleSelectSlot,
|
|
6570
|
+
messages: { showMore: (total) => `${total} more\u2026` },
|
|
6571
|
+
components,
|
|
6572
|
+
className: rbcStructural,
|
|
6573
|
+
style: { height: 800 }
|
|
6574
|
+
}
|
|
6575
|
+
)
|
|
6576
|
+
}
|
|
6577
|
+
);
|
|
6578
|
+
}
|
|
6216
6579
|
function PlusIcon2() {
|
|
6217
6580
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6218
6581
|
"path",
|
|
@@ -6350,44 +6713,6 @@ function CalendarCellDayWeekView({
|
|
|
6350
6713
|
}
|
|
6351
6714
|
);
|
|
6352
6715
|
}
|
|
6353
|
-
function CalendarColumnHeader({
|
|
6354
|
-
weekday,
|
|
6355
|
-
date: date2,
|
|
6356
|
-
type,
|
|
6357
|
-
current = false,
|
|
6358
|
-
orientation = "vertical",
|
|
6359
|
-
breakpoint = "desktop",
|
|
6360
|
-
className
|
|
6361
|
-
}) {
|
|
6362
|
-
const state = type ?? (current ? "selected" : "default");
|
|
6363
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6364
|
-
"div",
|
|
6365
|
-
{
|
|
6366
|
-
className: clsx_default(
|
|
6367
|
-
"flex items-center justify-center gap-md py-md font-body",
|
|
6368
|
-
orientation === "vertical" && "flex-col gap-xs",
|
|
6369
|
-
breakpoint === "desktop" && "w-[160px]",
|
|
6370
|
-
className
|
|
6371
|
-
),
|
|
6372
|
-
children: [
|
|
6373
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-text-quaternary", children: weekday }),
|
|
6374
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6375
|
-
"span",
|
|
6376
|
-
{
|
|
6377
|
-
className: clsx_default(
|
|
6378
|
-
"flex items-center justify-center text-xs font-semibold",
|
|
6379
|
-
state === "selected" && "size-6 rounded-full bg-bg-brand-solid text-white",
|
|
6380
|
-
state === "today" && "border-b-2 border-border-brand pb-xxs text-text-brand-secondary",
|
|
6381
|
-
state === "default" && "text-text-secondary"
|
|
6382
|
-
),
|
|
6383
|
-
"aria-current": state !== "default" ? "date" : void 0,
|
|
6384
|
-
children: date2
|
|
6385
|
-
}
|
|
6386
|
-
)
|
|
6387
|
-
]
|
|
6388
|
-
}
|
|
6389
|
-
);
|
|
6390
|
-
}
|
|
6391
6716
|
function CalendarDateIcon({ month, day, className }) {
|
|
6392
6717
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6393
6718
|
"div",
|
|
@@ -6466,39 +6791,6 @@ function CalendarEventDayWeekView({
|
|
|
6466
6791
|
}
|
|
6467
6792
|
);
|
|
6468
6793
|
}
|
|
6469
|
-
function CalendarHeader({
|
|
6470
|
-
title,
|
|
6471
|
-
range: range6,
|
|
6472
|
-
supportingText,
|
|
6473
|
-
badge,
|
|
6474
|
-
dateIcon,
|
|
6475
|
-
actions,
|
|
6476
|
-
className
|
|
6477
|
-
}) {
|
|
6478
|
-
const subtitle = range6 ?? supportingText;
|
|
6479
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6480
|
-
"div",
|
|
6481
|
-
{
|
|
6482
|
-
className: clsx_default(
|
|
6483
|
-
"flex flex-wrap items-start justify-between gap-lg font-body",
|
|
6484
|
-
className
|
|
6485
|
-
),
|
|
6486
|
-
children: [
|
|
6487
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-lg", children: [
|
|
6488
|
-
dateIcon,
|
|
6489
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-xxs", children: [
|
|
6490
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-md", children: [
|
|
6491
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold text-text-primary", children: title }),
|
|
6492
|
-
badge
|
|
6493
|
-
] }),
|
|
6494
|
-
subtitle ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-text-tertiary", children: subtitle }) : null
|
|
6495
|
-
] })
|
|
6496
|
-
] }),
|
|
6497
|
-
actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-md", children: actions }) : null
|
|
6498
|
-
]
|
|
6499
|
-
}
|
|
6500
|
-
);
|
|
6501
|
-
}
|
|
6502
6794
|
function CalendarRowLabel({ label, time: time2, className }) {
|
|
6503
6795
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6504
6796
|
"div",
|
|
@@ -6532,93 +6824,6 @@ function CalendarTimemarker({
|
|
|
6532
6824
|
/* @__PURE__ */ jsxRuntime.jsx(Line, {})
|
|
6533
6825
|
] }) });
|
|
6534
6826
|
}
|
|
6535
|
-
var DEFAULT_OPTIONS = [
|
|
6536
|
-
{ value: "day", label: "Day view", shortcut: "\u2318D" },
|
|
6537
|
-
{ value: "week", label: "Week view", shortcut: "\u2318W" },
|
|
6538
|
-
{ value: "month", label: "Month view", shortcut: "\u2318M" }
|
|
6539
|
-
];
|
|
6540
|
-
function Chevron2() {
|
|
6541
|
-
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6542
|
-
"path",
|
|
6543
|
-
{
|
|
6544
|
-
d: "m5 7.5 5 5 5-5",
|
|
6545
|
-
stroke: "currentColor",
|
|
6546
|
-
strokeWidth: "1.667",
|
|
6547
|
-
strokeLinecap: "round",
|
|
6548
|
-
strokeLinejoin: "round"
|
|
6549
|
-
}
|
|
6550
|
-
) });
|
|
6551
|
-
}
|
|
6552
|
-
function CalendarViewDropdown({
|
|
6553
|
-
value,
|
|
6554
|
-
onChange,
|
|
6555
|
-
onSelect,
|
|
6556
|
-
open: openProp,
|
|
6557
|
-
onOpenChange,
|
|
6558
|
-
options = DEFAULT_OPTIONS,
|
|
6559
|
-
className
|
|
6560
|
-
}) {
|
|
6561
|
-
const [internalOpen, setInternalOpen] = React28.useState(false);
|
|
6562
|
-
const isControlled = openProp !== void 0;
|
|
6563
|
-
const open = isControlled ? openProp : internalOpen;
|
|
6564
|
-
const setOpen = (next) => {
|
|
6565
|
-
if (!isControlled) setInternalOpen(next);
|
|
6566
|
-
onOpenChange?.(next);
|
|
6567
|
-
};
|
|
6568
|
-
const selected = options.find((o) => o.value === value) ?? options[0];
|
|
6569
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("relative inline-block font-body", className), children: [
|
|
6570
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6571
|
-
"button",
|
|
6572
|
-
{
|
|
6573
|
-
type: "button",
|
|
6574
|
-
"aria-haspopup": "listbox",
|
|
6575
|
-
"aria-expanded": open,
|
|
6576
|
-
onClick: () => setOpen(!open),
|
|
6577
|
-
className: "inline-flex items-center gap-md rounded-md border border-border-primary bg-bg-primary px-lg py-md text-sm font-semibold text-text-secondary shadow-skeuomorphic transition-colors hover:bg-bg-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-brand focus-visible:ring-offset-2 focus-visible:ring-offset-bg-primary",
|
|
6578
|
-
children: [
|
|
6579
|
-
selected.label,
|
|
6580
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-fg-quaternary", children: /* @__PURE__ */ jsxRuntime.jsx(Chevron2, {}) })
|
|
6581
|
-
]
|
|
6582
|
-
}
|
|
6583
|
-
),
|
|
6584
|
-
open ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6585
|
-
"ul",
|
|
6586
|
-
{
|
|
6587
|
-
role: "listbox",
|
|
6588
|
-
className: "absolute left-0 z-10 mt-xs min-w-[200px] rounded-md border border-border-secondary bg-bg-primary p-xs shadow-lg",
|
|
6589
|
-
children: options.map((opt) => {
|
|
6590
|
-
const isSelected = opt.value === value;
|
|
6591
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { role: "option", "aria-selected": isSelected, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6592
|
-
"button",
|
|
6593
|
-
{
|
|
6594
|
-
type: "button",
|
|
6595
|
-
onClick: () => {
|
|
6596
|
-
onChange?.(opt.value);
|
|
6597
|
-
onSelect?.(opt.value);
|
|
6598
|
-
setOpen(false);
|
|
6599
|
-
},
|
|
6600
|
-
className: "flex w-full items-center gap-md rounded-sm px-md py-xs text-sm font-medium text-text-secondary transition-colors hover:bg-bg-primary-hover",
|
|
6601
|
-
children: [
|
|
6602
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6603
|
-
"span",
|
|
6604
|
-
{
|
|
6605
|
-
className: clsx_default(
|
|
6606
|
-
"flex size-4 shrink-0 items-center justify-center rounded-full border",
|
|
6607
|
-
isSelected ? "border-border-brand" : "border-border-primary"
|
|
6608
|
-
),
|
|
6609
|
-
children: isSelected ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-2 rounded-full bg-bg-brand-solid" }) : null
|
|
6610
|
-
}
|
|
6611
|
-
),
|
|
6612
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-left", children: opt.label }),
|
|
6613
|
-
opt.shortcut ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-text-quaternary", children: opt.shortcut }) : null
|
|
6614
|
-
]
|
|
6615
|
-
}
|
|
6616
|
-
) }, opt.value);
|
|
6617
|
-
})
|
|
6618
|
-
}
|
|
6619
|
-
) : null
|
|
6620
|
-
] });
|
|
6621
|
-
}
|
|
6622
6827
|
function CardHeader({
|
|
6623
6828
|
title,
|
|
6624
6829
|
description,
|
|
@@ -7705,20 +7910,20 @@ var import_isFunction2 = __toESM(require_isFunction());
|
|
|
7705
7910
|
|
|
7706
7911
|
// node_modules/recharts/es6/util/LogUtils.js
|
|
7707
7912
|
var isDev = process.env.NODE_ENV !== "production";
|
|
7708
|
-
var warn = function warn2(condition,
|
|
7913
|
+
var warn = function warn2(condition, format3) {
|
|
7709
7914
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
7710
7915
|
args[_key - 2] = arguments[_key];
|
|
7711
7916
|
}
|
|
7712
7917
|
if (isDev && typeof console !== "undefined" && console.warn) {
|
|
7713
|
-
if (
|
|
7918
|
+
if (format3 === void 0) {
|
|
7714
7919
|
console.warn("LogUtils requires an error message argument");
|
|
7715
7920
|
}
|
|
7716
7921
|
if (!condition) {
|
|
7717
|
-
if (
|
|
7922
|
+
if (format3 === void 0) {
|
|
7718
7923
|
console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
|
|
7719
7924
|
} else {
|
|
7720
7925
|
var argIndex = 0;
|
|
7721
|
-
console.warn(
|
|
7926
|
+
console.warn(format3.replace(/%s/g, function() {
|
|
7722
7927
|
return args[argIndex++];
|
|
7723
7928
|
}));
|
|
7724
7929
|
}
|
|
@@ -10732,7 +10937,7 @@ var DecimalCSS = /* @__PURE__ */ (function() {
|
|
|
10732
10937
|
}
|
|
10733
10938
|
}], [{
|
|
10734
10939
|
key: "parse",
|
|
10735
|
-
value: function
|
|
10940
|
+
value: function parse2(str) {
|
|
10736
10941
|
var _NUM_SPLIT_REGEX$exec;
|
|
10737
10942
|
var _ref = (_NUM_SPLIT_REGEX$exec = NUM_SPLIT_REGEX.exec(str)) !== null && _NUM_SPLIT_REGEX$exec !== void 0 ? _NUM_SPLIT_REGEX$exec : [], _ref2 = _slicedToArray3(_ref, 3), numStr = _ref2[1], unit2 = _ref2[2];
|
|
10738
10943
|
return new DecimalCSS2(parseFloat(numStr), unit2 !== null && unit2 !== void 0 ? unit2 : "");
|
|
@@ -11722,10 +11927,10 @@ function color_formatHsl() {
|
|
|
11722
11927
|
function color_formatRgb() {
|
|
11723
11928
|
return this.rgb().formatRgb();
|
|
11724
11929
|
}
|
|
11725
|
-
function color(
|
|
11930
|
+
function color(format3) {
|
|
11726
11931
|
var m, l;
|
|
11727
|
-
|
|
11728
|
-
return (m = reHex.exec(
|
|
11932
|
+
format3 = (format3 + "").trim().toLowerCase();
|
|
11933
|
+
return (m = reHex.exec(format3)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format3)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format3)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format3)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format3)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format3)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format3)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format3) ? rgbn(named[format3]) : format3 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
11729
11934
|
}
|
|
11730
11935
|
function rgbn(n) {
|
|
11731
11936
|
return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
|
|
@@ -12277,7 +12482,7 @@ function locale_default(locale3) {
|
|
|
12277
12482
|
var prefix2 = (options && options.prefix !== void 0 ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""), suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== void 0 ? options.suffix : "");
|
|
12278
12483
|
var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
|
|
12279
12484
|
precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
|
|
12280
|
-
function
|
|
12485
|
+
function format3(value) {
|
|
12281
12486
|
var valuePrefix = prefix2, valueSuffix = suffix, i, n, c2;
|
|
12282
12487
|
if (type === "c") {
|
|
12283
12488
|
valueSuffix = formatType(value) + valueSuffix;
|
|
@@ -12320,10 +12525,10 @@ function locale_default(locale3) {
|
|
|
12320
12525
|
}
|
|
12321
12526
|
return numerals(value);
|
|
12322
12527
|
}
|
|
12323
|
-
|
|
12528
|
+
format3.toString = function() {
|
|
12324
12529
|
return specifier + "";
|
|
12325
12530
|
};
|
|
12326
|
-
return
|
|
12531
|
+
return format3;
|
|
12327
12532
|
}
|
|
12328
12533
|
function formatPrefix2(specifier, value) {
|
|
12329
12534
|
var e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k2 = Math.pow(10, -e), f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), { suffix: prefixes[8 + e / 3] });
|
|
@@ -12339,7 +12544,7 @@ function locale_default(locale3) {
|
|
|
12339
12544
|
|
|
12340
12545
|
// node_modules/d3-format/src/defaultLocale.js
|
|
12341
12546
|
var locale;
|
|
12342
|
-
var
|
|
12547
|
+
var format2;
|
|
12343
12548
|
var formatPrefix;
|
|
12344
12549
|
defaultLocale({
|
|
12345
12550
|
thousands: ",",
|
|
@@ -12348,7 +12553,7 @@ defaultLocale({
|
|
|
12348
12553
|
});
|
|
12349
12554
|
function defaultLocale(definition) {
|
|
12350
12555
|
locale = locale_default(definition);
|
|
12351
|
-
|
|
12556
|
+
format2 = locale.format;
|
|
12352
12557
|
formatPrefix = locale.formatPrefix;
|
|
12353
12558
|
return locale;
|
|
12354
12559
|
}
|
|
@@ -12393,7 +12598,7 @@ function tickFormat(start, stop, count, specifier) {
|
|
|
12393
12598
|
break;
|
|
12394
12599
|
}
|
|
12395
12600
|
}
|
|
12396
|
-
return
|
|
12601
|
+
return format2(specifier);
|
|
12397
12602
|
}
|
|
12398
12603
|
|
|
12399
12604
|
// node_modules/d3-scale/src/linear.js
|
|
@@ -12572,7 +12777,7 @@ function loggish(transform) {
|
|
|
12572
12777
|
if (specifier == null) specifier = base === 10 ? "s" : ",";
|
|
12573
12778
|
if (typeof specifier !== "function") {
|
|
12574
12779
|
if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;
|
|
12575
|
-
specifier =
|
|
12780
|
+
specifier = format2(specifier);
|
|
12576
12781
|
}
|
|
12577
12782
|
if (count === Infinity) return specifier;
|
|
12578
12783
|
const k2 = Math.max(1, base * count / scale.ticks().length);
|
|
@@ -13265,14 +13470,14 @@ function formatLocale(locale3) {
|
|
|
13265
13470
|
utcFormats.c = newFormat(locale_dateTime, utcFormats);
|
|
13266
13471
|
function newFormat(specifier, formats2) {
|
|
13267
13472
|
return function(date2) {
|
|
13268
|
-
var string = [], i = -1, j = 0, n = specifier.length, c2, pad4,
|
|
13473
|
+
var string = [], i = -1, j = 0, n = specifier.length, c2, pad4, format3;
|
|
13269
13474
|
if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
|
|
13270
13475
|
while (++i < n) {
|
|
13271
13476
|
if (specifier.charCodeAt(i) === 37) {
|
|
13272
13477
|
string.push(specifier.slice(j, i));
|
|
13273
13478
|
if ((pad4 = pads[c2 = specifier.charAt(++i)]) != null) c2 = specifier.charAt(++i);
|
|
13274
13479
|
else pad4 = c2 === "e" ? " " : "0";
|
|
13275
|
-
if (
|
|
13480
|
+
if (format3 = formats2[c2]) c2 = format3(date2, pad4);
|
|
13276
13481
|
string.push(c2);
|
|
13277
13482
|
j = i + 1;
|
|
13278
13483
|
}
|
|
@@ -13323,14 +13528,14 @@ function formatLocale(locale3) {
|
|
|
13323
13528
|
};
|
|
13324
13529
|
}
|
|
13325
13530
|
function parseSpecifier(d, specifier, string, j) {
|
|
13326
|
-
var i = 0, n = specifier.length, m = string.length, c2,
|
|
13531
|
+
var i = 0, n = specifier.length, m = string.length, c2, parse2;
|
|
13327
13532
|
while (i < n) {
|
|
13328
13533
|
if (j >= m) return -1;
|
|
13329
13534
|
c2 = specifier.charCodeAt(i++);
|
|
13330
13535
|
if (c2 === 37) {
|
|
13331
13536
|
c2 = specifier.charAt(i++);
|
|
13332
|
-
|
|
13333
|
-
if (!
|
|
13537
|
+
parse2 = parses[c2 in pads ? specifier.charAt(i++) : c2];
|
|
13538
|
+
if (!parse2 || (j = parse2(d, string, j)) < 0) return -1;
|
|
13334
13539
|
} else if (c2 != string.charCodeAt(j++)) {
|
|
13335
13540
|
return -1;
|
|
13336
13541
|
}
|
|
@@ -13703,9 +13908,9 @@ function date(t) {
|
|
|
13703
13908
|
function number3(t) {
|
|
13704
13909
|
return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
|
|
13705
13910
|
}
|
|
13706
|
-
function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2,
|
|
13911
|
+
function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3) {
|
|
13707
13912
|
var scale = continuous(), invert = scale.invert, domain = scale.domain;
|
|
13708
|
-
var formatMillisecond =
|
|
13913
|
+
var formatMillisecond = format3(".%L"), formatSecond = format3(":%S"), formatMinute = format3("%I:%M"), formatHour = format3("%I %p"), formatDay = format3("%a %d"), formatWeek = format3("%b %d"), formatMonth = format3("%B"), formatYear2 = format3("%Y");
|
|
13709
13914
|
function tickFormat2(date2) {
|
|
13710
13915
|
return (second2(date2) < date2 ? formatMillisecond : minute(date2) < date2 ? formatSecond : hour(date2) < date2 ? formatMinute : day(date2) < date2 ? formatHour : month(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year(date2) < date2 ? formatMonth : formatYear2)(date2);
|
|
13711
13916
|
}
|
|
@@ -13720,7 +13925,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
|
|
|
13720
13925
|
return ticks2(d[0], d[d.length - 1], interval == null ? 10 : interval);
|
|
13721
13926
|
};
|
|
13722
13927
|
scale.tickFormat = function(count, specifier) {
|
|
13723
|
-
return specifier == null ? tickFormat2 :
|
|
13928
|
+
return specifier == null ? tickFormat2 : format3(specifier);
|
|
13724
13929
|
};
|
|
13725
13930
|
scale.nice = function(interval) {
|
|
13726
13931
|
var d = domain();
|
|
@@ -13728,7 +13933,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
|
|
|
13728
13933
|
return interval ? domain(nice(d, interval)) : scale;
|
|
13729
13934
|
};
|
|
13730
13935
|
scale.copy = function() {
|
|
13731
|
-
return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2,
|
|
13936
|
+
return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3));
|
|
13732
13937
|
};
|
|
13733
13938
|
return scale;
|
|
13734
13939
|
}
|
|
@@ -18469,18 +18674,18 @@ var getTransitionVal = function getTransitionVal2(props, duration, easing) {
|
|
|
18469
18674
|
}).join(",");
|
|
18470
18675
|
};
|
|
18471
18676
|
var isDev2 = process.env.NODE_ENV !== "production";
|
|
18472
|
-
var warn3 = function warn4(condition,
|
|
18677
|
+
var warn3 = function warn4(condition, format3, a2, b, c2, d, e, f) {
|
|
18473
18678
|
if (isDev2 && typeof console !== "undefined" && console.warn) {
|
|
18474
|
-
if (
|
|
18679
|
+
if (format3 === void 0) {
|
|
18475
18680
|
console.warn("LogUtils requires an error message argument");
|
|
18476
18681
|
}
|
|
18477
18682
|
if (!condition) {
|
|
18478
|
-
if (
|
|
18683
|
+
if (format3 === void 0) {
|
|
18479
18684
|
console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
|
|
18480
18685
|
} else {
|
|
18481
18686
|
var args = [a2, b, c2, d, e, f];
|
|
18482
18687
|
var argIndex = 0;
|
|
18483
|
-
console.warn(
|
|
18688
|
+
console.warn(format3.replace(/%s/g, function() {
|
|
18484
18689
|
return args[argIndex++];
|
|
18485
18690
|
}));
|
|
18486
18691
|
}
|
|
@@ -29387,6 +29592,156 @@ function CommandShortcut({ keys: keys2, className }) {
|
|
|
29387
29592
|
i
|
|
29388
29593
|
)) });
|
|
29389
29594
|
}
|
|
29595
|
+
var inputSizeClasses = {
|
|
29596
|
+
sm: "px-lg py-md text-sm",
|
|
29597
|
+
md: "px-lg py-md text-md",
|
|
29598
|
+
lg: "px-[14px] py-2.5 text-md"
|
|
29599
|
+
};
|
|
29600
|
+
function boxClasses(destructive) {
|
|
29601
|
+
return clsx_default(
|
|
29602
|
+
"flex w-full items-center gap-md rounded-md border bg-bg-primary shadow-xs",
|
|
29603
|
+
"transition-shadow focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-bg-primary",
|
|
29604
|
+
destructive ? "border-border-error focus-within:ring-border-error" : "border-border-primary focus-within:border-border-brand focus-within:ring-border-brand"
|
|
29605
|
+
);
|
|
29606
|
+
}
|
|
29607
|
+
function FieldWrapper({
|
|
29608
|
+
label,
|
|
29609
|
+
required,
|
|
29610
|
+
hint,
|
|
29611
|
+
destructive,
|
|
29612
|
+
children,
|
|
29613
|
+
className
|
|
29614
|
+
}) {
|
|
29615
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("flex w-full flex-col gap-sm font-body", className), children: [
|
|
29616
|
+
label ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex gap-xxs text-sm font-medium text-text-secondary", children: [
|
|
29617
|
+
label,
|
|
29618
|
+
required ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-brand-tertiary", children: "*" }) : null
|
|
29619
|
+
] }) : null,
|
|
29620
|
+
children,
|
|
29621
|
+
hint ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29622
|
+
"span",
|
|
29623
|
+
{
|
|
29624
|
+
className: clsx_default(
|
|
29625
|
+
"text-sm font-normal",
|
|
29626
|
+
destructive ? "text-text-error-primary" : "text-text-tertiary"
|
|
29627
|
+
),
|
|
29628
|
+
children: hint
|
|
29629
|
+
}
|
|
29630
|
+
) : null
|
|
29631
|
+
] });
|
|
29632
|
+
}
|
|
29633
|
+
function CheckboxBox({ selected, big }) {
|
|
29634
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29635
|
+
"span",
|
|
29636
|
+
{
|
|
29637
|
+
className: clsx_default(
|
|
29638
|
+
"flex shrink-0 items-center justify-center rounded-xs border",
|
|
29639
|
+
big ? "size-5" : "size-4",
|
|
29640
|
+
selected ? "border-transparent bg-bg-brand-solid" : "border-border-primary bg-bg-primary"
|
|
29641
|
+
),
|
|
29642
|
+
children: selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-3 text-fg-white", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.33 4 6 11.33 2.67 8", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
29643
|
+
}
|
|
29644
|
+
);
|
|
29645
|
+
}
|
|
29646
|
+
function SelectMenuItem({
|
|
29647
|
+
label,
|
|
29648
|
+
supportingText,
|
|
29649
|
+
selected = false,
|
|
29650
|
+
size = "sm",
|
|
29651
|
+
leading,
|
|
29652
|
+
multi = false,
|
|
29653
|
+
disabled,
|
|
29654
|
+
className,
|
|
29655
|
+
...rest
|
|
29656
|
+
}) {
|
|
29657
|
+
const big = size !== "sm";
|
|
29658
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29659
|
+
"button",
|
|
29660
|
+
{
|
|
29661
|
+
type: "button",
|
|
29662
|
+
role: "option",
|
|
29663
|
+
"aria-selected": selected,
|
|
29664
|
+
disabled,
|
|
29665
|
+
className: clsx_default(
|
|
29666
|
+
"flex w-full items-center gap-md rounded-sm text-left transition-colors",
|
|
29667
|
+
size === "lg" ? "py-2.5 pl-md pr-2.5" : "p-md",
|
|
29668
|
+
disabled ? "opacity-50" : "hover:bg-bg-primary-hover",
|
|
29669
|
+
className
|
|
29670
|
+
),
|
|
29671
|
+
...rest,
|
|
29672
|
+
children: [
|
|
29673
|
+
multi && /* @__PURE__ */ jsxRuntime.jsx(CheckboxBox, { selected, big }),
|
|
29674
|
+
!multi && leading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: leading }),
|
|
29675
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx_default("flex min-w-0 flex-1 items-center gap-sm", big ? "text-md" : "text-sm"), children: [
|
|
29676
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium text-text-primary", children: label }),
|
|
29677
|
+
supportingText && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-normal text-text-tertiary", children: supportingText })
|
|
29678
|
+
] }),
|
|
29679
|
+
!multi && selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0 text-fg-brand-primary", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.67 5 7.5 14.17 3.33 10", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
29680
|
+
]
|
|
29681
|
+
}
|
|
29682
|
+
);
|
|
29683
|
+
}
|
|
29684
|
+
function ComboBox({
|
|
29685
|
+
options,
|
|
29686
|
+
value,
|
|
29687
|
+
onChange,
|
|
29688
|
+
onInputChange,
|
|
29689
|
+
placeholder = "Search...",
|
|
29690
|
+
disabled = false,
|
|
29691
|
+
error = false,
|
|
29692
|
+
label,
|
|
29693
|
+
hint,
|
|
29694
|
+
required,
|
|
29695
|
+
className
|
|
29696
|
+
}) {
|
|
29697
|
+
const selectedLabel = React28.useMemo(
|
|
29698
|
+
() => options.find((o) => o.value === value)?.label ?? "",
|
|
29699
|
+
[options, value]
|
|
29700
|
+
);
|
|
29701
|
+
const [query, setQuery] = React28.useState(selectedLabel);
|
|
29702
|
+
const [open, setOpen] = React28.useState(false);
|
|
29703
|
+
const display = open ? query : selectedLabel;
|
|
29704
|
+
const filtered = options.filter(
|
|
29705
|
+
(o) => o.label.toLowerCase().includes(query.trim().toLowerCase())
|
|
29706
|
+
);
|
|
29707
|
+
const pick = (o) => {
|
|
29708
|
+
onChange?.(o.value);
|
|
29709
|
+
setQuery(o.label);
|
|
29710
|
+
setOpen(false);
|
|
29711
|
+
};
|
|
29712
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldWrapper, { label, required, hint, destructive: error, className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
29713
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default(boxClasses(error), "px-lg py-md", disabled && "cursor-not-allowed bg-bg-secondary opacity-60"), children: [
|
|
29714
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29715
|
+
"input",
|
|
29716
|
+
{
|
|
29717
|
+
value: display,
|
|
29718
|
+
disabled,
|
|
29719
|
+
placeholder,
|
|
29720
|
+
onFocus: () => setOpen(true),
|
|
29721
|
+
onBlur: () => setTimeout(() => setOpen(false), 120),
|
|
29722
|
+
onChange: (e) => {
|
|
29723
|
+
setQuery(e.target.value);
|
|
29724
|
+
setOpen(true);
|
|
29725
|
+
onInputChange?.(e.target.value);
|
|
29726
|
+
},
|
|
29727
|
+
className: "min-w-0 flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder"
|
|
29728
|
+
}
|
|
29729
|
+
),
|
|
29730
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("text-fg-quaternary transition-transform", open && "rotate-180"), children: /* @__PURE__ */ jsxRuntime.jsx(IconBox, { size: 16, children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.ChevronDown, {}) }) })
|
|
29731
|
+
] }),
|
|
29732
|
+
open && !disabled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 right-0 top-full z-50 mt-xs flex max-h-[320px] flex-col gap-px overflow-auto rounded-md border border-border-secondary-alt bg-bg-primary p-xs shadow-lg", children: filtered.length ? filtered.map((o) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29733
|
+
SelectMenuItem,
|
|
29734
|
+
{
|
|
29735
|
+
label: o.label,
|
|
29736
|
+
supportingText: o.supportingText,
|
|
29737
|
+
selected: o.value === value,
|
|
29738
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
29739
|
+
onClick: () => pick(o)
|
|
29740
|
+
},
|
|
29741
|
+
o.value
|
|
29742
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-md py-lg text-center text-sm text-text-tertiary", children: "No results" }) })
|
|
29743
|
+
] }) });
|
|
29744
|
+
}
|
|
29390
29745
|
var isTextType = (t) => t === "heading" || t === "text";
|
|
29391
29746
|
function ContentDivider({
|
|
29392
29747
|
type = "heading",
|
|
@@ -30565,7 +30920,7 @@ function FilterLines2() {
|
|
|
30565
30920
|
}
|
|
30566
30921
|
) });
|
|
30567
30922
|
}
|
|
30568
|
-
function
|
|
30923
|
+
function ChevronDown2() {
|
|
30569
30924
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m4 6 4 4 4-4", stroke: "currentColor", strokeWidth: "1.333", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
30570
30925
|
}
|
|
30571
30926
|
function FiltersDropdownMenu({
|
|
@@ -30599,7 +30954,7 @@ function FiltersDropdownMenu({
|
|
|
30599
30954
|
/* @__PURE__ */ jsxRuntime.jsx(FilterLines2, {}),
|
|
30600
30955
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
|
|
30601
30956
|
active ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-bg-brand-solid px-1.5 text-xs font-medium text-text-white", children: count }) : null,
|
|
30602
|
-
chevron ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30957
|
+
chevron ? /* @__PURE__ */ jsxRuntime.jsx(ChevronDown2, {}) : null
|
|
30603
30958
|
]
|
|
30604
30959
|
}
|
|
30605
30960
|
),
|
|
@@ -30815,44 +31170,6 @@ function HelpIcon2({
|
|
|
30815
31170
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100", children: /* @__PURE__ */ jsxRuntime.jsx(Tooltip2, { text, supportingText, arrow }) })
|
|
30816
31171
|
] });
|
|
30817
31172
|
}
|
|
30818
|
-
var inputSizeClasses = {
|
|
30819
|
-
sm: "px-lg py-md text-sm",
|
|
30820
|
-
md: "px-lg py-md text-md",
|
|
30821
|
-
lg: "px-[14px] py-2.5 text-md"
|
|
30822
|
-
};
|
|
30823
|
-
function boxClasses(destructive) {
|
|
30824
|
-
return clsx_default(
|
|
30825
|
-
"flex w-full items-center gap-md rounded-md border bg-bg-primary shadow-xs",
|
|
30826
|
-
"transition-shadow focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-bg-primary",
|
|
30827
|
-
destructive ? "border-border-error focus-within:ring-border-error" : "border-border-primary focus-within:border-border-brand focus-within:ring-border-brand"
|
|
30828
|
-
);
|
|
30829
|
-
}
|
|
30830
|
-
function FieldWrapper({
|
|
30831
|
-
label,
|
|
30832
|
-
required,
|
|
30833
|
-
hint,
|
|
30834
|
-
destructive,
|
|
30835
|
-
children,
|
|
30836
|
-
className
|
|
30837
|
-
}) {
|
|
30838
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("flex w-full flex-col gap-sm font-body", className), children: [
|
|
30839
|
-
label ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex gap-xxs text-sm font-medium text-text-secondary", children: [
|
|
30840
|
-
label,
|
|
30841
|
-
required ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-brand-tertiary", children: "*" }) : null
|
|
30842
|
-
] }) : null,
|
|
30843
|
-
children,
|
|
30844
|
-
hint ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30845
|
-
"span",
|
|
30846
|
-
{
|
|
30847
|
-
className: clsx_default(
|
|
30848
|
-
"text-sm font-normal",
|
|
30849
|
-
destructive ? "text-text-error-primary" : "text-text-tertiary"
|
|
30850
|
-
),
|
|
30851
|
-
children: hint
|
|
30852
|
-
}
|
|
30853
|
-
) : null
|
|
30854
|
-
] });
|
|
30855
|
-
}
|
|
30856
31173
|
function CalendarIcon() {
|
|
30857
31174
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 text-fg-quaternary", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.5 8.333H2.5M13.333 1.667V5M6.667 1.667V5M6.5 18.333h7c1.4 0 2.1 0 2.635-.272a2.5 2.5 0 0 0 1.093-1.093C17.5 16.433 17.5 15.733 17.5 14.333v-7c0-1.4 0-2.1-.272-2.635a2.5 2.5 0 0 0-1.093-1.093C15.6 3.333 14.9 3.333 13.5 3.333h-7c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 2.772 4.698C2.5 5.233 2.5 5.933 2.5 7.333v7c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.093c.535.272 1.235.272 2.635.272Z", stroke: "currentColor", strokeWidth: "1.667", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
30858
31175
|
}
|
|
@@ -31781,57 +32098,6 @@ function ModalActions({
|
|
|
31781
32098
|
)
|
|
31782
32099
|
] });
|
|
31783
32100
|
}
|
|
31784
|
-
function CheckboxBox({ selected, big }) {
|
|
31785
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31786
|
-
"span",
|
|
31787
|
-
{
|
|
31788
|
-
className: clsx_default(
|
|
31789
|
-
"flex shrink-0 items-center justify-center rounded-xs border",
|
|
31790
|
-
big ? "size-5" : "size-4",
|
|
31791
|
-
selected ? "border-transparent bg-bg-brand-solid" : "border-border-primary bg-bg-primary"
|
|
31792
|
-
),
|
|
31793
|
-
children: selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-3 text-fg-white", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.33 4 6 11.33 2.67 8", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
31794
|
-
}
|
|
31795
|
-
);
|
|
31796
|
-
}
|
|
31797
|
-
function SelectMenuItem({
|
|
31798
|
-
label,
|
|
31799
|
-
supportingText,
|
|
31800
|
-
selected = false,
|
|
31801
|
-
size = "sm",
|
|
31802
|
-
leading,
|
|
31803
|
-
multi = false,
|
|
31804
|
-
disabled,
|
|
31805
|
-
className,
|
|
31806
|
-
...rest
|
|
31807
|
-
}) {
|
|
31808
|
-
const big = size !== "sm";
|
|
31809
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
31810
|
-
"button",
|
|
31811
|
-
{
|
|
31812
|
-
type: "button",
|
|
31813
|
-
role: "option",
|
|
31814
|
-
"aria-selected": selected,
|
|
31815
|
-
disabled,
|
|
31816
|
-
className: clsx_default(
|
|
31817
|
-
"flex w-full items-center gap-md rounded-sm text-left transition-colors",
|
|
31818
|
-
size === "lg" ? "py-2.5 pl-md pr-2.5" : "p-md",
|
|
31819
|
-
disabled ? "opacity-50" : "hover:bg-bg-primary-hover",
|
|
31820
|
-
className
|
|
31821
|
-
),
|
|
31822
|
-
...rest,
|
|
31823
|
-
children: [
|
|
31824
|
-
multi && /* @__PURE__ */ jsxRuntime.jsx(CheckboxBox, { selected, big }),
|
|
31825
|
-
!multi && leading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: leading }),
|
|
31826
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx_default("flex min-w-0 flex-1 items-center gap-sm", big ? "text-md" : "text-sm"), children: [
|
|
31827
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium text-text-primary", children: label }),
|
|
31828
|
-
supportingText && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-normal text-text-tertiary", children: supportingText })
|
|
31829
|
-
] }),
|
|
31830
|
-
!multi && selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0 text-fg-brand-primary", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.67 5 7.5 14.17 3.33 10", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
31831
|
-
]
|
|
31832
|
-
}
|
|
31833
|
-
);
|
|
31834
|
-
}
|
|
31835
32101
|
function Tag({
|
|
31836
32102
|
size = "md",
|
|
31837
32103
|
children,
|
|
@@ -31961,20 +32227,6 @@ function MultiSelect({
|
|
|
31961
32227
|
hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("text-sm", invalid ? "text-text-error-primary" : "text-text-tertiary"), children: hint })
|
|
31962
32228
|
] });
|
|
31963
32229
|
}
|
|
31964
|
-
function IconBox({ size = 20, className, children }) {
|
|
31965
|
-
const icon = React28.isValidElement(children) ? React28.cloneElement(children, {
|
|
31966
|
-
viewBox: children.props.viewBox ?? "0 0 24 24",
|
|
31967
|
-
className: clsx_default("w-full h-full", children.props.className)
|
|
31968
|
-
}) : children;
|
|
31969
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31970
|
-
"span",
|
|
31971
|
-
{
|
|
31972
|
-
className: clsx_default("relative flex shrink-0 items-center justify-center", className),
|
|
31973
|
-
style: { width: size, height: size },
|
|
31974
|
-
children: icon
|
|
31975
|
-
}
|
|
31976
|
-
);
|
|
31977
|
-
}
|
|
31978
32230
|
var LayeredAvatar = ({ src, online }) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex size-10 shrink-0 rounded-full border-[0.75px] border-border-secondary-alt bg-bg-primary p-[1px] shadow-xs", children: [
|
|
31979
32231
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-full overflow-hidden rounded-full border-[0.5px] border-[rgba(0,0,0,0.16)]", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "", className: "size-full rounded-full object-cover" }) }),
|
|
31980
32232
|
online !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -32380,7 +32632,7 @@ function NumberInput({
|
|
|
32380
32632
|
const dec = () => set2(value - step);
|
|
32381
32633
|
const inc = () => set2(value + step);
|
|
32382
32634
|
const Minus = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.167 10h11.666", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round" }) });
|
|
32383
|
-
const
|
|
32635
|
+
const Plus2 = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 4.167v11.666M4.167 10h11.666", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round" }) });
|
|
32384
32636
|
const Chevron5 = ({ up }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 12 12", fill: "none", className: clsx_default("size-3", up && "rotate-180"), "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 4.5 6 7.5 9 4.5", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32385
32637
|
const numberEl = /* @__PURE__ */ jsxRuntime.jsx(
|
|
32386
32638
|
"input",
|
|
@@ -32403,7 +32655,7 @@ function NumberInput({
|
|
|
32403
32655
|
const box = layout === "horizontal" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default(boxClasses(destructive), "gap-0 overflow-hidden p-0"), children: [
|
|
32404
32656
|
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: dec, disabled, "aria-label": "Decrease", className: "flex items-center justify-center border-r border-border-primary p-2.5 text-fg-quaternary hover:bg-bg-primary-hover disabled:opacity-60", children: Minus }),
|
|
32405
32657
|
numberEl,
|
|
32406
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: inc, disabled, "aria-label": "Increase", className: "flex items-center justify-center border-l border-border-primary p-2.5 text-fg-quaternary hover:bg-bg-primary-hover disabled:opacity-60", children:
|
|
32658
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: inc, disabled, "aria-label": "Increase", className: "flex items-center justify-center border-l border-border-primary p-2.5 text-fg-quaternary hover:bg-bg-primary-hover disabled:opacity-60", children: Plus2 })
|
|
32407
32659
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default(boxClasses(destructive), "gap-0 overflow-hidden p-0"), children: [
|
|
32408
32660
|
numberEl,
|
|
32409
32661
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col self-stretch border-l border-border-primary", children: [
|
|
@@ -32493,8 +32745,8 @@ function PaginationNumberBase({
|
|
|
32493
32745
|
}
|
|
32494
32746
|
);
|
|
32495
32747
|
}
|
|
32496
|
-
var
|
|
32497
|
-
var
|
|
32748
|
+
var ArrowLeft2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.83 10H4.17M4.17 10l5 5M4.17 10l5-5", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32749
|
+
var ArrowRight2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.17 10h11.66M15.83 10l-5 5M15.83 10l-5-5", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32498
32750
|
function PaginationButtonGroupBase({
|
|
32499
32751
|
cellType = "number",
|
|
32500
32752
|
active = false,
|
|
@@ -32523,11 +32775,11 @@ function PaginationButtonGroupBase({
|
|
|
32523
32775
|
),
|
|
32524
32776
|
...rest,
|
|
32525
32777
|
children: [
|
|
32526
|
-
isLeading && (icon ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
32778
|
+
isLeading && (icon ?? /* @__PURE__ */ jsxRuntime.jsx(ArrowLeft2, {})),
|
|
32527
32779
|
(isLeading || isTrailing) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-xxs", children: children ?? (isLeading ? "Previous" : "Next") }),
|
|
32528
|
-
isTrailing && (icon ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
32780
|
+
isTrailing && (icon ?? /* @__PURE__ */ jsxRuntime.jsx(ArrowRight2, {})),
|
|
32529
32781
|
isNumber3 && children,
|
|
32530
|
-
isIcon && (icon ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
32782
|
+
isIcon && (icon ?? /* @__PURE__ */ jsxRuntime.jsx(ArrowRight2, {}))
|
|
32531
32783
|
]
|
|
32532
32784
|
}
|
|
32533
32785
|
);
|
|
@@ -32785,6 +33037,7 @@ function TagChip({ label, onRemove }) {
|
|
|
32785
33037
|
function TagsInputField({
|
|
32786
33038
|
tags = [],
|
|
32787
33039
|
onRemoveTag,
|
|
33040
|
+
onAddTag,
|
|
32788
33041
|
variant = "inner",
|
|
32789
33042
|
size = "md",
|
|
32790
33043
|
label,
|
|
@@ -32795,6 +33048,21 @@ function TagsInputField({
|
|
|
32795
33048
|
placeholder = "Add tag",
|
|
32796
33049
|
...rest
|
|
32797
33050
|
}) {
|
|
33051
|
+
const [draft, setDraft] = React28.useState("");
|
|
33052
|
+
const commit = (raw) => {
|
|
33053
|
+
const next = raw.trim();
|
|
33054
|
+
if (!next || tags.includes(next)) return;
|
|
33055
|
+
onAddTag?.(next);
|
|
33056
|
+
};
|
|
33057
|
+
const handleKeyDown = (e) => {
|
|
33058
|
+
if (e.key === "Enter" || e.key === ",") {
|
|
33059
|
+
e.preventDefault();
|
|
33060
|
+
commit(draft);
|
|
33061
|
+
setDraft("");
|
|
33062
|
+
} else if (e.key === "Backspace" && draft === "" && tags.length) {
|
|
33063
|
+
onRemoveTag?.(tags.length - 1);
|
|
33064
|
+
}
|
|
33065
|
+
};
|
|
32798
33066
|
const chips = tags.map((t, i) => /* @__PURE__ */ jsxRuntime.jsx(TagChip, { label: t, onRemove: onRemoveTag ? () => onRemoveTag(i) : void 0 }, i));
|
|
32799
33067
|
const box = (inner) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32800
33068
|
"div",
|
|
@@ -32811,7 +33079,12 @@ function TagsInputField({
|
|
|
32811
33079
|
{
|
|
32812
33080
|
placeholder,
|
|
32813
33081
|
className: "min-w-[80px] flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder",
|
|
32814
|
-
...rest
|
|
33082
|
+
...rest,
|
|
33083
|
+
...onAddTag ? {
|
|
33084
|
+
value: draft,
|
|
33085
|
+
onChange: (e) => setDraft(e.target.value),
|
|
33086
|
+
onKeyDown: handleKeyDown
|
|
33087
|
+
} : {}
|
|
32815
33088
|
}
|
|
32816
33089
|
)
|
|
32817
33090
|
]
|
|
@@ -34233,6 +34506,7 @@ exports.ButtonDestructive = ButtonDestructive;
|
|
|
34233
34506
|
exports.ButtonGroup = ButtonGroup;
|
|
34234
34507
|
exports.ButtonGroupSegment = ButtonGroupSegment;
|
|
34235
34508
|
exports.ButtonUtility = ButtonUtility;
|
|
34509
|
+
exports.Calendar = Calendar;
|
|
34236
34510
|
exports.CalendarCell = CalendarCell;
|
|
34237
34511
|
exports.CalendarCellDayWeekView = CalendarCellDayWeekView;
|
|
34238
34512
|
exports.CalendarColumnHeader = CalendarColumnHeader;
|
|
@@ -34255,6 +34529,7 @@ exports.Checkbox = Checkbox;
|
|
|
34255
34529
|
exports.CodeSnippet = CodeSnippet;
|
|
34256
34530
|
exports.CodeSnippetTabs = CodeSnippetTabs;
|
|
34257
34531
|
exports.ColorBadge = ColorBadge;
|
|
34532
|
+
exports.ComboBox = ComboBox;
|
|
34258
34533
|
exports.CommandBar = CommandBar;
|
|
34259
34534
|
exports.CommandBarFooter = CommandBarFooter;
|
|
34260
34535
|
exports.CommandBarMenuSection = CommandBarMenuSection;
|