cecomponent 1.0.81 → 1.0.83
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/ce-component-lib.css +1 -1
- package/dist/ce-component-lib.js +2 -2
- package/dist/ce-component-lib.mjs +89 -6
- package/dist/components/CEChatbox/CEChatbox.d.ts +7 -0
- package/dist/components/Common/Button/CEButton.d.ts +2 -0
- package/dist/components/Common/CEBadge/CEBadge.d.ts +9 -0
- package/dist/components/Common/CEChatbox/CEChatbox.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1743,21 +1743,26 @@ const Breadcrumbs = ({ items: e, maxVisible: t = 4, onItemClick: r }) => {
|
|
|
1743
1743
|
children: i,
|
|
1744
1744
|
className: s = "",
|
|
1745
1745
|
sx: n = {},
|
|
1746
|
-
color: a
|
|
1746
|
+
color: a,
|
|
1747
|
+
label: o,
|
|
1748
|
+
icon: l
|
|
1747
1749
|
}) => {
|
|
1748
|
-
const
|
|
1749
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
1750
|
+
const f = getSizeStyle(t), c = getVariantClass(e);
|
|
1751
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1750
1752
|
"button",
|
|
1751
1753
|
{
|
|
1752
|
-
className: `ce-button ${
|
|
1754
|
+
className: `ce-button ${c} ${s}`,
|
|
1753
1755
|
onClick: r,
|
|
1754
1756
|
style: {
|
|
1755
|
-
...
|
|
1757
|
+
...f,
|
|
1756
1758
|
...n,
|
|
1757
1759
|
...a ? { color: a } : {}
|
|
1758
1760
|
},
|
|
1759
1761
|
disabled: e === "disabled",
|
|
1760
|
-
children:
|
|
1762
|
+
children: [
|
|
1763
|
+
l && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ce-button__icon", children: l }),
|
|
1764
|
+
o ?? i
|
|
1765
|
+
]
|
|
1761
1766
|
}
|
|
1762
1767
|
);
|
|
1763
1768
|
}, CeBox = forwardRef(function({
|
|
@@ -31301,12 +31306,90 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
31301
31306
|
] }),
|
|
31302
31307
|
S(o, p, E, "Chosen")
|
|
31303
31308
|
] });
|
|
31309
|
+
}, CEChatbox = ({ buttonLabel: e, buttonIcon: t }) => {
|
|
31310
|
+
const [r, i] = useState([
|
|
31311
|
+
{
|
|
31312
|
+
id: 1,
|
|
31313
|
+
author: "David Brown",
|
|
31314
|
+
initials: "DB",
|
|
31315
|
+
timestamp: "Jan 22, 2024 at 8:50 PM",
|
|
31316
|
+
content: "Contract amendments have been drafted and sent to all affected agencies. Expected completion by end of month."
|
|
31317
|
+
},
|
|
31318
|
+
{
|
|
31319
|
+
id: 2,
|
|
31320
|
+
author: "Mike Wilson",
|
|
31321
|
+
initials: "MW",
|
|
31322
|
+
timestamp: "Jan 21, 2024 at 5:00 PM",
|
|
31323
|
+
content: "Utah DEQ has approved the new pricing structure. All 15 state agencies have been notified and are in agreement with the changes."
|
|
31324
|
+
}
|
|
31325
|
+
]), [s, n] = useState(""), a = () => {
|
|
31326
|
+
if (s.trim()) {
|
|
31327
|
+
const l = {
|
|
31328
|
+
id: r.length + 1,
|
|
31329
|
+
author: "Current User",
|
|
31330
|
+
initials: "CU",
|
|
31331
|
+
timestamp: (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
|
|
31332
|
+
month: "short",
|
|
31333
|
+
day: "numeric",
|
|
31334
|
+
year: "numeric",
|
|
31335
|
+
hour: "numeric",
|
|
31336
|
+
minute: "2-digit",
|
|
31337
|
+
hour12: !0
|
|
31338
|
+
}),
|
|
31339
|
+
content: s
|
|
31340
|
+
};
|
|
31341
|
+
i([l, ...r]), n("");
|
|
31342
|
+
}
|
|
31343
|
+
}, o = (l) => {
|
|
31344
|
+
l.key === "Enter" && a();
|
|
31345
|
+
};
|
|
31346
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "notes-container", children: [
|
|
31347
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "notes-header", children: [
|
|
31348
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "notes-icon", children: "📝" }),
|
|
31349
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "notes-title", children: "Notes" })
|
|
31350
|
+
] }),
|
|
31351
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "add-note-section", children: [
|
|
31352
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31353
|
+
"textarea",
|
|
31354
|
+
{
|
|
31355
|
+
value: s,
|
|
31356
|
+
onChange: (l) => n(l.target.value),
|
|
31357
|
+
onKeyPress: o,
|
|
31358
|
+
placeholder: "Add a note...",
|
|
31359
|
+
className: "add-note-input",
|
|
31360
|
+
rows: 3
|
|
31361
|
+
}
|
|
31362
|
+
),
|
|
31363
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31364
|
+
CEButton,
|
|
31365
|
+
{
|
|
31366
|
+
label: e,
|
|
31367
|
+
icon: t,
|
|
31368
|
+
variant: "outlinedGreen",
|
|
31369
|
+
onClick: a,
|
|
31370
|
+
sx: { width: "100%", marginTop: "10px" },
|
|
31371
|
+
children: void 0
|
|
31372
|
+
}
|
|
31373
|
+
)
|
|
31374
|
+
] }),
|
|
31375
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "notes-list", children: r.map((l) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "note-item", children: [
|
|
31376
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "note-avatar", children: l.initials }),
|
|
31377
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "note-content", children: [
|
|
31378
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "note-header", children: [
|
|
31379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "note-author", children: l.author }),
|
|
31380
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "note-timestamp", children: l.timestamp })
|
|
31381
|
+
] }),
|
|
31382
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "note-text", children: l.content })
|
|
31383
|
+
] })
|
|
31384
|
+
] }, l.id)) })
|
|
31385
|
+
] });
|
|
31304
31386
|
};
|
|
31305
31387
|
export {
|
|
31306
31388
|
CEAutoSuggestInput,
|
|
31307
31389
|
CEAvatarMenu,
|
|
31308
31390
|
Breadcrumbs as CEBreadcrumbs,
|
|
31309
31391
|
CEButton,
|
|
31392
|
+
CEChatbox,
|
|
31310
31393
|
CECheckBox as CECheckbox,
|
|
31311
31394
|
CEChipInput,
|
|
31312
31395
|
CEDataGridDynamicTable,
|
|
@@ -2,6 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { Size } from '../Tokens/CESizes';
|
|
3
3
|
type ButtonVariant = "primary" | "secondary" | "text" | "neutral" | "outlined" | "outlinedGreen" | "disabled" | "underline";
|
|
4
4
|
interface CEButtonProps {
|
|
5
|
+
label?: string;
|
|
5
6
|
variant?: ButtonVariant;
|
|
6
7
|
size?: Size;
|
|
7
8
|
onClick: () => void;
|
|
@@ -9,6 +10,7 @@ interface CEButtonProps {
|
|
|
9
10
|
className?: string;
|
|
10
11
|
sx?: React.CSSProperties;
|
|
11
12
|
color?: string;
|
|
13
|
+
icon?: React.ReactNode;
|
|
12
14
|
}
|
|
13
15
|
declare const CEButton: React.FC<CEButtonProps>;
|
|
14
16
|
export default CEButton;
|
package/dist/index.d.ts
CHANGED
|
@@ -42,3 +42,4 @@ export { default as CETemplate } from './components/Common/Template/CETemplate';
|
|
|
42
42
|
export { default as CETimePicker } from './components/Common/Timepicker/CETimePicker';
|
|
43
43
|
export { default as TransferList } from './components/Common/TransferListNew/CETransferList';
|
|
44
44
|
export { default as CETransferButton } from './components/Common/TransferListNew/CETransferButton';
|
|
45
|
+
export { default as CEChatbox } from './components/CEChatbox/CEChatbox';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cecomponent",
|
|
3
3
|
"description": "A React component library for building modern UIs for Cleanearth",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.83",
|
|
5
5
|
"main": "dist/ce-component-lib.js",
|
|
6
6
|
"module": "dist/ce-component-lib.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|