@aviala-design/spiral 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -958,7 +958,7 @@ Button.displayName = "Button";
958
958
  // src/components/input.tsx
959
959
  import { cva as cva5 } from "class-variance-authority";
960
960
  import {
961
- forwardRef as forwardRef5,
961
+ forwardRef as forwardRef7,
962
962
  isValidElement as isValidElement5,
963
963
  useState as useState2
964
964
  } from "react";
@@ -1104,8 +1104,236 @@ var Badge = forwardRef4(
1104
1104
  );
1105
1105
  Badge.displayName = "Badge";
1106
1106
 
1107
+ // src/components/form-field.tsx
1108
+ import { SymbolInformationCircle, SymbolWrongCircle } from "@aviala-design/icons";
1109
+ import {
1110
+ createContext as createContext4,
1111
+ forwardRef as forwardRef6,
1112
+ useContext as useContext5,
1113
+ useId,
1114
+ useMemo as useMemo3
1115
+ } from "react";
1116
+ import {
1117
+ FormProvider,
1118
+ useController
1119
+ } from "react-hook-form";
1120
+
1121
+ // src/components/typeface.tsx
1122
+ import { forwardRef as forwardRef5 } from "react";
1123
+ import { jsx as jsx9 } from "react/jsx-runtime";
1124
+ var typefaceLayouts = {
1125
+ allCustom: [
1126
+ { level: "text", children: null },
1127
+ { level: "caption", children: null }
1128
+ ],
1129
+ textCaption: [
1130
+ { level: "text", children: null },
1131
+ { level: "caption", children: null }
1132
+ ],
1133
+ textCaptionSubtitle: [
1134
+ { level: "subtitle", children: null },
1135
+ { level: "text", children: null },
1136
+ { level: "caption", children: null }
1137
+ ],
1138
+ textTitle: [
1139
+ { level: "title", children: null },
1140
+ { level: "text", children: null }
1141
+ ],
1142
+ textHeadline2: [
1143
+ { level: "headline2", children: null },
1144
+ { level: "text", children: null }
1145
+ ],
1146
+ textHeadline1: [
1147
+ { level: "headline1", children: null },
1148
+ { level: "text", children: null }
1149
+ ]
1150
+ };
1151
+ var Typeface = forwardRef5(
1152
+ ({
1153
+ className,
1154
+ content = "allCustom",
1155
+ primary,
1156
+ secondary,
1157
+ tertiary,
1158
+ primaryContent = "text",
1159
+ secondaryContent = "text",
1160
+ tertiaryContent = "text",
1161
+ tone = "default",
1162
+ children,
1163
+ ...props
1164
+ }, ref) => {
1165
+ const layout = typefaceLayouts[content];
1166
+ const values = resolveTypefaceValues(content, primary, secondary, tertiary, children);
1167
+ return /* @__PURE__ */ jsx9("div", { ref, className: cn("aviala-typeface", className), "data-content": content, ...props, children: layout.map((line, index) => {
1168
+ const value = values[index];
1169
+ if (value === void 0 || value === null || value === false) return null;
1170
+ const lineContent = index === 0 ? primaryContent : index === 1 ? secondaryContent : tertiaryContent;
1171
+ return /* @__PURE__ */ jsx9("span", { className: "aviala-typeface__line", children: /* @__PURE__ */ jsx9(Typography, { level: line.level, content: lineContent, tone, children: value }) }, `${line.level}-${index}`);
1172
+ }) });
1173
+ }
1174
+ );
1175
+ Typeface.displayName = "Typeface";
1176
+ function resolveTypefaceValues(content, primary, secondary, tertiary, children) {
1177
+ if (primary !== void 0 || secondary !== void 0 || tertiary !== void 0) {
1178
+ return [primary, secondary, tertiary];
1179
+ }
1180
+ if (children == null || children === false) {
1181
+ return typefaceLayouts[content].map(() => "Text");
1182
+ }
1183
+ if (Array.isArray(children)) {
1184
+ return children;
1185
+ }
1186
+ return [children];
1187
+ }
1188
+ var TypefacePair = forwardRef5(
1189
+ ({ title, description, ...props }, ref) => /* @__PURE__ */ jsx9(
1190
+ Typeface,
1191
+ {
1192
+ ref,
1193
+ content: "textCaption",
1194
+ primary: title,
1195
+ secondary: description,
1196
+ ...props
1197
+ }
1198
+ )
1199
+ );
1200
+ TypefacePair.displayName = "TypefacePair";
1201
+
1202
+ // src/components/form-field.tsx
1203
+ import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
1204
+ var FormFieldControlContext = createContext4(null);
1205
+ function useResolvedControlError(errorProp) {
1206
+ const ctx = useContext5(FormFieldControlContext);
1207
+ return errorProp ?? ctx?.invalid ?? false;
1208
+ }
1209
+ var FormFieldLayout = forwardRef6(
1210
+ ({
1211
+ className,
1212
+ label,
1213
+ htmlFor,
1214
+ description,
1215
+ error,
1216
+ info,
1217
+ alert,
1218
+ required,
1219
+ direction = "vertical",
1220
+ children,
1221
+ ...props
1222
+ }, ref) => {
1223
+ const reactId = useId();
1224
+ const labelId = `${reactId}-label`;
1225
+ const hasLabel = label != null && label !== "";
1226
+ const invalid = Boolean(error);
1227
+ const controlContext = useMemo3(() => ({ invalid }), [invalid]);
1228
+ const labelNode = hasLabel || description ? htmlFor ? /* @__PURE__ */ jsx10("label", { htmlFor, className: "aviala-form__label aviala-form__label--control", children: /* @__PURE__ */ jsx10(
1229
+ Typeface,
1230
+ {
1231
+ id: labelId,
1232
+ content: "textCaption",
1233
+ primary: hasLabel ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
1234
+ label,
1235
+ required ? /* @__PURE__ */ jsx10("span", { className: "aviala-form__required", "aria-hidden": true, children: "*" }) : null
1236
+ ] }) : void 0,
1237
+ secondary: description
1238
+ }
1239
+ ) }) : /* @__PURE__ */ jsx10(
1240
+ Typeface,
1241
+ {
1242
+ id: labelId,
1243
+ className: "aviala-form__label",
1244
+ content: "textCaption",
1245
+ primary: hasLabel ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
1246
+ label,
1247
+ required ? /* @__PURE__ */ jsx10("span", { className: "aviala-form__required", "aria-hidden": true, children: "*" }) : null
1248
+ ] }) : void 0,
1249
+ secondary: description
1250
+ }
1251
+ ) : null;
1252
+ return /* @__PURE__ */ jsxs3(
1253
+ "div",
1254
+ {
1255
+ ref,
1256
+ className: cn("aviala-form", className),
1257
+ "data-direction": direction,
1258
+ "aria-labelledby": hasLabel ? labelId : void 0,
1259
+ ...props,
1260
+ children: [
1261
+ labelNode,
1262
+ /* @__PURE__ */ jsxs3("div", { className: "aviala-form__content", children: [
1263
+ /* @__PURE__ */ jsx10(FormFieldControlContext.Provider, { value: controlContext, children }),
1264
+ error ? /* @__PURE__ */ jsxs3("div", { className: "aviala-form__message aviala-form__message--error", role: "alert", children: [
1265
+ /* @__PURE__ */ jsx10(
1266
+ SymbolWrongCircle,
1267
+ {
1268
+ className: "aviala-form__message-icon",
1269
+ width: 14,
1270
+ height: 14,
1271
+ "aria-hidden": true
1272
+ }
1273
+ ),
1274
+ /* @__PURE__ */ jsx10(Typography, { level: "caption", as: "p", className: "aviala-form__message-text", children: error })
1275
+ ] }) : null,
1276
+ info ? /* @__PURE__ */ jsxs3("div", { className: "aviala-form__message aviala-form__message--info", children: [
1277
+ /* @__PURE__ */ jsx10(
1278
+ SymbolInformationCircle,
1279
+ {
1280
+ className: "aviala-form__message-icon",
1281
+ width: 14,
1282
+ height: 14,
1283
+ "aria-hidden": true
1284
+ }
1285
+ ),
1286
+ /* @__PURE__ */ jsx10(Typography, { level: "caption", as: "p", className: "aviala-form__message-text", children: info })
1287
+ ] }) : null,
1288
+ alert ? /* @__PURE__ */ jsx10("div", { className: "aviala-form__alert", children: alert }) : null
1289
+ ] })
1290
+ ]
1291
+ }
1292
+ );
1293
+ }
1294
+ );
1295
+ FormFieldLayout.displayName = "FormFieldLayout";
1296
+ var FormFieldControlled = forwardRef6(
1297
+ ({
1298
+ control,
1299
+ name,
1300
+ rules,
1301
+ defaultValue,
1302
+ shouldUnregister,
1303
+ disabled,
1304
+ render,
1305
+ error,
1306
+ ...layoutProps
1307
+ }, ref) => {
1308
+ const id = useId();
1309
+ const { field, fieldState, formState } = useController({
1310
+ name,
1311
+ control,
1312
+ rules,
1313
+ defaultValue,
1314
+ shouldUnregister,
1315
+ disabled
1316
+ });
1317
+ const message = error !== void 0 ? error : fieldState.error?.message ?? null;
1318
+ return /* @__PURE__ */ jsx10(FormFieldLayout, { ref, ...layoutProps, htmlFor: id, error: message, children: render({ field, fieldState, formState, id }) });
1319
+ }
1320
+ );
1321
+ FormFieldControlled.displayName = "FormFieldControlled";
1322
+ function isControlledProps(props) {
1323
+ return "render" in props && typeof props.render === "function" && "name" in props;
1324
+ }
1325
+ var FormFieldRoot = forwardRef6((props, ref) => {
1326
+ if (isControlledProps(props)) {
1327
+ return /* @__PURE__ */ jsx10(FormFieldControlled, { ref, ...props });
1328
+ }
1329
+ return /* @__PURE__ */ jsx10(FormFieldLayout, { ref, ...props });
1330
+ });
1331
+ var FormField = FormFieldRoot;
1332
+ FormField.displayName = "FormField";
1333
+ var Form = FormProvider;
1334
+
1107
1335
  // src/components/input.tsx
1108
- import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
1336
+ import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
1109
1337
  function resolveInputState(value, defaultValue, focused) {
1110
1338
  const current = value ?? defaultValue ?? "";
1111
1339
  if (String(current).length === 0) return "empty";
@@ -1124,9 +1352,9 @@ var inputRootVariants = cva5("aviala-input relative min-w-0 font-sans", {
1124
1352
  });
1125
1353
  function renderBadgeArea(node) {
1126
1354
  if (node == null || node === false) return null;
1127
- return /* @__PURE__ */ jsx9("span", { className: "aviala-input__badge-area", children: isValidElement5(node) && node.type === Badge ? node : /* @__PURE__ */ jsx9(Badge, { children: node }) });
1355
+ return /* @__PURE__ */ jsx11("span", { className: "aviala-input__badge-area", children: isValidElement5(node) && node.type === Badge ? node : /* @__PURE__ */ jsx11(Badge, { children: node }) });
1128
1356
  }
1129
- var Input = forwardRef5(
1357
+ var Input = forwardRef7(
1130
1358
  ({
1131
1359
  className,
1132
1360
  size = "regular",
@@ -1136,7 +1364,7 @@ var Input = forwardRef5(
1136
1364
  leftBadge,
1137
1365
  rightBadge,
1138
1366
  fullWidth = true,
1139
- error = false,
1367
+ error,
1140
1368
  disabled,
1141
1369
  type = "text",
1142
1370
  value,
@@ -1150,25 +1378,26 @@ var Input = forwardRef5(
1150
1378
  const [internalValue, setInternalValue] = useState2(() => String(defaultValue ?? ""));
1151
1379
  const resolvedValue = value !== void 0 ? String(value) : internalValue;
1152
1380
  const inputState = resolveInputState(resolvedValue, void 0, focused);
1153
- return /* @__PURE__ */ jsxs3(
1381
+ const resolvedError = useResolvedControlError(error);
1382
+ return /* @__PURE__ */ jsxs4(
1154
1383
  "div",
1155
1384
  {
1156
1385
  className: cn(inputRootVariants({ fullWidth }), className),
1157
1386
  "data-size": size,
1158
1387
  "data-all-round": allRound ? "true" : void 0,
1159
1388
  "data-input-state": inputState,
1160
- "data-error": error ? "true" : void 0,
1389
+ "data-error": resolvedError ? "true" : void 0,
1161
1390
  "data-disabled": disabled ? "true" : void 0,
1162
1391
  ...spiralDebugId("input"),
1163
1392
  children: [
1164
1393
  renderSlotIcon(leftIcon, "aviala-input__slot", "input.left-icon"),
1165
1394
  renderBadgeArea(leftBadge),
1166
- /* @__PURE__ */ jsx9(
1395
+ /* @__PURE__ */ jsx11(
1167
1396
  "div",
1168
1397
  {
1169
1398
  className: "aviala-input__field relative z-[1] flex min-w-0 flex-1 flex-col justify-center",
1170
1399
  ...spiralDebugId("input.field"),
1171
- children: /* @__PURE__ */ jsx9(
1400
+ children: /* @__PURE__ */ jsx11(
1172
1401
  "input",
1173
1402
  {
1174
1403
  ref,
@@ -1176,7 +1405,7 @@ var Input = forwardRef5(
1176
1405
  disabled,
1177
1406
  value,
1178
1407
  defaultValue,
1179
- "aria-invalid": error || void 0,
1408
+ "aria-invalid": resolvedError || void 0,
1180
1409
  className: cn(
1181
1410
  typographyVariants({ level: "text" }),
1182
1411
  "w-full min-w-0 border-0 bg-transparent p-0 text-[var(--input-fg,#343333)] outline-none",
@@ -1216,12 +1445,12 @@ import {
1216
1445
  DirectionArrowUpLight
1217
1446
  } from "@aviala-design/icons";
1218
1447
  import {
1219
- forwardRef as forwardRef6,
1448
+ forwardRef as forwardRef8,
1220
1449
  isValidElement as isValidElement6,
1221
1450
  useRef,
1222
1451
  useState as useState3
1223
1452
  } from "react";
1224
- import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
1453
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1225
1454
  function assignRef(ref, value) {
1226
1455
  if (!ref) return;
1227
1456
  if (typeof ref === "function") {
@@ -1265,10 +1494,10 @@ function decimalPlaces(n) {
1265
1494
  }
1266
1495
  function renderBadgeArea2(node) {
1267
1496
  if (node == null || node === false) return null;
1268
- return /* @__PURE__ */ jsx10("span", { className: "aviala-input__badge-area", children: isValidElement6(node) && node.type === Badge ? node : /* @__PURE__ */ jsx10(Badge, { children: node }) });
1497
+ return /* @__PURE__ */ jsx12("span", { className: "aviala-input__badge-area", children: isValidElement6(node) && node.type === Badge ? node : /* @__PURE__ */ jsx12(Badge, { children: node }) });
1269
1498
  }
1270
1499
  var numberInputRootVariants = inputRootVariants;
1271
- var NumberInput = forwardRef6(
1500
+ var NumberInput = forwardRef8(
1272
1501
  ({
1273
1502
  className,
1274
1503
  size = "regular",
@@ -1280,7 +1509,7 @@ var NumberInput = forwardRef6(
1280
1509
  rightBadge,
1281
1510
  showControls = true,
1282
1511
  fullWidth = true,
1283
- error = false,
1512
+ error,
1284
1513
  disabled,
1285
1514
  value,
1286
1515
  defaultValue,
@@ -1303,6 +1532,7 @@ var NumberInput = forwardRef6(
1303
1532
  const isControlled = value !== void 0;
1304
1533
  const resolvedValue = isControlled ? value === "" || value === null || value === void 0 ? "" : String(value) : internalValue;
1305
1534
  const inputState = resolveInputState2(resolvedValue, void 0, focused);
1535
+ const resolvedError = useResolvedControlError(error);
1306
1536
  const numeric = parseNumeric(resolvedValue);
1307
1537
  const stepAmount = Number.isFinite(step) && step !== 0 ? Math.abs(step) : 1;
1308
1538
  const commitString = (next) => {
@@ -1319,7 +1549,7 @@ var NumberInput = forwardRef6(
1319
1549
  commitString(String(next));
1320
1550
  inputRef.current?.focus();
1321
1551
  };
1322
- return /* @__PURE__ */ jsxs4(
1552
+ return /* @__PURE__ */ jsxs5(
1323
1553
  "div",
1324
1554
  {
1325
1555
  className: cn(
@@ -1331,18 +1561,18 @@ var NumberInput = forwardRef6(
1331
1561
  "data-all-round": allRound ? "true" : void 0,
1332
1562
  "data-input-state": inputState,
1333
1563
  "data-input-style": inputStyle,
1334
- "data-error": error ? "true" : void 0,
1564
+ "data-error": resolvedError ? "true" : void 0,
1335
1565
  "data-disabled": disabled ? "true" : void 0,
1336
1566
  ...spiralDebugId("number-input"),
1337
1567
  children: [
1338
1568
  renderSlotIcon(leftIcon, "aviala-input__slot", "number-input.left-icon"),
1339
1569
  renderBadgeArea2(leftBadge),
1340
- /* @__PURE__ */ jsx10(
1570
+ /* @__PURE__ */ jsx12(
1341
1571
  "div",
1342
1572
  {
1343
1573
  className: "aviala-input__field relative z-[1] flex min-w-0 flex-1 flex-col justify-center",
1344
1574
  ...spiralDebugId("number-input.field"),
1345
- children: /* @__PURE__ */ jsx10(
1575
+ children: /* @__PURE__ */ jsx12(
1346
1576
  "input",
1347
1577
  {
1348
1578
  ref: (node) => {
@@ -1356,7 +1586,7 @@ var NumberInput = forwardRef6(
1356
1586
  step: stepAmount,
1357
1587
  min,
1358
1588
  max,
1359
- "aria-invalid": error || void 0,
1589
+ "aria-invalid": resolvedError || void 0,
1360
1590
  className: cn(
1361
1591
  typographyVariants({ level: "text" }),
1362
1592
  "aviala-number-input__input w-full min-w-0 border-0 bg-transparent p-0 text-[var(--input-fg,#343333)] outline-none",
@@ -1401,13 +1631,13 @@ var NumberInput = forwardRef6(
1401
1631
  ),
1402
1632
  renderBadgeArea2(rightBadge),
1403
1633
  renderSlotIcon(rightIcon, "aviala-input__slot", "number-input.right-icon"),
1404
- showControls ? /* @__PURE__ */ jsxs4(
1634
+ showControls ? /* @__PURE__ */ jsxs5(
1405
1635
  "div",
1406
1636
  {
1407
1637
  className: "aviala-number-input__controls",
1408
1638
  ...spiralDebugId("number-input.controls"),
1409
1639
  children: [
1410
- /* @__PURE__ */ jsx10(
1640
+ /* @__PURE__ */ jsx12(
1411
1641
  "button",
1412
1642
  {
1413
1643
  type: "button",
@@ -1418,10 +1648,10 @@ var NumberInput = forwardRef6(
1418
1648
  onMouseDown: (event) => event.preventDefault(),
1419
1649
  onClick: () => applyStep(1),
1420
1650
  ...spiralDebugId("number-input.step-up"),
1421
- children: /* @__PURE__ */ jsx10(DirectionArrowUpLight, { level: "text", biggerSize: true, "aria-hidden": true })
1651
+ children: /* @__PURE__ */ jsx12(DirectionArrowUpLight, { level: "text", biggerSize: true, "aria-hidden": true })
1422
1652
  }
1423
1653
  ),
1424
- /* @__PURE__ */ jsx10(
1654
+ /* @__PURE__ */ jsx12(
1425
1655
  "button",
1426
1656
  {
1427
1657
  type: "button",
@@ -1432,7 +1662,7 @@ var NumberInput = forwardRef6(
1432
1662
  onMouseDown: (event) => event.preventDefault(),
1433
1663
  onClick: () => applyStep(-1),
1434
1664
  ...spiralDebugId("number-input.step-down"),
1435
- children: /* @__PURE__ */ jsx10(DirectionArrowDownLight, { level: "text", biggerSize: true, "aria-hidden": true })
1665
+ children: /* @__PURE__ */ jsx12(DirectionArrowDownLight, { level: "text", biggerSize: true, "aria-hidden": true })
1436
1666
  }
1437
1667
  )
1438
1668
  ]
@@ -1448,13 +1678,13 @@ NumberInput.displayName = "NumberInput";
1448
1678
  // src/components/textarea.tsx
1449
1679
  import { SymbolResize } from "@aviala-design/icons";
1450
1680
  import {
1451
- forwardRef as forwardRef7,
1681
+ forwardRef as forwardRef9,
1452
1682
  useCallback as useCallback2,
1453
1683
  useEffect,
1454
1684
  useRef as useRef2,
1455
1685
  useState as useState4
1456
1686
  } from "react";
1457
- import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
1687
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
1458
1688
  function assignRef2(ref, value) {
1459
1689
  if (!ref) return;
1460
1690
  if (typeof ref === "function") {
@@ -1468,7 +1698,7 @@ function resolveTextareaState(value, defaultValue, focused) {
1468
1698
  if (String(current).length === 0) return "empty";
1469
1699
  return focused ? "typing" : "fill";
1470
1700
  }
1471
- var Textarea = forwardRef7(
1701
+ var Textarea = forwardRef9(
1472
1702
  ({
1473
1703
  className,
1474
1704
  size = "regular",
@@ -1476,7 +1706,7 @@ var Textarea = forwardRef7(
1476
1706
  rightIcon,
1477
1707
  showController: showControllerProp,
1478
1708
  maxLength,
1479
- error = false,
1709
+ error,
1480
1710
  disabled,
1481
1711
  value,
1482
1712
  defaultValue,
@@ -1497,6 +1727,7 @@ var Textarea = forwardRef7(
1497
1727
  const resolvedValue = value !== void 0 ? String(value) : internalValue;
1498
1728
  const displayLength = resolvedValue.length;
1499
1729
  const inputState = resolveTextareaState(resolvedValue, void 0, focused);
1730
+ const resolvedError = useResolvedControlError(error);
1500
1731
  const setTextareaRef = useCallback2(
1501
1732
  (node) => {
1502
1733
  textareaRef.current = node;
@@ -1565,14 +1796,14 @@ var Textarea = forwardRef7(
1565
1796
  document.body.style.userSelect = previousUserSelect;
1566
1797
  };
1567
1798
  }, [resizing]);
1568
- return /* @__PURE__ */ jsxs5(
1799
+ return /* @__PURE__ */ jsxs6(
1569
1800
  "div",
1570
1801
  {
1571
1802
  ref: rootRef,
1572
1803
  className: cn("aviala-textarea", className),
1573
1804
  "data-size": resolvedSize,
1574
1805
  "data-input-state": inputState,
1575
- "data-error": error ? "true" : void 0,
1806
+ "data-error": resolvedError ? "true" : void 0,
1576
1807
  "data-has-controller": showController ? "true" : void 0,
1577
1808
  "data-disabled": disabled ? "true" : void 0,
1578
1809
  "data-resizing": resizing ? "true" : void 0,
@@ -1581,7 +1812,7 @@ var Textarea = forwardRef7(
1581
1812
  ...spiralDebugId("textarea"),
1582
1813
  children: [
1583
1814
  renderSlotIcon(leftIcon, "aviala-textarea__slot", "textarea.left-icon"),
1584
- /* @__PURE__ */ jsx11("div", { className: "aviala-textarea__field", ...spiralDebugId("textarea.field"), children: /* @__PURE__ */ jsx11(
1815
+ /* @__PURE__ */ jsx13("div", { className: "aviala-textarea__field", ...spiralDebugId("textarea.field"), children: /* @__PURE__ */ jsx13(
1585
1816
  "textarea",
1586
1817
  {
1587
1818
  ref: setTextareaRef,
@@ -1589,7 +1820,7 @@ var Textarea = forwardRef7(
1589
1820
  maxLength,
1590
1821
  value,
1591
1822
  defaultValue,
1592
- "aria-invalid": error || void 0,
1823
+ "aria-invalid": resolvedError || void 0,
1593
1824
  className: cn("aviala-textarea__input", typographyVariants({ level: "text" })),
1594
1825
  onChange: (event) => {
1595
1826
  if (value === void 0) {
@@ -1609,8 +1840,8 @@ var Textarea = forwardRef7(
1609
1840
  }
1610
1841
  ) }),
1611
1842
  renderSlotIcon(rightIcon, "aviala-textarea__slot", "textarea.right-icon"),
1612
- showController ? /* @__PURE__ */ jsxs5("div", { className: "aviala-textarea__controller", ...spiralDebugId("textarea.controller"), children: [
1613
- /* @__PURE__ */ jsxs5(
1843
+ showController ? /* @__PURE__ */ jsxs6("div", { className: "aviala-textarea__controller", ...spiralDebugId("textarea.controller"), children: [
1844
+ /* @__PURE__ */ jsxs6(
1614
1845
  "span",
1615
1846
  {
1616
1847
  className: cn("aviala-textarea__counter", typographyVariants({ level: "caption" })),
@@ -1621,7 +1852,7 @@ var Textarea = forwardRef7(
1621
1852
  ]
1622
1853
  }
1623
1854
  ),
1624
- /* @__PURE__ */ jsx11(
1855
+ /* @__PURE__ */ jsx13(
1625
1856
  "button",
1626
1857
  {
1627
1858
  type: "button",
@@ -1631,7 +1862,7 @@ var Textarea = forwardRef7(
1631
1862
  tabIndex: disabled ? -1 : 0,
1632
1863
  onPointerDown: handleResizePointerDown,
1633
1864
  ...spiralDebugId("textarea.resize"),
1634
- children: /* @__PURE__ */ jsx11(SymbolResize, { thickness: "Regular", mode: "default", "aria-hidden": true })
1865
+ children: /* @__PURE__ */ jsx13(SymbolResize, { thickness: "Regular", mode: "default", "aria-hidden": true })
1635
1866
  }
1636
1867
  )
1637
1868
  ] }) : null
@@ -1654,13 +1885,13 @@ import {
1654
1885
  } from "@aviala-design/icons";
1655
1886
  import {
1656
1887
  Children,
1657
- createContext as createContext4,
1658
- forwardRef as forwardRef9,
1888
+ createContext as createContext5,
1889
+ forwardRef as forwardRef11,
1659
1890
  useCallback as useCallback3,
1660
- useContext as useContext5,
1891
+ useContext as useContext6,
1661
1892
  useEffect as useEffect2,
1662
- useId,
1663
- useMemo as useMemo3,
1893
+ useId as useId2,
1894
+ useMemo as useMemo4,
1664
1895
  useRef as useRef3,
1665
1896
  useState as useState5,
1666
1897
  isValidElement as isValidElement7
@@ -1669,9 +1900,9 @@ import {
1669
1900
  // src/components/link.tsx
1670
1901
  import { Slot as Slot3 } from "@radix-ui/react-slot";
1671
1902
  import {
1672
- forwardRef as forwardRef8
1903
+ forwardRef as forwardRef10
1673
1904
  } from "react";
1674
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
1905
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
1675
1906
  var levelStyles = {
1676
1907
  caption: {
1677
1908
  className: typographyVariants({ level: "caption" }),
@@ -1690,7 +1921,7 @@ function renderIcon2(node, level) {
1690
1921
  level: iconLevel,
1691
1922
  biggerSize: true
1692
1923
  });
1693
- return /* @__PURE__ */ jsx12(
1924
+ return /* @__PURE__ */ jsx14(
1694
1925
  "span",
1695
1926
  {
1696
1927
  className: cn(
@@ -1701,7 +1932,7 @@ function renderIcon2(node, level) {
1701
1932
  }
1702
1933
  );
1703
1934
  }
1704
- var Link = forwardRef8(
1935
+ var Link = forwardRef10(
1705
1936
  ({
1706
1937
  className,
1707
1938
  level = "caption",
@@ -1731,7 +1962,7 @@ var Link = forwardRef8(
1731
1962
  onClick?.(e);
1732
1963
  };
1733
1964
  if (asChild) {
1734
- return /* @__PURE__ */ jsx12(
1965
+ return /* @__PURE__ */ jsx14(
1735
1966
  Comp,
1736
1967
  {
1737
1968
  className: sharedClassName,
@@ -1747,7 +1978,7 @@ var Link = forwardRef8(
1747
1978
  }
1748
1979
  );
1749
1980
  }
1750
- return /* @__PURE__ */ jsxs6(
1981
+ return /* @__PURE__ */ jsxs7(
1751
1982
  Comp,
1752
1983
  {
1753
1984
  className: sharedClassName,
@@ -1761,7 +1992,7 @@ var Link = forwardRef8(
1761
1992
  onClick: handleClick,
1762
1993
  children: [
1763
1994
  renderIcon2(leftIcon ?? (iconOnly ? rightIcon : void 0), resolvedLevel),
1764
- !iconOnly && children !== void 0 && children !== null && /* @__PURE__ */ jsx12(
1995
+ !iconOnly && children !== void 0 && children !== null && /* @__PURE__ */ jsx14(
1765
1996
  "span",
1766
1997
  {
1767
1998
  className: cn(
@@ -1780,20 +2011,20 @@ var Link = forwardRef8(
1780
2011
  Link.displayName = "Link";
1781
2012
 
1782
2013
  // src/components/select.tsx
1783
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
2014
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1784
2015
  var SELECT_SUB_MENU_CLOSE_DELAY_MS = 250;
1785
2016
  var SELECT_SUB_MENU_EXIT_ANIM_MS = 150;
1786
- var SelectSubMenuContext = createContext4(null);
1787
- var SelectDismissContext = createContext4(null);
2017
+ var SelectSubMenuContext = createContext5(null);
2018
+ var SelectDismissContext = createContext5(null);
1788
2019
  function useSelectSubMenuContext() {
1789
- const context = useContext5(SelectSubMenuContext);
2020
+ const context = useContext6(SelectSubMenuContext);
1790
2021
  if (!context) {
1791
2022
  throw new Error("Select sub-menu components must be used within SelectContent.");
1792
2023
  }
1793
2024
  return context;
1794
2025
  }
1795
2026
  function useSelectSubMenuLayer() {
1796
- const contentId = useId();
2027
+ const contentId = useId2();
1797
2028
  const [activeSubItemId, setActiveSubItemId] = useState5(null);
1798
2029
  const [exitingSubItemId, setExitingSubItemId] = useState5(null);
1799
2030
  const itemsRef = useRef3(/* @__PURE__ */ new Map());
@@ -1960,7 +2191,7 @@ function useSelectSubMenuLayer() {
1960
2191
  document.removeEventListener("keydown", handleEscape, true);
1961
2192
  };
1962
2193
  }, [activeSubItemId, beginExit, clearExitTimer, exitingSubItemId]);
1963
- return useMemo3(
2194
+ return useMemo4(
1964
2195
  () => ({
1965
2196
  contentId,
1966
2197
  registerSubItem,
@@ -2020,7 +2251,7 @@ function renderItemIcon(node, iconLevel = "text", debugId) {
2020
2251
  level: iconLevel,
2021
2252
  biggerSize: true
2022
2253
  });
2023
- return /* @__PURE__ */ jsx13(
2254
+ return /* @__PURE__ */ jsx15(
2024
2255
  "span",
2025
2256
  {
2026
2257
  className: cn(
@@ -2035,16 +2266,16 @@ function renderItemIcon(node, iconLevel = "text", debugId) {
2035
2266
  }
2036
2267
  function renderBadgeSlot(node) {
2037
2268
  if (node == null || node === false) return null;
2038
- return /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__badge", children: isValidElement7(node) && node.type === Badge ? node : /* @__PURE__ */ jsx13(Badge, { children: node }) });
2269
+ return /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__badge", children: isValidElement7(node) && node.type === Badge ? node : /* @__PURE__ */ jsx15(Badge, { children: node }) });
2039
2270
  }
2040
2271
  function SelectItemFormRadio() {
2041
- return /* @__PURE__ */ jsxs7("span", { className: "aviala-select-item__form-radio", "aria-hidden": true, children: [
2042
- /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__form-radio-surface" }),
2043
- /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__form-radio-indicator" })
2272
+ return /* @__PURE__ */ jsxs8("span", { className: "aviala-select-item__form-radio", "aria-hidden": true, children: [
2273
+ /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__form-radio-surface" }),
2274
+ /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__form-radio-indicator" })
2044
2275
  ] });
2045
2276
  }
2046
2277
  function SelectItemFormCheckbox() {
2047
- return /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__form-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx13(
2278
+ return /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__form-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx15(
2048
2279
  SymbolRight,
2049
2280
  {
2050
2281
  className: "aviala-select-item__form-checkbox-icon",
@@ -2055,25 +2286,25 @@ function SelectItemFormCheckbox() {
2055
2286
  ) });
2056
2287
  }
2057
2288
  function SelectItemTrailingRadio() {
2058
- return /* @__PURE__ */ jsx13(SelectPrimitive.ItemIndicator, { className: "aviala-select-item__trailing-radio", "aria-hidden": true, children: /* @__PURE__ */ jsx13(SymbolRight, { level: "text", biggerSize: true, "aria-hidden": true }) });
2289
+ return /* @__PURE__ */ jsx15(SelectPrimitive.ItemIndicator, { className: "aviala-select-item__trailing-radio", "aria-hidden": true, children: /* @__PURE__ */ jsx15(SymbolRight, { level: "text", biggerSize: true, "aria-hidden": true }) });
2059
2290
  }
2060
2291
  function SelectItemTrailingCheckbox() {
2061
- return /* @__PURE__ */ jsx13(SelectPrimitive.ItemIndicator, { className: "aviala-select-item__trailing-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx13(SymbolRight, { level: "text", biggerSize: true, "aria-hidden": true }) });
2292
+ return /* @__PURE__ */ jsx15(SelectPrimitive.ItemIndicator, { className: "aviala-select-item__trailing-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx15(SymbolRight, { level: "text", biggerSize: true, "aria-hidden": true }) });
2062
2293
  }
2063
2294
  function SelectItemDefaultAvatar() {
2064
- return /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__avatar", "aria-hidden": true, children: /* @__PURE__ */ jsx13(UsersUserCircle, { level: "text", biggerSize: true, "aria-hidden": true }) });
2295
+ return /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__avatar", "aria-hidden": true, children: /* @__PURE__ */ jsx15(UsersUserCircle, { level: "text", biggerSize: true, "aria-hidden": true }) });
2065
2296
  }
2066
2297
  function SelectExpandChevron() {
2067
2298
  const rtl = useRtl();
2068
2299
  const Icon2 = rtl ? DirectionArrowLeft : DirectionArrowRight;
2069
- return /* @__PURE__ */ jsx13(Icon2, { level: "text", biggerSize: true, "aria-hidden": true });
2300
+ return /* @__PURE__ */ jsx15(Icon2, { level: "text", biggerSize: true, "aria-hidden": true });
2070
2301
  }
2071
2302
  function renderFunctionSlot(itemFunction, layout, showFunctionIcon, icon) {
2072
2303
  if (!showFunctionIcon) return null;
2073
2304
  if (layout === "checked") return null;
2074
2305
  const functionStyle = icon ? iconSlotCssVarStyle(icon, "--select-item-function-icon-size", "text", true) : void 0;
2075
2306
  if (icon !== void 0) {
2076
- return /* @__PURE__ */ jsx13(
2307
+ return /* @__PURE__ */ jsx15(
2077
2308
  "span",
2078
2309
  {
2079
2310
  className: "aviala-select-item__function",
@@ -2085,19 +2316,19 @@ function renderFunctionSlot(itemFunction, layout, showFunctionIcon, icon) {
2085
2316
  }
2086
2317
  switch (itemFunction) {
2087
2318
  case "radio":
2088
- return /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__function", ...spiralDebugId("select.content.item.function"), children: /* @__PURE__ */ jsx13(SelectItemTrailingRadio, {}) });
2319
+ return /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__function", ...spiralDebugId("select.content.item.function"), children: /* @__PURE__ */ jsx15(SelectItemTrailingRadio, {}) });
2089
2320
  case "checkbox":
2090
- return /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__function", ...spiralDebugId("select.content.item.function"), children: /* @__PURE__ */ jsx13(SelectItemTrailingCheckbox, {}) });
2321
+ return /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__function", ...spiralDebugId("select.content.item.function"), children: /* @__PURE__ */ jsx15(SelectItemTrailingCheckbox, {}) });
2091
2322
  case "simple":
2092
2323
  case "action":
2093
2324
  default:
2094
- return /* @__PURE__ */ jsx13(
2325
+ return /* @__PURE__ */ jsx15(
2095
2326
  "span",
2096
2327
  {
2097
2328
  className: "aviala-select-item__function",
2098
2329
  style: iconLevelCssVarStyle("text", true, "--select-item-function-icon-size"),
2099
2330
  ...spiralDebugId("select.content.item.function"),
2100
- children: /* @__PURE__ */ jsx13(SelectExpandChevron, {})
2331
+ children: /* @__PURE__ */ jsx15(SelectExpandChevron, {})
2101
2332
  }
2102
2333
  );
2103
2334
  }
@@ -2114,7 +2345,7 @@ function Select({
2114
2345
  const windowBlurCloseRef = useRef3(false);
2115
2346
  const pointerDownCloseRef = useRef3(false);
2116
2347
  const triggerRef = useRef3(null);
2117
- const dismissContextValue = useMemo3(
2348
+ const dismissContextValue = useMemo4(
2118
2349
  () => ({ pointerDownCloseRef, triggerRef }),
2119
2350
  []
2120
2351
  );
@@ -2150,7 +2381,7 @@ function Select({
2150
2381
  },
2151
2382
  [isControlled, onOpenChange]
2152
2383
  );
2153
- return /* @__PURE__ */ jsx13(SelectDismissContext.Provider, { value: dismissContextValue, children: /* @__PURE__ */ jsx13(SelectPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
2384
+ return /* @__PURE__ */ jsx15(SelectDismissContext.Provider, { value: dismissContextValue, children: /* @__PURE__ */ jsx15(SelectPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
2154
2385
  }
2155
2386
  var SelectValue = SelectPrimitive.Value;
2156
2387
  var SelectGroup = SelectPrimitive.Group;
@@ -2185,7 +2416,7 @@ function wrapUngroupedSelectItems(children) {
2185
2416
  const flushBareItems = () => {
2186
2417
  if (bareItems.length === 0) return;
2187
2418
  wrapped.push(
2188
- /* @__PURE__ */ jsx13(SelectGroup, { className: "aviala-select-group", children: /* @__PURE__ */ jsx13("div", { className: "aviala-select-group__slot", children: bareItems }) }, `__select-auto-group-${autoGroupIndex++}`)
2419
+ /* @__PURE__ */ jsx15(SelectGroup, { className: "aviala-select-group", children: /* @__PURE__ */ jsx15("div", { className: "aviala-select-group__slot", children: bareItems }) }, `__select-auto-group-${autoGroupIndex++}`)
2189
2420
  );
2190
2421
  bareItems = [];
2191
2422
  };
@@ -2203,7 +2434,7 @@ function wrapUngroupedSelectItems(children) {
2203
2434
  flushBareItems();
2204
2435
  return wrapped.length === 1 ? wrapped[0] : wrapped;
2205
2436
  }
2206
- var SelectTrigger = forwardRef9(
2437
+ var SelectTrigger = forwardRef11(
2207
2438
  ({
2208
2439
  className,
2209
2440
  size = "regular",
@@ -2212,11 +2443,12 @@ var SelectTrigger = forwardRef9(
2212
2443
  rightIcon,
2213
2444
  expandIcon,
2214
2445
  placeholder,
2215
- error = false,
2446
+ error,
2216
2447
  ...props
2217
2448
  }, ref) => {
2218
- const dismissContext = useContext5(SelectDismissContext);
2219
- return /* @__PURE__ */ jsxs7(
2449
+ const dismissContext = useContext6(SelectDismissContext);
2450
+ const resolvedError = useResolvedControlError(error);
2451
+ return /* @__PURE__ */ jsxs8(
2220
2452
  SelectPrimitive.Trigger,
2221
2453
  {
2222
2454
  ref: (node) => {
@@ -2232,12 +2464,13 @@ var SelectTrigger = forwardRef9(
2232
2464
  className: cn("aviala-select-trigger aviala-focus-ring", className),
2233
2465
  "data-size": size,
2234
2466
  "data-all-round": allRound ? "true" : "false",
2235
- "data-error": error ? "true" : void 0,
2467
+ "data-error": resolvedError ? "true" : void 0,
2468
+ "aria-invalid": resolvedError || void 0,
2236
2469
  ...spiralDebugId("select.trigger"),
2237
2470
  ...props,
2238
2471
  children: [
2239
2472
  renderSlotIcon(leftIcon, "aviala-select-trigger__slot", "select.trigger.icon-left"),
2240
- /* @__PURE__ */ jsx13("span", { className: "aviala-select-trigger__field", children: /* @__PURE__ */ jsx13(
2473
+ /* @__PURE__ */ jsx15("span", { className: "aviala-select-trigger__field", children: /* @__PURE__ */ jsx15(
2241
2474
  SelectPrimitive.Value,
2242
2475
  {
2243
2476
  placeholder,
@@ -2246,14 +2479,14 @@ var SelectTrigger = forwardRef9(
2246
2479
  }
2247
2480
  ) }),
2248
2481
  renderSlotIcon(rightIcon, "aviala-select-trigger__slot", "select.trigger.icon-right"),
2249
- /* @__PURE__ */ jsx13(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx13(
2482
+ /* @__PURE__ */ jsx15(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx15(
2250
2483
  "span",
2251
2484
  {
2252
2485
  className: "aviala-select-trigger__expand",
2253
2486
  "aria-hidden": true,
2254
2487
  style: expandIcon ? iconSlotCssVarStyle(expandIcon, "--input-slot-icon-size", "text", true) : iconLevelCssVarStyle("text", true, "--input-slot-icon-size"),
2255
2488
  ...spiralDebugId("select.trigger.expand"),
2256
- children: expandIcon ?? /* @__PURE__ */ jsx13(
2489
+ children: expandIcon ?? /* @__PURE__ */ jsx15(
2257
2490
  DirectionArrowDownLight2,
2258
2491
  {
2259
2492
  className: "aviala-select-trigger__expand-icon",
@@ -2270,7 +2503,7 @@ var SelectTrigger = forwardRef9(
2270
2503
  }
2271
2504
  );
2272
2505
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2273
- var SelectContent = forwardRef9(
2506
+ var SelectContent = forwardRef11(
2274
2507
  ({
2275
2508
  className,
2276
2509
  children,
@@ -2281,7 +2514,7 @@ var SelectContent = forwardRef9(
2281
2514
  ...props
2282
2515
  }, ref) => {
2283
2516
  const subMenuLayer = useSelectSubMenuLayer();
2284
- const dismissContext = useContext5(SelectDismissContext);
2517
+ const dismissContext = useContext6(SelectDismissContext);
2285
2518
  const handleCloseAutoFocus = (event) => {
2286
2519
  onCloseAutoFocus?.(event);
2287
2520
  if (event.defaultPrevented) {
@@ -2296,7 +2529,7 @@ var SelectContent = forwardRef9(
2296
2529
  dismissContext.pointerDownCloseRef.current = false;
2297
2530
  }
2298
2531
  };
2299
- const content = /* @__PURE__ */ jsx13(SelectSubMenuContext.Provider, { value: subMenuLayer, children: /* @__PURE__ */ jsx13(
2532
+ const content = /* @__PURE__ */ jsx15(SelectSubMenuContext.Provider, { value: subMenuLayer, children: /* @__PURE__ */ jsx15(
2300
2533
  SelectPrimitive.Content,
2301
2534
  {
2302
2535
  ref,
@@ -2306,7 +2539,7 @@ var SelectContent = forwardRef9(
2306
2539
  onCloseAutoFocus: handleCloseAutoFocus,
2307
2540
  ...spiralDebugId("select.content"),
2308
2541
  ...props,
2309
- children: /* @__PURE__ */ jsx13(
2542
+ children: /* @__PURE__ */ jsx15(
2310
2543
  SelectPrimitive.Viewport,
2311
2544
  {
2312
2545
  className: "aviala-select-viewport",
@@ -2317,11 +2550,11 @@ var SelectContent = forwardRef9(
2317
2550
  }
2318
2551
  ) });
2319
2552
  if (!portalled) return content;
2320
- return /* @__PURE__ */ jsx13(SelectPrimitive.Portal, { children: content });
2553
+ return /* @__PURE__ */ jsx15(SelectPrimitive.Portal, { children: content });
2321
2554
  }
2322
2555
  );
2323
2556
  SelectContent.displayName = SelectPrimitive.Content.displayName;
2324
- var SelectLabel = forwardRef9(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
2557
+ var SelectLabel = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
2325
2558
  SelectPrimitive.Label,
2326
2559
  {
2327
2560
  ref,
@@ -2330,7 +2563,7 @@ var SelectLabel = forwardRef9(({ className, ...props }, ref) => /* @__PURE__ */
2330
2563
  }
2331
2564
  ));
2332
2565
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
2333
- var SelectItem = forwardRef9(
2566
+ var SelectItem = forwardRef11(
2334
2567
  ({
2335
2568
  className,
2336
2569
  children,
@@ -2356,23 +2589,23 @@ var SelectItem = forwardRef9(
2356
2589
  const leftIconLevel = isTitle ? "caption" : "text";
2357
2590
  const showTrailingFunction = showFunctionIcon && layout !== "checked" && itemFunction !== "form-radio" && itemFunction !== "form-checkbox";
2358
2591
  const textLevel = isTitle ? "caption" : "text";
2359
- const textContent = isPeople ? /* @__PURE__ */ jsxs7("span", { className: "aviala-select-item__content", children: [
2360
- /* @__PURE__ */ jsx13(
2592
+ const textContent = isPeople ? /* @__PURE__ */ jsxs8("span", { className: "aviala-select-item__content", children: [
2593
+ /* @__PURE__ */ jsx15(
2361
2594
  SelectPrimitive.ItemText,
2362
2595
  {
2363
2596
  className: cn("aviala-select-item__text", typographyVariants({ level: textLevel })),
2364
2597
  children
2365
2598
  }
2366
2599
  ),
2367
- subtitle != null && subtitle !== false ? /* @__PURE__ */ jsx13("span", { className: cn("aviala-select-item__subtitle", typographyVariants({ level: "caption" })), children: subtitle }) : null
2368
- ] }) : /* @__PURE__ */ jsx13(
2600
+ subtitle != null && subtitle !== false ? /* @__PURE__ */ jsx15("span", { className: cn("aviala-select-item__subtitle", typographyVariants({ level: "caption" })), children: subtitle }) : null
2601
+ ] }) : /* @__PURE__ */ jsx15(
2369
2602
  SelectPrimitive.ItemText,
2370
2603
  {
2371
2604
  className: cn("aviala-select-item__text", typographyVariants({ level: textLevel })),
2372
2605
  children
2373
2606
  }
2374
2607
  );
2375
- return /* @__PURE__ */ jsxs7(
2608
+ return /* @__PURE__ */ jsxs8(
2376
2609
  SelectPrimitive.Item,
2377
2610
  {
2378
2611
  ref,
@@ -2382,14 +2615,14 @@ var SelectItem = forwardRef9(
2382
2615
  ...spiralDebugId("select.content.item"),
2383
2616
  ...props,
2384
2617
  children: [
2385
- isFormLeading && itemFunction === "form-radio" ? /* @__PURE__ */ jsx13(SelectItemFormRadio, {}) : null,
2386
- isFormLeading && itemFunction === "form-checkbox" ? /* @__PURE__ */ jsx13(SelectItemFormCheckbox, {}) : null,
2618
+ isFormLeading && itemFunction === "form-radio" ? /* @__PURE__ */ jsx15(SelectItemFormRadio, {}) : null,
2619
+ isFormLeading && itemFunction === "form-checkbox" ? /* @__PURE__ */ jsx15(SelectItemFormCheckbox, {}) : null,
2387
2620
  showLeftIcon && leftIcon ? renderItemIcon(leftIcon, leftIconLevel, "select.content.item.icon-left") : null,
2388
- isPeople ? avatar ?? /* @__PURE__ */ jsx13(SelectItemDefaultAvatar, {}) : null,
2621
+ isPeople ? avatar ?? /* @__PURE__ */ jsx15(SelectItemDefaultAvatar, {}) : null,
2389
2622
  textContent,
2390
2623
  showBadge ? renderBadgeSlot(badge ?? "Text") : null,
2391
2624
  showRightIcon && rightIcon ? renderItemIcon(rightIcon, leftIconLevel, "select.content.item.icon-right") : null,
2392
- showMoreFunction ? /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__more", children: moreAction ?? /* @__PURE__ */ jsx13(Link, { level: "text", href: "#", onClick: (event) => event.preventDefault(), children: "Text" }) }) : null,
2625
+ showMoreFunction ? /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__more", children: moreAction ?? /* @__PURE__ */ jsx15(Link, { level: "text", href: "#", onClick: (event) => event.preventDefault(), children: "Text" }) }) : null,
2393
2626
  renderFunctionSlot(itemFunction, layout, showTrailingFunction, icon)
2394
2627
  ]
2395
2628
  }
@@ -2397,7 +2630,7 @@ var SelectItem = forwardRef9(
2397
2630
  }
2398
2631
  );
2399
2632
  SelectItem.displayName = SelectPrimitive.Item.displayName;
2400
- var SelectSubItem = forwardRef9(
2633
+ var SelectSubItem = forwardRef11(
2401
2634
  ({
2402
2635
  className,
2403
2636
  children,
@@ -2433,8 +2666,8 @@ var SelectSubItem = forwardRef9(
2433
2666
  if (!subMenu) {
2434
2667
  throw new Error("SelectSubItem requires a SelectSubMenu child.");
2435
2668
  }
2436
- const subItemId = useId();
2437
- const subMenuId = useId();
2669
+ const subItemId = useId2();
2670
+ const subMenuId = useId2();
2438
2671
  const rootRef = useRef3(null);
2439
2672
  const contentRef = useRef3(null);
2440
2673
  const rtl = useRtl();
@@ -2469,10 +2702,10 @@ var SelectSubItem = forwardRef9(
2469
2702
  const leftIconLevel = isTitle ? "caption" : "text";
2470
2703
  const showTrailingFunction = showFunctionIcon && layout !== "checked" && itemFunction !== "form-radio" && itemFunction !== "form-checkbox";
2471
2704
  const textLevel = isTitle ? "caption" : "text";
2472
- const textContent = isPeople ? /* @__PURE__ */ jsxs7("span", { className: "aviala-select-item__content", children: [
2473
- /* @__PURE__ */ jsx13("span", { className: cn("aviala-select-item__text", typographyVariants({ level: textLevel })), children: itemChildren }),
2474
- subtitle != null && subtitle !== false ? /* @__PURE__ */ jsx13("span", { className: cn("aviala-select-item__subtitle", typographyVariants({ level: "caption" })), children: subtitle }) : null
2475
- ] }) : /* @__PURE__ */ jsx13("span", { className: cn("aviala-select-item__text", typographyVariants({ level: textLevel })), children: itemChildren });
2705
+ const textContent = isPeople ? /* @__PURE__ */ jsxs8("span", { className: "aviala-select-item__content", children: [
2706
+ /* @__PURE__ */ jsx15("span", { className: cn("aviala-select-item__text", typographyVariants({ level: textLevel })), children: itemChildren }),
2707
+ subtitle != null && subtitle !== false ? /* @__PURE__ */ jsx15("span", { className: cn("aviala-select-item__subtitle", typographyVariants({ level: "caption" })), children: subtitle }) : null
2708
+ ] }) : /* @__PURE__ */ jsx15("span", { className: cn("aviala-select-item__text", typographyVariants({ level: textLevel })), children: itemChildren });
2476
2709
  const handleTriggerBlur = (event) => {
2477
2710
  scheduleCloseSubItem(subItemId, event.relatedTarget);
2478
2711
  };
@@ -2490,7 +2723,7 @@ var SelectSubItem = forwardRef9(
2490
2723
  closeActiveSubItem();
2491
2724
  }
2492
2725
  };
2493
- const itemRow = /* @__PURE__ */ jsxs7(
2726
+ const itemRow = /* @__PURE__ */ jsxs8(
2494
2727
  "button",
2495
2728
  {
2496
2729
  type: "button",
@@ -2508,19 +2741,19 @@ var SelectSubItem = forwardRef9(
2508
2741
  onBlur: handleTriggerBlur,
2509
2742
  onKeyDown: handleKeyDown,
2510
2743
  children: [
2511
- isFormLeading && itemFunction === "form-radio" ? /* @__PURE__ */ jsx13(SelectItemFormRadio, {}) : null,
2512
- isFormLeading && itemFunction === "form-checkbox" ? /* @__PURE__ */ jsx13(SelectItemFormCheckbox, {}) : null,
2744
+ isFormLeading && itemFunction === "form-radio" ? /* @__PURE__ */ jsx15(SelectItemFormRadio, {}) : null,
2745
+ isFormLeading && itemFunction === "form-checkbox" ? /* @__PURE__ */ jsx15(SelectItemFormCheckbox, {}) : null,
2513
2746
  showLeftIcon && leftIcon ? renderItemIcon(leftIcon, leftIconLevel) : null,
2514
- isPeople ? avatar ?? /* @__PURE__ */ jsx13(SelectItemDefaultAvatar, {}) : null,
2747
+ isPeople ? avatar ?? /* @__PURE__ */ jsx15(SelectItemDefaultAvatar, {}) : null,
2515
2748
  textContent,
2516
2749
  showBadge ? renderBadgeSlot(badge ?? "Text") : null,
2517
2750
  showRightIcon && rightIcon ? renderItemIcon(rightIcon, leftIconLevel) : null,
2518
- showMoreFunction ? /* @__PURE__ */ jsx13("span", { className: "aviala-select-item__more", children: moreAction ?? /* @__PURE__ */ jsx13(Link, { level: "text", href: "#", onClick: (event) => event.preventDefault(), children: "Text" }) }) : null,
2751
+ showMoreFunction ? /* @__PURE__ */ jsx15("span", { className: "aviala-select-item__more", children: moreAction ?? /* @__PURE__ */ jsx15(Link, { level: "text", href: "#", onClick: (event) => event.preventDefault(), children: "Text" }) }) : null,
2519
2752
  renderFunctionSlot(itemFunction, layout, showTrailingFunction, icon)
2520
2753
  ]
2521
2754
  }
2522
2755
  );
2523
- const flyout = /* @__PURE__ */ jsx13(
2756
+ const flyout = /* @__PURE__ */ jsx15(
2524
2757
  PopoverPrimitive.Content,
2525
2758
  {
2526
2759
  ref: contentRef,
@@ -2538,10 +2771,10 @@ var SelectSubItem = forwardRef9(
2538
2771
  onPointerEnter: handleOpen,
2539
2772
  onPointerLeave: handlePointerLeave,
2540
2773
  onPointerDownOutside: (event) => event.preventDefault(),
2541
- children: /* @__PURE__ */ jsx13("div", { className: "aviala-select-viewport aviala-select-sub-content__viewport", children: wrapUngroupedSelectItems(subMenu.children) })
2774
+ children: /* @__PURE__ */ jsx15("div", { className: "aviala-select-viewport aviala-select-sub-content__viewport", children: wrapUngroupedSelectItems(subMenu.children) })
2542
2775
  }
2543
2776
  );
2544
- return /* @__PURE__ */ jsx13(PopoverPrimitive.Root, { open, modal: false, children: /* @__PURE__ */ jsxs7(
2777
+ return /* @__PURE__ */ jsx15(PopoverPrimitive.Root, { open, modal: false, children: /* @__PURE__ */ jsxs8(
2545
2778
  "div",
2546
2779
  {
2547
2780
  ref: (node) => {
@@ -2556,21 +2789,21 @@ var SelectSubItem = forwardRef9(
2556
2789
  onPointerEnter: handleOpen,
2557
2790
  onPointerLeave: handlePointerLeave,
2558
2791
  children: [
2559
- /* @__PURE__ */ jsx13(PopoverPrimitive.Anchor, { asChild: true, children: itemRow }),
2560
- portalled ? /* @__PURE__ */ jsx13(PopoverPrimitive.Portal, { children: flyout }) : flyout
2792
+ /* @__PURE__ */ jsx15(PopoverPrimitive.Anchor, { asChild: true, children: itemRow }),
2793
+ portalled ? /* @__PURE__ */ jsx15(PopoverPrimitive.Portal, { children: flyout }) : flyout
2561
2794
  ]
2562
2795
  }
2563
2796
  ) });
2564
2797
  }
2565
2798
  );
2566
2799
  SelectSubItem.displayName = "SelectSubItem";
2567
- var SelectSubItemPeople = forwardRef9(
2568
- (props, ref) => /* @__PURE__ */ jsx13(SelectSubItem, { ref, layout: "people", ...props })
2800
+ var SelectSubItemPeople = forwardRef11(
2801
+ (props, ref) => /* @__PURE__ */ jsx15(SelectSubItem, { ref, layout: "people", ...props })
2569
2802
  );
2570
2803
  SelectSubItemPeople.displayName = "SelectSubItemPeople";
2571
- var SelectItemPeople = forwardRef9((props, ref) => /* @__PURE__ */ jsx13(SelectItem, { ref, layout: "people", ...props }));
2804
+ var SelectItemPeople = forwardRef11((props, ref) => /* @__PURE__ */ jsx15(SelectItem, { ref, layout: "people", ...props }));
2572
2805
  SelectItemPeople.displayName = "SelectItemPeople";
2573
- var SelectSeparator = forwardRef9(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
2806
+ var SelectSeparator = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
2574
2807
  SelectPrimitive.Separator,
2575
2808
  {
2576
2809
  ref,
@@ -2585,18 +2818,18 @@ function SelectItemGroup({
2585
2818
  children,
2586
2819
  className
2587
2820
  }) {
2588
- return /* @__PURE__ */ jsxs7(SelectGroup, { className: cn("aviala-select-group", className), children: [
2589
- label ? /* @__PURE__ */ jsx13(SelectLabel, { children: label }) : null,
2590
- /* @__PURE__ */ jsx13("div", { className: "aviala-select-group__slot", children }),
2591
- showDivider ? /* @__PURE__ */ jsx13(SelectSeparator, {}) : null
2821
+ return /* @__PURE__ */ jsxs8(SelectGroup, { className: cn("aviala-select-group", className), children: [
2822
+ label ? /* @__PURE__ */ jsx15(SelectLabel, { children: label }) : null,
2823
+ /* @__PURE__ */ jsx15("div", { className: "aviala-select-group__slot", children }),
2824
+ showDivider ? /* @__PURE__ */ jsx15(SelectSeparator, {}) : null
2592
2825
  ] });
2593
2826
  }
2594
2827
 
2595
2828
  // src/components/label.tsx
2596
2829
  import * as LabelPrimitive from "@radix-ui/react-label";
2597
- import { forwardRef as forwardRef10 } from "react";
2598
- import { jsx as jsx14 } from "react/jsx-runtime";
2599
- var Label2 = forwardRef10(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
2830
+ import { forwardRef as forwardRef12 } from "react";
2831
+ import { jsx as jsx16 } from "react/jsx-runtime";
2832
+ var Label2 = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
2600
2833
  LabelPrimitive.Root,
2601
2834
  {
2602
2835
  ref,
@@ -2614,10 +2847,10 @@ Label2.displayName = LabelPrimitive.Root.displayName;
2614
2847
  import { cva as cva6 } from "class-variance-authority";
2615
2848
  import {
2616
2849
  cloneElement as cloneElement3,
2617
- forwardRef as forwardRef11,
2850
+ forwardRef as forwardRef13,
2618
2851
  isValidElement as isValidElement8
2619
2852
  } from "react";
2620
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
2853
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
2621
2854
  var avatarVariants = cva6("aviala-avatar", {
2622
2855
  variants: {
2623
2856
  level: {
@@ -2675,7 +2908,7 @@ function renderAvatarIcon(node, level) {
2675
2908
  }
2676
2909
  return node;
2677
2910
  }
2678
- var Avatar = forwardRef11(
2911
+ var Avatar = forwardRef13(
2679
2912
  ({
2680
2913
  className,
2681
2914
  level = "text",
@@ -2690,7 +2923,7 @@ var Avatar = forwardRef11(
2690
2923
  }, ref) => {
2691
2924
  const resolvedLevel = level ?? "text";
2692
2925
  const resolvedContent = content ?? "text";
2693
- return /* @__PURE__ */ jsx15(
2926
+ return /* @__PURE__ */ jsx17(
2694
2927
  "span",
2695
2928
  {
2696
2929
  ref,
@@ -2706,8 +2939,8 @@ var Avatar = forwardRef11(
2706
2939
  "data-content": resolvedContent,
2707
2940
  "data-line-height-fix": lineHeightFix ? "true" : "false",
2708
2941
  ...props,
2709
- children: /* @__PURE__ */ jsxs8("span", { className: "aviala-avatar__surface", children: [
2710
- resolvedContent === "picture" && src ? /* @__PURE__ */ jsx15(
2942
+ children: /* @__PURE__ */ jsxs9("span", { className: "aviala-avatar__surface", children: [
2943
+ resolvedContent === "picture" && src ? /* @__PURE__ */ jsx17(
2711
2944
  "img",
2712
2945
  {
2713
2946
  className: "aviala-avatar__image",
@@ -2716,8 +2949,8 @@ var Avatar = forwardRef11(
2716
2949
  ...imgProps
2717
2950
  }
2718
2951
  ) : null,
2719
- resolvedContent === "icon" ? /* @__PURE__ */ jsx15("span", { className: "aviala-avatar__icon", "aria-hidden": true, children: renderAvatarIcon(icon, resolvedLevel) }) : null,
2720
- resolvedContent === "text" ? /* @__PURE__ */ jsx15(
2952
+ resolvedContent === "icon" ? /* @__PURE__ */ jsx17("span", { className: "aviala-avatar__icon", "aria-hidden": true, children: renderAvatarIcon(icon, resolvedLevel) }) : null,
2953
+ resolvedContent === "text" ? /* @__PURE__ */ jsx17(
2721
2954
  Typography,
2722
2955
  {
2723
2956
  level: AVATAR_TEXT_LEVEL[resolvedLevel],
@@ -2738,10 +2971,10 @@ import { resolveIconSizeToken as resolveIconSizeToken4, SymbolWrong } from "@avi
2738
2971
  import { cva as cva7 } from "class-variance-authority";
2739
2972
  import {
2740
2973
  cloneElement as cloneElement4,
2741
- forwardRef as forwardRef12,
2974
+ forwardRef as forwardRef14,
2742
2975
  isValidElement as isValidElement9
2743
2976
  } from "react";
2744
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
2977
+ import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
2745
2978
  var tagVariants = cva7("aviala-tag", {
2746
2979
  variants: {
2747
2980
  level: {
@@ -2789,22 +3022,22 @@ function renderTagIcon(node, level) {
2789
3022
  )
2790
3023
  }
2791
3024
  ) : node;
2792
- return /* @__PURE__ */ jsx16("span", { className: "aviala-tag__icon", "aria-hidden": true, children: content });
3025
+ return /* @__PURE__ */ jsx18("span", { className: "aviala-tag__icon", "aria-hidden": true, children: content });
2793
3026
  }
2794
- var TagClose = forwardRef12(
2795
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx16(
3027
+ var TagClose = forwardRef14(
3028
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx18(
2796
3029
  "button",
2797
3030
  {
2798
3031
  ref,
2799
3032
  type: "button",
2800
3033
  className: cn("aviala-tag__close aviala-focus-ring", className),
2801
3034
  ...props,
2802
- children: children ?? /* @__PURE__ */ jsx16(SymbolWrong, { "aria-hidden": true, width: 14, height: 14 })
3035
+ children: children ?? /* @__PURE__ */ jsx18(SymbolWrong, { "aria-hidden": true, width: 14, height: 14 })
2803
3036
  }
2804
3037
  )
2805
3038
  );
2806
3039
  TagClose.displayName = "TagClose";
2807
- var Tag = forwardRef12(
3040
+ var Tag = forwardRef14(
2808
3041
  ({
2809
3042
  className,
2810
3043
  children,
@@ -2828,8 +3061,8 @@ var Tag = forwardRef12(
2828
3061
  const resolvedContent = content ?? "text";
2829
3062
  const resolvedLhf = resolveLineHeightFix2(resolvedLevel, lineHeightFix);
2830
3063
  const typographyLevel = resolvedLevel;
2831
- const peopleAvatar = avatar ?? (avatarSrc ? /* @__PURE__ */ jsx16(Avatar, { level: "text", content: "picture", src: avatarSrc, lineHeightFix: false }) : /* @__PURE__ */ jsx16(Avatar, { level: "text", content: "text", lineHeightFix: false, children: avatarText ?? (typeof children === "string" ? children.charAt(0) : "?") }));
2832
- return /* @__PURE__ */ jsxs9(
3064
+ const peopleAvatar = avatar ?? (avatarSrc ? /* @__PURE__ */ jsx18(Avatar, { level: "text", content: "picture", src: avatarSrc, lineHeightFix: false }) : /* @__PURE__ */ jsx18(Avatar, { level: "text", content: "text", lineHeightFix: false, children: avatarText ?? (typeof children === "string" ? children.charAt(0) : "?") }));
3065
+ return /* @__PURE__ */ jsxs10(
2833
3066
  "span",
2834
3067
  {
2835
3068
  ref,
@@ -2848,8 +3081,8 @@ var Tag = forwardRef12(
2848
3081
  "aria-disabled": disabled || void 0,
2849
3082
  ...props,
2850
3083
  children: [
2851
- resolvedContent === "people" ? /* @__PURE__ */ jsx16("span", { className: "aviala-tag__avatar", children: peopleAvatar }) : renderTagIcon(leftIcon, resolvedLevel),
2852
- /* @__PURE__ */ jsx16(
3084
+ resolvedContent === "people" ? /* @__PURE__ */ jsx18("span", { className: "aviala-tag__avatar", children: peopleAvatar }) : renderTagIcon(leftIcon, resolvedLevel),
3085
+ /* @__PURE__ */ jsx18(
2853
3086
  Typography,
2854
3087
  {
2855
3088
  level: typographyLevel,
@@ -2859,7 +3092,7 @@ var Tag = forwardRef12(
2859
3092
  }
2860
3093
  ),
2861
3094
  resolvedContent === "text" ? renderTagIcon(rightIcon, resolvedLevel) : null,
2862
- closable ? /* @__PURE__ */ jsx16(
3095
+ closable ? /* @__PURE__ */ jsx18(
2863
3096
  TagClose,
2864
3097
  {
2865
3098
  "aria-label": resolvedCloseLabel,
@@ -2879,8 +3112,8 @@ Tag.displayName = "Tag";
2879
3112
 
2880
3113
  // src/components/progress.tsx
2881
3114
  import { cva as cva8 } from "class-variance-authority";
2882
- import { forwardRef as forwardRef13 } from "react";
2883
- import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
3115
+ import { forwardRef as forwardRef15 } from "react";
3116
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
2884
3117
  var progressVariants = cva8("aviala-progress", {
2885
3118
  variants: {
2886
3119
  type: {
@@ -2907,7 +3140,7 @@ function clampPercent(value) {
2907
3140
  if (!Number.isFinite(value)) return 0;
2908
3141
  return Math.min(100, Math.max(0, value));
2909
3142
  }
2910
- var Progress = forwardRef13(
3143
+ var Progress = forwardRef15(
2911
3144
  ({
2912
3145
  className,
2913
3146
  type = "default",
@@ -2929,7 +3162,7 @@ var Progress = forwardRef13(
2929
3162
  const normalizedRadius = center - stroke / 2;
2930
3163
  const circumference = normalizedRadius * 2 * Math.PI;
2931
3164
  const strokeDashoffset = circumference - percent / 100 * circumference;
2932
- return /* @__PURE__ */ jsx17(
3165
+ return /* @__PURE__ */ jsx19(
2933
3166
  "div",
2934
3167
  {
2935
3168
  ref,
@@ -2950,15 +3183,15 @@ var Progress = forwardRef13(
2950
3183
  "data-size": resolvedSize,
2951
3184
  "data-shape": resolvedShape,
2952
3185
  ...props,
2953
- children: resolvedShape === "bar" ? /* @__PURE__ */ jsxs10(Fragment2, { children: [
2954
- /* @__PURE__ */ jsx17("div", { className: "aviala-progress__track", children: /* @__PURE__ */ jsx17(
3186
+ children: resolvedShape === "bar" ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
3187
+ /* @__PURE__ */ jsx19("div", { className: "aviala-progress__track", children: /* @__PURE__ */ jsx19(
2955
3188
  "div",
2956
3189
  {
2957
3190
  className: "aviala-progress__fill",
2958
3191
  style: { width: `${percent}%` }
2959
3192
  }
2960
3193
  ) }),
2961
- showLabel ? /* @__PURE__ */ jsx17(
3194
+ showLabel ? /* @__PURE__ */ jsx19(
2962
3195
  Typography,
2963
3196
  {
2964
3197
  level: "caption",
@@ -2968,7 +3201,7 @@ var Progress = forwardRef13(
2968
3201
  children: displayLabel
2969
3202
  }
2970
3203
  ) : null
2971
- ] }) : /* @__PURE__ */ jsxs10(
3204
+ ] }) : /* @__PURE__ */ jsxs11(
2972
3205
  "svg",
2973
3206
  {
2974
3207
  className: "aviala-progress__ring",
@@ -2977,7 +3210,7 @@ var Progress = forwardRef13(
2977
3210
  viewBox: `0 0 ${diameter} ${diameter}`,
2978
3211
  "aria-hidden": true,
2979
3212
  children: [
2980
- /* @__PURE__ */ jsx17(
3213
+ /* @__PURE__ */ jsx19(
2981
3214
  "circle",
2982
3215
  {
2983
3216
  className: "aviala-progress__ring-track",
@@ -2988,7 +3221,7 @@ var Progress = forwardRef13(
2988
3221
  strokeWidth: stroke
2989
3222
  }
2990
3223
  ),
2991
- /* @__PURE__ */ jsx17(
3224
+ /* @__PURE__ */ jsx19(
2992
3225
  "circle",
2993
3226
  {
2994
3227
  className: "aviala-progress__ring-fill",
@@ -3014,8 +3247,8 @@ Progress.displayName = "Progress";
3014
3247
 
3015
3248
  // src/components/scroll.tsx
3016
3249
  import { cva as cva9 } from "class-variance-authority";
3017
- import { forwardRef as forwardRef14 } from "react";
3018
- import { jsx as jsx18 } from "react/jsx-runtime";
3250
+ import { forwardRef as forwardRef16 } from "react";
3251
+ import { jsx as jsx20 } from "react/jsx-runtime";
3019
3252
  var scrollVariants = cva9("aviala-scroll", {
3020
3253
  variants: {
3021
3254
  size: {
@@ -3032,14 +3265,14 @@ var scrollVariants = cva9("aviala-scroll", {
3032
3265
  orientation: "vertical"
3033
3266
  }
3034
3267
  });
3035
- var Scroll = forwardRef14(
3268
+ var Scroll = forwardRef16(
3036
3269
  ({
3037
3270
  className,
3038
3271
  size = "default",
3039
3272
  orientation = "vertical",
3040
3273
  children,
3041
3274
  ...props
3042
- }, ref) => /* @__PURE__ */ jsx18(
3275
+ }, ref) => /* @__PURE__ */ jsx20(
3043
3276
  "div",
3044
3277
  {
3045
3278
  ref,
@@ -3060,97 +3293,16 @@ Scroll.displayName = "Scroll";
3060
3293
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3061
3294
  import {
3062
3295
  cloneElement as cloneElement5,
3063
- forwardRef as forwardRef16,
3296
+ forwardRef as forwardRef17,
3064
3297
  isValidElement as isValidElement10,
3065
3298
  useEffect as useEffect3,
3066
3299
  useState as useState6
3067
3300
  } from "react";
3068
3301
 
3069
- // src/components/typeface.tsx
3070
- import { forwardRef as forwardRef15 } from "react";
3071
- import { jsx as jsx19 } from "react/jsx-runtime";
3072
- var typefaceLayouts = {
3073
- allCustom: [
3074
- { level: "text", children: null },
3075
- { level: "caption", children: null }
3076
- ],
3077
- textCaption: [
3078
- { level: "text", children: null },
3079
- { level: "caption", children: null }
3080
- ],
3081
- textCaptionSubtitle: [
3082
- { level: "subtitle", children: null },
3083
- { level: "text", children: null },
3084
- { level: "caption", children: null }
3085
- ],
3086
- textTitle: [
3087
- { level: "title", children: null },
3088
- { level: "text", children: null }
3089
- ],
3090
- textHeadline2: [
3091
- { level: "headline2", children: null },
3092
- { level: "text", children: null }
3093
- ],
3094
- textHeadline1: [
3095
- { level: "headline1", children: null },
3096
- { level: "text", children: null }
3097
- ]
3098
- };
3099
- var Typeface = forwardRef15(
3100
- ({
3101
- className,
3102
- content = "allCustom",
3103
- primary,
3104
- secondary,
3105
- tertiary,
3106
- primaryContent = "text",
3107
- secondaryContent = "text",
3108
- tertiaryContent = "text",
3109
- tone = "default",
3110
- children,
3111
- ...props
3112
- }, ref) => {
3113
- const layout = typefaceLayouts[content];
3114
- const values = resolveTypefaceValues(content, primary, secondary, tertiary, children);
3115
- return /* @__PURE__ */ jsx19("div", { ref, className: cn("aviala-typeface", className), "data-content": content, ...props, children: layout.map((line, index) => {
3116
- const value = values[index];
3117
- if (value === void 0 || value === null || value === false) return null;
3118
- const lineContent = index === 0 ? primaryContent : index === 1 ? secondaryContent : tertiaryContent;
3119
- return /* @__PURE__ */ jsx19("span", { className: "aviala-typeface__line", children: /* @__PURE__ */ jsx19(Typography, { level: line.level, content: lineContent, tone, children: value }) }, `${line.level}-${index}`);
3120
- }) });
3121
- }
3122
- );
3123
- Typeface.displayName = "Typeface";
3124
- function resolveTypefaceValues(content, primary, secondary, tertiary, children) {
3125
- if (primary !== void 0 || secondary !== void 0 || tertiary !== void 0) {
3126
- return [primary, secondary, tertiary];
3127
- }
3128
- if (children == null || children === false) {
3129
- return typefaceLayouts[content].map(() => "Text");
3130
- }
3131
- if (Array.isArray(children)) {
3132
- return children;
3133
- }
3134
- return [children];
3135
- }
3136
- var TypefacePair = forwardRef15(
3137
- ({ title, description, ...props }, ref) => /* @__PURE__ */ jsx19(
3138
- Typeface,
3139
- {
3140
- ref,
3141
- content: "textCaption",
3142
- primary: title,
3143
- secondary: description,
3144
- ...props
3145
- }
3146
- )
3147
- );
3148
- TypefacePair.displayName = "TypefacePair";
3149
-
3150
3302
  // src/components/checkbox-check-icon.tsx
3151
- import { jsx as jsx20 } from "react/jsx-runtime";
3303
+ import { jsx as jsx21 } from "react/jsx-runtime";
3152
3304
  function CheckboxCheckIcon({ className, ...props }) {
3153
- return /* @__PURE__ */ jsx20(
3305
+ return /* @__PURE__ */ jsx21(
3154
3306
  "svg",
3155
3307
  {
3156
3308
  className: cn("aviala-checkbox__check-icon", className),
@@ -3160,7 +3312,7 @@ function CheckboxCheckIcon({ className, ...props }) {
3160
3312
  "aria-hidden": true,
3161
3313
  overflow: "visible",
3162
3314
  ...props,
3163
- children: /* @__PURE__ */ jsx20(
3315
+ children: /* @__PURE__ */ jsx21(
3164
3316
  "path",
3165
3317
  {
3166
3318
  className: "aviala-checkbox__check-path",
@@ -3177,14 +3329,14 @@ function CheckboxCheckIcon({ className, ...props }) {
3177
3329
  }
3178
3330
 
3179
3331
  // src/components/checkbox.tsx
3180
- import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
3181
- var Checkbox = forwardRef16(({ className, round = false, size = "default", ...props }, ref) => {
3332
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
3333
+ var Checkbox = forwardRef17(({ className, round = false, size = "default", ...props }, ref) => {
3182
3334
  const [motionReady, setMotionReady] = useState6(false);
3183
3335
  useEffect3(() => {
3184
3336
  const id = requestAnimationFrame(() => setMotionReady(true));
3185
3337
  return () => cancelAnimationFrame(id);
3186
3338
  }, []);
3187
- return /* @__PURE__ */ jsxs11(
3339
+ return /* @__PURE__ */ jsxs12(
3188
3340
  CheckboxPrimitive.Root,
3189
3341
  {
3190
3342
  ref,
@@ -3194,10 +3346,10 @@ var Checkbox = forwardRef16(({ className, round = false, size = "default", ...pr
3194
3346
  "data-motion": motionReady ? "ready" : "boot",
3195
3347
  ...props,
3196
3348
  children: [
3197
- /* @__PURE__ */ jsx21("span", { "aria-hidden": true, className: "aviala-checkbox__surface" }),
3198
- /* @__PURE__ */ jsxs11(CheckboxPrimitive.Indicator, { forceMount: true, className: "aviala-checkbox__indicator", children: [
3199
- /* @__PURE__ */ jsx21(CheckboxCheckIcon, { className: "aviala-checkbox__indicator-icon aviala-checkbox__indicator-icon--check" }),
3200
- /* @__PURE__ */ jsx21(
3349
+ /* @__PURE__ */ jsx22("span", { "aria-hidden": true, className: "aviala-checkbox__surface" }),
3350
+ /* @__PURE__ */ jsxs12(CheckboxPrimitive.Indicator, { forceMount: true, className: "aviala-checkbox__indicator", children: [
3351
+ /* @__PURE__ */ jsx22(CheckboxCheckIcon, { className: "aviala-checkbox__indicator-icon aviala-checkbox__indicator-icon--check" }),
3352
+ /* @__PURE__ */ jsx22(
3201
3353
  "span",
3202
3354
  {
3203
3355
  "aria-hidden": true,
@@ -3210,8 +3362,8 @@ var Checkbox = forwardRef16(({ className, round = false, size = "default", ...pr
3210
3362
  );
3211
3363
  });
3212
3364
  Checkbox.displayName = CheckboxPrimitive.Root.displayName;
3213
- var CheckboxGroup = forwardRef16(
3214
- ({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx21(
3365
+ var CheckboxGroup = forwardRef17(
3366
+ ({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx22(
3215
3367
  "div",
3216
3368
  {
3217
3369
  ref,
@@ -3233,9 +3385,9 @@ function renderIcon3(node) {
3233
3385
  "shrink-0"
3234
3386
  )
3235
3387
  }) : node;
3236
- return /* @__PURE__ */ jsx21("span", { className: "aviala-checkbox-input__icon", children: content });
3388
+ return /* @__PURE__ */ jsx22("span", { className: "aviala-checkbox-input__icon", children: content });
3237
3389
  }
3238
- var CheckboxInput = forwardRef16(
3390
+ var CheckboxInput = forwardRef17(
3239
3391
  ({
3240
3392
  className,
3241
3393
  title,
@@ -3244,16 +3396,16 @@ var CheckboxInput = forwardRef16(
3244
3396
  disabled,
3245
3397
  id,
3246
3398
  ...props
3247
- }, ref) => /* @__PURE__ */ jsxs11(
3399
+ }, ref) => /* @__PURE__ */ jsxs12(
3248
3400
  "label",
3249
3401
  {
3250
3402
  htmlFor: id,
3251
3403
  className: cn("aviala-checkbox-input", className),
3252
3404
  "data-disabled": disabled ? "true" : void 0,
3253
3405
  children: [
3254
- /* @__PURE__ */ jsx21(Checkbox, { ref, id, disabled, ...props }),
3406
+ /* @__PURE__ */ jsx22(Checkbox, { ref, id, disabled, ...props }),
3255
3407
  renderIcon3(icon),
3256
- /* @__PURE__ */ jsx21(
3408
+ /* @__PURE__ */ jsx22(
3257
3409
  TypefacePair,
3258
3410
  {
3259
3411
  className: "aviala-checkbox-input__content min-w-0 flex-1",
@@ -3271,11 +3423,11 @@ CheckboxInput.displayName = "CheckboxInput";
3271
3423
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3272
3424
  import {
3273
3425
  cloneElement as cloneElement6,
3274
- forwardRef as forwardRef17,
3426
+ forwardRef as forwardRef18,
3275
3427
  isValidElement as isValidElement11
3276
3428
  } from "react";
3277
- import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
3278
- var RadioGroup = forwardRef17(({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx22(
3429
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
3430
+ var RadioGroup = forwardRef18(({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx23(
3279
3431
  RadioGroupPrimitive.Root,
3280
3432
  {
3281
3433
  className: cn("aviala-radio-group", className),
@@ -3285,15 +3437,15 @@ var RadioGroup = forwardRef17(({ className, direction = "vertical", ...props },
3285
3437
  }
3286
3438
  ));
3287
3439
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
3288
- var RadioGroupItem = forwardRef17(({ className, ...props }, ref) => /* @__PURE__ */ jsxs12(
3440
+ var RadioGroupItem = forwardRef18(({ className, ...props }, ref) => /* @__PURE__ */ jsxs13(
3289
3441
  RadioGroupPrimitive.Item,
3290
3442
  {
3291
3443
  ref,
3292
3444
  className: cn("aviala-radio aviala-focus-ring", className),
3293
3445
  ...props,
3294
3446
  children: [
3295
- /* @__PURE__ */ jsx22("span", { "aria-hidden": true, className: "aviala-radio__surface" }),
3296
- /* @__PURE__ */ jsx22("span", { "aria-hidden": true, className: "aviala-radio__indicator" })
3447
+ /* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: "aviala-radio__surface" }),
3448
+ /* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: "aviala-radio__indicator" })
3297
3449
  ]
3298
3450
  }
3299
3451
  ));
@@ -3309,9 +3461,9 @@ function renderIcon4(node) {
3309
3461
  "shrink-0"
3310
3462
  )
3311
3463
  }) : node;
3312
- return /* @__PURE__ */ jsx22("span", { className: "aviala-radio-input__icon", children: content });
3464
+ return /* @__PURE__ */ jsx23("span", { className: "aviala-radio-input__icon", children: content });
3313
3465
  }
3314
- var RadioInput = forwardRef17(
3466
+ var RadioInput = forwardRef18(
3315
3467
  ({
3316
3468
  className,
3317
3469
  title,
@@ -3321,7 +3473,7 @@ var RadioInput = forwardRef17(
3321
3473
  disabled,
3322
3474
  id,
3323
3475
  ...props
3324
- }, ref) => /* @__PURE__ */ jsxs12(
3476
+ }, ref) => /* @__PURE__ */ jsxs13(
3325
3477
  "label",
3326
3478
  {
3327
3479
  htmlFor: id,
@@ -3329,9 +3481,9 @@ var RadioInput = forwardRef17(
3329
3481
  "data-style": variant,
3330
3482
  "data-disabled": disabled ? "true" : void 0,
3331
3483
  children: [
3332
- /* @__PURE__ */ jsx22(RadioGroupItem, { ref, id, disabled, ...props }),
3484
+ /* @__PURE__ */ jsx23(RadioGroupItem, { ref, id, disabled, ...props }),
3333
3485
  renderIcon4(icon),
3334
- /* @__PURE__ */ jsx22(
3486
+ /* @__PURE__ */ jsx23(
3335
3487
  TypefacePair,
3336
3488
  {
3337
3489
  className: "aviala-radio-input__content min-w-0 flex-1",
@@ -3347,9 +3499,9 @@ RadioInput.displayName = "RadioInput";
3347
3499
 
3348
3500
  // src/components/switch.tsx
3349
3501
  import * as SwitchPrimitive from "@radix-ui/react-switch";
3350
- import { forwardRef as forwardRef18 } from "react";
3351
- import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
3352
- var Switch = forwardRef18(({ className, size = "regular", ...props }, ref) => /* @__PURE__ */ jsxs13(
3502
+ import { forwardRef as forwardRef19 } from "react";
3503
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
3504
+ var Switch = forwardRef19(({ className, size = "regular", ...props }, ref) => /* @__PURE__ */ jsxs14(
3353
3505
  SwitchPrimitive.Root,
3354
3506
  {
3355
3507
  className: cn(
@@ -3360,8 +3512,8 @@ var Switch = forwardRef18(({ className, size = "regular", ...props }, ref) => /*
3360
3512
  ref,
3361
3513
  ...props,
3362
3514
  children: [
3363
- /* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: "aviala-switch__surface" }),
3364
- /* @__PURE__ */ jsx23(SwitchPrimitive.Thumb, { className: "aviala-switch__thumb" })
3515
+ /* @__PURE__ */ jsx24("span", { "aria-hidden": true, className: "aviala-switch__surface" }),
3516
+ /* @__PURE__ */ jsx24(SwitchPrimitive.Thumb, { className: "aviala-switch__thumb" })
3365
3517
  ]
3366
3518
  }
3367
3519
  ));
@@ -3370,14 +3522,14 @@ Switch.displayName = SwitchPrimitive.Root.displayName;
3370
3522
  // src/components/anchor.tsx
3371
3523
  import { Slot as Slot4 } from "@radix-ui/react-slot";
3372
3524
  import {
3373
- forwardRef as forwardRef19
3525
+ forwardRef as forwardRef20
3374
3526
  } from "react";
3375
- import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
3376
- var Anchor2 = forwardRef19(
3377
- ({ className, as: Tag2 = "nav", ...props }, ref) => /* @__PURE__ */ jsx24(Tag2, { ref, className: cn("aviala-anchor", className), ...props })
3527
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
3528
+ var Anchor2 = forwardRef20(
3529
+ ({ className, as: Tag2 = "nav", ...props }, ref) => /* @__PURE__ */ jsx25(Tag2, { ref, className: cn("aviala-anchor", className), ...props })
3378
3530
  );
3379
3531
  Anchor2.displayName = "Anchor";
3380
- var AnchorItem = forwardRef19(
3532
+ var AnchorItem = forwardRef20(
3381
3533
  ({
3382
3534
  className,
3383
3535
  activated = false,
@@ -3387,7 +3539,7 @@ var AnchorItem = forwardRef19(
3387
3539
  ...props
3388
3540
  }, ref) => {
3389
3541
  const Comp = asChild ? Slot4 : "a";
3390
- return /* @__PURE__ */ jsxs14(
3542
+ return /* @__PURE__ */ jsxs15(
3391
3543
  Comp,
3392
3544
  {
3393
3545
  ref,
@@ -3396,8 +3548,8 @@ var AnchorItem = forwardRef19(
3396
3548
  "data-indent": String(indentLevel),
3397
3549
  ...props,
3398
3550
  children: [
3399
- /* @__PURE__ */ jsx24("span", { className: "aviala-anchor-item__rail", "aria-hidden": true }),
3400
- /* @__PURE__ */ jsx24("span", { className: "aviala-anchor-item__content", children: /* @__PURE__ */ jsx24(Typography, { level: "text", as: "span", className: "aviala-anchor-item__label", children }) })
3551
+ /* @__PURE__ */ jsx25("span", { className: "aviala-anchor-item__rail", "aria-hidden": true }),
3552
+ /* @__PURE__ */ jsx25("span", { className: "aviala-anchor-item__content", children: /* @__PURE__ */ jsx25(Typography, { level: "text", as: "span", className: "aviala-anchor-item__label", children }) })
3401
3553
  ]
3402
3554
  }
3403
3555
  );
@@ -3407,20 +3559,20 @@ AnchorItem.displayName = "AnchorItem";
3407
3559
 
3408
3560
  // src/components/segmentator.tsx
3409
3561
  import {
3410
- createContext as createContext5,
3411
- forwardRef as forwardRef20,
3562
+ createContext as createContext6,
3563
+ forwardRef as forwardRef21,
3412
3564
  useCallback as useCallback4,
3413
- useContext as useContext6,
3565
+ useContext as useContext7,
3414
3566
  useEffect as useEffect4,
3415
3567
  useLayoutEffect as useLayoutEffect3,
3416
- useMemo as useMemo4,
3568
+ useMemo as useMemo5,
3417
3569
  useRef as useRef4,
3418
3570
  useState as useState7
3419
3571
  } from "react";
3420
- import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
3421
- var SegmentatorContext = createContext5(null);
3572
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
3573
+ var SegmentatorContext = createContext6(null);
3422
3574
  function useSegmentatorContext() {
3423
- const ctx = useContext6(SegmentatorContext);
3575
+ const ctx = useContext7(SegmentatorContext);
3424
3576
  if (!ctx) {
3425
3577
  throw new Error("SegmentatorItem must be used within SegmentatorGroup");
3426
3578
  }
@@ -3432,7 +3584,7 @@ function renderIcon5(node, dimmed) {
3432
3584
  level: "text",
3433
3585
  biggerSize: true
3434
3586
  });
3435
- return /* @__PURE__ */ jsx25(
3587
+ return /* @__PURE__ */ jsx26(
3436
3588
  "span",
3437
3589
  {
3438
3590
  className: cn(
@@ -3775,7 +3927,7 @@ function useSegmentatorThumb(groupRef, selectedValue, layoutKey, dragState) {
3775
3927
  }, [layoutKey, remeasureThumb]);
3776
3928
  return { thumb, onThumbRef, writeThumbMetrics, writeThumbMetricsLive };
3777
3929
  }
3778
- var SegmentatorGroup = forwardRef20(
3930
+ var SegmentatorGroup = forwardRef21(
3779
3931
  ({
3780
3932
  className,
3781
3933
  value,
@@ -3951,10 +4103,10 @@ var SegmentatorGroup = forwardRef20(
3951
4103
  group.setPointerCapture(event.pointerId);
3952
4104
  };
3953
4105
  const thumbStyle = thumb ? buildThumbStyle() : void 0;
3954
- return /* @__PURE__ */ jsx25(
4106
+ return /* @__PURE__ */ jsx26(
3955
4107
  SegmentatorContext.Provider,
3956
4108
  {
3957
- value: useMemo4(
4109
+ value: useMemo5(
3958
4110
  () => ({
3959
4111
  value: currentValue,
3960
4112
  onValueChange: setValue,
@@ -3966,7 +4118,7 @@ var SegmentatorGroup = forwardRef20(
3966
4118
  }),
3967
4119
  [currentValue, setValue, mode, direction, allRound, disabled]
3968
4120
  ),
3969
- children: /* @__PURE__ */ jsxs15(
4121
+ children: /* @__PURE__ */ jsxs16(
3970
4122
  "div",
3971
4123
  {
3972
4124
  ref: (node) => {
@@ -3989,7 +4141,7 @@ var SegmentatorGroup = forwardRef20(
3989
4141
  onLostPointerCapture: finishPointerDrag,
3990
4142
  children: [
3991
4143
  children,
3992
- thumb && /* @__PURE__ */ jsx25(
4144
+ thumb && /* @__PURE__ */ jsx26(
3993
4145
  "span",
3994
4146
  {
3995
4147
  ref: onThumbRef,
@@ -4009,7 +4161,7 @@ var SegmentatorGroup = forwardRef20(
4009
4161
  }
4010
4162
  );
4011
4163
  SegmentatorGroup.displayName = "SegmentatorGroup";
4012
- var SegmentatorItem = forwardRef20(
4164
+ var SegmentatorItem = forwardRef21(
4013
4165
  ({
4014
4166
  className,
4015
4167
  value,
@@ -4027,7 +4179,7 @@ var SegmentatorItem = forwardRef20(
4027
4179
  const isDisabled = disabled || ctx.disabled;
4028
4180
  const dimmed = isDisabled;
4029
4181
  const icon = iconOnly ? leftIcon ?? rightIcon : leftIcon;
4030
- return /* @__PURE__ */ jsx25(
4182
+ return /* @__PURE__ */ jsx26(
4031
4183
  "button",
4032
4184
  {
4033
4185
  ref,
@@ -4049,9 +4201,9 @@ var SegmentatorItem = forwardRef20(
4049
4201
  onClick?.(e);
4050
4202
  },
4051
4203
  ...props,
4052
- children: /* @__PURE__ */ jsxs15("span", { className: "aviala-segmentator-item__content", children: [
4204
+ children: /* @__PURE__ */ jsxs16("span", { className: "aviala-segmentator-item__content", children: [
4053
4205
  renderIcon5(icon, dimmed && !!icon),
4054
- !iconOnly && /* @__PURE__ */ jsx25(
4206
+ !iconOnly && /* @__PURE__ */ jsx26(
4055
4207
  "span",
4056
4208
  {
4057
4209
  className: cn(
@@ -4070,141 +4222,6 @@ var SegmentatorItem = forwardRef20(
4070
4222
  );
4071
4223
  SegmentatorItem.displayName = "SegmentatorItem";
4072
4224
 
4073
- // src/components/form-field.tsx
4074
- import { SymbolInformationCircle, SymbolWrongCircle } from "@aviala-design/icons";
4075
- import {
4076
- forwardRef as forwardRef21,
4077
- useId as useId2
4078
- } from "react";
4079
- import {
4080
- FormProvider,
4081
- useController
4082
- } from "react-hook-form";
4083
- import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
4084
- var FormFieldLayout = forwardRef21(
4085
- ({
4086
- className,
4087
- label,
4088
- htmlFor,
4089
- description,
4090
- error,
4091
- info,
4092
- alert,
4093
- required,
4094
- direction = "vertical",
4095
- children,
4096
- ...props
4097
- }, ref) => {
4098
- const reactId = useId2();
4099
- const labelId = `${reactId}-label`;
4100
- const hasLabel = label != null && label !== "";
4101
- const labelNode = hasLabel || description ? htmlFor ? /* @__PURE__ */ jsx26("label", { htmlFor, className: "aviala-form__label aviala-form__label--control", children: /* @__PURE__ */ jsx26(
4102
- Typeface,
4103
- {
4104
- id: labelId,
4105
- content: "textCaption",
4106
- primary: hasLabel ? /* @__PURE__ */ jsxs16(Fragment3, { children: [
4107
- label,
4108
- required ? /* @__PURE__ */ jsx26("span", { className: "aviala-form__required", "aria-hidden": true, children: "*" }) : null
4109
- ] }) : void 0,
4110
- secondary: description
4111
- }
4112
- ) }) : /* @__PURE__ */ jsx26(
4113
- Typeface,
4114
- {
4115
- id: labelId,
4116
- className: "aviala-form__label",
4117
- content: "textCaption",
4118
- primary: hasLabel ? /* @__PURE__ */ jsxs16(Fragment3, { children: [
4119
- label,
4120
- required ? /* @__PURE__ */ jsx26("span", { className: "aviala-form__required", "aria-hidden": true, children: "*" }) : null
4121
- ] }) : void 0,
4122
- secondary: description
4123
- }
4124
- ) : null;
4125
- return /* @__PURE__ */ jsxs16(
4126
- "div",
4127
- {
4128
- ref,
4129
- className: cn("aviala-form", className),
4130
- "data-direction": direction,
4131
- "aria-labelledby": hasLabel ? labelId : void 0,
4132
- ...props,
4133
- children: [
4134
- labelNode,
4135
- /* @__PURE__ */ jsxs16("div", { className: "aviala-form__content", children: [
4136
- children,
4137
- error ? /* @__PURE__ */ jsxs16("div", { className: "aviala-form__message aviala-form__message--error", role: "alert", children: [
4138
- /* @__PURE__ */ jsx26(
4139
- SymbolWrongCircle,
4140
- {
4141
- className: "aviala-form__message-icon",
4142
- width: 14,
4143
- height: 14,
4144
- "aria-hidden": true
4145
- }
4146
- ),
4147
- /* @__PURE__ */ jsx26(Typography, { level: "caption", as: "p", className: "aviala-form__message-text", children: error })
4148
- ] }) : null,
4149
- info ? /* @__PURE__ */ jsxs16("div", { className: "aviala-form__message aviala-form__message--info", children: [
4150
- /* @__PURE__ */ jsx26(
4151
- SymbolInformationCircle,
4152
- {
4153
- className: "aviala-form__message-icon",
4154
- width: 14,
4155
- height: 14,
4156
- "aria-hidden": true
4157
- }
4158
- ),
4159
- /* @__PURE__ */ jsx26(Typography, { level: "caption", as: "p", className: "aviala-form__message-text", children: info })
4160
- ] }) : null,
4161
- alert ? /* @__PURE__ */ jsx26("div", { className: "aviala-form__alert", children: alert }) : null
4162
- ] })
4163
- ]
4164
- }
4165
- );
4166
- }
4167
- );
4168
- FormFieldLayout.displayName = "FormFieldLayout";
4169
- var FormFieldControlled = forwardRef21(
4170
- ({
4171
- control,
4172
- name,
4173
- rules,
4174
- defaultValue,
4175
- shouldUnregister,
4176
- disabled,
4177
- render,
4178
- error,
4179
- ...layoutProps
4180
- }, ref) => {
4181
- const id = useId2();
4182
- const { field, fieldState, formState } = useController({
4183
- name,
4184
- control,
4185
- rules,
4186
- defaultValue,
4187
- shouldUnregister,
4188
- disabled
4189
- });
4190
- const message = error !== void 0 ? error : fieldState.error?.message ?? null;
4191
- return /* @__PURE__ */ jsx26(FormFieldLayout, { ref, ...layoutProps, htmlFor: id, error: message, children: render({ field, fieldState, formState, id }) });
4192
- }
4193
- );
4194
- FormFieldControlled.displayName = "FormFieldControlled";
4195
- function isControlledProps(props) {
4196
- return "render" in props && typeof props.render === "function" && "name" in props;
4197
- }
4198
- var FormFieldRoot = forwardRef21((props, ref) => {
4199
- if (isControlledProps(props)) {
4200
- return /* @__PURE__ */ jsx26(FormFieldControlled, { ref, ...props });
4201
- }
4202
- return /* @__PURE__ */ jsx26(FormFieldLayout, { ref, ...props });
4203
- });
4204
- var FormField = FormFieldRoot;
4205
- FormField.displayName = "FormField";
4206
- var Form = FormProvider;
4207
-
4208
4225
  // src/components/input-group.tsx
4209
4226
  import { forwardRef as forwardRef22 } from "react";
4210
4227
  import { jsx as jsx27 } from "react/jsx-runtime";
@@ -4384,17 +4401,17 @@ function clamp01(n) {
4384
4401
  }
4385
4402
 
4386
4403
  // src/components/color-picker/color-picker-context.tsx
4387
- import { createContext as createContext6, useContext as useContext7 } from "react";
4388
- var ColorPickerContext = createContext6(null);
4404
+ import { createContext as createContext7, useContext as useContext8 } from "react";
4405
+ var ColorPickerContext = createContext7(null);
4389
4406
  function useColorPickerContext() {
4390
- const ctx = useContext7(ColorPickerContext);
4407
+ const ctx = useContext8(ColorPickerContext);
4391
4408
  if (!ctx) {
4392
4409
  throw new Error("ColorPicker compound components must be used within <ColorPicker>");
4393
4410
  }
4394
4411
  return ctx;
4395
4412
  }
4396
4413
  function useOptionalColorPickerContext() {
4397
- return useContext7(ColorPickerContext);
4414
+ return useContext8(ColorPickerContext);
4398
4415
  }
4399
4416
 
4400
4417
  // src/components/color-picker/use-pointer-drag.ts
@@ -5312,21 +5329,21 @@ import {
5312
5329
  SymbolRight as SymbolRight2
5313
5330
  } from "@aviala-design/icons";
5314
5331
  import {
5315
- createContext as createContext7,
5332
+ createContext as createContext8,
5316
5333
  forwardRef as forwardRef27,
5317
5334
  isValidElement as isValidElement12,
5318
5335
  useCallback as useCallback10,
5319
- useContext as useContext8,
5336
+ useContext as useContext9,
5320
5337
  useEffect as useEffect7,
5321
5338
  useLayoutEffect as useLayoutEffect4,
5322
- useMemo as useMemo5,
5339
+ useMemo as useMemo6,
5323
5340
  useRef as useRef7,
5324
5341
  useState as useState12
5325
5342
  } from "react";
5326
5343
  import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
5327
- var CascaderContext = createContext7(null);
5344
+ var CascaderContext = createContext8(null);
5328
5345
  function useCascaderContext() {
5329
- const context = useContext8(CascaderContext);
5346
+ const context = useContext9(CascaderContext);
5330
5347
  if (!context) {
5331
5348
  throw new Error("Cascader compound components must be used within Cascader.");
5332
5349
  }
@@ -5529,7 +5546,7 @@ function Cascader({
5529
5546
  },
5530
5547
  [changeOnSelect, commitValue, expandTo, handleOpenChange, options]
5531
5548
  );
5532
- const contextValue = useMemo5(
5549
+ const contextValue = useMemo6(
5533
5550
  () => ({
5534
5551
  open,
5535
5552
  disabled,
@@ -5571,7 +5588,7 @@ var CascaderTrigger = forwardRef27(
5571
5588
  rightIcon,
5572
5589
  expandIcon,
5573
5590
  placeholder,
5574
- error = false,
5591
+ error,
5575
5592
  displayValue,
5576
5593
  separator = "/",
5577
5594
  disabled: disabledProp,
@@ -5582,6 +5599,7 @@ var CascaderTrigger = forwardRef27(
5582
5599
  const { open, disabled: disabledContext, size: sizeContext, selectedPath, getOptionAtPath } = useCascaderContext();
5583
5600
  const size = sizeProp ?? sizeContext;
5584
5601
  const disabled = disabledProp ?? disabledContext;
5602
+ const resolvedError = useResolvedControlError(error);
5585
5603
  const labels = selectedPath.map((_, index) => getOptionAtPath(selectedPath.slice(0, index + 1))?.label).filter((label) => label != null && label !== false);
5586
5604
  const resolvedDisplay = displayValue ?? (labels.length > 0 ? labels.map((label, index) => /* @__PURE__ */ jsxs25("span", { children: [
5587
5605
  index > 0 ? separator : null,
@@ -5597,7 +5615,7 @@ var CascaderTrigger = forwardRef27(
5597
5615
  "data-size": size,
5598
5616
  "data-all-round": allRound ? "true" : "false",
5599
5617
  "data-state": open ? "open" : "closed",
5600
- "data-error": error ? "true" : void 0,
5618
+ "data-error": resolvedError ? "true" : void 0,
5601
5619
  disabled,
5602
5620
  "aria-expanded": open,
5603
5621
  "aria-haspopup": "listbox",
@@ -5823,7 +5841,7 @@ function CascaderOptionsMenu({ className }) {
5823
5841
  const menuRef = useRef7(null);
5824
5842
  const columnElRefs = useRef7(/* @__PURE__ */ new Map());
5825
5843
  const [columns, setColumns] = useState12([]);
5826
- const columnPaths = useMemo5(() => {
5844
+ const columnPaths = useMemo6(() => {
5827
5845
  const paths = [[]];
5828
5846
  const expansion = activePath.length > 0 ? activePath : selectedPath.slice(0, -1);
5829
5847
  for (let index = 0; index < expansion.length; index += 1) {
@@ -6016,15 +6034,15 @@ import {
6016
6034
  useEffect as useEffect9,
6017
6035
  useId as useId4,
6018
6036
  useLayoutEffect as useLayoutEffect6,
6019
- useMemo as useMemo8,
6037
+ useMemo as useMemo9,
6020
6038
  useRef as useRef9,
6021
6039
  useState as useState13
6022
6040
  } from "react";
6023
6041
 
6024
6042
  // src/components/date-picker/date-picker-context.tsx
6025
- import { createContext as createContext8, useContext as useContext9 } from "react";
6043
+ import { createContext as createContext9, useContext as useContext10 } from "react";
6026
6044
  import { jsx as jsx39 } from "react/jsx-runtime";
6027
- var DatePickerContext = createContext8(null);
6045
+ var DatePickerContext = createContext9(null);
6028
6046
  function DatePickerProvider({
6029
6047
  value,
6030
6048
  children
@@ -6032,7 +6050,7 @@ function DatePickerProvider({
6032
6050
  return /* @__PURE__ */ jsx39(DatePickerContext.Provider, { value, children });
6033
6051
  }
6034
6052
  function useDatePickerContext() {
6035
- const context = useContext9(DatePickerContext);
6053
+ const context = useContext10(DatePickerContext);
6036
6054
  if (!context) {
6037
6055
  throw new Error("DatePicker compound components must be used within DatePicker.");
6038
6056
  }
@@ -6223,14 +6241,14 @@ function parseDateRangeInput(text) {
6223
6241
  }
6224
6242
 
6225
6243
  // src/components/date-picker/date-picker-month-wheels.tsx
6226
- import { useMemo as useMemo7 } from "react";
6244
+ import { useMemo as useMemo8 } from "react";
6227
6245
 
6228
6246
  // src/components/date-picker/date-picker-time-wheel.tsx
6229
6247
  import {
6230
6248
  useCallback as useCallback11,
6231
6249
  useEffect as useEffect8,
6232
6250
  useLayoutEffect as useLayoutEffect5,
6233
- useMemo as useMemo6,
6251
+ useMemo as useMemo7,
6234
6252
  useRef as useRef8
6235
6253
  } from "react";
6236
6254
 
@@ -6370,7 +6388,7 @@ function DatePickerTimeWheelColumn({
6370
6388
  const wheelAccumIdleTimerRef = useRef8(void 0);
6371
6389
  const selectedValueRef = useRef8(value);
6372
6390
  selectedValueRef.current = value;
6373
- const repeatedValues = useMemo6(() => {
6391
+ const repeatedValues = useMemo7(() => {
6374
6392
  if (!loop) return [...values];
6375
6393
  return Array.from({ length: LOOP_SECTIONS }, () => values).flat();
6376
6394
  }, [loop, values]);
@@ -6708,7 +6726,7 @@ function DatePickerMonthYearWheels({
6708
6726
  const { viewMonth, setViewMonth, minDate, maxDate } = useDatePickerContext();
6709
6727
  const year = viewMonth.getFullYear();
6710
6728
  const month = viewMonth.getMonth() + 1;
6711
- const yearValues = useMemo7(() => {
6729
+ const yearValues = useMemo8(() => {
6712
6730
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6713
6731
  const start = minDate?.getFullYear() ?? currentYear - 100;
6714
6732
  const end = maxDate?.getFullYear() ?? currentYear + 100;
@@ -7071,7 +7089,7 @@ function DatePicker(props) {
7071
7089
  viewMonth
7072
7090
  ]
7073
7091
  );
7074
- const contextValue = useMemo8(
7092
+ const contextValue = useMemo9(
7075
7093
  () => ({
7076
7094
  open,
7077
7095
  setOpen: handleOpenChange,
@@ -7139,7 +7157,7 @@ var DatePickerTrigger = forwardRef28(
7139
7157
  rightIcon,
7140
7158
  placeholder,
7141
7159
  rangePlaceholder,
7142
- error = false,
7160
+ error,
7143
7161
  displayValue,
7144
7162
  rangeSeparator = " - ",
7145
7163
  disabled: disabledProp,
@@ -7164,6 +7182,7 @@ var DatePickerTrigger = forwardRef28(
7164
7182
  } = useDatePickerContext();
7165
7183
  const size = sizeProp ?? sizeContext;
7166
7184
  const disabled = disabledProp ?? disabledContext;
7185
+ const resolvedError = useResolvedControlError(error);
7167
7186
  const resolvedPlaceholder = placeholder ?? locale.placeholder;
7168
7187
  const resolvedRangePlaceholder = rangePlaceholder ?? locale.rangePlaceholder;
7169
7188
  const inputRef = useRef9(null);
@@ -7218,7 +7237,7 @@ var DatePickerTrigger = forwardRef28(
7218
7237
  "data-size": size,
7219
7238
  "data-all-round": allRound ? "true" : "false",
7220
7239
  "data-state": open ? "open" : "closed",
7221
- "data-error": error ? "true" : void 0,
7240
+ "data-error": resolvedError ? "true" : void 0,
7222
7241
  disabled,
7223
7242
  "aria-expanded": open,
7224
7243
  "aria-haspopup": "dialog",
@@ -7250,7 +7269,7 @@ var DatePickerTrigger = forwardRef28(
7250
7269
  "data-size": size,
7251
7270
  "data-all-round": allRound ? "true" : "false",
7252
7271
  "data-state": open ? "open" : "closed",
7253
- "data-error": error ? "true" : void 0,
7272
+ "data-error": resolvedError ? "true" : void 0,
7254
7273
  "data-disabled": disabled ? "true" : void 0,
7255
7274
  onMouseDown: (event) => {
7256
7275
  if (disabled) return;
@@ -7440,8 +7459,8 @@ function DatePickerCalendar({ className }) {
7440
7459
  setActivePanel,
7441
7460
  enableTime
7442
7461
  } = useDatePickerContext();
7443
- const today = useMemo8(() => startOfDay(/* @__PURE__ */ new Date()), []);
7444
- const days = useMemo8(() => getCalendarDays(viewMonth), [viewMonth]);
7462
+ const today = useMemo9(() => startOfDay(/* @__PURE__ */ new Date()), []);
7463
+ const days = useMemo9(() => getCalendarDays(viewMonth), [viewMonth]);
7445
7464
  const prevViewMonthRef = useRef9(viewMonth);
7446
7465
  const dayGridRef = useRef9(null);
7447
7466
  const pendingDayFocusRef = useRef9(false);
@@ -7516,7 +7535,7 @@ function DatePickerCalendar({ className }) {
7516
7535
  pendingDayFocusRef.current = false;
7517
7536
  target.focus();
7518
7537
  }, [focusedDay, days, monthSlide]);
7519
- const outgoingDays = useMemo8(
7538
+ const outgoingDays = useMemo9(
7520
7539
  () => monthSlide ? getCalendarDays(monthSlide.outgoingMonth) : null,
7521
7540
  [monthSlide]
7522
7541
  );
@@ -7931,15 +7950,15 @@ import {
7931
7950
  forwardRef as forwardRef29,
7932
7951
  useCallback as useCallback13,
7933
7952
  useEffect as useEffect10,
7934
- useMemo as useMemo9,
7953
+ useMemo as useMemo10,
7935
7954
  useRef as useRef10,
7936
7955
  useState as useState14
7937
7956
  } from "react";
7938
7957
 
7939
7958
  // src/components/time-picker/time-picker-context.tsx
7940
- import { createContext as createContext9, useContext as useContext10 } from "react";
7959
+ import { createContext as createContext10, useContext as useContext11 } from "react";
7941
7960
  import { jsx as jsx44 } from "react/jsx-runtime";
7942
- var TimePickerContext = createContext9(null);
7961
+ var TimePickerContext = createContext10(null);
7943
7962
  function TimePickerProvider({
7944
7963
  value,
7945
7964
  children
@@ -7947,7 +7966,7 @@ function TimePickerProvider({
7947
7966
  return /* @__PURE__ */ jsx44(TimePickerContext.Provider, { value, children });
7948
7967
  }
7949
7968
  function useTimePickerContext() {
7950
- const context = useContext10(TimePickerContext);
7969
+ const context = useContext11(TimePickerContext);
7951
7970
  if (!context) {
7952
7971
  throw new Error("TimePicker compound components must be used within TimePicker.");
7953
7972
  }
@@ -8018,7 +8037,7 @@ function TimePicker({
8018
8037
  },
8019
8038
  [disabled, isOpenControlled, onOpenChange]
8020
8039
  );
8021
- const contextValue = useMemo9(
8040
+ const contextValue = useMemo10(
8022
8041
  () => ({
8023
8042
  open,
8024
8043
  disabled,
@@ -8038,7 +8057,7 @@ var TimePickerTrigger = forwardRef29(
8038
8057
  leftIcon,
8039
8058
  rightIcon,
8040
8059
  placeholder,
8041
- error = false,
8060
+ error,
8042
8061
  displayValue,
8043
8062
  disabled: disabledProp,
8044
8063
  ...props
@@ -8047,6 +8066,7 @@ var TimePickerTrigger = forwardRef29(
8047
8066
  const { open, disabled: disabledContext, size: sizeContext, value } = useTimePickerContext();
8048
8067
  const size = sizeProp ?? sizeContext;
8049
8068
  const disabled = disabledProp ?? disabledContext;
8069
+ const resolvedError = useResolvedControlError(error);
8050
8070
  const resolvedPlaceholder = placeholder ?? locale.placeholder;
8051
8071
  const formatted = displayValue !== void 0 ? displayValue : formatTimeValue(value.hours, value.minutes);
8052
8072
  const hasValue = formatted != null && formatted !== "";
@@ -8059,7 +8079,7 @@ var TimePickerTrigger = forwardRef29(
8059
8079
  "data-size": size,
8060
8080
  "data-all-round": allRound ? "true" : "false",
8061
8081
  "data-state": open ? "open" : "closed",
8062
- "data-error": error ? "true" : void 0,
8082
+ "data-error": resolvedError ? "true" : void 0,
8063
8083
  disabled,
8064
8084
  "aria-expanded": open,
8065
8085
  "aria-haspopup": "dialog",
@@ -9318,13 +9338,13 @@ ListItem.displayName = "ListItem";
9318
9338
  import * as PopoverPrimitive7 from "@radix-ui/react-popover";
9319
9339
  import { Slot as Slot5 } from "@radix-ui/react-slot";
9320
9340
  import {
9321
- createContext as createContext10,
9341
+ createContext as createContext11,
9322
9342
  forwardRef as forwardRef36,
9323
9343
  useCallback as useCallback17,
9324
- useContext as useContext11,
9344
+ useContext as useContext12,
9325
9345
  useEffect as useEffect14,
9326
9346
  useLayoutEffect as useLayoutEffect7,
9327
- useMemo as useMemo10,
9347
+ useMemo as useMemo11,
9328
9348
  useRef as useRef13,
9329
9349
  useState as useState19
9330
9350
  } from "react";
@@ -9332,9 +9352,9 @@ import { Fragment as Fragment8, jsx as jsx54, jsxs as jsxs39 } from "react/jsx-r
9332
9352
  function navigationItemButtonMode(active) {
9333
9353
  return active ? "second" : "noBackgroundCustom";
9334
9354
  }
9335
- var NavigationDirectionContext = createContext10("vertical");
9355
+ var NavigationDirectionContext = createContext11("vertical");
9336
9356
  function useNavigationDirection() {
9337
- return useContext11(NavigationDirectionContext);
9357
+ return useContext12(NavigationDirectionContext);
9338
9358
  }
9339
9359
  var NAVIGATION_ANIMATION_MS_FALLBACK = 300;
9340
9360
  var NAVIGATION_ANIMATION_EASING_FALLBACK = "cubic-bezier(0.16, 1, 0.3, 1)";
@@ -9934,9 +9954,9 @@ var NavigationActionsSlot = forwardRef36(({ className, ...props }, ref) => /* @_
9934
9954
  ));
9935
9955
  NavigationActionsSlot.displayName = "NavigationActionsSlot";
9936
9956
  var NAVIGATION_MENU_CLOSE_DELAY_MS = 150;
9937
- var NavigationItemMenuContext = createContext10(null);
9957
+ var NavigationItemMenuContext = createContext11(null);
9938
9958
  function useNavigationItemMenuContext(component) {
9939
- const context = useContext11(NavigationItemMenuContext);
9959
+ const context = useContext12(NavigationItemMenuContext);
9940
9960
  if (!context) {
9941
9961
  throw new Error(`${component} must be used within <NavigationItemMenu>`);
9942
9962
  }
@@ -9996,7 +10016,7 @@ function NavigationItemMenu({
9996
10016
  [cancelClose, isValueControlled, onValueChange, setOpen]
9997
10017
  );
9998
10018
  useEffect14(() => cancelClose, [cancelClose]);
9999
- const contextValue = useMemo10(
10019
+ const contextValue = useMemo11(
10000
10020
  () => ({
10001
10021
  value,
10002
10022
  hasSelection: value != null && value !== "",
@@ -10156,20 +10176,20 @@ NavigationItemMenuItem.displayName = "NavigationItemMenuItem";
10156
10176
 
10157
10177
  // src/components/tab.tsx
10158
10178
  import {
10159
- createContext as createContext11,
10179
+ createContext as createContext12,
10160
10180
  forwardRef as forwardRef37,
10161
10181
  useCallback as useCallback18,
10162
- useContext as useContext12,
10182
+ useContext as useContext13,
10163
10183
  useEffect as useEffect15,
10164
10184
  useLayoutEffect as useLayoutEffect8,
10165
- useMemo as useMemo11,
10185
+ useMemo as useMemo12,
10166
10186
  useRef as useRef14,
10167
10187
  useState as useState20
10168
10188
  } from "react";
10169
10189
  import { jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
10170
- var TabContext = createContext11(null);
10190
+ var TabContext = createContext12(null);
10171
10191
  function useTabContext() {
10172
- const ctx = useContext12(TabContext);
10192
+ const ctx = useContext13(TabContext);
10173
10193
  if (!ctx) {
10174
10194
  throw new Error("TabItem must be used within Tab");
10175
10195
  }
@@ -10318,7 +10338,7 @@ var Tab = forwardRef37(
10318
10338
  },
10319
10339
  []
10320
10340
  );
10321
- const ctx = useMemo11(
10341
+ const ctx = useMemo12(
10322
10342
  () => ({
10323
10343
  value,
10324
10344
  onValueChange: setValue,
@@ -10623,7 +10643,7 @@ import {
10623
10643
  useEffect as useEffect16,
10624
10644
  useId as useId5,
10625
10645
  useLayoutEffect as useLayoutEffect9,
10626
- useMemo as useMemo12,
10646
+ useMemo as useMemo13,
10627
10647
  useRef as useRef16
10628
10648
  } from "react";
10629
10649
  import { jsx as jsx57, jsxs as jsxs42 } from "react/jsx-runtime";
@@ -10684,7 +10704,7 @@ function ScrollPickerColumn({
10684
10704
  },
10685
10705
  [values]
10686
10706
  );
10687
- const repeatedValues = useMemo12(() => {
10707
+ const repeatedValues = useMemo13(() => {
10688
10708
  if (!loop) return [...values];
10689
10709
  return Array.from({ length: LOOP_SECTIONS2 }, () => values).flat();
10690
10710
  }, [loop, values]);
@@ -11007,14 +11027,14 @@ import {
11007
11027
  } from "@aviala-design/icons";
11008
11028
  import { cva as cva15 } from "class-variance-authority";
11009
11029
  import {
11010
- createContext as createContext12,
11030
+ createContext as createContext13,
11011
11031
  forwardRef as forwardRef39,
11012
11032
  useCallback as useCallback20,
11013
- useContext as useContext13,
11033
+ useContext as useContext14,
11014
11034
  useState as useState22
11015
11035
  } from "react";
11016
11036
  import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs43 } from "react/jsx-runtime";
11017
- var BreadcrumbSizeContext = createContext12("default");
11037
+ var BreadcrumbSizeContext = createContext13("default");
11018
11038
  function breadcrumbTypeLevel(size) {
11019
11039
  return size === "small" ? "caption" : "text";
11020
11040
  }
@@ -11049,7 +11069,7 @@ var Breadcrumb = forwardRef39(
11049
11069
  Breadcrumb.displayName = "Breadcrumb";
11050
11070
  var BreadcrumbItem = forwardRef39(
11051
11071
  ({ className, href, current = false, icon, onClick, children, ...props }, ref) => {
11052
- const size = useContext13(BreadcrumbSizeContext);
11072
+ const size = useContext14(BreadcrumbSizeContext);
11053
11073
  const label = /* @__PURE__ */ jsxs43(Fragment9, { children: [
11054
11074
  icon ? /* @__PURE__ */ jsx58("span", { className: "aviala-breadcrumb-item__icon", children: icon }) : null,
11055
11075
  children != null ? /* @__PURE__ */ jsx58(
@@ -11103,7 +11123,7 @@ var BreadcrumbItem = forwardRef39(
11103
11123
  BreadcrumbItem.displayName = "BreadcrumbItem";
11104
11124
  var BreadcrumbSeparator = forwardRef39(
11105
11125
  ({ className, children = "/", ...props }, ref) => {
11106
- const size = useContext13(BreadcrumbSizeContext);
11126
+ const size = useContext14(BreadcrumbSizeContext);
11107
11127
  return /* @__PURE__ */ jsx58(
11108
11128
  "li",
11109
11129
  {
@@ -11173,7 +11193,7 @@ var BreadcrumbEllipsis = forwardRef39(
11173
11193
  ...props
11174
11194
  }, ref) => {
11175
11195
  const locale = useLocaleMessages("Breadcrumb");
11176
- const size = useContext13(BreadcrumbSizeContext);
11196
+ const size = useContext14(BreadcrumbSizeContext);
11177
11197
  const [uncontrolledActivated, setUncontrolledActivated] = useState22(defaultActivated);
11178
11198
  const isControlled = activatedProp !== void 0;
11179
11199
  const activated = isControlled ? Boolean(activatedProp) : uncontrolledActivated;
@@ -12126,6 +12146,7 @@ export {
12126
12146
  useDirection,
12127
12147
  useLocale,
12128
12148
  useLocaleMessages,
12149
+ useResolvedControlError,
12129
12150
  useRtl,
12130
12151
  useTheme,
12131
12152
  useThemeLayoutKey,