@oliasoft-open-source/react-ui-library 4.6.4-beta-1 → 4.6.4-beta-3
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.ts +22 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/Color-6VNJS4EI-7EJWBn2n.js +1 -0
- package/dist/storybook/assets/DocsRenderer-NNNQARDV-27_v5hoK.js +1 -0
- package/dist/storybook/assets/WithTooltip-V3YHNWJZ-6sbHf1Os.js +1 -0
- package/dist/storybook/assets/{accordion-MRdNs3mQ.js → accordion-M-sY23Hd.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-eynVvKyf.js → accordion.stories-nYKTmoeA.js} +2 -2
- package/dist/storybook/assets/{actions-fDogfeOj.js → actions-mOcj9IlF.js} +1 -1
- package/dist/storybook/assets/{actions.stories-Ij02T6Zm.js → actions.stories-ER0_rAT3.js} +1 -1
- package/dist/storybook/assets/{afe.stories-NSXn2FsI.js → afe.stories-yjkRmCqu.js} +2 -2
- package/dist/storybook/assets/{badge.stories-1SnkCuWB.js → badge.stories-QAHZ0hGs.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-tBfQWj53.js → blowout.stories-fjMitjld.js} +1 -1
- package/dist/storybook/assets/{button-group-7WkfMawh.js → button-group-mNQThLQb.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-WF6kt2QA.js → button-group.stories-hEWUnlpm.js} +1 -1
- package/dist/storybook/assets/{button-pzaoiJWP.js → button-shH4xakS.js} +1 -1
- package/dist/storybook/assets/{button.stories-aFz_oQmk.js → button.stories-5xHwBO1P.js} +6 -6
- package/dist/storybook/assets/{buttons-and-links-m2DMfQ6d.js → buttons-and-links-dYrnUCBl.js} +2 -2
- package/dist/storybook/assets/{card.stories-Ic_vrrzC.js → card.stories-52XKdWMP.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-wpC25p9s.js → casing-loads.stories-Ilvo3kc-.js} +2 -2
- package/dist/storybook/assets/{cell.stories-qZxVnuW0.js → cell.stories-dk65sciA.js} +2 -2
- package/dist/storybook/assets/{check-box-NJDiZVo7.js → check-box-2gxosI3y.js} +1 -1
- package/dist/storybook/assets/{check-box.stories-kKAtDTQt.js → check-box.stories-dct4BaKG.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-YFYPw14x.js → chunk-HLWAVYOI-3MTK5A9a.js} +1 -1
- package/dist/storybook/assets/color-yUbRwZdG.js +25 -0
- package/dist/storybook/assets/{column.stories-ALyFOZ14.js → column.stories-1Qq8awo0.js} +1 -1
- package/dist/storybook/assets/{dialog-ufJfp3xq.js → dialog-roJ8Yns6.js} +1 -1
- package/dist/storybook/assets/{drawer-gMi20QKY.js → drawer-GdbVQdWk.js} +1 -1
- package/dist/storybook/assets/{drawer.stories-Kh1oW2kc.js → drawer.stories-XWMoCncm.js} +2 -2
- package/dist/storybook/assets/{empty.stories-hiT2fx9j.js → empty.stories-XVXKuuiT.js} +1 -1
- package/dist/storybook/assets/{field-7aita7RD.js → field-FZX0Z7IB.js} +1 -1
- package/dist/storybook/assets/{field.stories-_h7pNWxV.js → field.stories-Quu0snQm.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-qSazOSxT.js → file-input.stories-0vixHxSj.js} +1 -1
- package/dist/storybook/assets/{flex.stories-rW-o5Rcj.js → flex.stories-8HJIYv6E.js} +1 -1
- package/dist/storybook/assets/footer.stories-tB9ZiuYm.js +3 -0
- package/dist/storybook/assets/form.stories-xo3CugfR.js +49 -0
- package/dist/storybook/assets/formation.stories-4zFgtvwa.js +74 -0
- package/dist/storybook/assets/{formatter-SWP5E3XI-OqIRNiai.js → formatter-SWP5E3XI-qqJfB2JF.js} +2 -2
- package/dist/storybook/assets/{heading-3kLSpr0S.js → heading-jZsIIJF0.js} +1 -1
- package/dist/storybook/assets/{heading.stories-NFtxisSU.js → heading.stories-lW_q2VjY.js} +1 -1
- package/dist/storybook/assets/{help-icon-3XYXeKEh.js → help-icon-SKky6KLV.js} +1 -1
- package/dist/storybook/assets/{help-icon.stories-0K6YtLSE.js → help-icon.stories-i7tX8eBl.js} +1 -1
- package/dist/storybook/assets/icon-8EQazuuW.js +8 -0
- package/dist/storybook/assets/{icon.stories-2aZia1VV.js → icon.stories-j-b_Exev.js} +1 -1
- package/dist/storybook/assets/iframe-zKP8LwdF.js +7 -0
- package/dist/storybook/assets/{index-yLQnu5kb.js → index-_Cqj7ZZf.js} +5 -5
- package/dist/storybook/assets/{index.es-HG2GUH9i.js → index.es-VXFRDikp.js} +4 -4
- package/dist/storybook/assets/inheritsLoose-8sb_A2v4.js +1 -0
- package/dist/storybook/assets/{input-group.stories-QyCAcNnA.js → input-group.stories-gJFYuvVb.js} +2 -2
- package/dist/storybook/assets/{input-validation-MVQxPrsh.js → input-validation-F3k_L_V-.js} +2 -2
- package/dist/storybook/assets/{inputs-ApG_ovoh.js → inputs-it9JeY9A.js} +2 -2
- package/dist/storybook/assets/{label-6FmD_czQ.js → label-uCFEME1p.js} +1 -1
- package/dist/storybook/assets/{label.stories-HbYjo9Is.js → label.stories-LhXr4NuA.js} +1 -1
- package/dist/storybook/assets/layout-forms-aoSd8nYT.js +16 -0
- package/dist/storybook/assets/{layout-general-yr3HbuRt.js → layout-general-VkqLpK9N.js} +2 -2
- package/dist/storybook/assets/{list-TQiJNWcB.js → list-PShi-3TE.js} +1 -1
- package/dist/storybook/assets/{list.stories-xon0V98M.js → list.stories-TLnvjaYU.js} +2 -2
- package/dist/storybook/assets/{list.stories-data-mlf0RWWz.js → list.stories-data-Qc3oehAh.js} +1 -1
- package/dist/storybook/assets/{loader.stories-T7uh7_nk.js → loader.stories-xsnhGOV_.js} +1 -1
- package/dist/storybook/assets/{menu.stories-5yE1hCk6.js → menu.stories-ppWN2JgO.js} +6 -6
- package/dist/storybook/assets/{message-bbAE2zjv.js → message-CRKuTfOl.js} +1 -1
- package/dist/storybook/assets/{message.stories---WPc4fI.js → message.stories-N8ZGvhv2.js} +1 -1
- package/dist/storybook/assets/{meta-content-TSXRt1fk.js → meta-content-lUynpOsR.js} +1 -1
- package/dist/storybook/assets/{modal.stories-v18Wihad.js → modal.stories-dirXv4n_.js} +2 -2
- package/dist/storybook/assets/{number-input.stories-Ikw3ATFj.js → number-input.stories-AU1jlL6D.js} +5 -5
- package/dist/storybook/assets/{option-dropdown.stories-XAe4RN6O.js → option-dropdown.stories-n7CDZevX.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-TCI6vSfo.js → padding-and-spacing-NsXmbV4A.js} +2 -2
- package/dist/storybook/assets/{page.stories-_1ucgilf.js → page.stories-UQlnuZid.js} +1 -1
- package/dist/storybook/assets/{pagination-wPvEVEri.js → pagination-tnyyuMkB.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-xcjXgU_A.js → pagination.stories-c7jbEB_j.js} +2 -2
- package/dist/storybook/assets/{pop-confirm.stories-4KINgWQv.js → pop-confirm.stories-kZScSFuk.js} +1 -1
- package/dist/storybook/assets/{popover-N2COrkjb.js → popover-cad2llTa.js} +1 -1
- package/dist/storybook/assets/popover.stories-1JvlWYFM.js +1 -0
- package/dist/storybook/assets/preview-MFdzaKPJ.js +7 -0
- package/dist/storybook/assets/{preview-F50tyXZc.js → preview-uQoi467g.js} +3 -3
- package/dist/storybook/assets/projects.stories-epAPUAg1.js +47 -0
- package/dist/storybook/assets/{radio-button-EerSOxRw.js → radio-button-5n_38sFk.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-etd-hnJG.js → radio-button.stories-Z_B_oHnZ.js} +1 -1
- package/dist/storybook/assets/react-router-dom-EZH1n7K1.js +8 -0
- package/dist/storybook/assets/{reservoirs.stories-StUPBedn.js → reservoirs.stories-TKohSiCU.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-dT7BoCuX.js → rich-text-input.stories-EbjoMb2s.js} +3 -3
- package/dist/storybook/assets/{row.stories-hGv3oFfy.js → row.stories-p0ssjvtr.js} +2 -2
- package/dist/storybook/assets/select-DZdWUrCW.js +1 -0
- package/dist/storybook/assets/{select.stories-b4nKRzxr.js → select.stories-QOxuHSmz.js} +2 -2
- package/dist/storybook/assets/{side-bar-Xx8ZAqZq.js → side-bar-dRjlh2Za.js} +1 -1
- package/dist/storybook/assets/{side-bar.stories-SJrdRBeI.js → side-bar.stories-aKMnuHiZ.js} +1 -1
- package/dist/storybook/assets/{site.stories--DF2p88j.js → site.stories-Qfujz1ST.js} +2 -2
- package/dist/storybook/assets/slider-MN9iDCsS.js +7 -0
- package/dist/storybook/assets/{slider.stories-D8pQfYVa.js → slider.stories-hVrt3K9M.js} +4 -4
- package/dist/storybook/assets/{spacer.stories-UdEBpD2c.js → spacer.stories-Tc3LfeOH.js} +1 -1
- package/dist/storybook/assets/syntaxhighlighter-B5GMVT5T-iOeaOhyu.js +1 -0
- package/dist/storybook/assets/{table-EpoS--Q9.js → table-033R9jUC.js} +1 -1
- package/dist/storybook/assets/{table.stories-data-sKNV6OwY.js → table.stories-data-NfE_v-gH.js} +1 -1
- package/dist/storybook/assets/{table.stories-fNxSJxw4.js → table.stories-wdVWlpz1.js} +2 -2
- package/dist/storybook/assets/text-link.stories-Mx9ojcOC.js +14 -0
- package/dist/storybook/assets/{textarea-ygEac3d2.js → textarea-Frf9uK4H.js} +1 -1
- package/dist/storybook/assets/{textarea.stories-vr_I38NI.js → textarea.stories-1JfGlfHS.js} +1 -1
- package/dist/storybook/assets/{title.stories-7Dcc2YOf.js → title.stories-9QWP9XVr.js} +3 -3
- package/dist/storybook/assets/{toaster-IL_npIpU.js → toaster-yPcd4ELJ.js} +1 -1
- package/dist/storybook/assets/{toaster.stories-6e51I0Du.js → toaster.stories-D_1FY8OT.js} +1 -1
- package/dist/storybook/assets/{toggle-Eh66Nfd8.js → toggle-M_66MP8X.js} +1 -1
- package/dist/storybook/assets/{toggle.stories-Oq6meHwx.js → toggle.stories-VfPLoUW1.js} +1 -1
- package/dist/storybook/assets/{tooltip.test-case.stories-b7Y7bdNN.js → tooltip.test-case.stories-g9fe1-Ut.js} +1 -1
- package/dist/storybook/assets/{top-bar-9ZpEs04T.js → top-bar-ywJJBf-H.js} +1 -1
- package/dist/storybook/assets/top-bar.stories-KkBPu_h3.js +21 -0
- package/dist/storybook/assets/{top-bar.testcase.stories-3nLi_qFY.js → top-bar.testcase.stories-RJkl6c8Z.js} +1 -1
- package/dist/storybook/assets/{tree.stories-fMDywk_b.js → tree.stories-UiERA8eJ.js} +1 -1
- package/dist/storybook/assets/{unit-input.stories-cxQ7uyAF.js → unit-input.stories-NxlXJaPc.js} +1 -1
- package/dist/storybook/assets/unit-table.stories-lZ4MjpDy.js +108 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/Color-6VNJS4EI-WZ_HKCgl.js +0 -1
- package/dist/storybook/assets/DocsRenderer-NNNQARDV-rqsuPIAO.js +0 -1
- package/dist/storybook/assets/WithTooltip-V3YHNWJZ-utzAQypy.js +0 -1
- package/dist/storybook/assets/color-r6CJ7pH9.js +0 -25
- package/dist/storybook/assets/extends-dGVwEr9R.js +0 -1
- package/dist/storybook/assets/footer.stories-FVGMsLNB.js +0 -3
- package/dist/storybook/assets/form.stories-z-fXsPFv.js +0 -49
- package/dist/storybook/assets/formation.stories-roJBHiB1.js +0 -74
- package/dist/storybook/assets/icon-_m67DAr0.js +0 -8
- package/dist/storybook/assets/iframe-Ay-EsUFI.js +0 -7
- package/dist/storybook/assets/inheritsLoose-Y9jOMJLd.js +0 -1
- package/dist/storybook/assets/layout-forms-Dw8El9Nm.js +0 -16
- package/dist/storybook/assets/popover.stories--H0KsGLL.js +0 -1
- package/dist/storybook/assets/preview-VfTY8dMN.js +0 -7
- package/dist/storybook/assets/projects.stories-hNrjUb-q.js +0 -47
- package/dist/storybook/assets/react-router-dom-4Z66xYqZ.js +0 -8
- package/dist/storybook/assets/select-dsCIcV9L.js +0 -1
- package/dist/storybook/assets/slider-t3xH-fl7.js +0 -7
- package/dist/storybook/assets/syntaxhighlighter-B5GMVT5T-cORwPp89.js +0 -1
- package/dist/storybook/assets/text-link.stories-Plmiu8NV.js +0 -14
- package/dist/storybook/assets/top-bar.stories-R_1_eyqR.js +0 -21
- package/dist/storybook/assets/unit-table.stories-lFLBZ-2X.js +0 -108
package/dist/index.d.ts
CHANGED
|
@@ -1665,6 +1665,8 @@ export declare const SideBar: React_2.MemoExoticComponent<({ options, startOpen,
|
|
|
1665
1665
|
|
|
1666
1666
|
export declare const Slider: ({ name, label, width, labelWidth, value, min, max, step, marks, showArrows, showTooltip, tooltipFormatter, disabled, range, small, vertical, onChange, }: ISliderProps) => JSX_2.Element;
|
|
1667
1667
|
|
|
1668
|
+
export declare const SmartUploadModal: ({ visible, prompt, onCloseModal, onUpload, onComplete, onFailed, onError, width, heading, dialogText, fileInputText, fileInputPlaceholder, uploadText, cancelText, testId, }: TSmartUploadModalProps) => JSX_2.Element;
|
|
1669
|
+
|
|
1668
1670
|
export declare const Spacer: ({ height, width, flex, }: ISpacerProps) => JSX_2.Element;
|
|
1669
1671
|
|
|
1670
1672
|
export declare const Spinner: ({ small, colored, dark, tiny, }: ISpinnerProps) => JSX_2.Element;
|
|
@@ -1800,6 +1802,26 @@ declare type TSliderMark = {
|
|
|
1800
1802
|
tooltip?: number | string | ReactNode;
|
|
1801
1803
|
};
|
|
1802
1804
|
|
|
1805
|
+
export declare type TSmartUploadModalProps = {
|
|
1806
|
+
visible: boolean;
|
|
1807
|
+
prompt: string;
|
|
1808
|
+
onCloseModal: () => void;
|
|
1809
|
+
onUpload: (prompt: string, file: File) => any;
|
|
1810
|
+
onComplete: (data: {
|
|
1811
|
+
[key: string]: string;
|
|
1812
|
+
}[]) => void;
|
|
1813
|
+
onFailed?: () => void;
|
|
1814
|
+
onError?: (error: any) => void;
|
|
1815
|
+
width?: number;
|
|
1816
|
+
heading?: string;
|
|
1817
|
+
dialogText?: string;
|
|
1818
|
+
fileInputText?: string;
|
|
1819
|
+
fileInputPlaceholder?: string;
|
|
1820
|
+
uploadText?: string;
|
|
1821
|
+
cancelText?: string;
|
|
1822
|
+
testId?: string;
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1803
1825
|
declare type TStringNumberNull = string | number | null;
|
|
1804
1826
|
|
|
1805
1827
|
declare type TStringOrNumber = string | number;
|
package/dist/index.js
CHANGED
|
@@ -70842,6 +70842,110 @@ const UnitTable = ({
|
|
|
70842
70842
|
}
|
|
70843
70843
|
);
|
|
70844
70844
|
};
|
|
70845
|
+
const SmartUploadModal = ({
|
|
70846
|
+
visible,
|
|
70847
|
+
prompt,
|
|
70848
|
+
onCloseModal,
|
|
70849
|
+
onUpload,
|
|
70850
|
+
onComplete,
|
|
70851
|
+
onFailed,
|
|
70852
|
+
onError: onError3,
|
|
70853
|
+
width: width2,
|
|
70854
|
+
heading: heading2,
|
|
70855
|
+
dialogText,
|
|
70856
|
+
fileInputText,
|
|
70857
|
+
fileInputPlaceholder,
|
|
70858
|
+
uploadText,
|
|
70859
|
+
cancelText,
|
|
70860
|
+
testId
|
|
70861
|
+
}) => {
|
|
70862
|
+
const [file, setFile] = useState(void 0);
|
|
70863
|
+
const [isFetching, setFetching] = useState(false);
|
|
70864
|
+
useEffect(() => {
|
|
70865
|
+
setFile(void 0);
|
|
70866
|
+
}, [visible]);
|
|
70867
|
+
const handleFileChange = (event) => {
|
|
70868
|
+
if (!event.target.value)
|
|
70869
|
+
return;
|
|
70870
|
+
setFile(event.target.value);
|
|
70871
|
+
};
|
|
70872
|
+
const handleUpload = async () => {
|
|
70873
|
+
try {
|
|
70874
|
+
if (!file)
|
|
70875
|
+
return;
|
|
70876
|
+
setFetching(true);
|
|
70877
|
+
const data = await onUpload(prompt, file);
|
|
70878
|
+
setFetching(false);
|
|
70879
|
+
if (data) {
|
|
70880
|
+
onComplete(data);
|
|
70881
|
+
} else {
|
|
70882
|
+
onFailed == null ? void 0 : onFailed();
|
|
70883
|
+
}
|
|
70884
|
+
} catch (error2) {
|
|
70885
|
+
setFetching(false);
|
|
70886
|
+
onError3 == null ? void 0 : onError3(error2);
|
|
70887
|
+
}
|
|
70888
|
+
};
|
|
70889
|
+
const onConfirm = () => {
|
|
70890
|
+
handleUpload();
|
|
70891
|
+
};
|
|
70892
|
+
const onClose = () => {
|
|
70893
|
+
onCloseModal();
|
|
70894
|
+
};
|
|
70895
|
+
const content2 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
70896
|
+
/* @__PURE__ */ jsx(Text, { children: dialogText || "Upload file and extract data using a LLM" }),
|
|
70897
|
+
/* @__PURE__ */ jsx(Spacer, {}),
|
|
70898
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "var(--padding-sm)", children: [
|
|
70899
|
+
/* @__PURE__ */ jsx(
|
|
70900
|
+
FileInput,
|
|
70901
|
+
{
|
|
70902
|
+
placeholder: fileInputPlaceholder || "No file",
|
|
70903
|
+
label: fileInputText || "Select",
|
|
70904
|
+
file: file || void 0,
|
|
70905
|
+
onChange: handleFileChange,
|
|
70906
|
+
testId: `${testId}-file-input`,
|
|
70907
|
+
accept: "image/*"
|
|
70908
|
+
}
|
|
70909
|
+
),
|
|
70910
|
+
isFetching && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Spinner$1, { dark: true }) })
|
|
70911
|
+
] })
|
|
70912
|
+
] });
|
|
70913
|
+
const footer2 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
70914
|
+
/* @__PURE__ */ jsx(
|
|
70915
|
+
Button$1,
|
|
70916
|
+
{
|
|
70917
|
+
label: uploadText || "Upload",
|
|
70918
|
+
colored: true,
|
|
70919
|
+
onClick: onConfirm,
|
|
70920
|
+
disabled: !file || isFetching,
|
|
70921
|
+
testId: `${testId}-button-upload`
|
|
70922
|
+
}
|
|
70923
|
+
),
|
|
70924
|
+
/* @__PURE__ */ jsx(
|
|
70925
|
+
Button$1,
|
|
70926
|
+
{
|
|
70927
|
+
label: cancelText || "Cancel",
|
|
70928
|
+
onClick: onClose,
|
|
70929
|
+
testId: `${testId}-button-cancel`
|
|
70930
|
+
}
|
|
70931
|
+
)
|
|
70932
|
+
] });
|
|
70933
|
+
useKeyboardEvent("Escape", () => onClose());
|
|
70934
|
+
return /* @__PURE__ */ jsx(Modal, { visible, centered: true, children: /* @__PURE__ */ jsx(
|
|
70935
|
+
Dialog,
|
|
70936
|
+
{
|
|
70937
|
+
dialog: {
|
|
70938
|
+
scroll: true,
|
|
70939
|
+
heading: heading2 || "Smart Upload",
|
|
70940
|
+
content: content2,
|
|
70941
|
+
footer: footer2,
|
|
70942
|
+
onClose,
|
|
70943
|
+
width: width2 || 350,
|
|
70944
|
+
testId
|
|
70945
|
+
}
|
|
70946
|
+
}
|
|
70947
|
+
) });
|
|
70948
|
+
};
|
|
70845
70949
|
export {
|
|
70846
70950
|
Accordion,
|
|
70847
70951
|
AccordionWithDefaultToggle,
|
|
@@ -70906,6 +71010,7 @@ export {
|
|
|
70906
71010
|
Select,
|
|
70907
71011
|
SideBar,
|
|
70908
71012
|
Slider,
|
|
71013
|
+
SmartUploadModal,
|
|
70909
71014
|
Spacer,
|
|
70910
71015
|
Spinner$1 as Spinner,
|
|
70911
71016
|
Table,
|