@bcgov-sso/common-react-components 1.20.2 → 1.20.6
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/esm/index.js
CHANGED
|
@@ -12621,5 +12621,79 @@ const Alert = (props) => (React.createElement(DefaultAlert, Object.assign({}, pr
|
|
|
12621
12621
|
props.content,
|
|
12622
12622
|
React.createElement(DefaultAlert.Close, null, "X")));
|
|
12623
12623
|
|
|
12624
|
-
|
|
12624
|
+
const TABLE_BACKGROUND_COLOR = '#ededed';
|
|
12625
|
+
const TABLE_ROW_ACTIVE_COLOR = '#4950FA';
|
|
12626
|
+
const TABLE_ROW_HEIGHT = 40;
|
|
12627
|
+
const TABLE_ROW_HEIGHT_MINI = 40;
|
|
12628
|
+
const TABLE_ROW_SPACING = 5;
|
|
12629
|
+
const TABLE_ROW_BORDER_RADIUS = 6;
|
|
12630
|
+
const Table = qe.table `
|
|
12631
|
+
width: 100%;
|
|
12632
|
+
-webkit-box-shadow: none;
|
|
12633
|
+
background-color: ${TABLE_BACKGROUND_COLOR};
|
|
12634
|
+
padding: 0.1em 0.6em;
|
|
12635
|
+
box-shadow: none;
|
|
12636
|
+
text-align: left;
|
|
12637
|
+
border-collapse: separate;
|
|
12638
|
+
border-spacing: 0 ${TABLE_ROW_SPACING}px;
|
|
12639
|
+
color: black;
|
|
12640
|
+
|
|
12641
|
+
& thead {
|
|
12642
|
+
font-size: 16px;
|
|
12643
|
+
& > th {
|
|
12644
|
+
min-width: ${(props) => (props.variant === 'mini' ? '30px' : '140px')};
|
|
12645
|
+
}
|
|
12646
|
+
}
|
|
12647
|
+
|
|
12648
|
+
& tbody {
|
|
12649
|
+
font-size: ${(props) => (props.variant === 'mini' ? '14px' : '16px')};
|
|
12650
|
+
& > tr {
|
|
12651
|
+
height: ${(props) => (props.variant === 'mini' ? `${TABLE_ROW_HEIGHT_MINI}px` : `${TABLE_ROW_HEIGHT}px`)};
|
|
12652
|
+
background-color: #fff;
|
|
12653
|
+
|
|
12654
|
+
td:first-child {
|
|
12655
|
+
border-top-left-radius: ${TABLE_ROW_BORDER_RADIUS}px;
|
|
12656
|
+
}
|
|
12657
|
+
td:last-child {
|
|
12658
|
+
border-top-right-radius: ${TABLE_ROW_BORDER_RADIUS}px;
|
|
12659
|
+
}
|
|
12660
|
+
|
|
12661
|
+
td:first-child {
|
|
12662
|
+
border-bottom-left-radius: ${TABLE_ROW_BORDER_RADIUS}px;
|
|
12663
|
+
}
|
|
12664
|
+
td:last-child {
|
|
12665
|
+
border-bottom-right-radius: ${TABLE_ROW_BORDER_RADIUS}px;
|
|
12666
|
+
}
|
|
12667
|
+
|
|
12668
|
+
${(props) => !props.readOnly &&
|
|
12669
|
+
`
|
|
12670
|
+
&:hover {
|
|
12671
|
+
background-color: ${TABLE_ROW_ACTIVE_COLOR};
|
|
12672
|
+
color: #fff;
|
|
12673
|
+
cursor: pointer;
|
|
12674
|
+
}
|
|
12675
|
+
&.active {
|
|
12676
|
+
background-color: ${TABLE_ROW_ACTIVE_COLOR};
|
|
12677
|
+
color: #fff;
|
|
12678
|
+
font-weight: bold;
|
|
12679
|
+
}
|
|
12680
|
+
`}
|
|
12681
|
+
}
|
|
12682
|
+
}
|
|
12683
|
+
|
|
12684
|
+
& th:first-child,
|
|
12685
|
+
& td:first-child {
|
|
12686
|
+
padding-left: 1em;
|
|
12687
|
+
text-align: left;
|
|
12688
|
+
}
|
|
12689
|
+
|
|
12690
|
+
& th,
|
|
12691
|
+
& td {
|
|
12692
|
+
border: none;
|
|
12693
|
+
padding: 0;
|
|
12694
|
+
overflow: hidden;
|
|
12695
|
+
}
|
|
12696
|
+
`;
|
|
12697
|
+
|
|
12698
|
+
export { Accordion, Alert, Button, NumberedContents, Table };
|
|
12625
12699
|
//# sourceMappingURL=index.js.map
|