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