@parrot-co/parrot-ui 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,9 +1,11 @@
1
1
  var $8zHUo$reactjsxruntime = require("react/jsx-runtime");
2
2
  var $8zHUo$react = require("react");
3
3
  var $8zHUo$reactaria = require("react-aria");
4
- var $8zHUo$reacticonshi = require("react-icons/hi");
5
4
  var $8zHUo$reactstately = require("react-stately");
5
+ var $8zHUo$reacticonshi = require("react-icons/hi");
6
6
  var $8zHUo$internationalizeddate = require("@internationalized/date");
7
+ var $8zHUo$reactstatelycolor = require("@react-stately/color");
8
+ var $8zHUo$reactariacolor = require("@react-aria/color");
7
9
 
8
10
 
9
11
  function $parcel$export(e, n, v, s) {
@@ -33,8 +35,10 @@ $parcel$export(module.exports, "Radio", () => $e158c5cf7e190200$export$d7b12c410
33
35
  $parcel$export(module.exports, "RadioGroup", () => $e158c5cf7e190200$export$a98f0dcb43a68a25);
34
36
  $parcel$export(module.exports, "RadioCard", () => $71fcf48f7e2e9427$export$f8afaea2e9656b91);
35
37
  $parcel$export(module.exports, "Select", () => $e37831ebf64d8e7d$export$ef9b1a59e592288f);
36
- $parcel$export(module.exports, "Option", () => $dcfc4542aa84c062$export$36d18380658d5d20);
37
- $parcel$export(module.exports, "Section", () => $dcfc4542aa84c062$export$6e2c8f0811a474ce);
38
+ $parcel$export(module.exports, "Option", () => $86685406b084d356$export$5b7f4051a57920d0);
39
+ $parcel$export(module.exports, "Section", () => $86685406b084d356$export$ef146090a6472d9e);
40
+ $parcel$export(module.exports, "ListBoxItem", () => $86685406b084d356$export$5b7f4051a57920d0);
41
+ $parcel$export(module.exports, "ListBoxSection", () => $86685406b084d356$export$ef146090a6472d9e);
38
42
  $parcel$export(module.exports, "DateInput", () => $e0a58c83d4c36e4e$export$7edc06cf1783b30f);
39
43
  $parcel$export(module.exports, "Calendar", () => $284d30e280d297d3$export$e1aef45b828286de);
40
44
  $parcel$export(module.exports, "Avatar", () => $2fdd5844efb4cca1$export$e2255cf6045e8d47);
@@ -44,7 +48,7 @@ $parcel$export(module.exports, "Progress", () => $e04b6210b7063851$export$b25a30
44
48
  $parcel$export(module.exports, "Loader", () => $a28e128499dd0b02$export$3b0d6d7590275603);
45
49
  $parcel$export(module.exports, "Tag", () => $cfadb0728cf907ff$export$3288d34c523a1192);
46
50
  $parcel$export(module.exports, "Switch", () => $c5c6f63b49c9056a$export$b5d5cf8927ab7262);
47
- $parcel$export(module.exports, "ColorTray", () => $de38c06a5c24ee45$export$dbada5ace43900dd);
51
+ $parcel$export(module.exports, "Slider", () => $a945a7e4eb75da9e$export$472062a354075cee);
48
52
  $parcel$export(module.exports, "IconTray", () => $43de550aebbf1320$export$50e381fea3a45244);
49
53
  $parcel$export(module.exports, "Sticker", () => $fedef2bba4e6812a$export$ea98c603db73aee7);
50
54
  $parcel$export(module.exports, "Tabs", () => $6c55ad3905040a74$export$b2539bed5023c21c);
@@ -62,6 +66,12 @@ $parcel$export(module.exports, "TagGroup", () => $d26053f02b9f370b$export$67ea30
62
66
  $parcel$export(module.exports, "TagGroupItem", () => $d26053f02b9f370b$export$a79147a60006308c);
63
67
  $parcel$export(module.exports, "ThemeProvider", () => $f2fd0cbe11b7f0dd$export$d8964aec282183a3);
64
68
  $parcel$export(module.exports, "useTheme", () => $f2fd0cbe11b7f0dd$export$93d4e7f90805808f);
69
+ $parcel$export(module.exports, "ColorArea", () => $ce7da1514c7ab67c$export$b2103f68a961418e);
70
+ $parcel$export(module.exports, "ColorField", () => $ca14d49a10ed918f$export$b865d4358897bb17);
71
+ $parcel$export(module.exports, "ColorPicker", () => $b4c448f742efa2a7$export$9feb1bc2e5f1ccb3);
72
+ $parcel$export(module.exports, "ColorSlider", () => $7796dcb4fe09bf12$export$44fd664bcca5b6fb);
73
+ $parcel$export(module.exports, "ColorSwatchPicker", () => $799f02b9b0e744b9$export$b46792416e3d8515);
74
+ $parcel$export(module.exports, "parseColor", () => $e93fd810053d36a8$export$6e865ea70d7724f);
65
75
 
66
76
 
67
77
  function $d99c85a751d7ffbd$export$7e4aa119212bc614(value) {
@@ -165,6 +175,7 @@ const $eb8f27c3596a0e6b$export$e71c4d32a2263218 = /*#__PURE__*/ $8zHUo$react.for
165
175
 
166
176
 
167
177
 
178
+
168
179
  const $8ddcc69383feb36a$export$36308cce1deef340 = [
169
180
  "tomato",
170
181
  "red",
@@ -206,6 +217,9 @@ function $8ddcc69383feb36a$var$ps(styles) {
206
217
  }
207
218
 
208
219
 
220
+ function $4af7da5c7dd0b9c2$export$1c4d39b152e0f791(deprecatedProp, newProp, value) {
221
+ if (!(0, $d99c85a751d7ffbd$export$ae45edb09e2fe7c2)(value)) console.warn(`${deprecatedProp} is deprecated and will be removed in a future release. ${newProp ? `Please use ${newProp} instead.` : ""}`);
222
+ }
209
223
  function $4af7da5c7dd0b9c2$export$d41d9ab3de2def3d(text) {
210
224
  const str = String(text);
211
225
  let hash = 0;
@@ -302,6 +316,9 @@ const $c3a954a7c0cb5109$export$f51f4c4ede09e011 = /*#__PURE__*/ $8zHUo$react.for
302
316
 
303
317
 
304
318
 
319
+
320
+
321
+
305
322
  const $88fa102d91bf323a$export$f5a10939c0132d55 = (props, ref)=>{
306
323
  const { textCase: textCase, size: size = "sm", weight: weight, color: color = "gray", variant: variant = "default", highlight: highlight, align: align, lineHeight: lineHeight, underline: underline, italic: italic, as: Comp = "span", className: className, ...rest } = props;
307
324
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)(Comp, {
@@ -328,6 +345,7 @@ const $88fa102d91bf323a$export$5f1af8db9871e1d6 = /*#__PURE__*/ $8zHUo$react.for
328
345
 
329
346
  const $5a5b41d120374960$var$InputLabel = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ children: children, className: className, color: color, ...props }, ref)=>{
330
347
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
348
+ ref: ref,
331
349
  size: "sm",
332
350
  color: color || "gray",
333
351
  variant: "light",
@@ -378,7 +396,7 @@ const $eae337549f49a5a2$var$SpaceContext = /*#__PURE__*/ $8zHUo$react.createCont
378
396
  classNames: {},
379
397
  compactItemWrapperAdjust: ""
380
398
  });
381
- function $eae337549f49a5a2$var$SpaceComponent({ children: children, compact: compact, gap: gap, className: className, ...props }, ref) {
399
+ function $eae337549f49a5a2$export$eef1e68107c58ef2({ children: children, compact: compact, gap: gap, className: className, classNames: classNames, style: style, styles: styles, ...props }) {
382
400
  const childrenCount = $8zHUo$react.Children.count(children);
383
401
  const nodes = $8zHUo$react.useMemo(()=>{
384
402
  return $8zHUo$react.Children.map(children, (child, index)=>{
@@ -400,20 +418,22 @@ function $eae337549f49a5a2$var$SpaceComponent({ children: children, compact: com
400
418
  }, [
401
419
  children
402
420
  ]);
403
- const realGap = compact ? "none" : gap;
404
421
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
405
422
  "data-compact": compact,
423
+ style: {
424
+ ...style,
425
+ ...styles?.wrapper
426
+ },
406
427
  className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
407
428
  className,
408
- "p-space"
429
+ "p-space",
430
+ classNames?.wrapper
409
431
  ]),
410
- ref: ref,
411
- gap: realGap,
432
+ gap: gap ?? "none",
412
433
  ...props,
413
434
  children: nodes
414
435
  });
415
436
  }
416
- const $eae337549f49a5a2$export$eef1e68107c58ef2 = /*#__PURE__*/ $8zHUo$react.forwardRef($eae337549f49a5a2$var$SpaceComponent);
417
437
  function $eae337549f49a5a2$export$450c36e0b0e62ccd() {
418
438
  return $8zHUo$react.useContext($eae337549f49a5a2$var$SpaceContext);
419
439
  }
@@ -450,37 +470,35 @@ function $f2fd0cbe11b7f0dd$export$93d4e7f90805808f(options) {
450
470
 
451
471
 
452
472
 
453
- const $d9ffc65197682590$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ label: label, error: error, color: color = "gray", appearance: appearance = "outline", size: size = "sm", append: append, prepend: prepend, description: description, isDisabled: isDisabled, validationStatus: validationStatus, className: className, inputRef: inputRef, radius: radius, style: style, ...props }, ref)=>{
473
+ function $ec2376a5dd0d13e6$export$a455218a85c89869({ label: label, description: description, error: error, color: color = "gray", radius: radius, size: size = "md", className: className, classNames: classNames, style: style, styles: styles, prepend: prepend, append: append, appearance: appearance = "outline", validationStatus: validationStatus, labelProps: labelProps, errorMessageProps: errorMessageProps, descriptionProps: descriptionProps, children: children, replaceDefaultControlWrapper: replaceDefaultControlWrapper, isDisabled: isDisabled, wrapperRef: wrapperRef, ...props }) {
454
474
  const space = (0, $eae337549f49a5a2$export$450c36e0b0e62ccd)();
455
- const internalInputRef = (0, ($parcel$interopDefault($8zHUo$react))).useRef(null);
456
- const { labelProps: labelProps, inputProps: inputProps, errorMessageProps: errorMessageProps, descriptionProps: descriptionProps } = (0, $8zHUo$reactaria.useTextField)({
457
- ...props,
458
- inputElementType: "input",
459
- label: label,
460
- description: description,
461
- isDisabled: isDisabled
462
- }, internalInputRef);
463
475
  const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
464
476
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
477
+ ref: wrapperRef,
478
+ ...props,
465
479
  "data-color": color,
466
480
  "data-radius": radius ?? theme?.radius ?? "lg",
467
481
  "data-size": size,
468
- className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-input-group", space.compactItemWrapperAdjust, className),
482
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-input-group", space.compactItemWrapperAdjust, className, classNames?.wrapper),
469
483
  stack: true,
470
- ref: ref,
471
484
  gap: "3xs",
472
- stretchX: true,
473
- style: style,
485
+ style: {
486
+ ...style,
487
+ ...styles?.wrapper
488
+ },
474
489
  children: [
475
490
  label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
491
+ style: styles?.label,
492
+ className: classNames?.label,
476
493
  color: color,
477
494
  ...labelProps,
478
495
  children: label
479
496
  }),
480
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
497
+ !replaceDefaultControlWrapper && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
481
498
  className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(space.classNames, "p-input-control"),
482
499
  "data-has-error": !!error,
483
500
  "data-appearance": appearance,
501
+ "data-disabled": isDisabled,
484
502
  stretchX: true,
485
503
  inline: true,
486
504
  position: "relative",
@@ -489,19 +507,14 @@ const $d9ffc65197682590$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
489
507
  className: "add-on add-on-left",
490
508
  children: prepend
491
509
  }),
492
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
493
- ref: (0, $62f1c614c0962470$export$c9058316764c140e)(internalInputRef, inputRef),
494
- "data-has-left-addon": !!prepend,
495
- "data-has-right-addon": !!append,
496
- className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-text-input-el"),
497
- ...inputProps
498
- }),
510
+ children,
499
511
  append && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
500
512
  className: "add-on add-on-right",
501
513
  children: append
502
514
  })
503
515
  ]
504
516
  }),
517
+ replaceDefaultControlWrapper && children,
505
518
  error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
506
519
  validationStatus: validationStatus,
507
520
  ...errorMessageProps,
@@ -512,14 +525,40 @@ const $d9ffc65197682590$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
512
525
  variant: "light",
513
526
  color: "gray",
514
527
  size: "sm",
515
- lineHeight: "base",
528
+ lineHeight: "short",
516
529
  ...descriptionProps,
517
530
  children: description
518
531
  })
519
532
  ]
520
533
  });
521
- });
522
- $d9ffc65197682590$export$f5b8910cec6cf069.displayName = "Input";
534
+ }
535
+ $ec2376a5dd0d13e6$export$a455218a85c89869.displayName = "Field";
536
+
537
+
538
+ function $d9ffc65197682590$export$f5b8910cec6cf069({ className: className, classNames: classNames, style: style, styles: styles, inputRef: inputRef, ...props }) {
539
+ const internalInputRef = (0, ($parcel$interopDefault($8zHUo$react))).useRef(null);
540
+ const { labelProps: labelProps, inputProps: inputProps, errorMessageProps: errorMessageProps, descriptionProps: descriptionProps } = (0, $8zHUo$reactaria.useTextField)({
541
+ ...props,
542
+ inputElementType: "input"
543
+ }, internalInputRef);
544
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $ec2376a5dd0d13e6$export$a455218a85c89869), {
545
+ labelProps: labelProps,
546
+ descriptionProps: descriptionProps,
547
+ errorMessageProps: errorMessageProps,
548
+ className: className,
549
+ classNames: classNames,
550
+ styles: styles,
551
+ style: style,
552
+ ...props,
553
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
554
+ ref: (0, $62f1c614c0962470$export$c9058316764c140e)(internalInputRef, inputRef),
555
+ "data-has-left-addon": !!props.prepend,
556
+ "data-has-right-addon": !!props.append,
557
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-text-input-el"),
558
+ ...inputProps
559
+ })
560
+ });
561
+ }
523
562
 
524
563
 
525
564
 
@@ -647,7 +686,7 @@ const $5a6f28f3fd58ff6e$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$int
647
686
  const space = (0, $eae337549f49a5a2$export$450c36e0b0e62ccd)();
648
687
  const buttonGroupProps = (0, $7f70742e736041ff$export$749e21be8b14b968)();
649
688
  const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
650
- const { color: color = theme?.color ?? "violet", variant: variant = "solid", append: append, prepend: prepend, size: size = "md", children: children, as: as = "button", className: className, isLoading: isLoading, radius: radius = "full", isToggle: isToggle, activeColor: activeColor = theme?.color, activeVariant: activeVariant = "solid", idleColor: idleColor = "gray", idleVariant: idleVariant = "outline", isIconButton: isIconButton, style: style, ...otherProps } = {
689
+ const { color: color = theme?.color ?? "violet", variant: variant = "solid", append: append, prepend: prepend, size: size = "md", children: children, as: as = "button", className: className, isLoading: isLoading, radius: radius = "full", isToggle: isToggle, activeColor: activeColor = theme?.color, activeVariant: activeVariant = "solid", idleColor: idleColor = "gray", idleVariant: idleVariant = "outline", isIconButton: isIconButton, style: style, classNames: classNames, styles: styles, form: form, ...otherProps } = {
651
690
  ...buttonGroupProps,
652
691
  ...props
653
692
  };
@@ -678,7 +717,10 @@ const $5a6f28f3fd58ff6e$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$int
678
717
  }
679
718
  const Comp = as;
680
719
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)(Comp, {
681
- style: style,
720
+ style: {
721
+ ...style,
722
+ ...styles?.base
723
+ },
682
724
  "data-is-toggle": isToggle,
683
725
  "data-pressed": isPressed,
684
726
  "data-radius": radius,
@@ -690,20 +732,19 @@ const $5a6f28f3fd58ff6e$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$int
690
732
  "data-selected": state.isSelected,
691
733
  className: (0, $62f1c614c0962470$export$a274e22fb40f762e)((0, $4af7da5c7dd0b9c2$export$2db1d02db18b2d82)("size", size), className, "p-button", space.classNames),
692
734
  ref: (0, $62f1c614c0962470$export$c9058316764c140e)(ref, buttonRef),
693
- form: otherProps.form,
735
+ form: form,
694
736
  ...buttonProps,
695
737
  children: [
696
738
  prepend,
697
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("span", {
698
- style: {
699
- padding: isIconButton ? undefined : "0 6px",
700
- lineHeight: 0
701
- },
702
- children: children
703
- }),
739
+ children,
704
740
  isLoading ? /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $a28e128499dd0b02$export$3b0d6d7590275603), {
741
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
742
+ "p-button-loader",
743
+ classNames?.loader
744
+ ]),
705
745
  style: {
706
- marginLeft: 8
746
+ marginLeft: 8,
747
+ ...styles?.loader
707
748
  },
708
749
  color: "inherit",
709
750
  size: "xs"
@@ -737,88 +778,73 @@ $3af04cd154cf4de1$export$c25acd513dcc8062.displayName = "IconButton";
737
778
 
738
779
 
739
780
 
740
-
741
-
742
-
743
-
744
- const $77c71203b3212c65$export$6bf0cd3a219bbade = /*#__PURE__*/ $8zHUo$react.forwardRef((props, ref)=>{
745
- const { appearance: appearance = "outline", size: size = "md", color: color = "gray", className: className, append: append, prepend: prepend, placeholder: placeholder, showSteppers: showSteppers = false, radius: radius, ...rest } = props;
781
+ function $77c71203b3212c65$export$6bf0cd3a219bbade({ appearance: appearance = "outline", size: size = "md", color: color = "gray", classNames: classNames, styles: styles, append: append, prepend: prepend, placeholder: placeholder, showSteppers: showSteppers = false, error: error, label: label, minValue: minValue, maxValue: maxValue, formatOptions: formatOptions, inputRef: inputRef, incrementIcon: incrementIcon, decrementIcon: decrementIcon, ...props }) {
782
+ const ariaProps = {
783
+ ...props,
784
+ maxValue: maxValue,
785
+ formatOptions: formatOptions,
786
+ minValue: minValue,
787
+ "aria-label": props["aria-label"] ?? "number input"
788
+ };
746
789
  const space = (0, $eae337549f49a5a2$export$450c36e0b0e62ccd)();
747
790
  const internalInputRef = $8zHUo$react.useRef(null);
748
791
  const { locale: locale } = (0, $8zHUo$reactaria.useLocale)();
749
792
  const state = (0, $8zHUo$reactstately.useNumberFieldState)({
750
- ...rest,
793
+ ...ariaProps,
751
794
  locale: locale
752
795
  });
753
- const { errorMessageProps: errorMessageProps, descriptionProps: descriptionProps, labelProps: labelProps, groupProps: groupProps, inputProps: inputProps, incrementButtonProps: incrementButtonProps, decrementButtonProps: decrementButtonProps } = (0, $8zHUo$reactaria.useNumberField)(rest, state, internalInputRef);
754
- const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
755
- return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
756
- stack: true,
757
- gap: "3xs",
758
- ref: ref,
759
- "data-radius": radius ?? theme?.radius ?? "lg",
760
- "data-color": color,
761
- "data-size": size,
762
- stretchX: true,
763
- className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-input-group", space.compactItemWrapperAdjust),
764
- children: [
765
- rest.label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
766
- ...labelProps,
767
- children: rest.label
768
- }),
769
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
770
- gap: "4xs",
771
- ...groupProps,
772
- className: "p-input-container",
773
- children: [
774
- showSteppers && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $3af04cd154cf4de1$export$c25acd513dcc8062), {
775
- ...decrementButtonProps,
776
- radius: "md",
777
- color: color,
778
- variant: "outline",
779
- size: size,
780
- children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiMinus), {
781
- size: 20
782
- })
783
- }),
784
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
785
- ref: (0, $62f1c614c0962470$export$c9058316764c140e)(internalInputRef, ref),
786
- placeholder: placeholder,
787
- className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-input-control", "space-item", className, space.classNames),
788
- "data-appearance": appearance,
789
- "data-has-left-addon": !!prepend,
790
- "data-has-right-addon": !!append,
791
- type: "text",
792
- ...inputProps
793
- }),
794
- showSteppers && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $3af04cd154cf4de1$export$c25acd513dcc8062), {
795
- ...incrementButtonProps,
796
- radius: "md",
797
- color: color,
798
- variant: "outline",
799
- size: size,
800
- children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiPlus), {})
801
- })
802
- ]
803
- }),
804
- rest.description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
805
- weight: "regular",
806
- size: "sm",
807
- color: "gray",
808
- variant: "light",
809
- lineHeight: "base",
810
- ...descriptionProps,
811
- as: "div",
812
- children: rest.description
813
- }),
814
- rest.error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
815
- ...errorMessageProps,
816
- children: rest.error
817
- })
818
- ]
796
+ const { errorMessageProps: errorMessageProps, descriptionProps: descriptionProps, labelProps: labelProps, groupProps: groupProps, inputProps: inputProps, incrementButtonProps: incrementButtonProps, decrementButtonProps: decrementButtonProps } = (0, $8zHUo$reactaria.useNumberField)(ariaProps, state, internalInputRef);
797
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $ec2376a5dd0d13e6$export$a455218a85c89869), {
798
+ classNames: classNames,
799
+ color: color,
800
+ size: size,
801
+ labelProps: labelProps,
802
+ descriptionProps: descriptionProps,
803
+ errorMessageProps: errorMessageProps,
804
+ error: error,
805
+ label: label,
806
+ replaceDefaultControlWrapper: true,
807
+ ...props,
808
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
809
+ gap: "4xs",
810
+ ...groupProps,
811
+ className: "p-input-container",
812
+ children: [
813
+ showSteppers && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $3af04cd154cf4de1$export$c25acd513dcc8062), {
814
+ ...decrementButtonProps,
815
+ radius: "md",
816
+ color: color,
817
+ variant: "outline",
818
+ size: size,
819
+ className: classNames?.decrement,
820
+ style: styles?.decrement,
821
+ children: decrementIcon
822
+ }),
823
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
824
+ style: styles?.input,
825
+ ref: (0, $62f1c614c0962470$export$c9058316764c140e)(internalInputRef, inputRef),
826
+ placeholder: placeholder,
827
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(classNames?.input, "p-input-control", "space-item", space.classNames),
828
+ "data-appearance": appearance,
829
+ "data-has-left-addon": !!prepend,
830
+ "data-has-right-addon": !!append,
831
+ type: "text",
832
+ ...inputProps
833
+ }),
834
+ showSteppers && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $3af04cd154cf4de1$export$c25acd513dcc8062), {
835
+ ...incrementButtonProps,
836
+ radius: "md",
837
+ color: color,
838
+ variant: "outline",
839
+ size: size,
840
+ className: classNames?.increment,
841
+ style: styles?.increment,
842
+ children: incrementIcon
843
+ })
844
+ ]
845
+ })
819
846
  });
820
- });
821
- $77c71203b3212c65$export$6bf0cd3a219bbade.displayName = "NumberInput";
847
+ }
822
848
 
823
849
 
824
850
 
@@ -826,10 +852,10 @@ $77c71203b3212c65$export$6bf0cd3a219bbade.displayName = "NumberInput";
826
852
 
827
853
 
828
854
 
829
- const $868b95cd1882a2c1$export$b28585a458fee016 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef((props, ref)=>{
855
+ function $868b95cd1882a2c1$export$b28585a458fee016({ wrapperRef: wrapperRef, ...props }) {
830
856
  const [showPassword, setShowPassword] = (0, ($parcel$interopDefault($8zHUo$react))).useState(false);
831
857
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $d9ffc65197682590$export$f5b8910cec6cf069), {
832
- ref: ref,
858
+ wrapperRef: wrapperRef,
833
859
  ...props,
834
860
  type: showPassword ? "text" : "password",
835
861
  append: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $3af04cd154cf4de1$export$c25acd513dcc8062), {
@@ -841,8 +867,7 @@ const $868b95cd1882a2c1$export$b28585a458fee016 = /*#__PURE__*/ (0, ($parcel$int
841
867
  })
842
868
  })
843
869
  });
844
- });
845
- $868b95cd1882a2c1$export$b28585a458fee016.displayName = "PasswordInput";
870
+ }
846
871
 
847
872
 
848
873
 
@@ -968,7 +993,7 @@ $0f8ef6f4acac1766$export$4aa08d5625cb8ead.displayName = "CheckboxGroup";
968
993
 
969
994
 
970
995
  const $f88e10ca2ba68239$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef((props, ref)=>{
971
- const { appearance: appearance, size: size, shape: shape = "round", color: color, className: className, ...otherProps } = props;
996
+ const { appearance: appearance, size: size, shape: shape = "round", color: color, className: className, classNames: classNames, styles: styles, style: style, ...otherProps } = props;
972
997
  // check if checkbox is rendered in a group context
973
998
  const groupContext = (0, ($parcel$interopDefault($8zHUo$react))).useContext((0, $0f8ef6f4acac1766$export$f9c6924e160136d1));
974
999
  const groupState = groupContext?.state;
@@ -992,7 +1017,11 @@ const $f88e10ca2ba68239$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
992
1017
  const resolvedAppearance = appearance || groupProps?.appearance || "outline";
993
1018
  const resolvedSize = size || groupProps?.size || "md";
994
1019
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
995
- className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-checkbox"),
1020
+ style: {
1021
+ ...style,
1022
+ ...styles?.wrapper
1023
+ },
1024
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-checkbox", classNames?.wrapper),
996
1025
  "data-disabled": inputProps?.disabled,
997
1026
  ref: ref,
998
1027
  children: [
@@ -1005,9 +1034,16 @@ const $f88e10ca2ba68239$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
1005
1034
  })
1006
1035
  }),
1007
1036
  /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
1037
+ style: {
1038
+ ...style,
1039
+ ...styles?.checkbox
1040
+ },
1008
1041
  "data-color": resolvedColor,
1009
1042
  "data-radius": getRadius(),
1010
- className: "p-fake-checkbox",
1043
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
1044
+ "p-fake-checkbox",
1045
+ classNames?.checkbox
1046
+ ]),
1011
1047
  "data-focused": isFocusVisible,
1012
1048
  "aria-hidden": "true",
1013
1049
  "data-checked": isSelected && !props.isIndeterminate,
@@ -1016,6 +1052,10 @@ const $f88e10ca2ba68239$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
1016
1052
  "data-appearance": resolvedAppearance,
1017
1053
  children: [
1018
1054
  isSelected && !props.isIndeterminate && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("svg", {
1055
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
1056
+ "p-checkbox-icon",
1057
+ classNames?.icon
1058
+ ]),
1019
1059
  stroke: "white",
1020
1060
  width: "0.75rem",
1021
1061
  height: "0.75rem",
@@ -1032,6 +1072,10 @@ const $f88e10ca2ba68239$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
1032
1072
  })
1033
1073
  }),
1034
1074
  props.isIndeterminate && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $eb8f27c3596a0e6b$export$e71c4d32a2263218), {
1075
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
1076
+ "p-checkbox-icon",
1077
+ classNames?.icon
1078
+ ]),
1035
1079
  style: {
1036
1080
  background: "var(--color-12)",
1037
1081
  width: "70%",
@@ -1062,25 +1106,39 @@ $f88e10ca2ba68239$export$48513f6b9f8ce62d.displayName = "checkbox";
1062
1106
 
1063
1107
 
1064
1108
 
1065
- function $9a1eb1c261c8b852$export$91527519cfe8e396({ state: state, children: children, popoverRef: popoverRef, ...props }) {
1109
+ function $9a1eb1c261c8b852$export$91527519cfe8e396({ state: state, children: children, popoverRef: popoverRef, style: style, styles: styles, classNames: classNames, className: className, ...props }) {
1066
1110
  const internalPopoverRef = $8zHUo$react.useRef(null);
1067
1111
  const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
1068
1112
  const { popoverProps: popoverProps, underlayProps: underlayProps } = (0, $8zHUo$reactaria.usePopover)({
1069
1113
  ...props,
1070
1114
  popoverRef: internalPopoverRef
1071
1115
  }, state);
1116
+ const { style: internalStyle, ...otherPopoverProps } = popoverProps;
1072
1117
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $8zHUo$reactaria.Overlay), {
1073
1118
  children: [
1074
1119
  /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
1075
1120
  ...underlayProps,
1076
- className: "underlay"
1121
+ style: styles?.underlay,
1122
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
1123
+ "underlay",
1124
+ classNames?.underlay
1125
+ ])
1077
1126
  }),
1078
1127
  /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
1079
1128
  "data-color": theme?.color,
1080
1129
  "data-radius": theme?.radius,
1081
- ...popoverProps,
1082
1130
  ref: (0, $62f1c614c0962470$export$c9058316764c140e)(popoverRef, internalPopoverRef),
1083
- className: "p-popover",
1131
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
1132
+ "p-popover",
1133
+ className,
1134
+ classNames?.wrapper
1135
+ ]),
1136
+ style: {
1137
+ ...internalStyle,
1138
+ ...style,
1139
+ ...styles?.wrapper
1140
+ },
1141
+ ...otherPopoverProps,
1084
1142
  children: children
1085
1143
  })
1086
1144
  ]
@@ -1334,30 +1392,38 @@ const $3b903582a5253460$export$e44a253a59704894 = {
1334
1392
 
1335
1393
 
1336
1394
 
1337
- function $fc43ab93aaa777d9$export$3d7d0414f6db67e7({ children: children, renderOption: renderOption, valueKey: valueKey, sectionKey: sectionKey, getSectionLabel: getSectionLabel, labelKey: labelKey, items: items }) {
1395
+ const $86685406b084d356$export$5b7f4051a57920d0 = (0, $8zHUo$reactstately.Item);
1396
+ const $86685406b084d356$export$ef146090a6472d9e = (0, $8zHUo$reactstately.Section);
1397
+
1398
+
1399
+ function $fc43ab93aaa777d9$export$3d7d0414f6db67e7({ children: children, renderOption: renderOption, valueKey: valueKey, sectionKey: sectionKey, renderSectionLabel: renderSectionLabel, labelKey: labelKey, items: items }) {
1338
1400
  const hasChildren = $8zHUo$react.Children.count(children) > 0;
1339
1401
  if (hasChildren) return children;
1340
1402
  if (items) // eslint-disable-next-line react/display-name
1341
1403
  return (item)=>{
1342
1404
  const label = item?.[labelKey ?? "label"];
1343
- const value = item?.[valueKey ?? "id"];
1405
+ const value = item?.[valueKey ?? "id" ?? "key" ?? "value"];
1344
1406
  const sectionChildren = item?.[sectionKey ?? "children"] ?? [];
1345
- if (item?.[sectionKey]) return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $dcfc4542aa84c062$export$6e2c8f0811a474ce), {
1407
+ if (item?.[sectionKey]) return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $86685406b084d356$export$ef146090a6472d9e), {
1346
1408
  items: sectionChildren,
1347
- title: getSectionLabel?.(item),
1348
- children: (item)=>/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $dcfc4542aa84c062$export$36d18380658d5d20), {
1409
+ title: renderSectionLabel?.(item),
1410
+ children: (item)=>/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $86685406b084d356$export$5b7f4051a57920d0), {
1349
1411
  textValue: item?.[labelKey ?? "label"],
1350
- children: item?.[labelKey ?? "label"] ?? renderOption?.(item)
1351
- }, item?.[valueKey ?? "id"])
1412
+ children: renderOption?.(item) ?? item?.[labelKey ?? "label"]
1413
+ }, item?.[valueKey ?? "id" ?? "key" ?? "value"])
1352
1414
  }, value);
1353
- return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $dcfc4542aa84c062$export$36d18380658d5d20), {
1415
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $86685406b084d356$export$5b7f4051a57920d0), {
1354
1416
  textValue: label,
1355
1417
  children: renderOption?.(item) ?? label
1356
- }, item?.[valueKey ?? "id"]);
1418
+ }, value);
1357
1419
  };
1358
1420
  }
1359
-
1360
-
1421
+ function $fc43ab93aaa777d9$export$4c687b6f1150e71b(props) {
1422
+ const children = $8zHUo$react.useMemo(()=>{
1423
+ return $fc43ab93aaa777d9$export$3d7d0414f6db67e7(props);
1424
+ }, []);
1425
+ return children;
1426
+ }
1361
1427
 
1362
1428
 
1363
1429
 
@@ -1372,70 +1438,74 @@ function $71edc9998a9f3b41$export$1e60abce570c2b01(props) {
1372
1438
  });
1373
1439
  }
1374
1440
  function $71edc9998a9f3b41$export$961f16f221737ce2() {
1375
- const context = $8zHUo$react.useContext($71edc9998a9f3b41$var$ListBoxContext);
1376
- if (!context) throw new Error("ListBox components must be rendered within the ListBoxProvider");
1377
- return context;
1441
+ const ctx = $8zHUo$react.useContext($71edc9998a9f3b41$var$ListBoxContext);
1442
+ if (!ctx) throw new Error("ListBox components must be rendered within the ListBoxProvider");
1443
+ return ctx;
1378
1444
  }
1379
1445
 
1380
1446
 
1381
1447
 
1382
1448
 
1383
- function $dcfc4542aa84c062$export$41f133550aa26f48({ state: state, color: color, width: width = 300, showSelectedMarker: showSelectedMarker = true, listBoxRef: listBoxRef, ...props }) {
1449
+ function $dcfc4542aa84c062$export$41f133550aa26f48({ state: state, color: color, width: width = 300, listBoxRef: listBoxRef, renderEmpty: renderEmpty, classNames: classNames, className: className, style: style, styles: styles, ...props }) {
1450
+ const children = (0, $fc43ab93aaa777d9$export$4c687b6f1150e71b)(props);
1384
1451
  const internalState = (0, $8zHUo$reactstately.useListState)({
1385
1452
  ...props,
1386
- children: (0, $fc43ab93aaa777d9$export$3d7d0414f6db67e7)(props)
1453
+ children: children
1387
1454
  });
1388
1455
  const listRef = $8zHUo$react.useRef(null);
1389
1456
  const listState = state || internalState;
1390
- const { listBoxProps: listBoxProps } = (0, $8zHUo$reactaria.useListBox)(props, listState, listRef);
1457
+ const { listBoxProps: listBoxProps } = (0, $8zHUo$reactaria.useListBox)({
1458
+ ...props,
1459
+ label: props.label ?? "Select an option"
1460
+ }, listState, listRef);
1391
1461
  const options = [
1392
1462
  ...listState.collection
1393
1463
  ];
1394
1464
  const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
1465
+ function renderEmptyState() {
1466
+ return renderEmpty?.() ?? /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
1467
+ color: "gray",
1468
+ variant: "lighter",
1469
+ children: "No options"
1470
+ });
1471
+ }
1395
1472
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $71edc9998a9f3b41$export$1e60abce570c2b01), {
1396
1473
  ...props,
1397
- showSelectedMarker: showSelectedMarker,
1398
- children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1399
- "data-color": color ?? theme?.color ?? "gray",
1474
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1475
+ as: "ul",
1476
+ stack: true,
1477
+ gap: "none",
1478
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-list-box-wrapper", classNames?.wrapper, className),
1479
+ ref: (0, $62f1c614c0962470$export$c9058316764c140e)(listRef, listBoxRef),
1480
+ "data-radius": "lg",
1481
+ "data-color": color ?? theme?.color,
1400
1482
  style: {
1401
1483
  width: width,
1402
- minWidth: 300
1484
+ ...style,
1485
+ ...styles?.wrapper
1403
1486
  },
1404
- stack: true,
1405
- gap: "md",
1406
- children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1407
- as: "ul",
1408
- stack: true,
1409
- gap: "none",
1410
- className: "p-list-box-wrapper",
1411
- ref: (0, $62f1c614c0962470$export$c9058316764c140e)(listRef, listBoxRef),
1412
- "data-radius": "lg",
1413
- ...listBoxProps,
1414
- children: [
1415
- options.length === 0 && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1416
- justify: "center",
1417
- align: "center",
1418
- style: {
1419
- height: 50
1420
- },
1421
- children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
1422
- color: "gray",
1423
- variant: "light",
1424
- align: "center",
1425
- children: "No Options"
1426
- })
1427
- }),
1428
- options.map((item)=>{
1429
- return item.type === "section" ? /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($dcfc4542aa84c062$var$ListSection, {
1430
- section: item,
1431
- state: listState
1432
- }, item.key) : /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($dcfc4542aa84c062$var$ListOption, {
1433
- state: listState,
1434
- item: item
1435
- }, item.key);
1436
- })
1437
- ]
1438
- })
1487
+ ...listBoxProps,
1488
+ children: [
1489
+ options.length === 0 && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1490
+ justify: "center",
1491
+ align: "center",
1492
+ style: {
1493
+ height: 50
1494
+ },
1495
+ children: renderEmptyState()
1496
+ }),
1497
+ options.map((item)=>{
1498
+ return item.type === "section" ? /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($dcfc4542aa84c062$var$ListSection, {
1499
+ className: classNames?.section,
1500
+ section: item,
1501
+ state: listState
1502
+ }, item.key) : /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($dcfc4542aa84c062$var$ListOption, {
1503
+ className: classNames?.option,
1504
+ state: listState,
1505
+ item: item
1506
+ }, item.key);
1507
+ })
1508
+ ]
1439
1509
  })
1440
1510
  });
1441
1511
  }
@@ -1444,24 +1514,30 @@ function $dcfc4542aa84c062$var$ListOption({ state: state, item: item }) {
1444
1514
  const { optionProps: optionProps, isDisabled: isDisabled, isFocusVisible: isFocusVisible, isFocused: isFocused, isPressed: isPressed, isSelected: isSelected } = (0, $8zHUo$reactaria.useOption)({
1445
1515
  key: item.key
1446
1516
  }, state, optionRef);
1447
- const listBoxContext = (0, $71edc9998a9f3b41$export$961f16f221737ce2)();
1517
+ const { showSelectionIndicator: showSelectionIndicator = true, renderSelectionIndicator: renderSelectionIndicator } = (0, $71edc9998a9f3b41$export$961f16f221737ce2)().props;
1518
+ const { className: className, classNames: classNames, style: style, styles: styles, color: color, textValue: textValue, title: title, ...otherProps } = item.props;
1448
1519
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("li", {
1449
- className: "p-list-option",
1520
+ style: {
1521
+ ...style,
1522
+ ...styles?.wrapper
1523
+ },
1524
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-list-option", classNames?.wrapper),
1450
1525
  "data-disabled": isDisabled,
1451
1526
  "data-focus-visible": isFocusVisible,
1452
1527
  "data-focused": isFocused,
1453
1528
  "data-pressed": isPressed,
1454
1529
  "data-selected": isSelected,
1530
+ "data-color": color,
1455
1531
  ...optionProps,
1456
- ...(0, $ff6fce0e059b3a1a$export$30a06c8d3562193f)(item.props, [
1457
- "textValue"
1458
- ]),
1532
+ ...otherProps,
1459
1533
  ref: optionRef,
1534
+ "data-text-value": textValue,
1535
+ "data-title": title,
1460
1536
  children: [
1461
1537
  item.rendered,
1462
- isSelected && listBoxContext.props.showSelectedMarker && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiCheck), {
1463
- className: "selected-marker"
1464
- })
1538
+ isSelected && showSelectionIndicator && (renderSelectionIndicator?.(item) ?? /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
1539
+ children: "/"
1540
+ }))
1465
1541
  ]
1466
1542
  });
1467
1543
  }
@@ -1471,19 +1547,25 @@ function $dcfc4542aa84c062$var$ListSection({ state: state, section: section }) {
1471
1547
  "aria-label": section["aria-label"]
1472
1548
  });
1473
1549
  const listBoxContext = (0, $71edc9998a9f3b41$export$961f16f221737ce2)();
1474
- function getChildren() {
1550
+ const { className: className, classNames: classNames, style: style, styles: styles } = section.props;
1551
+ const children = $8zHUo$react.useMemo(()=>{
1475
1552
  if (state.collection.getChildren) return [
1476
1553
  ...state.collection.getChildren(section.key)
1477
1554
  ];
1478
1555
  return [];
1479
- }
1556
+ }, []);
1480
1557
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1481
1558
  gap: "sm",
1482
1559
  stack: true,
1483
- className: "p-list-section",
1560
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-list-section", classNames?.wrapper),
1561
+ style: {
1562
+ ...style,
1563
+ ...styles?.wrapper
1564
+ },
1484
1565
  children: [
1485
- section.key !== state.collection.getFirstKey() && listBoxContext.props.showSeparator && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("li", {
1486
- className: "p-list-separator"
1566
+ section.key !== state.collection.getFirstKey() && listBoxContext.props.showSectionSeparator && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("li", {
1567
+ style: styles?.separator,
1568
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-list-separator", classNames?.separator)
1487
1569
  }),
1488
1570
  /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1489
1571
  gap: "none",
@@ -1491,20 +1573,18 @@ function $dcfc4542aa84c062$var$ListSection({ state: state, section: section }) {
1491
1573
  as: "li",
1492
1574
  ...itemProps,
1493
1575
  children: [
1494
- section.rendered && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
1495
- className: "p-list-section-header",
1496
- children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
1497
- weight: "regular",
1498
- size: "xs",
1499
- as: "div",
1500
- variant: "light",
1501
- ...headingProps,
1502
- children: section.rendered
1503
- })
1576
+ section.rendered && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
1577
+ style: styles?.heading,
1578
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-list-section-header", classNames?.heading),
1579
+ as: "div",
1580
+ variant: "light",
1581
+ ...headingProps,
1582
+ children: section.rendered
1504
1583
  }),
1505
1584
  /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("ul", {
1585
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(classNames?.items),
1506
1586
  ...groupProps,
1507
- children: getChildren().map((node)=>{
1587
+ children: children.map((node)=>{
1508
1588
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($dcfc4542aa84c062$var$ListOption, {
1509
1589
  item: node,
1510
1590
  state: state
@@ -1516,8 +1596,7 @@ function $dcfc4542aa84c062$var$ListSection({ state: state, section: section }) {
1516
1596
  ]
1517
1597
  });
1518
1598
  }
1519
- const $dcfc4542aa84c062$export$36d18380658d5d20 = (0, $8zHUo$reactstately.Item);
1520
- const $dcfc4542aa84c062$export$6e2c8f0811a474ce = (0, $8zHUo$reactstately.Section);
1599
+
1521
1600
 
1522
1601
 
1523
1602
 
@@ -1790,7 +1869,6 @@ $71fcf48f7e2e9427$export$f8afaea2e9656b91.displayName = "RadioCard";
1790
1869
 
1791
1870
 
1792
1871
 
1793
-
1794
1872
  const $cfadb0728cf907ff$export$3288d34c523a1192 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ prepend: prepend, append: append, children: children, hashValue: hashValue, color: color, size: size = "sm", shape: shape = "rounded", variant: variant = "light", className: className, ...props }, ref)=>{
1795
1873
  const randomColor = (0, ($parcel$interopDefault($8zHUo$react))).useMemo(()=>{
1796
1874
  if (hashValue) return (0, $4af7da5c7dd0b9c2$export$e4369cabd7e84cd9)(hashValue);
@@ -1822,44 +1900,46 @@ $cfadb0728cf907ff$export$3288d34c523a1192.displayName = "Tag";
1822
1900
 
1823
1901
 
1824
1902
 
1825
-
1826
-
1827
- function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode: selectionMode = "single", appearance: appearance = "outline", renderValue: renderValue, color: color = "gray", error: error, description: description, size: size = "sm", radius: radius, listBoxColor: listBoxColor, className: className, value: value, defaultValue: defaultValue, onChange: onChange, style: style, ...props }) {
1903
+ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode: selectionMode = "single", appearance: appearance = "outline", renderValue: renderValue, color: color = "gray", error: error, description: description, size: size = "sm", radius: radius, listBoxColor: listBoxColor, className: className, value: value, onChange: onChange, onSelectionChange: onSelectionChange, style: style, classNames: classNames, styles: styles, showSectionSeparator: showSectionSeparator = true, showSelectionIndicator: showSelectionIndicator = true, ...props }) {
1828
1904
  const isMultiple = selectionMode === "multiple";
1829
- function getValue(value) {
1905
+ const _value = $8zHUo$react.useMemo(()=>{
1830
1906
  if (!value) return null;
1831
1907
  if (selectionMode === "single") return [
1832
1908
  value
1833
1909
  ];
1834
1910
  if (isMultiple && !(0, $d99c85a751d7ffbd$export$43bee75e5e14138e)(value)) throw new Error("Select: value must be an array when selectionMode is multiple");
1835
1911
  return value;
1836
- }
1837
- function onSelectionChange(selectedKeys) {
1838
- onChange?.({
1839
- target: {
1840
- value: isMultiple ? selectedKeys : selectedKeys[0],
1841
- name: props.name
1842
- }
1843
- });
1844
- }
1912
+ }, [
1913
+ value,
1914
+ selectionMode
1915
+ ]);
1916
+ const children = (0, $fc43ab93aaa777d9$export$4c687b6f1150e71b)(props);
1845
1917
  const space = (0, $eae337549f49a5a2$export$450c36e0b0e62ccd)();
1846
1918
  const triggerState = (0, $8zHUo$reactstately.useMenuTriggerState)({});
1847
1919
  const listState = (0, $8zHUo$reactstately.useListState)({
1848
1920
  ...props,
1849
- selectedKeys: getValue(value),
1850
- defaultSelectedKeys: getValue(defaultValue),
1921
+ selectedKeys: _value,
1922
+ defaultSelectedKeys: _value,
1851
1923
  selectionMode: selectionMode,
1852
- children: (0, $fc43ab93aaa777d9$export$3d7d0414f6db67e7)(props),
1924
+ children: children,
1853
1925
  onSelectionChange (keys) {
1854
- onSelectionChange([
1926
+ const keysToArray = [
1855
1927
  ...keys
1856
- ]);
1928
+ ];
1929
+ onSelectionChange?.(keysToArray);
1930
+ onChange?.({
1931
+ target: {
1932
+ value: isMultiple ? keysToArray : keysToArray[0],
1933
+ name: props.name
1934
+ }
1935
+ });
1857
1936
  if (!isMultiple) triggerState.close();
1858
1937
  }
1859
1938
  });
1860
1939
  const triggerRef = $8zHUo$react.useRef(null);
1861
1940
  const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
1862
- const { menuTriggerProps: menuTriggerProps } = (0, $8zHUo$reactaria.useMenuTrigger)({
1941
+ color = color ?? theme?.color;
1942
+ const { menuTriggerProps: menuTriggerProps, menuProps: menuProps } = (0, $8zHUo$reactaria.useMenuTrigger)({
1863
1943
  type: "listbox",
1864
1944
  trigger: "press",
1865
1945
  isDisabled: false
@@ -1868,8 +1948,10 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
1868
1948
  const selectedItems = [
1869
1949
  ...listState.selectionManager.selectedKeys
1870
1950
  ].map((item)=>listState.collection.getItem(item));
1871
- function content() {
1951
+ const content = $8zHUo$react.useMemo(()=>{
1872
1952
  if (selectedItems.length === 0) return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
1953
+ style: styles?.placeholder,
1954
+ className: classNames?.placeholder,
1873
1955
  color: color,
1874
1956
  variant: "lighter",
1875
1957
  children: props.placeholder
@@ -1877,67 +1959,64 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
1877
1959
  if (isMultiple) return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1878
1960
  gap: "3xs",
1879
1961
  wrap: "wrap",
1880
- children: selectedItems.map((item)=>/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $cfadb0728cf907ff$export$3288d34c523a1192), {
1881
- append: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiX), {}),
1882
- color: (0, $4af7da5c7dd0b9c2$export$e4369cabd7e84cd9)(item?.textValue ?? ""),
1962
+ children: selectedItems.map((item)=>renderValue?.(item?.value) ?? /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $cfadb0728cf907ff$export$3288d34c523a1192), {
1963
+ size: "md",
1964
+ variant: "pastel",
1965
+ color: color,
1883
1966
  children: item?.textValue
1884
1967
  }, item?.key))
1885
1968
  });
1886
1969
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
1970
+ as: "div",
1887
1971
  variant: "default",
1888
1972
  color: color === "gray" ? "black" : color,
1889
- className: "single-value",
1973
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("single-value", classNames?.value),
1974
+ style: styles?.value,
1890
1975
  children: renderValue?.(selectedItems[0]?.value) ?? selectedItems[0]?.value?.[props.labelKey ?? "label"] ?? selectedItems[0]?.textValue
1891
1976
  });
1892
- }
1893
- return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $eb8f27c3596a0e6b$export$e71c4d32a2263218), {
1894
- style: style,
1895
- as: "span",
1896
- position: "relative",
1897
- stretchX: true,
1977
+ }, [
1978
+ selectedItems.length,
1979
+ isMultiple,
1980
+ selectedItems[0]?.value
1981
+ ]);
1982
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
1983
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-select", className, classNames?.wrapper),
1984
+ style: {
1985
+ ...style,
1986
+ ...styles?.wrapper
1987
+ },
1898
1988
  children: [
1899
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1900
- "data-radius": radius ?? theme?.radius ?? "lg",
1901
- gap: "3xs",
1902
- stack: true,
1903
- className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-input-group", className, space.compactItemWrapperAdjust),
1904
- "data-size": size,
1905
- "data-color": color ?? "gray",
1906
- children: [
1907
- label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
1908
- color: color,
1909
- children: label
1910
- }),
1911
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
1912
- "data-selection-mode": selectionMode,
1913
- tabIndex: 0,
1914
- role: "button",
1915
- ref: triggerRef,
1916
- color: "gray",
1917
- className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-input-control", "p-select", space.classNames),
1918
- "data-appearance": appearance,
1919
- ...triggerProps,
1920
- children: [
1921
- content(),
1922
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiSelector), {
1923
- className: "selector",
1924
- size: 18
1925
- })
1926
- ]
1927
- }),
1928
- error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
1929
- children: error
1930
- }),
1931
- description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
1932
- as: "div",
1933
- variant: "light",
1934
- color: "gray",
1935
- size: "sm",
1936
- children: description
1937
- })
1938
- ]
1989
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $ec2376a5dd0d13e6$export$a455218a85c89869), {
1990
+ replaceDefaultControlWrapper: true,
1991
+ label: label,
1992
+ error: error,
1993
+ description: description,
1994
+ className: className,
1995
+ classNames: classNames,
1996
+ size: size,
1997
+ radius: radius,
1998
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
1999
+ style: styles?.trigger,
2000
+ "data-selection-mode": selectionMode,
2001
+ tabIndex: 0,
2002
+ role: "button",
2003
+ ref: triggerRef,
2004
+ color: "gray",
2005
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-input-control", "p-select-trigger", space.classNames, classNames?.trigger),
2006
+ "data-appearance": appearance,
2007
+ ...triggerProps,
2008
+ children: [
2009
+ content,
2010
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiSelector), {
2011
+ className: "selector",
2012
+ size: 18
2013
+ })
2014
+ ]
2015
+ })
1939
2016
  }),
1940
2017
  triggerState.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
2018
+ className: classNames?.popover,
2019
+ style: styles?.popover,
1941
2020
  placement: "bottom start",
1942
2021
  offset: 4,
1943
2022
  shouldUpdatePosition: true,
@@ -1945,12 +2024,13 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
1945
2024
  state: triggerState,
1946
2025
  children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $dcfc4542aa84c062$export$41f133550aa26f48), {
1947
2026
  label: label,
1948
- showSeparator: props.showSeparator,
1949
- showSelectedMarker: props.showSelectedMarker,
2027
+ showSectionSeparator: showSectionSeparator,
2028
+ showSelectionIndicator: showSelectionIndicator,
1950
2029
  width: triggerRef.current?.getBoundingClientRect().width,
1951
2030
  color: listBoxColor ?? "gray",
1952
2031
  shouldFocusOnHover: true,
1953
2032
  state: listState,
2033
+ ...menuProps,
1954
2034
  ...props
1955
2035
  })
1956
2036
  })
@@ -1973,6 +2053,7 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
1973
2053
 
1974
2054
 
1975
2055
 
2056
+
1976
2057
  function $5a757815ed1b91e3$var$createCalendar() {
1977
2058
  return new (0, $8zHUo$internationalizeddate.GregorianCalendar)();
1978
2059
  }
@@ -2070,20 +2151,6 @@ function $9bce4a3d5b18599c$export$b4085f3d3ede4716(array, keys) {
2070
2151
  }
2071
2152
 
2072
2153
 
2073
- const $284d30e280d297d3$var$monthsByIndex = [
2074
- "January",
2075
- "February",
2076
- "March",
2077
- "April",
2078
- "May",
2079
- "June",
2080
- "July",
2081
- "August",
2082
- "Septemper",
2083
- "October",
2084
- "November",
2085
- "December"
2086
- ];
2087
2154
  const $284d30e280d297d3$export$e1aef45b828286de = /*#__PURE__*/ $8zHUo$react.forwardRef(({ numberOfMonths: numberOfMonths = 1, color: color, ...props }, ref)=>{
2088
2155
  const { locale: locale } = (0, $8zHUo$reactaria.useLocale)();
2089
2156
  const state = (0, $8zHUo$reactstately.useCalendarState)({
@@ -2349,13 +2416,15 @@ $e0a58c83d4c36e4e$export$7edc06cf1783b30f.displayName = "DateInput";
2349
2416
 
2350
2417
 
2351
2418
 
2352
- const $2fdd5844efb4cca1$export$e2255cf6045e8d47 = /*#__PURE__*/ $8zHUo$react.forwardRef(({ src: src, alt: alt, name: name, color: color, variant: variant = "light", fallback: fallback, children: children, size: size = "md", shape: shape = "square", className: className, ...props }, ref)=>{
2419
+ const $2fdd5844efb4cca1$export$e2255cf6045e8d47 = /*#__PURE__*/ $8zHUo$react.forwardRef(({ src: src, alt: alt, name: name, color: color, variant: variant = "light", fallback: fallback, children: children, size: size = "md", shape: shape, className: className, radius: radius = "lg", classNames: classNames, styles: styles, style: style, ...props }, ref)=>{
2353
2420
  const [imageError, setImageError] = $8zHUo$react.useState(false);
2354
2421
  const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
2355
2422
  function getAvatarRadius() {
2356
- if (theme?.avatarRadiusSize && shape !== "circle") return theme.avatarRadiusSize;
2357
- if (shape === "circle") return "full";
2358
- return "md";
2423
+ (0, $4af7da5c7dd0b9c2$export$1c4d39b152e0f791)("shape", "radius", shape);
2424
+ // TODO: remove this when we remove the deprecated shape prop
2425
+ if (shape === "circle" && !radius) radius = "full";
2426
+ if (shape === "square" && !radius) radius = "md";
2427
+ return theme?.avatarRadiusSize || radius;
2359
2428
  }
2360
2429
  const defaultColor = $8zHUo$react.useMemo(()=>{
2361
2430
  const hash = (0, $4af7da5c7dd0b9c2$export$d41d9ab3de2def3d)(name || "");
@@ -2365,6 +2434,10 @@ const $2fdd5844efb4cca1$export$e2255cf6045e8d47 = /*#__PURE__*/ $8zHUo$react.for
2365
2434
  ]);
2366
2435
  const renderContent = ()=>{
2367
2436
  if (src && !imageError) return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("img", {
2437
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
2438
+ "avatar-img",
2439
+ classNames?.img
2440
+ ]),
2368
2441
  onLoad: ()=>setImageError(false),
2369
2442
  onError: ()=>setImageError(true),
2370
2443
  src: src,
@@ -2372,14 +2445,24 @@ const $2fdd5844efb4cca1$export$e2255cf6045e8d47 = /*#__PURE__*/ $8zHUo$react.for
2372
2445
  });
2373
2446
  if (imageError && !children) return fallback;
2374
2447
  if (!src && !children && name) return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("span", {
2448
+ style: styles?.fallback,
2449
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
2450
+ "avatar-fallback",
2451
+ classNames?.fallback
2452
+ ]),
2375
2453
  children: name.charAt(0)
2376
2454
  });
2377
2455
  return children;
2378
2456
  };
2379
2457
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
2458
+ style: {
2459
+ ...style,
2460
+ ...styles?.base
2461
+ },
2380
2462
  className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
2381
2463
  "p-avatar",
2382
- className
2464
+ className,
2465
+ classNames?.base
2383
2466
  ]),
2384
2467
  "data-radius": getAvatarRadius(),
2385
2468
  "data-color": color ?? defaultColor,
@@ -2746,8 +2829,97 @@ $c5c6f63b49c9056a$export$b5d5cf8927ab7262.displayName = "Switch";
2746
2829
 
2747
2830
 
2748
2831
 
2749
- function $de38c06a5c24ee45$export$dbada5ace43900dd(props) {
2750
- return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {});
2832
+
2833
+
2834
+
2835
+
2836
+ function $a945a7e4eb75da9e$export$472062a354075cee({ className: className, classNames: classNames, style: style, styles: styles, name: name, size: size = "sm", orientation: orientation = "horizontal", ...props }) {
2837
+ const trackRef = $8zHUo$react.useRef(null);
2838
+ const numberFormatter = (0, $8zHUo$reactaria.useNumberFormatter)();
2839
+ const state = (0, $8zHUo$reactstately.useSliderState)({
2840
+ ...props,
2841
+ numberFormatter: numberFormatter
2842
+ });
2843
+ const { trackProps: trackProps, labelProps: labelProps } = (0, $8zHUo$reactaria.useSlider)({
2844
+ ...props,
2845
+ "aria-label": props["aria-label"] ?? "slider"
2846
+ }, state, trackRef);
2847
+ const percent = state.getThumbPercent(0);
2848
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
2849
+ "data-size": size,
2850
+ style: {
2851
+ ...style,
2852
+ ...styles?.wrapper
2853
+ },
2854
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-slider", orientation, className, classNames?.wrapper),
2855
+ children: [
2856
+ props.label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
2857
+ style: styles?.label,
2858
+ className: classNames?.label,
2859
+ ...labelProps,
2860
+ children: props.label
2861
+ }),
2862
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
2863
+ ref: trackRef,
2864
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-slider-track", classNames?.track),
2865
+ ...trackProps,
2866
+ children: [
2867
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
2868
+ style: {
2869
+ width: `${percent * 100}%`
2870
+ },
2871
+ className: "p-slider-track-fill"
2872
+ }),
2873
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($a945a7e4eb75da9e$var$Thumb, {
2874
+ styles: {
2875
+ wrapper: styles?.thumb,
2876
+ inner: styles?.innerThumb
2877
+ },
2878
+ classNames: {
2879
+ wrapper: classNames?.thumb,
2880
+ inner: classNames?.innerThumb
2881
+ },
2882
+ state: state,
2883
+ trackRef: trackRef,
2884
+ index: 0,
2885
+ name: name
2886
+ })
2887
+ ]
2888
+ })
2889
+ ]
2890
+ });
2891
+ }
2892
+ function $a945a7e4eb75da9e$var$Thumb({ state: state, trackRef: trackRef, index: index, name: name, className: className, classNames: classNames, styles: styles, style: style }) {
2893
+ const inputRef = $8zHUo$react.useRef(null);
2894
+ const { thumbProps: thumbProps, inputProps: inputProps, isDragging: isDragging } = (0, $8zHUo$reactaria.useSliderThumb)({
2895
+ index: index,
2896
+ trackRef: trackRef,
2897
+ inputRef: inputRef,
2898
+ name: name
2899
+ }, state);
2900
+ const { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $8zHUo$reactaria.useFocusRing)();
2901
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
2902
+ "data-dragging": isDragging,
2903
+ "data-focus-visible": isFocusVisible,
2904
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-slider-thumb", className, classNames?.wrapper),
2905
+ style: {
2906
+ ...style,
2907
+ ...styles?.wrapper
2908
+ },
2909
+ ...thumbProps,
2910
+ children: [
2911
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
2912
+ style: styles?.inner,
2913
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-slider-thumb-inner", classNames?.inner)
2914
+ }),
2915
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.VisuallyHidden), {
2916
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
2917
+ ref: inputRef,
2918
+ ...(0, $8zHUo$reactaria.mergeProps)(inputProps, focusProps)
2919
+ })
2920
+ })
2921
+ ]
2922
+ });
2751
2923
  }
2752
2924
 
2753
2925
 
@@ -3295,7 +3467,7 @@ function $0f347092d3465402$export$7dacb05d26466c3({ children: children }) {
3295
3467
  ...triggerProps
3296
3468
  });
3297
3469
  }
3298
- function $0f347092d3465402$export$d7e1f420b25549ff({ children: children, offset: offset = 12, placement: placement, style: style, width: width = 160, className: className, ...props }) {
3470
+ function $0f347092d3465402$export$d7e1f420b25549ff({ children: children, offset: offset = 12, placement: placement, style: style, className: className, ...props }) {
3299
3471
  const ctx = $8zHUo$react.useContext($0f347092d3465402$var$PopoverContext);
3300
3472
  if (!ctx) throw "PopoverContent must be used withing a Popover component";
3301
3473
  if (!ctx.overlayState?.isOpen) return null;
@@ -3310,7 +3482,6 @@ function $0f347092d3465402$export$d7e1f420b25549ff({ children: children, offset:
3310
3482
  "data-radius": "md",
3311
3483
  className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-popover-content"),
3312
3484
  style: {
3313
- width: width,
3314
3485
  ...style
3315
3486
  },
3316
3487
  children: children
@@ -3429,4 +3600,509 @@ const $d26053f02b9f370b$export$a79147a60006308c = (0, $8zHUo$reactstately.Item);
3429
3600
 
3430
3601
 
3431
3602
 
3603
+
3604
+
3605
+
3606
+
3607
+
3608
+
3609
+
3610
+
3611
+ function $b4c448f742efa2a7$export$9feb1bc2e5f1ccb3({ onChange: onChange, color: colorProp }) {
3612
+ const [colorSpace, setColorSpace] = $8zHUo$react.useState("hex");
3613
+ const [color, setColor] = (0, $c410efc80bcce413$export$40bfa8c7b0832715)(colorProp, (0, $8zHUo$reactstatelycolor.parseColor)("#BB66CC").toFormat("hsla"), onChange);
3614
+ function handleChange(color) {
3615
+ setColor(color);
3616
+ onChange?.(color);
3617
+ }
3618
+ function setAlpha(alpha) {
3619
+ if (isNaN(alpha)) return;
3620
+ console.log(alpha);
3621
+ console.log(color);
3622
+ const newColor = color.withChannelValue("alpha", alpha);
3623
+ setColor(newColor);
3624
+ console.log(newColor);
3625
+ }
3626
+ const [h, s, l] = color.getColorChannels();
3627
+ const rgbaColor = color.toFormat("rgba");
3628
+ const [r, g, b] = rgbaColor.getColorChannels();
3629
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
3630
+ stack: true,
3631
+ style: {
3632
+ width: 240
3633
+ },
3634
+ children: [
3635
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $ce7da1514c7ab67c$export$b2103f68a961418e), {
3636
+ onChange: handleChange,
3637
+ onChangeEnd: handleChange,
3638
+ xChannel: s,
3639
+ yChannel: l,
3640
+ value: color ?? (0, $8zHUo$reactstatelycolor.parseColor)("hsl(219, 79%, 66%)"),
3641
+ style: {
3642
+ width: "100%",
3643
+ height: 140
3644
+ }
3645
+ }),
3646
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
3647
+ stack: true,
3648
+ style: {
3649
+ padding: 8
3650
+ },
3651
+ children: [
3652
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
3653
+ stack: true,
3654
+ gap: "2xs",
3655
+ children: [
3656
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $7796dcb4fe09bf12$export$44fd664bcca5b6fb), {
3657
+ value: color,
3658
+ onChange: handleChange,
3659
+ onChangeEnd: handleChange,
3660
+ channel: h
3661
+ }),
3662
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $7796dcb4fe09bf12$export$44fd664bcca5b6fb), {
3663
+ value: color,
3664
+ onChange: handleChange,
3665
+ onChangeEnd: handleChange,
3666
+ channel: "alpha"
3667
+ })
3668
+ ]
3669
+ }),
3670
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
3671
+ stack: true,
3672
+ children: [
3673
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
3674
+ style: {
3675
+ width: "100%"
3676
+ },
3677
+ gap: "3xs",
3678
+ children: [
3679
+ colorSpace === "hex" && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $eae337549f49a5a2$export$eef1e68107c58ef2), {
3680
+ style: {
3681
+ gap: 3
3682
+ },
3683
+ compact: true,
3684
+ children: [
3685
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $ca14d49a10ed918f$export$b865d4358897bb17), {
3686
+ value: color,
3687
+ onChange: handleChange,
3688
+ size: "sm",
3689
+ style: {
3690
+ width: "60%"
3691
+ },
3692
+ appearance: "filled",
3693
+ placeholder: "Add a color"
3694
+ }),
3695
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $77c71203b3212c65$export$6bf0cd3a219bbade), {
3696
+ onChange: (n)=>setAlpha(n),
3697
+ maxValue: 1,
3698
+ formatOptions: {
3699
+ style: "percent",
3700
+ maximumFractionDigits: 0
3701
+ },
3702
+ size: "sm",
3703
+ value: color.getChannelValue("alpha"),
3704
+ style: {
3705
+ width: "40%"
3706
+ },
3707
+ appearance: "filled"
3708
+ })
3709
+ ]
3710
+ }),
3711
+ [
3712
+ "rgb",
3713
+ "hsl"
3714
+ ].includes(colorSpace) && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $eae337549f49a5a2$export$eef1e68107c58ef2), {
3715
+ style: {
3716
+ gap: 3
3717
+ },
3718
+ compact: true,
3719
+ children: [
3720
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $77c71203b3212c65$export$6bf0cd3a219bbade), {
3721
+ value: colorSpace === "rgb" ? rgbaColor.getChannelValue(r) : color.getChannelValue(h),
3722
+ appearance: "filled",
3723
+ size: "sm"
3724
+ }),
3725
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $77c71203b3212c65$export$6bf0cd3a219bbade), {
3726
+ value: colorSpace === "rgb" ? rgbaColor.getChannelValue(g) : color.getChannelValue(s),
3727
+ appearance: "filled",
3728
+ size: "sm"
3729
+ }),
3730
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $77c71203b3212c65$export$6bf0cd3a219bbade), {
3731
+ value: colorSpace === "rgb" ? rgbaColor.getChannelValue(b) : color.getChannelValue(l),
3732
+ appearance: "filled",
3733
+ size: "sm"
3734
+ }),
3735
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $77c71203b3212c65$export$6bf0cd3a219bbade), {
3736
+ formatOptions: {
3737
+ style: "percent",
3738
+ maximumFractionDigits: 0
3739
+ },
3740
+ value: colorSpace === "rgb" ? rgbaColor.getChannelValue("alpha") : color.getChannelValue("alpha"),
3741
+ appearance: "filled",
3742
+ size: "sm"
3743
+ })
3744
+ ]
3745
+ }),
3746
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $e37831ebf64d8e7d$export$ef9b1a59e592288f), {
3747
+ style: {
3748
+ width: "60%"
3749
+ },
3750
+ valueKey: "id",
3751
+ onChange: (v)=>setColorSpace(v.target.value ?? colorSpace),
3752
+ showSelectionIndicator: false,
3753
+ value: colorSpace,
3754
+ size: "sm",
3755
+ appearance: "filled",
3756
+ items: [
3757
+ "hex",
3758
+ "rgb",
3759
+ "hsl"
3760
+ ].map((o)=>({
3761
+ label: o.toUpperCase(),
3762
+ id: o
3763
+ }))
3764
+ })
3765
+ ]
3766
+ }),
3767
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9e8a15ca4065ce60$export$1ff3c3f08ae963c0), {
3768
+ color: "gray"
3769
+ }),
3770
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
3771
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $799f02b9b0e744b9$export$b46792416e3d8515), {
3772
+ styles: {
3773
+ wrapper: {
3774
+ gap: 6
3775
+ },
3776
+ swatch: {
3777
+ borderRadius: 5
3778
+ }
3779
+ },
3780
+ onChange: handleChange,
3781
+ colors: [
3782
+ "#000000",
3783
+ "#333333",
3784
+ "#555555",
3785
+ "#777777",
3786
+ "#999999",
3787
+ "#bbbbbb",
3788
+ "#dddddd",
3789
+ "#ffffff",
3790
+ "#4455BB",
3791
+ "#1199EE",
3792
+ "#55CCFF",
3793
+ "#22CCDD",
3794
+ "#22AA99",
3795
+ "#66BB66",
3796
+ "#99CC66",
3797
+ "#CCDD33",
3798
+ "#7755CC",
3799
+ "#BB66CC",
3800
+ "#FF88AA",
3801
+ "#EE4444",
3802
+ "#FF7744",
3803
+ "#FFAA22",
3804
+ "#FFCC66",
3805
+ "#FFEE66"
3806
+ ].map((color)=>({
3807
+ label: color,
3808
+ color: (0, $8zHUo$reactstatelycolor.parseColor)(color).toString("hsl"),
3809
+ key: color
3810
+ }))
3811
+ })
3812
+ })
3813
+ ]
3814
+ })
3815
+ ]
3816
+ })
3817
+ ]
3818
+ });
3819
+ }
3820
+
3821
+
3822
+
3823
+
3824
+
3825
+
3826
+
3827
+
3828
+
3829
+ function $ce7da1514c7ab67c$export$b2103f68a961418e({ className: className, classNames: classNames, style: style, styles: styles, radius: radius, ...props }) {
3830
+ const inputXRef = $8zHUo$react.useRef(null);
3831
+ const inputYRef = $8zHUo$react.useRef(null);
3832
+ const containerRef = $8zHUo$react.useRef(null);
3833
+ const state = (0, $8zHUo$reactstatelycolor.useColorAreaState)(props);
3834
+ const { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $8zHUo$reactariacolor.useColorArea)({
3835
+ ...props,
3836
+ inputXRef: inputXRef,
3837
+ inputYRef: inputYRef,
3838
+ containerRef: containerRef
3839
+ }, state);
3840
+ const { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $8zHUo$reactaria.useFocusRing)();
3841
+ const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
3842
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
3843
+ ...colorAreaProps,
3844
+ ref: containerRef,
3845
+ style: {
3846
+ ...colorAreaProps.style,
3847
+ ...styles?.wrapper,
3848
+ ...style
3849
+ },
3850
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-color-area", className, classNames?.wrapper),
3851
+ "data-disabled": props.isDisabled,
3852
+ "data-radius": radius ?? theme?.radius ?? "lg",
3853
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
3854
+ ...thumbProps,
3855
+ style: {
3856
+ ...thumbProps.style,
3857
+ ...styles?.thumb
3858
+ },
3859
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-color-area-thumb", classNames?.thumb),
3860
+ "data-focus-visible": isFocusVisible,
3861
+ "data-color": state.getDisplayColor().toString("css"),
3862
+ children: [
3863
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
3864
+ ...xInputProps,
3865
+ ref: inputXRef,
3866
+ ...focusProps
3867
+ }),
3868
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
3869
+ ...yInputProps,
3870
+ ref: inputYRef,
3871
+ ...focusProps
3872
+ })
3873
+ ]
3874
+ })
3875
+ });
3876
+ }
3877
+
3878
+
3879
+
3880
+
3881
+
3882
+
3883
+
3884
+
3885
+ function $ca14d49a10ed918f$export$b865d4358897bb17({ label: label, description: description, className: className, classNames: classNames, style: style, styles: styles, ...props }) {
3886
+ const state = (0, $8zHUo$reactstatelycolor.useColorFieldState)(props);
3887
+ const inputRef = $8zHUo$react.useRef(null);
3888
+ const { inputProps: inputProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $8zHUo$reactariacolor.useColorField)({
3889
+ ...props,
3890
+ "aria-label": props["aria-label"] ?? "color-field"
3891
+ }, state, inputRef);
3892
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $ec2376a5dd0d13e6$export$a455218a85c89869), {
3893
+ description: description,
3894
+ label: label,
3895
+ style: style,
3896
+ classNames: classNames,
3897
+ className: className,
3898
+ styles: styles,
3899
+ labelProps: {
3900
+ ...labelProps
3901
+ },
3902
+ descriptionProps: {
3903
+ ...descriptionProps
3904
+ },
3905
+ errorMessageProps: {
3906
+ ...errorMessageProps
3907
+ },
3908
+ ...props,
3909
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
3910
+ style: styles?.input,
3911
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(classNames?.input, "p-text-input-el"),
3912
+ type: "text",
3913
+ ref: inputRef,
3914
+ ...inputProps
3915
+ })
3916
+ });
3917
+ }
3918
+
3919
+
3920
+
3921
+
3922
+
3923
+
3924
+
3925
+
3926
+
3927
+
3928
+
3929
+ function $799f02b9b0e744b9$export$b46792416e3d8515({ colors: colors, items: items, children: children, radius: radius, size: size, onChange: onChange, selectionMode: selectionMode = "single", className: className, classNames: classNames, style: style, styles: styles, ...props }) {
3930
+ items = colors;
3931
+ children = (item)=>/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($799f02b9b0e744b9$var$Color, {
3932
+ textValue: item.color,
3933
+ color: (0, $8zHUo$reactstatelycolor.parseColor)(item.color)
3934
+ }, item.color);
3935
+ const listProps = {
3936
+ ...props,
3937
+ items: items,
3938
+ children: children,
3939
+ selectionMode: selectionMode,
3940
+ ["aria-label"]: "color swatch picker",
3941
+ onSelectionChange: (keys)=>{
3942
+ const keysToArray = [
3943
+ ...keys
3944
+ ];
3945
+ onChange?.((0, $8zHUo$reactstatelycolor.parseColor)(keysToArray[0]));
3946
+ props.onSelectionChange?.(keys);
3947
+ }
3948
+ };
3949
+ const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
3950
+ const wrapperRef = $8zHUo$react.useRef(null);
3951
+ const listState = (0, $8zHUo$reactstately.useListState)(listProps);
3952
+ const { listBoxProps: listBoxProps } = (0, $8zHUo$reactaria.useListBox)(listProps, listState, wrapperRef);
3953
+ const _colors = [
3954
+ ...listState.collection
3955
+ ];
3956
+ radius = radius ?? theme?.radius ?? "md";
3957
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($799f02b9b0e744b9$var$SwatchProvider, {
3958
+ colors: colors,
3959
+ radius: radius,
3960
+ size: size,
3961
+ ...props,
3962
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
3963
+ style: {
3964
+ ...style,
3965
+ ...styles?.wrapper
3966
+ },
3967
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, classNames?.wrapper),
3968
+ wrap: "wrap",
3969
+ ...listBoxProps,
3970
+ ref: wrapperRef,
3971
+ children: _colors.map((color, index)=>/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($799f02b9b0e744b9$export$47ce3797af1a0c57, {
3972
+ className: classNames?.swatch,
3973
+ style: styles?.swatch,
3974
+ state: listState,
3975
+ item: color
3976
+ }, index))
3977
+ })
3978
+ });
3979
+ }
3980
+ function $799f02b9b0e744b9$export$47ce3797af1a0c57({ item: item, state: state, style: style, className: className }) {
3981
+ const ref = $8zHUo$react.useRef(null);
3982
+ const { optionProps: optionProps, isDisabled: isDisabled, isFocusVisible: isFocusVisible, isFocused: isFocused, isPressed: isPressed, isSelected: isSelected } = (0, $8zHUo$reactaria.useOption)({
3983
+ key: item.key
3984
+ }, state, ref);
3985
+ const color = item.props.color;
3986
+ const ctx = $799f02b9b0e744b9$var$useSwatchPickerContext();
3987
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($799f02b9b0e744b9$var$ColorSwatch, {
3988
+ className: className,
3989
+ style: style,
3990
+ color: color,
3991
+ _ref: ref,
3992
+ "data-disabled": isDisabled,
3993
+ "data-selected": isSelected,
3994
+ "data-focused": isFocused,
3995
+ "data-focus-visible": isFocusVisible,
3996
+ "data-pressed": isPressed,
3997
+ "data-radius": ctx.radius,
3998
+ "data-size": ctx.size,
3999
+ ...optionProps
4000
+ });
4001
+ }
4002
+ function $799f02b9b0e744b9$var$ColorSwatch({ className: className, style: style, _ref: _ref, color: colorProp, ...props }) {
4003
+ const { colorSwatchProps: colorSwatchProps, color: color } = (0, $8zHUo$reactariacolor.useColorSwatch)({
4004
+ ...props,
4005
+ color: colorProp
4006
+ });
4007
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
4008
+ ...props,
4009
+ ref: _ref,
4010
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-color-swatch", className),
4011
+ ...colorSwatchProps,
4012
+ style: {
4013
+ ...colorSwatchProps.style,
4014
+ background: color.toString("css"),
4015
+ ...style
4016
+ },
4017
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
4018
+ className: "p-swatch-checkers"
4019
+ })
4020
+ });
4021
+ }
4022
+ const $799f02b9b0e744b9$var$SwatchPickerContext = /*#__PURE__*/ $8zHUo$react.createContext(null);
4023
+ function $799f02b9b0e744b9$var$SwatchProvider(props) {
4024
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($799f02b9b0e744b9$var$SwatchPickerContext.Provider, {
4025
+ value: props,
4026
+ children: props.children
4027
+ });
4028
+ }
4029
+ function $799f02b9b0e744b9$var$useSwatchPickerContext() {
4030
+ const ctx = $8zHUo$react.useContext($799f02b9b0e744b9$var$SwatchPickerContext);
4031
+ if (!ctx) throw new Error("SwatchPicker must be used within a SwatchPickerProvider");
4032
+ return ctx;
4033
+ }
4034
+ const $799f02b9b0e744b9$var$Color = (0, $8zHUo$reactstately.Item);
4035
+
4036
+
4037
+
4038
+
4039
+
4040
+
4041
+
4042
+
4043
+ function $7796dcb4fe09bf12$export$44fd664bcca5b6fb({ label: label, ...props }) {
4044
+ const { locale: locale } = (0, $8zHUo$reactaria.useLocale)();
4045
+ const state = (0, $8zHUo$reactstatelycolor.useColorSliderState)({
4046
+ ...props,
4047
+ locale: locale
4048
+ });
4049
+ const trackRef = $8zHUo$react.useRef(null);
4050
+ const inputRef = $8zHUo$react.useRef(null);
4051
+ const { labelProps: labelProps, trackProps: trackProps, thumbProps: thumbProps, inputProps: inputProps } = (0, $8zHUo$reactariacolor.useColorSlider)({
4052
+ ...props,
4053
+ label: label,
4054
+ "aria-label": props["aria-label"] ?? "color-slider",
4055
+ inputRef: inputRef,
4056
+ trackRef: trackRef
4057
+ }, state);
4058
+ const { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $8zHUo$reactaria.useFocusRing)();
4059
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $ec2376a5dd0d13e6$export$a455218a85c89869), {
4060
+ label: label,
4061
+ className: "p-color-slider",
4062
+ replaceDefaultControlWrapper: true,
4063
+ labelProps: labelProps,
4064
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
4065
+ ...trackProps,
4066
+ "data-focus-visible": isFocusVisible,
4067
+ "data-bg": trackProps.style?.background,
4068
+ className: "p-color-slider-track",
4069
+ ref: trackRef,
4070
+ style: {
4071
+ ...trackProps.style,
4072
+ background: trackProps.style?.background
4073
+ },
4074
+ children: [
4075
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
4076
+ className: "p-color-slider-checkers"
4077
+ }),
4078
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
4079
+ className: "p-color-slider-thumb",
4080
+ ...thumbProps,
4081
+ style: {
4082
+ ...thumbProps.style,
4083
+ background: state.getDisplayColor().toString("css")
4084
+ },
4085
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
4086
+ ref: inputRef,
4087
+ ...inputProps,
4088
+ ...focusProps
4089
+ })
4090
+ })
4091
+ ]
4092
+ })
4093
+ });
4094
+ }
4095
+
4096
+
4097
+
4098
+ function $e93fd810053d36a8$export$6e865ea70d7724f(color) {
4099
+ // TODO: add support for rgba colors
4100
+ return (0, $8zHUo$reactstatelycolor.parseColor)(color);
4101
+ }
4102
+
4103
+
4104
+
4105
+
4106
+
4107
+
3432
4108
  //# sourceMappingURL=main.js.map