@ballistix.digital/react-components 8.5.4 → 8.5.5-rc-117.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/dist/index.js CHANGED
@@ -2263,6 +2263,7 @@ https://www.npmjs.com/package/react-tailwindcss-select
2263
2263
 
2264
2264
  var $f32ee84b87891376$var$base = {
2265
2265
  container: '',
2266
+ wrapperContainer: '',
2266
2267
  body: 'relative rounded-md',
2267
2268
  leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
2268
2269
  input: 'block w-full flex border',
@@ -2391,7 +2392,7 @@ var $f3fccf014e1f10d5$var$SelectMenuForm = function(props) {
2391
2392
  description: description
2392
2393
  }),
2393
2394
  (0, $iA2ta$reactjsxruntime.jsxs)("div", {
2394
- className: styles.container,
2395
+ className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.container, styles.wrapperContainer),
2395
2396
  children: [
2396
2397
  (0, $iA2ta$reactjsxruntime.jsx)("div", {
2397
2398
  "data-cy": selectDataCy,
@@ -6228,6 +6229,7 @@ var $b964d0845ae86974$var$base = {
6228
6229
  },
6229
6230
  area: {
6230
6231
  container: 'overflow-hidden p-4',
6232
+ emptyLine: 'min-h-[1em] leading-none',
6231
6233
  editable: 'leading-7 focus:outline-none prose prose-sm max-w-none prose-headings:font-semibold prose-h1:text-2xl prose-h2:text-xl prose-p:my-3 prose-blockquote:my-3'
6232
6234
  }
6233
6235
  },
@@ -6338,10 +6340,32 @@ var $784e2eeeb6b1d65b$var$applyMarks = function(content, marks) {
6338
6340
  });
6339
6341
  return content;
6340
6342
  };
6343
+ var $784e2eeeb6b1d65b$var$isNodeTextEmpty = function(node) {
6344
+ var _a, _b;
6345
+ if ((0, $iA2ta$slate.Text).isText(node)) return ((_a = node.text) !== null && _a !== void 0 ? _a : '').trim() === '';
6346
+ if ((0, $iA2ta$slate.Editor).isEditor(node) || (0, $iA2ta$slate.Element).isElement(node)) {
6347
+ var children = (_b = node.children) !== null && _b !== void 0 ? _b : [];
6348
+ if ((0, $iA2ta$lodash.isEmpty)(children)) return true;
6349
+ return (0, $iA2ta$lodash.every)(children, function(child) {
6350
+ return $784e2eeeb6b1d65b$var$isNodeTextEmpty(child);
6351
+ });
6352
+ }
6353
+ return true;
6354
+ };
6355
+ var $784e2eeeb6b1d65b$var$isDocumentAllTextEmpty = function(value) {
6356
+ if (!(0, $iA2ta$lodash.isArray)(value) || (0, $iA2ta$lodash.isEmpty)(value)) return true;
6357
+ return (0, $iA2ta$lodash.every)(value, function(node) {
6358
+ return $784e2eeeb6b1d65b$var$isNodeTextEmpty(node);
6359
+ });
6360
+ };
6341
6361
  var $784e2eeeb6b1d65b$var$renderRichNode = function(node, options) {
6342
6362
  if (options === void 0) options = {};
6343
6363
  var attributes = options.attributes, providedChildren = options.children, key = options.key;
6344
6364
  if ((0, $iA2ta$slate.Text).isText(node)) {
6365
+ if (String(providedChildren !== null && providedChildren !== void 0 ? providedChildren : node.text).trim() === '') return (0, $iA2ta$reactjsxruntime.jsx)("div", {
6366
+ className: (0, $b964d0845ae86974$export$2e2bcd8739ae039).editor.area.emptyLine,
6367
+ "aria-hidden": "true"
6368
+ }, key);
6345
6369
  var content = $784e2eeeb6b1d65b$var$applyMarks(providedChildren !== null && providedChildren !== void 0 ? providedChildren : node.text, node);
6346
6370
  return attributes ? (0, $iA2ta$reactjsxruntime.jsx)("span", $784e2eeeb6b1d65b$var$__assign({}, attributes, {
6347
6371
  children: content
@@ -6485,7 +6509,7 @@ var $784e2eeeb6b1d65b$var$RichTextArea = function(_a) {
6485
6509
  generateBlockButton('justify', 'align-justify')
6486
6510
  ]);
6487
6511
  if (!(0, $iA2ta$lodash.isEmpty)(align)) sections.push(align);
6488
- return sections.map(function(group, index) {
6512
+ return (0, $iA2ta$lodash.map)(sections, function(group, index) {
6489
6513
  return (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$react.Fragment), {
6490
6514
  children: [
6491
6515
  index > 0 && (0, $iA2ta$reactjsxruntime.jsx)("div", {
@@ -6500,7 +6524,7 @@ var $784e2eeeb6b1d65b$var$RichTextArea = function(_a) {
6500
6524
  generateBlockButton,
6501
6525
  styles.editor.toolbar.divider
6502
6526
  ]);
6503
- if (isReadOnly && (0, $iA2ta$lodash.isEmpty)(parsedInitialValue)) return null;
6527
+ if (isReadOnly && ((0, $iA2ta$lodash.isEmpty)(parsedInitialValue) || $784e2eeeb6b1d65b$var$isDocumentAllTextEmpty(parsedInitialValue))) return null;
6504
6528
  return isReadOnly ? (0, $iA2ta$reactjsxruntime.jsx)("div", {
6505
6529
  className: styles.readOnlyWrapper,
6506
6530
  children: (0, $iA2ta$lodash.isArray)(parsedInitialValue) ? (0, $iA2ta$lodash.map)(parsedInitialValue, function(n, i) {