@oliasoft-open-source/react-ui-library 4.11.3-beta-1 → 4.11.3-beta-2

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.
Files changed (42) hide show
  1. package/dist/global.css +14 -12
  2. package/dist/index.js +23 -27
  3. package/dist/index.js.map +1 -1
  4. package/dist/storybook/assets/{Color-KGDBMAHA-CVfcYPDh.js → Color-KGDBMAHA-Bnj89L-A.js} +1 -1
  5. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-1O1Zelxh.js → DocsRenderer-PKQXORMH-QUJl5DIT.js} +1 -1
  6. package/dist/storybook/assets/{accordion.stories-CrmHu75y.js → accordion.stories-BlHfHegj.js} +1 -1
  7. package/dist/storybook/assets/{buttons-and-links-BvCZJvQD.js → buttons-and-links-CzMplQyX.js} +1 -1
  8. package/dist/storybook/assets/{casing-loads.stories-Buy0-e_n.js → casing-loads.stories-Cl2tJipP.js} +1 -1
  9. package/dist/storybook/assets/{cell.stories-CPNfDo9l.js → cell.stories-rzJE_qJC.js} +1 -1
  10. package/dist/storybook/assets/{chunk-HLWAVYOI-Bu5L94Yn.js → chunk-HLWAVYOI-BzjfwAFt.js} +1 -1
  11. package/dist/storybook/assets/{color-D0thaFHZ.js → color-DMI_LL9Y.js} +1 -1
  12. package/dist/storybook/assets/{footer.stories-DniqHrTZ.js → footer.stories-C6M5S0UZ.js} +1 -1
  13. package/dist/storybook/assets/{form.stories-Cr5Pz40F.js → form.stories-BNORsn6Z.js} +1 -1
  14. package/dist/storybook/assets/{formation.stories-C4Kugh7C.js → formation.stories-1WX1Nu1P.js} +1 -1
  15. package/dist/storybook/assets/{iframe-Cn4QVbiy.js → iframe-D7uA6LlZ.js} +2 -2
  16. package/dist/storybook/assets/{index-CfBxZnsn.js → index-BL00YxVv.js} +1 -1
  17. package/dist/storybook/assets/{index-Cx-3RPzA.js → index-CDbixbhF.js} +4 -4
  18. package/dist/storybook/assets/{input-validation-C046WlGw.js → input-validation-D-Ft5BCF.js} +1 -1
  19. package/dist/storybook/assets/{inputs-DIaRB9Nh.js → inputs-cQ55JAoI.js} +1 -1
  20. package/dist/storybook/assets/{layout-forms-BREoLLKy.js → layout-forms-Bvrdok9B.js} +1 -1
  21. package/dist/storybook/assets/{layout-general-KLtje0tK.js → layout-general-Cg0gSZB3.js} +1 -1
  22. package/dist/storybook/assets/{padding-and-spacing-DuJmv7ET.js → padding-and-spacing-DDAtfb-b.js} +1 -1
  23. package/dist/storybook/assets/{preview-_lzSilWy.js → preview-CUJNe5HT.js} +1 -1
  24. package/dist/storybook/assets/{preview-C2U0eSUR.js → preview-Rrrgw5d3.js} +2 -2
  25. package/dist/storybook/assets/{row.stories-jKh8Ms1e.js → row.stories-DRvH8Grn.js} +1 -1
  26. package/dist/storybook/assets/{slider-DxaD8LU4.js → slider-CcpE4BLD.js} +4 -4
  27. package/dist/storybook/assets/{slider-DPdTVMP0.css → slider-DnRddBCy.css} +1 -1
  28. package/dist/storybook/assets/slider.stories-BqlRLY_C.js +171 -0
  29. package/dist/storybook/assets/{table-BSABGfWm.js → table-DoyDBG6l.js} +1 -1
  30. package/dist/storybook/assets/{table.stories-CHwzAdud.js → table.stories-BgWKzIob.js} +1 -1
  31. package/dist/storybook/assets/{title.stories-D0VjujmM.js → title.stories-Rv6ZO_Wl.js} +1 -1
  32. package/dist/storybook/assets/unit-input-C07ZKMj5.js +10 -0
  33. package/dist/storybook/assets/{unit-input.stories-Btz2M_TP.js → unit-input.stories-BP03WTYV.js} +1 -1
  34. package/dist/storybook/assets/{unit-input.test-case.stories-CZD1jf36.js → unit-input.test-case.stories-D9PyN8YI.js} +1 -1
  35. package/dist/storybook/assets/{unit-table.stories-DwZVHcZo.js → unit-table.stories-CISvZMxX.js} +1 -1
  36. package/dist/storybook/assets/{unit-table.test-case.stories-C9Swzooe.js → unit-table.test-case.stories-tEype9om.js} +1 -1
  37. package/dist/storybook/iframe.html +1 -1
  38. package/dist/storybook/index.json +1 -1
  39. package/dist/storybook/project.json +1 -1
  40. package/package.json +1 -1
  41. package/dist/storybook/assets/slider.stories-DuGie_AX.js +0 -134
  42. package/dist/storybook/assets/unit-input-BXg4VphV.js +0 -10
package/dist/global.css CHANGED
@@ -9395,8 +9395,11 @@ button:active .remirror-menu-pane-shortcut,
9395
9395
  .rc-slider .rc-slider-handle {
9396
9396
  opacity: 1;
9397
9397
  }
9398
- .rc-slider .rc-slider-mark {
9399
- top: 0;
9398
+ .rc-slider .rc-slider-mark-text {
9399
+ color: var(--color-text-faint);
9400
+ }
9401
+ .rc-slider .rc-slider-mark-text-active {
9402
+ color: var(--color-text-muted);
9400
9403
  }
9401
9404
  .rc-slider-disabled {
9402
9405
  background-color: transparent !important;
@@ -9406,27 +9409,30 @@ button:active .remirror-menu-pane-shortcut,
9406
9409
  .rc-slider-disabled .rc-slider-dot {
9407
9410
  cursor: default !important;
9408
9411
  }
9409
- ._container_1bhdk_1 {
9412
+ ._container_1a936_1 {
9410
9413
  display: flex;
9411
9414
  align-items: center;
9412
9415
  min-height: var(--size);
9413
9416
  gap: 4px;
9414
9417
  }
9415
- ._container_1bhdk_1._small_1bhdk_7 {
9418
+ ._container_1a936_1._small_1a936_7 {
9416
9419
  min-height: var(--size-sm);
9417
9420
  }
9418
- ._container_1bhdk_1._vertical_1bhdk_10 {
9421
+ ._container_1a936_1._hasMarks_1a936_10 {
9422
+ padding-bottom: 20px;
9423
+ }
9424
+ ._container_1a936_1._vertical_1a936_13 {
9419
9425
  flex-direction: column;
9420
9426
  padding-bottom: 0;
9421
9427
  }
9422
- ._container_1bhdk_1._vertical_1bhdk_10 ._hasArrows_1bhdk_14 {
9428
+ ._container_1a936_1._vertical_1a936_13 ._hasArrows_1a936_17 {
9423
9429
  margin-top: 5px;
9424
9430
  margin-bottom: 5px;
9425
9431
  }
9426
- ._container_1bhdk_1._vertical_1bhdk_10 ._button_1bhdk_18 svg {
9432
+ ._container_1a936_1._vertical_1a936_13 ._button_1a936_21 svg {
9427
9433
  transform: rotate(-90deg);
9428
9434
  }
9429
- ._label_1bhdk_21 {
9435
+ ._label_1a936_24 {
9430
9436
  white-space: nowrap;
9431
9437
  margin-left: var(--padding-xs);
9432
9438
  line-height: 1;
@@ -9434,10 +9440,6 @@ button:active .remirror-menu-pane-shortcut,
9434
9440
  text-overflow: ellipsis;
9435
9441
  flex-shrink: 0;
9436
9442
  }
9437
- ._dot_1bhdk_29 {
9438
- width: 8px;
9439
- height: 14px;
9440
- }
9441
9443
  ._inputInTable_1dg3w_1 {
9442
9444
  background-color: transparent;
9443
9445
  border-radius: inherit !important;
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import * as PropTypes from "prop-types";
16
16
  import PropTypes__default from "prop-types";
17
17
  import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
18
18
  import { noop as noop$3, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isEqual as isEqual$4 } from "lodash";
19
- import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, roundToFixed, validateNumber, cleanNumStr, stripLeadingZeros, unitFromQuantity, getUnit, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, KNOWN_UNITS, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
19
+ import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, roundToFixed, validateNumber, cleanNumStr, stripLeadingZeros, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
20
20
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
21
21
  function getDefaultExportFromCjs(x2) {
22
22
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -4494,7 +4494,7 @@ const label$9 = "_label_nwprz_11";
4494
4494
  const dark = "_dark_nwprz_23";
4495
4495
  const light = "_light_nwprz_26";
4496
4496
  const small$b = "_small_nwprz_29";
4497
- const dot$1 = "_dot_nwprz_33";
4497
+ const dot = "_dot_nwprz_33";
4498
4498
  const hasChildren = "_hasChildren_nwprz_39";
4499
4499
  const styles$K = {
4500
4500
  wrapper: wrapper$3,
@@ -4503,7 +4503,7 @@ const styles$K = {
4503
4503
  dark,
4504
4504
  light,
4505
4505
  small: small$b,
4506
- dot: dot$1,
4506
+ dot,
4507
4507
  hasChildren
4508
4508
  };
4509
4509
  const isDark = (hexColor) => {
@@ -55158,35 +55158,27 @@ if (process.env.NODE_ENV !== "production") {
55158
55158
  }
55159
55159
  var _default = Handle;
55160
55160
  default_1 = Handle$1.default = _default;
55161
- const container = "_container_1bhdk_1";
55162
- const small$2 = "_small_1bhdk_7";
55163
- const vertical = "_vertical_1bhdk_10";
55164
- const hasArrows = "_hasArrows_1bhdk_14";
55165
- const button$1 = "_button_1bhdk_18";
55166
- const label$1 = "_label_1bhdk_21";
55167
- const dot = "_dot_1bhdk_29";
55161
+ const container = "_container_1a936_1";
55162
+ const small$2 = "_small_1a936_7";
55163
+ const hasMarks = "_hasMarks_1a936_10";
55164
+ const vertical = "_vertical_1a936_13";
55165
+ const hasArrows = "_hasArrows_1a936_17";
55166
+ const button$1 = "_button_1a936_21";
55167
+ const label$1 = "_label_1a936_24";
55168
55168
  const styles$c = {
55169
55169
  container,
55170
55170
  small: small$2,
55171
+ hasMarks,
55171
55172
  vertical,
55172
55173
  hasArrows,
55173
55174
  button: button$1,
55174
- label: label$1,
55175
- dot
55175
+ label: label$1
55176
55176
  };
55177
55177
  const formatMarkers = (marks) => {
55178
55178
  return marks.reduce((acc, { label: label2, tooltip: tooltip2, value }) => {
55179
- acc[value] = /* @__PURE__ */ jsx(
55180
- Tooltip,
55181
- {
55182
- text: /* @__PURE__ */ jsxs(Fragment$1, { children: [
55183
- tooltip2,
55184
- tooltip2 ? ": " : "",
55185
- label2 ?? value
55186
- ] }),
55187
- children: /* @__PURE__ */ jsx("div", { className: styles$c.dot })
55188
- }
55189
- );
55179
+ const isTooltip = tooltip2 !== void 0;
55180
+ const formattedValue = isTooltip ? /* @__PURE__ */ jsx(Tooltip, { text: tooltip2, children: label2 }) : label2 || value;
55181
+ acc[value] = formattedValue;
55190
55182
  return acc;
55191
55183
  }, {});
55192
55184
  };
@@ -55263,7 +55255,8 @@ const Slider = ({
55263
55255
  className: cx$2(
55264
55256
  styles$c.container,
55265
55257
  small2 ? styles$c.small : "",
55266
- vertical2.enabled ? styles$c.vertical : ""
55258
+ vertical2.enabled ? styles$c.vertical : "",
55259
+ !isEmpty(marks) ? styles$c.hasMarks : ""
55267
55260
  ),
55268
55261
  style: vertical2.enabled ? { width: vertical2.width, height: vertical2.height } : { width: width2 },
55269
55262
  children: [
@@ -70149,7 +70142,8 @@ const isWrongValue = (val) => {
70149
70142
  };
70150
70143
  const isValueWithUnknownUnit = (value) => {
70151
70144
  if (!value) return false;
70152
- return Boolean(getUnit(value));
70145
+ const unit2 = getUnit(value);
70146
+ return !KNOWN_UNITS.includes(unit2);
70153
70147
  };
70154
70148
  const checkConversion = ({
70155
70149
  value,
@@ -70213,13 +70207,15 @@ const safeConvertValue = ({
70213
70207
  defaultFromUnit,
70214
70208
  doNotConvertValue
70215
70209
  }) => {
70216
- const isWithUnit = isValueWithUnknownUnit(value) || isValueWithUnit(value);
70217
70210
  const rawValue = getValue$1(value);
70218
70211
  const isInvalidInput = isWrongValue(rawValue);
70212
+ if (isValueWithUnknownUnit(value)) {
70213
+ return { value: rawValue };
70214
+ }
70219
70215
  if (isInvalidInput) {
70220
70216
  return { value: rawValue };
70221
70217
  }
70222
- if (!isWithUnit) {
70218
+ if (!isValueWithUnit(value)) {
70223
70219
  return { value };
70224
70220
  }
70225
70221
  return convertUnit({