@oliasoft-open-source/react-ui-library 10.6.1 → 10.6.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/global.css CHANGED
@@ -1832,7 +1832,7 @@ html[data-theme='dark'] {
1832
1832
  transform-origin: 100% 0%;
1833
1833
  z-index: 3;
1834
1834
  }
1835
- ._breadcrumb_9y5ky_1 {
1835
+ ._breadcrumb_7x1qb_1 {
1836
1836
  display: flex;
1837
1837
  flex-wrap: wrap;
1838
1838
  align-items: flex-end;
@@ -1840,44 +1840,45 @@ html[data-theme='dark'] {
1840
1840
  margin: 0;
1841
1841
  padding: 0;
1842
1842
  font-size: var(--font-size-xl);
1843
+ row-gap: var(--padding-xxs);
1843
1844
  }
1844
- ._breadcrumb_9y5ky_1._small_9y5ky_10 {
1845
+ ._breadcrumb_7x1qb_1._small_7x1qb_11 {
1845
1846
  font-size: var(--font-size);
1846
1847
  }
1847
- ._breadcrumb_9y5ky_1 ._item_9y5ky_13 {
1848
+ ._breadcrumb_7x1qb_1 ._item_7x1qb_14 {
1848
1849
  display: flex;
1849
1850
  align-items: flex-end;
1850
1851
  }
1851
- ._breadcrumb_9y5ky_1 ._labelContainer_9y5ky_17 {
1852
+ ._breadcrumb_7x1qb_1 ._labelContainer_7x1qb_18 {
1852
1853
  display: inline-flex;
1853
1854
  flex-direction: column;
1854
1855
  color: var(--color-text-primary);
1855
1856
  cursor: pointer;
1856
1857
  }
1857
- ._breadcrumb_9y5ky_1 ._labelContainer_9y5ky_17:hover {
1858
+ ._breadcrumb_7x1qb_1 ._labelContainer_7x1qb_18:hover {
1858
1859
  color: var(--color-text-primary-hover);
1859
1860
  }
1860
- ._breadcrumb_9y5ky_1 ._labelContainer_9y5ky_17:active {
1861
+ ._breadcrumb_7x1qb_1 ._labelContainer_7x1qb_18:active {
1861
1862
  color: var(--color-text-primary-active);
1862
1863
  }
1863
- ._breadcrumb_9y5ky_1 ._labelContainer_9y5ky_17._active_9y5ky_29 {
1864
+ ._breadcrumb_7x1qb_1 ._labelContainer_7x1qb_18._active_7x1qb_30 {
1864
1865
  color: inherit;
1865
1866
  cursor: default;
1866
1867
  pointer-events: none;
1867
1868
  }
1868
- ._breadcrumb_9y5ky_1 ._labelContainer_9y5ky_17._disabled_9y5ky_34 {
1869
+ ._breadcrumb_7x1qb_1 ._labelContainer_7x1qb_18._disabled_7x1qb_35 {
1869
1870
  color: var(--color-text-faint);
1870
1871
  cursor: default;
1871
1872
  pointer-events: none;
1872
1873
  }
1873
- ._breadcrumb_9y5ky_1 ._labelContainer_9y5ky_17._disabled_9y5ky_34 ._title_9y5ky_39 {
1874
+ ._breadcrumb_7x1qb_1 ._labelContainer_7x1qb_18._disabled_7x1qb_35 ._title_7x1qb_40 {
1874
1875
  color: var(--color-text-faint);
1875
1876
  }
1876
- ._breadcrumb_9y5ky_1 ._title_9y5ky_39 {
1877
+ ._breadcrumb_7x1qb_1 ._title_7x1qb_40 {
1877
1878
  color: var(--color-text-muted);
1878
1879
  font-size: var(--font-size-sm);
1879
1880
  }
1880
- ._breadcrumb_9y5ky_1 ._separator_9y5ky_46 {
1881
+ ._breadcrumb_7x1qb_1 ._separator_7x1qb_47 {
1881
1882
  margin: 0 var(--padding-xs);
1882
1883
  color: var(--color-border);
1883
1884
  }
package/dist/index.js CHANGED
@@ -1703,14 +1703,14 @@ var Actions = (props) => {
1703
1703
  });
1704
1704
  };
1705
1705
  var breadcrumb_module_default = {
1706
- breadcrumb: "_breadcrumb_9y5ky_1",
1707
- small: "_small_9y5ky_10",
1708
- item: "_item_9y5ky_13",
1709
- labelContainer: "_labelContainer_9y5ky_17",
1710
- active: "_active_9y5ky_29",
1711
- disabled: "_disabled_9y5ky_34",
1712
- title: "_title_9y5ky_39",
1713
- separator: "_separator_9y5ky_46"
1706
+ breadcrumb: "_breadcrumb_7x1qb_1",
1707
+ small: "_small_7x1qb_11",
1708
+ item: "_item_7x1qb_14",
1709
+ labelContainer: "_labelContainer_7x1qb_18",
1710
+ active: "_active_7x1qb_30",
1711
+ disabled: "_disabled_7x1qb_35",
1712
+ title: "_title_7x1qb_40",
1713
+ separator: "_separator_7x1qb_47"
1714
1714
  };
1715
1715
  //#endregion
1716
1716
  //#region src/components/breadcrumb/types.ts
@@ -4833,14 +4833,20 @@ var NumberInput = ({ name, placeholder = "", disabled = false, error = false, le
4833
4833
  const stringName = getStringName$1(name);
4834
4834
  const { valid, errors } = validateInputValue(displayValue);
4835
4835
  const firstError = errors && errors.length && !disableInternalErrorValidationMessages ? errors[0] : null;
4836
- useEffect(() => {
4837
- const nextValue = cosmeticRound(toString(value));
4838
- if (toNum(displayValue) !== toNum(nextValue)) setDisplayValue(nextValue);
4839
- }, [
4836
+ const [previousInputs, setPreviousInputs] = useState({
4840
4837
  value,
4841
4838
  enableCosmeticRounding,
4842
4839
  enableDisplayRounding
4843
- ]);
4840
+ });
4841
+ if (!Object.is(previousInputs.value, value) || previousInputs.enableCosmeticRounding !== enableCosmeticRounding || previousInputs.enableDisplayRounding !== enableDisplayRounding) {
4842
+ setPreviousInputs({
4843
+ value,
4844
+ enableCosmeticRounding,
4845
+ enableDisplayRounding
4846
+ });
4847
+ const nextValue = cosmeticRound(toString(value));
4848
+ if (toNum(displayValue) !== toNum(nextValue)) setDisplayValue(nextValue);
4849
+ }
4844
4850
  useEffect(() => {
4845
4851
  if ((disableValidationOnFocus ? true : !focus) && !valid) validationCallback(stringName, firstError);
4846
4852
  else validationCallback(stringName, null);
@@ -4958,15 +4964,6 @@ var useRunAfterUpdate = () => {
4958
4964
  return runAfterUpdate;
4959
4965
  };
4960
4966
  //#endregion
4961
- //#region src/components/unit-input/hooks/use-previous.ts
4962
- var usePrevious = (value) => {
4963
- const ref = useRef(void 0);
4964
- useEffect(() => {
4965
- ref.current = value;
4966
- }, [value]);
4967
- return ref.current;
4968
- };
4969
- //#endregion
4970
4967
  //#region src/helpers/get-preferred-unit.ts
4971
4968
  /**
4972
4969
  * Retrieves the preferred unit for a given quantity from a specified unit template or defaults to a standard unit if not found.
@@ -5158,7 +5155,6 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
5158
5155
  ]);
5159
5156
  const knownUnit = isKnownUnit(value, preferredUnit);
5160
5157
  const initDisplayUnit = initUnit || preferredUnit || propUnit;
5161
- const previousInitUnit = usePrevious(initDisplayUnit);
5162
5158
  const { value: convertedValue } = safeConvertValue({
5163
5159
  value,
5164
5160
  toUnit: initDisplayUnit,
@@ -5233,11 +5229,23 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
5233
5229
  });
5234
5230
  if (onSwitchUnit) onSwitchUnit(nextUnit);
5235
5231
  };
5236
- useEffect(() => {
5232
+ const [previousInputs, setPreviousInputs] = useState({
5233
+ initDisplayUnit,
5234
+ value,
5235
+ error,
5236
+ shouldLinkAutomaticly
5237
+ });
5238
+ if (previousInputs.initDisplayUnit !== initDisplayUnit || previousInputs.value !== value || previousInputs.error !== error || previousInputs.shouldLinkAutomaticly !== shouldLinkAutomaticly) {
5239
+ setPreviousInputs({
5240
+ initDisplayUnit,
5241
+ value,
5242
+ error,
5243
+ shouldLinkAutomaticly
5244
+ });
5237
5245
  let newValue;
5238
5246
  let newUnit = "";
5239
5247
  if (initDisplayUnit) {
5240
- if (previousInitUnit !== initDisplayUnit) {
5248
+ if (previousInputs.initDisplayUnit !== initDisplayUnit) {
5241
5249
  const { value: resultValue } = safeConvertValue({
5242
5250
  value,
5243
5251
  toUnit: initDisplayUnit,
@@ -5266,6 +5274,8 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
5266
5274
  value: newValue,
5267
5275
  unit: newUnit
5268
5276
  });
5277
+ }
5278
+ useEffect(() => {
5269
5279
  if (predefinedOptions && foundPredefinedMenuOption && shouldLinkAutomaticly) setPredefinedOptionsMenuState(PredefinedOptionsMenuState.PREDEFINED);
5270
5280
  else setPredefinedOptionsMenuState(PredefinedOptionsMenuState.CUSTOM);
5271
5281
  }, [
@@ -10829,6 +10839,15 @@ var TreeTable = ({ allowParentReassignment, autoOpenActiveItems = false, canDrop
10829
10839
  });
10830
10840
  };
10831
10841
  //#endregion
10842
+ //#region src/components/unit-input/hooks/use-previous.ts
10843
+ var usePrevious = (value) => {
10844
+ const ref = useRef(void 0);
10845
+ useEffect(() => {
10846
+ ref.current = value;
10847
+ }, [value]);
10848
+ return ref.current;
10849
+ };
10850
+ //#endregion
10832
10851
  //#region src/translations/enums.ts
10833
10852
  var ConfigKeyType = Object.freeze({
10834
10853
  Translations: "translations",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "10.6.1",
3
+ "version": "10.6.3",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {