@ballistix.digital/react-components 8.4.0 → 8.5.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
@@ -3634,6 +3634,7 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3634
3634
  getGroupedRowModel: (0, $iA2ta$tanstackreacttable.getGroupedRowModel)(),
3635
3635
  getCoreRowModel: (0, $iA2ta$tanstackreacttable.getCoreRowModel)(),
3636
3636
  getSubRows: (_g = config.options) === null || _g === void 0 ? void 0 : _g.getSubRows,
3637
+ autoResetExpanded: false,
3637
3638
  columns: isDraggable ? $51d5596368acf759$var$__spreadArray([
3638
3639
  {
3639
3640
  id: 'drag-handle',
@@ -6210,8 +6211,13 @@ var $341e1fbf5ffaef7b$export$2e2bcd8739ae039 = $341e1fbf5ffaef7b$var$Switch;
6210
6211
 
6211
6212
 
6212
6213
 
6214
+
6215
+
6216
+
6213
6217
  var $b964d0845ae86974$var$base = {
6214
- container: 'border border-input rounded-lg overflow-hidden border-palette-lightGray',
6218
+ container: '',
6219
+ textAreaWrapper: 'border border-input rounded-lg overflow-hidden border-palette-lightGray',
6220
+ readOnlyWrapper: 'prose prose-sm max-w-none',
6215
6221
  editor: {
6216
6222
  toolbar: {
6217
6223
  container: 'flex items-center gap-1 p-2 border-b border-border',
@@ -6364,10 +6370,12 @@ var $784e2eeeb6b1d65b$var$renderRichNode = function(node, options) {
6364
6370
  });
6365
6371
  };
6366
6372
  var $784e2eeeb6b1d65b$var$RichTextArea = function(_a) {
6367
- var _b = _a.initialValue, initialValue = _b === void 0 ? '[{"type":"paragraph","children":[{"text":"Hello from initial value. Edit me!"}]}]' : _b, onChange = _a.onChange, _c = _a.placeholder, placeholder = _c === void 0 ? "Type something\u2026" : _c, className = _a.className, stylesOverrides = _a.styles, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, toolbarConfig = _a.toolbarConfig;
6373
+ var _b = _a.name, name = _b === void 0 ? 'rich-text-area' : _b, _c = _a.initialValue, initialValue = _c === void 0 ? '[{"type":"paragraph","children":[{"text":"Hello from initial value. Edit me!"}]}]' : _c, onChange = _a.onChange, _d = _a.placeholder, placeholder = _d === void 0 ? "Type something\u2026" : _d, stylesOverrides = _a.styles, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, toolbarConfig = _a.toolbarConfig, //Header
6374
+ label = _a.label, description = _a.description, required = _a.required, isRequired = _a.isRequired, isOptionalLabelHidden = _a.isOptionalLabelHidden, //Footer
6375
+ hint = _a.hint, error = _a.error, isTouched = _a.isTouched;
6368
6376
  var styles = (0, $iA2ta$react.useMemo)(function() {
6369
- var result = (0, $iA2ta$lodash.cloneDeep)((0, $b964d0845ae86974$export$2e2bcd8739ae039));
6370
- var keys = (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $b964d0845ae86974$export$2e2bcd8739ae039));
6377
+ var result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $b964d0845ae86974$export$2e2bcd8739ae039));
6378
+ var keys = (0, $iA2ta$lodash.concat)((0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $b964d0845ae86974$export$2e2bcd8739ae039)), (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $3369f7d596d23d58$export$2e2bcd8739ae039).base), (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $65bb4d593718fcda$export$2e2bcd8739ae039).base));
6371
6379
  (0, $iA2ta$lodash.forEach)(keys, function(key) {
6372
6380
  (0, $iA2ta$lodash.set)(result, key, (0, $622cd2936b18c771$export$4370d69198e9314a)((0, $iA2ta$lodash.get)((0, $b964d0845ae86974$export$2e2bcd8739ae039), key), (0, $iA2ta$lodash.get)(stylesOverrides, key)));
6373
6381
  });
@@ -6494,44 +6502,64 @@ var $784e2eeeb6b1d65b$var$RichTextArea = function(_a) {
6494
6502
  ]);
6495
6503
  if (isReadOnly && (0, $iA2ta$lodash.isEmpty)(parsedInitialValue)) return null;
6496
6504
  return isReadOnly ? (0, $iA2ta$reactjsxruntime.jsx)("div", {
6497
- className: (0, $622cd2936b18c771$export$4370d69198e9314a)('prose prose-sm max-w-none', styles.readOnly.container, className),
6505
+ className: styles.readOnlyWrapper,
6498
6506
  children: (0, $iA2ta$lodash.isArray)(parsedInitialValue) ? (0, $iA2ta$lodash.map)(parsedInitialValue, function(n, i) {
6499
6507
  return $784e2eeeb6b1d65b$var$renderRichNode(n, {
6500
6508
  key: i
6501
6509
  });
6502
6510
  }) : null
6503
- }) : (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$slatereact.Slate), {
6504
- editor: editor,
6505
- initialValue: parsedInitialValue,
6506
- onChange: handleChange,
6507
- children: (0, $iA2ta$reactjsxruntime.jsxs)("div", {
6508
- className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.container, className),
6509
- children: [
6510
- (0, $iA2ta$reactjsxruntime.jsx)("div", {
6511
- className: styles.editor.toolbar.container,
6512
- children: renderToolbarGroups()
6513
- }),
6514
- (0, $iA2ta$reactjsxruntime.jsx)("div", {
6515
- className: styles.editor.area.container,
6516
- children: (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$slatereact.Editable), {
6517
- renderElement: renderElement,
6518
- renderLeaf: renderLeaf,
6519
- className: styles.editor.area.editable,
6520
- placeholder: placeholder,
6521
- spellCheck: true,
6522
- autoFocus: true,
6523
- onKeyDown: function(event) {
6524
- (0, $iA2ta$lodash.forEach)($784e2eeeb6b1d65b$var$HOTKEYS, function(mark, hotkey) {
6525
- if ((0, ($parcel$interopDefault($iA2ta$ishotkey)))(hotkey, event)) {
6526
- event.preventDefault();
6527
- $784e2eeeb6b1d65b$export$797ad2667b8015a8(editor, mark);
6511
+ }) : (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$reactjsxruntime.Fragment), {
6512
+ children: [
6513
+ (0, $iA2ta$reactjsxruntime.jsx)((0, $9314e0aa7f1e874e$export$2e2bcd8739ae039), {
6514
+ name: name,
6515
+ label: label,
6516
+ required: required,
6517
+ isRequired: isRequired,
6518
+ isOptionalLabelHidden: isOptionalLabelHidden,
6519
+ styles: styles,
6520
+ description: description
6521
+ }),
6522
+ (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$slatereact.Slate), {
6523
+ editor: editor,
6524
+ initialValue: parsedInitialValue,
6525
+ onChange: handleChange,
6526
+ children: (0, $iA2ta$reactjsxruntime.jsxs)("div", {
6527
+ className: styles.textAreaWrapper,
6528
+ children: [
6529
+ (0, $iA2ta$reactjsxruntime.jsx)("div", {
6530
+ className: styles.editor.toolbar.container,
6531
+ children: renderToolbarGroups()
6532
+ }),
6533
+ (0, $iA2ta$reactjsxruntime.jsx)("div", {
6534
+ className: styles.editor.area.container,
6535
+ children: (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$slatereact.Editable), {
6536
+ renderElement: renderElement,
6537
+ renderLeaf: renderLeaf,
6538
+ className: styles.editor.area.editable,
6539
+ placeholder: placeholder,
6540
+ spellCheck: true,
6541
+ autoFocus: true,
6542
+ onKeyDown: function(event) {
6543
+ (0, $iA2ta$lodash.forEach)($784e2eeeb6b1d65b$var$HOTKEYS, function(mark, hotkey) {
6544
+ if ((0, ($parcel$interopDefault($iA2ta$ishotkey)))(hotkey, event)) {
6545
+ event.preventDefault();
6546
+ $784e2eeeb6b1d65b$export$797ad2667b8015a8(editor, mark);
6547
+ }
6548
+ });
6528
6549
  }
6529
- });
6530
- }
6531
- })
6550
+ })
6551
+ })
6552
+ ]
6532
6553
  })
6533
- ]
6534
- })
6554
+ }),
6555
+ (0, $iA2ta$reactjsxruntime.jsx)((0, $dfbd7d015eae4218$export$2e2bcd8739ae039), {
6556
+ name: name,
6557
+ error: error,
6558
+ isTouched: isTouched,
6559
+ hint: hint,
6560
+ styles: styles
6561
+ })
6562
+ ]
6535
6563
  });
6536
6564
  };
6537
6565
  var $784e2eeeb6b1d65b$export$65eead07296cdb21 = function(editor, format) {