elseware-ui 3.0.2 → 3.0.4
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 +30 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +487 -257
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +486 -257
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.d.mts +2 -2
- package/dist/index.native.d.ts +2 -2
- package/dist/index.native.js +71 -52
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +71 -52
- package/dist/index.native.mjs.map +1 -1
- package/dist/{resolveGlobalConfigs-CL-Puk7Y.d.mts → resolveGlobalConfigs-PbcnVEZr.d.mts} +3 -1
- package/dist/{resolveGlobalConfigs-CL-Puk7Y.d.ts → resolveGlobalConfigs-PbcnVEZr.d.ts} +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var tailwindMerge = require('tailwind-merge');
|
|
|
6
6
|
var index_js$1 = require('react-icons/ai/index.js');
|
|
7
7
|
var formik = require('formik');
|
|
8
8
|
var index_js$2 = require('react-icons/fa/index.js');
|
|
9
|
-
var
|
|
9
|
+
var classNames73 = require('classnames');
|
|
10
10
|
var reactBeautifulDnd = require('react-beautiful-dnd');
|
|
11
11
|
var cloudinaryReact = require('cloudinary-react');
|
|
12
12
|
var index_js = require('react-icons/md/index.js');
|
|
@@ -27,7 +27,7 @@ require('@mdxeditor/editor/style.css');
|
|
|
27
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
28
|
|
|
29
29
|
var React26__default = /*#__PURE__*/_interopDefault(React26);
|
|
30
|
-
var
|
|
30
|
+
var classNames73__default = /*#__PURE__*/_interopDefault(classNames73);
|
|
31
31
|
var ReactWorldFlags__default = /*#__PURE__*/_interopDefault(ReactWorldFlags);
|
|
32
32
|
var emojiFlags__default = /*#__PURE__*/_interopDefault(emojiFlags);
|
|
33
33
|
var CodeMirror__default = /*#__PURE__*/_interopDefault(CodeMirror);
|
|
@@ -4728,7 +4728,7 @@ var init_python = __esm({
|
|
|
4728
4728
|
});
|
|
4729
4729
|
|
|
4730
4730
|
// node_modules/refractor/lang/jsx.js
|
|
4731
|
-
function
|
|
4731
|
+
function jsx217(Prism2) {
|
|
4732
4732
|
Prism2.register(javascript);
|
|
4733
4733
|
Prism2.register(markup);
|
|
4734
4734
|
(function(Prism3) {
|
|
@@ -4861,14 +4861,14 @@ var init_jsx = __esm({
|
|
|
4861
4861
|
"node_modules/refractor/lang/jsx.js"() {
|
|
4862
4862
|
init_javascript();
|
|
4863
4863
|
init_markup();
|
|
4864
|
-
|
|
4865
|
-
|
|
4864
|
+
jsx217.displayName = "jsx";
|
|
4865
|
+
jsx217.aliases = [];
|
|
4866
4866
|
}
|
|
4867
4867
|
});
|
|
4868
4868
|
|
|
4869
4869
|
// node_modules/refractor/lang/tsx.js
|
|
4870
4870
|
function tsx(Prism2) {
|
|
4871
|
-
Prism2.register(
|
|
4871
|
+
Prism2.register(jsx217);
|
|
4872
4872
|
Prism2.register(typescript);
|
|
4873
4873
|
(function(Prism3) {
|
|
4874
4874
|
var typescript2 = Prism3.util.clone(Prism3.languages.typescript);
|
|
@@ -6463,7 +6463,7 @@ var Backdrop = ({ children: children3, styles }) => {
|
|
|
6463
6463
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6464
6464
|
"div",
|
|
6465
6465
|
{
|
|
6466
|
-
className:
|
|
6466
|
+
className: classNames73__default.default({
|
|
6467
6467
|
"bg-black/75 top-0 bottom-0 left-0 right-0 z-50 fixed inset-0 flex items-center justify-center overflow-hidden": true,
|
|
6468
6468
|
[`${styles}`]: styles
|
|
6469
6469
|
}),
|
|
@@ -7053,7 +7053,7 @@ function renderTransitionChild(children3, className) {
|
|
|
7053
7053
|
}
|
|
7054
7054
|
const element7 = child;
|
|
7055
7055
|
return React26__default.default.cloneElement(element7, {
|
|
7056
|
-
className:
|
|
7056
|
+
className: classNames73__default.default(element7.props.className, className)
|
|
7057
7057
|
});
|
|
7058
7058
|
}
|
|
7059
7059
|
function TransitionBase({
|
|
@@ -7073,7 +7073,7 @@ function TransitionBase({
|
|
|
7073
7073
|
if (!mounted && unmountOnExit) {
|
|
7074
7074
|
return null;
|
|
7075
7075
|
}
|
|
7076
|
-
const transitionClassName =
|
|
7076
|
+
const transitionClassName = classNames73__default.default(
|
|
7077
7077
|
visibility ? enterClassName : leaveClassName,
|
|
7078
7078
|
active ? visibleClassName : hiddenClassName
|
|
7079
7079
|
);
|
|
@@ -7426,7 +7426,7 @@ var InputFile = ({
|
|
|
7426
7426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7427
7427
|
"div",
|
|
7428
7428
|
{
|
|
7429
|
-
className:
|
|
7429
|
+
className: classNames73__default.default(
|
|
7430
7430
|
"border rounded-sm bg-eui-primary-300/10 px-3 pt-3 text-md text-eui-dark-100 cursor-pointer h-[50px] flex items-center",
|
|
7431
7431
|
{
|
|
7432
7432
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -7452,7 +7452,7 @@ var InputFile = ({
|
|
|
7452
7452
|
InputLabel,
|
|
7453
7453
|
{
|
|
7454
7454
|
text: placeholder,
|
|
7455
|
-
className:
|
|
7455
|
+
className: classNames73__default.default({
|
|
7456
7456
|
"absolute left-2 eui-text-sm peer-placeholder-shown:text-base peer-placeholder-shown:top-3 pointer-events-none": true,
|
|
7457
7457
|
"top-[0.7px]": showFloatingLabel,
|
|
7458
7458
|
"top-[13px] text-base": !showFloatingLabel
|
|
@@ -7505,7 +7505,7 @@ var InputList = ({ name: name2, placeholder, shape }) => {
|
|
|
7505
7505
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(formik.FieldArray, { name: name2, children: ({ push: push2, remove: remove2, move }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7506
7506
|
"div",
|
|
7507
7507
|
{
|
|
7508
|
-
className:
|
|
7508
|
+
className: classNames73__default.default(
|
|
7509
7509
|
"flex w-full flex-col space-y-2 bg-eui-primary-300/10",
|
|
7510
7510
|
shapes[resolvedShape]
|
|
7511
7511
|
),
|
|
@@ -7534,7 +7534,7 @@ var InputList = ({ name: name2, placeholder, shape }) => {
|
|
|
7534
7534
|
ref: provided2.innerRef,
|
|
7535
7535
|
...draggableProps,
|
|
7536
7536
|
style: draggableStyle,
|
|
7537
|
-
className:
|
|
7537
|
+
className: classNames73__default.default(
|
|
7538
7538
|
"flex items-center space-x-2 bg-eui-primary-300/10 p-2",
|
|
7539
7539
|
shapes[resolvedShape]
|
|
7540
7540
|
),
|
|
@@ -7545,7 +7545,7 @@ var InputList = ({ name: name2, placeholder, shape }) => {
|
|
|
7545
7545
|
{
|
|
7546
7546
|
name: `${name2}[${index3}]`,
|
|
7547
7547
|
placeholder: `Item ${index3 + 1}`,
|
|
7548
|
-
className:
|
|
7548
|
+
className: classNames73__default.default(
|
|
7549
7549
|
"peer h-[50px] w-full border bg-eui-primary-300/10 px-3 pb-2 pt-5 text-md placeholder-transparent placeholder-shown:p-3 focus:outline-none eui-text-md",
|
|
7550
7550
|
shapes[resolvedShape],
|
|
7551
7551
|
hasItemError ? "border-eui-danger-500" : "border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -7641,7 +7641,7 @@ var InputListGroup = ({
|
|
|
7641
7641
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7642
7642
|
"div",
|
|
7643
7643
|
{
|
|
7644
|
-
className:
|
|
7644
|
+
className: classNames73__default.default(
|
|
7645
7645
|
"flex flex-col gap-2 bg-eui-primary-300/10 p-3",
|
|
7646
7646
|
shapes[resolvedShape]
|
|
7647
7647
|
),
|
|
@@ -7653,7 +7653,7 @@ var InputListGroup = ({
|
|
|
7653
7653
|
{
|
|
7654
7654
|
name: `${name2}[${groupIndex}].name`,
|
|
7655
7655
|
placeholder: `Group ${groupIndex + 1}`,
|
|
7656
|
-
className:
|
|
7656
|
+
className: classNames73__default.default(
|
|
7657
7657
|
"h-[40px] w-full border bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none",
|
|
7658
7658
|
shapes[resolvedShape],
|
|
7659
7659
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -7684,7 +7684,7 @@ var InputListGroup = ({
|
|
|
7684
7684
|
{
|
|
7685
7685
|
ref: provided.innerRef,
|
|
7686
7686
|
...provided.droppableProps,
|
|
7687
|
-
className:
|
|
7687
|
+
className: classNames73__default.default(
|
|
7688
7688
|
"space-y-2 bg-eui-primary-300/10 p-2",
|
|
7689
7689
|
shapes[resolvedShape]
|
|
7690
7690
|
),
|
|
@@ -7704,7 +7704,7 @@ var InputListGroup = ({
|
|
|
7704
7704
|
ref: provided2.innerRef,
|
|
7705
7705
|
...draggableProps,
|
|
7706
7706
|
style: draggableStyle,
|
|
7707
|
-
className:
|
|
7707
|
+
className: classNames73__default.default(
|
|
7708
7708
|
"flex items-center gap-2 bg-eui-primary-300/10 p-2",
|
|
7709
7709
|
shapes[resolvedShape]
|
|
7710
7710
|
),
|
|
@@ -7715,7 +7715,7 @@ var InputListGroup = ({
|
|
|
7715
7715
|
{
|
|
7716
7716
|
name: `${itemsFieldName}[${itemIndex}]`,
|
|
7717
7717
|
placeholder: `Item ${itemIndex + 1}`,
|
|
7718
|
-
className:
|
|
7718
|
+
className: classNames73__default.default(
|
|
7719
7719
|
"h-[40px] w-full border bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none",
|
|
7720
7720
|
shapes[resolvedShape],
|
|
7721
7721
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -7788,6 +7788,17 @@ var InputListGroup = ({
|
|
|
7788
7788
|
function isMultiCheckbox(props) {
|
|
7789
7789
|
return Array.isArray(props.options);
|
|
7790
7790
|
}
|
|
7791
|
+
function resolveCheckboxColumns(columns) {
|
|
7792
|
+
return columns ?? 1;
|
|
7793
|
+
}
|
|
7794
|
+
function chunkCheckboxOptions(options, columns) {
|
|
7795
|
+
const resolvedColumns = resolveCheckboxColumns(columns);
|
|
7796
|
+
const chunkSize = Math.ceil(options.length / resolvedColumns);
|
|
7797
|
+
return Array.from(
|
|
7798
|
+
{ length: resolvedColumns },
|
|
7799
|
+
(_2, columnIndex) => options.slice(columnIndex * chunkSize, (columnIndex + 1) * chunkSize)
|
|
7800
|
+
).filter((columnOptions) => columnOptions.length > 0);
|
|
7801
|
+
}
|
|
7791
7802
|
function useResolvedCheckboxConfig({
|
|
7792
7803
|
label,
|
|
7793
7804
|
placeholder,
|
|
@@ -7946,6 +7957,7 @@ function Checkbox(checkboxProps) {
|
|
|
7946
7957
|
const activeFieldName = isMulti ? multiField.name : singleField.name;
|
|
7947
7958
|
const activeMeta = isMulti ? multiMeta : singleMeta;
|
|
7948
7959
|
const multiProps = isMultiCheckbox(checkboxProps) ? checkboxProps : null;
|
|
7960
|
+
const optionColumns = multiProps ? chunkCheckboxOptions(multiProps.options, multiProps.columns) : [];
|
|
7949
7961
|
const singleChecked = singleField.value;
|
|
7950
7962
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(checkboxGroupClassName, groupClassName), children: [
|
|
7951
7963
|
!isMulti && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(checkboxOptionRowClassName, optionClassName), children: [
|
|
@@ -7989,67 +8001,74 @@ function Checkbox(checkboxProps) {
|
|
|
7989
8001
|
}
|
|
7990
8002
|
) : null
|
|
7991
8003
|
] }),
|
|
7992
|
-
isMulti && multiProps
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8004
|
+
isMulti && multiProps ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full flex-row gap-6", children: optionColumns.map((columnOptions, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8005
|
+
"div",
|
|
8006
|
+
{
|
|
8007
|
+
className: "flex min-w-0 flex-1 flex-col gap-2",
|
|
8008
|
+
children: columnOptions.map((option) => {
|
|
8009
|
+
const values = multiField.value ?? [];
|
|
8010
|
+
const checked = values.includes(option.value);
|
|
8011
|
+
const optionDisabled = disabled || option.disabled === true;
|
|
8012
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8013
|
+
"div",
|
|
8014
|
+
{
|
|
8015
|
+
className: cn(checkboxOptionRowClassName, optionClassName),
|
|
8016
|
+
children: [
|
|
8017
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex h-5 w-5 shrink-0 items-center justify-center", children: [
|
|
8018
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8019
|
+
"input",
|
|
8020
|
+
{
|
|
8021
|
+
id: option.value,
|
|
8022
|
+
name: multiField.name,
|
|
8023
|
+
type: "checkbox",
|
|
8024
|
+
checked,
|
|
8025
|
+
disabled: optionDisabled,
|
|
8026
|
+
onBlur: multiField.onBlur,
|
|
8027
|
+
onChange: () => {
|
|
8028
|
+
multiHelpers.setValue(
|
|
8029
|
+
checked ? values.filter((value) => value !== option.value) : [...values, option.value]
|
|
8030
|
+
);
|
|
8031
|
+
},
|
|
8032
|
+
className: getIndicatorClassName({
|
|
8033
|
+
checked,
|
|
8034
|
+
className,
|
|
8035
|
+
disabled: optionDisabled,
|
|
8036
|
+
indicatorClassName,
|
|
8037
|
+
checkedIndicatorClassName,
|
|
8038
|
+
resolvedShape,
|
|
8039
|
+
variantCheckedClassName: variantStyles.checkedClassName
|
|
8040
|
+
})
|
|
8041
|
+
}
|
|
8042
|
+
),
|
|
8043
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8044
|
+
Tick,
|
|
8045
|
+
{
|
|
8046
|
+
checked,
|
|
8047
|
+
checkedIconClassName,
|
|
8048
|
+
iconClassName: variantStyles.iconClassName
|
|
8049
|
+
}
|
|
8050
|
+
)
|
|
8051
|
+
] }),
|
|
8052
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8053
|
+
"label",
|
|
8054
|
+
{
|
|
8055
|
+
htmlFor: option.value,
|
|
8056
|
+
className: cn(
|
|
8057
|
+
checkboxLabelClassName,
|
|
8058
|
+
optionDisabled && "cursor-not-allowed opacity-60",
|
|
8059
|
+
labelClassName
|
|
8060
|
+
),
|
|
8061
|
+
children: option.label
|
|
8062
|
+
}
|
|
8063
|
+
)
|
|
8064
|
+
]
|
|
8065
|
+
},
|
|
8066
|
+
option.value
|
|
8067
|
+
);
|
|
8068
|
+
})
|
|
8069
|
+
},
|
|
8070
|
+
`${multiField.name}-column-${columnIndex}`
|
|
8071
|
+
)) }) : null,
|
|
8053
8072
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8054
8073
|
InputResponse,
|
|
8055
8074
|
{
|
|
@@ -8084,7 +8103,7 @@ var DateSelector = ({
|
|
|
8084
8103
|
...field,
|
|
8085
8104
|
...props,
|
|
8086
8105
|
placeholder,
|
|
8087
|
-
className:
|
|
8106
|
+
className: classNames73__default.default({
|
|
8088
8107
|
"border border-eui-primary-400 peer w-full bg-eui-primary-300/10 pt-5 px-3 pb-2 text-md eui-text-md placeholder-transparent placeholder-shown:p-3 focus:border-eui-secondary-500 focus:outline-none h-[50px]": true,
|
|
8089
8108
|
"border-eui-danger-500": meta.touched && meta.error,
|
|
8090
8109
|
"transition-all ease-in-out": true,
|
|
@@ -8247,23 +8266,47 @@ function FormResponse({
|
|
|
8247
8266
|
const styles = resolveFormResponseStyles({ shape, size, variant });
|
|
8248
8267
|
return /* @__PURE__ */ jsxRuntime.jsx(Transition.TransitionDropdown, { visibility: Boolean(text10), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(styles.rootClassName, className), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(styles.textClassName, textClassName), children: text10 }) }) });
|
|
8249
8268
|
}
|
|
8250
|
-
|
|
8269
|
+
var CloudinaryContext = React26.createContext(null);
|
|
8270
|
+
var CloudinaryProvider = ({
|
|
8271
|
+
cloudName,
|
|
8272
|
+
uploadPreset,
|
|
8273
|
+
children: children3
|
|
8274
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(CloudinaryContext.Provider, { value: { cloudName, uploadPreset }, children: children3 });
|
|
8275
|
+
var useCloudinaryConfig = () => {
|
|
8276
|
+
const ctx = React26.useContext(CloudinaryContext);
|
|
8277
|
+
if (!ctx) {
|
|
8278
|
+
throw new Error(
|
|
8279
|
+
"CloudinaryProvider is missing. Wrap your app with <CloudinaryProvider />"
|
|
8280
|
+
);
|
|
8281
|
+
}
|
|
8282
|
+
return ctx;
|
|
8283
|
+
};
|
|
8284
|
+
|
|
8285
|
+
// src/components/data-entry/image-input/base/ImageInput.config.ts
|
|
8286
|
+
var defaultImageInputTitle = "Upload Image";
|
|
8287
|
+
var defaultImageInputUploadDir = "eg-frontend-admin-temp";
|
|
8288
|
+
var imageInputPlaceholderPublicId = "public/placeholders/placeholder-dark_uwuxct";
|
|
8289
|
+
function ImageView({
|
|
8290
|
+
imageUrl,
|
|
8291
|
+
secure = true,
|
|
8292
|
+
alt = "image"
|
|
8293
|
+
}) {
|
|
8294
|
+
const { cloudName } = useCloudinaryConfig();
|
|
8251
8295
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[200px] w-[300px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full overflow-hidden bg-gray-900 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8252
8296
|
cloudinaryReact.Image,
|
|
8253
8297
|
{
|
|
8254
|
-
cloudName
|
|
8255
|
-
publicId: imageUrl ? imageUrl :
|
|
8298
|
+
cloudName,
|
|
8299
|
+
publicId: imageUrl ? imageUrl : imageInputPlaceholderPublicId,
|
|
8256
8300
|
secure,
|
|
8257
8301
|
alt,
|
|
8258
8302
|
className: "w-full h-full object-cover"
|
|
8259
8303
|
}
|
|
8260
8304
|
) }) });
|
|
8261
8305
|
}
|
|
8262
|
-
var ImageView_default = ImageView;
|
|
8263
8306
|
var ImageInput = React26.forwardRef(
|
|
8264
8307
|
({
|
|
8265
|
-
title =
|
|
8266
|
-
uploadDir =
|
|
8308
|
+
title = defaultImageInputTitle,
|
|
8309
|
+
uploadDir = defaultImageInputUploadDir,
|
|
8267
8310
|
onValueChanged = () => {
|
|
8268
8311
|
},
|
|
8269
8312
|
disableSetValue = false,
|
|
@@ -8272,6 +8315,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8272
8315
|
const [field, meta, helpers] = formik.useField(props);
|
|
8273
8316
|
const { value: imageUrl } = field;
|
|
8274
8317
|
const { setValue } = helpers;
|
|
8318
|
+
const { cloudName, uploadPreset = "" } = useCloudinaryConfig();
|
|
8275
8319
|
const [image3, setImage] = React26.useState(null);
|
|
8276
8320
|
const [url, setUrl] = React26.useState(imageUrl);
|
|
8277
8321
|
const [loading, setLoading] = React26.useState(false);
|
|
@@ -8281,8 +8325,6 @@ var ImageInput = React26.forwardRef(
|
|
|
8281
8325
|
setLoading(true);
|
|
8282
8326
|
const data = new FormData();
|
|
8283
8327
|
data.append("file", image3);
|
|
8284
|
-
const uploadPreset = process.env.REACT_APP_CLOUDINARY_UPLOAD_PRESET || "";
|
|
8285
|
-
const cloudName = process.env.REACT_APP_CLOUDINARY_CLOUD_NAME || "";
|
|
8286
8328
|
data.append("upload_preset", uploadPreset);
|
|
8287
8329
|
data.append("cloud_name", cloudName);
|
|
8288
8330
|
data.append("folder", uploadDir);
|
|
@@ -8299,7 +8341,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8299
8341
|
if (!disableSetValue) setValue(res.public_id);
|
|
8300
8342
|
onValueChanged(res.public_id);
|
|
8301
8343
|
setLoading(false);
|
|
8302
|
-
} catch
|
|
8344
|
+
} catch {
|
|
8303
8345
|
setLoading(false);
|
|
8304
8346
|
}
|
|
8305
8347
|
};
|
|
@@ -8343,7 +8385,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8343
8385
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8344
8386
|
"label",
|
|
8345
8387
|
{
|
|
8346
|
-
className:
|
|
8388
|
+
className: classNames73__default.default({
|
|
8347
8389
|
"border-2 border-dashed border-gray-700 bg-gray-900 h-[200px] w-[300px] flex flex-col gap-2 items-center justify-center group": true,
|
|
8348
8390
|
"hover:cursor-pointer hover:border-solid hover:border-gray-600 hover:bg-gray-900/80": true,
|
|
8349
8391
|
"transition-all ease-in-out duration-150": true
|
|
@@ -8368,7 +8410,7 @@ var ImageInput = React26.forwardRef(
|
|
|
8368
8410
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[200px] w-[300px] bg-black opacity-50" }),
|
|
8369
8411
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.AiOutlineLoading, { className: "animate-spin" }) })
|
|
8370
8412
|
] }),
|
|
8371
|
-
!loading && url && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8413
|
+
!loading && url && /* @__PURE__ */ jsxRuntime.jsx(ImageView, { imageUrl: url, alt: url ? url : "image" }),
|
|
8372
8414
|
(preview || url) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 text-3xl", children: [
|
|
8373
8415
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8374
8416
|
"div",
|
|
@@ -8400,29 +8442,230 @@ var ImageInput = React26.forwardRef(
|
|
|
8400
8442
|
] });
|
|
8401
8443
|
}
|
|
8402
8444
|
);
|
|
8403
|
-
var
|
|
8445
|
+
var ImageInput_web_default = ImageInput;
|
|
8446
|
+
|
|
8447
|
+
// src/components/data-entry/multi-image-input/base/MultiImageInput.config.ts
|
|
8448
|
+
var defaultMultiImageInputTitle = "Upload Images";
|
|
8449
|
+
var defaultMultiImageInputUploadDir = "eg-frontend-admin-temp";
|
|
8450
|
+
function areImageListsEqual(current, next2) {
|
|
8451
|
+
return current.length === next2.length && current.every((imageUrl, index3) => imageUrl === next2[index3]);
|
|
8452
|
+
}
|
|
8404
8453
|
function MultiImageInput({
|
|
8405
|
-
title =
|
|
8406
|
-
uploadDir =
|
|
8454
|
+
title = defaultMultiImageInputTitle,
|
|
8455
|
+
uploadDir = defaultMultiImageInputUploadDir,
|
|
8407
8456
|
...props
|
|
8408
8457
|
}) {
|
|
8409
8458
|
const [field, meta, helpers] = formik.useField(props);
|
|
8410
|
-
const { value: imageUrls } = field;
|
|
8411
8459
|
const { setValue } = helpers;
|
|
8460
|
+
const { cloudName, uploadPreset = "" } = useCloudinaryConfig();
|
|
8461
|
+
const fieldImageUrls = React26.useMemo(
|
|
8462
|
+
() => Array.isArray(field.value) ? field.value : [],
|
|
8463
|
+
[field.value]
|
|
8464
|
+
);
|
|
8465
|
+
const [imageUrls, setImageUrls] = React26.useState(fieldImageUrls);
|
|
8412
8466
|
const imageInputRef = React26.useRef(null);
|
|
8467
|
+
const replaceInputRefs = React26.useRef({});
|
|
8468
|
+
const [draggedIndex, setDraggedIndex] = React26.useState(null);
|
|
8469
|
+
const [replacingIndex, setReplacingIndex] = React26.useState(null);
|
|
8470
|
+
const isOrganizerBusy = replacingIndex !== null;
|
|
8471
|
+
React26.useEffect(() => {
|
|
8472
|
+
setImageUrls(
|
|
8473
|
+
(currentImageUrls) => areImageListsEqual(currentImageUrls, fieldImageUrls) ? currentImageUrls : fieldImageUrls
|
|
8474
|
+
);
|
|
8475
|
+
}, [fieldImageUrls]);
|
|
8476
|
+
const commitImageUrls = (nextImageUrls) => {
|
|
8477
|
+
setImageUrls(nextImageUrls);
|
|
8478
|
+
void setValue(nextImageUrls);
|
|
8479
|
+
};
|
|
8413
8480
|
const onValueChanged = (url) => {
|
|
8414
|
-
|
|
8481
|
+
if (!url) {
|
|
8482
|
+
return;
|
|
8483
|
+
}
|
|
8484
|
+
commitImageUrls([...imageUrls, url]);
|
|
8415
8485
|
if (imageInputRef.current) {
|
|
8416
8486
|
imageInputRef.current.handleResetClick();
|
|
8417
8487
|
}
|
|
8418
8488
|
};
|
|
8419
|
-
|
|
8420
|
-
|
|
8489
|
+
const uploadImage = async (file) => {
|
|
8490
|
+
const data = new FormData();
|
|
8491
|
+
data.append("file", file);
|
|
8492
|
+
data.append("upload_preset", uploadPreset);
|
|
8493
|
+
data.append("cloud_name", cloudName);
|
|
8494
|
+
data.append("folder", uploadDir);
|
|
8495
|
+
const response = await fetch(
|
|
8496
|
+
`https://api.cloudinary.com/v1_1/${cloudName}/image/upload`,
|
|
8497
|
+
{
|
|
8498
|
+
method: "POST",
|
|
8499
|
+
body: data
|
|
8500
|
+
}
|
|
8501
|
+
);
|
|
8502
|
+
const res = await response.json();
|
|
8503
|
+
if (!res.public_id) {
|
|
8504
|
+
throw new Error("Cloudinary upload failed");
|
|
8505
|
+
}
|
|
8506
|
+
return res.public_id;
|
|
8507
|
+
};
|
|
8508
|
+
const removeImage = (index3) => {
|
|
8509
|
+
commitImageUrls(
|
|
8510
|
+
imageUrls.filter((_2, imageIndex) => imageIndex !== index3)
|
|
8511
|
+
);
|
|
8512
|
+
};
|
|
8513
|
+
const moveImage = (fromIndex, toIndex) => {
|
|
8514
|
+
if (toIndex < 0 || toIndex >= imageUrls.length || fromIndex === toIndex || isOrganizerBusy) {
|
|
8515
|
+
return;
|
|
8516
|
+
}
|
|
8517
|
+
const nextImageUrls = [...imageUrls];
|
|
8518
|
+
const [movedImage] = nextImageUrls.splice(fromIndex, 1);
|
|
8519
|
+
if (!movedImage) {
|
|
8520
|
+
return;
|
|
8521
|
+
}
|
|
8522
|
+
nextImageUrls.splice(toIndex, 0, movedImage);
|
|
8523
|
+
commitImageUrls(nextImageUrls);
|
|
8524
|
+
};
|
|
8525
|
+
const handleReplaceImage = async (index3, event) => {
|
|
8526
|
+
const input = event.currentTarget;
|
|
8527
|
+
const file = input.files?.[0];
|
|
8528
|
+
if (!file || isOrganizerBusy) {
|
|
8529
|
+
return;
|
|
8530
|
+
}
|
|
8531
|
+
setReplacingIndex(index3);
|
|
8532
|
+
try {
|
|
8533
|
+
const publicId = await uploadImage(file);
|
|
8534
|
+
const nextImageUrls = [...imageUrls];
|
|
8535
|
+
nextImageUrls[index3] = publicId;
|
|
8536
|
+
commitImageUrls(nextImageUrls);
|
|
8537
|
+
} catch {
|
|
8538
|
+
} finally {
|
|
8539
|
+
setReplacingIndex(null);
|
|
8540
|
+
input.value = "";
|
|
8541
|
+
}
|
|
8542
|
+
};
|
|
8543
|
+
const handleDragStart = (index3) => {
|
|
8544
|
+
if (isOrganizerBusy) {
|
|
8545
|
+
return;
|
|
8546
|
+
}
|
|
8547
|
+
setDraggedIndex(index3);
|
|
8548
|
+
};
|
|
8549
|
+
const handleDragOver = (event) => {
|
|
8550
|
+
if (!isOrganizerBusy) {
|
|
8551
|
+
event.preventDefault();
|
|
8552
|
+
}
|
|
8553
|
+
};
|
|
8554
|
+
const handleDrop = (index3) => {
|
|
8555
|
+
if (draggedIndex === null) {
|
|
8556
|
+
return;
|
|
8557
|
+
}
|
|
8558
|
+
moveImage(draggedIndex, index3);
|
|
8559
|
+
setDraggedIndex(null);
|
|
8560
|
+
};
|
|
8561
|
+
const openReplacePicker = (index3) => {
|
|
8562
|
+
replaceInputRefs.current[index3]?.click();
|
|
8563
|
+
};
|
|
8421
8564
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8422
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row flex-wrap gap-5 w-
|
|
8423
|
-
imageUrls.map((url, index3) =>
|
|
8565
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row flex-wrap gap-5 w-full", children: [
|
|
8566
|
+
imageUrls.map((url, index3) => {
|
|
8567
|
+
const isReplacing = replacingIndex === index3;
|
|
8568
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8569
|
+
"div",
|
|
8570
|
+
{
|
|
8571
|
+
draggable: !isOrganizerBusy,
|
|
8572
|
+
onDragStart: () => handleDragStart(index3),
|
|
8573
|
+
onDragOver: handleDragOver,
|
|
8574
|
+
onDrop: () => handleDrop(index3),
|
|
8575
|
+
onDragEnd: () => setDraggedIndex(null),
|
|
8576
|
+
className: classNames73__default.default(
|
|
8577
|
+
"relative h-[200px] w-[300px] overflow-hidden bg-gray-900",
|
|
8578
|
+
"transition-all duration-150",
|
|
8579
|
+
draggedIndex === index3 && "opacity-60",
|
|
8580
|
+
!isOrganizerBusy && "cursor-grab active:cursor-grabbing"
|
|
8581
|
+
),
|
|
8582
|
+
children: [
|
|
8583
|
+
/* @__PURE__ */ jsxRuntime.jsx(ImageView, { imageUrl: url }),
|
|
8584
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute left-2 top-2 inline-flex items-center gap-1 rounded bg-black/60 px-2 py-1 text-xs text-white", children: [
|
|
8585
|
+
/* @__PURE__ */ jsxRuntime.jsx(index_js.MdDragIndicator, {}),
|
|
8586
|
+
index3 + 1
|
|
8587
|
+
] }),
|
|
8588
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-2 top-2 flex gap-1", children: [
|
|
8589
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8590
|
+
Button_web_default,
|
|
8591
|
+
{
|
|
8592
|
+
title: "Move image left",
|
|
8593
|
+
accessibilityLabel: "Move image left",
|
|
8594
|
+
disabled: index3 === 0 || isOrganizerBusy,
|
|
8595
|
+
glow: false,
|
|
8596
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdKeyboardArrowLeft, {}),
|
|
8597
|
+
onPress: () => moveImage(index3, index3 - 1),
|
|
8598
|
+
size: "xs",
|
|
8599
|
+
className: "h-8 w-8 bg-black/60 p-0 text-xl text-white hover:bg-black/80 disabled:opacity-40"
|
|
8600
|
+
}
|
|
8601
|
+
),
|
|
8602
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8603
|
+
Button_web_default,
|
|
8604
|
+
{
|
|
8605
|
+
title: "Move image right",
|
|
8606
|
+
accessibilityLabel: "Move image right",
|
|
8607
|
+
disabled: index3 === imageUrls.length - 1 || isOrganizerBusy,
|
|
8608
|
+
glow: false,
|
|
8609
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdKeyboardArrowRight, {}),
|
|
8610
|
+
onPress: () => moveImage(index3, index3 + 1),
|
|
8611
|
+
size: "xs",
|
|
8612
|
+
className: "h-8 w-8 bg-black/60 p-0 text-xl text-white hover:bg-black/80 disabled:opacity-40"
|
|
8613
|
+
}
|
|
8614
|
+
)
|
|
8615
|
+
] }),
|
|
8616
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-2 left-2 right-2 flex items-center justify-between gap-2", children: [
|
|
8617
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8618
|
+
"input",
|
|
8619
|
+
{
|
|
8620
|
+
ref: (input) => {
|
|
8621
|
+
replaceInputRefs.current[index3] = input;
|
|
8622
|
+
},
|
|
8623
|
+
type: "file",
|
|
8624
|
+
className: "hidden",
|
|
8625
|
+
accept: "image/*",
|
|
8626
|
+
disabled: isOrganizerBusy,
|
|
8627
|
+
onChange: (event) => void handleReplaceImage(index3, event)
|
|
8628
|
+
}
|
|
8629
|
+
),
|
|
8630
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8631
|
+
Button_web_default,
|
|
8632
|
+
{
|
|
8633
|
+
block: true,
|
|
8634
|
+
appearance: "solid",
|
|
8635
|
+
title: "Change image",
|
|
8636
|
+
accessibilityLabel: "Change image",
|
|
8637
|
+
disabled: isOrganizerBusy,
|
|
8638
|
+
glow: false,
|
|
8639
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdUpload, {}),
|
|
8640
|
+
onPress: () => openReplacePicker(index3),
|
|
8641
|
+
size: "sm",
|
|
8642
|
+
text: "Change",
|
|
8643
|
+
variant: "success"
|
|
8644
|
+
}
|
|
8645
|
+
),
|
|
8646
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8647
|
+
Button_web_default,
|
|
8648
|
+
{
|
|
8649
|
+
appearance: "solid",
|
|
8650
|
+
title: "Delete image",
|
|
8651
|
+
accessibilityLabel: "Delete image",
|
|
8652
|
+
disabled: isOrganizerBusy,
|
|
8653
|
+
glow: false,
|
|
8654
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index_js.MdOutlineDelete, {}),
|
|
8655
|
+
onPress: () => removeImage(index3),
|
|
8656
|
+
size: "sm",
|
|
8657
|
+
variant: "danger"
|
|
8658
|
+
}
|
|
8659
|
+
)
|
|
8660
|
+
] }),
|
|
8661
|
+
isReplacing && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 text-2xl text-white", children: /* @__PURE__ */ jsxRuntime.jsx(index_js$1.AiOutlineLoading, { className: "animate-spin" }) })
|
|
8662
|
+
]
|
|
8663
|
+
},
|
|
8664
|
+
`${url}-${index3}`
|
|
8665
|
+
);
|
|
8666
|
+
}),
|
|
8424
8667
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8425
|
-
|
|
8668
|
+
ImageInput_web_default,
|
|
8426
8669
|
{
|
|
8427
8670
|
ref: imageInputRef,
|
|
8428
8671
|
name: "new_img",
|
|
@@ -8444,7 +8687,7 @@ function MultiImageInput({
|
|
|
8444
8687
|
)
|
|
8445
8688
|
] });
|
|
8446
8689
|
}
|
|
8447
|
-
var
|
|
8690
|
+
var MultiImageInput_web_default = MultiImageInput;
|
|
8448
8691
|
function Radio({
|
|
8449
8692
|
placeholder,
|
|
8450
8693
|
options,
|
|
@@ -8460,7 +8703,7 @@ function Radio({
|
|
|
8460
8703
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8461
8704
|
"div",
|
|
8462
8705
|
{
|
|
8463
|
-
className:
|
|
8706
|
+
className: classNames73__default.default({
|
|
8464
8707
|
"flex flex-row gap-2 items-center mx-1 my-2": true
|
|
8465
8708
|
}),
|
|
8466
8709
|
children: [
|
|
@@ -8473,7 +8716,7 @@ function Radio({
|
|
|
8473
8716
|
...props,
|
|
8474
8717
|
value: option.value,
|
|
8475
8718
|
checked: field2.value === option.value,
|
|
8476
|
-
className:
|
|
8719
|
+
className: classNames73__default.default({
|
|
8477
8720
|
"appearance-none w-4 h-4 border-2 border-eui-primary-400 rounded-full cursor-pointer transition-all duration-300": true,
|
|
8478
8721
|
// base radio button styles
|
|
8479
8722
|
"checked:bg-eui-secondary-700 checked:border-eui-primary-400": field2.value === option.value
|
|
@@ -8485,7 +8728,7 @@ function Radio({
|
|
|
8485
8728
|
"label",
|
|
8486
8729
|
{
|
|
8487
8730
|
htmlFor: option.value,
|
|
8488
|
-
className:
|
|
8731
|
+
className: classNames73__default.default({
|
|
8489
8732
|
"eui-text-md text-sm": true
|
|
8490
8733
|
}),
|
|
8491
8734
|
children: option.label
|
|
@@ -8528,7 +8771,7 @@ function StarRatingInput({
|
|
|
8528
8771
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8529
8772
|
"div",
|
|
8530
8773
|
{
|
|
8531
|
-
className:
|
|
8774
|
+
className: classNames73__default.default({
|
|
8532
8775
|
"inline-flex gap-[4px] text-[20px]": true,
|
|
8533
8776
|
[`${styles}`]: styles
|
|
8534
8777
|
}),
|
|
@@ -8541,7 +8784,7 @@ function StarRatingInput({
|
|
|
8541
8784
|
onClick: () => handleOnClick(index3),
|
|
8542
8785
|
onMouseEnter: () => setHover(index3),
|
|
8543
8786
|
onMouseLeave: () => setHover(null),
|
|
8544
|
-
className:
|
|
8787
|
+
className: classNames73__default.default({
|
|
8545
8788
|
"text-yellow-600": index3 <= (hover ?? rating - 1),
|
|
8546
8789
|
"text-gray-400": index3 > (hover ?? rating - 1)
|
|
8547
8790
|
}),
|
|
@@ -8585,7 +8828,7 @@ function Select({
|
|
|
8585
8828
|
{
|
|
8586
8829
|
as: "select",
|
|
8587
8830
|
...props,
|
|
8588
|
-
className:
|
|
8831
|
+
className: classNames73__default.default({
|
|
8589
8832
|
"border peer w-full bg-eui-primary-300/10 pt-5 px-3 pb-2 text-md eui-text-md placeholder-transparent placeholder-shown:p-3 focus:border-eui-secondary-500 focus:outline-none h-[50px]": true,
|
|
8590
8833
|
"border-eui-primary-400": !(meta.touched && meta.error),
|
|
8591
8834
|
"border-red-500": meta.touched && meta.error,
|
|
@@ -8637,7 +8880,7 @@ function Switch({
|
|
|
8637
8880
|
"div",
|
|
8638
8881
|
{
|
|
8639
8882
|
onClick: () => helpers.setValue(!field.value),
|
|
8640
|
-
className:
|
|
8883
|
+
className: classNames73__default.default(
|
|
8641
8884
|
"w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-eui-dark-100",
|
|
8642
8885
|
"peer-checked:after:translate-x-full peer-checked:after:border-white",
|
|
8643
8886
|
"after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white",
|
|
@@ -8694,7 +8937,7 @@ function Tags({
|
|
|
8694
8937
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8695
8938
|
"div",
|
|
8696
8939
|
{
|
|
8697
|
-
className:
|
|
8940
|
+
className: classNames73__default.default(
|
|
8698
8941
|
"border rounded-sm flex flex-wrap items-center gap-2 px-2 pt-2 pb-6 min-h-[3rem]",
|
|
8699
8942
|
{
|
|
8700
8943
|
"bg-eui-primary-300/10 eui-text-md": true,
|
|
@@ -8742,7 +8985,7 @@ function Tags({
|
|
|
8742
8985
|
InputLabel,
|
|
8743
8986
|
{
|
|
8744
8987
|
text: placeholder,
|
|
8745
|
-
className:
|
|
8988
|
+
className: classNames73__default.default(
|
|
8746
8989
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
8747
8990
|
input.length > 0 || field.value.length > 0 ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
8748
8991
|
)
|
|
@@ -8783,7 +9026,7 @@ function TextArea({
|
|
|
8783
9026
|
as: "textarea",
|
|
8784
9027
|
...field,
|
|
8785
9028
|
...props,
|
|
8786
|
-
className:
|
|
9029
|
+
className: classNames73__default.default({
|
|
8787
9030
|
"border peer w-full bg-eui-primary-300/10 eui-text-md outline-none px-3 py-5 resize-none focus:resize-none focus:outline-none": true,
|
|
8788
9031
|
"transition-all ease-in-out": true,
|
|
8789
9032
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -8797,7 +9040,7 @@ function TextArea({
|
|
|
8797
9040
|
InputLabel,
|
|
8798
9041
|
{
|
|
8799
9042
|
text: placeholder,
|
|
8800
|
-
className:
|
|
9043
|
+
className: classNames73__default.default(
|
|
8801
9044
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
8802
9045
|
field.value ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
8803
9046
|
)
|
|
@@ -8831,7 +9074,7 @@ function BreadcrumbItem({
|
|
|
8831
9074
|
{
|
|
8832
9075
|
href,
|
|
8833
9076
|
onClick,
|
|
8834
|
-
className:
|
|
9077
|
+
className: classNames73__default.default({
|
|
8835
9078
|
"text-lg font-semibold": true,
|
|
8836
9079
|
"text-gray-400 hover:text-gray-600 cursor-pointer": !active,
|
|
8837
9080
|
"text-eui-light-800": active,
|
|
@@ -8908,7 +9151,7 @@ var Breadcrumb = ({
|
|
|
8908
9151
|
index3 < resolvedData.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8909
9152
|
"span",
|
|
8910
9153
|
{
|
|
8911
|
-
className:
|
|
9154
|
+
className: classNames73__default.default({
|
|
8912
9155
|
"text-lg font-semibold text-gray-500": true,
|
|
8913
9156
|
[`px-${gap}`]: gap
|
|
8914
9157
|
}),
|
|
@@ -8922,7 +9165,7 @@ var Breadcrumb = ({
|
|
|
8922
9165
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8923
9166
|
"div",
|
|
8924
9167
|
{
|
|
8925
|
-
className:
|
|
9168
|
+
className: classNames73__default.default({
|
|
8926
9169
|
"inline-flex": true,
|
|
8927
9170
|
[`${styles}`]: styles
|
|
8928
9171
|
}),
|
|
@@ -8966,7 +9209,7 @@ var Drawer = ({
|
|
|
8966
9209
|
isMobile && showBackdrop && /* @__PURE__ */ jsxRuntime.jsx(TransitionFade_default, { visibility, leaveDuration: 200, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8967
9210
|
"div",
|
|
8968
9211
|
{
|
|
8969
|
-
className:
|
|
9212
|
+
className: classNames73__default.default(
|
|
8970
9213
|
"fixed inset-0 bg-black/50 z-40",
|
|
8971
9214
|
backdropStyles
|
|
8972
9215
|
),
|
|
@@ -8977,7 +9220,7 @@ var Drawer = ({
|
|
|
8977
9220
|
"div",
|
|
8978
9221
|
{
|
|
8979
9222
|
style: drawerStyle,
|
|
8980
|
-
className:
|
|
9223
|
+
className: classNames73__default.default(
|
|
8981
9224
|
"fixed shadow-lg z-50",
|
|
8982
9225
|
{
|
|
8983
9226
|
"h-full w-[300px] top-0": isHorizontal && !hasOffset,
|
|
@@ -9006,7 +9249,7 @@ function DrawerToggler({
|
|
|
9006
9249
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9007
9250
|
"div",
|
|
9008
9251
|
{
|
|
9009
|
-
className:
|
|
9252
|
+
className: classNames73__default.default({
|
|
9010
9253
|
"text-xl p-3 cursor-pointer": true,
|
|
9011
9254
|
"transition-all ease-in-out": true,
|
|
9012
9255
|
"text-eui-dark-500 dark:text-eui-secondary-600": !styles,
|
|
@@ -9054,7 +9297,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
9054
9297
|
childrenContent = /* @__PURE__ */ jsxRuntime.jsx(
|
|
9055
9298
|
"div",
|
|
9056
9299
|
{
|
|
9057
|
-
className:
|
|
9300
|
+
className: classNames73__default.default({
|
|
9058
9301
|
"grid w-full": true,
|
|
9059
9302
|
"grid-cols-1": isMobile,
|
|
9060
9303
|
"grid-cols-3": !isMobile,
|
|
@@ -9067,7 +9310,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
9067
9310
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9068
9311
|
"div",
|
|
9069
9312
|
{
|
|
9070
|
-
className:
|
|
9313
|
+
className: classNames73__default.default({
|
|
9071
9314
|
[`${styles}`]: styles
|
|
9072
9315
|
}),
|
|
9073
9316
|
children: childrenContent
|
|
@@ -9108,7 +9351,7 @@ var FooterNavGroup = ({
|
|
|
9108
9351
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9109
9352
|
"div",
|
|
9110
9353
|
{
|
|
9111
|
-
className:
|
|
9354
|
+
className: classNames73__default.default({
|
|
9112
9355
|
"": true,
|
|
9113
9356
|
"py-2 font-semibold eui-text-lg": !styles,
|
|
9114
9357
|
[`${styles}`]: styles
|
|
@@ -9153,7 +9396,7 @@ var FooterNavItem = ({
|
|
|
9153
9396
|
"div",
|
|
9154
9397
|
{
|
|
9155
9398
|
onClick: handleNavigation,
|
|
9156
|
-
className:
|
|
9399
|
+
className: classNames73__default.default({
|
|
9157
9400
|
"flex flex-row items-center gap-3 cursor-pointer p-1 w-full": true,
|
|
9158
9401
|
"transition-all duration-200 ease-in-out": true,
|
|
9159
9402
|
"text-sm eui-text-sm": !styles,
|
|
@@ -9182,7 +9425,7 @@ var FooterNavItemTitle = ({
|
|
|
9182
9425
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9183
9426
|
"div",
|
|
9184
9427
|
{
|
|
9185
|
-
className:
|
|
9428
|
+
className: classNames73__default.default({
|
|
9186
9429
|
"": true,
|
|
9187
9430
|
"py-2 font-thin eui-text-md": !styles,
|
|
9188
9431
|
[`${styles}`]: styles
|
|
@@ -9235,7 +9478,7 @@ function HeaderNav({ data = [], styles }) {
|
|
|
9235
9478
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9236
9479
|
"div",
|
|
9237
9480
|
{
|
|
9238
|
-
className:
|
|
9481
|
+
className: classNames73__default.default({
|
|
9239
9482
|
[`${styles}`]: styles
|
|
9240
9483
|
}),
|
|
9241
9484
|
children: childrenContent
|
|
@@ -9297,7 +9540,7 @@ var HeaderNavGroup = ({
|
|
|
9297
9540
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9298
9541
|
"div",
|
|
9299
9542
|
{
|
|
9300
|
-
className:
|
|
9543
|
+
className: classNames73__default.default({
|
|
9301
9544
|
"flex flex-row gap-2 items-center justify-between cursor-pointer p-3 w-full": true,
|
|
9302
9545
|
"transition-all duration-300 ease-in-out": true,
|
|
9303
9546
|
"eui-text-md bg-gradient-to-t from-eui-dark-500/10 dark:from-green-700/10": !styles,
|
|
@@ -9325,7 +9568,7 @@ var HeaderNavGroup = ({
|
|
|
9325
9568
|
children3 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9326
9569
|
index_js$3.BsChevronDown,
|
|
9327
9570
|
{
|
|
9328
|
-
className:
|
|
9571
|
+
className: classNames73__default.default({
|
|
9329
9572
|
"text-md": true,
|
|
9330
9573
|
"transition-all ease-in-out duration-300": true,
|
|
9331
9574
|
"rotate-180": !collapsed
|
|
@@ -9338,7 +9581,7 @@ var HeaderNavGroup = ({
|
|
|
9338
9581
|
!collapsed && children3 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9339
9582
|
"div",
|
|
9340
9583
|
{
|
|
9341
|
-
className:
|
|
9584
|
+
className: classNames73__default.default({
|
|
9342
9585
|
"absolute min-w-80 left-0 top-full mt-1 border border-eui-dark-300/10 dark:border-eui-dark-300/50 shadow-lg eui-shadow-lg z-50 w-full eui-bg-md": true,
|
|
9343
9586
|
"transition-all duration-300 ease-in-out": true
|
|
9344
9587
|
}),
|
|
@@ -9368,7 +9611,7 @@ var HeaderNavItem = ({
|
|
|
9368
9611
|
"div",
|
|
9369
9612
|
{
|
|
9370
9613
|
onClick: handleNavigation,
|
|
9371
|
-
className:
|
|
9614
|
+
className: classNames73__default.default({
|
|
9372
9615
|
"flex flex-row items-center gap-3 cursor-pointer p-3 w-full": true,
|
|
9373
9616
|
"transition-all duration-200 ease-in-out": true,
|
|
9374
9617
|
"eui-text-md border-b border-eui-dark-500/20 dark:border-eui-secondary-900/20 bg-gradient-to-r from-eui-dark-500/10 dark:from-eui-secondary-900/10": !styles,
|
|
@@ -9397,7 +9640,7 @@ var HeaderNavItemTitle = ({
|
|
|
9397
9640
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9398
9641
|
"div",
|
|
9399
9642
|
{
|
|
9400
|
-
className:
|
|
9643
|
+
className: classNames73__default.default({
|
|
9401
9644
|
"p-3 font-thin": true,
|
|
9402
9645
|
"eui-text-md": !styles,
|
|
9403
9646
|
[`${styles}`]: styles
|
|
@@ -9437,7 +9680,7 @@ var Link = ({
|
|
|
9437
9680
|
href: href || "#",
|
|
9438
9681
|
target: targets[target],
|
|
9439
9682
|
onClick: handleClick,
|
|
9440
|
-
className:
|
|
9683
|
+
className: classNames73__default.default({
|
|
9441
9684
|
[`${textVariants[variant]}`]: variant,
|
|
9442
9685
|
[`${decorations[decoration]}`]: decoration,
|
|
9443
9686
|
"font-bold": bold,
|
|
@@ -12629,7 +12872,7 @@ function Accordion({
|
|
|
12629
12872
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12630
12873
|
"div",
|
|
12631
12874
|
{
|
|
12632
|
-
className:
|
|
12875
|
+
className: classNames73__default.default(
|
|
12633
12876
|
"inline-flex gap-3 items-center px-3 py-2 w-full eui-gradient-to-r-general-xs",
|
|
12634
12877
|
{
|
|
12635
12878
|
"hover:cursor-pointer": toggleOnSummaryClick
|
|
@@ -12650,7 +12893,7 @@ function Accordion({
|
|
|
12650
12893
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12651
12894
|
index_js$4.FaCircleChevronDown,
|
|
12652
12895
|
{
|
|
12653
|
-
className:
|
|
12896
|
+
className: classNames73__default.default("text-xl transition-transform duration-300", {
|
|
12654
12897
|
"rotate-180": collapse
|
|
12655
12898
|
})
|
|
12656
12899
|
}
|
|
@@ -12664,7 +12907,7 @@ function Accordion({
|
|
|
12664
12907
|
/* @__PURE__ */ jsxRuntime.jsx(TransitionAccordion_default, { visibility: collapse, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12665
12908
|
"div",
|
|
12666
12909
|
{
|
|
12667
|
-
className:
|
|
12910
|
+
className: classNames73__default.default(
|
|
12668
12911
|
"border-t border-t-eui-dark-400/40 eui-text-sm",
|
|
12669
12912
|
{
|
|
12670
12913
|
"p-5": enableChildrenPadding
|
|
@@ -12721,7 +12964,7 @@ function CardHeader({ icon, title, description, className }) {
|
|
|
12721
12964
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12722
12965
|
"div",
|
|
12723
12966
|
{
|
|
12724
|
-
className:
|
|
12967
|
+
className: classNames73__default.default(
|
|
12725
12968
|
"flex items-start gap-4 p-6 border-b border-white/10",
|
|
12726
12969
|
className
|
|
12727
12970
|
),
|
|
@@ -12737,14 +12980,14 @@ function CardHeader({ icon, title, description, className }) {
|
|
|
12737
12980
|
}
|
|
12738
12981
|
var CardHeader_default = CardHeader;
|
|
12739
12982
|
function CardContent({ children: children3, className }) {
|
|
12740
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
12983
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames73__default.default("p-6 text-gray-300 text-sm", className), children: children3 });
|
|
12741
12984
|
}
|
|
12742
12985
|
var CardContent_default = CardContent;
|
|
12743
12986
|
function CardFooter({ children: children3, className }) {
|
|
12744
12987
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12745
12988
|
"div",
|
|
12746
12989
|
{
|
|
12747
|
-
className:
|
|
12990
|
+
className: classNames73__default.default(
|
|
12748
12991
|
"flex items-center gap-3 p-5 border-t border-white/10 text-sm text-gray-400",
|
|
12749
12992
|
className
|
|
12750
12993
|
),
|
|
@@ -12786,7 +13029,7 @@ function GradientAnimation({
|
|
|
12786
13029
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12787
13030
|
"div",
|
|
12788
13031
|
{
|
|
12789
|
-
className:
|
|
13032
|
+
className: classNames73__default.default("absolute inset-0"),
|
|
12790
13033
|
style: {
|
|
12791
13034
|
background: `linear-gradient(${cfg.angle}deg, ${cfg.colors?.join(",")})`,
|
|
12792
13035
|
backgroundSize: cfg.backgroundSize,
|
|
@@ -12932,7 +13175,7 @@ function MotionSurface({
|
|
|
12932
13175
|
}) {
|
|
12933
13176
|
const AnimationComponent = animationVariant === "custom" ? CustomAnimation : animationRegistry[animationVariant];
|
|
12934
13177
|
const OverlayComponent = overlay === "custom" ? CustomOverlay : overlayRegistry[overlay];
|
|
12935
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
13178
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames73__default.default("relative overflow-hidden", className), children: [
|
|
12936
13179
|
AnimationComponent && /* @__PURE__ */ jsxRuntime.jsx(AnimationComponent, { config: animationConfig, animated }),
|
|
12937
13180
|
OverlayComponent && /* @__PURE__ */ jsxRuntime.jsx(OverlayComponent, { config: overlayConfig }),
|
|
12938
13181
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10", children: children3 })
|
|
@@ -16314,20 +16557,6 @@ var Graph = ({
|
|
|
16314
16557
|
}
|
|
16315
16558
|
);
|
|
16316
16559
|
};
|
|
16317
|
-
var CloudinaryContext = React26.createContext(null);
|
|
16318
|
-
var CloudinaryProvider = ({
|
|
16319
|
-
cloudName,
|
|
16320
|
-
children: children3
|
|
16321
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(CloudinaryContext.Provider, { value: { cloudName }, children: children3 });
|
|
16322
|
-
var useCloudinaryConfig = () => {
|
|
16323
|
-
const ctx = React26.useContext(CloudinaryContext);
|
|
16324
|
-
if (!ctx) {
|
|
16325
|
-
throw new Error(
|
|
16326
|
-
"CloudinaryProvider is missing. Wrap your app with <CloudinaryProvider />"
|
|
16327
|
-
);
|
|
16328
|
-
}
|
|
16329
|
-
return ctx;
|
|
16330
|
-
};
|
|
16331
16560
|
var DEFAULT_PUBLIC_CLOUD = "demo";
|
|
16332
16561
|
var CloudinaryImage2 = ({
|
|
16333
16562
|
publicId = "sample",
|
|
@@ -18017,7 +18246,7 @@ var ThemeSwitch = () => {
|
|
|
18017
18246
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18018
18247
|
"div",
|
|
18019
18248
|
{
|
|
18020
|
-
className:
|
|
18249
|
+
className: classNames73__default.default(
|
|
18021
18250
|
"w-6 h-6 bg-white dark:bg-gray-600 rounded-full shadow-md transition-transform duration-300",
|
|
18022
18251
|
theme === "dark" ? "translate-x-8" : "translate-x-0"
|
|
18023
18252
|
)
|
|
@@ -29786,7 +30015,7 @@ function Modal({
|
|
|
29786
30015
|
"div",
|
|
29787
30016
|
{
|
|
29788
30017
|
ref: modalRef,
|
|
29789
|
-
className:
|
|
30018
|
+
className: classNames73__default.default(
|
|
29790
30019
|
"eui-bg-md eui-shadow-lg border border-gray-700/80 w-fit h-fit",
|
|
29791
30020
|
shapes[resolvedShape],
|
|
29792
30021
|
styles
|
|
@@ -29798,7 +30027,7 @@ function Modal({
|
|
|
29798
30027
|
"button",
|
|
29799
30028
|
{
|
|
29800
30029
|
type: "button",
|
|
29801
|
-
className:
|
|
30030
|
+
className: classNames73__default.default(
|
|
29802
30031
|
"w-[60px] h-[60px] flex items-center justify-center transition-standard-fast",
|
|
29803
30032
|
"hover:cursor-pointer hover:bg-eui-dark-500"
|
|
29804
30033
|
),
|
|
@@ -30190,7 +30419,7 @@ var ContentArea = React26.forwardRef(
|
|
|
30190
30419
|
"div",
|
|
30191
30420
|
{
|
|
30192
30421
|
ref,
|
|
30193
|
-
className:
|
|
30422
|
+
className: classNames73__default.default({
|
|
30194
30423
|
"min-h-screen h-full w-full transition-all duration-[200ms]": true,
|
|
30195
30424
|
"py-3 px-5": !enablePadding,
|
|
30196
30425
|
"py-3 px-5 lg:px-[150px]": enablePadding,
|
|
@@ -30207,7 +30436,7 @@ function FlexCol({ children: children3, gap = 3, styles }) {
|
|
|
30207
30436
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30208
30437
|
"div",
|
|
30209
30438
|
{
|
|
30210
|
-
className:
|
|
30439
|
+
className: classNames73__default.default({
|
|
30211
30440
|
[`flex flex-col gap-${gap}`]: true,
|
|
30212
30441
|
[`${styles}`]: styles
|
|
30213
30442
|
}),
|
|
@@ -30220,7 +30449,7 @@ function FlexRow({ children: children3, gap = 3, styles }) {
|
|
|
30220
30449
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30221
30450
|
"div",
|
|
30222
30451
|
{
|
|
30223
|
-
className:
|
|
30452
|
+
className: classNames73__default.default({
|
|
30224
30453
|
[`flex flex-row gap-${gap}`]: true,
|
|
30225
30454
|
[`${styles}`]: styles
|
|
30226
30455
|
}),
|
|
@@ -30239,7 +30468,7 @@ function Grid({ children: children3, styles }) {
|
|
|
30239
30468
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30240
30469
|
"div",
|
|
30241
30470
|
{
|
|
30242
|
-
className:
|
|
30471
|
+
className: classNames73__default.default({
|
|
30243
30472
|
[`grid`]: true,
|
|
30244
30473
|
[`${styles}`]: styles
|
|
30245
30474
|
}),
|
|
@@ -30256,7 +30485,7 @@ var Layout = ({
|
|
|
30256
30485
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30257
30486
|
"div",
|
|
30258
30487
|
{
|
|
30259
|
-
className:
|
|
30488
|
+
className: classNames73__default.default({
|
|
30260
30489
|
// "flex h-full w-screen bg-gray-100 overflow-auto": true,
|
|
30261
30490
|
"flex bg-eui-light-600": true,
|
|
30262
30491
|
"flex-col": flexDirection === "vertical",
|
|
@@ -30278,7 +30507,7 @@ var Header = ({
|
|
|
30278
30507
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30279
30508
|
"div",
|
|
30280
30509
|
{
|
|
30281
|
-
className:
|
|
30510
|
+
className: classNames73__default.default({
|
|
30282
30511
|
static: position4 === "static",
|
|
30283
30512
|
fixed: position4 === "fixed",
|
|
30284
30513
|
sticky: position4 === "sticky",
|
|
@@ -30313,7 +30542,7 @@ var Content = ({
|
|
|
30313
30542
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30314
30543
|
"div",
|
|
30315
30544
|
{
|
|
30316
|
-
className:
|
|
30545
|
+
className: classNames73__default.default({
|
|
30317
30546
|
"w-full min-h-screen transition-all duration-200 eui-bg-sm": true,
|
|
30318
30547
|
"md:pl-[300px]": !overlayedSidebar && sidebarVisible && !isMobile,
|
|
30319
30548
|
// Shift when sidebar is open (desktop)
|
|
@@ -30329,7 +30558,7 @@ var Footer = ({ children: children3, styles }) => {
|
|
|
30329
30558
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30330
30559
|
"div",
|
|
30331
30560
|
{
|
|
30332
|
-
className:
|
|
30561
|
+
className: classNames73__default.default({
|
|
30333
30562
|
"bottom-0 w-full h-fit": true,
|
|
30334
30563
|
"border-t border-eui-dark-500/40 dark:border-eui-secondary-800 eui-bg-md": !styles,
|
|
30335
30564
|
[`${styles}`]: styles
|
|
@@ -30517,7 +30746,7 @@ function ShowMore({ text: text10, limit }) {
|
|
|
30517
30746
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30518
30747
|
"div",
|
|
30519
30748
|
{
|
|
30520
|
-
className:
|
|
30749
|
+
className: classNames73__default.default({
|
|
30521
30750
|
"text-blue-300 px-1 pb-1 mt-1": true,
|
|
30522
30751
|
"bg-slate-900/70": !showMore,
|
|
30523
30752
|
"bg-gradient-to-t from-slate-900/50 to-transparent": showMore
|
|
@@ -31433,7 +31662,7 @@ function DocumentationPanel({
|
|
|
31433
31662
|
return /* @__PURE__ */ jsxRuntime.jsx(MarkdownProvider_default, { markdown: value, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
31434
31663
|
"section",
|
|
31435
31664
|
{
|
|
31436
|
-
className:
|
|
31665
|
+
className: classNames73__default.default(
|
|
31437
31666
|
"eui-documentation-panel",
|
|
31438
31667
|
"min-h-0 overflow-hidden bg-white text-gray-900",
|
|
31439
31668
|
"dark:bg-gray-950 dark:text-gray-100",
|
|
@@ -31447,7 +31676,7 @@ function DocumentationPanel({
|
|
|
31447
31676
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31448
31677
|
"main",
|
|
31449
31678
|
{
|
|
31450
|
-
className:
|
|
31679
|
+
className: classNames73__default.default(
|
|
31451
31680
|
"eui-documentation-panel-viewer",
|
|
31452
31681
|
"documentation-panel-scrollbar min-w-0 overflow-y-auto scroll-smooth",
|
|
31453
31682
|
viewerClassName
|
|
@@ -31455,7 +31684,7 @@ function DocumentationPanel({
|
|
|
31455
31684
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31456
31685
|
"div",
|
|
31457
31686
|
{
|
|
31458
|
-
className:
|
|
31687
|
+
className: classNames73__default.default(
|
|
31459
31688
|
"mx-auto px-5 py-8 sm:px-6 lg:px-8",
|
|
31460
31689
|
contentMaxWidthClassName,
|
|
31461
31690
|
contentClassName
|
|
@@ -31468,7 +31697,7 @@ function DocumentationPanel({
|
|
|
31468
31697
|
toc ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
31469
31698
|
"aside",
|
|
31470
31699
|
{
|
|
31471
|
-
className:
|
|
31700
|
+
className: classNames73__default.default(
|
|
31472
31701
|
"eui-documentation-panel-toc",
|
|
31473
31702
|
"hidden min-w-0 border-l border-gray-200 bg-white lg:block",
|
|
31474
31703
|
"dark:border-gray-800 dark:bg-gray-950",
|
|
@@ -31477,7 +31706,7 @@ function DocumentationPanel({
|
|
|
31477
31706
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31478
31707
|
"div",
|
|
31479
31708
|
{
|
|
31480
|
-
className:
|
|
31709
|
+
className: classNames73__default.default(
|
|
31481
31710
|
"documentation-panel-scrollbar h-full overflow-y-auto px-5 py-8"
|
|
31482
31711
|
),
|
|
31483
31712
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownTOC_default, {}) })
|
|
@@ -31753,7 +31982,7 @@ function BoxNavItem({ icon, name: name2, to, selected, onClick }) {
|
|
|
31753
31982
|
type: "button",
|
|
31754
31983
|
onClick: handleClick,
|
|
31755
31984
|
"aria-current": selected ? "page" : void 0,
|
|
31756
|
-
className:
|
|
31985
|
+
className: classNames73__default.default(
|
|
31757
31986
|
"w-full min-w-[80px] flex flex-col items-center justify-center py-3 text-center",
|
|
31758
31987
|
"hover:text-secondary-700 hover:bg-gray-300/10 hover:cursor-pointer",
|
|
31759
31988
|
selected ? "text-eui-secondary-700 bg-gray-300/10" : "text-gray-400",
|
|
@@ -34455,11 +34684,11 @@ function addChildren(props, children3) {
|
|
|
34455
34684
|
}
|
|
34456
34685
|
}
|
|
34457
34686
|
}
|
|
34458
|
-
function productionCreate(_2,
|
|
34687
|
+
function productionCreate(_2, jsx256, jsxs129) {
|
|
34459
34688
|
return create3;
|
|
34460
34689
|
function create3(_3, type2, props, key) {
|
|
34461
34690
|
const isStaticChildren = Array.isArray(props.children);
|
|
34462
|
-
const fn = isStaticChildren ? jsxs129 :
|
|
34691
|
+
const fn = isStaticChildren ? jsxs129 : jsx256;
|
|
34463
34692
|
return key ? fn(type2, props, key) : fn(type2, props);
|
|
34464
34693
|
}
|
|
34465
34694
|
}
|
|
@@ -54490,7 +54719,7 @@ function MarkdownHeading({
|
|
|
54490
54719
|
id: id2,
|
|
54491
54720
|
level: typographyLevel,
|
|
54492
54721
|
bold: true,
|
|
54493
|
-
className:
|
|
54722
|
+
className: classNames73__default.default(
|
|
54494
54723
|
"eui-markdown-heading group relative scroll-mt-24 font-bold leading-tight text-gray-900 dark:text-gray-100",
|
|
54495
54724
|
HEADING_STYLES[level],
|
|
54496
54725
|
className
|
|
@@ -54653,18 +54882,18 @@ function powerSetPermutations(arr) {
|
|
|
54653
54882
|
}
|
|
54654
54883
|
}
|
|
54655
54884
|
var classNameCombinations = {};
|
|
54656
|
-
function getClassNameCombinations(
|
|
54657
|
-
if (
|
|
54658
|
-
var key =
|
|
54885
|
+
function getClassNameCombinations(classNames77) {
|
|
54886
|
+
if (classNames77.length === 0 || classNames77.length === 1) return classNames77;
|
|
54887
|
+
var key = classNames77.join(".");
|
|
54659
54888
|
if (!classNameCombinations[key]) {
|
|
54660
|
-
classNameCombinations[key] = powerSetPermutations(
|
|
54889
|
+
classNameCombinations[key] = powerSetPermutations(classNames77);
|
|
54661
54890
|
}
|
|
54662
54891
|
return classNameCombinations[key];
|
|
54663
54892
|
}
|
|
54664
|
-
function createStyleObject(
|
|
54893
|
+
function createStyleObject(classNames77) {
|
|
54665
54894
|
var elementStyle = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
54666
54895
|
var stylesheet = arguments.length > 2 ? arguments[2] : void 0;
|
|
54667
|
-
var nonTokenClassNames =
|
|
54896
|
+
var nonTokenClassNames = classNames77.filter(function(className) {
|
|
54668
54897
|
return className !== "token";
|
|
54669
54898
|
});
|
|
54670
54899
|
var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);
|
|
@@ -54672,8 +54901,8 @@ function createStyleObject(classNames76) {
|
|
|
54672
54901
|
return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);
|
|
54673
54902
|
}, elementStyle);
|
|
54674
54903
|
}
|
|
54675
|
-
function createClassNameString(
|
|
54676
|
-
return
|
|
54904
|
+
function createClassNameString(classNames77) {
|
|
54905
|
+
return classNames77.join(" ");
|
|
54677
54906
|
}
|
|
54678
54907
|
function createChildren2(stylesheet, useInlineStyles) {
|
|
54679
54908
|
var childrenCount = 0;
|
|
@@ -54846,8 +55075,8 @@ function flattenCodeTree(tree) {
|
|
|
54846
55075
|
}));
|
|
54847
55076
|
} else if (node2.children) {
|
|
54848
55077
|
var _node$properties;
|
|
54849
|
-
var
|
|
54850
|
-
flattenCodeTree(node2.children,
|
|
55078
|
+
var classNames77 = className.concat(((_node$properties = node2.properties) === null || _node$properties === void 0 ? void 0 : _node$properties.className) || []);
|
|
55079
|
+
flattenCodeTree(node2.children, classNames77).forEach(function(i2) {
|
|
54851
55080
|
return newTree.push(i2);
|
|
54852
55081
|
});
|
|
54853
55082
|
}
|
|
@@ -55378,7 +55607,7 @@ var json_default = json;
|
|
|
55378
55607
|
|
|
55379
55608
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/jsx.js
|
|
55380
55609
|
init_jsx();
|
|
55381
|
-
var jsx_default =
|
|
55610
|
+
var jsx_default = jsx217;
|
|
55382
55611
|
|
|
55383
55612
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/markup.js
|
|
55384
55613
|
init_markup();
|
|
@@ -55511,7 +55740,7 @@ function MarkdownCodeBlock({
|
|
|
55511
55740
|
"div",
|
|
55512
55741
|
{
|
|
55513
55742
|
...props,
|
|
55514
|
-
className:
|
|
55743
|
+
className: classNames73__default.default(
|
|
55515
55744
|
"eui-markdown-code my-6 overflow-hidden rounded-md border border-slate-700 bg-[#0d1117] text-slate-300",
|
|
55516
55745
|
className
|
|
55517
55746
|
),
|
|
@@ -55582,7 +55811,7 @@ function MarkdownInlineCode({
|
|
|
55582
55811
|
Code,
|
|
55583
55812
|
{
|
|
55584
55813
|
...props,
|
|
55585
|
-
className:
|
|
55814
|
+
className: classNames73__default.default(
|
|
55586
55815
|
"eui-markdown-inline-code whitespace-break-spaces rounded-md border border-gray-300/70 bg-gray-200/60 px-1.5 py-0.5 font-mono text-[0.875em] font-medium text-gray-900 dark:border-gray-600/70 dark:bg-gray-700/50 dark:text-gray-200",
|
|
55587
55816
|
className
|
|
55588
55817
|
),
|
|
@@ -55623,7 +55852,7 @@ function MarkdownLink({
|
|
|
55623
55852
|
href: safeHref,
|
|
55624
55853
|
target: resolvedTarget,
|
|
55625
55854
|
rel,
|
|
55626
|
-
className:
|
|
55855
|
+
className: classNames73__default.default(
|
|
55627
55856
|
"eui-markdown-link font-medium text-blue-600 underline underline-offset-4 transition-colors hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",
|
|
55628
55857
|
className
|
|
55629
55858
|
),
|
|
@@ -55658,7 +55887,7 @@ function MarkdownImage({
|
|
|
55658
55887
|
title,
|
|
55659
55888
|
loading: "lazy",
|
|
55660
55889
|
decoding: "async",
|
|
55661
|
-
className:
|
|
55890
|
+
className: classNames73__default.default(
|
|
55662
55891
|
"eui-markdown-image my-6 h-auto max-w-full rounded-md border border-gray-200 dark:border-gray-700",
|
|
55663
55892
|
className
|
|
55664
55893
|
)
|
|
@@ -55675,7 +55904,7 @@ function MarkdownTable({
|
|
|
55675
55904
|
TableElement,
|
|
55676
55905
|
{
|
|
55677
55906
|
...props,
|
|
55678
|
-
className:
|
|
55907
|
+
className: classNames73__default.default(
|
|
55679
55908
|
"eui-markdown-table w-full border-collapse text-[0.925rem]",
|
|
55680
55909
|
className
|
|
55681
55910
|
),
|
|
@@ -55692,7 +55921,7 @@ function MarkdownTableCell({
|
|
|
55692
55921
|
TableCell,
|
|
55693
55922
|
{
|
|
55694
55923
|
...props,
|
|
55695
|
-
className:
|
|
55924
|
+
className: classNames73__default.default(
|
|
55696
55925
|
"eui-markdown-table-cell border-b border-r border-gray-200 p-3 text-left align-top last:border-r-0 dark:border-gray-700",
|
|
55697
55926
|
className
|
|
55698
55927
|
),
|
|
@@ -55709,7 +55938,7 @@ function MarkdownTableHeaderCell({
|
|
|
55709
55938
|
TableHeaderCell,
|
|
55710
55939
|
{
|
|
55711
55940
|
...props,
|
|
55712
|
-
className:
|
|
55941
|
+
className: classNames73__default.default(
|
|
55713
55942
|
"eui-markdown-table-header-cell border-b border-r border-gray-200 p-3 text-left align-top font-bold text-gray-900 last:border-r-0 dark:border-gray-700 dark:text-gray-100",
|
|
55714
55943
|
className
|
|
55715
55944
|
),
|
|
@@ -55725,7 +55954,7 @@ function MarkdownTableHead({
|
|
|
55725
55954
|
TableHead,
|
|
55726
55955
|
{
|
|
55727
55956
|
...props,
|
|
55728
|
-
className:
|
|
55957
|
+
className: classNames73__default.default(
|
|
55729
55958
|
"eui-markdown-table-head bg-gray-50 dark:bg-gray-900",
|
|
55730
55959
|
className
|
|
55731
55960
|
)
|
|
@@ -55740,7 +55969,7 @@ function MarkdownTableBody({
|
|
|
55740
55969
|
TableBody,
|
|
55741
55970
|
{
|
|
55742
55971
|
...props,
|
|
55743
|
-
className:
|
|
55972
|
+
className: classNames73__default.default("eui-markdown-table-body", className)
|
|
55744
55973
|
}
|
|
55745
55974
|
);
|
|
55746
55975
|
}
|
|
@@ -55752,7 +55981,7 @@ function MarkdownTableRow({
|
|
|
55752
55981
|
TableRow,
|
|
55753
55982
|
{
|
|
55754
55983
|
...props,
|
|
55755
|
-
className:
|
|
55984
|
+
className: classNames73__default.default(
|
|
55756
55985
|
"eui-markdown-table-row even:bg-gray-50/70 dark:even:bg-gray-900/60",
|
|
55757
55986
|
className
|
|
55758
55987
|
)
|
|
@@ -55770,7 +55999,7 @@ function MarkdownBlockquote({
|
|
|
55770
55999
|
{
|
|
55771
56000
|
...props,
|
|
55772
56001
|
as: "blockquote",
|
|
55773
|
-
className:
|
|
56002
|
+
className: classNames73__default.default(
|
|
55774
56003
|
"eui-markdown-blockquote my-6 border-l-4 border-gray-300 bg-transparent px-4 py-0 text-gray-600 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 dark:border-gray-700 dark:text-gray-400",
|
|
55775
56004
|
className
|
|
55776
56005
|
),
|
|
@@ -55789,7 +56018,7 @@ function MarkdownParagraph({
|
|
|
55789
56018
|
{
|
|
55790
56019
|
...props,
|
|
55791
56020
|
level: 1,
|
|
55792
|
-
className:
|
|
56021
|
+
className: classNames73__default.default("eui-markdown-paragraph my-4", className),
|
|
55793
56022
|
children: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: children3 })
|
|
55794
56023
|
}
|
|
55795
56024
|
);
|
|
@@ -55800,7 +56029,7 @@ function MarkdownStrong({ className, ...props }) {
|
|
|
55800
56029
|
"strong",
|
|
55801
56030
|
{
|
|
55802
56031
|
...props,
|
|
55803
|
-
className:
|
|
56032
|
+
className: classNames73__default.default(
|
|
55804
56033
|
"eui-markdown-strong font-semibold text-gray-950 dark:text-gray-100",
|
|
55805
56034
|
className
|
|
55806
56035
|
)
|
|
@@ -55813,7 +56042,7 @@ function MarkdownEmphasis({ className, ...props }) {
|
|
|
55813
56042
|
"em",
|
|
55814
56043
|
{
|
|
55815
56044
|
...props,
|
|
55816
|
-
className:
|
|
56045
|
+
className: classNames73__default.default("eui-markdown-emphasis italic", className)
|
|
55817
56046
|
}
|
|
55818
56047
|
);
|
|
55819
56048
|
}
|
|
@@ -55826,7 +56055,7 @@ function MarkdownStrikethrough({
|
|
|
55826
56055
|
"del",
|
|
55827
56056
|
{
|
|
55828
56057
|
...props,
|
|
55829
|
-
className:
|
|
56058
|
+
className: classNames73__default.default(
|
|
55830
56059
|
"eui-markdown-strikethrough text-gray-500 dark:text-gray-400",
|
|
55831
56060
|
className
|
|
55832
56061
|
)
|
|
@@ -55887,7 +56116,7 @@ function MarkdownTaskCheckbox({
|
|
|
55887
56116
|
"input",
|
|
55888
56117
|
{
|
|
55889
56118
|
...props,
|
|
55890
|
-
className:
|
|
56119
|
+
className: classNames73__default.default(
|
|
55891
56120
|
"eui-markdown-task-checkbox mr-2 translate-y-px accent-blue-600",
|
|
55892
56121
|
className
|
|
55893
56122
|
)
|
|
@@ -55903,7 +56132,7 @@ function MarkdownThematicBreak({
|
|
|
55903
56132
|
"hr",
|
|
55904
56133
|
{
|
|
55905
56134
|
...props,
|
|
55906
|
-
className:
|
|
56135
|
+
className: classNames73__default.default(
|
|
55907
56136
|
"eui-markdown-thematic-break my-8 border-0 border-t border-gray-200 dark:border-gray-800",
|
|
55908
56137
|
className
|
|
55909
56138
|
)
|
|
@@ -55920,7 +56149,7 @@ function MarkdownDetails({ className, ...props }) {
|
|
|
55920
56149
|
"details",
|
|
55921
56150
|
{
|
|
55922
56151
|
...props,
|
|
55923
|
-
className:
|
|
56152
|
+
className: classNames73__default.default(
|
|
55924
56153
|
"eui-markdown-details my-4 rounded-md border border-gray-200 bg-gray-50 px-4 py-3 dark:border-gray-800 dark:bg-gray-900",
|
|
55925
56154
|
className
|
|
55926
56155
|
)
|
|
@@ -55932,7 +56161,7 @@ function MarkdownSummary({ className, ...props }) {
|
|
|
55932
56161
|
"summary",
|
|
55933
56162
|
{
|
|
55934
56163
|
...props,
|
|
55935
|
-
className:
|
|
56164
|
+
className: classNames73__default.default(
|
|
55936
56165
|
"eui-markdown-summary cursor-pointer font-semibold text-gray-950 dark:text-gray-100",
|
|
55937
56166
|
className
|
|
55938
56167
|
)
|
|
@@ -55944,7 +56173,7 @@ function MarkdownFigure({ className, ...props }) {
|
|
|
55944
56173
|
"figure",
|
|
55945
56174
|
{
|
|
55946
56175
|
...props,
|
|
55947
|
-
className:
|
|
56176
|
+
className: classNames73__default.default("eui-markdown-figure my-6", className)
|
|
55948
56177
|
}
|
|
55949
56178
|
);
|
|
55950
56179
|
}
|
|
@@ -55956,7 +56185,7 @@ function MarkdownFigcaption({
|
|
|
55956
56185
|
return /* @__PURE__ */ jsxRuntime.jsx("figcaption", { ...props, className: "eui-markdown-figcaption mt-2 text-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
55957
56186
|
Caption,
|
|
55958
56187
|
{
|
|
55959
|
-
className:
|
|
56188
|
+
className: classNames73__default.default(
|
|
55960
56189
|
"text-gray-500 opacity-100 dark:text-gray-400",
|
|
55961
56190
|
className
|
|
55962
56191
|
),
|
|
@@ -56355,14 +56584,14 @@ function MarkdownRenderer({
|
|
|
56355
56584
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
56356
56585
|
"div",
|
|
56357
56586
|
{
|
|
56358
|
-
className:
|
|
56587
|
+
className: classNames73__default.default(
|
|
56359
56588
|
"eui-markdown markdown-body break-words bg-transparent text-[0.95rem] leading-7 text-gray-800 dark:text-gray-300",
|
|
56360
56589
|
className
|
|
56361
56590
|
),
|
|
56362
56591
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
56363
56592
|
"div",
|
|
56364
56593
|
{
|
|
56365
|
-
className:
|
|
56594
|
+
className: classNames73__default.default(
|
|
56366
56595
|
"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
56367
56596
|
contentClassName
|
|
56368
56597
|
),
|
|
@@ -56440,11 +56669,11 @@ function MarkdownTOCItem({
|
|
|
56440
56669
|
onClick: () => onSelect?.(heading3),
|
|
56441
56670
|
"aria-current": active ? "location" : void 0,
|
|
56442
56671
|
title: label,
|
|
56443
|
-
className:
|
|
56672
|
+
className: classNames73__default.default(
|
|
56444
56673
|
"eui-markdown-toc-item",
|
|
56445
56674
|
"block w-full text-left text-sm transition-all ease-in-out duration-150",
|
|
56446
56675
|
"hover:text-primary",
|
|
56447
|
-
active ?
|
|
56676
|
+
active ? classNames73__default.default("text-primary font-semibold underline", activeClassName) : classNames73__default.default("text-gray-500 dark:text-gray-400", inactiveClassName),
|
|
56448
56677
|
className
|
|
56449
56678
|
),
|
|
56450
56679
|
style: {
|
|
@@ -56510,7 +56739,7 @@ function MarkdownTOC({
|
|
|
56510
56739
|
return emptyState ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
56511
56740
|
"div",
|
|
56512
56741
|
{
|
|
56513
|
-
className:
|
|
56742
|
+
className: classNames73__default.default(
|
|
56514
56743
|
"eui-markdown-toc",
|
|
56515
56744
|
"text-sm text-gray-500 dark:text-gray-400",
|
|
56516
56745
|
className
|
|
@@ -56530,7 +56759,7 @@ function MarkdownTOC({
|
|
|
56530
56759
|
{
|
|
56531
56760
|
type: "button",
|
|
56532
56761
|
onClick: () => setCollapsed((value) => !value),
|
|
56533
|
-
className:
|
|
56762
|
+
className: classNames73__default.default(
|
|
56534
56763
|
"eui-markdown-toc-title",
|
|
56535
56764
|
"flex w-full items-center justify-between gap-2 text-left",
|
|
56536
56765
|
"text-sm font-semibold uppercase tracking-wide",
|
|
@@ -56543,7 +56772,7 @@ function MarkdownTOC({
|
|
|
56543
56772
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
56544
56773
|
"span",
|
|
56545
56774
|
{
|
|
56546
|
-
className:
|
|
56775
|
+
className: classNames73__default.default(
|
|
56547
56776
|
"text-xs opacity-60 transition-transform duration-150",
|
|
56548
56777
|
!collapsed && "rotate-90"
|
|
56549
56778
|
),
|
|
@@ -56556,7 +56785,7 @@ function MarkdownTOC({
|
|
|
56556
56785
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
56557
56786
|
"h2",
|
|
56558
56787
|
{
|
|
56559
|
-
className:
|
|
56788
|
+
className: classNames73__default.default(
|
|
56560
56789
|
"eui-markdown-toc-title",
|
|
56561
56790
|
"text-sm font-semibold uppercase tracking-wide",
|
|
56562
56791
|
"text-gray-900 dark:text-gray-100",
|
|
@@ -56568,7 +56797,7 @@ function MarkdownTOC({
|
|
|
56568
56797
|
!collapsed ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
56569
56798
|
"nav",
|
|
56570
56799
|
{
|
|
56571
|
-
className:
|
|
56800
|
+
className: classNames73__default.default(
|
|
56572
56801
|
"eui-markdown-toc-list",
|
|
56573
56802
|
"space-y-1",
|
|
56574
56803
|
listClassName
|
|
@@ -56592,7 +56821,7 @@ function MarkdownTOC({
|
|
|
56592
56821
|
}
|
|
56593
56822
|
) : null
|
|
56594
56823
|
] });
|
|
56595
|
-
return /* @__PURE__ */ jsxRuntime.jsx("aside", { className:
|
|
56824
|
+
return /* @__PURE__ */ jsxRuntime.jsx("aside", { className: classNames73__default.default("eui-markdown-toc", "space-y-4", className), children: content3 });
|
|
56596
56825
|
}
|
|
56597
56826
|
var MarkdownTOC_default = MarkdownTOC;
|
|
56598
56827
|
var DEFAULT_MARKDOWN_TOOLBAR_ACTIONS = [
|
|
@@ -56691,7 +56920,7 @@ function MarkdownToolbar({
|
|
|
56691
56920
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
56692
56921
|
"div",
|
|
56693
56922
|
{
|
|
56694
|
-
className:
|
|
56923
|
+
className: classNames73__default.default(
|
|
56695
56924
|
"eui-markdown-toolbar",
|
|
56696
56925
|
"flex flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 p-2",
|
|
56697
56926
|
"dark:border-gray-700 dark:bg-gray-900",
|
|
@@ -56705,7 +56934,7 @@ function MarkdownToolbar({
|
|
|
56705
56934
|
disabled: disabled || actionsDisabled,
|
|
56706
56935
|
title: action.shortcut ? `${action.title || action.label} (${action.shortcut})` : action.title || action.label,
|
|
56707
56936
|
onClick: () => onAction?.(action.id),
|
|
56708
|
-
className:
|
|
56937
|
+
className: classNames73__default.default(
|
|
56709
56938
|
"eui-markdown-toolbar-button",
|
|
56710
56939
|
"inline-flex items-center justify-center rounded border border-transparent",
|
|
56711
56940
|
"text-gray-700 transition-colors hover:border-gray-300 hover:bg-white",
|
|
@@ -56725,7 +56954,7 @@ function MarkdownToolbar({
|
|
|
56725
56954
|
disabled,
|
|
56726
56955
|
onClick: onViewModeToggle,
|
|
56727
56956
|
title: isPreviewMode ? "Switch to Markdown syntax" : "Switch to preview",
|
|
56728
|
-
className:
|
|
56957
|
+
className: classNames73__default.default(
|
|
56729
56958
|
"eui-markdown-view-toggle",
|
|
56730
56959
|
"inline-flex items-center justify-center rounded border font-medium transition-colors",
|
|
56731
56960
|
"border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -56982,7 +57211,7 @@ function MarkdownSourceEditor({
|
|
|
56982
57211
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
56983
57212
|
"div",
|
|
56984
57213
|
{
|
|
56985
|
-
className:
|
|
57214
|
+
className: classNames73__default.default(
|
|
56986
57215
|
"eui-markdown-editor",
|
|
56987
57216
|
"overflow-hidden rounded border border-gray-300 bg-white",
|
|
56988
57217
|
"dark:border-gray-700 dark:bg-gray-950",
|
|
@@ -56998,7 +57227,7 @@ function MarkdownSourceEditor({
|
|
|
56998
57227
|
actionsDisabled: readOnly,
|
|
56999
57228
|
viewMode: currentViewMode,
|
|
57000
57229
|
showViewModeToggle,
|
|
57001
|
-
className:
|
|
57230
|
+
className: classNames73__default.default(toolbarClassName, toolbarProps?.className),
|
|
57002
57231
|
onViewModeToggle: toggleViewMode,
|
|
57003
57232
|
onAction: handleToolbarAction
|
|
57004
57233
|
}
|
|
@@ -57006,7 +57235,7 @@ function MarkdownSourceEditor({
|
|
|
57006
57235
|
currentViewMode === "preview" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57007
57236
|
"div",
|
|
57008
57237
|
{
|
|
57009
|
-
className:
|
|
57238
|
+
className: classNames73__default.default(
|
|
57010
57239
|
"eui-markdown-editor-preview",
|
|
57011
57240
|
"min-h-[260px] p-4",
|
|
57012
57241
|
previewClassName
|
|
@@ -57029,7 +57258,7 @@ function MarkdownSourceEditor({
|
|
|
57029
57258
|
onChange: (event) => updateValue(event.target.value),
|
|
57030
57259
|
onBlur,
|
|
57031
57260
|
onKeyDown: handleKeyDown,
|
|
57032
|
-
className:
|
|
57261
|
+
className: classNames73__default.default(
|
|
57033
57262
|
"eui-markdown-source-textarea",
|
|
57034
57263
|
"block w-full resize-y border-0 bg-transparent p-4 font-mono text-sm leading-7",
|
|
57035
57264
|
"text-gray-900 outline-none placeholder:text-gray-400",
|
|
@@ -57059,7 +57288,7 @@ function MarkdownPreviewPane({
|
|
|
57059
57288
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
57060
57289
|
"div",
|
|
57061
57290
|
{
|
|
57062
|
-
className:
|
|
57291
|
+
className: classNames73__default.default(
|
|
57063
57292
|
"eui-markdown-preview-pane",
|
|
57064
57293
|
"rounded border border-gray-300 bg-white p-4",
|
|
57065
57294
|
"dark:border-gray-700 dark:bg-gray-950",
|
|
@@ -57109,7 +57338,7 @@ function MarkdownSplitEditor({
|
|
|
57109
57338
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
57110
57339
|
"div",
|
|
57111
57340
|
{
|
|
57112
|
-
className:
|
|
57341
|
+
className: classNames73__default.default(
|
|
57113
57342
|
"eui-markdown-split-editor",
|
|
57114
57343
|
"grid gap-4",
|
|
57115
57344
|
isHorizontal ? "grid-cols-1 lg:grid-cols-2" : "grid-cols-1",
|
|
@@ -57119,7 +57348,7 @@ function MarkdownSplitEditor({
|
|
|
57119
57348
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
57120
57349
|
"div",
|
|
57121
57350
|
{
|
|
57122
|
-
className:
|
|
57351
|
+
className: classNames73__default.default(
|
|
57123
57352
|
"eui-markdown-split-source",
|
|
57124
57353
|
"min-w-0 space-y-2",
|
|
57125
57354
|
sourceWrapperClassName
|
|
@@ -57143,7 +57372,7 @@ function MarkdownSplitEditor({
|
|
|
57143
57372
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
57144
57373
|
"div",
|
|
57145
57374
|
{
|
|
57146
|
-
className:
|
|
57375
|
+
className: classNames73__default.default(
|
|
57147
57376
|
"eui-markdown-split-preview",
|
|
57148
57377
|
"min-w-0 space-y-2",
|
|
57149
57378
|
previewWrapperClassName
|
|
@@ -57233,7 +57462,7 @@ function MarkdownField({
|
|
|
57233
57462
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
57234
57463
|
"div",
|
|
57235
57464
|
{
|
|
57236
|
-
className:
|
|
57465
|
+
className: classNames73__default.default(
|
|
57237
57466
|
"eui-markdown-field",
|
|
57238
57467
|
"relative space-y-2",
|
|
57239
57468
|
wrapperClassName
|
|
@@ -57243,7 +57472,7 @@ function MarkdownField({
|
|
|
57243
57472
|
"label",
|
|
57244
57473
|
{
|
|
57245
57474
|
htmlFor: editorProps.id || field.name,
|
|
57246
|
-
className:
|
|
57475
|
+
className: classNames73__default.default(
|
|
57247
57476
|
"block text-sm font-medium text-gray-700 dark:text-gray-200",
|
|
57248
57477
|
labelClassName
|
|
57249
57478
|
),
|
|
@@ -57268,7 +57497,7 @@ function MarkdownField({
|
|
|
57268
57497
|
helperText && !hasError ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57269
57498
|
"p",
|
|
57270
57499
|
{
|
|
57271
|
-
className:
|
|
57500
|
+
className: classNames73__default.default(
|
|
57272
57501
|
"text-sm text-gray-500 dark:text-gray-400",
|
|
57273
57502
|
helperTextClassName
|
|
57274
57503
|
),
|
|
@@ -57323,7 +57552,7 @@ function CodeMirrorMarkdownEditor({
|
|
|
57323
57552
|
{
|
|
57324
57553
|
id: id2,
|
|
57325
57554
|
"data-name": name2,
|
|
57326
|
-
className:
|
|
57555
|
+
className: classNames73__default.default(
|
|
57327
57556
|
"eui-markdown-adapter",
|
|
57328
57557
|
"eui-markdown-codemirror-adapter",
|
|
57329
57558
|
"overflow-hidden rounded border border-gray-300 bg-white",
|
|
@@ -57357,7 +57586,7 @@ function CodeMirrorMarkdownEditor({
|
|
|
57357
57586
|
closeBrackets: true,
|
|
57358
57587
|
bracketMatching: true
|
|
57359
57588
|
},
|
|
57360
|
-
className:
|
|
57589
|
+
className: classNames73__default.default("eui-markdown-codemirror", editorClassName),
|
|
57361
57590
|
onChange: updateValue,
|
|
57362
57591
|
onBlur
|
|
57363
57592
|
}
|
|
@@ -57452,7 +57681,7 @@ function createDefaultPlugins({
|
|
|
57452
57681
|
...showToolbar ? [
|
|
57453
57682
|
editor.toolbarPlugin({
|
|
57454
57683
|
toolbarContents: toolbarContents ?? DefaultToolbar,
|
|
57455
|
-
toolbarClassName:
|
|
57684
|
+
toolbarClassName: classNames73__default.default(
|
|
57456
57685
|
"eui-markdown-mdx-toolbar",
|
|
57457
57686
|
toolbarClassName
|
|
57458
57687
|
),
|
|
@@ -57569,7 +57798,7 @@ var MDXMarkdownEditor = React26.forwardRef(
|
|
|
57569
57798
|
"aria-required": required || void 0,
|
|
57570
57799
|
"aria-invalid": invalid || void 0,
|
|
57571
57800
|
onBlurCapture: handleBlur,
|
|
57572
|
-
className:
|
|
57801
|
+
className: classNames73__default.default(
|
|
57573
57802
|
"eui-markdown-adapter",
|
|
57574
57803
|
"eui-markdown-mdx-adapter",
|
|
57575
57804
|
dark && ["dark", "dark-theme"],
|
|
@@ -57587,8 +57816,8 @@ var MDXMarkdownEditor = React26.forwardRef(
|
|
|
57587
57816
|
markdown: currentValue ?? "",
|
|
57588
57817
|
readOnly: disabled || readOnly,
|
|
57589
57818
|
plugins: plugins ?? defaultPlugins,
|
|
57590
|
-
className:
|
|
57591
|
-
contentEditableClassName:
|
|
57819
|
+
className: classNames73__default.default("eui-markdown-mdx-editor", editorClassName),
|
|
57820
|
+
contentEditableClassName: classNames73__default.default(
|
|
57592
57821
|
"eui-markdown-mdx-content",
|
|
57593
57822
|
contentEditableClassName
|
|
57594
57823
|
),
|
|
@@ -57625,7 +57854,7 @@ function MDXMarkdownField({
|
|
|
57625
57854
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
57626
57855
|
"div",
|
|
57627
57856
|
{
|
|
57628
|
-
className:
|
|
57857
|
+
className: classNames73__default.default(
|
|
57629
57858
|
"eui-markdown-mdx-field",
|
|
57630
57859
|
"relative space-y-2",
|
|
57631
57860
|
wrapperClassName
|
|
@@ -57635,7 +57864,7 @@ function MDXMarkdownField({
|
|
|
57635
57864
|
"label",
|
|
57636
57865
|
{
|
|
57637
57866
|
htmlFor: editorId,
|
|
57638
|
-
className:
|
|
57867
|
+
className: classNames73__default.default(
|
|
57639
57868
|
"block text-sm font-medium text-gray-700 dark:text-gray-200",
|
|
57640
57869
|
labelClassName
|
|
57641
57870
|
),
|
|
@@ -57669,7 +57898,7 @@ function MDXMarkdownField({
|
|
|
57669
57898
|
"p",
|
|
57670
57899
|
{
|
|
57671
57900
|
id: helperId,
|
|
57672
|
-
className:
|
|
57901
|
+
className: classNames73__default.default(
|
|
57673
57902
|
"text-sm text-gray-500 dark:text-gray-400",
|
|
57674
57903
|
helperTextClassName
|
|
57675
57904
|
),
|
|
@@ -57729,10 +57958,10 @@ function MarkdownLayout({
|
|
|
57729
57958
|
};
|
|
57730
57959
|
const hasLeftToc = hasToc && tocPosition === "left";
|
|
57731
57960
|
const hasRightToc = hasToc && tocPosition === "right";
|
|
57732
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
57961
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames73__default.default("eui-markdown-layout", "w-full", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
57733
57962
|
"div",
|
|
57734
57963
|
{
|
|
57735
|
-
className:
|
|
57964
|
+
className: classNames73__default.default(
|
|
57736
57965
|
"eui-markdown-layout-container",
|
|
57737
57966
|
"mx-auto w-full px-4 sm:px-6 lg:px-8",
|
|
57738
57967
|
containerClassName
|
|
@@ -57744,7 +57973,7 @@ function MarkdownLayout({
|
|
|
57744
57973
|
header ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57745
57974
|
"header",
|
|
57746
57975
|
{
|
|
57747
|
-
className:
|
|
57976
|
+
className: classNames73__default.default(
|
|
57748
57977
|
"eui-markdown-layout-header",
|
|
57749
57978
|
"mb-8",
|
|
57750
57979
|
headerClassName
|
|
@@ -57755,7 +57984,7 @@ function MarkdownLayout({
|
|
|
57755
57984
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
57756
57985
|
"div",
|
|
57757
57986
|
{
|
|
57758
|
-
className:
|
|
57987
|
+
className: classNames73__default.default(
|
|
57759
57988
|
"eui-markdown-layout-grid",
|
|
57760
57989
|
"grid grid-cols-1 gap-8",
|
|
57761
57990
|
hasSidebar && hasToc && "xl:grid-cols-[16rem_minmax(0,1fr)_18rem]",
|
|
@@ -57768,7 +57997,7 @@ function MarkdownLayout({
|
|
|
57768
57997
|
hasSidebar ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57769
57998
|
"aside",
|
|
57770
57999
|
{
|
|
57771
|
-
className:
|
|
58000
|
+
className: classNames73__default.default(
|
|
57772
58001
|
"eui-markdown-layout-sidebar",
|
|
57773
58002
|
"min-w-0",
|
|
57774
58003
|
stickySidebar && "lg:sticky lg:self-start",
|
|
@@ -57781,7 +58010,7 @@ function MarkdownLayout({
|
|
|
57781
58010
|
hasLeftToc ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57782
58011
|
"aside",
|
|
57783
58012
|
{
|
|
57784
|
-
className:
|
|
58013
|
+
className: classNames73__default.default(
|
|
57785
58014
|
"eui-markdown-layout-toc",
|
|
57786
58015
|
"min-w-0",
|
|
57787
58016
|
stickyToc && "lg:sticky lg:self-start",
|
|
@@ -57794,7 +58023,7 @@ function MarkdownLayout({
|
|
|
57794
58023
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
57795
58024
|
"main",
|
|
57796
58025
|
{
|
|
57797
|
-
className:
|
|
58026
|
+
className: classNames73__default.default(
|
|
57798
58027
|
"eui-markdown-layout-content",
|
|
57799
58028
|
"min-w-0",
|
|
57800
58029
|
contentClassName
|
|
@@ -57805,7 +58034,7 @@ function MarkdownLayout({
|
|
|
57805
58034
|
hasRightToc ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57806
58035
|
"aside",
|
|
57807
58036
|
{
|
|
57808
|
-
className:
|
|
58037
|
+
className: classNames73__default.default(
|
|
57809
58038
|
"eui-markdown-layout-toc",
|
|
57810
58039
|
"min-w-0",
|
|
57811
58040
|
stickyToc && "lg:sticky lg:self-start",
|
|
@@ -57818,7 +58047,7 @@ function MarkdownLayout({
|
|
|
57818
58047
|
hasAside ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57819
58048
|
"aside",
|
|
57820
58049
|
{
|
|
57821
|
-
className:
|
|
58050
|
+
className: classNames73__default.default(
|
|
57822
58051
|
"eui-markdown-layout-aside",
|
|
57823
58052
|
"min-w-0",
|
|
57824
58053
|
stickyAside && "2xl:sticky 2xl:self-start",
|
|
@@ -57834,7 +58063,7 @@ function MarkdownLayout({
|
|
|
57834
58063
|
footer2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57835
58064
|
"footer",
|
|
57836
58065
|
{
|
|
57837
|
-
className:
|
|
58066
|
+
className: classNames73__default.default(
|
|
57838
58067
|
"eui-markdown-layout-footer",
|
|
57839
58068
|
"mt-10",
|
|
57840
58069
|
footerClassName
|
|
@@ -57871,7 +58100,7 @@ function MarkdownDocsLayoutContent({
|
|
|
57871
58100
|
const resolvedHeader = header ?? (title || description || headerActions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57872
58101
|
"div",
|
|
57873
58102
|
{
|
|
57874
|
-
className:
|
|
58103
|
+
className: classNames73__default.default(
|
|
57875
58104
|
"eui-markdown-docs-header",
|
|
57876
58105
|
"flex flex-col gap-4 border-b border-gray-200 pb-6",
|
|
57877
58106
|
"dark:border-gray-700",
|
|
@@ -57882,7 +58111,7 @@ function MarkdownDocsLayoutContent({
|
|
|
57882
58111
|
title ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57883
58112
|
"h1",
|
|
57884
58113
|
{
|
|
57885
|
-
className:
|
|
58114
|
+
className: classNames73__default.default(
|
|
57886
58115
|
"eui-markdown-docs-title",
|
|
57887
58116
|
"text-3xl font-bold tracking-tight text-gray-950",
|
|
57888
58117
|
"dark:text-gray-50",
|
|
@@ -57894,7 +58123,7 @@ function MarkdownDocsLayoutContent({
|
|
|
57894
58123
|
description ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57895
58124
|
"div",
|
|
57896
58125
|
{
|
|
57897
|
-
className:
|
|
58126
|
+
className: classNames73__default.default(
|
|
57898
58127
|
"eui-markdown-docs-description",
|
|
57899
58128
|
"max-w-3xl text-base leading-7 text-gray-600",
|
|
57900
58129
|
"dark:text-gray-400",
|
|
@@ -57982,7 +58211,7 @@ function GenericLayout({
|
|
|
57982
58211
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { defaultTheme, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
57983
58212
|
"div",
|
|
57984
58213
|
{
|
|
57985
|
-
className:
|
|
58214
|
+
className: classNames73__default.default({
|
|
57986
58215
|
[`${styles}`]: styles
|
|
57987
58216
|
}),
|
|
57988
58217
|
children: children3
|
|
@@ -58031,7 +58260,7 @@ function SidemenuLayout({ data, children: children3 }) {
|
|
|
58031
58260
|
return /* @__PURE__ */ jsxRuntime.jsx(DefaultLayout_default, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
58032
58261
|
"div",
|
|
58033
58262
|
{
|
|
58034
|
-
className:
|
|
58263
|
+
className: classNames73__default.default({
|
|
58035
58264
|
grid: true,
|
|
58036
58265
|
"grid-cols-7 gap-10": !isMobile,
|
|
58037
58266
|
"grid-cols-1 gap-": isMobile
|
|
@@ -58237,7 +58466,8 @@ exports.HeaderNavItemContext = HeaderNavItemContext;
|
|
|
58237
58466
|
exports.HeaderNavItemTitle = HeaderNavItemTitle;
|
|
58238
58467
|
exports.HomeLayout = HomeLayout_default;
|
|
58239
58468
|
exports.Image = Image2;
|
|
58240
|
-
exports.ImageInput =
|
|
58469
|
+
exports.ImageInput = ImageInput_web_default;
|
|
58470
|
+
exports.ImageView = ImageView;
|
|
58241
58471
|
exports.InfiniteScrollTrigger = InfiniteScrollTrigger_default;
|
|
58242
58472
|
exports.Info = Info;
|
|
58243
58473
|
exports.Input = Input;
|
|
@@ -58303,7 +58533,7 @@ exports.MenuItem = MenuItem;
|
|
|
58303
58533
|
exports.MenuItemTitle = MenuItemTitle;
|
|
58304
58534
|
exports.Modal = Modal_default;
|
|
58305
58535
|
exports.MotionSurface = MotionSurface_default;
|
|
58306
|
-
exports.MultiImageInput =
|
|
58536
|
+
exports.MultiImageInput = MultiImageInput_web_default;
|
|
58307
58537
|
exports.NumericRating = NumericRating;
|
|
58308
58538
|
exports.Overline = Overline;
|
|
58309
58539
|
exports.Paragraph = Paragraph;
|