doodleui-react 0.4.0 → 0.5.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
@@ -20,6 +20,15 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
20
20
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
21
21
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
22
22
  import { Command as Command$1, CommandInput as CommandInput$1, CommandList as CommandList$1, CommandEmpty as CommandEmpty$1, CommandGroup as CommandGroup$1, CommandItem as CommandItem$1, CommandSeparator as CommandSeparator$1 } from 'cmdk';
23
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
24
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
25
+ import { OTPInput, OTPInputContext } from 'input-otp';
26
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
27
+ import * as ResizablePrimitive from 'react-resizable-panels';
28
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
29
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
30
+ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
31
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
23
32
 
24
33
  // src/types.ts
25
34
  function toRoughOptions(props) {
@@ -5175,7 +5184,2006 @@ function Combobox({
5175
5184
  ) })
5176
5185
  ] });
5177
5186
  }
5187
+ var Kbd = forwardRef(function Kbd2({
5188
+ children,
5189
+ className,
5190
+ style,
5191
+ roughness,
5192
+ seed,
5193
+ sketchColor,
5194
+ bowing,
5195
+ fillStyle,
5196
+ strokeWidth,
5197
+ animate,
5198
+ ...rest
5199
+ }, ref) {
5200
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5201
+ return /* @__PURE__ */ jsx(
5202
+ SketchBox,
5203
+ {
5204
+ className: cn(className),
5205
+ style: {
5206
+ display: "inline-flex",
5207
+ verticalAlign: "middle",
5208
+ ...style
5209
+ },
5210
+ contentStyle: {
5211
+ padding: "2px 7px",
5212
+ fontSize: 11,
5213
+ fontFamily: doodleUiFontFamily,
5214
+ lineHeight: 1.35,
5215
+ letterSpacing: "0.04em"
5216
+ },
5217
+ fill: SKETCH_COLORS.secondaryFill,
5218
+ fillStyle: fillStyle ?? "hachure",
5219
+ roughness,
5220
+ seed,
5221
+ sketchColor: ink,
5222
+ bowing,
5223
+ strokeWidth: strokeWidth ?? 1.3,
5224
+ animate,
5225
+ ...rest,
5226
+ children: /* @__PURE__ */ jsx(
5227
+ "kbd",
5228
+ {
5229
+ ref,
5230
+ style: {
5231
+ border: "none",
5232
+ background: "transparent",
5233
+ padding: 0,
5234
+ font: "inherit",
5235
+ color: "inherit"
5236
+ },
5237
+ children
5238
+ }
5239
+ )
5240
+ }
5241
+ );
5242
+ });
5243
+ var SPINNER_ARC = "M 12 3 A 9 9 0 1 1 11.5 3";
5244
+ var SIZE_PX = {
5245
+ sm: 18,
5246
+ md: 24,
5247
+ lg: 32
5248
+ };
5249
+ var Spinner = forwardRef(
5250
+ function Spinner2({
5251
+ className,
5252
+ style,
5253
+ size = "md",
5254
+ roughness,
5255
+ seed,
5256
+ sketchColor,
5257
+ bowing,
5258
+ fillStyle,
5259
+ strokeWidth,
5260
+ animate,
5261
+ ...rest
5262
+ }, ref) {
5263
+ const px = SIZE_PX[size];
5264
+ const resolvedSeed = useResolvedSeed(seed);
5265
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5266
+ const shouldSpin = useAnimate(animate);
5267
+ const boxStyle = {
5268
+ position: "relative",
5269
+ width: px,
5270
+ height: px,
5271
+ flexShrink: 0,
5272
+ display: "inline-block",
5273
+ ...style
5274
+ };
5275
+ const arc = /* @__PURE__ */ jsx(
5276
+ RoughSvg,
5277
+ {
5278
+ shape: "path",
5279
+ path: SPINNER_ARC,
5280
+ width: px,
5281
+ height: px,
5282
+ roughness: roughness ?? 1.6,
5283
+ seed: resolvedSeed,
5284
+ sketchColor: ink,
5285
+ bowing: bowing ?? 1.2,
5286
+ fillStyle,
5287
+ strokeWidth: strokeWidth ?? 2,
5288
+ inset: 2
5289
+ }
5290
+ );
5291
+ return /* @__PURE__ */ jsx(
5292
+ "div",
5293
+ {
5294
+ ref,
5295
+ role: "status",
5296
+ "aria-label": "Loading",
5297
+ className: cn(className),
5298
+ style: boxStyle,
5299
+ ...rest,
5300
+ children: shouldSpin ? /* @__PURE__ */ jsx(
5301
+ motion.div,
5302
+ {
5303
+ style: { position: "absolute", inset: 0 },
5304
+ animate: { rotate: 360 },
5305
+ transition: {
5306
+ duration: 0.9,
5307
+ ease: "linear",
5308
+ repeat: Infinity
5309
+ },
5310
+ children: arc
5311
+ }
5312
+ ) : arc
5313
+ }
5314
+ );
5315
+ }
5316
+ );
5317
+ var SIZE_STYLES2 = {
5318
+ sm: { fontSize: 13, padding: "4px 10px", minHeight: 30 },
5319
+ md: { fontSize: 15, padding: "7px 14px", minHeight: 38 },
5320
+ lg: { fontSize: 17, padding: "10px 18px", minHeight: 46 }
5321
+ };
5322
+ var Toggle = forwardRef(
5323
+ function Toggle2({
5324
+ className,
5325
+ style,
5326
+ size = "md",
5327
+ roughness,
5328
+ seed,
5329
+ sketchColor,
5330
+ bowing,
5331
+ fillStyle,
5332
+ strokeWidth,
5333
+ pressed,
5334
+ defaultPressed,
5335
+ onPressedChange,
5336
+ disabled,
5337
+ animate,
5338
+ children,
5339
+ ...rest
5340
+ }, ref) {
5341
+ const rootRef = useRef(null);
5342
+ const [uncontrolled, setUncontrolled] = useState(defaultPressed === true);
5343
+ const isPressed = pressed ?? uncontrolled;
5344
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5345
+ const resolvedSeed = useResolvedSeed(seed);
5346
+ const shouldAnimate = useAnimate(animate);
5347
+ const pressSeed = deriveSeed(resolvedSeed, isPressed ? "on" : "off");
5348
+ const sketchSeed = shouldAnimate ? pressSeed : resolvedSeed;
5349
+ useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
5350
+ return /* @__PURE__ */ jsxs(
5351
+ TogglePrimitive.Root,
5352
+ {
5353
+ ref: (node) => {
5354
+ rootRef.current = node;
5355
+ assignRef(ref, node);
5356
+ },
5357
+ pressed,
5358
+ defaultPressed,
5359
+ onPressedChange: (next) => {
5360
+ setUncontrolled(next);
5361
+ onPressedChange?.(next);
5362
+ },
5363
+ disabled,
5364
+ className: cn(className),
5365
+ style: {
5366
+ position: "relative",
5367
+ display: "inline-flex",
5368
+ alignItems: "center",
5369
+ justifyContent: "center",
5370
+ border: "none",
5371
+ background: "transparent",
5372
+ cursor: disabled ? "not-allowed" : "pointer",
5373
+ color: ink,
5374
+ fontFamily: doodleUiFontFamily,
5375
+ fontWeight: doodleUiFontWeight(600),
5376
+ opacity: disabled ? 0.45 : 1,
5377
+ outline: "none",
5378
+ ...SIZE_STYLES2[size],
5379
+ ...style
5380
+ },
5381
+ ...rest,
5382
+ children: [
5383
+ /* @__PURE__ */ jsx(
5384
+ RoughSvg,
5385
+ {
5386
+ shape: "rectangle",
5387
+ roughness,
5388
+ seed: sketchSeed,
5389
+ sketchColor: isPressed ? SKETCH_COLORS.accent : ink,
5390
+ bowing,
5391
+ fillStyle: fillStyle ?? "hachure",
5392
+ fill: isPressed ? SKETCH_COLORS.accentFill : void 0,
5393
+ strokeWidth: strokeWidth ?? 1.6
5394
+ }
5395
+ ),
5396
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1 }, children })
5397
+ ]
5398
+ }
5399
+ );
5400
+ }
5401
+ );
5402
+ var ToggleGroupSketchContext = createContext(null);
5403
+ function useToggleGroupSketch() {
5404
+ const ctx = useContext(ToggleGroupSketchContext);
5405
+ if (!ctx) {
5406
+ throw new Error("ToggleGroupItem must be used inside <ToggleGroup>.");
5407
+ }
5408
+ return ctx;
5409
+ }
5410
+ function ToggleGroup(props) {
5411
+ const {
5412
+ children,
5413
+ roughness,
5414
+ seed,
5415
+ sketchColor,
5416
+ bowing,
5417
+ fillStyle,
5418
+ strokeWidth,
5419
+ size = "md",
5420
+ animate,
5421
+ type = "single",
5422
+ ...rest
5423
+ } = props;
5424
+ const resolvedSeed = useResolvedSeed(seed);
5425
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5426
+ const rootStyle = { display: "inline-flex", gap: 6, flexWrap: "wrap" };
5427
+ return /* @__PURE__ */ jsx(
5428
+ ToggleGroupSketchContext.Provider,
5429
+ {
5430
+ value: {
5431
+ roughness,
5432
+ seed: resolvedSeed,
5433
+ sketchColor,
5434
+ bowing,
5435
+ fillStyle,
5436
+ strokeWidth,
5437
+ resolvedSeed,
5438
+ ink,
5439
+ animate,
5440
+ size
5441
+ },
5442
+ children: type === "multiple" ? /* @__PURE__ */ jsx(
5443
+ ToggleGroupPrimitive.Root,
5444
+ {
5445
+ type: "multiple",
5446
+ style: rootStyle,
5447
+ ...rest,
5448
+ children
5449
+ }
5450
+ ) : /* @__PURE__ */ jsx(
5451
+ ToggleGroupPrimitive.Root,
5452
+ {
5453
+ type: "single",
5454
+ style: rootStyle,
5455
+ ...rest,
5456
+ children
5457
+ }
5458
+ )
5459
+ }
5460
+ );
5461
+ }
5462
+ var ITEM_SIZE = {
5463
+ sm: { fontSize: 13, padding: "4px 10px", minHeight: 30 },
5464
+ md: { fontSize: 15, padding: "7px 14px", minHeight: 38 },
5465
+ lg: { fontSize: 17, padding: "10px 18px", minHeight: 46 }
5466
+ };
5467
+ var ToggleGroupItem = forwardRef(function ToggleGroupItem2({ className, style, children, value, disabled, ...rest }, ref) {
5468
+ const sketch = useToggleGroupSketch();
5469
+ const rootRef = useRef(null);
5470
+ const [pressed, setPressed] = useState(false);
5471
+ const shouldAnimate = useAnimate(sketch.animate);
5472
+ const pressSeed = deriveSeed(
5473
+ sketch.resolvedSeed,
5474
+ `${value}-${pressed ? "on" : "off"}`
5475
+ );
5476
+ const sketchSeed = shouldAnimate ? pressSeed : sketch.resolvedSeed;
5477
+ useLayoutEffect(() => {
5478
+ const el = rootRef.current;
5479
+ if (!el) return;
5480
+ const sync = () => setPressed(el.getAttribute("data-state") === "on");
5481
+ sync();
5482
+ const obs = new MutationObserver(sync);
5483
+ obs.observe(el, { attributes: true, attributeFilter: ["data-state"] });
5484
+ return () => obs.disconnect();
5485
+ }, [value]);
5486
+ useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
5487
+ return /* @__PURE__ */ jsxs(
5488
+ ToggleGroupPrimitive.Item,
5489
+ {
5490
+ ref: (node) => {
5491
+ rootRef.current = node;
5492
+ assignRef(ref, node);
5493
+ },
5494
+ value,
5495
+ disabled,
5496
+ className: cn(className),
5497
+ style: {
5498
+ position: "relative",
5499
+ display: "inline-flex",
5500
+ alignItems: "center",
5501
+ justifyContent: "center",
5502
+ border: "none",
5503
+ background: "transparent",
5504
+ cursor: disabled ? "not-allowed" : "pointer",
5505
+ color: sketch.ink,
5506
+ fontFamily: doodleUiFontFamily,
5507
+ fontWeight: doodleUiFontWeight(600),
5508
+ opacity: disabled ? 0.45 : 1,
5509
+ outline: "none",
5510
+ ...ITEM_SIZE[sketch.size],
5511
+ ...style
5512
+ },
5513
+ ...rest,
5514
+ children: [
5515
+ /* @__PURE__ */ jsx(
5516
+ RoughSvg,
5517
+ {
5518
+ shape: "rectangle",
5519
+ roughness: sketch.roughness,
5520
+ seed: sketchSeed,
5521
+ sketchColor: pressed ? SKETCH_COLORS.accent : sketch.ink,
5522
+ bowing: sketch.bowing,
5523
+ fillStyle: sketch.fillStyle ?? "hachure",
5524
+ fill: pressed ? SKETCH_COLORS.accentFill : void 0,
5525
+ strokeWidth: sketch.strokeWidth ?? 1.6
5526
+ }
5527
+ ),
5528
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1 }, children })
5529
+ ]
5530
+ }
5531
+ );
5532
+ });
5533
+ var InputGroupSketchContext = createContext(null);
5534
+ function useInputGroupSketch() {
5535
+ const ctx = useContext(InputGroupSketchContext);
5536
+ if (!ctx) {
5537
+ throw new Error("InputGroup parts must be used inside <InputGroup>.");
5538
+ }
5539
+ return ctx;
5540
+ }
5541
+ function InputGroup({
5542
+ children,
5543
+ className,
5544
+ style,
5545
+ roughness,
5546
+ seed,
5547
+ sketchColor,
5548
+ bowing,
5549
+ fillStyle,
5550
+ strokeWidth,
5551
+ animate,
5552
+ onFocus,
5553
+ onBlur,
5554
+ ...rest
5555
+ }) {
5556
+ const resolvedSeed = useResolvedSeed(seed);
5557
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5558
+ const [focused, setFocused] = useState(false);
5559
+ const shouldAnimate = useAnimate(animate);
5560
+ const focusSeed = deriveSeed(resolvedSeed, "focus");
5561
+ const sketchSeed = shouldAnimate && focused ? focusSeed : resolvedSeed;
5562
+ return /* @__PURE__ */ jsx(
5563
+ InputGroupSketchContext.Provider,
5564
+ {
5565
+ value: {
5566
+ roughness,
5567
+ seed: resolvedSeed,
5568
+ sketchColor,
5569
+ bowing,
5570
+ fillStyle,
5571
+ strokeWidth,
5572
+ resolvedSeed,
5573
+ ink,
5574
+ animate,
5575
+ focused,
5576
+ setFocused
5577
+ },
5578
+ children: /* @__PURE__ */ jsx(
5579
+ "div",
5580
+ {
5581
+ className: cn(className),
5582
+ style: { position: "relative", width: "100%", ...style },
5583
+ onFocus: (event) => {
5584
+ setFocused(true);
5585
+ onFocus?.(event);
5586
+ },
5587
+ onBlur: (event) => {
5588
+ if (!event.currentTarget.contains(event.relatedTarget)) {
5589
+ setFocused(false);
5590
+ }
5591
+ onBlur?.(event);
5592
+ },
5593
+ ...rest,
5594
+ children: /* @__PURE__ */ jsx(
5595
+ SketchBox,
5596
+ {
5597
+ roughness,
5598
+ seed: sketchSeed,
5599
+ sketchColor: focused ? SKETCH_COLORS.accent : ink,
5600
+ bowing,
5601
+ fillStyle,
5602
+ strokeWidth: focused && !shouldAnimate ? (strokeWidth ?? 1.75) + 0.35 : strokeWidth,
5603
+ animate,
5604
+ drawInKey: sketchSeed,
5605
+ contentStyle: {
5606
+ display: "flex",
5607
+ alignItems: "stretch",
5608
+ minHeight: 38
5609
+ },
5610
+ children
5611
+ }
5612
+ )
5613
+ }
5614
+ )
5615
+ }
5616
+ );
5617
+ }
5618
+ var InputGroupAddon = forwardRef(
5619
+ function InputGroupAddon2({ className, style, align = "inline-start", children, ...rest }, ref) {
5620
+ const sketch = useInputGroupSketch();
5621
+ return /* @__PURE__ */ jsx(
5622
+ "span",
5623
+ {
5624
+ ref,
5625
+ className: cn(className),
5626
+ style: {
5627
+ display: "inline-flex",
5628
+ alignItems: "center",
5629
+ padding: align === "inline-start" ? "0 0 0 10px" : "0 10px 0 0",
5630
+ fontFamily: doodleUiFontFamily,
5631
+ fontSize: 14,
5632
+ color: sketch.ink,
5633
+ flexShrink: 0,
5634
+ ...style
5635
+ },
5636
+ ...rest,
5637
+ children
5638
+ }
5639
+ );
5640
+ }
5641
+ );
5642
+ var InputGroupInput = forwardRef(function InputGroupInput2({ className, style, ...rest }, ref) {
5643
+ const sketch = useInputGroupSketch();
5644
+ return /* @__PURE__ */ jsx(
5645
+ "input",
5646
+ {
5647
+ ref,
5648
+ className: cn(className),
5649
+ style: {
5650
+ flex: 1,
5651
+ minWidth: 0,
5652
+ border: "none",
5653
+ outline: "none",
5654
+ background: "transparent",
5655
+ color: sketch.ink,
5656
+ fontFamily: doodleUiFontFamily,
5657
+ fontSize: 15,
5658
+ padding: "8px 10px",
5659
+ ...style
5660
+ },
5661
+ ...rest
5662
+ }
5663
+ );
5664
+ });
5665
+ var InputGroupButton = forwardRef(function InputGroupButton2({ className, style, children, ...rest }, ref) {
5666
+ return /* @__PURE__ */ jsx(
5667
+ "span",
5668
+ {
5669
+ ref,
5670
+ className: cn(className),
5671
+ style: {
5672
+ display: "inline-flex",
5673
+ alignItems: "center",
5674
+ padding: "0 6px 0 0",
5675
+ ...style
5676
+ },
5677
+ ...rest,
5678
+ children
5679
+ }
5680
+ );
5681
+ });
5682
+ var InputOTPSketchContext = createContext(
5683
+ null
5684
+ );
5685
+ function useInputOTPSketch() {
5686
+ const ctx = useContext(InputOTPSketchContext);
5687
+ if (!ctx) {
5688
+ throw new Error("InputOTP parts must be used inside <InputOTP>.");
5689
+ }
5690
+ return ctx;
5691
+ }
5692
+ var InputOTP = forwardRef(
5693
+ function InputOTP2({
5694
+ className,
5695
+ containerClassName,
5696
+ roughness,
5697
+ seed,
5698
+ sketchColor,
5699
+ bowing,
5700
+ fillStyle,
5701
+ strokeWidth,
5702
+ animate,
5703
+ children,
5704
+ ...rest
5705
+ }, ref) {
5706
+ const resolvedSeed = useResolvedSeed(seed);
5707
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5708
+ return /* @__PURE__ */ jsx(
5709
+ InputOTPSketchContext.Provider,
5710
+ {
5711
+ value: {
5712
+ roughness,
5713
+ seed: resolvedSeed,
5714
+ sketchColor,
5715
+ bowing,
5716
+ fillStyle,
5717
+ strokeWidth,
5718
+ resolvedSeed,
5719
+ ink,
5720
+ animate
5721
+ },
5722
+ children: /* @__PURE__ */ jsx(
5723
+ OTPInput,
5724
+ {
5725
+ ref,
5726
+ containerClassName: cn(className, containerClassName),
5727
+ ...rest,
5728
+ children
5729
+ }
5730
+ )
5731
+ }
5732
+ );
5733
+ }
5734
+ );
5735
+ var InputOTPGroup = forwardRef(
5736
+ function InputOTPGroup2({ className, style, children, ...rest }, ref) {
5737
+ return /* @__PURE__ */ jsx(
5738
+ "div",
5739
+ {
5740
+ ref,
5741
+ className: cn(className),
5742
+ style: { display: "flex", alignItems: "center", gap: 8, ...style },
5743
+ ...rest,
5744
+ children
5745
+ }
5746
+ );
5747
+ }
5748
+ );
5749
+ var InputOTPSlot = forwardRef(
5750
+ function InputOTPSlot2({ index, className, style, ...rest }, ref) {
5751
+ const inputContext = useContext(OTPInputContext);
5752
+ const sketch = useInputOTPSketch();
5753
+ const slotRef = useRef(null);
5754
+ const shouldAnimate = useAnimate(sketch.animate);
5755
+ const { char, isActive, hasFakeCaret } = inputContext?.slots[index] ?? {
5756
+ char: null,
5757
+ isActive: false,
5758
+ hasFakeCaret: false
5759
+ };
5760
+ const slotSeed = deriveSeed(
5761
+ sketch.resolvedSeed,
5762
+ `slot-${index}-${isActive ? "active" : "idle"}`
5763
+ );
5764
+ useDrawIn(slotRef, DRAW_IN_DURATION_MS, shouldAnimate, slotSeed);
5765
+ if (!inputContext) {
5766
+ throw new Error("InputOTPSlot must be used inside <InputOTP>.");
5767
+ }
5768
+ return /* @__PURE__ */ jsxs(
5769
+ "div",
5770
+ {
5771
+ ref: (node) => {
5772
+ slotRef.current = node;
5773
+ assignRef(ref, node);
5774
+ },
5775
+ className: cn(className),
5776
+ style: {
5777
+ position: "relative",
5778
+ width: 40,
5779
+ height: 44,
5780
+ display: "flex",
5781
+ alignItems: "center",
5782
+ justifyContent: "center",
5783
+ fontFamily: doodleUiFontFamily,
5784
+ fontSize: 18,
5785
+ color: sketch.ink,
5786
+ ...style
5787
+ },
5788
+ ...rest,
5789
+ children: [
5790
+ /* @__PURE__ */ jsx(
5791
+ RoughSvg,
5792
+ {
5793
+ shape: "rectangle",
5794
+ roughness: sketch.roughness,
5795
+ seed: slotSeed,
5796
+ sketchColor: isActive ? SKETCH_COLORS.accent : sketch.ink,
5797
+ bowing: sketch.bowing,
5798
+ fillStyle: sketch.fillStyle,
5799
+ strokeWidth: isActive ? (sketch.strokeWidth ?? 1.75) + 0.15 : sketch.strokeWidth
5800
+ }
5801
+ ),
5802
+ /* @__PURE__ */ jsxs("span", { style: { position: "relative", zIndex: 1 }, children: [
5803
+ char,
5804
+ hasFakeCaret ? /* @__PURE__ */ jsx(
5805
+ motion.span,
5806
+ {
5807
+ "aria-hidden": true,
5808
+ style: {
5809
+ display: "inline-block",
5810
+ width: 2,
5811
+ height: "0.85em",
5812
+ marginLeft: 2,
5813
+ background: sketch.ink,
5814
+ verticalAlign: "middle"
5815
+ },
5816
+ animate: shouldAnimate ? { opacity: [1, 0, 1] } : { opacity: 1 },
5817
+ transition: shouldAnimate ? { duration: 1, repeat: Infinity, ease: "linear" } : void 0
5818
+ }
5819
+ ) : null
5820
+ ] })
5821
+ ]
5822
+ }
5823
+ );
5824
+ }
5825
+ );
5826
+ var InputOTPSeparator = forwardRef(function InputOTPSeparator2({ children = "\u2013", className, style, ...rest }, ref) {
5827
+ const sketch = useInputOTPSketch();
5828
+ return /* @__PURE__ */ jsx(
5829
+ "span",
5830
+ {
5831
+ ref,
5832
+ role: "separator",
5833
+ className: cn(className),
5834
+ style: {
5835
+ fontFamily: doodleUiFontFamily,
5836
+ color: sketch.ink,
5837
+ opacity: 0.5,
5838
+ userSelect: "none",
5839
+ ...style
5840
+ },
5841
+ ...rest,
5842
+ children
5843
+ }
5844
+ );
5845
+ });
5846
+ var ScrollAreaSketchContext = createContext(null);
5847
+ function useScrollAreaSketch() {
5848
+ const ctx = useContext(ScrollAreaSketchContext);
5849
+ if (!ctx) {
5850
+ throw new Error("ScrollArea parts must be used inside <ScrollArea>.");
5851
+ }
5852
+ return ctx;
5853
+ }
5854
+ var ScrollArea = forwardRef(function ScrollArea2({
5855
+ className,
5856
+ style,
5857
+ children,
5858
+ roughness,
5859
+ seed,
5860
+ sketchColor,
5861
+ bowing,
5862
+ fillStyle,
5863
+ strokeWidth,
5864
+ animate,
5865
+ ...rest
5866
+ }, ref) {
5867
+ const resolvedSeed = useResolvedSeed(seed);
5868
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5869
+ return /* @__PURE__ */ jsx(
5870
+ ScrollAreaSketchContext.Provider,
5871
+ {
5872
+ value: {
5873
+ roughness,
5874
+ seed: resolvedSeed,
5875
+ sketchColor,
5876
+ bowing,
5877
+ fillStyle,
5878
+ strokeWidth,
5879
+ resolvedSeed,
5880
+ ink,
5881
+ animate
5882
+ },
5883
+ children: /* @__PURE__ */ jsx(
5884
+ ScrollAreaPrimitive.Root,
5885
+ {
5886
+ ref,
5887
+ className: cn(className),
5888
+ style: { position: "relative", overflow: "hidden", ...style },
5889
+ ...rest,
5890
+ children: /* @__PURE__ */ jsx(
5891
+ SketchBox,
5892
+ {
5893
+ roughness,
5894
+ seed: resolvedSeed,
5895
+ sketchColor: ink,
5896
+ bowing,
5897
+ fillStyle: fillStyle ?? "solid",
5898
+ fill: "#f7f6f2",
5899
+ strokeWidth: strokeWidth ?? 1.5,
5900
+ animate,
5901
+ contentStyle: { padding: 0, height: "100%" },
5902
+ style: { height: "100%" },
5903
+ children
5904
+ }
5905
+ )
5906
+ }
5907
+ )
5908
+ }
5909
+ );
5910
+ });
5911
+ var ScrollAreaViewport = forwardRef(function ScrollAreaViewport2({ className, style, children, ...rest }, ref) {
5912
+ return /* @__PURE__ */ jsx(
5913
+ ScrollAreaPrimitive.Viewport,
5914
+ {
5915
+ ref,
5916
+ className: cn(className),
5917
+ style: {
5918
+ width: "100%",
5919
+ height: "100%",
5920
+ borderRadius: 0,
5921
+ ...style
5922
+ },
5923
+ ...rest,
5924
+ children
5925
+ }
5926
+ );
5927
+ });
5928
+ var ScrollBar = forwardRef(
5929
+ function ScrollBar2({ className, style, orientation = "vertical", ...rest }, ref) {
5930
+ const sketch = useScrollAreaSketch();
5931
+ return /* @__PURE__ */ jsx(
5932
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
5933
+ {
5934
+ ref,
5935
+ orientation,
5936
+ className: cn(className),
5937
+ style: {
5938
+ display: "flex",
5939
+ touchAction: "none",
5940
+ userSelect: "none",
5941
+ padding: 2,
5942
+ ...orientation === "vertical" ? { width: 12, flexDirection: "column" } : { height: 12, flexDirection: "row" },
5943
+ ...style
5944
+ },
5945
+ ...rest,
5946
+ children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { asChild: true, children: /* @__PURE__ */ jsx("div", { style: { position: "relative", flex: 1 }, children: /* @__PURE__ */ jsx(
5947
+ RoughSvg,
5948
+ {
5949
+ shape: orientation === "vertical" ? "line-vertical" : "line",
5950
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
5951
+ seed: sketch.resolvedSeed,
5952
+ sketchColor: sketch.ink,
5953
+ bowing: sketch.bowing,
5954
+ strokeWidth: sketch.strokeWidth ?? 2.2,
5955
+ inset: 1
5956
+ }
5957
+ ) }) })
5958
+ }
5959
+ );
5960
+ }
5961
+ );
5962
+ var ScrollAreaCorner = ScrollAreaPrimitive.Corner;
5963
+ function ResizablePanelGroup({
5964
+ className,
5965
+ style,
5966
+ ...rest
5967
+ }) {
5968
+ return /* @__PURE__ */ jsx(
5969
+ ResizablePrimitive.PanelGroup,
5970
+ {
5971
+ className: cn(className),
5972
+ style: { display: "flex", width: "100%", height: "100%", ...style },
5973
+ ...rest
5974
+ }
5975
+ );
5976
+ }
5977
+ var ResizablePanel = ResizablePrimitive.Panel;
5978
+ function ResizableHandle({
5979
+ className,
5980
+ style,
5981
+ withHandle = true,
5982
+ roughness,
5983
+ seed,
5984
+ sketchColor,
5985
+ bowing,
5986
+ strokeWidth,
5987
+ ...rest
5988
+ }) {
5989
+ const resolvedSeed = useResolvedSeed(seed);
5990
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5991
+ const handleSeed = deriveSeed(resolvedSeed, "handle");
5992
+ const base = {
5993
+ position: "relative",
5994
+ flexShrink: 0,
5995
+ display: "flex",
5996
+ alignItems: "center",
5997
+ justifyContent: "center",
5998
+ background: "transparent",
5999
+ touchAction: "none",
6000
+ ...style
6001
+ };
6002
+ return /* @__PURE__ */ jsx(
6003
+ ResizablePrimitive.PanelResizeHandle,
6004
+ {
6005
+ className: cn(className),
6006
+ style: base,
6007
+ ...rest,
6008
+ children: withHandle ? /* @__PURE__ */ jsxs(
6009
+ "div",
6010
+ {
6011
+ style: {
6012
+ position: "relative",
6013
+ width: 14,
6014
+ height: 28,
6015
+ zIndex: 1
6016
+ },
6017
+ children: [
6018
+ /* @__PURE__ */ jsx(
6019
+ RoughSvg,
6020
+ {
6021
+ shape: "line-vertical",
6022
+ roughness: roughness ?? 1.8,
6023
+ seed: handleSeed,
6024
+ sketchColor: ink,
6025
+ bowing: bowing ?? 1.5,
6026
+ strokeWidth: strokeWidth ?? 2.4,
6027
+ width: 14,
6028
+ height: 28,
6029
+ inset: 2
6030
+ }
6031
+ ),
6032
+ /* @__PURE__ */ jsx(
6033
+ RoughSvg,
6034
+ {
6035
+ shape: "ellipse",
6036
+ roughness: (roughness ?? 1.5) + 0.2,
6037
+ seed: deriveSeed(handleSeed, "dot-a"),
6038
+ sketchColor: ink,
6039
+ width: 14,
6040
+ height: 28,
6041
+ strokeWidth: 1.2,
6042
+ inset: 5,
6043
+ style: { opacity: 0.55 }
6044
+ }
6045
+ )
6046
+ ]
6047
+ }
6048
+ ) : null
6049
+ }
6050
+ );
6051
+ }
6052
+ var HoverCardSketchContext = createContext(
6053
+ null
6054
+ );
6055
+ function useHoverCardSketch() {
6056
+ const ctx = useContext(HoverCardSketchContext);
6057
+ if (!ctx) {
6058
+ throw new Error("HoverCard parts must be used inside <HoverCard>.");
6059
+ }
6060
+ return ctx;
6061
+ }
6062
+ function HoverCard({
6063
+ children,
6064
+ roughness,
6065
+ seed,
6066
+ sketchColor,
6067
+ bowing,
6068
+ fillStyle,
6069
+ strokeWidth,
6070
+ animate,
6071
+ ...rest
6072
+ }) {
6073
+ const resolvedSeed = useResolvedSeed(seed);
6074
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6075
+ return /* @__PURE__ */ jsx(
6076
+ HoverCardSketchContext.Provider,
6077
+ {
6078
+ value: {
6079
+ roughness,
6080
+ seed: resolvedSeed,
6081
+ sketchColor,
6082
+ bowing,
6083
+ fillStyle,
6084
+ strokeWidth,
6085
+ resolvedSeed,
6086
+ ink,
6087
+ animate
6088
+ },
6089
+ children: /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { ...rest, children })
6090
+ }
6091
+ );
6092
+ }
6093
+ var HoverCardTrigger = HoverCardPrimitive.Trigger;
6094
+ var HoverCardContent = forwardRef(function HoverCardContent2({ className, style, children, sideOffset = 6, align = "center", ...rest }, ref) {
6095
+ const sketch = useHoverCardSketch();
6096
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx(
6097
+ HoverCardPrimitive.Content,
6098
+ {
6099
+ ref,
6100
+ sideOffset,
6101
+ align,
6102
+ className: cn(className),
6103
+ style: { zIndex: 75, outline: "none", ...style },
6104
+ ...rest,
6105
+ children: /* @__PURE__ */ jsx(
6106
+ SketchBox,
6107
+ {
6108
+ roughness: sketch.roughness,
6109
+ seed: sketch.resolvedSeed,
6110
+ sketchColor: sketch.ink,
6111
+ bowing: sketch.bowing,
6112
+ fillStyle: sketch.fillStyle ?? "solid",
6113
+ fill: "#f7f6f2",
6114
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6115
+ shadow: true,
6116
+ animate: sketch.animate,
6117
+ contentStyle: { padding: 14, maxWidth: 320, fontSize: 14 },
6118
+ children
6119
+ }
6120
+ )
6121
+ }
6122
+ ) });
6123
+ });
6124
+ var HoverCardArrow = HoverCardPrimitive.Arrow;
6125
+ var ContextMenuSketchContext = createContext(null);
6126
+ function useContextMenuSketch() {
6127
+ const ctx = useContext(ContextMenuSketchContext);
6128
+ if (!ctx) {
6129
+ throw new Error(
6130
+ "ContextMenu parts must be used inside <ContextMenu>."
6131
+ );
6132
+ }
6133
+ return ctx;
6134
+ }
6135
+ function ContextMenu({
6136
+ children,
6137
+ roughness,
6138
+ seed,
6139
+ sketchColor,
6140
+ bowing,
6141
+ fillStyle,
6142
+ strokeWidth,
6143
+ animate,
6144
+ ...rest
6145
+ }) {
6146
+ const resolvedSeed = useResolvedSeed(seed);
6147
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6148
+ return /* @__PURE__ */ jsx(
6149
+ ContextMenuSketchContext.Provider,
6150
+ {
6151
+ value: {
6152
+ roughness,
6153
+ seed: resolvedSeed,
6154
+ sketchColor,
6155
+ bowing,
6156
+ fillStyle,
6157
+ strokeWidth,
6158
+ resolvedSeed,
6159
+ ink,
6160
+ animate
6161
+ },
6162
+ children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { ...rest, children })
6163
+ }
6164
+ );
6165
+ }
6166
+ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
6167
+ var ContextMenuGroup = ContextMenuPrimitive.Group;
6168
+ var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
6169
+ var ContextMenuSub = ContextMenuPrimitive.Sub;
6170
+ var ContextMenuContent = forwardRef(function ContextMenuContent2({ className, style, children, ...rest }, ref) {
6171
+ const sketch = useContextMenuSketch();
6172
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
6173
+ ContextMenuPrimitive.Content,
6174
+ {
6175
+ ref,
6176
+ className: cn(className),
6177
+ style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
6178
+ ...rest,
6179
+ children: /* @__PURE__ */ jsx(
6180
+ SketchBox,
6181
+ {
6182
+ roughness: sketch.roughness,
6183
+ seed: sketch.resolvedSeed,
6184
+ sketchColor: sketch.ink,
6185
+ bowing: sketch.bowing,
6186
+ fillStyle: sketch.fillStyle ?? "solid",
6187
+ fill: "#f7f6f2",
6188
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6189
+ shadow: true,
6190
+ animate: sketch.animate,
6191
+ contentStyle: { padding: "6px 4px" },
6192
+ children
6193
+ }
6194
+ )
6195
+ }
6196
+ ) });
6197
+ });
6198
+ function useMark2(highlighted) {
6199
+ const sketch = useContextMenuSketch();
6200
+ return { sketch, mark: highlighted };
6201
+ }
6202
+ var ContextMenuItem = forwardRef(function ContextMenuItem2({ className, style, children, inset, ...rest }, ref) {
6203
+ const [highlighted, setHighlighted] = useState(false);
6204
+ const { sketch, mark } = useMark2(highlighted);
6205
+ return /* @__PURE__ */ jsxs(
6206
+ ContextMenuPrimitive.Item,
6207
+ {
6208
+ ref,
6209
+ className: cn(className),
6210
+ onPointerMove: () => setHighlighted(true),
6211
+ onPointerLeave: () => setHighlighted(false),
6212
+ onFocus: () => setHighlighted(true),
6213
+ onBlur: () => setHighlighted(false),
6214
+ style: {
6215
+ position: "relative",
6216
+ display: "flex",
6217
+ alignItems: "center",
6218
+ gap: 8,
6219
+ padding: inset ? "7px 12px 7px 26px" : "7px 12px",
6220
+ fontFamily: doodleUiFontFamily,
6221
+ fontSize: 14,
6222
+ color: sketch.ink,
6223
+ outline: "none",
6224
+ cursor: "pointer",
6225
+ userSelect: "none",
6226
+ ...style
6227
+ },
6228
+ ...rest,
6229
+ children: [
6230
+ mark ? /* @__PURE__ */ jsx(
6231
+ RoughSvg,
6232
+ {
6233
+ shape: "line",
6234
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6235
+ seed: sketch.resolvedSeed,
6236
+ sketchColor: sketch.ink,
6237
+ bowing: sketch.bowing ?? 1.6,
6238
+ strokeWidth: 1.3,
6239
+ inset: 4,
6240
+ style: { opacity: 0.4 }
6241
+ }
6242
+ ) : null,
6243
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6244
+ ]
6245
+ }
6246
+ );
6247
+ });
6248
+ var CHECK_PATH3 = "M 2 6 L 5 9 L 10 3";
6249
+ var ContextMenuCheckboxItem = forwardRef(function ContextMenuCheckboxItem2({ className, style, children, checked, ...rest }, ref) {
6250
+ const [highlighted, setHighlighted] = useState(false);
6251
+ const { sketch, mark } = useMark2(highlighted);
6252
+ return /* @__PURE__ */ jsxs(
6253
+ ContextMenuPrimitive.CheckboxItem,
6254
+ {
6255
+ ref,
6256
+ checked,
6257
+ className: cn(className),
6258
+ onPointerMove: () => setHighlighted(true),
6259
+ onPointerLeave: () => setHighlighted(false),
6260
+ style: {
6261
+ position: "relative",
6262
+ display: "flex",
6263
+ alignItems: "center",
6264
+ gap: 8,
6265
+ padding: "7px 12px 7px 26px",
6266
+ fontFamily: doodleUiFontFamily,
6267
+ fontSize: 14,
6268
+ color: sketch.ink,
6269
+ outline: "none",
6270
+ cursor: "pointer",
6271
+ userSelect: "none",
6272
+ ...style
6273
+ },
6274
+ ...rest,
6275
+ children: [
6276
+ mark ? /* @__PURE__ */ jsx(
6277
+ RoughSvg,
6278
+ {
6279
+ shape: "line",
6280
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6281
+ seed: sketch.resolvedSeed,
6282
+ sketchColor: sketch.ink,
6283
+ bowing: sketch.bowing ?? 1.6,
6284
+ strokeWidth: 1.3,
6285
+ inset: 4,
6286
+ style: { opacity: 0.4 }
6287
+ }
6288
+ ) : null,
6289
+ /* @__PURE__ */ jsx(
6290
+ "span",
6291
+ {
6292
+ style: {
6293
+ position: "relative",
6294
+ width: 12,
6295
+ height: 12,
6296
+ flexShrink: 0,
6297
+ marginLeft: -18
6298
+ },
6299
+ children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(
6300
+ RoughSvg,
6301
+ {
6302
+ shape: "path",
6303
+ path: CHECK_PATH3,
6304
+ roughness: (sketch.roughness ?? 1.5) * 0.7,
6305
+ seed: deriveSeed(sketch.resolvedSeed, "checkbox-mark"),
6306
+ sketchColor: SKETCH_COLORS.accent,
6307
+ bowing: sketch.bowing,
6308
+ strokeWidth: 1.6,
6309
+ inset: 0
6310
+ }
6311
+ ) })
6312
+ }
6313
+ ),
6314
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6315
+ ]
6316
+ }
6317
+ );
6318
+ });
6319
+ var ContextMenuRadioItem = forwardRef(function ContextMenuRadioItem2({ className, style, children, ...rest }, ref) {
6320
+ const [highlighted, setHighlighted] = useState(false);
6321
+ const { sketch, mark } = useMark2(highlighted);
6322
+ return /* @__PURE__ */ jsxs(
6323
+ ContextMenuPrimitive.RadioItem,
6324
+ {
6325
+ ref,
6326
+ className: cn(className),
6327
+ onPointerMove: () => setHighlighted(true),
6328
+ onPointerLeave: () => setHighlighted(false),
6329
+ style: {
6330
+ position: "relative",
6331
+ display: "flex",
6332
+ alignItems: "center",
6333
+ gap: 8,
6334
+ padding: "7px 12px 7px 26px",
6335
+ fontFamily: doodleUiFontFamily,
6336
+ fontSize: 14,
6337
+ color: sketch.ink,
6338
+ outline: "none",
6339
+ cursor: "pointer",
6340
+ userSelect: "none",
6341
+ ...style
6342
+ },
6343
+ ...rest,
6344
+ children: [
6345
+ mark ? /* @__PURE__ */ jsx(
6346
+ RoughSvg,
6347
+ {
6348
+ shape: "line",
6349
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6350
+ seed: sketch.resolvedSeed,
6351
+ sketchColor: sketch.ink,
6352
+ bowing: sketch.bowing ?? 1.6,
6353
+ strokeWidth: 1.3,
6354
+ inset: 4,
6355
+ style: { opacity: 0.4 }
6356
+ }
6357
+ ) : null,
6358
+ /* @__PURE__ */ jsx(
6359
+ "span",
6360
+ {
6361
+ style: {
6362
+ position: "relative",
6363
+ width: 8,
6364
+ height: 8,
6365
+ flexShrink: 0,
6366
+ marginLeft: -18
6367
+ },
6368
+ children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(
6369
+ RoughSvg,
6370
+ {
6371
+ shape: "ellipse",
6372
+ roughness: (sketch.roughness ?? 1.5) * 0.8,
6373
+ seed: deriveSeed(sketch.resolvedSeed, "radio-mark"),
6374
+ sketchColor: SKETCH_COLORS.accent,
6375
+ bowing: sketch.bowing,
6376
+ fillStyle: "solid",
6377
+ fill: SKETCH_COLORS.accent,
6378
+ strokeWidth: 1.2,
6379
+ inset: 0
6380
+ }
6381
+ ) })
6382
+ }
6383
+ ),
6384
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6385
+ ]
6386
+ }
6387
+ );
6388
+ });
6389
+ var ContextMenuLabel = forwardRef(function ContextMenuLabel2({ className, style, children, ...rest }, ref) {
6390
+ const sketch = useContextMenuSketch();
6391
+ return /* @__PURE__ */ jsx(
6392
+ ContextMenuPrimitive.Label,
6393
+ {
6394
+ ref,
6395
+ className: cn(className),
6396
+ style: {
6397
+ padding: "6px 12px",
6398
+ fontFamily: doodleUiFontFamily,
6399
+ fontSize: 12,
6400
+ fontWeight: 700,
6401
+ color: sketch.ink,
6402
+ opacity: 0.6,
6403
+ textTransform: "uppercase",
6404
+ letterSpacing: 0.4,
6405
+ ...style
6406
+ },
6407
+ ...rest,
6408
+ children
6409
+ }
6410
+ );
6411
+ });
6412
+ var ContextMenuSeparator = forwardRef(function ContextMenuSeparator2({ className, style, ...rest }, ref) {
6413
+ const sketch = useContextMenuSketch();
6414
+ return /* @__PURE__ */ jsx(
6415
+ ContextMenuPrimitive.Separator,
6416
+ {
6417
+ ref,
6418
+ className: cn(className),
6419
+ style: { position: "relative", height: 10, margin: "2px 0", ...style },
6420
+ ...rest,
6421
+ children: /* @__PURE__ */ jsx(
6422
+ RoughSvg,
6423
+ {
6424
+ shape: "line",
6425
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6426
+ seed: deriveSeed(sketch.resolvedSeed, "separator"),
6427
+ sketchColor: sketch.ink,
6428
+ bowing: sketch.bowing ?? 1.8,
6429
+ strokeWidth: 1.2,
6430
+ inset: 6,
6431
+ style: { opacity: 0.5 }
6432
+ }
6433
+ )
6434
+ }
6435
+ );
6436
+ });
6437
+ var NavigationMenuSketchContext = createContext(null);
6438
+ function useNavigationMenuSketch() {
6439
+ const ctx = useContext(NavigationMenuSketchContext);
6440
+ if (!ctx) {
6441
+ throw new Error("NavigationMenu parts must be used inside <NavigationMenu>.");
6442
+ }
6443
+ return ctx;
6444
+ }
6445
+ function NavigationMenu({
6446
+ children,
6447
+ roughness,
6448
+ seed,
6449
+ sketchColor,
6450
+ bowing,
6451
+ fillStyle,
6452
+ strokeWidth,
6453
+ animate,
6454
+ ...rest
6455
+ }) {
6456
+ const resolvedSeed = useResolvedSeed(seed);
6457
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6458
+ return /* @__PURE__ */ jsx(
6459
+ NavigationMenuSketchContext.Provider,
6460
+ {
6461
+ value: {
6462
+ roughness,
6463
+ seed: resolvedSeed,
6464
+ sketchColor,
6465
+ bowing,
6466
+ fillStyle,
6467
+ strokeWidth,
6468
+ resolvedSeed,
6469
+ ink,
6470
+ animate
6471
+ },
6472
+ children: /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Root, { ...rest, children: [
6473
+ children,
6474
+ /* @__PURE__ */ jsx(NavigationMenuViewport, {})
6475
+ ] })
6476
+ }
6477
+ );
6478
+ }
6479
+ var NavigationMenuList = forwardRef(function NavigationMenuList2({ className, style, ...rest }, ref) {
6480
+ return /* @__PURE__ */ jsx(
6481
+ NavigationMenuPrimitive.List,
6482
+ {
6483
+ ref,
6484
+ className: cn(className),
6485
+ style: {
6486
+ display: "flex",
6487
+ alignItems: "center",
6488
+ gap: 4,
6489
+ listStyle: "none",
6490
+ margin: 0,
6491
+ padding: 0,
6492
+ ...style
6493
+ },
6494
+ ...rest
6495
+ }
6496
+ );
6497
+ });
6498
+ var NavigationMenuItem = NavigationMenuPrimitive.Item;
6499
+ var NavigationMenuTrigger = forwardRef(function NavigationMenuTrigger2({ className, style, children, ...rest }, ref) {
6500
+ const sketch = useNavigationMenuSketch();
6501
+ return /* @__PURE__ */ jsx(
6502
+ NavigationMenuPrimitive.Trigger,
6503
+ {
6504
+ ref,
6505
+ className: cn(className),
6506
+ style: {
6507
+ position: "relative",
6508
+ border: "none",
6509
+ background: "transparent",
6510
+ fontFamily: doodleUiFontFamily,
6511
+ fontWeight: doodleUiFontWeight(600),
6512
+ fontSize: 14,
6513
+ color: sketch.ink,
6514
+ padding: "8px 12px",
6515
+ cursor: "pointer",
6516
+ outline: "none",
6517
+ ...style
6518
+ },
6519
+ ...rest,
6520
+ children
6521
+ }
6522
+ );
6523
+ });
6524
+ var NavigationMenuContent = forwardRef(function NavigationMenuContent2({ className, style, children, ...rest }, ref) {
6525
+ const sketch = useNavigationMenuSketch();
6526
+ return /* @__PURE__ */ jsx(
6527
+ NavigationMenuPrimitive.Content,
6528
+ {
6529
+ ref,
6530
+ className: cn(className),
6531
+ style: { outline: "none", ...style },
6532
+ ...rest,
6533
+ children: /* @__PURE__ */ jsx(
6534
+ SketchBox,
6535
+ {
6536
+ roughness: sketch.roughness,
6537
+ seed: sketch.resolvedSeed,
6538
+ sketchColor: sketch.ink,
6539
+ bowing: sketch.bowing,
6540
+ fillStyle: sketch.fillStyle ?? "solid",
6541
+ fill: "#f7f6f2",
6542
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6543
+ shadow: true,
6544
+ animate: sketch.animate,
6545
+ contentStyle: { padding: 12, minWidth: 200 },
6546
+ children
6547
+ }
6548
+ )
6549
+ }
6550
+ );
6551
+ });
6552
+ var NavigationMenuLink = NavigationMenuPrimitive.Link;
6553
+ var NavigationMenuViewport = forwardRef(function NavigationMenuViewport2({ className, style, ...rest }, ref) {
6554
+ return /* @__PURE__ */ jsx("div", { style: { position: "absolute", top: "100%", left: 0, perspective: 2e3 }, children: /* @__PURE__ */ jsx(
6555
+ NavigationMenuPrimitive.Viewport,
6556
+ {
6557
+ ref,
6558
+ className: cn(className),
6559
+ style: {
6560
+ position: "relative",
6561
+ marginTop: 6,
6562
+ overflow: "hidden",
6563
+ ...style
6564
+ },
6565
+ ...rest
6566
+ }
6567
+ ) });
6568
+ });
6569
+ var NavigationMenuIndicator = forwardRef(function NavigationMenuIndicator2({ className, style, ...rest }, ref) {
6570
+ const sketch = useNavigationMenuSketch();
6571
+ return /* @__PURE__ */ jsx(
6572
+ NavigationMenuPrimitive.Indicator,
6573
+ {
6574
+ ref,
6575
+ className: cn(className),
6576
+ style: { position: "relative", height: 6, ...style },
6577
+ ...rest,
6578
+ children: /* @__PURE__ */ jsx(
6579
+ RoughSvg,
6580
+ {
6581
+ shape: "line",
6582
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6583
+ seed: deriveSeed(sketch.resolvedSeed, "nav-indicator"),
6584
+ sketchColor: sketch.ink,
6585
+ strokeWidth: 2,
6586
+ inset: 2
6587
+ }
6588
+ )
6589
+ }
6590
+ );
6591
+ });
6592
+ var NavigationMenuItemLink = forwardRef(function NavigationMenuItemLink2({ className, style, active, children, ...rest }, ref) {
6593
+ const sketch = useNavigationMenuSketch();
6594
+ const [hovered, setHovered] = useState(false);
6595
+ const showMark = active || hovered;
6596
+ return /* @__PURE__ */ jsxs(
6597
+ NavigationMenuPrimitive.Link,
6598
+ {
6599
+ ref,
6600
+ className: cn(className),
6601
+ onPointerEnter: () => setHovered(true),
6602
+ onPointerLeave: () => setHovered(false),
6603
+ style: {
6604
+ position: "relative",
6605
+ display: "inline-flex",
6606
+ padding: "8px 12px",
6607
+ fontFamily: doodleUiFontFamily,
6608
+ fontSize: 14,
6609
+ color: sketch.ink,
6610
+ textDecoration: "none",
6611
+ outline: "none",
6612
+ ...style
6613
+ },
6614
+ ...rest,
6615
+ children: [
6616
+ showMark ? /* @__PURE__ */ jsx(
6617
+ RoughSvg,
6618
+ {
6619
+ shape: "line",
6620
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
6621
+ seed: deriveSeed(sketch.resolvedSeed, "nav-link"),
6622
+ sketchColor: sketch.ink,
6623
+ strokeWidth: 1.4,
6624
+ inset: 4,
6625
+ style: { opacity: 0.35 }
6626
+ }
6627
+ ) : null,
6628
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6629
+ ]
6630
+ }
6631
+ );
6632
+ });
6633
+ var MenubarSketchContext = createContext(
6634
+ null
6635
+ );
6636
+ function useMenubarSketch() {
6637
+ const ctx = useContext(MenubarSketchContext);
6638
+ if (!ctx) {
6639
+ throw new Error("Menubar parts must be used inside <Menubar>.");
6640
+ }
6641
+ return ctx;
6642
+ }
6643
+ function Menubar({
6644
+ children,
6645
+ className,
6646
+ style,
6647
+ roughness,
6648
+ seed,
6649
+ sketchColor,
6650
+ bowing,
6651
+ fillStyle,
6652
+ strokeWidth,
6653
+ animate,
6654
+ ...rest
6655
+ }) {
6656
+ const resolvedSeed = useResolvedSeed(seed);
6657
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6658
+ return /* @__PURE__ */ jsx(
6659
+ MenubarSketchContext.Provider,
6660
+ {
6661
+ value: {
6662
+ roughness,
6663
+ seed: resolvedSeed,
6664
+ sketchColor,
6665
+ bowing,
6666
+ fillStyle,
6667
+ strokeWidth,
6668
+ resolvedSeed,
6669
+ ink,
6670
+ animate
6671
+ },
6672
+ children: /* @__PURE__ */ jsx(
6673
+ MenubarPrimitive.Root,
6674
+ {
6675
+ className: cn(className),
6676
+ style: {
6677
+ display: "inline-flex",
6678
+ alignItems: "center",
6679
+ gap: 4,
6680
+ padding: 4,
6681
+ ...style
6682
+ },
6683
+ ...rest,
6684
+ children
6685
+ }
6686
+ )
6687
+ }
6688
+ );
6689
+ }
6690
+ var MenubarMenu = MenubarPrimitive.Menu;
6691
+ var MenubarTrigger = forwardRef(function MenubarTrigger2({ className, style, children, ...rest }, ref) {
6692
+ const sketch = useMenubarSketch();
6693
+ return /* @__PURE__ */ jsx(
6694
+ MenubarPrimitive.Trigger,
6695
+ {
6696
+ ref,
6697
+ className: cn(className),
6698
+ style: {
6699
+ border: "none",
6700
+ background: "transparent",
6701
+ fontFamily: doodleUiFontFamily,
6702
+ fontSize: 14,
6703
+ padding: "6px 10px",
6704
+ cursor: "pointer",
6705
+ color: sketch.ink,
6706
+ outline: "none",
6707
+ ...style
6708
+ },
6709
+ ...rest,
6710
+ children
6711
+ }
6712
+ );
6713
+ });
6714
+ var MenubarContent = forwardRef(function MenubarContent2({ className, style, children, align = "start", sideOffset = 6, ...rest }, ref) {
6715
+ const sketch = useMenubarSketch();
6716
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
6717
+ MenubarPrimitive.Content,
6718
+ {
6719
+ ref,
6720
+ align,
6721
+ sideOffset,
6722
+ className: cn(className),
6723
+ style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
6724
+ ...rest,
6725
+ children: /* @__PURE__ */ jsx(
6726
+ SketchBox,
6727
+ {
6728
+ roughness: sketch.roughness,
6729
+ seed: sketch.resolvedSeed,
6730
+ sketchColor: sketch.ink,
6731
+ bowing: sketch.bowing,
6732
+ fillStyle: sketch.fillStyle ?? "solid",
6733
+ fill: "#f7f6f2",
6734
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6735
+ shadow: true,
6736
+ animate: sketch.animate,
6737
+ contentStyle: { padding: "6px 4px" },
6738
+ children
6739
+ }
6740
+ )
6741
+ }
6742
+ ) });
6743
+ });
6744
+ function useMark3(highlighted) {
6745
+ const sketch = useMenubarSketch();
6746
+ return { sketch, mark: highlighted };
6747
+ }
6748
+ var MenubarItem = forwardRef(function MenubarItem2({ className, style, children, ...rest }, ref) {
6749
+ const [highlighted, setHighlighted] = useState(false);
6750
+ const { sketch, mark } = useMark3(highlighted);
6751
+ return /* @__PURE__ */ jsxs(
6752
+ MenubarPrimitive.Item,
6753
+ {
6754
+ ref,
6755
+ className: cn(className),
6756
+ onPointerMove: () => setHighlighted(true),
6757
+ onPointerLeave: () => setHighlighted(false),
6758
+ style: {
6759
+ position: "relative",
6760
+ display: "flex",
6761
+ alignItems: "center",
6762
+ gap: 8,
6763
+ padding: "7px 12px",
6764
+ fontFamily: doodleUiFontFamily,
6765
+ fontSize: 14,
6766
+ color: sketch.ink,
6767
+ outline: "none",
6768
+ cursor: "pointer",
6769
+ userSelect: "none",
6770
+ ...style
6771
+ },
6772
+ ...rest,
6773
+ children: [
6774
+ mark ? /* @__PURE__ */ jsx(
6775
+ RoughSvg,
6776
+ {
6777
+ shape: "line",
6778
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6779
+ seed: sketch.resolvedSeed,
6780
+ sketchColor: sketch.ink,
6781
+ bowing: sketch.bowing ?? 1.6,
6782
+ strokeWidth: 1.3,
6783
+ inset: 4,
6784
+ style: { opacity: 0.4 }
6785
+ }
6786
+ ) : null,
6787
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6788
+ ]
6789
+ }
6790
+ );
6791
+ });
6792
+ var MenubarSeparator = forwardRef(function MenubarSeparator2({ className, style, ...rest }, ref) {
6793
+ const sketch = useMenubarSketch();
6794
+ return /* @__PURE__ */ jsx(
6795
+ MenubarPrimitive.Separator,
6796
+ {
6797
+ ref,
6798
+ className: cn(className),
6799
+ style: { position: "relative", height: 10, margin: "2px 0", ...style },
6800
+ ...rest,
6801
+ children: /* @__PURE__ */ jsx(
6802
+ RoughSvg,
6803
+ {
6804
+ shape: "line",
6805
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6806
+ seed: deriveSeed(sketch.resolvedSeed, "separator"),
6807
+ sketchColor: sketch.ink,
6808
+ bowing: sketch.bowing ?? 1.8,
6809
+ strokeWidth: 1.2,
6810
+ inset: 6,
6811
+ style: { opacity: 0.5 }
6812
+ }
6813
+ )
6814
+ }
6815
+ );
6816
+ });
6817
+ var MenubarLabel = forwardRef(function MenubarLabel2({ className, style, children, ...rest }, ref) {
6818
+ const sketch = useMenubarSketch();
6819
+ return /* @__PURE__ */ jsx(
6820
+ MenubarPrimitive.Label,
6821
+ {
6822
+ ref,
6823
+ className: cn(className),
6824
+ style: {
6825
+ padding: "6px 12px",
6826
+ fontFamily: doodleUiFontFamily,
6827
+ fontSize: 12,
6828
+ fontWeight: 700,
6829
+ color: sketch.ink,
6830
+ opacity: 0.6,
6831
+ ...style
6832
+ },
6833
+ ...rest,
6834
+ children
6835
+ }
6836
+ );
6837
+ });
6838
+ var MenubarShortcut = forwardRef(function MenubarShortcut2({ className, style, children, ...rest }, ref) {
6839
+ return /* @__PURE__ */ jsx(
6840
+ "span",
6841
+ {
6842
+ ref,
6843
+ className: cn(className),
6844
+ style: {
6845
+ marginLeft: "auto",
6846
+ fontSize: 12,
6847
+ opacity: 0.55,
6848
+ letterSpacing: 0.04,
6849
+ ...style
6850
+ },
6851
+ ...rest,
6852
+ children
6853
+ }
6854
+ );
6855
+ });
6856
+ var MenubarSub = MenubarPrimitive.Sub;
6857
+ var MenubarSubTrigger = MenubarPrimitive.SubTrigger;
6858
+ var MenubarSubContent = MenubarPrimitive.SubContent;
6859
+ var MenubarCheckboxItem = MenubarPrimitive.CheckboxItem;
6860
+ var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
6861
+ var MenubarRadioItem = MenubarPrimitive.RadioItem;
6862
+ var SlidingPanelSketchContext = createContext(null);
6863
+ function useSlidingPanelSketch() {
6864
+ const ctx = useContext(SlidingPanelSketchContext);
6865
+ if (!ctx) {
6866
+ throw new Error("Sliding panel parts must be used inside the panel root.");
6867
+ }
6868
+ return ctx;
6869
+ }
6870
+ function SlidingPanelRoot({
6871
+ children,
6872
+ open,
6873
+ defaultOpen,
6874
+ onOpenChange,
6875
+ side = "right",
6876
+ roughness,
6877
+ seed,
6878
+ sketchColor,
6879
+ bowing,
6880
+ fillStyle,
6881
+ strokeWidth,
6882
+ animate,
6883
+ ...rest
6884
+ }) {
6885
+ const resolvedSeed = useResolvedSeed(seed);
6886
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6887
+ const [uncontrolled, setUncontrolled] = useState(defaultOpen === true);
6888
+ const isOpen = open ?? uncontrolled;
6889
+ return /* @__PURE__ */ jsx(
6890
+ SlidingPanelSketchContext.Provider,
6891
+ {
6892
+ value: {
6893
+ roughness,
6894
+ seed: resolvedSeed,
6895
+ sketchColor,
6896
+ bowing,
6897
+ fillStyle,
6898
+ strokeWidth,
6899
+ resolvedSeed,
6900
+ ink,
6901
+ animate,
6902
+ open: isOpen,
6903
+ side
6904
+ },
6905
+ children: /* @__PURE__ */ jsx(
6906
+ Dialog.Root,
6907
+ {
6908
+ open: isOpen,
6909
+ onOpenChange: (next) => {
6910
+ setUncontrolled(next);
6911
+ onOpenChange?.(next);
6912
+ },
6913
+ ...rest,
6914
+ children
6915
+ }
6916
+ )
6917
+ }
6918
+ );
6919
+ }
6920
+ var SlidingPanelTrigger = Dialog.Trigger;
6921
+ var SlidingPanelClose = Dialog.Close;
6922
+ function slideVariants(side, shouldAnimate) {
6923
+ if (!shouldAnimate) {
6924
+ return { hidden: {}, visible: {} };
6925
+ }
6926
+ const offset = 420;
6927
+ const hidden = side === "left" ? { x: -offset } : side === "right" ? { x: offset } : side === "top" ? { y: -offset } : { y: offset };
6928
+ return {
6929
+ hidden: { ...hidden, opacity: 0.85 },
6930
+ visible: { x: 0, y: 0, opacity: 1 }
6931
+ };
6932
+ }
6933
+ function panelPosition(side) {
6934
+ switch (side) {
6935
+ case "left":
6936
+ return {
6937
+ top: 0,
6938
+ bottom: 0,
6939
+ left: 0,
6940
+ width: "min(420px, 100vw)"
6941
+ };
6942
+ case "right":
6943
+ return {
6944
+ top: 0,
6945
+ bottom: 0,
6946
+ right: 0,
6947
+ width: "min(420px, 100vw)"
6948
+ };
6949
+ case "top":
6950
+ return {
6951
+ top: 0,
6952
+ left: 0,
6953
+ right: 0,
6954
+ height: "min(420px, 90vh)"
6955
+ };
6956
+ default:
6957
+ return {
6958
+ bottom: 0,
6959
+ left: 0,
6960
+ right: 0,
6961
+ height: "min(420px, 90vh)"
6962
+ };
6963
+ }
6964
+ }
6965
+ var SlidingPanelOverlay = forwardRef(function SlidingPanelOverlay2({ style, ...rest }, ref) {
6966
+ const sketch = useSlidingPanelSketch();
6967
+ const shouldAnimate = useAnimate(sketch.animate);
6968
+ return /* @__PURE__ */ jsx(Dialog.Overlay, { ref, asChild: true, forceMount: true, ...rest, children: /* @__PURE__ */ jsx(
6969
+ motion.div,
6970
+ {
6971
+ initial: shouldAnimate ? { opacity: 0 } : false,
6972
+ animate: { opacity: 1 },
6973
+ exit: shouldAnimate ? { opacity: 0 } : void 0,
6974
+ transition: shouldAnimate ? { duration: 0.22, ease: "easeOut" } : { duration: 0 },
6975
+ style: {
6976
+ position: "fixed",
6977
+ inset: 0,
6978
+ background: "rgba(31, 29, 26, 0.38)",
6979
+ zIndex: 70,
6980
+ ...style
6981
+ }
6982
+ }
6983
+ ) });
6984
+ });
6985
+ var SlidingPanelContent = forwardRef(function SlidingPanelContent2({ className, style, contentStyle, children, chrome, ...rest }, ref) {
6986
+ const sketch = useSlidingPanelSketch();
6987
+ const shouldAnimate = useAnimate(sketch.animate);
6988
+ const variants = slideVariants(sketch.side, shouldAnimate);
6989
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: sketch.open ? /* @__PURE__ */ jsxs(Dialog.Portal, { forceMount: true, children: [
6990
+ /* @__PURE__ */ jsx(SlidingPanelOverlay, {}),
6991
+ /* @__PURE__ */ jsx(Dialog.Content, { ref, asChild: true, forceMount: true, ...rest, children: /* @__PURE__ */ jsx(
6992
+ motion.div,
6993
+ {
6994
+ className: cn(className),
6995
+ initial: shouldAnimate ? "hidden" : false,
6996
+ animate: "visible",
6997
+ exit: shouldAnimate ? "hidden" : void 0,
6998
+ variants,
6999
+ transition: shouldAnimate ? { duration: 0.28, ease: "easeOut" } : { duration: 0 },
7000
+ style: {
7001
+ position: "fixed",
7002
+ zIndex: 80,
7003
+ outline: "none",
7004
+ pointerEvents: "auto",
7005
+ ...panelPosition(sketch.side),
7006
+ ...style
7007
+ },
7008
+ children: /* @__PURE__ */ jsxs(
7009
+ SketchBox,
7010
+ {
7011
+ roughness: sketch.roughness,
7012
+ seed: sketch.resolvedSeed,
7013
+ sketchColor: sketch.ink,
7014
+ bowing: sketch.bowing,
7015
+ fillStyle: sketch.fillStyle ?? "solid",
7016
+ fill: "#f7f6f2",
7017
+ strokeWidth: sketch.strokeWidth ?? 2,
7018
+ animate: sketch.animate,
7019
+ contentStyle: {
7020
+ padding: 20,
7021
+ height: "100%",
7022
+ boxSizing: "border-box",
7023
+ display: "flex",
7024
+ flexDirection: "column",
7025
+ ...contentStyle
7026
+ },
7027
+ style: { height: "100%" },
7028
+ children: [
7029
+ chrome,
7030
+ children
7031
+ ]
7032
+ }
7033
+ )
7034
+ }
7035
+ ) })
7036
+ ] }) : null });
7037
+ });
7038
+ function SlidingPanelHeader({
7039
+ children,
7040
+ className,
7041
+ style
7042
+ }) {
7043
+ return /* @__PURE__ */ jsx(
7044
+ "div",
7045
+ {
7046
+ className: cn(className),
7047
+ style: {
7048
+ display: "flex",
7049
+ flexDirection: "column",
7050
+ gap: 6,
7051
+ marginBottom: 12,
7052
+ ...style
7053
+ },
7054
+ children
7055
+ }
7056
+ );
7057
+ }
7058
+ function SlidingPanelFooter({
7059
+ children,
7060
+ className,
7061
+ style
7062
+ }) {
7063
+ return /* @__PURE__ */ jsx(
7064
+ "div",
7065
+ {
7066
+ className: cn(className),
7067
+ style: {
7068
+ display: "flex",
7069
+ gap: 8,
7070
+ marginTop: "auto",
7071
+ paddingTop: 12,
7072
+ ...style
7073
+ },
7074
+ children
7075
+ }
7076
+ );
7077
+ }
7078
+ var SlidingPanelTitle = forwardRef(function SlidingPanelTitle2({ className, style, ...rest }, ref) {
7079
+ const sketch = useSlidingPanelSketch();
7080
+ return /* @__PURE__ */ jsx(
7081
+ Dialog.Title,
7082
+ {
7083
+ ref,
7084
+ className: cn(className),
7085
+ style: {
7086
+ margin: 0,
7087
+ fontFamily: doodleUiFontFamily,
7088
+ fontWeight: doodleUiFontWeight(700),
7089
+ fontSize: 20,
7090
+ color: sketch.ink,
7091
+ ...style
7092
+ },
7093
+ ...rest
7094
+ }
7095
+ );
7096
+ });
7097
+ var SlidingPanelDescription = forwardRef(function SlidingPanelDescription2({ className, style, ...rest }, ref) {
7098
+ const sketch = useSlidingPanelSketch();
7099
+ return /* @__PURE__ */ jsx(
7100
+ Dialog.Description,
7101
+ {
7102
+ ref,
7103
+ className: cn(className),
7104
+ style: {
7105
+ margin: 0,
7106
+ fontFamily: doodleUiFontFamily,
7107
+ fontSize: 14,
7108
+ color: sketch.ink,
7109
+ opacity: 0.75,
7110
+ ...style
7111
+ },
7112
+ ...rest
7113
+ }
7114
+ );
7115
+ });
7116
+ function Sheet({ side = "right", ...rest }) {
7117
+ return /* @__PURE__ */ jsx(SlidingPanelRoot, { side, ...rest });
7118
+ }
7119
+ var SheetTrigger = SlidingPanelTrigger;
7120
+ var SheetClose = SlidingPanelClose;
7121
+ var SheetContent = forwardRef(
7122
+ function SheetContent2(props, ref) {
7123
+ return /* @__PURE__ */ jsx(SlidingPanelContent, { ref, ...props });
7124
+ }
7125
+ );
7126
+ var SheetHeader = SlidingPanelHeader;
7127
+ var SheetFooter = SlidingPanelFooter;
7128
+ var SheetTitle = SlidingPanelTitle;
7129
+ var SheetDescription = SlidingPanelDescription;
7130
+ function Drawer(props) {
7131
+ return /* @__PURE__ */ jsx(SlidingPanelRoot, { side: "bottom", ...props });
7132
+ }
7133
+ var DrawerTrigger = SlidingPanelTrigger;
7134
+ var DrawerClose = SlidingPanelClose;
7135
+ var DrawerHandle = forwardRef(
7136
+ function DrawerHandle2({ className }, ref) {
7137
+ const sketch = useSlidingPanelSketch();
7138
+ return /* @__PURE__ */ jsx(
7139
+ "div",
7140
+ {
7141
+ ref,
7142
+ className,
7143
+ style: {
7144
+ position: "relative",
7145
+ width: 48,
7146
+ height: 10,
7147
+ margin: "0 auto 12px"
7148
+ },
7149
+ "aria-hidden": true,
7150
+ children: /* @__PURE__ */ jsx(
7151
+ RoughSvg,
7152
+ {
7153
+ shape: "line",
7154
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
7155
+ seed: deriveSeed(sketch.resolvedSeed, "drawer-handle"),
7156
+ sketchColor: sketch.sketchColor ?? SKETCH_COLORS.ink,
7157
+ bowing: sketch.bowing ?? 1.6,
7158
+ strokeWidth: 2.4,
7159
+ width: 48,
7160
+ height: 10,
7161
+ inset: 2
7162
+ }
7163
+ )
7164
+ }
7165
+ );
7166
+ }
7167
+ );
7168
+ var DrawerContent = forwardRef(
7169
+ function DrawerContent2({ children, ...rest }, ref) {
7170
+ return /* @__PURE__ */ jsx(
7171
+ SlidingPanelContent,
7172
+ {
7173
+ ref,
7174
+ chrome: /* @__PURE__ */ jsx(DrawerHandle, {}),
7175
+ contentStyle: { paddingTop: 8 },
7176
+ ...rest,
7177
+ children
7178
+ }
7179
+ );
7180
+ }
7181
+ );
7182
+ var DrawerHeader = SlidingPanelHeader;
7183
+ var DrawerFooter = SlidingPanelFooter;
7184
+ var DrawerTitle = SlidingPanelTitle;
7185
+ var DrawerDescription = SlidingPanelDescription;
5178
7186
 
5179
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, Badge, Breadcrumb, BreadcrumbItem, Button, Card, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_BOWING, DEFAULT_INK, DEFAULT_ROUGHNESS, DEFAULT_STROKE_WIDTH, DRAW_IN_ALERT_MS, DRAW_IN_DURATION_MS, DRAW_IN_MARK_MS, DRAW_IN_TOOLTIP_MS, Dialog2 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DoodleUIProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuTrigger, Input, Label2 as Label, Modal, ModalClose, ModalDescription, ModalRoot, ModalTitle, ModalTrigger, Pagination, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverTrigger, Progress, Radio, RadioGroup, RoughSvg, SKETCH_COLORS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectRoot, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SketchBox, SketchSeedProvider, Slider, Stepper, Switch, TABLE_STAGGER_MS, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow, Tabs, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Tooltip, TooltipProvider, deriveSeed, toRoughOptions, useAnimate, useDoodleUI, useDrawIn, useResolvedSeed, useSketchSeed };
7187
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, Badge, Breadcrumb, BreadcrumbItem, Button, Card, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuTrigger, DEFAULT_BOWING, DEFAULT_INK, DEFAULT_ROUGHNESS, DEFAULT_STROKE_WIDTH, DRAW_IN_ALERT_MS, DRAW_IN_DURATION_MS, DRAW_IN_MARK_MS, DRAW_IN_TOOLTIP_MS, Dialog2 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DoodleUIProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuTrigger, HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, Label2 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, ModalClose, ModalDescription, ModalRoot, ModalTitle, ModalTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuItemLink, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverTrigger, Progress, Radio, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, RoughSvg, SKETCH_COLORS, ScrollArea, ScrollAreaCorner, ScrollAreaViewport, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectRoot, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, SketchBox, SketchSeedProvider, Slider, Spinner, Stepper, Switch, TABLE_STAGGER_MS, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow, Tabs, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipProvider, deriveSeed, toRoughOptions, useAnimate, useDoodleUI, useDrawIn, useResolvedSeed, useSketchSeed };
5180
7188
  //# sourceMappingURL=index.js.map
5181
7189
  //# sourceMappingURL=index.js.map