@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260416050027 → 0.8.1-dev.20260416092937
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 +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +49 -20
- package/dist/index.mjs +36 -20
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -229,4 +229,30 @@ declare class ToastService {
|
|
|
229
229
|
static close(): void;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
declare const LineTextInput: React.FC<InputControlProps>;
|
|
233
|
+
|
|
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
|
@@ -229,4 +229,30 @@ declare class ToastService {
|
|
|
229
229
|
static close(): void;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
declare const LineTextInput: React.FC<InputControlProps>;
|
|
233
|
+
|
|
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,10 +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,
|
|
983
|
+
LineTextInput: () => LineTextInput_default,
|
|
984
|
+
MoneyInput: () => MoneyInput_default,
|
|
985
|
+
MultilineTextInput: () => MultilineTextInput_default,
|
|
986
|
+
NumberInput: () => NumberInput_default,
|
|
987
|
+
OtpInput: () => OtpInput_default,
|
|
978
988
|
PageBodyRenderer: () => PageBodyRenderer_default,
|
|
989
|
+
PercentageInput: () => PercentageInput_default,
|
|
990
|
+
PhoneInput: () => PhoneInput_default,
|
|
991
|
+
TimeInput: () => TimeInput_default,
|
|
979
992
|
Toast: () => Toast_default,
|
|
980
993
|
ToastService: () => ToastService_default,
|
|
981
994
|
ViewControl: () => ViewControl_default,
|
|
@@ -1362,7 +1375,7 @@ var MultilineTextInput = (props) => {
|
|
|
1362
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"
|
|
1363
1376
|
}
|
|
1364
1377
|
),
|
|
1365
|
-
/* @__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 : "" })
|
|
1366
1379
|
] }) });
|
|
1367
1380
|
};
|
|
1368
1381
|
var MultilineTextInput_default = MultilineTextInput;
|
|
@@ -1414,7 +1427,7 @@ var LineTextInput = (props) => {
|
|
|
1414
1427
|
`
|
|
1415
1428
|
}
|
|
1416
1429
|
),
|
|
1417
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
1430
|
+
/* @__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 : "" })
|
|
1418
1431
|
] }) });
|
|
1419
1432
|
};
|
|
1420
1433
|
var LineTextInput_default = LineTextInput;
|
|
@@ -1474,7 +1487,7 @@ var MoneyInput = (props) => {
|
|
|
1474
1487
|
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"
|
|
1475
1488
|
}
|
|
1476
1489
|
),
|
|
1477
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1490
|
+
/* @__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 : "" })
|
|
1478
1491
|
] }) });
|
|
1479
1492
|
};
|
|
1480
1493
|
var MoneyInput_default = MoneyInput;
|
|
@@ -1646,7 +1659,7 @@ var PercentageInput = (props) => {
|
|
|
1646
1659
|
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"
|
|
1647
1660
|
}
|
|
1648
1661
|
),
|
|
1649
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1662
|
+
/* @__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 : "" })
|
|
1650
1663
|
] }) });
|
|
1651
1664
|
};
|
|
1652
1665
|
var PercentageInput_default = PercentageInput;
|
|
@@ -1676,8 +1689,8 @@ var PhoneInput = (props) => {
|
|
|
1676
1689
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1677
1690
|
" ",
|
|
1678
1691
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1679
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center bg-gray-100 rounded border
|
|
1680
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "px-3
|
|
1692
|
+
/* @__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: [
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
1681
1694
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1682
1695
|
"input",
|
|
1683
1696
|
{
|
|
@@ -1696,7 +1709,7 @@ var PhoneInput = (props) => {
|
|
|
1696
1709
|
}
|
|
1697
1710
|
)
|
|
1698
1711
|
] }),
|
|
1699
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1712
|
+
/* @__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 : "" })
|
|
1700
1713
|
] }) });
|
|
1701
1714
|
};
|
|
1702
1715
|
var PhoneInput_default = PhoneInput;
|
|
@@ -1749,7 +1762,7 @@ var NumberInput = (props) => {
|
|
|
1749
1762
|
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 "
|
|
1750
1763
|
}
|
|
1751
1764
|
),
|
|
1752
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1765
|
+
/* @__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 : "" })
|
|
1753
1766
|
] }) });
|
|
1754
1767
|
};
|
|
1755
1768
|
var NumberInput_default = NumberInput;
|
|
@@ -1760,7 +1773,6 @@ var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
|
1760
1773
|
var CheckboxInput = (props) => {
|
|
1761
1774
|
const textChangeHandler = (event) => {
|
|
1762
1775
|
let text = event.target.checked;
|
|
1763
|
-
console.log(text);
|
|
1764
1776
|
if (props.callback !== void 0) {
|
|
1765
1777
|
props.callback({
|
|
1766
1778
|
name: props.name,
|
|
@@ -1770,7 +1782,6 @@ var CheckboxInput = (props) => {
|
|
|
1770
1782
|
});
|
|
1771
1783
|
}
|
|
1772
1784
|
};
|
|
1773
|
-
const trueValue = true;
|
|
1774
1785
|
let value = false;
|
|
1775
1786
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
1776
1787
|
value = true;
|
|
@@ -1778,7 +1789,7 @@ var CheckboxInput = (props) => {
|
|
|
1778
1789
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "block mb-1", children: [
|
|
1779
1790
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1780
1791
|
" ",
|
|
1781
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "
|
|
1792
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1782
1793
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1783
1794
|
"input",
|
|
1784
1795
|
{
|
|
@@ -1796,7 +1807,7 @@ var CheckboxInput = (props) => {
|
|
|
1796
1807
|
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 "
|
|
1797
1808
|
}
|
|
1798
1809
|
),
|
|
1799
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1810
|
+
/* @__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 : "" })
|
|
1800
1811
|
] }) });
|
|
1801
1812
|
};
|
|
1802
1813
|
var CheckboxInput_default = CheckboxInput;
|
|
@@ -1849,7 +1860,7 @@ var OtpInput = (props) => {
|
|
|
1849
1860
|
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"
|
|
1850
1861
|
}
|
|
1851
1862
|
),
|
|
1852
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1863
|
+
/* @__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 : "" })
|
|
1853
1864
|
] }) });
|
|
1854
1865
|
};
|
|
1855
1866
|
var OtpInput_default = OtpInput;
|
|
@@ -1953,7 +1964,6 @@ var DateTimeInput = (props) => {
|
|
|
1953
1964
|
let localvalue;
|
|
1954
1965
|
let timeZoneAbbr;
|
|
1955
1966
|
const now = /* @__PURE__ */ new Date();
|
|
1956
|
-
const utcOffset = now.getTimezoneOffset();
|
|
1957
1967
|
if (props.value !== void 0 && props.value !== null) {
|
|
1958
1968
|
value = props.value;
|
|
1959
1969
|
const now2 = /* @__PURE__ */ new Date();
|
|
@@ -1967,6 +1977,11 @@ var DateTimeInput = (props) => {
|
|
|
1967
1977
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
1968
1978
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
1969
1979
|
}
|
|
1980
|
+
const handleKeyDown = (e) => {
|
|
1981
|
+
if (e.key === "Backspace") {
|
|
1982
|
+
e.preventDefault();
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1970
1985
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react19.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "block mb-1", children: [
|
|
1971
1986
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1972
1987
|
" ",
|
|
@@ -1980,6 +1995,7 @@ var DateTimeInput = (props) => {
|
|
|
1980
1995
|
id: props.name,
|
|
1981
1996
|
value: localvalue,
|
|
1982
1997
|
onChange: textChangeHandler,
|
|
1998
|
+
onKeyDown: handleKeyDown,
|
|
1983
1999
|
required: props?.attributes?.required,
|
|
1984
2000
|
placeholder: props?.attributes?.placeholder,
|
|
1985
2001
|
maxLength: props?.attributes?.maxLength,
|
|
@@ -1991,7 +2007,7 @@ var DateTimeInput = (props) => {
|
|
|
1991
2007
|
),
|
|
1992
2008
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: timeZoneAbbr })
|
|
1993
2009
|
] }),
|
|
1994
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
2010
|
+
/* @__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 : "" })
|
|
1995
2011
|
] }) });
|
|
1996
2012
|
};
|
|
1997
2013
|
var DateTimeInput_default = DateTimeInput;
|
|
@@ -2034,10 +2050,10 @@ var ColorInput = (props) => {
|
|
|
2034
2050
|
value: color,
|
|
2035
2051
|
onChange: handleColorChange,
|
|
2036
2052
|
required: props?.attributes?.required,
|
|
2037
|
-
className: `w-[
|
|
2053
|
+
className: `w-[78px] h-12 block cursor-pointer focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50`
|
|
2038
2054
|
}
|
|
2039
2055
|
),
|
|
2040
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1
|
|
2056
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
2041
2057
|
] });
|
|
2042
2058
|
};
|
|
2043
2059
|
var ColorInput_default = ColorInput;
|
|
@@ -2520,7 +2536,7 @@ var BooleanSelect = (props) => {
|
|
|
2520
2536
|
]
|
|
2521
2537
|
}
|
|
2522
2538
|
),
|
|
2523
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
2539
|
+
/* @__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 : "" })
|
|
2524
2540
|
] }) });
|
|
2525
2541
|
};
|
|
2526
2542
|
var BooleanSelect_default = BooleanSelect;
|
|
@@ -2572,7 +2588,7 @@ var EmailInput = (props) => {
|
|
|
2572
2588
|
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"
|
|
2573
2589
|
}
|
|
2574
2590
|
),
|
|
2575
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
2591
|
+
/* @__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 : "" })
|
|
2576
2592
|
] }) });
|
|
2577
2593
|
};
|
|
2578
2594
|
var EmailInput_default = EmailInput;
|
|
@@ -2609,7 +2625,7 @@ var TimeInput = (props) => {
|
|
|
2609
2625
|
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"
|
|
2610
2626
|
}
|
|
2611
2627
|
) }),
|
|
2612
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
2628
|
+
/* @__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 ?? "" })
|
|
2613
2629
|
] }) });
|
|
2614
2630
|
};
|
|
2615
2631
|
var TimeInput_default = TimeInput;
|
|
@@ -5712,10 +5728,23 @@ var Toast_default = Toast;
|
|
|
5712
5728
|
init_ToastService();
|
|
5713
5729
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5714
5730
|
0 && (module.exports = {
|
|
5731
|
+
BooleanSelect,
|
|
5732
|
+
CheckboxInput,
|
|
5733
|
+
ColorInput,
|
|
5715
5734
|
DataList,
|
|
5735
|
+
DateTimeInput,
|
|
5736
|
+
EmailInput,
|
|
5716
5737
|
InputControl,
|
|
5717
5738
|
InputControlType,
|
|
5739
|
+
LineTextInput,
|
|
5740
|
+
MoneyInput,
|
|
5741
|
+
MultilineTextInput,
|
|
5742
|
+
NumberInput,
|
|
5743
|
+
OtpInput,
|
|
5718
5744
|
PageBodyRenderer,
|
|
5745
|
+
PercentageInput,
|
|
5746
|
+
PhoneInput,
|
|
5747
|
+
TimeInput,
|
|
5719
5748
|
Toast,
|
|
5720
5749
|
ToastService,
|
|
5721
5750
|
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;
|
|
@@ -439,7 +439,7 @@ var LineTextInput = (props) => {
|
|
|
439
439
|
`
|
|
440
440
|
}
|
|
441
441
|
),
|
|
442
|
-
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
442
|
+
/* @__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
443
|
] }) });
|
|
444
444
|
};
|
|
445
445
|
var LineTextInput_default = LineTextInput;
|
|
@@ -499,7 +499,7 @@ var MoneyInput = (props) => {
|
|
|
499
499
|
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
500
|
}
|
|
501
501
|
),
|
|
502
|
-
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
502
|
+
/* @__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
503
|
] }) });
|
|
504
504
|
};
|
|
505
505
|
var MoneyInput_default = MoneyInput;
|
|
@@ -671,7 +671,7 @@ var PercentageInput = (props) => {
|
|
|
671
671
|
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
672
|
}
|
|
673
673
|
),
|
|
674
|
-
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
674
|
+
/* @__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
675
|
] }) });
|
|
676
676
|
};
|
|
677
677
|
var PercentageInput_default = PercentageInput;
|
|
@@ -701,8 +701,8 @@ var PhoneInput = (props) => {
|
|
|
701
701
|
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
702
702
|
" ",
|
|
703
703
|
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
|
|
704
|
+
/* @__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: [
|
|
705
|
+
/* @__PURE__ */ jsx15("span", { className: "px-3", children: props.prefix }),
|
|
706
706
|
/* @__PURE__ */ jsx15(
|
|
707
707
|
"input",
|
|
708
708
|
{
|
|
@@ -721,7 +721,7 @@ var PhoneInput = (props) => {
|
|
|
721
721
|
}
|
|
722
722
|
)
|
|
723
723
|
] }),
|
|
724
|
-
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
724
|
+
/* @__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
725
|
] }) });
|
|
726
726
|
};
|
|
727
727
|
var PhoneInput_default = PhoneInput;
|
|
@@ -774,7 +774,7 @@ var NumberInput = (props) => {
|
|
|
774
774
|
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
775
|
}
|
|
776
776
|
),
|
|
777
|
-
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
777
|
+
/* @__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
778
|
] }) });
|
|
779
779
|
};
|
|
780
780
|
var NumberInput_default = NumberInput;
|
|
@@ -785,7 +785,6 @@ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
|
785
785
|
var CheckboxInput = (props) => {
|
|
786
786
|
const textChangeHandler = (event) => {
|
|
787
787
|
let text = event.target.checked;
|
|
788
|
-
console.log(text);
|
|
789
788
|
if (props.callback !== void 0) {
|
|
790
789
|
props.callback({
|
|
791
790
|
name: props.name,
|
|
@@ -795,7 +794,6 @@ var CheckboxInput = (props) => {
|
|
|
795
794
|
});
|
|
796
795
|
}
|
|
797
796
|
};
|
|
798
|
-
const trueValue = true;
|
|
799
797
|
let value = false;
|
|
800
798
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
801
799
|
value = true;
|
|
@@ -803,7 +801,7 @@ var CheckboxInput = (props) => {
|
|
|
803
801
|
return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block mb-1", children: [
|
|
804
802
|
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
805
803
|
" ",
|
|
806
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "
|
|
804
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" }),
|
|
807
805
|
/* @__PURE__ */ jsx17(
|
|
808
806
|
"input",
|
|
809
807
|
{
|
|
@@ -821,7 +819,7 @@ var CheckboxInput = (props) => {
|
|
|
821
819
|
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
820
|
}
|
|
823
821
|
),
|
|
824
|
-
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
822
|
+
/* @__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
823
|
] }) });
|
|
826
824
|
};
|
|
827
825
|
var CheckboxInput_default = CheckboxInput;
|
|
@@ -874,7 +872,7 @@ var OtpInput = (props) => {
|
|
|
874
872
|
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
873
|
}
|
|
876
874
|
),
|
|
877
|
-
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
875
|
+
/* @__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
876
|
] }) });
|
|
879
877
|
};
|
|
880
878
|
var OtpInput_default = OtpInput;
|
|
@@ -978,7 +976,6 @@ var DateTimeInput = (props) => {
|
|
|
978
976
|
let localvalue;
|
|
979
977
|
let timeZoneAbbr;
|
|
980
978
|
const now = /* @__PURE__ */ new Date();
|
|
981
|
-
const utcOffset = now.getTimezoneOffset();
|
|
982
979
|
if (props.value !== void 0 && props.value !== null) {
|
|
983
980
|
value = props.value;
|
|
984
981
|
const now2 = /* @__PURE__ */ new Date();
|
|
@@ -992,6 +989,11 @@ var DateTimeInput = (props) => {
|
|
|
992
989
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
993
990
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
994
991
|
}
|
|
992
|
+
const handleKeyDown = (e) => {
|
|
993
|
+
if (e.key === "Backspace") {
|
|
994
|
+
e.preventDefault();
|
|
995
|
+
}
|
|
996
|
+
};
|
|
995
997
|
return /* @__PURE__ */ jsx19(React19.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
996
998
|
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
997
999
|
" ",
|
|
@@ -1005,6 +1007,7 @@ var DateTimeInput = (props) => {
|
|
|
1005
1007
|
id: props.name,
|
|
1006
1008
|
value: localvalue,
|
|
1007
1009
|
onChange: textChangeHandler,
|
|
1010
|
+
onKeyDown: handleKeyDown,
|
|
1008
1011
|
required: props?.attributes?.required,
|
|
1009
1012
|
placeholder: props?.attributes?.placeholder,
|
|
1010
1013
|
maxLength: props?.attributes?.maxLength,
|
|
@@ -1016,7 +1019,7 @@ var DateTimeInput = (props) => {
|
|
|
1016
1019
|
),
|
|
1017
1020
|
/* @__PURE__ */ jsx19("span", { children: timeZoneAbbr })
|
|
1018
1021
|
] }),
|
|
1019
|
-
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1022
|
+
/* @__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
1023
|
] }) });
|
|
1021
1024
|
};
|
|
1022
1025
|
var DateTimeInput_default = DateTimeInput;
|
|
@@ -1059,10 +1062,10 @@ var ColorInput = (props) => {
|
|
|
1059
1062
|
value: color,
|
|
1060
1063
|
onChange: handleColorChange,
|
|
1061
1064
|
required: props?.attributes?.required,
|
|
1062
|
-
className: `w-[
|
|
1065
|
+
className: `w-[78px] h-12 block cursor-pointer focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50`
|
|
1063
1066
|
}
|
|
1064
1067
|
),
|
|
1065
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1
|
|
1068
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1066
1069
|
] });
|
|
1067
1070
|
};
|
|
1068
1071
|
var ColorInput_default = ColorInput;
|
|
@@ -1552,7 +1555,7 @@ var BooleanSelect = (props) => {
|
|
|
1552
1555
|
]
|
|
1553
1556
|
}
|
|
1554
1557
|
),
|
|
1555
|
-
/* @__PURE__ */ jsx23("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1558
|
+
/* @__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
1559
|
] }) });
|
|
1557
1560
|
};
|
|
1558
1561
|
var BooleanSelect_default = BooleanSelect;
|
|
@@ -1604,7 +1607,7 @@ var EmailInput = (props) => {
|
|
|
1604
1607
|
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
1608
|
}
|
|
1606
1609
|
),
|
|
1607
|
-
/* @__PURE__ */ jsx24("p", { className: "hidden group-[.validated]:peer-invalid:block
|
|
1610
|
+
/* @__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
1611
|
] }) });
|
|
1609
1612
|
};
|
|
1610
1613
|
var EmailInput_default = EmailInput;
|
|
@@ -1641,7 +1644,7 @@ var TimeInput = (props) => {
|
|
|
1641
1644
|
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
1645
|
}
|
|
1643
1646
|
) }),
|
|
1644
|
-
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1
|
|
1647
|
+
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1645
1648
|
] }) });
|
|
1646
1649
|
};
|
|
1647
1650
|
var TimeInput_default = TimeInput;
|
|
@@ -4728,10 +4731,23 @@ var Toast = () => {
|
|
|
4728
4731
|
};
|
|
4729
4732
|
var Toast_default = Toast;
|
|
4730
4733
|
export {
|
|
4734
|
+
BooleanSelect_default as BooleanSelect,
|
|
4735
|
+
CheckboxInput_default as CheckboxInput,
|
|
4736
|
+
ColorInput_default as ColorInput,
|
|
4731
4737
|
DataList_default as DataList,
|
|
4738
|
+
DateTimeInput_default as DateTimeInput,
|
|
4739
|
+
EmailInput_default as EmailInput,
|
|
4732
4740
|
InputControl_default as InputControl,
|
|
4733
4741
|
InputControlType_default as InputControlType,
|
|
4742
|
+
LineTextInput_default as LineTextInput,
|
|
4743
|
+
MoneyInput_default as MoneyInput,
|
|
4744
|
+
MultilineTextInput_default as MultilineTextInput,
|
|
4745
|
+
NumberInput_default as NumberInput,
|
|
4746
|
+
OtpInput_default as OtpInput,
|
|
4734
4747
|
PageBodyRenderer_default as PageBodyRenderer,
|
|
4748
|
+
PercentageInput_default as PercentageInput,
|
|
4749
|
+
PhoneInput_default as PhoneInput,
|
|
4750
|
+
TimeInput_default as TimeInput,
|
|
4735
4751
|
Toast_default as Toast,
|
|
4736
4752
|
ToastService_default as ToastService,
|
|
4737
4753
|
ViewControl_default as ViewControl,
|
package/package.json
CHANGED