@solidxai/core-ui 0.1.5-beta.8 → 0.1.5-beta.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SolidChatterDateDivider.d.ts","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatterDateDivider.tsx"],"names":[],"mappings":"AAGA,UAAU,KAAK;IACX,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,uBAAuB,aAAc,KAAK,4CAQtD,CAAA"}
1
+ {"version":3,"file":"SolidChatterDateDivider.d.ts","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatterDateDivider.tsx"],"names":[],"mappings":"AAGA,UAAU,KAAK;IACX,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,uBAAuB,aAAc,KAAK,4CAYtD,CAAA"}
@@ -2,6 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import styles from './chatter.module.css';
3
3
  export var SolidChatterDateDivider = function (_a) {
4
4
  var date = _a.date;
5
- return (_jsx("div", { className: styles.chatterDatetimeDivider, children: _jsx("div", { className: "".concat(styles.chatterDividerContent, " absolute"), children: new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' }) }) }));
5
+ var displayDate = (date === 'Today' || date === 'Yesterday')
6
+ ? date
7
+ : new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });
8
+ return (_jsx("div", { className: styles.chatterDatetimeDivider, children: _jsx("div", { className: "".concat(styles.chatterDividerContent, " absolute"), children: displayDate }) }));
6
9
  };
7
10
  //# sourceMappingURL=SolidChatterDateDivider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolidChatterDateDivider.js","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatterDateDivider.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAM1C,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,EAAe;QAAb,IAAI,UAAA;IAC1C,OAAO,CACH,cAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,YACzC,cAAK,SAAS,EAAE,UAAG,MAAM,CAAC,qBAAqB,cAAW,YACrD,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,GAC/F,GACJ,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["\nimport styles from './chatter.module.css';\n\ninterface Props {\n date: string;\n}\n\nexport const SolidChatterDateDivider = ({ date }: Props) => {\n return (\n <div className={styles.chatterDatetimeDivider}>\n <div className={`${styles.chatterDividerContent} absolute`}>\n {new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}\n </div>\n </div>\n )\n}"]}
1
+ {"version":3,"file":"SolidChatterDateDivider.js","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatterDateDivider.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAM1C,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,EAAe;QAAb,IAAI,UAAA;IAC1C,IAAM,WAAW,GAAG,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,WAAW,CAAC;QAC1D,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;IAEvG,OAAO,CACH,cAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,YACzC,cAAK,SAAS,EAAE,UAAG,MAAM,CAAC,qBAAqB,cAAW,YACrD,WAAW,GACV,GACJ,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["\nimport styles from './chatter.module.css';\n\ninterface Props {\n date: string;\n}\n\nexport const SolidChatterDateDivider = ({ date }: Props) => {\n const displayDate = (date === 'Today' || date === 'Yesterday')\n ? date\n : new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });\n\n return (\n <div className={styles.chatterDatetimeDivider}>\n <div className={`${styles.chatterDividerContent} absolute`}>\n {displayDate}\n </div>\n </div>\n )\n}"]}
@@ -6,10 +6,14 @@ interface Props {
6
6
  }
7
7
 
8
8
  export const SolidChatterDateDivider = ({ date }: Props) => {
9
+ const displayDate = (date === 'Today' || date === 'Yesterday')
10
+ ? date
11
+ : new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });
12
+
9
13
  return (
10
14
  <div className={styles.chatterDatetimeDivider}>
11
15
  <div className={`${styles.chatterDividerContent} absolute`}>
12
- {new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}
16
+ {displayDate}
13
17
  </div>
14
18
  </div>
15
19
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidxai/core-ui",
3
- "version": "0.1.5-beta.8",
3
+ "version": "0.1.5-beta.9",
4
4
  "scripts": {
5
5
  "prebuild": "npm run copy-resources && npm run copy-styles",
6
6
  "build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json",