@parrot-co/parrot-ui 0.0.90 → 0.0.92

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
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
- 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, 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";
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, useFilter as $hgUW1$useFilter, useComboBox as $hgUW1$useComboBox, useListBox as $hgUW1$useListBox, useOption as $hgUW1$useOption, useListBoxSection as $hgUW1$useListBoxSection, useRadio as $hgUW1$useRadio, useRadioGroup as $hgUW1$useRadioGroup, HiddenSelect as $hgUW1$HiddenSelect, 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
+ import {HiMinus as $hgUW1$HiMinus, HiPlus as $hgUW1$HiPlus, HiEye as $hgUW1$HiEye, HiSelector as $hgUW1$HiSelector, HiCheck as $hgUW1$HiCheck, HiX as $hgUW1$HiX, 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, useMenuTriggerState as $hgUW1$useMenuTriggerState, useTreeState as $hgUW1$useTreeState, Item as $hgUW1$Item, Section as $hgUW1$Section, useComboBoxState as $hgUW1$useComboBoxState, useListState as $hgUW1$useListState, useRadioGroupState as $hgUW1$useRadioGroupState, 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
 
@@ -1052,6 +1052,9 @@ function $ad85ba12e832a3ea$var$MenuInner({ menuHeader: menuHeader, menuFooter: m
1052
1052
  "data-color": theme?.color ?? "violet",
1053
1053
  "data-radius": theme?.radius ?? "lg",
1054
1054
  className: "p-list-box-wrapper",
1055
+ style: {
1056
+ minWidth: `max(200px, ${`${props.minWidth}`.replace("px", "")}px)`
1057
+ },
1055
1058
  children: [
1056
1059
  resolvedMenuHeader(),
1057
1060
  /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
@@ -1137,92 +1140,13 @@ const $ad85ba12e832a3ea$export$2ce376c2cc3355c8 = (0, $hgUW1$Item);
1137
1140
  const $ad85ba12e832a3ea$export$4b1545b4f2016d26 = (0, $hgUW1$Section);
1138
1141
 
1139
1142
 
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
-
1156
- const $e00a258f2e8c7774$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $hgUW1$react).createContext(null);
1157
- const $e00a258f2e8c7774$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $hgUW1$react).forwardRef((props, ref)=>{
1158
- const state = (0, $hgUW1$react).useContext($e00a258f2e8c7774$export$b118023277d4a5c3);
1159
- const { size: size = "sm", className: className, style: style, appearance: appearance, color: color, ...otherProps } = props;
1160
- if (!state) throw new Error("Radio must be used within a RadioGroup");
1161
- const inputRef = (0, $hgUW1$react).useRef(null);
1162
- const { inputProps: inputProps } = (0, $hgUW1$useRadio)(otherProps, state, inputRef);
1163
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("label", {
1164
- style: style,
1165
- className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)([
1166
- className,
1167
- "p-radio"
1168
- ]),
1169
- ref: ref,
1170
- children: [
1171
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$VisuallyHidden), {
1172
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("input", {
1173
- ...inputProps,
1174
- ref: inputRef
1175
- })
1176
- }),
1177
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1178
- "data-color": color,
1179
- className: "p-fake-radio",
1180
- "data-appearance": appearance,
1181
- "data-checked": inputProps.checked,
1182
- "data-size": size
1183
- }),
1184
- props.children
1185
- ]
1186
- });
1187
- });
1188
- const $e00a258f2e8c7774$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $hgUW1$react).forwardRef(({ stack: stack = true, direction: direction, gap: gap = "xs", rowGap: rowGap, align: align, justify: justify, wrap: wrap, columnGap: columnGap, ...props }, ref)=>{
1189
- const { children: children, label: label, description: description, errorMessage: errorMessage } = props;
1190
- const state = (0, $hgUW1$useRadioGroupState)(props);
1191
- const { radioGroupProps: radioGroupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $hgUW1$useRadioGroup)(props, state);
1192
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1193
- ref: ref,
1194
- stack: stack,
1195
- gap: gap,
1196
- direction: direction,
1197
- rowGap: rowGap,
1198
- columnGap: columnGap,
1199
- align: align,
1200
- justify: justify,
1201
- wrap: wrap,
1202
- ...radioGroupProps,
1203
- children: [
1204
- label && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $eea734bbd8b9efff$export$2e2bcd8739ae039), {
1205
- ...labelProps,
1206
- children: label
1207
- }),
1208
- description && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1209
- variant: "light",
1210
- ...descriptionProps,
1211
- children: description
1212
- }),
1213
- /*#__PURE__*/ (0, $hgUW1$jsx)($e00a258f2e8c7774$export$b118023277d4a5c3.Provider, {
1214
- value: state,
1215
- children: children
1216
- }),
1217
- errorMessage && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $9e021ab4f609c8de$export$2e2bcd8739ae039), {
1218
- ...errorMessageProps,
1219
- children: errorMessage
1220
- })
1221
- ]
1222
- });
1223
- });
1224
- $e00a258f2e8c7774$export$a98f0dcb43a68a25.displayName = "RadioGroup";
1225
- $e00a258f2e8c7774$export$d7b12c4107be0d61.displayName = "Radio";
1143
+ const $3ba60d401cc6cc09$export$e44a253a59704894 = {
1144
+ Root: (0, $ad85ba12e832a3ea$export$e44a253a59704894),
1145
+ Menu: $ad85ba12e832a3ea$export$d9b273488cd8ce6f,
1146
+ Trigger: (0, $ad85ba12e832a3ea$export$e7eb525bc415b4b4),
1147
+ Item: (0, $ad85ba12e832a3ea$export$2ce376c2cc3355c8),
1148
+ Section: (0, $ad85ba12e832a3ea$export$4b1545b4f2016d26)
1149
+ };
1226
1150
 
1227
1151
 
1228
1152
 
@@ -1231,59 +1155,6 @@ $e00a258f2e8c7774$export$d7b12c4107be0d61.displayName = "Radio";
1231
1155
 
1232
1156
 
1233
1157
 
1234
- const $e3711da06539818f$export$f8afaea2e9656b91 = /*#__PURE__*/ $hgUW1$forwardRef(({ title: title, description: description, children: children, appearance: appearance, showIndicator: showIndicator = true, color: color, ...props }, ref)=>{
1235
- const state = $hgUW1$useContext((0, $e00a258f2e8c7774$export$b118023277d4a5c3));
1236
- if (!state) throw new Error("RadioCard must be used within a RadioGroup");
1237
- const inputRef = $hgUW1$useRef(null);
1238
- const { inputProps: inputProps } = (0, $hgUW1$useRadio)(props, state, inputRef);
1239
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("label", {
1240
- "data-radius": "lg",
1241
- className: "p-radio-card",
1242
- "data-color": color,
1243
- "data-appearance": appearance,
1244
- "data-checked": inputProps.checked,
1245
- ref: ref,
1246
- children: [
1247
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$VisuallyHidden), {
1248
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("input", {
1249
- ...inputProps,
1250
- ref: inputRef
1251
- })
1252
- }),
1253
- showIndicator && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1254
- className: "p-fake-radio",
1255
- "data-size": "sm",
1256
- "data-checked": inputProps.checked
1257
- }),
1258
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1259
- stack: true,
1260
- gap: "xs",
1261
- children: [
1262
- (title || description) && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1263
- gap: "4xs",
1264
- stack: true,
1265
- children: [
1266
- title && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1267
- color: color,
1268
- size: "sm",
1269
- children: title
1270
- }),
1271
- description && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1272
- color: color,
1273
- lineHeight: "tall",
1274
- size: "xs",
1275
- variant: "lighter",
1276
- children: description
1277
- })
1278
- ]
1279
- }),
1280
- children
1281
- ]
1282
- })
1283
- ]
1284
- });
1285
- });
1286
- $e3711da06539818f$export$f8afaea2e9656b91.displayName = "RadioCard";
1287
1158
 
1288
1159
 
1289
1160
 
@@ -1491,6 +1362,261 @@ const $6ae005878b435ce8$export$6e2c8f0811a474ce = (0, $hgUW1$Section);
1491
1362
 
1492
1363
 
1493
1364
 
1365
+ const $618e53c42107439d$export$acd2d351457d1d82 = ({ label: label, error: error, showDropdownButton: showDropdownButton = true, dropdownArrow: dropdownArrow = /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$HiSelector), {
1366
+ size: 18
1367
+ }), className: className, style: style, color: color = "gray", radius: radius, size: size = "md", appearance: appearance = "outline", listBoxColor: listBoxColor, append: append, prepend: prepend, isLoading: isLoading, ...props }, ref)=>{
1368
+ const theme = (0, $5fc28f26e128d5c0$export$93d4e7f90805808f)();
1369
+ const { contains: contains } = (0, $hgUW1$useFilter)({
1370
+ sensitivity: "base"
1371
+ });
1372
+ const state = (0, $hgUW1$useComboBoxState)({
1373
+ ...props,
1374
+ children: (0, $b71fd84ba612e4b0$export$3d7d0414f6db67e7)(props),
1375
+ defaultFilter: contains
1376
+ });
1377
+ const inputRef = $hgUW1$useRef(null);
1378
+ const buttonRef = $hgUW1$useRef(null);
1379
+ const listBoxRef = $hgUW1$useRef(null);
1380
+ const popoverRef = $hgUW1$useRef(null);
1381
+ const wrapperRef = $hgUW1$useRef(null);
1382
+ const { inputProps: inputProps, buttonProps: buttonProps, listBoxProps: listBoxProps } = (0, $hgUW1$useComboBox)({
1383
+ inputRef: inputRef,
1384
+ buttonRef: buttonRef,
1385
+ listBoxRef: listBoxRef,
1386
+ popoverRef: popoverRef,
1387
+ ...props
1388
+ }, state);
1389
+ function resolvedDropdownArrow() {
1390
+ if (typeof dropdownArrow === "function") return dropdownArrow({
1391
+ color: "gray",
1392
+ size: "md"
1393
+ });
1394
+ return dropdownArrow;
1395
+ }
1396
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1397
+ "data-color": color ?? theme?.color ?? "gray",
1398
+ "data-size": size,
1399
+ "data-radius": radius ?? theme?.radius ?? "lg",
1400
+ style: style,
1401
+ className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)("p-combo-box p-input-group", className),
1402
+ ref: ref,
1403
+ stack: true,
1404
+ gap: "3xs",
1405
+ stretchX: true,
1406
+ children: [
1407
+ label && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $eea734bbd8b9efff$export$2e2bcd8739ae039), {
1408
+ children: label
1409
+ }),
1410
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1411
+ position: "relative",
1412
+ gap: "3xs",
1413
+ ref: wrapperRef,
1414
+ align: "center",
1415
+ "data-appearance": appearance,
1416
+ className: "p-input-control p-combo-box-control",
1417
+ children: [
1418
+ prepend,
1419
+ /*#__PURE__*/ (0, $hgUW1$jsx)("input", {
1420
+ className: "p-combo-box-input p-text-input-el",
1421
+ onChange: (e)=>inputProps.onChange?.(e),
1422
+ ref: inputRef,
1423
+ "data-has-prepend": !!prepend,
1424
+ "data-size": "md",
1425
+ ...(0, $b35ea695a7e1feb7$export$30a06c8d3562193f)(inputProps, [
1426
+ "size",
1427
+ "onChange"
1428
+ ])
1429
+ }),
1430
+ append,
1431
+ isLoading && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e1148cdb3a130657$export$3b0d6d7590275603), {
1432
+ size: "xs"
1433
+ }),
1434
+ showDropdownButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e3f71af5eaf1c216$export$c25acd513dcc8062), {
1435
+ ...buttonProps,
1436
+ variant: "ghost",
1437
+ color: "gray",
1438
+ radius: "lg",
1439
+ className: "p-combo-box-button",
1440
+ ref: buttonRef,
1441
+ children: resolvedDropdownArrow()
1442
+ })
1443
+ ]
1444
+ }),
1445
+ error && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $9e021ab4f609c8de$export$2e2bcd8739ae039), {
1446
+ children: error
1447
+ }),
1448
+ state.isOpen && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $61ac9d13c14b7f5b$export$5b6b19405a83ff9d), {
1449
+ popoverRef: popoverRef,
1450
+ offset: 8,
1451
+ state: state,
1452
+ triggerRef: wrapperRef,
1453
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6ae005878b435ce8$export$41f133550aa26f48), {
1454
+ color: listBoxColor ?? theme?.color ?? "gray",
1455
+ width: wrapperRef.current?.getBoundingClientRect().width,
1456
+ listBoxRef: listBoxRef,
1457
+ state: state,
1458
+ ...listBoxProps
1459
+ })
1460
+ })
1461
+ ]
1462
+ });
1463
+ };
1464
+ $618e53c42107439d$export$acd2d351457d1d82.displayName = "ComboBox";
1465
+ const $618e53c42107439d$export$72b9695b8216309a = /*#__PURE__*/ $hgUW1$forwardRef($618e53c42107439d$export$acd2d351457d1d82);
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+ const $e00a258f2e8c7774$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $hgUW1$react).createContext(null);
1480
+ const $e00a258f2e8c7774$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $hgUW1$react).forwardRef((props, ref)=>{
1481
+ const state = (0, $hgUW1$react).useContext($e00a258f2e8c7774$export$b118023277d4a5c3);
1482
+ const { size: size = "sm", className: className, style: style, appearance: appearance, color: color, ...otherProps } = props;
1483
+ if (!state) throw new Error("Radio must be used within a RadioGroup");
1484
+ const inputRef = (0, $hgUW1$react).useRef(null);
1485
+ const { inputProps: inputProps } = (0, $hgUW1$useRadio)(otherProps, state, inputRef);
1486
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("label", {
1487
+ style: style,
1488
+ className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)([
1489
+ className,
1490
+ "p-radio"
1491
+ ]),
1492
+ ref: ref,
1493
+ children: [
1494
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$VisuallyHidden), {
1495
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("input", {
1496
+ ...inputProps,
1497
+ ref: inputRef
1498
+ })
1499
+ }),
1500
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1501
+ "data-color": color,
1502
+ className: "p-fake-radio",
1503
+ "data-appearance": appearance,
1504
+ "data-checked": inputProps.checked,
1505
+ "data-size": size
1506
+ }),
1507
+ props.children
1508
+ ]
1509
+ });
1510
+ });
1511
+ const $e00a258f2e8c7774$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $hgUW1$react).forwardRef(({ stack: stack = true, direction: direction, gap: gap = "xs", rowGap: rowGap, align: align, justify: justify, wrap: wrap, columnGap: columnGap, ...props }, ref)=>{
1512
+ const { children: children, label: label, description: description, errorMessage: errorMessage } = props;
1513
+ const state = (0, $hgUW1$useRadioGroupState)(props);
1514
+ const { radioGroupProps: radioGroupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $hgUW1$useRadioGroup)(props, state);
1515
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1516
+ ref: ref,
1517
+ stack: stack,
1518
+ gap: gap,
1519
+ direction: direction,
1520
+ rowGap: rowGap,
1521
+ columnGap: columnGap,
1522
+ align: align,
1523
+ justify: justify,
1524
+ wrap: wrap,
1525
+ ...radioGroupProps,
1526
+ children: [
1527
+ label && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $eea734bbd8b9efff$export$2e2bcd8739ae039), {
1528
+ ...labelProps,
1529
+ children: label
1530
+ }),
1531
+ description && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1532
+ variant: "light",
1533
+ ...descriptionProps,
1534
+ children: description
1535
+ }),
1536
+ /*#__PURE__*/ (0, $hgUW1$jsx)($e00a258f2e8c7774$export$b118023277d4a5c3.Provider, {
1537
+ value: state,
1538
+ children: children
1539
+ }),
1540
+ errorMessage && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $9e021ab4f609c8de$export$2e2bcd8739ae039), {
1541
+ ...errorMessageProps,
1542
+ children: errorMessage
1543
+ })
1544
+ ]
1545
+ });
1546
+ });
1547
+ $e00a258f2e8c7774$export$a98f0dcb43a68a25.displayName = "RadioGroup";
1548
+ $e00a258f2e8c7774$export$d7b12c4107be0d61.displayName = "Radio";
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+ const $e3711da06539818f$export$f8afaea2e9656b91 = /*#__PURE__*/ $hgUW1$forwardRef(({ title: title, description: description, children: children, appearance: appearance, showIndicator: showIndicator = true, color: color, ...props }, ref)=>{
1558
+ const state = $hgUW1$useContext((0, $e00a258f2e8c7774$export$b118023277d4a5c3));
1559
+ if (!state) throw new Error("RadioCard must be used within a RadioGroup");
1560
+ const inputRef = $hgUW1$useRef(null);
1561
+ const { inputProps: inputProps } = (0, $hgUW1$useRadio)(props, state, inputRef);
1562
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("label", {
1563
+ "data-radius": "lg",
1564
+ className: "p-radio-card",
1565
+ "data-color": color,
1566
+ "data-appearance": appearance,
1567
+ "data-checked": inputProps.checked,
1568
+ ref: ref,
1569
+ children: [
1570
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$VisuallyHidden), {
1571
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("input", {
1572
+ ...inputProps,
1573
+ ref: inputRef
1574
+ })
1575
+ }),
1576
+ showIndicator && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1577
+ className: "p-fake-radio",
1578
+ "data-size": "sm",
1579
+ "data-checked": inputProps.checked
1580
+ }),
1581
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1582
+ stack: true,
1583
+ gap: "xs",
1584
+ children: [
1585
+ (title || description) && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $e2f278d76a00796a$export$f51f4c4ede09e011), {
1586
+ gap: "4xs",
1587
+ stack: true,
1588
+ children: [
1589
+ title && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1590
+ color: color,
1591
+ size: "sm",
1592
+ children: title
1593
+ }),
1594
+ description && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6), {
1595
+ color: color,
1596
+ lineHeight: "tall",
1597
+ size: "xs",
1598
+ variant: "lighter",
1599
+ children: description
1600
+ })
1601
+ ]
1602
+ }),
1603
+ children
1604
+ ]
1605
+ })
1606
+ ]
1607
+ });
1608
+ });
1609
+ $e3711da06539818f$export$f8afaea2e9656b91.displayName = "RadioCard";
1610
+
1611
+
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1494
1620
 
1495
1621
 
1496
1622
 
@@ -3012,5 +3138,5 @@ function $aca304249f917497$export$39299b56cfd4e361({ appearance: appearance = "o
3012
3138
 
3013
3139
 
3014
3140
 
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};
3141
+ 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, $618e53c42107439d$export$72b9695b8216309a as ComboBox, $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};
3016
3142
  //# sourceMappingURL=module.js.map