blue-react 11.1.0 → 11.2.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.
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
export type FieldGroupProps = ComponentProps<"details"> & {
|
|
3
|
+
header?: ReactNode;
|
|
4
|
+
isExpanded?: boolean;
|
|
5
|
+
headerClassName?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
heading?: number;
|
|
8
|
+
pageHeader?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export default function FieldGroup({ className, children, open, header, isExpanded, headerClassName, id, heading, pageHeader, ...rest }: FieldGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["className", "children", "open", "header", "isExpanded", "headerClassName", "id", "heading", "pageHeader"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
|
+
import clsx from "clsx";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
export default function FieldGroup(_ref) {
|
|
13
|
+
var className = _ref.className,
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
open = _ref.open,
|
|
16
|
+
header = _ref.header,
|
|
17
|
+
_ref$isExpanded = _ref.isExpanded,
|
|
18
|
+
isExpanded = _ref$isExpanded === void 0 ? true : _ref$isExpanded,
|
|
19
|
+
headerClassName = _ref.headerClassName,
|
|
20
|
+
id = _ref.id,
|
|
21
|
+
heading = _ref.heading,
|
|
22
|
+
pageHeader = _ref.pageHeader,
|
|
23
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
return /*#__PURE__*/_jsxs("details", _objectSpread(_objectSpread({
|
|
25
|
+
className: clsx("blue-field-group", className),
|
|
26
|
+
open: isExpanded
|
|
27
|
+
}, rest), {}, {
|
|
28
|
+
children: [/*#__PURE__*/_jsxs("summary", {
|
|
29
|
+
role: "heading",
|
|
30
|
+
"aria-level": heading,
|
|
31
|
+
className: clsx(headerClassName, {
|
|
32
|
+
"blue-page-header w-100 mt-0": pageHeader,
|
|
33
|
+
h1: heading === 1,
|
|
34
|
+
h2: heading === 2,
|
|
35
|
+
h3: heading === 3,
|
|
36
|
+
h4: heading === 4,
|
|
37
|
+
h5: heading === 5,
|
|
38
|
+
h6: heading === 6
|
|
39
|
+
}),
|
|
40
|
+
children: [/*#__PURE__*/_jsx("svg", {
|
|
41
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
+
width: "1em",
|
|
43
|
+
height: "1em",
|
|
44
|
+
fill: "currentColor",
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
className: "blue-field-group-chevron bi bi-chevron-right fs-6 opacity-50",
|
|
47
|
+
viewBox: "0 0 16 16",
|
|
48
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
49
|
+
fillRule: "evenodd",
|
|
50
|
+
d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"
|
|
51
|
+
})
|
|
52
|
+
}), header, id !== undefined && id !== null && id !== "" && /*#__PURE__*/_jsx("small", {
|
|
53
|
+
className: "text-secondary ms-1",
|
|
54
|
+
children: id
|
|
55
|
+
})]
|
|
56
|
+
}), children]
|
|
57
|
+
}));
|
|
58
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-react",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Blue React Components",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@popperjs/core": "^2.11.5",
|
|
38
|
-
"blue-web": "^1.
|
|
38
|
+
"blue-web": "^1.25.1",
|
|
39
39
|
"bootstrap": "~5.3.3",
|
|
40
40
|
"clsx": "^1.1.1"
|
|
41
41
|
},
|