cecomponent 1.0.100 → 1.0.102

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.
@@ -15469,61 +15469,39 @@ const CloudUploadIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports$1.jsx("p
15469
15469
  size: s = "medium",
15470
15470
  onStepClick: a
15471
15471
  }) => {
15472
- const o = (c) => i.includes(c) ? /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon completed", children: /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
15473
- "svg",
15474
- {
15475
- xmlns: "http://www.w3.org/2000/svg",
15476
- viewBox: "0 0 24 24",
15477
- fill: "currentColor",
15478
- children: [
15479
- /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
15480
- /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })
15481
- ]
15482
- }
15483
- ) }) : n.includes(c) ? /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon error", children: /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
15484
- "svg",
15485
- {
15486
- xmlns: "http://www.w3.org/2000/svg",
15487
- viewBox: "0 0 24 24",
15488
- fill: "currentColor",
15489
- children: [
15490
- /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
15491
- /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" })
15492
- ]
15493
- }
15494
- ) }) : c === t ? /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon current", children: c + 1 }) : /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon future", children: c + 1 }), l = (c) => i.includes(c) ? "ce-step completed" : n.includes(c) ? "ce-step error" : c === t ? "ce-step current" : "ce-step future";
15472
+ const o = (f) => i.includes(f) ? "completed" : n.includes(f) ? "error" : f === t ? "current" : "future", l = (f) => i.includes(f) ? /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon completed", children: /* @__PURE__ */ jsxRuntimeExports$1.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: [
15473
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
15474
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })
15475
+ ] }) }) : n.includes(f) ? /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon error", children: /* @__PURE__ */ jsxRuntimeExports$1.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: [
15476
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
15477
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" })
15478
+ ] }) }) : f === t ? /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon current", children: f + 1 }) : /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-icon future", children: f + 1 }), c = e.map((f, u) => u < e.length - 1 ? "auto 1fr" : "auto").join(" ");
15495
15479
  return /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: `ce-stepper-container ce-stepper-${s}`, children: [
15496
- /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper", children: e.map((c, f) => /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
15497
- "div",
15498
- {
15499
- className: l(f),
15500
- onClick: () => a && a(f),
15501
- style: { cursor: a ? "pointer" : "default" },
15502
- children: [
15503
- o(f),
15504
- f < e.length - 1 && /* @__PURE__ */ jsxRuntimeExports$1.jsx(
15505
- "div",
15506
- {
15507
- className: `ce-stepper-connector ${i.includes(f) ? "completed" : n.includes(f) ? "error" : ""}`
15508
- }
15509
- )
15510
- ]
15511
- },
15512
- f
15513
- )) }),
15514
- /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-labels", children: e.map((c, f) => /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
15515
- "div",
15516
- {
15517
- className: `ce-step-label ${i.includes(f) ? "completed" : n.includes(f) ? "error" : f === t ? "current" : "future"}`,
15518
- onClick: () => a && a(f),
15519
- style: { cursor: a ? "pointer" : "default" },
15520
- children: [
15521
- /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "ce-step-text", children: c.label }),
15522
- n.includes(f) && c.errorMessage && /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "ce-step-error-message", children: c.errorMessage })
15523
- ]
15524
- },
15525
- f
15526
- )) })
15480
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-track", style: { gridTemplateColumns: c }, children: e.map((f, u) => /* @__PURE__ */ jsxRuntimeExports$1.jsxs(React__default.Fragment, { children: [
15481
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx(
15482
+ "div",
15483
+ {
15484
+ className: "ce-step",
15485
+ style: { gridColumn: u * 2 + 1, cursor: a ? "pointer" : "default" },
15486
+ onClick: () => a == null ? void 0 : a(u),
15487
+ children: l(u)
15488
+ }
15489
+ ),
15490
+ u < e.length - 1 && /* @__PURE__ */ jsxRuntimeExports$1.jsx(
15491
+ "div",
15492
+ {
15493
+ className: `ce-stepper-connector ${o(u)}`,
15494
+ style: { gridColumn: u * 2 + 2 }
15495
+ }
15496
+ )
15497
+ ] }, `track-${u}`)) }),
15498
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-labelsGrid", style: { gridTemplateColumns: c }, children: e.map((f, u) => /* @__PURE__ */ jsxRuntimeExports$1.jsxs(React__default.Fragment, { children: [
15499
+ /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: `ce-step-label ${o(u)}`, style: { gridColumn: u * 2 + 1 }, children: [
15500
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "ce-step-text", children: f.label }),
15501
+ n.includes(u) && f.errorMessage && /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "ce-step-error-message", children: f.errorMessage })
15502
+ ] }),
15503
+ u < e.length - 1 && /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "ce-stepper-label-spacer", style: { gridColumn: u * 2 + 2 } })
15504
+ ] }, `label-${u}`)) })
15527
15505
  ] });
15528
15506
  }, CECheckBox = ({ label: e, checked: t, onChange: i, disabled: n = !1 }) => {
15529
15507
  const s = (a) => {
@@ -23996,7 +23974,7 @@ function pad0r(e, t) {
23996
23974
  function SSF_isgeneral(e, t) {
23997
23975
  return t = t || 0, e.length >= 7 + t && (e.charCodeAt(t) | 32) === 103 && (e.charCodeAt(t + 1) | 32) === 101 && (e.charCodeAt(t + 2) | 32) === 110 && (e.charCodeAt(t + 3) | 32) === 101 && (e.charCodeAt(t + 4) | 32) === 114 && (e.charCodeAt(t + 5) | 32) === 97 && (e.charCodeAt(t + 6) | 32) === 108;
23998
23976
  }
23999
- var days = [
23977
+ var days$1 = [
24000
23978
  ["Sun", "Sunday"],
24001
23979
  ["Mon", "Monday"],
24002
23980
  ["Tue", "Tuesday"],
@@ -24230,9 +24208,9 @@ function SSF_write_date(e, t, i, n) {
24230
24208
  c = i.d, f = t.length;
24231
24209
  break;
24232
24210
  case 3:
24233
- return days[i.q][0];
24211
+ return days$1[i.q][0];
24234
24212
  default:
24235
- return days[i.q][1];
24213
+ return days$1[i.q][1];
24236
24214
  }
24237
24215
  break;
24238
24216
  case 104:
@@ -54247,6 +54225,54 @@ const CEInputBox$1 = ({
54247
54225
  ]
54248
54226
  }
54249
54227
  );
54228
+ }, CEToggleYesNo = ({ value: e, onChange: t, label: i }) => /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: "toggle-container", children: [
54229
+ i && /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "label", children: i }),
54230
+ /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: "toggle-group", children: [
54231
+ /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
54232
+ CEButton,
54233
+ {
54234
+ size: "small",
54235
+ variant: e === "yes" ? "primary" : "outlined",
54236
+ className: `toggle-btn ${e === "yes" ? "active" : ""}`,
54237
+ onClick: () => t("yes"),
54238
+ children: [
54239
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "circle" }),
54240
+ "YES"
54241
+ ]
54242
+ }
54243
+ ),
54244
+ /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
54245
+ CEButton,
54246
+ {
54247
+ size: "small",
54248
+ variant: e === "no" ? "primary" : "outlined",
54249
+ className: `toggle-btn ${e === "no" ? "active" : ""}`,
54250
+ onClick: () => t("no"),
54251
+ children: [
54252
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "circle" }),
54253
+ "NO"
54254
+ ]
54255
+ }
54256
+ )
54257
+ ] })
54258
+ ] }), days = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], CEOperatingDaysSelector = ({
54259
+ selectedDays: e,
54260
+ onChange: t
54261
+ }) => {
54262
+ const i = (n) => {
54263
+ e.includes(n) ? t(e.filter((s) => s !== n)) : t([...e, n]);
54264
+ };
54265
+ return /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "days-group", children: days.map((n) => /* @__PURE__ */ jsxRuntimeExports$1.jsx(
54266
+ CEButton,
54267
+ {
54268
+ size: "small",
54269
+ variant: e.includes(n) ? "primary" : "outlined",
54270
+ className: `day-btn ${e.includes(n) ? "active" : ""}`,
54271
+ onClick: () => i(n),
54272
+ children: n
54273
+ },
54274
+ n
54275
+ )) });
54250
54276
  };
54251
54277
  export {
54252
54278
  CEAutoSuggestInput,
@@ -54282,6 +54308,7 @@ export {
54282
54308
  CEMessageModal,
54283
54309
  CECustomModal as CEModalPopUp,
54284
54310
  CENotificationButton,
54311
+ CEOperatingDaysSelector,
54285
54312
  CEPagination,
54286
54313
  CERadioButton,
54287
54314
  CERadioButtonGroup as CERadioGroup,
@@ -54295,6 +54322,7 @@ export {
54295
54322
  CETabView,
54296
54323
  CETemplate,
54297
54324
  CETimePicker,
54325
+ CEToggleYesNo,
54298
54326
  CETransferButton,
54299
54327
  CETruncatedTextWithTooltip,
54300
54328
  CEUploadModalWrapper,
@@ -0,0 +1,15 @@
1
+ declare const radialData: {
2
+ name: string;
3
+ value: number;
4
+ className: string;
5
+ }[];
6
+ interface CEActivityGaugeProps {
7
+ size?: "xs" | "sm" | "md" | "lg";
8
+ title?: string;
9
+ subtitle?: string;
10
+ data?: typeof radialData;
11
+ className?: string;
12
+ showLegend?: boolean;
13
+ }
14
+ export declare const CEActivityGauge: ({ size, title, subtitle, data, className, showLegend, }: CEActivityGaugeProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,26 @@
1
+ declare const barData: {
2
+ month: Date;
3
+ A: number;
4
+ B: number;
5
+ C: number;
6
+ }[];
7
+ interface CEBarChartProps {
8
+ data?: typeof barData;
9
+ className?: string;
10
+ colors?: Record<string, string>;
11
+ showLegend?: boolean;
12
+ showGrid?: boolean;
13
+ }
14
+ export declare const CEBarChart: ({ data, className, colors, showLegend, showGrid, }: CEBarChartProps) => import("react/jsx-runtime").JSX.Element;
15
+ interface CEBarChart02Props {
16
+ data?: Array<{
17
+ A: number;
18
+ B: number;
19
+ date: string;
20
+ }>;
21
+ className?: string;
22
+ colors?: Record<string, string>;
23
+ showGrid?: boolean;
24
+ }
25
+ export declare const CEBarChart02: ({ data, className, colors, showGrid, }: CEBarChart02Props) => import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1 @@
1
+ export declare const CEChartsDemo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ declare const lineData: {
2
+ date: Date;
3
+ A: number;
4
+ B: number;
5
+ C: number;
6
+ }[];
7
+ interface CELineChartProps {
8
+ data?: typeof lineData;
9
+ height?: number;
10
+ className?: string;
11
+ colors?: Record<string, string>;
12
+ showLegend?: boolean;
13
+ showGrid?: boolean;
14
+ }
15
+ export declare const CELineChart: ({ data, className, colors, showLegend, showGrid, }: Omit<CELineChartProps, "height">) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const CELineChart02: ({ data, className, colors, showLegend, showGrid, }: Omit<CELineChartProps, "height">) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,15 @@
1
+ declare const lineData: {
2
+ date: Date;
3
+ A: number;
4
+ B: number;
5
+ C: number;
6
+ }[];
7
+ interface CELineChart03Props {
8
+ data?: typeof lineData;
9
+ className?: string;
10
+ colors?: Record<string, string>;
11
+ showLegend?: boolean;
12
+ showGrid?: boolean;
13
+ }
14
+ export declare const CELineChart03: ({ data, className, colors, showLegend, showGrid, }: CELineChart03Props) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ declare const lineData: {
2
+ date: Date;
3
+ A: number;
4
+ B: number;
5
+ C: number;
6
+ }[];
7
+ interface CELineChart04Props {
8
+ data?: typeof lineData;
9
+ className?: string;
10
+ colors?: Record<string, string>;
11
+ showLegend?: boolean;
12
+ showGrid?: boolean;
13
+ }
14
+ export declare const CELineChart04: ({ data, className, colors, showLegend, showGrid, }: CELineChart04Props) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,17 @@
1
+ declare const pieChartData: {
2
+ name: string;
3
+ value: number;
4
+ className: string;
5
+ }[];
6
+ interface CEPieChartProps {
7
+ data?: typeof pieChartData;
8
+ size?: "xxs" | "xs" | "sm" | "md" | "lg";
9
+ className?: string;
10
+ showLegend?: boolean;
11
+ }
12
+ export declare const CEPieChart: ({ data, size, className, showLegend, }: CEPieChartProps) => import("react/jsx-runtime").JSX.Element;
13
+ interface CEDonutChartProps extends CEPieChartProps {
14
+ donut?: boolean;
15
+ }
16
+ export declare const CEDonutChart: ({ data, size, className, showLegend, donut, }: CEDonutChartProps) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,10 @@
1
+ interface CEProgressCircleProps {
2
+ size?: "xs" | "sm" | "md" | "lg";
3
+ title?: string;
4
+ subtitle?: string;
5
+ value?: number;
6
+ maxValue?: number;
7
+ className?: string;
8
+ }
9
+ export declare const CEProgressCircle: ({ size, title, subtitle, value, maxValue, className, }: CEProgressCircleProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,15 @@
1
+ declare const radarData: {
2
+ subject: string;
3
+ A: number;
4
+ B: number;
5
+ C: number;
6
+ }[];
7
+ interface CERadarChartProps {
8
+ data?: typeof radarData;
9
+ className?: string;
10
+ colors?: Record<string, string>;
11
+ showLegend?: boolean;
12
+ showGrid?: boolean;
13
+ }
14
+ export declare const CERadarChart: ({ data, className, colors, showLegend, showGrid, }: CERadarChartProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,35 @@
1
+ import { TooltipProps } from 'recharts';
2
+ import { Props as LegendContentProps } from 'recharts/types/component/DefaultLegendContent';
3
+ import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
4
+ import { Props as DotProps } from 'recharts/types/shape/Dot';
5
+ /**
6
+ * Selects evenly spaced items from an array. Used for rendering
7
+ * certain number of x-axis labels.
8
+ * @param dataArray - The array of items to select from.
9
+ * @param count - The number of items to select.
10
+ * @returns The selected items.
11
+ */
12
+ export declare const selectEvenlySpacedItems: <T extends readonly unknown[]>(dataArray: T, count: number) => Array<T[number]>;
13
+ interface ChartLegendContentProps extends LegendContentProps {
14
+ reversed?: boolean;
15
+ className?: string;
16
+ align?: "left" | "center" | "right";
17
+ }
18
+ export declare const ChartLegendContent: ({ payload, verticalAlign, reversed, className, align, }: ChartLegendContentProps) => import("react/jsx-runtime").JSX.Element | null;
19
+ interface ChartTooltipContentProps extends TooltipProps<ValueType, NameType> {
20
+ isRadialChart?: boolean;
21
+ isPieChart?: boolean;
22
+ formatter?: (value: ValueType, name: NameType, props: any, index: number, payload: any) => [string | number | (string | number)[], string?];
23
+ labelFormatter?: (label: any, payload: any) => string;
24
+ }
25
+ export declare const ChartTooltipContent: ({ active, payload, label, isRadialChart, isPieChart, formatter, labelFormatter, }: ChartTooltipContentProps) => import("react/jsx-runtime").JSX.Element | null;
26
+ interface ChartActiveDotProps extends DotProps {
27
+ cx?: number;
28
+ cy?: number;
29
+ }
30
+ export declare const ChartActiveDot: ({ cx, cy }: ChartActiveDotProps) => import("react/jsx-runtime").JSX.Element;
31
+ /**
32
+ * Hook to detect breakpoints (simplified version)
33
+ */
34
+ export declare const useBreakpoint: (size: "sm" | "md" | "lg" | "xl") => boolean;
35
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ type ToggleYesNoProps = {
3
+ value: string | null;
4
+ onChange: (val: string) => void;
5
+ label?: string;
6
+ };
7
+ declare const CEToggleYesNo: React.FC<ToggleYesNoProps>;
8
+ export default CEToggleYesNo;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ type OperatingDaysSelectorProps = {
3
+ selectedDays: string[];
4
+ onChange: (days: string[]) => void;
5
+ };
6
+ declare const CEOperatingDaysSelector: React.FC<OperatingDaysSelectorProps>;
7
+ export default CEOperatingDaysSelector;
package/dist/index.d.ts CHANGED
@@ -49,3 +49,5 @@ export { default as CEChatbox } from './components/Common/CEChatbox/CEChatbox';
49
49
  export { default as CEStatusDropdown } from './components/Common/StatusDropDown/CEStatusDropdown';
50
50
  export { default as CETruncatedTextWithTooltip } from './components/Common/DataGrid/CETruncatedTextWithTooltip';
51
51
  export { default as CESkeletonTable } from './components/Common/DataGrid/CESkeletonTable';
52
+ export { default as CEToggleYesNo } from './components/Common/CEToggleGroup/CEToggleYesNo';
53
+ export { default as CEOperatingDaysSelector } from './components/Common/OperatingDaysSelector/CEOperatingDaysSelector';
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.100",
4
+ "version": "1.0.102",
5
5
  "main": "dist/ce-component-lib.js",
6
6
  "module": "dist/ce-component-lib.mjs",
7
7
  "types": "dist/index.d.ts",