@hyphen/hyphen-components 9.0.0 → 9.1.1

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.
@@ -4254,13 +4254,14 @@ var ResponsiveProvider = ({
4254
4254
  };
4255
4255
 
4256
4256
  // src/components/Sidebar/Sidebar.tsx
4257
- import React58, {
4257
+ import React59, {
4258
4258
  useCallback as useCallback4,
4259
4259
  useMemo as useMemo4,
4260
- useState as useState4,
4261
- useEffect as useEffect3,
4260
+ useState as useState5,
4261
+ useEffect as useEffect4,
4262
4262
  forwardRef as forwardRef15
4263
4263
  } from "react";
4264
+ import { useId } from "@radix-ui/react-id";
4264
4265
  import { Slot as Slot3 } from "@radix-ui/react-slot";
4265
4266
  import classNames34 from "classnames";
4266
4267
 
@@ -4285,10 +4286,187 @@ function useIsMobile() {
4285
4286
  }
4286
4287
 
4287
4288
  // src/components/Sidebar/Sidebar.module.scss
4288
- var Sidebar_module_default = { "rail": "rail__OwBtB", "group-data-": "group-data-__af4bi" };
4289
+ var Sidebar_module_default = { "rail": "rail__OwBtB", "group-data-": "group-data-__af4bi", "resizeDescription": "resizeDescription__Ou7UB" };
4290
+
4291
+ // src/components/Sidebar/useSidebarResize.ts
4292
+ import React57, { useEffect as useEffect3, useRef, useState as useState4 } from "react";
4293
+ function useSidebarResize({
4294
+ resizable = false,
4295
+ defaultWidth,
4296
+ minWidth = 256,
4297
+ maxWidth = 960,
4298
+ widthStorageKey,
4299
+ side,
4300
+ isMobile,
4301
+ expanded,
4302
+ rootRef
4303
+ }) {
4304
+ const initialWidth = defaultWidth ?? (side === "left" ? 256 : 384);
4305
+ const [preferredWidth, setPreferredWidth] = useState4(initialWidth);
4306
+ const [containerWidth, setContainerWidth] = useState4(Infinity);
4307
+ const [dragging, setDragging] = useState4(false);
4308
+ const gesture = useRef(null);
4309
+ const suppressClick = useRef(false);
4310
+ const currentWidth = useRef(preferredWidth);
4311
+ const enabled = resizable && !isMobile && expanded;
4312
+ const maximum = Math.max(0, Math.min(maxWidth, containerWidth * (2 / 3)));
4313
+ const minimum = Math.min(Math.max(0, minWidth), maximum);
4314
+ const clamp = (value) => Math.max(minimum, Math.min(maximum, value));
4315
+ const width = clamp(preferredWidth);
4316
+ const [settledWidth, setSettledWidth] = useState4(width);
4317
+ useIsomorphicLayoutEffect(() => {
4318
+ if (!resizable) return;
4319
+ let savedWidth = initialWidth;
4320
+ try {
4321
+ const saved = widthStorageKey && localStorage.getItem(widthStorageKey);
4322
+ if (saved && Number.isFinite(Number(saved)) && Number(saved) > 0) {
4323
+ savedWidth = Number(saved);
4324
+ }
4325
+ } catch {
4326
+ }
4327
+ setPreferredWidth(savedWidth);
4328
+ }, [resizable, initialWidth, widthStorageKey]);
4329
+ useIsomorphicLayoutEffect(() => {
4330
+ if (!resizable || isMobile) return;
4331
+ const container = rootRef.current?.closest("[data-sidebar-provider]");
4332
+ if (!container) return;
4333
+ const measure = () => setContainerWidth(container.getBoundingClientRect().width);
4334
+ measure();
4335
+ if (typeof ResizeObserver === "undefined") {
4336
+ window.addEventListener("resize", measure);
4337
+ return () => window.removeEventListener("resize", measure);
4338
+ }
4339
+ const observer = new ResizeObserver(measure);
4340
+ observer.observe(container);
4341
+ return () => observer.disconnect();
4342
+ }, [resizable, isMobile, rootRef]);
4343
+ useIsomorphicLayoutEffect(() => {
4344
+ if (dragging || width === settledWidth) return;
4345
+ rootRef.current?.getBoundingClientRect();
4346
+ setSettledWidth(width);
4347
+ }, [dragging, width, settledWidth, rootRef]);
4348
+ useEffect3(() => {
4349
+ if (!enabled) {
4350
+ gesture.current = null;
4351
+ setDragging(false);
4352
+ }
4353
+ }, [enabled]);
4354
+ useEffect3(() => {
4355
+ if (!dragging) return;
4356
+ const { cursor, userSelect } = document.body.style;
4357
+ document.body.style.cursor = "col-resize";
4358
+ document.body.style.userSelect = "none";
4359
+ return () => {
4360
+ document.body.style.cursor = cursor;
4361
+ document.body.style.userSelect = userSelect;
4362
+ };
4363
+ }, [dragging]);
4364
+ const update = (next) => {
4365
+ currentWidth.current = clamp(next);
4366
+ setPreferredWidth(currentWidth.current);
4367
+ };
4368
+ const persist = () => {
4369
+ if (!widthStorageKey) return;
4370
+ try {
4371
+ localStorage.setItem(widthStorageKey, String(currentWidth.current));
4372
+ } catch {
4373
+ }
4374
+ };
4375
+ const finish = () => {
4376
+ if (!gesture.current) return;
4377
+ if (gesture.current.moved) persist();
4378
+ gesture.current = null;
4379
+ setDragging(false);
4380
+ };
4381
+ const cancel = () => {
4382
+ if (!gesture.current) return;
4383
+ setPreferredWidth(gesture.current.preferred);
4384
+ gesture.current = null;
4385
+ setDragging(false);
4386
+ };
4387
+ const railProps = {
4388
+ onPointerDown: (event) => {
4389
+ suppressClick.current = false;
4390
+ if (!enabled || event.button !== 0 || gesture.current) return;
4391
+ gesture.current = {
4392
+ id: event.pointerId,
4393
+ x: event.clientX,
4394
+ width,
4395
+ preferred: preferredWidth,
4396
+ moved: false
4397
+ };
4398
+ event.currentTarget.setPointerCapture(event.pointerId);
4399
+ },
4400
+ onPointerMove: (event) => {
4401
+ const start = gesture.current;
4402
+ if (!start || start.id !== event.pointerId) return;
4403
+ const delta = event.clientX - start.x;
4404
+ if (!start.moved && Math.abs(delta) < 4) return;
4405
+ start.moved = true;
4406
+ suppressClick.current = true;
4407
+ setDragging(true);
4408
+ update(start.width + (side === "left" ? delta : -delta));
4409
+ },
4410
+ onPointerUp: (event) => {
4411
+ const start = gesture.current;
4412
+ if (!start || start.id !== event.pointerId) return;
4413
+ if (start.moved) {
4414
+ update(
4415
+ start.width + (side === "left" ? 1 : -1) * (event.clientX - start.x)
4416
+ );
4417
+ }
4418
+ finish();
4419
+ event.currentTarget.releasePointerCapture(event.pointerId);
4420
+ },
4421
+ onPointerCancel: cancel,
4422
+ // Capture can end before pointerup reaches the rail. Keep the last move
4423
+ // instead of treating release as a cancelled drag and restoring its start.
4424
+ onLostPointerCapture: (event) => {
4425
+ if (gesture.current?.id === event.pointerId) finish();
4426
+ },
4427
+ onClickCapture: (event) => {
4428
+ if (suppressClick.current && event.detail !== 0) {
4429
+ event.preventDefault();
4430
+ event.stopPropagation();
4431
+ suppressClick.current = false;
4432
+ }
4433
+ },
4434
+ onKeyDown: (event) => {
4435
+ const modified = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
4436
+ if (!enabled || modified) return;
4437
+ let next;
4438
+ switch (event.key) {
4439
+ case "ArrowLeft":
4440
+ next = width + (side === "left" ? -10 : 10);
4441
+ break;
4442
+ case "ArrowRight":
4443
+ next = width + (side === "left" ? 10 : -10);
4444
+ break;
4445
+ case "Home":
4446
+ next = minimum;
4447
+ break;
4448
+ case "End":
4449
+ next = maximum;
4450
+ break;
4451
+ default:
4452
+ return;
4453
+ }
4454
+ event.preventDefault();
4455
+ update(next);
4456
+ persist();
4457
+ }
4458
+ };
4459
+ return {
4460
+ width,
4461
+ animate: !dragging && width === settledWidth,
4462
+ enabled,
4463
+ railProps
4464
+ };
4465
+ }
4466
+ var SidebarResizeContext = React57.createContext(null);
4289
4467
 
4290
4468
  // src/components/Tooltip/Tooltip.tsx
4291
- import * as React57 from "react";
4469
+ import * as React58 from "react";
4292
4470
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4293
4471
 
4294
4472
  // src/components/Tooltip/Tooltip.module.scss
@@ -4300,7 +4478,7 @@ var TooltipProvider = TooltipPrimitive.Provider;
4300
4478
  var Tooltip = TooltipPrimitive.Root;
4301
4479
  var TooltipTrigger = TooltipPrimitive.Trigger;
4302
4480
  var TooltipPortal = TooltipPrimitive.Portal;
4303
- var TooltipContent = React57.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React57.createElement(
4481
+ var TooltipContent = React58.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React58.createElement(
4304
4482
  TooltipPrimitive.Content,
4305
4483
  {
4306
4484
  ref,
@@ -4321,14 +4499,14 @@ var SIDEBAR_RIGHT_WIDTH = "24rem";
4321
4499
  var SIDEBAR_WIDTH_ICON = "44px";
4322
4500
  var SIDEBAR_KEYBOARD_SHORTCUT_LEFT = "[";
4323
4501
  var SIDEBAR_KEYBOARD_SHORTCUT_RIGHT = "]";
4324
- var SidebarIsMobileContext = React58.createContext(null);
4325
- var SidebarLeftContext = React58.createContext(
4502
+ var SidebarIsMobileContext = React59.createContext(null);
4503
+ var SidebarLeftContext = React59.createContext(
4326
4504
  null
4327
4505
  );
4328
- var SidebarRightContext = React58.createContext(
4506
+ var SidebarRightContext = React59.createContext(
4329
4507
  null
4330
4508
  );
4331
- var SidebarSideContext = React58.createContext("left");
4509
+ var SidebarSideContext = React59.createContext("left");
4332
4510
  var resolveSideValue = (value, side, fallback) => {
4333
4511
  if (typeof value === "boolean") {
4334
4512
  return value;
@@ -4381,14 +4559,14 @@ var useSidebarSideState = ({
4381
4559
  );
4382
4560
  const controlledOpen = resolveControlledOpen(openProp, side);
4383
4561
  const isControlled = typeof controlledOpen === "boolean";
4384
- const [uncontrolledOpen, setUncontrolledOpen] = useState4(
4562
+ const [uncontrolledOpen, setUncontrolledOpen] = useState5(
4385
4563
  controlledOpen ?? initialDefaultOpen
4386
4564
  );
4387
- const [openMobile, setOpenMobile] = useState4(
4565
+ const [openMobile, setOpenMobile] = useState5(
4388
4566
  () => isMobile ? false : controlledOpen ?? initialDefaultOpen
4389
4567
  );
4390
4568
  const open = controlledOpen ?? uncontrolledOpen;
4391
- useEffect3(() => {
4569
+ useEffect4(() => {
4392
4570
  if (isMobile) {
4393
4571
  setOpenMobile(false);
4394
4572
  } else {
@@ -4432,13 +4610,13 @@ var useSidebarSideState = ({
4432
4610
  );
4433
4611
  };
4434
4612
  function useSidebar(sideOverride) {
4435
- const isMobile = React58.useContext(SidebarIsMobileContext);
4613
+ const isMobile = React59.useContext(SidebarIsMobileContext);
4436
4614
  if (typeof isMobile !== "boolean") {
4437
4615
  throw new Error("useSidebar must be used within a SidebarProvider.");
4438
4616
  }
4439
- const contextSide = React58.useContext(SidebarSideContext);
4617
+ const contextSide = React59.useContext(SidebarSideContext);
4440
4618
  const side = sideOverride ?? contextSide;
4441
- const sideContext = React58.useContext(
4619
+ const sideContext = React59.useContext(
4442
4620
  side === "left" ? SidebarLeftContext : SidebarRightContext
4443
4621
  );
4444
4622
  if (!sideContext) {
@@ -4462,9 +4640,9 @@ var SidebarProvider = forwardRef15(
4462
4640
  ...props
4463
4641
  }, ref) => {
4464
4642
  const isMobile = useIsMobile();
4465
- const lastToggledSideRef = React58.useRef("left");
4466
- const leftToggleRef = React58.useRef(null);
4467
- const rightToggleRef = React58.useRef(null);
4643
+ const lastToggledSideRef = React59.useRef("left");
4644
+ const leftToggleRef = React59.useRef(null);
4645
+ const rightToggleRef = React59.useRef(null);
4468
4646
  const leftState = useSidebarSideState({
4469
4647
  side: "left",
4470
4648
  isMobile,
@@ -4483,18 +4661,21 @@ var SidebarProvider = forwardRef15(
4483
4661
  storageKey,
4484
4662
  lastToggledSideRef
4485
4663
  });
4486
- useEffect3(() => {
4664
+ useEffect4(() => {
4487
4665
  leftToggleRef.current = leftState.toggleSidebar;
4488
4666
  }, [leftState.toggleSidebar]);
4489
- useEffect3(() => {
4667
+ useEffect4(() => {
4490
4668
  rightToggleRef.current = rightState.toggleSidebar;
4491
4669
  }, [rightState.toggleSidebar]);
4492
- useEffect3(() => {
4670
+ useEffect4(() => {
4493
4671
  const handleKeyDown = (event) => {
4494
4672
  const target = event.target;
4495
4673
  if (target && (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT" || target.isContentEditable)) {
4496
4674
  return;
4497
4675
  }
4676
+ if (event.metaKey || event.ctrlKey && !event.getModifierState("AltGraph")) {
4677
+ return;
4678
+ }
4498
4679
  const shortcutSide = event.key === SIDEBAR_KEYBOARD_SHORTCUT_LEFT ? "left" : event.key === SIDEBAR_KEYBOARD_SHORTCUT_RIGHT ? "right" : null;
4499
4680
  if (!shortcutSide) {
4500
4681
  return;
@@ -4506,7 +4687,7 @@ var SidebarProvider = forwardRef15(
4506
4687
  window.addEventListener("keydown", handleKeyDown);
4507
4688
  return () => window.removeEventListener("keydown", handleKeyDown);
4508
4689
  }, []);
4509
- return /* @__PURE__ */ React58.createElement(SidebarIsMobileContext.Provider, { value: isMobile }, /* @__PURE__ */ React58.createElement(SidebarLeftContext.Provider, { value: leftState }, /* @__PURE__ */ React58.createElement(SidebarRightContext.Provider, { value: rightState }, /* @__PURE__ */ React58.createElement(TooltipProvider, { delayDuration: 0 }, /* @__PURE__ */ React58.createElement(
4690
+ return /* @__PURE__ */ React59.createElement(SidebarIsMobileContext.Provider, { value: isMobile }, /* @__PURE__ */ React59.createElement(SidebarLeftContext.Provider, { value: leftState }, /* @__PURE__ */ React59.createElement(SidebarRightContext.Provider, { value: rightState }, /* @__PURE__ */ React59.createElement(TooltipProvider, { delayDuration: 0 }, /* @__PURE__ */ React59.createElement(
4510
4691
  "div",
4511
4692
  {
4512
4693
  style: {
@@ -4520,6 +4701,7 @@ var SidebarProvider = forwardRef15(
4520
4701
  className
4521
4702
  ),
4522
4703
  ref,
4704
+ "data-sidebar-provider": "",
4523
4705
  ...props
4524
4706
  },
4525
4707
  children
@@ -4527,23 +4709,54 @@ var SidebarProvider = forwardRef15(
4527
4709
  }
4528
4710
  );
4529
4711
  SidebarProvider.displayName = "SidebarProvider";
4530
- var Sidebar = React58.forwardRef(
4531
- ({ side = "left", collapsible = "offcanvas", className, children, ...props }, ref) => {
4712
+ var Sidebar = React59.forwardRef(
4713
+ ({
4714
+ side = "left",
4715
+ collapsible = "offcanvas",
4716
+ className,
4717
+ children,
4718
+ resizable,
4719
+ defaultWidth,
4720
+ minWidth,
4721
+ maxWidth,
4722
+ widthStorageKey,
4723
+ ...props
4724
+ }, ref) => {
4532
4725
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar(side);
4533
- const sidebarWidth = side === "right" ? SIDEBAR_RIGHT_WIDTH : SIDEBAR_WIDTH;
4726
+ const rootRef = React59.useRef(null);
4727
+ const setRootRef = React59.useCallback(
4728
+ (node) => {
4729
+ rootRef.current = node;
4730
+ if (typeof ref === "function") ref(node);
4731
+ else if (ref) ref.current = node;
4732
+ },
4733
+ [ref]
4734
+ );
4735
+ const resize = useSidebarResize({
4736
+ resizable,
4737
+ defaultWidth,
4738
+ minWidth,
4739
+ maxWidth,
4740
+ widthStorageKey,
4741
+ side,
4742
+ isMobile,
4743
+ expanded: state === "expanded" || collapsible === "none",
4744
+ rootRef
4745
+ });
4746
+ const sidebarWidth = resizable ? `${resize.width}px` : side === "right" ? SIDEBAR_RIGHT_WIDTH : SIDEBAR_WIDTH;
4534
4747
  if (isMobile) {
4535
- return /* @__PURE__ */ React58.createElement(SidebarSideContext.Provider, { value: side }, /* @__PURE__ */ React58.createElement(
4748
+ return /* @__PURE__ */ React59.createElement(SidebarSideContext.Provider, { value: side }, /* @__PURE__ */ React59.createElement(SidebarResizeContext.Provider, { value: resize }, /* @__PURE__ */ React59.createElement(
4536
4749
  Drawer,
4537
4750
  {
4538
4751
  isOpen: openMobile,
4539
4752
  onDismiss: () => setOpenMobile(false),
4540
4753
  placement: side
4541
4754
  },
4542
- /* @__PURE__ */ React58.createElement(Box, { "data-sidebar": "sidebar", "data-mobile": "true", height: "100" }, children)
4543
- ));
4755
+ /* @__PURE__ */ React59.createElement(Box, { "data-sidebar": "sidebar", "data-mobile": "true", height: "100" }, children)
4756
+ )));
4544
4757
  }
4545
4758
  if (collapsible === "none") {
4546
- return /* @__PURE__ */ React58.createElement(SidebarSideContext.Provider, { value: side }, /* @__PURE__ */ React58.createElement(
4759
+ return /* @__PURE__ */ React59.createElement(SidebarSideContext.Provider, { value: side }, /* @__PURE__ */ React59.createElement(SidebarResizeContext.Provider, { value: resize }, /* @__PURE__ */ React59.createElement(
4547
4760
  "div",
4548
4761
  {
4549
4762
  className: classNames34(
@@ -4552,18 +4765,19 @@ var Sidebar = React58.forwardRef(
4552
4765
  ),
4553
4766
  style: {
4554
4767
  "--sidebar-width": sidebarWidth,
4555
- width: "var(--sidebar-width)"
4768
+ width: "var(--sidebar-width)",
4769
+ ...resizable ? { position: "relative", flexShrink: 0 } : {}
4556
4770
  },
4557
- ref,
4771
+ ref: setRootRef,
4558
4772
  ...props
4559
4773
  },
4560
4774
  children
4561
- ));
4775
+ )));
4562
4776
  }
4563
- return /* @__PURE__ */ React58.createElement(SidebarSideContext.Provider, { value: side }, /* @__PURE__ */ React58.createElement(
4777
+ return /* @__PURE__ */ React59.createElement(SidebarSideContext.Provider, { value: side }, /* @__PURE__ */ React59.createElement(SidebarResizeContext.Provider, { value: resize }, /* @__PURE__ */ React59.createElement(
4564
4778
  Box,
4565
4779
  {
4566
- ref,
4780
+ ref: setRootRef,
4567
4781
  background: "primary",
4568
4782
  display: { base: "none", desktop: "block" },
4569
4783
  color: "base",
@@ -4577,13 +4791,13 @@ var Sidebar = React58.forwardRef(
4577
4791
  "data-side": side,
4578
4792
  className: "group"
4579
4793
  },
4580
- /* @__PURE__ */ React58.createElement(
4794
+ /* @__PURE__ */ React59.createElement(
4581
4795
  "div",
4582
4796
  {
4583
4797
  style: {
4584
4798
  animationTimingFunction: "var(--sidebar-transition-timing, linear)",
4585
4799
  transitionTimingFunction: "var(--sidebar-transition-timing, linear)",
4586
- transitionDuration: "var(--sidebar-transition-duration, 200ms)",
4800
+ transitionDuration: resize.animate ? "var(--sidebar-transition-duration, 200ms)" : "0ms",
4587
4801
  animationDuration: "var(--sidebar-transition-duration, 200ms)",
4588
4802
  transitionProperty: "width",
4589
4803
  width: getSidebarWidth(state, collapsible),
@@ -4592,7 +4806,7 @@ var Sidebar = React58.forwardRef(
4592
4806
  className: classNames34("position-relative", className)
4593
4807
  }
4594
4808
  ),
4595
- /* @__PURE__ */ React58.createElement(
4809
+ /* @__PURE__ */ React59.createElement(
4596
4810
  "div",
4597
4811
  {
4598
4812
  className: classNames34(
@@ -4606,7 +4820,7 @@ var Sidebar = React58.forwardRef(
4606
4820
  zIndex: "var(--size-z-index-drawer)",
4607
4821
  animationTimingFunction: "var(--sidebar-transition-timing, linear)",
4608
4822
  transitionTimingFunction: "var(--sidebar-transition-timing, linear)",
4609
- transitionDuration: "var(--sidebar-transition-duration, 200ms)",
4823
+ transitionDuration: resize.animate ? "var(--sidebar-transition-duration, 200ms)" : "0ms",
4610
4824
  animationDuration: "var(--sidebar-transition-duration, 200ms)",
4611
4825
  transitionProperty: "left, right, width",
4612
4826
  width: state === "collapsed" && collapsible === "icon" ? "var(--sidebar-width-icon)" : "var(--sidebar-width)",
@@ -4614,7 +4828,7 @@ var Sidebar = React58.forwardRef(
4614
4828
  },
4615
4829
  ...props
4616
4830
  },
4617
- /* @__PURE__ */ React58.createElement(
4831
+ /* @__PURE__ */ React59.createElement(
4618
4832
  "div",
4619
4833
  {
4620
4834
  "data-sidebar": "sidebar",
@@ -4628,13 +4842,13 @@ var Sidebar = React58.forwardRef(
4628
4842
  children
4629
4843
  )
4630
4844
  )
4631
- ));
4845
+ )));
4632
4846
  }
4633
4847
  );
4634
4848
  Sidebar.displayName = "Sidebar";
4635
- var SidebarTrigger = React58.forwardRef(({ className, onClick, side, iconName = "dock-left", ...props }, ref) => {
4849
+ var SidebarTrigger = React59.forwardRef(({ className, onClick, side, iconName = "dock-left", ...props }, ref) => {
4636
4850
  const { toggleSidebar, side: contextSide } = useSidebar(side);
4637
- return /* @__PURE__ */ React58.createElement(
4851
+ return /* @__PURE__ */ React59.createElement(
4638
4852
  Button,
4639
4853
  {
4640
4854
  ref,
@@ -4659,8 +4873,8 @@ var SidebarTrigger = React58.forwardRef(({ className, onClick, side, iconName =
4659
4873
  );
4660
4874
  });
4661
4875
  SidebarTrigger.displayName = "SidebarTrigger";
4662
- var SidebarInset = React58.forwardRef(({ className, ...props }, ref) => {
4663
- return /* @__PURE__ */ React58.createElement(
4876
+ var SidebarInset = React59.forwardRef(({ className, ...props }, ref) => {
4877
+ return /* @__PURE__ */ React59.createElement(
4664
4878
  "main",
4665
4879
  {
4666
4880
  ref,
@@ -4673,10 +4887,10 @@ var SidebarInset = React58.forwardRef(({ className, ...props }, ref) => {
4673
4887
  );
4674
4888
  });
4675
4889
  SidebarInset.displayName = "SidebarInset";
4676
- var SidebarHeader = React58.forwardRef(({ className, ...props }, ref) => {
4890
+ var SidebarHeader = React59.forwardRef(({ className, ...props }, ref) => {
4677
4891
  const { state } = useSidebar();
4678
4892
  const isCollapsed = state === "collapsed";
4679
- return /* @__PURE__ */ React58.createElement(
4893
+ return /* @__PURE__ */ React59.createElement(
4680
4894
  "div",
4681
4895
  {
4682
4896
  ref,
@@ -4691,8 +4905,8 @@ var SidebarHeader = React58.forwardRef(({ className, ...props }, ref) => {
4691
4905
  );
4692
4906
  });
4693
4907
  SidebarHeader.displayName = "SidebarHeader";
4694
- var SidebarFooter = React58.forwardRef(({ className, ...props }, ref) => {
4695
- return /* @__PURE__ */ React58.createElement(
4908
+ var SidebarFooter = React59.forwardRef(({ className, ...props }, ref) => {
4909
+ return /* @__PURE__ */ React59.createElement(
4696
4910
  "div",
4697
4911
  {
4698
4912
  ref,
@@ -4706,8 +4920,8 @@ var SidebarFooter = React58.forwardRef(({ className, ...props }, ref) => {
4706
4920
  );
4707
4921
  });
4708
4922
  SidebarFooter.displayName = "SidebarFooter";
4709
- var SidebarContent = React58.forwardRef(({ className, ...props }, ref) => {
4710
- return /* @__PURE__ */ React58.createElement(
4923
+ var SidebarContent = React59.forwardRef(({ className, ...props }, ref) => {
4924
+ return /* @__PURE__ */ React59.createElement(
4711
4925
  "div",
4712
4926
  {
4713
4927
  ref,
@@ -4722,7 +4936,7 @@ var SidebarContent = React58.forwardRef(({ className, ...props }, ref) => {
4722
4936
  );
4723
4937
  });
4724
4938
  SidebarContent.displayName = "SidebarContent";
4725
- var SidebarMenu = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React58.createElement(
4939
+ var SidebarMenu = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React59.createElement(
4726
4940
  "ul",
4727
4941
  {
4728
4942
  ref,
@@ -4738,7 +4952,7 @@ var SidebarMenu = React58.forwardRef(({ className, ...props }, ref) => /* @__PUR
4738
4952
  }
4739
4953
  ));
4740
4954
  SidebarMenu.displayName = "SidebarMenu";
4741
- var SidebarMenuItem = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React58.createElement(
4955
+ var SidebarMenuItem = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React59.createElement(
4742
4956
  "li",
4743
4957
  {
4744
4958
  ref,
@@ -4749,11 +4963,11 @@ var SidebarMenuItem = React58.forwardRef(({ className, ...props }, ref) => /* @_
4749
4963
  }
4750
4964
  ));
4751
4965
  SidebarMenuItem.displayName = "SidebarMenuItem";
4752
- var SidebarMenuButton = React58.forwardRef(
4966
+ var SidebarMenuButton = React59.forwardRef(
4753
4967
  ({ asChild = false, isActive = false, tooltip, className, ...props }, ref) => {
4754
4968
  const Comp = asChild ? Slot3 : "button";
4755
4969
  const { isMobile, state, side } = useSidebar();
4756
- const button = /* @__PURE__ */ React58.createElement(
4970
+ const button = /* @__PURE__ */ React59.createElement(
4757
4971
  Comp,
4758
4972
  {
4759
4973
  ref,
@@ -4779,7 +4993,7 @@ var SidebarMenuButton = React58.forwardRef(
4779
4993
  children: tooltip
4780
4994
  };
4781
4995
  }
4782
- return /* @__PURE__ */ React58.createElement(Tooltip, null, /* @__PURE__ */ React58.createElement(TooltipTrigger, { asChild: true }, button), /* @__PURE__ */ React58.createElement(
4996
+ return /* @__PURE__ */ React59.createElement(Tooltip, null, /* @__PURE__ */ React59.createElement(TooltipTrigger, { asChild: true }, button), /* @__PURE__ */ React59.createElement(
4783
4997
  TooltipContent,
4784
4998
  {
4785
4999
  side: side === "right" ? "left" : "right",
@@ -4791,8 +5005,8 @@ var SidebarMenuButton = React58.forwardRef(
4791
5005
  }
4792
5006
  );
4793
5007
  SidebarMenuButton.displayName = "SidebarMenuButton";
4794
- var SidebarGroup = React58.forwardRef(({ className, ...props }, ref) => {
4795
- return /* @__PURE__ */ React58.createElement(
5008
+ var SidebarGroup = React59.forwardRef(({ className, ...props }, ref) => {
5009
+ return /* @__PURE__ */ React59.createElement(
4796
5010
  "div",
4797
5011
  {
4798
5012
  ref,
@@ -4806,8 +5020,8 @@ var SidebarGroup = React58.forwardRef(({ className, ...props }, ref) => {
4806
5020
  );
4807
5021
  });
4808
5022
  SidebarGroup.displayName = "SidebarGroup";
4809
- var SidebarGroupLabel = React58.forwardRef(({ className, ...props }, ref) => {
4810
- return /* @__PURE__ */ React58.createElement(
5023
+ var SidebarGroupLabel = React59.forwardRef(({ className, ...props }, ref) => {
5024
+ return /* @__PURE__ */ React59.createElement(
4811
5025
  "div",
4812
5026
  {
4813
5027
  ref,
@@ -4821,7 +5035,7 @@ var SidebarGroupLabel = React58.forwardRef(({ className, ...props }, ref) => {
4821
5035
  );
4822
5036
  });
4823
5037
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
4824
- var SidebarMenuSub = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React58.createElement(
5038
+ var SidebarMenuSub = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React59.createElement(
4825
5039
  "ul",
4826
5040
  {
4827
5041
  ref,
@@ -4837,11 +5051,11 @@ var SidebarMenuSub = React58.forwardRef(({ className, ...props }, ref) => /* @__
4837
5051
  }
4838
5052
  ));
4839
5053
  SidebarMenuSub.displayName = "SidebarMenuSub";
4840
- var SidebarMenuSubItem = React58.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React58.createElement("li", { ref, ...props }));
5054
+ var SidebarMenuSubItem = React59.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React59.createElement("li", { ref, ...props }));
4841
5055
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
4842
- var SidebarMenuSubButton = React58.forwardRef(({ asChild = false, isActive, className, ...props }, ref) => {
5056
+ var SidebarMenuSubButton = React59.forwardRef(({ asChild = false, isActive, className, ...props }, ref) => {
4843
5057
  const Comp = asChild ? Slot3 : "a";
4844
- return /* @__PURE__ */ React58.createElement(
5058
+ return /* @__PURE__ */ React59.createElement(
4845
5059
  Comp,
4846
5060
  {
4847
5061
  ref,
@@ -4860,9 +5074,9 @@ var SidebarMenuSubButton = React58.forwardRef(({ asChild = false, isActive, clas
4860
5074
  );
4861
5075
  });
4862
5076
  SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
4863
- var SidebarMenuAction = React58.forwardRef(({ className, asChild = false, ...props }, ref) => {
5077
+ var SidebarMenuAction = React59.forwardRef(({ className, asChild = false, ...props }, ref) => {
4864
5078
  const Comp = asChild ? Slot3 : "button";
4865
- return /* @__PURE__ */ React58.createElement(
5079
+ return /* @__PURE__ */ React59.createElement(
4866
5080
  Comp,
4867
5081
  {
4868
5082
  ref,
@@ -4880,25 +5094,30 @@ var SidebarMenuAction = React58.forwardRef(({ className, asChild = false, ...pro
4880
5094
  );
4881
5095
  });
4882
5096
  SidebarMenuAction.displayName = "SidebarMenuAction";
4883
- var SidebarRail = React58.forwardRef(({ className, ...props }, ref) => {
5097
+ var SidebarRail = React59.forwardRef(({ className, ...props }, ref) => {
4884
5098
  const { open, toggleSidebar, side } = useSidebar();
5099
+ const resize = React59.useContext(SidebarResizeContext);
5100
+ const descriptionId = useId();
4885
5101
  const shortcutLabel = side === "left" ? SIDEBAR_KEYBOARD_SHORTCUT_LEFT : SIDEBAR_KEYBOARD_SHORTCUT_RIGHT;
4886
5102
  const caretIcon = open ? side === "right" ? "caret-sm-right" : "caret-sm-left" : side === "right" ? "caret-sm-left" : "caret-sm-right";
4887
- return /* @__PURE__ */ React58.createElement(
5103
+ return /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(
4888
5104
  "button",
4889
5105
  {
4890
5106
  ref,
4891
5107
  "data-sidebar": "rail",
4892
- "aria-label": "Toggle Sidebar",
4893
- tabIndex: -1,
5108
+ "data-resizable": resize?.enabled || void 0,
5109
+ "aria-label": resize?.enabled ? `Resize or toggle ${side} sidebar` : "Toggle Sidebar",
5110
+ "aria-describedby": resize?.enabled ? descriptionId : void 0,
5111
+ tabIndex: resize?.enabled ? 0 : -1,
5112
+ ...resize?.enabled ? resize.railProps : {},
4894
5113
  onClick: toggleSidebar,
4895
- title: `Toggle Sidebar ${shortcutLabel}`,
5114
+ title: resize?.enabled ? `Drag to resize; click to toggle (${shortcutLabel})` : `Toggle Sidebar ${shortcutLabel}`,
4896
5115
  className: classNames34(
4897
5116
  Sidebar_module_default.rail,
4898
5117
  "hover-show-child background-color-transparent display-flex p-top-5xl p-left-xl p-right-0 justify-content-center position-absolute",
4899
5118
  {
4900
- "cursor-w-resize": open && side === "left" || !open && side === "right",
4901
- "cursor-e-resize": !open && side === "left" || open && side === "right"
5119
+ "cursor-w-resize": !resize?.enabled && (open && side === "left" || !open && side === "right"),
5120
+ "cursor-e-resize": !resize?.enabled && (!open && side === "left" || open && side === "right")
4902
5121
  },
4903
5122
  className
4904
5123
  ),
@@ -4907,12 +5126,13 @@ var SidebarRail = React58.forwardRef(({ className, ...props }, ref) => {
4907
5126
  bottom: "20px",
4908
5127
  right: side === "left" ? "-14px" : void 0,
4909
5128
  left: side === "right" ? "-18px" : void 0,
4910
- width: "10px"
5129
+ width: "10px",
5130
+ ...resize?.enabled ? { cursor: "col-resize", touchAction: "none" } : {}
4911
5131
  },
4912
5132
  type: "button",
4913
5133
  ...props
4914
5134
  },
4915
- /* @__PURE__ */ React58.createElement(
5135
+ /* @__PURE__ */ React59.createElement(
4916
5136
  Box,
4917
5137
  {
4918
5138
  radius: "xl",
@@ -4929,18 +5149,18 @@ var SidebarRail = React58.forwardRef(({ className, ...props }, ref) => {
4929
5149
  className: classNames34(
4930
5150
  "hover-child",
4931
5151
  {
4932
- "cursor-w-resize": open && side === "left" || !open && side === "right",
4933
- "cursor-e-resize": !open && side === "left" || open && side === "right"
5152
+ "cursor-w-resize": !resize?.enabled && (open && side === "left" || !open && side === "right"),
5153
+ "cursor-e-resize": !resize?.enabled && (!open && side === "left" || open && side === "right")
4934
5154
  },
4935
5155
  className
4936
5156
  )
4937
5157
  },
4938
- /* @__PURE__ */ React58.createElement(Icon, { name: caretIcon })
5158
+ /* @__PURE__ */ React59.createElement(Icon, { name: caretIcon })
4939
5159
  )
4940
- );
5160
+ ), resize?.enabled && /* @__PURE__ */ React59.createElement("span", { id: descriptionId, className: Sidebar_module_default.resizeDescription }, "Width ", Math.round(resize.width), " pixels. Use left and right arrows to resize, Home for minimum, End for maximum, and Enter or Space to toggle."));
4941
5161
  });
4942
5162
  SidebarRail.displayName = "SidebarRail";
4943
- var SidebarMenuBadge = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React58.createElement(
5163
+ var SidebarMenuBadge = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React59.createElement(
4944
5164
  "div",
4945
5165
  {
4946
5166
  ref,
@@ -4959,28 +5179,28 @@ var SidebarMenuBadge = React58.forwardRef(({ className, ...props }, ref) => /* @
4959
5179
  SidebarMenuBadge.displayName = "SidebarMenuBadge";
4960
5180
 
4961
5181
  // src/components/Table/Table.tsx
4962
- import React64 from "react";
5182
+ import React65 from "react";
4963
5183
  import classNames40 from "classnames";
4964
5184
 
4965
5185
  // src/components/Table/Table.module.scss
4966
5186
  var Table_module_default = { "container": "container__zReWp", "loading-mask": "loading-mask__gwG6j", "scroll-container": "scroll-container__79zJk", "table": "table__ojslm", "auto": "auto__bXEGP", "fixed": "fixed__zPdl3", "borderless": "borderless__AlDGM", "scrollable": "scrollable__HSxT1", "scrollable-x": "scrollable-x__aKmx8", "scrollable-y": "scrollable-y__8nNit", "table-bordered": "table-bordered__oTd6P", "full-height": "full-height__YPJfE" };
4967
5187
 
4968
5188
  // src/components/Table/TableBody/TableBody.tsx
4969
- import React62 from "react";
5189
+ import React63 from "react";
4970
5190
  import classNames38 from "classnames";
4971
5191
 
4972
5192
  // src/components/Table/TableBody/TableBody.module.scss
4973
5193
  var TableBody_module_default = { "table-body": "table-body__cX0OQ", "striped": "striped__1Epqn", "hover": "hover__I3QF4" };
4974
5194
 
4975
5195
  // src/components/Table/common/TableRow/TableRow.tsx
4976
- import React61 from "react";
5196
+ import React62 from "react";
4977
5197
  import classNames37 from "classnames";
4978
5198
 
4979
5199
  // src/components/Table/common/TableRow/TableRow.module.scss
4980
5200
  var TableRow_module_default = { "table-row": "table-row__BdHbx", "hoverable": "hoverable__Bdemq" };
4981
5201
 
4982
5202
  // src/components/Table/TableBody/TableBodyCell/TableBodyCell.tsx
4983
- import React59 from "react";
5203
+ import React60 from "react";
4984
5204
  import classNames35 from "classnames";
4985
5205
 
4986
5206
  // src/components/Table/TableBody/TableBodyCell/TableBodyCell.module.scss
@@ -5013,7 +5233,7 @@ var TableBodyCell = ({
5013
5233
  },
5014
5234
  className
5015
5235
  );
5016
- return /* @__PURE__ */ React59.createElement(
5236
+ return /* @__PURE__ */ React60.createElement(
5017
5237
  Box,
5018
5238
  {
5019
5239
  as: columnIsSticky ? "th" : "td",
@@ -5031,7 +5251,7 @@ var TableBodyCell = ({
5031
5251
  var TableBodyCell_default = TableBodyCell;
5032
5252
 
5033
5253
  // src/components/Table/TableHead/TableHeaderCell/TableHeaderCell.tsx
5034
- import React60 from "react";
5254
+ import React61 from "react";
5035
5255
  import classNames36 from "classnames";
5036
5256
 
5037
5257
  // src/components/Table/TableHead/TableHeaderCell/TableHeaderCell.module.scss
@@ -5058,7 +5278,7 @@ var TableHeaderCell = ({
5058
5278
  const renderIcon = () => {
5059
5279
  const renderArrows = () => {
5060
5280
  if (getSortDirection() === "ascending") {
5061
- return /* @__PURE__ */ React60.createElement(
5281
+ return /* @__PURE__ */ React61.createElement(
5062
5282
  Icon,
5063
5283
  {
5064
5284
  name: "caret-sm-up",
@@ -5067,7 +5287,7 @@ var TableHeaderCell = ({
5067
5287
  );
5068
5288
  }
5069
5289
  if (getSortDirection() === "descending") {
5070
- return /* @__PURE__ */ React60.createElement(
5290
+ return /* @__PURE__ */ React61.createElement(
5071
5291
  Icon,
5072
5292
  {
5073
5293
  name: "caret-sm-down",
@@ -5075,7 +5295,7 @@ var TableHeaderCell = ({
5075
5295
  }
5076
5296
  );
5077
5297
  }
5078
- return /* @__PURE__ */ React60.createElement(
5298
+ return /* @__PURE__ */ React61.createElement(
5079
5299
  Box,
5080
5300
  {
5081
5301
  display: "inline-block",
@@ -5086,7 +5306,7 @@ var TableHeaderCell = ({
5086
5306
  }
5087
5307
  );
5088
5308
  };
5089
- return /* @__PURE__ */ React60.createElement("span", { className: TableHeaderCell_module_default["sort-icon"] }, renderArrows());
5309
+ return /* @__PURE__ */ React61.createElement("span", { className: TableHeaderCell_module_default["sort-icon"] }, renderArrows());
5090
5310
  };
5091
5311
  const handleKeyPress = (event) => {
5092
5312
  if (!onSort || !isSortable) return;
@@ -5118,7 +5338,7 @@ var TableHeaderCell = ({
5118
5338
  },
5119
5339
  className
5120
5340
  );
5121
- return /* @__PURE__ */ React60.createElement(
5341
+ return /* @__PURE__ */ React61.createElement(
5122
5342
  Box,
5123
5343
  {
5124
5344
  as: "th",
@@ -5131,7 +5351,7 @@ var TableHeaderCell = ({
5131
5351
  onKeyDown: handleKeyPress,
5132
5352
  scope: "col"
5133
5353
  },
5134
- /* @__PURE__ */ React60.createElement("div", { className: TableHeaderCell_module_default.heading }, column.heading, isSortable && renderIcon())
5354
+ /* @__PURE__ */ React61.createElement("div", { className: TableHeaderCell_module_default.heading }, column.heading, isSortable && renderIcon())
5135
5355
  );
5136
5356
  };
5137
5357
 
@@ -5164,7 +5384,7 @@ var TableRow = ({
5164
5384
  return true;
5165
5385
  }
5166
5386
  if (Array.isArray(value)) return value.every(isRenderableCell);
5167
- return React61.isValidElement(value);
5387
+ return React62.isValidElement(value);
5168
5388
  };
5169
5389
  const renderCellContent = (column) => {
5170
5390
  if (column.render) {
@@ -5184,8 +5404,8 @@ var TableRow = ({
5184
5404
  }
5185
5405
  return void 0;
5186
5406
  };
5187
- return /* @__PURE__ */ React61.createElement("tr", { className: tableRowClasses }, Object.values(columns).map(
5188
- (column, columnIndex) => isTableHead ? /* @__PURE__ */ React61.createElement(
5407
+ return /* @__PURE__ */ React62.createElement("tr", { className: tableRowClasses }, Object.values(columns).map(
5408
+ (column, columnIndex) => isTableHead ? /* @__PURE__ */ React62.createElement(
5189
5409
  TableHeaderCell,
5190
5410
  {
5191
5411
  column,
@@ -5203,7 +5423,7 @@ var TableRow = ({
5203
5423
  hasStickyHeader,
5204
5424
  sticky: column.sticky
5205
5425
  }
5206
- ) : /* @__PURE__ */ React61.createElement(
5426
+ ) : /* @__PURE__ */ React62.createElement(
5207
5427
  TableBodyCell_default,
5208
5428
  {
5209
5429
  align: column.align || align,
@@ -5250,7 +5470,7 @@ var TableBody = ({
5250
5470
  }
5251
5471
  return `row-index-${rowIndex}`;
5252
5472
  };
5253
- return /* @__PURE__ */ React62.createElement("tbody", { className: tableBodyClasses }, rows.map((row, rowIndex) => /* @__PURE__ */ React62.createElement(
5473
+ return /* @__PURE__ */ React63.createElement("tbody", { className: tableBodyClasses }, rows.map((row, rowIndex) => /* @__PURE__ */ React63.createElement(
5254
5474
  TableRow,
5255
5475
  {
5256
5476
  columns,
@@ -5267,7 +5487,7 @@ var TableBody = ({
5267
5487
  };
5268
5488
 
5269
5489
  // src/components/Table/TableHead/TableHead.tsx
5270
- import React63 from "react";
5490
+ import React64 from "react";
5271
5491
  import classNames39 from "classnames";
5272
5492
  var TableHead = ({
5273
5493
  columns,
@@ -5281,7 +5501,7 @@ var TableHead = ({
5281
5501
  truncateOverflow = false
5282
5502
  }) => {
5283
5503
  const tableHeadClasses = classNames39(className);
5284
- return /* @__PURE__ */ React63.createElement("thead", { className: tableHeadClasses }, /* @__PURE__ */ React63.createElement(
5504
+ return /* @__PURE__ */ React64.createElement("thead", { className: tableHeadClasses }, /* @__PURE__ */ React64.createElement(
5285
5505
  TableRow,
5286
5506
  {
5287
5507
  columns,
@@ -5335,13 +5555,13 @@ var Table = ({
5335
5555
  [Table_module_default.borderless]: isBorderless,
5336
5556
  [Table_module_default.compact]: isCompact
5337
5557
  });
5338
- return /* @__PURE__ */ React64.createElement("div", { className: containerClasses }, isLoading && /* @__PURE__ */ React64.createElement("div", { className: Table_module_default["loading-mask"] }, /* @__PURE__ */ React64.createElement(Spinner, { size: "xl" })), /* @__PURE__ */ React64.createElement(
5558
+ return /* @__PURE__ */ React65.createElement("div", { className: containerClasses }, isLoading && /* @__PURE__ */ React65.createElement("div", { className: Table_module_default["loading-mask"] }, /* @__PURE__ */ React65.createElement(Spinner, { size: "xl" })), /* @__PURE__ */ React65.createElement(
5339
5559
  "div",
5340
5560
  {
5341
5561
  className: scrollContainerClasses,
5342
5562
  "data-testid": "tableContainerDiv-testid"
5343
5563
  },
5344
- /* @__PURE__ */ React64.createElement("table", { className: tableClasses }, /* @__PURE__ */ React64.createElement(
5564
+ /* @__PURE__ */ React65.createElement("table", { className: tableClasses }, /* @__PURE__ */ React65.createElement(
5345
5565
  TableHead,
5346
5566
  {
5347
5567
  columns,
@@ -5353,7 +5573,7 @@ var Table = ({
5353
5573
  truncateOverflow,
5354
5574
  hasStickyHeader
5355
5575
  }
5356
- ), /* @__PURE__ */ React64.createElement(
5576
+ ), /* @__PURE__ */ React65.createElement(
5357
5577
  TableBody,
5358
5578
  {
5359
5579
  rows,
@@ -5372,7 +5592,7 @@ var Table = ({
5372
5592
  };
5373
5593
 
5374
5594
  // src/components/ThemeProvider/ThemeProvider.tsx
5375
- import React65, { createContext as createContext4, useState as useState5, useEffect as useEffect4 } from "react";
5595
+ import React66, { createContext as createContext4, useState as useState6, useEffect as useEffect5 } from "react";
5376
5596
  var initialState = {
5377
5597
  theme: "system",
5378
5598
  setTheme: () => null
@@ -5384,10 +5604,10 @@ function ThemeProvider({
5384
5604
  storageKey = "hyphen-ui-theme",
5385
5605
  ...props
5386
5606
  }) {
5387
- const [theme, setTheme] = useState5(
5607
+ const [theme, setTheme] = useState6(
5388
5608
  () => localStorage.getItem(storageKey) || defaultTheme
5389
5609
  );
5390
- useEffect4(() => {
5610
+ useEffect5(() => {
5391
5611
  const root = window.document.documentElement;
5392
5612
  root.classList.remove("light", "dark");
5393
5613
  if (theme === "system") {
@@ -5406,14 +5626,14 @@ function ThemeProvider({
5406
5626
  },
5407
5627
  isDarkMode
5408
5628
  };
5409
- return /* @__PURE__ */ React65.createElement(ThemeProviderContext.Provider, { ...props, value }, children);
5629
+ return /* @__PURE__ */ React66.createElement(ThemeProviderContext.Provider, { ...props, value }, children);
5410
5630
  }
5411
5631
 
5412
5632
  // src/components/Toast/ToastContainer.tsx
5413
- import React67 from "react";
5633
+ import React68 from "react";
5414
5634
 
5415
5635
  // src/components/Toast/ToastNotification.tsx
5416
- import React66 from "react";
5636
+ import React67 from "react";
5417
5637
  import classNames41 from "classnames";
5418
5638
 
5419
5639
  // src/components/Toast/ToastNotification.module.scss
@@ -5446,12 +5666,12 @@ var renderToastIcon = (toast2) => {
5446
5666
  iconName = "c-warning";
5447
5667
  iconColor = "white";
5448
5668
  }
5449
- const icon = type !== "loading" ? /* @__PURE__ */ React66.createElement(Icon, { name: iconName, color: iconColor }) : /* @__PURE__ */ React66.createElement(Spinner, null);
5450
- return /* @__PURE__ */ React66.createElement(Box, { justifyContent: "center", height: "100" }, icon);
5669
+ const icon = type !== "loading" ? /* @__PURE__ */ React67.createElement(Icon, { name: iconName, color: iconColor }) : /* @__PURE__ */ React67.createElement(Spinner, null);
5670
+ return /* @__PURE__ */ React67.createElement(Box, { justifyContent: "center", height: "100" }, icon);
5451
5671
  };
5452
5672
  var renderDismissIcon = (toast2, onDismiss) => {
5453
5673
  if (!toast2.canDismiss) return;
5454
- return /* @__PURE__ */ React66.createElement(
5674
+ return /* @__PURE__ */ React67.createElement(
5455
5675
  Box,
5456
5676
  {
5457
5677
  as: "button",
@@ -5466,12 +5686,12 @@ var renderDismissIcon = (toast2, onDismiss) => {
5466
5686
  onClick: onDismiss,
5467
5687
  "aria-label": "dismiss notification"
5468
5688
  },
5469
- /* @__PURE__ */ React66.createElement(Icon, { name: "remove" })
5689
+ /* @__PURE__ */ React67.createElement(Icon, { name: "remove" })
5470
5690
  );
5471
5691
  };
5472
- var ToastNotification = React66.memo(
5692
+ var ToastNotification = React67.memo(
5473
5693
  ({ toast: toast2, position = "top-center", style, children, onDismiss }) => {
5474
- const message = /* @__PURE__ */ React66.createElement(
5694
+ const message = /* @__PURE__ */ React67.createElement(
5475
5695
  Box,
5476
5696
  {
5477
5697
  direction: "row",
@@ -5493,7 +5713,7 @@ var ToastNotification = React66.memo(
5493
5713
  [ToastNotification_module_default["toast-error"]]: toast2.type === "error"
5494
5714
  }
5495
5715
  );
5496
- return /* @__PURE__ */ React66.createElement(
5716
+ return /* @__PURE__ */ React67.createElement(
5497
5717
  Box,
5498
5718
  {
5499
5719
  alignItems: "center",
@@ -5510,16 +5730,16 @@ var ToastNotification = React66.memo(
5510
5730
  },
5511
5731
  typeof children === "function" ? children({
5512
5732
  message
5513
- }) : /* @__PURE__ */ React66.createElement(React66.Fragment, null, renderToastIcon(toast2), message, renderDismissIcon(toast2, onDismiss))
5733
+ }) : /* @__PURE__ */ React67.createElement(React67.Fragment, null, renderToastIcon(toast2), message, renderDismissIcon(toast2, onDismiss))
5514
5734
  );
5515
5735
  }
5516
5736
  );
5517
5737
 
5518
5738
  // src/components/Toast/useToasts.ts
5519
- import { useEffect as useEffect6, useMemo as useMemo5 } from "react";
5739
+ import { useEffect as useEffect7, useMemo as useMemo5 } from "react";
5520
5740
 
5521
5741
  // src/components/Toast/Toast.store.ts
5522
- import { useState as useState6, useEffect as useEffect5 } from "react";
5742
+ import { useState as useState7, useEffect as useEffect6 } from "react";
5523
5743
  var TOAST_LIMIT = 20;
5524
5744
  var toastTimeouts = /* @__PURE__ */ new Map();
5525
5745
  var addToDismissedQueue = (toastId) => {
@@ -5655,8 +5875,8 @@ var defaultTimeouts = {
5655
5875
  custom: 4e3
5656
5876
  };
5657
5877
  var useToastStore = (toastOptions = {}) => {
5658
- const [state, setState] = useState6(memoryState);
5659
- useEffect5(() => {
5878
+ const [state, setState] = useState7(memoryState);
5879
+ useEffect6(() => {
5660
5880
  listeners.push(setState);
5661
5881
  return () => {
5662
5882
  const index = listeners.indexOf(setState);
@@ -5743,7 +5963,7 @@ toast.async = function(promise, messages, opts) {
5743
5963
  // src/components/Toast/useToasts.ts
5744
5964
  var useToasts = (toastOptions) => {
5745
5965
  const { toasts, pausedAt } = useToastStore(toastOptions);
5746
- useEffect6(() => {
5966
+ useEffect7(() => {
5747
5967
  if (pausedAt) {
5748
5968
  return;
5749
5969
  }
@@ -5847,7 +6067,7 @@ var renderNotification = (currentToast, children, containerPosition) => {
5847
6067
  if (children) {
5848
6068
  return children(currentToast);
5849
6069
  }
5850
- return /* @__PURE__ */ React67.createElement(
6070
+ return /* @__PURE__ */ React68.createElement(
5851
6071
  ToastNotification,
5852
6072
  {
5853
6073
  toast: currentToast,
@@ -5867,7 +6087,7 @@ var ToastContainer = ({
5867
6087
  ...restProps
5868
6088
  }) => {
5869
6089
  const { toasts, handlers } = useToasts(toastOptions);
5870
- return /* @__PURE__ */ React67.createElement(
6090
+ return /* @__PURE__ */ React68.createElement(
5871
6091
  Box,
5872
6092
  {
5873
6093
  style: {
@@ -5897,7 +6117,7 @@ var ToastContainer = ({
5897
6117
  const ref = t.height ? void 0 : createRectRef((rect) => {
5898
6118
  handlers.updateHeight(t.id, rect.height);
5899
6119
  });
5900
- return /* @__PURE__ */ React67.createElement(
6120
+ return /* @__PURE__ */ React68.createElement(
5901
6121
  Box,
5902
6122
  {
5903
6123
  ref,
@@ -5915,7 +6135,7 @@ var ToastContainer = ({
5915
6135
  };
5916
6136
 
5917
6137
  // src/components/Toggle/Toggle.tsx
5918
- import React68, { forwardRef as forwardRef16 } from "react";
6138
+ import React69, { forwardRef as forwardRef16 } from "react";
5919
6139
  import * as TogglePrimitive from "@radix-ui/react-toggle";
5920
6140
 
5921
6141
  // src/components/Toggle/Toggle.module.scss
@@ -5923,7 +6143,7 @@ var Toggle_module_default = { "item": "item__PrPsJ", "outline": "outline__Lkabh"
5923
6143
 
5924
6144
  // src/components/Toggle/Toggle.tsx
5925
6145
  import classNames42 from "classnames";
5926
- var Toggle = forwardRef16(({ className, variant = "default", children, ...props }, ref) => /* @__PURE__ */ React68.createElement(
6146
+ var Toggle = forwardRef16(({ className, variant = "default", children, ...props }, ref) => /* @__PURE__ */ React69.createElement(
5927
6147
  TogglePrimitive.Root,
5928
6148
  {
5929
6149
  ref,
@@ -5940,12 +6160,12 @@ var Toggle = forwardRef16(({ className, variant = "default", children, ...props
5940
6160
  Toggle.displayName = "Toggle";
5941
6161
 
5942
6162
  // src/hooks/useBreakpoint/useBreakpoint.ts
5943
- import { useState as useState7 } from "react";
6163
+ import { useState as useState8 } from "react";
5944
6164
 
5945
6165
  // src/hooks/useWindowSize/useWindowSize.ts
5946
- import React69 from "react";
6166
+ import React70 from "react";
5947
6167
  var useWindowSize = () => {
5948
- const { innerWidth, innerHeight, outerHeight, outerWidth, isCreated } = React69.useContext(ResponsiveContext);
6168
+ const { innerWidth, innerHeight, outerHeight, outerWidth, isCreated } = React70.useContext(ResponsiveContext);
5949
6169
  if (isCreated) {
5950
6170
  return {
5951
6171
  innerHeight,
@@ -5961,7 +6181,7 @@ var useWindowSize = () => {
5961
6181
  var defaultBreakpoint = { name: "base", minWidth: 0 };
5962
6182
  var useBreakpoint = () => {
5963
6183
  const windowSize = useWindowSize();
5964
- const [breakpoint, setBreakpoint] = useState7({
6184
+ const [breakpoint, setBreakpoint] = useState8({
5965
6185
  ...defaultBreakpoint
5966
6186
  });
5967
6187
  useIsomorphicLayoutEffect(() => {
@@ -5988,7 +6208,7 @@ var useBreakpoint = () => {
5988
6208
  };
5989
6209
 
5990
6210
  // src/hooks/useOpenClose/useOpenClose.tsx
5991
- import { useCallback as useCallback5, useState as useState8 } from "react";
6211
+ import { useCallback as useCallback5, useState as useState9 } from "react";
5992
6212
  var useOpenClose = (props = {}) => {
5993
6213
  const {
5994
6214
  defaultIsOpen,
@@ -6002,7 +6222,7 @@ var useOpenClose = (props = {}) => {
6002
6222
  const closeCallback = useCallback5(() => {
6003
6223
  onCloseProp?.();
6004
6224
  }, [onCloseProp]);
6005
- const [isOpenState, setIsOpen] = useState8(defaultIsOpen || false);
6225
+ const [isOpenState, setIsOpen] = useState9(defaultIsOpen || false);
6006
6226
  const isOpen = isOpenProp !== void 0 ? isOpenProp : isOpenState;
6007
6227
  const isControlled = isOpenProp !== void 0;
6008
6228
  const handleClose = useCallback5(() => {
@@ -6033,9 +6253,9 @@ var useOpenClose = (props = {}) => {
6033
6253
  };
6034
6254
 
6035
6255
  // src/hooks/useTheme/useTheme.ts
6036
- import React70 from "react";
6256
+ import React71 from "react";
6037
6257
  var useTheme = () => {
6038
- const context = React70.useContext(ThemeProviderContext);
6258
+ const context = React71.useContext(ThemeProviderContext);
6039
6259
  if (context === void 0)
6040
6260
  throw new Error(
6041
6261
  "useTheme must be used within a ThemeProvider. Be sure your App is wrapped in ThemeProvider."