@nulogy/components 13.1.4 → 13.1.5

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/main.js CHANGED
@@ -23892,6 +23892,14 @@
23892
23892
  }), /*#__PURE__*/React__default["default"].createElement(Wrapper, null, errorMessage && /*#__PURE__*/React__default["default"].createElement(Text, null, errorMessage), mapErrorsToList(errorList), children)) : null;
23893
23893
  }
23894
23894
 
23895
+ /**
23896
+ * Returns the number from a [CSS dimension]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/dimension}.
23897
+ * @param {string} dimension - A css dimension
23898
+ */
23899
+ function numberFromDimension (dimension) {
23900
+ return parseInt(String(dimension), 10);
23901
+ }
23902
+
23895
23903
  var getBorderColor = function getBorderColor(_ref) {
23896
23904
  var errored = _ref.errored,
23897
23905
  disabled = _ref.disabled,
@@ -24143,7 +24151,7 @@
24143
24151
  return Object.assign(Object.assign({}, provided), {
24144
24152
  minWidth: "fit-content",
24145
24153
  padding: 0,
24146
- maxHeight: parseInt(maxHeight, 10),
24154
+ maxHeight: numberFromDimension(maxHeight),
24147
24155
  borderRadius: theme.radii.medium,
24148
24156
  marginTop: windowed ? "-4px" : 0,
24149
24157
  marginBottom: windowed ? "-4px" : 0
@@ -27758,14 +27766,6 @@
27758
27766
  }))))))));
27759
27767
  }
27760
27768
 
27761
- /**
27762
- * Returns the number from a [CSS dimension]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/dimension}.
27763
- * @param {string} dimension - A css dimension
27764
- */
27765
- function numberFromDimension (dimension) {
27766
- return parseInt(String(dimension), 10);
27767
- }
27768
-
27769
27769
  var getMenuMargin = function getMenuMargin(placement, showArrow) {
27770
27770
  var direction = String(placement).split("-")[0];
27771
27771
 
@@ -52996,12 +52996,10 @@
52996
52996
  }
52997
52997
 
52998
52998
  var NDSSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
52999
- var autocomplete = _a.autocomplete,
53000
- value = _a.value,
52999
+ var value = _a.value,
53001
53000
  _onChange = _a.onChange,
53002
53001
  defaultValue = _a.defaultValue,
53003
53002
  labelText = _a.labelText,
53004
- required = _a.required,
53005
53003
  requirementText = _a.requirementText,
53006
53004
  helpText = _a.helpText,
53007
53005
  disabled = _a.disabled,
@@ -53009,14 +53007,28 @@
53009
53007
  errorList = _a.errorList,
53010
53008
  id = _a.id,
53011
53009
  initialIsOpen = _a.initialIsOpen,
53012
- maxHeight = _a.maxHeight,
53013
53010
  multiselect = _a.multiselect,
53014
53011
  placeholder = _a.placeholder,
53015
53012
  components = _a.components,
53016
- windowThreshold = _a.windowThreshold,
53017
53013
  options = _a.options,
53018
53014
  styles = _a.styles,
53019
- props = __rest$3(_a, ["autocomplete", "value", "onChange", "defaultValue", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "id", "initialIsOpen", "maxHeight", "multiselect", "placeholder", "components", "windowThreshold", "options", "styles"]);
53015
+ _a$windowThreshold = _a.windowThreshold,
53016
+ windowThreshold = _a$windowThreshold === void 0 ? 300 : _a$windowThreshold,
53017
+ _a$autocomplete = _a.autocomplete,
53018
+ autocomplete = _a$autocomplete === void 0 ? true : _a$autocomplete,
53019
+ _a$maxHeight = _a.maxHeight,
53020
+ maxHeight = _a$maxHeight === void 0 ? "248px" : _a$maxHeight,
53021
+ _a$required = _a.required,
53022
+ required = _a$required === void 0 ? false : _a$required,
53023
+ _a$menuPosition = _a.menuPosition,
53024
+ menuPosition = _a$menuPosition === void 0 ? "absolute" : _a$menuPosition,
53025
+ _a$menuPlacement = _a.menuPlacement,
53026
+ menuPlacement = _a$menuPlacement === void 0 ? "bottom" : _a$menuPlacement,
53027
+ _a$classNamePrefix = _a.classNamePrefix,
53028
+ classNamePrefix = _a$classNamePrefix === void 0 ? "ndsSelect" : _a$classNamePrefix,
53029
+ _a$closeMenuOnSelect = _a.closeMenuOnSelect,
53030
+ closeMenuOnSelect = _a$closeMenuOnSelect === void 0 ? true : _a$closeMenuOnSelect,
53031
+ props = __rest$3(_a, ["value", "onChange", "defaultValue", "labelText", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "id", "initialIsOpen", "multiselect", "placeholder", "components", "options", "styles", "windowThreshold", "autocomplete", "maxHeight", "required", "menuPosition", "menuPlacement", "classNamePrefix", "closeMenuOnSelect"]);
53020
53032
 
53021
53033
  var _useTranslation = useTranslation(),
53022
53034
  t = _useTranslation.t;
@@ -53079,7 +53091,12 @@
53079
53091
  Input: SelectInput
53080
53092
  }, isWindowed ? {
53081
53093
  MenuList: MenuList
53082
- } : {}), components)
53094
+ } : {}), components),
53095
+ closeMenuOnSelect: closeMenuOnSelect,
53096
+ classNamePrefix: classNamePrefix,
53097
+ menuPosition: menuPosition,
53098
+ menuPlacement: menuPlacement,
53099
+ maxMenuHeight: numberFromDimension(maxHeight)
53083
53100
  }, props)), /*#__PURE__*/React__default["default"].createElement(InlineValidation, {
53084
53101
  mt: "x1",
53085
53102
  errorMessage: errorMessage,
@@ -23875,6 +23875,14 @@ function InlineValidation(_a) {
23875
23875
  }), /*#__PURE__*/React__default.createElement(Wrapper, null, errorMessage && /*#__PURE__*/React__default.createElement(Text, null, errorMessage), mapErrorsToList(errorList), children)) : null;
23876
23876
  }
23877
23877
 
23878
+ /**
23879
+ * Returns the number from a [CSS dimension]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/dimension}.
23880
+ * @param {string} dimension - A css dimension
23881
+ */
23882
+ function numberFromDimension (dimension) {
23883
+ return parseInt(String(dimension), 10);
23884
+ }
23885
+
23878
23886
  var getBorderColor = function getBorderColor(_ref) {
23879
23887
  var errored = _ref.errored,
23880
23888
  disabled = _ref.disabled,
@@ -24126,7 +24134,7 @@ var customStyles = function customStyles(_ref6) {
24126
24134
  return Object.assign(Object.assign({}, provided), {
24127
24135
  minWidth: "fit-content",
24128
24136
  padding: 0,
24129
- maxHeight: parseInt(maxHeight, 10),
24137
+ maxHeight: numberFromDimension(maxHeight),
24130
24138
  borderRadius: theme.radii.medium,
24131
24139
  marginTop: windowed ? "-4px" : 0,
24132
24140
  marginBottom: windowed ? "-4px" : 0
@@ -27741,14 +27749,6 @@ function BottomSheet(_a) {
27741
27749
  }))))))));
27742
27750
  }
27743
27751
 
27744
- /**
27745
- * Returns the number from a [CSS dimension]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/dimension}.
27746
- * @param {string} dimension - A css dimension
27747
- */
27748
- function numberFromDimension (dimension) {
27749
- return parseInt(String(dimension), 10);
27750
- }
27751
-
27752
27752
  var getMenuMargin = function getMenuMargin(placement, showArrow) {
27753
27753
  var direction = String(placement).split("-")[0];
27754
27754
 
@@ -52979,12 +52979,10 @@ function MenuItem$1(_ref4) {
52979
52979
  }
52980
52980
 
52981
52981
  var NDSSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
52982
- var autocomplete = _a.autocomplete,
52983
- value = _a.value,
52982
+ var value = _a.value,
52984
52983
  _onChange = _a.onChange,
52985
52984
  defaultValue = _a.defaultValue,
52986
52985
  labelText = _a.labelText,
52987
- required = _a.required,
52988
52986
  requirementText = _a.requirementText,
52989
52987
  helpText = _a.helpText,
52990
52988
  disabled = _a.disabled,
@@ -52992,14 +52990,28 @@ var NDSSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
52992
52990
  errorList = _a.errorList,
52993
52991
  id = _a.id,
52994
52992
  initialIsOpen = _a.initialIsOpen,
52995
- maxHeight = _a.maxHeight,
52996
52993
  multiselect = _a.multiselect,
52997
52994
  placeholder = _a.placeholder,
52998
52995
  components = _a.components,
52999
- windowThreshold = _a.windowThreshold,
53000
52996
  options = _a.options,
53001
52997
  styles = _a.styles,
53002
- props = __rest$3(_a, ["autocomplete", "value", "onChange", "defaultValue", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "id", "initialIsOpen", "maxHeight", "multiselect", "placeholder", "components", "windowThreshold", "options", "styles"]);
52998
+ _a$windowThreshold = _a.windowThreshold,
52999
+ windowThreshold = _a$windowThreshold === void 0 ? 300 : _a$windowThreshold,
53000
+ _a$autocomplete = _a.autocomplete,
53001
+ autocomplete = _a$autocomplete === void 0 ? true : _a$autocomplete,
53002
+ _a$maxHeight = _a.maxHeight,
53003
+ maxHeight = _a$maxHeight === void 0 ? "248px" : _a$maxHeight,
53004
+ _a$required = _a.required,
53005
+ required = _a$required === void 0 ? false : _a$required,
53006
+ _a$menuPosition = _a.menuPosition,
53007
+ menuPosition = _a$menuPosition === void 0 ? "absolute" : _a$menuPosition,
53008
+ _a$menuPlacement = _a.menuPlacement,
53009
+ menuPlacement = _a$menuPlacement === void 0 ? "bottom" : _a$menuPlacement,
53010
+ _a$classNamePrefix = _a.classNamePrefix,
53011
+ classNamePrefix = _a$classNamePrefix === void 0 ? "ndsSelect" : _a$classNamePrefix,
53012
+ _a$closeMenuOnSelect = _a.closeMenuOnSelect,
53013
+ closeMenuOnSelect = _a$closeMenuOnSelect === void 0 ? true : _a$closeMenuOnSelect,
53014
+ props = __rest$3(_a, ["value", "onChange", "defaultValue", "labelText", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "id", "initialIsOpen", "multiselect", "placeholder", "components", "options", "styles", "windowThreshold", "autocomplete", "maxHeight", "required", "menuPosition", "menuPlacement", "classNamePrefix", "closeMenuOnSelect"]);
53003
53015
 
53004
53016
  var _useTranslation = useTranslation(),
53005
53017
  t = _useTranslation.t;
@@ -53062,7 +53074,12 @@ var NDSSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
53062
53074
  Input: SelectInput
53063
53075
  }, isWindowed ? {
53064
53076
  MenuList: MenuList
53065
- } : {}), components)
53077
+ } : {}), components),
53078
+ closeMenuOnSelect: closeMenuOnSelect,
53079
+ classNamePrefix: classNamePrefix,
53080
+ menuPosition: menuPosition,
53081
+ menuPlacement: menuPlacement,
53082
+ maxMenuHeight: numberFromDimension(maxHeight)
53066
53083
  }, props)), /*#__PURE__*/React__default.createElement(InlineValidation, {
53067
53084
  mt: "x1",
53068
53085
  errorMessage: errorMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "13.1.4",
3
+ "version": "13.1.5",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {