@rocket.chat/fuselage-forms 0.1.0 → 0.1.1

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.
Files changed (36) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/Field/Field.d.ts +1 -1
  3. package/dist/cjs/Field/Field.d.ts.map +1 -1
  4. package/dist/cjs/Field/FieldContext.d.ts +5 -1
  5. package/dist/cjs/Field/FieldContext.d.ts.map +1 -1
  6. package/dist/cjs/Field/FieldContext.js +34 -13
  7. package/dist/cjs/Field/FieldContext.js.map +1 -1
  8. package/dist/cjs/Field/FieldProvider.d.ts +1 -1
  9. package/dist/cjs/Field/FieldProvider.d.ts.map +1 -1
  10. package/dist/cjs/Field/FieldProvider.js +10 -0
  11. package/dist/cjs/Field/FieldProvider.js.map +1 -1
  12. package/dist/cjs/Field/Label/FieldLabel.d.ts +1 -1
  13. package/dist/cjs/Field/Label/FieldLabel.d.ts.map +1 -1
  14. package/dist/cjs/Inputs/WrappedInputComponents.d.ts +27 -74
  15. package/dist/cjs/Inputs/WrappedInputComponents.d.ts.map +1 -1
  16. package/dist/cjs/Inputs/withLabelHelpers.d.ts.map +1 -1
  17. package/dist/cjs/Inputs/withLabelHelpers.js +2 -2
  18. package/dist/cjs/Inputs/withLabelHelpers.js.map +1 -1
  19. package/dist/esm/Field/Field.d.ts +1 -1
  20. package/dist/esm/Field/Field.d.ts.map +1 -1
  21. package/dist/esm/Field/FieldContext.d.ts +5 -1
  22. package/dist/esm/Field/FieldContext.d.ts.map +1 -1
  23. package/dist/esm/Field/FieldContext.js +34 -13
  24. package/dist/esm/Field/FieldContext.js.map +1 -1
  25. package/dist/esm/Field/FieldProvider.d.ts +1 -1
  26. package/dist/esm/Field/FieldProvider.d.ts.map +1 -1
  27. package/dist/esm/Field/FieldProvider.js +10 -0
  28. package/dist/esm/Field/FieldProvider.js.map +1 -1
  29. package/dist/esm/Field/Label/FieldLabel.d.ts +1 -1
  30. package/dist/esm/Field/Label/FieldLabel.d.ts.map +1 -1
  31. package/dist/esm/Inputs/WrappedInputComponents.d.ts +27 -74
  32. package/dist/esm/Inputs/WrappedInputComponents.d.ts.map +1 -1
  33. package/dist/esm/Inputs/withLabelHelpers.d.ts.map +1 -1
  34. package/dist/esm/Inputs/withLabelHelpers.js +2 -2
  35. package/dist/esm/Inputs/withLabelHelpers.js.map +1 -1
  36. package/package.json +19 -16
package/README.md CHANGED
@@ -25,11 +25,11 @@
25
25
  Firstly, install the peer dependencies (prerequisites):
26
26
 
27
27
  ```sh
28
- npm i @rocket.chat/fuselage react react-dom
28
+ npm i @rocket.chat/fuselage @rocket.chat/fuselage-hooks react react-dom
29
29
 
30
30
  # or, if you are using yarn:
31
31
 
32
- yarn add @rocket.chat/fuselage react react-dom
32
+ yarn add @rocket.chat/fuselage @rocket.chat/fuselage-hooks react react-dom
33
33
  ```
34
34
 
35
35
  Add `@rocket.chat/fuselage-forms` as a dependency:
@@ -1,5 +1,5 @@
1
1
  import { Field as FieldComponent } from '@rocket.chat/fuselage';
2
- import { ComponentProps, ReactNode } from 'react';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
3
  type FieldProps = {
4
4
  children: ReactNode;
5
5
  } & ComponentProps<typeof FieldComponent>;
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/Field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlD,KAAK,UAAU,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,cAAc,CACxD,OAAO,cAAc,CACtB,CAAC;AAEF,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAMhD;AAED,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/Field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,KAAK,UAAU,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,cAAc,CACxD,OAAO,cAAc,CACtB,CAAC;AAEF,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAMhD;AAED,eAAe,KAAK,CAAC"}
@@ -7,6 +7,8 @@ type FieldContextValue = {
7
7
  id: string;
8
8
  fieldType: FieldType;
9
9
  setFieldType: (fieldType: FieldType) => void;
10
+ emitAction: () => void;
11
+ onAction: (cb: () => void) => void;
10
12
  };
11
13
  export declare const FieldContext: import("react").Context<FieldContextValue>;
12
14
  export type LabelTypes = 'hint' | 'description' | 'error' | 'placeholder';
@@ -26,6 +28,8 @@ export declare const useFieldReferencedByLabel: () => {
26
28
  };
27
29
  export declare const useFieldWrappedByInputLabel: () => [ReactNode, {
28
30
  "aria-describedby": string;
29
- }];
31
+ "id": string;
32
+ "aria-invalid": "true" | "false";
33
+ }, RefCallback<HTMLElement>];
30
34
  export {};
31
35
  //# sourceMappingURL=FieldContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContext.d.ts","sourceRoot":"","sources":["../../../src/Field/FieldContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AASpD,KAAK,iBAAiB,GAAG;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAC7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CAAC;IACX,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IAC7C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,YAAY,4CAUvB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,aAAa,CAAC;AAE1E,MAAM,MAAM,SAAS,GACjB,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,CAAC;AAoBxB,eAAO,MAAM,aAAa,QAAO,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,CAsBjE,CAAC;AAEF,eAAO,MAAM,iBAAiB,iBAG7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,MAAM,UAAU,WASpD,CAAC;AA0BF,eAAO,MAAM,yBAAyB;oBARjB,MAAM,GAAG,OAAO;;;CAuBpC,CAAC;AAGF,eAAO,MAAM,yBAAyB;oBA1BjB,MAAM,GAAG,OAAO;;;CAyCpC,CAAC;AAGF,eAAO,MAAM,2BAA2B,QAAO,CAC7C,SAAS,EACT;IACE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC,EACD,WAAW,CAAC,WAAW,CAAC,CAqCzB,CAAC"}
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.useFieldWrappedByInputLabel = exports.useFieldReferencedByLabel = exports.useFieldReferencedByInput = exports.useFieldDescriptorId = exports.useFieldFieldType = exports.useFieldLabel = exports.FieldContext = void 0;
15
+ var fuselage_hooks_1 = require("@rocket.chat/fuselage-hooks");
15
16
  var react_1 = require("react");
16
17
  exports.FieldContext = (0, react_1.createContext)({
17
18
  setDescriptor: function () { },
@@ -21,21 +22,31 @@ exports.FieldContext = (0, react_1.createContext)({
21
22
  id: '',
22
23
  fieldType: 'referencedByLabel',
23
24
  setFieldType: function () { },
25
+ emitAction: function () { },
26
+ onAction: function () { },
24
27
  });
28
+ var getTextFromNode = function (node) {
29
+ if (!node.textContent) {
30
+ return null;
31
+ }
32
+ var text = [];
33
+ var treeWalker = node.ownerDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT);
34
+ while (treeWalker.nextNode()) {
35
+ text.push(treeWalker.currentNode.textContent);
36
+ }
37
+ return text.join(' ');
38
+ };
25
39
  var useFieldLabel = function () {
26
- var _a = (0, react_1.useContext)(exports.FieldContext), setLabel = _a.setLabel, id = _a.id;
27
- var setLabelRef = (0, react_1.useCallback)(function (node) {
28
- if (!node || !node.textContent) {
29
- setLabel(null);
40
+ var _a = (0, react_1.useContext)(exports.FieldContext), setLabel = _a.setLabel, id = _a.id, emitAction = _a.emitAction;
41
+ var setLabelRef = (0, fuselage_hooks_1.useSafeRefCallback)((0, react_1.useCallback)(function (node) {
42
+ if (!node) {
30
43
  return;
31
44
  }
32
- var text = [];
33
- var treeWalker = node.ownerDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT);
34
- while (treeWalker.nextNode()) {
35
- text.push(treeWalker.currentNode.textContent);
36
- }
37
- setLabel(text.join(' '));
38
- }, [setLabel]);
45
+ setLabel(getTextFromNode(node));
46
+ var onClick = function () { return emitAction(); };
47
+ node.addEventListener('click', onClick);
48
+ return function () { return node.removeEventListener('click', onClick); };
49
+ }, [setLabel, emitAction]));
39
50
  return [setLabelRef, "".concat(id, "-label")];
40
51
  };
41
52
  exports.useFieldLabel = useFieldLabel;
@@ -91,14 +102,24 @@ var useFieldReferencedByLabel = function () {
91
102
  exports.useFieldReferencedByLabel = useFieldReferencedByLabel;
92
103
  // label is rendered visually hidden inside the inputs wrapper label
93
104
  var useFieldWrappedByInputLabel = function () {
94
- var _a = (0, react_1.useContext)(exports.FieldContext), id = _a.id, label = _a.label, descriptors = _a.descriptors, setFieldType = _a.setFieldType;
105
+ var _a = (0, react_1.useContext)(exports.FieldContext), id = _a.id, label = _a.label, descriptors = _a.descriptors, setFieldType = _a.setFieldType, onAction = _a.onAction;
95
106
  (0, react_1.useEffect)(function () {
96
107
  setFieldType('wrappedByLabel');
97
108
  }, [setFieldType]);
109
+ var refCallback = (0, fuselage_hooks_1.useSafeRefCallback)((0, react_1.useCallback)(function (node) {
110
+ if (!node) {
111
+ return;
112
+ }
113
+ onAction(function () {
114
+ node.focus();
115
+ node.click();
116
+ });
117
+ }, [onAction]));
98
118
  return (0, react_1.useMemo)(function () { return [
99
119
  label,
100
120
  __assign({ 'aria-describedby': getDescribedBy(descriptors, id), 'id': getInputId(id, descriptors) }, getAriaInvalid(descriptors)),
101
- ]; }, [label, id, descriptors]);
121
+ refCallback,
122
+ ]; }, [label, descriptors, id, refCallback]);
102
123
  };
103
124
  exports.useFieldWrappedByInputLabel = useFieldWrappedByInputLabel;
104
125
  //# sourceMappingURL=FieldContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContext.js","sourceRoot":"","sources":["../../../src/Field/FieldContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,+BAMe;AAYF,QAAA,YAAY,GAAG,IAAA,qBAAa,EAAoB;IAC3D,aAAa,EAAE,cAAO,CAAC;IACvB,QAAQ,EAAE,cAAO,CAAC;IAClB,WAAW,EAAE,IAAI,GAAG,EAAE;IACtB,KAAK,EAAE,IAAI;IACX,EAAE,EAAE,EAAE;IACN,SAAS,EAAE,mBAAmB;IAC9B,YAAY,EAAE,cAAO,CAAC;CACvB,CAAC,CAAC;AASI,IAAM,aAAa,GAAG;IACrB,IAAA,KAAmB,IAAA,kBAAU,EAAC,oBAAY,CAAC,EAAzC,QAAQ,cAAA,EAAE,EAAE,QAA6B,CAAC;IAElD,IAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,UAAC,IAAiB;QAChB,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ACF,CAAC;IAEF,OAAO,IAAA,eAAO,EACZ,cAAM,OAAA;QACJ,KAAK;mBAEH,kBAAkB,EAAE,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC,EACnD,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,WAAW,CAAC,IAC9B,cAAc,CAAC,WAAW,CAAC;QAEhC,WAAW;KACZ,EARK,CAQL,EACD,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,CAAC,CACtC,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,2BAA2B,+BA4CtC"}
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  type FieldProviderProps = {
3
3
  children: ReactNode;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FieldProvider.d.ts","sourceRoot":"","sources":["../../../src/Field/FieldProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzD,KAAK,kBAAkB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAElD,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAsCtD;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"FieldProvider.d.ts","sourceRoot":"","sources":["../../../src/Field/FieldProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,KAAK,kBAAkB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAElD,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAoDtD;AAED,eAAe,aAAa,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var jsx_runtime_1 = require("react/jsx-runtime");
4
+ var emitter_1 = require("@rocket.chat/emitter");
4
5
  var react_1 = require("react");
5
6
  var react_aria_1 = require("react-aria");
6
7
  var FieldContext_1 = require("./FieldContext");
@@ -10,6 +11,7 @@ function FieldProvider(_a) {
10
11
  var _b = (0, react_1.useState)(null), label = _b[0], setLabel = _b[1];
11
12
  var _c = (0, react_1.useState)(new Set()), descriptors = _c[0], setDescriptors = _c[1];
12
13
  var _d = (0, react_1.useState)('referencedByInput'), fieldType = _d[0], setFieldType = _d[1];
14
+ var emitter = (0, react_1.useState)(function () { return new emitter_1.Emitter(); })[0];
13
15
  var setDescriptor = (0, react_1.useCallback)(function (type, unregister) {
14
16
  setDescriptors(function (labels) {
15
17
  var _labelMap = new Set(labels);
@@ -21,7 +23,15 @@ function FieldProvider(_a) {
21
23
  return _labelMap;
22
24
  });
23
25
  }, []);
26
+ var emitAction = (0, react_1.useCallback)(function () {
27
+ emitter.emit('action');
28
+ }, [emitter]);
29
+ var onAction = (0, react_1.useCallback)(function (cb) {
30
+ return emitter.on('action', cb);
31
+ }, [emitter]);
24
32
  return ((0, jsx_runtime_1.jsx)(FieldContext_1.FieldContext.Provider, { value: {
33
+ emitAction: emitAction,
34
+ onAction: onAction,
25
35
  setDescriptor: setDescriptor,
26
36
  setLabel: setLabel,
27
37
  descriptors: descriptors,
@@ -1 +1 @@
1
- {"version":3,"file":"FieldProvider.js","sourceRoot":"","sources":["../../../src/Field/FieldProvider.tsx"],"names":[],"mappings":";;;AAAA,+BAAyD;AACzD,yCAAmC;AAEnC,+CAAqE;AAIrE,SAAS,aAAa,CAAC,EAAgC;QAA9B,QAAQ,cAAA;IAC/B,IAAM,EAAE,GAAG,IAAA,kBAAK,GAAE,CAAC;IACb,IAAA,KAAoB,IAAA,gBAAQ,EAAmB,IAAI,CAAC,EAAnD,KAAK,QAAA,EAAE,QAAQ,QAAoC,CAAC;IACrD,IAAA,KAAgC,IAAA,gBAAQ,EAAC,IAAI,GAAG,EAAc,CAAC,EAA9D,WAAW,QAAA,EAAE,cAAc,QAAmC,CAAC;IAChE,IAAA,KAA4B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.chat/fuselage';
1
+ import type { FieldLabel as FieldLabelComponent } from '@rocket.chat/fuselage';
2
2
  import { type ComponentPropsWithoutRef } from 'react';
3
3
  type FieldLabelProps = ComponentPropsWithoutRef<typeof FieldLabelComponent>;
4
4
  declare const FieldLabel: (props: FieldLabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAQtD,KAAK,eAAe,GAAG,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5E,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,4CAWzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAQtD,KAAK,eAAe,GAAG,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5E,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,4CAWzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,35 +1,27 @@
1
1
  export declare const TextInput: {
2
- (props: Omit<import("@rocket.chat/fuselage").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
2
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
3
+ addon?: import("react").ReactNode;
4
+ error?: string;
5
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
3
6
  displayName: string;
4
7
  };
5
8
  export declare const EmailInput: {
6
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
7
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
8
- } & {
9
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
9
10
  addon?: import("react").ReactNode;
10
- input?: import("react").ReactNode;
11
- multiple?: boolean;
12
11
  error?: string;
13
- placeholder?: string;
14
- placeholderVisible?: boolean;
15
- small?: boolean;
16
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
17
- }, "type"> & {
18
- addon?: import("react").ReactNode;
19
- error?: string;
20
- }, "ref"> & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
12
+ } & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
21
13
  displayName: string;
22
14
  };
23
15
  export declare const PasswordInput: {
24
- (props: Omit<{
16
+ (props: {
25
17
  string?: number | string | undefined | undefined;
26
18
  error?: string | undefined;
27
19
  placeholder?: string | undefined | undefined;
28
20
  id?: string | undefined | undefined;
29
21
  value?: string | number | readonly string[] | undefined;
30
22
  children?: import("react").ReactNode;
23
+ input?: import("react").ReactNode;
31
24
  label?: string | undefined | undefined;
32
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
33
25
  small?: boolean | undefined;
34
26
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
35
27
  "aria-describedby"?: string | undefined | undefined;
@@ -546,7 +538,7 @@ export declare const PasswordInput: {
546
538
  diffuseConstant?: number | string | undefined | undefined;
547
539
  direction?: number | string | undefined | undefined;
548
540
  divisor?: number | string | undefined | undefined;
549
- dominantBaseline?: number | string | undefined | undefined;
541
+ dominantBaseline?: "auto" | "use-script" | "no-change" | "reset-size" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "central" | "middle" | "text-after-edge" | "text-before-edge" | "inherit" | undefined | undefined;
550
542
  dur?: number | string | undefined | undefined;
551
543
  dx?: number | string | undefined | undefined;
552
544
  dy?: number | string | undefined | undefined;
@@ -682,7 +674,7 @@ export declare const PasswordInput: {
682
674
  tableValues?: number | string | undefined | undefined;
683
675
  targetX?: number | string | undefined | undefined;
684
676
  targetY?: number | string | undefined | undefined;
685
- textAnchor?: string | undefined | undefined;
677
+ textAnchor?: "start" | "middle" | "end" | "inherit" | undefined | undefined;
686
678
  textDecoration?: number | string | undefined | undefined;
687
679
  textLength?: number | string | undefined | undefined;
688
680
  textRendering?: number | string | undefined | undefined;
@@ -739,78 +731,43 @@ export declare const PasswordInput: {
739
731
  animated?: boolean | undefined;
740
732
  withRichContent?: boolean | "inlineWithoutBreaks" | undefined;
741
733
  htmlSize?: number | undefined;
742
- key?: import("react").Key | null | undefined;
743
734
  addon?: import("react").ReactNode;
744
- input?: import("react").ReactNode;
745
735
  placeholderVisible?: boolean | undefined;
746
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
736
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
747
737
  displayName: string;
748
738
  };
749
739
  export declare const SearchInput: {
750
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
751
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
752
- } & {
740
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
753
741
  addon?: import("react").ReactNode;
754
- input?: import("react").ReactNode;
755
- multiple?: boolean;
756
742
  error?: string;
757
- placeholder?: string;
758
- placeholderVisible?: boolean;
759
- small?: boolean;
760
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
761
- }, "type"> & {
762
- addon?: import("react").ReactNode;
763
- error?: string;
764
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
743
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
765
744
  displayName: string;
766
745
  };
767
746
  export declare const TextAreaInput: {
768
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
769
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
770
- } & {
771
- addon?: import("react").ReactNode;
772
- input?: import("react").ReactNode;
773
- multiple?: boolean;
774
- error?: string;
775
- placeholder?: string;
776
- placeholderVisible?: boolean;
777
- small?: boolean;
778
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
779
- }, "type"> & {
747
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
780
748
  addon?: import("react").ReactNode;
781
749
  error?: string;
782
- }, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>): import("react/jsx-runtime").JSX.Element;
750
+ } & import("react").RefAttributes<HTMLTextAreaElement>): import("react/jsx-runtime").JSX.Element;
783
751
  displayName: string;
784
752
  };
785
753
  export declare const TelephoneInput: {
786
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
787
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
788
- } & {
754
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
789
755
  addon?: import("react").ReactNode;
790
756
  input?: import("react").ReactNode;
791
- multiple?: boolean;
792
757
  error?: string;
793
- placeholder?: string;
794
- placeholderVisible?: boolean;
795
- small?: boolean;
796
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
797
- }, "type"> & {
798
- addon?: import("react").ReactNode;
799
- input?: import("react").ReactNode;
800
- error?: string;
801
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
758
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
802
759
  displayName: string;
803
760
  };
804
761
  export declare const NumberInput: {
805
- (props: Omit<{
762
+ (props: {
806
763
  string?: number | string | undefined | undefined;
807
764
  error?: string | undefined;
808
765
  placeholder?: string | undefined | undefined;
809
766
  id?: string | undefined | undefined;
810
767
  value?: string | number | readonly string[] | undefined;
811
768
  children?: import("react").ReactNode;
769
+ input?: import("react").ReactNode;
812
770
  label?: string | undefined | undefined;
813
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
814
771
  small?: boolean | undefined;
815
772
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
816
773
  "aria-describedby"?: string | undefined | undefined;
@@ -1327,7 +1284,7 @@ export declare const NumberInput: {
1327
1284
  diffuseConstant?: number | string | undefined | undefined;
1328
1285
  direction?: number | string | undefined | undefined;
1329
1286
  divisor?: number | string | undefined | undefined;
1330
- dominantBaseline?: number | string | undefined | undefined;
1287
+ dominantBaseline?: "auto" | "use-script" | "no-change" | "reset-size" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "central" | "middle" | "text-after-edge" | "text-before-edge" | "inherit" | undefined | undefined;
1331
1288
  dur?: number | string | undefined | undefined;
1332
1289
  dx?: number | string | undefined | undefined;
1333
1290
  dy?: number | string | undefined | undefined;
@@ -1463,7 +1420,7 @@ export declare const NumberInput: {
1463
1420
  tableValues?: number | string | undefined | undefined;
1464
1421
  targetX?: number | string | undefined | undefined;
1465
1422
  targetY?: number | string | undefined | undefined;
1466
- textAnchor?: string | undefined | undefined;
1423
+ textAnchor?: "start" | "middle" | "end" | "inherit" | undefined | undefined;
1467
1424
  textDecoration?: number | string | undefined | undefined;
1468
1425
  textLength?: number | string | undefined | undefined;
1469
1426
  textRendering?: number | string | undefined | undefined;
@@ -1520,23 +1477,21 @@ export declare const NumberInput: {
1520
1477
  animated?: boolean | undefined;
1521
1478
  withRichContent?: boolean | "inlineWithoutBreaks" | undefined;
1522
1479
  htmlSize?: number | undefined;
1523
- key?: import("react").Key | null | undefined;
1524
1480
  addon?: import("react").ReactNode;
1525
- input?: import("react").ReactNode;
1526
1481
  placeholderVisible?: boolean | undefined;
1527
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
1482
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
1528
1483
  displayName: string;
1529
1484
  };
1530
1485
  export declare const UrlInput: {
1531
- (props: Omit<{
1486
+ (props: {
1532
1487
  string?: number | string | undefined | undefined;
1533
1488
  error?: string | undefined;
1534
1489
  placeholder?: string | undefined | undefined;
1535
1490
  id?: string | undefined | undefined;
1536
1491
  value?: string | number | readonly string[] | undefined;
1537
1492
  children?: import("react").ReactNode;
1493
+ input?: import("react").ReactNode;
1538
1494
  label?: string | undefined | undefined;
1539
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
1540
1495
  small?: boolean | undefined;
1541
1496
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
1542
1497
  "aria-describedby"?: string | undefined | undefined;
@@ -2053,7 +2008,7 @@ export declare const UrlInput: {
2053
2008
  diffuseConstant?: number | string | undefined | undefined;
2054
2009
  direction?: number | string | undefined | undefined;
2055
2010
  divisor?: number | string | undefined | undefined;
2056
- dominantBaseline?: number | string | undefined | undefined;
2011
+ dominantBaseline?: "auto" | "use-script" | "no-change" | "reset-size" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "central" | "middle" | "text-after-edge" | "text-before-edge" | "inherit" | undefined | undefined;
2057
2012
  dur?: number | string | undefined | undefined;
2058
2013
  dx?: number | string | undefined | undefined;
2059
2014
  dy?: number | string | undefined | undefined;
@@ -2189,7 +2144,7 @@ export declare const UrlInput: {
2189
2144
  tableValues?: number | string | undefined | undefined;
2190
2145
  targetX?: number | string | undefined | undefined;
2191
2146
  targetY?: number | string | undefined | undefined;
2192
- textAnchor?: string | undefined | undefined;
2147
+ textAnchor?: "start" | "middle" | "end" | "inherit" | undefined | undefined;
2193
2148
  textDecoration?: number | string | undefined | undefined;
2194
2149
  textLength?: number | string | undefined | undefined;
2195
2150
  textRendering?: number | string | undefined | undefined;
@@ -2246,11 +2201,9 @@ export declare const UrlInput: {
2246
2201
  animated?: boolean | undefined;
2247
2202
  withRichContent?: boolean | "inlineWithoutBreaks" | undefined;
2248
2203
  htmlSize?: number | undefined;
2249
- key?: import("react").Key | null | undefined;
2250
2204
  addon?: import("react").ReactNode;
2251
- input?: import("react").ReactNode;
2252
2205
  placeholderVisible?: boolean | undefined;
2253
- }, "ref"> & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
2206
+ } & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
2254
2207
  displayName: string;
2255
2208
  };
2256
2209
  export declare const Select: {
@@ -1 +1 @@
1
- {"version":3,"file":"WrappedInputComponents.d.ts","sourceRoot":"","sources":["../../../src/Inputs/WrappedInputComponents.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,SAAS;;;CAAkC,CAAC;AACzD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,CAAC"}
@@ -38,8 +38,8 @@ function withAriaLabelledBy(Component) {
38
38
  function withVisuallyHiddenLabel(Component) {
39
39
  var _a, _b;
40
40
  var WrappedComponent = function (props) {
41
- var _a = (0, FieldContext_1.useFieldWrappedByInputLabel)(), label = _a[0], labelProps = _a[1];
42
- return ((0, jsx_runtime_1.jsx)(Component, __assign({}, props, labelProps, { labelChildren: (0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: label }) })));
41
+ var _a = (0, FieldContext_1.useFieldWrappedByInputLabel)(), label = _a[0], labelProps = _a[1], labelRef = _a[2];
42
+ return ((0, jsx_runtime_1.jsx)(Component, __assign({}, props, labelProps, { ref: labelRef, labelChildren: (0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: label }) })));
43
43
  };
44
44
  WrappedComponent.displayName = "withVisuallyHiddenLabel(".concat((_b = (_a = Component.displayName) !== null && _a !== void 0 ? _a : Component.name) !== null && _b !== void 0 ? _b : 'InputComponent', ")");
45
45
  return WrappedComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"withLabelHelpers.js","sourceRoot":"","sources":["../../../src/Inputs/withLabelHelpers.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AA8DS,kCAAW;AAAE,gDAAkB;AAAE,0DAAuB;;AA3DjE,yCAA4C;AAE5C,sDAI+B;AAI/B,SAAS,WAAW,CAClB,SAA0D;;IAE1D,IAAM,gBAAgB,GAAG,UAAU,KAAa;QAC9C,IAAM,UAAU,GAAG,IAAA,wCAAyB,GAAE,CAAC;QAC/C,OAAO,uBAAC,SAAS,eAAK,KAAK,EAAM,UAAU,EAAI,CAAC;IAClD,CAAC,CAAC;IAEF,gBAAgB,CAAC,WAAW,GAAG,sBAAe,MAAA,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS,CAAC,IAAI,mCAAI,gBAAgB,MAAG,CAAC;IAE7G,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,kBAAkB,CACzB,SAA4D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AA,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS,CAAC,IAAI,mCAAI,gBAAgB,MAAG,CAAC;IAE7G,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,kBAAkB,CACzB,SAA4D;;IAE5D,IAAM,gBAAgB,GAAG,UAAU,KAAa;QAC9C,IAAM,UAAU,GAAG,IAAA,wCAAyB,GAAE,CAAC;QAC/C,OAAO,uBAAC,SAAS,eAAK,KAAK,EAAM,UAAU,EAAI,CAAC;IAClD,CAAC,CAAC;IAEF,gBAAgB,CAAC,WAAW,GAAG,6BAAsB,MAAA,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS,CAAC,IAAI,mCAAI,gBAAgB,MAAG,CAAC;IAEpH,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,uBAAuB,CAC9B,SAAgE;;IAEhE,IAAM,gBAAgB,GAAG,UAAU,KAAa;QACxC,IAAA,KAAgC,IAAA,0CAA2B,GAAE,EAA5D,KAAK,QAAA,EAAE,UAAU,QAAA,EAAE,QAAQ,QAAiC,CAAC;QACpE,OAAO,CACL,uBAAC,SAAS,eACJ,KAAK,EACL,UAAU,IACd,GAAG,EAAE,QAAQ,EACb,aAAa,EAAE,uBAAC,2BAAc,cAAE,KAAK,GAAkB,IACvD,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,gBAAgB,CAAC,WAAW,GAAG,kCAA2B,MAAA,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS,CAAC,IAAI,mCAAI,gBAAgB,MAAG,CAAC;IAEzH,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Field as FieldComponent } from '@rocket.chat/fuselage';
2
- import { ComponentProps, ReactNode } from 'react';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
3
  type FieldProps = {
4
4
  children: ReactNode;
5
5
  } & ComponentProps<typeof FieldComponent>;
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/Field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlD,KAAK,UAAU,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,cAAc,CACxD,OAAO,cAAc,CACtB,CAAC;AAEF,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAMhD;AAED,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/Field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,KAAK,UAAU,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,cAAc,CACxD,OAAO,cAAc,CACtB,CAAC;AAEF,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAMhD;AAED,eAAe,KAAK,CAAC"}
@@ -7,6 +7,8 @@ type FieldContextValue = {
7
7
  id: string;
8
8
  fieldType: FieldType;
9
9
  setFieldType: (fieldType: FieldType) => void;
10
+ emitAction: () => void;
11
+ onAction: (cb: () => void) => void;
10
12
  };
11
13
  export declare const FieldContext: import("react").Context<FieldContextValue>;
12
14
  export type LabelTypes = 'hint' | 'description' | 'error' | 'placeholder';
@@ -26,6 +28,8 @@ export declare const useFieldReferencedByLabel: () => {
26
28
  };
27
29
  export declare const useFieldWrappedByInputLabel: () => [ReactNode, {
28
30
  "aria-describedby": string;
29
- }];
31
+ "id": string;
32
+ "aria-invalid": "true" | "false";
33
+ }, RefCallback<HTMLElement>];
30
34
  export {};
31
35
  //# sourceMappingURL=FieldContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContext.d.ts","sourceRoot":"","sources":["../../../src/Field/FieldContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AASpD,KAAK,iBAAiB,GAAG;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAC7B,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,YAAY,4CAQvB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,aAAa,CAAC;AAE1E,MAAM,MAAM,SAAS,GACjB,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,eAAO,MAAM,aAAa,QAAO,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,CAyBjE,CAAC;AAEF,eAAO,MAAM,iBAAiB,iBAG7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,MAAM,UAAU,WASpD,CAAC;AA0BF,eAAO,MAAM,yBAAyB;oBARjB,MAAM,GAAG,OAAO;;;CAuBpC,CAAC;AAGF,eAAO,MAAM,yBAAyB;oBA1BjB,MAAM,GAAG,OAAO;;;CAyCpC,CAAC;AAGF,eAAO,MAAM,2BAA2B,QAAO,CAC7C,SAAS,EACT;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAmB/B,CAAC"}
1
+ {"version":3,"file":"FieldContext.d.ts","s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,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC,EACD,WAAW,CAAC,WAAW,CAAC,CAqCzB,CAAC"}
@@ -9,6 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ import { useSafeRefCallback } from '@rocket.chat/fuselage-hooks';
12
13
  import { createContext, useCallback, useContext, useEffect, useMemo, } from 'react';
13
14
  export var FieldContext = createContext({
14
15
  setDescriptor: function () { },
@@ -18,21 +19,31 @@ export var FieldContext = createContext({
18
19
  id: '',
19
20
  fieldType: 'referencedByLabel',
20
21
  setFieldType: function () { },
22
+ emitAction: function () { },
23
+ onAction: function () { },
21
24
  });
25
+ var getTextFromNode = function (node) {
26
+ if (!node.textContent) {
27
+ return null;
28
+ }
29
+ var text = [];
30
+ var treeWalker = node.ownerDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT);
31
+ while (treeWalker.nextNode()) {
32
+ text.push(treeWalker.currentNode.textContent);
33
+ }
34
+ return text.join(' ');
35
+ };
22
36
  export var useFieldLabel = function () {
23
- var _a = useContext(FieldContext), setLabel = _a.setLabel, id = _a.id;
24
- var setLabelRef = useCallback(function (node) {
25
- if (!node || !node.textContent) {
26
- setLabel(null);
37
+ var _a = useContext(FieldContext), setLabel = _a.setLabel, id = _a.id, emitAction = _a.emitAction;
38
+ var setLabelRef = useSafeRefCallback(useCallback(function (node) {
39
+ if (!node) {
27
40
  return;
28
41
  }
29
- var text = [];
30
- var treeWalker = node.ownerDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT);
31
- while (treeWalker.nextNode()) {
32
- text.push(treeWalker.currentNode.textContent);
33
- }
34
- setLabel(text.join(' '));
35
- }, [setLabel]);
42
+ setLabel(getTextFromNode(node));
43
+ var onClick = function () { return emitAction(); };
44
+ node.addEventListener('click', onClick);
45
+ return function () { return node.removeEventListener('click', onClick); };
46
+ }, [setLabel, emitAction]));
36
47
  return [setLabelRef, "".concat(id, "-label")];
37
48
  };
38
49
  export var useFieldFieldType = function () {
@@ -83,13 +94,23 @@ export var useFieldReferencedByLabel = function () {
83
94
  };
84
95
  // label is rendered visually hidden inside the inputs wrapper label
85
96
  export var useFieldWrappedByInputLabel = function () {
86
- var _a = useContext(FieldContext), id = _a.id, label = _a.label, descriptors = _a.descriptors, setFieldType = _a.setFieldType;
97
+ var _a = useContext(FieldContext), id = _a.id, label = _a.label, descriptors = _a.descriptors, setFieldType = _a.setFieldType, onAction = _a.onAction;
87
98
  useEffect(function () {
88
99
  setFieldType('wrappedByLabel');
89
100
  }, [setFieldType]);
101
+ var refCallback = useSafeRefCallback(useCallback(function (node) {
102
+ if (!node) {
103
+ return;
104
+ }
105
+ onAction(function () {
106
+ node.focus();
107
+ node.click();
108
+ });
109
+ }, [onAction]));
90
110
  return useMemo(function () { return [
91
111
  label,
92
112
  __assign({ 'aria-describedby': getDescribedBy(descriptors, id), 'id': getInputId(id, descriptors) }, getAriaInvalid(descriptors)),
93
- ]; }, [label, id, descriptors]);
113
+ refCallback,
114
+ ]; }, [label, descriptors, id, refCallback]);
94
115
  };
95
116
  //# sourceMappingURL=FieldContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContext.js","sourceRoot":"","sources":["../../../src/Field/FieldContext.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,GACR,MAAM,OAAO,CAAC;AAYf,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAoB;IAC3D,aAAa,EAAE,cAAO,CAAC;IACvB,QAAQ,EAAE,cAAO,CAAC;IAClB,WAAW,EAAE,IAAI,GAAG,EAAE;IACtB,KAAK,EAAE,IAAI;IACX,EAAE,EAAE,EAAE;IACN,SAAS,EAAE,mBAAmB;IAC9B,YAAY,EAAE,cAAO,CAAC;CACvB,CAAC,CAAC;AASH,MAAM,CAAC,IAAM,aAAa,GAAG;IACrB,IA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AU,CAAC,EAAE,EAAE,WAAW,CAAC,IAC9B,cAAc,CAAC,WAAW,CAAC;QAEhC,WAAW;KACZ,EARK,CAQL,EACD,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,CAAC,CACtC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  type FieldProviderProps = {
3
3
  children: ReactNode;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FieldProvider.d.ts","sourceRoot":"","sources":["../../../src/Field/FieldProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzD,KAAK,kBAAkB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAElD,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAsCtD;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"FieldProvider.d.ts","sourceRoot":"","sources":["../../../src/Field/FieldProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,KAAK,kBAAkB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAElD,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAoDtD;AAED,eAAe,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Emitter } from '@rocket.chat/emitter';
2
3
  import { useState, useCallback } from 'react';
3
4
  import { useId } from 'react-aria';
4
5
  import { FieldContext } from './FieldContext';
@@ -8,6 +9,7 @@ function FieldProvider(_a) {
8
9
  var _b = useState(null), label = _b[0], setLabel = _b[1];
9
10
  var _c = useState(new Set()), descriptors = _c[0], setDescriptors = _c[1];
10
11
  var _d = useState('referencedByInput'), fieldType = _d[0], setFieldType = _d[1];
12
+ var emitter = useState(function () { return new Emitter(); })[0];
11
13
  var setDescriptor = useCallback(function (type, unregister) {
12
14
  setDescriptors(function (labels) {
13
15
  var _labelMap = new Set(labels);
@@ -19,7 +21,15 @@ function FieldProvider(_a) {
19
21
  return _labelMap;
20
22
  });
21
23
  }, []);
24
+ var emitAction = useCallback(function () {
25
+ emitter.emit('action');
26
+ }, [emitter]);
27
+ var onAction = useCallback(function (cb) {
28
+ return emitter.on('action', cb);
29
+ }, [emitter]);
22
30
  return (_jsx(FieldContext.Provider, { value: {
31
+ emitAction: emitAction,
32
+ onAction: onAction,
23
33
  setDescriptor: setDescriptor,
24
34
  setLabel: setLabel,
25
35
  descriptors: descriptors,
@@ -1 +1 @@
1
- {"version":3,"file":"FieldProvider.js","sourceRoot":"","sources":["../../../src/Field/FieldProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAa,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAyB,MAAM,gBAAgB,CAAC;AAIrE,SAAS,aAAa,CAAC,EAAgC;QAA9B,QAAQ,cAAA;IAC/B,IAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACb,IAAA,KAAoB,QAAQ,CAAmB,IAAI,CAAC,EAAnD,KAAK,QAAA,EAAE,QAAQ,QAAoC,CAAC;IACrD,IAAA,KAAgC,QAAQ,CAAC,IAAI,GAAG,EAAc,CAAC,EAA9D,WAAW,QAAA,EAAE,cAAc,QAAmC,CAAC;IAChE,IAAA,KAA4B,QAAQ,CAAY,mBAAmB,CAAC,EAAnE,SAAS,QAAA,EAAE,YAAY,QAA4C,CAAC;IAE3E,IAAM,aAAa,GAAG,WAAW,CAC/B,UAAC,IAAgB,EAAE,UAAoB;QACrC,cAAc,CAAC,UAAC,MAAM;YACpB,IAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;YA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B,EAA/B,CAA+B,CAAC,GAAnD,CAAoD;IAElE,IAAM,aAAa,GAAG,WAAW,CAC/B,UAAC,IAAgB,EAAE,UAAoB;QACrC,cAAc,CAAC,UAAC,MAAM;YACpB,IAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;YAElC,IAAI,UAAU,EAAE,CAAC;gBACf,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACvB,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpB,OAAO,SAAS,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC,EACD,EAAE,CACH,CAAC;IAEF,IAAM,UAAU,GAAG,WAAW,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,IAAM,QAAQ,GAAG,WAAW,CAC1B,UAAC,EAAc;QACb,OAAO,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAClC,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IACpB,KAAK,EAAE;YACL,UAAU,YAAA;YACV,QAAQ,UAAA;YACR,aAAa,eAAA;YACb,QAAQ,UAAA;YACR,WAAW,aAAA;YACX,KAAK,OAAA;YACL,EAAE,IAAA;YACF,SAAS,WAAA;YACT,YAAY,cAAA;SACb,YAEA,QAAQ,GACa,CACzB,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FieldLabel as FieldLabelComponent } from '@rocket.chat/fuselage';
1
+ import type { FieldLabel as FieldLabelComponent } from '@rocket.chat/fuselage';
2
2
  import { type ComponentPropsWithoutRef } from 'react';
3
3
  type FieldLabelProps = ComponentPropsWithoutRef<typeof FieldLabelComponent>;
4
4
  declare const FieldLabel: (props: FieldLabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAQtD,KAAK,eAAe,GAAG,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5E,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,4CAWzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAQtD,KAAK,eAAe,GAAG,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5E,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,4CAWzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,35 +1,27 @@
1
1
  export declare const TextInput: {
2
- (props: Omit<import("@rocket.chat/fuselage").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
2
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
3
+ addon?: import("react").ReactNode;
4
+ error?: string;
5
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
3
6
  displayName: string;
4
7
  };
5
8
  export declare const EmailInput: {
6
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
7
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
8
- } & {
9
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
9
10
  addon?: import("react").ReactNode;
10
- input?: import("react").ReactNode;
11
- multiple?: boolean;
12
11
  error?: string;
13
- placeholder?: string;
14
- placeholderVisible?: boolean;
15
- small?: boolean;
16
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
17
- }, "type"> & {
18
- addon?: import("react").ReactNode;
19
- error?: string;
20
- }, "ref"> & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
12
+ } & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
21
13
  displayName: string;
22
14
  };
23
15
  export declare const PasswordInput: {
24
- (props: Omit<{
16
+ (props: {
25
17
  string?: number | string | undefined | undefined;
26
18
  error?: string | undefined;
27
19
  placeholder?: string | undefined | undefined;
28
20
  id?: string | undefined | undefined;
29
21
  value?: string | number | readonly string[] | undefined;
30
22
  children?: import("react").ReactNode;
23
+ input?: import("react").ReactNode;
31
24
  label?: string | undefined | undefined;
32
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
33
25
  small?: boolean | undefined;
34
26
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
35
27
  "aria-describedby"?: string | undefined | undefined;
@@ -546,7 +538,7 @@ export declare const PasswordInput: {
546
538
  diffuseConstant?: number | string | undefined | undefined;
547
539
  direction?: number | string | undefined | undefined;
548
540
  divisor?: number | string | undefined | undefined;
549
- dominantBaseline?: number | string | undefined | undefined;
541
+ dominantBaseline?: "auto" | "use-script" | "no-change" | "reset-size" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "central" | "middle" | "text-after-edge" | "text-before-edge" | "inherit" | undefined | undefined;
550
542
  dur?: number | string | undefined | undefined;
551
543
  dx?: number | string | undefined | undefined;
552
544
  dy?: number | string | undefined | undefined;
@@ -682,7 +674,7 @@ export declare const PasswordInput: {
682
674
  tableValues?: number | string | undefined | undefined;
683
675
  targetX?: number | string | undefined | undefined;
684
676
  targetY?: number | string | undefined | undefined;
685
- textAnchor?: string | undefined | undefined;
677
+ textAnchor?: "start" | "middle" | "end" | "inherit" | undefined | undefined;
686
678
  textDecoration?: number | string | undefined | undefined;
687
679
  textLength?: number | string | undefined | undefined;
688
680
  textRendering?: number | string | undefined | undefined;
@@ -739,78 +731,43 @@ export declare const PasswordInput: {
739
731
  animated?: boolean | undefined;
740
732
  withRichContent?: boolean | "inlineWithoutBreaks" | undefined;
741
733
  htmlSize?: number | undefined;
742
- key?: import("react").Key | null | undefined;
743
734
  addon?: import("react").ReactNode;
744
- input?: import("react").ReactNode;
745
735
  placeholderVisible?: boolean | undefined;
746
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
736
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
747
737
  displayName: string;
748
738
  };
749
739
  export declare const SearchInput: {
750
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
751
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
752
- } & {
740
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
753
741
  addon?: import("react").ReactNode;
754
- input?: import("react").ReactNode;
755
- multiple?: boolean;
756
742
  error?: string;
757
- placeholder?: string;
758
- placeholderVisible?: boolean;
759
- small?: boolean;
760
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
761
- }, "type"> & {
762
- addon?: import("react").ReactNode;
763
- error?: string;
764
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
743
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
765
744
  displayName: string;
766
745
  };
767
746
  export declare const TextAreaInput: {
768
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
769
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
770
- } & {
771
- addon?: import("react").ReactNode;
772
- input?: import("react").ReactNode;
773
- multiple?: boolean;
774
- error?: string;
775
- placeholder?: string;
776
- placeholderVisible?: boolean;
777
- small?: boolean;
778
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
779
- }, "type"> & {
747
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
780
748
  addon?: import("react").ReactNode;
781
749
  error?: string;
782
- }, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>): import("react/jsx-runtime").JSX.Element;
750
+ } & import("react").RefAttributes<HTMLTextAreaElement>): import("react/jsx-runtime").JSX.Element;
783
751
  displayName: string;
784
752
  };
785
753
  export declare const TelephoneInput: {
786
- (props: Omit<Omit<Omit<import("@rocket.chat/fuselage/dist/components/Box").BoxProps & import("react").RefAttributes<any>, "ref"> & {
787
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
788
- } & {
754
+ (props: Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
789
755
  addon?: import("react").ReactNode;
790
756
  input?: import("react").ReactNode;
791
- multiple?: boolean;
792
757
  error?: string;
793
- placeholder?: string;
794
- placeholderVisible?: boolean;
795
- small?: boolean;
796
- type: "button" | "checkbox" | "color" | "date" | "datetime" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | "textarea" | "select";
797
- }, "type"> & {
798
- addon?: import("react").ReactNode;
799
- input?: import("react").ReactNode;
800
- error?: string;
801
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
758
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
802
759
  displayName: string;
803
760
  };
804
761
  export declare const NumberInput: {
805
- (props: Omit<{
762
+ (props: {
806
763
  string?: number | string | undefined | undefined;
807
764
  error?: string | undefined;
808
765
  placeholder?: string | undefined | undefined;
809
766
  id?: string | undefined | undefined;
810
767
  value?: string | number | readonly string[] | undefined;
811
768
  children?: import("react").ReactNode;
769
+ input?: import("react").ReactNode;
812
770
  label?: string | undefined | undefined;
813
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
814
771
  small?: boolean | undefined;
815
772
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
816
773
  "aria-describedby"?: string | undefined | undefined;
@@ -1327,7 +1284,7 @@ export declare const NumberInput: {
1327
1284
  diffuseConstant?: number | string | undefined | undefined;
1328
1285
  direction?: number | string | undefined | undefined;
1329
1286
  divisor?: number | string | undefined | undefined;
1330
- dominantBaseline?: number | string | undefined | undefined;
1287
+ dominantBaseline?: "auto" | "use-script" | "no-change" | "reset-size" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "central" | "middle" | "text-after-edge" | "text-before-edge" | "inherit" | undefined | undefined;
1331
1288
  dur?: number | string | undefined | undefined;
1332
1289
  dx?: number | string | undefined | undefined;
1333
1290
  dy?: number | string | undefined | undefined;
@@ -1463,7 +1420,7 @@ export declare const NumberInput: {
1463
1420
  tableValues?: number | string | undefined | undefined;
1464
1421
  targetX?: number | string | undefined | undefined;
1465
1422
  targetY?: number | string | undefined | undefined;
1466
- textAnchor?: string | undefined | undefined;
1423
+ textAnchor?: "start" | "middle" | "end" | "inherit" | undefined | undefined;
1467
1424
  textDecoration?: number | string | undefined | undefined;
1468
1425
  textLength?: number | string | undefined | undefined;
1469
1426
  textRendering?: number | string | undefined | undefined;
@@ -1520,23 +1477,21 @@ export declare const NumberInput: {
1520
1477
  animated?: boolean | undefined;
1521
1478
  withRichContent?: boolean | "inlineWithoutBreaks" | undefined;
1522
1479
  htmlSize?: number | undefined;
1523
- key?: import("react").Key | null | undefined;
1524
1480
  addon?: import("react").ReactNode;
1525
- input?: import("react").ReactNode;
1526
1481
  placeholderVisible?: boolean | undefined;
1527
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
1482
+ } & import("react").RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
1528
1483
  displayName: string;
1529
1484
  };
1530
1485
  export declare const UrlInput: {
1531
- (props: Omit<{
1486
+ (props: {
1532
1487
  string?: number | string | undefined | undefined;
1533
1488
  error?: string | undefined;
1534
1489
  placeholder?: string | undefined | undefined;
1535
1490
  id?: string | undefined | undefined;
1536
1491
  value?: string | number | readonly string[] | undefined;
1537
1492
  children?: import("react").ReactNode;
1493
+ input?: import("react").ReactNode;
1538
1494
  label?: string | undefined | undefined;
1539
- ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
1540
1495
  small?: boolean | undefined;
1541
1496
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
1542
1497
  "aria-describedby"?: string | undefined | undefined;
@@ -2053,7 +2008,7 @@ export declare const UrlInput: {
2053
2008
  diffuseConstant?: number | string | undefined | undefined;
2054
2009
  direction?: number | string | undefined | undefined;
2055
2010
  divisor?: number | string | undefined | undefined;
2056
- dominantBaseline?: number | string | undefined | undefined;
2011
+ dominantBaseline?: "auto" | "use-script" | "no-change" | "reset-size" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "central" | "middle" | "text-after-edge" | "text-before-edge" | "inherit" | undefined | undefined;
2057
2012
  dur?: number | string | undefined | undefined;
2058
2013
  dx?: number | string | undefined | undefined;
2059
2014
  dy?: number | string | undefined | undefined;
@@ -2189,7 +2144,7 @@ export declare const UrlInput: {
2189
2144
  tableValues?: number | string | undefined | undefined;
2190
2145
  targetX?: number | string | undefined | undefined;
2191
2146
  targetY?: number | string | undefined | undefined;
2192
- textAnchor?: string | undefined | undefined;
2147
+ textAnchor?: "start" | "middle" | "end" | "inherit" | undefined | undefined;
2193
2148
  textDecoration?: number | string | undefined | undefined;
2194
2149
  textLength?: number | string | undefined | undefined;
2195
2150
  textRendering?: number | string | undefined | undefined;
@@ -2246,11 +2201,9 @@ export declare const UrlInput: {
2246
2201
  animated?: boolean | undefined;
2247
2202
  withRichContent?: boolean | "inlineWithoutBreaks" | undefined;
2248
2203
  htmlSize?: number | undefined;
2249
- key?: import("react").Key | null | undefined;
2250
2204
  addon?: import("react").ReactNode;
2251
- input?: import("react").ReactNode;
2252
2205
  placeholderVisible?: boolean | undefined;
2253
- }, "ref"> & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
2206
+ } & import("react").RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
2254
2207
  displayName: string;
2255
2208
  };
2256
2209
  export declare const Select: {
@@ -1 +1 @@
1
- {"version":3,"file":"WrappedInputComponents.d.ts","sourceRoot":"","sources":["../../../src/Inputs/WrappedInputComponents.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,SAAS;;;CAAkC,CAAC;AACzD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,yBAAyB,CAAC,MAAM,GAAG,aAAa,CAAC;YAElB,MAAM;;EAQjD;AAED,KAAK,iBAAiB,GAAG;IAAE,aAAa,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtD,iBAAS,uBAAuB,CAAC,MAAM,EACrC,SAAS,EAAE,yBAAyB,CAAC,MAAM,GAAG,iBAAiB,CAAC;YAEtB,MAAM;;EAcjD;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"withLabelHelpers.d.ts","sourceRoot":"","sources":["../../../src/Inputs/withLabelHelpers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,OAAO,CAAC;AASlE,KAAK,WAAW,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC,iBAAS,WAAW,CAAC,MAAM,EACzB,SAAS,EAAE,yBAAyB,CAAC,MAAM,GAAG,WAAW,CAAC;YAEhB,MAAM;;EAQjD;AAED,KAAK,aAAa,GAAG;IAAE,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD,iBAAS,kBAAkB,CAAC,MAAM,EAChC,SAAS,EAAE,yBAAyB,CAAC,MAAM,GAAG,aAAa,CAAC;YAElB,MAAM;;EAQjD;AAED,KAAK,iBAAiB,GAAG;IAAE,aAAa,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtD,iBAAS,uBAAuB,CAAC,MAAM,EACrC,SAAS,EAAE,yBAAyB,CAAC,MAAM,GAAG,iBAAiB,CAAC;YAEtB,MAAM;;EAejD;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
@@ -33,8 +33,8 @@ function withAriaLabelledBy(Component) {
33
33
  function withVisuallyHiddenLabel(Component) {
34
34
  var _a, _b;
35
35
  var WrappedComponent = function (props) {
36
- var _a = useFieldWrappedByInputLabel(), label = _a[0], labelProps = _a[1];
37
- return (_jsx(Component, __assign({}, props, labelProps, { labelChildren: _jsx(VisuallyHidden, { children: label }) })));
36
+ var _a = useFieldWrappedByInputLabel(), label = _a[0], labelProps = _a[1], labelRef = _a[2];
37
+ return (_jsx(Component, __assign({}, props, labelProps, { ref: labelRef, labelChildren: _jsx(VisuallyHidden, { children: label }) })));
38
38
  };
39
39
  WrappedComponent.displayName = "withVisuallyHiddenLabel(".concat((_b = (_a = Component.displayName) !== null && _a !== void 0 ? _a : Component.name) !== null && _b !== void 0 ? _b : 'InputComponent', ")");
40
40
  return WrappedComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"withLabelHelpers.js","sourceRoot":"","sources":["../../../src/Inputs/withLabelHelpers.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAI/B,SAAS,WAAW,CAClB,SAA0D;;IAE1D,IAAM,gBAAgB,GAAG,UAAU,KAAa;QAC9C,IAAM,UAAU,GAAG,yBAAyB,EAAE,CAAC;QAC/C,OAAO,KAAC,SAAS,eAAK,KAAK,EAAM,UAAU,EAAI,CAAC;IAClD,CAAC,CAAC;IAEF,gBAAgB,CAAC,WAAW,GAAG,sBAAe,MAAA,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS,CAAC,IAAI,mCAAI,gBAAgB,MAAG,CAAC;IAE7G,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,kBAAkB,CACzB,SAA4D;;IAE5D,IAAM,gBAAgB,GAAG,UAAU,KAAa;QAC9C,IAAM,UAAU,GAAG,yBAAyB,EAAE,CAAC;QAC/C,OAAO,KAAC,SAAS,eAAK,KAAK,EAAM,UAAU,EAAI,CAAC;IAClD,CAAC,CAAC;IAEF,gBAAgB,CAAC,WAAW,GAAG,6BAAsB,MAAA,MAAA,SAA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,kBAAkB,CACzB,SAA4D;;IAE5D,IAAM,gBAAgB,GAAG,UAAU,KAAa;QAC9C,IAAM,UAAU,GAAG,yBAAyB,EAAE,CAAC;QAC/C,OAAO,KAAC,SAAS,eAAK,KAAK,EAAM,UAAU,EAAI,CAAC;IAClD,CAAC,CAAC;IAEF,gBAAgB,CAAC,WAAW,GAAG,6BAAsB,MAAA,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS,CAAC,IAAI,mCAAI,gBAAgB,MAAG,CAAC;IAEpH,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,uBAAuB,CAC9B,SAAgE;;IAEhE,IAAM,gBAAgB,GAAG,UAAU,KAAa;QACxC,IAAA,KAAgC,2BAA2B,EAAE,EAA5D,KAAK,QAAA,EAAE,UAAU,QAAA,EAAE,QAAQ,QAAiC,CAAC;QACpE,OAAO,CACL,KAAC,SAAS,eACJ,KAAK,EACL,UAAU,IACd,GAAG,EAAE,QAAQ,EACb,aAAa,EAAE,KAAC,cAAc,cAAE,KAAK,GAAkB,IACvD,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,gBAAgB,CAAC,WAAW,GAAG,kCAA2B,MAAA,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS,CAAC,IAAI,mCAAI,gBAAgB,MAAG,CAAC;IAEzH,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocket.chat/fuselage-forms",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A set of component wrappers to provide ease of use and accessibility out-of-box.",
5
5
  "homepage": "https://github.com/RocketChat/fuselage#readme",
6
6
  "bugs": {
@@ -37,34 +37,36 @@
37
37
  "devDependencies": {
38
38
  "@rocket.chat/fuselage": "*",
39
39
  "@rocket.chat/fuselage-tokens": "^0.33.2",
40
- "@storybook/addon-docs": "~9.0.9",
41
- "@storybook/addon-webpack5-compiler-swc": "~3.0.0",
42
- "@storybook/react-webpack5": "~9.0.9",
40
+ "@storybook/addon-docs": "~9.1.10",
41
+ "@storybook/addon-webpack5-compiler-swc": "~4.0.1",
42
+ "@storybook/react-webpack5": "~9.1.10",
43
43
  "@storybook/types": "~8.6.14",
44
- "@testing-library/jest-dom": "~6.6.3",
44
+ "@testing-library/jest-dom": "~6.9.1",
45
45
  "@testing-library/react": "~16.3.0",
46
- "@types/jest": "~29.5.14",
46
+ "@testing-library/user-event": "~14.6.1",
47
+ "@types/jest": "~30.0.0",
47
48
  "@types/jest-axe": "~3.5.9",
48
- "@types/react": "~18.3.23",
49
+ "@types/react": "~18.3.25",
49
50
  "@types/react-dom": "~18.3.7",
50
- "cross-env": "^7.0.3",
51
- "eslint": "~9.23.0",
52
- "jest": "~29.7.0",
51
+ "cross-env": "^10.1.0",
52
+ "eslint": "~9.37.0",
53
+ "jest": "~30.2.0",
53
54
  "jest-axe": "~10.0.0",
54
- "jest-environment-jsdom": "~30.0.0",
55
+ "jest-environment-jsdom": "~30.2.0",
55
56
  "lint-all": "^0.31.25",
56
- "prettier": "~3.5.3",
57
+ "prettier": "~3.6.2",
57
58
  "react": "~18.3.1",
58
59
  "react-dom": "~18.3.1",
59
60
  "rimraf": "~6.0.1",
60
- "storybook": "~9.0.9",
61
+ "storybook": "~9.1.10",
61
62
  "storybook-dark-mode": "patch:storybook-dark-mode@npm%3A4.0.2#~/.yarn/patches/storybook-dark-mode-npm-4.0.2-1acb0927fb.patch",
62
- "ts-jest": "~29.4.0",
63
- "typescript": "~5.8.3",
64
- "webpack": "~5.99.9"
63
+ "ts-jest": "~29.4.4",
64
+ "typescript": "~5.9.3",
65
+ "webpack": "~5.102.0"
65
66
  },
66
67
  "peerDependencies": {
67
68
  "@rocket.chat/fuselage": "*",
69
+ "@rocket.chat/fuselage-hooks": "^0.38.1",
68
70
  "react": "*",
69
71
  "react-dom": "*"
70
72
  },
@@ -75,6 +77,7 @@
75
77
  "access": "public"
76
78
  },
77
79
  "dependencies": {
80
+ "@rocket.chat/emitter": "^0.31.25",
78
81
  "react-aria": "~3.37.0"
79
82
  }
80
83
  }