@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260919052532 → 0.8.1-dev.20260919084840

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.
@@ -13,7 +13,7 @@ import { useRouter } from "next/navigation";
13
13
 
14
14
  // src/components/controls/edit/InputControl.tsx
15
15
  import dynamic from "next/dynamic";
16
- var InputControl = dynamic(() => import("./InputControlClient-IZXNAD2P.mjs"), {
16
+ var InputControl = dynamic(() => import("./InputControlClient-M4D4WJVQ.mjs"), {
17
17
  ssr: false
18
18
  });
19
19
  var InputControl_default = InputControl;
@@ -3,7 +3,7 @@
3
3
  "use client";
4
4
  import {
5
5
  InputControl_default
6
- } from "./chunk-XMAYRT62.mjs";
6
+ } from "./chunk-HVJZPJGV.mjs";
7
7
  import {
8
8
  Button_default
9
9
  } from "./chunk-LSKD5U3S.mjs";
@@ -18,7 +18,7 @@ import {
18
18
  SelectWithSearchInput_default,
19
19
  Select_default,
20
20
  TimeInput_default
21
- } from "./chunk-A5UTFK4O.mjs";
21
+ } from "./chunk-OC3VBCRR.mjs";
22
22
  import {
23
23
  Hyperlink,
24
24
  Icon_default
@@ -635,8 +635,20 @@ var DateTimeInput_default = DateTimeInput;
635
635
  // src/components/controls/edit/ColorInput.tsx
636
636
  import React11, { useEffect as useEffect2 } from "react";
637
637
  import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
638
+ var DEFAULT_COLOR = "#3b82f6";
638
639
  var ColorInput = (props) => {
639
- const [color, setColor] = React11.useState("#3b82f6");
640
+ const [color, setColor] = React11.useState(DEFAULT_COLOR);
641
+ useEffect2(() => {
642
+ const hasValue = props.value !== void 0 && props.value !== null && props.value !== "";
643
+ if (!hasValue && props.callback && !props.attributes?.readOnly) {
644
+ props.callback({
645
+ name: props.name,
646
+ value: DEFAULT_COLOR,
647
+ index: props.index,
648
+ groupKey: props.groupKey
649
+ });
650
+ }
651
+ }, []);
640
652
  useEffect2(() => {
641
653
  if (props.value !== void 0 && props.value !== null) {
642
654
  if (typeof props.value === "string") {
@@ -670,7 +682,8 @@ var ColorInput = (props) => {
670
682
  value: color,
671
683
  onChange: handleColorChange,
672
684
  required: props?.attributes?.required,
673
- className: `block cursor-pointer`,
685
+ disabled: props?.attributes?.readOnly,
686
+ className: `peer block cursor-pointer`,
674
687
  style: {
675
688
  width: "78px",
676
689
  height: "33px",
@@ -685,7 +698,7 @@ var ColorInput = (props) => {
685
698
  }
686
699
  }
687
700
  ),
688
- props?.attributes?.errorMessage && /* @__PURE__ */ jsx11("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
701
+ /* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
689
702
  ] });
690
703
  };
691
704
  var ColorInput_default = ColorInput;
@@ -3,7 +3,7 @@
3
3
 
4
4
  // src/components/controls/edit/InputControl.tsx
5
5
  import dynamic from "next/dynamic";
6
- var InputControl = dynamic(() => import("./InputControlClient-SROI2BE2.mjs"), {
6
+ var InputControl = dynamic(() => import("./InputControlClient-H7BLOV3P.mjs"), {
7
7
  ssr: false
8
8
  });
9
9
  var InputControl_default = InputControl;
@@ -619,8 +619,20 @@ var DateTimeInput_default = DateTimeInput;
619
619
  // src/components/controls/edit/ColorInput.tsx
620
620
  import React11, { useEffect as useEffect2 } from "react";
621
621
  import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
622
+ var DEFAULT_COLOR = "#3b82f6";
622
623
  var ColorInput = (props) => {
623
- const [color, setColor] = React11.useState("#3b82f6");
624
+ const [color, setColor] = React11.useState(DEFAULT_COLOR);
625
+ useEffect2(() => {
626
+ const hasValue = props.value !== void 0 && props.value !== null && props.value !== "";
627
+ if (!hasValue && props.callback && !props.attributes?.readOnly) {
628
+ props.callback({
629
+ name: props.name,
630
+ value: DEFAULT_COLOR,
631
+ index: props.index,
632
+ groupKey: props.groupKey
633
+ });
634
+ }
635
+ }, []);
624
636
  useEffect2(() => {
625
637
  if (props.value !== void 0 && props.value !== null) {
626
638
  if (typeof props.value === "string") {
@@ -654,7 +666,8 @@ var ColorInput = (props) => {
654
666
  value: color,
655
667
  onChange: handleColorChange,
656
668
  required: props?.attributes?.required,
657
- className: `block cursor-pointer`,
669
+ disabled: props?.attributes?.readOnly,
670
+ className: `peer block cursor-pointer`,
658
671
  style: {
659
672
  width: "78px",
660
673
  height: "33px",
@@ -669,7 +682,7 @@ var ColorInput = (props) => {
669
682
  }
670
683
  }
671
684
  ),
672
- props?.attributes?.errorMessage && /* @__PURE__ */ jsx11("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
685
+ /* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
673
686
  ] });
674
687
  };
675
688
  var ColorInput_default = ColorInput;
package/dist/index.js CHANGED
@@ -2865,14 +2865,26 @@ var init_DateTimeInput = __esm({
2865
2865
  });
2866
2866
 
2867
2867
  // src/components/controls/edit/ColorInput.tsx
2868
- var import_react33, import_jsx_runtime40, ColorInput, ColorInput_default;
2868
+ var import_react33, import_jsx_runtime40, DEFAULT_COLOR, ColorInput, ColorInput_default;
2869
2869
  var init_ColorInput = __esm({
2870
2870
  "src/components/controls/edit/ColorInput.tsx"() {
2871
2871
  "use strict";
2872
2872
  import_react33 = __toESM(require("react"));
2873
2873
  import_jsx_runtime40 = require("react/jsx-runtime");
2874
+ DEFAULT_COLOR = "#3b82f6";
2874
2875
  ColorInput = (props) => {
2875
- const [color, setColor] = import_react33.default.useState("#3b82f6");
2876
+ const [color, setColor] = import_react33.default.useState(DEFAULT_COLOR);
2877
+ (0, import_react33.useEffect)(() => {
2878
+ const hasValue = props.value !== void 0 && props.value !== null && props.value !== "";
2879
+ if (!hasValue && props.callback && !props.attributes?.readOnly) {
2880
+ props.callback({
2881
+ name: props.name,
2882
+ value: DEFAULT_COLOR,
2883
+ index: props.index,
2884
+ groupKey: props.groupKey
2885
+ });
2886
+ }
2887
+ }, []);
2876
2888
  (0, import_react33.useEffect)(() => {
2877
2889
  if (props.value !== void 0 && props.value !== null) {
2878
2890
  if (typeof props.value === "string") {
@@ -2906,7 +2918,8 @@ var init_ColorInput = __esm({
2906
2918
  value: color,
2907
2919
  onChange: handleColorChange,
2908
2920
  required: props?.attributes?.required,
2909
- className: `block cursor-pointer`,
2921
+ disabled: props?.attributes?.readOnly,
2922
+ className: `peer block cursor-pointer`,
2910
2923
  style: {
2911
2924
  width: "78px",
2912
2925
  height: "33px",
@@ -2921,7 +2934,7 @@ var init_ColorInput = __esm({
2921
2934
  }
2922
2935
  }
2923
2936
  ),
2924
- props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
2937
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
2925
2938
  ] });
2926
2939
  };
2927
2940
  ColorInput_default = ColorInput;
@@ -6564,7 +6577,7 @@ var TagsBulletsView_default = TagsBulletsView;
6564
6577
  var import_react13 = __toESM(require("react"));
6565
6578
  var import_jsx_runtime14 = require("react/jsx-runtime");
6566
6579
  var MultilineText = (props) => {
6567
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react13.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "break-all whitespace-pre-line", children: props.value }) });
6580
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react13.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "whitespace-pre-line", children: props.value }) });
6568
6581
  };
6569
6582
  var MultilineTextView_default = MultilineText;
6570
6583
 
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-SNDGEYWZ.mjs";
9
9
  import {
10
10
  InputControl_default
11
- } from "./chunk-XMAYRT62.mjs";
11
+ } from "./chunk-HVJZPJGV.mjs";
12
12
  import "./chunk-JDX47MFV.mjs";
13
13
  import {
14
14
  CheckboxInput_default,
@@ -27,7 +27,7 @@ import {
27
27
  SelectWithSearchInput_default,
28
28
  Select_default,
29
29
  TimeInput_default
30
- } from "./chunk-A5UTFK4O.mjs";
30
+ } from "./chunk-OC3VBCRR.mjs";
31
31
  import {
32
32
  Hyperlink,
33
33
  Icon_default
@@ -344,7 +344,7 @@ var TagsBulletsView_default = TagsBulletsView;
344
344
  import React11 from "react";
345
345
  import { jsx as jsx12 } from "react/jsx-runtime";
346
346
  var MultilineText = (props) => {
347
- return /* @__PURE__ */ jsx12(React11.Fragment, { children: /* @__PURE__ */ jsx12("span", { className: "break-all whitespace-pre-line", children: props.value }) });
347
+ return /* @__PURE__ */ jsx12(React11.Fragment, { children: /* @__PURE__ */ jsx12("span", { className: "whitespace-pre-line", children: props.value }) });
348
348
  };
349
349
  var MultilineTextView_default = MultilineText;
350
350
 
@@ -2391,7 +2391,7 @@ var GoogleMapNode_default = GoogleMapNode;
2391
2391
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
2392
2392
  import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
2393
2393
  var Pagination = dynamic13(() => import("./Pagination-BDWRNSFB.mjs"), { ssr: true });
2394
- var DataBindingControls = dynamic13(() => import("./DataBindingControls-AJKE3EWG.mjs"), {
2394
+ var DataBindingControls = dynamic13(() => import("./DataBindingControls-CHXAZSAC.mjs"), {
2395
2395
  ssr: true
2396
2396
  });
2397
2397
  var Slider = dynamic13(() => import("./Slider-IVPJBPE5.mjs"), {
package/dist/server.js CHANGED
@@ -4344,14 +4344,26 @@ var init_DateTimeInput = __esm({
4344
4344
  });
4345
4345
 
4346
4346
  // src/components/controls/edit/ColorInput.tsx
4347
- var import_react49, import_jsx_runtime74, ColorInput, ColorInput_default;
4347
+ var import_react49, import_jsx_runtime74, DEFAULT_COLOR, ColorInput, ColorInput_default;
4348
4348
  var init_ColorInput = __esm({
4349
4349
  "src/components/controls/edit/ColorInput.tsx"() {
4350
4350
  "use strict";
4351
4351
  import_react49 = __toESM(require("react"));
4352
4352
  import_jsx_runtime74 = require("react/jsx-runtime");
4353
+ DEFAULT_COLOR = "#3b82f6";
4353
4354
  ColorInput = (props) => {
4354
- const [color, setColor] = import_react49.default.useState("#3b82f6");
4355
+ const [color, setColor] = import_react49.default.useState(DEFAULT_COLOR);
4356
+ (0, import_react49.useEffect)(() => {
4357
+ const hasValue = props.value !== void 0 && props.value !== null && props.value !== "";
4358
+ if (!hasValue && props.callback && !props.attributes?.readOnly) {
4359
+ props.callback({
4360
+ name: props.name,
4361
+ value: DEFAULT_COLOR,
4362
+ index: props.index,
4363
+ groupKey: props.groupKey
4364
+ });
4365
+ }
4366
+ }, []);
4355
4367
  (0, import_react49.useEffect)(() => {
4356
4368
  if (props.value !== void 0 && props.value !== null) {
4357
4369
  if (typeof props.value === "string") {
@@ -4385,7 +4397,8 @@ var init_ColorInput = __esm({
4385
4397
  value: color,
4386
4398
  onChange: handleColorChange,
4387
4399
  required: props?.attributes?.required,
4388
- className: `block cursor-pointer`,
4400
+ disabled: props?.attributes?.readOnly,
4401
+ className: `peer block cursor-pointer`,
4389
4402
  style: {
4390
4403
  width: "78px",
4391
4404
  height: "33px",
@@ -4400,7 +4413,7 @@ var init_ColorInput = __esm({
4400
4413
  }
4401
4414
  }
4402
4415
  ),
4403
- props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
4416
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
4404
4417
  ] });
4405
4418
  };
4406
4419
  ColorInput_default = ColorInput;
@@ -6908,7 +6921,7 @@ var TagsBulletsView_default = TagsBulletsView;
6908
6921
  var import_react18 = __toESM(require("react"));
6909
6922
  var import_jsx_runtime25 = require("react/jsx-runtime");
6910
6923
  var MultilineText = (props) => {
6911
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react18.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "break-all whitespace-pre-line", children: props.value }) });
6924
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react18.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "whitespace-pre-line", children: props.value }) });
6912
6925
  };
6913
6926
  var MultilineTextView_default = MultilineText;
6914
6927
 
package/dist/server.mjs CHANGED
@@ -680,7 +680,7 @@ var TagsBulletsView_default = TagsBulletsView;
680
680
  import React12 from "react";
681
681
  import { jsx as jsx18 } from "react/jsx-runtime";
682
682
  var MultilineText = (props) => {
683
- return /* @__PURE__ */ jsx18(React12.Fragment, { children: /* @__PURE__ */ jsx18("span", { className: "break-all whitespace-pre-line", children: props.value }) });
683
+ return /* @__PURE__ */ jsx18(React12.Fragment, { children: /* @__PURE__ */ jsx18("span", { className: "whitespace-pre-line", children: props.value }) });
684
684
  };
685
685
  var MultilineTextView_default = MultilineText;
686
686
 
@@ -2359,7 +2359,7 @@ var GoogleMapNode_default = GoogleMapNode;
2359
2359
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
2360
2360
  import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
2361
2361
  var Pagination = dynamic13(() => import("./Pagination-OSLUL7SF.mjs"), { ssr: true });
2362
- var DataBindingControls = dynamic13(() => import("./DataBindingControls-54BNRIUZ.mjs"), {
2362
+ var DataBindingControls = dynamic13(() => import("./DataBindingControls-2UETIUJJ.mjs"), {
2363
2363
  ssr: true
2364
2364
  });
2365
2365
  var Slider = dynamic13(() => import("./Slider-QIGKP6AE.mjs"), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clyrex-digital/clyrex-controls-dev",
3
- "version": "0.8.1-dev.20260919052532",
3
+ "version": "0.8.1-dev.20260919084840",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",