@monolith-forensics/monolith-ui 1.1.63 → 1.1.64

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.
@@ -2,5 +2,5 @@ import { SelectBoxProps } from "..";
2
2
  export declare const StyledInputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
3
  width?: string | number | null;
4
4
  }>> & string;
5
- declare const SelectBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<SelectBoxProps, never>> & string & Omit<({ className, data, placeholder, arrow, onChange, onSearch, searchFn, onScroll, loading, defaultValue, onItemAdded, size, variant, width, allowCustomValue, searchable, clearable, label, description, required, error, openOnFocus, renderOption, actionComponent, focused, grouped, OptionTooltip, DropDownProps, debounceTime, }: SelectBoxProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
5
+ declare const SelectBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<SelectBoxProps, never>> & string & Omit<({ className, data, placeholder, arrow, onChange, onSearch, searchFn, onScroll, loading, defaultValue, onItemAdded, size, variant, width, allowCustomValue, searchable, clearable, label, description, required, error, openOnFocus, renderOption, actionComponent, focused, grouped, OptionTooltip, DropDownProps, debounceTime, sort, }: SelectBoxProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
6
6
  export default SelectBox;
@@ -153,7 +153,7 @@ const StyledItem = styled.div `
153
153
  }
154
154
  `;
155
155
  const SelectBox = styled(({ className, data = [], placeholder = "Select...", arrow = true, onChange, onSearch, searchFn, onScroll, loading, defaultValue, onItemAdded, size = "sm", variant = "outlined", width = "100%", allowCustomValue = false, searchable = false, clearable = false, label, description, required = false, error, openOnFocus = true, renderOption, actionComponent, focused, grouped, OptionTooltip, // Custom tooltip component for search menu items
156
- DropDownProps = {}, debounceTime = 300, }) => {
156
+ DropDownProps = {}, debounceTime = 300, sort = false, }) => {
157
157
  var _a, _b, _c, _d, _e, _f, _g, _h;
158
158
  const isObjectArray = (_a = Object.keys((data === null || data === void 0 ? void 0 : data[0]) || {})) === null || _a === void 0 ? void 0 : _a.includes("label");
159
159
  const [inputValue, setInputValue] = useState("");
@@ -183,6 +183,8 @@ DropDownProps = {}, debounceTime = 300, }) => {
183
183
  const bValue = b.group;
184
184
  return aValue.localeCompare(bValue);
185
185
  }
186
+ if (!sort)
187
+ return 0;
186
188
  // Secondary sort by label/value to ensure consistent ordering
187
189
  const aLabel = isObjectArray ? a.label : a;
188
190
  const bLabel = isObjectArray ? b.label : b;
@@ -37,4 +37,5 @@ export interface SelectBoxProps {
37
37
  }>;
38
38
  DropDownProps?: any;
39
39
  debounceTime?: number;
40
+ sort?: boolean;
40
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",
@@ -18,10 +18,9 @@
18
18
  "scripts": {
19
19
  "clean": "rm -r ./dist",
20
20
  "build": "tsc",
21
- "patch": "yarn version --patch",
22
- "minor": "yarn version --minor",
23
- "major": "yarn version --major",
24
- "release-patch": "yarn version --patch --deferred && yarn build && npm publish && yarn clean"
21
+ "release-patch": "yarn version --patch --deferred && yarn build && npm publish && yarn clean",
22
+ "release-minor": "yarn version --minor --deferred && yarn build && npm publish && yarn clean",
23
+ "release-major": "yarn version --major --deferred && yarn build && npm publish && yarn clean"
25
24
  },
26
25
  "dependencies": {
27
26
  "@floating-ui/react": "^0.26.16",