@digital-ai/dot-components 3.11.0 → 3.11.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 (2) hide show
  1. package/index.esm.js +30 -13
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -9875,16 +9875,16 @@ const StyledDashboardDetails = styled(DotDrawer)`
9875
9875
  }
9876
9876
  .dot-card {
9877
9877
  border: none;
9878
+ padding: ${theme.spacing(0, 2)};
9878
9879
 
9879
9880
  .dot-card-header {
9880
9881
  padding: ${theme.spacing(2, 1, 0, 0)};
9881
9882
  }
9882
9883
  .dot-card-content {
9883
- padding: ${theme.spacing(0, 2, 3, 2)};
9884
+ padding: ${theme.spacing(0, 0, 3, 0)};
9884
9885
  }
9885
9886
  }
9886
9887
  .content {
9887
- padding: ${theme.spacing(0, 2, 1, 2)};
9888
9888
  overflow-y: auto;
9889
9889
  }
9890
9890
  .dot-avatar {
@@ -9893,10 +9893,11 @@ const StyledDashboardDetails = styled(DotDrawer)`
9893
9893
  .section-title {
9894
9894
  display: flex;
9895
9895
  align-items: center;
9896
- padding: ${theme.spacing(2, 0, 2, 2)};
9897
- margin: ${theme.spacing(2, -2, 0)};
9896
+ padding: ${theme.spacing(2)};
9897
+ }
9898
+ .section-title-border {
9899
+ margin: ${theme.spacing(1, -2, 0)};
9898
9900
  border-bottom: 1px solid ${theme.palette.figma.border.default};
9899
- font-weight: normal;
9900
9901
  }
9901
9902
  .dot-icon {
9902
9903
  flex-basis: content;
@@ -9924,6 +9925,18 @@ const StyledDashboardDetails = styled(DotDrawer)`
9924
9925
  `}
9925
9926
  `;
9926
9927
 
9928
+ const getFormattedDate = dateString => {
9929
+ if (!dateString) {
9930
+ return '';
9931
+ }
9932
+ const date = new Date(dateString);
9933
+ return date.toLocaleDateString('en-US', {
9934
+ dateStyle: 'medium'
9935
+ }) + ' - ' + date.toLocaleTimeString('en-US', {
9936
+ hour: '2-digit',
9937
+ minute: '2-digit'
9938
+ });
9939
+ };
9927
9940
  const DashboardDetailsField = ({
9928
9941
  children,
9929
9942
  className,
@@ -9956,12 +9969,16 @@ const DashboardDetailsSectionHeading = ({
9956
9969
  if (className) {
9957
9970
  c += ` ${className}`;
9958
9971
  }
9959
- return jsx(DotTypography, {
9960
- ariaRole: "heading",
9961
- className: c,
9962
- component: "div",
9963
- variant: "subtitle1",
9964
- children: label
9972
+ return jsx("div", {
9973
+ className: "section-title-border",
9974
+ children: jsx(DotTypography, {
9975
+ ariaRole: "heading",
9976
+ ariaLevel: 2,
9977
+ className: c,
9978
+ component: "div",
9979
+ variant: "body1",
9980
+ children: label
9981
+ })
9965
9982
  });
9966
9983
  };
9967
9984
  const DotDashboardDetailsView = ({
@@ -10081,11 +10098,11 @@ const DotDashboardDetailsView = ({
10081
10098
  }), jsx(DashboardDetailsField, {
10082
10099
  className: "dashboard-details-created-dt",
10083
10100
  label: "Created on",
10084
- value: dashboard.created_dt
10101
+ value: getFormattedDate(dashboard.created_dt)
10085
10102
  }), dashboard.updated_dt && jsx(DashboardDetailsField, {
10086
10103
  className: "dashboard-details-updated-dt",
10087
10104
  label: "Modified on",
10088
- value: dashboard.updated_dt
10105
+ value: getFormattedDate(dashboard.updated_dt)
10089
10106
  }), dashboard.updated_by_fullname && jsx(DashboardDetailsField, {
10090
10107
  className: "dashboard-details-updated-by",
10091
10108
  label: "Modified by",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "3.11.0",
3
+ "version": "3.11.2",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [