@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.
Files changed (158) hide show
  1. package/README.md +1 -0
  2. package/dist/calendar/index.js +34 -10
  3. package/dist/calendar/index.js.map +1 -1
  4. package/dist/calendar/styles.js +30 -0
  5. package/dist/calendar/styles.js.map +1 -1
  6. package/dist/chip/index.js +27 -18
  7. package/dist/chip/index.js.map +1 -1
  8. package/dist/chip/label.js +32 -0
  9. package/dist/chip/label.js.map +1 -0
  10. package/dist/chip/styles.js +32 -2
  11. package/dist/chip/styles.js.map +1 -1
  12. package/dist/collection/text.js +24 -3
  13. package/dist/collection/text.js.map +1 -1
  14. package/dist/components/button/index.js.map +1 -1
  15. package/dist/components/calendar/index.d.ts +8 -1
  16. package/dist/components/calendar/index.js +129 -73
  17. package/dist/components/calendar/index.js.map +1 -1
  18. package/dist/components/checkbox/index.js +29 -30
  19. package/dist/components/checkbox/index.js.map +1 -1
  20. package/dist/components/checkbox-group/index.js +4 -2
  21. package/dist/components/checkbox-group/index.js.map +1 -1
  22. package/dist/components/chip/index.js +1 -1
  23. package/dist/components/chip/index.js.map +1 -1
  24. package/dist/components/chip-group/index.d.ts +35 -5
  25. package/dist/components/chip-group/index.js +137 -97
  26. package/dist/components/chip-group/index.js.map +1 -1
  27. package/dist/components/copy-field/index.js +1 -1
  28. package/dist/components/copy-field/index.js.map +1 -1
  29. package/dist/components/currency/index.d.ts +64 -6
  30. package/dist/components/currency/index.js +117 -40
  31. package/dist/components/currency/index.js.map +1 -1
  32. package/dist/components/date-picker/index.js +1 -1
  33. package/dist/components/dialog/index.d.ts +3 -1
  34. package/dist/components/dialog/index.js +121 -81
  35. package/dist/components/dialog/index.js.map +1 -1
  36. package/dist/components/disclosure-group/index.js +1 -1
  37. package/dist/components/disclosure-group/index.js.map +1 -1
  38. package/dist/components/icon-button/index.js +18 -1
  39. package/dist/components/icon-button/index.js.map +1 -1
  40. package/dist/components/index.d.ts +2 -2
  41. package/dist/components/keycap/index.d.ts +3 -0
  42. package/dist/components/keycap/index.js +30 -44
  43. package/dist/components/keycap/index.js.map +1 -1
  44. package/dist/components/list/index.d.ts +16 -2
  45. package/dist/components/list/index.js +124 -69
  46. package/dist/components/list/index.js.map +1 -1
  47. package/dist/components/list-detail/index.d.ts +11 -3
  48. package/dist/components/list-detail/index.js +13 -6
  49. package/dist/components/list-detail/index.js.map +1 -1
  50. package/dist/components/list-item/index.d.ts +16 -1
  51. package/dist/components/list-item/index.js.map +1 -1
  52. package/dist/components/menu/index.d.ts +6 -2
  53. package/dist/components/menu/index.js +22 -15
  54. package/dist/components/menu/index.js.map +1 -1
  55. package/dist/components/meter/index.d.ts +4 -1
  56. package/dist/components/meter/index.js +6 -0
  57. package/dist/components/meter/index.js.map +1 -1
  58. package/dist/components/navigation-bar/index.d.ts +14 -4
  59. package/dist/components/navigation-bar/index.js +77 -50
  60. package/dist/components/navigation-bar/index.js.map +1 -1
  61. package/dist/components/navigation-rail/index.d.ts +3 -2
  62. package/dist/components/navigation-rail/index.js +59 -52
  63. package/dist/components/navigation-rail/index.js.map +1 -1
  64. package/dist/components/navigation-tree/index.js +4 -1
  65. package/dist/components/navigation-tree/index.js.map +1 -1
  66. package/dist/components/number-field/index.d.ts +3 -2
  67. package/dist/components/number-field/index.js +91 -115
  68. package/dist/components/number-field/index.js.map +1 -1
  69. package/dist/components/popover/index.d.ts +3 -1
  70. package/dist/components/popover/index.js +102 -100
  71. package/dist/components/popover/index.js.map +1 -1
  72. package/dist/components/progress-indicator/index.d.ts +4 -2
  73. package/dist/components/progress-indicator/index.js +4 -3
  74. package/dist/components/progress-indicator/index.js.map +1 -1
  75. package/dist/components/radio-group/index.js +34 -24
  76. package/dist/components/radio-group/index.js.map +1 -1
  77. package/dist/components/search-field/index.d.ts +11 -1
  78. package/dist/components/search-field/index.js +32 -28
  79. package/dist/components/search-field/index.js.map +1 -1
  80. package/dist/components/segmented-button/index.d.ts +9 -2
  81. package/dist/components/segmented-button/index.js +1 -1
  82. package/dist/components/segmented-button/index.js.map +1 -1
  83. package/dist/components/separator/index.d.ts +19 -7
  84. package/dist/components/separator/index.js +36 -13
  85. package/dist/components/separator/index.js.map +1 -1
  86. package/dist/components/sheet/index.js +72 -61
  87. package/dist/components/sheet/index.js.map +1 -1
  88. package/dist/components/snackbar/index.d.ts +4 -1
  89. package/dist/components/snackbar/index.js +140 -55
  90. package/dist/components/snackbar/index.js.map +1 -1
  91. package/dist/components/stack/index.d.ts +6 -3
  92. package/dist/components/stack/index.js +48 -31
  93. package/dist/components/stack/index.js.map +1 -1
  94. package/dist/components/switch/index.d.ts +16 -6
  95. package/dist/components/switch/index.js +115 -62
  96. package/dist/components/switch/index.js.map +1 -1
  97. package/dist/components/text-area/index.d.ts +10 -1
  98. package/dist/components/text-area/index.js +21 -19
  99. package/dist/components/text-area/index.js.map +1 -1
  100. package/dist/components/text-field/index.d.ts +16 -2
  101. package/dist/components/text-field/index.js +49 -43
  102. package/dist/components/text-field/index.js.map +1 -1
  103. package/dist/components/time-picker/index.js +42 -38
  104. package/dist/components/time-picker/index.js.map +1 -1
  105. package/dist/components/tooltip/index.d.ts +3 -1
  106. package/dist/components/tooltip/index.js.map +1 -1
  107. package/dist/components/tree/index.d.ts +15 -3
  108. package/dist/components/tree/index.js +41 -28
  109. package/dist/components/tree/index.js.map +1 -1
  110. package/dist/control/index.js +26 -23
  111. package/dist/control/index.js.map +1 -1
  112. package/dist/control/styles.js +8 -1
  113. package/dist/control/styles.js.map +1 -1
  114. package/dist/field/index.js +149 -131
  115. package/dist/field/index.js.map +1 -1
  116. package/dist/field/styles.js +14 -1
  117. package/dist/field/styles.js.map +1 -1
  118. package/dist/glyphs/index.js +37 -1
  119. package/dist/glyphs/index.js.map +1 -1
  120. package/dist/hooks/useClippedTitle.js +44 -0
  121. package/dist/hooks/useClippedTitle.js.map +1 -0
  122. package/dist/hooks/useRipple.js +6 -5
  123. package/dist/hooks/useRipple.js.map +1 -1
  124. package/dist/hooks/useScrollStop.js +133 -0
  125. package/dist/hooks/useScrollStop.js.map +1 -0
  126. package/dist/i18n/index.js +1 -0
  127. package/dist/i18n/index.js.map +1 -1
  128. package/dist/i18n/messages.js +34 -0
  129. package/dist/i18n/messages.js.map +1 -1
  130. package/dist/index.d.ts +2 -2
  131. package/dist/indicator/index.js +18 -16
  132. package/dist/indicator/index.js.map +1 -1
  133. package/dist/indicator/styles.js +3 -0
  134. package/dist/indicator/styles.js.map +1 -1
  135. package/dist/keycap/context.js +7 -0
  136. package/dist/keycap/context.js.map +1 -0
  137. package/dist/navigation/index.d.ts +16 -2
  138. package/dist/navigation/index.js +145 -44
  139. package/dist/navigation/index.js.map +1 -1
  140. package/dist/navigation/styles.js +79 -16
  141. package/dist/navigation/styles.js.map +1 -1
  142. package/dist/overlay/modal.js +7 -0
  143. package/dist/overlay/modal.js.map +1 -0
  144. package/dist/row/index.js +92 -89
  145. package/dist/row/index.js.map +1 -1
  146. package/dist/row/styles.js +24 -1
  147. package/dist/row/styles.js.map +1 -1
  148. package/dist/styles/overlay.d.ts +6 -2
  149. package/dist/styles/overlay.js +9 -1
  150. package/dist/styles/overlay.js.map +1 -1
  151. package/dist/styles.css +177 -20
  152. package/dist/theme-scope.d.ts +5 -1
  153. package/dist/theme-scope.js +100 -51
  154. package/dist/theme-scope.js.map +1 -1
  155. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  156. package/package.json +21 -20
  157. package/dist/hooks/useScrollable.js +0 -69
  158. package/dist/hooks/useScrollable.js.map +0 -1
@@ -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(23);
346
- const { numeric: t1, placeholder, prefix, suffix, ...props$1 } = t0;
347
- const numeric = t1 === void 0 ? false : t1;
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 t2 = placeholder ?? (box.label === "floating" ? " " : void 0);
356
- const t3 = commitWhileInvalid(validation?.isInvalid ?? false, props$1.onInput);
357
- let t4;
358
- if ($[0] !== box || $[1] !== numeric) {
359
- t4 = (state) => props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === "floating" && fieldChromeStyles.inputUnderFloatingLabel, numeric && fieldChromeStyles.numeric, state.isDisabled && fieldChromeStyles.inputDisabled);
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] = numeric;
362
- $[2] = t4;
363
- } else t4 = $[2];
364
- const t5 = mergeStatefulStyles(t4, props$1);
365
- let t6;
366
- if ($[3] !== T0 || $[4] !== describedBy || $[5] !== props$1 || $[6] !== t2 || $[7] !== t3 || $[8] !== t5) {
367
- t6 = /* @__PURE__ */ jsx(T0, {
368
- placeholder: t2,
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: t3,
372
- ...t5
373
+ onInput: t4,
374
+ ...t6
373
375
  });
374
- $[3] = T0;
375
- $[4] = describedBy;
376
- $[5] = props$1;
377
- $[6] = t2;
376
+ $[4] = T0;
377
+ $[5] = describedBy;
378
+ $[6] = props$1;
378
379
  $[7] = t3;
379
- $[8] = t5;
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] !== box || $[12] !== prefix || $[13] !== prefixId) {
391
- t8 = prefix === void 0 ? null : /* @__PURE__ */ jsx("span", {
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
- $[11] = box;
397
- $[12] = prefix;
398
- $[13] = prefixId;
399
- $[14] = t8;
400
- } else t8 = $[14];
401
- let t9;
402
- if ($[15] !== box || $[16] !== suffix || $[17] !== suffixId) {
403
- t9 = suffix === void 0 ? null : /* @__PURE__ */ jsx("span", {
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
- $[15] = box;
409
- $[16] = suffix;
410
- $[17] = suffixId;
411
- $[18] = t9;
412
- } else t9 = $[18];
413
- let t10;
414
- if ($[19] !== control || $[20] !== t8 || $[21] !== t9) {
415
- t10 = /* @__PURE__ */ jsxs("span", {
416
- ...t7,
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
- t8,
420
+ t9,
419
421
  control,
420
- t9
422
+ t10
421
423
  ]
422
424
  });
423
- $[19] = control;
424
- $[20] = t8;
425
- $[21] = t9;
426
- $[22] = t10;
427
- } else t10 = $[22];
428
- return t10;
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(34);
724
- const { characterCount: t1, characterLimitLabel, description, error, errorId, inset: t2, maxLength, reserve: t3 } = t0;
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 reserve = t3 === void 0 ? true : t3;
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 t4;
739
+ let t5;
737
740
  if ($[0] !== characterLimitLabel || $[1] !== maxLength || $[2] !== messages) {
738
- t4 = maxLength === void 0 ? void 0 : characterLimitLabel ?? messages.characterLimit(maxLength);
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] = t4;
743
- } else t4 = $[3];
744
- const limit = t4;
745
- let t5;
745
+ $[3] = t5;
746
+ } else t5 = $[3];
747
+ const limit = t5;
748
+ let t6;
746
749
  if ($[4] !== limit) {
747
- t5 = limit === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, {
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] = t5;
756
- } else t5 = $[5];
757
- const hidden = t5;
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
- let t6;
763
- if ($[6] !== hidden || $[7] !== hint || $[8] !== limit) {
764
- t6 = hint === void 0 ? hidden : /* @__PURE__ */ jsxs(Text, {
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] = limit;
775
- $[9] = t6;
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 messageStyles = t7;
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] !== error || $[12] !== errorId || $[13] !== errorSlot) {
787
- t8 = errorSlot ? /* @__PURE__ */ jsx(Text, {
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
- $[11] = error;
797
- $[12] = errorId;
798
- $[13] = errorSlot;
799
- $[14] = t8;
800
- } else t8 = $[14];
801
- const written = t8;
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 ($[18] === Symbol.for("react.memo_cache_sentinel")) {
811
- t10 = props(fieldChromeStyles.messageRegion);
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] !== error || $[20] !== validation || $[21] !== written) {
816
- t11 = /* @__PURE__ */ jsx("span", {
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
- ...t10,
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
- $[19] = error;
826
- $[20] = validation;
827
- $[21] = written;
828
- $[22] = t11;
829
- } else t11 = $[22];
830
- let t12;
831
- if ($[23] !== characterCount || $[24] !== invalid || $[25] !== length || $[26] !== locale || $[27] !== maxLength) {
832
- t12 = characterCount ? /* @__PURE__ */ jsx("span", {
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
- $[23] = characterCount;
838
- $[24] = invalid;
839
- $[25] = length;
840
- $[26] = locale;
841
- $[27] = maxLength;
842
- $[28] = t12;
843
- } else t12 = $[28];
844
- let t13;
845
- if ($[29] !== described || $[30] !== t11 || $[31] !== t12 || $[32] !== t9) {
846
- t13 = /* @__PURE__ */ jsxs("div", {
847
- ...t9,
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
- t11,
865
+ t12,
850
866
  described,
851
- t12
867
+ t13,
868
+ t14
852
869
  ]
853
870
  });
854
- $[29] = described;
855
- $[30] = t11;
856
- $[31] = t12;
857
- $[32] = t9;
858
- $[33] = t13;
859
- } else t13 = $[33];
860
- return t13;
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