@asdp/ferryui 0.1.22-dev.9630 → 0.1.22-dev.9698
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 +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3794,6 +3794,12 @@ interface FileUploadProps<T extends FieldValues = FieldValues> {
|
|
|
3794
3794
|
*/
|
|
3795
3795
|
pdfIcon?: string;
|
|
3796
3796
|
downloadTemplateDocument?: boolean;
|
|
3797
|
+
/**
|
|
3798
|
+
* Optional info label text to display with an info icon next to the label.
|
|
3799
|
+
* When not provided, no info label is displayed.
|
|
3800
|
+
* Example: 'Maximum file size is 10MB'
|
|
3801
|
+
*/
|
|
3802
|
+
infoLabel?: string;
|
|
3797
3803
|
}
|
|
3798
3804
|
|
|
3799
3805
|
declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps<react_hook_form.FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3794,6 +3794,12 @@ interface FileUploadProps<T extends FieldValues = FieldValues> {
|
|
|
3794
3794
|
*/
|
|
3795
3795
|
pdfIcon?: string;
|
|
3796
3796
|
downloadTemplateDocument?: boolean;
|
|
3797
|
+
/**
|
|
3798
|
+
* Optional info label text to display with an info icon next to the label.
|
|
3799
|
+
* When not provided, no info label is displayed.
|
|
3800
|
+
* Example: 'Maximum file size is 10MB'
|
|
3801
|
+
*/
|
|
3802
|
+
infoLabel?: string;
|
|
3797
3803
|
}
|
|
3798
3804
|
|
|
3799
3805
|
declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps<react_hook_form.FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
|
package/dist/index.js
CHANGED
|
@@ -15899,8 +15899,8 @@ var uploadStyles = reactComponents.makeStyles({
|
|
|
15899
15899
|
pointerEvents: "none"
|
|
15900
15900
|
},
|
|
15901
15901
|
filePreviewImage: {
|
|
15902
|
-
width: "
|
|
15903
|
-
height: "
|
|
15902
|
+
width: "32px",
|
|
15903
|
+
height: "32px",
|
|
15904
15904
|
borderRadius: reactComponents.tokens.borderRadiusSmall,
|
|
15905
15905
|
objectFit: "cover"
|
|
15906
15906
|
},
|
|
@@ -15908,6 +15908,18 @@ var uploadStyles = reactComponents.makeStyles({
|
|
|
15908
15908
|
maxWidth: "100%",
|
|
15909
15909
|
maxHeight: "70vh",
|
|
15910
15910
|
objectFit: "contain"
|
|
15911
|
+
},
|
|
15912
|
+
infoLabel: {
|
|
15913
|
+
'& [role="note"]': {
|
|
15914
|
+
backgroundColor: "black",
|
|
15915
|
+
color: "white"
|
|
15916
|
+
}
|
|
15917
|
+
},
|
|
15918
|
+
label: {
|
|
15919
|
+
whiteSpace: "nowrap",
|
|
15920
|
+
overflow: "hidden",
|
|
15921
|
+
textOverflow: "ellipsis",
|
|
15922
|
+
display: "block"
|
|
15911
15923
|
}
|
|
15912
15924
|
});
|
|
15913
15925
|
var FileUpload = React__default.default.forwardRef(
|
|
@@ -15923,7 +15935,8 @@ var FileUpload = React__default.default.forwardRef(
|
|
|
15923
15935
|
language = "id",
|
|
15924
15936
|
labels: customLabels,
|
|
15925
15937
|
pdfIcon,
|
|
15926
|
-
downloadTemplateDocument = false
|
|
15938
|
+
downloadTemplateDocument = false,
|
|
15939
|
+
infoLabel
|
|
15927
15940
|
}, ref) => {
|
|
15928
15941
|
const mergedLabels = { ...DEFAULT_LABELS39[language], ...customLabels };
|
|
15929
15942
|
const styles = uploadStyles();
|
|
@@ -16056,8 +16069,11 @@ var FileUpload = React__default.default.forwardRef(
|
|
|
16056
16069
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16057
16070
|
reactComponents.Field,
|
|
16058
16071
|
{
|
|
16072
|
+
ref,
|
|
16059
16073
|
required,
|
|
16060
|
-
label:
|
|
16074
|
+
label: {
|
|
16075
|
+
children: (_, slotProps) => infoLabel ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.InfoLabel, { ...slotProps, info: infoLabel, className: styles.infoLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label }) }) : /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label })
|
|
16076
|
+
},
|
|
16061
16077
|
className: styles.fieldContainer,
|
|
16062
16078
|
children: [
|
|
16063
16079
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16137,8 +16153,10 @@ var FileUpload = React__default.default.forwardRef(
|
|
|
16137
16153
|
{
|
|
16138
16154
|
ref,
|
|
16139
16155
|
required,
|
|
16140
|
-
label: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: label }),
|
|
16141
16156
|
className: styles.fieldContainer,
|
|
16157
|
+
label: {
|
|
16158
|
+
children: (_, slotProps) => infoLabel ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.InfoLabel, { ...slotProps, info: infoLabel, className: styles.infoLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label }) }) : /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label })
|
|
16159
|
+
},
|
|
16142
16160
|
children: [
|
|
16143
16161
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16144
16162
|
reactGridSystem.Container,
|