@primer/react 37.32.0-rc.705a7d2c6 → 37.32.0-rc.705aeffd5
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 +5 -1
- package/dist/browser.esm.js +1 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/generated/components.json +66 -66
- package/lib/Select/Select.js +61 -53
- package/lib-esm/Select/Select.js +61 -53
- package/package.json +1 -1
package/lib/Select/Select.js
CHANGED
|
@@ -70,7 +70,7 @@ const ArrowIndicator = t0 => {
|
|
|
70
70
|
};
|
|
71
71
|
const Select = /*#__PURE__*/React__default.default.forwardRef((t0, ref) => {
|
|
72
72
|
var _ref, _defaultValue;
|
|
73
|
-
const $ = reactCompilerRuntime.c(
|
|
73
|
+
const $ = reactCompilerRuntime.c(41);
|
|
74
74
|
let block;
|
|
75
75
|
let children;
|
|
76
76
|
let className;
|
|
@@ -125,93 +125,101 @@ const Select = /*#__PURE__*/React__default.default.forwardRef((t0, ref) => {
|
|
|
125
125
|
sx = $[11];
|
|
126
126
|
validationStatus = $[12];
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if ($[13] !== className || $[14] !== t2) {
|
|
132
|
-
t3 = clsx.clsx(className, Select_module.Select, t2);
|
|
128
|
+
let t1;
|
|
129
|
+
if ($[13] !== className) {
|
|
130
|
+
t1 = clsx.clsx(Select_module.TextInputWrapper, className);
|
|
133
131
|
$[13] = className;
|
|
134
|
-
$[14] =
|
|
132
|
+
$[14] = t1;
|
|
133
|
+
} else {
|
|
134
|
+
t1 = $[14];
|
|
135
|
+
}
|
|
136
|
+
const t2 = validationStatus === "error" ? "true" : "false";
|
|
137
|
+
const t3 = disabled && Select_module.Disabled;
|
|
138
|
+
let t4;
|
|
139
|
+
if ($[15] !== t3) {
|
|
140
|
+
t4 = clsx.clsx(Select_module.Select, t3);
|
|
135
141
|
$[15] = t3;
|
|
142
|
+
$[16] = t4;
|
|
136
143
|
} else {
|
|
137
|
-
|
|
144
|
+
t4 = $[16];
|
|
138
145
|
}
|
|
139
|
-
const
|
|
140
|
-
const
|
|
141
|
-
let
|
|
142
|
-
if ($[
|
|
143
|
-
|
|
146
|
+
const t5 = Boolean(placeholder);
|
|
147
|
+
const t6 = (_ref = (_defaultValue = defaultValue) !== null && _defaultValue !== void 0 ? _defaultValue : placeholder) !== null && _ref !== void 0 ? _ref : undefined;
|
|
148
|
+
let t7;
|
|
149
|
+
if ($[17] !== placeholder || $[18] !== required) {
|
|
150
|
+
t7 = placeholder && /*#__PURE__*/jsxRuntime.jsx("option", {
|
|
144
151
|
value: "",
|
|
145
152
|
disabled: required,
|
|
146
153
|
hidden: required,
|
|
147
154
|
children: placeholder
|
|
148
155
|
});
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
156
|
+
$[17] = placeholder;
|
|
157
|
+
$[18] = required;
|
|
158
|
+
$[19] = t7;
|
|
152
159
|
} else {
|
|
153
|
-
|
|
160
|
+
t7 = $[19];
|
|
154
161
|
}
|
|
155
|
-
let
|
|
156
|
-
if ($[
|
|
157
|
-
|
|
162
|
+
let t8;
|
|
163
|
+
if ($[20] !== children || $[21] !== disabled || $[22] !== ref || $[23] !== required || $[24] !== rest || $[25] !== t2 || $[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7) {
|
|
164
|
+
t8 = /*#__PURE__*/jsxRuntime.jsxs("select", {
|
|
158
165
|
...rest,
|
|
159
166
|
ref: ref,
|
|
160
167
|
required: required,
|
|
161
168
|
disabled: disabled,
|
|
162
|
-
"aria-invalid":
|
|
163
|
-
className:
|
|
164
|
-
"data-hasplaceholder":
|
|
165
|
-
defaultValue:
|
|
166
|
-
children: [
|
|
169
|
+
"aria-invalid": t2,
|
|
170
|
+
className: t4,
|
|
171
|
+
"data-hasplaceholder": t5,
|
|
172
|
+
defaultValue: t6,
|
|
173
|
+
children: [t7, children]
|
|
167
174
|
});
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[25] = t3;
|
|
175
|
+
$[20] = children;
|
|
176
|
+
$[21] = disabled;
|
|
177
|
+
$[22] = ref;
|
|
178
|
+
$[23] = required;
|
|
179
|
+
$[24] = rest;
|
|
180
|
+
$[25] = t2;
|
|
175
181
|
$[26] = t4;
|
|
176
182
|
$[27] = t5;
|
|
177
183
|
$[28] = t6;
|
|
178
184
|
$[29] = t7;
|
|
185
|
+
$[30] = t8;
|
|
179
186
|
} else {
|
|
180
|
-
|
|
187
|
+
t8 = $[30];
|
|
181
188
|
}
|
|
182
|
-
let
|
|
183
|
-
if ($[
|
|
184
|
-
|
|
189
|
+
let t9;
|
|
190
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
191
|
+
t9 = /*#__PURE__*/jsxRuntime.jsx(ArrowIndicator, {
|
|
185
192
|
className: Select_module.ArrowIndicator
|
|
186
193
|
});
|
|
187
|
-
$[
|
|
194
|
+
$[31] = t9;
|
|
188
195
|
} else {
|
|
189
|
-
|
|
196
|
+
t9 = $[31];
|
|
190
197
|
}
|
|
191
|
-
let
|
|
192
|
-
if ($[
|
|
193
|
-
|
|
198
|
+
let t10;
|
|
199
|
+
if ($[32] !== block || $[33] !== contrast || $[34] !== disabled || $[35] !== size || $[36] !== sx || $[37] !== t1 || $[38] !== t8 || $[39] !== validationStatus) {
|
|
200
|
+
t10 = /*#__PURE__*/jsxRuntime.jsxs(TextInputWrapper.TextInputWrapper, {
|
|
194
201
|
block: block,
|
|
195
202
|
contrast: contrast,
|
|
196
203
|
disabled: disabled,
|
|
197
204
|
size: size,
|
|
198
205
|
validationStatus: validationStatus,
|
|
199
|
-
className:
|
|
206
|
+
className: t1,
|
|
200
207
|
sx: sx,
|
|
201
|
-
children: [
|
|
208
|
+
children: [t8, t9]
|
|
202
209
|
});
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
210
|
+
$[32] = block;
|
|
211
|
+
$[33] = contrast;
|
|
212
|
+
$[34] = disabled;
|
|
213
|
+
$[35] = size;
|
|
214
|
+
$[36] = sx;
|
|
215
|
+
$[37] = t1;
|
|
216
|
+
$[38] = t8;
|
|
217
|
+
$[39] = validationStatus;
|
|
218
|
+
$[40] = t10;
|
|
211
219
|
} else {
|
|
212
|
-
|
|
220
|
+
t10 = $[40];
|
|
213
221
|
}
|
|
214
|
-
return
|
|
222
|
+
return t10;
|
|
215
223
|
});
|
|
216
224
|
const Option = props => {
|
|
217
225
|
const $ = reactCompilerRuntime.c(2);
|
package/lib-esm/Select/Select.js
CHANGED
|
@@ -64,7 +64,7 @@ const ArrowIndicator = t0 => {
|
|
|
64
64
|
};
|
|
65
65
|
const Select = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
66
66
|
var _ref, _defaultValue;
|
|
67
|
-
const $ = c(
|
|
67
|
+
const $ = c(41);
|
|
68
68
|
let block;
|
|
69
69
|
let children;
|
|
70
70
|
let className;
|
|
@@ -119,93 +119,101 @@ const Select = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
119
119
|
sx = $[11];
|
|
120
120
|
validationStatus = $[12];
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if ($[13] !== className || $[14] !== t2) {
|
|
126
|
-
t3 = clsx(className, classes.Select, t2);
|
|
122
|
+
let t1;
|
|
123
|
+
if ($[13] !== className) {
|
|
124
|
+
t1 = clsx(classes.TextInputWrapper, className);
|
|
127
125
|
$[13] = className;
|
|
128
|
-
$[14] =
|
|
126
|
+
$[14] = t1;
|
|
127
|
+
} else {
|
|
128
|
+
t1 = $[14];
|
|
129
|
+
}
|
|
130
|
+
const t2 = validationStatus === "error" ? "true" : "false";
|
|
131
|
+
const t3 = disabled && classes.Disabled;
|
|
132
|
+
let t4;
|
|
133
|
+
if ($[15] !== t3) {
|
|
134
|
+
t4 = clsx(classes.Select, t3);
|
|
129
135
|
$[15] = t3;
|
|
136
|
+
$[16] = t4;
|
|
130
137
|
} else {
|
|
131
|
-
|
|
138
|
+
t4 = $[16];
|
|
132
139
|
}
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
let
|
|
136
|
-
if ($[
|
|
137
|
-
|
|
140
|
+
const t5 = Boolean(placeholder);
|
|
141
|
+
const t6 = (_ref = (_defaultValue = defaultValue) !== null && _defaultValue !== void 0 ? _defaultValue : placeholder) !== null && _ref !== void 0 ? _ref : undefined;
|
|
142
|
+
let t7;
|
|
143
|
+
if ($[17] !== placeholder || $[18] !== required) {
|
|
144
|
+
t7 = placeholder && /*#__PURE__*/jsx("option", {
|
|
138
145
|
value: "",
|
|
139
146
|
disabled: required,
|
|
140
147
|
hidden: required,
|
|
141
148
|
children: placeholder
|
|
142
149
|
});
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
150
|
+
$[17] = placeholder;
|
|
151
|
+
$[18] = required;
|
|
152
|
+
$[19] = t7;
|
|
146
153
|
} else {
|
|
147
|
-
|
|
154
|
+
t7 = $[19];
|
|
148
155
|
}
|
|
149
|
-
let
|
|
150
|
-
if ($[
|
|
151
|
-
|
|
156
|
+
let t8;
|
|
157
|
+
if ($[20] !== children || $[21] !== disabled || $[22] !== ref || $[23] !== required || $[24] !== rest || $[25] !== t2 || $[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7) {
|
|
158
|
+
t8 = /*#__PURE__*/jsxs("select", {
|
|
152
159
|
...rest,
|
|
153
160
|
ref: ref,
|
|
154
161
|
required: required,
|
|
155
162
|
disabled: disabled,
|
|
156
|
-
"aria-invalid":
|
|
157
|
-
className:
|
|
158
|
-
"data-hasplaceholder":
|
|
159
|
-
defaultValue:
|
|
160
|
-
children: [
|
|
163
|
+
"aria-invalid": t2,
|
|
164
|
+
className: t4,
|
|
165
|
+
"data-hasplaceholder": t5,
|
|
166
|
+
defaultValue: t6,
|
|
167
|
+
children: [t7, children]
|
|
161
168
|
});
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[25] = t3;
|
|
169
|
+
$[20] = children;
|
|
170
|
+
$[21] = disabled;
|
|
171
|
+
$[22] = ref;
|
|
172
|
+
$[23] = required;
|
|
173
|
+
$[24] = rest;
|
|
174
|
+
$[25] = t2;
|
|
169
175
|
$[26] = t4;
|
|
170
176
|
$[27] = t5;
|
|
171
177
|
$[28] = t6;
|
|
172
178
|
$[29] = t7;
|
|
179
|
+
$[30] = t8;
|
|
173
180
|
} else {
|
|
174
|
-
|
|
181
|
+
t8 = $[30];
|
|
175
182
|
}
|
|
176
|
-
let
|
|
177
|
-
if ($[
|
|
178
|
-
|
|
183
|
+
let t9;
|
|
184
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
185
|
+
t9 = /*#__PURE__*/jsx(ArrowIndicator, {
|
|
179
186
|
className: classes.ArrowIndicator
|
|
180
187
|
});
|
|
181
|
-
$[
|
|
188
|
+
$[31] = t9;
|
|
182
189
|
} else {
|
|
183
|
-
|
|
190
|
+
t9 = $[31];
|
|
184
191
|
}
|
|
185
|
-
let
|
|
186
|
-
if ($[
|
|
187
|
-
|
|
192
|
+
let t10;
|
|
193
|
+
if ($[32] !== block || $[33] !== contrast || $[34] !== disabled || $[35] !== size || $[36] !== sx || $[37] !== t1 || $[38] !== t8 || $[39] !== validationStatus) {
|
|
194
|
+
t10 = /*#__PURE__*/jsxs(TextInputWrapper, {
|
|
188
195
|
block: block,
|
|
189
196
|
contrast: contrast,
|
|
190
197
|
disabled: disabled,
|
|
191
198
|
size: size,
|
|
192
199
|
validationStatus: validationStatus,
|
|
193
|
-
className:
|
|
200
|
+
className: t1,
|
|
194
201
|
sx: sx,
|
|
195
|
-
children: [
|
|
202
|
+
children: [t8, t9]
|
|
196
203
|
});
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
204
|
+
$[32] = block;
|
|
205
|
+
$[33] = contrast;
|
|
206
|
+
$[34] = disabled;
|
|
207
|
+
$[35] = size;
|
|
208
|
+
$[36] = sx;
|
|
209
|
+
$[37] = t1;
|
|
210
|
+
$[38] = t8;
|
|
211
|
+
$[39] = validationStatus;
|
|
212
|
+
$[40] = t10;
|
|
205
213
|
} else {
|
|
206
|
-
|
|
214
|
+
t10 = $[40];
|
|
207
215
|
}
|
|
208
|
-
return
|
|
216
|
+
return t10;
|
|
209
217
|
});
|
|
210
218
|
const Option = props => {
|
|
211
219
|
const $ = c(2);
|
package/package.json
CHANGED