@launchpad-ui/form 0.8.12 → 0.8.14

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/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  require('./style.css');
2
2
  "use strict";
3
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("react/jsx-runtime");
4
5
  const react = require("react");
5
6
  const classix = require("classix");
6
- const jsxRuntime = require("react/jsx-runtime");
7
7
  const icons = require("@launchpad-ui/icons");
8
8
  const visuallyHidden = require("@react-aria/visually-hidden");
9
9
  const formGroup = "_formGroup_p76jo_10";
@@ -70,12 +70,7 @@ const RequiredAsterisk = ({
70
70
  ...rest
71
71
  }) => {
72
72
  const classes = classix.cx(styles.requiredAsterisk, className);
73
- return /* @__PURE__ */ jsxRuntime.jsx("span", {
74
- ...rest,
75
- "data-test-id": testId,
76
- className: classes,
77
- children: "*"
78
- });
73
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { ...rest, "data-test-id": testId, className: classes, children: "*" });
79
74
  };
80
75
  const Label = ({
81
76
  disabled,
@@ -87,141 +82,149 @@ const Label = ({
87
82
  ...rest
88
83
  }) => {
89
84
  const classes = classix.cx(styles.label, className, disabled && styles.labelDisabled);
90
- return /* @__PURE__ */ jsxRuntime.jsxs("label", {
91
- ...rest,
92
- "data-test-id": testId,
93
- className: classes,
94
- children: [children, optional && !required && /* @__PURE__ */ jsxRuntime.jsx("small", {
95
- className: styles.labelOptional,
96
- children: "(optional)"
97
- }), required && !optional && /* @__PURE__ */ jsxRuntime.jsx(RequiredAsterisk, {})]
98
- });
85
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { ...rest, "data-test-id": testId, className: classes, children: [
86
+ children,
87
+ optional && !required && /* @__PURE__ */ jsxRuntime.jsx("small", { className: styles.labelOptional, children: "(optional)" }),
88
+ required && !optional && /* @__PURE__ */ jsxRuntime.jsx(RequiredAsterisk, {})
89
+ ] });
99
90
  };
100
- const Checkbox = react.forwardRef(({
101
- "aria-label": ariaLabel,
102
- "aria-labelledby": ariaLabelledby,
103
- children,
104
- disabled,
105
- checked,
106
- labelClassName,
107
- "data-test-id": testId = "checkbox",
108
- ...rest
109
- }, ref) => {
110
- const hasAriaLabel = ariaLabel !== void 0 || ariaLabelledby !== void 0;
111
- if (!children && !hasAriaLabel) {
112
- console.warn("If you do not provide children, you must specify an aria-label for accessibility");
91
+ const Checkbox = react.forwardRef(
92
+ ({
93
+ "aria-label": ariaLabel,
94
+ "aria-labelledby": ariaLabelledby,
95
+ children,
96
+ disabled,
97
+ checked,
98
+ labelClassName,
99
+ "data-test-id": testId = "checkbox",
100
+ ...rest
101
+ }, ref) => {
102
+ const hasAriaLabel = ariaLabel !== void 0 || ariaLabelledby !== void 0;
103
+ if (!children && !hasAriaLabel) {
104
+ console.warn(
105
+ "If you do not provide children, you must specify an aria-label for accessibility"
106
+ );
107
+ }
108
+ return /* @__PURE__ */ jsxRuntime.jsxs(Label, { className: labelClassName, children: [
109
+ /* @__PURE__ */ jsxRuntime.jsx(
110
+ "input",
111
+ {
112
+ ...rest,
113
+ ref,
114
+ checked,
115
+ "aria-checked": checked ? "true" : "false",
116
+ "aria-label": ariaLabel,
117
+ "aria-labelledby": ariaLabelledby,
118
+ className: styles.checkbox,
119
+ disabled,
120
+ type: "checkbox",
121
+ "data-test-id": testId
122
+ }
123
+ ),
124
+ " ",
125
+ disabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.labelDisabled, children }) : children
126
+ ] });
113
127
  }
114
- return /* @__PURE__ */ jsxRuntime.jsxs(Label, {
115
- className: labelClassName,
116
- children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
117
- ...rest,
118
- ref,
119
- checked,
120
- "aria-checked": checked ? "true" : "false",
121
- "aria-label": ariaLabel,
122
- "aria-labelledby": ariaLabelledby,
123
- className: styles.checkbox,
124
- disabled,
125
- type: "checkbox",
126
- "data-test-id": testId
127
- }), " ", disabled ? /* @__PURE__ */ jsxRuntime.jsx("span", {
128
- className: styles.labelDisabled,
129
- children
130
- }) : children]
131
- });
132
- });
128
+ );
133
129
  Checkbox.displayName = "Checkbox";
134
130
  const createFieldErrorId = (fieldIdentifier) => fieldIdentifier ? `${[...fieldIdentifier].join("")}-err` : void 0;
135
- const TextField = react.forwardRef(({
136
- className,
137
- type = "text",
138
- tiny = false,
139
- readOnly,
140
- tabIndex = 0,
141
- suffix: suffix2,
142
- overrideWidth,
143
- "data-test-id": testId = "text-field",
144
- ...rest
145
- }, ref) => {
146
- const classes = overrideWidth ? className : classix.cx(styles.formInput, tiny && styles.formInputTiny, className);
147
- if (suffix2) {
148
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
149
- className: styles.suffixContainer,
150
- children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
131
+ const TextField = react.forwardRef(
132
+ ({
133
+ className,
134
+ type = "text",
135
+ tiny = false,
136
+ readOnly,
137
+ tabIndex = 0,
138
+ suffix: suffix2,
139
+ overrideWidth,
140
+ "data-test-id": testId = "text-field",
141
+ ...rest
142
+ }, ref) => {
143
+ const classes = overrideWidth ? className : classix.cx(styles.formInput, tiny && styles.formInputTiny, className);
144
+ if (suffix2) {
145
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.suffixContainer, children: [
146
+ /* @__PURE__ */ jsxRuntime.jsx(
147
+ "input",
148
+ {
149
+ ...rest,
150
+ type,
151
+ "data-test-id": testId,
152
+ className: classes,
153
+ readOnly,
154
+ ref,
155
+ "aria-describedby": rest["aria-describedby"] || createFieldErrorId(rest.id)
156
+ }
157
+ ),
158
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: styles.suffix, htmlFor: rest.id, children: suffix2 })
159
+ ] });
160
+ }
161
+ return /* @__PURE__ */ jsxRuntime.jsx(
162
+ "input",
163
+ {
151
164
  ...rest,
152
165
  type,
153
- "data-test-id": testId,
154
166
  className: classes,
155
167
  readOnly,
168
+ tabIndex,
156
169
  ref,
170
+ "data-test-id": testId,
171
+ style: overrideWidth ? {
172
+ width: overrideWidth
173
+ } : void 0,
157
174
  "aria-describedby": rest["aria-describedby"] || createFieldErrorId(rest.id)
158
- }), /* @__PURE__ */ jsxRuntime.jsx("label", {
159
- className: styles.suffix,
160
- htmlFor: rest.id,
161
- children: suffix2
162
- })]
163
- });
175
+ }
176
+ );
164
177
  }
165
- return /* @__PURE__ */ jsxRuntime.jsx("input", {
166
- ...rest,
167
- type,
168
- className: classes,
169
- readOnly,
170
- tabIndex,
171
- ref,
172
- "data-test-id": testId,
173
- style: overrideWidth ? {
174
- width: overrideWidth
175
- } : void 0,
176
- "aria-describedby": rest["aria-describedby"] || createFieldErrorId(rest.id)
177
- });
178
- });
178
+ );
179
179
  TextField.displayName = "TextField";
180
- const CompactTextField = react.forwardRef(({
181
- className,
182
- id,
183
- label: label2,
184
- needsErrorFeedback,
185
- value,
186
- onFocus,
187
- onBlur,
188
- "data-test-id": testId = "compact-text-field",
189
- ...rest
190
- }, ref) => {
191
- const [isActive2, setIsActive] = react.useState((typeof value === "boolean" || value ? value.toString() : "").trim().length !== 0);
192
- const isActiveState = isActive2 || needsErrorFeedback;
193
- const classes = classix.cx(styles.compactTextField, className, isActiveState && styles.isActive);
194
- const placeholder = isActiveState ? "" : label2;
195
- const handleFocus = (event) => {
196
- setIsActive(true);
197
- if (onFocus) {
198
- onFocus(event);
199
- }
200
- };
201
- const handleBlur = (event) => {
202
- const value2 = event.target.value || "";
203
- setIsActive(value2.trim().length !== 0);
204
- if (onBlur) {
205
- onBlur(event);
206
- }
207
- };
208
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
209
- className: classes,
210
- "data-test-id": testId,
211
- children: [/* @__PURE__ */ jsxRuntime.jsx(Label, {
212
- htmlFor: id,
213
- children: label2
214
- }), /* @__PURE__ */ jsxRuntime.jsx(TextField, {
215
- ...rest,
216
- id,
217
- placeholder,
218
- value,
219
- ref,
220
- onFocus: handleFocus,
221
- onBlur: handleBlur
222
- })]
223
- });
224
- });
180
+ const CompactTextField = react.forwardRef(
181
+ ({
182
+ className,
183
+ id,
184
+ label: label2,
185
+ needsErrorFeedback,
186
+ value,
187
+ onFocus,
188
+ onBlur,
189
+ "data-test-id": testId = "compact-text-field",
190
+ ...rest
191
+ }, ref) => {
192
+ const [isActive2, setIsActive] = react.useState(
193
+ (typeof value === "boolean" || value ? value.toString() : "").trim().length !== 0
194
+ );
195
+ const isActiveState = isActive2 || needsErrorFeedback;
196
+ const classes = classix.cx(styles.compactTextField, className, isActiveState && styles.isActive);
197
+ const placeholder = isActiveState ? "" : label2;
198
+ const handleFocus = (event) => {
199
+ setIsActive(true);
200
+ if (onFocus) {
201
+ onFocus(event);
202
+ }
203
+ };
204
+ const handleBlur = (event) => {
205
+ const value2 = event.target.value || "";
206
+ setIsActive(value2.trim().length !== 0);
207
+ if (onBlur) {
208
+ onBlur(event);
209
+ }
210
+ };
211
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, "data-test-id": testId, children: [
212
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: id, children: label2 }),
213
+ /* @__PURE__ */ jsxRuntime.jsx(
214
+ TextField,
215
+ {
216
+ ...rest,
217
+ id,
218
+ placeholder,
219
+ value,
220
+ ref,
221
+ onFocus: handleFocus,
222
+ onBlur: handleBlur
223
+ }
224
+ )
225
+ ] });
226
+ }
227
+ );
225
228
  CompactTextField.displayName = "CompactTextField";
226
229
  const FieldError = ({
227
230
  name,
@@ -233,17 +236,22 @@ const FieldError = ({
233
236
  if (!errorMessage) {
234
237
  return null;
235
238
  }
236
- return /* @__PURE__ */ jsxRuntime.jsxs("span", {
237
- ...rest,
238
- className: classix.cx(styles.fieldError, className),
239
- "aria-live": "polite",
240
- "data-test-id": testId,
241
- "aria-label": "Error",
242
- id: createFieldErrorId(name),
243
- children: [/* @__PURE__ */ jsxRuntime.jsx(icons.AlertRhombus, {
244
- size: "small"
245
- }), " ", errorMessage]
246
- });
239
+ return /* @__PURE__ */ jsxRuntime.jsxs(
240
+ "span",
241
+ {
242
+ ...rest,
243
+ className: classix.cx(styles.fieldError, className),
244
+ "aria-live": "polite",
245
+ "data-test-id": testId,
246
+ "aria-label": "Error",
247
+ id: createFieldErrorId(name),
248
+ children: [
249
+ /* @__PURE__ */ jsxRuntime.jsx(icons.AlertRhombus, { size: "small" }),
250
+ " ",
251
+ errorMessage
252
+ ]
253
+ }
254
+ );
247
255
  };
248
256
  const FieldSet = ({
249
257
  children,
@@ -252,12 +260,7 @@ const FieldSet = ({
252
260
  ...rest
253
261
  }) => {
254
262
  const classes = classix.cx(styles.fieldSet, className);
255
- return /* @__PURE__ */ jsxRuntime.jsx("fieldset", {
256
- "data-test-id": testId,
257
- className: classes,
258
- ...rest,
259
- children
260
- });
263
+ return /* @__PURE__ */ jsxRuntime.jsx("fieldset", { "data-test-id": testId, className: classes, ...rest, children });
261
264
  };
262
265
  const Form = (props) => {
263
266
  const {
@@ -268,13 +271,13 @@ const Form = (props) => {
268
271
  "data-test-id": testId = "form",
269
272
  ...rest
270
273
  } = props;
271
- const classes = classix.cx(styles.form, className, inline && styles.formInline, !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin);
272
- return /* @__PURE__ */ jsxRuntime.jsx("form", {
273
- ...rest,
274
- "data-test-id": testId,
275
- className: classes,
276
- children
277
- });
274
+ const classes = classix.cx(
275
+ styles.form,
276
+ className,
277
+ inline && styles.formInline,
278
+ !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin
279
+ );
280
+ return /* @__PURE__ */ jsxRuntime.jsx("form", { ...rest, "data-test-id": testId, className: classes, children });
278
281
  };
279
282
  const FormGroup = (props) => {
280
283
  const {
@@ -286,13 +289,12 @@ const FormGroup = (props) => {
286
289
  "data-test-id": testId = "form-group",
287
290
  ...rest
288
291
  } = props;
289
- const classes = classix.cx(styles.formGroup, className, !ignoreValidation && isInvalid2 && styles.isInvalid);
290
- return /* @__PURE__ */ jsxRuntime.jsx("fieldset", {
291
- className: classes,
292
- "data-test-id": testId,
293
- ...rest,
294
- children
295
- });
292
+ const classes = classix.cx(
293
+ styles.formGroup,
294
+ className,
295
+ !ignoreValidation && isInvalid2 && styles.isInvalid
296
+ );
297
+ return /* @__PURE__ */ jsxRuntime.jsx("fieldset", { className: classes, "data-test-id": testId, ...rest, children });
296
298
  };
297
299
  const FormHint = ({
298
300
  className,
@@ -301,12 +303,7 @@ const FormHint = ({
301
303
  ...rest
302
304
  }) => {
303
305
  const classes = classix.cx(styles.hint, className);
304
- return /* @__PURE__ */ jsxRuntime.jsx("div", {
305
- ...rest,
306
- "data-test-id": testId,
307
- className: classes,
308
- children
309
- });
306
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...rest, "data-test-id": testId, className: classes, children });
310
307
  };
311
308
  const FormField = ({
312
309
  isRequired,
@@ -325,26 +322,23 @@ const FormField = ({
325
322
  const handleBlur = () => {
326
323
  onBlur && onBlur(name);
327
324
  };
328
- return /* @__PURE__ */ jsxRuntime.jsxs(FormGroup, {
329
- className: classix.cx(styles.field, className),
330
- name,
331
- ignoreValidation,
332
- isInvalid: isInvalid2,
333
- onBlur: handleBlur,
334
- "data-test-id": testId,
335
- children: [label2 && /* @__PURE__ */ jsxRuntime.jsx(Label, {
336
- htmlFor,
337
- required: isRequired,
338
- children: label2
339
- }), hint2 && /* @__PURE__ */ jsxRuntime.jsx(FormHint, {
340
- className: styles.hint,
341
- children: hint2
342
- }), children, /* @__PURE__ */ jsxRuntime.jsx(FieldError, {
343
- className: styles.fieldErrorMessage,
325
+ return /* @__PURE__ */ jsxRuntime.jsxs(
326
+ FormGroup,
327
+ {
328
+ className: classix.cx(styles.field, className),
344
329
  name,
345
- errorMessage
346
- })]
347
- });
330
+ ignoreValidation,
331
+ isInvalid: isInvalid2,
332
+ onBlur: handleBlur,
333
+ "data-test-id": testId,
334
+ children: [
335
+ label2 && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor, required: isRequired, children: label2 }),
336
+ hint2 && /* @__PURE__ */ jsxRuntime.jsx(FormHint, { className: styles.hint, children: hint2 }),
337
+ children,
338
+ /* @__PURE__ */ jsxRuntime.jsx(FieldError, { className: styles.fieldErrorMessage, name, errorMessage })
339
+ ]
340
+ }
341
+ );
348
342
  };
349
343
  const IconField = ({
350
344
  icon,
@@ -355,15 +349,10 @@ const IconField = ({
355
349
  }) => {
356
350
  const Icon = icon;
357
351
  const classes = classix.cx(styles.iconField, className);
358
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
359
- className: classes,
360
- "data-test-id": testId,
361
- ...rest,
362
- children: [children, /* @__PURE__ */ jsxRuntime.jsx(Icon, {
363
- size: "small",
364
- className: styles.iconFieldIcon
365
- })]
366
- });
352
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, "data-test-id": testId, ...rest, children: [
353
+ children,
354
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "small", className: styles.iconFieldIcon })
355
+ ] });
367
356
  };
368
357
  const Radio = ({
369
358
  "aria-label": ariaLabel,
@@ -380,29 +369,27 @@ const Radio = ({
380
369
  }) => {
381
370
  const hasAriaLabel = ariaLabel !== void 0 || ariaLabelledby !== void 0;
382
371
  if (!children && !hasAriaLabel) {
383
- console.warn("If you do not provide children, you must specify an aria-label for accessibility");
372
+ console.warn(
373
+ "If you do not provide children, you must specify an aria-label for accessibility"
374
+ );
384
375
  }
385
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
386
- children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
387
- ...rest,
388
- "aria-label": ariaLabel,
389
- "aria-labelledby": ariaLabelledby,
390
- className: classix.cx(styles.radio, className),
391
- checked,
392
- disabled,
393
- id,
394
- "data-test-id": testId,
395
- type: "radio"
396
- }), /* @__PURE__ */ jsxRuntime.jsx(Label, {
397
- className: labelClassName,
398
- htmlFor: id,
399
- style: labelStyle,
400
- children: disabled ? /* @__PURE__ */ jsxRuntime.jsx("span", {
401
- className: styles.labelDisabled,
402
- children
403
- }) : children
404
- })]
405
- });
376
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
377
+ /* @__PURE__ */ jsxRuntime.jsx(
378
+ "input",
379
+ {
380
+ ...rest,
381
+ "aria-label": ariaLabel,
382
+ "aria-labelledby": ariaLabelledby,
383
+ className: classix.cx(styles.radio, className),
384
+ checked,
385
+ disabled,
386
+ id,
387
+ "data-test-id": testId,
388
+ type: "radio"
389
+ }
390
+ ),
391
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { className: labelClassName, htmlFor: id, style: labelStyle, children: disabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.labelDisabled, children }) : children })
392
+ ] });
406
393
  };
407
394
  const RadioGroup = (props) => {
408
395
  const {
@@ -455,55 +442,41 @@ const RadioGroup = (props) => {
455
442
  return null;
456
443
  }
457
444
  const radios = react.Children.map(children, (child) => updateRadioElems(child));
458
- return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", {
459
- "data-test-id": testId,
460
- ref: fieldsetRef,
461
- children: [legend && /* @__PURE__ */ jsxRuntime.jsx("legend", {
462
- children: /* @__PURE__ */ jsxRuntime.jsx(visuallyHidden.VisuallyHidden, {
463
- children: legend
464
- })
465
- }), /* @__PURE__ */ jsxRuntime.jsx("div", {
466
- ...rest,
467
- children: radios
468
- })]
469
- });
445
+ return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { "data-test-id": testId, ref: fieldsetRef, children: [
446
+ legend && /* @__PURE__ */ jsxRuntime.jsx("legend", { children: /* @__PURE__ */ jsxRuntime.jsx(visuallyHidden.VisuallyHidden, { children: legend }) }),
447
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ...rest, children: radios })
448
+ ] });
470
449
  };
471
- const SelectField = ({
472
- className,
473
- children,
474
- "data-test-id": testId = "select",
475
- ...rest
476
- }) => {
477
- const classes = classix.cx(styles.formInput, className);
478
- return /* @__PURE__ */ jsxRuntime.jsx("select", {
479
- ...rest,
480
- "data-test-id": testId,
481
- className: classes,
482
- children
483
- });
484
- };
485
- const TextArea = react.forwardRef(({
486
- className,
487
- "data-test-id": testId = "text-area",
488
- ...props
489
- }, ref) => {
490
- const onKeyDown = (e) => {
491
- if (e.key === "ArrowRight" || e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "ArrowLeft") {
492
- e.stopPropagation();
493
- }
494
- if (e.key === "Escape") {
495
- e.nativeEvent.stopImmediatePropagation();
496
- }
497
- };
498
- return /* @__PURE__ */ jsxRuntime.jsx("textarea", {
499
- ...props,
500
- className: classix.cx(styles.formInput, className),
501
- ref,
502
- "data-test-id": testId,
503
- "aria-describedby": props["aria-describedby"] || createFieldErrorId(props.id),
504
- onKeyDown
505
- });
506
- });
450
+ const SelectField = react.forwardRef(
451
+ ({ className, children, "data-test-id": testId = "select", ...rest }, ref) => {
452
+ const classes = classix.cx(styles.formInput, className);
453
+ return /* @__PURE__ */ jsxRuntime.jsx("select", { ...rest, "data-test-id": testId, className: classes, ref, children });
454
+ }
455
+ );
456
+ SelectField.displayName = "SelectField";
457
+ const TextArea = react.forwardRef(
458
+ ({ className, "data-test-id": testId = "text-area", ...props }, ref) => {
459
+ const onKeyDown = (e) => {
460
+ if (e.key === "ArrowRight" || e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "ArrowLeft") {
461
+ e.stopPropagation();
462
+ }
463
+ if (e.key === "Escape") {
464
+ e.nativeEvent.stopImmediatePropagation();
465
+ }
466
+ };
467
+ return /* @__PURE__ */ jsxRuntime.jsx(
468
+ "textarea",
469
+ {
470
+ ...props,
471
+ className: classix.cx(styles.formInput, className),
472
+ ref,
473
+ "data-test-id": testId,
474
+ "aria-describedby": props["aria-describedby"] || createFieldErrorId(props.id),
475
+ onKeyDown
476
+ }
477
+ );
478
+ }
479
+ );
507
480
  TextArea.displayName = "TextArea";
508
481
  exports.Checkbox = Checkbox;
509
482
  exports.CompactTextField = CompactTextField;