@medplum/react 0.9.22 → 0.9.23
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/dist/cjs/index.js +188 -75
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/styles.css +70 -55
- package/dist/esm/index.js +187 -77
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/styles.css +70 -55
- package/dist/types/RegisterForm.d.ts +17 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stories/RegisterForm.stories.d.ts +7 -0
- package/dist/types/utils/recaptcha.d.ts +10 -0
- package/package.json +5 -5
package/dist/esm/styles.css
CHANGED
|
@@ -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,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './SignInForm.css';
|
|
3
|
+
import './util.css';
|
|
4
|
+
export interface BaseRegisterFormProps {
|
|
5
|
+
readonly googleClientId?: string;
|
|
6
|
+
readonly children?: React.ReactNode;
|
|
7
|
+
readonly onSuccess: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface PatientRegisterFormProps extends BaseRegisterFormProps {
|
|
10
|
+
readonly type: 'patient';
|
|
11
|
+
readonly projectId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ProjectRegisterFormProps extends BaseRegisterFormProps {
|
|
14
|
+
readonly type: 'project';
|
|
15
|
+
}
|
|
16
|
+
export declare type RegisterFormProps = PatientRegisterFormProps | ProjectRegisterFormProps;
|
|
17
|
+
export declare function RegisterForm(props: RegisterFormProps): JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './QuestionnaireUtils';
|
|
|
47
47
|
export * from './RangeDisplay';
|
|
48
48
|
export * from './RangeInput';
|
|
49
49
|
export * from './ReferenceInput';
|
|
50
|
+
export * from './RegisterForm';
|
|
50
51
|
export * from './RequestGroupDisplay';
|
|
51
52
|
export * from './ResourceArrayDisplay';
|
|
52
53
|
export * from './ResourceArrayInput';
|
|
@@ -82,3 +83,4 @@ export * from './UploadButton';
|
|
|
82
83
|
export * from './useResource';
|
|
83
84
|
export * from './utils';
|
|
84
85
|
export * from './utils/date';
|
|
86
|
+
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,10 @@
|
|
|
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
|
+
*/
|
|
5
|
+
export declare function initRecaptcha(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Starts a request to generate a recapcha token.
|
|
8
|
+
* @returns Promise to a recaptcha token for the current user.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getRecaptcha(): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.23",
|
|
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.
|
|
23
|
-
"@medplum/fhirtypes": "0.9.
|
|
24
|
-
"@medplum/mock": "0.9.
|
|
22
|
+
"@medplum/core": "0.9.23",
|
|
23
|
+
"@medplum/fhirtypes": "0.9.23",
|
|
24
|
+
"@medplum/mock": "0.9.23",
|
|
25
25
|
"@storybook/addon-actions": "6.5.9",
|
|
26
26
|
"@storybook/addon-essentials": "6.5.9",
|
|
27
27
|
"@storybook/addon-links": "6.5.9",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typescript": "4.7.4"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@medplum/core": "0.9.
|
|
51
|
+
"@medplum/core": "0.9.23",
|
|
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"
|