cecomponent 1.0.112 → 1.0.113

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.
@@ -54448,8 +54448,74 @@ const CEInputBox$1 = ({
54448
54448
  children: a.label
54449
54449
  },
54450
54450
  a.value
54451
- )) });
54451
+ )) }), CEAccordion = ({ children: e }) => /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "accordion-container", children: e }), CEAccordionItem = ({ title: e, children: t, initiallyOpen: i = !1 }) => {
54452
+ const [n, s] = useState(i);
54453
+ return /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: "accordion-item", children: [
54454
+ /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
54455
+ "button",
54456
+ {
54457
+ className: `accordion-header ${n ? "open" : ""}`,
54458
+ onClick: () => s(!n),
54459
+ children: [
54460
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "accordion-title", children: e }),
54461
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: `accordion-icon ${n ? "open" : ""}`, children: /* @__PURE__ */ jsxRuntimeExports$1.jsxs(
54462
+ "svg",
54463
+ {
54464
+ width: "21",
54465
+ height: "12",
54466
+ viewBox: "0 0 21 12",
54467
+ fill: "none",
54468
+ xmlns: "http://www.w3.org/2000/svg",
54469
+ children: [
54470
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("g", { clipPath: "url(#clip0_20728_2951)", children: /* @__PURE__ */ jsxRuntimeExports$1.jsx(
54471
+ "path",
54472
+ {
54473
+ fillRule: "evenodd",
54474
+ clipRule: "evenodd",
54475
+ d: "M20.5 1.89L19.094 0.5L10.487 8.761L9.569 7.88L9.574 7.885L1.927 0.545L0.5 1.914L10.487 11.5L20.5 1.89Z",
54476
+ fill: "black"
54477
+ }
54478
+ ) }),
54479
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("defs", { children: /* @__PURE__ */ jsxRuntimeExports$1.jsx("clipPath", { id: "clip0_20728_2951", children: /* @__PURE__ */ jsxRuntimeExports$1.jsx(
54480
+ "rect",
54481
+ {
54482
+ width: "11",
54483
+ height: "20",
54484
+ fill: "white",
54485
+ transform: "matrix(0 -1 1 0 0.5 11.5)"
54486
+ }
54487
+ ) }) })
54488
+ ]
54489
+ }
54490
+ ) })
54491
+ ]
54492
+ }
54493
+ ),
54494
+ n && /* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { className: "accordion-content", children: t })
54495
+ ] });
54496
+ }, CEToggleSlide = ({ checked: e, onToggle: t, label: i }) => {
54497
+ const n = () => {
54498
+ t(!e);
54499
+ };
54500
+ return /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { className: "toggle-container", children: [
54501
+ i && /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "toggle-label", children: i }),
54502
+ /* @__PURE__ */ jsxRuntimeExports$1.jsxs("label", { className: "toggle-switch", children: [
54503
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx(
54504
+ "input",
54505
+ {
54506
+ type: "checkbox",
54507
+ checked: e,
54508
+ onChange: n,
54509
+ className: "toggle-checkbox"
54510
+ }
54511
+ ),
54512
+ /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: "toggle-slider" })
54513
+ ] })
54514
+ ] });
54515
+ };
54452
54516
  export {
54517
+ CEAccordion,
54518
+ CEAccordionItem,
54453
54519
  CEAutoSuggestInput,
54454
54520
  CEAvatarMenu,
54455
54521
  CEBadge,
@@ -54498,6 +54564,7 @@ export {
54498
54564
  CETabView,
54499
54565
  CETemplate,
54500
54566
  CETimePicker,
54567
+ CEToggleSlide as CEToggleSlider,
54501
54568
  CEToggleYesNo,
54502
54569
  CETransferButton,
54503
54570
  CETruncatedTextWithTooltip,
@@ -0,0 +1,6 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ interface AccordionProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const CEAccordion: React.FC<AccordionProps>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface AccordionItemProps {
3
+ title: string;
4
+ children: React.ReactNode;
5
+ initiallyOpen?: boolean;
6
+ }
7
+ export declare const CEAccordionItem: React.FC<AccordionItemProps>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface ToggleProps {
3
+ checked: boolean;
4
+ onToggle: (checked: boolean) => void;
5
+ label?: string;
6
+ }
7
+ declare const CEToggleSlide: React.FC<ToggleProps>;
8
+ export default CEToggleSlide;
package/dist/index.d.ts CHANGED
@@ -52,3 +52,6 @@ export { default as CESkeletonTable } from './components/Common/DataGrid/CESkele
52
52
  export { default as CEToggleYesNo } from './components/Common/CEToggleGroup/CEToggleYesNo';
53
53
  export { default as CEOperatingDaysSelector } from './components/Common/OperatingDaysSelector/CEOperatingDaysSelector';
54
54
  export { default as CERoundTabNav } from './components/Common/CERadiusTabNavigation/CERoundTabNav';
55
+ export { CEAccordion } from './components/Common/CEAccordion/CEAccordion';
56
+ export { CEAccordionItem } from './components/Common/CEAccordion/CEAccordionItem';
57
+ export { default as CEToggleSlider } from './components/Common/CEToggleSlider/CEToggleSlide';
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.112",
4
+ "version": "1.0.113",
5
5
  "main": "dist/ce-component-lib.js",
6
6
  "module": "dist/ce-component-lib.mjs",
7
7
  "types": "dist/index.d.ts",