@parrot-co/parrot-ui 0.0.89 → 0.0.91

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/module.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs} from "react/jsx-runtime";
2
- import $hgUW1$react, {forwardRef as $hgUW1$forwardRef, useCallback as $hgUW1$useCallback, createContext as $hgUW1$createContext, Children as $hgUW1$Children, useMemo as $hgUW1$useMemo, isValidElement as $hgUW1$isValidElement, useContext as $hgUW1$useContext, useRef as $hgUW1$useRef, useState as $hgUW1$useState, useEffect as $hgUW1$useEffect} from "react";
3
- import {useTextField as $hgUW1$useTextField, useLocale as $hgUW1$useLocale, useNumberField as $hgUW1$useNumberField, useToggleButton as $hgUW1$useToggleButton, useCheckbox as $hgUW1$useCheckbox, useCheckboxGroupItem as $hgUW1$useCheckboxGroupItem, useFocusRing as $hgUW1$useFocusRing, VisuallyHidden as $hgUW1$VisuallyHidden, useCheckboxGroup as $hgUW1$useCheckboxGroup, useRadio as $hgUW1$useRadio, useRadioGroup as $hgUW1$useRadioGroup, useMenuTrigger as $hgUW1$useMenuTrigger, usePress as $hgUW1$usePress, HiddenSelect as $hgUW1$HiddenSelect, useListBox as $hgUW1$useListBox, useOption as $hgUW1$useOption, useListBoxSection as $hgUW1$useListBoxSection, usePopover as $hgUW1$usePopover, Overlay as $hgUW1$Overlay, useDatePicker as $hgUW1$useDatePicker, useDateField as $hgUW1$useDateField, useDateSegment as $hgUW1$useDateSegment, useCalendar as $hgUW1$useCalendar, useCalendarGrid as $hgUW1$useCalendarGrid, useCalendarCell as $hgUW1$useCalendarCell, mergeProps as $hgUW1$mergeProps, useDrop as $hgUW1$useDrop, useProgressBar as $hgUW1$useProgressBar, useTabList as $hgUW1$useTabList, useTab as $hgUW1$useTab, useTabPanel as $hgUW1$useTabPanel, useHover as $hgUW1$useHover, useSwitch as $hgUW1$useSwitch, useModalOverlay as $hgUW1$useModalOverlay, useDialog as $hgUW1$useDialog} from "react-aria";
2
+ import $hgUW1$react, {forwardRef as $hgUW1$forwardRef, useCallback as $hgUW1$useCallback, createContext as $hgUW1$createContext, Children as $hgUW1$Children, useMemo as $hgUW1$useMemo, isValidElement as $hgUW1$isValidElement, useContext as $hgUW1$useContext, useRef as $hgUW1$useRef, cloneElement as $hgUW1$cloneElement, createElement as $hgUW1$createElement, useState as $hgUW1$useState, useEffect as $hgUW1$useEffect} from "react";
3
+ import {useTextField as $hgUW1$useTextField, useLocale as $hgUW1$useLocale, useNumberField as $hgUW1$useNumberField, useToggleButton as $hgUW1$useToggleButton, useCheckbox as $hgUW1$useCheckbox, useCheckboxGroupItem as $hgUW1$useCheckboxGroupItem, useFocusRing as $hgUW1$useFocusRing, VisuallyHidden as $hgUW1$VisuallyHidden, useCheckboxGroup as $hgUW1$useCheckboxGroup, useMenuTrigger as $hgUW1$useMenuTrigger, usePress as $hgUW1$usePress, mergeProps as $hgUW1$mergeProps, useMenu as $hgUW1$useMenu, useMenuItem as $hgUW1$useMenuItem, useMenuSection as $hgUW1$useMenuSection, useSeparator as $hgUW1$useSeparator, usePopover as $hgUW1$usePopover, Overlay as $hgUW1$Overlay, useRadio as $hgUW1$useRadio, useRadioGroup as $hgUW1$useRadioGroup, HiddenSelect as $hgUW1$HiddenSelect, useListBox as $hgUW1$useListBox, useOption as $hgUW1$useOption, useListBoxSection as $hgUW1$useListBoxSection, useDatePicker as $hgUW1$useDatePicker, useDateField as $hgUW1$useDateField, useDateSegment as $hgUW1$useDateSegment, useCalendar as $hgUW1$useCalendar, useCalendarGrid as $hgUW1$useCalendarGrid, useCalendarCell as $hgUW1$useCalendarCell, useDrop as $hgUW1$useDrop, useProgressBar as $hgUW1$useProgressBar, useTabList as $hgUW1$useTabList, useTab as $hgUW1$useTab, useTabPanel as $hgUW1$useTabPanel, useHover as $hgUW1$useHover, useSwitch as $hgUW1$useSwitch, useModalOverlay as $hgUW1$useModalOverlay, useDialog as $hgUW1$useDialog} from "react-aria";
4
4
  import {HiMinus as $hgUW1$HiMinus, HiPlus as $hgUW1$HiPlus, HiEye as $hgUW1$HiEye, HiX as $hgUW1$HiX, HiSelector as $hgUW1$HiSelector, HiCheck as $hgUW1$HiCheck, HiOutlineCalendar as $hgUW1$HiOutlineCalendar, HiChevronLeft as $hgUW1$HiChevronLeft, HiChevronRight as $hgUW1$HiChevronRight, HiOutlineDocumentAdd as $hgUW1$HiOutlineDocumentAdd, HiOutlineCheckCircle as $hgUW1$HiOutlineCheckCircle, HiOutlineTrash as $hgUW1$HiOutlineTrash, HiOutlineExclamationCircle as $hgUW1$HiOutlineExclamationCircle, HiOutlineRefresh as $hgUW1$HiOutlineRefresh, HiOutlinePaperClip as $hgUW1$HiOutlinePaperClip} from "react-icons/hi";
5
- import {useNumberFieldState as $hgUW1$useNumberFieldState, useToggleState as $hgUW1$useToggleState, useCheckboxGroupState as $hgUW1$useCheckboxGroupState, useRadioGroupState as $hgUW1$useRadioGroupState, useMenuTriggerState as $hgUW1$useMenuTriggerState, useListState as $hgUW1$useListState, Item as $hgUW1$Item, Section as $hgUW1$Section, useDatePickerState as $hgUW1$useDatePickerState, useDateFieldState as $hgUW1$useDateFieldState, useCalendarState as $hgUW1$useCalendarState, useTabListState as $hgUW1$useTabListState, useOverlayTriggerState as $hgUW1$useOverlayTriggerState} from "react-stately";
5
+ import {useNumberFieldState as $hgUW1$useNumberFieldState, useToggleState as $hgUW1$useToggleState, useCheckboxGroupState as $hgUW1$useCheckboxGroupState, useMenuTriggerState as $hgUW1$useMenuTriggerState, useTreeState as $hgUW1$useTreeState, Item as $hgUW1$Item, Section as $hgUW1$Section, useRadioGroupState as $hgUW1$useRadioGroupState, useListState as $hgUW1$useListState, useDatePickerState as $hgUW1$useDatePickerState, useDateFieldState as $hgUW1$useDateFieldState, useCalendarState as $hgUW1$useCalendarState, useTabListState as $hgUW1$useTabListState, useOverlayTriggerState as $hgUW1$useOverlayTriggerState} from "react-stately";
6
6
  import {parseDate as $hgUW1$parseDate, GregorianCalendar as $hgUW1$GregorianCalendar, createCalendar as $hgUW1$createCalendar, endOfMonth as $hgUW1$endOfMonth, getWeeksInMonth as $hgUW1$getWeeksInMonth, isSameMonth as $hgUW1$isSameMonth} from "@internationalized/date";
7
7
 
8
8
 
@@ -83,7 +83,7 @@ function $cce662c1d2ec881b$export$c9058316764c140e(...refs) {
83
83
  }
84
84
 
85
85
 
86
- const $ee0105641360f1c1$export$e71c4d32a2263218 = /*#__PURE__*/ $hgUW1$forwardRef(({ stretchX: stretchX, stretchY: stretchY, stretchXY: stretchXY, children: children, className: className, position: position, as: as = "div", ...props }, ref)=>{
86
+ const $ee0105641360f1c1$export$23c260ee8e4dfaad = ({ stretchX: stretchX, stretchY: stretchY, stretchXY: stretchXY, children: children, className: className, position: position, as: as = "div", ...props }, ref)=>{
87
87
  const Comp = as;
88
88
  return /*#__PURE__*/ (0, $hgUW1$jsx)(Comp, {
89
89
  className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)({
@@ -97,8 +97,9 @@ const $ee0105641360f1c1$export$e71c4d32a2263218 = /*#__PURE__*/ $hgUW1$forwardRe
97
97
  ...props,
98
98
  children: children
99
99
  });
100
- });
101
- $ee0105641360f1c1$export$e71c4d32a2263218.displayName = "Box";
100
+ };
101
+ $ee0105641360f1c1$export$23c260ee8e4dfaad.displayName = "Box";
102
+ const $ee0105641360f1c1$export$e71c4d32a2263218 = /*#__PURE__*/ $hgUW1$forwardRef($ee0105641360f1c1$export$23c260ee8e4dfaad);
102
103
 
103
104
 
104
105
 
@@ -148,7 +149,7 @@ $11bc53f9891a6532$export$9eb849b9b922d396.displayName = "GridItem";
148
149
 
149
150
 
150
151
 
151
- const $e2f278d76a00796a$export$f51f4c4ede09e011 = /*#__PURE__*/ $hgUW1$forwardRef((props, ref)=>{
152
+ const $e2f278d76a00796a$export$21ee1313e2afe36c = (props, ref)=>{
152
153
  const { justify: justify, align: align, direction: direction, gap: gap = "sm", columnGap: columnGap, rowGap: rowGap, inline: inline, wrap: wrap, stack: stack, className: className, ...otherProps } = props;
153
154
  const getDirection = $hgUW1$useCallback(()=>{
154
155
  if (stack) return "column";
@@ -169,12 +170,14 @@ const $e2f278d76a00796a$export$f51f4c4ede09e011 = /*#__PURE__*/ $hgUW1$forwardRe
169
170
  [`row-gap-${rowGap}`]: !!rowGap,
170
171
  [`flex-${wrap}`]: !!wrap
171
172
  }),
173
+ // TODO - Fix types here - seems to work just fine though
172
174
  ref: ref,
173
175
  ...otherProps,
174
176
  children: props.children
175
177
  });
176
- });
177
- $e2f278d76a00796a$export$f51f4c4ede09e011.displayName = "Flex";
178
+ };
179
+ $e2f278d76a00796a$export$21ee1313e2afe36c.displayName = "Flex";
180
+ const $e2f278d76a00796a$export$f51f4c4ede09e011 = /*#__PURE__*/ $hgUW1$forwardRef($e2f278d76a00796a$export$21ee1313e2afe36c);
178
181
 
179
182
 
180
183
 
@@ -339,7 +342,7 @@ function $5fc28f26e128d5c0$export$93d4e7f90805808f(options) {
339
342
 
340
343
 
341
344
 
342
- const $ef10b8551376ecd8$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $hgUW1$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, ...props }, ref)=>{
345
+ const $ef10b8551376ecd8$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $hgUW1$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)=>{
343
346
  const space = (0, $41cc567ab0625f8f$export$450c36e0b0e62ccd)();
344
347
  const internalInputRef = (0, $hgUW1$react).useRef(null);
345
348
  const { labelProps: labelProps, inputProps: inputProps, errorMessageProps: errorMessageProps, descriptionProps: descriptionProps } = (0, $hgUW1$useTextField)({
@@ -359,6 +362,7 @@ const $ef10b8551376ecd8$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $hgUW1$react
359
362
  ref: ref,
360
363
  gap: "3xs",
361
364
  stretchX: true,
365
+ style: style,
362
366
  children: [
363
367
  label && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $eea734bbd8b9efff$export$2e2bcd8739ae039), {
364
368
  color: color,
@@ -573,6 +577,7 @@ const $d95a2216d3ccf702$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $hgUW1$react
573
577
  "data-size": size,
574
578
  className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)(className, "p-button", space.classNames),
575
579
  ref: (0, $cce662c1d2ec881b$export$c9058316764c140e)(ref, buttonRef),
580
+ form: otherProps.form,
576
581
  ...buttonProps,
577
582
  children: [
578
583
  prepend,
@@ -942,6 +947,212 @@ $0ca204e719955216$export$48513f6b9f8ce62d.displayName = "checkbox";
942
947
 
943
948
 
944
949
 
950
+
951
+
952
+ function $61ac9d13c14b7f5b$export$5b6b19405a83ff9d({ state: state, children: children, popoverRef: popoverRef, ...props }) {
953
+ const internalPopoverRef = $hgUW1$useRef(null);
954
+ const theme = (0, $5fc28f26e128d5c0$export$93d4e7f90805808f)();
955
+ const { popoverProps: popoverProps, underlayProps: underlayProps } = (0, $hgUW1$usePopover)({
956
+ ...props,
957
+ popoverRef: internalPopoverRef
958
+ }, state);
959
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Overlay), {
960
+ children: [
961
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
962
+ ...underlayProps,
963
+ className: "underlay"
964
+ }),
965
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
966
+ "data-color": theme?.color,
967
+ "data-radius": theme?.radius,
968
+ ...popoverProps,
969
+ ref: (0, $cce662c1d2ec881b$export$c9058316764c140e)(popoverRef, internalPopoverRef),
970
+ className: "p-popover",
971
+ children: children
972
+ })
973
+ ]
974
+ });
975
+ }
976
+
977
+
978
+
979
+
980
+
981
+
982
+ const $ad85ba12e832a3ea$var$DropdownContext = /*#__PURE__*/ $hgUW1$createContext(null);
983
+ function $ad85ba12e832a3ea$export$e44a253a59704894({ children: children, ...props }) {
984
+ const triggerRef = $hgUW1$useRef(null);
985
+ const triggerState = (0, $hgUW1$useMenuTriggerState)(props);
986
+ const { menuProps: menuProps, menuTriggerProps: triggerProps } = (0, $hgUW1$useMenuTrigger)(props, triggerState, triggerRef);
987
+ return /*#__PURE__*/ (0, $hgUW1$jsx)($ad85ba12e832a3ea$var$DropdownContext.Provider, {
988
+ value: {
989
+ triggerRef: triggerRef,
990
+ triggerState: triggerState,
991
+ triggerProps: triggerProps,
992
+ menuProps: menuProps
993
+ },
994
+ children: children
995
+ });
996
+ }
997
+ function $ad85ba12e832a3ea$export$e7eb525bc415b4b4({ asChild: asChild, children: children, useClickEvent: useClickEvent }) {
998
+ const ctx = $hgUW1$useContext($ad85ba12e832a3ea$var$DropdownContext);
999
+ const { pressProps: pressProps, isPressed: isPressed } = (0, $hgUW1$usePress)({
1000
+ ...ctx?.triggerProps,
1001
+ ref: ctx?.triggerRef
1002
+ });
1003
+ const triggerProps = useClickEvent ? pressProps : ctx?.triggerProps;
1004
+ if (asChild) {
1005
+ const child = $hgUW1$Children.only(children);
1006
+ return /*#__PURE__*/ $hgUW1$cloneElement(child, {
1007
+ ...triggerProps,
1008
+ ref: ctx?.triggerRef,
1009
+ "data-pressed": isPressed
1010
+ });
1011
+ }
1012
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d95a2216d3ccf702$export$353f5b6fc5456de1), {
1013
+ ...ctx?.triggerProps,
1014
+ ref: ctx?.triggerRef,
1015
+ children: children
1016
+ });
1017
+ }
1018
+ function $ad85ba12e832a3ea$export$d9b273488cd8ce6f(props) {
1019
+ const ctx = $hgUW1$useContext($ad85ba12e832a3ea$var$DropdownContext);
1020
+ if (!ctx?.triggerState.isOpen) return null;
1021
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $61ac9d13c14b7f5b$export$5b6b19405a83ff9d), {
1022
+ placement: "bottom start",
1023
+ offset: 8,
1024
+ state: ctx?.triggerState,
1025
+ triggerRef: ctx?.triggerRef,
1026
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)($ad85ba12e832a3ea$var$MenuInner, {
1027
+ ...(0, $hgUW1$mergeProps)(props, ctx.menuProps)
1028
+ })
1029
+ });
1030
+ }
1031
+ function $ad85ba12e832a3ea$var$MenuInner({ menuHeader: menuHeader, menuFooter: menuFooter, ...props }) {
1032
+ const state = (0, $hgUW1$useTreeState)(props);
1033
+ const ref = $hgUW1$useRef(null);
1034
+ const { menuProps: menuProps } = (0, $hgUW1$useMenu)({
1035
+ ...props,
1036
+ autoFocus: true,
1037
+ isVirtualized: true
1038
+ }, state, ref);
1039
+ const theme = (0, $5fc28f26e128d5c0$export$93d4e7f90805808f)();
1040
+ function resolvedMenuHeader() {
1041
+ if (typeof menuHeader === "function") return menuHeader();
1042
+ return menuHeader;
1043
+ }
1044
+ function resolvedMenuFooter() {
1045
+ if (typeof menuFooter === "function") return menuFooter();
1046
+ return menuFooter;
1047
+ }
1048
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1049
+ stack: true,
1050
+ ref: ref,
1051
+ ...menuProps,
1052
+ "data-color": theme?.color ?? "violet",
1053
+ "data-radius": theme?.radius ?? "lg",
1054
+ className: "p-list-box-wrapper",
1055
+ children: [
1056
+ resolvedMenuHeader(),
1057
+ /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1058
+ children: [
1059
+ ...state.collection
1060
+ ].map((item)=>{
1061
+ if (item.type === "section") return /*#__PURE__*/ (0, $hgUW1$jsx)($ad85ba12e832a3ea$var$MenuSectionInner, {
1062
+ state: state,
1063
+ section: item
1064
+ }, item.key);
1065
+ return /*#__PURE__*/ (0, $hgUW1$createElement)($ad85ba12e832a3ea$var$MenuItemInner, {
1066
+ ...item.props,
1067
+ state: state,
1068
+ item: item,
1069
+ key: item.key
1070
+ });
1071
+ })
1072
+ }),
1073
+ resolvedMenuFooter()
1074
+ ]
1075
+ });
1076
+ }
1077
+ function $ad85ba12e832a3ea$var$MenuItemInner({ state: state, item: item, ...otherProps }) {
1078
+ const ref = $hgUW1$useRef(null);
1079
+ const { menuItemProps: menuItemProps, isSelected: isSelected, isFocused: isFocused, isPressed: isPressed, isDisabled: isDisabled } = (0, $hgUW1$useMenuItem)({
1080
+ key: item?.key
1081
+ }, state, ref);
1082
+ const { className: className, style: style, isReadOnly: isReadOnly } = otherProps;
1083
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1084
+ ref: ref,
1085
+ className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)(className, "p-list-option"),
1086
+ "data-selected": isSelected,
1087
+ "data-focused": isFocused,
1088
+ "data-pressed": isPressed,
1089
+ "data-disabled": isDisabled,
1090
+ "data-readonly": isReadOnly,
1091
+ style: style,
1092
+ ...menuItemProps,
1093
+ children: item.rendered
1094
+ });
1095
+ }
1096
+ function $ad85ba12e832a3ea$var$MenuSectionInner({ state: state, section: section }) {
1097
+ const { itemProps: itemProps, headingProps: headingProps, groupProps: groupProps } = (0, $hgUW1$useMenuSection)({
1098
+ heading: section?.rendered,
1099
+ "aria-label": section?.["aria-label"]
1100
+ });
1101
+ const { separatorProps: separatorProps } = (0, $hgUW1$useSeparator)({
1102
+ elementType: "li"
1103
+ });
1104
+ function getChildren() {
1105
+ if (state?.collection.getChildren) return [
1106
+ ...state.collection.getChildren(section.key)
1107
+ ];
1108
+ return [];
1109
+ }
1110
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1111
+ className: "p-list-section",
1112
+ children: [
1113
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1114
+ className: "p-list-separator",
1115
+ ...separatorProps
1116
+ }),
1117
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1118
+ ...itemProps,
1119
+ children: section?.rendered && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1120
+ ...headingProps,
1121
+ children: section?.rendered
1122
+ })
1123
+ }),
1124
+ /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1125
+ ...groupProps,
1126
+ children: getChildren().map((item)=>{
1127
+ return /*#__PURE__*/ (0, $hgUW1$jsx)($ad85ba12e832a3ea$var$MenuItemInner, {
1128
+ state: state,
1129
+ item: item
1130
+ }, item.key);
1131
+ })
1132
+ })
1133
+ ]
1134
+ });
1135
+ }
1136
+ const $ad85ba12e832a3ea$export$2ce376c2cc3355c8 = (0, $hgUW1$Item);
1137
+ const $ad85ba12e832a3ea$export$4b1545b4f2016d26 = (0, $hgUW1$Section);
1138
+
1139
+
1140
+ (0, $ad85ba12e832a3ea$export$e44a253a59704894).Menu = (0, $ad85ba12e832a3ea$export$d9b273488cd8ce6f);
1141
+ (0, $ad85ba12e832a3ea$export$e44a253a59704894).Trigger = (0, $ad85ba12e832a3ea$export$e7eb525bc415b4b4);
1142
+ (0, $ad85ba12e832a3ea$export$e44a253a59704894).Item = (0, $ad85ba12e832a3ea$export$2ce376c2cc3355c8);
1143
+ (0, $ad85ba12e832a3ea$export$e44a253a59704894).Section = (0, $ad85ba12e832a3ea$export$4b1545b4f2016d26);
1144
+ const $3ba60d401cc6cc09$export$e44a253a59704894 = (0, $ad85ba12e832a3ea$export$e44a253a59704894);
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
945
1156
  const $e00a258f2e8c7774$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $hgUW1$react).createContext(null);
946
1157
  const $e00a258f2e8c7774$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $hgUW1$react).forwardRef((props, ref)=>{
947
1158
  const state = (0, $hgUW1$react).useContext($e00a258f2e8c7774$export$b118023277d4a5c3);
@@ -1096,6 +1307,7 @@ function $b71fd84ba612e4b0$export$3d7d0414f6db67e7({ children: children, renderO
1096
1307
  const label = item?.[labelKey ?? "label"];
1097
1308
  const value = item?.[valueKey ?? "id"];
1098
1309
  const sectionChildren = item?.[sectionKey ?? "children"] ?? [];
1310
+ console.log(label, "label");
1099
1311
  if (item?.[sectionKey]) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6ae005878b435ce8$export$6e2c8f0811a474ce), {
1100
1312
  items: sectionChildren,
1101
1313
  title: getSectionLabel?.(item),
@@ -1133,14 +1345,15 @@ function $db709eeca70b0d61$export$961f16f221737ce2() {
1133
1345
 
1134
1346
 
1135
1347
 
1136
- function $6ae005878b435ce8$export$41f133550aa26f48({ state: state, color: color, width: width = 300, showSelectedMarker: showSelectedMarker = true, ...props }) {
1348
+
1349
+ function $6ae005878b435ce8$export$41f133550aa26f48({ state: state, color: color, width: width = 300, showSelectedMarker: showSelectedMarker = true, listBoxRef: listBoxRef, ...props }) {
1137
1350
  const internalState = (0, $hgUW1$useListState)({
1138
1351
  ...props,
1139
1352
  children: (0, $b71fd84ba612e4b0$export$3d7d0414f6db67e7)(props)
1140
1353
  });
1141
1354
  const listRef = $hgUW1$useRef(null);
1142
1355
  const listState = state || internalState;
1143
- const { listBoxProps: listBoxProps, labelProps: labelProps } = (0, $hgUW1$useListBox)(props, listState, listRef);
1356
+ const { listBoxProps: listBoxProps } = (0, $hgUW1$useListBox)(props, listState, listRef);
1144
1357
  const options = [
1145
1358
  ...listState.collection
1146
1359
  ];
@@ -1161,7 +1374,7 @@ function $6ae005878b435ce8$export$41f133550aa26f48({ state: state, color: color,
1161
1374
  stack: true,
1162
1375
  gap: "none",
1163
1376
  className: "p-list-box-wrapper",
1164
- ref: listRef,
1377
+ ref: (0, $cce662c1d2ec881b$export$c9058316764c140e)(listRef, listBoxRef),
1165
1378
  "data-radius": "lg",
1166
1379
  ...listBoxProps,
1167
1380
  children: [
@@ -1381,38 +1594,8 @@ $c700d45659d35204$export$3288d34c523a1192.displayName = "Tag";
1381
1594
 
1382
1595
 
1383
1596
 
1384
- function $61ac9d13c14b7f5b$export$5b6b19405a83ff9d({ state: state, children: children, ...props }) {
1385
- const popoverRef = $hgUW1$useRef(null);
1386
- const theme = (0, $5fc28f26e128d5c0$export$93d4e7f90805808f)();
1387
- const { popoverProps: popoverProps, underlayProps: underlayProps } = (0, $hgUW1$usePopover)({
1388
- ...props,
1389
- popoverRef: popoverRef
1390
- }, state);
1391
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Overlay), {
1392
- children: [
1393
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1394
- ...underlayProps,
1395
- className: "underlay"
1396
- }),
1397
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1398
- "data-color": theme?.color,
1399
- "data-radius": theme?.radius,
1400
- ...popoverProps,
1401
- ref: popoverRef,
1402
- className: "p-popover",
1403
- children: children
1404
- })
1405
- ]
1406
- });
1407
- }
1408
-
1409
-
1410
-
1411
-
1412
-
1413
-
1414
1597
 
1415
- function $9f79d30a629e2c71$export$ef9b1a59e592288f({ label: label, selectionMode: selectionMode = "single", appearance: appearance = "outline", append: append, prepend: prepend, renderValue: renderValue, color: color = "gray", error: error, description: description, size: size = "sm", radius: radius, listBoxColor: listBoxColor, className: className, value: value, defaultValue: defaultValue, onChange: onChange, ...props }) {
1598
+ function $9f79d30a629e2c71$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, ...props }) {
1416
1599
  const isMultiple = selectionMode === "multiple";
1417
1600
  function getValue(value) {
1418
1601
  if (!value) return null;
@@ -1472,7 +1655,6 @@ function $9f79d30a629e2c71$export$ef9b1a59e592288f({ label: label, selectionMode
1472
1655
  children: item?.textValue
1473
1656
  }, item?.key))
1474
1657
  });
1475
- console.log(selectedItems);
1476
1658
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1477
1659
  variant: "default",
1478
1660
  color: color === "gray" ? "black" : color,
@@ -1504,7 +1686,7 @@ function $9f79d30a629e2c71$export$ef9b1a59e592288f({ label: label, selectionMode
1504
1686
  }),
1505
1687
  /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1506
1688
  "data-radius": radius ?? theme?.radius ?? "lg",
1507
- gap: "2xs",
1689
+ gap: "3xs",
1508
1690
  stack: true,
1509
1691
  className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)("p-input-group", className, space.compactItemWrapperAdjust),
1510
1692
  "data-size": size,
@@ -1530,6 +1712,16 @@ function $9f79d30a629e2c71$export$ef9b1a59e592288f({ label: label, selectionMode
1530
1712
  size: 18
1531
1713
  })
1532
1714
  ]
1715
+ }),
1716
+ error && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $9e021ab4f609c8de$export$2e2bcd8739ae039), {
1717
+ children: error
1718
+ }),
1719
+ description && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1720
+ as: "div",
1721
+ variant: "light",
1722
+ color: "gray",
1723
+ size: "sm",
1724
+ children: description
1533
1725
  })
1534
1726
  ]
1535
1727
  }),
@@ -1568,6 +1760,7 @@ function $9f79d30a629e2c71$export$ef9b1a59e592288f({ label: label, selectionMode
1568
1760
 
1569
1761
 
1570
1762
 
1763
+
1571
1764
  function $693c180b2c3a8d81$var$createCalendar() {
1572
1765
  return new (0, $hgUW1$GregorianCalendar)();
1573
1766
  }
@@ -1677,7 +1870,7 @@ const $11e1beb2a56c81ba$export$e1aef45b828286de = /*#__PURE__*/ $hgUW1$forwardRe
1677
1870
  });
1678
1871
  const { calendarProps: calendarProps, prevButtonProps: prevButtonProps, nextButtonProps: nextButtonProps, title: title } = (0, $hgUW1$useCalendar)(props, state);
1679
1872
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1680
- color: color,
1873
+ "data-color": color,
1681
1874
  inline: true,
1682
1875
  gap: "xs",
1683
1876
  direction: "column",
@@ -2511,8 +2704,9 @@ function $727b3a4d9b39464f$export$e6a97ba2cae5bb94({ items: items, render: rende
2511
2704
 
2512
2705
  function $4bad2c10a2b6e638$export$c6fdb837b070b4ff({ children: children, state: state, ...props }) {
2513
2706
  const modalRef = $hgUW1$useRef(null);
2514
- const { modalProps: modalProps, underlayProps: underlayProps } = (0, $hgUW1$useModalOverlay)(props, state, modalRef);
2515
- if (!state.isOpen) return null;
2707
+ const { modalProps: modalProps, underlayProps: underlayProps } = (0, $hgUW1$useModalOverlay)(props, // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2708
+ state, modalRef);
2709
+ if (!state?.isOpen) return null;
2516
2710
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Overlay), {
2517
2711
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2518
2712
  className: "p-modal-underlay",
@@ -2818,5 +3012,5 @@ function $aca304249f917497$export$39299b56cfd4e361({ appearance: appearance = "o
2818
3012
 
2819
3013
 
2820
3014
 
2821
- export {$ee0105641360f1c1$export$e71c4d32a2263218 as Box, $11bc53f9891a6532$export$ef2184bd89960b14 as Grid, $11bc53f9891a6532$export$9eb849b9b922d396 as GridItem, $e2f278d76a00796a$export$f51f4c4ede09e011 as Flex, $ef10b8551376ecd8$export$f5b8910cec6cf069 as Input, $2e89c7375b40283e$export$6bf0cd3a219bbade as NumberInput, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6 as Text, $7794de767effca39$export$379139ebc1c2b235 as Textarea, $d95a2216d3ccf702$export$353f5b6fc5456de1 as Button, $e3f71af5eaf1c216$export$c25acd513dcc8062 as IconButton, $9230e224c5c26d9c$export$69b1032f2ecdf404 as ButtonGroup, $0ca204e719955216$export$48513f6b9f8ce62d as Checkbox, $1ab2e355b7aa4310$export$4aa08d5625cb8ead as CheckboxGroup, $e00a258f2e8c7774$export$d7b12c4107be0d61 as Radio, $e00a258f2e8c7774$export$a98f0dcb43a68a25 as RadioGroup, $e3711da06539818f$export$f8afaea2e9656b91 as RadioCard, $9f79d30a629e2c71$export$ef9b1a59e592288f as Select, $48aceaf3289ec325$export$7edc06cf1783b30f as DateInput, $11e1beb2a56c81ba$export$e1aef45b828286de as Calendar, $55bcc0e5986993c4$export$e2255cf6045e8d47 as Avatar, $f9f5a5b674d0a63f$export$1a5cb5295a7d2749 as FileUploader, $1a0bc09c6bea5bcc$export$1ff3c3f08ae963c0 as Separator, $2cc726bf01dd2fe8$export$b25a304ec7d746bb as Progress, $e1148cdb3a130657$export$3b0d6d7590275603 as Loader, $28ce03a907630a4d$export$be92b6f5f03c0fe9 as Root, $28ce03a907630a4d$export$6d08773d2e66f8f2 as Item, $c700d45659d35204$export$3288d34c523a1192 as Tag, $fac55dfefd316398$export$b5d5cf8927ab7262 as Switch, $6a8317ccd5d3ba90$export$dbada5ace43900dd as ColorTray, $62ecff109eaa29fb$export$50e381fea3a45244 as IconTray, $6bbafdf52af7a191$export$ea98c603db73aee7 as Sticker, $96f9bd3439bf983b$export$1aaa3deaa90ea306 as Tabs, $18afd8c09c9f3065$export$54ec01a60f47d33d as Table, $727b3a4d9b39464f$export$e6a97ba2cae5bb94 as Timeline, $4bad2c10a2b6e638$export$2b77a92f1a5ad772 as Modal, $4bad2c10a2b6e638$export$33ffd74ebf07f060 as useModal, $41cc567ab0625f8f$export$eef1e68107c58ef2 as Space, $aca304249f917497$export$39299b56cfd4e361 as TagInput, $5fc28f26e128d5c0$export$d8964aec282183a3 as ThemeProvider, $5fc28f26e128d5c0$export$93d4e7f90805808f as useTheme};
3015
+ export {$ee0105641360f1c1$export$e71c4d32a2263218 as Box, $11bc53f9891a6532$export$ef2184bd89960b14 as Grid, $11bc53f9891a6532$export$9eb849b9b922d396 as GridItem, $e2f278d76a00796a$export$f51f4c4ede09e011 as Flex, $ef10b8551376ecd8$export$f5b8910cec6cf069 as Input, $2e89c7375b40283e$export$6bf0cd3a219bbade as NumberInput, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6 as Text, $7794de767effca39$export$379139ebc1c2b235 as Textarea, $d95a2216d3ccf702$export$353f5b6fc5456de1 as Button, $e3f71af5eaf1c216$export$c25acd513dcc8062 as IconButton, $9230e224c5c26d9c$export$69b1032f2ecdf404 as ButtonGroup, $0ca204e719955216$export$48513f6b9f8ce62d as Checkbox, $1ab2e355b7aa4310$export$4aa08d5625cb8ead as CheckboxGroup, $3ba60d401cc6cc09$export$e44a253a59704894 as DropdownMenu, $e00a258f2e8c7774$export$d7b12c4107be0d61 as Radio, $e00a258f2e8c7774$export$a98f0dcb43a68a25 as RadioGroup, $e3711da06539818f$export$f8afaea2e9656b91 as RadioCard, $9f79d30a629e2c71$export$ef9b1a59e592288f as Select, $6ae005878b435ce8$export$36d18380658d5d20 as Option, $6ae005878b435ce8$export$6e2c8f0811a474ce as Section, $48aceaf3289ec325$export$7edc06cf1783b30f as DateInput, $11e1beb2a56c81ba$export$e1aef45b828286de as Calendar, $55bcc0e5986993c4$export$e2255cf6045e8d47 as Avatar, $f9f5a5b674d0a63f$export$1a5cb5295a7d2749 as FileUploader, $1a0bc09c6bea5bcc$export$1ff3c3f08ae963c0 as Separator, $2cc726bf01dd2fe8$export$b25a304ec7d746bb as Progress, $e1148cdb3a130657$export$3b0d6d7590275603 as Loader, $28ce03a907630a4d$export$be92b6f5f03c0fe9 as Root, $28ce03a907630a4d$export$6d08773d2e66f8f2 as Item, $c700d45659d35204$export$3288d34c523a1192 as Tag, $fac55dfefd316398$export$b5d5cf8927ab7262 as Switch, $6a8317ccd5d3ba90$export$dbada5ace43900dd as ColorTray, $62ecff109eaa29fb$export$50e381fea3a45244 as IconTray, $6bbafdf52af7a191$export$ea98c603db73aee7 as Sticker, $96f9bd3439bf983b$export$1aaa3deaa90ea306 as Tabs, $18afd8c09c9f3065$export$54ec01a60f47d33d as Table, $727b3a4d9b39464f$export$e6a97ba2cae5bb94 as Timeline, $4bad2c10a2b6e638$export$2b77a92f1a5ad772 as Modal, $4bad2c10a2b6e638$export$33ffd74ebf07f060 as useModal, $41cc567ab0625f8f$export$eef1e68107c58ef2 as Space, $aca304249f917497$export$39299b56cfd4e361 as TagInput, $5fc28f26e128d5c0$export$d8964aec282183a3 as ThemeProvider, $5fc28f26e128d5c0$export$93d4e7f90805808f as useTheme};
2822
3016
  //# sourceMappingURL=module.js.map