@nulogy/components 12.2.0 → 12.3.0
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 +239 -30
- package/dist/main.module.js +238 -32
- package/dist/src/AsyncSelect/AsyncSelect.d.ts +2 -0
- package/dist/src/AsyncSelect/AsyncSelect.story.d.ts +3 -12
- package/dist/src/AsyncSelect/AsyncSelectComponents.d.ts +4 -1
- package/dist/src/Icon/Icon.d.ts +2 -1
- package/dist/src/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -8654,6 +8654,19 @@
|
|
|
8654
8654
|
size: ICON_SIZE_RATIO + "em"
|
|
8655
8655
|
}, props)));
|
|
8656
8656
|
}
|
|
8657
|
+
var InputIcon = styled__default["default"](Icon).withConfig({
|
|
8658
|
+
displayName: "Icon__InputIcon",
|
|
8659
|
+
componentId: "sc-150w9kl-3"
|
|
8660
|
+
})(function (_ref2) {
|
|
8661
|
+
var theme = _ref2.theme;
|
|
8662
|
+
return {
|
|
8663
|
+
position: "absolute",
|
|
8664
|
+
color: theme.colors.midGrey,
|
|
8665
|
+
bottom: "50%",
|
|
8666
|
+
transform: "translateY(50%)",
|
|
8667
|
+
pointerEvents: "none"
|
|
8668
|
+
};
|
|
8669
|
+
}, position);
|
|
8657
8670
|
|
|
8658
8671
|
var Flex = styled__default["default"](Box).withConfig({
|
|
8659
8672
|
displayName: "Flex",
|
|
@@ -24170,6 +24183,7 @@
|
|
|
24170
24183
|
error = _ref6.error,
|
|
24171
24184
|
maxHeight = _ref6.maxHeight,
|
|
24172
24185
|
windowed = _ref6.windowed,
|
|
24186
|
+
hasIcon = _ref6.hasIcon,
|
|
24173
24187
|
variant = _ref6.variant,
|
|
24174
24188
|
_ref6$hasDefaultOptio = _ref6.hasDefaultOptions,
|
|
24175
24189
|
hasDefaultOptions = _ref6$hasDefaultOptio === void 0 ? true : _ref6$hasDefaultOptio;
|
|
@@ -24185,7 +24199,7 @@
|
|
|
24185
24199
|
});
|
|
24186
24200
|
},
|
|
24187
24201
|
control: function control(provided, state) {
|
|
24188
|
-
return Object.assign(Object.assign({}, provided), {
|
|
24202
|
+
return Object.assign(Object.assign(Object.assign({}, provided), {
|
|
24189
24203
|
display: "flex",
|
|
24190
24204
|
minHeight: theme.space.x5,
|
|
24191
24205
|
paddingLeft: theme.space.x1,
|
|
@@ -24246,6 +24260,8 @@
|
|
|
24246
24260
|
theme: theme
|
|
24247
24261
|
})
|
|
24248
24262
|
}
|
|
24263
|
+
}), hasIcon && {
|
|
24264
|
+
paddingLeft: "calc(" + theme.space.x3 + " + " + theme.space.x1_5 + ")"
|
|
24249
24265
|
});
|
|
24250
24266
|
},
|
|
24251
24267
|
dropdownIndicator: function dropdownIndicator(provided) {
|
|
@@ -24507,15 +24523,22 @@
|
|
|
24507
24523
|
}, /*#__PURE__*/React__default["default"].createElement(WindowedSelect.components.Option, Object.assign({}, props), props.children));
|
|
24508
24524
|
}
|
|
24509
24525
|
|
|
24510
|
-
var SelectControl$1 = function SelectControl(
|
|
24511
|
-
|
|
24512
|
-
|
|
24526
|
+
var SelectControl$1 = function SelectControl(_a) {
|
|
24527
|
+
var iconLeft = _a.iconLeft,
|
|
24528
|
+
isFocused = _a.isFocused,
|
|
24529
|
+
children = _a.children,
|
|
24530
|
+
props = __rest$3(_a, ["iconLeft", "isFocused", "children"]);
|
|
24531
|
+
|
|
24513
24532
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24514
24533
|
"data-testid": "select-control"
|
|
24515
24534
|
}, /*#__PURE__*/React__default["default"].createElement(components.Control, Object.assign({
|
|
24516
24535
|
className: isFocused ? "nds-select--is-focused" : null,
|
|
24517
24536
|
isFocused: isFocused
|
|
24518
|
-
}, props),
|
|
24537
|
+
}, props), iconLeft && /*#__PURE__*/React__default["default"].createElement(InputIcon, {
|
|
24538
|
+
left: "x1",
|
|
24539
|
+
icon: iconLeft,
|
|
24540
|
+
size: "x3"
|
|
24541
|
+
}), children));
|
|
24519
24542
|
};
|
|
24520
24543
|
var SelectMultiValue$1 = function SelectMultiValue(props) {
|
|
24521
24544
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -24596,7 +24619,8 @@
|
|
|
24596
24619
|
loadOptions = _a.loadOptions,
|
|
24597
24620
|
isClearable = _a.isClearable,
|
|
24598
24621
|
variant = _a.variant,
|
|
24599
|
-
|
|
24622
|
+
iconLeft = _a.iconLeft,
|
|
24623
|
+
props = __rest$3(_a, ["autocomplete", "labelText", "required", "requirementText", "helpText", "noOptionsMessage", "disabled", "errorMessage", "errorList", "id", "initialIsOpen", "maxHeight", "menuPosition", "multiselect", "name", "onChange", "placeholder", "value", "defaultValue", "className", "classNamePrefix", "onBlur", "menuIsOpen", "onMenuOpen", "onMenuClose", "onInputChange", "components", "aria-label", "cacheOptions", "defaultOptions", "loadOptions", "isClearable", "variant", "iconLeft"]);
|
|
24600
24624
|
|
|
24601
24625
|
var _useTranslation = useTranslation(),
|
|
24602
24626
|
t = _useTranslation.t;
|
|
@@ -24618,6 +24642,7 @@
|
|
|
24618
24642
|
defaultInputValue: defaultValue,
|
|
24619
24643
|
placeholder: placeholder || t("start typing"),
|
|
24620
24644
|
styles: customStyles({
|
|
24645
|
+
hasIcon: Boolean(iconLeft),
|
|
24621
24646
|
theme: theme,
|
|
24622
24647
|
error: error,
|
|
24623
24648
|
maxHeight: maxHeight,
|
|
@@ -24647,7 +24672,11 @@
|
|
|
24647
24672
|
variant: componentVariant
|
|
24648
24673
|
}, props), props.children);
|
|
24649
24674
|
},
|
|
24650
|
-
Control:
|
|
24675
|
+
Control: function Control(props) {
|
|
24676
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectControl$1, Object.assign({
|
|
24677
|
+
iconLeft: iconLeft
|
|
24678
|
+
}, props), props.children);
|
|
24679
|
+
},
|
|
24651
24680
|
MultiValue: SelectMultiValue$1,
|
|
24652
24681
|
ClearIndicator: SelectClearIndicator$1,
|
|
24653
24682
|
DropdownIndicator: SelectDropdownIndicator$1,
|
|
@@ -29357,11 +29386,10 @@
|
|
|
29357
29386
|
textAlign: prefixAlignment
|
|
29358
29387
|
}), /*#__PURE__*/React__default["default"].createElement(InputWrapper, {
|
|
29359
29388
|
maxWidth: inputWidth
|
|
29360
|
-
}, iconLeft && /*#__PURE__*/React__default["default"].createElement(
|
|
29389
|
+
}, iconLeft && /*#__PURE__*/React__default["default"].createElement(InputIcon, {
|
|
29361
29390
|
left: "x1",
|
|
29362
29391
|
icon: iconLeft,
|
|
29363
|
-
size: iconLeftSize
|
|
29364
|
-
variant: variant
|
|
29392
|
+
size: iconLeftSize
|
|
29365
29393
|
}), /*#__PURE__*/React__default["default"].createElement(StyledInput, Object.assign({
|
|
29366
29394
|
paddingLeft: iconLeft ? "calc(" + theme.space[iconLeftSize] + " + " + theme.space.x1_5 + ")" : theme.space.x1,
|
|
29367
29395
|
paddingRight: iconRight ? "calc(" + theme.space[iconRightSize] + " + " + theme.space.x1_5 + ")" : theme.space.x1,
|
|
@@ -29373,11 +29401,10 @@
|
|
|
29373
29401
|
size: htmlSize,
|
|
29374
29402
|
variant: componentVariant,
|
|
29375
29403
|
inputWidth: inputWidth
|
|
29376
|
-
}, props)), iconRight && /*#__PURE__*/React__default["default"].createElement(
|
|
29404
|
+
}, props)), iconRight && /*#__PURE__*/React__default["default"].createElement(InputIcon, {
|
|
29377
29405
|
right: "x1",
|
|
29378
29406
|
icon: iconRight,
|
|
29379
|
-
size: iconRightSize
|
|
29380
|
-
variant: variant
|
|
29407
|
+
size: iconRightSize
|
|
29381
29408
|
})), /*#__PURE__*/React__default["default"].createElement(Suffix, {
|
|
29382
29409
|
suffix: suffix,
|
|
29383
29410
|
suffixWidth: suffixWidth,
|
|
@@ -29449,24 +29476,11 @@
|
|
|
29449
29476
|
theme: theme
|
|
29450
29477
|
});
|
|
29451
29478
|
}, space);
|
|
29452
|
-
var StyledInputIcon = styled__default["default"](Icon).withConfig({
|
|
29453
|
-
displayName: "InputField__StyledInputIcon",
|
|
29454
|
-
componentId: "sc-a97ghf-2"
|
|
29455
|
-
})(function (_ref4) {
|
|
29456
|
-
var theme = _ref4.theme;
|
|
29457
|
-
return {
|
|
29458
|
-
position: "absolute",
|
|
29459
|
-
color: theme.colors.midGrey,
|
|
29460
|
-
bottom: "50%",
|
|
29461
|
-
transform: "translateY(50%)",
|
|
29462
|
-
pointerEvents: "none"
|
|
29463
|
-
};
|
|
29464
|
-
}, position);
|
|
29465
29479
|
|
|
29466
|
-
var cssForState = function cssForState(
|
|
29467
|
-
var disabled =
|
|
29468
|
-
error =
|
|
29469
|
-
theme =
|
|
29480
|
+
var cssForState = function cssForState(_ref4) {
|
|
29481
|
+
var disabled = _ref4.disabled,
|
|
29482
|
+
error = _ref4.error,
|
|
29483
|
+
theme = _ref4.theme;
|
|
29470
29484
|
if (disabled) return {
|
|
29471
29485
|
color: theme.colors.midGrey,
|
|
29472
29486
|
borderColor: theme.colors.lightGrey,
|
|
@@ -45012,6 +45026,198 @@
|
|
|
45012
45026
|
}, props)));
|
|
45013
45027
|
});
|
|
45014
45028
|
|
|
45029
|
+
var DescriptionListContext = /*#__PURE__*/React__default["default"].createContext({});
|
|
45030
|
+
var useDescriptionListContext = function useDescriptionListContext() {
|
|
45031
|
+
return React__default["default"].useContext(DescriptionListContext);
|
|
45032
|
+
};
|
|
45033
|
+
function DescriptionListProvider(_a) {
|
|
45034
|
+
var children = _a.children,
|
|
45035
|
+
config = __rest$3(_a, ["children"]);
|
|
45036
|
+
|
|
45037
|
+
return /*#__PURE__*/React__default["default"].createElement(DescriptionListContext.Provider, {
|
|
45038
|
+
value: Object.assign({}, config)
|
|
45039
|
+
}, children);
|
|
45040
|
+
}
|
|
45041
|
+
|
|
45042
|
+
function DescriptionList(_ref) {
|
|
45043
|
+
var _ref$descriptionTermM = _ref.descriptionTermMaxWidth,
|
|
45044
|
+
descriptionTermMaxWidth = _ref$descriptionTermM === void 0 ? "50%" : _ref$descriptionTermM,
|
|
45045
|
+
_ref$layout = _ref.layout,
|
|
45046
|
+
layout = _ref$layout === void 0 ? "auto" : _ref$layout,
|
|
45047
|
+
_ref$showDivider = _ref.showDivider,
|
|
45048
|
+
showDivider = _ref$showDivider === void 0 ? false : _ref$showDivider,
|
|
45049
|
+
_ref$density = _ref.density,
|
|
45050
|
+
density = _ref$density === void 0 ? "medium" : _ref$density,
|
|
45051
|
+
_ref$fontSize = _ref.fontSize,
|
|
45052
|
+
fontSize = _ref$fontSize === void 0 ? "medium" : _ref$fontSize,
|
|
45053
|
+
_ref$lineHeight = _ref.lineHeight,
|
|
45054
|
+
lineHeight = _ref$lineHeight === void 0 ? "base" : _ref$lineHeight,
|
|
45055
|
+
_ref$autoLayoutBreakp = _ref.autoLayoutBreakpoint,
|
|
45056
|
+
autoLayoutBreakpoint = _ref$autoLayoutBreakp === void 0 ? "640px" : _ref$autoLayoutBreakp,
|
|
45057
|
+
children = _ref.children;
|
|
45058
|
+
return /*#__PURE__*/React__default["default"].createElement(DescriptionListProvider, {
|
|
45059
|
+
descriptionTermMaxWidth: descriptionTermMaxWidth,
|
|
45060
|
+
layout: layout,
|
|
45061
|
+
showDivider: showDivider,
|
|
45062
|
+
density: density,
|
|
45063
|
+
fontSize: fontSize,
|
|
45064
|
+
lineHeight: lineHeight,
|
|
45065
|
+
autoLayoutBreakpoint: autoLayoutBreakpoint
|
|
45066
|
+
}, /*#__PURE__*/React__default["default"].createElement(DescriptionListContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledDescriptionList, null, children)));
|
|
45067
|
+
}
|
|
45068
|
+
var DescriptionListContainer = styled__default["default"].div.withConfig({
|
|
45069
|
+
displayName: "DescriptionList__DescriptionListContainer",
|
|
45070
|
+
componentId: "sc-11s88xm-0"
|
|
45071
|
+
})({
|
|
45072
|
+
containerType: "inline-size",
|
|
45073
|
+
width: "100%"
|
|
45074
|
+
});
|
|
45075
|
+
var StyledDescriptionList = styled__default["default"].dl.withConfig({
|
|
45076
|
+
displayName: "DescriptionList__StyledDescriptionList",
|
|
45077
|
+
componentId: "sc-11s88xm-1"
|
|
45078
|
+
})(function (_ref2) {
|
|
45079
|
+
var _Object$assign;
|
|
45080
|
+
|
|
45081
|
+
var theme = _ref2.theme;
|
|
45082
|
+
|
|
45083
|
+
var _a, _b;
|
|
45084
|
+
|
|
45085
|
+
var _useDescriptionListCo = useDescriptionListContext(),
|
|
45086
|
+
descriptionTermMaxWidth = _useDescriptionListCo.descriptionTermMaxWidth,
|
|
45087
|
+
layout = _useDescriptionListCo.layout,
|
|
45088
|
+
fontSize = _useDescriptionListCo.fontSize,
|
|
45089
|
+
lineHeight = _useDescriptionListCo.lineHeight,
|
|
45090
|
+
autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint;
|
|
45091
|
+
|
|
45092
|
+
return Object.assign(Object.assign(Object.assign({
|
|
45093
|
+
margin: 0,
|
|
45094
|
+
display: "grid",
|
|
45095
|
+
fontSize: (_a = theme.fontSizes[fontSize]) !== null && _a !== void 0 ? _a : theme.fontSizes.medium,
|
|
45096
|
+
lineHeight: (_b = theme.lineHeights[lineHeight]) !== null && _b !== void 0 ? _b : theme.lineHeights.base
|
|
45097
|
+
}, layout === "inline" && {
|
|
45098
|
+
gridTemplateColumns: "minmax(0, " + descriptionTermMaxWidth + ") auto"
|
|
45099
|
+
}), (layout === "stacked" || layout === "auto") && {
|
|
45100
|
+
gridTemplateColumns: "1fr"
|
|
45101
|
+
}), (_Object$assign = {}, _Object$assign["" + Link] = {
|
|
45102
|
+
fontSize: "inherit",
|
|
45103
|
+
lineHeight: "inherit"
|
|
45104
|
+
}, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign({}, layout === "auto" && {
|
|
45105
|
+
gridTemplateColumns: "minmax(0, min(50%, " + descriptionTermMaxWidth + ")) auto"
|
|
45106
|
+
}), _Object$assign));
|
|
45107
|
+
});
|
|
45108
|
+
|
|
45109
|
+
var DescriptionTerm = styled.styled.dt.withConfig({
|
|
45110
|
+
displayName: "DescriptionTerm",
|
|
45111
|
+
componentId: "sc-fbwp2v-0"
|
|
45112
|
+
})(function (_ref) {
|
|
45113
|
+
var _Object$assign;
|
|
45114
|
+
|
|
45115
|
+
var theme = _ref.theme;
|
|
45116
|
+
|
|
45117
|
+
var _useDescriptionListCo = useDescriptionListContext(),
|
|
45118
|
+
showDivider = _useDescriptionListCo.showDivider,
|
|
45119
|
+
density = _useDescriptionListCo.density,
|
|
45120
|
+
layout = _useDescriptionListCo.layout,
|
|
45121
|
+
autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint;
|
|
45122
|
+
|
|
45123
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45124
|
+
// narrow stuff + non-auto layout
|
|
45125
|
+
gridColumnStart: 1,
|
|
45126
|
+
color: theme.colors.midGrey,
|
|
45127
|
+
paddingLeft: theme.space.none,
|
|
45128
|
+
paddingRight: theme.space.none
|
|
45129
|
+
}, layout !== "inline" && {
|
|
45130
|
+
paddingBottom: theme.space.none
|
|
45131
|
+
}), density === "compact" && Object.assign({
|
|
45132
|
+
paddingTop: theme.space.x0_25
|
|
45133
|
+
}, layout === "inline" && {
|
|
45134
|
+
paddingBottom: theme.space.x0_25
|
|
45135
|
+
})), density === "medium" && Object.assign({
|
|
45136
|
+
paddingTop: theme.space.x0_75
|
|
45137
|
+
}, layout === "inline" && {
|
|
45138
|
+
paddingBottom: theme.space.x0_75
|
|
45139
|
+
})), density === "relaxed" && Object.assign({
|
|
45140
|
+
paddingTop: theme.space.x1_5,
|
|
45141
|
+
paddingBottom: theme.space.x0_25
|
|
45142
|
+
}, layout === "inline" && {
|
|
45143
|
+
paddingBottom: theme.space.x1_5
|
|
45144
|
+
})), showDivider && {
|
|
45145
|
+
borderTopWidth: "1px",
|
|
45146
|
+
borderTopStyle: "solid",
|
|
45147
|
+
borderTopColor: theme.colors.lightGrey
|
|
45148
|
+
}), (_Object$assign = {
|
|
45149
|
+
"&:first-child": {
|
|
45150
|
+
border: "none"
|
|
45151
|
+
}
|
|
45152
|
+
}, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
|
|
45153
|
+
borderTopWidth: "1px",
|
|
45154
|
+
borderTopStyle: "solid",
|
|
45155
|
+
borderTopColor: theme.colors.lightGrey
|
|
45156
|
+
}), density === "compact" && layout !== "stacked" && {
|
|
45157
|
+
paddingBottom: theme.space.x0_25
|
|
45158
|
+
}), density === "medium" && layout !== "stacked" && {
|
|
45159
|
+
paddingBottom: theme.space.x0_75
|
|
45160
|
+
}), density === "relaxed" && layout !== "stacked" && {
|
|
45161
|
+
paddingBottom: theme.space.x1_5
|
|
45162
|
+
}), _Object$assign));
|
|
45163
|
+
});
|
|
45164
|
+
|
|
45165
|
+
var DescriptionDetails = styled.styled.dd.withConfig({
|
|
45166
|
+
displayName: "DescriptionDetails",
|
|
45167
|
+
componentId: "sc-m5zvn4-0"
|
|
45168
|
+
})(function (_ref) {
|
|
45169
|
+
var _Object$assign;
|
|
45170
|
+
|
|
45171
|
+
var theme = _ref.theme;
|
|
45172
|
+
|
|
45173
|
+
var _useDescriptionListCo = useDescriptionListContext(),
|
|
45174
|
+
autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint,
|
|
45175
|
+
showDivider = _useDescriptionListCo.showDivider,
|
|
45176
|
+
density = _useDescriptionListCo.density,
|
|
45177
|
+
layout = _useDescriptionListCo.layout;
|
|
45178
|
+
|
|
45179
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45180
|
+
// narrow stuff + non-auto layout
|
|
45181
|
+
margin: 0,
|
|
45182
|
+
color: theme.colors.black,
|
|
45183
|
+
paddingLeft: theme.space.none,
|
|
45184
|
+
paddingRight: theme.space.none
|
|
45185
|
+
}, layout !== "inline" && {
|
|
45186
|
+
paddingTop: theme.space.none
|
|
45187
|
+
}), density === "compact" && Object.assign({
|
|
45188
|
+
paddingBottom: theme.space.x0_25
|
|
45189
|
+
}, layout === "inline" && {
|
|
45190
|
+
paddingTop: theme.space.x0_25
|
|
45191
|
+
})), density === "medium" && Object.assign({
|
|
45192
|
+
paddingBottom: theme.space.x0_75
|
|
45193
|
+
}, layout === "inline" && {
|
|
45194
|
+
paddingTop: theme.space.x0_75
|
|
45195
|
+
})), density === "relaxed" && Object.assign({
|
|
45196
|
+
paddingBottom: theme.space.x1_5,
|
|
45197
|
+
paddingTop: theme.space.x0_25
|
|
45198
|
+
}, layout === "inline" && {
|
|
45199
|
+
paddingTop: theme.space.x1_5
|
|
45200
|
+
})), showDivider && layout === "inline" && {
|
|
45201
|
+
borderTopWidth: "1px",
|
|
45202
|
+
borderTopStyle: "solid",
|
|
45203
|
+
borderTopColor: theme.colors.lightGrey
|
|
45204
|
+
}), (_Object$assign = {
|
|
45205
|
+
"&:nth-child(2)": {
|
|
45206
|
+
border: "none"
|
|
45207
|
+
}
|
|
45208
|
+
}, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
|
|
45209
|
+
borderTopWidth: "1px",
|
|
45210
|
+
borderTopStyle: "solid",
|
|
45211
|
+
borderTopColor: theme.colors.lightGrey
|
|
45212
|
+
}), density === "compact" && layout !== "stacked" && {
|
|
45213
|
+
paddingTop: theme.space.x0_25
|
|
45214
|
+
}), density === "medium" && layout !== "stacked" && {
|
|
45215
|
+
paddingTop: theme.space.x0_75
|
|
45216
|
+
}), density === "relaxed" && layout !== "stacked" && {
|
|
45217
|
+
paddingTop: theme.space.x1_5
|
|
45218
|
+
}), _Object$assign));
|
|
45219
|
+
});
|
|
45220
|
+
|
|
45015
45221
|
var Divider$1 = styled__default["default"].hr.withConfig({
|
|
45016
45222
|
displayName: "Divider",
|
|
45017
45223
|
componentId: "sc-1r789ib-0"
|
|
@@ -54930,6 +55136,9 @@
|
|
|
54930
55136
|
exports.DangerButton = DangerButton;
|
|
54931
55137
|
exports.DatePicker = DatePicker;
|
|
54932
55138
|
exports.DateRange = DateRange;
|
|
55139
|
+
exports.DescriptionDetails = DescriptionDetails;
|
|
55140
|
+
exports.DescriptionList = DescriptionList;
|
|
55141
|
+
exports.DescriptionTerm = DescriptionTerm;
|
|
54933
55142
|
exports.DesktopMenu = DesktopMenu;
|
|
54934
55143
|
exports.Divider = Divider$1;
|
|
54935
55144
|
exports.DropdownButton = DropdownButton;
|
package/dist/main.module.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { createContext, useContext, useRef, useEffect, createElement, useLayoutEffect, useCallback, useMemo, forwardRef, Fragment, Component as Component$1, useState, cloneElement, Children, isValidElement, PureComponent, useImperativeHandle } from 'react';
|
|
3
|
-
import styled, { useTheme, createGlobalStyle, ThemeContext as ThemeContext$1, StyleSheetManager, ThemeProvider } from 'styled-components';
|
|
3
|
+
import styled, { useTheme, createGlobalStyle, styled as styled$1, ThemeContext as ThemeContext$1, StyleSheetManager, ThemeProvider } from 'styled-components';
|
|
4
4
|
import assign$1 from 'object-assign';
|
|
5
5
|
import icons from '@nulogy/icons';
|
|
6
6
|
import _extends$5 from '@babel/runtime/helpers/extends';
|
|
@@ -8637,6 +8637,19 @@ function InlineIcon(props) {
|
|
|
8637
8637
|
size: ICON_SIZE_RATIO + "em"
|
|
8638
8638
|
}, props)));
|
|
8639
8639
|
}
|
|
8640
|
+
var InputIcon = styled(Icon).withConfig({
|
|
8641
|
+
displayName: "Icon__InputIcon",
|
|
8642
|
+
componentId: "sc-150w9kl-3"
|
|
8643
|
+
})(function (_ref2) {
|
|
8644
|
+
var theme = _ref2.theme;
|
|
8645
|
+
return {
|
|
8646
|
+
position: "absolute",
|
|
8647
|
+
color: theme.colors.midGrey,
|
|
8648
|
+
bottom: "50%",
|
|
8649
|
+
transform: "translateY(50%)",
|
|
8650
|
+
pointerEvents: "none"
|
|
8651
|
+
};
|
|
8652
|
+
}, position);
|
|
8640
8653
|
|
|
8641
8654
|
var Flex = styled(Box).withConfig({
|
|
8642
8655
|
displayName: "Flex",
|
|
@@ -24153,6 +24166,7 @@ var customStyles = function customStyles(_ref6) {
|
|
|
24153
24166
|
error = _ref6.error,
|
|
24154
24167
|
maxHeight = _ref6.maxHeight,
|
|
24155
24168
|
windowed = _ref6.windowed,
|
|
24169
|
+
hasIcon = _ref6.hasIcon,
|
|
24156
24170
|
variant = _ref6.variant,
|
|
24157
24171
|
_ref6$hasDefaultOptio = _ref6.hasDefaultOptions,
|
|
24158
24172
|
hasDefaultOptions = _ref6$hasDefaultOptio === void 0 ? true : _ref6$hasDefaultOptio;
|
|
@@ -24168,7 +24182,7 @@ var customStyles = function customStyles(_ref6) {
|
|
|
24168
24182
|
});
|
|
24169
24183
|
},
|
|
24170
24184
|
control: function control(provided, state) {
|
|
24171
|
-
return Object.assign(Object.assign({}, provided), {
|
|
24185
|
+
return Object.assign(Object.assign(Object.assign({}, provided), {
|
|
24172
24186
|
display: "flex",
|
|
24173
24187
|
minHeight: theme.space.x5,
|
|
24174
24188
|
paddingLeft: theme.space.x1,
|
|
@@ -24229,6 +24243,8 @@ var customStyles = function customStyles(_ref6) {
|
|
|
24229
24243
|
theme: theme
|
|
24230
24244
|
})
|
|
24231
24245
|
}
|
|
24246
|
+
}), hasIcon && {
|
|
24247
|
+
paddingLeft: "calc(" + theme.space.x3 + " + " + theme.space.x1_5 + ")"
|
|
24232
24248
|
});
|
|
24233
24249
|
},
|
|
24234
24250
|
dropdownIndicator: function dropdownIndicator(provided) {
|
|
@@ -24490,15 +24506,22 @@ function SelectOption$1(props) {
|
|
|
24490
24506
|
}, /*#__PURE__*/React__default.createElement(components$1.Option, Object.assign({}, props), props.children));
|
|
24491
24507
|
}
|
|
24492
24508
|
|
|
24493
|
-
var SelectControl$1 = function SelectControl(
|
|
24494
|
-
|
|
24495
|
-
|
|
24509
|
+
var SelectControl$1 = function SelectControl(_a) {
|
|
24510
|
+
var iconLeft = _a.iconLeft,
|
|
24511
|
+
isFocused = _a.isFocused,
|
|
24512
|
+
children = _a.children,
|
|
24513
|
+
props = __rest$3(_a, ["iconLeft", "isFocused", "children"]);
|
|
24514
|
+
|
|
24496
24515
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24497
24516
|
"data-testid": "select-control"
|
|
24498
24517
|
}, /*#__PURE__*/React__default.createElement(components.Control, Object.assign({
|
|
24499
24518
|
className: isFocused ? "nds-select--is-focused" : null,
|
|
24500
24519
|
isFocused: isFocused
|
|
24501
|
-
}, props),
|
|
24520
|
+
}, props), iconLeft && /*#__PURE__*/React__default.createElement(InputIcon, {
|
|
24521
|
+
left: "x1",
|
|
24522
|
+
icon: iconLeft,
|
|
24523
|
+
size: "x3"
|
|
24524
|
+
}), children));
|
|
24502
24525
|
};
|
|
24503
24526
|
var SelectMultiValue$1 = function SelectMultiValue(props) {
|
|
24504
24527
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -24579,7 +24602,8 @@ var AsyncSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
24579
24602
|
loadOptions = _a.loadOptions,
|
|
24580
24603
|
isClearable = _a.isClearable,
|
|
24581
24604
|
variant = _a.variant,
|
|
24582
|
-
|
|
24605
|
+
iconLeft = _a.iconLeft,
|
|
24606
|
+
props = __rest$3(_a, ["autocomplete", "labelText", "required", "requirementText", "helpText", "noOptionsMessage", "disabled", "errorMessage", "errorList", "id", "initialIsOpen", "maxHeight", "menuPosition", "multiselect", "name", "onChange", "placeholder", "value", "defaultValue", "className", "classNamePrefix", "onBlur", "menuIsOpen", "onMenuOpen", "onMenuClose", "onInputChange", "components", "aria-label", "cacheOptions", "defaultOptions", "loadOptions", "isClearable", "variant", "iconLeft"]);
|
|
24583
24607
|
|
|
24584
24608
|
var _useTranslation = useTranslation(),
|
|
24585
24609
|
t = _useTranslation.t;
|
|
@@ -24601,6 +24625,7 @@ var AsyncSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
24601
24625
|
defaultInputValue: defaultValue,
|
|
24602
24626
|
placeholder: placeholder || t("start typing"),
|
|
24603
24627
|
styles: customStyles({
|
|
24628
|
+
hasIcon: Boolean(iconLeft),
|
|
24604
24629
|
theme: theme,
|
|
24605
24630
|
error: error,
|
|
24606
24631
|
maxHeight: maxHeight,
|
|
@@ -24630,7 +24655,11 @@ var AsyncSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
24630
24655
|
variant: componentVariant
|
|
24631
24656
|
}, props), props.children);
|
|
24632
24657
|
},
|
|
24633
|
-
Control:
|
|
24658
|
+
Control: function Control(props) {
|
|
24659
|
+
return /*#__PURE__*/React__default.createElement(SelectControl$1, Object.assign({
|
|
24660
|
+
iconLeft: iconLeft
|
|
24661
|
+
}, props), props.children);
|
|
24662
|
+
},
|
|
24634
24663
|
MultiValue: SelectMultiValue$1,
|
|
24635
24664
|
ClearIndicator: SelectClearIndicator$1,
|
|
24636
24665
|
DropdownIndicator: SelectDropdownIndicator$1,
|
|
@@ -29340,11 +29369,10 @@ var InputField = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
29340
29369
|
textAlign: prefixAlignment
|
|
29341
29370
|
}), /*#__PURE__*/React__default.createElement(InputWrapper, {
|
|
29342
29371
|
maxWidth: inputWidth
|
|
29343
|
-
}, iconLeft && /*#__PURE__*/React__default.createElement(
|
|
29372
|
+
}, iconLeft && /*#__PURE__*/React__default.createElement(InputIcon, {
|
|
29344
29373
|
left: "x1",
|
|
29345
29374
|
icon: iconLeft,
|
|
29346
|
-
size: iconLeftSize
|
|
29347
|
-
variant: variant
|
|
29375
|
+
size: iconLeftSize
|
|
29348
29376
|
}), /*#__PURE__*/React__default.createElement(StyledInput, Object.assign({
|
|
29349
29377
|
paddingLeft: iconLeft ? "calc(" + theme.space[iconLeftSize] + " + " + theme.space.x1_5 + ")" : theme.space.x1,
|
|
29350
29378
|
paddingRight: iconRight ? "calc(" + theme.space[iconRightSize] + " + " + theme.space.x1_5 + ")" : theme.space.x1,
|
|
@@ -29356,11 +29384,10 @@ var InputField = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
29356
29384
|
size: htmlSize,
|
|
29357
29385
|
variant: componentVariant,
|
|
29358
29386
|
inputWidth: inputWidth
|
|
29359
|
-
}, props)), iconRight && /*#__PURE__*/React__default.createElement(
|
|
29387
|
+
}, props)), iconRight && /*#__PURE__*/React__default.createElement(InputIcon, {
|
|
29360
29388
|
right: "x1",
|
|
29361
29389
|
icon: iconRight,
|
|
29362
|
-
size: iconRightSize
|
|
29363
|
-
variant: variant
|
|
29390
|
+
size: iconRightSize
|
|
29364
29391
|
})), /*#__PURE__*/React__default.createElement(Suffix, {
|
|
29365
29392
|
suffix: suffix,
|
|
29366
29393
|
suffixWidth: suffixWidth,
|
|
@@ -29432,24 +29459,11 @@ var StyledInput = styled.input.withConfig({
|
|
|
29432
29459
|
theme: theme
|
|
29433
29460
|
});
|
|
29434
29461
|
}, space);
|
|
29435
|
-
var StyledInputIcon = styled(Icon).withConfig({
|
|
29436
|
-
displayName: "InputField__StyledInputIcon",
|
|
29437
|
-
componentId: "sc-a97ghf-2"
|
|
29438
|
-
})(function (_ref4) {
|
|
29439
|
-
var theme = _ref4.theme;
|
|
29440
|
-
return {
|
|
29441
|
-
position: "absolute",
|
|
29442
|
-
color: theme.colors.midGrey,
|
|
29443
|
-
bottom: "50%",
|
|
29444
|
-
transform: "translateY(50%)",
|
|
29445
|
-
pointerEvents: "none"
|
|
29446
|
-
};
|
|
29447
|
-
}, position);
|
|
29448
29462
|
|
|
29449
|
-
var cssForState = function cssForState(
|
|
29450
|
-
var disabled =
|
|
29451
|
-
error =
|
|
29452
|
-
theme =
|
|
29463
|
+
var cssForState = function cssForState(_ref4) {
|
|
29464
|
+
var disabled = _ref4.disabled,
|
|
29465
|
+
error = _ref4.error,
|
|
29466
|
+
theme = _ref4.theme;
|
|
29453
29467
|
if (disabled) return {
|
|
29454
29468
|
color: theme.colors.midGrey,
|
|
29455
29469
|
borderColor: theme.colors.lightGrey,
|
|
@@ -44995,6 +45009,198 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
44995
45009
|
}, props)));
|
|
44996
45010
|
});
|
|
44997
45011
|
|
|
45012
|
+
var DescriptionListContext = /*#__PURE__*/React__default.createContext({});
|
|
45013
|
+
var useDescriptionListContext = function useDescriptionListContext() {
|
|
45014
|
+
return React__default.useContext(DescriptionListContext);
|
|
45015
|
+
};
|
|
45016
|
+
function DescriptionListProvider(_a) {
|
|
45017
|
+
var children = _a.children,
|
|
45018
|
+
config = __rest$3(_a, ["children"]);
|
|
45019
|
+
|
|
45020
|
+
return /*#__PURE__*/React__default.createElement(DescriptionListContext.Provider, {
|
|
45021
|
+
value: Object.assign({}, config)
|
|
45022
|
+
}, children);
|
|
45023
|
+
}
|
|
45024
|
+
|
|
45025
|
+
function DescriptionList(_ref) {
|
|
45026
|
+
var _ref$descriptionTermM = _ref.descriptionTermMaxWidth,
|
|
45027
|
+
descriptionTermMaxWidth = _ref$descriptionTermM === void 0 ? "50%" : _ref$descriptionTermM,
|
|
45028
|
+
_ref$layout = _ref.layout,
|
|
45029
|
+
layout = _ref$layout === void 0 ? "auto" : _ref$layout,
|
|
45030
|
+
_ref$showDivider = _ref.showDivider,
|
|
45031
|
+
showDivider = _ref$showDivider === void 0 ? false : _ref$showDivider,
|
|
45032
|
+
_ref$density = _ref.density,
|
|
45033
|
+
density = _ref$density === void 0 ? "medium" : _ref$density,
|
|
45034
|
+
_ref$fontSize = _ref.fontSize,
|
|
45035
|
+
fontSize = _ref$fontSize === void 0 ? "medium" : _ref$fontSize,
|
|
45036
|
+
_ref$lineHeight = _ref.lineHeight,
|
|
45037
|
+
lineHeight = _ref$lineHeight === void 0 ? "base" : _ref$lineHeight,
|
|
45038
|
+
_ref$autoLayoutBreakp = _ref.autoLayoutBreakpoint,
|
|
45039
|
+
autoLayoutBreakpoint = _ref$autoLayoutBreakp === void 0 ? "640px" : _ref$autoLayoutBreakp,
|
|
45040
|
+
children = _ref.children;
|
|
45041
|
+
return /*#__PURE__*/React__default.createElement(DescriptionListProvider, {
|
|
45042
|
+
descriptionTermMaxWidth: descriptionTermMaxWidth,
|
|
45043
|
+
layout: layout,
|
|
45044
|
+
showDivider: showDivider,
|
|
45045
|
+
density: density,
|
|
45046
|
+
fontSize: fontSize,
|
|
45047
|
+
lineHeight: lineHeight,
|
|
45048
|
+
autoLayoutBreakpoint: autoLayoutBreakpoint
|
|
45049
|
+
}, /*#__PURE__*/React__default.createElement(DescriptionListContainer, null, /*#__PURE__*/React__default.createElement(StyledDescriptionList, null, children)));
|
|
45050
|
+
}
|
|
45051
|
+
var DescriptionListContainer = styled.div.withConfig({
|
|
45052
|
+
displayName: "DescriptionList__DescriptionListContainer",
|
|
45053
|
+
componentId: "sc-11s88xm-0"
|
|
45054
|
+
})({
|
|
45055
|
+
containerType: "inline-size",
|
|
45056
|
+
width: "100%"
|
|
45057
|
+
});
|
|
45058
|
+
var StyledDescriptionList = styled.dl.withConfig({
|
|
45059
|
+
displayName: "DescriptionList__StyledDescriptionList",
|
|
45060
|
+
componentId: "sc-11s88xm-1"
|
|
45061
|
+
})(function (_ref2) {
|
|
45062
|
+
var _Object$assign;
|
|
45063
|
+
|
|
45064
|
+
var theme = _ref2.theme;
|
|
45065
|
+
|
|
45066
|
+
var _a, _b;
|
|
45067
|
+
|
|
45068
|
+
var _useDescriptionListCo = useDescriptionListContext(),
|
|
45069
|
+
descriptionTermMaxWidth = _useDescriptionListCo.descriptionTermMaxWidth,
|
|
45070
|
+
layout = _useDescriptionListCo.layout,
|
|
45071
|
+
fontSize = _useDescriptionListCo.fontSize,
|
|
45072
|
+
lineHeight = _useDescriptionListCo.lineHeight,
|
|
45073
|
+
autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint;
|
|
45074
|
+
|
|
45075
|
+
return Object.assign(Object.assign(Object.assign({
|
|
45076
|
+
margin: 0,
|
|
45077
|
+
display: "grid",
|
|
45078
|
+
fontSize: (_a = theme.fontSizes[fontSize]) !== null && _a !== void 0 ? _a : theme.fontSizes.medium,
|
|
45079
|
+
lineHeight: (_b = theme.lineHeights[lineHeight]) !== null && _b !== void 0 ? _b : theme.lineHeights.base
|
|
45080
|
+
}, layout === "inline" && {
|
|
45081
|
+
gridTemplateColumns: "minmax(0, " + descriptionTermMaxWidth + ") auto"
|
|
45082
|
+
}), (layout === "stacked" || layout === "auto") && {
|
|
45083
|
+
gridTemplateColumns: "1fr"
|
|
45084
|
+
}), (_Object$assign = {}, _Object$assign["" + Link] = {
|
|
45085
|
+
fontSize: "inherit",
|
|
45086
|
+
lineHeight: "inherit"
|
|
45087
|
+
}, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign({}, layout === "auto" && {
|
|
45088
|
+
gridTemplateColumns: "minmax(0, min(50%, " + descriptionTermMaxWidth + ")) auto"
|
|
45089
|
+
}), _Object$assign));
|
|
45090
|
+
});
|
|
45091
|
+
|
|
45092
|
+
var DescriptionTerm = styled$1.dt.withConfig({
|
|
45093
|
+
displayName: "DescriptionTerm",
|
|
45094
|
+
componentId: "sc-fbwp2v-0"
|
|
45095
|
+
})(function (_ref) {
|
|
45096
|
+
var _Object$assign;
|
|
45097
|
+
|
|
45098
|
+
var theme = _ref.theme;
|
|
45099
|
+
|
|
45100
|
+
var _useDescriptionListCo = useDescriptionListContext(),
|
|
45101
|
+
showDivider = _useDescriptionListCo.showDivider,
|
|
45102
|
+
density = _useDescriptionListCo.density,
|
|
45103
|
+
layout = _useDescriptionListCo.layout,
|
|
45104
|
+
autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint;
|
|
45105
|
+
|
|
45106
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45107
|
+
// narrow stuff + non-auto layout
|
|
45108
|
+
gridColumnStart: 1,
|
|
45109
|
+
color: theme.colors.midGrey,
|
|
45110
|
+
paddingLeft: theme.space.none,
|
|
45111
|
+
paddingRight: theme.space.none
|
|
45112
|
+
}, layout !== "inline" && {
|
|
45113
|
+
paddingBottom: theme.space.none
|
|
45114
|
+
}), density === "compact" && Object.assign({
|
|
45115
|
+
paddingTop: theme.space.x0_25
|
|
45116
|
+
}, layout === "inline" && {
|
|
45117
|
+
paddingBottom: theme.space.x0_25
|
|
45118
|
+
})), density === "medium" && Object.assign({
|
|
45119
|
+
paddingTop: theme.space.x0_75
|
|
45120
|
+
}, layout === "inline" && {
|
|
45121
|
+
paddingBottom: theme.space.x0_75
|
|
45122
|
+
})), density === "relaxed" && Object.assign({
|
|
45123
|
+
paddingTop: theme.space.x1_5,
|
|
45124
|
+
paddingBottom: theme.space.x0_25
|
|
45125
|
+
}, layout === "inline" && {
|
|
45126
|
+
paddingBottom: theme.space.x1_5
|
|
45127
|
+
})), showDivider && {
|
|
45128
|
+
borderTopWidth: "1px",
|
|
45129
|
+
borderTopStyle: "solid",
|
|
45130
|
+
borderTopColor: theme.colors.lightGrey
|
|
45131
|
+
}), (_Object$assign = {
|
|
45132
|
+
"&:first-child": {
|
|
45133
|
+
border: "none"
|
|
45134
|
+
}
|
|
45135
|
+
}, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
|
|
45136
|
+
borderTopWidth: "1px",
|
|
45137
|
+
borderTopStyle: "solid",
|
|
45138
|
+
borderTopColor: theme.colors.lightGrey
|
|
45139
|
+
}), density === "compact" && layout !== "stacked" && {
|
|
45140
|
+
paddingBottom: theme.space.x0_25
|
|
45141
|
+
}), density === "medium" && layout !== "stacked" && {
|
|
45142
|
+
paddingBottom: theme.space.x0_75
|
|
45143
|
+
}), density === "relaxed" && layout !== "stacked" && {
|
|
45144
|
+
paddingBottom: theme.space.x1_5
|
|
45145
|
+
}), _Object$assign));
|
|
45146
|
+
});
|
|
45147
|
+
|
|
45148
|
+
var DescriptionDetails = styled$1.dd.withConfig({
|
|
45149
|
+
displayName: "DescriptionDetails",
|
|
45150
|
+
componentId: "sc-m5zvn4-0"
|
|
45151
|
+
})(function (_ref) {
|
|
45152
|
+
var _Object$assign;
|
|
45153
|
+
|
|
45154
|
+
var theme = _ref.theme;
|
|
45155
|
+
|
|
45156
|
+
var _useDescriptionListCo = useDescriptionListContext(),
|
|
45157
|
+
autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint,
|
|
45158
|
+
showDivider = _useDescriptionListCo.showDivider,
|
|
45159
|
+
density = _useDescriptionListCo.density,
|
|
45160
|
+
layout = _useDescriptionListCo.layout;
|
|
45161
|
+
|
|
45162
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45163
|
+
// narrow stuff + non-auto layout
|
|
45164
|
+
margin: 0,
|
|
45165
|
+
color: theme.colors.black,
|
|
45166
|
+
paddingLeft: theme.space.none,
|
|
45167
|
+
paddingRight: theme.space.none
|
|
45168
|
+
}, layout !== "inline" && {
|
|
45169
|
+
paddingTop: theme.space.none
|
|
45170
|
+
}), density === "compact" && Object.assign({
|
|
45171
|
+
paddingBottom: theme.space.x0_25
|
|
45172
|
+
}, layout === "inline" && {
|
|
45173
|
+
paddingTop: theme.space.x0_25
|
|
45174
|
+
})), density === "medium" && Object.assign({
|
|
45175
|
+
paddingBottom: theme.space.x0_75
|
|
45176
|
+
}, layout === "inline" && {
|
|
45177
|
+
paddingTop: theme.space.x0_75
|
|
45178
|
+
})), density === "relaxed" && Object.assign({
|
|
45179
|
+
paddingBottom: theme.space.x1_5,
|
|
45180
|
+
paddingTop: theme.space.x0_25
|
|
45181
|
+
}, layout === "inline" && {
|
|
45182
|
+
paddingTop: theme.space.x1_5
|
|
45183
|
+
})), showDivider && layout === "inline" && {
|
|
45184
|
+
borderTopWidth: "1px",
|
|
45185
|
+
borderTopStyle: "solid",
|
|
45186
|
+
borderTopColor: theme.colors.lightGrey
|
|
45187
|
+
}), (_Object$assign = {
|
|
45188
|
+
"&:nth-child(2)": {
|
|
45189
|
+
border: "none"
|
|
45190
|
+
}
|
|
45191
|
+
}, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
|
|
45192
|
+
borderTopWidth: "1px",
|
|
45193
|
+
borderTopStyle: "solid",
|
|
45194
|
+
borderTopColor: theme.colors.lightGrey
|
|
45195
|
+
}), density === "compact" && layout !== "stacked" && {
|
|
45196
|
+
paddingTop: theme.space.x0_25
|
|
45197
|
+
}), density === "medium" && layout !== "stacked" && {
|
|
45198
|
+
paddingTop: theme.space.x0_75
|
|
45199
|
+
}), density === "relaxed" && layout !== "stacked" && {
|
|
45200
|
+
paddingTop: theme.space.x1_5
|
|
45201
|
+
}), _Object$assign));
|
|
45202
|
+
});
|
|
45203
|
+
|
|
44998
45204
|
var Divider$1 = styled.hr.withConfig({
|
|
44999
45205
|
displayName: "Divider",
|
|
45000
45206
|
componentId: "sc-1r789ib-0"
|
|
@@ -54890,4 +55096,4 @@ var TruncatedText = function TruncatedText(_a) {
|
|
|
54890
55096
|
}, props), children);
|
|
54891
55097
|
};
|
|
54892
55098
|
|
|
54893
|
-
export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Banner, BottomSheet, BottomSheetParts, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header$1 as Header, Heading1, Heading2, Heading3, Heading4, HelpText$1 as HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, NDSProvider, NavBarBackground, NotificationTypes, Overlay$1 as Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption$1 as SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, ToggleComponent as Toggle, Tooltip, TopBar, TruncatedText, addStyledProps, legacy as desktop, phone, tablet, themes, toast, useMediaQuery, useWindowDimensions };
|
|
55099
|
+
export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Banner, BottomSheet, BottomSheetParts, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DescriptionDetails, DescriptionList, DescriptionTerm, DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header$1 as Header, Heading1, Heading2, Heading3, Heading4, HelpText$1 as HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, NDSProvider, NavBarBackground, NotificationTypes, Overlay$1 as Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption$1 as SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, ToggleComponent as Toggle, Tooltip, TopBar, TruncatedText, addStyledProps, legacy as desktop, phone, tablet, themes, toast, useMediaQuery, useWindowDimensions };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
+
import { IconName } from "@nulogy/icons";
|
|
2
3
|
import Select from "react-select/base";
|
|
3
4
|
import { AsyncProps } from "react-select/async";
|
|
4
5
|
import { GroupBase } from "react-select";
|
|
@@ -16,6 +17,7 @@ type AsyncCustomProps<Option, IsMulti extends boolean, Group extends GroupBase<O
|
|
|
16
17
|
multiselect?: AsyncProps<Option, IsMulti, Group>["isMulti"];
|
|
17
18
|
maxHeight?: string;
|
|
18
19
|
defaultValue?: AsyncProps<Option, IsMulti, Group>["defaultInputValue"];
|
|
20
|
+
iconLeft?: IconName | "loading";
|
|
19
21
|
};
|
|
20
22
|
export type AsyncSelectProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = Omit<AsyncProps<Option, IsMulti, Group>, "isSearchable" | "isDisabled" | "isMulti" | "defaultMenuIsOpen" | "defaultInputValue"> & AsyncCustomProps<Option, IsMulti, Group>;
|
|
21
23
|
declare const AsyncSelect: React.ForwardRefExoticComponent<Omit<AsyncProps<unknown, boolean, GroupBase<unknown>>, "isDisabled" | "isMulti" | "isSearchable" | "defaultMenuIsOpen" | "defaultInputValue"> & AsyncCustomProps<unknown, boolean, GroupBase<unknown>> & React.RefAttributes<Select<unknown, boolean, GroupBase<unknown>>>>;
|
|
@@ -3,12 +3,7 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const Default:
|
|
7
|
-
(): React.JSX.Element;
|
|
8
|
-
story: {
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
6
|
+
export declare const Default: () => React.JSX.Element;
|
|
12
7
|
export declare const WithDefaultOptions: {
|
|
13
8
|
(): React.JSX.Element;
|
|
14
9
|
story: {
|
|
@@ -29,9 +24,5 @@ export declare const UsingRefToControlFocus: {
|
|
|
29
24
|
name: string;
|
|
30
25
|
};
|
|
31
26
|
};
|
|
32
|
-
export declare const Controlled:
|
|
33
|
-
|
|
34
|
-
story: {
|
|
35
|
-
name: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
27
|
+
export declare const Controlled: () => React.JSX.Element;
|
|
28
|
+
export declare const WithIcon: () => React.JSX.Element;
|
|
@@ -3,7 +3,10 @@ import { ClearIndicatorProps, ContainerProps, ControlProps, DropdownIndicatorPro
|
|
|
3
3
|
import { GroupBase } from "react-select";
|
|
4
4
|
import type { OptionProps } from "react-windowed-select";
|
|
5
5
|
import type { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
6
|
-
|
|
6
|
+
import { IconName } from "@nulogy/icons";
|
|
7
|
+
export declare const SelectControl: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ iconLeft, isFocused, children, ...props }: ControlProps<Option, IsMulti, Group> & {
|
|
8
|
+
iconLeft?: IconName | "loading";
|
|
9
|
+
}) => React.JSX.Element;
|
|
7
10
|
export declare const SelectMultiValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
8
11
|
export declare const SelectClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
9
12
|
export declare const SelectDropdownIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>) => React.JSX.Element;
|
package/dist/src/Icon/Icon.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { SpaceProps } from "styled-system";
|
|
2
|
+
import { PositionProps, SpaceProps } from "styled-system";
|
|
3
3
|
import { IconName } from "@nulogy/icons";
|
|
4
4
|
interface IconProps extends SpaceProps {
|
|
5
5
|
icon: IconName | "loading";
|
|
@@ -12,4 +12,5 @@ interface IconProps extends SpaceProps {
|
|
|
12
12
|
}
|
|
13
13
|
declare const Icon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<IconProps & React.RefAttributes<SVGSVGElement>, IconProps>> & string & Omit<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>, keyof React.Component<any, {}, any>>;
|
|
14
14
|
export declare function InlineIcon(props: IconProps): React.JSX.Element;
|
|
15
|
+
export declare const InputIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<IconProps & React.RefAttributes<SVGSVGElement>, keyof IconProps> & IconProps, PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>>> & string;
|
|
15
16
|
export default Icon;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { Card, CardSet } from "./Card";
|
|
|
15
15
|
export { Checkbox, CheckboxGroup } from "./Checkbox";
|
|
16
16
|
export { DatePicker } from "./DatePicker";
|
|
17
17
|
export { DateRange } from "./DateRange";
|
|
18
|
+
export { DescriptionDetails, DescriptionList, DescriptionTerm } from "./DescriptionList";
|
|
18
19
|
export { Divider } from "./Divider";
|
|
19
20
|
export { DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText } from "./DropdownMenu";
|
|
20
21
|
export { FieldLabel, HelpText, RequirementText } from "./FieldLabel";
|