@primer/react 38.47.0-rc.cdd1ab1f0 → 39.0.0-rc.00628b8df

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.
@@ -10,8 +10,6 @@ import { getCharacterCountState } from "../utils/character-counter.js";
10
10
  import { AriaStatus } from "../live-region/AriaStatus.js";
11
11
  import Text_default from "../Text/Text.js";
12
12
  import { useMergedRefs } from "../hooks/useMergedRefs.js";
13
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
14
- import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
15
13
  import React, { useId, useRef, useState } from "react";
16
14
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
17
15
  import { clsx } from "clsx";
@@ -20,18 +18,14 @@ import { AlertFillIcon } from "@primer/octicons-react";
20
18
  // src/TextInput/TextInput.tsx
21
19
  const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
22
20
  var _counter$isOverLimit;
23
- const $ = c(80);
21
+ const $ = c(79);
24
22
  const { icon: IconComponent, leadingVisual: LeadingVisual, trailingVisual: TrailingVisual, trailingAction, block, className, contrast, disabled, loading, loaderPosition: t1, loaderText: t2, monospace, validationStatus, size: sizeProp, onFocus, onBlur, variant: variantProp, width: widthProp, minWidth: minWidthProp, maxWidth: maxWidthProp, type: t3, required, characterLimit, onChange, value, defaultValue, "data-component": dataComponent, ...inputProps } = t0;
25
23
  const loaderPosition = t1 === void 0 ? "auto" : t1;
26
24
  const loaderText = t2 === void 0 ? "Loading" : t2;
27
25
  const type = t3 === void 0 ? "text" : t3;
28
26
  const [isInputFocused, setIsInputFocused] = useState(false);
29
- const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
30
27
  const inputRef = useRef(null);
31
28
  const mergedRef = useMergedRefs(inputRef, ref);
32
- const providedOrCreatedRef = useProvidedRefOrCreate(ref);
33
- const readRef = mergedRefEnabled ? inputRef : providedOrCreatedRef;
34
- const appliedRef = mergedRefEnabled ? mergedRef : providedOrCreatedRef;
35
29
  const isControlled = value !== void 0;
36
30
  let t4;
37
31
  if ($[0] !== defaultValue) {
@@ -54,53 +48,52 @@ const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
54
48
  const showTrailingLoadingIndicator = loading && (loaderPosition === "trailing" || Boolean(loaderPosition === "auto" && !LeadingVisual));
55
49
  const isSegmentedInputType = type === "date" || type === "time" || type === "datetime-local";
56
50
  let t6;
57
- if ($[4] !== isSegmentedInputType || $[5] !== readRef.current) {
51
+ if ($[4] !== isSegmentedInputType) {
58
52
  t6 = (e) => {
59
- if (e.target !== readRef.current || !isSegmentedInputType) {
60
- var _readRef$current;
61
- (_readRef$current = readRef.current) === null || _readRef$current === void 0 || _readRef$current.focus();
53
+ if (e.target !== inputRef.current || !isSegmentedInputType) {
54
+ var _inputRef$current;
55
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
62
56
  }
63
57
  };
64
58
  $[4] = isSegmentedInputType;
65
- $[5] = readRef.current;
66
- $[6] = t6;
67
- } else t6 = $[6];
59
+ $[5] = t6;
60
+ } else t6 = $[5];
68
61
  const focusInput = t6;
69
62
  const leadingVisualId = useId();
70
63
  const trailingVisualId = useId();
71
64
  const loadingId = useId();
72
65
  const inputDescribedBy = clsx(inputProps["aria-describedby"], LeadingVisual && leadingVisualId, TrailingVisual && trailingVisualId, loading && loadingId) || void 0;
73
66
  let t7;
74
- if ($[7] !== onFocus) {
67
+ if ($[6] !== onFocus) {
75
68
  t7 = (e_0) => {
76
69
  setIsInputFocused(true);
77
70
  onFocus && onFocus(e_0);
78
71
  };
79
- $[7] = onFocus;
80
- $[8] = t7;
81
- } else t7 = $[8];
72
+ $[6] = onFocus;
73
+ $[7] = t7;
74
+ } else t7 = $[7];
82
75
  const handleInputFocus = t7;
83
76
  let t8;
84
- if ($[9] !== onBlur) {
77
+ if ($[8] !== onBlur) {
85
78
  t8 = (e_1) => {
86
79
  setIsInputFocused(false);
87
80
  onBlur && onBlur(e_1);
88
81
  };
89
- $[9] = onBlur;
90
- $[10] = t8;
91
- } else t8 = $[10];
82
+ $[8] = onBlur;
83
+ $[9] = t8;
84
+ } else t8 = $[9];
92
85
  const handleInputBlur = t8;
93
86
  let t9;
94
- if ($[11] !== characterLimit || $[12] !== isControlled || $[13] !== onChange) {
87
+ if ($[10] !== characterLimit || $[11] !== isControlled || $[12] !== onChange) {
95
88
  t9 = (e_2) => {
96
89
  if (characterLimit && !isControlled) setUncontrolledLength(e_2.target.value.length);
97
90
  onChange === null || onChange === void 0 || onChange(e_2);
98
91
  };
99
- $[11] = characterLimit;
100
- $[12] = isControlled;
101
- $[13] = onChange;
102
- $[14] = t9;
103
- } else t9 = $[14];
92
+ $[10] = characterLimit;
93
+ $[11] = isControlled;
94
+ $[12] = onChange;
95
+ $[13] = t9;
96
+ } else t9 = $[13];
104
97
  const handleInputChange = t9;
105
98
  const characterCountId = useId();
106
99
  const characterCountStaticMessageId = useId();
@@ -110,23 +103,23 @@ const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
110
103
  const t12 = Boolean(trailingAction);
111
104
  const t13 = Boolean(loading);
112
105
  let t14;
113
- if ($[15] !== IconComponent) {
106
+ if ($[14] !== IconComponent) {
114
107
  t14 = IconComponent && /* @__PURE__ */ jsx(IconComponent, {
115
108
  className: "TextInput-icon",
116
109
  "data-component": "TextInput.Icon"
117
110
  });
118
- $[15] = IconComponent;
119
- $[16] = t14;
120
- } else t14 = $[16];
111
+ $[14] = IconComponent;
112
+ $[15] = t14;
113
+ } else t14 = $[15];
121
114
  const t15 = typeof loading === "boolean";
122
115
  let t16;
123
- if ($[17] !== LeadingVisual) {
116
+ if ($[16] !== LeadingVisual) {
124
117
  t16 = typeof LeadingVisual !== "string" && isValidElementType(LeadingVisual) ? /* @__PURE__ */ jsx(LeadingVisual, {}) : LeadingVisual;
125
- $[17] = LeadingVisual;
126
- $[18] = t16;
127
- } else t16 = $[18];
118
+ $[16] = LeadingVisual;
119
+ $[17] = t16;
120
+ } else t16 = $[17];
128
121
  let t17;
129
- if ($[19] !== leadingVisualId || $[20] !== showLeadingLoadingIndicator || $[21] !== t15 || $[22] !== t16) {
122
+ if ($[18] !== leadingVisualId || $[19] !== showLeadingLoadingIndicator || $[20] !== t15 || $[21] !== t16) {
130
123
  t17 = /* @__PURE__ */ jsx(TextInputInnerVisualSlot, {
131
124
  visualPosition: "leading",
132
125
  showLoadingIndicator: showLeadingLoadingIndicator,
@@ -134,26 +127,26 @@ const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
134
127
  id: leadingVisualId,
135
128
  children: t16
136
129
  });
137
- $[19] = leadingVisualId;
138
- $[20] = showLeadingLoadingIndicator;
139
- $[21] = t15;
140
- $[22] = t16;
141
- $[23] = t17;
142
- } else t17 = $[23];
130
+ $[18] = leadingVisualId;
131
+ $[19] = showLeadingLoadingIndicator;
132
+ $[20] = t15;
133
+ $[21] = t16;
134
+ $[22] = t17;
135
+ } else t17 = $[22];
143
136
  const t18 = isValid === "error" ? "true" : void 0;
144
137
  let t19;
145
- if ($[24] !== characterCountStaticMessageId || $[25] !== characterLimit || $[26] !== inputDescribedBy) {
138
+ if ($[23] !== characterCountStaticMessageId || $[24] !== characterLimit || $[25] !== inputDescribedBy) {
146
139
  t19 = characterLimit ? [characterCountStaticMessageId, inputDescribedBy].filter(Boolean).join(" ") || void 0 : inputDescribedBy;
147
- $[24] = characterCountStaticMessageId;
148
- $[25] = characterLimit;
149
- $[26] = inputDescribedBy;
150
- $[27] = t19;
151
- } else t19 = $[27];
140
+ $[23] = characterCountStaticMessageId;
141
+ $[24] = characterLimit;
142
+ $[25] = inputDescribedBy;
143
+ $[26] = t19;
144
+ } else t19 = $[26];
152
145
  const t20 = dataComponent !== null && dataComponent !== void 0 ? dataComponent : "input";
153
146
  let t21;
154
- if ($[28] !== appliedRef || $[29] !== defaultValue || $[30] !== disabled || $[31] !== handleInputBlur || $[32] !== handleInputChange || $[33] !== handleInputFocus || $[34] !== inputProps || $[35] !== required || $[36] !== t18 || $[37] !== t19 || $[38] !== t20 || $[39] !== type || $[40] !== value) {
147
+ if ($[27] !== defaultValue || $[28] !== disabled || $[29] !== handleInputBlur || $[30] !== handleInputChange || $[31] !== handleInputFocus || $[32] !== inputProps || $[33] !== mergedRef || $[34] !== required || $[35] !== t18 || $[36] !== t19 || $[37] !== t20 || $[38] !== type || $[39] !== value) {
155
148
  t21 = /* @__PURE__ */ jsx(UnstyledTextInput, {
156
- ref: appliedRef,
149
+ ref: mergedRef,
157
150
  disabled,
158
151
  onFocus: handleInputFocus,
159
152
  onBlur: handleInputBlur,
@@ -167,41 +160,41 @@ const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
167
160
  "aria-describedby": t19,
168
161
  "data-component": t20
169
162
  });
170
- $[28] = appliedRef;
171
- $[29] = defaultValue;
172
- $[30] = disabled;
173
- $[31] = handleInputBlur;
174
- $[32] = handleInputChange;
175
- $[33] = handleInputFocus;
176
- $[34] = inputProps;
177
- $[35] = required;
178
- $[36] = t18;
179
- $[37] = t19;
180
- $[38] = t20;
181
- $[39] = type;
182
- $[40] = value;
183
- $[41] = t21;
184
- } else t21 = $[41];
163
+ $[27] = defaultValue;
164
+ $[28] = disabled;
165
+ $[29] = handleInputBlur;
166
+ $[30] = handleInputChange;
167
+ $[31] = handleInputFocus;
168
+ $[32] = inputProps;
169
+ $[33] = mergedRef;
170
+ $[34] = required;
171
+ $[35] = t18;
172
+ $[36] = t19;
173
+ $[37] = t20;
174
+ $[38] = type;
175
+ $[39] = value;
176
+ $[40] = t21;
177
+ } else t21 = $[40];
185
178
  let t22;
186
- if ($[42] !== loaderText || $[43] !== loading || $[44] !== loadingId) {
179
+ if ($[41] !== loaderText || $[42] !== loading || $[43] !== loadingId) {
187
180
  t22 = loading && /* @__PURE__ */ jsx(VisuallyHidden, {
188
181
  id: loadingId,
189
182
  children: loaderText
190
183
  });
191
- $[42] = loaderText;
192
- $[43] = loading;
193
- $[44] = loadingId;
194
- $[45] = t22;
195
- } else t22 = $[45];
184
+ $[41] = loaderText;
185
+ $[42] = loading;
186
+ $[43] = loadingId;
187
+ $[44] = t22;
188
+ } else t22 = $[44];
196
189
  const t23 = typeof loading === "boolean";
197
190
  let t24;
198
- if ($[46] !== TrailingVisual) {
191
+ if ($[45] !== TrailingVisual) {
199
192
  t24 = typeof TrailingVisual !== "string" && isValidElementType(TrailingVisual) ? /* @__PURE__ */ jsx(TrailingVisual, {}) : TrailingVisual;
200
- $[46] = TrailingVisual;
201
- $[47] = t24;
202
- } else t24 = $[47];
193
+ $[45] = TrailingVisual;
194
+ $[46] = t24;
195
+ } else t24 = $[46];
203
196
  let t25;
204
- if ($[48] !== showTrailingLoadingIndicator || $[49] !== t23 || $[50] !== t24 || $[51] !== trailingVisualId) {
197
+ if ($[47] !== showTrailingLoadingIndicator || $[48] !== t23 || $[49] !== t24 || $[50] !== trailingVisualId) {
205
198
  t25 = /* @__PURE__ */ jsx(TextInputInnerVisualSlot, {
206
199
  visualPosition: "trailing",
207
200
  showLoadingIndicator: showTrailingLoadingIndicator,
@@ -210,14 +203,14 @@ const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
210
203
  "data-testid": "text-input-trailing-visual",
211
204
  children: t24
212
205
  });
213
- $[48] = showTrailingLoadingIndicator;
214
- $[49] = t23;
215
- $[50] = t24;
216
- $[51] = trailingVisualId;
217
- $[52] = t25;
218
- } else t25 = $[52];
206
+ $[47] = showTrailingLoadingIndicator;
207
+ $[48] = t23;
208
+ $[49] = t24;
209
+ $[50] = trailingVisualId;
210
+ $[51] = t25;
211
+ } else t25 = $[51];
219
212
  let t26;
220
- if ($[53] !== block || $[54] !== contrast || $[55] !== disabled || $[56] !== focusInput || $[57] !== isInputFocused || $[58] !== isValid || $[59] !== maxWidthProp || $[60] !== minWidthProp || $[61] !== monospace || $[62] !== sizeProp || $[63] !== t10 || $[64] !== t11 || $[65] !== t12 || $[66] !== t13 || $[67] !== t14 || $[68] !== t17 || $[69] !== t21 || $[70] !== t22 || $[71] !== t25 || $[72] !== trailingAction || $[73] !== variantProp || $[74] !== widthProp || $[75] !== wrapperClasses) {
213
+ if ($[52] !== block || $[53] !== contrast || $[54] !== disabled || $[55] !== focusInput || $[56] !== isInputFocused || $[57] !== isValid || $[58] !== maxWidthProp || $[59] !== minWidthProp || $[60] !== monospace || $[61] !== sizeProp || $[62] !== t10 || $[63] !== t11 || $[64] !== t12 || $[65] !== t13 || $[66] !== t14 || $[67] !== t17 || $[68] !== t21 || $[69] !== t22 || $[70] !== t25 || $[71] !== trailingAction || $[72] !== variantProp || $[73] !== widthProp || $[74] !== wrapperClasses) {
221
214
  t26 = /* @__PURE__ */ jsxs(TextInputWrapper, {
222
215
  block,
223
216
  className: wrapperClasses,
@@ -245,31 +238,31 @@ const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
245
238
  trailingAction
246
239
  ]
247
240
  });
248
- $[53] = block;
249
- $[54] = contrast;
250
- $[55] = disabled;
251
- $[56] = focusInput;
252
- $[57] = isInputFocused;
253
- $[58] = isValid;
254
- $[59] = maxWidthProp;
255
- $[60] = minWidthProp;
256
- $[61] = monospace;
257
- $[62] = sizeProp;
258
- $[63] = t10;
259
- $[64] = t11;
260
- $[65] = t12;
261
- $[66] = t13;
262
- $[67] = t14;
263
- $[68] = t17;
264
- $[69] = t21;
265
- $[70] = t22;
266
- $[71] = t25;
267
- $[72] = trailingAction;
268
- $[73] = variantProp;
269
- $[74] = widthProp;
270
- $[75] = wrapperClasses;
271
- $[76] = t26;
272
- } else t26 = $[76];
241
+ $[52] = block;
242
+ $[53] = contrast;
243
+ $[54] = disabled;
244
+ $[55] = focusInput;
245
+ $[56] = isInputFocused;
246
+ $[57] = isValid;
247
+ $[58] = maxWidthProp;
248
+ $[59] = minWidthProp;
249
+ $[60] = monospace;
250
+ $[61] = sizeProp;
251
+ $[62] = t10;
252
+ $[63] = t11;
253
+ $[64] = t12;
254
+ $[65] = t13;
255
+ $[66] = t14;
256
+ $[67] = t17;
257
+ $[68] = t21;
258
+ $[69] = t22;
259
+ $[70] = t25;
260
+ $[71] = trailingAction;
261
+ $[72] = variantProp;
262
+ $[73] = widthProp;
263
+ $[74] = wrapperClasses;
264
+ $[75] = t26;
265
+ } else t26 = $[75];
273
266
  const t27 = characterLimit && /* @__PURE__ */ jsxs(Fragment$1, { children: [
274
267
  /* @__PURE__ */ jsx(AriaStatus, {
275
268
  announceOnShow: false,
@@ -296,12 +289,12 @@ const TextInput = /*#__PURE__*/ React.forwardRef((t0, ref) => {
296
289
  })
297
290
  ] });
298
291
  let t28;
299
- if ($[77] !== t26 || $[78] !== t27) {
292
+ if ($[76] !== t26 || $[77] !== t27) {
300
293
  t28 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t26, t27] });
301
- $[77] = t26;
302
- $[78] = t27;
303
- $[79] = t28;
304
- } else t28 = $[79];
294
+ $[76] = t26;
295
+ $[77] = t27;
296
+ $[78] = t28;
297
+ } else t28 = $[78];
305
298
  return t28;
306
299
  });
307
300
  TextInput.displayName = "TextInput";
@@ -34,8 +34,8 @@ type TimelineActionsProps = {
34
34
  type TimelineAvatarProps = {
35
35
  /** Class name for custom styling */className?: string;
36
36
  } & React.ComponentPropsWithoutRef<'div'>;
37
- declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Omit<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref">, "role"> & React.RefAttributes<HTMLDivElement | HTMLOListElement>> & {
38
- Item: React.ForwardRefExoticComponent<StyledTimelineItemProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
37
+ declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Omit<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref">, "role"> & React.RefAttributes<HTMLOListElement>> & {
38
+ Item: React.ForwardRefExoticComponent<StyledTimelineItemProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
39
39
  Avatar: React.ForwardRefExoticComponent<{
40
40
  /** Class name for custom styling */className?: string;
41
41
  } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -52,7 +52,7 @@ declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Om
52
52
  } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
53
53
  Break: React.ForwardRefExoticComponent<{
54
54
  /** Class name for custom styling */className?: string;
55
- } & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref">, "role"> & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
55
+ } & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref">, "role"> & React.RefAttributes<HTMLLIElement>>;
56
56
  Actions: React.ForwardRefExoticComponent<{
57
57
  /** Class name for custom styling */className?: string;
58
58
  } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,4 @@
1
1
  import { c } from "../utils/react-compiler-runtime.js";
2
- import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
3
2
  import Timeline_module_css_default from "./Timeline.module.css.js";
4
3
  import React from "react";
5
4
  import { jsx } from "react/jsx-runtime";
@@ -10,7 +9,7 @@ function resolveClipSidebar(clipSidebar) {
10
9
  if (clipSidebar === "start" || clipSidebar === "end") return clipSidebar;
11
10
  }
12
11
  const Timeline = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
13
- const $ = c(20);
12
+ const $ = c(13);
14
13
  let className;
15
14
  let clipSidebar;
16
15
  let props;
@@ -25,7 +24,6 @@ const Timeline = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
25
24
  clipSidebar = $[2];
26
25
  props = $[3];
27
26
  }
28
- const useListSemantics = useFeatureFlag("primer_react_timeline_list_semantics");
29
27
  let t1;
30
28
  if ($[4] !== clipSidebar) {
31
29
  t1 = resolveClipSidebar(clipSidebar);
@@ -33,58 +31,32 @@ const Timeline = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
33
31
  $[5] = t1;
34
32
  } else t1 = $[5];
35
33
  const resolvedClipSidebar = t1;
36
- if (useListSemantics) {
37
- let t2;
38
- if ($[6] !== className) {
39
- t2 = clsx(className, Timeline_module_css_default.Timeline);
40
- $[6] = className;
41
- $[7] = t2;
42
- } else t2 = $[7];
43
- const t3 = forwardRef;
44
- let t4;
45
- if ($[8] !== props || $[9] !== resolvedClipSidebar || $[10] !== t2 || $[11] !== t3) {
46
- t4 = /* @__PURE__ */ jsx("ol", {
47
- ...props,
48
- role: "list",
49
- className: t2,
50
- ref: t3,
51
- "data-clip-sidebar": resolvedClipSidebar
52
- });
53
- $[8] = props;
54
- $[9] = resolvedClipSidebar;
55
- $[10] = t2;
56
- $[11] = t3;
57
- $[12] = t4;
58
- } else t4 = $[12];
59
- return t4;
60
- }
61
- const t2 = props;
34
+ let t2;
35
+ if ($[6] !== className) {
36
+ t2 = clsx(className, Timeline_module_css_default.Timeline);
37
+ $[6] = className;
38
+ $[7] = t2;
39
+ } else t2 = $[7];
62
40
  let t3;
63
- if ($[13] !== className) {
64
- t3 = clsx(className, Timeline_module_css_default.Timeline);
65
- $[13] = className;
66
- $[14] = t3;
67
- } else t3 = $[14];
68
- const t4 = forwardRef;
69
- let t5;
70
- if ($[15] !== resolvedClipSidebar || $[16] !== t2 || $[17] !== t3 || $[18] !== t4) {
71
- t5 = /* @__PURE__ */ jsx("div", {
72
- ...t2,
73
- className: t3,
74
- ref: t4,
41
+ if ($[8] !== forwardRef || $[9] !== props || $[10] !== resolvedClipSidebar || $[11] !== t2) {
42
+ t3 = /* @__PURE__ */ jsx("ol", {
43
+ ...props,
44
+ role: "list",
45
+ className: t2,
46
+ ref: forwardRef,
75
47
  "data-clip-sidebar": resolvedClipSidebar
76
48
  });
77
- $[15] = resolvedClipSidebar;
78
- $[16] = t2;
79
- $[17] = t3;
80
- $[18] = t4;
81
- $[19] = t5;
82
- } else t5 = $[19];
83
- return t5;
49
+ $[8] = forwardRef;
50
+ $[9] = props;
51
+ $[10] = resolvedClipSidebar;
52
+ $[11] = t2;
53
+ $[12] = t3;
54
+ } else t3 = $[12];
55
+ return t3;
84
56
  });
85
57
  Timeline.displayName = "Timeline";
86
58
  const TimelineItem = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
87
- const $ = c(18);
59
+ const $ = c(11);
88
60
  let className;
89
61
  let condensed;
90
62
  let props;
@@ -99,55 +71,28 @@ const TimelineItem = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
99
71
  condensed = $[2];
100
72
  props = $[3];
101
73
  }
102
- if (useFeatureFlag("primer_react_timeline_list_semantics")) {
103
- let t1;
104
- if ($[4] !== className) {
105
- t1 = clsx(className, "Timeline-Item", Timeline_module_css_default.TimelineItem);
106
- $[4] = className;
107
- $[5] = t1;
108
- } else t1 = $[5];
109
- const t2 = forwardRef;
110
- const t3 = condensed ? "" : void 0;
111
- let t4;
112
- if ($[6] !== props || $[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
113
- t4 = /* @__PURE__ */ jsx("li", {
114
- ...props,
115
- className: t1,
116
- ref: t2,
117
- "data-condensed": t3
118
- });
119
- $[6] = props;
120
- $[7] = t1;
121
- $[8] = t2;
122
- $[9] = t3;
123
- $[10] = t4;
124
- } else t4 = $[10];
125
- return t4;
126
- }
127
- const t1 = props;
128
- let t2;
129
- if ($[11] !== className) {
130
- t2 = clsx(className, "Timeline-Item", Timeline_module_css_default.TimelineItem);
131
- $[11] = className;
132
- $[12] = t2;
133
- } else t2 = $[12];
134
- const t3 = forwardRef;
135
- const t4 = condensed ? "" : void 0;
136
- let t5;
137
- if ($[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
138
- t5 = /* @__PURE__ */ jsx("div", {
139
- ...t1,
140
- className: t2,
141
- ref: t3,
142
- "data-condensed": t4
74
+ let t1;
75
+ if ($[4] !== className) {
76
+ t1 = clsx(className, "Timeline-Item", Timeline_module_css_default.TimelineItem);
77
+ $[4] = className;
78
+ $[5] = t1;
79
+ } else t1 = $[5];
80
+ const t2 = condensed ? "" : void 0;
81
+ let t3;
82
+ if ($[6] !== forwardRef || $[7] !== props || $[8] !== t1 || $[9] !== t2) {
83
+ t3 = /* @__PURE__ */ jsx("li", {
84
+ ...props,
85
+ className: t1,
86
+ ref: forwardRef,
87
+ "data-condensed": t2
143
88
  });
144
- $[13] = t1;
145
- $[14] = t2;
146
- $[15] = t3;
147
- $[16] = t4;
148
- $[17] = t5;
149
- } else t5 = $[17];
150
- return t5;
89
+ $[6] = forwardRef;
90
+ $[7] = props;
91
+ $[8] = t1;
92
+ $[9] = t2;
93
+ $[10] = t3;
94
+ } else t3 = $[10];
95
+ return t3;
151
96
  });
152
97
  TimelineItem.displayName = "TimelineItem";
153
98
  const TimelineBadge = (t0) => {
@@ -225,7 +170,7 @@ const TimelineBody = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
225
170
  });
226
171
  TimelineBody.displayName = "TimelineBody";
227
172
  const TimelineBreak = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
228
- const $ = c(15);
173
+ const $ = c(9);
229
174
  let className;
230
175
  let props;
231
176
  if ($[0] !== t0) {
@@ -237,50 +182,26 @@ const TimelineBreak = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
237
182
  className = $[1];
238
183
  props = $[2];
239
184
  }
240
- if (useFeatureFlag("primer_react_timeline_list_semantics")) {
241
- let t1;
242
- if ($[3] !== className) {
243
- t1 = clsx(className, Timeline_module_css_default.TimelineBreak);
244
- $[3] = className;
245
- $[4] = t1;
246
- } else t1 = $[4];
247
- const t2 = forwardRef;
248
- let t3;
249
- if ($[5] !== props || $[6] !== t1 || $[7] !== t2) {
250
- t3 = /* @__PURE__ */ jsx("li", {
251
- ...props,
252
- className: t1,
253
- ref: t2,
254
- role: "presentation"
255
- });
256
- $[5] = props;
257
- $[6] = t1;
258
- $[7] = t2;
259
- $[8] = t3;
260
- } else t3 = $[8];
261
- return t3;
262
- }
263
- const t1 = props;
185
+ let t1;
186
+ if ($[3] !== className) {
187
+ t1 = clsx(className, Timeline_module_css_default.TimelineBreak);
188
+ $[3] = className;
189
+ $[4] = t1;
190
+ } else t1 = $[4];
264
191
  let t2;
265
- if ($[9] !== className) {
266
- t2 = clsx(className, Timeline_module_css_default.TimelineBreak);
267
- $[9] = className;
268
- $[10] = t2;
269
- } else t2 = $[10];
270
- const t3 = forwardRef;
271
- let t4;
272
- if ($[11] !== t1 || $[12] !== t2 || $[13] !== t3) {
273
- t4 = /* @__PURE__ */ jsx("div", {
274
- ...t1,
275
- className: t2,
276
- ref: t3
192
+ if ($[5] !== forwardRef || $[6] !== props || $[7] !== t1) {
193
+ t2 = /* @__PURE__ */ jsx("li", {
194
+ ...props,
195
+ className: t1,
196
+ ref: forwardRef,
197
+ role: "presentation"
277
198
  });
278
- $[11] = t1;
279
- $[12] = t2;
280
- $[13] = t3;
281
- $[14] = t4;
282
- } else t4 = $[14];
283
- return t4;
199
+ $[5] = forwardRef;
200
+ $[6] = props;
201
+ $[7] = t1;
202
+ $[8] = t2;
203
+ } else t2 = $[8];
204
+ return t2;
284
205
  });
285
206
  TimelineBreak.displayName = "TimelineBreak";
286
207
  const TimelineActions = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {