@oliasoft-open-source/react-ui-library 4.7.2-beta-7 → 4.7.2-beta-9
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-zmbFJmOv.js → index-D5kcnHmD.js} +182 -702
- package/dist/assets/{index-gESxyZjr.css → index-Oe0PlEED.css} +0 -35
- package/dist/index.d.ts +1 -5
- package/dist/index.html +1 -1
- package/dist/index.js +3 -26
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-KGDBMAHA-Cvq3XQg3.js → Color-KGDBMAHA-q-P5APaO.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-PKQXORMH-Copxu6Si.js → DocsRenderer-PKQXORMH-D3Cy2r_Z.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-BHLN948A.js → buttons-and-links-caWZb4X6.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-C3Nc_Hl_.js → chunk-HLWAVYOI-PihY4p8L.js} +1 -1
- package/dist/storybook/assets/{color-ClG_lSfj.js → color-DVJ4PKqw.js} +1 -1
- package/dist/storybook/assets/{iframe-ud1XJtGn.js → iframe-MGOUznuN.js} +2 -2
- package/dist/storybook/assets/{index-q5GJvRDd.js → index-Br4CWgtc.js} +1 -1
- package/dist/storybook/assets/{index-BwF95xBr.js → index-W0dVTpIv.js} +4 -4
- package/dist/storybook/assets/{input-validation-CvKyplhN.js → input-validation-CbAszrvQ.js} +1 -1
- package/dist/storybook/assets/{inputs-DhUf5Lzj.js → inputs-BcVLXteo.js} +1 -1
- package/dist/storybook/assets/{layout-forms-NapA4Ibs.js → layout-forms-l-XDMkfI.js} +1 -1
- package/dist/storybook/assets/{layout-general-CnLft8nK.js → layout-general-DL0Q90Ai.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-J82LpJ4b.js → padding-and-spacing-B2-WaM9r.js} +1 -1
- package/dist/storybook/assets/{preview-CM5CE7B2.js → preview-Duk5kU8o.js} +1 -1
- package/dist/storybook/assets/{preview-CJK2YTz-.js → preview-Eh31roT5.js} +2 -2
- package/dist/storybook/assets/{unit-input.stories-BzMia-WR.js → unit-input.stories-RF3UHFxA.js} +31 -31
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +4 -1
|
@@ -2182,13 +2182,6 @@ html[data-theme='dark'] {
|
|
|
2182
2182
|
._right_khmhl_96 ._resizeHandle_khmhl_235 {
|
|
2183
2183
|
left: 0;
|
|
2184
2184
|
}
|
|
2185
|
-
._inputGroup_biuoa_1 {
|
|
2186
|
-
display: flex;
|
|
2187
|
-
max-width: 100%;
|
|
2188
|
-
}
|
|
2189
|
-
._inputGroup_biuoa_1 > *:not(:last-child) {
|
|
2190
|
-
margin-right: -1px;
|
|
2191
|
-
}
|
|
2192
2185
|
._inputInTable_jnwnh_1 {
|
|
2193
2186
|
background-color: transparent;
|
|
2194
2187
|
border-radius: inherit !important;
|
|
@@ -2376,31 +2369,6 @@ html[data-theme='dark'] {
|
|
|
2376
2369
|
border-top-left-radius: 0 !important;
|
|
2377
2370
|
border-bottom-left-radius: 0 !important;
|
|
2378
2371
|
}
|
|
2379
|
-
._addon_b4w53_1 {
|
|
2380
|
-
flex-shrink: 0;
|
|
2381
|
-
border-radius: var(--border-radius);
|
|
2382
|
-
border: 1px solid var(--color-border);
|
|
2383
|
-
background: var(--color-background-disabled);
|
|
2384
|
-
display: inline-flex;
|
|
2385
|
-
align-items: center;
|
|
2386
|
-
padding: 0 var(--padding-input-x);
|
|
2387
|
-
color: var(--color-text-muted);
|
|
2388
|
-
line-height: 1;
|
|
2389
|
-
}
|
|
2390
|
-
._small_b4w53_12 {
|
|
2391
|
-
font-size: var(--font-size-sm);
|
|
2392
|
-
padding: 0 var(--padding-input-sm-x);
|
|
2393
|
-
}
|
|
2394
|
-
._groupOrderFirst_b4w53_16,
|
|
2395
|
-
._groupOrderMiddle_b4w53_17 {
|
|
2396
|
-
border-top-right-radius: 0 !important;
|
|
2397
|
-
border-bottom-right-radius: 0 !important;
|
|
2398
|
-
}
|
|
2399
|
-
._groupOrderLast_b4w53_21,
|
|
2400
|
-
._groupOrderMiddle_b4w53_17 {
|
|
2401
|
-
border-top-left-radius: 0 !important;
|
|
2402
|
-
border-bottom-left-radius: 0 !important;
|
|
2403
|
-
}
|
|
2404
2372
|
._inputInTable_tn20e_1 {
|
|
2405
2373
|
background-color: transparent;
|
|
2406
2374
|
border-radius: inherit !important;
|
|
@@ -8821,9 +8789,6 @@ button:active .remirror-menu-pane-shortcut,
|
|
|
8821
8789
|
z-index: var(--zindex-topbar-alert);
|
|
8822
8790
|
padding: var(--padding-sm);
|
|
8823
8791
|
}
|
|
8824
|
-
._predefinedMenuActive_1yvt4_1 input {
|
|
8825
|
-
background: var(--color-background-disabled) !important;
|
|
8826
|
-
}
|
|
8827
8792
|
._link_q42rz_1 a {
|
|
8828
8793
|
display: flex;
|
|
8829
8794
|
justify-content: center;
|
package/dist/index.d.ts
CHANGED
|
@@ -866,8 +866,6 @@ export declare interface INativeSelectProps {
|
|
|
866
866
|
maxTooltipWidth?: TStringOrNumber;
|
|
867
867
|
}
|
|
868
868
|
|
|
869
|
-
export declare const initializeContext: (value: UnitContextType) => void;
|
|
870
|
-
|
|
871
869
|
export declare const Input: default_2.ForwardRefExoticComponent<IInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
872
870
|
|
|
873
871
|
export declare const InputGroup: ({ children, small, width, }: IInputGroupProps) => ReactElement;
|
|
@@ -1854,9 +1852,7 @@ export declare type TTriggerType = 'Text' | 'Button' | 'DropDownButton' | 'Compo
|
|
|
1854
1852
|
|
|
1855
1853
|
declare type TUnitTableCellShape = TCellShape | IUnitTableStaticCell | IUnitTableInputCell | IUnitTableNumberInputCell;
|
|
1856
1854
|
|
|
1857
|
-
declare
|
|
1858
|
-
|
|
1859
|
-
export declare const UnitInput: any;
|
|
1855
|
+
export declare const UnitInput: ({ name, placeholder, disabled, disabledUnit, error, left, small, width, value, unitkey, initUnit, noConversion, onChange, onClick, onFocus, onSwitchUnit, unitTemplate, doNotConvertValue, testId, warning, predefinedOptions, initialPredefinedOption, shouldLinkAutomaticly, selectedPredefinedOptionKey, validationCallback, disabledValidation, allowEmpty, autoValue, }: IUnitInputProps) => JSX_2.Element;
|
|
1860
1856
|
|
|
1861
1857
|
export declare const UnitTable: ({ table, unitConfig, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, }: IUnitTableProps) => JSX_2.Element;
|
|
1862
1858
|
|
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-D5kcnHmD.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-Oe0PlEED.css"></head><body><div id="content"></div></body>
|
package/dist/index.js
CHANGED
|
@@ -70026,7 +70026,7 @@ const getPreferredUnit = (unitkey, unitTemplate) => {
|
|
|
70026
70026
|
const preferredUnit = unitTemplate == null ? void 0 : unitTemplate[unitkey];
|
|
70027
70027
|
if (!preferredUnit) {
|
|
70028
70028
|
console.log(
|
|
70029
|
-
`Warning: 'unitTemplate'
|
|
70029
|
+
`Warning: 'unitTemplate' does not define a preferred unit for '${unitkey}'. Defaulting to standard unit.`
|
|
70030
70030
|
);
|
|
70031
70031
|
return unitFromQuantity(unitkey) ?? "";
|
|
70032
70032
|
}
|
|
@@ -70124,30 +70124,11 @@ const isKnownUnit = (valueWithUnit, defaultUnit) => {
|
|
|
70124
70124
|
const unitFromValue = getUnit(valueWithUnit || "");
|
|
70125
70125
|
return isUnitKnown(defaultUnit) && isUnitKnown(unitFromValue);
|
|
70126
70126
|
};
|
|
70127
|
-
const UnitContext = createContext(null);
|
|
70128
|
-
const UnitContextProvider = ({ children, value }) => {
|
|
70129
|
-
return /* @__PURE__ */ jsx(UnitContext.Provider, { value, children });
|
|
70130
|
-
};
|
|
70131
|
-
let isInitialized = false;
|
|
70132
|
-
let providedValue = null;
|
|
70133
|
-
const initializeContext = (value) => {
|
|
70134
|
-
if (!isInitialized) {
|
|
70135
|
-
providedValue = value;
|
|
70136
|
-
isInitialized = true;
|
|
70137
|
-
}
|
|
70138
|
-
};
|
|
70139
|
-
const WithUnitContext = ({ children }) => {
|
|
70140
|
-
if (!isInitialized) {
|
|
70141
|
-
console.log("Context not initialized. Call initializeContext first.");
|
|
70142
|
-
return children;
|
|
70143
|
-
}
|
|
70144
|
-
return /* @__PURE__ */ jsx(UnitContextProvider, { value: providedValue, children });
|
|
70145
|
-
};
|
|
70146
70127
|
const predefinedMenuActive = "_predefinedMenuActive_1yvt4_1";
|
|
70147
70128
|
const styles = {
|
|
70148
70129
|
predefinedMenuActive
|
|
70149
70130
|
};
|
|
70150
|
-
const
|
|
70131
|
+
const UnitInput = ({
|
|
70151
70132
|
name: name2,
|
|
70152
70133
|
placeholder: placeholder3 = "",
|
|
70153
70134
|
disabled: disabled2 = false,
|
|
@@ -70184,8 +70165,6 @@ const UnitInputComponent = ({
|
|
|
70184
70165
|
if (typeof value === "number") {
|
|
70185
70166
|
value = `${value}`;
|
|
70186
70167
|
}
|
|
70187
|
-
const context2 = useContext(UnitContext);
|
|
70188
|
-
console.log("context in component ->>>>", context2);
|
|
70189
70168
|
const runAfterUpdate = useRunAfterUpdate();
|
|
70190
70169
|
const [propValue = "", propUnit = ""] = value !== void 0 ? split$1(value) : [];
|
|
70191
70170
|
const propAutoUnit = autoValue ? getUnit(autoValue) : "";
|
|
@@ -70194,7 +70173,7 @@ const UnitInputComponent = ({
|
|
|
70194
70173
|
[unitkey, unitTemplate]
|
|
70195
70174
|
);
|
|
70196
70175
|
const knownUnit = isKnownUnit(value, defaultUnit);
|
|
70197
|
-
const initDisplayUnit = initUnit ||
|
|
70176
|
+
const initDisplayUnit = initUnit || defaultUnit || propUnit;
|
|
70198
70177
|
const previousInitUnit = usePrevious(initDisplayUnit);
|
|
70199
70178
|
const convertedValue = safeConvertValue(
|
|
70200
70179
|
value,
|
|
@@ -70469,7 +70448,6 @@ const UnitInputComponent = ({
|
|
|
70469
70448
|
}
|
|
70470
70449
|
);
|
|
70471
70450
|
};
|
|
70472
|
-
const UnitInput = WithUnitContext(UnitInputComponent);
|
|
70473
70451
|
const normalizeUnits = (unitConfig) => unitConfig.reduce(
|
|
70474
70452
|
({ preferredUnits, storageUnits }, { unitKey, preferredUnit, storageUnit }) => {
|
|
70475
70453
|
preferredUnits[unitKey] = preferredUnit;
|
|
@@ -70864,7 +70842,6 @@ export {
|
|
|
70864
70842
|
UnitInput,
|
|
70865
70843
|
UnitTable,
|
|
70866
70844
|
dismissToast,
|
|
70867
|
-
initializeContext,
|
|
70868
70845
|
readFile,
|
|
70869
70846
|
toast,
|
|
70870
70847
|
useFocus,
|