@oliasoft-open-source/react-ui-library 4.2.3-beta-2 → 4.2.3-beta-4
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/assets/{index-e2c255b3.js → index-813ecf5c.js} +7 -36
- package/dist/index.d.ts +1 -7
- package/dist/index.html +1 -1
- package/dist/index.js +18 -39
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-6VNJS4EI-2ce5af2e.js → Color-6VNJS4EI-bc563b23.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-0da6ab6e.js → DocsRenderer-NNNQARDV-11de29a4.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-4HIR6TLV-ba578862.js → WithTooltip-4HIR6TLV-67bf79ea.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-befc735f.js → accordion.stories-42418c6a.js} +1 -1
- package/dist/storybook/assets/{afe.stories-fd3b3dd5.js → afe.stories-26757d75.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-9814deea.js → buttons-and-links-e0bcbd3a.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-7135a74a.js → casing-loads.stories-f1e073d7.js} +1 -1
- package/dist/storybook/assets/{cell.stories-73db565e.js → cell.stories-8afc8edf.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-84e971fb.js → chunk-HLWAVYOI-becefbd7.js} +1 -1
- package/dist/storybook/assets/{color-886c701d.js → color-0ee88b7a.js} +1 -1
- package/dist/storybook/assets/{field.stories-f09d9510.js → field.stories-ce5bdddc.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-2b00c795.js → file-input.stories-d5228f9e.js} +1 -1
- package/dist/storybook/assets/{footer.stories-cb9b4319.js → footer.stories-2cb1e221.js} +1 -1
- package/dist/storybook/assets/{form.stories-469b1bf0.js → form.stories-ee1e9035.js} +1 -1
- package/dist/storybook/assets/{formation.stories-f3d9d325.js → formation.stories-bc6265cd.js} +1 -1
- package/dist/storybook/assets/{formatter-SWP5E3XI-300692b1.js → formatter-SWP5E3XI-977d3e58.js} +1 -1
- package/dist/storybook/assets/iframe-dded20f4.js +1 -0
- package/dist/storybook/assets/{index-af2b80fd.js → index-1d774621.js} +4 -4
- package/dist/storybook/assets/input-29097e0e.js +1 -0
- package/dist/storybook/assets/{input-group.stories-dfb154d6.js → input-group.stories-270f3d33.js} +1 -1
- package/dist/storybook/assets/{input-validation-b942a333.js → input-validation-cdc8ad3b.js} +1 -1
- package/dist/storybook/assets/{input.stories-9eef5629.js → input.stories-8245f129.js} +5 -5
- package/dist/storybook/assets/{inputs-a4e515cb.js → inputs-0ba53fa9.js} +1 -1
- package/dist/storybook/assets/{layout-forms-e02f6a9e.js → layout-forms-eb0af27e.js} +1 -1
- package/dist/storybook/assets/{layout-general-4dfd915f.js → layout-general-20700d03.js} +1 -1
- package/dist/storybook/assets/{modal.stories-320bf290.js → modal.stories-9456ab60.js} +1 -1
- package/dist/storybook/assets/{number-input-f176ca08.js → number-input-22f13747.js} +1 -1
- package/dist/storybook/assets/{number-input.stories-8a6836f4.js → number-input.stories-f2431322.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-b0b6ba6e.js → padding-and-spacing-34f59def.js} +1 -1
- package/dist/storybook/assets/{pagination-1cee6de3.js → pagination-bea6935c.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-d5817a5e.js → pagination.stories-afb40a35.js} +1 -1
- package/dist/storybook/assets/{popover.stories-b9f8439d.js → popover.stories-ae9f16bf.js} +1 -1
- package/dist/storybook/assets/{preview-0042f359.js → preview-2ff97e83.js} +1 -1
- package/dist/storybook/assets/preview-5ca5a67b.js +1 -0
- package/dist/storybook/assets/{reservoirs.stories-b1d07230.js → reservoirs.stories-bb6b15b6.js} +1 -1
- package/dist/storybook/assets/{row.stories-95a83b12.js → row.stories-627091f9.js} +1 -1
- package/dist/storybook/assets/{site.stories-bb7ecfc7.js → site.stories-e171426a.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-NMPM6SWI-3f1d798b.js → syntaxhighlighter-NMPM6SWI-0bc876dd.js} +1 -1
- package/dist/storybook/assets/{table-1d715a6a.js → table-477fba9c.js} +1 -1
- package/dist/storybook/assets/{table.stories-ea943dd3.js → table.stories-1eb7891a.js} +1 -1
- package/dist/storybook/assets/textarea-68e22391.js +1 -0
- package/dist/storybook/assets/textarea.stories-f6986d18.js +20 -0
- package/dist/storybook/assets/{title.stories-0f0c181b.js → title.stories-a94f38ac.js} +1 -1
- package/dist/storybook/assets/{unit-input.stories-22860deb.js → unit-input.stories-e291a2d0.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/stories.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/iframe-140c1ff6.js +0 -1
- package/dist/storybook/assets/input-5cef4984.js +0 -1
- package/dist/storybook/assets/preview-be75d582.js +0 -1
- package/dist/storybook/assets/textarea-d48efea2.js +0 -1
- package/dist/storybook/assets/textarea.stories-89c8afd7.js +0 -9
|
@@ -22954,43 +22954,14 @@ reactExports.forwardRef(
|
|
|
22954
22954
|
//use width instead
|
|
22955
22955
|
}, ref2) => {
|
|
22956
22956
|
const disabledContext = reactExports.useContext(DisabledContext);
|
|
22957
|
-
const
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
});
|
|
22957
|
+
const [valueState, setValueState] = reactExports.useState(value);
|
|
22958
|
+
reactExports.useEffect(() => {
|
|
22959
|
+
setValueState(value);
|
|
22960
|
+
}, [value]);
|
|
22962
22961
|
const handleChange = (e2) => {
|
|
22963
|
-
|
|
22964
|
-
const beforeEnd = e2.target.selectionEnd || 0;
|
|
22965
|
-
position2.current = {
|
|
22966
|
-
beforeStart,
|
|
22967
|
-
beforeEnd
|
|
22968
|
-
};
|
|
22962
|
+
setValueState(e2.target.value);
|
|
22969
22963
|
onChange(e2);
|
|
22970
22964
|
};
|
|
22971
|
-
reactExports.useLayoutEffect(() => {
|
|
22972
|
-
var _a;
|
|
22973
|
-
if (type2 !== "text")
|
|
22974
|
-
return;
|
|
22975
|
-
(_a = inputRef.current) == null ? void 0 : _a.setSelectionRange(
|
|
22976
|
-
position2.current.beforeStart,
|
|
22977
|
-
position2.current.beforeEnd
|
|
22978
|
-
);
|
|
22979
|
-
}, [value]);
|
|
22980
|
-
reactExports.useImperativeHandle(ref2, () => ({
|
|
22981
|
-
blur: () => {
|
|
22982
|
-
var _a;
|
|
22983
|
-
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
22984
|
-
},
|
|
22985
|
-
click: () => {
|
|
22986
|
-
var _a;
|
|
22987
|
-
(_a = inputRef.current) == null ? void 0 : _a.click();
|
|
22988
|
-
},
|
|
22989
|
-
focus: () => {
|
|
22990
|
-
var _a;
|
|
22991
|
-
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
22992
|
-
}
|
|
22993
|
-
}));
|
|
22994
22965
|
const order2 = (() => {
|
|
22995
22966
|
if (groupOrder) {
|
|
22996
22967
|
switch (groupOrder) {
|
|
@@ -23018,11 +22989,11 @@ reactExports.forwardRef(
|
|
|
23018
22989
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23019
22990
|
"input",
|
|
23020
22991
|
{
|
|
23021
|
-
ref:
|
|
22992
|
+
ref: ref2,
|
|
23022
22993
|
type: type2 || "text",
|
|
23023
22994
|
size: size2 || 20,
|
|
23024
22995
|
placeholder: placeholder2 ?? "",
|
|
23025
|
-
value:
|
|
22996
|
+
value: valueState ?? "",
|
|
23026
22997
|
onChange: handleChange,
|
|
23027
22998
|
onKeyPress,
|
|
23028
22999
|
onFocus,
|
package/dist/index.d.ts
CHANGED
|
@@ -848,7 +848,7 @@ export declare interface INativeSelectProps {
|
|
|
848
848
|
maxTooltipWidth?: TStringOrNumber;
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
-
export declare const Input: React_2.ForwardRefExoticComponent<IInputProps & React_2.RefAttributes<
|
|
851
|
+
export declare const Input: React_2.ForwardRefExoticComponent<IInputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
852
852
|
|
|
853
853
|
export declare const InputGroup: ({ children, small, width, }: IInputGroupProps) => ReactElement;
|
|
854
854
|
|
|
@@ -861,12 +861,6 @@ export declare enum InputReaderMethods {
|
|
|
861
861
|
READ_AS_BINARY_STRING = "readAsBinaryString"
|
|
862
862
|
}
|
|
863
863
|
|
|
864
|
-
declare type InputRef = {
|
|
865
|
-
blur: () => void;
|
|
866
|
-
click: () => void;
|
|
867
|
-
focus: () => void;
|
|
868
|
-
} | null;
|
|
869
|
-
|
|
870
864
|
export declare enum InputType {
|
|
871
865
|
TEXT = "text",
|
|
872
866
|
RADIO = "radio",
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-
|
|
1
|
+
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-813ecf5c.js"></script><link rel="stylesheet" href="/react-ui-library/assets/index-0d78a198.css"></head><body><div id="content"></div></body>
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key2, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
8
8
|
import * as React$4 from "react";
|
|
9
|
-
import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback as useCallback$1, createElement, forwardRef, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2,
|
|
9
|
+
import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback as useCallback$1, createElement, forwardRef, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, Component as Component$1, PureComponent, useImperativeHandle, memo, cloneElement as cloneElement$1 } from "react";
|
|
10
10
|
import * as PropTypes from "prop-types";
|
|
11
11
|
import PropTypes__default from "prop-types";
|
|
12
12
|
import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
|
|
@@ -9163,43 +9163,14 @@ const Input$1 = forwardRef(
|
|
|
9163
9163
|
//use width instead
|
|
9164
9164
|
}, ref2) => {
|
|
9165
9165
|
const disabledContext = useContext(DisabledContext);
|
|
9166
|
-
const
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
});
|
|
9166
|
+
const [valueState, setValueState] = useState(value);
|
|
9167
|
+
useEffect(() => {
|
|
9168
|
+
setValueState(value);
|
|
9169
|
+
}, [value]);
|
|
9171
9170
|
const handleChange = (e2) => {
|
|
9172
|
-
|
|
9173
|
-
const beforeEnd = e2.target.selectionEnd || 0;
|
|
9174
|
-
position3.current = {
|
|
9175
|
-
beforeStart,
|
|
9176
|
-
beforeEnd
|
|
9177
|
-
};
|
|
9171
|
+
setValueState(e2.target.value);
|
|
9178
9172
|
onChange(e2);
|
|
9179
9173
|
};
|
|
9180
|
-
useLayoutEffect$1(() => {
|
|
9181
|
-
var _a;
|
|
9182
|
-
if (type !== "text")
|
|
9183
|
-
return;
|
|
9184
|
-
(_a = inputRef.current) == null ? void 0 : _a.setSelectionRange(
|
|
9185
|
-
position3.current.beforeStart,
|
|
9186
|
-
position3.current.beforeEnd
|
|
9187
|
-
);
|
|
9188
|
-
}, [value]);
|
|
9189
|
-
useImperativeHandle(ref2, () => ({
|
|
9190
|
-
blur: () => {
|
|
9191
|
-
var _a;
|
|
9192
|
-
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
9193
|
-
},
|
|
9194
|
-
click: () => {
|
|
9195
|
-
var _a;
|
|
9196
|
-
(_a = inputRef.current) == null ? void 0 : _a.click();
|
|
9197
|
-
},
|
|
9198
|
-
focus: () => {
|
|
9199
|
-
var _a;
|
|
9200
|
-
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
9201
|
-
}
|
|
9202
|
-
}));
|
|
9203
9174
|
const order2 = (() => {
|
|
9204
9175
|
if (groupOrder) {
|
|
9205
9176
|
switch (groupOrder) {
|
|
@@ -9227,11 +9198,11 @@ const Input$1 = forwardRef(
|
|
|
9227
9198
|
children: /* @__PURE__ */ jsx(
|
|
9228
9199
|
"input",
|
|
9229
9200
|
{
|
|
9230
|
-
ref:
|
|
9201
|
+
ref: ref2,
|
|
9231
9202
|
type: type || "text",
|
|
9232
9203
|
size: size2 || 20,
|
|
9233
9204
|
placeholder: placeholder3 ?? "",
|
|
9234
|
-
value:
|
|
9205
|
+
value: valueState ?? "",
|
|
9235
9206
|
onChange: handleChange,
|
|
9236
9207
|
onKeyPress,
|
|
9237
9208
|
onFocus,
|
|
@@ -56806,6 +56777,14 @@ const TextArea = ({
|
|
|
56806
56777
|
testId
|
|
56807
56778
|
}) => {
|
|
56808
56779
|
const disabledContext = useContext(DisabledContext);
|
|
56780
|
+
const [valueState, setValueState] = useState(value);
|
|
56781
|
+
useEffect(() => {
|
|
56782
|
+
setValueState(value);
|
|
56783
|
+
}, [value]);
|
|
56784
|
+
const handleChange = (e2) => {
|
|
56785
|
+
setValueState(e2.target.value);
|
|
56786
|
+
onChange(e2);
|
|
56787
|
+
};
|
|
56809
56788
|
const textarea2 = /* @__PURE__ */ jsx(
|
|
56810
56789
|
"textarea",
|
|
56811
56790
|
{
|
|
@@ -56816,11 +56795,11 @@ const TextArea = ({
|
|
|
56816
56795
|
monospace2 ? styles$5.monospace : ""
|
|
56817
56796
|
),
|
|
56818
56797
|
name: name2,
|
|
56819
|
-
value,
|
|
56798
|
+
value: valueState,
|
|
56820
56799
|
placeholder: placeholder3,
|
|
56821
56800
|
cols,
|
|
56822
56801
|
rows,
|
|
56823
|
-
onChange,
|
|
56802
|
+
onChange: handleChange,
|
|
56824
56803
|
disabled: disabled2 || disabledContext,
|
|
56825
56804
|
onKeyPress,
|
|
56826
56805
|
onFocus,
|