blue-react 11.0.6 → 11.1.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.
@@ -35,6 +35,10 @@ export interface SearchProps {
35
35
  * Adds additional class name to input element.
36
36
  */
37
37
  inputClassName?: string;
38
+ /**
39
+ * Disables default pill rounding.
40
+ */
41
+ noRounding?: boolean;
38
42
  }
39
43
  /**
40
44
  * A search bar that can be placed to the sidebar or on a page.
@@ -7,6 +7,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
7
  import React, { useEffect, useState } from "react";
8
8
  import { guid } from "blue-web/dist/js/utils.js";
9
9
  import { getPhrase } from "./shared.js";
10
+ import clsx from "clsx";
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  /**
12
13
  * A search bar that can be placed to the sidebar or on a page.
@@ -23,7 +24,9 @@ export default function Search(props) {
23
24
  id = props.id,
24
25
  inputRef = props.inputRef,
25
26
  _props$inputClassName = props.inputClassName,
26
- inputClassName = _props$inputClassName === void 0 ? "" : _props$inputClassName;
27
+ inputClassName = _props$inputClassName === void 0 ? "" : _props$inputClassName,
28
+ _props$noRounding = props.noRounding,
29
+ noRounding = _props$noRounding === void 0 ? false : _props$noRounding;
27
30
  var SearchControlId = id || "blue-search-control-" + guid();
28
31
  var _useState = useState(props.value || ""),
29
32
  _useState2 = _slicedToArray(_useState, 2),
@@ -39,7 +42,9 @@ export default function Search(props) {
39
42
  if (_onSubmit) _onSubmit(event);
40
43
  },
41
44
  children: /*#__PURE__*/_jsxs("div", {
42
- className: "blue-input-group input-group",
45
+ className: clsx("blue-input-group input-group", {
46
+ "rounded-pill": !noRounding
47
+ }),
43
48
  children: [/*#__PURE__*/_jsxs("label", {
44
49
  htmlFor: SearchControlId,
45
50
  className: "input-group-text",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-react",
3
- "version": "11.0.6",
3
+ "version": "11.1.0",
4
4
  "description": "Blue React Components",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "type": "module",