@medplum/react 0.9.22 → 0.9.25

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.
@@ -1370,6 +1370,76 @@ div.medplum-nav-menu-container {
1370
1370
  color: var(--medplum-blue-500);
1371
1371
  }
1372
1372
 
1373
+ .medplum-signin-buttons {
1374
+ display: flex;
1375
+ justify-content: space-between;
1376
+ line-height: 32px;
1377
+ }
1378
+
1379
+ .medplum-signin-buttons > div {
1380
+ display: flex;
1381
+ align-items: center;
1382
+ }
1383
+
1384
+ .medplum-signin-buttons a {
1385
+ font-size: 12px;
1386
+ margin-right: 16px;
1387
+ }
1388
+
1389
+ .medplum-signin-buttons label {
1390
+ font-size: 12px;
1391
+ }
1392
+
1393
+ .medplum-signin-google-container {
1394
+ padding: 20px 0 10px 0;
1395
+ margin: 20px 0 10px 0;
1396
+ text-align: center;
1397
+ display: flex;
1398
+ align-items: center;
1399
+ justify-content: center;
1400
+ }
1401
+
1402
+ .medplum-signin-separator {
1403
+ padding: 12px 0;
1404
+ margin: 12px 0;
1405
+ overflow: hidden;
1406
+ text-align: center;
1407
+ font-size: var(--medplum-font-small);
1408
+ }
1409
+
1410
+ .medplum-signin-separator::before,
1411
+ .medplum-signin-separator::after {
1412
+ background-color: var(--medplum-gray-400);
1413
+ content: '';
1414
+ display: inline-block;
1415
+ height: 0.1px;
1416
+ position: relative;
1417
+ vertical-align: middle;
1418
+ width: 50%;
1419
+ }
1420
+
1421
+ .medplum-signin-separator::before {
1422
+ right: 0.5em;
1423
+ margin-left: -50%;
1424
+ }
1425
+
1426
+ .medplum-signin-separator::after {
1427
+ left: 0.5em;
1428
+ margin-right: -50%;
1429
+ }
1430
+
1431
+ .medplum-left {
1432
+ text-align: left;
1433
+ }
1434
+
1435
+ .medplum-center {
1436
+ text-align: center;
1437
+ }
1438
+
1439
+ .medplum-right {
1440
+ text-align: right;
1441
+ }
1442
+
1373
1443
  .medplum-status {
1374
1444
  padding: 1px 6px;
1375
1445
  font-size: 80%;
@@ -1569,61 +1639,6 @@ div.medplum-nav-menu-container {
1569
1639
 
1570
1640
  .grecaptcha-badge { visibility: hidden; }
1571
1641
 
1572
- .medplum-signin {
1573
- max-width: 400px;
1574
- }
1575
-
1576
- .medplum-signin-buttons {
1577
- display: flex;
1578
- justify-content: space-between;
1579
- line-height: 32px;
1580
- }
1581
-
1582
- .medplum-signin-buttons > div {
1583
- display: flex;
1584
- align-items: center;
1585
- }
1586
-
1587
- .medplum-signin-buttons a {
1588
- font-size: 12px;
1589
- margin-right: 16px;
1590
- }
1591
-
1592
- .medplum-signin-buttons label {
1593
- font-size: 12px;
1594
- }
1595
-
1596
- .medplum-signin-google-container {
1597
- padding: 20px 0 10px 0;
1598
- margin: 20px 0 10px 0;
1599
- text-align: center;
1600
- display: flex;
1601
- align-items: center;
1602
- justify-content: center;
1603
- border-top: 0.1px solid var(--medplum-gray-200);
1604
- }
1605
-
1606
- .medplum-signin-google-icon {
1607
- margin-right: 8px;
1608
- }
1609
-
1610
- .medplum-signin-google-icon svg {
1611
- display: inline-block;
1612
- vertical-align: top;
1613
- }
1614
-
1615
- .medplum-left {
1616
- text-align: left;
1617
- }
1618
-
1619
- .medplum-center {
1620
- text-align: center;
1621
- }
1622
-
1623
- .medplum-right {
1624
- text-align: right;
1625
- }
1626
-
1627
1642
  a.medplum-tab {
1628
1643
  display: inline-block;
1629
1644
  line-height: 50px;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import './SignInForm.css';
3
+ import './util.css';
4
+ export interface BaseRegisterFormProps {
5
+ readonly googleClientId?: string;
6
+ readonly recaptchaSiteKey: string;
7
+ readonly children?: React.ReactNode;
8
+ readonly onSuccess: () => void;
9
+ }
10
+ export interface PatientRegisterFormProps extends BaseRegisterFormProps {
11
+ readonly type: 'patient';
12
+ readonly projectId: string;
13
+ }
14
+ export interface ProjectRegisterFormProps extends BaseRegisterFormProps {
15
+ readonly type: 'project';
16
+ }
17
+ export declare type RegisterFormProps = PatientRegisterFormProps | ProjectRegisterFormProps;
18
+ export declare function RegisterForm(props: RegisterFormProps): JSX.Element;
@@ -33,6 +33,7 @@ export * from './HumanNameDisplay';
33
33
  export * from './HumanNameInput';
34
34
  export * from './IdentifierInput';
35
35
  export * from './Input';
36
+ export * from './InputRow';
36
37
  export * from './Loading';
37
38
  export * from './Logo';
38
39
  export * from './MedplumLink';
@@ -47,6 +48,7 @@ export * from './QuestionnaireUtils';
47
48
  export * from './RangeDisplay';
48
49
  export * from './RangeInput';
49
50
  export * from './ReferenceInput';
51
+ export * from './RegisterForm';
50
52
  export * from './RequestGroupDisplay';
51
53
  export * from './ResourceArrayDisplay';
52
54
  export * from './ResourceArrayInput';
@@ -82,3 +84,4 @@ export * from './UploadButton';
82
84
  export * from './useResource';
83
85
  export * from './utils';
84
86
  export * from './utils/date';
87
+ export * from './utils/recaptcha';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Meta } from '@storybook/react';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare function Basic(): JSX.Element;
6
+ export declare function WithFooter(): JSX.Element;
7
+ export declare function WithGoogle(): JSX.Element;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Dynamically loads the recaptcha script.
3
+ * We do not want to load the script on page load unless the user needs it.
4
+ * @param siteKey The reCAPTCHA site key, available from the reCAPTCHA admin page.
5
+ */
6
+ export declare function initRecaptcha(siteKey: string): void;
7
+ /**
8
+ * Starts a request to generate a recapcha token.
9
+ * @param siteKey The reCAPTCHA site key, available from the reCAPTCHA admin page.
10
+ * @returns Promise to a recaptcha token for the current user.
11
+ */
12
+ export declare function getRecaptcha(siteKey: string): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/react",
3
- "version": "0.9.22",
3
+ "version": "0.9.25",
4
4
  "description": "Medplum React Component Library",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",
@@ -19,9 +19,9 @@
19
19
  "storybook": "build-storybook"
20
20
  },
21
21
  "devDependencies": {
22
- "@medplum/core": "0.9.22",
23
- "@medplum/fhirtypes": "0.9.22",
24
- "@medplum/mock": "0.9.22",
22
+ "@medplum/core": "0.9.25",
23
+ "@medplum/fhirtypes": "0.9.25",
24
+ "@medplum/mock": "0.9.25",
25
25
  "@storybook/addon-actions": "6.5.9",
26
26
  "@storybook/addon-essentials": "6.5.9",
27
27
  "@storybook/addon-links": "6.5.9",
@@ -31,15 +31,15 @@
31
31
  "@testing-library/dom": "8.16.0",
32
32
  "@testing-library/jest-dom": "5.16.4",
33
33
  "@testing-library/react": "13.3.0",
34
- "@types/jest": "28.1.4",
35
- "@types/node": "18.0.3",
34
+ "@types/jest": "28.1.6",
35
+ "@types/node": "18.0.6",
36
36
  "@types/react": "18.0.15",
37
37
  "@types/react-dom": "18.0.6",
38
38
  "@types/react-router-dom": "5.3.3",
39
39
  "dotenv-webpack": "8.0.0",
40
40
  "identity-obj-proxy": "3.0.0",
41
- "jest": "28.1.2",
42
- "jest-each": "28.1.1",
41
+ "jest": "28.1.3",
42
+ "jest-each": "28.1.3",
43
43
  "html-webpack-plugin": "5.5.0",
44
44
  "react": "18.2.0",
45
45
  "react-dom": "18.2.0",
@@ -48,7 +48,7 @@
48
48
  "typescript": "4.7.4"
49
49
  },
50
50
  "peerDependencies": {
51
- "@medplum/core": "0.9.22",
51
+ "@medplum/core": "0.9.25",
52
52
  "react": "^17.0.2 || ^18.0.0",
53
53
  "react-dom": "^17.0.2 || ^18.0.0",
54
54
  "react-router-dom": "^6.2.2"