elseware-ui 3.0.11 → 3.0.13
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 +289 -289
- package/dist/index.css +60 -28
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +89 -6
- package/dist/index.d.ts +89 -6
- package/dist/index.js +232 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +216 -119
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.d.mts +3 -3
- package/dist/index.native.d.ts +3 -3
- package/dist/index.native.js +246 -213
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +230 -197
- package/dist/index.native.mjs.map +1 -1
- package/dist/{resolveGlobalConfigs-BdBJw5_w.d.mts → resolveGlobalConfigs-TVdFbK-t.d.mts} +13 -1
- package/dist/{resolveGlobalConfigs-BdBJw5_w.d.ts → resolveGlobalConfigs-TVdFbK-t.d.ts} +13 -1
- package/package.json +173 -173
- package/tailwind.preset.js +116 -116
package/dist/index.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var React26 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var tailwindMerge = require('tailwind-merge');
|
|
6
|
-
var index_js
|
|
6
|
+
var index_js = require('react-icons/ai/index.js');
|
|
7
7
|
var formik = require('formik');
|
|
8
8
|
var index_js$2 = require('react-icons/fa/index.js');
|
|
9
9
|
var classNames69 = require('classnames');
|
|
10
10
|
var reactBeautifulDnd = require('react-beautiful-dnd');
|
|
11
11
|
var cloudinaryReact = require('cloudinary-react');
|
|
12
|
-
var index_js = require('react-icons/md/index.js');
|
|
12
|
+
var index_js$1 = require('react-icons/md/index.js');
|
|
13
13
|
var index_js$3 = require('react-icons/bs/index.js');
|
|
14
14
|
var framerMotion = require('framer-motion');
|
|
15
15
|
var recharts = require('recharts');
|
|
@@ -5596,6 +5596,11 @@ var isMatch = (itemPath, currentPath) => {
|
|
|
5596
5596
|
};
|
|
5597
5597
|
|
|
5598
5598
|
// src/utils/styles.ts
|
|
5599
|
+
function extractTextColorClasses(className) {
|
|
5600
|
+
return className.split(/\s+/).filter(
|
|
5601
|
+
(token) => token.startsWith("text-") || token.startsWith("dark:text-") || token.startsWith("disabled:text-")
|
|
5602
|
+
).join(" ");
|
|
5603
|
+
}
|
|
5599
5604
|
function resolveAppearanceStyles({
|
|
5600
5605
|
appearance = "solid",
|
|
5601
5606
|
variant = "default",
|
|
@@ -6249,14 +6254,6 @@ var toastShapeStyles = {
|
|
|
6249
6254
|
};
|
|
6250
6255
|
|
|
6251
6256
|
// src/components/data-entry/button/base/Button.styles.ts
|
|
6252
|
-
var buttonShapes = shapes;
|
|
6253
|
-
var buttonIconSizes = {
|
|
6254
|
-
xs: 14,
|
|
6255
|
-
sm: 16,
|
|
6256
|
-
md: 18,
|
|
6257
|
-
lg: 20,
|
|
6258
|
-
xl: 22
|
|
6259
|
-
};
|
|
6260
6257
|
function resolveButtonVariantStyles({
|
|
6261
6258
|
appearance,
|
|
6262
6259
|
variant
|
|
@@ -6270,108 +6267,171 @@ function resolveButtonVariantStyles({
|
|
|
6270
6267
|
});
|
|
6271
6268
|
}
|
|
6272
6269
|
|
|
6273
|
-
// src/components/data-entry/button/
|
|
6274
|
-
var
|
|
6275
|
-
xs:
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6270
|
+
// src/components/data-entry/button/base/Button.tokens.ts
|
|
6271
|
+
var buttonSizeTokens = {
|
|
6272
|
+
xs: {
|
|
6273
|
+
padding: "px-2 py-1",
|
|
6274
|
+
text: "text-xs",
|
|
6275
|
+
icon: 14,
|
|
6276
|
+
minHeight: "min-h-[30px]",
|
|
6277
|
+
leading: "leading-[14px]",
|
|
6278
|
+
slot: "h-[14px] w-[14px]"
|
|
6279
|
+
},
|
|
6280
|
+
sm: {
|
|
6281
|
+
padding: "px-3 py-1.5",
|
|
6282
|
+
text: "text-sm",
|
|
6283
|
+
icon: 16,
|
|
6284
|
+
minHeight: "min-h-9",
|
|
6285
|
+
leading: "leading-4",
|
|
6286
|
+
slot: "h-4 w-4"
|
|
6287
|
+
},
|
|
6288
|
+
md: {
|
|
6289
|
+
padding: "px-4 py-2",
|
|
6290
|
+
text: "text-base",
|
|
6291
|
+
icon: 18,
|
|
6292
|
+
minHeight: "min-h-11",
|
|
6293
|
+
leading: "leading-[18px]",
|
|
6294
|
+
slot: "h-[18px] w-[18px]"
|
|
6295
|
+
},
|
|
6296
|
+
lg: {
|
|
6297
|
+
padding: "px-5 py-3",
|
|
6298
|
+
text: "text-lg",
|
|
6299
|
+
icon: 20,
|
|
6300
|
+
minHeight: "min-h-[50px]",
|
|
6301
|
+
leading: "leading-5",
|
|
6302
|
+
slot: "h-5 w-5"
|
|
6303
|
+
},
|
|
6304
|
+
xl: {
|
|
6305
|
+
padding: "px-6 py-4",
|
|
6306
|
+
text: "text-xl",
|
|
6307
|
+
icon: 22,
|
|
6308
|
+
minHeight: "min-h-14",
|
|
6309
|
+
leading: "leading-[22px]",
|
|
6310
|
+
slot: "h-[22px] w-[22px]"
|
|
6311
|
+
}
|
|
6280
6312
|
};
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
loading = false,
|
|
6287
|
-
disabled = false,
|
|
6288
|
-
block = false,
|
|
6289
|
-
compact = false,
|
|
6290
|
-
glow = true,
|
|
6291
|
-
mode,
|
|
6292
|
-
contentClassName,
|
|
6293
|
-
labelClassName,
|
|
6294
|
-
variant,
|
|
6295
|
-
appearance,
|
|
6296
|
-
shape,
|
|
6297
|
-
size,
|
|
6298
|
-
accessibilityLabel,
|
|
6299
|
-
accessibilityRole,
|
|
6300
|
-
accessibilityState,
|
|
6301
|
-
testID,
|
|
6302
|
-
className,
|
|
6303
|
-
onMouseMove,
|
|
6304
|
-
onClick,
|
|
6305
|
-
onPress,
|
|
6306
|
-
...rest
|
|
6307
|
-
}) {
|
|
6308
|
-
const accessibility = accessibilityState;
|
|
6313
|
+
var buttonShapes = shapes;
|
|
6314
|
+
var buttonTextModeClassName = "border-transparent bg-transparent";
|
|
6315
|
+
|
|
6316
|
+
// src/components/data-entry/button/base/useButton.ts
|
|
6317
|
+
function useButton(props) {
|
|
6309
6318
|
const {
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6319
|
+
// Consumed by the shared model
|
|
6320
|
+
icon,
|
|
6321
|
+
text: text10,
|
|
6322
|
+
children: children3,
|
|
6323
|
+
loading = false,
|
|
6324
|
+
disabled = false,
|
|
6325
|
+
block = false,
|
|
6326
|
+
compact = false,
|
|
6316
6327
|
mode,
|
|
6317
6328
|
variant,
|
|
6318
6329
|
appearance,
|
|
6319
6330
|
shape,
|
|
6320
|
-
size
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6331
|
+
size,
|
|
6332
|
+
accessibilityState,
|
|
6333
|
+
onPress,
|
|
6334
|
+
// Owned by the platform views — pulled out here only so `rootRest` is a
|
|
6335
|
+
// clean pass-through (no library props leak onto the DOM / native root).
|
|
6336
|
+
type: _type,
|
|
6337
|
+
glow: _glow,
|
|
6338
|
+
className: _className,
|
|
6339
|
+
contentClassName: _contentClassName,
|
|
6340
|
+
labelClassName: _labelClassName,
|
|
6341
|
+
accessibilityLabel: _accessibilityLabel,
|
|
6342
|
+
accessibilityRole: _accessibilityRole,
|
|
6343
|
+
testID: _testID,
|
|
6344
|
+
onClick: _onClick,
|
|
6345
|
+
onMouseMove: _onMouseMove,
|
|
6346
|
+
...rootRest
|
|
6347
|
+
} = props;
|
|
6348
|
+
const { shape: resolvedShape, size: resolvedSize, variant: resolvedVariant, appearance: resolvedAppearance } = useResolvedButtonConfig({ compact, mode, variant, appearance, shape, size });
|
|
6349
|
+
const tokens = buttonSizeTokens[resolvedSize];
|
|
6350
|
+
const variantClassName = resolveButtonVariantStyles({
|
|
6324
6351
|
appearance: resolvedAppearance,
|
|
6325
6352
|
variant: resolvedVariant
|
|
6326
6353
|
});
|
|
6327
|
-
const
|
|
6328
|
-
const
|
|
6329
|
-
const
|
|
6330
|
-
|
|
6331
|
-
size:
|
|
6332
|
-
|
|
6354
|
+
const label = text10 ?? children3;
|
|
6355
|
+
const resolvedIcon = typeof icon === "function" ? icon({ color: "currentColor", size: tokens.icon }) : icon;
|
|
6356
|
+
const isBusy = disabled || loading;
|
|
6357
|
+
return {
|
|
6358
|
+
size: resolvedSize,
|
|
6359
|
+
shape: resolvedShape,
|
|
6360
|
+
tokens,
|
|
6361
|
+
isBusy,
|
|
6362
|
+
isInteractive: !isBusy,
|
|
6363
|
+
isTextMode: mode === "text",
|
|
6364
|
+
block,
|
|
6365
|
+
loading,
|
|
6366
|
+
iconSize: tokens.icon,
|
|
6367
|
+
icon: resolvedIcon,
|
|
6368
|
+
label,
|
|
6369
|
+
hasTextLabel: typeof label === "string" || typeof label === "number",
|
|
6370
|
+
variantClassName,
|
|
6371
|
+
shapeClassName: buttonShapes[resolvedShape],
|
|
6372
|
+
labelColorClassName: extractTextColorClasses(variantClassName),
|
|
6373
|
+
selected: accessibilityState?.selected,
|
|
6374
|
+
onPress,
|
|
6375
|
+
rootRest
|
|
6376
|
+
};
|
|
6377
|
+
}
|
|
6378
|
+
var WEB_ROOT = "relative overflow-hidden group inline-flex items-center justify-center gap-2 transition-all duration-300";
|
|
6379
|
+
var Button = React26.forwardRef(function Button2(props, ref) {
|
|
6380
|
+
const {
|
|
6381
|
+
type: type2 = "button",
|
|
6382
|
+
glow = true,
|
|
6383
|
+
className,
|
|
6384
|
+
contentClassName,
|
|
6385
|
+
labelClassName,
|
|
6386
|
+
accessibilityLabel,
|
|
6387
|
+
accessibilityRole,
|
|
6388
|
+
testID,
|
|
6389
|
+
onClick,
|
|
6390
|
+
onMouseMove
|
|
6391
|
+
} = props;
|
|
6392
|
+
const model = useButton(props);
|
|
6393
|
+
const localRef = React26.useRef(null);
|
|
6394
|
+
const setRef = (node2) => {
|
|
6395
|
+
localRef.current = node2;
|
|
6396
|
+
if (typeof ref === "function") ref(node2);
|
|
6397
|
+
else if (ref) ref.current = node2;
|
|
6398
|
+
};
|
|
6333
6399
|
const handleMouseMove = (e) => {
|
|
6334
|
-
const btn =
|
|
6335
|
-
if (
|
|
6336
|
-
|
|
6337
|
-
|
|
6400
|
+
const btn = localRef.current;
|
|
6401
|
+
if (btn && glow) {
|
|
6402
|
+
const rect = btn.getBoundingClientRect();
|
|
6403
|
+
btn.style.setProperty("--glow-x", `${e.clientX - rect.left}px`);
|
|
6404
|
+
btn.style.setProperty("--glow-y", `${e.clientY - rect.top}px`);
|
|
6338
6405
|
}
|
|
6339
|
-
const rect = btn.getBoundingClientRect();
|
|
6340
|
-
const x3 = e.clientX - rect.left;
|
|
6341
|
-
const y3 = e.clientY - rect.top;
|
|
6342
|
-
btn.style.setProperty("--glow-x", `${x3}px`);
|
|
6343
|
-
btn.style.setProperty("--glow-y", `${y3}px`);
|
|
6344
6406
|
onMouseMove?.(e);
|
|
6345
6407
|
};
|
|
6346
6408
|
const handleClick = (e) => {
|
|
6347
6409
|
onClick?.(e);
|
|
6348
|
-
if (!e.defaultPrevented)
|
|
6349
|
-
onPress?.();
|
|
6350
|
-
}
|
|
6410
|
+
if (!e.defaultPrevented) model.onPress?.();
|
|
6351
6411
|
};
|
|
6352
6412
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6353
6413
|
"button",
|
|
6354
6414
|
{
|
|
6355
|
-
...
|
|
6356
|
-
ref:
|
|
6415
|
+
...model.rootRest,
|
|
6416
|
+
ref: setRef,
|
|
6357
6417
|
type: type2,
|
|
6358
|
-
disabled:
|
|
6418
|
+
disabled: model.isBusy,
|
|
6359
6419
|
onClick: handleClick,
|
|
6360
6420
|
onMouseMove: handleMouseMove,
|
|
6361
|
-
"aria-disabled":
|
|
6421
|
+
"aria-disabled": model.isBusy,
|
|
6362
6422
|
"aria-label": accessibilityLabel,
|
|
6363
|
-
"aria-pressed":
|
|
6423
|
+
"aria-pressed": model.selected,
|
|
6364
6424
|
"data-testid": testID,
|
|
6365
6425
|
role: accessibilityRole,
|
|
6366
6426
|
className: cn(
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6427
|
+
WEB_ROOT,
|
|
6428
|
+
model.variantClassName,
|
|
6429
|
+
model.shapeClassName,
|
|
6430
|
+
model.tokens.padding,
|
|
6431
|
+
model.tokens.text,
|
|
6432
|
+
model.block && "w-full",
|
|
6433
|
+
model.isTextMode && buttonTextModeClassName,
|
|
6434
|
+
model.isBusy ? "brightness-75 grayscale cursor-not-allowed" : "hover:cursor-pointer",
|
|
6375
6435
|
className
|
|
6376
6436
|
),
|
|
6377
6437
|
children: [
|
|
@@ -6380,49 +6440,37 @@ function Button({
|
|
|
6380
6440
|
{
|
|
6381
6441
|
className: "pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",
|
|
6382
6442
|
style: {
|
|
6383
|
-
background:
|
|
6384
|
-
radial-gradient(
|
|
6385
|
-
200px circle at var(--glow-x) var(--glow-y),
|
|
6386
|
-
rgba(255,255,255,0.18),
|
|
6387
|
-
transparent 50%
|
|
6388
|
-
)
|
|
6389
|
-
`
|
|
6443
|
+
background: "radial-gradient(200px circle at var(--glow-x) var(--glow-y), rgba(255,255,255,0.18), transparent 50%)"
|
|
6390
6444
|
}
|
|
6391
6445
|
}
|
|
6392
6446
|
),
|
|
6393
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx(index_js
|
|
6394
|
-
|
|
6447
|
+
model.loading && /* @__PURE__ */ jsxRuntime.jsx(index_js.AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
6448
|
+
model.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6395
6449
|
"span",
|
|
6396
6450
|
{
|
|
6397
6451
|
className: cn(
|
|
6398
6452
|
"z-10 inline-flex shrink-0 items-center justify-center leading-none",
|
|
6399
6453
|
contentClassName
|
|
6400
6454
|
),
|
|
6401
|
-
style: {
|
|
6402
|
-
|
|
6403
|
-
lineHeight: 0,
|
|
6404
|
-
width: iconSize
|
|
6405
|
-
},
|
|
6406
|
-
children: resolvedIcon
|
|
6455
|
+
style: { height: model.iconSize, width: model.iconSize, lineHeight: 0 },
|
|
6456
|
+
children: model.icon
|
|
6407
6457
|
}
|
|
6408
6458
|
),
|
|
6409
|
-
|
|
6459
|
+
model.label != null && model.label !== "" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6410
6460
|
"span",
|
|
6411
6461
|
{
|
|
6412
6462
|
className: cn(
|
|
6413
6463
|
"z-10 inline-flex items-center justify-center leading-none",
|
|
6414
6464
|
labelClassName
|
|
6415
6465
|
),
|
|
6416
|
-
style: {
|
|
6417
|
-
|
|
6418
|
-
},
|
|
6419
|
-
children: labelContent
|
|
6466
|
+
style: { minHeight: model.iconSize },
|
|
6467
|
+
children: model.label
|
|
6420
6468
|
}
|
|
6421
6469
|
)
|
|
6422
6470
|
]
|
|
6423
6471
|
}
|
|
6424
6472
|
);
|
|
6425
|
-
}
|
|
6473
|
+
});
|
|
6426
6474
|
var Button_web_default = Button;
|
|
6427
6475
|
|
|
6428
6476
|
// src/data/styles/shared.styles.tsx
|
|
@@ -8640,7 +8688,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8640
8688
|
}),
|
|
8641
8689
|
htmlFor: `${field.name}`,
|
|
8642
8690
|
children: [
|
|
8643
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl text-gray-300 group-hover:text-gray-400", children: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdUpload, {}) }),
|
|
8691
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl text-gray-300 group-hover:text-gray-400", children: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdUpload, {}) }),
|
|
8644
8692
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xl font-bold text-gray-500 group-hover:text-gray-500", children: title })
|
|
8645
8693
|
]
|
|
8646
8694
|
}
|
|
@@ -8656,7 +8704,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8656
8704
|
) }),
|
|
8657
8705
|
loading && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute", children: [
|
|
8658
8706
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[200px] w-[300px] bg-black opacity-50" }),
|
|
8659
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(index_js
|
|
8707
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(index_js.AiOutlineLoading, { className: "animate-spin" }) })
|
|
8660
8708
|
] }),
|
|
8661
8709
|
!loading && url && /* @__PURE__ */ jsxRuntime.jsx(ImageView, { imageUrl: url, alt: url ? url : "image" }),
|
|
8662
8710
|
(preview || url) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 text-3xl", children: [
|
|
@@ -8666,7 +8714,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8666
8714
|
className: " text-green-600 hover:cursor-pointer",
|
|
8667
8715
|
onClick: uploadImage,
|
|
8668
8716
|
hidden: url ? true : false,
|
|
8669
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdOutlineDone, {})
|
|
8717
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdOutlineDone, {})
|
|
8670
8718
|
}
|
|
8671
8719
|
),
|
|
8672
8720
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8674,7 +8722,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8674
8722
|
{
|
|
8675
8723
|
className: "text-red-500 hover:cursor-pointer",
|
|
8676
8724
|
onClick: handleResetClick,
|
|
8677
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdOutlineRemoveCircleOutline, {})
|
|
8725
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdOutlineRemoveCircleOutline, {})
|
|
8678
8726
|
}
|
|
8679
8727
|
)
|
|
8680
8728
|
] })
|
|
@@ -8830,7 +8878,7 @@ function MultiImageInput({
|
|
|
8830
8878
|
children: [
|
|
8831
8879
|
/* @__PURE__ */ jsxRuntime.jsx(ImageView, { imageUrl: url }),
|
|
8832
8880
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute left-2 top-2 inline-flex items-center gap-1 rounded bg-black/60 px-2 py-1 text-xs text-white", children: [
|
|
8833
|
-
/* @__PURE__ */ jsxRuntime.jsx(index_js.MdDragIndicator, {}),
|
|
8881
|
+
/* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdDragIndicator, {}),
|
|
8834
8882
|
index3 + 1
|
|
8835
8883
|
] }),
|
|
8836
8884
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-2 top-2 flex gap-1", children: [
|
|
@@ -8841,7 +8889,7 @@ function MultiImageInput({
|
|
|
8841
8889
|
accessibilityLabel: "Move image left",
|
|
8842
8890
|
disabled: index3 === 0 || isOrganizerBusy,
|
|
8843
8891
|
glow: false,
|
|
8844
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdKeyboardArrowLeft, {}),
|
|
8892
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdKeyboardArrowLeft, {}),
|
|
8845
8893
|
onPress: () => moveImage(index3, index3 - 1),
|
|
8846
8894
|
size: "xs",
|
|
8847
8895
|
className: "h-8 w-8 bg-black/60 p-0 text-xl text-white hover:bg-black/80 disabled:opacity-40"
|
|
@@ -8854,7 +8902,7 @@ function MultiImageInput({
|
|
|
8854
8902
|
accessibilityLabel: "Move image right",
|
|
8855
8903
|
disabled: index3 === imageUrls.length - 1 || isOrganizerBusy,
|
|
8856
8904
|
glow: false,
|
|
8857
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdKeyboardArrowRight, {}),
|
|
8905
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdKeyboardArrowRight, {}),
|
|
8858
8906
|
onPress: () => moveImage(index3, index3 + 1),
|
|
8859
8907
|
size: "xs",
|
|
8860
8908
|
className: "h-8 w-8 bg-black/60 p-0 text-xl text-white hover:bg-black/80 disabled:opacity-40"
|
|
@@ -8884,7 +8932,7 @@ function MultiImageInput({
|
|
|
8884
8932
|
accessibilityLabel: "Change image",
|
|
8885
8933
|
disabled: isOrganizerBusy,
|
|
8886
8934
|
glow: false,
|
|
8887
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdUpload, {}),
|
|
8935
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdUpload, {}),
|
|
8888
8936
|
onPress: () => openReplacePicker(index3),
|
|
8889
8937
|
size: "sm",
|
|
8890
8938
|
text: "Change",
|
|
@@ -8899,14 +8947,14 @@ function MultiImageInput({
|
|
|
8899
8947
|
accessibilityLabel: "Delete image",
|
|
8900
8948
|
disabled: isOrganizerBusy,
|
|
8901
8949
|
glow: false,
|
|
8902
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdOutlineDelete, {}),
|
|
8950
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.MdOutlineDelete, {}),
|
|
8903
8951
|
onPress: () => removeImage(index3),
|
|
8904
8952
|
size: "sm",
|
|
8905
8953
|
variant: "danger"
|
|
8906
8954
|
}
|
|
8907
8955
|
)
|
|
8908
8956
|
] }),
|
|
8909
|
-
isReplacing && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 text-2xl text-white", children: /* @__PURE__ */ jsxRuntime.jsx(index_js
|
|
8957
|
+
isReplacing && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 text-2xl text-white", children: /* @__PURE__ */ jsxRuntime.jsx(index_js.AiOutlineLoading, { className: "animate-spin" }) })
|
|
8910
8958
|
]
|
|
8911
8959
|
},
|
|
8912
8960
|
`${url}-${index3}`
|
|
@@ -31450,7 +31498,7 @@ var GlowWrapper = ({
|
|
|
31450
31498
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31451
31499
|
"span",
|
|
31452
31500
|
{
|
|
31453
|
-
className: "\n pointer-events-none absolute inset-0 opacity-0 \n group-hover:opacity-100 transition-opacity duration-300\n ",
|
|
31501
|
+
className: "\r\n pointer-events-none absolute inset-0 opacity-0 \r\n group-hover:opacity-100 transition-opacity duration-300\r\n ",
|
|
31454
31502
|
style: { background: "var(--glow-bg)" }
|
|
31455
31503
|
}
|
|
31456
31504
|
),
|
|
@@ -32802,7 +32850,16 @@ function Sidebar({
|
|
|
32802
32850
|
) }) });
|
|
32803
32851
|
}
|
|
32804
32852
|
var Sidebar_default = Sidebar;
|
|
32853
|
+
var TNThemeContext = React26.createContext({
|
|
32854
|
+
components: {},
|
|
32855
|
+
classNames: {}
|
|
32856
|
+
});
|
|
32857
|
+
var TNThemeProvider = TNThemeContext.Provider;
|
|
32858
|
+
var useTNTheme = () => React26.useContext(TNThemeContext);
|
|
32859
|
+
var useTNSlot = (slot) => React26.useContext(TNThemeContext).classNames?.[slot];
|
|
32805
32860
|
var TNContext = ({ icon, name: name2, badge }) => {
|
|
32861
|
+
const iconSlot = useTNSlot("icon");
|
|
32862
|
+
const labelSlot = useTNSlot("label");
|
|
32806
32863
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32807
32864
|
icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32808
32865
|
"div",
|
|
@@ -32810,7 +32867,8 @@ var TNContext = ({ icon, name: name2, badge }) => {
|
|
|
32810
32867
|
className: cn(
|
|
32811
32868
|
"text-base text-gray-500 dark:text-gray-400",
|
|
32812
32869
|
"transition-colors duration-200",
|
|
32813
|
-
"group-hover:text-eui-secondary-700"
|
|
32870
|
+
"group-hover:text-eui-secondary-700",
|
|
32871
|
+
iconSlot
|
|
32814
32872
|
),
|
|
32815
32873
|
children: icon
|
|
32816
32874
|
}
|
|
@@ -32821,7 +32879,8 @@ var TNContext = ({ icon, name: name2, badge }) => {
|
|
|
32821
32879
|
className: cn(
|
|
32822
32880
|
"flex-1",
|
|
32823
32881
|
"transition-colors duration-200",
|
|
32824
|
-
"group-hover:text-eui-secondary-700"
|
|
32882
|
+
"group-hover:text-eui-secondary-700",
|
|
32883
|
+
labelSlot
|
|
32825
32884
|
),
|
|
32826
32885
|
children: name2
|
|
32827
32886
|
}
|
|
@@ -32838,6 +32897,8 @@ var TNItem = ({
|
|
|
32838
32897
|
className,
|
|
32839
32898
|
...rest
|
|
32840
32899
|
}) => {
|
|
32900
|
+
const itemSlot = useTNSlot("item");
|
|
32901
|
+
const selectedSlot = useTNSlot("itemSelected");
|
|
32841
32902
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32842
32903
|
"button",
|
|
32843
32904
|
{
|
|
@@ -32849,7 +32910,9 @@ var TNItem = ({
|
|
|
32849
32910
|
"transition-all duration-200",
|
|
32850
32911
|
"text-gray-400",
|
|
32851
32912
|
"hover:bg-gray-300/10",
|
|
32913
|
+
itemSlot,
|
|
32852
32914
|
selected && "bg-gray-300/10",
|
|
32915
|
+
selected && selectedSlot,
|
|
32853
32916
|
className
|
|
32854
32917
|
),
|
|
32855
32918
|
children: /* @__PURE__ */ jsxRuntime.jsx(TNContext, { icon, name: name2, badge })
|
|
@@ -32865,6 +32928,7 @@ var TNDropdownItem = ({
|
|
|
32865
32928
|
onClick,
|
|
32866
32929
|
className
|
|
32867
32930
|
}) => {
|
|
32931
|
+
const dropdownItemSlot = useTNSlot("dropdownItem");
|
|
32868
32932
|
const handle2 = (e) => {
|
|
32869
32933
|
if (to) {
|
|
32870
32934
|
navigate ? navigate(to) : window.location.href = to;
|
|
@@ -32883,6 +32947,7 @@ var TNDropdownItem = ({
|
|
|
32883
32947
|
"hover:bg-gray-100 dark:hover:bg-gray-700/50",
|
|
32884
32948
|
"hover:text-gray-900 dark:hover:text-gray-300",
|
|
32885
32949
|
"transition-colors duration-200",
|
|
32950
|
+
dropdownItemSlot,
|
|
32886
32951
|
className
|
|
32887
32952
|
),
|
|
32888
32953
|
children: /* @__PURE__ */ jsxRuntime.jsx(TNContext, { icon, name: name2, badge })
|
|
@@ -32890,12 +32955,14 @@ var TNDropdownItem = ({
|
|
|
32890
32955
|
);
|
|
32891
32956
|
};
|
|
32892
32957
|
var TNDropdownTitle = ({ name: name2, className }) => {
|
|
32958
|
+
const dropdownTitleSlot = useTNSlot("dropdownTitle");
|
|
32893
32959
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32894
32960
|
"div",
|
|
32895
32961
|
{
|
|
32896
32962
|
className: cn(
|
|
32897
32963
|
"px-3 py-4 text-xs font-semibold uppercase tracking-wide",
|
|
32898
32964
|
"text-gray-500 dark:text-gray-600",
|
|
32965
|
+
dropdownTitleSlot,
|
|
32899
32966
|
className
|
|
32900
32967
|
),
|
|
32901
32968
|
children: name2
|
|
@@ -32908,9 +32975,14 @@ var TNDropdownGroup = ({
|
|
|
32908
32975
|
badge,
|
|
32909
32976
|
items,
|
|
32910
32977
|
navigate,
|
|
32978
|
+
components,
|
|
32911
32979
|
className
|
|
32912
32980
|
}) => {
|
|
32913
32981
|
const [open, setOpen] = React26.useState(true);
|
|
32982
|
+
const dropdownGroupSlot = useTNSlot("dropdownGroup");
|
|
32983
|
+
const Item = components?.dropdownItem || TNDropdownItem;
|
|
32984
|
+
const Group = components?.dropdownGroup || TNDropdownGroup;
|
|
32985
|
+
const Title = components?.dropdownTitle || TNDropdownTitle;
|
|
32914
32986
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
32915
32987
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32916
32988
|
"div",
|
|
@@ -32925,6 +32997,7 @@ var TNDropdownGroup = ({
|
|
|
32925
32997
|
"dark:from-green-900/30 dark:to-transparent",
|
|
32926
32998
|
"hover:from-gray-200 dark:hover:from-green-900/50",
|
|
32927
32999
|
"transition-all duration-200",
|
|
33000
|
+
dropdownGroupSlot,
|
|
32928
33001
|
className
|
|
32929
33002
|
),
|
|
32930
33003
|
children: [
|
|
@@ -32943,12 +33016,20 @@ var TNDropdownGroup = ({
|
|
|
32943
33016
|
),
|
|
32944
33017
|
open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 border-l border-gray-200 dark:border-gray-700 pl-1", children: items.map((item, i) => {
|
|
32945
33018
|
if (item.type === "title") {
|
|
32946
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33019
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Title, { ...item }, i);
|
|
32947
33020
|
}
|
|
32948
33021
|
if (item.type === "group") {
|
|
32949
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33022
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33023
|
+
Group,
|
|
33024
|
+
{
|
|
33025
|
+
...item,
|
|
33026
|
+
navigate,
|
|
33027
|
+
components
|
|
33028
|
+
},
|
|
33029
|
+
i
|
|
33030
|
+
);
|
|
32950
33031
|
}
|
|
32951
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33032
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Item, { ...item, navigate }, i);
|
|
32952
33033
|
}) })
|
|
32953
33034
|
] });
|
|
32954
33035
|
};
|
|
@@ -32960,6 +33041,7 @@ var TNDropdown = ({
|
|
|
32960
33041
|
const Item = components?.dropdownItem || TNDropdownItem;
|
|
32961
33042
|
const Group = components?.dropdownGroup || TNDropdownGroup;
|
|
32962
33043
|
const Title = components?.dropdownTitle || TNDropdownTitle;
|
|
33044
|
+
const dropdownSlot = useTNSlot("dropdown");
|
|
32963
33045
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32964
33046
|
"div",
|
|
32965
33047
|
{
|
|
@@ -32971,7 +33053,8 @@ var TNDropdown = ({
|
|
|
32971
33053
|
"min-w-[260px]",
|
|
32972
33054
|
"w-max",
|
|
32973
33055
|
"max-w-[90vw]",
|
|
32974
|
-
"overflow-auto"
|
|
33056
|
+
"overflow-auto",
|
|
33057
|
+
dropdownSlot
|
|
32975
33058
|
),
|
|
32976
33059
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-0", children: items.map((item, i) => {
|
|
32977
33060
|
if (item.type === "title") return /* @__PURE__ */ jsxRuntime.jsx(Title, { ...item }, i);
|
|
@@ -32997,10 +33080,12 @@ var TNGroup = ({
|
|
|
32997
33080
|
navigate,
|
|
32998
33081
|
columns,
|
|
32999
33082
|
components,
|
|
33000
|
-
selected
|
|
33083
|
+
selected,
|
|
33084
|
+
className
|
|
33001
33085
|
}) => {
|
|
33002
33086
|
const [open, setOpen] = React26.useState(false);
|
|
33003
33087
|
const timeoutRef = React26.useRef(null);
|
|
33088
|
+
const groupSlot = useTNSlot("group");
|
|
33004
33089
|
const handleEnter = () => {
|
|
33005
33090
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
33006
33091
|
setOpen(true);
|
|
@@ -33010,15 +33095,16 @@ var TNGroup = ({
|
|
|
33010
33095
|
setOpen(false);
|
|
33011
33096
|
}, 150);
|
|
33012
33097
|
};
|
|
33098
|
+
const Trigger = components?.item || TNItem;
|
|
33013
33099
|
const Dropdown = components?.dropdown || TNDropdown;
|
|
33014
33100
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33015
33101
|
"div",
|
|
33016
33102
|
{
|
|
33017
|
-
className: "relative flex items-center",
|
|
33103
|
+
className: cn("relative flex items-center", groupSlot, className),
|
|
33018
33104
|
onMouseEnter: handleEnter,
|
|
33019
33105
|
onMouseLeave: handleLeave,
|
|
33020
33106
|
children: [
|
|
33021
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33107
|
+
/* @__PURE__ */ jsxRuntime.jsx(Trigger, { icon, name: name2, selected: selected || open }),
|
|
33022
33108
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-full left-0 -mt-[1px]", children: open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33023
33109
|
Dropdown,
|
|
33024
33110
|
{
|
|
@@ -33045,7 +33131,9 @@ var TopNav = ({
|
|
|
33045
33131
|
items = [],
|
|
33046
33132
|
currentPath,
|
|
33047
33133
|
navigate,
|
|
33048
|
-
components
|
|
33134
|
+
components,
|
|
33135
|
+
classNames: classNames73,
|
|
33136
|
+
className
|
|
33049
33137
|
}) => {
|
|
33050
33138
|
const pathname = currentPath ?? (typeof window !== "undefined" ? window.location.pathname : "");
|
|
33051
33139
|
const resolved = {
|
|
@@ -33065,7 +33153,9 @@ var TopNav = ({
|
|
|
33065
33153
|
{
|
|
33066
33154
|
icon: node2.icon,
|
|
33067
33155
|
name: node2.name,
|
|
33156
|
+
badge: node2.badge,
|
|
33068
33157
|
selected,
|
|
33158
|
+
className: node2.className,
|
|
33069
33159
|
onClick: () => handleNavigate(node2.to)
|
|
33070
33160
|
},
|
|
33071
33161
|
node2.key || index3
|
|
@@ -33083,6 +33173,7 @@ var TopNav = ({
|
|
|
33083
33173
|
navigate,
|
|
33084
33174
|
columns: node2.columns,
|
|
33085
33175
|
components,
|
|
33176
|
+
className: node2.className,
|
|
33086
33177
|
selected
|
|
33087
33178
|
},
|
|
33088
33179
|
node2.key || index3
|
|
@@ -33090,7 +33181,13 @@ var TopNav = ({
|
|
|
33090
33181
|
}
|
|
33091
33182
|
return null;
|
|
33092
33183
|
};
|
|
33093
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33184
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33185
|
+
TNThemeProvider,
|
|
33186
|
+
{
|
|
33187
|
+
value: { components: components || {}, classNames: classNames73 || {} },
|
|
33188
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center", classNames73?.root, className), children: items.map(renderNode) })
|
|
33189
|
+
}
|
|
33190
|
+
);
|
|
33094
33191
|
};
|
|
33095
33192
|
function ReviewForm({
|
|
33096
33193
|
initialValues,
|
|
@@ -59338,10 +59435,13 @@ exports.StarRatingInput = StarRatingInput_default;
|
|
|
59338
59435
|
exports.StatPlot = StatPlot;
|
|
59339
59436
|
exports.StaticChartDataSource = StaticChartDataSource;
|
|
59340
59437
|
exports.Switch = Switch_default;
|
|
59438
|
+
exports.TNContext = TNContext;
|
|
59341
59439
|
exports.TNDropdown = TNDropdown;
|
|
59440
|
+
exports.TNDropdownGroup = TNDropdownGroup;
|
|
59342
59441
|
exports.TNDropdownItem = TNDropdownItem;
|
|
59343
59442
|
exports.TNDropdownTitle = TNDropdownTitle;
|
|
59344
59443
|
exports.TNGroup = TNGroup;
|
|
59444
|
+
exports.TNItem = TNItem;
|
|
59345
59445
|
exports.Table = Table;
|
|
59346
59446
|
exports.TableBody = TableBody;
|
|
59347
59447
|
exports.TableCell = TableCell;
|
|
@@ -59409,6 +59509,7 @@ exports.ensureAnonymousIdStorage = ensureAnonymousIdStorage;
|
|
|
59409
59509
|
exports.enumValues = enumValues;
|
|
59410
59510
|
exports.euiToast = euiToast;
|
|
59411
59511
|
exports.extractHeadings = extractHeadings;
|
|
59512
|
+
exports.extractTextColorClasses = extractTextColorClasses;
|
|
59412
59513
|
exports.findReview = findReview;
|
|
59413
59514
|
exports.formatChartLabel = formatChartLabel;
|
|
59414
59515
|
exports.formatChartValue = formatChartValue;
|
|
@@ -59501,6 +59602,8 @@ exports.usePageTracking = usePageTracking;
|
|
|
59501
59602
|
exports.useResolvedChartState = useResolvedChartState;
|
|
59502
59603
|
exports.useReviewThreadState = useReviewThreadState;
|
|
59503
59604
|
exports.useSessionTracking = useSessionTracking;
|
|
59605
|
+
exports.useTNSlot = useTNSlot;
|
|
59606
|
+
exports.useTNTheme = useTNTheme;
|
|
59504
59607
|
exports.useTheme = useTheme_default;
|
|
59505
59608
|
exports.writeAnalyticsQueueStorage = writeAnalyticsQueueStorage;
|
|
59506
59609
|
exports.writeConsentStorage = writeConsentStorage;
|