@borisj74/bv-ds 0.1.7 → 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.js CHANGED
@@ -1,7 +1,14 @@
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, useCallback, useId, useImperativeHandle } from 'react';
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 { LogOut01, ChevronSelectorVertical, ChevronDown as ChevronDown$1, XClose as XClose$1, Menu02 } from '@borisj74/bv-ds-icons';
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';
8
+ import { useEditor, EditorContent } from '@tiptap/react';
9
+ import { StarterKit } from '@tiptap/starter-kit';
10
+ import { TextAlign } from '@tiptap/extension-text-align';
11
+ import { Placeholder } from '@tiptap/extension-placeholder';
5
12
 
6
13
  var __create = Object.create;
7
14
  var __defProp = Object.defineProperty;
@@ -4863,10 +4870,10 @@ function ActivityFeed({
4863
4870
  }
4864
4871
  );
4865
4872
  }
4866
- function ringGeometry(diameter, stroke, value, opts = {}) {
4873
+ function ringGeometry(diameter, stroke2, value, opts = {}) {
4867
4874
  const { ringIndex = 0, ringGap = 0, arcFraction = 1 } = opts;
4868
4875
  const center = diameter / 2;
4869
- const radius = center - stroke / 2 - ringIndex * (stroke + ringGap);
4876
+ const radius = center - stroke2 / 2 - ringIndex * (stroke2 + ringGap);
4870
4877
  const circumference = 2 * Math.PI * radius;
4871
4878
  const arc = circumference * arcFraction;
4872
4879
  const filled = Math.max(0, Math.min(100, value)) / 100 * arc;
@@ -4874,7 +4881,7 @@ function ringGeometry(diameter, stroke, value, opts = {}) {
4874
4881
  }
4875
4882
  function RingPair({
4876
4883
  geo,
4877
- stroke,
4884
+ stroke: stroke2,
4878
4885
  trackClass = "stroke-utility-neutral-100",
4879
4886
  progressClass,
4880
4887
  progressColor,
@@ -4890,7 +4897,7 @@ function RingPair({
4890
4897
  r: radius,
4891
4898
  fill: "none",
4892
4899
  className: trackClass,
4893
- strokeWidth: stroke,
4900
+ strokeWidth: stroke2,
4894
4901
  strokeDasharray: `${arc} ${circumference}`
4895
4902
  }
4896
4903
  ),
@@ -4903,7 +4910,7 @@ function RingPair({
4903
4910
  fill: "none",
4904
4911
  className: clsx_default(!progressColor && progressClass),
4905
4912
  stroke: progressColor,
4906
- strokeWidth: stroke,
4913
+ strokeWidth: stroke2,
4907
4914
  strokeLinecap: linecap,
4908
4915
  strokeDasharray: `${filled} ${circumference}`
4909
4916
  }
@@ -4935,10 +4942,10 @@ function ActivityGauge({
4935
4942
  legend = "none",
4936
4943
  className
4937
4944
  }) {
4938
- const { diameter, stroke, gap, valueClass } = sizeSpecs[size];
4945
+ const { diameter, stroke: stroke2, gap, valueClass } = sizeSpecs[size];
4939
4946
  const center = diameter / 2;
4940
4947
  const rings = series.map((s2, i) => {
4941
- const geo = ringGeometry(diameter, stroke, s2.value, { ringIndex: i, ringGap: gap });
4948
+ const geo = ringGeometry(diameter, stroke2, s2.value, { ringIndex: i, ringGap: gap });
4942
4949
  const strokeClass = DEFAULT_STROKE_CLASSES[i % DEFAULT_STROKE_CLASSES.length];
4943
4950
  return { radius: geo.radius, circumference: geo.circumference, filled: geo.filled, strokeClass, custom: s2.color };
4944
4951
  });
@@ -4960,7 +4967,7 @@ function ActivityGauge({
4960
4967
  r: r2.radius,
4961
4968
  fill: "none",
4962
4969
  className: TRACK_STROKE_CLASS,
4963
- strokeWidth: stroke
4970
+ strokeWidth: stroke2
4964
4971
  }
4965
4972
  ),
4966
4973
  /* @__PURE__ */ jsx(
@@ -4972,7 +4979,7 @@ function ActivityGauge({
4972
4979
  fill: "none",
4973
4980
  className: clsx_default(!r2.custom && r2.strokeClass),
4974
4981
  stroke: r2.custom,
4975
- strokeWidth: stroke,
4982
+ strokeWidth: stroke2,
4976
4983
  strokeLinecap: "round",
4977
4984
  strokeDasharray: `${r2.filled} ${r2.circumference - r2.filled}`
4978
4985
  }
@@ -6097,6 +6104,91 @@ function ButtonUtility({
6097
6104
  ) : null
6098
6105
  ] });
6099
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
+ }
6100
6192
  var dotClasses = {
6101
6193
  neutral: "bg-utility-neutral-500",
6102
6194
  brand: "bg-utility-brand-500",
@@ -6188,6 +6280,281 @@ function CalendarEvent({
6188
6280
  }
6189
6281
  );
6190
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
+ }
6191
6558
  function PlusIcon2() {
6192
6559
  return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsx(
6193
6560
  "path",
@@ -6325,44 +6692,6 @@ function CalendarCellDayWeekView({
6325
6692
  }
6326
6693
  );
6327
6694
  }
6328
- function CalendarColumnHeader({
6329
- weekday,
6330
- date: date2,
6331
- type,
6332
- current = false,
6333
- orientation = "vertical",
6334
- breakpoint = "desktop",
6335
- className
6336
- }) {
6337
- const state = type ?? (current ? "selected" : "default");
6338
- return /* @__PURE__ */ jsxs(
6339
- "div",
6340
- {
6341
- className: clsx_default(
6342
- "flex items-center justify-center gap-md py-md font-body",
6343
- orientation === "vertical" && "flex-col gap-xs",
6344
- breakpoint === "desktop" && "w-[160px]",
6345
- className
6346
- ),
6347
- children: [
6348
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-text-quaternary", children: weekday }),
6349
- /* @__PURE__ */ jsx(
6350
- "span",
6351
- {
6352
- className: clsx_default(
6353
- "flex items-center justify-center text-xs font-semibold",
6354
- state === "selected" && "size-6 rounded-full bg-bg-brand-solid text-white",
6355
- state === "today" && "border-b-2 border-border-brand pb-xxs text-text-brand-secondary",
6356
- state === "default" && "text-text-secondary"
6357
- ),
6358
- "aria-current": state !== "default" ? "date" : void 0,
6359
- children: date2
6360
- }
6361
- )
6362
- ]
6363
- }
6364
- );
6365
- }
6366
6695
  function CalendarDateIcon({ month, day, className }) {
6367
6696
  return /* @__PURE__ */ jsxs(
6368
6697
  "div",
@@ -6441,39 +6770,6 @@ function CalendarEventDayWeekView({
6441
6770
  }
6442
6771
  );
6443
6772
  }
6444
- function CalendarHeader({
6445
- title,
6446
- range: range6,
6447
- supportingText,
6448
- badge,
6449
- dateIcon,
6450
- actions,
6451
- className
6452
- }) {
6453
- const subtitle = range6 ?? supportingText;
6454
- return /* @__PURE__ */ jsxs(
6455
- "div",
6456
- {
6457
- className: clsx_default(
6458
- "flex flex-wrap items-start justify-between gap-lg font-body",
6459
- className
6460
- ),
6461
- children: [
6462
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-lg", children: [
6463
- dateIcon,
6464
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xxs", children: [
6465
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-md", children: [
6466
- /* @__PURE__ */ jsx("h2", { className: "text-lg font-bold text-text-primary", children: title }),
6467
- badge
6468
- ] }),
6469
- subtitle ? /* @__PURE__ */ jsx("p", { className: "text-sm text-text-tertiary", children: subtitle }) : null
6470
- ] })
6471
- ] }),
6472
- actions ? /* @__PURE__ */ jsx("div", { className: "flex items-center gap-md", children: actions }) : null
6473
- ]
6474
- }
6475
- );
6476
- }
6477
6773
  function CalendarRowLabel({ label, time: time2, className }) {
6478
6774
  return /* @__PURE__ */ jsx(
6479
6775
  "div",
@@ -6507,93 +6803,6 @@ function CalendarTimemarker({
6507
6803
  /* @__PURE__ */ jsx(Line, {})
6508
6804
  ] }) });
6509
6805
  }
6510
- var DEFAULT_OPTIONS = [
6511
- { value: "day", label: "Day view", shortcut: "\u2318D" },
6512
- { value: "week", label: "Week view", shortcut: "\u2318W" },
6513
- { value: "month", label: "Month view", shortcut: "\u2318M" }
6514
- ];
6515
- function Chevron2() {
6516
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsx(
6517
- "path",
6518
- {
6519
- d: "m5 7.5 5 5 5-5",
6520
- stroke: "currentColor",
6521
- strokeWidth: "1.667",
6522
- strokeLinecap: "round",
6523
- strokeLinejoin: "round"
6524
- }
6525
- ) });
6526
- }
6527
- function CalendarViewDropdown({
6528
- value,
6529
- onChange,
6530
- onSelect,
6531
- open: openProp,
6532
- onOpenChange,
6533
- options = DEFAULT_OPTIONS,
6534
- className
6535
- }) {
6536
- const [internalOpen, setInternalOpen] = useState(false);
6537
- const isControlled = openProp !== void 0;
6538
- const open = isControlled ? openProp : internalOpen;
6539
- const setOpen = (next) => {
6540
- if (!isControlled) setInternalOpen(next);
6541
- onOpenChange?.(next);
6542
- };
6543
- const selected = options.find((o) => o.value === value) ?? options[0];
6544
- return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative inline-block font-body", className), children: [
6545
- /* @__PURE__ */ jsxs(
6546
- "button",
6547
- {
6548
- type: "button",
6549
- "aria-haspopup": "listbox",
6550
- "aria-expanded": open,
6551
- onClick: () => setOpen(!open),
6552
- 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",
6553
- children: [
6554
- selected.label,
6555
- /* @__PURE__ */ jsx("span", { className: "text-fg-quaternary", children: /* @__PURE__ */ jsx(Chevron2, {}) })
6556
- ]
6557
- }
6558
- ),
6559
- open ? /* @__PURE__ */ jsx(
6560
- "ul",
6561
- {
6562
- role: "listbox",
6563
- className: "absolute left-0 z-10 mt-xs min-w-[200px] rounded-md border border-border-secondary bg-bg-primary p-xs shadow-lg",
6564
- children: options.map((opt) => {
6565
- const isSelected = opt.value === value;
6566
- return /* @__PURE__ */ jsx("li", { role: "option", "aria-selected": isSelected, children: /* @__PURE__ */ jsxs(
6567
- "button",
6568
- {
6569
- type: "button",
6570
- onClick: () => {
6571
- onChange?.(opt.value);
6572
- onSelect?.(opt.value);
6573
- setOpen(false);
6574
- },
6575
- 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",
6576
- children: [
6577
- /* @__PURE__ */ jsx(
6578
- "span",
6579
- {
6580
- className: clsx_default(
6581
- "flex size-4 shrink-0 items-center justify-center rounded-full border",
6582
- isSelected ? "border-border-brand" : "border-border-primary"
6583
- ),
6584
- children: isSelected ? /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-bg-brand-solid" }) : null
6585
- }
6586
- ),
6587
- /* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: opt.label }),
6588
- opt.shortcut ? /* @__PURE__ */ jsx("span", { className: "text-xs text-text-quaternary", children: opt.shortcut }) : null
6589
- ]
6590
- }
6591
- ) }, opt.value);
6592
- })
6593
- }
6594
- ) : null
6595
- ] });
6596
- }
6597
6806
  function CardHeader({
6598
6807
  title,
6599
6808
  description,
@@ -7680,20 +7889,20 @@ var import_isFunction2 = __toESM(require_isFunction());
7680
7889
 
7681
7890
  // node_modules/recharts/es6/util/LogUtils.js
7682
7891
  var isDev = process.env.NODE_ENV !== "production";
7683
- var warn = function warn2(condition, format2) {
7892
+ var warn = function warn2(condition, format3) {
7684
7893
  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
7685
7894
  args[_key - 2] = arguments[_key];
7686
7895
  }
7687
7896
  if (isDev && typeof console !== "undefined" && console.warn) {
7688
- if (format2 === void 0) {
7897
+ if (format3 === void 0) {
7689
7898
  console.warn("LogUtils requires an error message argument");
7690
7899
  }
7691
7900
  if (!condition) {
7692
- if (format2 === void 0) {
7901
+ if (format3 === void 0) {
7693
7902
  console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
7694
7903
  } else {
7695
7904
  var argIndex = 0;
7696
- console.warn(format2.replace(/%s/g, function() {
7905
+ console.warn(format3.replace(/%s/g, function() {
7697
7906
  return args[argIndex++];
7698
7907
  }));
7699
7908
  }
@@ -10707,7 +10916,7 @@ var DecimalCSS = /* @__PURE__ */ (function() {
10707
10916
  }
10708
10917
  }], [{
10709
10918
  key: "parse",
10710
- value: function parse(str) {
10919
+ value: function parse2(str) {
10711
10920
  var _NUM_SPLIT_REGEX$exec;
10712
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];
10713
10922
  return new DecimalCSS2(parseFloat(numStr), unit2 !== null && unit2 !== void 0 ? unit2 : "");
@@ -11697,10 +11906,10 @@ function color_formatHsl() {
11697
11906
  function color_formatRgb() {
11698
11907
  return this.rgb().formatRgb();
11699
11908
  }
11700
- function color(format2) {
11909
+ function color(format3) {
11701
11910
  var m, l;
11702
- format2 = (format2 + "").trim().toLowerCase();
11703
- return (m = reHex.exec(format2)) ? (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(format2)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format2)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format2)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format2)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format2) ? rgbn(named[format2]) : format2 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
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;
11704
11913
  }
11705
11914
  function rgbn(n) {
11706
11915
  return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
@@ -12252,7 +12461,7 @@ function locale_default(locale3) {
12252
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 : "");
12253
12462
  var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
12254
12463
  precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
12255
- function format2(value) {
12464
+ function format3(value) {
12256
12465
  var valuePrefix = prefix2, valueSuffix = suffix, i, n, c2;
12257
12466
  if (type === "c") {
12258
12467
  valueSuffix = formatType(value) + valueSuffix;
@@ -12295,10 +12504,10 @@ function locale_default(locale3) {
12295
12504
  }
12296
12505
  return numerals(value);
12297
12506
  }
12298
- format2.toString = function() {
12507
+ format3.toString = function() {
12299
12508
  return specifier + "";
12300
12509
  };
12301
- return format2;
12510
+ return format3;
12302
12511
  }
12303
12512
  function formatPrefix2(specifier, value) {
12304
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] });
@@ -12314,7 +12523,7 @@ function locale_default(locale3) {
12314
12523
 
12315
12524
  // node_modules/d3-format/src/defaultLocale.js
12316
12525
  var locale;
12317
- var format;
12526
+ var format2;
12318
12527
  var formatPrefix;
12319
12528
  defaultLocale({
12320
12529
  thousands: ",",
@@ -12323,7 +12532,7 @@ defaultLocale({
12323
12532
  });
12324
12533
  function defaultLocale(definition) {
12325
12534
  locale = locale_default(definition);
12326
- format = locale.format;
12535
+ format2 = locale.format;
12327
12536
  formatPrefix = locale.formatPrefix;
12328
12537
  return locale;
12329
12538
  }
@@ -12368,7 +12577,7 @@ function tickFormat(start, stop, count, specifier) {
12368
12577
  break;
12369
12578
  }
12370
12579
  }
12371
- return format(specifier);
12580
+ return format2(specifier);
12372
12581
  }
12373
12582
 
12374
12583
  // node_modules/d3-scale/src/linear.js
@@ -12547,7 +12756,7 @@ function loggish(transform) {
12547
12756
  if (specifier == null) specifier = base === 10 ? "s" : ",";
12548
12757
  if (typeof specifier !== "function") {
12549
12758
  if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;
12550
- specifier = format(specifier);
12759
+ specifier = format2(specifier);
12551
12760
  }
12552
12761
  if (count === Infinity) return specifier;
12553
12762
  const k2 = Math.max(1, base * count / scale.ticks().length);
@@ -13240,14 +13449,14 @@ function formatLocale(locale3) {
13240
13449
  utcFormats.c = newFormat(locale_dateTime, utcFormats);
13241
13450
  function newFormat(specifier, formats2) {
13242
13451
  return function(date2) {
13243
- var string = [], i = -1, j = 0, n = specifier.length, c2, pad4, format2;
13452
+ var string = [], i = -1, j = 0, n = specifier.length, c2, pad4, format3;
13244
13453
  if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
13245
13454
  while (++i < n) {
13246
13455
  if (specifier.charCodeAt(i) === 37) {
13247
13456
  string.push(specifier.slice(j, i));
13248
13457
  if ((pad4 = pads[c2 = specifier.charAt(++i)]) != null) c2 = specifier.charAt(++i);
13249
13458
  else pad4 = c2 === "e" ? " " : "0";
13250
- if (format2 = formats2[c2]) c2 = format2(date2, pad4);
13459
+ if (format3 = formats2[c2]) c2 = format3(date2, pad4);
13251
13460
  string.push(c2);
13252
13461
  j = i + 1;
13253
13462
  }
@@ -13298,14 +13507,14 @@ function formatLocale(locale3) {
13298
13507
  };
13299
13508
  }
13300
13509
  function parseSpecifier(d, specifier, string, j) {
13301
- var i = 0, n = specifier.length, m = string.length, c2, parse;
13510
+ var i = 0, n = specifier.length, m = string.length, c2, parse2;
13302
13511
  while (i < n) {
13303
13512
  if (j >= m) return -1;
13304
13513
  c2 = specifier.charCodeAt(i++);
13305
13514
  if (c2 === 37) {
13306
13515
  c2 = specifier.charAt(i++);
13307
- parse = parses[c2 in pads ? specifier.charAt(i++) : c2];
13308
- if (!parse || (j = parse(d, string, j)) < 0) return -1;
13516
+ parse2 = parses[c2 in pads ? specifier.charAt(i++) : c2];
13517
+ if (!parse2 || (j = parse2(d, string, j)) < 0) return -1;
13309
13518
  } else if (c2 != string.charCodeAt(j++)) {
13310
13519
  return -1;
13311
13520
  }
@@ -13678,9 +13887,9 @@ function date(t) {
13678
13887
  function number3(t) {
13679
13888
  return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
13680
13889
  }
13681
- function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format2) {
13890
+ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3) {
13682
13891
  var scale = continuous(), invert = scale.invert, domain = scale.domain;
13683
- var formatMillisecond = format2(".%L"), formatSecond = format2(":%S"), formatMinute = format2("%I:%M"), formatHour = format2("%I %p"), formatDay = format2("%a %d"), formatWeek = format2("%b %d"), formatMonth = format2("%B"), formatYear2 = format2("%Y");
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");
13684
13893
  function tickFormat2(date2) {
13685
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);
13686
13895
  }
@@ -13695,7 +13904,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
13695
13904
  return ticks2(d[0], d[d.length - 1], interval == null ? 10 : interval);
13696
13905
  };
13697
13906
  scale.tickFormat = function(count, specifier) {
13698
- return specifier == null ? tickFormat2 : format2(specifier);
13907
+ return specifier == null ? tickFormat2 : format3(specifier);
13699
13908
  };
13700
13909
  scale.nice = function(interval) {
13701
13910
  var d = domain();
@@ -13703,7 +13912,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
13703
13912
  return interval ? domain(nice(d, interval)) : scale;
13704
13913
  };
13705
13914
  scale.copy = function() {
13706
- return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format2));
13915
+ return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3));
13707
13916
  };
13708
13917
  return scale;
13709
13918
  }
@@ -15772,15 +15981,15 @@ var getMainColorOfGraphicItem = function getMainColorOfGraphicItem2(item) {
15772
15981
  var _item$type;
15773
15982
  var _ref = item, displayName = _ref.type.displayName;
15774
15983
  var defaultedProps = (_item$type = item.type) !== null && _item$type !== void 0 && _item$type.defaultProps ? _objectSpread10(_objectSpread10({}, item.type.defaultProps), item.props) : item.props;
15775
- var stroke = defaultedProps.stroke, fill = defaultedProps.fill;
15984
+ var stroke2 = defaultedProps.stroke, fill = defaultedProps.fill;
15776
15985
  var result;
15777
15986
  switch (displayName) {
15778
15987
  case "Line":
15779
- result = stroke;
15988
+ result = stroke2;
15780
15989
  break;
15781
15990
  case "Area":
15782
15991
  case "Radar":
15783
- result = stroke && stroke !== "none" ? stroke : fill;
15992
+ result = stroke2 && stroke2 !== "none" ? stroke2 : fill;
15784
15993
  break;
15785
15994
  default:
15786
15995
  result = fill;
@@ -18444,18 +18653,18 @@ var getTransitionVal = function getTransitionVal2(props, duration, easing) {
18444
18653
  }).join(",");
18445
18654
  };
18446
18655
  var isDev2 = process.env.NODE_ENV !== "production";
18447
- var warn3 = function warn4(condition, format2, a2, b, c2, d, e, f) {
18656
+ var warn3 = function warn4(condition, format3, a2, b, c2, d, e, f) {
18448
18657
  if (isDev2 && typeof console !== "undefined" && console.warn) {
18449
- if (format2 === void 0) {
18658
+ if (format3 === void 0) {
18450
18659
  console.warn("LogUtils requires an error message argument");
18451
18660
  }
18452
18661
  if (!condition) {
18453
- if (format2 === void 0) {
18662
+ if (format3 === void 0) {
18454
18663
  console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
18455
18664
  } else {
18456
18665
  var args = [a2, b, c2, d, e, f];
18457
18666
  var argIndex = 0;
18458
- console.warn(format2.replace(/%s/g, function() {
18667
+ console.warn(format3.replace(/%s/g, function() {
18459
18668
  return args[argIndex++];
18460
18669
  }));
18461
18670
  }
@@ -20290,7 +20499,7 @@ var PolarRadiusAxis = /* @__PURE__ */ (function(_PureComponent) {
20290
20499
  key: "renderTicks",
20291
20500
  value: function renderTicks() {
20292
20501
  var _this = this;
20293
- var _this$props4 = this.props, ticks2 = _this$props4.ticks, tick = _this$props4.tick, angle = _this$props4.angle, tickFormatter = _this$props4.tickFormatter, stroke = _this$props4.stroke, others = _objectWithoutProperties14(_this$props4, _excluded24);
20502
+ var _this$props4 = this.props, ticks2 = _this$props4.ticks, tick = _this$props4.tick, angle = _this$props4.angle, tickFormatter = _this$props4.tickFormatter, stroke2 = _this$props4.stroke, others = _objectWithoutProperties14(_this$props4, _excluded24);
20294
20503
  var textAnchor = this.getTickTextAnchor();
20295
20504
  var axisProps = filterProps(others, false);
20296
20505
  var customTickProps = filterProps(tick, false);
@@ -20301,7 +20510,7 @@ var PolarRadiusAxis = /* @__PURE__ */ (function(_PureComponent) {
20301
20510
  transform: "rotate(".concat(90 - angle, ", ").concat(coord.x, ", ").concat(coord.y, ")")
20302
20511
  }, axisProps), {}, {
20303
20512
  stroke: "none",
20304
- fill: stroke
20513
+ fill: stroke2
20305
20514
  }, customTickProps), {}, {
20306
20515
  index: i
20307
20516
  }, coord), {}, {
@@ -20579,7 +20788,7 @@ var PolarAngleAxis = /* @__PURE__ */ (function(_PureComponent) {
20579
20788
  key: "renderTicks",
20580
20789
  value: function renderTicks() {
20581
20790
  var _this = this;
20582
- var _this$props3 = this.props, ticks2 = _this$props3.ticks, tick = _this$props3.tick, tickLine = _this$props3.tickLine, tickFormatter = _this$props3.tickFormatter, stroke = _this$props3.stroke;
20791
+ var _this$props3 = this.props, ticks2 = _this$props3.ticks, tick = _this$props3.tick, tickLine = _this$props3.tickLine, tickFormatter = _this$props3.tickFormatter, stroke2 = _this$props3.stroke;
20583
20792
  var axisProps = filterProps(this.props, false);
20584
20793
  var customTickProps = filterProps(tick, false);
20585
20794
  var tickLineProps = _objectSpread23(_objectSpread23({}, axisProps), {}, {
@@ -20592,7 +20801,7 @@ var PolarAngleAxis = /* @__PURE__ */ (function(_PureComponent) {
20592
20801
  textAnchor
20593
20802
  }, axisProps), {}, {
20594
20803
  stroke: "none",
20595
- fill: stroke
20804
+ fill: stroke2
20596
20805
  }, customTickProps), {}, {
20597
20806
  index: i,
20598
20807
  payload: entry,
@@ -22526,9 +22735,9 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
22526
22735
  }, {
22527
22736
  key: "renderBackground",
22528
22737
  value: function renderBackground() {
22529
- var _this$props6 = this.props, x2 = _this$props6.x, y2 = _this$props6.y, width = _this$props6.width, height = _this$props6.height, fill = _this$props6.fill, stroke = _this$props6.stroke;
22738
+ var _this$props6 = this.props, x2 = _this$props6.x, y2 = _this$props6.y, width = _this$props6.width, height = _this$props6.height, fill = _this$props6.fill, stroke2 = _this$props6.stroke;
22530
22739
  return /* @__PURE__ */ React28__default.createElement("rect", {
22531
- stroke,
22740
+ stroke: stroke2,
22532
22741
  fill,
22533
22742
  x: x2,
22534
22743
  y: y2,
@@ -22603,7 +22812,7 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
22603
22812
  }, {
22604
22813
  key: "renderSlide",
22605
22814
  value: function renderSlide(startX, endX) {
22606
- var _this$props9 = this.props, y2 = _this$props9.y, height = _this$props9.height, stroke = _this$props9.stroke, travellerWidth = _this$props9.travellerWidth;
22815
+ var _this$props9 = this.props, y2 = _this$props9.y, height = _this$props9.height, stroke2 = _this$props9.stroke, travellerWidth = _this$props9.travellerWidth;
22607
22816
  var x2 = Math.min(startX, endX) + travellerWidth;
22608
22817
  var width = Math.max(Math.abs(endX - startX) - travellerWidth, 0);
22609
22818
  return /* @__PURE__ */ React28__default.createElement("rect", {
@@ -22616,7 +22825,7 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
22616
22825
  cursor: "move"
22617
22826
  },
22618
22827
  stroke: "none",
22619
- fill: stroke,
22828
+ fill: stroke2,
22620
22829
  fillOpacity: 0.2,
22621
22830
  x: x2,
22622
22831
  y: y2,
@@ -22627,12 +22836,12 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
22627
22836
  }, {
22628
22837
  key: "renderText",
22629
22838
  value: function renderText() {
22630
- var _this$props10 = this.props, startIndex = _this$props10.startIndex, endIndex = _this$props10.endIndex, y2 = _this$props10.y, height = _this$props10.height, travellerWidth = _this$props10.travellerWidth, stroke = _this$props10.stroke;
22839
+ var _this$props10 = this.props, startIndex = _this$props10.startIndex, endIndex = _this$props10.endIndex, y2 = _this$props10.y, height = _this$props10.height, travellerWidth = _this$props10.travellerWidth, stroke2 = _this$props10.stroke;
22631
22840
  var _this$state4 = this.state, startX = _this$state4.startX, endX = _this$state4.endX;
22632
22841
  var offset = 5;
22633
22842
  var attrs = {
22634
22843
  pointerEvents: "none",
22635
- fill: stroke
22844
+ fill: stroke2
22636
22845
  };
22637
22846
  return /* @__PURE__ */ React28__default.createElement(Layer, {
22638
22847
  className: "recharts-brush-texts"
@@ -22669,14 +22878,14 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
22669
22878
  }], [{
22670
22879
  key: "renderDefaultTraveller",
22671
22880
  value: function renderDefaultTraveller(props) {
22672
- var x2 = props.x, y2 = props.y, width = props.width, height = props.height, stroke = props.stroke;
22881
+ var x2 = props.x, y2 = props.y, width = props.width, height = props.height, stroke2 = props.stroke;
22673
22882
  var lineY = Math.floor(y2 + height / 2) - 1;
22674
22883
  return /* @__PURE__ */ React28__default.createElement(React28__default.Fragment, null, /* @__PURE__ */ React28__default.createElement("rect", {
22675
22884
  x: x2,
22676
22885
  y: y2,
22677
22886
  width,
22678
22887
  height,
22679
- fill: stroke,
22888
+ fill: stroke2,
22680
22889
  stroke: "none"
22681
22890
  }), /* @__PURE__ */ React28__default.createElement("line", {
22682
22891
  x1: x2 + 1,
@@ -25191,7 +25400,7 @@ var CartesianAxis = /* @__PURE__ */ (function(_Component) {
25191
25400
  */
25192
25401
  function renderTicks(ticks2, fontSize, letterSpacing) {
25193
25402
  var _this2 = this;
25194
- var _this$props6 = this.props, tickLine = _this$props6.tickLine, stroke = _this$props6.stroke, tick = _this$props6.tick, tickFormatter = _this$props6.tickFormatter, unit2 = _this$props6.unit;
25403
+ var _this$props6 = this.props, tickLine = _this$props6.tickLine, stroke2 = _this$props6.stroke, tick = _this$props6.tick, tickFormatter = _this$props6.tickFormatter, unit2 = _this$props6.unit;
25195
25404
  var finalTicks = getTicks(_objectSpread37(_objectSpread37({}, this.props), {}, {
25196
25405
  ticks: ticks2
25197
25406
  }), fontSize, letterSpacing);
@@ -25209,7 +25418,7 @@ var CartesianAxis = /* @__PURE__ */ (function(_Component) {
25209
25418
  verticalAnchor
25210
25419
  }, axisProps), {}, {
25211
25420
  stroke: "none",
25212
- fill: stroke
25421
+ fill: stroke2
25213
25422
  }, customTickProps), tickCoord), {}, {
25214
25423
  index: i,
25215
25424
  payload: entry,
@@ -28901,13 +29110,13 @@ function ChartMini({
28901
29110
  className,
28902
29111
  style
28903
29112
  }) {
28904
- const stroke = resolveColor(color2, trend);
29113
+ const stroke2 = resolveColor(color2, trend);
28905
29114
  return /* @__PURE__ */ jsx("div", { className, style: { width, height, ...style }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsx(LineChart, { data, margin: { top: 4, right: 4, bottom: 4, left: 4 }, children: /* @__PURE__ */ jsx(
28906
29115
  Line2,
28907
29116
  {
28908
29117
  type: "monotone",
28909
29118
  dataKey: "value",
28910
- stroke,
29119
+ stroke: stroke2,
28911
29120
  strokeWidth: 2,
28912
29121
  dot: false,
28913
29122
  isAnimationActive: false
@@ -31080,8 +31289,8 @@ function LoadingIndicator({
31080
31289
  if (variant === "dot-circle") {
31081
31290
  spinner = /* @__PURE__ */ jsx(DotCircle, { px });
31082
31291
  } else {
31083
- const stroke = borderPx[size];
31084
- const r2 = (px - stroke) / 2;
31292
+ const stroke2 = borderPx[size];
31293
+ const r2 = (px - stroke2) / 2;
31085
31294
  const c2 = 2 * Math.PI * r2;
31086
31295
  spinner = /* @__PURE__ */ jsxs(
31087
31296
  "svg",
@@ -31099,7 +31308,7 @@ function LoadingIndicator({
31099
31308
  r: r2,
31100
31309
  fill: "none",
31101
31310
  className: "stroke-bg-quaternary",
31102
- strokeWidth: stroke
31311
+ strokeWidth: stroke2
31103
31312
  }
31104
31313
  ),
31105
31314
  /* @__PURE__ */ jsx(
@@ -31110,7 +31319,7 @@ function LoadingIndicator({
31110
31319
  r: r2,
31111
31320
  fill: "none",
31112
31321
  className: "stroke-fg-brand-primary",
31113
- strokeWidth: stroke,
31322
+ strokeWidth: stroke2,
31114
31323
  strokeDasharray: c2,
31115
31324
  strokeDashoffset: c2 * 0.75,
31116
31325
  strokeLinecap: variant === "line-spinner" ? "round" : "butt"
@@ -31936,20 +32145,6 @@ function MultiSelect({
31936
32145
  hint && /* @__PURE__ */ jsx("span", { className: clsx_default("text-sm", invalid ? "text-text-error-primary" : "text-text-tertiary"), children: hint })
31937
32146
  ] });
31938
32147
  }
31939
- function IconBox({ size = 20, className, children }) {
31940
- const icon = isValidElement(children) ? cloneElement(children, {
31941
- viewBox: children.props.viewBox ?? "0 0 24 24",
31942
- className: clsx_default("w-full h-full", children.props.className)
31943
- }) : children;
31944
- return /* @__PURE__ */ jsx(
31945
- "span",
31946
- {
31947
- className: clsx_default("relative flex shrink-0 items-center justify-center", className),
31948
- style: { width: size, height: size },
31949
- children: icon
31950
- }
31951
- );
31952
- }
31953
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: [
31954
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" }) }),
31955
32150
  online !== void 0 && /* @__PURE__ */ jsx(
@@ -32355,7 +32550,7 @@ function NumberInput({
32355
32550
  const dec = () => set2(value - step);
32356
32551
  const inc = () => set2(value + step);
32357
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" }) });
32358
- const Plus = /* @__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" }) });
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" }) });
32359
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" }) });
32360
32555
  const numberEl = /* @__PURE__ */ jsx(
32361
32556
  "input",
@@ -32378,7 +32573,7 @@ function NumberInput({
32378
32573
  const box = layout === "horizontal" ? /* @__PURE__ */ jsxs("div", { className: clsx_default(boxClasses(destructive), "gap-0 overflow-hidden p-0"), children: [
32379
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 }),
32380
32575
  numberEl,
32381
- /* @__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: Plus })
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 })
32382
32577
  ] }) : /* @__PURE__ */ jsxs("div", { className: clsx_default(boxClasses(destructive), "gap-0 overflow-hidden p-0"), children: [
32383
32578
  numberEl,
32384
32579
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col self-stretch border-l border-border-primary", children: [
@@ -32468,8 +32663,8 @@ function PaginationNumberBase({
32468
32663
  }
32469
32664
  );
32470
32665
  }
32471
- var ArrowLeft = () => /* @__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" }) });
32472
- var ArrowRight = () => /* @__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" }) });
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" }) });
32473
32668
  function PaginationButtonGroupBase({
32474
32669
  cellType = "number",
32475
32670
  active = false,
@@ -32498,11 +32693,11 @@ function PaginationButtonGroupBase({
32498
32693
  ),
32499
32694
  ...rest,
32500
32695
  children: [
32501
- isLeading && (icon ?? /* @__PURE__ */ jsx(ArrowLeft, {})),
32696
+ isLeading && (icon ?? /* @__PURE__ */ jsx(ArrowLeft2, {})),
32502
32697
  (isLeading || isTrailing) && /* @__PURE__ */ jsx("span", { className: "px-xxs", children: children ?? (isLeading ? "Previous" : "Next") }),
32503
- isTrailing && (icon ?? /* @__PURE__ */ jsx(ArrowRight, {})),
32698
+ isTrailing && (icon ?? /* @__PURE__ */ jsx(ArrowRight2, {})),
32504
32699
  isNumber3 && children,
32505
- isIcon && (icon ?? /* @__PURE__ */ jsx(ArrowRight, {}))
32700
+ isIcon && (icon ?? /* @__PURE__ */ jsx(ArrowRight2, {}))
32506
32701
  ]
32507
32702
  }
32508
32703
  );
@@ -32707,22 +32902,22 @@ function ProgressCircle({
32707
32902
  size = "xxs",
32708
32903
  className
32709
32904
  }) {
32710
- const { d, stroke, valueClass, labelClass } = SPECS[size];
32905
+ const { d, stroke: stroke2, valueClass, labelClass } = SPECS[size];
32711
32906
  const isHalf = shape === "half";
32712
- const geo = ringGeometry(d, stroke, value, { arcFraction: isHalf ? 0.5 : 1 });
32907
+ const geo = ringGeometry(d, stroke2, value, { arcFraction: isHalf ? 0.5 : 1 });
32713
32908
  const center = /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center", children: [
32714
32909
  label && /* @__PURE__ */ jsx("span", { className: clsx_default("font-medium text-text-tertiary", labelClass), children: label }),
32715
32910
  /* @__PURE__ */ jsx("span", { className: clsx_default("font-display font-semibold text-text-primary", valueClass), children: valueText ?? `${value}%` })
32716
32911
  ] });
32717
32912
  if (isHalf) {
32718
- const h = geo.center + stroke;
32913
+ const h = geo.center + stroke2;
32719
32914
  return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative", className), style: { width: d, height: h }, children: [
32720
- /* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "absolute left-0 top-0", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(180 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
32915
+ /* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "absolute left-0 top-0", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(180 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke: stroke2, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
32721
32916
  /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-1/2 -translate-x-1/2", children: center })
32722
32917
  ] });
32723
32918
  }
32724
32919
  return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative", className), style: { width: d, height: d }, children: [
32725
- /* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "block", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(-90 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
32920
+ /* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "block", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(-90 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke: stroke2, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
32726
32921
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: center })
32727
32922
  ] });
32728
32923
  }
@@ -33684,6 +33879,137 @@ function TextEditorTooltip({ children, className, ...rest }) {
33684
33879
  }
33685
33880
  );
33686
33881
  }
33882
+ function useTextEditor({
33883
+ placeholder,
33884
+ content,
33885
+ editable = true,
33886
+ onUpdate
33887
+ } = {}) {
33888
+ return useEditor({
33889
+ editable,
33890
+ content: content ?? "",
33891
+ extensions: [
33892
+ StarterKit.configure({ link: { openOnClick: false } }),
33893
+ TextAlign.configure({ types: ["heading", "paragraph"] }),
33894
+ Placeholder.configure({ placeholder: placeholder ?? "" })
33895
+ ],
33896
+ onUpdate: ({ editor }) => onUpdate?.(editor.getHTML())
33897
+ });
33898
+ }
33899
+ var stroke = {
33900
+ fill: "none",
33901
+ stroke: "currentColor",
33902
+ strokeWidth: 2,
33903
+ strokeLinecap: "round",
33904
+ strokeLinejoin: "round"
33905
+ };
33906
+ var ItalicIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M19 4h-9M14 20H5M15 4 9 20" }) });
33907
+ var UnderlineIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M6 4v6a6 6 0 0 0 12 0V4M4 21h16" }) });
33908
+ var StrikeIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M4 12h16M16 7.5A4 3 0 0 0 8 8M8 16.5a4 3 0 0 0 8-.5" }) });
33909
+ var HeadingIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M6 4v16M18 4v16M6 12h12" }) });
33910
+ var BulletListIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01" }) });
33911
+ var OrderedListIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M10 6h10M10 12h10M10 18h10M4 4v4M3 14h2l-2 3h2" }) });
33912
+ var proseClass = clsx_default(
33913
+ "font-body text-sm text-text-primary",
33914
+ "[&_.ProseMirror]:min-h-[80px] [&_.ProseMirror]:outline-none",
33915
+ "[&_.ProseMirror_p]:my-0",
33916
+ "[&_.ProseMirror_ul]:list-disc [&_.ProseMirror_ul]:pl-2xl",
33917
+ "[&_.ProseMirror_ol]:list-decimal [&_.ProseMirror_ol]:pl-2xl",
33918
+ "[&_.ProseMirror_h2]:text-lg [&_.ProseMirror_h2]:font-semibold [&_.ProseMirror_h2]:text-text-primary",
33919
+ "[&_.ProseMirror_a]:text-text-brand-secondary [&_.ProseMirror_a]:underline",
33920
+ // Placeholder (extension adds .is-editor-empty + data-placeholder).
33921
+ "[&_.ProseMirror_p.is-editor-empty:first-child]:before:pointer-events-none",
33922
+ "[&_.ProseMirror_p.is-editor-empty:first-child]:before:float-left",
33923
+ "[&_.ProseMirror_p.is-editor-empty:first-child]:before:h-0",
33924
+ "[&_.ProseMirror_p.is-editor-empty:first-child]:before:text-text-placeholder",
33925
+ "[&_.ProseMirror_p.is-editor-empty:first-child]:before:content-[attr(data-placeholder)]"
33926
+ );
33927
+ function TextEditor({
33928
+ placeholder,
33929
+ content,
33930
+ onUpdate,
33931
+ disabled = false,
33932
+ className
33933
+ }) {
33934
+ const editor = useTextEditor({ placeholder, content, editable: !disabled, onUpdate });
33935
+ useEffect(() => {
33936
+ editor?.setEditable(!disabled);
33937
+ }, [editor, disabled]);
33938
+ const isActive = (name, attrs) => editor?.isActive(name, attrs) ?? false;
33939
+ const setLink = () => {
33940
+ if (!editor) return;
33941
+ const prev = editor.getAttributes("link").href ?? "";
33942
+ const url = window.prompt("Link URL", prev);
33943
+ if (url === null) return;
33944
+ const chain = editor.chain().focus().extendMarkRange("link");
33945
+ if (url === "") chain.unsetLink().run();
33946
+ else chain.setLink({ href: url }).run();
33947
+ };
33948
+ const ToolbarButton = ({
33949
+ label,
33950
+ icon,
33951
+ active,
33952
+ onRun
33953
+ }) => /* @__PURE__ */ jsx(
33954
+ ButtonUtility,
33955
+ {
33956
+ variant: "ghost",
33957
+ label,
33958
+ icon: /* @__PURE__ */ jsx(IconBox, { size: 20, children: icon }),
33959
+ "aria-pressed": active,
33960
+ disabled: disabled || !editor,
33961
+ className: active ? "!bg-bg-secondary !text-fg-secondary" : void 0,
33962
+ onMouseDown: (e) => e.preventDefault(),
33963
+ onClick: onRun
33964
+ }
33965
+ );
33966
+ return /* @__PURE__ */ jsxs(
33967
+ "div",
33968
+ {
33969
+ className: clsx_default(
33970
+ "relative flex flex-col overflow-hidden rounded-xl border border-border-primary bg-bg-primary",
33971
+ "focus-within:ring-2 focus-within:ring-border-brand",
33972
+ disabled && "opacity-60",
33973
+ className
33974
+ ),
33975
+ children: [
33976
+ /* @__PURE__ */ jsxs(TextEditorToolbar, { className: "w-full !rounded-none !border-l-0 !border-r-0 !border-t-0 !shadow-none", children: [
33977
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Bold", icon: /* @__PURE__ */ jsx(Bold01, {}), active: isActive("bold"), onRun: () => editor?.chain().focus().toggleBold().run() }),
33978
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Italic", icon: /* @__PURE__ */ jsx(ItalicIcon, {}), active: isActive("italic"), onRun: () => editor?.chain().focus().toggleItalic().run() }),
33979
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Underline", icon: /* @__PURE__ */ jsx(UnderlineIcon, {}), active: isActive("underline"), onRun: () => editor?.chain().focus().toggleUnderline().run() }),
33980
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Strikethrough", icon: /* @__PURE__ */ jsx(StrikeIcon, {}), active: isActive("strike"), onRun: () => editor?.chain().focus().toggleStrike().run() }),
33981
+ /* @__PURE__ */ jsx(TextEditorToolbarDivider, {}),
33982
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Heading", icon: /* @__PURE__ */ jsx(HeadingIcon, {}), active: isActive("heading", { level: 2 }), onRun: () => editor?.chain().focus().toggleHeading({ level: 2 }).run() }),
33983
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Bullet list", icon: /* @__PURE__ */ jsx(BulletListIcon, {}), active: isActive("bulletList"), onRun: () => editor?.chain().focus().toggleBulletList().run() }),
33984
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Ordered list", icon: /* @__PURE__ */ jsx(OrderedListIcon, {}), active: isActive("orderedList"), onRun: () => editor?.chain().focus().toggleOrderedList().run() }),
33985
+ /* @__PURE__ */ jsx(TextEditorToolbarDivider, {}),
33986
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Align left", icon: /* @__PURE__ */ jsx(AlignLeft, {}), active: editor?.isActive({ textAlign: "left" }) ?? false, onRun: () => editor?.chain().focus().setTextAlign("left").run() }),
33987
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Align center", icon: /* @__PURE__ */ jsx(AlignCenter, {}), active: editor?.isActive({ textAlign: "center" }) ?? false, onRun: () => editor?.chain().focus().setTextAlign("center").run() }),
33988
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Align right", icon: /* @__PURE__ */ jsx(AlignRight, {}), active: editor?.isActive({ textAlign: "right" }) ?? false, onRun: () => editor?.chain().focus().setTextAlign("right").run() }),
33989
+ /* @__PURE__ */ jsx(TextEditorToolbarDivider, {}),
33990
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Link", icon: /* @__PURE__ */ jsx(Link01, {}), active: isActive("link"), onRun: setLink })
33991
+ ] }),
33992
+ /* @__PURE__ */ jsxs("div", { className: "relative min-h-[120px] px-3xl py-2xl", children: [
33993
+ /* @__PURE__ */ jsx(EditorContent, { editor, className: proseClass }),
33994
+ editor?.isActive("link") && /* @__PURE__ */ jsxs(TextEditorTooltip, { className: "absolute right-3xl top-md z-10", children: [
33995
+ /* @__PURE__ */ jsx("span", { className: "max-w-[160px] truncate px-xs text-xs text-text-secondary", children: String(editor.getAttributes("link").href ?? "") }),
33996
+ /* @__PURE__ */ jsx(ButtonUtility, { variant: "ghost", size: "xs", label: "Edit link", icon: /* @__PURE__ */ jsx(IconBox, { size: 16, children: /* @__PURE__ */ jsx(Link01, {}) }), onClick: setLink }),
33997
+ /* @__PURE__ */ jsx(
33998
+ ButtonUtility,
33999
+ {
34000
+ variant: "ghost",
34001
+ size: "xs",
34002
+ label: "Remove link",
34003
+ icon: /* @__PURE__ */ jsx(IconBox, { size: 16, children: /* @__PURE__ */ jsx(XClose$1, {}) }),
34004
+ onClick: () => editor.chain().focus().extendMarkRange("link").unsetLink().run()
34005
+ }
34006
+ )
34007
+ ] })
34008
+ ] })
34009
+ ]
34010
+ }
34011
+ );
34012
+ }
33687
34013
  function TextareaInputField({
33688
34014
  size = "md",
33689
34015
  label,
@@ -34058,6 +34384,6 @@ object-assign/index.js:
34058
34384
  *)
34059
34385
  */
34060
34386
 
34061
- 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, TextEditorToolbar, TextEditorToolbarDivider, TextEditorTooltip, TextareaInputField, Toggle, Tooltip2 as Tooltip, TrailingInputField, TreeView, TreeViewConnector, TreeViewItem, VerificationCodeInput, illustrations_exports as illustrations, useContextMenu };
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 };
34062
34388
  //# sourceMappingURL=index.js.map
34063
34389
  //# sourceMappingURL=index.js.map