@appquality/unguess-design-system 3.1.64 → 3.1.66
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 +30 -0
- package/build/index.js +621 -287
- package/build/stories/avatar/_types.d.ts +1 -1
- package/build/stories/avatar/index.d.ts +1 -1
- package/build/stories/avatar/index.stories.d.ts +1 -0
- package/build/stories/buttons/button/index.stories.d.ts +1 -0
- package/build/stories/buttons/utils.d.ts +27 -27
- package/build/stories/chat/_types.d.ts +13 -1
- package/build/stories/chat/context/chatContext.d.ts +9 -6
- package/build/stories/chat/index.d.ts +2 -1
- package/build/stories/chat/index.stories.d.ts +6 -3
- package/build/stories/chat/parts/bar.d.ts +6 -0
- package/build/stories/chat/parts/comment.d.ts +1 -1
- package/build/stories/chat/parts/containers.d.ts +35 -23
- package/build/stories/chat/parts/editorButton.d.ts +5 -0
- package/build/stories/chat/parts/extensions.d.ts +8 -0
- package/build/stories/chat/parts/footer.d.ts +2 -1
- package/build/stories/chat/parts/mention.d.ts +1 -0
- package/build/stories/chat/parts/mentionList.d.ts +9 -0
- package/build/stories/chat/parts/sendShortcut.d.ts +3 -0
- package/build/stories/dropdowns/select/index.stories.d.ts +1 -0
- package/build/stories/editor/index.stories.d.ts +1 -0
- package/build/stories/shared/editorStyle.d.ts +1 -0
- package/package.json +12 -9
package/build/index.js
CHANGED
|
@@ -24,13 +24,17 @@ var pie = require('@nivo/pie');
|
|
|
24
24
|
var sunburst = require('@nivo/sunburst');
|
|
25
25
|
var waffle = require('@nivo/waffle');
|
|
26
26
|
var line = require('@nivo/line');
|
|
27
|
+
var reactForms = require('@zendeskgarden/react-forms');
|
|
27
28
|
var react = require('@tiptap/react');
|
|
29
|
+
var reactTooltips = require('@zendeskgarden/react-tooltips');
|
|
28
30
|
var Typography = require('@tiptap/extension-typography');
|
|
29
31
|
var Link = require('@tiptap/extension-link');
|
|
30
32
|
var StarterKit = require('@tiptap/starter-kit');
|
|
31
33
|
var Placeholder = require('@tiptap/extension-placeholder');
|
|
32
34
|
var CharacterCount = require('@tiptap/extension-character-count');
|
|
33
|
-
var
|
|
35
|
+
var core = require('@tiptap/core');
|
|
36
|
+
var Mention = require('@tiptap/extension-mention');
|
|
37
|
+
var tippy = require('tippy.js');
|
|
34
38
|
var containerUtilities = require('@zendeskgarden/container-utilities');
|
|
35
39
|
var reactColorpickers = require('@zendeskgarden/react-colorpickers');
|
|
36
40
|
var reactModals = require('@zendeskgarden/react-modals');
|
|
@@ -42,7 +46,6 @@ var reactPagination = require('@zendeskgarden/react-pagination');
|
|
|
42
46
|
var Video = require('@appquality/stream-player');
|
|
43
47
|
var SlickSlider = require('react-slick');
|
|
44
48
|
var reactTables = require('@zendeskgarden/react-tables');
|
|
45
|
-
var reactTooltips = require('@zendeskgarden/react-tooltips');
|
|
46
49
|
|
|
47
50
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
48
51
|
|
|
@@ -73,6 +76,8 @@ var Link__default = /*#__PURE__*/_interopDefaultLegacy(Link);
|
|
|
73
76
|
var StarterKit__default = /*#__PURE__*/_interopDefaultLegacy(StarterKit);
|
|
74
77
|
var Placeholder__default = /*#__PURE__*/_interopDefaultLegacy(Placeholder);
|
|
75
78
|
var CharacterCount__default = /*#__PURE__*/_interopDefaultLegacy(CharacterCount);
|
|
79
|
+
var Mention__default = /*#__PURE__*/_interopDefaultLegacy(Mention);
|
|
80
|
+
var tippy__default = /*#__PURE__*/_interopDefaultLegacy(tippy);
|
|
76
81
|
var Video__default = /*#__PURE__*/_interopDefaultLegacy(Video);
|
|
77
82
|
var SlickSlider__default = /*#__PURE__*/_interopDefaultLegacy(SlickSlider);
|
|
78
83
|
|
|
@@ -630,12 +635,21 @@ const Alert = (props) => jsxRuntime.jsx(UgAlert, Object.assign({}, props));
|
|
|
630
635
|
Alert.Title = UgAlertTitle;
|
|
631
636
|
Alert.Close = reactNotifications.Close;
|
|
632
637
|
|
|
638
|
+
var img$2 = "data:image/svg+xml,%3csvg width='26' height='26' viewBox='0 0 26 26' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M17.2597 12.9199V14.767H17.2367C17.075 17.4452 15.5974 18.969 13.127 18.969C10.4949 18.969 8.92496 17.4452 8.76335 14.767H8.74026V12.9199H5V14.767V14.7901C5.20779 19.4538 8.34777 22.4322 13.1039 22.4322C17.8139 22.4322 20.7922 19.5231 21 14.7901V12.9199H17.2597Z' fill='%23003A57'/%3e%3cpath d='M8.78629 3.5H5.02295V7.26335H8.78629V3.5Z' fill='%2370C38A'/%3e%3cpath d='M20.9768 3.5H17.1672V7.30952H20.9768V3.5Z' fill='%23003A57'/%3e%3c/svg%3e";
|
|
639
|
+
|
|
633
640
|
const UgAvatar = styled__default["default"](reactAvatars.Avatar) `
|
|
634
641
|
text-transform: uppercase;
|
|
635
642
|
|
|
636
643
|
${(props) => props.avatarType &&
|
|
637
644
|
props.avatarType !== "image" &&
|
|
638
645
|
`background: ${props.backgroundColor || theme.gradients.dark};`}
|
|
646
|
+
|
|
647
|
+
${(props) => props.avatarType &&
|
|
648
|
+
props.avatarType === "system" &&
|
|
649
|
+
`
|
|
650
|
+
box-shadow: 0 0 0 2px ${getColor(theme.colors.primaryHue, 600)};
|
|
651
|
+
background: ${props.backgroundColor || theme.palette.white};
|
|
652
|
+
`}
|
|
639
653
|
`;
|
|
640
654
|
/**
|
|
641
655
|
* An Avatar is a visual way to represent a person or brand in the product. They can display text, icons, or images.
|
|
@@ -643,8 +657,9 @@ const UgAvatar = styled__default["default"](reactAvatars.Avatar) `
|
|
|
643
657
|
* Used for this:
|
|
644
658
|
- To visually represent a person, brand, or product
|
|
645
659
|
*/
|
|
646
|
-
const Avatar = (
|
|
647
|
-
|
|
660
|
+
const Avatar = (_a) => {
|
|
661
|
+
var { isSystem, badge } = _a, props = __rest(_a, ["isSystem", "badge"]);
|
|
662
|
+
const fixedBadge = badge && Number(badge) > 9 ? "9+" : badge;
|
|
648
663
|
const wrapChildren = (type) => {
|
|
649
664
|
if (type === "icon")
|
|
650
665
|
return props.children;
|
|
@@ -652,8 +667,10 @@ const Avatar = (props) => {
|
|
|
652
667
|
return jsxRuntime.jsx("img", { alt: "avatar", src: props.children });
|
|
653
668
|
if (type === "text")
|
|
654
669
|
return jsxRuntime.jsx(Avatar.Text, { children: props.children });
|
|
670
|
+
if (type === "system")
|
|
671
|
+
return jsxRuntime.jsx("img", { alt: "avatar", src: img$2 });
|
|
655
672
|
};
|
|
656
|
-
return (jsxRuntime.jsx(UgAvatar, Object.assign({}, props, { badge: fixedBadge, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
|
|
673
|
+
return (jsxRuntime.jsx(UgAvatar, Object.assign({}, props, { badge: fixedBadge, isSystem: props.avatarType === "system" || isSystem, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
|
|
657
674
|
};
|
|
658
675
|
Avatar.Text = UgAvatar.Text;
|
|
659
676
|
|
|
@@ -820,48 +837,48 @@ Tag.Avatar = StyledAvatar;
|
|
|
820
837
|
Tag.Close = StyledClose;
|
|
821
838
|
Tag.SecondaryText = StyledSpan;
|
|
822
839
|
|
|
823
|
-
var _path$
|
|
824
|
-
function _extends$
|
|
825
|
-
const SvgUgSquare = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
840
|
+
var _path$y;
|
|
841
|
+
function _extends$K() { _extends$K = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$K.apply(this, arguments); }
|
|
842
|
+
const SvgUgSquare = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$K({
|
|
826
843
|
width: 24,
|
|
827
844
|
height: 24,
|
|
828
845
|
viewBox: "0 0 24 24",
|
|
829
846
|
fill: "none",
|
|
830
847
|
xmlns: "http://www.w3.org/2000/svg"
|
|
831
|
-
}, props), _path$
|
|
848
|
+
}, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
832
849
|
d: "M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19Z",
|
|
833
850
|
fill: "#E80C7A"
|
|
834
851
|
})));
|
|
835
852
|
|
|
836
|
-
var _path$
|
|
837
|
-
function _extends$
|
|
838
|
-
const SvgUgCircle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
853
|
+
var _path$x;
|
|
854
|
+
function _extends$J() { _extends$J = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$J.apply(this, arguments); }
|
|
855
|
+
const SvgUgCircle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$J({
|
|
839
856
|
width: 24,
|
|
840
857
|
height: 24,
|
|
841
858
|
viewBox: "0 0 24 24",
|
|
842
859
|
fill: "none",
|
|
843
860
|
xmlns: "http://www.w3.org/2000/svg"
|
|
844
|
-
}, props), _path$
|
|
861
|
+
}, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
|
|
845
862
|
d: "M12 2C6.47 2 2 6.47 2 12C2 17.53 6.47 22 12 22C17.53 22 22 17.53 22 12C22 6.47 17.53 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z",
|
|
846
863
|
fill: "#FFCD1A"
|
|
847
864
|
})));
|
|
848
865
|
|
|
849
|
-
var _path$
|
|
850
|
-
function _extends$
|
|
851
|
-
const SvgUgTriangle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
866
|
+
var _path$w;
|
|
867
|
+
function _extends$I() { _extends$I = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$I.apply(this, arguments); }
|
|
868
|
+
const SvgUgTriangle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$I({
|
|
852
869
|
width: 24,
|
|
853
870
|
height: 24,
|
|
854
871
|
viewBox: "0 0 24 24",
|
|
855
872
|
fill: "none",
|
|
856
873
|
xmlns: "http://www.w3.org/2000/svg"
|
|
857
|
-
}, props), _path$
|
|
874
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
858
875
|
d: "M11.9993 7.32625L18.3893 17.5563H5.60929L11.9993 7.32625ZM11.1493 4.91625L2.94929 18.0262C2.53929 18.6962 3.01929 19.5563 3.79929 19.5563H20.1993C20.9893 19.5563 21.4593 18.6962 21.0493 18.0262L12.8493 4.91625C12.4593 4.28625 11.5393 4.28625 11.1493 4.91625Z",
|
|
859
876
|
fill: "#7B0DFF"
|
|
860
877
|
})));
|
|
861
878
|
|
|
862
|
-
var _rect$4, _path$
|
|
863
|
-
function _extends$
|
|
864
|
-
const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
879
|
+
var _rect$4, _path$v, _path2$b, _path3$4;
|
|
880
|
+
function _extends$H() { _extends$H = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$H.apply(this, arguments); }
|
|
881
|
+
const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$H({
|
|
865
882
|
width: 24,
|
|
866
883
|
height: 24,
|
|
867
884
|
viewBox: "0 0 24 24",
|
|
@@ -872,7 +889,7 @@ const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElemen
|
|
|
872
889
|
height: 24,
|
|
873
890
|
rx: 12,
|
|
874
891
|
fill: "#F6F6F8"
|
|
875
|
-
})), _path$
|
|
892
|
+
})), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
876
893
|
d: "M20.6953 5.73905C21.0148 5.41953 21.0148 4.90149 20.6953 4.58197C20.3758 4.26245 19.8577 4.26245 19.5382 4.58197L11.88 12.2402L10.0849 9.95981C9.80539 9.60476 9.29098 9.54352 8.93593 9.82303C8.58088 10.1025 8.51963 10.6169 8.79914 10.972L11.1642 13.9763C11.3089 14.16 11.5252 14.2731 11.7586 14.2869C11.9921 14.3008 12.2203 14.2141 12.3856 14.0487L20.6953 5.73905Z",
|
|
877
894
|
fill: "#50BF95"
|
|
878
895
|
})), _path2$b || (_path2$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -883,9 +900,9 @@ const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElemen
|
|
|
883
900
|
fill: "#007345"
|
|
884
901
|
})));
|
|
885
902
|
|
|
886
|
-
var _rect$3, _path$
|
|
887
|
-
function _extends$
|
|
888
|
-
const SvgCampaignLocked = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
903
|
+
var _rect$3, _path$u, _path2$a;
|
|
904
|
+
function _extends$G() { _extends$G = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$G.apply(this, arguments); }
|
|
905
|
+
const SvgCampaignLocked = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$G({
|
|
889
906
|
width: 24,
|
|
890
907
|
height: 24,
|
|
891
908
|
viewBox: "0 0 24 24",
|
|
@@ -896,7 +913,7 @@ const SvgCampaignLocked = props => /*#__PURE__*/React__namespace.createElement("
|
|
|
896
913
|
height: 24,
|
|
897
914
|
rx: 12,
|
|
898
915
|
fill: "#F6F6F8"
|
|
899
|
-
})), _path$
|
|
916
|
+
})), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
900
917
|
fillRule: "evenodd",
|
|
901
918
|
clipRule: "evenodd",
|
|
902
919
|
d: "M13.55 19.0875C14.25 19.7875 15.1063 20.1375 16.1188 20.1375C17.1313 20.1375 17.9875 19.7875 18.6875 19.0875C19.3875 18.3875 19.7375 17.5312 19.7375 16.5187C19.7375 15.5062 19.3875 14.65 18.6875 13.95C17.9875 13.25 17.1313 12.9 16.1188 12.9C15.1063 12.9 14.25 13.25 13.55 13.95C12.85 14.65 12.5 15.5062 12.5 16.5187C12.5 17.5312 12.85 18.3875 13.55 19.0875ZM17.5062 18.2812C17.4187 18.2812 17.3375 18.25 17.2625 18.1875L15.7438 16.7812C15.6813 16.6687 15.65 16.6 15.65 16.575V14.55C15.65 14.4375 15.6875 14.3437 15.7625 14.2687C15.8375 14.1937 15.9313 14.1562 16.0438 14.1562C16.1563 14.1562 16.25 14.1937 16.325 14.2687C16.4 14.3437 16.4375 14.4375 16.4375 14.55V16.4813L17.7313 17.6625C17.8063 17.725 17.8469 17.8062 17.8531 17.9062C17.8594 18.0063 17.825 18.0938 17.75 18.1688C17.675 18.2438 17.5937 18.2812 17.5062 18.2812Z",
|
|
@@ -908,9 +925,9 @@ const SvgCampaignLocked = props => /*#__PURE__*/React__namespace.createElement("
|
|
|
908
925
|
fill: "#F4AC1A"
|
|
909
926
|
})));
|
|
910
927
|
|
|
911
|
-
var _rect$2, _path$
|
|
912
|
-
function _extends$
|
|
913
|
-
const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
928
|
+
var _rect$2, _path$t, _path2$9;
|
|
929
|
+
function _extends$F() { _extends$F = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$F.apply(this, arguments); }
|
|
930
|
+
const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$F({
|
|
914
931
|
width: 24,
|
|
915
932
|
height: 24,
|
|
916
933
|
viewBox: "0 0 24 24",
|
|
@@ -921,7 +938,7 @@ const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement
|
|
|
921
938
|
height: 24,
|
|
922
939
|
rx: 12,
|
|
923
940
|
fill: "#F6F6F8"
|
|
924
|
-
})), _path$
|
|
941
|
+
})), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
925
942
|
d: "M11.2266 13.0313H14.997M11.2266 9.26075V13.0313V9.26075ZM11.2266 13.0313L20.121 5.03906L11.2266 13.0313Z",
|
|
926
943
|
stroke: "#024780",
|
|
927
944
|
strokeWidth: 1.5,
|
|
@@ -935,9 +952,9 @@ const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement
|
|
|
935
952
|
strokeLinejoin: "round"
|
|
936
953
|
})));
|
|
937
954
|
|
|
938
|
-
var _rect$1, _path$
|
|
939
|
-
function _extends$
|
|
940
|
-
const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
955
|
+
var _rect$1, _path$s, _path2$8, _path3$3, _path4$1, _path5$1, _path6$1, _path7$1, _path8$1, _path9$1, _path10$1;
|
|
956
|
+
function _extends$E() { _extends$E = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$E.apply(this, arguments); }
|
|
957
|
+
const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$E({
|
|
941
958
|
width: 24,
|
|
942
959
|
height: 24,
|
|
943
960
|
viewBox: "0 0 24 24",
|
|
@@ -948,7 +965,7 @@ const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement
|
|
|
948
965
|
height: 24,
|
|
949
966
|
rx: 12,
|
|
950
967
|
fill: "#F6F6F8"
|
|
951
|
-
})), _path$
|
|
968
|
+
})), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
952
969
|
d: "M13.059 16.7647C13.059 16.1799 12.585 15.7059 12.0002 15.7059C11.4154 15.7059 10.9414 16.1799 10.9414 16.7647V19.9412C10.9414 20.5259 11.4154 21 12.0002 21C12.585 21 13.059 20.5259 13.059 19.9412V16.7647Z",
|
|
953
970
|
fill: "#D1820A"
|
|
954
971
|
})), _path2$8 || (_path2$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -980,9 +997,9 @@ const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement
|
|
|
980
997
|
fill: "#FFB65A"
|
|
981
998
|
})));
|
|
982
999
|
|
|
983
|
-
var _g$b, _path$
|
|
984
|
-
function _extends$
|
|
985
|
-
const SvgCampaignExperiential = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1000
|
+
var _g$b, _path$r, _path2$7, _path3$2, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11;
|
|
1001
|
+
function _extends$D() { _extends$D = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$D.apply(this, arguments); }
|
|
1002
|
+
const SvgCampaignExperiential = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$D({
|
|
986
1003
|
width: 24,
|
|
987
1004
|
height: 24,
|
|
988
1005
|
viewBox: "0 0 24 24",
|
|
@@ -994,7 +1011,7 @@ const SvgCampaignExperiential = props => /*#__PURE__*/React__namespace.createEle
|
|
|
994
1011
|
opacity: 0.3,
|
|
995
1012
|
d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",
|
|
996
1013
|
fill: "#50BF95"
|
|
997
|
-
}))), _path$
|
|
1014
|
+
}))), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
998
1015
|
d: "M12.487 3.19652C8.68003 3.19652 5.59895 6.27761 5.59895 10.0846C5.59895 10.2597 5.59895 10.4348 5.62438 10.5855C5.29857 11.1863 4.82307 12.013 4.24678 12.514C3.82117 12.8897 3.92096 13.2908 3.97085 13.4405C4.09609 13.7663 4.44635 14.0413 5.02265 14.2418C5.22322 14.3172 5.44825 14.3671 5.64883 14.417L5.67427 16.8464C5.67427 17.7984 6.47559 18.6251 7.45304 18.6251L8.93044 18.1496L9.08111 19.0263C9.18091 19.6026 9.68185 20.0282 10.2836 20.0282C10.3589 20.0282 10.4343 20.0282 10.5086 20.0028L15.1424 19.177C15.8185 19.0517 16.2441 18.4256 16.1443 17.7495L15.8185 16.1214C17.9974 14.9189 19.375 12.5892 19.375 10.0845C19.375 6.30279 16.2696 3.19641 12.4869 3.19641L12.487 3.19652Z",
|
|
999
1016
|
fill: "#2B8473",
|
|
1000
1017
|
stroke: "#2B8473"
|
|
@@ -1050,9 +1067,9 @@ const SvgCampaignExperiential = props => /*#__PURE__*/React__namespace.createEle
|
|
|
1050
1067
|
fill: "#ECF4F2"
|
|
1051
1068
|
})));
|
|
1052
1069
|
|
|
1053
|
-
var _g$a, _path$
|
|
1054
|
-
function _extends$
|
|
1055
|
-
const SvgCampaignFunctional = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1070
|
+
var _g$a, _path$q;
|
|
1071
|
+
function _extends$C() { _extends$C = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$C.apply(this, arguments); }
|
|
1072
|
+
const SvgCampaignFunctional = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$C({
|
|
1056
1073
|
width: 24,
|
|
1057
1074
|
height: 24,
|
|
1058
1075
|
viewBox: "0 0 24 24",
|
|
@@ -1064,7 +1081,7 @@ const SvgCampaignFunctional = props => /*#__PURE__*/React__namespace.createEleme
|
|
|
1064
1081
|
opacity: 0.3,
|
|
1065
1082
|
d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",
|
|
1066
1083
|
fill: "#003A57"
|
|
1067
|
-
}))), _path$
|
|
1084
|
+
}))), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1068
1085
|
d: "M17.9983 7.16705C17.5188 6.58566 17.1422 6.73039 17.1422 6.73039C17.1422 6.73039 16.406 7.02453 16.0401 7.16303C15.6742 7.30153 15.2408 7.17357 15.2408 7.17357L14.7579 6.8851C14.7579 6.8851 14.4296 6.56554 14.3656 6.18067C14.3123 5.78958 14.1888 5.00269 14.1888 5.00269C14.1888 5.00269 14.1356 4.61159 13.3938 4.47257C12.652 4.33356 12.4678 4.68715 12.4678 4.68715C12.4678 4.68715 12.0932 5.38344 11.9091 5.73703C11.7249 6.09062 11.3114 6.27118 11.3114 6.27118L10.7639 6.36908C10.7639 6.36908 10.3144 6.33771 10.0176 6.07271L9.12712 5.27769C9.12712 5.27769 8.8303 5.01268 8.18313 5.38632C7.53595 5.75997 7.61705 6.14953 7.61705 6.14953L7.86033 7.3182C7.94143 7.70776 7.74381 8.11275 7.74381 8.11275L7.38528 8.53794C7.38528 8.53794 7.02217 8.80577 6.62387 8.78845C6.22557 8.77114 5.43527 8.7474 5.43527 8.7474C5.43527 8.7474 5.03697 8.73009 4.78646 9.44201C4.53595 10.1539 4.84804 10.3956 4.84804 10.3956C4.84804 10.3956 5.46774 10.896 5.77983 11.1376C6.09192 11.3793 6.19373 11.8296 6.19373 11.8296L6.20207 12.3921C6.20207 12.3921 6.09618 12.8314 5.79331 13.079C5.49043 13.3266 4.86759 13.8171 4.86759 13.8171C4.86759 13.8171 4.56471 14.0647 4.81769 14.7769C5.08144 15.4828 5.46713 15.4783 5.46713 15.4783C5.46713 15.4783 6.26012 15.4569 6.64582 15.4524C7.03152 15.4479 7.40116 15.7145 7.40116 15.7145L7.76458 16.1447C7.76458 16.1447 7.96976 16.5499 7.89441 16.9425C7.81907 17.3351 7.66208 18.1094 7.66208 18.1094C7.66208 18.1094 7.58674 18.502 8.23785 18.8824C8.88895 19.2629 9.18553 19.0044 9.18553 19.0044C9.18553 19.0044 9.7724 18.4765 10.069 18.218C10.3655 17.9595 10.8115 17.9347 10.8115 17.9347L11.3609 18.0394C11.3609 18.0394 11.77 18.225 11.9608 18.5803C12.1516 18.9356 12.5268 19.6354 12.5268 19.6354C12.5268 19.6354 12.7176 19.9907 13.4583 19.8539C14.1946 19.7343 14.2529 19.337 14.2529 19.337C14.2529 19.337 14.3586 18.5487 14.4232 18.1623C14.4814 17.765 14.8086 17.4598 14.8086 17.4598L15.2939 17.1796C15.2939 17.1796 15.7281 17.0598 16.095 17.1971C16.4682 17.3453 17.1975 17.637 17.1975 17.637C17.1975 17.637 17.5707 17.7851 18.0424 17.2073C18.5142 16.6295 18.3189 16.2913 18.3189 16.2913C18.3189 16.2913 17.9006 15.6164 17.6882 15.2736C17.4759 14.9307 17.5197 14.4836 17.5197 14.4836L17.7038 13.9555C17.7038 13.9555 17.9482 13.5816 18.3203 13.454C18.6925 13.3264 19.4431 13.0822 19.4431 13.0822C19.4431 13.0822 19.8153 12.9546 19.8113 12.2005C19.8074 11.4464 19.4297 11.3153 19.4297 11.3153C19.4297 11.3153 18.6807 11.0641 18.303 10.9331C17.9253 10.802 17.677 10.4217 17.677 10.4217L17.4861 9.8919C17.4861 9.8919 17.4293 9.4447 17.6368 9.1067C17.8443 8.7687 18.2486 8.09891 18.2486 8.09891C18.2486 8.09891 18.4778 7.74844 17.9983 7.16707L17.9983 7.16705ZM9.33902 8.38466L10.6176 10.5992C10.0433 11.149 9.82793 11.9715 10.0567 12.7413L7.86713 14.0054C6.98868 12.0106 7.60355 9.66286 9.33905 8.38457L9.33902 8.38466ZM13.9748 16.414C11.9998 17.2778 9.65918 16.6363 8.37099 14.8783L10.5605 13.6141C11.1128 14.1971 11.9329 14.4219 12.6961 14.1994L13.9748 16.414ZM12.6552 13.132C12.1159 13.4434 11.4325 13.2561 11.1176 12.7107C10.8027 12.1652 10.9822 11.4797 11.5215 11.1684C12.0608 10.857 12.7441 11.0443 13.0591 11.5897C13.374 12.1352 13.1945 12.8207 12.6552 13.132ZM14.8376 15.9158L13.5591 13.7012C14.1333 13.1515 14.3487 12.3289 14.12 11.5591L16.3095 10.295C17.188 12.2898 16.5731 14.6376 14.8376 15.9159L14.8376 15.9158ZM13.6161 10.6863C13.0638 10.1034 12.2437 9.87862 11.4805 10.1011L10.2019 7.88652C12.1769 7.02266 14.5112 7.65314 15.8057 9.42223L13.6161 10.6863Z",
|
|
1069
1086
|
fill: "#003A57"
|
|
1070
1087
|
})));
|
|
@@ -1376,7 +1393,7 @@ const HoverBody = styled__default["default"].div `
|
|
|
1376
1393
|
justify-content: space-between;
|
|
1377
1394
|
`;
|
|
1378
1395
|
const HoverMetaContainer = styled__default["default"].div ``;
|
|
1379
|
-
const StyledCard$
|
|
1396
|
+
const StyledCard$2 = styled__default["default"](SpecialCard) `
|
|
1380
1397
|
overflow: hidden;
|
|
1381
1398
|
${({ isHoverable }) => isHoverable &&
|
|
1382
1399
|
`
|
|
@@ -1395,7 +1412,7 @@ const StyledCard$1 = styled__default["default"](SpecialCard) `
|
|
|
1395
1412
|
`;
|
|
1396
1413
|
const ServiceCard = (props) => {
|
|
1397
1414
|
const { serviceIcon, serviceTitle, serviceSubtitle } = props;
|
|
1398
|
-
return (jsxRuntime.jsxs(StyledCard$
|
|
1415
|
+
return (jsxRuntime.jsxs(StyledCard$2, Object.assign({}, props, { children: [props.isHoverable && (jsxRuntime.jsxs(HoverBody, { children: [jsxRuntime.jsxs(HoverMetaContainer, { children: [props.hoverTitle && (jsxRuntime.jsx(ServiceTitle, { children: props.hoverTitle })), props.hoverSubtitle && (jsxRuntime.jsx(ServiceSubtitle, { children: props.hoverSubtitle }))] }), props.hoverButtons && (jsxRuntime.jsx(ButtonsWrap$1, { children: props.hoverButtons.map((button) => button) }))] })), jsxRuntime.jsxs(CardContent, { children: [jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [serviceIcon && jsxRuntime.jsx(SpecialCard.Thumb, { children: serviceIcon }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: serviceSubtitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: serviceTitle })] })] }), props.tags && (jsxRuntime.jsx(SpecialCard.Footer, Object.assign({ justifyContent: "start", wrap: true }, { children: props.tags.map((tag, index) => (jsxRuntime.jsxs(StyledTag$1, Object.assign({ size: "large" }, { children: [jsxRuntime.jsx(StyledTag$1.Avatar, { children: tag.icon }), tag.label] }), index))) })))] })] })));
|
|
1399
1416
|
};
|
|
1400
1417
|
|
|
1401
1418
|
const ButtonsWrap = styled__default["default"].div `
|
|
@@ -1926,8 +1943,8 @@ const WaffleChart = ({ height, width, data, total, tooltip, }) => {
|
|
|
1926
1943
|
};
|
|
1927
1944
|
|
|
1928
1945
|
var _g$9, _defs$4;
|
|
1929
|
-
function _extends$
|
|
1930
|
-
const SvgSentiment1 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1946
|
+
function _extends$B() { _extends$B = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$B.apply(this, arguments); }
|
|
1947
|
+
const SvgSentiment1 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
|
|
1931
1948
|
width: 27,
|
|
1932
1949
|
height: 26,
|
|
1933
1950
|
viewBox: "0 0 27 26",
|
|
@@ -1950,8 +1967,8 @@ const SvgSentiment1 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
1950
1967
|
})))));
|
|
1951
1968
|
|
|
1952
1969
|
var _g$8, _defs$3;
|
|
1953
|
-
function _extends$
|
|
1954
|
-
const SvgSentiment2 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1970
|
+
function _extends$A() { _extends$A = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$A.apply(this, arguments); }
|
|
1971
|
+
const SvgSentiment2 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
1955
1972
|
width: 27,
|
|
1956
1973
|
height: 26,
|
|
1957
1974
|
viewBox: "0 0 27 26",
|
|
@@ -1974,8 +1991,8 @@ const SvgSentiment2 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
1974
1991
|
})))));
|
|
1975
1992
|
|
|
1976
1993
|
var _g$7, _defs$2;
|
|
1977
|
-
function _extends$
|
|
1978
|
-
const SvgSentiment3 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1994
|
+
function _extends$z() { _extends$z = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
|
|
1995
|
+
const SvgSentiment3 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
1979
1996
|
width: 27,
|
|
1980
1997
|
height: 26,
|
|
1981
1998
|
viewBox: "0 0 27 26",
|
|
@@ -2004,8 +2021,8 @@ const SvgSentiment3 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
2004
2021
|
})))));
|
|
2005
2022
|
|
|
2006
2023
|
var _g$6, _defs$1;
|
|
2007
|
-
function _extends$
|
|
2008
|
-
const SvgSentiment4 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2024
|
+
function _extends$y() { _extends$y = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
|
|
2025
|
+
const SvgSentiment4 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
2009
2026
|
width: 27,
|
|
2010
2027
|
height: 26,
|
|
2011
2028
|
viewBox: "0 0 27 26",
|
|
@@ -2034,8 +2051,8 @@ const SvgSentiment4 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
2034
2051
|
})))));
|
|
2035
2052
|
|
|
2036
2053
|
var _g$5, _defs;
|
|
2037
|
-
function _extends$
|
|
2038
|
-
const SvgSentiment5 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2054
|
+
function _extends$x() { _extends$x = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
|
|
2055
|
+
const SvgSentiment5 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
2039
2056
|
width: 26,
|
|
2040
2057
|
height: 26,
|
|
2041
2058
|
viewBox: "0 0 26 26",
|
|
@@ -2263,36 +2280,61 @@ const SentimentChart = ({ data, width, height, margin, tooltip, i18n, }) => {
|
|
|
2263
2280
|
], enableCrosshair: false, isInteractive: true, enableSlices: "x" }) })) }));
|
|
2264
2281
|
};
|
|
2265
2282
|
|
|
2283
|
+
const ShortcutContainer = styled__default["default"].div `
|
|
2284
|
+
display: flex;
|
|
2285
|
+
flex-direction: row;
|
|
2286
|
+
padding: ${({ theme }) => `${theme.space.sm} ${theme.space.base * 4}px`};
|
|
2287
|
+
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
2288
|
+
`;
|
|
2289
|
+
const Text$1 = styled__default["default"](reactTypography.SM) `
|
|
2290
|
+
line-height: 1.7;
|
|
2291
|
+
`;
|
|
2292
|
+
const SendShortcut = ({ saveText }) => {
|
|
2293
|
+
return (jsxRuntime.jsxs(ShortcutContainer, { children: [jsxRuntime.jsxs(reactTags.Tag, { children: [isMac() ? "Cmd" : "Ctrl", "+enter"] }), "\u00A0", jsxRuntime.jsx(Text$1, { children: saveText || "to save" })] }));
|
|
2294
|
+
};
|
|
2295
|
+
|
|
2266
2296
|
const Footer$4 = styled__default["default"].div `
|
|
2267
2297
|
display: flex;
|
|
2268
2298
|
flex-direction: row;
|
|
2269
|
-
padding: ${({ theme }) => `${theme.space.sm}
|
|
2270
|
-
|
|
2299
|
+
padding: ${({ theme }) => `${theme.space.sm} 0px`};
|
|
2300
|
+
align-items: center;
|
|
2301
|
+
margin: ${({ theme }) => `0 -${theme.space.base * 4}px`};
|
|
2302
|
+
justify-content: ${({ showShortcut }) => showShortcut ? "space-between" : "flex-end"};
|
|
2271
2303
|
gap: ${({ theme }) => theme.space.xs};
|
|
2304
|
+
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
2272
2305
|
`;
|
|
2273
|
-
const ChatFooter = ({ saveText, children, }) => {
|
|
2274
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(Footer$4, { children: children }) }));
|
|
2306
|
+
const ChatFooter = ({ saveText, children, showShortcut, }) => {
|
|
2307
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(Footer$4, Object.assign({ showShortcut: showShortcut }, { children: showShortcut ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SendShortcut, { saveText: saveText }), children] })) : (children) })) }));
|
|
2275
2308
|
};
|
|
2276
2309
|
|
|
2277
2310
|
const ChatContext = React.createContext(null);
|
|
2278
|
-
const ChatContextProvider = ({ onSave, children, }) => {
|
|
2279
|
-
const [isEditing, setIsEditing] = React.useState(false);
|
|
2280
|
-
const [comment, setComment] = React.useState("");
|
|
2311
|
+
const ChatContextProvider = ({ onSave, setMentionableUsers, children, }) => {
|
|
2281
2312
|
const [editor, setEditor] = React.useState();
|
|
2313
|
+
const getMentions = (editor) => {
|
|
2314
|
+
const result = [];
|
|
2315
|
+
editor.state.doc.descendants((node) => {
|
|
2316
|
+
if (node.type.name === "mention") {
|
|
2317
|
+
// Add only if it's not already in the array
|
|
2318
|
+
if (!result.some((r) => r.id === node.attrs.id))
|
|
2319
|
+
result.push({
|
|
2320
|
+
id: node.attrs.id,
|
|
2321
|
+
name: node.attrs.name
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2324
|
+
});
|
|
2325
|
+
return result;
|
|
2326
|
+
};
|
|
2282
2327
|
const chatContextValue = React.useMemo(() => ({
|
|
2283
|
-
isEditing,
|
|
2284
|
-
setIsEditing,
|
|
2285
|
-
comment,
|
|
2286
|
-
setComment,
|
|
2287
2328
|
editor,
|
|
2288
2329
|
setEditor,
|
|
2289
2330
|
triggerSave: () => {
|
|
2290
2331
|
if (editor && onSave) {
|
|
2291
|
-
onSave(editor);
|
|
2332
|
+
onSave(editor, getMentions(editor));
|
|
2292
2333
|
editor.commands.clearContent();
|
|
2293
2334
|
}
|
|
2294
2335
|
},
|
|
2295
|
-
|
|
2336
|
+
mentionableUsers: setMentionableUsers,
|
|
2337
|
+
}), [editor, setEditor, onSave, setMentionableUsers]);
|
|
2296
2338
|
return (jsxRuntime.jsx(ChatContext.Provider, Object.assign({ value: chatContextValue }, { children: children })));
|
|
2297
2339
|
};
|
|
2298
2340
|
const useChatContext = () => {
|
|
@@ -2302,35 +2344,6 @@ const useChatContext = () => {
|
|
|
2302
2344
|
return context; // Now we can use the context in the component, SAFELY.
|
|
2303
2345
|
};
|
|
2304
2346
|
|
|
2305
|
-
const ChatContainer = styled__default["default"](Card) `
|
|
2306
|
-
padding: ${({ theme }) => `0 ${theme.space.base * 4}px`};
|
|
2307
|
-
&:hover {
|
|
2308
|
-
box-shadow: none;
|
|
2309
|
-
}
|
|
2310
|
-
cursor: default;
|
|
2311
|
-
`;
|
|
2312
|
-
const MessagesContainer = styled__default["default"].div `
|
|
2313
|
-
padding: ${({ theme }) => `${theme.space.md} ${theme.space.sm}`};
|
|
2314
|
-
margin: ${({ theme }) => `0 -${theme.space.base * 4}px`};
|
|
2315
|
-
display: flex;
|
|
2316
|
-
flex-direction: column;
|
|
2317
|
-
gap: ${({ theme }) => theme.space.xs};
|
|
2318
|
-
background: ${({ chatBkg }) => chatBkg !== null && chatBkg !== void 0 ? chatBkg : `#fff`};
|
|
2319
|
-
overflow-y: auto;
|
|
2320
|
-
border-top: ${({ theme }) => `1px solid ${theme.palette.grey[200]}`};
|
|
2321
|
-
`;
|
|
2322
|
-
|
|
2323
|
-
/**
|
|
2324
|
-
* Title is a basic component used to display a title. Often used in card headers.
|
|
2325
|
-
*/
|
|
2326
|
-
const Title$1 = (props) => jsxRuntime.jsx(reactNotifications.Title, Object.assign({}, props));
|
|
2327
|
-
|
|
2328
|
-
const ChatTitle = styled__default["default"](Title$1) `
|
|
2329
|
-
color: ${({ theme }) => theme.palette.blue[600]};
|
|
2330
|
-
margin: ${({ theme }) => `0 -${theme.space.md}`};
|
|
2331
|
-
padding: ${({ theme }) => `${theme.space.sm} ${theme.space.md}`};
|
|
2332
|
-
`;
|
|
2333
|
-
|
|
2334
2347
|
const editorStyle = styled.css `
|
|
2335
2348
|
> * + * {
|
|
2336
2349
|
margin-top: 0.75em;
|
|
@@ -2567,7 +2580,7 @@ const editorStyle = styled.css `
|
|
|
2567
2580
|
}
|
|
2568
2581
|
|
|
2569
2582
|
/* Placeholder (at the top) */
|
|
2570
|
-
|
|
2583
|
+
/*p.is-editor-empty:first-child::before {
|
|
2571
2584
|
content: attr(data-placeholder);
|
|
2572
2585
|
float: left;
|
|
2573
2586
|
color: #ced4da;
|
|
@@ -2585,30 +2598,96 @@ const editorStyle = styled.css `
|
|
|
2585
2598
|
}
|
|
2586
2599
|
|
|
2587
2600
|
word-break: break-word;
|
|
2601
|
+
|
|
2602
|
+
mention {
|
|
2603
|
+
color: ${({ theme }) => theme.palette.azure[600]};
|
|
2604
|
+
border-radius: ${({ theme }) => theme.borderRadii.xl};
|
|
2605
|
+
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
2606
|
+
padding: ${({ theme }) => `${theme.space.xxs} 0`};
|
|
2607
|
+
}
|
|
2608
|
+
`;
|
|
2609
|
+
const readOnlyStyle = styled.css `
|
|
2610
|
+
pointer-events: none;
|
|
2611
|
+
border: none;
|
|
2612
|
+
|
|
2613
|
+
.ProseMirror {
|
|
2614
|
+
background: transparent;
|
|
2615
|
+
border: none;
|
|
2616
|
+
outline: none;
|
|
2617
|
+
padding: 0;
|
|
2618
|
+
min-height: 0;
|
|
2619
|
+
}
|
|
2588
2620
|
`;
|
|
2589
2621
|
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2622
|
+
const ChatContainer = styled__default["default"](Card) `
|
|
2623
|
+
padding: ${({ theme }) => `0 ${theme.space.base * 4}px`};
|
|
2624
|
+
&:hover {
|
|
2625
|
+
box-shadow: none;
|
|
2626
|
+
}
|
|
2627
|
+
cursor: default;
|
|
2628
|
+
`;
|
|
2629
|
+
const MessagesContainer = styled__default["default"].div `
|
|
2630
|
+
padding: ${({ theme }) => `${theme.space.md} ${theme.space.sm}`};
|
|
2631
|
+
margin: ${({ theme }) => `0 -${theme.space.base * 4}px`};
|
|
2632
|
+
display: flex;
|
|
2633
|
+
flex-direction: column;
|
|
2634
|
+
gap: ${({ theme }) => theme.space.xs};
|
|
2635
|
+
background: ${({ chatBkg }) => chatBkg !== null && chatBkg !== void 0 ? chatBkg : `#fff`};
|
|
2636
|
+
overflow-y: auto;
|
|
2637
|
+
border-top: ${({ theme }) => `1px solid ${theme.palette.grey[200]}`};
|
|
2638
|
+
`;
|
|
2639
|
+
const EditorContainer$1 = styled__default["default"](reactForms.FauxInput) `
|
|
2640
|
+
${({ editable, theme }) => !editable
|
|
2641
|
+
? readOnlyStyle
|
|
2642
|
+
: `
|
|
2643
|
+
margin-left: ${theme.space.sm};
|
|
2644
|
+
padding: ${`${theme.space.xxs} ${theme.space.xs}`};
|
|
2645
|
+
`}
|
|
2646
|
+
|
|
2647
|
+
.ProseMirror {
|
|
2648
|
+
background-color: transparent;
|
|
2649
|
+
min-height: 36px;
|
|
2650
|
+
outline: none;
|
|
2651
|
+
max-height: 210px;
|
|
2652
|
+
overflow-y: auto;
|
|
2653
|
+
|
|
2654
|
+
${editorStyle}
|
|
2655
|
+
}
|
|
2656
|
+
`;
|
|
2657
|
+
|
|
2658
|
+
/**
|
|
2659
|
+
* Title is a basic component used to display a title. Often used in card headers.
|
|
2660
|
+
*/
|
|
2661
|
+
const Title$1 = (props) => jsxRuntime.jsx(reactNotifications.Title, Object.assign({}, props));
|
|
2662
|
+
|
|
2663
|
+
const ChatTitle = styled__default["default"](Title$1) `
|
|
2664
|
+
color: ${({ theme }) => theme.palette.blue[600]};
|
|
2665
|
+
margin: ${({ theme }) => `0 -${theme.space.md}`};
|
|
2666
|
+
padding: ${({ theme }) => `${theme.space.sm} ${theme.space.md}`};
|
|
2667
|
+
`;
|
|
2668
|
+
|
|
2669
|
+
var _path$p;
|
|
2670
|
+
function _extends$w() { _extends$w = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
|
|
2671
|
+
const SvgBoldFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
2593
2672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2594
2673
|
width: 16,
|
|
2595
2674
|
height: 16,
|
|
2596
2675
|
focusable: "false",
|
|
2597
2676
|
viewBox: "0 0 16 16"
|
|
2598
|
-
}, props), _path$
|
|
2677
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2599
2678
|
fill: "currentColor",
|
|
2600
2679
|
d: "M7.5 0C9.952 0 12 2.048 12 4.5a4.483 4.483 0 01-1.27 3.108C12.078 8.39 13 9.855 13 11.5c0 2.452-2.048 4.5-4.5 4.5H4a1 1 0 01-1-1V1a1 1 0 011-1h3.5zM5 14h3.5c1.348 0 2.5-1.152 2.5-2.5S9.848 9 8.5 9H5v5zM7.5 2H5v5h2.5C8.848 7 10 5.848 10 4.5S8.848 2 7.5 2z"
|
|
2601
2680
|
})));
|
|
2602
2681
|
|
|
2603
|
-
var _path$
|
|
2604
|
-
function _extends$
|
|
2605
|
-
const SvgItalicFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2682
|
+
var _path$o;
|
|
2683
|
+
function _extends$v() { _extends$v = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
|
|
2684
|
+
const SvgItalicFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
2606
2685
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2607
2686
|
width: 16,
|
|
2608
2687
|
height: 16,
|
|
2609
2688
|
focusable: "false",
|
|
2610
2689
|
viewBox: "0 0 16 16"
|
|
2611
|
-
}, props), _path$
|
|
2690
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2612
2691
|
fill: "none",
|
|
2613
2692
|
stroke: "currentColor",
|
|
2614
2693
|
strokeLinecap: "round",
|
|
@@ -2616,15 +2695,15 @@ const SvgItalicFill = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
2616
2695
|
d: "M8 1h3M9.5 1l-3 14M5 15h3"
|
|
2617
2696
|
})));
|
|
2618
2697
|
|
|
2619
|
-
var _path$
|
|
2620
|
-
function _extends$
|
|
2621
|
-
const SvgQuoteFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2698
|
+
var _path$n, _path2$6;
|
|
2699
|
+
function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
2700
|
+
const SvgQuoteFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
2622
2701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2623
2702
|
width: 16,
|
|
2624
2703
|
height: 16,
|
|
2625
2704
|
focusable: "false",
|
|
2626
2705
|
viewBox: "0 0 16 16"
|
|
2627
|
-
}, props), _path$
|
|
2706
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2628
2707
|
fill: "currentColor",
|
|
2629
2708
|
d: "M7 8H4c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v3c0 .55-.45 1-1 1zm6 0h-3c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v3c0 .55-.45 1-1 1z"
|
|
2630
2709
|
})), _path2$6 || (_path2$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -2636,8 +2715,8 @@ const SvgQuoteFill = props => /*#__PURE__*/React__namespace.createElement("svg",
|
|
|
2636
2715
|
})));
|
|
2637
2716
|
|
|
2638
2717
|
var _g$4;
|
|
2639
|
-
function _extends$
|
|
2640
|
-
const SvgH1Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2718
|
+
function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
|
|
2719
|
+
const SvgH1Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
2641
2720
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2642
2721
|
width: 16,
|
|
2643
2722
|
height: 16,
|
|
@@ -2664,8 +2743,8 @@ const SvgH1Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _e
|
|
|
2664
2743
|
}))));
|
|
2665
2744
|
|
|
2666
2745
|
var _g$3;
|
|
2667
|
-
function _extends$
|
|
2668
|
-
const SvgH2Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2746
|
+
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
2747
|
+
const SvgH2Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
2669
2748
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2670
2749
|
width: 16,
|
|
2671
2750
|
height: 16,
|
|
@@ -2692,8 +2771,8 @@ const SvgH2Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _e
|
|
|
2692
2771
|
}))));
|
|
2693
2772
|
|
|
2694
2773
|
var _g$2;
|
|
2695
|
-
function _extends$
|
|
2696
|
-
const SvgH3Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2774
|
+
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
2775
|
+
const SvgH3Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
2697
2776
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2698
2777
|
width: 16,
|
|
2699
2778
|
height: 16,
|
|
@@ -2720,7 +2799,7 @@ const SvgH3Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _e
|
|
|
2720
2799
|
}))));
|
|
2721
2800
|
|
|
2722
2801
|
const StyledIconButton = styled__default["default"](IconButton) ``;
|
|
2723
|
-
const MenuContainer = styled__default["default"](Card) `
|
|
2802
|
+
const MenuContainer$1 = styled__default["default"](Card) `
|
|
2724
2803
|
padding: ${({ theme }) => theme.space.xxs};
|
|
2725
2804
|
|
|
2726
2805
|
${StyledIconButton} {
|
|
@@ -2744,170 +2823,327 @@ const FloatingMenu = (props) => {
|
|
|
2744
2823
|
if (!editor) {
|
|
2745
2824
|
return null;
|
|
2746
2825
|
}
|
|
2747
|
-
return (jsxRuntime.jsx(react.BubbleMenu, Object.assign({}, props, { editor: editor }, { children: jsxRuntime.jsxs(MenuContainer, Object.assign({ isFloating: true }, { children: [jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(), isBasic: !editor.isActive("heading", { level: 1 }), isPrimary: editor.isActive("heading", { level: 1 }), isPill: false }, { children: jsxRuntime.jsx(SvgH1Fill, {}, "ug-h1-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(), isBasic: !editor.isActive("heading", { level: 2 }), isPrimary: editor.isActive("heading", { level: 2 }), isPill: false }, { children: jsxRuntime.jsx(SvgH2Fill, {}, "ug-h2-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(), isBasic: !editor.isActive("heading", { level: 3 }), isPrimary: editor.isActive("heading", { level: 3 }), isPill: false }, { children: jsxRuntime.jsx(SvgH3Fill, {}, "ug-h3-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleBold().run(), isBasic: !editor.isActive("bold"), isPrimary: editor.isActive("bold"), isPill: false }, { children: jsxRuntime.jsx(SvgBoldFill, {}, "ug-bold-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleItalic().run(), isBasic: !editor.isActive("italic"), isPrimary: editor.isActive("italic"), isPill: false }, { children: jsxRuntime.jsx(SvgItalicFill, {}, "ug-italic-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleBlockquote().run(), isBasic: !editor.isActive("blockquote"), isPrimary: editor.isActive("blockquote"), isPill: false }, { children: jsxRuntime.jsx(SvgQuoteFill, {}, "ug-quote-button-bubble-menu") }))] })) })));
|
|
2826
|
+
return (jsxRuntime.jsx(react.BubbleMenu, Object.assign({}, props, { editor: editor }, { children: jsxRuntime.jsxs(MenuContainer$1, Object.assign({ isFloating: true }, { children: [jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(), isBasic: !editor.isActive("heading", { level: 1 }), isPrimary: editor.isActive("heading", { level: 1 }), isPill: false }, { children: jsxRuntime.jsx(SvgH1Fill, {}, "ug-h1-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(), isBasic: !editor.isActive("heading", { level: 2 }), isPrimary: editor.isActive("heading", { level: 2 }), isPill: false }, { children: jsxRuntime.jsx(SvgH2Fill, {}, "ug-h2-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(), isBasic: !editor.isActive("heading", { level: 3 }), isPrimary: editor.isActive("heading", { level: 3 }), isPill: false }, { children: jsxRuntime.jsx(SvgH3Fill, {}, "ug-h3-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleBold().run(), isBasic: !editor.isActive("bold"), isPrimary: editor.isActive("bold"), isPill: false }, { children: jsxRuntime.jsx(SvgBoldFill, {}, "ug-bold-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleItalic().run(), isBasic: !editor.isActive("italic"), isPrimary: editor.isActive("italic"), isPill: false }, { children: jsxRuntime.jsx(SvgItalicFill, {}, "ug-italic-button-bubble-menu") })), jsxRuntime.jsx(StyledIconButton, Object.assign({ size: "small", onClick: () => editor.chain().focus().toggleBlockquote().run(), isBasic: !editor.isActive("blockquote"), isPrimary: editor.isActive("blockquote"), isPill: false }, { children: jsxRuntime.jsx(SvgQuoteFill, {}, "ug-quote-button-bubble-menu") }))] })) })));
|
|
2748
2827
|
};
|
|
2749
2828
|
|
|
2750
|
-
const ChatBoxContainer = styled__default["default"].div `
|
|
2751
|
-
display: flex;
|
|
2752
|
-
border-top: 1px solid ${({ theme }) => theme.palette.grey[200]};
|
|
2753
|
-
margin: ${({ theme }) => `0 -${theme.space.base * 4}px`};
|
|
2754
|
-
padding: ${({ theme }) => `${theme.space.base * 4}px ${theme.space.sm} 0`};
|
|
2755
|
-
`;
|
|
2756
|
-
const EditorContainer$1 = styled__default["default"](reactForms.FauxInput) `
|
|
2757
|
-
margin-left: ${({ theme }) => theme.space.sm};
|
|
2758
|
-
padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};
|
|
2759
|
-
.ProseMirror {
|
|
2760
|
-
background-color: #fff;
|
|
2761
|
-
min-height: 36px;
|
|
2762
|
-
outline: none;
|
|
2763
|
-
max-height: 210px;
|
|
2764
|
-
overflow-y: auto;
|
|
2765
|
-
|
|
2766
|
-
${editorStyle}
|
|
2767
|
-
}
|
|
2768
|
-
`;
|
|
2769
2829
|
/**
|
|
2770
|
-
*
|
|
2771
|
-
* <br>
|
|
2772
|
-
* It's a rich text WYSIWYG editors.
|
|
2830
|
+
* Tooltips appear when a user hovers or focuses an element. They provide contextual information about the element they are paired with.
|
|
2773
2831
|
* <hr>
|
|
2774
2832
|
* Used for this:
|
|
2775
|
-
- To
|
|
2776
|
-
- To
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
-
|
|
2833
|
+
* - To describe the function of an element when it might be ambiguous
|
|
2834
|
+
* - To describe the function of unlabeled icons
|
|
2835
|
+
* Not for this:
|
|
2836
|
+
* - To provide information a user needs to know or remember
|
|
2837
|
+
* - To display truncated text, use a title attribute instead
|
|
2780
2838
|
*/
|
|
2781
|
-
const
|
|
2782
|
-
var
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2839
|
+
const TooltipComponent = (props) => {
|
|
2840
|
+
var _a;
|
|
2841
|
+
const theme = React.useContext(styled.ThemeContext);
|
|
2842
|
+
return jsxRuntime.jsx(reactTooltips.Tooltip, Object.assign({}, props, { zIndex: (_a = props.zIndex) !== null && _a !== void 0 ? _a : theme.levels.front }));
|
|
2843
|
+
};
|
|
2844
|
+
const Tooltip = styled__default["default"](TooltipComponent) `
|
|
2845
|
+
box-shadow: ${({ theme }) => theme.shadows.lg(`${theme.space.base * 3}px`, `${theme.space.base * 5}px`, getColor("neutralHue", 600, theme, 0.15))};
|
|
2846
|
+
`;
|
|
2847
|
+
|
|
2848
|
+
var _path$m;
|
|
2849
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
2850
|
+
const SvgAtFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
2851
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2852
|
+
width: 16,
|
|
2853
|
+
height: 16,
|
|
2854
|
+
focusable: "false",
|
|
2855
|
+
viewBox: "0 0 16 16"
|
|
2856
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2857
|
+
fill: "none",
|
|
2858
|
+
stroke: "currentColor",
|
|
2859
|
+
strokeLinecap: "round",
|
|
2860
|
+
strokeWidth: 2,
|
|
2861
|
+
d: "M11 5v3h0a3 3 0 01-3 3h0a3 3 0 01-3-3h0a3 3 0 013-3h0a3 3 0 013 3h0v1a2 2 0 002 2h0a2 2 0 002-2V8h0a7 7 0 00-7-7h0a7 7 0 00-7 7h0a7 7 0 007 7h2.8"
|
|
2862
|
+
})));
|
|
2863
|
+
|
|
2864
|
+
const EditorButton = ({ editor, type, }) => {
|
|
2865
|
+
const isActive = editor.isActive(type);
|
|
2866
|
+
const getIcon = () => {
|
|
2867
|
+
switch (type) {
|
|
2868
|
+
case "bold":
|
|
2869
|
+
return jsxRuntime.jsx(SvgBoldFill, {});
|
|
2870
|
+
case "italic":
|
|
2871
|
+
return jsxRuntime.jsx(SvgItalicFill, {});
|
|
2872
|
+
case "mention":
|
|
2873
|
+
return jsxRuntime.jsx(SvgAtFill, {});
|
|
2790
2874
|
}
|
|
2791
2875
|
};
|
|
2792
|
-
const
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
2806
|
-
return true;
|
|
2807
|
-
}
|
|
2808
|
-
return false;
|
|
2809
|
-
},
|
|
2810
|
-
} }, props));
|
|
2811
|
-
if (!ed) {
|
|
2812
|
-
return null;
|
|
2813
|
-
}
|
|
2814
|
-
// Add here because we want to keep also the listener from the props.
|
|
2815
|
-
ed.on("create", ({ editor }) => setEditor(editor));
|
|
2816
|
-
ed.on("update", ({ editor }) => setEditor(editor));
|
|
2817
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasInlineMenu && (jsxRuntime.jsx(FloatingMenu, { editor: ed, tippyOptions: Object.assign({}, bubbleOptions) })), jsxRuntime.jsxs(ChatBoxContainer, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Avatar, Object.assign({ avatarType: (_b = author.avatarType) !== null && _b !== void 0 ? _b : "text" }, { children: author.avatar })) }), jsxRuntime.jsx(EditorContainer$1, { children: jsxRuntime.jsx(react.EditorContent, { editor: ed, onKeyDown: onKeyDown }) })] })] }));
|
|
2876
|
+
const handleClick = () => {
|
|
2877
|
+
switch (type) {
|
|
2878
|
+
case "bold":
|
|
2879
|
+
return editor.chain().focus().toggleBold().run();
|
|
2880
|
+
case "italic":
|
|
2881
|
+
return editor.chain().focus().toggleItalic().run();
|
|
2882
|
+
case "mention":
|
|
2883
|
+
const { from } = editor.state.selection;
|
|
2884
|
+
const char = from > 1 ? " @" : "@";
|
|
2885
|
+
return editor.commands.insertContent(char);
|
|
2886
|
+
}
|
|
2887
|
+
};
|
|
2888
|
+
return (jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !isActive, isPrimary: isActive, onClick: handleClick }, { children: getIcon() })));
|
|
2818
2889
|
};
|
|
2819
2890
|
|
|
2820
|
-
const
|
|
2891
|
+
const MenuContainer = styled__default["default"].div `
|
|
2892
|
+
padding: ${({ theme }) => theme.space.xxs} 0;
|
|
2821
2893
|
display: flex;
|
|
2822
|
-
flex-direction:
|
|
2823
|
-
|
|
2894
|
+
flex-direction: row;
|
|
2895
|
+
justify-content: flex-start;
|
|
2896
|
+
align-items: center;
|
|
2824
2897
|
`;
|
|
2825
|
-
const
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
${
|
|
2829
|
-
${
|
|
2898
|
+
const VerticalDivider = styled__default["default"].div `
|
|
2899
|
+
width: 2px;
|
|
2900
|
+
height: 24px;
|
|
2901
|
+
background-color: ${({ theme }) => theme.palette.grey[300]};
|
|
2902
|
+
margin: 0 ${({ theme }) => theme.space.xs};
|
|
2830
2903
|
`;
|
|
2831
|
-
const
|
|
2832
|
-
|
|
2833
|
-
|
|
2904
|
+
const CommentBar = ({ editor, i18n, }) => {
|
|
2905
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2906
|
+
if (!editor)
|
|
2907
|
+
return null;
|
|
2908
|
+
return (jsxRuntime.jsxs(MenuContainer, { children: [jsxRuntime.jsx(Tooltip, Object.assign({ content: (_b = (_a = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _a === void 0 ? void 0 : _a.bold) !== null && _b !== void 0 ? _b : "Bold text", placement: "top", type: "light", size: "small" }, { children: jsxRuntime.jsx(EditorButton, { editor: editor, type: "bold" }) })), jsxRuntime.jsx(Tooltip, Object.assign({ content: (_d = (_c = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _c === void 0 ? void 0 : _c.italic) !== null && _d !== void 0 ? _d : "Italic text", placement: "top", type: "light", size: "small" }, { children: jsxRuntime.jsx(EditorButton, { editor: editor, type: "italic" }) })), jsxRuntime.jsx(VerticalDivider, {}), jsxRuntime.jsx(Tooltip, Object.assign({ content: (_f = (_e = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _e === void 0 ? void 0 : _e.mention) !== null && _f !== void 0 ? _f : "Add a mention", placement: "top", type: "light", size: "small" }, { children: jsxRuntime.jsx(EditorButton, { editor: editor, type: "mention" }) }))] }));
|
|
2834
2909
|
};
|
|
2835
2910
|
|
|
2836
|
-
const
|
|
2911
|
+
const CustomMention = Mention__default["default"].extend({
|
|
2912
|
+
addAttributes() {
|
|
2913
|
+
return {
|
|
2914
|
+
id: {
|
|
2915
|
+
default: null,
|
|
2916
|
+
parseHTML: (element) => element.getAttribute("data-mention-id"),
|
|
2917
|
+
renderHTML: (attributes) => {
|
|
2918
|
+
if (!attributes.id) {
|
|
2919
|
+
return {};
|
|
2920
|
+
}
|
|
2921
|
+
return {
|
|
2922
|
+
"data-mention-id": attributes.id,
|
|
2923
|
+
};
|
|
2924
|
+
},
|
|
2925
|
+
},
|
|
2926
|
+
name: {
|
|
2927
|
+
default: null,
|
|
2928
|
+
parseHTML: (element) => element.getAttribute("data-mention-name"),
|
|
2929
|
+
renderHTML: (attributes) => {
|
|
2930
|
+
if (!attributes.name) {
|
|
2931
|
+
return {};
|
|
2932
|
+
}
|
|
2933
|
+
return {
|
|
2934
|
+
"data-mention-name": attributes.name,
|
|
2935
|
+
};
|
|
2936
|
+
},
|
|
2937
|
+
},
|
|
2938
|
+
};
|
|
2939
|
+
},
|
|
2940
|
+
parseHTML() {
|
|
2941
|
+
return [
|
|
2942
|
+
{
|
|
2943
|
+
tag: `mention[data-type="${this.name}"]`,
|
|
2944
|
+
},
|
|
2945
|
+
];
|
|
2946
|
+
},
|
|
2947
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
2948
|
+
// In the future we can fetch other user data here, like avatar, user role, etc.
|
|
2949
|
+
const user = node.attrs;
|
|
2950
|
+
let outputText = "unkown";
|
|
2951
|
+
if (user) {
|
|
2952
|
+
outputText = `${this.options.suggestion.char}${user.name}`;
|
|
2953
|
+
}
|
|
2954
|
+
return [
|
|
2955
|
+
"mention",
|
|
2956
|
+
core.mergeAttributes({ "data-type": this.name }, this.options.HTMLAttributes, HTMLAttributes),
|
|
2957
|
+
outputText,
|
|
2958
|
+
];
|
|
2959
|
+
},
|
|
2960
|
+
renderText({ node }) {
|
|
2961
|
+
const user = node.attrs;
|
|
2962
|
+
if (user) {
|
|
2963
|
+
return `${this.options.suggestion.char}${user.name}`;
|
|
2964
|
+
}
|
|
2965
|
+
return "unkown";
|
|
2966
|
+
},
|
|
2967
|
+
});
|
|
2968
|
+
|
|
2969
|
+
const StyledCard$1 = styled.styled(Card) `
|
|
2970
|
+
padding: ${({ theme }) => theme.space.xxs};
|
|
2971
|
+
|
|
2972
|
+
::-webkit-scrollbar {
|
|
2973
|
+
width: ${({ theme }) => theme.space.xs};
|
|
2974
|
+
}
|
|
2975
|
+
`;
|
|
2976
|
+
const List = styled.styled.div `
|
|
2837
2977
|
display: flex;
|
|
2838
|
-
flex-direction:
|
|
2839
|
-
|
|
2840
|
-
|
|
2978
|
+
flex-direction: column;
|
|
2979
|
+
gap: ${({ theme }) => theme.space.xs};
|
|
2980
|
+
max-height: 200px;
|
|
2981
|
+
overflow-y: auto;
|
|
2841
2982
|
`;
|
|
2842
|
-
const
|
|
2843
|
-
|
|
2983
|
+
const Item$2 = styled.styled(Button) `
|
|
2984
|
+
display: flex;
|
|
2985
|
+
align-items: flex-start;
|
|
2986
|
+
justify-content: center;
|
|
2987
|
+
flex-direction: column;
|
|
2844
2988
|
`;
|
|
2845
|
-
const
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2989
|
+
const MentionList = React.forwardRef((props, ref) => {
|
|
2990
|
+
const [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
2991
|
+
const selectItem = (index) => {
|
|
2992
|
+
const item = props.items[index];
|
|
2993
|
+
if (item) {
|
|
2994
|
+
props.command(item);
|
|
2995
|
+
}
|
|
2996
|
+
};
|
|
2997
|
+
const upHandler = () => {
|
|
2998
|
+
setSelectedIndex((selectedIndex + props.items.length - 1) % props.items.length);
|
|
2999
|
+
};
|
|
3000
|
+
const downHandler = () => {
|
|
3001
|
+
setSelectedIndex((selectedIndex + 1) % props.items.length);
|
|
3002
|
+
};
|
|
3003
|
+
const enterHandler = () => {
|
|
3004
|
+
selectItem(selectedIndex);
|
|
3005
|
+
};
|
|
3006
|
+
React.useEffect(() => setSelectedIndex(0), [props.items]);
|
|
3007
|
+
React.useImperativeHandle(ref, () => ({
|
|
3008
|
+
onKeyDown: ({ event }) => {
|
|
3009
|
+
if (event.key === "ArrowUp") {
|
|
3010
|
+
upHandler();
|
|
3011
|
+
return true;
|
|
3012
|
+
}
|
|
3013
|
+
if (event.key === "ArrowDown") {
|
|
3014
|
+
downHandler();
|
|
3015
|
+
return true;
|
|
3016
|
+
}
|
|
3017
|
+
if (event.key === "Enter") {
|
|
3018
|
+
enterHandler();
|
|
3019
|
+
return true;
|
|
3020
|
+
}
|
|
3021
|
+
return false;
|
|
3022
|
+
},
|
|
3023
|
+
}));
|
|
3024
|
+
return (jsxRuntime.jsx("div", Object.assign({ className: "items" }, { children: jsxRuntime.jsx(StyledCard$1, { children: jsxRuntime.jsx(List, { children: props.items.length ? (props.items.map((item, index) => (jsxRuntime.jsx("div", Object.assign({ className: index === selectedIndex ? 'selected' : '' }, { children: jsxRuntime.jsx(Item$2, Object.assign({ isBasic: true, isStretched: true, isAccent: true, isPill: false, onClick: () => selectItem(index) }, { children: jsxRuntime.jsx(MD, Object.assign({ isBold: true, style: { color: theme.palette.black } }, { children: item.name })) }), index) }))))) : (jsxRuntime.jsx("div", Object.assign({ className: "item" }, { children: "No result" }))) }) }) })));
|
|
3025
|
+
});
|
|
2863
3026
|
|
|
2864
|
-
|
|
3027
|
+
/**
|
|
3028
|
+
* Workaround for the current typing incompatibility between Tippy.js and Tiptap
|
|
3029
|
+
* Suggestion utility.
|
|
3030
|
+
*
|
|
3031
|
+
* @see https://github.com/ueberdosis/tiptap/issues/2795#issuecomment-1160623792
|
|
3032
|
+
*
|
|
3033
|
+
* Adopted from
|
|
3034
|
+
* https://github.com/Doist/typist/blob/a1726a6be089e3e1452def641dfcfc622ac3e942/stories/typist-editor/constants/suggestions.ts#L169-L186
|
|
3035
|
+
*/
|
|
3036
|
+
const DOM_RECT_FALLBACK = {
|
|
3037
|
+
bottom: 0,
|
|
3038
|
+
height: 0,
|
|
3039
|
+
left: 0,
|
|
3040
|
+
right: 0,
|
|
3041
|
+
top: 0,
|
|
3042
|
+
width: 0,
|
|
3043
|
+
x: 0,
|
|
3044
|
+
y: 0,
|
|
3045
|
+
toJSON() {
|
|
3046
|
+
return {};
|
|
3047
|
+
},
|
|
3048
|
+
};
|
|
3049
|
+
const editorExtensions = ({ placeholderOptions, mentionableUsers, }) => {
|
|
3050
|
+
return [
|
|
3051
|
+
Typography__default["default"],
|
|
3052
|
+
Link__default["default"],
|
|
3053
|
+
StarterKit__default["default"],
|
|
3054
|
+
Placeholder__default["default"].configure(Object.assign({ placeholder: ({ node }) => {
|
|
3055
|
+
if (node.type.name === "heading") {
|
|
3056
|
+
return "What’s the title?";
|
|
3057
|
+
}
|
|
3058
|
+
return "Can you add some further context?";
|
|
3059
|
+
} }, placeholderOptions)),
|
|
3060
|
+
CharacterCount__default["default"],
|
|
3061
|
+
CustomMention.configure({
|
|
3062
|
+
suggestion: {
|
|
3063
|
+
items: mentionableUsers,
|
|
3064
|
+
render: () => {
|
|
3065
|
+
let component;
|
|
3066
|
+
let popup;
|
|
3067
|
+
return {
|
|
3068
|
+
onStart: (props) => {
|
|
3069
|
+
component = new react.ReactRenderer(MentionList, {
|
|
3070
|
+
props,
|
|
3071
|
+
editor: props.editor,
|
|
3072
|
+
});
|
|
3073
|
+
if (!props.clientRect) {
|
|
3074
|
+
return;
|
|
3075
|
+
}
|
|
3076
|
+
popup = tippy__default["default"]("body", {
|
|
3077
|
+
getReferenceClientRect: () => { var _a, _b; return (_b = (_a = props.clientRect) === null || _a === void 0 ? void 0 : _a.call(props)) !== null && _b !== void 0 ? _b : DOM_RECT_FALLBACK; },
|
|
3078
|
+
appendTo: () => document.body,
|
|
3079
|
+
content: component.element,
|
|
3080
|
+
showOnCreate: true,
|
|
3081
|
+
interactive: true,
|
|
3082
|
+
trigger: "manual",
|
|
3083
|
+
placement: "auto",
|
|
3084
|
+
})[0];
|
|
3085
|
+
},
|
|
3086
|
+
onUpdate(props) {
|
|
3087
|
+
component === null || component === void 0 ? void 0 : component.updateProps(props);
|
|
3088
|
+
if (!props.clientRect) {
|
|
3089
|
+
return;
|
|
3090
|
+
}
|
|
3091
|
+
popup === null || popup === void 0 ? void 0 : popup.setProps({
|
|
3092
|
+
getReferenceClientRect: () => { var _a, _b; return (_b = (_a = props.clientRect) === null || _a === void 0 ? void 0 : _a.call(props)) !== null && _b !== void 0 ? _b : DOM_RECT_FALLBACK; },
|
|
3093
|
+
});
|
|
3094
|
+
},
|
|
3095
|
+
onKeyDown(props) {
|
|
3096
|
+
if (props.event.key === "Escape") {
|
|
3097
|
+
popup === null || popup === void 0 ? void 0 : popup.hide();
|
|
3098
|
+
return true;
|
|
3099
|
+
}
|
|
3100
|
+
if (!(component === null || component === void 0 ? void 0 : component.ref)) {
|
|
3101
|
+
return false;
|
|
3102
|
+
}
|
|
3103
|
+
return component.ref.onKeyDown(props);
|
|
3104
|
+
},
|
|
3105
|
+
onExit() {
|
|
3106
|
+
popup === null || popup === void 0 ? void 0 : popup.destroy();
|
|
3107
|
+
component === null || component === void 0 ? void 0 : component.destroy();
|
|
3108
|
+
// Remove references to the old popup and component upon destruction/exit.
|
|
3109
|
+
// (This should prevent redundant calls to `popup.destroy()`, which Tippy
|
|
3110
|
+
// warns in the console is a sign of a memory leak, as the `suggestion`
|
|
3111
|
+
// plugin seems to call `onExit` both when a suggestion menu is closed after
|
|
3112
|
+
// a user chooses an option, *and* when the editor itself is destroyed.)
|
|
3113
|
+
popup = undefined;
|
|
3114
|
+
component = undefined;
|
|
3115
|
+
},
|
|
3116
|
+
};
|
|
3117
|
+
},
|
|
3118
|
+
},
|
|
3119
|
+
}),
|
|
3120
|
+
];
|
|
3121
|
+
};
|
|
2865
3122
|
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
padding: 0;
|
|
2872
|
-
min-height: 0;
|
|
2873
|
-
`}
|
|
2874
|
-
}
|
|
3123
|
+
const ChatBoxContainer = styled__default["default"].div `
|
|
3124
|
+
display: flex;
|
|
3125
|
+
border-top: 1px solid ${({ theme }) => theme.palette.grey[200]};
|
|
3126
|
+
margin: ${({ theme }) => `0 -${theme.space.base * 4}px`};
|
|
3127
|
+
padding: ${({ theme }) => `${theme.space.base * 4}px ${theme.space.sm} 0`};
|
|
2875
3128
|
`;
|
|
2876
3129
|
/**
|
|
2877
|
-
*
|
|
3130
|
+
* CommentBox is a wrapper around Editor component
|
|
2878
3131
|
* <br>
|
|
2879
3132
|
* It's a rich text WYSIWYG editors.
|
|
2880
3133
|
* <hr>
|
|
2881
3134
|
* Used for this:
|
|
2882
|
-
- To
|
|
3135
|
+
- To add chat feature
|
|
2883
3136
|
- To develop collaborative text editing
|
|
2884
3137
|
|
|
2885
3138
|
Not for this:
|
|
2886
3139
|
- Simple text input, use textarea instead.
|
|
2887
3140
|
*/
|
|
2888
|
-
const
|
|
2889
|
-
var {
|
|
2890
|
-
const { children, hasInlineMenu, bubbleOptions,
|
|
2891
|
-
const
|
|
2892
|
-
const
|
|
2893
|
-
const
|
|
2894
|
-
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
2895
|
-
if (onSave && activeEditor)
|
|
2896
|
-
onSave(activeEditor);
|
|
2897
|
-
}
|
|
2898
|
-
};
|
|
2899
|
-
const ed = react.useEditor(Object.assign({ extensions: [
|
|
2900
|
-
Typography__default["default"],
|
|
2901
|
-
Link__default["default"],
|
|
2902
|
-
StarterKit__default["default"],
|
|
2903
|
-
Placeholder__default["default"].configure(Object.assign({ placeholder: ({ node }) => {
|
|
2904
|
-
if (node.type.name === "heading") {
|
|
2905
|
-
return "What’s the title?";
|
|
2906
|
-
}
|
|
2907
|
-
return "Can you add some further context?";
|
|
2908
|
-
} }, placeholderOptions)),
|
|
2909
|
-
CharacterCount__default["default"],
|
|
2910
|
-
], content: children || "", editorProps: {
|
|
3141
|
+
const CommentBox = (_a) => {
|
|
3142
|
+
var { placeholderOptions } = _a, props = __rest(_a, ["placeholderOptions"]);
|
|
3143
|
+
const { children, hasInlineMenu, hasButtonsMenu, bubbleOptions, i18n } = props;
|
|
3144
|
+
const { editor, setEditor, mentionableUsers, triggerSave } = useChatContext();
|
|
3145
|
+
const ext = editorExtensions({ placeholderOptions, mentionableUsers });
|
|
3146
|
+
const ed = react.useEditor(Object.assign({ extensions: ext, content: children || "", editorProps: {
|
|
2911
3147
|
handleKeyDown: (view, event) => {
|
|
2912
3148
|
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
2913
3149
|
return true;
|
|
@@ -2915,12 +3151,16 @@ const Editor = (_a) => {
|
|
|
2915
3151
|
return false;
|
|
2916
3152
|
},
|
|
2917
3153
|
} }, props));
|
|
2918
|
-
|
|
3154
|
+
const onKeyDown = (event) => {
|
|
3155
|
+
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
3156
|
+
triggerSave();
|
|
3157
|
+
editor === null || editor === void 0 ? void 0 : editor.commands.clearContent();
|
|
3158
|
+
}
|
|
3159
|
+
};
|
|
3160
|
+
if (!ed)
|
|
2919
3161
|
return null;
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
ed.on("update", ({ editor }) => setActiveEditor(editor));
|
|
2923
|
-
return (jsxRuntime.jsxs(EditorContainer, Object.assign({ editable: isEditable, validation: props.validation }, { children: [isEditable && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(EditorHeader, { title: headerTitle, validation: props.validation }), hasInlineMenu && (jsxRuntime.jsx(FloatingMenu, { editor: ed, tippyOptions: Object.assign({}, bubbleOptions) }))] })), jsxRuntime.jsx(react.EditorContent, { editor: ed, onKeyDown: onKeyDown }), isEditable && jsxRuntime.jsx(EditorFooter, { saveText: footerSaveText })] })));
|
|
3162
|
+
ed.on("update", ({ editor }) => setEditor(editor));
|
|
3163
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasInlineMenu && (jsxRuntime.jsx(FloatingMenu, { editor: ed, tippyOptions: Object.assign({}, bubbleOptions) })), jsxRuntime.jsx(ChatBoxContainer, { children: jsxRuntime.jsx(EditorContainer$1, Object.assign({ editable: true, style: { marginLeft: 0 } }, { children: jsxRuntime.jsx(react.EditorContent, { editor: ed, onKeyDown: onKeyDown }) })) }), hasButtonsMenu && jsxRuntime.jsx(CommentBar, { editor: ed, i18n: i18n })] }));
|
|
2924
3164
|
};
|
|
2925
3165
|
|
|
2926
3166
|
const CommentCard = styled.styled(Card) `
|
|
@@ -2932,12 +3172,10 @@ const CommentCard = styled.styled(Card) `
|
|
|
2932
3172
|
border-radius: 8px;
|
|
2933
3173
|
`;
|
|
2934
3174
|
const ReadOnly = styled.styled.div `
|
|
3175
|
+
cursor: text;
|
|
3176
|
+
|
|
2935
3177
|
> div {
|
|
2936
|
-
background-color:
|
|
2937
|
-
&:focus {
|
|
2938
|
-
box-shadow: none;
|
|
2939
|
-
outline: none;
|
|
2940
|
-
}
|
|
3178
|
+
background-color: transparent;
|
|
2941
3179
|
padding: 0;
|
|
2942
3180
|
}
|
|
2943
3181
|
`;
|
|
@@ -2949,18 +3187,29 @@ const CommentDate = styled.styled.span `
|
|
|
2949
3187
|
color: ${({ theme }) => theme.palette.grey[500]};
|
|
2950
3188
|
font-weight: ${({ theme }) => theme.fontWeights.thin};
|
|
2951
3189
|
`;
|
|
2952
|
-
const Footer$
|
|
3190
|
+
const Footer$3 = styled.styled.div `
|
|
2953
3191
|
display: flex;
|
|
2954
3192
|
flex-direction: row;
|
|
2955
3193
|
justify-content: flex-end;
|
|
2956
3194
|
gap: ${({ theme }) => theme.space.xs};
|
|
2957
3195
|
`;
|
|
2958
3196
|
const CommentTitle = styled.styled(Title$1) `
|
|
2959
|
-
color: ${({ theme }) => theme.palette.blue[600]};
|
|
3197
|
+
color: ${({ theme }) => theme.palette.blue[600]};
|
|
2960
3198
|
`;
|
|
2961
3199
|
const Comment = ({ author, message, children, date, }) => {
|
|
2962
3200
|
var _a, _b;
|
|
2963
|
-
|
|
3201
|
+
const { mentionableUsers } = useChatContext();
|
|
3202
|
+
const ext = editorExtensions({ mentionableUsers });
|
|
3203
|
+
const ed = react.useEditor({
|
|
3204
|
+
extensions: ext,
|
|
3205
|
+
content: message || "",
|
|
3206
|
+
});
|
|
3207
|
+
if (!ed)
|
|
3208
|
+
return null;
|
|
3209
|
+
ed.setOptions({
|
|
3210
|
+
editable: false,
|
|
3211
|
+
});
|
|
3212
|
+
return (jsxRuntime.jsxs(CommentCard, { children: [jsxRuntime.jsxs(AuthorContainer, { children: [jsxRuntime.jsx(Avatar, Object.assign({ avatarType: (_a = author.avatarType) !== null && _a !== void 0 ? _a : "text", style: { flexShrink: 0 } }, { children: author.avatar })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(CommentTitle, { children: [(_b = author.name) !== null && _b !== void 0 ? _b : "User", jsxRuntime.jsx(CommentDate, { children: date })] }), jsxRuntime.jsx(ReadOnly, { children: jsxRuntime.jsx(EditorContainer$1, Object.assign({ editable: false }, { children: jsxRuntime.jsx(react.EditorContent, { editor: ed }) })) })] })] }), jsxRuntime.jsx(Footer$3, { children: children })] }));
|
|
2964
3213
|
};
|
|
2965
3214
|
|
|
2966
3215
|
/**
|
|
@@ -3266,6 +3515,112 @@ const CounterMultiselect = ({ options, label, i18n, onChange, isCompact, }) => {
|
|
|
3266
3515
|
: (_a = i18n === null || i18n === void 0 ? void 0 : i18n.noItems) !== null && _a !== void 0 ? _a : "No items" }))] }), jsxRuntime.jsx(Menu, Object.assign({ isCompact: isCompact }, { children: matchingOptions.length === 0 ? (jsxRuntime.jsx(Item$1, Object.assign({ disabled: true }, { children: (_b = i18n === null || i18n === void 0 ? void 0 : i18n.noMatches) !== null && _b !== void 0 ? _b : "No matches found" }))) : (matchingOptions.map((option) => (jsxRuntime.jsx(Item$1, Object.assign({ value: option }, option, { children: jsxRuntime.jsx("span", { children: option.label }) }), option.itemId)))) }))] })) }));
|
|
3267
3516
|
};
|
|
3268
3517
|
|
|
3518
|
+
const Header$1 = styled__default["default"].div `
|
|
3519
|
+
display: flex;
|
|
3520
|
+
flex-direction: column;
|
|
3521
|
+
padding: ${({ theme }) => theme.space.xs} ${({ theme }) => theme.space.md};
|
|
3522
|
+
`;
|
|
3523
|
+
const Title = styled__default["default"](MD) `
|
|
3524
|
+
${props => reactTheming.retrieveComponentStyles("text.primary", props)}
|
|
3525
|
+
${props => props.validation === "success" && reactTheming.retrieveComponentStyles("text.success", props)}
|
|
3526
|
+
${props => props.validation === "warning" && reactTheming.retrieveComponentStyles("text.warning", props)}
|
|
3527
|
+
${props => props.validation === "error" && reactTheming.retrieveComponentStyles("text.danger", props)}
|
|
3528
|
+
`;
|
|
3529
|
+
const EditorHeader = (props) => {
|
|
3530
|
+
const { title, validation } = props;
|
|
3531
|
+
return (jsxRuntime.jsx(Header$1, { children: jsxRuntime.jsx(Title, Object.assign({ isBold: true, validation: validation }, { children: title || "Write" })) }));
|
|
3532
|
+
};
|
|
3533
|
+
|
|
3534
|
+
const Footer$2 = styled__default["default"].div `
|
|
3535
|
+
display: flex;
|
|
3536
|
+
flex-direction: row;
|
|
3537
|
+
padding: ${({ theme }) => theme.space.sm} 16px;
|
|
3538
|
+
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
3539
|
+
`;
|
|
3540
|
+
const Text = styled__default["default"](SM) `
|
|
3541
|
+
line-height: 1.7;
|
|
3542
|
+
`;
|
|
3543
|
+
const EditorFooter = ({ saveText }) => {
|
|
3544
|
+
return jsxRuntime.jsxs(Footer$2, { children: [jsxRuntime.jsxs(Tag, { children: [isMac() ? "Cmd" : "Ctrl", "+enter"] }), "\u00A0", jsxRuntime.jsx(Text, { children: saveText || "to save" })] });
|
|
3545
|
+
};
|
|
3546
|
+
|
|
3547
|
+
const EditorContainer = styled__default["default"](reactForms.FauxInput) `
|
|
3548
|
+
|
|
3549
|
+
${({ editable }) => !editable &&
|
|
3550
|
+
`
|
|
3551
|
+
border: none;
|
|
3552
|
+
outline: none;
|
|
3553
|
+
|
|
3554
|
+
`}
|
|
3555
|
+
|
|
3556
|
+
.ProseMirror {
|
|
3557
|
+
padding: ${({ theme }) => theme.space.md};
|
|
3558
|
+
background-color: #fff;
|
|
3559
|
+
min-height: 100px;
|
|
3560
|
+
outline: none;
|
|
3561
|
+
|
|
3562
|
+
${editorStyle}
|
|
3563
|
+
|
|
3564
|
+
${({ editable }) => !editable &&
|
|
3565
|
+
`
|
|
3566
|
+
background: transparent;
|
|
3567
|
+
border: none;
|
|
3568
|
+
outline: none;
|
|
3569
|
+
padding: 0;
|
|
3570
|
+
min-height: 0;
|
|
3571
|
+
`}
|
|
3572
|
+
}
|
|
3573
|
+
`;
|
|
3574
|
+
/**
|
|
3575
|
+
* Editor is a wrapper around TipTap/ProseMirror
|
|
3576
|
+
* <br>
|
|
3577
|
+
* It's a rich text WYSIWYG editors.
|
|
3578
|
+
* <hr>
|
|
3579
|
+
* Used for this:
|
|
3580
|
+
- To allow text customization with markup supports
|
|
3581
|
+
- To develop collaborative text editing
|
|
3582
|
+
|
|
3583
|
+
Not for this:
|
|
3584
|
+
- Simple text input, use textarea instead.
|
|
3585
|
+
*/
|
|
3586
|
+
const Editor = (_a) => {
|
|
3587
|
+
var { onSave, headerTitle, footerSaveText, placeholderOptions } = _a, props = __rest(_a, ["onSave", "headerTitle", "footerSaveText", "placeholderOptions"]);
|
|
3588
|
+
const { children, hasInlineMenu, bubbleOptions, editable } = props;
|
|
3589
|
+
const isEditable = editable !== undefined ? editable : true;
|
|
3590
|
+
const [activeEditor, setActiveEditor] = React.useState();
|
|
3591
|
+
const onKeyDown = (event) => {
|
|
3592
|
+
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
3593
|
+
if (onSave && activeEditor)
|
|
3594
|
+
onSave(activeEditor);
|
|
3595
|
+
}
|
|
3596
|
+
};
|
|
3597
|
+
const ed = react.useEditor(Object.assign({ extensions: [
|
|
3598
|
+
Typography__default["default"],
|
|
3599
|
+
Link__default["default"],
|
|
3600
|
+
StarterKit__default["default"],
|
|
3601
|
+
Placeholder__default["default"].configure(Object.assign({ placeholder: ({ node }) => {
|
|
3602
|
+
if (node.type.name === "heading") {
|
|
3603
|
+
return "What’s the title?";
|
|
3604
|
+
}
|
|
3605
|
+
return "Can you add some further context?";
|
|
3606
|
+
} }, placeholderOptions)),
|
|
3607
|
+
CharacterCount__default["default"],
|
|
3608
|
+
], content: children || "", editorProps: {
|
|
3609
|
+
handleKeyDown: (view, event) => {
|
|
3610
|
+
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
3611
|
+
return true;
|
|
3612
|
+
}
|
|
3613
|
+
return false;
|
|
3614
|
+
},
|
|
3615
|
+
} }, props));
|
|
3616
|
+
if (!ed) {
|
|
3617
|
+
return null;
|
|
3618
|
+
}
|
|
3619
|
+
// Add here because we want to keep also the listener from the props.
|
|
3620
|
+
ed.on("update", ({ editor }) => setActiveEditor(editor));
|
|
3621
|
+
return (jsxRuntime.jsxs(EditorContainer, Object.assign({ editable: isEditable, validation: props.validation }, { children: [isEditable && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(EditorHeader, { title: headerTitle, validation: props.validation }), hasInlineMenu && (jsxRuntime.jsx(FloatingMenu, { editor: ed, tippyOptions: Object.assign({}, bubbleOptions) }))] })), jsxRuntime.jsx(react.EditorContent, { editor: ed, onKeyDown: onKeyDown }), isEditable && jsxRuntime.jsx(EditorFooter, { saveText: footerSaveText })] })));
|
|
3622
|
+
};
|
|
3623
|
+
|
|
3269
3624
|
const UgCheckbox = styled__default["default"](reactForms.Checkbox) ``;
|
|
3270
3625
|
/**
|
|
3271
3626
|
* A Checkbox lets users select and unselect options from a list.
|
|
@@ -3705,11 +4060,9 @@ const LoginForm = (props) => {
|
|
|
3705
4060
|
} }))] })), props.onBackClick && (jsxRuntime.jsxs(Button, Object.assign({ onClick: props.onBackClick, isBasic: true, style: { marginTop: theme.space.md } }, { children: [jsxRuntime.jsx(Button.StartIcon, { children: jsxRuntime.jsx(SvgChevronLeftStroke, {}) }), props.backToLabel || "Back to UNGUESS"] })))] }));
|
|
3706
4061
|
};
|
|
3707
4062
|
|
|
3708
|
-
var img$
|
|
4063
|
+
var img$1 = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' %5b %3c!ENTITY ns_extend 'http://ns.adobe.com/Extensibility/1.0/'%3e %3c!ENTITY ns_ai 'http://ns.adobe.com/AdobeIllustrator/10.0/'%3e %3c!ENTITY ns_graphs 'http://ns.adobe.com/Graphs/1.0/'%3e %3c!ENTITY ns_vars 'http://ns.adobe.com/Variables/1.0/'%3e %3c!ENTITY ns_imrep 'http://ns.adobe.com/ImageReplacement/1.0/'%3e %3c!ENTITY ns_sfw 'http://ns.adobe.com/SaveForWeb/1.0/'%3e %3c!ENTITY ns_custom 'http://ns.adobe.com/GenericCustomNamespace/1.0/'%3e %3c!ENTITY ns_adobe_xpath 'http://ns.adobe.com/XPath/1.0/'%3e%5d%3e%3csvg enable-background='new 0 0 479.42 154.1' version='1.1' viewBox='0 0 479.42 154.1' xml:space='preserve' xmlns='http://www.w3.org/2000/svg'%3e%3cstyle type='text/css'%3e .st0%7bfill:%23003A57%3b%7d .st1%7bfill:%2354C38A%3b%7d .st2%7bfill:%23B2C4CD%3b%7d .st3%7bfill:%23809CAB%3b%7d .st4%7bfill:%23CCEDDC%3b%7d .st5%7bfill:%23CCD8DD%3b%7d .st6%7bfill:%23E5EBEE%3b%7d .st7%7bfill:%23A9E1C5%3b%7d%3c/style%3e%3cswitch%3e %3cforeignObject width='1' height='1' requiredExtensions='http://ns.adobe.com/AdobeIllustrator/10.0/'%3e %3c/foreignObject%3e %3cg%3e %3cpath class='st0' d='m203.46 43.96c1.66 0 3.06 0.82 3.06 2.56 0 0.83-0.48 1.54-1.36 1.88 1.11 0.31 1.64 1.33 1.64 2.18 0 1.94-1.63 2.52-3.35 2.52h-3.99v-9.13h4zm-2.85 3.93h2.91c1.1 0 1.89-0.4 1.89-1.36 0-1.02-0.82-1.54-1.94-1.54h-2.86v2.9zm0 4.13h2.86c0.95 0 2.22-0.25 2.22-1.49-0.01-1.15-1.17-1.62-2.16-1.62h-2.91v3.11z'/%3e %3cpath class='st0' d='M212.75%2c43.96h6.41V45h-5.29v2.86h5.07v1.06h-5.07v3.09h5.5v1.08h-6.62V43.96z'/%3e %3cpath class='st0' d='m235.85 44.78c-1.16 0-2.4 0.46-2.4 1.56 0 0.99 1.13 1.28 2.48 1.5 1.83 0.29 3.62 0.65 3.62 2.71-0.01 2.05-1.97 2.71-3.72 2.71-1.62 0-3.16-0.59-3.86-2.11l0.94-0.55c0.59 1.08 1.81 1.6 2.93 1.6 1.11 0 2.58-0.35 2.58-1.69 0.01-1.13-1.26-1.46-2.63-1.67-1.76-0.27-3.47-0.68-3.47-2.53-0.03-1.9 1.92-2.55 3.49-2.55 1.36 0 2.65 0.27 3.45 1.66l-0.86 0.53c-0.48-0.79-1.54-1.15-2.55-1.17z'/%3e %3cpath class='st0' d='m250.07 50.22h-0.23l-3.31-4.64v7.51h-1.12v-9.13h1.36l3.21 4.69 3.18-4.69h1.36v9.13h-1.12v-7.49l-3.33 4.62z'/%3e %3cpath class='st0' d='m265.37 43.96 4.09 9.13h-1.23l-0.9-2.01h-5.22l-0.89 2.01h-1.22l4.09-9.13h1.28zm-0.64 1.15-2.16 4.93h4.33l-2.17-4.93z'/%3e %3cpath class='st0' d='m278.31 49.8h-2.22v3.29h-1.13v-9.13h4.15c2.06 0 3.09 1.43 3.09 2.92 0.01 1.38-0.74 2.67-2.62 2.83l3.01 3.38h-1.43l-2.85-3.29zm2.75-2.89c0.01-0.91-0.64-1.93-1.96-1.93h-3.01v3.81h2.96c1.37 0 2.01-0.85 2.01-1.88z'/%3e %3cpath class='st0' d='m287.15 44.98v-1.02h7.35v1.02h-3.12v8.11h-1.12v-8.11h-3.11z'/%3e %3cpath class='st0' d='m313.34 43.96v1.08h-5.2v3.18h4.98v1.06h-4.98v3.82h-1.14v-9.14h6.34z'/%3e %3cpath class='st0' d='m322.57 49.8h-2.22v3.29h-1.13v-9.13h4.15c2.06 0 3.09 1.43 3.09 2.92 0.01 1.38-0.74 2.67-2.62 2.83l3.01 3.38h-1.43l-2.85-3.29zm2.76-2.89c0.01-0.91-0.64-1.93-1.96-1.93h-3.01v3.81h2.96c1.37 0 2.01-0.85 2.01-1.88z'/%3e %3cpath class='st0' d='m341.26 48.55c-0.01 2.39-1.5 4.72-4.63 4.72s-4.64-2.32-4.64-4.72c0-2.65 1.77-4.75 4.65-4.75 3.1 0.02 4.64 2.34 4.62 4.75zm-4.61-3.7c-2.32 0-3.52 1.71-3.52 3.7 0 1.85 1.12 3.65 3.52 3.65s3.48-1.85 3.48-3.65c0.01-1.85-1.1-3.68-3.48-3.7z'/%3e %3cpath class='st0' d='m351.84 50.22h-0.23l-3.31-4.64v7.51h-1.12v-9.13h1.36l3.21 4.69 3.18-4.69h1.36v9.13h-1.12v-7.49l-3.33 4.62z'/%3e %3cpath class='st0' d='m368.77 44.98v-1.02h7.35v1.02h-3.12v8.11h-1.12v-8.11h-3.11z'/%3e %3cpath class='st0' d='m387.97 48.97h-5.22v4.12h-1.13v-9.13h1.13v3.95h5.22v-3.95h1.13v9.13h-1.13v-4.12z'/%3e %3cpath class='st0' d='M395.58%2c43.96H402V45h-5.29v2.86h5.07v1.06h-5.07v3.09h5.5v1.08h-6.62V43.96z'/%3e %3cpath class='st0' d='m418.68 44.78c-1.16 0-2.4 0.46-2.4 1.56 0 0.99 1.13 1.28 2.48 1.5 1.83 0.29 3.62 0.65 3.62 2.71-0.01 2.05-1.97 2.71-3.72 2.71-1.62 0-3.15-0.59-3.86-2.11l0.94-0.55c0.59 1.08 1.81 1.6 2.93 1.6 1.11 0 2.58-0.35 2.58-1.69 0.01-1.13-1.26-1.46-2.63-1.67-1.76-0.27-3.47-0.68-3.47-2.53-0.03-1.9 1.92-2.55 3.49-2.55 1.36 0 2.65 0.27 3.46 1.66l-0.86 0.53c-0.49-0.79-1.54-1.15-2.56-1.17z'/%3e %3cpath class='st0' d='m427.25 44.98v-1.02h7.35v1.02h-3.12v8.11h-1.12v-8.11h-3.11z'/%3e %3cpath class='st0' d='m443.63 43.96 4.09 9.13h-1.23l-0.9-2.01h-5.22l-0.89 2.01h-1.24l4.09-9.13h1.3zm-0.64 1.15-2.16 4.93h4.33l-2.17-4.93z'/%3e %3cpath class='st0' d='m456.57 49.8h-2.22v3.29h-1.13v-9.13h4.15c2.06 0 3.09 1.43 3.09 2.92 0.01 1.38-0.74 2.67-2.62 2.83l3.01 3.38h-1.43l-2.85-3.29zm2.75-2.89c0.01-0.91-0.64-1.93-1.96-1.93h-3.01v3.81h2.96c1.37 0 2.01-0.85 2.01-1.88z'/%3e %3cpath class='st0' d='m465.41 44.98v-1.02h7.35v1.02h-3.12v8.11h-1.12v-8.11h-3.11z'/%3e %3cpath class='st0' d='m157.64 115.24v-24.59c0-6.81-3.65-10.72-10.03-10.72-6 0-9.44 3.91-9.44 10.72v24.59h-8.58v-24.59c0-11.51 6.93-18.66 18.08-18.66 11.26 0 18.54 7.32 18.54 18.66v24.59h-8.57z'/%3e %3cpath class='st0' d='m214.63 116.35c-16.55 0-22.44-11.2-22.44-21.67 0-15.87 11.27-22.98 22.44-22.98 5.93 0 11.53 2.3 15.77 6.49l0.34 0.34-5.54 5.67-0.35-0.33c-2.55-2.44-6.57-4.02-10.23-4.02-8.14 0-13.82 6.1-13.82 14.83 0 6.48 3.63 13.4 13.82 13.4 3.51 0 6.11-0.89 8.89-3.07v-6.64h-10.61v-7.97h19.29v17.55l-0.63 0.76c-4.49 5.14-10.03 7.64-16.93 7.64z'/%3e %3cpath class='st0' d='m277.01 115.24c-11.26 0-18.54-7.32-18.54-18.66v-24.59h8.58v24.59c0 6.81 3.65 10.72 10.02 10.72 6 0 9.44-3.91 9.44-10.72v-24.59h8.58v24.59c0 11.51-6.92 18.66-18.08 18.66z'/%3e %3cpolygon class='st0' points='321.07 115.24 321.07 72.25 354.94 72.25 354.94 80.65 329.64 80.65 329.64 90.13 350.81 90.13 350.81 98.24 329.64 98.24 329.64 106.72 354.94 106.72 354.94 115.24'/%3e %3cpath class='st0' d='m397.19 116.06c-9.41 0-15.35-3.37-18.16-10.29l-0.17-0.41 7.25-3.76 0.2 0.5c1.55 3.85 5.66 6.14 10.99 6.14 2.08 0 8.86-0.4 8.86-5.61 0-3.05-2.94-4.85-8.97-5.5-14.45-1.72-16.4-7.43-16.4-12.79 0-8.43 8.14-12.27 16.22-12.33 8.06 0 13.73 2.88 16.41 8.34l0.21 0.43-6.92 3.56-0.23-0.39c-1.25-2.08-4.91-4.29-9.22-4.29-4.89 0-7.93 1.88-7.93 4.92 0 2.99 3.45 4.01 8.63 4.63 8.73 1.08 16.8 3.45 16.8 13.43-0.02 9.89-9.09 13.42-17.57 13.42z'/%3e %3cpath class='st0' d='m457.03 116.25c-9.4 0-15.33-3.36-18.14-10.28l-0.17-0.41 7.25-3.75 0.2 0.5c1.55 3.84 5.65 6.13 10.98 6.13 2.08 0 8.85-0.4 8.85-5.61 0-3.05-2.93-4.85-8.96-5.49-14.44-1.72-16.38-7.42-16.38-12.78 0-8.42 8.14-12.25 16.2-12.32 8.05 0 13.71 2.88 16.39 8.33l0.21 0.43-6.92 3.56-0.23-0.39c-1.25-2.08-4.9-4.29-9.21-4.29-4.89 0-7.93 1.88-7.93 4.91 0 2.99 3.45 4.01 8.62 4.62 8.72 1.07 16.79 3.44 16.79 13.42-0.01 9.9-9.07 13.42-17.55 13.42z'/%3e %3cpath class='st0' d='m94.63 93.63v4.23h-0.03c-0.36 6.13-3.75 9.62-9.43 9.62-6.03 0-9.62-3.49-10.01-9.62h-0.03v-4.23h-8.58v4.23 0.01 0.05c0.49 10.69 7.66 17.52 18.55 17.52 10.79 0 17.63-6.68 18.09-17.52v-4.29h-8.56z'/%3e %3crect class='st1' x='66.55' y='72.02' width='8.6' height='8.6'/%3e %3crect class='st0' x='94.41' y='72.02' width='8.72' height='8.72'/%3e %3crect class='st2' transform='matrix(-1.837e-16 1 -1 -1.837e-16 103.01 7.8599)' x='43.27' y='51.13' width='8.6' height='8.6'/%3e %3crect class='st3' transform='matrix(-1.837e-16 1 -1 -1.837e-16 126.9 6.4839)' x='55.9' y='62.39' width='8.6' height='8.6'/%3e %3crect class='st4' transform='matrix(-1.837e-16 1 -1 -1.837e-16 94.995 31.397)' x='27.5' y='58.89' width='8.6' height='8.6'/%3e %3crect class='st5' transform='matrix(-1.837e-16 1 -1 -1.837e-16 64.365 27.091)' x='14.34' y='41.43' width='8.6' height='8.6'/%3e %3crect class='st6' transform='matrix(-1.837e-16 1 -1 -1.837e-16 138.08 66.268)' x='31.6' y='97.87' width='8.6' height='8.6'/%3e %3crect class='st7' transform='matrix(-1.837e-16 1 -1 -1.837e-16 137.84 35.856)' x='46.69' y='82.55' width='8.6' height='8.6'/%3e %3c/g%3e%3c/switch%3e%3c/svg%3e";
|
|
3709
4064
|
|
|
3710
|
-
var img
|
|
3711
|
-
|
|
3712
|
-
var img = "data:image/svg+xml,%3csvg width='26' height='26' viewBox='0 0 26 26' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M17.2597 12.9199V14.767H17.2367C17.075 17.4452 15.5974 18.969 13.127 18.969C10.4949 18.969 8.92496 17.4452 8.76335 14.767H8.74026V12.9199H5V14.767V14.7901C5.20779 19.4538 8.34777 22.4322 13.1039 22.4322C17.8139 22.4322 20.7922 19.5231 21 14.7901V12.9199H17.2597Z' fill='%23003A57'/%3e%3cpath d='M8.78629 3.5H5.02295V7.26335H8.78629V3.5Z' fill='%2370C38A'/%3e%3cpath d='M20.9768 3.5H17.1672V7.30952H20.9768V3.5Z' fill='%23003A57'/%3e%3c/svg%3e";
|
|
4065
|
+
var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Generator: Adobe Illustrator 26.0.1%2c SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e%3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 532 311.3' style='enable-background:new 0 0 532 311.3%3b' xml:space='preserve'%3e%3cstyle type='text/css'%3e .st0%7bfill:%23003A57%3b%7d .st1%7bfill:%2354C38A%3b%7d .st2%7bfill:%23B2C4CD%3b%7d .st3%7bfill:%23809CAB%3b%7d .st4%7bfill:%23CCEDDC%3b%7d .st5%7bfill:%23CCD8DD%3b%7d .st6%7bfill:%23E5EBEE%3b%7d .st7%7bfill:%23A9E1C5%3b%7d%3c/style%3e%3cg%3e %3cg%3e %3cpath class='st0' d='M89.4%2c278.2c2.4%2c0%2c4.4%2c1.2%2c4.4%2c3.7c0%2c1.2-0.7%2c2.2-1.9%2c2.7c1.6%2c0.4%2c2.4%2c1.9%2c2.4%2c3.1c0%2c2.8-2.3%2c3.6-4.8%2c3.6 h-5.7v-13.1H89.4z M85.3%2c283.8h4.2c1.6%2c0%2c2.7-0.6%2c2.7-1.9c0-1.5-1.2-2.2-2.8-2.2h-4.1V283.8z M85.3%2c289.8h4.1 c1.4%2c0%2c3.2-0.4%2c3.2-2.1c0-1.6-1.7-2.3-3.1-2.3h-4.2V289.8z'/%3e %3cpath class='st0' d='M101.9%2c278.2h9.2v1.5h-7.6v4.1h7.3v1.5h-7.3v4.4h7.9v1.6h-9.5V278.2z'/%3e %3cpath class='st0' d='M133.5%2c279.4c-1.7%2c0-3.4%2c0.7-3.4%2c2.2c0%2c1.4%2c1.6%2c1.8%2c3.6%2c2.2c2.6%2c0.4%2c5.2%2c0.9%2c5.2%2c3.9c0%2c2.9-2.8%2c3.9-5.3%2c3.9 c-2.3%2c0-4.5-0.8-5.5-3l1.3-0.8c0.8%2c1.6%2c2.6%2c2.3%2c4.2%2c2.3c1.6%2c0%2c3.7-0.5%2c3.7-2.4c0-1.6-1.8-2.1-3.8-2.4c-2.5-0.4-5-1-5-3.6 c0-2.7%2c2.8-3.7%2c5-3.7c1.9%2c0%2c3.8%2c0.4%2c5%2c2.4l-1.2%2c0.8C136.5%2c279.9%2c135%2c279.4%2c133.5%2c279.4z'/%3e %3cpath class='st0' d='M153.1%2c287.2h-0.3l-4.8-6.7v10.8h-1.6v-13.1h1.9l4.6%2c6.7l4.6-6.7h1.9v13.1h-1.6v-10.7L153.1%2c287.2z'/%3e %3cpath class='st0' d='M174.3%2c278.2l5.9%2c13.1h-1.8l-1.3-2.9h-7.5l-1.3%2c2.9h-1.8l5.9-13.1H174.3z M173.4%2c279.8l-3.1%2c7.1h6.2 L173.4%2c279.8z'/%3e %3cpath class='st0' d='M192.1%2c286.6h-3.2v4.7h-1.6v-13.1h5.9c3%2c0%2c4.4%2c2.1%2c4.4%2c4.2c0%2c2-1.1%2c3.8-3.8%2c4.1l4.3%2c4.8h-2.1L192.1%2c286.6z M196%2c282.4c0-1.3-0.9-2.8-2.8-2.8h-4.3v5.5h4.2C195.1%2c285.1%2c196%2c283.9%2c196%2c282.4z'/%3e %3cpath class='st0' d='M204%2c279.7v-1.5h10.6v1.5h-4.5v11.6h-1.6v-11.6H204z'/%3e %3cpath class='st0' d='M240%2c278.2v1.6h-7.5v4.6h7.1v1.5h-7.1v5.5h-1.6v-13.1H240z'/%3e %3cpath class='st0' d='M252.5%2c286.6h-3.2v4.7h-1.6v-13.1h5.9c3%2c0%2c4.4%2c2.1%2c4.4%2c4.2c0%2c2-1.1%2c3.8-3.8%2c4.1l4.3%2c4.8h-2.1L252.5%2c286.6z M256.4%2c282.4c0-1.3-0.9-2.8-2.8-2.8h-4.3v5.5h4.2C255.5%2c285.1%2c256.4%2c283.9%2c256.4%2c282.4z'/%3e %3cpath class='st0' d='M278.5%2c284.8c0%2c3.4-2.2%2c6.8-6.6%2c6.8c-4.5%2c0-6.7-3.3-6.7-6.8c0-3.8%2c2.5-6.8%2c6.7-6.8 C276.3%2c278%2c278.5%2c281.3%2c278.5%2c284.8z M271.9%2c279.5c-3.3%2c0-5.1%2c2.5-5.1%2c5.3c0%2c2.7%2c1.6%2c5.2%2c5.1%2c5.2c3.4%2c0%2c5-2.7%2c5-5.2 C276.9%2c282.1%2c275.3%2c279.5%2c271.9%2c279.5z'/%3e %3cpath class='st0' d='M292.9%2c287.2h-0.3l-4.8-6.7v10.8h-1.6v-13.1h1.9l4.6%2c6.7l4.6-6.7h1.9v13.1h-1.6v-10.7L292.9%2c287.2z'/%3e %3cpath class='st0' d='M315.6%2c279.7v-1.5h10.6v1.5h-4.5v11.6h-1.6v-11.6H315.6z'/%3e %3cpath class='st0' d='M342.4%2c285.4h-7.5v5.9h-1.6v-13.1h1.6v5.7h7.5v-5.7h1.6v13.1h-1.6V285.4z'/%3e %3cpath class='st0' d='M352.6%2c278.2h9.2v1.5h-7.6v4.1h7.3v1.5h-7.3v4.4h7.9v1.6h-9.5V278.2z'/%3e %3cpath class='st0' d='M384.1%2c279.4c-1.7%2c0-3.4%2c0.7-3.4%2c2.2c0%2c1.4%2c1.6%2c1.8%2c3.6%2c2.2c2.6%2c0.4%2c5.2%2c0.9%2c5.2%2c3.9c0%2c2.9-2.8%2c3.9-5.3%2c3.9 c-2.3%2c0-4.5-0.8-5.5-3l1.3-0.8c0.8%2c1.6%2c2.6%2c2.3%2c4.2%2c2.3c1.6%2c0%2c3.7-0.5%2c3.7-2.4c0-1.6-1.8-2.1-3.8-2.4c-2.5-0.4-5-1-5-3.6 c0-2.7%2c2.8-3.7%2c5-3.7c1.9%2c0%2c3.8%2c0.4%2c5%2c2.4l-1.2%2c0.8C387.1%2c279.9%2c385.6%2c279.4%2c384.1%2c279.4z'/%3e %3cpath class='st0' d='M395.7%2c279.7v-1.5h10.6v1.5h-4.5v11.6h-1.6v-11.6H395.7z'/%3e %3cpath class='st0' d='M418.4%2c278.2l5.9%2c13.1h-1.8l-1.3-2.9h-7.5l-1.3%2c2.9h-1.8l5.9-13.1H418.4z M417.5%2c279.8l-3.1%2c7.1h6.2 L417.5%2c279.8z'/%3e %3cpath class='st0' d='M436.2%2c286.6H433v4.7h-1.6v-13.1h5.9c3%2c0%2c4.4%2c2.1%2c4.4%2c4.2c0%2c2-1.1%2c3.8-3.8%2c4.1l4.3%2c4.8h-2.1L436.2%2c286.6z M440.1%2c282.4c0-1.3-0.9-2.8-2.8-2.8H433v5.5h4.2C439.2%2c285.1%2c440.1%2c283.9%2c440.1%2c282.4z'/%3e %3cpath class='st0' d='M448.1%2c279.7v-1.5h10.6v1.5h-4.5v11.6h-1.6v-11.6H448.1z'/%3e %3c/g%3e%3c/g%3e%3cpath class='st0' d='M144.4%2c246.7v-27.4c0-7.6-4.1-11.9-11.2-11.9c-6.7%2c0-10.5%2c4.4-10.5%2c11.9v27.4h-9.6v-27.4 c0-12.8%2c7.7-20.8%2c20.1-20.8c12.5%2c0%2c20.7%2c8.2%2c20.7%2c20.8v27.4H144.4z'/%3e%3cpath class='st0' d='M207.9%2c248c-18.4%2c0-25-12.5-25-24.1c0-17.7%2c12.6-25.6%2c25-25.6c6.6%2c0%2c12.8%2c2.6%2c17.6%2c7.2l0.4%2c0.4l-6.2%2c6.3 l-0.4-0.4c-2.8-2.7-7.3-4.5-11.4-4.5c-9.1%2c0-15.4%2c6.8-15.4%2c16.5c0%2c7.2%2c4%2c14.9%2c15.4%2c14.9c3.9%2c0%2c6.8-1%2c9.9-3.4v-7.4H206v-8.9h21.5 v19.5l-0.7%2c0.9C221.8%2c245.2%2c215.6%2c248%2c207.9%2c248z'/%3e%3cpath class='st0' d='M277.4%2c246.7c-12.5%2c0-20.7-8.2-20.7-20.8v-27.4h9.6V226c0%2c7.6%2c4.1%2c11.9%2c11.2%2c11.9c6.7%2c0%2c10.5-4.4%2c10.5-11.9 v-27.4h9.6V226C297.5%2c238.8%2c289.8%2c246.7%2c277.4%2c246.7z'/%3e%3cpath class='st0' d='M63.4%2c246.7c-12.5%2c0-20.7-8.2-20.7-20.8v-27.4h9.6V226c0%2c7.6%2c4.1%2c11.9%2c11.2%2c11.9c6.7%2c0%2c10.5-4.4%2c10.5-11.9 v-27.4h9.6V226C83.6%2c238.8%2c75.8%2c246.7%2c63.4%2c246.7z'/%3e%3cpolygon class='st0' points='326.4%2c246.7 326.4%2c198.9 364.2%2c198.9 364.2%2c208.2 336%2c208.2 336%2c218.8 359.6%2c218.8 359.6%2c227.8 336%2c227.8 336%2c237.3 364.2%2c237.3 364.2%2c246.7 '/%3e%3cpath class='st0' d='M411.2%2c247.6c-10.5%2c0-17.1-3.7-20.2-11.5l-0.2-0.5l8.1-4.2l0.2%2c0.6c1.7%2c4.3%2c6.3%2c6.8%2c12.2%2c6.8 c2.3%2c0%2c9.9-0.5%2c9.9-6.2c0-3.4-3.3-5.4-10-6.1c-16.1-1.9-18.3-8.3-18.3-14.2c0-9.4%2c9.1-13.7%2c18.1-13.7c9%2c0%2c15.3%2c3.2%2c18.3%2c9.3l0.2%2c0.5 l-7.7%2c4l-0.3-0.4c-1.4-2.3-5.5-4.8-10.3-4.8c-5.4%2c0-8.8%2c2.1-8.8%2c5.5c0%2c3.3%2c3.8%2c4.5%2c9.6%2c5.2c9.7%2c1.2%2c18.7%2c3.8%2c18.7%2c15 C430.7%2c243.7%2c420.7%2c247.6%2c411.2%2c247.6z'/%3e%3cpath class='st0' d='M477.9%2c247.6c-10.5%2c0-17.1-3.7-20.2-11.5l-0.2-0.5l8.1-4.2l0.2%2c0.6c1.7%2c4.3%2c6.3%2c6.8%2c12.2%2c6.8 c2.3%2c0%2c9.9-0.5%2c9.9-6.2c0-3.4-3.3-5.4-10-6.1c-16.1-1.9-18.3-8.3-18.3-14.2c0-9.4%2c9.1-13.7%2c18.1-13.7c9%2c0%2c15.3%2c3.2%2c18.3%2c9.3l0.2%2c0.5 l-7.7%2c4l-0.3-0.4c-1.4-2.3-5.5-4.8-10.3-4.8c-5.4%2c0-8.8%2c2.1-8.8%2c5.5c0%2c3.3%2c3.8%2c4.5%2c9.6%2c5.2c9.7%2c1.2%2c18.7%2c3.8%2c18.7%2c15 C497.4%2c243.7%2c487.3%2c247.6%2c477.9%2c247.6z'/%3e%3cg%3e %3cpath class='st0' d='M296.2%2c105.8v8h-0.1c-0.7%2c11.6-7.1%2c18.2-17.8%2c18.2c-11.4%2c0-18.2-6.6-18.9-18.2h-0.1v-8h-16.2v8h0c0%2c0%2c0%2c0%2c0%2c0 v0.1h0c0.9%2c20.2%2c14.5%2c33.1%2c35.1%2c33.1c20.4%2c0%2c33.3-12.6%2c34.2-33.1h0v-8.1H296.2z'/%3e %3crect x='243.2' y='65' class='st1' width='16.3' height='16.3'/%3e %3crect x='295.8' y='65' class='st0' width='16.5' height='16.5'/%3e %3crect x='199.1' y='25.5' transform='matrix(-1.836970e-16 1 -1 -1.836970e-16 240.8896 -173.6676)' class='st2' width='16.3' height='16.3'/%3e %3crect x='223' y='46.8' transform='matrix(-1.836970e-16 1 -1 -1.836970e-16 286.0495 -176.2692)' class='st3' width='16.3' height='16.3'/%3e %3crect x='169.3' y='40.2' transform='matrix(-1.836970e-16 1 -1 -1.836970e-16 225.7338 -129.1657)' class='st4' width='16.3' height='16.3'/%3e %3crect x='144.4' y='7.1' transform='matrix(-1.836970e-16 1 -1 -1.836970e-16 167.8209 -137.3073)' class='st5' width='16.3' height='16.3'/%3e %3crect x='177.1' y='113.8' transform='matrix(-1.836970e-16 1 -1 -1.836970e-16 307.1887 -63.2329)' class='st6' width='16.3' height='16.3'/%3e %3crect x='205.6' y='84.9' transform='matrix(-1.836970e-16 1 -1 -1.836970e-16 306.7381 -120.7343)' class='st7' width='16.3' height='16.3'/%3e%3c/g%3e%3c/svg%3e";
|
|
3713
4066
|
|
|
3714
4067
|
/**
|
|
3715
4068
|
* A Logo is a visual way to represent a brand logo.
|
|
@@ -3725,9 +4078,9 @@ const Logo = (props) => {
|
|
|
3725
4078
|
return (jsxRuntime.jsx("img", Object.assign({}, props, ((props === null || props === void 0 ? void 0 : props.type) === "horizontal" && { width: `${props.size}` }), ((props === null || props === void 0 ? void 0 : props.type) === "vertical" && { height: `${props.size}` }), ((props === null || props === void 0 ? void 0 : props.type) === "icon" && { width: `${props.size}` } && {
|
|
3726
4079
|
height: `${props.size}`,
|
|
3727
4080
|
}), { className: props.className, alt: (_a = props.alt) !== null && _a !== void 0 ? _a : "Unguess Logo", src: {
|
|
3728
|
-
horizontal: img$
|
|
3729
|
-
vertical: img
|
|
3730
|
-
icon: img,
|
|
4081
|
+
horizontal: img$1,
|
|
4082
|
+
vertical: img,
|
|
4083
|
+
icon: img$2,
|
|
3731
4084
|
}[props.type] })));
|
|
3732
4085
|
};
|
|
3733
4086
|
|
|
@@ -5841,25 +6194,6 @@ const Timeline = (props) => jsxRuntime.jsx(UgTimeline, Object.assign({}, props))
|
|
|
5841
6194
|
Timeline.Item = UgTimelineItem;
|
|
5842
6195
|
Timeline.Content = UgTimelineContent;
|
|
5843
6196
|
|
|
5844
|
-
/**
|
|
5845
|
-
* Tooltips appear when a user hovers or focuses an element. They provide contextual information about the element they are paired with.
|
|
5846
|
-
* <hr>
|
|
5847
|
-
* Used for this:
|
|
5848
|
-
* - To describe the function of an element when it might be ambiguous
|
|
5849
|
-
* - To describe the function of unlabeled icons
|
|
5850
|
-
* Not for this:
|
|
5851
|
-
* - To provide information a user needs to know or remember
|
|
5852
|
-
* - To display truncated text, use a title attribute instead
|
|
5853
|
-
*/
|
|
5854
|
-
const TooltipComponent = (props) => {
|
|
5855
|
-
var _a;
|
|
5856
|
-
const theme = React.useContext(styled.ThemeContext);
|
|
5857
|
-
return jsxRuntime.jsx(reactTooltips.Tooltip, Object.assign({}, props, { zIndex: (_a = props.zIndex) !== null && _a !== void 0 ? _a : theme.levels.front }));
|
|
5858
|
-
};
|
|
5859
|
-
const Tooltip = styled__default["default"](TooltipComponent) `
|
|
5860
|
-
box-shadow: ${({ theme }) => theme.shadows.lg(`${theme.space.base * 3}px`, `${theme.space.base * 5}px`, getColor("neutralHue", 600, theme, 0.15))};
|
|
5861
|
-
`;
|
|
5862
|
-
|
|
5863
6197
|
const StyledTooltipModal = styled__default["default"](reactModals.TooltipModal) `
|
|
5864
6198
|
border-radius: ${({ theme }) => theme.borderRadii.md};
|
|
5865
6199
|
`;
|