revdev-components 0.287.0 → 0.288.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.
package/build/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from "./paragraph";
6
6
  export * from "./pageTitle";
7
7
  export * from "./centralDivision";
8
8
  export * from "./rowDivision";
9
+ export * from "./visibleDivision";
9
10
  export * from "./icon";
10
11
  export * from "./interfaces";
11
12
  export * from "./form";
package/build/index.js CHANGED
@@ -27,14 +27,14 @@ function _interopNamespaceDefault(e) {
27
27
 
28
28
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
29
29
 
30
- var s$M = {"root":"index-module_root__oU85z"};
30
+ var s$N = {"root":"index-module_root__oU85z"};
31
31
 
32
32
  var ContentHeader1 = function (_a) {
33
33
  var children = _a.children, className = _a.className;
34
- return React.createElement("h1", { className: classNames(s$M.root, className) }, children);
34
+ return React.createElement("h1", { className: classNames(s$N.root, className) }, children);
35
35
  };
36
36
 
37
- var s$L = {"root":"index-module_root__51YHj"};
37
+ var s$M = {"root":"index-module_root__51YHj"};
38
38
 
39
39
  /******************************************************************************
40
40
  Copyright (c) Microsoft Corporation.
@@ -129,7 +129,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
129
129
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
130
130
  };
131
131
 
132
- var s$K = {"root":"index-module_root__UzFV2","column":"index-module_column__XEWzG","children":"index-module_children__y7-7m","flex":"index-module_flex__83M30","button":"index-module_button__U8D6K"};
132
+ var s$L = {"root":"index-module_root__UzFV2","column":"index-module_column__XEWzG","children":"index-module_children__y7-7m","flex":"index-module_flex__83M30","button":"index-module_button__U8D6K"};
133
133
 
134
134
  var _path$2$;
135
135
  function _extends$32() { return _extends$32 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$32.apply(null, arguments); }
@@ -2035,13 +2035,13 @@ var SvgCopy = function SvgCopy(props) {
2035
2035
  })));
2036
2036
  };
2037
2037
 
2038
- var s$J = {"root":"index-module_root__-LDR1"};
2038
+ var s$K = {"root":"index-module_root__-LDR1"};
2039
2039
 
2040
2040
  // https://www.svgrepo.com/
2041
2041
  function useBasicIcon(_a, icons) {
2042
2042
  var className = _a.className, name = _a.name, props = __rest(_a, ["className", "name"]);
2043
2043
  var svgAttrs = React.useMemo(function () {
2044
- return __assign({ className: classNames(s$J.root, className), fill: "currentColor" }, props);
2044
+ return __assign({ className: classNames(s$K.root, className), fill: "currentColor" }, props);
2045
2045
  }, [className, props]);
2046
2046
  var Icon = icons[name];
2047
2047
  return Icon ? React.createElement(Icon, __assign({}, svgAttrs)) : undefined;
@@ -2426,14 +2426,14 @@ var AppTooltip = function (_a) {
2426
2426
  var IconBoxContent = function (_a) {
2427
2427
  var _b;
2428
2428
  var flexRoot = _a.flexRoot, icon = _a.icon, rightIcon = _a.rightIcon, children = _a.children, className = _a.className, contentClassName = _a.contentClassName, onClick = _a.onClick, _c = _a.direction, direction = _c === void 0 ? "row" : _c, elementRev = _a.elementRev, style = _a.style, title = _a.title;
2429
- return (React.createElement("div", { ref: elementRev, style: style, title: title, className: classNames(s$K.root, (_b = {},
2430
- _b[s$K.flex] = flexRoot,
2431
- _b[s$K.button] = !!onClick,
2432
- _b[s$K.column] = direction === "column",
2429
+ return (React.createElement("div", { ref: elementRev, style: style, title: title, className: classNames(s$L.root, (_b = {},
2430
+ _b[s$L.flex] = flexRoot,
2431
+ _b[s$L.button] = !!onClick,
2432
+ _b[s$L.column] = direction === "column",
2433
2433
  _b), className), onClick: onClick },
2434
- typeof icon === "string" ? React.createElement(RegularIcon, { className: s$K.icon, name: icon }) : icon,
2435
- children ? React.createElement("div", { className: classNames(contentClassName, s$K.root__children) }, children) : null,
2436
- typeof rightIcon === "string" ? React.createElement(RegularIcon, { className: s$K.icon, name: rightIcon }) : rightIcon));
2434
+ typeof icon === "string" ? React.createElement(RegularIcon, { className: s$L.icon, name: icon }) : icon,
2435
+ children ? React.createElement("div", { className: classNames(contentClassName, s$L.root__children) }, children) : null,
2436
+ typeof rightIcon === "string" ? React.createElement(RegularIcon, { className: s$L.icon, name: rightIcon }) : rightIcon));
2437
2437
  };
2438
2438
  var IconDivision = function (props) {
2439
2439
  var tooltip = props.tooltip, tooltipPlacement = props.tooltipPlacement, tooltipMouseEnterDelay = props.tooltipMouseEnterDelay;
@@ -2446,46 +2446,55 @@ var ContentHeader2 = function (_a) {
2446
2446
  var content = React.useMemo(function () {
2447
2447
  return icon ? React.createElement(IconDivision, { icon: icon }, children) : children;
2448
2448
  }, [icon, className, children]);
2449
- return React.createElement("h2", { className: classNames(s$L.root, className) }, content);
2449
+ return React.createElement("h2", { className: classNames(s$M.root, className) }, content);
2450
2450
  };
2451
2451
 
2452
- var s$I = {"root":"index-module_root__WKOaj"};
2452
+ var s$J = {"root":"index-module_root__WKOaj"};
2453
2453
 
2454
2454
  var ContentHeader3 = function (_a) {
2455
2455
  var icon = _a.icon, children = _a.children, className = _a.className;
2456
2456
  var content = React.useMemo(function () {
2457
2457
  return icon ? React.createElement(IconDivision, { icon: icon }, children) : children;
2458
2458
  }, [icon, className, children]);
2459
- return React.createElement("h3", { className: classNames(s$I.root, className) }, content);
2459
+ return React.createElement("h3", { className: classNames(s$J.root, className) }, content);
2460
2460
  };
2461
2461
 
2462
- var s$H = {"root":"index-module_root__Fq-q1"};
2462
+ var s$I = {"root":"index-module_root__Fq-q1"};
2463
2463
 
2464
2464
  var Paragraph = function (_a) {
2465
2465
  var children = _a.children, className = _a.className;
2466
- return React.createElement("p", { className: classNames(s$H.root, className) }, children);
2466
+ return React.createElement("p", { className: classNames(s$I.root, className) }, children);
2467
2467
  };
2468
2468
 
2469
- var s$G = {"root":"index-module_root__VIFF-"};
2469
+ var s$H = {"root":"index-module_root__VIFF-"};
2470
2470
 
2471
2471
  var PageTitle = function (_a) {
2472
2472
  var children = _a.children, className = _a.className;
2473
- return React.createElement("h1", { className: classNames(s$G.root, className) }, children);
2473
+ return React.createElement("h1", { className: classNames(s$H.root, className) }, children);
2474
2474
  };
2475
2475
 
2476
- var s$F = {"root":"index-module_root__p0I0n"};
2476
+ var s$G = {"root":"index-module_root__p0I0n"};
2477
2477
 
2478
2478
  var CentralDivision = function (_a) {
2479
2479
  var children = _a.children, className = _a.className;
2480
- return React.createElement("div", { className: classNames(s$F.root, className) }, children);
2480
+ return React.createElement("div", { className: classNames(s$G.root, className) }, children);
2481
2481
  };
2482
2482
 
2483
- var s$E = {"root":"index-module_root__yiKO0","first":"index-module_first__560SY","last":"index-module_last__fYezY"};
2483
+ var s$F = {"root":"index-module_root__yiKO0","first":"index-module_first__560SY","last":"index-module_last__fYezY"};
2484
2484
 
2485
2485
  var RowDivision = function (_a) {
2486
2486
  var _b;
2487
2487
  var children = _a.children, className = _a.className, flex = _a.flex;
2488
- return React.createElement("div", { className: classNames(s$E.root, className, (_b = {}, _b[s$E.first] = flex === "first", _b[s$E.last] = flex === "last", _b)) }, children);
2488
+ return React.createElement("div", { className: classNames(s$F.root, className, (_b = {}, _b[s$F.first] = flex === "first", _b[s$F.last] = flex === "last", _b)) }, children);
2489
+ };
2490
+
2491
+ var s$E = {"hidden":"index-module_hidden__AX1jO"};
2492
+
2493
+ /** A div that uses display: none when visible is false. */
2494
+ var VisibleDivision = function (_a) {
2495
+ var _b;
2496
+ var visible = _a.visible, children = _a.children, className = _a.className;
2497
+ return React.createElement("div", { className: classNames(className, (_b = {}, _b[s$E.hidden] = !visible, _b)) }, children);
2489
2498
  };
2490
2499
 
2491
2500
  var _path$j, _path2$a, _path3$8;
@@ -6453,6 +6462,7 @@ exports.SwitchButtonField = SwitchButtonField;
6453
6462
  exports.SwitchField = SwitchField;
6454
6463
  exports.TextAreaField = TextAreaField;
6455
6464
  exports.TextUtil = TextUtil;
6465
+ exports.VisibleDivision = VisibleDivision;
6456
6466
  exports.isFillIconName = isFillIconName;
6457
6467
  exports.isSocialIconName = isSocialIconName;
6458
6468
  exports.useAppFormRules = useAppFormRules;
package/build/styles.css CHANGED
@@ -136,6 +136,9 @@ body {
136
136
  .index-module_root__yiKO0.index-module_last__fYezY > *:last-child {
137
137
  flex: 1;
138
138
  }
139
+ .index-module_hidden__AX1jO {
140
+ display: none;
141
+ }
139
142
  .index-module_root__gtTIa {
140
143
  display: block;
141
144
  }
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface VisibleDivisionProps {
3
+ /** Whether the div is displayed. Hidden content remains mounted. */
4
+ visible: boolean;
5
+ children?: React.ReactNode;
6
+ className?: string;
7
+ }
8
+ /** A div that uses display: none when visible is false. */
9
+ export declare const VisibleDivision: React.FC<VisibleDivisionProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.287.0",
3
+ "version": "0.288.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {