@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260416084656 → 0.8.1-dev.20260417052148
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.d.mts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +48 -23
- package/dist/index.mjs +36 -23
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -231,4 +231,28 @@ declare class ToastService {
|
|
|
231
231
|
|
|
232
232
|
declare const LineTextInput: React.FC<InputControlProps>;
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
declare const MultilineTextInput: React.FC<InputControlProps>;
|
|
235
|
+
|
|
236
|
+
declare const MoneyInput: React.FC<InputControlProps>;
|
|
237
|
+
|
|
238
|
+
declare const PercentageInput: React.FC<InputControlProps>;
|
|
239
|
+
|
|
240
|
+
declare const PhoneInput: React.FC<InputControlProps>;
|
|
241
|
+
|
|
242
|
+
declare const NumberInput: React.FC<InputControlProps>;
|
|
243
|
+
|
|
244
|
+
declare const CheckboxInput: React.FC<InputControlProps>;
|
|
245
|
+
|
|
246
|
+
declare const OtpInput: React.FC<InputControlProps>;
|
|
247
|
+
|
|
248
|
+
declare const DateTimeInput: React.FC<InputControlProps>;
|
|
249
|
+
|
|
250
|
+
declare const ColorInput: React.FC<InputControlProps>;
|
|
251
|
+
|
|
252
|
+
declare const BooleanSelect: React.FC<InputControlProps>;
|
|
253
|
+
|
|
254
|
+
declare const EmailInput: React.FC<InputControlProps>;
|
|
255
|
+
|
|
256
|
+
declare const TimeInput: React.FC<InputControlProps>;
|
|
257
|
+
|
|
258
|
+
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -231,4 +231,28 @@ declare class ToastService {
|
|
|
231
231
|
|
|
232
232
|
declare const LineTextInput: React.FC<InputControlProps>;
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
declare const MultilineTextInput: React.FC<InputControlProps>;
|
|
235
|
+
|
|
236
|
+
declare const MoneyInput: React.FC<InputControlProps>;
|
|
237
|
+
|
|
238
|
+
declare const PercentageInput: React.FC<InputControlProps>;
|
|
239
|
+
|
|
240
|
+
declare const PhoneInput: React.FC<InputControlProps>;
|
|
241
|
+
|
|
242
|
+
declare const NumberInput: React.FC<InputControlProps>;
|
|
243
|
+
|
|
244
|
+
declare const CheckboxInput: React.FC<InputControlProps>;
|
|
245
|
+
|
|
246
|
+
declare const OtpInput: React.FC<InputControlProps>;
|
|
247
|
+
|
|
248
|
+
declare const DateTimeInput: React.FC<InputControlProps>;
|
|
249
|
+
|
|
250
|
+
declare const ColorInput: React.FC<InputControlProps>;
|
|
251
|
+
|
|
252
|
+
declare const BooleanSelect: React.FC<InputControlProps>;
|
|
253
|
+
|
|
254
|
+
declare const EmailInput: React.FC<InputControlProps>;
|
|
255
|
+
|
|
256
|
+
declare const TimeInput: React.FC<InputControlProps>;
|
|
257
|
+
|
|
258
|
+
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.js
CHANGED
|
@@ -972,11 +972,23 @@ var init_IframeClient = __esm({
|
|
|
972
972
|
// src/index.ts
|
|
973
973
|
var index_exports = {};
|
|
974
974
|
__export(index_exports, {
|
|
975
|
+
BooleanSelect: () => BooleanSelect_default,
|
|
976
|
+
CheckboxInput: () => CheckboxInput_default,
|
|
977
|
+
ColorInput: () => ColorInput_default,
|
|
975
978
|
DataList: () => DataList_default,
|
|
979
|
+
DateTimeInput: () => DateTimeInput_default,
|
|
980
|
+
EmailInput: () => EmailInput_default,
|
|
976
981
|
InputControl: () => InputControl_default,
|
|
977
982
|
InputControlType: () => InputControlType_default,
|
|
978
983
|
LineTextInput: () => LineTextInput_default,
|
|
984
|
+
MoneyInput: () => MoneyInput_default,
|
|
985
|
+
MultilineTextInput: () => MultilineTextInput_default,
|
|
986
|
+
NumberInput: () => NumberInput_default,
|
|
987
|
+
OtpInput: () => OtpInput_default,
|
|
979
988
|
PageBodyRenderer: () => PageBodyRenderer_default,
|
|
989
|
+
PercentageInput: () => PercentageInput_default,
|
|
990
|
+
PhoneInput: () => PhoneInput_default,
|
|
991
|
+
TimeInput: () => TimeInput_default,
|
|
980
992
|
Toast: () => Toast_default,
|
|
981
993
|
ToastService: () => ToastService_default,
|
|
982
994
|
ViewControl: () => ViewControl_default,
|
|
@@ -1363,7 +1375,7 @@ var MultilineTextInput = (props) => {
|
|
|
1363
1375
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
1364
1376
|
}
|
|
1365
1377
|
),
|
|
1366
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1378
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1367
1379
|
] }) });
|
|
1368
1380
|
};
|
|
1369
1381
|
var MultilineTextInput_default = MultilineTextInput;
|
|
@@ -1408,14 +1420,12 @@ var LineTextInput = (props) => {
|
|
|
1408
1420
|
pattern: props?.attributes?.pattern,
|
|
1409
1421
|
disabled: props?.attributes?.readOnly,
|
|
1410
1422
|
minLength: props?.attributes?.minLength,
|
|
1411
|
-
className: `peer py-1.5 block w-full rounded
|
|
1412
|
-
focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50
|
|
1413
|
-
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none
|
|
1423
|
+
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm transition-all duration-500 ease-in-out
|
|
1414
1424
|
${props?.inputClasses ? props.inputClasses : ``}
|
|
1415
1425
|
`
|
|
1416
1426
|
}
|
|
1417
1427
|
),
|
|
1418
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1419
1429
|
] }) });
|
|
1420
1430
|
};
|
|
1421
1431
|
var LineTextInput_default = LineTextInput;
|
|
@@ -1475,7 +1485,7 @@ var MoneyInput = (props) => {
|
|
|
1475
1485
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
1476
1486
|
}
|
|
1477
1487
|
),
|
|
1478
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1488
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1479
1489
|
] }) });
|
|
1480
1490
|
};
|
|
1481
1491
|
var MoneyInput_default = MoneyInput;
|
|
@@ -1647,7 +1657,7 @@ var PercentageInput = (props) => {
|
|
|
1647
1657
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
1648
1658
|
}
|
|
1649
1659
|
),
|
|
1650
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1660
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1651
1661
|
] }) });
|
|
1652
1662
|
};
|
|
1653
1663
|
var PercentageInput_default = PercentageInput;
|
|
@@ -1677,8 +1687,8 @@ var PhoneInput = (props) => {
|
|
|
1677
1687
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1678
1688
|
" ",
|
|
1679
1689
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1680
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center bg-gray-100 rounded border
|
|
1681
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "px-3
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center bg-gray-100 rounded border \n focus-within:border-indigo-300 focus-within:ring focus-within:ring-indigo-200 focus-within:ring-opacity-50", children: [
|
|
1691
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
1682
1692
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1683
1693
|
"input",
|
|
1684
1694
|
{
|
|
@@ -1697,7 +1707,7 @@ var PhoneInput = (props) => {
|
|
|
1697
1707
|
}
|
|
1698
1708
|
)
|
|
1699
1709
|
] }),
|
|
1700
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1701
1711
|
] }) });
|
|
1702
1712
|
};
|
|
1703
1713
|
var PhoneInput_default = PhoneInput;
|
|
@@ -1750,7 +1760,7 @@ var NumberInput = (props) => {
|
|
|
1750
1760
|
className: "peer py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1751
1761
|
}
|
|
1752
1762
|
),
|
|
1753
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1754
1764
|
] }) });
|
|
1755
1765
|
};
|
|
1756
1766
|
var NumberInput_default = NumberInput;
|
|
@@ -1761,7 +1771,6 @@ var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
|
1761
1771
|
var CheckboxInput = (props) => {
|
|
1762
1772
|
const textChangeHandler = (event) => {
|
|
1763
1773
|
let text = event.target.checked;
|
|
1764
|
-
console.log(text);
|
|
1765
1774
|
if (props.callback !== void 0) {
|
|
1766
1775
|
props.callback({
|
|
1767
1776
|
name: props.name,
|
|
@@ -1771,7 +1780,6 @@ var CheckboxInput = (props) => {
|
|
|
1771
1780
|
});
|
|
1772
1781
|
}
|
|
1773
1782
|
};
|
|
1774
|
-
const trueValue = true;
|
|
1775
1783
|
let value = false;
|
|
1776
1784
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
1777
1785
|
value = true;
|
|
@@ -1779,7 +1787,7 @@ var CheckboxInput = (props) => {
|
|
|
1779
1787
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "block mb-1", children: [
|
|
1780
1788
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1781
1789
|
" ",
|
|
1782
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "
|
|
1790
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1783
1791
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1784
1792
|
"input",
|
|
1785
1793
|
{
|
|
@@ -1797,7 +1805,7 @@ var CheckboxInput = (props) => {
|
|
|
1797
1805
|
className: "peer mt-1 py-1.5 block rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1798
1806
|
}
|
|
1799
1807
|
),
|
|
1800
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1801
1809
|
] }) });
|
|
1802
1810
|
};
|
|
1803
1811
|
var CheckboxInput_default = CheckboxInput;
|
|
@@ -1850,7 +1858,7 @@ var OtpInput = (props) => {
|
|
|
1850
1858
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm tracking-[1.25em] text-center\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
1851
1859
|
}
|
|
1852
1860
|
),
|
|
1853
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1854
1862
|
] }) });
|
|
1855
1863
|
};
|
|
1856
1864
|
var OtpInput_default = OtpInput;
|
|
@@ -1954,7 +1962,6 @@ var DateTimeInput = (props) => {
|
|
|
1954
1962
|
let localvalue;
|
|
1955
1963
|
let timeZoneAbbr;
|
|
1956
1964
|
const now = /* @__PURE__ */ new Date();
|
|
1957
|
-
const utcOffset = now.getTimezoneOffset();
|
|
1958
1965
|
if (props.value !== void 0 && props.value !== null) {
|
|
1959
1966
|
value = props.value;
|
|
1960
1967
|
const now2 = /* @__PURE__ */ new Date();
|
|
@@ -1968,6 +1975,11 @@ var DateTimeInput = (props) => {
|
|
|
1968
1975
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
1969
1976
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
1970
1977
|
}
|
|
1978
|
+
const handleKeyDown = (e) => {
|
|
1979
|
+
if (e.key === "Backspace") {
|
|
1980
|
+
e.preventDefault();
|
|
1981
|
+
}
|
|
1982
|
+
};
|
|
1971
1983
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react19.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "block mb-1", children: [
|
|
1972
1984
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1973
1985
|
" ",
|
|
@@ -1981,6 +1993,7 @@ var DateTimeInput = (props) => {
|
|
|
1981
1993
|
id: props.name,
|
|
1982
1994
|
value: localvalue,
|
|
1983
1995
|
onChange: textChangeHandler,
|
|
1996
|
+
onKeyDown: handleKeyDown,
|
|
1984
1997
|
required: props?.attributes?.required,
|
|
1985
1998
|
placeholder: props?.attributes?.placeholder,
|
|
1986
1999
|
maxLength: props?.attributes?.maxLength,
|
|
@@ -1992,7 +2005,7 @@ var DateTimeInput = (props) => {
|
|
|
1992
2005
|
),
|
|
1993
2006
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: timeZoneAbbr })
|
|
1994
2007
|
] }),
|
|
1995
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1996
2009
|
] }) });
|
|
1997
2010
|
};
|
|
1998
2011
|
var DateTimeInput_default = DateTimeInput;
|
|
@@ -2035,10 +2048,10 @@ var ColorInput = (props) => {
|
|
|
2035
2048
|
value: color,
|
|
2036
2049
|
onChange: handleColorChange,
|
|
2037
2050
|
required: props?.attributes?.required,
|
|
2038
|
-
className: `w-[
|
|
2051
|
+
className: `w-[78px] h-12 block cursor-pointer focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50`
|
|
2039
2052
|
}
|
|
2040
2053
|
),
|
|
2041
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1
|
|
2054
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
2042
2055
|
] });
|
|
2043
2056
|
};
|
|
2044
2057
|
var ColorInput_default = ColorInput;
|
|
@@ -2521,7 +2534,7 @@ var BooleanSelect = (props) => {
|
|
|
2521
2534
|
]
|
|
2522
2535
|
}
|
|
2523
2536
|
),
|
|
2524
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
2537
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2525
2538
|
] }) });
|
|
2526
2539
|
};
|
|
2527
2540
|
var BooleanSelect_default = BooleanSelect;
|
|
@@ -2573,7 +2586,7 @@ var EmailInput = (props) => {
|
|
|
2573
2586
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus-within:border-neutral-300 focus-within:ring focus-within:ring-neutral-300 focus-within:ring-opacity-50 transition-all duration-500 ease-in-out"
|
|
2574
2587
|
}
|
|
2575
2588
|
),
|
|
2576
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
2589
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2577
2590
|
] }) });
|
|
2578
2591
|
};
|
|
2579
2592
|
var EmailInput_default = EmailInput;
|
|
@@ -2610,7 +2623,7 @@ var TimeInput = (props) => {
|
|
|
2610
2623
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
2611
2624
|
}
|
|
2612
2625
|
) }),
|
|
2613
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
2614
2627
|
] }) });
|
|
2615
2628
|
};
|
|
2616
2629
|
var TimeInput_default = TimeInput;
|
|
@@ -5713,11 +5726,23 @@ var Toast_default = Toast;
|
|
|
5713
5726
|
init_ToastService();
|
|
5714
5727
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5715
5728
|
0 && (module.exports = {
|
|
5729
|
+
BooleanSelect,
|
|
5730
|
+
CheckboxInput,
|
|
5731
|
+
ColorInput,
|
|
5716
5732
|
DataList,
|
|
5733
|
+
DateTimeInput,
|
|
5734
|
+
EmailInput,
|
|
5717
5735
|
InputControl,
|
|
5718
5736
|
InputControlType,
|
|
5719
5737
|
LineTextInput,
|
|
5738
|
+
MoneyInput,
|
|
5739
|
+
MultilineTextInput,
|
|
5740
|
+
NumberInput,
|
|
5741
|
+
OtpInput,
|
|
5720
5742
|
PageBodyRenderer,
|
|
5743
|
+
PercentageInput,
|
|
5744
|
+
PhoneInput,
|
|
5745
|
+
TimeInput,
|
|
5721
5746
|
Toast,
|
|
5722
5747
|
ToastService,
|
|
5723
5748
|
ViewControl,
|
package/dist/index.mjs
CHANGED
|
@@ -387,7 +387,7 @@ var MultilineTextInput = (props) => {
|
|
|
387
387
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
388
388
|
}
|
|
389
389
|
),
|
|
390
|
-
/* @__PURE__ */ jsx10("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
390
|
+
/* @__PURE__ */ jsx10("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
391
391
|
] }) });
|
|
392
392
|
};
|
|
393
393
|
var MultilineTextInput_default = MultilineTextInput;
|
|
@@ -432,14 +432,12 @@ var LineTextInput = (props) => {
|
|
|
432
432
|
pattern: props?.attributes?.pattern,
|
|
433
433
|
disabled: props?.attributes?.readOnly,
|
|
434
434
|
minLength: props?.attributes?.minLength,
|
|
435
|
-
className: `peer py-1.5 block w-full rounded
|
|
436
|
-
focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50
|
|
437
|
-
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none
|
|
435
|
+
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm transition-all duration-500 ease-in-out
|
|
438
436
|
${props?.inputClasses ? props.inputClasses : ``}
|
|
439
437
|
`
|
|
440
438
|
}
|
|
441
439
|
),
|
|
442
|
-
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
440
|
+
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
443
441
|
] }) });
|
|
444
442
|
};
|
|
445
443
|
var LineTextInput_default = LineTextInput;
|
|
@@ -499,7 +497,7 @@ var MoneyInput = (props) => {
|
|
|
499
497
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
500
498
|
}
|
|
501
499
|
),
|
|
502
|
-
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
500
|
+
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
503
501
|
] }) });
|
|
504
502
|
};
|
|
505
503
|
var MoneyInput_default = MoneyInput;
|
|
@@ -671,7 +669,7 @@ var PercentageInput = (props) => {
|
|
|
671
669
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
672
670
|
}
|
|
673
671
|
),
|
|
674
|
-
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
672
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
675
673
|
] }) });
|
|
676
674
|
};
|
|
677
675
|
var PercentageInput_default = PercentageInput;
|
|
@@ -701,8 +699,8 @@ var PhoneInput = (props) => {
|
|
|
701
699
|
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
702
700
|
" ",
|
|
703
701
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
|
|
704
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex items-center bg-gray-100 rounded border
|
|
705
|
-
/* @__PURE__ */ jsx15("span", { className: "px-3
|
|
702
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center bg-gray-100 rounded border \n focus-within:border-indigo-300 focus-within:ring focus-within:ring-indigo-200 focus-within:ring-opacity-50", children: [
|
|
703
|
+
/* @__PURE__ */ jsx15("span", { className: "px-3", children: props.prefix }),
|
|
706
704
|
/* @__PURE__ */ jsx15(
|
|
707
705
|
"input",
|
|
708
706
|
{
|
|
@@ -721,7 +719,7 @@ var PhoneInput = (props) => {
|
|
|
721
719
|
}
|
|
722
720
|
)
|
|
723
721
|
] }),
|
|
724
|
-
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
722
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
725
723
|
] }) });
|
|
726
724
|
};
|
|
727
725
|
var PhoneInput_default = PhoneInput;
|
|
@@ -774,7 +772,7 @@ var NumberInput = (props) => {
|
|
|
774
772
|
className: "peer py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
775
773
|
}
|
|
776
774
|
),
|
|
777
|
-
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
775
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
778
776
|
] }) });
|
|
779
777
|
};
|
|
780
778
|
var NumberInput_default = NumberInput;
|
|
@@ -785,7 +783,6 @@ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
|
785
783
|
var CheckboxInput = (props) => {
|
|
786
784
|
const textChangeHandler = (event) => {
|
|
787
785
|
let text = event.target.checked;
|
|
788
|
-
console.log(text);
|
|
789
786
|
if (props.callback !== void 0) {
|
|
790
787
|
props.callback({
|
|
791
788
|
name: props.name,
|
|
@@ -795,7 +792,6 @@ var CheckboxInput = (props) => {
|
|
|
795
792
|
});
|
|
796
793
|
}
|
|
797
794
|
};
|
|
798
|
-
const trueValue = true;
|
|
799
795
|
let value = false;
|
|
800
796
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
801
797
|
value = true;
|
|
@@ -803,7 +799,7 @@ var CheckboxInput = (props) => {
|
|
|
803
799
|
return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block mb-1", children: [
|
|
804
800
|
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
805
801
|
" ",
|
|
806
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "
|
|
802
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" }),
|
|
807
803
|
/* @__PURE__ */ jsx17(
|
|
808
804
|
"input",
|
|
809
805
|
{
|
|
@@ -821,7 +817,7 @@ var CheckboxInput = (props) => {
|
|
|
821
817
|
className: "peer mt-1 py-1.5 block rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
822
818
|
}
|
|
823
819
|
),
|
|
824
|
-
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
820
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
825
821
|
] }) });
|
|
826
822
|
};
|
|
827
823
|
var CheckboxInput_default = CheckboxInput;
|
|
@@ -874,7 +870,7 @@ var OtpInput = (props) => {
|
|
|
874
870
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm tracking-[1.25em] text-center\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
875
871
|
}
|
|
876
872
|
),
|
|
877
|
-
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
873
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
878
874
|
] }) });
|
|
879
875
|
};
|
|
880
876
|
var OtpInput_default = OtpInput;
|
|
@@ -978,7 +974,6 @@ var DateTimeInput = (props) => {
|
|
|
978
974
|
let localvalue;
|
|
979
975
|
let timeZoneAbbr;
|
|
980
976
|
const now = /* @__PURE__ */ new Date();
|
|
981
|
-
const utcOffset = now.getTimezoneOffset();
|
|
982
977
|
if (props.value !== void 0 && props.value !== null) {
|
|
983
978
|
value = props.value;
|
|
984
979
|
const now2 = /* @__PURE__ */ new Date();
|
|
@@ -992,6 +987,11 @@ var DateTimeInput = (props) => {
|
|
|
992
987
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
993
988
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
994
989
|
}
|
|
990
|
+
const handleKeyDown = (e) => {
|
|
991
|
+
if (e.key === "Backspace") {
|
|
992
|
+
e.preventDefault();
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
995
|
return /* @__PURE__ */ jsx19(React19.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
996
996
|
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
997
997
|
" ",
|
|
@@ -1005,6 +1005,7 @@ var DateTimeInput = (props) => {
|
|
|
1005
1005
|
id: props.name,
|
|
1006
1006
|
value: localvalue,
|
|
1007
1007
|
onChange: textChangeHandler,
|
|
1008
|
+
onKeyDown: handleKeyDown,
|
|
1008
1009
|
required: props?.attributes?.required,
|
|
1009
1010
|
placeholder: props?.attributes?.placeholder,
|
|
1010
1011
|
maxLength: props?.attributes?.maxLength,
|
|
@@ -1016,7 +1017,7 @@ var DateTimeInput = (props) => {
|
|
|
1016
1017
|
),
|
|
1017
1018
|
/* @__PURE__ */ jsx19("span", { children: timeZoneAbbr })
|
|
1018
1019
|
] }),
|
|
1019
|
-
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1020
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1020
1021
|
] }) });
|
|
1021
1022
|
};
|
|
1022
1023
|
var DateTimeInput_default = DateTimeInput;
|
|
@@ -1059,10 +1060,10 @@ var ColorInput = (props) => {
|
|
|
1059
1060
|
value: color,
|
|
1060
1061
|
onChange: handleColorChange,
|
|
1061
1062
|
required: props?.attributes?.required,
|
|
1062
|
-
className: `w-[
|
|
1063
|
+
className: `w-[78px] h-12 block cursor-pointer focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50`
|
|
1063
1064
|
}
|
|
1064
1065
|
),
|
|
1065
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1
|
|
1066
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1066
1067
|
] });
|
|
1067
1068
|
};
|
|
1068
1069
|
var ColorInput_default = ColorInput;
|
|
@@ -1552,7 +1553,7 @@ var BooleanSelect = (props) => {
|
|
|
1552
1553
|
]
|
|
1553
1554
|
}
|
|
1554
1555
|
),
|
|
1555
|
-
/* @__PURE__ */ jsx23("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1556
|
+
/* @__PURE__ */ jsx23("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1556
1557
|
] }) });
|
|
1557
1558
|
};
|
|
1558
1559
|
var BooleanSelect_default = BooleanSelect;
|
|
@@ -1604,7 +1605,7 @@ var EmailInput = (props) => {
|
|
|
1604
1605
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus-within:border-neutral-300 focus-within:ring focus-within:ring-neutral-300 focus-within:ring-opacity-50 transition-all duration-500 ease-in-out"
|
|
1605
1606
|
}
|
|
1606
1607
|
),
|
|
1607
|
-
/* @__PURE__ */ jsx24("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1608
|
+
/* @__PURE__ */ jsx24("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1608
1609
|
] }) });
|
|
1609
1610
|
};
|
|
1610
1611
|
var EmailInput_default = EmailInput;
|
|
@@ -1641,7 +1642,7 @@ var TimeInput = (props) => {
|
|
|
1641
1642
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
1642
1643
|
}
|
|
1643
1644
|
) }),
|
|
1644
|
-
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
1645
|
+
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1645
1646
|
] }) });
|
|
1646
1647
|
};
|
|
1647
1648
|
var TimeInput_default = TimeInput;
|
|
@@ -4728,11 +4729,23 @@ var Toast = () => {
|
|
|
4728
4729
|
};
|
|
4729
4730
|
var Toast_default = Toast;
|
|
4730
4731
|
export {
|
|
4732
|
+
BooleanSelect_default as BooleanSelect,
|
|
4733
|
+
CheckboxInput_default as CheckboxInput,
|
|
4734
|
+
ColorInput_default as ColorInput,
|
|
4731
4735
|
DataList_default as DataList,
|
|
4736
|
+
DateTimeInput_default as DateTimeInput,
|
|
4737
|
+
EmailInput_default as EmailInput,
|
|
4732
4738
|
InputControl_default as InputControl,
|
|
4733
4739
|
InputControlType_default as InputControlType,
|
|
4734
4740
|
LineTextInput_default as LineTextInput,
|
|
4741
|
+
MoneyInput_default as MoneyInput,
|
|
4742
|
+
MultilineTextInput_default as MultilineTextInput,
|
|
4743
|
+
NumberInput_default as NumberInput,
|
|
4744
|
+
OtpInput_default as OtpInput,
|
|
4735
4745
|
PageBodyRenderer_default as PageBodyRenderer,
|
|
4746
|
+
PercentageInput_default as PercentageInput,
|
|
4747
|
+
PhoneInput_default as PhoneInput,
|
|
4748
|
+
TimeInput_default as TimeInput,
|
|
4736
4749
|
Toast_default as Toast,
|
|
4737
4750
|
ToastService_default as ToastService,
|
|
4738
4751
|
ViewControl_default as ViewControl,
|
package/package.json
CHANGED