@appquality/unguess-design-system 3.1.55 → 3.1.56

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/build/index.js CHANGED
@@ -24,17 +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 containerUtilities = require('@zendeskgarden/container-utilities');
28
- var reactColorpickers = require('@zendeskgarden/react-colorpickers');
29
- var reactModals = require('@zendeskgarden/react-modals');
30
- var reactDropdowns = require('@zendeskgarden/react-dropdowns');
31
- var reactForms = require('@zendeskgarden/react-forms');
32
27
  var react = require('@tiptap/react');
33
28
  var Typography = require('@tiptap/extension-typography');
34
29
  var Link = require('@tiptap/extension-link');
35
30
  var StarterKit = require('@tiptap/starter-kit');
36
31
  var Placeholder = require('@tiptap/extension-placeholder');
37
32
  var CharacterCount = require('@tiptap/extension-character-count');
33
+ var reactForms = require('@zendeskgarden/react-forms');
34
+ var containerUtilities = require('@zendeskgarden/container-utilities');
35
+ var reactColorpickers = require('@zendeskgarden/react-colorpickers');
36
+ var reactModals = require('@zendeskgarden/react-modals');
37
+ var reactDropdowns = require('@zendeskgarden/react-dropdowns');
38
38
  var reactGrid = require('@zendeskgarden/react-grid');
39
39
  var formik = require('formik');
40
40
  var reactChrome = require('@zendeskgarden/react-chrome');
@@ -1220,7 +1220,7 @@ const Divider = styled__default["default"].div `
1220
1220
  margin-bottom: ${({ theme }) => theme.space.xxs};
1221
1221
  background-color: ${({ theme }) => theme.palette.grey["300"]};
1222
1222
  `;
1223
- const Footer$3 = styled__default["default"].div `
1223
+ const Footer$4 = styled__default["default"].div `
1224
1224
  display: flex;
1225
1225
  flex-direction: column;
1226
1226
  margin-top: auto;
@@ -1237,7 +1237,7 @@ const Container$2 = styled__default["default"].div `
1237
1237
  ${wrap ? "flex-wrap: wrap;" : ""}
1238
1238
  `}
1239
1239
  `;
1240
- const CardFooter = (props) => (jsxRuntime.jsxs(Footer$3, { children: [!props.noDivider && jsxRuntime.jsx(Divider, {}), jsxRuntime.jsx(Container$2, Object.assign({}, props, { children: props.children }))] }));
1240
+ const CardFooter = (props) => (jsxRuntime.jsxs(Footer$4, { children: [!props.noDivider && jsxRuntime.jsx(Divider, {}), jsxRuntime.jsx(Container$2, Object.assign({}, props, { children: props.children }))] }));
1241
1241
 
1242
1242
  const UgContentCard = styled__default["default"](reactNotifications.Well) `
1243
1243
  border-radius: ${({ theme }) => theme.borderRadii.lg};
@@ -2291,297 +2291,328 @@ const SentimentChart = ({ data, width, height, margin, tooltip, i18n, }) => {
2291
2291
  ], enableCrosshair: false, isInteractive: true, enableSlices: "x" }) })) }));
2292
2292
  };
2293
2293
 
2294
- const UgClose$1 = styled__default["default"](reactNotifications.Close) `
2295
- display: flex;
2296
- align-items: center;
2297
- justify-content: center;
2298
- width: ${({ theme }) => theme.space.xl};
2299
- height: ${({ theme }) => theme.space.xl};
2294
+ const Footer$3 = styled__default["default"].div `
2295
+ display: flex;
2296
+ flex-direction: row;
2297
+ padding: ${({ theme }) => `${theme.space.sm} 0`};
2298
+ justify-content: flex-end;
2299
+ gap: ${({ theme }) => theme.space.xs};
2300
2300
  `;
2301
- /**
2302
- * Title is a basic component used to display a title. Often used in card headers.
2303
- */
2304
- const Close = (props) => jsxRuntime.jsx(UgClose$1, Object.assign({}, props));
2305
-
2306
- var _circle;
2307
- 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); }
2308
- var SvgCircleFullFill = function SvgCircleFullFill(props) {
2309
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
2310
- xmlns: "http://www.w3.org/2000/svg",
2311
- width: 16,
2312
- height: 16,
2313
- focusable: "false",
2314
- viewBox: "0 0 16 16"
2315
- }, props), _circle || (_circle = /*#__PURE__*/React__namespace.createElement("circle", {
2316
- cx: 8,
2317
- cy: 8,
2318
- r: 8,
2319
- fill: "currentColor"
2320
- })));
2301
+ const ChatFooter = ({ saveText, children, }) => {
2302
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(Footer$3, { children: children }) }));
2321
2303
  };
2322
2304
 
2323
- const Trigger$1 = styled.styled.div `
2324
- display: flex;
2325
- align-items: center;
2326
- justify-content: flex-start;
2327
- cursor: pointer;
2328
- `;
2329
- const StyledColorSwatchDialog = styled.styled(reactColorpickers.ColorSwatchDialog) `
2330
- ${({ disableTooltip }) => disableTooltip &&
2331
- `
2332
- & div[role="tooltip"] {
2333
- display: none;
2334
- }`}
2335
- `;
2336
- const ColorSwatchTrigger = React__default["default"].forwardRef((props, ref) => {
2337
- var _a;
2338
- return (jsxRuntime.jsx(Trigger$1, Object.assign({ ref: ref }, props, { style: Object.assign(Object.assign({}, props.style), { color: props.color }) }, { children: (_a = props.children) !== null && _a !== void 0 ? _a : jsxRuntime.jsx(SvgCircleFullFill, {}) })));
2339
- });
2340
- const ColorSwatch = (_a) => {
2341
- var { colors, rowSize, children, onSelect } = _a, props = __rest(_a, ["colors", "rowSize", "children", "onSelect"]);
2342
- /**
2343
- * Convert the colors to the format expected by the ColorSwatchDialog
2344
- */
2345
- const cleanedColors = colors.map(({ label, value }) => {
2346
- return {
2347
- value,
2348
- label: label !== null && label !== void 0 ? label : "",
2349
- };
2350
- });
2351
- const matrix = containerUtilities.convertToMatrix(cleanedColors, rowSize !== null && rowSize !== void 0 ? rowSize : 7);
2352
- const [color, setColor] = React.useState(matrix[0][0].value);
2353
- const [rowIndex, setRowIndex] = React.useState(0);
2354
- const [colIndex, setColIndex] = React.useState(0);
2355
- const [selectedRowIndex, setSelectedRowIndex] = React.useState(0);
2356
- const [selectedColIndex, setSelectedColIndex] = React.useState(0);
2357
- const handleChange = (rowIdx, colIdx) => {
2358
- setRowIndex(rowIdx);
2359
- setColIndex(colIdx);
2360
- };
2361
- const handleSelect = (rowIdx, colIdx) => {
2362
- setSelectedRowIndex(rowIdx);
2363
- setSelectedColIndex(colIdx);
2364
- };
2365
- return (jsxRuntime.jsx(StyledColorSwatchDialog, Object.assign({ colors: matrix, onChange: handleChange, onSelect: (rowIdx, colIdx) => {
2366
- handleSelect(rowIdx, colIdx);
2367
- setColor(matrix[rowIdx][colIdx].value);
2368
- if (onSelect)
2369
- onSelect(matrix[rowIdx][colIdx].value);
2370
- }, rowIndex: rowIndex, colIndex: colIndex, selectedRowIndex: selectedRowIndex, selectedColIndex: selectedColIndex }, props, { children: jsxRuntime.jsx(ColorSwatchTrigger, Object.assign({ color: color }, { children: children })) })));
2305
+ const ChatContext = React.createContext(null);
2306
+ const ChatContextProvider = ({ onSave, children, }) => {
2307
+ const [isEditing, setIsEditing] = React.useState(false);
2308
+ const [comment, setComment] = React.useState("");
2309
+ const [editor, setEditor] = React.useState();
2310
+ const chatContextValue = React.useMemo(() => ({
2311
+ isEditing,
2312
+ setIsEditing,
2313
+ comment,
2314
+ setComment,
2315
+ editor,
2316
+ setEditor,
2317
+ triggerSave: () => {
2318
+ if (editor && onSave) {
2319
+ onSave(editor);
2320
+ }
2321
+ },
2322
+ }), [comment, setComment, isEditing, setIsEditing, editor, setEditor, onSave]);
2323
+ return (jsxRuntime.jsx(ChatContext.Provider, Object.assign({ value: chatContextValue }, { children: children })));
2324
+ };
2325
+ const useChatContext = () => {
2326
+ const context = React.useContext(ChatContext);
2327
+ if (!context)
2328
+ throw new Error("Provider not found for ChatContextProvider");
2329
+ return context; // Now we can use the context in the component, SAFELY.
2371
2330
  };
2372
2331
 
2373
- const UgDrawer = styled__default["default"](reactModals.DrawerModal) `
2374
- @media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
2375
- width: 100%;
2332
+ const ChatContainer = styled__default["default"](Card) `
2333
+ padding: ${({ theme }) => theme.space.md};
2334
+ &:hover {
2335
+ box-shadow: none;
2376
2336
  }
2337
+ cursor: default;
2377
2338
  `;
2339
+ const MessagesContainer = styled__default["default"].div `
2340
+ padding: ${({ theme }) => `${theme.space.md} 0`};
2341
+ display: flex;
2342
+ flex-direction: column;
2343
+ gap: ${({ theme }) => theme.space.sm};
2344
+ `;
2345
+
2378
2346
  /**
2379
- * A Drawer is a container for supplementary content that is anchored to the edge of a page.
2380
- * <hr>
2381
- * Used for this:
2382
- - To display information or actions that are supplementary to the screen’s primary content
2383
- - To display a list of actions that affect the screen’s content, such as filtering data
2347
+ * Title is a basic component used to display a title. Often used in card headers.
2384
2348
  */
2385
- const Drawer = (props) => jsxRuntime.jsx(UgDrawer, Object.assign({}, props));
2386
- Drawer.Header = reactModals.DrawerModal.Header;
2387
- Drawer.Body = reactModals.DrawerModal.Body;
2388
- Drawer.Footer = reactModals.DrawerModal.Footer;
2389
- Drawer.FooterItem = reactModals.DrawerModal.FooterItem;
2390
- Drawer.Close = reactModals.DrawerModal.Close;
2349
+ const Title$1 = (props) => jsxRuntime.jsx(reactNotifications.Title, Object.assign({}, props));
2391
2350
 
2392
- const Field$1 = styled__default["default"](reactDropdowns.Field) ``;
2393
-
2394
- var index$1 = /*#__PURE__*/Object.freeze({
2395
- __proto__: null,
2396
- Field: Field$1
2397
- });
2351
+ const ChatTitle = styled__default["default"](Title$1) `
2352
+ color: ${({ theme }) => theme.palette.blue[600]};
2353
+ margin: ${({ theme }) => `0 -${theme.space.md}`};
2354
+ padding: ${({ theme }) => `0 ${theme.space.md} ${theme.space.sm}`};
2355
+ border-bottom: ${({ theme }) => `1px solid ${theme.palette.grey[200]}`};
2356
+ `;
2398
2357
 
2399
- const UgItem = styled__default["default"](reactDropdowns.Item) `
2400
- display: flex;
2401
- flex-direction: row;
2402
- align-items: center;
2403
- justify-content: flex-start;
2358
+ const editorStyle = styled.css `
2359
+ > * + * {
2360
+ margin-top: 0.75em;
2361
+ }
2404
2362
 
2405
- > div {
2406
- height: 100%;
2363
+ *,
2364
+ *:before,
2365
+ *:after {
2366
+ box-sizing: border-box;
2407
2367
  }
2408
2368
 
2409
- &[disabled] * {
2410
- opacity: 0.85;
2369
+ h1,
2370
+ h2,
2371
+ h3,
2372
+ h4,
2373
+ h5,
2374
+ h6 {
2375
+ line-height: 1.1;
2376
+ font-weight: 500;
2377
+ color: ${({ theme }) => theme.palette.grey["800"]};
2411
2378
  }
2412
2379
 
2413
- &[disabled] svg {
2414
- opacity: 0.5;
2380
+ h1 {
2381
+ font-size: 2.617924em;
2415
2382
  }
2416
2383
 
2417
- &[disabled]:hover {
2418
- background-color: transparent;
2384
+ h2 {
2385
+ font-size: 1.618em;
2419
2386
  }
2420
- `;
2421
- const Item$1 = (props) => jsxRuntime.jsx(UgItem, Object.assign({}, props));
2422
2387
 
2423
- const Container$1 = styled__default["default"].div `
2424
- display: flex;
2425
- flex-direction: row;
2426
- align-items: center;
2427
- justify-content: flex-start;
2428
- width: 100%;
2429
- `;
2430
- const MetaContainer$1 = styled__default["default"].div `
2431
- display: flex;
2432
- flex-direction: column;
2433
- align-items: flex-start;
2434
- justify-content: center;
2435
- `;
2436
- const ThumbContainer = styled__default["default"].div `
2437
- display: flex;
2438
- flex-direction: row;
2439
- align-items: center;
2440
- justify-content: center;
2441
- margin-right: ${({ theme }) => theme.space.sm};
2442
- width: 100%;
2443
- max-width: ${({ theme }) => theme.components.autocomplete.thumbSize};
2388
+ h3 {
2389
+ font-size: 1.5rem;
2390
+ }
2444
2391
 
2445
- > div {
2446
- height: 100%;
2392
+ h4 {
2393
+ font-size: 1.3rem;
2447
2394
  }
2448
- `;
2449
- const Label$1 = styled__default["default"](MD) `
2450
- font-weight: ${({ theme }) => theme.fontWeights.medium};
2451
- color: ${({ theme }) => theme.palette.grey[800]};
2452
- `;
2453
- const Description$1 = styled__default["default"](SM) `
2454
- color: ${({ theme }) => theme.palette.grey[600]};
2455
- `;
2456
- const Image$1 = React.memo(({ src }) => {
2457
- return jsxRuntime.jsx("img", { src: src });
2458
- });
2459
- const ItemContent = (props) => {
2460
- const { thumbSrc, description, label } = props;
2461
- return (jsxRuntime.jsxs(Container$1, { children: [thumbSrc && (jsxRuntime.jsx(ThumbContainer, { children: jsxRuntime.jsx(Image$1, { src: thumbSrc }) })), jsxRuntime.jsxs(MetaContainer$1, { children: [label && jsxRuntime.jsx(Label$1, Object.assign({ isBold: true }, { children: label })), description && jsxRuntime.jsx(Description$1, { children: description })] })] }));
2462
- };
2463
2395
 
2464
- const StyledMenu = styled__default["default"](reactDropdowns.Menu) `
2465
- width: auto !important;
2466
- `;
2467
- /**
2468
- * A Menu is a wrapper for items elements
2469
- **/
2470
- const Menu = (props) => jsxRuntime.jsx(StyledMenu, Object.assign({}, props));
2471
- // Extras
2472
- const PreviousItem = (props) => (jsxRuntime.jsx(reactDropdowns.PreviousItem, Object.assign({}, props)));
2473
- const Separator = (props) => (jsxRuntime.jsx(reactDropdowns.Separator, Object.assign({}, props)));
2474
- const NextItem = (props) => jsxRuntime.jsx(reactDropdowns.NextItem, Object.assign({}, props));
2475
- const ItemMeta = (props) => (jsxRuntime.jsx(reactDropdowns.ItemMeta, Object.assign({}, props)));
2476
- const MediaBody = (props) => (jsxRuntime.jsx(reactDropdowns.MediaBody, Object.assign({}, props)));
2477
- const MediaFigure = (props) => (jsxRuntime.jsx(reactDropdowns.MediaFigure, Object.assign({}, props)));
2478
- const MediaItem = (props) => (jsxRuntime.jsx(reactDropdowns.MediaItem, Object.assign({}, props)));
2396
+ h5 {
2397
+ font-size: 1.2rem;
2398
+ }
2479
2399
 
2480
- const StyledAutocomplete$1 = styled__default["default"](reactDropdowns.Autocomplete) `
2481
- width: 100%;
2482
- `;
2483
- /**
2484
- * Autocomplete is an input field that filters results as users type. This helps users find something quickly in a large list of options.
2485
- * <hr>
2486
- * Used for this:
2487
- - To filter down a large list of options
2488
- - To quickly find a known option
2489
- * Not for this:
2490
- - To make more than one selection, use Multiselect instead
2491
- */
2492
- const Autocomplete = (props) => (jsxRuntime.jsx(StyledAutocomplete$1, Object.assign({}, props)));
2400
+ h6 {
2401
+ font-size: 1.1rem;
2402
+ }
2493
2403
 
2494
- const StyledLabel$2 = styled__default["default"](reactForms.Label) ``;
2495
- /**
2496
- * A Label is used to specify a title for an input.
2497
- * <hr>
2498
- **/
2499
- const Label = (props) => jsxRuntime.jsx(StyledLabel$2, Object.assign({}, props));
2404
+ /*=====
2405
+ #Lists
2406
+ =====*/
2407
+ ul,
2408
+ ol,
2409
+ dl {
2410
+ padding: 0.618em 0.618rem;
2411
+ margin-left: 1rem;
2412
+ }
2500
2413
 
2501
- const MenuHeaderItem = (props) => (jsxRuntime.jsx(reactDropdowns.HeaderItem, Object.assign({}, props)));
2414
+ ul {
2415
+ list-style: disc;
2416
+ }
2502
2417
 
2503
- const UgSelect = styled__default["default"](reactDropdowns.Select) `
2504
- ${(props) => props.isPrimary &&
2505
- `
2506
- background-color: ${props.theme.palette.blue[600]};
2507
- color: white;
2508
- & svg[data-garden-id="forms.media_figure"] {
2509
- color: white;
2510
- }
2511
- `}
2512
- `;
2513
- /**
2514
- * Select allows a user to pick one option from a list. This helps simplify the UI when space is limited
2515
- * <hr>
2516
- * Used for this:
2517
- - To make a selection from a list of options
2518
- * Not for this:
2519
- - To filter a large list of options, use Autocomplete instead
2520
- - To make multiple selections from a list, use Multiselect instead
2521
- - To select from a list on mobile, use a native Select instead
2522
- */
2523
- const Select = (props) => jsxRuntime.jsx(UgSelect, Object.assign({}, props));
2524
- const StyledDropdown = styled__default["default"].div `
2525
- ${StyledLabel$2} {
2418
+ ol {
2419
+ list-style: decimal;
2420
+ }
2421
+
2422
+ li {
2423
+ padding: 0 0.618rem;
2424
+ line-height: 1.618;
2425
+ }
2426
+
2427
+ dt {
2428
+ text-indent: -0.618rem;
2429
+ }
2430
+
2431
+ dd {
2432
+ margin: 0;
2433
+ padding: 0 0.618rem 0 0.618rem;
2434
+ }
2435
+
2436
+ hr {
2437
+ border: none;
2438
+ border-top: 2px solid rgba(#0d0d0d, 0.1);
2439
+ margin: 2rem 0;
2440
+ }
2441
+
2442
+ p,
2443
+ blockquote {
2444
+ line-height: 1.618;
2445
+ }
2446
+
2447
+ p {
2448
+ font-size: 1rem;
2449
+ margin-bottom: 0.618em;
2450
+ }
2451
+
2452
+ blockquote {
2453
+ border-left: 3px solid;
2454
+ border-color: ${({ theme }) => theme.palette.grey["300"]};
2455
+ margin: 1.618em 0.618rem;
2456
+ padding-left: 0.618em;
2457
+ }
2458
+
2459
+ em,
2460
+ i,
2461
+ cite {
2462
+ font-style: italic;
2463
+ }
2464
+
2465
+ strong,
2466
+ b {
2467
+ font-weight: 500;
2468
+ }
2469
+
2470
+ cite {
2526
2471
  display: block;
2472
+ text-align: right;
2527
2473
  }
2528
- `;
2529
- const StyledMenuHeaderItem = styled__default["default"](MenuHeaderItem) `
2530
- pointer-events: none;
2531
- `;
2532
- const Dropdown = (props) => (jsxRuntime.jsx(StyledDropdown, { children: jsxRuntime.jsx(reactDropdowns.Dropdown, Object.assign({}, props)) }));
2533
- const Message = (props) => jsxRuntime.jsx(reactDropdowns.Message, Object.assign({}, props));
2534
- Dropdown.HeaderItem = StyledMenuHeaderItem;
2535
- Dropdown.Separator = Separator;
2536
2474
 
2537
- const StyledAutocomplete = styled__default["default"](Autocomplete) `
2538
- ${(props) => props.hasSelectedItems &&
2539
- `
2540
- border-color: ${getColor(theme.colors.primaryHue, 600)};
2541
- background-color: ${getColor(theme.colors.primaryHue, 600)};
2542
- color: white;
2543
- & > input, & > svg {
2544
- color: ${props.theme.palette.white};
2475
+ u {
2476
+ text-decoration: none;
2477
+ border-bottom: 1px dotted red;
2478
+ }
2479
+
2480
+ small,
2481
+ sub,
2482
+ sup {
2483
+ font-size: 0.618rem;
2484
+ line-height: 1;
2485
+ }
2486
+
2487
+ sub {
2488
+ vertical-align: sub;
2489
+ }
2490
+
2491
+ sup {
2492
+ vertical-align: super;
2493
+ }
2494
+
2495
+ s,
2496
+ strike,
2497
+ del {
2498
+ text-decoration: strikethrough;
2499
+ }
2500
+
2501
+ ins,
2502
+ del {
2503
+ background-color: rgba(220, 220, 220, 0.25);
2504
+ }
2505
+
2506
+ ins {
2507
+ text-decoration: none;
2508
+ }
2509
+
2510
+ /*
2511
+ mark and selection should be different, so user knows which one they've selected.
2512
+
2513
+ mark and selections:
2514
+ saturation: 44%
2515
+ lightness: 75%
2516
+ Hue is different
2517
+ */
2518
+ mark {
2519
+ background-color: rgba(165, 220, 165, 0.9);
2520
+ }
2521
+
2522
+ ::selection {
2523
+ background-color: rgba(165, 220, 220, 0.9);
2524
+ }
2525
+
2526
+ /* Because mark and selection have same saturation, brightenss, mark won't easily stand out if it's selected */
2527
+ mark::selection {
2528
+ background-color: rgba(165, 220, 110, 0.9);
2529
+ }
2530
+
2531
+ /* dfn and dt both do the same thing: denote a term to be defined */
2532
+ dfn,
2533
+ dt {
2534
+ font-style: oblique;
2535
+ font-weight: 700;
2536
+ text-transform: capitalize;
2537
+ }
2538
+
2539
+ code {
2540
+ background-color: ${({ theme }) => theme.palette.grey[200]};
2541
+ color: ${({ theme }) => theme.palette.red[600]};
2542
+ padding: 0.2rem 0.3rem;
2543
+ border-radius: 4px;
2544
+ }
2545
+
2546
+ pre {
2547
+ background: #0d0d0d;
2548
+ color: #fff;
2549
+ font-family: "JetBrainsMono", monospace;
2550
+ padding: 0.75rem 1rem;
2551
+ border-radius: 0.5rem;
2552
+
2553
+ code {
2554
+ color: inherit;
2555
+ padding: 0;
2556
+ background: none;
2557
+ font-size: 0.8rem;
2545
2558
  }
2546
- `}
2547
- `;
2548
- const CounterMultiselect = ({ options, label, i18n, onChange, isCompact, }) => {
2549
- var _a, _b;
2550
- const [selectedItems, setSelectedItems] = React.useState(options.filter((o) => o.selected));
2551
- const [inputValue, setInputValue] = React.useState("");
2552
- const [matchingOptions, setMatchingOptions] = React.useState(options);
2553
- React.useEffect(() => {
2554
- setMatchingOptions(options.filter((option) => option.label
2555
- .trim()
2556
- .toLowerCase()
2557
- .indexOf(inputValue.trim().toLowerCase()) !== -1));
2558
- }, [inputValue, options]);
2559
- React.useEffect(() => {
2560
- setSelectedItems(options.filter((o) => o.selected));
2561
- }, [options]);
2562
- const hasSelectedItems = selectedItems.length > 0;
2563
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Dropdown, Object.assign({ inputValue: inputValue, selectedItems: selectedItems, onSelect: (items) => {
2564
- if (items) {
2565
- setSelectedItems(items);
2566
- if (onChange)
2567
- onChange(items);
2568
- }
2569
- }, downshiftProps: {
2570
- itemToString: (item) => item && item.itemId,
2571
- }, onStateChange: (changes) => {
2572
- if (changes.isOpen === false)
2573
- setInputValue("");
2574
- }, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(Field$1, { children: [label && jsxRuntime.jsx(Label, { children: label }), jsxRuntime.jsx(StyledAutocomplete, Object.assign({ isCompact: isCompact, hasSelectedItems: hasSelectedItems }, { children: hasSelectedItems
2575
- ? (i18n === null || i18n === void 0 ? void 0 : i18n.counterText)
2576
- ? i18n.counterText(selectedItems.length)
2577
- : `Items (${selectedItems.length})`
2578
- : (_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)))) }))] })) }));
2579
- };
2559
+ }
2560
+
2561
+ kbd,
2562
+ samp,
2563
+ data {
2564
+ background-color: rgba(165, 165, 165, 0.2);
2565
+ }
2566
+
2567
+ kbd {
2568
+ font-size: 0.75rem;
2569
+ padding: 0.25ex 0.5ex;
2570
+ border: 1px solid rgb(193, 193, 193);
2571
+ border-radius: 3px;
2572
+ }
2573
+
2574
+ /*Treat samp like a mini blockquote. because basically you're quoting what the computer would do*/
2575
+ samp,
2576
+ data {
2577
+ padding: 0 10px;
2578
+ }
2579
+
2580
+ var,
2581
+ data {
2582
+ font-style: italic;
2583
+ }
2584
+
2585
+ samp {
2586
+ border-left: 5px solid rgb(193, 193, 193);
2587
+ }
2588
+
2589
+ data {
2590
+ padding: 0 10px;
2591
+ }
2592
+
2593
+ /* Placeholder (at the top) */
2594
+ /*p.is-editor-empty:first-child::before {
2595
+ content: attr(data-placeholder);
2596
+ float: left;
2597
+ color: #ced4da;
2598
+ pointer-events: none;
2599
+ height: 0;
2600
+ }*/
2601
+
2602
+ /* Placeholder (on every new line) */
2603
+ .is-empty::before {
2604
+ content: attr(data-placeholder);
2605
+ float: left;
2606
+ color: #ced4da;
2607
+ pointer-events: none;
2608
+ height: 0;
2609
+ }
2610
+ `;
2580
2611
 
2581
2612
  var _path$o;
2582
- 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); }
2613
+ 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); }
2583
2614
  var SvgBoldFill = function SvgBoldFill(props) {
2584
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
2615
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
2585
2616
  xmlns: "http://www.w3.org/2000/svg",
2586
2617
  width: 16,
2587
2618
  height: 16,
@@ -2594,9 +2625,9 @@ var SvgBoldFill = function SvgBoldFill(props) {
2594
2625
  };
2595
2626
 
2596
2627
  var _path$n;
2597
- 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); }
2628
+ 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); }
2598
2629
  var SvgItalicFill = function SvgItalicFill(props) {
2599
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
2630
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
2600
2631
  xmlns: "http://www.w3.org/2000/svg",
2601
2632
  width: 16,
2602
2633
  height: 16,
@@ -2612,9 +2643,9 @@ var SvgItalicFill = function SvgItalicFill(props) {
2612
2643
  };
2613
2644
 
2614
2645
  var _path$m, _path2$6;
2615
- 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); }
2646
+ 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); }
2616
2647
  var SvgQuoteFill = function SvgQuoteFill(props) {
2617
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
2648
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
2618
2649
  xmlns: "http://www.w3.org/2000/svg",
2619
2650
  width: 16,
2620
2651
  height: 16,
@@ -2633,9 +2664,9 @@ var SvgQuoteFill = function SvgQuoteFill(props) {
2633
2664
  };
2634
2665
 
2635
2666
  var _g$4;
2636
- 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); }
2667
+ 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); }
2637
2668
  var SvgH1Fill = function SvgH1Fill(props) {
2638
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
2669
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
2639
2670
  xmlns: "http://www.w3.org/2000/svg",
2640
2671
  width: 16,
2641
2672
  height: 16,
@@ -2663,9 +2694,9 @@ var SvgH1Fill = function SvgH1Fill(props) {
2663
2694
  };
2664
2695
 
2665
2696
  var _g$3;
2666
- 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); }
2697
+ 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); }
2667
2698
  var SvgH2Fill = function SvgH2Fill(props) {
2668
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
2699
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
2669
2700
  xmlns: "http://www.w3.org/2000/svg",
2670
2701
  width: 16,
2671
2702
  height: 16,
@@ -2693,9 +2724,9 @@ var SvgH2Fill = function SvgH2Fill(props) {
2693
2724
  };
2694
2725
 
2695
2726
  var _g$2;
2696
- function _extends$p() { _extends$p = 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$p.apply(this, arguments); }
2727
+ 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); }
2697
2728
  var SvgH3Fill = function SvgH3Fill(props) {
2698
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
2729
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
2699
2730
  xmlns: "http://www.w3.org/2000/svg",
2700
2731
  width: 16,
2701
2732
  height: 16,
@@ -2722,317 +2753,448 @@ var SvgH3Fill = function SvgH3Fill(props) {
2722
2753
  }))));
2723
2754
  };
2724
2755
 
2725
- const StyledIconButton = styled__default["default"](IconButton) ``;
2726
- const MenuContainer = styled__default["default"](Card) `
2727
- padding: ${({ theme }) => theme.space.xxs};
2728
-
2729
- ${StyledIconButton} {
2730
- :first-child {
2731
- border-top-right-radius: 0;
2732
- border-bottom-right-radius: 0;
2733
- }
2734
-
2735
- :last-child {
2736
- border-top-left-radius: 0;
2737
- border-bottom-left-radius: 0;
2738
- }
2739
-
2740
- :not(:first-child):not(:last-child) {
2741
- border-radius: 0;
2742
- }
2743
- }
2744
- `;
2745
- const FloatingMenu = (props) => {
2746
- const { editor } = props;
2747
- if (!editor) {
2748
- return null;
2749
- }
2750
- 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") }))] })) })));
2751
- };
2752
-
2753
- const Header$1 = styled__default["default"].div `
2754
- display: flex;
2755
- flex-direction: column;
2756
- padding: ${({ theme }) => theme.space.xs} ${({ theme }) => theme.space.md};
2757
- border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
2758
- `;
2759
- const Title$1 = styled__default["default"](MD) `
2760
- ${props => reactTheming.retrieveComponentStyles("text.primary", props)}
2761
- ${props => props.validation === "success" && reactTheming.retrieveComponentStyles("text.success", props)}
2762
- ${props => props.validation === "warning" && reactTheming.retrieveComponentStyles("text.warning", props)}
2763
- ${props => props.validation === "error" && reactTheming.retrieveComponentStyles("text.danger", props)}
2764
- `;
2765
- const EditorHeader = (props) => {
2766
- const { title, validation } = props;
2767
- return (jsxRuntime.jsx(Header$1, { children: jsxRuntime.jsx(Title$1, Object.assign({ isBold: true, validation: validation }, { children: title || "Write" })) }));
2768
- };
2769
-
2770
- const Footer$2 = styled__default["default"].div `
2771
- display: flex;
2772
- flex-direction: row;
2773
- padding: ${({ theme }) => theme.space.sm} 16px;
2774
- background-color: ${({ theme }) => theme.palette.grey[100]};
2775
- `;
2776
- const Text = styled__default["default"](SM) `
2777
- line-height: 1.7;
2778
- `;
2779
- const EditorFooter = ({ saveText }) => {
2780
- return jsxRuntime.jsxs(Footer$2, { children: [jsxRuntime.jsxs(Tag, { children: [isMac() ? "Cmd" : "Ctrl", "+enter"] }), "\u00A0", jsxRuntime.jsx(Text, { children: saveText || "to save" })] });
2781
- };
2782
-
2783
- const editorStyle = styled.css `
2784
- > * + * {
2785
- margin-top: 0.75em;
2786
- }
2787
-
2788
- *,
2789
- *:before,
2790
- *:after {
2791
- box-sizing: border-box;
2792
- }
2793
-
2794
- h1,
2795
- h2,
2796
- h3,
2797
- h4,
2798
- h5,
2799
- h6 {
2800
- line-height: 1.1;
2801
- font-weight: 500;
2802
- color: ${({ theme }) => theme.palette.grey["800"]};
2803
- }
2804
-
2805
- h1 {
2806
- font-size: 2.617924em;
2807
- }
2808
-
2809
- h2 {
2810
- font-size: 1.618em;
2811
- }
2812
-
2813
- h3 {
2814
- font-size: 1.5rem;
2815
- }
2816
-
2817
- h4 {
2818
- font-size: 1.3rem;
2819
- }
2820
-
2821
- h5 {
2822
- font-size: 1.2rem;
2823
- }
2824
-
2825
- h6 {
2826
- font-size: 1.1rem;
2827
- }
2828
-
2829
- /*=====
2830
- #Lists
2831
- =====*/
2832
- ul,
2833
- ol,
2834
- dl {
2835
- padding: 0.618em 0.618rem;
2836
- margin-left: 1rem;
2837
- }
2838
-
2839
- ul {
2840
- list-style: disc;
2841
- }
2842
-
2843
- ol {
2844
- list-style: decimal;
2845
- }
2846
-
2847
- li {
2848
- padding: 0 0.618rem;
2849
- line-height: 1.618;
2850
- }
2851
-
2852
- dt {
2853
- text-indent: -0.618rem;
2854
- }
2855
-
2856
- dd {
2857
- margin: 0;
2858
- padding: 0 0.618rem 0 0.618rem;
2859
- }
2860
-
2861
- hr {
2862
- border: none;
2863
- border-top: 2px solid rgba(#0d0d0d, 0.1);
2864
- margin: 2rem 0;
2865
- }
2756
+ const StyledIconButton = styled__default["default"](IconButton) ``;
2757
+ const MenuContainer = styled__default["default"](Card) `
2758
+ padding: ${({ theme }) => theme.space.xxs};
2866
2759
 
2867
- p,
2868
- blockquote {
2869
- line-height: 1.618;
2870
- }
2760
+ ${StyledIconButton} {
2761
+ :first-child {
2762
+ border-top-right-radius: 0;
2763
+ border-bottom-right-radius: 0;
2764
+ }
2871
2765
 
2872
- p {
2873
- font-size: 1rem;
2874
- margin-bottom: 0.618em;
2875
- }
2766
+ :last-child {
2767
+ border-top-left-radius: 0;
2768
+ border-bottom-left-radius: 0;
2769
+ }
2876
2770
 
2877
- blockquote {
2878
- border-left: 3px solid;
2879
- border-color: ${({ theme }) => theme.palette.grey["300"]};
2880
- margin: 1.618em 0.618rem;
2881
- padding-left: 0.618em;
2771
+ :not(:first-child):not(:last-child) {
2772
+ border-radius: 0;
2773
+ }
2882
2774
  }
2775
+ `;
2776
+ const FloatingMenu = (props) => {
2777
+ const { editor } = props;
2778
+ if (!editor) {
2779
+ return null;
2780
+ }
2781
+ 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") }))] })) })));
2782
+ };
2883
2783
 
2884
- em,
2885
- i,
2886
- cite {
2887
- font-style: italic;
2888
- }
2784
+ const ChatBoxContainer = styled__default["default"].div `
2785
+ display: flex;
2786
+ border-top: 1px solid ${({ theme }) => theme.palette.grey[200]};
2787
+ margin: ${({ theme }) => `0 -${theme.space.md}`};
2788
+ padding: ${({ theme }) => theme.space.md};
2789
+ `;
2790
+ const EditorContainer$1 = styled__default["default"](reactForms.FauxInput) `
2791
+ margin-left: ${({ theme }) => theme.space.sm};
2792
+ .ProseMirror {
2793
+ padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};
2794
+ background-color: #fff;
2795
+ min-height: 36px;
2796
+ outline: none;
2797
+ max-height: 210px;
2798
+ overflow-y: auto;
2889
2799
 
2890
- strong,
2891
- b {
2892
- font-weight: 500;
2800
+ ${editorStyle}
2893
2801
  }
2802
+ `;
2803
+ /**
2804
+ * CommentBox is a wrapper around Editor component
2805
+ * <br>
2806
+ * It's a rich text WYSIWYG editors.
2807
+ * <hr>
2808
+ * Used for this:
2809
+ - To add chat feature
2810
+ - To develop collaborative text editing
2811
+
2812
+ Not for this:
2813
+ - Simple text input, use textarea instead.
2814
+ */
2815
+ const CommentBox = (_a) => {
2816
+ var _b;
2817
+ var { onSave, placeholderOptions } = _a, props = __rest(_a, ["onSave", "placeholderOptions"]);
2818
+ const { children, hasInlineMenu, bubbleOptions, author } = props;
2819
+ const { setEditor, triggerSave } = useChatContext();
2820
+ const onKeyDown = (event) => {
2821
+ if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
2822
+ triggerSave();
2823
+ }
2824
+ };
2825
+ const ed = react.useEditor(Object.assign({ extensions: [
2826
+ Typography__default["default"],
2827
+ Link__default["default"],
2828
+ StarterKit__default["default"],
2829
+ Placeholder__default["default"].configure(Object.assign({ placeholder: ({ node }) => {
2830
+ if (node.type.name === "heading") {
2831
+ return "What’s the title?";
2832
+ }
2833
+ return "Can you add some further context?";
2834
+ } }, placeholderOptions)),
2835
+ CharacterCount__default["default"],
2836
+ ], content: children || "", editorProps: {
2837
+ handleKeyDown: (view, event) => {
2838
+ if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
2839
+ return true;
2840
+ }
2841
+ return false;
2842
+ },
2843
+ } }, props));
2844
+ if (!ed) {
2845
+ return null;
2846
+ }
2847
+ // Add here because we want to keep also the listener from the props.
2848
+ ed.on("create", ({ editor }) => setEditor(editor));
2849
+ ed.on("update", ({ editor }) => setEditor(editor));
2850
+ 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 }) })] })] }));
2851
+ };
2894
2852
 
2895
- cite {
2896
- display: block;
2897
- text-align: right;
2898
- }
2853
+ const CommentCard = styled.styled(Card) `
2854
+ padding: ${({ theme }) => `${theme.space.base * 3}px ${theme.space.sm}`};
2855
+ `;
2856
+ const Comment = ({ author, children, }) => {
2857
+ return (jsxRuntime.jsxs(CommentCard, { children: [jsxRuntime.jsx(Title$1, { children: author }), children] }));
2858
+ };
2899
2859
 
2900
- u {
2901
- text-decoration: none;
2902
- border-bottom: 1px dotted red;
2903
- }
2860
+ /**
2861
+ * CommentBox is a wrapper around Editor component
2862
+ * <br>
2863
+ * It's a rich text WYSIWYG editors.
2864
+ * <hr>
2865
+ * Used for this:
2866
+ - To add chat feature
2867
+ - To develop collaborative text editing
2868
+
2869
+ Not for this:
2870
+ - Simple text input, use textarea instead.
2871
+ */
2872
+ const Chat = (props) => (
2873
+ // <ChatProvider onSave={onSave}>
2874
+ jsxRuntime.jsx(ChatContainer, { children: props.children })
2875
+ // </ChatProvider>
2876
+ );
2877
+ Chat.Header = ChatTitle;
2878
+ Chat.Comments = MessagesContainer;
2879
+ Chat.Input = CommentBox;
2880
+ Chat.Footer = ChatFooter;
2904
2881
 
2905
- small,
2906
- sub,
2907
- sup {
2908
- font-size: 0.618rem;
2909
- line-height: 1;
2910
- }
2882
+ const UgClose$1 = styled__default["default"](reactNotifications.Close) `
2883
+ display: flex;
2884
+ align-items: center;
2885
+ justify-content: center;
2886
+ width: ${({ theme }) => theme.space.xl};
2887
+ height: ${({ theme }) => theme.space.xl};
2888
+ `;
2889
+ /**
2890
+ * Title is a basic component used to display a title. Often used in card headers.
2891
+ */
2892
+ const Close = (props) => jsxRuntime.jsx(UgClose$1, Object.assign({}, props));
2911
2893
 
2912
- sub {
2913
- vertical-align: sub;
2914
- }
2894
+ var _circle;
2895
+ function _extends$p() { _extends$p = 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$p.apply(this, arguments); }
2896
+ var SvgCircleFullFill = function SvgCircleFullFill(props) {
2897
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
2898
+ xmlns: "http://www.w3.org/2000/svg",
2899
+ width: 16,
2900
+ height: 16,
2901
+ focusable: "false",
2902
+ viewBox: "0 0 16 16"
2903
+ }, props), _circle || (_circle = /*#__PURE__*/React__namespace.createElement("circle", {
2904
+ cx: 8,
2905
+ cy: 8,
2906
+ r: 8,
2907
+ fill: "currentColor"
2908
+ })));
2909
+ };
2915
2910
 
2916
- sup {
2917
- vertical-align: super;
2918
- }
2911
+ const Trigger$1 = styled.styled.div `
2912
+ display: flex;
2913
+ align-items: center;
2914
+ justify-content: flex-start;
2915
+ cursor: pointer;
2916
+ `;
2917
+ const StyledColorSwatchDialog = styled.styled(reactColorpickers.ColorSwatchDialog) `
2918
+ ${({ disableTooltip }) => disableTooltip &&
2919
+ `
2920
+ & div[role="tooltip"] {
2921
+ display: none;
2922
+ }`}
2923
+ `;
2924
+ const ColorSwatchTrigger = React__default["default"].forwardRef((props, ref) => {
2925
+ var _a;
2926
+ return (jsxRuntime.jsx(Trigger$1, Object.assign({ ref: ref }, props, { style: Object.assign(Object.assign({}, props.style), { color: props.color }) }, { children: (_a = props.children) !== null && _a !== void 0 ? _a : jsxRuntime.jsx(SvgCircleFullFill, {}) })));
2927
+ });
2928
+ const ColorSwatch = (_a) => {
2929
+ var { colors, rowSize, children, onSelect } = _a, props = __rest(_a, ["colors", "rowSize", "children", "onSelect"]);
2930
+ /**
2931
+ * Convert the colors to the format expected by the ColorSwatchDialog
2932
+ */
2933
+ const cleanedColors = colors.map(({ label, value }) => {
2934
+ return {
2935
+ value,
2936
+ label: label !== null && label !== void 0 ? label : "",
2937
+ };
2938
+ });
2939
+ const matrix = containerUtilities.convertToMatrix(cleanedColors, rowSize !== null && rowSize !== void 0 ? rowSize : 7);
2940
+ const [color, setColor] = React.useState(matrix[0][0].value);
2941
+ const [rowIndex, setRowIndex] = React.useState(0);
2942
+ const [colIndex, setColIndex] = React.useState(0);
2943
+ const [selectedRowIndex, setSelectedRowIndex] = React.useState(0);
2944
+ const [selectedColIndex, setSelectedColIndex] = React.useState(0);
2945
+ const handleChange = (rowIdx, colIdx) => {
2946
+ setRowIndex(rowIdx);
2947
+ setColIndex(colIdx);
2948
+ };
2949
+ const handleSelect = (rowIdx, colIdx) => {
2950
+ setSelectedRowIndex(rowIdx);
2951
+ setSelectedColIndex(colIdx);
2952
+ };
2953
+ return (jsxRuntime.jsx(StyledColorSwatchDialog, Object.assign({ colors: matrix, onChange: handleChange, onSelect: (rowIdx, colIdx) => {
2954
+ handleSelect(rowIdx, colIdx);
2955
+ setColor(matrix[rowIdx][colIdx].value);
2956
+ if (onSelect)
2957
+ onSelect(matrix[rowIdx][colIdx].value);
2958
+ }, rowIndex: rowIndex, colIndex: colIndex, selectedRowIndex: selectedRowIndex, selectedColIndex: selectedColIndex }, props, { children: jsxRuntime.jsx(ColorSwatchTrigger, Object.assign({ color: color }, { children: children })) })));
2959
+ };
2919
2960
 
2920
- s,
2921
- strike,
2922
- del {
2923
- text-decoration: strikethrough;
2961
+ const UgDrawer = styled__default["default"](reactModals.DrawerModal) `
2962
+ @media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
2963
+ width: 100%;
2924
2964
  }
2965
+ `;
2966
+ /**
2967
+ * A Drawer is a container for supplementary content that is anchored to the edge of a page.
2968
+ * <hr>
2969
+ * Used for this:
2970
+ - To display information or actions that are supplementary to the screen’s primary content
2971
+ - To display a list of actions that affect the screen’s content, such as filtering data
2972
+ */
2973
+ const Drawer = (props) => jsxRuntime.jsx(UgDrawer, Object.assign({}, props));
2974
+ Drawer.Header = reactModals.DrawerModal.Header;
2975
+ Drawer.Body = reactModals.DrawerModal.Body;
2976
+ Drawer.Footer = reactModals.DrawerModal.Footer;
2977
+ Drawer.FooterItem = reactModals.DrawerModal.FooterItem;
2978
+ Drawer.Close = reactModals.DrawerModal.Close;
2925
2979
 
2926
- ins,
2927
- del {
2928
- background-color: rgba(220, 220, 220, 0.25);
2929
- }
2980
+ const Field$1 = styled__default["default"](reactDropdowns.Field) ``;
2930
2981
 
2931
- ins {
2932
- text-decoration: none;
2933
- }
2982
+ var index$1 = /*#__PURE__*/Object.freeze({
2983
+ __proto__: null,
2984
+ Field: Field$1
2985
+ });
2934
2986
 
2935
- /*
2936
- mark and selection should be different, so user knows which one they've selected.
2937
-
2938
- mark and selections:
2939
- saturation: 44%
2940
- lightness: 75%
2941
- Hue is different
2942
- */
2943
- mark {
2944
- background-color: rgba(165, 220, 165, 0.9);
2945
- }
2987
+ const UgItem = styled__default["default"](reactDropdowns.Item) `
2988
+ display: flex;
2989
+ flex-direction: row;
2990
+ align-items: center;
2991
+ justify-content: flex-start;
2946
2992
 
2947
- ::selection {
2948
- background-color: rgba(165, 220, 220, 0.9);
2993
+ > div {
2994
+ height: 100%;
2949
2995
  }
2950
2996
 
2951
- /* Because mark and selection have same saturation, brightenss, mark won't easily stand out if it's selected */
2952
- mark::selection {
2953
- background-color: rgba(165, 220, 110, 0.9);
2997
+ &[disabled] * {
2998
+ opacity: 0.85;
2954
2999
  }
2955
3000
 
2956
- /* dfn and dt both do the same thing: denote a term to be defined */
2957
- dfn,
2958
- dt {
2959
- font-style: oblique;
2960
- font-weight: 700;
2961
- text-transform: capitalize;
3001
+ &[disabled] svg {
3002
+ opacity: 0.5;
2962
3003
  }
2963
3004
 
2964
- code {
2965
- background-color: ${({ theme }) => theme.palette.grey[200]};
2966
- color: ${({ theme }) => theme.palette.red[600]};
2967
- padding: 0.2rem 0.3rem;
2968
- border-radius: 4px;
3005
+ &[disabled]:hover {
3006
+ background-color: transparent;
2969
3007
  }
3008
+ `;
3009
+ const Item$1 = (props) => jsxRuntime.jsx(UgItem, Object.assign({}, props));
2970
3010
 
2971
- pre {
2972
- background: #0d0d0d;
2973
- color: #fff;
2974
- font-family: "JetBrainsMono", monospace;
2975
- padding: 0.75rem 1rem;
2976
- border-radius: 0.5rem;
3011
+ const Container$1 = styled__default["default"].div `
3012
+ display: flex;
3013
+ flex-direction: row;
3014
+ align-items: center;
3015
+ justify-content: flex-start;
3016
+ width: 100%;
3017
+ `;
3018
+ const MetaContainer$1 = styled__default["default"].div `
3019
+ display: flex;
3020
+ flex-direction: column;
3021
+ align-items: flex-start;
3022
+ justify-content: center;
3023
+ `;
3024
+ const ThumbContainer = styled__default["default"].div `
3025
+ display: flex;
3026
+ flex-direction: row;
3027
+ align-items: center;
3028
+ justify-content: center;
3029
+ margin-right: ${({ theme }) => theme.space.sm};
3030
+ width: 100%;
3031
+ max-width: ${({ theme }) => theme.components.autocomplete.thumbSize};
2977
3032
 
2978
- code {
2979
- color: inherit;
2980
- padding: 0;
2981
- background: none;
2982
- font-size: 0.8rem;
2983
- }
3033
+ > div {
3034
+ height: 100%;
2984
3035
  }
3036
+ `;
3037
+ const Label$1 = styled__default["default"](MD) `
3038
+ font-weight: ${({ theme }) => theme.fontWeights.medium};
3039
+ color: ${({ theme }) => theme.palette.grey[800]};
3040
+ `;
3041
+ const Description$1 = styled__default["default"](SM) `
3042
+ color: ${({ theme }) => theme.palette.grey[600]};
3043
+ `;
3044
+ const Image$1 = React.memo(({ src }) => {
3045
+ return jsxRuntime.jsx("img", { src: src });
3046
+ });
3047
+ const ItemContent = (props) => {
3048
+ const { thumbSrc, description, label } = props;
3049
+ return (jsxRuntime.jsxs(Container$1, { children: [thumbSrc && (jsxRuntime.jsx(ThumbContainer, { children: jsxRuntime.jsx(Image$1, { src: thumbSrc }) })), jsxRuntime.jsxs(MetaContainer$1, { children: [label && jsxRuntime.jsx(Label$1, Object.assign({ isBold: true }, { children: label })), description && jsxRuntime.jsx(Description$1, { children: description })] })] }));
3050
+ };
2985
3051
 
2986
- kbd,
2987
- samp,
2988
- data {
2989
- background-color: rgba(165, 165, 165, 0.2);
2990
- }
3052
+ const StyledMenu = styled__default["default"](reactDropdowns.Menu) `
3053
+ width: auto !important;
3054
+ `;
3055
+ /**
3056
+ * A Menu is a wrapper for items elements
3057
+ **/
3058
+ const Menu = (props) => jsxRuntime.jsx(StyledMenu, Object.assign({}, props));
3059
+ // Extras
3060
+ const PreviousItem = (props) => (jsxRuntime.jsx(reactDropdowns.PreviousItem, Object.assign({}, props)));
3061
+ const Separator = (props) => (jsxRuntime.jsx(reactDropdowns.Separator, Object.assign({}, props)));
3062
+ const NextItem = (props) => jsxRuntime.jsx(reactDropdowns.NextItem, Object.assign({}, props));
3063
+ const ItemMeta = (props) => (jsxRuntime.jsx(reactDropdowns.ItemMeta, Object.assign({}, props)));
3064
+ const MediaBody = (props) => (jsxRuntime.jsx(reactDropdowns.MediaBody, Object.assign({}, props)));
3065
+ const MediaFigure = (props) => (jsxRuntime.jsx(reactDropdowns.MediaFigure, Object.assign({}, props)));
3066
+ const MediaItem = (props) => (jsxRuntime.jsx(reactDropdowns.MediaItem, Object.assign({}, props)));
2991
3067
 
2992
- kbd {
2993
- font-size: 0.75rem;
2994
- padding: 0.25ex 0.5ex;
2995
- border: 1px solid rgb(193, 193, 193);
2996
- border-radius: 3px;
2997
- }
3068
+ const StyledAutocomplete$1 = styled__default["default"](reactDropdowns.Autocomplete) `
3069
+ width: 100%;
3070
+ `;
3071
+ /**
3072
+ * Autocomplete is an input field that filters results as users type. This helps users find something quickly in a large list of options.
3073
+ * <hr>
3074
+ * Used for this:
3075
+ - To filter down a large list of options
3076
+ - To quickly find a known option
3077
+ * Not for this:
3078
+ - To make more than one selection, use Multiselect instead
3079
+ */
3080
+ const Autocomplete = (props) => (jsxRuntime.jsx(StyledAutocomplete$1, Object.assign({}, props)));
2998
3081
 
2999
- /*Treat samp like a mini blockquote. because basically you're quoting what the computer would do*/
3000
- samp,
3001
- data {
3002
- padding: 0 10px;
3003
- }
3082
+ const StyledLabel$2 = styled__default["default"](reactForms.Label) ``;
3083
+ /**
3084
+ * A Label is used to specify a title for an input.
3085
+ * <hr>
3086
+ **/
3087
+ const Label = (props) => jsxRuntime.jsx(StyledLabel$2, Object.assign({}, props));
3004
3088
 
3005
- var,
3006
- data {
3007
- font-style: italic;
3008
- }
3089
+ const MenuHeaderItem = (props) => (jsxRuntime.jsx(reactDropdowns.HeaderItem, Object.assign({}, props)));
3009
3090
 
3010
- samp {
3011
- border-left: 5px solid rgb(193, 193, 193);
3091
+ const UgSelect = styled__default["default"](reactDropdowns.Select) `
3092
+ ${(props) => props.isPrimary &&
3093
+ `
3094
+ background-color: ${props.theme.palette.blue[600]};
3095
+ color: white;
3096
+ & svg[data-garden-id="forms.media_figure"] {
3097
+ color: white;
3098
+ }
3099
+ `}
3100
+ `;
3101
+ /**
3102
+ * Select allows a user to pick one option from a list. This helps simplify the UI when space is limited
3103
+ * <hr>
3104
+ * Used for this:
3105
+ - To make a selection from a list of options
3106
+ * Not for this:
3107
+ - To filter a large list of options, use Autocomplete instead
3108
+ - To make multiple selections from a list, use Multiselect instead
3109
+ - To select from a list on mobile, use a native Select instead
3110
+ */
3111
+ const Select = (props) => jsxRuntime.jsx(UgSelect, Object.assign({}, props));
3112
+ const StyledDropdown = styled__default["default"].div `
3113
+ ${StyledLabel$2} {
3114
+ display: block;
3012
3115
  }
3116
+ `;
3117
+ const StyledMenuHeaderItem = styled__default["default"](MenuHeaderItem) `
3118
+ pointer-events: none;
3119
+ `;
3120
+ const Dropdown = (props) => (jsxRuntime.jsx(StyledDropdown, { children: jsxRuntime.jsx(reactDropdowns.Dropdown, Object.assign({}, props)) }));
3121
+ const Message = (props) => jsxRuntime.jsx(reactDropdowns.Message, Object.assign({}, props));
3122
+ Dropdown.HeaderItem = StyledMenuHeaderItem;
3123
+ Dropdown.Separator = Separator;
3013
3124
 
3014
- data {
3015
- padding: 0 10px;
3016
- }
3125
+ const StyledAutocomplete = styled__default["default"](Autocomplete) `
3126
+ ${(props) => props.hasSelectedItems &&
3127
+ `
3128
+ border-color: ${getColor(theme.colors.primaryHue, 600)};
3129
+ background-color: ${getColor(theme.colors.primaryHue, 600)};
3130
+ color: white;
3131
+ & > input, & > svg {
3132
+ color: ${props.theme.palette.white};
3133
+ }
3134
+ `}
3135
+ `;
3136
+ const CounterMultiselect = ({ options, label, i18n, onChange, isCompact, }) => {
3137
+ var _a, _b;
3138
+ const [selectedItems, setSelectedItems] = React.useState(options.filter((o) => o.selected));
3139
+ const [inputValue, setInputValue] = React.useState("");
3140
+ const [matchingOptions, setMatchingOptions] = React.useState(options);
3141
+ React.useEffect(() => {
3142
+ setMatchingOptions(options.filter((option) => option.label
3143
+ .trim()
3144
+ .toLowerCase()
3145
+ .indexOf(inputValue.trim().toLowerCase()) !== -1));
3146
+ }, [inputValue, options]);
3147
+ React.useEffect(() => {
3148
+ setSelectedItems(options.filter((o) => o.selected));
3149
+ }, [options]);
3150
+ const hasSelectedItems = selectedItems.length > 0;
3151
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Dropdown, Object.assign({ inputValue: inputValue, selectedItems: selectedItems, onSelect: (items) => {
3152
+ if (items) {
3153
+ setSelectedItems(items);
3154
+ if (onChange)
3155
+ onChange(items);
3156
+ }
3157
+ }, downshiftProps: {
3158
+ itemToString: (item) => item && item.itemId,
3159
+ }, onStateChange: (changes) => {
3160
+ if (changes.isOpen === false)
3161
+ setInputValue("");
3162
+ }, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(Field$1, { children: [label && jsxRuntime.jsx(Label, { children: label }), jsxRuntime.jsx(StyledAutocomplete, Object.assign({ isCompact: isCompact, hasSelectedItems: hasSelectedItems }, { children: hasSelectedItems
3163
+ ? (i18n === null || i18n === void 0 ? void 0 : i18n.counterText)
3164
+ ? i18n.counterText(selectedItems.length)
3165
+ : `Items (${selectedItems.length})`
3166
+ : (_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)))) }))] })) }));
3167
+ };
3017
3168
 
3018
- /* Placeholder (at the top) */
3019
- /*p.is-editor-empty:first-child::before {
3020
- content: attr(data-placeholder);
3021
- float: left;
3022
- color: #ced4da;
3023
- pointer-events: none;
3024
- height: 0;
3025
- }*/
3169
+ const Header$1 = styled__default["default"].div `
3170
+ display: flex;
3171
+ flex-direction: column;
3172
+ padding: ${({ theme }) => theme.space.xs} ${({ theme }) => theme.space.md};
3173
+ border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
3174
+ `;
3175
+ const Title = styled__default["default"](MD) `
3176
+ ${props => reactTheming.retrieveComponentStyles("text.primary", props)}
3177
+ ${props => props.validation === "success" && reactTheming.retrieveComponentStyles("text.success", props)}
3178
+ ${props => props.validation === "warning" && reactTheming.retrieveComponentStyles("text.warning", props)}
3179
+ ${props => props.validation === "error" && reactTheming.retrieveComponentStyles("text.danger", props)}
3180
+ `;
3181
+ const EditorHeader = (props) => {
3182
+ const { title, validation } = props;
3183
+ return (jsxRuntime.jsx(Header$1, { children: jsxRuntime.jsx(Title, Object.assign({ isBold: true, validation: validation }, { children: title || "Write" })) }));
3184
+ };
3026
3185
 
3027
- /* Placeholder (on every new line) */
3028
- .is-empty::before {
3029
- content: attr(data-placeholder);
3030
- float: left;
3031
- color: #ced4da;
3032
- pointer-events: none;
3033
- height: 0;
3034
- }
3035
- `;
3186
+ const Footer$2 = styled__default["default"].div `
3187
+ display: flex;
3188
+ flex-direction: row;
3189
+ padding: ${({ theme }) => theme.space.sm} 16px;
3190
+ background-color: ${({ theme }) => theme.palette.grey[100]};
3191
+ `;
3192
+ const Text = styled__default["default"](SM) `
3193
+ line-height: 1.7;
3194
+ `;
3195
+ const EditorFooter = ({ saveText }) => {
3196
+ return jsxRuntime.jsxs(Footer$2, { children: [jsxRuntime.jsxs(Tag, { children: [isMac() ? "Cmd" : "Ctrl", "+enter"] }), "\u00A0", jsxRuntime.jsx(Text, { children: saveText || "to save" })] });
3197
+ };
3036
3198
 
3037
3199
  const EditorContainer = styled__default["default"](reactForms.FauxInput) `
3038
3200
 
@@ -3479,11 +3641,6 @@ const Spinner = (props) => jsxRuntime.jsx(UgSpinner, Object.assign({}, props));
3479
3641
  */
3480
3642
  const Dots = (props) => jsxRuntime.jsx(reactLoaders.Dots, Object.assign({}, props));
3481
3643
 
3482
- /**
3483
- * Title is a basic component used to display a title. Often used in card headers.
3484
- */
3485
- const Title = (props) => jsxRuntime.jsx(reactNotifications.Title, Object.assign({}, props));
3486
-
3487
3644
  var _path$k;
3488
3645
  function _extends$m() { _extends$m = 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$m.apply(this, arguments); }
3489
3646
  var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
@@ -3540,7 +3697,7 @@ const StyledCard = styled__default["default"](ContainerCard) `
3540
3697
  const LoginForm = (props) => {
3541
3698
  const { width } = useWindowSize();
3542
3699
  const breakpointMd = parseInt(theme.breakpoints.md, 10);
3543
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledCard, Object.assign({}, (width > breakpointMd && { isFloating: true }), props.card, { children: [jsxRuntime.jsx(Title, Object.assign({ style: {
3700
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledCard, Object.assign({}, (width > breakpointMd && { isFloating: true }), props.card, { children: [jsxRuntime.jsx(Title$1, Object.assign({ style: {
3544
3701
  textAlign: "center",
3545
3702
  marginTop: theme.space.sm,
3546
3703
  marginBottom: theme.space.lg,
@@ -4047,7 +4204,7 @@ const UgAnchor = styled__default["default"](reactButtons.Anchor).attrs((props) =
4047
4204
  }) `
4048
4205
  ${(props) => reactTheming.retrieveComponentStyles(CLOSE_COMPONENT_ID, props)};
4049
4206
  `;
4050
- const UgTitle = styled__default["default"](Title).attrs((props) => {
4207
+ const UgTitle = styled__default["default"](Title$1).attrs((props) => {
4051
4208
  var _a;
4052
4209
  return ({
4053
4210
  "data-custom-id": (_a = props["data-custom-id"]) !== null && _a !== void 0 ? _a : TITLE_COMPONENT_ID,
@@ -5829,6 +5986,9 @@ exports.CampaignExperientialIcon = SvgCampaignExperiential;
5829
5986
  exports.CampaignFunctionalIcon = SvgCampaignFunctional;
5830
5987
  exports.Caption = Caption;
5831
5988
  exports.Card = Card;
5989
+ exports.Chat = Chat;
5990
+ exports.ChatContext = ChatContext;
5991
+ exports.ChatProvider = ChatContextProvider;
5832
5992
  exports.Checkbox = Checkbox;
5833
5993
  exports.CheckboxCard = CheckboxCard;
5834
5994
  exports.Chrome = Chrome;
@@ -5836,6 +5996,7 @@ exports.Close = Close;
5836
5996
  exports.Code = Code;
5837
5997
  exports.Col = Col;
5838
5998
  exports.ColorSwatch = ColorSwatch;
5999
+ exports.Comment = Comment;
5839
6000
  exports.ContainerCard = ContainerCard;
5840
6001
  exports.Content = Content$1;
5841
6002
  exports.CounterMultiselect = CounterMultiselect;
@@ -5938,7 +6099,7 @@ exports.TextLabel = TextLabel;
5938
6099
  exports.Textarea = Textarea;
5939
6100
  exports.Tiles = Tiles;
5940
6101
  exports.Timeline = Timeline;
5941
- exports.Title = Title;
6102
+ exports.Title = Title$1;
5942
6103
  exports.ToastProvider = ToastProvider;
5943
6104
  exports.Toggle = Toggle;
5944
6105
  exports.Tooltip = Tooltip;
@@ -5952,4 +6113,5 @@ exports.XXXL = XXXL;
5952
6113
  exports.cardCmponentStyle = cardCmponentStyle;
5953
6114
  exports.getColor = getColor;
5954
6115
  exports.theme = theme;
6116
+ exports.useChatContext = useChatContext;
5955
6117
  exports.useToast = useToast;