@luscii-healthtech/web-ui 0.4.4 → 0.5.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.
Files changed (41) hide show
  1. package/dist/components/Section/SectionItemWithContent.d.ts +8 -11
  2. package/dist/components/Table/Table.d.ts +22 -0
  3. package/dist/components/Table/Table.types.d.ts +25 -0
  4. package/dist/components/Table/Table.utils.d.ts +3 -0
  5. package/dist/components/Table/TableBody.d.ts +13 -0
  6. package/dist/components/Table/TableBodyRow.d.ts +10 -0
  7. package/dist/components/Table/TableBodyRowDataCell.d.ts +8 -0
  8. package/dist/components/Table/TableFooter.d.ts +8 -0
  9. package/dist/components/Table/TableHeader.d.ts +7 -0
  10. package/dist/index.d.ts +4 -3
  11. package/dist/web-ui-tailwind.css +81 -34
  12. package/dist/web-ui.cjs.development.js +292 -364
  13. package/dist/web-ui.cjs.development.js.map +1 -1
  14. package/dist/web-ui.cjs.production.min.js +1 -1
  15. package/dist/web-ui.cjs.production.min.js.map +1 -1
  16. package/dist/web-ui.esm.js +292 -364
  17. package/dist/web-ui.esm.js.map +1 -1
  18. package/package.json +1 -1
  19. package/src/components/LoadingIndicator/LoadingIndicator.tsx +2 -1
  20. package/src/components/PaginationMenu/PaginationMenu.tsx +7 -1
  21. package/src/components/Section/SectionItemWithContent.tsx +30 -0
  22. package/src/components/Table/Table.tsx +85 -0
  23. package/src/components/Table/Table.types.ts +31 -0
  24. package/src/components/Table/Table.utils.ts +23 -0
  25. package/src/components/Table/TableBody.tsx +59 -0
  26. package/src/components/Table/TableBodyRow.tsx +47 -0
  27. package/src/components/Table/TableBodyRowDataCell.tsx +71 -0
  28. package/src/components/Table/TableFooter.tsx +21 -0
  29. package/src/components/Table/TableHeader.tsx +30 -0
  30. package/src/components/Tag/Tag.tsx +2 -2
  31. package/src/index.tsx +12 -10
  32. package/dist/components/ListTable/ListTable.d.ts +0 -34
  33. package/dist/components/ListTable/ListTableCell.d.ts +0 -10
  34. package/dist/components/ListTable/ListTableHeader.d.ts +0 -7
  35. package/dist/components/ListTable/ListTableRow.d.ts +0 -9
  36. package/src/components/ListTable/ListTable.tsx +0 -179
  37. package/src/components/ListTable/ListTableCell.tsx +0 -80
  38. package/src/components/ListTable/ListTableHeader.tsx +0 -33
  39. package/src/components/ListTable/ListTableRow.tsx +0 -46
  40. package/src/components/Section/SectionItemWithContent.js +0 -32
  41. package/src/components/Section/SectionItemWithContent.scss +0 -10
@@ -1,12 +1,9 @@
1
- export default SectionItemWithContent;
2
- declare function SectionItemWithContent(props: any): JSX.Element;
3
- declare namespace SectionItemWithContent {
4
- export namespace propTypes {
5
- export const text: PropTypes.Validator<string>;
6
- export const icon: PropTypes.Requireable<string | object>;
7
- export const className: PropTypes.Requireable<string>;
8
- export const iconClass: PropTypes.Requireable<string>;
9
- export const onClick: PropTypes.Requireable<(...args: any[]) => any>;
10
- }
1
+ /// <reference types="react" />
2
+ import { SectionItemProps } from "./SectionItem";
3
+ interface SectionItemWithContentProps extends Omit<SectionItemProps, "children"> {
4
+ text: string;
5
+ icon?: string;
6
+ iconClass?: string;
11
7
  }
12
- import PropTypes from "prop-types";
8
+ declare function SectionItemWithContent(props: SectionItemWithContentProps): JSX.Element;
9
+ export default SectionItemWithContent;
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { RestPropped } from "../../types/general.types";
3
+ import { PaginationMenuProps } from "../PaginationMenu/PaginationMenu.types";
4
+ import { Identifiable, TableFieldConfig } from "./Table.types";
5
+ export interface TableProps<Item extends Identifiable> extends RestPropped {
6
+ items?: Item[];
7
+ fieldConfigurations: TableFieldConfig<Item>[];
8
+ emptyRowsText: string;
9
+ emptyFieldContentText?: string;
10
+ isLoading: boolean;
11
+ showHeader?: boolean;
12
+ paginationMenuProps?: PaginationMenuProps;
13
+ onRowClick?: (item: Item) => void;
14
+ className?: string;
15
+ }
16
+ export declare function Table<Item extends Identifiable>(props: TableProps<Item>): JSX.Element;
17
+ export declare namespace Table {
18
+ var defaultProps: {
19
+ isLoading: boolean;
20
+ showHeader: boolean;
21
+ };
22
+ }
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "../Icons/types/IconProps.type";
3
+ import { TagColorTheme } from "../Tag/Tag";
4
+ export interface TableFieldConfig<Item extends Identifiable> {
5
+ key: string;
6
+ headerText?: string;
7
+ content: (item: Item) => TableFieldContent<Item>;
8
+ onlyShowContentOnHovering?: boolean;
9
+ }
10
+ export interface Identifiable {
11
+ identifier: string;
12
+ }
13
+ export declare type TableFieldContent<Item extends Identifiable> = TableFieldText | TableFieldAction<Item>[];
14
+ export interface TableFieldText {
15
+ text: string;
16
+ tag?: {
17
+ text: string;
18
+ color: TagColorTheme;
19
+ };
20
+ }
21
+ export interface TableFieldAction<Item extends Identifiable> {
22
+ key: string;
23
+ icon: React.FunctionComponent<IconProps>;
24
+ handleClick: (item: Item) => void;
25
+ }
@@ -0,0 +1,3 @@
1
+ import { TableFieldText, TableFieldAction, TableFieldContent, Identifiable } from "./Table.types";
2
+ export declare function isTableFieldText<Item extends Identifiable>(content: TableFieldContent<Item>): content is TableFieldText;
3
+ export declare function isTableFieldAction<Item extends Identifiable>(content: TableFieldContent<Item>): content is TableFieldAction<Item>[];
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { Identifiable, TableFieldConfig } from "./Table.types";
3
+ export interface TableBody<Item extends Identifiable> {
4
+ items?: Item[];
5
+ fieldConfigurations: TableFieldConfig<Item>[];
6
+ emptyItemsText: string;
7
+ emptyFieldContentText?: string;
8
+ isLoading: boolean;
9
+ showEmptyView: boolean;
10
+ onRowClick?: (item: Item) => void;
11
+ className?: string;
12
+ }
13
+ export declare function TableBody<Item extends Identifiable>(props: TableBody<Item>): JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Identifiable, TableFieldConfig } from "./Table.types";
3
+ export interface TableBodyRowProps<Item extends Identifiable> {
4
+ item: Item;
5
+ fieldConfigurations: TableFieldConfig<Item>[];
6
+ emptyFieldContentText?: string;
7
+ onClick?: (item: Item) => void;
8
+ className?: string;
9
+ }
10
+ export declare function TableBodyRow<Item extends Identifiable>(props: TableBodyRowProps<Item>): JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Identifiable, TableFieldConfig } from "./Table.types";
3
+ export interface TableBodyRowDataCellProps<Item extends Identifiable> {
4
+ item: Item;
5
+ fieldConfig: TableFieldConfig<Item>;
6
+ emptyFieldContentText?: string;
7
+ }
8
+ export declare function TableBodyRowDataCell<Item extends Identifiable>(props: TableBodyRowDataCellProps<Item>): JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PaginationMenuProps } from "../PaginationMenu/PaginationMenu.types";
3
+ interface TableFooterProps {
4
+ colSpan: number;
5
+ paginationMenuProps: PaginationMenuProps;
6
+ }
7
+ export declare const TableFooter: (props: TableFooterProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Identifiable, TableFieldConfig } from "./Table.types";
3
+ export interface TableHeaderProps<Item extends Identifiable> {
4
+ fieldConfigurations: TableFieldConfig<Item>[];
5
+ className?: string;
6
+ }
7
+ export declare function TableHeader<Item extends Identifiable>(props: TableHeaderProps<Item>): JSX.Element;
package/dist/index.d.ts CHANGED
@@ -17,8 +17,8 @@ export { default as InfoBlock } from "./components/InfoBlock/InfoBlock";
17
17
  export { InfoField } from "./components/InfoField/InfoField";
18
18
  export { INPUT_TYPES, default as Input } from "./components/Input/Input";
19
19
  export { default as Line } from "./components/Line/Line";
20
- export { default as SectionItem, SectionItemProps, } from "./components/Section/SectionItem";
21
- export { ListTable, ListTableProps, ListTablePropsConfiguration, ListTablePropsConfigurationField, } from "./components/ListTable/ListTable";
20
+ export { Table, TableProps } from "./components/Table/Table";
21
+ export { Identifiable as TableItemIdenfiable, TableFieldConfig, TableFieldContent, TableFieldText, TableFieldAction, } from "./components/Table/Table.types";
22
22
  export { LoadingIndicator, LoadingIndicatorProps, } from "./components/LoadingIndicator/LoadingIndicator";
23
23
  export { default as Menu } from "./components/Menu/Menu";
24
24
  export { MultiSelect } from "./components/MultiSelect/MultiSelect";
@@ -33,6 +33,8 @@ export { default as PreviewPhone } from "./components/PreviewPhone/PreviewPhone"
33
33
  export { default as Radio } from "./components/Radio/Radio";
34
34
  export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
35
35
  export { default as Section } from "./components/Section/Section";
36
+ export { default as SectionItemWithContent } from "./components/Section/SectionItemWithContent";
37
+ export { default as SectionItem, SectionItemProps, } from "./components/Section/SectionItem";
36
38
  export { SettingsMenuButton, SettingsMenuButtonProps, } from "./components/SettingsMenuButton/SettingsMenuButton";
37
39
  export { Spinner } from "./components/Spinner/Spinner";
38
40
  export { Steps } from "./components/Steps/Steps";
@@ -45,7 +47,6 @@ export { default as TextArea } from "./components/Textarea/Textarea";
45
47
  export { default as TextEditor } from "./components/TextEditor/TextEditor";
46
48
  export { default as TextEditorV2 } from "./components/TextEditorV2/TextEditorV2";
47
49
  export { TextLink, TextLinkProps } from "./components/TextLink/TextLink";
48
- export { default as SectionItemWithContent } from "./components/Section/SectionItemWithContent";
49
50
  export { Title, TitleStyle } from "./components/Title/Title";
50
51
  export { ViewItem, ViewItemProps } from "./components/ViewItem/ViewItem";
51
52
  export { default as Text } from "./components/Text/Text";
@@ -751,6 +751,12 @@ video {
751
751
  background-color: rgba(113, 128, 150, var(--bg-opacity));
752
752
  }
753
753
 
754
+ .hover\:bg-blue-50:hover {
755
+ --bg-opacity: 1;
756
+ background-color: #F2FAFD;
757
+ background-color: rgba(242, 250, 253, var(--bg-opacity));
758
+ }
759
+
754
760
  .hover\:bg-blue-900:hover {
755
761
  --bg-opacity: 1;
756
762
  background-color: #045BAA;
@@ -948,6 +954,10 @@ video {
948
954
  border-style: solid;
949
955
  }
950
956
 
957
+ .last\:border-none:last-child {
958
+ border-style: none;
959
+ }
960
+
951
961
  .border-2 {
952
962
  border-width: 2px;
953
963
  }
@@ -972,6 +982,10 @@ video {
972
982
  border-left-width: 1px;
973
983
  }
974
984
 
985
+ .last\:border-r:last-child {
986
+ border-right-width: 1px;
987
+ }
988
+
975
989
  .cursor-default {
976
990
  cursor: default;
977
991
  }
@@ -988,6 +1002,10 @@ video {
988
1002
  display: block;
989
1003
  }
990
1004
 
1005
+ .inline-block {
1006
+ display: inline-block;
1007
+ }
1008
+
991
1009
  .inline {
992
1010
  display: inline;
993
1011
  }
@@ -1096,24 +1114,12 @@ video {
1096
1114
  height: 1.5rem;
1097
1115
  }
1098
1116
 
1099
- .h-8 {
1100
- height: 2rem;
1101
- }
1102
-
1103
1117
  .h-11 {
1104
1118
  height: 2.75rem;
1105
1119
  }
1106
1120
 
1107
- .h-13 {
1108
- height: 3.25rem;
1109
- }
1110
-
1111
- .h-16 {
1112
- height: 4rem;
1113
- }
1114
-
1115
- .h-20 {
1116
- height: 5rem;
1121
+ .h-12 {
1122
+ height: 3rem;
1117
1123
  }
1118
1124
 
1119
1125
  .h-56 {
@@ -1164,6 +1170,10 @@ video {
1164
1170
  font-size: 4rem;
1165
1171
  }
1166
1172
 
1173
+ .leading-5 {
1174
+ line-height: 1.25rem;
1175
+ }
1176
+
1167
1177
  .leading-none {
1168
1178
  line-height: 1;
1169
1179
  }
@@ -1229,6 +1239,10 @@ video {
1229
1239
  margin-left: 0.5rem;
1230
1240
  }
1231
1241
 
1242
+ .mt-3 {
1243
+ margin-top: 0.75rem;
1244
+ }
1245
+
1232
1246
  .mr-3 {
1233
1247
  margin-right: 0.75rem;
1234
1248
  }
@@ -1285,6 +1299,14 @@ video {
1285
1299
  margin-left: 0.625rem;
1286
1300
  }
1287
1301
 
1302
+ .first\:ml-0:first-child {
1303
+ margin-left: 0;
1304
+ }
1305
+
1306
+ .last\:mr-0:last-child {
1307
+ margin-right: 0;
1308
+ }
1309
+
1288
1310
  .max-h-78 {
1289
1311
  max-height: 19.5rem;
1290
1312
  }
@@ -1293,22 +1315,18 @@ video {
1293
1315
  max-height: 100vh;
1294
1316
  }
1295
1317
 
1296
- .max-w-40 {
1297
- max-width: 10rem;
1298
- }
1299
-
1300
1318
  .max-w-3xl {
1301
1319
  max-width: 48rem;
1302
1320
  }
1303
1321
 
1304
- .max-w-full {
1305
- max-width: 100%;
1306
- }
1307
-
1308
1322
  .min-w-24 {
1309
1323
  min-width: 1.5rem;
1310
1324
  }
1311
1325
 
1326
+ .min-w-240 {
1327
+ min-width: 60rem;
1328
+ }
1329
+
1312
1330
  .opacity-0 {
1313
1331
  opacity: 0;
1314
1332
  }
@@ -1329,6 +1347,10 @@ video {
1329
1347
  opacity: 1;
1330
1348
  }
1331
1349
 
1350
+ .group:hover .group-hover\:opacity-100 {
1351
+ opacity: 1;
1352
+ }
1353
+
1332
1354
  .outline-primary {
1333
1355
  outline: 4px solid rgba(0, 159, 227, 0.3);
1334
1356
  outline-offset: 0;
@@ -1353,6 +1375,10 @@ video {
1353
1375
  overflow: hidden;
1354
1376
  }
1355
1377
 
1378
+ .overflow-x-auto {
1379
+ overflow-x: auto;
1380
+ }
1381
+
1356
1382
  .overflow-y-auto {
1357
1383
  overflow-y: auto;
1358
1384
  }
@@ -1418,6 +1444,11 @@ video {
1418
1444
  padding-right: 1.25rem;
1419
1445
  }
1420
1446
 
1447
+ .py-6 {
1448
+ padding-top: 1.5rem;
1449
+ padding-bottom: 1.5rem;
1450
+ }
1451
+
1421
1452
  .px-6 {
1422
1453
  padding-left: 1.5rem;
1423
1454
  padding-right: 1.5rem;
@@ -1460,6 +1491,14 @@ video {
1460
1491
  padding-bottom: 5rem;
1461
1492
  }
1462
1493
 
1494
+ .first\:pl-6:first-child {
1495
+ padding-left: 1.5rem;
1496
+ }
1497
+
1498
+ .last\:pr-6:last-child {
1499
+ padding-right: 1.5rem;
1500
+ }
1501
+
1463
1502
  .placeholder-gray-500:-ms-input-placeholder {
1464
1503
  --placeholder-opacity: 1;
1465
1504
  color: #a0aec0;
@@ -1572,6 +1611,10 @@ video {
1572
1611
  stroke: currentColor;
1573
1612
  }
1574
1613
 
1614
+ .table-fixed {
1615
+ table-layout: fixed;
1616
+ }
1617
+
1575
1618
  .text-left {
1576
1619
  text-align: left;
1577
1620
  }
@@ -1750,10 +1793,6 @@ video {
1750
1793
  text-transform: uppercase;
1751
1794
  }
1752
1795
 
1753
- .capitalize {
1754
- text-transform: capitalize;
1755
- }
1756
-
1757
1796
  .underline {
1758
1797
  text-decoration: underline;
1759
1798
  }
@@ -1767,6 +1806,10 @@ video {
1767
1806
  user-select: none;
1768
1807
  }
1769
1808
 
1809
+ .align-top {
1810
+ vertical-align: top;
1811
+ }
1812
+
1770
1813
  .visible {
1771
1814
  visibility: visible;
1772
1815
  }
@@ -1806,20 +1849,16 @@ video {
1806
1849
  width: 1.5rem;
1807
1850
  }
1808
1851
 
1809
- .w-8 {
1810
- width: 2rem;
1811
- }
1812
-
1813
1852
  .w-11 {
1814
1853
  width: 2.75rem;
1815
1854
  }
1816
1855
 
1817
- .w-24 {
1818
- width: 6rem;
1856
+ .w-12 {
1857
+ width: 3rem;
1819
1858
  }
1820
1859
 
1821
- .w-40 {
1822
- width: 10rem;
1860
+ .w-24 {
1861
+ width: 6rem;
1823
1862
  }
1824
1863
 
1825
1864
  .w-46 {
@@ -1893,6 +1932,10 @@ video {
1893
1932
  transition-property: background-color, border-color, color, fill, stroke;
1894
1933
  }
1895
1934
 
1935
+ .transition-opacity {
1936
+ transition-property: opacity;
1937
+ }
1938
+
1896
1939
  .ease-in {
1897
1940
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
1898
1941
  }
@@ -2054,6 +2097,10 @@ video {
2054
2097
  padding-right: 2rem;
2055
2098
  }
2056
2099
 
2100
+ .lg\:last\:pb-2:last-child {
2101
+ padding-bottom: 0.5rem;
2102
+ }
2103
+
2057
2104
  .lg\:relative {
2058
2105
  position: relative;
2059
2106
  }