cecomponent 1.0.104 → 1.0.106
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.
|
@@ -15500,9 +15500,10 @@ const CloudUploadIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports$1.jsx("p
|
|
|
15500
15500
|
className: "ce-step",
|
|
15501
15501
|
style: {
|
|
15502
15502
|
gridColumn: u * 2 + 1,
|
|
15503
|
-
cursor:
|
|
15503
|
+
cursor: "default"
|
|
15504
|
+
},
|
|
15505
|
+
onClick: () => {
|
|
15504
15506
|
},
|
|
15505
|
-
onClick: () => a == null ? void 0 : a(u),
|
|
15506
15507
|
children: l(u)
|
|
15507
15508
|
}
|
|
15508
15509
|
),
|
|
@@ -52542,30 +52543,46 @@ const CEInputBox$1 = ({
|
|
|
52542
52543
|
onChange: t,
|
|
52543
52544
|
size: i = "medium",
|
|
52544
52545
|
style: n,
|
|
52545
|
-
inputGroupStyle: s
|
|
52546
|
+
inputGroupStyle: s,
|
|
52547
|
+
mode: a = "range"
|
|
52546
52548
|
}) => {
|
|
52547
|
-
const [
|
|
52548
|
-
!
|
|
52549
|
-
},
|
|
52550
|
-
|
|
52551
|
-
},
|
|
52552
|
-
const
|
|
52553
|
-
|
|
52554
|
-
},
|
|
52555
|
-
const
|
|
52556
|
-
|
|
52549
|
+
const [o, l] = useState(""), [c, f] = useState(""), [u, y] = useState(!1), [d, g] = useState(""), m = (_) => {
|
|
52550
|
+
!_.currentTarget.value && !o && !c && y(!1);
|
|
52551
|
+
}, p = (_, E) => {
|
|
52552
|
+
_ && E && new Date(E) < new Date(_) ? g("End date must be after or equal to start date") : (g(""), t == null || t({ startDate: _, endDate: E }));
|
|
52553
|
+
}, S = (_) => {
|
|
52554
|
+
const E = _.target.value;
|
|
52555
|
+
l(E), p(E, c);
|
|
52556
|
+
}, x = (_) => {
|
|
52557
|
+
const E = _.target.value;
|
|
52558
|
+
f(E), p(o, E);
|
|
52557
52559
|
};
|
|
52558
52560
|
return /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: "date-range-picker", style: n, children: [
|
|
52559
|
-
/* @__PURE__ */ jsxRuntimeExports$1.
|
|
52561
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "date-range-field-group", style: s, children: a === "single" ? /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: "field-box float", children: [
|
|
52562
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx(
|
|
52563
|
+
"input",
|
|
52564
|
+
{
|
|
52565
|
+
type: "date",
|
|
52566
|
+
value: o,
|
|
52567
|
+
onChange: (_) => {
|
|
52568
|
+
const E = _.target.value;
|
|
52569
|
+
l(E), t == null || t({ startDate: E, endDate: "" });
|
|
52570
|
+
},
|
|
52571
|
+
onFocus: () => y(!0),
|
|
52572
|
+
onBlur: (_) => m(_)
|
|
52573
|
+
}
|
|
52574
|
+
),
|
|
52575
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx("label", { className: "floating-label-box", children: e || "Select Date" })
|
|
52576
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports$1.jsxs(jsxRuntimeExports$1.Fragment, { children: [
|
|
52560
52577
|
/* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: "field-box float", children: [
|
|
52561
52578
|
/* @__PURE__ */ jsxRuntimeExports$1.jsx(
|
|
52562
52579
|
"input",
|
|
52563
52580
|
{
|
|
52564
52581
|
type: "date",
|
|
52565
|
-
value:
|
|
52566
|
-
onChange:
|
|
52567
|
-
onFocus: () =>
|
|
52568
|
-
onBlur: (
|
|
52582
|
+
value: o,
|
|
52583
|
+
onChange: S,
|
|
52584
|
+
onFocus: () => y(!0),
|
|
52585
|
+
onBlur: (_) => m(_)
|
|
52569
52586
|
}
|
|
52570
52587
|
),
|
|
52571
52588
|
/* @__PURE__ */ jsxRuntimeExports$1.jsx("label", { className: "floating-label-box", children: "From" })
|
|
@@ -52576,16 +52593,16 @@ const CEInputBox$1 = ({
|
|
|
52576
52593
|
"input",
|
|
52577
52594
|
{
|
|
52578
52595
|
type: "date",
|
|
52579
|
-
value:
|
|
52580
|
-
onChange:
|
|
52581
|
-
onFocus: () =>
|
|
52582
|
-
onBlur: (
|
|
52596
|
+
value: c,
|
|
52597
|
+
onChange: x,
|
|
52598
|
+
onFocus: () => y(!0),
|
|
52599
|
+
onBlur: (_) => m(_)
|
|
52583
52600
|
}
|
|
52584
52601
|
),
|
|
52585
52602
|
/* @__PURE__ */ jsxRuntimeExports$1.jsx("label", { className: "floating-label-box", children: "To" })
|
|
52586
52603
|
] })
|
|
52587
|
-
] }),
|
|
52588
|
-
|
|
52604
|
+
] }) }),
|
|
52605
|
+
d && a !== "single" && /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "error-text", children: d })
|
|
52589
52606
|
] });
|
|
52590
52607
|
}, FieldsInput = ({
|
|
52591
52608
|
label: e,
|
|
@@ -10,6 +10,7 @@ interface CEDateRangePickerProps {
|
|
|
10
10
|
size?: Size;
|
|
11
11
|
style?: React.CSSProperties;
|
|
12
12
|
inputGroupStyle?: React.CSSProperties;
|
|
13
|
+
mode?: "range" | "single";
|
|
13
14
|
}
|
|
14
15
|
declare const CEDateRangePicker: React.FC<CEDateRangePickerProps>;
|
|
15
16
|
export default CEDateRangePicker;
|
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.106",
|
|
5
5
|
"main": "dist/ce-component-lib.js",
|
|
6
6
|
"module": "dist/ce-component-lib.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|