@apexcura/ui-components 0.0.12-Beta72 → 0.0.12-Beta74

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/index.css CHANGED
@@ -406,6 +406,10 @@ video {
406
406
  .text-\[10px\] {
407
407
  font-size: 10px;
408
408
  }
409
+ .text-xl {
410
+ font-size: 1.25rem;
411
+ line-height: 1.75rem;
412
+ }
409
413
  .italic {
410
414
  font-style: italic;
411
415
  }
package/dist/index.d.mts CHANGED
@@ -20,8 +20,9 @@ type ElementType = {
20
20
  suffix?: React.ReactNode;
21
21
  maxLength?: number;
22
22
  fieldNames?: any[];
23
+ fields?: any[];
23
24
  options?: any[];
24
- onChange?: (value: string | number | boolean | any[]) => void;
25
+ onChange?: (value: string | number | boolean | object | any[]) => void;
25
26
  dropDownOptions?: any[];
26
27
  id?: number;
27
28
  thead?: any[];
@@ -44,10 +45,11 @@ type ElementType = {
44
45
  profileImageClassName?: string;
45
46
  profileSubClassName?: string;
46
47
  subContainerClassName?: string;
48
+ element?: string;
47
49
  };
48
50
 
49
51
  interface ElementExecuterProps$3 extends ElementType {
50
- onChange: (value: string | number | boolean | any[]) => void;
52
+ onChange: (value: string | number | boolean | object | any[]) => void;
51
53
  }
52
54
  declare const TextElement: (props: ElementExecuterProps$3) => React$1.JSX.Element;
53
55
 
@@ -64,12 +66,12 @@ interface PasswordProps {
64
66
  declare const PasswordElement: React$1.FC<PasswordProps>;
65
67
 
66
68
  interface ElementExecuterProps$2 extends ElementType {
67
- onChange: (value: string | number | boolean | any[]) => void;
69
+ onChange: (value: string | number | object | boolean | any[]) => void;
68
70
  }
69
71
  declare const NumberElement: (props: ElementExecuterProps$2) => React$1.JSX.Element;
70
72
 
71
73
  interface ElementExecuterProps$1 extends ElementType {
72
- onChange: (value: string | number | boolean | any[]) => void;
74
+ onChange: (value: string | number | boolean | object | any[]) => void;
73
75
  }
74
76
  declare const TextareaElement: (props: ElementExecuterProps$1) => React$1.JSX.Element;
75
77
 
@@ -80,7 +82,7 @@ declare const RadioElement: (props: ElementType) => React$1.JSX.Element;
80
82
  declare const CheckboxElement: (props: ElementType) => React$1.JSX.Element;
81
83
 
82
84
  interface ElementExecuterProps extends ElementType {
83
- onChange: (value: string | number | boolean | any[]) => void;
85
+ onChange: (value: string | number | object | boolean | any[]) => void;
84
86
  }
85
87
  declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
86
88
 
package/dist/index.d.ts CHANGED
@@ -20,8 +20,9 @@ type ElementType = {
20
20
  suffix?: React.ReactNode;
21
21
  maxLength?: number;
22
22
  fieldNames?: any[];
23
+ fields?: any[];
23
24
  options?: any[];
24
- onChange?: (value: string | number | boolean | any[]) => void;
25
+ onChange?: (value: string | number | boolean | object | any[]) => void;
25
26
  dropDownOptions?: any[];
26
27
  id?: number;
27
28
  thead?: any[];
@@ -44,10 +45,11 @@ type ElementType = {
44
45
  profileImageClassName?: string;
45
46
  profileSubClassName?: string;
46
47
  subContainerClassName?: string;
48
+ element?: string;
47
49
  };
48
50
 
49
51
  interface ElementExecuterProps$3 extends ElementType {
50
- onChange: (value: string | number | boolean | any[]) => void;
52
+ onChange: (value: string | number | boolean | object | any[]) => void;
51
53
  }
52
54
  declare const TextElement: (props: ElementExecuterProps$3) => React$1.JSX.Element;
53
55
 
@@ -64,12 +66,12 @@ interface PasswordProps {
64
66
  declare const PasswordElement: React$1.FC<PasswordProps>;
65
67
 
66
68
  interface ElementExecuterProps$2 extends ElementType {
67
- onChange: (value: string | number | boolean | any[]) => void;
69
+ onChange: (value: string | number | object | boolean | any[]) => void;
68
70
  }
69
71
  declare const NumberElement: (props: ElementExecuterProps$2) => React$1.JSX.Element;
70
72
 
71
73
  interface ElementExecuterProps$1 extends ElementType {
72
- onChange: (value: string | number | boolean | any[]) => void;
74
+ onChange: (value: string | number | boolean | object | any[]) => void;
73
75
  }
74
76
  declare const TextareaElement: (props: ElementExecuterProps$1) => React$1.JSX.Element;
75
77
 
@@ -80,7 +82,7 @@ declare const RadioElement: (props: ElementType) => React$1.JSX.Element;
80
82
  declare const CheckboxElement: (props: ElementType) => React$1.JSX.Element;
81
83
 
82
84
  interface ElementExecuterProps extends ElementType {
83
- onChange: (value: string | number | boolean | any[]) => void;
85
+ onChange: (value: string | number | object | boolean | any[]) => void;
84
86
  }
85
87
  declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
86
88
 
package/dist/index.js CHANGED
@@ -195,9 +195,10 @@ var RadioElement = (props) => {
195
195
  const [selectedValue, setSelectedValue] = (0, import_react6.useState)(props.value);
196
196
  const optionType = props.optionType === "button" ? "button" : void 0;
197
197
  const handleChange = (e) => {
198
+ console.log(e);
198
199
  const selectedVal = e.target.value;
199
200
  const selectedLabel = e.target.label;
200
- const selectedOptions = [{ id: selectedLabel, value: selectedVal }];
201
+ const selectedOptions = { label: selectedLabel, value: selectedVal };
201
202
  setSelectedValue(selectedVal);
202
203
  setIsDisabled(true);
203
204
  if (props.onChange) {
@@ -552,19 +553,37 @@ var import_react17 = __toESM(require("react"));
552
553
  // src/Components/Notification.tsx
553
554
  var import_react15 = __toESM(require("react"));
554
555
  var import_antd12 = require("antd");
555
- var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(import_antd12.Popover, { className: props.notification.className, content: props.notification.items?.map((eachItem) => {
556
- return /* @__PURE__ */ import_react15.default.createElement("div", null, /* @__PURE__ */ import_react15.default.createElement("p", null, eachItem.text), /* @__PURE__ */ import_react15.default.createElement("p", null, eachItem.time));
557
- }), trigger: "focus", placement: "bottomRight" }, /* @__PURE__ */ import_react15.default.createElement(import_antd12.Badge, { count: props.notification.count }, props.notification.icon));
556
+ var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(
557
+ import_antd12.Popover,
558
+ {
559
+ className: props.className,
560
+ content: props.items?.map(
561
+ (eachItem) => {
562
+ return /* @__PURE__ */ import_react15.default.createElement("div", null, /* @__PURE__ */ import_react15.default.createElement("p", null, eachItem.text), /* @__PURE__ */ import_react15.default.createElement("p", null, eachItem.time));
563
+ }
564
+ ),
565
+ trigger: "focus",
566
+ placement: "bottomRight"
567
+ },
568
+ /* @__PURE__ */ import_react15.default.createElement(import_antd12.Badge, { count: props.count }, props.icon)
569
+ );
558
570
 
559
571
  // src/Components/Profile.tsx
560
572
  var import_react16 = __toESM(require("react"));
561
- var Profile = (props) => /* @__PURE__ */ import_react16.default.createElement("div", { className: props.profile.className }, /* @__PURE__ */ import_react16.default.createElement("img", { src: props.profile.profileImage, alt: "profile", className: props.profile.profileImageClassName }), /* @__PURE__ */ import_react16.default.createElement("div", { className: props.profile.profileSubClassName }, /* @__PURE__ */ import_react16.default.createElement("span", null, props.profile.primaryText), /* @__PURE__ */ import_react16.default.createElement("span", null, props.profile.secondaryText)));
573
+ var Profile = (props) => /* @__PURE__ */ import_react16.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react16.default.createElement("img", { src: props.profileImage, alt: "profile", className: props.profileImageClassName }), /* @__PURE__ */ import_react16.default.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ import_react16.default.createElement("span", null, props.primaryText), /* @__PURE__ */ import_react16.default.createElement("span", null, props.secondaryText)));
562
574
 
563
575
  // src/Components/Navbar.tsx
564
576
  var Navbar = (props) => {
565
- const test = "w-full flex justify-between";
566
- const dashboradClass = "text-xl,text-default-600";
567
- return /* @__PURE__ */ import_react17.default.createElement("div", { className: `${test} ${props.subContainerClassName}` }, /* @__PURE__ */ import_react17.default.createElement("div", { className: `${dashboradClass} ${props.dashboard.className}` }, props.dashboard.label), /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex" }, /* @__PURE__ */ import_react17.default.createElement(Notification, { ...props }), /* @__PURE__ */ import_react17.default.createElement(Profile, { ...props })));
577
+ return /* @__PURE__ */ import_react17.default.createElement("div", { className: ` ${props.className}` }, props.fields && props.fields.map((field) => {
578
+ if (field.element === "span") {
579
+ return /* @__PURE__ */ import_react17.default.createElement("span", { className: field.className }, field.label);
580
+ } else if (field.element === "notifications") {
581
+ return /* @__PURE__ */ import_react17.default.createElement(Notification, { ...field });
582
+ } else if (field.name === "profile") {
583
+ return /* @__PURE__ */ import_react17.default.createElement(Profile, { ...field });
584
+ }
585
+ return null;
586
+ }));
568
587
  };
569
588
  // Annotate the CommonJS export names for ESM import in node:
570
589
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -146,9 +146,10 @@ var RadioElement = (props) => {
146
146
  const [selectedValue, setSelectedValue] = useState2(props.value);
147
147
  const optionType = props.optionType === "button" ? "button" : void 0;
148
148
  const handleChange = (e) => {
149
+ console.log(e);
149
150
  const selectedVal = e.target.value;
150
151
  const selectedLabel = e.target.label;
151
- const selectedOptions = [{ id: selectedLabel, value: selectedVal }];
152
+ const selectedOptions = { label: selectedLabel, value: selectedVal };
152
153
  setSelectedValue(selectedVal);
153
154
  setIsDisabled(true);
154
155
  if (props.onChange) {
@@ -503,19 +504,37 @@ import React16 from "react";
503
504
  // src/Components/Notification.tsx
504
505
  import React14 from "react";
505
506
  import { Popover, Badge } from "antd";
506
- var Notification = (props) => /* @__PURE__ */ React14.createElement(Popover, { className: props.notification.className, content: props.notification.items?.map((eachItem) => {
507
- return /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("p", null, eachItem.text), /* @__PURE__ */ React14.createElement("p", null, eachItem.time));
508
- }), trigger: "focus", placement: "bottomRight" }, /* @__PURE__ */ React14.createElement(Badge, { count: props.notification.count }, props.notification.icon));
507
+ var Notification = (props) => /* @__PURE__ */ React14.createElement(
508
+ Popover,
509
+ {
510
+ className: props.className,
511
+ content: props.items?.map(
512
+ (eachItem) => {
513
+ return /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("p", null, eachItem.text), /* @__PURE__ */ React14.createElement("p", null, eachItem.time));
514
+ }
515
+ ),
516
+ trigger: "focus",
517
+ placement: "bottomRight"
518
+ },
519
+ /* @__PURE__ */ React14.createElement(Badge, { count: props.count }, props.icon)
520
+ );
509
521
 
510
522
  // src/Components/Profile.tsx
511
523
  import React15 from "react";
512
- var Profile = (props) => /* @__PURE__ */ React15.createElement("div", { className: props.profile.className }, /* @__PURE__ */ React15.createElement("img", { src: props.profile.profileImage, alt: "profile", className: props.profile.profileImageClassName }), /* @__PURE__ */ React15.createElement("div", { className: props.profile.profileSubClassName }, /* @__PURE__ */ React15.createElement("span", null, props.profile.primaryText), /* @__PURE__ */ React15.createElement("span", null, props.profile.secondaryText)));
524
+ var Profile = (props) => /* @__PURE__ */ React15.createElement("div", { className: props.className }, /* @__PURE__ */ React15.createElement("img", { src: props.profileImage, alt: "profile", className: props.profileImageClassName }), /* @__PURE__ */ React15.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ React15.createElement("span", null, props.primaryText), /* @__PURE__ */ React15.createElement("span", null, props.secondaryText)));
513
525
 
514
526
  // src/Components/Navbar.tsx
515
527
  var Navbar = (props) => {
516
- const test = "w-full flex justify-between";
517
- const dashboradClass = "text-xl,text-default-600";
518
- return /* @__PURE__ */ React16.createElement("div", { className: `${test} ${props.subContainerClassName}` }, /* @__PURE__ */ React16.createElement("div", { className: `${dashboradClass} ${props.dashboard.className}` }, props.dashboard.label), /* @__PURE__ */ React16.createElement("div", { className: "flex" }, /* @__PURE__ */ React16.createElement(Notification, { ...props }), /* @__PURE__ */ React16.createElement(Profile, { ...props })));
528
+ return /* @__PURE__ */ React16.createElement("div", { className: ` ${props.className}` }, props.fields && props.fields.map((field) => {
529
+ if (field.element === "span") {
530
+ return /* @__PURE__ */ React16.createElement("span", { className: field.className }, field.label);
531
+ } else if (field.element === "notifications") {
532
+ return /* @__PURE__ */ React16.createElement(Notification, { ...field });
533
+ } else if (field.name === "profile") {
534
+ return /* @__PURE__ */ React16.createElement(Profile, { ...field });
535
+ }
536
+ return null;
537
+ }));
519
538
  };
520
539
  export {
521
540
  AddMoreTable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.12-Beta72",
3
+ "version": "0.0.12-Beta74",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",