@nulogy/components 13.1.4 → 13.1.6
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 +33 -16
- package/dist/main.module.js +33 -16
- package/package.json +2 -2
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:
|
|
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
|
|
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
|
-
|
|
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,
|
package/dist/main.module.js
CHANGED
|
@@ -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:
|
|
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
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "13.1.6",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"@types/react": "^17.0.39",
|
|
98
98
|
"@types/react-datepicker": "^4.1.0",
|
|
99
99
|
"@types/react-dom": "^17.0.20",
|
|
100
|
+
"@types/react-router-dom": "5.3.0",
|
|
100
101
|
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
|
101
102
|
"@typescript-eslint/parser": "^5.30.5",
|
|
102
103
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
@@ -155,7 +156,6 @@
|
|
|
155
156
|
"@reach/dialog": "0.17.0",
|
|
156
157
|
"@styled-system/prop-types": "^5.1.4",
|
|
157
158
|
"@styled-system/theme-get": "^5.1.2",
|
|
158
|
-
"@types/react-router-dom": "5.3.0",
|
|
159
159
|
"@types/react-window": "^1.8.8",
|
|
160
160
|
"@types/styled-system": "5.1.22",
|
|
161
161
|
"body-scroll-lock": "^3.1.5",
|