@emeraldemperaur/vector-sigma 1.4.19 → 1.4.21

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/lib/index.cjs CHANGED
@@ -678,7 +678,7 @@ var VisuallyHidden = React__namespace.forwardRef(
678
678
  }
679
679
  );
680
680
  VisuallyHidden.displayName = NAME$4;
681
- var Root$7 = VisuallyHidden;
681
+ var Root$8 = VisuallyHidden;
682
682
 
683
683
  // src/accessible-icon.tsx
684
684
  var NAME$3 = "AccessibleIcon";
@@ -691,11 +691,11 @@ var AccessibleIcon = ({ children, label }) => {
691
691
  focusable: "false"
692
692
  // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
693
693
  }),
694
- /* @__PURE__ */ jsxRuntimeExports.jsx(Root$7, { children: label })
694
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Root$8, { children: label })
695
695
  ] });
696
696
  };
697
697
  AccessibleIcon.displayName = NAME$3;
698
- var Root2$4 = AccessibleIcon;
698
+ var Root2$5 = AccessibleIcon;
699
699
 
700
700
  // packages/react/context/src/create-context.tsx
701
701
  function createContextScope(scopeName, createContextScopeDeps = []) {
@@ -1035,6 +1035,139 @@ function useId$1(deterministicId) {
1035
1035
  return (id ? `radix-${id}` : "");
1036
1036
  }
1037
1037
 
1038
+ var COLLAPSIBLE_NAME = "Collapsible";
1039
+ var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
1040
+ var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
1041
+ var Collapsible = React__namespace.forwardRef(
1042
+ (props, forwardedRef) => {
1043
+ const {
1044
+ __scopeCollapsible,
1045
+ open: openProp,
1046
+ defaultOpen,
1047
+ disabled,
1048
+ onOpenChange,
1049
+ ...collapsibleProps
1050
+ } = props;
1051
+ const [open, setOpen] = useControllableState({
1052
+ prop: openProp,
1053
+ defaultProp: defaultOpen ?? false,
1054
+ onChange: onOpenChange,
1055
+ caller: COLLAPSIBLE_NAME
1056
+ });
1057
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1058
+ CollapsibleProvider,
1059
+ {
1060
+ scope: __scopeCollapsible,
1061
+ disabled,
1062
+ contentId: useId$1(),
1063
+ open,
1064
+ onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1065
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1066
+ Primitive$1.div,
1067
+ {
1068
+ "data-state": getState$5(open),
1069
+ "data-disabled": disabled ? "" : void 0,
1070
+ ...collapsibleProps,
1071
+ ref: forwardedRef
1072
+ }
1073
+ )
1074
+ }
1075
+ );
1076
+ }
1077
+ );
1078
+ Collapsible.displayName = COLLAPSIBLE_NAME;
1079
+ var TRIGGER_NAME$5 = "CollapsibleTrigger";
1080
+ var CollapsibleTrigger = React__namespace.forwardRef(
1081
+ (props, forwardedRef) => {
1082
+ const { __scopeCollapsible, ...triggerProps } = props;
1083
+ const context = useCollapsibleContext(TRIGGER_NAME$5, __scopeCollapsible);
1084
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1085
+ Primitive$1.button,
1086
+ {
1087
+ type: "button",
1088
+ "aria-controls": context.contentId,
1089
+ "aria-expanded": context.open || false,
1090
+ "data-state": getState$5(context.open),
1091
+ "data-disabled": context.disabled ? "" : void 0,
1092
+ disabled: context.disabled,
1093
+ ...triggerProps,
1094
+ ref: forwardedRef,
1095
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
1096
+ }
1097
+ );
1098
+ }
1099
+ );
1100
+ CollapsibleTrigger.displayName = TRIGGER_NAME$5;
1101
+ var CONTENT_NAME$5 = "CollapsibleContent";
1102
+ var CollapsibleContent = React__namespace.forwardRef(
1103
+ (props, forwardedRef) => {
1104
+ const { forceMount, ...contentProps } = props;
1105
+ const context = useCollapsibleContext(CONTENT_NAME$5, props.__scopeCollapsible);
1106
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
1107
+ }
1108
+ );
1109
+ CollapsibleContent.displayName = CONTENT_NAME$5;
1110
+ var CollapsibleContentImpl = React__namespace.forwardRef((props, forwardedRef) => {
1111
+ const { __scopeCollapsible, present, children, ...contentProps } = props;
1112
+ const context = useCollapsibleContext(CONTENT_NAME$5, __scopeCollapsible);
1113
+ const [isPresent, setIsPresent] = React__namespace.useState(present);
1114
+ const ref = React__namespace.useRef(null);
1115
+ const composedRefs = useComposedRefs(forwardedRef, ref);
1116
+ const heightRef = React__namespace.useRef(0);
1117
+ const height = heightRef.current;
1118
+ const widthRef = React__namespace.useRef(0);
1119
+ const width = widthRef.current;
1120
+ const isOpen = context.open || isPresent;
1121
+ const isMountAnimationPreventedRef = React__namespace.useRef(isOpen);
1122
+ const originalStylesRef = React__namespace.useRef(void 0);
1123
+ React__namespace.useEffect(() => {
1124
+ const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
1125
+ return () => cancelAnimationFrame(rAF);
1126
+ }, []);
1127
+ useLayoutEffect2(() => {
1128
+ const node = ref.current;
1129
+ if (node) {
1130
+ originalStylesRef.current = originalStylesRef.current || {
1131
+ transitionDuration: node.style.transitionDuration,
1132
+ animationName: node.style.animationName
1133
+ };
1134
+ node.style.transitionDuration = "0s";
1135
+ node.style.animationName = "none";
1136
+ const rect = node.getBoundingClientRect();
1137
+ heightRef.current = rect.height;
1138
+ widthRef.current = rect.width;
1139
+ if (!isMountAnimationPreventedRef.current) {
1140
+ node.style.transitionDuration = originalStylesRef.current.transitionDuration;
1141
+ node.style.animationName = originalStylesRef.current.animationName;
1142
+ }
1143
+ setIsPresent(present);
1144
+ }
1145
+ }, [context.open, present]);
1146
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1147
+ Primitive$1.div,
1148
+ {
1149
+ "data-state": getState$5(context.open),
1150
+ "data-disabled": context.disabled ? "" : void 0,
1151
+ id: context.contentId,
1152
+ hidden: !isOpen,
1153
+ ...contentProps,
1154
+ ref: composedRefs,
1155
+ style: {
1156
+ [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,
1157
+ [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,
1158
+ ...props.style
1159
+ },
1160
+ children: isOpen && children
1161
+ }
1162
+ );
1163
+ });
1164
+ function getState$5(open) {
1165
+ return open ? "open" : "closed";
1166
+ }
1167
+ var Root$7 = Collapsible;
1168
+ var Trigger$3 = CollapsibleTrigger;
1169
+ var Content$1 = CollapsibleContent;
1170
+
1038
1171
  // packages/react/direction/src/direction.tsx
1039
1172
  var DirectionContext = React__namespace.createContext(void 0);
1040
1173
  var DirectionProvider = (props) => {
@@ -1047,6 +1180,298 @@ function useDirection(localDir) {
1047
1180
  }
1048
1181
  var Provider$1 = DirectionProvider;
1049
1182
 
1183
+ var ACCORDION_NAME = "Accordion";
1184
+ var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
1185
+ var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection(ACCORDION_NAME);
1186
+ var [createAccordionContext] = createContextScope(ACCORDION_NAME, [
1187
+ createCollectionScope$3,
1188
+ createCollapsibleScope
1189
+ ]);
1190
+ var useCollapsibleScope = createCollapsibleScope();
1191
+ var Accordion$1 = React.forwardRef(
1192
+ (props, forwardedRef) => {
1193
+ const { type, ...accordionProps } = props;
1194
+ const singleProps = accordionProps;
1195
+ const multipleProps = accordionProps;
1196
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$3.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
1197
+ }
1198
+ );
1199
+ Accordion$1.displayName = ACCORDION_NAME;
1200
+ var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME);
1201
+ var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(
1202
+ ACCORDION_NAME,
1203
+ { collapsible: false }
1204
+ );
1205
+ var AccordionImplSingle = React.forwardRef(
1206
+ (props, forwardedRef) => {
1207
+ const {
1208
+ value: valueProp,
1209
+ defaultValue,
1210
+ onValueChange = () => {
1211
+ },
1212
+ collapsible = false,
1213
+ ...accordionSingleProps
1214
+ } = props;
1215
+ const [value, setValue] = useControllableState({
1216
+ prop: valueProp,
1217
+ defaultProp: defaultValue ?? "",
1218
+ onChange: onValueChange,
1219
+ caller: ACCORDION_NAME
1220
+ });
1221
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1222
+ AccordionValueProvider,
1223
+ {
1224
+ scope: props.__scopeAccordion,
1225
+ value: React.useMemo(() => value ? [value] : [], [value]),
1226
+ onItemOpen: setValue,
1227
+ onItemClose: React.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
1228
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
1229
+ }
1230
+ );
1231
+ }
1232
+ );
1233
+ var AccordionImplMultiple = React.forwardRef((props, forwardedRef) => {
1234
+ const {
1235
+ value: valueProp,
1236
+ defaultValue,
1237
+ onValueChange = () => {
1238
+ },
1239
+ ...accordionMultipleProps
1240
+ } = props;
1241
+ const [value, setValue] = useControllableState({
1242
+ prop: valueProp,
1243
+ defaultProp: defaultValue ?? [],
1244
+ onChange: onValueChange,
1245
+ caller: ACCORDION_NAME
1246
+ });
1247
+ const handleItemOpen = React.useCallback(
1248
+ (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
1249
+ [setValue]
1250
+ );
1251
+ const handleItemClose = React.useCallback(
1252
+ (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
1253
+ [setValue]
1254
+ );
1255
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1256
+ AccordionValueProvider,
1257
+ {
1258
+ scope: props.__scopeAccordion,
1259
+ value,
1260
+ onItemOpen: handleItemOpen,
1261
+ onItemClose: handleItemClose,
1262
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
1263
+ }
1264
+ );
1265
+ });
1266
+ var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
1267
+ var AccordionImpl = React.forwardRef(
1268
+ (props, forwardedRef) => {
1269
+ const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
1270
+ const accordionRef = React.useRef(null);
1271
+ const composedRefs = useComposedRefs(accordionRef, forwardedRef);
1272
+ const getItems = useCollection$3(__scopeAccordion);
1273
+ const direction = useDirection(dir);
1274
+ const isDirectionLTR = direction === "ltr";
1275
+ const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {
1276
+ if (!ACCORDION_KEYS.includes(event.key)) return;
1277
+ const target = event.target;
1278
+ const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);
1279
+ const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);
1280
+ const triggerCount = triggerCollection.length;
1281
+ if (triggerIndex === -1) return;
1282
+ event.preventDefault();
1283
+ let nextIndex = triggerIndex;
1284
+ const homeIndex = 0;
1285
+ const endIndex = triggerCount - 1;
1286
+ const moveNext = () => {
1287
+ nextIndex = triggerIndex + 1;
1288
+ if (nextIndex > endIndex) {
1289
+ nextIndex = homeIndex;
1290
+ }
1291
+ };
1292
+ const movePrev = () => {
1293
+ nextIndex = triggerIndex - 1;
1294
+ if (nextIndex < homeIndex) {
1295
+ nextIndex = endIndex;
1296
+ }
1297
+ };
1298
+ switch (event.key) {
1299
+ case "Home":
1300
+ nextIndex = homeIndex;
1301
+ break;
1302
+ case "End":
1303
+ nextIndex = endIndex;
1304
+ break;
1305
+ case "ArrowRight":
1306
+ if (orientation === "horizontal") {
1307
+ if (isDirectionLTR) {
1308
+ moveNext();
1309
+ } else {
1310
+ movePrev();
1311
+ }
1312
+ }
1313
+ break;
1314
+ case "ArrowDown":
1315
+ if (orientation === "vertical") {
1316
+ moveNext();
1317
+ }
1318
+ break;
1319
+ case "ArrowLeft":
1320
+ if (orientation === "horizontal") {
1321
+ if (isDirectionLTR) {
1322
+ movePrev();
1323
+ } else {
1324
+ moveNext();
1325
+ }
1326
+ }
1327
+ break;
1328
+ case "ArrowUp":
1329
+ if (orientation === "vertical") {
1330
+ movePrev();
1331
+ }
1332
+ break;
1333
+ }
1334
+ const clampedIndex = nextIndex % triggerCount;
1335
+ triggerCollection[clampedIndex].ref.current?.focus();
1336
+ });
1337
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1338
+ AccordionImplProvider,
1339
+ {
1340
+ scope: __scopeAccordion,
1341
+ disabled,
1342
+ direction: dir,
1343
+ orientation,
1344
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$3.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1345
+ Primitive$1.div,
1346
+ {
1347
+ ...accordionProps,
1348
+ "data-orientation": orientation,
1349
+ ref: composedRefs,
1350
+ onKeyDown: disabled ? void 0 : handleKeyDown
1351
+ }
1352
+ ) })
1353
+ }
1354
+ );
1355
+ }
1356
+ );
1357
+ var ITEM_NAME$3 = "AccordionItem";
1358
+ var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME$3);
1359
+ var AccordionItem$1 = React.forwardRef(
1360
+ (props, forwardedRef) => {
1361
+ const { __scopeAccordion, value, ...accordionItemProps } = props;
1362
+ const accordionContext = useAccordionContext(ITEM_NAME$3, __scopeAccordion);
1363
+ const valueContext = useAccordionValueContext(ITEM_NAME$3, __scopeAccordion);
1364
+ const collapsibleScope = useCollapsibleScope(__scopeAccordion);
1365
+ const triggerId = useId$1();
1366
+ const open = value && valueContext.value.includes(value) || false;
1367
+ const disabled = accordionContext.disabled || props.disabled;
1368
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1369
+ AccordionItemProvider,
1370
+ {
1371
+ scope: __scopeAccordion,
1372
+ open,
1373
+ disabled,
1374
+ triggerId,
1375
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1376
+ Root$7,
1377
+ {
1378
+ "data-orientation": accordionContext.orientation,
1379
+ "data-state": getState$4(open),
1380
+ ...collapsibleScope,
1381
+ ...accordionItemProps,
1382
+ ref: forwardedRef,
1383
+ disabled,
1384
+ open,
1385
+ onOpenChange: (open2) => {
1386
+ if (open2) {
1387
+ valueContext.onItemOpen(value);
1388
+ } else {
1389
+ valueContext.onItemClose(value);
1390
+ }
1391
+ }
1392
+ }
1393
+ )
1394
+ }
1395
+ );
1396
+ }
1397
+ );
1398
+ AccordionItem$1.displayName = ITEM_NAME$3;
1399
+ var HEADER_NAME = "AccordionHeader";
1400
+ var AccordionHeader = React.forwardRef(
1401
+ (props, forwardedRef) => {
1402
+ const { __scopeAccordion, ...headerProps } = props;
1403
+ const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
1404
+ const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
1405
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1406
+ Primitive$1.h3,
1407
+ {
1408
+ "data-orientation": accordionContext.orientation,
1409
+ "data-state": getState$4(itemContext.open),
1410
+ "data-disabled": itemContext.disabled ? "" : void 0,
1411
+ ...headerProps,
1412
+ ref: forwardedRef
1413
+ }
1414
+ );
1415
+ }
1416
+ );
1417
+ AccordionHeader.displayName = HEADER_NAME;
1418
+ var TRIGGER_NAME$4 = "AccordionTrigger";
1419
+ var AccordionTrigger = React.forwardRef(
1420
+ (props, forwardedRef) => {
1421
+ const { __scopeAccordion, ...triggerProps } = props;
1422
+ const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
1423
+ const itemContext = useAccordionItemContext(TRIGGER_NAME$4, __scopeAccordion);
1424
+ const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME$4, __scopeAccordion);
1425
+ const collapsibleScope = useCollapsibleScope(__scopeAccordion);
1426
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$3.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1427
+ Trigger$3,
1428
+ {
1429
+ "aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
1430
+ "data-orientation": accordionContext.orientation,
1431
+ id: itemContext.triggerId,
1432
+ ...collapsibleScope,
1433
+ ...triggerProps,
1434
+ ref: forwardedRef
1435
+ }
1436
+ ) });
1437
+ }
1438
+ );
1439
+ AccordionTrigger.displayName = TRIGGER_NAME$4;
1440
+ var CONTENT_NAME$4 = "AccordionContent";
1441
+ var AccordionContent = React.forwardRef(
1442
+ (props, forwardedRef) => {
1443
+ const { __scopeAccordion, ...contentProps } = props;
1444
+ const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
1445
+ const itemContext = useAccordionItemContext(CONTENT_NAME$4, __scopeAccordion);
1446
+ const collapsibleScope = useCollapsibleScope(__scopeAccordion);
1447
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1448
+ Content$1,
1449
+ {
1450
+ role: "region",
1451
+ "aria-labelledby": itemContext.triggerId,
1452
+ "data-orientation": accordionContext.orientation,
1453
+ ...collapsibleScope,
1454
+ ...contentProps,
1455
+ ref: forwardedRef,
1456
+ style: {
1457
+ ["--radix-accordion-content-height"]: "var(--radix-collapsible-content-height)",
1458
+ ["--radix-accordion-content-width"]: "var(--radix-collapsible-content-width)",
1459
+ ...props.style
1460
+ }
1461
+ }
1462
+ );
1463
+ }
1464
+ );
1465
+ AccordionContent.displayName = CONTENT_NAME$4;
1466
+ function getState$4(open) {
1467
+ return open ? "open" : "closed";
1468
+ }
1469
+ var Root2$4 = Accordion$1;
1470
+ var Item$2 = AccordionItem$1;
1471
+ var Header = AccordionHeader;
1472
+ var Trigger2 = AccordionTrigger;
1473
+ var Content2$3 = AccordionContent;
1474
+
1050
1475
  // packages/react/use-callback-ref/src/use-callback-ref.tsx
1051
1476
  function useCallbackRef$1(callback) {
1052
1477
  const callbackRef = React__namespace.useRef(callback);
@@ -8878,7 +9303,7 @@ var TooltipContentImpl = React__namespace.forwardRef(
8878
9303
  },
8879
9304
  children: [
8880
9305
  /* @__PURE__ */ jsxRuntimeExports.jsx(Slottable, { children }),
8881
- /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$7, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
9306
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$8, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
8882
9307
  ]
8883
9308
  }
8884
9309
  )
@@ -9022,7 +9447,7 @@ var Portal$1 = TooltipPortal;
9022
9447
  var Content2 = TooltipContent;
9023
9448
  var Arrow2 = TooltipArrow;
9024
9449
 
9025
- const s$9=Root2$4;
9450
+ const s$9=Root2$5;
9026
9451
 
9027
9452
  var classnames = {exports: {}};
9028
9453
 
@@ -9193,7 +9618,7 @@ const e$5=["1","2","3"],s$5={size:{type:"enum",className:"rt-r-size",values:e$5,
9193
9618
 
9194
9619
  const s$4=React__namespace.forwardRef((i,o)=>{const{className:a,children:e,loading:t,...m}=v$3(i,s$5,r$i);if(!t)return e;const r=React__namespace.createElement("span",{...m,ref:o,className:classNames("rt-Spinner",a)},React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}));return e===void 0?r:React__namespace.createElement(p$5,{asChild:true,position:"relative",align:"center",justify:"center"},React__namespace.createElement("span",null,React__namespace.createElement("span",{"aria-hidden":true,style:{display:"contents",visibility:"hidden"},inert:void 0},e),React__namespace.createElement(p$5,{asChild:true,align:"center",justify:"center",position:"absolute",inset:"0"},React__namespace.createElement("span",null,r))))});s$4.displayName="Spinner";
9195
9620
 
9196
- const d$1=Root$7;
9621
+ const d$1=Root$8;
9197
9622
 
9198
9623
  function s$3(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}function r$e(e){switch(e){case "1":return "1";case "2":case "3":return "2";case "4":return "3"}}
9199
9624
 
@@ -48096,6 +48521,285 @@ const Row = ({ children, className, gap = "4" }) => {
48096
48521
  return (React.createElement(o$6, { columns: "12", gap: gap, width: "auto", className: className }, children));
48097
48522
  };
48098
48523
 
48524
+ const AccordionContext = React.createContext({ design: 'outline' });
48525
+ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = false, width = 12, newRow, className, style, children }) => {
48526
+ const containerRef = React.useRef(null);
48527
+ const [neuVars, setNeuVars] = React.useState({});
48528
+ React.useEffect(() => {
48529
+ if (design === 'neumorphic' && containerRef.current) {
48530
+ const parentBg = getNearestParentBackground(containerRef.current.parentElement);
48531
+ setNeuVars({
48532
+ '--neu-bg': parentBg,
48533
+ '--neu-shadow-dark': adjustColor(parentBg, -20),
48534
+ '--neu-shadow-light': adjustColor(parentBg, 20),
48535
+ });
48536
+ }
48537
+ }, [design]);
48538
+ const sharedProps = {
48539
+ className: `v-accordion-root-${design}`,
48540
+ children
48541
+ };
48542
+ const accordionRoot = allowMultiple ? (React.createElement(Root2$4, Object.assign({ type: "multiple", defaultValue: defaultOpenId ? [defaultOpenId] : undefined }, sharedProps))) : (React.createElement(Root2$4, Object.assign({ type: "single", defaultValue: defaultOpenId || undefined, collapsible: true }, sharedProps)));
48543
+ return (React.createElement(AccordionContext.Provider, { value: { design } },
48544
+ React.createElement(Column, { span: width, newLine: newRow },
48545
+ React.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
48546
+ React.createElement("style", { dangerouslySetInnerHTML: { __html: `
48547
+ @keyframes slideDown {
48548
+ from { height: 0; opacity: 0; }
48549
+ to { height: var(--radix-accordion-content-height); opacity: 1; }
48550
+ }
48551
+ @keyframes slideUp {
48552
+ from { height: var(--radix-accordion-content-height); opacity: 1; }
48553
+ to { height: 0; opacity: 0; }
48554
+ }
48555
+
48556
+ .v-accordion-content[data-state='open'] {
48557
+ animation: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
48558
+ }
48559
+ .v-accordion-content[data-state='closed'] {
48560
+ animation: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
48561
+ }
48562
+
48563
+ .v-accordion-trigger[data-state='open'] .v-accordion-chevron {
48564
+ transform: rotate(180deg);
48565
+ }
48566
+ .v-accordion-chevron {
48567
+ transition: transform 300ms cubic-bezier(0.87, 0, 0.13, 1);
48568
+ color: var(--gray-10);
48569
+ }
48570
+
48571
+ .v-accordion-root-outline {
48572
+ border: 1px solid var(--gray-6);
48573
+ border-radius: var(--radius-3);
48574
+ background-color: transparent;
48575
+ }
48576
+ .v-accordion-item-outline {
48577
+ border-bottom: 1px solid var(--gray-6);
48578
+ }
48579
+ .v-accordion-item-outline:last-child {
48580
+ border-bottom: none;
48581
+ }
48582
+
48583
+ .v-accordion-root-material {
48584
+ border-radius: var(--radius-3);
48585
+ background-color: var(--color-surface);
48586
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
48587
+ }
48588
+ .v-accordion-item-material {
48589
+ border-bottom: 1px solid var(--gray-4);
48590
+ }
48591
+ .v-accordion-item-material:last-child {
48592
+ border-bottom: none;
48593
+ }
48594
+ .v-accordion-item-material[data-state='open'] {
48595
+ border-left: 3px solid var(--accent-9);
48596
+ }
48597
+
48598
+ .v-accordion-root-neumorphic {
48599
+ display: flex;
48600
+ flex-direction: column;
48601
+ gap: 16px; /* Neumorphic items look best separated */
48602
+ }
48603
+ .v-accordion-item-neumorphic {
48604
+ background-color: var(--neu-bg);
48605
+ border-radius: 12px;
48606
+ box-shadow: 6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light);
48607
+ transition: all 0.3s ease;
48608
+ }
48609
+ .v-accordion-item-neumorphic[data-state='open'] {
48610
+ /* Pressed-in effect when open */
48611
+ box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
48612
+ }
48613
+
48614
+ .v-accordion-trigger {
48615
+ all: unset;
48616
+ display: flex;
48617
+ align-items: center;
48618
+ justify-content: space-between;
48619
+ width: 100%;
48620
+ padding: 16px;
48621
+ cursor: pointer;
48622
+ font-family: var(--default-font-family);
48623
+ box-sizing: border-box;
48624
+ }
48625
+ .v-accordion-trigger:disabled {
48626
+ cursor: not-allowed;
48627
+ opacity: 0.5;
48628
+ }
48629
+ ` } }),
48630
+ accordionRoot))));
48631
+ };
48632
+ const AccordionItem = ({ sectionId, title, children, disabled = false, icon }) => {
48633
+ const { design } = React.useContext(AccordionContext);
48634
+ return (React.createElement(Item$2, { value: sectionId, disabled: disabled, className: `v-accordion-item-${design}` },
48635
+ React.createElement(Header, { style: { margin: 0 } },
48636
+ React.createElement(Trigger2, { className: "v-accordion-trigger" },
48637
+ React.createElement(p$5, { align: "center", gap: "3" },
48638
+ icon && (React.createElement("div", { style: { display: 'flex', alignItems: 'center', color: 'var(--accent-9)' } }, icon)),
48639
+ React.createElement(p$d, { size: "3", weight: "bold", style: { color: 'var(--gray-12)' } }, title)),
48640
+ React.createElement(Icon, { name: "chevrondown", height: "20", width: "20", className: "v-accordion-chevron" }))),
48641
+ React.createElement(Content2$3, { className: "v-accordion-content", style: { overflow: 'hidden' } },
48642
+ React.createElement("div", { style: { padding: '0 16px 16px 16px' } },
48643
+ React.createElement(p$d, { size: "2", color: "gray", as: "div" }, children)))));
48644
+ };
48645
+
48646
+ const CodexContext = React.createContext({
48647
+ activeStepId: '',
48648
+ setActiveStepId: () => { },
48649
+ design: 'outline'
48650
+ });
48651
+ const useStepper = () => React.useContext(CodexContext);
48652
+ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, className, style, children }) => {
48653
+ const containerRef = React.useRef(null);
48654
+ const [neuVars, setNeuVars] = React.useState({});
48655
+ const steps = React.Children.toArray(children)
48656
+ .filter((child) => React.isValidElement(child))
48657
+ .map((child) => ({
48658
+ id: child.props.stepId,
48659
+ title: child.props.title,
48660
+ description: child.props.subtitleDescription,
48661
+ icon: child.props.icon
48662
+ }));
48663
+ const [activeStepId, setActiveStepId] = React.useState('');
48664
+ React.useEffect(() => {
48665
+ if (steps.length > 0 && !activeStepId) {
48666
+ const initialId = defaultStepId && steps.some(s => s.id === defaultStepId)
48667
+ ? defaultStepId
48668
+ : steps[0].id;
48669
+ setActiveStepId(initialId);
48670
+ }
48671
+ }, [defaultStepId, steps, activeStepId]);
48672
+ React.useEffect(() => {
48673
+ if (design === 'neumorphic' && containerRef.current) {
48674
+ const parentBg = getNearestParentBackground(containerRef.current.parentElement);
48675
+ setNeuVars({
48676
+ '--neu-bg': parentBg,
48677
+ '--neu-shadow-dark': adjustColor(parentBg, -20),
48678
+ '--neu-shadow-light': adjustColor(parentBg, 20),
48679
+ });
48680
+ }
48681
+ }, [design]);
48682
+ const activeIndex = steps.findIndex(s => s.id === activeStepId);
48683
+ return (React.createElement(CodexContext.Provider, { value: { activeStepId, setActiveStepId, design } },
48684
+ React.createElement(Column, { span: width, newLine: newRow },
48685
+ React.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
48686
+ React.createElement("style", { dangerouslySetInnerHTML: { __html: `
48687
+ .v-step-circle {
48688
+ width: 40px;
48689
+ height: 40px;
48690
+ border-radius: 50%;
48691
+ display: flex;
48692
+ align-items: center;
48693
+ justify-content: center;
48694
+ font-weight: bold;
48695
+ transition: all 0.3s ease;
48696
+ z-index: 2;
48697
+ position: relative;
48698
+ cursor: pointer;
48699
+ }
48700
+ .v-step-line {
48701
+ flex: 1;
48702
+ height: 2px;
48703
+ transition: background-color 0.3s ease;
48704
+ }
48705
+ .v-step-content-animation {
48706
+ animation: fadeIn 0.4s ease-in-out;
48707
+ }
48708
+ @keyframes fadeIn {
48709
+ from { opacity: 0; transform: translateY(10px); }
48710
+ to { opacity: 1; transform: translateY(0); }
48711
+ }
48712
+
48713
+ .v-stepper-outline .v-step-circle.pending {
48714
+ border: 2px solid var(--gray-6);
48715
+ background: transparent;
48716
+ color: var(--gray-10);
48717
+ }
48718
+ .v-stepper-outline .v-step-circle.active {
48719
+ border: 2px solid var(--accent-9);
48720
+ background: var(--accent-2);
48721
+ color: var(--accent-9);
48722
+ }
48723
+ .v-stepper-outline .v-step-circle.completed {
48724
+ border: 2px solid var(--accent-9);
48725
+ background: var(--accent-9);
48726
+ color: white;
48727
+ }
48728
+ .v-stepper-outline .v-step-line.pending { background-color: var(--gray-5); }
48729
+ .v-stepper-outline .v-step-line.completed { background-color: var(--accent-9); }
48730
+
48731
+ .v-stepper-material .v-step-circle.pending {
48732
+ background: var(--color-surface);
48733
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
48734
+ color: var(--gray-10);
48735
+ }
48736
+ .v-stepper-material .v-step-circle.active {
48737
+ background: var(--accent-9);
48738
+ box-shadow: 0 4px 8px rgba(0,0,0,0.2);
48739
+ color: white;
48740
+ transform: scale(1.1);
48741
+ }
48742
+ .v-stepper-material .v-step-circle.completed {
48743
+ background: var(--accent-9);
48744
+ color: white;
48745
+ }
48746
+ .v-stepper-material .v-step-line.pending { background-color: var(--gray-5); }
48747
+ .v-stepper-material .v-step-line.completed { background-color: var(--accent-9); }
48748
+
48749
+ .v-stepper-neumorphic .v-step-circle {
48750
+ background: var(--neu-bg);
48751
+ border: none;
48752
+ }
48753
+ .v-stepper-neumorphic .v-step-circle.pending {
48754
+ box-shadow: 4px 4px 8px var(--neu-shadow-dark), -4px -4px 8px var(--neu-shadow-light);
48755
+ color: var(--gray-10);
48756
+ }
48757
+ .v-stepper-neumorphic .v-step-circle.active {
48758
+ box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
48759
+ color: var(--accent-9);
48760
+ }
48761
+ .v-stepper-neumorphic .v-step-circle.completed {
48762
+ box-shadow: inset 2px 2px 4px var(--neu-shadow-dark), inset -2px -2px 4px var(--neu-shadow-light);
48763
+ color: var(--accent-9);
48764
+ }
48765
+ .v-stepper-neumorphic .v-step-line.pending {
48766
+ background-color: transparent;
48767
+ box-shadow: inset 1px 1px 2px var(--neu-shadow-dark), inset -1px -1px 2px var(--neu-shadow-light);
48768
+ }
48769
+ .v-stepper-neumorphic .v-step-line.completed {
48770
+ background-color: var(--accent-9);
48771
+ box-shadow: 0 0 4px var(--accent-9);
48772
+ }
48773
+ ` } }),
48774
+ React.createElement(p$8, { className: `v-stepper-${design}`, style: { paddingBottom: '60px', paddingTop: '10px' } },
48775
+ React.createElement(p$5, { align: "center", width: "100%" }, steps.map((step, index) => {
48776
+ const isCompleted = index < activeIndex;
48777
+ const isActive = index === activeIndex;
48778
+ const statusClass = isActive ? 'active' : isCompleted ? 'completed' : 'pending';
48779
+ return (React.createElement(React.Fragment, { key: step.id },
48780
+ React.createElement(p$8, { style: { position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center' } },
48781
+ React.createElement("div", { className: `v-step-circle ${statusClass}`, onClick: () => setActiveStepId(step.id) }, isCompleted ? (React.createElement(Icon, { name: "check", width: "20", height: "20" })) : (step.icon ? step.icon : React.createElement("span", null, index + 1))),
48782
+ React.createElement(p$8, { style: {
48783
+ position: 'absolute',
48784
+ top: '100%',
48785
+ marginTop: '12px',
48786
+ width: '120px',
48787
+ textAlign: 'center',
48788
+ cursor: 'pointer'
48789
+ }, onClick: () => setActiveStepId(step.id) },
48790
+ React.createElement(p$d, { size: "2", weight: isActive ? "bold" : "regular", style: { color: isActive ? 'var(--gray-12)' : 'var(--gray-10)', display: 'block', lineHeight: 1.2 } }, step.title),
48791
+ step.description && (React.createElement(p$d, { size: "1", color: "gray", style: { display: 'block', marginTop: '4px' } }, step.description)))),
48792
+ index < steps.length - 1 && (React.createElement("div", { className: `v-step-line ${isCompleted ? 'completed' : 'pending'}` }))));
48793
+ }))),
48794
+ React.createElement(p$8, { style: { position: 'relative' } }, children)))));
48795
+ };
48796
+ const CodexItem = ({ stepId, children, }) => {
48797
+ const { activeStepId } = React.useContext(CodexContext);
48798
+ if (activeStepId !== stepId)
48799
+ return null;
48800
+ return (React.createElement("div", { className: "v-step-content-animation", style: { width: '100%' } }, children));
48801
+ };
48802
+
48099
48803
  /** A special constant with type `never` */
48100
48804
  function $constructor(name, initializer, params) {
48101
48805
  function init(inst, def) {
@@ -52550,6 +53254,7 @@ const NestedQuerySchema = object({
52550
53254
  inputAlias: string(),
52551
53255
  inputLabel: string(),
52552
53256
  inputPlaceholder: string(),
53257
+ defaultValue: any().optional(),
52553
53258
  newRow: boolean(),
52554
53259
  inputWidth: number(),
52555
53260
  isRequired: boolean(),
@@ -52559,7 +53264,8 @@ const NestedQuerySchema = object({
52559
53264
  queryResponse: any().nullable(),
52560
53265
  inputOptions: array(InputOptionSchema).nullable().optional(),
52561
53266
  toggledInput: any().nullable().optional(),
52562
- toggleTrigger: any().nullable().optional()
53267
+ toggleTrigger: any().nullable().optional(),
53268
+ errorText: string().optional()
52563
53269
  });
52564
53270
  const QuerySchema = object({
52565
53271
  queryId: number().or(uuid()),
@@ -52567,6 +53273,7 @@ const QuerySchema = object({
52567
53273
  inputAlias: string(),
52568
53274
  inputLabel: string(),
52569
53275
  inputPlaceholder: string(),
53276
+ defaultValue: any().optional(),
52570
53277
  minValue: number().optional(),
52571
53278
  maxValue: number().optional(),
52572
53279
  stepValue: number().or(float64()).optional(),
@@ -52579,7 +53286,8 @@ const QuerySchema = object({
52579
53286
  queryResponse: any().nullable(),
52580
53287
  inputOptions: array(InputOptionSchema).optional(),
52581
53288
  toggledInput: NestedQuerySchema.nullable().optional(),
52582
- toggleTrigger: any().nullable().optional()
53289
+ toggleTrigger: any().nullable().optional(),
53290
+ errorText: string().optional()
52583
53291
  });
52584
53292
  const SectionSchema = object({
52585
53293
  sectionId: number(),
@@ -52607,10 +53315,14 @@ const parseUuidFormat = (input) => {
52607
53315
  return numbers;
52608
53316
  };
52609
53317
 
53318
+ exports.Accordion = Accordion;
53319
+ exports.AccordionItem = AccordionItem;
52610
53320
  exports.AvatarInput = AvatarInput;
52611
53321
  exports.ButtonInput = ButtonInput;
52612
53322
  exports.CURRENCIES = CURRENCIES;
52613
53323
  exports.CheckboxGroupInput = CheckboxGroupInput;
53324
+ exports.Codex = Codex;
53325
+ exports.CodexItem = CodexItem;
52614
53326
  exports.Column = Column;
52615
53327
  exports.ConditionalTrigger = ConditionalTrigger;
52616
53328
  exports.Container = Container;
@@ -52642,5 +53354,6 @@ exports.Toggle = Toggle;
52642
53354
  exports.UUIDInput = UUIDInput;
52643
53355
  exports.parseUuidFormat = parseUuidFormat;
52644
53356
  exports.primeMatrix = primeMatrix;
53357
+ exports.useStepper = useStepper;
52645
53358
  exports.vectorSigma = vectorSigma;
52646
53359
  exports.xFormSchema = xFormSchema;