@trops/dash-react 1.0.19 → 1.0.21
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/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3268,7 +3268,7 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
3268
3268
|
},
|
|
3269
3269
|
className: "w-full rounded-md border px-3 py-2 transition-colors duration-150 ".concat(styles.backgroundColor, " ").concat(styles.borderColor, " ").concat(styles.textColor, " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 ").concat(styles.focusRingColor || "", " disabled:opacity-50 disabled:cursor-not-allowed text-left flex items-center justify-between gap-2 ").concat(inputClassName),
|
|
3270
3270
|
children: [/*#__PURE__*/jsxs("span", {
|
|
3271
|
-
className: "flex items-center gap-2 truncate",
|
|
3271
|
+
className: "flex items-center gap-2 truncate flex-1 min-w-0",
|
|
3272
3272
|
children: [(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.icon) && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
3273
3273
|
icon: selectedOption.icon,
|
|
3274
3274
|
className: "h-3.5 w-3.5 shrink-0 opacity-70"
|
|
@@ -3276,6 +3276,9 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
3276
3276
|
className: "truncate",
|
|
3277
3277
|
children: selectedOption ? selectedOption.label : placeholder
|
|
3278
3278
|
})]
|
|
3279
|
+
}), (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.badge) && /*#__PURE__*/jsx("span", {
|
|
3280
|
+
className: "flex-shrink-0",
|
|
3281
|
+
children: selectedOption.badge
|
|
3279
3282
|
}), /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
3280
3283
|
icon: "chevron-down",
|
|
3281
3284
|
className: "h-3 w-3 shrink-0 opacity-50 transition-transform duration-150 ".concat(isOpen ? "rotate-180" : "")
|
|
@@ -3294,14 +3297,14 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
3294
3297
|
},
|
|
3295
3298
|
className: "w-full text-left px-3 py-1.5 flex items-center gap-2 text-sm transition-colors duration-150 ".concat(isSelected ? "".concat(itemStyles.selectedBackgroundColor || itemStyles.hoverBackgroundColor, " ").concat(itemStyles.selectedTextColor || styles.textColor) : "".concat(styles.textColor, " ").concat(itemStyles.hoverBackgroundColor, " ").concat(itemStyles.hoverTextColor)),
|
|
3296
3299
|
children: [option.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
3297
|
-
icon: option.icon,
|
|
3300
|
+
icon: isSelected ? "check" : option.icon,
|
|
3298
3301
|
className: "h-3.5 w-3.5 shrink-0 opacity-70"
|
|
3299
3302
|
}), /*#__PURE__*/jsx("span", {
|
|
3300
3303
|
className: "truncate",
|
|
3301
3304
|
children: option.label
|
|
3302
|
-
}),
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
+
}), option.badge && /*#__PURE__*/jsx("span", {
|
|
3306
|
+
className: "flex-shrink-0 ml-auto",
|
|
3307
|
+
children: option.badge
|
|
3305
3308
|
})]
|
|
3306
3309
|
}, option.value);
|
|
3307
3310
|
})
|