@geomak/ui 1.8.0 → 2.0.0

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,7 @@
1
1
  import { colors_default } from './chunk-GKXP6OJJ.js';
2
2
  export { colors_default as COLORS, PALETTE as palette, semanticTokens, vars } from './chunk-GKXP6OJJ.js';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import React9, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, useId } from 'react';
4
+ import React8, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, useId } from 'react';
5
5
  import { createPortal } from 'react-dom';
6
6
  import * as Dialog from '@radix-ui/react-dialog';
7
7
  import { useReducedMotion, AnimatePresence, motion } from 'framer-motion';
@@ -10,6 +10,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
10
10
  import * as Accordion from '@radix-ui/react-accordion';
11
11
  import * as ToggleGroup from '@radix-ui/react-toggle-group';
12
12
  import * as Toast from '@radix-ui/react-toast';
13
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
13
14
  import * as Popover from '@radix-ui/react-popover';
14
15
  import * as SwitchPrimitive from '@radix-ui/react-switch';
15
16
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
@@ -1355,124 +1356,82 @@ function MenuBar({ items }) {
1355
1356
  )
1356
1357
  );
1357
1358
  }
1358
- function ContextMenu({ items, position, visible, onClose }) {
1359
- const contextRef = useRef(null);
1360
- const childMenuRef = useRef(null);
1361
- const [hasArrowUp, setHasArrowUp] = useState(true);
1362
- const [childArrowUp, setChildArrowUp] = useState(false);
1363
- const [hoveredItem, setHoveredItem] = useState(-1);
1364
- const [hoveredChild, setHoveredChild] = useState(-1);
1365
- const [activeChildren, setActiveChildren] = useState([]);
1366
- useEffect(() => {
1367
- const clickAway = ({ target }) => {
1368
- if (contextRef.current && !contextRef.current.contains(target)) {
1369
- if (childMenuRef.current) {
1370
- childMenuRef.current.classList.add("opacity-0");
1371
- childMenuRef.current.style.left = "0px";
1372
- childMenuRef.current.style.top = "0px";
1373
- }
1374
- setActiveChildren([]);
1375
- onClose();
1376
- }
1377
- };
1378
- window.addEventListener("click", clickAway);
1379
- return () => window.removeEventListener("click", clickAway);
1380
- }, [onClose]);
1381
- useEffect(() => {
1382
- const current = contextRef.current;
1383
- const child = childMenuRef.current;
1384
- if (!current || !child) return;
1385
- const { height, width } = current.getBoundingClientRect();
1386
- if (position.y + height >= window.innerHeight) {
1387
- current.style.top = `${position.y - (height - 40)}px`;
1388
- setHasArrowUp(false);
1389
- } else {
1390
- current.style.top = `${position.y}px`;
1391
- setHasArrowUp(true);
1392
- }
1393
- current.style.left = `${position.x}px`;
1394
- child.style.width = `${width}px`;
1395
- child.classList.add("opacity-0");
1396
- }, [position]);
1397
- const onItemClick = (e, item) => {
1398
- if (item.onClick) {
1399
- if (childMenuRef.current) {
1400
- childMenuRef.current.classList.add("opacity-0");
1401
- childMenuRef.current.style.left = "0px";
1402
- childMenuRef.current.style.top = "0px";
1403
- }
1404
- setActiveChildren([]);
1405
- item.onClick(item.path, item.reportType);
1406
- } else if (item.children?.length) {
1407
- const targetBbox = e.target.getBoundingClientRect();
1408
- const childHeight = childMenuRef.current?.getBoundingClientRect().height ?? 0;
1409
- const contextBbox = contextRef.current?.getBoundingClientRect() ?? { y: 0, width: 0};
1410
- const contextWidth = contextBbox.width;
1411
- if (targetBbox.y + childHeight >= window.innerHeight) {
1412
- setChildArrowUp(false);
1413
- if (childMenuRef.current) childMenuRef.current.style.top = `${targetBbox.y - childHeight}px`;
1414
- } else {
1415
- setChildArrowUp(true);
1416
- if (childMenuRef.current)
1417
- childMenuRef.current.style.top = `${targetBbox.y - contextBbox.y + targetBbox.height / 2 - 10}px`;
1418
- }
1419
- setActiveChildren(item.children);
1420
- if (childMenuRef.current) {
1421
- childMenuRef.current.classList.remove("opacity-0");
1422
- childMenuRef.current.style.left = `${Math.round(contextWidth + 10)}px`;
1359
+ function ContextMenu({ items, children }) {
1360
+ return /* @__PURE__ */ jsxs(ContextMenuPrimitive.Root, { children: [
1361
+ /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { asChild: true, children }),
1362
+ /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1363
+ ContextMenuPrimitive.Content,
1364
+ {
1365
+ className: CONTENT_CLASSNAME,
1366
+ collisionPadding: 8,
1367
+ children: items.map((item) => renderItem(item))
1423
1368
  }
1424
- }
1425
- };
1426
- if (!visible) return null;
1427
- return /* @__PURE__ */ jsxs(
1428
- "div",
1369
+ ) })
1370
+ ] });
1371
+ }
1372
+ var CONTENT_CLASSNAME = [
1373
+ // Surface — semantic tokens, both modes covered
1374
+ "min-w-[180px] rounded-lg border border-border bg-surface shadow-lg",
1375
+ "p-1 z-[500000] text-sm text-foreground",
1376
+ // Entry animation matches the Tooltip / Dropdown style
1377
+ "animate-in fade-in-0 zoom-in-95",
1378
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
1379
+ // Outline reset — Radix handles focus internally
1380
+ "focus:outline-none"
1381
+ ].join(" ");
1382
+ var ITEM_CLASSNAME = [
1383
+ "flex items-center justify-between gap-3 rounded-md px-2 py-1.5 cursor-pointer select-none",
1384
+ "transition-colors duration-100",
1385
+ "data-[highlighted]:bg-accent data-[highlighted]:text-accent-fg",
1386
+ "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed data-[disabled]:bg-transparent data-[disabled]:text-foreground-muted",
1387
+ "focus:outline-none"
1388
+ ].join(" ");
1389
+ function renderItem(item) {
1390
+ if (item.children && item.children.length > 0) {
1391
+ return /* @__PURE__ */ jsxs(ContextMenuPrimitive.Sub, { children: [
1392
+ /* @__PURE__ */ jsxs(
1393
+ ContextMenuPrimitive.SubTrigger,
1394
+ {
1395
+ disabled: item.disabled,
1396
+ className: ITEM_CLASSNAME,
1397
+ children: [
1398
+ /* @__PURE__ */ jsx(ContextMenuLabel, { icon: item.icon, value: item.value }),
1399
+ /* @__PURE__ */ jsx(ChevronRight2, {})
1400
+ ]
1401
+ }
1402
+ ),
1403
+ /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1404
+ ContextMenuPrimitive.SubContent,
1405
+ {
1406
+ className: CONTENT_CLASSNAME,
1407
+ sideOffset: 2,
1408
+ alignOffset: -4,
1409
+ collisionPadding: 8,
1410
+ children: item.children.map((sub) => renderItem(sub))
1411
+ }
1412
+ ) })
1413
+ ] }, item.key);
1414
+ }
1415
+ return /* @__PURE__ */ jsx(
1416
+ ContextMenuPrimitive.Item,
1429
1417
  {
1430
- ref: contextRef,
1431
- className: `transition-all duration-150 absolute rounded-lg bg-ice text-prussian-blue z-30 flex ${hasArrowUp && hoveredItem === 0 ? "context-arrow-up context-arrow-hovered" : !hasArrowUp && hoveredItem === items.length - 1 ? "context-arrow-down context-arrow-hovered" : hasArrowUp ? "context-arrow-up" : "context-arrow-down"}`,
1432
- children: [
1433
- /* @__PURE__ */ jsx("ul", { className: "z-50", children: items.map((item, index) => /* @__PURE__ */ jsxs(
1434
- "li",
1435
- {
1436
- onContextMenu: (e) => e.preventDefault(),
1437
- onMouseEnter: () => setHoveredItem(index),
1438
- onMouseLeave: () => setHoveredItem(-1),
1439
- className: `flex items-center justify-between transition-all duration-300 p-2 cursor-pointer hover:bg-ice-dark ${index === 0 ? "rounded-tl-lg rounded-tr-lg" : ""} ${index === items.length - 1 ? "rounded-bl-lg rounded-br-lg" : ""}`,
1440
- onClick: (e) => onItemClick(e, item),
1441
- children: [
1442
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pointer-events-none", children: [
1443
- item.icon,
1444
- item.value
1445
- ] }),
1446
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none", children: item.children && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) })
1447
- ]
1448
- },
1449
- item.key
1450
- )) }),
1451
- /* @__PURE__ */ jsx(
1452
- "div",
1453
- {
1454
- ref: childMenuRef,
1455
- className: `transition-all duration-150 absolute rounded-lg bg-ice text-prussian-blue ${childArrowUp && hoveredChild === 0 ? "context-arrow-up context-arrow-hovered" : !childArrowUp && hoveredChild === activeChildren.length - 1 ? "context-arrow-down context-arrow-hovered" : childArrowUp ? "context-arrow-up" : "context-arrow-down"}`,
1456
- children: /* @__PURE__ */ jsx("ul", { children: activeChildren.map((item, index) => /* @__PURE__ */ jsxs(
1457
- "li",
1458
- {
1459
- className: `flex items-center gap-2 p-2 cursor-pointer transition-all duration-150 hover:bg-ice-dark ${index === 0 ? "rounded-tl-lg rounded-tr-lg" : ""} ${index === activeChildren.length - 1 ? "rounded-bl-lg rounded-br-lg" : ""}`,
1460
- onClick: () => item.onClick?.(item.path, item.reportType),
1461
- onMouseEnter: () => setHoveredChild(index),
1462
- onMouseLeave: () => setHoveredChild(-1),
1463
- children: [
1464
- item.icon,
1465
- item.value
1466
- ]
1467
- },
1468
- index
1469
- )) })
1470
- }
1471
- )
1472
- ]
1473
- }
1418
+ disabled: item.disabled,
1419
+ onSelect: () => item.onClick?.(),
1420
+ className: ITEM_CLASSNAME,
1421
+ children: /* @__PURE__ */ jsx(ContextMenuLabel, { icon: item.icon, value: item.value })
1422
+ },
1423
+ item.key
1474
1424
  );
1475
1425
  }
1426
+ function ContextMenuLabel({ icon, value }) {
1427
+ return /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
1428
+ icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
1429
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: value })
1430
+ ] });
1431
+ }
1432
+ function ChevronRight2() {
1433
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4 flex-shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
1434
+ }
1476
1435
  function Wizard({ children, steps, storageKey = "po_wizard" }) {
1477
1436
  const wizardRef = useRef(null);
1478
1437
  const [activeStep, setActiveStep] = useState(0);
@@ -1539,7 +1498,7 @@ function Wizard({ children, steps, storageKey = "po_wizard" }) {
1539
1498
  children
1540
1499
  ] });
1541
1500
  }
1542
- var SearchInput = React9.forwardRef(function SearchInput2({
1501
+ var SearchInput = React8.forwardRef(function SearchInput2({
1543
1502
  value,
1544
1503
  onChange,
1545
1504
  disabled,
@@ -1854,7 +1813,7 @@ function TableBody({
1854
1813
  return /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => {
1855
1814
  const rowKey = getRowKey(row, i);
1856
1815
  const isExpanded = expanded.has(rowKey);
1857
- return /* @__PURE__ */ jsxs(React9.Fragment, { children: [
1816
+ return /* @__PURE__ */ jsxs(React8.Fragment, { children: [
1858
1817
  /* @__PURE__ */ jsxs(
1859
1818
  "tr",
1860
1819
  {
@@ -2451,7 +2410,7 @@ function ThemeProvider({
2451
2410
  className = "",
2452
2411
  style
2453
2412
  }) {
2454
- const id = React9.useId().replace(/:/g, "");
2413
+ const id = React8.useId().replace(/:/g, "");
2455
2414
  const scopeClass = `geo-th-${id}`;
2456
2415
  const divRef = useRef(null);
2457
2416
  useEffect(() => {
@@ -2650,91 +2609,117 @@ function NumberInput({
2650
2609
  htmlFor,
2651
2610
  name,
2652
2611
  disabled,
2653
- layout,
2612
+ layout = "horizontal",
2654
2613
  errorMessage,
2655
2614
  inputStyle,
2656
2615
  labelStyle,
2657
2616
  placeholder,
2658
- style = {},
2617
+ style,
2659
2618
  min,
2660
2619
  max,
2661
- readOnly = false
2620
+ readOnly = false,
2621
+ precision
2662
2622
  }) {
2623
+ const errorId = useId();
2624
+ const hasError = errorMessage != null;
2625
+ const inferredPrecision = precision ?? (Number.isInteger(step) ? 0 : String(step).split(".")[1]?.length ?? 0);
2626
+ const round = (n) => {
2627
+ if (inferredPrecision === 0) return n;
2628
+ const factor = 10 ** inferredPrecision;
2629
+ return Math.round(n * factor) / factor;
2630
+ };
2631
+ const numeric = typeof value === "number" ? value : 0;
2663
2632
  const onIncrement = () => {
2664
- let newValue = value ? parseFloat(value) + step : 0 + step;
2665
- if (max !== void 0 && newValue > max) return;
2666
- onChange?.({ target: { value: newValue, id: htmlFor, name } });
2633
+ if (disabled || readOnly) return;
2634
+ const next = round(numeric + step);
2635
+ if (max !== void 0 && next > max) return;
2636
+ onChange?.({ target: { value: next, id: htmlFor, name } });
2667
2637
  };
2668
2638
  const onDecrement = () => {
2669
- let newValue = value ? parseFloat(value) - step : 0 - step;
2670
- if (min !== void 0 && newValue < min) return;
2671
- onChange?.({ target: { value: newValue, id: htmlFor, name } });
2639
+ if (disabled || readOnly) return;
2640
+ const next = round(numeric - step);
2641
+ if (min !== void 0 && next < min) return;
2642
+ onChange?.({ target: { value: next, id: htmlFor, name } });
2672
2643
  };
2673
- return /* @__PURE__ */ jsxs("div", { children: [
2674
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between pr-1 pl-1", children: /* @__PURE__ */ jsxs(
2675
- "div",
2676
- {
2677
- className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`,
2678
- children: [
2679
- /* @__PURE__ */ jsx(
2680
- "label",
2681
- {
2682
- className: "text-md font-bold ml-1 w-60 select-none text-prussian-blue dark:text-white",
2683
- style: labelStyle,
2684
- htmlFor,
2685
- children: label
2686
- }
2687
- ),
2688
- /* @__PURE__ */ jsxs(
2689
- "div",
2690
- {
2691
- style,
2692
- className: `${disabled ? "bg-disabled" : "bg-white"} rounded-lg flex items-center pr-1 pl-2 w-max`,
2693
- children: [
2694
- /* @__PURE__ */ jsx(
2695
- "input",
2696
- {
2697
- min,
2698
- max,
2699
- autoComplete: "off",
2700
- disabled,
2701
- name,
2702
- id: htmlFor,
2703
- step,
2704
- value,
2705
- onChange,
2706
- type: "number",
2707
- className: "focus:outline-0 focus-visible:outline-0 h-9 w-60 text-prussian-blue disabled:bg-disabled disabled:cursor-not-allowed transition-all",
2708
- style: inputStyle ?? {},
2709
- placeholder: placeholder ?? "",
2710
- readOnly
2711
- }
2712
- ),
2713
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
2714
- /* @__PURE__ */ jsx(
2715
- "span",
2716
- {
2717
- onClick: onIncrement,
2718
- className: "rotate-180 cursor-pointer transition-all duration-300 hover:bg-ice rounded-sm",
2719
- children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-3 w-3", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })
2720
- }
2721
- ),
2722
- /* @__PURE__ */ jsx(
2723
- "span",
2724
- {
2725
- onClick: onDecrement,
2726
- className: "cursor-pointer transition-all duration-300 hover:bg-ice rounded-sm",
2727
- children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-3 w-3", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })
2728
- }
2729
- )
2730
- ] })
2731
- ]
2732
- }
2733
- )
2734
- ]
2735
- }
2736
- ) }),
2737
- /* @__PURE__ */ jsx("div", { className: "text-center text-error min-h-0", children: errorMessage })
2644
+ const handleInputChange = (e) => {
2645
+ const raw = e.target.value;
2646
+ if (raw === "") {
2647
+ onChange?.({ target: { value: void 0, id: htmlFor, name } });
2648
+ return;
2649
+ }
2650
+ const parsed = Number(raw);
2651
+ if (Number.isNaN(parsed)) return;
2652
+ onChange?.({ target: { value: round(parsed), id: htmlFor, name } });
2653
+ };
2654
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
2655
+ /* @__PURE__ */ jsxs("div", { className: `flex ${layout === "vertical" ? "flex-col gap-1" : "flex-row items-center gap-2"}`, children: [
2656
+ label && /* @__PURE__ */ jsx(
2657
+ "label",
2658
+ {
2659
+ className: "text-sm font-medium ml-1 max-content select-none text-foreground",
2660
+ style: labelStyle,
2661
+ htmlFor,
2662
+ children: label
2663
+ }
2664
+ ),
2665
+ /* @__PURE__ */ jsxs(
2666
+ "div",
2667
+ {
2668
+ style,
2669
+ className: `flex items-center rounded-lg border ${hasError ? "border-status-error" : "border-border"} ${disabled ? "bg-surface-raised text-foreground-muted cursor-not-allowed" : "bg-surface text-foreground"} focus-within:ring-2 focus-within:ring-accent transition-colors`,
2670
+ children: [
2671
+ /* @__PURE__ */ jsx(
2672
+ "input",
2673
+ {
2674
+ min,
2675
+ max,
2676
+ autoComplete: "off",
2677
+ disabled,
2678
+ name,
2679
+ id: htmlFor,
2680
+ step,
2681
+ value: value ?? "",
2682
+ onChange: handleInputChange,
2683
+ type: "number",
2684
+ "aria-invalid": hasError || void 0,
2685
+ "aria-describedby": hasError ? errorId : void 0,
2686
+ className: "bg-transparent focus:outline-none h-9 w-full px-3 disabled:cursor-not-allowed [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
2687
+ style: inputStyle ?? {},
2688
+ placeholder: placeholder ?? "",
2689
+ readOnly
2690
+ }
2691
+ ),
2692
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col border-l border-border h-9", children: [
2693
+ /* @__PURE__ */ jsx(
2694
+ "button",
2695
+ {
2696
+ type: "button",
2697
+ tabIndex: -1,
2698
+ onClick: onIncrement,
2699
+ disabled: disabled || readOnly || max !== void 0 && numeric >= max,
2700
+ "aria-label": "Increase value",
2701
+ className: "flex-1 px-1.5 flex items-center justify-center hover:bg-surface-raised disabled:opacity-30 disabled:cursor-not-allowed transition-colors focus:outline-none focus-visible:bg-surface-raised",
2702
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, className: "h-3 w-3", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 15l7-7 7 7" }) })
2703
+ }
2704
+ ),
2705
+ /* @__PURE__ */ jsx(
2706
+ "button",
2707
+ {
2708
+ type: "button",
2709
+ tabIndex: -1,
2710
+ onClick: onDecrement,
2711
+ disabled: disabled || readOnly || min !== void 0 && numeric <= min,
2712
+ "aria-label": "Decrease value",
2713
+ className: "flex-1 px-1.5 flex items-center justify-center hover:bg-surface-raised disabled:opacity-30 disabled:cursor-not-allowed transition-colors focus:outline-none focus-visible:bg-surface-raised border-t border-border",
2714
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, className: "h-3 w-3", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })
2715
+ }
2716
+ )
2717
+ ] })
2718
+ ]
2719
+ }
2720
+ )
2721
+ ] }),
2722
+ hasError && /* @__PURE__ */ jsx("div", { id: errorId, className: "text-xs text-status-error ml-1", children: errorMessage })
2738
2723
  ] });
2739
2724
  }
2740
2725
  function Password({
@@ -3267,7 +3252,7 @@ function getMonthDays(year, month) {
3267
3252
  }
3268
3253
  return days;
3269
3254
  }
3270
- var ChevronRight2 = ({ color = colors_default.PALETTE["prussian-blue"] }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
3255
+ var ChevronRight3 = ({ color = colors_default.PALETTE["prussian-blue"] }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
3271
3256
  var DoubleChevronRight2 = ({ color = colors_default.PALETTE["prussian-blue"] }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 5l7 7-7 7M5 5l7 7-7 7" }) });
3272
3257
  var ChevronDown2 = ({ color = colors_default.PALETTE["prussian-blue"] }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) });
3273
3258
  function DatePickerBase({
@@ -3382,13 +3367,13 @@ function DatePickerBase({
3382
3367
  children: isExpanded && /* @__PURE__ */ jsxs("div", { className: "pt-3", children: [
3383
3368
  /* @__PURE__ */ jsxs("div", { className: "flex items-center mx-auto w-max", children: [
3384
3369
  /* @__PURE__ */ jsx("span", { onClick: () => setCurrentYear((y) => y - 1), className: "cursor-pointer rotate-180 p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsx(DoubleChevronRight2, {}) }),
3385
- /* @__PURE__ */ jsx("span", { onClick: toPrevMonth, className: "cursor-pointer rotate-180 p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsx(ChevronRight2, {}) }),
3370
+ /* @__PURE__ */ jsx("span", { onClick: toPrevMonth, className: "cursor-pointer rotate-180 p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsx(ChevronRight3, {}) }),
3386
3371
  /* @__PURE__ */ jsxs("span", { className: "font-bold text-prussian-blue select-none w-[130px] text-center", children: [
3387
3372
  currentYear,
3388
3373
  " ",
3389
3374
  MONTHS[currentMonth]
3390
3375
  ] }),
3391
- /* @__PURE__ */ jsx("span", { onClick: toNextMonth, className: "cursor-pointer p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsx(ChevronRight2, {}) }),
3376
+ /* @__PURE__ */ jsx("span", { onClick: toNextMonth, className: "cursor-pointer p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsx(ChevronRight3, {}) }),
3392
3377
  /* @__PURE__ */ jsx("span", { onClick: () => setCurrentYear((y) => y + 1), className: "cursor-pointer p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsx(DoubleChevronRight2, {}) })
3393
3378
  ] }),
3394
3379
  /* @__PURE__ */ jsx("div", { className: "flex gap-3 p-2", children: renderCalendar().map((weekDay, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [