@medplum/react 0.10.0 → 0.10.2

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.
Files changed (85) hide show
  1. package/dist/cjs/CodeableConceptInput.d.ts +1 -1
  2. package/dist/cjs/CodingInput.d.ts +1 -1
  3. package/dist/cjs/DiagnosticReportDisplay.d.ts +0 -1
  4. package/dist/cjs/ResourceHistoryTable.d.ts +0 -1
  5. package/dist/cjs/StatusBadge.d.ts +0 -1
  6. package/dist/cjs/ValueSetAutocomplete.d.ts +1 -1
  7. package/dist/cjs/index.d.ts +0 -7
  8. package/dist/cjs/index.js +125 -121
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/cjs/index.min.js +1 -1
  11. package/dist/cjs/index.min.js.map +1 -1
  12. package/dist/cjs/stories/{Tabs.stories.d.ts → CodeInput.stories.d.ts} +1 -1
  13. package/dist/{esm/stories/Tabs.stories.d.ts → cjs/stories/CodeableConceptInput.stories.d.ts} +1 -1
  14. package/dist/cjs/stories/PlanDefinitionBuilder.stories.d.ts +2 -0
  15. package/dist/cjs/stories/RequestGroupDisplay.stories.d.ts +1 -0
  16. package/dist/cjs/stories/ResourceTable.stories.d.ts +4 -0
  17. package/dist/cjs/stories/covid19.d.ts +15 -0
  18. package/dist/cjs/styles.css +7 -195
  19. package/dist/esm/CodeInput.js +2 -2
  20. package/dist/esm/CodeInput.js.map +1 -1
  21. package/dist/esm/CodeableConceptInput.d.ts +1 -1
  22. package/dist/esm/CodeableConceptInput.js +1 -1
  23. package/dist/esm/CodeableConceptInput.js.map +1 -1
  24. package/dist/esm/CodingInput.d.ts +1 -1
  25. package/dist/esm/CodingInput.js +1 -1
  26. package/dist/esm/CodingInput.js.map +1 -1
  27. package/dist/esm/DiagnosticReportDisplay.d.ts +0 -1
  28. package/dist/esm/DiagnosticReportDisplay.js +6 -2
  29. package/dist/esm/DiagnosticReportDisplay.js.map +1 -1
  30. package/dist/esm/ResourceHistoryTable.d.ts +0 -1
  31. package/dist/esm/ResourceHistoryTable.js +2 -1
  32. package/dist/esm/ResourceHistoryTable.js.map +1 -1
  33. package/dist/esm/ResourceInput.js +6 -1
  34. package/dist/esm/ResourceInput.js.map +1 -1
  35. package/dist/esm/ResourceTimeline.js +11 -9
  36. package/dist/esm/ResourceTimeline.js.map +1 -1
  37. package/dist/esm/SearchFilterEditor.js +4 -3
  38. package/dist/esm/SearchFilterEditor.js.map +1 -1
  39. package/dist/esm/StatusBadge.d.ts +0 -1
  40. package/dist/esm/StatusBadge.js +55 -1
  41. package/dist/esm/StatusBadge.js.map +1 -1
  42. package/dist/esm/ValueSetAutocomplete.d.ts +1 -1
  43. package/dist/esm/ValueSetAutocomplete.js +48 -40
  44. package/dist/esm/ValueSetAutocomplete.js.map +1 -1
  45. package/dist/esm/index.d.ts +0 -7
  46. package/dist/esm/index.js +0 -7
  47. package/dist/esm/index.js.map +1 -1
  48. package/dist/esm/index.min.js +1 -1
  49. package/dist/esm/index.min.js.map +1 -1
  50. package/dist/esm/stories/CodeInput.stories.d.ts +6 -0
  51. package/dist/esm/stories/CodeableConceptInput.stories.d.ts +6 -0
  52. package/dist/esm/stories/PlanDefinitionBuilder.stories.d.ts +2 -0
  53. package/dist/esm/stories/RequestGroupDisplay.stories.d.ts +1 -0
  54. package/dist/esm/stories/ResourceTable.stories.d.ts +4 -0
  55. package/dist/esm/stories/covid19.d.ts +15 -0
  56. package/dist/esm/styles.css +7 -195
  57. package/package.json +6 -5
  58. package/dist/cjs/FooterLinks.d.ts +0 -6
  59. package/dist/cjs/Scrollable.d.ts +0 -9
  60. package/dist/cjs/Tab.d.ts +0 -12
  61. package/dist/cjs/TabList.d.ts +0 -10
  62. package/dist/cjs/TabPanel.d.ts +0 -6
  63. package/dist/cjs/TabSwitch.d.ts +0 -6
  64. package/dist/cjs/TitleBar.d.ts +0 -6
  65. package/dist/esm/FooterLinks.d.ts +0 -6
  66. package/dist/esm/FooterLinks.js +0 -8
  67. package/dist/esm/FooterLinks.js.map +0 -1
  68. package/dist/esm/Scrollable.d.ts +0 -9
  69. package/dist/esm/Scrollable.js +0 -12
  70. package/dist/esm/Scrollable.js.map +0 -1
  71. package/dist/esm/Tab.d.ts +0 -12
  72. package/dist/esm/Tab.js +0 -19
  73. package/dist/esm/Tab.js.map +0 -1
  74. package/dist/esm/TabList.d.ts +0 -10
  75. package/dist/esm/TabList.js +0 -23
  76. package/dist/esm/TabList.js.map +0 -1
  77. package/dist/esm/TabPanel.d.ts +0 -6
  78. package/dist/esm/TabPanel.js +0 -8
  79. package/dist/esm/TabPanel.js.map +0 -1
  80. package/dist/esm/TabSwitch.d.ts +0 -6
  81. package/dist/esm/TabSwitch.js +0 -16
  82. package/dist/esm/TabSwitch.js.map +0 -1
  83. package/dist/esm/TitleBar.d.ts +0 -6
  84. package/dist/esm/TitleBar.js +0 -8
  85. package/dist/esm/TitleBar.js.map +0 -1
@@ -0,0 +1,6 @@
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 const Basic: () => JSX.Element;
6
+ export declare const DefaultValue: () => JSX.Element;
@@ -0,0 +1,6 @@
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 const Basic: () => JSX.Element;
6
+ export declare const DefaultValue: () => JSX.Element;
@@ -3,3 +3,5 @@ import { Meta } from '@storybook/react';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const Basic: () => JSX.Element;
6
+ export declare const Covid19Eval: () => JSX.Element;
7
+ export declare const Covid19PCRLabServiceStory: () => JSX.Element;
@@ -3,3 +3,4 @@ import { Meta } from '@storybook/react';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const Simple: () => JSX.Element;
6
+ export declare const Covid19: () => JSX.Element;
@@ -5,3 +5,7 @@ export default _default;
5
5
  export declare const Patient: () => JSX.Element;
6
6
  export declare const Observation: () => JSX.Element;
7
7
  export declare const ObservationIgnoreEmpty: () => JSX.Element;
8
+ export declare const Covid19PCRTestActivity: () => JSX.Element;
9
+ export declare const Covid19ReviewReportActivity: () => JSX.Element;
10
+ export declare const Covid19SpecimenRequirement: () => JSX.Element;
11
+ export declare const Covid19ObservationDefinition: () => JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ActivityDefinition, ObservationDefinition, PlanDefinition, Questionnaire, RequestGroup, ServiceRequest, SpecimenDefinition, Task } from '@medplum/fhirtypes';
2
+ export declare const Covid19AssessmentQuestionnaire: Questionnaire;
3
+ export declare const Covid19NasalSpecimen: SpecimenDefinition;
4
+ export declare const Covid19PCRObservationDefinition: ObservationDefinition;
5
+ export declare const Covid19PCRTest: ActivityDefinition;
6
+ export declare const Covid19ReviewReport: ActivityDefinition;
7
+ export declare const Covid19CarePlanDefinition: PlanDefinition;
8
+ export declare const Covid19PCRLabService: PlanDefinition;
9
+ export declare const Covid19AssessmentTask: Task;
10
+ export declare const Covid19InitialConsultTask: Task;
11
+ export declare const Covid19PCRServiceRequest: ServiceRequest;
12
+ export declare const Covid19PCRTask: Task;
13
+ export declare const Covid19ReviewLabsTask: Task;
14
+ export declare const Covid19FollowUpConsultTask: Task;
15
+ export declare const Covid19RequestGroup: RequestGroup;
@@ -106,6 +106,13 @@ dl.medplum-description-list.compact dd {
106
106
  border: 0;
107
107
  }
108
108
 
109
+ .medplum-resource-badge {
110
+ display: inline-flex;
111
+ align-items: center;
112
+ gap: 4px;
113
+ white-space: nowrap;
114
+ }
115
+
109
116
  .medplum-diagnostic-report-header {
110
117
  display: flex;
111
118
  flex-direction: row;
@@ -150,24 +157,6 @@ dl.medplum-description-list.compact dd {
150
157
  font-weight: bold;
151
158
  }
152
159
 
153
- .medplum-resource-badge {
154
- display: inline-flex;
155
- align-items: center;
156
- gap: 4px;
157
- white-space: nowrap;
158
- }
159
-
160
- table.medplum-table {
161
- border-collapse: collapse;
162
- width: 100%;
163
- }
164
-
165
- table.medplum-table > thead > tr > th,
166
- table.medplum-table > tbody > tr > td {
167
- border: 0.1px solid var(--medplum-gray-400);
168
- padding: 4px 6px;
169
- }
170
-
171
160
  .medplum-diff-removed {
172
161
  color: red;
173
162
  text-decoration: line-through;
@@ -192,18 +181,6 @@ table.medplum-diff-table td {
192
181
  vertical-align: top;
193
182
  }
194
183
 
195
- .medplum-scrollable-container {
196
- position: relative;
197
- overflow: hidden;
198
- width: 100%;
199
- }
200
-
201
- .medplum-scrollable-content {
202
- position: relative;
203
- width: 100%;
204
- overflow: auto;
205
- }
206
-
207
184
  .medplum-timeline article.medplum-timeline-item {
208
185
  max-width: 900px;
209
186
  padding: 0;
@@ -344,16 +321,6 @@ table.medplum-diff-table td {
344
321
  outline: 0;
345
322
  }
346
323
 
347
- .medplum-footer {
348
- text-align: center;
349
- font-size: 12px;
350
- }
351
-
352
- .medplum-footer a {
353
- color: var(--medplum-gray-500);
354
- margin: 0 8px;
355
- }
356
-
357
324
  .medplum-questionnaire-option-row {
358
325
  display: flex;
359
326
  align-items: center;
@@ -425,83 +392,6 @@ table.medplum-diff-table td {
425
392
  color: var(--medplum-blue-500);
426
393
  }
427
394
 
428
- .medplum-status {
429
- padding: 1px 6px;
430
- margin: 0 4px;
431
- font-size: 80%;
432
- line-height: 1;
433
- text-align: center;
434
- white-space: nowrap;
435
- vertical-align: baseline;
436
- border-radius: 8px;
437
- }
438
-
439
- /*
440
- * Request status: https://hl7.org/fhir/valueset-request-status.html
441
- * draft, active, on-hold, revoked, completed, entered-in-error, unknown
442
- *
443
- * Publication status: https://hl7.org/fhir/valueset-publication-status.html
444
- * draft, active, retired, unknown
445
- *
446
- * Observation status: https://www.hl7.org/fhir/valueset-observation-status.html
447
- * registered, preliminary, final, amended, cancelled, entered-in-error, unknown
448
- *
449
- * DiagnosticReport status: https://hl7.org/fhir/valueset-diagnostic-report-status.html
450
- * registered, preliminary, final, amended, corrected, appended, cancelled, entered-in-error, unknown
451
- *
452
- * Task status: https://hl7.org/fhir/valueset-task-status.html
453
- * draft, requested, received, accepted, rejected, ready, cancelled, in-progress, on-hold, failed, completed, entered-in-error
454
- *
455
- * Appointment status: https://www.hl7.org/fhir/valueset-appointmentstatus.html
456
- * proposed, pending, booked, arrived, fulfilled, cancelled, noshow, entered-in-error, chcked-in, waitlist
457
- */
458
-
459
- .medplum-status-active,
460
- .medplum-status-arrived,
461
- .medplum-status-chcked-in,
462
- .medplum-status-draft,
463
- .medplum-status-in-progress,
464
- .medplum-status-preliminary,
465
- .medplum-status-proposed,
466
- .medplum-status-pending,
467
- .medplum-status-registered,
468
- .medplum-status-requested {
469
- background-color: var(--medplum-blue-50);
470
- border: 0.01px solid var(--medplum-blue-300);
471
- color: var(--medplum-blue-800);
472
- }
473
-
474
- .medplum-status-on-hold {
475
- background-color: var(--medplum-orange-50);
476
- border: 0.01px solid var(--medplum-orange-300);
477
- color: var(--medplum-orange-800);
478
- }
479
-
480
- .medplum-status-booked,
481
- .medplum-status-completed,
482
- .medplum-status-fulfilled {
483
- background-color: var(--medplum-green-50);
484
- border: 0.01px solid var(--medplum-green-300);
485
- color: var(--medplum-green-800);
486
- }
487
-
488
- .medplum-status-cancelled,
489
- .medplum-status-noshow,
490
- .medplum-status-rejected,
491
- .medplum-status-revoked,
492
- .medplum-status-entered-in-error {
493
- background-color: var(--medplum-red-50);
494
- border: 0.01px solid var(--medplum-red-300);
495
- color: var(--medplum-red-800);
496
- }
497
-
498
- .medplum-status-unknown,
499
- .medplum-status-waitlist {
500
- background-color: var(--medplum-gray-50);
501
- border: 0.01px solid var(--medplum-gray-500);
502
- color: var(--medplum-gray-800);
503
- }
504
-
505
395
  .medplum-request-group {
506
396
  padding: 4px;
507
397
  }
@@ -636,81 +526,3 @@ table.medplum-diff-table td {
636
526
  }
637
527
 
638
528
  .grecaptcha-badge { visibility: hidden; }
639
-
640
- a.medplum-tab {
641
- display: inline-block;
642
- line-height: 50px;
643
- margin: 0;
644
- padding: 0 8px;
645
- min-width: 75px;
646
- height: 50px;
647
- text-align: center;
648
- cursor: pointer;
649
- user-select: none;
650
- color: var(--medplum-gray-600);
651
- text-decoration: none;
652
- outline: 0;
653
- }
654
-
655
- a.medplum-tab:focus,
656
- a.medplum-tab:hover {
657
- border-bottom: 2px solid var(--medplum-blue-100);
658
- outline: 0;
659
- text-decoration: none;
660
- }
661
-
662
- a.medplum-tab.selected {
663
- border-bottom: 2px solid var(--medplum-orange-300);
664
- color: var(--medplum-gray-800);
665
- font-weight: bold;
666
- }
667
-
668
- .medplum-surface {
669
- background-color: var(--medplum-surface);
670
- }
671
-
672
- .medplum-tablist {
673
- position: relative;
674
- min-height: 50px;
675
- user-select: none;
676
- white-space: nowrap;
677
- font-size: 14px;
678
- }
679
-
680
- .medplum-tablist-foreground {
681
- position: absolute;
682
- top: 0;
683
- left: 0;
684
- min-width: 100%;
685
- bottom: 0;
686
- user-select: none;
687
- white-space: nowrap;
688
- border-bottom: 2px solid var(--medplum-gray-200);
689
- padding: 0 20px;
690
- z-index: 3;
691
- font-size: 14px;
692
- }
693
-
694
- .medplum-title-bar {
695
- display: flex;
696
- width: 100%;
697
- height: 50px;
698
- padding: 15px;
699
- justify-content: space-between;
700
- background: var(--medplum-surface);
701
- border-bottom: 2px solid var(--medplum-gray-200);
702
- color: var(--medplum-gray-800);
703
- }
704
-
705
- .medplum-title-bar > div {
706
- display: flex;
707
- align-items: center;
708
- }
709
-
710
- .medplum-title-bar h1 {
711
- font-size: 14px;
712
- font-weight: bold;
713
- padding: 0 4px 0 1px;
714
- margin: 0 4px 0 1px;
715
- color: var(--medplum-gray-800);
716
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/react",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Medplum React Component Library",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",
@@ -22,9 +22,10 @@
22
22
  "@emotion/react": "11.10.4",
23
23
  "@mantine/core": "5.5.0",
24
24
  "@mantine/hooks": "5.5.0",
25
- "@medplum/core": "0.10.0",
26
- "@medplum/fhirtypes": "0.10.0",
27
- "@medplum/mock": "0.10.0",
25
+ "@medplum/core": "0.10.2",
26
+ "@medplum/definitions": "0.10.2",
27
+ "@medplum/fhirtypes": "0.10.2",
28
+ "@medplum/mock": "0.10.2",
28
29
  "@tabler/icons": "1.101.0",
29
30
  "@storybook/addon-actions": "6.5.12",
30
31
  "@storybook/addon-essentials": "6.5.12",
@@ -55,7 +56,7 @@
55
56
  "@emotion/react": "^11.10.4",
56
57
  "@mantine/core": "^5.4.0",
57
58
  "@mantine/hooks": "^5.4.0",
58
- "@medplum/core": "0.10.0",
59
+ "@medplum/core": "0.10.2",
59
60
  "@tabler/icons": "^1.100.0",
60
61
  "react": "^17.0.2 || ^18.0.0",
61
62
  "react-dom": "^17.0.2 || ^18.0.0",
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import './FooterLinks.css';
3
- export interface FooterLinksProps {
4
- children?: React.ReactNode;
5
- }
6
- export declare function FooterLinks(props: FooterLinksProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './Scrollable.css';
3
- export interface ScrollableProps {
4
- readonly role?: string;
5
- readonly className?: string;
6
- readonly height?: number;
7
- readonly children: React.ReactNode;
8
- }
9
- export declare function Scrollable(props: ScrollableProps): JSX.Element;
package/dist/cjs/Tab.d.ts DELETED
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import './Tab.css';
3
- export interface TabClickHandler {
4
- (name: string, button: number): void;
5
- }
6
- export interface TabProps {
7
- name: string;
8
- label: string;
9
- selected?: boolean;
10
- onClick?: TabClickHandler;
11
- }
12
- export declare function Tab(props: TabProps): JSX.Element;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { TabClickHandler } from './Tab';
3
- import './Surface.css';
4
- import './TabList.css';
5
- export interface TabListProps {
6
- value?: string;
7
- onChange: TabClickHandler;
8
- children: React.ReactNode;
9
- }
10
- export declare function TabList(props: TabListProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface TabPanelProps {
3
- name: string;
4
- children: React.ReactNode;
5
- }
6
- export declare function TabPanel(props: TabPanelProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface TabSwitchProps {
3
- value?: string;
4
- children: React.ReactNode;
5
- }
6
- export declare function TabSwitch(props: TabSwitchProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import './TitleBar.css';
3
- export interface TitleBarProps {
4
- children?: React.ReactNode;
5
- }
6
- export declare function TitleBar(props: TitleBarProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import './FooterLinks.css';
3
- export interface FooterLinksProps {
4
- children?: React.ReactNode;
5
- }
6
- export declare function FooterLinks(props: FooterLinksProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
-
3
- function FooterLinks(props) {
4
- return React.createElement("div", { className: "medplum-footer" }, props.children);
5
- }
6
-
7
- export { FooterLinks };
8
- //# sourceMappingURL=FooterLinks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FooterLinks.js","sources":["../../src/FooterLinks.tsx"],"sourcesContent":["import React from 'react';\nimport './FooterLinks.css';\n\nexport interface FooterLinksProps {\n children?: React.ReactNode;\n}\n\nexport function FooterLinks(props: FooterLinksProps): JSX.Element {\n return <div className=\"medplum-footer\">{props.children}</div>;\n}\n"],"names":[],"mappings":";;AAOM,SAAU,WAAW,CAAC,KAAuB,EAAA;IACjD,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,gBAAgB,IAAE,KAAK,CAAC,QAAQ,CAAO,CAAC;AAChE;;;;"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './Scrollable.css';
3
- export interface ScrollableProps {
4
- readonly role?: string;
5
- readonly className?: string;
6
- readonly height?: number;
7
- readonly children: React.ReactNode;
8
- }
9
- export declare function Scrollable(props: ScrollableProps): JSX.Element;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
-
3
- function Scrollable(props) {
4
- const containerHeight = props.height || '100%';
5
- const contentHeight = props.height ? props.height + 25 : '100%';
6
- const className = 'medplum-scrollable-content' + (props.className ? ` ${props.className}` : '');
7
- return (React.createElement("div", { className: "medplum-scrollable-container", style: { height: containerHeight } },
8
- React.createElement("div", { className: className, role: props.role, style: { height: contentHeight } }, props.children)));
9
- }
10
-
11
- export { Scrollable };
12
- //# sourceMappingURL=Scrollable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Scrollable.js","sources":["../../src/Scrollable.tsx"],"sourcesContent":["import React from 'react';\nimport './Scrollable.css';\n\nexport interface ScrollableProps {\n readonly role?: string;\n readonly className?: string;\n readonly height?: number;\n readonly children: React.ReactNode;\n}\n\nexport function Scrollable(props: ScrollableProps): JSX.Element {\n const containerHeight = props.height || '100%';\n const contentHeight = props.height ? props.height + 25 : '100%';\n const className = 'medplum-scrollable-content' + (props.className ? ` ${props.className}` : '');\n return (\n <div className=\"medplum-scrollable-container\" style={{ height: containerHeight }}>\n <div className={className} role={props.role} style={{ height: contentHeight }}>\n {props.children}\n </div>\n </div>\n );\n}\n"],"names":[],"mappings":";;AAUM,SAAU,UAAU,CAAC,KAAsB,EAAA;AAC/C,IAAA,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC;AAC/C,IAAA,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,EAAE,GAAG,MAAM,CAAC;IAChE,MAAM,SAAS,GAAG,4BAA4B,IAAI,KAAK,CAAC,SAAS,GAAG,CAAI,CAAA,EAAA,KAAK,CAAC,SAAS,CAAA,CAAE,GAAG,EAAE,CAAC,CAAC;AAChG,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,8BAA8B,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,EAAA;QAC9E,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,EAC1E,EAAA,KAAK,CAAC,QAAQ,CACX,CACF,EACN;AACJ;;;;"}
package/dist/esm/Tab.d.ts DELETED
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import './Tab.css';
3
- export interface TabClickHandler {
4
- (name: string, button: number): void;
5
- }
6
- export interface TabProps {
7
- name: string;
8
- label: string;
9
- selected?: boolean;
10
- onClick?: TabClickHandler;
11
- }
12
- export declare function Tab(props: TabProps): JSX.Element;
package/dist/esm/Tab.js DELETED
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { killEvent } from './utils/dom.js';
3
-
4
- function Tab(props) {
5
- let className = 'medplum-tab';
6
- if (props.selected) {
7
- className += ' selected';
8
- }
9
- function clickHandler(e) {
10
- killEvent(e);
11
- // The onClick prop is set by TabBar as parent component.
12
- // Using Tab outside of a TabBar is unsupported.
13
- props.onClick(props.name, e.button);
14
- }
15
- return (React.createElement("a", { href: `#${props.name}`, role: "tab", "aria-selected": props.selected, className: className, onClick: clickHandler, onAuxClick: clickHandler }, props.label));
16
- }
17
-
18
- export { Tab };
19
- //# sourceMappingURL=Tab.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tab.js","sources":["../../src/Tab.tsx"],"sourcesContent":["import React from 'react';\nimport './Tab.css';\nimport { killEvent } from './utils/dom';\n\nexport interface TabClickHandler {\n (name: string, button: number): void;\n}\n\nexport interface TabProps {\n name: string;\n label: string;\n selected?: boolean;\n onClick?: TabClickHandler;\n}\n\nexport function Tab(props: TabProps): JSX.Element {\n let className = 'medplum-tab';\n if (props.selected) {\n className += ' selected';\n }\n\n function clickHandler(e: React.MouseEvent): void {\n killEvent(e);\n\n // The onClick prop is set by TabBar as parent component.\n // Using Tab outside of a TabBar is unsupported.\n (props.onClick as TabClickHandler)(props.name, e.button);\n }\n\n return (\n <a\n href={`#${props.name}`}\n role=\"tab\"\n aria-selected={props.selected}\n className={className}\n onClick={clickHandler}\n onAuxClick={clickHandler}\n >\n {props.label}\n </a>\n );\n}\n"],"names":[],"mappings":";;;AAeM,SAAU,GAAG,CAAC,KAAe,EAAA;IACjC,IAAI,SAAS,GAAG,aAAa,CAAC;IAC9B,IAAI,KAAK,CAAC,QAAQ,EAAE;QAClB,SAAS,IAAI,WAAW,CAAC;AAC1B,KAAA;IAED,SAAS,YAAY,CAAC,CAAmB,EAAA;QACvC,SAAS,CAAC,CAAC,CAAC,CAAC;;;QAIZ,KAAK,CAAC,OAA2B,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;KAC1D;AAED,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EACE,IAAI,EAAE,IAAI,KAAK,CAAC,IAAI,CAAA,CAAE,EACtB,IAAI,EAAC,KAAK,EAAA,eAAA,EACK,KAAK,CAAC,QAAQ,EAC7B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,YAAY,IAEvB,KAAK,CAAC,KAAK,CACV,EACJ;AACJ;;;;"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { TabClickHandler } from './Tab';
3
- import './Surface.css';
4
- import './TabList.css';
5
- export interface TabListProps {
6
- value?: string;
7
- onChange: TabClickHandler;
8
- children: React.ReactNode;
9
- }
10
- export declare function TabList(props: TabListProps): JSX.Element;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { Scrollable } from './Scrollable.js';
3
- import { Tab } from './Tab.js';
4
-
5
- function TabList(props) {
6
- return (React.createElement(Scrollable, { className: "medplum-surface", height: 50 },
7
- React.createElement("div", { role: "tablist", className: "medplum-tablist" },
8
- React.createElement("div", { className: "medplum-tablist-foreground" }, React.Children.map(props.children, (child, tabIndex) => {
9
- if (React.isValidElement(child) && child.type === Tab) {
10
- return React.cloneElement(child, {
11
- selected: child.props.name === props.value,
12
- onClick: props.onChange,
13
- tabIndex,
14
- });
15
- }
16
- else {
17
- return null;
18
- }
19
- })))));
20
- }
21
-
22
- export { TabList };
23
- //# sourceMappingURL=TabList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabList.js","sources":["../../src/TabList.tsx"],"sourcesContent":["import React from 'react';\nimport { Scrollable } from './Scrollable';\nimport { Tab, TabClickHandler } from './Tab';\nimport './Surface.css';\nimport './TabList.css';\n\nexport interface TabListProps {\n value?: string;\n onChange: TabClickHandler;\n children: React.ReactNode;\n}\n\nexport function TabList(props: TabListProps): JSX.Element {\n return (\n <Scrollable className=\"medplum-surface\" height={50}>\n <div role=\"tablist\" className=\"medplum-tablist\">\n <div className=\"medplum-tablist-foreground\">\n {React.Children.map(props.children, (child, tabIndex) => {\n if (React.isValidElement(child) && child.type === Tab) {\n return React.cloneElement(child as React.ReactElement<any>, {\n selected: child.props.name === props.value,\n onClick: props.onChange,\n tabIndex,\n });\n } else {\n return null;\n }\n })}\n </div>\n </div>\n </Scrollable>\n );\n}\n"],"names":[],"mappings":";;;;AAYM,SAAU,OAAO,CAAC,KAAmB,EAAA;IACzC,QACE,KAAC,CAAA,aAAA,CAAA,UAAU,EAAC,EAAA,SAAS,EAAC,iBAAiB,EAAC,MAAM,EAAE,EAAE,EAAA;AAChD,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,IAAI,EAAC,SAAS,EAAC,SAAS,EAAC,iBAAiB,EAAA;AAC7C,YAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,IACxC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAI;AACtD,gBAAA,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE;AACrD,oBAAA,OAAO,KAAK,CAAC,YAAY,CAAC,KAAgC,EAAE;wBAC1D,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK;wBAC1C,OAAO,EAAE,KAAK,CAAC,QAAQ;wBACvB,QAAQ;AACT,qBAAA,CAAC,CAAC;AACJ,iBAAA;AAAM,qBAAA;AACL,oBAAA,OAAO,IAAI,CAAC;AACb,iBAAA;AACH,aAAC,CAAC,CACE,CACF,CACK,EACb;AACJ;;;;"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface TabPanelProps {
3
- name: string;
4
- children: React.ReactNode;
5
- }
6
- export declare function TabPanel(props: TabPanelProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
-
3
- function TabPanel(props) {
4
- return React.createElement("div", { role: "tabpanel" }, props.children);
5
- }
6
-
7
- export { TabPanel };
8
- //# sourceMappingURL=TabPanel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabPanel.js","sources":["../../src/TabPanel.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface TabPanelProps {\n name: string;\n children: React.ReactNode;\n}\n\nexport function TabPanel(props: TabPanelProps): JSX.Element {\n return <div role=\"tabpanel\">{props.children}</div>;\n}\n"],"names":[],"mappings":";;AAOM,SAAU,QAAQ,CAAC,KAAoB,EAAA;IAC3C,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,IAAI,EAAC,UAAU,IAAE,KAAK,CAAC,QAAQ,CAAO,CAAC;AACrD;;;;"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface TabSwitchProps {
3
- value?: string;
4
- children: React.ReactNode;
5
- }
6
- export declare function TabSwitch(props: TabSwitchProps): JSX.Element;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { TabPanel } from './TabPanel.js';
3
-
4
- function TabSwitch(props) {
5
- return (React.createElement(React.Fragment, null, React.Children.map(props.children, (child) => {
6
- if (React.isValidElement(child) && child.type === TabPanel && child.props.name === props.value) {
7
- return child;
8
- }
9
- else {
10
- return null;
11
- }
12
- })));
13
- }
14
-
15
- export { TabSwitch };
16
- //# sourceMappingURL=TabSwitch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabSwitch.js","sources":["../../src/TabSwitch.tsx"],"sourcesContent":["import React from 'react';\nimport { TabPanel } from './TabPanel';\n\nexport interface TabSwitchProps {\n value?: string;\n children: React.ReactNode;\n}\n\nexport function TabSwitch(props: TabSwitchProps): JSX.Element {\n return (\n <>\n {React.Children.map(props.children, (child) => {\n if (React.isValidElement(child) && child.type === TabPanel && child.props.name === props.value) {\n return child;\n } else {\n return null;\n }\n })}\n </>\n );\n}\n"],"names":[],"mappings":";;;AAQM,SAAU,SAAS,CAAC,KAAqB,EAAA;AAC7C,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;QAC5C,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,EAAE;AAC9F,YAAA,OAAO,KAAK,CAAC;AACd,SAAA;AAAM,aAAA;AACL,YAAA,OAAO,IAAI,CAAC;AACb,SAAA;KACF,CAAC,CACD,EACH;AACJ;;;;"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import './TitleBar.css';
3
- export interface TitleBarProps {
4
- children?: React.ReactNode;
5
- }
6
- export declare function TitleBar(props: TitleBarProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
-
3
- function TitleBar(props) {
4
- return React.createElement("div", { className: "medplum-title-bar" }, props.children);
5
- }
6
-
7
- export { TitleBar };
8
- //# sourceMappingURL=TitleBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TitleBar.js","sources":["../../src/TitleBar.tsx"],"sourcesContent":["import React from 'react';\nimport './TitleBar.css';\n\nexport interface TitleBarProps {\n children?: React.ReactNode;\n}\n\nexport function TitleBar(props: TitleBarProps): JSX.Element {\n return <div className=\"medplum-title-bar\">{props.children}</div>;\n}\n"],"names":[],"mappings":";;AAOM,SAAU,QAAQ,CAAC,KAAoB,EAAA;IAC3C,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mBAAmB,IAAE,KAAK,CAAC,QAAQ,CAAO,CAAC;AACnE;;;;"}