@kanso-labs/kanso-ui 0.43.7 → 0.44.1

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 (161) 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/app-bar/index.d.ts +9 -5
  15. package/dist/components/app-bar/index.js +400 -170
  16. package/dist/components/app-bar/index.js.map +1 -1
  17. package/dist/components/button/index.js.map +1 -1
  18. package/dist/components/calendar/index.d.ts +8 -1
  19. package/dist/components/calendar/index.js +129 -73
  20. package/dist/components/calendar/index.js.map +1 -1
  21. package/dist/components/checkbox/index.js +31 -31
  22. package/dist/components/checkbox/index.js.map +1 -1
  23. package/dist/components/checkbox-group/index.js +4 -2
  24. package/dist/components/checkbox-group/index.js.map +1 -1
  25. package/dist/components/chip/index.js +1 -1
  26. package/dist/components/chip/index.js.map +1 -1
  27. package/dist/components/chip-group/index.d.ts +35 -5
  28. package/dist/components/chip-group/index.js +137 -97
  29. package/dist/components/chip-group/index.js.map +1 -1
  30. package/dist/components/copy-field/index.js +1 -1
  31. package/dist/components/copy-field/index.js.map +1 -1
  32. package/dist/components/currency/index.d.ts +64 -6
  33. package/dist/components/currency/index.js +117 -40
  34. package/dist/components/currency/index.js.map +1 -1
  35. package/dist/components/date-picker/index.js +1 -1
  36. package/dist/components/dialog/index.d.ts +3 -1
  37. package/dist/components/dialog/index.js +115 -81
  38. package/dist/components/dialog/index.js.map +1 -1
  39. package/dist/components/disclosure-group/index.js +1 -1
  40. package/dist/components/disclosure-group/index.js.map +1 -1
  41. package/dist/components/icon-button/index.js +18 -1
  42. package/dist/components/icon-button/index.js.map +1 -1
  43. package/dist/components/index.d.ts +2 -2
  44. package/dist/components/keycap/index.d.ts +3 -0
  45. package/dist/components/keycap/index.js +30 -44
  46. package/dist/components/keycap/index.js.map +1 -1
  47. package/dist/components/list/index.d.ts +16 -2
  48. package/dist/components/list/index.js +124 -69
  49. package/dist/components/list/index.js.map +1 -1
  50. package/dist/components/list-detail/index.d.ts +11 -3
  51. package/dist/components/list-detail/index.js +13 -6
  52. package/dist/components/list-detail/index.js.map +1 -1
  53. package/dist/components/list-item/index.d.ts +16 -1
  54. package/dist/components/list-item/index.js.map +1 -1
  55. package/dist/components/menu/index.d.ts +6 -2
  56. package/dist/components/menu/index.js +22 -15
  57. package/dist/components/menu/index.js.map +1 -1
  58. package/dist/components/meter/index.d.ts +4 -1
  59. package/dist/components/meter/index.js +6 -0
  60. package/dist/components/meter/index.js.map +1 -1
  61. package/dist/components/navigation-bar/index.d.ts +14 -4
  62. package/dist/components/navigation-bar/index.js +77 -50
  63. package/dist/components/navigation-bar/index.js.map +1 -1
  64. package/dist/components/navigation-rail/index.d.ts +3 -2
  65. package/dist/components/navigation-rail/index.js +59 -52
  66. package/dist/components/navigation-rail/index.js.map +1 -1
  67. package/dist/components/navigation-tree/index.js +4 -1
  68. package/dist/components/navigation-tree/index.js.map +1 -1
  69. package/dist/components/number-field/index.d.ts +3 -2
  70. package/dist/components/number-field/index.js +91 -115
  71. package/dist/components/number-field/index.js.map +1 -1
  72. package/dist/components/popover/index.d.ts +3 -1
  73. package/dist/components/popover/index.js +102 -100
  74. package/dist/components/popover/index.js.map +1 -1
  75. package/dist/components/progress-indicator/index.d.ts +4 -2
  76. package/dist/components/progress-indicator/index.js +4 -3
  77. package/dist/components/progress-indicator/index.js.map +1 -1
  78. package/dist/components/radio-group/index.js +34 -24
  79. package/dist/components/radio-group/index.js.map +1 -1
  80. package/dist/components/search-field/index.d.ts +11 -1
  81. package/dist/components/search-field/index.js +32 -28
  82. package/dist/components/search-field/index.js.map +1 -1
  83. package/dist/components/segmented-button/index.d.ts +9 -2
  84. package/dist/components/segmented-button/index.js +1 -1
  85. package/dist/components/segmented-button/index.js.map +1 -1
  86. package/dist/components/separator/index.d.ts +19 -7
  87. package/dist/components/separator/index.js +36 -13
  88. package/dist/components/separator/index.js.map +1 -1
  89. package/dist/components/sheet/index.js +29 -25
  90. package/dist/components/sheet/index.js.map +1 -1
  91. package/dist/components/snackbar/index.d.ts +4 -1
  92. package/dist/components/snackbar/index.js +140 -55
  93. package/dist/components/snackbar/index.js.map +1 -1
  94. package/dist/components/stack/index.d.ts +6 -3
  95. package/dist/components/stack/index.js +48 -31
  96. package/dist/components/stack/index.js.map +1 -1
  97. package/dist/components/switch/index.d.ts +16 -6
  98. package/dist/components/switch/index.js +116 -62
  99. package/dist/components/switch/index.js.map +1 -1
  100. package/dist/components/text-area/index.d.ts +10 -1
  101. package/dist/components/text-area/index.js +21 -19
  102. package/dist/components/text-area/index.js.map +1 -1
  103. package/dist/components/text-field/index.d.ts +16 -2
  104. package/dist/components/text-field/index.js +49 -43
  105. package/dist/components/text-field/index.js.map +1 -1
  106. package/dist/components/time-picker/index.js +1 -1
  107. package/dist/components/tooltip/index.d.ts +3 -1
  108. package/dist/components/tooltip/index.js.map +1 -1
  109. package/dist/components/tree/index.d.ts +15 -3
  110. package/dist/components/tree/index.js +41 -28
  111. package/dist/components/tree/index.js.map +1 -1
  112. package/dist/control/index.js +26 -23
  113. package/dist/control/index.js.map +1 -1
  114. package/dist/control/styles.js +7 -1
  115. package/dist/control/styles.js.map +1 -1
  116. package/dist/field/index.js +220 -193
  117. package/dist/field/index.js.map +1 -1
  118. package/dist/field/styles.js +64 -8
  119. package/dist/field/styles.js.map +1 -1
  120. package/dist/glyphs/index.js +37 -1
  121. package/dist/glyphs/index.js.map +1 -1
  122. package/dist/hooks/useClippedTitle.js +44 -0
  123. package/dist/hooks/useClippedTitle.js.map +1 -0
  124. package/dist/hooks/useRipple.js +7 -6
  125. package/dist/hooks/useRipple.js.map +1 -1
  126. package/dist/hooks/useScrollStop.js +133 -0
  127. package/dist/hooks/useScrollStop.js.map +1 -0
  128. package/dist/i18n/index.js +1 -0
  129. package/dist/i18n/index.js.map +1 -1
  130. package/dist/i18n/messages.js +34 -0
  131. package/dist/i18n/messages.js.map +1 -1
  132. package/dist/index.d.ts +2 -2
  133. package/dist/indicator/index.js +18 -16
  134. package/dist/indicator/index.js.map +1 -1
  135. package/dist/indicator/styles.js +3 -0
  136. package/dist/indicator/styles.js.map +1 -1
  137. package/dist/keycap/context.js +7 -0
  138. package/dist/keycap/context.js.map +1 -0
  139. package/dist/layout.d.ts +4 -1
  140. package/dist/layout.js +4 -1
  141. package/dist/layout.js.map +1 -1
  142. package/dist/navigation/index.d.ts +16 -2
  143. package/dist/navigation/index.js +145 -44
  144. package/dist/navigation/index.js.map +1 -1
  145. package/dist/navigation/styles.js +79 -16
  146. package/dist/navigation/styles.js.map +1 -1
  147. package/dist/row/index.js +92 -89
  148. package/dist/row/index.js.map +1 -1
  149. package/dist/row/styles.js +26 -2
  150. package/dist/row/styles.js.map +1 -1
  151. package/dist/styles/overlay.d.ts +6 -2
  152. package/dist/styles/overlay.js +4 -1
  153. package/dist/styles/overlay.js.map +1 -1
  154. package/dist/styles.css +296 -38
  155. package/dist/theme-scope.d.ts +5 -1
  156. package/dist/theme-scope.js +100 -51
  157. package/dist/theme-scope.js.map +1 -1
  158. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  159. package/package.json +21 -20
  160. package/dist/hooks/useScrollable.js +0 -69
  161. 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";
@@ -62,7 +62,7 @@ function boxContent(label, children, endInset, floatingLabel, isFocused, isPopul
62
62
  * for them. See the outlined variant's note above.
63
63
  */
64
64
  function BoxContent(t0) {
65
- const $ = c(47);
65
+ const $ = c(50);
66
66
  const { children, endInset, floatingLabel, isFocused, isPopulated, isRequired, label, leading, multiline, state, trailing, trigger, variant } = t0;
67
67
  const read = useFieldPopulated();
68
68
  const populated = isPopulated ?? read;
@@ -74,7 +74,7 @@ function BoxContent(t0) {
74
74
  if ($[0] !== endInset || $[1] !== floated || $[2] !== focused || $[3] !== isRequired || $[4] !== label || $[5] !== leading || $[6] !== outlined || $[7] !== trailing) {
75
75
  t2 = outlined ? /* @__PURE__ */ jsx("fieldset", {
76
76
  "aria-hidden": "true",
77
- ...props(fieldChromeStyles.outline, leading !== void 0 && fieldChromeStyles.outlineLeading, trailing !== void 0 && fieldChromeStyles.outlineTrailing, focused && fieldChromeStyles.outlineFocused, endInset !== "0px" && fieldChromeStyles.outlineEndInset(`calc(${spacing.lg} - ${spacing.xs} + ${endInset})`)),
77
+ ...props(fieldChromeStyles.outline, focused && fieldChromeStyles.outlineFocused, leading !== void 0 && (focused ? fieldChromeStyles.outlineLeadingFocused : fieldChromeStyles.outlineLeading), trailing !== void 0 && (focused ? fieldChromeStyles.outlineTrailingFocused : fieldChromeStyles.outlineTrailing), endInset !== "0px" && fieldChromeStyles.outlineEndInset(`calc(${spacing.lg} - ${spacing.xs} - ${focused ? "2px" : "1px"} + ${endInset})`)),
78
78
  children: /* @__PURE__ */ jsx("legend", {
79
79
  ...props(fieldChromeStyles.outlineNotch, floated && fieldChromeStyles.outlineNotchOpen),
80
80
  children: floated ? /* @__PURE__ */ jsxs(Fragment$1, { children: [label, isRequired ? REQUIRED_MARK : null] }) : null
@@ -126,45 +126,49 @@ function BoxContent(t0) {
126
126
  $[24] = t6;
127
127
  } else t6 = $[24];
128
128
  let t7;
129
- if ($[25] !== isRequired || $[26] !== label || $[27] !== t5 || $[28] !== t6) {
129
+ if ($[25] !== isRequired || $[26] !== label || $[27] !== outlined || $[28] !== t5 || $[29] !== t6) {
130
130
  t7 = /* @__PURE__ */ jsx(FieldLabel, {
131
131
  isRequired,
132
+ outlined,
132
133
  state: t5,
133
134
  ...t6,
134
135
  children: label
135
136
  });
136
137
  $[25] = isRequired;
137
138
  $[26] = label;
138
- $[27] = t5;
139
- $[28] = t6;
140
- $[29] = t7;
141
- } else t7 = $[29];
139
+ $[27] = outlined;
140
+ $[28] = t5;
141
+ $[29] = t6;
142
+ $[30] = t7;
143
+ } else t7 = $[30];
142
144
  let t8;
143
- if ($[30] !== children || $[31] !== t4 || $[32] !== t7) {
145
+ if ($[31] !== children || $[32] !== t4 || $[33] !== t7) {
144
146
  t8 = /* @__PURE__ */ jsxs("div", {
145
147
  ...t4,
146
148
  children: [t7, children]
147
149
  });
148
- $[30] = children;
149
- $[31] = t4;
150
- $[32] = t7;
151
- $[33] = t8;
152
- } else t8 = $[33];
150
+ $[31] = children;
151
+ $[32] = t4;
152
+ $[33] = t7;
153
+ $[34] = t8;
154
+ } else t8 = $[34];
153
155
  let t9;
154
- if ($[34] !== multiline || $[35] !== outlined || $[36] !== state.isDisabled || $[37] !== state.isInvalid || $[38] !== trailing) {
156
+ if ($[35] !== focused || $[36] !== multiline || $[37] !== outlined || $[38] !== state.isDisabled || $[39] !== state.isHovered || $[40] !== state.isInvalid || $[41] !== trailing) {
155
157
  t9 = trailing === void 0 ? null : /* @__PURE__ */ jsx("span", {
156
- ...props(fieldChromeStyles.icon, multiline && fieldChromeStyles.iconMultiline, outlined && fieldChromeStyles.iconOutlined, state.isInvalid && fieldChromeStyles.iconError, state.isDisabled && fieldChromeStyles.iconDisabled),
158
+ ...props(fieldChromeStyles.icon, multiline && fieldChromeStyles.iconMultiline, outlined && fieldChromeStyles.iconOutlined, state.isInvalid && (state.isHovered && !focused ? fieldChromeStyles.iconErrorHovered : fieldChromeStyles.iconError), state.isDisabled && fieldChromeStyles.iconDisabled),
157
159
  children: trailing
158
160
  });
159
- $[34] = multiline;
160
- $[35] = outlined;
161
- $[36] = state.isDisabled;
162
- $[37] = state.isInvalid;
163
- $[38] = trailing;
164
- $[39] = t9;
165
- } else t9 = $[39];
161
+ $[35] = focused;
162
+ $[36] = multiline;
163
+ $[37] = outlined;
164
+ $[38] = state.isDisabled;
165
+ $[39] = state.isHovered;
166
+ $[40] = state.isInvalid;
167
+ $[41] = trailing;
168
+ $[42] = t9;
169
+ } else t9 = $[42];
166
170
  let t10;
167
- if ($[40] !== t1 || $[41] !== t2 || $[42] !== t3 || $[43] !== t8 || $[44] !== t9 || $[45] !== trigger) {
171
+ if ($[43] !== t1 || $[44] !== t2 || $[45] !== t3 || $[46] !== t8 || $[47] !== t9 || $[48] !== trigger) {
168
172
  t10 = /* @__PURE__ */ jsxs(BoxContext, {
169
173
  value: t1,
170
174
  children: [
@@ -175,19 +179,19 @@ function BoxContent(t0) {
175
179
  t9
176
180
  ]
177
181
  });
178
- $[40] = t1;
179
- $[41] = t2;
180
- $[42] = t3;
181
- $[43] = t8;
182
- $[44] = t9;
183
- $[45] = trigger;
184
- $[46] = t10;
185
- } else t10 = $[46];
182
+ $[43] = t1;
183
+ $[44] = t2;
184
+ $[45] = t3;
185
+ $[46] = t8;
186
+ $[47] = t9;
187
+ $[48] = trigger;
188
+ $[49] = t10;
189
+ } else t10 = $[49];
186
190
  return t10;
187
191
  }
188
192
  function boxStyles(floatingLabel, isFocused, multiline, leading, trailing, variant) {
189
193
  const outlined = variant === "outlined";
190
- return (state) => props(fieldChromeStyles.box, floatingLabel ? fieldChromeStyles.boxFloating : fieldChromeStyles.boxFixed, multiline && fieldChromeStyles.boxMultiline, leading && fieldChromeStyles.boxLeading, trailing && fieldChromeStyles.boxTrailing, outlined && fieldChromeStyles.boxOutlined, outlined && floatingLabel && fieldChromeStyles.boxOutlinedFloating, outlined && multiline && fieldChromeStyles.boxOutlinedMultiline, state.isInvalid && (outlined ? fieldChromeStyles.boxOutlinedError : fieldChromeStyles.boxError), outlined && state.isHovered && (state.isInvalid ? fieldChromeStyles.boxOutlinedErrorHovered : fieldChromeStyles.boxOutlinedHovered), isFocused && focusedStyle(outlined, state.isInvalid), state.isDisabled && (outlined ? fieldChromeStyles.boxOutlinedDisabled : fieldChromeStyles.boxDisabled));
194
+ return (state) => props(fieldChromeStyles.box, floatingLabel ? fieldChromeStyles.boxFloating : fieldChromeStyles.boxFixed, multiline && fieldChromeStyles.boxMultiline, leading && fieldChromeStyles.boxLeading, trailing && fieldChromeStyles.boxTrailing, outlined && fieldChromeStyles.boxOutlined, outlined && floatingLabel && fieldChromeStyles.boxOutlinedFloating, outlined && multiline && fieldChromeStyles.boxOutlinedMultiline, state.isInvalid && (outlined ? fieldChromeStyles.boxOutlinedError : fieldChromeStyles.boxError), outlined && state.isHovered && (state.isInvalid ? fieldChromeStyles.boxOutlinedErrorHovered : fieldChromeStyles.boxOutlinedHovered), !outlined && state.isHovered && (state.isInvalid ? fieldChromeStyles.boxErrorHovered : fieldChromeStyles.boxHovered), isFocused && focusedStyle(outlined, state.isInvalid), state.isDisabled && (outlined ? fieldChromeStyles.boxOutlinedDisabled : fieldChromeStyles.boxDisabled));
191
195
  }
192
196
  /**
193
197
  * The control's `onInput`, which also commits the field's validation while it
@@ -342,90 +346,92 @@ function FieldBox(t0) {
342
346
  * it was in no name and no description, and a reader heard the label alone.
343
347
  */
344
348
  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;
349
+ const $ = c(24);
350
+ const { leftToRight: t1, numeric: t2, placeholder, prefix, suffix, ...props$3 } = t0;
351
+ const leftToRight = t1 === void 0 ? false : t1;
352
+ const numeric = t2 === void 0 ? false : t2;
348
353
  const box = useContext(BoxContext);
349
354
  const validation = useContext(FieldErrorContext);
350
355
  const prefixId = useId();
351
356
  const suffixId = useId();
352
357
  const field = useSlottedContext(InputContext);
353
- const describedBy = idsOf(prefix === void 0 ? void 0 : prefixId, suffix === void 0 ? void 0 : suffixId, field?.["aria-describedby"], props$1["aria-describedby"]);
358
+ const describedBy = idsOf(prefix === void 0 ? void 0 : prefixId, suffix === void 0 ? void 0 : suffixId, field?.["aria-describedby"], props$3["aria-describedby"]);
354
359
  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);
360
+ const t3 = placeholder ?? (box.label === "floating" ? " " : void 0);
361
+ const t4 = commitWhileInvalid(validation?.isInvalid ?? false, props$3.onInput);
362
+ let t5;
363
+ if ($[0] !== box || $[1] !== leftToRight || $[2] !== numeric) {
364
+ t5 = (state) => props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === "floating" && fieldChromeStyles.inputUnderFloatingLabel, numeric && fieldChromeStyles.numeric, leftToRight && fieldChromeStyles.leftToRight, state.isInvalid && fieldChromeStyles.inputInvalid, state.isDisabled && fieldChromeStyles.inputDisabled);
360
365
  $[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,
369
- ...props$1,
366
+ $[1] = leftToRight;
367
+ $[2] = numeric;
368
+ $[3] = t5;
369
+ } else t5 = $[3];
370
+ const t6 = mergeStatefulStyles(t5, props$3);
371
+ let t7;
372
+ if ($[4] !== T0 || $[5] !== describedBy || $[6] !== props$3 || $[7] !== t3 || $[8] !== t4 || $[9] !== t6) {
373
+ t7 = /* @__PURE__ */ jsx(T0, {
374
+ placeholder: t3,
375
+ ...props$3,
370
376
  "aria-describedby": describedBy,
371
- onInput: t3,
372
- ...t5
377
+ onInput: t4,
378
+ ...t6
373
379
  });
374
- $[3] = T0;
375
- $[4] = describedBy;
376
- $[5] = props$1;
377
- $[6] = t2;
380
+ $[4] = T0;
381
+ $[5] = describedBy;
382
+ $[6] = props$3;
378
383
  $[7] = t3;
379
- $[8] = t5;
384
+ $[8] = t4;
380
385
  $[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
386
  $[10] = t7;
388
387
  } else t7 = $[10];
388
+ const control = t7;
389
+ if (prefix === void 0 && suffix === void 0) return control;
389
390
  let t8;
390
- if ($[11] !== box || $[12] !== prefix || $[13] !== prefixId) {
391
- t8 = prefix === void 0 ? null : /* @__PURE__ */ jsx("span", {
391
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
392
+ t8 = props(fieldChromeStyles.affixLine);
393
+ $[11] = t8;
394
+ } else t8 = $[11];
395
+ let t9;
396
+ if ($[12] !== box || $[13] !== prefix || $[14] !== prefixId) {
397
+ t9 = prefix === void 0 ? null : /* @__PURE__ */ jsx("span", {
392
398
  id: prefixId,
393
399
  ...props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel),
394
400
  children: prefix
395
401
  });
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", {
402
+ $[12] = box;
403
+ $[13] = prefix;
404
+ $[14] = prefixId;
405
+ $[15] = t9;
406
+ } else t9 = $[15];
407
+ let t10;
408
+ if ($[16] !== box || $[17] !== suffix || $[18] !== suffixId) {
409
+ t10 = suffix === void 0 ? null : /* @__PURE__ */ jsx("span", {
404
410
  id: suffixId,
405
411
  ...props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel),
406
412
  children: suffix
407
413
  });
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,
414
+ $[16] = box;
415
+ $[17] = suffix;
416
+ $[18] = suffixId;
417
+ $[19] = t10;
418
+ } else t10 = $[19];
419
+ let t11;
420
+ if ($[20] !== control || $[21] !== t10 || $[22] !== t9) {
421
+ t11 = /* @__PURE__ */ jsxs("span", {
422
+ ...t8,
417
423
  children: [
418
- t8,
424
+ t9,
419
425
  control,
420
- t9
426
+ t10
421
427
  ]
422
428
  });
423
- $[19] = control;
424
- $[20] = t8;
425
- $[21] = t9;
426
- $[22] = t10;
427
- } else t10 = $[22];
428
- return t10;
429
+ $[20] = control;
430
+ $[21] = t10;
431
+ $[22] = t9;
432
+ $[23] = t11;
433
+ } else t11 = $[23];
434
+ return t11;
429
435
  }
430
436
  /**
431
437
  * A date or a time's segments, in a {@link FieldBox}: React Aria's
@@ -488,7 +494,7 @@ function FieldTextArea(t0) {
488
494
  const t3 = commitWhileInvalid(validation?.isInvalid ?? false, props$2.onInput);
489
495
  let t4;
490
496
  if ($[0] !== autosize || $[1] !== box) {
491
- t4 = (state) => props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === "floating" && fieldChromeStyles.inputUnderFloatingLabel, fieldChromeStyles.textArea, autosize && fieldChromeStyles.textAreaAutosize, autosize && fieldChromeStyles.autosizeCell, state.isDisabled && fieldChromeStyles.inputDisabled);
497
+ t4 = (state) => props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === "floating" && fieldChromeStyles.inputUnderFloatingLabel, fieldChromeStyles.textArea, autosize && fieldChromeStyles.textAreaAutosize, autosize && fieldChromeStyles.autosizeCell, state.isInvalid && fieldChromeStyles.inputInvalid, state.isDisabled && fieldChromeStyles.inputDisabled);
492
498
  $[0] = autosize;
493
499
  $[1] = box;
494
500
  $[2] = t4;
@@ -555,21 +561,21 @@ function FieldTextArea(t0) {
555
561
  * the fill, the underline and the focus indicator, and it lights up while
556
562
  * this has focus because the indicator follows focus within.
557
563
  */
558
- function FieldTrigger(props$5) {
564
+ function FieldTrigger(props$4) {
559
565
  const $ = c(5);
560
566
  let t0;
561
- if ($[0] !== props$5) {
562
- t0 = mergeStatefulStyles(props(fieldChromeStyles.trigger), props$5);
563
- $[0] = props$5;
567
+ if ($[0] !== props$4) {
568
+ t0 = mergeStatefulStyles(props(fieldChromeStyles.trigger), props$4);
569
+ $[0] = props$4;
564
570
  $[1] = t0;
565
571
  } else t0 = $[1];
566
572
  let t1;
567
- if ($[2] !== props$5 || $[3] !== t0) {
573
+ if ($[2] !== props$4 || $[3] !== t0) {
568
574
  t1 = /* @__PURE__ */ jsx(Button, {
569
- ...props$5,
575
+ ...props$4,
570
576
  ...t0
571
577
  });
572
- $[2] = props$5;
578
+ $[2] = props$4;
573
579
  $[3] = t0;
574
580
  $[4] = t1;
575
581
  } else t1 = $[4];
@@ -593,19 +599,19 @@ function FieldTrigger(props$5) {
593
599
  */
594
600
  function FieldValue(t0) {
595
601
  const $ = c(3);
596
- const { isFocused: t1, isPlaceholder: t2, ...props$4 } = t0;
602
+ const { isFocused: t1, isPlaceholder: t2, ...props$1 } = t0;
597
603
  const isFocused = t1 === void 0 ? false : t1;
598
604
  const isPlaceholder = t2 === void 0 ? false : t2;
599
605
  const box = useContext(BoxContext);
600
606
  const hidden = isPlaceholder && box.label === "floating" && !isFocused;
601
- const t3 = mergeStyles(props(fieldChromeStyles.input, fieldChromeStyles.value, box.underLabel && fieldChromeStyles.inputUnderLabel, isPlaceholder && fieldChromeStyles.valuePlaceholder, hidden && fieldChromeStyles.valuePlaceholderHidden), props$4);
607
+ const t3 = mergeStyles(props(fieldChromeStyles.input, fieldChromeStyles.value, box.underLabel && fieldChromeStyles.inputUnderLabel, isPlaceholder && fieldChromeStyles.valuePlaceholder, hidden && fieldChromeStyles.valuePlaceholderHidden), props$1);
602
608
  let t4;
603
- if ($[0] !== props$4 || $[1] !== t3) {
609
+ if ($[0] !== props$1 || $[1] !== t3) {
604
610
  t4 = /* @__PURE__ */ jsx("span", {
605
- ...props$4,
611
+ ...props$1,
606
612
  ...t3
607
613
  });
608
- $[0] = props$4;
614
+ $[0] = props$1;
609
615
  $[1] = t3;
610
616
  $[2] = t4;
611
617
  } else t4 = $[2];
@@ -668,18 +674,21 @@ function FieldLabel(t0) {
668
674
  let t1;
669
675
  let t2;
670
676
  if ($[0] !== t0) {
671
- const { children: t3, isRequired: t4, state: t5, variant: t6, ...props$3 } = t0;
677
+ const { children: t3, isRequired: t4, outlined: t5, state: t6, variant: t7, ...props$5 } = t0;
672
678
  children = t3;
673
679
  isRequired = t4 === void 0 ? false : t4;
674
- const state = t5 === void 0 ? NO_STATE : t5;
675
- const variant = t6 === void 0 ? "field" : t6;
676
- const { isDisabled: t7, isFocusWithin: t8, isInvalid: t9 } = state;
677
- const isDisabled = t7 === void 0 ? false : t7;
678
- const isFocusWithin = t8 === void 0 ? false : t8;
679
- const isInvalid = t9 === void 0 ? false : t9;
680
+ const outlined = t5 === void 0 ? false : t5;
681
+ const state = t6 === void 0 ? NO_STATE : t6;
682
+ const variant = t7 === void 0 ? "field" : t7;
683
+ const { isDisabled: t8, isFocusWithin: t9, isHovered: t10, isInvalid: t11 } = state;
684
+ const isDisabled = t8 === void 0 ? false : t8;
685
+ const isFocusWithin = t9 === void 0 ? false : t9;
686
+ const isHovered = t10 === void 0 ? false : t10;
687
+ const isInvalid = t11 === void 0 ? false : t11;
688
+ const hovered = !isDisabled && !isFocusWithin && isHovered;
680
689
  T0 = Label;
681
- t1 = props$3;
682
- t2 = mergeStyles(props(fieldChromeStyles.label, variant === "group" && groupStyles.label, isDisabled && fieldChromeStyles.labelDisabled, isInvalid && fieldChromeStyles.labelError, !isDisabled && !isInvalid && isFocusWithin && fieldChromeStyles.labelFocused), props$3);
690
+ t1 = props$5;
691
+ t2 = mergeStyles(props(fieldChromeStyles.label, variant === "group" && groupStyles.label, isDisabled && fieldChromeStyles.labelDisabled, isInvalid && fieldChromeStyles.labelError, !isDisabled && !isInvalid && isFocusWithin && fieldChromeStyles.labelFocused, hovered && isInvalid && fieldChromeStyles.labelErrorHovered, hovered && !isInvalid && outlined && fieldChromeStyles.labelHovered), props$5);
683
692
  $[0] = t0;
684
693
  $[1] = T0;
685
694
  $[2] = children;
@@ -720,11 +729,13 @@ function FieldLabel(t0) {
720
729
  * the field's validation state is read for.
721
730
  */
722
731
  function FieldMessage(t0) {
723
- const $ = c(34);
724
- const { characterCount: t1, characterLimitLabel, description, error, errorId, inset: t2, maxLength, reserve: t3 } = t0;
732
+ const $ = c(41);
733
+ const { characterCount: t1, characterLimitLabel, characterLimitReachedLabel, description, error, errorId, indent: t2, inset: t3, isDisabled: t4, maxLength, reserve: t5 } = t0;
725
734
  const characterCount = t1 === void 0 ? false : t1;
726
- const inset = t2 === void 0 ? true : t2;
727
- const reserve = t3 === void 0 ? true : t3;
735
+ const indent = t2 === void 0 ? false : t2;
736
+ const inset = t3 === void 0 ? true : t3;
737
+ const isDisabled = t4 === void 0 ? false : t4;
738
+ const reserve = t5 === void 0 ? true : t5;
728
739
  const validation = useContext(FieldErrorContext);
729
740
  const invalid = error !== void 0 || (validation?.isInvalid ?? false);
730
741
  const { locale } = useLocale();
@@ -733,18 +744,18 @@ function FieldMessage(t0) {
733
744
  const textArea = useSlottedContext(TextAreaContext);
734
745
  const insideForm = useInsideForm();
735
746
  const text = useContext(TextContext);
736
- let t4;
747
+ let t6;
737
748
  if ($[0] !== characterLimitLabel || $[1] !== maxLength || $[2] !== messages) {
738
- t4 = maxLength === void 0 ? void 0 : characterLimitLabel ?? messages.characterLimit(maxLength);
749
+ t6 = maxLength === void 0 ? void 0 : characterLimitLabel ?? messages.characterLimit(maxLength);
739
750
  $[0] = characterLimitLabel;
740
751
  $[1] = maxLength;
741
752
  $[2] = messages;
742
- $[3] = t4;
743
- } else t4 = $[3];
744
- const limit = t4;
745
- let t5;
753
+ $[3] = t6;
754
+ } else t6 = $[3];
755
+ const limit = t6;
756
+ let t7;
746
757
  if ($[4] !== limit) {
747
- t5 = limit === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, {
758
+ t7 = limit === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, {
748
759
  elementType: "span",
749
760
  children: /* @__PURE__ */ jsx(Text, {
750
761
  slot: "description",
@@ -752,18 +763,19 @@ function FieldMessage(t0) {
752
763
  })
753
764
  });
754
765
  $[4] = limit;
755
- $[5] = t5;
756
- } else t5 = $[5];
757
- const hidden = t5;
766
+ $[5] = t7;
767
+ } else t7 = $[5];
768
+ const hidden = t7;
758
769
  const collapsed = !invalid && description === void 0 && !characterCount && !(insideForm && reserve);
759
770
  const value = input?.value ?? textArea?.value ?? "";
760
771
  const length = String(value).length;
761
772
  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, {
773
+ const reached = characterCount && maxLength !== void 0 && length >= maxLength ? characterLimitReachedLabel ?? messages.characterLimitReached : null;
774
+ let t8;
775
+ if ($[6] !== hidden || $[7] !== hint || $[8] !== isDisabled || $[9] !== limit) {
776
+ t8 = hint === void 0 ? hidden : /* @__PURE__ */ jsxs(Text, {
765
777
  slot: "description",
766
- ...props(fieldChromeStyles.message),
778
+ ...props(fieldChromeStyles.message, isDisabled && fieldChromeStyles.messageDisabled),
767
779
  children: [hint, limit === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, {
768
780
  elementType: "span",
769
781
  children: ` ${limit}`
@@ -771,20 +783,21 @@ function FieldMessage(t0) {
771
783
  });
772
784
  $[6] = hidden;
773
785
  $[7] = hint;
774
- $[8] = limit;
775
- $[9] = t6;
776
- } else t6 = $[9];
777
- const described = t6;
786
+ $[8] = isDisabled;
787
+ $[9] = limit;
788
+ $[10] = t8;
789
+ } else t8 = $[10];
790
+ const described = t8;
778
791
  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);
782
- $[10] = t7;
783
- } else t7 = $[10];
784
- const messageStyles = t7;
785
- let t8;
786
- if ($[11] !== error || $[12] !== errorId || $[13] !== errorSlot) {
787
- t8 = errorSlot ? /* @__PURE__ */ jsx(Text, {
792
+ let t9;
793
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
794
+ t9 = props(fieldChromeStyles.message, fieldChromeStyles.messageError);
795
+ $[11] = t9;
796
+ } else t9 = $[11];
797
+ const messageStyles = t9;
798
+ let t10;
799
+ if ($[12] !== error || $[13] !== errorId || $[14] !== errorSlot) {
800
+ t10 = errorSlot ? /* @__PURE__ */ jsx(Text, {
788
801
  slot: "errorMessage",
789
802
  ...messageStyles,
790
803
  children: error
@@ -793,71 +806,85 @@ function FieldMessage(t0) {
793
806
  ...messageStyles,
794
807
  children: error
795
808
  });
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];
809
- let t10;
810
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
811
- t10 = props(fieldChromeStyles.messageRegion);
812
- $[18] = t10;
813
- } else t10 = $[18];
809
+ $[12] = error;
810
+ $[13] = errorId;
811
+ $[14] = errorSlot;
812
+ $[15] = t10;
813
+ } else t10 = $[15];
814
+ const written = t10;
814
815
  let t11;
815
- if ($[19] !== error || $[20] !== validation || $[21] !== written) {
816
- t11 = /* @__PURE__ */ jsx("span", {
816
+ if ($[16] !== collapsed || $[17] !== indent || $[18] !== inset) {
817
+ t11 = props(fieldChromeStyles.message, fieldChromeStyles.messageLine, indent && fieldChromeStyles.messageIndent, inset && fieldChromeStyles.messageInset, collapsed && fieldChromeStyles.messageLineCollapsed);
818
+ $[16] = collapsed;
819
+ $[17] = indent;
820
+ $[18] = inset;
821
+ $[19] = t11;
822
+ } else t11 = $[19];
823
+ let t12;
824
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
825
+ t12 = props(fieldChromeStyles.messageRegion);
826
+ $[20] = t12;
827
+ } else t12 = $[20];
828
+ let t13;
829
+ if ($[21] !== error || $[22] !== validation || $[23] !== written) {
830
+ t13 = /* @__PURE__ */ jsx("span", {
817
831
  "aria-atomic": "true",
818
832
  "aria-live": "polite",
819
- ...t10,
833
+ ...t12,
820
834
  children: validation === null && error !== void 0 ? written : /* @__PURE__ */ jsx(FieldError, {
821
835
  ...props(fieldChromeStyles.message, fieldChromeStyles.messageError),
822
836
  children: error
823
837
  })
824
838
  });
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", {
839
+ $[21] = error;
840
+ $[22] = validation;
841
+ $[23] = written;
842
+ $[24] = t13;
843
+ } else t13 = $[24];
844
+ let t14;
845
+ if ($[25] !== characterCount || $[26] !== invalid || $[27] !== length || $[28] !== locale || $[29] !== maxLength) {
846
+ t14 = characterCount ? /* @__PURE__ */ jsx("span", {
833
847
  "aria-hidden": "true",
834
848
  ...props(fieldChromeStyles.message, fieldChromeStyles.counter, invalid && fieldChromeStyles.messageError),
835
849
  children: countIn(locale, length, maxLength)
836
850
  }) : 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,
851
+ $[25] = characterCount;
852
+ $[26] = invalid;
853
+ $[27] = length;
854
+ $[28] = locale;
855
+ $[29] = maxLength;
856
+ $[30] = t14;
857
+ } else t14 = $[30];
858
+ let t15;
859
+ if ($[31] !== characterCount || $[32] !== maxLength || $[33] !== reached) {
860
+ t15 = characterCount && maxLength !== void 0 ? /* @__PURE__ */ jsx(VisuallyHidden, {
861
+ elementType: "output",
862
+ children: reached
863
+ }) : null;
864
+ $[31] = characterCount;
865
+ $[32] = maxLength;
866
+ $[33] = reached;
867
+ $[34] = t15;
868
+ } else t15 = $[34];
869
+ let t16;
870
+ if ($[35] !== described || $[36] !== t11 || $[37] !== t13 || $[38] !== t14 || $[39] !== t15) {
871
+ t16 = /* @__PURE__ */ jsxs("div", {
872
+ ...t11,
848
873
  children: [
849
- t11,
874
+ t13,
850
875
  described,
851
- t12
876
+ t14,
877
+ t15
852
878
  ]
853
879
  });
854
- $[29] = described;
855
- $[30] = t11;
856
- $[31] = t12;
857
- $[32] = t9;
858
- $[33] = t13;
859
- } else t13 = $[33];
860
- return t13;
880
+ $[35] = described;
881
+ $[36] = t11;
882
+ $[37] = t13;
883
+ $[38] = t14;
884
+ $[39] = t15;
885
+ $[40] = t16;
886
+ } else t16 = $[40];
887
+ return t16;
861
888
  }
862
889
  /**
863
890
  * The same asterisk for a label that is not a field's own — a checkbox's, a