@primer/react 0.0.0-20260226180343 → 0.0.0-20260226192624
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260226192624
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
### Patch Changes
|
|
10
10
|
|
|
11
|
-
- [#7587](https://github.com/primer/react/pull/7587) [`6170943`](https://github.com/primer/react/commit/6170943fb0cb1aa7289bbb27f8ebf4e68f255dee) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - SegmentedControl: Screen readers now announce buttons with their associated count. Fixes [accessibility-audits#14898](https://github.com/github/accessibility-audits/issues/14898)
|
|
12
|
-
|
|
13
11
|
- Fake entry to force publishing
|
|
14
12
|
|
|
15
13
|
- [#7497](https://github.com/primer/react/pull/7497) [`931740b`](https://github.com/primer/react/commit/931740bc6d96dd3bb6f335ea98eedd4b64eb1859) Thanks [@hectahertz](https://github.com/hectahertz)! - Remove render phase setStates on SelectPanel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlButton.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,OAAO,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAMrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,2BAA2B,GAAG;IACxC,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB,oKAAoK;IACpK,QA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AK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IACrG,wFAAwF;IAExF,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IACnG,gHAAgH;IAChH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,GAAG,oBAAoB,CAAC,iBAAiB,GAAG,aAAa,CAAC,CAAA;AAE3D,QAAA,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAyClG,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -7,7 +7,7 @@ import CounterLabel from '../CounterLabel/CounterLabel.js';
|
|
|
7
7
|
|
|
8
8
|
const SegmentedControlButton = t0 => {
|
|
9
9
|
var _leadingVisual;
|
|
10
|
-
const $ = c(
|
|
10
|
+
const $ = c(36);
|
|
11
11
|
let children;
|
|
12
12
|
let className;
|
|
13
13
|
let count;
|
|
@@ -56,138 +56,131 @@ const SegmentedControlButton = t0 => {
|
|
|
56
56
|
selected = $[8];
|
|
57
57
|
}
|
|
58
58
|
let ariaDisabled;
|
|
59
|
-
let ariaLabel;
|
|
60
59
|
let rest;
|
|
61
60
|
if ($[9] !== props) {
|
|
62
61
|
({
|
|
63
62
|
"aria-disabled": ariaDisabled,
|
|
64
|
-
"aria-label": ariaLabel,
|
|
65
63
|
...rest
|
|
66
64
|
} = props);
|
|
67
65
|
$[9] = props;
|
|
68
66
|
$[10] = ariaDisabled;
|
|
69
|
-
$[11] =
|
|
70
|
-
$[12] = rest;
|
|
67
|
+
$[11] = rest;
|
|
71
68
|
} else {
|
|
72
69
|
ariaDisabled = $[10];
|
|
73
|
-
|
|
74
|
-
rest = $[12];
|
|
70
|
+
rest = $[11];
|
|
75
71
|
}
|
|
76
72
|
const LeadingVisual = (_leadingVisual = leadingVisual) !== null && _leadingVisual !== void 0 ? _leadingVisual : leadingIcon;
|
|
77
|
-
const computedAriaLabel = ariaLabel !== undefined ? ariaLabel : count !== undefined ? `${children}, count: ${count}` : undefined;
|
|
78
73
|
let t1;
|
|
79
|
-
if ($[
|
|
74
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
80
75
|
t1 = clsx(classes.Item);
|
|
81
|
-
$[
|
|
76
|
+
$[12] = t1;
|
|
82
77
|
} else {
|
|
83
|
-
t1 = $[
|
|
78
|
+
t1 = $[12];
|
|
84
79
|
}
|
|
85
80
|
const t2 = selected ? "" : undefined;
|
|
86
81
|
const t3 = disabled || ariaDisabled || undefined;
|
|
87
82
|
let t4;
|
|
88
|
-
if ($[
|
|
83
|
+
if ($[13] !== className) {
|
|
89
84
|
t4 = clsx(classes.Button, className);
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
85
|
+
$[13] = className;
|
|
86
|
+
$[14] = t4;
|
|
92
87
|
} else {
|
|
93
|
-
t4 = $[
|
|
88
|
+
t4 = $[14];
|
|
94
89
|
}
|
|
95
90
|
let t5;
|
|
96
|
-
if ($[
|
|
91
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
97
92
|
t5 = clsx(classes.Content, "segmentedControl-content");
|
|
98
|
-
$[
|
|
93
|
+
$[15] = t5;
|
|
99
94
|
} else {
|
|
100
|
-
t5 = $[
|
|
95
|
+
t5 = $[15];
|
|
101
96
|
}
|
|
102
97
|
let t6;
|
|
103
|
-
if ($[
|
|
98
|
+
if ($[16] !== LeadingVisual) {
|
|
104
99
|
t6 = LeadingVisual && /*#__PURE__*/jsx("div", {
|
|
105
100
|
className: classes.LeadingIcon,
|
|
106
101
|
children: isElement(LeadingVisual) ? LeadingVisual : /*#__PURE__*/jsx(LeadingVisual, {})
|
|
107
102
|
});
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
103
|
+
$[16] = LeadingVisual;
|
|
104
|
+
$[17] = t6;
|
|
110
105
|
} else {
|
|
111
|
-
t6 = $[
|
|
106
|
+
t6 = $[17];
|
|
112
107
|
}
|
|
113
108
|
let t7;
|
|
114
|
-
if ($[
|
|
109
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
115
110
|
t7 = clsx(classes.Text, "segmentedControl-text");
|
|
116
|
-
$[
|
|
111
|
+
$[18] = t7;
|
|
117
112
|
} else {
|
|
118
|
-
t7 = $[
|
|
113
|
+
t7 = $[18];
|
|
119
114
|
}
|
|
120
115
|
let t8;
|
|
121
|
-
if ($[
|
|
116
|
+
if ($[19] !== children) {
|
|
122
117
|
t8 = /*#__PURE__*/jsx("div", {
|
|
123
118
|
className: t7,
|
|
124
119
|
"data-text": children,
|
|
125
120
|
children: children
|
|
126
121
|
});
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
122
|
+
$[19] = children;
|
|
123
|
+
$[20] = t8;
|
|
129
124
|
} else {
|
|
130
|
-
t8 = $[
|
|
125
|
+
t8 = $[20];
|
|
131
126
|
}
|
|
132
127
|
let t9;
|
|
133
|
-
if ($[
|
|
128
|
+
if ($[21] !== count) {
|
|
134
129
|
t9 = count !== undefined && /*#__PURE__*/jsx("span", {
|
|
135
130
|
className: classes.Counter,
|
|
136
131
|
children: /*#__PURE__*/jsx(CounterLabel, {
|
|
137
132
|
children: count
|
|
138
133
|
})
|
|
139
134
|
});
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
135
|
+
$[21] = count;
|
|
136
|
+
$[22] = t9;
|
|
142
137
|
} else {
|
|
143
|
-
t9 = $[
|
|
138
|
+
t9 = $[22];
|
|
144
139
|
}
|
|
145
140
|
let t10;
|
|
146
|
-
if ($[
|
|
141
|
+
if ($[23] !== t6 || $[24] !== t8 || $[25] !== t9) {
|
|
147
142
|
t10 = /*#__PURE__*/jsxs("span", {
|
|
148
143
|
className: t5,
|
|
149
144
|
children: [t6, t8, t9]
|
|
150
145
|
});
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
146
|
+
$[23] = t6;
|
|
147
|
+
$[24] = t8;
|
|
148
|
+
$[25] = t9;
|
|
149
|
+
$[26] = t10;
|
|
155
150
|
} else {
|
|
156
|
-
t10 = $[
|
|
151
|
+
t10 = $[26];
|
|
157
152
|
}
|
|
158
153
|
let t11;
|
|
159
|
-
if ($[
|
|
154
|
+
if ($[27] !== rest || $[28] !== selected || $[29] !== t10 || $[30] !== t3 || $[31] !== t4) {
|
|
160
155
|
t11 = /*#__PURE__*/jsx("button", {
|
|
161
156
|
"aria-current": selected,
|
|
162
|
-
"aria-label": computedAriaLabel,
|
|
163
157
|
"aria-disabled": t3,
|
|
164
158
|
className: t4,
|
|
165
159
|
type: "button",
|
|
166
160
|
...rest,
|
|
167
161
|
children: t10
|
|
168
162
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[34] = t11;
|
|
163
|
+
$[27] = rest;
|
|
164
|
+
$[28] = selected;
|
|
165
|
+
$[29] = t10;
|
|
166
|
+
$[30] = t3;
|
|
167
|
+
$[31] = t4;
|
|
168
|
+
$[32] = t11;
|
|
176
169
|
} else {
|
|
177
|
-
t11 = $[
|
|
170
|
+
t11 = $[32];
|
|
178
171
|
}
|
|
179
172
|
let t12;
|
|
180
|
-
if ($[
|
|
173
|
+
if ($[33] !== t11 || $[34] !== t2) {
|
|
181
174
|
t12 = /*#__PURE__*/jsx("li", {
|
|
182
175
|
className: t1,
|
|
183
176
|
"data-selected": t2,
|
|
184
177
|
children: t11
|
|
185
178
|
});
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
179
|
+
$[33] = t11;
|
|
180
|
+
$[34] = t2;
|
|
181
|
+
$[35] = t12;
|
|
189
182
|
} else {
|
|
190
|
-
t12 = $[
|
|
183
|
+
t12 = $[35];
|
|
191
184
|
}
|
|
192
185
|
return t12;
|
|
193
186
|
};
|
package/package.json
CHANGED