@financial-times/qanda-ui 0.0.1-beta.22 → 0.0.1-beta.24

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.
@@ -31,7 +31,7 @@ function ExpertDrawer() {
31
31
  }
32
32
  return ((0, jsx_runtime_1.jsx)(Overlay_1.default, { title: qanda_1.PRODUCT_NAME, closeCallback: () => dispatch((0, expertSlice_1.closeExpertForm)()), options: {
33
33
  shadow: true,
34
- noBackground: true,
34
+ allowInteraction: true,
35
35
  }, children: (0, jsx_runtime_1.jsx)("div", { className: "o-comments", id: "o-comments-stream", "data-o-component": "o-comments", "data-o-comments-article-id": storyId, "data-o-comments-article-url": `https://www.ft.com/content/${storyId}`, "data-o-comments-use-staging-environment": useStaging, "data-o-comments-title": title }) }));
36
36
  }
37
37
  exports.default = ExpertDrawer;
@@ -7,10 +7,7 @@ const jsx_runtime_1 = require("preact/jsx-runtime");
7
7
  const o3_button_1 = require("@financial-times/o3-button");
8
8
  const classnames_1 = __importDefault(require("classnames"));
9
9
  function Overlay({ title, children, closeCallback, options = {}, }) {
10
- return ((0, jsx_runtime_1.jsxs)("div", { className: "overlay", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)([
11
- 'overlay__outer',
12
- { 'overlay__outer--no-background': options.noBackground },
13
- ]) }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)([
10
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "overlay", children: [!options.allowInteraction && (0, jsx_runtime_1.jsx)("div", { className: "overlay__outer" }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)([
14
11
  'overlay__inner',
15
12
  { 'overlay__inner--shadow': options.shadow },
16
13
  ]), children: [(0, jsx_runtime_1.jsx)("div", { className: "overlay__header", children: (0, jsx_runtime_1.jsxs)("div", { className: "overlay__header-bar", children: [(0, jsx_runtime_1.jsx)("span", { className: "o3-type-body-highlight overlay__header-title", children: title }), (0, jsx_runtime_1.jsx)(o3_button_1.Button, { attributes: { className: 'overlay__header-close' }, iconOnly: true, icon: "cross", label: "Close", type: "ghost", theme: "mono", onClick: () => closeCallback() })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "overlay__content", children: children })] })] }));
@@ -26,7 +26,7 @@ function ExpertDrawer() {
26
26
  }
27
27
  return (_jsx(Overlay, { title: PRODUCT_NAME, closeCallback: () => dispatch(closeExpertForm()), options: {
28
28
  shadow: true,
29
- noBackground: true,
29
+ allowInteraction: true,
30
30
  }, children: _jsx("div", { className: "o-comments", id: "o-comments-stream", "data-o-component": "o-comments", "data-o-comments-article-id": storyId, "data-o-comments-article-url": `https://www.ft.com/content/${storyId}`, "data-o-comments-use-staging-environment": useStaging, "data-o-comments-title": title }) }));
31
31
  }
32
32
  export default ExpertDrawer;
@@ -2,10 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
2
2
  import { Button } from '@financial-times/o3-button';
3
3
  import classNames from 'classnames';
4
4
  function Overlay({ title, children, closeCallback, options = {}, }) {
5
- return (_jsxs("div", { className: "overlay", children: [_jsx("div", { className: classNames([
6
- 'overlay__outer',
7
- { 'overlay__outer--no-background': options.noBackground },
8
- ]) }), _jsxs("div", { className: classNames([
5
+ return (_jsxs("div", { className: "overlay", children: [!options.allowInteraction && _jsx("div", { className: "overlay__outer" }), _jsxs("div", { className: classNames([
9
6
  'overlay__inner',
10
7
  { 'overlay__inner--shadow': options.shadow },
11
8
  ]), children: [_jsx("div", { className: "overlay__header", children: _jsxs("div", { className: "overlay__header-bar", children: [_jsx("span", { className: "o3-type-body-highlight overlay__header-title", children: title }), _jsx(Button, { attributes: { className: 'overlay__header-close' }, iconOnly: true, icon: "cross", label: "Close", type: "ghost", theme: "mono", onClick: () => closeCallback() })] }) }), _jsx("div", { className: "overlay__content", children: children })] })] }));
package/dist/qanda.scss CHANGED
@@ -308,6 +308,14 @@ $app-header-color: #007acc;
308
308
  color: var(--o3-color-, #33302e);
309
309
  float: right;
310
310
  margin-top: var(--o3-spacing-2xs);
311
+ &
312
+ :is(
313
+ .o3-button.o3-button--ghost[data-o3-theme='neutral'],
314
+ :where([data-o3-theme='neutral']) .o3-button.o3-button--ghost
315
+ ):hover {
316
+ background-color: unset;
317
+ border: unset;
318
+ }
311
319
  }
312
320
 
313
321
  /* Inlined from ../components/Loader/styles.scss */
@@ -368,7 +376,7 @@ $app-header-color: #007acc;
368
376
  .qanda-container {
369
377
  .overlay {
370
378
  position: fixed;
371
- top: 0;
379
+ top: var(--safe-area-inset-top, 0px);
372
380
  left: 0;
373
381
  /* Just going on top of the main navigation */
374
382
  z-index: 100;
@@ -384,10 +392,7 @@ $app-header-color: #007acc;
384
392
  z-index: 19;
385
393
  animation: fadeIn 1s ease forwards;
386
394
  background: var(--o3-color-palette-black-90);
387
- }
388
-
389
- .overlay__outer--no-background {
390
- background: none;
395
+ margin-top: calc(var(--safe-area-inset-top, 0px) / 2);
391
396
  }
392
397
 
393
398
  .overlay__inner {
@@ -672,7 +677,7 @@ $app-header-color: #007acc;
672
677
 
673
678
  .qanda-container {
674
679
  .qanda__stream {
675
- margin-top: var(--o3-spacing-l);
680
+ margin: var(--o3-spacing-l) var(--o3-spacing-xs5) 0 var(--o3-spacing-xs5);
676
681
  }
677
682
 
678
683
  .qanda__stream-title {
@@ -706,6 +711,7 @@ $app-header-color: #007acc;
706
711
  display: flex;
707
712
  flex-direction: column;
708
713
  gap: var(--o3-spacing-4xs);
714
+ margin-left: var(--o3-spacing-2xs);
709
715
  }
710
716
 
711
717
  .message-box__content-link {
@@ -1,5 +1,5 @@
1
1
  type OverlayOptions = {
2
- noBackground?: boolean;
2
+ allowInteraction?: boolean;
3
3
  shadow?: boolean;
4
4
  };
5
5
  type OverlayProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/qanda-ui",
3
- "version": "0.0.1-beta.22",
3
+ "version": "0.0.1-beta.24",
4
4
  "description": "Components for the Live Q&A (AKA Ask an Expert) UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",