@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/README.md +1 -1
- package/lib/index.cjs +721 -8
- package/lib/index.esm.js +718 -10
- package/lib/types/components/datepicker/datepicker.d.ts +1 -1
- package/lib/types/index.d.ts +2 -0
- package/lib/types/layouts/accordion/accordion.d.ts +88 -0
- package/lib/types/layouts/codex/codex.d.ts +88 -0
- package/lib/types/teletraan1.d.ts +4 -2
- package/lib/types/utils/architect.d.ts +14 -0
- package/lib/types/utils/voltaire.d.ts +24 -0
- package/package.json +6 -2
package/lib/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, useLayoutEffect, forwardRef, createElement, useRef, useEffect, cloneElement, createRef, Component, useCallback, useMemo } from 'react';
|
|
2
|
+
import React__default, { useState, useLayoutEffect, forwardRef, createElement, useRef, useEffect, cloneElement, createRef, Component, useCallback, useMemo, createContext, useContext } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
import ReactDOM__default from 'react-dom';
|
|
5
5
|
import { useField, useFormikContext } from 'formik';
|
|
@@ -658,7 +658,7 @@ var VisuallyHidden = React.forwardRef(
|
|
|
658
658
|
}
|
|
659
659
|
);
|
|
660
660
|
VisuallyHidden.displayName = NAME$4;
|
|
661
|
-
var Root$
|
|
661
|
+
var Root$8 = VisuallyHidden;
|
|
662
662
|
|
|
663
663
|
// src/accessible-icon.tsx
|
|
664
664
|
var NAME$3 = "AccessibleIcon";
|
|
@@ -671,11 +671,11 @@ var AccessibleIcon = ({ children, label }) => {
|
|
|
671
671
|
focusable: "false"
|
|
672
672
|
// See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
|
|
673
673
|
}),
|
|
674
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Root$
|
|
674
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Root$8, { children: label })
|
|
675
675
|
] });
|
|
676
676
|
};
|
|
677
677
|
AccessibleIcon.displayName = NAME$3;
|
|
678
|
-
var Root2$
|
|
678
|
+
var Root2$5 = AccessibleIcon;
|
|
679
679
|
|
|
680
680
|
// packages/react/context/src/create-context.tsx
|
|
681
681
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
@@ -1015,6 +1015,139 @@ function useId$1(deterministicId) {
|
|
|
1015
1015
|
return (id ? `radix-${id}` : "");
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
1018
|
+
var COLLAPSIBLE_NAME = "Collapsible";
|
|
1019
|
+
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
1020
|
+
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
1021
|
+
var Collapsible = React.forwardRef(
|
|
1022
|
+
(props, forwardedRef) => {
|
|
1023
|
+
const {
|
|
1024
|
+
__scopeCollapsible,
|
|
1025
|
+
open: openProp,
|
|
1026
|
+
defaultOpen,
|
|
1027
|
+
disabled,
|
|
1028
|
+
onOpenChange,
|
|
1029
|
+
...collapsibleProps
|
|
1030
|
+
} = props;
|
|
1031
|
+
const [open, setOpen] = useControllableState({
|
|
1032
|
+
prop: openProp,
|
|
1033
|
+
defaultProp: defaultOpen ?? false,
|
|
1034
|
+
onChange: onOpenChange,
|
|
1035
|
+
caller: COLLAPSIBLE_NAME
|
|
1036
|
+
});
|
|
1037
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1038
|
+
CollapsibleProvider,
|
|
1039
|
+
{
|
|
1040
|
+
scope: __scopeCollapsible,
|
|
1041
|
+
disabled,
|
|
1042
|
+
contentId: useId$1(),
|
|
1043
|
+
open,
|
|
1044
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
1045
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1046
|
+
Primitive$1.div,
|
|
1047
|
+
{
|
|
1048
|
+
"data-state": getState$5(open),
|
|
1049
|
+
"data-disabled": disabled ? "" : void 0,
|
|
1050
|
+
...collapsibleProps,
|
|
1051
|
+
ref: forwardedRef
|
|
1052
|
+
}
|
|
1053
|
+
)
|
|
1054
|
+
}
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
);
|
|
1058
|
+
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
1059
|
+
var TRIGGER_NAME$5 = "CollapsibleTrigger";
|
|
1060
|
+
var CollapsibleTrigger = React.forwardRef(
|
|
1061
|
+
(props, forwardedRef) => {
|
|
1062
|
+
const { __scopeCollapsible, ...triggerProps } = props;
|
|
1063
|
+
const context = useCollapsibleContext(TRIGGER_NAME$5, __scopeCollapsible);
|
|
1064
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1065
|
+
Primitive$1.button,
|
|
1066
|
+
{
|
|
1067
|
+
type: "button",
|
|
1068
|
+
"aria-controls": context.contentId,
|
|
1069
|
+
"aria-expanded": context.open || false,
|
|
1070
|
+
"data-state": getState$5(context.open),
|
|
1071
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
1072
|
+
disabled: context.disabled,
|
|
1073
|
+
...triggerProps,
|
|
1074
|
+
ref: forwardedRef,
|
|
1075
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
1076
|
+
}
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
1079
|
+
);
|
|
1080
|
+
CollapsibleTrigger.displayName = TRIGGER_NAME$5;
|
|
1081
|
+
var CONTENT_NAME$5 = "CollapsibleContent";
|
|
1082
|
+
var CollapsibleContent = React.forwardRef(
|
|
1083
|
+
(props, forwardedRef) => {
|
|
1084
|
+
const { forceMount, ...contentProps } = props;
|
|
1085
|
+
const context = useCollapsibleContext(CONTENT_NAME$5, props.__scopeCollapsible);
|
|
1086
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
1087
|
+
}
|
|
1088
|
+
);
|
|
1089
|
+
CollapsibleContent.displayName = CONTENT_NAME$5;
|
|
1090
|
+
var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
1091
|
+
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
1092
|
+
const context = useCollapsibleContext(CONTENT_NAME$5, __scopeCollapsible);
|
|
1093
|
+
const [isPresent, setIsPresent] = React.useState(present);
|
|
1094
|
+
const ref = React.useRef(null);
|
|
1095
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
1096
|
+
const heightRef = React.useRef(0);
|
|
1097
|
+
const height = heightRef.current;
|
|
1098
|
+
const widthRef = React.useRef(0);
|
|
1099
|
+
const width = widthRef.current;
|
|
1100
|
+
const isOpen = context.open || isPresent;
|
|
1101
|
+
const isMountAnimationPreventedRef = React.useRef(isOpen);
|
|
1102
|
+
const originalStylesRef = React.useRef(void 0);
|
|
1103
|
+
React.useEffect(() => {
|
|
1104
|
+
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
1105
|
+
return () => cancelAnimationFrame(rAF);
|
|
1106
|
+
}, []);
|
|
1107
|
+
useLayoutEffect2(() => {
|
|
1108
|
+
const node = ref.current;
|
|
1109
|
+
if (node) {
|
|
1110
|
+
originalStylesRef.current = originalStylesRef.current || {
|
|
1111
|
+
transitionDuration: node.style.transitionDuration,
|
|
1112
|
+
animationName: node.style.animationName
|
|
1113
|
+
};
|
|
1114
|
+
node.style.transitionDuration = "0s";
|
|
1115
|
+
node.style.animationName = "none";
|
|
1116
|
+
const rect = node.getBoundingClientRect();
|
|
1117
|
+
heightRef.current = rect.height;
|
|
1118
|
+
widthRef.current = rect.width;
|
|
1119
|
+
if (!isMountAnimationPreventedRef.current) {
|
|
1120
|
+
node.style.transitionDuration = originalStylesRef.current.transitionDuration;
|
|
1121
|
+
node.style.animationName = originalStylesRef.current.animationName;
|
|
1122
|
+
}
|
|
1123
|
+
setIsPresent(present);
|
|
1124
|
+
}
|
|
1125
|
+
}, [context.open, present]);
|
|
1126
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1127
|
+
Primitive$1.div,
|
|
1128
|
+
{
|
|
1129
|
+
"data-state": getState$5(context.open),
|
|
1130
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
1131
|
+
id: context.contentId,
|
|
1132
|
+
hidden: !isOpen,
|
|
1133
|
+
...contentProps,
|
|
1134
|
+
ref: composedRefs,
|
|
1135
|
+
style: {
|
|
1136
|
+
[`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,
|
|
1137
|
+
[`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,
|
|
1138
|
+
...props.style
|
|
1139
|
+
},
|
|
1140
|
+
children: isOpen && children
|
|
1141
|
+
}
|
|
1142
|
+
);
|
|
1143
|
+
});
|
|
1144
|
+
function getState$5(open) {
|
|
1145
|
+
return open ? "open" : "closed";
|
|
1146
|
+
}
|
|
1147
|
+
var Root$7 = Collapsible;
|
|
1148
|
+
var Trigger$3 = CollapsibleTrigger;
|
|
1149
|
+
var Content$1 = CollapsibleContent;
|
|
1150
|
+
|
|
1018
1151
|
// packages/react/direction/src/direction.tsx
|
|
1019
1152
|
var DirectionContext = React.createContext(void 0);
|
|
1020
1153
|
var DirectionProvider = (props) => {
|
|
@@ -1027,6 +1160,298 @@ function useDirection(localDir) {
|
|
|
1027
1160
|
}
|
|
1028
1161
|
var Provider$1 = DirectionProvider;
|
|
1029
1162
|
|
|
1163
|
+
var ACCORDION_NAME = "Accordion";
|
|
1164
|
+
var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
|
|
1165
|
+
var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection(ACCORDION_NAME);
|
|
1166
|
+
var [createAccordionContext] = createContextScope(ACCORDION_NAME, [
|
|
1167
|
+
createCollectionScope$3,
|
|
1168
|
+
createCollapsibleScope
|
|
1169
|
+
]);
|
|
1170
|
+
var useCollapsibleScope = createCollapsibleScope();
|
|
1171
|
+
var Accordion$1 = React__default.forwardRef(
|
|
1172
|
+
(props, forwardedRef) => {
|
|
1173
|
+
const { type, ...accordionProps } = props;
|
|
1174
|
+
const singleProps = accordionProps;
|
|
1175
|
+
const multipleProps = accordionProps;
|
|
1176
|
+
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 }) });
|
|
1177
|
+
}
|
|
1178
|
+
);
|
|
1179
|
+
Accordion$1.displayName = ACCORDION_NAME;
|
|
1180
|
+
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME);
|
|
1181
|
+
var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(
|
|
1182
|
+
ACCORDION_NAME,
|
|
1183
|
+
{ collapsible: false }
|
|
1184
|
+
);
|
|
1185
|
+
var AccordionImplSingle = React__default.forwardRef(
|
|
1186
|
+
(props, forwardedRef) => {
|
|
1187
|
+
const {
|
|
1188
|
+
value: valueProp,
|
|
1189
|
+
defaultValue,
|
|
1190
|
+
onValueChange = () => {
|
|
1191
|
+
},
|
|
1192
|
+
collapsible = false,
|
|
1193
|
+
...accordionSingleProps
|
|
1194
|
+
} = props;
|
|
1195
|
+
const [value, setValue] = useControllableState({
|
|
1196
|
+
prop: valueProp,
|
|
1197
|
+
defaultProp: defaultValue ?? "",
|
|
1198
|
+
onChange: onValueChange,
|
|
1199
|
+
caller: ACCORDION_NAME
|
|
1200
|
+
});
|
|
1201
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1202
|
+
AccordionValueProvider,
|
|
1203
|
+
{
|
|
1204
|
+
scope: props.__scopeAccordion,
|
|
1205
|
+
value: React__default.useMemo(() => value ? [value] : [], [value]),
|
|
1206
|
+
onItemOpen: setValue,
|
|
1207
|
+
onItemClose: React__default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
|
|
1208
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
|
1209
|
+
}
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
);
|
|
1213
|
+
var AccordionImplMultiple = React__default.forwardRef((props, forwardedRef) => {
|
|
1214
|
+
const {
|
|
1215
|
+
value: valueProp,
|
|
1216
|
+
defaultValue,
|
|
1217
|
+
onValueChange = () => {
|
|
1218
|
+
},
|
|
1219
|
+
...accordionMultipleProps
|
|
1220
|
+
} = props;
|
|
1221
|
+
const [value, setValue] = useControllableState({
|
|
1222
|
+
prop: valueProp,
|
|
1223
|
+
defaultProp: defaultValue ?? [],
|
|
1224
|
+
onChange: onValueChange,
|
|
1225
|
+
caller: ACCORDION_NAME
|
|
1226
|
+
});
|
|
1227
|
+
const handleItemOpen = React__default.useCallback(
|
|
1228
|
+
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
1229
|
+
[setValue]
|
|
1230
|
+
);
|
|
1231
|
+
const handleItemClose = React__default.useCallback(
|
|
1232
|
+
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
1233
|
+
[setValue]
|
|
1234
|
+
);
|
|
1235
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1236
|
+
AccordionValueProvider,
|
|
1237
|
+
{
|
|
1238
|
+
scope: props.__scopeAccordion,
|
|
1239
|
+
value,
|
|
1240
|
+
onItemOpen: handleItemOpen,
|
|
1241
|
+
onItemClose: handleItemClose,
|
|
1242
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
});
|
|
1246
|
+
var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
|
|
1247
|
+
var AccordionImpl = React__default.forwardRef(
|
|
1248
|
+
(props, forwardedRef) => {
|
|
1249
|
+
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
|
|
1250
|
+
const accordionRef = React__default.useRef(null);
|
|
1251
|
+
const composedRefs = useComposedRefs(accordionRef, forwardedRef);
|
|
1252
|
+
const getItems = useCollection$3(__scopeAccordion);
|
|
1253
|
+
const direction = useDirection(dir);
|
|
1254
|
+
const isDirectionLTR = direction === "ltr";
|
|
1255
|
+
const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {
|
|
1256
|
+
if (!ACCORDION_KEYS.includes(event.key)) return;
|
|
1257
|
+
const target = event.target;
|
|
1258
|
+
const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);
|
|
1259
|
+
const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);
|
|
1260
|
+
const triggerCount = triggerCollection.length;
|
|
1261
|
+
if (triggerIndex === -1) return;
|
|
1262
|
+
event.preventDefault();
|
|
1263
|
+
let nextIndex = triggerIndex;
|
|
1264
|
+
const homeIndex = 0;
|
|
1265
|
+
const endIndex = triggerCount - 1;
|
|
1266
|
+
const moveNext = () => {
|
|
1267
|
+
nextIndex = triggerIndex + 1;
|
|
1268
|
+
if (nextIndex > endIndex) {
|
|
1269
|
+
nextIndex = homeIndex;
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
const movePrev = () => {
|
|
1273
|
+
nextIndex = triggerIndex - 1;
|
|
1274
|
+
if (nextIndex < homeIndex) {
|
|
1275
|
+
nextIndex = endIndex;
|
|
1276
|
+
}
|
|
1277
|
+
};
|
|
1278
|
+
switch (event.key) {
|
|
1279
|
+
case "Home":
|
|
1280
|
+
nextIndex = homeIndex;
|
|
1281
|
+
break;
|
|
1282
|
+
case "End":
|
|
1283
|
+
nextIndex = endIndex;
|
|
1284
|
+
break;
|
|
1285
|
+
case "ArrowRight":
|
|
1286
|
+
if (orientation === "horizontal") {
|
|
1287
|
+
if (isDirectionLTR) {
|
|
1288
|
+
moveNext();
|
|
1289
|
+
} else {
|
|
1290
|
+
movePrev();
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
break;
|
|
1294
|
+
case "ArrowDown":
|
|
1295
|
+
if (orientation === "vertical") {
|
|
1296
|
+
moveNext();
|
|
1297
|
+
}
|
|
1298
|
+
break;
|
|
1299
|
+
case "ArrowLeft":
|
|
1300
|
+
if (orientation === "horizontal") {
|
|
1301
|
+
if (isDirectionLTR) {
|
|
1302
|
+
movePrev();
|
|
1303
|
+
} else {
|
|
1304
|
+
moveNext();
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
break;
|
|
1308
|
+
case "ArrowUp":
|
|
1309
|
+
if (orientation === "vertical") {
|
|
1310
|
+
movePrev();
|
|
1311
|
+
}
|
|
1312
|
+
break;
|
|
1313
|
+
}
|
|
1314
|
+
const clampedIndex = nextIndex % triggerCount;
|
|
1315
|
+
triggerCollection[clampedIndex].ref.current?.focus();
|
|
1316
|
+
});
|
|
1317
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1318
|
+
AccordionImplProvider,
|
|
1319
|
+
{
|
|
1320
|
+
scope: __scopeAccordion,
|
|
1321
|
+
disabled,
|
|
1322
|
+
direction: dir,
|
|
1323
|
+
orientation,
|
|
1324
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$3.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1325
|
+
Primitive$1.div,
|
|
1326
|
+
{
|
|
1327
|
+
...accordionProps,
|
|
1328
|
+
"data-orientation": orientation,
|
|
1329
|
+
ref: composedRefs,
|
|
1330
|
+
onKeyDown: disabled ? void 0 : handleKeyDown
|
|
1331
|
+
}
|
|
1332
|
+
) })
|
|
1333
|
+
}
|
|
1334
|
+
);
|
|
1335
|
+
}
|
|
1336
|
+
);
|
|
1337
|
+
var ITEM_NAME$3 = "AccordionItem";
|
|
1338
|
+
var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME$3);
|
|
1339
|
+
var AccordionItem$1 = React__default.forwardRef(
|
|
1340
|
+
(props, forwardedRef) => {
|
|
1341
|
+
const { __scopeAccordion, value, ...accordionItemProps } = props;
|
|
1342
|
+
const accordionContext = useAccordionContext(ITEM_NAME$3, __scopeAccordion);
|
|
1343
|
+
const valueContext = useAccordionValueContext(ITEM_NAME$3, __scopeAccordion);
|
|
1344
|
+
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
1345
|
+
const triggerId = useId$1();
|
|
1346
|
+
const open = value && valueContext.value.includes(value) || false;
|
|
1347
|
+
const disabled = accordionContext.disabled || props.disabled;
|
|
1348
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1349
|
+
AccordionItemProvider,
|
|
1350
|
+
{
|
|
1351
|
+
scope: __scopeAccordion,
|
|
1352
|
+
open,
|
|
1353
|
+
disabled,
|
|
1354
|
+
triggerId,
|
|
1355
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1356
|
+
Root$7,
|
|
1357
|
+
{
|
|
1358
|
+
"data-orientation": accordionContext.orientation,
|
|
1359
|
+
"data-state": getState$4(open),
|
|
1360
|
+
...collapsibleScope,
|
|
1361
|
+
...accordionItemProps,
|
|
1362
|
+
ref: forwardedRef,
|
|
1363
|
+
disabled,
|
|
1364
|
+
open,
|
|
1365
|
+
onOpenChange: (open2) => {
|
|
1366
|
+
if (open2) {
|
|
1367
|
+
valueContext.onItemOpen(value);
|
|
1368
|
+
} else {
|
|
1369
|
+
valueContext.onItemClose(value);
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
}
|
|
1375
|
+
);
|
|
1376
|
+
}
|
|
1377
|
+
);
|
|
1378
|
+
AccordionItem$1.displayName = ITEM_NAME$3;
|
|
1379
|
+
var HEADER_NAME = "AccordionHeader";
|
|
1380
|
+
var AccordionHeader = React__default.forwardRef(
|
|
1381
|
+
(props, forwardedRef) => {
|
|
1382
|
+
const { __scopeAccordion, ...headerProps } = props;
|
|
1383
|
+
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
1384
|
+
const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
|
1385
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1386
|
+
Primitive$1.h3,
|
|
1387
|
+
{
|
|
1388
|
+
"data-orientation": accordionContext.orientation,
|
|
1389
|
+
"data-state": getState$4(itemContext.open),
|
|
1390
|
+
"data-disabled": itemContext.disabled ? "" : void 0,
|
|
1391
|
+
...headerProps,
|
|
1392
|
+
ref: forwardedRef
|
|
1393
|
+
}
|
|
1394
|
+
);
|
|
1395
|
+
}
|
|
1396
|
+
);
|
|
1397
|
+
AccordionHeader.displayName = HEADER_NAME;
|
|
1398
|
+
var TRIGGER_NAME$4 = "AccordionTrigger";
|
|
1399
|
+
var AccordionTrigger = React__default.forwardRef(
|
|
1400
|
+
(props, forwardedRef) => {
|
|
1401
|
+
const { __scopeAccordion, ...triggerProps } = props;
|
|
1402
|
+
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
1403
|
+
const itemContext = useAccordionItemContext(TRIGGER_NAME$4, __scopeAccordion);
|
|
1404
|
+
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME$4, __scopeAccordion);
|
|
1405
|
+
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
1406
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$3.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1407
|
+
Trigger$3,
|
|
1408
|
+
{
|
|
1409
|
+
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
|
1410
|
+
"data-orientation": accordionContext.orientation,
|
|
1411
|
+
id: itemContext.triggerId,
|
|
1412
|
+
...collapsibleScope,
|
|
1413
|
+
...triggerProps,
|
|
1414
|
+
ref: forwardedRef
|
|
1415
|
+
}
|
|
1416
|
+
) });
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
AccordionTrigger.displayName = TRIGGER_NAME$4;
|
|
1420
|
+
var CONTENT_NAME$4 = "AccordionContent";
|
|
1421
|
+
var AccordionContent = React__default.forwardRef(
|
|
1422
|
+
(props, forwardedRef) => {
|
|
1423
|
+
const { __scopeAccordion, ...contentProps } = props;
|
|
1424
|
+
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
1425
|
+
const itemContext = useAccordionItemContext(CONTENT_NAME$4, __scopeAccordion);
|
|
1426
|
+
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
1427
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1428
|
+
Content$1,
|
|
1429
|
+
{
|
|
1430
|
+
role: "region",
|
|
1431
|
+
"aria-labelledby": itemContext.triggerId,
|
|
1432
|
+
"data-orientation": accordionContext.orientation,
|
|
1433
|
+
...collapsibleScope,
|
|
1434
|
+
...contentProps,
|
|
1435
|
+
ref: forwardedRef,
|
|
1436
|
+
style: {
|
|
1437
|
+
["--radix-accordion-content-height"]: "var(--radix-collapsible-content-height)",
|
|
1438
|
+
["--radix-accordion-content-width"]: "var(--radix-collapsible-content-width)",
|
|
1439
|
+
...props.style
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
);
|
|
1443
|
+
}
|
|
1444
|
+
);
|
|
1445
|
+
AccordionContent.displayName = CONTENT_NAME$4;
|
|
1446
|
+
function getState$4(open) {
|
|
1447
|
+
return open ? "open" : "closed";
|
|
1448
|
+
}
|
|
1449
|
+
var Root2$4 = Accordion$1;
|
|
1450
|
+
var Item$2 = AccordionItem$1;
|
|
1451
|
+
var Header = AccordionHeader;
|
|
1452
|
+
var Trigger2 = AccordionTrigger;
|
|
1453
|
+
var Content2$3 = AccordionContent;
|
|
1454
|
+
|
|
1030
1455
|
// packages/react/use-callback-ref/src/use-callback-ref.tsx
|
|
1031
1456
|
function useCallbackRef$1(callback) {
|
|
1032
1457
|
const callbackRef = React.useRef(callback);
|
|
@@ -8858,7 +9283,7 @@ var TooltipContentImpl = React.forwardRef(
|
|
|
8858
9283
|
},
|
|
8859
9284
|
children: [
|
|
8860
9285
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Slottable, { children }),
|
|
8861
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$
|
|
9286
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$8, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
8862
9287
|
]
|
|
8863
9288
|
}
|
|
8864
9289
|
)
|
|
@@ -9002,7 +9427,7 @@ var Portal$1 = TooltipPortal;
|
|
|
9002
9427
|
var Content2 = TooltipContent;
|
|
9003
9428
|
var Arrow2 = TooltipArrow;
|
|
9004
9429
|
|
|
9005
|
-
const s$9=Root2$
|
|
9430
|
+
const s$9=Root2$5;
|
|
9006
9431
|
|
|
9007
9432
|
var classnames = {exports: {}};
|
|
9008
9433
|
|
|
@@ -9173,7 +9598,7 @@ const e$5=["1","2","3"],s$5={size:{type:"enum",className:"rt-r-size",values:e$5,
|
|
|
9173
9598
|
|
|
9174
9599
|
const s$4=React.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.createElement("span",{...m,ref:o,className:classNames("rt-Spinner",a)},React.createElement("span",{className:"rt-SpinnerLeaf"}),React.createElement("span",{className:"rt-SpinnerLeaf"}),React.createElement("span",{className:"rt-SpinnerLeaf"}),React.createElement("span",{className:"rt-SpinnerLeaf"}),React.createElement("span",{className:"rt-SpinnerLeaf"}),React.createElement("span",{className:"rt-SpinnerLeaf"}),React.createElement("span",{className:"rt-SpinnerLeaf"}),React.createElement("span",{className:"rt-SpinnerLeaf"}));return e===void 0?r:React.createElement(p$5,{asChild:true,position:"relative",align:"center",justify:"center"},React.createElement("span",null,React.createElement("span",{"aria-hidden":true,style:{display:"contents",visibility:"hidden"},inert:void 0},e),React.createElement(p$5,{asChild:true,align:"center",justify:"center",position:"absolute",inset:"0"},React.createElement("span",null,r))))});s$4.displayName="Spinner";
|
|
9175
9600
|
|
|
9176
|
-
const d$1=Root$
|
|
9601
|
+
const d$1=Root$8;
|
|
9177
9602
|
|
|
9178
9603
|
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"}}
|
|
9179
9604
|
|
|
@@ -48076,6 +48501,285 @@ const Row = ({ children, className, gap = "4" }) => {
|
|
|
48076
48501
|
return (React__default.createElement(o$6, { columns: "12", gap: gap, width: "auto", className: className }, children));
|
|
48077
48502
|
};
|
|
48078
48503
|
|
|
48504
|
+
const AccordionContext = createContext({ design: 'outline' });
|
|
48505
|
+
const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = false, width = 12, newRow, className, style, children }) => {
|
|
48506
|
+
const containerRef = useRef(null);
|
|
48507
|
+
const [neuVars, setNeuVars] = useState({});
|
|
48508
|
+
useEffect(() => {
|
|
48509
|
+
if (design === 'neumorphic' && containerRef.current) {
|
|
48510
|
+
const parentBg = getNearestParentBackground(containerRef.current.parentElement);
|
|
48511
|
+
setNeuVars({
|
|
48512
|
+
'--neu-bg': parentBg,
|
|
48513
|
+
'--neu-shadow-dark': adjustColor(parentBg, -20),
|
|
48514
|
+
'--neu-shadow-light': adjustColor(parentBg, 20),
|
|
48515
|
+
});
|
|
48516
|
+
}
|
|
48517
|
+
}, [design]);
|
|
48518
|
+
const sharedProps = {
|
|
48519
|
+
className: `v-accordion-root-${design}`,
|
|
48520
|
+
children
|
|
48521
|
+
};
|
|
48522
|
+
const accordionRoot = allowMultiple ? (React__default.createElement(Root2$4, Object.assign({ type: "multiple", defaultValue: defaultOpenId ? [defaultOpenId] : undefined }, sharedProps))) : (React__default.createElement(Root2$4, Object.assign({ type: "single", defaultValue: defaultOpenId || undefined, collapsible: true }, sharedProps)));
|
|
48523
|
+
return (React__default.createElement(AccordionContext.Provider, { value: { design } },
|
|
48524
|
+
React__default.createElement(Column, { span: width, newLine: newRow },
|
|
48525
|
+
React__default.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
|
|
48526
|
+
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
48527
|
+
@keyframes slideDown {
|
|
48528
|
+
from { height: 0; opacity: 0; }
|
|
48529
|
+
to { height: var(--radix-accordion-content-height); opacity: 1; }
|
|
48530
|
+
}
|
|
48531
|
+
@keyframes slideUp {
|
|
48532
|
+
from { height: var(--radix-accordion-content-height); opacity: 1; }
|
|
48533
|
+
to { height: 0; opacity: 0; }
|
|
48534
|
+
}
|
|
48535
|
+
|
|
48536
|
+
.v-accordion-content[data-state='open'] {
|
|
48537
|
+
animation: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
48538
|
+
}
|
|
48539
|
+
.v-accordion-content[data-state='closed'] {
|
|
48540
|
+
animation: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
48541
|
+
}
|
|
48542
|
+
|
|
48543
|
+
.v-accordion-trigger[data-state='open'] .v-accordion-chevron {
|
|
48544
|
+
transform: rotate(180deg);
|
|
48545
|
+
}
|
|
48546
|
+
.v-accordion-chevron {
|
|
48547
|
+
transition: transform 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
48548
|
+
color: var(--gray-10);
|
|
48549
|
+
}
|
|
48550
|
+
|
|
48551
|
+
.v-accordion-root-outline {
|
|
48552
|
+
border: 1px solid var(--gray-6);
|
|
48553
|
+
border-radius: var(--radius-3);
|
|
48554
|
+
background-color: transparent;
|
|
48555
|
+
}
|
|
48556
|
+
.v-accordion-item-outline {
|
|
48557
|
+
border-bottom: 1px solid var(--gray-6);
|
|
48558
|
+
}
|
|
48559
|
+
.v-accordion-item-outline:last-child {
|
|
48560
|
+
border-bottom: none;
|
|
48561
|
+
}
|
|
48562
|
+
|
|
48563
|
+
.v-accordion-root-material {
|
|
48564
|
+
border-radius: var(--radius-3);
|
|
48565
|
+
background-color: var(--color-surface);
|
|
48566
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
48567
|
+
}
|
|
48568
|
+
.v-accordion-item-material {
|
|
48569
|
+
border-bottom: 1px solid var(--gray-4);
|
|
48570
|
+
}
|
|
48571
|
+
.v-accordion-item-material:last-child {
|
|
48572
|
+
border-bottom: none;
|
|
48573
|
+
}
|
|
48574
|
+
.v-accordion-item-material[data-state='open'] {
|
|
48575
|
+
border-left: 3px solid var(--accent-9);
|
|
48576
|
+
}
|
|
48577
|
+
|
|
48578
|
+
.v-accordion-root-neumorphic {
|
|
48579
|
+
display: flex;
|
|
48580
|
+
flex-direction: column;
|
|
48581
|
+
gap: 16px; /* Neumorphic items look best separated */
|
|
48582
|
+
}
|
|
48583
|
+
.v-accordion-item-neumorphic {
|
|
48584
|
+
background-color: var(--neu-bg);
|
|
48585
|
+
border-radius: 12px;
|
|
48586
|
+
box-shadow: 6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light);
|
|
48587
|
+
transition: all 0.3s ease;
|
|
48588
|
+
}
|
|
48589
|
+
.v-accordion-item-neumorphic[data-state='open'] {
|
|
48590
|
+
/* Pressed-in effect when open */
|
|
48591
|
+
box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
|
|
48592
|
+
}
|
|
48593
|
+
|
|
48594
|
+
.v-accordion-trigger {
|
|
48595
|
+
all: unset;
|
|
48596
|
+
display: flex;
|
|
48597
|
+
align-items: center;
|
|
48598
|
+
justify-content: space-between;
|
|
48599
|
+
width: 100%;
|
|
48600
|
+
padding: 16px;
|
|
48601
|
+
cursor: pointer;
|
|
48602
|
+
font-family: var(--default-font-family);
|
|
48603
|
+
box-sizing: border-box;
|
|
48604
|
+
}
|
|
48605
|
+
.v-accordion-trigger:disabled {
|
|
48606
|
+
cursor: not-allowed;
|
|
48607
|
+
opacity: 0.5;
|
|
48608
|
+
}
|
|
48609
|
+
` } }),
|
|
48610
|
+
accordionRoot))));
|
|
48611
|
+
};
|
|
48612
|
+
const AccordionItem = ({ sectionId, title, children, disabled = false, icon }) => {
|
|
48613
|
+
const { design } = useContext(AccordionContext);
|
|
48614
|
+
return (React__default.createElement(Item$2, { value: sectionId, disabled: disabled, className: `v-accordion-item-${design}` },
|
|
48615
|
+
React__default.createElement(Header, { style: { margin: 0 } },
|
|
48616
|
+
React__default.createElement(Trigger2, { className: "v-accordion-trigger" },
|
|
48617
|
+
React__default.createElement(p$5, { align: "center", gap: "3" },
|
|
48618
|
+
icon && (React__default.createElement("div", { style: { display: 'flex', alignItems: 'center', color: 'var(--accent-9)' } }, icon)),
|
|
48619
|
+
React__default.createElement(p$d, { size: "3", weight: "bold", style: { color: 'var(--gray-12)' } }, title)),
|
|
48620
|
+
React__default.createElement(Icon, { name: "chevrondown", height: "20", width: "20", className: "v-accordion-chevron" }))),
|
|
48621
|
+
React__default.createElement(Content2$3, { className: "v-accordion-content", style: { overflow: 'hidden' } },
|
|
48622
|
+
React__default.createElement("div", { style: { padding: '0 16px 16px 16px' } },
|
|
48623
|
+
React__default.createElement(p$d, { size: "2", color: "gray", as: "div" }, children)))));
|
|
48624
|
+
};
|
|
48625
|
+
|
|
48626
|
+
const CodexContext = createContext({
|
|
48627
|
+
activeStepId: '',
|
|
48628
|
+
setActiveStepId: () => { },
|
|
48629
|
+
design: 'outline'
|
|
48630
|
+
});
|
|
48631
|
+
const useStepper = () => useContext(CodexContext);
|
|
48632
|
+
const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, className, style, children }) => {
|
|
48633
|
+
const containerRef = useRef(null);
|
|
48634
|
+
const [neuVars, setNeuVars] = useState({});
|
|
48635
|
+
const steps = React__default.Children.toArray(children)
|
|
48636
|
+
.filter((child) => React__default.isValidElement(child))
|
|
48637
|
+
.map((child) => ({
|
|
48638
|
+
id: child.props.stepId,
|
|
48639
|
+
title: child.props.title,
|
|
48640
|
+
description: child.props.subtitleDescription,
|
|
48641
|
+
icon: child.props.icon
|
|
48642
|
+
}));
|
|
48643
|
+
const [activeStepId, setActiveStepId] = useState('');
|
|
48644
|
+
useEffect(() => {
|
|
48645
|
+
if (steps.length > 0 && !activeStepId) {
|
|
48646
|
+
const initialId = defaultStepId && steps.some(s => s.id === defaultStepId)
|
|
48647
|
+
? defaultStepId
|
|
48648
|
+
: steps[0].id;
|
|
48649
|
+
setActiveStepId(initialId);
|
|
48650
|
+
}
|
|
48651
|
+
}, [defaultStepId, steps, activeStepId]);
|
|
48652
|
+
useEffect(() => {
|
|
48653
|
+
if (design === 'neumorphic' && containerRef.current) {
|
|
48654
|
+
const parentBg = getNearestParentBackground(containerRef.current.parentElement);
|
|
48655
|
+
setNeuVars({
|
|
48656
|
+
'--neu-bg': parentBg,
|
|
48657
|
+
'--neu-shadow-dark': adjustColor(parentBg, -20),
|
|
48658
|
+
'--neu-shadow-light': adjustColor(parentBg, 20),
|
|
48659
|
+
});
|
|
48660
|
+
}
|
|
48661
|
+
}, [design]);
|
|
48662
|
+
const activeIndex = steps.findIndex(s => s.id === activeStepId);
|
|
48663
|
+
return (React__default.createElement(CodexContext.Provider, { value: { activeStepId, setActiveStepId, design } },
|
|
48664
|
+
React__default.createElement(Column, { span: width, newLine: newRow },
|
|
48665
|
+
React__default.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
|
|
48666
|
+
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
48667
|
+
.v-step-circle {
|
|
48668
|
+
width: 40px;
|
|
48669
|
+
height: 40px;
|
|
48670
|
+
border-radius: 50%;
|
|
48671
|
+
display: flex;
|
|
48672
|
+
align-items: center;
|
|
48673
|
+
justify-content: center;
|
|
48674
|
+
font-weight: bold;
|
|
48675
|
+
transition: all 0.3s ease;
|
|
48676
|
+
z-index: 2;
|
|
48677
|
+
position: relative;
|
|
48678
|
+
cursor: pointer;
|
|
48679
|
+
}
|
|
48680
|
+
.v-step-line {
|
|
48681
|
+
flex: 1;
|
|
48682
|
+
height: 2px;
|
|
48683
|
+
transition: background-color 0.3s ease;
|
|
48684
|
+
}
|
|
48685
|
+
.v-step-content-animation {
|
|
48686
|
+
animation: fadeIn 0.4s ease-in-out;
|
|
48687
|
+
}
|
|
48688
|
+
@keyframes fadeIn {
|
|
48689
|
+
from { opacity: 0; transform: translateY(10px); }
|
|
48690
|
+
to { opacity: 1; transform: translateY(0); }
|
|
48691
|
+
}
|
|
48692
|
+
|
|
48693
|
+
.v-stepper-outline .v-step-circle.pending {
|
|
48694
|
+
border: 2px solid var(--gray-6);
|
|
48695
|
+
background: transparent;
|
|
48696
|
+
color: var(--gray-10);
|
|
48697
|
+
}
|
|
48698
|
+
.v-stepper-outline .v-step-circle.active {
|
|
48699
|
+
border: 2px solid var(--accent-9);
|
|
48700
|
+
background: var(--accent-2);
|
|
48701
|
+
color: var(--accent-9);
|
|
48702
|
+
}
|
|
48703
|
+
.v-stepper-outline .v-step-circle.completed {
|
|
48704
|
+
border: 2px solid var(--accent-9);
|
|
48705
|
+
background: var(--accent-9);
|
|
48706
|
+
color: white;
|
|
48707
|
+
}
|
|
48708
|
+
.v-stepper-outline .v-step-line.pending { background-color: var(--gray-5); }
|
|
48709
|
+
.v-stepper-outline .v-step-line.completed { background-color: var(--accent-9); }
|
|
48710
|
+
|
|
48711
|
+
.v-stepper-material .v-step-circle.pending {
|
|
48712
|
+
background: var(--color-surface);
|
|
48713
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
48714
|
+
color: var(--gray-10);
|
|
48715
|
+
}
|
|
48716
|
+
.v-stepper-material .v-step-circle.active {
|
|
48717
|
+
background: var(--accent-9);
|
|
48718
|
+
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
|
48719
|
+
color: white;
|
|
48720
|
+
transform: scale(1.1);
|
|
48721
|
+
}
|
|
48722
|
+
.v-stepper-material .v-step-circle.completed {
|
|
48723
|
+
background: var(--accent-9);
|
|
48724
|
+
color: white;
|
|
48725
|
+
}
|
|
48726
|
+
.v-stepper-material .v-step-line.pending { background-color: var(--gray-5); }
|
|
48727
|
+
.v-stepper-material .v-step-line.completed { background-color: var(--accent-9); }
|
|
48728
|
+
|
|
48729
|
+
.v-stepper-neumorphic .v-step-circle {
|
|
48730
|
+
background: var(--neu-bg);
|
|
48731
|
+
border: none;
|
|
48732
|
+
}
|
|
48733
|
+
.v-stepper-neumorphic .v-step-circle.pending {
|
|
48734
|
+
box-shadow: 4px 4px 8px var(--neu-shadow-dark), -4px -4px 8px var(--neu-shadow-light);
|
|
48735
|
+
color: var(--gray-10);
|
|
48736
|
+
}
|
|
48737
|
+
.v-stepper-neumorphic .v-step-circle.active {
|
|
48738
|
+
box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
|
|
48739
|
+
color: var(--accent-9);
|
|
48740
|
+
}
|
|
48741
|
+
.v-stepper-neumorphic .v-step-circle.completed {
|
|
48742
|
+
box-shadow: inset 2px 2px 4px var(--neu-shadow-dark), inset -2px -2px 4px var(--neu-shadow-light);
|
|
48743
|
+
color: var(--accent-9);
|
|
48744
|
+
}
|
|
48745
|
+
.v-stepper-neumorphic .v-step-line.pending {
|
|
48746
|
+
background-color: transparent;
|
|
48747
|
+
box-shadow: inset 1px 1px 2px var(--neu-shadow-dark), inset -1px -1px 2px var(--neu-shadow-light);
|
|
48748
|
+
}
|
|
48749
|
+
.v-stepper-neumorphic .v-step-line.completed {
|
|
48750
|
+
background-color: var(--accent-9);
|
|
48751
|
+
box-shadow: 0 0 4px var(--accent-9);
|
|
48752
|
+
}
|
|
48753
|
+
` } }),
|
|
48754
|
+
React__default.createElement(p$8, { className: `v-stepper-${design}`, style: { paddingBottom: '60px', paddingTop: '10px' } },
|
|
48755
|
+
React__default.createElement(p$5, { align: "center", width: "100%" }, steps.map((step, index) => {
|
|
48756
|
+
const isCompleted = index < activeIndex;
|
|
48757
|
+
const isActive = index === activeIndex;
|
|
48758
|
+
const statusClass = isActive ? 'active' : isCompleted ? 'completed' : 'pending';
|
|
48759
|
+
return (React__default.createElement(React__default.Fragment, { key: step.id },
|
|
48760
|
+
React__default.createElement(p$8, { style: { position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
48761
|
+
React__default.createElement("div", { className: `v-step-circle ${statusClass}`, onClick: () => setActiveStepId(step.id) }, isCompleted ? (React__default.createElement(Icon, { name: "check", width: "20", height: "20" })) : (step.icon ? step.icon : React__default.createElement("span", null, index + 1))),
|
|
48762
|
+
React__default.createElement(p$8, { style: {
|
|
48763
|
+
position: 'absolute',
|
|
48764
|
+
top: '100%',
|
|
48765
|
+
marginTop: '12px',
|
|
48766
|
+
width: '120px',
|
|
48767
|
+
textAlign: 'center',
|
|
48768
|
+
cursor: 'pointer'
|
|
48769
|
+
}, onClick: () => setActiveStepId(step.id) },
|
|
48770
|
+
React__default.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),
|
|
48771
|
+
step.description && (React__default.createElement(p$d, { size: "1", color: "gray", style: { display: 'block', marginTop: '4px' } }, step.description)))),
|
|
48772
|
+
index < steps.length - 1 && (React__default.createElement("div", { className: `v-step-line ${isCompleted ? 'completed' : 'pending'}` }))));
|
|
48773
|
+
}))),
|
|
48774
|
+
React__default.createElement(p$8, { style: { position: 'relative' } }, children)))));
|
|
48775
|
+
};
|
|
48776
|
+
const CodexItem = ({ stepId, children, }) => {
|
|
48777
|
+
const { activeStepId } = useContext(CodexContext);
|
|
48778
|
+
if (activeStepId !== stepId)
|
|
48779
|
+
return null;
|
|
48780
|
+
return (React__default.createElement("div", { className: "v-step-content-animation", style: { width: '100%' } }, children));
|
|
48781
|
+
};
|
|
48782
|
+
|
|
48079
48783
|
/** A special constant with type `never` */
|
|
48080
48784
|
function $constructor(name, initializer, params) {
|
|
48081
48785
|
function init(inst, def) {
|
|
@@ -52530,6 +53234,7 @@ const NestedQuerySchema = object({
|
|
|
52530
53234
|
inputAlias: string(),
|
|
52531
53235
|
inputLabel: string(),
|
|
52532
53236
|
inputPlaceholder: string(),
|
|
53237
|
+
defaultValue: any().optional(),
|
|
52533
53238
|
newRow: boolean(),
|
|
52534
53239
|
inputWidth: number(),
|
|
52535
53240
|
isRequired: boolean(),
|
|
@@ -52539,7 +53244,8 @@ const NestedQuerySchema = object({
|
|
|
52539
53244
|
queryResponse: any().nullable(),
|
|
52540
53245
|
inputOptions: array(InputOptionSchema).nullable().optional(),
|
|
52541
53246
|
toggledInput: any().nullable().optional(),
|
|
52542
|
-
toggleTrigger: any().nullable().optional()
|
|
53247
|
+
toggleTrigger: any().nullable().optional(),
|
|
53248
|
+
errorText: string().optional()
|
|
52543
53249
|
});
|
|
52544
53250
|
const QuerySchema = object({
|
|
52545
53251
|
queryId: number().or(uuid()),
|
|
@@ -52547,6 +53253,7 @@ const QuerySchema = object({
|
|
|
52547
53253
|
inputAlias: string(),
|
|
52548
53254
|
inputLabel: string(),
|
|
52549
53255
|
inputPlaceholder: string(),
|
|
53256
|
+
defaultValue: any().optional(),
|
|
52550
53257
|
minValue: number().optional(),
|
|
52551
53258
|
maxValue: number().optional(),
|
|
52552
53259
|
stepValue: number().or(float64()).optional(),
|
|
@@ -52559,7 +53266,8 @@ const QuerySchema = object({
|
|
|
52559
53266
|
queryResponse: any().nullable(),
|
|
52560
53267
|
inputOptions: array(InputOptionSchema).optional(),
|
|
52561
53268
|
toggledInput: NestedQuerySchema.nullable().optional(),
|
|
52562
|
-
toggleTrigger: any().nullable().optional()
|
|
53269
|
+
toggleTrigger: any().nullable().optional(),
|
|
53270
|
+
errorText: string().optional()
|
|
52563
53271
|
});
|
|
52564
53272
|
const SectionSchema = object({
|
|
52565
53273
|
sectionId: number(),
|
|
@@ -52587,4 +53295,4 @@ const parseUuidFormat = (input) => {
|
|
|
52587
53295
|
return numbers;
|
|
52588
53296
|
};
|
|
52589
53297
|
|
|
52590
|
-
export { AvatarInput, ButtonInput, CURRENCIES, CheckboxGroupInput, Column, ConditionalTrigger, Container, CreditCardInput, CurrencyInput, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File$1 as File, FileMultiple, FlagIcon, Icon, ImageOutput, Input$2 as Input, MultipleSelect, OptionSelect, PasswordInput, PhoneInput, RadioGroupInput, RangeSlider, Row, SectionTitle, SliderInput, StockInput, R as Theme, N as ThemePanel, Toggle, UUIDInput, parseUuidFormat, primeMatrix, vectorSigma, xFormSchema };
|
|
53298
|
+
export { Accordion, AccordionItem, AvatarInput, ButtonInput, CURRENCIES, CheckboxGroupInput, Codex, CodexItem, Column, ConditionalTrigger, Container, CreditCardInput, CurrencyInput, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File$1 as File, FileMultiple, FlagIcon, Icon, ImageOutput, Input$2 as Input, MultipleSelect, OptionSelect, PasswordInput, PhoneInput, RadioGroupInput, RangeSlider, Row, SectionTitle, SliderInput, StockInput, R as Theme, N as ThemePanel, Toggle, UUIDInput, parseUuidFormat, primeMatrix, useStepper, vectorSigma, xFormSchema };
|