@kanso-labs/kanso-ui 0.43.7 → 0.44.0
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/README.md +1 -0
- package/dist/calendar/index.js +34 -10
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +30 -0
- package/dist/calendar/styles.js.map +1 -1
- package/dist/chip/index.js +27 -18
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/label.js +32 -0
- package/dist/chip/label.js.map +1 -0
- package/dist/chip/styles.js +32 -2
- package/dist/chip/styles.js.map +1 -1
- package/dist/collection/text.js +24 -3
- package/dist/collection/text.js.map +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +8 -1
- package/dist/components/calendar/index.js +129 -73
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/checkbox/index.js +29 -30
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.js +4 -2
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +35 -5
- package/dist/components/chip-group/index.js +137 -97
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/currency/index.d.ts +64 -6
- package/dist/components/currency/index.js +117 -40
- package/dist/components/currency/index.js.map +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/dialog/index.d.ts +3 -1
- package/dist/components/dialog/index.js +121 -81
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/disclosure-group/index.js +1 -1
- package/dist/components/disclosure-group/index.js.map +1 -1
- package/dist/components/icon-button/index.js +18 -1
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/keycap/index.d.ts +3 -0
- package/dist/components/keycap/index.js +30 -44
- package/dist/components/keycap/index.js.map +1 -1
- package/dist/components/list/index.d.ts +16 -2
- package/dist/components/list/index.js +124 -69
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-detail/index.d.ts +11 -3
- package/dist/components/list-detail/index.js +13 -6
- package/dist/components/list-detail/index.js.map +1 -1
- package/dist/components/list-item/index.d.ts +16 -1
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +6 -2
- package/dist/components/menu/index.js +22 -15
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +4 -1
- package/dist/components/meter/index.js +6 -0
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/navigation-bar/index.d.ts +14 -4
- package/dist/components/navigation-bar/index.js +77 -50
- package/dist/components/navigation-bar/index.js.map +1 -1
- package/dist/components/navigation-rail/index.d.ts +3 -2
- package/dist/components/navigation-rail/index.js +59 -52
- package/dist/components/navigation-rail/index.js.map +1 -1
- package/dist/components/navigation-tree/index.js +4 -1
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/number-field/index.d.ts +3 -2
- package/dist/components/number-field/index.js +91 -115
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.d.ts +3 -1
- package/dist/components/popover/index.js +102 -100
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +4 -2
- package/dist/components/progress-indicator/index.js +4 -3
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/radio-group/index.js +34 -24
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +11 -1
- package/dist/components/search-field/index.js +32 -28
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +9 -2
- package/dist/components/segmented-button/index.js +1 -1
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/separator/index.d.ts +19 -7
- package/dist/components/separator/index.js +36 -13
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/sheet/index.js +72 -61
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +4 -1
- package/dist/components/snackbar/index.js +140 -55
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/stack/index.d.ts +6 -3
- package/dist/components/stack/index.js +48 -31
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/switch/index.d.ts +16 -6
- package/dist/components/switch/index.js +115 -62
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/text-area/index.d.ts +10 -1
- package/dist/components/text-area/index.js +21 -19
- package/dist/components/text-area/index.js.map +1 -1
- package/dist/components/text-field/index.d.ts +16 -2
- package/dist/components/text-field/index.js +49 -43
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/time-picker/index.js +42 -38
- package/dist/components/time-picker/index.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +3 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tree/index.d.ts +15 -3
- package/dist/components/tree/index.js +41 -28
- package/dist/components/tree/index.js.map +1 -1
- package/dist/control/index.js +26 -23
- package/dist/control/index.js.map +1 -1
- package/dist/control/styles.js +8 -1
- package/dist/control/styles.js.map +1 -1
- package/dist/field/index.js +149 -131
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +14 -1
- package/dist/field/styles.js.map +1 -1
- package/dist/glyphs/index.js +37 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/hooks/useClippedTitle.js +44 -0
- package/dist/hooks/useClippedTitle.js.map +1 -0
- package/dist/hooks/useRipple.js +6 -5
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/hooks/useScrollStop.js +133 -0
- package/dist/hooks/useScrollStop.js.map +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +34 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/indicator/index.js +18 -16
- package/dist/indicator/index.js.map +1 -1
- package/dist/indicator/styles.js +3 -0
- package/dist/indicator/styles.js.map +1 -1
- package/dist/keycap/context.js +7 -0
- package/dist/keycap/context.js.map +1 -0
- package/dist/navigation/index.d.ts +16 -2
- package/dist/navigation/index.js +145 -44
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/styles.js +79 -16
- package/dist/navigation/styles.js.map +1 -1
- package/dist/overlay/modal.js +7 -0
- package/dist/overlay/modal.js.map +1 -0
- package/dist/row/index.js +92 -89
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +24 -1
- package/dist/row/styles.js.map +1 -1
- package/dist/styles/overlay.d.ts +6 -2
- package/dist/styles/overlay.js +9 -1
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles.css +177 -20
- package/dist/theme-scope.d.ts +5 -1
- package/dist/theme-scope.js +100 -51
- package/dist/theme-scope.js.map +1 -1
- package/dist/tokens/design.tokens.stylex.js.map +1 -1
- package/package.json +21 -20
- package/dist/hooks/useScrollable.js +0 -69
- package/dist/hooks/useScrollable.js.map +0 -1
package/dist/field/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
|
2
2
|
import { spacing } from "../tokens/design.tokens.stylex.js";
|
|
3
3
|
import { mergeStatefulStyles, mergeStyles } from "../styles/merge.js";
|
|
4
4
|
import { useMessages } from "../i18n/index.js";
|
|
5
|
-
import { focusesControl } from "./press.js";
|
|
6
5
|
import { useInsideForm } from "./root.js";
|
|
7
6
|
import { fieldChromeStyles, groupStyles } from "./styles.js";
|
|
7
|
+
import { focusesControl } from "./press.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { createContext, useContext, useId } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -342,9 +342,10 @@ function FieldBox(t0) {
|
|
|
342
342
|
* it was in no name and no description, and a reader heard the label alone.
|
|
343
343
|
*/
|
|
344
344
|
function FieldInput(t0) {
|
|
345
|
-
const $ = c(
|
|
346
|
-
const {
|
|
347
|
-
const
|
|
345
|
+
const $ = c(24);
|
|
346
|
+
const { leftToRight: t1, numeric: t2, placeholder, prefix, suffix, ...props$1 } = t0;
|
|
347
|
+
const leftToRight = t1 === void 0 ? false : t1;
|
|
348
|
+
const numeric = t2 === void 0 ? false : t2;
|
|
348
349
|
const box = useContext(BoxContext);
|
|
349
350
|
const validation = useContext(FieldErrorContext);
|
|
350
351
|
const prefixId = useId();
|
|
@@ -352,80 +353,81 @@ function FieldInput(t0) {
|
|
|
352
353
|
const field = useSlottedContext(InputContext);
|
|
353
354
|
const describedBy = idsOf(prefix === void 0 ? void 0 : prefixId, suffix === void 0 ? void 0 : suffixId, field?.["aria-describedby"], props$1["aria-describedby"]);
|
|
354
355
|
const T0 = Input;
|
|
355
|
-
const
|
|
356
|
-
const
|
|
357
|
-
let
|
|
358
|
-
if ($[0] !== box || $[1] !== numeric) {
|
|
359
|
-
|
|
356
|
+
const t3 = placeholder ?? (box.label === "floating" ? " " : void 0);
|
|
357
|
+
const t4 = commitWhileInvalid(validation?.isInvalid ?? false, props$1.onInput);
|
|
358
|
+
let t5;
|
|
359
|
+
if ($[0] !== box || $[1] !== leftToRight || $[2] !== numeric) {
|
|
360
|
+
t5 = (state) => props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === "floating" && fieldChromeStyles.inputUnderFloatingLabel, numeric && fieldChromeStyles.numeric, leftToRight && fieldChromeStyles.leftToRight, state.isDisabled && fieldChromeStyles.inputDisabled);
|
|
360
361
|
$[0] = box;
|
|
361
|
-
$[1] =
|
|
362
|
-
$[2] =
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
362
|
+
$[1] = leftToRight;
|
|
363
|
+
$[2] = numeric;
|
|
364
|
+
$[3] = t5;
|
|
365
|
+
} else t5 = $[3];
|
|
366
|
+
const t6 = mergeStatefulStyles(t5, props$1);
|
|
367
|
+
let t7;
|
|
368
|
+
if ($[4] !== T0 || $[5] !== describedBy || $[6] !== props$1 || $[7] !== t3 || $[8] !== t4 || $[9] !== t6) {
|
|
369
|
+
t7 = /* @__PURE__ */ jsx(T0, {
|
|
370
|
+
placeholder: t3,
|
|
369
371
|
...props$1,
|
|
370
372
|
"aria-describedby": describedBy,
|
|
371
|
-
onInput:
|
|
372
|
-
...
|
|
373
|
+
onInput: t4,
|
|
374
|
+
...t6
|
|
373
375
|
});
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[6] = t2;
|
|
376
|
+
$[4] = T0;
|
|
377
|
+
$[5] = describedBy;
|
|
378
|
+
$[6] = props$1;
|
|
378
379
|
$[7] = t3;
|
|
379
|
-
$[8] =
|
|
380
|
+
$[8] = t4;
|
|
380
381
|
$[9] = t6;
|
|
381
|
-
} else t6 = $[9];
|
|
382
|
-
const control = t6;
|
|
383
|
-
if (prefix === void 0 && suffix === void 0) return control;
|
|
384
|
-
let t7;
|
|
385
|
-
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
386
|
-
t7 = props(fieldChromeStyles.affixLine);
|
|
387
382
|
$[10] = t7;
|
|
388
383
|
} else t7 = $[10];
|
|
384
|
+
const control = t7;
|
|
385
|
+
if (prefix === void 0 && suffix === void 0) return control;
|
|
389
386
|
let t8;
|
|
390
|
-
if ($[11]
|
|
391
|
-
t8 =
|
|
387
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
388
|
+
t8 = props(fieldChromeStyles.affixLine);
|
|
389
|
+
$[11] = t8;
|
|
390
|
+
} else t8 = $[11];
|
|
391
|
+
let t9;
|
|
392
|
+
if ($[12] !== box || $[13] !== prefix || $[14] !== prefixId) {
|
|
393
|
+
t9 = prefix === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
392
394
|
id: prefixId,
|
|
393
395
|
...props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel),
|
|
394
396
|
children: prefix
|
|
395
397
|
});
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
} else
|
|
401
|
-
let
|
|
402
|
-
if ($[
|
|
403
|
-
|
|
398
|
+
$[12] = box;
|
|
399
|
+
$[13] = prefix;
|
|
400
|
+
$[14] = prefixId;
|
|
401
|
+
$[15] = t9;
|
|
402
|
+
} else t9 = $[15];
|
|
403
|
+
let t10;
|
|
404
|
+
if ($[16] !== box || $[17] !== suffix || $[18] !== suffixId) {
|
|
405
|
+
t10 = suffix === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
404
406
|
id: suffixId,
|
|
405
407
|
...props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel),
|
|
406
408
|
children: suffix
|
|
407
409
|
});
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
} else
|
|
413
|
-
let
|
|
414
|
-
if ($[
|
|
415
|
-
|
|
416
|
-
...
|
|
410
|
+
$[16] = box;
|
|
411
|
+
$[17] = suffix;
|
|
412
|
+
$[18] = suffixId;
|
|
413
|
+
$[19] = t10;
|
|
414
|
+
} else t10 = $[19];
|
|
415
|
+
let t11;
|
|
416
|
+
if ($[20] !== control || $[21] !== t10 || $[22] !== t9) {
|
|
417
|
+
t11 = /* @__PURE__ */ jsxs("span", {
|
|
418
|
+
...t8,
|
|
417
419
|
children: [
|
|
418
|
-
|
|
420
|
+
t9,
|
|
419
421
|
control,
|
|
420
|
-
|
|
422
|
+
t10
|
|
421
423
|
]
|
|
422
424
|
});
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
} else
|
|
428
|
-
return
|
|
425
|
+
$[20] = control;
|
|
426
|
+
$[21] = t10;
|
|
427
|
+
$[22] = t9;
|
|
428
|
+
$[23] = t11;
|
|
429
|
+
} else t11 = $[23];
|
|
430
|
+
return t11;
|
|
429
431
|
}
|
|
430
432
|
/**
|
|
431
433
|
* A date or a time's segments, in a {@link FieldBox}: React Aria's
|
|
@@ -720,11 +722,12 @@ function FieldLabel(t0) {
|
|
|
720
722
|
* the field's validation state is read for.
|
|
721
723
|
*/
|
|
722
724
|
function FieldMessage(t0) {
|
|
723
|
-
const $ = c(
|
|
724
|
-
const { characterCount: t1, characterLimitLabel, description, error, errorId, inset: t2, maxLength, reserve:
|
|
725
|
+
const $ = c(40);
|
|
726
|
+
const { characterCount: t1, characterLimitLabel, characterLimitReachedLabel, description, error, errorId, inset: t2, isDisabled: t3, maxLength, reserve: t4 } = t0;
|
|
725
727
|
const characterCount = t1 === void 0 ? false : t1;
|
|
726
728
|
const inset = t2 === void 0 ? true : t2;
|
|
727
|
-
const
|
|
729
|
+
const isDisabled = t3 === void 0 ? false : t3;
|
|
730
|
+
const reserve = t4 === void 0 ? true : t4;
|
|
728
731
|
const validation = useContext(FieldErrorContext);
|
|
729
732
|
const invalid = error !== void 0 || (validation?.isInvalid ?? false);
|
|
730
733
|
const { locale } = useLocale();
|
|
@@ -733,18 +736,18 @@ function FieldMessage(t0) {
|
|
|
733
736
|
const textArea = useSlottedContext(TextAreaContext);
|
|
734
737
|
const insideForm = useInsideForm();
|
|
735
738
|
const text = useContext(TextContext);
|
|
736
|
-
let
|
|
739
|
+
let t5;
|
|
737
740
|
if ($[0] !== characterLimitLabel || $[1] !== maxLength || $[2] !== messages) {
|
|
738
|
-
|
|
741
|
+
t5 = maxLength === void 0 ? void 0 : characterLimitLabel ?? messages.characterLimit(maxLength);
|
|
739
742
|
$[0] = characterLimitLabel;
|
|
740
743
|
$[1] = maxLength;
|
|
741
744
|
$[2] = messages;
|
|
742
|
-
$[3] =
|
|
743
|
-
} else
|
|
744
|
-
const limit =
|
|
745
|
-
let
|
|
745
|
+
$[3] = t5;
|
|
746
|
+
} else t5 = $[3];
|
|
747
|
+
const limit = t5;
|
|
748
|
+
let t6;
|
|
746
749
|
if ($[4] !== limit) {
|
|
747
|
-
|
|
750
|
+
t6 = limit === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
748
751
|
elementType: "span",
|
|
749
752
|
children: /* @__PURE__ */ jsx(Text, {
|
|
750
753
|
slot: "description",
|
|
@@ -752,18 +755,19 @@ function FieldMessage(t0) {
|
|
|
752
755
|
})
|
|
753
756
|
});
|
|
754
757
|
$[4] = limit;
|
|
755
|
-
$[5] =
|
|
756
|
-
} else
|
|
757
|
-
const hidden =
|
|
758
|
+
$[5] = t6;
|
|
759
|
+
} else t6 = $[5];
|
|
760
|
+
const hidden = t6;
|
|
758
761
|
const collapsed = !invalid && description === void 0 && !characterCount && !(insideForm && reserve);
|
|
759
762
|
const value = input?.value ?? textArea?.value ?? "";
|
|
760
763
|
const length = String(value).length;
|
|
761
764
|
const hint = invalid ? void 0 : description;
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
+
const reached = characterCount && maxLength !== void 0 && length >= maxLength ? characterLimitReachedLabel ?? messages.characterLimitReached : null;
|
|
766
|
+
let t7;
|
|
767
|
+
if ($[6] !== hidden || $[7] !== hint || $[8] !== isDisabled || $[9] !== limit) {
|
|
768
|
+
t7 = hint === void 0 ? hidden : /* @__PURE__ */ jsxs(Text, {
|
|
765
769
|
slot: "description",
|
|
766
|
-
...props(fieldChromeStyles.message),
|
|
770
|
+
...props(fieldChromeStyles.message, isDisabled && fieldChromeStyles.messageDisabled),
|
|
767
771
|
children: [hint, limit === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
768
772
|
elementType: "span",
|
|
769
773
|
children: ` ${limit}`
|
|
@@ -771,20 +775,21 @@ function FieldMessage(t0) {
|
|
|
771
775
|
});
|
|
772
776
|
$[6] = hidden;
|
|
773
777
|
$[7] = hint;
|
|
774
|
-
$[8] =
|
|
775
|
-
$[9] =
|
|
776
|
-
} else t6 = $[9];
|
|
777
|
-
const described = t6;
|
|
778
|
-
const errorSlot = text !== null && typeof text === "object" && "slots" in text && text.slots?.errorMessage !== void 0;
|
|
779
|
-
let t7;
|
|
780
|
-
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
781
|
-
t7 = props(fieldChromeStyles.message, fieldChromeStyles.messageError);
|
|
778
|
+
$[8] = isDisabled;
|
|
779
|
+
$[9] = limit;
|
|
782
780
|
$[10] = t7;
|
|
783
781
|
} else t7 = $[10];
|
|
784
|
-
const
|
|
782
|
+
const described = t7;
|
|
783
|
+
const errorSlot = text !== null && typeof text === "object" && "slots" in text && text.slots?.errorMessage !== void 0;
|
|
785
784
|
let t8;
|
|
786
|
-
if ($[11]
|
|
787
|
-
t8 =
|
|
785
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
786
|
+
t8 = props(fieldChromeStyles.message, fieldChromeStyles.messageError);
|
|
787
|
+
$[11] = t8;
|
|
788
|
+
} else t8 = $[11];
|
|
789
|
+
const messageStyles = t8;
|
|
790
|
+
let t9;
|
|
791
|
+
if ($[12] !== error || $[13] !== errorId || $[14] !== errorSlot) {
|
|
792
|
+
t9 = errorSlot ? /* @__PURE__ */ jsx(Text, {
|
|
788
793
|
slot: "errorMessage",
|
|
789
794
|
...messageStyles,
|
|
790
795
|
children: error
|
|
@@ -793,71 +798,84 @@ function FieldMessage(t0) {
|
|
|
793
798
|
...messageStyles,
|
|
794
799
|
children: error
|
|
795
800
|
});
|
|
796
|
-
$[
|
|
797
|
-
$[
|
|
798
|
-
$[
|
|
799
|
-
$[
|
|
800
|
-
} else
|
|
801
|
-
const written =
|
|
802
|
-
let t9;
|
|
803
|
-
if ($[15] !== collapsed || $[16] !== inset) {
|
|
804
|
-
t9 = props(fieldChromeStyles.message, fieldChromeStyles.messageLine, inset && fieldChromeStyles.messageInset, collapsed && fieldChromeStyles.messageLineCollapsed);
|
|
805
|
-
$[15] = collapsed;
|
|
806
|
-
$[16] = inset;
|
|
807
|
-
$[17] = t9;
|
|
808
|
-
} else t9 = $[17];
|
|
801
|
+
$[12] = error;
|
|
802
|
+
$[13] = errorId;
|
|
803
|
+
$[14] = errorSlot;
|
|
804
|
+
$[15] = t9;
|
|
805
|
+
} else t9 = $[15];
|
|
806
|
+
const written = t9;
|
|
809
807
|
let t10;
|
|
810
|
-
if ($[
|
|
811
|
-
t10 = props(fieldChromeStyles.
|
|
808
|
+
if ($[16] !== collapsed || $[17] !== inset) {
|
|
809
|
+
t10 = props(fieldChromeStyles.message, fieldChromeStyles.messageLine, inset && fieldChromeStyles.messageInset, collapsed && fieldChromeStyles.messageLineCollapsed);
|
|
810
|
+
$[16] = collapsed;
|
|
811
|
+
$[17] = inset;
|
|
812
812
|
$[18] = t10;
|
|
813
813
|
} else t10 = $[18];
|
|
814
814
|
let t11;
|
|
815
|
-
if ($[19]
|
|
816
|
-
t11 =
|
|
815
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
816
|
+
t11 = props(fieldChromeStyles.messageRegion);
|
|
817
|
+
$[19] = t11;
|
|
818
|
+
} else t11 = $[19];
|
|
819
|
+
let t12;
|
|
820
|
+
if ($[20] !== error || $[21] !== validation || $[22] !== written) {
|
|
821
|
+
t12 = /* @__PURE__ */ jsx("span", {
|
|
817
822
|
"aria-atomic": "true",
|
|
818
823
|
"aria-live": "polite",
|
|
819
|
-
...
|
|
824
|
+
...t11,
|
|
820
825
|
children: validation === null && error !== void 0 ? written : /* @__PURE__ */ jsx(FieldError, {
|
|
821
826
|
...props(fieldChromeStyles.message, fieldChromeStyles.messageError),
|
|
822
827
|
children: error
|
|
823
828
|
})
|
|
824
829
|
});
|
|
825
|
-
$[
|
|
826
|
-
$[
|
|
827
|
-
$[
|
|
828
|
-
$[
|
|
829
|
-
} else
|
|
830
|
-
let
|
|
831
|
-
if ($[
|
|
832
|
-
|
|
830
|
+
$[20] = error;
|
|
831
|
+
$[21] = validation;
|
|
832
|
+
$[22] = written;
|
|
833
|
+
$[23] = t12;
|
|
834
|
+
} else t12 = $[23];
|
|
835
|
+
let t13;
|
|
836
|
+
if ($[24] !== characterCount || $[25] !== invalid || $[26] !== length || $[27] !== locale || $[28] !== maxLength) {
|
|
837
|
+
t13 = characterCount ? /* @__PURE__ */ jsx("span", {
|
|
833
838
|
"aria-hidden": "true",
|
|
834
839
|
...props(fieldChromeStyles.message, fieldChromeStyles.counter, invalid && fieldChromeStyles.messageError),
|
|
835
840
|
children: countIn(locale, length, maxLength)
|
|
836
841
|
}) : null;
|
|
837
|
-
$[
|
|
838
|
-
$[
|
|
839
|
-
$[
|
|
840
|
-
$[
|
|
841
|
-
$[
|
|
842
|
-
$[
|
|
843
|
-
} else
|
|
844
|
-
let
|
|
845
|
-
if ($[
|
|
846
|
-
|
|
847
|
-
|
|
842
|
+
$[24] = characterCount;
|
|
843
|
+
$[25] = invalid;
|
|
844
|
+
$[26] = length;
|
|
845
|
+
$[27] = locale;
|
|
846
|
+
$[28] = maxLength;
|
|
847
|
+
$[29] = t13;
|
|
848
|
+
} else t13 = $[29];
|
|
849
|
+
let t14;
|
|
850
|
+
if ($[30] !== characterCount || $[31] !== maxLength || $[32] !== reached) {
|
|
851
|
+
t14 = characterCount && maxLength !== void 0 ? /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
852
|
+
elementType: "output",
|
|
853
|
+
children: reached
|
|
854
|
+
}) : null;
|
|
855
|
+
$[30] = characterCount;
|
|
856
|
+
$[31] = maxLength;
|
|
857
|
+
$[32] = reached;
|
|
858
|
+
$[33] = t14;
|
|
859
|
+
} else t14 = $[33];
|
|
860
|
+
let t15;
|
|
861
|
+
if ($[34] !== described || $[35] !== t10 || $[36] !== t12 || $[37] !== t13 || $[38] !== t14) {
|
|
862
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
863
|
+
...t10,
|
|
848
864
|
children: [
|
|
849
|
-
|
|
865
|
+
t12,
|
|
850
866
|
described,
|
|
851
|
-
|
|
867
|
+
t13,
|
|
868
|
+
t14
|
|
852
869
|
]
|
|
853
870
|
});
|
|
854
|
-
$[
|
|
855
|
-
$[
|
|
856
|
-
$[
|
|
857
|
-
$[
|
|
858
|
-
$[
|
|
859
|
-
|
|
860
|
-
|
|
871
|
+
$[34] = described;
|
|
872
|
+
$[35] = t10;
|
|
873
|
+
$[36] = t12;
|
|
874
|
+
$[37] = t13;
|
|
875
|
+
$[38] = t14;
|
|
876
|
+
$[39] = t15;
|
|
877
|
+
} else t15 = $[39];
|
|
878
|
+
return t15;
|
|
861
879
|
}
|
|
862
880
|
/**
|
|
863
881
|
* The same asterisk for a label that is not a field's own — a checkbox's, a
|