@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/main.js +266 -139
- package/dist/main.js.map +1 -1
- package/dist/module.js +269 -143
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +57 -17
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -26,6 +26,7 @@ $parcel$export(module.exports, "ButtonGroup", () => $7f70742e736041ff$export$69b
|
|
|
26
26
|
$parcel$export(module.exports, "Checkbox", () => $f88e10ca2ba68239$export$48513f6b9f8ce62d);
|
|
27
27
|
$parcel$export(module.exports, "CheckboxGroup", () => $0f8ef6f4acac1766$export$4aa08d5625cb8ead);
|
|
28
28
|
$parcel$export(module.exports, "DropdownMenu", () => $3b903582a5253460$export$e44a253a59704894);
|
|
29
|
+
$parcel$export(module.exports, "ComboBox", () => $d67a8dc6cbdaa7ed$export$72b9695b8216309a);
|
|
29
30
|
$parcel$export(module.exports, "Radio", () => $e158c5cf7e190200$export$d7b12c4107be0d61);
|
|
30
31
|
$parcel$export(module.exports, "RadioGroup", () => $e158c5cf7e190200$export$a98f0dcb43a68a25);
|
|
31
32
|
$parcel$export(module.exports, "RadioCard", () => $71fcf48f7e2e9427$export$f8afaea2e9656b91);
|
|
@@ -1102,6 +1103,9 @@ function $724eace27ebf345b$var$MenuInner({ menuHeader: menuHeader, menuFooter: m
|
|
|
1102
1103
|
"data-color": theme?.color ?? "violet",
|
|
1103
1104
|
"data-radius": theme?.radius ?? "lg",
|
|
1104
1105
|
className: "p-list-box-wrapper",
|
|
1106
|
+
style: {
|
|
1107
|
+
minWidth: `max(200px, ${`${props.minWidth}`.replace("px", "")}px)`
|
|
1108
|
+
},
|
|
1105
1109
|
children: [
|
|
1106
1110
|
resolvedMenuHeader(),
|
|
1107
1111
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("ul", {
|
|
@@ -1187,92 +1191,13 @@ const $724eace27ebf345b$export$2ce376c2cc3355c8 = (0, $8zHUo$reactstately.Item);
|
|
|
1187
1191
|
const $724eace27ebf345b$export$4b1545b4f2016d26 = (0, $8zHUo$reactstately.Section);
|
|
1188
1192
|
|
|
1189
1193
|
|
|
1190
|
-
|
|
1191
|
-
(0, $724eace27ebf345b$export$e44a253a59704894)
|
|
1192
|
-
|
|
1193
|
-
(0, $724eace27ebf345b$export$
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
const $e158c5cf7e190200$export$b118023277d4a5c3 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).createContext(null);
|
|
1207
|
-
const $e158c5cf7e190200$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef((props, ref)=>{
|
|
1208
|
-
const state = (0, ($parcel$interopDefault($8zHUo$react))).useContext($e158c5cf7e190200$export$b118023277d4a5c3);
|
|
1209
|
-
const { size: size = "sm", className: className, style: style, appearance: appearance, color: color, ...otherProps } = props;
|
|
1210
|
-
if (!state) throw new Error("Radio must be used within a RadioGroup");
|
|
1211
|
-
const inputRef = (0, ($parcel$interopDefault($8zHUo$react))).useRef(null);
|
|
1212
|
-
const { inputProps: inputProps } = (0, $8zHUo$reactaria.useRadio)(otherProps, state, inputRef);
|
|
1213
|
-
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
|
|
1214
|
-
style: style,
|
|
1215
|
-
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
1216
|
-
className,
|
|
1217
|
-
"p-radio"
|
|
1218
|
-
]),
|
|
1219
|
-
ref: ref,
|
|
1220
|
-
children: [
|
|
1221
|
-
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.VisuallyHidden), {
|
|
1222
|
-
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
|
|
1223
|
-
...inputProps,
|
|
1224
|
-
ref: inputRef
|
|
1225
|
-
})
|
|
1226
|
-
}),
|
|
1227
|
-
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
1228
|
-
"data-color": color,
|
|
1229
|
-
className: "p-fake-radio",
|
|
1230
|
-
"data-appearance": appearance,
|
|
1231
|
-
"data-checked": inputProps.checked,
|
|
1232
|
-
"data-size": size
|
|
1233
|
-
}),
|
|
1234
|
-
props.children
|
|
1235
|
-
]
|
|
1236
|
-
});
|
|
1237
|
-
});
|
|
1238
|
-
const $e158c5cf7e190200$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ stack: stack = true, direction: direction, gap: gap = "xs", rowGap: rowGap, align: align, justify: justify, wrap: wrap, columnGap: columnGap, ...props }, ref)=>{
|
|
1239
|
-
const { children: children, label: label, description: description, errorMessage: errorMessage } = props;
|
|
1240
|
-
const state = (0, $8zHUo$reactstately.useRadioGroupState)(props);
|
|
1241
|
-
const { radioGroupProps: radioGroupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $8zHUo$reactaria.useRadioGroup)(props, state);
|
|
1242
|
-
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1243
|
-
ref: ref,
|
|
1244
|
-
stack: stack,
|
|
1245
|
-
gap: gap,
|
|
1246
|
-
direction: direction,
|
|
1247
|
-
rowGap: rowGap,
|
|
1248
|
-
columnGap: columnGap,
|
|
1249
|
-
align: align,
|
|
1250
|
-
justify: justify,
|
|
1251
|
-
wrap: wrap,
|
|
1252
|
-
...radioGroupProps,
|
|
1253
|
-
children: [
|
|
1254
|
-
label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
|
|
1255
|
-
...labelProps,
|
|
1256
|
-
children: label
|
|
1257
|
-
}),
|
|
1258
|
-
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
1259
|
-
variant: "light",
|
|
1260
|
-
...descriptionProps,
|
|
1261
|
-
children: description
|
|
1262
|
-
}),
|
|
1263
|
-
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($e158c5cf7e190200$export$b118023277d4a5c3.Provider, {
|
|
1264
|
-
value: state,
|
|
1265
|
-
children: children
|
|
1266
|
-
}),
|
|
1267
|
-
errorMessage && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
1268
|
-
...errorMessageProps,
|
|
1269
|
-
children: errorMessage
|
|
1270
|
-
})
|
|
1271
|
-
]
|
|
1272
|
-
});
|
|
1273
|
-
});
|
|
1274
|
-
$e158c5cf7e190200$export$a98f0dcb43a68a25.displayName = "RadioGroup";
|
|
1275
|
-
$e158c5cf7e190200$export$d7b12c4107be0d61.displayName = "Radio";
|
|
1194
|
+
const $3b903582a5253460$export$e44a253a59704894 = {
|
|
1195
|
+
Root: (0, $724eace27ebf345b$export$e44a253a59704894),
|
|
1196
|
+
Menu: $724eace27ebf345b$export$d9b273488cd8ce6f,
|
|
1197
|
+
Trigger: (0, $724eace27ebf345b$export$e7eb525bc415b4b4),
|
|
1198
|
+
Item: (0, $724eace27ebf345b$export$2ce376c2cc3355c8),
|
|
1199
|
+
Section: (0, $724eace27ebf345b$export$4b1545b4f2016d26)
|
|
1200
|
+
};
|
|
1276
1201
|
|
|
1277
1202
|
|
|
1278
1203
|
|
|
@@ -1281,59 +1206,6 @@ $e158c5cf7e190200$export$d7b12c4107be0d61.displayName = "Radio";
|
|
|
1281
1206
|
|
|
1282
1207
|
|
|
1283
1208
|
|
|
1284
|
-
const $71fcf48f7e2e9427$export$f8afaea2e9656b91 = /*#__PURE__*/ $8zHUo$react.forwardRef(({ title: title, description: description, children: children, appearance: appearance, showIndicator: showIndicator = true, color: color, ...props }, ref)=>{
|
|
1285
|
-
const state = $8zHUo$react.useContext((0, $e158c5cf7e190200$export$b118023277d4a5c3));
|
|
1286
|
-
if (!state) throw new Error("RadioCard must be used within a RadioGroup");
|
|
1287
|
-
const inputRef = $8zHUo$react.useRef(null);
|
|
1288
|
-
const { inputProps: inputProps } = (0, $8zHUo$reactaria.useRadio)(props, state, inputRef);
|
|
1289
|
-
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
|
|
1290
|
-
"data-radius": "lg",
|
|
1291
|
-
className: "p-radio-card",
|
|
1292
|
-
"data-color": color,
|
|
1293
|
-
"data-appearance": appearance,
|
|
1294
|
-
"data-checked": inputProps.checked,
|
|
1295
|
-
ref: ref,
|
|
1296
|
-
children: [
|
|
1297
|
-
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.VisuallyHidden), {
|
|
1298
|
-
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
|
|
1299
|
-
...inputProps,
|
|
1300
|
-
ref: inputRef
|
|
1301
|
-
})
|
|
1302
|
-
}),
|
|
1303
|
-
showIndicator && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
1304
|
-
className: "p-fake-radio",
|
|
1305
|
-
"data-size": "sm",
|
|
1306
|
-
"data-checked": inputProps.checked
|
|
1307
|
-
}),
|
|
1308
|
-
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1309
|
-
stack: true,
|
|
1310
|
-
gap: "xs",
|
|
1311
|
-
children: [
|
|
1312
|
-
(title || description) && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1313
|
-
gap: "4xs",
|
|
1314
|
-
stack: true,
|
|
1315
|
-
children: [
|
|
1316
|
-
title && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
1317
|
-
color: color,
|
|
1318
|
-
size: "sm",
|
|
1319
|
-
children: title
|
|
1320
|
-
}),
|
|
1321
|
-
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
1322
|
-
color: color,
|
|
1323
|
-
lineHeight: "tall",
|
|
1324
|
-
size: "xs",
|
|
1325
|
-
variant: "lighter",
|
|
1326
|
-
children: description
|
|
1327
|
-
})
|
|
1328
|
-
]
|
|
1329
|
-
}),
|
|
1330
|
-
children
|
|
1331
|
-
]
|
|
1332
|
-
})
|
|
1333
|
-
]
|
|
1334
|
-
});
|
|
1335
|
-
});
|
|
1336
|
-
$71fcf48f7e2e9427$export$f8afaea2e9656b91.displayName = "RadioCard";
|
|
1337
1209
|
|
|
1338
1210
|
|
|
1339
1211
|
|
|
@@ -1541,6 +1413,261 @@ const $dcfc4542aa84c062$export$6e2c8f0811a474ce = (0, $8zHUo$reactstately.Sectio
|
|
|
1541
1413
|
|
|
1542
1414
|
|
|
1543
1415
|
|
|
1416
|
+
const $d67a8dc6cbdaa7ed$export$acd2d351457d1d82 = ({ label: label, error: error, showDropdownButton: showDropdownButton = true, dropdownArrow: dropdownArrow = /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiSelector), {
|
|
1417
|
+
size: 18
|
|
1418
|
+
}), 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)=>{
|
|
1419
|
+
const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
|
|
1420
|
+
const { contains: contains } = (0, $8zHUo$reactaria.useFilter)({
|
|
1421
|
+
sensitivity: "base"
|
|
1422
|
+
});
|
|
1423
|
+
const state = (0, $8zHUo$reactstately.useComboBoxState)({
|
|
1424
|
+
...props,
|
|
1425
|
+
children: (0, $fc43ab93aaa777d9$export$3d7d0414f6db67e7)(props),
|
|
1426
|
+
defaultFilter: contains
|
|
1427
|
+
});
|
|
1428
|
+
const inputRef = $8zHUo$react.useRef(null);
|
|
1429
|
+
const buttonRef = $8zHUo$react.useRef(null);
|
|
1430
|
+
const listBoxRef = $8zHUo$react.useRef(null);
|
|
1431
|
+
const popoverRef = $8zHUo$react.useRef(null);
|
|
1432
|
+
const wrapperRef = $8zHUo$react.useRef(null);
|
|
1433
|
+
const { inputProps: inputProps, buttonProps: buttonProps, listBoxProps: listBoxProps } = (0, $8zHUo$reactaria.useComboBox)({
|
|
1434
|
+
inputRef: inputRef,
|
|
1435
|
+
buttonRef: buttonRef,
|
|
1436
|
+
listBoxRef: listBoxRef,
|
|
1437
|
+
popoverRef: popoverRef,
|
|
1438
|
+
...props
|
|
1439
|
+
}, state);
|
|
1440
|
+
function resolvedDropdownArrow() {
|
|
1441
|
+
if (typeof dropdownArrow === "function") return dropdownArrow({
|
|
1442
|
+
color: "gray",
|
|
1443
|
+
size: "md"
|
|
1444
|
+
});
|
|
1445
|
+
return dropdownArrow;
|
|
1446
|
+
}
|
|
1447
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1448
|
+
"data-color": color ?? theme?.color ?? "gray",
|
|
1449
|
+
"data-size": size,
|
|
1450
|
+
"data-radius": radius ?? theme?.radius ?? "lg",
|
|
1451
|
+
style: style,
|
|
1452
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-combo-box p-input-group", className),
|
|
1453
|
+
ref: ref,
|
|
1454
|
+
stack: true,
|
|
1455
|
+
gap: "3xs",
|
|
1456
|
+
stretchX: true,
|
|
1457
|
+
children: [
|
|
1458
|
+
label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
|
|
1459
|
+
children: label
|
|
1460
|
+
}),
|
|
1461
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1462
|
+
position: "relative",
|
|
1463
|
+
gap: "3xs",
|
|
1464
|
+
ref: wrapperRef,
|
|
1465
|
+
align: "center",
|
|
1466
|
+
"data-appearance": appearance,
|
|
1467
|
+
className: "p-input-control p-combo-box-control",
|
|
1468
|
+
children: [
|
|
1469
|
+
prepend,
|
|
1470
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
|
|
1471
|
+
className: "p-combo-box-input p-text-input-el",
|
|
1472
|
+
onChange: (e)=>inputProps.onChange?.(e),
|
|
1473
|
+
ref: inputRef,
|
|
1474
|
+
"data-has-prepend": !!prepend,
|
|
1475
|
+
"data-size": "md",
|
|
1476
|
+
...(0, $ff6fce0e059b3a1a$export$30a06c8d3562193f)(inputProps, [
|
|
1477
|
+
"size",
|
|
1478
|
+
"onChange"
|
|
1479
|
+
])
|
|
1480
|
+
}),
|
|
1481
|
+
append,
|
|
1482
|
+
isLoading && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $a28e128499dd0b02$export$3b0d6d7590275603), {
|
|
1483
|
+
size: "xs"
|
|
1484
|
+
}),
|
|
1485
|
+
showDropdownButton && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $3af04cd154cf4de1$export$c25acd513dcc8062), {
|
|
1486
|
+
...buttonProps,
|
|
1487
|
+
variant: "ghost",
|
|
1488
|
+
color: "gray",
|
|
1489
|
+
radius: "lg",
|
|
1490
|
+
className: "p-combo-box-button",
|
|
1491
|
+
ref: buttonRef,
|
|
1492
|
+
children: resolvedDropdownArrow()
|
|
1493
|
+
})
|
|
1494
|
+
]
|
|
1495
|
+
}),
|
|
1496
|
+
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
1497
|
+
children: error
|
|
1498
|
+
}),
|
|
1499
|
+
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $0f347092d3465402$export$5b6b19405a83ff9d), {
|
|
1500
|
+
popoverRef: popoverRef,
|
|
1501
|
+
offset: 8,
|
|
1502
|
+
state: state,
|
|
1503
|
+
triggerRef: wrapperRef,
|
|
1504
|
+
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $dcfc4542aa84c062$export$41f133550aa26f48), {
|
|
1505
|
+
color: listBoxColor ?? theme?.color ?? "gray",
|
|
1506
|
+
width: wrapperRef.current?.getBoundingClientRect().width,
|
|
1507
|
+
listBoxRef: listBoxRef,
|
|
1508
|
+
state: state,
|
|
1509
|
+
...listBoxProps
|
|
1510
|
+
})
|
|
1511
|
+
})
|
|
1512
|
+
]
|
|
1513
|
+
});
|
|
1514
|
+
};
|
|
1515
|
+
$d67a8dc6cbdaa7ed$export$acd2d351457d1d82.displayName = "ComboBox";
|
|
1516
|
+
const $d67a8dc6cbdaa7ed$export$72b9695b8216309a = /*#__PURE__*/ $8zHUo$react.forwardRef($d67a8dc6cbdaa7ed$export$acd2d351457d1d82);
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
const $e158c5cf7e190200$export$b118023277d4a5c3 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).createContext(null);
|
|
1531
|
+
const $e158c5cf7e190200$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef((props, ref)=>{
|
|
1532
|
+
const state = (0, ($parcel$interopDefault($8zHUo$react))).useContext($e158c5cf7e190200$export$b118023277d4a5c3);
|
|
1533
|
+
const { size: size = "sm", className: className, style: style, appearance: appearance, color: color, ...otherProps } = props;
|
|
1534
|
+
if (!state) throw new Error("Radio must be used within a RadioGroup");
|
|
1535
|
+
const inputRef = (0, ($parcel$interopDefault($8zHUo$react))).useRef(null);
|
|
1536
|
+
const { inputProps: inputProps } = (0, $8zHUo$reactaria.useRadio)(otherProps, state, inputRef);
|
|
1537
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
|
|
1538
|
+
style: style,
|
|
1539
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
1540
|
+
className,
|
|
1541
|
+
"p-radio"
|
|
1542
|
+
]),
|
|
1543
|
+
ref: ref,
|
|
1544
|
+
children: [
|
|
1545
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.VisuallyHidden), {
|
|
1546
|
+
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
|
|
1547
|
+
...inputProps,
|
|
1548
|
+
ref: inputRef
|
|
1549
|
+
})
|
|
1550
|
+
}),
|
|
1551
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
1552
|
+
"data-color": color,
|
|
1553
|
+
className: "p-fake-radio",
|
|
1554
|
+
"data-appearance": appearance,
|
|
1555
|
+
"data-checked": inputProps.checked,
|
|
1556
|
+
"data-size": size
|
|
1557
|
+
}),
|
|
1558
|
+
props.children
|
|
1559
|
+
]
|
|
1560
|
+
});
|
|
1561
|
+
});
|
|
1562
|
+
const $e158c5cf7e190200$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ stack: stack = true, direction: direction, gap: gap = "xs", rowGap: rowGap, align: align, justify: justify, wrap: wrap, columnGap: columnGap, ...props }, ref)=>{
|
|
1563
|
+
const { children: children, label: label, description: description, errorMessage: errorMessage } = props;
|
|
1564
|
+
const state = (0, $8zHUo$reactstately.useRadioGroupState)(props);
|
|
1565
|
+
const { radioGroupProps: radioGroupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $8zHUo$reactaria.useRadioGroup)(props, state);
|
|
1566
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1567
|
+
ref: ref,
|
|
1568
|
+
stack: stack,
|
|
1569
|
+
gap: gap,
|
|
1570
|
+
direction: direction,
|
|
1571
|
+
rowGap: rowGap,
|
|
1572
|
+
columnGap: columnGap,
|
|
1573
|
+
align: align,
|
|
1574
|
+
justify: justify,
|
|
1575
|
+
wrap: wrap,
|
|
1576
|
+
...radioGroupProps,
|
|
1577
|
+
children: [
|
|
1578
|
+
label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
|
|
1579
|
+
...labelProps,
|
|
1580
|
+
children: label
|
|
1581
|
+
}),
|
|
1582
|
+
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
1583
|
+
variant: "light",
|
|
1584
|
+
...descriptionProps,
|
|
1585
|
+
children: description
|
|
1586
|
+
}),
|
|
1587
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($e158c5cf7e190200$export$b118023277d4a5c3.Provider, {
|
|
1588
|
+
value: state,
|
|
1589
|
+
children: children
|
|
1590
|
+
}),
|
|
1591
|
+
errorMessage && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
1592
|
+
...errorMessageProps,
|
|
1593
|
+
children: errorMessage
|
|
1594
|
+
})
|
|
1595
|
+
]
|
|
1596
|
+
});
|
|
1597
|
+
});
|
|
1598
|
+
$e158c5cf7e190200$export$a98f0dcb43a68a25.displayName = "RadioGroup";
|
|
1599
|
+
$e158c5cf7e190200$export$d7b12c4107be0d61.displayName = "Radio";
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
const $71fcf48f7e2e9427$export$f8afaea2e9656b91 = /*#__PURE__*/ $8zHUo$react.forwardRef(({ title: title, description: description, children: children, appearance: appearance, showIndicator: showIndicator = true, color: color, ...props }, ref)=>{
|
|
1609
|
+
const state = $8zHUo$react.useContext((0, $e158c5cf7e190200$export$b118023277d4a5c3));
|
|
1610
|
+
if (!state) throw new Error("RadioCard must be used within a RadioGroup");
|
|
1611
|
+
const inputRef = $8zHUo$react.useRef(null);
|
|
1612
|
+
const { inputProps: inputProps } = (0, $8zHUo$reactaria.useRadio)(props, state, inputRef);
|
|
1613
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
|
|
1614
|
+
"data-radius": "lg",
|
|
1615
|
+
className: "p-radio-card",
|
|
1616
|
+
"data-color": color,
|
|
1617
|
+
"data-appearance": appearance,
|
|
1618
|
+
"data-checked": inputProps.checked,
|
|
1619
|
+
ref: ref,
|
|
1620
|
+
children: [
|
|
1621
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.VisuallyHidden), {
|
|
1622
|
+
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
|
|
1623
|
+
...inputProps,
|
|
1624
|
+
ref: inputRef
|
|
1625
|
+
})
|
|
1626
|
+
}),
|
|
1627
|
+
showIndicator && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
1628
|
+
className: "p-fake-radio",
|
|
1629
|
+
"data-size": "sm",
|
|
1630
|
+
"data-checked": inputProps.checked
|
|
1631
|
+
}),
|
|
1632
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1633
|
+
stack: true,
|
|
1634
|
+
gap: "xs",
|
|
1635
|
+
children: [
|
|
1636
|
+
(title || description) && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1637
|
+
gap: "4xs",
|
|
1638
|
+
stack: true,
|
|
1639
|
+
children: [
|
|
1640
|
+
title && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
1641
|
+
color: color,
|
|
1642
|
+
size: "sm",
|
|
1643
|
+
children: title
|
|
1644
|
+
}),
|
|
1645
|
+
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
1646
|
+
color: color,
|
|
1647
|
+
lineHeight: "tall",
|
|
1648
|
+
size: "xs",
|
|
1649
|
+
variant: "lighter",
|
|
1650
|
+
children: description
|
|
1651
|
+
})
|
|
1652
|
+
]
|
|
1653
|
+
}),
|
|
1654
|
+
children
|
|
1655
|
+
]
|
|
1656
|
+
})
|
|
1657
|
+
]
|
|
1658
|
+
});
|
|
1659
|
+
});
|
|
1660
|
+
$71fcf48f7e2e9427$export$f8afaea2e9656b91.displayName = "RadioCard";
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
|
|
1544
1671
|
|
|
1545
1672
|
|
|
1546
1673
|
|