@primer/react 38.32.0-rc.7fd08e0cc → 38.32.0-rc.85de10233

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 (26) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/ActionBar/ActionBar.js +130 -424
  3. package/dist/FilteredActionList/FilteredActionList.js +66 -155
  4. package/dist/FilteredActionList/useAnnouncements.js +66 -138
  5. package/dist/LabelGroup/LabelGroup.js +76 -110
  6. package/dist/Overlay/Overlay.js +45 -169
  7. package/dist/TextInput/TextInput.js +7 -7
  8. package/dist/ToggleSwitch/ToggleSwitch.js +167 -186
  9. package/dist/TreeView/TreeView.js +309 -814
  10. package/dist/UnderlineNav/UnderlineNav-a06bbc74.css +2 -0
  11. package/dist/UnderlineNav/UnderlineNav-a06bbc74.css.map +1 -0
  12. package/dist/UnderlineNav/UnderlineNav.d.ts +5 -0
  13. package/dist/UnderlineNav/UnderlineNav.js +136 -129
  14. package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -1
  15. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +38 -95
  16. package/dist/hooks/useControllableState.js +3 -3
  17. package/dist/hooks/useMedia.js +44 -43
  18. package/dist/internal/components/UnderlineTabbedInterface-25587345.css +2 -0
  19. package/dist/internal/components/UnderlineTabbedInterface-25587345.css.map +1 -0
  20. package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
  21. package/dist/internal/components/ValidationAnimationContainer.js +40 -34
  22. package/package.json +3 -1
  23. package/dist/UnderlineNav/UnderlineNav-47547980.css +0 -2
  24. package/dist/UnderlineNav/UnderlineNav-47547980.css.map +0 -1
  25. package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.css +0 -2
  26. package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.css.map +0 -1
@@ -3,7 +3,6 @@ import { IconButton } from "../Button/IconButton.js";
3
3
  import { ButtonComponent } from "../Button/Button.js";
4
4
  import { AnchoredOverlay } from "../AnchoredOverlay/AnchoredOverlay.js";
5
5
  import LabelGroup_module_css_default from "./LabelGroup.module.css.js";
6
- import { c } from "react-compiler-runtime";
7
6
  import { clsx } from "clsx";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import React from "react";
@@ -14,108 +13,75 @@ const getOverlayWidth = (buttonClientRect, containerRef, overlayPaddingPx) => {
14
13
  var _containerRef$current;
15
14
  return overlayPaddingPx + buttonClientRect.right - (((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.getBoundingClientRect().left) || 0);
16
15
  };
17
- const InlineToggle = (t0) => {
18
- const $ = c(7);
19
- const { collapseButtonRef, collapseInlineExpandedChildren, expandButtonRef, hiddenItemIds, isOverflowShown, showAllTokensInline } = t0;
20
- let t1;
21
- if ($[0] !== collapseButtonRef || $[1] !== collapseInlineExpandedChildren || $[2] !== expandButtonRef || $[3] !== hiddenItemIds || $[4] !== isOverflowShown || $[5] !== showAllTokensInline) {
22
- t1 = isOverflowShown ? /*#__PURE__*/ jsx(ButtonComponent, {
23
- ref: collapseButtonRef,
24
- onClick: collapseInlineExpandedChildren,
25
- size: "small",
26
- variant: "invisible",
27
- children: "Show less"
28
- }) : hiddenItemIds.length ? /*#__PURE__*/ jsxs(ButtonComponent, {
29
- ref: expandButtonRef,
16
+ const InlineToggle = ({ collapseButtonRef, collapseInlineExpandedChildren, expandButtonRef, hiddenItemIds, isOverflowShown, showAllTokensInline }) => isOverflowShown ? /*#__PURE__*/ jsx(ButtonComponent, {
17
+ ref: collapseButtonRef,
18
+ onClick: collapseInlineExpandedChildren,
19
+ size: "small",
20
+ variant: "invisible",
21
+ children: "Show less"
22
+ }) : hiddenItemIds.length ? /*#__PURE__*/ jsxs(ButtonComponent, {
23
+ ref: expandButtonRef,
24
+ variant: "invisible",
25
+ size: "small",
26
+ onClick: showAllTokensInline,
27
+ children: [/*#__PURE__*/ jsxs(VisuallyHidden, { children: [
28
+ "Show +",
29
+ hiddenItemIds.length,
30
+ " more"
31
+ ] }), /*#__PURE__*/ jsxs("span", {
32
+ "aria-hidden": "true",
33
+ children: ["+", hiddenItemIds.length]
34
+ })]
35
+ }) : null;
36
+ const OverlayToggle = ({ children, closeOverflowOverlay, expandButtonRef, hiddenItemIds, isOverflowShown, openOverflowOverlay, overlayPaddingPx, overlayWidth, totalLength }) => hiddenItemIds.length ? /*#__PURE__*/ jsx(AnchoredOverlay, {
37
+ open: isOverflowShown,
38
+ onOpen: openOverflowOverlay,
39
+ onClose: closeOverflowOverlay,
40
+ width: "auto",
41
+ height: "auto",
42
+ align: "start",
43
+ side: "inside-right",
44
+ anchorRef: expandButtonRef,
45
+ anchorOffset: overlayPaddingPx * -1,
46
+ alignmentOffset: overlayPaddingPx * -1,
47
+ renderAnchor: (props) => /*#__PURE__*/ jsxs(ButtonComponent, {
48
+ variant: "invisible",
49
+ size: "small",
50
+ ...props,
51
+ ref: expandButtonRef,
52
+ children: [/*#__PURE__*/ jsxs(VisuallyHidden, { children: [
53
+ "Show +",
54
+ hiddenItemIds.length,
55
+ " more"
56
+ ] }), /*#__PURE__*/ jsxs("span", {
57
+ "aria-hidden": "true",
58
+ children: ["+", hiddenItemIds.length]
59
+ })]
60
+ }),
61
+ focusZoneSettings: { disabled: true },
62
+ overlayProps: {
63
+ role: "dialog",
64
+ "aria-label": `All ${totalLength} labels`,
65
+ "aria-modal": true
66
+ },
67
+ children: /*#__PURE__*/ jsxs("div", {
68
+ className: LabelGroup_module_css_default.OverlayContainer,
69
+ style: {
70
+ width: overlayWidth,
71
+ padding: `${overlayPaddingPx}px`
72
+ },
73
+ children: [/*#__PURE__*/ jsx("div", {
74
+ className: LabelGroup_module_css_default.OverlayInner,
75
+ children
76
+ }), /*#__PURE__*/ jsx(IconButton, {
77
+ onClick: closeOverflowOverlay,
78
+ icon: XIcon,
79
+ "aria-label": "Close",
30
80
  variant: "invisible",
31
- size: "small",
32
- onClick: showAllTokensInline,
33
- children: [/*#__PURE__*/ jsxs(VisuallyHidden, { children: [
34
- "Show +",
35
- hiddenItemIds.length,
36
- " more"
37
- ] }), /*#__PURE__*/ jsxs("span", {
38
- "aria-hidden": "true",
39
- children: ["+", hiddenItemIds.length]
40
- })]
41
- }) : null;
42
- $[0] = collapseButtonRef;
43
- $[1] = collapseInlineExpandedChildren;
44
- $[2] = expandButtonRef;
45
- $[3] = hiddenItemIds;
46
- $[4] = isOverflowShown;
47
- $[5] = showAllTokensInline;
48
- $[6] = t1;
49
- } else t1 = $[6];
50
- return t1;
51
- };
52
- const OverlayToggle = (t0) => {
53
- const $ = c(10);
54
- const { children, closeOverflowOverlay, expandButtonRef, hiddenItemIds, isOverflowShown, openOverflowOverlay, overlayPaddingPx, overlayWidth, totalLength } = t0;
55
- let t1;
56
- if ($[0] !== children || $[1] !== closeOverflowOverlay || $[2] !== expandButtonRef || $[3] !== hiddenItemIds.length || $[4] !== isOverflowShown || $[5] !== openOverflowOverlay || $[6] !== overlayPaddingPx || $[7] !== overlayWidth || $[8] !== totalLength) {
57
- t1 = hiddenItemIds.length ? /*#__PURE__*/ jsx(AnchoredOverlay, {
58
- open: isOverflowShown,
59
- onOpen: openOverflowOverlay,
60
- onClose: closeOverflowOverlay,
61
- width: "auto",
62
- height: "auto",
63
- align: "start",
64
- side: "inside-right",
65
- anchorRef: expandButtonRef,
66
- anchorOffset: overlayPaddingPx * -1,
67
- alignmentOffset: overlayPaddingPx * -1,
68
- renderAnchor: (props) => /*#__PURE__*/ jsxs(ButtonComponent, {
69
- variant: "invisible",
70
- size: "small",
71
- ...props,
72
- ref: expandButtonRef,
73
- children: [/*#__PURE__*/ jsxs(VisuallyHidden, { children: [
74
- "Show +",
75
- hiddenItemIds.length,
76
- " more"
77
- ] }), /*#__PURE__*/ jsxs("span", {
78
- "aria-hidden": "true",
79
- children: ["+", hiddenItemIds.length]
80
- })]
81
- }),
82
- focusZoneSettings: { disabled: true },
83
- overlayProps: {
84
- role: "dialog",
85
- "aria-label": `All ${totalLength} labels`,
86
- "aria-modal": true
87
- },
88
- children: /*#__PURE__*/ jsxs("div", {
89
- className: LabelGroup_module_css_default.OverlayContainer,
90
- style: {
91
- width: overlayWidth,
92
- padding: `${overlayPaddingPx}px`
93
- },
94
- children: [/*#__PURE__*/ jsx("div", {
95
- className: LabelGroup_module_css_default.OverlayInner,
96
- children
97
- }), /*#__PURE__*/ jsx(IconButton, {
98
- onClick: closeOverflowOverlay,
99
- icon: XIcon,
100
- "aria-label": "Close",
101
- variant: "invisible",
102
- className: LabelGroup_module_css_default.CloseButton
103
- })]
104
- })
105
- }) : null;
106
- $[0] = children;
107
- $[1] = closeOverflowOverlay;
108
- $[2] = expandButtonRef;
109
- $[3] = hiddenItemIds.length;
110
- $[4] = isOverflowShown;
111
- $[5] = openOverflowOverlay;
112
- $[6] = overlayPaddingPx;
113
- $[7] = overlayWidth;
114
- $[8] = totalLength;
115
- $[9] = t1;
116
- } else t1 = $[9];
117
- return t1;
118
- };
81
+ className: LabelGroup_module_css_default.CloseButton
82
+ })]
83
+ })
84
+ }) : null;
119
85
  const LabelGroup = ({ children, visibleChildCount, overflowStyle = "overlay", as: Component = "ul", className }) => {
120
86
  const containerRef = React.useRef(null);
121
87
  const collapseButtonRef = React.useRef(null);
@@ -177,14 +143,14 @@ const LabelGroup = ({ children, visibleChildCount, overflowStyle = "overlay", as
177
143
  if (!visibleChildCount || isOverflowShown) return;
178
144
  if (visibleChildCount === "auto") {
179
145
  const observer = new IntersectionObserver((entries) => {
180
- const updatedEntries_0 = {};
146
+ const updatedEntries = {};
181
147
  for (const entry of entries) {
182
- const targetId_0 = entry.target.getAttribute("data-index");
183
- if (targetId_0) updatedEntries_0[targetId_0] = entry.isIntersecting;
148
+ const targetId = entry.target.getAttribute("data-index");
149
+ if (targetId) updatedEntries[targetId] = entry.isIntersecting;
184
150
  }
185
151
  setVisibilityMap((prev) => ({
186
152
  ...prev,
187
- ...updatedEntries_0
153
+ ...updatedEntries
188
154
  }));
189
155
  }, {
190
156
  root: containerRef.current,
@@ -230,10 +196,10 @@ const LabelGroup = ({ children, visibleChildCount, overflowStyle = "overlay", as
230
196
  "data-list": isList || void 0,
231
197
  className: clsx(className, LabelGroup_module_css_default.Container),
232
198
  "data-component": "LabelGroup",
233
- children: [React.Children.map(children, (child_0, index) => /*#__PURE__*/ jsx(ItemWrapperComponent, {
199
+ children: [React.Children.map(children, (child, index) => /*#__PURE__*/ jsx(ItemWrapperComponent, {
234
200
  "data-index": index,
235
201
  className: clsx(LabelGroup_module_css_default.ItemWrapper, { [LabelGroup_module_css_default["ItemWrapper--hidden"]]: hiddenItemIds.includes(index.toString()) }),
236
- children: child_0
202
+ children: child
237
203
  }, index)), /*#__PURE__*/ jsx(ToggleWrapper, {
238
204
  "data-component": "LabelGroup.Toggle",
239
205
  children: overflowStyle === "inline" ? /*#__PURE__*/ jsx(InlineToggle, {
@@ -261,8 +227,8 @@ const LabelGroup = ({ children, visibleChildCount, overflowStyle = "overlay", as
261
227
  "data-list": isList || void 0,
262
228
  className: clsx(className, LabelGroup_module_css_default.Container),
263
229
  "data-component": "LabelGroup",
264
- children: isList ? React.Children.map(children, (child_1, index_0) => {
265
- return /*#__PURE__*/ jsx("li", { children: child_1 }, index_0);
230
+ children: isList ? React.Children.map(children, (child, index) => {
231
+ return /*#__PURE__*/ jsx("li", { children: child }, index);
266
232
  }) : children
267
233
  });
268
234
  };
@@ -4,7 +4,6 @@ import { useOverlay } from "../hooks/useOverlay.js";
4
4
  import Portal_default from "../Portal/index.js";
5
5
  import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
6
6
  import Overlay_module_css_default from "./Overlay.module.css.js";
7
- import { c } from "react-compiler-runtime";
8
7
  import { clsx } from "clsx";
9
8
  import { jsx } from "react/jsx-runtime";
10
9
  import React, { useEffect, useRef } from "react";
@@ -82,179 +81,56 @@ const BaseOverlay = /*#__PURE__*/ React.forwardRef(({ visibility, height, width,
82
81
  * @param width Sets the width of the `Overlay`, pick from our set list of widths, or pass `auto` to automatically set the width based on the content of the `Overlay`. `small` corresponds to `256px`, `medium` corresponds to `320px`, `large` corresponds to `480px`, `xlarge` corresponds to `640px`, `xxlarge` corresponds to `960px`.
83
82
 
84
83
  */
85
- const Overlay = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
86
- const $ = c(47);
87
- let _PrivateDisablePortal;
88
- let anchorSide;
89
- let ignoreClickRefs;
90
- let initialFocusRef;
91
- let left;
92
- let onClickOutside;
93
- let onEscape;
94
- let portalContainerName;
95
- let preventFocusOnOpen;
96
- let props;
97
- let responsiveVariant;
98
- let returnFocusRef;
99
- let right;
100
- let t1;
101
- let t2;
102
- let t3;
103
- let t4;
104
- let t5;
105
- if ($[0] !== t0) {
106
- ({anchorSide, _PrivateDisablePortal, height: t1, ignoreClickRefs, initialFocusRef, left, onClickOutside, onEscape, portalContainerName, preventOverflow: t2, preventFocusOnOpen, returnFocusRef, right, role: t3, visibility: t4, width: t5, responsiveVariant, ...props} = t0);
107
- $[0] = t0;
108
- $[1] = _PrivateDisablePortal;
109
- $[2] = anchorSide;
110
- $[3] = ignoreClickRefs;
111
- $[4] = initialFocusRef;
112
- $[5] = left;
113
- $[6] = onClickOutside;
114
- $[7] = onEscape;
115
- $[8] = portalContainerName;
116
- $[9] = preventFocusOnOpen;
117
- $[10] = props;
118
- $[11] = responsiveVariant;
119
- $[12] = returnFocusRef;
120
- $[13] = right;
121
- $[14] = t1;
122
- $[15] = t2;
123
- $[16] = t3;
124
- $[17] = t4;
125
- $[18] = t5;
126
- } else {
127
- _PrivateDisablePortal = $[1];
128
- anchorSide = $[2];
129
- ignoreClickRefs = $[3];
130
- initialFocusRef = $[4];
131
- left = $[5];
132
- onClickOutside = $[6];
133
- onEscape = $[7];
134
- portalContainerName = $[8];
135
- preventFocusOnOpen = $[9];
136
- props = $[10];
137
- responsiveVariant = $[11];
138
- returnFocusRef = $[12];
139
- right = $[13];
140
- t1 = $[14];
141
- t2 = $[15];
142
- t3 = $[16];
143
- t4 = $[17];
144
- t5 = $[18];
145
- }
146
- const height = t1 === void 0 ? "auto" : t1;
147
- const preventOverflow = t2 === void 0 ? true : t2;
148
- const role = t3 === void 0 ? "none" : t3;
149
- const visibility = t4 === void 0 ? "visible" : t4;
150
- const width = t5 === void 0 ? "auto" : t5;
84
+ const Overlay = /*#__PURE__*/ React.forwardRef(({ anchorSide, _PrivateDisablePortal, height = "auto", ignoreClickRefs, initialFocusRef, left, onClickOutside, onEscape, portalContainerName, preventOverflow = true, preventFocusOnOpen, returnFocusRef, right, role = "none", visibility = "visible", width = "auto", responsiveVariant, ...props }, forwardedRef) => {
151
85
  const overlayRef = useRef(null);
152
86
  const mergedOverlayRef = useMergedRefs(forwardedRef, overlayRef);
87
+ const slideAnimationDistance = 8;
88
+ const slideAnimationEasing = "cubic-bezier(0.33, 1, 0.68, 1)";
153
89
  const cssAnchorPositioning = useFeatureFlag("primer_react_css_anchor_positioning");
154
- let t6;
155
- if ($[19] !== ignoreClickRefs || $[20] !== initialFocusRef || $[21] !== onClickOutside || $[22] !== onEscape || $[23] !== preventFocusOnOpen || $[24] !== returnFocusRef) {
156
- t6 = {
157
- overlayRef,
158
- returnFocusRef,
159
- onEscape,
160
- ignoreClickRefs,
161
- onClickOutside,
162
- initialFocusRef,
163
- preventFocusOnOpen
164
- };
165
- $[19] = ignoreClickRefs;
166
- $[20] = initialFocusRef;
167
- $[21] = onClickOutside;
168
- $[22] = onEscape;
169
- $[23] = preventFocusOnOpen;
170
- $[24] = returnFocusRef;
171
- $[25] = t6;
172
- } else t6 = $[25];
173
- useOverlay(t6);
174
- let t7;
175
- let t8;
176
- if ($[26] !== height) {
177
- t7 = () => {
178
- var _overlayRef$current;
179
- if (height === "initial" && (_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.clientHeight) overlayRef.current.style.height = `${overlayRef.current.clientHeight}px`;
180
- };
181
- t8 = [height];
182
- $[26] = height;
183
- $[27] = t7;
184
- $[28] = t8;
185
- } else {
186
- t7 = $[27];
187
- t8 = $[28];
188
- }
189
- useEffect(t7, t8);
190
- let t10;
191
- let t9;
192
- if ($[29] !== anchorSide || $[30] !== visibility) {
193
- t9 = () => {
194
- var _overlayRef$current2;
195
- const { x, y } = getSlideAnimationStartingVector(anchorSide);
196
- if (!x && !y || !((_overlayRef$current2 = overlayRef.current) !== null && _overlayRef$current2 !== void 0 && _overlayRef$current2.animate) || visibility === "hidden") return;
197
- overlayRef.current.animate({ transform: [`translate(${8 * x}px, ${8 * y}px)`, "translate(0, 0)"] }, {
198
- duration: animationDuration,
199
- easing: "cubic-bezier(0.33, 1, 0.68, 1)"
200
- });
201
- };
202
- t10 = [
203
- anchorSide,
204
- 8,
205
- "cubic-bezier(0.33, 1, 0.68, 1)",
206
- visibility
207
- ];
208
- $[29] = anchorSide;
209
- $[30] = visibility;
210
- $[31] = t10;
211
- $[32] = t9;
212
- } else {
213
- t10 = $[31];
214
- t9 = $[32];
215
- }
216
- useIsomorphicLayoutEffect(t9, t10);
217
- const leftPosition = left === void 0 && right === void 0 ? 0 : left;
218
- const t11 = !preventOverflow ? true : void 0;
219
- let t12;
220
- if ($[33] !== height || $[34] !== leftPosition || $[35] !== mergedOverlayRef || $[36] !== props || $[37] !== responsiveVariant || $[38] !== right || $[39] !== role || $[40] !== t11 || $[41] !== visibility || $[42] !== width) {
221
- t12 = /*#__PURE__*/ jsx(BaseOverlay, {
222
- role,
223
- width,
224
- "data-reflow-container": t11,
225
- ref: mergedOverlayRef,
226
- left: leftPosition,
227
- right,
228
- height,
229
- visibility,
230
- "data-responsive": responsiveVariant,
231
- ...props
90
+ useOverlay({
91
+ overlayRef,
92
+ returnFocusRef,
93
+ onEscape,
94
+ ignoreClickRefs,
95
+ onClickOutside,
96
+ initialFocusRef,
97
+ preventFocusOnOpen
98
+ });
99
+ useEffect(() => {
100
+ var _overlayRef$current;
101
+ if (height === "initial" && (_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.clientHeight) overlayRef.current.style.height = `${overlayRef.current.clientHeight}px`;
102
+ }, [height]);
103
+ useIsomorphicLayoutEffect(() => {
104
+ var _overlayRef$current2;
105
+ const { x, y } = getSlideAnimationStartingVector(anchorSide);
106
+ if (!x && !y || !((_overlayRef$current2 = overlayRef.current) !== null && _overlayRef$current2 !== void 0 && _overlayRef$current2.animate) || visibility === "hidden") return;
107
+ overlayRef.current.animate({ transform: [`translate(${slideAnimationDistance * x}px, ${slideAnimationDistance * y}px)`, `translate(0, 0)`] }, {
108
+ duration: animationDuration,
109
+ easing: slideAnimationEasing
232
110
  });
233
- $[33] = height;
234
- $[34] = leftPosition;
235
- $[35] = mergedOverlayRef;
236
- $[36] = props;
237
- $[37] = responsiveVariant;
238
- $[38] = right;
239
- $[39] = role;
240
- $[40] = t11;
241
- $[41] = visibility;
242
- $[42] = width;
243
- $[43] = t12;
244
- } else t12 = $[43];
245
- const overlayContent = t12;
111
+ }, [
112
+ anchorSide,
113
+ slideAnimationDistance,
114
+ slideAnimationEasing,
115
+ visibility
116
+ ]);
117
+ const overlayContent = /*#__PURE__*/ jsx(BaseOverlay, {
118
+ role,
119
+ width,
120
+ "data-reflow-container": !preventOverflow ? true : void 0,
121
+ ref: mergedOverlayRef,
122
+ left: left === void 0 && right === void 0 ? 0 : left,
123
+ right,
124
+ height,
125
+ visibility,
126
+ "data-responsive": responsiveVariant,
127
+ ...props
128
+ });
246
129
  if (_PrivateDisablePortal && cssAnchorPositioning) return overlayContent;
247
- let t13;
248
- if ($[44] !== overlayContent || $[45] !== portalContainerName) {
249
- t13 = /*#__PURE__*/ jsx(Portal_default, {
250
- containerName: portalContainerName,
251
- children: overlayContent
252
- });
253
- $[44] = overlayContent;
254
- $[45] = portalContainerName;
255
- $[46] = t13;
256
- } else t13 = $[46];
257
- return t13;
130
+ return /*#__PURE__*/ jsx(Portal_default, {
131
+ containerName: portalContainerName,
132
+ children: overlayContent
133
+ });
258
134
  });
259
135
  //#endregion
260
136
  export { BaseOverlay, Overlay as default };
@@ -38,17 +38,17 @@ const TextInput = /*#__PURE__*/ React.forwardRef(({ icon: IconComponent, leading
38
38
  const trailingVisualId = useId();
39
39
  const loadingId = useId();
40
40
  const inputDescribedBy = clsx(inputProps["aria-describedby"], LeadingVisual && leadingVisualId, TrailingVisual && trailingVisualId, loading && loadingId) || void 0;
41
- const handleInputFocus = useCallback((e_0) => {
41
+ const handleInputFocus = useCallback((e) => {
42
42
  setIsInputFocused(true);
43
- onFocus && onFocus(e_0);
43
+ onFocus && onFocus(e);
44
44
  }, [onFocus]);
45
- const handleInputBlur = useCallback((e_1) => {
45
+ const handleInputBlur = useCallback((e) => {
46
46
  setIsInputFocused(false);
47
- onBlur && onBlur(e_1);
47
+ onBlur && onBlur(e);
48
48
  }, [onBlur]);
49
- const handleInputChange = useCallback((e_2) => {
50
- if (characterLimit && !isControlled) setUncontrolledLength(e_2.target.value.length);
51
- onChange === null || onChange === void 0 || onChange(e_2);
49
+ const handleInputChange = useCallback((e) => {
50
+ if (characterLimit && !isControlled) setUncontrolledLength(e.target.value.length);
51
+ onChange === null || onChange === void 0 || onChange(e);
52
52
  }, [
53
53
  onChange,
54
54
  characterLimit,