@luscii-healthtech/web-ui 16.1.0 → 16.2.0

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.
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import ReactModal from "react-modal";
2
3
  import { PrimaryButtonProps } from "../ButtonV2/ButtonProps.type";
3
4
  import { FullPageModalActions } from "./subcomponents/FullPageModalActions";
4
5
  export type FullPageModalProps = {
@@ -34,6 +35,7 @@ export type FullPageModalProps = {
34
35
  };
35
36
  interface StaticComponents {
36
37
  Actions: typeof FullPageModalActions;
38
+ setAppElement: typeof ReactModal.setAppElement;
37
39
  }
38
40
  export declare const FullPageModal: React.FC<FullPageModalProps> & StaticComponents;
39
41
  export {};
@@ -1,6 +1,11 @@
1
1
  import React from "react";
2
+ import ReactModal from "react-modal";
2
3
  import { ModalBaseProps } from "./ModalBase";
3
4
  export type ModalProps = Omit<ModalBaseProps, "title" | "withExtraMarginTop"> & {
4
5
  title: string;
5
6
  };
6
- export declare const Modal: React.FC<ModalProps>;
7
+ interface StaticProperties {
8
+ setAppElement: typeof ReactModal.setAppElement;
9
+ }
10
+ export declare const Modal: React.FC<ModalProps> & StaticProperties;
11
+ export {};
@@ -1,6 +1,20 @@
1
1
  import React from "react";
2
2
  export declare const weekdayValues: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
3
3
  export type Weekday = (typeof weekdayValues)[number];
4
+ /**
5
+ * The previous implementation of this component used the index of the
6
+ * weekday to indicate which days were selected. This function converts
7
+ * values from the new API to the old API, for ease of migration.
8
+ */
9
+ declare function weekdayNameToIndex(weekday: Weekday): 0 | 1 | 2 | 3 | 4 | 5 | 6;
10
+ declare function weekdayNameToIndex(weekdays: Weekday[]): 0 | 1 | 2 | 3 | 4 | 5 | 6;
11
+ /**
12
+ * The previous implementation of this component used the index of the
13
+ * weekday to indicate which days were selected. This function converts
14
+ * values from the new API to the old API, for ease of migration.
15
+ */
16
+ declare function indexToWeekdayName(index: number): Weekday;
17
+ declare function indexToWeekdayName(indexes: number[]): Weekday[];
4
18
  export type Props = {
5
19
  /**
6
20
  * The locale in which the weekday letters are displayed. Also
@@ -14,9 +28,15 @@ export type Props = {
14
28
  */
15
29
  selectedOptions: Weekday[];
16
30
  onChange: (weekdayValues: Weekday[]) => void;
31
+ id?: string;
17
32
  className?: string;
18
33
  };
34
+ type StaticProperties = {
35
+ weekdayNameToIndex: typeof weekdayNameToIndex;
36
+ indexToWeekdayName: typeof indexToWeekdayName;
37
+ };
19
38
  /**
20
39
  * A component that allows the user to select multiple weekdays.
21
40
  */
22
- export declare const WeekdaysPicker: (props: Props) => React.JSX.Element;
41
+ export declare const WeekdaysPicker: React.FC<Props> & StaticProperties;
42
+ export {};
@@ -1740,7 +1740,6 @@ const ModalFooter = (props) => {
1740
1740
  const ModalBase = (props) => {
1741
1741
  var _a;
1742
1742
  const { size = "medium", withContentPaddingY = true, isOpen = false } = props;
1743
- ReactModal__default.default.setAppElement("body");
1744
1743
  return React__namespace.default.createElement(
1745
1744
  "div",
1746
1745
  { "data-test-id": "clicking-propagation-preventer", onClick: (event) => {
@@ -1774,6 +1773,7 @@ const ModalBase = (props) => {
1774
1773
  const Modal = (props) => {
1775
1774
  return React__namespace.default.createElement(ModalBase, Object.assign({}, props));
1776
1775
  };
1776
+ Modal.setAppElement = ReactModal__default.default.setAppElement;
1777
1777
 
1778
1778
  var css_248z$f = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-avatar {\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: center;\n width: 64px;\n box-sizing: border-box;\n}\n.cweb-avatar > .avatar-content-container {\n display: flex;\n justify-content: center;\n flex-direction: row;\n align-items: center;\n width: 64px;\n height: 64px;\n border-radius: 50%;\n box-sizing: border-box;\n}\n.cweb-avatar > .avatar-content-container > .avatar-image {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n}\n.cweb-avatar > .avatar-content-container > .avatar-initials-text {\n font-family: \"Inter\", \"Roboto\", sans-serif;\n font-size: 24px;\n font-weight: 300;\n line-height: 1;\n color: #737373;\n margin: 0;\n pointer-events: none;\n}\n.cweb-avatar.size-large {\n width: 128px;\n}\n.cweb-avatar.size-large > .avatar-content-container {\n width: 128px;\n height: 128px;\n}\n.cweb-avatar.size-large > .avatar-content-container > .avatar-initials-text {\n font-size: 48px;\n}\n.cweb-avatar.size-medium {\n width: 64px;\n}\n.cweb-avatar.size-medium > .avatar-content-container {\n width: 64px;\n height: 64px;\n}\n.cweb-avatar.size-medium > .avatar-content-container > .avatar-initials-text {\n font-size: 24px;\n}\n.cweb-avatar.size-small {\n width: 36px;\n}\n.cweb-avatar.size-small > .avatar-content-container {\n width: 36px;\n height: 36px;\n}\n.cweb-avatar.size-small > .avatar-content-container > .avatar-initials-text {\n font-size: 14px;\n}\n.cweb-avatar.type-editable {\n cursor: pointer;\n}\n.cweb-avatar.type-editable > .avatar-content-container {\n position: relative;\n border-color: #0074dd;\n background-color: #ffffff;\n}\n.cweb-avatar.type-editable > .avatar-content-container:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n border-radius: 50%;\n transition: 0.4s ease background-color;\n}\n.cweb-avatar.type-editable > .avatar-content-container:hover:after {\n background-color: rgba(0, 116, 221, 0.1);\n}\n.cweb-avatar.type-editable > .avatar-content-container > .avatar-initials-text {\n color: #0074dd;\n}\n.cweb-avatar.type-readonly > .avatar-content-container {\n border-color: #cccccc;\n background-color: #f1f5f9;\n}\n.cweb-avatar.type-readonly > .avatar-content-container > .avatar-initials-text {\n color: #64748b;\n}\n@media (max-width: 767px) {\n .cweb-avatar.size-large {\n width: 64px;\n }\n .cweb-avatar.size-large > .avatar-content-container {\n width: 64px;\n height: 64px;\n }\n .cweb-avatar.size-large > .avatar-content-container > .avatar-initials-text {\n font-size: 24px;\n }\n .cweb-avatar.size-large.display-initials > .avatar-content-container {\n border-width: 0.5px;\n }\n}";
1779
1779
  styleInject(css_248z$f);
@@ -5277,7 +5277,7 @@ const FullPageModalActions = (props) => {
5277
5277
  return React__namespace.default.createElement("div", { className: "ui-flex ui-flex-row ui-flex-wrap ui-justify-end ui-gap-3" }, props.children);
5278
5278
  };
5279
5279
 
5280
- const FullPageModal = ({ children, dataTestId, isOpen, onCloseClick, primaryButtonProps, actions, title }) => {
5280
+ const FullPageModal = ({ children, dataTestId, isOpen = false, onCloseClick, primaryButtonProps, actions, title }) => {
5281
5281
  return React__namespace.default.createElement(
5282
5282
  ReactModal__default.default,
5283
5283
  { isOpen, contentLabel: title, overlayClassName: "ui-fixed ui-inset-0 ui-overflow-x-hidden ui-overflow-y-auto ui-z-20", onRequestClose: onCloseClick, shouldFocusAfterRender: false, className: "ui-h-full ui-w-full", data: { "test-id": dataTestId !== null && dataTestId !== void 0 ? dataTestId : "react-modal" } },
@@ -5290,6 +5290,7 @@ const FullPageModal = ({ children, dataTestId, isOpen, onCloseClick, primaryButt
5290
5290
  );
5291
5291
  };
5292
5292
  FullPageModal.Actions = FullPageModalActions;
5293
+ FullPageModal.setAppElement = ReactModal__default.default.setAppElement;
5293
5294
 
5294
5295
  const Actions = (props) => {
5295
5296
  const { children, className } = props, rest = __rest(props, ["children", "className"]);