@crystallize/design-system 1.23.6 → 1.24.1
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/CHANGELOG.md +12 -0
- package/dist/index.css +42 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.js +441 -396
- package/dist/index.mjs +110 -68
- package/package.json +3 -1
- package/src/collapsible/collapsible.css +19 -0
- package/src/collapsible/collapsible.stories.tsx +61 -0
- package/src/collapsible/collapsible.tsx +43 -0
- package/src/collapsible/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/select/select-item.tsx +3 -2
- package/tailwind.config.cjs +11 -1
package/dist/index.js
CHANGED
|
@@ -6840,29 +6840,29 @@ var init_5 = __esm({
|
|
|
6840
6840
|
function DialogContent({ children, closable = true, type, className, container, ...delegated }) {
|
|
6841
6841
|
const withIcon = typeof type !== "undefined";
|
|
6842
6842
|
const IconComponent = type && IconMap[type];
|
|
6843
|
-
return /* @__PURE__ */ (0,
|
|
6843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(DialogPrimitive.Portal, {
|
|
6844
6844
|
container,
|
|
6845
6845
|
children: [
|
|
6846
|
-
/* @__PURE__ */ (0,
|
|
6846
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DialogPrimitive.Overlay, {
|
|
6847
6847
|
className: "c-dialog-overlay"
|
|
6848
6848
|
}),
|
|
6849
|
-
/* @__PURE__ */ (0,
|
|
6849
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(DialogPrimitive.Content, {
|
|
6850
6850
|
className: dialogContentStyles({ withIcon, class: className }),
|
|
6851
6851
|
...delegated,
|
|
6852
6852
|
children: [
|
|
6853
|
-
IconComponent && /* @__PURE__ */ (0,
|
|
6853
|
+
IconComponent && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", {
|
|
6854
6854
|
className: "c-dialog-icon-wrapper",
|
|
6855
|
-
children: /* @__PURE__ */ (0,
|
|
6855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(IconComponent, {
|
|
6856
6856
|
className: "c-dialog-icon",
|
|
6857
6857
|
width: 34,
|
|
6858
6858
|
height: 34
|
|
6859
6859
|
})
|
|
6860
6860
|
}),
|
|
6861
|
-
closable && /* @__PURE__ */ (0,
|
|
6861
|
+
closable && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DialogClose, {
|
|
6862
6862
|
asChild: true,
|
|
6863
|
-
children: /* @__PURE__ */ (0,
|
|
6863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Button, {
|
|
6864
6864
|
className: "c-dialog-close-button",
|
|
6865
|
-
children: /* @__PURE__ */ (0,
|
|
6865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon.Cancel, {
|
|
6866
6866
|
color: "density",
|
|
6867
6867
|
"aria-label": "Close",
|
|
6868
6868
|
height: 16,
|
|
@@ -6870,7 +6870,7 @@ function DialogContent({ children, closable = true, type, className, container,
|
|
|
6870
6870
|
})
|
|
6871
6871
|
})
|
|
6872
6872
|
}),
|
|
6873
|
-
/* @__PURE__ */ (0,
|
|
6873
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", {
|
|
6874
6874
|
children
|
|
6875
6875
|
})
|
|
6876
6876
|
]
|
|
@@ -6879,39 +6879,39 @@ function DialogContent({ children, closable = true, type, className, container,
|
|
|
6879
6879
|
});
|
|
6880
6880
|
}
|
|
6881
6881
|
function DialogTitle({ className, ...delegated }) {
|
|
6882
|
-
return /* @__PURE__ */ (0,
|
|
6883
|
-
className: (0,
|
|
6882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DialogPrimitive.Title, {
|
|
6883
|
+
className: (0, import_class_variance_authority10.cx)("c-dialog-title", className),
|
|
6884
6884
|
...delegated
|
|
6885
6885
|
});
|
|
6886
6886
|
}
|
|
6887
6887
|
function DialogDescription(delegated) {
|
|
6888
|
-
return /* @__PURE__ */ (0,
|
|
6888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DialogPrimitive.Description, {
|
|
6889
6889
|
className: "c-dialog-description",
|
|
6890
6890
|
...delegated
|
|
6891
6891
|
});
|
|
6892
6892
|
}
|
|
6893
6893
|
function DialogBase({ children, ...delegated }) {
|
|
6894
|
-
return /* @__PURE__ */ (0,
|
|
6894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DialogRoot, {
|
|
6895
6895
|
...delegated,
|
|
6896
6896
|
children
|
|
6897
6897
|
});
|
|
6898
6898
|
}
|
|
6899
|
-
var
|
|
6899
|
+
var import_class_variance_authority10, DialogPrimitive, import_jsx_runtime117, IconMap, dialogContentStyles, DialogTrigger, DialogClose, DialogRoot;
|
|
6900
6900
|
var init_dialog = __esm({
|
|
6901
6901
|
"src/dialog/dialog.tsx"() {
|
|
6902
6902
|
"use strict";
|
|
6903
|
-
|
|
6903
|
+
import_class_variance_authority10 = require("class-variance-authority");
|
|
6904
6904
|
DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
6905
6905
|
init_button2();
|
|
6906
6906
|
init_iconography();
|
|
6907
6907
|
init_5();
|
|
6908
|
-
|
|
6908
|
+
import_jsx_runtime117 = require("react/jsx-runtime");
|
|
6909
6909
|
IconMap = {
|
|
6910
6910
|
error: Icon.Error,
|
|
6911
6911
|
info: Icon.Info,
|
|
6912
6912
|
warning: Icon.Warning
|
|
6913
6913
|
};
|
|
6914
|
-
dialogContentStyles = (0,
|
|
6914
|
+
dialogContentStyles = (0, import_class_variance_authority10.cva)("c-dialog", {
|
|
6915
6915
|
variants: {
|
|
6916
6916
|
withIcon: {
|
|
6917
6917
|
true: "c-dialog-with-icon"
|
|
@@ -6951,14 +6951,14 @@ function ConfirmDialog({
|
|
|
6951
6951
|
type,
|
|
6952
6952
|
closable
|
|
6953
6953
|
}) {
|
|
6954
|
-
const cancelButton = (okCancel || displayCancel) && /* @__PURE__ */ (0,
|
|
6954
|
+
const cancelButton = (okCancel || displayCancel) && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Button, {
|
|
6955
6955
|
onClick: () => {
|
|
6956
6956
|
onCancel?.();
|
|
6957
6957
|
close();
|
|
6958
6958
|
},
|
|
6959
6959
|
children: cancelText
|
|
6960
6960
|
});
|
|
6961
|
-
const okButton = displayOk && /* @__PURE__ */ (0,
|
|
6961
|
+
const okButton = displayOk && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Button, {
|
|
6962
6962
|
intent: okButtonIntent,
|
|
6963
6963
|
onClick: () => {
|
|
6964
6964
|
onOk?.();
|
|
@@ -6966,24 +6966,24 @@ function ConfirmDialog({
|
|
|
6966
6966
|
},
|
|
6967
6967
|
children: okText
|
|
6968
6968
|
});
|
|
6969
|
-
return /* @__PURE__ */ (0,
|
|
6969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(DialogRoot, {
|
|
6970
6970
|
open,
|
|
6971
6971
|
onOpenChange: () => close(),
|
|
6972
|
-
children: /* @__PURE__ */ (0,
|
|
6972
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(Dialog.Content, {
|
|
6973
6973
|
onEscapeKeyDown,
|
|
6974
6974
|
onInteractOutside,
|
|
6975
6975
|
onPointerDownOutside,
|
|
6976
6976
|
type,
|
|
6977
6977
|
closable,
|
|
6978
6978
|
children: [
|
|
6979
|
-
title && /* @__PURE__ */ (0,
|
|
6979
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Dialog.Title, {
|
|
6980
6980
|
children: title
|
|
6981
6981
|
}),
|
|
6982
|
-
description && /* @__PURE__ */ (0,
|
|
6982
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Dialog.Description, {
|
|
6983
6983
|
children: description
|
|
6984
6984
|
}),
|
|
6985
6985
|
content,
|
|
6986
|
-
(displayOk || okCancel || displayCancel) && /* @__PURE__ */ (0,
|
|
6986
|
+
(displayOk || okCancel || displayCancel) && /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", {
|
|
6987
6987
|
className: "c-dialog-content__buttons",
|
|
6988
6988
|
children: [
|
|
6989
6989
|
cancelButton,
|
|
@@ -6994,14 +6994,14 @@ function ConfirmDialog({
|
|
|
6994
6994
|
})
|
|
6995
6995
|
});
|
|
6996
6996
|
}
|
|
6997
|
-
var
|
|
6997
|
+
var import_jsx_runtime118;
|
|
6998
6998
|
var init_confirm_dialog = __esm({
|
|
6999
6999
|
"src/dialog/confirm-dialog.tsx"() {
|
|
7000
7000
|
"use strict";
|
|
7001
7001
|
init_dialog2();
|
|
7002
7002
|
init_button2();
|
|
7003
7003
|
init_dialog();
|
|
7004
|
-
|
|
7004
|
+
import_jsx_runtime118 = require("react/jsx-runtime");
|
|
7005
7005
|
}
|
|
7006
7006
|
});
|
|
7007
7007
|
|
|
@@ -7046,7 +7046,7 @@ function confirm(config) {
|
|
|
7046
7046
|
function render({ okText, cancelText, ...delegated }) {
|
|
7047
7047
|
clearTimeout(timeoutId);
|
|
7048
7048
|
timeoutId = setTimeout(() => {
|
|
7049
|
-
(0, import_react_dom.render)(/* @__PURE__ */ (0,
|
|
7049
|
+
(0, import_react_dom.render)(/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(ConfirmDialog, {
|
|
7050
7050
|
...delegated,
|
|
7051
7051
|
okText,
|
|
7052
7052
|
cancelText
|
|
@@ -7123,14 +7123,14 @@ function withConfirm(delegated) {
|
|
|
7123
7123
|
onPointerDownOutside: dumbFn
|
|
7124
7124
|
};
|
|
7125
7125
|
}
|
|
7126
|
-
var import_react_dom,
|
|
7126
|
+
var import_react_dom, import_jsx_runtime119, dumbFn;
|
|
7127
7127
|
var init_config = __esm({
|
|
7128
7128
|
"src/dialog/config.tsx"() {
|
|
7129
7129
|
"use strict";
|
|
7130
7130
|
import_react_dom = require("react-dom");
|
|
7131
7131
|
init_confirm_dialog();
|
|
7132
7132
|
init_destroyFns();
|
|
7133
|
-
|
|
7133
|
+
import_jsx_runtime119 = require("react/jsx-runtime");
|
|
7134
7134
|
dumbFn = (event) => {
|
|
7135
7135
|
event.preventDefault();
|
|
7136
7136
|
};
|
|
@@ -7179,15 +7179,15 @@ var init_6 = __esm({
|
|
|
7179
7179
|
});
|
|
7180
7180
|
|
|
7181
7181
|
// src/icon-button/icon-button.tsx
|
|
7182
|
-
var import_react109,
|
|
7182
|
+
var import_react109, import_class_variance_authority11, import_jsx_runtime120, buttonStyles3, IconButton;
|
|
7183
7183
|
var init_icon_button = __esm({
|
|
7184
7184
|
"src/icon-button/icon-button.tsx"() {
|
|
7185
7185
|
"use strict";
|
|
7186
7186
|
import_react109 = require("react");
|
|
7187
|
-
|
|
7187
|
+
import_class_variance_authority11 = require("class-variance-authority");
|
|
7188
7188
|
init_6();
|
|
7189
|
-
|
|
7190
|
-
buttonStyles3 = (0,
|
|
7189
|
+
import_jsx_runtime120 = require("react/jsx-runtime");
|
|
7190
|
+
buttonStyles3 = (0, import_class_variance_authority11.cva)(["c-icon-button"], {
|
|
7191
7191
|
variants: {
|
|
7192
7192
|
variant: {
|
|
7193
7193
|
default: "",
|
|
@@ -7208,7 +7208,7 @@ var init_icon_button = __esm({
|
|
|
7208
7208
|
});
|
|
7209
7209
|
IconButton = (0, import_react109.forwardRef)(
|
|
7210
7210
|
({ children, className, type = "button", size, variant, ...delegated }, ref) => {
|
|
7211
|
-
return /* @__PURE__ */ (0,
|
|
7211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("button", {
|
|
7212
7212
|
ref,
|
|
7213
7213
|
type,
|
|
7214
7214
|
className: buttonStyles3({ size, variant, className }),
|
|
@@ -7242,20 +7242,20 @@ var init_8 = __esm({
|
|
|
7242
7242
|
});
|
|
7243
7243
|
|
|
7244
7244
|
// src/input/input.tsx
|
|
7245
|
-
var import_react110,
|
|
7245
|
+
var import_react110, import_class_variance_authority13, import_jsx_runtime122, inputStyles, Input;
|
|
7246
7246
|
var init_input = __esm({
|
|
7247
7247
|
"src/input/input.tsx"() {
|
|
7248
7248
|
"use strict";
|
|
7249
7249
|
import_react110 = require("react");
|
|
7250
|
-
|
|
7250
|
+
import_class_variance_authority13 = require("class-variance-authority");
|
|
7251
7251
|
init_8();
|
|
7252
|
-
|
|
7253
|
-
inputStyles = (0,
|
|
7252
|
+
import_jsx_runtime122 = require("react/jsx-runtime");
|
|
7253
|
+
inputStyles = (0, import_class_variance_authority13.cva)(["c-input"], {
|
|
7254
7254
|
variants: {},
|
|
7255
7255
|
defaultVariants: {}
|
|
7256
7256
|
});
|
|
7257
7257
|
Input = (0, import_react110.forwardRef)(({ className, ...delegated }, ref) => {
|
|
7258
|
-
return /* @__PURE__ */ (0,
|
|
7258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("input", {
|
|
7259
7259
|
ref,
|
|
7260
7260
|
className: inputStyles({ className }),
|
|
7261
7261
|
type: "text",
|
|
@@ -7281,18 +7281,18 @@ var init_9 = __esm({
|
|
|
7281
7281
|
});
|
|
7282
7282
|
|
|
7283
7283
|
// src/label/label.tsx
|
|
7284
|
-
var import_react111,
|
|
7284
|
+
var import_react111, import_class_variance_authority14, import_jsx_runtime123, Label2;
|
|
7285
7285
|
var init_label = __esm({
|
|
7286
7286
|
"src/label/label.tsx"() {
|
|
7287
7287
|
"use strict";
|
|
7288
7288
|
import_react111 = require("react");
|
|
7289
|
-
|
|
7289
|
+
import_class_variance_authority14 = require("class-variance-authority");
|
|
7290
7290
|
init_9();
|
|
7291
|
-
|
|
7291
|
+
import_jsx_runtime123 = require("react/jsx-runtime");
|
|
7292
7292
|
Label2 = (0, import_react111.forwardRef)(({ className, ...delegated }, ref) => {
|
|
7293
|
-
return /* @__PURE__ */ (0,
|
|
7293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("label", {
|
|
7294
7294
|
ref,
|
|
7295
|
-
className: (0,
|
|
7295
|
+
className: (0, import_class_variance_authority14.cx)("c-label", className),
|
|
7296
7296
|
...delegated
|
|
7297
7297
|
});
|
|
7298
7298
|
});
|
|
@@ -7324,23 +7324,23 @@ function Tooltip({
|
|
|
7324
7324
|
defaultOpen = false,
|
|
7325
7325
|
delayDuration = 800
|
|
7326
7326
|
}) {
|
|
7327
|
-
return /* @__PURE__ */ (0,
|
|
7327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RadixTooltip.Provider, {
|
|
7328
7328
|
delayDuration,
|
|
7329
|
-
children: /* @__PURE__ */ (0,
|
|
7329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(RadixTooltip.Root, {
|
|
7330
7330
|
defaultOpen,
|
|
7331
7331
|
children: [
|
|
7332
|
-
/* @__PURE__ */ (0,
|
|
7332
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RadixTooltip.Trigger, {
|
|
7333
7333
|
asChild: true,
|
|
7334
7334
|
children
|
|
7335
7335
|
}),
|
|
7336
|
-
/* @__PURE__ */ (0,
|
|
7337
|
-
children: /* @__PURE__ */ (0,
|
|
7336
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RadixTooltip.Portal, {
|
|
7337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(RadixTooltip.Content, {
|
|
7338
7338
|
align,
|
|
7339
7339
|
sideOffset: 5,
|
|
7340
7340
|
side,
|
|
7341
7341
|
className: tooltipStyles({ variant }),
|
|
7342
7342
|
children: [
|
|
7343
|
-
/* @__PURE__ */ (0,
|
|
7343
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RadixTooltip.Arrow, {
|
|
7344
7344
|
className: "c-tooltip-arrow"
|
|
7345
7345
|
}),
|
|
7346
7346
|
content
|
|
@@ -7351,14 +7351,14 @@ function Tooltip({
|
|
|
7351
7351
|
})
|
|
7352
7352
|
});
|
|
7353
7353
|
}
|
|
7354
|
-
var
|
|
7354
|
+
var import_class_variance_authority15, RadixTooltip, import_jsx_runtime124, tooltipStyles;
|
|
7355
7355
|
var init_tooltip = __esm({
|
|
7356
7356
|
"src/tooltip/tooltip.tsx"() {
|
|
7357
7357
|
"use strict";
|
|
7358
|
-
|
|
7358
|
+
import_class_variance_authority15 = require("class-variance-authority");
|
|
7359
7359
|
RadixTooltip = __toESM(require("@radix-ui/react-tooltip"));
|
|
7360
|
-
|
|
7361
|
-
tooltipStyles = (0,
|
|
7360
|
+
import_jsx_runtime124 = require("react/jsx-runtime");
|
|
7361
|
+
tooltipStyles = (0, import_class_variance_authority15.cva)(
|
|
7362
7362
|
"c-tooltip-content data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade",
|
|
7363
7363
|
{
|
|
7364
7364
|
variants: {
|
|
@@ -7387,18 +7387,18 @@ var init_tooltip2 = __esm({
|
|
|
7387
7387
|
});
|
|
7388
7388
|
|
|
7389
7389
|
// src/input-with-label/input-with-label.tsx
|
|
7390
|
-
var import_react112,
|
|
7390
|
+
var import_react112, import_class_variance_authority16, import_jsx_runtime125, inputWithLabelStyles, InputWithLabel;
|
|
7391
7391
|
var init_input_with_label = __esm({
|
|
7392
7392
|
"src/input-with-label/input-with-label.tsx"() {
|
|
7393
7393
|
"use strict";
|
|
7394
7394
|
import_react112 = require("react");
|
|
7395
|
-
|
|
7395
|
+
import_class_variance_authority16 = require("class-variance-authority");
|
|
7396
7396
|
init_iconography();
|
|
7397
7397
|
init_input2();
|
|
7398
7398
|
init_label2();
|
|
7399
7399
|
init_tooltip2();
|
|
7400
|
-
|
|
7401
|
-
inputWithLabelStyles = (0,
|
|
7400
|
+
import_jsx_runtime125 = require("react/jsx-runtime");
|
|
7401
|
+
inputWithLabelStyles = (0, import_class_variance_authority16.cva)(["c-input-with-label"], {
|
|
7402
7402
|
variants: {
|
|
7403
7403
|
variant: {
|
|
7404
7404
|
default: "",
|
|
@@ -7415,37 +7415,37 @@ var init_input_with_label = __esm({
|
|
|
7415
7415
|
InputWithLabel = (0, import_react112.forwardRef)(
|
|
7416
7416
|
({ className, label, append, errorMessage, status, statusMessage, variant, id, labelProps, ...delegated }, ref) => {
|
|
7417
7417
|
const { className: labelClassName, ...labelPropsRest } = labelProps ?? {};
|
|
7418
|
-
return /* @__PURE__ */ (0,
|
|
7419
|
-
children: /* @__PURE__ */ (0,
|
|
7418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, {
|
|
7419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Label2, {
|
|
7420
7420
|
className: inputWithLabelStyles({ status, variant, className: labelClassName }),
|
|
7421
7421
|
htmlFor: id,
|
|
7422
7422
|
...labelPropsRest,
|
|
7423
7423
|
children: [
|
|
7424
7424
|
label,
|
|
7425
|
-
/* @__PURE__ */ (0,
|
|
7425
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("span", {
|
|
7426
7426
|
className: "c-input-with-label-input-wrap",
|
|
7427
7427
|
children: [
|
|
7428
|
-
/* @__PURE__ */ (0,
|
|
7429
|
-
className: (0,
|
|
7428
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Input, {
|
|
7429
|
+
className: (0, import_class_variance_authority16.cx)("c-input-with-label-input", className),
|
|
7430
7430
|
ref,
|
|
7431
7431
|
id,
|
|
7432
7432
|
...delegated
|
|
7433
7433
|
}),
|
|
7434
|
-
!!(errorMessage ?? statusMessage) ? /* @__PURE__ */ (0,
|
|
7434
|
+
!!(errorMessage ?? statusMessage) ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Tooltip, {
|
|
7435
7435
|
content: errorMessage ?? statusMessage,
|
|
7436
7436
|
variant: status,
|
|
7437
|
-
children: /* @__PURE__ */ (0,
|
|
7437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", {
|
|
7438
7438
|
"data-testid": "input-with-label-status-message",
|
|
7439
7439
|
className: "c-input-with-label-append",
|
|
7440
|
-
children: status === "error" ? /* @__PURE__ */ (0,
|
|
7440
|
+
children: status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Icon.Error, {
|
|
7441
7441
|
width: 20,
|
|
7442
7442
|
height: 20
|
|
7443
|
-
}) : /* @__PURE__ */ (0,
|
|
7443
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Icon.Warning, {
|
|
7444
7444
|
width: 20,
|
|
7445
7445
|
height: 20
|
|
7446
7446
|
})
|
|
7447
7447
|
})
|
|
7448
|
-
}) : !!append && /* @__PURE__ */ (0,
|
|
7448
|
+
}) : !!append && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", {
|
|
7449
7449
|
className: "c-input-with-label-append",
|
|
7450
7450
|
children: append
|
|
7451
7451
|
})
|
|
@@ -7482,17 +7482,17 @@ var init_12 = __esm({
|
|
|
7482
7482
|
});
|
|
7483
7483
|
|
|
7484
7484
|
// src/rich-text-editor/context/SharedHistoryContext.tsx
|
|
7485
|
-
var import_react116, import_LexicalHistoryPlugin,
|
|
7485
|
+
var import_react116, import_LexicalHistoryPlugin, import_jsx_runtime133, Context, SharedHistoryContext, useSharedHistoryContext;
|
|
7486
7486
|
var init_SharedHistoryContext = __esm({
|
|
7487
7487
|
"src/rich-text-editor/context/SharedHistoryContext.tsx"() {
|
|
7488
7488
|
"use strict";
|
|
7489
7489
|
import_react116 = require("react");
|
|
7490
7490
|
import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
|
|
7491
|
-
|
|
7491
|
+
import_jsx_runtime133 = require("react/jsx-runtime");
|
|
7492
7492
|
Context = (0, import_react116.createContext)({});
|
|
7493
7493
|
SharedHistoryContext = ({ children }) => {
|
|
7494
7494
|
const historyContext = (0, import_react116.useMemo)(() => ({ historyState: (0, import_LexicalHistoryPlugin.createEmptyHistoryState)() }), []);
|
|
7495
|
-
return /* @__PURE__ */ (0,
|
|
7495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Context.Provider, {
|
|
7496
7496
|
value: historyContext,
|
|
7497
7497
|
children
|
|
7498
7498
|
});
|
|
@@ -7580,7 +7580,7 @@ function I18nProvider({
|
|
|
7580
7580
|
children
|
|
7581
7581
|
}) {
|
|
7582
7582
|
const translations2 = labelTranslations || en_default;
|
|
7583
|
-
return /* @__PURE__ */ (0,
|
|
7583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(I18nContext.Provider, {
|
|
7584
7584
|
value: translations2,
|
|
7585
7585
|
children
|
|
7586
7586
|
});
|
|
@@ -7603,14 +7603,14 @@ function useTr() {
|
|
|
7603
7603
|
return "";
|
|
7604
7604
|
};
|
|
7605
7605
|
}
|
|
7606
|
-
var import_react117,
|
|
7606
|
+
var import_react117, import_jsx_runtime134, I18nContext;
|
|
7607
7607
|
var init_i18n = __esm({
|
|
7608
7608
|
"src/rich-text-editor/i18n/index.tsx"() {
|
|
7609
7609
|
"use strict";
|
|
7610
7610
|
import_react117 = require("react");
|
|
7611
7611
|
init_en();
|
|
7612
7612
|
init_en();
|
|
7613
|
-
|
|
7613
|
+
import_jsx_runtime134 = require("react/jsx-runtime");
|
|
7614
7614
|
I18nContext = (0, import_react117.createContext)(null);
|
|
7615
7615
|
}
|
|
7616
7616
|
});
|
|
@@ -8055,17 +8055,17 @@ var init_BaseNodes = __esm({
|
|
|
8055
8055
|
|
|
8056
8056
|
// src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx
|
|
8057
8057
|
function LexicalAutoLinkPlugin() {
|
|
8058
|
-
return /* @__PURE__ */ (0,
|
|
8058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_LexicalAutoLinkPlugin.AutoLinkPlugin, {
|
|
8059
8059
|
matchers: MATCHERS
|
|
8060
8060
|
});
|
|
8061
8061
|
}
|
|
8062
|
-
var React2, import_LexicalAutoLinkPlugin,
|
|
8062
|
+
var React2, import_LexicalAutoLinkPlugin, import_jsx_runtime135, URL_MATCHER, EMAIL_MATCHER, MATCHERS;
|
|
8063
8063
|
var init_AutoLinkPlugin = __esm({
|
|
8064
8064
|
"src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx"() {
|
|
8065
8065
|
"use strict";
|
|
8066
8066
|
React2 = require("react");
|
|
8067
8067
|
import_LexicalAutoLinkPlugin = require("@lexical/react/LexicalAutoLinkPlugin");
|
|
8068
|
-
|
|
8068
|
+
import_jsx_runtime135 = require("react/jsx-runtime");
|
|
8069
8069
|
URL_MATCHER = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
|
|
8070
8070
|
EMAIL_MATCHER = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;
|
|
8071
8071
|
MATCHERS = [
|
|
@@ -8124,18 +8124,18 @@ function CopyButton({ editor, getCodeDOMNode }) {
|
|
|
8124
8124
|
console.error("Failed to copy: ", err);
|
|
8125
8125
|
}
|
|
8126
8126
|
}
|
|
8127
|
-
return /* @__PURE__ */ (0,
|
|
8127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("button", {
|
|
8128
8128
|
className: "c-rte-code-button",
|
|
8129
8129
|
onClick: handleClick,
|
|
8130
8130
|
"aria-label": tr("actionCopyCode"),
|
|
8131
|
-
children: isCopyCompleted ? /* @__PURE__ */ (0,
|
|
8131
|
+
children: isCopyCompleted ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("i", {
|
|
8132
8132
|
className: "c-rte-code-button__icon c-rte-icon-success"
|
|
8133
|
-
}) : /* @__PURE__ */ (0,
|
|
8133
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("i", {
|
|
8134
8134
|
className: "c-rte-code-button__icon c-rte-icon-copy"
|
|
8135
8135
|
})
|
|
8136
8136
|
});
|
|
8137
8137
|
}
|
|
8138
|
-
var React3, import_react118, import_lexical4, import_use_debounce, import_code4,
|
|
8138
|
+
var React3, import_react118, import_lexical4, import_use_debounce, import_code4, import_jsx_runtime136;
|
|
8139
8139
|
var init_CopyButton = __esm({
|
|
8140
8140
|
"src/rich-text-editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.tsx"() {
|
|
8141
8141
|
"use strict";
|
|
@@ -8145,7 +8145,7 @@ var init_CopyButton = __esm({
|
|
|
8145
8145
|
import_use_debounce = require("use-debounce");
|
|
8146
8146
|
import_code4 = require("@lexical/code");
|
|
8147
8147
|
init_i18n();
|
|
8148
|
-
|
|
8148
|
+
import_jsx_runtime136 = require("react/jsx-runtime");
|
|
8149
8149
|
}
|
|
8150
8150
|
});
|
|
8151
8151
|
|
|
@@ -37039,29 +37039,29 @@ function PrettierButton({ lang, editor, getCodeDOMNode }) {
|
|
|
37039
37039
|
setTipsVisible(false);
|
|
37040
37040
|
}
|
|
37041
37041
|
}
|
|
37042
|
-
return /* @__PURE__ */ (0,
|
|
37042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", {
|
|
37043
37043
|
className: "c-rte-prettier-wrapper",
|
|
37044
37044
|
children: [
|
|
37045
|
-
/* @__PURE__ */ (0,
|
|
37045
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("button", {
|
|
37046
37046
|
className: "c-rte-code-button",
|
|
37047
37047
|
onClick: handleClick,
|
|
37048
37048
|
onMouseEnter: handleMouseEnter,
|
|
37049
37049
|
onMouseLeave: handleMouseLeave,
|
|
37050
37050
|
"aria-label": tr("actionFormatCode"),
|
|
37051
|
-
children: syntaxError ? /* @__PURE__ */ (0,
|
|
37051
|
+
children: syntaxError ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("i", {
|
|
37052
37052
|
className: "c-rte-code-button__icon c-rte-icon-prettier-error"
|
|
37053
|
-
}) : /* @__PURE__ */ (0,
|
|
37053
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("i", {
|
|
37054
37054
|
className: "c-rte-code-button__icon c-rte-icon-prettier"
|
|
37055
37055
|
})
|
|
37056
37056
|
}),
|
|
37057
|
-
tipsVisible ? /* @__PURE__ */ (0,
|
|
37057
|
+
tipsVisible ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("pre", {
|
|
37058
37058
|
className: "c-rte-code-error-tips",
|
|
37059
37059
|
children: syntaxError
|
|
37060
37060
|
}) : null
|
|
37061
37061
|
]
|
|
37062
37062
|
});
|
|
37063
37063
|
}
|
|
37064
|
-
var React4, import_react119, import_lexical5, import_code5,
|
|
37064
|
+
var React4, import_react119, import_lexical5, import_code5, import_jsx_runtime137, PRETTIER_PARSER_MODULES, PRETTIER_OPTIONS_BY_LANG, LANG_CAN_BE_PRETTIER;
|
|
37065
37065
|
var init_PrettierButton = __esm({
|
|
37066
37066
|
"src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.tsx"() {
|
|
37067
37067
|
"use strict";
|
|
@@ -37070,7 +37070,7 @@ var init_PrettierButton = __esm({
|
|
|
37070
37070
|
import_lexical5 = require("lexical");
|
|
37071
37071
|
import_code5 = require("@lexical/code");
|
|
37072
37072
|
init_i18n();
|
|
37073
|
-
|
|
37073
|
+
import_jsx_runtime137 = require("react/jsx-runtime");
|
|
37074
37074
|
PRETTIER_PARSER_MODULES = {
|
|
37075
37075
|
css: () => Promise.resolve().then(() => __toESM(require_parser_postcss())),
|
|
37076
37076
|
html: () => Promise.resolve().then(() => __toESM(require_parser_html())),
|
|
@@ -37170,20 +37170,20 @@ function CodeActionMenuContainer({ anchorElem }) {
|
|
|
37170
37170
|
});
|
|
37171
37171
|
const normalizedLang = (0, import_code6.normalizeCodeLang)(lang);
|
|
37172
37172
|
const codeFriendlyName = (0, import_code6.getLanguageFriendlyName)(lang);
|
|
37173
|
-
return /* @__PURE__ */ (0,
|
|
37174
|
-
children: isShown ? /* @__PURE__ */ (0,
|
|
37173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_jsx_runtime138.Fragment, {
|
|
37174
|
+
children: isShown ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", {
|
|
37175
37175
|
className: "c-rte-code-action-menu-container",
|
|
37176
37176
|
style: { ...position },
|
|
37177
37177
|
children: [
|
|
37178
|
-
/* @__PURE__ */ (0,
|
|
37178
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", {
|
|
37179
37179
|
className: "c-rte-code-highlight-language",
|
|
37180
37180
|
children: codeFriendlyName
|
|
37181
37181
|
}),
|
|
37182
|
-
/* @__PURE__ */ (0,
|
|
37182
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(CopyButton, {
|
|
37183
37183
|
editor,
|
|
37184
37184
|
getCodeDOMNode
|
|
37185
37185
|
}),
|
|
37186
|
-
canBePrettier(normalizedLang) ? /* @__PURE__ */ (0,
|
|
37186
|
+
canBePrettier(normalizedLang) ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(PrettierButton, {
|
|
37187
37187
|
editor,
|
|
37188
37188
|
getCodeDOMNode,
|
|
37189
37189
|
lang: normalizedLang
|
|
@@ -37205,11 +37205,11 @@ function getMouseInfo(event) {
|
|
|
37205
37205
|
function CodeActionMenuPlugin({
|
|
37206
37206
|
anchorElem = document.body
|
|
37207
37207
|
}) {
|
|
37208
|
-
return (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0,
|
|
37208
|
+
return (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(CodeActionMenuContainer, {
|
|
37209
37209
|
anchorElem
|
|
37210
37210
|
}), anchorElem);
|
|
37211
37211
|
}
|
|
37212
|
-
var import_react120, import_lexical6, import_react_dom2, import_use_debounce2, import_code6, import_LexicalComposerContext,
|
|
37212
|
+
var import_react120, import_lexical6, import_react_dom2, import_use_debounce2, import_code6, import_LexicalComposerContext, import_jsx_runtime138, CODE_PADDING;
|
|
37213
37213
|
var init_CodeActionMenuPlugin = __esm({
|
|
37214
37214
|
"src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx"() {
|
|
37215
37215
|
"use strict";
|
|
@@ -37221,7 +37221,7 @@ var init_CodeActionMenuPlugin = __esm({
|
|
|
37221
37221
|
import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
37222
37222
|
init_CopyButton();
|
|
37223
37223
|
init_PrettierButton();
|
|
37224
|
-
|
|
37224
|
+
import_jsx_runtime138 = require("react/jsx-runtime");
|
|
37225
37225
|
CODE_PADDING = 0;
|
|
37226
37226
|
}
|
|
37227
37227
|
});
|
|
@@ -37299,26 +37299,26 @@ function LinkPreviewContent({
|
|
|
37299
37299
|
if (!hasPreview) {
|
|
37300
37300
|
return null;
|
|
37301
37301
|
}
|
|
37302
|
-
return /* @__PURE__ */ (0,
|
|
37302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", {
|
|
37303
37303
|
className: "c-rte-link-preview",
|
|
37304
37304
|
children: [
|
|
37305
|
-
preview.google.image && /* @__PURE__ */ (0,
|
|
37305
|
+
preview.google.image && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", {
|
|
37306
37306
|
className: "c-rte-link-preview-image-wrapper",
|
|
37307
|
-
children: /* @__PURE__ */ (0,
|
|
37307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("img", {
|
|
37308
37308
|
src: preview.google.image,
|
|
37309
37309
|
alt: preview.google.title,
|
|
37310
37310
|
className: "c-rte-link-preview-image"
|
|
37311
37311
|
})
|
|
37312
37312
|
}),
|
|
37313
|
-
preview.google.title && /* @__PURE__ */ (0,
|
|
37313
|
+
preview.google.title && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", {
|
|
37314
37314
|
className: "c-rte-link-preview-title",
|
|
37315
37315
|
children: preview.google.title
|
|
37316
37316
|
}),
|
|
37317
|
-
preview.google.description && /* @__PURE__ */ (0,
|
|
37317
|
+
preview.google.description && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", {
|
|
37318
37318
|
className: "c-rte-link-preview-description",
|
|
37319
37319
|
children: preview.google.description
|
|
37320
37320
|
}),
|
|
37321
|
-
textContent && textContent !== preview.google.title ? /* @__PURE__ */ (0,
|
|
37321
|
+
textContent && textContent !== preview.google.title ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Button, {
|
|
37322
37322
|
className: "c-rte-link-preview__replace-text-btn",
|
|
37323
37323
|
onClick: useTitleForText,
|
|
37324
37324
|
children: tr("linkPreviewReplaceTextWithTitle")
|
|
@@ -37327,7 +37327,7 @@ function LinkPreviewContent({
|
|
|
37327
37327
|
});
|
|
37328
37328
|
}
|
|
37329
37329
|
function Glimmer(props) {
|
|
37330
|
-
return /* @__PURE__ */ (0,
|
|
37330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", {
|
|
37331
37331
|
className: "c-rte-link-preview-glimmer",
|
|
37332
37332
|
...props,
|
|
37333
37333
|
style: {
|
|
@@ -37339,29 +37339,29 @@ function Glimmer(props) {
|
|
|
37339
37339
|
function LinkPreview({
|
|
37340
37340
|
url
|
|
37341
37341
|
}) {
|
|
37342
|
-
return /* @__PURE__ */ (0,
|
|
37343
|
-
fallback: /* @__PURE__ */ (0,
|
|
37342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_react122.Suspense, {
|
|
37343
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_jsx_runtime139.Fragment, {
|
|
37344
37344
|
children: [
|
|
37345
|
-
/* @__PURE__ */ (0,
|
|
37345
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Glimmer, {
|
|
37346
37346
|
style: { height: "80px" },
|
|
37347
37347
|
index: 0
|
|
37348
37348
|
}),
|
|
37349
|
-
/* @__PURE__ */ (0,
|
|
37349
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Glimmer, {
|
|
37350
37350
|
style: { width: "60%" },
|
|
37351
37351
|
index: 1
|
|
37352
37352
|
}),
|
|
37353
|
-
/* @__PURE__ */ (0,
|
|
37353
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Glimmer, {
|
|
37354
37354
|
style: { width: "80%" },
|
|
37355
37355
|
index: 2
|
|
37356
37356
|
})
|
|
37357
37357
|
]
|
|
37358
37358
|
}),
|
|
37359
|
-
children: /* @__PURE__ */ (0,
|
|
37359
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(LinkPreviewContent, {
|
|
37360
37360
|
url
|
|
37361
37361
|
})
|
|
37362
37362
|
});
|
|
37363
37363
|
}
|
|
37364
|
-
var import_react122, import_lexical7, import_LexicalComposerContext3,
|
|
37364
|
+
var import_react122, import_lexical7, import_LexicalComposerContext3, import_jsx_runtime139, PREVIEW_CACHE, URL_MATCHER2;
|
|
37365
37365
|
var init_LinkPreview = __esm({
|
|
37366
37366
|
"src/rich-text-editor/ui/LinkPreview.tsx"() {
|
|
37367
37367
|
"use strict";
|
|
@@ -37370,7 +37370,7 @@ var init_LinkPreview = __esm({
|
|
|
37370
37370
|
import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
37371
37371
|
init_button2();
|
|
37372
37372
|
init_i18n();
|
|
37373
|
-
|
|
37373
|
+
import_jsx_runtime139 = require("react/jsx-runtime");
|
|
37374
37374
|
PREVIEW_CACHE = {};
|
|
37375
37375
|
URL_MATCHER2 = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
|
|
37376
37376
|
}
|
|
@@ -37576,42 +37576,42 @@ function FloatingLinkEditor({
|
|
|
37576
37576
|
inputRef.current.focus();
|
|
37577
37577
|
}
|
|
37578
37578
|
}, [isEditMode]);
|
|
37579
|
-
return /* @__PURE__ */ (0,
|
|
37579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37580
37580
|
ref: editorRef,
|
|
37581
37581
|
className: "c-rte-link-editor",
|
|
37582
37582
|
"data-testid": "rich-text-link-editor",
|
|
37583
|
-
children: isEditMode ? /* @__PURE__ */ (0,
|
|
37583
|
+
children: isEditMode ? /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", {
|
|
37584
37584
|
children: [
|
|
37585
|
-
/* @__PURE__ */ (0,
|
|
37585
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37586
37586
|
className: "c-rte-link-editor-input-group",
|
|
37587
|
-
children: /* @__PURE__ */ (0,
|
|
37587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(InputWithLabel, {
|
|
37588
37588
|
label: tr("linkEditorLink"),
|
|
37589
37589
|
type: "text",
|
|
37590
37590
|
value: linkUrl,
|
|
37591
37591
|
onChange: (e) => setLinkUrl(e.target.value)
|
|
37592
37592
|
})
|
|
37593
37593
|
}),
|
|
37594
|
-
/* @__PURE__ */ (0,
|
|
37594
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37595
37595
|
className: "c-rte-link-editor-input-group",
|
|
37596
|
-
children: /* @__PURE__ */ (0,
|
|
37596
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(InputWithLabel, {
|
|
37597
37597
|
label: tr("linkEditorRel"),
|
|
37598
37598
|
type: "text",
|
|
37599
37599
|
value: rel ?? "",
|
|
37600
37600
|
onChange: (e) => setRel(e.target.value)
|
|
37601
37601
|
})
|
|
37602
37602
|
}),
|
|
37603
|
-
/* @__PURE__ */ (0,
|
|
37603
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37604
37604
|
className: "c-rte-link-editor-input-group",
|
|
37605
|
-
children: /* @__PURE__ */ (0,
|
|
37605
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(InputWithLabel, {
|
|
37606
37606
|
label: tr("linkEditorTarget"),
|
|
37607
37607
|
type: "text",
|
|
37608
37608
|
value: target ?? "",
|
|
37609
37609
|
onChange: (e) => setTarget(e.target.value)
|
|
37610
37610
|
})
|
|
37611
37611
|
}),
|
|
37612
|
-
/* @__PURE__ */ (0,
|
|
37612
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37613
37613
|
className: "c-rte-link-editor-button-wrap",
|
|
37614
|
-
children: /* @__PURE__ */ (0,
|
|
37614
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Button, {
|
|
37615
37615
|
"data-testid": "link-editor-save-button",
|
|
37616
37616
|
onClick: () => {
|
|
37617
37617
|
if (lastSelection !== null) {
|
|
@@ -37629,28 +37629,28 @@ function FloatingLinkEditor({
|
|
|
37629
37629
|
})
|
|
37630
37630
|
})
|
|
37631
37631
|
]
|
|
37632
|
-
}) : /* @__PURE__ */ (0,
|
|
37632
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, {
|
|
37633
37633
|
children: [
|
|
37634
|
-
/* @__PURE__ */ (0,
|
|
37634
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", {
|
|
37635
37635
|
className: "c-rte-link-editor-link-input",
|
|
37636
37636
|
children: [
|
|
37637
|
-
/* @__PURE__ */ (0,
|
|
37637
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", {
|
|
37638
37638
|
className: "c-rte-link-editor-link-preview",
|
|
37639
37639
|
children: [
|
|
37640
|
-
/* @__PURE__ */ (0,
|
|
37640
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("a", {
|
|
37641
37641
|
href: linkUrl,
|
|
37642
37642
|
target: "_blank",
|
|
37643
37643
|
rel: "noopener noreferrer",
|
|
37644
37644
|
children: linkUrl
|
|
37645
37645
|
}),
|
|
37646
|
-
rel || target ? /* @__PURE__ */ (0,
|
|
37646
|
+
rel || target ? /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", {
|
|
37647
37647
|
className: "c-rte-link-editor-preview-attrs",
|
|
37648
37648
|
children: [
|
|
37649
|
-
rel && /* @__PURE__ */ (0,
|
|
37649
|
+
rel && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37650
37650
|
className: "c-rte-link-editor-preview-attr",
|
|
37651
37651
|
children: rel
|
|
37652
37652
|
}),
|
|
37653
|
-
target && /* @__PURE__ */ (0,
|
|
37653
|
+
target && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37654
37654
|
className: "c-rte-link-editor-preview-attr",
|
|
37655
37655
|
children: target
|
|
37656
37656
|
})
|
|
@@ -37658,21 +37658,21 @@ function FloatingLinkEditor({
|
|
|
37658
37658
|
}) : null
|
|
37659
37659
|
]
|
|
37660
37660
|
}),
|
|
37661
|
-
/* @__PURE__ */ (0,
|
|
37662
|
-
children: /* @__PURE__ */ (0,
|
|
37661
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37662
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(IconButton, {
|
|
37663
37663
|
size: "sm",
|
|
37664
37664
|
tabIndex: 0,
|
|
37665
37665
|
onMouseDown: (event) => event.preventDefault(),
|
|
37666
37666
|
onClick: () => setEditMode(true),
|
|
37667
37667
|
"aria-label": tr("linkEditorEdit"),
|
|
37668
37668
|
"data-testid": "link-editor-edit",
|
|
37669
|
-
children: /* @__PURE__ */ (0,
|
|
37669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Icon.Edit, {})
|
|
37670
37670
|
})
|
|
37671
37671
|
})
|
|
37672
37672
|
]
|
|
37673
37673
|
}),
|
|
37674
|
-
/* @__PURE__ */ (0,
|
|
37675
|
-
children: /* @__PURE__ */ (0,
|
|
37674
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
|
|
37675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(LinkPreview, {
|
|
37676
37676
|
url: linkUrl
|
|
37677
37677
|
})
|
|
37678
37678
|
})
|
|
@@ -37708,7 +37708,7 @@ function useFloatingLinkEditorToolbar(editor, anchorElem) {
|
|
|
37708
37708
|
);
|
|
37709
37709
|
}, [editor, updateToolbar]);
|
|
37710
37710
|
return isLink ? (0, import_react_dom3.createPortal)(
|
|
37711
|
-
/* @__PURE__ */ (0,
|
|
37711
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(FloatingLinkEditor, {
|
|
37712
37712
|
editor: activeEditor,
|
|
37713
37713
|
isLink,
|
|
37714
37714
|
anchorElem,
|
|
@@ -37723,7 +37723,7 @@ function FloatingLinkEditorPlugin({
|
|
|
37723
37723
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
37724
37724
|
return useFloatingLinkEditorToolbar(editor, anchorElem);
|
|
37725
37725
|
}
|
|
37726
|
-
var import_react123, React5, import_lexical8, import_react_dom3, import_link4, import_LexicalComposerContext4, import_utils,
|
|
37726
|
+
var import_react123, React5, import_lexical8, import_react_dom3, import_link4, import_LexicalComposerContext4, import_utils, import_jsx_runtime140;
|
|
37727
37727
|
var init_FloatingLinkEditorPlugin = __esm({
|
|
37728
37728
|
"src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.tsx"() {
|
|
37729
37729
|
"use strict";
|
|
@@ -37743,7 +37743,7 @@ var init_FloatingLinkEditorPlugin = __esm({
|
|
|
37743
37743
|
init_getSelectedNode();
|
|
37744
37744
|
init_setFloatingElemPosition();
|
|
37745
37745
|
init_url();
|
|
37746
|
-
|
|
37746
|
+
import_jsx_runtime140 = require("react/jsx-runtime");
|
|
37747
37747
|
}
|
|
37748
37748
|
});
|
|
37749
37749
|
|
|
@@ -37870,93 +37870,93 @@ function TextFormatFloatingToolbar({
|
|
|
37870
37870
|
);
|
|
37871
37871
|
}, [editor, updateTextFormatFloatingToolbar]);
|
|
37872
37872
|
if (!editor.isEditable()) {
|
|
37873
|
-
return /* @__PURE__ */ (0,
|
|
37873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("span", {});
|
|
37874
37874
|
}
|
|
37875
|
-
return /* @__PURE__ */ (0,
|
|
37875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", {
|
|
37876
37876
|
ref: popupCharStylesEditorRef,
|
|
37877
37877
|
className: "c-rte-floating-text-format-tb-plugin",
|
|
37878
37878
|
children: [
|
|
37879
|
-
/* @__PURE__ */ (0,
|
|
37879
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37880
37880
|
onClick: () => {
|
|
37881
37881
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "bold");
|
|
37882
37882
|
},
|
|
37883
37883
|
style: { padding: 0, overflow: "hidden" },
|
|
37884
37884
|
title: tr(IS_APPLE ? "actionFormatAsStrongTitleApple" : "actionFormatAsStrongTitle"),
|
|
37885
37885
|
"aria-label": tr("actionFormatAsStrongLabel"),
|
|
37886
|
-
children: /* @__PURE__ */ (0,
|
|
37886
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37887
37887
|
className: `c-rte-icon-bold c-rte-floating-text-format-tb-plugin__format-icon ${isBold ? "selected" : ""}`
|
|
37888
37888
|
})
|
|
37889
37889
|
}),
|
|
37890
|
-
/* @__PURE__ */ (0,
|
|
37890
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37891
37891
|
style: { padding: 0, overflow: "hidden" },
|
|
37892
37892
|
onClick: () => {
|
|
37893
37893
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "italic");
|
|
37894
37894
|
},
|
|
37895
37895
|
title: tr("actionFormatAsEmphasizedTitle"),
|
|
37896
37896
|
"aria-label": tr("actionFormatAsEmphasizedLabel"),
|
|
37897
|
-
children: /* @__PURE__ */ (0,
|
|
37897
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37898
37898
|
className: `c-rte-icon-italic c-rte-floating-text-format-tb-plugin__format-icon ${isItalic ? "selected" : ""}`
|
|
37899
37899
|
})
|
|
37900
37900
|
}),
|
|
37901
|
-
/* @__PURE__ */ (0,
|
|
37901
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37902
37902
|
style: { padding: 0, overflow: "hidden" },
|
|
37903
37903
|
onClick: () => {
|
|
37904
37904
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "underline");
|
|
37905
37905
|
},
|
|
37906
37906
|
title: tr("actionFormatAsUnderlinedTitle"),
|
|
37907
37907
|
"aria-label": tr("actionFormatAsUnderlinedLabel"),
|
|
37908
|
-
children: /* @__PURE__ */ (0,
|
|
37908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37909
37909
|
className: `c-rte-icon-underline c-rte-floating-text-format-tb-plugin__format-icon ${isUnderline ? "selected" : ""}`
|
|
37910
37910
|
})
|
|
37911
37911
|
}),
|
|
37912
|
-
/* @__PURE__ */ (0,
|
|
37912
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37913
37913
|
style: { padding: 0, overflow: "hidden" },
|
|
37914
37914
|
onClick: () => {
|
|
37915
37915
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "code");
|
|
37916
37916
|
},
|
|
37917
37917
|
"aria-label": tr("actionInsertCodeBlock"),
|
|
37918
|
-
children: /* @__PURE__ */ (0,
|
|
37918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37919
37919
|
className: `c-rte-icon-code c-rte-floating-text-format-tb-plugin__format-icon ${isCode ? "selected" : ""}`
|
|
37920
37920
|
})
|
|
37921
37921
|
}),
|
|
37922
|
-
/* @__PURE__ */ (0,
|
|
37922
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37923
37923
|
style: { padding: 0, overflow: "hidden" },
|
|
37924
37924
|
onClick: insertLink,
|
|
37925
37925
|
"aria-label": tr("actionInsertlink"),
|
|
37926
|
-
children: /* @__PURE__ */ (0,
|
|
37926
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37927
37927
|
className: `c-rte-icon-link c-rte-floating-text-format-tb-plugin__format-icon ${isLink ? "selected" : ""}`
|
|
37928
37928
|
})
|
|
37929
37929
|
}),
|
|
37930
|
-
/* @__PURE__ */ (0,
|
|
37930
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37931
37931
|
style: { padding: 0, overflow: "hidden" },
|
|
37932
37932
|
onClick: () => {
|
|
37933
37933
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "strikethrough");
|
|
37934
37934
|
},
|
|
37935
37935
|
title: tr("actionFormatWithStrikethroughTitle"),
|
|
37936
37936
|
"aria-label": tr("actionFormatWithStrikethroughLabel"),
|
|
37937
|
-
children: /* @__PURE__ */ (0,
|
|
37937
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37938
37938
|
className: `c-rte-icon-strikethrough c-rte-floating-text-format-tb-plugin__format-icon ${isStrikethrough ? "selected" : ""}`
|
|
37939
37939
|
})
|
|
37940
37940
|
}),
|
|
37941
|
-
/* @__PURE__ */ (0,
|
|
37941
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37942
37942
|
style: { padding: 0, overflow: "hidden" },
|
|
37943
37943
|
onClick: () => {
|
|
37944
37944
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "subscript");
|
|
37945
37945
|
},
|
|
37946
37946
|
title: tr("actionFormatWithSubscriptTitle"),
|
|
37947
37947
|
"aria-label": tr("actionFormatWithSubscriptLabel"),
|
|
37948
|
-
children: /* @__PURE__ */ (0,
|
|
37948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37949
37949
|
className: `c-rte-icon-subscript c-rte-floating-text-format-tb-plugin__format-icon ${isSubscript ? "selected" : ""}`
|
|
37950
37950
|
})
|
|
37951
37951
|
}),
|
|
37952
|
-
/* @__PURE__ */ (0,
|
|
37952
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
|
|
37953
37953
|
style: { padding: 0, overflow: "hidden" },
|
|
37954
37954
|
onClick: () => {
|
|
37955
37955
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "superscript");
|
|
37956
37956
|
},
|
|
37957
37957
|
title: tr("actionFormatWithSuperscriptTitle"),
|
|
37958
37958
|
"aria-label": tr("actionFormatWithSuperscriptLabel"),
|
|
37959
|
-
children: /* @__PURE__ */ (0,
|
|
37959
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("i", {
|
|
37960
37960
|
className: `c-rte-icon-superscript c-rte-floating-text-format-tb-plugin__format-icon ${isSuperscript ? "selected" : ""}`
|
|
37961
37961
|
})
|
|
37962
37962
|
})
|
|
@@ -38031,7 +38031,7 @@ function useFloatingTextFormatToolbar(editor, anchorElem) {
|
|
|
38031
38031
|
return null;
|
|
38032
38032
|
}
|
|
38033
38033
|
return (0, import_react_dom4.createPortal)(
|
|
38034
|
-
/* @__PURE__ */ (0,
|
|
38034
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(TextFormatFloatingToolbar, {
|
|
38035
38035
|
editor,
|
|
38036
38036
|
anchorElem,
|
|
38037
38037
|
isLink,
|
|
@@ -38052,7 +38052,7 @@ function FloatingTextFormatToolbarPlugin({
|
|
|
38052
38052
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
38053
38053
|
return useFloatingTextFormatToolbar(editor, anchorElem);
|
|
38054
38054
|
}
|
|
38055
|
-
var import_react124, React6, import_lexical9, import_react_dom4, import_code8, import_link5, import_LexicalComposerContext5, import_utils2,
|
|
38055
|
+
var import_react124, React6, import_lexical9, import_react_dom4, import_code8, import_link5, import_LexicalComposerContext5, import_utils2, import_jsx_runtime141;
|
|
38056
38056
|
var init_FloatingTextFormatToolbarPlugin = __esm({
|
|
38057
38057
|
"src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx"() {
|
|
38058
38058
|
"use strict";
|
|
@@ -38071,24 +38071,24 @@ var init_FloatingTextFormatToolbarPlugin = __esm({
|
|
|
38071
38071
|
init_getDOMRangeRect();
|
|
38072
38072
|
init_getSelectedNode();
|
|
38073
38073
|
init_setFloatingElemPosition();
|
|
38074
|
-
|
|
38074
|
+
import_jsx_runtime141 = require("react/jsx-runtime");
|
|
38075
38075
|
}
|
|
38076
38076
|
});
|
|
38077
38077
|
|
|
38078
38078
|
// src/rich-text-editor/plugins/LinkPlugin/index.tsx
|
|
38079
38079
|
function LinkPlugin() {
|
|
38080
|
-
return /* @__PURE__ */ (0,
|
|
38080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_LexicalLinkPlugin.LinkPlugin, {
|
|
38081
38081
|
validateUrl
|
|
38082
38082
|
});
|
|
38083
38083
|
}
|
|
38084
|
-
var React7, import_LexicalLinkPlugin,
|
|
38084
|
+
var React7, import_LexicalLinkPlugin, import_jsx_runtime142;
|
|
38085
38085
|
var init_LinkPlugin = __esm({
|
|
38086
38086
|
"src/rich-text-editor/plugins/LinkPlugin/index.tsx"() {
|
|
38087
38087
|
"use strict";
|
|
38088
38088
|
React7 = require("react");
|
|
38089
38089
|
import_LexicalLinkPlugin = require("@lexical/react/LexicalLinkPlugin");
|
|
38090
38090
|
init_url();
|
|
38091
|
-
|
|
38091
|
+
import_jsx_runtime142 = require("react/jsx-runtime");
|
|
38092
38092
|
}
|
|
38093
38093
|
});
|
|
38094
38094
|
|
|
@@ -38429,46 +38429,46 @@ function TableActionMenu({ tableCellNode: _tableCellNode, tableStats }) {
|
|
|
38429
38429
|
clearTableSelection();
|
|
38430
38430
|
});
|
|
38431
38431
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
38432
|
-
return /* @__PURE__ */ (0,
|
|
38432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, {
|
|
38433
38433
|
children: [
|
|
38434
|
-
/* @__PURE__ */ (0,
|
|
38434
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38435
38435
|
onSelect: () => insertTableRowAtSelection(false),
|
|
38436
38436
|
children: tr("actionTableInsertRowsAbove", selectionCounts.rows)
|
|
38437
38437
|
}),
|
|
38438
|
-
/* @__PURE__ */ (0,
|
|
38438
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38439
38439
|
onSelect: () => insertTableRowAtSelection(true),
|
|
38440
38440
|
children: tr("actionTableInsertRowsBelow", selectionCounts.rows)
|
|
38441
38441
|
}),
|
|
38442
|
-
/* @__PURE__ */ (0,
|
|
38442
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38443
38443
|
onSelect: () => insertTableColumnAtSelection(false),
|
|
38444
38444
|
children: tr("actionTableInsertColumnsBefore", selectionCounts.columns)
|
|
38445
38445
|
}),
|
|
38446
|
-
/* @__PURE__ */ (0,
|
|
38446
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38447
38447
|
onSelect: () => insertTableColumnAtSelection(true),
|
|
38448
38448
|
children: tr("actionTableInsertColumnsAfter", selectionCounts.columns)
|
|
38449
38449
|
}),
|
|
38450
|
-
/* @__PURE__ */ (0,
|
|
38450
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38451
38451
|
onSelect: () => toggleTableRowIsHeader(),
|
|
38452
38452
|
children: tr(
|
|
38453
38453
|
(tableCellNode.__headerState & import_table4.TableCellHeaderStates.ROW) === import_table4.TableCellHeaderStates.ROW ? "actionTableRemoveRowHeader" : "actionTableAddRowHeader"
|
|
38454
38454
|
)
|
|
38455
38455
|
}),
|
|
38456
|
-
/* @__PURE__ */ (0,
|
|
38456
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38457
38457
|
onSelect: () => toggleTableColumnIsHeader(),
|
|
38458
38458
|
children: tr(
|
|
38459
38459
|
(tableCellNode.__headerState & import_table4.TableCellHeaderStates.COLUMN) === import_table4.TableCellHeaderStates.COLUMN ? "actionTableRemoveColumnHeader" : "actionTableAddColumnHeader"
|
|
38460
38460
|
)
|
|
38461
38461
|
}),
|
|
38462
|
-
/* @__PURE__ */ (0,
|
|
38463
|
-
tableStats.columns > 1 && /* @__PURE__ */ (0,
|
|
38462
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Separator, {}),
|
|
38463
|
+
tableStats.columns > 1 && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38464
38464
|
onSelect: () => deleteTableColumnAtSelection(),
|
|
38465
38465
|
children: tr("actionTableDeleteColumn")
|
|
38466
38466
|
}),
|
|
38467
|
-
tableStats.rows > 1 && /* @__PURE__ */ (0,
|
|
38467
|
+
tableStats.rows > 1 && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38468
38468
|
onSelect: () => deleteTableRowAtSelection(),
|
|
38469
38469
|
children: tr("actionTableDeleteRow")
|
|
38470
38470
|
}),
|
|
38471
|
-
/* @__PURE__ */ (0,
|
|
38471
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Item, {
|
|
38472
38472
|
onSelect: () => deleteTableAtSelection(),
|
|
38473
38473
|
children: tr("actionTableDeleteTable")
|
|
38474
38474
|
})
|
|
@@ -38550,19 +38550,19 @@ function TableCellActionMenuContainer({ anchorElem }) {
|
|
|
38550
38550
|
}
|
|
38551
38551
|
}
|
|
38552
38552
|
}, [menuButtonRef, tableCellNode, editor, anchorElem]);
|
|
38553
|
-
return /* @__PURE__ */ (0,
|
|
38553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
|
|
38554
38554
|
className: "c-rte-table-cell-action-button-container",
|
|
38555
38555
|
ref: menuButtonRef,
|
|
38556
|
-
children: tableCellNode != null && /* @__PURE__ */ (0,
|
|
38556
|
+
children: tableCellNode != null && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DropdownMenu.Root, {
|
|
38557
38557
|
onOpenChange: (isOpen) => setIsMenuOpen(isOpen),
|
|
38558
|
-
content: /* @__PURE__ */ (0,
|
|
38558
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(TableActionMenu, {
|
|
38559
38559
|
tableCellNode,
|
|
38560
38560
|
tableStats
|
|
38561
38561
|
}),
|
|
38562
|
-
children: /* @__PURE__ */ (0,
|
|
38562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(IconButton, {
|
|
38563
38563
|
size: "xs",
|
|
38564
38564
|
"aria-label": tr("actionTableOpenOptions"),
|
|
38565
|
-
children: /* @__PURE__ */ (0,
|
|
38565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Icon.Arrow, {})
|
|
38566
38566
|
})
|
|
38567
38567
|
})
|
|
38568
38568
|
});
|
|
@@ -38571,11 +38571,11 @@ function TableActionMenuPlugin({
|
|
|
38571
38571
|
anchorElem = document.body
|
|
38572
38572
|
}) {
|
|
38573
38573
|
const isEditable = (0, import_useLexicalEditable.default)();
|
|
38574
|
-
return (0, import_react_dom5.createPortal)(isEditable ? /* @__PURE__ */ (0,
|
|
38574
|
+
return (0, import_react_dom5.createPortal)(isEditable ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(TableCellActionMenuContainer, {
|
|
38575
38575
|
anchorElem
|
|
38576
38576
|
}) : null, anchorElem);
|
|
38577
38577
|
}
|
|
38578
|
-
var import_react128, import_lexical13, import_react_dom5, import_LexicalComposerContext9, import_useLexicalEditable, import_table4,
|
|
38578
|
+
var import_react128, import_lexical13, import_react_dom5, import_LexicalComposerContext9, import_useLexicalEditable, import_table4, import_jsx_runtime143;
|
|
38579
38579
|
var init_TableActionMenuPlugin = __esm({
|
|
38580
38580
|
"src/rich-text-editor/plugins/TableActionMenuPlugin/index.tsx"() {
|
|
38581
38581
|
"use strict";
|
|
@@ -38589,7 +38589,7 @@ var init_TableActionMenuPlugin = __esm({
|
|
|
38589
38589
|
init_icon_button2();
|
|
38590
38590
|
init_iconography();
|
|
38591
38591
|
init_i18n();
|
|
38592
|
-
|
|
38592
|
+
import_jsx_runtime143 = require("react/jsx-runtime");
|
|
38593
38593
|
}
|
|
38594
38594
|
});
|
|
38595
38595
|
|
|
@@ -38605,19 +38605,19 @@ async function copyJson(editor) {
|
|
|
38605
38605
|
function ActionsPlugin({ append, prepend, disabled }) {
|
|
38606
38606
|
const [editor] = (0, import_LexicalComposerContext10.useLexicalComposerContext)();
|
|
38607
38607
|
const tr = useTr();
|
|
38608
|
-
return /* @__PURE__ */ (0,
|
|
38608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(ActionMenu, {
|
|
38609
38609
|
children: [
|
|
38610
|
-
!prepend ? null : prepend.map((actionItem) => /* @__PURE__ */ (0,
|
|
38610
|
+
!prepend ? null : prepend.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ActionMenu.Item, {
|
|
38611
38611
|
onSelect: actionItem.action,
|
|
38612
38612
|
className: actionItem.type === "danger" ? "danger" : "",
|
|
38613
38613
|
disabled: actionItem.disabled,
|
|
38614
38614
|
children: actionItem.title
|
|
38615
38615
|
}, actionItem.title)),
|
|
38616
|
-
/* @__PURE__ */ (0,
|
|
38616
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ActionMenu.Item, {
|
|
38617
38617
|
onSelect: () => copyJson(editor),
|
|
38618
38618
|
children: tr("actionCopyJSON")
|
|
38619
38619
|
}),
|
|
38620
|
-
/* @__PURE__ */ (0,
|
|
38620
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ActionMenu.Item, {
|
|
38621
38621
|
disabled,
|
|
38622
38622
|
className: "danger",
|
|
38623
38623
|
onSelect: () => {
|
|
@@ -38626,7 +38626,7 @@ function ActionsPlugin({ append, prepend, disabled }) {
|
|
|
38626
38626
|
},
|
|
38627
38627
|
children: tr("actionClear")
|
|
38628
38628
|
}),
|
|
38629
|
-
!append ? null : append.map((actionItem) => /* @__PURE__ */ (0,
|
|
38629
|
+
!append ? null : append.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ActionMenu.Item, {
|
|
38630
38630
|
onSelect: actionItem.action,
|
|
38631
38631
|
className: actionItem.type === "danger" ? "danger" : "",
|
|
38632
38632
|
disabled: actionItem.disabled,
|
|
@@ -38635,7 +38635,7 @@ function ActionsPlugin({ append, prepend, disabled }) {
|
|
|
38635
38635
|
]
|
|
38636
38636
|
});
|
|
38637
38637
|
}
|
|
38638
|
-
var import_lexical14, import_LexicalComposerContext10,
|
|
38638
|
+
var import_lexical14, import_LexicalComposerContext10, import_jsx_runtime144;
|
|
38639
38639
|
var init_ActionsPlugin = __esm({
|
|
38640
38640
|
"src/rich-text-editor/plugins/ActionsPlugin/index.tsx"() {
|
|
38641
38641
|
"use strict";
|
|
@@ -38644,7 +38644,7 @@ var init_ActionsPlugin = __esm({
|
|
|
38644
38644
|
init_action_menu2();
|
|
38645
38645
|
init_i18n();
|
|
38646
38646
|
init_lexical_to_crystallize();
|
|
38647
|
-
|
|
38647
|
+
import_jsx_runtime144 = require("react/jsx-runtime");
|
|
38648
38648
|
}
|
|
38649
38649
|
});
|
|
38650
38650
|
|
|
@@ -38666,13 +38666,13 @@ function InsertTableDialog({ activeEditor }) {
|
|
|
38666
38666
|
}
|
|
38667
38667
|
});
|
|
38668
38668
|
};
|
|
38669
|
-
return /* @__PURE__ */ (0,
|
|
38669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", {
|
|
38670
38670
|
className: "c-rte-insert-table",
|
|
38671
38671
|
children: [
|
|
38672
|
-
/* @__PURE__ */ (0,
|
|
38672
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", {
|
|
38673
38673
|
className: "c-rte-insert-table__dimensions",
|
|
38674
38674
|
children: [
|
|
38675
|
-
/* @__PURE__ */ (0,
|
|
38675
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InputWithLabel, {
|
|
38676
38676
|
label: tr("insertTableRows"),
|
|
38677
38677
|
value: rows,
|
|
38678
38678
|
placeholder: "0",
|
|
@@ -38680,10 +38680,10 @@ function InsertTableDialog({ activeEditor }) {
|
|
|
38680
38680
|
inputMode: "numeric",
|
|
38681
38681
|
onChange: (e) => setRows(e.target.value)
|
|
38682
38682
|
}),
|
|
38683
|
-
/* @__PURE__ */ (0,
|
|
38683
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", {
|
|
38684
38684
|
className: "c-rte-insert-table__dimensions__separator"
|
|
38685
38685
|
}),
|
|
38686
|
-
/* @__PURE__ */ (0,
|
|
38686
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InputWithLabel, {
|
|
38687
38687
|
type: "text",
|
|
38688
38688
|
label: tr("insertTableColumns"),
|
|
38689
38689
|
placeholder: "0",
|
|
@@ -38693,9 +38693,9 @@ function InsertTableDialog({ activeEditor }) {
|
|
|
38693
38693
|
})
|
|
38694
38694
|
]
|
|
38695
38695
|
}),
|
|
38696
|
-
/* @__PURE__ */ (0,
|
|
38696
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", {
|
|
38697
38697
|
className: "c-rte-insert-table__actions",
|
|
38698
|
-
children: /* @__PURE__ */ (0,
|
|
38698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Button, {
|
|
38699
38699
|
as: Dialog.Close,
|
|
38700
38700
|
size: "sm",
|
|
38701
38701
|
intent: "action",
|
|
@@ -38707,7 +38707,7 @@ function InsertTableDialog({ activeEditor }) {
|
|
|
38707
38707
|
]
|
|
38708
38708
|
});
|
|
38709
38709
|
}
|
|
38710
|
-
var import_react129, import_table5,
|
|
38710
|
+
var import_react129, import_table5, import_jsx_runtime145;
|
|
38711
38711
|
var init_insert_table = __esm({
|
|
38712
38712
|
"src/rich-text-editor/plugins/ToolbarPlugin/insert-table.tsx"() {
|
|
38713
38713
|
"use strict";
|
|
@@ -38717,7 +38717,7 @@ var init_insert_table = __esm({
|
|
|
38717
38717
|
init_dialog2();
|
|
38718
38718
|
init_input_with_label2();
|
|
38719
38719
|
init_i18n();
|
|
38720
|
-
|
|
38720
|
+
import_jsx_runtime145 = require("react/jsx-runtime");
|
|
38721
38721
|
}
|
|
38722
38722
|
});
|
|
38723
38723
|
|
|
@@ -38806,80 +38806,80 @@ function BlockFormatDropDown({
|
|
|
38806
38806
|
});
|
|
38807
38807
|
}
|
|
38808
38808
|
};
|
|
38809
|
-
return /* @__PURE__ */ (0,
|
|
38809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Root, {
|
|
38810
38810
|
disabled,
|
|
38811
38811
|
style: { zIndex: 1 },
|
|
38812
|
-
content: /* @__PURE__ */ (0,
|
|
38812
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, {
|
|
38813
38813
|
children: [
|
|
38814
|
-
/* @__PURE__ */ (0,
|
|
38814
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
38815
38815
|
onClick: formatParagraph,
|
|
38816
38816
|
children: [
|
|
38817
|
-
/* @__PURE__ */ (0,
|
|
38817
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
38818
38818
|
className: `c-rte-icon-paragraph c-rte-toolbar__block-format__icon ${blockType === "paragraph" ? "selected" : ""}`
|
|
38819
38819
|
}),
|
|
38820
|
-
/* @__PURE__ */ (0,
|
|
38820
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
38821
38821
|
className: `c-rte-toolbar__block-format__text ${blockType === "paragraph" ? "selected" : ""}`,
|
|
38822
38822
|
children: "Normal"
|
|
38823
38823
|
})
|
|
38824
38824
|
]
|
|
38825
38825
|
}),
|
|
38826
|
-
headings.map((headingSize) => /* @__PURE__ */ (0,
|
|
38826
|
+
headings.map((headingSize) => /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
38827
38827
|
onClick: () => formatHeading(headingSize),
|
|
38828
38828
|
children: [
|
|
38829
|
-
/* @__PURE__ */ (0,
|
|
38829
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
38830
38830
|
className: `c-rte-icon-${headingSize} c-rte-toolbar__block-format__icon ${blockType === headingSize ? "selected" : ""}`
|
|
38831
38831
|
}),
|
|
38832
|
-
/* @__PURE__ */ (0,
|
|
38832
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
38833
38833
|
className: `c-rte-toolbar__block-format__text ${blockType === headingSize ? "selected" : ""}`,
|
|
38834
38834
|
children: headingTypeToBlockName[headingSize]
|
|
38835
38835
|
})
|
|
38836
38836
|
]
|
|
38837
38837
|
}, headingSize)),
|
|
38838
|
-
/* @__PURE__ */ (0,
|
|
38838
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
38839
38839
|
onClick: formatBulletList,
|
|
38840
38840
|
children: [
|
|
38841
|
-
/* @__PURE__ */ (0,
|
|
38841
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
38842
38842
|
className: `c-rte-icon-bullet-list c-rte-toolbar__block-format__icon ${blockType === "bullet" ? "selected" : ""}`
|
|
38843
38843
|
}),
|
|
38844
|
-
/* @__PURE__ */ (0,
|
|
38844
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
38845
38845
|
className: `c-rte-toolbar__block-format__text ${blockType === "bullet" ? "selected" : ""}`,
|
|
38846
38846
|
children: "Bullet List"
|
|
38847
38847
|
})
|
|
38848
38848
|
]
|
|
38849
38849
|
}),
|
|
38850
|
-
/* @__PURE__ */ (0,
|
|
38850
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
38851
38851
|
onClick: formatNumberedList,
|
|
38852
38852
|
children: [
|
|
38853
|
-
/* @__PURE__ */ (0,
|
|
38853
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
38854
38854
|
className: `c-rte-icon-numbered-list c-rte-toolbar__block-format__icon ${blockType === "number" ? "selected" : ""}`
|
|
38855
38855
|
}),
|
|
38856
|
-
/* @__PURE__ */ (0,
|
|
38856
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
38857
38857
|
className: `c-rte-toolbar__block-format__text ${blockType === "number" ? "selected" : ""}`,
|
|
38858
38858
|
children: "Numbered List"
|
|
38859
38859
|
})
|
|
38860
38860
|
]
|
|
38861
38861
|
}),
|
|
38862
|
-
/* @__PURE__ */ (0,
|
|
38862
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
38863
38863
|
onClick: formatQuote,
|
|
38864
38864
|
"data-testid": "toggle-block-format-quote",
|
|
38865
38865
|
children: [
|
|
38866
|
-
/* @__PURE__ */ (0,
|
|
38866
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
38867
38867
|
className: `c-rte-icon-quote c-rte-toolbar__block-format__icon ${blockType === "quote" ? "selected" : ""}`
|
|
38868
38868
|
}),
|
|
38869
|
-
/* @__PURE__ */ (0,
|
|
38869
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
38870
38870
|
className: `c-rte-toolbar__block-format__text ${blockType === "quote" ? "selected" : ""}`,
|
|
38871
38871
|
children: "Quote"
|
|
38872
38872
|
})
|
|
38873
38873
|
]
|
|
38874
38874
|
}),
|
|
38875
|
-
/* @__PURE__ */ (0,
|
|
38875
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
38876
38876
|
onClick: formatCode,
|
|
38877
38877
|
"data-testid": "toggle-block-format-code",
|
|
38878
38878
|
children: [
|
|
38879
|
-
/* @__PURE__ */ (0,
|
|
38879
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
38880
38880
|
className: `icon c-rte-icon-code c-rte-toolbar__block-format__icon ${blockType === "code" ? "selected" : ""}`
|
|
38881
38881
|
}),
|
|
38882
|
-
/* @__PURE__ */ (0,
|
|
38882
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
38883
38883
|
className: `c-rte-toolbar__block-format__text ${blockType === "code" ? "selected" : ""}`,
|
|
38884
38884
|
children: "Code block"
|
|
38885
38885
|
})
|
|
@@ -38887,21 +38887,21 @@ function BlockFormatDropDown({
|
|
|
38887
38887
|
})
|
|
38888
38888
|
]
|
|
38889
38889
|
}),
|
|
38890
|
-
children: /* @__PURE__ */ (0,
|
|
38890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(Button, {
|
|
38891
38891
|
style: { backgroundColor: "transparent", padding: "0 8px" },
|
|
38892
38892
|
"aria-label": "Formatting options for text style",
|
|
38893
38893
|
"data-testid": "toggle-block-format",
|
|
38894
38894
|
children: [
|
|
38895
|
-
/* @__PURE__ */ (0,
|
|
38895
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
38896
38896
|
className: `c-rte-toolbar__toggle-icon c-rte-icon-${blockType}`
|
|
38897
38897
|
}),
|
|
38898
|
-
/* @__PURE__ */ (0,
|
|
38898
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Icon.Arrow, {})
|
|
38899
38899
|
]
|
|
38900
38900
|
})
|
|
38901
38901
|
});
|
|
38902
38902
|
}
|
|
38903
38903
|
function Divider() {
|
|
38904
|
-
return /* @__PURE__ */ (0,
|
|
38904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", {
|
|
38905
38905
|
className: "c-rte-toolbar__divider"
|
|
38906
38906
|
});
|
|
38907
38907
|
}
|
|
@@ -39051,13 +39051,13 @@ function ToolbarPlugin({
|
|
|
39051
39051
|
},
|
|
39052
39052
|
[activeEditor, selectedElementKey]
|
|
39053
39053
|
);
|
|
39054
|
-
return /* @__PURE__ */ (0,
|
|
39054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", {
|
|
39055
39055
|
className: "c-rte-toolbar",
|
|
39056
39056
|
children: [
|
|
39057
|
-
/* @__PURE__ */ (0,
|
|
39057
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", {
|
|
39058
39058
|
className: "c-rte-toolbar__inner",
|
|
39059
39059
|
children: [
|
|
39060
|
-
/* @__PURE__ */ (0,
|
|
39060
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39061
39061
|
disabled: !canUndo || !isEditable,
|
|
39062
39062
|
onClick: () => {
|
|
39063
39063
|
activeEditor.dispatchCommand(import_lexical15.UNDO_COMMAND, void 0);
|
|
@@ -39066,12 +39066,12 @@ function ToolbarPlugin({
|
|
|
39066
39066
|
title: tr(IS_APPLE ? "actionUndoTitleApple" : "actionUndoTitle"),
|
|
39067
39067
|
"aria-label": tr("actionUndoLabel"),
|
|
39068
39068
|
"data-testid": "rich-text-undo-button",
|
|
39069
|
-
children: /* @__PURE__ */ (0,
|
|
39069
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39070
39070
|
className: `c-rte-icon-undo c-rte-toolbar__icon ${!canUndo ? "disabled" : ""}
|
|
39071
39071
|
`
|
|
39072
39072
|
})
|
|
39073
39073
|
}),
|
|
39074
|
-
/* @__PURE__ */ (0,
|
|
39074
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39075
39075
|
disabled: !canRedo || !isEditable,
|
|
39076
39076
|
onClick: () => {
|
|
39077
39077
|
activeEditor.dispatchCommand(import_lexical15.REDO_COMMAND, void 0);
|
|
@@ -39079,51 +39079,51 @@ function ToolbarPlugin({
|
|
|
39079
39079
|
type: "button",
|
|
39080
39080
|
title: tr(IS_APPLE ? "actionRedoTitleApple" : "actionRedoTitle"),
|
|
39081
39081
|
"aria-label": tr("actionRedoLabel"),
|
|
39082
|
-
children: /* @__PURE__ */ (0,
|
|
39082
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39083
39083
|
className: `c-rte-icon-redo c-rte-toolbar__icon ${!canRedo ? "disabled" : ""}`
|
|
39084
39084
|
})
|
|
39085
39085
|
}),
|
|
39086
|
-
/* @__PURE__ */ (0,
|
|
39087
|
-
blockType in blockTypeToBlockName && activeEditor === editor && /* @__PURE__ */ (0,
|
|
39086
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Divider, {}),
|
|
39087
|
+
blockType in blockTypeToBlockName && activeEditor === editor && /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, {
|
|
39088
39088
|
children: [
|
|
39089
|
-
/* @__PURE__ */ (0,
|
|
39089
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(BlockFormatDropDown, {
|
|
39090
39090
|
disabled: !isEditable,
|
|
39091
39091
|
blockType,
|
|
39092
39092
|
editor
|
|
39093
39093
|
}),
|
|
39094
|
-
/* @__PURE__ */ (0,
|
|
39094
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Divider, {})
|
|
39095
39095
|
]
|
|
39096
39096
|
}),
|
|
39097
|
-
blockType === "code" ? /* @__PURE__ */ (0,
|
|
39098
|
-
children: /* @__PURE__ */ (0,
|
|
39097
|
+
blockType === "code" ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, {
|
|
39098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Root, {
|
|
39099
39099
|
disabled: !isEditable,
|
|
39100
39100
|
style: { zIndex: 1 },
|
|
39101
|
-
content: /* @__PURE__ */ (0,
|
|
39101
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, {
|
|
39102
39102
|
children: CODE_LANGUAGE_OPTIONS.map(([value, name]) => {
|
|
39103
|
-
return /* @__PURE__ */ (0,
|
|
39103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
|
|
39104
39104
|
className: `item ${dropDownActiveClass(value === codeLanguage)}`,
|
|
39105
39105
|
onClick: () => onCodeLanguageSelect(value),
|
|
39106
|
-
children: /* @__PURE__ */ (0,
|
|
39106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39107
39107
|
className: `c-rte-toolbar__code-lang__sel-item ${dropDownActiveClass(value === codeLanguage) ? "selected" : ""}`,
|
|
39108
39108
|
children: name
|
|
39109
39109
|
})
|
|
39110
39110
|
}, value);
|
|
39111
39111
|
})
|
|
39112
39112
|
}),
|
|
39113
|
-
children: /* @__PURE__ */ (0,
|
|
39113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Button, {
|
|
39114
39114
|
"aria-label": tr("codeSelectLanguage"),
|
|
39115
|
-
append: /* @__PURE__ */ (0,
|
|
39116
|
-
children: /* @__PURE__ */ (0,
|
|
39115
|
+
append: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Icon.Arrow, {}),
|
|
39116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39117
39117
|
className: "c-rte-toolbar__code-lang__button-text",
|
|
39118
39118
|
children: (0, import_code9.getLanguageFriendlyName)(codeLanguage)
|
|
39119
39119
|
})
|
|
39120
39120
|
})
|
|
39121
39121
|
})
|
|
39122
|
-
}) : /* @__PURE__ */ (0,
|
|
39123
|
-
children: /* @__PURE__ */ (0,
|
|
39122
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Dialog, {
|
|
39123
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", {
|
|
39124
39124
|
className: "c-rte-toolbar__actions-rest",
|
|
39125
39125
|
children: [
|
|
39126
|
-
/* @__PURE__ */ (0,
|
|
39126
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39127
39127
|
disabled: !isEditable,
|
|
39128
39128
|
className: `c-rte-toolbar__icon-btn ${isBold ? "selected" : ""}`,
|
|
39129
39129
|
type: "button",
|
|
@@ -39133,11 +39133,11 @@ function ToolbarPlugin({
|
|
|
39133
39133
|
onClick: () => {
|
|
39134
39134
|
activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "bold");
|
|
39135
39135
|
},
|
|
39136
|
-
children: /* @__PURE__ */ (0,
|
|
39136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39137
39137
|
className: `c-rte-toolbar__icon-btn__icon c-rte-icon-bold`
|
|
39138
39138
|
})
|
|
39139
39139
|
}),
|
|
39140
|
-
/* @__PURE__ */ (0,
|
|
39140
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39141
39141
|
className: `c-rte-toolbar__icon-btn ${isItalic ? "selected" : ""}`,
|
|
39142
39142
|
disabled: !isEditable,
|
|
39143
39143
|
onClick: () => {
|
|
@@ -39147,11 +39147,11 @@ function ToolbarPlugin({
|
|
|
39147
39147
|
title: tr(IS_APPLE ? "actionFormatAsEmphasizedTitleApple" : "actionFormatAsEmphasizedTitle"),
|
|
39148
39148
|
"aria-label": tr("actionFormatAsEmphasizedLabel"),
|
|
39149
39149
|
"data-testid": "toggle-format-emphasized",
|
|
39150
|
-
children: /* @__PURE__ */ (0,
|
|
39150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39151
39151
|
className: `c-rte-toolbar__icon-btn__icon c-rte-icon-italic`
|
|
39152
39152
|
})
|
|
39153
39153
|
}),
|
|
39154
|
-
/* @__PURE__ */ (0,
|
|
39154
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39155
39155
|
className: `c-rte-toolbar__icon-btn ${isUnderline ? "selected" : ""}`,
|
|
39156
39156
|
disabled: !isEditable,
|
|
39157
39157
|
onClick: () => {
|
|
@@ -39161,11 +39161,11 @@ function ToolbarPlugin({
|
|
|
39161
39161
|
title: tr(IS_APPLE ? "actionFormatAsUnderlinedTitleApple" : "actionFormatAsUnderlinedTitle"),
|
|
39162
39162
|
"aria-label": tr("actionFormatAsUnderlinedLabel"),
|
|
39163
39163
|
"data-testid": "toggle-format-underlined",
|
|
39164
|
-
children: /* @__PURE__ */ (0,
|
|
39164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39165
39165
|
className: `c-rte-toolbar__icon-btn__icon c-rte-icon-underline`
|
|
39166
39166
|
})
|
|
39167
39167
|
}),
|
|
39168
|
-
/* @__PURE__ */ (0,
|
|
39168
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39169
39169
|
className: `c-rte-toolbar__icon-btn ${isCode ? "selected" : ""}`,
|
|
39170
39170
|
disabled: !isEditable,
|
|
39171
39171
|
onClick: () => {
|
|
@@ -39175,82 +39175,82 @@ function ToolbarPlugin({
|
|
|
39175
39175
|
title: tr("actionInsertCodeBlock"),
|
|
39176
39176
|
"aria-label": tr("actionInsertCodeBlock"),
|
|
39177
39177
|
"data-testid": "toggle-format-code",
|
|
39178
|
-
children: /* @__PURE__ */ (0,
|
|
39178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39179
39179
|
className: `c-rte-toolbar__icon-btn__icon c-rte-icon-code`
|
|
39180
39180
|
})
|
|
39181
39181
|
}),
|
|
39182
|
-
/* @__PURE__ */ (0,
|
|
39182
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39183
39183
|
className: `c-rte-toolbar__icon-btn ${isLink ? "selected" : ""}`,
|
|
39184
39184
|
disabled: !isEditable,
|
|
39185
39185
|
onClick: insertLink,
|
|
39186
39186
|
type: "button",
|
|
39187
39187
|
"aria-label": tr("actionInsertlink"),
|
|
39188
39188
|
title: tr("actionInsertlink"),
|
|
39189
|
-
children: /* @__PURE__ */ (0,
|
|
39189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39190
39190
|
className: `c-rte-toolbar__icon-btn__icon c-rte-icon-link`
|
|
39191
39191
|
})
|
|
39192
39192
|
}),
|
|
39193
|
-
/* @__PURE__ */ (0,
|
|
39193
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Root, {
|
|
39194
39194
|
disabled: !isEditable,
|
|
39195
39195
|
style: { zIndex: 1 },
|
|
39196
|
-
content: /* @__PURE__ */ (0,
|
|
39196
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, {
|
|
39197
39197
|
children: [
|
|
39198
|
-
/* @__PURE__ */ (0,
|
|
39198
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
39199
39199
|
disabled: !isEditable,
|
|
39200
39200
|
onClick: () => activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "strikethrough"),
|
|
39201
39201
|
title: tr("actionFormatWithStrikethroughTitle"),
|
|
39202
39202
|
"aria-label": tr("actionFormatWithStrikethroughLabel"),
|
|
39203
39203
|
children: [
|
|
39204
|
-
/* @__PURE__ */ (0,
|
|
39204
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39205
39205
|
className: `c-rte-icon-strikethrough c-rte-toolbar__dd-item__icon ${isStrikethrough ? "selected" : ""}`
|
|
39206
39206
|
}),
|
|
39207
|
-
/* @__PURE__ */ (0,
|
|
39207
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39208
39208
|
className: `c-rte-toolbar__dd-item__text ${isStrikethrough ? "selected" : ""}`,
|
|
39209
39209
|
children: tr("actionFormatWithStrikethroughTitle")
|
|
39210
39210
|
})
|
|
39211
39211
|
]
|
|
39212
39212
|
}),
|
|
39213
|
-
/* @__PURE__ */ (0,
|
|
39213
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
39214
39214
|
disabled: !isEditable,
|
|
39215
39215
|
onClick: () => activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "subscript"),
|
|
39216
39216
|
title: tr("actionFormatWithSubscriptTitle"),
|
|
39217
39217
|
"aria-label": tr("actionFormatWithSubscriptLabel"),
|
|
39218
39218
|
children: [
|
|
39219
|
-
/* @__PURE__ */ (0,
|
|
39219
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39220
39220
|
className: `c-rte-icon-subscript c-rte-toolbar__dd-item__icon ${isSubscript ? "selected" : ""}`
|
|
39221
39221
|
}),
|
|
39222
|
-
/* @__PURE__ */ (0,
|
|
39222
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39223
39223
|
className: `c-rte-toolbar__dd-item__text ${isSubscript ? "selected" : ""}`,
|
|
39224
39224
|
children: tr("actionFormatWithSubscriptTitle")
|
|
39225
39225
|
})
|
|
39226
39226
|
]
|
|
39227
39227
|
}),
|
|
39228
|
-
/* @__PURE__ */ (0,
|
|
39228
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
39229
39229
|
disabled: !isEditable,
|
|
39230
39230
|
onClick: () => activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "superscript"),
|
|
39231
39231
|
title: tr("actionFormatWithSuperscriptTitle"),
|
|
39232
39232
|
"aria-label": tr("actionFormatWithSuperscriptLabel"),
|
|
39233
39233
|
children: [
|
|
39234
|
-
/* @__PURE__ */ (0,
|
|
39234
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39235
39235
|
className: `c-rte-icon-superscript c-rte-toolbar__dd-item__icon ${isSuperscript ? "selected" : ""}`
|
|
39236
39236
|
}),
|
|
39237
|
-
/* @__PURE__ */ (0,
|
|
39237
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39238
39238
|
className: `c-rte-toolbar__dd-item__text ${isSuperscript ? "selected" : ""}`,
|
|
39239
39239
|
children: tr("actionFormatWithSuperscriptTitle")
|
|
39240
39240
|
})
|
|
39241
39241
|
]
|
|
39242
39242
|
}),
|
|
39243
|
-
/* @__PURE__ */ (0,
|
|
39243
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
39244
39244
|
disabled: !isEditable,
|
|
39245
39245
|
onClick: clearFormatting,
|
|
39246
39246
|
className: "item",
|
|
39247
39247
|
title: tr("actionClearTextFormatting"),
|
|
39248
39248
|
"aria-label": tr("actionClearTextFormatting"),
|
|
39249
39249
|
children: [
|
|
39250
|
-
/* @__PURE__ */ (0,
|
|
39250
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39251
39251
|
className: "c-rte-icon-clear c-rte-toolbar__dd-item__icon"
|
|
39252
39252
|
}),
|
|
39253
|
-
/* @__PURE__ */ (0,
|
|
39253
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39254
39254
|
className: "c-rte-toolbar__dd-item__text--clear",
|
|
39255
39255
|
children: tr("actionFormatClear")
|
|
39256
39256
|
})
|
|
@@ -39258,47 +39258,47 @@ function ToolbarPlugin({
|
|
|
39258
39258
|
})
|
|
39259
39259
|
]
|
|
39260
39260
|
}),
|
|
39261
|
-
children: /* @__PURE__ */ (0,
|
|
39261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(Button, {
|
|
39262
39262
|
style: { backgroundColor: "transparent", padding: "0 8px" },
|
|
39263
39263
|
"aria-label": tr("actionTextFormattingOptions"),
|
|
39264
39264
|
children: [
|
|
39265
|
-
/* @__PURE__ */ (0,
|
|
39265
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39266
39266
|
className: `c-rte-icon-dropdown-more c-rte-toolbar__toggle-icon`
|
|
39267
39267
|
}),
|
|
39268
|
-
/* @__PURE__ */ (0,
|
|
39268
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Icon.Arrow, {})
|
|
39269
39269
|
]
|
|
39270
39270
|
})
|
|
39271
39271
|
}),
|
|
39272
|
-
/* @__PURE__ */ (0,
|
|
39273
|
-
/* @__PURE__ */ (0,
|
|
39272
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Divider, {}),
|
|
39273
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Root, {
|
|
39274
39274
|
style: { zIndex: 1 },
|
|
39275
39275
|
disabled: !isEditable,
|
|
39276
|
-
content: /* @__PURE__ */ (0,
|
|
39276
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, {
|
|
39277
39277
|
children: [
|
|
39278
|
-
/* @__PURE__ */ (0,
|
|
39278
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(DropdownMenu.Item, {
|
|
39279
39279
|
onClick: () => {
|
|
39280
39280
|
activeEditor.dispatchCommand(import_LexicalHorizontalRuleNode4.INSERT_HORIZONTAL_RULE_COMMAND, void 0);
|
|
39281
39281
|
},
|
|
39282
39282
|
children: [
|
|
39283
|
-
/* @__PURE__ */ (0,
|
|
39283
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39284
39284
|
className: "c-rte-toolbar__dd-item__icon c-rte-icon-horizontal-rule"
|
|
39285
39285
|
}),
|
|
39286
|
-
/* @__PURE__ */ (0,
|
|
39286
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39287
39287
|
className: "c-rte-toolbar__dd-item__text",
|
|
39288
39288
|
children: tr("horizontalRule")
|
|
39289
39289
|
})
|
|
39290
39290
|
]
|
|
39291
39291
|
}),
|
|
39292
|
-
/* @__PURE__ */ (0,
|
|
39293
|
-
children: /* @__PURE__ */ (0,
|
|
39292
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
|
|
39293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Dialog.Trigger, {
|
|
39294
39294
|
asChild: true,
|
|
39295
|
-
children: /* @__PURE__ */ (0,
|
|
39295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", {
|
|
39296
39296
|
className: "c-rte-toolbar__dd-item--table",
|
|
39297
39297
|
children: [
|
|
39298
|
-
/* @__PURE__ */ (0,
|
|
39298
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39299
39299
|
className: "c-rte-toolbar__dd-item__icon c-rte-icon-table"
|
|
39300
39300
|
}),
|
|
39301
|
-
/* @__PURE__ */ (0,
|
|
39301
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
|
|
39302
39302
|
className: "c-rte-toolbar__dd-item__text",
|
|
39303
39303
|
children: tr("table")
|
|
39304
39304
|
})
|
|
@@ -39308,21 +39308,21 @@ function ToolbarPlugin({
|
|
|
39308
39308
|
})
|
|
39309
39309
|
]
|
|
39310
39310
|
}),
|
|
39311
|
-
children: /* @__PURE__ */ (0,
|
|
39312
|
-
children: /* @__PURE__ */ (0,
|
|
39311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
|
|
39312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("i", {
|
|
39313
39313
|
className: "c-rte-icon-plus c-rte-toolbar__plus"
|
|
39314
39314
|
})
|
|
39315
39315
|
})
|
|
39316
39316
|
}),
|
|
39317
|
-
/* @__PURE__ */ (0,
|
|
39317
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(Dialog.Content, {
|
|
39318
39318
|
children: [
|
|
39319
|
-
/* @__PURE__ */ (0,
|
|
39319
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Dialog.Title, {
|
|
39320
39320
|
children: tr("insertTableTitle")
|
|
39321
39321
|
}),
|
|
39322
|
-
/* @__PURE__ */ (0,
|
|
39322
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Dialog.Description, {
|
|
39323
39323
|
children: tr("insertTableDescription")
|
|
39324
39324
|
}),
|
|
39325
|
-
/* @__PURE__ */ (0,
|
|
39325
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(InsertTableDialog, {
|
|
39326
39326
|
activeEditor
|
|
39327
39327
|
})
|
|
39328
39328
|
]
|
|
@@ -39332,7 +39332,7 @@ function ToolbarPlugin({
|
|
|
39332
39332
|
})
|
|
39333
39333
|
]
|
|
39334
39334
|
}),
|
|
39335
|
-
/* @__PURE__ */ (0,
|
|
39335
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(ActionsPlugin, {
|
|
39336
39336
|
disabled,
|
|
39337
39337
|
prepend: actionsMenuPrepend,
|
|
39338
39338
|
append: actionsMenuAppend
|
|
@@ -39340,7 +39340,7 @@ function ToolbarPlugin({
|
|
|
39340
39340
|
]
|
|
39341
39341
|
});
|
|
39342
39342
|
}
|
|
39343
|
-
var import_react130, import_lexical15, import_code9, import_link6, import_list5, import_LexicalComposerContext11, import_LexicalDecoratorBlockNode, import_LexicalHorizontalRuleNode4, import_rich_text5, import_selection4, import_utils4,
|
|
39343
|
+
var import_react130, import_lexical15, import_code9, import_link6, import_list5, import_LexicalComposerContext11, import_LexicalDecoratorBlockNode, import_LexicalHorizontalRuleNode4, import_rich_text5, import_selection4, import_utils4, import_jsx_runtime146, headingTypeToBlockName, headings, blockTypeToBlockName, CODE_LANGUAGE_OPTIONS;
|
|
39344
39344
|
var init_ToolbarPlugin = __esm({
|
|
39345
39345
|
"src/rich-text-editor/plugins/ToolbarPlugin/index.tsx"() {
|
|
39346
39346
|
"use strict";
|
|
@@ -39366,7 +39366,7 @@ var init_ToolbarPlugin = __esm({
|
|
|
39366
39366
|
init_url();
|
|
39367
39367
|
init_ActionsPlugin();
|
|
39368
39368
|
init_insert_table();
|
|
39369
|
-
|
|
39369
|
+
import_jsx_runtime146 = require("react/jsx-runtime");
|
|
39370
39370
|
headingTypeToBlockName = {
|
|
39371
39371
|
h1: "Heading 1",
|
|
39372
39372
|
h2: "Heading 2",
|
|
@@ -39516,7 +39516,7 @@ function RichTextEditor({
|
|
|
39516
39516
|
labelTranslations,
|
|
39517
39517
|
...rest
|
|
39518
39518
|
}) {
|
|
39519
|
-
return /* @__PURE__ */ (0,
|
|
39519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalComposer.LexicalComposer, {
|
|
39520
39520
|
initialConfig: {
|
|
39521
39521
|
editable: !rest.disabled,
|
|
39522
39522
|
namespace: "crystallize-rich-text-editor",
|
|
@@ -39527,13 +39527,13 @@ function RichTextEditor({
|
|
|
39527
39527
|
throw error;
|
|
39528
39528
|
}
|
|
39529
39529
|
},
|
|
39530
|
-
children: /* @__PURE__ */ (0,
|
|
39530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(I18nProvider, {
|
|
39531
39531
|
language,
|
|
39532
39532
|
labelTranslations,
|
|
39533
|
-
children: /* @__PURE__ */ (0,
|
|
39534
|
-
children: /* @__PURE__ */ (0,
|
|
39533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(SharedHistoryContext, {
|
|
39534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", {
|
|
39535
39535
|
className: "c-rich-text-editor",
|
|
39536
|
-
children: /* @__PURE__ */ (0,
|
|
39536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(RichTextEditorWithoutContext, {
|
|
39537
39537
|
...rest
|
|
39538
39538
|
})
|
|
39539
39539
|
})
|
|
@@ -39555,7 +39555,7 @@ function RichTextEditorWithoutContext({
|
|
|
39555
39555
|
}) {
|
|
39556
39556
|
const editable = !disabled;
|
|
39557
39557
|
const { historyState } = useSharedHistoryContext();
|
|
39558
|
-
const placeholder = /* @__PURE__ */ (0,
|
|
39558
|
+
const placeholder = /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", {
|
|
39559
39559
|
className: "c-rte-placeholder",
|
|
39560
39560
|
children: placeholderText ?? ""
|
|
39561
39561
|
});
|
|
@@ -39578,38 +39578,38 @@ function RichTextEditorWithoutContext({
|
|
|
39578
39578
|
}
|
|
39579
39579
|
firstOnChangeTriggeredRef.current = true;
|
|
39580
39580
|
}
|
|
39581
|
-
return /* @__PURE__ */ (0,
|
|
39581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, {
|
|
39582
39582
|
children: [
|
|
39583
|
-
/* @__PURE__ */ (0,
|
|
39583
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalOnChangePlugin.OnChangePlugin, {
|
|
39584
39584
|
onChange: onLocalChange,
|
|
39585
39585
|
ignoreSelectionChange: true
|
|
39586
39586
|
}),
|
|
39587
|
-
/* @__PURE__ */ (0,
|
|
39587
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ToolbarPlugin, {
|
|
39588
39588
|
disabled,
|
|
39589
39589
|
actionsMenuPrepend,
|
|
39590
39590
|
actionsMenuAppend
|
|
39591
39591
|
}),
|
|
39592
39592
|
slotPreContent,
|
|
39593
|
-
/* @__PURE__ */ (0,
|
|
39593
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", {
|
|
39594
39594
|
className: `c-rte-editor-container ${disabled ? "disabled" : ""}`,
|
|
39595
39595
|
"data-testid": "rich-text-editor",
|
|
39596
39596
|
children: [
|
|
39597
|
-
maxLength != null ? /* @__PURE__ */ (0,
|
|
39597
|
+
maxLength != null ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(MaxLengthPlugin, {
|
|
39598
39598
|
maxLength
|
|
39599
39599
|
}) : null,
|
|
39600
|
-
!autoFocus ? null : /* @__PURE__ */ (0,
|
|
39601
|
-
/* @__PURE__ */ (0,
|
|
39602
|
-
/* @__PURE__ */ (0,
|
|
39603
|
-
/* @__PURE__ */ (0,
|
|
39600
|
+
!autoFocus ? null : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalAutoFocusPlugin.AutoFocusPlugin, {}),
|
|
39601
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalClearEditorPlugin.ClearEditorPlugin, {}),
|
|
39602
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(LexicalAutoLinkPlugin, {}),
|
|
39603
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalHistoryPlugin2.HistoryPlugin, {
|
|
39604
39604
|
externalHistoryState: historyState
|
|
39605
39605
|
}),
|
|
39606
|
-
/* @__PURE__ */ (0,
|
|
39607
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
39606
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalRichTextPlugin.RichTextPlugin, {
|
|
39607
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", {
|
|
39608
39608
|
className: "c-rte-editor-scroller",
|
|
39609
|
-
children: /* @__PURE__ */ (0,
|
|
39609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", {
|
|
39610
39610
|
className: "c-rte-editor",
|
|
39611
39611
|
ref: onRef,
|
|
39612
|
-
children: /* @__PURE__ */ (0,
|
|
39612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalContentEditable.ContentEditable, {
|
|
39613
39613
|
className: "c-rte-contenteditable-root",
|
|
39614
39614
|
id
|
|
39615
39615
|
})
|
|
@@ -39618,28 +39618,28 @@ function RichTextEditorWithoutContext({
|
|
|
39618
39618
|
placeholder,
|
|
39619
39619
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
39620
39620
|
}),
|
|
39621
|
-
/* @__PURE__ */ (0,
|
|
39622
|
-
/* @__PURE__ */ (0,
|
|
39623
|
-
/* @__PURE__ */ (0,
|
|
39621
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CodeHighlightPlugin, {}),
|
|
39622
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
39623
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ListMaxIndentLevelPlugin, {
|
|
39624
39624
|
maxDepth: 7
|
|
39625
39625
|
}),
|
|
39626
|
-
/* @__PURE__ */ (0,
|
|
39627
|
-
/* @__PURE__ */ (0,
|
|
39628
|
-
/* @__PURE__ */ (0,
|
|
39629
|
-
/* @__PURE__ */ (0,
|
|
39630
|
-
/* @__PURE__ */ (0,
|
|
39631
|
-
floatingAnchorElem && /* @__PURE__ */ (0,
|
|
39626
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalTablePlugin.TablePlugin, {}),
|
|
39627
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(LinkPlugin, {}),
|
|
39628
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalHorizontalRulePlugin.HorizontalRulePlugin, {}),
|
|
39629
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(TabFocusPlugin, {}),
|
|
39630
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {}),
|
|
39631
|
+
floatingAnchorElem && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, {
|
|
39632
39632
|
children: [
|
|
39633
|
-
/* @__PURE__ */ (0,
|
|
39633
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CodeActionMenuPlugin, {
|
|
39634
39634
|
anchorElem: floatingAnchorElem
|
|
39635
39635
|
}),
|
|
39636
|
-
/* @__PURE__ */ (0,
|
|
39636
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(FloatingLinkEditorPlugin, {
|
|
39637
39637
|
anchorElem: floatingAnchorElem
|
|
39638
39638
|
}),
|
|
39639
|
-
/* @__PURE__ */ (0,
|
|
39639
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(TableActionMenuPlugin, {
|
|
39640
39640
|
anchorElem: floatingAnchorElem
|
|
39641
39641
|
}),
|
|
39642
|
-
/* @__PURE__ */ (0,
|
|
39642
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(FloatingTextFormatToolbarPlugin, {
|
|
39643
39643
|
anchorElem: floatingAnchorElem
|
|
39644
39644
|
})
|
|
39645
39645
|
]
|
|
@@ -39649,7 +39649,7 @@ function RichTextEditorWithoutContext({
|
|
|
39649
39649
|
]
|
|
39650
39650
|
});
|
|
39651
39651
|
}
|
|
39652
|
-
var import_react131, import_LexicalAutoFocusPlugin, import_LexicalClearEditorPlugin, import_LexicalComposer, import_LexicalErrorBoundary, import_LexicalHistoryPlugin2, import_LexicalHorizontalRulePlugin, import_LexicalListPlugin, import_LexicalOnChangePlugin, import_LexicalRichTextPlugin, import_LexicalTabIndentationPlugin, import_LexicalTablePlugin, import_LexicalComposerContext12, import_LexicalContentEditable,
|
|
39652
|
+
var import_react131, import_LexicalAutoFocusPlugin, import_LexicalClearEditorPlugin, import_LexicalComposer, import_LexicalErrorBoundary, import_LexicalHistoryPlugin2, import_LexicalHorizontalRulePlugin, import_LexicalListPlugin, import_LexicalOnChangePlugin, import_LexicalRichTextPlugin, import_LexicalTabIndentationPlugin, import_LexicalTablePlugin, import_LexicalComposerContext12, import_LexicalContentEditable, import_jsx_runtime147, rich_text_editor_default;
|
|
39653
39653
|
var init_rich_text_editor = __esm({
|
|
39654
39654
|
"src/rich-text-editor/rich-text-editor.tsx"() {
|
|
39655
39655
|
"use strict";
|
|
@@ -39686,7 +39686,7 @@ var init_rich_text_editor = __esm({
|
|
|
39686
39686
|
init_TableActionMenuPlugin();
|
|
39687
39687
|
init_ToolbarPlugin();
|
|
39688
39688
|
init_CrystallizeRTEditorTheme();
|
|
39689
|
-
|
|
39689
|
+
import_jsx_runtime147 = require("react/jsx-runtime");
|
|
39690
39690
|
rich_text_editor_default = RichTextEditor;
|
|
39691
39691
|
}
|
|
39692
39692
|
});
|
|
@@ -39699,6 +39699,8 @@ __export(src_exports, {
|
|
|
39699
39699
|
Button: () => Button,
|
|
39700
39700
|
Card: () => Card,
|
|
39701
39701
|
Checkbox: () => Checkbox,
|
|
39702
|
+
Collapsible: () => Collapsible,
|
|
39703
|
+
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
39702
39704
|
Dialog: () => Dialog,
|
|
39703
39705
|
DropdownMenu: () => DropdownMenu,
|
|
39704
39706
|
Icon: () => Icon,
|
|
@@ -39833,16 +39835,56 @@ var Checkbox = (0, import_react4.forwardRef)((props, ref) => {
|
|
|
39833
39835
|
});
|
|
39834
39836
|
Checkbox.displayName = "Checkbox";
|
|
39835
39837
|
|
|
39838
|
+
// src/collapsible/collapsible.tsx
|
|
39839
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
39840
|
+
var CollapsiblePrimitives = __toESM(require("@radix-ui/react-collapsible"));
|
|
39841
|
+
init_iconography();
|
|
39842
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
39843
|
+
function Content3({ className, ...delegated }) {
|
|
39844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(CollapsiblePrimitives.Content, {
|
|
39845
|
+
...delegated,
|
|
39846
|
+
className: (0, import_class_variance_authority9.cx)("c-collapsible-content", className)
|
|
39847
|
+
});
|
|
39848
|
+
}
|
|
39849
|
+
function CollapsibleTrigger({
|
|
39850
|
+
children,
|
|
39851
|
+
arrowPosition,
|
|
39852
|
+
className,
|
|
39853
|
+
...delegated
|
|
39854
|
+
}) {
|
|
39855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(CollapsiblePrimitives.Trigger, {
|
|
39856
|
+
asChild: true,
|
|
39857
|
+
...delegated,
|
|
39858
|
+
className: (0, import_class_variance_authority9.cx)("c-collapsible-trigger", arrowPosition === "right" ? "arrow-right" : "", className),
|
|
39859
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", {
|
|
39860
|
+
children: [
|
|
39861
|
+
arrowPosition && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Icon.Caret, {
|
|
39862
|
+
className: "c-collapsible-arrow",
|
|
39863
|
+
fill: "purple-50-900",
|
|
39864
|
+
width: 10,
|
|
39865
|
+
height: 10
|
|
39866
|
+
}),
|
|
39867
|
+
children
|
|
39868
|
+
]
|
|
39869
|
+
})
|
|
39870
|
+
});
|
|
39871
|
+
}
|
|
39872
|
+
var Collapsible = {
|
|
39873
|
+
Root: CollapsiblePrimitives.Root,
|
|
39874
|
+
Trigger: CollapsibleTrigger,
|
|
39875
|
+
Content: Content3
|
|
39876
|
+
};
|
|
39877
|
+
|
|
39836
39878
|
// src/index.ts
|
|
39837
39879
|
init_dialog2();
|
|
39838
39880
|
init_dropdown_menu();
|
|
39839
39881
|
init_icon_button2();
|
|
39840
39882
|
|
|
39841
39883
|
// src/inline-radio/inline-radio.tsx
|
|
39842
|
-
var
|
|
39884
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
39843
39885
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
39844
|
-
var
|
|
39845
|
-
var inlineRadioGroupStyles = (0,
|
|
39886
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
39887
|
+
var inlineRadioGroupStyles = (0, import_class_variance_authority12.cva)("c-inline-radio-group", {
|
|
39846
39888
|
variants: {
|
|
39847
39889
|
size: {
|
|
39848
39890
|
xs: "c-inline-radio-group-xs",
|
|
@@ -39856,16 +39898,16 @@ var inlineRadioGroupStyles = (0, import_class_variance_authority11.cva)("c-inlin
|
|
|
39856
39898
|
}
|
|
39857
39899
|
});
|
|
39858
39900
|
function InlineRadioGroup({ size, className, ...delegated }) {
|
|
39859
|
-
return /* @__PURE__ */ (0,
|
|
39901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(RadioGroupPrimitive.Root, {
|
|
39860
39902
|
...delegated,
|
|
39861
39903
|
className: inlineRadioGroupStyles({ size, className })
|
|
39862
39904
|
});
|
|
39863
39905
|
}
|
|
39864
39906
|
function InlineRadioItem({ children, className, ...delegated }) {
|
|
39865
|
-
return /* @__PURE__ */ (0,
|
|
39907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(RadioGroupPrimitive.Item, {
|
|
39866
39908
|
...delegated,
|
|
39867
|
-
className: (0,
|
|
39868
|
-
children: /* @__PURE__ */ (0,
|
|
39909
|
+
className: (0, import_class_variance_authority12.cx)("c-inline-radio", className),
|
|
39910
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(RadioGroupPrimitive.Indicator, {
|
|
39869
39911
|
forceMount: true,
|
|
39870
39912
|
children
|
|
39871
39913
|
})
|
|
@@ -39882,14 +39924,14 @@ init_input2();
|
|
|
39882
39924
|
init_label2();
|
|
39883
39925
|
|
|
39884
39926
|
// src/progress/progress.tsx
|
|
39885
|
-
var
|
|
39927
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
39886
39928
|
var ProgressPrimitives = __toESM(require("@radix-ui/react-progress"));
|
|
39887
|
-
var
|
|
39929
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
39888
39930
|
function Progress({ className, value }) {
|
|
39889
|
-
return /* @__PURE__ */ (0,
|
|
39890
|
-
className: (0,
|
|
39931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ProgressPrimitives.Root, {
|
|
39932
|
+
className: (0, import_class_variance_authority17.cx)(className, "c-progress-root"),
|
|
39891
39933
|
value,
|
|
39892
|
-
children: /* @__PURE__ */ (0,
|
|
39934
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ProgressPrimitives.Indicator, {
|
|
39893
39935
|
className: "c-progress-indicator",
|
|
39894
39936
|
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
39895
39937
|
})
|
|
@@ -39898,12 +39940,12 @@ function Progress({ className, value }) {
|
|
|
39898
39940
|
|
|
39899
39941
|
// src/radio/radio.tsx
|
|
39900
39942
|
var RadioGroupPrimitive2 = __toESM(require("@radix-ui/react-radio-group"));
|
|
39901
|
-
var
|
|
39943
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
39902
39944
|
function RadioGroupItem(props) {
|
|
39903
|
-
return /* @__PURE__ */ (0,
|
|
39945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RadioGroupPrimitive2.Item, {
|
|
39904
39946
|
...props,
|
|
39905
39947
|
className: "c-radio-item",
|
|
39906
|
-
children: /* @__PURE__ */ (0,
|
|
39948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RadioGroupPrimitive2.Indicator, {
|
|
39907
39949
|
className: "c-radio-indicator"
|
|
39908
39950
|
})
|
|
39909
39951
|
});
|
|
@@ -39915,19 +39957,20 @@ var Radio = {
|
|
|
39915
39957
|
|
|
39916
39958
|
// src/select/select-item.tsx
|
|
39917
39959
|
var import_react113 = require("react");
|
|
39960
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
39918
39961
|
var SelectPrimitives = __toESM(require("@radix-ui/react-select"));
|
|
39919
|
-
var
|
|
39962
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
39920
39963
|
var SelectItem = (0, import_react113.forwardRef)((props, ref) => {
|
|
39921
|
-
const { children, ...delegated } = props;
|
|
39922
|
-
return /* @__PURE__ */ (0,
|
|
39923
|
-
className: "c-select-item",
|
|
39964
|
+
const { children, className, ...delegated } = props;
|
|
39965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(SelectPrimitives.Item, {
|
|
39966
|
+
className: (0, import_class_variance_authority18.cx)("c-select-item", className),
|
|
39924
39967
|
ref,
|
|
39925
39968
|
...delegated,
|
|
39926
39969
|
children: [
|
|
39927
|
-
/* @__PURE__ */ (0,
|
|
39970
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(SelectPrimitives.ItemText, {
|
|
39928
39971
|
children
|
|
39929
39972
|
}),
|
|
39930
|
-
/* @__PURE__ */ (0,
|
|
39973
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(SelectPrimitives.ItemIndicator, {})
|
|
39931
39974
|
]
|
|
39932
39975
|
});
|
|
39933
39976
|
});
|
|
@@ -39935,11 +39978,11 @@ SelectItem.displayName = "SelectItem";
|
|
|
39935
39978
|
|
|
39936
39979
|
// src/select/select-root.tsx
|
|
39937
39980
|
var import_react114 = require("react");
|
|
39938
|
-
var
|
|
39981
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
39939
39982
|
var SelectPrimitives2 = __toESM(require("@radix-ui/react-select"));
|
|
39940
39983
|
init_iconography();
|
|
39941
|
-
var
|
|
39942
|
-
var selectTriggerStyles = (0,
|
|
39984
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
39985
|
+
var selectTriggerStyles = (0, import_class_variance_authority19.cva)("c-select-trigger", {
|
|
39943
39986
|
variants: {
|
|
39944
39987
|
size: {
|
|
39945
39988
|
xs: "c-select-trigger-xs",
|
|
@@ -39954,34 +39997,34 @@ var selectTriggerStyles = (0, import_class_variance_authority17.cva)("c-select-t
|
|
|
39954
39997
|
});
|
|
39955
39998
|
var SelectContainer = (0, import_react114.forwardRef)(
|
|
39956
39999
|
({ children, id, placeholder, disabled, size, triggerClassName, ...delegated }, ref) => {
|
|
39957
|
-
return /* @__PURE__ */ (0,
|
|
40000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(SelectPrimitives2.Root, {
|
|
39958
40001
|
...delegated,
|
|
39959
40002
|
children: [
|
|
39960
|
-
/* @__PURE__ */ (0,
|
|
40003
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(SelectPrimitives2.Trigger, {
|
|
39961
40004
|
ref,
|
|
39962
40005
|
className: selectTriggerStyles({ size, className: triggerClassName }),
|
|
39963
40006
|
disabled,
|
|
39964
40007
|
id,
|
|
39965
40008
|
children: [
|
|
39966
|
-
/* @__PURE__ */ (0,
|
|
39967
|
-
placeholder: /* @__PURE__ */ (0,
|
|
40009
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SelectPrimitives2.Value, {
|
|
40010
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", {
|
|
39968
40011
|
className: "c-select-value",
|
|
39969
40012
|
children: placeholder ?? "Select..."
|
|
39970
40013
|
})
|
|
39971
40014
|
}),
|
|
39972
|
-
/* @__PURE__ */ (0,
|
|
40015
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon.Arrow, {})
|
|
39973
40016
|
]
|
|
39974
40017
|
}),
|
|
39975
|
-
/* @__PURE__ */ (0,
|
|
39976
|
-
children: /* @__PURE__ */ (0,
|
|
40018
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SelectPrimitives2.Portal, {
|
|
40019
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(SelectPrimitives2.Content, {
|
|
39977
40020
|
className: "c-select-content",
|
|
39978
40021
|
children: [
|
|
39979
|
-
/* @__PURE__ */ (0,
|
|
39980
|
-
/* @__PURE__ */ (0,
|
|
40022
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SelectPrimitives2.ScrollUpButton, {}),
|
|
40023
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SelectPrimitives2.Viewport, {
|
|
39981
40024
|
className: "c-select-viewport",
|
|
39982
40025
|
children
|
|
39983
40026
|
}),
|
|
39984
|
-
/* @__PURE__ */ (0,
|
|
40027
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SelectPrimitives2.ScrollDownButton, {})
|
|
39985
40028
|
]
|
|
39986
40029
|
})
|
|
39987
40030
|
})
|
|
@@ -39999,22 +40042,22 @@ var Select = {
|
|
|
39999
40042
|
|
|
40000
40043
|
// src/slider/slider.tsx
|
|
40001
40044
|
var import_react115 = require("react");
|
|
40002
|
-
var
|
|
40045
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
40003
40046
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
|
|
40004
|
-
var
|
|
40047
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
40005
40048
|
var Slider = (0, import_react115.forwardRef)(({ className, transparentRange, ...delegated }, ref) => {
|
|
40006
|
-
return /* @__PURE__ */ (0,
|
|
40007
|
-
className: (0,
|
|
40049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(SliderPrimitive.Root, {
|
|
40050
|
+
className: (0, import_class_variance_authority20.cx)("c-slider-root", className),
|
|
40008
40051
|
ref,
|
|
40009
40052
|
...delegated,
|
|
40010
40053
|
children: [
|
|
40011
|
-
/* @__PURE__ */ (0,
|
|
40054
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SliderPrimitive.Track, {
|
|
40012
40055
|
className: "c-slider-track",
|
|
40013
|
-
children: /* @__PURE__ */ (0,
|
|
40056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SliderPrimitive.Range, {
|
|
40014
40057
|
className: `c-slider-range ${transparentRange ? "c-slider-range-transparent" : ""}`
|
|
40015
40058
|
})
|
|
40016
40059
|
}),
|
|
40017
|
-
/* @__PURE__ */ (0,
|
|
40060
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SliderPrimitive.Thumb, {
|
|
40018
40061
|
className: "c-slider-thumb"
|
|
40019
40062
|
})
|
|
40020
40063
|
]
|
|
@@ -40026,15 +40069,15 @@ init_spinner();
|
|
|
40026
40069
|
|
|
40027
40070
|
// src/stack-icon/stack-icon.tsx
|
|
40028
40071
|
init_iconography();
|
|
40029
|
-
var
|
|
40072
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
40030
40073
|
function StackIcon({ type, children, size = 18 }) {
|
|
40031
|
-
return /* @__PURE__ */ (0,
|
|
40074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("span", {
|
|
40032
40075
|
className: "c-stack-icon",
|
|
40033
40076
|
children: [
|
|
40034
|
-
type === "create" && /* @__PURE__ */ (0,
|
|
40077
|
+
type === "create" && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", {
|
|
40035
40078
|
style: { width: size, height: size },
|
|
40036
40079
|
className: "c-stack-icon__icon",
|
|
40037
|
-
children: /* @__PURE__ */ (0,
|
|
40080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon.Add, {
|
|
40038
40081
|
width: size - 4,
|
|
40039
40082
|
height: size - 4
|
|
40040
40083
|
})
|
|
@@ -40045,10 +40088,10 @@ function StackIcon({ type, children, size = 18 }) {
|
|
|
40045
40088
|
}
|
|
40046
40089
|
|
|
40047
40090
|
// src/tag/tag.tsx
|
|
40048
|
-
var
|
|
40091
|
+
var import_class_variance_authority21 = require("class-variance-authority");
|
|
40049
40092
|
init_iconography();
|
|
40050
|
-
var
|
|
40051
|
-
var tagStyles = (0,
|
|
40093
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
40094
|
+
var tagStyles = (0, import_class_variance_authority21.cva)("c-tag", {
|
|
40052
40095
|
variants: {
|
|
40053
40096
|
variant: {
|
|
40054
40097
|
default: "c-tag-default",
|
|
@@ -40077,28 +40120,28 @@ function Tag({
|
|
|
40077
40120
|
showRemoveOnHover,
|
|
40078
40121
|
...delegated
|
|
40079
40122
|
}) {
|
|
40080
|
-
return /* @__PURE__ */ (0,
|
|
40123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", {
|
|
40081
40124
|
className: tagStyles({ className, variant, size }),
|
|
40082
40125
|
...delegated,
|
|
40083
40126
|
children: [
|
|
40084
|
-
!prepend ? null : /* @__PURE__ */ (0,
|
|
40127
|
+
!prepend ? null : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", {
|
|
40085
40128
|
className: "c-tag__prepend",
|
|
40086
40129
|
children: prepend
|
|
40087
40130
|
}),
|
|
40088
40131
|
children,
|
|
40089
|
-
onRemove && /* @__PURE__ */ (0,
|
|
40132
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("button", {
|
|
40090
40133
|
type: "button",
|
|
40091
|
-
className: (0,
|
|
40134
|
+
className: (0, import_class_variance_authority21.cx)("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
|
|
40092
40135
|
onClick: (e) => {
|
|
40093
40136
|
e.stopPropagation();
|
|
40094
40137
|
onRemove();
|
|
40095
40138
|
},
|
|
40096
40139
|
children: [
|
|
40097
|
-
/* @__PURE__ */ (0,
|
|
40140
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon.Cancel, {
|
|
40098
40141
|
width: 12,
|
|
40099
40142
|
height: 12
|
|
40100
40143
|
}),
|
|
40101
|
-
/* @__PURE__ */ (0,
|
|
40144
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", {
|
|
40102
40145
|
className: "c-tag__remove-button-text",
|
|
40103
40146
|
children: "Remove"
|
|
40104
40147
|
})
|
|
@@ -40110,12 +40153,12 @@ function Tag({
|
|
|
40110
40153
|
|
|
40111
40154
|
// src/rich-text-editor/index.tsx
|
|
40112
40155
|
var import_react132 = require("react");
|
|
40113
|
-
var
|
|
40156
|
+
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
40114
40157
|
var LazyRichTextEditor = (0, import_react132.lazy)(() => Promise.resolve().then(() => (init_rich_text_editor(), rich_text_editor_exports)));
|
|
40115
40158
|
var RichTextEditor2 = (props) => {
|
|
40116
|
-
return /* @__PURE__ */ (0,
|
|
40159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_react132.Suspense, {
|
|
40117
40160
|
fallback: null,
|
|
40118
|
-
children: /* @__PURE__ */ (0,
|
|
40161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(LazyRichTextEditor, {
|
|
40119
40162
|
...props
|
|
40120
40163
|
})
|
|
40121
40164
|
});
|
|
@@ -40125,12 +40168,12 @@ var RichTextEditor2 = (props) => {
|
|
|
40125
40168
|
var import_sonner2 = require("sonner");
|
|
40126
40169
|
|
|
40127
40170
|
// src/toast/toast.tsx
|
|
40128
|
-
var
|
|
40171
|
+
var import_class_variance_authority22 = require("class-variance-authority");
|
|
40129
40172
|
var import_sonner = require("sonner");
|
|
40130
40173
|
init_icon_button2();
|
|
40131
40174
|
init_iconography();
|
|
40132
|
-
var
|
|
40133
|
-
var toastStyles = (0,
|
|
40175
|
+
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
40176
|
+
var toastStyles = (0, import_class_variance_authority22.cva)("c-toast", {
|
|
40134
40177
|
variants: {
|
|
40135
40178
|
type: {
|
|
40136
40179
|
info: "c-toast-info",
|
|
@@ -40154,34 +40197,34 @@ var toast = ({ title, message, type = "success", timeout = 6e3 }) => {
|
|
|
40154
40197
|
const withMessage = !!message;
|
|
40155
40198
|
const toastId = Date.now().toString();
|
|
40156
40199
|
import_sonner.toast.custom(
|
|
40157
|
-
(id) => /* @__PURE__ */ (0,
|
|
40200
|
+
(id) => /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", {
|
|
40158
40201
|
"data-testid": `toast-${type}`,
|
|
40159
|
-
className: (0,
|
|
40202
|
+
className: (0, import_class_variance_authority22.cx)(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
|
|
40160
40203
|
children: [
|
|
40161
|
-
/* @__PURE__ */ (0,
|
|
40162
|
-
children: /* @__PURE__ */ (0,
|
|
40204
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", {
|
|
40205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(ToastIcon, {
|
|
40163
40206
|
width: 26,
|
|
40164
40207
|
height: 26
|
|
40165
40208
|
})
|
|
40166
40209
|
}),
|
|
40167
|
-
/* @__PURE__ */ (0,
|
|
40210
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", {
|
|
40168
40211
|
children: [
|
|
40169
|
-
/* @__PURE__ */ (0,
|
|
40212
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", {
|
|
40170
40213
|
className: "c-toast-title",
|
|
40171
40214
|
children: title
|
|
40172
40215
|
}),
|
|
40173
|
-
!!message && /* @__PURE__ */ (0,
|
|
40216
|
+
!!message && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", {
|
|
40174
40217
|
className: "c-toast-message",
|
|
40175
40218
|
children: message
|
|
40176
40219
|
})
|
|
40177
40220
|
]
|
|
40178
40221
|
}),
|
|
40179
|
-
/* @__PURE__ */ (0,
|
|
40222
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", {
|
|
40180
40223
|
className: "c-toast-close",
|
|
40181
|
-
children: /* @__PURE__ */ (0,
|
|
40224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
|
|
40182
40225
|
onClick: () => import_sonner.toast.dismiss(id),
|
|
40183
40226
|
size: "xs",
|
|
40184
|
-
children: /* @__PURE__ */ (0,
|
|
40227
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Icon.Cancel, {
|
|
40185
40228
|
width: 12,
|
|
40186
40229
|
height: 12
|
|
40187
40230
|
})
|
|
@@ -40203,10 +40246,10 @@ toast.dismiss = import_sonner.toast.dismiss;
|
|
|
40203
40246
|
init_tooltip2();
|
|
40204
40247
|
|
|
40205
40248
|
// src/switch/switch.tsx
|
|
40206
|
-
var
|
|
40249
|
+
var import_class_variance_authority23 = require("class-variance-authority");
|
|
40207
40250
|
var RadixSwitch = __toESM(require("@radix-ui/react-switch"));
|
|
40208
|
-
var
|
|
40209
|
-
var switchStyles = (0,
|
|
40251
|
+
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
40252
|
+
var switchStyles = (0, import_class_variance_authority23.cva)(["c-switch-root"], {
|
|
40210
40253
|
variants: {
|
|
40211
40254
|
size: {
|
|
40212
40255
|
xs: "c-switch-root-xs",
|
|
@@ -40218,10 +40261,10 @@ var switchStyles = (0, import_class_variance_authority21.cva)(["c-switch-root"],
|
|
|
40218
40261
|
}
|
|
40219
40262
|
});
|
|
40220
40263
|
function Switch2({ size, ...props }) {
|
|
40221
|
-
return /* @__PURE__ */ (0,
|
|
40264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(RadixSwitch.Root, {
|
|
40222
40265
|
...props,
|
|
40223
40266
|
className: switchStyles({ size }),
|
|
40224
|
-
children: /* @__PURE__ */ (0,
|
|
40267
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(RadixSwitch.Thumb, {
|
|
40225
40268
|
className: "c-switch-thumb"
|
|
40226
40269
|
})
|
|
40227
40270
|
});
|
|
@@ -40240,6 +40283,8 @@ var tokens = {
|
|
|
40240
40283
|
Button,
|
|
40241
40284
|
Card,
|
|
40242
40285
|
Checkbox,
|
|
40286
|
+
Collapsible,
|
|
40287
|
+
CollapsibleTrigger,
|
|
40243
40288
|
Dialog,
|
|
40244
40289
|
DropdownMenu,
|
|
40245
40290
|
Icon,
|