@bolttech/molecules-dropdown 0.32.0 → 0.32.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.
package/index.cjs
CHANGED
|
@@ -2272,7 +2272,7 @@ const ClickableElement = /*#__PURE__*/styled__default["default"].div.withConfig(
|
|
|
2272
2272
|
const ContainerDropdown = /*#__PURE__*/styled__default["default"].section.withConfig({
|
|
2273
2273
|
displayName: "molecules-dropdownstyles__ContainerDropdown",
|
|
2274
2274
|
componentId: "sc-3wugi4-1"
|
|
2275
|
-
})(["display:flex;padding-top:", ";padding-bottom:", ";padding-right:", ";padding-left:", ";gap:", ";background-color:", ";outline:", ";border-radius:", ";box-shadow:", ";input{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:100%;overflow-x:hidden;}.fieldLabel{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}.requiredLabel{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}label.material-symbols-sharp{color:", ";}&:focus-within{background-color:", ";outline:", ";", "}", " ", ""], ({
|
|
2275
|
+
})(["display:flex;padding-top:", ";padding-bottom:", ";padding-right:", ";padding-left:", ";gap:", ";background-color:", ";outline:", ";border-radius:", ";box-shadow:", ";margin-bottom:", ";input{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:100%;overflow-x:hidden;}.fieldLabel{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}.requiredLabel{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}label.material-symbols-sharp{color:", ";}&:focus-within{background-color:", ";outline:", ";", "}", " ", ""], ({
|
|
2276
2276
|
theme
|
|
2277
2277
|
}) => theme.components.dropdown.paddingVertical, ({
|
|
2278
2278
|
theme
|
|
@@ -2297,6 +2297,10 @@ const ContainerDropdown = /*#__PURE__*/styled__default["default"].section.withCo
|
|
|
2297
2297
|
}
|
|
2298
2298
|
}
|
|
2299
2299
|
}) => shadow.lvl0, ({
|
|
2300
|
+
theme,
|
|
2301
|
+
$hasError,
|
|
2302
|
+
$hasHelperText
|
|
2303
|
+
}) => $hasError || $hasHelperText ? theme.components.input.contentGap : 0, ({
|
|
2300
2304
|
theme,
|
|
2301
2305
|
$variant,
|
|
2302
2306
|
$hasValue
|
|
@@ -2480,6 +2484,7 @@ const ReusableDropdownComponent = _a => {
|
|
|
2480
2484
|
"$variant": variant,
|
|
2481
2485
|
"$hasValue": inputValue,
|
|
2482
2486
|
"$hasError": hasError,
|
|
2487
|
+
"$hasHelperText": !!helperMessage,
|
|
2483
2488
|
disabled: disabled,
|
|
2484
2489
|
"data-testid": `${dataTestId}-dropdown-container`,
|
|
2485
2490
|
onMouseDown: e => {
|
|
@@ -2759,7 +2764,7 @@ const Dropdown = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2759
2764
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2760
2765
|
}, [internalSelectedOption]);
|
|
2761
2766
|
react.useEffect(() => {
|
|
2762
|
-
if (value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2767
|
+
if (value && value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2763
2768
|
const foundOption = optionList === null || optionList === void 0 ? void 0 : optionList.find(option => option.id === value);
|
|
2764
2769
|
setInternalSelectedOption(foundOption);
|
|
2765
2770
|
setInputValue((foundOption === null || foundOption === void 0 ? void 0 : foundOption.value) || '');
|
|
@@ -2910,7 +2915,7 @@ const DropdownWithHeaders = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2910
2915
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2911
2916
|
}, [internalSelectedOption]);
|
|
2912
2917
|
react.useEffect(() => {
|
|
2913
|
-
if (value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2918
|
+
if (value && value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2914
2919
|
const option = optionList === null || optionList === void 0 ? void 0 : optionList.map(currentOptionsList => {
|
|
2915
2920
|
return currentOptionsList.options.find(option => option.id === value);
|
|
2916
2921
|
}).find(item => !!item);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/molecules-dropdown",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.2",
|
|
4
4
|
"main": "./index.cjs",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@bolttech/atoms-icon": "0.23.0",
|
|
9
9
|
"@bolttech/atoms-input": "0.26.1",
|
|
10
|
-
"@bolttech/atoms-select": "0.
|
|
11
|
-
"@bolttech/default-theme": "0.9.
|
|
10
|
+
"@bolttech/atoms-select": "0.23.0",
|
|
11
|
+
"@bolttech/default-theme": "0.9.1",
|
|
12
12
|
"@bolttech/form-engine": "3.1.0-beta.13",
|
|
13
13
|
"@bolttech/frontend-foundations": "0.10.0",
|
|
14
14
|
"@bolttech/ui-utils": "0.5.0",
|