elseware-ui 2.40.3 → 3.0.0
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/LICENSE +20 -20
- package/dist/index.css +124 -24
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +82 -251
- package/dist/index.d.ts +82 -251
- package/dist/index.js +630 -430
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +320 -123
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.d.mts +7 -0
- package/dist/index.native.d.ts +7 -0
- package/dist/index.native.js +351 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.native.mjs +346 -0
- package/dist/index.native.mjs.map +1 -0
- package/dist/resolveGlobalConfigs-CcaOIQCE.d.mts +228 -0
- package/dist/resolveGlobalConfigs-CcaOIQCE.d.ts +228 -0
- package/package.json +32 -4
- package/tailwind.preset.js +116 -0
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React26, { createContext, forwardRef, useState, useImperativeHandle, useEffect, useRef, useMemo, useCallback, useContext, Children, useId, createElement, isValidElement } from 'react';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import { AiOutlineLoading } from 'react-icons/ai/index.js';
|
|
@@ -4718,7 +4718,7 @@ var init_python = __esm({
|
|
|
4718
4718
|
});
|
|
4719
4719
|
|
|
4720
4720
|
// node_modules/refractor/lang/jsx.js
|
|
4721
|
-
function
|
|
4721
|
+
function jsx218(Prism2) {
|
|
4722
4722
|
Prism2.register(javascript);
|
|
4723
4723
|
Prism2.register(markup);
|
|
4724
4724
|
(function(Prism3) {
|
|
@@ -4851,14 +4851,14 @@ var init_jsx = __esm({
|
|
|
4851
4851
|
"node_modules/refractor/lang/jsx.js"() {
|
|
4852
4852
|
init_javascript();
|
|
4853
4853
|
init_markup();
|
|
4854
|
-
|
|
4855
|
-
|
|
4854
|
+
jsx218.displayName = "jsx";
|
|
4855
|
+
jsx218.aliases = [];
|
|
4856
4856
|
}
|
|
4857
4857
|
});
|
|
4858
4858
|
|
|
4859
4859
|
// node_modules/refractor/lang/tsx.js
|
|
4860
4860
|
function tsx(Prism2) {
|
|
4861
|
-
Prism2.register(
|
|
4861
|
+
Prism2.register(jsx218);
|
|
4862
4862
|
Prism2.register(typescript);
|
|
4863
4863
|
(function(Prism3) {
|
|
4864
4864
|
var typescript2 = Prism3.util.clone(Prism3.languages.typescript);
|
|
@@ -5020,7 +5020,7 @@ var EUI_ANALYTICS_QUEUE_STORAGE_KEY = "eui.analytics.queue";
|
|
|
5020
5020
|
var DEFAULT_ANALYTICS_CONFIG = {
|
|
5021
5021
|
enabled: true,
|
|
5022
5022
|
trackPageViews: true,
|
|
5023
|
-
trackSession:
|
|
5023
|
+
trackSession: true,
|
|
5024
5024
|
flushIntervalMs: 1e4,
|
|
5025
5025
|
maxBatchSize: 20,
|
|
5026
5026
|
respectDoNotTrack: true,
|
|
@@ -5133,12 +5133,16 @@ var createAnalyticsEvent = ({
|
|
|
5133
5133
|
type: type2,
|
|
5134
5134
|
appId,
|
|
5135
5135
|
sessionId,
|
|
5136
|
-
anonymousId
|
|
5137
|
-
userId
|
|
5138
|
-
path:
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5136
|
+
anonymousId,
|
|
5137
|
+
userId,
|
|
5138
|
+
path: getCurrentPath(),
|
|
5139
|
+
fullUrl: getCurrentFullUrl(),
|
|
5140
|
+
referrer: getCurrentReferrer(),
|
|
5141
|
+
title: getCurrentTitle(),
|
|
5142
|
+
timestamp: getNowISOString(),
|
|
5143
|
+
viewport: getViewport(),
|
|
5144
|
+
device: getDeviceInfo(),
|
|
5145
|
+
...options,
|
|
5142
5146
|
metadata: {
|
|
5143
5147
|
...options?.metadata
|
|
5144
5148
|
}
|
|
@@ -6044,6 +6048,31 @@ function resolveWithGlobal(config, props, defaults) {
|
|
|
6044
6048
|
};
|
|
6045
6049
|
}
|
|
6046
6050
|
|
|
6051
|
+
// src/components/data-entry/button/base/Button.config.ts
|
|
6052
|
+
var buttonModeAppearance = {
|
|
6053
|
+
contained: "solid",
|
|
6054
|
+
"contained-tonal": "lite",
|
|
6055
|
+
outlined: "ghost",
|
|
6056
|
+
text: "ghost"
|
|
6057
|
+
};
|
|
6058
|
+
function useResolvedButtonConfig({
|
|
6059
|
+
compact = false,
|
|
6060
|
+
mode,
|
|
6061
|
+
variant,
|
|
6062
|
+
appearance,
|
|
6063
|
+
shape,
|
|
6064
|
+
size
|
|
6065
|
+
}) {
|
|
6066
|
+
const eui = useEUIConfig();
|
|
6067
|
+
const configuredSize = size ?? eui?.config?.global?.size ?? "md";
|
|
6068
|
+
return {
|
|
6069
|
+
shape: shape ?? eui?.config?.global?.shape ?? "square",
|
|
6070
|
+
size: compact && configuredSize === "md" ? "sm" : configuredSize,
|
|
6071
|
+
variant: variant ?? eui?.config?.global?.variant ?? "success",
|
|
6072
|
+
appearance: appearance ?? (mode ? buttonModeAppearance[mode] : "solid")
|
|
6073
|
+
};
|
|
6074
|
+
}
|
|
6075
|
+
|
|
6047
6076
|
// src/data/enums.ts
|
|
6048
6077
|
var Shape = /* @__PURE__ */ ((Shape2) => {
|
|
6049
6078
|
Shape2["circle"] = "circle";
|
|
@@ -6219,7 +6248,31 @@ var toastShapeStyles = {
|
|
|
6219
6248
|
["softRoundedSquare" /* softRoundedSquare */]: "!rounded-3xl",
|
|
6220
6249
|
["square" /* square */]: "!rounded-none"
|
|
6221
6250
|
};
|
|
6222
|
-
|
|
6251
|
+
|
|
6252
|
+
// src/components/data-entry/button/base/Button.styles.ts
|
|
6253
|
+
var buttonShapes = shapes;
|
|
6254
|
+
var buttonIconSizes = {
|
|
6255
|
+
xs: 14,
|
|
6256
|
+
sm: 16,
|
|
6257
|
+
md: 18,
|
|
6258
|
+
lg: 20,
|
|
6259
|
+
xl: 22
|
|
6260
|
+
};
|
|
6261
|
+
function resolveButtonVariantStyles({
|
|
6262
|
+
appearance,
|
|
6263
|
+
variant
|
|
6264
|
+
}) {
|
|
6265
|
+
return resolveAppearanceStyles({
|
|
6266
|
+
appearance,
|
|
6267
|
+
variant,
|
|
6268
|
+
solid: variantsSolid,
|
|
6269
|
+
lite: variantsLite,
|
|
6270
|
+
ghost: variantsGhost
|
|
6271
|
+
});
|
|
6272
|
+
}
|
|
6273
|
+
|
|
6274
|
+
// src/components/data-entry/button/web/Button.web.styles.ts
|
|
6275
|
+
var webButtonSizes = {
|
|
6223
6276
|
xs: "px-2 py-1 text-xs",
|
|
6224
6277
|
sm: "px-3 py-1.5 text-sm",
|
|
6225
6278
|
md: "px-4 py-2 text-base",
|
|
@@ -6234,24 +6287,54 @@ function Button({
|
|
|
6234
6287
|
loading = false,
|
|
6235
6288
|
disabled = false,
|
|
6236
6289
|
block = false,
|
|
6237
|
-
|
|
6238
|
-
|
|
6290
|
+
compact = false,
|
|
6291
|
+
mode,
|
|
6292
|
+
buttonColor,
|
|
6293
|
+
textColor,
|
|
6294
|
+
contentClassName,
|
|
6295
|
+
labelClassName,
|
|
6296
|
+
variant,
|
|
6297
|
+
appearance,
|
|
6239
6298
|
shape,
|
|
6240
|
-
size
|
|
6299
|
+
size,
|
|
6300
|
+
style: style2,
|
|
6301
|
+
contentStyle,
|
|
6302
|
+
labelStyle,
|
|
6303
|
+
accessibilityLabel,
|
|
6304
|
+
accessibilityRole,
|
|
6305
|
+
accessibilityState,
|
|
6306
|
+
testID,
|
|
6241
6307
|
className,
|
|
6242
6308
|
onMouseMove,
|
|
6309
|
+
onClick,
|
|
6310
|
+
onPress,
|
|
6243
6311
|
...rest
|
|
6244
6312
|
}) {
|
|
6245
|
-
const
|
|
6246
|
-
const
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6313
|
+
const accessibility = accessibilityState;
|
|
6314
|
+
const {
|
|
6315
|
+
shape: resolvedShape,
|
|
6316
|
+
size: resolvedSize,
|
|
6317
|
+
variant: resolvedVariant,
|
|
6318
|
+
appearance: resolvedAppearance
|
|
6319
|
+
} = useResolvedButtonConfig({
|
|
6320
|
+
compact,
|
|
6321
|
+
mode,
|
|
6250
6322
|
variant,
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6323
|
+
appearance,
|
|
6324
|
+
shape,
|
|
6325
|
+
size
|
|
6326
|
+
});
|
|
6327
|
+
const btnRef = useRef(null);
|
|
6328
|
+
const variantStyles = resolveButtonVariantStyles({
|
|
6329
|
+
appearance: resolvedAppearance,
|
|
6330
|
+
variant: resolvedVariant
|
|
6254
6331
|
});
|
|
6332
|
+
const iconSize = buttonIconSizes[resolvedSize];
|
|
6333
|
+
const labelContent = text10 || children3;
|
|
6334
|
+
const resolvedIcon = typeof icon === "function" ? icon({
|
|
6335
|
+
color: textColor ?? "currentColor",
|
|
6336
|
+
size: iconSize
|
|
6337
|
+
}) : icon;
|
|
6255
6338
|
const handleMouseMove = (e) => {
|
|
6256
6339
|
const btn = btnRef.current;
|
|
6257
6340
|
if (!btn) return;
|
|
@@ -6262,6 +6345,12 @@ function Button({
|
|
|
6262
6345
|
btn.style.setProperty("--glow-y", `${y3}px`);
|
|
6263
6346
|
onMouseMove?.(e);
|
|
6264
6347
|
};
|
|
6348
|
+
const handleClick = (e) => {
|
|
6349
|
+
onClick?.(e);
|
|
6350
|
+
if (!e.defaultPrevented) {
|
|
6351
|
+
onPress?.();
|
|
6352
|
+
}
|
|
6353
|
+
};
|
|
6265
6354
|
return /* @__PURE__ */ jsxs(
|
|
6266
6355
|
"button",
|
|
6267
6356
|
{
|
|
@@ -6269,13 +6358,25 @@ function Button({
|
|
|
6269
6358
|
ref: btnRef,
|
|
6270
6359
|
type: type2,
|
|
6271
6360
|
disabled: disabled || loading,
|
|
6361
|
+
onClick: handleClick,
|
|
6272
6362
|
onMouseMove: handleMouseMove,
|
|
6363
|
+
"aria-disabled": disabled || loading,
|
|
6364
|
+
"aria-label": accessibilityLabel,
|
|
6365
|
+
"aria-pressed": accessibility?.selected === void 0 ? void 0 : Boolean(accessibility.selected),
|
|
6366
|
+
"data-testid": testID,
|
|
6367
|
+
role: accessibilityRole,
|
|
6368
|
+
style: {
|
|
6369
|
+
background: buttonColor,
|
|
6370
|
+
color: textColor,
|
|
6371
|
+
...style2
|
|
6372
|
+
},
|
|
6273
6373
|
className: cn(
|
|
6274
6374
|
"relative overflow-hidden group inline-flex items-center justify-center gap-2 transition-all duration-300",
|
|
6275
6375
|
variantStyles,
|
|
6276
|
-
|
|
6277
|
-
|
|
6376
|
+
buttonShapes[resolvedShape],
|
|
6377
|
+
webButtonSizes[resolvedSize],
|
|
6278
6378
|
block && "w-full",
|
|
6379
|
+
mode === "text" && "border-transparent bg-transparent",
|
|
6279
6380
|
(loading || disabled) && "brightness-75 grayscale cursor-not-allowed",
|
|
6280
6381
|
!loading && !disabled && "hover:cursor-pointer",
|
|
6281
6382
|
className
|
|
@@ -6297,14 +6398,41 @@ function Button({
|
|
|
6297
6398
|
}
|
|
6298
6399
|
),
|
|
6299
6400
|
loading && /* @__PURE__ */ jsx(AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6401
|
+
resolvedIcon && /* @__PURE__ */ jsx(
|
|
6402
|
+
"span",
|
|
6403
|
+
{
|
|
6404
|
+
className: cn(
|
|
6405
|
+
"z-10 inline-flex shrink-0 items-center justify-center leading-none",
|
|
6406
|
+
contentClassName
|
|
6407
|
+
),
|
|
6408
|
+
style: {
|
|
6409
|
+
height: iconSize,
|
|
6410
|
+
lineHeight: 0,
|
|
6411
|
+
width: iconSize,
|
|
6412
|
+
...contentStyle
|
|
6413
|
+
},
|
|
6414
|
+
children: resolvedIcon
|
|
6415
|
+
}
|
|
6416
|
+
),
|
|
6417
|
+
labelContent && /* @__PURE__ */ jsx(
|
|
6418
|
+
"span",
|
|
6419
|
+
{
|
|
6420
|
+
className: cn(
|
|
6421
|
+
"z-10 inline-flex items-center justify-center leading-none",
|
|
6422
|
+
labelClassName
|
|
6423
|
+
),
|
|
6424
|
+
style: {
|
|
6425
|
+
minHeight: iconSize,
|
|
6426
|
+
...labelStyle
|
|
6427
|
+
},
|
|
6428
|
+
children: labelContent
|
|
6429
|
+
}
|
|
6430
|
+
)
|
|
6303
6431
|
]
|
|
6304
6432
|
}
|
|
6305
6433
|
);
|
|
6306
6434
|
}
|
|
6307
|
-
var
|
|
6435
|
+
var Button_web_default = Button;
|
|
6308
6436
|
var Backdrop = ({ children: children3, styles }) => {
|
|
6309
6437
|
return /* @__PURE__ */ jsx(
|
|
6310
6438
|
"div",
|
|
@@ -6894,11 +7022,11 @@ function renderTransitionChild(children3, className) {
|
|
|
6894
7022
|
return /* @__PURE__ */ jsx("div", { className, children: children3 });
|
|
6895
7023
|
}
|
|
6896
7024
|
const child = Children.only(children3);
|
|
6897
|
-
if (!
|
|
7025
|
+
if (!React26.isValidElement(child)) {
|
|
6898
7026
|
return /* @__PURE__ */ jsx("div", { className, children: child });
|
|
6899
7027
|
}
|
|
6900
7028
|
const element7 = child;
|
|
6901
|
-
return
|
|
7029
|
+
return React26.cloneElement(element7, {
|
|
6902
7030
|
className: classNames77(element7.props.className, className)
|
|
6903
7031
|
});
|
|
6904
7032
|
}
|
|
@@ -7788,7 +7916,7 @@ var Form = ({
|
|
|
7788
7916
|
}
|
|
7789
7917
|
);
|
|
7790
7918
|
};
|
|
7791
|
-
var
|
|
7919
|
+
var sizes = {
|
|
7792
7920
|
xs: "px-2 py-1 text-xs",
|
|
7793
7921
|
sm: "px-3 py-2 text-sm",
|
|
7794
7922
|
md: "px-4 py-2 text-base",
|
|
@@ -7809,7 +7937,7 @@ function FormResponse({
|
|
|
7809
7937
|
"font-poppins font-light text-sm": true,
|
|
7810
7938
|
[`${variantsLite[variant]}`]: variant,
|
|
7811
7939
|
[`${shapes[shape]}`]: shape,
|
|
7812
|
-
[`${
|
|
7940
|
+
[`${sizes[size]}`]: size,
|
|
7813
7941
|
[`${styles}`]: styles
|
|
7814
7942
|
}),
|
|
7815
7943
|
children: text10
|
|
@@ -8465,7 +8593,7 @@ var Breadcrumb = ({
|
|
|
8465
8593
|
navigate(item.href);
|
|
8466
8594
|
}
|
|
8467
8595
|
};
|
|
8468
|
-
return /* @__PURE__ */ jsxs(
|
|
8596
|
+
return /* @__PURE__ */ jsxs(React26.Fragment, { children: [
|
|
8469
8597
|
/* @__PURE__ */ jsx(
|
|
8470
8598
|
BreadcrumbItem_default,
|
|
8471
8599
|
{
|
|
@@ -16409,7 +16537,7 @@ var ListItem = ({
|
|
|
16409
16537
|
children: bullet
|
|
16410
16538
|
}
|
|
16411
16539
|
),
|
|
16412
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: TypographyComponent ?
|
|
16540
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: TypographyComponent ? React26.cloneElement(
|
|
16413
16541
|
TypographyComponent,
|
|
16414
16542
|
{
|
|
16415
16543
|
className: cn(
|
|
@@ -16443,7 +16571,7 @@ function normalizeItem(item, defaultBulletType) {
|
|
|
16443
16571
|
bulletType: defaultBulletType
|
|
16444
16572
|
};
|
|
16445
16573
|
}
|
|
16446
|
-
if (
|
|
16574
|
+
if (React26.isValidElement(item)) {
|
|
16447
16575
|
return {
|
|
16448
16576
|
content: item,
|
|
16449
16577
|
bulletType: defaultBulletType
|
|
@@ -16748,7 +16876,7 @@ var ProgressBar = ({
|
|
|
16748
16876
|
hasBottomLabel && /* @__PURE__ */ jsx("div", { className: "mt-2", children: labelNode })
|
|
16749
16877
|
] });
|
|
16750
16878
|
};
|
|
16751
|
-
var
|
|
16879
|
+
var sizes2 = {
|
|
16752
16880
|
["xs" /* xs */]: "text-[10px]",
|
|
16753
16881
|
["sm" /* sm */]: "text-xs",
|
|
16754
16882
|
["md" /* md */]: "text-sm",
|
|
@@ -16778,7 +16906,7 @@ var StarRating = ({
|
|
|
16778
16906
|
className: cn(
|
|
16779
16907
|
"inline-flex items-center gap-[2px]",
|
|
16780
16908
|
"text-yellow-500 dark:text-yellow-400",
|
|
16781
|
-
|
|
16909
|
+
sizes2[size],
|
|
16782
16910
|
iconClassName
|
|
16783
16911
|
),
|
|
16784
16912
|
children: [
|
|
@@ -16791,7 +16919,7 @@ var StarRating = ({
|
|
|
16791
16919
|
showValue && valuePosition === "end" && ratingValue
|
|
16792
16920
|
] });
|
|
16793
16921
|
};
|
|
16794
|
-
var
|
|
16922
|
+
var sizes3 = {
|
|
16795
16923
|
["xs" /* xs */]: {
|
|
16796
16924
|
value: "text-2xl",
|
|
16797
16925
|
review: "text-xs"
|
|
@@ -16823,7 +16951,7 @@ var NumericRating = ({
|
|
|
16823
16951
|
className,
|
|
16824
16952
|
...rest
|
|
16825
16953
|
}) => {
|
|
16826
|
-
const sizeStyles =
|
|
16954
|
+
const sizeStyles = sizes3[size];
|
|
16827
16955
|
return /* @__PURE__ */ jsxs(
|
|
16828
16956
|
"div",
|
|
16829
16957
|
{
|
|
@@ -17597,11 +17725,44 @@ var ThemeSwitch = () => {
|
|
|
17597
17725
|
}
|
|
17598
17726
|
);
|
|
17599
17727
|
};
|
|
17728
|
+
function ThemeSelect({
|
|
17729
|
+
ariaLabel,
|
|
17730
|
+
label,
|
|
17731
|
+
onChange,
|
|
17732
|
+
options,
|
|
17733
|
+
value
|
|
17734
|
+
}) {
|
|
17735
|
+
const id2 = useId();
|
|
17736
|
+
return /* @__PURE__ */ jsxs(
|
|
17737
|
+
"label",
|
|
17738
|
+
{
|
|
17739
|
+
className: "inline-flex w-fit min-w-[112px] flex-col rounded-md border border-gray-300 bg-white px-2 py-1 shadow-sm dark:bg-gray-800",
|
|
17740
|
+
htmlFor: id2,
|
|
17741
|
+
children: [
|
|
17742
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-3 text-gray-500 dark:text-gray-300", children: label }),
|
|
17743
|
+
/* @__PURE__ */ jsx(
|
|
17744
|
+
"select",
|
|
17745
|
+
{
|
|
17746
|
+
"aria-label": ariaLabel ?? label,
|
|
17747
|
+
className: "h-5 bg-transparent p-0 text-sm leading-5 text-gray-900 outline-none dark:text-gray-100",
|
|
17748
|
+
id: id2,
|
|
17749
|
+
onChange: (event) => onChange?.(event.target.value),
|
|
17750
|
+
value,
|
|
17751
|
+
children: options.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: option.label }, option.value))
|
|
17752
|
+
}
|
|
17753
|
+
)
|
|
17754
|
+
]
|
|
17755
|
+
}
|
|
17756
|
+
);
|
|
17757
|
+
}
|
|
17758
|
+
var shapeOptions = Object.keys(Shape).map((shape) => ({
|
|
17759
|
+
label: shape,
|
|
17760
|
+
value: shape
|
|
17761
|
+
}));
|
|
17600
17762
|
var ShapeSwitch = () => {
|
|
17601
17763
|
const { config, setConfig } = useEUIConfig();
|
|
17602
17764
|
const currentShape = config.global?.shape ?? "square";
|
|
17603
|
-
const handleChange = (
|
|
17604
|
-
const shape = e.target.value;
|
|
17765
|
+
const handleChange = (shape) => {
|
|
17605
17766
|
setConfig((prev) => ({
|
|
17606
17767
|
...prev,
|
|
17607
17768
|
global: {
|
|
@@ -17610,15 +17771,41 @@ var ShapeSwitch = () => {
|
|
|
17610
17771
|
}
|
|
17611
17772
|
}));
|
|
17612
17773
|
};
|
|
17613
|
-
return /* @__PURE__ */ jsx(
|
|
17614
|
-
|
|
17774
|
+
return /* @__PURE__ */ jsx(
|
|
17775
|
+
ThemeSelect,
|
|
17615
17776
|
{
|
|
17616
|
-
|
|
17777
|
+
ariaLabel: "Global shape",
|
|
17778
|
+
label: "Shape",
|
|
17617
17779
|
onChange: handleChange,
|
|
17618
|
-
|
|
17619
|
-
|
|
17780
|
+
options: shapeOptions,
|
|
17781
|
+
value: currentShape
|
|
17620
17782
|
}
|
|
17621
|
-
)
|
|
17783
|
+
);
|
|
17784
|
+
};
|
|
17785
|
+
var previewOptions = [
|
|
17786
|
+
{
|
|
17787
|
+
label: "Web",
|
|
17788
|
+
value: "web"
|
|
17789
|
+
},
|
|
17790
|
+
{
|
|
17791
|
+
label: "Native",
|
|
17792
|
+
value: "native"
|
|
17793
|
+
}
|
|
17794
|
+
];
|
|
17795
|
+
var PreviewSwitch = ({
|
|
17796
|
+
onChange,
|
|
17797
|
+
value = "web"
|
|
17798
|
+
}) => {
|
|
17799
|
+
return /* @__PURE__ */ jsx(
|
|
17800
|
+
ThemeSelect,
|
|
17801
|
+
{
|
|
17802
|
+
ariaLabel: "Preview platform",
|
|
17803
|
+
label: "Preview",
|
|
17804
|
+
onChange,
|
|
17805
|
+
options: previewOptions,
|
|
17806
|
+
value
|
|
17807
|
+
}
|
|
17808
|
+
);
|
|
17622
17809
|
};
|
|
17623
17810
|
|
|
17624
17811
|
// src/hooks/theme/useCurrentTheme.ts
|
|
@@ -29076,7 +29263,7 @@ function AsyncStateCard({
|
|
|
29076
29263
|
isError ? /* @__PURE__ */ jsx(FormResponse_default, { text: message, variant: "danger" }) : /* @__PURE__ */ jsx("p", { className: "text-sm text-eui-dark-500 dark:text-eui-light-400", children: message })
|
|
29077
29264
|
] }),
|
|
29078
29265
|
onAction && actionText && /* @__PURE__ */ jsx(
|
|
29079
|
-
|
|
29266
|
+
Button_web_default,
|
|
29080
29267
|
{
|
|
29081
29268
|
type: "button",
|
|
29082
29269
|
text: actionText,
|
|
@@ -29091,7 +29278,7 @@ function AsyncStateCard({
|
|
|
29091
29278
|
}
|
|
29092
29279
|
);
|
|
29093
29280
|
}
|
|
29094
|
-
var AsyncStateCard_default =
|
|
29281
|
+
var AsyncStateCard_default = React26.memo(AsyncStateCard);
|
|
29095
29282
|
|
|
29096
29283
|
// src/components/utils/async-component-wrapper/asyncError.utils.ts
|
|
29097
29284
|
var getDefaultErrorMessage = (error) => {
|
|
@@ -29272,7 +29459,7 @@ function AsyncComponentWrapper({
|
|
|
29272
29459
|
/* @__PURE__ */ jsx("div", { className: cn(contentClassName), children: children3 })
|
|
29273
29460
|
] });
|
|
29274
29461
|
}
|
|
29275
|
-
var AsyncComponentWrapper_default =
|
|
29462
|
+
var AsyncComponentWrapper_default = React26.memo(AsyncComponentWrapper);
|
|
29276
29463
|
function Modal({
|
|
29277
29464
|
title,
|
|
29278
29465
|
show = false,
|
|
@@ -29439,7 +29626,7 @@ var CookiePreferencesModal = ({
|
|
|
29439
29626
|
}) }),
|
|
29440
29627
|
/* @__PURE__ */ jsxs("div", { className: "mt-5 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
29441
29628
|
/* @__PURE__ */ jsx(
|
|
29442
|
-
|
|
29629
|
+
Button_web_default,
|
|
29443
29630
|
{
|
|
29444
29631
|
type: "button",
|
|
29445
29632
|
text: cancelLabel,
|
|
@@ -29451,7 +29638,7 @@ var CookiePreferencesModal = ({
|
|
|
29451
29638
|
}
|
|
29452
29639
|
),
|
|
29453
29640
|
/* @__PURE__ */ jsx(
|
|
29454
|
-
|
|
29641
|
+
Button_web_default,
|
|
29455
29642
|
{
|
|
29456
29643
|
type: "button",
|
|
29457
29644
|
text: saveLabel,
|
|
@@ -29543,7 +29730,7 @@ var CookieBanner = ({
|
|
|
29543
29730
|
] }),
|
|
29544
29731
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
29545
29732
|
/* @__PURE__ */ jsx(
|
|
29546
|
-
|
|
29733
|
+
Button_web_default,
|
|
29547
29734
|
{
|
|
29548
29735
|
type: "button",
|
|
29549
29736
|
text: acceptAllLabel,
|
|
@@ -29555,7 +29742,7 @@ var CookieBanner = ({
|
|
|
29555
29742
|
}
|
|
29556
29743
|
),
|
|
29557
29744
|
showCustomize ? /* @__PURE__ */ jsx(
|
|
29558
|
-
|
|
29745
|
+
Button_web_default,
|
|
29559
29746
|
{
|
|
29560
29747
|
type: "button",
|
|
29561
29748
|
text: customizeLabel,
|
|
@@ -29567,7 +29754,7 @@ var CookieBanner = ({
|
|
|
29567
29754
|
}
|
|
29568
29755
|
) : null,
|
|
29569
29756
|
showRejectAll ? /* @__PURE__ */ jsx(
|
|
29570
|
-
|
|
29757
|
+
Button_web_default,
|
|
29571
29758
|
{
|
|
29572
29759
|
type: "button",
|
|
29573
29760
|
text: rejectAllLabel,
|
|
@@ -29624,13 +29811,10 @@ var usePageTracking = ({
|
|
|
29624
29811
|
}
|
|
29625
29812
|
if (trackPageLeave && previousPathRef.current) {
|
|
29626
29813
|
const durationMs = Date.now() - enteredAtRef.current;
|
|
29627
|
-
trackRef.current("
|
|
29814
|
+
trackRef.current("page_leave", {
|
|
29628
29815
|
path: previousPathRef.current,
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
durationMs,
|
|
29632
|
-
...metadata
|
|
29633
|
-
}
|
|
29816
|
+
durationMs,
|
|
29817
|
+
metadata
|
|
29634
29818
|
});
|
|
29635
29819
|
}
|
|
29636
29820
|
enteredAtRef.current = Date.now();
|
|
@@ -29638,24 +29822,17 @@ var usePageTracking = ({
|
|
|
29638
29822
|
trackedPathsRef.current.add(nextPath);
|
|
29639
29823
|
trackRef.current("page_view", {
|
|
29640
29824
|
path: nextPath,
|
|
29641
|
-
|
|
29642
|
-
|
|
29643
|
-
|
|
29644
|
-
...metadata
|
|
29645
|
-
}
|
|
29825
|
+
title,
|
|
29826
|
+
fullUrl,
|
|
29827
|
+
metadata
|
|
29646
29828
|
});
|
|
29647
29829
|
return () => {
|
|
29648
29830
|
if (!trackPageLeave) return;
|
|
29649
29831
|
const durationMs = Date.now() - enteredAtRef.current;
|
|
29650
|
-
trackRef.current("
|
|
29832
|
+
trackRef.current("page_leave", {
|
|
29651
29833
|
path: nextPath,
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
durationMs,
|
|
29655
|
-
title,
|
|
29656
|
-
fullUrl,
|
|
29657
|
-
...metadata
|
|
29658
|
-
}
|
|
29834
|
+
durationMs,
|
|
29835
|
+
metadata
|
|
29659
29836
|
});
|
|
29660
29837
|
};
|
|
29661
29838
|
}, [
|
|
@@ -29674,32 +29851,21 @@ var useSessionTracking = ({
|
|
|
29674
29851
|
metadata
|
|
29675
29852
|
} = {}) => {
|
|
29676
29853
|
const { track } = useAnalytics();
|
|
29677
|
-
const trackRef = useRef(track);
|
|
29678
29854
|
const startedAtRef = useRef(Date.now());
|
|
29679
29855
|
const endedRef = useRef(false);
|
|
29680
|
-
useEffect(() => {
|
|
29681
|
-
trackRef.current = track;
|
|
29682
|
-
}, [track]);
|
|
29683
|
-
const metadataKey = useMemo(() => JSON.stringify(metadata ?? {}), [metadata]);
|
|
29684
29856
|
useEffect(() => {
|
|
29685
29857
|
if (!enabled || !isBrowser()) return;
|
|
29686
29858
|
startedAtRef.current = Date.now();
|
|
29687
29859
|
endedRef.current = false;
|
|
29688
|
-
|
|
29689
|
-
metadata
|
|
29690
|
-
eventName: "session_start",
|
|
29691
|
-
...metadata
|
|
29692
|
-
}
|
|
29860
|
+
track("session_start", {
|
|
29861
|
+
metadata
|
|
29693
29862
|
});
|
|
29694
29863
|
const endSession = () => {
|
|
29695
29864
|
if (endedRef.current) return;
|
|
29696
29865
|
endedRef.current = true;
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
durationMs: Date.now() - startedAtRef.current,
|
|
29701
|
-
...metadata
|
|
29702
|
-
}
|
|
29866
|
+
track("session_end", {
|
|
29867
|
+
durationMs: Date.now() - startedAtRef.current,
|
|
29868
|
+
metadata
|
|
29703
29869
|
});
|
|
29704
29870
|
};
|
|
29705
29871
|
const handleVisibilityChange = () => {
|
|
@@ -29714,7 +29880,7 @@ var useSessionTracking = ({
|
|
|
29714
29880
|
window.removeEventListener("pagehide", endSession);
|
|
29715
29881
|
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
29716
29882
|
};
|
|
29717
|
-
}, [enabled,
|
|
29883
|
+
}, [enabled, metadata, track]);
|
|
29718
29884
|
};
|
|
29719
29885
|
var ContentArea = forwardRef(
|
|
29720
29886
|
({ children: children3, styles, enablePadding = false }, ref) => {
|
|
@@ -29802,6 +29968,9 @@ var Layout = ({
|
|
|
29802
29968
|
var Header = ({
|
|
29803
29969
|
position: position4 = "static",
|
|
29804
29970
|
children: children3,
|
|
29971
|
+
onPreviewPlatformChange,
|
|
29972
|
+
previewPlatform = "web",
|
|
29973
|
+
showPreviewPlatformSelector = false,
|
|
29805
29974
|
styles
|
|
29806
29975
|
}) => {
|
|
29807
29976
|
return /* @__PURE__ */ jsx(
|
|
@@ -29816,9 +29985,16 @@ var Header = ({
|
|
|
29816
29985
|
[`${styles}`]: styles
|
|
29817
29986
|
}),
|
|
29818
29987
|
children: /* @__PURE__ */ jsx("div", { className: "w-full", children: children3 ? children3 : /* @__PURE__ */ jsxs("div", { className: "flex flex-row w-full items-center justify-between px-4", children: [
|
|
29819
|
-
/* @__PURE__ */ jsx("div", { children: "
|
|
29988
|
+
/* @__PURE__ */ jsx("div", { children: "elseware UI" }),
|
|
29820
29989
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
29821
29990
|
/* @__PURE__ */ jsx(ThemeSwitch, {}),
|
|
29991
|
+
showPreviewPlatformSelector ? /* @__PURE__ */ jsx(
|
|
29992
|
+
PreviewSwitch,
|
|
29993
|
+
{
|
|
29994
|
+
onChange: onPreviewPlatformChange,
|
|
29995
|
+
value: previewPlatform
|
|
29996
|
+
}
|
|
29997
|
+
) : null,
|
|
29822
29998
|
/* @__PURE__ */ jsx(ShapeSwitch, {})
|
|
29823
29999
|
] })
|
|
29824
30000
|
] }) })
|
|
@@ -30097,7 +30273,7 @@ function CommentComposer({
|
|
|
30097
30273
|
),
|
|
30098
30274
|
(focused || value.length > 0) && /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
30099
30275
|
/* @__PURE__ */ jsx(
|
|
30100
|
-
|
|
30276
|
+
Button_web_default,
|
|
30101
30277
|
{
|
|
30102
30278
|
text: "Cancel",
|
|
30103
30279
|
variant: "secondary",
|
|
@@ -30107,7 +30283,7 @@ function CommentComposer({
|
|
|
30107
30283
|
}
|
|
30108
30284
|
),
|
|
30109
30285
|
/* @__PURE__ */ jsx(
|
|
30110
|
-
|
|
30286
|
+
Button_web_default,
|
|
30111
30287
|
{
|
|
30112
30288
|
text: submitLabel,
|
|
30113
30289
|
variant: "primary",
|
|
@@ -31770,7 +31946,7 @@ function ReviewForm({
|
|
|
31770
31946
|
] }),
|
|
31771
31947
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
31772
31948
|
onCancel && /* @__PURE__ */ jsx(
|
|
31773
|
-
|
|
31949
|
+
Button_web_default,
|
|
31774
31950
|
{
|
|
31775
31951
|
text: cancelLabel,
|
|
31776
31952
|
variant: "secondary",
|
|
@@ -31780,7 +31956,7 @@ function ReviewForm({
|
|
|
31780
31956
|
}
|
|
31781
31957
|
),
|
|
31782
31958
|
/* @__PURE__ */ jsx(
|
|
31783
|
-
|
|
31959
|
+
Button_web_default,
|
|
31784
31960
|
{
|
|
31785
31961
|
text: submitLabel,
|
|
31786
31962
|
variant: "primary",
|
|
@@ -31806,7 +31982,7 @@ function ReviewComposer({
|
|
|
31806
31982
|
if (!currentUser) {
|
|
31807
31983
|
return /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-gray-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
31808
31984
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Please login to post your review." }),
|
|
31809
|
-
onLoginClick && /* @__PURE__ */ jsx(
|
|
31985
|
+
onLoginClick && /* @__PURE__ */ jsx(Button_web_default, { text: "Login", variant: "primary", onClick: onLoginClick })
|
|
31810
31986
|
] }) });
|
|
31811
31987
|
}
|
|
31812
31988
|
return /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-gray-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
@@ -32182,7 +32358,7 @@ function MyReviewPanel({
|
|
|
32182
32358
|
/* @__PURE__ */ jsx(HeaderComponent, { review: myReview, config }),
|
|
32183
32359
|
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
32184
32360
|
/* @__PURE__ */ jsx(
|
|
32185
|
-
|
|
32361
|
+
Button_web_default,
|
|
32186
32362
|
{
|
|
32187
32363
|
text: "Edit",
|
|
32188
32364
|
variant: "secondary",
|
|
@@ -32192,7 +32368,7 @@ function MyReviewPanel({
|
|
|
32192
32368
|
}
|
|
32193
32369
|
),
|
|
32194
32370
|
onDeleteReview && /* @__PURE__ */ jsx(
|
|
32195
|
-
|
|
32371
|
+
Button_web_default,
|
|
32196
32372
|
{
|
|
32197
32373
|
text: "Delete",
|
|
32198
32374
|
variant: "danger",
|
|
@@ -33137,7 +33313,7 @@ function ReviewThread({
|
|
|
33137
33313
|
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-red-600/80 dark:text-red-300/80", children: "Something went wrong while loading the review thread." })
|
|
33138
33314
|
] }),
|
|
33139
33315
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
33140
|
-
|
|
33316
|
+
Button_web_default,
|
|
33141
33317
|
{
|
|
33142
33318
|
text: "Retry",
|
|
33143
33319
|
variant: "danger",
|
|
@@ -33977,11 +34153,11 @@ function addChildren(props, children3) {
|
|
|
33977
34153
|
}
|
|
33978
34154
|
}
|
|
33979
34155
|
}
|
|
33980
|
-
function productionCreate(_2,
|
|
34156
|
+
function productionCreate(_2, jsx257, jsxs129) {
|
|
33981
34157
|
return create3;
|
|
33982
34158
|
function create3(_3, type2, props, key) {
|
|
33983
34159
|
const isStaticChildren = Array.isArray(props.children);
|
|
33984
|
-
const fn = isStaticChildren ?
|
|
34160
|
+
const fn = isStaticChildren ? jsxs129 : jsx257;
|
|
33985
34161
|
return key ? fn(type2, props, key) : fn(type2, props);
|
|
33986
34162
|
}
|
|
33987
34163
|
}
|
|
@@ -42371,7 +42547,7 @@ function markdownTable(table2, options) {
|
|
|
42371
42547
|
let rowIndex = -1;
|
|
42372
42548
|
while (++rowIndex < table2.length) {
|
|
42373
42549
|
const row2 = [];
|
|
42374
|
-
const
|
|
42550
|
+
const sizes5 = [];
|
|
42375
42551
|
let columnIndex2 = -1;
|
|
42376
42552
|
if (table2[rowIndex].length > mostCellsPerRow) {
|
|
42377
42553
|
mostCellsPerRow = table2[rowIndex].length;
|
|
@@ -42380,7 +42556,7 @@ function markdownTable(table2, options) {
|
|
|
42380
42556
|
const cell = serialize2(table2[rowIndex][columnIndex2]);
|
|
42381
42557
|
if (settings.alignDelimiters !== false) {
|
|
42382
42558
|
const size = stringLength(cell);
|
|
42383
|
-
|
|
42559
|
+
sizes5[columnIndex2] = size;
|
|
42384
42560
|
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
42385
42561
|
longestCellByColumn[columnIndex2] = size;
|
|
42386
42562
|
}
|
|
@@ -42388,7 +42564,7 @@ function markdownTable(table2, options) {
|
|
|
42388
42564
|
row2.push(cell);
|
|
42389
42565
|
}
|
|
42390
42566
|
cellMatrix[rowIndex] = row2;
|
|
42391
|
-
sizeMatrix[rowIndex] =
|
|
42567
|
+
sizeMatrix[rowIndex] = sizes5;
|
|
42392
42568
|
}
|
|
42393
42569
|
let columnIndex = -1;
|
|
42394
42570
|
if (typeof align === "object" && "length" in align) {
|
|
@@ -42403,7 +42579,7 @@ function markdownTable(table2, options) {
|
|
|
42403
42579
|
}
|
|
42404
42580
|
columnIndex = -1;
|
|
42405
42581
|
const row = [];
|
|
42406
|
-
const
|
|
42582
|
+
const sizes4 = [];
|
|
42407
42583
|
while (++columnIndex < mostCellsPerRow) {
|
|
42408
42584
|
const code4 = alignments[columnIndex];
|
|
42409
42585
|
let before = "";
|
|
@@ -42426,17 +42602,17 @@ function markdownTable(table2, options) {
|
|
|
42426
42602
|
if (size > longestCellByColumn[columnIndex]) {
|
|
42427
42603
|
longestCellByColumn[columnIndex] = size;
|
|
42428
42604
|
}
|
|
42429
|
-
|
|
42605
|
+
sizes4[columnIndex] = size;
|
|
42430
42606
|
}
|
|
42431
42607
|
row[columnIndex] = cell;
|
|
42432
42608
|
}
|
|
42433
42609
|
cellMatrix.splice(1, 0, row);
|
|
42434
|
-
sizeMatrix.splice(1, 0,
|
|
42610
|
+
sizeMatrix.splice(1, 0, sizes4);
|
|
42435
42611
|
rowIndex = -1;
|
|
42436
42612
|
const lines = [];
|
|
42437
42613
|
while (++rowIndex < cellMatrix.length) {
|
|
42438
42614
|
const row2 = cellMatrix[rowIndex];
|
|
42439
|
-
const
|
|
42615
|
+
const sizes5 = sizeMatrix[rowIndex];
|
|
42440
42616
|
columnIndex = -1;
|
|
42441
42617
|
const line = [];
|
|
42442
42618
|
while (++columnIndex < mostCellsPerRow) {
|
|
@@ -42444,7 +42620,7 @@ function markdownTable(table2, options) {
|
|
|
42444
42620
|
let before = "";
|
|
42445
42621
|
let after = "";
|
|
42446
42622
|
if (settings.alignDelimiters !== false) {
|
|
42447
|
-
const size = longestCellByColumn[columnIndex] - (
|
|
42623
|
+
const size = longestCellByColumn[columnIndex] - (sizes5[columnIndex] || 0);
|
|
42448
42624
|
const code4 = alignments[columnIndex];
|
|
42449
42625
|
if (code4 === 114) {
|
|
42450
42626
|
before = " ".repeat(size);
|
|
@@ -54240,7 +54416,7 @@ function createElement2(_ref) {
|
|
|
54240
54416
|
});
|
|
54241
54417
|
}
|
|
54242
54418
|
var children3 = childrenCreator(node2.children);
|
|
54243
|
-
return /* @__PURE__ */
|
|
54419
|
+
return /* @__PURE__ */ React26.createElement(TagName, _extends({
|
|
54244
54420
|
key
|
|
54245
54421
|
}, props), children3);
|
|
54246
54422
|
}
|
|
@@ -54283,7 +54459,7 @@ function getAllLineNumbers(_ref) {
|
|
|
54283
54459
|
var lines = _ref.lines, startingLineNumber = _ref.startingLineNumber, style2 = _ref.style;
|
|
54284
54460
|
return lines.map(function(_2, i) {
|
|
54285
54461
|
var number3 = i + startingLineNumber;
|
|
54286
|
-
return /* @__PURE__ */
|
|
54462
|
+
return /* @__PURE__ */ React26.createElement("span", {
|
|
54287
54463
|
key: "line-".concat(i),
|
|
54288
54464
|
className: "react-syntax-highlighter-line-number",
|
|
54289
54465
|
style: typeof style2 === "function" ? style2(number3) : style2
|
|
@@ -54295,7 +54471,7 @@ function AllLineNumbers(_ref2) {
|
|
|
54295
54471
|
"float": "left",
|
|
54296
54472
|
paddingRight: "10px"
|
|
54297
54473
|
} : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
|
|
54298
|
-
return /* @__PURE__ */
|
|
54474
|
+
return /* @__PURE__ */ React26.createElement("code", {
|
|
54299
54475
|
style: Object.assign({}, codeStyle, containerStyle)
|
|
54300
54476
|
}, getAllLineNumbers({
|
|
54301
54477
|
lines: codeString.replace(/\n$/, "").split("\n"),
|
|
@@ -54516,7 +54692,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54516
54692
|
style: _objectSpread2(_objectSpread2({}, style2['code[class*="language-"]']), style2['code[class*="language-'.concat(language, '"]')])
|
|
54517
54693
|
} : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === void 0 ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === void 0 ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code4 = _ref7$code === void 0 ? (Array.isArray(children3) ? children3[0] : children3) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = _objectWithoutProperties(_ref7, _excluded);
|
|
54518
54694
|
astGenerator = astGenerator || defaultAstGenerator;
|
|
54519
|
-
var allLineNumbers = showLineNumbers ? /* @__PURE__ */
|
|
54695
|
+
var allLineNumbers = showLineNumbers ? /* @__PURE__ */ React26.createElement(AllLineNumbers, {
|
|
54520
54696
|
containerStyle: lineNumberContainerStyle,
|
|
54521
54697
|
codeStyle: codeTagProps.style || {},
|
|
54522
54698
|
numberStyle: lineNumberStyle,
|
|
@@ -54543,7 +54719,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54543
54719
|
}, codeTagProps.style);
|
|
54544
54720
|
}
|
|
54545
54721
|
if (!astGenerator) {
|
|
54546
|
-
return /* @__PURE__ */
|
|
54722
|
+
return /* @__PURE__ */ React26.createElement(PreTag, preProps, allLineNumbers, /* @__PURE__ */ React26.createElement(CodeTag, codeTagProps, code4));
|
|
54547
54723
|
}
|
|
54548
54724
|
if (wrapLines === void 0 && renderer || wrapLongLines) wrapLines = true;
|
|
54549
54725
|
renderer = renderer || defaultRenderer;
|
|
@@ -54563,7 +54739,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54563
54739
|
var lineBreakCount = (_code$match$length = (_code$match = code4.match(/\n/g)) === null || _code$match === void 0 ? void 0 : _code$match.length) !== null && _code$match$length !== void 0 ? _code$match$length : 0;
|
|
54564
54740
|
var largestLineNumber = startingLineNumber + lineBreakCount;
|
|
54565
54741
|
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
|
54566
|
-
return /* @__PURE__ */
|
|
54742
|
+
return /* @__PURE__ */ React26.createElement(PreTag, preProps, /* @__PURE__ */ React26.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
|
54567
54743
|
rows,
|
|
54568
54744
|
stylesheet: style2,
|
|
54569
54745
|
useInlineStyles
|
|
@@ -54900,7 +55076,7 @@ var json_default = json;
|
|
|
54900
55076
|
|
|
54901
55077
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/jsx.js
|
|
54902
55078
|
init_jsx();
|
|
54903
|
-
var jsx_default =
|
|
55079
|
+
var jsx_default = jsx218;
|
|
54904
55080
|
|
|
54905
55081
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/markup.js
|
|
54906
55082
|
init_markup();
|
|
@@ -57566,11 +57742,32 @@ function SidemenuLayout({ data, children: children3 }) {
|
|
|
57566
57742
|
) });
|
|
57567
57743
|
}
|
|
57568
57744
|
var SidemenuLayout_default = SidemenuLayout;
|
|
57745
|
+
var EUIDevPreviewPlatformContext = createContext({
|
|
57746
|
+
platform: "web",
|
|
57747
|
+
setPlatform: () => void 0
|
|
57748
|
+
});
|
|
57749
|
+
var useEUIDevPreviewPlatform = () => useContext(EUIDevPreviewPlatformContext);
|
|
57569
57750
|
function EUIDevLayout({
|
|
57570
57751
|
children: children3,
|
|
57571
|
-
header
|
|
57752
|
+
header,
|
|
57572
57753
|
footer: footer2 = /* @__PURE__ */ jsx(Footer, {})
|
|
57573
57754
|
}) {
|
|
57755
|
+
const [platform, setPlatform] = useState("web");
|
|
57756
|
+
const previewPlatform = useMemo(
|
|
57757
|
+
() => ({
|
|
57758
|
+
platform,
|
|
57759
|
+
setPlatform
|
|
57760
|
+
}),
|
|
57761
|
+
[platform]
|
|
57762
|
+
);
|
|
57763
|
+
const resolvedHeader = header ?? /* @__PURE__ */ jsx(
|
|
57764
|
+
Header,
|
|
57765
|
+
{
|
|
57766
|
+
onPreviewPlatformChange: setPlatform,
|
|
57767
|
+
previewPlatform: platform,
|
|
57768
|
+
showPreviewPlatformSelector: true
|
|
57769
|
+
}
|
|
57770
|
+
);
|
|
57574
57771
|
return /* @__PURE__ */ jsx(
|
|
57575
57772
|
EUIProvider,
|
|
57576
57773
|
{
|
|
@@ -57582,8 +57779,8 @@ function EUIDevLayout({
|
|
|
57582
57779
|
}
|
|
57583
57780
|
},
|
|
57584
57781
|
children: /* @__PURE__ */ jsx(GenericLayout_default, { children: /* @__PURE__ */ jsxs(Layout, { children: [
|
|
57585
|
-
|
|
57586
|
-
/* @__PURE__ */ jsx(Content, { styles: "pt-[60px]", children: /* @__PURE__ */ jsx(ContentArea_default, { enablePadding: true, children: children3 }) }),
|
|
57782
|
+
resolvedHeader,
|
|
57783
|
+
/* @__PURE__ */ jsx(EUIDevPreviewPlatformContext.Provider, { value: previewPlatform, children: /* @__PURE__ */ jsx(Content, { styles: "pt-[60px]", children: /* @__PURE__ */ jsx(ContentArea_default, { enablePadding: true, children: children3 }) }) }),
|
|
57587
57784
|
footer2
|
|
57588
57785
|
] }) })
|
|
57589
57786
|
}
|
|
@@ -57612,6 +57809,6 @@ function ScrollToTop({
|
|
|
57612
57809
|
}
|
|
57613
57810
|
var ScrollToTop_default = ScrollToTop;
|
|
57614
57811
|
|
|
57615
|
-
export { Accordion_default as Accordion, AnalyticsContext, AnalyticsProvider, AreaPlot, AsyncComponentWrapper_default as AsyncComponentWrapper, Avatar, Backdrop_default as Backdrop, Badge, BarPlot, BaseChartDataSource, Block_default as Block, BlockGroup_default as BlockGroup, BoxNav_default as BoxNav, BoxNavItem_default as BoxNavItem, Brand, Breadcrumb, BreadcrumbItem_default as BreadcrumbItem,
|
|
57812
|
+
export { Accordion_default as Accordion, AnalyticsContext, AnalyticsProvider, AreaPlot, AsyncComponentWrapper_default as AsyncComponentWrapper, Avatar, Backdrop_default as Backdrop, Badge, BarPlot, BaseChartDataSource, Block_default as Block, BlockGroup_default as BlockGroup, BoxNav_default as BoxNav, BoxNavItem_default as BoxNavItem, Brand, Breadcrumb, BreadcrumbItem_default as BreadcrumbItem, Button_web_default as Button, CHART_COLOR_PALETTE, CHART_DARK_THEME, CHART_DATA_MODES, CHART_DEFAULT_ACTIVE_DOT_RADIUS, CHART_DEFAULT_ANIMATION_DURATION, CHART_DEFAULT_BAR_RADIUS, CHART_DEFAULT_HEIGHT, CHART_DEFAULT_HORIZONTAL_BAR_RADIUS, CHART_DEFAULT_MARGIN, CHART_DEFAULT_MAX_REALTIME_POINTS, CHART_DEFAULT_POLLING_INTERVAL, CHART_DEFAULT_STROKE_WIDTH, CHART_EMPTY_MESSAGE, CHART_ERROR_MESSAGE, CHART_LIGHT_THEME, CHART_LOADING_MESSAGE, CHART_STATUSES, CHART_STATUS_COLORS, CHART_VALUE_FORMATS, Caption, Card_default as Card, CardContent_default as CardContent, CardFooter_default as CardFooter, CardHeader_default as CardHeader, Chapter, Chart, ChartContainer, ChartContext, ChartEmptyState, ChartErrorState, ChartHeader, ChartLegend, ChartLoadingState, ChartPanel, ChartPlotFrame, ChartProvider, ChartToolbar, ChartTooltip, Checkbox_default as Checkbox, Chip, CloudinaryImage2 as CloudinaryImage, CloudinaryProvider, CloudinaryVideo, Code, CodeMirrorMarkdownEditor_default as CodeMirrorMarkdownEditor, CommentThread_default as CommentThread, ConfigBootstrap_default as ConfigBootstrap, Configurator, ConfiguratorError, Content, ContentArea_default as ContentArea, CookieBanner, CookiePreferencesModal, DEFAULT_ANALYTICS_CONFIG, DEFAULT_COOKIE_CATEGORIES, DEFAULT_REVIEW_THREAD_CONFIG, DataView2 as DataView, DataViewContent, DataViewFilterGroup, DataViewFooter, DataViewHeader, DataViewPageSize, DataViewPagination, DataViewProvider, DataViewSearch, DataViewSidebar, DataViewSort, DataViewTable_default as DataViewTable, DateSelector_default as DateSelector, DefaultLayout_default as DefaultLayout, Display, DocumentationPanel_default as DocumentationPanel, Drawer, DrawerToggler_default as DrawerToggler, EUIDevLayout_default as EUIDevLayout, EUIProvider, EUI_ANALYTICS_ANONYMOUS_ID_STORAGE_KEY, EUI_ANALYTICS_CONSENT_STORAGE_KEY, EUI_ANALYTICS_QUEUE_STORAGE_KEY, EnvErrorScreen_default as EnvErrorScreen, Flag, Flex, FlexCol_default as FlexCol, FlexRow_default as FlexRow, Footer, FooterNav_default as FooterNav, FooterNavGroup_default as FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse_default as FormResponse, GaugePlot, GenericLayout_default as GenericLayout, GlowWrapper_default as GlowWrapper, Graph, GraphEdge, GraphNode, GraphRenderer, Grid_default as Grid, Header, HeaderNav_default as HeaderNav, HeaderNavGroup_default as HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout_default as HomeLayout, Image2 as Image, ImageInput_default as ImageInput, InfiniteScrollTrigger_default as InfiniteScrollTrigger, Info, Input, InputFile, InputLabel_default as InputLabel, InputList, InputListGroup, InputResponse_default as InputResponse, Label, Layout, Lead, LinePlot, Link, List, ListItem, ListItemElement, ListRoot, MDXMarkdownEditor_default as MDXMarkdownEditor, MDXMarkdownField_default as MDXMarkdownField, MarkdownBlockquote_default as MarkdownBlockquote, MarkdownBreak_default as MarkdownBreak, MarkdownCodeBlock_default as MarkdownCodeBlock, MarkdownContext, MarkdownDetails, MarkdownDocsLayout_default as MarkdownDocsLayout, MarkdownEditor_default as MarkdownEditor, MarkdownEmphasis_default as MarkdownEmphasis, MarkdownField_default as MarkdownField, MarkdownFigcaption, MarkdownFigure, MarkdownHeading_default as MarkdownHeadingComponent, MarkdownImage_default as MarkdownImage, MarkdownInlineCode_default as MarkdownInlineCode, MarkdownLayout_default as MarkdownLayout, MarkdownLink_default as MarkdownLink, MarkdownListItem_default as MarkdownListItem, MarkdownOrderedList, MarkdownParagraph_default as MarkdownParagraph, MarkdownPreviewPane_default as MarkdownPreviewPane, MarkdownProvider_default as MarkdownProvider, MarkdownRenderer_default as MarkdownRenderer, MarkdownSourceEditor_default as MarkdownSourceEditor, MarkdownSplitEditor_default as MarkdownSplitEditor, MarkdownStrikethrough_default as MarkdownStrikethrough, MarkdownStrong_default as MarkdownStrong, MarkdownSummary, MarkdownTOC_default as MarkdownTOC, MarkdownTOCItem_default as MarkdownTOCItem, MarkdownTable_default as MarkdownTable, MarkdownTableBody, MarkdownTableCell, MarkdownTableHead, MarkdownTableHeaderCell, MarkdownTableRow, MarkdownTaskCheckbox_default as MarkdownTaskCheckbox, MarkdownThematicBreak_default as MarkdownThematicBreak, MarkdownToolbar_default as MarkdownToolbar, MarkdownUnorderedList, MarkdownViewer_default as MarkdownViewer, Menu, MenuGroup, MenuItem, MenuItemTitle, Modal_default as Modal, MotionSurface_default as MotionSurface, MultiImageInput_default as MultiImageInput, NumericRating, Overline, Paragraph, PiePlot, PollingChartDataSource, PreviewSwitch, PriceTag, ProgressBar, ProgressBarRating, Quote, Radio_default as Radio, RealtimeChartDataSource, ReviewThread_default as ReviewThread, RouteTab_default as RouteTab, RouteTabs_default as RouteTabs, ScatterPlot, ScrollToTop_default as ScrollToTop, Section, Select_default as Select, ShapeSwitch, ShowMore_default as ShowMore, Sidebar_default as Sidebar, SidebarLayout_default as SidebarLayout, SidemenuLayout_default as SidemenuLayout, Skeleton, Slider_default as Slider, Spinner, StarRating, StarRatingDistribution_default as StarRatingDistribution, StarRatingInput_default as StarRatingInput, StatPlot, StaticChartDataSource, Switch_default as Switch, TNDropdown, TNDropdownItem, TNDropdownTitle, TNGroup, Table, TableBody, TableCell, TableElement, TableFrame, TableHead, TableHeaderCell, TableRow, Tag, Tags_default as Tags, TextArea_default as TextArea, ThemeContext, ThemeProvider, ThemeSelect, ThemeSwitch, TitleBanner, Toast, Tooltip6 as Tooltip, TopNav, Transition, TransitionAccordion_default as TransitionAccordion, TransitionBase_default as TransitionBase, TransitionDropdown_default as TransitionDropdown, TransitionFade_default as TransitionFade, TransitionFadeIn_default as TransitionFadeIn, TransitionScale_default as TransitionScale, TransitionSlide_default as TransitionSlide, Typography, UnderConstructionBanner, ValueBadge, WorldMap, WorldMapCountryTable, YoutubeVideo, YoutubeVideo as YoutubeVideoPlayer, addReplyToCache, addReviewReply, appendReview, applyReactionState, assertAbsoluteURL, buildURL, canDeleteReview, canDeleteReviewReply, canEditReview, canEditReviewReply, canReplyToReview, canReportReview, canReportReviewReply, clearAnalyticsQueueStorage, clearAnonymousIdStorage, clearConsentStorage, cn, createAnalyticsEvent, createAnalyticsId, createConfigurator, createDefaultConsent, createForceLayout, createGridLayout, createHeadingSlug, createTreeLayout, createURLResolver, decrementReplyCount, defaultFormatValue, defaultTiers, ensureAnonymousIdStorage, enumValues, euiToast, extractHeadings, findReview, formatChartLabel, formatChartValue, formatCommentDate, formatConfigError, formatReviewDate, generateHeadingNumbers, getAllowedOrigins, getBrowserHref, getBrowserOrigin, getBrowserRedirectURL, getConsentStatusFromCategories, getCurrencySymbol, getCurrentFullUrl, getCurrentPath, getCurrentReferrer, getCurrentTitle, getDeviceInfo, getDoNotTrackEnabled, getLayout, getNowISOString, getOptimisticDislikeState, getOptimisticLikeState, getSafeRedirect, getViewport, hasReviewReply, incrementReplyCount, isBrowser, isMatch, isRenderFn, limitRealtimePoints, normalize, normalizeChartData, normalizeChartDataPoint, normalizeMarkdown, normalizeReview, normalizeReviewAuthor, normalizeReviewReply, parseJson, parseJsonRecord, parseUrlMap, prependReview, readAnalyticsQueueStorage, readAnonymousIdStorage, readConsentStorage, registerLayout, removeComment, removeCommentTreeFromCache, removeReview, removeReviewReply, replaceRealtimePoints, replaceReview, replaceReviewReply, resolveAppearanceStyles, resolveChartColor, resolveChartColors, resolveWithGlobal, safeReadStorage, safeRemoveStorage, safeWriteStorage, sanitizeHeading, sendToast, slugify, toConfiguratorError, updateComment, updateReplyCacheComment, updateReview, updateReviewReply, upsertReview, useActiveHeading, useAnalytics, useChartContext, useChartData, useChartPolling, useChartRealtime, useChartSeries, useChartTheme, useClickOutside, useCloudinaryConfig, useCookieConsent, useCurrentTheme_default as useCurrentTheme, useDrawer_default as useDrawer, useEUIConfig, useEUIDevPreviewPlatform, useIsMobile_default as useIsMobile, useMarkdown, useMarkdownHeadings, useModal_default as useModal, usePageTracking, useResolvedChartState, useReviewThreadState, useSessionTracking, useTheme_default as useTheme, writeAnalyticsQueueStorage, writeConsentStorage };
|
|
57616
57813
|
//# sourceMappingURL=index.mjs.map
|
|
57617
57814
|
//# sourceMappingURL=index.mjs.map
|