@rocket.chat/fuselage 0.65.0 → 0.66.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.
@@ -4665,7 +4665,7 @@ var fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@
4665
4665
  var react_1 = __webpack_require__(/*! react */ "react");
4666
4666
  var Box_1 = __importDefault(__webpack_require__(/*! ../Box */ "./src/components/Box/index.ts"));
4667
4667
  exports.CheckBox = (0, react_1.forwardRef)(function CheckBox(_a, ref) {
4668
- var indeterminate = _a.indeterminate, onChange = _a.onChange, className = _a.className, props = __rest(_a, ["indeterminate", "onChange", "className"]);
4668
+ var indeterminate = _a.indeterminate, onChange = _a.onChange, className = _a.className, labelChildren = _a.labelChildren, props = __rest(_a, ["indeterminate", "onChange", "className", "labelChildren"]);
4669
4669
  var innerRef = (0, react_1.useRef)(null);
4670
4670
  var mergedRef = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
4671
4671
  (0, react_1.useLayoutEffect)(function () {
@@ -4679,7 +4679,7 @@ exports.CheckBox = (0, react_1.forwardRef)(function CheckBox(_a, ref) {
4679
4679
  }
4680
4680
  onChange === null || onChange === void 0 ? void 0 : onChange.call(innerRef.current, event);
4681
4681
  }, [innerRef, indeterminate, onChange]);
4682
- return ((0, jsx_runtime_1.jsxs)(Box_1.default, { is: 'label', className: className, "rcx-check-box": true, children: [(0, jsx_runtime_1.jsx)(Box_1.default, __assign({ is: 'input', type: 'checkbox', "rcx-check-box__input": true, ref: mergedRef, onChange: handleChange }, props)), (0, jsx_runtime_1.jsx)(Box_1.default, { is: 'i', "rcx-check-box__fake": true, "aria-hidden": 'true' })] }));
4682
+ return ((0, jsx_runtime_1.jsxs)(Box_1.default, { is: 'label', className: className, "rcx-check-box": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.default, __assign({ is: 'input', type: 'checkbox', "rcx-check-box__input": true, ref: mergedRef, onChange: handleChange }, props)), (0, jsx_runtime_1.jsx)(Box_1.default, { is: 'i', "rcx-check-box__fake": true, "aria-hidden": 'true' })] }));
4683
4683
  });
4684
4684
 
4685
4685
 
@@ -6366,18 +6366,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6366
6366
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6367
6367
  exports.FieldLabel = void 0;
6368
6368
  var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "../../node_modules/react/jsx-runtime.js");
6369
+ var react_1 = __webpack_require__(/*! react */ "react");
6369
6370
  var WithErrorWrapper_1 = __importDefault(__webpack_require__(/*! ../../helpers/WithErrorWrapper */ "./src/helpers/WithErrorWrapper.tsx"));
6370
6371
  var Label_1 = __webpack_require__(/*! ../Label */ "./src/components/Label/index.tsx");
6371
6372
  var Field_1 = __webpack_require__(/*! ./Field */ "./src/components/Field/Field.tsx");
6372
- var FieldLabel = function (props) {
6373
- var component = (0, jsx_runtime_1.jsx)(Label_1.Label, __assign({ "rcx-field__label": true }, props));
6373
+ exports.FieldLabel = (0, react_1.forwardRef)(function FieldLabel(props, ref) {
6374
+ var component = (0, jsx_runtime_1.jsx)(Label_1.Label, __assign({ "rcx-field__label": true }, props, { ref: ref }));
6374
6375
  if (true) {
6375
- return ((0, jsx_runtime_1.jsx)(WithErrorWrapper_1.default, { context: Field_1.FieldContext, parentComponent: 'Field', componentName: exports.FieldLabel.name, children: component }));
6376
+ return ((0, jsx_runtime_1.jsx)(WithErrorWrapper_1.default, { context: Field_1.FieldContext, parentComponent: 'Field', componentName: FieldLabel.name, children: component }));
6376
6377
  }
6377
6378
  // removed by dead control flow
6378
6379
  {}
6379
- };
6380
- exports.FieldLabel = FieldLabel;
6380
+ });
6381
6381
 
6382
6382
 
6383
6383
  /***/ }),
@@ -7405,7 +7405,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7405
7405
  return (mod && mod.__esModule) ? mod : { "default": mod };
7406
7406
  };
7407
7407
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7408
- exports.Label = Label;
7408
+ exports.Label = void 0;
7409
7409
  var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "../../node_modules/react/jsx-runtime.js");
7410
7410
  var react_1 = __webpack_require__(/*! react */ "react");
7411
7411
  var Box_1 = __importDefault(__webpack_require__(/*! ../Box */ "./src/components/Box/index.ts"));
@@ -7413,12 +7413,12 @@ var LabelContext = (0, react_1.createContext)(false);
7413
7413
  /**
7414
7414
  * A caption for an input component.
7415
7415
  */
7416
- function Label(_a) {
7416
+ exports.Label = (0, react_1.forwardRef)(function Label(_a, ref) {
7417
7417
  var disabled = _a.disabled, is = _a.is, required = _a.required, children = _a.children, props = __rest(_a, ["disabled", "is", "required", "children"]);
7418
7418
  var isInsideLabel = (0, react_1.useContext)(LabelContext);
7419
7419
  var component = is || (isInsideLabel && 'span') || 'label';
7420
- return ((0, jsx_runtime_1.jsx)(LabelContext.Provider, { value: true, children: (0, jsx_runtime_1.jsxs)(Box_1.default, __assign({ is: component, "rcx-label": true, "rcx-label--disabled": disabled }, props, { children: [children, required && ((0, jsx_runtime_1.jsx)(Box_1.default, { is: 'span', "rcx-label__required": true, mis: 'x4', "aria-hidden": 'true', children: "*" }))] })) }));
7421
- }
7420
+ return ((0, jsx_runtime_1.jsx)(LabelContext.Provider, { value: true, children: (0, jsx_runtime_1.jsxs)(Box_1.default, __assign({ is: component, "rcx-label": true, "rcx-label--disabled": disabled }, props, { ref: ref, children: [children, required && ((0, jsx_runtime_1.jsx)(Box_1.default, { is: 'span', "rcx-label__required": true, mis: 'x4', "aria-hidden": 'true', children: "*" }))] })) }));
7421
+ });
7422
7422
 
7423
7423
 
7424
7424
  /***/ }),
@@ -14658,8 +14658,8 @@ var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "../../node_mod
14658
14658
  var react_1 = __webpack_require__(/*! react */ "react");
14659
14659
  var Box_1 = __importDefault(__webpack_require__(/*! ../Box */ "./src/components/Box/index.ts"));
14660
14660
  exports.RadioButton = (0, react_1.forwardRef)(function RadioButton(_a, ref) {
14661
- var className = _a.className, props = __rest(_a, ["className"]);
14662
- return ((0, jsx_runtime_1.jsxs)(Box_1.default, { is: 'label', className: className, "rcx-radio-button": true, children: [(0, jsx_runtime_1.jsx)(Box_1.default, __assign({ is: 'input', "rcx-radio-button__input": true, type: 'radio', ref: ref }, props)), (0, jsx_runtime_1.jsx)(Box_1.default, { is: 'i', "rcx-radio-button__fake": true, "aria-hidden": 'true' })] }));
14661
+ var className = _a.className, labelChildren = _a.labelChildren, props = __rest(_a, ["className", "labelChildren"]);
14662
+ return ((0, jsx_runtime_1.jsxs)(Box_1.default, { is: 'label', className: className, "rcx-radio-button": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.default, __assign({ is: 'input', "rcx-radio-button__input": true, type: 'radio', ref: ref }, props)), (0, jsx_runtime_1.jsx)(Box_1.default, { is: 'i', "rcx-radio-button__fake": true, "aria-hidden": 'true' })] }));
14663
14663
  });
14664
14664
 
14665
14665
 
@@ -20268,8 +20268,8 @@ var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "../../node_mod
20268
20268
  var react_1 = __webpack_require__(/*! react */ "react");
20269
20269
  var Box_1 = __importDefault(__webpack_require__(/*! ../Box */ "./src/components/Box/index.ts"));
20270
20270
  exports.ToggleSwitch = (0, react_1.forwardRef)(function ToggleSwitch(_a, ref) {
20271
- var className = _a.className, props = __rest(_a, ["className"]);
20272
- return ((0, jsx_runtime_1.jsxs)(Box_1.default, { is: 'label', className: className, "rcx-toggle-switch": true, children: [(0, jsx_runtime_1.jsx)(Box_1.default, __assign({ is: 'input', ref: ref, "rcx-toggle-switch__input": true, type: 'checkbox' }, props)), (0, jsx_runtime_1.jsx)(Box_1.default, { is: 'i', "rcx-toggle-switch__fake": true, "aria-hidden": 'true' })] }));
20271
+ var className = _a.className, labelChildren = _a.labelChildren, props = __rest(_a, ["className", "labelChildren"]);
20272
+ return ((0, jsx_runtime_1.jsxs)(Box_1.default, { is: 'label', className: className, "rcx-toggle-switch": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.default, __assign({ is: 'input', ref: ref, "rcx-toggle-switch__input": true, type: 'checkbox' }, props)), (0, jsx_runtime_1.jsx)(Box_1.default, { is: 'i', "rcx-toggle-switch__fake": true, "aria-hidden": 'true' })] }));
20273
20273
  });
20274
20274
 
20275
20275