@hortiview/default-components 1.2.1 → 1.4.0
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/README.md +12 -0
- package/dist/{HealthCheckFailed-xzjSWKc-.js → HealthCheckFailed-CqLYAwpc.js} +13 -12
- package/dist/{Iconify-B64-1COA.js → Iconify-Cjdr-ccS.js} +11 -12
- package/dist/{LoadingSpinner-AfsNRWJD.js → LoadingSpinner-FRQEZvxs.js} +25 -24
- package/dist/OfflineView-HbuDPpQL-kqlzfoUS.js +46 -0
- package/dist/assets/DefaultFormSelect.css +1 -0
- package/dist/assets/GenericTable.css +1 -1
- package/dist/assets/OfflineView-HbuDPpQL.css +1 -0
- package/dist/{component-DsB0poTj-QmhaJp70.js → component-DsB0poTj-BDGiEcbP.js} +1 -1
- package/dist/components/DefaultFormNumber/DefaultFormNumber.js +239 -251
- package/dist/components/DefaultFormSelect/DefaultFormSelect.d.ts +14 -0
- package/dist/components/DefaultFormSelect/DefaultFormSelect.js +189 -0
- package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
- package/dist/components/GenericTable/GenericTable.js +9938 -23557
- package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
- package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
- package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
- package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
- package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
- package/dist/components/OfflineView/OfflineView.d.ts +4 -0
- package/dist/components/OfflineView/OfflineView.js +18 -0
- package/dist/{index.es-D-CKRzIB-DgKmS30c.js → index.es--yyG47az-DBKBm3yD.js} +316 -450
- package/dist/index.es-Bx1E5MPK-CaV59rEP.js +344 -0
- package/dist/index.es-CzUKBF7E-C0X-mcdY.js +13567 -0
- package/dist/index.es-D-ph6ImM-CWxTa_iD.js +63 -0
- package/dist/index.es-DDo_AHL0-VqD9ikmU.js +1033 -0
- package/dist/index.es-Kg9soDed-BkTwDySy.js +440 -0
- package/dist/index.es-U5-b20Gv-ChQ_O81C.js +1010 -0
- package/dist/locales/en-US.js +10 -6
- package/dist/locales/en-US.json.d.ts +10 -0
- package/dist/locales/es-MX.js +11 -7
- package/dist/locales/es-MX.json.d.ts +10 -0
- package/dist/locales/tr-TR.js +15 -11
- package/dist/locales/tr-TR.json.d.ts +10 -0
- package/dist/main.d.ts +4 -1
- package/dist/main.js +22 -18
- package/dist/{index.es-25EARqhH-LGdAiMHi.js → omit-1Eom1PmQ-BLY9iMqj.js} +748 -1314
- package/dist/useHelperText-DD9_Dtkk.js +21 -0
- package/dist/useTranslation-B_ODv8uN.js +4306 -0
- package/package.json +3 -3
- package/dist/index.es-6TJ1S8Jr-CxeupS6f.js +0 -1806
- package/dist/useTranslation-DaMPyebp.js +0 -4223
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { g as u } from "./useTranslation-B_ODv8uN.js";
|
|
2
|
+
import { Z as f } from "./index.es-U5-b20Gv-ChQ_O81C.js";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import { useFormContext as l } from "react-hook-form";
|
|
5
|
+
var x = f();
|
|
6
|
+
const c = /* @__PURE__ */ u(x), d = ({
|
|
7
|
+
propertyName: s,
|
|
8
|
+
requiredText: r,
|
|
9
|
+
maxLength: o,
|
|
10
|
+
helperText: t = null,
|
|
11
|
+
hasCharacterCount: m = !1
|
|
12
|
+
}) => {
|
|
13
|
+
const {
|
|
14
|
+
formState: { errors: a }
|
|
15
|
+
} = l(), e = c(a, s), p = n(() => e ? e.message || "Invalid input" : t ?? r, [e, t, r]), i = n(() => !!(e || m && o || r || t), [e, m, o, r, t]);
|
|
16
|
+
return { helperText: p, helperTextPersistent: i };
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
c as a,
|
|
20
|
+
d as v
|
|
21
|
+
};
|