@borisj74/bv-ds 0.1.8 → 0.1.9
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 +399 -207
- package/dist/index.d.cts +62 -21
- package/dist/index.d.ts +62 -21
- package/dist/index.js +401 -210
- package/package.json +7 -2
- package/src/components/Calendar/Calendar.tsx +249 -0
- package/src/components/Calendar/index.ts +2 -0
- package/src/components/TextEditor/TextEditor.tsx +13 -0
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as React28 from 'react';
|
|
2
|
-
import React28__default, { forwardRef, isValidElement, cloneElement, Children, useContext, useMemo, createContext, Fragment, useState, PureComponent, createElement, Component, useRef, useEffect,
|
|
2
|
+
import React28__default, { forwardRef, isValidElement, cloneElement, Children, useContext, useMemo, createContext, Fragment, useState, useCallback, PureComponent, createElement, Component, useRef, useEffect, useId, useImperativeHandle } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
4
|
-
import {
|
|
4
|
+
import { dateFnsLocalizer, Calendar as Calendar$1 } from 'react-big-calendar';
|
|
5
|
+
import { getDay, parse, format, startOfWeek, isSameDay } from 'date-fns';
|
|
6
|
+
import { enUS } from 'date-fns/locale';
|
|
7
|
+
import { Plus, LogOut01, ChevronSelectorVertical, ChevronDown as ChevronDown$1, XClose as XClose$1, Menu02, Bold01, AlignLeft, AlignCenter, AlignRight, Link01, ArrowLeft, ArrowRight } from '@borisj74/bv-ds-icons';
|
|
5
8
|
import { useEditor, EditorContent } from '@tiptap/react';
|
|
6
9
|
import { StarterKit } from '@tiptap/starter-kit';
|
|
7
10
|
import { TextAlign } from '@tiptap/extension-text-align';
|
|
@@ -6101,6 +6104,91 @@ function ButtonUtility({
|
|
|
6101
6104
|
) : null
|
|
6102
6105
|
] });
|
|
6103
6106
|
}
|
|
6107
|
+
function IconBox({ size = 20, className, children }) {
|
|
6108
|
+
const icon = isValidElement(children) ? cloneElement(children, {
|
|
6109
|
+
viewBox: children.props.viewBox ?? "0 0 24 24",
|
|
6110
|
+
className: clsx_default("w-full h-full", children.props.className)
|
|
6111
|
+
}) : children;
|
|
6112
|
+
return /* @__PURE__ */ jsx(
|
|
6113
|
+
"span",
|
|
6114
|
+
{
|
|
6115
|
+
className: clsx_default("relative flex shrink-0 items-center justify-center", className),
|
|
6116
|
+
style: { width: size, height: size },
|
|
6117
|
+
children: icon
|
|
6118
|
+
}
|
|
6119
|
+
);
|
|
6120
|
+
}
|
|
6121
|
+
function CalendarHeader({
|
|
6122
|
+
title,
|
|
6123
|
+
range: range6,
|
|
6124
|
+
supportingText,
|
|
6125
|
+
badge,
|
|
6126
|
+
dateIcon,
|
|
6127
|
+
actions,
|
|
6128
|
+
className
|
|
6129
|
+
}) {
|
|
6130
|
+
const subtitle = range6 ?? supportingText;
|
|
6131
|
+
return /* @__PURE__ */ jsxs(
|
|
6132
|
+
"div",
|
|
6133
|
+
{
|
|
6134
|
+
className: clsx_default(
|
|
6135
|
+
"flex flex-wrap items-start justify-between gap-lg font-body",
|
|
6136
|
+
className
|
|
6137
|
+
),
|
|
6138
|
+
children: [
|
|
6139
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-lg", children: [
|
|
6140
|
+
dateIcon,
|
|
6141
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xxs", children: [
|
|
6142
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-md", children: [
|
|
6143
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-bold text-text-primary", children: title }),
|
|
6144
|
+
badge
|
|
6145
|
+
] }),
|
|
6146
|
+
subtitle ? /* @__PURE__ */ jsx("p", { className: "text-sm text-text-tertiary", children: subtitle }) : null
|
|
6147
|
+
] })
|
|
6148
|
+
] }),
|
|
6149
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "flex items-center gap-md", children: actions }) : null
|
|
6150
|
+
]
|
|
6151
|
+
}
|
|
6152
|
+
);
|
|
6153
|
+
}
|
|
6154
|
+
function CalendarColumnHeader({
|
|
6155
|
+
weekday,
|
|
6156
|
+
date: date2,
|
|
6157
|
+
type,
|
|
6158
|
+
current = false,
|
|
6159
|
+
orientation = "vertical",
|
|
6160
|
+
breakpoint = "desktop",
|
|
6161
|
+
className
|
|
6162
|
+
}) {
|
|
6163
|
+
const state = type ?? (current ? "selected" : "default");
|
|
6164
|
+
return /* @__PURE__ */ jsxs(
|
|
6165
|
+
"div",
|
|
6166
|
+
{
|
|
6167
|
+
className: clsx_default(
|
|
6168
|
+
"flex items-center justify-center gap-md py-md font-body",
|
|
6169
|
+
orientation === "vertical" && "flex-col gap-xs",
|
|
6170
|
+
breakpoint === "desktop" && "w-[160px]",
|
|
6171
|
+
className
|
|
6172
|
+
),
|
|
6173
|
+
children: [
|
|
6174
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-text-quaternary", children: weekday }),
|
|
6175
|
+
/* @__PURE__ */ jsx(
|
|
6176
|
+
"span",
|
|
6177
|
+
{
|
|
6178
|
+
className: clsx_default(
|
|
6179
|
+
"flex items-center justify-center text-xs font-semibold",
|
|
6180
|
+
state === "selected" && "size-6 rounded-full bg-bg-brand-solid text-white",
|
|
6181
|
+
state === "today" && "border-b-2 border-border-brand pb-xxs text-text-brand-secondary",
|
|
6182
|
+
state === "default" && "text-text-secondary"
|
|
6183
|
+
),
|
|
6184
|
+
"aria-current": state !== "default" ? "date" : void 0,
|
|
6185
|
+
children: date2
|
|
6186
|
+
}
|
|
6187
|
+
)
|
|
6188
|
+
]
|
|
6189
|
+
}
|
|
6190
|
+
);
|
|
6191
|
+
}
|
|
6104
6192
|
var dotClasses = {
|
|
6105
6193
|
neutral: "bg-utility-neutral-500",
|
|
6106
6194
|
brand: "bg-utility-brand-500",
|
|
@@ -6192,6 +6280,281 @@ function CalendarEvent({
|
|
|
6192
6280
|
}
|
|
6193
6281
|
);
|
|
6194
6282
|
}
|
|
6283
|
+
var DEFAULT_OPTIONS = [
|
|
6284
|
+
{ value: "day", label: "Day view", shortcut: "\u2318D" },
|
|
6285
|
+
{ value: "week", label: "Week view", shortcut: "\u2318W" },
|
|
6286
|
+
{ value: "month", label: "Month view", shortcut: "\u2318M" }
|
|
6287
|
+
];
|
|
6288
|
+
function Chevron2() {
|
|
6289
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsx(
|
|
6290
|
+
"path",
|
|
6291
|
+
{
|
|
6292
|
+
d: "m5 7.5 5 5 5-5",
|
|
6293
|
+
stroke: "currentColor",
|
|
6294
|
+
strokeWidth: "1.667",
|
|
6295
|
+
strokeLinecap: "round",
|
|
6296
|
+
strokeLinejoin: "round"
|
|
6297
|
+
}
|
|
6298
|
+
) });
|
|
6299
|
+
}
|
|
6300
|
+
function CalendarViewDropdown({
|
|
6301
|
+
value,
|
|
6302
|
+
onChange,
|
|
6303
|
+
onSelect,
|
|
6304
|
+
open: openProp,
|
|
6305
|
+
onOpenChange,
|
|
6306
|
+
options = DEFAULT_OPTIONS,
|
|
6307
|
+
className
|
|
6308
|
+
}) {
|
|
6309
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
6310
|
+
const isControlled = openProp !== void 0;
|
|
6311
|
+
const open = isControlled ? openProp : internalOpen;
|
|
6312
|
+
const setOpen = (next) => {
|
|
6313
|
+
if (!isControlled) setInternalOpen(next);
|
|
6314
|
+
onOpenChange?.(next);
|
|
6315
|
+
};
|
|
6316
|
+
const selected = options.find((o) => o.value === value) ?? options[0];
|
|
6317
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative inline-block font-body", className), children: [
|
|
6318
|
+
/* @__PURE__ */ jsxs(
|
|
6319
|
+
"button",
|
|
6320
|
+
{
|
|
6321
|
+
type: "button",
|
|
6322
|
+
"aria-haspopup": "listbox",
|
|
6323
|
+
"aria-expanded": open,
|
|
6324
|
+
onClick: () => setOpen(!open),
|
|
6325
|
+
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",
|
|
6326
|
+
children: [
|
|
6327
|
+
selected.label,
|
|
6328
|
+
/* @__PURE__ */ jsx("span", { className: "text-fg-quaternary", children: /* @__PURE__ */ jsx(Chevron2, {}) })
|
|
6329
|
+
]
|
|
6330
|
+
}
|
|
6331
|
+
),
|
|
6332
|
+
open ? /* @__PURE__ */ jsx(
|
|
6333
|
+
"ul",
|
|
6334
|
+
{
|
|
6335
|
+
role: "listbox",
|
|
6336
|
+
className: "absolute left-0 z-10 mt-xs min-w-[200px] rounded-md border border-border-secondary bg-bg-primary p-xs shadow-lg",
|
|
6337
|
+
children: options.map((opt) => {
|
|
6338
|
+
const isSelected = opt.value === value;
|
|
6339
|
+
return /* @__PURE__ */ jsx("li", { role: "option", "aria-selected": isSelected, children: /* @__PURE__ */ jsxs(
|
|
6340
|
+
"button",
|
|
6341
|
+
{
|
|
6342
|
+
type: "button",
|
|
6343
|
+
onClick: () => {
|
|
6344
|
+
onChange?.(opt.value);
|
|
6345
|
+
onSelect?.(opt.value);
|
|
6346
|
+
setOpen(false);
|
|
6347
|
+
},
|
|
6348
|
+
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",
|
|
6349
|
+
children: [
|
|
6350
|
+
/* @__PURE__ */ jsx(
|
|
6351
|
+
"span",
|
|
6352
|
+
{
|
|
6353
|
+
className: clsx_default(
|
|
6354
|
+
"flex size-4 shrink-0 items-center justify-center rounded-full border",
|
|
6355
|
+
isSelected ? "border-border-brand" : "border-border-primary"
|
|
6356
|
+
),
|
|
6357
|
+
children: isSelected ? /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-bg-brand-solid" }) : null
|
|
6358
|
+
}
|
|
6359
|
+
),
|
|
6360
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: opt.label }),
|
|
6361
|
+
opt.shortcut ? /* @__PURE__ */ jsx("span", { className: "text-xs text-text-quaternary", children: opt.shortcut }) : null
|
|
6362
|
+
]
|
|
6363
|
+
}
|
|
6364
|
+
) }, opt.value);
|
|
6365
|
+
})
|
|
6366
|
+
}
|
|
6367
|
+
) : null
|
|
6368
|
+
] });
|
|
6369
|
+
}
|
|
6370
|
+
var localizer = dateFnsLocalizer({
|
|
6371
|
+
format,
|
|
6372
|
+
parse,
|
|
6373
|
+
// Monday-first week, matching the Figma column-header order (Mon…Sun).
|
|
6374
|
+
startOfWeek: (date2) => startOfWeek(date2, { weekStartsOn: 1 }),
|
|
6375
|
+
getDay,
|
|
6376
|
+
locales: { "en-US": enUS }
|
|
6377
|
+
});
|
|
6378
|
+
var rbcStructural = clsx_default(
|
|
6379
|
+
"h-full font-body",
|
|
6380
|
+
"[&_.rbc-month-view]:flex [&_.rbc-month-view]:flex-1 [&_.rbc-month-view]:flex-col [&_.rbc-month-view]:overflow-hidden",
|
|
6381
|
+
"[&_.rbc-month-header]:flex [&_.rbc-month-header]:flex-row",
|
|
6382
|
+
"[&_.rbc-header]:min-w-0 [&_.rbc-header]:flex-1 [&_.rbc-header]:overflow-hidden",
|
|
6383
|
+
"[&_.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",
|
|
6384
|
+
"[&_.rbc-row-bg]:absolute [&_.rbc-row-bg]:inset-0 [&_.rbc-row-bg]:flex [&_.rbc-row-bg]:flex-row",
|
|
6385
|
+
"[&_.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",
|
|
6386
|
+
"[&_.rbc-off-range-bg]:!bg-bg-secondary-alt",
|
|
6387
|
+
"[&_.rbc-row-content]:relative [&_.rbc-row-content]:z-[1] [&_.rbc-row-content]:flex [&_.rbc-row-content]:flex-1 [&_.rbc-row-content]:flex-col",
|
|
6388
|
+
"[&_.rbc-row]:flex [&_.rbc-row]:flex-row",
|
|
6389
|
+
"[&_.rbc-date-cell]:min-w-0 [&_.rbc-date-cell]:flex-1",
|
|
6390
|
+
"[&_.rbc-off-range]:opacity-50",
|
|
6391
|
+
"[&_.rbc-row-segment]:min-w-0 [&_.rbc-row-segment]:px-md [&_.rbc-row-segment]:pb-xxs",
|
|
6392
|
+
"[&_.rbc-event]:block [&_.rbc-event]:w-full [&_.rbc-event]:outline-none",
|
|
6393
|
+
"[&_.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"
|
|
6394
|
+
);
|
|
6395
|
+
function NavArrow({ dir }) {
|
|
6396
|
+
return /* @__PURE__ */ jsx(IconBox, { size: 20, children: dir === "left" ? /* @__PURE__ */ jsx(ArrowLeft, {}) : /* @__PURE__ */ jsx(ArrowRight, {}) });
|
|
6397
|
+
}
|
|
6398
|
+
function Calendar({
|
|
6399
|
+
events,
|
|
6400
|
+
defaultView = "month",
|
|
6401
|
+
defaultDate,
|
|
6402
|
+
onNavigate,
|
|
6403
|
+
onView,
|
|
6404
|
+
onSelectEvent,
|
|
6405
|
+
onSelectSlot,
|
|
6406
|
+
onAddEvent,
|
|
6407
|
+
className
|
|
6408
|
+
}) {
|
|
6409
|
+
const [date2, setDate] = useState(defaultDate ?? new Date(2027, 0, 1));
|
|
6410
|
+
const [view, setView] = useState(defaultView);
|
|
6411
|
+
const [selected, setSelected] = useState(null);
|
|
6412
|
+
const handleNavigate = useCallback(
|
|
6413
|
+
(next) => {
|
|
6414
|
+
setDate(next);
|
|
6415
|
+
onNavigate?.(next);
|
|
6416
|
+
},
|
|
6417
|
+
[onNavigate]
|
|
6418
|
+
);
|
|
6419
|
+
const handleView = useCallback(
|
|
6420
|
+
(next) => {
|
|
6421
|
+
setView(next);
|
|
6422
|
+
onView?.(next);
|
|
6423
|
+
},
|
|
6424
|
+
[onView]
|
|
6425
|
+
);
|
|
6426
|
+
const handleSelectSlot = useCallback(
|
|
6427
|
+
(slot) => {
|
|
6428
|
+
setSelected(slot.start);
|
|
6429
|
+
onSelectSlot?.(slot);
|
|
6430
|
+
},
|
|
6431
|
+
[onSelectSlot]
|
|
6432
|
+
);
|
|
6433
|
+
const components = useMemo(
|
|
6434
|
+
() => ({
|
|
6435
|
+
// Header bar → CalendarHeader primitive + nav/view/add controls.
|
|
6436
|
+
toolbar: (tb) => /* @__PURE__ */ jsx("div", { className: "border-b border-border-secondary px-3xl py-2xl", children: /* @__PURE__ */ jsx(
|
|
6437
|
+
CalendarHeader,
|
|
6438
|
+
{
|
|
6439
|
+
title: tb.label,
|
|
6440
|
+
actions: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-lg", children: [
|
|
6441
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center overflow-hidden rounded-md border border-border-primary shadow-xs", children: [
|
|
6442
|
+
/* @__PURE__ */ jsx(
|
|
6443
|
+
"button",
|
|
6444
|
+
{
|
|
6445
|
+
type: "button",
|
|
6446
|
+
"aria-label": "Previous",
|
|
6447
|
+
onClick: () => tb.onNavigate("PREV"),
|
|
6448
|
+
className: "flex items-center justify-center bg-bg-primary px-[10px] py-md text-fg-quaternary transition-colors hover:bg-bg-primary-hover",
|
|
6449
|
+
children: /* @__PURE__ */ jsx(NavArrow, { dir: "left" })
|
|
6450
|
+
}
|
|
6451
|
+
),
|
|
6452
|
+
/* @__PURE__ */ jsx(
|
|
6453
|
+
"button",
|
|
6454
|
+
{
|
|
6455
|
+
type: "button",
|
|
6456
|
+
onClick: () => tb.onNavigate("TODAY"),
|
|
6457
|
+
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",
|
|
6458
|
+
children: "Today"
|
|
6459
|
+
}
|
|
6460
|
+
),
|
|
6461
|
+
/* @__PURE__ */ jsx(
|
|
6462
|
+
"button",
|
|
6463
|
+
{
|
|
6464
|
+
type: "button",
|
|
6465
|
+
"aria-label": "Next",
|
|
6466
|
+
onClick: () => tb.onNavigate("NEXT"),
|
|
6467
|
+
className: "flex items-center justify-center bg-bg-primary px-[10px] py-md text-fg-quaternary transition-colors hover:bg-bg-primary-hover",
|
|
6468
|
+
children: /* @__PURE__ */ jsx(NavArrow, { dir: "right" })
|
|
6469
|
+
}
|
|
6470
|
+
)
|
|
6471
|
+
] }),
|
|
6472
|
+
/* @__PURE__ */ jsx(
|
|
6473
|
+
CalendarViewDropdown,
|
|
6474
|
+
{
|
|
6475
|
+
value: tb.view,
|
|
6476
|
+
onChange: (v) => tb.onView(v)
|
|
6477
|
+
}
|
|
6478
|
+
),
|
|
6479
|
+
onAddEvent && /* @__PURE__ */ jsxs(
|
|
6480
|
+
"button",
|
|
6481
|
+
{
|
|
6482
|
+
type: "button",
|
|
6483
|
+
onClick: onAddEvent,
|
|
6484
|
+
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",
|
|
6485
|
+
children: [
|
|
6486
|
+
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: /* @__PURE__ */ jsx(IconBox, { size: 20, children: /* @__PURE__ */ jsx(Plus, {}) }) }),
|
|
6487
|
+
"Add event"
|
|
6488
|
+
]
|
|
6489
|
+
}
|
|
6490
|
+
)
|
|
6491
|
+
] })
|
|
6492
|
+
}
|
|
6493
|
+
) }),
|
|
6494
|
+
month: {
|
|
6495
|
+
// Weekday column header → CalendarColumnHeader primitive.
|
|
6496
|
+
header: ({ label }) => /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center border-b border-r border-border-secondary bg-bg-primary p-md", children: /* @__PURE__ */ jsx(CalendarColumnHeader, { weekday: label, date: "" }) }),
|
|
6497
|
+
// Date-number circle (Figma 7991:81840): default / today / selected.
|
|
6498
|
+
dateHeader: ({ date: cellDate, label }) => {
|
|
6499
|
+
const today = isSameDay(cellDate, /* @__PURE__ */ new Date());
|
|
6500
|
+
const isSel = selected ? isSameDay(cellDate, selected) : false;
|
|
6501
|
+
return /* @__PURE__ */ jsx("div", { className: "flex p-md", children: /* @__PURE__ */ jsx(
|
|
6502
|
+
"span",
|
|
6503
|
+
{
|
|
6504
|
+
className: clsx_default(
|
|
6505
|
+
"flex size-6 items-center justify-center rounded-full text-xs font-semibold",
|
|
6506
|
+
today ? "bg-bg-brand-solid text-text-white" : isSel ? "bg-bg-secondary text-text-secondary" : "text-text-secondary"
|
|
6507
|
+
),
|
|
6508
|
+
children: label
|
|
6509
|
+
}
|
|
6510
|
+
) });
|
|
6511
|
+
},
|
|
6512
|
+
// Event chip → CalendarEvent primitive (desktop, filled).
|
|
6513
|
+
event: ({ event }) => /* @__PURE__ */ jsx(
|
|
6514
|
+
CalendarEvent,
|
|
6515
|
+
{
|
|
6516
|
+
title: event.title,
|
|
6517
|
+
time: event.allDay ? void 0 : format(event.start, "h:mm a"),
|
|
6518
|
+
color: event.color ?? "brand",
|
|
6519
|
+
filled: true
|
|
6520
|
+
}
|
|
6521
|
+
)
|
|
6522
|
+
}
|
|
6523
|
+
}),
|
|
6524
|
+
[onAddEvent, selected]
|
|
6525
|
+
);
|
|
6526
|
+
return /* @__PURE__ */ jsx(
|
|
6527
|
+
"div",
|
|
6528
|
+
{
|
|
6529
|
+
className: clsx_default(
|
|
6530
|
+
"flex w-full flex-col overflow-hidden rounded-xl border border-border-secondary bg-bg-primary shadow-xs",
|
|
6531
|
+
className
|
|
6532
|
+
),
|
|
6533
|
+
children: /* @__PURE__ */ jsx(
|
|
6534
|
+
Calendar$1,
|
|
6535
|
+
{
|
|
6536
|
+
localizer,
|
|
6537
|
+
events,
|
|
6538
|
+
date: date2,
|
|
6539
|
+
view,
|
|
6540
|
+
onNavigate: handleNavigate,
|
|
6541
|
+
onView: handleView,
|
|
6542
|
+
views: ["month", "week", "day"],
|
|
6543
|
+
selectable: true,
|
|
6544
|
+
popup: true,
|
|
6545
|
+
startAccessor: "start",
|
|
6546
|
+
endAccessor: "end",
|
|
6547
|
+
onSelectEvent: (e) => onSelectEvent?.(e),
|
|
6548
|
+
onSelectSlot: handleSelectSlot,
|
|
6549
|
+
messages: { showMore: (total) => `${total} more\u2026` },
|
|
6550
|
+
components,
|
|
6551
|
+
className: rbcStructural,
|
|
6552
|
+
style: { height: 800 }
|
|
6553
|
+
}
|
|
6554
|
+
)
|
|
6555
|
+
}
|
|
6556
|
+
);
|
|
6557
|
+
}
|
|
6195
6558
|
function PlusIcon2() {
|
|
6196
6559
|
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsx(
|
|
6197
6560
|
"path",
|
|
@@ -6329,44 +6692,6 @@ function CalendarCellDayWeekView({
|
|
|
6329
6692
|
}
|
|
6330
6693
|
);
|
|
6331
6694
|
}
|
|
6332
|
-
function CalendarColumnHeader({
|
|
6333
|
-
weekday,
|
|
6334
|
-
date: date2,
|
|
6335
|
-
type,
|
|
6336
|
-
current = false,
|
|
6337
|
-
orientation = "vertical",
|
|
6338
|
-
breakpoint = "desktop",
|
|
6339
|
-
className
|
|
6340
|
-
}) {
|
|
6341
|
-
const state = type ?? (current ? "selected" : "default");
|
|
6342
|
-
return /* @__PURE__ */ jsxs(
|
|
6343
|
-
"div",
|
|
6344
|
-
{
|
|
6345
|
-
className: clsx_default(
|
|
6346
|
-
"flex items-center justify-center gap-md py-md font-body",
|
|
6347
|
-
orientation === "vertical" && "flex-col gap-xs",
|
|
6348
|
-
breakpoint === "desktop" && "w-[160px]",
|
|
6349
|
-
className
|
|
6350
|
-
),
|
|
6351
|
-
children: [
|
|
6352
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-text-quaternary", children: weekday }),
|
|
6353
|
-
/* @__PURE__ */ jsx(
|
|
6354
|
-
"span",
|
|
6355
|
-
{
|
|
6356
|
-
className: clsx_default(
|
|
6357
|
-
"flex items-center justify-center text-xs font-semibold",
|
|
6358
|
-
state === "selected" && "size-6 rounded-full bg-bg-brand-solid text-white",
|
|
6359
|
-
state === "today" && "border-b-2 border-border-brand pb-xxs text-text-brand-secondary",
|
|
6360
|
-
state === "default" && "text-text-secondary"
|
|
6361
|
-
),
|
|
6362
|
-
"aria-current": state !== "default" ? "date" : void 0,
|
|
6363
|
-
children: date2
|
|
6364
|
-
}
|
|
6365
|
-
)
|
|
6366
|
-
]
|
|
6367
|
-
}
|
|
6368
|
-
);
|
|
6369
|
-
}
|
|
6370
6695
|
function CalendarDateIcon({ month, day, className }) {
|
|
6371
6696
|
return /* @__PURE__ */ jsxs(
|
|
6372
6697
|
"div",
|
|
@@ -6445,39 +6770,6 @@ function CalendarEventDayWeekView({
|
|
|
6445
6770
|
}
|
|
6446
6771
|
);
|
|
6447
6772
|
}
|
|
6448
|
-
function CalendarHeader({
|
|
6449
|
-
title,
|
|
6450
|
-
range: range6,
|
|
6451
|
-
supportingText,
|
|
6452
|
-
badge,
|
|
6453
|
-
dateIcon,
|
|
6454
|
-
actions,
|
|
6455
|
-
className
|
|
6456
|
-
}) {
|
|
6457
|
-
const subtitle = range6 ?? supportingText;
|
|
6458
|
-
return /* @__PURE__ */ jsxs(
|
|
6459
|
-
"div",
|
|
6460
|
-
{
|
|
6461
|
-
className: clsx_default(
|
|
6462
|
-
"flex flex-wrap items-start justify-between gap-lg font-body",
|
|
6463
|
-
className
|
|
6464
|
-
),
|
|
6465
|
-
children: [
|
|
6466
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-lg", children: [
|
|
6467
|
-
dateIcon,
|
|
6468
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xxs", children: [
|
|
6469
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-md", children: [
|
|
6470
|
-
/* @__PURE__ */ jsx("h2", { className: "text-lg font-bold text-text-primary", children: title }),
|
|
6471
|
-
badge
|
|
6472
|
-
] }),
|
|
6473
|
-
subtitle ? /* @__PURE__ */ jsx("p", { className: "text-sm text-text-tertiary", children: subtitle }) : null
|
|
6474
|
-
] })
|
|
6475
|
-
] }),
|
|
6476
|
-
actions ? /* @__PURE__ */ jsx("div", { className: "flex items-center gap-md", children: actions }) : null
|
|
6477
|
-
]
|
|
6478
|
-
}
|
|
6479
|
-
);
|
|
6480
|
-
}
|
|
6481
6773
|
function CalendarRowLabel({ label, time: time2, className }) {
|
|
6482
6774
|
return /* @__PURE__ */ jsx(
|
|
6483
6775
|
"div",
|
|
@@ -6511,93 +6803,6 @@ function CalendarTimemarker({
|
|
|
6511
6803
|
/* @__PURE__ */ jsx(Line, {})
|
|
6512
6804
|
] }) });
|
|
6513
6805
|
}
|
|
6514
|
-
var DEFAULT_OPTIONS = [
|
|
6515
|
-
{ value: "day", label: "Day view", shortcut: "\u2318D" },
|
|
6516
|
-
{ value: "week", label: "Week view", shortcut: "\u2318W" },
|
|
6517
|
-
{ value: "month", label: "Month view", shortcut: "\u2318M" }
|
|
6518
|
-
];
|
|
6519
|
-
function Chevron2() {
|
|
6520
|
-
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsx(
|
|
6521
|
-
"path",
|
|
6522
|
-
{
|
|
6523
|
-
d: "m5 7.5 5 5 5-5",
|
|
6524
|
-
stroke: "currentColor",
|
|
6525
|
-
strokeWidth: "1.667",
|
|
6526
|
-
strokeLinecap: "round",
|
|
6527
|
-
strokeLinejoin: "round"
|
|
6528
|
-
}
|
|
6529
|
-
) });
|
|
6530
|
-
}
|
|
6531
|
-
function CalendarViewDropdown({
|
|
6532
|
-
value,
|
|
6533
|
-
onChange,
|
|
6534
|
-
onSelect,
|
|
6535
|
-
open: openProp,
|
|
6536
|
-
onOpenChange,
|
|
6537
|
-
options = DEFAULT_OPTIONS,
|
|
6538
|
-
className
|
|
6539
|
-
}) {
|
|
6540
|
-
const [internalOpen, setInternalOpen] = useState(false);
|
|
6541
|
-
const isControlled = openProp !== void 0;
|
|
6542
|
-
const open = isControlled ? openProp : internalOpen;
|
|
6543
|
-
const setOpen = (next) => {
|
|
6544
|
-
if (!isControlled) setInternalOpen(next);
|
|
6545
|
-
onOpenChange?.(next);
|
|
6546
|
-
};
|
|
6547
|
-
const selected = options.find((o) => o.value === value) ?? options[0];
|
|
6548
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative inline-block font-body", className), children: [
|
|
6549
|
-
/* @__PURE__ */ jsxs(
|
|
6550
|
-
"button",
|
|
6551
|
-
{
|
|
6552
|
-
type: "button",
|
|
6553
|
-
"aria-haspopup": "listbox",
|
|
6554
|
-
"aria-expanded": open,
|
|
6555
|
-
onClick: () => setOpen(!open),
|
|
6556
|
-
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",
|
|
6557
|
-
children: [
|
|
6558
|
-
selected.label,
|
|
6559
|
-
/* @__PURE__ */ jsx("span", { className: "text-fg-quaternary", children: /* @__PURE__ */ jsx(Chevron2, {}) })
|
|
6560
|
-
]
|
|
6561
|
-
}
|
|
6562
|
-
),
|
|
6563
|
-
open ? /* @__PURE__ */ jsx(
|
|
6564
|
-
"ul",
|
|
6565
|
-
{
|
|
6566
|
-
role: "listbox",
|
|
6567
|
-
className: "absolute left-0 z-10 mt-xs min-w-[200px] rounded-md border border-border-secondary bg-bg-primary p-xs shadow-lg",
|
|
6568
|
-
children: options.map((opt) => {
|
|
6569
|
-
const isSelected = opt.value === value;
|
|
6570
|
-
return /* @__PURE__ */ jsx("li", { role: "option", "aria-selected": isSelected, children: /* @__PURE__ */ jsxs(
|
|
6571
|
-
"button",
|
|
6572
|
-
{
|
|
6573
|
-
type: "button",
|
|
6574
|
-
onClick: () => {
|
|
6575
|
-
onChange?.(opt.value);
|
|
6576
|
-
onSelect?.(opt.value);
|
|
6577
|
-
setOpen(false);
|
|
6578
|
-
},
|
|
6579
|
-
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",
|
|
6580
|
-
children: [
|
|
6581
|
-
/* @__PURE__ */ jsx(
|
|
6582
|
-
"span",
|
|
6583
|
-
{
|
|
6584
|
-
className: clsx_default(
|
|
6585
|
-
"flex size-4 shrink-0 items-center justify-center rounded-full border",
|
|
6586
|
-
isSelected ? "border-border-brand" : "border-border-primary"
|
|
6587
|
-
),
|
|
6588
|
-
children: isSelected ? /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-bg-brand-solid" }) : null
|
|
6589
|
-
}
|
|
6590
|
-
),
|
|
6591
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: opt.label }),
|
|
6592
|
-
opt.shortcut ? /* @__PURE__ */ jsx("span", { className: "text-xs text-text-quaternary", children: opt.shortcut }) : null
|
|
6593
|
-
]
|
|
6594
|
-
}
|
|
6595
|
-
) }, opt.value);
|
|
6596
|
-
})
|
|
6597
|
-
}
|
|
6598
|
-
) : null
|
|
6599
|
-
] });
|
|
6600
|
-
}
|
|
6601
6806
|
function CardHeader({
|
|
6602
6807
|
title,
|
|
6603
6808
|
description,
|
|
@@ -7684,20 +7889,20 @@ var import_isFunction2 = __toESM(require_isFunction());
|
|
|
7684
7889
|
|
|
7685
7890
|
// node_modules/recharts/es6/util/LogUtils.js
|
|
7686
7891
|
var isDev = process.env.NODE_ENV !== "production";
|
|
7687
|
-
var warn = function warn2(condition,
|
|
7892
|
+
var warn = function warn2(condition, format3) {
|
|
7688
7893
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
7689
7894
|
args[_key - 2] = arguments[_key];
|
|
7690
7895
|
}
|
|
7691
7896
|
if (isDev && typeof console !== "undefined" && console.warn) {
|
|
7692
|
-
if (
|
|
7897
|
+
if (format3 === void 0) {
|
|
7693
7898
|
console.warn("LogUtils requires an error message argument");
|
|
7694
7899
|
}
|
|
7695
7900
|
if (!condition) {
|
|
7696
|
-
if (
|
|
7901
|
+
if (format3 === void 0) {
|
|
7697
7902
|
console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
|
|
7698
7903
|
} else {
|
|
7699
7904
|
var argIndex = 0;
|
|
7700
|
-
console.warn(
|
|
7905
|
+
console.warn(format3.replace(/%s/g, function() {
|
|
7701
7906
|
return args[argIndex++];
|
|
7702
7907
|
}));
|
|
7703
7908
|
}
|
|
@@ -10711,7 +10916,7 @@ var DecimalCSS = /* @__PURE__ */ (function() {
|
|
|
10711
10916
|
}
|
|
10712
10917
|
}], [{
|
|
10713
10918
|
key: "parse",
|
|
10714
|
-
value: function
|
|
10919
|
+
value: function parse2(str) {
|
|
10715
10920
|
var _NUM_SPLIT_REGEX$exec;
|
|
10716
10921
|
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];
|
|
10717
10922
|
return new DecimalCSS2(parseFloat(numStr), unit2 !== null && unit2 !== void 0 ? unit2 : "");
|
|
@@ -11701,10 +11906,10 @@ function color_formatHsl() {
|
|
|
11701
11906
|
function color_formatRgb() {
|
|
11702
11907
|
return this.rgb().formatRgb();
|
|
11703
11908
|
}
|
|
11704
|
-
function color(
|
|
11909
|
+
function color(format3) {
|
|
11705
11910
|
var m, l;
|
|
11706
|
-
|
|
11707
|
-
return (m = reHex.exec(
|
|
11911
|
+
format3 = (format3 + "").trim().toLowerCase();
|
|
11912
|
+
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;
|
|
11708
11913
|
}
|
|
11709
11914
|
function rgbn(n) {
|
|
11710
11915
|
return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
|
|
@@ -12256,7 +12461,7 @@ function locale_default(locale3) {
|
|
|
12256
12461
|
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 : "");
|
|
12257
12462
|
var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
|
|
12258
12463
|
precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
|
|
12259
|
-
function
|
|
12464
|
+
function format3(value) {
|
|
12260
12465
|
var valuePrefix = prefix2, valueSuffix = suffix, i, n, c2;
|
|
12261
12466
|
if (type === "c") {
|
|
12262
12467
|
valueSuffix = formatType(value) + valueSuffix;
|
|
@@ -12299,10 +12504,10 @@ function locale_default(locale3) {
|
|
|
12299
12504
|
}
|
|
12300
12505
|
return numerals(value);
|
|
12301
12506
|
}
|
|
12302
|
-
|
|
12507
|
+
format3.toString = function() {
|
|
12303
12508
|
return specifier + "";
|
|
12304
12509
|
};
|
|
12305
|
-
return
|
|
12510
|
+
return format3;
|
|
12306
12511
|
}
|
|
12307
12512
|
function formatPrefix2(specifier, value) {
|
|
12308
12513
|
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] });
|
|
@@ -12318,7 +12523,7 @@ function locale_default(locale3) {
|
|
|
12318
12523
|
|
|
12319
12524
|
// node_modules/d3-format/src/defaultLocale.js
|
|
12320
12525
|
var locale;
|
|
12321
|
-
var
|
|
12526
|
+
var format2;
|
|
12322
12527
|
var formatPrefix;
|
|
12323
12528
|
defaultLocale({
|
|
12324
12529
|
thousands: ",",
|
|
@@ -12327,7 +12532,7 @@ defaultLocale({
|
|
|
12327
12532
|
});
|
|
12328
12533
|
function defaultLocale(definition) {
|
|
12329
12534
|
locale = locale_default(definition);
|
|
12330
|
-
|
|
12535
|
+
format2 = locale.format;
|
|
12331
12536
|
formatPrefix = locale.formatPrefix;
|
|
12332
12537
|
return locale;
|
|
12333
12538
|
}
|
|
@@ -12372,7 +12577,7 @@ function tickFormat(start, stop, count, specifier) {
|
|
|
12372
12577
|
break;
|
|
12373
12578
|
}
|
|
12374
12579
|
}
|
|
12375
|
-
return
|
|
12580
|
+
return format2(specifier);
|
|
12376
12581
|
}
|
|
12377
12582
|
|
|
12378
12583
|
// node_modules/d3-scale/src/linear.js
|
|
@@ -12551,7 +12756,7 @@ function loggish(transform) {
|
|
|
12551
12756
|
if (specifier == null) specifier = base === 10 ? "s" : ",";
|
|
12552
12757
|
if (typeof specifier !== "function") {
|
|
12553
12758
|
if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;
|
|
12554
|
-
specifier =
|
|
12759
|
+
specifier = format2(specifier);
|
|
12555
12760
|
}
|
|
12556
12761
|
if (count === Infinity) return specifier;
|
|
12557
12762
|
const k2 = Math.max(1, base * count / scale.ticks().length);
|
|
@@ -13244,14 +13449,14 @@ function formatLocale(locale3) {
|
|
|
13244
13449
|
utcFormats.c = newFormat(locale_dateTime, utcFormats);
|
|
13245
13450
|
function newFormat(specifier, formats2) {
|
|
13246
13451
|
return function(date2) {
|
|
13247
|
-
var string = [], i = -1, j = 0, n = specifier.length, c2, pad4,
|
|
13452
|
+
var string = [], i = -1, j = 0, n = specifier.length, c2, pad4, format3;
|
|
13248
13453
|
if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
|
|
13249
13454
|
while (++i < n) {
|
|
13250
13455
|
if (specifier.charCodeAt(i) === 37) {
|
|
13251
13456
|
string.push(specifier.slice(j, i));
|
|
13252
13457
|
if ((pad4 = pads[c2 = specifier.charAt(++i)]) != null) c2 = specifier.charAt(++i);
|
|
13253
13458
|
else pad4 = c2 === "e" ? " " : "0";
|
|
13254
|
-
if (
|
|
13459
|
+
if (format3 = formats2[c2]) c2 = format3(date2, pad4);
|
|
13255
13460
|
string.push(c2);
|
|
13256
13461
|
j = i + 1;
|
|
13257
13462
|
}
|
|
@@ -13302,14 +13507,14 @@ function formatLocale(locale3) {
|
|
|
13302
13507
|
};
|
|
13303
13508
|
}
|
|
13304
13509
|
function parseSpecifier(d, specifier, string, j) {
|
|
13305
|
-
var i = 0, n = specifier.length, m = string.length, c2,
|
|
13510
|
+
var i = 0, n = specifier.length, m = string.length, c2, parse2;
|
|
13306
13511
|
while (i < n) {
|
|
13307
13512
|
if (j >= m) return -1;
|
|
13308
13513
|
c2 = specifier.charCodeAt(i++);
|
|
13309
13514
|
if (c2 === 37) {
|
|
13310
13515
|
c2 = specifier.charAt(i++);
|
|
13311
|
-
|
|
13312
|
-
if (!
|
|
13516
|
+
parse2 = parses[c2 in pads ? specifier.charAt(i++) : c2];
|
|
13517
|
+
if (!parse2 || (j = parse2(d, string, j)) < 0) return -1;
|
|
13313
13518
|
} else if (c2 != string.charCodeAt(j++)) {
|
|
13314
13519
|
return -1;
|
|
13315
13520
|
}
|
|
@@ -13682,9 +13887,9 @@ function date(t) {
|
|
|
13682
13887
|
function number3(t) {
|
|
13683
13888
|
return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
|
|
13684
13889
|
}
|
|
13685
|
-
function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2,
|
|
13890
|
+
function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3) {
|
|
13686
13891
|
var scale = continuous(), invert = scale.invert, domain = scale.domain;
|
|
13687
|
-
var formatMillisecond =
|
|
13892
|
+
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");
|
|
13688
13893
|
function tickFormat2(date2) {
|
|
13689
13894
|
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);
|
|
13690
13895
|
}
|
|
@@ -13699,7 +13904,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
|
|
|
13699
13904
|
return ticks2(d[0], d[d.length - 1], interval == null ? 10 : interval);
|
|
13700
13905
|
};
|
|
13701
13906
|
scale.tickFormat = function(count, specifier) {
|
|
13702
|
-
return specifier == null ? tickFormat2 :
|
|
13907
|
+
return specifier == null ? tickFormat2 : format3(specifier);
|
|
13703
13908
|
};
|
|
13704
13909
|
scale.nice = function(interval) {
|
|
13705
13910
|
var d = domain();
|
|
@@ -13707,7 +13912,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
|
|
|
13707
13912
|
return interval ? domain(nice(d, interval)) : scale;
|
|
13708
13913
|
};
|
|
13709
13914
|
scale.copy = function() {
|
|
13710
|
-
return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2,
|
|
13915
|
+
return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3));
|
|
13711
13916
|
};
|
|
13712
13917
|
return scale;
|
|
13713
13918
|
}
|
|
@@ -18448,18 +18653,18 @@ var getTransitionVal = function getTransitionVal2(props, duration, easing) {
|
|
|
18448
18653
|
}).join(",");
|
|
18449
18654
|
};
|
|
18450
18655
|
var isDev2 = process.env.NODE_ENV !== "production";
|
|
18451
|
-
var warn3 = function warn4(condition,
|
|
18656
|
+
var warn3 = function warn4(condition, format3, a2, b, c2, d, e, f) {
|
|
18452
18657
|
if (isDev2 && typeof console !== "undefined" && console.warn) {
|
|
18453
|
-
if (
|
|
18658
|
+
if (format3 === void 0) {
|
|
18454
18659
|
console.warn("LogUtils requires an error message argument");
|
|
18455
18660
|
}
|
|
18456
18661
|
if (!condition) {
|
|
18457
|
-
if (
|
|
18662
|
+
if (format3 === void 0) {
|
|
18458
18663
|
console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
|
|
18459
18664
|
} else {
|
|
18460
18665
|
var args = [a2, b, c2, d, e, f];
|
|
18461
18666
|
var argIndex = 0;
|
|
18462
|
-
console.warn(
|
|
18667
|
+
console.warn(format3.replace(/%s/g, function() {
|
|
18463
18668
|
return args[argIndex++];
|
|
18464
18669
|
}));
|
|
18465
18670
|
}
|
|
@@ -31940,20 +32145,6 @@ function MultiSelect({
|
|
|
31940
32145
|
hint && /* @__PURE__ */ jsx("span", { className: clsx_default("text-sm", invalid ? "text-text-error-primary" : "text-text-tertiary"), children: hint })
|
|
31941
32146
|
] });
|
|
31942
32147
|
}
|
|
31943
|
-
function IconBox({ size = 20, className, children }) {
|
|
31944
|
-
const icon = isValidElement(children) ? cloneElement(children, {
|
|
31945
|
-
viewBox: children.props.viewBox ?? "0 0 24 24",
|
|
31946
|
-
className: clsx_default("w-full h-full", children.props.className)
|
|
31947
|
-
}) : children;
|
|
31948
|
-
return /* @__PURE__ */ jsx(
|
|
31949
|
-
"span",
|
|
31950
|
-
{
|
|
31951
|
-
className: clsx_default("relative flex shrink-0 items-center justify-center", className),
|
|
31952
|
-
style: { width: size, height: size },
|
|
31953
|
-
children: icon
|
|
31954
|
-
}
|
|
31955
|
-
);
|
|
31956
|
-
}
|
|
31957
32148
|
var LayeredAvatar = ({ src, online }) => /* @__PURE__ */ 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: [
|
|
31958
32149
|
/* @__PURE__ */ jsx("span", { className: "flex size-full overflow-hidden rounded-full border-[0.5px] border-[rgba(0,0,0,0.16)]", children: /* @__PURE__ */ jsx("img", { src, alt: "", className: "size-full rounded-full object-cover" }) }),
|
|
31959
32150
|
online !== void 0 && /* @__PURE__ */ jsx(
|
|
@@ -32359,7 +32550,7 @@ function NumberInput({
|
|
|
32359
32550
|
const dec = () => set2(value - step);
|
|
32360
32551
|
const inc = () => set2(value + step);
|
|
32361
32552
|
const Minus = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4.167 10h11.666", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round" }) });
|
|
32362
|
-
const
|
|
32553
|
+
const Plus2 = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M10 4.167v11.666M4.167 10h11.666", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round" }) });
|
|
32363
32554
|
const Chevron5 = ({ up }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", fill: "none", className: clsx_default("size-3", up && "rotate-180"), "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 4.5 6 7.5 9 4.5", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32364
32555
|
const numberEl = /* @__PURE__ */ jsx(
|
|
32365
32556
|
"input",
|
|
@@ -32382,7 +32573,7 @@ function NumberInput({
|
|
|
32382
32573
|
const box = layout === "horizontal" ? /* @__PURE__ */ jsxs("div", { className: clsx_default(boxClasses(destructive), "gap-0 overflow-hidden p-0"), children: [
|
|
32383
32574
|
/* @__PURE__ */ 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 }),
|
|
32384
32575
|
numberEl,
|
|
32385
|
-
/* @__PURE__ */ 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:
|
|
32576
|
+
/* @__PURE__ */ 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 })
|
|
32386
32577
|
] }) : /* @__PURE__ */ jsxs("div", { className: clsx_default(boxClasses(destructive), "gap-0 overflow-hidden p-0"), children: [
|
|
32387
32578
|
numberEl,
|
|
32388
32579
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col self-stretch border-l border-border-primary", children: [
|
|
@@ -32472,8 +32663,8 @@ function PaginationNumberBase({
|
|
|
32472
32663
|
}
|
|
32473
32664
|
);
|
|
32474
32665
|
}
|
|
32475
|
-
var
|
|
32476
|
-
var
|
|
32666
|
+
var ArrowLeft2 = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M15.83 10H4.17M4.17 10l5 5M4.17 10l5-5", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32667
|
+
var ArrowRight2 = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4.17 10h11.66M15.83 10l-5 5M15.83 10l-5-5", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32477
32668
|
function PaginationButtonGroupBase({
|
|
32478
32669
|
cellType = "number",
|
|
32479
32670
|
active = false,
|
|
@@ -32502,11 +32693,11 @@ function PaginationButtonGroupBase({
|
|
|
32502
32693
|
),
|
|
32503
32694
|
...rest,
|
|
32504
32695
|
children: [
|
|
32505
|
-
isLeading && (icon ?? /* @__PURE__ */ jsx(
|
|
32696
|
+
isLeading && (icon ?? /* @__PURE__ */ jsx(ArrowLeft2, {})),
|
|
32506
32697
|
(isLeading || isTrailing) && /* @__PURE__ */ jsx("span", { className: "px-xxs", children: children ?? (isLeading ? "Previous" : "Next") }),
|
|
32507
|
-
isTrailing && (icon ?? /* @__PURE__ */ jsx(
|
|
32698
|
+
isTrailing && (icon ?? /* @__PURE__ */ jsx(ArrowRight2, {})),
|
|
32508
32699
|
isNumber3 && children,
|
|
32509
|
-
isIcon && (icon ?? /* @__PURE__ */ jsx(
|
|
32700
|
+
isIcon && (icon ?? /* @__PURE__ */ jsx(ArrowRight2, {}))
|
|
32510
32701
|
]
|
|
32511
32702
|
}
|
|
32512
32703
|
);
|
|
@@ -34193,6 +34384,6 @@ object-assign/index.js:
|
|
|
34193
34384
|
*)
|
|
34194
34385
|
*/
|
|
34195
34386
|
|
|
34196
|
-
export { ActivityFeed, ActivityGauge, AdvancedFilterBar, Alert, Avatar, AvatarAddButton, AvatarGroup, AvatarLabelGroup, AvatarProfilePhoto, BadgeCloseX, BadgeGroup, BreadcrumbButtonBase, Breadcrumbs, Button, ButtonCloseX, ButtonDestructive, ButtonGroup, ButtonGroupSegment, ButtonUtility, CalendarCell, CalendarCellDayWeekView, CalendarColumnHeader, CalendarDateIcon, CalendarEvent, CalendarEventDayWeekView, CalendarHeader, CalendarRowLabel, CalendarTimemarker, CalendarViewDropdown, CardHeader, CarouselArrow, CarouselImage, Change, ChartLegend, ChartMarker, ChartMini, ChartTooltip, Checkbox, CodeSnippet, CodeSnippetTabs, ColorBadge, CommandBar, CommandBarFooter, CommandBarMenuSection, CommandBarNavigationIcon, CommandDropdownMenuItem, CommandInput, CommandShortcut, ContentDivider, ContentFeatureText, ContentHeading, ContentParagraph, ContentQuote, ContentRule, ContextMenu, DatePickerCell, DatePickerListItem, DatePickerMenu, DropdownAccountListItem, DropdownMenuFooter, DropdownMenuHeader, DropdownMenuItemInsetIcon, DropdownMenuListItem, EmptyState, FeaturedIcon, FeedItemBase, FileUpload, FileUploadBase, FileUploadItemBase, FilterBar, FilterTabs, FiltersDropdownMenu, FiltersSlideoutMenu, HeaderNavigation, HelpIcon2 as HelpIcon, InputField, LeadingInputField, LineAndBarChart, LinkMessage, LoadingIndicator, MediaMessage, MegaInputFieldBase, Message, MessageAction, MessageActionButton, MessageActionPanel, MessageReaction, MessageStatusIcon, MetricItem, Modal, ModalActions, ModalHeader, ModernBadge, MultiSelect, NavAccountCard, NavAccountCardMenuItem, NavButton2 as NavButton, NavFeaturedCard, NavItemBase, NavItemDropdownBase, NavMenuButton, Notification, NumberInput, PageHeader, Pagination, PaginationButtonGroupBase, PaginationCards, PaginationDotGroup, PaginationDotIndicator, PaginationNumberBase, PieChart2 as PieChart, PillBadge, ProgressBar, ProgressCircle, RadarChart2 as RadarChart, Radio, RadioGroup, RadioGroupItem, SectionFooter, SectionHeader, SectionLabel, Select, SelectMenuItem, SidebarNavigation, SlideOutMenuHeader, SlideoutMenu, Slider, SocialButton, StatusIcon, StepBase, StepIconBase, TabButtonBase, TableCell, TableHeaderCell, TableHeaderLabel, Tabs, Tag, TagsInputField, TextEditor, TextEditorToolbar, TextEditorToolbarDivider, TextEditorTooltip, TextareaInputField, Toggle, Tooltip2 as Tooltip, TrailingInputField, TreeView, TreeViewConnector, TreeViewItem, VerificationCodeInput, illustrations_exports as illustrations, useContextMenu, useTextEditor };
|
|
34387
|
+
export { ActivityFeed, ActivityGauge, AdvancedFilterBar, Alert, Avatar, AvatarAddButton, AvatarGroup, AvatarLabelGroup, AvatarProfilePhoto, BadgeCloseX, BadgeGroup, BreadcrumbButtonBase, Breadcrumbs, Button, ButtonCloseX, ButtonDestructive, ButtonGroup, ButtonGroupSegment, ButtonUtility, Calendar, CalendarCell, CalendarCellDayWeekView, CalendarColumnHeader, CalendarDateIcon, CalendarEvent, CalendarEventDayWeekView, CalendarHeader, CalendarRowLabel, CalendarTimemarker, CalendarViewDropdown, CardHeader, CarouselArrow, CarouselImage, Change, ChartLegend, ChartMarker, ChartMini, ChartTooltip, Checkbox, CodeSnippet, CodeSnippetTabs, ColorBadge, CommandBar, CommandBarFooter, CommandBarMenuSection, CommandBarNavigationIcon, CommandDropdownMenuItem, CommandInput, CommandShortcut, ContentDivider, ContentFeatureText, ContentHeading, ContentParagraph, ContentQuote, ContentRule, ContextMenu, DatePickerCell, DatePickerListItem, DatePickerMenu, DropdownAccountListItem, DropdownMenuFooter, DropdownMenuHeader, DropdownMenuItemInsetIcon, DropdownMenuListItem, EmptyState, FeaturedIcon, FeedItemBase, FileUpload, FileUploadBase, FileUploadItemBase, FilterBar, FilterTabs, FiltersDropdownMenu, FiltersSlideoutMenu, HeaderNavigation, HelpIcon2 as HelpIcon, InputField, LeadingInputField, LineAndBarChart, LinkMessage, LoadingIndicator, MediaMessage, MegaInputFieldBase, Message, MessageAction, MessageActionButton, MessageActionPanel, MessageReaction, MessageStatusIcon, MetricItem, Modal, ModalActions, ModalHeader, ModernBadge, MultiSelect, NavAccountCard, NavAccountCardMenuItem, NavButton2 as NavButton, NavFeaturedCard, NavItemBase, NavItemDropdownBase, NavMenuButton, Notification, NumberInput, PageHeader, Pagination, PaginationButtonGroupBase, PaginationCards, PaginationDotGroup, PaginationDotIndicator, PaginationNumberBase, PieChart2 as PieChart, PillBadge, ProgressBar, ProgressCircle, RadarChart2 as RadarChart, Radio, RadioGroup, RadioGroupItem, SectionFooter, SectionHeader, SectionLabel, Select, SelectMenuItem, SidebarNavigation, SlideOutMenuHeader, SlideoutMenu, Slider, SocialButton, StatusIcon, StepBase, StepIconBase, TabButtonBase, TableCell, TableHeaderCell, TableHeaderLabel, Tabs, Tag, TagsInputField, TextEditor, TextEditorToolbar, TextEditorToolbarDivider, TextEditorTooltip, TextareaInputField, Toggle, Tooltip2 as Tooltip, TrailingInputField, TreeView, TreeViewConnector, TreeViewItem, VerificationCodeInput, illustrations_exports as illustrations, useContextMenu, useTextEditor };
|
|
34197
34388
|
//# sourceMappingURL=index.js.map
|
|
34198
34389
|
//# sourceMappingURL=index.js.map
|