elseware-ui 2.40.4 → 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 +95 -252
- package/dist/index.d.ts +95 -252
- package/dist/index.js +696 -395
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +390 -94
- 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,
|
|
@@ -5100,10 +5100,18 @@ var getCurrentPath = () => {
|
|
|
5100
5100
|
if (!isBrowser()) return void 0;
|
|
5101
5101
|
return `${window.location.pathname}${window.location.search}`;
|
|
5102
5102
|
};
|
|
5103
|
+
var getCurrentFullUrl = () => {
|
|
5104
|
+
if (!isBrowser()) return void 0;
|
|
5105
|
+
return window.location.href;
|
|
5106
|
+
};
|
|
5103
5107
|
var getCurrentReferrer = () => {
|
|
5104
5108
|
if (!isBrowser()) return void 0;
|
|
5105
5109
|
return document.referrer || void 0;
|
|
5106
5110
|
};
|
|
5111
|
+
var getCurrentTitle = () => {
|
|
5112
|
+
if (!isBrowser()) return void 0;
|
|
5113
|
+
return document.title || void 0;
|
|
5114
|
+
};
|
|
5107
5115
|
var getConsentStatusFromCategories = (categories) => {
|
|
5108
5116
|
const optionalCategories = Object.entries(categories).filter(
|
|
5109
5117
|
([key]) => key !== "necessary"
|
|
@@ -5125,12 +5133,19 @@ var createAnalyticsEvent = ({
|
|
|
5125
5133
|
type: type2,
|
|
5126
5134
|
appId,
|
|
5127
5135
|
sessionId,
|
|
5128
|
-
anonymousId
|
|
5129
|
-
userId
|
|
5130
|
-
path:
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
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,
|
|
5146
|
+
metadata: {
|
|
5147
|
+
...options?.metadata
|
|
5148
|
+
}
|
|
5134
5149
|
});
|
|
5135
5150
|
|
|
5136
5151
|
// src/components/analytics/analytics.storage.ts
|
|
@@ -6033,6 +6048,31 @@ function resolveWithGlobal(config, props, defaults) {
|
|
|
6033
6048
|
};
|
|
6034
6049
|
}
|
|
6035
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
|
+
|
|
6036
6076
|
// src/data/enums.ts
|
|
6037
6077
|
var Shape = /* @__PURE__ */ ((Shape2) => {
|
|
6038
6078
|
Shape2["circle"] = "circle";
|
|
@@ -6208,7 +6248,31 @@ var toastShapeStyles = {
|
|
|
6208
6248
|
["softRoundedSquare" /* softRoundedSquare */]: "!rounded-3xl",
|
|
6209
6249
|
["square" /* square */]: "!rounded-none"
|
|
6210
6250
|
};
|
|
6211
|
-
|
|
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 = {
|
|
6212
6276
|
xs: "px-2 py-1 text-xs",
|
|
6213
6277
|
sm: "px-3 py-1.5 text-sm",
|
|
6214
6278
|
md: "px-4 py-2 text-base",
|
|
@@ -6223,24 +6287,54 @@ function Button({
|
|
|
6223
6287
|
loading = false,
|
|
6224
6288
|
disabled = false,
|
|
6225
6289
|
block = false,
|
|
6226
|
-
|
|
6227
|
-
|
|
6290
|
+
compact = false,
|
|
6291
|
+
mode,
|
|
6292
|
+
buttonColor,
|
|
6293
|
+
textColor,
|
|
6294
|
+
contentClassName,
|
|
6295
|
+
labelClassName,
|
|
6296
|
+
variant,
|
|
6297
|
+
appearance,
|
|
6228
6298
|
shape,
|
|
6229
|
-
size
|
|
6299
|
+
size,
|
|
6300
|
+
style: style2,
|
|
6301
|
+
contentStyle,
|
|
6302
|
+
labelStyle,
|
|
6303
|
+
accessibilityLabel,
|
|
6304
|
+
accessibilityRole,
|
|
6305
|
+
accessibilityState,
|
|
6306
|
+
testID,
|
|
6230
6307
|
className,
|
|
6231
6308
|
onMouseMove,
|
|
6309
|
+
onClick,
|
|
6310
|
+
onPress,
|
|
6232
6311
|
...rest
|
|
6233
6312
|
}) {
|
|
6234
|
-
const
|
|
6235
|
-
const
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6313
|
+
const accessibility = accessibilityState;
|
|
6314
|
+
const {
|
|
6315
|
+
shape: resolvedShape,
|
|
6316
|
+
size: resolvedSize,
|
|
6317
|
+
variant: resolvedVariant,
|
|
6318
|
+
appearance: resolvedAppearance
|
|
6319
|
+
} = useResolvedButtonConfig({
|
|
6320
|
+
compact,
|
|
6321
|
+
mode,
|
|
6239
6322
|
variant,
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6323
|
+
appearance,
|
|
6324
|
+
shape,
|
|
6325
|
+
size
|
|
6243
6326
|
});
|
|
6327
|
+
const btnRef = useRef(null);
|
|
6328
|
+
const variantStyles = resolveButtonVariantStyles({
|
|
6329
|
+
appearance: resolvedAppearance,
|
|
6330
|
+
variant: resolvedVariant
|
|
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;
|
|
6244
6338
|
const handleMouseMove = (e) => {
|
|
6245
6339
|
const btn = btnRef.current;
|
|
6246
6340
|
if (!btn) return;
|
|
@@ -6251,6 +6345,12 @@ function Button({
|
|
|
6251
6345
|
btn.style.setProperty("--glow-y", `${y3}px`);
|
|
6252
6346
|
onMouseMove?.(e);
|
|
6253
6347
|
};
|
|
6348
|
+
const handleClick = (e) => {
|
|
6349
|
+
onClick?.(e);
|
|
6350
|
+
if (!e.defaultPrevented) {
|
|
6351
|
+
onPress?.();
|
|
6352
|
+
}
|
|
6353
|
+
};
|
|
6254
6354
|
return /* @__PURE__ */ jsxs(
|
|
6255
6355
|
"button",
|
|
6256
6356
|
{
|
|
@@ -6258,13 +6358,25 @@ function Button({
|
|
|
6258
6358
|
ref: btnRef,
|
|
6259
6359
|
type: type2,
|
|
6260
6360
|
disabled: disabled || loading,
|
|
6361
|
+
onClick: handleClick,
|
|
6261
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
|
+
},
|
|
6262
6373
|
className: cn(
|
|
6263
6374
|
"relative overflow-hidden group inline-flex items-center justify-center gap-2 transition-all duration-300",
|
|
6264
6375
|
variantStyles,
|
|
6265
|
-
|
|
6266
|
-
|
|
6376
|
+
buttonShapes[resolvedShape],
|
|
6377
|
+
webButtonSizes[resolvedSize],
|
|
6267
6378
|
block && "w-full",
|
|
6379
|
+
mode === "text" && "border-transparent bg-transparent",
|
|
6268
6380
|
(loading || disabled) && "brightness-75 grayscale cursor-not-allowed",
|
|
6269
6381
|
!loading && !disabled && "hover:cursor-pointer",
|
|
6270
6382
|
className
|
|
@@ -6286,14 +6398,41 @@ function Button({
|
|
|
6286
6398
|
}
|
|
6287
6399
|
),
|
|
6288
6400
|
loading && /* @__PURE__ */ jsx(AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
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
|
+
)
|
|
6292
6431
|
]
|
|
6293
6432
|
}
|
|
6294
6433
|
);
|
|
6295
6434
|
}
|
|
6296
|
-
var
|
|
6435
|
+
var Button_web_default = Button;
|
|
6297
6436
|
var Backdrop = ({ children: children3, styles }) => {
|
|
6298
6437
|
return /* @__PURE__ */ jsx(
|
|
6299
6438
|
"div",
|
|
@@ -6883,11 +7022,11 @@ function renderTransitionChild(children3, className) {
|
|
|
6883
7022
|
return /* @__PURE__ */ jsx("div", { className, children: children3 });
|
|
6884
7023
|
}
|
|
6885
7024
|
const child = Children.only(children3);
|
|
6886
|
-
if (!
|
|
7025
|
+
if (!React26.isValidElement(child)) {
|
|
6887
7026
|
return /* @__PURE__ */ jsx("div", { className, children: child });
|
|
6888
7027
|
}
|
|
6889
7028
|
const element7 = child;
|
|
6890
|
-
return
|
|
7029
|
+
return React26.cloneElement(element7, {
|
|
6891
7030
|
className: classNames77(element7.props.className, className)
|
|
6892
7031
|
});
|
|
6893
7032
|
}
|
|
@@ -7777,7 +7916,7 @@ var Form = ({
|
|
|
7777
7916
|
}
|
|
7778
7917
|
);
|
|
7779
7918
|
};
|
|
7780
|
-
var
|
|
7919
|
+
var sizes = {
|
|
7781
7920
|
xs: "px-2 py-1 text-xs",
|
|
7782
7921
|
sm: "px-3 py-2 text-sm",
|
|
7783
7922
|
md: "px-4 py-2 text-base",
|
|
@@ -7798,7 +7937,7 @@ function FormResponse({
|
|
|
7798
7937
|
"font-poppins font-light text-sm": true,
|
|
7799
7938
|
[`${variantsLite[variant]}`]: variant,
|
|
7800
7939
|
[`${shapes[shape]}`]: shape,
|
|
7801
|
-
[`${
|
|
7940
|
+
[`${sizes[size]}`]: size,
|
|
7802
7941
|
[`${styles}`]: styles
|
|
7803
7942
|
}),
|
|
7804
7943
|
children: text10
|
|
@@ -8454,7 +8593,7 @@ var Breadcrumb = ({
|
|
|
8454
8593
|
navigate(item.href);
|
|
8455
8594
|
}
|
|
8456
8595
|
};
|
|
8457
|
-
return /* @__PURE__ */ jsxs(
|
|
8596
|
+
return /* @__PURE__ */ jsxs(React26.Fragment, { children: [
|
|
8458
8597
|
/* @__PURE__ */ jsx(
|
|
8459
8598
|
BreadcrumbItem_default,
|
|
8460
8599
|
{
|
|
@@ -16398,7 +16537,7 @@ var ListItem = ({
|
|
|
16398
16537
|
children: bullet
|
|
16399
16538
|
}
|
|
16400
16539
|
),
|
|
16401
|
-
/* @__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(
|
|
16402
16541
|
TypographyComponent,
|
|
16403
16542
|
{
|
|
16404
16543
|
className: cn(
|
|
@@ -16432,7 +16571,7 @@ function normalizeItem(item, defaultBulletType) {
|
|
|
16432
16571
|
bulletType: defaultBulletType
|
|
16433
16572
|
};
|
|
16434
16573
|
}
|
|
16435
|
-
if (
|
|
16574
|
+
if (React26.isValidElement(item)) {
|
|
16436
16575
|
return {
|
|
16437
16576
|
content: item,
|
|
16438
16577
|
bulletType: defaultBulletType
|
|
@@ -16737,7 +16876,7 @@ var ProgressBar = ({
|
|
|
16737
16876
|
hasBottomLabel && /* @__PURE__ */ jsx("div", { className: "mt-2", children: labelNode })
|
|
16738
16877
|
] });
|
|
16739
16878
|
};
|
|
16740
|
-
var
|
|
16879
|
+
var sizes2 = {
|
|
16741
16880
|
["xs" /* xs */]: "text-[10px]",
|
|
16742
16881
|
["sm" /* sm */]: "text-xs",
|
|
16743
16882
|
["md" /* md */]: "text-sm",
|
|
@@ -16767,7 +16906,7 @@ var StarRating = ({
|
|
|
16767
16906
|
className: cn(
|
|
16768
16907
|
"inline-flex items-center gap-[2px]",
|
|
16769
16908
|
"text-yellow-500 dark:text-yellow-400",
|
|
16770
|
-
|
|
16909
|
+
sizes2[size],
|
|
16771
16910
|
iconClassName
|
|
16772
16911
|
),
|
|
16773
16912
|
children: [
|
|
@@ -16780,7 +16919,7 @@ var StarRating = ({
|
|
|
16780
16919
|
showValue && valuePosition === "end" && ratingValue
|
|
16781
16920
|
] });
|
|
16782
16921
|
};
|
|
16783
|
-
var
|
|
16922
|
+
var sizes3 = {
|
|
16784
16923
|
["xs" /* xs */]: {
|
|
16785
16924
|
value: "text-2xl",
|
|
16786
16925
|
review: "text-xs"
|
|
@@ -16812,7 +16951,7 @@ var NumericRating = ({
|
|
|
16812
16951
|
className,
|
|
16813
16952
|
...rest
|
|
16814
16953
|
}) => {
|
|
16815
|
-
const sizeStyles =
|
|
16954
|
+
const sizeStyles = sizes3[size];
|
|
16816
16955
|
return /* @__PURE__ */ jsxs(
|
|
16817
16956
|
"div",
|
|
16818
16957
|
{
|
|
@@ -17586,11 +17725,44 @@ var ThemeSwitch = () => {
|
|
|
17586
17725
|
}
|
|
17587
17726
|
);
|
|
17588
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
|
+
}));
|
|
17589
17762
|
var ShapeSwitch = () => {
|
|
17590
17763
|
const { config, setConfig } = useEUIConfig();
|
|
17591
17764
|
const currentShape = config.global?.shape ?? "square";
|
|
17592
|
-
const handleChange = (
|
|
17593
|
-
const shape = e.target.value;
|
|
17765
|
+
const handleChange = (shape) => {
|
|
17594
17766
|
setConfig((prev) => ({
|
|
17595
17767
|
...prev,
|
|
17596
17768
|
global: {
|
|
@@ -17599,15 +17771,41 @@ var ShapeSwitch = () => {
|
|
|
17599
17771
|
}
|
|
17600
17772
|
}));
|
|
17601
17773
|
};
|
|
17602
|
-
return /* @__PURE__ */ jsx(
|
|
17603
|
-
|
|
17774
|
+
return /* @__PURE__ */ jsx(
|
|
17775
|
+
ThemeSelect,
|
|
17604
17776
|
{
|
|
17605
|
-
|
|
17777
|
+
ariaLabel: "Global shape",
|
|
17778
|
+
label: "Shape",
|
|
17606
17779
|
onChange: handleChange,
|
|
17607
|
-
|
|
17608
|
-
|
|
17780
|
+
options: shapeOptions,
|
|
17781
|
+
value: currentShape
|
|
17609
17782
|
}
|
|
17610
|
-
)
|
|
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
|
+
);
|
|
17611
17809
|
};
|
|
17612
17810
|
|
|
17613
17811
|
// src/hooks/theme/useCurrentTheme.ts
|
|
@@ -29065,7 +29263,7 @@ function AsyncStateCard({
|
|
|
29065
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 })
|
|
29066
29264
|
] }),
|
|
29067
29265
|
onAction && actionText && /* @__PURE__ */ jsx(
|
|
29068
|
-
|
|
29266
|
+
Button_web_default,
|
|
29069
29267
|
{
|
|
29070
29268
|
type: "button",
|
|
29071
29269
|
text: actionText,
|
|
@@ -29080,7 +29278,7 @@ function AsyncStateCard({
|
|
|
29080
29278
|
}
|
|
29081
29279
|
);
|
|
29082
29280
|
}
|
|
29083
|
-
var AsyncStateCard_default =
|
|
29281
|
+
var AsyncStateCard_default = React26.memo(AsyncStateCard);
|
|
29084
29282
|
|
|
29085
29283
|
// src/components/utils/async-component-wrapper/asyncError.utils.ts
|
|
29086
29284
|
var getDefaultErrorMessage = (error) => {
|
|
@@ -29261,7 +29459,7 @@ function AsyncComponentWrapper({
|
|
|
29261
29459
|
/* @__PURE__ */ jsx("div", { className: cn(contentClassName), children: children3 })
|
|
29262
29460
|
] });
|
|
29263
29461
|
}
|
|
29264
|
-
var AsyncComponentWrapper_default =
|
|
29462
|
+
var AsyncComponentWrapper_default = React26.memo(AsyncComponentWrapper);
|
|
29265
29463
|
function Modal({
|
|
29266
29464
|
title,
|
|
29267
29465
|
show = false,
|
|
@@ -29428,7 +29626,7 @@ var CookiePreferencesModal = ({
|
|
|
29428
29626
|
}) }),
|
|
29429
29627
|
/* @__PURE__ */ jsxs("div", { className: "mt-5 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
29430
29628
|
/* @__PURE__ */ jsx(
|
|
29431
|
-
|
|
29629
|
+
Button_web_default,
|
|
29432
29630
|
{
|
|
29433
29631
|
type: "button",
|
|
29434
29632
|
text: cancelLabel,
|
|
@@ -29440,7 +29638,7 @@ var CookiePreferencesModal = ({
|
|
|
29440
29638
|
}
|
|
29441
29639
|
),
|
|
29442
29640
|
/* @__PURE__ */ jsx(
|
|
29443
|
-
|
|
29641
|
+
Button_web_default,
|
|
29444
29642
|
{
|
|
29445
29643
|
type: "button",
|
|
29446
29644
|
text: saveLabel,
|
|
@@ -29532,7 +29730,7 @@ var CookieBanner = ({
|
|
|
29532
29730
|
] }),
|
|
29533
29731
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
29534
29732
|
/* @__PURE__ */ jsx(
|
|
29535
|
-
|
|
29733
|
+
Button_web_default,
|
|
29536
29734
|
{
|
|
29537
29735
|
type: "button",
|
|
29538
29736
|
text: acceptAllLabel,
|
|
@@ -29544,7 +29742,7 @@ var CookieBanner = ({
|
|
|
29544
29742
|
}
|
|
29545
29743
|
),
|
|
29546
29744
|
showCustomize ? /* @__PURE__ */ jsx(
|
|
29547
|
-
|
|
29745
|
+
Button_web_default,
|
|
29548
29746
|
{
|
|
29549
29747
|
type: "button",
|
|
29550
29748
|
text: customizeLabel,
|
|
@@ -29556,7 +29754,7 @@ var CookieBanner = ({
|
|
|
29556
29754
|
}
|
|
29557
29755
|
) : null,
|
|
29558
29756
|
showRejectAll ? /* @__PURE__ */ jsx(
|
|
29559
|
-
|
|
29757
|
+
Button_web_default,
|
|
29560
29758
|
{
|
|
29561
29759
|
type: "button",
|
|
29562
29760
|
text: rejectAllLabel,
|
|
@@ -29588,34 +29786,101 @@ var CookieBanner = ({
|
|
|
29588
29786
|
var usePageTracking = ({
|
|
29589
29787
|
path: path2,
|
|
29590
29788
|
search: search3 = "",
|
|
29789
|
+
title,
|
|
29790
|
+
fullUrl,
|
|
29791
|
+
metadata,
|
|
29591
29792
|
enabled = true,
|
|
29793
|
+
trackPageLeave = false,
|
|
29592
29794
|
dedupe = true
|
|
29593
29795
|
}) => {
|
|
29594
29796
|
const { track } = useAnalytics();
|
|
29595
29797
|
const trackRef = useRef(track);
|
|
29798
|
+
const enteredAtRef = useRef(Date.now());
|
|
29596
29799
|
const previousPathRef = useRef(null);
|
|
29800
|
+
const trackedPathsRef = useRef(/* @__PURE__ */ new Set());
|
|
29597
29801
|
useEffect(() => {
|
|
29598
29802
|
trackRef.current = track;
|
|
29599
29803
|
}, [track]);
|
|
29804
|
+
const metadataKey = useMemo(() => JSON.stringify(metadata ?? {}), [metadata]);
|
|
29600
29805
|
useEffect(() => {
|
|
29601
29806
|
if (!enabled) return;
|
|
29602
29807
|
const nextPath = `${path2}${search3}`;
|
|
29603
29808
|
if (!nextPath) return;
|
|
29604
|
-
if (dedupe &&
|
|
29809
|
+
if (dedupe && trackedPathsRef.current.has(nextPath)) {
|
|
29605
29810
|
return;
|
|
29606
29811
|
}
|
|
29812
|
+
if (trackPageLeave && previousPathRef.current) {
|
|
29813
|
+
const durationMs = Date.now() - enteredAtRef.current;
|
|
29814
|
+
trackRef.current("page_leave", {
|
|
29815
|
+
path: previousPathRef.current,
|
|
29816
|
+
durationMs,
|
|
29817
|
+
metadata
|
|
29818
|
+
});
|
|
29819
|
+
}
|
|
29820
|
+
enteredAtRef.current = Date.now();
|
|
29607
29821
|
previousPathRef.current = nextPath;
|
|
29822
|
+
trackedPathsRef.current.add(nextPath);
|
|
29608
29823
|
trackRef.current("page_view", {
|
|
29609
|
-
path: nextPath
|
|
29824
|
+
path: nextPath,
|
|
29825
|
+
title,
|
|
29826
|
+
fullUrl,
|
|
29827
|
+
metadata
|
|
29610
29828
|
});
|
|
29611
|
-
|
|
29829
|
+
return () => {
|
|
29830
|
+
if (!trackPageLeave) return;
|
|
29831
|
+
const durationMs = Date.now() - enteredAtRef.current;
|
|
29832
|
+
trackRef.current("page_leave", {
|
|
29833
|
+
path: nextPath,
|
|
29834
|
+
durationMs,
|
|
29835
|
+
metadata
|
|
29836
|
+
});
|
|
29837
|
+
};
|
|
29838
|
+
}, [
|
|
29839
|
+
dedupe,
|
|
29840
|
+
enabled,
|
|
29841
|
+
fullUrl,
|
|
29842
|
+
metadataKey,
|
|
29843
|
+
path2,
|
|
29844
|
+
search3,
|
|
29845
|
+
title,
|
|
29846
|
+
trackPageLeave
|
|
29847
|
+
]);
|
|
29612
29848
|
};
|
|
29613
|
-
|
|
29614
|
-
// src/components/analytics/hooks/useSessionTracking.ts
|
|
29615
29849
|
var useSessionTracking = ({
|
|
29616
|
-
enabled = true
|
|
29850
|
+
enabled = true,
|
|
29851
|
+
metadata
|
|
29617
29852
|
} = {}) => {
|
|
29618
|
-
|
|
29853
|
+
const { track } = useAnalytics();
|
|
29854
|
+
const startedAtRef = useRef(Date.now());
|
|
29855
|
+
const endedRef = useRef(false);
|
|
29856
|
+
useEffect(() => {
|
|
29857
|
+
if (!enabled || !isBrowser()) return;
|
|
29858
|
+
startedAtRef.current = Date.now();
|
|
29859
|
+
endedRef.current = false;
|
|
29860
|
+
track("session_start", {
|
|
29861
|
+
metadata
|
|
29862
|
+
});
|
|
29863
|
+
const endSession = () => {
|
|
29864
|
+
if (endedRef.current) return;
|
|
29865
|
+
endedRef.current = true;
|
|
29866
|
+
track("session_end", {
|
|
29867
|
+
durationMs: Date.now() - startedAtRef.current,
|
|
29868
|
+
metadata
|
|
29869
|
+
});
|
|
29870
|
+
};
|
|
29871
|
+
const handleVisibilityChange = () => {
|
|
29872
|
+
if (document.visibilityState === "hidden") {
|
|
29873
|
+
endSession();
|
|
29874
|
+
}
|
|
29875
|
+
};
|
|
29876
|
+
window.addEventListener("pagehide", endSession);
|
|
29877
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
29878
|
+
return () => {
|
|
29879
|
+
endSession();
|
|
29880
|
+
window.removeEventListener("pagehide", endSession);
|
|
29881
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
29882
|
+
};
|
|
29883
|
+
}, [enabled, metadata, track]);
|
|
29619
29884
|
};
|
|
29620
29885
|
var ContentArea = forwardRef(
|
|
29621
29886
|
({ children: children3, styles, enablePadding = false }, ref) => {
|
|
@@ -29703,6 +29968,9 @@ var Layout = ({
|
|
|
29703
29968
|
var Header = ({
|
|
29704
29969
|
position: position4 = "static",
|
|
29705
29970
|
children: children3,
|
|
29971
|
+
onPreviewPlatformChange,
|
|
29972
|
+
previewPlatform = "web",
|
|
29973
|
+
showPreviewPlatformSelector = false,
|
|
29706
29974
|
styles
|
|
29707
29975
|
}) => {
|
|
29708
29976
|
return /* @__PURE__ */ jsx(
|
|
@@ -29717,9 +29985,16 @@ var Header = ({
|
|
|
29717
29985
|
[`${styles}`]: styles
|
|
29718
29986
|
}),
|
|
29719
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: [
|
|
29720
|
-
/* @__PURE__ */ jsx("div", { children: "
|
|
29988
|
+
/* @__PURE__ */ jsx("div", { children: "elseware UI" }),
|
|
29721
29989
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
29722
29990
|
/* @__PURE__ */ jsx(ThemeSwitch, {}),
|
|
29991
|
+
showPreviewPlatformSelector ? /* @__PURE__ */ jsx(
|
|
29992
|
+
PreviewSwitch,
|
|
29993
|
+
{
|
|
29994
|
+
onChange: onPreviewPlatformChange,
|
|
29995
|
+
value: previewPlatform
|
|
29996
|
+
}
|
|
29997
|
+
) : null,
|
|
29723
29998
|
/* @__PURE__ */ jsx(ShapeSwitch, {})
|
|
29724
29999
|
] })
|
|
29725
30000
|
] }) })
|
|
@@ -29998,7 +30273,7 @@ function CommentComposer({
|
|
|
29998
30273
|
),
|
|
29999
30274
|
(focused || value.length > 0) && /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
30000
30275
|
/* @__PURE__ */ jsx(
|
|
30001
|
-
|
|
30276
|
+
Button_web_default,
|
|
30002
30277
|
{
|
|
30003
30278
|
text: "Cancel",
|
|
30004
30279
|
variant: "secondary",
|
|
@@ -30008,7 +30283,7 @@ function CommentComposer({
|
|
|
30008
30283
|
}
|
|
30009
30284
|
),
|
|
30010
30285
|
/* @__PURE__ */ jsx(
|
|
30011
|
-
|
|
30286
|
+
Button_web_default,
|
|
30012
30287
|
{
|
|
30013
30288
|
text: submitLabel,
|
|
30014
30289
|
variant: "primary",
|
|
@@ -31671,7 +31946,7 @@ function ReviewForm({
|
|
|
31671
31946
|
] }),
|
|
31672
31947
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
31673
31948
|
onCancel && /* @__PURE__ */ jsx(
|
|
31674
|
-
|
|
31949
|
+
Button_web_default,
|
|
31675
31950
|
{
|
|
31676
31951
|
text: cancelLabel,
|
|
31677
31952
|
variant: "secondary",
|
|
@@ -31681,7 +31956,7 @@ function ReviewForm({
|
|
|
31681
31956
|
}
|
|
31682
31957
|
),
|
|
31683
31958
|
/* @__PURE__ */ jsx(
|
|
31684
|
-
|
|
31959
|
+
Button_web_default,
|
|
31685
31960
|
{
|
|
31686
31961
|
text: submitLabel,
|
|
31687
31962
|
variant: "primary",
|
|
@@ -31707,7 +31982,7 @@ function ReviewComposer({
|
|
|
31707
31982
|
if (!currentUser) {
|
|
31708
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: [
|
|
31709
31984
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Please login to post your review." }),
|
|
31710
|
-
onLoginClick && /* @__PURE__ */ jsx(
|
|
31985
|
+
onLoginClick && /* @__PURE__ */ jsx(Button_web_default, { text: "Login", variant: "primary", onClick: onLoginClick })
|
|
31711
31986
|
] }) });
|
|
31712
31987
|
}
|
|
31713
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: [
|
|
@@ -32083,7 +32358,7 @@ function MyReviewPanel({
|
|
|
32083
32358
|
/* @__PURE__ */ jsx(HeaderComponent, { review: myReview, config }),
|
|
32084
32359
|
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
32085
32360
|
/* @__PURE__ */ jsx(
|
|
32086
|
-
|
|
32361
|
+
Button_web_default,
|
|
32087
32362
|
{
|
|
32088
32363
|
text: "Edit",
|
|
32089
32364
|
variant: "secondary",
|
|
@@ -32093,7 +32368,7 @@ function MyReviewPanel({
|
|
|
32093
32368
|
}
|
|
32094
32369
|
),
|
|
32095
32370
|
onDeleteReview && /* @__PURE__ */ jsx(
|
|
32096
|
-
|
|
32371
|
+
Button_web_default,
|
|
32097
32372
|
{
|
|
32098
32373
|
text: "Delete",
|
|
32099
32374
|
variant: "danger",
|
|
@@ -33038,7 +33313,7 @@ function ReviewThread({
|
|
|
33038
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." })
|
|
33039
33314
|
] }),
|
|
33040
33315
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
33041
|
-
|
|
33316
|
+
Button_web_default,
|
|
33042
33317
|
{
|
|
33043
33318
|
text: "Retry",
|
|
33044
33319
|
variant: "danger",
|
|
@@ -33878,11 +34153,11 @@ function addChildren(props, children3) {
|
|
|
33878
34153
|
}
|
|
33879
34154
|
}
|
|
33880
34155
|
}
|
|
33881
|
-
function productionCreate(_2,
|
|
34156
|
+
function productionCreate(_2, jsx257, jsxs129) {
|
|
33882
34157
|
return create3;
|
|
33883
34158
|
function create3(_3, type2, props, key) {
|
|
33884
34159
|
const isStaticChildren = Array.isArray(props.children);
|
|
33885
|
-
const fn = isStaticChildren ?
|
|
34160
|
+
const fn = isStaticChildren ? jsxs129 : jsx257;
|
|
33886
34161
|
return key ? fn(type2, props, key) : fn(type2, props);
|
|
33887
34162
|
}
|
|
33888
34163
|
}
|
|
@@ -42272,7 +42547,7 @@ function markdownTable(table2, options) {
|
|
|
42272
42547
|
let rowIndex = -1;
|
|
42273
42548
|
while (++rowIndex < table2.length) {
|
|
42274
42549
|
const row2 = [];
|
|
42275
|
-
const
|
|
42550
|
+
const sizes5 = [];
|
|
42276
42551
|
let columnIndex2 = -1;
|
|
42277
42552
|
if (table2[rowIndex].length > mostCellsPerRow) {
|
|
42278
42553
|
mostCellsPerRow = table2[rowIndex].length;
|
|
@@ -42281,7 +42556,7 @@ function markdownTable(table2, options) {
|
|
|
42281
42556
|
const cell = serialize2(table2[rowIndex][columnIndex2]);
|
|
42282
42557
|
if (settings.alignDelimiters !== false) {
|
|
42283
42558
|
const size = stringLength(cell);
|
|
42284
|
-
|
|
42559
|
+
sizes5[columnIndex2] = size;
|
|
42285
42560
|
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
42286
42561
|
longestCellByColumn[columnIndex2] = size;
|
|
42287
42562
|
}
|
|
@@ -42289,7 +42564,7 @@ function markdownTable(table2, options) {
|
|
|
42289
42564
|
row2.push(cell);
|
|
42290
42565
|
}
|
|
42291
42566
|
cellMatrix[rowIndex] = row2;
|
|
42292
|
-
sizeMatrix[rowIndex] =
|
|
42567
|
+
sizeMatrix[rowIndex] = sizes5;
|
|
42293
42568
|
}
|
|
42294
42569
|
let columnIndex = -1;
|
|
42295
42570
|
if (typeof align === "object" && "length" in align) {
|
|
@@ -42304,7 +42579,7 @@ function markdownTable(table2, options) {
|
|
|
42304
42579
|
}
|
|
42305
42580
|
columnIndex = -1;
|
|
42306
42581
|
const row = [];
|
|
42307
|
-
const
|
|
42582
|
+
const sizes4 = [];
|
|
42308
42583
|
while (++columnIndex < mostCellsPerRow) {
|
|
42309
42584
|
const code4 = alignments[columnIndex];
|
|
42310
42585
|
let before = "";
|
|
@@ -42327,17 +42602,17 @@ function markdownTable(table2, options) {
|
|
|
42327
42602
|
if (size > longestCellByColumn[columnIndex]) {
|
|
42328
42603
|
longestCellByColumn[columnIndex] = size;
|
|
42329
42604
|
}
|
|
42330
|
-
|
|
42605
|
+
sizes4[columnIndex] = size;
|
|
42331
42606
|
}
|
|
42332
42607
|
row[columnIndex] = cell;
|
|
42333
42608
|
}
|
|
42334
42609
|
cellMatrix.splice(1, 0, row);
|
|
42335
|
-
sizeMatrix.splice(1, 0,
|
|
42610
|
+
sizeMatrix.splice(1, 0, sizes4);
|
|
42336
42611
|
rowIndex = -1;
|
|
42337
42612
|
const lines = [];
|
|
42338
42613
|
while (++rowIndex < cellMatrix.length) {
|
|
42339
42614
|
const row2 = cellMatrix[rowIndex];
|
|
42340
|
-
const
|
|
42615
|
+
const sizes5 = sizeMatrix[rowIndex];
|
|
42341
42616
|
columnIndex = -1;
|
|
42342
42617
|
const line = [];
|
|
42343
42618
|
while (++columnIndex < mostCellsPerRow) {
|
|
@@ -42345,7 +42620,7 @@ function markdownTable(table2, options) {
|
|
|
42345
42620
|
let before = "";
|
|
42346
42621
|
let after = "";
|
|
42347
42622
|
if (settings.alignDelimiters !== false) {
|
|
42348
|
-
const size = longestCellByColumn[columnIndex] - (
|
|
42623
|
+
const size = longestCellByColumn[columnIndex] - (sizes5[columnIndex] || 0);
|
|
42349
42624
|
const code4 = alignments[columnIndex];
|
|
42350
42625
|
if (code4 === 114) {
|
|
42351
42626
|
before = " ".repeat(size);
|
|
@@ -54141,7 +54416,7 @@ function createElement2(_ref) {
|
|
|
54141
54416
|
});
|
|
54142
54417
|
}
|
|
54143
54418
|
var children3 = childrenCreator(node2.children);
|
|
54144
|
-
return /* @__PURE__ */
|
|
54419
|
+
return /* @__PURE__ */ React26.createElement(TagName, _extends({
|
|
54145
54420
|
key
|
|
54146
54421
|
}, props), children3);
|
|
54147
54422
|
}
|
|
@@ -54184,7 +54459,7 @@ function getAllLineNumbers(_ref) {
|
|
|
54184
54459
|
var lines = _ref.lines, startingLineNumber = _ref.startingLineNumber, style2 = _ref.style;
|
|
54185
54460
|
return lines.map(function(_2, i) {
|
|
54186
54461
|
var number3 = i + startingLineNumber;
|
|
54187
|
-
return /* @__PURE__ */
|
|
54462
|
+
return /* @__PURE__ */ React26.createElement("span", {
|
|
54188
54463
|
key: "line-".concat(i),
|
|
54189
54464
|
className: "react-syntax-highlighter-line-number",
|
|
54190
54465
|
style: typeof style2 === "function" ? style2(number3) : style2
|
|
@@ -54196,7 +54471,7 @@ function AllLineNumbers(_ref2) {
|
|
|
54196
54471
|
"float": "left",
|
|
54197
54472
|
paddingRight: "10px"
|
|
54198
54473
|
} : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
|
|
54199
|
-
return /* @__PURE__ */
|
|
54474
|
+
return /* @__PURE__ */ React26.createElement("code", {
|
|
54200
54475
|
style: Object.assign({}, codeStyle, containerStyle)
|
|
54201
54476
|
}, getAllLineNumbers({
|
|
54202
54477
|
lines: codeString.replace(/\n$/, "").split("\n"),
|
|
@@ -54417,7 +54692,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54417
54692
|
style: _objectSpread2(_objectSpread2({}, style2['code[class*="language-"]']), style2['code[class*="language-'.concat(language, '"]')])
|
|
54418
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);
|
|
54419
54694
|
astGenerator = astGenerator || defaultAstGenerator;
|
|
54420
|
-
var allLineNumbers = showLineNumbers ? /* @__PURE__ */
|
|
54695
|
+
var allLineNumbers = showLineNumbers ? /* @__PURE__ */ React26.createElement(AllLineNumbers, {
|
|
54421
54696
|
containerStyle: lineNumberContainerStyle,
|
|
54422
54697
|
codeStyle: codeTagProps.style || {},
|
|
54423
54698
|
numberStyle: lineNumberStyle,
|
|
@@ -54444,7 +54719,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54444
54719
|
}, codeTagProps.style);
|
|
54445
54720
|
}
|
|
54446
54721
|
if (!astGenerator) {
|
|
54447
|
-
return /* @__PURE__ */
|
|
54722
|
+
return /* @__PURE__ */ React26.createElement(PreTag, preProps, allLineNumbers, /* @__PURE__ */ React26.createElement(CodeTag, codeTagProps, code4));
|
|
54448
54723
|
}
|
|
54449
54724
|
if (wrapLines === void 0 && renderer || wrapLongLines) wrapLines = true;
|
|
54450
54725
|
renderer = renderer || defaultRenderer;
|
|
@@ -54464,7 +54739,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54464
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;
|
|
54465
54740
|
var largestLineNumber = startingLineNumber + lineBreakCount;
|
|
54466
54741
|
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
|
54467
|
-
return /* @__PURE__ */
|
|
54742
|
+
return /* @__PURE__ */ React26.createElement(PreTag, preProps, /* @__PURE__ */ React26.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
|
54468
54743
|
rows,
|
|
54469
54744
|
stylesheet: style2,
|
|
54470
54745
|
useInlineStyles
|
|
@@ -54801,7 +55076,7 @@ var json_default = json;
|
|
|
54801
55076
|
|
|
54802
55077
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/jsx.js
|
|
54803
55078
|
init_jsx();
|
|
54804
|
-
var jsx_default =
|
|
55079
|
+
var jsx_default = jsx218;
|
|
54805
55080
|
|
|
54806
55081
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/markup.js
|
|
54807
55082
|
init_markup();
|
|
@@ -57467,11 +57742,32 @@ function SidemenuLayout({ data, children: children3 }) {
|
|
|
57467
57742
|
) });
|
|
57468
57743
|
}
|
|
57469
57744
|
var SidemenuLayout_default = SidemenuLayout;
|
|
57745
|
+
var EUIDevPreviewPlatformContext = createContext({
|
|
57746
|
+
platform: "web",
|
|
57747
|
+
setPlatform: () => void 0
|
|
57748
|
+
});
|
|
57749
|
+
var useEUIDevPreviewPlatform = () => useContext(EUIDevPreviewPlatformContext);
|
|
57470
57750
|
function EUIDevLayout({
|
|
57471
57751
|
children: children3,
|
|
57472
|
-
header
|
|
57752
|
+
header,
|
|
57473
57753
|
footer: footer2 = /* @__PURE__ */ jsx(Footer, {})
|
|
57474
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
|
+
);
|
|
57475
57771
|
return /* @__PURE__ */ jsx(
|
|
57476
57772
|
EUIProvider,
|
|
57477
57773
|
{
|
|
@@ -57483,8 +57779,8 @@ function EUIDevLayout({
|
|
|
57483
57779
|
}
|
|
57484
57780
|
},
|
|
57485
57781
|
children: /* @__PURE__ */ jsx(GenericLayout_default, { children: /* @__PURE__ */ jsxs(Layout, { children: [
|
|
57486
|
-
|
|
57487
|
-
/* @__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 }) }) }),
|
|
57488
57784
|
footer2
|
|
57489
57785
|
] }) })
|
|
57490
57786
|
}
|
|
@@ -57513,6 +57809,6 @@ function ScrollToTop({
|
|
|
57513
57809
|
}
|
|
57514
57810
|
var ScrollToTop_default = ScrollToTop;
|
|
57515
57811
|
|
|
57516
|
-
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 };
|
|
57517
57813
|
//# sourceMappingURL=index.mjs.map
|
|
57518
57814
|
//# sourceMappingURL=index.mjs.map
|